[DRE-commits] [ruby-passenger] 02/17: Imported Upstream version 4.0.10

Felix Geyer fgeyer at alioth.debian.org
Mon Aug 5 19:12:02 UTC 2013


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

fgeyer pushed a commit to branch master
in repository ruby-passenger.

commit 761127b6c5c04af370e31b849460e7b7ccfce9af
Author: Felix Geyer <fgeyer at debian.org>
Date:   Mon Aug 5 20:34:28 2013 +0200

    Imported Upstream version 4.0.10
---
 ._INSTALL                                          |  Bin 184 -> 0 bytes
 .travis.yml                                        |   15 +
 CONTRIBUTING.md                                    |  302 +
 CONTRIBUTORS                                       |   69 +
 DEVELOPERS.TXT                                     |  114 -
 INSTALL                                            |    6 -
 INSTALL.md                                         |    7 +
 LICENSE                                            |    2 +-
 NEWS                                               |  410 +
 PACKAGING.TXT                                      |   25 -
 README                                             |   45 -
 README.md                                          |   40 +
 Rakefile                                           |   43 +-
 bin/passenger                                      |    7 +-
 bin/passenger-config                               |   95 +-
 bin/passenger-install-apache2-module               |   74 +-
 bin/passenger-install-nginx-module                 |  157 +-
 bin/passenger-make-enterprisey                     |   82 -
 bin/passenger-memory-stats                         |    8 +-
 bin/passenger-status                               |  263 +-
 build/agents.rb                                    |  147 +-
 build/apache2.rb                                   |   80 +-
 build/basics.rb                                    |  135 +-
 build/common_library.rb                            |  241 +-
 build/config.rb                                    |   46 -
 build/cplusplus_support.rb                         |   56 +-
 build/cxx_tests.rb                                 |  263 +-
 build/debian.rb                                    |  129 +
 build/documentation.rb                             |   41 +-
 build/gempackagetask.rb                            |   99 -
 build/integration_tests.rb                         |   34 +-
 build/misc.rb                                      |   98 +-
 build/nginx.rb                                     |   55 +-
 build/oxt_tests.rb                                 |    3 +-
 build/packagetask.rb                               |  186 -
 build/packaging.rb                                 |  331 +-
 build/preprocessor.rb                              |  314 +
 build/rake_extensions.rb                           |    2 +-
 build/rpm.rb                                       |    2 +-
 build/ruby_extension.rb                            |   61 +-
 build/ruby_tests.rb                                |   14 +-
 build/test_basics.rb                               |   23 +-
 debian.template/README.Debian                      |   15 +
 debian.template/changelog                          |  316 +
 debian.template/compat                             |    1 +
 debian.template/control                            |   71 +
 debian.template/copyright                          |  385 +
 debian.template/libapache2-mod-passenger.install   |    3 +
 debian.template/libapache2-mod-passenger.postinst  |   36 +
 debian.template/libapache2-mod-passenger.prerm     |   15 +
 debian.template/locations.ini                      |   12 +
 debian.template/passenger.conf                     |    4 +
 debian.template/passenger.load                     |    1 +
 .../favicon.ico => debian.template/patches/series  |    0
 debian.template/repack.sh                          |   42 +
 debian.template/ruby-passenger-dev.install         |    3 +
 debian.template/ruby-passenger-doc.install         |    2 +
 debian.template/ruby-passenger.docs                |    4 +
 debian.template/ruby-passenger.install             |   11 +
 debian.template/ruby-passenger.manpages            |    4 +
 debian.template/rules.template                     |   35 +
 debian.template/source/format                      |    1 +
 debian.template/watch                              |    3 +
 dev/copy_boost_headers.rb                          |   29 +-
 dev/find_owner_pipe_leaks.rb                       |    2 +-
 dev/render_error_pages.rb                          |    2 +-
 dev/run_travis.sh                                  |   90 +
 doc/ApplicationPool algorithm.txt                  |  615 -
 doc/Architectural overview.html                    |  137 +-
 doc/DebuggingAndStressTesting.md                   |   60 +
 doc/Packaging.html                                 |  801 +
 doc/Packaging.txt.md                               |  276 +
 doc/Security of user switching support.html        |   99 +-
 doc/Users guide Apache.html                        | 5431 ++--
 doc/Users guide Apache.idmap.txt                   |  352 +-
 doc/Users guide Apache.txt                         | 1101 +-
 doc/Users guide Nginx.html                         | 4966 +++-
 doc/Users guide Nginx.idmap.txt                    |  272 +-
 doc/Users guide Nginx.txt                          | 1067 +-
 doc/Users guide Standalone.html                    |  125 +-
 doc/Users guide Standalone.idmap.txt               |   10 +-
 doc/Users guide Standalone.txt                     |    4 +
 doc/images/._phusion_banner.png                    |  Bin 422 -> 0 bytes
 doc/images/glyphicons-halflings-white.png          |  Bin 0 -> 8777 bytes
 doc/images/glyphicons-halflings.png                |  Bin 0 -> 13826 bytes
 doc/images/phusion_banner_small.png                |  Bin 0 -> 28910 bytes
 doc/images/{smart-lv2.png => smart.png}            |  Bin 45434 -> 45434 bytes
 doc/images/{smart-lv2.svg => smart.svg}            |    0
 doc/templates/bootstrap.min.css                    |  397 +
 doc/templates/markdown.html.erb                    |  117 +
 .../alternative_for_flying_passenger.txt           |    1 +
 .../analysis_and_system_maintenance.txt            |   32 +-
 .../appendix_b_terminology.txt                     |    8 +
 .../appendix_c_spawning_methods.txt                |   74 +-
 doc/users_guide_snippets/enterprise_only.txt       |    1 +
 doc/users_guide_snippets/environment_variables.txt |  268 +
 doc/users_guide_snippets/installation.txt          |  914 +
 .../passenger_spawn_method.txt                     |   48 +-
 doc/users_guide_snippets/rackup_specifications.txt |    4 +
 doc/users_guide_snippets/rvm_helper_tool.txt       |   56 +
 doc/users_guide_snippets/since_version.txt         |    1 +
 doc/users_guide_snippets/support_information.txt   |   27 +
 doc/users_guide_snippets/tips.txt                  |  446 +-
 .../under_the_hood/page_caching_support.txt        |    4 +-
 ext/apache2/Bucket.cpp                             |   35 +-
 ext/apache2/Bucket.h                               |   25 +-
 ext/apache2/Configuration.cpp                      |  329 +-
 ext/apache2/Configuration.h                        |    2 +-
 ext/apache2/Configuration.hpp                      |  140 +-
 ext/apache2/DirectoryMapper.h                      |  304 +-
 ext/apache2/HelperAgent.cpp                        |  364 -
 ext/apache2/Hooks.cpp                              |  592 +-
 ext/apache2/Hooks.h                                |    2 +-
 ext/apache2/mod_passenger.c                        |    2 +-
 ext/boost/._bind.hpp                               |  Bin 244 -> 0 bytes
 ext/boost/._checked_delete.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/._enable_shared_from_this.hpp            |  Bin 244 -> 0 bytes
 ext/boost/._exception_ptr.hpp                      |  Bin 244 -> 0 bytes
 ext/boost/._function_equal.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/._get_pointer.hpp                        |  Bin 244 -> 0 bytes
 ext/boost/._implicit_cast.hpp                      |  Bin 244 -> 0 bytes
 ext/boost/._integer.hpp                            |  Bin 244 -> 0 bytes
 ext/boost/._io_fwd.hpp                             |  Bin 244 -> 0 bytes
 ext/boost/._is_placeholder.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/._limits.hpp                             |  Bin 244 -> 0 bytes
 ext/boost/._make_shared.hpp                        |  Bin 244 -> 0 bytes
 ext/boost/._mem_fn.hpp                             |  Bin 244 -> 0 bytes
 ext/boost/._memory_order.hpp                       |  Bin 244 -> 0 bytes
 ext/boost/._next_prior.hpp                         |  Bin 244 -> 0 bytes
 ext/boost/._non_type.hpp                           |  Bin 244 -> 0 bytes
 ext/boost/._noncopyable.hpp                        |  Bin 244 -> 0 bytes
 ext/boost/._none_t.hpp                             |  Bin 244 -> 0 bytes
 ext/boost/._optional.hpp                           |  Bin 244 -> 0 bytes
 ext/boost/._ref.hpp                                |  Bin 244 -> 0 bytes
 ext/boost/._scoped_array.hpp                       |  Bin 244 -> 0 bytes
 ext/boost/._scoped_ptr.hpp                         |  Bin 244 -> 0 bytes
 ext/boost/._shared_array.hpp                       |  Bin 244 -> 0 bytes
 ext/boost/._shared_ptr.hpp                         |  Bin 244 -> 0 bytes
 ext/boost/._thread.hpp                             |  Bin 244 -> 0 bytes
 ext/boost/._token_iterator.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/._tokenizer.hpp                          |  Bin 244 -> 0 bytes
 ext/boost/._type.hpp                               |  Bin 244 -> 0 bytes
 ext/boost/._utility.hpp                            |  Bin 244 -> 0 bytes
 ext/boost/._visit_each.hpp                         |  Bin 244 -> 0 bytes
 ext/boost/._weak_ptr.hpp                           |  Bin 244 -> 0 bytes
 ext/boost/algorithm/string/._case_conv.hpp         |  Bin 244 -> 0 bytes
 ext/boost/algorithm/string/._compare.hpp           |  Bin 244 -> 0 bytes
 ext/boost/algorithm/string/._concept.hpp           |  Bin 244 -> 0 bytes
 ext/boost/algorithm/string/._config.hpp            |  Bin 244 -> 0 bytes
 ext/boost/algorithm/string/._constants.hpp         |  Bin 244 -> 0 bytes
 ext/boost/algorithm/string/._erase.hpp             |  Bin 244 -> 0 bytes
 ext/boost/algorithm/string/._find_format.hpp       |  Bin 244 -> 0 bytes
 ext/boost/algorithm/string/._finder.hpp            |  Bin 244 -> 0 bytes
 ext/boost/algorithm/string/._replace.hpp           |  Bin 244 -> 0 bytes
 ext/boost/algorithm/string/._sequence_traits.hpp   |  Bin 244 -> 0 bytes
 ext/boost/algorithm/string/._yes_no_type.hpp       |  Bin 244 -> 0 bytes
 ext/boost/algorithm/string/detail/._finder.hpp     |  Bin 244 -> 0 bytes
 .../algorithm/string/detail/._replace_storage.hpp  |  Bin 244 -> 0 bytes
 ext/boost/algorithm/string/detail/._sequence.hpp   |  Bin 244 -> 0 bytes
 ext/boost/algorithm/string/detail/._util.hpp       |  Bin 244 -> 0 bytes
 ext/boost/algorithm/string/detail/case_conv.hpp    |    6 +-
 ext/boost/algorithm/string/detail/find_format.hpp  |   40 +-
 .../algorithm/string/detail/find_format_all.hpp    |   46 +-
 .../algorithm/string/detail/find_format_store.hpp  |    4 +-
 ext/boost/algorithm/string/detail/formatter.hpp    |   25 +
 ext/boost/algorithm/string/formatter.hpp           |   23 +-
 ext/boost/aligned_storage.hpp                      |  181 +
 ext/boost/array.hpp                                |  446 +
 ext/boost/assert.hpp                               |   89 +-
 ext/boost/bind/._arg.hpp                           |  Bin 244 -> 0 bytes
 ext/boost/bind/._bind_cc.hpp                       |  Bin 244 -> 0 bytes
 ext/boost/bind/._bind_mf2_cc.hpp                   |  Bin 244 -> 0 bytes
 ext/boost/bind/._bind_mf_cc.hpp                    |  Bin 244 -> 0 bytes
 ext/boost/bind/._bind_template.hpp                 |  Bin 244 -> 0 bytes
 ext/boost/bind/._mem_fn.hpp                        |  Bin 244 -> 0 bytes
 ext/boost/bind/._mem_fn_cc.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/bind/._mem_fn_template.hpp               |  Bin 244 -> 0 bytes
 ext/boost/bind/._placeholders.hpp                  |  Bin 244 -> 0 bytes
 ext/boost/bind/._storage.hpp                       |  Bin 244 -> 0 bytes
 ext/boost/bind/bind.hpp                            |    2 +-
 ext/boost/call_traits.hpp                          |   24 -
 ext/boost/cerrno.hpp                               |  331 +
 ext/boost/chrono/ceil.hpp                          |   36 +
 ext/boost/chrono/clock_string.hpp                  |   25 +
 ext/boost/chrono/config.hpp                        |  215 +
 ext/boost/chrono/detail/is_evenly_divisible_by.hpp |   31 +
 ext/boost/chrono/detail/static_assert.hpp          |   30 +
 ext/boost/chrono/detail/system.hpp                 |   29 +
 ext/boost/chrono/duration.hpp                      |  795 +
 ext/boost/chrono/system_clocks.hpp                 |  233 +
 ext/boost/chrono/time_point.hpp                    |  379 +
 ext/boost/concept/._assert.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/concept/._usage.hpp                      |  Bin 244 -> 0 bytes
 ext/boost/concept/detail/._concept_def.hpp         |  Bin 244 -> 0 bytes
 ext/boost/concept/detail/._concept_undef.hpp       |  Bin 244 -> 0 bytes
 ext/boost/concept/detail/._general.hpp             |  Bin 244 -> 0 bytes
 ext/boost/concept/detail/._has_constraints.hpp     |  Bin 244 -> 0 bytes
 .../concept/detail/backward_compatibility.hpp      |    2 +-
 ext/boost/concept_check.hpp                        |  204 +-
 ext/boost/config.hpp                               |    2 +-
 ext/boost/config/._abi_prefix.hpp                  |  Bin 244 -> 0 bytes
 ext/boost/config/._abi_suffix.hpp                  |  Bin 244 -> 0 bytes
 ext/boost/config/._posix_features.hpp              |  Bin 244 -> 0 bytes
 ext/boost/config/._requires_threads.hpp            |  Bin 244 -> 0 bytes
 ext/boost/config/._user.hpp                        |  Bin 244 -> 0 bytes
 ext/boost/config/abi/._borland_prefix.hpp          |  Bin 244 -> 0 bytes
 ext/boost/config/abi/._borland_suffix.hpp          |  Bin 244 -> 0 bytes
 ext/boost/config/abi/._msvc_prefix.hpp             |  Bin 244 -> 0 bytes
 ext/boost/config/abi/._msvc_suffix.hpp             |  Bin 244 -> 0 bytes
 ext/boost/config/auto_link.hpp                     |   14 +-
 ext/boost/config/compiler/._comeau.hpp             |  Bin 244 -> 0 bytes
 ext/boost/config/compiler/._compaq_cxx.hpp         |  Bin 244 -> 0 bytes
 ext/boost/config/compiler/._greenhills.hpp         |  Bin 244 -> 0 bytes
 ext/boost/config/compiler/._kai.hpp                |  Bin 244 -> 0 bytes
 ext/boost/config/compiler/._sgi_mipspro.hpp        |  Bin 244 -> 0 bytes
 ext/boost/config/compiler/borland.hpp              |   62 +-
 ext/boost/config/compiler/clang.hpp                |  137 +-
 ext/boost/config/compiler/codegear.hpp             |   40 +-
 ext/boost/config/compiler/common_edg.hpp           |   56 +-
 ext/boost/config/compiler/cray.hpp                 |   63 +
 ext/boost/config/compiler/digitalmars.hpp          |   52 +-
 ext/boost/config/compiler/gcc.hpp                  |   95 +-
 ext/boost/config/compiler/gcc_xml.hpp              |   47 +-
 ext/boost/config/compiler/hp_acc.hpp               |   57 +-
 ext/boost/config/compiler/intel.hpp                |   84 +-
 ext/boost/config/compiler/metrowerks.hpp           |   49 +-
 ext/boost/config/compiler/mpw.hpp                  |   49 +-
 ext/boost/config/compiler/nvcc.hpp                 |   74 +-
 ext/boost/config/compiler/pathscale.hpp            |   80 +
 ext/boost/config/compiler/pgi.hpp                  |  101 +-
 ext/boost/config/compiler/sunpro_cc.hpp            |   49 +-
 ext/boost/config/compiler/vacpp.hpp                |   82 +-
 ext/boost/config/compiler/visualc.hpp              |  156 +-
 ext/boost/config/no_tr1/._cmath.hpp                |  Bin 244 -> 0 bytes
 ext/boost/config/no_tr1/._complex.hpp              |  Bin 244 -> 0 bytes
 ext/boost/config/no_tr1/._functional.hpp           |  Bin 244 -> 0 bytes
 ext/boost/config/no_tr1/._memory.hpp               |  Bin 244 -> 0 bytes
 ext/boost/config/no_tr1/._utility.hpp              |  Bin 244 -> 0 bytes
 ext/boost/config/platform/._aix.hpp                |  Bin 244 -> 0 bytes
 ext/boost/config/platform/._amigaos.hpp            |  Bin 244 -> 0 bytes
 ext/boost/config/platform/._beos.hpp               |  Bin 244 -> 0 bytes
 ext/boost/config/platform/._hpux.hpp               |  Bin 244 -> 0 bytes
 ext/boost/config/platform/._irix.hpp               |  Bin 244 -> 0 bytes
 ext/boost/config/platform/._qnxnto.hpp             |  Bin 244 -> 0 bytes
 ext/boost/config/platform/._solaris.hpp            |  Bin 244 -> 0 bytes
 ext/boost/config/platform/._vxworks.hpp            |  Bin 244 -> 0 bytes
 ext/boost/config/platform/bsd.hpp                  |    2 +-
 ext/boost/config/platform/cray.hpp                 |   18 +
 ext/boost/config/platform/cygwin.hpp               |   10 +
 ext/boost/config/platform/linux.hpp                |    5 +
 ext/boost/config/platform/macos.hpp                |    9 +-
 ext/boost/config/platform/symbian.hpp              |    7 +-
 ext/boost/config/platform/vms.hpp                  |   25 +
 ext/boost/config/platform/win32.hpp                |   65 -
 ext/boost/config/select_compiler_config.hpp        |   33 +-
 ext/boost/config/select_platform_config.hpp        |    9 +-
 ext/boost/config/select_stdlib_config.hpp          |   10 +-
 ext/boost/config/stdlib/dinkumware.hpp             |   56 +-
 ext/boost/config/stdlib/libcomo.hpp                |   46 +-
 ext/boost/config/stdlib/libcpp.hpp                 |   37 +
 ext/boost/config/stdlib/libstdcpp3.hpp             |   88 +-
 ext/boost/config/stdlib/modena.hpp                 |   46 +-
 ext/boost/config/stdlib/msl.hpp                    |   46 +-
 ext/boost/config/stdlib/roguewave.hpp              |   52 +-
 ext/boost/config/stdlib/sgi.hpp                    |   57 +-
 ext/boost/config/stdlib/stlport.hpp                |   60 +-
 ext/boost/config/stdlib/vacpp.hpp                  |   56 +-
 ext/boost/config/suffix.hpp                        |  324 +-
 ext/boost/config/warning_disable.hpp               |    2 +-
 ext/boost/container/container_fwd.hpp              |  173 +
 ext/boost/cstdint.hpp                              |   29 +-
 ext/boost/current_function.hpp                     |    3 +-
 ext/boost/date_time/._adjust_functors.hpp          |  Bin 244 -> 0 bytes
 ext/boost/date_time/._constrained_value.hpp        |  Bin 244 -> 0 bytes
 ext/boost/date_time/._date.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/date_time/._date_clock_device.hpp        |  Bin 244 -> 0 bytes
 ext/boost/date_time/._date_defs.hpp                |  Bin 244 -> 0 bytes
 ext/boost/date_time/._date_duration.hpp            |  Bin 244 -> 0 bytes
 ext/boost/date_time/._date_duration_types.hpp      |  Bin 244 -> 0 bytes
 ext/boost/date_time/._date_facet.hpp               |  Bin 244 -> 0 bytes
 ext/boost/date_time/._date_format_simple.hpp       |  Bin 244 -> 0 bytes
 ext/boost/date_time/._date_formatting_limited.hpp  |  Bin 244 -> 0 bytes
 ext/boost/date_time/._date_formatting_locales.hpp  |  Bin 244 -> 0 bytes
 ext/boost/date_time/._date_generator_formatter.hpp |  Bin 244 -> 0 bytes
 ext/boost/date_time/._date_generator_parser.hpp    |  Bin 244 -> 0 bytes
 ext/boost/date_time/._date_generators.hpp          |  Bin 244 -> 0 bytes
 ext/boost/date_time/._date_iterator.hpp            |  Bin 244 -> 0 bytes
 ext/boost/date_time/._date_names_put.hpp           |  Bin 244 -> 0 bytes
 ext/boost/date_time/._date_parsing.hpp             |  Bin 244 -> 0 bytes
 ext/boost/date_time/._dst_rules.hpp                |  Bin 244 -> 0 bytes
 ext/boost/date_time/._format_date_parser.hpp       |  Bin 244 -> 0 bytes
 ext/boost/date_time/._gregorian_calendar.hpp       |  Bin 244 -> 0 bytes
 ext/boost/date_time/._int_adapter.hpp              |  Bin 244 -> 0 bytes
 ext/boost/date_time/._iso_format.hpp               |  Bin 244 -> 0 bytes
 ext/boost/date_time/._locale_config.hpp            |  Bin 244 -> 0 bytes
 ext/boost/date_time/._microsec_time_clock.hpp      |  Bin 244 -> 0 bytes
 ext/boost/date_time/._parse_format_base.hpp        |  Bin 244 -> 0 bytes
 ext/boost/date_time/._period.hpp                   |  Bin 244 -> 0 bytes
 ext/boost/date_time/._period_formatter.hpp         |  Bin 244 -> 0 bytes
 ext/boost/date_time/._period_parser.hpp            |  Bin 244 -> 0 bytes
 ext/boost/date_time/._special_defs.hpp             |  Bin 244 -> 0 bytes
 ext/boost/date_time/._special_values_formatter.hpp |  Bin 244 -> 0 bytes
 ext/boost/date_time/._special_values_parser.hpp    |  Bin 244 -> 0 bytes
 ext/boost/date_time/._string_convert.hpp           |  Bin 244 -> 0 bytes
 ext/boost/date_time/._string_parse_tree.hpp        |  Bin 244 -> 0 bytes
 ext/boost/date_time/._time.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/date_time/._time_clock.hpp               |  Bin 244 -> 0 bytes
 ext/boost/date_time/._time_defs.hpp                |  Bin 244 -> 0 bytes
 ext/boost/date_time/._time_duration.hpp            |  Bin 244 -> 0 bytes
 ext/boost/date_time/._time_formatting_streams.hpp  |  Bin 244 -> 0 bytes
 ext/boost/date_time/._time_iterator.hpp            |  Bin 244 -> 0 bytes
 ext/boost/date_time/._time_parsing.hpp             |  Bin 244 -> 0 bytes
 ext/boost/date_time/._time_resolution_traits.hpp   |  Bin 244 -> 0 bytes
 ext/boost/date_time/._time_system_counted.hpp      |  Bin 244 -> 0 bytes
 ext/boost/date_time/._time_system_split.hpp        |  Bin 244 -> 0 bytes
 ext/boost/date_time/._wrapping_int.hpp             |  Bin 244 -> 0 bytes
 ext/boost/date_time/._year_month_day.hpp           |  Bin 244 -> 0 bytes
 ext/boost/date_time/adjust_functors.hpp            |    2 +-
 ext/boost/date_time/c_time.hpp                     |   18 +-
 ext/boost/date_time/compiler_config.hpp            |   28 +-
 ext/boost/date_time/constrained_value.hpp          |    2 +-
 ext/boost/date_time/date.hpp                       |    6 +-
 ext/boost/date_time/date_clock_device.hpp          |    2 +-
 ext/boost/date_time/date_defs.hpp                  |    2 +-
 ext/boost/date_time/date_duration.hpp              |   18 +-
 ext/boost/date_time/date_duration_types.hpp        |    2 +-
 ext/boost/date_time/date_facet.hpp                 |   11 +-
 ext/boost/date_time/date_format_simple.hpp         |    2 +-
 ext/boost/date_time/date_formatting.hpp            |   12 +-
 ext/boost/date_time/date_formatting_limited.hpp    |    2 +-
 ext/boost/date_time/date_formatting_locales.hpp    |    2 +-
 ext/boost/date_time/date_generator_formatter.hpp   |    2 +-
 ext/boost/date_time/date_generator_parser.hpp      |    2 +-
 ext/boost/date_time/date_generators.hpp            |   70 +-
 ext/boost/date_time/date_iterator.hpp              |   30 +-
 ext/boost/date_time/date_names_put.hpp             |   52 +-
 ext/boost/date_time/date_parsing.hpp               |    4 +-
 ext/boost/date_time/dst_rules.hpp                  |    4 +-
 ext/boost/date_time/filetime_functions.hpp         |    8 +-
 ext/boost/date_time/format_date_parser.hpp         |    8 +-
 ext/boost/date_time/gregorian/._conversion.hpp     |  Bin 244 -> 0 bytes
 ext/boost/date_time/gregorian/._formatters.hpp     |  Bin 244 -> 0 bytes
 .../date_time/gregorian/._formatters_limited.hpp   |  Bin 244 -> 0 bytes
 ext/boost/date_time/gregorian/._greg_calendar.hpp  |  Bin 244 -> 0 bytes
 ext/boost/date_time/gregorian/._greg_date.hpp      |  Bin 244 -> 0 bytes
 ext/boost/date_time/gregorian/._greg_day.hpp       |  Bin 244 -> 0 bytes
 .../date_time/gregorian/._greg_day_of_year.hpp     |  Bin 244 -> 0 bytes
 ext/boost/date_time/gregorian/._greg_duration.hpp  |  Bin 244 -> 0 bytes
 .../date_time/gregorian/._greg_duration_types.hpp  |  Bin 244 -> 0 bytes
 ext/boost/date_time/gregorian/._greg_month.hpp     |  Bin 244 -> 0 bytes
 ext/boost/date_time/gregorian/._greg_weekday.hpp   |  Bin 244 -> 0 bytes
 ext/boost/date_time/gregorian/._greg_year.hpp      |  Bin 244 -> 0 bytes
 ext/boost/date_time/gregorian/._greg_ymd.hpp       |  Bin 244 -> 0 bytes
 ext/boost/date_time/gregorian/._gregorian.hpp      |  Bin 244 -> 0 bytes
 ext/boost/date_time/gregorian/._gregorian_io.hpp   |  Bin 244 -> 0 bytes
 .../date_time/gregorian/._gregorian_types.hpp      |  Bin 244 -> 0 bytes
 ext/boost/date_time/gregorian/._parsers.hpp        |  Bin 244 -> 0 bytes
 ext/boost/date_time/gregorian/conversion.hpp       |    2 +-
 ext/boost/date_time/gregorian/formatters.hpp       |    2 +-
 .../date_time/gregorian/formatters_limited.hpp     |    2 +-
 ext/boost/date_time/gregorian/greg_calendar.hpp    |    2 +-
 ext/boost/date_time/gregorian/greg_date.hpp        |    2 +-
 ext/boost/date_time/gregorian/greg_day.hpp         |    2 +-
 ext/boost/date_time/gregorian/greg_day_of_year.hpp |    2 +-
 ext/boost/date_time/gregorian/greg_duration.hpp    |    2 +-
 .../date_time/gregorian/greg_duration_types.hpp    |    2 +-
 ext/boost/date_time/gregorian/greg_month.hpp       |    2 +-
 ext/boost/date_time/gregorian/greg_weekday.hpp     |    2 +-
 ext/boost/date_time/gregorian/greg_year.hpp        |    2 +-
 ext/boost/date_time/gregorian/greg_ymd.hpp         |    2 +-
 ext/boost/date_time/gregorian/gregorian.hpp        |    2 +-
 ext/boost/date_time/gregorian/gregorian_io.hpp     |    2 +-
 ext/boost/date_time/gregorian/gregorian_types.hpp  |    2 +-
 ext/boost/date_time/gregorian/parsers.hpp          |    2 +-
 ext/boost/date_time/gregorian_calendar.hpp         |    2 +-
 ext/boost/date_time/gregorian_calendar.ipp         |    4 +-
 ext/boost/date_time/int_adapter.hpp                |    2 +-
 ext/boost/date_time/iso_format.hpp                 |    2 +-
 ext/boost/date_time/locale_config.hpp              |    2 +-
 ext/boost/date_time/microsec_time_clock.hpp        |    2 +-
 ext/boost/date_time/parse_format_base.hpp          |    2 +-
 ext/boost/date_time/period.hpp                     |    2 +-
 ext/boost/date_time/period_formatter.hpp           |   10 +-
 ext/boost/date_time/period_parser.hpp              |    2 +-
 ext/boost/date_time/posix_time/._conversion.hpp    |  Bin 244 -> 0 bytes
 .../posix_time/._date_duration_operators.hpp       |  Bin 244 -> 0 bytes
 ext/boost/date_time/posix_time/._posix_time.hpp    |  Bin 244 -> 0 bytes
 .../date_time/posix_time/._posix_time_config.hpp   |  Bin 244 -> 0 bytes
 .../date_time/posix_time/._posix_time_duration.hpp |  Bin 244 -> 0 bytes
 ext/boost/date_time/posix_time/._posix_time_io.hpp |  Bin 244 -> 0 bytes
 .../date_time/posix_time/._posix_time_system.hpp   |  Bin 244 -> 0 bytes
 .../date_time/posix_time/._posix_time_types.hpp    |  Bin 244 -> 0 bytes
 ext/boost/date_time/posix_time/._ptime.hpp         |  Bin 244 -> 0 bytes
 .../date_time/posix_time/._time_formatters.hpp     |  Bin 244 -> 0 bytes
 ext/boost/date_time/posix_time/._time_parsers.hpp  |  Bin 244 -> 0 bytes
 ext/boost/date_time/posix_time/._time_period.hpp   |  Bin 244 -> 0 bytes
 ext/boost/date_time/posix_time/conversion.hpp      |    2 +-
 .../posix_time/date_duration_operators.hpp         |    2 +-
 ext/boost/date_time/posix_time/posix_time.hpp      |    2 +-
 .../date_time/posix_time/posix_time_config.hpp     |    4 +-
 .../date_time/posix_time/posix_time_duration.hpp   |    2 +-
 ext/boost/date_time/posix_time/posix_time_io.hpp   |    2 +-
 .../date_time/posix_time/posix_time_system.hpp     |    2 +-
 ext/boost/date_time/posix_time/ptime.hpp           |    2 +-
 ext/boost/date_time/posix_time/time_formatters.hpp |    2 +-
 ext/boost/date_time/posix_time/time_parsers.hpp    |    2 +-
 ext/boost/date_time/posix_time/time_period.hpp     |    2 +-
 ext/boost/date_time/special_defs.hpp               |    2 +-
 ext/boost/date_time/special_values_formatter.hpp   |    2 +-
 ext/boost/date_time/string_convert.hpp             |    2 +-
 ext/boost/date_time/string_parse_tree.hpp          |    2 +-
 ext/boost/date_time/strings_from_facet.hpp         |    6 +-
 ext/boost/date_time/time.hpp                       |    2 +-
 ext/boost/date_time/time_clock.hpp                 |    2 +-
 ext/boost/date_time/time_defs.hpp                  |    2 +-
 ext/boost/date_time/time_duration.hpp              |   23 +-
 ext/boost/date_time/time_facet.hpp                 |  202 +-
 ext/boost/date_time/time_formatting_streams.hpp    |    2 +-
 ext/boost/date_time/time_iterator.hpp              |   34 +-
 ext/boost/date_time/time_parsing.hpp               |    9 +-
 ext/boost/date_time/time_resolution_traits.hpp     |    2 +-
 ext/boost/date_time/time_system_counted.hpp        |    2 +-
 ext/boost/date_time/time_system_split.hpp          |    2 +-
 ext/boost/date_time/wrapping_int.hpp               |   54 +-
 ext/boost/date_time/year_month_day.hpp             |    2 +-
 ext/boost/detail/._indirect_traits.hpp             |  Bin 244 -> 0 bytes
 ext/boost/detail/._iterator.hpp                    |  Bin 244 -> 0 bytes
 ext/boost/detail/._lcast_precision.hpp             |  Bin 244 -> 0 bytes
 ext/boost/detail/._limits.hpp                      |  Bin 244 -> 0 bytes
 ext/boost/detail/._no_exceptions_support.hpp       |  Bin 244 -> 0 bytes
 ext/boost/detail/._reference_content.hpp           |  Bin 244 -> 0 bytes
 ext/boost/detail/._workaround.hpp                  |  Bin 244 -> 0 bytes
 ext/boost/detail/call_traits.hpp                   |  164 -
 ext/boost/detail/container_fwd.hpp                 |  162 +
 ext/boost/detail/endian.hpp                        |    6 +-
 ext/boost/detail/fenv.hpp                          |   74 +
 ext/boost/detail/is_incrementable.hpp              |  134 +
 ext/boost/detail/scoped_enum_emulation.hpp         |  337 +
 ext/boost/detail/sp_typeinfo.hpp                   |    6 +
 ext/boost/exception/._current_exception_cast.hpp   |  Bin 244 -> 0 bytes
 ext/boost/exception/._get_error_info.hpp           |  Bin 244 -> 0 bytes
 ext/boost/exception/._to_string.hpp                |  Bin 244 -> 0 bytes
 ext/boost/exception/._to_string_stub.hpp           |  Bin 244 -> 0 bytes
 .../exception/detail/._attribute_noreturn.hpp      |  Bin 244 -> 0 bytes
 .../exception/detail/._is_output_streamable.hpp    |  Bin 244 -> 0 bytes
 ext/boost/exception/detail/._object_hex_dump.hpp   |  Bin 244 -> 0 bytes
 ext/boost/exception/detail/attribute_noreturn.hpp  |    2 +-
 .../exception/detail/clone_current_exception.hpp   |   47 +
 ext/boost/exception/detail/error_info_impl.hpp     |    3 +-
 ext/boost/exception/detail/exception_ptr.hpp       |  321 +-
 ext/boost/exception/detail/type_info.hpp           |    6 +-
 ext/boost/exception/diagnostic_information.hpp     |   58 +-
 ext/boost/exception/exception.hpp                  |   53 +-
 ext/boost/exception/info.hpp                       |    3 +-
 ext/boost/foreach.hpp                              | 1128 +
 ext/boost/foreach_fwd.hpp                          |   51 +
 ext/boost/function.hpp                             |    4 +-
 ext/boost/function/._function_fwd.hpp              |  Bin 244 -> 0 bytes
 ext/boost/function/detail/._function_iterate.hpp   |  Bin 244 -> 0 bytes
 ext/boost/function/detail/._maybe_include.hpp      |  Bin 244 -> 0 bytes
 ext/boost/function/detail/._prologue.hpp           |  Bin 244 -> 0 bytes
 ext/boost/function/function_base.hpp               |   24 +-
 ext/boost/function/function_template.hpp           |  125 +-
 ext/boost/functional/hash.hpp                      |    7 +
 .../functional/hash/detail/container_fwd_0x.hpp    |   29 +
 .../functional/hash/detail/float_functions.hpp     |  246 +
 ext/boost/functional/hash/detail/hash_float.hpp    |  268 +
 ext/boost/functional/hash/detail/limits.hpp        |   61 +
 ext/boost/functional/hash/extensions.hpp           |  367 +
 ext/boost/functional/hash/hash.hpp                 |  509 +
 ext/boost/functional/hash/hash_fwd.hpp             |   40 +
 ext/boost/functional/hash_fwd.hpp                  |    7 +
 ext/boost/implicit_cast.hpp                        |   29 -
 ext/boost/indirect_reference.hpp                   |   43 +
 ext/boost/integer.hpp                              |   34 +-
 ext/boost/integer/static_log2.hpp                  |  127 +
 ext/boost/integer_fwd.hpp                          |   16 -
 ext/boost/integer_traits.hpp                       |    4 +-
 ext/boost/io/._ios_state.hpp                       |  Bin 244 -> 0 bytes
 ext/boost/iterator.hpp                             |    2 +-
 ext/boost/iterator/._interoperable.hpp             |  Bin 244 -> 0 bytes
 ext/boost/iterator/._iterator_categories.hpp       |  Bin 244 -> 0 bytes
 ext/boost/iterator/._iterator_concepts.hpp         |  Bin 244 -> 0 bytes
 ext/boost/iterator/._iterator_traits.hpp           |  Bin 244 -> 0 bytes
 ext/boost/iterator/._reverse_iterator.hpp          |  Bin 244 -> 0 bytes
 ext/boost/iterator/detail/._config_def.hpp         |  Bin 244 -> 0 bytes
 ext/boost/iterator/detail/._config_undef.hpp       |  Bin 244 -> 0 bytes
 ext/boost/iterator/detail/._enable_if.hpp          |  Bin 244 -> 0 bytes
 .../iterator/detail/._facade_iterator_category.hpp |  Bin 244 -> 0 bytes
 ext/boost/iterator/detail/._minimum_category.hpp   |  Bin 244 -> 0 bytes
 ext/boost/iterator/iterator_adaptor.hpp            |    8 +-
 ext/boost/iterator/iterator_facade.hpp             |   80 +-
 ext/boost/iterator/reverse_iterator.hpp            |    2 +-
 ext/boost/iterator/transform_iterator.hpp          |   25 +-
 ext/boost/lambda/core.hpp                          |   79 +
 ext/boost/lambda/detail/actions.hpp                |  174 +
 ext/boost/lambda/detail/arity_code.hpp             |  110 +
 ext/boost/lambda/detail/function_adaptors.hpp      |  789 +
 ext/boost/lambda/detail/is_instance_of.hpp         |  104 +
 ext/boost/lambda/detail/lambda_config.hpp          |   48 +
 ext/boost/lambda/detail/lambda_functor_base.hpp    |  615 +
 ext/boost/lambda/detail/lambda_functors.hpp        |  324 +
 ext/boost/lambda/detail/lambda_fwd.hpp             |   74 +
 ext/boost/lambda/detail/lambda_traits.hpp          |  578 +
 ext/boost/lambda/detail/member_ptr.hpp             |  737 +
 ext/boost/lambda/detail/operator_actions.hpp       |  139 +
 .../lambda/detail/operator_lambda_func_base.hpp    |  271 +
 .../lambda/detail/operator_return_type_traits.hpp  |  917 +
 ext/boost/lambda/detail/operators.hpp              |  370 +
 ext/boost/lambda/detail/ret.hpp                    |  325 +
 ext/boost/lambda/detail/return_type_traits.hpp     |  282 +
 ext/boost/lambda/detail/select_functions.hpp       |   74 +
 ext/boost/lambda/lambda.hpp                        |   34 +
 ext/boost/lexical_cast.hpp                         | 2620 +-
 ext/boost/libs/system/src/error_code.cpp           |  430 +
 .../libs/system/src/local_free_on_destruction.hpp  |   40 +
 ext/boost/libs/thread/src/future.cpp               |   61 +
 ext/boost/libs/thread/src/pthread/once.cpp         |   72 +
 ext/boost/libs/thread/src/pthread/thread.cpp       |  712 +
 ext/boost/libs/thread/src/pthread/timeconv.inl     |  132 +
 ext/boost/libs/thread/src/tss_null.cpp             |   38 +
 ext/boost/math/policies/policy.hpp                 |  982 +
 .../math/special_functions/detail/fp_traits.hpp    |  570 +
 .../math/special_functions/detail/round_fwd.hpp    |   80 +
 ext/boost/math/special_functions/fpclassify.hpp    |  537 +
 ext/boost/math/special_functions/math_fwd.hpp      | 1296 +
 ext/boost/math/special_functions/sign.hpp          |  145 +
 ext/boost/math/tools/config.hpp                    |  330 +
 ext/boost/math/tools/promotion.hpp                 |  150 +
 ext/boost/math/tools/real_cast.hpp                 |   29 +
 ext/boost/math/tools/user.hpp                      |   97 +
 ext/boost/move/move.hpp                            | 1273 +
 ext/boost/mpl/._always.hpp                         |  Bin 244 -> 0 bytes
 ext/boost/mpl/._and.hpp                            |  Bin 244 -> 0 bytes
 ext/boost/mpl/._apply.hpp                          |  Bin 244 -> 0 bytes
 ext/boost/mpl/._apply_fwd.hpp                      |  Bin 244 -> 0 bytes
 ext/boost/mpl/._apply_wrap.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/mpl/._arg.hpp                            |  Bin 244 -> 0 bytes
 ext/boost/mpl/._arg_fwd.hpp                        |  Bin 244 -> 0 bytes
 ext/boost/mpl/._assert.hpp                         |  Bin 244 -> 0 bytes
 ext/boost/mpl/._bind.hpp                           |  Bin 244 -> 0 bytes
 ext/boost/mpl/._bind_fwd.hpp                       |  Bin 244 -> 0 bytes
 ext/boost/mpl/._bool.hpp                           |  Bin 244 -> 0 bytes
 ext/boost/mpl/._bool_fwd.hpp                       |  Bin 244 -> 0 bytes
 ext/boost/mpl/._eval_if.hpp                        |  Bin 244 -> 0 bytes
 ext/boost/mpl/._has_xxx.hpp                        |  Bin 244 -> 0 bytes
 ext/boost/mpl/._identity.hpp                       |  Bin 244 -> 0 bytes
 ext/boost/mpl/._if.hpp                             |  Bin 244 -> 0 bytes
 ext/boost/mpl/._int.hpp                            |  Bin 244 -> 0 bytes
 ext/boost/mpl/._int_fwd.hpp                        |  Bin 244 -> 0 bytes
 ext/boost/mpl/._integral_c.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/mpl/._integral_c_fwd.hpp                 |  Bin 244 -> 0 bytes
 ext/boost/mpl/._integral_c_tag.hpp                 |  Bin 244 -> 0 bytes
 ext/boost/mpl/._lambda.hpp                         |  Bin 244 -> 0 bytes
 ext/boost/mpl/._lambda_fwd.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/mpl/._logical.hpp                        |  Bin 244 -> 0 bytes
 ext/boost/mpl/._next.hpp                           |  Bin 244 -> 0 bytes
 ext/boost/mpl/._next_prior.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/mpl/._not.hpp                            |  Bin 244 -> 0 bytes
 ext/boost/mpl/._or.hpp                             |  Bin 244 -> 0 bytes
 ext/boost/mpl/._placeholders.hpp                   |  Bin 244 -> 0 bytes
 ext/boost/mpl/._protect.hpp                        |  Bin 244 -> 0 bytes
 ext/boost/mpl/._quote.hpp                          |  Bin 244 -> 0 bytes
 ext/boost/mpl/._size_t.hpp                         |  Bin 244 -> 0 bytes
 ext/boost/mpl/._size_t_fwd.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/mpl/._void.hpp                           |  Bin 244 -> 0 bytes
 ext/boost/mpl/._void_fwd.hpp                       |  Bin 244 -> 0 bytes
 ext/boost/mpl/O1_size.hpp                          |   40 +
 ext/boost/mpl/O1_size_fwd.hpp                      |   24 +
 ext/boost/mpl/accumulate.hpp                       |   39 +
 ext/boost/mpl/advance.hpp                          |   76 +
 ext/boost/mpl/advance_fwd.hpp                      |   28 +
 ext/boost/mpl/alias.hpp                            |   21 +
 ext/boost/mpl/always.hpp                           |    2 +-
 ext/boost/mpl/and.hpp                              |    2 +-
 ext/boost/mpl/apply.hpp                            |    2 +-
 ext/boost/mpl/apply_fwd.hpp                        |    2 +-
 ext/boost/mpl/apply_wrap.hpp                       |    2 +-
 ext/boost/mpl/arg.hpp                              |    2 +-
 ext/boost/mpl/arg_fwd.hpp                          |    2 +-
 ext/boost/mpl/arithmetic.hpp                       |   25 +
 ext/boost/mpl/as_sequence.hpp                      |   38 +
 ext/boost/mpl/assert.hpp                           |    2 +-
 ext/boost/mpl/at.hpp                               |   52 +
 ext/boost/mpl/at_fwd.hpp                           |   24 +
 ext/boost/mpl/aux_/._adl_barrier.hpp               |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._arg_typedef.hpp               |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._arity.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._arity_spec.hpp                |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._common_name_wknd.hpp          |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._full_lambda.hpp               |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._has_apply.hpp                 |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._has_type.hpp                  |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._include_preprocessed.hpp      |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._integral_wrapper.hpp          |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._lambda_arity_param.hpp        |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._lambda_support.hpp            |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._msvc_never_true.hpp           |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._na.hpp                        |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._na_assert.hpp                 |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._na_fwd.hpp                    |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._na_spec.hpp                   |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._nested_type_wknd.hpp          |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._nttp_decl.hpp                 |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._static_cast.hpp               |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._template_arity.hpp            |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._template_arity_fwd.hpp        |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._type_wrapper.hpp              |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._value_wknd.hpp                |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/._yes_no.hpp                    |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/O1_size_impl.hpp                |   87 +
 ext/boost/mpl/aux_/adl_barrier.hpp                 |    2 +-
 ext/boost/mpl/aux_/advance_backward.hpp            |  128 +
 ext/boost/mpl/aux_/advance_forward.hpp             |  127 +
 ext/boost/mpl/aux_/apply_1st.hpp                   |   35 +
 ext/boost/mpl/aux_/arg_typedef.hpp                 |    2 +-
 ext/boost/mpl/aux_/arithmetic_op.hpp               |   92 +
 ext/boost/mpl/aux_/arity.hpp                       |    2 +-
 ext/boost/mpl/aux_/arity_spec.hpp                  |    2 +-
 ext/boost/mpl/aux_/at_impl.hpp                     |   45 +
 ext/boost/mpl/aux_/back_impl.hpp                   |   43 +
 ext/boost/mpl/aux_/basic_bind.hpp                  |   21 +
 ext/boost/mpl/aux_/begin_end_impl.hpp              |  101 +
 ext/boost/mpl/aux_/clear_impl.hpp                  |   35 +
 ext/boost/mpl/aux_/common_name_wknd.hpp            |    2 +-
 ext/boost/mpl/aux_/comparison_op.hpp               |   83 +
 ext/boost/mpl/aux_/config/._adl.hpp                |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._arrays.hpp             |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._bcc.hpp                |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._bind.hpp               |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._compiler.hpp           |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._ctps.hpp               |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._dtp.hpp                |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._eti.hpp                |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._gcc.hpp                |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._has_apply.hpp          |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._has_xxx.hpp            |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._integral.hpp           |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._intel.hpp              |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._lambda.hpp             |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._msvc.hpp               |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._msvc_typename.hpp      |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._nttp.hpp               |  Bin 244 -> 0 bytes
 .../mpl/aux_/config/._overload_resolution.hpp      |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._pp_counter.hpp         |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._preprocessor.hpp       |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._static_constant.hpp    |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._ttp.hpp                |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._use_preprocessed.hpp   |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/._workaround.hpp         |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/config/adl.hpp                  |    2 +-
 ext/boost/mpl/aux_/config/arrays.hpp               |    2 +-
 ext/boost/mpl/aux_/config/bind.hpp                 |    2 +-
 ext/boost/mpl/aux_/config/compiler.hpp             |    2 +-
 ext/boost/mpl/aux_/config/ctps.hpp                 |    2 +-
 ext/boost/mpl/aux_/config/dependent_nttp.hpp       |   35 +
 ext/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp   |   27 +
 ext/boost/mpl/aux_/config/dtp.hpp                  |    2 +-
 ext/boost/mpl/aux_/config/eti.hpp                  |    2 +-
 ext/boost/mpl/aux_/config/forwarding.hpp           |   27 +
 ext/boost/mpl/aux_/config/gcc.hpp                  |    2 +-
 ext/boost/mpl/aux_/config/has_apply.hpp            |    2 +-
 ext/boost/mpl/aux_/config/has_xxx.hpp              |    2 +-
 ext/boost/mpl/aux_/config/integral.hpp             |    2 +-
 ext/boost/mpl/aux_/config/intel.hpp                |    2 +-
 ext/boost/mpl/aux_/config/lambda.hpp               |    2 +-
 ext/boost/mpl/aux_/config/msvc.hpp                 |    2 +-
 ext/boost/mpl/aux_/config/msvc_typename.hpp        |    2 +-
 ext/boost/mpl/aux_/config/nttp.hpp                 |    2 +-
 ext/boost/mpl/aux_/config/operators.hpp            |   33 +
 ext/boost/mpl/aux_/config/overload_resolution.hpp  |    2 +-
 ext/boost/mpl/aux_/config/pp_counter.hpp           |    2 +-
 ext/boost/mpl/aux_/config/preprocessor.hpp         |    2 +-
 ext/boost/mpl/aux_/config/static_constant.hpp      |    2 +-
 ext/boost/mpl/aux_/config/ttp.hpp                  |    2 +-
 ext/boost/mpl/aux_/config/typeof.hpp               |   38 +
 ext/boost/mpl/aux_/config/use_preprocessed.hpp     |    2 +-
 ext/boost/mpl/aux_/config/workaround.hpp           |    2 +-
 ext/boost/mpl/aux_/contains_impl.hpp               |   61 +
 ext/boost/mpl/aux_/count_args.hpp                  |  105 +
 ext/boost/mpl/aux_/count_impl.hpp                  |   44 +
 ext/boost/mpl/aux_/empty_impl.hpp                  |   43 +
 ext/boost/mpl/aux_/erase_impl.hpp                  |   69 +
 ext/boost/mpl/aux_/erase_key_impl.hpp              |   32 +
 ext/boost/mpl/aux_/filter_iter.hpp                 |  140 +
 ext/boost/mpl/aux_/find_if_pred.hpp                |   31 +
 ext/boost/mpl/aux_/fold_impl.hpp                   |   43 +
 ext/boost/mpl/aux_/fold_impl_body.hpp              |  365 +
 ext/boost/mpl/aux_/fold_op.hpp                     |   37 +
 ext/boost/mpl/aux_/fold_pred.hpp                   |   37 +
 ext/boost/mpl/aux_/front_impl.hpp                  |   41 +
 ext/boost/mpl/aux_/full_lambda.hpp                 |    2 +-
 ext/boost/mpl/aux_/has_apply.hpp                   |    2 +-
 ext/boost/mpl/aux_/has_begin.hpp                   |   23 +
 ext/boost/mpl/aux_/has_key_impl.hpp                |   34 +
 ext/boost/mpl/aux_/has_rebind.hpp                  |   99 +
 ext/boost/mpl/aux_/has_size.hpp                    |   23 +
 ext/boost/mpl/aux_/has_tag.hpp                     |   23 +
 ext/boost/mpl/aux_/has_type.hpp                    |    2 +-
 ext/boost/mpl/aux_/include_preprocessed.hpp        |    2 +-
 ext/boost/mpl/aux_/insert_impl.hpp                 |   68 +
 ext/boost/mpl/aux_/insert_range_impl.hpp           |   77 +
 ext/boost/mpl/aux_/inserter_algorithm.hpp          |  159 +
 ext/boost/mpl/aux_/integral_wrapper.hpp            |    2 +-
 ext/boost/mpl/aux_/is_msvc_eti_arg.hpp             |   64 +
 ext/boost/mpl/aux_/iter_apply.hpp                  |   47 +
 ext/boost/mpl/aux_/iter_fold_if_impl.hpp           |  210 +
 ext/boost/mpl/aux_/iter_fold_impl.hpp              |   42 +
 ext/boost/mpl/aux_/iter_push_front.hpp             |   36 +
 ext/boost/mpl/aux_/joint_iter.hpp                  |  120 +
 ext/boost/mpl/aux_/lambda_arity_param.hpp          |    2 +-
 ext/boost/mpl/aux_/lambda_no_ctps.hpp              |  193 +
 ext/boost/mpl/aux_/lambda_spec.hpp                 |   49 +
 ext/boost/mpl/aux_/lambda_support.hpp              |    2 +-
 ext/boost/mpl/aux_/largest_int.hpp                 |   63 +
 ext/boost/mpl/aux_/logical_op.hpp                  |  165 +
 ext/boost/mpl/aux_/msvc_dtw.hpp                    |   68 +
 ext/boost/mpl/aux_/msvc_eti_base.hpp               |   77 +
 ext/boost/mpl/aux_/msvc_is_class.hpp               |   58 +
 ext/boost/mpl/aux_/msvc_never_true.hpp             |    2 +-
 ext/boost/mpl/aux_/msvc_type.hpp                   |   62 +
 ext/boost/mpl/aux_/na.hpp                          |    2 +-
 ext/boost/mpl/aux_/na_assert.hpp                   |    2 +-
 ext/boost/mpl/aux_/na_fwd.hpp                      |    2 +-
 ext/boost/mpl/aux_/na_spec.hpp                     |    2 +-
 ext/boost/mpl/aux_/nested_type_wknd.hpp            |    2 +-
 ext/boost/mpl/aux_/nttp_decl.hpp                   |    2 +-
 ext/boost/mpl/aux_/numeric_cast_utils.hpp          |   77 +
 ext/boost/mpl/aux_/numeric_op.hpp                  |  315 +
 ext/boost/mpl/aux_/order_impl.hpp                  |   76 +
 ext/boost/mpl/aux_/overload_names.hpp              |   48 +
 ext/boost/mpl/aux_/partition_op.hpp                |   58 +
 ext/boost/mpl/aux_/pop_back_impl.hpp               |   34 +
 ext/boost/mpl/aux_/pop_front_impl.hpp              |   44 +
 .../mpl/aux_/preprocessed/bcc/advance_backward.hpp |   97 +
 .../mpl/aux_/preprocessed/bcc/advance_forward.hpp  |   97 +
 ext/boost/mpl/aux_/preprocessed/bcc/and.hpp        |   69 +
 ext/boost/mpl/aux_/preprocessed/bcc/apply.hpp      |  169 +
 ext/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp  |   52 +
 ext/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp |  461 +
 ext/boost/mpl/aux_/preprocessed/bcc/arg.hpp        |  117 +
 ext/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp |  300 +
 ext/boost/mpl/aux_/preprocessed/bcc/bind.hpp       |  397 +
 ext/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp   |   46 +
 ext/boost/mpl/aux_/preprocessed/bcc/bitand.hpp     |  147 +
 ext/boost/mpl/aux_/preprocessed/bcc/bitor.hpp      |  147 +
 ext/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp     |  147 +
 ext/boost/mpl/aux_/preprocessed/bcc/deque.hpp      |  323 +
 ext/boost/mpl/aux_/preprocessed/bcc/divides.hpp    |  146 +
 ext/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp   |   94 +
 ext/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp  |  180 +
 .../mpl/aux_/preprocessed/bcc/full_lambda.hpp      |  558 +
 ext/boost/mpl/aux_/preprocessed/bcc/greater.hpp    |   94 +
 .../mpl/aux_/preprocessed/bcc/greater_equal.hpp    |   94 +
 ext/boost/mpl/aux_/preprocessed/bcc/inherit.hpp    |  139 +
 .../aux_/preprocessed/bcc/iter_fold_if_impl.hpp    |  133 +
 .../mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp   |  180 +
 .../mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp   |  229 +
 ext/boost/mpl/aux_/preprocessed/bcc/less.hpp       |   94 +
 ext/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp |   94 +
 ext/boost/mpl/aux_/preprocessed/bcc/list.hpp       |  323 +
 ext/boost/mpl/aux_/preprocessed/bcc/list_c.hpp     |  328 +
 ext/boost/mpl/aux_/preprocessed/bcc/map.hpp        |  323 +
 ext/boost/mpl/aux_/preprocessed/bcc/minus.hpp      |  146 +
 ext/boost/mpl/aux_/preprocessed/bcc/modulus.hpp    |  101 +
 .../mpl/aux_/preprocessed/bcc/not_equal_to.hpp     |   94 +
 ext/boost/mpl/aux_/preprocessed/bcc/or.hpp         |   69 +
 .../mpl/aux_/preprocessed/bcc/placeholders.hpp     |  105 +
 ext/boost/mpl/aux_/preprocessed/bcc/plus.hpp       |  146 +
 ext/boost/mpl/aux_/preprocessed/bcc/quote.hpp      |  119 +
 .../aux_/preprocessed/bcc/reverse_fold_impl.hpp    |  295 +
 .../preprocessed/bcc/reverse_iter_fold_impl.hpp    |  295 +
 ext/boost/mpl/aux_/preprocessed/bcc/set.hpp        |  323 +
 ext/boost/mpl/aux_/preprocessed/bcc/set_c.hpp      |  328 +
 ext/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp |   99 +
 .../mpl/aux_/preprocessed/bcc/shift_right.hpp      |   99 +
 .../mpl/aux_/preprocessed/bcc/template_arity.hpp   |   40 +
 ext/boost/mpl/aux_/preprocessed/bcc/times.hpp      |  146 +
 .../mpl/aux_/preprocessed/bcc/unpack_args.hpp      |   97 +
 ext/boost/mpl/aux_/preprocessed/bcc/vector.hpp     |  323 +
 ext/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp   |  309 +
 .../aux_/preprocessed/bcc551/advance_backward.hpp  |   97 +
 .../aux_/preprocessed/bcc551/advance_forward.hpp   |   97 +
 ext/boost/mpl/aux_/preprocessed/bcc551/and.hpp     |   69 +
 ext/boost/mpl/aux_/preprocessed/bcc551/apply.hpp   |  169 +
 .../mpl/aux_/preprocessed/bcc551/apply_fwd.hpp     |   52 +
 .../mpl/aux_/preprocessed/bcc551/apply_wrap.hpp    |  456 +
 ext/boost/mpl/aux_/preprocessed/bcc551/arg.hpp     |  123 +
 .../mpl/aux_/preprocessed/bcc551/basic_bind.hpp    |  306 +
 ext/boost/mpl/aux_/preprocessed/bcc551/bind.hpp    |  403 +
 .../mpl/aux_/preprocessed/bcc551/bind_fwd.hpp      |   46 +
 ext/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp  |  147 +
 ext/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp   |  147 +
 ext/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp  |  147 +
 ext/boost/mpl/aux_/preprocessed/bcc551/deque.hpp   |  323 +
 ext/boost/mpl/aux_/preprocessed/bcc551/divides.hpp |  146 +
 .../mpl/aux_/preprocessed/bcc551/equal_to.hpp      |   94 +
 .../mpl/aux_/preprocessed/bcc551/fold_impl.hpp     |  180 +
 .../mpl/aux_/preprocessed/bcc551/full_lambda.hpp   |  558 +
 ext/boost/mpl/aux_/preprocessed/bcc551/greater.hpp |   94 +
 .../mpl/aux_/preprocessed/bcc551/greater_equal.hpp |   94 +
 ext/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp |  141 +
 .../aux_/preprocessed/bcc551/iter_fold_if_impl.hpp |  133 +
 .../aux_/preprocessed/bcc551/iter_fold_impl.hpp    |  180 +
 .../aux_/preprocessed/bcc551/lambda_no_ctps.hpp    |  229 +
 ext/boost/mpl/aux_/preprocessed/bcc551/less.hpp    |   94 +
 .../mpl/aux_/preprocessed/bcc551/less_equal.hpp    |   94 +
 ext/boost/mpl/aux_/preprocessed/bcc551/list.hpp    |  323 +
 ext/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp  |  328 +
 ext/boost/mpl/aux_/preprocessed/bcc551/map.hpp     |  323 +
 ext/boost/mpl/aux_/preprocessed/bcc551/minus.hpp   |  146 +
 ext/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp |  101 +
 .../mpl/aux_/preprocessed/bcc551/not_equal_to.hpp  |   94 +
 ext/boost/mpl/aux_/preprocessed/bcc551/or.hpp      |   69 +
 .../mpl/aux_/preprocessed/bcc551/placeholders.hpp  |  105 +
 ext/boost/mpl/aux_/preprocessed/bcc551/plus.hpp    |  146 +
 ext/boost/mpl/aux_/preprocessed/bcc551/quote.hpp   |   11 +
 .../aux_/preprocessed/bcc551/reverse_fold_impl.hpp |  295 +
 .../preprocessed/bcc551/reverse_iter_fold_impl.hpp |  295 +
 ext/boost/mpl/aux_/preprocessed/bcc551/set.hpp     |  323 +
 ext/boost/mpl/aux_/preprocessed/bcc551/set_c.hpp   |  328 +
 .../mpl/aux_/preprocessed/bcc551/shift_left.hpp    |   99 +
 .../mpl/aux_/preprocessed/bcc551/shift_right.hpp   |   99 +
 .../aux_/preprocessed/bcc551/template_arity.hpp    |   40 +
 ext/boost/mpl/aux_/preprocessed/bcc551/times.hpp   |  146 +
 .../mpl/aux_/preprocessed/bcc551/unpack_args.hpp   |   97 +
 ext/boost/mpl/aux_/preprocessed/bcc551/vector.hpp  |  323 +
 .../mpl/aux_/preprocessed/bcc551/vector_c.hpp      |  309 +
 .../preprocessed/bcc_pre590/advance_backward.hpp   |   97 +
 .../preprocessed/bcc_pre590/advance_forward.hpp    |   97 +
 ext/boost/mpl/aux_/preprocessed/bcc_pre590/and.hpp |   69 +
 .../mpl/aux_/preprocessed/bcc_pre590/apply.hpp     |  169 +
 .../mpl/aux_/preprocessed/bcc_pre590/apply_fwd.hpp |   52 +
 .../aux_/preprocessed/bcc_pre590/apply_wrap.hpp    |  456 +
 ext/boost/mpl/aux_/preprocessed/bcc_pre590/arg.hpp |  117 +
 .../aux_/preprocessed/bcc_pre590/basic_bind.hpp    |  300 +
 .../mpl/aux_/preprocessed/bcc_pre590/bind.hpp      |  397 +
 .../mpl/aux_/preprocessed/bcc_pre590/bind_fwd.hpp  |   46 +
 .../mpl/aux_/preprocessed/bcc_pre590/bitand.hpp    |  147 +
 .../mpl/aux_/preprocessed/bcc_pre590/bitor.hpp     |  147 +
 .../mpl/aux_/preprocessed/bcc_pre590/bitxor.hpp    |  147 +
 .../mpl/aux_/preprocessed/bcc_pre590/deque.hpp     |  323 +
 .../mpl/aux_/preprocessed/bcc_pre590/divides.hpp   |  146 +
 .../mpl/aux_/preprocessed/bcc_pre590/equal_to.hpp  |   94 +
 .../mpl/aux_/preprocessed/bcc_pre590/fold_impl.hpp |  180 +
 .../aux_/preprocessed/bcc_pre590/full_lambda.hpp   |  558 +
 .../mpl/aux_/preprocessed/bcc_pre590/greater.hpp   |   94 +
 .../aux_/preprocessed/bcc_pre590/greater_equal.hpp |   94 +
 .../mpl/aux_/preprocessed/bcc_pre590/inherit.hpp   |  139 +
 .../preprocessed/bcc_pre590/iter_fold_if_impl.hpp  |  133 +
 .../preprocessed/bcc_pre590/iter_fold_impl.hpp     |  180 +
 .../preprocessed/bcc_pre590/lambda_no_ctps.hpp     |  229 +
 .../mpl/aux_/preprocessed/bcc_pre590/less.hpp      |   94 +
 .../aux_/preprocessed/bcc_pre590/less_equal.hpp    |   94 +
 .../mpl/aux_/preprocessed/bcc_pre590/list.hpp      |  323 +
 .../mpl/aux_/preprocessed/bcc_pre590/list_c.hpp    |  328 +
 ext/boost/mpl/aux_/preprocessed/bcc_pre590/map.hpp |  323 +
 .../mpl/aux_/preprocessed/bcc_pre590/minus.hpp     |  146 +
 .../mpl/aux_/preprocessed/bcc_pre590/modulus.hpp   |  101 +
 .../aux_/preprocessed/bcc_pre590/not_equal_to.hpp  |   94 +
 ext/boost/mpl/aux_/preprocessed/bcc_pre590/or.hpp  |   69 +
 .../aux_/preprocessed/bcc_pre590/placeholders.hpp  |  105 +
 .../mpl/aux_/preprocessed/bcc_pre590/plus.hpp      |  146 +
 .../mpl/aux_/preprocessed/bcc_pre590/quote.hpp     |   11 +
 .../preprocessed/bcc_pre590/reverse_fold_impl.hpp  |  295 +
 .../bcc_pre590/reverse_iter_fold_impl.hpp          |  295 +
 ext/boost/mpl/aux_/preprocessed/bcc_pre590/set.hpp |  323 +
 .../mpl/aux_/preprocessed/bcc_pre590/set_c.hpp     |  328 +
 .../aux_/preprocessed/bcc_pre590/shift_left.hpp    |   99 +
 .../aux_/preprocessed/bcc_pre590/shift_right.hpp   |   99 +
 .../preprocessed/bcc_pre590/template_arity.hpp     |   40 +
 .../mpl/aux_/preprocessed/bcc_pre590/times.hpp     |  146 +
 .../aux_/preprocessed/bcc_pre590/unpack_args.hpp   |   97 +
 .../mpl/aux_/preprocessed/bcc_pre590/vector.hpp    |  323 +
 .../mpl/aux_/preprocessed/bcc_pre590/vector_c.hpp  |  309 +
 .../mpl/aux_/preprocessed/dmc/advance_backward.hpp |   97 +
 .../mpl/aux_/preprocessed/dmc/advance_forward.hpp  |   97 +
 ext/boost/mpl/aux_/preprocessed/dmc/and.hpp        |   69 +
 ext/boost/mpl/aux_/preprocessed/dmc/apply.hpp      |  169 +
 ext/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp  |   52 +
 ext/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp |   84 +
 ext/boost/mpl/aux_/preprocessed/dmc/arg.hpp        |  123 +
 ext/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp |  406 +
 ext/boost/mpl/aux_/preprocessed/dmc/bind.hpp       |  515 +
 ext/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp   |   53 +
 ext/boost/mpl/aux_/preprocessed/dmc/bitand.hpp     |  147 +
 ext/boost/mpl/aux_/preprocessed/dmc/bitor.hpp      |  147 +
 ext/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp     |  147 +
 ext/boost/mpl/aux_/preprocessed/dmc/deque.hpp      |  323 +
 ext/boost/mpl/aux_/preprocessed/dmc/divides.hpp    |  146 +
 ext/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp   |   94 +
 ext/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp  |  180 +
 .../mpl/aux_/preprocessed/dmc/full_lambda.hpp      |  536 +
 ext/boost/mpl/aux_/preprocessed/dmc/greater.hpp    |   94 +
 .../mpl/aux_/preprocessed/dmc/greater_equal.hpp    |   94 +
 ext/boost/mpl/aux_/preprocessed/dmc/inherit.hpp    |  141 +
 .../aux_/preprocessed/dmc/iter_fold_if_impl.hpp    |  133 +
 .../mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp   |  180 +
 .../mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp   |  229 +
 ext/boost/mpl/aux_/preprocessed/dmc/less.hpp       |   94 +
 ext/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp |   94 +
 ext/boost/mpl/aux_/preprocessed/dmc/list.hpp       |  323 +
 ext/boost/mpl/aux_/preprocessed/dmc/list_c.hpp     |  328 +
 ext/boost/mpl/aux_/preprocessed/dmc/map.hpp        |  323 +
 ext/boost/mpl/aux_/preprocessed/dmc/minus.hpp      |  146 +
 ext/boost/mpl/aux_/preprocessed/dmc/modulus.hpp    |  101 +
 .../mpl/aux_/preprocessed/dmc/not_equal_to.hpp     |   94 +
 ext/boost/mpl/aux_/preprocessed/dmc/or.hpp         |   69 +
 .../mpl/aux_/preprocessed/dmc/placeholders.hpp     |  105 +
 ext/boost/mpl/aux_/preprocessed/dmc/plus.hpp       |  146 +
 ext/boost/mpl/aux_/preprocessed/dmc/quote.hpp      |  123 +
 .../aux_/preprocessed/dmc/reverse_fold_impl.hpp    |  231 +
 .../preprocessed/dmc/reverse_iter_fold_impl.hpp    |  231 +
 ext/boost/mpl/aux_/preprocessed/dmc/set.hpp        |  323 +
 ext/boost/mpl/aux_/preprocessed/dmc/set_c.hpp      |  328 +
 ext/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp |   99 +
 .../mpl/aux_/preprocessed/dmc/shift_right.hpp      |   99 +
 .../mpl/aux_/preprocessed/dmc/template_arity.hpp   |   11 +
 ext/boost/mpl/aux_/preprocessed/dmc/times.hpp      |  146 +
 .../mpl/aux_/preprocessed/dmc/unpack_args.hpp      |   94 +
 ext/boost/mpl/aux_/preprocessed/dmc/vector.hpp     |  323 +
 ext/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp   |  309 +
 ext/boost/mpl/aux_/preprocessed/gcc/._and.hpp      |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/preprocessed/gcc/._apply.hpp    |  Bin 244 -> 0 bytes
 .../mpl/aux_/preprocessed/gcc/._apply_fwd.hpp      |  Bin 244 -> 0 bytes
 .../mpl/aux_/preprocessed/gcc/._apply_wrap.hpp     |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/preprocessed/gcc/._arg.hpp      |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/preprocessed/gcc/._bind.hpp     |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/preprocessed/gcc/._bind_fwd.hpp |  Bin 244 -> 0 bytes
 .../mpl/aux_/preprocessed/gcc/._full_lambda.hpp    |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/preprocessed/gcc/._or.hpp       |  Bin 244 -> 0 bytes
 .../mpl/aux_/preprocessed/gcc/._placeholders.hpp   |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/preprocessed/gcc/._quote.hpp    |  Bin 244 -> 0 bytes
 .../mpl/aux_/preprocessed/gcc/._template_arity.hpp |  Bin 244 -> 0 bytes
 .../mpl/aux_/preprocessed/gcc/advance_backward.hpp |   97 +
 .../mpl/aux_/preprocessed/gcc/advance_forward.hpp  |   97 +
 ext/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp |  440 +
 ext/boost/mpl/aux_/preprocessed/gcc/bitand.hpp     |  147 +
 ext/boost/mpl/aux_/preprocessed/gcc/bitor.hpp      |  147 +
 ext/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp     |  147 +
 ext/boost/mpl/aux_/preprocessed/gcc/deque.hpp      |  323 +
 ext/boost/mpl/aux_/preprocessed/gcc/divides.hpp    |  146 +
 ext/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp   |   94 +
 ext/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp  |  180 +
 ext/boost/mpl/aux_/preprocessed/gcc/greater.hpp    |   94 +
 .../mpl/aux_/preprocessed/gcc/greater_equal.hpp    |   94 +
 ext/boost/mpl/aux_/preprocessed/gcc/inherit.hpp    |  141 +
 .../aux_/preprocessed/gcc/iter_fold_if_impl.hpp    |  133 +
 .../mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp   |  180 +
 .../mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp   |  229 +
 ext/boost/mpl/aux_/preprocessed/gcc/less.hpp       |   94 +
 ext/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp |   94 +
 ext/boost/mpl/aux_/preprocessed/gcc/list.hpp       |  323 +
 ext/boost/mpl/aux_/preprocessed/gcc/list_c.hpp     |  328 +
 ext/boost/mpl/aux_/preprocessed/gcc/map.hpp        |  323 +
 ext/boost/mpl/aux_/preprocessed/gcc/minus.hpp      |  146 +
 ext/boost/mpl/aux_/preprocessed/gcc/modulus.hpp    |  101 +
 .../mpl/aux_/preprocessed/gcc/not_equal_to.hpp     |   94 +
 ext/boost/mpl/aux_/preprocessed/gcc/plus.hpp       |  146 +
 .../aux_/preprocessed/gcc/reverse_fold_impl.hpp    |  231 +
 .../preprocessed/gcc/reverse_iter_fold_impl.hpp    |  231 +
 ext/boost/mpl/aux_/preprocessed/gcc/set.hpp        |  323 +
 ext/boost/mpl/aux_/preprocessed/gcc/set_c.hpp      |  328 +
 ext/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp |   99 +
 .../mpl/aux_/preprocessed/gcc/shift_right.hpp      |   99 +
 ext/boost/mpl/aux_/preprocessed/gcc/times.hpp      |  146 +
 .../mpl/aux_/preprocessed/gcc/unpack_args.hpp      |   94 +
 ext/boost/mpl/aux_/preprocessed/gcc/vector.hpp     |  323 +
 ext/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp   |  309 +
 .../aux_/preprocessed/msvc60/advance_backward.hpp  |  132 +
 .../aux_/preprocessed/msvc60/advance_forward.hpp   |  132 +
 ext/boost/mpl/aux_/preprocessed/msvc60/and.hpp     |   73 +
 ext/boost/mpl/aux_/preprocessed/msvc60/apply.hpp   |  166 +
 .../mpl/aux_/preprocessed/msvc60/apply_fwd.hpp     |   46 +
 .../mpl/aux_/preprocessed/msvc60/apply_wrap.hpp    |  247 +
 ext/boost/mpl/aux_/preprocessed/msvc60/arg.hpp     |  123 +
 .../mpl/aux_/preprocessed/msvc60/basic_bind.hpp    |  328 +
 ext/boost/mpl/aux_/preprocessed/msvc60/bind.hpp    |  432 +
 .../mpl/aux_/preprocessed/msvc60/bind_fwd.hpp      |   46 +
 ext/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp  |  149 +
 ext/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp   |  149 +
 ext/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp  |  149 +
 ext/boost/mpl/aux_/preprocessed/msvc60/deque.hpp   |  556 +
 ext/boost/mpl/aux_/preprocessed/msvc60/divides.hpp |  148 +
 .../mpl/aux_/preprocessed/msvc60/equal_to.hpp      |  102 +
 .../mpl/aux_/preprocessed/msvc60/fold_impl.hpp     |  293 +
 .../mpl/aux_/preprocessed/msvc60/full_lambda.hpp   |  554 +
 ext/boost/mpl/aux_/preprocessed/msvc60/greater.hpp |  102 +
 .../mpl/aux_/preprocessed/msvc60/greater_equal.hpp |  102 +
 ext/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp |  166 +
 .../aux_/preprocessed/msvc60/iter_fold_if_impl.hpp |  133 +
 .../aux_/preprocessed/msvc60/iter_fold_impl.hpp    |  293 +
 .../aux_/preprocessed/msvc60/lambda_no_ctps.hpp    |  229 +
 ext/boost/mpl/aux_/preprocessed/msvc60/less.hpp    |  102 +
 .../mpl/aux_/preprocessed/msvc60/less_equal.hpp    |  102 +
 ext/boost/mpl/aux_/preprocessed/msvc60/list.hpp    |  556 +
 ext/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp  |  534 +
 ext/boost/mpl/aux_/preprocessed/msvc60/map.hpp     |  556 +
 ext/boost/mpl/aux_/preprocessed/msvc60/minus.hpp   |  148 +
 ext/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp |  115 +
 .../mpl/aux_/preprocessed/msvc60/not_equal_to.hpp  |  102 +
 ext/boost/mpl/aux_/preprocessed/msvc60/or.hpp      |   73 +
 .../mpl/aux_/preprocessed/msvc60/placeholders.hpp  |  105 +
 ext/boost/mpl/aux_/preprocessed/msvc60/plus.hpp    |  148 +
 ext/boost/mpl/aux_/preprocessed/msvc60/quote.hpp   |   11 +
 .../aux_/preprocessed/msvc60/reverse_fold_impl.hpp |  343 +
 .../preprocessed/msvc60/reverse_iter_fold_impl.hpp |  343 +
 ext/boost/mpl/aux_/preprocessed/msvc60/set.hpp     |  556 +
 ext/boost/mpl/aux_/preprocessed/msvc60/set_c.hpp   |  534 +
 .../mpl/aux_/preprocessed/msvc60/shift_left.hpp    |  114 +
 .../mpl/aux_/preprocessed/msvc60/shift_right.hpp   |  114 +
 .../aux_/preprocessed/msvc60/template_arity.hpp    |   46 +
 ext/boost/mpl/aux_/preprocessed/msvc60/times.hpp   |  148 +
 .../mpl/aux_/preprocessed/msvc60/unpack_args.hpp   |  109 +
 ext/boost/mpl/aux_/preprocessed/msvc60/vector.hpp  |  556 +
 .../mpl/aux_/preprocessed/msvc60/vector_c.hpp      |  534 +
 .../aux_/preprocessed/msvc70/advance_backward.hpp  |   97 +
 .../aux_/preprocessed/msvc70/advance_forward.hpp   |   97 +
 ext/boost/mpl/aux_/preprocessed/msvc70/and.hpp     |   71 +
 ext/boost/mpl/aux_/preprocessed/msvc70/apply.hpp   |  160 +
 .../mpl/aux_/preprocessed/msvc70/apply_fwd.hpp     |   46 +
 .../mpl/aux_/preprocessed/msvc70/apply_wrap.hpp    |  138 +
 ext/boost/mpl/aux_/preprocessed/msvc70/arg.hpp     |  123 +
 .../mpl/aux_/preprocessed/msvc70/basic_bind.hpp    |  328 +
 ext/boost/mpl/aux_/preprocessed/msvc70/bind.hpp    |  432 +
 .../mpl/aux_/preprocessed/msvc70/bind_fwd.hpp      |   46 +
 ext/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp  |  151 +
 ext/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp   |  151 +
 ext/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp  |  151 +
 ext/boost/mpl/aux_/preprocessed/msvc70/deque.hpp   |  556 +
 ext/boost/mpl/aux_/preprocessed/msvc70/divides.hpp |  150 +
 .../mpl/aux_/preprocessed/msvc70/equal_to.hpp      |  102 +
 .../mpl/aux_/preprocessed/msvc70/fold_impl.hpp     |  245 +
 .../mpl/aux_/preprocessed/msvc70/full_lambda.hpp   |  554 +
 ext/boost/mpl/aux_/preprocessed/msvc70/greater.hpp |  102 +
 .../mpl/aux_/preprocessed/msvc70/greater_equal.hpp |  102 +
 ext/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp |  166 +
 .../aux_/preprocessed/msvc70/iter_fold_if_impl.hpp |  133 +
 .../aux_/preprocessed/msvc70/iter_fold_impl.hpp    |  245 +
 .../aux_/preprocessed/msvc70/lambda_no_ctps.hpp    |  229 +
 ext/boost/mpl/aux_/preprocessed/msvc70/less.hpp    |  102 +
 .../mpl/aux_/preprocessed/msvc70/less_equal.hpp    |  102 +
 ext/boost/mpl/aux_/preprocessed/msvc70/list.hpp    |  556 +
 ext/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp  |  534 +
 ext/boost/mpl/aux_/preprocessed/msvc70/map.hpp     |  556 +
 ext/boost/mpl/aux_/preprocessed/msvc70/minus.hpp   |  150 +
 ext/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp |  115 +
 .../mpl/aux_/preprocessed/msvc70/not_equal_to.hpp  |  102 +
 ext/boost/mpl/aux_/preprocessed/msvc70/or.hpp      |   71 +
 .../mpl/aux_/preprocessed/msvc70/placeholders.hpp  |  105 +
 ext/boost/mpl/aux_/preprocessed/msvc70/plus.hpp    |  150 +
 ext/boost/mpl/aux_/preprocessed/msvc70/quote.hpp   |  116 +
 .../aux_/preprocessed/msvc70/reverse_fold_impl.hpp |  295 +
 .../preprocessed/msvc70/reverse_iter_fold_impl.hpp |  295 +
 ext/boost/mpl/aux_/preprocessed/msvc70/set.hpp     |  556 +
 ext/boost/mpl/aux_/preprocessed/msvc70/set_c.hpp   |  534 +
 .../mpl/aux_/preprocessed/msvc70/shift_left.hpp    |  114 +
 .../mpl/aux_/preprocessed/msvc70/shift_right.hpp   |  114 +
 .../aux_/preprocessed/msvc70/template_arity.hpp    |   46 +
 ext/boost/mpl/aux_/preprocessed/msvc70/times.hpp   |  150 +
 .../mpl/aux_/preprocessed/msvc70/unpack_args.hpp   |  109 +
 ext/boost/mpl/aux_/preprocessed/msvc70/vector.hpp  |  556 +
 .../mpl/aux_/preprocessed/msvc70/vector_c.hpp      |  534 +
 .../aux_/preprocessed/mwcw/advance_backward.hpp    |   97 +
 .../mpl/aux_/preprocessed/mwcw/advance_forward.hpp |   97 +
 ext/boost/mpl/aux_/preprocessed/mwcw/and.hpp       |   69 +
 ext/boost/mpl/aux_/preprocessed/mwcw/apply.hpp     |  169 +
 ext/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp |   52 +
 .../mpl/aux_/preprocessed/mwcw/apply_wrap.hpp      |  456 +
 ext/boost/mpl/aux_/preprocessed/mwcw/arg.hpp       |  123 +
 .../mpl/aux_/preprocessed/mwcw/basic_bind.hpp      |  440 +
 ext/boost/mpl/aux_/preprocessed/mwcw/bind.hpp      |  561 +
 ext/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp  |   52 +
 ext/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp    |  147 +
 ext/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp     |  147 +
 ext/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp    |  147 +
 ext/boost/mpl/aux_/preprocessed/mwcw/deque.hpp     |  323 +
 ext/boost/mpl/aux_/preprocessed/mwcw/divides.hpp   |  146 +
 ext/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp  |   94 +
 ext/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp |  180 +
 .../mpl/aux_/preprocessed/mwcw/full_lambda.hpp     |  554 +
 ext/boost/mpl/aux_/preprocessed/mwcw/greater.hpp   |   94 +
 .../mpl/aux_/preprocessed/mwcw/greater_equal.hpp   |   94 +
 ext/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp   |  141 +
 .../aux_/preprocessed/mwcw/iter_fold_if_impl.hpp   |  133 +
 .../mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp  |  180 +
 .../mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp  |  229 +
 ext/boost/mpl/aux_/preprocessed/mwcw/less.hpp      |   94 +
 .../mpl/aux_/preprocessed/mwcw/less_equal.hpp      |   94 +
 ext/boost/mpl/aux_/preprocessed/mwcw/list.hpp      |  323 +
 ext/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp    |  328 +
 ext/boost/mpl/aux_/preprocessed/mwcw/map.hpp       |  323 +
 ext/boost/mpl/aux_/preprocessed/mwcw/minus.hpp     |  146 +
 ext/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp   |  101 +
 .../mpl/aux_/preprocessed/mwcw/not_equal_to.hpp    |   94 +
 ext/boost/mpl/aux_/preprocessed/mwcw/or.hpp        |   69 +
 .../mpl/aux_/preprocessed/mwcw/placeholders.hpp    |  105 +
 ext/boost/mpl/aux_/preprocessed/mwcw/plus.hpp      |  146 +
 ext/boost/mpl/aux_/preprocessed/mwcw/quote.hpp     |  123 +
 .../aux_/preprocessed/mwcw/reverse_fold_impl.hpp   |  231 +
 .../preprocessed/mwcw/reverse_iter_fold_impl.hpp   |  231 +
 ext/boost/mpl/aux_/preprocessed/mwcw/set.hpp       |  323 +
 ext/boost/mpl/aux_/preprocessed/mwcw/set_c.hpp     |  328 +
 .../mpl/aux_/preprocessed/mwcw/shift_left.hpp      |   99 +
 .../mpl/aux_/preprocessed/mwcw/shift_right.hpp     |   99 +
 .../mpl/aux_/preprocessed/mwcw/template_arity.hpp  |   11 +
 ext/boost/mpl/aux_/preprocessed/mwcw/times.hpp     |  146 +
 .../mpl/aux_/preprocessed/mwcw/unpack_args.hpp     |   94 +
 ext/boost/mpl/aux_/preprocessed/mwcw/vector.hpp    |  323 +
 ext/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp  |  309 +
 .../aux_/preprocessed/no_ctps/advance_backward.hpp |   97 +
 .../aux_/preprocessed/no_ctps/advance_forward.hpp  |   97 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/and.hpp    |   73 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp  |  268 +
 .../mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp    |   50 +
 .../mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp   |   78 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp    |  123 +
 .../mpl/aux_/preprocessed/no_ctps/basic_bind.hpp   |  486 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp   |  590 +
 .../mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp     |   52 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp |  134 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp  |  134 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp |  134 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp  |  556 +
 .../mpl/aux_/preprocessed/no_ctps/divides.hpp      |  133 +
 .../mpl/aux_/preprocessed/no_ctps/equal_to.hpp     |   94 +
 .../mpl/aux_/preprocessed/no_ctps/fold_impl.hpp    |  245 +
 .../mpl/aux_/preprocessed/no_ctps/full_lambda.hpp  |  554 +
 .../mpl/aux_/preprocessed/no_ctps/greater.hpp      |   94 +
 .../aux_/preprocessed/no_ctps/greater_equal.hpp    |   94 +
 .../mpl/aux_/preprocessed/no_ctps/inherit.hpp      |  166 +
 .../preprocessed/no_ctps/iter_fold_if_impl.hpp     |  133 +
 .../aux_/preprocessed/no_ctps/iter_fold_impl.hpp   |  245 +
 .../aux_/preprocessed/no_ctps/lambda_no_ctps.hpp   |  229 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/less.hpp   |   94 +
 .../mpl/aux_/preprocessed/no_ctps/less_equal.hpp   |   94 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/list.hpp   |  556 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp |  534 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/map.hpp    |  556 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp  |  133 +
 .../mpl/aux_/preprocessed/no_ctps/modulus.hpp      |  101 +
 .../mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp |   94 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/or.hpp     |   73 +
 .../mpl/aux_/preprocessed/no_ctps/placeholders.hpp |  105 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp   |  133 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp  |  116 +
 .../preprocessed/no_ctps/reverse_fold_impl.hpp     |  295 +
 .../no_ctps/reverse_iter_fold_impl.hpp             |  295 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/set.hpp    |  556 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp  |  534 +
 .../mpl/aux_/preprocessed/no_ctps/shift_left.hpp   |   99 +
 .../mpl/aux_/preprocessed/no_ctps/shift_right.hpp  |   99 +
 .../aux_/preprocessed/no_ctps/template_arity.hpp   |   40 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/times.hpp  |  133 +
 .../mpl/aux_/preprocessed/no_ctps/unpack_args.hpp  |  109 +
 ext/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp |  556 +
 .../mpl/aux_/preprocessed/no_ctps/vector_c.hpp     |  534 +
 .../aux_/preprocessed/no_ttp/advance_backward.hpp  |   97 +
 .../aux_/preprocessed/no_ttp/advance_forward.hpp   |   97 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/and.hpp     |   69 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp   |  169 +
 .../mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp     |   52 +
 .../mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp    |   84 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp     |  123 +
 .../mpl/aux_/preprocessed/no_ttp/basic_bind.hpp    |  369 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp    |  466 +
 .../mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp      |   52 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp  |  157 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp   |  157 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp  |  157 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp   |  323 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp |  156 +
 .../mpl/aux_/preprocessed/no_ttp/equal_to.hpp      |   98 +
 .../mpl/aux_/preprocessed/no_ttp/fold_impl.hpp     |  180 +
 .../mpl/aux_/preprocessed/no_ttp/full_lambda.hpp   |  554 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp |   98 +
 .../mpl/aux_/preprocessed/no_ttp/greater_equal.hpp |   98 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp |  141 +
 .../aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp |  133 +
 .../aux_/preprocessed/no_ttp/iter_fold_impl.hpp    |  180 +
 .../aux_/preprocessed/no_ttp/lambda_no_ctps.hpp    |  229 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/less.hpp    |   98 +
 .../mpl/aux_/preprocessed/no_ttp/less_equal.hpp    |   98 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/list.hpp    |  323 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp  |  328 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/map.hpp     |  323 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp   |  156 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp |  111 +
 .../mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp  |   98 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/or.hpp      |   69 +
 .../mpl/aux_/preprocessed/no_ttp/placeholders.hpp  |  105 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp    |  156 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp   |   11 +
 .../aux_/preprocessed/no_ttp/reverse_fold_impl.hpp |  231 +
 .../preprocessed/no_ttp/reverse_iter_fold_impl.hpp |  231 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/set.hpp     |  323 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp   |  328 +
 .../mpl/aux_/preprocessed/no_ttp/shift_left.hpp    |  110 +
 .../mpl/aux_/preprocessed/no_ttp/shift_right.hpp   |  110 +
 .../aux_/preprocessed/no_ttp/template_arity.hpp    |   40 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/times.hpp   |  156 +
 .../mpl/aux_/preprocessed/no_ttp/unpack_args.hpp   |   94 +
 ext/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp  |  323 +
 .../mpl/aux_/preprocessed/no_ttp/vector_c.hpp      |  309 +
 .../aux_/preprocessed/plain/advance_backward.hpp   |   97 +
 .../aux_/preprocessed/plain/advance_forward.hpp    |   97 +
 ext/boost/mpl/aux_/preprocessed/plain/and.hpp      |   64 +
 ext/boost/mpl/aux_/preprocessed/plain/apply.hpp    |  139 +
 .../mpl/aux_/preprocessed/plain/apply_fwd.hpp      |   52 +
 .../mpl/aux_/preprocessed/plain/apply_wrap.hpp     |   84 +
 ext/boost/mpl/aux_/preprocessed/plain/arg.hpp      |  123 +
 .../mpl/aux_/preprocessed/plain/basic_bind.hpp     |  440 +
 ext/boost/mpl/aux_/preprocessed/plain/bind.hpp     |  561 +
 ext/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp |   52 +
 ext/boost/mpl/aux_/preprocessed/plain/bitand.hpp   |  142 +
 ext/boost/mpl/aux_/preprocessed/plain/bitor.hpp    |  142 +
 ext/boost/mpl/aux_/preprocessed/plain/bitxor.hpp   |  142 +
 ext/boost/mpl/aux_/preprocessed/plain/deque.hpp    |  323 +
 ext/boost/mpl/aux_/preprocessed/plain/divides.hpp  |  141 +
 ext/boost/mpl/aux_/preprocessed/plain/equal_to.hpp |   92 +
 .../mpl/aux_/preprocessed/plain/fold_impl.hpp      |  180 +
 .../mpl/aux_/preprocessed/plain/full_lambda.hpp    |  554 +
 ext/boost/mpl/aux_/preprocessed/plain/greater.hpp  |   92 +
 .../mpl/aux_/preprocessed/plain/greater_equal.hpp  |   92 +
 ext/boost/mpl/aux_/preprocessed/plain/inherit.hpp  |  125 +
 .../aux_/preprocessed/plain/iter_fold_if_impl.hpp  |  133 +
 .../mpl/aux_/preprocessed/plain/iter_fold_impl.hpp |  180 +
 .../mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp |  228 +
 ext/boost/mpl/aux_/preprocessed/plain/less.hpp     |   92 +
 .../mpl/aux_/preprocessed/plain/less_equal.hpp     |   92 +
 ext/boost/mpl/aux_/preprocessed/plain/list.hpp     |  323 +
 ext/boost/mpl/aux_/preprocessed/plain/list_c.hpp   |  328 +
 ext/boost/mpl/aux_/preprocessed/plain/map.hpp      |  323 +
 ext/boost/mpl/aux_/preprocessed/plain/minus.hpp    |  141 +
 ext/boost/mpl/aux_/preprocessed/plain/modulus.hpp  |   99 +
 .../mpl/aux_/preprocessed/plain/not_equal_to.hpp   |   92 +
 ext/boost/mpl/aux_/preprocessed/plain/or.hpp       |   64 +
 .../mpl/aux_/preprocessed/plain/placeholders.hpp   |  105 +
 ext/boost/mpl/aux_/preprocessed/plain/plus.hpp     |  141 +
 ext/boost/mpl/aux_/preprocessed/plain/quote.hpp    |  123 +
 .../aux_/preprocessed/plain/reverse_fold_impl.hpp  |  231 +
 .../preprocessed/plain/reverse_iter_fold_impl.hpp  |  231 +
 ext/boost/mpl/aux_/preprocessed/plain/set.hpp      |  323 +
 ext/boost/mpl/aux_/preprocessed/plain/set_c.hpp    |  328 +
 .../mpl/aux_/preprocessed/plain/shift_left.hpp     |   97 +
 .../mpl/aux_/preprocessed/plain/shift_right.hpp    |   97 +
 .../mpl/aux_/preprocessed/plain/template_arity.hpp |   11 +
 ext/boost/mpl/aux_/preprocessed/plain/times.hpp    |  141 +
 .../mpl/aux_/preprocessed/plain/unpack_args.hpp    |   94 +
 ext/boost/mpl/aux_/preprocessed/plain/vector.hpp   |  323 +
 ext/boost/mpl/aux_/preprocessed/plain/vector_c.hpp |  309 +
 .../mpl/aux_/preprocessor/._def_params_tail.hpp    |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/preprocessor/._enum.hpp         |  Bin 244 -> 0 bytes
 .../mpl/aux_/preprocessor/._filter_params.hpp      |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/preprocessor/._params.hpp       |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/preprocessor/._sub.hpp          |  Bin 244 -> 0 bytes
 ext/boost/mpl/aux_/preprocessor/add.hpp            |   65 +
 .../mpl/aux_/preprocessor/def_params_tail.hpp      |    2 +-
 ext/boost/mpl/aux_/preprocessor/default_params.hpp |   67 +
 ext/boost/mpl/aux_/preprocessor/enum.hpp           |    2 +-
 ext/boost/mpl/aux_/preprocessor/ext_params.hpp     |   78 +
 ext/boost/mpl/aux_/preprocessor/filter_params.hpp  |    2 +-
 ext/boost/mpl/aux_/preprocessor/is_seq.hpp         |   54 +
 ext/boost/mpl/aux_/preprocessor/params.hpp         |    2 +-
 .../mpl/aux_/preprocessor/partial_spec_params.hpp  |   32 +
 ext/boost/mpl/aux_/preprocessor/range.hpp          |   23 +
 ext/boost/mpl/aux_/preprocessor/repeat.hpp         |   51 +
 ext/boost/mpl/aux_/preprocessor/sub.hpp            |    2 +-
 ext/boost/mpl/aux_/preprocessor/token_equal.hpp    |   56 +
 ext/boost/mpl/aux_/preprocessor/tuple.hpp          |   29 +
 ext/boost/mpl/aux_/ptr_to_ref.hpp                  |   46 +
 ext/boost/mpl/aux_/push_back_impl.hpp              |   70 +
 ext/boost/mpl/aux_/push_front_impl.hpp             |   71 +
 ext/boost/mpl/aux_/range_c/O1_size.hpp             |   31 +
 ext/boost/mpl/aux_/range_c/back.hpp                |   34 +
 ext/boost/mpl/aux_/range_c/empty.hpp               |   37 +
 ext/boost/mpl/aux_/range_c/front.hpp               |   33 +
 ext/boost/mpl/aux_/range_c/iterator.hpp            |  106 +
 ext/boost/mpl/aux_/range_c/size.hpp                |   37 +
 ext/boost/mpl/aux_/range_c/tag.hpp                 |   24 +
 ext/boost/mpl/aux_/reverse_fold_impl.hpp           |   44 +
 ext/boost/mpl/aux_/reverse_fold_impl_body.hpp      |  412 +
 ext/boost/mpl/aux_/reverse_iter_fold_impl.hpp      |   43 +
 ext/boost/mpl/aux_/sequence_wrapper.hpp            |  292 +
 ext/boost/mpl/aux_/shift_op.hpp                    |   87 +
 ext/boost/mpl/aux_/single_element_iter.hpp         |  118 +
 ext/boost/mpl/aux_/size_impl.hpp                   |   52 +
 ext/boost/mpl/aux_/sort_impl.hpp                   |  121 +
 ext/boost/mpl/aux_/static_cast.hpp                 |    2 +-
 ext/boost/mpl/aux_/template_arity.hpp              |    2 +-
 ext/boost/mpl/aux_/template_arity_fwd.hpp          |    2 +-
 ext/boost/mpl/aux_/test.hpp                        |   32 +
 ext/boost/mpl/aux_/test/assert.hpp                 |   29 +
 ext/boost/mpl/aux_/test/data.hpp                   |   25 +
 ext/boost/mpl/aux_/test/test_case.hpp              |   21 +
 ext/boost/mpl/aux_/traits_lambda_spec.hpp          |   63 +
 ext/boost/mpl/aux_/transform_iter.hpp              |  123 +
 ext/boost/mpl/aux_/type_wrapper.hpp                |    2 +-
 ext/boost/mpl/aux_/unwrap.hpp                      |   47 +
 ext/boost/mpl/aux_/value_wknd.hpp                  |    2 +-
 ext/boost/mpl/aux_/yes_no.hpp                      |    2 +-
 ext/boost/mpl/back.hpp                             |   39 +
 ext/boost/mpl/back_fwd.hpp                         |   24 +
 ext/boost/mpl/back_inserter.hpp                    |   34 +
 ext/boost/mpl/base.hpp                             |   35 +
 ext/boost/mpl/begin.hpp                            |   19 +
 ext/boost/mpl/begin_end.hpp                        |   57 +
 ext/boost/mpl/begin_end_fwd.hpp                    |   27 +
 ext/boost/mpl/bind.hpp                             |    2 +-
 ext/boost/mpl/bind_fwd.hpp                         |    2 +-
 ext/boost/mpl/bitand.hpp                           |   45 +
 ext/boost/mpl/bitor.hpp                            |   45 +
 ext/boost/mpl/bitwise.hpp                          |   24 +
 ext/boost/mpl/bitxor.hpp                           |   23 +
 ext/boost/mpl/bool.hpp                             |    2 +-
 ext/boost/mpl/bool_fwd.hpp                         |    2 +-
 ext/boost/mpl/char.hpp                             |   22 +
 ext/boost/mpl/char_fwd.hpp                         |   27 +
 ext/boost/mpl/clear.hpp                            |   39 +
 ext/boost/mpl/clear_fwd.hpp                        |   24 +
 ext/boost/mpl/comparison.hpp                       |   24 +
 ext/boost/mpl/contains.hpp                         |   41 +
 ext/boost/mpl/contains_fwd.hpp                     |   25 +
 ext/boost/mpl/copy.hpp                             |   58 +
 ext/boost/mpl/copy_if.hpp                          |   96 +
 ext/boost/mpl/count.hpp                            |   40 +
 ext/boost/mpl/count_fwd.hpp                        |   24 +
 ext/boost/mpl/count_if.hpp                         |   79 +
 ext/boost/mpl/deque.hpp                            |   58 +
 ext/boost/mpl/deref.hpp                            |   41 +
 ext/boost/mpl/distance.hpp                         |   78 +
 ext/boost/mpl/distance_fwd.hpp                     |   28 +
 ext/boost/mpl/divides.hpp                          |   21 +
 ext/boost/mpl/empty.hpp                            |   39 +
 ext/boost/mpl/empty_base.hpp                       |   59 +
 ext/boost/mpl/empty_fwd.hpp                        |   24 +
 ext/boost/mpl/empty_sequence.hpp                   |   42 +
 ext/boost/mpl/end.hpp                              |   19 +
 ext/boost/mpl/equal.hpp                            |  112 +
 ext/boost/mpl/equal_to.hpp                         |   21 +
 ext/boost/mpl/erase.hpp                            |   42 +
 ext/boost/mpl/erase_fwd.hpp                        |   24 +
 ext/boost/mpl/erase_key.hpp                        |   41 +
 ext/boost/mpl/erase_key_fwd.hpp                    |   24 +
 ext/boost/mpl/eval_if.hpp                          |    2 +-
 ext/boost/mpl/filter_view.hpp                      |   46 +
 ext/boost/mpl/find.hpp                             |   38 +
 ext/boost/mpl/find_if.hpp                          |   50 +
 ext/boost/mpl/fold.hpp                             |   48 +
 ext/boost/mpl/for_each.hpp                         |  116 +
 ext/boost/mpl/front.hpp                            |   39 +
 ext/boost/mpl/front_fwd.hpp                        |   24 +
 ext/boost/mpl/front_inserter.hpp                   |   33 +
 ext/boost/mpl/greater.hpp                          |   21 +
 ext/boost/mpl/greater_equal.hpp                    |   21 +
 ext/boost/mpl/has_key.hpp                          |   41 +
 ext/boost/mpl/has_key_fwd.hpp                      |   25 +
 ext/boost/mpl/has_xxx.hpp                          |    2 +-
 ext/boost/mpl/identity.hpp                         |    2 +-
 ext/boost/mpl/if.hpp                               |    2 +-
 ext/boost/mpl/index_if.hpp                         |   60 +
 ext/boost/mpl/index_of.hpp                         |   39 +
 ext/boost/mpl/inherit.hpp                          |  229 +
 ext/boost/mpl/inherit_linearly.hpp                 |   39 +
 ext/boost/mpl/insert.hpp                           |   41 +
 ext/boost/mpl/insert_fwd.hpp                       |   24 +
 ext/boost/mpl/insert_range.hpp                     |   41 +
 ext/boost/mpl/insert_range_fwd.hpp                 |   24 +
 ext/boost/mpl/inserter.hpp                         |   32 +
 ext/boost/mpl/int.hpp                              |    2 +-
 ext/boost/mpl/int_fwd.hpp                          |    2 +-
 ext/boost/mpl/integral_c.hpp                       |    2 +-
 ext/boost/mpl/integral_c_fwd.hpp                   |    2 +-
 ext/boost/mpl/integral_c_tag.hpp                   |    2 +-
 ext/boost/mpl/is_placeholder.hpp                   |   67 +
 ext/boost/mpl/is_sequence.hpp                      |  112 +
 ext/boost/mpl/iter_fold.hpp                        |   49 +
 ext/boost/mpl/iter_fold_if.hpp                     |  117 +
 ext/boost/mpl/iterator_category.hpp                |   35 +
 ext/boost/mpl/iterator_range.hpp                   |   42 +
 ext/boost/mpl/iterator_tags.hpp                    |   27 +
 ext/boost/mpl/joint_view.hpp                       |   65 +
 ext/boost/mpl/key_type.hpp                         |   42 +
 ext/boost/mpl/key_type_fwd.hpp                     |   25 +
 ext/boost/mpl/lambda.hpp                           |    2 +-
 ext/boost/mpl/lambda_fwd.hpp                       |    2 +-
 ext/boost/mpl/less.hpp                             |   21 +
 ext/boost/mpl/less_equal.hpp                       |   21 +
 ext/boost/mpl/limits/._arity.hpp                   |  Bin 244 -> 0 bytes
 ext/boost/mpl/limits/arity.hpp                     |    2 +-
 ext/boost/mpl/limits/list.hpp                      |   21 +
 ext/boost/mpl/limits/map.hpp                       |   21 +
 ext/boost/mpl/limits/set.hpp                       |   21 +
 ext/boost/mpl/limits/string.hpp                    |   21 +
 ext/boost/mpl/limits/unrolling.hpp                 |   21 +
 ext/boost/mpl/limits/vector.hpp                    |   21 +
 ext/boost/mpl/list.hpp                             |   57 +
 ext/boost/mpl/list/aux_/O1_size.hpp                |   33 +
 ext/boost/mpl/list/aux_/begin_end.hpp              |   44 +
 ext/boost/mpl/list/aux_/clear.hpp                  |   34 +
 ext/boost/mpl/list/aux_/empty.hpp                  |   34 +
 ext/boost/mpl/list/aux_/front.hpp                  |   33 +
 ext/boost/mpl/list/aux_/include_preprocessed.hpp   |   35 +
 ext/boost/mpl/list/aux_/item.hpp                   |   55 +
 ext/boost/mpl/list/aux_/iterator.hpp               |   76 +
 ext/boost/mpl/list/aux_/numbered.hpp               |   68 +
 ext/boost/mpl/list/aux_/numbered_c.hpp             |   71 +
 ext/boost/mpl/list/aux_/pop_front.hpp              |   34 +
 .../mpl/list/aux_/preprocessed/plain/list10.hpp    |  149 +
 .../mpl/list/aux_/preprocessed/plain/list10_c.hpp  |  164 +
 .../mpl/list/aux_/preprocessed/plain/list20.hpp    |  169 +
 .../mpl/list/aux_/preprocessed/plain/list20_c.hpp  |  173 +
 .../mpl/list/aux_/preprocessed/plain/list30.hpp    |  189 +
 .../mpl/list/aux_/preprocessed/plain/list30_c.hpp  |  183 +
 .../mpl/list/aux_/preprocessed/plain/list40.hpp    |  209 +
 .../mpl/list/aux_/preprocessed/plain/list40_c.hpp  |  193 +
 .../mpl/list/aux_/preprocessed/plain/list50.hpp    |  229 +
 .../mpl/list/aux_/preprocessed/plain/list50_c.hpp  |  203 +
 ext/boost/mpl/list/aux_/push_back.hpp              |   36 +
 ext/boost/mpl/list/aux_/push_front.hpp             |   39 +
 ext/boost/mpl/list/aux_/size.hpp                   |   33 +
 ext/boost/mpl/list/aux_/tag.hpp                    |   24 +
 ext/boost/mpl/list/list0.hpp                       |   42 +
 ext/boost/mpl/list/list0_c.hpp                     |   31 +
 ext/boost/mpl/list/list10.hpp                      |   43 +
 ext/boost/mpl/list/list10_c.hpp                    |   43 +
 ext/boost/mpl/list/list20.hpp                      |   43 +
 ext/boost/mpl/list/list20_c.hpp                    |   43 +
 ext/boost/mpl/list/list30.hpp                      |   43 +
 ext/boost/mpl/list/list30_c.hpp                    |   43 +
 ext/boost/mpl/list/list40.hpp                      |   43 +
 ext/boost/mpl/list/list40_c.hpp                    |   43 +
 ext/boost/mpl/list/list50.hpp                      |   43 +
 ext/boost/mpl/list/list50_c.hpp                    |   43 +
 ext/boost/mpl/list_c.hpp                           |   60 +
 ext/boost/mpl/logical.hpp                          |    2 +-
 ext/boost/mpl/long.hpp                             |   22 +
 ext/boost/mpl/long_fwd.hpp                         |   27 +
 ext/boost/mpl/lower_bound.hpp                      |  143 +
 ext/boost/mpl/map.hpp                              |   57 +
 ext/boost/mpl/map/aux_/at_impl.hpp                 |  144 +
 ext/boost/mpl/map/aux_/begin_end_impl.hpp          |   50 +
 ext/boost/mpl/map/aux_/clear_impl.hpp              |   35 +
 ext/boost/mpl/map/aux_/contains_impl.hpp           |   43 +
 ext/boost/mpl/map/aux_/empty_impl.hpp              |   34 +
 ext/boost/mpl/map/aux_/erase_impl.hpp              |   41 +
 ext/boost/mpl/map/aux_/erase_key_impl.hpp          |   53 +
 ext/boost/mpl/map/aux_/has_key_impl.hpp            |   44 +
 ext/boost/mpl/map/aux_/include_preprocessed.hpp    |   53 +
 ext/boost/mpl/map/aux_/insert_impl.hpp             |   72 +
 ext/boost/mpl/map/aux_/item.hpp                    |  138 +
 ext/boost/mpl/map/aux_/iterator.hpp                |  169 +
 ext/boost/mpl/map/aux_/key_type_impl.hpp           |   36 +
 ext/boost/mpl/map/aux_/map0.hpp                    |   74 +
 ext/boost/mpl/map/aux_/numbered.hpp                |  110 +
 .../mpl/map/aux_/preprocessed/no_ctps/map10.hpp    |  350 +
 .../mpl/map/aux_/preprocessed/no_ctps/map20.hpp    |  370 +
 .../mpl/map/aux_/preprocessed/no_ctps/map30.hpp    |  390 +
 .../mpl/map/aux_/preprocessed/no_ctps/map40.hpp    |  410 +
 .../mpl/map/aux_/preprocessed/no_ctps/map50.hpp    |  430 +
 .../mpl/map/aux_/preprocessed/plain/map10.hpp      |  290 +
 .../mpl/map/aux_/preprocessed/plain/map20.hpp      |  310 +
 .../mpl/map/aux_/preprocessed/plain/map30.hpp      |  330 +
 .../mpl/map/aux_/preprocessed/plain/map40.hpp      |  350 +
 .../mpl/map/aux_/preprocessed/plain/map50.hpp      |  370 +
 .../map/aux_/preprocessed/typeof_based/map10.hpp   |  150 +
 .../map/aux_/preprocessed/typeof_based/map20.hpp   |  170 +
 .../map/aux_/preprocessed/typeof_based/map30.hpp   |  190 +
 .../map/aux_/preprocessed/typeof_based/map40.hpp   |  210 +
 .../map/aux_/preprocessed/typeof_based/map50.hpp   |  230 +
 ext/boost/mpl/map/aux_/size_impl.hpp               |   33 +
 ext/boost/mpl/map/aux_/tag.hpp                     |   24 +
 ext/boost/mpl/map/aux_/value_type_impl.hpp         |   36 +
 ext/boost/mpl/map/map0.hpp                         |   36 +
 ext/boost/mpl/map/map10.hpp                        |   44 +
 ext/boost/mpl/map/map20.hpp                        |   44 +
 ext/boost/mpl/map/map30.hpp                        |   44 +
 ext/boost/mpl/map/map40.hpp                        |   44 +
 ext/boost/mpl/map/map50.hpp                        |   44 +
 ext/boost/mpl/math/fixed_c.hpp                     |   36 +
 ext/boost/mpl/math/is_even.hpp                     |   54 +
 ext/boost/mpl/math/rational_c.hpp                  |   37 +
 ext/boost/mpl/max.hpp                              |   19 +
 ext/boost/mpl/max_element.hpp                      |   72 +
 ext/boost/mpl/min.hpp                              |   19 +
 ext/boost/mpl/min_element.hpp                      |   40 +
 ext/boost/mpl/min_max.hpp                          |   46 +
 ext/boost/mpl/minus.hpp                            |   21 +
 ext/boost/mpl/modulus.hpp                          |   22 +
 ext/boost/mpl/multiplies.hpp                       |   53 +
 ext/boost/mpl/multiset/aux_/count_impl.hpp         |   82 +
 ext/boost/mpl/multiset/aux_/insert_impl.hpp        |   34 +
 ext/boost/mpl/multiset/aux_/item.hpp               |  114 +
 ext/boost/mpl/multiset/aux_/multiset0.hpp          |   34 +
 ext/boost/mpl/multiset/aux_/tag.hpp                |   23 +
 ext/boost/mpl/multiset/multiset0.hpp               |   36 +
 ext/boost/mpl/negate.hpp                           |   81 +
 ext/boost/mpl/next.hpp                             |    2 +-
 ext/boost/mpl/next_prior.hpp                       |    2 +-
 ext/boost/mpl/not.hpp                              |    2 +-
 ext/boost/mpl/not_equal_to.hpp                     |   21 +
 ext/boost/mpl/numeric_cast.hpp                     |   41 +
 ext/boost/mpl/or.hpp                               |    2 +-
 ext/boost/mpl/order.hpp                            |   41 +
 ext/boost/mpl/order_fwd.hpp                        |   25 +
 ext/boost/mpl/pair.hpp                             |   70 +
 ext/boost/mpl/pair_view.hpp                        |  169 +
 ext/boost/mpl/partition.hpp                        |   53 +
 ext/boost/mpl/placeholders.hpp                     |    2 +-
 ext/boost/mpl/plus.hpp                             |   21 +
 ext/boost/mpl/pop_back.hpp                         |   39 +
 ext/boost/mpl/pop_back_fwd.hpp                     |   24 +
 ext/boost/mpl/pop_front.hpp                        |   39 +
 ext/boost/mpl/pop_front_fwd.hpp                    |   24 +
 ext/boost/mpl/print.hpp                            |   74 +
 ext/boost/mpl/prior.hpp                            |   19 +
 ext/boost/mpl/protect.hpp                          |    2 +-
 ext/boost/mpl/push_back.hpp                        |   53 +
 ext/boost/mpl/push_back_fwd.hpp                    |   24 +
 ext/boost/mpl/push_front.hpp                       |   52 +
 ext/boost/mpl/push_front_fwd.hpp                   |   24 +
 ext/boost/mpl/quote.hpp                            |    2 +-
 ext/boost/mpl/range_c.hpp                          |   48 +
 ext/boost/mpl/remove.hpp                           |   52 +
 ext/boost/mpl/remove_if.hpp                        |   83 +
 ext/boost/mpl/replace.hpp                          |   55 +
 ext/boost/mpl/replace_if.hpp                       |   88 +
 ext/boost/mpl/reverse.hpp                          |   38 +
 ext/boost/mpl/reverse_fold.hpp                     |   50 +
 ext/boost/mpl/reverse_iter_fold.hpp                |   56 +
 ext/boost/mpl/same_as.hpp                          |   55 +
 ext/boost/mpl/sequence_tag.hpp                     |  124 +
 ext/boost/mpl/sequence_tag_fwd.hpp                 |   26 +
 ext/boost/mpl/set.hpp                              |   57 +
 ext/boost/mpl/set/aux_/at_impl.hpp                 |   40 +
 ext/boost/mpl/set/aux_/begin_end_impl.hpp          |   43 +
 ext/boost/mpl/set/aux_/clear_impl.hpp              |   35 +
 ext/boost/mpl/set/aux_/empty_impl.hpp              |   34 +
 ext/boost/mpl/set/aux_/erase_impl.hpp              |   41 +
 ext/boost/mpl/set/aux_/erase_key_impl.hpp          |   53 +
 ext/boost/mpl/set/aux_/has_key_impl.hpp            |   60 +
 ext/boost/mpl/set/aux_/include_preprocessed.hpp    |   42 +
 ext/boost/mpl/set/aux_/insert_impl.hpp             |   65 +
 ext/boost/mpl/set/aux_/item.hpp                    |   80 +
 ext/boost/mpl/set/aux_/iterator.hpp                |   98 +
 ext/boost/mpl/set/aux_/key_type_impl.hpp           |   34 +
 ext/boost/mpl/set/aux_/numbered.hpp                |   48 +
 ext/boost/mpl/set/aux_/numbered_c.hpp              |   48 +
 .../mpl/set/aux_/preprocessed/plain/set10.hpp      |  140 +
 .../mpl/set/aux_/preprocessed/plain/set10_c.hpp    |  145 +
 .../mpl/set/aux_/preprocessed/plain/set20.hpp      |  168 +
 .../mpl/set/aux_/preprocessed/plain/set20_c.hpp    |  154 +
 .../mpl/set/aux_/preprocessed/plain/set30.hpp      |  195 +
 .../mpl/set/aux_/preprocessed/plain/set30_c.hpp    |  164 +
 .../mpl/set/aux_/preprocessed/plain/set40.hpp      |  221 +
 .../mpl/set/aux_/preprocessed/plain/set40_c.hpp    |  174 +
 .../mpl/set/aux_/preprocessed/plain/set50.hpp      |  250 +
 .../mpl/set/aux_/preprocessed/plain/set50_c.hpp    |  184 +
 ext/boost/mpl/set/aux_/set0.hpp                    |   69 +
 ext/boost/mpl/set/aux_/size_impl.hpp               |   33 +
 ext/boost/mpl/set/aux_/tag.hpp                     |   24 +
 ext/boost/mpl/set/aux_/value_type_impl.hpp         |   34 +
 ext/boost/mpl/set/set0.hpp                         |   35 +
 ext/boost/mpl/set/set0_c.hpp                       |   32 +
 ext/boost/mpl/set/set10.hpp                        |   44 +
 ext/boost/mpl/set/set10_c.hpp                      |   45 +
 ext/boost/mpl/set/set20.hpp                        |   44 +
 ext/boost/mpl/set/set20_c.hpp                      |   45 +
 ext/boost/mpl/set/set30.hpp                        |   44 +
 ext/boost/mpl/set/set30_c.hpp                      |   45 +
 ext/boost/mpl/set/set40.hpp                        |   44 +
 ext/boost/mpl/set/set40_c.hpp                      |   45 +
 ext/boost/mpl/set/set50.hpp                        |   44 +
 ext/boost/mpl/set/set50_c.hpp                      |   45 +
 ext/boost/mpl/set_c.hpp                            |   60 +
 ext/boost/mpl/shift_left.hpp                       |   22 +
 ext/boost/mpl/shift_right.hpp                      |   22 +
 ext/boost/mpl/single_view.hpp                      |   38 +
 ext/boost/mpl/size.hpp                             |   42 +
 ext/boost/mpl/size_fwd.hpp                         |   24 +
 ext/boost/mpl/size_t.hpp                           |    2 +-
 ext/boost/mpl/size_t_fwd.hpp                       |    2 +-
 ext/boost/mpl/sizeof.hpp                           |   36 +
 ext/boost/mpl/sort.hpp                             |   27 +
 ext/boost/mpl/stable_partition.hpp                 |   75 +
 ext/boost/mpl/string.hpp                           |  607 +
 ext/boost/mpl/switch.hpp                           |   49 +
 ext/boost/mpl/tag.hpp                              |   52 +
 ext/boost/mpl/times.hpp                            |   21 +
 ext/boost/mpl/transform.hpp                        |  145 +
 ext/boost/mpl/transform_view.hpp                   |   46 +
 ext/boost/mpl/unique.hpp                           |   85 +
 ext/boost/mpl/unpack_args.hpp                      |  150 +
 ext/boost/mpl/upper_bound.hpp                      |  141 +
 ext/boost/mpl/value_type.hpp                       |   42 +
 ext/boost/mpl/value_type_fwd.hpp                   |   25 +
 ext/boost/mpl/vector.hpp                           |   57 +
 ext/boost/mpl/vector/aux_/O1_size.hpp              |   56 +
 ext/boost/mpl/vector/aux_/at.hpp                   |  116 +
 ext/boost/mpl/vector/aux_/back.hpp                 |   59 +
 ext/boost/mpl/vector/aux_/begin_end.hpp            |   49 +
 ext/boost/mpl/vector/aux_/clear.hpp                |   55 +
 ext/boost/mpl/vector/aux_/empty.hpp                |   68 +
 ext/boost/mpl/vector/aux_/front.hpp                |   56 +
 ext/boost/mpl/vector/aux_/include_preprocessed.hpp |   55 +
 ext/boost/mpl/vector/aux_/item.hpp                 |  103 +
 ext/boost/mpl/vector/aux_/iterator.hpp             |  130 +
 ext/boost/mpl/vector/aux_/numbered.hpp             |  218 +
 ext/boost/mpl/vector/aux_/numbered_c.hpp           |   77 +
 ext/boost/mpl/vector/aux_/pop_back.hpp             |   40 +
 ext/boost/mpl/vector/aux_/pop_front.hpp            |   40 +
 .../vector/aux_/preprocessed/no_ctps/vector10.hpp  | 1528 ++
 .../aux_/preprocessed/no_ctps/vector10_c.hpp       |  149 +
 .../vector/aux_/preprocessed/no_ctps/vector20.hpp  | 1804 ++
 .../aux_/preprocessed/no_ctps/vector20_c.hpp       |  195 +
 .../vector/aux_/preprocessed/no_ctps/vector30.hpp  | 2124 ++
 .../aux_/preprocessed/no_ctps/vector30_c.hpp       |  238 +
 .../vector/aux_/preprocessed/no_ctps/vector40.hpp  | 2444 ++
 .../aux_/preprocessed/no_ctps/vector40_c.hpp       |  281 +
 .../vector/aux_/preprocessed/no_ctps/vector50.hpp  | 2764 +++
 .../aux_/preprocessed/no_ctps/vector50_c.hpp       |  325 +
 .../vector/aux_/preprocessed/plain/vector10.hpp    |  829 +
 .../vector/aux_/preprocessed/plain/vector10_c.hpp  |  149 +
 .../vector/aux_/preprocessed/plain/vector20.hpp    | 1144 +
 .../vector/aux_/preprocessed/plain/vector20_c.hpp  |  195 +
 .../vector/aux_/preprocessed/plain/vector30.hpp    | 1464 ++
 .../vector/aux_/preprocessed/plain/vector30_c.hpp  |  238 +
 .../vector/aux_/preprocessed/plain/vector40.hpp    | 1784 ++
 .../vector/aux_/preprocessed/plain/vector40_c.hpp  |  281 +
 .../vector/aux_/preprocessed/plain/vector50.hpp    | 2104 ++
 .../vector/aux_/preprocessed/plain/vector50_c.hpp  |  325 +
 .../aux_/preprocessed/typeof_based/vector10.hpp    |  139 +
 .../aux_/preprocessed/typeof_based/vector10_c.hpp  |  154 +
 .../aux_/preprocessed/typeof_based/vector20.hpp    |  159 +
 .../aux_/preprocessed/typeof_based/vector20_c.hpp  |  163 +
 .../aux_/preprocessed/typeof_based/vector30.hpp    |  179 +
 .../aux_/preprocessed/typeof_based/vector30_c.hpp  |  173 +
 .../aux_/preprocessed/typeof_based/vector40.hpp    |  199 +
 .../aux_/preprocessed/typeof_based/vector40_c.hpp  |  183 +
 .../aux_/preprocessed/typeof_based/vector50.hpp    |  219 +
 .../aux_/preprocessed/typeof_based/vector50_c.hpp  |  193 +
 ext/boost/mpl/vector/aux_/push_back.hpp            |   40 +
 ext/boost/mpl/vector/aux_/push_front.hpp           |   40 +
 ext/boost/mpl/vector/aux_/size.hpp                 |   49 +
 ext/boost/mpl/vector/aux_/tag.hpp                  |   32 +
 ext/boost/mpl/vector/aux_/vector0.hpp              |   52 +
 ext/boost/mpl/vector/vector0.hpp                   |   34 +
 ext/boost/mpl/vector/vector0_c.hpp                 |   31 +
 ext/boost/mpl/vector/vector10.hpp                  |   45 +
 ext/boost/mpl/vector/vector10_c.hpp                |   46 +
 ext/boost/mpl/vector/vector20.hpp                  |   45 +
 ext/boost/mpl/vector/vector20_c.hpp                |   46 +
 ext/boost/mpl/vector/vector30.hpp                  |   45 +
 ext/boost/mpl/vector/vector30_c.hpp                |   47 +
 ext/boost/mpl/vector/vector40.hpp                  |   45 +
 ext/boost/mpl/vector/vector40_c.hpp                |   46 +
 ext/boost/mpl/vector/vector50.hpp                  |   45 +
 ext/boost/mpl/vector/vector50_c.hpp                |   46 +
 ext/boost/mpl/vector_c.hpp                         |   61 +
 ext/boost/mpl/void.hpp                             |    2 +-
 ext/boost/mpl/void_fwd.hpp                         |    2 +-
 ext/boost/mpl/zip_view.hpp                         |   65 +
 ext/boost/none.hpp                                 |    2 +-
 ext/boost/numeric/conversion/bounds.hpp            |   24 +
 ext/boost/numeric/conversion/cast.hpp              |   61 +
 ext/boost/numeric/conversion/conversion_traits.hpp |   39 +
 ext/boost/numeric/conversion/converter.hpp         |   68 +
 .../numeric/conversion/converter_policies.hpp      |  194 +
 ext/boost/numeric/conversion/detail/bounds.hpp     |   58 +
 .../conversion/detail/conversion_traits.hpp        |   97 +
 ext/boost/numeric/conversion/detail/converter.hpp  |  602 +
 .../conversion/detail/int_float_mixture.hpp        |   72 +
 .../numeric/conversion/detail/is_subranged.hpp     |  234 +
 ext/boost/numeric/conversion/detail/meta.hpp       |  120 +
 .../conversion/detail/numeric_cast_traits.hpp      |  138 +
 .../preprocessed/numeric_cast_traits_common.hpp    | 1741 ++
 .../preprocessed/numeric_cast_traits_long_long.hpp |  347 +
 .../numeric/conversion/detail/sign_mixture.hpp     |   72 +
 .../conversion/detail/udt_builtin_mixture.hpp      |   69 +
 .../numeric/conversion/int_float_mixture_enum.hpp  |   29 +
 .../numeric/conversion/numeric_cast_traits.hpp     |   31 +
 ext/boost/numeric/conversion/sign_mixture_enum.hpp |   29 +
 .../conversion/udt_builtin_mixture_enum.hpp        |   26 +
 ext/boost/operators.hpp                            |    4 +-
 ext/boost/optional/optional.hpp                    |  229 +-
 ext/boost/optional/optional_fwd.hpp                |    9 +-
 ext/boost/pointee.hpp                              |   74 +
 ext/boost/preprocessor/._comma_if.hpp              |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/._empty.hpp                 |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/._enum.hpp                  |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/._enum_params.hpp           |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/._identity.hpp              |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/._inc.hpp                   |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/._iterate.hpp               |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/._repeat.hpp                |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/._stringize.hpp             |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/arithmetic/._add.hpp        |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/arithmetic/._dec.hpp        |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/arithmetic/._inc.hpp        |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/arithmetic/._mod.hpp        |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/arithmetic/._sub.hpp        |  Bin 244 -> 0 bytes
 .../preprocessor/arithmetic/detail/._div_base.hpp  |  Bin 244 -> 0 bytes
 .../preprocessor/arithmetic/detail/div_base.hpp    |   61 -
 ext/boost/preprocessor/arithmetic/mod.hpp          |   39 -
 ext/boost/preprocessor/array/._data.hpp            |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/array/._elem.hpp            |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/array/._size.hpp            |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/cat.hpp                     |    4 +-
 ext/boost/preprocessor/comparison/._less_equal.hpp |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/comparison/less_equal.hpp   |   39 -
 ext/boost/preprocessor/config/config.hpp           |   43 +-
 ext/boost/preprocessor/control/._deduce_d.hpp      |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/control/._expr_iif.hpp      |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/control/._if.hpp            |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/control/._iif.hpp           |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/control/._while.hpp         |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/control/deduce_d.hpp        |   22 -
 ext/boost/preprocessor/control/detail/._while.hpp  |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/debug/._error.hpp           |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/dec.hpp                     |   17 +
 ext/boost/preprocessor/detail/._auto_rec.hpp       |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/detail/._check.hpp          |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/detail/._is_binary.hpp      |  Bin 244 -> 0 bytes
 .../preprocessor/enum_params_with_a_default.hpp    |   17 +
 ext/boost/preprocessor/enum_shifted_params.hpp     |   17 +
 ext/boost/preprocessor/facilities/._empty.hpp      |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/facilities/._identity.hpp   |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/facilities/intercept.hpp    |  277 +
 ext/boost/preprocessor/facilities/overload.hpp     |   25 +
 .../iteration/detail/bounds/._lower1.hpp           |  Bin 244 -> 0 bytes
 .../iteration/detail/bounds/._upper1.hpp           |  Bin 244 -> 0 bytes
 .../iteration/detail/bounds/lower2.hpp             |   99 +
 .../iteration/detail/bounds/upper2.hpp             |   99 +
 .../iteration/detail/iter/forward1.hpp             |    6 +-
 .../iteration/detail/iter/forward2.hpp             | 1338 +
 .../iteration/detail/iter/reverse1.hpp             | 1296 +
 ext/boost/preprocessor/iteration/iterate.hpp       |    6 +-
 ext/boost/preprocessor/list/._adt.hpp              |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/list/._append.hpp           |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/list/._fold_left.hpp        |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/list/._fold_right.hpp       |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/list/._for_each_i.hpp       |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/list/._reverse.hpp          |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/list/._transform.hpp        |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/list/detail/._fold_left.hpp |  Bin 244 -> 0 bytes
 .../preprocessor/list/detail/._fold_right.hpp      |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/logical/._and.hpp           |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/logical/._bitand.hpp        |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/logical/._bool.hpp          |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/logical/._compl.hpp         |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/logical/._not.hpp           |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/logical/not.hpp             |   30 -
 ext/boost/preprocessor/punctuation/._comma.hpp     |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/punctuation/._comma_if.hpp  |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/punctuation/paren.hpp       |   23 +
 ext/boost/preprocessor/repeat_2nd.hpp              |   17 +
 ext/boost/preprocessor/repetition/._enum.hpp       |  Bin 244 -> 0 bytes
 .../repetition/._enum_binary_params.hpp            |  Bin 244 -> 0 bytes
 .../preprocessor/repetition/._enum_params.hpp      |  Bin 244 -> 0 bytes
 .../repetition/._enum_trailing_params.hpp          |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/repetition/._for.hpp        |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/repetition/._repeat.hpp     |  Bin 244 -> 0 bytes
 .../preprocessor/repetition/._repeat_from_to.hpp   |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/repetition/detail/._for.hpp |  Bin 244 -> 0 bytes
 .../repetition/enum_params_with_a_default.hpp      |   25 +
 .../repetition/enum_shifted_params.hpp             |   44 +
 ext/boost/preprocessor/seq/._elem.hpp              |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/seq/._enum.hpp              |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/seq/._fold_left.hpp         |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/seq/._for_each_i.hpp        |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/seq/._seq.hpp               |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/seq/._transform.hpp         |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/seq/cat.hpp                 |   48 -
 ext/boost/preprocessor/seq/fold_left.hpp           | 1070 -
 ext/boost/preprocessor/seq/size.hpp                |    1 -
 ext/boost/preprocessor/seq/transform.hpp           |   48 -
 ext/boost/preprocessor/slot/._slot.hpp             |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/slot/detail/._def.hpp       |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/slot/detail/._shared.hpp    |  Bin 244 -> 0 bytes
 ext/boost/preprocessor/tuple/eat.hpp               |  117 +-
 ext/boost/preprocessor/tuple/elem.hpp              |  516 +-
 ext/boost/preprocessor/tuple/rem.hpp               |  158 +-
 ext/boost/preprocessor/tuple/to_list.hpp           |  126 +-
 ext/boost/preprocessor/variadic/elem.hpp           |   94 +
 ext/boost/preprocessor/variadic/size.hpp           |   30 +
 ext/boost/range/._as_literal.hpp                   |  Bin 244 -> 0 bytes
 ext/boost/range/._config.hpp                       |  Bin 244 -> 0 bytes
 ext/boost/range/._const_iterator.hpp               |  Bin 244 -> 0 bytes
 ext/boost/range/._difference_type.hpp              |  Bin 244 -> 0 bytes
 ext/boost/range/._distance.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/range/._empty.hpp                        |  Bin 244 -> 0 bytes
 ext/boost/range/._functions.hpp                    |  Bin 244 -> 0 bytes
 ext/boost/range/._iterator.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/range/._iterator_range.hpp               |  Bin 244 -> 0 bytes
 ext/boost/range/._iterator_range_io.hpp            |  Bin 244 -> 0 bytes
 ext/boost/range/._mutable_iterator.hpp             |  Bin 244 -> 0 bytes
 ext/boost/range/._rbegin.hpp                       |  Bin 244 -> 0 bytes
 ext/boost/range/._rend.hpp                         |  Bin 244 -> 0 bytes
 ext/boost/range/._reverse_iterator.hpp             |  Bin 244 -> 0 bytes
 ext/boost/range/._size_type.hpp                    |  Bin 244 -> 0 bytes
 ext/boost/range/._value_type.hpp                   |  Bin 244 -> 0 bytes
 ext/boost/range/algorithm/._equal.hpp              |  Bin 244 -> 0 bytes
 ext/boost/range/algorithm/equal.hpp                |   20 +-
 ext/boost/range/as_literal.hpp                     |    2 +-
 ext/boost/range/begin.hpp                          |   23 +-
 ext/boost/range/concepts.hpp                       |   39 +-
 ext/boost/range/detail/._common.hpp                |  Bin 244 -> 0 bytes
 ext/boost/range/detail/._extract_optional_type.hpp |  Bin 244 -> 0 bytes
 ext/boost/range/detail/._implementation_help.hpp   |  Bin 244 -> 0 bytes
 ext/boost/range/detail/._misc_concept.hpp          |  Bin 244 -> 0 bytes
 ext/boost/range/detail/._sfinae.hpp                |  Bin 244 -> 0 bytes
 ext/boost/range/detail/._str_types.hpp             |  Bin 244 -> 0 bytes
 ext/boost/range/detail/safe_bool.hpp               |   72 +
 ext/boost/range/end.hpp                            |   23 +-
 ext/boost/range/iterator_range_core.hpp            |  132 +-
 ext/boost/range/size.hpp                           |   28 +-
 ext/boost/range/size_type.hpp                      |   56 +-
 ext/boost/ratio/config.hpp                         |   86 +
 ext/boost/ratio/detail/mpl/abs.hpp                 |   89 +
 ext/boost/ratio/detail/mpl/gcd.hpp                 |  124 +
 ext/boost/ratio/detail/mpl/lcm.hpp                 |  126 +
 ext/boost/ratio/detail/mpl/sign.hpp                |   89 +
 ext/boost/ratio/detail/overflow_helpers.hpp        |  367 +
 ext/boost/ratio/ratio.hpp                          |  233 +
 ext/boost/ratio/ratio_fwd.hpp                      |   84 +
 ext/boost/smart_ptr/._bad_weak_ptr.hpp             |  Bin 244 -> 0 bytes
 ext/boost/smart_ptr/._enable_shared_from_this.hpp  |  Bin 244 -> 0 bytes
 ext/boost/smart_ptr/._scoped_array.hpp             |  Bin 244 -> 0 bytes
 ext/boost/smart_ptr/._scoped_ptr.hpp               |  Bin 244 -> 0 bytes
 ext/boost/smart_ptr/detail/._atomic_count.hpp      |  Bin 244 -> 0 bytes
 ext/boost/smart_ptr/detail/._atomic_count_gcc.hpp  |  Bin 244 -> 0 bytes
 .../smart_ptr/detail/._atomic_count_gcc_x86.hpp    |  Bin 244 -> 0 bytes
 .../smart_ptr/detail/._atomic_count_pthreads.hpp   |  Bin 244 -> 0 bytes
 .../smart_ptr/detail/._atomic_count_solaris.hpp    |  Bin 244 -> 0 bytes
 ext/boost/smart_ptr/detail/._atomic_count_sync.hpp |  Bin 244 -> 0 bytes
 .../smart_ptr/detail/._atomic_count_win32.hpp      |  Bin 244 -> 0 bytes
 ext/boost/smart_ptr/detail/._operator_bool.hpp     |  Bin 244 -> 0 bytes
 ext/boost/smart_ptr/detail/._sp_convertible.hpp    |  Bin 244 -> 0 bytes
 .../detail/._sp_counted_base_acc_ia64.hpp          |  Bin 244 -> 0 bytes
 .../smart_ptr/detail/._sp_counted_base_cw_ppc.hpp  |  Bin 244 -> 0 bytes
 .../smart_ptr/detail/._sp_counted_base_cw_x86.hpp  |  Bin 244 -> 0 bytes
 .../detail/._sp_counted_base_gcc_ia64.hpp          |  Bin 244 -> 0 bytes
 .../smart_ptr/detail/._sp_counted_base_gcc_ppc.hpp |  Bin 244 -> 0 bytes
 .../detail/._sp_counted_base_gcc_sparc.hpp         |  Bin 244 -> 0 bytes
 .../smart_ptr/detail/._sp_counted_base_gcc_x86.hpp |  Bin 244 -> 0 bytes
 .../smart_ptr/detail/._sp_counted_base_nt.hpp      |  Bin 244 -> 0 bytes
 .../smart_ptr/detail/._sp_counted_base_pt.hpp      |  Bin 244 -> 0 bytes
 .../smart_ptr/detail/._sp_counted_base_solaris.hpp |  Bin 244 -> 0 bytes
 .../smart_ptr/detail/._sp_counted_base_spin.hpp    |  Bin 244 -> 0 bytes
 .../smart_ptr/detail/._sp_counted_base_sync.hpp    |  Bin 244 -> 0 bytes
 .../smart_ptr/detail/._sp_counted_base_w32.hpp     |  Bin 244 -> 0 bytes
 ext/boost/smart_ptr/detail/._spinlock_nt.hpp       |  Bin 244 -> 0 bytes
 ext/boost/smart_ptr/detail/._spinlock_pt.hpp       |  Bin 244 -> 0 bytes
 ext/boost/smart_ptr/detail/._spinlock_sync.hpp     |  Bin 244 -> 0 bytes
 ext/boost/smart_ptr/detail/._yield_k.hpp           |  Bin 244 -> 0 bytes
 ext/boost/smart_ptr/detail/atomic_count_win32.hpp  |   63 -
 ext/boost/smart_ptr/detail/shared_count.hpp        |   88 +
 ext/boost/smart_ptr/detail/sp_counted_base.hpp     |    3 +
 ext/boost/smart_ptr/detail/sp_counted_base_aix.hpp |  142 +
 .../smart_ptr/detail/sp_counted_base_gcc_mips.hpp  |    9 +
 .../smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp |  150 +
 ext/boost/smart_ptr/detail/sp_counted_base_w32.hpp |  130 -
 ext/boost/smart_ptr/detail/sp_counted_impl.hpp     |   12 +-
 ext/boost/smart_ptr/detail/sp_has_sync.hpp         |    6 +-
 ext/boost/smart_ptr/detail/spinlock.hpp            |    5 +-
 ext/boost/smart_ptr/detail/spinlock_gcc_arm.hpp    |   48 +-
 ext/boost/smart_ptr/detail/spinlock_pool.hpp       |    4 +
 ext/boost/smart_ptr/make_shared.hpp                |  613 +-
 ext/boost/smart_ptr/shared_array.hpp               |   30 +-
 ext/boost/smart_ptr/shared_ptr.hpp                 |   42 +-
 ext/boost/smart_ptr/weak_ptr.hpp                   |   36 +-
 ext/boost/src/pthread/once.cpp                     |   51 -
 ext/boost/src/pthread/thread.cpp                   |  616 -
 ext/boost/src/pthread/timeconv.inl                 |  133 -
 ext/boost/src/tss_null.cpp                         |   34 -
 ext/boost/static_assert.hpp                        |   10 +-
 ext/boost/swap.hpp                                 |   12 +
 ext/boost/system/api_config.hpp                    |   42 +
 ext/boost/system/config.hpp                        |   69 +
 ext/boost/system/error_code.hpp                    |  513 +
 ext/boost/system/system_error.hpp                  |   80 +
 ext/boost/thread/._barrier.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/thread/._condition.hpp                   |  Bin 244 -> 0 bytes
 ext/boost/thread/._condition_variable.hpp          |  Bin 244 -> 0 bytes
 ext/boost/thread/._mutex.hpp                       |  Bin 244 -> 0 bytes
 ext/boost/thread/._once.hpp                        |  Bin 244 -> 0 bytes
 ext/boost/thread/._recursive_mutex.hpp             |  Bin 244 -> 0 bytes
 ext/boost/thread/._shared_mutex.hpp                |  Bin 244 -> 0 bytes
 ext/boost/thread/._thread.hpp                      |  Bin 244 -> 0 bytes
 ext/boost/thread/._tss.hpp                         |  Bin 244 -> 0 bytes
 ext/boost/thread/._xtime.hpp                       |  Bin 244 -> 0 bytes
 ext/boost/thread/barrier.hpp                       |    8 +-
 ext/boost/thread/cv_status.hpp                     |   26 +
 ext/boost/thread/detail/._force_cast.hpp           |  Bin 244 -> 0 bytes
 ext/boost/thread/detail/._platform.hpp             |  Bin 244 -> 0 bytes
 ext/boost/thread/detail/._singleton.hpp            |  Bin 244 -> 0 bytes
 ext/boost/thread/detail/._thread_group.hpp         |  Bin 244 -> 0 bytes
 ext/boost/thread/detail/._thread_heap_alloc.hpp    |  Bin 244 -> 0 bytes
 ext/boost/thread/detail/._thread_interruption.hpp  |  Bin 244 -> 0 bytes
 ext/boost/thread/detail/._tss_hooks.hpp            |  Bin 244 -> 0 bytes
 ext/boost/thread/detail/config.hpp                 |  141 +-
 ext/boost/thread/detail/delete.hpp                 |   45 +
 ext/boost/thread/detail/memory.hpp                 |  156 +
 ext/boost/thread/detail/move.hpp                   |  196 +-
 ext/boost/thread/detail/platform.hpp               |    4 +-
 ext/boost/thread/detail/thread.hpp                 |  475 +-
 ext/boost/thread/detail/thread_interruption.hpp    |   23 +-
 ext/boost/thread/exceptions.hpp                    |  275 +-
 ext/boost/thread/future.hpp                        | 1239 +-
 ext/boost/thread/locks.hpp                         |  966 +-
 ext/boost/thread/once.hpp                          |    4 +-
 ext/boost/thread/pthread/._thread_heap_alloc.hpp   |  Bin 244 -> 0 bytes
 ext/boost/thread/pthread/._timespec.hpp            |  Bin 244 -> 0 bytes
 ext/boost/thread/pthread/condition_variable.hpp    |  266 +-
 .../thread/pthread/condition_variable_fwd.hpp      |  169 +-
 ext/boost/thread/pthread/mutex.hpp                 |  125 +-
 ext/boost/thread/pthread/once.hpp                  |   80 +-
 .../thread/pthread/pthread_mutex_scoped_lock.hpp   |   14 +-
 ext/boost/thread/pthread/recursive_mutex.hpp       |  135 +-
 ext/boost/thread/pthread/shared_mutex.hpp          |  274 +-
 ext/boost/thread/pthread/thread_data.hpp           |  165 +-
 ext/boost/thread/pthread/thread_heap_alloc.hpp     |    8 +-
 ext/boost/thread/reverse_lock.hpp                  |   58 +
 ext/boost/thread/shared_lock_guard.hpp             |   52 +
 ext/boost/thread/shared_mutex.hpp                  |    9 +-
 ext/boost/thread/thread.hpp                        |    3 +-
 ext/boost/thread/thread_time.hpp                   |    5 +
 ext/boost/thread/v2/thread.hpp                     |   56 +
 ext/boost/thread/xtime.hpp                         |   12 +-
 ext/boost/throw_exception.hpp                      |   15 +-
 ext/boost/token_functions.hpp                      |   44 +-
 ext/boost/tuple/detail/tuple_basic.hpp             |  980 +
 ext/boost/tuple/tuple.hpp                          |   90 +
 ext/boost/type_traits/._add_const.hpp              |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._add_pointer.hpp            |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._add_reference.hpp          |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._add_volatile.hpp           |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._broken_compiler_spec.hpp   |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._composite_traits.hpp       |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._config.hpp                 |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._conversion_traits.hpp      |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._ice.hpp                    |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._integral_constant.hpp      |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._is_abstract.hpp            |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._is_arithmetic.hpp          |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._is_array.hpp               |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._is_base_and_derived.hpp    |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._is_base_of.hpp             |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._is_class.hpp               |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._is_float.hpp               |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._is_integral.hpp            |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._is_lvalue_reference.hpp    |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._is_reference.hpp           |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._is_rvalue_reference.hpp    |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._is_same.hpp                |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._is_scalar.hpp              |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._is_void.hpp                |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._make_unsigned.hpp          |  Bin 244 -> 0 bytes
 ext/boost/type_traits/._remove_const.hpp           |  Bin 244 -> 0 bytes
 ext/boost/type_traits/add_cv.hpp                   |   48 +
 ext/boost/type_traits/add_rvalue_reference.hpp     |   66 +
 ext/boost/type_traits/alignment_of.hpp             |    2 +-
 ext/boost/type_traits/common_type.hpp              |  158 +
 ext/boost/type_traits/cv_traits.hpp                |   24 +
 ext/boost/type_traits/decay.hpp                    |   44 +
 ext/boost/type_traits/detail/._false_result.hpp    |  Bin 244 -> 0 bytes
 ext/boost/type_traits/detail/._ice_and.hpp         |  Bin 244 -> 0 bytes
 ext/boost/type_traits/detail/._ice_eq.hpp          |  Bin 244 -> 0 bytes
 ext/boost/type_traits/detail/._ice_not.hpp         |  Bin 244 -> 0 bytes
 ext/boost/type_traits/detail/._ice_or.hpp          |  Bin 244 -> 0 bytes
 .../detail/._is_function_ptr_helper.hpp            |  Bin 244 -> 0 bytes
 .../detail/._is_mem_fun_pointer_impl.hpp           |  Bin 244 -> 0 bytes
 .../type_traits/detail/._size_t_trait_undef.hpp    |  Bin 244 -> 0 bytes
 .../type_traits/detail/._template_arity_spec.hpp   |  Bin 244 -> 0 bytes
 .../type_traits/detail/._type_trait_undef.hpp      |  Bin 244 -> 0 bytes
 ext/boost/type_traits/detail/._yes_no_type.hpp     |  Bin 244 -> 0 bytes
 ext/boost/type_traits/detail/bool_trait_def.hpp    |   29 +-
 ext/boost/type_traits/detail/bool_trait_undef.hpp  |    5 +-
 ext/boost/type_traits/detail/cv_traits_impl.hpp    |    2 +-
 ext/boost/type_traits/detail/size_t_trait_def.hpp  |   10 +-
 .../type_traits/detail/size_t_trait_undef.hpp      |    2 +-
 ext/boost/type_traits/detail/type_trait_def.hpp    |   10 +-
 ext/boost/type_traits/detail/type_trait_undef.hpp  |    2 +-
 ext/boost/type_traits/function_traits.hpp          |    2 +-
 ext/boost/type_traits/has_nothrow_assign.hpp       |   44 +
 ext/boost/type_traits/has_nothrow_constructor.hpp  |   53 +
 ext/boost/type_traits/has_nothrow_copy.hpp         |   24 +-
 ext/boost/type_traits/has_trivial_assign.hpp       |   57 +
 ext/boost/type_traits/has_trivial_constructor.hpp  |   51 +
 ext/boost/type_traits/has_trivial_copy.hpp         |   25 +-
 ext/boost/type_traits/has_trivial_destructor.hpp   |   17 +-
 ext/boost/type_traits/intrinsics.hpp               |  193 +-
 ext/boost/type_traits/is_compound.hpp              |   46 +
 ext/boost/type_traits/is_const.hpp                 |   10 +-
 ext/boost/type_traits/is_convertible.hpp           |   27 +-
 ext/boost/type_traits/is_empty.hpp                 |  229 +
 ext/boost/type_traits/is_enum.hpp                  |    2 +-
 ext/boost/type_traits/is_floating_point.hpp        |   27 +
 ext/boost/type_traits/is_function.hpp              |    6 +-
 ext/boost/type_traits/is_fundamental.hpp           |    2 +-
 .../type_traits/is_member_function_pointer.hpp     |    4 +-
 ext/boost/type_traits/is_member_pointer.hpp        |    4 +-
 ext/boost/type_traits/is_object.hpp                |   53 +
 ext/boost/type_traits/is_pod.hpp                   |   14 +-
 ext/boost/type_traits/is_pointer.hpp               |    4 +-
 ext/boost/type_traits/is_signed.hpp                |   11 +-
 ext/boost/type_traits/is_stateless.hpp             |   48 +
 ext/boost/type_traits/is_union.hpp                 |    8 +
 ext/boost/type_traits/is_unsigned.hpp              |   13 +-
 ext/boost/type_traits/is_volatile.hpp              |   10 +-
 ext/boost/type_traits/object_traits.hpp            |   33 +
 ext/boost/type_traits/remove_bounds.hpp            |   48 +
 ext/boost/type_traits/remove_cv.hpp                |    7 +-
 ext/boost/type_traits/remove_pointer.hpp           |   53 +-
 ext/boost/type_traits/remove_reference.hpp         |    4 +-
 ext/boost/type_traits/remove_volatile.hpp          |   88 +
 ext/boost/type_traits/same_traits.hpp              |   15 +
 ext/boost/type_traits/transform_traits.hpp         |   21 +
 ext/boost/type_traits/type_with_alignment.hpp      |   10 +-
 ext/boost/typeof/message.hpp                       |    8 +
 ext/boost/typeof/native.hpp                        |   60 +
 ext/boost/typeof/typeof.hpp                        |  218 +
 ext/boost/units/detail/._utility.hpp               |  Bin 244 -> 0 bytes
 ext/boost/utility.hpp                              |   20 -
 ext/boost/utility/._addressof.hpp                  |  Bin 244 -> 0 bytes
 ext/boost/utility/._base_from_member.hpp           |  Bin 244 -> 0 bytes
 ext/boost/utility/._binary.hpp                     |  Bin 244 -> 0 bytes
 ext/boost/utility/._compare_pointees.hpp           |  Bin 244 -> 0 bytes
 ext/boost/utility/._enable_if.hpp                  |  Bin 244 -> 0 bytes
 ext/boost/utility/base_from_member.hpp             |   87 -
 ext/boost/utility/binary.hpp                       |  708 -
 ext/boost/utility/declval.hpp                      |   49 +
 .../utility/detail/in_place_factory_prefix.hpp     |   36 +
 .../utility/detail/in_place_factory_suffix.hpp     |   23 +
 ext/boost/utility/detail/result_of_iterate.hpp     |  208 +
 ext/boost/utility/in_place_factory.hpp             |   88 +
 ext/boost/utility/result_of.hpp                    |  187 +
 ext/boost/utility/swap.hpp                         |   55 +
 ext/boost/version.hpp                              |   32 +
 ext/common/AbstractSpawnManager.h                  |  110 -
 ext/common/Account.h                               |   29 +-
 ext/common/AccountsDatabase.cpp                    |   81 -
 ext/common/AccountsDatabase.h                      |   18 +-
 ext/common/AgentBase.cpp                           |  432 -
 ext/common/AgentBase.h                             |   39 -
 ext/common/AgentsStarter.cpp                       |  147 +-
 ext/common/AgentsStarter.h                         |  603 +-
 ext/common/AgentsStarter.hpp                       |  659 -
 ext/common/ApplicationPool/Client.h                |  788 -
 ext/common/ApplicationPool/Interface.h             |  295 -
 ext/common/ApplicationPool/Pool.h                  | 1327 -
 ext/common/ApplicationPool/Server.h                |  479 -
 ext/common/ApplicationPool2/AppTypes.cpp           |   74 +
 ext/common/ApplicationPool2/AppTypes.h             |  254 +
 ext/common/ApplicationPool2/Common.h               |  149 +
 ext/common/ApplicationPool2/ComponentInfo.h        |   53 +
 ext/common/ApplicationPool2/DirectSpawner.h        |  255 +
 ext/common/ApplicationPool2/DummySpawner.h         |   90 +
 ext/common/ApplicationPool2/Group.h                | 1119 +
 ext/common/ApplicationPool2/Implementation.cpp     | 1194 +
 ext/common/ApplicationPool2/Options.h              |  606 +
 ext/common/ApplicationPool2/PipeWatcher.h          |   68 +
 ext/common/ApplicationPool2/Pool.h                 | 1518 ++
 ext/common/ApplicationPool2/Process.h              |  621 +
 ext/common/ApplicationPool2/README.md              |   96 +
 ext/common/ApplicationPool2/Session.h              |  171 +
 ext/common/ApplicationPool2/SmartSpawner.h         |  804 +
 ext/common/ApplicationPool2/Socket.h               |  246 +
 ext/common/ApplicationPool2/Spawner.h              | 1273 +
 ext/common/ApplicationPool2/SpawnerFactory.h       |  140 +
 ext/common/ApplicationPool2/SuperGroup.h           |  673 +
 ext/common/BackgroundEventLoop.cpp                 |  123 +
 ext/common/BackgroundEventLoop.h                   |   61 +
 ext/common/Constants.h                             |   74 +-
 ext/common/Constants.h.erb                         |   42 +
 ext/common/EventedBufferedInput.h                  |  458 +
 ext/common/EventedClient.h                         |    2 +-
 ext/common/EventedMessageServer.h                  |   53 +-
 ext/common/EventedServer.h                         |    6 +-
 ext/common/Exceptions.h                            |  116 +-
 ext/common/FileDescriptor.h                        |   16 +-
 ext/common/HelperAgent/BacktracesServer.h          |   59 -
 ext/common/IniFile.h                               |  496 -
 ext/common/Logging.cpp                             |   81 +-
 ext/common/Logging.h                               |  958 +-
 ext/common/LoggingAgent/DataStoreId.h              |  177 -
 ext/common/LoggingAgent/FilterSupport.cpp          |   66 -
 ext/common/LoggingAgent/FilterSupport.h            | 1611 --
 ext/common/LoggingAgent/LoggingServer.h            | 1285 -
 ext/common/LoggingAgent/Main.cpp                   |  290 -
 ext/common/LoggingAgent/RemoteSender.h             |  507 -
 ext/common/MessageChannel.h                        |  494 -
 ext/common/MessageClient.h                         |    2 +-
 ext/common/MessageReadersWriters.h                 |   21 +-
 ext/common/MessageServer.h                         |   75 +-
 ext/common/MultiLibeio.cpp                         |  200 +
 ext/common/MultiLibeio.h                           |   67 +
 ext/common/PoolOptions.h                           |  518 -
 ext/common/Process.h                               |  253 -
 ext/common/RandomGenerator.h                       |    2 +-
 ext/common/ResourceLocator.h                       |   79 +-
 ext/common/SafeLibev.h                             |  157 +-
 ext/common/ServerInstanceDir.h                     |  146 +-
 ext/common/Session.h                               |  436 -
 ext/common/SpawnManager.h                          |  611 -
 ext/common/StaticString.h                          |   28 +-
 ext/common/StringListCreator.h                     |   83 -
 ext/common/UnionStation.h                          |  972 +
 ext/common/Utils.cpp                               |  305 +-
 ext/common/Utils.h                                 |   69 +-
 ext/common/Utils/AnsiColorConstants.h              |   36 +
 ext/common/{ => Utils}/BCrypt.cpp                  |    0
 ext/common/{ => Utils}/BCrypt.h                    |    0
 ext/common/Utils/BlockingQueue.h                   |    6 +-
 ext/common/{ => Utils}/Blowfish.c                  |    0
 ext/common/{ => Utils}/Blowfish.h                  |    0
 ext/common/Utils/CachedFileStat.cpp                |   21 +-
 ext/common/Utils/CachedFileStat.h                  |   18 +-
 ext/common/Utils/CachedFileStat.hpp                |   53 +-
 ext/common/Utils/Curl.h                            |  184 +
 ext/common/Utils/FileChangeChecker.h               |    6 +-
 ext/common/Utils/HashMap.h                         |   50 +
 ext/common/Utils/HttpConstants.h                   |  170 +
 ext/common/Utils/HttpHeaderBufferer.h              |    4 +-
 ext/common/Utils/IOUtils.cpp                       |  314 +-
 ext/common/Utils/IOUtils.h                         |  179 +-
 ext/common/Utils/IniFile.h                         |  520 +
 ext/common/Utils/LargeFiles.cpp                    |   38 +
 ext/common/Utils/LargeFiles.h                      |   40 +
 ext/common/Utils/Lock.h                            |   28 +
 ext/common/Utils/MD5.cpp                           |   35 +-
 ext/common/Utils/MD5.h                             |   21 +-
 ext/common/Utils/MemZeroGuard.h                    |    2 +-
 ext/common/Utils/MemoryBarrier.h                   |   52 +
 ext/common/Utils/MessageIO.h                       |    2 +-
 ext/common/Utils/MessagePassing.h                  |  304 +
 ext/common/Utils/PriorityQueue.h                   |   54 +
 ext/common/Utils/ProcessMetricsCollector.h         |   82 +-
 ext/common/Utils/ScopeGuard.h                      |   76 +-
 ext/common/Utils/SmallVector.h                     |  653 +
 ext/common/Utils/StrIntUtils.cpp                   |  156 +-
 ext/common/Utils/StrIntUtils.h                     |   72 +-
 ext/common/Utils/StringMap.h                       |  149 +-
 ext/common/Utils/SystemTime.cpp                    |    2 +-
 ext/common/Utils/SystemTime.h                      |    2 +-
 ext/common/Utils/Template.h                        |  212 +
 ext/common/Utils/Timer.h                           |   10 +-
 ext/common/Utils/VariantMap.h                      |  130 +-
 ext/common/Utils/fib.c                             |  699 +
 ext/common/Utils/fib.h                             |  101 +
 ext/common/Utils/fibpriv.h                         |   67 +
 ext/common/Utils/json-forwards.h                   |  249 +
 ext/common/Utils/json.h                            | 1855 ++
 ext/common/Utils/jsoncpp.cpp                       | 4230 ++++
 ext/common/Watchdog.cpp                            | 1120 -
 ext/common/agents/Base.cpp                         | 1580 ++
 ext/common/agents/Base.h                           |   43 +
 ext/common/agents/EnvPrinter.c                     |   16 +
 ext/common/agents/HelperAgent/AgentOptions.h       |   99 +
 ext/common/agents/HelperAgent/FileBackedPipe.h     |  732 +
 ext/common/agents/HelperAgent/Main.cpp             |  609 +
 ext/common/agents/HelperAgent/RequestHandler.cpp   |  283 +
 ext/common/agents/HelperAgent/RequestHandler.h     | 2293 ++
 ext/common/agents/HelperAgent/ScgiRequestParser.h  |  451 +
 ext/common/agents/LoggingAgent/AdminController.h   |   96 +
 ext/common/agents/LoggingAgent/DataStoreId.h       |  177 +
 ext/common/agents/LoggingAgent/FilterSupport.cpp   |   66 +
 ext/common/agents/LoggingAgent/FilterSupport.h     | 1611 ++
 ext/common/agents/LoggingAgent/LoggingServer.h     | 1191 +
 ext/common/agents/LoggingAgent/Main.cpp            |  359 +
 ext/common/agents/LoggingAgent/RemoteSender.h      |  560 +
 ext/common/agents/SpawnPreparer.cpp                |  192 +
 ext/common/agents/Watchdog/AgentWatcher.cpp        |  511 +
 ext/common/agents/Watchdog/HelperAgentWatcher.cpp  |   95 +
 ext/common/agents/Watchdog/LoggingAgentWatcher.cpp |   72 +
 ext/common/agents/Watchdog/Main.cpp                |  665 +
 .../agents/Watchdog/ServerInstanceDirToucher.cpp   |  116 +
 ext/google/COPYING                                 |   28 -
 ext/google/ChangeLog                               |  167 -
 ext/google/dense_hash_map                          |  310 -
 ext/google/dense_hash_set                          |  287 -
 ext/google/sparse_hash_map                         |  294 -
 ext/google/sparse_hash_set                         |  275 -
 ext/google/sparsehash/densehashtable.h             | 1062 -
 ext/google/sparsehash/sparseconfig.h               |   55 -
 ext/google/sparsehash/sparsehashtable.h            | 1015 -
 ext/google/sparsetable                             | 1468 --
 ext/google/type_traits.h                           |  250 -
 ext/libeio/Changes                                 |   76 +
 ext/libeio/LICENSE                                 |   36 +
 ext/libeio/Makefile.am                             |   15 +
 ext/libeio/Makefile.in                             |  694 +
 ext/libeio/aclocal.m4                              | 9418 +++++++
 ext/libeio/autogen.sh                              |    3 +
 ext/libeio/config.guess                            | 1540 ++
 ext/libeio/config.h.in                             |  136 +
 ext/libeio/config.sub                              | 1779 ++
 ext/libeio/configure                               |14822 +++++++++++
 ext/libeio/configure.ac                            |   22 +
 ext/libeio/demo.c                                  |  194 +
 ext/libeio/ecb.h                                   |  714 +
 ext/libeio/eio.c                                   | 2801 +++
 ext/libeio/eio.h                                   |  412 +
 ext/libeio/install-sh                              |  520 +
 ext/libeio/libeio.m4                               |  195 +
 ext/libeio/ltmain.sh                               | 9636 +++++++
 ext/libeio/missing                                 |  376 +
 ext/libeio/xthread.h                               |  166 +
 ext/libev/._LICENSE                                |  Bin 244 -> 0 bytes
 ext/libev/._README                                 |  Bin 244 -> 0 bytes
 ext/libev/._config.guess                           |  Bin 244 -> 0 bytes
 ext/libev/._config.sub                             |  Bin 244 -> 0 bytes
 ext/libev/._install-sh                             |  Bin 244 -> 0 bytes
 ext/libev/._missing                                |  Bin 244 -> 0 bytes
 ext/libev/._mkinstalldirs                          |  Bin 244 -> 0 bytes
 ext/libev/Changes                                  |  132 +-
 ext/libev/Makefile.am                              |    8 +-
 ext/libev/Makefile.in                              |  329 +-
 ext/libev/aclocal.m4                               |10646 ++++----
 ext/libev/autogen.sh                               |    5 +-
 ext/libev/config.guess                             |  594 +-
 ext/libev/config.h                                 |  122 -
 ext/libev/config.h.in                              |   18 +-
 ext/libev/config.sub                               |  275 +-
 ext/libev/configure                                |26244 +++++++-------------
 ext/libev/configure.ac                             |   17 +-
 ext/libev/depcomp                                  |  630 +
 ext/libev/ev++.h                                   |   80 +-
 ext/libev/ev.c                                     | 1564 +-
 ext/libev/ev.h                                     |  496 +-
 ext/libev/ev_epoll.c                               |   81 +-
 ext/libev/ev_kqueue.c                              |   38 +-
 ext/libev/ev_poll.c                                |   50 +-
 ext/libev/ev_port.c                                |   58 +-
 ext/libev/ev_select.c                              |   40 +-
 ext/libev/ev_vars.h                                |   33 +-
 ext/libev/ev_win32.c                               |   12 +-
 ext/libev/ev_wrap.h                                |   24 +-
 ext/libev/event.c                                  |   35 +-
 ext/libev/event.h                                  |   20 +-
 ext/libev/libev.m4                                 |   16 +-
 ext/libev/ltmain.sh                                |13164 +++++-----
 ext/nginx/Configuration.c                          |  438 +-
 ext/nginx/Configuration.h                          |   17 +-
 ext/nginx/ContentHandler.c                         |  374 +-
 ext/nginx/ContentHandler.h                         |   16 +-
 ext/nginx/HelperAgent.cpp                          | 1355 -
 ext/nginx/ScgiRequestParser.h                      |  375 -
 ext/nginx/config                                   |   41 +-
 ext/nginx/ngx_http_passenger_module.c              |  174 +-
 ext/nginx/ngx_http_passenger_module.h              |   23 +-
 ext/oxt/backtrace.cpp                              |  185 -
 ext/oxt/detail/backtrace_enabled.hpp               |  107 +-
 ext/oxt/detail/context.hpp                         |   90 +
 ext/oxt/detail/spin_lock_darwin.hpp                |    4 +
 ext/oxt/detail/spin_lock_gcc_x86.hpp               |    4 +
 ext/oxt/detail/spin_lock_pthreads.hpp              |   20 +-
 ext/oxt/detail/tracable_exception_enabled.hpp      |    4 +-
 ext/oxt/dynamic_thread_group.hpp                   |   42 +-
 ext/oxt/implementation.cpp                         |  415 +
 ext/oxt/initialize.hpp                             |   39 +
 ext/oxt/macros.hpp                                 |   69 +-
 ext/oxt/spin_lock.hpp                              |   19 +-
 ext/oxt/system_calls.cpp                           |  267 +-
 ext/oxt/system_calls.hpp                           |  130 +-
 ext/oxt/thread.cpp                                 |   32 -
 ext/oxt/thread.hpp                                 |  142 +-
 ext/oxt/tracable_exception.cpp                     |   89 -
 ext/ruby/extconf.rb                                |    5 +-
 ext/ruby/passenger_native_support.c                |  322 +-
 helper-scripts/backtrace-sanitizer.rb              |  116 +
 helper-scripts/classic-rails-loader.rb             |  137 +
 helper-scripts/classic-rails-preloader.rb          |  164 +
 helper-scripts/node-loader.js                      |  314 +
 helper-scripts/passenger-spawn-server              |  106 -
 helper-scripts/prespawn                            |    2 +-
 helper-scripts/rack-loader.rb                      |  106 +
 helper-scripts/rack-preloader.rb                   |  135 +
 helper-scripts/system-memory-stats.py              |  185 +
 helper-scripts/wsgi-loader.py                      |  264 +
 helper-scripts/wsgi-preloader.py                   |    1 +
 lib/phusion_passenger.rb                           |  244 +-
 lib/phusion_passenger/abstract_installer.rb        |  297 +-
 lib/phusion_passenger/abstract_request_handler.rb  |  760 -
 lib/phusion_passenger/abstract_server.rb           |  372 -
 .../abstract_server_collection.rb                  |  335 -
 lib/phusion_passenger/admin_tools.rb               |    2 +-
 lib/phusion_passenger/admin_tools/memory_stats.rb  |    6 +-
 .../admin_tools/server_instance.rb                 |  147 +-
 lib/phusion_passenger/analytics_logger.rb          |   23 +-
 lib/phusion_passenger/app_process.rb               |  174 -
 .../classic_rails/application_spawner.rb           |  344 -
 .../classic_rails/framework_spawner.rb             |  311 -
 .../classic_rails/request_handler.rb               |   75 -
 .../classic_rails/thread_handler_extension.rb      |   40 +
 .../analytics_logging/ac_base_extension.rb         |   67 -
 .../analytics_logging/ac_benchmarking_extension.rb |   48 -
 .../analytics_logging/ac_rescue_extension.rb       |   59 -
 .../ar_abstract_adapter_extension.rb               |   54 -
 .../analytics_logging/as_cache_extension.rb        |  130 -
 .../av_benchmark_helper_extension.rb               |   47 -
 .../classic_rails_extensions/init.rb               |  123 -
 lib/phusion_passenger/common_library.rb            |  451 +
 lib/phusion_passenger/console_text_template.rb     |   22 +-
 lib/phusion_passenger/constants.rb                 |   62 +-
 lib/phusion_passenger/debug_logging.rb             |   22 +-
 lib/phusion_passenger/dependencies.rb              |  627 -
 lib/phusion_passenger/exceptions.rb                |  103 -
 lib/phusion_passenger/html_template.rb             |  107 -
 lib/phusion_passenger/loader_shared_helpers.rb     |  323 +
 lib/phusion_passenger/message_channel.rb           |   52 +-
 lib/phusion_passenger/message_client.rb            |   43 +-
 lib/phusion_passenger/native_support.rb            |  112 +-
 lib/phusion_passenger/packaging.rb                 |   67 +-
 lib/phusion_passenger/platform_info.rb             |  254 +-
 lib/phusion_passenger/platform_info/apache.rb      |   22 +-
 .../platform_info/binary_compatibility.rb          |   92 +-
 lib/phusion_passenger/platform_info/compiler.rb    |  413 +-
 lib/phusion_passenger/platform_info/curl.rb        |    2 +-
 .../platform_info/cxx_portability.rb               |  143 +
 lib/phusion_passenger/platform_info/depcheck.rb    |  371 +
 .../platform_info/depcheck_specs/apache2.rb        |  124 +
 .../depcheck_specs/compiler_toolchain.rb           |   97 +
 .../platform_info/depcheck_specs/gems.rb           |   39 +
 .../platform_info/depcheck_specs/libs.rb           |  118 +
 .../platform_info/depcheck_specs/ruby.rb           |  137 +
 .../platform_info/depcheck_specs/utilities.rb      |   15 +
 lib/phusion_passenger/platform_info/linux.rb       |    2 +-
 .../platform_info/operating_system.rb              |   15 +-
 lib/phusion_passenger/platform_info/ruby.rb        |  141 +-
 lib/phusion_passenger/platform_info/zlib.rb        |    2 +-
 lib/phusion_passenger/plugin.rb                    |    4 +-
 lib/phusion_passenger/preloader_shared_helpers.rb  |  146 +
 lib/phusion_passenger/public_api.rb                |   15 +-
 lib/phusion_passenger/rack/application_spawner.rb  |  231 -
 lib/phusion_passenger/rack/out_of_band_gc.rb       |   63 +
 lib/phusion_passenger/rack/request_handler.rb      |  145 -
 .../rack/thread_handler_extension.rb               |  167 +
 lib/phusion_passenger/rails3_extensions/init.rb    |   32 +-
 lib/phusion_passenger/request_handler.rb           |  638 +
 .../request_handler/thread_handler.rb              |  403 +
 lib/phusion_passenger/ruby_core_enhancements.rb    |  185 +
 lib/phusion_passenger/simple_benchmarking.rb       |    2 +-
 lib/phusion_passenger/spawn_manager.rb             |  359 -
 lib/phusion_passenger/standalone/app_finder.rb     |    2 +-
 lib/phusion_passenger/standalone/command.rb        |   63 +-
 lib/phusion_passenger/standalone/config_file.rb    |    2 +-
 lib/phusion_passenger/standalone/help_command.rb   |    2 +-
 lib/phusion_passenger/standalone/main.rb           |   33 +-
 .../standalone/package_runtime_command.rb          |   38 +-
 .../standalone/runtime_installer.rb                |  294 +-
 lib/phusion_passenger/standalone/start_command.rb  |  277 +-
 lib/phusion_passenger/standalone/status_command.rb |    2 +-
 lib/phusion_passenger/standalone/stop_command.rb   |    2 +-
 lib/phusion_passenger/standalone/utils.rb          |   14 +-
 .../standalone/version_command.rb                  |    2 +-
 .../templates/apache2/config_snippets.txt.erb      |   13 -
 .../app_exited_during_initialization.html.erb      |   38 -
 .../templates/app_init_error.html.erb              |   64 -
 .../templates/database_error.html.erb              |   66 -
 lib/phusion_passenger/templates/error_layout.css   |   97 -
 .../templates/error_layout.html.erb                |   39 -
 .../templates/framework_init_error.html.erb        |   39 -
 .../templates/general_error.html.erb               |   22 -
 .../templates/load_error.html.erb                  |   46 -
 .../templates/standalone/config.erb                |   97 -
 .../templates/version_not_found.html.erb           |   34 -
 lib/phusion_passenger/utils.rb                     |  960 +-
 lib/phusion_passenger/utils/ansi_colors.rb         |   59 +
 lib/phusion_passenger/utils/file_system_watcher.rb |    4 +-
 lib/phusion_passenger/utils/hosts_file_parser.rb   |    4 +-
 lib/phusion_passenger/utils/rewindable_input.rb    |  125 -
 lib/phusion_passenger/utils/tee_input.rb           |  174 +
 lib/phusion_passenger/utils/tmpdir.rb              |    4 +-
 lib/phusion_passenger/utils/tmpio.rb               |   68 +
 lib/phusion_passenger/utils/unseekable_socket.rb   |   63 +-
 lib/phusion_passenger/wsgi/application_spawner.rb  |  108 -
 lib/phusion_passenger/wsgi/request_handler.py      |  199 -
 man/passenger-make-enterprisey.8                   |   23 -
 passenger.gemspec                                  |   26 +
 resources/mime.types                               |    6 +-
 .../standalone_default_root/index.html             |    0
 ...he_must_be_compiled_with_compatible_mpm.txt.erb |    0
 .../templates/apache2/config_snippets.txt.erb      |   13 +
 .../templates/apache2/deployment_example.txt.erb   |    0
 .../no_write_permission_to_passenger_root.txt.erb  |    0
 ...r_compilation_and_installation_problems.txt.erb |    0
 .../apache2/run_installer_as_root.txt.erb          |    0
 .../templates/apache2/welcome.txt.erb              |    0
 resources/templates/error_layout.css               |  103 +
 resources/templates/error_layout.html.template     |   93 +
 resources/templates/general_error.html.template    |    1 +
 .../general_error_with_html.html.template          |    1 +
 .../freebsd9_broken_cxx_runtime.txt.erb            |   19 +
 .../low_amount_of_memory_warning.txt.erb           |   22 +
 .../nginx/ask_for_extra_configure_flags.txt.erb    |    0
 .../templates/nginx/cannot_write_to_dir.txt.erb    |    0
 .../templates/nginx/config_snippets.txt.erb        |    0
 .../nginx/config_snippets_inserted.txt.erb         |    0
 .../nginx/confirm_extra_configure_flags.txt.erb    |    0
 .../templates/nginx/deployment_example.txt.erb     |    0
 .../pcre_checksum_could_not_be_verified.txt.erb    |   11 +
 .../nginx/pcre_could_not_be_downloaded.txt.erb     |    0
 .../nginx/pcre_could_not_be_extracted.txt.erb      |    0
 ...r_compilation_and_installation_problems.txt.erb |    0
 ...ns_for_download_and_extraction_problems.txt.erb |    0
 .../nginx/query_download_and_install.txt.erb       |    0
 .../templates/nginx/run_installer_as_root.txt.erb  |    0
 .../templates/nginx/welcome.txt.erb                |    0
 .../standalone/cannot_write_to_dir.txt.erb         |    0
 resources/templates/standalone/config.erb          |  120 +
 ...ns_for_download_and_extraction_problems.txt.erb |    0
 .../standalone/run_installer_as_root.txt.erb       |    0
 .../templates/standalone/welcome.txt.erb           |    0
 .../templates/undisclosed_error.html.template      |   25 +
 test/.rspec                                        |    3 +
 test/config.json.example                           |   42 +
 test/config.json.travis                            |   15 +
 test/config.yml.example                            |   41 -
 test/cxx/ApplicationPool2/DirectSpawnerTest.cpp    |  121 +
 test/cxx/ApplicationPool2/OptionsTest.cpp          |   44 +
 test/cxx/ApplicationPool2/PoolTest.cpp             | 1616 ++
 test/cxx/ApplicationPool2/ProcessTest.cpp          |  139 +
 test/cxx/ApplicationPool2/SmartSpawnerTest.cpp     |  248 +
 test/cxx/ApplicationPool2/SpawnerTestCases.cpp     |  785 +
 test/cxx/ApplicationPool_PoolTest.cpp              |   33 -
 test/cxx/ApplicationPool_PoolTestCases.cpp         | 1029 -
 test/cxx/ApplicationPool_ServerTest.cpp            |  308 -
 test/cxx/ApplicationPool_Server_PoolTest.cpp       |   80 -
 test/cxx/BufferedIOTest.cpp                        |   22 +-
 test/cxx/CxxTestMain.cpp                           |  120 +-
 test/cxx/EventedBufferedInputTest.cpp              |  758 +
 test/cxx/EventedClientTest.cpp                     |   36 +-
 test/cxx/FileBackedPipeTest.cpp                    |  626 +
 test/cxx/FileChangeCheckerTest.cpp                 |   38 +-
 test/cxx/FilterSupportTest.cpp                     |   12 +-
 test/cxx/IOUtilsTest.cpp                           |   43 +-
 test/cxx/LoggingTest.cpp                           |  777 -
 test/cxx/MessageChannelTest.cpp                    |  557 -
 test/cxx/MessageIOTest.cpp                         |   18 +-
 test/cxx/MessagePassingTest.cpp                    |   81 +
 test/cxx/MessageReadersWritersTest.cpp             |    9 +-
 test/cxx/MessageServerTest.cpp                     |   61 +-
 test/cxx/PoolOptionsTest.cpp                       |  116 -
 test/cxx/RequestHandlerTest.cpp                    |  856 +
 test/cxx/ScgiRequestParserTest.cpp                 |   52 +-
 test/cxx/ServerInstanceDirTest.cpp                 |   53 +-
 test/cxx/SpawnManagerTest.cpp                      |  161 -
 test/cxx/StringMapTest.cpp                         |   61 +
 test/cxx/TemplateTest.cpp                          |  118 +
 test/cxx/TestSupport.cpp                           |   96 +-
 test/cxx/TestSupport.h                             |  128 +-
 test/cxx/UnionStationTest.cpp                      |  745 +
 test/cxx/UtilsTest.cpp                             |  160 +-
 test/cxx/VariantMapTest.cpp                        |   34 +-
 test/gdbinit.example                               |   31 +
 test/integration_tests/apache2_tests.rb            |  220 +-
 test/integration_tests/hello_world_wsgi_spec.rb    |    4 +-
 test/integration_tests/mycook_spec.rb              |    2 +-
 test/integration_tests/native_packaging_spec.rb    |  170 +
 test/integration_tests/nginx_tests.rb              |  102 +-
 test/integration_tests/spec_helper.rb              |   13 +-
 test/oxt/oxt_test_main.cpp                         |    2 +
 test/oxt/syscall_interruption_test.cpp             |    1 +
 test/ruby/abstract_request_handler_spec.rb         |  406 -
 test/ruby/abstract_server_collection_spec.rb       |  247 -
 test/ruby/abstract_server_spec.rb                  |   61 -
 test/ruby/admin_tools_spec.rb                      |   30 +-
 test/ruby/analytics_logger_spec.rb                 |   30 +-
 test/ruby/app_process_spec.rb                      |   43 -
 .../ruby/classic_rails/application_spawner_spec.rb |   89 -
 test/ruby/classic_rails/framework_spawner_spec.rb  |   92 -
 test/ruby/classic_rails/loader_spec.rb             |   47 +
 test/ruby/classic_rails/preloader_spec.rb          |   53 +
 test/ruby/rack/application_spawner_spec.rb         |  116 -
 test/ruby/rack/loader_spec.rb                      |   42 +
 test/ruby/rack/preloader_spec.rb                   |   48 +
 test/ruby/rails3.0/loader_spec.rb                  |   26 +
 test/ruby/rails3.0/preloader_spec.rb               |   32 +
 test/ruby/rails3.1/loader_spec.rb                  |   26 +
 test/ruby/rails3.1/preloader_spec.rb               |   32 +
 test/ruby/rails3.2/loader_spec.rb                  |   26 +
 test/ruby/rails3.2/preloader_spec.rb               |   32 +
 test/ruby/request_handler_spec.rb                  |  667 +
 test/ruby/shared/abstract_server_spec.rb           |   23 -
 test/ruby/shared/loader_sharedspec.rb              |  246 +
 .../analytics_logging_extensions_sharedspec.rb     |  333 +
 .../rails/analytics_logging_extensions_spec.rb     |  375 -
 test/ruby/shared/ruby_loader_sharedspec.rb         |   55 +
 .../classic_rails/framework_spawner_spec.rb        |   38 -
 .../lack_of_rails_gem_version_spec.rb              |   19 -
 .../shared/spawners/classic_rails/spawner_spec.rb  |   15 -
 .../shared/spawners/non_preloading_spawner_spec.rb |   27 -
 .../shared/spawners/preloading_spawner_spec.rb     |   29 -
 test/ruby/shared/spawners/reload_all_spec.rb       |   36 -
 test/ruby/shared/spawners/reload_single_spec.rb    |   52 -
 test/ruby/shared/spawners/spawn_server_spec.rb     |   28 -
 test/ruby/shared/spawners/spawner_spec.rb          |  273 -
 test/ruby/shared/utils/pseudo_io_spec.rb           |   60 -
 test/ruby/spawn_manager_spec.rb                    |  134 -
 test/ruby/spec_helper.rb                           |  131 +-
 test/ruby/utils/file_system_watcher_spec.rb        |   10 +-
 test/ruby/utils_spec.rb                            |  693 +-
 test/ruby/wsgi/application_spawner_spec.rb         |   50 -
 test/stub/apache2/httpd.conf.erb                   |    4 +-
 test/stub/message_channel.rb                       |   11 -
 test/stub/message_channel_2.rb                     |   12 -
 test/stub/message_channel_3.rb                     |   19 -
 test/stub/nginx/nginx.conf.erb                     |    3 +
 test/stub/rack/config.ru                           |   31 +-
 test/stub/rack/start.rb                            |   52 +
 .../{rails_apps/2.3/foobar => rails2.3}/Rakefile   |    0
 .../app/controllers/application_controller.rb      |   10 +
 .../app/controllers/bar_controller_1.rb            |    0
 .../app/controllers/bar_controller_2.rb            |    0
 .../app/controllers/foo_controller.rb              |    0
 .../app/helpers/application_helper.rb              |    0
 test/stub/rails2.3/app/helpers/bar_helper.rb       |    2 +
 test/stub/rails2.3/app/helpers/foo_helper.rb       |    2 +
 .../2.3/foobar => rails2.3}/config/boot.rb         |    0
 test/stub/rails2.3/config/database.yml             |   19 +
 test/stub/rails2.3/config/environment.rb           |   62 +
 .../config/environments/development.rb             |    0
 .../config/environments/production.rb              |    0
 .../config/environments/staging.rb                 |    0
 .../config/initializers/inflections.rb             |    0
 .../config/initializers/mime_types.rb              |    0
 test/stub/rails2.3/config/routes.rb                |   36 +
 .../2.3/foobar => rails2.3}/script/about           |    0
 .../2.3/foobar => rails2.3}/script/console         |    0
 .../2.3/foobar => rails2.3}/script/dbconsole       |    0
 .../2.3/foobar => rails2.3}/script/destroy         |    0
 .../2.3/foobar => rails2.3}/script/generate        |    0
 .../script/performance/benchmarker                 |    0
 .../script/performance/profiler                    |    0
 .../foobar => rails2.3}/script/performance/request |    0
 .../2.3/foobar => rails2.3}/script/plugin          |    0
 .../foobar => rails2.3}/script/process/inspector   |    0
 .../2.3/foobar => rails2.3}/script/process/reaper  |    0
 .../2.3/foobar => rails2.3}/script/process/spawner |    0
 .../2.3/foobar => rails2.3}/script/runner          |    0
 .../2.3/foobar => rails2.3}/script/server          |    0
 .../{rails_apps/3.0/empty => rails3.0}/Gemfile     |    0
 test/stub/rails3.0/Gemfile.lock                    |   80 +
 .../{rails_apps/3.0/empty => rails3.0}/Rakefile    |    0
 .../app/controllers/application_controller.rb      |    0
 .../app/helpers/application_helper.rb              |    0
 .../app/views/layouts/application.html.erb         |    0
 .../{rails_apps/3.0/empty => rails3.0}/config.ru   |    0
 .../3.0/empty => rails3.0}/config/application.rb   |    0
 .../3.0/empty => rails3.0}/config/boot.rb          |    0
 .../3.0/empty => rails3.0}/config/database.yml     |    0
 .../3.0/empty => rails3.0}/config/environment.rb   |    0
 .../config/environments/development.rb             |    0
 .../rails3.0/config/environments/production.rb     |   48 +
 .../empty => rails3.0}/config/environments/test.rb |    0
 .../config/initializers/backtrace_silencers.rb     |    0
 .../config/initializers/inflections.rb             |    0
 .../config/initializers/mime_types.rb              |    0
 .../config/initializers/passenger.rb               |    0
 .../config/initializers/secret_token.rb            |    0
 .../config/initializers/session_store.rb           |    0
 .../3.0/empty => rails3.0}/config/locales/en.yml   |    0
 .../3.0/empty => rails3.0}/config/routes.rb        |    0
 .../{rails_apps/3.0/empty => rails3.0}/db/seeds.rb |    0
 .../3.0/empty => rails3.0}/doc/README_FOR_APP      |    0
 .../3.0/empty => rails3.0}/public/404.html         |    0
 .../3.0/empty => rails3.0}/public/422.html         |    0
 .../3.0/empty => rails3.0}/public/500.html         |    0
 .../3.0/empty => rails3.0}/public/favicon.ico      |    0
 .../3.0/empty => rails3.0}/public/index.html       |    0
 .../3.0/empty => rails3.0}/public/robots.txt       |    0
 .../3.0/empty => rails3.0}/script/rails            |    0
 .../test/performance/browsing_test.rb              |    0
 .../3.0/empty => rails3.0}/test/test_helper.rb     |    0
 test/stub/rails3.1/Gemfile                         |   37 +
 test/stub/rails3.1/Gemfile.lock                    |  115 +
 test/stub/rails3.1/README                          |  261 +
 test/stub/rails3.1/Rakefile                        |    7 +
 test/stub/rails3.1/app/assets/images/rails.png     |  Bin 0 -> 6646 bytes
 .../app/assets/stylesheets/application.css         |    7 +
 .../app/controllers/application_controller.rb      |    3 +
 .../app/helpers/application_helper.rb              |    0
 .../app/views/layouts/application.html.erb         |   14 +
 .../{rails_apps/3.0/empty => rails3.1}/config.ru   |    0
 test/stub/rails3.1/config/application.rb           |   48 +
 test/stub/rails3.1/config/boot.rb                  |    6 +
 test/stub/rails3.1/config/database.yml             |   25 +
 .../3.0/empty => rails3.1}/config/environment.rb   |    0
 .../rails3.1/config/environments/development.rb    |   30 +
 .../rails3.1/config/environments/production.rb     |   60 +
 test/stub/rails3.1/config/environments/test.rb     |   39 +
 .../config/initializers/backtrace_silencers.rb     |    0
 .../rails3.1/config/initializers/inflections.rb    |   10 +
 .../config/initializers/mime_types.rb              |    0
 .../config/initializers/passenger.rb               |    0
 .../rails3.1/config/initializers/secret_token.rb   |    7 +
 .../rails3.1/config/initializers/session_store.rb  |    8 +
 .../config/initializers/wrap_parameters.rb         |   14 +
 test/stub/rails3.1/config/locales/en.yml           |    5 +
 test/stub/rails3.1/config/routes.rb                |   58 +
 test/stub/rails3.1/db/seeds.rb                     |    7 +
 .../3.0/empty => rails3.1}/doc/README_FOR_APP      |    0
 .../3.0/empty => rails3.1}/public/404.html         |    0
 .../3.0/empty => rails3.1}/public/422.html         |    0
 .../3.0/empty => rails3.1}/public/500.html         |    0
 .../3.0/empty => rails3.1}/public/favicon.ico      |    0
 test/stub/rails3.1/public/index.html               |  241 +
 .../3.0/empty => rails3.1}/public/robots.txt       |    0
 test/stub/rails3.1/script/rails                    |    6 +
 .../rails3.1/test/performance/browsing_test.rb     |   12 +
 .../3.0/empty => rails3.1}/test/test_helper.rb     |    0
 test/stub/rails3.2/Gemfile                         |   39 +
 test/stub/rails3.2/Gemfile.lock                    |  113 +
 test/stub/rails3.2/Rakefile                        |    7 +
 test/stub/rails3.2/app/assets/images/rails.png     |  Bin 0 -> 6646 bytes
 .../app/assets/stylesheets/application.css         |   13 +
 .../app/controllers/application_controller.rb      |    3 +
 .../app/helpers/application_helper.rb              |    0
 .../app/views/layouts/application.html.erb         |   14 +
 .../{rails_apps/3.0/empty => rails3.2}/config.ru   |    0
 test/stub/rails3.2/config/application.rb           |   62 +
 test/stub/rails3.2/config/boot.rb                  |    6 +
 test/stub/rails3.2/config/database.yml             |   25 +
 .../3.0/empty => rails3.2}/config/environment.rb   |    0
 .../rails3.2/config/environments/development.rb    |   37 +
 .../rails3.2/config/environments/production.rb     |   67 +
 test/stub/rails3.2/config/environments/test.rb     |   37 +
 .../config/initializers/backtrace_silencers.rb     |    0
 .../rails3.2/config/initializers/inflections.rb    |   15 +
 .../config/initializers/mime_types.rb              |    0
 .../config/initializers/passenger.rb               |    0
 .../rails3.2/config/initializers/secret_token.rb   |    7 +
 .../rails3.2/config/initializers/session_store.rb  |    8 +
 .../config/initializers/wrap_parameters.rb         |   14 +
 test/stub/rails3.2/config/locales/en.yml           |    5 +
 test/stub/rails3.2/config/routes.rb                |   58 +
 test/stub/rails3.2/db/seeds.rb                     |    7 +
 .../3.0/empty => rails3.2}/doc/README_FOR_APP      |    0
 .../3.0/empty => rails3.2}/public/404.html         |    0
 .../3.0/empty => rails3.2}/public/422.html         |    0
 test/stub/rails3.2/public/500.html                 |   25 +
 .../3.0/empty => rails3.2}/public/favicon.ico      |    0
 test/stub/rails3.2/public/index.html               |  241 +
 .../3.0/empty => rails3.2}/public/robots.txt       |    0
 test/stub/rails3.2/script/rails                    |    6 +
 .../rails3.2/test/performance/browsing_test.rb     |   12 +
 .../3.0/empty => rails3.2}/test/test_helper.rb     |    0
 .../app/controllers/application_controller.rb      |   12 -
 .../stub/rails_apps/2.3/foobar/config/database.yml |   19 -
 .../rails_apps/2.3/foobar/config/environment.rb    |   59 -
 test/stub/rails_apps/2.3/foobar/config/routes.rb   |   35 -
 .../mycook/app/controllers/welcome_controller.rb   |    2 +-
 .../2.3/mycook/app/helpers/recipes_helper.rb       |    2 +
 .../2.3/mycook/app/helpers/test_helper.rb          |    2 +
 .../2.3/mycook/app/helpers/uploads_helper.rb       |    2 +
 .../2.3/mycook/app/helpers/welcome_helper.rb       |    2 +
 .../2.3/mycook/public/javascripts/builder.js       |    1 -
 .../2.3/mycook/public/javascripts/controls.js      |    1 -
 .../2.3/mycook/public/javascripts/dragdrop.js      |    1 -
 .../2.3/mycook/public/javascripts/effects.js       |    1 -
 .../2.3/mycook/public/javascripts/prototype.js     |    1 -
 .../2.3/mycook/public/javascripts/scriptaculous.js |    1 -
 .../2.3/mycook/public/javascripts/slider.js        |    1 -
 .../2.3/mycook/public/javascripts/sound.js         |    1 -
 .../2.3/mycook/public/javascripts/unittest.js      |    1 -
 test/stub/rails_apps/3.0/empty/Gemfile.lock        |   73 -
 .../3.0/empty/config/environments/production.rb    |   48 -
 test/stub/spawn_server.rb                          |   22 -
 test/stub/start_error.pl                           |   24 +
 test/stub/wsgi/passenger_wsgi.py                   |   83 +-
 test/stub/wsgi/passenger_wsgi.pyc                  |  Bin 439 -> 0 bytes
 test/support/apache2_controller.rb                 |    4 +-
 test/support/nginx_controller.rb                   |    3 +-
 test/support/placebo-preloader.rb                  |   88 +
 test/support/test_helper.rb                        |   30 +-
 test/support/valgrind.h                            | 2539 ++
 test/tut/tut.h                                     |   84 +-
 2678 files changed, 337744 insertions(+), 81557 deletions(-)

diff --git a/._INSTALL b/._INSTALL
deleted file mode 100644
index 24d4842..0000000
Binary files a/._INSTALL and /dev/null differ
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..753c2bb
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,15 @@
+language: ruby
+
+env:
+  - TEST_CXX=1
+  - TEST_CXX=1 SUDO=1
+  - TEST_RUBY=1 TEST_RUBY_VERSION=1.8.7 TEST_CLASSIC_RAILS=0
+  - TEST_RUBY=1 TEST_RUBY_VERSION=1.9.3 TEST_CLASSIC_RAILS=0
+  - TEST_NGINX=1 TEST_RUBYGEMS_VERSION=1.8.25
+  - TEST_APACHE2=1 TEST_RUBYGEMS_VERSION=1.8.25
+  - TEST_DEBIAN_PACKAGING=1 TEST_RUBYGEMS_VERSION=1.8.25
+
+before_install:
+  - cp test/config.json.travis test/config.json
+
+script: ./dev/run_travis.sh
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..5f698be
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,302 @@
+# Contributing to Phusion Passenger
+
+Thank you for your interest in Phusion Passenger. Phusion Passenger is open source so your contributions are very welcome. Although we also provide a [commercial version](https://www.phusionpassenger.com/enterprise) and [commercial support](https://www.phusionpassenger.com/commercial_support), the core remains open source and we remain committed to keep it that way. This guide gives you an overview of the ways with which you can contribute, as well as contribution guidelines.
+
+You can contribute in one of the following areas:
+
+ * Documentation (user documentation, developer documentation, contributor documentation).
+ * Bug triage.
+ * Community support.
+ * Code.
+
+We require contributors to sign our [contributor agreement](http://www.phusion.nl/forms/contributor_agreement) before we can merge their patches.
+
+Please submit patches in the form of a Github pull request or as a patch on the [bug tracker](http://code.google.com/p/phusion-passenger/issues/list). Pull requests are preferred and generally get more attention because Github has better email notifications and better discussion capabilities.
+
+You should also install required developer tools. The following command will install everything you need:
+
+    rake test:install_deps
+
+If your system requires gems to be installed with root privileges, run:
+
+    rake test:install_deps SUDO=1
+
+## Contributing documentation
+
+All good software should have good documentation, and we take this very seriously. However writing and maintaing quality documentation is not an easy task. If you are not skilled in C++ or programming, then writing documentation is the easiest way to contribute.
+
+Most documentation can be located in the `doc` directory, and are either written in Markdown or in Asciidoc format. They can be compiled to HTML with `rake doc`. You need [Mizuho](https://github.com/FooBarWidget/mizuho) to compile Asciidoc and [BlueCloth](http://deveiate.org/projects/BlueCloth) to compile Markdown. Both gems are automatically installed as part of the Phusion Passenger developer tools.
+
+## Contributing by bug triaging
+
+Users [fill bug reports](http://code.google.com/p/phusion-passenger/issues/list) on a regular basis, but not all bug reports are legit, not all bug reports are equally important, etc. By helping with bug triaging you make the lives of the core developers a lot easier.
+
+To start contributing, please submit a comment on any bug report that needs triaging. This comment should contain triaging instructions, e.g. whether a report should be considered duplicate. If you contribute regularly we'll give you moderator access to the bug tracker so that you can apply triaging labels directly.
+
+Here are some of the things that you should look for:
+
+ * Some reports are duplicates of each other, i.e. they report the same issue. You should mark them as duplicate and note the ID of the original report.
+ * Some reported problems are caused by the reporter's machine or the reporter's application. You should explain to them what the problem actually is, that it's not caused by Phusion Passenger, and then close the report.
+ * Some reports need more information. At the very least, we need specific instructions on how to reproduce the problem. You should ask the reporter to provide more information. Some reporters reply slowly or not at all. If some time has passed, you should remind the reporter about the request for more information. But if too much time has passed and the issue cannot be reproduced, you should close the report and mark it as "Stale".
+ * Some bug reports seem to be limited to one reporter, and it does not seem that other people suffer from the same problem. These are reports that need _confirmation_. You can help by trying to reproduce the problem and confirming the existance of the problem.
+ * Some reports are important, but have been neglected for too long. Although the core developers try to minimize the number of times this happens, sometimes it happens anyway because they're so busy. You should actively ping the core developers and remind them about it. Or better: try to actively find contributors who can help solving the issue.
+
+**Always be polite to bug reporters.** Not all reporters are fluent in English, and not everybody may be tech-savvy. But we ask you for your patience and tolerance on this. We want to stimulate a positive and ejoyable environment.
+
+## Contributing community support
+
+You can contribute by answering support questions on the [community discussion forum](http://groups.google.com/group/phusion-passenger) or on [Stack Overflow](http://stackoverflow.com/search?q=passenger).
+
+## Contributing code
+
+Phusion Passenger is mostly written in C++, but the build system and various small helper scripts are in Ruby. The loaders for each supported language is written in the respective language.
+
+The source code is filled with inline comments, so look there if you want to understand how things work. We also have dedicated documents on some topics and for some subsystems. Some interesting documents are:
+
+ * ext/common/ApplicationPool2/README.md - If you're interesting in the ApplicationPool and Spawner subsystems.
+ * doc/DebuggingAndStressTesting.md
+
+### Compilation and build system
+
+`passenger-install-apache2-module` and `passenger-install-nginx-module` are actually user-friendly wrappers around the build system. The build system is written in Rake, and most of it can be found in the `build/` directory.
+
+Run the following command to compile everything:
+
+    rake apache2
+    rake nginx
+
+It is recommended that you install ccache and set the `USE_CCACHE=1` environment variable. The build system will then automatically wrap all compiler calls in ccache, significantly improving recompilation times.
+
+### Running the unit tests
+
+The tests depend on the Phusion Passenger developer tools. Make sure they're installed:
+
+    rake test:install_deps
+
+You also need to setup the file `test/config.json`. You can find an example in `test/config.json.example`.
+
+Run all tests:
+
+    rake test
+
+Run only the unit tests for the C++ components:
+
+    rake test:cxx
+    rake test:oxt
+
+The `test:cxx` unit test suite contains many different test groups. You can run a specific one by setting the environment variable `GROUPS` to a comma-delimited list of group names, e.g.:
+
+    rake test:cxx GROUPS='ApplicationPool2_PoolTest,UtilsTest'
+
+You can also run just a single test within a suite. Pass the relevant test number like this:
+
+    rake test:cxx GROUPS='ApplicationPool2_PoolTest:82'
+
+You can also run the C++ tests in GDB or Valgrind. We have a useful GDB config file in `test/gdbinit.example`. You should copy it to `test/.gdbinit` and edit it.
+
+    rake test:cxx GDB=1
+    rake test:cxx VALGRIND=1
+
+Run just the unit tests for the Ruby components:
+
+    rake test:ruby
+
+Run just the integration tests:
+
+    rake test:integration            # All integration tests.
+    rake test:integration:apache2    # Just integration tests for Apache 2.
+    rake test:integration:nginx      # Just integration tests for Nginx.
+
+Note that some tests, such as the ones that test privilege lowering, require root privileges. Those will only be run if Rake is run as root.
+
+### Directory structure
+
+The most important directories are:
+
+ * `lib/phusion_passenger` <br>
+   The source code for Ruby parts of Phusion Passenger.
+ * `ext/ruby` <br>
+   Native extension for Ruby. Phusion Passenger uses the functions in this extension for optimizing certain operations, but Phusion Passenger can also function without this extension.
+ * `ext/apache2` <br>
+   Apache 2-specific source code.
+ * `ext/nginx` <br>
+   Nginx-specific source code.
+ * `ext/common` <br>
+   Source code shared by the Apache and Nginx modules.
+ * `ext/common/agents` <br>
+   Source code of the Phusion agent executables, i.e. PassengerWatchdog, PassengerHelperAgent and PassengerLoggingAgent.
+   * PassengerWatchdog is is the main Phusion Passenger control process, starts PassengerHelperAgent and PassengerLoggingAgent, and restarts them when they crash. It also cleans everything up upon shut down.
+   * PassengerHelperAgent performs most of the heavy lifting. It parses requests, spawns application processes, forwards requests to the correct process and forwards application responses back to the web server.
+   * PassengerLoggingAgent processes Union Station data and sends them to the Union Station server.
+ * `bin` <br>
+   User executables.
+ * `helper-scripts` <br>
+   Scripts used during runtime, but not directly executed by the user. All the loaders - applications which are responsible for loading an application written in a certain language and hooking it up to Phusion Passenger - are in this directory.
+ * `doc` <br>
+   Various documentation.
+ * `test` <br>
+   Unit tests and integration tests.
+ * `test/support` <br>
+   Support/utility code, used in the tests.
+ * `test/stub` <br>
+   Stubbing and mocking code, used in the tests.
+
+Less important directories:
+
+ * `ext/boost` <br>
+   A stripped-down and customized version of the [Boost C++ library](http://www.boost.org).
+ * `ext/oxt` <br>
+   The "OS eXtensions for boosT" library, which provides various important functionality necessary for writing robust server software. It provides things like support for interruptable system calls and portable backtraces for C++. Boost was modified to make use of the functionality provided by OXT.
+ * `dev` <br>
+   Tools for Phusion Passenger developers. Not used during production.
+ * `resources` <br>
+   Various non-executable resource files, used during production.
+ * `debian` <br>
+   Debian packaging files.
+ * `rpm` <br>
+   RPM packaging files.
+ * `man` <br>
+   Man pages.
+ * `build` <br>
+   Source code of the build system.
+
+### C++ coding style
+
+ * Use 4-space tabs for indentation.
+ * Wrap at approximately 80 characters. This is a recommendation, not a hard guideline. You can exceed it if you think it makes things more readable, but try to minimize it.
+
+ * Use camelCasing for function names, variables, class/struct members and parameters:
+
+        void frobnicate();
+        void deleteFile(const char *filename, bool syncHardDisk);
+        int fooBar;
+
+   Use PascalCasing for classes, structs and namespaces:
+
+        class ApplicationPool {
+        struct HashFunction {
+        namespace Passenger {
+
+ * `if` and `while` statements must always have their body enclosed by brackets:
+
+        if (foo) {
+            ...
+        }
+
+   Not:
+
+        if (foo)
+            ...
+
+ * When it comes to `if`, `while`, `class` and other keywords, put a space before and after the opening and closing parentheses:
+
+        if (foo) {
+        while (foo) {
+        case (foo) {
+
+   Not:
+
+        if(foo){
+        while (foo) {
+
+ * You should generally put brackets on the same line as the statement:
+
+        if (foo) {
+            ...
+        }
+        while (bar) {
+            ...
+        }
+
+   However, if the main statement is so long that it does not fit on a single line, then the bracket should start at the next line:
+
+        if (very very long expression
+         && another very very long expression)
+        {
+            ...
+        }
+
+ * Do not put a space before the opening parenthesis when calling functions.
+
+        foo(1, 2, 3);
+
+   Not:
+
+        foo (1, 2, 3);
+
+ * Seperate arguments and parts of expressions by spaces:
+
+        foo(1, 2, foo == bar, 5 + 6);
+        if (foo && bar) {
+
+   Not:
+
+        foo(1,2, foo==bar,5+6);
+        if (foo&&bar) {
+
+ * When declaring functions, puts as much on the same line as possible:
+
+        void foo(int x, int y);
+
+   When the declaration becomes too long, wrap at the beginning of an argument
+   and indent with a tab:
+
+        void aLongMethod(double longArgument, double longArgument2,
+            double longArgument3);
+
+   If the declaration already starts at a large indentation level (e.g. in a class) and the function has many arguments, or if the names are all very long, then it may be a good idea to wrap at each argument to make the declaration more readable:
+
+        class Foo {
+            void aLongLongLongLongMethod(shared_ptr<Foo> sharedFooInstance,
+                shared_ptr<BarFactory> myBarFactory,
+                GenerationDir::Entry directoryEntry);
+
+ * When defining functions outside class declarations, put the return type and any function attributes on a different line than the function name. Put the opening bracket on the same line as the function name.
+
+        static __attribute__((visibility("hidden"))) void
+        foo() {
+            ...
+        }
+
+        void
+        Group::onSessionClose() {
+            ...
+        }
+
+   But don't do that if the function is part of a class declarations:
+
+        class Foo {
+            void foo() {
+                ...
+            }
+        };
+
+   Other than the aforementioned rules, function definitions follow the same rules as function declarations.
+
+### Ruby coding style
+
+The usual Ruby coding style applies, with some exceptions:
+
+ * Use 4-space tabs for indentation.
+ * Return values explicitly with `return`.
+
+### Prefer shared_ptrs
+
+You should prefer `shared_ptr`s over raw pointers because they make memory leaks and memory errors less likely. There are only very limited cases in which raw pointers are justified, e.g. optimizations in very hot code paths.
+
+### Event loop callbacks
+
+Be careful with event loop callbacks, they are more tricky than one would expect.
+
+ * If your event loop callback ever calls user-defined functions, either explicitly or implicitly, you should obtain a `shared_ptr` to your `this` object. This is because the user-defined function could call something that would free your object. Your class should derive from `boost::enable_shared_from_this` to make it easy for you to obtain a `shared_ptr` to yourself.
+
+        void callback(ev::io &io, int revents) {
+            shared_ptr<Foo> self = shared_from_this();
+            ...
+        }
+
+ * Event loop callbacks should catch expected exceptions. Letting an exception pass will crash the program. When system call failure simulation is turned on, the code can throw arbitrary SystemExceptions, so beware of those.
+
+### Thread interruption and RAII destructors
+
+When using thread interruption, make sure that RAII destructors are non-interruptable. If your code is interrupted and then a `thread_interrupted` is thrown, make sure that RAII destructors don't check for the interruption flag and then throw `thread_interrupted` again. This not only fails to clean things up properly, but also confuses the exception system, resulting in strange errors such as "terminate called without an active exception".
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
new file mode 100644
index 0000000..deb96a4
--- /dev/null
+++ b/CONTRIBUTORS
@@ -0,0 +1,69 @@
+_why
+Adam Duke
+Alex Osborne
+Alex Tomlins
+Aman Gupta
+Andre Ferraz
+Andre Nathan
+Andy Allan
+Benjamin Fleischer
+Bernd Ahlers
+Chad Fowler
+Christoffer Sawicki
+Damien Le Berrigaud
+Dan Peterson
+Danial Pearce
+Dave Parfitt
+David Sissitka
+Dirk Mueller
+Dmitry Galinsky
+Dylan Vaughn
+Erik Ogan
+Evan Phoenix
+Gaspard Bucher
+Goffert van Gool
+Gokulnath Manakkattil
+Gregory Potamianos
+Hongli Lai (Phusion)
+Ian Ehlert
+isaac
+Isaac Reuben
+J.W. Koelewijn
+Jacob Harris
+James Miller
+Jan Berkel
+Jason Cannon
+jastix
+Jay Freeman (saurik)
+John Dewey
+John Leach
+Joshua Lund
+jpatterson
+Jude Nagurney
+Luuk Hendriks (Phusion)
+Magnus Holm
+Michal Papis
+Michał Pokrywka
+Mike
+Mike Boone
+Morton Jonuschat
+Nathaniel Bibler
+Neil Wilson
+Ninh Bui (Phusion)
+Pat Downey
+Paul Kmiec
+Perry Smith
+Philip M. Gollucci
+Redmar Kerkhoff
+remi
+Robin Bowes
+Ryan Schwartz
+Ryo Onodera
+Saimon Moore
+Sam Pohlenz
+Sebastian Delmont
+Slippy Douglas
+Tim Carey-Smith
+Tinco Andringa (Phusion)
+W. Andrew Loe III
+Weyert de Boer
diff --git a/DEVELOPERS.TXT b/DEVELOPERS.TXT
deleted file mode 100644
index 1d7a5ac..0000000
--- a/DEVELOPERS.TXT
+++ /dev/null
@@ -1,114 +0,0 @@
-= Developers information
-
-== Required software
-
-The tests need the following software installed:
-
-* All the usual Phusion Passenger dependencies.
-* Ruby on Rails 1.2.x
-* Ruby on Rails 2.0.x
-* Ruby on Rails 2.2.x
-* Ruby on Rails 2.3.x
-* Ruby on Rails 3.0.x
-* rspec >= 1.1.2
-* mime-types >= 1.15
-* sqlite3-ruby
-* daemon_controller >= 1.0.0
-
-The following software is optional:
-
-* RCov, for code coverage
-* RDoc, for generating HTML Ruby API documentation
-* Doxygen, for generating HTML C++ API documentation
-* dot (part of Graphviz), for generating diagrams in HTML API documentation
-* The font "Bitstream Vera Sans", used in the class diagrams. See http://www.gnome.org/fonts
-* AsciiDoc >= 8.2.5, for converting various doc/*.txt documents to HTML
-
-== Compiling Phusion Passenger
-
-Run the following command to compile everything:
-
- rake apache
- rake nginx
-
-== Directory structure
-
-The most important directories are:
-[ lib/phusion_passenger ]
-  The source code for the spawn server, which is written in Ruby.
-[ ext/phusion_passenger ]
-  Native extensions for Ruby, used by the spawn server.
-[ ext/apache2 ]
-  Apache 2-specific source code.
-[ ext/nginx ]
-  Nginx-specific source code.
-[ ext/common ]
-  Source code shared by the Apache and Nginx modules.
-[ bin ]
-  User executables.
-[ helper-scripts ]
-  Scripts used during runtime, but not directly executed by the user.
-[ doc ]
-  Various documentation.
-[ test ]
-  Unit tests and integration tests.
-[ test/support ]
-  Support/utility code, used in the tests.
-[ test/stub ]
-  Stub code, used in the tests.
-
-Less important directories:
-[ ext/boost ]
-  A stripped-down and customized version of the Boost C++ library
-  (www.boost.org).
-[ ext/oxt ]
-  The "OS eXtensions for boosT" library, which provides various important
-  functionality necessary for writing robust server software. It provides
-  things like support for interruptable system calls and portable backtraces
-  for C++. Boost was modified to make use of the functionality provided by OXT.
-[ dev ]
-  Tools for Phusion Passenger developers. Not used during production.
-[ resources ]
-  Various resource files, used during production.
-[ debian ]
-  Debian packaging files.
-[ man ]
-  Man pages.
-[ build ]
-  Rake tasks used by the build system.
-
-== Tests
-
-Run all tests:
-
- rake test
-
-Run only the unit tests for the C++ components:
-
- rake test:cxx
-
-Run just the unit tests for the Ruby spawn server:
-
- rake test:ruby
-
-Run just the integration tests:
-
- rake test:integration            # All integration tests.
- rake test:integration:apache2    # Just integration tests for Apache 2.
- rake test:integration:nginx      # Just integration tests for Nginx.
-
-Notes:
-- Some tests, such as the ones that test privilege lowering, require
-  root privileges. Those will only be run if Rake is run as root.
-- Some tests will be run against multiple Rails versions in order to
-  test compatibility. This can take a long time. If you want to test
-  against only a single Rails version, then set the environment variable
-  ONLY_RAILS_VERSION to one of the subdirectory names in
-  test/stub/rails_apps, e.g. 'export ONLY_RAILS_VERSION=2.3'
-
-== Documentation
-
-Various developer documents can be found in 'doc/*.html'.
-
-The Ruby part's API reference is located in 'doc/rdoc/'.
-The C++ part's API reference is located in 'doc/cxxapi/'.
diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index b9088a4..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,6 +0,0 @@
-Please read the file README for installation instructions.
-
-If you're having trouble installing Phusion Passenger, please
-read the file 'doc/Users guide Apache.html' or 'doc/Users guide Nginx.html',
-depending on whether you want to install Phusion Passenger for Apache or for
-Nginx.
diff --git a/INSTALL.md b/INSTALL.md
new file mode 100644
index 0000000..7a7930a
--- /dev/null
+++ b/INSTALL.md
@@ -0,0 +1,7 @@
+# Installing Phusion Passenger
+
+Please read README.md for installation instructions.
+
+If you're having trouble installing Phusion Passenger, please read the file `doc/Users guide Apache.html` or `doc/Users guide Nginx.html`, depending on whether you want to install Phusion Passenger for Apache or for Nginx.
+
+Documentation and support resources are also available on [the website](https://www.phusionpassenger.com/support).
diff --git a/LICENSE b/LICENSE
index 3c27fe7..b1a806b 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2010 Phusion
+Copyright (c) 2010-2013 Phusion
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
diff --git a/NEWS b/NEWS
index cdbf372..a64b38b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,413 @@
+Release 4.0.10
+--------------
+
+ * Fixed a crash in PassengerWatchdog which occurs on some OS X systems.
+ * Fixed exception reporting to Union Station.
+ * Improved documentation.
+
+
+Release 4.0.9
+-------------
+
+ * [Enterprise] Fixed a problem with passenger-irb.
+
+
+Release 4.0.8
+-------------
+
+ * Fixed a problem with graceful web server restarts. When you gracefully
+   restart the web server, it would cause Phusion Passenger internal sockets
+   to be deleted, thus causing Phusion Passenger to go down. This problem
+   was introduced in 4.0.6 during the attempt to fix issue #910.
+ * The PassengerRestartDir/passenger_restart_dir now accepts relative
+   filenames again, just like in Phusion Passenger 3.x. Patch
+   contributed by Ryan Schwartz.
+ * Documentation updates contributed by Gokulnath Manakkattil.
+ * [Enterprise] Fixed a license key checking issue on some operating systems,
+   such as CentOS 6.
+
+
+Release 4.0.7
+-------------
+
+ * There was a regression in 4.0.6 that sometimes prevents
+   PassengerLoggingAgent from starting up. Unfortunately this slipped
+   our release testing. This regression has been fixed and we've updated
+   our test suite to check for these kinds of regressions.
+
+
+Release 4.0.6
+-------------
+
+ * Fixed a potential 100% CPU lock up in the crash handler, which only occurs
+   on OS X. Fixes issue #908.
+ * Fixed a crash in request handling, when certain events are trigger after
+   the client has already disconnected. Fixes issue #889.
+ * Phusion Passenger will no longer crash when the Phusion Passenger
+   native_support Ruby extension cannot be compiled, e.g. because the Ruby
+   development headers are not installed or because the current user has no
+   permission to save the native extension file. Fixes issue #890.
+ * Fixed OS X 10.9 support. Fixes issue #906.
+ * Removed dependency on bash, so that Phusion Passenger works out of the box
+   on BSD platforms without installing/configuring bash. Fixes issue #911.
+ * Fix 'PassengerPoolIdleTime 0' not being respected correctly. Issue #904.
+ * Admin tools improvement: it is now possible to see all currently running
+   requests by invoking `passenger-status --show=requests`.
+ * A new feature called Flying Passenger allows you to decouple the life time
+   of Phusion Passenger from the web server, so that both can be restarted
+   indepedently from each other. Please refer to
+   http://blog.phusion.nl/2013/07/03/technology-preview-introducing-flying-passenger/
+   for an introduction.
+ * [Apache] Fixed compatibility with Apache pipe logging. Previously this
+   would cause Phusion Passenger to lock up with 100% CPU during Apache
+   restart.
+ * [Nginx] The Nginx configure script now checks whether 'ruby' is in $PATH.
+   Previously, if 'ruby' is not in $PATH, then the compilation process fails
+   with an obscure error.
+ * [Nginx] passenger-install-nginx-module now works properly even when Phusion
+   Passenger is installed through the Debian packages. Before, the installer
+   would tell you to install Phusion Passenger through the gem or tarball
+   instead.
+ * [Enterprise] Added pretty printing helpers to the Live IRB Console.
+ * Fixed permissions on a subdirectory in the server instance directory. The
+   server instance directory is a temporary directory that Phusion Passenger
+   uses to store working files, and is deleted after Phusion Passenger exits.
+   A subdirectory inside it is world-writable (but not world-readable) and is
+   used for storing Unix domain sockets created by different apps, which may
+   run as different users. These sockets had long random filenames to prevent
+   them from being guessed. However because of a typo, this subdirectory was
+   created with the setuid bit, when it should have sticky bit (to prevent
+   existing files from being deleted or renamed by a user that doesn't own the
+   file). This has now been fixed.
+ * If the server instance directory already exists, it will now be removed
+   first in order get correct directory permissions. If the directory still
+   exists after removal, Phusion Passenger aborts to avoid writing to a
+   directory with unexpected permissions. Fixes issue #910.
+ * The installer now checks whether the system has enough virtual memory, and
+   prints a helpful warning if it doesn't.
+ * Linux/AArch64 compatibility fixes. Patch contributed by Dirk Mueller.
+ * Improved documentation.
+
+
+Release 4.0.5
+-------------
+
+ * [Standalone] Fixed a regression that prevented Passenger Standalone
+   from starting. Fixes issue #899.
+ * Fixed security vulnerability CVE-2013-2119.
+
+   Urgency: low
+   Scope: local exploit
+   Summary: denial of service and arbitrary code execution by hijacking temp files
+   Affected versions: all versions
+   Fixed versions: 3.0.21 and 4.0.5
+
+   Description:
+   Phusion Passenger's code did not always create temporary files and directories in a secure manner. Temporary files and directories were sometimes created with a predictable filename. A local attacker can pre-create temporary files, resulting in a denial of service. In addition, this vulnerability allows a local attacker to run arbitrary code as another user, by hijacking temporary files.
+
+   By pre-creating certain temporary files with certain permissions, attackers can prevent Passenger Standalone from starting (denial of service).
+
+   By pre-creating certain temporary files with certain other permissions, attackers can trick `passenger start` and the build system (which is invoked by `passenger-install-apache2-module`/`passenger-install-nginx-module`) to run arbitrary code. The user that the code is run as, is equal to the user that ran `passenger start` or the build system. Attacks of this nature have to be timed exactly right. The attacker must overwrite the file contents right after Phusion Passenger has created [...]
+
+   Only the `passenger start` command, the `passenger-install-apache2-module` command and the `passenger-install-nginx-module` commands are vulnerable. Phusion Passenger for Apache and Phusion Passenger for Nginx (once they are installed) are not vulnerable.
+
+   Fixed versions:
+   3.0.21 and 4.0.5 have been released to address this issue.
+
+   Workaround:
+   You can use this workaround if you are unable to upgrade. Before invoking any Phusion Passenger command, set the `TMPDIR` environment variable to a directory that is not world-writable. Special care must be taken when you use sudo: sudo resets all environment variables, so you should either invoke sudo with `-E`, or you must set the environment variable after gaining root privileges with sudo.
+
+
+Release 4.0.4
+-------------
+
+ * Fixed autodetection of noexec-mount /tmp directory. Fixes issue #850
+   and issue #625.
+ * Fixed a WSGI bug. wsgi.input was a file object opened in text mode,
+   but should be opened in binary mode. Fixes issue #881.
+ * Fixed a potential crash in Out-of-Band Work. Fixes issue #894.
+ * Fixed a potential crash in rolling restarting, which only occurs if a
+   process was also being spawned at the same time. Fixes issue #896.
+ * [Apache] The RailsBaseURI and RackBaseURI directives have been unified.
+   For a long time, RailsBaseURI told Phusion Passenger that the given
+   sub-URI belongs to a **Rails 2** application. Attempt to use this
+   directive with Rails 3 or with Rack applications would result in an
+   error. Because this confused users, RailsBaseURI and RackBaseURI
+   have now been unified and can now be used interchangably. Phusion
+   Passenger will automatically detect what kind of application it is.
+   The Nginx version already worked like this. Fixes issue #882.
+ * [Standalone] The Passenger Standalone temp directory and
+   PassengerWatchdog server instance directory have been unified.
+   PassengerWatchdog already automatically updates the timestamps of
+   all files in its server instance directory every 6 hours to prevent
+   /tmp cleaners from deleting the directory. Therefore this
+   unification prevents the Passenger Standalone temp directory to be
+   deleted by /tmp cleaners as well. Fixes issue #654.
+ * [Standalone] types_hash_max_size has been increased from 1024 to
+   2048. This solves a problem that causes Nginx not to start on some
+   platforms. Contributed by Jan-Willem Koelewijn.
+
+
+Release 4.0.3
+-------------
+
+ * Better protection is now provided against application processes that
+   are stuck and refuse to shut down cleanly. Since version 4.0.0,
+   Phusion Passenger already forcefully shuts down all processes during
+   web server shutdown. In addition to this, 4.0.3 now also forcefully
+   shuts down processes that take more than 1 minute to shut down, even
+   outside the context of web server shutdowns. This feature does not,
+   however, protect against requests that take too long. Use
+   PassengerMaxRequestTime (Apache) or passenger_max_request_time (Nginx)
+   for that.
+ * Fixed a crash in the HelperAgent which results in frequent process
+   restarts in some traffic patterns. Fixes issue #862.
+ * Fixed a problem that prevents processes from being spawned correctly
+   if the user's bashrc changes working directory. Fixes issue #851.
+ * passenger-status now also displays CPU usage.
+ * The installer now checks for checksums when automatically downloading
+   PCRE and Nginx. Contributed by Joshua Lund.
+ * An error is now printed when trying to daemonize Phusion Passenger
+   Standalone on Ruby implementations that don't support forking.
+   Contributed by Benjamin Fleischer.
+ * Although Phusion Passenger already supported JRuby, *installing*
+   Phusion Passenger with JRuby was not possible. This has been fixed.
+ * Various other minor bug fixes.
+
+
+Release 4.0.2
+-------------
+
+ * Bumped the preferred Nginx version to 1.4.1 because of a critical
+   Nginx security vulnerability, CVE-2013-2028. Users are advised to
+   upgrade immediately.
+
+
+Release 4.0.1
+-------------
+
+ * Fixed a crasher bug in the Deployment Error Resistance feature.
+ * Fixed a bug in PassengerDefaultUser and PassengerDefaultGroup.
+ * Fixed a bug which could cause application processes to exit before
+   they've finished their request.
+ * Fixed some small file descriptor leaks.
+ * Bumped the preferred Nginx version to 1.4.0.
+ * Editing the Phusion Passenger Standalone Nginx config template
+   is no longer discouraged.
+ * Improved documentation.
+
+
+Release 4.0.0 release candidate 6
+---------------------------------
+
+ * WebSocket support on Nginx. Requires Nginx >= 1.3.15.
+ * Improved RVM support.
+ * Performance optimizations.
+ * Various bug fixes.
+
+
+Release 4.0.0 release candidate 5
+---------------------------------
+
+ * The default config snippet for Apache has changed! It must now contain a
+   `PassengerDefaultRuby` option. The installer has been updated to output
+   this option. The `PassengerRuby` option still exists, but it's only used
+   for configuring different Ruby interpreters in different contexts. Please
+   refer to the manual for more information.
+ * We now provide GPG digital signatures for all file releases by Phusion.
+   More information can be found in the manual.
+ * `passenger-status` now displays process memory usage and time when it
+   was last used. The latter fixes issue #853.
+ * Exceptions in Rack application objects are now caught to prevent
+   application processes from exiting.
+ * The `passenger-config` tool now supports the `--ruby-command` argument,
+   which helps the user with figuring out the correct Ruby command to use
+   in case s/he wants to use multiple Ruby interpreters. The manual has
+   also been updated to mention this tool.
+ * Fixed streaming responses on Apache.
+ * Worked around an OS X Unix domain socket bug. Fixes issue #854.
+ * Out-of-Band Garbage Collection now works properly when the application
+   has disabled garbage collection. Fixes issue #859.
+ * Fixed support for /usr/bin/python on OS X. Fixes issue #855.
+ * Fixed looping-without-sleeping in the ApplicationPool garbage collector
+   if PassengerPoolIdleTime is set to 0. Fixes issue #858.
+ * Fixed some process memory usage measurement bugs.
+ * Fixed process memory usage measurement on NetBSD. Fixes issue #736.
+ * Fixed a file descriptor leak in the Out-of-Band Work feature. Fixes issue #864.
+ * The PassengerPreStart helper script now uses the default Ruby
+   interpreter specified in the web server configuration, and no longer
+   requires a `ruby` command to be in `$PATH`.
+ * Updated preferred PCRE version to 8.32.
+ * Worked around some RVM bugs.
+ * The ngx_http_stub_status_module is now enabled by default.
+ * Performance optimizations.
+
+
+Release 4.0.0 release candidate 4
+---------------------------------
+
+ * Fixed compilation on systems where /tmp is mounted noexec.
+ * Fixed some memory corruption bugs.
+ * Improved debugging messages.
+ * Phusion Passenger Standalone now sets underscores_in_headers.
+   Fixes issue #708.
+ * Fixed some process spawning compatibility problems, as
+   reported in issue #842.
+ * The Python WSGI loader now correctly shuts down client sockets
+   even when there are child processes that keep the socket open.
+ * A new configuration option PassengerPython (Apache) and
+   passenger_python (Nginx) has been added so that users can
+   customize the Python interpreter on a per-application basis.
+   Fixes issue #852.
+ * The Apache module now supports file uploads larger than 2 GB
+   when on 32-bit systems. Fixes issue #838.
+ * The Nginx version now supports the `passenger_temp_dir` option.
+ * Environment variables set in the Nginx configuration file
+   (through the `env` config option) are now correctly passed to
+   all application processes. Fixes issue #371.
+ * Fixed support for RVM mixed mode installations. Fixes issue #828.
+ * Phusion Passenger now outputs the Date HTTP header in case the
+   application didn't already do that (and was violating the HTTP spec).
+   Fixes issue #485.
+ * Phusion Passenger now checks whether /dev/urandom isn't broken.
+   Fixes issue #516.
+
+
+Release 3.9.5 (4.0.0 release candidate 3)
+-----------------------------------------
+
+ * Fixed Rake autodetection.
+
+
+Release 3.9.4 (4.0.0 release candidate 2)
+-----------------------------------------
+
+ * More bug fixes.
+ * More documentation updates.
+ * Better crash diagnostics.
+
+
+Release 3.9.3 (4.0.0 release candidate 1)
+-----------------------------------------
+
+ * The Nginx version now supports the `passenger_app_root` configuration option.
+ * The Enterprise memory limiting feature has been extended to work with non-Ruby applications as well.
+ * Application processes that have been killed are now automatically detected within 5 seconds. Previously Phusion Passenger needed to send a request to the process before detecting that it's gone. This change means that when you kill a process by sending it a signal, Phusion Passenger will automatically respawn it within 5 seconds (provided that the process limit settings allow respawning).
+ * Phusion Passenger Standalone's HTTP client body limit has been raised from 50 MB to 1 GB.
+ * Python 3 support has been added.
+ * The build system has been made compatible with JRuby and Ruby 2.0.
+ * The installers now print a lot more information about detected system settings so that the user can see  whether something has been wrongly detected.
+ * Some performance optimizations. These involve further extending the zero-copy architecture, and the use of hash table maps instead of binary tree maps.
+ * Many potential crasher and freezer bugs have been fixed.
+ * Error diagnostics have been further improved.
+ * Many documentation improvements.
+
+
+Release 3.9.2 (4.0.0 beta 2)
+----------------------------
+
+ * New feature: JRuby and Rubinius support.
+ * New feature: Out of Band Work.
+ * Sending SIGBART to a Ruby process will now trigger the same behavior
+   as SIGQUIT - that is, it will print a backtrace. This is necessary
+   for proper JRuby support because JRuby cannot catch SIGQUIT.
+ * Rolling restarts and depoyment error resistance are now also available
+   in Phusion Passenger Standalone in the Enterprise version.
+ * System call failure simulation framework.
+ * Improved crash reporting.
+ * Many documentation improvements.
+ * Many bug fixes.
+
+
+Release 3.9.1 (4.0.0 beta 1)
+----------------------------
+
+This is the first beta of Phusion Passenger 4. The changes are numerous.
+
+ * Support for multiple Ruby versions.
+ * The internals now use evented I/O.
+ * Real-time response buffering.
+ * Improved zero-copy architecture.
+ * Rewritten ApplicationPool and process spawning subsystem.
+ * Multithreading within Ruby apps (Phusion Passenger Enterprise only).
+ * Python WSGI support lifted to "beta" status.
+ * More protection against stuck processes.
+ * Automatically picks up environment variables from your bashrc.
+ * Allows setting environment variables directly in Apache.
+ * Automatic asset pipeline support in Standalone.
+ * Deleting restart.txt no longer triggers a restart.
+ * More stable Union Station support.
+ * Many internal robustness improvements.
+ * Better relocatability without wasting space.
+
+
+Release 3.0.21
+--------------
+
+ * Rebootstrapped the libev configure to fix compilation problems on Solaris 11.
+ * Fixed support for RVM mixed mode installations. Fixes issue #828.
+ * Fixed encoding problems in Phusion Passenger Standalone.
+ * Changed preferred Nginx version to 1.2.9.
+ * Catch exceptions raised by Rack application objects.
+ * Fix for CVE-2013-2119. Details can be found in the announcement for version 4.0.5.
+ * Version 3.0.20 was pulled because its fixes were incomplete.
+
+
+Release 3.0.19
+--------------
+
+ * Nginx security fix: do not display Nginx version when
+   server_tokens are off.
+ * Fixed compilation problems on some systems.
+ * Fixed some Union Station-related bugs.
+
+
+Release 3.0.18
+--------------
+
+ * Fixed compilation problems on Fedora 17.
+ * Fixed Union Station compatibility with Rails 3.2.
+ * Phusion Passenger Enterprise Standalone now supports rolling
+   restarts and deployment error resistance.
+
+
+Release 3.0.17
+--------------
+
+ * Fixed a Ruby 1.9 encoding-related bug in the memory measurer.
+   (Phusion Passenger Enterprise)
+ * Fixed OOM adjustment bugs on Linux.
+ * Fixed compilation problems on Fedora 18 and 19.
+ * Fixed compilation problems on SunOS.
+ * Fixed compilation problems on AIX. Contribution by Perry Smith.
+ * Fixed various compilation warnings.
+ * Upgraded preferred Nginx version to 1.2.3.
+
+3.0.16 was an unofficial hotfix release, and so its announcement had been skipped.
+
+
+Release 3.0.15
+--------------
+
+ * Updated documentation.
+ * Updated website links.
+
+
+Release 3.0.14
+--------------
+
+ * [Apache] Fixed a long-standing mod_rewrite-related problem.
+   Some mod_rewrite rules would not work, but it depends on the exact
+   mod_rewrite configuration so it would work for some people but not
+   for others. Issue #563. Thanks a lot to cedricmaion for providing
+   information on the nature of the bug and to peter.nash55 for
+   providing a VM that allowed us to reproduce the problem.
+ * [Nginx] Preferred Nginx version to 1.2.2.
+   The previously preferred version was 1.2.1.
+ * Cleared some confusing terminology in the documentation.
+ * Fixed some Ruby 1.9 encoding problems.
+
+
 Release 3.0.13
 --------------
 
diff --git a/PACKAGING.TXT b/PACKAGING.TXT
deleted file mode 100644
index 638c589..0000000
--- a/PACKAGING.TXT
+++ /dev/null
@@ -1,25 +0,0 @@
-Notes for packagers
--------------------
-By default Phusion Passenger locates all of its resource files under its
-source root directory, however it also supports FHS-complaint packaging.
-When packaging Phusion Passenger, be sure to follow these guidelines:
-
-- You can generate a fakeroot with the command 'rake fakeroot'. This will
-  generate an FHS-compliant directory tree in pkg/fakeroot, which you can
-  directly package or with minor modifications.
-
-  If the default fakeroot structure is not sufficient, please consider
-  sending a patch.
-- Be sure to set Apache's PassengerRoot directive or Nginx's passenger_root
-  directive to /usr. This is a hint to Phusion Passenger that it's packaged
-  in an FHS-compliant way.
-- Inside the fakeroot you will encounter a directory
-  /usr/share/phusion-passenger/source, which contains the entire Phusion
-  Passenger source root. This is normal! It's to allow
-  passenger-install-nginx-module and Phusion Passenger Lite to work; they
-  both require the Phusion Passenger source code in order to compile Nginx.
-- Phusion Passenger vendors libev in order to make installation easier for
-  users on operating systems without proper package management, like OS X.
-  If you want Phusion Passenger to compile against the system-provided
-  libev instead, then set the environment variable USE_VENDORED_LIBEV to
-  'no' before compiling.
diff --git a/README b/README
deleted file mode 100644
index 16477b7..0000000
--- a/README
+++ /dev/null
@@ -1,45 +0,0 @@
-== Introduction
-
-Phusion Passenger probably requires no introduction. We kindly refer the reader
-to http://www.modrails.com/ for general information.
-
-== Installation
-
-=== Regular installation
-
-You can install either Phusion Passenger for Apache or for Nginx. Run either of
-the following programs as root:
-
- ./bin/passenger-install-apache2-module
-
--OR-
-
- ./bin/passenger-install-nginx-module
-
-That's it. :)
-
-For troubleshooting, configuration and tips, please read the corresponding
-Users Guide:
-
- doc/Users guide Apache.html
- doc/Users guide Nginx.html
-
-These files are included in the source tarball, and may also be viewed online on
-our website.
-
-=== Installing via a gem
-
-You may also first generate a .gem file, and then install that.
-First, make sure that you have the following software installed:
-- Doxygen: http://www.stack.nl/~dimitri/doxygen/
-- Asciidoc >= 8.6.5: http://www.methods.co.nz/asciidoc/
-
-Next, run:
-
- rake package
-
-The gem will be available under the 'pkg' folder.
-
-== Legal
-
-Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..2e5a19e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,40 @@
+# Phusion Passenger: a fast and robust web server and application server for Ruby, Python and Node.js
+
+[Phusion Passenger](https://www.phusionpassenger.com/) is a web server and application server, designed to be fast, robust and lightweight. It runs your web apps with the least amount of hassle by taking care of almost all administrative heavy lifting for you. Advanced administration tools allow you to gain deep insight into your web applications' operations and to keep your servers healthy. Phusion Passenger is polyglot by design, and currently supports Ruby (Rack), Python (WSGI) and Node.js.
+
+This is the [Phusion Passenger web application server](https://www.phusionpassenger.com/).
+
+## Regular installation
+
+You can install either Phusion Passenger for Apache or for Nginx. Run either of
+the following programs as root:
+
+    ./bin/passenger-install-apache2-module
+
+-OR-
+
+    ./bin/passenger-install-nginx-module
+
+That's it. :)
+
+For troubleshooting, configuration and tips, please read the corresponding Users Guide:
+
+ * doc/Users guide Apache.html
+ * doc/Users guide Nginx.html
+
+These files are included in the source tarball, and may also be viewed online on [our website](https://www.phusionpassenger.com/support).
+
+## Installing as a gem
+
+    gem build passenger.gemspec
+    gem install passenger-x.x.x.gem
+
+## Further reading
+
+ * The `doc/` directory.
+ * CONTRIBUTING.md.
+ * https://www.phusionpassenger.com/support
+
+## Legal
+
+Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.
diff --git a/Rakefile b/Rakefile
index 5d3cb1a..c23b7ba 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,7 +1,5 @@
-# kate: syntax ruby
-
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (C) 2008, 2009, 2010, 2011  Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (C) 2008-2013  Phusion
 #
 #  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,22 +20,25 @@ $LOAD_PATH.unshift("#{source_root}/lib")
 
 require "#{source_root}/config" if File.exist?("#{source_root}/config.rb")
 require 'build/basics'
-require 'build/config'
-require 'build/common_library'
-require 'build/ruby_extension'
-require 'build/agents'
-require 'build/apache2'
-require 'build/nginx'
-require 'build/documentation'
-require 'build/packaging'
-require 'build/test_basics'
-require 'build/oxt_tests'
-require 'build/cxx_tests'
-require 'build/ruby_tests'
-require 'build/integration_tests'
-require 'build/misc'
-require 'build/rpm'
-
+if boolean_option('ONLY_RUBY')
+	require 'build/ruby_extension'
+else
+	require 'build/ruby_extension'
+	require 'build/common_library'
+	require 'build/agents'
+	require 'build/apache2'
+	require 'build/nginx'
+	require 'build/documentation'
+	require 'build/packaging'
+	require 'build/test_basics'
+	require 'build/oxt_tests'
+	require 'build/cxx_tests'
+	require 'build/ruby_tests'
+	require 'build/integration_tests'
+	require 'build/misc'
+	require 'build/debian'
+	require 'build/rpm'
+end
 
 #### Default tasks
 
@@ -49,7 +50,7 @@ end
 
 desc "Remove compiled files"
 task :clean do
-	sh "rm -rf build/cache"
+	sh "rm -rf buildout"
 end
 
 desc "Remove all generated files"
diff --git a/bin/passenger b/bin/passenger
index f290ee3..ec40fc3 100755
--- a/bin/passenger
+++ b/bin/passenger
@@ -1,5 +1,5 @@
 #!/usr/bin/env ruby
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -22,11 +22,12 @@
 #  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #  THE SOFTWARE.
 
-source_root = File.expand_path(File.dirname(__FILE__) + "/..")
+source_root = File.expand_path("..", File.dirname(__FILE__))
 $LOAD_PATH.unshift("#{source_root}/lib")
+require 'phusion_passenger'
+PhusionPassenger.locate_directories
 
 require 'rubygems' rescue nil
-require 'phusion_passenger'
 require 'phusion_passenger/standalone/main'
 
 PhusionPassenger::Standalone::Main.run!(ARGV)
diff --git a/bin/passenger-config b/bin/passenger-config
index 4bf9190..049cf8d 100755
--- a/bin/passenger-config
+++ b/bin/passenger-config
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -22,22 +22,103 @@
 #  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #  THE SOFTWARE.
 
-source_root = File.expand_path(File.dirname(__FILE__) + "/..")
+source_root = File.expand_path("..", File.dirname(__FILE__))
 $LOAD_PATH.unshift("#{source_root}/lib")
 require 'phusion_passenger'
+PhusionPassenger.locate_directories
+
+require 'phusion_passenger/platform_info'
+require 'phusion_passenger/platform_info/compiler'
 
 def help
 	puts "Tool for showing Passenger configuration information."
-	puts "Usage: passenger-config <OPTIONS>"
+	puts "Usage: passenger-config <OPTION>"
 	puts
 	puts "Options:"
-	puts "  --root      Show Passenger's root directory."
-	puts "  --version   Show Passenger's version number."
+	puts "  --root                     Show Phusion Passenger's root directory."
+	puts "  --includedir               Show the Nginx runtime library headers directory."
+	puts "  --nginx-addon-dir          Show the Phusion Passenger Nginx addon directory."
+	puts "  --nginx-libs               Show Nginx runtime library flags."
+	puts "  --compiled                 Check whether runtime libraries are compiled."
+	puts "  --natively-packaged        Check whether Phusion Passenger is natively packged."
+	puts "  --ruby-command             Print the correct command for invoking the Ruby interpreter."
+	puts "  --rubyext-compat-id        Print the Ruby extension binary compatibility ID."
+	puts "  --cxx-compat-id            Print the C++ binary compatibility ID."
+	puts "  --version                  Show version number."
+end
+
+def common_library
+	require 'phusion_passenger/common_library'
+	return COMMON_LIBRARY.
+		only(*NGINX_LIBS_SELECTOR).
+		set_output_dir("#{PhusionPassenger.lib_dir}/common/libpassenger_common")
 end
 
 case ARGV[0]
 when "--root"
-	puts PhusionPassenger::SOURCE_ROOT
+	puts PhusionPassenger.source_root
+when "--includedir"
+	puts PhusionPassenger.include_dir
+when "--nginx-addon-dir"
+	puts PhusionPassenger.nginx_addon_dir
+when "--nginx-libs"
+	text = "#{common_library.link_objects_as_string} #{PhusionPassenger.lib_dir}/common/libboost_oxt.a"
+	if PhusionPassenger::PlatformInfo.has_math_library?
+		text << " -lm"
+	end
+	puts text
+when "--compiled"
+	common_library.link_objects.each do |filename|
+		if !File.exist?(filename)
+			exit 1
+		end
+	end
+	if File.exist?("#{PhusionPassenger.lib_dir}/common/libboost_oxt.a")
+		exit 0
+	else
+		exit 1
+	end
+when "--natively-packaged"
+	if PhusionPassenger.natively_packaged?
+		exit 0
+	else
+		exit 1
+	end
+when "--ruby-command"
+	require 'phusion_passenger/platform_info/ruby'
+	ruby = PhusionPassenger::PlatformInfo.ruby_command
+	puts "passenger-config was invoked through the following Ruby interpreter:"
+	puts "  Command: #{ruby}"
+	STDOUT.write "  Version: "
+	STDOUT.flush
+	system("/bin/sh -c '#{ruby} -v'")
+	puts "  To use in Apache: PassengerRuby #{ruby}"
+	puts "  To use in Nginx : passenger_ruby #{ruby}"
+	puts "  To use with Standalone: #{ruby} #{PhusionPassenger.bin_dir}/passenger start"
+	puts
+
+	ruby = PhusionPassenger::PlatformInfo.find_command('ruby')
+	if ruby
+		puts "The following Ruby interpreter was found first in $PATH:"
+		puts "  Command: #{ruby}"
+		STDOUT.write "  Version: "
+		STDOUT.flush
+		system("/bin/sh -c '#{ruby} -v'")
+		puts "  To use in Apache: PassengerRuby #{ruby}"
+		puts "  To use in Nginx : passenger_ruby #{ruby}"
+		puts "  To use with Standalone: #{ruby} #{PhusionPassenger.bin_dir}/passenger start"
+	else
+		puts "No Ruby interpreter found in $PATH."
+	end
+	puts
+	puts "## Notes for RVM users"
+	puts "Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'."
+when "--rubyext-compat-id"
+	require 'phusion_passenger/platform_info/binary_compatibility'
+	puts PhusionPassenger::PlatformInfo.ruby_extension_binary_compatibility_id
+when "--cxx-compat-id"
+	require 'phusion_passenger/platform_info/binary_compatibility'
+	puts PhusionPassenger::PlatformInfo.cxx_binary_compatibility_id
 when "--version"
 	puts PhusionPassenger::VERSION_STRING
 else
diff --git a/bin/passenger-install-apache2-module b/bin/passenger-install-apache2-module
index 22a093e..dd091f7 100755
--- a/bin/passenger-install-apache2-module
+++ b/bin/passenger-install-apache2-module
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010, 2011, 2012 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -25,6 +25,7 @@
 PASSENGER_ROOT = File.expand_path(File.dirname(__FILE__) + "/..")
 $LOAD_PATH.unshift("#{PASSENGER_ROOT}/lib")
 require 'phusion_passenger'
+PhusionPassenger.locate_directories
 
 # The Apache executable may be located in an 'sbin' folder. We add
 # the 'sbin' folders to $PATH just in case. On some systems
@@ -35,30 +36,33 @@ ENV["PATH"] += ":/usr/sbin:/sbin:/usr/local/sbin"
 require 'optparse'
 require 'phusion_passenger/platform_info/ruby'
 require 'phusion_passenger/platform_info/apache'
-require 'phusion_passenger/dependencies'
 require 'phusion_passenger/abstract_installer'
 
 class Installer < PhusionPassenger::AbstractInstaller
 	include PhusionPassenger
-	include PhusionPassenger::PlatformInfo
 	
 	def dependencies
-		result = [
-			Dependencies::GCC,
-			Dependencies::Curl_Dev,
-			Dependencies::OpenSSL_Dev,
-			Dependencies::Zlib_Dev,
-			Dependencies::Ruby_DevHeaders,
-			Dependencies::Ruby_OpenSSL,
-			Dependencies::RubyGems,
-			Dependencies::Rake,
-			Dependencies::Rack,
-			Dependencies::Apache2,
-			Dependencies::Apache2_DevHeaders
+		specs = [
+			'depcheck_specs/compiler_toolchain',
+			'depcheck_specs/ruby',
+			'depcheck_specs/gems',
+			'depcheck_specs/libs',
+			'depcheck_specs/apache2'
 		]
-		if Dependencies.fastthread_required?
-			result << Dependencies::FastThread
-		end
+		ids = [
+			'gcc',
+			'g++',
+			'libcurl-dev',
+			'openssl-dev',
+			'zlib-dev',
+			PlatformInfo.passenger_needs_ruby_dev_header? ? 'ruby-dev' : nil,
+			'ruby-openssl',
+			'rubygems',
+			'rake',
+			'rack',
+			'apache2',
+			'apache2-dev'
+		].compact
 		# Some broken servers don't have apr-config or apu-config installed.
 		# Nevertheless, it is possible to compile Apache modules if Apache
 		# was configured with --included-apr. So here we check whether
@@ -67,17 +71,17 @@ class Installer < PhusionPassenger::AbstractInstaller
 		# module can be compiled without their presence.
 		if (PlatformInfo.apr_config && PlatformInfo.apu_config) ||
 		   PlatformInfo.apr_config_needed_for_building_apache_modules?
-			result << Dependencies::APR_DevHeaders
-			result << Dependencies::APU_DevHeaders
+			ids << 'apr-dev'
+			ids << 'apu-dev'
 		end
-		return result
+		return [specs, ids]
 	end
 	
 	def users_guide
-		return "#{DOCDIR}/Users guide Apache.html"
+		return "#{PhusionPassenger.doc_dir}/Users guide Apache.html"
 	end
 	
-	def install!
+	def run_steps
 		if PhusionPassenger.natively_packaged?
 			check_dependencies || exit(1)
 			show_apache2_config_snippets
@@ -89,6 +93,8 @@ class Installer < PhusionPassenger::AbstractInstaller
 		show_welcome_screen
 		check_dependencies || exit(1)
 		check_whether_apache_uses_compatible_mpm
+		check_whether_os_is_broken
+		check_whether_system_has_enough_ram
 		check_write_permission_to_passenger_root || exit(1)
 		if install_apache2_module
 			show_apache2_config_snippets
@@ -151,7 +157,7 @@ private
 	def install_apache2_module
 		puts
 		line
-		color_puts '<banner>Compiling and installing Apache 2 module...</banner>'
+		puts '<banner>Compiling and installing Apache 2 module...</banner>'
 		puts "cd #{PASSENGER_ROOT}"
 		if ENV['TRACE']
 			puts "#{PlatformInfo.rake_command} --trace apache2:clean apache2 RELEASE=yes"
@@ -164,20 +170,20 @@ private
 	
 	def show_apache2_config_snippets(bare = false)
 		if bare
-			puts "LoadModule passenger_module #{APACHE2_MODULE}"
-			puts "PassengerRoot #{PASSENGER_ROOT}"
-			puts "PassengerRuby #{PlatformInfo.ruby_command}"
+			puts "LoadModule passenger_module #{PhusionPassenger.apache2_module_path}"
+			puts "PassengerRoot #{PhusionPassenger.source_root}"
+			puts "PassengerDefaultRuby #{PlatformInfo.ruby_command}"
 		else
 			puts
 			line
 			render_template 'apache2/config_snippets',
-				:module_location => APACHE2_MODULE,
-				:passenger_root => PASSENGER_ROOT,
+				:module_location => PhusionPassenger.apache2_module_path,
+				:passenger_root => PhusionPassenger.source_root,
 				:ruby => PlatformInfo.ruby_command
-			if PhusionPassenger.natively_packaged?
-				wait(10)
-			else
+			if PhusionPassenger.originally_packaged?
 				wait
+			else
+				wait(10)
 			end
 		end
 	end
@@ -233,5 +239,5 @@ installer = Installer.new(options)
 if options[:snippet]
 	installer.send(:show_apache2_config_snippets, true)
 else
-	installer.start
+	installer.run
 end
diff --git a/bin/passenger-install-nginx-module b/bin/passenger-install-nginx-module
index 629240c..3b004e4 100755
--- a/bin/passenger-install-nginx-module
+++ b/bin/passenger-install-nginx-module
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010, 2011, 2012 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -22,49 +22,61 @@
 #  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #  THE SOFTWARE.
 
-passenger_root = File.expand_path("..", File.dirname(__FILE__))
-$LOAD_PATH.unshift("#{passenger_root}/lib")
+source_root = File.expand_path("..", File.dirname(__FILE__))
+$LOAD_PATH.unshift("#{source_root}/lib")
 require 'phusion_passenger'
+PhusionPassenger.locate_directories
+
+require 'digest'
 require 'optparse'
 require 'fileutils'
 require 'phusion_passenger/platform_info/ruby'
-require 'phusion_passenger/dependencies'
 require 'phusion_passenger/abstract_installer'
+require 'phusion_passenger/utils/tmpio'
 
 class Installer < PhusionPassenger::AbstractInstaller
 	include PhusionPassenger
-	include PhusionPassenger::PlatformInfo
 	
 	def dependencies
-		result = [
-			Dependencies::GCC,
-			Dependencies::Make,
-			Dependencies::DownloadTool,
-			Dependencies::Ruby_DevHeaders,
-			Dependencies::Ruby_OpenSSL,
-			Dependencies::RubyGems,
-			Dependencies::Rake,
-			Dependencies::Rack,
-			Dependencies::Curl_Dev,
-			Dependencies::OpenSSL_Dev,
-			Dependencies::Zlib_Dev
+		specs = [
+			'depcheck_specs/compiler_toolchain',
+			'depcheck_specs/ruby',
+			'depcheck_specs/gems',
+			'depcheck_specs/libs',
+			'depcheck_specs/utilities'
 		]
-		if Dependencies.fastthread_required?
-			result << Dependencies::FastThread
-		end
-		return result
+		ids = [
+			'gcc',
+			'g++',
+			'download-tool',
+			PlatformInfo.passenger_needs_ruby_dev_header? ? 'ruby-dev' : nil,
+			'ruby-openssl',
+			'rubygems',
+			'rake',
+			'rack',
+			'libcurl-dev',
+			'openssl-dev',
+			'zlib-dev'
+		].compact
+		return [specs, ids]
 	end
 	
 	def users_guide
-		return "#{DOCDIR}/Users guide Nginx.html"
+		return "#{PhusionPassenger.doc_dir}/Users guide Nginx.html"
 	end
 	
-	def install!
-		Dir.chdir(SOURCE_ROOT)
+	def run_steps
+		# Make sure the configure script finds the correct
+		# passenger-config command.
+		ENV['PATH'] = PhusionPassenger.bin_dir + ":" + ENV['PATH']
+		
 		show_welcome_screen
 		check_dependencies || exit(1)
-		
-		check_whether_we_can_write_to(SOURCE_ROOT) || exit(1)
+		if needs_compiling_support_files?
+			check_whether_we_can_write_to(PhusionPassenger.source_root) || exit(1)
+		end
+		check_whether_os_is_broken
+		check_whether_system_has_enough_ram
 		
 		download_and_install = should_we_download_and_install_nginx_automatically?
 		if pcre_is_installed?
@@ -91,7 +103,9 @@ class Installer < PhusionPassenger::AbstractInstaller
 		end
 		check_whether_we_can_write_to(nginx_prefix) || exit(1)
 		nginx_config_already_exists_before_installing = nginx_config_exists?(nginx_prefix)
-		compile_passenger_support_files || exit(1)
+		if needs_compiling_support_files?
+			compile_passenger_support_files || exit(1)
+		end
 		if install_nginx(nginx_source_dir, nginx_prefix, extra_nginx_configure_flags)
 			if nginx_config_already_exists_before_installing || !locate_nginx_config_file(nginx_prefix)
 				show_passenger_config_snippets(nginx_prefix)
@@ -108,14 +122,12 @@ class Installer < PhusionPassenger::AbstractInstaller
 	def before_install
 		super
 		myself = `whoami`.strip
-		@working_dir = "/tmp/#{myself}-passenger-#{Process.pid}"
-		FileUtils.rm_rf(@working_dir)
-		FileUtils.mkdir_p(@working_dir)
+		@working_dir = PhusionPassenger::Utils.mktmpdir("passenger.", PlatformInfo.tmpexedir)
 	end
 	
 	def after_install
 		super
-		FileUtils.rm_rf(@working_dir)
+		FileUtils.remove_entry_secure(@working_dir) if @working_dir
 	end
 
 private
@@ -123,11 +135,17 @@ private
 		render_template 'nginx/welcome', :version => VERSION_STRING
 		wait
 	end
+
+	def needs_compiling_support_files?
+		return PhusionPassenger.originally_packaged?
+	end
 	
 	def compile_passenger_support_files
 		new_screen
-		color_puts "<banner>Compiling Passenger support files...</banner>"
-		return sh("#{PlatformInfo.rake_command} nginx:clean nginx RELEASE=yes")
+		puts "<banner>Compiling Passenger support files...</banner>"
+		Dir.chdir(PhusionPassenger.source_root) do
+			return sh("#{PlatformInfo.rake_command} nginx:clean nginx RELEASE=yes")
+		end
 	end
 	
 	def should_we_download_and_install_nginx_automatically?
@@ -137,20 +155,20 @@ private
 		puts
 		
 		if @auto_download
-			color_puts "<b>=> Proceeding with choice 1.</b>"
+			puts "<b>=> Proceeding with choice 1.</b>"
 			return true
 		elsif @nginx_source_dir
-			color_puts "<b>=> Proceeding with choice 2.</b>"
+			puts "<b>=> Proceeding with choice 2.</b>"
 			return false
 		else
 			choice = prompt("Enter your choice (1 or 2) or press Ctrl-C to abort") do |input|
 				if input == "1" || input == "2"
 					true
 				elsif input.empty?
-					color_puts "<red>No choice has been given.</red>"
+					puts "<red>No choice has been given.</red>"
 					false
 				else
-					color_puts "<red>'#{input}' is not a valid choice.</red>"
+					puts "<red>'#{input}' is not a valid choice.</red>"
 					false
 				end
 			end
@@ -160,7 +178,7 @@ private
 	
 	def download_and_extract_pcre
 		new_screen
-		color_puts "<banner>PCRE (required by Nginx) not installed, downloading it...</banner>"
+		puts "<banner>PCRE (required by Nginx) not installed, downloading it...</banner>"
 		
 		url = "http://downloads.sourceforge.net/project/pcre/pcre/#{PREFERRED_PCRE_VERSION}/pcre-#{PREFERRED_PCRE_VERSION}.tar.gz"
 		dirname = "pcre-#{PREFERRED_PCRE_VERSION}"
@@ -168,7 +186,15 @@ private
 		
 		if download(url, tarball)
 			Dir.chdir(@working_dir) do
-				color_puts "<banner>Extracting PCRE source tarball...</banner>"
+				puts "<banner>Verifying PCRE checksum...</banner>"
+				if Digest::SHA256.file(tarball) != PCRE_SHA256_CHECKSUM
+					new_screen
+					render_template "nginx/pcre_checksum_could_not_be_verified"
+					wait
+					return nil
+				end
+
+				puts "<banner>Extracting PCRE source tarball...</banner>"
 				if sh("tar", "xzvf", tarball)
 					return "#{@working_dir}/#{dirname}"
 				else
@@ -190,7 +216,7 @@ private
 	
 	def download_and_extract_nginx
 		new_screen
-		color_puts "<banner>Downloading Nginx...</banner>"
+		puts "<banner>Downloading Nginx...</banner>"
 		
 		url = "http://www.nginx.org/download/nginx-#{PREFERRED_NGINX_VERSION}.tar.gz"
 		dirname = "nginx-#{PREFERRED_NGINX_VERSION}"
@@ -198,7 +224,12 @@ private
 		
 		if download(url, tarball)
 			Dir.chdir(@working_dir) do
-				color_puts "<banner>Extracting Nginx source tarball...</banner>"
+				puts "<banner>Verifying Nginx checksum...</banner>"
+				if Digest::SHA256.file(tarball) != NGINX_SHA256_CHECKSUM
+					return nil
+				end
+
+				puts "<banner>Extracting Nginx source tarball...</banner>"
 				if sh("tar", "xzvf", tarball)
 					return "#{@working_dir}/#{dirname}"
 				else
@@ -220,17 +251,17 @@ private
 	
 	def ask_for_nginx_install_prefix
 		new_screen
-		color_puts "<banner>Where do you want to install Nginx to?</banner>"
+		puts "<banner>Where do you want to install Nginx to?</banner>"
 		puts
 		if @prefix
-			color_puts "<b>=> #{@prefix}</b>"
+			puts "<b>=> #{@prefix}</b>"
 			return @prefix
 		else
 			prefix = prompt("Please specify a prefix directory [/opt/nginx]") do |input|
 				if input.empty? || input =~ %r(/)
 					true
 				else
-					color_puts "<red>Please specify an absolute path.</red>"
+					puts "<red>Please specify an absolute path.</red>"
 					false
 				end
 			end
@@ -243,10 +274,10 @@ private
 	
 	def ask_for_nginx_source_dir
 		new_screen
-		color_puts "<banner>Where is your Nginx source code located?</banner>"
+		puts "<banner>Where is your Nginx source code located?</banner>"
 		puts
 		if @nginx_source_dir
-			color_puts "<b>=> #{@nginx_source_dir}</b>"
+			puts "<b>=> #{@nginx_source_dir}</b>"
 			return @nginx_source_dir
 		else
 			return prompt("Please specify the directory") do |input|
@@ -254,11 +285,11 @@ private
 					if File.exist?("#{input}/src/core/nginx.c")
 						true
 					else
-						color_puts "<red>'#{input}' does not look like an Nginx source directory.</red>"
+						puts "<red>'#{input}' does not look like an Nginx source directory.</red>"
 						false
 					end
 				else
-					color_puts "<red>Please specify an absolute path.</red>"
+					puts "<red>Please specify an absolute path.</red>"
 					false
 				end
 			end
@@ -275,10 +306,10 @@ private
 			if @extra_configure_flags
 				if @extra_configure_flags == "none"
 					extra_args = ""
-					color_puts "<b>=> No extra configure flags.</b>"
+					puts "<b>=> No extra configure flags.</b>"
 				else
 					extra_args = @extra_configure_flags
-					color_puts "<b>=> #{extra_args}</b>"
+					puts "<b>=> #{extra_args}</b>"
 				end
 				return extra_args
 			else
@@ -292,7 +323,7 @@ private
 					if input.empty? || input == "yes" || input == "no"
 						true
 					else
-						color_puts "<red>Please enter 'yes' or 'no'.</red>"
+						puts "<red>Please enter 'yes' or 'no'.</red>"
 						false
 					end
 				end
@@ -325,7 +356,7 @@ private
 	def install_nginx(source_dir, prefix, extra_configure_flags)
 		Dir.chdir(source_dir) do
 			new_screen
-			color_puts "<banner>Compiling and installing Nginx...</banner>"
+			puts "<banner>Compiling and installing Nginx...</banner>"
 			if !sh(build_nginx_configure_command(prefix, extra_configure_flags)) ||
 			   !sh("make") ||
 			   !sh("make install")
@@ -339,7 +370,7 @@ private
 		new_screen
 		render_template 'nginx/config_snippets',
 			:config_file => locate_nginx_config_file(prefix),
-			:passenger_root => SOURCE_ROOT,
+			:passenger_root => PhusionPassenger.source_root,
 			:ruby => PlatformInfo.ruby_command
 		wait
 	end
@@ -375,7 +406,7 @@ private
 		contents = File.read(config_file)
 		contents.sub!(/^http \{/,
 			"http {\n" <<
-			"    passenger_root #{SOURCE_ROOT};\n" <<
+			"    passenger_root #{PhusionPassenger.source_root};\n" <<
 			"    passenger_ruby #{PlatformInfo.ruby_command};\n")
 		File.open(config_file, 'w') do |f|
 			f.write(contents)
@@ -384,7 +415,7 @@ private
 		new_screen
 		render_template 'nginx/config_snippets_inserted',
 			:config_file => config_file,
-			:passenger_root => SOURCE_ROOT,
+			:passenger_root => PhusionPassenger.source_root,
 			:ruby => PlatformInfo.ruby_command
 		wait
 	end
@@ -393,13 +424,14 @@ private
 		command = "sh ./configure --prefix='#{prefix}' "
 		command << "--with-http_ssl_module "
 		command << "--with-http_gzip_static_module "
+		command << "--with-http_stub_status_module "
 		command << "--with-cc-opt='-Wno-error' "
 		if @pcre_source_dir
 			command << "--with-pcre='#{@pcre_source_dir}' "
 		elsif !pcre_is_installed?
 			command << "--without-http_rewrite_module "
 		end
-		command << "--add-module='#{SOURCE_ROOT}/ext/nginx' #{extra_configure_flags}"
+		command << "--add-module='#{PhusionPassenger.nginx_addon_dir}' #{extra_configure_flags}"
 		command.strip!
 		return command
 	end
@@ -454,11 +486,10 @@ parser = OptionParser.new do |opts|
 	end
 	opts.on("--extra-configure-flags=STRING", String, "Pass these extra flags to Nginx's\n" <<
 	        "#{' ' * 37}'configure' script, instead of asking for\n" <<
-	        "#{' ' * 37}it interactively. Only applicable if\n" <<
-	        "#{' ' * 37}--nginx-source-dir is given. Specify\n" <<
-	        "#{' ' * 37}'none' if you do not want to pass\n" <<
-	        "#{' ' * 37}additional flags but do not want this\n" <<
-	        "#{' ' * 37}installer to ask interactively either.") do |flags|
+	        "#{' ' * 37}it interactively. Specify 'none' if you\n" <<
+	        "#{' ' * 37}do not want to pass additional flags but do\n" <<
+	        "#{' ' * 37}not want this installer to ask\n" <<
+	        "#{' ' * 37}interactively either.") do |flags|
 		options[:extra_configure_flags] = flags
 	end
 end
@@ -476,4 +507,4 @@ if options[:auto_download] && options[:nginx_source_dir]
 	exit 1
 end
 
-Installer.new(options).start
+Installer.new(options).run
diff --git a/bin/passenger-make-enterprisey b/bin/passenger-make-enterprisey
deleted file mode 100755
index e95bb3d..0000000
--- a/bin/passenger-make-enterprisey
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env ruby
-# encoding: utf-8
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-source_root = File.expand_path(File.dirname(__FILE__) + "/..")
-$LOAD_PATH.unshift("#{source_root}/lib")
-require 'phusion_passenger'
-require 'digest/md5'
-
-##############################################################################
-#
-#  Hidden license
-# 
-#  By reading the source code of this file, you're automatically agreeing
-#  with the following conditions:
-#  
-#  1. You will sell your soul to us for $0.
-#  2. You will watch the movie "Hot Fuzz".
-#  
-#  [ Allow ]    or    [ Deny ]
-#  
-##############################################################################
-
-
-
-
-include PhusionPassenger
-trap("INT") { exit 1 }
-if File.exist?("#{SOURCE_ROOT}/enterprisey.txt") || File.exist?("/etc/passenger_enterprisey.txt")
-	puts "Congratulations, your Passenger Enterprise License has already been activated!"
-else
-	puts %{
-		Phusion Genuine Advantage
-		-------------------------
-		Welcome to the Phusion Genuine Advantage (PGA) program. This program will help
-		you with activating your Passenger Enterprise License.
-		
-		Please enter your Enterprise License Key:
-	}.gsub(/^\t\t/, '').strip
-	done = false
-	while !done
-		key = STDIN.readline.strip
-		if key == Digest::MD5.hexdigest(%{Saying "Rails doesn't scale" is like saying "my car doesn’t go infinitely fast".})
-			done = true
-		else
-			STDERR.puts "Invalid key given. Please try again:"
-		end
-	end
-	if PhusionPassenger.natively_packaged?
-		enterprise_file = "/etc/passenger_enterprisey.txt"
-	else
-		enterprise_file = "#{SOURCE_ROOT}/enterprisey.txt"
-	end
-	if system("touch", enterprise_file)
-		puts "Congratulations! Your Passenger Enterprise License has been activated!"
-		puts "Please restart Apache or Nginx to take full advantage of your Enterprise License."
-	else
-		STDERR.puts "Could not write to the Passenger folder. Please run this tool as root."
-		exit 1
-	end
-end
diff --git a/bin/passenger-memory-stats b/bin/passenger-memory-stats
index 85186df..3245053 100755
--- a/bin/passenger-memory-stats
+++ b/bin/passenger-memory-stats
@@ -1,5 +1,5 @@
 #!/usr/bin/env ruby
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -22,9 +22,11 @@
 #  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #  THE SOFTWARE.
 
-source_root = File.expand_path(File.dirname(__FILE__) + "/..")
+source_root = File.expand_path("..", File.dirname(__FILE__))
 $LOAD_PATH.unshift("#{source_root}/lib")
 require 'phusion_passenger'
+PhusionPassenger.locate_directories
+
 require 'phusion_passenger/platform_info'
 require 'phusion_passenger/admin_tools/memory_stats'
 
@@ -108,6 +110,8 @@ class App
 	end
 	
 	def start
+		puts "Version: #{PhusionPassenger::VERSION_STRING}"
+		puts "Date   : #{Time.now}"
 		if @stats.apache_processes
 			print_process_list("Apache processes", @stats.apache_processes)
 		else
diff --git a/bin/passenger-status b/bin/passenger-status
index 14f04c9..ab8831d 100755
--- a/bin/passenger-status
+++ b/bin/passenger-status
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -22,97 +22,147 @@
 #  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #  THE SOFTWARE.
 
-source_root = File.expand_path(File.dirname(__FILE__) + "/..")
+source_root = File.expand_path("..", File.dirname(__FILE__))
 $LOAD_PATH.unshift("#{source_root}/lib")
 require 'phusion_passenger'
+PhusionPassenger.locate_directories
+
 require 'phusion_passenger/platform_info'
 require 'phusion_passenger/admin_tools/server_instance'
+require 'phusion_passenger/utils/ansi_colors'
 require 'optparse'
 
 include PhusionPassenger::AdminTools
+include PhusionPassenger::Utils::AnsiColors
 
-# ANSI color codes
-RESET    = "\e[0m"
-BOLD     = "\e[1m"
-YELLOW   = "\e[33m"
-BLACK_BG = "\e[40m"
-BLUE_BG  = "\e[44m"
-
-def show_status(server_instance, options = {})
-	server_instance.connect(:passenger_status) do
-		case options[:show]
-		when 'pool'
-			begin
-				general_info = server_instance.status
-			rescue SystemCallError => e
-				STDERR.puts "*** ERROR: Cannot query status for Phusion Passenger instance #{server_instance.pid}:"
-				STDERR.puts e.to_s
-				exit 2
-			end
-			
-			# Extract only the 'General information' section and colorize it.
-			general_info.sub!(/^(----)(.*)$/, YELLOW + BLUE_BG + BOLD + '\1\2' + RESET)
-			general_info.sub!(/^----.*/m, '')
-			general_info.strip!
-			puts general_info
-			puts
-			
-			puts "#{YELLOW}#{BLUE_BG}#{BOLD}----------- Application groups -----------#{RESET}"
-			server_instance.groups.each do |group|
-				puts "#{group.name}:"
-				if group.name !~ %r{^/} || true
-					puts "  App root: #{group.app_root}"
-				end
-				group.processes.each do |process|
-					printf "  * PID: %-5d   Sessions: %-2d   Processed: %-5d   Uptime: %s\n",
-						process.pid, process.sessions, process.processed,
-						process.uptime
-					if options[:verbose] && process.server_sockets[:http]
-						puts "      URL     : http://#{process.server_sockets[:http].address}"
-						puts "      Password: #{process.connect_password}"
-					end
-				end
-				puts
-			end
-		
-		when 'backtraces'
-			begin
-				text = server_instance.backtraces
-			rescue SystemCallError => e
-				STDERR.puts "*** ERROR: Cannot query status for Passenger instance #{control_process.pid}:"
-				STDERR.puts e.to_s
-				exit 2
-			end
-		
-			# Colorize output
-			text.gsub!(/^(Thread .*:)$/, BLACK_BG + YELLOW + '\1' + RESET)
-			text.gsub!(/^( +in '.*? )(.*?)\(/, '\1' + BOLD + '\2' + RESET + '(')
-		
-			puts text
+DEFAULT_OPTIONS = { :show => 'pool' }.freeze
+
+
+##### Show status command #####
+
+def command_show_status(argv, options)
+	if argv.empty?
+		server_instance = find_sole_server_instance
+	else
+		server_instance = find_server_instance_on_pid(argv[0].to_i)
+	end
+	show_status(server_instance, options)
+end
+
+def find_sole_server_instance
+	server_instances = ServerInstance.list
+	if server_instances.empty?
+		abort "ERROR: Phusion Passenger doesn't seem to be running."
+	elsif server_instances.size == 1
+		return server_instances.first
+	else
+		puts "It appears that multiple Passenger instances are running. Please select a"
+		puts "specific one by running:"
+		puts
+		puts "  passenger-status <PID>"
+		puts
+		puts "The following Passenger instances are running:"
+		server_instances.each do |instance|
+			puts "  PID: #{instance.pid}"
+		end
+		exit 1
+	end
+end
+
+def find_server_instance_on_pid(pid)
+	if server_instance = ServerInstance.for_pid(pid)
+		return server_instance
+	else
+		abort "ERROR: there doesn't seem to be a Phusion Passenger instance running on PID #{pid}."
+	end
+end
+
+def show_status(server_instance, options)
+	puts "Version : #{PhusionPassenger::VERSION_STRING}"
+	puts "Date    : #{Time.now}"
+	puts "Instance: #{server_instance.pid}"
+	case options[:show]
+	when 'pool'
+		client = server_instance.connect(:role => :passenger_status)
+		begin
+			puts client.pool_status(:verbose => options[:verbose], :colorize => true)
+		rescue SystemCallError => e
+			STDERR.puts "*** ERROR: Cannot query status for Phusion Passenger instance #{server_instance.pid}:"
+			STDERR.puts e.to_s
+			exit 2
+		end
+
+	when 'requests'
+		client = server_instance.connect(:role => :passenger_status)
+		begin
+			puts client.helper_agent_requests
+		rescue SystemCallError => e
+			STDERR.puts "*** ERROR: Cannot query status for Phusion Passenger instance #{server_instance.pid}:"
+			STDERR.puts e.to_s
+			exit 2
+		end
+
+	when 'backtraces'
+		client = server_instance.connect(:role => :passenger_status)
+		begin
+			text = client.helper_agent_backtraces
+		rescue SystemCallError => e
+			STDERR.puts "*** ERROR: Cannot query status for Phusion Passenger instance #{control_process.pid}:"
+			STDERR.puts e.to_s
+			exit 2
+		end
+	
+		# Colorize output
+		text.gsub!(/^(Thread .*:)$/, BLACK_BG + YELLOW + '\1' + RESET)
+		text.gsub!(/^( +in '.*? )(.*?)\(/, '\1' + BOLD + '\2' + RESET + '(')
+	
+		puts text
+	
+	when 'xml'
+		client = server_instance.connect(:role => :passenger_status)
+		begin
+			xml = client.pool_xml
+		rescue SystemCallError => e
+			STDERR.puts "*** ERROR: Cannot query status for Phusion Passenger instance #{control_process.pid}:"
+			STDERR.puts e.to_s
+			exit 2
+		end
 		
-		when 'xml'
-			begin
-				xml = server_instance.xml
-			rescue SystemCallError => e
-				STDERR.puts "*** ERROR: Cannot query status for Passenger instance #{control_process.pid}:"
-				STDERR.puts e.to_s
-				exit 2
-			end
-			
-			indented = format_with_xmllint(xml)
-			if indented
-				puts indented
-			else
-				puts xml
-				STDERR.puts "*** Tip: if you install the 'xmllint' command then the XML output will be indented."
-			end
+		indented = format_with_xmllint(xml)
+		if indented
+			puts indented
+		else
+			puts xml
+			STDERR.puts "*** Tip: if you install the 'xmllint' command then the XML output will be indented."
+		end
+
+	when 'union_station'
+		client = server_instance.connect(:role => :passenger_status, :socket_name => 'logging_admin')
+		begin
+			response = client.logging_agent_status
+		rescue SystemCallError => e
+			STDERR.puts "*** ERROR: Cannot query status for Phusion Passenger instance #{control_process.pid}:"
+			STDERR.puts e.to_s
+			exit 2
 		end
+
+		puts response
 	end
 rescue ServerInstance::RoleDeniedError
 	require 'phusion_passenger/platform_info/ruby'
 	STDERR.puts "*** ERROR: You are not authorized to query the status for this Phusion " <<
 		"Passenger instance. Please try again with '#{PhusionPassenger::PlatformInfo.ruby_sudo_command}'."
 	exit 2
+rescue ServerInstance::CorruptedDirectoryError
+	STDERR.puts "*** ERROR: The server instance directory #{server_instance.path} is corrupted. " <<
+		"This could have two causes:\n" <<
+		"\n" <<
+		"  1. The Phusion Passenger instance is no longer running, but failed to cleanup the directory. " <<
+			"Please delete this directory and ignore the problem.\n" <<
+		"  2. An external program corrupted the directory. Please restart Phusion Passenger.\n"
+	exit 2
+ensure
+	client.close if client
 end
 
 def format_with_xmllint(xml)
@@ -150,20 +200,23 @@ def format_with_xmllint(xml)
 	end
 end
 
-def start
-	options = { :show => 'pool' }
-	parser = OptionParser.new do |opts|
+
+##### Main command dispatcher #####
+
+def create_option_parser(options)
+	return OptionParser.new do |opts|
 		opts.banner = "Usage: passenger-status [options] [Phusion Passenger's PID]"
 		opts.separator ""
 		opts.separator "Tool for inspecting Phusion Passenger's internal status."
 		opts.separator ""
 
 		opts.separator "Options:"
-		opts.on("--show=pool|backtraces|xml", String,
-		        "Whether to show the pool's contents, \n" <<
+		opts.on("--show=pool|requests|backtraces|xml|union_station", String,
+		        "Whether to show the pool's contents,\n" <<
+		        "#{' ' * 37}the currently running requests,\n" <<
 		        "#{' ' * 37}the backtraces of all threads or an XML\n" <<
 		        "#{' ' * 37}description of the pool.") do |what|
-			if what !~ /\A(pool|backtraces|xml)\Z/
+			if what !~ /\A(pool|requests|backtraces|xml|union_station)\Z/
 				STDERR.puts "Invalid argument for --show."
 				exit 1
 			else
@@ -174,6 +227,11 @@ def start
 			options[:verbose] = true
 		end
 	end
+end
+
+def parse_argv
+	options = DEFAULT_OPTIONS.dup
+	parser = create_option_parser(options)
 	begin
 		parser.parse!
 	rescue OptionParser::ParseError => e
@@ -182,30 +240,27 @@ def start
 		puts "Please see '--help' for valid options."
 		exit 1
 	end
-	
-	if ARGV.empty?
-		server_instances = ServerInstance.list
-		if server_instances.empty?
-			STDERR.puts("ERROR: Phusion Passenger doesn't seem to be running.")
-			exit 2
-		elsif server_instances.size == 1
-			show_status(server_instances.first, options)
+
+	return options
+end
+
+def infer_command
+	if !ARGV[0] || ARGV[0] =~ /\A[0-9]+\Z/
+		return [:show_status, ARGV.dup]
+	else
+		command_name, *argv = ARGV
+		if respond_to?("command_#{command_name}")
+			return [command_name, argv]
 		else
-			puts "It appears that multiple Passenger instances are running. Please select a"
-			puts "specific one by running:"
-			puts
-			puts "  passenger-status <PID>"
-			puts
-			puts "The following Passenger instances are running:"
-			server_instances.each do |instance|
-				puts "  PID: #{instance.pid}"
-			end
-			exit 1
+			abort "ERROR: unrecognized command '#{command_name}'"
 		end
-	else
-		server_instance = ServerInstance.for_pid(ARGV[0].to_i)
-		show_status(server_instance, options)
 	end
 end
 
+def start
+	options = parse_argv
+	command, argv = infer_command
+	send("command_#{command}", argv, options)
+end
+
 start
diff --git a/build/agents.rb b/build/agents.rb
index 4f6c641..b0b2e20 100644
--- a/build/agents.rb
+++ b/build/agents.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -21,52 +21,128 @@
 #  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #  THE SOFTWARE.
 
+watchdog_libs = COMMON_LIBRARY.only(:base, 'AgentsBase.o', 'Utils/Base64.o')
 dependencies = [
-	'ext/common/Watchdog.cpp',
+	'ext/common/agents/Watchdog/Main.cpp',
+	'ext/common/agents/Watchdog/AgentWatcher.cpp',
+	'ext/common/agents/Watchdog/HelperAgentWatcher.cpp',
+	'ext/common/agents/Watchdog/LoggingAgentWatcher.cpp',
+	'ext/common/agents/Watchdog/ServerInstanceDirToucher.cpp',
+	'ext/common/Constants.h',
 	'ext/common/ServerInstanceDir.h',
 	'ext/common/ResourceLocator.h',
 	'ext/common/Utils/VariantMap.h',
 	LIBBOOST_OXT,
-	LIBCOMMON
-]
+	watchdog_libs.link_objects
+].flatten
 file AGENT_OUTPUT_DIR + 'PassengerWatchdog' => dependencies do
 	sh "mkdir -p #{AGENT_OUTPUT_DIR}" if !File.directory?(AGENT_OUTPUT_DIR)
+	compile_cxx("ext/common/agents/Watchdog/Main.cpp",
+		"-o #{AGENT_OUTPUT_DIR}PassengerWatchdog.o " <<
+		"#{EXTRA_PRE_CXXFLAGS} " <<
+		"-Iext -Iext/common " <<
+		"#{PlatformInfo.portability_cflags} #{AGENT_CFLAGS} #{EXTRA_CXXFLAGS}")
 	create_executable(AGENT_OUTPUT_DIR + 'PassengerWatchdog',
-		'ext/common/Watchdog.cpp',
-		"-Iext -Iext/common #{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS} " <<
-		"#{LIBCOMMON} " <<
+		"#{AGENT_OUTPUT_DIR}PassengerWatchdog.o " <<
+		"#{watchdog_libs.link_objects_as_string} " <<
 		"#{LIBBOOST_OXT} " <<
+		"#{EXTRA_PRE_LDFLAGS} " <<
 		"#{PlatformInfo.portability_ldflags} " <<
 		"#{AGENT_LDFLAGS} " <<
 		"#{EXTRA_LDFLAGS}")
 end
 
+helper_agent_libs = COMMON_LIBRARY.
+	only(:base, :other).
+	exclude('AgentsStarter.o')
 dependencies = [
-	'ext/common/LoggingAgent/Main.cpp',
-	'ext/common/LoggingAgent/LoggingServer.h',
-	'ext/common/LoggingAgent/RemoteSender.h',
-	'ext/common/LoggingAgent/DataStoreId.h',
-	'ext/common/LoggingAgent/FilterSupport.h',
+	'ext/common/agents/HelperAgent/Main.cpp',
+	'ext/common/agents/HelperAgent/RequestHandler.h',
+	'ext/common/agents/HelperAgent/RequestHandler.cpp',
+	'ext/common/agents/HelperAgent/ScgiRequestParser.h',
+	'ext/common/Constants.h',
+	'ext/common/StaticString.h',
+	'ext/common/Account.h',
+	'ext/common/AccountsDatabase.h',
+	'ext/common/MessageServer.h',
+	'ext/common/FileDescriptor.h',
+	'ext/common/Logging.h',
+	'ext/common/ResourceLocator.h',
+	'ext/common/Utils/ProcessMetricsCollector.h',
+	'ext/common/Utils/VariantMap.h',
+	'ext/common/ApplicationPool2/Pool.h',
+	'ext/common/ApplicationPool2/Common.h',
+	'ext/common/ApplicationPool2/SuperGroup.h',
+	'ext/common/ApplicationPool2/Group.h',
+	'ext/common/ApplicationPool2/Process.h',
+	'ext/common/ApplicationPool2/Session.h',
+	'ext/common/ApplicationPool2/Options.h',
+	'ext/common/ApplicationPool2/PipeWatcher.h',
+	'ext/common/ApplicationPool2/Spawner.h',
+	'ext/common/ApplicationPool2/SpawnerFactory.h',
+	'ext/common/ApplicationPool2/SmartSpawner.h',
+	'ext/common/ApplicationPool2/DirectSpawner.h',
+	LIBBOOST_OXT,
+	helper_agent_libs.link_objects,
+	LIBEV_TARGET,
+	LIBEIO_TARGET
+].flatten.compact
+file AGENT_OUTPUT_DIR + 'PassengerHelperAgent' => dependencies do
+	sh "mkdir -p #{AGENT_OUTPUT_DIR}" if !File.directory?(AGENT_OUTPUT_DIR)
+	compile_cxx("ext/common/agents/HelperAgent/Main.cpp",
+		"-o #{AGENT_OUTPUT_DIR}PassengerHelperAgent.o " <<
+		"#{EXTRA_PRE_CXXFLAGS} " <<
+		"-Iext -Iext/common " <<
+		"#{AGENT_CFLAGS} #{LIBEV_CFLAGS} #{LIBEIO_CFLAGS} " <<
+		"#{PlatformInfo.portability_cflags} " <<
+		"#{EXTRA_CXXFLAGS}")
+	create_executable("#{AGENT_OUTPUT_DIR}PassengerHelperAgent",
+		"#{AGENT_OUTPUT_DIR}PassengerHelperAgent.o",
+		"#{helper_agent_libs.link_objects_as_string} " <<
+		"#{LIBBOOST_OXT} " <<
+		"#{EXTRA_PRE_LDFLAGS} " <<
+		"#{LIBEV_LIBS} " <<
+		"#{LIBEIO_LIBS} " <<
+		"#{PlatformInfo.portability_ldflags} " <<
+		"#{AGENT_LDFLAGS} " <<
+		"#{EXTRA_LDFLAGS}")
+end
+
+logging_agent_libs = COMMON_LIBRARY.only(:base, :logging_agent, 'AgentsBase.o',
+	'Utils/Base64.o', 'Utils/MD5.o')
+dependencies = [
+	'ext/common/agents/LoggingAgent/Main.cpp',
+	'ext/common/agents/LoggingAgent/AdminController.h',
+	'ext/common/agents/LoggingAgent/LoggingServer.h',
+	'ext/common/agents/LoggingAgent/RemoteSender.h',
+	'ext/common/agents/LoggingAgent/DataStoreId.h',
+	'ext/common/agents/LoggingAgent/FilterSupport.h',
+	'ext/common/Constants.h',
 	'ext/common/ServerInstanceDir.h',
 	'ext/common/Logging.h',
 	'ext/common/EventedServer.h',
 	'ext/common/EventedClient.h',
 	'ext/common/Utils/VariantMap.h',
 	'ext/common/Utils/BlockingQueue.h',
-	LIBCOMMON,
+	logging_agent_libs.link_objects,
 	LIBBOOST_OXT,
-	:libev
-]
+	LIBEV_TARGET
+].flatten.compact
 file AGENT_OUTPUT_DIR + 'PassengerLoggingAgent' => dependencies do
 	sh "mkdir -p #{AGENT_OUTPUT_DIR}" if !File.directory?(AGENT_OUTPUT_DIR)
-	create_executable(AGENT_OUTPUT_DIR + 'PassengerLoggingAgent',
-		'ext/common/LoggingAgent/Main.cpp',
-		"-Iext -Iext/common #{LIBEV_CFLAGS} " <<
+	compile_cxx("ext/common/agents/LoggingAgent/Main.cpp",
+		"-o #{AGENT_OUTPUT_DIR}PassengerLoggingAgent.o " <<
+		"#{EXTRA_PRE_CXXFLAGS} " <<
+		"-Iext -Iext/common " <<
+		"#{AGENT_CFLAGS} #{LIBEV_CFLAGS} " <<
 		"#{PlatformInfo.curl_flags} " <<
 		"#{PlatformInfo.zlib_flags} " <<
-		"#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS} " <<
-		"#{LIBCOMMON} " <<
+		"#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}")
+	create_executable("#{AGENT_OUTPUT_DIR}PassengerLoggingAgent",
+		"#{AGENT_OUTPUT_DIR}PassengerLoggingAgent.o",
+		"#{logging_agent_libs.link_objects_as_string} " <<
 		"#{LIBBOOST_OXT} " <<
+		"#{EXTRA_PRE_LDFLAGS} " <<
 		"#{LIBEV_LIBS} " <<
 		"#{PlatformInfo.curl_libs} " <<
 		"#{PlatformInfo.zlib_libs} " <<
@@ -75,6 +151,31 @@ file AGENT_OUTPUT_DIR + 'PassengerLoggingAgent' => dependencies do
 		"#{EXTRA_LDFLAGS}")
 end
 
+spawn_preparer_libs = COMMON_LIBRARY.only('Utils/Base64.o')
+dependencies = [
+	'ext/common/agents/SpawnPreparer.cpp',
+	spawn_preparer_libs.link_objects,
+	LIBBOOST_OXT
+].flatten
+file AGENT_OUTPUT_DIR + 'SpawnPreparer' => dependencies do
+	sh "mkdir -p #{AGENT_OUTPUT_DIR}" if !File.directory?(AGENT_OUTPUT_DIR)
+	create_executable(AGENT_OUTPUT_DIR + 'SpawnPreparer',
+		'ext/common/agents/SpawnPreparer.cpp',
+		"#{EXTRA_PRE_CXXFLAGS} #{EXTRA_PRE_LDFLAGS} " <<
+		"-Iext -Iext/common " <<
+		"#{AGENT_CFLAGS} #{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS} " <<
+		"#{spawn_preparer_libs.link_objects_as_string} " <<
+		"#{LIBBOOST_OXT} " <<
+		"#{PlatformInfo.portability_ldflags} " <<
+		"#{EXTRA_LDFLAGS}")
+end
+
+file AGENT_OUTPUT_DIR + 'EnvPrinter' => 'ext/common/agents/EnvPrinter.c' do
+	sh "mkdir -p #{AGENT_OUTPUT_DIR}" if !File.directory?(AGENT_OUTPUT_DIR)
+	create_c_executable(AGENT_OUTPUT_DIR + 'EnvPrinter',
+		'ext/common/agents/EnvPrinter.c')
+end
+
 task 'common:clean' do
-	sh "rm -f #{AGENT_OUTPUT_DIR}PassengerWatchdog #{AGENT_OUTPUT_DIR}PassengerLoggingAgent"
-end
\ No newline at end of file
+	sh "rm -rf #{AGENT_OUTPUT_DIR}"
+end
diff --git a/build/apache2.rb b/build/apache2.rb
index 72dce42..7f2d212 100644
--- a/build/apache2.rb
+++ b/build/apache2.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -35,8 +35,7 @@ APACHE2_MODULE_INPUT_FILES = {
 		ext/apache2/Configuration.cpp
 		ext/apache2/Configuration.h
 		ext/apache2/Configuration.hpp
-		ext/common/Constants.h
-		ext/common/LoggingAgent/FilterSupport.h),
+		ext/common/agents/LoggingAgent/FilterSupport.h),
 	APACHE2_OUTPUT_DIR + 'Bucket.o' => %w(
 		ext/apache2/Bucket.cpp
 		ext/apache2/Bucket.h),
@@ -47,50 +46,49 @@ APACHE2_MODULE_INPUT_FILES = {
 		ext/apache2/Configuration.hpp
 		ext/apache2/Bucket.h
 		ext/apache2/DirectoryMapper.h
-		ext/common/AgentsStarter.hpp
-		ext/common/ApplicationPool/Client.h
-		ext/common/SpawnManager.h
+		ext/common/AgentsStarter.h
 		ext/common/Exceptions.h
-		ext/common/Process.h
-		ext/common/Session.h
 		ext/common/Logging.h
 		ext/common/RandomGenerator.h
-		ext/common/MessageChannel.h
 		ext/common/ServerInstanceDir.h
-		ext/common/PoolOptions.h
-		ext/common/StringListCreator.h
-		ext/common/Constants.h
 		ext/common/Utils.h
 		ext/common/Utils/Timer.h)
 }
 APACHE2_MODULE_OBJECTS = APACHE2_MODULE_INPUT_FILES.keys
 APACHE2_MOD_PASSENGER_O = APACHE2_OUTPUT_DIR + "mod_passenger.o"
 
-APACHE2_MODULE_CXXFLAGS = "-Iext -Iext/common #{PlatformInfo.apache2_module_cflags} " <<
+APACHE2_MODULE_CXXFLAGS =
+	"#{EXTRA_PRE_CXXFLAGS} " <<
+	"-Iext -Iext/common #{PlatformInfo.apache2_module_cflags} " <<
 	"#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}"
-APACHE2_HELPER_CXXFLAGS = "-Iext -Iext/common #{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}"
 
 APACHE2_MODULE_BOOST_OXT_LIBRARY = define_libboost_oxt_task("apache2",
 	APACHE2_OUTPUT_DIR + "module_libboost_oxt",
 	PlatformInfo.apache2_module_cflags)
-APACHE2_MODULE_COMMON_LIBRARY    = define_common_library_task("apache2",
-	APACHE2_OUTPUT_DIR + "module_libpassenger_common",
-	PlatformInfo.apache2_module_cflags)
+APACHE2_MODULE_COMMON_LIBRARIES  = COMMON_LIBRARY.
+	only(:base, 'ApplicationPool2/AppTypes.o', 'Utils/Base64.o',
+		'Utils/MD5.o', 'Utils/LargeFiles.o').
+	set_namespace("apache2").
+	set_output_dir(APACHE2_OUTPUT_DIR + "module_libpassenger_common").
+	define_tasks(PlatformInfo.apache2_module_cflags).
+	link_objects
 
 
 desc "Build Apache 2 module"
 task :apache2 => [
 	APACHE2_MODULE,
-	AGENT_OUTPUT_DIR + 'apache2/PassengerHelperAgent',
+	AGENT_OUTPUT_DIR + 'PassengerHelperAgent',
 	AGENT_OUTPUT_DIR + 'PassengerWatchdog',
 	AGENT_OUTPUT_DIR + 'PassengerLoggingAgent',
-	:native_support
-]
+	AGENT_OUTPUT_DIR + 'SpawnPreparer',
+	NATIVE_SUPPORT_TARGET
+].compact
 
 
 # Define rules for the individual Apache 2 module source files.
 APACHE2_MODULE_INPUT_FILES.each_pair do |target, sources|
-	file(target => sources) do
+	extra_deps = ['ext/common/Constants.h']
+	file(target => sources + extra_deps) do
 		object_basename = File.basename(target)
 		object_filename = APACHE2_OUTPUT_DIR + object_basename
 		compile_cxx(sources[0], "#{APACHE2_MODULE_CXXFLAGS} -o #{object_filename}")
@@ -99,7 +97,7 @@ end
 
 
 dependencies = [
-	APACHE2_MODULE_COMMON_LIBRARY,
+	APACHE2_MODULE_COMMON_LIBRARIES,
 	APACHE2_MODULE_BOOST_OXT_LIBRARY,
 	APACHE2_MOD_PASSENGER_O,
 	APACHE2_MODULE_OBJECTS
@@ -111,10 +109,11 @@ file APACHE2_MODULE => dependencies do
 	
 	sources = (APACHE2_MODULE_OBJECTS + [APACHE2_MOD_PASSENGER_O]).join(' ')
 	linkflags =
+		"#{EXTRA_PRE_CXXFLAGS} #{EXTRA_PRE_LDFLAGS} " <<
 		"#{PlatformInfo.apache2_module_cflags} " <<
 		"#{PlatformInfo.portability_cflags} " <<
 		"#{EXTRA_CXXFLAGS} " <<
-		"#{APACHE2_MODULE_COMMON_LIBRARY} " <<
+		"#{APACHE2_MODULE_COMMON_LIBRARIES.join(' ')} " <<
 		"#{APACHE2_MODULE_BOOST_OXT_LIBRARY} " <<
 		"#{PlatformInfo.apache2_module_ldflags} " <<
 		"#{PlatformInfo.portability_ldflags} " <<
@@ -128,42 +127,11 @@ file APACHE2_MOD_PASSENGER_O => ['ext/apache2/mod_passenger.c'] do
 		"#{APACHE2_MODULE_CXXFLAGS} -o #{APACHE2_MOD_PASSENGER_O}")
 end
 
-dependencies = [
-	'ext/apache2/HelperAgent.cpp',
-	'ext/common/ServerInstanceDir.h',
-	'ext/common/MessageServer.h',
-	'ext/common/Logging.h',
-	'ext/common/SpawnManager.h',
-	'ext/common/Account.h',
-	'ext/common/ResourceLocator.h',
-	'ext/common/Utils.h',
-	'ext/common/Utils/Timer.h',
-	'ext/common/Utils/ProcessMetricsCollector.h',
-	'ext/common/ApplicationPool/Interface.h',
-	'ext/common/ApplicationPool/Pool.h',
-	'ext/common/ApplicationPool/Server.h',
-	LIBCOMMON,
-	LIBBOOST_OXT
-]
-file AGENT_OUTPUT_DIR + 'apache2/PassengerHelperAgent' => dependencies do
-	dir = "#{AGENT_OUTPUT_DIR}apache2"
-	sh "mkdir -p #{dir}" if !File.directory?(dir)
-	create_executable("#{dir}/PassengerHelperAgent",
-		'ext/apache2/HelperAgent.cpp',
-		"#{APACHE2_HELPER_CXXFLAGS} " <<
-		"#{LIBCOMMON} " <<
-		"#{LIBBOOST_OXT} " <<
-		"#{PlatformInfo.portability_ldflags} " <<
-		"#{AGENT_LDFLAGS} " <<
-		"#{EXTRA_LDFLAGS}")
-end
-
 task :clean => 'apache2:clean'
 desc "Clean all compiled Apache 2 files"
 task 'apache2:clean' => 'common:clean' do
 	files = APACHE2_MODULE_OBJECTS.dup
 	files << APACHE2_MOD_PASSENGER_O
 	files << APACHE2_MODULE
-	files << AGENT_OUTPUT_DIR + "PassengerHelperAgent"
 	sh("rm", "-rf", *files)
-end
\ No newline at end of file
+end
diff --git a/build/basics.rb b/build/basics.rb
index 6fe991e..460a2a9 100644
--- a/build/basics.rb
+++ b/build/basics.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010, 2011, 2012 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -23,7 +23,9 @@
 
 require 'rubygems'
 require 'pathname'
+require 'fileutils'
 require 'phusion_passenger'
+PhusionPassenger.locate_directories
 require 'phusion_passenger/packaging'
 require 'phusion_passenger/platform_info'
 require 'phusion_passenger/platform_info/operating_system'
@@ -33,17 +35,36 @@ require 'phusion_passenger/platform_info/apache'
 require 'phusion_passenger/platform_info/curl'
 require 'phusion_passenger/platform_info/zlib'
 require 'phusion_passenger/platform_info/compiler'
+require 'phusion_passenger/platform_info/cxx_portability'
 
 include PhusionPassenger
 include PhusionPassenger::PlatformInfo
 
-require 'build/packagetask'
-require 'build/gempackagetask'
 require 'build/rake_extensions'
 require 'build/cplusplus_support'
 
 #################################################
 
+class TemplateRenderer
+	def initialize(filename)
+		require 'erb' if !defined?(ERB)
+		@erb = ERB.new(File.read(filename))
+		@erb.filename = filename
+	end
+
+	def render
+		return @erb.result(binding)
+	end
+
+	def render_to(filename)
+		puts "Creating #{filename}"
+		text = render
+		File.open(filename, 'w') do |f|
+			f.write(text)
+		end
+	end
+end
+
 def string_option(name, default_value = nil)
 	value = ENV[name]
 	if value.nil? || value.empty?
@@ -62,26 +83,21 @@ def boolean_option(name, default_value = false)
 	end
 end
 
+def maybe_wrap_in_ccache(command)
+	if boolean_option('USE_CCACHE', false)
+		return "ccache #{command}"
+	else
+		return command
+	end
+end
+
 #################################################
 
 if string_option('OUTPUT_DIR')
 	OUTPUT_DIR = string_option('OUTPUT_DIR') + "/"
 else
-	OUTPUT_DIR = ""
+	OUTPUT_DIR = "buildout/"
 end
-AGENT_OUTPUT_DIR          = string_option('AGENT_OUTPUT_DIR', OUTPUT_DIR + "agents") + "/"
-COMMON_OUTPUT_DIR         = string_option('COMMON_OUTPUT_DIR', OUTPUT_DIR + "ext/common") + "/"
-APACHE2_OUTPUT_DIR        = string_option('APACHE2_OUTPUT_DIR', OUTPUT_DIR + "ext/apache2") + "/"
-LIBEV_OUTPUT_DIR          = string_option('LIBEV_OUTPUT_DIR', OUTPUT_DIR + "ext/libev") + "/"
-ruby_extension_archdir = PlatformInfo.ruby_extension_binary_compatibility_ids.join("-")
-RUBY_EXTENSION_OUTPUT_DIR = string_option('RUBY_EXTENSION_OUTPUT_DIR',
-	OUTPUT_DIR + "ext/ruby/" + ruby_extension_archdir) + "/"
-
-LIBEXT = PlatformInfo.library_extension
-
-# Extra linker flags for backtrace_symbols() to generate useful output (see AgentsBase.cpp).
-AGENT_LDFLAGS = PlatformInfo.export_dynamic_flags
-
 
 verbose true if !boolean_option('REALLY_QUIET')
 if boolean_option('STDERR_TO_STDOUT')
@@ -95,9 +111,82 @@ if boolean_option('STDERR_TO_STDOUT')
 end
 
 if boolean_option('CACHING', true) && !boolean_option('RELEASE')
-	if OUTPUT_DIR.empty?
-		PlatformInfo.cache_dir = File.expand_path("cache", File.dirname(__FILE__))
-	else
-		PlatformInfo.cache_dir = OUTPUT_DIR + "cache"
-	end
+	PlatformInfo.cache_dir = OUTPUT_DIR + "cache"
+	FileUtils.mkdir_p(PlatformInfo.cache_dir)
 end
+
+#################################################
+
+PACKAGE_NAME    = PhusionPassenger::PACKAGE_NAME
+PACKAGE_VERSION = PhusionPassenger::VERSION_STRING
+PACKAGE_SIGNING_KEY = string_option('PACKAGE_SIGNING_KEY', '0x0A212A8C')
+MAINTAINER_NAME  = "Phusion"
+MAINTAINER_EMAIL = "info at phusion.nl"
+
+OPTIMIZE = boolean_option("OPTIMIZE")
+CC       = maybe_wrap_in_ccache(string_option("CC", "gcc"))
+CXX      = maybe_wrap_in_ccache(string_option("CXX", "g++"))
+LIBEXT   = PlatformInfo.library_extension
+USE_DMALLOC = boolean_option('USE_DMALLOC')
+USE_EFENCE  = boolean_option('USE_EFENCE')
+USE_ASAN    = boolean_option('USE_ASAN')
+OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -fcommon".strip
+OPTIMIZATION_FLAGS << " -O" if OPTIMIZE
+OPTIMIZATION_FLAGS << " -feliminate-unused-debug-symbols -feliminate-unused-debug-types" if PlatformInfo.compiler_supports_feliminate_unused_debug?
+OPTIMIZATION_FLAGS << " -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED" if PlatformInfo.compiler_supports_visibility_flag?
+OPTIMIZATION_FLAGS << " -Wno-attributes" if PlatformInfo.compiler_supports_visibility_flag? &&
+	PlatformInfo.compiler_visibility_flag_generates_warnings? &&
+	PlatformInfo.compiler_supports_wno_attributes_flag?
+OPTIMIZATION_FLAGS << " -fno-omit-frame-pointers" if USE_ASAN
+
+# Agent-specific compiler flags.
+AGENT_CFLAGS  = ""
+AGENT_CFLAGS << " -faddress-sanitizer" if USE_ASAN
+AGENT_CFLAGS.strip!
+
+# Agent-specific linker flags.
+AGENT_LDFLAGS = ""
+AGENT_LDFLAGS << " #{PlatformInfo.dmalloc_ldflags}" if USE_DMALLOC
+AGENT_LDFLAGS << " #{PlatformInfo.electric_fence_ldflags}" if USE_EFENCE
+AGENT_LDFLAGS << " -faddress-sanitizer" if USE_ASAN
+# Extra linker flags for backtrace_symbols() to generate useful output (see AgentsBase.cpp).
+AGENT_LDFLAGS << " #{PlatformInfo.export_dynamic_flags}"
+# Enable dead symbol elimination on OS X.
+AGENT_LDFLAGS << " -Wl,-dead_strip" if RUBY_PLATFORM =~ /darwin/
+AGENT_LDFLAGS.strip!
+
+# Extra compiler flags that should always be passed to the C/C++ compiler.
+# These should be included first in the command string, before anything else.
+EXTRA_PRE_CFLAGS = string_option('EXTRA_PRE_CFLAGS', '').gsub("\n", " ")
+EXTRA_PRE_CXXFLAGS = string_option('EXTRA_PRE_CXXFLAGS', '').gsub("\n", " ")
+# These should be included last in the command string, even after PlatformInfo.portability_cflags.
+EXTRA_CXXFLAGS = "-Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long"
+EXTRA_CXXFLAGS << " -Wno-missing-field-initializers" if PlatformInfo.compiler_supports_wno_missing_field_initializers_flag?
+EXTRA_CXXFLAGS << " -mno-tls-direct-seg-refs" if PlatformInfo.requires_no_tls_direct_seg_refs? && PlatformInfo.compiler_supports_no_tls_direct_seg_refs_option?
+# Work around Clang warnings in ev++.h.
+EXTRA_CXXFLAGS << " -Wno-ambiguous-member-template" if PlatformInfo.cxx_is_clang?
+EXTRA_CXXFLAGS << " #{OPTIMIZATION_FLAGS}" if !OPTIMIZATION_FLAGS.empty?
+EXTRA_CXXFLAGS << " " << string_option('EXTRA_CXXFLAGS').gsub("\n", " ") if string_option('EXTRA_CXXFLAGS')
+
+# Extra linker flags that should always be passed to the linker.
+# These should be included first in the command string, before anything else.
+EXTRA_PRE_LDFLAGS  = string_option('EXTRA_PRE_LDFLAGS', '').gsub("\n", " ")
+# These should be included last in the command string, even after PlatformInfo.portability_ldflags.
+EXTRA_LDFLAGS  = string_option('EXTRA_LDFLAGS', '').gsub("\n", " ")
+
+
+AGENT_OUTPUT_DIR          = string_option('AGENT_OUTPUT_DIR', OUTPUT_DIR + "agents") + "/"
+COMMON_OUTPUT_DIR         = string_option('COMMON_OUTPUT_DIR', OUTPUT_DIR + "common") + "/"
+APACHE2_OUTPUT_DIR        = string_option('APACHE2_OUTPUT_DIR', OUTPUT_DIR + "apache2") + "/"
+LIBEV_OUTPUT_DIR          = string_option('LIBEV_OUTPUT_DIR', OUTPUT_DIR + "libev") + "/"
+LIBEIO_OUTPUT_DIR         = string_option('LIBEIO_OUTPUT_DIR', OUTPUT_DIR + "libeio") + "/"
+ruby_extension_archdir    = PlatformInfo.ruby_extension_binary_compatibility_id
+RUBY_EXTENSION_OUTPUT_DIR = string_option('RUBY_EXTENSION_OUTPUT_DIR',
+	OUTPUT_DIR + "ruby/" + ruby_extension_archdir) + "/"
+PKG_DIR                   = string_option('PKG_DIR', "pkg")
+
+
+# Whether to use the vendored libev or the system one.
+USE_VENDORED_LIBEV = boolean_option("USE_VENDORED_LIBEV", true)
+# Whether to use the vendored libeio or the system one.
+USE_VENDORED_LIBEIO = boolean_option("USE_VENDORED_LIBEIO", true)
diff --git a/build/common_library.rb b/build/common_library.rb
index c56be4b..eecd66e 100644
--- a/build/common_library.rb
+++ b/build/common_library.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -21,151 +21,26 @@
 #  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #  THE SOFTWARE.
 
+require 'phusion_passenger/platform_info/compiler'
+require 'phusion_passenger/platform_info/cxx_portability'
 
-# Defines tasks for compiling a static library containing code shared between
-# all Phusion Passenger components.
-#
-# namespace: a 'clean' task will be defined in the given namespace.
-# output_dir: directory in which compilation objects should be placed.
-# extra_compiler_flags: extra flags to pass to the compiler when compiling
-#   the library source files.
-# Returns: filename of the static library to be generated. There's a file
-#   target defined for this filename.
-def define_common_library_task(namespace, output_dir, extra_compiler_flags = nil)
-	components = {
-		'Logging.o' => %w(
-			Logging.cpp
-			Logging.h),
-		'Utils/CachedFileStat.o' => %w(
-			Utils/CachedFileStat.cpp
-			Utils/CachedFileStat.h
-			Utils/CachedFileStat.hpp),
-		'Utils/Base64.o' => %w(
-			Utils/Base64.cpp
-			Utils/Base64.h),
-		'Utils/MD5.o' => %w(
-			Utils/MD5.cpp
-			Utils/MD5.h),
-		'Utils/SystemTime.o' => %w(
-			Utils/SystemTime.cpp
-			Utils/SystemTime.h),
-		'Utils/StrIntUtils.o' => %w(
-			Utils/StrIntUtils.cpp
-			Utils/StrIntUtils.h),
-		'Utils/IOUtils.o' => %w(
-			Utils/IOUtils.cpp
-			Utils/IOUtils.h),
-		'Utils.o' => %w(
-			Utils.cpp
-			Utils.h
-			Utils/Base64.h
-			Utils/StrIntUtils.h
-			ResourceLocator.h),
-		'AccountsDatabase.o' => %w(
-			AccountsDatabase.cpp
-			AccountsDatabase.h
-			RandomGenerator.h
-			Constants.h
-			Utils.h),
-		'AgentsStarter.o' => %w(
-			AgentsStarter.cpp
-			AgentsStarter.h
-			AgentsStarter.hpp
-			IniFile.h
-			ResourceLocator.h
-			MessageClient.h
-			MessageChannel.h
-			ServerInstanceDir.h
-			Utils/VariantMap.h),
-		'AgentBase.o' => %w(
-			AgentBase.cpp
-			AgentBase.h
-			Utils/VariantMap.h),
-		'LoggingAgent/FilterSupport.o' => %w(
-			LoggingAgent/FilterSupport.cpp
-			LoggingAgent/FilterSupport.h),
-		#'BCrypt.o' => %w(
-		#	BCrypt.cpp
-		#	BCrypt.h
-		#	Blowfish.h
-		#	Blowfish.c)
-	}
-	
-	static_library = "#{output_dir}.a"
-	
-	# Define compilation targets for the object files in libpassenger_common.
-	flags =  "-Iext -Iext/common #{LIBEV_CFLAGS} #{extra_compiler_flags} "
-	flags << "#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}"
-	flags.strip!
-	
-	if boolean_option('RELEASE')
-		sources = []
-		components.each_pair do |object_name, dependencies|
-			sources << "ext/common/#{dependencies[0]}"
-		end
-		sources.sort!
-		
-		aggregate_source = "#{output_dir}/aggregate.cpp"
-		aggregate_object = "#{output_dir}/aggregate.o"
-		object_files     = [aggregate_object]
-		
-		file(aggregate_object => sources) do
-			sh "mkdir -p #{output_dir}" if !File.directory?(output_dir)
-			aggregate_content = %Q{
-				#ifndef _GNU_SOURCE
-					#define _GNU_SOURCE
-				#endif
-			}
-			sources.each do |source_file|
-				name = source_file.sub(/^ext\//, '')
-				aggregate_content << "#include \"#{name}\"\n"
-			end
-			File.open(aggregate_source, 'w') do |f|
-				f.write(aggregate_content)
-			end
-			compile_cxx(aggregate_source, "#{flags} -o #{aggregate_object}")
-		end
-	else
-		object_files = []
-		components.each_pair do |object_name, dependencies|
-			source_file = dependencies[0]
-			object_file = "#{output_dir}/#{object_name}"
-			object_files << object_file
-			dependencies = dependencies.map do |dep|
-				"ext/common/#{dep}"
-			end
-		
-			file object_file => dependencies do
-				sh "mkdir -p #{output_dir}" if !File.directory?(output_dir)
-				sh "mkdir -p #{output_dir}/Utils" if !File.directory?("#{output_dir}/Utils")
-				sh "mkdir -p #{output_dir}/LoggingAgent" if !File.directory?("#{output_dir}/LoggingAgent")
-				if source_file =~ /\.c$/
-					compile_c("ext/common/#{source_file}", "#{flags} -o #{object_file}")
-				else
-					compile_cxx("ext/common/#{source_file}", "#{flags} -o #{object_file}")
-				end
-			end
-		end
-	end
-	
-	file(static_library => object_files) do
-		create_static_library(static_library, object_files.join(' '))
-	end
-	
-	task "#{namespace}:clean" do
-		sh "rm -rf #{static_library} #{output_dir}"
-	end
-	
-	return static_library
-end
+########## Phusion Passenger common library ##########
+
+require 'phusion_passenger/common_library'
+
+
+########## libboost_oxt ##########
 
 # Defines tasks for compiling a static library containing Boost and OXT.
 def define_libboost_oxt_task(namespace, output_dir, extra_compiler_flags = nil)
 	output_file = "#{output_dir}.a"
 	flags = "-Iext #{extra_compiler_flags} #{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}"
 	
-	if boolean_option('RELEASE')
-		sources = Dir['ext/boost/src/pthread/*.cpp'] + Dir['ext/oxt/*.cpp']
+	if false && boolean_option('RELEASE')
+		# Disable RELEASE support. Passenger Standalone wants to link to the
+		# common library but does not know whether it was compiled with RELEASE
+		# or not. See http://code.google.com/p/phusion-passenger/issues/detail?id=808
+		sources = Dir['ext/boost/libs/**/*.cpp'] + Dir['ext/oxt/*.cpp']
 		sources.sort!
 		
 		aggregate_source = "#{output_dir}/aggregate.cpp"
@@ -191,7 +66,7 @@ def define_libboost_oxt_task(namespace, output_dir, extra_compiler_flags = nil)
 	else
 		# Define compilation targets for .cpp files in ext/boost/src/pthread.
 		boost_object_files = []
-		Dir['ext/boost/src/pthread/*.cpp'].each do |source_file|
+		Dir['ext/boost/libs/**/*.cpp'].each do |source_file|
 			object_name = File.basename(source_file.sub(/\.cpp$/, '.o'))
 			boost_output_dir  = "#{output_dir}/boost"
 			object_file = "#{boost_output_dir}/#{object_name}"
@@ -240,8 +115,9 @@ if USE_VENDORED_LIBEV
 	LIBEV_SOURCE_DIR = File.expand_path("../ext/libev", File.dirname(__FILE__)) + "/"
 	LIBEV_CFLAGS = "-Iext/libev"
 	LIBEV_LIBS = LIBEV_OUTPUT_DIR + ".libs/libev.a"
+	LIBEV_TARGET = LIBEV_LIBS
 	
-	task :libev => LIBEV_OUTPUT_DIR + ".libs/libev.a"
+	task :libev => LIBEV_TARGET
 	
 	dependencies = [
 		"ext/libev/configure",
@@ -249,8 +125,11 @@ if USE_VENDORED_LIBEV
 		"ext/libev/Makefile.am"
 	]
 	file LIBEV_OUTPUT_DIR + "Makefile" => dependencies do
+		# Disable all warnings: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#COMPILER_WARNINGS
+		cflags = "#{EXTRA_CXXFLAGS} -w"
 		sh "mkdir -p #{LIBEV_OUTPUT_DIR}" if !File.directory?(LIBEV_OUTPUT_DIR)
-		sh "cd #{LIBEV_OUTPUT_DIR} && sh #{LIBEV_SOURCE_DIR}configure --disable-shared --enable-static"
+		sh "cd #{LIBEV_OUTPUT_DIR} && sh #{LIBEV_SOURCE_DIR}configure " +
+			"--disable-shared --enable-static CFLAGS='#{cflags}' orig_CFLAGS=1"
 	end
 	
 	libev_sources = Dir["ext/libev/{*.c,*.h}"]
@@ -258,21 +137,89 @@ if USE_VENDORED_LIBEV
 		sh "rm -f #{LIBEV_OUTPUT_DIR}/libev.la"
 		sh "cd #{LIBEV_OUTPUT_DIR} && make libev.la"
 	end
-	
-	task :clean do
+
+	task 'libev:clean' do
 		if File.exist?(LIBEV_OUTPUT_DIR + "Makefile")
 			sh "cd #{LIBEV_OUTPUT_DIR} && make maintainer-clean"
 		end
 	end
+	
+	task :clean => 'libev:clean'
 else
 	LIBEV_CFLAGS = string_option('LIBEV_CFLAGS', '-I/usr/include/libev')
 	LIBEV_LIBS   = string_option('LIBEV_LIBS', '-lev')
+	LIBEV_TARGET = nil
 	task :libev  # do nothing
 end
 
+# Apple Clang 4.2 complains about ambiguous member templates in ev++.h.
+LIBEV_CFLAGS << " -Wno-ambiguous-member-template" if PlatformInfo.compiler_supports_wno_ambiguous_member_template?
+
+
+########## libeio ##########
+
+if USE_VENDORED_LIBEIO
+	LIBEIO_SOURCE_DIR = File.expand_path("../ext/libeio", File.dirname(__FILE__)) + "/"
+	LIBEIO_CFLAGS = "-Iext/libeio"
+	LIBEIO_LIBS = LIBEIO_OUTPUT_DIR + ".libs/libeio.a"
+	LIBEIO_TARGET = LIBEIO_LIBS
+	
+	task :libeio => LIBEIO_TARGET
+	
+	dependencies = [
+		"ext/libeio/configure",
+		"ext/libeio/config.h.in",
+		"ext/libeio/Makefile.am"
+	]
+	file LIBEIO_OUTPUT_DIR + "Makefile" => dependencies do
+		# Disable all warnings. The author has a clear standpoint on that:
+		# http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#COMPILER_WARNINGS
+		cflags = "#{EXTRA_CXXFLAGS} -w"
+		sh "mkdir -p #{LIBEIO_OUTPUT_DIR}" if !File.directory?(LIBEIO_OUTPUT_DIR)
+		sh "cd #{LIBEIO_OUTPUT_DIR} && sh #{LIBEIO_SOURCE_DIR}configure " +
+			"--disable-shared --enable-static CFLAGS='#{cflags}'"
+	end
+	
+	libeio_sources = Dir["ext/libeio/{*.c,*.h}"]
+	file LIBEIO_OUTPUT_DIR + ".libs/libeio.a" => [LIBEIO_OUTPUT_DIR + "Makefile"] + libeio_sources do
+		sh "rm -f #{LIBEIO_OUTPUT_DIR}/libeio.la"
+		sh "cd #{LIBEIO_OUTPUT_DIR} && make libeio.la"
+	end
+	
+	task :clean do
+		if File.exist?(LIBEIO_OUTPUT_DIR + "Makefile")
+			sh "cd #{LIBEIO_OUTPUT_DIR} && make maintainer-clean"
+		end
+	end
+else
+	LIBEIO_CFLAGS = string_option('LIBEIO_CFLAGS', '-I/usr/include/libeio')
+	LIBEIO_LIBS   = string_option('LIBEIO_LIBS', '-leio')
+	LIBEIO_TARGET = nil
+	task :libeio  # do nothing
+end
+
+
+########## Shared definitions ##########
+# Shared definition files should be in source control so that they don't
+# have to be built by users. Users may not have write access to the source
+# root, for example as is the case with Passenger Standalone.
+#
+# If you add a new shared definition file, don't forget to update
+# lib/phusion_passenger/packaging.rb!
+
+dependencies = ['ext/common/Constants.h.erb', 'lib/phusion_passenger.rb', 'lib/phusion_passenger/constants.rb']
+file 'ext/common/Constants.h' => dependencies do
+	require 'phusion_passenger/constants'
+	template = TemplateRenderer.new('ext/common/Constants.h.erb')
+	template.render_to('ext/common/Constants.h')
+end
+
 
 ##############################
 
 
-LIBBOOST_OXT = define_libboost_oxt_task("common", COMMON_OUTPUT_DIR + "libboost_oxt")
-LIBCOMMON    = define_common_library_task("common", COMMON_OUTPUT_DIR + "libpassenger_common")
+libboost_oxt_cflags = ""
+libboost_oxt_cflags << " -faddress-sanitizer" if USE_ASAN
+libboost_oxt_cflags.strip!
+LIBBOOST_OXT = define_libboost_oxt_task("common", COMMON_OUTPUT_DIR + "libboost_oxt", libboost_oxt_cflags)
+COMMON_LIBRARY.define_tasks(libboost_oxt_cflags)
diff --git a/build/config.rb b/build/config.rb
deleted file mode 100644
index a89c3d4..0000000
--- a/build/config.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-OPTIMIZE = boolean_option("OPTIMIZE")
-CC       = string_option("CC", "gcc")
-CXX      = string_option("CXX", "g++")
-# TODO: consider -fcommon
-if OPTIMIZE
-	OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -O2 -DBOOST_DISABLE_ASSERTS".strip
-else
-	OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS".strip
-end
-
-# Extra compiler flags that should always be passed to the C/C++ compiler.
-# Should be included last in the command string, even after PlatformInfo.portability_cflags.
-EXTRA_CXXFLAGS = "-Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long"
-EXTRA_CXXFLAGS << " -Wno-missing-field-initializers" if PlatformInfo.compiler_supports_wno_missing_field_initializers_flag?
-EXTRA_CXXFLAGS << " -mno-tls-direct-seg-refs" if PlatformInfo.requires_no_tls_direct_seg_refs? && PlatformInfo.compiler_supports_no_tls_direct_seg_refs_option?
-EXTRA_CXXFLAGS << " #{OPTIMIZATION_FLAGS}" if !OPTIMIZATION_FLAGS.empty?
-
-# Extra linker flags that should always be passed to the linker.
-# Should be included last in the command string, even after PlatformInfo.portability_ldflags.
-EXTRA_LDFLAGS  = ""
-
-# Whether to use the vendored libev or the system one.
-USE_VENDORED_LIBEV = boolean_option("USE_VENDORED_LIBEV", true)
diff --git a/build/cplusplus_support.rb b/build/cplusplus_support.rb
index 56c166f..a0fd8e2 100644
--- a/build/cplusplus_support.rb
+++ b/build/cplusplus_support.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -23,12 +23,42 @@
 
 # Rake functions for compiling/linking C++ stuff.
 
-def compile_c(source, flags = "#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}")
-	sh "#{CC} #{flags} -c #{source}"
+def run_compiler(*command)
+	require 'phusion_passenger/utils/ansi_colors' if !defined?(PhusionPassenger::Utils::AnsiColors)
+	show_command = command.join(' ')
+	puts show_command
+	if !system(*command)
+		if $? && $?.exitstatus == 4
+			# This probably means the compiler ran out of memory.
+			msg = "<b>" +
+			      "-----------------------------------------------\n" +
+			      "Your compiler failed with the exit status 4. This " +
+			      "probably means that it ran out of memory. To solve " +
+			      "this problem, try increasing your swap space: " +
+			      "https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04" +
+			      "</b>"
+			fail(PhusionPassenger::Utils::AnsiColors.ansi_colorize(msg))
+		elsif $? && $?.termsig == 9
+			msg = "<b>" +
+			      "-----------------------------------------------\n" +
+			      "Your compiler was killed by the operating system. This " +
+			      "probably means that it ran out of memory. To solve " +
+			      "this problem, try increasing your swap space: " +
+			      "https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04" +
+			      "</b>"
+			fail(PhusionPassenger::Utils::AnsiColors.ansi_colorize(msg))
+		else
+			fail "Command failed with status (#{$? ? $?.exitstatus : 1}): [#{show_command}]"
+		end
+	end
+end
+
+def compile_c(source, flags = "#{EXTRA_PRE_CFLAGS} #{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}")
+	run_compiler "#{CC} #{flags} -c #{source}"
 end
 
-def compile_cxx(source, flags = "#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}")
-	sh "#{CXX} #{flags} -c #{source}"
+def compile_cxx(source, flags = "#{EXTRA_PRE_CXXFLAGS} #{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}")
+	run_compiler "#{CXX} #{flags} -c #{source}"
 end
 
 def create_static_library(target, sources)
@@ -43,19 +73,19 @@ def create_static_library(target, sources)
 	sh "ranlib #{target}"
 end
 
-def create_executable(target, sources, linkflags = "#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS} #{PlatformInfo.portability_ldflags} #{EXTRA_LDFLAGS}")
-	sh "#{CXX} #{sources} -o #{target} #{linkflags}"
+def create_executable(target, sources, linkflags = "#{EXTRA_PRE_CXXFLAGS} #{EXTRA_PRE_LDFLAGS} #{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS} #{PlatformInfo.portability_ldflags} #{EXTRA_LDFLAGS}")
+	run_compiler "#{CXX} #{sources} -o #{target} #{linkflags}"
 end
 
-def create_c_executable(target, sources, linkflags = "#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS} #{PlatformInfo.portability_ldflags} #{EXTRA_LDFLAGS}")
-	sh "#{CC} #{sources} -o #{target} #{linkflags}"
+def create_c_executable(target, sources, linkflags = "#{EXTRA_PRE_CFLAGS} #{EXTRA_PRE_LDFLAGS} #{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS} #{PlatformInfo.portability_ldflags} #{EXTRA_LDFLAGS}")
+	run_compiler "#{CC} #{sources} -o #{target} #{linkflags}"
 end
 
-def create_shared_library(target, sources, flags = "#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS} #{PlatformInfo.portability_ldflags} #{EXTRA_LDFLAGS}")
-	if RUBY_PLATFORM =~ /darwin/
+def create_shared_library(target, sources, flags = "#{EXTRA_PRE_CXXFLAGS} #{EXTRA_PRE_LDFLAGS} #{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS} #{PlatformInfo.portability_ldflags} #{EXTRA_LDFLAGS}")
+	if PlatformInfo.os_name == "macosx"
 		shlib_flag = "-flat_namespace -bundle -undefined dynamic_lookup"
 	else
 		shlib_flag = "-shared"
 	end
-	sh "#{CXX} #{shlib_flag} #{sources} -fPIC -o #{target} #{flags}"
+	run_compiler "#{CXX} #{shlib_flag} #{sources} -fPIC -o #{target} #{flags}"
 end
diff --git a/build/cxx_tests.rb b/build/cxx_tests.rb
index 2b3369d..fa2eecf 100644
--- a/build/cxx_tests.rb
+++ b/build/cxx_tests.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -23,98 +23,72 @@
 
 ### C++ components tests ###
 
-TEST_CXX_CFLAGS = "-Iext -Iext/common -Iext/nginx " <<
-	"#{LIBEV_CFLAGS} #{PlatformInfo.curl_flags} -Itest/support " <<
+TEST_CXX_CFLAGS = "-Iext -Iext/common " <<
+	"#{LIBEV_CFLAGS} #{LIBEIO_CFLAGS} #{PlatformInfo.curl_flags} -Itest/cxx -Itest/support " <<
 	"#{TEST_COMMON_CFLAGS}"
-TEST_CXX_LDFLAGS = "#{TEST_COMMON_LIBRARY} #{TEST_BOOST_OXT_LIBRARY} #{LIBEV_LIBS} " <<
+TEST_CXX_CFLAGS << " -faddress-sanitizer" if USE_ASAN
+TEST_CXX_LDFLAGS = "#{TEST_COMMON_LIBRARY.link_objects_as_string} " <<
+	"#{TEST_BOOST_OXT_LIBRARY} #{LIBEV_LIBS} #{LIBEIO_LIBS} " <<
 	"#{PlatformInfo.curl_libs} " <<
 	"#{PlatformInfo.zlib_libs} " <<
-	"#{PlatformInfo.portability_ldflags} #{EXTRA_LDFLAGS}"
+	"#{PlatformInfo.portability_ldflags}"
+TEST_CXX_LDFLAGS << " #{PlatformInfo.dmalloc_ldflags}" if USE_DMALLOC
+TEST_CXX_LDFLAGS << " -faddress-sanitizer" if USE_ASAN
+TEST_CXX_LDFLAGS << " #{EXTRA_LDFLAGS}"
+TEST_CXX_LDFLAGS.strip!
 TEST_CXX_OBJECTS = {
 	'test/cxx/CxxTestMain.o' => %w(
 		test/cxx/CxxTestMain.cpp),
 	'test/cxx/TestSupport.o' => %w(
 		test/cxx/TestSupport.cpp
-		test/cxx/TestSupport.h),
-	'test/cxx/MessageChannelTest.o' => %w(
-		test/cxx/MessageChannelTest.cpp
-		ext/common/MessageChannel.h
+		test/cxx/TestSupport.h
+		ext/common/SafeLibev.h
+		ext/common/BackgroundEventLoop.cpp
 		ext/common/Exceptions.h
-		ext/common/Utils.h
-		ext/common/Utils/Timer.h),
+		ext/common/Utils.h),
+	'test/cxx/ApplicationPool2/OptionsTest.o' => %w(
+		test/cxx/ApplicationPool2/OptionsTest.cpp
+		ext/common/ApplicationPool2/Options.h),
+	'test/cxx/ApplicationPool2/DirectSpawnerTest.o' => %w(
+		test/cxx/ApplicationPool2/DirectSpawnerTest.cpp
+		test/cxx/ApplicationPool2/SpawnerTestCases.cpp
+		ext/common/ApplicationPool2/Options.h
+		ext/common/ApplicationPool2/Process.h
+		ext/common/ApplicationPool2/Socket.h
+		ext/common/ApplicationPool2/Spawner.h
+		ext/common/ApplicationPool2/DirectSpawner.h),
+	'test/cxx/ApplicationPool2/SmartSpawnerTest.o' => %w(
+		test/cxx/ApplicationPool2/SmartSpawnerTest.cpp
+		test/cxx/ApplicationPool2/SpawnerTestCases.cpp
+		ext/common/ApplicationPool2/Options.h
+		ext/common/ApplicationPool2/Process.h
+		ext/common/ApplicationPool2/Socket.h
+		ext/common/ApplicationPool2/Spawner.h
+		ext/common/ApplicationPool2/SmartSpawner.h),
+	'test/cxx/ApplicationPool2/ProcessTest.o' => %w(
+		test/cxx/ApplicationPool2/ProcessTest.cpp
+		ext/common/ApplicationPool2/Process.h
+		ext/common/ApplicationPool2/Socket.h
+		ext/common/ApplicationPool2/Session.h),
+	'test/cxx/ApplicationPool2/PoolTest.o' => %w(
+		test/cxx/ApplicationPool2/PoolTest.cpp
+		ext/common/ApplicationPool2/SuperGroup.h
+		ext/common/ApplicationPool2/Group.h
+		ext/common/ApplicationPool2/Pool.h
+		ext/common/ApplicationPool2/Process.h
+		ext/common/ApplicationPool2/Socket.h
+		ext/common/ApplicationPool2/Options.h
+		ext/common/ApplicationPool2/Spawner.h
+		ext/common/ApplicationPool2/SpawnerFactory.h
+		ext/common/ApplicationPool2/SmartSpawner.h
+		ext/common/ApplicationPool2/DirectSpawner.h
+		ext/common/ApplicationPool2/DummySpawner.h),
 	'test/cxx/MessageReadersWritersTest.o' => %w(
 		test/cxx/MessageReadersWritersTest.cpp
 		ext/common/MessageReadersWriters.h
 		ext/common/Exceptions.h
 		ext/common/StaticString.h
 		ext/common/Utils/MemZeroGuard.h),
-	'test/cxx/SpawnManagerTest.o' => %w(
-		test/cxx/SpawnManagerTest.cpp
-		ext/common/SpawnManager.h
-		ext/common/AbstractSpawnManager.h
-		ext/common/PoolOptions.h
-		ext/common/Logging.h
-		ext/common/StringListCreator.h
-		ext/common/Process.h
-		ext/common/AccountsDatabase.h
-		ext/common/Account.h
-		ext/common/Session.h
-		ext/common/Constants.h
-		ext/common/MessageChannel.h),
-	'test/cxx/ApplicationPool_ServerTest.o' => %w(
-		test/cxx/ApplicationPool_ServerTest.cpp
-		ext/common/ApplicationPool/Interface.h
-		ext/common/ApplicationPool/Server.h
-		ext/common/ApplicationPool/Client.h
-		ext/common/ApplicationPool/Pool.h
-		ext/common/Account.h
-		ext/common/AccountsDatabase.h
-		ext/common/MessageServer.h
-		ext/common/Session.h
-		ext/common/PoolOptions.h
-		ext/common/Logging.h
-		ext/common/StringListCreator.h
-		ext/common/MessageChannel.h
-		ext/common/Utils/ProcessMetricsCollector.h),
-	'test/cxx/ApplicationPool_Server_PoolTest.o' => %w(
-		test/cxx/ApplicationPool_Server_PoolTest.cpp
-		test/cxx/ApplicationPool_PoolTestCases.cpp
-		ext/common/ApplicationPool/Interface.h
-		ext/common/ApplicationPool/Server.h
-		ext/common/ApplicationPool/Client.h
-		ext/common/ApplicationPool/Pool.h
-		ext/common/AbstractSpawnManager.h
-		ext/common/Account.h
-		ext/common/AccountsDatabase.h
-		ext/common/MessageServer.h
-		ext/common/SpawnManager.h
-		ext/common/PoolOptions.h
-		ext/common/Logging.h
-		ext/common/StringListCreator.h
-		ext/common/Process.h
-		ext/common/Session.h
-		ext/common/MessageChannel.h
-		ext/common/Utils/ProcessMetricsCollector.h),
-	'test/cxx/ApplicationPool_PoolTest.o' => %w(
-		test/cxx/ApplicationPool_PoolTest.cpp
-		test/cxx/ApplicationPool_PoolTestCases.cpp
-		ext/common/ApplicationPool/Interface.h
-		ext/common/ApplicationPool/Pool.h
-		ext/common/AbstractSpawnManager.h
-		ext/common/SpawnManager.h
-		ext/common/PoolOptions.h
-		ext/common/Logging.h
-		ext/common/StringListCreator.h
-		ext/common/Utils/FileChangeChecker.h
-		ext/common/Utils/CachedFileStat.hpp
-		ext/common/Process.h
-		ext/common/Session.h),
-	'test/cxx/PoolOptionsTest.o' => %w(
-		test/cxx/PoolOptionsTest.cpp
-		ext/common/PoolOptions.h
-		ext/common/Session.h
-		ext/common/Logging.h
-		ext/common/StringListCreator.h),
 	'test/cxx/StaticStringTest.o' => %w(
 		test/cxx/StaticStringTest.cpp
 		ext/common/StaticString.h),
@@ -124,7 +98,7 @@ TEST_CXX_OBJECTS = {
 		ext/common/Utils/Base64.cpp),
 	'test/cxx/ScgiRequestParserTest.o' => %w(
 		test/cxx/ScgiRequestParserTest.cpp
-		ext/nginx/ScgiRequestParser.h
+		ext/common/agents/HelperAgent/ScgiRequestParser.h
 		ext/common/StaticString.h),
 	'test/cxx/DechunkerTest.o' => %w(
 		test/cxx/DechunkerTest.cpp
@@ -133,13 +107,13 @@ TEST_CXX_OBJECTS = {
 		test/cxx/HttpHeaderBuffererTest.cpp
 		ext/common/Utils/HttpHeaderBufferer.h
 		ext/common/Utils/StreamBoyerMooreHorspool.h),
-	'test/cxx/LoggingTest.o' => %w(
-		test/cxx/LoggingTest.cpp
-		ext/common/LoggingAgent/LoggingServer.h
-		ext/common/LoggingAgent/RemoteSender.h
-		ext/common/LoggingAgent/DataStoreId.h
-		ext/common/LoggingAgent/FilterSupport.h
-		ext/common/Logging.h
+	'test/cxx/UnionStationTest.o' => %w(
+		test/cxx/UnionStationTest.cpp
+		ext/common/agents/LoggingAgent/LoggingServer.h
+		ext/common/agents/LoggingAgent/RemoteSender.h
+		ext/common/agents/LoggingAgent/DataStoreId.h
+		ext/common/agents/LoggingAgent/FilterSupport.h
+		ext/common/UnionStation.h
 		ext/common/Utils.h
 		ext/common/EventedServer.h
 		ext/common/EventedClient.h
@@ -149,23 +123,39 @@ TEST_CXX_OBJECTS = {
 	'test/cxx/EventedClientTest.o' => %w(
 		test/cxx/EventedClientTest.cpp
 		ext/common/EventedClient.h),
+	'test/cxx/EventedBufferedInput.o' => %w(
+		test/cxx/EventedBufferedInputTest.cpp
+		ext/common/EventedBufferedInput.h),
 	'test/cxx/MessageServerTest.o' => %w(
 		test/cxx/MessageServerTest.cpp
-		ext/common/ApplicationPool/Client.h
-		ext/common/ApplicationPool/Pool.h
-		ext/common/PoolOptions.h
-		ext/common/SpawnManager.h
-		ext/common/Session.h
 		ext/common/Logging.h
 		ext/common/Account.h
 		ext/common/AccountsDatabase.h
-		ext/common/Session.h
-		ext/common/MessageServer.h
-		ext/common/MessageChannel.h),
+		ext/common/MessageServer.h),
 	'test/cxx/ServerInstanceDir.o' => %w(
 		test/cxx/ServerInstanceDirTest.cpp
 		ext/common/ServerInstanceDir.h
 		ext/common/Utils.h),
+	'test/cxx/RequestHandlerTest.o' => %w(
+		test/cxx/RequestHandlerTest.cpp
+		ext/common/agents/HelperAgent/RequestHandler.h
+		ext/common/agents/HelperAgent/FileBackedPipe.h
+		ext/common/agents/HelperAgent/ScgiRequestParser.h
+		ext/common/agents/HelperAgent/AgentOptions.h
+		ext/common/UnionStation.h
+		ext/common/ApplicationPool2/Pool.h
+		ext/common/ApplicationPool2/SuperGroup.h
+		ext/common/ApplicationPool2/Group.h
+		ext/common/ApplicationPool2/Process.h
+		ext/common/ApplicationPool2/Options.h
+		ext/common/ApplicationPool2/Spawner.h
+		ext/common/ApplicationPool2/SpawnerFactory.h
+		ext/common/ApplicationPool2/SmartSpawner.h
+		ext/common/ApplicationPool2/DirectSpawner.h
+		ext/common/ApplicationPool2/DummySpawner.h),
+	'test/cxx/FileBackedPipeTest.o' => %w(
+		test/cxx/FileBackedPipeTest.cpp
+		ext/common/agents/HelperAgent/FileBackedPipe.h),
 	'test/cxx/FileChangeCheckerTest.o' => %w(
 		test/cxx/FileChangeCheckerTest.cpp
 		ext/common/Utils/FileChangeChecker.h
@@ -179,7 +169,7 @@ TEST_CXX_OBJECTS = {
 		ext/common/Utils/SystemTime.cpp),
 	'test/cxx/FilterSupportTest.o' => %w(
 		test/cxx/FilterSupportTest.cpp
-		ext/common/LoggingAgent/FilterSupport.h),
+		ext/common/agents/LoggingAgent/FilterSupport.h),
 	'test/cxx/CachedFileStatTest.o' => %w(
 		test/cxx/CachedFileStatTest.cpp
 		ext/common/Utils/CachedFileStat.hpp
@@ -192,13 +182,16 @@ TEST_CXX_OBJECTS = {
 		test/cxx/MessageIOTest.cpp
 		ext/common/Utils/MessageIO.h
 		ext/common/Utils/IOUtils.h),
+	'test/cxx/MessagePassingTest.o' => %w(
+		test/cxx/MessagePassingTest.cpp
+		ext/common/Utils/MessagePassing.h),
 	'test/cxx/VariantMapTest.o' => %w(
 		test/cxx/VariantMapTest.cpp
-		ext/common/MessageChannel.h
 		ext/common/Utils/VariantMap.h),
 	'test/cxx/StringMapTest.o' => %w(
 		test/cxx/StringMapTest.cpp
-		ext/common/Utils/StringMap.h),
+		ext/common/Utils/StringMap.h
+		ext/common/Utils/HashMap.h),
 	'test/cxx/ProcessMetricsCollectorTest.o' => %w(
 		test/cxx/ProcessMetricsCollectorTest.cpp
 		ext/common/Utils/ProcessMetricsCollector.h),
@@ -207,28 +200,74 @@ TEST_CXX_OBJECTS = {
 		ext/common/Utils.h),
 	'test/cxx/IOUtilsTest.o' => %w(
 		test/cxx/IOUtilsTest.cpp
-		ext/common/Utils/IOUtils.h)
+		ext/common/Utils/IOUtils.h),
+	'test/cxx/TemplateTest.o' => %w(
+		test/cxx/TemplateTest.cpp
+		ext/common/Utils/Template.h)
 }
 
+dependencies = [
+	'test/cxx/CxxTestMain',
+	'test/support/allocate_memory',
+	NATIVE_SUPPORT_TARGET,
+	AGENT_OUTPUT_DIR + 'SpawnPreparer',
+	AGENT_OUTPUT_DIR + 'EnvPrinter'
+].compact
 desc "Run unit tests for the Apache 2 and Nginx C++ components"
-task 'test:cxx' => ['test/cxx/CxxTestMain', 'test/support/allocate_memory', :native_support] do
-        if ENV['GROUPS'].to_s.empty?
-	        sh "cd test && ./cxx/CxxTestMain"
-        else
-                args = ENV['GROUPS'].split(",").map{ |name| "-g #{name}" }
-                sh "cd test && ./cxx/CxxTestMain #{args.join(' ')}"
-        end
+task 'test:cxx' => dependencies do
+	args = ENV['GROUPS'].to_s.split(",").map{ |name| "-g #{name}" }
+	command = "./cxx/CxxTestMain #{args.join(' ')}".strip
+	if boolean_option('GDB')
+		command = "gdb --args #{command}"
+	elsif boolean_option('VALGRIND')
+		command = "valgrind --dsymutil=yes --db-attach=yes --child-silent-after-fork=yes #{command}"
+	end
+	if boolean_option('SUDO')
+		command = "#{PlatformInfo.ruby_sudo_command} #{command}"
+	end
+	if boolean_option('REPEAT')
+		if boolean_option('GDB')
+			abort "You cannot set both REPEAT=1 and GDB=1."
+		end
+		sh "cd test && while #{command}; do echo -------------------------------------------; done"
+	else
+		sh "cd test && #{command}"
+	end
 end
 
-cxx_tests_dependencies = [TEST_CXX_OBJECTS.keys, :libev,
-	TEST_BOOST_OXT_LIBRARY, TEST_COMMON_LIBRARY]
-file 'test/cxx/CxxTestMain' => cxx_tests_dependencies.flatten do
+dependencies = [
+	TEST_CXX_OBJECTS.keys,
+	LIBEV_TARGET,
+	LIBEIO_TARGET,
+	TEST_BOOST_OXT_LIBRARY,
+	TEST_COMMON_LIBRARY.link_objects,
+	'ext/common/Constants.h',
+	'ext/common/MultiLibeio.cpp'
+].flatten.compact
+file 'test/cxx/CxxTestMain' => dependencies.flatten do
 	objects = TEST_CXX_OBJECTS.keys.join(' ')
 	create_executable("test/cxx/CxxTestMain", objects, TEST_CXX_LDFLAGS)
 end
 
+deps = [
+	'test/cxx/TestSupport.h',
+	'test/tut/tut.h',
+	'ext/oxt/thread.hpp',
+	'ext/oxt/tracable_exception.hpp',
+	'ext/common/Constants.h',
+	'ext/common/ServerInstanceDir.h',
+	'ext/common/Exceptions.h',
+	'ext/common/Utils.h',
+	'ext/common/Utils/SystemTime.h'
+]
+file 'test/cxx/TestSupport.h.gch' => deps do
+	compile_cxx 'test/cxx/TestSupport.h', "-x c++-header -o test/cxx/TestSupport.h.gch #{TEST_CXX_CFLAGS}"
+end
+
 TEST_CXX_OBJECTS.each_pair do |target, sources|
-	file(target => sources + ['test/cxx/TestSupport.h']) do
-		compile_cxx sources[0], "-o #{target} #{TEST_CXX_CFLAGS}"
+	extra_deps = ['test/cxx/TestSupport.h', 'test/cxx/TestSupport.h.gch', 'ext/common/Constants.h']
+	file(target => sources + extra_deps) do
+		# To use precompiled headers in Clang, we must -include them on them command line.
+		compile_cxx sources[0], "-o #{target} -include test/cxx/TestSupport.h #{TEST_CXX_CFLAGS}"
 	end
-end
\ No newline at end of file
+end
diff --git a/build/debian.rb b/build/debian.rb
new file mode 100644
index 0000000..6ed493b
--- /dev/null
+++ b/build/debian.rb
@@ -0,0 +1,129 @@
+# encoding: utf-8
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2013 Phusion
+#
+#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+#
+#  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
+#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#  THE SOFTWARE.
+
+require 'build/preprocessor'
+
+ALL_DISTRIBUTIONS  = ["raring", "quantal", "precise", "lucid"]
+DEBIAN_NAME        = "ruby-passenger"
+DEBIAN_EPOCH       = 1
+DEBIAN_ORIG_TARBALL_FILES = lambda { PhusionPassenger::Packaging.debian_orig_tarball_files }
+
+def create_debian_package_dir(distribution)
+	require 'time'
+
+	variables = {
+		:distribution => distribution
+	}
+
+	root = "#{PKG_DIR}/#{distribution}"
+	sh "rm -rf #{root}"
+	sh "mkdir -p #{root}"
+	recursive_copy_files(DEBIAN_ORIG_TARBALL_FILES.call, root)
+	recursive_copy_files(Dir["debian.template/**/*"], root,
+		true, variables)
+	sh "mv #{root}/debian.template #{root}/debian"
+	changelog = File.read("#{root}/debian/changelog")
+	changelog =
+		"#{DEBIAN_NAME} (#{DEBIAN_EPOCH}:#{PACKAGE_VERSION}-1~#{distribution}1) #{distribution}; urgency=low\n" +
+		"\n" +
+		"  * Package built.\n" +
+		"\n" +
+		" -- #{MAINTAINER_NAME} <#{MAINTAINER_EMAIL}>  #{Time.now.rfc2822}\n\n" +
+		changelog
+	File.open("#{root}/debian/changelog", "w") do |f|
+		f.write(changelog)
+	end
+end
+
+task 'debian:orig_tarball' => Packaging::PREGENERATED_FILES do
+	if File.exist?("#{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz")
+		puts "WARNING: Debian orig tarball #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz already exists. " +
+			"It will not be regenerated. If you are sure that the orig tarball is outdated, please delete it " +
+			"and rerun this task."
+	else
+		sh "rm -rf #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}"
+		sh "mkdir -p #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}"
+		recursive_copy_files(DEBIAN_ORIG_TARBALL_FILES.call, "#{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}")
+		sh "cd #{PKG_DIR} && tar -c #{DEBIAN_NAME}_#{PACKAGE_VERSION} | gzip --best > #{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz"
+	end
+end
+
+desc "Build Debian source and binary package(s) for local testing"
+task 'debian:dev' do
+	sh "rm -f #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz"
+	Rake::Task["debian:clean"].invoke
+	Rake::Task["debian:orig_tarball"].invoke
+	case distro = string_option('DISTRO', 'current')
+	when 'current'
+		distributions = [File.read("/etc/lsb-release").scan(/^DISTRIB_CODENAME=(.+)/).first.first]
+	when 'all'
+		distributions = ALL_DISTRIBUTIONS
+	else
+		distributions = distro.split(',')
+	end
+	distributions.each do |distribution|
+		create_debian_package_dir(distribution)
+		sh "cd #{PKG_DIR}/#{distribution} && dpkg-checkbuilddeps"
+	end
+	distributions.each do |distribution|
+		sh "cd #{PKG_DIR}/#{distribution} && debuild -F -us -uc"
+	end
+end
+
+desc "Build Debian source packages to be uploaded to repositories"
+task 'debian:production' => 'debian:orig_tarball' do
+	if boolean_option('USE_CCACHE', false)
+		# The resulting Debian rules file must not set USE_CCACHE.
+		abort "USE_CCACHE must be returned off when running the debian:production task."
+	end
+	if filename = string_option('GPG_PASSPHRASE_FILE')
+		filename = File.expand_path(filename)
+		if !File.exist?(filename)
+			abort "GPG passphrase file #{filename} does not exist!"
+		end
+		if File.stat(filename).mode != 0100600
+			abort "The GPG passphrase file #{filename} must be chmodded 0600!"
+		end
+		gpg_options = "-p'gpg --passphrase-file #{filename} --no-use-agent'"
+	end
+
+	ALL_DISTRIBUTIONS.each do |distribution|
+		create_debian_package_dir(distribution)
+		sh "cd #{PKG_DIR}/#{distribution} && dpkg-checkbuilddeps"
+	end
+	ALL_DISTRIBUTIONS.each do |distribution|
+		sh "cd #{PKG_DIR}/#{distribution} && debuild -S -sa #{gpg_options} -k#{PACKAGE_SIGNING_KEY}"
+	end
+end
+
+desc "Clean Debian packaging products, except for orig tarball"
+task 'debian:clean' do
+	files = Dir["#{PKG_DIR}/*.{changes,build,deb,dsc,upload}"]
+	sh "rm -f #{files.join(' ')}"
+	sh "rm -rf #{PKG_DIR}/dev"
+	ALL_DISTRIBUTIONS.each do |distribution|
+		sh "rm -rf #{PKG_DIR}/#{distribution}"
+	end
+	sh "rm -rf #{PKG_DIR}/*.debian.tar.gz"
+end
diff --git a/build/documentation.rb b/build/documentation.rb
index 4009814..5c94360 100644
--- a/build/documentation.rb
+++ b/build/documentation.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010, 2011, 2012 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -53,6 +53,43 @@ Packaging::ASCII_DOCS.each do |target|
 	end
 	
 	task :clean do
-		sh "rm -f '#{target}'"
+		if boolean_option('CLEAN_DOCS', true)
+			sh "rm -f '#{target}'"
+		end
+	end
+end
+
+def create_markdown_compilation_task(target)
+	source = target.sub(/\.html$/, '.txt.md')
+	dependencies = [
+		source,
+		'doc/templates/markdown.html.erb',
+		'doc/templates/bootstrap.min.css'
+	]
+
+	file(target => dependencies) do
+		sh "bluecloth -f #{source} > #{target}.tmp"
+		begin
+			puts "Creating #{target}"
+			require 'erb'
+			template = ERB.new(File.read('doc/templates/markdown.html.erb'))
+			title    = File.basename(target, '.html')
+			content  = File.read("#{target}.tmp")
+			css      = File.read('doc/templates/bootstrap.min.css')
+			data = template.result(binding)
+			File.open(target, 'w') do |f|
+				f.write(data)
+			end
+		ensure
+			sh "rm -f #{target}.tmp"
+		end
+	end
+
+	task :clean do
+		if boolean_option('CLEAN_DOCS', true)
+			sh "rm -f #{target}"
+		end
 	end
 end
+
+create_markdown_compilation_task('doc/Packaging.html')
diff --git a/build/gempackagetask.rb b/build/gempackagetask.rb
deleted file mode 100644
index 4643aa9..0000000
--- a/build/gempackagetask.rb
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/usr/bin/env ruby
-# Passenger note: this file is copied from Rake 0.8.1. The task names
-# have been changed.
-
-# Define a package task library to aid in the definition of GEM
-# packages.
-
-require 'rubygems'
-require 'rake'
-require 'build/packagetask'
-require 'rubygems/user_interaction'
-require 'rubygems/builder'
-
-module Rake
-
-  # Create a package based upon a Gem spec.  Gem packages, as well as
-  # zip files and tar/gzipped packages can be produced by this task.
-  #
-  # In addition to the Rake targets generated by PackageTask, a
-  # GemPackageTask will also generate the following tasks:
-  #
-  # [<b>"<em>package_dir</em>/<em>name</em>-<em>version</em>.gem"</b>]
-  #   Create a Ruby GEM package with the given name and version.
-  #
-  # Example using a Ruby GEM spec:
-  #
-  #   require 'rubygems'
-  #
-  #   spec = Gem::Specification.new do |s|
-  #     s.platform = Gem::Platform::RUBY
-  #     s.summary = "Ruby based make-like utility."
-  #     s.name = 'rake'
-  #     s.version = PKG_VERSION
-  #     s.requirements << 'none'
-  #     s.require_path = 'lib'
-  #     s.autorequire = 'rake'
-  #     s.files = PKG_FILES
-  #     s.description = <<EOF
-  #   Rake is a Make-like program implemented in Ruby. Tasks
-  #   and dependencies are specified in standard Ruby syntax. 
-  #   EOF
-  #   end
-  #   
-  #   Rake::GemPackageTask.new(spec) do |pkg|
-  #     pkg.need_zip = true
-  #     pkg.need_tar = true
-  #   end
-  #
-  class GemPackageTask < PackageTask
-    # Ruby GEM spec containing the metadata for this package.  The
-    # name, version and package_files are automatically determined
-    # from the GEM spec and don't need to be explicitly provided.
-    attr_accessor :gem_spec
-
-    # Create a GEM Package task library.  Automatically define the gem
-    # if a block is given.  If no block is supplied, then +define+
-    # needs to be called to define the task.
-    def initialize(gem_spec)
-      init(gem_spec)
-      yield self if block_given?
-      define if block_given?
-    end
-
-    # Initialization tasks without the "yield self" or define
-    # operations.
-    def init(gem)
-      super(gem.name, gem.version)
-      @gem_spec = gem
-      @package_files += gem_spec.files if gem_spec.files
-    end
-
-    # Create the Rake tasks and actions specified by this
-    # GemPackageTask.  (+define+ is automatically called if a block is
-    # given to +new+).
-    def define
-      super
-      task :package => ['package:gem']
-      desc "Build the gem file #{gem_file}"
-      task 'package:gem' => ["#{package_dir}/#{gem_file}"]
-      file "#{package_dir}/#{gem_file}" => [package_dir] + @gem_spec.files do
-        when_writing("Creating GEM") {
-          Gem::Builder.new(gem_spec).build
-          verbose(true) {
-            mv gem_file, "#{package_dir}/#{gem_file}"
-          }
-        }
-      end
-    end
-    
-    def gem_file
-      if @gem_spec.platform == Gem::Platform::RUBY
-        "#{package_name}.gem"
-      else
-        "#{package_name}-#{@gem_spec.platform}.gem"
-      end
-    end
-    
-  end
-end
diff --git a/build/integration_tests.rb b/build/integration_tests.rb
index 7a51681..72dd749 100644
--- a/build/integration_tests.rb
+++ b/build/integration_tests.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -27,19 +27,23 @@ desc "Run all integration tests"
 task 'test:integration' => ['test:integration:apache2', 'test:integration:nginx'] do
 end
 
+dependencies = [:apache2, NATIVE_SUPPORT_TARGET].compact
 desc "Run Apache 2 integration tests"
-task 'test:integration:apache2' => [:apache2, :native_support] do
+task 'test:integration:apache2' => dependencies do
 	if PlatformInfo.rspec.nil?
 		abort "RSpec is not installed for Ruby interpreter '#{PlatformInfo.ruby_command}'. Please install it."
 	else
-		Dir.chdir("test") do
-			ruby "#{PlatformInfo.rspec} -c -f s integration_tests/apache2_tests.rb"
+		command = "#{PlatformInfo.rspec} -c -f s integration_tests/apache2_tests.rb"
+		if boolean_option('SUDO')
+			command = "#{PlatformInfo.ruby_sudo_command} -E #{command}"
 		end
+		sh "cd test && #{command}"
 	end
 end
 
+dependencies = [:nginx, NATIVE_SUPPORT_TARGET].compact
 desc "Run Nginx integration tests"
-task 'test:integration:nginx' => :nginx do
+task 'test:integration:nginx' => dependencies do
 	if PlatformInfo.rspec.nil?
 		abort "RSpec is not installed for Ruby interpreter '#{PlatformInfo.ruby_command}'. Please install it."
 	else
@@ -49,8 +53,20 @@ task 'test:integration:nginx' => :nginx do
 	end
 end
 
-desc "Run the 'restart' integration test infinitely, and abort if/when it fails"
-task 'test:restart' => [:apache2, :native_support] do
+desc "Run native packaging tests"
+task 'test:integration:native_packaging' do
+	if PlatformInfo.rspec.nil?
+		abort "RSpec is not installed for Ruby interpreter '#{PlatformInfo.ruby_command}'. Please install it."
+	else
+		Dir.chdir("test") do
+			ruby "#{PlatformInfo.rspec} -c -f s integration_tests/native_packaging_spec.rb"
+		end
+	end
+end
+
+dependencies = [:apache2, NATIVE_SUPPORT_TARGET].compact
+desc "Run the 'apache2' integration test infinitely, and abort if/when it fails"
+task 'test:restart' => dependencies do
 	Dir.chdir("test") do
 		color_code_start = "\e[33m\e[44m\e[1m"
 		color_code_end = "\e[0m"
@@ -61,4 +77,4 @@ task 'test:restart' => [:apache2, :native_support] do
 			i += 1
 		end
 	end
-end
\ No newline at end of file
+end
diff --git a/build/misc.rb b/build/misc.rb
index bc802fb..ddfaad9 100644
--- a/build/misc.rb
+++ b/build/misc.rb
@@ -1,5 +1,6 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+# encoding: utf-8
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -49,8 +50,7 @@ task :sloccount do
 	end
 end
 
-desc "Convert the NEWS items for the latest release to HTML"
-task :news_as_html do
+def extract_latest_news_contents_and_items
 	# The text is in the following format:
 	#
 	#   Release x.x.x
@@ -58,21 +58,31 @@ task :news_as_html do
 	#
 	#    * Text.
 	#    * More text.
-	# * A header.
+	#    * A header.
 	#      With yet more text.
 	#   
 	#   Release y.y.y
 	#   -------------
 	#   .....
-	require 'cgi'
 	contents = File.read("NEWS")
 	
 	# We're only interested in the latest release, so extract the text for that.
 	contents =~ /\A(Release.*?)^(Release|Older releases)/m
+	contents = $1
+	contents.sub!(/\A.*?\n-+\n+/m, '')
+	contents.sub!(/\n+\Z/, '')
 	
 	# Now split the text into individual items.
-	items = $1.split(/^ \*/)
-	items.shift  # Delete the 'Release x.x.x' header.
+	items = contents.split(/^ \* /)
+	items.shift while items.first == ""
+
+	return [contents, items]
+end
+
+desc "Convert the NEWS items for the latest release to HTML"
+task :news_as_html do
+	require 'cgi'
+	contents, items = extract_latest_news_contents_and_items
 	
 	puts "<dl>"
 	items.each do |item|
@@ -134,20 +144,68 @@ task :news_as_html do
 	puts "</dl>"
 end
 
-task :compile_app => [LIBCOMMON, LIBBOOST_OXT, :libev] do
+desc "Convert the NEWS items for the latest release to Markdown"
+task :news_as_markdown do
+	contents, items = extract_latest_news_contents_and_items
+
+	# Auto-link to issue tracker.
+	contents.gsub!(/(bug|issue) #(\d+)/i) do
+		url = "http://code.google.com/p/phusion-passenger/issues/detail?id=#{$2}"
+		%Q([#{$1} ##{$2}](#{url}))
+	end
+
+	puts contents
+end
+
+desc "Update CONTRIBUTORS file"
+task :contributors do
+	entries = `git log --format='%aN' | sort -u`.split("\n")
+	entries.delete "Hongli Lai"
+	entries.delete "Hongli Lai (Phusion"
+	entries.delete "Ninh Bui"
+	entries.push "Ninh Bui (Phusion)"
+	entries.delete "Tinco Andringa"
+	entries.push "Tinco Andringa (Phusion)"
+	entries.delete "Gokulnath"
+	entries.push "Gokulnath Manakkattil"
+	File.open("CONTRIBUTORS", "w") do |f|
+		f.puts(entries.sort{ |a, b| a.downcase <=> b.downcase }.join("\n"))
+	end
+	puts "Updated CONTRIBUTORS"
+end
+
+dependencies = [
+	COMMON_LIBRARY.link_objects,
+	LIBBOOST_OXT,
+	LIBEV_TARGET,
+	LIBEIO_TARGET
+].flatten.compact
+task :compile_app => dependencies do
 	source = ENV['SOURCE'] || ENV['FILE'] || ENV['F']
 	if !source
 		STDERR.puts "Please specify the source filename with SOURCE=(...)"
 		exit 1
 	end
-	exe    = source.sub(/\.cpp$/, '')
-	create_executable(exe, source,
-		"-Iext -Iext/common #{LIBEV_CFLAGS} " <<
-		"#{PlatformInfo.portability_cflags} " <<
-		"#{EXTRA_CXXFLAGS} " <<
-		"#{LIBCOMMON} " <<
-		"#{LIBBOOST_OXT} " <<
-		"#{LIBEV_LIBS} " <<
-		"#{PlatformInfo.portability_ldflags} " <<
-		"#{EXTRA_LDFLAGS}")
-end
\ No newline at end of file
+	if source =~ /\.h/
+		File.open('_source.cpp', 'w') do |f|
+			f.puts "#include \"#{source}\""
+		end
+		source = '_source.cpp'
+	end
+	exe = source.sub(/\.cpp$/, '')
+	begin
+		create_executable(exe, source,
+			"-DSTANDALONE " <<
+			"-Iext -Iext/common #{LIBEV_CFLAGS} #{LIBEIO_CFLAGS} " <<
+			"#{PlatformInfo.portability_cflags} " <<
+			"#{EXTRA_CXXFLAGS} " <<
+			"#{COMMON_LIBRARY.link_objects_as_string} " <<
+			"#{LIBBOOST_OXT} " <<
+			"#{LIBEV_LIBS} " <<
+			"#{LIBEIO_LIBS} " <<
+			"#{PlatformInfo.portability_ldflags} " <<
+			"#{EXTRA_LDFLAGS}")
+	ensure
+		File.unlink('_source.cpp') rescue nil
+	end
+end
diff --git a/build/nginx.rb b/build/nginx.rb
index 814ea50..68a97ee 100644
--- a/build/nginx.rb
+++ b/build/nginx.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -21,51 +21,22 @@
 #  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #  THE SOFTWARE.
 
-desc "Build Nginx helper agent"
+desc "Build Nginx support files"
 task :nginx => [
-	AGENT_OUTPUT_DIR + 'nginx/PassengerHelperAgent',
+	:nginx_without_native_support,
+	NATIVE_SUPPORT_TARGET
+].compact
+
+task :nginx_without_native_support => [
+	AGENT_OUTPUT_DIR + 'PassengerHelperAgent',
 	AGENT_OUTPUT_DIR + 'PassengerWatchdog',
 	AGENT_OUTPUT_DIR + 'PassengerLoggingAgent',
-	:native_support
-]
-
-dependencies = [
-	'ext/nginx/HelperAgent.cpp',
-	'ext/nginx/ScgiRequestParser.h',
-	'ext/common/StaticString.h',
-	'ext/common/Account.h',
-	'ext/common/AccountsDatabase.h',
-	'ext/common/MessageServer.h',
-	'ext/common/FileDescriptor.h',
-	'ext/common/SpawnManager.h',
-	'ext/common/Logging.h',
-	'ext/common/ResourceLocator.h',
-	'ext/common/Utils/ProcessMetricsCollector.h',
-	'ext/common/Utils/VariantMap.h',
-	'ext/common/HelperAgent/BacktracesServer.h',
-	'ext/common/ApplicationPool/Interface.h',
-	'ext/common/ApplicationPool/Pool.h',
-	'ext/common/ApplicationPool/Server.h',
-	LIBBOOST_OXT,
-	LIBCOMMON,
-]
-file AGENT_OUTPUT_DIR + 'nginx/PassengerHelperAgent' => dependencies do
-	output_dir = "#{AGENT_OUTPUT_DIR}nginx"
-	sh "mkdir -p #{output_dir}" if !File.directory?(output_dir)
-	create_executable "#{output_dir}/PassengerHelperAgent",
-		'ext/nginx/HelperAgent.cpp',
-		"-Iext -Iext/common " <<
-		"#{PlatformInfo.portability_cflags} " <<
-		"#{EXTRA_CXXFLAGS}  " <<
-		"#{LIBCOMMON} " <<
-		"#{LIBBOOST_OXT} " <<
-		"#{PlatformInfo.portability_ldflags} " <<
-		"#{AGENT_LDFLAGS} " <<
-		"#{EXTRA_LDFLAGS}"
-end
+	AGENT_OUTPUT_DIR + 'SpawnPreparer',
+	COMMON_LIBRARY.only(*NGINX_LIBS_SELECTOR).link_objects
+].flatten
 
 task :clean => 'nginx:clean'
 desc "Clean all compiled Nginx files"
 task 'nginx:clean' => 'common:clean' do
-	sh("rm", "-rf", AGENT_OUTPUT_DIR + "nginx/PassengerHelperAgent")
+	# Nothing to clean at this time.
 end
diff --git a/build/oxt_tests.rb b/build/oxt_tests.rb
index 2d23c8e..149408c 100644
--- a/build/oxt_tests.rb
+++ b/build/oxt_tests.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -25,6 +25,7 @@
 
 TEST_OXT_CFLAGS = "-I../../ext -I../support #{TEST_COMMON_CFLAGS}"
 TEST_OXT_LDFLAGS = "#{TEST_BOOST_OXT_LIBRARY} #{PlatformInfo.portability_ldflags} #{EXTRA_LDFLAGS}"
+TEST_OXT_LDFLAGS << " -faddress-sanitizer" if USE_ASAN
 TEST_OXT_OBJECTS = {
 	'oxt_test_main.o' => %w(oxt_test_main.cpp),
 	'backtrace_test.o' => %w(backtrace_test.cpp counter.hpp),
diff --git a/build/packagetask.rb b/build/packagetask.rb
deleted file mode 100644
index 8d15ebc..0000000
--- a/build/packagetask.rb
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/env ruby
-# Passenger note: this file is copied from Rake 0.8.1. The task names
-# have been changed.
-
-# Define a package task libarary to aid in the definition of
-# redistributable package files.
-
-require 'rake'
-require 'rake/tasklib'
-
-module Rake
-
-  # Create a packaging task that will package the project into
-  # distributable files (e.g zip archive or tar files).
-  #
-  # The PackageTask will create the following targets:
-  #
-  # [<b>:package</b>]
-  #   Create all the requested package files.
-  #
-  # [<b>:clobber_package</b>]
-  #   Delete all the package files.  This target is automatically
-  #   added to the main clobber target.
-  #
-  # [<b>:repackage</b>]
-  #   Rebuild the package files from scratch, even if they are not out
-  #   of date.
-  #
-  # [<b>"<em>package_dir</em>/<em>name</em>-<em>version</em>.tgz"</b>]
-  #   Create a gzipped tar package (if <em>need_tar</em> is true).  
-  #
-  # [<b>"<em>package_dir</em>/<em>name</em>-<em>version</em>.tar.gz"</b>]
-  #   Create a gzipped tar package (if <em>need_tar_gz</em> is true).  
-  #
-  # [<b>"<em>package_dir</em>/<em>name</em>-<em>version</em>.tar.bz2"</b>]
-  #   Create a bzip2'd tar package (if <em>need_tar_bz2</em> is true).  
-  #
-  # [<b>"<em>package_dir</em>/<em>name</em>-<em>version</em>.zip"</b>]
-  #   Create a zip package archive (if <em>need_zip</em> is true).
-  #
-  # Example:
-  #
-  #   Rake::PackageTask.new("rake", "1.2.3") do |p|
-  #     p.need_tar = true
-  #     p.package_files.include("lib/**/*.rb")
-  #   end
-  #
-  class PackageTask < TaskLib
-    # Name of the package (from the GEM Spec).
-    attr_accessor :name
-
-    # Version of the package (e.g. '1.3.2').
-    attr_accessor :version
-
-    # Directory used to store the package files (default is 'pkg').
-    attr_accessor :package_dir
-
-    # True if a gzipped tar file (tgz) should be produced (default is false).
-    attr_accessor :need_tar
-
-    # True if a gzipped tar file (tar.gz) should be produced (default is false).
-    attr_accessor :need_tar_gz
-
-    # True if a bzip2'd tar file (tar.bz2) should be produced (default is false).
-    attr_accessor :need_tar_bz2
-
-    # True if a zip file should be produced (default is false)
-    attr_accessor :need_zip
-
-    # List of files to be included in the package.
-    attr_accessor :package_files
-
-    # Tar command for gzipped or bzip2ed archives.  The default is 'tar'.
-    attr_accessor :tar_command
-
-    # Zip command for zipped archives.  The default is 'zip'.
-    attr_accessor :zip_command
-
-    # Create a Package Task with the given name and version. 
-    def initialize(name=nil, version=nil)
-      init(name, version)
-      yield self if block_given?
-      define unless name.nil?
-    end
-
-    # Initialization that bypasses the "yield self" and "define" step.
-    def init(name, version)
-      @name = name
-      @version = version
-      @package_files = Rake::FileList.new
-      @package_dir = 'pkg'
-      @need_tar = false
-      @need_tar_gz = false
-      @need_tar_bz2 = false
-      @need_zip = false
-      @tar_command = 'tar'
-      @zip_command = 'zip'
-    end
-
-    # Create the tasks defined by this task library.
-    def define
-      fail "Version required (or :noversion)" if @version.nil?
-      @version = nil if :noversion == @version
-
-      desc "Build all the packages"
-      task :package
-      
-      desc "Force a rebuild of the package files"
-      task 'package:force' => ['package:clean', :package]
-      
-      desc "Remove package products" 
-      task 'package:clean' do
-        rm_r package_dir rescue nil
-      end
-
-      task :clean => ['package:clean']
-
-      [
-        [need_tar, tgz_file, "z"],
-        [need_tar_gz, tar_gz_file, "z"],
-        [need_tar_bz2, tar_bz2_file, "j"]
-      ].each do |(need, file, flag)|
-        if need
-          task :package => ["#{package_dir}/#{file}"]
-          file "#{package_dir}/#{file}" => [package_dir_path] + package_files do
-            chdir(package_dir) do
-              sh %{#{@tar_command} #{flag}cvf #{file} #{package_name}}
-            end
-          end
-        end
-      end
-      
-      if need_zip
-        task :package => ["#{package_dir}/#{zip_file}"]
-        file "#{package_dir}/#{zip_file}" => [package_dir_path] + package_files do
-          chdir(package_dir) do
-            sh %{#{@zip_command} -r #{zip_file} #{package_name}}
-          end
-        end
-      end
-
-      directory package_dir
-
-      file package_dir_path => @package_files do
-        mkdir_p package_dir rescue nil
-        @package_files.each do |fn|
-          f = File.join(package_dir_path, fn)
-          fdir = File.dirname(f)
-          mkdir_p(fdir) if !File.exist?(fdir)
-          if File.directory?(fn)
-            mkdir_p(f)
-          else
-            rm_f f
-            safe_ln(fn, f)
-          end
-        end
-      end
-      self
-    end
-
-    def package_name
-      @version ? "#{@name}-#{@version}" : @name
-    end
-      
-    def package_dir_path
-      "#{package_dir}/#{package_name}"
-    end
-
-    def tgz_file
-      "#{package_name}.tgz"
-    end
-
-    def tar_gz_file
-      "#{package_name}.tar.gz"
-    end
-
-    def tar_bz2_file
-      "#{package_name}.tar.bz2"
-    end
-
-    def zip_file
-      "#{package_name}.zip"
-    end
-  end
-
-end
diff --git a/build/packaging.rb b/build/packaging.rb
index aa63b56..bf921d7 100644
--- a/build/packaging.rb
+++ b/build/packaging.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010, 2011, 2012 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -21,167 +21,284 @@
 #  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #  THE SOFTWARE.
 
-task 'package:check' do
+ORIG_TARBALL_FILES = lambda { PhusionPassenger::Packaging.files }
+
+def recursive_copy_files(files, destination_dir, preprocess = false, variables = {})
+	require 'fileutils' if !defined?(FileUtils)
+	files.each_with_index do |filename, i|
+		dir = File.dirname(filename)
+		if !File.exist?("#{destination_dir}/#{dir}")
+			FileUtils.mkdir_p("#{destination_dir}/#{dir}")
+		end
+		if !File.directory?(filename)
+			if preprocess && filename =~ /\.template$/
+				real_filename = filename.sub(/\.template$/, '')
+				FileUtils.install(filename, "#{destination_dir}/#{real_filename}", :preserve => true)
+				Preprocessor.new.start(filename, "#{destination_dir}/#{real_filename}",
+					variables)
+			else
+				FileUtils.install(filename, "#{destination_dir}/#{filename}", :preserve => true)
+			end
+		end
+		printf "\r[%5d/%5d] [%3.0f%%] Copying files...", i + 1, files.size, i * 100.0 / files.size
+		STDOUT.flush
+	end
+	printf "\r[%5d/%5d] [%3.0f%%] Copying files...\n", files.size, files.size, 100
+end
+
+
+task :clobber => 'package:clean'
+
+desc "Build, sign & upload gem & tarball"
+task 'package:release' => ['package:gem', 'package:tarball', 'package:sign'] do
 	require 'phusion_passenger'
+	require 'yaml'
+	require 'uri'
+	require 'net/http'
+	require 'net/https'
+	basename   = "#{PhusionPassenger::PACKAGE_NAME}-#{PhusionPassenger::VERSION_STRING}"
+	version    = PhusionPassenger::VERSION_STRING
+	is_enterprise  = basename =~ /enterprise/
+	is_open_source = !is_enterprise
+	is_beta        = !!version.split('.')[3]
+	tag_prefix     = is_open_source ? 'release' : 'enterprise'
 	
-	File.read("ext/common/Constants.h") =~ /PASSENGER_VERSION \"(.+)\"/
-	if $1 != PhusionPassenger::VERSION_STRING
-		abort "Version number in ext/common/Constants.h doesn't match."
+	if !`git status --porcelain | grep -Ev '^\\?\\? '`.empty?
+		STDERR.puts "-------------------"
+		abort "*** ERROR: There are uncommitted files. See 'git status'"
+	end
+
+	begin
+		website_config = YAML.load_file(File.expand_path("~/.passenger_website.yml"))
+	rescue Errno::ENOENT
+		STDERR.puts "-------------------"
+		abort "*** ERROR: Please put the Phusion Passenger website admin " +
+			"password in ~/.passenger_website.yml:\n" +
+			"admin_password: ..."
+	end
+
+	sh "git tag -s #{tag_prefix}-#{version} -u 0A212A8C -m 'Release #{version}'"
+
+	puts "Proceed with pushing tag to remote Git repo and uploading the gem and signatures? [y/n]"
+	if STDIN.readline == "y\n"
+		sh "git push origin #{tag_prefix}-#{version}"
+		
+		if is_open_source
+			sh "s3cmd -P put pkg/passenger-#{version}.{gem,tar.gz,gem.asc,tar.gz.asc} s3://phusion-passenger/releases/"
+			sh "gem push pkg/passenger-#{version}.gem"
+			puts "Updating version number on website..."
+			if is_beta
+				uri = URI.parse("https://www.phusionpassenger.com/latest_beta_version")
+			else
+				uri = URI.parse("https://www.phusionpassenger.com/latest_stable_version")
+			end
+			http = Net::HTTP.new(uri.host, uri.port)
+			http.use_ssl = true
+			http.verify_mode = OpenSSL::SSL::VERIFY_PEER
+			request = Net::HTTP::Post.new(uri.request_uri)
+			request.basic_auth("admin", website_config["admin_password"])
+			request.set_form_data("version" => version)
+			response = http.request(request)
+			if response.code != 200 && response.body != "ok"
+				abort "*** ERROR: Cannot update version number on www.phusionpassenger.com:\n" +
+					"Status: #{response.code}\n\n" +
+					response.body
+			end
+			puts "--------------"
+			puts "All done."
+		else
+			dir = "/u/apps/passenger_website/shared"
+			subdir = string_option('NAME', version)
+			sh "scp pkg/#{basename}.{gem,tar.gz,gem.asc,tar.gz.asc} app at shell.phusion.nl:#{dir}/"
+			sh "ssh app at shell.phusion.nl 'mkdir -p \"#{dir}/assets/#{subdir}\" && mv #{dir}/#{basename}.{gem,tar.gz,gem.asc,tar.gz.asc} \"#{dir}/assets/#{subdir}/\"'"
+		end
+	else
+		puts "Did not upload anything."
 	end
 end
 
-spec = Gem::Specification.new do |s|
-	s.platform = Gem::Platform::RUBY
-	s.homepage = "http://www.modrails.com/"
-	s.summary = "Easy and robust Ruby web application deployment"
-	s.name = "passenger"
-	s.version = VERSION_STRING
-	s.rubyforge_project = "passenger"
-	s.author = "Phusion - http://www.phusion.nl/"
-	s.email = "info at phusion.nl"
-	s.require_paths = ["lib"]
-	s.add_dependency 'rake', '>= 0.8.1'
-	s.add_dependency 'fastthread', '>= 1.0.1'
-	s.add_dependency 'daemon_controller', '>= 1.0.0'
-	s.add_dependency 'rack'
-	s.files = FileList[*Packaging::GLOB] - FileList[*Packaging::EXCLUDE_GLOB]
-	s.executables = Packaging::USER_EXECUTABLES + Packaging::SUPER_USER_EXECUTABLES
-	s.description = "Easy and robust Ruby web application deployment."
+task 'package:gem' => Packaging::PREGENERATED_FILES do
+	require 'phusion_passenger'
+	sh "gem build #{PhusionPassenger::PACKAGE_NAME}.gemspec --sign --key 0x0A212A8C"
+	sh "mkdir -p pkg"
+	sh "mv #{PhusionPassenger::PACKAGE_NAME}-#{PhusionPassenger::VERSION_STRING}.gem pkg/"
 end
 
-Rake::GemPackageTask.new(spec) do |pkg|
-	pkg.need_tar_gz = true
+task 'package:tarball' => Packaging::PREGENERATED_FILES do
+	require 'phusion_passenger'
+	require 'fileutils'
+
+	basename = "#{PhusionPassenger::PACKAGE_NAME}-#{PhusionPassenger::VERSION_STRING}"
+	sh "rm -rf pkg/#{basename}"
+	sh "mkdir -p pkg/#{basename}"
+	recursive_copy_files(ORIG_TARBALL_FILES.call, "pkg/#{basename}")
+	sh "cd pkg && tar -c #{basename} | gzip --best > #{basename}.tar.gz"
+	sh "rm -rf pkg/#{basename}"
 end
 
-task 'package:filelist' do
-	# The package:filelist task is used by Phusion Passenger Lite
-	# to obtain a list of files that it must copy to a temporary
-	# directory in order to compile Nginx and to compile Phusion
-	# Passenger. The original Phusion Passenger sources might not
-	# be writiable, e.g. when installed via a gem as root, hence
-	# the reason for copying.
-	#
-	# The Asciidoc HTML files are in the packaging list, but
-	# they're auto-generated and aren't included in the source
-	# repository, so here we ensure that they exist. This is
-	# generally only for people who are developing Phusion
-	# Passenger itself; users who installed Phusion Passenger
-	# via a gem, tarball or native package already have the
-	# HTML files.
-	#
-	# The reason why we don't just specify Packaging::ASCII_DOCS
-	# as a task dependency is because we only want to generate
-	# the HTML files if they don't already exist; we don't want
-	# to regenerate if they exist but their source .txt files
-	# are modified. When the user installs Phusion Passenger
-	# via a gem/tarball/package, all file timestamps are set
-	# to the current clock time, which could lead Rake into
-	# thinking that the source .txt files are modified. Since
-	# the user probably has no write permission to the original
-	# Phusion Passenger sources we want to avoid trying to
-	# regenerate the HTML files.
-	Packaging::ASCII_DOCS.each do |ascii_doc|
-		Rake::Task[ascii_doc].invoke if !File.exist?(ascii_doc)
+task 'package:sign' do
+	require 'phusion_passenger'
+
+	if File.exist?(File.expand_path("~/.gnupg/gpg-agent.conf")) || ENV['GPG_AGENT_INFO']
+		puts "It looks like you're using gpg-agent, so skipping automatically password caching."
+	else
+		begin
+			require 'highline'
+		rescue LoadError
+			abort "Please run `gem install highline` first."
+		end
+		h = HighLine.new
+		password = h.ask("Password for software-signing at phusion.nl GPG key: ") { |q| q.echo = false }
+		passphrase_opt = "--passphrase-file .gpg-password"
+	end
+	
+	begin
+		if password
+			File.open(".gpg-password", "w", 0600) do |f|
+				f.write(password)
+			end
+		end
+		version = PhusionPassenger::VERSION_STRING
+		["passenger-#{version}.gem",
+		 "passenger-#{version}.tar.gz",
+		 "passenger-enterprise-server-#{version}.gem",
+		 "passenger-enterprise-server-#{version}.tar.gz"].each do |name|
+			if File.exist?("pkg/#{name}")
+				sh "gpg --sign --detach-sign #{passphrase_opt} --local-user software-signing at phusion.nl --armor pkg/#{name}"
+			end
+		end
+	ensure
+		File.unlink('.gpg-password') if File.exist?('.gpg-password')
 	end
-	puts spec.files
 end
 
-Rake::Task['package'].prerequisites.unshift(:doc)
-Rake::Task['package'].prerequisites.unshift('package:check')
-Rake::Task['package:gem'].prerequisites.unshift(:doc)
-Rake::Task['package:gem'].prerequisites.unshift('package:check')
-Rake::Task['package:force'].prerequisites.unshift(:doc)
-task :clobber => :'package:clean'
+desc "Remove gem, tarball and signatures"
+task 'package:clean' do
+	require 'phusion_passenger'
+	basename = "#{PhusionPassenger::PACKAGE_NAME}-#{PhusionPassenger::VERSION_STRING}"
+	sh "rm -f pkg/#{basename}.{gem,gem.asc,tar.gz,tar.gz.asc}"
+end
 
 desc "Create a fakeroot, useful for building native packages"
-task :fakeroot => [:apache2, :nginx] + Packaging::ASCII_DOCS do
+task :fakeroot => [:apache2, :nginx, :doc] do
 	require 'rbconfig'
 	require 'fileutils'
-	include Config
+	include RbConfig
 	fakeroot = "pkg/fakeroot"
 	
 	# We don't use CONFIG['archdir'] and the like because we want
 	# the files to be installed to /usr, and the Ruby interpreter
 	# on the packaging machine might be in /usr/local.
-	fake_libdir = "#{fakeroot}/usr/lib/ruby/#{CONFIG['ruby_version']}"
+	fake_rubylibdir = "#{fakeroot}/usr/lib/ruby/vendor_ruby"
+	fake_libdir = "#{fakeroot}/usr/lib/passenger"
 	fake_native_support_dir = "#{fakeroot}/usr/lib/ruby/#{CONFIG['ruby_version']}/#{CONFIG['arch']}"
-	fake_agents_dir = "#{fakeroot}#{NATIVELY_PACKAGED_AGENTS_DIR}"
-	fake_helper_scripts_dir = "#{fakeroot}#{NATIVELY_PACKAGED_HELPER_SCRIPTS_DIR}"
-	fake_resources_dir = "#{fakeroot}/usr/share/phusion-passenger"
-	fake_docdir = "#{fakeroot}#{NATIVELY_PACKAGED_DOCDIR}"
+	fake_agents_dir = "#{fakeroot}/usr/lib/#{GLOBAL_NAMESPACE_DIRNAME}/agents"
+	fake_helper_scripts_dir = "#{fakeroot}/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/helper-scripts"
+	fake_resources_dir = "#{fakeroot}/usr/share/passenger"
+	fake_include_dir = "#{fakeroot}/usr/share/passenger/include"
+	fake_docdir = "#{fakeroot}/usr/share/doc/#{GLOBAL_NAMESPACE_DIRNAME}"
 	fake_bindir = "#{fakeroot}/usr/bin"
 	fake_sbindir = "#{fakeroot}/usr/sbin"
-	fake_source_root = "#{fakeroot}#{NATIVELY_PACKAGED_SOURCE_ROOT}"
-	fake_apache2_module = "#{fakeroot}#{NATIVELY_PACKAGED_APACHE2_MODULE}"
-	fake_apache2_module_dir = File.dirname(fake_apache2_module)
+	fake_apache2_module_dir = "#{fakeroot}/usr/lib/apache2/modules"
+	fake_apache2_module = "#{fake_apache2_module_dir}/mod_passenger.so"
+	fake_ruby_extension_source_dir = "#{fakeroot}/usr/share/passenger/ruby_extension_source"
 	
 	sh "rm -rf #{fakeroot}"
 	sh "mkdir -p #{fakeroot}"
 	
+	# Ruby sources
+	sh "mkdir -p #{fake_rubylibdir}"
+	sh "cp #{PhusionPassenger.ruby_libdir}/phusion_passenger.rb #{fake_rubylibdir}/"
+	sh "cp -R #{PhusionPassenger.ruby_libdir}/phusion_passenger #{fake_rubylibdir}/"
+
+	# Phusion Passenger common libraries
 	sh "mkdir -p #{fake_libdir}"
-	sh "cp #{LIBDIR}/phusion_passenger.rb #{fake_libdir}/"
-	sh "cp -R #{LIBDIR}/phusion_passenger #{fake_libdir}/"
+	sh "cp -R #{PhusionPassenger.lib_dir}/common #{fake_libdir}/"
+	sh "rm -rf #{fake_libdir}/common/libboost_oxt"
 	
+	# Ruby extension binaries
 	sh "mkdir -p #{fake_native_support_dir}"
-	native_support_archdir = PlatformInfo.ruby_extension_binary_compatibility_ids.join("-")
+	native_support_archdir = PlatformInfo.ruby_extension_binary_compatibility_id
 	sh "mkdir -p #{fake_native_support_dir}"
-	sh "cp -R ext/ruby/#{native_support_archdir}/*.#{LIBEXT} #{fake_native_support_dir}/"
+	sh "cp -R buildout/ruby/#{native_support_archdir}/*.#{LIBEXT} #{fake_native_support_dir}/"
 	
+	# Agents
 	sh "mkdir -p #{fake_agents_dir}"
-	sh "cp -R #{AGENTS_DIR}/* #{fake_agents_dir}/"
+	sh "cp -R #{PhusionPassenger.agents_dir}/* #{fake_agents_dir}/"
 	sh "rm -rf #{fake_agents_dir}/*.dSYM"
 	sh "rm -rf #{fake_agents_dir}/*/*.dSYM"
+	sh "rm -rf #{fake_agents_dir}/*.o"
 	
+	# Helper scripts
 	sh "mkdir -p #{fake_helper_scripts_dir}"
-	sh "cp -R #{HELPER_SCRIPTS_DIR}/* #{fake_helper_scripts_dir}/"
+	sh "cp -R #{PhusionPassenger.helper_scripts_dir}/* #{fake_helper_scripts_dir}/"
 	
+	# Resources
 	sh "mkdir -p #{fake_resources_dir}"
-	sh "cp resources/* #{fake_resources_dir}/"
+	sh "cp -R resources/* #{fake_resources_dir}/"
+
+	# Headers necessary for building the Nginx module
+	sh "mkdir -p #{fake_include_dir}"
+	# Infer headers that the Nginx module needs
+	headers = []
+	Dir["ext/nginx/*.[ch]"].each do |filename|
+		File.read(filename).split("\n").grep(%r{#include "common/(.+)"}) do |match|
+			headers << ["ext/common/#{$1}", $1]
+		end
+	end
+	headers.each do |header|
+		target = "#{fake_include_dir}/common/#{header[1]}"
+		dir = File.dirname(target)
+		if !File.directory?(dir)
+			sh "mkdir -p #{dir}"
+		end
+		sh "cp #{header[0]} #{target}"
+	end
+
+	# Nginx module sources
+	sh "mkdir -p #{fake_resources_dir}/ngx_http_passenger_module"
+	sh "cp ext/nginx/* #{fake_resources_dir}/ngx_http_passenger_module/"
 	
+	# Documentation
 	sh "mkdir -p #{fake_docdir}"
-	Packaging::ASCII_DOCS.each do |docfile|
-		sh "cp", docfile, "#{fake_docdir}/"
-	end
+	sh "cp doc/*.html #{fake_docdir}/"
 	sh "cp -R doc/images #{fake_docdir}/"
 	
+	# User binaries
 	sh "mkdir -p #{fake_bindir}"
 	Packaging::USER_EXECUTABLES.each do |exe|
 		sh "cp bin/#{exe} #{fake_bindir}/"
 	end
 	
+	# Superuser binaries
 	sh "mkdir -p #{fake_sbindir}"
 	Packaging::SUPER_USER_EXECUTABLES.each do |exe|
 		sh "cp bin/#{exe} #{fake_sbindir}/"
 	end
 	
+	# Apache 2 module
 	sh "mkdir -p #{fake_apache2_module_dir}"
 	sh "cp #{APACHE2_MODULE} #{fake_apache2_module_dir}/"
-	
-	sh "mkdir -p #{fake_source_root}"
-	spec.files.each do |filename|
-		next if File.directory?(filename)
-		dirname = File.dirname(filename)
-		if !File.directory?("#{fake_source_root}/#{dirname}")
-			sh "mkdir -p '#{fake_source_root}/#{dirname}'"
-		end
-		puts "cp '#{filename}' '#{fake_source_root}/#{dirname}/'"
-		FileUtils.cp(filename, "#{fake_source_root}/#{dirname}/")
-	end
-end
 
-desc "Create a Debian package"
-task 'package:debian' => 'package:check' do
-	checkbuilddeps = PlatformInfo.find_command("dpkg-checkbuilddeps")
-	debuild = PlatformInfo.find_command("debuild")
-	if !checkbuilddeps || !debuild
-		# devscripts requires dpkg-dev which contains dpkg-checkbuilddeps.
-		abort "Please run `apt-get install devscripts` first."
-	end
-	
-	if !system(checkbuilddeps)
-		STDERR.puts
-		abort "Please install aforementioned build dependencies first."
+	# Ruby extension sources
+	sh "mkdir -p #{fake_ruby_extension_source_dir}"
+	sh "cp -R #{PhusionPassenger.ruby_extension_source_dir}/* #{fake_ruby_extension_source_dir}"
+
+	puts "Creating #{fake_rubylibdir}/phusion_passenger/locations.ini"
+	File.open("#{fake_rubylibdir}/phusion_passenger/locations.ini", "w") do |f|
+		f.puts "[locations]"
+		f.puts "natively_packaged=true"
+		f.puts "bin=/usr/bin"
+		f.puts "agents=/usr/lib/passenger/agents"
+		f.puts "libdir=/usr/lib/passenger"
+		f.puts "helper_scripts=/usr/share/passenger/helper-scripts"
+		f.puts "resources=/usr/share/passenger"
+		f.puts "includedir=/usr/share/passenger/include"
+		f.puts "doc=/usr/share/doc/passenger"
+		f.puts "rubylibdir=/usr/lib/ruby/vendor_ruby"
+		f.puts "apache2_module=/usr/lib/apache2/modules/mod_passenger.so"
+		f.puts "ruby_extension_source=/usr/share/passenger/ruby_extension_source"
 	end
-	
-	sh "debuild"
+
+	sh "find #{fakeroot} -name .DS_Store -print0 | xargs -0 rm -f"
 end
diff --git a/build/preprocessor.rb b/build/preprocessor.rb
new file mode 100644
index 0000000..43a96b5
--- /dev/null
+++ b/build/preprocessor.rb
@@ -0,0 +1,314 @@
+# encoding: utf-8
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2013 Phusion
+#
+#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+#
+#  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
+#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#  THE SOFTWARE.
+
+# Implements a simple preprocessor language:
+# 
+#     Today
+#     #if @today == :fine
+#         is a fine day.
+#     #elif @today == :good
+#         is a good day.
+#     #else
+#         is a sad day.
+#     #endif
+#     Let's go walking.
+# 
+# When run with...
+# 
+#     Preprocessor.new.start('input.txt', 'output.txt', :today => :fine)
+# 
+# ...will produce:
+# 
+#     Today
+#     is a fine day.
+#     Let's go walking.
+# 
+# Highlights:
+# 
+#  * #if blocks can be nested.
+#  * Expressions are Ruby expressions, evaluated within the binding of a
+#    Preprocessor::Evaluator object.
+#  * Text inside #if/#elif/#else are automatically unindented.
+class Preprocessor
+	def initialize
+		@indentation_size = 4
+		@debug = boolean_option('DEBUG')
+	end
+
+	def start(filename, output_filename, variables = {})
+		if output_filename
+			temp_output_filename = "#{output_filename}._new"
+			output = File.open(temp_output_filename, 'w')
+		else
+			output = STDOUT
+		end
+		the_binding  = create_binding(variables)
+		context      = []
+		@lineno      = 1
+		@indentation = 0
+
+		each_line(filename) do |line|
+			debug("context=#{context.inspect}, line=#{line.inspect}")
+
+			name, args_string, cmd_indentation = recognize_command(line)
+			case name
+			when "if"
+				case context.last
+				when nil, :if_true, :else_true
+					check_indentation(cmd_indentation)
+					result = the_binding.eval(args_string, filename, @lineno)
+					context.push(result ? :if_true : :if_false)
+					inc_indentation
+				when :if_false, :else_false, :if_ignore
+					check_indentation(cmd_indentation)
+					inc_indentation
+					context.push(:if_ignore)
+				else
+					terminate "#if is not allowed in this context"
+				end
+			when "elif"
+				case context.last
+				when :if_true
+					dec_indentation
+					check_indentation(cmd_indentation)
+					inc_indentation
+					context[-1] = :if_false
+				when :if_false
+					dec_indentation
+					check_indentation(cmd_indentation)
+					inc_indentation
+					result = the_binding.eval(args_string, filename, @lineno)
+					context[-1] = result ? :if_true : :if_false
+				when :else_true, :else_false
+					terminate "#elif is not allowed after #else"
+				when :if_ignore
+					dec_indentation
+					check_indentation(cmd_indentation)
+					inc_indentation
+				else
+					terminate "#elif is not allowed outside #if block"
+				end
+			when "else"
+				case context.last
+				when :if_true
+					dec_indentation
+					check_indentation(cmd_indentation)
+					inc_indentation
+					context[-1] = :else_false
+				when :if_false
+					dec_indentation
+					check_indentation(cmd_indentation)
+					inc_indentation
+					context[-1] = :else_true
+				when :else_true, :else_false
+					terminate "it is not allowed to have multiple #else clauses in one #if block"
+				when :if_ignore
+					dec_indentation
+					check_indentation(cmd_indentation)
+					inc_indentation
+				else
+					terminate "#else is not allowed outside #if block"
+				end
+			when "endif"
+				case context.last
+				when :if_true, :if_false, :else_true, :else_false, :if_ignore
+					dec_indentation
+					check_indentation(cmd_indentation)
+					context.pop
+				else
+					terminate "#endif is not allowed outside #if block"
+				end
+			when "", nil
+				# Either a comment or not a preprocessor command.
+				case context.last
+				when nil, :if_true, :else_true
+					output.puts(unindent(line))
+				else
+					# Check indentation but do not output.
+					unindent(line)
+				end
+			else
+				terminate "Unrecognized preprocessor command ##{name.inspect}"
+			end
+
+			@lineno += 1
+		end
+	ensure
+		if output_filename && output
+			output.close
+			stat = File.stat(filename)
+			File.chmod(stat.mode, temp_output_filename)
+			File.chown(stat.uid, stat.gid, temp_output_filename) rescue nil
+			File.rename(temp_output_filename, output_filename)
+		end
+	end
+
+private
+	UBUNTU_DISTRIBUTIONS = {
+		"lucid"    => "10.04",
+		"maverick" => "10.10",
+		"natty"    => "11.04",
+		"oneiric"  => "11.10",
+		"precise"  => "12.04",
+		"quantal"  => "12.10",
+		"raring"   => "13.04",
+		"saucy"    => "13.10"
+	}
+
+	# Provides the DSL that's accessible within.
+	class Evaluator
+		def _infer_distro_table(name)
+			if UBUNTU_DISTRIBUTIONS.has_key?(name)
+				return UBUNTU_DISTRIBUTIONS
+			end
+		end
+
+		def is_distribution?(expr)
+			if @distribution.nil?
+				raise "The :distribution variable must be set"
+			else
+				if expr =~ /^(>=|>|<=|<|==|\!=)[\s]*(.+)/
+					comparator = $1
+					name = $2
+				else
+					raise "Invalid expression #{expr.inspect}"
+				end
+
+				table1 = _infer_distro_table(@distribution)
+				table2 = _infer_distro_table(name)
+				raise "Distribution name #{@distribution.inspect} not recognized" if !table1
+				raise "Distribution name #{name.inspect} not recognized" if !table2
+				v1 = table1[@distribution]
+				v2 = table2[name]
+				
+				case comparator
+				when ">"
+					return v1 > v2
+				when ">="
+					return v1 >= v2
+				when "<"
+					return v1 < v2
+				when "<="
+					return v1 <= v2
+				when "=="
+					return v1 == v2
+				when "!="
+					return v1 != v2
+				else
+					raise "BUG"
+				end
+			end
+		end
+	end
+
+	def each_line(filename)
+		File.open(filename, 'r') do |f|
+			while true
+				begin
+					line = f.readline.chomp
+				rescue EOFError
+					break
+				end
+				yield line
+			end
+		end
+	end
+	
+	def recognize_command(line)
+		if line =~ /^([\s\t]*)#(.+)/
+			indentation_str = $1
+			command = $2
+
+			# Declare tabs as equivalent to 4 spaces. This is necessary for
+			# Makefiles in which the use of tabs is required.
+			indentation_str.gsub!("\t", "    ")
+
+			name = command.scan(/^\w+/).first
+			# Ignore shebangs and comments.
+			return if name.nil?
+
+			args_string = command.sub(/^#{Regexp.escape(name)}[\s\t]*/, '')
+			return [name, args_string, indentation_str.to_s.size]
+		else
+			return nil
+		end
+	end
+
+	def create_binding(variables)
+		object = Evaluator.new
+		variables.each_pair do |key, val|
+			object.send(:instance_variable_set, "@#{key}", val)
+		end
+		return object.instance_eval do
+			binding
+		end
+	end
+
+	def inc_indentation
+		@indentation += @indentation_size
+	end
+
+	def dec_indentation
+		@indentation -= @indentation_size
+	end
+
+	def check_indentation(expected)
+		if expected != @indentation
+			terminate "wrong indentation: found #{expected} characters, should be #{@indentation}"
+		end
+	end
+
+	def unindent(line)
+		line =~ /^([\s\t]*)/
+		# Declare tabs as equivalent to 4 spaces. This is necessary for
+		# Makefiles in which the use of tabs is required.
+		found = $1.to_s.gsub("\t", "    ").size
+		
+		if found >= @indentation
+			# Tab-friendly way to remove indentation.
+			remaining = @indentation
+			line = line.dup
+			while remaining > 0
+				if line[0..0] == " "
+					remaining -= 1
+				else
+					# This is a tab.
+					remaining -= 4
+				end
+				line.slice!(0, 1)
+			end
+			return line
+		else
+			terminate "wrong indentation: found #{found} characters, should be at least #{@indentation}"
+		end
+	end
+
+	def debug(message)
+		puts "DEBUG:#{@lineno}: #{message}" if @debug
+	end
+
+	def terminate(message)
+		abort "*** ERROR: line #{@lineno}: #{message}"
+	end
+end
diff --git a/build/rake_extensions.rb b/build/rake_extensions.rb
index 0d41fd8..e14f6ac 100644
--- a/build/rake_extensions.rb
+++ b/build/rake_extensions.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/build/rpm.rb b/build/rpm.rb
index 4924ddd..badef7e 100644
--- a/build/rpm.rb
+++ b/build/rpm.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (C) 2010  Phusion
 #
 #  This program is free software; you can redistribute it and/or modify
diff --git a/build/ruby_extension.rb b/build/ruby_extension.rb
index 7ef7134..455332d 100644
--- a/build/ruby_extension.rb
+++ b/build/ruby_extension.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -21,32 +21,41 @@
 #  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #  THE SOFTWARE.
 
-output_dir  = RUBY_EXTENSION_OUTPUT_DIR
-output_name = "passenger_native_support.#{LIBEXT}"
-source_dir  = "ext/ruby"
+if !PlatformInfo.passenger_needs_ruby_dev_header?
+	NATIVE_SUPPORT_TARGET = nil
 
-task :native_support => "#{output_dir}/#{output_name}"
-task :clean => 'native_support:clean'
+	task :native_support do
+		# Do nothing.
+	end
 
-dependencies = [
-	"#{output_dir}/Makefile",
-	"#{source_dir}/passenger_native_support.c"
-]
-file("#{output_dir}/#{output_name}" => dependencies) do
-	sh "mkdir -p '#{output_dir}'" if !File.exist?(output_dir)
-	sh "cd '#{output_dir}' && make"
-end
+	task 'native_support:clean' do
+		# Do nothing.
+	end
+else
+	output_dir  = RUBY_EXTENSION_OUTPUT_DIR
+	output_name = "passenger_native_support.#{LIBEXT}"
+	source_dir  = "ext/ruby"
+	NATIVE_SUPPORT_TARGET = "#{output_dir}/#{output_name}"
 
-file "#{output_dir}/Makefile" => "#{source_dir}/extconf.rb" do
-	sh "mkdir -p '#{output_dir}'" if !File.exist?(output_dir)
-	extconf_rb = File.expand_path("#{source_dir}/extconf.rb")
-	sh "cd '#{output_dir}' && #{PlatformInfo.ruby_command} '#{extconf_rb}'"
-end
+	task :native_support => "#{output_dir}/#{output_name}"
+	task :clean => 'native_support:clean'
 
-task 'native_support:clean' do
-	Dir["ext/ruby/*"].each do |entry|
-		if File.exist?("#{entry}/Makefile")
-			sh "rm -rf #{entry}"
-		end
+	dependencies = [
+		"#{output_dir}/Makefile",
+		"#{source_dir}/passenger_native_support.c"
+	]
+	file("#{output_dir}/#{output_name}" => dependencies) do
+		sh "mkdir -p '#{output_dir}'" if !File.exist?(output_dir)
+		sh "cd '#{output_dir}' && make"
 	end
-end
\ No newline at end of file
+
+	file "#{output_dir}/Makefile" => "#{source_dir}/extconf.rb" do
+		sh "mkdir -p '#{output_dir}'" if !File.exist?(output_dir)
+		extconf_rb = File.expand_path("#{source_dir}/extconf.rb")
+		sh "cd '#{output_dir}' && #{PlatformInfo.ruby_command} '#{extconf_rb}'"
+	end
+
+	task 'native_support:clean' do
+		sh "echo rm -rf #{output_dir}"
+	end
+end
diff --git a/build/ruby_tests.rb b/build/ruby_tests.rb
index ffb7161..c7091d9 100644
--- a/build/ruby_tests.rb
+++ b/build/ruby_tests.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -23,19 +23,21 @@
 
 ### Ruby components tests ###
 
+dependencies = [NATIVE_SUPPORT_TARGET, AGENT_OUTPUT_DIR + 'PassengerLoggingAgent'].compact
 desc "Run unit tests for the Ruby libraries"
-task 'test:ruby' => [:native_support, AGENT_OUTPUT_DIR + 'PassengerLoggingAgent'] do
+task 'test:ruby' => dependencies do
 	if PlatformInfo.rspec.nil?
 		abort "RSpec is not installed for Ruby interpreter '#{PlatformInfo.ruby_command}'. Please install it."
 	else
 		Dir.chdir("test") do
-			ruby "#{PlatformInfo.rspec} -c -f s ruby/*_spec.rb ruby/*/*_spec.rb"
+			ruby "#{PlatformInfo.rspec} -c -f s -P 'dont-autoload-anything' ruby/*_spec.rb ruby/*/*_spec.rb"
 		end
 	end
 end
 
+dependencies = [NATIVE_SUPPORT_TARGET].compact
 desc "Run coverage tests for the Ruby libraries"
-task 'test:rcov' => :native_support do
+task 'test:rcov' => dependencies do
 	if PlatformInfo.rspec.nil?
 		abort "RSpec is not installed for Ruby interpreter '#{PlatformInfo.ruby_command}'. Please install it."
 	else
@@ -46,4 +48,4 @@ task 'test:rcov' => :native_support do
 				*Dir["ruby/*.rb", "ruby/*/*.rb", "integration_tests.rb"]
 		end
 	end
-end
\ No newline at end of file
+end
diff --git a/build/test_basics.rb b/build/test_basics.rb
index ae07be2..a7c0ce7 100644
--- a/build/test_basics.rb
+++ b/build/test_basics.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -22,7 +22,7 @@
 #  THE SOFTWARE.
 
 TEST_BOOST_OXT_LIBRARY = LIBBOOST_OXT
-TEST_COMMON_LIBRARY    = LIBCOMMON
+TEST_COMMON_LIBRARY    = COMMON_LIBRARY
 
 TEST_COMMON_CFLAGS = "-DTESTING_APPLICATION_POOL " <<
 	"#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}"
@@ -32,7 +32,8 @@ task :test => ['test:oxt', 'test:cxx', 'test:ruby', 'test:integration']
 
 desc "Clean all compiled test files"
 task 'test:clean' do
-	sh("rm -rf test/oxt/oxt_test_main test/oxt/*.o test/cxx/CxxTestMain test/cxx/*.o")
+	sh("rm -rf test/oxt/oxt_test_main test/oxt/*.o test/cxx/*.dSYM test/cxx/CxxTestMain")
+	sh("rm -f test/cxx/*.o test/cxx/*/*.o test/cxx/*.gch")
 	sh("rm -f test/support/allocate_memory")
 end
 
@@ -41,3 +42,17 @@ task :clean => 'test:clean'
 file 'test/support/allocate_memory' => 'test/support/allocate_memory.c' do
 	create_c_executable('test/support/allocate_memory', 'test/support/allocate_memory.c')
 end
+
+desc "Install developer dependencies"
+task 'test:install_deps' do
+	gem_install = PlatformInfo.gem_command + " install --no-rdoc --no-ri"
+	gem_install = "#{PlatformInfo.ruby_sudo_command} #{gem_install}" if boolean_option('SUDO')
+	sh "#{gem_install} rails -v 2.3.15"
+	sh "#{gem_install} bundler rspec mime-types daemon_controller json rack"
+	sh "#{gem_install} mizuho bluecloth" if boolean_option('DOCTOOLS', true)
+	if boolean_option('RAILS_BUNDLES', true)
+		sh "cd test/stub/rails3.0 && bundle install"
+		sh "cd test/stub/rails3.1 && bundle install"
+		sh "cd test/stub/rails3.2 && bundle install"
+	end
+end
diff --git a/debian.template/README.Debian b/debian.template/README.Debian
new file mode 100644
index 0000000..1fccf8c
--- /dev/null
+++ b/debian.template/README.Debian
@@ -0,0 +1,15 @@
+Phusion Passenger module for Apache2
+AKA mod_rails or mod_rack
+
+This is the Phusion Passenger (mod_rails/mod_rack) Apache 2 module
+package offering support for Ruby web applications based on Rails or
+Rack. There is even experimental support for WSGI Python apps.
+
+This package version manages the dependencies for you and will install
+a fully working Apache2 setup with the module in place and activated. No
+need to run any installers or other programs. The package does all that
+for you.
+
+All you need do is add your virtual host to your setup, and reload
+Apache2. See the User Guide (passenger/Users guide.html or
+passenger/Users guide.txt.gz) for more information.
diff --git a/debian.template/changelog b/debian.template/changelog
new file mode 100644
index 0000000..81b6f32
--- /dev/null
+++ b/debian.template/changelog
@@ -0,0 +1,316 @@
+ruby-passenger (1:4.0.5-1bbox1~precise1) precise; urgency=high
+
+  * New upstream release, 4.0.5. Fixes CVE-2013-2119
+
+ -- John Leach <john at brightbox.co.uk>  Wed, 29 May 2013 16:02:35 +0100
+
+ruby-passenger (1:4.0.4-1bbox1~precise1) precise; urgency=low
+
+  * New upstream release, 4.0.4
+
+ -- John Leach <john at brightbox.co.uk>  Tue, 28 May 2013 12:02:36 +0100
+
+ruby-passenger (1:4.0.3-bbox1~lucid1) lucid; urgency=low
+
+  * New upstream release, 4.0.3
+  * Remove packaging fix patches now applied upstream
+  * Set Breaks field to remove old passenger packages
+
+ -- John Leach <john at brightbox.co.uk>  Sat, 25 May 2013 11:50:16 +0100
+
+ruby-passenger (1:4.0.2-bbox2~lucid1) lucid; urgency=low
+
+  * New upstream release, 4.0.2
+
+ -- John Leach <john at brightbox.co.uk>  Wed, 22 May 2013 14:04:01 +0000
+
+passenger (1:3.0.14-1bbox1+ng) precise; urgency=low
+
+  * New upstream release, 3.0.14
+  * Bumped epoch to 1 to always prefer over the non-ruby-ng packages
+
+ -- John Leach <john at brightbox.co.uk>  Wed, 25 Jul 2012 18:21:17 +0100
+
+passenger (3.0.13-1bbox2+ng) precise; urgency=low
+
+  * Removed 01_disable_html5_documentation.patch
+
+ -- John Leach <john at brightbox.co.uk>  Fri, 15 Jun 2012 16:10:50 +0100
+
+passenger (3.0.13-1bbox1+ng) precise; urgency=low
+
+  * New upstream release, 3.0.13
+
+ -- John Leach <john at brightbox.co.uk>  Fri, 15 Jun 2012 12:16:50 +0100
+
+passenger (3.0.12-1bbox1+ng) lucid; urgency=low
+
+  * New upstream release, 3.0.12
+
+ -- John Leach <john at brightbox.co.uk>  Fri, 13 Apr 2012 17:19:42 +0100
+
+passenger (3.0.11-2bbox5) lucid; urgency=low
+
+  * Fix dependencies to avoid conflicts when upgrading from old
+    passenger-common packages
+
+ -- John Leach <john at brightbox.co.uk>  Thu, 05 Apr 2012 12:51:50 +0100
+
+passenger (3.0.11-2bbox4) lucid; urgency=low
+
+  * Added libgoogle-perftools-dev build dependency, for building with Ruby
+    Enterprise Edition
+
+ -- John Leach <john at brightbox.co.uk>  Thu, 23 Feb 2012 20:19:41 +0000
+
+passenger (3.0.11-2bbox3) lucid; urgency=low
+
+  * Added ruby1.9.1-dev build dependency
+
+ -- John Leach <john at brightbox.co.uk>  Wed, 22 Feb 2012 23:34:40 +0000
+
+passenger (3.0.11-2bbox2) lucid; urgency=low
+
+  * Support for ruby 1.9.x (adds passenger-common1.8 and
+    passenger-common1.9.1)
+
+ -- John Leach <john at brightbox.co.uk>  Wed, 22 Feb 2012 17:43:02 +0000
+
+passenger (3.0.11-1bbox1) lucid; urgency=low
+
+  * New upstream release, 3.0.11
+
+ -- John Leach <john at brightbox.co.uk>  Mon, 28 Nov 2011 12:32:08 +0000
+
+passenger (3.0.9-1bbox1) lucid; urgency=low
+
+  * New upstream release, 3.0.9
+
+ -- John Leach <john at brightbox.co.uk>  Mon, 05 Sep 2011 22:21:03 +0100
+
+passenger (3.0.8-1bbox1) lucid; urgency=low
+
+  * New upstream release, 3.0.8
+  * Added 01_disable_html5_documentation.patch to fix documentation build with
+    older versions of asciidoc
+
+ -- John Leach <john at brightbox.co.uk>  Thu, 04 Aug 2011 22:28:58 +0100
+
+passenger (3.0.7-1bbox2) lucid; urgency=low
+
+  * Made passenger-dev suitable for building nginx-passenger
+
+ -- John Leach <john at brightbox.co.uk>  Fri, 15 Apr 2011 11:36:04 +0100
+
+passenger (3.0.7-1bbox1) lucid; urgency=low
+
+  * New upstream version, 3.0.7
+
+ -- John Leach <john at brightbox.co.uk>  Thu, 14 Apr 2011 21:54:24 +0100
+
+passenger (3.0.4-1bbox1) lucid; urgency=low
+
+  * New upstream version
+  * Removed 01_add_missing_packaging_constants.patch as it's now upstream
+  * Initial passenger-dev package
+
+ -- John Leach <john at brightbox.co.uk>  Thu, 03 Mar 2011 11:56:57 +0000
+
+passenger (3.0.1-1bbox2) hardy; urgency=low
+
+  * Fixed packaging bug with vendored libev
+
+ -- John Leach <john at brightbox.co.uk>  Sun, 12 Dec 2010 16:57:41 +0000
+
+passenger (3.0.1-1bbox1) hardy; urgency=low
+
+  * New Upstream Version, 3.0.1
+  * Added 01_add_missing_packaging_constants.patch to fix issue #592
+
+ -- John Leach <john at brightbox.co.uk>  Sun, 12 Dec 2010 14:20:31 +0000
+
+passenger (3.0.0-1bbox3) hardy; urgency=low
+
+  * Fixed clean of vendored libev
+
+ -- John Leach <john at brightbox.co.uk>  Thu, 11 Nov 2010 17:30:20 +0000
+
+passenger (3.0.0-1bbox2) hardy; urgency=low
+
+  * Fixed packaging bug with vendored libev
+
+ -- John Leach <john at brightbox.co.uk>  Wed, 19 Oct 2010 21:37:19 +0100
+
+passenger (3.0.0-1bbox1) hardy; urgency=low
+
+  * New Upstream Version, 3.0.0
+
+ -- John Leach <john at brightbox.co.uk>  Wed, 19 Oct 2010 12:57:07 +0100
+
+passenger (3.0.0-1bbox1~pre3) hardy; urgency=low
+
+  * New Upstream Version, 3.0.0~pre3
+
+ -- John Leach <john at brightbox.co.uk>  Wed, 20 Sep 2010 17:27:09 +0100
+
+passenger (2.2.15-1bbox1) hardy; urgency=low
+
+  * New Upstream Version, 2.2.15
+
+ -- Ben Arblaster <ben at brightbox.co.uk>  Tue, 06 Jul 2010 14:37:38 +0100
+
+passenger (2.2.14-1bbox2) hardy; urgency=low
+
+  * New Upstream Version, 2.2.14
+
+ -- Ben Arblaster <ben at brightbox.co.uk>  Wed, 23 Jun 2010 11:32:26 +0100
+
+passenger (2.2.11-1bbox2) hardy; urgency=low
+
+  * Fix dependency on passenger-common
+
+ -- John Leach <john at brightbox.co.uk>  Fri, 18 Jun 2010 07:41:26 +0100
+
+passenger (2.2.11-1bbox1) hardy; urgency=low
+
+  * New Upstream Version, 2.2.11
+
+ -- John Leach <john at brightbox.co.uk>  Fri, 05 Mar 2010 15:03:50 +0000
+
+passenger (2.2.10-1bbox2) hardy; urgency=low
+
+  * Change depency from apache mpm to apache common package
+
+ -- John Leach <john at brightbox.co.uk>  Thu, 04 Mar 2010 14:52:46 +0000
+
+passenger (2.2.10-1bbox1) hardy; urgency=low
+
+  * New Upstream Version, 2.2.10
+
+ -- John Leach <john at brightbox.co.uk>  Thu, 25 Feb 2010 15:31:42 +0000
+
+passenger (2.2.9-1bbox1) hardy; urgency=low
+
+  * New Upstream Version, 2.2.9
+
+ -- John Leach <john at brightbox.co.uk>  Fri, 08 Jan 2010 11:37:10 +0000
+
+passenger (2.2.7-1bbox1) hardy; urgency=low
+
+  * New Upstream Version, 2.2.7
+
+ -- John Leach <john at brightbox.co.uk>  Mon, 23 Nov 2009 20:04:04 +0000
+
+passenger (2.2.5-1bbox1) hardy; urgency=low
+
+  * New Upstream Version, 2.2.5
+
+ -- John Leach <john at brightbox.co.uk>  Thu, 03 Sep 2009 08:13:14 +0100
+
+passenger (2.2.4-1bbox1) hardy; urgency=low
+
+  * New Upstream Version, 2.2.4
+
+ -- John Leach <john at brightbox.co.uk>  Mon, 29 Jun 2009 11:05:34 +0100
+
+passenger (2.2.2-1bbox2) hardy; urgency=low
+
+  * Changed dependency from librack to librack1.8
+
+ -- John Leach <john at brightbox.co.uk>  Fri, 01 May 2009 13:05:22 +0100
+
+passenger (2.2.2-1bbox1) hardy; urgency=low
+
+  * New Upstream Version, 2.2.2
+  * Updated dependency to librack 1.0.0
+
+ -- John Leach <john at brightbox.co.uk>  Fri, 01 May 2009 12:21:43 +0100
+
+passenger (2.2.1-1bbox2) hardy; urgency=low
+
+  * Conflicts with older versions of libapache2-mod-passenger
+  * libapache2-mod-passenger depends on exact version of passenger-common
+
+ -- John Leach <john at brightbox.co.uk>  Wed, 22 Apr 2009 18:49:42 +0100
+
+passenger (2.2.1-1bbox1) hardy; urgency=low
+
+  * New Upstream Version, 2.2.1
+  * Split into separate packages, to allow nginx support
+
+ -- John Leach <john at brightbox.co.uk>  Mon, 20 Apr 2009 17:18:09 +0100
+
+passenger (2.2.0-1bbox1) hardy; urgency=low
+
+  * New Upstream Version, 2.2
+
+ -- John Leach <john at brightbox.co.uk>  Fri, 17 Apr 2009 10:34:14 +0100
+
+passenger (2.1.3-1bbox1) hardy; urgency=low
+
+  * New upstream version, 2.1.3
+
+ -- John Leach <john at brightbox.co.uk>  Sun, 05 Apr 2009 15:14:34 +0100
+
+passenger (2.1.2-1bbox1) hardy; urgency=low
+
+  * New upstream version
+
+ -- John Leach <john at brightbox.co.uk>  Sat, 14 Mar 2009 17:34:17 +0000
+
+passenger (2.1.1.20090309-0bbox1) hardy; urgency=low
+
+  * New upstream version
+
+ -- John Leach <john at brightbox.co.uk>  Wed, 11 Mar 2009 00:05:15 +0000
+
+passenger (2.0.6-0bbox2) hardy; urgency=low
+
+  * Fixed depends to allow apache2-mpm-prefork instead of apache2-mpm-worker
+
+ -- John Leach <john at brightbox.co.uk>  Sun, 11 Jan 2009 15:01:22 +0000
+
+passenger (2.0.6-0bbox1) hardy; urgency=low
+
+  * New Upstream Version, 2.0.6
+
+ -- John Leach <john at brightbox.co.uk>  Mon, 15 Dec 2008 19:29:13 +0000
+
+passenger (2.0.5-0bbox1) hardy; urgency=low
+
+  * New Upstream Version, 2.0.5
+
+ -- John Leach <john at brightbox.co.uk>  Fri, 05 Dec 2008 14:22:41 +0000
+
+passenger (2.0.4-1bbox2) hardy; urgency=medium
+
+  * Added 11_fix_passenger-config_version.patch to fix bug in passenger-config
+    (Thanks to Rich Drummond)
+  * Changed depends to allow apache2-mpm-prefork instead of apache2-mpm-worker
+
+ -- John Leach <john at brightbox.co.uk>  Wed, 03 Dec 2008 18:14:46 +0000
+
+passenger (2.0.4-1bbox1) hardy; urgency=low
+
+  * New upstream version, 2.0.4
+
+ -- John Leach <john at brightbox.co.uk>  Mon, 01 Dec 2008 23:00:11 +0000
+
+passenger (2.0.3-1bbox4) hardy; urgency=low
+
+  * Tweaked build-depends for Ruby 1.8
+
+ -- John Leach <john at brightbox.co.uk>  Wed, 26 Nov 2008 17:41:07 +0000
+
+passenger (2.0.3-0ubuntu1~bbox3) hardy; urgency=low
+
+  * Change rubygems depends to suggests
+  * Fix typo in control that led to mod_passenger.so being put in /
+
+ -- John Leach <john at brightbox.co.uk>  Wed, 26 Nov 2008 14:02:29 +0000
+
+passenger (2.0.3-0ubuntu1~bbox2) intrepid; urgency=low
+
+  * Initial release: closes LP: #246719
+
+ -- Neil Wilson <neil at brightbox.co.uk>  Sun, 17 Aug 2008 22:30:35 +0100
diff --git a/debian.template/compat b/debian.template/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian.template/compat
@@ -0,0 +1 @@
+7
diff --git a/debian.template/control b/debian.template/control
new file mode 100644
index 0000000..707ab00
--- /dev/null
+++ b/debian.template/control
@@ -0,0 +1,71 @@
+Source: ruby-passenger
+Section: ruby
+Priority: optional
+Maintainer: John Leach <john at brightbox.co.uk>
+Uploaders: Phusion <info at phusion.nl>, Hongli Lai <hongli at phusion.nl>
+Build-Depends: debhelper (>= 7.0.50~), rake,
+ ruby1.8, ruby1.8-dev, rubygems, ruby1.9.1, ruby1.9.1-dev,
+ apache2-mpm-worker | apache2-mpm, apache2-threaded-dev,
+ libapr1-dev, libcurl4-openssl-dev, libev-dev (>= 1:4.0.0)
+Standards-Version: 3.9.3
+Homepage: https://www.phusionpassenger.com/
+Vcs-Git: git://github.com/johnl/deb-passenger.git
+Vcs-Browser: https://github.com/johnl/deb-passenger
+XS-Ruby-Versions: all
+
+Package: ruby-passenger
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, rubygems (>= 1.2), ruby-rack
+Recommends: ruby-passenger-doc (= ${binary:Version})
+Suggests: python
+Breaks: libapache2-mod-passenger (<< 1:3.9.1), passenger-common,
+ passenger-common1.8, passenger-common1.9.1
+Replaces: libapache2-mod-passenger (<< 1:3.9.1),
+ passenger-common, passenger-common1.8, passenger-common1.9.1
+Description: Rails and Rack support for Apache2 and Nginx
+ Phusion Passenger — a.k.a. mod_rails or mod_rack — makes
+ deployment of Ruby web applications, such as those built on the
+ revolutionary Ruby on Rails web framework, a breeze.
+
+Package: ruby-passenger-dev
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter,
+ ruby-passenger (= ${binary:Version})
+Suggests: python
+Replaces: passenger-dev
+Breaks: passenger-dev
+Description: Rails and Rack support for Apache2 and Nginx
+ Phusion Passenger — a.k.a. mod_rails or mod_rack — makes
+ deployment of Ruby web applications, such as those built on the
+ revolutionary Ruby on Rails web framework, a breeze.
+ .
+ This package provides the development dependencies, for building the NGINX module
+
+Package: libapache2-mod-passenger
+Architecture: any
+Section: web
+Depends: ${shlibs:Depends}, ${misc:Depends}, apache2-mpm-worker (>= 2.2.9-9) |
+ apache2-mpm-prefork (>= 2.2.9-9) | apache2-mpm-itk (>= 2.2.9-9) | apache2-mpm-event (>= 2.2.9-9),
+ ruby-passenger (= ${binary:Version})
+Description: Rails and Rack support for Apache2
+ Phusion Passenger — a.k.a. mod_rails or mod_rack — makes
+ deployment of Ruby web applications, such as those built on the
+ revolutionary Ruby on Rails web framework, a breeze.
+ .
+ This package contains the Apache 2 module required by Phusion Passenger.
+
+Package: ruby-passenger-doc
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}
+Suggests: www-browser
+Provides: passenger-doc
+Conflicts: passenger-doc
+Replaces: passenger-doc
+Description: Rails and Rack support for Apache2 - Documentation
+ Phusion Passenger — a.k.a. mod_rails or mod_rack — makes
+ deployment of Ruby web applications, such as those built on the
+ revolutionary Ruby on Rails web framework, a breeze.
+ .
+ This package provides the documentation for Phusion Passenger.
+
diff --git a/debian.template/copyright b/debian.template/copyright
new file mode 100644
index 0000000..1c9a8a9
--- /dev/null
+++ b/debian.template/copyright
@@ -0,0 +1,385 @@
+This package was debianized by Leandro Nunes dos Santos <leandronunes at safernet.org.br> on
+Mon, 29 Sep 2008 19:36:41 -0300.
+
+It incorporates packaging work done by Neil Wilson <neil at brightbox.co.uk>
+
+Some further refined packaging work was done by David Moreno <david at axiombox.com> and
+Micah Anderson <micah at riseup.net>.
+
+It was downloaded from http://www.modrails.com/install.html
+
+Upstream Authors: Hongli Lai <hongli at plan99.net>
+                    Ninh Bui <ninh.bui at gmail.com>
+
+Copyright:
+
+    Copyright (C) 2008 Hongli Lai & Ninh Bui
+
+License:
+
+Phusion Passenger is licensed under the GNU General Public License (GPL)
+version 2, and *only* version 2 (i.e. not version 3 or any later versions).
+
+In addition to the GNU General Public License v2 licensing terms, we explicitly
+grand you the permission to run any application on top of Phusion Passenger,
+regardless of the application's own licensing terms. The application will not
+be bound to the terms of the GPL in any way. That is, the GPL only applies to
+Phusion Passenger itself, and not to applications that are run through Phusion
+Passenger.
+
+We also explicitly allow Apache to load the Phusion Passenger Apache module,
+without Apache or any other loaded modules needing to be released under the
+terms of the GPL.
+
+On Debian systems, the full text of the GNU General Public License can be
+found at /usr/share/common-licenses/GPL.
+
+
+This package also contains a modified version of Boost library:
+
+Copyright:
+
+The individual copyright and license statements generally appear in
+library headers, though a few appear in other files. For more detailed 
+copyright information, see debian/copyright file from Debian boost package.
+
+License:
+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+The file lib/phusion_passenger/railz/cgi_fixed.rb license is as follows:
+
+# Copyright (c) 2004 Zed A. Shaw
+#
+# 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 AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+All files under ext/oxt are licensed under the MIT license and are
+Copyright (c) 2008 Phusion:
+
+ *
+ * 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
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+
+Rack is also vendored with this version of Passenger under the following terms:
+
+Copyright (c) 2007, 2008, 2009 Christian Neukirchen <purl.org/net/chneukirchen>
+
+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 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+All files located under ext/common hold the same Copyright and license
+as the main Passenger source (Copyright (C) 2008 Hongli Lai & Ninh Bui
+and GPLv2 only), except where noted below:
+
+ext/common/Base65.[cpp,h] is Copyright (C) 2004-2008 René Nyffenegger:
+
+ * Modified by Phusion for inclusion in Phusion Passenger.
+ *
+ * This source code is provided 'as-is', without any express or implied
+ * warranty. In no event will the author be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this source code must not be misrepresented; you must not
+ *    claim that you wrote the original source code. If you use this source code
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ *
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original source code.
+ *
+ * 3. This notice may not be removed or altered from any source distribution.
+ *
+ * René Nyffenegger rene.nyffenegger at adp-gmbh.ch
+ *
+ */
+---------------------------------------------------------------------------
+All files located under ext/apache2 hold the same Copyright and license
+as the main Passenger source (Copyright (C) 2008 Hongli Lai & Ninh Bui
+and GPLv2 only), except where noted below:
+
+A few functions in ext/apache2/Hooks.cpp are based on the source code of
+mod_scgi version 1.9. Its license is included in this file.
+Please note that these licensing terms *only* encompass those few
+functions, and not Passenger as a whole.
+
+The functions which are based on mod_scgi's code are as follows:
+- Hooks::prepareRequest(). Although our version looks nothing like the
+  original, the idea of checking for the file's existance from the
+  map_to_storage/fixups hook is inspired by mod_scgi's code.
+- Hooks::handleRequest(). Although our version looks nothing like the original,
+  the idea of passing the backend process's socket file descriptor up to the
+  bucket brigade chain is inspired by mod_scgi's code.
+- Hooks::http2env(), Hooks::lookupName(), Hooks::lookupHeader(),
+  Hooks::lookupEnv(), Hooks::addHeader(): Copied from mod_scgi's functions that
+  are named similarly. Slightly modified to make the coding style consistent
+  with the rest of Phusion Passenger.
+- Hooks::sendHeaders(): Based for the most part on mod_scgi's send_headers()
+  function.
+
+------------------------------------------------------------------------
+CNRI OPEN SOURCE LICENSE AGREEMENT
+
+IMPORTANT: PLEASE READ THE FOLLOWING AGREEMENT CAREFULLY.  BY
+COPYING, INSTALLING OR OTHERWISE USING SCGI-1.9 SOFTWARE, YOU ARE
+DEEMED TO HAVE AGREED TO THE TERMS AND CONDITIONS OF THIS LICENSE
+AGREEMENT.
+
+1. This LICENSE AGREEMENT is between Corporation for National
+   Research Initiatives, having an office at 1895 Preston White
+   Drive, Reston, VA 20191 ("CNRI"), and the Individual or
+   Organization ("Licensee") copying, installing or otherwise using
+   scgi-1.9 software in source or binary form and its associated
+   documentation ("scgi-1.9").
+
+2. Subject to the terms and conditions of this License Agreement,
+   CNRI hereby grants Licensee a nonexclusive, royalty-free, world-
+   wide license to reproduce, analyze, test, perform and/or display
+   publicly, prepare derivative works, distribute, and otherwise use
+   scgi-1.9 alone or in any derivative version, provided, however,
+   that CNRI's License Agreement and CNRI's notice of copyright,
+   i.e., "Copyright (c) 2004 Corporation for National Research
+   Initiatives; All Rights Reserved" are retained in scgi-1.9 alone
+   or in any derivative version prepared by Licensee.
+
+3. In the event Licensee prepares a derivative work that is based on
+   or incorporates scgi-1.9 or any part thereof, and wants to make
+   the derivative work available to others as provided herein, then
+   Licensee hereby agrees to include in any such work a brief
+   summary of the changes made to scgi-1.9.
+
+4. CNRI is making scgi-1.9 available to Licensee on an "AS IS"
+   basis.  CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+   IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO
+   AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY
+   OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF SCGI-1.9
+   WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF SCGI-
+   1.9 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
+   AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING SCGI-
+   1.9, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE
+   POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a
+   material breach of its terms and conditions.
+
+7. This License Agreement shall be governed by and interpreted in
+   all respects by the law of the State of Virginia, excluding
+   Virginia's conflict of law provisions.  Nothing in this License
+   Agreement shall be deemed to create any relationship of agency,
+   partnership, or joint venture between CNRI and Licensee.  This
+   License Agreement does not grant permission to use CNRI
+   trademarks or trade name in a trademark sense to endorse or
+   promote products or services of Licensee, or any third party.
+
+8. By copying, installing or otherwise using scgi-1.9, Licensee
+   agrees to be bound by the terms and conditions of this License
+   Agreement.
+
+---------------------------------------------------------------------------
+All files located under ext/nginx hold the same Copyright and license
+as the main Passenger source (Copyright (C) 2008 Hongli Lai & Ninh Bui
+and GPLv2 only), except where noted below:
+
+ext/nginx/Configuration.[c,h], ContentHandler.[c,h],
+ngx_http_passenger_module.[c,h] and StaticContentHandler.h is:
+
+/* Copyright (C) Igor Sysoev
+ * Copyright (C) 2007 Manlio Perillo (manlio.perillo at gmail.com)
+ * Copyright (C) 2008, 2009 Phusion
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+ext/nginx/StaticContentHandler.c is:
+/*
+ * Copyright (C) Igor Sysoev
+ * Copyright (C) 2009 Phusion
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+-----------------------------------------------------------------------------
+
+All files located under test hold the same Copyright and license
+as the main Passenger source (Copyright (C) 2008 Hongli Lai & Ninh Bui
+and GPLv2 only), except where noted below:
+
+test/stub/rails_apps/mycookbook/public/javascripts/controls.js is:
+
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//           (c) 2005-2007 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
+//           (c) 2005-2007 Jon Tirsen (http://www.tirsen.com)
+// Contributors:
+//  Richard Livsey
+//  Rahul Bhargava
+//  Rob Wills
+// 
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+test/stub/rails_apps/mycookbook/public/javascripts/dragdrop.js is:
+
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//           (c) 2005-2007 Sammi Williams (http://www.oriontransfer.co.nz, sammi at oriontransfer.co.nz)
+// 
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+test/stub/rails_apps/mycookbook/public/javascripts/effects.js is:
+
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// Contributors:
+//  Justin Palmer (http://encytemedia.com/)
+//  Mark Pilgrim (http://diveintomark.org/)
+//  Martin Bialasinki
+// 
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/ 
+
+test/stub/rails_apps/mycookbook/public/javascripts/prototype.js is:
+
+/*  Prototype JavaScript framework, version 1.6.0.1
+ *  (c) 2005-2007 Sam Stephenson
+ *
+ *  Prototype is freely distributable under the terms of an MIT-style license.
+ *  For details, see the Prototype web site: http://www.prototypejs.org/
+*/
+
+test/support/tut.h and tut_reporter.h is Copyright 2002-2006 Vladimir Dyuzhev:
+
+ * http://tut-framework.sourceforge.net/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
diff --git a/debian.template/libapache2-mod-passenger.install b/debian.template/libapache2-mod-passenger.install
new file mode 100644
index 0000000..772b93c
--- /dev/null
+++ b/debian.template/libapache2-mod-passenger.install
@@ -0,0 +1,3 @@
+usr/lib/apache2/modules/
+../passenger.conf etc/apache2/mods-available
+../passenger.load etc/apache2/mods-available
diff --git a/debian.template/libapache2-mod-passenger.postinst b/debian.template/libapache2-mod-passenger.postinst
new file mode 100644
index 0000000..c5ac89a
--- /dev/null
+++ b/debian.template/libapache2-mod-passenger.postinst
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+if [ "$1" != "configure" ]; then
+    exit 0
+fi
+
+reload_apache()
+{
+	if apache2ctl configtest 2>/dev/null; then
+		invoke-rc.d apache2 force-reload || true
+	else
+		echo "Your apache2 configuration is broken, so we're not restarting it for you."
+	fi
+}
+
+if [ -n "$2" ]; then
+# we're upgrading. test if we're enabled, and if so, restart to reload the module.
+	if [ -e /etc/apache2/mods-enabled/passenger.load ]; then
+		reload_apache
+	fi
+        exit 0
+fi
+
+if [ -e /etc/apache2/apache2.conf ]; then
+# Enable the module, but hide a2enmod's misleading message about apachectl
+# and force-reload the thing ourselves.
+        a2enmod passenger >/dev/null || true
+	reload_apache
+fi
+
+exit 0
+
diff --git a/debian.template/libapache2-mod-passenger.prerm b/debian.template/libapache2-mod-passenger.prerm
new file mode 100644
index 0000000..c7f5c2a
--- /dev/null
+++ b/debian.template/libapache2-mod-passenger.prerm
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+if [ "$1" != "remove" -a "$1" != "purge" ]; then
+        exit 0
+fi;
+
+if [ -e /etc/apache2/apache2.conf ]; then
+	a2dismod passenger || true
+fi
+
+exit 0
diff --git a/debian.template/locations.ini b/debian.template/locations.ini
new file mode 100644
index 0000000..cb5f345
--- /dev/null
+++ b/debian.template/locations.ini
@@ -0,0 +1,12 @@
+[locations]
+natively_packaged=true
+bin=/usr/bin
+agents=/usr/lib/passenger/agents
+libdir=/usr/lib/passenger
+helper_scripts=/usr/share/passenger/helper-scripts
+resources=/usr/share/passenger
+includedir=/usr/share/passenger/include
+doc=/usr/share/doc/ruby-passenger
+rubylibdir=/usr/lib/ruby/vendor_ruby
+apache2_module=/usr/lib/apache2/modules/mod_passenger.so
+ruby_extension_source=/usr/share/passenger/ruby_extension_source
\ No newline at end of file
diff --git a/debian.template/passenger.conf b/debian.template/passenger.conf
new file mode 100644
index 0000000..7761bf5
--- /dev/null
+++ b/debian.template/passenger.conf
@@ -0,0 +1,4 @@
+<IfModule mod_passenger.c>
+  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
+  PassengerDefaultRuby /usr/bin/ruby
+</IfModule>
diff --git a/debian.template/passenger.load b/debian.template/passenger.load
new file mode 100644
index 0000000..b588afd
--- /dev/null
+++ b/debian.template/passenger.load
@@ -0,0 +1 @@
+LoadModule passenger_module /usr/lib/apache2/modules/mod_passenger.so
diff --git a/test/stub/rails_apps/3.0/empty/public/favicon.ico b/debian.template/patches/series
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/public/favicon.ico
copy to debian.template/patches/series
diff --git a/debian.template/repack.sh b/debian.template/repack.sh
new file mode 100755
index 0000000..a51d172
--- /dev/null
+++ b/debian.template/repack.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+# Repackage upstream source to exclude non-distributable files
+# should be called as "repack.sh --upstream-source <ver> <downloaded file>
+# (for example, via uscan)
+
+set -e
+set -u
+
+VER="$2debian"
+FILE="$3"
+PKG=`dpkg-parsechangelog|grep ^Source:|sed 's/^Source: //'`
+
+REPACK_DIR="$PKG-$VER.orig" # DevRef § 6.7.8.2
+
+echo -e "\nRepackaging $FILE\n"
+
+DIR=`mktemp -d ./tmpRepackXXXXXX`
+trap "rm -rf \"$DIR\"" QUIT INT EXIT
+
+# Create an extra directory to cope with rootless tarballs
+UP_BASE="$DIR/unpack"
+mkdir "$UP_BASE"
+tar xzf "$FILE" -C "$UP_BASE"
+
+if [ `ls -1 "$UP_BASE" | wc -l` -eq 1 ]; then
+	# Tarball does contain a root directory
+	UP_BASE="$UP_BASE/`ls -1 "$UP_BASE"`"
+fi
+
+## Remove stuff
+rm -vfr $UP_BASE/test/support/valgrind.h
+rm -vfr $UP_BASE/debian
+
+mv "$UP_BASE" "$DIR/$REPACK_DIR"
+
+# Using a pipe hides tar errors!
+tar cfC "$DIR/repacked.tar" "$DIR" "$REPACK_DIR"
+gzip -9 < "$DIR/repacked.tar" > "$DIR/repacked.tar.gz"
+FILE="../${PKG}_${VER}.orig.tar.gz"
+mv "$DIR/repacked.tar.gz" "$FILE"
+
+echo "*** $FILE repackaged"
diff --git a/debian.template/ruby-passenger-dev.install b/debian.template/ruby-passenger-dev.install
new file mode 100644
index 0000000..e9f0082
--- /dev/null
+++ b/debian.template/ruby-passenger-dev.install
@@ -0,0 +1,3 @@
+usr/share/passenger/ngx_http_passenger_module
+usr/share/passenger/include/
+usr/lib/passenger/common/
diff --git a/debian.template/ruby-passenger-doc.install b/debian.template/ruby-passenger-doc.install
new file mode 100644
index 0000000..1dbcfe7
--- /dev/null
+++ b/debian.template/ruby-passenger-doc.install
@@ -0,0 +1,2 @@
+debian/tmp/usr/share/doc/passenger/* usr/share/doc/ruby-passenger/
+CONTRIBUTORS usr/share/doc/ruby-passenger/
diff --git a/debian.template/ruby-passenger.docs b/debian.template/ruby-passenger.docs
new file mode 100644
index 0000000..c130403
--- /dev/null
+++ b/debian.template/ruby-passenger.docs
@@ -0,0 +1,4 @@
+CONTRIBUTING.md
+README.md
+NEWS
+debian/README.Debian
diff --git a/debian.template/ruby-passenger.install b/debian.template/ruby-passenger.install
new file mode 100644
index 0000000..295931f
--- /dev/null
+++ b/debian.template/ruby-passenger.install
@@ -0,0 +1,11 @@
+usr/lib/passenger/agents/
+usr/share/passenger/helper-scripts/
+usr/share/passenger/templates/
+usr/share/passenger/standalone_default_root/
+usr/share/passenger/ruby_extension_source/
+usr/share/passenger/*.types
+usr/share/passenger/*.crt
+usr/lib/ruby/
+debian/locations.ini usr/lib/ruby/vendor_ruby/phusion_passenger/
+usr/sbin/
+usr/bin/
\ No newline at end of file
diff --git a/debian.template/ruby-passenger.manpages b/debian.template/ruby-passenger.manpages
new file mode 100644
index 0000000..174210e
--- /dev/null
+++ b/debian.template/ruby-passenger.manpages
@@ -0,0 +1,4 @@
+man/passenger-memory-stats.8
+man/passenger-status.8
+man/passenger-config.1
+man/passenger-stress-test.1
diff --git a/debian.template/rules.template b/debian.template/rules.template
new file mode 100755
index 0000000..29b556c
--- /dev/null
+++ b/debian.template/rules.template
@@ -0,0 +1,35 @@
+#!/usr/bin/make -f
+# export DH_VERBOSE=1
+
+export USE_VENDORED_LIBEV=false
+
+#if ['1', 'true', 'on', 'yes'].include?(ENV['USE_CCACHE'])
+	export USE_CCACHE=1
+#endif
+
+%:
+	dh $@
+
+override_dh_auto_configure:
+	# Do nothing
+
+override_dh_auto_build:
+	/usr/bin/ruby1.8 /usr/bin/rake fakeroot
+	mv pkg/fakeroot pkg/fakeroot1.8
+	/usr/bin/ruby1.9.1 /usr/bin/rake fakeroot
+	mv pkg/fakeroot pkg/fakeroot1.9.1
+
+override_dh_auto_install:
+	mkdir debian/tmp/
+	# Merge Ruby 1.8 and 1.9 files into a single directory.
+	cp -a pkg/fakeroot1.8/* debian/tmp/
+	cp -a pkg/fakeroot1.9.1/* debian/tmp/
+	# Do not package Passenger Standalone.
+	rm -rf debian/tmp/usr/bin/passenger
+
+override_dh_auto_clean:
+	/usr/bin/rake clean CLEAN_DOCS=false
+	rm -rf pkg/fakeroot1.8
+	rm -rf pkg/fakeroot1.9.1
+	# Hack to prevent HTML files from being renegerated
+	touch doc/*.html
diff --git a/debian.template/source/format b/debian.template/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian.template/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian.template/watch b/debian.template/watch
new file mode 100644
index 0000000..e56fe83
--- /dev/null
+++ b/debian.template/watch
@@ -0,0 +1,3 @@
+version=3
+options="dversionmangle=s/debian[0-9]*//" \
+http://rubyforge.org/frs/?group_id=5873 .*passenger-([\d.-]*)\.t.* debian debian/repack.sh
diff --git a/dev/copy_boost_headers.rb b/dev/copy_boost_headers.rb
index a242e34..317488e 100755
--- a/dev/copy_boost_headers.rb
+++ b/dev/copy_boost_headers.rb
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2012 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -24,16 +24,20 @@
 
 ESSENTIALS = [
 	"boost/detail/{limits,endian}.hpp",
-	"boost/config/*",
+	"boost/config",
+	"boost/mpl",
+	"boost/preprocessor/stringize.hpp",
 	"boost/smart_ptr/detail/sp_counted_*",
 	"boost/smart_ptr/detail/atomic_count*",
 	"boost/smart_ptr/detail/spinlock*",
-	"boost/thread/*",
-	"boost/thread/*/*",
-	"libs/thread/src/*",
+	"boost/thread",
+	"libs/thread/src",
+	"libs/system/src",
 	"boost/date_time/gregorian/formatters_limited.hpp",
 	"boost/date_time/date_formatting_limited.hpp",
-	"boost/non_type.hpp"
+	"boost/non_type.hpp",
+	"boost/detail/fenv.hpp",
+	"boost/foreach.hpp"
 ]
 EXCLUDE = [
 	"libs/thread/src/win32/*"
@@ -49,6 +53,8 @@ PROGRAM_SOURCE = %q{
 	#include <boost/function.hpp>
 	#include <boost/bind.hpp>
 	#include <boost/date_time/posix_time/posix_time.hpp>
+	#include <boost/foreach.hpp>
+	#include <boost/lambda/lambda.hpp>
 }
 
 require 'fileutils'
@@ -83,7 +89,9 @@ def copy_boost_files(patterns, exclude = nil)
 				copy_boost_files(["#{source}/*"], exclude)
 			else
 				target = source.slice(BOOST_DIR.size + 1 .. source.size - 1)
-				target.sub!(%r{^libs/thread/}, 'boost/')
+				if target =~ /^libs\//
+					target = "boost/#{target}"
+				end
 				if !File.exist?(target)
 					install(source, target)
 				end
@@ -111,6 +119,9 @@ def cleanup
 	FileUtils.rm_rf("boost/src/win32")
 	FileUtils.rm_rf("boost/asio/win32")
 	FileUtils.rm_rf("boost/smart_ptr/detail/spinlock_w32.hpp")
+	FileUtils.rm_rf("boost/smart_ptr/detail/sp_counted_base_w32.hpp")
+	FileUtils.rm_rf("boost/smart_ptr/detail/atomic_count_win32.hpp")
+	FileUtils.rm_rf("boost/config/platform/win32.hpp")
 	File.unlink("test.cpp") rescue nil
 end
 
@@ -118,7 +129,7 @@ end
 def copy_dependencies
 	done = false
 	while !done
-		missing_headers = `g++ test.cpp -c -I. 2>&1`.
+		missing_headers = `g++ -DBOOST_MPL_PREPROCESSING_MODE test.cpp -c -I. 2>&1`.
 		  split("\n").
 		  grep(/error: .*: No such file/).
 		  map do |line|
diff --git a/dev/find_owner_pipe_leaks.rb b/dev/find_owner_pipe_leaks.rb
index be4c0ef..b4c858c 100755
--- a/dev/find_owner_pipe_leaks.rb
+++ b/dev/find_owner_pipe_leaks.rb
@@ -1,5 +1,5 @@
 #!/usr/bin/env ruby
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/dev/render_error_pages.rb b/dev/render_error_pages.rb
index e6b2321..93fa63d 100755
--- a/dev/render_error_pages.rb
+++ b/dev/render_error_pages.rb
@@ -1,5 +1,5 @@
 #!/usr/bin/env ruby
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/dev/run_travis.sh b/dev/run_travis.sh
new file mode 100755
index 0000000..a166265
--- /dev/null
+++ b/dev/run_travis.sh
@@ -0,0 +1,90 @@
+#!/bin/bash
+set -e
+
+export VERBOSE=1
+export TRACE=1
+export rvmsudo_secure_path=1
+
+sudo sh -c 'cat >> /etc/hosts' <<EOF
+127.0.0.1 passenger.test
+127.0.0.1 mycook.passenger.test
+127.0.0.1 zsfa.passenger.test
+127.0.0.1 norails.passenger.test
+127.0.0.1 1.passenger.test 2.passenger.test 3.passenger.test
+127.0.0.1 4.passenger.test 5.passenger.test 6.passenger.test
+127.0.0.1 7.passenger.test 8.passenger.test 9.passenger.test
+EOF
+
+function run()
+{
+	echo "$ $@"
+	"$@"
+}
+
+run uname -a
+run lsb_release -a
+sudo tee /etc/dpkg/dpkg.cfg.d/02apt-speedup >/dev/null <<<"force-unsafe-io"
+
+if [[ "$TEST_RUBY_VERSION" != "" ]]; then
+	echo "$ rvm use $TEST_RUBY_VERSION"
+	if [[ -f ~/.rvm/scripts/rvm ]]; then
+		source ~/.rvm/scripts/rvm
+	else
+		source /usr/local/rvm/scripts/rvm
+	fi
+	rvm use $TEST_RUBY_VERSION
+	if [[ "$TEST_RUBYGEMS_VERSION" = "" ]]; then
+		run gem --version
+	fi
+fi
+
+if [[ "$TEST_RUBYGEMS_VERSION" != "" ]]; then
+	run rvm install rubygems $TEST_RUBYGEMS_VERSION
+	run gem --version
+fi
+
+if [[ "$TEST_CXX" = 1 ]]; then
+	run rake test:install_deps RAILS_BUNDLES=no DOCTOOLS=no
+	run rake test:cxx
+	run rake test:oxt
+fi
+
+if [[ "$TEST_RUBY" = 1 ]]; then
+	run rake test:install_deps DOCTOOLS=no
+	run rake test:ruby
+fi
+
+if [[ "$TEST_NGINX" = 1 ]]; then
+	run rake test:install_deps RAILS_BUNDLES=no DOCTOOLS=no
+	run gem install rack daemon_controller --no-rdoc --no-ri
+	run ./bin/passenger-install-nginx-module --auto --prefix=/tmp/nginx --auto-download
+	run rake test:integration:nginx
+fi
+
+if [[ "$TEST_APACHE2" = 1 ]]; then
+	run sudo apt-get update
+	run sudo apt-get install -y --no-install-recommends \
+		apache2-mpm-worker apache2-threaded-dev
+	run rake test:install_deps RAILS_BUNDLES=no DOCTOOLS=no
+	run gem install rack --no-rdoc --no-ri
+	run ./bin/passenger-install-apache2-module --auto
+	run rake test:integration:apache2
+fi
+
+if [[ "$TEST_DEBIAN_PACKAGING" = 1 ]]; then
+	run sudo apt-get update
+	run sudo apt-get install -y --no-install-recommends \
+		devscripts debhelper rake apache2-mpm-worker apache2-threaded-dev \
+		ruby1.8 ruby1.8-dev ruby1.9.1 ruby1.9.1-dev libev-dev gdebi-core \
+		source-highlight
+	run rake test:install_deps RAILS_BUNDLES=no
+	run rake debian:dev
+	run sudo gdebi -n pkg/ruby-passenger_*.deb
+	run sudo gdebi -n pkg/ruby-passenger-dev_*.deb
+	run sudo gdebi -n pkg/ruby-passenger-doc_*.deb
+	run sudo gdebi -n pkg/libapache2-mod-passenger_*.deb
+	run rvmsudo env LOCATIONS_INI=/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini \
+		rspec -f s -c test/integration_tests/native_packaging_spec.rb
+	run env PASSENGER_LOCATION_CONFIGURATION_FILE=/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini \
+		rake test:integration:apache2 SUDO=1
+fi
diff --git a/doc/ApplicationPool algorithm.txt b/doc/ApplicationPool algorithm.txt
deleted file mode 100644
index f5ba7c6..0000000
--- a/doc/ApplicationPool algorithm.txt	
+++ /dev/null
@@ -1,615 +0,0 @@
-= ApplicationPool algorithm
-
-
-== Introduction
-
-For efficiency reasons, Passenger keeps a pool spawned Rails/Ruby applications.
-Please read the C++ API documentation for the ApplicationPool class for a full
-introduction. This document describes an algorithm for managing the pool, in a
-high-level way.
-
-The algorithm should strive to keep spawning to a minimum.
-
-
-== Definitions
-
-=== Vocabulary
-
-- "Application root":
-  The toplevel directory in which an application is contained. For Rails
-  application, this is the same as RAILS_ROOT, i.e. the directory that contains
-  "app/", "public/", etc. For a Rack application, this is the directory that
-  contains "config.ru".
-
-- "Active application process":
-  An application process that has more than 0 sessions.
-
-=== Types
-
-Most of the types that we use in this document are pretty standard. But we
-explicitly define some special types:
-
-- list<SomeType>
-  A doubly linked list which contains elements of type SomeType. It supports
-  all the usual list operations that one can expect from a linked list, like
-  add_to_back(), etc.
-  
-  We assume that operations that insert an element into the list return an
-  iterator object. An iterator object is an opaque object which represents a
-  specific position in the list; it probably contains the links to the previous
-  and the next iterator, as well as a reference to the actual list element,
-  depending on the list implementation.
-  
-  The following operations deserve special mention:
-  * remove(iterator)
-    Removes the specified element from the list, as represented by the given
-    iterator. This operation can be done in O(1) time.
-  
-  * move_to_front(iterator)
-    Moves the specified element - as represented by the given iterator - to
-    the front of the list. This operation can be done in O(1) time.
-  
-- Group
-  A compound type (class) which contains information about an application root,
-  such as the application processes that have been spawned for this application
-  root.
-  
-  A Group has the following members:
-  * name (string):
-    This group's key in the _groups_ map of the application pool.
-
-  * app_root (string):
-    This group's application root. Note that it is *not* guaranteed that all
-    ProcessInfo objects in _processes_ have the same application root.
-
-  * processes (list<ProcessInfo>):
-    A list of ProcessInfo objects.
-    
-    Invariant:
-        processes is non-empty.
-        for all 0 <= i < processes.size() - 1:
-           processes[i].group_name == name
-           if processes[i].process is active:
-              processes[i + 1].process is active
-
-  * size (unsigned integer):
-    The number of items in _processes_.
-    Invariant:
-        if !detached:
-           size == processes.size()
-  
-  * max_requests (unsigned integer):
-    The maximum number of requests that each application process in
-    this group may process. After having processed this
-    many requests, the application process will be shut down.
-    A value of 0 indicates that there is no maximum.
-
-  * min_processes (unsigned integer):
-    The minimum number of processes that the cleaner thread should keep in
-    this group. Defaults to 0.
-
-  * spawning (boolean): Whether a background thread is currently spawning
-    a new process for this group.
-
-  * spawner_thread: A handle to the background thread that is currently
-    spawning a new process. Only valid if _spawning_ is true.
-
-  * detached (boolean): If true, then it indicates that this Group is
-    no longer accessible via _groups_.
-    Set to false by the constructor.
-    Invariant:
-       (detached) == (This Group is accessible via _groups_.)
-       if detached:
-          for all process_info objects p that have once been in this.processes:
-              p.detached
-
-  * environment (string): Does nothing. Data is stored in memory for analytics
-    purposes.
-
-- ProcessInfo
-  A compound type (class) which contains a reference to an application process
-  object, as well as various metadata, such as iterators for various linked
-  lists. These iterators make it possible to perform actions on the linked
-  lists in O(1) time.
-  
-  A ProcessInfo has the following members:
-  * process - A process object, representing an application process.
-  * group_name (string) - The name of the group that this ProcessInfo belongs
-    to.
-  * identifier (string) - A key that uniquely identifies this ProcessInfo in
-    this application pool. This key allows external processes to refer to a
-    specific ProcessInfo object without knowing its memory pointer. It's set
-    to a random string by ProcessInfo's constructor.
-  * start_time (timestamp with milisecond resolution) - The time at which this
-    application process was started. It's set to the current time by the
-    constructor.
-  * processed_requests (integer) - The number of requests processed by this
-    application instance so far. Set to 0 by the constructor.
-  * last_used (time) - The last time a session for this application process
-    was opened or closed.
-  * sessions (integer) - The number of open sessions for this application
-    process. It's set to 0 by the constructor.
-    Invariant:
-       (sessions == 0 && !detached) == (This ProcessInfo is in inactive_apps.)
-  * iterator - The iterator for this ProcessInfo in the linked list
-    groups[process_info.group_name].processes
-  * ia_iterator - The iterator for this ProcessInfo in the linked list
-    inactive_apps. This iterator is only valid if this ProcessInfo really is
-    in that list.
-  * detached (boolean) - If true, then it indicates that this ProcessInfo is
-    no longer accessible via _groups_; this implies that it's no longer
-    contained in its associated Group's _processes_ member, a), and that
-    _iterator_ and _ia_iterator_ are no longer valid.
-    Set to false by the constructor.
-    Invariant:
-       (detached) == (This ProcessInfo is accessible via _groups_.)
-
-- PoolOptions
-  A structure containing additional information used by the spawn manager's
-  spawning process, as well as by the get() function.
-  
-  A PoolOptions has at least the following members:
-  * app_group_name (string) - A name which is used to group application
-    processes together.
-  * max_requests (unsigned integer) - The maximum number of requests that the
-    application process may process. After having processed this many requests,
-    the application process will be shut down. A value of 0 indicates that there
-    is no maximum.
-  * min_processes (unsigned integer) - The minimum number of processes for the
-    current group that the cleaner thread should keep around.
-  * use_global_queue (boolean) - Whether to use a global queue for all
-    application processes, or a queue that's private to the application process.
-    The users guide explains this feature in more detail.
-  * restart_dir (string) - The directory in which the algorithm should look for
-    restart.txt and always_restart.txt. The existance and modification times of
-    these files tell the algorithm whether an application should be restarted.
-  * environment (string) - The environment (RAILS_ENV/RACK_ENV) in which the app
-    should run.
-
-=== Special functions
-
-- spawn(app_root, options)
-  Spawns a new application process at the given application root with the given
-  spawn options. Throws an exception if something went wrong. This function is
-  thread-safe. Note that application process initialization can take an arbitrary
-  amount of time.
-
-=== Instance variables
-
-The algorithm requires the following instance variables for storing state
-information:
-
-- lock: mutex
-  This lock is used for implementing thread-safetiness. We assume that it
-  is non-recursive, i.e. if a thread locks a mutex that it has already locked,
-  then it will result in a deadlock.
-
-- groups: map[string => Group]
-  Maps an application root to its Group object. This map contains all
-  application processes in the pool.
-  
-  Invariant:
-     for all values g in groups:
-        !g.detached
-        g.size <= count
-	for all i in g.processes:
-           !i.detached
-     (sum of all g.size in groups) == count
-  
-- max: integer
-  The maximum number of ProcessInfo objects that may exist in the pool.
-
-- max_per_app: integer
-  The maximum number of ProcessInfo objects that may be simultaneously alive
-  for a single Group.
-
-- count: integer
-  The current number of ProcessInfo objects in the pool.
-  Since 'max' can be set dynamically during the life time of an application
-  pool, 'count > max' is possible.
-
-- active: integer
-  The number of application processes in the pool that are active.
-  Invariant:
-     active <= count
-
-- inactive_apps: list<ProcessInfo>
-  A linked list of ProcessInfo objects. All application processes in this list
-  are inactive.
-  
-  Invariant:
-     inactive_apps.size() == count - active
-     for all x in inactive_apps:
-        x can be accessed from _groups_.
-        x.sessions == 0
-
-- waiting_on_global_queue: integer
-  If global queuing mode is enabled, then when get() is waiting for a backend
-  process to become idle, this variable will be incremented. When get() is done
-  waiting, this variable will be decremented.
-
-
-== Class relations
-
-Here's an UML diagram in ASCII art:
-
-[ProcessInfo] 1..* --------+
-                           |
-                           |
-                           
-                           1
-[ApplicationPool]       [Group]
-       1                  0..*
-
-       |                   |
-       +-------------------+
-
-
-== Algorithm in pseudo code
-
-# Thread-safetiness notes:
-# - All wait commands are to unlock the lock during waiting.
-
-
-# Connect to an existing application process, or spawn a new application process
-# and connect to that if necessary.
-# 'app_root' refers to an application root.
-# 'options' is an object of type 'PoolOptions', which contains additional
-# information which may be relevant for spawning.
-#
-# Returns a Session object, representing a single HTTP request/response pair.
-function get(app_root, options):
-	MAX_ATTEMPTS = 10
-	attempt = 0
-	while (true):
-		attempt++
-		lock.synchronize:
-			process_info, group = checkout_without_lock(app_root, options)
-		try:
-			return process_info.process.connect()
-		on exception:
-			# The app process seems to have crashed.
-			# So we remove this process from our data
-			# structures.
-			lock.synchronize:
-				detach_without_lock(process_info.identifier)
-				process_info.sessions--
-			if (attempt == MAX_ATTEMPTS):
-				propagate exception
-
-
-# Detach the process with the given identifier from the pool's data structures.
-function detach(identifier):
-	lock.synchronize:
-		return detach_without_lock(identifier)
-
-
-# Checkout a process from the application pool and mark it as being used.
-# If there's no appropriate process in the pool, or if there are not
-# enough processes, then one will be spawned.
-#
-# Returns a pair of [ProcessInfo, Group].
-# All exceptions that occur are propagated.
-private function checkout_without_lock(app_root, options):
-	group = groups[options.app_group_name]
-	
-	if needs_restart(app_root, options):
-		Tell spawn server to reload code for options.app_group_name.
-		if (group != null):
-			detach_group_without_lock(group)
-			group = null
-	
-	if (group != null):
-		# There are existing processes for this app group.
-		processes = group.processes
-		
-		if (processes.front.sessions == 0):
-			# There is an inactive process, so we use it.
-			process_info = processes.front
-			processes.move_to_back(process_info.iterator)
-			inactive_apps.remove(process_info.ia_iterator)
-			mutate_max(active + 1)
-		else:
-			# All existing processes are active. We either use
-			# one of them now or we wait until one of them becomes
-			# available. And, if we're allowed to, we spawn an
-			# extra process in the background.
-			if spawning_allowed(group, options) and !group.spawning:
-				spawn_in_background(group, options)
-			process_info = select_process(processes, options)
-			if (process_info == null):
-				goto beginning of function
-	else:
-		# There are no processes for this app group.
-		if (active >= max):
-			# Looks like the pool is full and all processes are busy.
-			# Wait until the pool appears to have changed in such a
-			# way that we can spawn a new app group, and restart
-			# this function.
-			new_app_group_creatable.wait
-			goto beginning of function
-		elsif count >= max:
-			# The pool is full, and not all processes are busy, but
-			# we're in a though situation nevertheless: there are
-			# several processes which are inactive, and none of them
-			# belong to our current app group, so we must kill one
-			# of them in order to free a spot in the pool. But which
-			# one do we kill? We want to minimize spawning.
-			#
-			# It's probably a good idea to keep some kind of
-			# statistics in order to decide this. We want the
-			# application root that gets the least traffic to be
-			# killed. But for now, we kill a random application
-			# process.
-			process_info = inactive_apps.pop_front
-			process_info.detached = true
-			group = groups[process_info.group_name]
-			processes = group.processes
-			processes.remove(process_info.iterator)
-			if processes.empty():
-				detach_group_without_lock(group)
-			else:
-				group.size--
-			mutate_count(count - 1)
-		process_info = new ProcessInfo
-		process_info.process = spawn(app_root, options)
-		process_info.group_name = options.app_group_name
-		group = new Group
-		group.name = options.app_group_name
-		group.app_root = app_root
-		group.size = 1
-		groups[options.app_group_name] = group
-		iterator = group.processes.add_to_back(process_info)
-		process_info.iterator = iterator
-		mutate_count(count + 1)
-		mutate_active(active + 1)
-		if (options.min_processes > 1) and spawning_allowed(group, options):
-			spawn_in_background(group, options)
-	
-	group.max_requests = options.max_requests
-	group.min_processes = options.min_processes
-	group.environment = options.environment
-	
-	process_info.last_used = current_time()
-	process_info.sessions++
-	
-	return [process_info, group]
-
-
-private function mutate_active(value):
-	if (value < active):
-		new_app_group_creatable.notify_all
-		global_queue_position_became_available.notify_all
-	active = value
-
-private function mutate_count(value):
-	# No point in notifying new_app_group_creatable here;
-	# if _count_ is being increased then that means the pool
-	# isn't full, and nobody is waiting on
-	# new_app_group_creatable.
-	global_queue_position_became_available.notify_all
-	count = value
-
-private function mutate_max(value):
-	if (value > max):
-		new_app_group_creatable.notify_all
-		# We will want any code waiting on the global queue
-		# to go ahead and spawn another process.
-		global_queue_position_became_available.notify_all
-	max = value
-
-
-private function needs_restart(app_root, options):
-	if (options.restart_dir is not set):
-		restart_dir = app_root + "/tmp"
-	else if (options.restart_dir is an absolute path):
-		restart_dir = options.restart_dir
-	else:
-		restart_dir = app_root + "/" + options.restart_dir
-	
-	return (file_exists("$restart_dir/always_restart.txt")) or
-	       (we haven't seen "$restart_dir/restart.txt" before) or
-	       ("$restart_dir/restart.txt" changed since the last time we checked)
-
-
-private function spawning_allowed(group, options):
-	return ( count < max ) and
-		( (max_per_app == 0) or (group.size < max_per_app) )
-
-
-# Precondition: !group.detached
-private function detach_group_without_lock(group):
-	for all process_info in group.processes:
-		if (process_info.sessions == 0):
-			inactive_apps.remove(process_info.ia_iterator)
-		else:
-			mutate_active(active - 1)
-		group.processes.remove(process_info.iterator)
-		process_info.detached = true
-		mutate_count(count - 1)
-	if (group.spawning):
-		group.spawner_thread.interrupt_and_join
-		group.spawner_thread = null
-		group.spawning = false
-	group.detached = true
-	groups.remove(options.app_group_name)
-
-
-private function select_process(processes, options):
-	if options.use_global_queue:
-		# So we wait until _active_ has changed, then
-		# we restart this function and try again.
-		waiting_on_global_queue++
-		global_queue_position_became_available.wait
-		waiting_on_global_queue--
-		return null
-	else:
-		# So we connect to an already active process.
-		# This connection will be put into that
-		# process's private queue.
-		process_info = an element in _processes_ with the smallest _session_ value
-		processes.move_to_back(process_info.iterator)
-		return process_info
-
-
-# Preconditions:
-#   !group.detached
-#   !group.spawning
-private function spawn_in_background(group, options):
-	group.spawning = true
-	group.spawner_thread = new thread(spawner_thread_callback,
-		with these arguments to the thread function:
-		group, options)
-
-
-private function spawner_thread_callback(group, options):
-	Ignore thread interruptions in this function
-	while true:
-		try:
-			Allow thread interruptions in this block
-			process = spawn(app_root, options)
-		on thread interruption:
-			lock.synchronize:
-				group.spawning = false
-				group.spawner_thread = null
-				return
-		on exception:
-			lock.synchronize:
-				if (!group.detached):
-					group.spawning = false
-					group.spawner_thread = null
-					# We want to report the error to the browser
-					# but there's no way to do this in this thread, so
-					# we just remove the entire group and have the next
-					# get() call spawn the process and display the
-					# error.
-					remove_group_without_lock(group)
-				return
-		
-		lock.synchronize:
-			if (group.detached):
-				return
-			else:
-				process_info = new ProcessInfo
-				process_info.process = process
-				process_info.group_name = options.app_group_name
-				process_info.iterator = group.processes.add_to_front(process_info)
-				process_info.ia_iterator = inactive_apps.add_to_back(process_info)
-				group.size++
-				mutate_count(count + 1)
-				if (group.size >= options.min_processes) or
-				   (!spawning_allowed(group, options)):
-					group.spawning = false
-					group.spawner_thread = null
-					return
-
-
-private function detach_without_lock(identifier):
-	for group in groups:
-		processes = group.processes
-		for process_info in processes:
-			if process_info.identifier == identifier:
-				# Found a matching process.
-				process_info.detached = true
-				processes.remove(process_info.iterator)
-				group.size--
-				if processes.empty():
-					detach_group_without_lock(group)
-				if process_info.sessions == 0:
-					inactive_apps.remove(process_info.ia_iterator)
-				else:
-					mutate_active(active - 1)
-				mutate_count(count - 1)
-				return true
-	return false
-
-
-# The following function is to be called when a session has been closed.
-# _process_info_ is a weak reference to the ProcessInfo that belongs to
-# the process whose session has been closed; it evaluates to NULL if the
-# ProcessInfo object that it belongs to has been destroyed.
-callback session_has_been_closed(session, process_info):
-	Convert process_info into a normal reference.
-	
-	# We check process_info.detached without locking. This should be safe:
-	# even if a boolean update isn't atomic on the current CPU, a non-zero
-	# value evaluates to true. Once true, _detached_ will never become false,
-	# so instruction reorderings by the compiler or CPU won't cause any
-	# damage.
-	if (process_info == null) or (process_info.detached):
-		return
-	
-	lock.synchronize:
-		if process_info.detached:
-			return
-		
-		group = groups[process_info.group_name]
-		processes = group.processes
-		process_info.processed++
-		
-		if (group.max_requests > 0) and (process_info.processed >= group.max_requests):
-			# The application process has processed its maximum allowed
-			# number of requests, so we shut it down.
-			process_info.detached = true
-			processes.remove(process_info.iterator)
-			group.size--
-			if processes.empty():
-				detach_group_without_lock(group)
-			mutate_count(count - 1)
-			if (process_info.sessions == 0):
-				inactive_apps.remove(process_info.ia_iterator)
-			else:
-				mutate_active(active - 1)
-		else:
-			process_info.last_used = current_time()
-			process_info.sessions--
-			if (process_info.sessions == 0):
-				processes.move_to_front(process_info.iterator)
-				process_info.ia_iterator = inactive_apps.add_to_back(process_info)
-				mutate_active(active - 1)
-
-
-# The following thread will be responsible for cleaning up idle application
-# process, i.e. processes that haven't been used for a while.
-# This can be disabled per app when setting it's maxIdleTime to 0.
-thread cleaner:
-	lock.synchronize:
-		while true:
-			# If MAX_IDLE_TIME is 0 we don't clean up any processes,
-			# giving us the option to persist the processes
-			# forever unless it's killed in order to free up space
-			# for another process.
-			if (MAX_IDLE_TIME == 0):
-				Wait until the thread has been signalled to quit
-				  or until MAX_IDLE_TIME changed.
-				if thread has been signalled to quit:
-					return
-				else:
-					restart loop
-			else:
-				Wait until MAX_IDLE_TIME seconds have passed,
-				  or until the thread has been signalled to quit,
-				  or until MAX_IDLE_TIME changed.
-				if thread has been signalled to quit:
-					return
-				else if MAX_IDLE_TIME changed:
-					restart loop
-			
-			# Invariant:
-			# From this point on, MAX_IDLE_TIME > 0
-			
-			now = current_time()
-			for all process_info in inactive_apps:
-				if (now - process_info.last_used > MAX_IDLE_TIME):
-					process = process_info.process
-					group = groups[process_info.group_name]
-					if (group.size > group.min_processes):
-						processes = group.processes
-						processes.remove(process_info.iterator)
-						process_info.detached = true
-						inactive_apps.remove(process_info.ia_iterator)
-						group.size--
-						mutate_count(count - 1)
-						if processes.empty():
-							detach_group_without_lock(group)
-
diff --git a/doc/Architectural overview.html b/doc/Architectural overview.html
index d480b4d..f1de288 100644
--- a/doc/Architectural overview.html	
+++ b/doc/Architectural overview.html	
@@ -1,9 +1,9 @@
 <!DOCTYPE html>
-<html lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta name="generator" content="AsciiDoc 8.6.7">
-<title>Phusion Passenger design & architecture</title>
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta name="generator" content="AsciiDoc 8.6.7">
+<title>Phusion Passenger design & architecture</title>
 <style type="text/css">
 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
 
@@ -603,7 +603,7 @@ div.exampleblock > div.content, div.sidebarblock > div.content, div.listingblock
 div.verseblock { border-left-width: 0; margin-left: 3em; }
 div.quoteblock { border-left-width: 3px; margin-left: 0; margin-right: 0;}
 div.admonitionblock td.content { border-left: 3px solid #E8E8E8; }
-</style>
+</style>
 <script type="text/javascript">
 /*<![CDATA[*/
 var asciidoc = {  // Namespace.
@@ -795,11 +795,14 @@ install: function(toclevels) {
 }
 
 }
-asciidoc.install(3);
+asciidoc.install();
 /*]]>*/
-</script><style type="text/css">
+</script>
+<style type="text/css">
 body {
-	margin: 1em 10% 1em 10%;
+	margin: 1em auto 1em auto;
+	padding: 0 1em 0 1em;
+	max-width: 800px;
 }
 
 a.image {
@@ -878,6 +881,10 @@ a.image {
 	margin: 2em;
 }
 
+pre {
+	overflow: auto;
+}
+
 @media print {
 	body {
 		font-size: 18pt;
@@ -1038,22 +1045,33 @@ a.image {
 	border-bottom-right-radius: 0;
 }
 
+/* http://nicolasgallagher.com/jump-links-and-viewport-positioning/ */
+.anchor_helper {
+	position: relative;
+	display: block;
+	top: -50px;
+	width: 1px;
+	height: 1px;
+}
+
 </style>
-</head>
+</head>
 <body class="article">
 <div id="topbar" style="display: none">
 	<div class="title">
+		<!-- Don't put a space between the img and a. That will break the hover layout. -->
 		<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAAEV95QVAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sGCRMSACDxkZwAAAAidEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVAgb24gYSBNYWOHqHdDAAAAZUlEQVQY032PSxbAIAjEIlfygL6ePF3UUvpzNjgSYWwqAMEhUQnANnsC7TQPeJpsVWzMuh2sog4vDTUbqP081zECrW4dtdaQGSIKlWluPyjK+VXxAz5XfcKufCzA130AfQHWB30HZxlPaP080xsAAAAASUVORK5CYII=" width="11" height="10" alt=""><a href="javascript:void(Mizuho.smoothlyScrollToToc())">Ph [...]
 	</div>
 	<a href="javascript:void(0)" id="current_section"></a>
 </div>
 <div id="header">
-<h1>Phusion Passenger design & architecture</h1>
+<h1>Phusion Passenger design & architecture</h1>
 <div id="preamble">
 <div class="sectionbody">
 <div class="paragraph"><p><span class="image">
 <a class="image" href="http://www.phusion.nl/">
-<img src="images/phusion_banner.png" alt="images/phusion_banner.png"></a>
+<img src="images/phusion_banner.png" alt="images/phusion_banner.png">
+</a>
 </span></p></div>
 <div class="paragraph"><p>Last updated: June 5, 2012.</p></div>
 <div class="paragraph"><p>This document describes Phusion Passenger’s design and architure in a global way.
@@ -1061,19 +1079,31 @@ Its purpose is to lower the barrier to entry for new contributors,
 to explain some of the design choices we have made and to educate people
 about how Phusion Passenger works.</p></div>
 </div>
-</div>
+</div>
 <div id="toc">
-  <div id="toctitle">Table of Contents</div>
-  <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
-</div>
+<div id="toctitle">Table of Contents</div>
+<div class="foo toclevel2"><a href="#_introduction_to_related_technologies">1. Introduction to related technologies</a></div>
+<div class="foo toclevel3"><a href="#web_app_models">1.1. Web application models</a></div>
+<div class="foo toclevel4"><a href="#_why_reverse_proxy">1.1.1. Why reverse proxy?</a></div>
+<div class="foo toclevel3"><a href="#_ruby_rack_and_ruby_on_rails">1.2. Ruby Rack and Ruby on Rails</a></div>
+<div class="foo toclevel3"><a href="#_apache">1.3. Apache</a></div>
+<div class="foo toclevel3"><a href="#_nginx">1.4. Nginx</a></div>
+<div class="foo toclevel2"><a href="#_phusion_passenger_architecture">2. Phusion Passenger architecture</a></div>
+<div class="foo toclevel3"><a href="#_overview">2.1. Overview</a></div>
+<div class="foo toclevel3"><a href="#_spawning_and_caching_of_code_and_applications">2.2. Spawning and caching of code and applications</a></div>
+<div class="foo toclevel3"><a href="#spawn_server">2.3. The spawn server</a></div>
+<div class="foo toclevel4"><a href="#_memory_sharing">2.3.1. Memory sharing</a></div>
+<div class="foo toclevel3"><a href="#concurrent_requests">2.4. Handling of concurrent requests</a></div>
+<div class="foo toclevel2"><a href="#_appendix_a_about_this_document">3. Appendix A: About this document</a></div>
+</div>
 </div>
 <div id="content">
 
 <div class="sect1">
-<h2 id="_introduction_to_related_technologies">1. Introduction to related technologies</h2>
+<span class="anchor_helper" id="_introduction_to_related_technologies"></span><h2 data-anchor="_introduction_to_related_technologies">1. Introduction to related technologies</h2>
 <div class="sectionbody">
 <div class="sect2">
-<h3 id="web_app_models">1.1. Web application models</h3>
+<span class="anchor_helper" id="web_app_models"></span><h3 data-anchor="web_app_models">1.1. Web application models</h3>
 <div class="paragraph"><p>Before we describe Phusion Passenger, it is important to understand how typical web
 applications work from the viewpoint of someone who wants to connect the
 application to a web server.</p></div>
@@ -1084,10 +1114,11 @@ to exit. This does not necessarily mean that the web application speaks HTTP
 directly: it just means that the web application accepts some kind of
 representation of an HTTP request.</p></div>
 <div class="paragraph"><p><span class="image">
-<img src="images/typical_isolated_web_application.png" alt="Architecture of a typical web application in isolation"></span></p></div>
+<img src="images/typical_isolated_web_application.png" alt="Architecture of a typical web application in isolation">
+</span></p></div>
 <div class="paragraph"><p>Few web applications are accessible directly by HTTP clients. Common models
 are:</p></div>
-<div class="olist arabic"><ol class="arabic">
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
 The web application is contained in an application server. This application
@@ -1101,7 +1132,7 @@ sent to the application server, which in turn sends them to the web server,
 and eventually to the HTTP client.
 </p>
 <div class="paragraph"><p>Typical examples of such a model:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 A J2EE application, contained in the Tomcat application server, proxied
@@ -1165,7 +1196,7 @@ processes.</p></div>
 <div class="paragraph"><p>Of course, there are many variations possible. For example, load balancers
 could be used. But that is outside the scope of this document.</p></div>
 <div class="sect3">
-<h4 id="_why_reverse_proxy">1.1.1. Why reverse proxy?</h4>
+<span class="anchor_helper" id="_why_reverse_proxy"></span><h4 data-anchor="_why_reverse_proxy">1.1.1. Why reverse proxy?</h4>
 <div class="paragraph"><p>As you’ve seen, it is often necessary to put the web application or its
 application server behind a real web server in a reverse proxy setup even
 when the web app/app server already speaks HTTP. This is because implementing
@@ -1205,19 +1236,21 @@ and the web application do what they’re best at: their own core business logic
 </div>
 </div>
 <div class="sect2">
-<h3 id="_ruby_rack_and_ruby_on_rails">1.2. Ruby Rack and Ruby on Rails</h3>
+<span class="anchor_helper" id="_ruby_rack_and_ruby_on_rails"></span><h3 data-anchor="_ruby_rack_and_ruby_on_rails">1.2. Ruby Rack and Ruby on Rails</h3>
 <div class="paragraph"><p>The de-facto standard interface for Ruby web applications is <a href="http://rack.rubyforge.org/">Rack</a>.
 Rack specifies an programming interface for web application developers to implement.
 This interface covers HTTP request and response handling, and is not dependent on
 any particular application server. The idea is that any Rack-compliant application
 server can implement the Rack specification and work with all Rack-compliant web applications.</p></div>
 <div class="paragraph"><p><span class="image">
-<img src="images/rack.png" alt="images/rack.png"></span></p></div>
+<img src="images/rack.png" alt="images/rack.png">
+</span></p></div>
 <div class="paragraph"><p>In the distant past, each Ruby web framework had its own interface, so application
 servers needed to explicitly add support for each web framework. Nowadays application
 servers just support Rack.</p></div>
 <div class="paragraph"><p><span class="image">
-<img src="images/many_web_framework_protocols.png" alt="images/many_web_framework_protocols.png"></span></p></div>
+<img src="images/many_web_framework_protocols.png" alt="images/many_web_framework_protocols.png">
+</span></p></div>
 <div class="paragraph"><p>Ruby on Rails has been fully Rack compliant since version 3.0. Rails 2.3 was partially
 Rack-compliant while earlier versions were not Rack-compliant at all. Phusion Passenger
 supports Rack as well as all Rails 1.x and 2.x versions.</p></div>
@@ -1230,7 +1263,7 @@ Enterprise Edition</a>. Also, a lot of the startup time of a Ruby on Rails
 application is spent on bootstrapping the Rails framework.</p></div>
 </div>
 <div class="sect2">
-<h3 id="_apache">1.3. Apache</h3>
+<span class="anchor_helper" id="_apache"></span><h3 data-anchor="_apache">1.3. Apache</h3>
 <div class="paragraph"><p>The Apache web server has a dynamic module system and a pluggable I/O
 multiprocessing (the ability to
 handle more than 1 concurrent HTTP client at the same time) architecture. An
@@ -1249,7 +1282,7 @@ so-called control process, and then forwarded to one of the worker processes.
 The next section contains a diagram which shows the prefork MPM’s architecture.</p></div>
 </div>
 <div class="sect2">
-<h3 id="_nginx">1.4. Nginx</h3>
+<span class="anchor_helper" id="_nginx"></span><h3 data-anchor="_nginx">1.4. Nginx</h3>
 <div class="paragraph"><p>Nginx is a lightweight web server that is becoming increasingly popular. It is known
 to be smaller, lighter weight and more scalable than Apache thanks to its evented I/O
 architecture. That said, Nginx is less flexible than Apache. For example it has no
@@ -1258,18 +1291,19 @@ dynamic module system: all modules must be statically compiled into Nginx.</p></
 </div>
 </div>
 <div class="sect1">
-<h2 id="_phusion_passenger_architecture">2. Phusion Passenger architecture</h2>
+<span class="anchor_helper" id="_phusion_passenger_architecture"></span><h2 data-anchor="_phusion_passenger_architecture">2. Phusion Passenger architecture</h2>
 <div class="sectionbody">
 <div class="sect2">
-<h3 id="_overview">2.1. Overview</h3>
+<span class="anchor_helper" id="_overview"></span><h3 data-anchor="_overview">2.1. Overview</h3>
 <div class="paragraph"><p>Phusion Passenger’s architecture is a lot like model #2 described in
 <a href="#web_app_models">Web application models</a>. In other words,
 Phusion Passenger extends Apache/Nginx and allows it to act like an
 application server. This is shown in the following diagram:</p></div>
 <div class="paragraph"><p><span class="image">
-<img src="images/passenger_architecture.png" alt="Passenger’s architecture"></span></p></div>
+<img src="images/passenger_architecture.png" alt="Passenger’s architecture">
+</span></p></div>
 <div class="paragraph"><p>Phusion Passenger consists of:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 an Apache module, <em>mod_passenger</em>. This is written in C++, and can be found in the directory <em>ext/apache2</em>.
@@ -1296,7 +1330,7 @@ is carefully designed and implemented so that the web server shouldn’t crash b
 of Phusion Passenger.</p></div>
 </div>
 <div class="sect2">
-<h3 id="_spawning_and_caching_of_code_and_applications">2.2. Spawning and caching of code and applications</h3>
+<span class="anchor_helper" id="_spawning_and_caching_of_code_and_applications"></span><h3 data-anchor="_spawning_and_caching_of_code_and_applications">2.2. Spawning and caching of code and applications</h3>
 <div class="paragraph"><p>A very naive implementation of an application server would spawn an application
 process every time an HTTP request is received, just like CGI would.
 However, spawning Ruby applications is typically expensive. It can take a few
@@ -1304,7 +1338,7 @@ seconds on a modern computer, and possibly much longer on a heavily loaded serve
 A less naive implementation would keep spawned application processes alive,
 similar to how Lighttpd’s FastCGI implementation works.
 However, this still has several problems:</p></div>
-<div class="olist arabic"><ol class="arabic">
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
 The first request to a Rails website will be slow, and subsequent requests
@@ -1365,13 +1399,13 @@ spawned applications' handles, and cleaning up applications which have been
 idle for an extended period of time.</p></div>
 </div>
 <div class="sect2">
-<h3 id="spawn_server">2.3. The spawn server</h3>
+<span class="anchor_helper" id="spawn_server"></span><h3 data-anchor="spawn_server">2.3. The spawn server</h3>
 <div class="paragraph"><p>The spawn server is written in Ruby, and its code can be found in the directory
 <em>lib/passenger</em>. Its main executable is <em>bin/passenger-spawn-server</em>.
 <a href="rdoc/index.html">The spawn server’s RDoc documentation</a> documents the
 implementation in detail.</p></div>
 <div class="paragraph"><p>The spawn server consists of 3 logical layers:</p></div>
-<div class="olist arabic"><ol class="arabic">
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
 <strong>The spawn manager.</strong> This is the topmost layer, and acts like a fascade for
@@ -1401,7 +1435,8 @@ implementation in detail.</p></div>
 </li>
 </ol></div>
 <div class="paragraph"><p><span class="image">
-<img src="images/spawn_server_architecture.png" alt="The spawn server’s architecture"></span></p></div>
+<img src="images/spawn_server_architecture.png" alt="The spawn server’s architecture">
+</span></p></div>
 <div class="paragraph"><p>As you can see, we have two layers of code caching: when the spawn server
 receives a request to spawn a new application instance, it will forward the
 request to the correct framework spawner server (and will spawn that framework
@@ -1419,7 +1454,7 @@ application instance’s life time (through the application pool).</p></div>
 single Ruby process can only load a single Ruby on Rails framework and a
 single application.</p></div>
 <div class="sect3">
-<h4 id="_memory_sharing">2.3.1. Memory sharing</h4>
+<span class="anchor_helper" id="_memory_sharing"></span><h4 data-anchor="_memory_sharing">2.3.1. Memory sharing</h4>
 <div class="paragraph"><p>On most modern Unix operating systems, when a child process is created, it will
 share most of its memory with the parent process. Processes are not supposed to
 be able to access each others' memory, so the operating system makes a copy of
@@ -1433,9 +1468,9 @@ haven’t been written to. This means that all spawned Rails applications will
 application code, with each other. This results in a dramatic reduction in
 memory usage.</p></div>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/note.png" alt="Note">
+<img src="./images/icons/note.png" alt="Note">
 </td>
 <td class="content">
 <div class="paragraph"><p>Sharing memory only works if <a href="http://www.rubyenterpriseedition.com/">Ruby
@@ -1445,20 +1480,20 @@ Enterprise Edition website for technical details.</p></div>
 <div class="paragraph"><p>Passenger works fine with standard Ruby. You still get to enjoy reduced Rails
 startup times. You just won’t be able to benefit from memory sharing.</p></div>
 </td>
-</tr></table>
+</tr></table>
 </div>
 <div class="paragraph"><p>Note that <a href="http://rubini.us/">Rubinius</a>'s garbage collector is already
 copy-on-write friendly.</p></div>
 </div>
 </div>
 <div class="sect2">
-<h3 id="concurrent_requests">2.4. Handling of concurrent requests</h3>
+<span class="anchor_helper" id="concurrent_requests"></span><h3 data-anchor="concurrent_requests">2.4. Handling of concurrent requests</h3>
 <div class="paragraph"><p>As explained earlier, a single Rails application instance can only handle a
 single request at the same time. This is obviously undesirable. But before we
 dive into the solution, let us take a look how the “competition” solves this
 problem. PHP has similar problems: a single PHP script can also process only
 one HTTP request at a time.</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 mod_php “solves” this problem by using Apache’s MPM. In other words,
@@ -1489,23 +1524,22 @@ algorithm, which is non-trivial. The algorithm is documented in detail in
 </div>
 </div>
 <div class="sect1">
-<h2 id="_appendix_a_about_this_document">3. Appendix A: About this document</h2>
+<span class="anchor_helper" id="_appendix_a_about_this_document"></span><h2 data-anchor="_appendix_a_about_this_document">3. Appendix A: About this document</h2>
 <div class="sectionbody">
 <div class="paragraph"><p>The text of this document is licensed under the
 <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons
 Attribution-Share Alike 3.0 Unported License</a>.</p></div>
 <div class="paragraph"><p><span class="image">
 <a class="image" href="link:http://creativecommons.org/licenses/by-sa/3.0/">
-<img src="images/by_sa.png" alt="images/by_sa.png"></a>
+<img src="images/by_sa.png" alt="images/by_sa.png">
+</a>
 </span></p></div>
 </div>
 </div>
 </div>
 <div id="footnotes"><hr></div>
 <div id="footer">
-<div id="footer-text">
-Last updated 2012-06-14 09:44:52 CEST
-</div>
+
 </div>
 <script>/*! jQuery v1.7.1 jquery.com | jquery.org/license */
 (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement( [...]
@@ -1842,6 +1876,7 @@ Mizuho.initializeTopBar = $.proxy(function() {
 	var isMobileDevice = this.isMobileDevice();
 	var timerId;
 	
+	// Create the floating table of contents used in the top bar.
 	var $floattoc = $('<div id="floattoc"></div>').html($('#toc').html());
 	$floattoc.find('#toctitle').remove();
 	$floattoc.find('.comments').remove();
@@ -1860,6 +1895,8 @@ Mizuho.initializeTopBar = $.proxy(function() {
 		self.internalLinkClicked(this, event);
 	});
 	
+	// Callback for when the user clicks on the Table of Contents
+	// button on the top bar.
 	function showFloatingToc() {
 		var scrollUpdateTimerId;
 		
@@ -1952,6 +1989,9 @@ Mizuho.initializeTopBar = $.proxy(function() {
 		$window.bind('scroll', onScroll);
 	}
 	
+	// Called whenever the user scrolls. Updates the title of the
+	// Table of Contents button in the top bar to the section that
+	// the user is currently reading.
 	function update() {
 		if ($title.offset().top + $title.height() < $document.scrollTop()) {
 			if (!$topbar.is(':visible')) {
@@ -1995,6 +2035,7 @@ Mizuho.initializeTopBar = $.proxy(function() {
 		}, 100);
 	}
 	
+	
 	if (isMobileDevice) {
 		// Mobile devices don't support position fixed.
 		$topbar.css('position', 'absolute');
@@ -2009,5 +2050,5 @@ Mizuho.initializeTopBar = $.proxy(function() {
 $(document).ready(Mizuho.initializeTopBar);
 
 </script>
-</body>
+</body>
 </html>
diff --git a/doc/DebuggingAndStressTesting.md b/doc/DebuggingAndStressTesting.md
new file mode 100644
index 0000000..7b86cb7
--- /dev/null
+++ b/doc/DebuggingAndStressTesting.md
@@ -0,0 +1,60 @@
+# Debugging and Stress Testing Phusion Passenger
+
+This guide tells you:
+
+ * How to debug Phusion Passenger in case of any serious problems, e.g. crashes and mysterious connection problems.
+ * How to stress test Phusion Passenger.
+
+## Process output
+
+All Phusion Passenger agent processes (PassengerWatchdog, PassengerHelperAgent, PassengerLoggingAgent) as well as all spawned application processes have their stdout and stderr redirected to the _global web server error log_ (that is, _not_ the per-virtual host error log). This is usually '/var/log/apache2/error.log' or '/var/log/nginx/error.log'.
+
+Note that in case of Nginx, Phusion Passenger prints to the error log specified in the server context, not the "http" context. If the server context does not contain an `error_log` directive then the default error log location will be used. The default location depends on how Nginx is configured during compilation, but it is usually either '$PREFIX/logs/error.log' or '/var/log/nginx/error.log'. For example, if your Nginx configuration looks like this:
+
+    worker_processes 2;
+
+    http {
+        error_log /home/nginx/error.log;
+        ...
+    }
+
+then Phusion Passenger will print to the default error log location, *not* '/home/nginx/error.log'!
+
+## Crash behavior
+
+Whenever a Phusion Passenger agent process crashes because of a signal (SIGABRT, SIGBUS, SIGSEGV and similar signals), its default behavior is to attempt to write a crash report to its stderr. This crash report contains:
+
+ * A simple libc-level backtrace of the current thread. This backtrace may or may not correspond to the thread that caused the crash.
+ * A detailed backtrace report, covering all threads. This report even contains the values of variables on the stack. The report is obtained through the [crash-watch](https://github.com/FooBarWidget/crash-watch) tool so you must have it installed. Crash-watch in turn requires gdb, which must also be installed.
+ * Agent-specific diagnostics information. For example the HelperAgent will report the status of its process pool and its connected clients.
+
+You can change the crash behavior with the following environment variables:
+
+ * `PASSENGER_ABORT_HANDLER` (default: true) - Whether agent processes should install their crash handlers. When disabled, crashes will be handled by the default signal handler, meaning that they will likely just crash without dumping any crash report.
+ * `PASSENGER_DUMP_WITH_CRASH_WATCH` (default: true) - Whether [crash-watch](https://github.com/FooBarWidget/crash-watch) should be used to obtain detailed backtraces.
+ * `PASSENGER_BEEP_ON_ABORT` (default: false) - Whether agent processes should beep when they crash. This is useful during development, e.g. when you're stress testing the system and want to be notified when a crash occurs. On OS X, it will execute `osascript -e "beep 2"` to trigger the beep. On Linux it will execute the `beep` command.
+ * `PASSENGER_STOP_ON_ABORT` (default: false) - When enabled, causes agent processes to stop themselves on crash, by raising SIGSTOP. This gives you the opportunity to attach gdb on them.
+
+## Behavior logging
+
+Increase PassengerLogLevel to print more debugging messages.
+
+## Debugging with AddressSanitizer
+
+[AddressSanitizer](http://code.google.com/p/address-sanitizer/) is an excellent tool created by Google to detect memory problems in C and C++ programs. It is for example used for detecting memory errors in Google Chrome. Unlike [Valgrind](http://www.valgrind.org/), which is an x86 emulator and makes everything 100 times slower, AddressSanitizer's performance penalty is only about 10%.
+
+Recompile Phusion Passenger with the environment variable `USE_ASAN=1` to enable support for AddressSanitizer.
+
+## Simulating system call failures
+
+Error conditions are sometimes hard to test. Things like network errors are usually hard to simulate using real equipment. In order to facilitate with error testing, we've developed a system call failure simulation framework, inspired by sqlite's failure test suite. You specify which system call errors should be simulated, and with what probability they should occur. By running normal tests multiple times you can see how Phusion Passenger behaves under these simulated error conditions.
+
+To enable, set the environment variable `PASSENGER_SIMULATE_SYSCALL_FAILURES`. The format is:
+
+    program_name1=error1:probability1,error2:probability2,...;program_name2=...
+
+`program_nameN` specifies the name of the Phusion Passenger process for which system call failure simulation should be enabled. This is followed by a list of system call `errno` names and the respective probabilities (between 0 and 1). For example:
+
+    export PASSENGER_SIMULATE_SYSCALL_FAILURES='PassengerWatchdog=ENOSPC:0.01;PassengerHelperAgent=EMFILE:0.001,ECONNREFUSED:0.02'
+
+This will enable system call failure simulation only for PassengerWatchdog and PassengerHelperAgent, but not for PassengerLoggingAgent. All system calls in PassengerWatchdog will have a 1% probability of throwing ENOSPC. All system calls in PassengerHelperAgent will have a 0.1% probability of throwing EMFILE, and a 2% probability of throwing ECONNREFUSED.
diff --git a/doc/Packaging.html b/doc/Packaging.html
new file mode 100644
index 0000000..6ce532f
--- /dev/null
+++ b/doc/Packaging.html
@@ -0,0 +1,801 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Packaging</title>
+    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
+    <!--[if lt IE 9]>
+      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
+    <![endif]-->
+    <style type="text/css">
+      /*!
+ * Bootstrap v2.0.3
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";}
+.clearfix:after{clear:both;}
+.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;}
+.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}
+article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
+audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
+audio:not([controls]){display:none;}
+html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
+a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+a:hover,a:active{outline:0;}
+sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
+sup{top:-0.5em;}
+sub{bottom:-0.25em;}
+img{max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;}
+button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
+button,input{*overflow:visible;line-height:normal;}
+button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
+button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
+input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;}
+input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
+textarea{overflow:auto;vertical-align:top;}
+body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;}
+a{color:#0088cc;text-decoration:none;}
+a:hover{color:#005580;text-decoration:underline;}
+p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;}
+.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;}
+h1,h2,h3,h4,h5,h6{margin:0;font-family:inherit;font-weight:bold;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;}
+h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;}
+h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;}
+h3{font-size:18px;line-height:27px;}h3 small{font-size:14px;}
+h4,h5,h6{line-height:18px;}
+h4{font-size:14px;}h4 small{font-size:12px;}
+h5{font-size:12px;}
+h6{font-size:11px;color:#999999;text-transform:uppercase;}
+.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;}
+.page-header h1{line-height:1;}
+ul,ol{padding:0;margin:0 0 9px 25px;}
+ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
+ul{list-style:disc;}
+ol{list-style:decimal;}
+li{line-height:18px;}
+ul.unstyled,ol.unstyled{margin-left:0;list-style:none;}
+dl{margin-bottom:18px;}
+dt,dd{line-height:18px;}
+dt{font-weight:bold;line-height:17px;}
+dd{margin-left:9px;}
+.dl-horizontal dt{float:left;width:120px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
+.dl-horizontal dd{margin-left:130px;}
+hr{margin:18px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;}
+strong{font-weight:bold;}
+em{font-style:italic;}
+.muted{color:#999999;}
+abbr[title]{cursor:help;border-bottom:1px dotted #ddd;}
+abbr.initialism{font-size:90%;text-transform:uppercase;}
+blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;}
+blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
+blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
+q:before,q:after,blockquote:before,blockquote:after{content:"";}
+address{display:block;margin-bottom:18px;font-style:normal;line-height:18px;}
+small{font-size:100%;}
+cite{font-style:normal;}
+code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;}
+pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12.025px;line-height:18px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}pre.prettyprint{margin-bottom:18px;}
+pre code{padding:0;color:inherit;background-color:transparent;border:0;}
+.pre-scrollable{max-height:340px;overflow-y:scroll;}
+.label,.badge{font-size:10.998px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;}
+.label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}
+a.label:hover,a.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;}
+.label-important,.badge-important{background-color:#b94a48;}
+.label-important[href],.badge-important[href]{background-color:#953b39;}
+.label-warning,.badge-warning{background-color:#f89406;}
+.label-warning[href],.badge-warning[href]{background-color:#c67605;}
+.label-success,.badge-success{background-color:#468847;}
+.label-success[href],.badge-success[href]{background-color:#356635;}
+.label-info,.badge-info{background-color:#3a87ad;}
+.label-info[href],.badge-info[href]{background-color:#2d6987;}
+.label-inverse,.badge-inverse{background-color:#333333;}
+.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;}
+table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;}
+.table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
+.table th{font-weight:bold;}
+.table thead th{vertical-align:bottom;}
+.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;}
+.table tbody+tbody{border-top:2px solid #dddddd;}
+.table-condensed th,.table-condensed td{padding:4px 5px;}
+.table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapsed;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;}
+.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
+.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px;}
+.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px;}
+.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;}
+.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;}
+.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
+.table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5;}
+table .span1{float:none;width:44px;margin-left:0;}
+table .span2{float:none;width:124px;margin-left:0;}
+table .span3{float:none;width:204px;margin-left:0;}
+table .span4{float:none;width:284px;margin-left:0;}
+table .span5{float:none;width:364px;margin-left:0;}
+table .span6{float:none;width:444px;margin-left:0;}
+table .span7{float:none;width:524px;margin-left:0;}
+table .span8{float:none;width:604px;margin-left:0;}
+table .span9{float:none;width:684px;margin-left:0;}
+table .span10{float:none;width:764px;margin-left:0;}
+table .span11{float:none;width:844px;margin-left:0;}
+table .span12{float:none;width:924px;margin-left:0;}
+table .span13{float:none;width:1004px;margin-left:0;}
+table .span14{float:none;width:1084px;margin-left:0;}
+table .span15{float:none;width:1164px;margin-left:0;}
+table .span16{float:none;width:1244px;margin-left:0;}
+table .span17{float:none;width:1324px;margin-left:0;}
+table .span18{float:none;width:1404px;margin-left:0;}
+table .span19{float:none;width:1484px;margin-left:0;}
+table .span20{float:none;width:1564px;margin-left:0;}
+table .span21{float:none;width:1644px;margin-left:0;}
+table .span22{float:none;width:1724px;margin-left:0;}
+table .span23{float:none;width:1804px;margin-left:0;}
+table .span24{float:none;width:1884px;margin-left:0;}
+form{margin:0 0 18px;}
+fieldset{padding:0;margin:0;border:0;}
+legend{display:block;width:100%;padding:0;margin-bottom:27px;font-size:19.5px;line-height:36px;color:#333333;border:0;border-bottom:1px solid #eee;}legend small{font-size:13.5px;color:#999999;}
+label,input,button,select,textarea{font-size:13px;font-weight:normal;line-height:18px;}
+input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;}
+label{display:block;margin-bottom:5px;color:#333333;}
+input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;margin-bottom:9px;font-size:13px;line-height:18px;color:#555555;background-color:#ffffff;border:1px solid #cccccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.uneditable-textarea{width:auto;height:auto;}
+label input,label textarea,label select{display:block;}
+input[type="image"],input[type="checkbox"],input[type="radio"]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;cursor:pointer;background-color:transparent;border:0 \9;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+input[type="image"]{border:0;}
+input[type="file"]{width:auto;padding:initial;line-height:initial;background-color:#ffffff;background-color:initial;border:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+input[type="button"],input[type="reset"],input[type="submit"]{width:auto;height:auto;}
+select,input[type="file"]{height:28px;*margin-top:4px;line-height:28px;}
+input[type="file"]{line-height:18px \9;}
+select{width:220px;background-color:#ffffff;}
+select[multiple],select[size]{height:auto;}
+input[type="image"]{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+textarea{height:auto;}
+input[type="hidden"]{display:none;}
+.radio,.checkbox{min-height:18px;padding-left:18px;}
+.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px;}
+.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;}
+.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;}
+.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;}
+input,textarea{-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;}
+input:focus,textarea:focus{border-color:rgba(82, 168, 236, 0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);}
+input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus,select:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+.input-mini{width:60px;}
+.input-small{width:90px;}
+.input-medium{width:150px;}
+.input-large{width:210px;}
+.input-xlarge{width:270px;}
+.input-xxlarge{width:530px;}
+input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0;}
+input,textarea,.uneditable-input{margin-left:0;}
+input.span12, textarea.span12, .uneditable-input.span12{width:930px;}
+input.span11, textarea.span11, .uneditable-input.span11{width:850px;}
+input.span10, textarea.span10, .uneditable-input.span10{width:770px;}
+input.span9, textarea.span9, .uneditable-input.span9{width:690px;}
+input.span8, textarea.span8, .uneditable-input.span8{width:610px;}
+input.span7, textarea.span7, .uneditable-input.span7{width:530px;}
+input.span6, textarea.span6, .uneditable-input.span6{width:450px;}
+input.span5, textarea.span5, .uneditable-input.span5{width:370px;}
+input.span4, textarea.span4, .uneditable-input.span4{width:290px;}
+input.span3, textarea.span3, .uneditable-input.span3{width:210px;}
+input.span2, textarea.span2, .uneditable-input.span2{width:130px;}
+input.span1, textarea.span1, .uneditable-input.span1{width:50px;}
+input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eeeeee;border-color:#ddd;}
+input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent;}
+.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;}
+.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853;}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:0 0 6px #dbc59e;-moz-box-shadow:0 0 6px #dbc59e;box-shadow:0 0 6px #dbc59e;}
+.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;}
+.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;}
+.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48;}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:0 0 6px #d59392;-moz-box-shadow:0 0 6px #d59392;box-shadow:0 0 6px #d59392;}
+.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;}
+.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;}
+.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847;}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:0 0 6px #7aba7b;-moz-box-shadow:0 0 6px #7aba7b;box-shadow:0 0 6px #7aba7b;}
+.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;}
+input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
+.form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#f5f5f5;border-top:1px solid #ddd;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";}
+.form-actions:after{clear:both;}
+.uneditable-input{overflow:hidden;white-space:nowrap;cursor:not-allowed;background-color:#ffffff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);}
+:-moz-placeholder{color:#999999;}
+::-webkit-input-placeholder{color:#999999;}
+.help-block,.help-inline{color:#555555;}
+.help-block{display:block;margin-bottom:9px;}
+.help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px;}
+.input-prepend,.input-append{margin-bottom:5px;}.input-prepend input,.input-append input,.input-prepend select,.input-append select,.input-prepend .uneditable-input,.input-append .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:middle;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}.input-prepend input:focus,.input-append input:focus,.input-prepend select:focus,.input-append select:focus,.input-prepend .uneditab [...]
+.input-prepend .uneditable-input,.input-append .uneditable-input{border-left-color:#ccc;}
+.input-prepend .add-on,.input-append .add-on{display:inline-block;width:auto;height:18px;min-width:16px;padding:4px 5px;font-weight:normal;line-height:18px;text-align:center;text-shadow:0 1px 0 #ffffff;vertical-align:middle;background-color:#eeeeee;border:1px solid #ccc;}
+.input-prepend .add-on,.input-append .add-on,.input-prepend .btn,.input-append .btn{margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546;}
+.input-prepend .add-on,.input-prepend .btn{margin-right:-1px;}
+.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
+.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
+.input-append .uneditable-input{border-right-color:#ccc;border-left-color:#eee;}
+.input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
+.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
+.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
+.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;}
+.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.fo [...]
+.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none;}
+.form-search label,.form-inline label{display:inline-block;}
+.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0;}
+.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle;}
+.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0;}
+.control-group{margin-bottom:9px;}
+legend+.control-group{margin-top:18px;-webkit-margin-top-collapse:separate;}
+.form-horizontal .control-group{margin-bottom:18px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";}
+.form-horizontal .control-group:after{clear:both;}
+.form-horizontal .control-label{float:left;width:140px;padding-top:5px;text-align:right;}
+.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:160px;*margin-left:0;}.form-horizontal .controls:first-child{*padding-left:160px;}
+.form-horizontal .help-block{margin-top:9px;margin-bottom:0;}
+.form-horizontal .form-actions{padding-left:160px;}
+.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 10px 4px;margin-bottom:0;font-size:13px;line-height:18px;*line-height:20px;color:#333333;text-align:center;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);background-image:-ms-linear-gradient(top, #ffffff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));backgroun [...]
+.btn:active,.btn.active{background-color:#cccccc \9;}
+.btn:first-child{*margin-left:0;}
+.btn:hover{color:#333333;text-decoration:none;background-color:#e6e6e6;*background-color:#d9d9d9;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-ms-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;}
+.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+.btn.active,.btn:active{background-color:#e6e6e6;background-color:#d9d9d9 \9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);}
+.btn.disabled,.btn[disabled]{cursor:default;background-color:#e6e6e6;background-image:none;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+.btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
+.btn-large [class^="icon-"]{margin-top:1px;}
+.btn-small{padding:5px 9px;font-size:11px;line-height:16px;}
+.btn-small [class^="icon-"]{margin-top:-1px;}
+.btn-mini{padding:2px 6px;font-size:11px;line-height:14px;}
+.btn-primary,.btn-primary:hover,.btn-warning,.btn-warning:hover,.btn-danger,.btn-danger:hover,.btn-success,.btn-success:hover,.btn-info,.btn-info:hover,.btn-inverse,.btn-inverse:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}
+.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255, 255, 255, 0.75);}
+.btn{border-color:#ccc;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
+.btn-primary{background-color:#0074cc;background-image:-moz-linear-gradient(top, #0088cc, #0055cc);background-image:-ms-linear-gradient(top, #0088cc, #0055cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0055cc));background-image:-webkit-linear-gradient(top, #0088cc, #0055cc);background-image:-o-linear-gradient(top, #0088cc, #0055cc);background-image:linear-gradient(top, #0088cc, #0055cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gra [...]
+.btn-primary:active,.btn-primary.active{background-color:#004099 \9;}
+.btn-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gra [...]
+.btn-warning:active,.btn-warning.active{background-color:#c67605 \9;}
+.btn-danger{background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-ms-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(top, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.grad [...]
+.btn-danger:active,.btn-danger.active{background-color:#942a25 \9;}
+.btn-success{background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-ms-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(top, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gra [...]
+.btn-success:active,.btn-success.active{background-color:#408140 \9;}
+.btn-info{background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-ms-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(top, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradie [...]
+.btn-info:active,.btn-info.active{background-color:#24748c \9;}
+.btn-inverse{background-color:#414141;background-image:-moz-linear-gradient(top, #555555, #222222);background-image:-ms-linear-gradient(top, #555555, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#555555), to(#222222));background-image:-webkit-linear-gradient(top, #555555, #222222);background-image:-o-linear-gradient(top, #555555, #222222);background-image:linear-gradient(top, #555555, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gra [...]
+.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9;}
+button.btn,input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;}
+button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px;}
+button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px;}
+button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px;}
+[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("images/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;}[class^="icon-"]:last-child,[class*=" icon-"]:last-child{*margin-left:0;}
+.icon-white{background-image:url("images/glyphicons-halflings-white.png");}
+.icon-glass{background-position:0 0;}
+.icon-music{background-position:-24px 0;}
+.icon-search{background-position:-48px 0;}
+.icon-envelope{background-position:-72px 0;}
+.icon-heart{background-position:-96px 0;}
+.icon-star{background-position:-120px 0;}
+.icon-star-empty{background-position:-144px 0;}
+.icon-user{background-position:-168px 0;}
+.icon-film{background-position:-192px 0;}
+.icon-th-large{background-position:-216px 0;}
+.icon-th{background-position:-240px 0;}
+.icon-th-list{background-position:-264px 0;}
+.icon-ok{background-position:-288px 0;}
+.icon-remove{background-position:-312px 0;}
+.icon-zoom-in{background-position:-336px 0;}
+.icon-zoom-out{background-position:-360px 0;}
+.icon-off{background-position:-384px 0;}
+.icon-signal{background-position:-408px 0;}
+.icon-cog{background-position:-432px 0;}
+.icon-trash{background-position:-456px 0;}
+.icon-home{background-position:0 -24px;}
+.icon-file{background-position:-24px -24px;}
+.icon-time{background-position:-48px -24px;}
+.icon-road{background-position:-72px -24px;}
+.icon-download-alt{background-position:-96px -24px;}
+.icon-download{background-position:-120px -24px;}
+.icon-upload{background-position:-144px -24px;}
+.icon-inbox{background-position:-168px -24px;}
+.icon-play-circle{background-position:-192px -24px;}
+.icon-repeat{background-position:-216px -24px;}
+.icon-refresh{background-position:-240px -24px;}
+.icon-list-alt{background-position:-264px -24px;}
+.icon-lock{background-position:-287px -24px;}
+.icon-flag{background-position:-312px -24px;}
+.icon-headphones{background-position:-336px -24px;}
+.icon-volume-off{background-position:-360px -24px;}
+.icon-volume-down{background-position:-384px -24px;}
+.icon-volume-up{background-position:-408px -24px;}
+.icon-qrcode{background-position:-432px -24px;}
+.icon-barcode{background-position:-456px -24px;}
+.icon-tag{background-position:0 -48px;}
+.icon-tags{background-position:-25px -48px;}
+.icon-book{background-position:-48px -48px;}
+.icon-bookmark{background-position:-72px -48px;}
+.icon-print{background-position:-96px -48px;}
+.icon-camera{background-position:-120px -48px;}
+.icon-font{background-position:-144px -48px;}
+.icon-bold{background-position:-167px -48px;}
+.icon-italic{background-position:-192px -48px;}
+.icon-text-height{background-position:-216px -48px;}
+.icon-text-width{background-position:-240px -48px;}
+.icon-align-left{background-position:-264px -48px;}
+.icon-align-center{background-position:-288px -48px;}
+.icon-align-right{background-position:-312px -48px;}
+.icon-align-justify{background-position:-336px -48px;}
+.icon-list{background-position:-360px -48px;}
+.icon-indent-left{background-position:-384px -48px;}
+.icon-indent-right{background-position:-408px -48px;}
+.icon-facetime-video{background-position:-432px -48px;}
+.icon-picture{background-position:-456px -48px;}
+.icon-pencil{background-position:0 -72px;}
+.icon-map-marker{background-position:-24px -72px;}
+.icon-adjust{background-position:-48px -72px;}
+.icon-tint{background-position:-72px -72px;}
+.icon-edit{background-position:-96px -72px;}
+.icon-share{background-position:-120px -72px;}
+.icon-check{background-position:-144px -72px;}
+.icon-move{background-position:-168px -72px;}
+.icon-step-backward{background-position:-192px -72px;}
+.icon-fast-backward{background-position:-216px -72px;}
+.icon-backward{background-position:-240px -72px;}
+.icon-play{background-position:-264px -72px;}
+.icon-pause{background-position:-288px -72px;}
+.icon-stop{background-position:-312px -72px;}
+.icon-forward{background-position:-336px -72px;}
+.icon-fast-forward{background-position:-360px -72px;}
+.icon-step-forward{background-position:-384px -72px;}
+.icon-eject{background-position:-408px -72px;}
+.icon-chevron-left{background-position:-432px -72px;}
+.icon-chevron-right{background-position:-456px -72px;}
+.icon-plus-sign{background-position:0 -96px;}
+.icon-minus-sign{background-position:-24px -96px;}
+.icon-remove-sign{background-position:-48px -96px;}
+.icon-ok-sign{background-position:-72px -96px;}
+.icon-question-sign{background-position:-96px -96px;}
+.icon-info-sign{background-position:-120px -96px;}
+.icon-screenshot{background-position:-144px -96px;}
+.icon-remove-circle{background-position:-168px -96px;}
+.icon-ok-circle{background-position:-192px -96px;}
+.icon-ban-circle{background-position:-216px -96px;}
+.icon-arrow-left{background-position:-240px -96px;}
+.icon-arrow-right{background-position:-264px -96px;}
+.icon-arrow-up{background-position:-289px -96px;}
+.icon-arrow-down{background-position:-312px -96px;}
+.icon-share-alt{background-position:-336px -96px;}
+.icon-resize-full{background-position:-360px -96px;}
+.icon-resize-small{background-position:-384px -96px;}
+.icon-plus{background-position:-408px -96px;}
+.icon-minus{background-position:-433px -96px;}
+.icon-asterisk{background-position:-456px -96px;}
+.icon-exclamation-sign{background-position:0 -120px;}
+.icon-gift{background-position:-24px -120px;}
+.icon-leaf{background-position:-48px -120px;}
+.icon-fire{background-position:-72px -120px;}
+.icon-eye-open{background-position:-96px -120px;}
+.icon-eye-close{background-position:-120px -120px;}
+.icon-warning-sign{background-position:-144px -120px;}
+.icon-plane{background-position:-168px -120px;}
+.icon-calendar{background-position:-192px -120px;}
+.icon-random{background-position:-216px -120px;}
+.icon-comment{background-position:-240px -120px;}
+.icon-magnet{background-position:-264px -120px;}
+.icon-chevron-up{background-position:-288px -120px;}
+.icon-chevron-down{background-position:-313px -119px;}
+.icon-retweet{background-position:-336px -120px;}
+.icon-shopping-cart{background-position:-360px -120px;}
+.icon-folder-close{background-position:-384px -120px;}
+.icon-folder-open{background-position:-408px -120px;}
+.icon-resize-vertical{background-position:-432px -119px;}
+.icon-resize-horizontal{background-position:-456px -118px;}
+.icon-hdd{background-position:0 -144px;}
+.icon-bullhorn{background-position:-24px -144px;}
+.icon-bell{background-position:-48px -144px;}
+.icon-certificate{background-position:-72px -144px;}
+.icon-thumbs-up{background-position:-96px -144px;}
+.icon-thumbs-down{background-position:-120px -144px;}
+.icon-hand-right{background-position:-144px -144px;}
+.icon-hand-left{background-position:-168px -144px;}
+.icon-hand-up{background-position:-192px -144px;}
+.icon-hand-down{background-position:-216px -144px;}
+.icon-circle-arrow-right{background-position:-240px -144px;}
+.icon-circle-arrow-left{background-position:-264px -144px;}
+.icon-circle-arrow-up{background-position:-288px -144px;}
+.icon-circle-arrow-down{background-position:-312px -144px;}
+.icon-globe{background-position:-336px -144px;}
+.icon-wrench{background-position:-360px -144px;}
+.icon-tasks{background-position:-384px -144px;}
+.icon-filter{background-position:-408px -144px;}
+.icon-briefcase{background-position:-432px -144px;}
+.icon-fullscreen{background-position:-456px -144px;}
+
+      
+      h1, h2, h3, h4, h5, h6 {
+        margin-bottom: 9px;
+      }
+
+      ul ul,
+      ul ol,
+      ol ol,
+      ol ul {
+        margin-bottom: 9px;
+      }
+
+      #container {
+        max-width: 767px;
+        margin-left: auto;
+        margin-right: auto;
+      }
+
+      #top-vertical-container-margin {
+        margin-top: 20px;
+      }
+
+      #bottom-vertical-container-margin {
+        margin-bottom: 20px;
+      }
+
+      #logo {
+        text-align: center;
+        margin-bottom: 9px;
+      }
+
+      #title {
+        text-align: center;
+        font-size: 400%;
+        line-height: 1em;
+        padding-bottom: 30px;
+        margin-bottom: 30px;
+        border-bottom: solid 1px #d0d0d0;
+      }
+
+      #toc {
+        margin-bottom: 20px;
+      }
+
+      #toc .level-2 {
+        margin-left: 18px;
+      }
+
+      #toc .level-3 {
+        margin-left: 36px;
+      }
+
+      footer {
+        border-top: solid 1px #d0d0d0;
+        margin-top: 9px;
+        padding-top: 9px;
+      }
+    </style>
+  </head>
+  <body>
+
+    <div id="container">
+      <div id="top-vertical-container-margin"></div>
+      <div id="logo">
+        <a href="http://www.phusion.nl/"><img src="images/phusion_banner_small.png" alt="Phusion docs" width="350" height="59"></a>
+      </div>
+      <div id="title">Packaging</div>
+
+      <div id="toc" style="display: none">
+        <div class="header"><strong>Table of contents</strong></div>
+      </div>
+
+      <h1>Introduction</h1>
+
+<p>This document describes how packagers can package Phusion Passenger binaries
+for their operating system.</p>
+
+<p>Phusion Passenger can be configured in 2 ways, the "originally packaged"
+configuration where everything is in the same directory, and the
+"natively packaged" configuration where files are scattered across the
+filesystem, e.g. in a FHS-compliant configuration. This document describes
+how you can configure Phusion Passenger to locate its own files when they're
+scattered across the filesystem.</p>
+
+<p>Phusion Passenger files are also called <em>assets</em> in this document.</p>
+
+<h2>Originally packaged</h2>
+
+<p>This is the configuration you get when you checkout Phusion Passenger from git,
+when you install Phusion Passenger from a gem or when you extract it from a
+tarball. All the original files are stored in a single directory tree, which we
+call the <em>source root</em>.</p>
+
+<p>The git repository, gems and tarballs do not come with any binaries; they have
+to be compiled by the user. Phusion Passenger looks for binaries in, and (if
+the user initiates the compilation process) stores binaries in, the following
+directories:</p>
+
+<ul>
+<li>Normally, binaries are to be located in the <code>agents</code> and <code>libout</code>
+subdirectories under the source root.</li>
+<li><p>Phusion Passenger Standalone does things a little differently. Binaries are
+to be located in one of the following directories, whichever it finds first:</p>
+
+<ul>
+<li><code>~/.passenger/standalone/<VERSION>/<TYPE-AND-ARCH></code> (a)</li>
+<li><code>/var/lib/passenger-standalone/<VERSION-AND-ARCH></code> (b)</li>
+</ul>
+
+
+<p>If neither directories exist, then Passenger Standalone compiles the
+binaries and stores them in (b) (when running as root) or in (a). It still
+looks for everything else (like the .rb files) in the source root.</p></li>
+</ul>
+
+
+<h2>Natively packaged</h2>
+
+<p>Phusion Passenger is packaged, usually (but not necessarily) through a DEB or RPM
+package. This configuration comes not only with all necessary binaries, but also
+with some (but not all) source files. This is because when you run Phusion Passenger
+with a different Ruby interpreter than the packager intended, Phusion Passenger
+must be able to compile a new Ruby extension for that Ruby interpreter. This
+configuration does not however allow compiling against a different Apache or Nginx
+version than the packager intended.</p>
+
+<p>In this configuration, files can be scattered anywhere throughout the filesystem. This
+way Phusion Passenger can be packaged in an FHS-compliant way. The exact locations
+of the different types of files can be specified through a
+<em>location configuration file</em>. The existance and usage of a location configuration
+file does not automatically imply that Phusion Passenger is natively packaged.</p>
+
+<p>This configuration also does not allow running Phusion Passenger Standalone against
+a different Nginx version than the packager intended, but does allow running
+against a different Ruby version. Passenger Standlone looks for its binaries
+in the location as specified by the location configuration file; it makes no
+attempt to compile anything, except of course for the Ruby extension.</p>
+
+<p>If either the non-Standalone or the Standalone Passenger needs to have a new Ruby
+extension compiled, then it will store that in <code>~/.passenger/native_support/<VERSION>/<ARCH></code>.</p>
+
+<h1>The location configuration file</h1>
+
+<p>The Phusion Passenger administration tools, such as <code>passenger-status</code>, look for a
+location configuration file in the following places, in the given order:</p>
+
+<ul>
+<li>The environment variable <code>$PASSENGER_LOCATION_CONFIGURATION_FILE</code>.</li>
+<li><code><RUBYLIBDIR>/phusion_passenger/locations.ini</code>, where <LIBDIR> is the Ruby library
+directory that contains phusion_passenger.rb. For example,
+<code>/usr/lib/ruby/1.9.0/phusion_passenger/locations.ini</code>.</li>
+<li><code>~/.passenger/locations.ini</code></li>
+<li><code>/etc/phusion-passenger/locations.ini</code></li>
+</ul>
+
+
+<p>If it cannot find a location configuration file, then it assumes that Phusion
+Passenger is originally packaged. If a location configuration file is found then
+the configuration is determined by the <code>natively_packaged</code> option in the
+location configuration file, which can be either "true" or "false".</p>
+
+<p>The Apache module and the Nginx module expect <code>PassengerRoot</code>/<code>passenger_root</code> to
+refer to either a directory or a file. If the value refers to a directory, then it
+assumes that Phusion Passenger is originally packaged, where the source root is the
+specified directory. If the value refers to a file, then it will use it as the
+location configuration file, and the configuration depends on the
+<code>natively_packaged</code> setting.</p>
+
+<p>The location configuration file is an ini file that looks as follows:</p>
+
+<pre><code>[locations]
+natively_packaged=true
+bin=/usr/bin
+agents=/usr/lib/phusion-passenger/agents
+libdir=/usr/lib/phusion-passenger
+helper_scripts=/usr/share/phusion-passenger/helper-scripts
+resources=/usr/share/phusion-passenger
+includedir=/usr/share/phusion-passenger/include
+doc=/usr/share/doc/phusion-passenger
+rubylibdir=/usr/lib/ruby/vendor_ruby
+apache2_module=/usr/lib/apache2/modules/mod_passenger.so
+ruby_extension_source=/usr/share/phusion-passenger/ruby_extension_source
+</code></pre>
+
+<p>All keys except fo <code>natively_packaged</code> specify the locations of assets and asset
+directories. The "Asset types" section provides a description of all asset types.</p>
+
+<p>Thus, if you're packaging Phusion Passenger, then we recommend the following:</p>
+
+<ul>
+<li>Put a locations.ini file in <code><RUBYLIBDIR>/phusion_passenger/locations.ini</code> and
+set <code>PassengerRoot</code>/<code>passenger_root</code> to that filename. We don't recommend using
+<code>~/.passenger</code> or <code>/etc/phusion-passenger</code> because if the user wants to install
+a different Phusion Passenger version alongside the one that you've packaged,
+then that other version will incorrectly locate your packaged files instead of
+its own files.</li>
+<li>Always set <code>natively_packaged</code> to "true". The "false" value is used
+internally for implementing Phusion Passenger Standalone and should never be
+used by packagers.</li>
+</ul>
+
+
+<h1>The Phusion Passenger Ruby libraries</h1>
+
+<h2>phusion_passenger.rb</h2>
+
+<p>The Phusion Passenger administration tools are written in Ruby. So the first thing
+they do is trying to load <code>phusion_passenger.rb</code>, which is the source file
+responsible for figuring out where all the other Phusion Passenger files are. It
+tries to look for phusion<em>passenger.rb in <code><OWN_DIRECTORY>/../lib</code> where
+<code><OWN_DIRECTORY></code> is the directory that the tool is located in. If
+phusion</em>passenger.rb is not there, then it tries to load it from the normal Ruby
+load path.</p>
+
+<h2>Ruby extension</h2>
+
+<p>The Phusion Passenger loader scripts try to load the Phusion Passenger Ruby
+extension (<code>passenger_native_support.so</code>) from the following places, in the given order:</p>
+
+<ul>
+<li>If Phusion Passenger is originally packaged, it will look for the Ruby
+extension in <code><SOURCE_ROOT>/libout/ruby/<ARCH></code>. Otherwise, this step is skipped.</li>
+<li>The Ruby library load path.</li>
+<li><code>~/.passenger/native_support/<VERSION>/<ARCH></code></li>
+</ul>
+
+
+<p>If it cannot find the Ruby extension in any of the above places, then it will
+attempt to compile the Ruby extension and store it in
+<code>~/.passenger/native_support/<VERSION>/<ARCH></code>.</p>
+
+<h2>Conclusion for packagers</h2>
+
+<p>If you're packaging Phusion Passenger then you should put both phusion_passenger.rb
+and <code>passenger_native_support.so</code> somewhere in the Ruby load path, or make sure that
+that directory is included in the <code>$RUBYLIB</code> environment variable. You cannot specify
+a custom directory though the location configuration file.</p>
+
+<h1>Asset types</h1>
+
+<p>Throughout the Phusion Passenger codebase, we refer to all kinds of assets. Here's
+a list of all possible assets and asset directories.</p>
+
+<ul>
+<li><p><code>source_root</code></p>
+
+<p>When Phusion Passenger is originally packaged, this refers to the directory
+that contains the entire Phusion passenger source tree. Not available when
+natively packaged.</p></li>
+<li><p><code>bin</code></p>
+
+<p>A directory containing administration binaries and scripts and like
+<code>passenger-status</code>; tools that the user may directly invoke on the command line.</p>
+
+<p>Value when originally packaged: <code><SOURCE_ROOT>/bin</code></p></li>
+<li><p><code>agents</code></p>
+
+<p>A directory that contains (platform-dependent) binaries that Phusion Passenger
+uses, but that should not be directly invoked from the command line. Things like
+PassengerHelperAgent are located here.</p>
+
+<p>Value when originally packaged:</p>
+
+<ul>
+<li>Normally: <code><SOURCE_ROOT>/agents</code></li>
+<li>Passenger Standalone: <code>~/.passenger/standalone/<VERSION>/support-<ARCH></code></li>
+</ul>
+</li>
+<li><p><code>helper_scripts</code></p>
+
+<p>A directory that contains non-binary scripts that Phusion Passenger uses, but
+that should not be directly invoked from the command line. Things like
+rack-loader.rb are located here.</p>
+
+<p>Value when originally packaged: <code><SOURCE_ROOT>/helper-scripts</code></p></li>
+<li><p><code>resources</code></p>
+
+<p>A directory that contains non-executable, platform-independent resource files
+that the user should not directly access, like error page templates and
+configuration file templates.</p>
+
+<p>Value when originally packaged: <code><SOURCE_ROOT>/resources</code>.</p></li>
+<li><p><code>doc</code></p>
+
+<p>A directory that contains documentation.</p>
+
+<p>Value when originally packaged: <code><SOURCE_ROOT>/doc</code>.</p></li>
+<li><p><code>includedir</code></p>
+
+<p>A directory that contains the Phusion Passenger header files that are
+necessary for compiling Nginx.</p>
+
+<p>Value when originally packaged: <code><SOURCE_ROOT>/ext</code></p></li>
+<li><p><code>libdir</code></p>
+
+<p>A directory that contains the Phusion Passenger library files, e.g.
+libboost_oxt.a and various .o files.</p>
+
+<p>Value when originally packaged: <code><SOURCE_ROOT>/libout</code></p></li>
+<li><p><code>rubylibdir</code></p>
+
+<p>A directory that contains the Phusion Passenger Ruby library files. Note that
+the Phusion Passenger administration tools still locate phusion_passenger.rb
+as described in the section "The Phusion Passenger Ruby libraries",
+irregardless of the value of this key in the location configuration file.
+The value is only useful to non-Ruby Phusion Passenger code.</p>
+
+<p>Value when originally packaged: <code><SOURCE_ROOT>/lib</code>.</p></li>
+<li><p><code>apache2_module</code></p>
+
+<p>The filename of the Apache 2 module, or the filename that the Apache 2 module
+will be stored after it's compiled. Used by <code>passenger-install-module</code> to
+print an example configuration snippet.</p>
+
+<p>Value when originally packaged: <code><SOURCE_ROOT>/ext/apache2/mod_passenger.so</code>.</p></li>
+<li><p><code>ruby_extension_source</code></p>
+
+<p>The directory that contains the source code for the Phusion Passenger Ruby
+extension. Phusion Passenger uses these sources to build a Ruby extension,
+when it detects that the user is using a new Ruby interpeter for which
+no Ruby extension has been compiled.</p>
+
+<p>Value when originally packaged: <code><SOURCE_ROOT>/ext/ruby</code>.</p></li>
+</ul>
+
+
+<h1>Vendoring of libraries</h1>
+
+<p>Phusion Passenger vendors libev and libeio in order to make installation easier
+for users on operating systems without proper package management, like OS X.
+If you want Phusion Passenger to compile against the system-provided
+libev and/or libeio instead, then set the following environment variables
+before compiling:</p>
+
+<ul>
+<li><code>export USE_VENDORED_LIBEV=no</code></li>
+<li><code>export USE_VENDORED_LIBEIO=no</code></li>
+</ul>
+
+
+<p>Note that we require at least libev 4.11 and libeio 1.0.</p>
+
+<h1>Generating gem and tarball</h1>
+
+<p>Use the following commands to generate a gem and tarball, in which Phusion
+Passenger is originally packaged and without any binaries:</p>
+
+<pre><code>rake package:gem
+rake package:tarball
+</code></pre>
+
+<p>The files will be stored in <code>pkg/</code>.</p>
+
+<h1>Fakeroot</h1>
+
+<p>You can generate a fakeroot with the command <code>rake fakeroot</code>. This will
+generate an FHS-compliant directory tree in <code>pkg/fakeroot</code>, which you can
+directly package or with minor modifications. The fakeroot even contains
+a location configuration file.</p>
+
+
+      <footer>
+        <p>© Phusion</p>
+      </footer>
+
+      <div id="bottom-vertical-container-margin"></div>
+    </div>
+
+    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
+    <script>
+      (function() {
+        var toc = $('#toc');
+        var i = 1;
+
+        $('h1,h2,h3').each(function() {
+          var level = parseInt(this.nodeName.match(/\d+/)[0]);
+          var id = "header_" + i;
+          var item = $('<div><a></a></div>').appendTo(toc);
+          item.addClass("level-" + level);
+          item.find('a').
+            text($(this).text()).
+            prop('href', '#' + id);
+          $(this).prop('id', id);
+          i++;
+        });
+
+        toc.show();
+      })();
+    </script>
+
+  </body>
+</html>
diff --git a/doc/Packaging.txt.md b/doc/Packaging.txt.md
new file mode 100644
index 0000000..c937cfd
--- /dev/null
+++ b/doc/Packaging.txt.md
@@ -0,0 +1,276 @@
+# Introduction
+
+This document describes how packagers can package Phusion Passenger binaries
+for their operating system.
+
+Phusion Passenger can be configured in 2 ways, the "originally packaged"
+configuration where everything is in the same directory, and the
+"natively packaged" configuration where files are scattered across the
+filesystem, e.g. in a FHS-compliant configuration. This document describes
+how you can configure Phusion Passenger to locate its own files when they're
+scattered across the filesystem.
+
+Phusion Passenger files are also called _assets_ in this document.
+
+## Originally packaged
+
+This is the configuration you get when you checkout Phusion Passenger from git,
+when you install Phusion Passenger from a gem or when you extract it from a
+tarball. All the original files are stored in a single directory tree, which we
+call the _source root_.
+
+The git repository, gems and tarballs do not come with any binaries; they have
+to be compiled by the user. Phusion Passenger looks for binaries in, and (if
+the user initiates the compilation process) stores binaries in, the following
+directories:
+
+ * Normally, binaries are to be located in the `agents` and `libout`
+   subdirectories under the source root.
+ * Phusion Passenger Standalone does things a little differently. Binaries are
+   to be located in one of the following directories, whichever it finds first:
+
+    - `~/.passenger/standalone/<VERSION>/<TYPE-AND-ARCH>` (a)
+    - `/var/lib/passenger-standalone/<VERSION-AND-ARCH>` (b)
+
+   If neither directories exist, then Passenger Standalone compiles the
+   binaries and stores them in (b) (when running as root) or in (a). It still
+   looks for everything else (like the .rb files) in the source root.
+
+## Natively packaged
+
+Phusion Passenger is packaged, usually (but not necessarily) through a DEB or RPM
+package. This configuration comes not only with all necessary binaries, but also
+with some (but not all) source files. This is because when you run Phusion Passenger
+with a different Ruby interpreter than the packager intended, Phusion Passenger
+must be able to compile a new Ruby extension for that Ruby interpreter. This
+configuration does not however allow compiling against a different Apache or Nginx
+version than the packager intended.
+
+In this configuration, files can be scattered anywhere throughout the filesystem. This
+way Phusion Passenger can be packaged in an FHS-compliant way. The exact locations
+of the different types of files can be specified through a
+_location configuration file_. The existance and usage of a location configuration
+file does not automatically imply that Phusion Passenger is natively packaged.
+
+This configuration also does not allow running Phusion Passenger Standalone against
+a different Nginx version than the packager intended, but does allow running
+against a different Ruby version. Passenger Standlone looks for its binaries
+in the location as specified by the location configuration file; it makes no
+attempt to compile anything, except of course for the Ruby extension.
+
+If either the non-Standalone or the Standalone Passenger needs to have a new Ruby
+extension compiled, then it will store that in `~/.passenger/native_support/<VERSION>/<ARCH>`.
+
+
+# The location configuration file
+
+The Phusion Passenger administration tools, such as `passenger-status`, look for a
+location configuration file in the following places, in the given order:
+
+ * The environment variable `$PASSENGER_LOCATION_CONFIGURATION_FILE`.
+ * `<RUBYLIBDIR>/phusion_passenger/locations.ini`, where <LIBDIR> is the Ruby library
+   directory that contains phusion_passenger.rb. For example,
+   `/usr/lib/ruby/1.9.0/phusion_passenger/locations.ini`.
+ * `~/.passenger/locations.ini`
+ * `/etc/phusion-passenger/locations.ini`
+
+If it cannot find a location configuration file, then it assumes that Phusion
+Passenger is originally packaged. If a location configuration file is found then
+the configuration is determined by the `natively_packaged` option in the
+location configuration file, which can be either "true" or "false".
+
+The Apache module and the Nginx module expect `PassengerRoot`/`passenger_root` to
+refer to either a directory or a file. If the value refers to a directory, then it
+assumes that Phusion Passenger is originally packaged, where the source root is the
+specified directory. If the value refers to a file, then it will use it as the
+location configuration file, and the configuration depends on the
+`natively_packaged` setting.
+
+The location configuration file is an ini file that looks as follows:
+
+    [locations]
+    natively_packaged=true
+    bin=/usr/bin
+    agents=/usr/lib/phusion-passenger/agents
+    libdir=/usr/lib/phusion-passenger
+    helper_scripts=/usr/share/phusion-passenger/helper-scripts
+    resources=/usr/share/phusion-passenger
+    includedir=/usr/share/phusion-passenger/include
+    doc=/usr/share/doc/phusion-passenger
+    rubylibdir=/usr/lib/ruby/vendor_ruby
+    apache2_module=/usr/lib/apache2/modules/mod_passenger.so
+    ruby_extension_source=/usr/share/phusion-passenger/ruby_extension_source
+
+All keys except fo `natively_packaged` specify the locations of assets and asset
+directories. The "Asset types" section provides a description of all asset types.
+
+Thus, if you're packaging Phusion Passenger, then we recommend the following:
+
+ * Put a locations.ini file in `<RUBYLIBDIR>/phusion_passenger/locations.ini` and
+   set `PassengerRoot`/`passenger_root` to that filename. We don't recommend using
+   `~/.passenger` or `/etc/phusion-passenger` because if the user wants to install
+   a different Phusion Passenger version alongside the one that you've packaged,
+   then that other version will incorrectly locate your packaged files instead of
+   its own files.
+ * Always set `natively_packaged` to "true". The "false" value is used
+   internally for implementing Phusion Passenger Standalone and should never be
+   used by packagers.
+
+
+# The Phusion Passenger Ruby libraries
+
+## phusion_passenger.rb
+
+The Phusion Passenger administration tools are written in Ruby. So the first thing
+they do is trying to load `phusion_passenger.rb`, which is the source file
+responsible for figuring out where all the other Phusion Passenger files are. It
+tries to look for phusion_passenger.rb in `<OWN_DIRECTORY>/../lib` where
+`<OWN_DIRECTORY>` is the directory that the tool is located in. If
+phusion_passenger.rb is not there, then it tries to load it from the normal Ruby
+load path.
+
+## Ruby extension
+
+The Phusion Passenger loader scripts try to load the Phusion Passenger Ruby
+extension (`passenger_native_support.so`) from the following places, in the given order:
+
+ * If Phusion Passenger is originally packaged, it will look for the Ruby
+   extension in `<SOURCE_ROOT>/libout/ruby/<ARCH>`. Otherwise, this step is skipped.
+ * The Ruby library load path.
+ * `~/.passenger/native_support/<VERSION>/<ARCH>`
+
+If it cannot find the Ruby extension in any of the above places, then it will
+attempt to compile the Ruby extension and store it in
+`~/.passenger/native_support/<VERSION>/<ARCH>`.
+
+## Conclusion for packagers
+
+If you're packaging Phusion Passenger then you should put both phusion_passenger.rb
+and `passenger_native_support.so` somewhere in the Ruby load path, or make sure that
+that directory is included in the `$RUBYLIB` environment variable. You cannot specify
+a custom directory though the location configuration file.
+
+
+# Asset types
+
+Throughout the Phusion Passenger codebase, we refer to all kinds of assets. Here's
+a list of all possible assets and asset directories.
+
+ * `source_root`
+
+   When Phusion Passenger is originally packaged, this refers to the directory
+   that contains the entire Phusion passenger source tree. Not available when
+   natively packaged.
+
+ * `bin`
+
+   A directory containing administration binaries and scripts and like
+   `passenger-status`; tools that the user may directly invoke on the command line.
+
+   Value when originally packaged: `<SOURCE_ROOT>/bin`
+
+ * `agents`
+
+   A directory that contains (platform-dependent) binaries that Phusion Passenger
+   uses, but that should not be directly invoked from the command line. Things like
+   PassengerHelperAgent are located here.
+
+   Value when originally packaged:
+   - Normally: `<SOURCE_ROOT>/agents`
+   - Passenger Standalone: `~/.passenger/standalone/<VERSION>/support-<ARCH>`
+
+ * `helper_scripts`
+
+   A directory that contains non-binary scripts that Phusion Passenger uses, but
+   that should not be directly invoked from the command line. Things like
+   rack-loader.rb are located here.
+
+   Value when originally packaged: `<SOURCE_ROOT>/helper-scripts`
+
+ * `resources`
+
+   A directory that contains non-executable, platform-independent resource files
+   that the user should not directly access, like error page templates and
+   configuration file templates.
+
+   Value when originally packaged: `<SOURCE_ROOT>/resources`.
+
+ * `doc`
+
+   A directory that contains documentation.
+
+   Value when originally packaged: `<SOURCE_ROOT>/doc`.
+
+ * `includedir`
+
+   A directory that contains the Phusion Passenger header files that are
+   necessary for compiling Nginx.
+
+   Value when originally packaged: `<SOURCE_ROOT>/ext`
+
+ * `libdir`
+
+   A directory that contains the Phusion Passenger library files, e.g.
+   libboost_oxt.a and various .o files.
+
+   Value when originally packaged: `<SOURCE_ROOT>/libout`
+
+ * `rubylibdir`
+
+   A directory that contains the Phusion Passenger Ruby library files. Note that
+   the Phusion Passenger administration tools still locate phusion_passenger.rb
+   as described in the section "The Phusion Passenger Ruby libraries",
+   irregardless of the value of this key in the location configuration file.
+   The value is only useful to non-Ruby Phusion Passenger code.
+
+   Value when originally packaged: `<SOURCE_ROOT>/lib`.
+
+ * `apache2_module`
+
+   The filename of the Apache 2 module, or the filename that the Apache 2 module
+   will be stored after it's compiled. Used by `passenger-install-module` to
+   print an example configuration snippet.
+
+   Value when originally packaged: `<SOURCE_ROOT>/ext/apache2/mod_passenger.so`.
+
+ * `ruby_extension_source`
+
+   The directory that contains the source code for the Phusion Passenger Ruby
+   extension. Phusion Passenger uses these sources to build a Ruby extension,
+   when it detects that the user is using a new Ruby interpeter for which
+   no Ruby extension has been compiled.
+
+   Value when originally packaged: `<SOURCE_ROOT>/ext/ruby`.
+
+
+# Vendoring of libraries
+
+Phusion Passenger vendors libev and libeio in order to make installation easier
+for users on operating systems without proper package management, like OS X.
+If you want Phusion Passenger to compile against the system-provided
+libev and/or libeio instead, then set the following environment variables
+before compiling:
+
+ * `export USE_VENDORED_LIBEV=no`
+ * `export USE_VENDORED_LIBEIO=no`
+
+Note that we require at least libev 4.11 and libeio 1.0.
+
+
+# Generating gem and tarball
+
+Use the following commands to generate a gem and tarball, in which Phusion
+Passenger is originally packaged and without any binaries:
+
+    rake package:gem
+    rake package:tarball
+
+The files will be stored in `pkg/`.
+
+
+# Fakeroot
+
+You can generate a fakeroot with the command `rake fakeroot`. This will
+generate an FHS-compliant directory tree in `pkg/fakeroot`, which you can
+directly package or with minor modifications. The fakeroot even contains
+a location configuration file.
diff --git a/doc/Security of user switching support.html b/doc/Security of user switching support.html
index 1510a41..ff3e2f7 100644
--- a/doc/Security of user switching support.html	
+++ b/doc/Security of user switching support.html	
@@ -1,9 +1,9 @@
 <!DOCTYPE html>
-<html lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta name="generator" content="AsciiDoc 8.6.7">
-<title>Security of user switching support in Passenger</title>
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta name="generator" content="AsciiDoc 8.6.7">
+<title>Security of user switching support in Passenger</title>
 <style type="text/css">
 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
 
@@ -603,7 +603,7 @@ div.exampleblock > div.content, div.sidebarblock > div.content, div.listingblock
 div.verseblock { border-left-width: 0; margin-left: 3em; }
 div.quoteblock { border-left-width: 3px; margin-left: 0; margin-right: 0;}
 div.admonitionblock td.content { border-left: 3px solid #E8E8E8; }
-</style>
+</style>
 <script type="text/javascript">
 /*<![CDATA[*/
 var asciidoc = {  // Namespace.
@@ -795,11 +795,14 @@ install: function(toclevels) {
 }
 
 }
-asciidoc.install(3);
+asciidoc.install();
 /*]]>*/
-</script><style type="text/css">
+</script>
+<style type="text/css">
 body {
-	margin: 1em 10% 1em 10%;
+	margin: 1em auto 1em auto;
+	padding: 0 1em 0 1em;
+	max-width: 800px;
 }
 
 a.image {
@@ -878,6 +881,10 @@ a.image {
 	margin: 2em;
 }
 
+pre {
+	overflow: auto;
+}
+
 @media print {
 	body {
 		font-size: 18pt;
@@ -1038,11 +1045,21 @@ a.image {
 	border-bottom-right-radius: 0;
 }
 
+/* http://nicolasgallagher.com/jump-links-and-viewport-positioning/ */
+.anchor_helper {
+	position: relative;
+	display: block;
+	top: -50px;
+	width: 1px;
+	height: 1px;
+}
+
 </style>
-</head>
+</head>
 <body class="article">
 <div id="topbar" style="display: none">
 	<div class="title">
+		<!-- Don't put a space between the img and a. That will break the hover layout. -->
 		<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAAEV95QVAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sGCRMSACDxkZwAAAAidEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVAgb24gYSBNYWOHqHdDAAAAZUlEQVQY032PSxbAIAjEIlfygL6ePF3UUvpzNjgSYWwqAMEhUQnANnsC7TQPeJpsVWzMuh2sog4vDTUbqP081zECrW4dtdaQGSIKlWluPyjK+VXxAz5XfcKufCzA130AfQHWB30HZxlPaP080xsAAAAASUVORK5CYII=" width="11" height="10" alt=""><a href="javascript:void(Mizuho.smoothlyScrollToToc())">Se [...]
 	</div>
 	<a href="javascript:void(0)" id="current_section"></a>
@@ -1050,22 +1067,31 @@ a.image {
 <div id="header">
 <h1>Security of user switching support in Passenger</h1>
 <div id="toc">
-  <div id="toctitle">Table of Contents</div>
-  <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
-</div>
+<div id="toctitle">Table of Contents</div>
+<div class="foo toclevel2"><a href="#_problem_description">1. Problem description</a></div>
+<div class="foo toclevel2"><a href="#_analysis_of_possible_solutions">2. Analysis of possible solutions</a></div>
+<div class="foo toclevel3"><a href="#apache_root">2.1. Apache must already be running as root</a></div>
+<div class="foo toclevel3"><a href="#_using_apache_8217_s_suexec">2.2. Using Apache’s suEXEC</a></div>
+<div class="foo toclevel3"><a href="#_using_a_setuid_root_wrapper_application">2.3. Using a setuid root wrapper application</a></div>
+<div class="foo toclevel3"><a href="#setuid_root">2.4. Using a setuid $X wrapper application</a></div>
+<div class="foo toclevel3"><a href="#_using_em_su_em">2.5. Using su</a></div>
+<div class="foo toclevel3"><a href="#_using_em_sudo_em">2.6. Using sudo</a></div>
+<div class="foo toclevel3"><a href="#_common_security_issues">2.7. Common security issues</a></div>
+<div class="foo toclevel2"><a href="#_chosen_solution">3. Chosen solution</a></div>
+</div>
 </div>
 <div id="content">
 <div class="sect1">
-<h2 id="_problem_description">1. Problem description</h2>
+<span class="anchor_helper" id="_problem_description"></span><h2 data-anchor="_problem_description">1. Problem description</h2>
 <div class="sectionbody">
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/tip.png" alt="Tip">
+<img src="./images/icons/tip.png" alt="Tip">
 </td>
 <td class="content">It is strongly recommended that you first read our
 <a href="Architectural%20overview.html">Architectural Overview</a>.</td>
-</tr></table>
+</tr></table>
 </div>
 <div class="paragraph"><p>A straightforward implementation of Passenger will spawn Rails applications in
 the same user context as Apache itself. On server machines which host multiple
@@ -1080,12 +1106,12 @@ Passenger’s security may be peer reviewed.</p></div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="_analysis_of_possible_solutions">2. Analysis of possible solutions</h2>
+<span class="anchor_helper" id="_analysis_of_possible_solutions"></span><h2 data-anchor="_analysis_of_possible_solutions">2. Analysis of possible solutions</h2>
 <div class="sectionbody">
 <div class="paragraph"><p>It seems that the only way to solve this problem on Unix, is to run each Rails
 application server as its owner’s user and group. Passenger can make use of
 one of the following methods to implement this:</p></div>
-<div class="olist arabic"><ol class="arabic">
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
 Apache (and thus Passenger) must already be running as root.
@@ -1121,7 +1147,7 @@ Using <em>sudo</em>.
 </ol></div>
 <div class="paragraph"><p>Let us take a look at each method in detail.</p></div>
 <div class="sect2">
-<h3 id="apache_root">2.1. Apache must already be running as root</h3>
+<span class="anchor_helper" id="apache_root"></span><h3 data-anchor="apache_root">2.1. Apache must already be running as root</h3>
 <div class="paragraph"><p>First, let us take a look at the typical Apache setup, in which Apache is bound
 to port 80, and uses the prefork MPM. Binding to any port lower than 1024
 requires root privileges, so Apache is typically run as root. This poses an
@@ -1149,7 +1175,7 @@ this method in automated unit tests will require running the unit test suit as
 root.</p></div>
 </div>
 <div class="sect2">
-<h3 id="_using_apache_8217_s_suexec">2.2. Using Apache’s suEXEC</h3>
+<span class="anchor_helper" id="_using_apache_8217_s_suexec"></span><h3 data-anchor="_using_apache_8217_s_suexec">2.2. Using Apache’s suEXEC</h3>
 <div class="paragraph"><p>Apache’s <a href="http://httpd.apache.org/docs/2.0/suexec.html">suEXEC</a> allows one to
 run CGI processes as different users. But it seems that suEXEC can only be
 used for CGI, and is not a general-purpose mechanism. The
@@ -1159,7 +1185,7 @@ to use suEXEC, then it is likely that we’ll have to patch suEXEC. The suEXEC
 website strongly discourages patching.</p></div>
 </div>
 <div class="sect2">
-<h3 id="_using_a_setuid_root_wrapper_application">2.3. Using a setuid root wrapper application</h3>
+<span class="anchor_helper" id="_using_a_setuid_root_wrapper_application"></span><h3 data-anchor="_using_a_setuid_root_wrapper_application">2.3. Using a setuid root wrapper application</h3>
 <div class="paragraph"><p>If we use this method, we must be extremely careful. It must not be possible
 for arbitrary processes to gain root privileges. We want Passenger, and only
 Passenger, to be able to gain root privileges.</p></div>
@@ -1168,7 +1194,7 @@ a password file, which only Apache and the wrapper can read, through
 the use of proper file permissions. The password file must never be world
 readable or writable.</p></div>
 <div class="paragraph"><p>It works as follows:</p></div>
-<div class="olist arabic"><ol class="arabic">
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
 Passenger runs the wrapper.
@@ -1202,7 +1228,7 @@ process’s user is in the whitelist.</p></div>
 run as root, in contrast to the run-Apache-as-root method.</p></div>
 </div>
 <div class="sect2">
-<h3 id="setuid_root">2.4. Using a setuid $X wrapper application</h3>
+<span class="anchor_helper" id="setuid_root"></span><h3 data-anchor="setuid_root">2.4. Using a setuid $X wrapper application</h3>
 <div class="paragraph"><p>A setuid $X wrapper will work in a fashion similar to the setuid root wrapper,
 i.e. it will use a password file for authorization.</p></div>
 <div class="paragraph"><p>Passenger does not spawn Rails applications itself, but does so via the spawn
@@ -1220,13 +1246,13 @@ methods.</p></div>
 wrapper for each user, and to install it.</p></div>
 </div>
 <div class="sect2">
-<h3 id="_using_em_su_em">2.5. Using <em>su</em>
+<span class="anchor_helper" id="_using_em_su_em"></span><h3 data-anchor="_using_em_su_em">2.5. Using <em>su</em>
 </h3>
 <div class="paragraph"><p>The standard Unix <em>su</em> tool asks for the root password. It’s a bad idea for
 Apache to know the root password, so using <em>su</em> is not a viable alternative.</p></div>
 </div>
 <div class="sect2">
-<h3 id="_using_em_sudo_em">2.6. Using <em>sudo</em>
+<span class="anchor_helper" id="_using_em_sudo_em"></span><h3 data-anchor="_using_em_sudo_em">2.6. Using <em>sudo</em>
 </h3>
 <div class="paragraph"><p>It might be possible to use the <em>sudo</em> utility. sudo can be configured in
 such a way that the user Apache runs as can use sudo without having to enter a
@@ -1242,10 +1268,10 @@ or (on Linux) by reading the file <span class="monospaced">/proc/$PID/cmdline</s
 <div class="paragraph"><p>So it seems <em>sudo</em> is not a viable alternative.</p></div>
 </div>
 <div class="sect2">
-<h3 id="_common_security_issues">2.7. Common security issues</h3>
+<span class="anchor_helper" id="_common_security_issues"></span><h3 data-anchor="_common_security_issues">2.7. Common security issues</h3>
 <div class="paragraph"><p>Whatever method Passenger will use, the following security principles must be
 honored:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 Rails applications must never be run as root.
@@ -1254,7 +1280,7 @@ Rails applications must never be run as root.
 </ul></div>
 <div class="paragraph"><p>It might also be worthy to look into suEXEC’s security model for inspiration.</p></div>
 <div class="paragraph"><p>Also, the following questions remain:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 Is there a need for a user whitelist/blacklist? That is, is there a need for
@@ -1266,7 +1292,7 @@ Is there a need for a user whitelist/blacklist? That is, is there a need for
 </div>
 </div>
 <div class="sect1">
-<h2 id="_chosen_solution">3. Chosen solution</h2>
+<span class="anchor_helper" id="_chosen_solution"></span><h2 data-anchor="_chosen_solution">3. Chosen solution</h2>
 <div class="sectionbody">
 <div class="paragraph"><p>Running Apache as root and writing a setuid root wrapper are the main
 contestants. The former is preferred, because it’s easier to implement.</p></div>
@@ -1292,9 +1318,7 @@ feel free to discuss it with us.</p></div>
 </div>
 <div id="footnotes"><hr></div>
 <div id="footer">
-<div id="footer-text">
-Last updated 2010-09-25 20:09:08 CEST
-</div>
+
 </div>
 <script>/*! jQuery v1.7.1 jquery.com | jquery.org/license */
 (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement( [...]
@@ -1631,6 +1655,7 @@ Mizuho.initializeTopBar = $.proxy(function() {
 	var isMobileDevice = this.isMobileDevice();
 	var timerId;
 	
+	// Create the floating table of contents used in the top bar.
 	var $floattoc = $('<div id="floattoc"></div>').html($('#toc').html());
 	$floattoc.find('#toctitle').remove();
 	$floattoc.find('.comments').remove();
@@ -1649,6 +1674,8 @@ Mizuho.initializeTopBar = $.proxy(function() {
 		self.internalLinkClicked(this, event);
 	});
 	
+	// Callback for when the user clicks on the Table of Contents
+	// button on the top bar.
 	function showFloatingToc() {
 		var scrollUpdateTimerId;
 		
@@ -1741,6 +1768,9 @@ Mizuho.initializeTopBar = $.proxy(function() {
 		$window.bind('scroll', onScroll);
 	}
 	
+	// Called whenever the user scrolls. Updates the title of the
+	// Table of Contents button in the top bar to the section that
+	// the user is currently reading.
 	function update() {
 		if ($title.offset().top + $title.height() < $document.scrollTop()) {
 			if (!$topbar.is(':visible')) {
@@ -1784,6 +1814,7 @@ Mizuho.initializeTopBar = $.proxy(function() {
 		}, 100);
 	}
 	
+	
 	if (isMobileDevice) {
 		// Mobile devices don't support position fixed.
 		$topbar.css('position', 'absolute');
@@ -1798,5 +1829,5 @@ Mizuho.initializeTopBar = $.proxy(function() {
 $(document).ready(Mizuho.initializeTopBar);
 
 </script>
-</body>
+</body>
 </html>
diff --git a/doc/Users guide Apache.html b/doc/Users guide Apache.html
index a6168cd..68abc7e 100644
--- a/doc/Users guide Apache.html	
+++ b/doc/Users guide Apache.html	
@@ -1,9 +1,9 @@
 <!DOCTYPE html>
-<html lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta name="generator" content="AsciiDoc 8.6.7">
-<title>Phusion Passenger users guide</title>
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta name="generator" content="AsciiDoc 8.6.7">
+<title>Phusion Passenger users guide, Apache version</title>
 <style type="text/css">
 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
 
@@ -603,7 +603,7 @@ div.exampleblock > div.content, div.sidebarblock > div.content, div.listingblock
 div.verseblock { border-left-width: 0; margin-left: 3em; }
 div.quoteblock { border-left-width: 3px; margin-left: 0; margin-right: 0;}
 div.admonitionblock td.content { border-left: 3px solid #E8E8E8; }
-</style>
+</style>
 <script type="text/javascript">
 /*<![CDATA[*/
 var asciidoc = {  // Namespace.
@@ -795,11 +795,14 @@ install: function(toclevels) {
 }
 
 }
-asciidoc.install(3);
+asciidoc.install();
 /*]]>*/
-</script><style type="text/css">
+</script>
+<style type="text/css">
 body {
-	margin: 1em 10% 1em 10%;
+	margin: 1em auto 1em auto;
+	padding: 0 1em 0 1em;
+	max-width: 800px;
 }
 
 a.image {
@@ -878,6 +881,10 @@ a.image {
 	margin: 2em;
 }
 
+pre {
+	overflow: auto;
+}
+
 @media print {
 	body {
 		font-size: 18pt;
@@ -1038,29 +1045,38 @@ a.image {
 	border-bottom-right-radius: 0;
 }
 
+/* http://nicolasgallagher.com/jump-links-and-viewport-positioning/ */
+.anchor_helper {
+	position: relative;
+	display: block;
+	top: -50px;
+	width: 1px;
+	height: 1px;
+}
+
 </style>
-</head>
+</head>
 <body class="article">
 <div id="topbar" style="display: none">
 	<div class="title">
-		<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAAEV95QVAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sGCRMSACDxkZwAAAAidEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVAgb24gYSBNYWOHqHdDAAAAZUlEQVQY032PSxbAIAjEIlfygL6ePF3UUvpzNjgSYWwqAMEhUQnANnsC7TQPeJpsVWzMuh2sog4vDTUbqP081zECrW4dtdaQGSIKlWluPyjK+VXxAz5XfcKufCzA130AfQHWB30HZxlPaP080xsAAAAASUVORK5CYII=" width="11" height="10" alt=""><a href="javascript:void(Mizuho.smoothlyScrollToToc())">Ph [...]
+		<!-- Don't put a space between the img and a. That will break the hover layout. -->
+		<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAAEV95QVAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sGCRMSACDxkZwAAAAidEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVAgb24gYSBNYWOHqHdDAAAAZUlEQVQY032PSxbAIAjEIlfygL6ePF3UUvpzNjgSYWwqAMEhUQnANnsC7TQPeJpsVWzMuh2sog4vDTUbqP081zECrW4dtdaQGSIKlWluPyjK+VXxAz5XfcKufCzA130AfQHWB30HZxlPaP080xsAAAAASUVORK5CYII=" width="11" height="10" alt=""><a href="javascript:void(Mizuho.smoothlyScrollToToc())">Ph [...]
 	</div>
 	<a href="javascript:void(0)" id="current_section"></a>
 </div>
 <div id="header">
-<h1>Phusion Passenger users guide</h1>
+<h1>Phusion Passenger users guide, Apache version</h1>
 <div id="preamble">
 <div class="sectionbody">
 <div class="paragraph"><p><span class="image">
 <a class="image" href="http://www.phusion.nl/">
-<img src="images/phusion_banner.png" alt="images/phusion_banner.png"></a>
+<img src="images/phusion_banner.png" alt="images/phusion_banner.png">
+</a>
 </span></p></div>
-<div class="paragraph"><p>Phusion Passenger is an Apache module, which makes deploying Ruby and Ruby on
-Rails applications on Apache a breeze. It follows the usual Ruby on Rails
-conventions, such as "Don’t-Repeat-Yourself" and ease of setup, while at the
-same time providing enough flexibility.</p></div>
+<div class="paragraph"><p>Phusion Passenger is an application server which can directly integrate into Apache. It is designed to be easy to use, fast, stable and reliable and is used by <a href="http://trends.builtwith.com/Web-Server/Phusion-Passenger">hundreds of thousands of websites</a> all over the world.</p></div>
+<div class="paragraph"><p>Phusion Passenger is a so-called polyglot application server because it supports applications written in multiple programming languages. At this time, Ruby and Python are supported.</p></div>
 <div class="paragraph"><p>This users guide will teach you:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 How to install Phusion Passenger.
@@ -1073,12 +1089,7 @@ How to configure Phusion Passenger.
 </li>
 <li>
 <p>
-How to deploy a Ruby on Rails application.
-</p>
-</li>
-<li>
-<p>
-How to deploy a <a href="http://rack.rubyforge.org/">Rack</a>-based Ruby application.
+How to deploy Ruby and Python applications.
 </p>
 </li>
 <li>
@@ -1088,29 +1099,213 @@ How to solve common problems.
 </li>
 </ul></div>
 <div class="paragraph"><p>This guide assumes that the reader is somewhat familiar with Apache and with
-using the commandline.</p></div>
-</div>
+using the command line.</p></div>
 </div>
+</div>
 <div id="toc">
-  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><div id="toctitle">Table of Contents</div>
-  <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
-</div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><div id="toctitle">Table of Contents</div>
+<div class="foo toclevel2"><a href="#_support_information">1. Support information</a></div>
+<div class="foo toclevel3"><a href="#_supported_operating_systems">1.1. Supported operating systems</a></div>
+<div class="foo toclevel3"><a href="#_where_to_get_support">1.2. Where to get support</a></div>
+<div class="foo toclevel2"><a href="#_installation">2. Installation</a></div>
+<div class="foo toclevel3"><a href="#_synopsis">2.1. Synopsis</a></div>
+<div class="foo toclevel3"><a href="#rubygems_generic_install">2.2. Generic installation, upgrade and downgrade method: via RubyGems</a></div>
+<div class="foo toclevel3"><a href="#tarball_generic_install">2.3. Generic installation, upgrade and downgrade method: via tarball</a></div>
+<div class="foo toclevel3"><a href="#install_on_debian_ubuntu">2.4. Installing or upgrading on Debian 6 or Ubuntu</a></div>
+<div class="foo toclevel3"><a href="#_installing_or_upgrading_on_red_hat_fedora_centos_or_scientificlinux">2.5. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux</a></div>
+<div class="foo toclevel3"><a href="#_upgrading_from_open_source_to_enterprise">2.6. Upgrading from open source to Enterprise</a></div>
+<div class="foo toclevel3"><a href="#_cryptographic_verification_of_installation_files">2.7. Cryptographic verification of installation files</a></div>
+<div class="foo toclevel4"><a href="#_synopsis_2">2.7.1. Synopsis</a></div>
+<div class="foo toclevel4"><a href="#_importing_the_phusion_software_signing_key">2.7.2. Importing the Phusion Software Signing key</a></div>
+<div class="foo toclevel4"><a href="#_verifying_the_phusion_software_signing_key">2.7.3. Verifying the Phusion Software Signing key</a></div>
+<div class="foo toclevel4"><a href="#_verifying_the_gem_and_tarball">2.7.4. Verifying the gem and tarball</a></div>
+<div class="foo toclevel4"><a href="#_verifying_git_signatures">2.7.5. Verifying Git signatures</a></div>
+<div class="foo toclevel4"><a href="#_verifying_deb_and_rpm_packages">2.7.6. Verifying DEB and RPM packages</a></div>
+<div class="foo toclevel4"><a href="#_revocation">2.7.7. Revocation</a></div>
+<div class="foo toclevel3"><a href="#_non_interactive_automatic_headless_installs_or_upgrades">2.8. Non-interactive, automatic, headless installs or upgrades</a></div>
+<div class="foo toclevel3"><a href="#_customizing_the_compilation_process">2.9. Customizing the compilation process</a></div>
+<div class="foo toclevel4"><a href="#_setting_the_compiler">2.9.1. Setting the compiler</a></div>
+<div class="foo toclevel4"><a href="#_adding_additional_compiler_or_linker_flags">2.9.2. Adding additional compiler or linker flags</a></div>
+<div class="foo toclevel4"><a href="#_forcing_location_of_command_line_tools_and_dependencies">2.9.3. Forcing location of command line tools and dependencies</a></div>
+<div class="foo toclevel3"><a href="#working_with_apache_conf">2.10. Working with the Apache configuration file</a></div>
+<div class="foo toclevel3"><a href="#_disabling_without_uninstalling">2.11. Disabling without uninstalling</a></div>
+<div class="foo toclevel3"><a href="#uninstalling">2.12. Uninstalling</a></div>
+<div class="foo toclevel3"><a href="#moving_phusion_passenger">2.13. Moving to a different directory</a></div>
+<div class="foo toclevel2"><a href="#_deploying_a_ruby_on_rails_1_x_or_2_x_but_not_rails_gt_3_x_application">3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3.x) application</a></div>
+<div class="foo toclevel3"><a href="#_deploying_to_a_virtual_host_8217_s_root">3.1. Deploying to a virtual host’s root</a></div>
+<div class="foo toclevel3"><a href="#deploying_rails_to_sub_uri">3.2. Deploying to a sub URI</a></div>
+<div class="foo toclevel3"><a href="#_redeploying_restarting_the_ruby_on_rails_application">3.3. Redeploying (restarting the Ruby on Rails application)</a></div>
+<div class="foo toclevel3"><a href="#_migrations">3.4. Migrations</a></div>
+<div class="foo toclevel3"><a href="#_capistrano_integration">3.5. Capistrano integration</a></div>
+<div class="foo toclevel2"><a href="#_deploying_a_rack_based_ruby_application_including_rails_gt_3">4. Deploying a Rack-based Ruby application (including Rails >= 3)</a></div>
+<div class="foo toclevel3"><a href="#_tutorial_example_writing_and_deploying_a_hello_world_rack_application">4.1. Tutorial/example: writing and deploying a Hello World Rack application</a></div>
+<div class="foo toclevel3"><a href="#_deploying_to_a_virtual_host_8217_s_root_2">4.2. Deploying to a virtual host’s root</a></div>
+<div class="foo toclevel3"><a href="#deploying_rack_to_sub_uri">4.3. Deploying to a sub URI</a></div>
+<div class="foo toclevel3"><a href="#_redeploying_restarting_the_rack_application">4.4. Redeploying (restarting the Rack application)</a></div>
+<div class="foo toclevel3"><a href="#_rackup_specifications_for_various_web_frameworks">4.5. Rackup specifications for various web frameworks</a></div>
+<div class="foo toclevel4"><a href="#_camping">4.5.1. Camping</a></div>
+<div class="foo toclevel4"><a href="#_halcyon">4.5.2. Halcyon</a></div>
+<div class="foo toclevel4"><a href="#_mack">4.5.3. Mack</a></div>
+<div class="foo toclevel4"><a href="#_merb">4.5.4. Merb</a></div>
+<div class="foo toclevel4"><a href="#_ramaze">4.5.5. Ramaze</a></div>
+<div class="foo toclevel4"><a href="#_sinatra">4.5.6. Sinatra</a></div>
+<div class="foo toclevel2"><a href="#_deploying_a_wsgi_python_application">5. Deploying a WSGI (Python) application</a></div>
+<div class="foo toclevel3"><a href="#_tutorial_example_writing_and_deploying_a_hello_world_wsgi_application">5.1. Tutorial/example: writing and deploying a Hello World WSGI application</a></div>
+<div class="foo toclevel3"><a href="#_deploying_to_a_virtual_host_8217_s_root_3">5.2. Deploying to a virtual host’s root</a></div>
+<div class="foo toclevel3"><a href="#_redeploying_restarting_the_wsgi_application">5.3. Redeploying (restarting the WSGI application)</a></div>
+<div class="foo toclevel2"><a href="#_configuring_phusion_passenger">6. Configuring Phusion Passenger</a></div>
+<div class="foo toclevel3"><a href="#_passengerroot_lt_directory_gt">6.1. PassengerRoot <directory></a></div>
+<div class="foo toclevel3"><a href="#PassengerDefaultRuby">6.2. PassengerDefaultRuby <filename></a></div>
+<div class="foo toclevel3"><a href="#PassengerRuby">6.3. PassengerRuby <filename></a></div>
+<div class="foo toclevel3"><a href="#_passengerpython_lt_filename_gt">6.4. PassengerPython <filename></a></div>
+<div class="foo toclevel3"><a href="#PassengerAppRoot">6.5. PassengerAppRoot <path/to/root></a></div>
+<div class="foo toclevel3"><a href="#PassengerSpawnMethod">6.6. PassengerSpawnMethod <string></a></div>
+<div class="foo toclevel3"><a href="#PassengerEnabled">6.7. PassengerEnabled <on|off></a></div>
+<div class="foo toclevel3"><a href="#PassengerTempDir">6.8. PassengerTempDir <directory></a></div>
+<div class="foo toclevel3"><a href="#PassengerUploadBufferDir">6.9. PassengerUploadBufferDir <directory></a></div>
+<div class="foo toclevel3"><a href="#_passengerrestartdir_lt_directory_gt">6.10. PassengerRestartDir <directory></a></div>
+<div class="foo toclevel3"><a href="#PassengerBufferResponse">6.11. PassengerBufferResponse <on|off></a></div>
+<div class="foo toclevel3"><a href="#PassengerRollingRestarts">6.12. PassengerRollingRestarts <on|off></a></div>
+<div class="foo toclevel3"><a href="#_passengerresistdeploymenterrors_lt_on_off_gt">6.13. PassengerResistDeploymentErrors <on|off></a></div>
+<div class="foo toclevel3"><a href="#_security_options">6.14. Security options</a></div>
+<div class="foo toclevel4"><a href="#PassengerUserSwitching">6.14.1. PassengerUserSwitching <on|off></a></div>
+<div class="foo toclevel4"><a href="#PassengerUser">6.14.2. PassengerUser <username></a></div>
+<div class="foo toclevel4"><a href="#PassengerGroup">6.14.3. PassengerGroup <group name></a></div>
+<div class="foo toclevel4"><a href="#PassengerDefaultUser">6.14.4. PassengerDefaultUser <username></a></div>
+<div class="foo toclevel4"><a href="#PassengerDefaultGroup">6.14.5. PassengerDefaultGroup <group name></a></div>
+<div class="foo toclevel4"><a href="#PassengerFriendlyErrorPages">6.14.6. PassengerFriendlyErrorPages <on|off></a></div>
+<div class="foo toclevel3"><a href="#_resource_control_and_optimization_options">6.15. Resource control and optimization options</a></div>
+<div class="foo toclevel4"><a href="#_passengermaxpoolsize_lt_integer_gt">6.15.1. PassengerMaxPoolSize <integer></a></div>
+<div class="foo toclevel4"><a href="#PassengerMinInstances">6.15.2. PassengerMinInstances <integer></a></div>
+<div class="foo toclevel4"><a href="#_passengermaxinstances_lt_integer_gt">6.15.3. PassengerMaxInstances <integer></a></div>
+<div class="foo toclevel4"><a href="#_passengermaxinstancesperapp_lt_integer_gt">6.15.4. PassengerMaxInstancesPerApp <integer></a></div>
+<div class="foo toclevel4"><a href="#PassengerPoolIdleTime">6.15.5. PassengerPoolIdleTime <integer></a></div>
+<div class="foo toclevel4"><a href="#PassengerMaxPreloaderIdleTime">6.15.6. PassengerMaxPreloaderIdleTime <integer></a></div>
+<div class="foo toclevel4"><a href="#PassengerConcurrencyModel">6.15.7. PassengerConcurrencyModel <process|thread></a></div>
+<div class="foo toclevel4"><a href="#PassengerThreadCount">6.15.8. PassengerThreadCount <number></a></div>
+<div class="foo toclevel4"><a href="#PassengerMaxRequests">6.15.9. PassengerMaxRequests <integer></a></div>
+<div class="foo toclevel4"><a href="#PassengerMaxRequestTime">6.15.10. PassengerMaxRequestTime <seconds></a></div>
+<div class="foo toclevel4"><a href="#PassengerMemoryLimit">6.15.11. PassengerMemoryLimit <integer></a></div>
+<div class="foo toclevel4"><a href="#_passengerstatthrottlerate_lt_integer_gt">6.15.12. PassengerStatThrottleRate <integer></a></div>
+<div class="foo toclevel4"><a href="#PassengerPreStart">6.15.13. PassengerPreStart <url></a></div>
+<div class="foo toclevel4"><a href="#PassengerHighPerformance">6.15.14. PassengerHighPerformance <on|off></a></div>
+<div class="foo toclevel3"><a href="#_compatibility_options">6.16. Compatibility options</a></div>
+<div class="foo toclevel4"><a href="#PassengerResolveSymlinksInDocumentRoot">6.16.1. PassengerResolveSymlinksInDocumentRoot <on|off></a></div>
+<div class="foo toclevel4"><a href="#_passengerallowencodedslashes_lt_on_off_gt">6.16.2. PassengerAllowEncodedSlashes <on|off></a></div>
+<div class="foo toclevel3"><a href="#_logging_and_debugging_options">6.17. Logging and debugging options</a></div>
+<div class="foo toclevel4"><a href="#PassengerLogLevel">6.17.1. PassengerLogLevel <integer></a></div>
+<div class="foo toclevel4"><a href="#_passengerdebuglogfile_lt_filename_gt">6.17.2. PassengerDebugLogFile <filename></a></div>
+<div class="foo toclevel4"><a href="#_passengerdebugger_lt_on_off_gt">6.17.3. PassengerDebugger <on|off></a></div>
+<div class="foo toclevel3"><a href="#_classic_ruby_on_rails_8656_2_x_specific_options">6.18. Classic Ruby on Rails (⇐ 2.x)-specific options</a></div>
+<div class="foo toclevel4"><a href="#RailsBaseURI">6.18.1. RailsBaseURI <uri></a></div>
+<div class="foo toclevel4"><a href="#rails_env">6.18.2. RailsEnv <string></a></div>
+<div class="foo toclevel3"><a href="#_rack_and_rails_gt_3_specific_options">6.19. Rack and Rails >= 3 specific options</a></div>
+<div class="foo toclevel4"><a href="#RackBaseURI">6.19.1. RackBaseURI <uri></a></div>
+<div class="foo toclevel4"><a href="#rack_env">6.19.2. RackEnv <string></a></div>
+<div class="foo toclevel3"><a href="#_deprecated_or_removed_options">6.20. Deprecated or removed options</a></div>
+<div class="foo toclevel4"><a href="#_railsruby">6.20.1. RailsRuby</a></div>
+<div class="foo toclevel4"><a href="#_railsuserswitching">6.20.2. RailsUserSwitching</a></div>
+<div class="foo toclevel4"><a href="#_railsdefaultuser">6.20.3. RailsDefaultUser</a></div>
+<div class="foo toclevel4"><a href="#_railsallowmodrewrite">6.20.4. RailsAllowModRewrite</a></div>
+<div class="foo toclevel4"><a href="#_railsspawnmethod">6.20.5. RailsSpawnMethod</a></div>
+<div class="foo toclevel4"><a href="#_railsautodetect_rackautodetect_and_wsgiautodetect">6.20.6. RailsAutoDetect, RackAutoDetect and WsgiAutoDetect</a></div>
+<div class="foo toclevel4"><a href="#_railsappspawneridletime">6.20.7. RailsAppSpawnerIdleTime</a></div>
+<div class="foo toclevel4"><a href="#_railsframeworkspawneridletime">6.20.8. RailsFrameworkSpawnerIdleTime</a></div>
+<div class="foo toclevel2"><a href="#troubleshooting">7. Troubleshooting</a></div>
+<div class="foo toclevel3"><a href="#_operating_system_specific_problems">7.1. Operating system-specific problems</a></div>
+<div class="foo toclevel4"><a href="#_macos_x_the_installer_cannot_locate_mamp_8217_s_apache">7.1.1. MacOS X: The installer cannot locate MAMP’s Apache</a></div>
+<div class="foo toclevel3"><a href="#_problems_during_installation">7.2. Problems during installation</a></div>
+<div class="foo toclevel4"><a href="#installing_ruby_dev">7.2.1. Ruby development headers aren’t installed</a></div>
+<div class="foo toclevel4"><a href="#_apache_development_headers_aren_8217_t_installed">7.2.2. Apache development headers aren’t installed</a></div>
+<div class="foo toclevel4"><a href="#_apr_development_headers_aren_8217_t_installed">7.2.3. APR development headers aren’t installed</a></div>
+<div class="foo toclevel4"><a href="#_phusion_passenger_is_using_the_wrong_apache_during_installation">7.2.4. Phusion Passenger is using the wrong Apache during installation</a></div>
+<div class="foo toclevel4"><a href="#_phusion_passenger_is_using_the_wrong_ruby_during_installation">7.2.5. Phusion Passenger is using the wrong Ruby during installation</a></div>
+<div class="foo toclevel3"><a href="#_problems_after_installation">7.3. Problems after installation</a></div>
+<div class="foo toclevel4"><a href="#_my_rails_application_works_on_mongrel_but_not_on_phusion_passenger">7.3.1. My Rails application works on Mongrel, but not on Phusion Passenger</a></div>
+<div class="foo toclevel4"><a href="#_phusion_passenger_has_been_compiled_against_the_wrong_apache_installation">7.3.2. Phusion Passenger has been compiled against the wrong Apache installation</a></div>
+<div class="foo toclevel4"><a href="#_i_get_a_403_forbidden_error">7.3.3. I get a "403 Forbidden" error</a></div>
+<div class="foo toclevel4"><a href="#_static_assets_such_as_images_and_stylesheets_aren_8217_t_being_displayed">7.3.4. Static assets such as images and stylesheets aren’t being displayed</a></div>
+<div class="foo toclevel4"><a href="#_the_apache_error_log_says_that_the_spawn_manager_script_does_not_exist_or_that_it_does_not_have_permission_to_execute_it">7.3.5. The Apache error log says that the spawn manager script does not exist, or that it does not have permission to execute it</a></div>
+<div class="foo toclevel4"><a href="#_the_rails_application_reports_that_it_8217_s_unable_to_start_because_of_a_permission_error">7.3.6. The Rails application reports that it’s unable to start because of a permission error</a></div>
+<div class="foo toclevel4"><a href="#_my_rails_application_8217_s_log_file_is_not_being_written_to">7.3.7. My Rails application’s log file is not being written to</a></div>
+<div class="foo toclevel4"><a href="#_i_8217_ve_deployed_my_app_on_ssl_but_the_app_thinks_its_not_on_ssl">7.3.8. I’ve deployed my app on SSL, but the app thinks its not on SSL</a></div>
+<div class="foo toclevel3"><a href="#conflicting_apache_modules">7.4. Conflicting Apache modules</a></div>
+<div class="foo toclevel4"><a href="#_mod_userdir">7.4.1. mod_userdir</a></div>
+<div class="foo toclevel4"><a href="#_multiviews_mod_negotiation">7.4.2. MultiViews (mod_negotiation)</a></div>
+<div class="foo toclevel4"><a href="#_virtualdocumentroot">7.4.3. VirtualDocumentRoot</a></div>
+<div class="foo toclevel2"><a href="#_analysis_and_system_maintenance">8. Analysis and system maintenance</a></div>
+<div class="foo toclevel3"><a href="#_inspecting_memory_usage">8.1. Inspecting memory usage</a></div>
+<div class="foo toclevel3"><a href="#_inspecting_phusion_passenger_8217_s_internal_status">8.2. Inspecting Phusion Passenger’s internal status</a></div>
+<div class="foo toclevel3"><a href="#debugging_frozen">8.3. Debugging frozen applications</a></div>
+<div class="foo toclevel3"><a href="#_accessing_individual_application_processes">8.4. Accessing individual application processes</a></div>
+<div class="foo toclevel3"><a href="#_attaching_an_irb_console_to_an_application_process">8.5. Attaching an IRB console to an application process</a></div>
+<div class="foo toclevel2"><a href="#_tips">9. Tips</a></div>
+<div class="foo toclevel3"><a href="#user_switching">9.1. User Switching (security feature)</a></div>
+<div class="foo toclevel4"><a href="#_requirements">9.1.1. Requirements</a></div>
+<div class="foo toclevel4"><a href="#_effects">9.1.2. Effects</a></div>
+<div class="foo toclevel4"><a href="#_caveats_amp_troubleshooting">9.1.3. Caveats & troubleshooting</a></div>
+<div class="foo toclevel4"><a href="#finding_out_app_user">9.1.4. Finding out what user an application is running as</a></div>
+<div class="foo toclevel3"><a href="#reducing_memory_usage">9.2. Copy-on-write memory support (reducing memory consumption of Ruby applications)</a></div>
+<div class="foo toclevel3"><a href="#capistrano">9.3. Capistrano recipe</a></div>
+<div class="foo toclevel3"><a href="#bundler_support">9.4. Bundler support</a></div>
+<div class="foo toclevel4"><a href="#add_passenger_to_gemfile">9.4.1. Does Phusion Passenger itself need to be added to the Gemfile?</a></div>
+<div class="foo toclevel3"><a href="#_installing_multiple_ruby_on_rails_versions">9.5. Installing multiple Ruby on Rails versions</a></div>
+<div class="foo toclevel3"><a href="#_making_the_application_restart_after_each_request">9.6. Making the application restart after each request</a></div>
+<div class="foo toclevel3"><a href="#sub_uri_deployment_uri_fix">9.7. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments</a></div>
+<div class="foo toclevel3"><a href="#_out_of_band_garbage_work_and_out_of_band_garbage_collection">9.8. Out-of-Band Garbage Work and Out-of-Band Garbage Collection</a></div>
+<div class="foo toclevel3"><a href="#flying_passenger">9.9. Flying Passenger</a></div>
+<div class="foo toclevel4"><a href="#_requirements_2">9.9.1. Requirements</a></div>
+<div class="foo toclevel4"><a href="#_basic_usage">9.9.2. Basic usage</a></div>
+<div class="foo toclevel4"><a href="#configuring_flying_passenger">9.9.3. Configuring Flying Passenger</a></div>
+<div class="foo toclevel4"><a href="#_managing_the_flying_passenger_daemon">9.9.4. Managing the Flying Passenger daemon</a></div>
+<div class="foo toclevel4"><a href="#flying_passenger_caveats">9.9.5. Caveats and limitations</a></div>
+<div class="foo toclevel3"><a href="#_x_sendfile_support">9.10. X-Sendfile support</a></div>
+<div class="foo toclevel3"><a href="#_upload_progress">9.11. Upload progress</a></div>
+<div class="foo toclevel2"><a href="#_under_the_hood">10. Under the hood</a></div>
+<div class="foo toclevel3"><a href="#_static_assets_serving">10.1. Static assets serving</a></div>
+<div class="foo toclevel3"><a href="#_page_caching_support">10.2. Page caching support</a></div>
+<div class="foo toclevel3"><a href="#application_detection">10.3. How Phusion Passenger detects whether a virtual host is a web application</a></div>
+<div class="foo toclevel2"><a href="#_appendix_a_about_this_document">11. Appendix A: About this document</a></div>
+<div class="foo toclevel2"><a href="#_appendix_b_terminology">12. Appendix B: Terminology</a></div>
+<div class="foo toclevel3"><a href="#application_root">12.1. Application root</a></div>
+<div class="foo toclevel3"><a href="#idle_process">12.2. Idle process</a></div>
+<div class="foo toclevel3"><a href="#inactive_process">12.3. Inactive process</a></div>
+<div class="foo toclevel2"><a href="#spawning_methods_explained">13. Appendix C: Spawning methods explained</a></div>
+<div class="foo toclevel3"><a href="#_the_most_straightforward_and_traditional_way_direct_spawning">13.1. The most straightforward and traditional way: direct spawning</a></div>
+<div class="foo toclevel3"><a href="#_the_smart_spawning_method">13.2. The smart spawning method</a></div>
+<div class="foo toclevel4"><a href="#_how_it_works">13.2.1. How it works</a></div>
+<div class="foo toclevel4"><a href="#_summary_of_benefits">13.2.2. Summary of benefits</a></div>
+<div class="foo toclevel3"><a href="#_smart_spawning_gotcha_1_unintentional_file_descriptor_sharing">13.3. Smart spawning gotcha #1: unintentional file descriptor sharing</a></div>
+<div class="foo toclevel4"><a href="#_example_1_memcached_connection_sharing_harmful">13.3.1. Example 1: Memcached connection sharing (harmful)</a></div>
+<div class="foo toclevel4"><a href="#_example_2_log_file_sharing_not_harmful">13.3.2. Example 2: Log file sharing (not harmful)</a></div>
+<div class="foo toclevel3"><a href="#_smart_spawning_gotcha_2_the_need_to_revive_threads">13.4. Smart spawning gotcha #2: the need to revive threads</a></div>
+<div class="foo toclevel3"><a href="#_smart_spawning_gotcha_3_code_load_order">13.5. Smart spawning gotcha #3: code load order</a></div>
+<div class="foo toclevel2"><a href="#about_environment_variables">14. Appendix D: About environment variables</a></div>
+<div class="foo toclevel3"><a href="#_working_with_environment_variables">14.1. Working with environment variables</a></div>
+<div class="foo toclevel3"><a href="#_the_path_environment_variable">14.2. The PATH environment variable</a></div>
+<div class="foo toclevel4"><a href="#_adding_phusion_passenger_8217_s_administration_tools_to_path">14.2.1. Adding Phusion Passenger’s administration tools to PATH</a></div>
+<div class="foo toclevel3"><a href="#_making_environment_variables_permanent">14.3. Making environment variables permanent</a></div>
+<div class="foo toclevel4"><a href="#_bash">14.3.1. bash</a></div>
+<div class="foo toclevel4"><a href="#_apache">14.3.2. Apache</a></div>
+<div class="foo toclevel4"><a href="#_nginx">14.3.3. Nginx</a></div>
+<div class="foo toclevel4"><a href="#_cron">14.3.4. cron</a></div>
+<div class="foo toclevel4"><a href="#env_vars_passenger_apps">14.3.5. Phusion Passenger-served apps</a></div>
+<div class="foo toclevel3"><a href="#env_vars_and_sudo">14.4. Environment variables and sudo</a></div>
+</div>
 </div>
 <div id="content">
 
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_support_information" data-comment-topic="support-information-zkewk3">1. Support information</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_support_information"></span><h2 data-comment-topic="support-information-zkewk3" data-anchor="_support_information">1. Support information</h2>
 <div class="sectionbody">
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_supported_operating_systems" data-comment-topic="supported-operating-systems-rhbg35">1.1. Supported operating systems</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_supported_operating_systems"></span><h3 data-comment-topic="supported-operating-systems-rhbg35" data-anchor="_supported_operating_systems">1.1. Supported operating systems</h3>
 <div class="paragraph"><p>Phusion Passenger works on any POSIX-compliant operating system. In other
 words: practically any operating system on earth, except Microsoft Windows.</p></div>
 <div class="paragraph"><p>Phusion Passenger is confirmed on a large number of operating systems and Linux
 distributions, including, but not limited to, Ubuntu, Debian, CentOS/Fedora/RHEL,
-Gentoo, Mac OS X, FreeBSD and Solaris. Both 32-bit and 64-bit platforms are supported.</p></div>
-<div class="paragraph"><p>The only POSIX-compliant operating system on which Phusion Passenger for Apache is
-known not to work at this time, is OpenBSD. Please use Phusion Passenger for Nginx
-instead.</p></div>
+Gentoo, Mac OS X, FreeBSD and Solaris. OpenBSD is supported since version 5.2.
+Both 32-bit and 64-bit platforms are supported.</p></div>
 <div class="paragraph"><p>Please
 <a href="http://code.google.com/p/phusion-passenger/issues/list">report a bug</a>
 or
@@ -1118,8 +1313,14 @@ or
 if it doesn’t work on your POSIX-compliant operating system.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_where_to_get_support" data-comment-topic="where-to-get-support-f3pbrb">1.2. Where to get support</h3>
-<div class="ulist"><ul>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_where_to_get_support"></span><h3 data-comment-topic="where-to-get-support-f3pbrb" data-anchor="_where_to_get_support">1.2. Where to get support</h3>
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="http://groups.google.com/group/phusion-passenger">Discussion forum</a> - post a
+  message here if you’re experiencing problems. Support on this forum is provided by the community on a best-effort basis, so a (timely) response is not guaranteed.
+</p>
+</li>
 <li>
 <p>
 <a href="http://code.google.com/p/phusion-passenger/issues/list">Issue tracker</a> - report
@@ -1128,943 +1329,2142 @@ if it doesn’t work on your POSIX-compliant operating system.</p></div>
 </li>
 <li>
 <p>
-<a href="http://groups.google.com/group/phusion-passenger">Discussion forum</a> - post a
-  message here if you’re experiencing problems.
+Email <a href="mailto:support at phusion.nl">support at phusion.nl</a> if you are a <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> customer. Please mention your order reference. If you are not an Enterprise customer, we kindly redirect you to the community discussion forum instead.
+</p>
+</li>
+<li>
+<p>
+<a href="https://www.phusionpassenger.com/commercial_support">Commercial support contracts</a> are also available.
+</p>
+</li>
+<li>
+<p>
+Report security vulnerabilities to <a href="mailto:security at phusion.nl">security at phusion.nl</a>. We will do our best to respond to you as quickly as we can, so please do not disclose the vulnerability until then.
 </p>
 </li>
 </ul></div>
+<div class="paragraph"><p>Please consult <a href="https://www.phusionpassenger.com/support">the Phusion Passenger website</a> for a full list of support resources.</p></div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_installing_upgrading_and_uninstalling_phusion_passenger" data-comment-topic="installing-upgrading-and-uninstalling-phusion-passenger-laryvs">2. Installing, upgrading and uninstalling Phusion Passenger</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installation"></span><h2 data-comment-topic="installing-upgrading-and-uninstalling-phusion-passenger-laryvs" data-anchor="_installation">2. Installation</h2>
 <div class="sectionbody">
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_generic_installation_instructions" data-comment-topic="generic-installation-instructions-17jo43j">2.1. Generic installation instructions</h3>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="install_passenger" data-comment-topic="overview-of-installation-methods-12vnjyb">2.1.1. Overview of installation methods</h4>
-<div class="paragraph"><p>There are three ways to install Phusion Passenger:</p></div>
-<div class="olist arabic"><ol class="arabic">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_synopsis"></span><h3 data-comment-topic="synopsis-l0om5d" data-anchor="_synopsis">2.1. Synopsis</h3>
+<div class="paragraph"><p>The Phusion Passenger installation process consists of two steps:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+The <strong>obtainment step</strong>, where you download the Phusion Passenger files puts them somewhere on your system. This can be done through downloading the source tarball, installing the Ruby gem or installing a native OS package via APT or YUM.
+</p>
+</li>
+<li>
+<p>
+The <strong>integration step</strong>, where you configure Phusion Passenger so that it works properly with other system components such as Apache, Nginx, Ruby, Python, etc.
+</p>
+</li>
+</ol></div>
+<div class="paragraph"><p>Because Phusion Passenger is designed to run in a wide variety of operating systems and configurations, both steps can be done in multiple ways. Most users — especially first-time users — will be satisfied with the <em>generic installation instructions</em> which covers both steps. However some users may prefer <em>OS-specific installation instructions</em>, which allow Phusion Passenger to better integrate into the operating system. Better integration is charac [...]
+<div class="paragraph"><p>If you are not familiar with system administration and do not understand all the choices, then we recommend you to go with the <a href="#rubygems_generic_install">RubyGems generic installation method</a> (if you’re a Ruby user) or the <a href="#tarball_generic_install">tarball generic installation method</a> (if you’re not a Ruby user).</p></div>
+<div class="paragraph"><p>The steps for upgrading or downgrading Phusion Passenger is almost the same as the steps for installing. All the installation guides in this section will also teach you how to upgrade and downgrade.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="rubygems_generic_install"></span><h3 data-comment-topic="installing-via-the-gem-39jw1u" data-anchor="rubygems_generic_install">2.2. Generic installation, upgrade and downgrade method: via RubyGems</h3>
+<div class="paragraph"><p>RubyGems is only used as a method to obtain the Phusion Passenger files, so in case you have multiple Ruby versions it does not matter which Ruby’s RubyGems you use for installation. Once installed, Phusion Passenger can work with all other Ruby versions on your system.</p></div>
+<span class="anchor_helper" id="is_ruby_home_or_system_wide_installed"></span><h4 class="float" data-anchor="is_ruby_home_or_system_wide_installed">Step 1: figuring out whether your Ruby is installed the home directory or system-wide</h4>
+<div class="paragraph"><p>Ruby may either be installed in the home directory, or system-wide. If it’s installed system-wide then we will want to install gems system-wide as well, so you need to switch to a root prompt first. If Ruby is installed in the home directory then we will want to install gems to the home directory as well, as a normal user.</p></div>
+<div class="paragraph"><p>To find out which case applies, run the following command to find out where the <span class="monospaced">ruby</span> command is:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>which ruby</pre>
+</div>
+</div>
+<div class="paragraph"><p>Do you see a filename that references <em>/home</em> or <em>/Users</em>? If so then your Ruby interpreter is installed in your home directory and you can proceed to step 2. Otherwise, you need to switch to a root prompt by running one of the following commands:</p></div>
+<div class="ulist"><ul>
 <li>
 <p>
-By installing the Phusion Passenger gem, as instructed on the
-   <a href="http://www.modrails.com/install.html">“Install” page on the Phusion
-   Passenger website</a>.
+Are you using RVM? Run <span class="monospaced">rvmsudo -s</span>
 </p>
 </li>
 <li>
 <p>
-By downloading the source tarball from the Phusion Passenger website
-   (<em>passenger-x.x.x.tar.gz</em>).
+Are you not using RVM, or do you not know what RVM is? Run <span class="monospaced">sudo -s</span>
 </p>
 </li>
 <li>
 <p>
-By installing a native Linux package (e.g. Debian package).
+Is <em>sudo</em> not installed on your system? Run <span class="monospaced">su -c bash</span>
 </p>
 </li>
-</ol></div>
-<div class="paragraph"><p>The following sections will explain each installation method. Please read the
-section for the installation method that you prefer. In our opinion, installing
-the gem or the native package is easiest. For these two installation methods,
-Phusion Passenger provides an easy-to-use installer.</p></div>
+</ul></div>
+<div class="paragraph"><p>You must maintain this root prompt throughout this installation guide.</p></div>
+<span class="anchor_helper" id="_step_2_install_the_gem"></span><h4 class="float" data-anchor="_step_2_install_the_gem">Step 2: install the gem</h4>
+<div class="paragraph">
+<div class="title">Open Source</div>
+<p>Install the latest gem to obtain the files for the latest stable version of the open source Phusion Passenger:</p>
 </div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_preparation_gem_and_source_tarball_only" data-comment-topic="preparation-gem-and-source-tarball-only--1sxhbgg">2.1.2. Preparation (gem and source tarball only)</h4>
-<div class="paragraph"><p>If you want to install Phusion Passenger via the gem or the source tarball,
-then some preparations might be required. You can skip this subsection if
-you’re installing Phusion Passenger via a native Linux package, because no
-compilation is necessary.</p></div>
-<div class="sect4">
-<h5 id="_switching_to_a_root_command_prompt">Switching to a root command prompt</h5>
-<div class="paragraph"><p>Before installing, you will probably need to switch to the <span class="monospaced">root</span> user first.
-When you install Phusion Passenger via a gem or a source tarball, some Phusion
-Passenger files have to be compiled, which requires write access to the
-directory in which the Phusion Passenger files are located. On Unix systems,
-the root user is the user who has write access to the entire system. So unless
-you know that your normal user account has write access to the Phusion Passenger
-directory, you should switch to root before installing Phusion Passenger.</p></div>
-<div class="paragraph"><p>You can switch to root by typing the following command:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>sudo -s</pre>
+<pre>gem install passenger</pre>
 </div>
 </div>
-<div class="paragraph"><p>This will open a command prompt as the root user, from which you can proceed
-with installing Phusion Passenger.</p></div>
-<div class="paragraph"><p>If your system does not have <em>sudo</em> installed, please type the following command instead, which should do the same thing:</p></div>
+<div class="paragraph"><p>Sometimes you will want to obtain the latest beta version of Phusion Passenger. Beta versions are not normally selected by <span class="monospaced">gem install</span>, so to opt-in for beta versions you have to add the <span class="monospaced">--pre</span> argument:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>su</pre>
+<pre>gem install passenger --pre</pre>
 </div>
 </div>
-</div>
-<div class="sect4">
-<h5 id="specifying_correct_apache_install">Specifying the correct Apache installation</h5>
-<div class="paragraph"><p>The Phusion Passenger installer will attempt to automatically detect Apache,
-and compile Phusion Passenger against that Apache version. It does this by
-looking for the <span class="monospaced">apxs</span> or <span class="monospaced">apxs2</span> command in the PATH environment variable.
-Apxs is an integral part of any Apache installation.</p></div>
-<div class="paragraph"><p>However, some systems have multiple Apache installations. This is likely
-the case on MacOS X: the OS ships with Apache, but users tend to install
-another Apache version seperately, e.g. via MacPorts. If your system has
-multiple Apache installations, then you will need to tell the Phusion Passenger
-installer which one to use. It is very important that you specify the
-correct Apache installation, because if you load Phusion Passenger in an
-Apache installation that it wasn’t compiled against, then it will likely
-crash.</p></div>
-<div class="paragraph"><p>On yet other systems, Apache is installed in a non-standard location,
-preventing the Phusion Passenger installer from detecting Apache. This
-is most likely the case on systems on which Apache was installed by hand
-from source, i.e. as opposed to installed through the system’s native
-package manager. If this is the case, then you will also have to tell
-the installer where it can find Apache.</p></div>
-<div class="paragraph"><p>To do so, set the <span class="monospaced">APXS2</span> environment variable to the full path of the
-correct <span class="monospaced">apxs</span> or <span class="monospaced">apxs2</span> command. Suppose that you want to use the Apache
-installation in <em>/opt/apache2</em>. Then, assuming that the corresponding
-<span class="monospaced">apxs</span> program’s path is <em>/opt/apache2/bin/apxs</em>, type:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>export APXS2=/opt/apache2/bin/apxs</pre>
+<div class="paragraph"><p>If you want to obtain a specific version of Phusion Passenger, e.g. because you are downgrading, then specify the version number with <span class="monospaced">--version</span>:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>gem install passenger --version 3.0.0</pre>
 </div>
 </div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<img src="./images/icons/note.png" alt="Note">
-</td>
-<td class="content">On some systems, the <span class="monospaced">apxs</span> program might be called <span class="monospaced">apxs2</span>, and it might
-be located in the <span class="monospaced">sbin</span> folder instead of the <span class="monospaced">bin</span> folder.</td>
-</tr></table>
+<div class="paragraph"><p>If you want to obtain a specific <strong>beta</strong> version of Phusion Passenger then you must also pass <span class="monospaced">--pre</span>:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>gem install passenger --version 3.9.1.beta --pre</pre>
+</div>
 </div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<img src="./images/icons/note.png" alt="Note">
-</td>
-<td class="content">
-<div class="title">Environment variables and <em>sudo</em>
-</div>By default, the <em>sudo</em> command will erase any environment variables that it
-doesn’t recognize, prior to executing the given command. So if you set APXS2 as a
-normal user, then run <span class="monospaced">sudo passenger-install-apache2-module</span> (which is the command
-for the Phusion Passenger installer), then the installer will not receive the
-environment variable value that you set. To solve this problem, please become root
-prior to setting any environment variables, as described in the previous subsection.</td>
-</tr></table>
+<div class="paragraph">
+<div class="title">Enterprise</div>
+<p>The <span class="monospaced">gem install</span> command only installs the open source version of Phusion Passenger. <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> customers should obtain the gem from the <a href="https://www.phusionpassenger.com/orders">Customer Area</a> instead. Login with your order reference and password. The Customer Area will show you a list of files.</p>
 </div>
+<div class="paragraph"><p>First, download the <strong>license key</strong> and save it as <em>/etc/passenger-enterprise-license</em>.</p></div>
+<div class="paragraph"><p>Next, download the <strong>gem file</strong> for the version you want (<span class="monospaced">passenger-enterprise-server-x.x.x.gem</span>) and install it with:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>gem install passenger-enterprise-server-x.x.x.gem</pre>
+</div>
 </div>
-<div class="sect4">
-<h5 id="specifying_ruby_installation">Specifying the correct Ruby installation</h5>
-<div class="paragraph"><p>If your system has multiple Ruby installations — which is likely the case on
-MacOS X, or if you’ve also installed
-<a href="http://www.rubyenterpriseedition.com">Ruby Enterprise Edition</a> — then you
-will need to tell the operating system which Ruby installation to use, prior to
-running the Phusion Passenger installer. If you only have one Ruby installation
-(the case on most Linux systems), then you can skip this section because Phusion
-Passenger will automatically detect it.</p></div>
-<div class="paragraph"><p>To specify a Ruby installation, prepend your Ruby installation’s <span class="monospaced">bin</span>
-directory to the <span class="monospaced">PATH</span> environment variable. For example, if you have the
-following Ruby installations:</p></div>
-<div class="ulist"><ul>
+<span class="anchor_helper" id="add_rubygems_bin_dir_to_path"></span><h4 class="float" data-anchor="add_rubygems_bin_dir_to_path">Step 3: add the RubyGems bin directory to your $PATH</h4>
+<div class="paragraph"><p>If you all of the following are applicable to you:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+You are on Debian or Ubuntu,
+</p>
+</li>
 <li>
 <p>
-/usr/bin/ruby
+and you installed RubyGems through APT,
 </p>
 </li>
 <li>
 <p>
-/opt/myruby/bin/ruby
+and your Ruby interpreter is installed system-wide,
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>and you want to use the latter, then type:</p></div>
+<div class="paragraph"><p>…then you must ensure that the RubyGems bin directory is in your $PATH, which is the environment variable that dictates where your command prompt will look for commands. If any of the above conditions do not apply to you, then you can skip this step.</p></div>
+<div class="paragraph"><p>Open <em>/etc/bash.bashrc</em> or <em>/etc/bashrc</em> (whichever is available) and add the following to the end of the file. Also run this command in your terminal.</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>export PATH=/opt/myruby/bin:$PATH</pre>
+<pre>export PATH=$PATH:/var/lib/gems/1.8/bin:/var/lib/gems/1.9/bin</pre>
 </div>
 </div>
-</div>
-</div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_installing_via_the_gem" data-comment-topic="installing-via-the-gem-39jw1u">2.1.3. Installing via the gem</h4>
-<div class="paragraph"><p>Please install the gem and then run the Phusion Passenger installer, by typing the
-following commands:</p></div>
+<span class="anchor_helper" id="_step_4_loosen_permissions"></span><h4 class="float" data-anchor="_step_4_loosen_permissions">Step 4: loosen permissions</h4>
+<div class="paragraph"><p>If in step 1 you determined that your Ruby interpreter is installed in your home directory, then you need to make sure that the Phusion Passenger gem directory is accessible by your web server. To do that, you must ensure that the Phusion Passenger gem directory, as well as all parent directories, have the world-executable permission.</p></div>
+<div class="paragraph"><p>To find out where the Phusion Passenger gem directory is, run:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>gem install passenger-x.x.x.gem
-passenger-install-apache2-module</pre>
+<pre>passenger-config --root</pre>
 </div>
 </div>
-<div class="paragraph"><p>Please follow the instructions given by the installer.</p></div>
-</div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_installing_via_the_source_tarball" data-comment-topic="installing-via-the-source-tarball-1cgxrqc">2.1.4. Installing via the source tarball</h4>
-<div class="paragraph"><p>Extract the tarball to whatever location you prefer. <strong>The Phusion Passenger files
-are to reside in that location permanently.</strong> For example, if you would like
-Phusion Passenger to reside in <span class="monospaced">/opt/passenger-x.x.x</span>:</p></div>
+<div class="paragraph"><p>Suppose that the above command outputs <em>/home/phusion/.rvm/gems/ruby-1.9.3-p362/gems/passenger-x.x.x</em>. Then you <span class="monospaced">chmod o+x</span> the directory itself and all parent directories up until <em>/home/phusion</em>:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>cd /opt
-tar xzvf ~/YourDownloadsFolder/passenger-x.x.x.tar.gz</pre>
+<pre>chmod o+x /home/phusion/.rvm/gems/ruby-1.9.3-p362/gems/passenger-x.x.x
+chmod o+x /home/phusion/.rvm/gems/ruby-1.9.3-p362/gems
+chmod o+x /home/phusion/.rvm/gems/ruby-1.9.3-p362
+chmod o+x /home/phusion/.rvm/gems
+chmod o+x /home/phusion/.rvm
+chmod o+x /home/phusion</pre>
 </div>
 </div>
-<div class="paragraph"><p>Next, run the included installer:</p></div>
+<span class="anchor_helper" id="run_passenger_installer"></span><h4 class="float" data-anchor="run_passenger_installer">Step 5: run the Phusion Passenger installer</h4>
+<div class="paragraph"><p>The Phusion Passenger gem only contains source files. In this step we will use the installer to compile the Phusion Passenger binaries, which include the various Phusion Passenger agent executables and the Phusion Passenger Apache module.</p></div>
+<div class="paragraph"><p>Run the following command and follow the on-screen instructions.</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>/opt/passenger-x.x.x/bin/passenger-install-apache2-module</pre>
+<pre>passenger-install-apache2-module</pre>
 </div>
 </div>
-<div class="paragraph"><p>Please follow the instructions given by the installer.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<img src="./images/icons/important.png" alt="Important">
-</td>
-<td class="content">Please do not remove the <em>passenger-x.x.x</em> folder after
-installation. Furthermore, the <em>passenger-x.x.x</em> folder must be accessible by Apache.</td>
-</tr></table>
+<div class="paragraph"><p>At the end of the installation process, you will be asked to copy and paste a configuration snippet (containing <span class="monospaced">LoadModule</span>, <span class="monospaced">PassengerRoot</span>, etc.) into your Apache configuration file. If you’re upgrading, then you already had a similar configuration snippet. Be sure to remove the old one before pasting the new one.</p></div>
+<div class="paragraph"><p>Different operating systems and Apache installations have different conventions with regard to where the Apache configuration file is and how it is organized. Please read <a href="#working_with_apache_conf">Working with the Apache configuration file</a> if you’re not familiar with it. That section is especially of interest for OS X Server >= 10.8 users because the configuration file may not be at a surprising location.</p></div>
+<div class="paragraph"><p>If compilation doesn’t succeed, then please consult the <a href="#troubleshooting">Troubleshooting</a> section.</p></div>
+<div class="paragraph">
+<div class="title">What does the installer do?</div>
+<p>Despite the name, this "installer" doesn’t actually install anything. The installer checks whether all required dependencies are installed, invokes the compiler, and tells you how to modify the Apache
+configuration file. However, it doesn’t copy any files to outside the Phusion Passenger source directory.</p>
 </div>
+<div class="paragraph"><p><span class="monospaced">passenger-install-apache2-module</span> is actually just a user-friendly frontend around the command <span class="monospaced">rake apache2</span>, which performs the actual compilation of Phusion Passenger.</p></div>
+<span class="anchor_helper" id="_step_6_restarting_the_flying_passenger_daemon"></span><h4 class="float" data-anchor="_step_6_restarting_the_flying_passenger_daemon">Step 6: Restarting the Flying Passenger daemon</h4>
+<div class="paragraph"><p>If you are using <a href="#flying_passenger">Flying Passenger</a> then you must restart the Flying Passenger daemon by sending it the SIGTERM signal:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>kill `cat /path-to/flying-passenger.pid`</pre>
+</div>
 </div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_installing_via_a_native_linux_package" data-comment-topic="installing-via-a-native-linux-package-i1tmhg">2.1.5. Installing via a native Linux package</h4>
-<div class="paragraph"><p>John Leach from Brightbox has kindly provided a Ubuntu packages for Phusion Passenger. The package is available from the <a href="http://wiki.brightbox.co.uk/docs:phusion-passenger">Brightbox repository</a>.</p></div>
+<div class="paragraph"><p>Or, if Flying Passenger is not running with a PID file, look up its PID us <span class="monospaced">ps</span> and then send it SIGTERM:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>ps auxw | grep flying-passenger
+kill PID_OF_FLYING_PASSENGER</pre>
+</div>
 </div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_what_does_the_installer_do" data-comment-topic="what-does-the-installer-do--3a7z1w">2.1.6. What does the installer do?</h4>
-<div class="paragraph"><p>Although we call it an “installer”, it doesn’t actually install anything.
-The installer checks whether all required dependencies are installed,
-compiles Phusion Passenger for you, and tells you how to modify the Apache
-configuration file, but it doesn’t copy any files around.</p></div>
-<div class="paragraph"><p><span class="monospaced">passenger-install-apache2-module</span> is actually just a user-friendly frontend
-around the command <span class="monospaced">rake apache2</span>, which performs the actual compilation of
-Phusion Passenger.</p></div>
+<span class="anchor_helper" id="verify_passenger_running"></span><h4 class="float" data-anchor="verify_passenger_running">Step 7: Verifying that Phusion Passenger is running</h4>
+<div class="paragraph"><p>Restart your web server and run:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>passenger-memory-stats</pre>
+</div>
 </div>
+<div class="paragraph"><p>You should see the web server processes as well as a number of Phusion Passenger processes (e.g. PassengerWatchdog, PassengerHelperAgent). Congratulations, Phusion Passenger is now installed and running!</p></div>
+<div class="paragraph"><p>If the output is not as expected, then please refer to the <a href="#troubleshooting">Troubleshooting</a> section.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_operating_system_specific_instructions_and_information" data-comment-topic="operating-system-specific-instructions-and-information-1dfz365">2.2. Operating system-specific instructions and information</h3>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_macos_x" data-comment-topic="macos-x-1lcpbz2">2.2.1. MacOS X</h4>
-<div class="paragraph"><p>Ben Ruebenstein has written an excellent
-<a href="http://benr75.com/articles/2008/04/12/setup-mod_rails-phusion-mac-os-x-leopard">tutorial
-on installing Phusion Passenger on OS X</a>.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="tarball_generic_install"></span><h3 data-comment-topic="installing-via-the-source-tarball-1cgxrqc" data-anchor="tarball_generic_install">2.3. Generic installation, upgrade and downgrade method: via tarball</h3>
+<span class="anchor_helper" id="_step_1_download_and_extract_the_tarball"></span><h4 class="float" data-anchor="_step_1_download_and_extract_the_tarball">Step 1: download and extract the tarball</h4>
+<div class="paragraph"><p>Download the open source Phusion Passenger tarball from <a href="https://www.phusionpassenger.com/download#open_source">the Phusion Passenger website</a>. Older versions can be found on <a href="https://www.phusionpassenger.com/file_releases">the release archive</a>.</p></div>
+<div class="paragraph"><p>If you a <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> customer, download the Phusion Passenger Enterprise tarball from the <a href="https://www.phusionpassenger.com/orders">Customer Area</a>. Also be sure to download the <strong>license key</strong> and save it as <em>/etc/passenger-enterprise-license</em>.</p></div>
+<div class="paragraph"><p>Once you have downloaded the tarball, pick a location to extract it to. You can pick any location. A good location is <em>/opt/passenger</em>. Let’s call this location <span class="monospaced">$PREFIX</span>. Create this directory and extract the tarball as follows:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>mkdir $PREFIX
+cd $PREFIX
+tar xzvf /location-to/passenger-x.x.x.tar.gz
+cd $PREFIX/passenger-x.x.x</pre>
+</div>
 </div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_ubuntu_linux" data-comment-topic="ubuntu-linux-1xwc66">2.2.2. Ubuntu Linux</h4>
-<div class="paragraph"><p>Ben Hughes has written an <a href="http://www.railsgarden.com/2008/04/12/configurating-passenger-mod_rails-on-slicehost-with-ubuntu-710/">article on installing Phusion Passenger on Ubuntu</a>.</p></div>
+<div class="paragraph"><p>Note that <span class="monospaced">passenger-x.x.x</span> should be <span class="monospaced">passenger-enterprise-server-x.x.x</span> if you’re using Phusion Passenger Enterprise.</p></div>
+<span class="anchor_helper" id="_step_2_loosen_permissions"></span><h4 class="float" data-anchor="_step_2_loosen_permissions">Step 2: loosen permissions</h4>
+<div class="paragraph"><p>The Phusion Passenger directory must be accessible by the web server and by any web apps you want to run. To do that, you must ensure that the Phusion Passenger gem directory, as well as all parent directories, have the world-executable permission.</p></div>
+<div class="paragraph"><p>Suppose that the Phusion Passenger directory is <em>/opt/passenger/passenger-4.0.0</em>. Run <span class="monospaced">chmod o+x</span> on the directory itself and all parent directories.</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>chmod o+x /opt/passenger/passenger-4.0.0
+chmod o+x /opt/passenger
+chmod o+x /opt</pre>
+</div>
 </div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_opensolaris" data-comment-topic="opensolaris-1e0dynj">2.2.3. OpenSolaris</h4>
-<div class="paragraph"><p>J Aaron Farr has written a <a href="http://cubiclemuses.com/cm/articles/2009/04/09/rails-passenger-open-solaris-ec2/">guide</a>
-about setting up Ruby on Rails and Phusion Passenger on OpenSolaris and EC2.</p></div>
+<span class="anchor_helper" id="_step_3_installing_ruby_and_rake"></span><h4 class="float" data-anchor="_step_3_installing_ruby_and_rake">Step 3: installing Ruby and Rake</h4>
+<div class="paragraph"><p>Phusion Passenger supports multiple languages and its core is written in C++, but its installer and administration tools are written in Ruby, so you must install that.</p></div>
+<div class="paragraph"><p>Even though Ruby is required, Ruby will not be loaded during normal operation unless you deploy a Ruby web application on Phusion Passenger.</p></div>
+<div class="paragraph"><p>Run <span class="monospaced">ruby --version</span> and <span class="monospaced">rake --version</span> to find out whether both commands are already installed and recent enough. Phusion Passenger requires Ruby >= 1.8.6. Any Rake version will do.</p></div>
+<div class="paragraph">
+<div class="title">Debian 6</div>
+<p>We recommend you to use <a href="http://wiki.brightbox.co.uk/docs:phusion-passenger">the Brightbox Ruby packages</a>. They provide more up-to-date versions of Ruby than Debian’s official repositories provide. Their Ubuntu Lucid repository is compatible with Debian 6. If you do not want to use the Brightbox repository, then follow the instructions for Debian 5.</p>
 </div>
+<div class="paragraph"><p>Create <em>/etc/apt/sources.list.d/brightbox-source.list</em>:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>deb  http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu  lucid main</pre>
+</div>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_upgrading_or_downgrading_phusion_passenger" data-comment-topic="upgrading-or-downgrading-phusion-passenger-1dl8km6">2.3. Upgrading or downgrading Phusion Passenger</h3>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_via_a_gem_or_a_source_tarball" data-comment-topic="via-a-gem-or-a-source-tarball-1vgkwhs">2.3.1. Via a gem or a source tarball</h4>
-<div class="paragraph"><p>To upgrade or downgrade Phusion Passenger via the gem or the source tarball, install the newer
-or older version as you normally would; that is, install the gem or unpack the tarball, and
-run <span class="monospaced">passenger-install-apache2-module</span>. Eventually <span class="monospaced">passenger-install-apache2-module</span> will tell
-you to copy & paste some settings into the Apache configuration file; something that looks along
-the lines of:</p></div>
+<div class="paragraph"><p>Install the Brightbox APT public key:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>LoadModule passenger_module ...
-PassengerRoot ...
-PassengerRuby ...</pre>
+<pre>sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6</pre>
 </div>
 </div>
-<div class="paragraph"><p>Because you already had Phusion Passenger installed, you already had similar settings
-in your Apache configuration file, just with different values. <strong>Replace</strong> the old settings with
-the new ones that the installer outputs. It is important that the old settings are removed,
-otherwise Phusion Passenger may malfunction.</p></div>
-<div class="paragraph"><p>When you’re done, restart Apache.</p></div>
+<div class="paragraph"><p>Then install Ruby and Rake:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>sudo apt-get update
+sudo apt-get install ruby1.9.3
+sudo gem install rake</pre>
+</div>
 </div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_via_a_native_linux_package" data-comment-topic="via-a-native-linux-package-8dvooa">2.3.2. Via a native Linux package</h4>
-<div class="paragraph"><p>There are no special instructions required to upgrade or downgrade Phusion Passenger
-via a native Linux package.</p></div>
+<div class="paragraph">
+<div class="title">Debian 5</div>
+<p>Run:</p>
 </div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>sudo apt-get update
+sudo apt-get install ruby rake</pre>
+</div>
+</div>
+<div class="paragraph"><p>Then <a href="#add_rubygems_bin_dir_to_path">add the RubyGems bin directory to your $PATH</a>.</p></div>
+<div class="paragraph">
+<div class="title">Ubuntu</div>
+<p>We recommend you to use <a href="http://wiki.brightbox.co.uk/docs:phusion-passenger">the Brightbox Ruby packages</a>. They provide more up-to-date versions of Ruby than Ubuntu’s official repositories provide.</p>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_unloading_disabling_phusion_passenger_from_apache_without_uninstalling_it" data-comment-topic="unloading-disabling-phusion-passenger-from-apache-without-uninstalling-it-s1axnx">2.4. Unloading (disabling) Phusion Passenger from Apache without uninstalling it</h3>
-<div class="paragraph"><p>You can temporarily unload (disable) Phusion Passenger from Apache, without
-uninstalling the Phusion Passenger files, so that Apache behaves as if Phusion
-Passenger was never installed in the first place. This might be useful to you if,
-for example, you seem to be experiencing a problem caused by Phusion Passenger,
-but you want to make sure whether that’s actually the case, without having
-to through the hassle of uninstalling Phusion Passenger completely. When disabled,
-Phusion Passenger will not occupy any memory or CPU or otherwise interfere with
-Apache.</p></div>
-<div class="paragraph"><p>To unload Phusion Passenger from Apache, edit your Apache configuration file(s)
-and comment out:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-all Phusion Passenger configuration directives.
-</p>
-</li>
-<li>
-<p>
-the <em>LoadModule passenger_module</em> directive.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For example, if your configuration file looks like this…</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>Listen *:80
-NameVirtualHosts *:80
-....
-
-LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so
-
-PassengerRuby /usr/bin/ruby
-PassengerRoot /somewhere/passenger/x.x.x
-PassengerMaxPoolSize 10
-
-<VirtualHost *:80>
-    ServerName www.foo.com
-    DocumentRoot /webapps/foo/public
-    RailsBaseURI /rails
-</VirtualHost></pre>
+<pre>sudo apt-add-repository ppa:brightbox/passenger
+sudo apt-get update</pre>
 </div>
 </div>
-<div class="paragraph"><p>…then comment out the relevant directives, so that it looks like this:</p></div>
+<div class="paragraph"><p>If you’re on the older Ubuntu 8.04 Hardy release, the <span class="monospaced">apt-add-repository</span> command isn’t available so you have to install the repository and the key by hand:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>Listen *:80
-NameVirtualHosts *:80
-....
-
-# LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so
-
-# PassengerRuby /usr/bin/ruby
-# PassengerRoot /somewhere/passenger/x.x.x
-# PassengerMaxPoolSize 10
-
-<VirtualHost *:80>
-    ServerName www.foo.com
-    DocumentRoot /webapps/foo/public
-    # RailsBaseURI /rails
-</VirtualHost></pre>
+<pre>sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger.list'
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
+sudo apt-get update</pre>
 </div>
 </div>
-<div class="paragraph"><p>After you’ve done this, save the file and restart Apache.</p></div>
+<div class="paragraph">
+<div class="title">Other operating systems</div>
+<p>Please install Ruby from <a href="http://www.ruby-lang.org/">the Ruby website</a>. Once Ruby is installed, run the following command (<a href="#is_ruby_home_or_system_wide_installed">possibly as root</a>) to install Rake:</p>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_uninstalling_phusion_passenger" data-comment-topic="uninstalling-phusion-passenger-1qb4ssq">2.5. Uninstalling Phusion Passenger</h3>
-<div class="paragraph"><p>To uninstall Phusion Passenger, please first remove all Phusion Passenger
-configuration directives from your Apache configuration file(s). After you’ve
-done this, you need to remove the Phusion Passenger files.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-If you installed Phusion Passenger via a gem, then type <span class="monospaced">gem uninstall passenger</span>.
-  You might have to run this as root.
-</p>
-</li>
-<li>
-<p>
-If you installed Phusion Passenger via a source tarball, then remove the directory
-  in which you placed the extracted Phusion Passenger files. This directory is the
-  same as the one pointed to the by <em>PassengerRoot</em> configuration directive.
-</p>
-</li>
-<li>
-<p>
-If you installed Phusion Passenger via a Debian package, then remove type
-  <span class="monospaced">sudo apt-get remove libapache2-mod-passenger</span>.
-</p>
-</li>
-</ul></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>gem install rake</pre>
+</div>
 </div>
+<span class="anchor_helper" id="_step_4_figuring_out_whether_your_ruby_is_installed_the_home_directory_or_system_wide"></span><h4 class="float" data-anchor="_step_4_figuring_out_whether_your_ruby_is_installed_the_home_directory_or_system_wide">Step 4: figuring out whether your Ruby is installed the home directory or system-wide</h4>
+<div class="paragraph"><p>Depending on whether you installed Ruby system-wide, you need to enter a root prompt before continuing to step 5. Please refer to <a href="#is_ruby_home_or_system_wide_installed">this section</a>.</p></div>
+<span class="anchor_helper" id="_step_5_run_the_phusion_passenger_installer"></span><h4 class="float" data-anchor="_step_5_run_the_phusion_passenger_installer">Step 5: run the Phusion Passenger installer</h4>
+<div class="paragraph"><p>Please refer to <a href="#run_passenger_installer">this section</a>.
+Note that the <span class="monospaced">passenger-install-apache2-module</span> command is inside the <em>bin</em> subdirectory of the Phusion Passenger source directory, so you would have to run something like <em>/opt/passenger/passenger-x.x.x/bin/passenger-install-apache2-module</em>.</p></div>
+<span class="anchor_helper" id="_step_6_restarting_the_flying_passenger_daemon_2"></span><h4 class="float" data-anchor="_step_6_restarting_the_flying_passenger_daemon_2">Step 6: Restarting the Flying Passenger daemon</h4>
+<div class="paragraph"><p>If you are using <a href="#flying_passenger">Flying Passenger</a> then you must restart the Flying Passenger daemon by sending it the SIGTERM signal:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>kill `cat /path-to/flying-passenger.pid`</pre>
+</div>
 </div>
+<div class="paragraph"><p>Or, if Flying Passenger is not running with a PID file, look up its PID us <span class="monospaced">ps</span> and then send it SIGTERM:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>ps auxw | grep flying-passenger
+kill PID_OF_FLYING_PASSENGER</pre>
+</div>
 </div>
-<div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_deploying_a_ruby_on_rails_1_x_or_2_x_but_not_rails_gt_3_x_application" data-comment-topic="deploying-a-ruby-on-rails-1-x-or-2-x-but-not-rails-3-x-application-9r92hi">3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3.x) application</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Suppose you have a Ruby on Rails application in <em>/webapps/mycook</em>, and you own
-the domain <em>www.mycook.com</em>. You can either deploy your application to the
-virtual host’s root (i.e. the application will be accessible from the root URL,
-<em>http://www.mycook.com/</em>), or in a sub URI (i.e. the application will be
-accessible from a sub URL, such as <em>http://www.mycook.com/railsapplication</em>).</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<img src="./images/icons/note.png" alt="Note">
-</td>
-<td class="content">The default <span class="monospaced">RAILS_ENV</span> environment in which deployed Rails applications
-are run, is “production”. You can change this by changing the
-<a href="#rails_env"><em>RailsEnv</em></a> configuration option.</td>
-</tr></table>
+<span class="anchor_helper" id="_step_7_verifying_that_phusion_passenger_is_running"></span><h4 class="float" data-anchor="_step_7_verifying_that_phusion_passenger_is_running">Step 7: Verifying that Phusion Passenger is running</h4>
+<div class="paragraph"><p>Please refer to <a href="#verify_passenger_running">this section</a>. Note that all Phusion Passenger administration scripts are located inside the <em>bin</em> subdirectory of the Phusion Passenger source directory, so you would have to run something like <em>/opt/passenger/passenger-x.x.x/bin/passenger-memory-stats</em>.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_deploying_to_a_virtual_host_8217_s_root" data-comment-topic="deploying-to-a-virtual-host-s-root-zzo4v7">3.1. Deploying to a virtual host’s root</h3>
-<div class="paragraph"><p>Add a virtual host entry to your Apache configuration file. Make sure that the
-following conditions are met:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The virtual host’s document root must point to your Ruby on Rails application’s
-  <em>public</em> folder.
-</p>
-</li>
-<li>
-<p>
-The Apache per-directory permissions must allow access to this folder.
-</p>
-</li>
-<li>
-<p>
-MultiViews must be disabled for this folder.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For example:</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="install_on_debian_ubuntu"></span><h3 data-comment-topic="installing-or-upgrading-on-ubuntu-1xg22xs" data-anchor="install_on_debian_ubuntu">2.4. Installing or upgrading on Debian 6 or Ubuntu</h3>
+<div class="paragraph"><p>John Leach from Brightbox has kindly provided Ubuntu packages for Phusion Passenger. The Ubuntu Lucid packages are compatible with Debian 6. The packages are available from the <a href="http://wiki.brightbox.co.uk/docs:phusion-passenger">Brightbox repository</a>. Only packages for the open source version of Phusion Passenger are provided. <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> customers should use the <a href="#rub [...]
+<div class="paragraph"><p>If you use these packages to install Phusion Passenger then you do not need to run <span class="monospaced">passenger-install-apache2-module</span> or <span class="monospaced">passenger-install-nginx-module</span>. These packages contain all the binaries that you need.</p></div>
+<div class="paragraph">
+<div class="title">Apache</div>
+<p>On Ubuntu versions newer than 8.04 Hardy, register the Brightbox Apache PPA as follows:</p>
+</div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre><VirtualHost *:80>
-    ServerName www.mycook.com
-    DocumentRoot /webapps/mycook/public
-    <Directory /webapps/mycook/public>
-        Allow from all
-        Options -MultiViews
-    </Directory>
-</VirtualHost></pre>
+<pre>sudo apt-add-repository ppa:brightbox/passenger-experimental
+sudo apt-get update</pre>
 </div>
 </div>
-<div class="paragraph"><p>You may also need to tweak your file/folder permissions. Make sure that the
-following folders are readable and executable by Apache:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-this <em>public</em> folder.
-</p>
-</li>
-<li>
-<p>
-the application’s <em>config</em> folder.
-</p>
-</li>
-<li>
-<p>
-all parent folders. That is, /webapps/mycook and /webapps must also be readable and executable by Apache.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Then restart Apache. The application has now been deployed.</p></div>
-</div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="deploying_rails_to_sub_uri" data-comment-topic="deploying-to-a-sub-uri-zekba6">3.2. Deploying to a sub URI</h3>
-<div class="paragraph"><p>Suppose that you already have a virtual host:</p></div>
+<div class="paragraph"><p>On Ubuntu 8.04 Hardy and on Debian, the <span class="monospaced">apt-add-repository</span> command isn’t available so you have to install the repository and the key by hand.</p></div>
+<div class="paragraph"><p>Debian 6:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre><VirtualHost *:80>
-    ServerName www.phusion.nl
-    DocumentRoot /websites/phusion
-    <Directory /websites/phusion>
-        Allow from all
-    </Directory>
-</VirtualHost></pre>
+<pre>sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu lucid main" > /etc/apt/sources.list.d/brightbox-passenger.list'
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
+sudo apt-get update</pre>
 </div>
 </div>
-<div class="paragraph"><p>And you want your Ruby on Rails application to be accessible from the URL
-<em>http://www.phusion.nl/rails</em>.</p></div>
-<div class="paragraph"><p>To do this, make a symlink in the virtual host’s document root, and have it
-point to your Ruby on Rails application’s <em>public</em> folder. For example:</p></div>
+<div class="paragraph"><p>Ubuntu 8.04 Hardy:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>ln -s /webapps/mycook/public /websites/phusion/rails</pre>
+<pre>sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger.list'
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
+sudo apt-get update</pre>
 </div>
 </div>
-<div class="paragraph"><p>Next, add a <a href="#RailsBaseURI">RailsBaseURI</a> option to the virtual host configuration,
-and also make sure that:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The Apache per-directory permissions allow access to this folder.
-</p>
-</li>
-<li>
-<p>
-MultiViews is disabled for this folder.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For example:</p></div>
+<div class="paragraph"><p>You can proceed with installing Phusion Passenger by running:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre><VirtualHost *:80>
-    ServerName www.phusion.nl
-    DocumentRoot /websites/phusion
-    <Directory /websites/phusion>
-        Allow from all
-    </Directory>
-
-    RailsBaseURI /rails                   # <-- These lines have
-    <Directory /websites/phusion/rails>   # <-- been added.
-        Options -MultiViews               # <--
-    </Directory>                          # <--
-</VirtualHost></pre>
+<pre>sudo apt-get install libapache2-mod-passenger</pre>
 </div>
 </div>
-<div class="paragraph"><p>Then restart Apache. The application has now been deployed.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<img src="./images/icons/note.png" alt="Note">
-</td>
-<td class="content">If you’re deploying to a sub-URI then please make sure that your view
-templates correctly handles references to sub-URI static assets! Otherwise
-you may find broken links to images, CSS files, JavaScripts, etc. Please read
-<a href="#sub_uri_deployment_uri_fix">How to fix broken images/CSS/JavaScript URIs in sub-URI deployments</a>
-for more information.</td>
-</tr></table>
+<div class="paragraph"><p>The Apache package provides configuration snippets for you, so you don’t need to modify any Apache configuration to get it to load Phusion Passenger.</p></div>
+<div class="paragraph">
+<div class="title">Nginx</div>
+<p>On Ubuntu versions newer than 8.04 Hardy, register the Brightbox Apache PPA as follows:</p>
 </div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<img src="./images/icons/tip.png" alt="Tip">
-</td>
-<td class="content">
-<div class="paragraph"><p>You can deploy multiple Rails applications under a virtual host, by specifying
-<a href="#RailsBaseURI">RailsBaseURI</a> multiple times. For example:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre><VirtualHost *:80>
-    ....
-    RailsBaseURI /app1
-    RailsBaseURI /app2
-    RailsBaseURI /app3
-</VirtualHost></pre>
+<pre>sudo apt-add-repository ppa:brightbox/passenger-experimental
+sudo apt-get update</pre>
 </div>
 </div>
-</td>
-</tr></table>
+<div class="paragraph"><p>On Ubuntu 8.04 Hardy and on Debian, the <span class="monospaced">apt-add-repository</span> command isn’t available so you have to install the repository and the key by hand.</p></div>
+<div class="paragraph"><p>Debian 6:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu lucid main" > /etc/apt/sources.list.d/brightbox-passenger-nginx.list'
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
+sudo apt-get update</pre>
+</div>
 </div>
+<div class="paragraph"><p>Ubuntu 8.04 Hardy:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger-nginx.list'
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
+sudo apt-get update</pre>
+</div>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_redeploying_restarting_the_ruby_on_rails_application" data-comment-topic="redeploying-restarting-the-ruby-on-rails-application--m5zqc6">3.3. Redeploying (restarting the Ruby on Rails application)</h3>
-<div class="paragraph"><p>Deploying a new version of a Ruby on Rails application is as simple as
-re-uploading the application files, and restarting the application.</p></div>
-<div class="paragraph"><p>There are two ways to restart the application:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-By restarting Apache.
-</p>
-</li>
-<li>
-<p>
-By creating or modifying the file <em>tmp/restart.txt</em> in the Rails
-   application’s <a href="#application_root">root folder</a>. Phusion Passenger will
-   automatically restart the application during the next request.
-</p>
-</li>
-</ol></div>
-<div class="paragraph"><p>For example, to restart our example MyCook application, we type this in the
-command line:</p></div>
+<div class="paragraph"><p>Then:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>touch /webapps/mycook/tmp/restart.txt</pre>
+<pre>sudo apt-get install nginx-full</pre>
 </div>
 </div>
-<div class="paragraph"><p>Please note that, unlike earlier versions of Phusion Passenger, <em>restart.txt</em>
-is not automatically deleted. Phusion Passenger checks whether the timestamp
-of this file has changed in order to determine whether the application should
-be restarted.</p></div>
+<div class="paragraph"><p>You’ll then need to enable the Phusion Passenger module in Nginx by creating the following configuration file:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>sudo sh -c 'echo "passenger_root /usr/lib/phusion-passenger;" > /etc/nginx/conf.d/passenger.conf'</pre>
+</div>
+</div>
+<div class="paragraph"><p>Then restart Nginx to apply the changes:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>sudo /etc/init.d/nginx restart</pre>
+</div>
+</div>
+<div class="paragraph">
+<div class="title">Standalone</div>
+<p>Unfortunately, no packages are provided for Phusion Passenger Standalone.</p>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_migrations" data-comment-topic="migrations-15238b4">3.4. Migrations</h3>
-<div class="paragraph"><p>Phusion Passenger is not related to Ruby on Rails migrations in any way. To
-run migrations on your deployment server, please login to your deployment
-server (e.g. with <em>ssh</em>) and type <span class="monospaced">rake db:migrate RAILS_ENV=production</span> in
-a shell console, just like one would normally run migrations.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_capistrano_integration" data-comment-topic="capistrano-integration-1o4cbyq">3.5. Capistrano integration</h3>
-<div class="paragraph"><p>See <a href="#capistrano">Capistrano recipe</a>.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installing_or_upgrading_on_red_hat_fedora_centos_or_scientificlinux"></span><h3 data-comment-topic="installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-1y5ie8b" data-anchor="_installing_or_upgrading_on_red_hat_fedora_centos_or_scientificlinux">2.5. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux</h3>
+<div class="paragraph"><p>YUM repositories with RPMs are maintained by <a href="https://github.com/erikogan/passenger">Erik Ogan</a> and <a href="http://stealthymonkeys.com/">Stealthy Monkeys Consulting</a>. Only packages for the open source version of Phusion Passenger are provided. <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> customers should use the <a href="#rubygems_generic_install">generic RubyGems installation method</a> or <a href="#tarba [...]
+<div class="paragraph"><p>If you use YUM to install Phusion Passenger then you do not need to run <span class="monospaced">passenger-install-apache2-module</span> or <span class="monospaced">passenger-install-nginx-module</span>. The YUM packages contain all the binaries that you need. You also don’t need to modify any Apache or Nginx configuration to get them to load Phusion Passenger, the packages provide configuration snippets for you as well.</p></div>
+<span class="anchor_helper" id="_step_1_import_the_stealthy_monkeys_consulting_8217_s_gpg_key"></span><h4 class="float" data-anchor="_step_1_import_the_stealthy_monkeys_consulting_8217_s_gpg_key">Step 1: Import the Stealthy Monkeys Consulting’s GPG key</h4>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>rpm --import http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc</pre>
+</div>
 </div>
+<span class="anchor_helper" id="_step_2_install_the_release_package"></span><h4 class="float" data-anchor="_step_2_install_the_release_package">Step 2: Install the release package</h4>
+<div class="paragraph"><p>Install the passenger-release package from the <a href="http://passenger.stealthymonkeys.com/">main repository</a>.</p></div>
+<div class="paragraph"><p>Fedora Core 17:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>yum install http://passenger.stealthymonkeys.com/fedora/17/passenger-release.noarch.rpm</pre>
+</div>
 </div>
+<div class="paragraph"><p>Fedora Core 16:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>yum install http://passenger.stealthymonkeys.com/fedora/16/passenger-release.noarch.rpm</pre>
+</div>
 </div>
-<div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_deploying_a_rack_based_ruby_application_including_rails_gt_3" data-comment-topic="deploying-a-rack-based-ruby-application-including-rails-3--hcs66f">4. Deploying a Rack-based Ruby application (including Rails >= 3)</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Phusion Passenger supports arbitrary Ruby web applications that follow the
-<a href="http://rack.rubyforge.org/">Rack</a> interface.</p></div>
-<div class="paragraph"><p>Phusion Passenger assumes that Rack application directories have a certain layout.
-Suppose that you have a Rack application in <em>/webapps/rackapp</em>. Then that
-folder must contain at least three entries:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<em>config.ru</em>, a Rackup file for starting the Rack application. This file must contain
-  the complete logic for initializing the application.
-</p>
-</li>
-<li>
-<p>
-<em>public/</em>, a folder containing public static web assets, like images and stylesheets.
-</p>
-</li>
-<li>
-<p>
-<em>tmp/</em>, used for <em>restart.txt</em> (our application restart mechanism). This will
-  be explained in a following subsection.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>So <em>/webapps/rackapp</em> must, at minimum, look like this:</p></div>
+<div class="paragraph"><p>Fedora Core 15:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>/webapps/rackapp
-  |
-  +-- config.ru
-  |
-  +-- public/
-  |
-  +-- tmp/</pre>
+<pre>yum install http://passenger.stealthymonkeys.com/fedora/15/passenger-release.noarch.rpm</pre>
 </div>
 </div>
-<div class="paragraph"><p>Suppose you own the domain <em>www.rackapp.com</em>. You can either deploy your application
-to the virtual host’s root (i.e. the application will be accessible from the root URL,
-<em>http://www.rackapp.com/</em>), or in a sub URI (i.e. the application will be
-accessible from a sub URL, such as <em>http://www.rackapp.com/rackapp</em>).</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<img src="./images/icons/note.png" alt="Note">
-</td>
-<td class="content">The default <span class="monospaced">RACK_ENV</span> environment in which deployed Rack applications
-are run, is “production”. You can change this by changing the
-<a href="#rack_env"><em>RackEnv</em></a> configuration option.</td>
-</tr></table>
+<div class="paragraph"><p>Fedora Core 14:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>yum install http://passenger.stealthymonkeys.com/fedora/14/passenger-release.noarch.rpm</pre>
+</div>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_tutorial_example_writing_and_deploying_a_hello_world_rack_application" data-comment-topic="tutorial-example-writing-and-deploying-a-hello-world-rack-application-axp5z5">4.1. Tutorial/example: writing and deploying a Hello World Rack application</h3>
-<div class="paragraph"><p>First we create a Phusion Passenger-compliant Rack directory structure:</p></div>
+<div class="paragraph"><p>RHEL 6 / CentOS 6 / ScientificLinux 6: (Note: these packages depend on <a href="http://fedoraproject.org/wiki/EPEL">EPEL</a>.)</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>$ mkdir /webapps/rack_example
-$ mkdir /webapps/rack_example/public
-$ mkdir /webapps/rack_example/tmp</pre>
+<pre>yum install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm</pre>
 </div>
 </div>
-<div class="paragraph"><p>Next, we write a minimal "hello world" Rack application:</p></div>
+<div class="paragraph"><p>RHEL 5 / CentOS 5 / ScientificLinux 5: (Note: these packages depend on <a href="http://fedoraproject.org/wiki/EPEL">EPEL</a>.)</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>$ cd /webapps/rack_example
-$ some_awesome_editor config.ru
-...type in some source code...
-$ cat config.ru
-app = proc do |env|
-    [200, { "Content-Type" => "text/html" }, ["hello <b>world</b>"]]
-end
-run app</pre>
+<pre>rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm</pre>
 </div>
 </div>
-<div class="paragraph"><p>Finally, we deploy it by adding the following configuration options to
-the Apache configuration file:</p></div>
+<span class="anchor_helper" id="_step_3_install_the_right_phusion_passenger_package"></span><h4 class="float" data-anchor="_step_3_install_the_right_phusion_passenger_package">Step 3: Install the right Phusion Passenger package</h4>
+<div class="paragraph"><p>From there you can use <a href="http://prefetch.net/articles/yum.html">YUM</a> to install packages. For example, try one of these:</p></div>
+<div class="paragraph"><p>Phusion Passenger for Apache:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre><VirtualHost *:80>
-    ServerName www.rackexample.com
-    DocumentRoot /webapps/rack_example/public
-    <Directory /webapps/rack_example/public>
-        Allow from all
-        Options -MultiViews
-    </Directory>
-</VirtualHost></pre>
+<pre>yum install mod_passenger</pre>
 </div>
 </div>
-<div class="paragraph"><p>And we’re done! After an Apache restart, the above Rack application will be available
-under the URL <em>http://www.rackexample.com/</em>.</p></div>
+<div class="paragraph"><p>Phusion Passenger for Nginx:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>yum install nginx-passenger</pre>
+</div>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_deploying_to_a_virtual_host_8217_s_root_2" data-comment-topic="deploying-to-a-virtual-host-s-root-ab4zj6">4.2. Deploying to a virtual host’s root</h3>
-<div class="paragraph"><p>Add a virtual host entry to your Apache configuration file. Make sure that the
-following conditions are met:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The virtual host’s document root must point to your Rack application’s
-  <em>public</em> folder.
-</p>
-</li>
-<li>
-<p>
-The Apache per-directory permissions must allow access to this folder.
-</p>
-</li>
-<li>
-<p>
-MultiViews must be disabled for this folder.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For example:</p></div>
+<div class="paragraph"><p>Phusion Passenger Standalone:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre><VirtualHost *:80>
-    ServerName www.rackapp.com
-    DocumentRoot /webapps/rackapp/public
-    <Directory /webapps/rackapp/public>
-        Allow from all
-        Options -MultiViews
-    </Directory>
-</VirtualHost></pre>
+<pre>yum install passenger-standalone</pre>
 </div>
 </div>
-<div class="paragraph"><p>You may also need to tweak your file/folder permissions. Make sure that the
-following folders are readable and executable by Apache:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-this <em>public</em> folder.
-</p>
-</li>
+<span class="anchor_helper" id="_building_your_own_packages"></span><h4 class="float" data-anchor="_building_your_own_packages">Building your own packages</h4>
+<div class="paragraph"><p>There are instructions for building your own packages and Yum repositories in the <a href="https://github.com/FooBarWidget/passenger/tree/master/rpm#readme">rpm directory ReadMe</a> within the <a href="https://github.com/FooBarWidget/passenger">GitHub repository</a>.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_upgrading_from_open_source_to_enterprise"></span><h3 data-comment-topic="upgrading-from-open-source-to-enterprise-b17h8g" data-anchor="_upgrading_from_open_source_to_enterprise">2.6. Upgrading from open source to Enterprise</h3>
+<div class="paragraph"><p>Phusion Passenger comes in two variants: an open source version, as well as an <a href="https://www.phusionpassenger.com/enterprise">Enterprise version</a> which introduces a myriad of useful features that can improve stability and performance and efficiency.</p></div>
+<div class="paragraph"><p>Customers who have bought Phusion Passenger Enterprise can upgrade their open source installation to Enterprise as follows:</p></div>
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
-the application’s <em>config</em> folder.
+<a href="#uninstalling">Uninstall the open source Phusion Passenger</a>.
 </p>
 </li>
 <li>
 <p>
-all parent folders. That is, /webapps/rackapp and /webapps must also be readable and executable by Apache.
+Install the Enterprise version by following one of the installation guides in this section (e.g. <a href="#rubygems_generic_install">RubyGems generic installation</a> or <a href="#tarball_generic_install">tarball generic installation</a>).
 </p>
 </li>
-</ul></div>
-<div class="paragraph"><p>Then restart Apache. The application has now been deployed.</p></div>
+</ol></div>
+<div class="paragraph"><p>The uninstallation is necessary because the Enterprise Ruby gem has a different gem name (<em>passenger-enterprise-server</em> instead of <em>passenger</em>), but the same administration command names (e.g. <span class="monospaced">passenger-status</span>). Uninstalling the open source version avoids any conflicts.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="deploying_rack_to_sub_uri" data-comment-topic="deploying-to-a-sub-uri-13rfygg">4.3. Deploying to a sub URI</h3>
-<div class="paragraph"><p>Suppose that you already have a virtual host:</p></div>
-<div class="listingblock">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_cryptographic_verification_of_installation_files"></span><h3 data-comment-topic="cryptographic-verification-of-installation-files-ed3r9v" data-anchor="_cryptographic_verification_of_installation_files">2.7. Cryptographic verification of installation files</h3>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_synopsis_2"></span><h4 data-comment-topic="synopsis-uwnz2o" data-anchor="_synopsis_2">2.7.1. Synopsis</h4>
+<div class="paragraph"><p>We digitally sign various files with our GPG key so that you can check whether they’re legit, i.e. whether they really came from Phusion and haven’t been tampered with by a third party. We apply signing since the open source version 4.0.0 RC 4, or the Enterprise version 4.0.0 RC 1.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_importing_the_phusion_software_signing_key"></span><h4 data-comment-topic="importing-the-phusion-software-signing-key-1x0rhv" data-anchor="_importing_the_phusion_software_signing_key">2.7.2. Importing the Phusion Software Signing key</h4>
+<div class="paragraph"><p>Phusion’s GPG key for signing software is as follows:</p></div>
+<div class="literalblock">
 <div class="content monospaced">
-<pre><VirtualHost *:80>
-    ServerName www.phusion.nl
-    DocumentRoot /websites/phusion
-    <Directory /websites/phusion>
-        Allow from all
-    </Directory>
-</VirtualHost></pre>
+<pre>Phusion Software Signing (software-signing at phusion.nl)
+Short key ID: 0x0A212A8C
+Long key ID: 0x2AC745A50A212A8C
+Fingerprint: D5F0 8514 2693 9232 F437  AB72 2AC7 45A5 0A21 2A8C</pre>
 </div>
 </div>
-<div class="paragraph"><p>And you want your Rack application to be accessible from the URL
-<em>http://www.phusion.nl/rack</em>.</p></div>
-<div class="paragraph"><p>To do this, make a symlink in the virtual host’s document root, and have it
-point to your Rack application’s <em>public</em> folder. For example:</p></div>
+<div class="paragraph"><p>This key is stored at <a href="http://www.phusion.nl/about/gpg">the Phusion website</a> and at the key servers <a href="http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x2AC745A50A212A8C">sks-keyservers.net</a> and <a href="http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2AC745A50A212A8C">keyserver.ubuntu.com</a>. You can import it to your keyring with one of these command:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>ln -s /webapps/rackapp/public /websites/phusion/rack</pre>
+<pre>gpg --keyserver pool.sks-keyservers.net --search-keys 0x2AC745A50A212A8C
+# -OR-
+gpg --keyserver keyserver.ubuntu.com --search-keys 0x2AC745A50A212A8C</pre>
 </div>
 </div>
-<div class="paragraph"><p>Next, add a <a href="#RackBaseURI">RackBaseURI</a> option to the virtual host configuration,
-and also make sure that:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The Apache per-directory permissions allow access to this folder.
+<div class="paragraph"><p>The Phusion Software Signing key is only used for signing software. It’s never used for signing emails or for encrypting files, so please be suspicious if you encounter usage of this key outside the context of signing software, and alert us at <a href="mailto:support at phusion.nl">support at phusion.nl</a>. Include "notspam" in the message to bypass our spam filter.</p></div>
+<div class="paragraph"><p>The email address <a href="mailto:software-signing at phusion.nl">software-signing at phusion.nl</a> redirects to <a href="mailto:info at phusion.nl">info at phusion.nl</a> so it’s safe to send email there.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_the_phusion_software_signing_key"></span><h4 data-comment-topic="verifying-the-phusion-software-signing-key-10430lg" data-anchor="_verifying_the_phusion_software_signing_key">2.7.3. Verifying the Phusion Software Signing key</h4>
+<div class="paragraph"><p>The Phusion Software Signing key is also <strong>signed by the Phusion founders</strong>. Their keys are as follows:</p></div>
+<div class="literalblock">
+<div class="content monospaced">
+<pre>Hongli Lai (hongli at phusion.nl)
+Short key ID: 4B6F4332
+Long key ID: 06A131094B6F4332
+Fingerprint: 64E8 0420 FC6A 499F 9E1F  81FA 06A1 3109 4B6F 4332</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content monospaced">
+<pre>Ninh Bui (ninh at phusion.nl)
+Short key ID: 6FAF3782
+Long key ID: BA8DA3F46FAF3782
+Fingerprint: 353A 398C 49AF 5CD5 74A0  656C BA8D A3F4 6FAF 3782</pre>
+</div>
+</div>
+<div class="paragraph"><p>Both keys are stored at both sks-servers.net and keyserver.ubuntu.com. Import them with:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>gpg --keyserver pool.sks-servers.net --search-keys 0x06A131094B6F4332
+gpg --keyserver pool.sks-servers.net --search-keys 0xBA8DA3F46FAF3782
+# -OR-
+gpg --keyserver keyserver.ubuntu.com --search-keys 0x06A131094B6F4332
+gpg --keyserver keyserver.ubuntu.com --search-keys 0xBA8DA3F46FAF3782</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_the_gem_and_tarball"></span><h4 data-comment-topic="verifying-the-gem-and-tarball-1nf0uov" data-anchor="_verifying_the_gem_and_tarball">2.7.4. Verifying the gem and tarball</h4>
+<div class="paragraph"><p>You can find the open source version’s gem and tarball GPG signatures at <a href="https://www.phusionpassenger.com/signatures/">https://www.phusionpassenger.com/signatures/</a>. The Enterprise version’s GPG signatures can be found in the <a href="https://www.phusionpassenger.com/orders">Customer Area</a>. All signatures have the <em>.asc</em> extension. Once you have imported our key, you can verify the validity of a file against its signature as follows:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ gpg --verify passenger-x.x.x.tar.gz.asc passenger-x.x.x.tar.gz
+gpg: Signature made Mon Mar 11 09:45:46 2013 CET using RSA key ID 0A212A8C
+gpg: Good signature from "Phusion Software Signing <software-signing at phusion.nl>"</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_git_signatures"></span><h4 data-comment-topic="verifying-git-signatures-oaafwd" data-anchor="_verifying_git_signatures">2.7.5. Verifying Git signatures</h4>
+<div class="paragraph"><p>Tags in the <a href="https://github.com/FooBarWidget/passenger">Git repository for the open source version</a> are also tagged. You can verify a Git tag as follows:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ git tag --verify release-x.x.x
+object d886f34b5705e4314feccaf0d77b9a38416e15e0
+type commit
+tag release-4.0.0.rc5
+tagger Hongli Lai (Phusion) <hongli at phusion.nl> 1362993117 +0100
+
+This is a tag message.
+gpg: Signature made Mon Mar 11 10:12:02 2013 CET using RSA key ID 0A212A8C
+gpg: Good signature from "Phusion Software Signing <software-signing at phusion.nl>"</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_deb_and_rpm_packages"></span><h4 data-comment-topic="verifying-deb-and-rpm-packages-vgtv04" data-anchor="_verifying_deb_and_rpm_packages">2.7.6. Verifying DEB and RPM packages</h4>
+<div class="paragraph"><p>The DEB and RPM packages are signed with the signatures of the respective packagers. Phusion does not provide signatures for them.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_revocation"></span><h4 data-comment-topic="revocation-4o01n2" data-anchor="_revocation">2.7.7. Revocation</h4>
+<div class="paragraph"><p>In the event our key is compromised, we will revoke the key and upload the revocation information to sks-servers.net and keyserver.ubuntu.com. However your system will not know about the revocation until you update the keys from the keyservers. You should update your keys regularly (e.g. once a week) by invoking:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>gpg --refresh-keys --keyserver pool.sks-servers.net
+# -OR-
+gpg --refresh-keys --keyserver keyserver.ubuntu.com</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_non_interactive_automatic_headless_installs_or_upgrades"></span><h3 data-comment-topic="non-interactive-automatic-headless-installs-or-upgrades-1arnxii" data-anchor="_non_interactive_automatic_headless_installs_or_upgrades">2.8. Non-interactive, automatic, headless installs or upgrades</h3>
+<div class="paragraph"><p>By default, the installer (<span class="monospaced">passenger-install-apache2-module</span>) is interactive. If you want to automate installation then you can do so by passing <span class="monospaced">--auto</span> to the installer. See also <span class="monospaced">passenger-install-apache2-module --help</span> for more options.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_customizing_the_compilation_process"></span><h3 data-comment-topic="customizing-the-compilation-process-1sds3od" data-anchor="_customizing_the_compilation_process">2.9. Customizing the compilation process</h3>
+<div class="paragraph"><p>The Phusion Passenger compilation process can be customized with environment variables. You can learn more about environment variables in <a href="#about_environment_variables">About environment variables</a>.</p></div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_setting_the_compiler"></span><h4 data-comment-topic="setting-the-compiler-1symq7h" data-anchor="_setting_the_compiler">2.9.1. Setting the compiler</h4>
+<div class="paragraph"><p>You can force the Phusion Passenger build system to use a specific C or C++ compiler by setting the <span class="monospaced">CC</span> and <span class="monospaced">CXX</span> environment variables. These may be set to any arbitrary shell commands.</p></div>
+<div class="paragraph"><p>For example, contributors who want to hack on Phusion Passenger may want to use Clang for faster compilation and <a href="http://ccache.samba.org/">ccache</a> for faster recompilation, and may want to enable more error-catching compilation flags:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">CC</span><span style="color: #990000">=</span><span style="color: #FF0000">'ccache clang -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'</span>
+<span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">CXX</span><span style="color: #990000">=</span><span style="color: #FF0000">'ccache clang++ -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'</span></tt></pre>
+</div>
+</div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">If you run the installer with <span class="monospaced">sudo</span> then environment variables may not be passed properly. Learn more at <a href="#env_vars_and_sudo">Environment variables and sudo</a>.</td>
+</tr></table>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_adding_additional_compiler_or_linker_flags"></span><h4 data-comment-topic="adding-additional-compiler-or-linker-flags-wzu0ey" data-anchor="_adding_additional_compiler_or_linker_flags">2.9.2. Adding additional compiler or linker flags</h4>
+<div class="paragraph"><p>On some systems, C/C++ libraries and headers that Phusion Passenger requires may be located in a non-standard directory. You can force the Phusion Passenger build system to look in those locations by injecting compiler and linker flags using the following environment variables:</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+<span class="monospaced">EXTRA_PRE_CFLAGS</span>
+</dt>
+<dd>
+<p>
+        These flags are injected into all C compiler invocations that involve compiling C or C++ source files. This includes compiler invocations that compile <strong>and</strong> link. The flags are injected at the beginning of the command string, even before <span class="monospaced">EXTRA_PRE_LDFLAGS</span>.
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">EXTRA_CFLAGS</span>
+</dt>
+<dd>
+<p>
+        Similar to <span class="monospaced">EXTRA_PRE_CFLAGS</span>, but injected at the end of the command string, before <span class="monospaced">EXTRA_LDFLAGS</span>.
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">EXTRA_PRE_CXXFLAGS</span>
+</dt>
+<dd>
+<p>
+        Similar to <span class="monospaced">EXTRA_PRE_CFLAGS</span>, but for C++ compiler invocations.
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">EXTRA_CXXFLAGS</span>
+</dt>
+<dd>
+<p>
+        Similar to <span class="monospaced">EXTRA_CFLAGS</span>, but for C++ compiler invocations.
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">EXTRA_PRE_LDFLAGS</span>
+</dt>
+<dd>
+<p>
+        These flags are injected into all C/C++ compiler invocations that involve linking. This includes compiler invocations that compile <strong>and</strong> link. The flags are injected at the beginning of the command string, but after <span class="monospaced">EXTRA_PRE_CFLAGS</span> and <span class="monospaced">EXTRA_PRE_CXXFLAGS</span>.
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">EXTRA_LDFLAGS</span>
+</dt>
+<dd>
+<p>
+        Similar to <span class="monospaced">EXTRA_PRE_LDFLAGS</span>, but injected at the very end of the command string, even after <span class="monospaced">EXTRA_CFLAGS</span> and <span class="monospaced">EXTRA_CXXFLAGS</span>.
+</p>
+</dd>
+</dl></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">If you run the installer with <span class="monospaced">sudo</span> then environment variables may not be passed properly. Learn more at <a href="#env_vars_and_sudo">Environment variables and sudo</a>.</td>
+</tr></table>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_forcing_location_of_command_line_tools_and_dependencies"></span><h4 data-comment-topic="forcing-location-of-certain-command-line-tools-1hym30u" data-anchor="_forcing_location_of_command_line_tools_and_dependencies">2.9.3. Forcing location of command line tools and dependencies</h4>
+<div class="paragraph"><p>The Phusion Passenger build system attempts to autodetect many things by locating relevant helper tools. For example, to find out which compiler flags it should use for compiling Apache modules, it locates the <span class="monospaced">apxs2</span> command and queries it. To find out which compiler flags it should use for libcurl, it queries the <span class="monospaced">curl-config</span> command. These commands may not be in <span class="monospaced">$PATH</span> [...]
+<div class="paragraph"><p>You can force the build to find certain command line tools at certain locations by using the following environment variables:</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+<span class="monospaced">HTTPD</span>
+</dt>
+<dd>
+<p>
+        The location of the <span class="monospaced">httpd</span> executable (the Apache server executable).
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">APXS2</span>
+</dt>
+<dd>
+<p>
+        The location of the <span class="monospaced">apxs2</span> executable (the Apache module developer tool). Only used by <span class="monospaced">passenger-install-apache2-module</span>.
+</p>
+<div class="paragraph"><p>This environment variable, together with <span class="monospaced">HTTPD</span>, are what you need to customize if you have multiple Apache installations on your system, or if your Apache is located in a non-standard location which Phusion Passenger cannot detect. By setting <span class="monospaced">APXS2</span> and <span class="monospaced">HTTP</span> to the right paths, you can force Phusion Passenger to be compiled against that specific Apache installation.</p [...]
+<div class="paragraph"><p>For example, if your Apache installation is located in <span class="monospaced">/opt/lamp/apache2</span>, then you can run the installer as follows:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo bash
+# export HTTPD=/opt/lampp/apache2/bin/apache
+# export APXS2=/opt/lampp/apache2/bin/apxs
+# passenger-install-apache2-module</pre>
+</div>
+</div>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">APR_CONFIG</span>
+</dt>
+<dd>
+<p>
+        The location of the <span class="monospaced">apr-config</span> executable (the Apache Portable Runtime developer tool).
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">APU_CONFIG</span>
+</dt>
+<dd>
+<p>
+        The location of the <span class="monospaced">apu-config</span> executable (the Apache Portable Runtime Utility developer tool).
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">MAKE</span>
+</dt>
+<dd>
+<p>
+        The location of a <span class="monospaced">make</span> tool. It does not matter which implementation of <span class="monospaced">make</span> this is.
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">GMAKE</span>
+</dt>
+<dd>
+<p>
+        The location of the GNU-compatible <span class="monospaced">make</span> tool.
+</p>
+</dd>
+</dl></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">If you run the installer with <span class="monospaced">sudo</span> then environment variables may not be passed properly. Learn more at <a href="#env_vars_and_sudo">Environment variables and sudo</a>.</td>
+</tr></table>
+</div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="working_with_apache_conf"></span><h3 data-comment-topic="locating-the-apache-configuration-file-1fterqv" data-anchor="working_with_apache_conf">2.10. Working with the Apache configuration file</h3>
+<div class="paragraph"><p>On most systems the Apache configuration file is located in either <em>/etc/apache2/httpd.conf</em> or <em>/etc/apache2/apache2.conf</em>. However, to allow better organization, many operating systems and Apache distributions also read configuration files in the <em>conf.d</em>, <em>mods-enabled</em> and <em>sites-enabled</em> subdirectories.</p></div>
+<div class="paragraph"><p><em>mods-enabled</em> contains symlinks to files in <em>mods-available</em>. This latter subdirectory contains config files for all available modules, while <em>mods-enabled</em> contains only a subset, namely the modules that should actually be enabled. The symlinks are created using the <span class="monospaced">a2enmod</span> tool. <em><strong>.load</strong></em> files contain <span class="monospaced">LoadModule</span> directives, while <em>.conf</em> files co [...]
+<div class="paragraph"><p>Use <em>mods-enabled</em>/<em>mods-available</em> to store Phusion Passenger configuration if you can:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Create <em>/etc/apache2/mods-available/passenger.load</em> and paste the <span class="monospaced">LoadModule ...</span> directive that <span class="monospaced">passenger-install-apache2-module</span> outputs.
+</p>
+</li>
+<li>
+<p>
+Create <em>/etc/apache2/mods-available/passenger.conf</em> and paste the <span class="monospaced">PassengerRoot</span> and other Phusion Passenger options.
+</p>
+</li>
+<li>
+<p>
+Enable by running <span class="monospaced">sudo a2enmod passenger</span>.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>If the <em>mods-enabled</em> mechanism is not available then you can paste configuration snippets into <em>httpd.conf</em> or <em>apache2.conf</em> directly.</p></div>
+<div class="paragraph"><p>On OS X Server >= 10.8 Mountain Lion the location of the Apache configuration file depends on whether you use Web Services or not. If you do, then the configuration file is in <em>/Library/Server/Web/Config/apache2/httpd_server_app.conf</em>. If you do not, then the configuration file is in <em>/etc/apache2/httpd.conf</em>.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_disabling_without_uninstalling"></span><h3 data-comment-topic="unloading-disabling-phusion-passenger-from-apache-without-uninstalling-it-s1axnx" data-anchor="_disabling_without_uninstalling">2.11. Disabling without uninstalling</h3>
+<div class="paragraph"><p>You can temporarily unload (disable) Phusion Passenger from the web server, without
+uninstalling the Phusion Passenger files, so that the web server behaves as if Phusion
+Passenger was never installed in the first place. This might be useful to you if -
+for example - you seem to be experiencing a problem caused by Phusion Passenger,
+but you want to make sure whether that’s actually the case without having
+to through the hassle of uninstalling Phusion Passenger completely. When disabled,
+Phusion Passenger will not occupy any memory or CPU or otherwise interfere with
+the web server.</p></div>
+<div class="paragraph"><p>To unload Phusion Passenger from the web server, edit your Apache configuration file(s)
+and comment out:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+all Phusion Passenger configuration directives.
+</p>
+</li>
+<li>
+<p>
+the <span class="monospaced">LoadModule passenger_module</span> directive.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>For example, if your configuration file looks like this…</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>Listen *:80
+NameVirtualHosts *:80
+....
+
+LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so
+
+PassengerRoot /somewhere/passenger/x.x.x
+PassengerDefaultRuby /usr/bin/ruby
+PassengerMaxPoolSize 10
+
+<VirtualHost *:80>
+    ServerName www.foo.com
+    DocumentRoot /webapps/foo/public
+    RailsBaseURI /rails
+</VirtualHost></pre>
+</div>
+</div>
+<div class="paragraph"><p>…then comment out the relevant directives, so that it looks like this:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>Listen *:80
+NameVirtualHosts *:80
+....
+
+# LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so
+
+# PassengerRoot /somewhere/passenger/x.x.x
+# PassengerDefaultRuby /usr/bin/ruby
+# PassengerMaxPoolSize 10
+
+<VirtualHost *:80>
+    ServerName www.foo.com
+    DocumentRoot /webapps/foo/public
+    # RailsBaseURI /rails
+</VirtualHost></pre>
+</div>
+</div>
+<div class="paragraph"><p>After you’ve done this, save the configuration file and restart the web server.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="uninstalling"></span><h3 data-comment-topic="uninstalling-phusion-passenger-1qb4ssq" data-anchor="uninstalling">2.12. Uninstalling</h3>
+<div class="paragraph"><p>To uninstall Phusion Passenger, please first remove all Phusion Passenger
+configuration directives from your web server configuration file(s). After you’ve
+done this, you need to remove the Phusion Passenger files.</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+If you installed Phusion Passenger via a Ruby gem, then run <span class="monospaced">gem uninstall passenger</span> (or, if you’re a <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> user, <span class="monospaced">gem uninstall passenger-enterprise-server</span>).
+  You <a href="#is_ruby_home_or_system_wide_installed">might have to run this as root</a>.
+</p>
+</li>
+<li>
+<p>
+If you installed Phusion Passenger via a source tarball, then remove the directory
+  in which you placed the extracted Phusion Passenger files. This directory is the
+  same as the one pointed to the by <span class="monospaced">PassengerRoot</span>/<span class="monospaced">passenger_root</span> configuration directive.
+</p>
+</li>
+<li>
+<p>
+If you installed Phusion Passenger through APT or YUM, then use them to uninstall Phusion Passenger.
+</p>
+</li>
+</ul></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="moving_phusion_passenger"></span><h3 data-comment-topic="moving-to-a-different-directory-1n0gkwh" data-anchor="moving_phusion_passenger">2.13. Moving to a different directory</h3>
+<div class="paragraph"><p>If you installed Phusion Passenger through a tarball then you can move the Phusion Passenger directory to another location. This is not possible if you used any of the other installation methods.</p></div>
+<div class="paragraph"><p>First, move the directory to whereever you like:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>mv /opt/passenger/passenger-4.0.0 /usr/local/passenger-4.0.0</pre>
+</div>
+</div>
+<div class="paragraph"><p>Next you must tell your web server that Phusion Passenger has moved.
+Open your <a href="#working_with_apache_conf">Apache configuration file</a> and set the <em>PassengerRoot</em> directive to the new location:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>PassengerRoot /usr/local/passenger-4.0.0</pre>
+</div>
+</div>
+<div class="paragraph"><p>Restart your web server to finalize the change.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deploying_a_ruby_on_rails_1_x_or_2_x_but_not_rails_gt_3_x_application"></span><h2 data-comment-topic="deploying-a-ruby-on-rails-1-x-or-2-x-but-not-rails-3-x-application-9r92hi" data-anchor="_deploying_a_ruby_on_rails_1_x_or_2_x_but_not_rails_gt_3_x_application">3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3.x) application</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Suppose you have a Ruby on Rails application in <em>/webapps/mycook</em>, and you own
+the domain <em>www.mycook.com</em>. You can either deploy your application to the
+virtual host’s root (i.e. the application will be accessible from the root URL,
+<em>http://www.mycook.com/</em>), or in a sub URI (i.e. the application will be
+accessible from a sub URL, such as <em>http://www.mycook.com/railsapplication</em>).</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">The default <span class="monospaced">RAILS_ENV</span> environment in which deployed Rails applications
+are run, is “production”. You can change this by changing the
+<a href="#rails_env"><em>RailsEnv</em></a> configuration option.</td>
+</tr></table>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deploying_to_a_virtual_host_8217_s_root"></span><h3 data-comment-topic="deploying-to-a-virtual-host-s-root-ab4zj6" data-anchor="_deploying_to_a_virtual_host_8217_s_root">3.1. Deploying to a virtual host’s root</h3>
+<div class="paragraph"><p>Add a virtual host entry to your Apache configuration file. Make sure that the
+following conditions are met:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+The virtual host’s document root must point to your Ruby on Rails application’s
+  <em>public</em> folder.
+</p>
+</li>
+<li>
+<p>
+The Apache per-directory permissions must allow access to this folder.
+</p>
+</li>
+<li>
+<p>
+MultiViews must be disabled for this folder.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre><VirtualHost *:80>
+    ServerName www.mycook.com
+    DocumentRoot /webapps/mycook/public
+    <Directory /webapps/mycook/public>
+        Allow from all
+        Options -MultiViews
+    </Directory>
+</VirtualHost></pre>
+</div>
+</div>
+<div class="paragraph"><p>You may also need to tweak your file/folder permissions. Make sure that the
+following folders are readable and executable by Apache:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+this <em>public</em> folder.
+</p>
+</li>
+<li>
+<p>
+the application’s <em>config</em> folder.
+</p>
+</li>
+<li>
+<p>
+all parent folders. That is, /webapps/mycook and /webapps must also be readable and executable by Apache.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Then restart Apache. The application has now been deployed.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="deploying_rails_to_sub_uri"></span><h3 data-comment-topic="deploying-to-a-sub-uri-13rfygg" data-anchor="deploying_rails_to_sub_uri">3.2. Deploying to a sub URI</h3>
+<div class="paragraph"><p>Suppose that you already have a virtual host:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre><VirtualHost *:80>
+    ServerName www.phusion.nl
+    DocumentRoot /websites/phusion
+    <Directory /websites/phusion>
+        Allow from all
+    </Directory>
+</VirtualHost></pre>
+</div>
+</div>
+<div class="paragraph"><p>And you want your Ruby on Rails application to be accessible from the URL
+<em>http://www.phusion.nl/rails</em>.</p></div>
+<div class="paragraph"><p>To do this, make a symlink in the virtual host’s document root, and have it
+point to your Ruby on Rails application’s <em>public</em> folder. For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>ln -s /webapps/mycook/public /websites/phusion/rails</pre>
+</div>
+</div>
+<div class="paragraph"><p>Next, add a <a href="#RailsBaseURI">RailsBaseURI</a> option to the virtual host configuration,
+and also make sure that:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+The Apache per-directory permissions allow access to this folder.
+</p>
+</li>
+<li>
+<p>
+MultiViews is disabled for this folder.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre><VirtualHost *:80>
+    ServerName www.phusion.nl
+    DocumentRoot /websites/phusion
+    <Directory /websites/phusion>
+        Allow from all
+    </Directory>
+
+    RailsBaseURI /rails                   # <-- These lines have
+    <Directory /websites/phusion/rails>   # <-- been added.
+        Options -MultiViews               # <--
+    </Directory>                          # <--
+</VirtualHost></pre>
+</div>
+</div>
+<div class="paragraph"><p>Then restart Apache. The application has now been deployed.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">If you’re deploying to a sub-URI then please make sure that your view
+templates correctly handles references to sub-URI static assets! Otherwise
+you may find broken links to images, CSS files, JavaScripts, etc. Please read
+<a href="#sub_uri_deployment_uri_fix">How to fix broken images/CSS/JavaScript URIs in sub-URI deployments</a>
+for more information.</td>
+</tr></table>
+</div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/tip.png" alt="Tip">
+</td>
+<td class="content">
+<div class="paragraph"><p>You can deploy multiple Rails applications under a virtual host, by specifying
+<a href="#RailsBaseURI">RailsBaseURI</a> multiple times. For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre><VirtualHost *:80>
+    ....
+    RailsBaseURI /app1
+    RailsBaseURI /app2
+    RailsBaseURI /app3
+</VirtualHost></pre>
+</div>
+</div>
+</td>
+</tr></table>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_redeploying_restarting_the_ruby_on_rails_application"></span><h3 data-comment-topic="redeploying-restarting-the-ruby-on-rails-application--m5zqc6" data-anchor="_redeploying_restarting_the_ruby_on_rails_application">3.3. Redeploying (restarting the Ruby on Rails application)</h3>
+<div class="paragraph"><p>Deploying a new version of a Ruby on Rails application is as simple as
+re-uploading the application files, and restarting the application.</p></div>
+<div class="paragraph"><p>There are two ways to restart the application:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+By restarting Apache.
+</p>
+</li>
+<li>
+<p>
+By creating or modifying the file <em>tmp/restart.txt</em> in the Rails
+   application’s <a href="#application_root">root folder</a>. Phusion Passenger will
+   automatically restart the application during the next request.
+</p>
+</li>
+</ol></div>
+<div class="paragraph"><p>For example, to restart our example MyCook application, we type this in the
+command line:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>touch /webapps/mycook/tmp/restart.txt</pre>
+</div>
+</div>
+<div class="paragraph"><p>Please note that, unlike earlier versions of Phusion Passenger, <em>restart.txt</em>
+is not automatically deleted. Phusion Passenger checks whether the timestamp
+of this file has changed in order to determine whether the application should
+be restarted.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_migrations"></span><h3 data-comment-topic="migrations-15238b4" data-anchor="_migrations">3.4. Migrations</h3>
+<div class="paragraph"><p>Phusion Passenger is not related to Ruby on Rails migrations in any way. To
+run migrations on your deployment server, please login to your deployment
+server (e.g. with <em>ssh</em>) and type <span class="monospaced">rake db:migrate RAILS_ENV=production</span> in
+a shell console, just like one would normally run migrations.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_capistrano_integration"></span><h3 data-comment-topic="capistrano-integration-1o4cbyq" data-anchor="_capistrano_integration">3.5. Capistrano integration</h3>
+<div class="paragraph"><p>See <a href="#capistrano">Capistrano recipe</a>.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deploying_a_rack_based_ruby_application_including_rails_gt_3"></span><h2 data-comment-topic="deploying-a-rack-based-ruby-application-including-rails-3--hcs66f" data-anchor="_deploying_a_rack_based_ruby_application_including_rails_gt_3">4. Deploying a Rack-based Ruby application (including Rails >= 3)</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Phusion Passenger supports arbitrary Ruby web applications that follow the
+<a href="http://rack.rubyforge.org/">Rack</a> interface.</p></div>
+<div class="paragraph"><p>Phusion Passenger assumes that Rack application directories have a certain layout.
+Suppose that you have a Rack application in <em>/webapps/rackapp</em>. Then that
+folder must contain at least three entries:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<em>config.ru</em>, a Rackup file for starting the Rack application. This file must contain
+  the complete logic for initializing the application.
+</p>
+</li>
+<li>
+<p>
+<em>public/</em>, a folder containing public static web assets, like images and stylesheets.
+</p>
+</li>
+<li>
+<p>
+<em>tmp/</em>, used for <em>restart.txt</em> (our application restart mechanism). This will
+  be explained in a following subsection.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>So <em>/webapps/rackapp</em> must, at minimum, look like this:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>/webapps/rackapp
+  |
+  +-- config.ru
+  |
+  +-- public/
+  |
+  +-- tmp/</pre>
+</div>
+</div>
+<div class="paragraph"><p>Suppose you own the domain <em>www.rackapp.com</em>. You can either deploy your application
+to the virtual host’s root (i.e. the application will be accessible from the root URL,
+<em>http://www.rackapp.com/</em>), or in a sub URI (i.e. the application will be
+accessible from a sub URL, such as <em>http://www.rackapp.com/rackapp</em>).</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">The default <span class="monospaced">RACK_ENV</span> environment in which deployed Rack applications
+are run, is “production”. You can change this by changing the
+<a href="#rack_env"><em>RackEnv</em></a> configuration option.</td>
+</tr></table>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_tutorial_example_writing_and_deploying_a_hello_world_rack_application"></span><h3 data-comment-topic="tutorial-example-writing-and-deploying-a-hello-world-rack-application-axp5z5" data-anchor="_tutorial_example_writing_and_deploying_a_hello_world_rack_application">4.1. Tutorial/example: writing and deploying a Hello World Rack application</h3>
+<div class="paragraph"><p>First we create a Phusion Passenger-compliant Rack directory structure:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ mkdir /webapps/rack_example
+$ mkdir /webapps/rack_example/public
+$ mkdir /webapps/rack_example/tmp</pre>
+</div>
+</div>
+<div class="paragraph"><p>Next, we write a minimal "hello world" Rack application:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ cd /webapps/rack_example
+$ some_awesome_editor config.ru
+...type in some source code...
+$ cat config.ru
+app = proc do |env|
+    [200, { "Content-Type" => "text/html" }, ["hello <b>world</b>"]]
+end
+run app</pre>
+</div>
+</div>
+<div class="paragraph"><p>Finally, we deploy it by adding the following configuration options to
+the Apache configuration file:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre><VirtualHost *:80>
+    ServerName www.rackexample.com
+    DocumentRoot /webapps/rack_example/public
+    <Directory /webapps/rack_example/public>
+        Allow from all
+        Options -MultiViews
+    </Directory>
+</VirtualHost></pre>
+</div>
+</div>
+<div class="paragraph"><p>And we’re done! After an Apache restart, the above Rack application will be available
+under the URL <em>http://www.rackexample.com/</em>.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deploying_to_a_virtual_host_8217_s_root_2"></span><h3 data-comment-topic="deploying-to-a-virtual-host-s-root-u9bfax" data-anchor="_deploying_to_a_virtual_host_8217_s_root_2">4.2. Deploying to a virtual host’s root</h3>
+<div class="paragraph"><p>Add a virtual host entry to your Apache configuration file. Make sure that the
+following conditions are met:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+The virtual host’s document root must point to your Rack application’s
+  <em>public</em> folder.
+</p>
+</li>
+<li>
+<p>
+The Apache per-directory permissions must allow access to this folder.
+</p>
+</li>
+<li>
+<p>
+MultiViews must be disabled for this folder.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre><VirtualHost *:80>
+    ServerName www.rackapp.com
+    DocumentRoot /webapps/rackapp/public
+    <Directory /webapps/rackapp/public>
+        Allow from all
+        Options -MultiViews
+    </Directory>
+</VirtualHost></pre>
+</div>
+</div>
+<div class="paragraph"><p>You may also need to tweak your file/folder permissions. Make sure that the
+following folders are readable and executable by Apache:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+this <em>public</em> folder.
+</p>
+</li>
+<li>
+<p>
+the application’s <em>config</em> folder.
+</p>
+</li>
+<li>
+<p>
+all parent folders. That is, /webapps/rackapp and /webapps must also be readable and executable by Apache.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Then restart Apache. The application has now been deployed.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="deploying_rack_to_sub_uri"></span><h3 data-comment-topic="deploying-to-a-sub-uri-zekba6" data-anchor="deploying_rack_to_sub_uri">4.3. Deploying to a sub URI</h3>
+<div class="paragraph"><p>Suppose that you already have a virtual host:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre><VirtualHost *:80>
+    ServerName www.phusion.nl
+    DocumentRoot /websites/phusion
+    <Directory /websites/phusion>
+        Allow from all
+    </Directory>
+</VirtualHost></pre>
+</div>
+</div>
+<div class="paragraph"><p>And you want your Rack application to be accessible from the URL
+<em>http://www.phusion.nl/rack</em>.</p></div>
+<div class="paragraph"><p>To do this, make a symlink in the virtual host’s document root, and have it
+point to your Rack application’s <em>public</em> folder. For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>ln -s /webapps/rackapp/public /websites/phusion/rack</pre>
+</div>
+</div>
+<div class="paragraph"><p>Next, add a <a href="#RackBaseURI">RackBaseURI</a> option to the virtual host configuration,
+and also make sure that:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+The Apache per-directory permissions allow access to this folder.
+</p>
+</li>
+<li>
+<p>
+MultiViews is disabled for this folder.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre><VirtualHost *:80>
+    ServerName www.phusion.nl
+    DocumentRoot /websites/phusion
+    <Directory /websites/phusion>
+        Allow from all
+    </Directory>
+
+    RackBaseURI /rack                     # <-- These lines have
+    <Directory /websites/phusion/rack>    # <-- been added.
+        Options -MultiViews               # <--
+    </Directory>                          # <--
+</VirtualHost></pre>
+</div>
+</div>
+<div class="paragraph"><p>Then restart Apache. The application has now been deployed.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/tip.png" alt="Tip">
+</td>
+<td class="content">
+<div class="paragraph"><p>You can deploy multiple Rack applications under a virtual host, by specifying
+<a href="#RackBaseURI">RackBaseURI</a> multiple times. For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre><VirtualHost *:80>
+    ....
+    RackBaseURI /app1
+    RackBaseURI /app2
+    RackBaseURI /app3
+</VirtualHost></pre>
+</div>
+</div>
+</td>
+</tr></table>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_redeploying_restarting_the_rack_application"></span><h3 data-comment-topic="redeploying-restarting-the-rack-application--18m41m1" data-anchor="_redeploying_restarting_the_rack_application">4.4. Redeploying (restarting the Rack application)</h3>
+<div class="paragraph"><p>Deploying a new version of a Rack application is as simple as
+re-uploading the application files, and restarting the application.</p></div>
+<div class="paragraph"><p>There are two ways to restart the application:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+By restarting Apache.
+</p>
+</li>
+<li>
+<p>
+By creating or modifying the file <em>tmp/restart.txt</em> in the Rack
+   application’s <a href="#application_root">root folder</a>. Phusion Passenger will
+   automatically restart the application.
+</p>
+</li>
+</ol></div>
+<div class="paragraph"><p>For example, to restart our example application, we type this in the
+command line:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>touch /webapps/rackapp/tmp/restart.txt</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_rackup_specifications_for_various_web_frameworks"></span><h3 data-comment-topic="rackup-specifications-for-various-web-frameworks-ndsqc2" data-anchor="_rackup_specifications_for_various_web_frameworks">4.5. Rackup specifications for various web frameworks</h3>
+<div class="paragraph"><p>This subsection shows example <em>config.ru</em> files for various web frameworks.</p></div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_camping"></span><h4 data-comment-topic="camping-1kxexk0" data-anchor="_camping">4.5.1. Camping</h4>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>require 'rubygems'
+require 'rack'
+require 'camping'
+
+##### Begin Camping application
+Camping.goes :Blog
+
+...your application code here...
+##### End Camping application
+
+run Rack::Adapter::Camping.new(Blog)</pre>
+</div>
+</div>
+<div class="paragraph"><p>For Camping versions 2.0 and up, using <span class="monospaced">run Blog</span> as the final line will do.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_halcyon"></span><h4 data-comment-topic="halcyon-1ghnpmz" data-anchor="_halcyon">4.5.2. Halcyon</h4>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>require 'rubygems'
+require 'halcyon'
+$LOAD_PATH.unshift(Halcyon.root / 'lib')
+Halcyon::Runner.load_config Halcyon.root/'config'/'config.yml'
+run Halcyon::Runner.new</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_mack"></span><h4 data-comment-topic="mack-miht6b" data-anchor="_mack">4.5.3. Mack</h4>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>ENV["MACK_ENV"] = ENV["RACK_ENV"]
+load("Rakefile")
+require 'rubygems'
+require 'mack'
+run Mack::Utils::Server.build_app</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_merb"></span><h4 data-comment-topic="merb-iyj7qy" data-anchor="_merb">4.5.4. Merb</h4>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>require 'rubygems'
+require 'merb-core'
+
+Merb::Config.setup(
+  :merb_root   => ::File.expand_path(::File.dirname(__FILE__)),
+  :environment => ENV['RACK_ENV']
+)
+Merb.environment = Merb::Config[:environment]
+Merb.root = Merb::Config[:merb_root]
+Merb::BootLoader.run
+
+run Merb::Rack::Application.new</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_ramaze"></span><h4 data-comment-topic="ramaze-boddtj" data-anchor="_ramaze">4.5.5. Ramaze</h4>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>require "rubygems"
+require "ramaze"
+Ramaze.trait[:essentials].delete Ramaze::Adapter
+require "start"
+Ramaze.start!
+run Ramaze::Adapter::Base</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_sinatra"></span><h4 data-comment-topic="sinatra-1hubto4" data-anchor="_sinatra">4.5.6. Sinatra</h4>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>require 'rubygems'
+require 'sinatra'
+
+set :environment, ENV['RACK_ENV'].to_sym
+disable :run, :reload
+
+require 'app.rb'
+
+run Sinatra::Application</pre>
+</div>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deploying_a_wsgi_python_application"></span><h2 data-comment-topic="deploying-a-wsgi-python-application-7aygdl" data-anchor="_deploying_a_wsgi_python_application">5. Deploying a WSGI (Python) application</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Phusion Passenger supports all WSGI-compliant Python web applications. Suppose that you have a WSGI application in <em>/webapps/wsgiapp</em>. Then that folder must contain at least three entries:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<em>passenger_wsgi.py</em>, which Phusion Passenger will use as the main entry point for your application. This file must export a WSGI object called <span class="monospaced">application</span>.
+</p>
+</li>
+<li>
+<p>
+<em>public/</em>, a folder containing public static web assets, like images and stylesheets.
+</p>
+</li>
+<li>
+<p>
+<em>tmp/</em>, used for <em>restart.txt</em> (our application restart mechanism). This will be explained in a following subsection.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>So <em>/webapps/wsgiapp</em> must, at minimum, look like this:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>/webapps/wsgiapp
+  |
+  +-- config.ru
+  |
+  +-- public/
+  |
+  +-- tmp/</pre>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_tutorial_example_writing_and_deploying_a_hello_world_wsgi_application"></span><h3 data-comment-topic="tutorial-example-writing-and-deploying-a-hello-world-wsgi-application-9ziqy8" data-anchor="_tutorial_example_writing_and_deploying_a_hello_world_wsgi_application">5.1. Tutorial/example: writing and deploying a Hello World WSGI application</h3>
+<div class="paragraph"><p>First we create a Phusion Passenger-compliant WSGI directory structure:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ mkdir /webapps/wsgi_example
+$ mkdir /webapps/wsgi_example/public
+$ mkdir /webapps/wsgi_example/tmp</pre>
+</div>
+</div>
+<div class="paragraph"><p>Next, we write a minimal "hello world" WSGI application:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ cd /webapps/wsgi_example
+$ some_awesome_editor passenger_wsgi.py
+...type in some source code...
+$ cat passenger_wsgi.py
+def application(environ, start_response):
+  start_response('200 OK', [('Content-Type', 'text/plain')])
+  return [b"hello world!\n"]</pre>
+</div>
+</div>
+<div class="paragraph"><p>Finally, we deploy it by adding the following configuration options to
+the Apache configuration file:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre><VirtualHost *:80>
+    ServerName www.wsgiexample.com
+    DocumentRoot /webapps/wsgi_example/public
+    <Directory /webapps/wsgi_example/public>
+        Allow from all
+        Options -MultiViews
+    </Directory>
+</VirtualHost></pre>
+</div>
+</div>
+<div class="paragraph"><p>And we’re done! After an Apache restart, the above WSGI application will be available
+under the URL <em>http://www.wsgiexample.com/</em>.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deploying_to_a_virtual_host_8217_s_root_3"></span><h3 data-comment-topic="deploying-to-a-virtual-host-s-root-zzo4v7" data-anchor="_deploying_to_a_virtual_host_8217_s_root_3">5.2. Deploying to a virtual host’s root</h3>
+<div class="paragraph"><p>Add a virtual host entry to your Apache configuration file. Make sure that the
+following conditions are met:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+The virtual host’s document root must point to your WSGI application’s
+  <em>public</em> folder.
+</p>
+</li>
+<li>
+<p>
+The WSGI per-directory permissions must allow access to this folder.
+</p>
+</li>
+<li>
+<p>
+MultiViews must be disabled for this folder.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre><VirtualHost *:80>
+    ServerName www.wsgiapp.com
+    DocumentRoot /webapps/wsgiapp/public
+    <Directory /webapps/wsgiapp/public>
+        Allow from all
+        Options -MultiViews
+    </Directory>
+</VirtualHost></pre>
+</div>
+</div>
+<div class="paragraph"><p>You may also need to tweak your file/folder permissions. Make sure that the
+following folders are readable and executable by Apache:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+this <em>public</em> folder.
+</p>
+</li>
+<li>
+<p>
+the application’s <em>config</em> folder.
+</p>
+</li>
+<li>
+<p>
+all parent folders. That is, /webapps/wsgiapp and /webapps must also be readable and executable by Apache.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Then restart Apache. The application has now been deployed.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_redeploying_restarting_the_wsgi_application"></span><h3 data-comment-topic="redeploying-restarting-the-wsgi-application--na7pmf" data-anchor="_redeploying_restarting_the_wsgi_application">5.3. Redeploying (restarting the WSGI application)</h3>
+<div class="paragraph"><p>Deploying a new version of a WSGI application is as simple as
+re-uploading the application files, and restarting the application.</p></div>
+<div class="paragraph"><p>There are two ways to restart the application:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+By restarting Apache.
+</p>
+</li>
+<li>
+<p>
+By creating or modifying the file <em>tmp/restart.txt</em> in the WSGI
+   application’s <a href="#application_root">root folder</a>. Phusion Passenger will
+   automatically restart the application.
+</p>
+</li>
+</ol></div>
+<div class="paragraph"><p>For example, to restart our example application, we type this in the
+command line:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>touch /webapps/wsgiapp/tmp/restart.txt</pre>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_configuring_phusion_passenger"></span><h2 data-comment-topic="configuring-phusion-passenger-11oztoe" data-anchor="_configuring_phusion_passenger">6. Configuring Phusion Passenger</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>After installation, Phusion Passenger does not need any further configurations.
+Nevertheless, the system administrator may be interested in changing
+Phusion Passenger’s behavior. Phusion Passenger’s Apache module supports the
+following configuration options:</p></div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerroot_lt_directory_gt"></span><h3 data-comment-topic="passengerroot-directory--sere8l" data-anchor="_passengerroot_lt_directory_gt">6.1. PassengerRoot <directory></h3>
+<div class="paragraph"><p>The location to the Phusion Passenger root directory. This configuration option
+is essential to Phusion Passenger, and allows Phusion Passenger to locate its own
+data files. The correct value is given by the installer.</p></div>
+<div class="paragraph"><p>If you’ve moved Phusion Passenger to a different directory then you need to update
+this option as well. Please read
+<a href="#moving_phusion_passenger">Moving Phusion Passenger to a different directory</a> for more information.</p></div>
+<div class="paragraph"><p>This required option may only occur once, in the global server configuration.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerDefaultRuby"></span><h3 data-comment-topic="passengerdefaultruby-and-passengerruby-7zblp8" data-anchor="PassengerDefaultRuby">6.2. PassengerDefaultRuby <filename></h3>
+<div class="paragraph"><p><strong>Introduced in version 4.0.0.</strong></p></div>
+<div class="paragraph"><p>This option specifies the default Ruby interpreter to use for web apps as well as for all sorts of internal Phusion Passenger helper scripts, e.g. the one used by <a href="#PassengerPreStart">PassengerPreStart</a>. Please see <a href="#PassengerRuby">PassengerRuby</a> for more information, as well as how it relates to <a href="#PassengerRuby">PassengerRuby</a>.</p></div>
+<div class="paragraph"><p>This option may occur in the global server configuration. The default value is <em>ruby</em>, meaning that the Ruby interpreter will be looked up according to the <span class="monospaced">PATH</span> environment variable.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerRuby"></span><h3 data-comment-topic="passengerruby-filename--1r3fv73" data-anchor="PassengerRuby">6.3. PassengerRuby <filename></h3>
+<div class="paragraph"><p>The <span class="monospaced">PassengerDefaultRuby</span> and <span class="monospaced">PassengerRuby</span> directives specify the Ruby interpreter to use. Similarly, the <span class="monospaced">PassengerPython</span> directive is for specifying the Python interpreter.</p></div>
+<div class="paragraph"><p>The relationship between <span class="monospaced">PassengerDefaultRuby</span> and <span class="monospaced">PassengerRuby</span> is as follows:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<span class="monospaced">PassengerDefaultRuby</span> may only occur in the global server configuration.
+</p>
+</li>
+<li>
+<p>
+<span class="monospaced">PassengerRuby</span> may occur everywhere: in the global server configuration, in <span class="monospaced"><VirtualHost></span>, in <span class="monospaced"><Directory></span>, in <span class="monospaced"><Location></span>, and in <em>.htaccess</em> if <span class="monospaced">AllowOverride Options</span> is on.
+</p>
+</li>
+<li>
+<p>
+You don’t <strong>have</strong> to specify <span class="monospaced">PassengerRuby</span>. In this case <span class="monospaced">PassengerDefaultRuby</span> is used as the Ruby interpreter. But if you do specify <span class="monospaced">PassengerRuby</span> then it will override <span class="monospaced">PassengerDefaultRuby</span> in that context. This allows you to use <span class="monospaced">PassengerRuby</span> to specify a different Ruby interpreter on a per-application basis.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Phusion Passenger not only uses Ruby to run web apps, but also for running certain helper tools that are written in Ruby, e.g. the internal helper script used by <a href="#PassengerPreStart">PassengerPreStart</a>. These tools are always run using <span class="monospaced">PassengerDefaultRuby</span>, never by <span class="monospaced">PassengerRuby</span>. <span class="monospaced">PassengerRuby</span> is only used for running web apps.</p></div>
+<div class="paragraph"><p>The reason why <span class="monospaced">PassengerDefaultRuby</span> exists at all is because limitations in the Apache API prevents us from implementing the same behavior using only the <span class="monospaced">PassengerRuby</span> directive.</p></div>
+<div class="paragraph"><p>There is no <span class="monospaced">PassengerDefaultPython</span> because there are no Phusion Passenger tools written in Python. As such, having <span class="monospaced">PassengerPython</span> is enough.</p></div>
+<div class="paragraph"><p>The following example illustrates how it works and how you can use these options to specify different Ruby/Python interpreters for different web apps.</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre># Use Ruby 1.8.7 by default.
+PassengerDefaultRuby /usr/bin/ruby1.8
+# Use Python 2.6 by default.
+PassengerPython /usr/bin/python2.6
+
+<VirtualHost *:80>
+    # This Rails web app will use Ruby 1.8.7
+    ServerName www.foo.com
+    DocumentRoot /webapps/foo/public
+</VirtualHost>
+
+<VirtualHost *:80>
+    # This Rails web app will use Ruby 1.9.3, as installed by RVM
+    PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3/ruby
+    ServerName www.bar.com
+    DocumentRoot /webapps/bar/public
+
+    # If you have a web app deployed in a sub-URI, customize
+    # PassengerRuby/PassengerPython inside a <Location> block.
+    # The web app under www.bar.com/blog will use JRuby 1.7.1
+    RackBaseURI /blog
+    <Location /blog>
+        PassengerRuby /usr/local/rvm/wrappers/jruby-1.7.1/ruby
+    </Location>
+</VirtualHost>
+
+<VirtualHost *:80>
+    # This Flask web app will use Python 3.0
+    PassengerPython /usr/bin/python3.0
+    ServerName www.baz.com
+    DocumentRoot /webapps/baz/public
+</VirtualHost></pre>
+</div>
+</div>
+<div class="paragraph">
+<div class="title">RVM helper tool</div>
+<p>Phusion Passenger provides the <span class="monospaced">passenger-config --ruby-command</span> tool for figuring out the correct command for invoking a specific Ruby interpreter. This is especially useful for RVM users. Suppose that you have both Ruby 1.8.7 and Ruby 1.9.3 installed through RVM, and you want to know the correct commands for each Ruby interpreter.</p>
+</div>
+<div class="paragraph"><p>For this purpose we’ll want to invoke <span class="monospaced">passenger-config</span> using its full path, because each time you <span class="monospaced">rvm use</span> a different Ruby interpreter, RVM changes <span class="monospaced">$PATH</span>. If you did not install Phusion Passenger through the generic tarball installation method, then here’s how you can figure out where <span class="monospaced">passenger-config</span> is:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ which passenger-config
+/opt/passenger/bin/passenger-config</pre>
+</div>
+</div>
+<div class="paragraph"><p>Now, switch to all the RVM Ruby interpreters you want to use. In each interpreter, invoke <span class="monospaced">passenger-config --ruby-command</span>. For Ruby 1.8.7:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ rvm use 1.8.7
+$ /opt/passenger/bin/passenger-config --ruby-command
+passenger-config was invoked through the following Ruby interpreter:
+  Command: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  Version: ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
+  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby /opt/passenger/bin/passenger start
+
+The following Ruby interpreter was found first in $PATH:
+  Command: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  Version: ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
+  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby /opt/passenger/bin/passenger start
+
+## Notes for RVM users
+Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'.</pre>
+</div>
+</div>
+<div class="paragraph"><p>Then, for Ruby 1.9.3:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ rvm use 1.9.3
+$ /opt/passenger/bin/passenger-config --ruby-command
+passenger-config was invoked through the following Ruby interpreter:
+  Command: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  Version: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
+  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby /opt/passenger/bin/passenger start
+
+The following Ruby interpreter was found first in $PATH:
+  Command: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  Version: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
+  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby /opt/passenger/bin/passenger start
+
+## Notes for RVM users
+Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'.</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerpython_lt_filename_gt"></span><h3 data-comment-topic="passengerpython-filename--1ssesv3" data-anchor="_passengerpython_lt_filename_gt">6.4. PassengerPython <filename></h3>
+<div class="paragraph"><p><strong>Introduced in version 4.0.0.</strong></p></div>
+<div class="paragraph"><p>This option allows one to specify the Python interpreter to use. See <a href="#PassengerRuby">PassengerRuby</a> for more information. The default value is <em>python</em>, meaning that the Python interpreter will be looked up according to the <span class="monospaced">PATH</span> environment variable.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerAppRoot"></span><h3 data-comment-topic="passengerapproot-path-to-root--uf24yd" data-anchor="PassengerAppRoot">6.5. PassengerAppRoot <path/to/root></h3>
+<div class="paragraph"><p>By default, Phusion Passenger assumes that the application’s root directory
+is the parent directory of the <em>public</em> directory. This option allows one to
+specify the application’s root independently from the DocumentRoot, which
+is useful if the <em>public</em> directory lives in a non-standard place.</p></div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+In the global server configuration.
+</p>
+</li>
+<li>
+<p>
+In a virtual host configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <span class="monospaced"><Directory></span> or <span class="monospaced"><Location></span> block.
+</p>
+</li>
+<li>
+<p>
+In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span> is on.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
+<div class="paragraph"><p>Example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre><VirtualHost test.host>
+    DocumentRoot /var/rails/zena/sites/example.com/public
+    PassengerAppRoot /var/rails/zena   # <-- normally Phusion Passenger would
+                                       #     have assumed that the application
+                                       #     root is "/var/rails/zena/sites/example.com"
+</VirtualHost></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerSpawnMethod"></span><h3 data-comment-topic="passengerspawnmethod-string--sodg2y" data-anchor="PassengerSpawnMethod">6.6. PassengerSpawnMethod <string></h3>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/tip.png" alt="Tip">
+</td>
+<td class="content">
+<div class="title">"What spawn method should I use?"</div>
+<div class="paragraph"><p>This subsection attempts to describe spawn methods, but it’s okay if you don’t (want to)
+understand it, as it’s mostly a technical detail. You can basically follow this rule of thumb:</p></div>
+<div class="sidebarblock">
+<div class="content">
+<div class="paragraph"><p>If your application works on Mongrel, but not on Phusion Passenger, then set
+<span class="monospaced">PassengerSpawnMethod</span> to <em>conservative</em>. Otherwise, leave it at <em>smart-lv2</em> (the default).</p></div>
+</div>
+</div>
+<div class="paragraph"><p>However, we do recommend you to try to understand it. The <em>smart</em> and <em>smart-lv2</em> spawn
+methods bring many benefits.</p></div>
+</td>
+</tr></table>
+</div>
+<div class="paragraph"><p>Internally, Phusion Passenger spawns multiple Ruby application processes in order to handle
+requests. But there are multiple ways with which processes can be spawned, each having
+its own set of pros and cons. Supported spawn methods are:</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+<em>smart</em>
+</dt>
+<dd>
+<p>
+This spawning method caches code using the app preloader. Framework code is not
+cached between multiple applications, although it is cached within
+instances of the same application. Please read
+<a href="#spawning_methods_explained">Spawning methods explained</a> for a more detailed
+explanation of what smart spawning exactly does.
+</p>
+<div class="paragraph"><p><strong>Pros:</strong>
+Smart spawning caches code where possible to speed up the respawn process
+and is compatible with most applications</p></div>
+<div class="paragraph"><p><strong>Cons:</strong>
+It is possible that it may be incompatible with some applications</p></div>
+</dd>
+<dt class="hdlist1">
+<em>direct</em>
+</dt>
+<dd>
+<p>
+This spawning method is similar to the one used in Mongrel Cluster. It does not
+perform any code caching at all. Please read
+<a href="#spawning_methods_explained">Spawning methods explained</a> for a more detailed
+explanation of what direct spawning exactly does.
+</p>
+<div class="paragraph"><p><strong>Pros:</strong>
+Direct spawning is guaranteed to be compatible with all applications
+and libraries.</p></div>
+<div class="paragraph"><p><strong>Cons:</strong>
+Much slower than smart spawning. Every spawn action will be equally slow, though no slower than
+the startup time of a single server in Mongrel Cluster. Direct spawning will also
+render <a href="#reducing_memory_usage">Ruby Enterprise Edition’s memory reduction technology</a> useless.</p></div>
+</dd>
+</dl></div>
+<div class="sidebarblock">
+<div class="content">
+<div class="paragraph"><p>As of Passenger 3.2, <em>conservative</em> spawning was renamed to <em>direct</em> and <em>smart-lv2</em> was renamed
+to <em>smart</em>. The old <em>smart</em> spawning has been removed in favor of the new version.</p></div>
+</div>
+</div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+In the global server configuration.
 </p>
 </li>
 <li>
 <p>
-MultiViews is disabled for this folder.
+In a virtual host configuration block.
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>For example:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre><VirtualHost *:80>
-    ServerName www.phusion.nl
-    DocumentRoot /websites/phusion
-    <Directory /websites/phusion>
-        Allow from all
-    </Directory>
-
-    RackBaseURI /rack                     # <-- These lines have
-    <Directory /websites/phusion/rack>    # <-- been added.
-        Options -MultiViews               # <--
-    </Directory>                          # <--
-</VirtualHost></pre>
-</div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>smart-lv2</em>.</p></div>
 </div>
-<div class="paragraph"><p>Then restart Apache. The application has now been deployed.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<img src="./images/icons/tip.png" alt="Tip">
-</td>
-<td class="content">
-<div class="paragraph"><p>You can deploy multiple Rack applications under a virtual host, by specifying
-<a href="#RackBaseURI">RackBaseURI</a> multiple times. For example:</p></div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerEnabled"></span><h3 data-comment-topic="passengerenabled-on-off--74rzth" data-anchor="PassengerEnabled">6.7. PassengerEnabled <on|off></h3>
+<div class="paragraph"><p>You can set this option to <em>off</em> to completely disable Phusion Passenger for
+a certain location. This is useful if, for example, you want to integrate a PHP
+application into the same virtual host as a Rails application.</p></div>
+<div class="paragraph"><p>Suppose that you have a Rails application in <em>/apps/foo</em>. Suppose that you’ve
+dropped Wordpress — a blogging application written in PHP — in
+<em>/apps/foo/public/wordpress</em>. You can then configure Phusion Passenger as
+follows:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
 <pre><VirtualHost *:80>
-    ....
-    RackBaseURI /app1
-    RackBaseURI /app2
-    RackBaseURI /app3
+    ServerName www.foo.com
+    DocumentRoot /apps/foo/public
+    <Directory /apps/foo/public/wordpress>
+        PassengerEnabled off
+        AllowOverride all      # <-- Makes Wordpress's .htaccess file work.
+    </Directory>
 </VirtualHost></pre>
 </div>
 </div>
-</td>
-</tr></table>
-</div>
-</div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_redeploying_restarting_the_rack_application" data-comment-topic="redeploying-restarting-the-rack-application--18m41m1">4.4. Redeploying (restarting the Rack application)</h3>
-<div class="paragraph"><p>Deploying a new version of a Rack application is as simple as
-re-uploading the application files, and restarting the application.</p></div>
-<div class="paragraph"><p>There are two ways to restart the application:</p></div>
-<div class="olist arabic"><ol class="arabic">
+<div class="paragraph"><p>This way, Phusion Passenger will not interfere with Wordpress.</p></div>
+<div class="paragraph"><p><em>PassengerEnabled</em> may occur in the following places:</p></div>
+<div class="ulist"><ul>
 <li>
 <p>
-By restarting Apache.
+In the global server configuration.
 </p>
 </li>
 <li>
 <p>
-By creating or modifying the file <em>tmp/restart.txt</em> in the Rack
-   application’s <a href="#application_root">root folder</a>. Phusion Passenger will
-   automatically restart the application.
+In a virtual host configuration block.
 </p>
 </li>
-</ol></div>
-<div class="paragraph"><p>For example, to restart our example application, we type this in the
-command line:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>touch /webapps/rackapp/tmp/restart.txt</pre>
-</div>
-</div>
+<li>
+<p>
+In a <span class="monospaced"><Directory></span> or <span class="monospaced"><Location></span> block.
+</p>
+</li>
+<li>
+<p>
+In <em>.htaccess</em>.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>on</em>.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_rackup_specifications_for_various_web_frameworks" data-comment-topic="rackup-specifications-for-various-web-frameworks-ndsqc2">4.5. Rackup specifications for various web frameworks</h3>
-<div class="paragraph"><p>This subsection shows example <em>config.ru</em> files for various web frameworks.</p></div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_camping" data-comment-topic="camping-1kxexk0">4.5.1. Camping</h4>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>require 'rubygems'
-require 'rack'
-require 'camping'
-
-##### Begin Camping application
-Camping.goes :Blog
-
-...your application code here...
-##### End Camping application
-
-run Rack::Adapter::Camping.new(Blog)</pre>
-</div>
-</div>
-<div class="paragraph"><p>For Camping versions 2.0 and up, using <span class="monospaced">run Blog</span> as the final line will do.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerTempDir"></span><h3 data-comment-topic="passengertempdir-directory--68h2ng" data-anchor="PassengerTempDir">6.8. PassengerTempDir <directory></h3>
+<div class="paragraph"><p>Specifies the directory that Phusion Passenger should use for storing temporary
+files. This includes things such as Unix socket files, buffered file uploads
+(see also <a href="#PassengerUploadBufferDir">PassengerUploadBufferDir</a>), etc.</p></div>
+<div class="paragraph"><p>This option may be specified once, in the global server configuration. The
+default temp directory that Phusion Passenger uses is <em>/tmp</em>.</p></div>
+<div class="paragraph"><p>This option is especially useful if Apache is not allowed to write to /tmp
+(which is the case on some systems with strict SELinux policies) or if the
+partition that /tmp lives on doesn’t have enough disk space.</p></div>
+<div class="paragraph">
+<div class="title">Command line tools</div>
+<p>Some Phusion Passenger command line administration tools, such as
+<span class="monospaced">passenger-status</span>, must know what Phusion Passenger’s temp directory is
+in order to function properly. You can pass the directory through the
+<span class="monospaced">PASSENGER_TMPDIR</span> environment variable, or the <span class="monospaced">TMPDIR</span> environment variable
+(the former will be used if both are specified).</p>
 </div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_halcyon" data-comment-topic="halcyon-1ghnpmz">4.5.2. Halcyon</h4>
+<div class="paragraph"><p>For example, if you set <em>PassengerTempDir</em> to <em>/my_temp_dir</em>, then invoke
+<span class="monospaced">passenger-status</span> after you’ve set the <span class="monospaced">PASSENGER_TMPDIR</span> or <span class="monospaced">TMPDIR</span>
+environment variable, like this:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>require 'rubygems'
-require 'halcyon'
-$LOAD_PATH.unshift(Halcyon.root / 'lib')
-Halcyon::Runner.load_config Halcyon.root/'config'/'config.yml'
-run Halcyon::Runner.new</pre>
+<pre>export PASSENGER_TMPDIR=/my_temp-dir
+sudo -E passenger-status
+# The -E option tells 'sudo' to preserve environment variables.</pre>
 </div>
 </div>
 </div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_mack" data-comment-topic="mack-miht6b">4.5.3. Mack</h4>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>ENV["MACK_ENV"] = ENV["RACK_ENV"]
-load("Rakefile")
-require 'rubygems'
-require 'mack'
-run Mack::Utils::Server.build_app</pre>
-</div>
-</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerUploadBufferDir"></span><h3 data-comment-topic="passengeruploadbufferdir-directory--kdr8at" data-anchor="PassengerUploadBufferDir">6.9. PassengerUploadBufferDir <directory></h3>
+<div class="paragraph"><p>Phusion Passenger buffers large file uploads to disk in order prevent slow file
+uploads from blocking web applications. By default, a subdirectory in the
+system’s temporary files directory (or a subdirectory in the directory specified
+in <a href="#PassengerTempDir">PassengerTempDir</a>, if set) is automatically created for
+storing these buffered file uploads.</p></div>
+<div class="paragraph"><p>This configuration directive allows you to specify a different directory for storing
+buffered file uploads. If you’ve specified such a directory (as opposed to using
+Phusion Passenger’s default) then you <strong>must</strong> ensure that this directory exists.</p></div>
+<div class="paragraph"><p>This configuration directive is also useful if you’re using apache2-mpm-itk.
+The buffered file upload directory that Phusion Passenger creates by default has
+very strict permissions: it can only be accessed by the Apache worker processes.
+However, Phusion Passenger assumes that all Apache worker processes are running
+as the same user. apache2-mpm-itk breaks this assumption by running multiple
+Apache worker processes as different users. So if you’re using apace2-mpm-itk,
+you should set this option to a directory that is writable by all Apache worker
+processes, such as <em>/tmp</em>.</p></div>
+<div class="paragraph"><p>You may specify <em>PassengerUploadBufferDir</em> in the following places:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+In the global server configuration.
+</p>
+</li>
+<li>
+<p>
+In a virtual host configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <span class="monospaced"><Directory></span> or <span class="monospaced"><Location></span> block.
+</p>
+</li>
+<li>
+<p>
+In <em>.htaccess</em>, if <span class="monospaced">AllowOverrides Options</span> is enabled.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
 </div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_merb" data-comment-topic="merb-iyj7qy">4.5.4. Merb</h4>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerrestartdir_lt_directory_gt"></span><h3 data-comment-topic="passengerrestartdir-directory--1fmhmv0" data-anchor="_passengerrestartdir_lt_directory_gt">6.10. PassengerRestartDir <directory></h3>
+<div class="paragraph"><p>As described in the deployment chapters of this document, Phusion Passenger
+checks the file <em>tmp/restart.txt</em> in the applications'
+<a href="#application_root">root directory</a> for restarting applications. Sometimes it
+may be desirable for Phusion Passenger to look in a different directory instead,
+for example for security reasons (see below). This option allows you to
+customize the directory in which <em>restart.txt</em> is searched for.</p></div>
+<div class="paragraph"><p>You may specify <em>PassengerRestartDir</em> in the following places:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+In the global server configuration.
+</p>
+</li>
+<li>
+<p>
+In a virtual host configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <span class="monospaced"><Directory></span> or <span class="monospaced"><Location></span> block.
+</p>
+</li>
+<li>
+<p>
+In <em>.htaccess</em>, if <span class="monospaced">AllowOverrides Options</span> is enabled.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
+<div class="paragraph"><p>You can either set it to an absolute directory, or to a directory relative to
+the <a href="#application_root">application root</a>. Examples:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>require 'rubygems'
-require 'merb-core'
+<pre><VirtualHost *:80>
+    ServerName www.foo.com
+    # Phusion Passenger will check for /apps/foo/public/tmp/restart.txt
+    DocumentRoot /apps/foo/public
+</VirtualHost>
 
-Merb::Config.setup(
-  :merb_root   => ::File.expand_path(::File.dirname(__FILE__)),
-  :environment => ENV['RACK_ENV']
-)
-Merb.environment = Merb::Config[:environment]
-Merb.root = Merb::Config[:merb_root]
-Merb::BootLoader.run
+<VirtualHost *:80>
+    ServerName www.bar.com
+    DocumentRoot /apps/bar/public
+    # An absolute filename is given; Phusion Passenger will
+    # check for /restart_files/bar/restart.txt
+    PassengerRestartDir /restart_files/bar
+</VirtualHost>
 
-run Merb::Rack::Application.new</pre>
+<VirtualHost *:80>
+    ServerName www.baz.com
+    DocumentRoot /apps/baz/public
+    # A relative filename is given; Phusion Passenger will
+    # check for /apps/baz/restart_files/restart.txt
+    #
+    # Note that this directory is relative to the APPLICATION ROOT, *not*
+    # the value of DocumentRoot!
+    PassengerRestartDir restart_files
+</VirtualHost></pre>
 </div>
 </div>
+<div class="paragraph">
+<div class="title">What are the security reasons for wanting to customize PassengerRestartDir?</div>
+<p>Touching restart.txt will cause Phusion Passenger to restart the application.
+So anybody who can touch restart.txt can effectively cause a Denial-of-Service
+attack by touching restart.txt over and over. If your web server or one of your
+web applications has the permission to touch restart.txt, and one of them has a
+security flaw which allows an attacker to touch restart.txt, then that will
+allow the attacker to cause a Denial-of-Service.</p>
+</div>
+<div class="paragraph"><p>You can prevent this from happening by pointing PassengerRestartDir to a
+directory that’s readable by Apache, but only writable by administrators.</p></div>
 </div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_ramaze" data-comment-topic="ramaze-boddtj">4.5.5. Ramaze</h4>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerBufferResponse"></span><h3 data-comment-topic="passengerbufferresponse-on-off--1y7ilka" data-anchor="PassengerBufferResponse">6.11. PassengerBufferResponse <on|off></h3>
+<div class="paragraph"><p>When turned on, application-generated responses are buffered by Apache. Buffering will
+happen in memory.</p></div>
+<div class="paragraph"><p>Before we proceed with explaining this configuration option, we want to state the following to avoid confusion. If you use Phusion Passenger for Apache, there are in fact two response buffering systems active:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+The Apache response buffering system. <span class="monospaced">PassengerBufferResponse</span> turns this on or off.
+</p>
+</li>
+<li>
+<p>
+The Phusion Passenger response buffering system, a.k.a. <em>real-time disk-backed response buffering</em>. This buffering system is always on, regardless of the value of <span class="monospaced">PassengerBufferResponse</span>.
+</p>
+</li>
+</ol></div>
+<div class="paragraph"><p>Response buffering is useful because it protects against slow HTTP clients that do not read responses immediately or quickly enough. Buffering prevents such slow clients from blocking web applications that have limited concurrency. Because Phusion Passenger’s response buffering is always turned on, you are always protected. Therefore, <span class="monospaced">PassengerBufferResponse</span> is off by default, and you never should have to turn it on.</p></div>
+<div class="paragraph"><p>If for whatever reason you want to turn Apache-level response buffering on, you can do so with this option.</p></div>
+<div class="paragraph"><p>Apache’s response buffering works differently from Phusion Passenger’s. Apache’s buffering system buffers the entire response before attempting to send it to the client, while Phusion Passenger’s attempts to send the data to the client immediately. Therefore, if you turn on <span class="monospaced">PassengerBufferResponse</span>, you may interfere with applications that want to stream responses to the client.
+Apache’s version also buffers to memory only, making it problematic for large responses. Phusion Passenger’s version buffers to disk when the response exceeds a certain threshold.</p></div>
+<div class="paragraph"><p>How does response buffering - whether it’s done by Apache or by Phusion Passenger - exactly protect against slow clients?
+Consider an HTTP client that’s on a dial-up modem link, and your
+application process generates a 2 MB response. If the response is buffered
+then your application process will be blocked until the entire 2 MB has been
+sent out to the HTTP client. This disallows your application process to do any useful
+work in the mean time. By buffering responses, Phusion Passenger or Apache will read
+the application response as quickly as possible and will take care of forwarding the data
+to slow clients.</p></div>
+<div class="paragraph"><p>So keep in mind that enabling <span class="monospaced">passenger_buffering_response</span> will make streaming responses
+impossible. Consider for example this piece of Rails code:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>require "rubygems"
-require "ramaze"
-Ramaze.trait[:essentials].delete Ramaze::Adapter
-require "start"
-Ramaze.start!
-run Ramaze::Adapter::Base</pre>
+<pre>render :text => lambda { |response, output|
+    10.times do |i|
+        output.write("entry #{i}\n")
+        output.flush
+        sleep 1
+    end
+}</pre>
 </div>
 </div>
-</div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_sinatra" data-comment-topic="sinatra-1hubto4">4.5.6. Sinatra</h4>
+<div class="paragraph"><p>…or this piece of Rack code:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>require 'rubygems'
-require 'sinatra'
-require 'app.rb'
+<pre>class Response
+    def each
+        10.times do |i|
+            yield("entry #{i}\n")
+            sleep 1
+        end
+    end
+end
 
-run Sinatra::Application</pre>
+app = lambda do |env|
+    [200, { "Content-Type" => "text/plain" }, Response.new]
+end</pre>
 </div>
 </div>
-</div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_configuring_phusion_passenger" data-comment-topic="configuring-phusion-passenger-11oztoe">5. Configuring Phusion Passenger</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>After installation, Phusion Passenger does not need any further configurations.
-Nevertheless, the system administrator may be interested in changing
-Phusion Passenger’s behavior. Phusion Passenger’s Apache module supports the
-following configuration options:</p></div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_passengerroot_lt_directory_gt" data-comment-topic="passengerroot-directory--sere8l">5.1. PassengerRoot <directory></h3>
-<div class="paragraph"><p>The location to the Phusion Passenger root directory. This configuration option
-is essential to Phusion Passenger, and allows Phusion Passenger to locate its own
-data files. The correct value is given by the installer.</p></div>
-<div class="paragraph"><p>If you’ve moved Phusion Passenger to a different directory then you need to update
-this option as well. Please read
-<a href="#moving_phusion_passenger">Moving Phusion Passenger to a different directory</a> for more information.</p></div>
-<div class="paragraph"><p>This required option may only occur once, in the global server configuration.</p></div>
-</div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerRuby" data-comment-topic="passengerruby-filename--1r3fv73">5.2. PassengerRuby <filename></h3>
-<div class="paragraph"><p>This option allows one to specify the Ruby interpreter to use.</p></div>
-<div class="paragraph"><p>This option may only occur once, in the global server configuration.
-The default is <em>ruby</em>.</p></div>
-</div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerAppRoot" data-comment-topic="passengerapproot-path-to-root--uf24yd">5.3. PassengerAppRoot <path/to/root></h3>
-<div class="paragraph"><p>By default, Phusion Passenger assumes that the application’s root directory
-is the parent directory of the <em>public</em> directory. This option allows one to
-specify the application’s root independently from the DocumentRoot, which
-is useful if the <em>public</em> directory lives in a non-standard place.</p></div>
+<div class="paragraph"><p>When <span class="monospaced">PassengerBufferResponse</span> is turned on, Apache will wait until
+the application is done sending the entire response before forwarding it
+to the client. The client will not receive anything for 10 seconds,
+after which it receives the entire response at once.
+When <span class="monospaced">PassengerBufferResponse</span> is turned off, it works as expected: the client
+receives an "entry X" message every second for 10 seconds.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -2082,107 +3482,73 @@ In a <span class="monospaced"><Directory></span> or <span class="monospace
 </li>
 <li>
 <p>
-In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span> is on.
+In <em>.htaccess</em>.
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
-<div class="paragraph"><p>Example:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre><VirtualHost test.host>
-    DocumentRoot /var/rails/zena/sites/example.com/public
-    PassengerAppRoot /var/rails/zena   # <-- normally Phusion Passenger would
-                                       #     have assumed that the application
-                                       #     root is "/var/rails/zena/sites/example.com"
-</VirtualHost></pre>
-</div>
-</div>
-</div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerSpawnMethod" data-comment-topic="passengerspawnmethod-string--sodg2y">5.4. PassengerSpawnMethod <string></h3>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/tip.png" alt="Tip">
+<img src="./images/icons/note.png" alt="Note">
 </td>
 <td class="content">
-<div class="title">"What spawn method should I use?"</div>
-<div class="paragraph"><p>This subsection attempts to describe spawn methods, but it’s okay if you don’t (want to)
-understand it, as it’s mostly a technical detail. You can basically follow this rule of thumb:</p></div>
-<div class="sidebarblock">
-<div class="content">
-<div class="paragraph"><p>If your application works on Mongrel, but not on Phusion Passenger, then set
-<span class="monospaced">PassengerSpawnMethod</span> to <em>conservative</em>. Otherwise, leave it at <em>smart-lv2</em> (the default).</p></div>
-</div>
-</div>
-<div class="paragraph"><p>However, we do recommend you to try to understand it. The <em>smart</em> and <em>smart-lv2</em> spawn
-methods bring many benefits.</p></div>
+<div class="paragraph"><p>The <a href="#PassengerBufferResponse">PassengerBufferResponse</a> directive should be turned off
+if responses can be huge. Because entire responses are buffered in memory when turned on.</p></div>
 </td>
-</tr></table>
+</tr></table>
 </div>
-<div class="paragraph"><p>Internally, Phusion Passenger spawns multiple Ruby application processes in order to handle
-requests. But there are multiple ways with which processes can be spawned, each having
-its own set of pros and cons. Supported spawn methods are:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<em>smart</em>
-</dt>
-<dd>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerRollingRestarts"></span><h3 data-comment-topic="passengerrollingrestarts" data-anchor="PassengerRollingRestarts">6.12. PassengerRollingRestarts <on|off></h3>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>Enables or disables support for rolling restarts. Normally when you
+restart an application (by touching restart.txt), Phusion Passenger would
+shut down all application processes and spawn a new one. The spawning
+of a new application process could take a while, and any requests that
+come in during this time will be blocked until this first application
+process has spawned.</p></div>
+<div class="paragraph"><p>But when rolling restarts are enabled, Phusion Passenger Enterprise will:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
 <p>
-When this spawn method is used, Phusion Passenger will attempt to cache any
-framework code (e.g. Ruby on Rails itself) and application code for a limited
-period of time. Please read <a href="#spawning_methods_explained">Spawning methods explained</a>
-for a more detailed explanation of what smart spawning exactly does.
+Spawn a new process in the background.
 </p>
-<div class="paragraph"><p><strong>Pros:</strong>
-This can significantly decrease spawn time (by as much as 90%). And, when Ruby Enterprise
-Edition is used, <a href="#reducing_memory_usage">memory usage can be reduced by 33% on average</a>.</p></div>
-<div class="paragraph"><p><strong>Cons:</strong>
-Some applications and libraries are not compatible with smart spawning.
-If that’s the case for your application, then you should use <em>conservative</em> as
-spawning method. Please read <a href="#spawning_methods_explained">Spawning methods explained</a>
-for possible compatibility issues.</p></div>
-</dd>
-<dt class="hdlist1">
-<em>smart-lv2</em>
-</dt>
-<dd>
+</li>
+<li>
 <p>
-This spawning method is similar to <em>smart</em> but it skips the framework spawner
-and uses the application spawner directly. This means the framework code is not
-cached between multiple applications, although it is still cached within
-instances of the same application. Please read
-<a href="#spawning_methods_explained">Spawning methods explained</a> for a more detailed
-explanation of what smart-lv2 spawning exactly does.
+When it’s done spawning, Phusion Passenger Enterprise will replace one of the old processes with this newly spawned one.
 </p>
-<div class="paragraph"><p><strong>Pros:</strong> It is compatible with a larger number of applications when compared to
-the <em>smart</em> method, and still performs some caching.</p></div>
-<div class="paragraph"><p><strong>Cons:</strong> It is slower than smart spawning if you have many applications which
-use the same framework version. It is therefore advised that shared hosts use the
-<em>smart</em> method instead.</p></div>
-</dd>
-<dt class="hdlist1">
-<em>conservative</em>
-</dt>
-<dd>
+</li>
+<li>
 <p>
-This spawning method is similar to the one used in Mongrel Cluster. It does not
-perform any code caching at all. Please read
-<a href="#spawning_methods_explained">Spawning methods explained</a> for a more detailed
-explanation of what conservative spawning exactly does.
+Step 1 and 2 are repeated until all processes have been replaced.
 </p>
-<div class="paragraph"><p><strong>Pros:</strong>
-Conservative spawning is guaranteed to be compatible with all applications
-and libraries.</p></div>
-<div class="paragraph"><p><strong>Cons:</strong>
-Much slower than smart spawning. Every spawn action will be equally slow, though no slower than
-the startup time of a single server in Mongrel Cluster. Conservative spawning will also
-render <a href="#reducing_memory_usage">Ruby Enterprise Edition’s memory reduction technology</a> useless.</p></div>
-</dd>
-</dl></div>
+</li>
+</ol></div>
+<div class="paragraph"><p>This way, visitors will not experience any delays when you are restarting your application. This allows you to, for example, upgrade your application often without degrading user experience.</p></div>
+<div class="paragraph"><p>Rolling restarts have a few caveat however that you should be aware of:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Upgrading an application sometimes involves upgrading the database schema.
+  With rolling restarts, there may be a point in time during which processes
+  belonging to the previous version and processes belonging to the new version
+  both exist at the same time. Any database schema upgrades you perform must
+  therefore be backwards-compatible with the old application version.
+</p>
+</li>
+<li>
+<p>
+Because there’s no telling which process will serve a request, users may
+  not see changes brought about by the new version until all processes have
+  been restarted. It is for this reason that you should not use rolling
+  restarts in development, only in production.
+</p>
+</li>
+</ul></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -2193,14 +3559,46 @@ In the global server configuration.
 In a virtual host configuration block.
 </p>
 </li>
+<li>
+<p>
+In a <span class="monospaced"><Directory></span> or <span class="monospaced"><Location></span> block.
+</p>
+</li>
+<li>
+<p>
+In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span> is on.
+</p>
+</li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>smart-lv2</em>.</p></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerUseGlobalQueue" data-comment-topic="passengeruseglobalqueue-on-off--1ki369">5.5. PassengerUseGlobalQueue <on|off></h3>
-<div class="paragraph"><p>Turns the use of global queuing on or off.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerresistdeploymenterrors_lt_on_off_gt"></span><h3 data-comment-topic="passengerresistdeploymenterrors" data-anchor="_passengerresistdeploymenterrors_lt_on_off_gt">6.13. PassengerResistDeploymentErrors <on|off></h3>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>Enables or disables resistance against deployment errors.</p></div>
+<div class="paragraph"><p>Suppose you’ve upgraded your application and you’ve issues a command to restart it (by touching restart.txt), but the application code contains an error that prevents Phusion Passenger from successfully spawning a process (e.g. a syntax error). Phusion Passenger would normally display an error message in response to this.</p></div>
+<div class="paragraph"><p>By enabling deployment error resistance, Phusion Passenger Enterprise would instead do this:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+It passes the request to one of the existing application processes (that belong to the previous version of the application). The visitor will not see a Phusion Passenger process spawning error message.
+</p>
+</li>
+<li>
+<p>
+It logs the error to the global web server error log file.
+</p>
+</li>
+<li>
+<p>
+It sets an internal flag so that no processes for this application will be spawned (even when the current traffic would normally result in more processes being spawned) and no processes will be idle cleaned. Processes <strong>could</strong> still be shutdown because of other events, e.g. because their <a href="#PassengerMemoryLimit">memory limit</a> have been reached.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>This way, visitors will suffer minimally from deployment errors. Phusion Passenger will attempt to restart the application again next time restart.txt is touched.</p></div>
+<div class="paragraph"><p>Enabling deployment error resistance only works if <a href="#PassengerRollingRestarts">rolling restart</a> is also enabled.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -2211,112 +3609,111 @@ In the global server configuration.
 In a virtual host configuration block.
 </p>
 </li>
-</ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>on</em>.</p></div>
-<div class="paragraph"><p><em>This feature is sponsored by <a href="http://www.37signals.com/">37signals</a>.</em></p></div>
-<div class="paragraph">
-<div class="title">What does this option do?</div>
-<p>Recall that Phusion Passenger spawns multiple backend processes (e.g. multiple
-Ruby on Rails processes), each which processes HTTP requests serially. One of
-Phusion Passenger’s jobs is to forward HTTP requests to a suitable backend
-process. A backend process may take an arbitrary amount of time to process a
-specific HTTP request. If the websites are (temporarily) under high load, and
-the backend processes cannot process the requests fast enough, then some
-requests may have to be queued.</p>
-</div>
-<div class="paragraph"><p>If global queuing is turned off, then Phusion Passenger will use <em>fair load
-balancing</em>. This means that each backend process will have its own private
-queue. Phusion Passenger will forward an HTTP request to the backend process
-that has the least amount of requests in its queue.</p></div>
-<div class="paragraph"><p>If global queuing is turned on, then Phusion Passenger will use a global queue
-that’s shared between all backend processes. If an HTTP request comes in, and
-all the backend processes are still busy, then Phusion Passenger will wait until
-at least one backend process is done, and will then forward the request to that
-process.</p></div>
-<div class="paragraph">
-<div class="title">When to turn on global queuing?</div>
-<p>You should turn on global queuing if one of your web applications may have
-long-running requests.</p>
-</div>
-<div class="paragraph"><p>For example suppose that:</p></div>
-<div class="ulist"><ul>
 <li>
 <p>
-global queuing is turned off.
+In a <span class="monospaced"><Directory></span> or <span class="monospaced"><Location></span> block.
 </p>
 </li>
 <li>
 <p>
-we’re currently in a state where all backend processes have 3 requests in
-  their queue, except for a single backend process, which has 1 request in its
-  queue.
+In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span> is on.
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>The situation looks like this:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>Backend process A:  [*     ]  (1 request in queue)
-Backend process B:  [***   ]  (3 requests in queue)
-Backend process C:  [***   ]  (3 requests in queue)
-Backend process D:  [***   ]  (3 requests in queue)</pre>
-</div>
-</div>
-<div class="paragraph"><p>Each process is currently serving short-running requests.</p></div>
-<div class="paragraph"><p>Phusion Passenger will forward the next request to backend process A. A will
-now have 2 items in its queue. We’ll mark this new request with an X:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>Backend process A:  [*X    ]  (2 request in queue)
-Backend process B:  [***   ]  (3 requests in queue)
-Backend process C:  [***   ]  (3 requests in queue)
-Backend process D:  [***   ]  (3 requests in queue)</pre>
-</div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
 </div>
-<div class="paragraph"><p>Assuming that B, C and D still aren’t done with their current request, the next
-HTTP request - let’s call this Y - will be forwarded to backend process A as
-well, because it has the least number of items in its queue:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>Backend process A:  [*XY   ]  (3 requests in queue)
-Backend process B:  [***   ]  (3 requests in queue)
-Backend process C:  [***   ]  (3 requests in queue)
-Backend process D:  [***   ]  (3 requests in queue)</pre>
-</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_security_options"></span><h3 data-comment-topic="security-options-1pb75ho" data-anchor="_security_options">6.14. Security options</h3>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerUserSwitching"></span><h4 data-comment-topic="passengeruserswitching" data-anchor="PassengerUserSwitching">6.14.1. PassengerUserSwitching <on|off></h4>
+<div class="paragraph"><p>Whether to enable <a href="#user_switching">user switching support</a>.</p></div>
+<div class="paragraph"><p>This option may only occur once, in the global server configuration.
+The default value is <em>on</em>.</p></div>
 </div>
-<div class="paragraph"><p>But if request X happens to be a long-running request that needs 60 seconds to
-complete, then we’ll have a problem. Y won’t be processed for at least 60
-seconds. It would have been a better idea if Y was forward to processes B, C or
-D instead, because they only have short-living requests in their queues.</p></div>
-<div class="paragraph"><p>This problem will be avoided entirely if you turn global queuing on. With global
-queuing, all backend processes will share the same queue. The first backend
-process that becomes available will take from the queue, and so this
-“queuing-behind-long-running-request” problem will never occur.</p></div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerUser"></span><h4 data-comment-topic="passengeruser" data-anchor="PassengerUser">6.14.2. PassengerUser <username></h4>
+<div class="paragraph"><p>If <a href="#user_switching">user switching support</a> is enabled, then Phusion Passenger will
+by default run the web application as the owner of the file <em>config/environment.rb</em>
+(for Rails apps) or <em>config.ru</em> (for Rack apps). This option allows you to override
+that behavior and explicitly set a user to run the web application as, regardless
+of the ownership of <em>environment.rb</em>/<em>config.ru</em>.</p></div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+In the global server configuration.
+</p>
+</li>
+<li>
+<p>
+In a virtual host configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <span class="monospaced"><Directory></span> or <span class="monospaced"><Location></span> block.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_passengerenabled_lt_on_off_gt" data-comment-topic="passengerenabled-on-off--74rzth">5.6. PassengerEnabled <on|off></h3>
-<div class="paragraph"><p>You can set this option to <em>off</em> to completely disable Phusion Passenger for
-a certain location. This is useful if, for example, you want to integrate a PHP
-application into the same virtual host as a Rails application.</p></div>
-<div class="paragraph"><p>Suppose that you have a Rails application in <em>/apps/foo</em>. Suppose that you’ve
-dropped Wordpress — a blogging application written in PHP — in
-<em>/apps/foo/public/wordpress</em>. You can then configure Phusion Passenger as
-follows:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre><VirtualHost *:80>
-    ServerName www.foo.com
-    DocumentRoot /apps/foo/public
-    <Directory /apps/foo/public/wordpress>
-        PassengerEnabled off
-        AllowOverride all      # <-- Makes Wordpress's .htaccess file work.
-    </Directory>
-</VirtualHost></pre>
-</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerGroup"></span><h4 data-comment-topic="passengergroup" data-anchor="PassengerGroup">6.14.3. PassengerGroup <group name></h4>
+<div class="paragraph"><p>If <a href="#user_switching">user switching support</a> is enabled, then Phusion Passenger will
+by default run the web application as the primary group of the owner of the file
+<em>config/environment.rb</em> (for Rails apps) or <em>config.ru</em> (for Rack apps). This option
+allows you to override that behavior and explicitly set a group to run the web application
+as, regardless of the ownership of <em>environment.rb</em>/<em>config.ru</em>.</p></div>
+<div class="paragraph"><p><em><group name></em> may also be set to the special value <em>!STARTUP_FILE!</em>, in which case
+the web application’s group will be set to <em>environment.rb</em>/<em>config.ru</em>'s group.</p></div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+In the global server configuration.
+</p>
+</li>
+<li>
+<p>
+In a virtual host configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <span class="monospaced"><Directory></span> or <span class="monospaced"><Location></span> block.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
 </div>
-<div class="paragraph"><p>This way, Phusion Passenger will not interfere with Wordpress.</p></div>
-<div class="paragraph"><p><em>PassengerEnabled</em> may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerDefaultUser"></span><h4 data-comment-topic="passengerdefaultuser" data-anchor="PassengerDefaultUser">6.14.4. PassengerDefaultUser <username></h4>
+<div class="paragraph"><p>Phusion Passenger enables <a href="#user_switching">user switching support</a> by default.
+This configuration option allows one to specify the user that applications must
+run as, if user switching fails or is disabled.</p></div>
+<div class="paragraph"><p>This option may only occur once, in the global server configuration.
+The default value is <em>nobody</em>.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerDefaultGroup"></span><h4 data-comment-topic="passengerdefaultgroup" data-anchor="PassengerDefaultGroup">6.14.5. PassengerDefaultGroup <group name></h4>
+<div class="paragraph"><p>Phusion Passenger enables <a href="#user_switching">user switching support</a> by default.
+This configuration option allows one to specify the group that applications must
+run as, if user switching fails or is disabled.</p></div>
+<div class="paragraph"><p>This option may only occur once, in the global server configuration.
+The default value is the primary group of the user specifified by
+<a href="#PassengerDefaultUser">PassengerDefaultUser</a>.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerFriendlyErrorPages"></span><h4 data-comment-topic="passengerfriendlyerrorpages" data-anchor="PassengerFriendlyErrorPages">6.14.6. PassengerFriendlyErrorPages <on|off></h4>
+<div class="paragraph"><p>Phusion Passenger can display friendly error pages whenever an application fails
+to start. This friendly error page presents the startup error message, some
+suggestions for solving the problem, and a backtrace. This feature is very useful
+during application development and useful for less experienced system administrators,
+but the page might reveal potentially sensitive information, depending on the
+application. Experienced system administrators who are using Phusion Passenger
+on serious production servers should consider turning this feature off.</p></div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -2334,61 +3731,73 @@ In a <span class="monospaced"><Directory></span> or <span class="monospace
 </li>
 <li>
 <p>
-In <em>.htaccess</em>.
+In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span> is on.
 </p>
 </li>
 </ul></div>
 <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>on</em>.</p></div>
 </div>
+</div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerTempDir" data-comment-topic="passengertempdir-directory--68h2ng">5.7. PassengerTempDir <directory></h3>
-<div class="paragraph"><p>Specifies the directory that Phusion Passenger should use for storing temporary
-files. This includes things such as Unix socket files, buffered file uploads
-(see also <a href="#PassengerUploadBufferDir">PassengerUploadBufferDir</a>), etc.</p></div>
-<div class="paragraph"><p>This option may be specified once, in the global server configuration. The
-default temp directory that Phusion Passenger uses is <em>/tmp</em>.</p></div>
-<div class="paragraph"><p>This option is especially useful if Apache is not allowed to write to /tmp
-(which is the case on some systems with strict SELinux policies) or if the
-partition that /tmp lives on doesn’t have enough disk space.</p></div>
-<div class="paragraph">
-<div class="title">Command line tools</div>
-<p>Some Phusion Passenger command line administration tools, such as
-<span class="monospaced">passenger-status</span>, must know what Phusion Passenger’s temp directory is
-in order to function properly. You can pass the directory through the
-<span class="monospaced">PASSENGER_TMPDIR</span> environment variable, or the <span class="monospaced">TMPDIR</span> environment variable
-(the former will be used if both are specified).</p>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_resource_control_and_optimization_options"></span><h3 data-comment-topic="resource-control-and-optimization-options-zu2f7u" data-anchor="_resource_control_and_optimization_options">6.15. Resource control and optimization options</h3>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengermaxpoolsize_lt_integer_gt"></span><h4 data-comment-topic="passengermaxpoolsize-integer--am64q8" data-anchor="_passengermaxpoolsize_lt_integer_gt">6.15.1. PassengerMaxPoolSize <integer></h4>
+<div class="paragraph"><p>The maximum number of <a href="#application_process">application processes</a> that may
+simultaneously exist. A larger number results in higher memory usage,
+but improves the ability to handle concurrent HTTP requests.</p></div>
+<div class="paragraph"><p>The optimal value depends on your system’s hardware and your workload. You can learn more at the Phusion article <a href="http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/">Tuning Phusion Passenger’s concurrency settings</a>.</p></div>
+<div class="paragraph"><p>If you find that your server is running out of memory then you should lower this value.</p></div>
+<div class="paragraph"><p>This option may only occur once, in the global server configuration.
+The default value is <em>6</em>.</p></div>
 </div>
-<div class="paragraph"><p>For example, if you set <em>PassengerTempDir</em> to <em>/my_temp_dir</em>, then invoke
-<span class="monospaced">passenger-status</span> after you’ve set the <span class="monospaced">PASSENGER_TMPDIR</span> or <span class="monospaced">TMPDIR</span>
-environment variable, like this:</p></div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMinInstances"></span><h4 data-comment-topic="passengermininstances-integer--wegq6b" data-anchor="PassengerMinInstances">6.15.2. PassengerMinInstances <integer></h4>
+<div class="paragraph"><p>This specifies the minimum number of application processes that should exist for a
+given application. You should set this option to a
+non-zero value if you want to avoid potentially long startup times after a website
+has been <a href="#idle_process">idle</a> for an extended period.</p></div>
+<div class="paragraph"><p>Please note that this option does <strong>not</strong> pre-start application processes during Apache
+startup. It just makes sure that when the application is first accessed:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+at least the given number of processes will be spawned.
+</p>
+</li>
+<li>
+<p>
+the given number of processes will be kept around even when processes are being
+   idle cleaned (see <a href="#PassengerPoolIdleTime">PassengerPoolIdleTime</a>).
+</p>
+</li>
+</ol></div>
+<div class="paragraph"><p>If you want to pre-start application processes during Apache startup, then you should use the <a href="#PassengerPreStart">PassengerPreStart</a> directive, possibly in combination with
+<em>PassengerMinInstances</em>. This behavior might seem counter-intuitive at first sight,
+but <a href="#PassengerPreStart">PassengerPreStart</a> explains the rationale behind it.</p></div>
+<div class="paragraph"><p>For example, suppose that you have the following configuration:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>export PASSENGER_TMPDIR=/my_temp-dir
-sudo -E passenger-status
-# The -E option tells 'sudo' to preserve environment variables.</pre>
+<pre>PassengerMaxPoolSize 15
+PassengerPoolIdleTime 10
+
+<VirtualHost *:80>
+    ServerName foobar.com
+    DocumentRoot /webapps/foobar/public
+    PassengerMinInstances 3
+</VirtualHost></pre>
 </div>
 </div>
-</div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerUploadBufferDir" data-comment-topic="passengeruploadbufferdir-directory--kdr8at">5.8. PassengerUploadBufferDir <directory></h3>
-<div class="paragraph"><p>Phusion Passenger buffers large file uploads to disk in order prevent slow file
-uploads from blocking web applications. By default, a subdirectory in the
-system’s temporary files directory (or a subdirectory in the directory specified
-in <a href="#PassengerTempDir">PassengerTempDir</a>, if set) is automatically created for
-storing these buffered file uploads.</p></div>
-<div class="paragraph"><p>This configuration directive allows you to specify a different directory for storing
-buffered file uploads. If you’ve specified such a directory (as opposed to using
-Phusion Passenger’s default) then you <strong>must</strong> ensure that this directory exists.</p></div>
-<div class="paragraph"><p>This configuration directive is also useful if you’re using apache2-mpm-itk.
-The buffered file upload directory that Phusion Passenger creates by default has
-very strict permissions: it can only be accessed by the Apache worker processes.
-However, Phusion Passenger assumes that all Apache worker processes are running
-as the same user. apache2-mpm-itk breaks this assumption by running multiple
-Apache worker processes as different users. So if you’re using apace2-mpm-itk,
-you should set this option to a directory that is writable by all Apache worker
-processes, such as <em>/tmp</em>.</p></div>
-<div class="paragraph"><p>You may specify <em>PassengerUploadBufferDir</em> in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="paragraph"><p>When you start Apache, there are 0 application processes for <em>foobar.com</em>. Things will
+stay that way until someone visits <em>foobar.com</em>. Suppose that there is only 1 visitor.
+1 application process will be started immediately to serve the visitor, while 2 will
+be spawned in the background. After 10 seconds, when the idle timeout has
+been reached, these 3 application processes will not be cleaned up.</p></div>
+<div class="paragraph"><p>Now suppose that there’s a sudden spike of traffic, and 100 users visit <em>foobar.com</em>
+simultanously. Phusion Passenger will start 12 more application processes. After the idle
+timeout of 10 seconds have passed, Phusion Passenger will clean up 12 application
+processes, keeping 3 processes around.</p></div>
+<div class="paragraph"><p>The PassengerMinInstances option may occur in the following places:</p></div>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -2406,22 +3815,24 @@ In a <span class="monospaced"><Directory></span> or <span class="monospace
 </li>
 <li>
 <p>
-In <em>.htaccess</em>, if <span class="monospaced">AllowOverrides Options</span> is enabled.
+In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Limits</span> is on.
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1</em>.</p></div>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_passengerrestartdir_lt_directory_gt" data-comment-topic="passengerrestartdir-directory--1fmhmv0">5.9. PassengerRestartDir <directory></h3>
-<div class="paragraph"><p>As described in the deployment chapters of this document, Phusion Passenger
-checks the file <em>tmp/restart.txt</em> in the applications'
-<a href="#application_root">root directory</a> for restarting applications. Sometimes it
-may be desirable for Phusion Passenger to look in a different directory instead,
-for example for security reasons (see below). This option allows you to
-customize the directory in which <em>restart.txt</em> is searched for.</p></div>
-<div class="paragraph"><p>You may specify <em>PassengerRestartDir</em> in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengermaxinstances_lt_integer_gt"></span><h4 data-comment-topic="passengermaxinstances" data-anchor="_passengermaxinstances_lt_integer_gt">6.15.3. PassengerMaxInstances <integer></h4>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>The maximum number of application processes that may simultaneously exist
+for an application. This helps to make sure that a single application
+will not occupy all available slots in the application pool.</p></div>
+<div class="paragraph"><p>This value must be less than <a href="#PassengerMaxPoolSize">PassengerMaxPoolSize</a>. A value of 0
+means that there is no limit placed on the number of processes a single application
+may spawn, i.e. only the global limit of <a href="#PassengerMaxPoolSize">PassengerMaxPoolSize</a>
+will be enforced.</p></div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -2432,109 +3843,116 @@ In the global server configuration.
 In a virtual host configuration block.
 </p>
 </li>
-<li>
-<p>
-In a <span class="monospaced"><Directory></span> or <span class="monospaced"><Location></span> block.
-</p>
-</li>
-<li>
-<p>
-In <em>.htaccess</em>, if <span class="monospaced">AllowOverrides Options</span> is enabled.
-</p>
-</li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
-<div class="paragraph"><p>You can either set it to an absolute directory, or to a directory relative to
-the <a href="#application_root">application root</a>. Examples:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre><VirtualHost *:80>
-    ServerName www.foo.com
-    # Phusion Passenger will check for /apps/foo/public/tmp/restart.txt
-    DocumentRoot /apps/foo/public
-</VirtualHost>
-
-<VirtualHost *:80>
-    ServerName www.bar.com
-    DocumentRoot /apps/bar/public
-    # An absolute filename is given; Phusion Passenger will
-    # check for /restart_files/bar/restart.txt
-    PassengerRestartDir /restart_files/bar
-</VirtualHost>
-
-<VirtualHost *:80>
-    ServerName www.baz.com
-    DocumentRoot /apps/baz/public
-    # A relative filename is given; Phusion Passenger will
-    # check for /apps/baz/restart_files/restart.txt
-    #
-    # Note that this directory is relative to the APPLICATION ROOT, *not*
-    # the value of DocumentRoot!
-    PassengerRestartDir restart_files
-</VirtualHost></pre>
-</div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>0</em>.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/tip.png" alt="Tip">
+</td>
+<td class="content">
+<div class="title">Practical usage example</div>
+<div class="paragraph"><p>Suppose that you’re hosting two web applications on your server, a personal
+blog and an e-commerce website. You’ve set <a href="#PassengerMaxPoolSize">PassengerMaxPoolSize</a>
+to 10. The e-commerce website is more important to you. You can then set
+<em>PassengerMaxInstances</em> to 3 for your blog, so that it will never spawn more
+than 3 processes, even if it suddenly gets a lot of traffic. Your e-commerce website
+on the other hand will be free to spawn up to 10 processes if it gets a lot of traffic.</p></div>
+</td>
+</tr></table>
 </div>
-<div class="paragraph">
-<div class="title">What are the security reasons for wanting to customize PassengerRestartDir?</div>
-<p>Touching restart.txt will cause Phusion Passenger to restart the application.
-So anybody who can touch restart.txt can effectively cause a Denial-of-Service
-attack by touching restart.txt over and over. If your web server or one of your
-web applications has the permission to touch restart.txt, and one of them has a
-security flaw which allows an attacker to touch restart.txt, then that will
-allow the attacker to cause a Denial-of-Service.</p>
 </div>
-<div class="paragraph"><p>You can prevent this from happening by pointing PassengerRestartDir to a
-directory that’s readable by Apache, but only writable by administrators.</p></div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengermaxinstancesperapp_lt_integer_gt"></span><h4 data-comment-topic="passengermaxinstancesperapp" data-anchor="_passengermaxinstancesperapp_lt_integer_gt">6.15.4. PassengerMaxInstancesPerApp <integer></h4>
+<div class="paragraph"><p>The maximum number of application processes that may simultaneously exist
+for a single application. This helps to make sure that a single application
+will not occupy all available slots in the application pool.</p></div>
+<div class="paragraph"><p>This value must be less than <a href="#PassengerMaxPoolSize">PassengerMaxPoolSize</a>. A value of 0
+means that there is no limit placed on the number of processes a single application
+may use, i.e. only the global limit of <a href="#PassengerMaxPoolSize">PassengerMaxPoolSize</a>
+will be enforced.</p></div>
+<div class="paragraph"><p>This option may only occur once, in the global server configuration.
+The default value is <em>0</em>.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/tip.png" alt="Tip">
+</td>
+<td class="content">
+<div class="title">Practical usage example</div>
+<div class="paragraph"><p>Suppose that you’re hosting two blogs (blog A and B) on your server, and that
+you’ve set <a href="#PassengerMaxPoolSize">PassengerMaxPoolSize</a> to 10. Under normal
+circumstances, if blog A suddenly gets a lot of traffic, then A will use all 10
+pool slots. If blog B suddenly gets some traffic, then it will only be able to
+use 1 pool slot (forcefully releasing 1 slot from A) until A’s traffic has
+settled down and it has released more pool slots.</p></div>
+<div class="paragraph"><p>If you consider both blogs equally important, then you can set
+<em>PassengerMaxInstancesPerApp</em> to 5. This way, both blogs will never use more
+than 5 pool slots.</p></div>
+</td>
+</tr></table>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerBufferResponse" data-comment-topic="passengerbufferresponse-on-off--1y7ilka">5.10. PassengerBufferResponse <on|off></h3>
-<div class="paragraph"><p>When turned on, application-generated responses are buffered in memory. By buffering
-responses, protection is provided against slow HTTP clients that can not read your
-response immediately.</p></div>
-<div class="paragraph"><p>For example, consider an HTTP client that’s on a dial-up modem link, and your
-application instance generates a 2 MB response. If response buffering is turned
-off then your application instance will be blocked until the entire 2 MB has been
-sent out to the HTTP client. This disallows your application instance to do any useful
-work in the mean time. By enabling response buffering, Phusion Passenger will read
-the application response as quickly as possible and will take care of slow clients.</p></div>
-<div class="paragraph"><p>However, keep in mind that enabling this option will make streaming responses
-impossible. Consider for example this piece of Rails code:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>render :text => lambda { |response, output|
-    10.times do |i|
-        output.write("entry #{i}\n")
-        output.flush
-        sleep 1
-    end
-}</pre>
-</div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">
+<div class="title">Relation with PassengerMaxInstances</div>
+<div class="paragraph"><p>Unlike <a href="#PassengerMaxInstances">PassengerMaxInstances</a>, this configuration
+option is global and applies to all applications. <em>PassengerMaxInstances</em> on the
+other hand is per-virtual host.</p></div>
+<div class="paragraph"><p>Suppose that you’re hosting two web applications on your server, a personal
+blog and an e-commerce website. You’ve set <a href="#PassengerMaxPoolSize">PassengerMaxPoolSize</a>
+to 10. The e-commerce website is more important to you. You can then set
+<em>PassengerMaxInstances</em> to 3 for your blog, so that it will never use more than
+3 pool slots, even if it suddenly gets a lot of traffic. Your e-commerce website
+on the other hand will be free to use up all 10 slots if it gets a lot of traffic.</p></div>
+<div class="paragraph"><p>In summary, <em>PassengerMaxInstancesPerApp</em> divides the pool equally among the
+different web applications, while <em>PassengerMaxInstances</em> allows one to divide
+the pool unequally, according to each web application’s relative importance.</p></div>
+</td>
+</tr></table>
 </div>
-<div class="paragraph"><p>…or this piece of Rack code:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>class Response
-    def each
-        10.times do |i|
-            yield("entry #{i}\n")
-            sleep 1
-        end
-    end
-end
-
-app = lambda do |env|
-    [200, { "Content-Type" => "text/plain" }, Response.new]
-end</pre>
-</div>
 </div>
-<div class="paragraph"><p>When response buffering is turned on, Phusion Passenger will wait until
-the application is done sending the entire response before forwarding it
-to the client. The client will not receive anything for 10 seconds,
-after which it receives the entire response at once.
-When response buffering is turned off, it works as expected: the client
-receives an "entry X" message every second for 10 seconds.</p></div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerPoolIdleTime"></span><h4 data-comment-topic="passengerpoolidletime-integer--a3gunq" data-anchor="PassengerPoolIdleTime">6.15.5. PassengerPoolIdleTime <integer></h4>
+<div class="paragraph"><p>The maximum number of seconds that an application process may be idle. That is,
+if an application process hasn’t received any traffic after the given number of
+seconds, then it will be shutdown in order to conserve memory.</p></div>
+<div class="paragraph"><p>Decreasing this value means that applications will have to be spawned
+more often. Since spawning is a relatively slow operation, some visitors may
+notice a small delay when they visit your Rails/Rack website. However, it will also
+free up resources used by applications more quickly.</p></div>
+<div class="paragraph"><p>The optimal value depends on the average time that a visitor spends on a single
+Rails/Rack web page. We recommend a value of <span class="monospaced">2 * x</span>, where <span class="monospaced">x</span> is the average
+number of seconds that a visitor spends on a single Rails/Rack web page. But your
+mileage may vary.</p></div>
+<div class="paragraph"><p>When this value is set to <em>0</em>, application processes will not be shutdown unless
+it’s really necessary, i.e. when Phusion Passenger is out of application processes
+for a given application and one of the <a href="#inactive_process">inactive application processes</a> needs to
+make place for another application process. Setting the value to 0 is
+recommended if you’re on a non-shared host that’s only running a few
+applications, each which must be available at all times.</p></div>
+<div class="paragraph"><p>This option may only occur once, in the global server configuration.
+The default value is <em>300</em>.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMaxPreloaderIdleTime"></span><h4 data-comment-topic="railsappspawneridletime-integer--1awgog1" data-anchor="PassengerMaxPreloaderIdleTime">6.15.6. PassengerMaxPreloaderIdleTime <integer></h4>
+<div class="paragraph"><p>The ApplicationSpawner server (explained in <a href="#spawning_methods_explained">Spawning methods explained</a>) has an idle timeout, just like the backend processes spawned by
+Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done
+anything for a given period.</p></div>
+<div class="paragraph"><p>This option allows you to set the ApplicationSpawner server’s idle timeout, in
+seconds. A value of <em>0</em> means that it should never idle timeout.</p></div>
+<div class="paragraph"><p>Setting a higher value will mean that the ApplicationSpawner server is kept around
+longer, which may slightly increase memory usage. But as long as the
+ApplicationSpawner server is running, the time to spawn a Ruby on Rails backend
+process only takes about 10% of the time that is normally needed, assuming that
+you’re using the <em>smart</em> or <em>smart-lv2</em> <a href="#PassengerSpawnMethod">spawning method</a>. So if your
+system has enough memory, is it recommended that you set this option to a high
+value or to <em>0</em>.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -2545,47 +3963,27 @@ In the global server configuration.
 In a virtual host configuration block.
 </p>
 </li>
+</ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>300</em> (5 minutes).</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerConcurrencyModel"></span><h4 data-comment-topic="passengerconcurrencymodel-process-thread--1eipofj" data-anchor="PassengerConcurrencyModel">6.15.7. PassengerConcurrencyModel <process|thread></h4>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 4.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>Specifies the I/O concurrency model that should be used for application processes. Phusion Passenger supports two concurrency models:</p></div>
+<div class="ulist"><ul>
 <li>
 <p>
-In a <span class="monospaced"><Directory></span> or <span class="monospaced"><Location></span> block.
+<em>process</em> - single-threaded, multi-processed I/O concurrency. Each application process only has a single thread and can only handle 1 request at a time. This is the concurrency model that Ruby applications traditionally used. It has excellent compatiblity (can work with applications that are not designed to be thread-safe) but is unsuitable workloads in which the application has to wait for a lot of external I/O (e.g. HTTP API calls), and uses more memory because each process has  [...]
 </p>
 </li>
 <li>
 <p>
-In <em>.htaccess</em>.
+<em>thread</em> - multi-threaded, multi-processed I/O concurrency. Each application process has multiple threads (customizable via <a href="#PassengerThreadCount">PassengerThreadCount</a>). This model provides much better I/O concurrency and uses less memory because threads share memory with each other within the same process. However, using this model may cause compatibility problems if the application is not designed to be thread-safe.
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>on</em>.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<img src="./images/icons/note.png" alt="Note">
-</td>
-<td class="content">
-<div class="paragraph"><p>The <a href="#PassengerBufferResponse">PassengerBufferResponse</a> directive should be turned off
-if responses can be huge. Because entire responses are buffered in memory when turned on.</p></div>
-</td>
-</tr></table>
-</div>
-</div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_security_options" data-comment-topic="security-options-1pb75ho">5.11. Security options</h3>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerUserSwitching" data-comment-topic="passengeruserswitching-on-off--100dc63">5.11.1. PassengerUserSwitching <on|off></h4>
-<div class="paragraph"><p>Whether to enable <a href="#user_switching">user switching support</a>.</p></div>
-<div class="paragraph"><p>This option may only occur once, in the global server configuration.
-The default value is <em>on</em>.</p></div>
-</div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengeruser_lt_username_gt" data-comment-topic="passengeruser-username--iw6865">5.11.2. PassengerUser <username></h4>
-<div class="paragraph"><p>If <a href="#user_switching">user switching support</a> is enabled, then Phusion Passenger will
-by default run the web application as the owner of the file <em>config/environment.rb</em>
-(for Rails apps) or <em>config.ru</em> (for Rack apps). This option allows you to override
-that behavior and explicitly set a user to run the web application as, regardless
-of the ownership of <em>environment.rb</em>/<em>config.ru</em>.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -2601,20 +3999,20 @@ In a virtual host configuration block.
 In a <span class="monospaced"><Directory></span> or <span class="monospaced"><Location></span> block.
 </p>
 </li>
+<li>
+<p>
+In <em>.htaccess</em>.
+</p>
+</li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>process</em>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengergroup_lt_group_name_gt" data-comment-topic="passengergroup-group-name--1ciwtix">5.11.3. PassengerGroup <group name></h4>
-<div class="paragraph"><p>If <a href="#user_switching">user switching support</a> is enabled, then Phusion Passenger will
-by default run the web application as the primary group of the owner of the file
-<em>config/environment.rb</em> (for Rails apps) or <em>config.ru</em> (for Rack apps). This option
-allows you to override that behavior and explicitly set a group to run the web application
-as, regardless of the ownership of <em>environment.rb</em>/<em>config.ru</em>.</p></div>
-<div class="paragraph"><p><em><group name></em> may also be set to the special value <em>!STARTUP_FILE!</em>, in which case
-the web application’s group will be set to <em>environment.rb</em>/<em>config.ru</em>'s group.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerThreadCount"></span><h4 data-comment-topic="passengerthreadcount-number--10jl64a" data-anchor="PassengerThreadCount">6.15.8. PassengerThreadCount <number></h4>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 4.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>Specifies the number of threads that Phusion Passenger should spawn per application process. This option only has effect if <a href="#PassengerConcurrencyModel">PassengerConcurrencyModel</a> is <em>thread</em>.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -2630,37 +4028,26 @@ In a virtual host configuration block.
 In a <span class="monospaced"><Directory></span> or <span class="monospaced"><Location></span> block.
 </p>
 </li>
+<li>
+<p>
+In <em>.htaccess</em>.
+</p>
+</li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
-</div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerDefaultUser" data-comment-topic="passengerdefaultuser-username--nbjs8w">5.11.4. PassengerDefaultUser <username></h4>
-<div class="paragraph"><p>Phusion Passenger enables <a href="#user_switching">user switching support</a> by default.
-This configuration option allows one to specify the user that applications must
-run as, if user switching fails or is disabled.</p></div>
-<div class="paragraph"><p>This option may only occur once, in the global server configuration.
-The default value is <em>nobody</em>.</p></div>
-</div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerDefaultGroup" data-comment-topic="passengerdefaultgroup-group-name--1xwd1xj">5.11.5. PassengerDefaultGroup <group name></h4>
-<div class="paragraph"><p>Phusion Passenger enables <a href="#user_switching">user switching support</a> by default.
-This configuration option allows one to specify the group that applications must
-run as, if user switching fails or is disabled.</p></div>
-<div class="paragraph"><p>This option may only occur once, in the global server configuration.
-The default value is the primary group of the user specifified by
-<a href="#PassengerDefaultUser">PassengerDefaultUser</a>.</p></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1</em>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengerfriendlyerrorpages_lt_on_off_gt" data-comment-topic="passengerfriendlyerrorpages-on-off--rdq45f">5.11.6. PassengerFriendlyErrorPages <on|off></h4>
-<div class="paragraph"><p>Phusion Passenger can display friendly error pages whenever an application fails
-to start. This friendly error page presents the startup error message, some
-suggestions for solving the problem, and a backtrace. This feature is very useful
-during application development and useful for less experienced system administrators,
-but the page might reveal potentially sensitive information, depending on the
-application. Experienced system administrators who are using Phusion Passenger
-on serious production servers should consider turning this feature off.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMaxRequests"></span><h4 data-comment-topic="passengermaxrequests-integer--17qkw9n" data-anchor="PassengerMaxRequests">6.15.9. PassengerMaxRequests <integer></h4>
+<div class="paragraph"><p>The maximum number of requests an application process will process. After
+serving that many requests, the application process will be shut down and
+Phusion Passenger will restart it. A value of 0 means that there is no maximum:
+an application process will thus be shut down when its idle timeout has been
+reached.</p></div>
+<div class="paragraph"><p>This option is useful if your application is leaking memory. By shutting
+it down after a certain number of requests, all of its memory is guaranteed
+to be freed by the operating system.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -2678,90 +4065,36 @@ In a <span class="monospaced"><Directory></span> or <span class="monospace
 </li>
 <li>
 <p>
-In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span> is on.
+In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Limits</span> is on.
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>on</em>.</p></div>
-</div>
-</div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_resource_control_and_optimization_options" data-comment-topic="resource-control-and-optimization-options-zu2f7u">5.12. Resource control and optimization options</h3>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengermaxpoolsize_lt_integer_gt" data-comment-topic="passengermaxpoolsize-integer--am64q8">5.12.1. PassengerMaxPoolSize <integer></h4>
-<div class="paragraph"><p>The maximum number of Ruby on Rails or Rack application instances that may
-be simultaneously active. A larger number results in higher memory usage,
-but improved ability to handle concurrent HTTP clients.</p></div>
-<div class="paragraph"><p>The optimal value depends on your system’s hardware and the server’s average
-load. You should experiment with different values. But generally speaking,
-the value should be at least equal to the number of CPUs (or CPU cores) that
-you have. If your system has 2 GB of RAM, then we recommend a value of <em>30</em>.
-If your system is a Virtual Private Server (VPS) and has about 256 MB RAM, and
-is also running other services such as MySQL, then we recommend a value of <em>2</em>.</p></div>
-<div class="paragraph"><p>If you find that your server is unable to handle the load on your Rails/Rack websites
-(i.e. running out of memory) then you should lower this value. (Though if your
-sites are really that popular, then you should strongly consider upgrading your
-hardware or getting more servers.)</p></div>
-<div class="paragraph"><p>This option may only occur once, in the global server configuration.
-The default value is <em>6</em>.</p></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>0</em>.</p></div>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/tip.png" alt="Tip">
+<img src="./images/icons/caution.png" alt="Caution">
+</td>
+<td class="content">
+<div class="paragraph"><p>The <a href="#PassengerMaxRequests">PassengerMaxRequests</a> directive should be considered
+as a workaround for misbehaving applications. It is advised that you fix the
+problem in your application rather than relying on these directives as a
+measure to avoid memory leaks.</p></div>
 </td>
-<td class="content">We strongly recommend you to <a href="#reducing_memory_usage">use Ruby Enterprise Edition</a>. This allows you to reduce the memory usage of your Ruby on Rails applications
-by about 33%. And it’s not hard to install.</td>
-</tr></table>
+</tr></table>
 </div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerMinInstances" data-comment-topic="passengermininstances-integer--wegq6b">5.12.2. PassengerMinInstances <integer></h4>
-<div class="paragraph"><p>This specifies the minimum number of application instances that must be kept around
-whenever Phusion Passenger cleans up idle instances. You should set this option to a
-non-zero value if you want to avoid potentially long startup times after a website
-has been idle for an extended period.</p></div>
-<div class="paragraph"><p>Please note that this option does <strong>not</strong> pre-start application instances during Apache
-startup. It just makes sure that when the application is first accessed:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-at least the given number of instances will be spawned.
-</p>
-</li>
-<li>
-<p>
-the given number of processes will be kept around even when instances are being
-   idle cleaned (see <a href="#PassengerPoolIdleTime">PassengerPoolIdleTime</a>).
-</p>
-</li>
-</ol></div>
-<div class="paragraph"><p>If you want to pre-start application instances during Apache startup, then you should use the <a href="#PassengerPreStart">PassengerPreStart</a> directive, possibly in combination with
-<em>PassengerMinInstances</em>. This behavior might seem counter-intuitive at first sight,
-but <a href="#PassengerPreStart">PassengerPreStart</a> explains the rationale behind it.</p></div>
-<div class="paragraph"><p>For example, suppose that you have the following configuration:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>PassengerMaxPoolSize 15
-PassengerPoolIdleTime 10
-
-<VirtualHost *:80>
-    ServerName foobar.com
-    DocumentRoot /webapps/foobar/public
-    PassengerMinInstances 3
-</VirtualHost></pre>
-</div>
-</div>
-<div class="paragraph"><p>When you start Apache, there are 0 application instances for <em>foobar.com</em>. Things will
-stay that way until someone visits <em>foobar.com</em>. Suppose that there is only 1 visitor.
-1 application instance will be started immediately to serve the visitor, while 2 will
-be spawned in the background. After 10 seconds, when the idle timeout has
-been reached, these 3 application instances will not be cleaned up.</p></div>
-<div class="paragraph"><p>Now suppose that there’s a sudden spike of traffic, and 100 users visit <em>foobar.com</em>
-simultanously. Phusion Passenger will start 12 more application instances. After the idle
-timeout of 10 seconds have passed, Phusion Passenger will clean up 12 application
-instances, keeping 3 instances around.</p></div>
-<div class="paragraph"><p>The PassengerMinInstances option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMaxRequestTime"></span><h4 data-comment-topic="passengermaxrequesttime-seconds--127v1i2" data-anchor="PassengerMaxRequestTime">6.15.10. PassengerMaxRequestTime <seconds></h4>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>The maximum amount of time, in seconds, that an application process may take
+to process a request. If the request takes longer than this amount of time,
+then the application process will be forcefully shut down, and possibly
+restarted upon the next request. A value of 0 means that there is no time limit.</p></div>
+<div class="paragraph"><p>This option is useful for preventing your application from freezing for an
+indefinite period of time.</p></div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -2783,54 +4116,66 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Limits</span> i
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1</em>.</p></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>0</em>.</p></div>
+<div class="paragraph">
+<div class="title">Example</div>
+<p>Suppose that most of your requests are known to finish within 2 seconds.
+However, there is one URI, <em>/expensive_computation</em>, which is known to take up
+to 10 seconds. You can then configure Phusion Passenger as follows:</p>
 </div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengermaxinstancesperapp_lt_integer_gt" data-comment-topic="passengermaxinstancesperapp-integer--1pteawn">5.12.3. PassengerMaxInstancesPerApp <integer></h4>
-<div class="paragraph"><p>The maximum number of application instances that may be simultaneously active
-for a single application. This helps to make sure that a single application
-will not occupy all available slots in the application pool.</p></div>
-<div class="paragraph"><p>This value must be less than <a href="#PassengerMaxPoolSize">PassengerMaxPoolSize</a>. A value of 0
-means that there is no limit placed on the number of instances a single application
-may use, i.e. only the global limit of <a href="#PassengerMaxPoolSize">PassengerMaxPoolSize</a>
-will be enforced.</p></div>
-<div class="paragraph"><p>This option may only occur once, in the global server configuration.
-The default value is <em>0</em>.</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre><VirtualHost *:80>
+    ServerName www.example.com
+    DocumentRoot /webapps/my_app/public
+
+    PassengerMaxRequestTime 2
+    <Location /expensive_computation>
+        PassengerMaxRequestTime 10
+    </Location>
+</VirtualHost></pre>
+</div>
+</div>
+<div class="paragraph"><p>If a request to <em>/expensive_computation</em> takes more than 10 seconds,
+or if a request to any other URI takes more than 2 seconds,
+then the corresponding application process will be forced to shutdown.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/caution.png" alt="Caution">
+</td>
+<td class="content">
+<div class="paragraph"><p>The <a href="#PassengerMaxRequestTime">PassengerMaxRequestTime</a> directive should be
+considered as a workaround for misbehaving applications. It is advised that you
+fix the problem in your application rather than relying on these directives as a
+measure to avoid freezing applications.</p></div>
+</td>
+</tr></table>
+</div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">
+<div class="paragraph"><p>This option is currently only available for Ruby apps. It is not yet available
+for Python and Node.js.</p></div>
+</td>
+</tr></table>
 </div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerPoolIdleTime" data-comment-topic="passengerpoolidletime-integer--a3gunq">5.12.4. PassengerPoolIdleTime <integer></h4>
-<div class="paragraph"><p>The maximum number of seconds that an application instance may be idle. That is,
-if an application instance hasn’t received any traffic after the given number of
-seconds, then it will be shutdown in order to conserve memory.</p></div>
-<div class="paragraph"><p>Decreasing this value means that applications will have to be spawned
-more often. Since spawning is a relatively slow operation, some visitors may
-notice a small delay when they visit your Rails/Rack website. However, it will also
-free up resources used by applications more quickly.</p></div>
-<div class="paragraph"><p>The optimal value depends on the average time that a visitor spends on a single
-Rails/Rack web page. We recommend a value of <span class="monospaced">2 * x</span>, where <span class="monospaced">x</span> is the average
-number of seconds that a visitor spends on a single Rails/Rack web page. But your
-mileage may vary.</p></div>
-<div class="paragraph"><p>When this value is set to <em>0</em>, application instances will not be shutdown unless
-it’s really necessary, i.e. when Phusion Passenger is out of worker processes
-for a given application and one of the inactive application instances needs to
-make place for another application instance. Setting the value to 0 is
-recommended if you’re on a non-shared host that’s only running a few
-applications, each which must be available at all times.</p></div>
-<div class="paragraph"><p>This option may only occur once, in the global server configuration.
-The default value is <em>300</em>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerMaxRequests" data-comment-topic="passengermaxrequests-integer--ietgd0">5.12.5. PassengerMaxRequests <integer></h4>
-<div class="paragraph"><p>The maximum number of requests an application instance will process. After
-serving that many requests, the application instance will be shut down and
-Phusion Passenger will restart it. A value of 0 means that there is no maximum:
-an application instance will thus be shut down when its idle timeout has been
-reached.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMemoryLimit"></span><h4 data-comment-topic="passengermemorylimit-integer--18irza1" data-anchor="PassengerMemoryLimit">6.15.11. PassengerMemoryLimit <integer></h4>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>The maximum amount of memory that an application process may use, in megabytes.
+Once an application process has surpassed its memory limit, it will process
+all the requests currently present in its queue and then shut down.
+A value of 0 means that there is no maximum: the application’s memory usage
+will not be checked.</p></div>
 <div class="paragraph"><p>This option is useful if your application is leaking memory. By shutting
-it down after a certain number of requests, all of its memory is guaranteed
-to be freed by the operating system.</p></div>
+it down, all of its memory is guaranteed to be freed by the operating system.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -2854,24 +4199,41 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Limits</span> i
 </ul></div>
 <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>0</em>.</p></div>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/caution.png" alt="Caution">
+<img src="./images/icons/note.png" alt="Note">
 </td>
 <td class="content">
-<div class="paragraph"><p>The <a href="#PassengerMaxRequests">PassengerMaxRequests</a> directive should be considered
-as a workaround for misbehaving applications. It is advised that you fix the
+<div class="title">A word about permissions</div>
+<div class="paragraph"><p>The <a href="#PassengerMemoryLimit">PassengerMemoryLimit</a> directive uses
+<span class="monospaced">ps</span> command to query memory usage information. On Linux, it further
+queries <span class="monospaced">/proc</span> to obtain additional memory usage information that’s
+not obtainable through <span class="monospaced">ps</span>. You should ensure that the <span class="monospaced">ps</span> works
+correctly and that the <span class="monospaced">/proc</span> filesystem is accessible by the
+<span class="monospaced">PassengerHelperAgent</span> process.</p></div>
+</td>
+</tr></table>
+</div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/caution.png" alt="Caution">
+</td>
+<td class="content">
+<div class="paragraph"><p>The <a href="#PassengerMaxRequests">PassengerMaxRequests</a> and
+<a href="#PassengerMemoryLimit">PassengerMemoryLimit</a> directives should be considered
+as workarounds for misbehaving applications. It is advised that you fix the
 problem in your application rather than relying on these directives as a
 measure to avoid memory leaks.</p></div>
 </td>
-</tr></table>
+</tr></table>
 </div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengerstatthrottlerate_lt_integer_gt" data-comment-topic="passengerstatthrottlerate-integer--13zx4xo">5.12.6. PassengerStatThrottleRate <integer></h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerstatthrottlerate_lt_integer_gt"></span><h4 data-comment-topic="passengerstatthrottlerate-integer--1dcfda3" data-anchor="_passengerstatthrottlerate_lt_integer_gt">6.15.12. PassengerStatThrottleRate <integer></h4>
 <div class="paragraph"><p>By default, Phusion Passenger performs several filesystem checks (or, in
 programmers jargon, <em>stat() calls</em>) each time a request is processed:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 It checks whether <em>config/environment.rb</em>, <em>config.ru</em> or <em>passenger_wsgi.py</em>
@@ -2895,7 +4257,7 @@ seconds. Setting it to a value of <em>0</em> means that no throttling will take
 or in other words, that the above list of filesystem checks will be performed on
 every request.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -2920,21 +4282,21 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Limits</span> i
 <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>0</em>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerPreStart" data-comment-topic="passengerprestart-url--1v76tcz">5.12.7. PassengerPreStart <url></h4>
-<div class="paragraph"><p>By default, Phusion Passenger does not start any application instances until said
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerPreStart"></span><h4 data-comment-topic="passengerprestart-url--1utb57k" data-anchor="PassengerPreStart">6.15.13. PassengerPreStart <url></h4>
+<div class="paragraph"><p>By default, Phusion Passenger does not start any application processes until said
 web application is first accessed. The result is that the first visitor of said
 web application might experience a small delay as Phusion Passenger is starting
 the web application on demand. If that is undesirable, then this directive can be
-used to pre-started application instances during Apache startup.</p></div>
+used to pre-started application processes during Apache startup.</p></div>
 <div class="paragraph"><p>A few things to be careful of:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 This directive accepts the <strong>URL</strong> of the web application you want to pre-start,
   not a on/off value! This might seem a bit weird, but read on for rationale. As
   for the specifics of the URL:
 </p>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 The domain part of the URL must be equal to the value of the <em>ServerName</em>
@@ -2958,14 +4320,14 @@ The path part of the URL must point to some URI that the web application
 <li>
 <p>
 You will probably want to combine this option with
-  <a href="#PassengerMinInstances">PassengerMinInstances</a> because application instances
+  <a href="#PassengerMinInstances">PassengerMinInstances</a> because application processes
   started with <em>PassengerPreStart</em> are subject to the usual idle timeout rules.
   See the example below for an explanation.
 </p>
 </li>
 </ul></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -3050,10 +4412,10 @@ The following example is wrong and won’t pre-start the store web application:<
 </div>
 <div class="sect4">
 <h5 id="_example_3_combining_with_passengermininstances">Example 3: combining with PassengerMinInstances</h5>
-<div class="paragraph"><p>Application instances started with PassengerPreStart are
+<div class="paragraph"><p>Application processes started with PassengerPreStart are
 also subject to the idle timeout rules as specified by
 <a href="#PassengerPoolIdleTime">PassengerPoolIdleTime</a>! That means that by default,
-the pre-started application instances for foo.com are bar.com are shut down
+the pre-started application processes for foo.com are bar.com are shut down
 after a few minutes of inactivity. If you don’t want that to happen, then
 you should combine PassengerPreStart with
 <a href="#PassengerMinInstances">PassengerMinInstances</a>, like this:</p></div>
@@ -3062,13 +4424,15 @@ you should combine PassengerPreStart with
 <pre><VirtualHost *:80>
    ServerName foo.com
    DocumentRoot /webapps/foo/public
-   PassengerMinInstances 1      # <--- added
+   # Added!
+   PassengerMinInstances 1
 </VirtualHost>
 
 <VirtualHost *:3500>
    ServerName bar.com
    DocumentRoot /webapps/bar/public
-   PassengerMinInstances 1      # <--- added
+   # Added!
+   PassengerMinInstances 1
 </VirtualHost>
 
 PassengerPreStart http://foo.com/
@@ -3081,7 +4445,7 @@ PassengerPreStart http://bar.com:3500/</pre>
 <div class="paragraph"><p>A directive that accepts a simple on/off flag is definitely more intuitive,
 but due technical difficulties w.r.t. the way Apache works, it’s very hard
 to implement it like that:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 It is very hard to obtain a full list of web applications defined in the
@@ -3156,7 +4520,7 @@ the request ending up at a different web server in the cluster.</p></div>
 </div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerHighPerformance" data-comment-topic="passengerhighperformance-on-off--36mw1l">5.12.8. PassengerHighPerformance <on|off></h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerHighPerformance"></span><h4 data-comment-topic="passengerhighperformance-on-off--nvfa86" data-anchor="PassengerHighPerformance">6.15.14. PassengerHighPerformance <on|off></h4>
 <div class="paragraph"><p>By default, Phusion Passenger is compatible with mod_rewrite and most other
 Apache modules. However, a lot of effort is required in order to be compatible.
 If you turn <em>PassengerHighPerformance</em> to <em>on</em>, then Phusion Passenger will be
@@ -3169,7 +4533,7 @@ performance mode via testing.</p></div>
 <div class="paragraph"><p>This option is <strong>not</strong> an all-or-nothing global option: you can enable high
 performance mode for certain virtual hosts or certain URLs only.
 The <em>PassengerHighPerformance</em> option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -3240,13 +4604,13 @@ then you can enable high performance mode for a certain URL only. For example:</
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_compatibility_options" data-comment-topic="compatibility-options-8jve5a">5.13. Compatibility options</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_compatibility_options"></span><h3 data-comment-topic="compatibility-options-8jve5a" data-anchor="_compatibility_options">6.16. Compatibility options</h3>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerResolveSymlinksInDocumentRoot" data-comment-topic="passengerresolvesymlinksindocumentroot-on-off--vblz7e">5.13.1. PassengerResolveSymlinksInDocumentRoot <on|off></h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerResolveSymlinksInDocumentRoot"></span><h4 data-comment-topic="passengerresolvesymlinksindocumentroot-on-off--1r0qcp8" data-anchor="PassengerResolveSymlinksInDocumentRoot">6.16.1. PassengerResolveSymlinksInDocumentRoot <on|off></h4>
 <div class="paragraph"><p>Configures whether Phusion Passenger should resolve symlinks in the document root.
 Please refer to <a href="#application_detection">How Phusion Passenger detects whether a virtual host is a web application</a> for more information.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -3271,7 +4635,7 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
 <div class="paragraph"><p>In each place, it may be specified at most once. It is off by default.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengerallowencodedslashes_lt_on_off_gt" data-comment-topic="passengerallowencodedslashes-on-off--1ud9a92">5.13.2. PassengerAllowEncodedSlashes <on|off></h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerallowencodedslashes_lt_on_off_gt"></span><h4 data-comment-topic="passengerallowencodedslashes-on-off--1y3s1ww" data-anchor="_passengerallowencodedslashes_lt_on_off_gt">6.16.2. PassengerAllowEncodedSlashes <on|off></h4>
 <div class="paragraph"><p>By default, Apache doesn’t support URLs with encoded slashes (%2f), e.g. URLs like
 this: <span class="monospaced">/users/fujikura%2fyuu</span>. If you access such an URL then Apache will return a
 404 Not Found error. This can be solved by turning on PassengerAllowEncodedSlashes
@@ -3280,7 +4644,7 @@ as well as Apache’s
 <div class="paragraph"><p>Is it important that you turn on both AllowEncodedSlashes <strong>and</strong> PassengerAllowEncodedSlashes,
 otherwise this feature will not work properly.</p></div>
 <div class="paragraph"><p>PassengerAllowEncodedSlashes may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -3340,14 +4704,14 @@ displaying maintenance.html will work fine even for URLs starting with "/users".
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_logging_and_debugging_options" data-comment-topic="logging-and-debugging-options-el2cuc">5.14. Logging and debugging options</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_logging_and_debugging_options"></span><h3 data-comment-topic="logging-and-debugging-options-el2cuc" data-anchor="_logging_and_debugging_options">6.17. Logging and debugging options</h3>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengerloglevel_lt_integer_gt" data-comment-topic="passengerloglevel-integer--1lt2yhq">5.14.1. PassengerLogLevel <integer></h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerLogLevel"></span><h4 data-comment-topic="passengerloglevel-integer--s3kbil" data-anchor="PassengerLogLevel">6.17.1. PassengerLogLevel <integer></h4>
 <div class="paragraph"><p>This option allows one to specify how much information Phusion Passenger should
 write to the Apache error log file. A higher log level value means that more
 information will be logged.</p></div>
 <div class="paragraph"><p>Possible values are:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 <em>0</em>: Show only errors and warnings.
@@ -3375,55 +4739,28 @@ information will be logged.</p></div>
 The default is <em>0</em>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengerdebuglogfile_lt_filename_gt" data-comment-topic="passengerdebuglogfile-filename--pgj55c">5.14.2. PassengerDebugLogFile <filename></h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerdebuglogfile_lt_filename_gt"></span><h4 data-comment-topic="passengerdebuglogfile-filename--1wjm2j1" data-anchor="_passengerdebuglogfile_lt_filename_gt">6.17.2. PassengerDebugLogFile <filename></h4>
 <div class="paragraph"><p>By default Phusion Passenger debugging and error messages are written to the global
 web server error log. This option allows one to specify the file that debugging and
 error messages should be written to instead.</p></div>
 <div class="paragraph"><p>This option may only occur once, in the global server configuration.</p></div>
 </div>
-</div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_ruby_on_rails_specific_options" data-comment-topic="ruby-on-rails-specific-options-1t10wfu">5.15. Ruby on Rails-specific options</h3>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_railsautodetect_lt_on_off_gt" data-comment-topic="railsautodetect-on-off--tpigsd">5.15.1. RailsAutoDetect <on|off></h4>
-<div class="paragraph"><p>Whether Phusion Passenger should automatically detect whether a virtual host’s
-document root is a Ruby on Rails application. The default is <em>on</em>.</p></div>
-<div class="paragraph"><p>This option may occur in the global server configuration or in a virtual host
-configuration block.</p></div>
-<div class="paragraph"><p>For example, consider the following configuration:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>RailsAutoDetect off
-<VirtualHost *:80>
-    ServerName www.mycook.com
-    DocumentRoot /webapps/mycook/public
-</VirtualHost></pre>
-</div>
-</div>
-<div class="paragraph"><p>If one goes to <em>http://www.mycook.com/</em>, the visitor will see the contents of
-the <em>/webapps/mycook/public</em> folder, instead of the output of the Ruby on Rails
-application.</p></div>
-<div class="paragraph"><p>It is possible to explicitly specify that the host is a Ruby on Rails
-application by using the <a href="#RailsBaseURI">RailsBaseURI</a> configuration option:</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerdebugger_lt_on_off_gt"></span><h4 data-comment-topic="passengerdebugger-on-off--19you7e" data-anchor="_passengerdebugger_lt_on_off_gt">6.17.3. PassengerDebugger <on|off></h4>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>Turns support for application debugging on or off. In case of Ruby applications,
+turning this option on will cause them to load the <span class="monospaced">ruby-debug</span> gem (when on Ruby 1.8)
+or the <span class="monospaced">debugger</span> gem (when on Ruby 1.9). If you’re using Bundler, you should add
+this to your Gemfile:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>RailsAutoDetect off
-<VirtualHost *:80>
-    ServerName www.mycook.com
-    DocumentRoot /webapps/mycook/public
-    RailsBaseURI /           # This line has been added.
-</VirtualHost></pre>
+<pre>gem 'ruby-debug', :platforms => :ruby_18
+gem 'debugger', :platforms => :ruby_19</pre>
 </div>
 </div>
-</div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="RailsBaseURI" data-comment-topic="railsbaseuri-uri--1txrw3k">5.15.2. RailsBaseURI <uri></h4>
-<div class="paragraph"><p>Used to specify that the given URI is a Rails application. See
-<a href="#deploying_rails_to_sub_uri">Deploying Rails to a sub URI</a> for an example.</p></div>
-<div class="paragraph"><p>It is allowed to specify this option multiple times. Do this to deploy multiple
-Rails applications in different sub-URIs under the same virtual host.</p></div>
+<div class="paragraph"><p>Once debugging is turned on, you can use the command <span class="monospaced">passenger-irb --debug <PID></span> to attach an rdebug console to the application process with the given PID. Attaching will succeed once the application process executes a <span class="monospaced">debugger</span> command.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -3445,12 +4782,21 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
 </p>
 </li>
 </ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
+</div>
 </div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_classic_ruby_on_rails_8656_2_x_specific_options"></span><h3 data-comment-topic="ruby-on-rails-specific-options-1t10wfu" data-anchor="_classic_ruby_on_rails_8656_2_x_specific_options">6.18. Classic Ruby on Rails (⇐ 2.x)-specific options</h3>
+<div class="paragraph"><p>These options only have effect on classic Ruby on Rails 1.x and 2.x applications.
+Ruby on Rails >= 3.x applications are considered Rack applications.</p></div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="rails_env" data-comment-topic="railsenv-string--1b0xxvu">5.15.3. RailsEnv <string></h4>
-<div class="paragraph"><p>This option allows one to specify the default <span class="monospaced">RAILS_ENV</span> value.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="RailsBaseURI"></span><h4 data-comment-topic="railsbaseuri-uri--1txrw3k" data-anchor="RailsBaseURI">6.18.1. RailsBaseURI <uri></h4>
+<div class="paragraph"><p>Used to specify that the given URI is a Rails application. See
+<a href="#deploying_rails_to_sub_uri">Deploying Rails to a sub URI</a> for an example.</p></div>
+<div class="paragraph"><p>It is allowed to specify this option multiple times. Do this to deploy multiple
+Rails applications in different sub-URIs under the same virtual host.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -3472,24 +4818,12 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>production</em>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_railsframeworkspawneridletime_lt_integer_gt" data-comment-topic="railsframeworkspawneridletime-integer--1ai8dgq">5.15.4. RailsFrameworkSpawnerIdleTime <integer></h4>
-<div class="paragraph"><p>The FrameworkSpawner server (explained in <a href="#spawning_methods_explained">Spawning methods explained</a>) has an idle timeout, just like the backend processes spawned by
-Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done
-anything for a given period.</p></div>
-<div class="paragraph"><p>This option allows you to set the FrameworkSpawner server’s idle timeout, in
-seconds. A value of <em>0</em> means that it should never idle timeout.</p></div>
-<div class="paragraph"><p>Setting a higher value will mean that the FrameworkSpawner server is kept around
-longer, which may slightly increase memory usage. But as long as the
-FrameworkSpawner server is running, the time to spawn a Ruby on Rails backend
-process only takes about 40% of the time that is normally needed, assuming that
-you’re using the <em>smart</em> <a href="#PassengerSpawnMethod">spawning method</a>. So if your
-system has enough memory, is it recommended that you set this option to a high
-value or to <em>0</em>.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="rails_env"></span><h4 data-comment-topic="railsenv-string--1b0xxvu" data-anchor="rails_env">6.18.2. RailsEnv <string></h4>
+<div class="paragraph"><p>This option allows one to specify the default <span class="monospaced">RAILS_ENV</span> value.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -3500,81 +4834,30 @@ In the global server configuration.
 In a virtual host configuration block.
 </p>
 </li>
-</ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1800</em> (30 minutes).</p></div>
-</div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_railsappspawneridletime_lt_integer_gt" data-comment-topic="railsappspawneridletime-integer--1awgog1">5.15.5. RailsAppSpawnerIdleTime <integer></h4>
-<div class="paragraph"><p>The ApplicationSpawner server (explained in <a href="#spawning_methods_explained">Spawning methods explained</a>) has an idle timeout, just like the backend processes spawned by
-Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done
-anything for a given period.</p></div>
-<div class="paragraph"><p>This option allows you to set the ApplicationSpawner server’s idle timeout, in
-seconds. A value of <em>0</em> means that it should never idle timeout.</p></div>
-<div class="paragraph"><p>Setting a higher value will mean that the ApplicationSpawner server is kept around
-longer, which may slightly increase memory usage. But as long as the
-ApplicationSpawner server is running, the time to spawn a Ruby on Rails backend
-process only takes about 10% of the time that is normally needed, assuming that
-you’re using the <em>smart</em> or <em>smart-lv2</em> <a href="#PassengerSpawnMethod">spawning method</a>. So if your
-system has enough memory, is it recommended that you set this option to a high
-value or to <em>0</em>.</p></div>
-<div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
 <li>
 <p>
-In the global server configuration.
+In a <span class="monospaced"><Directory></span> or <span class="monospaced"><Location></span> block.
 </p>
 </li>
 <li>
 <p>
-In a virtual host configuration block.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>600</em> (10 minutes).</p></div>
-</div>
-</div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_rack_specific_options" data-comment-topic="rack-specific-options-wk9qzt">5.16. Rack-specific options</h3>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_rackautodetect_lt_on_off_gt" data-comment-topic="rackautodetect-on-off--vl1lxy">5.16.1. RackAutoDetect <on|off></h4>
-<div class="paragraph"><p>Whether Phusion Passenger should automatically detect whether a virtual host’s
-document root is a Rack application. The default is <em>on</em>.</p></div>
-<div class="paragraph"><p>This option may occur in the global server configuration or in a virtual host
-configuration block.</p></div>
-<div class="paragraph"><p>For example, consider the following configuration:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>RackAutoDetect off
-<VirtualHost *:80>
-    ServerName www.rackapp.com
-    DocumentRoot /webapps/my_rack_app/public
-</VirtualHost></pre>
-</div>
-</div>
-<div class="paragraph"><p>If one goes to <em>http://www.rackapp.com/</em>, the visitor will see the contents of
-the <em>/webapps/my_rack_app/public</em> folder, instead of the output of the Rack
-application.</p></div>
-<div class="paragraph"><p>It is possible to explicitly specify that the host is a Rack
-application by using the <a href="#RackBaseURI">RackBaseURI</a> configuration option:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>RackAutoDetect off
-<VirtualHost *:80>
-    ServerName www.rackapp.com
-    DocumentRoot /webapps/my_rack_app/public
-    RackBaseURI /       # This line was added
-</VirtualHost></pre>
-</div>
+In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span> is on.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>production</em>.</p></div>
 </div>
 </div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_rack_and_rails_gt_3_specific_options"></span><h3 data-comment-topic="rack-specific-options-wk9qzt" data-anchor="_rack_and_rails_gt_3_specific_options">6.19. Rack and Rails >= 3 specific options</h3>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="RackBaseURI" data-comment-topic="rackbaseuri-uri--1to24pj">5.16.2. RackBaseURI <uri></h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="RackBaseURI"></span><h4 data-comment-topic="rackbaseuri-uri--1to24pj" data-anchor="RackBaseURI">6.19.1. RackBaseURI <uri></h4>
 <div class="paragraph"><p>Used to specify that the given URI is a Rack application. See
 <a href="#deploying_rack_to_sub_uri">Deploying Rack to a sub URI</a> for an example.</p></div>
 <div class="paragraph"><p>It is allowed to specify this option multiple times. Do this to deploy multiple
 Rack applications in different sub-URIs under the same virtual host.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -3598,12 +4881,12 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
 </ul></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="rack_env" data-comment-topic="rackenv-string--vve9py">5.16.3. RackEnv <string></h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="rack_env"></span><h4 data-comment-topic="rackenv-string--vve9py" data-anchor="rack_env">6.19.2. RackEnv <string></h4>
 <div class="paragraph"><p>The given value will be accessible in Rack applications in the <span class="monospaced">RACK_ENV</span>
 environment variable. This allows one to define the environment in which
 Rack applications are run, very similar to <span class="monospaced">RAILS_ENV</span>.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the global server configuration.
@@ -3629,39 +4912,51 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_deprecated_options" data-comment-topic="deprecated-options-pm9m57">5.17. Deprecated options</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deprecated_or_removed_options"></span><h3 data-comment-topic="deprecated-options-pm9m57" data-anchor="_deprecated_or_removed_options">6.20. Deprecated or removed options</h3>
 <div class="paragraph"><p>The following options have been deprecated, but are still supported for backwards
 compatibility reasons.</p></div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_railsruby" data-comment-topic="railsruby-ht09ei">5.17.1. RailsRuby</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_railsruby"></span><h4 data-comment-topic="railsruby-ht09ei" data-anchor="_railsruby">6.20.1. RailsRuby</h4>
 <div class="paragraph"><p>Deprecated in favor of <a href="#PassengerRuby">PassengerRuby</a>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_railsuserswitching" data-comment-topic="railsuserswitching-1npx8y4">5.17.2. RailsUserSwitching</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_railsuserswitching"></span><h4 data-comment-topic="railsuserswitching-1npx8y4" data-anchor="_railsuserswitching">6.20.2. RailsUserSwitching</h4>
 <div class="paragraph"><p>Deprecated in favor of <a href="#PassengerUserSwitching">PassengerUserSwitching</a>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_railsdefaultuser" data-comment-topic="railsdefaultuser-19j7n3m">5.17.3. RailsDefaultUser</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_railsdefaultuser"></span><h4 data-comment-topic="railsdefaultuser-19j7n3m" data-anchor="_railsdefaultuser">6.20.3. RailsDefaultUser</h4>
 <div class="paragraph"><p>Deprecated in favor of <a href="#PassengerDefaultUser">PassengerDefaultUser</a>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_railsallowmodrewrite" data-comment-topic="railsallowmodrewrite-1vkziro">5.17.4. RailsAllowModRewrite</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_railsallowmodrewrite"></span><h4 data-comment-topic="railsallowmodrewrite-1vkziro" data-anchor="_railsallowmodrewrite">6.20.4. RailsAllowModRewrite</h4>
 <div class="paragraph"><p>This option doesn’t do anything anymore in recent versions of Phusion Passenger.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_railsspawnmethod" data-comment-topic="railsspawnmethod-1aljgpa">5.17.5. RailsSpawnMethod</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_railsspawnmethod"></span><h4 data-comment-topic="railsspawnmethod-1aljgpa" data-anchor="_railsspawnmethod">6.20.5. RailsSpawnMethod</h4>
 <div class="paragraph"><p>Deprecated in favor of <a href="#PassengerSpawnMethod">PassengerSpawnMethod</a>.</p></div>
 </div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_railsautodetect_rackautodetect_and_wsgiautodetect"></span><h4 data-comment-topic="railsautodetect-rackautodetect-and-wsgiautodetect-1qgakzs" data-anchor="_railsautodetect_rackautodetect_and_wsgiautodetect">6.20.6. RailsAutoDetect, RackAutoDetect and WsgiAutoDetect</h4>
+<div class="paragraph"><p>These options have been removed in version 4.0.0 as part of an optimization. You should use <a href="#PassengerEnabled">PassengerEnabled</a> instead.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_railsappspawneridletime"></span><h4 data-comment-topic="railsappspawneridletime-heh41r" data-anchor="_railsappspawneridletime">6.20.7. RailsAppSpawnerIdleTime</h4>
+<div class="paragraph"><p>This option has been removed in version 4.0.0, and replaced with <a href="#PassengerMaxPreloaderIdleTime">PassengerMaxPreloaderIdleTime</a>.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_railsframeworkspawneridletime"></span><h4 data-comment-topic="railsframeworkspawneridletime-adcf9k" data-anchor="_railsframeworkspawneridletime">6.20.8. RailsFrameworkSpawnerIdleTime</h4>
+<div class="paragraph"><p>This option is no longer available in version 4.0.0. There is no alternative because framework spawning has been removed altogether. You should use smart spawning instead.</p></div>
+</div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_troubleshooting" data-comment-topic="troubleshooting-2ihihi">6. Troubleshooting</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="troubleshooting"></span><h2 data-comment-topic="troubleshooting-2ihihi" data-anchor="troubleshooting">7. Troubleshooting</h2>
 <div class="sectionbody">
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_operating_system_specific_problems" data-comment-topic="operating-system-specific-problems-327gbk">6.1. Operating system-specific problems</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_operating_system_specific_problems"></span><h3 data-comment-topic="operating-system-specific-problems-327gbk" data-anchor="_operating_system_specific_problems">7.1. Operating system-specific problems</h3>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_macos_x_the_installer_cannot_locate_mamp_8217_s_apache" data-comment-topic="macos-x-the-installer-cannot-locate-mamp-s-apache-or908n">6.1.1. MacOS X: The installer cannot locate MAMP’s Apache</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_macos_x_the_installer_cannot_locate_mamp_8217_s_apache"></span><h4 data-comment-topic="macos-x-the-installer-cannot-locate-mamp-s-apache-or908n" data-anchor="_macos_x_the_installer_cannot_locate_mamp_8217_s_apache">7.1.1. MacOS X: The installer cannot locate MAMP’s Apache</h4>
 <div class="sidebarblock">
 <div class="content">
 <div class="title">Symptoms</div>
@@ -3682,14 +4977,14 @@ to fix this problem.</p></div>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_problems_during_installation" data-comment-topic="problems-during-installation-q1vlsu">6.2. Problems during installation</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_problems_during_installation"></span><h3 data-comment-topic="problems-during-installation-q1vlsu" data-anchor="_problems_during_installation">7.2. Problems during installation</h3>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="installing_ruby_dev" data-comment-topic="ruby-development-headers-aren-t-installed-1yqrom8">6.2.1. Ruby development headers aren’t installed</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="installing_ruby_dev"></span><h4 data-comment-topic="ruby-development-headers-aren-t-installed-1yqrom8" data-anchor="installing_ruby_dev">7.2.1. Ruby development headers aren’t installed</h4>
 <div class="sidebarblock">
 <div class="content">
 <div class="title">Symptoms</div>
 <div class="paragraph"><p>Installing Phusion Passenger fails because of one of the following errors:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 The Phusion Passenger installer tells you that the Ruby development headers
@@ -3714,7 +5009,7 @@ must be installed. On most Linux systems, Ruby and the Ruby development headers
 are contained in separate packages, so having Ruby installed does not
 automatically imply having the development headers installed.</p></div>
 <div class="paragraph"><p>Here’s how you can install the development headers:</p></div>
-<div class="dlist"><dl>
+<div class="dlist"><dl>
 <dt class="hdlist1">
 Ubuntu/Debian
 </dt>
@@ -3770,24 +5065,24 @@ Other operating systems
 </dd>
 </dl></div>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/note.png" alt="Note">
+<img src="./images/icons/note.png" alt="Note">
 </td>
 <td class="content">If you’ve installed a new Ruby version (i.e. your system now contains
 multiple Ruby installations), then you will need to tell Phusion Passenger
 which Ruby installation you want to use. Please read
 <a href="#specifying_ruby_installation">Specifying the correct Ruby installation</a>.</td>
-</tr></table>
+</tr></table>
 </div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_apache_development_headers_aren_8217_t_installed" data-comment-topic="apache-development-headers-aren-t-installed-x2473y">6.2.2. Apache development headers aren’t installed</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_apache_development_headers_aren_8217_t_installed"></span><h4 data-comment-topic="apache-development-headers-aren-t-installed-x2473y" data-anchor="_apache_development_headers_aren_8217_t_installed">7.2.2. Apache development headers aren’t installed</h4>
 <div class="sidebarblock">
 <div class="content">
 <div class="title">Symptoms</div>
 <div class="paragraph"><p>Installing Phusion Passenger fails because of one of the following errors:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 The installer says that the Apache development headers aren’t installed.
@@ -3803,7 +5098,7 @@ else similar to <em>http_*.h</em>.)</p></div>
 </ul></div>
 </div>
 </div>
-<div class="dlist"><dl>
+<div class="dlist"><dl>
 <dt class="hdlist1">
 Ubuntu
 </dt>
@@ -3873,12 +5168,12 @@ Other operating systems
 </dl></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_apr_development_headers_aren_8217_t_installed" data-comment-topic="apr-development-headers-aren-t-installed-13bk976">6.2.3. APR development headers aren’t installed</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_apr_development_headers_aren_8217_t_installed"></span><h4 data-comment-topic="apr-development-headers-aren-t-installed-13bk976" data-anchor="_apr_development_headers_aren_8217_t_installed">7.2.3. APR development headers aren’t installed</h4>
 <div class="sidebarblock">
 <div class="content">
 <div class="title">Symptoms</div>
 <div class="paragraph"><p>Installing Phusion Passenger fails because one of the following errors:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 The installer tells you that APR development headers aren’t installed.
@@ -3897,7 +5192,7 @@ The error message “'apr_strings.h: No such file or directory”' occurs.
 </ul></div>
 </div>
 </div>
-<div class="dlist"><dl>
+<div class="dlist"><dl>
 <dt class="hdlist1">
 Ubuntu
 </dt>
@@ -3959,20 +5254,20 @@ Other operating systems
 </dl></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_phusion_passenger_is_using_the_wrong_apache_during_installation" data-comment-topic="phusion-passenger-is-using-the-wrong-apache-during-installation-82qnt4">6.2.4. Phusion Passenger is using the wrong Apache during installation</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_phusion_passenger_is_using_the_wrong_apache_during_installation"></span><h4 data-comment-topic="phusion-passenger-is-using-the-wrong-apache-during-installation-82qnt4" data-anchor="_phusion_passenger_is_using_the_wrong_apache_during_installation">7.2.4. Phusion Passenger is using the wrong Apache during installation</h4>
 <div class="paragraph"><p>Please <a href="#specifying_correct_apache_install">Specifying the correct Apache installation</a>, and re-run the Phusion Passenger installer.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_phusion_passenger_is_using_the_wrong_ruby_during_installation" data-comment-topic="phusion-passenger-is-using-the-wrong-ruby-during-installation-1nh3zml">6.2.5. Phusion Passenger is using the wrong Ruby during installation</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_phusion_passenger_is_using_the_wrong_ruby_during_installation"></span><h4 data-comment-topic="phusion-passenger-is-using-the-wrong-ruby-during-installation-1nh3zml" data-anchor="_phusion_passenger_is_using_the_wrong_ruby_during_installation">7.2.5. Phusion Passenger is using the wrong Ruby during installation</h4>
 <div class="paragraph"><p>Please <a href="#specifying_ruby_installation">Specifying the correct Ruby installation</a>, and re-run the Phusion Passenger installer.</p></div>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_problems_after_installation" data-comment-topic="problems-after-installation-fwd23q">6.3. Problems after installation</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_problems_after_installation"></span><h3 data-comment-topic="problems-after-installation-fwd23q" data-anchor="_problems_after_installation">7.3. Problems after installation</h3>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/tip.png" alt="Tip">
+<img src="./images/icons/tip.png" alt="Tip">
 </td>
 <td class="content">
 <div class="title">The golden tip: read your Apache error logs!</div>
@@ -3980,14 +5275,14 @@ Other operating systems
 you’re experiencing post-installation problems, please look
 inside the Apache error logs. It will tell you what exactly went wrong.</p></div>
 </td>
-</tr></table>
+</tr></table>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_my_rails_application_works_on_mongrel_but_not_on_phusion_passenger" data-comment-topic="my-rails-application-works-on-mongrel-but-not-on-phusion-passenger-1f28drx">6.3.1. My Rails application works on Mongrel, but not on Phusion Passenger</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_my_rails_application_works_on_mongrel_but_not_on_phusion_passenger"></span><h4 data-comment-topic="my-rails-application-works-on-mongrel-but-not-on-phusion-passenger-1f28drx" data-anchor="_my_rails_application_works_on_mongrel_but_not_on_phusion_passenger">7.3.1. My Rails application works on Mongrel, but not on Phusion Passenger</h4>
 <div class="paragraph"><p>Please try setting <a href="#PassengerSpawnMethod">PassengerSpawnMethod</a> to <em>conservative</em>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_phusion_passenger_has_been_compiled_against_the_wrong_apache_installation" data-comment-topic="phusion-passenger-has-been-compiled-against-the-wrong-apache-installation-n74ce0">6.3.2. Phusion Passenger has been compiled against the wrong Apache installation</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_phusion_passenger_has_been_compiled_against_the_wrong_apache_installation"></span><h4 data-comment-topic="phusion-passenger-has-been-compiled-against-the-wrong-apache-installation-n74ce0" data-anchor="_phusion_passenger_has_been_compiled_against_the_wrong_apache_installation">7.3.2. Phusion Passenger has been compiled against the wrong Apache installat [...]
 <div class="sidebarblock">
 <div class="content">
 <div class="title">Symptoms</div>
@@ -4000,15 +5295,15 @@ Apache installations on their system.</p></div>
 <div class="paragraph"><p>To solve this problem, please <a href="#specifying_correct_apache_install">specify the correct Apache installation</a>, and <a href="#install_passenger">reinstall Phusion Passenger</a>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_i_get_a_403_forbidden_error" data-comment-topic="i-get-a-403-forbidden-error-m0rlay">6.3.3. I get a "403 Forbidden" error</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_i_get_a_403_forbidden_error"></span><h4 data-comment-topic="i-get-a-403-forbidden-error-m0rlay" data-anchor="_i_get_a_403_forbidden_error">7.3.3. I get a "403 Forbidden" error</h4>
 <div class="paragraph"><p>See next subsection.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_static_assets_such_as_images_and_stylesheets_aren_8217_t_being_displayed" data-comment-topic="static-assets-such-as-images-and-stylesheets-aren-t-being-displayed-uaptpi">6.3.4. Static assets such as images and stylesheets aren’t being displayed</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_static_assets_such_as_images_and_stylesheets_aren_8217_t_being_displayed"></span><h4 data-comment-topic="static-assets-such-as-images-and-stylesheets-aren-t-being-displayed-uaptpi" data-anchor="_static_assets_such_as_images_and_stylesheets_aren_8217_t_being_displayed">7.3.4. Static assets such as images and stylesheets aren’t being displayed</h4>
 <div class="paragraph"><p>Static assets are accelerated, i.e. they are served directly by Apache and do not
 go through the Rails stack. There are two reasons why Apache doesn’t serve static
 assets correctly:</p></div>
-<div class="olist arabic"><ol class="arabic">
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
 Your Apache configuration is too strict, and does not allow HTTP clients to
@@ -4037,14 +5332,14 @@ The Apache process doesn’t have permission to access your Rails application’
 </ol></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_the_apache_error_log_says_that_the_spawn_manager_script_does_not_exist_or_that_it_does_not_have_permission_to_execute_it" data-comment-topic="the-apache-error-log-says-that-the-spawn-manager-script-does-not-exist-or-that-it-does-not-have-permission-to-execute-it-1fmoozk">6.3.5. The Apache error log says that the spawn manager script does not exist, or that it does not have pe [...]
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_the_apache_error_log_says_that_the_spawn_manager_script_does_not_exist_or_that_it_does_not_have_permission_to_execute_it"></span><h4 data-comment-topic="the-apache-error-log-says-that-the-spawn-manager-script-does-not-exist-or-that-it-does-not-have-permission-to-execute-it-1fmoozk" data-anchor="_the_apache_error_log_says_that_the_spawn_manager_script_d [...]
 <div class="paragraph"><p>If you are sure that the <em>PassengerRoot</em> configuration option is set correctly,
 then this problem is most likely caused by the fact that you’re running Apache
 with SELinux. On Fedora, CentOS and RedHat Enterprise Linux, Apache is locked
 down by SELinux policies.</p></div>
 <div class="paragraph"><p>To solve this problem, you must set some permissions on the Phusion Passenger files
 and folders, so that Apache can access them.</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 If you’ve installed Phusion Passenger via a gem, then run this command to determine
@@ -4079,7 +5374,7 @@ If you’ve installed Phusion Passenger via the source tarball, then run the fol
 <div class="paragraph"><p>Once the permissions are fixed, restart Apache.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_the_rails_application_reports_that_it_8217_s_unable_to_start_because_of_a_permission_error" data-comment-topic="the-rails-application-reports-that-it-s-unable-to-start-because-of-a-permission-error-v53i6s">6.3.6. The Rails application reports that it’s unable to start because of a permission error</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_the_rails_application_reports_that_it_8217_s_unable_to_start_because_of_a_permission_error"></span><h4 data-comment-topic="the-rails-application-reports-that-it-s-unable-to-start-because-of-a-permission-error-v53i6s" data-anchor="_the_rails_application_reports_that_it_8217_s_unable_to_start_because_of_a_permission_error">7.3.6. The Rails application re [...]
 <div class="paragraph"><p>Please check whether your Rails application’s folder has the correct
 permissions. By default, Rails applications are started as the owner of the
 file <em>config/environment.rb</em>, except if the file is owned by root. If the
@@ -4089,9 +5384,9 @@ specified).</p></div>
 <div class="paragraph"><p>Please read <a href="#user_switching">User switching (security)</a> for details.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_my_rails_application_8217_s_log_file_is_not_being_written_to" data-comment-topic="my-rails-application-s-log-file-is-not-being-written-to-3i747l">6.3.7. My Rails application’s log file is not being written to</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_my_rails_application_8217_s_log_file_is_not_being_written_to"></span><h4 data-comment-topic="my-rails-application-s-log-file-is-not-being-written-to-3i747l" data-anchor="_my_rails_application_8217_s_log_file_is_not_being_written_to">7.3.7. My Rails application’s log file is not being written to</h4>
 <div class="paragraph"><p>There are a couple things that you should be aware of:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 By default, Phusion Passenger runs Rails applications in <em>production</em> mode,
@@ -4120,7 +5415,7 @@ following command to give your Rails application folder that context:</p></div>
 </div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_i_8217_ve_deployed_my_app_on_ssl_but_the_app_thinks_its_not_on_ssl" data-comment-topic="i-ve-deployed-my-app-on-ssl-but-the-app-thinks-its-not-on-ssl-10rvgnr">6.3.8. I’ve deployed my app on SSL, but the app thinks its not on SSL</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_i_8217_ve_deployed_my_app_on_ssl_but_the_app_thinks_its_not_on_ssl"></span><h4 data-comment-topic="i-ve-deployed-my-app-on-ssl-but-the-app-thinks-its-not-on-ssl-10rvgnr" data-anchor="_i_8217_ve_deployed_my_app_on_ssl_but_the_app_thinks_its_not_on_ssl">7.3.8. I’ve deployed my app on SSL, but the app thinks its not on SSL</h4>
 <div class="paragraph"><p>Rails and many other frameworks infers whether it’s running on SSL through the CGI
 environment variable <span class="monospaced">HTTPS</span>. Apache always sets this variable when on SSL,
 except when SSL is incorrectly configured.</p></div>
@@ -4161,30 +5456,30 @@ the corrected example:</p></div>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="conflicting_apache_modules" data-comment-topic="conflicting-apache-modules-1uwpixk">6.4. Conflicting Apache modules</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="conflicting_apache_modules"></span><h3 data-comment-topic="conflicting-apache-modules-1uwpixk" data-anchor="conflicting_apache_modules">7.4. Conflicting Apache modules</h3>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_mod_userdir" data-comment-topic="mod-userdir-x5e2te">6.4.1. mod_userdir</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_mod_userdir"></span><h4 data-comment-topic="mod-userdir-x5e2te" data-anchor="_mod_userdir">7.4.1. mod_userdir</h4>
 <div class="paragraph"><p><em>mod_userdir</em> is not compatible with Phusion Passenger at the moment.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_multiviews_mod_negotiation" data-comment-topic="multiviews-mod-negotiation--zchfg0">6.4.2. MultiViews (mod_negotiation)</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_multiviews_mod_negotiation"></span><h4 data-comment-topic="multiviews-mod-negotiation--zchfg0" data-anchor="_multiviews_mod_negotiation">7.4.2. MultiViews (mod_negotiation)</h4>
 <div class="paragraph"><p>MultiViews is not compatible with Phusion Passenger. You should disable MultiViews
 for all Phusion Passenger hosts.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_virtualdocumentroot" data-comment-topic="virtualdocumentroot-14cwd7l">6.4.3. VirtualDocumentRoot</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_virtualdocumentroot"></span><h4 data-comment-topic="virtualdocumentroot-14cwd7l" data-anchor="_virtualdocumentroot">7.4.3. VirtualDocumentRoot</h4>
 <div class="paragraph"><p>VirtualDocumentRoot is not compatible with Phusion Passenger at the moment.</p></div>
 </div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_analysis_and_system_maintenance" data-comment-topic="analysis-and-system-maintenance-qvkwzr">7. Analysis and system maintenance</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_analysis_and_system_maintenance"></span><h2 data-comment-topic="analysis-and-system-maintenance-qvkwzr" data-anchor="_analysis_and_system_maintenance">8. Analysis and system maintenance</h2>
 <div class="sectionbody">
 <div class="paragraph"><p>Phusion Passenger provides a set of tools, which are useful for system analysis,
 maintenance and troubleshooting.</p></div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_inspecting_memory_usage" data-comment-topic="inspecting-memory-usage-1bkis6i">7.1. Inspecting memory usage</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_inspecting_memory_usage"></span><h3 data-comment-topic="inspecting-memory-usage-1bkis6i" data-anchor="_inspecting_memory_usage">8.1. Inspecting memory usage</h3>
 <div class="paragraph"><p>Process inspection tools such as <span class="monospaced">ps</span> and <span class="monospaced">top</span> are useful, but they
 <a href="http://groups.google.com/group/phusion-passenger/msg/1fd1c233456d3180">rarely show the correct memory usage</a>.
 The real memory usage is usually lower than what <span class="monospaced">ps</span> and <span class="monospaced">top</span> report.</p></div>
@@ -4192,7 +5487,7 @@ The real memory usage is usually lower than what <span class="monospaced">ps</sp
 the scope of this Users Guide. We kindly refer the interested reader to
 operating systems literature about <em>virtual memory</em> and <em>copy-on-write</em>.</p></div>
 <div class="paragraph"><p>The tool <span class="monospaced">passenger-memory-stats</span> allows one to easily analyze Phusion Passenger’s
-and Apache’s real memory usage. For example:</p></div>
+and the web server’s real memory usage. For example:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
 <pre>[bash at localhost root]# passenger-memory-stats
@@ -4210,6 +5505,12 @@ PID    PPID  Threads  VMSize   Private  Name
 ### Processes: 8
 ### Total private dirty RSS: 3.50 MB
 
+----------- Nginx processes ------------.
+PID    PPID   VMSize     Resident  Name
+----------------------------------------.
+51766  51764  82.7 MB    3.9 MB    nginx: master process ./objs/nginx
+51773  51766  82.9 MB    0.9 MB    nginx: worker process
+
 --------- Passenger processes ---------.
 PID    Threads  VMSize   Private  Name
 ---------------------------------------.
@@ -4222,22 +5523,22 @@ PID    Threads  VMSize   Private  Name
 </div>
 </div>
 <div class="paragraph"><p>The <em>Private</em> or <em>private dirty RSS</em> field shows the <strong>real</strong> memory usage of processes. Here,
-we see that all the Apache worker processes only take less than 1 MB memory each.
-This is a lot less than the 50 MB-ish memory usage as shown in the <em>VMSize</em> column
+we see that all the Apache and Nginx worker processes only take less than 1 MB memory each.
+This is a lot less than the 50-80 MB-ish memory usage as shown in the <em>VMSize</em> column
 (which is what a lot of people think is the real memory usage, but is actually not).</p></div>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/note.png" alt="Note">
+<img src="./images/icons/note.png" alt="Note">
 </td>
 <td class="content">Private dirty RSS reporting only works on Linux. Unfortunately other operating systems
 don’t provide facilities for determining processes' private dirty RSS. On non-Linux systems,
 the Resident Set Size is reported instead.</td>
-</tr></table>
+</tr></table>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_inspecting_phusion_passenger_8217_s_internal_status" data-comment-topic="inspecting-phusion-passenger-s-internal-status-ukekf7">7.2. Inspecting Phusion Passenger’s internal status</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_inspecting_phusion_passenger_8217_s_internal_status"></span><h3 data-comment-topic="inspecting-phusion-passenger-s-internal-status-ukekf7" data-anchor="_inspecting_phusion_passenger_8217_s_internal_status">8.2. Inspecting Phusion Passenger’s internal status</h3>
 <div class="paragraph"><p>One can inspect Phusion Passenger’s internal status with the tool <span class="monospaced">passenger-status</span>.
 This tool must typically be run as root. For example:</p></div>
 <div class="listingblock">
@@ -4255,7 +5556,7 @@ inactive = 1
 </div>
 </div>
 <div class="paragraph"><p>The <em>general information</em> section shows the following information:</p></div>
-<div class="dlist"><dl>
+<div class="dlist"><dl>
 <dt class="hdlist1">
 max
 </dt>
@@ -4299,7 +5600,7 @@ time). The value of <em>inactive</em> equals <span class="monospaced">count - ac
 </dl></div>
 <div class="paragraph"><p>The <em>domains</em> section shows, for each application directory, information about running
 application instances:</p></div>
-<div class="dlist"><dl>
+<div class="dlist"><dl>
 <dt class="hdlist1">
 Sessions
 </dt>
@@ -4351,52 +5652,37 @@ sessions compared to the others, then there might be a problem:</p></div>
                                +---- "spike"</pre>
 </div>
 </div>
-<div class="paragraph"><p>Possible reasons why spikes can occur:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-Your application is busy processing a request that takes a very long time.
-  If this is the case, then you might want to turn
-  <a href="#PassengerUseGlobalQueue">global queuing</a> on.
-</p>
-</li>
-<li>
-<p>
-Your application is frozen, i.e. has stopped responding. See
-  <a href="#debugging_frozen">Debugging frozen applications</a> for tips.
-</p>
-</li>
-</ol></div>
+<div class="paragraph"><p>The most likely reason why a spike occurs is because your application is frozen, i.e. it has stopped responding. See <a href="#debugging_frozen">Debugging frozen applications</a> for tips.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="debugging_frozen" data-comment-topic="debugging-frozen-applications-1qsjqq7">7.3. Debugging frozen applications</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="debugging_frozen"></span><h3 data-comment-topic="debugging-frozen-applications-1qsjqq7" data-anchor="debugging_frozen">8.3. Debugging frozen applications</h3>
 <div class="paragraph"><p>If one of your application instances is frozen (stopped responding), then you
 can figure out where it is frozen by killing it with <em>SIGABRT</em>. This will cause the
 application to raise an exception, with a backtrace.</p></div>
-<div class="paragraph"><p>The exception (with full backtrace information) is normally logged into the Apache
+<div class="paragraph"><p>The exception (with full backtrace information) is normally logged into the web server
 error log. But if your application or if its web framework has its own exception logging
 routines, then exceptions might be logged into the application’s log files instead.
 This is the case with Ruby on Rails. So if you kill a Ruby on Rails application with
 <em>SIGABRT</em>, please check the application’s <em>production.log</em> first (assuming that you’re
 running it in a <em>production</em> environment). If you don’t see a backtrace there, check
-the Apache error log.</p></div>
+the web server error log.</p></div>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/note.png" alt="Note">
+<img src="./images/icons/note.png" alt="Note">
 </td>
 <td class="content">It is safe to kill application instances, even in live environments. Phusion Passenger
 will restart killed application instances, as if nothing bad happened.</td>
-</tr></table>
+</tr></table>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_accessing_individual_application_processes" data-comment-topic="accessing-individual-application-processes-1p0j4jb">7.4. Accessing individual application processes</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_accessing_individual_application_processes"></span><h3 data-comment-topic="accessing-individual-application-processes-1p0j4jb" data-anchor="_accessing_individual_application_processes">8.4. Accessing individual application processes</h3>
 <div class="paragraph"><p>When a request is sent to the web server, Phusion Passenger will automatically forward
 the request to the most suitable application process, but sometimes it is desirable to
 be able to directly access the individual application processes. Use cases include, but
 are not limited to:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 One wants to debug a memory leak or memory bloat problem that only seems to appear on
@@ -4456,60 +5742,213 @@ through the <em>X-Passenger-Connect-Password</em> HTTP header, like this:</p></d
 </div>
 </div>
 </div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_attaching_an_irb_console_to_an_application_process"></span><h3 data-comment-topic="attaching-an-irb-console-to-an-application-process-1cma32j" data-anchor="_attaching_an_irb_console_to_an_application_process">8.5. Attaching an IRB console to an application process</h3>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>You can attach an IRB console to any application process and inspect its state by executing arbitrary Ruby code. Do this by invoking <span class="monospaced">passenger-irb <PID></span> where <em><PID></em> is the PID of the application process you wish to inspect. Note that the IRB console is currently only available for Ruby apps, not for apps in any other languages.</p></div>
+</div>
 </div>
 </div>
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_tips" data-comment-topic="tips-19cwwf7">8. Tips</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_tips"></span><h2 data-comment-topic="tips-19cwwf7" data-anchor="_tips">9. Tips</h2>
 <div class="sectionbody">
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="user_switching" data-comment-topic="user-switching-security--8njx1x">8.1. User switching (security)</h3>
-<div class="paragraph"><p>There is a problem that plagues most PHP web hosts, namely the fact that all PHP
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="user_switching"></span><h3 data-comment-topic="user-switching-security--8njx1x" data-anchor="user_switching">9.1. User Switching (security feature)</h3>
+<div class="paragraph"><p>Phusion Passenger supports automatic <em>user switching</em>: by default, it attempts to run applications as the "right" user, instead of running all applications as the same user.</p></div>
+<div class="paragraph"><p>To better understand the problem, let us consider the situation with PHP.
+There is a problem that plagues most PHP web hosts, namely the fact that all PHP
 applications are run in the same user context as the web server. So for
 example, Joe’s PHP application will be able to read Jane’s PHP application’s
 passwords. This is obviously undesirable on many servers.</p></div>
-<div class="paragraph"><p>Phusion Passenger solves this problem by implementing <em>user switching</em>. A Rails
-application is started as the owner of the file <em>config/environment.rb</em>,
-and a Rack application is started as the owner of the file <em>config.ru</em>.
-So if <em>/home/webapps/foo/config/environment.rb</em> is owned by <em>joe</em>, then Phusion
-Passenger will launch the corresponding Rails application as <em>joe</em> as well.</p></div>
-<div class="paragraph"><p>This behavior is the default, and you don’t need to configure anything. But
-there are things that you should keep in mind:</p></div>
-<div class="ulist"><ul>
+<div class="paragraph"><p>Phusion Passenger’s <em>user switching</em> feature solves this problem. Applications are
+run as the owner of their "startup file". For Ruby apps, the startup file is
+<span class="monospaced">config.ru</span> (Rack and Rails >= 3) or <span class="monospaced">config/environment.rb</span> (Rails 1 and 2). For
+Python apps, the startup file is <span class="monospaced">passenger_wsgi.py</span>. So suppose that <span class="monospaced">config.ru</span>
+is owned by user <em>joe</em>, then Phusion Passenger will spawn the corresponding
+application as <em>joe</em> as well. The exact rules are a little bit more complicated,
+and they’re explained further down in this section.</p></div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_requirements"></span><h4 data-comment-topic="requirements-yxvtxo" data-anchor="_requirements">9.1.1. Requirements</h4>
+<div class="paragraph"><p>User switching is only enabled when all of the following conditions are met:</p></div>
+<div class="ulist"><ul>
 <li>
 <p>
-The owner of <em>environment.rb</em>/<em>config.ru</em> must have read access to the application’s
-  root directory, and read/write access to the application’s <em>logs</em> directory.
+When not using <a href="#flying_passenger">Flying Passenger</a> (this is probably the case):
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+The
+  <a href="#PassengerUserSwitching">PassengerUserSwitching</a>
+option must be enabled.
 </p>
 </li>
 <li>
 <p>
-This feature is only available if Apache is started by <em>root</em>. This is the
-  case on most Apache installations.
+The web server’s control process must have root privileges. This is the case on most installations.
 </p>
 </li>
+</ul></div>
+</li>
+<li>
+<p>
+When using <a href="#flying_passenger">Flying Passenger</a>:
+</p>
+<div class="ulist"><ul>
 <li>
 <p>
-Under no circumstances will applications be run as <em>root</em>. If
-  <em>environment.rb</em>/<em>config.ru</em> is owned as root or by an unknown user, then the
-  Rails/Rack application will run as the user specified by
+The Flying Passenger daemon must be run with root privileges.
+</p>
+</li>
+</ul></div>
+</li>
+</ul></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_effects"></span><h4 data-comment-topic="effects-1lko7vo" data-anchor="_effects">9.1.2. Effects</h4>
+<div class="paragraph"><p>When not using Flying Passenger, the following table illustrates the effect for different combinations of the requirements.</p></div>
+<table class="tableblock frame-all grid-all" style="
+width:100%;
+">
+<col style="width:33%;">
+<col style="width:33%;">
+<col style="width:33%;">
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>PassengerUserSwitching on</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>PassengerUserSwitching off</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Web server has root privileges</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">User switching enabled.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">User switching disabled. Apps are run as
+  <a href="#PassengerDefaultUser">PassengerDefaultUser</a> and
+  <a href="#PassengerDefaultGroup">PassengerDefaultGroup</a>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Web server has no root privileges</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">User switching disabled. Apps are run as the web server’s user.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">User switching disabled. Apps are run as the web server’s user.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph"><p>When using Flying Passenger, the effect is as follows:</p></div>
+<table class="tableblock frame-all grid-all" style="
+width:100%;
+">
+<col style="width:50%;">
+<col style="width:50%;">
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Daemon run with root privileges</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">User switching enabled.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Daemon run without root privileges</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">User switching disabled. Apps are run as the daemon’s user.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph"><p>When user switching is enabled, the following rules are followed to determine what user an application should be run as. The first matching rule is the rule that will be followed.</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+If
+  <a href="#PassengerUser">PassengerUser</a> or
+  <a href="#PassengerGroup">PassengerGroup</a>
+are set, then the application will be run as the specified user/group. Thus, these options are a good way to override user switching settings.
+</p>
+</li>
+<li>
+<p>
+If the startup file is owned by root or an unknown user, then the application will run as the user specified by
   <a href="#PassengerDefaultUser">PassengerDefaultUser</a> and
   <a href="#PassengerDefaultGroup">PassengerDefaultGroup</a>.
 </p>
 </li>
+<li>
+<p>
+Otherwise, the application is run as the owner of the startup file.
+</p>
+</li>
+</ol></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_caveats_amp_troubleshooting"></span><h4 data-comment-topic="caveats-troubleshooting-161hgge" data-anchor="_caveats_amp_troubleshooting">9.1.3. Caveats & troubleshooting</h4>
+<div class="paragraph"><p>If your application regularly encounters permission errors or fails to find certain files, then this is an indication that your application is started as a user that you did not intent it to be run as. Other symptoms include:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+The application fails to start because Bundler complains that it cannot find gems. This probably indicates that Bundler does not have read access to the directory that contains Bundler-installed gems.
+</p>
+</li>
+<li>
+<p>
+The application fails to start and its error message mentions the path <em>/nonexistent</em>. This probably indicates that your application is started as the <em>nobody</em> user. This is because on many systems, the <em>nobody</em> user’s home directory is <em>/nonexistent</em>.
+</p>
+</li>
 </ul></div>
-<div class="paragraph"><p>User switching can be disabled with the
-<a href="#PassengerUserSwitching">PassengerUserSwitching</a>
-option.</p></div>
+<div class="paragraph"><p>To check whether it is indeed the case that your application is started as a different user than you intended to, see <a href="#finding_out_app_user">Finding out what user an application is running as</a>.</p></div>
+<div class="paragraph"><p>The most likely reason why your application is started as <em>nobody</em> is probably because your startup file is owned by <em>root</em>, by <em>nobody</em> or by an unknown user. To fix this, change the owner of the startup file to the owner that you want to run the application as.</p></div>
+<div class="paragraph"><p>Whatever user your application runs as, it must have read access to the <a href="#application_root">application root</a>, and read/write access to the application’s <em>logs</em> directory.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="finding_out_app_user"></span><h4 data-comment-topic="finding-out-what-user-an-application-is-running-as-7uwrol" data-anchor="finding_out_app_user">9.1.4. Finding out what user an application is running as</h4>
+<div class="paragraph"><p>To find our what user an application is started as, first access its URL in your browser so that Phusion Passenger starts the application. For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>http://www.example.local/</pre>
+</div>
+</div>
+<div class="paragraph"><p>The application will now either successfully start or fail to start. If it fails to start then you will see an error page that tells you what user the application was being started as. If you do not see the error page in the browser then set
+  <a href="#PassengerFriendlyErrorPages">PassengerFriendlyErrorPages</a>
+on.</p></div>
+<div class="paragraph"><p>If the application successfully started, then run <span class="monospaced">passenger-status</span> to find the process’s PID:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>.---------- General information -----------
+Max pool size : 6
+Processes     : 1
+Requests in top-level queue : 0
+
+.---------- Application groups -----------
+/webapps/example.local#default:
+  App root: /webapps/example.local
+  Requests in queue: 0
+  * PID: 16915   Sessions: 0       Processed: 1       Uptime: 2s
+    CPU: 0%      Memory  : 9M      Last used: 2s ago</pre>
+</div>
+</div>
+<div class="paragraph"><p>In the above example we see that the PID is 16915. Next, use <em>ps</em> to find out the user that it is running as:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre># ps -o pid,user,comm -p 16915
+  PID USER    COMM
+16915 phusion Passenger RackApp: /webapps/example.local</pre>
+</div>
+</div>
+<div class="paragraph"><p>As you can see, the application in this example is being run as user <em>phusion</em>.</p></div>
+</div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="reducing_memory_usage" data-comment-topic="reducing-memory-consumption-of-ruby-on-rails-applications-by-33--1ubxnq0">8.2. Reducing memory consumption of Ruby on Rails applications by 33%</h3>
-<div class="paragraph"><p>Is it possible to reduce memory consumption of your Rails applications by 33% on average,
-by using <a href="http://www.rubyenterpriseedition.com/">Ruby Enterprise Edition</a>.
-Please visit the website for details.</p></div>
-<div class="paragraph"><p>Note that this feature does not apply to Rack applications.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="reducing_memory_usage"></span><h3 data-comment-topic="reducing-memory-consumption-of-ruby-on-rails-applications-by-33--1ubxnq0" data-anchor="reducing_memory_usage">9.2. Copy-on-write memory support (reducing memory consumption of Ruby applications)</h3>
+<div class="paragraph"><p>Phusion Passenger automatically leverages operating system virtual memory copy-on-write features in order to reduce the memory usage of Ruby applications. Experience has shown that this reduces memory usage by 33% on average. For this mechanism to work, a Ruby interpreter with a copy-on-write friendly garbage collector is required. The following Ruby interpreters have copy-on-write friendly garbage collectors:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+MRI Ruby >= 2.0. Versions prior to 2.0 did not have a copy-on-write friendly garbage collector.
+</p>
+</li>
+<li>
+<p>
+<a href="http://www.rubyenterpriseedition.com/">Ruby Enterprise Edition</a>, which was Phusion’s branch of MRI Ruby 1.8 with a copy-on-write friendly garbage collector and other enhancement. It has reached End-Of-Life as of 2012, but remains available for legacy systems.
+</p>
+</li>
+</ul></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="capistrano" data-comment-topic="capistrano-recipe-syzgo7">8.3. Capistrano recipe</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="capistrano"></span><h3 data-comment-topic="capistrano-recipe-syzgo7" data-anchor="capistrano">9.3. Capistrano recipe</h3>
 <div class="paragraph"><p>Phusion Passenger can be combined with <a href="http://capify.org/">Capistrano</a>.
 The following Capistrano recipe demonstrates Phusion Passenger support.
 It assumes that you’re using Git as version control system.</p></div>
@@ -4544,10 +5983,12 @@ end</pre>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="bundler_support" data-comment-topic="bundler-support-cf72ih">8.4. Bundler support</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="bundler_support"></span><h3 data-comment-topic="bundler-support-cf72ih" data-anchor="bundler_support">9.4. Bundler support</h3>
 <div class="paragraph"><p>Phusion Passenger has automatic support for <a href="http://gembundler.com/git.html">Bundler</a>.
-It works as follows:</p></div>
-<div class="ulist"><ul>
+The support consists of loading your application under the environment defined by your
+Gemfile. In other words, Phusion Passenger loads your application as if <em>bundle exec</em> was used.</p></div>
+<div class="paragraph"><p>The Bundler support works as follows:</p></div>
+<div class="ulist"><ul>
 <li>
 <p>
 If you have a <em>.bundle/environment.rb</em> in your application root, then Phusion
@@ -4571,54 +6012,25 @@ have any negative effects.</p></div>
 <div class="paragraph"><p>Phusion Passenger assumes that you’re using Bundler >= 0.9.5. If you don’t want Phusion
 Passenger to run its Bundler support code, e.g. because you need to use an older version
 of Bundler with an incompatible API or because you use a system other than Bundler, then
-you can override Phusion Passenger’s Bundler support code by creating a file
+you can override Phusion Passenger’s Bundler support code by creating an empty file
 <em>config/setup_load_paths.rb</em>. If this file exists then it will be required before loading
 the application startup file. In this file you can do whatever you need to setup Bundler
 or a similar system.</p></div>
-</div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="moving_phusion_passenger" data-comment-topic="moving-phusion-passenger-to-a-different-directory-16fapwo">8.5. Moving Phusion Passenger to a different directory</h3>
-<div class="paragraph"><p>It is possible to relocate the Phusion Passenger files to a different directory. It
-involves two steps:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-Moving the directory.
-</p>
-</li>
-<li>
-<p>
-Updating the “PassengerRoot” configuration option in Apache.
-</p>
-</li>
-</ol></div>
-<div class="paragraph"><p>For example, if Phusion Passenger is located in <em>/opt/passenger/</em>, and you’d like to
-move it to <em>/usr/local/passenger/</em>, then do this:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-Run the following command:
-</p>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="add_passenger_to_gemfile"></span><h4 data-comment-topic="does-phusion-passenger-itself-need-to-be-added-to-the-gemfile--17whimp" data-anchor="add_passenger_to_gemfile">9.4.1. Does Phusion Passenger itself need to be added to the Gemfile?</h4>
+<div class="paragraph"><p>It is never necessary to add Phusion Passenger to the application’s Gemfile. In case of Phusion Passenger Standalone, it is not necessary to execute the <span class="monospaced">passenger</span> command through <span class="monospaced">bundle exec</span>. The reason for this is because Phusion Passenger automatically loads the Gemfile environment. Most other Ruby application servers do not automatically load the Gemfile environment, which is why they must be add [...]
+<div class="paragraph"><p>Even when your application uses any of the Phusion Passenger APIs, you still do not need to add Phusion Passenger to the Gemfile. The only thing you need to do is to put Phusion Passenger API calls inside <span class="monospaced">if</span> blocks that check whether Phusion Passenger is active, by checking whether the <span class="monospaced">PhusionPassenger</span> namespace is defined:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>mv /opt/passenger /usr/local/passenger</pre>
+<pre><strong>if</strong> defined?(PhusionPassenger)
+    ...
+<strong>end</strong></pre>
 </div>
 </div>
-</li>
-<li>
-<p>
-Edit your Apache configuration file, and set:
-</p>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>PassengerRoot /usr/local/passenger</pre>
-</div>
 </div>
-</li>
-</ol></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_installing_multiple_ruby_on_rails_versions" data-comment-topic="installing-multiple-ruby-on-rails-versions-mi5j14">8.6. Installing multiple Ruby on Rails versions</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installing_multiple_ruby_on_rails_versions"></span><h3 data-comment-topic="installing-multiple-ruby-on-rails-versions-mi5j14" data-anchor="_installing_multiple_ruby_on_rails_versions">9.5. Installing multiple Ruby on Rails versions</h3>
 <div class="paragraph"><p>Each Ruby on Rails applications that are going to be deployed may require a
 specific Ruby on Rails version. You can install a specific version with
 this command:</p></div>
@@ -4632,7 +6044,7 @@ this command:</p></div>
 other. Phusion Passenger will automatically make use of the correct version.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_making_the_application_restart_after_each_request" data-comment-topic="making-the-application-restart-after-each-request-183bezx">8.7. Making the application restart after each request</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_making_the_application_restart_after_each_request"></span><h3 data-comment-topic="making-the-application-restart-after-each-request-183bezx" data-anchor="_making_the_application_restart_after_each_request">9.6. Making the application restart after each request</h3>
 <div class="paragraph"><p>In some situations it might be desirable to restart the web application after
 each request, for example when developing a non-Rails application that doesn’t
 support code reloading, or when developing a web framework.</p></div>
@@ -4641,21 +6053,23 @@ application’s root folder. Unlike <em>restart.txt</em>, Phusion Passenger does
 check for this file’s timestamp: Phusion Passenger will always restart the
 application, as long as <em>always_restart.txt</em> exists.</p></div>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/note.png" alt="Note">
+<img src="./images/icons/note.png" alt="Note">
 </td>
 <td class="content">If you’re just developing a Rails application then you probably don’t need
-this feature. If you set <em>RailsEnv development</em> in your Apache configuration,
+this feature. If you set
+<em>RailsEnv development</em>
+in your web server configuration,
 then Rails will automatically reload your application code after each request.
-<em>always_restart.txt</em> is only useful if you’re working on Ruby on Rails itself,
-or when you’re not developing a Rails application and your web framework
-does not support code reloading.</td>
-</tr></table>
+<em>always_restart.txt</em> is mostly useful when you’re using a web framework that
+doesn’t support code reloading by itself, of when you’re working on a web framework
+yourself.</td>
+</tr></table>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="sub_uri_deployment_uri_fix" data-comment-topic="how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-a63b6r">8.8. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="sub_uri_deployment_uri_fix"></span><h3 data-comment-topic="how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-a63b6r" data-anchor="sub_uri_deployment_uri_fix">9.7. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments</h3>
 <div class="paragraph"><p>Some people experience broken images and other broken static assets when they
 deploy their application to a sub-URI (i.e. <em>http://mysite.com/railsapp/</em>).
 The reason for this usually is that you used a
@@ -4693,12 +6107,303 @@ please refer to
 <a href="http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html">the Rails API docs</a>.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_x_sendfile_support" data-comment-topic="x-sendfile-support-1cgyykw">8.9. X-Sendfile support</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_out_of_band_garbage_work_and_out_of_band_garbage_collection"></span><h3 data-comment-topic="out-of-band-garbage-work-and-out-of-band-garbage-collection-kav2p8" data-anchor="_out_of_band_garbage_work_and_out_of_band_garbage_collection">9.8. Out-of-Band Garbage Work and Out-of-Band Garbage Collection</h3>
+<div class="paragraph"><p><strong>Available since Phusion Passenger 4.0.0.</strong></p></div>
+<div class="paragraph"><p><strong>At this time, this feature is only available on Ruby.</strong></p></div>
+<div class="paragraph"><p>The Out-of-Band Work feature allows you to run arbitrary long-running tasks outside normal request cycles. This works by letting current requests to the process finish, then telling the process to perform the out-of-band work, then resuming passing requests to the process after said work is finished.</p></div>
+<div class="paragraph"><p>A specific (and perhaps primary) use case of of Out-of-Band Work is <strong>Out-of-Band Garbage Collection</strong>. The garbage collector is run outside normal request cycles so that garbage collection runs inside normal request cycles can finish a lot faster. This can potentially save tens to hundreds of milliseconds of latency in requests.</p></div>
+<div class="paragraph"><p>Because Out-of-Band Work is implemented at the Phusion Passenger inter-process request routing level, and not by, say, spawning a thread inside the application process, Out-of-Band Work has the following useful properties:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+It works well even with tasks that can pause all threads. The MRI Ruby garbage collector is a stop-the-world mark-and-sweep garbage collector.
+</p>
+</li>
+<li>
+<p>
+Phusion Passenger can spawn more processes as necessary, in order to prevent situations in which all application processes are busy performing out-of-band work. Phusion Passenger guarantees that there’s at least one process that’s ready to process requests.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Applications can use Out-of-Band Work as follows:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+Request out-of-band work by outputting the <span class="monospaced">X-Passenger-Request-OOB-Work</span> header during a request. It does not matter what the value is. At this time, it is not possible to request out-of-band work from outside requests.
+</p>
+</li>
+<li>
+<p>
+You can actually perform out-of-band work when you receive a <span class="monospaced">:oob_work</span> Phusion Passenger event.
+</p>
+</li>
+</ol></div>
+<div class="paragraph"><p>Note that even though you can request out-of-band work, there’s no guarantee that Phusion Passenger will send an <span class="monospaced">oob_work</span> event in a timely manner, if at all. It is also possible that Phusion Passenger sends an <span class="monospaced">oob_work</span> event without you ever having requested one. This latter could for example happen if the OOB work is administrator-initiated. Do not make any assumptions in your code.</p></div>
+<div class="paragraph"><p>Here’s an example which implements out-of-band garbage collection using the Out-of-Band framework. This example code doesn’t do anything when the code is not being run in Phusion Passenger, thanks to the <span class="monospaced">if</span> block.</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-style: italic"><span style="color: #9A1900"># Somewhere in a controller method:</span></span>
+<span style="font-style: italic"><span style="color: #9A1900"># Tell Phusion Passenger we want to perform OOB work.</span></span>
+response<span style="color: #990000">.</span>headers<span style="color: #990000">[</span><span style="color: #FF0000">"X-Passenger-Request-OOB-Work"</span><span style="color: #990000">]</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"true"</span>
+
+<span style="font-style: italic"><span style="color: #9A1900"># Somewhere during application initialization:</span></span>
+<span style="font-weight: bold"><span style="color: #0000FF">if</span></span> <span style="font-weight: bold"><span style="color: #0000FF">defined</span></span><span style="color: #990000">?(</span>PhusionPassenger<span style="color: #990000">)</span>
+    PhusionPassenger<span style="color: #990000">.</span>on_event<span style="color: #990000">(:</span>oob_work<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">do</span></span>
+        <span style="font-style: italic"><span style="color: #9A1900"># Phusion Passenger has told us that we're ready to perform OOB work.</span></span>
+        t0 <span style="color: #990000">=</span> Time<span style="color: #990000">.</span>now
+        GC<span style="color: #990000">.</span>start
+        Rails<span style="color: #990000">.</span>logger<span style="color: #990000">.</span>info <span style="color: #FF0000">"Out-Of-Bound GC finished in #{Time.now - t0} sec"</span>
+    <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span></tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>For your convenience, Phusion Passenger provides a Rack middleware for out-of-band garbage collection. Add the following to your <span class="monospaced">config.ru</span>. Likewise, this example code doesn’t do anything when the code is not being run in Phusion Passenger, thanks to the <span class="monospaced">if</span> block.</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">if</span></span> <span style="font-weight: bold"><span style="color: #0000FF">defined</span></span><span style="color: #990000">?(</span>PhusionPassenger<span style="color: #990000">)</span>
+    <span style="font-weight: bold"><span style="color: #000080">require</span></span> <span style="color: #FF0000">'phusion_passenger/rack/out_of_band_gc'</span>
+
+    <span style="font-style: italic"><span style="color: #9A1900"># Trigger out-of-band GC every 5 requests.</span></span>
+    use PhusionPassenger<span style="color: #990000">::</span>Rack<span style="color: #990000">::</span>OutOfBandGc<span style="color: #990000">,</span> <span style="color: #993399">5</span>
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span></tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>It should be noted that, although the application uses the Phusion Passenger API, it is <a href="#add_passenger_to_gemfile"><strong>not</strong> necessary to add Phusion Passenger to the Gemfile</a>.</p></div>
+<div class="paragraph"><p>References:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="http://blog.phusion.nl/2013/01/22/phusion-passenger-4-technology-preview-out-of-band-work/">The Phusion Blog article which first introduced this feature.</a>
+</p>
+</li>
+</ul></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="flying_passenger"></span><h3 data-comment-topic="flying-passenger-q916f7" data-anchor="flying_passenger">9.9. Flying Passenger</h3>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 4.0.6. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>Flying Passenger allows one to decouple Phusion Passenger’s life time from the web server’s life time, so that the web server can be independently restarted from Phusion Passenger, and from any of the application processes served by Phusion Passenger.</p></div>
+<div class="paragraph"><p>Normally, Phusion Passenger starts together with the web server, and shuts down together with the web server. The advantages of this default behavior is that it makes Phusion Passenger easy to administer: one only has to deal with the web server process and can expect all relevant processes to be cleaned up after a web server shut down. However this also brings about a disadvantage: every time one restarts the web server (e.g. to make a minor configuration chang [...]
+<div class="paragraph"><p>This problem is solved by <em>Flying Passenger</em>, which is an advanced mode of operation in Phusion Passenger that allows the web server to be indepedently restarted from Phusion Passenger. When this mode is enabled:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+One must start Phusion Passenger separately from the web server, namely by starting the Flying Passenger daemon. This daemon must - to an extent - be separately configured and managed from the web server.
+</p>
+</li>
+<li>
+<p>
+The web server must be configured to forward requests to the Flying Passenger daemon.
+</p>
+</li>
+<li>
+<p>
+You should beware of the <a href="#flying_passenger_caveats">caveats and limitations</a>.
+</p>
+</li>
+</ul></div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_requirements_2"></span><h4 data-comment-topic="requirements-1ntkin3" data-anchor="_requirements_2">9.9.1. Requirements</h4>
+<div class="paragraph"><p>At this time, this feature is <strong>only available in the Enterprise version of Phusion Passenger for Nginx</strong>. You must have Phusion Passenger for Nginx properly installed.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_basic_usage"></span><h4 data-comment-topic="basic-usage-joifsk" data-anchor="_basic_usage">9.9.2. Basic usage</h4>
+<div class="paragraph"><p>Start the Flying Passenger daemon by invoking the <span class="monospaced">flying-passenger</span> command. The only required option is <span class="monospaced">--socket-file</span>. Depending on whether you wish to enable <a href="#user_switching">User Switching</a>, you have to start <span class="monospaced">flying-passenger</span> with root privileges or not.</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock
+I, [2013-06-14T09:10:13.095339 #77179]  INFO -- : Welcome to Flying Passenger 4.1.0
+I, [2013-06-14T09:10:13.095339 #77179]  INFO -- : Starting PassengerWatchdog...
+I, [2013-06-14T09:10:13.097036 #77179]  INFO -- : PassengerWatchdog started on PID 77181
+...
+I, [2013-06-14T09:10:13.129017 #77179]  INFO -- : PassengerWatchdog initialized properly
+I, [2013-06-14T09:10:13.129127 #77179]  INFO -- : Flying Passenger up and listening on /var/run/flying-passenger.sock!</pre>
+</div>
+</div>
+<div class="paragraph"><p>Now configure Phusion Passenger for Nginx to make use of the Flying Passenger daemon, by setting the <span class="monospaced">passenger_fly_with</span> option to the socket filename:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>http {
+    ...
+    passenger_fly_with /var/run/flying-passenger.sock;
+    ...
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>After (re)starting Nginx, Nginx + Flying Passenger is fully operational:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo /path-to/nginx</pre>
+</div>
+</div>
+<div class="paragraph"><p>You can test it by adding a virtual host for a web app:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>http {
+    ...
+
+    server {
+        listen 80;
+        server_name www.foo.local;
+        root /webapps/foo/public;
+        passenger_enabled on;
+    }
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>Verify that it works by making an HTTP request to it:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ curl http://www.foo.local/</pre>
+</div>
+</div>
+<div class="paragraph"><p>Now let’s verify that restarting the web server does not restart the just-spawned application process. Run <span class="monospaced">passenger-status</span> to obtain the PID of the application process:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo passenger-status
+Version: 4.1.0
+Date   : 2013-06-14 09:21:51 -0400
+.---------- General information -----------
+Max pool size : 6
+Processes     : 1
+Requests in top-level queue : 0
+
+.---------- Application groups -----------
+/webapps/foo#default:
+  App root: /webapps/foo
+  Requests in queue: 0
+  * PID: 77283   Sessions: 0       Processed: 1       Uptime: 2s
+    CPU: 1%      Memory  : 8M      Last used: 2s ago</pre>
+</div>
+</div>
+<div class="paragraph"><p>As you can see, the PID of the application process is <strong>77283</strong>. Now let’s see what happens if we restart Nginx:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo /path-to/nginx -s stop
+$ sudo /path-to/nginx
+$ sudo passenger-status</pre>
+</div>
+</div>
+<div class="paragraph"><p>The application process should remain there, unchanged:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo passenger-status
+Version: 4.1.0
+Date   : 2013-06-14 09:21:51 -0400
+.---------- General information -----------
+Max pool size : 6
+Processes     : 1
+Requests in top-level queue : 0
+
+.---------- Application groups -----------
+/webapps/foo#default:
+  App root: /webapps/foo
+  Requests in queue: 0
+  * PID: 77283   Sessions: 0       Processed: 1       Uptime: 18s
+    CPU: 1%      Memory  : 8M      Last used: 18s ago</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="configuring_flying_passenger"></span><h4 data-comment-topic="configuring-flying-passenger-1v35vgg" data-anchor="configuring_flying_passenger">9.9.3. Configuring Flying Passenger</h4>
+<div class="paragraph"><p>Flying Passenger gets <strong>some</strong> configuration from the web server, but not all. In particular, most web server directives that are only valid in the <span class="monospaced">http</span> context, e.g. <a href="#PassengerLogLevel">passenger_log_level</a>, have no effect when using Flying Passenger. Instead, you are supposed to pass these configuration directives through command line options to the Flying Passenger daemon. Configuration directives that  [...]
+<div class="paragraph"><p>For example, to achieve the same effect as setting passenger_log_level to 2, run the Flying Passenger daemon as follows:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock --log-level=2</pre>
+</div>
+</div>
+<div class="paragraph"><p>Currently, not all configuration directives have a Flying Passenger equivalent. Run the following command to see an overview of available options:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ flying-passenger --help</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_managing_the_flying_passenger_daemon"></span><h4 data-comment-topic="managing-the-flying-passenger-daemon-1bng2bu" data-anchor="_managing_the_flying_passenger_daemon">9.9.4. Managing the Flying Passenger daemon</h4>
+<div class="paragraph"><p>The Flying Passenger daemon runs in the foreground by default. This is undesirable on server environments. You can make it go into the background by passing <span class="monospaced">--daemonize</span>, <span class="monospaced">--log-file</span> and <span class="monospaced">--pid-file</span>:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock \
+    --daemonize --log-file=/var/log/flying-passenger.log \
+    --pid-file=/var/run/flying-passenger.pid</pre>
+</div>
+</div>
+<div class="paragraph"><p>You can shut down a Flying Passenger daemon by sending SIGINT or SIGTERM to it:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ kill `cat /var/run/flying-passenger.pid`</pre>
+</div>
+</div>
+<div class="paragraph"><p>We recommend using <a href="http://cr.yp.to/daemontools.html">daemontools</a> or <a href="http://smarden.org/runit/">runit</a> for managing the Flying Passenger daemon. These tools will allow automatically starting the Flying Passenger daemon at boot, and will automatically restart the daemon if it crashes. You can create and enable a daemontools/runit service as folows:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo mkdir /etc/service/flying-passenger
+$ sudo nano /etc/service/flying-passenger/run
+#!/bin/sh
+exec /path-to/flying-passenger \
+    --socket-file=/var/run/flying-passenger.sock \
+    --log-file=/var/log/flying-passenger.log \
+    --pid-file=/var/run/flying-passenger.pid</pre>
+</div>
+</div>
+<div class="paragraph"><p>Immediately after creating the <span class="monospaced">run</span> file, daemontools/runit automatically runs it to start the daemon. Note that the location (<span class="monospaced">/etc/service</span>) depends on the OS or Linux distros. Sometimes it’s <span class="monospaced">/service</span>. Also note that we start the Flying Passenger daemon without <span class="monospaced">--daemonize</span>.</p></div>
+<div class="paragraph"><p>To shut down a daemontools/runit-managed daemon, you need to use <span class="monospaced">svc -d /etc/service/flying-passenger</span> (daemontools) or <span class="monospaced">sv stop /etc/service/flying-passenger</span> (runit) instead of sending a signal to the process.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="flying_passenger_caveats"></span><h4 data-comment-topic="caveats-and-limitations-lz3rbb" data-anchor="flying_passenger_caveats">9.9.5. Caveats and limitations</h4>
+<div class="paragraph"><p>Beware of the following caveats and limitations when using Flying Passenger:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+The Nginx executable <strong>must</strong> be compiled with the same version of Phusion Passenger as the Flying Passenger daemon. Failing to meet this requirement may result in cryptic errors, or may result in certain features not working, until you’ve fixed the situation. When upgrading Phusion Passenger, you must restart both Nginx and the Flying Passenger daemon.
+</p>
+</li>
+<li>
+<p>
+The <a href="#PassengerRoot">passenger_root</a> directive has no effect. When using Flying Passenger, you are not supposed to set <span class="monospaced">passenger_root</span>.
+</p>
+</li>
+<li>
+<p>
+When you add a new application to the web server configuration, Flying Passenger will automatically pick up the application’s settings and spawn this new application upon the first request to it. However it is not capable of automatically starting the new app before a request has been sent to it (i.e. <a href="#PassengerPreStart">passenger_pre_start</a>-like behavior is not available in this case). As a workaround, you can send an HTTP request to your application after starting the daemo [...]
+</p>
+</li>
+<li>
+<p>
+When you remove an application from the web server configuration, Flying Passenger will not detect the removal and will not shut down the associated application processes. Killing the application processes will also not help, because Flying Passenger will restart them per the (now-removed, but still in the Flying Passenger daemon’s memory) <a href="#PassengerMinInstances">passenger_min_instances</a> settings. At the moment, there are two ways to get rid of those processes:
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+Before removing the application from the web server configuration, explicitly set its <span class="monospaced">passenger_min_instances</span> to 0. Next, send a request to it, which will cause the Flying Passenger daemon to take over the new <span class="monospaced">passenger_min_instances 0</span> option. You can then proceed with removing the application from the web server configuration, and restarting the web server. Finally, kill the PIDs associated to those application processes an [...]
+</p>
+</li>
+<li>
+<p>
+Restart the Flying Passenger daemon.
+</p>
+</li>
+</ul></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_x_sendfile_support"></span><h3 data-comment-topic="x-sendfile-support-1cgyykw" data-anchor="_x_sendfile_support">9.10. X-Sendfile support</h3>
 <div class="paragraph"><p>Phusion Passenger does not provide X-Sendfile support by itself. Please install
 <a href="http://tn123.ath.cx/mod_xsendfile/">mod_xsendfile</a> for X-Sendfile support.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_upload_progress" data-comment-topic="upload-progress-71cyl7">8.10. Upload progress</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_upload_progress"></span><h3 data-comment-topic="upload-progress-71cyl7" data-anchor="_upload_progress">9.11. Upload progress</h3>
 <div class="paragraph"><p>Phusion Passenger does not provide upload progress support by itself. Please
 try drogus’s <a href="http://github.com/drogus/apache-upload-progress-module/tree/master">
 Apache upload progress module</a> instead.</p></div>
@@ -4706,13 +6411,13 @@ Apache upload progress module</a> instead.</p></div>
 </div>
 </div>
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_under_the_hood" data-comment-topic="under-the-hood-21ue5t">9. Under the hood</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_under_the_hood"></span><h2 data-comment-topic="under-the-hood-21ue5t" data-anchor="_under_the_hood">10. Under the hood</h2>
 <div class="sectionbody">
 <div class="paragraph"><p>Phusion Passenger hides a lot of complexity for the end user (i.e. the web server
 system administrator), but sometimes it is desirable to know what is going on.
 This section describes a few things that Phusion Passenger does under the hood.</p></div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_static_assets_serving" data-comment-topic="static-assets-serving-wo2d9v">9.1. Static assets serving</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_static_assets_serving"></span><h3 data-comment-topic="static-assets-serving-wo2d9v" data-anchor="_static_assets_serving">10.1. Static assets serving</h3>
 <div class="paragraph"><p>Phusion Passenger accelerates serving of static files. This means that, if an URI
 maps to a file that exists, then Phusion Passenger will let Apache serve that file
 directly, without hitting the web application.</p></div>
@@ -4732,7 +6437,7 @@ RewriteRule ^(.*)$ balancer://mongrel%{REQUEST_URI} [P,QSA,L]</pre>
 them.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_page_caching_support" data-comment-topic="page-caching-support-kwq9b9">9.2. Page caching support</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_page_caching_support"></span><h3 data-comment-topic="page-caching-support-kwq9b9" data-anchor="_page_caching_support">10.2. Page caching support</h3>
 <div class="paragraph"><p>For each HTTP request, Phusion Passenger will automatically look for a corresponding
 page cache file, and serve that if it exists. It does this by appending ".html" to
 the filename that the URI normally maps to, and checking whether that file exists.
@@ -4740,19 +6445,19 @@ This check occurs after checking whether the original mapped filename exists (as
 of static asset serving). All this is done without the need for special mod_rewrite
 rules.</p></div>
 <div class="paragraph"><p>For example, suppose that the browser requests <em>/foo/bar</em>.</p></div>
-<div class="olist arabic"><ol class="arabic">
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
 Phusion Passenger will first check whether this URI maps to a static file, i.e.
    whether the file <em>foo/bar</em> exists in the web application’s <em>public</em> directory.
-   If it does then Phusion Passenger will serve this file through Apache immediately.
+   If it does then Phusion Passenger will serve this file through the web server immediately.
 </p>
 </li>
 <li>
 <p>
 If that doesn’t exist, then Phusion Passenger will check whether the file
    <em>foo/bar.html</em> exists. If it does then Phusion Passenger will serve this file
-   through Apache immediately.
+   through the web server immediately.
 </p>
 </li>
 <li>
@@ -4768,7 +6473,7 @@ the <em>public</em> directory. In that case you’ll need to use mod_rewrite to
 page cache files.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="application_detection" data-comment-topic="how-phusion-passenger-detects-whether-a-virtual-host-is-a-web-application-179mp8m">9.3. How Phusion Passenger detects whether a virtual host is a web application</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="application_detection"></span><h3 data-comment-topic="how-phusion-passenger-detects-whether-a-virtual-host-is-a-web-application-179mp8m" data-anchor="application_detection">10.3. How Phusion Passenger detects whether a virtual host is a web application</h3>
 <div class="paragraph"><p>After you’ve read the deployment instructions you might wonder how Phusion Passenger
 knows that the DocumentRoot points to a web application that Phusion Passenger is
 able to serve, and how it knows what kind of web application it is (e.g. Rails or Rack).</p></div>
@@ -4781,7 +6486,7 @@ whether the following file exists:</p></div>
 </div>
 <div class="paragraph"><p>If you’re not a programmer and don’t understand the above pseudo-code snippet, it means
 that Phusion Passenger will:</p></div>
-<div class="olist arabic"><ol class="arabic">
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
 Extract the parent directory filename from the value of the DocumentRoot directory.
@@ -4817,28 +6522,30 @@ Phusion Passenger will look for <em>config.ru</em> instead of <em>config/environ
 </div>
 </div>
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_appendix_a_about_this_document" data-comment-topic="appendix-a-about-this-document-103toqs">10. Appendix A: About this document</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_appendix_a_about_this_document"></span><h2 data-comment-topic="appendix-a-about-this-document-103toqs" data-anchor="_appendix_a_about_this_document">11. Appendix A: About this document</h2>
 <div class="sectionbody">
 <div class="paragraph"><p>The text of this document is licensed under the
 <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons
 Attribution-Share Alike 3.0 Unported License</a>.</p></div>
 <div class="paragraph"><p><span class="image">
 <a class="image" href="http://creativecommons.org/licenses/by-sa/3.0/">
-<img src="images/by_sa.png" alt="images/by_sa.png"></a>
+<img src="images/by_sa.png" alt="images/by_sa.png">
+</a>
 </span></p></div>
 <div class="paragraph"><p>Phusion Passenger is brought to you by <a href="http://www.phusion.nl/">Phusion</a>.</p></div>
 <div class="paragraph"><p><span class="image">
 <a class="image" href="http://www.phusion.nl/">
-<img src="images/phusion_banner.png" alt="images/phusion_banner.png"></a>
+<img src="images/phusion_banner.png" alt="images/phusion_banner.png">
+</a>
 </span></p></div>
 <div class="paragraph"><p>Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.</p></div>
 </div>
 </div>
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_appendix_b_terminology" data-comment-topic="appendix-b-terminology-h4eaf4">11. Appendix B: Terminology</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_appendix_b_terminology"></span><h2 data-comment-topic="appendix-b-terminology-h4eaf4" data-anchor="_appendix_b_terminology">12. Appendix B: Terminology</h2>
 <div class="sectionbody">
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="application_root" data-comment-topic="application-root-otx6xf">11.1. Application root</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="application_root"></span><h3 data-comment-topic="application-root-otx6xf" data-anchor="application_root">12.1. Application root</h3>
 <div class="paragraph"><p>The root directory of an application that’s served by Phusion Passenger.</p></div>
 <div class="paragraph"><p>In case of Ruby on Rails applications, this is the directory that contains
 <em>Rakefile</em>, <em>app/</em>, <em>config/</em>, <em>public/</em>, etc. In other words, the directory
@@ -4899,10 +6606,18 @@ For example, take the following directory structure:</p></div>
 </div>
 </div>
 </div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="idle_process"></span><h3 data-comment-topic="idle-process-potb6g" data-anchor="idle_process">12.2. Idle process</h3>
+<div class="paragraph"><p>An "idle process" refers to a process that hasn’t processed any requests for a while.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="inactive_process"></span><h3 data-comment-topic="inactive-process-16gjv2e" data-anchor="inactive_process">12.3. Inactive process</h3>
+<div class="paragraph"><p>An "inactive process" refers to a process that’s current not processing any requests. An idle process is always inactive, but an inactive process is not always considered idle.</p></div>
+</div>
 </div>
 </div>
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="spawning_methods_explained" data-comment-topic="appendix-c-spawning-methods-explained-owghi9">12. Appendix C: Spawning methods explained</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="spawning_methods_explained"></span><h2 data-comment-topic="appendix-c-spawning-methods-explained-owghi9" data-anchor="spawning_methods_explained">13. Appendix C: Spawning methods explained</h2>
 <div class="sectionbody">
 <div class="paragraph"><p>At its core, Phusion Passenger is an HTTP proxy and process manager. It spawns
 Ruby on Rails/Rack/WSGI worker processes (which may also be referred to as
@@ -4912,7 +6627,7 @@ processes.</p></div>
 Let’s go over the different spawning methods. For simplicity’s sake, let’s
 assume that we’re only talking about Ruby on Rails applications.</p></div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_the_most_straightforward_and_traditional_way_conservative_spawning" data-comment-topic="the-most-straightforward-and-traditional-way-conservative-spawning-1ybbli2">12.1. The most straightforward and traditional way: conservative spawning</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_the_most_straightforward_and_traditional_way_direct_spawning"></span><h3 data-comment-topic="the-most-straightforward-and-traditional-way-conservative-spawning-1ybbli2" data-anchor="_the_most_straightforward_and_traditional_way_direct_spawning">13.1. The most straightforward and traditional way: direct spawning</h3>
 <div class="paragraph"><p>Phusion Passenger could create a new Ruby process, which will then load the
 Rails application along with the entire Rails framework. This process will then
 enter an request handling main loop.</p></div>
@@ -4921,7 +6636,7 @@ familiar with the Mongrel application server, then this approach is exactly
 what mongrel_cluster performs: it creates N worker processes, each which loads
 a full copy of the Rails application and the Rails framework in memory. The Thin
 application server employs pretty much the same approach.</p></div>
-<div class="paragraph"><p>Note that Phusion Passenger’s version of conservative spawning differs slightly
+<div class="paragraph"><p>Note that Phusion Passenger’s version of direct spawning differs slightly
 from mongrel_cluster. Mongrel_cluster creates entirely new Ruby processes. In
 programmers jargon, mongrel_cluster creates new Ruby processes by forking the
 current process and exec()-ing a new Ruby interpreter. Phusion Passenger on the
@@ -4929,29 +6644,31 @@ other hand creates processes that reuse the already loaded Ruby interpreter. In
 programmers jargon, Phusion Passenger calls fork(), but not exec().</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_the_smart_spawning_method" data-comment-topic="the-smart-spawning-method-1cvu9dd">12.2. The smart spawning method</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_the_smart_spawning_method"></span><h3 data-comment-topic="the-smart-spawning-method-1cvu9dd" data-anchor="_the_smart_spawning_method">13.2. The smart spawning method</h3>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/note.png" alt="Note">
+<img src="./images/icons/note.png" alt="Note">
 </td>
 <td class="content">Smart spawning is supported for all Ruby applications but not for WSGI applications.</td>
-</tr></table>
+</tr></table>
 </div>
-<div class="paragraph"><p>While conservative spawning works well, it’s not as efficient as it could be
+<div class="paragraph"><p>While direct spawning works well, it’s not as efficient as it could be
 because each worker process has its own private copy of the Rails application
 as well as the Rails framework. This wastes memory as well as startup time.</p></div>
 <div class="paragraph"><p><span class="image">
-<img src="images/conservative_spawning.png" alt="Worker processes and conservative spawning"></span><br><em>Figure: Worker processes and conservative spawning. Each worker process has its
+<img src="images/direct_spawning.png" alt="Worker processes and direct spawning">
+</span><br>
+<em>Figure: Worker processes and direct spawning. Each worker process has its
 own private copy of the application code and Rails framework code.</em></p></div>
 <div class="paragraph"><p>It is possible to make the different worker processes share the memory occupied
 by application and Rails framework code, by utilizing so-called
 copy-on-write semantics of the virtual memory system on modern operating
 systems. As a side effect, the startup time is also reduced. This is technique
-is exploited by Phusion Passenger’s <em>smart</em> and <em>smart-lv2</em> spawn methods.</p></div>
+is exploited by Phusion Passenger’s <em>smart</em> spawn method.</p></div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_how_it_works" data-comment-topic="how-it-works-672zja">12.2.1. How it works</h4>
-<div class="paragraph"><p>When the <em>smart-lv2</em> spawn method is being used, Phusion Passenger will first
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_how_it_works"></span><h4 data-comment-topic="how-it-works-672zja" data-anchor="_how_it_works">13.2.1. How it works</h4>
+<div class="paragraph"><p>When the <em>smart</em> spawn method is being used, Phusion Passenger will first
 create a so-called <em>ApplicationSpawner server</em> process. This process loads the
 entire Rails application along with the Rails framework, by loading
 <em>environment.rb</em>. Then, whenever Phusion Passenger needs a new worker process,
@@ -4966,22 +6683,15 @@ processes will share as much common
 memory as possible. That is, they will all share the same application and Rails
 framework code.</p></div>
 <div class="paragraph"><p><span class="image">
-<img src="images/smart-lv2.png" alt="images/smart-lv2.png"></span><br><em>Figure: Worker processes and the smart-lv2 spawn method. All worker processes,
+<img src="images/smart.png" alt="images/smart.png">
+</span><br>
+<em>Figure: Worker processes and the smart spawn method. All worker processes,
 as well as the ApplicationSpawner, share the same application code and Rails
 framework code.</em></p></div>
-<div class="paragraph"><p>The <em>smart</em> spawn method goes even further, by caching the Rails framework in
-another process called the <em>FrameworkSpawner server</em>. This process only loads
-the Rails framework, not the application. When a FrameworkSpawner server is
-instructed to create a new worker process, it will create a new
-ApplicationSpawner to which the instruction will be delegated. All those
-ApplicationSpawner servers, as well as all worker processes created by those
-ApplicationSpawner servers, will share the same Rails framework code.</p></div>
-<div class="paragraph"><p>The <em>smart-lv2</em> method allows different worker processes that belong to the same
-application to share memory. The <em>smart</em> method allows different worker
-processes - that happen to use the same Rails version - to share memory, even if
-they don’t belong to the same application.</p></div>
+<div class="paragraph"><p>The <em>smart</em> method allows different worker processes that belong to the same
+application to share memory.</p></div>
 <div class="paragraph"><p>Notes:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 Vendored Rails frameworks cannot be shared by different applications, even if
@@ -4991,53 +6701,32 @@ Vendored Rails frameworks cannot be shared by different applications, even if
 </li>
 <li>
 <p>
-ApplicationSpawner and FrameworkSpawner servers have an idle timeout just
-  like worker processes. If an ApplicationSpawner/FrameworkSpawner server hasn’t
-  been instructed to do anything for a while, it will be shutdown in order to
-  conserve memory. This idle timeout is configurable.
+ApplicationSpawner servers have an idle timeout just like worker processes.
+  If an ApplicationSpawner/FrameworkSpawner server hasn’t been instructed to do
+  anything for a while, it will be shutdown in order to conserve memory. This
+  idle timeout is configurable.
 </p>
 </li>
 </ul></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_summary_of_benefits" data-comment-topic="summary-of-benefits-1yrihfb">12.2.2. Summary of benefits</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_summary_of_benefits"></span><h4 data-comment-topic="summary-of-benefits-1yrihfb" data-anchor="_summary_of_benefits">13.2.2. Summary of benefits</h4>
 <div class="paragraph"><p>Suppose that Phusion Passenger needs a new worker process for an application
 that uses Rails 2.2.1.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-If the <em>smart-lv2</em> spawning method is used, and an ApplicationSpawner server
-  for this application is already running, then worker process creation time is
-  about 10 times faster than conservative spawning. This worker process will also
-  share application and Rails framework code memory with the ApplicationSpawner
-  server and the worker processes that had been spawned by this ApplicationSpawner
-  server.
-</p>
-</li>
-<li>
-<p>
-If the <em>smart</em> spawning method is used, and a FrameworkSpawner server for
-  Rails 2.2.1 is already running, but no ApplicationSpawner server for this
-  application is running, then worker process creation time is about 2 times
-  faster than conservative spawning. If there is an ApplicationSpawner server
-  for this application running, then worker process creation time is about 10
-  times faster. This worker process will also share application and Rails
-  framework code memory with the ApplicationSpawner and FrameworkSpawner
-  servers.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>You could compare ApplicationSpawner and FrameworkSpawner servers with stem
-cells, that have the ability to quickly change into more specific cells (worker
-process).</p></div>
-<div class="paragraph"><p>In practice, the smart spawning methods could mean a memory saving of about 33%,
+<div class="paragraph"><p>If the <em>smart</em> spawning method is used, and an ApplicationSpawner server
+for this application is already running, then worker process creation time is
+about 10 times faster than direct spawning. This worker process will also
+share application and Rails framework code memory with the ApplicationSpawner
+server and the worker processes that had been spawned by this ApplicationSpawner
+server.</p></div>
+<div class="paragraph"><p>In practice, the smart spawning method could mean a memory saving of about 33%,
 assuming that your Ruby interpreter is <a href="#reducing_memory_usage">copy-on-write friendly</a>.</p></div>
 <div class="paragraph"><p>Of course, smart spawning is not without gotchas. But if you understand the
 gotchas you can easily reap the benefits of smart spawning.</p></div>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_smart_spawning_gotcha_1_unintentional_file_descriptor_sharing" data-comment-topic="smart-spawning-gotcha-1-unintentional-file-descriptor-sharing-z1y55l">12.3. Smart spawning gotcha #1: unintentional file descriptor sharing</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_smart_spawning_gotcha_1_unintentional_file_descriptor_sharing"></span><h3 data-comment-topic="smart-spawning-gotcha-1-unintentional-file-descriptor-sharing-z1y55l" data-anchor="_smart_spawning_gotcha_1_unintentional_file_descriptor_sharing">13.3. Smart spawning gotcha #1: unintentional file descriptor sharing</h3>
 <div class="paragraph"><p>Because worker processes are created by forking from an ApplicationSpawner
 server, it will share all file descriptors that are opened by the
 ApplicationSpawner server. (This is part of the semantics of the Unix
@@ -5063,7 +6752,7 @@ http://www.gnu.org/software/src-highlite -->
             <span style="font-style: italic"><span style="color: #9A1900"># We're in smart spawning mode.</span></span>
             <span style="color: #990000">...</span> code to reestablish socket connections here <span style="color: #990000">...</span>
         <span style="font-weight: bold"><span style="color: #0000FF">else</span></span>
-            <span style="font-style: italic"><span style="color: #9A1900"># We're in conservative spawning mode. We don't need to do anything.</span></span>
+            <span style="font-style: italic"><span style="color: #9A1900"># We're in direct spawning mode. We don't need to do anything.</span></span>
         <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
     <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
 <span style="font-weight: bold"><span style="color: #0000FF">end</span></span></tt></pre>
@@ -5073,7 +6762,7 @@ http://www.gnu.org/software/src-highlite -->
 database upon creating a new worker process, which is why you normally do not
 encounter any database issues when using smart spawning mode.</p></div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_example_1_memcached_connection_sharing_harmful" data-comment-topic="example-1-memcached-connection-sharing-harmful--c71wqw">12.3.1. Example 1: Memcached connection sharing (harmful)</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_example_1_memcached_connection_sharing_harmful"></span><h4 data-comment-topic="example-1-memcached-connection-sharing-harmful--c71wqw" data-anchor="_example_1_memcached_connection_sharing_harmful">13.3.1. Example 1: Memcached connection sharing (harmful)</h4>
 <div class="paragraph"><p>Suppose we have a Rails application that connects to a Memcached server in
 <em>environment.rb</em>. This causes the ApplicationSpawner to have a socket connection
 (file descriptor) to the Memcached server, as shown in the following figure:</p></div>
@@ -5164,7 +6853,7 @@ http://www.gnu.org/software/src-highlite -->
             <span style="font-style: italic"><span style="color: #9A1900"># We're in smart spawning mode.</span></span>
             reestablish_connection_to_memcached
         <span style="font-weight: bold"><span style="color: #0000FF">else</span></span>
-            <span style="font-style: italic"><span style="color: #9A1900"># We're in conservative spawning mode. We don't need to do anything.</span></span>
+            <span style="font-style: italic"><span style="color: #9A1900"># We're in direct spawning mode. We don't need to do anything.</span></span>
         <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
     <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
 <span style="font-weight: bold"><span style="color: #0000FF">end</span></span></tt></pre>
@@ -5172,7 +6861,7 @@ http://www.gnu.org/software/src-highlite -->
 </div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_example_2_log_file_sharing_not_harmful" data-comment-topic="example-2-log-file-sharing-not-harmful--1p2yuol">12.3.2. Example 2: Log file sharing (not harmful)</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_example_2_log_file_sharing_not_harmful"></span><h4 data-comment-topic="example-2-log-file-sharing-not-harmful--1p2yuol" data-anchor="_example_2_log_file_sharing_not_harmful">13.3.2. Example 2: Log file sharing (not harmful)</h4>
 <div class="paragraph"><p>There are also cases in which unintentional file descriptor sharing is not harmful.
 One such case is log file file descriptor sharing. Even if two processes write
 to the log file at the same time, the worst thing that can happen is that the
@@ -5184,7 +6873,7 @@ Memcached example, doesn’t help.</p></div>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_smart_spawning_gotcha_2_the_need_to_revive_threads" data-comment-topic="smart-spawning-gotcha-2-the-need-to-revive-threads-1k6cj7d">12.4. Smart spawning gotcha #2: the need to revive threads</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_smart_spawning_gotcha_2_the_need_to_revive_threads"></span><h3 data-comment-topic="smart-spawning-gotcha-2-the-need-to-revive-threads-1k6cj7d" data-anchor="_smart_spawning_gotcha_2_the_need_to_revive_threads">13.4. Smart spawning gotcha #2: the need to revive threads</h3>
 <div class="paragraph"><p>Another part of the <em>fork()</em> system call’s semantics is the fact that threads
 disappear after a fork call. So if you’ve created any threads in environment.rb,
 then those threads will no longer be running in newly created worker process.
@@ -5202,7 +6891,7 @@ http://www.gnu.org/software/src-highlite -->
             <span style="font-style: italic"><span style="color: #9A1900"># We're in smart spawning mode.</span></span>
             <span style="color: #990000">...</span> code to revive threads here <span style="color: #990000">...</span>
         <span style="font-weight: bold"><span style="color: #0000FF">else</span></span>
-            <span style="font-style: italic"><span style="color: #9A1900"># We're in conservative spawning mode. We don't need to do anything.</span></span>
+            <span style="font-style: italic"><span style="color: #9A1900"># We're in direct spawning mode. We don't need to do anything.</span></span>
         <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
     <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
 <span style="font-weight: bold"><span style="color: #0000FF">end</span></span></tt></pre>
@@ -5210,7 +6899,7 @@ http://www.gnu.org/software/src-highlite -->
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_smart_spawning_gotcha_3_code_load_order" data-comment-topic="smart-spawning-gotcha-3-code-load-order-nkotiy">12.5. Smart spawning gotcha #3: code load order</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_smart_spawning_gotcha_3_code_load_order"></span><h3 data-comment-topic="smart-spawning-gotcha-3-code-load-order-nkotiy" data-anchor="_smart_spawning_gotcha_3_code_load_order">13.5. Smart spawning gotcha #3: code load order</h3>
 <div class="paragraph"><p>This gotcha is only applicable to the <em>smart</em> spawn method, not the <em>smart-lv2</em>
 spawn method.</p></div>
 <div class="paragraph"><p>If your application expects the Rails framework to be not loaded during the
@@ -5229,12 +6918,405 @@ has no effect.</p></div>
 </div>
 </div>
 </div>
+<div class="sect1">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="about_environment_variables"></span><h2 data-comment-topic="appendix-d-about-environment-variables-1lebv1u" data-anchor="about_environment_variables">14. Appendix D: About environment variables</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The Phusion Passenger compilation process can be customized with environment variables.</p></div>
+<div class="paragraph"><p>Environment variables are named values that affect how the system works. For example they tell the system where to look for commands (the <span class="monospaced">PATH</span> variable) or where to look for libraries (<span class="monospaced">LD_LIBRARY_PATH</span>). Their names are often in all-uppercase. Sometimes people refer to an environment variable with a dollar sign <span class="monospaced">$</span> in front, but that’s the same thing: when people say "th [...]
+<div class="paragraph"><p>Environment variables are set on a <strong>per-process</strong> basis, but they are <strong>inherited</strong> by child processes. This means that if you set environment variables in process A, another already running process B will not see these new environment variables. But if A spawns a child process C, then C will have all environment variables that A had. If you once again change the environment variables in A, then C will not see the changes.</p></div>
+<div class="paragraph"><p>The per-process nature of environment variables some implications. When you set environment variables in your <span class="monospaced">bashrc</span> or other bash startup files…</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+…only newly spawned bash shells see them.
+</p>
+</li>
+<li>
+<p>
+…the web server usually does not see them, because the web server tends to be started from init scripts, not from bash.
+</p>
+</li>
+<li>
+<p>
+…cron jobs do not see them, because cron jobs' environment variables are entirely dictated by their crontabs.
+</p>
+</li>
+</ul></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">Because this chapter is meant for beginners, it assumes that the reader uses the bash shell. This chapter does not describe instructions for zsh, csh or other shells. We assume that users of other shells are familiar with the Bourne shell syntax, and know how to apply the instructions in this chapter in their shells' native syntaxes.</td>
+</tr></table>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_working_with_environment_variables"></span><h3 data-comment-topic="working-with-environment-variables-85e6aa" data-anchor="_working_with_environment_variables">14.1. Working with environment variables</h3>
+<div class="paragraph"><p>You can see all environment variables in your shell by running the following command:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>env</tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>You can set an evironment variable with the syntax <span class="monospaced">export <NAME>=<VALUE></span>. For example, to set the <span class="monospaced">APXS2</span> variable to the value <span class="monospaced">/usr/sbin/apxs2</span>:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">APXS2</span><span style="color: #990000">=</span>/usr/sbin/apxs<span style="color: #993399">2</span></tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>Any process that you run from your shell from that point on will have said environment variable:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">APXS2</span><span style="color: #990000">=</span>/usr/sbin/apxs<span style="color: #993399">2</span>
+ruby -e <span style="color: #FF0000">'p ENV["APXS2"]'</span>
+<span style="font-style: italic"><span style="color: #9A1900"># => "/usr/sbin/apxs2"</span></span></tt></pre>
+</div>
+</div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">
+<div class="title">The "export" keyword is important</div>
+<div class="paragraph"><p>You <strong>must</strong> set the <span class="monospaced">export</span> keyword. If you omit the <span class="monospaced">export</span> keyword then the environment variable will not be visible to other processes:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">APXS2</span><span style="color: #990000">=</span>/usr/sbin/apxs<span style="color: #993399">2</span>
+ruby -e <span style="color: #FF0000">'p ENV["APXS2"]'</span>
+<span style="font-style: italic"><span style="color: #9A1900"># => nil</span></span></tt></pre>
+</div>
+</div>
+</td>
+</tr></table>
+</div>
+<div class="paragraph"><p>You can reference an environment variable in your shell by typing the <span class="monospaced">$</span> sign followed by the environment variable’s name. For example, to see the value of the <span class="monospaced">PATH</span> variable:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>echo <span style="color: #009900">$PATH</span></tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>You can also use this trick to extend the value of an environment variable:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">PATH</span><span style="color: #990000">=</span>/usr/bin
+
+<span style="font-style: italic"><span style="color: #9A1900"># Prepends '/opt/local/bin', so that it becomes /opt/local/bin:/usr/bin</span></span>
+<span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">PATH</span><span style="color: #990000">=</span>/opt/local/bin<span style="color: #990000">:</span><span style="color: #009900">$PATH</span>
+<span style="font-style: italic"><span style="color: #9A1900"># Appends '/usr/local/bin', so that it becomes /opt/local/bin:/usr/bin:/usr/local/bin</span></span>
+<span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">PATH</span><span style="color: #990000">=</span><span style="color: #009900">$PATH</span><span style="color: #990000">:</span>/usr/local/bin</tt></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_the_path_environment_variable"></span><h3 data-comment-topic="the-path-environment-variable-p8e32r" data-anchor="_the_path_environment_variable">14.2. The PATH environment variable</h3>
+<div class="paragraph"><p>The <span class="monospaced">PATH</span> environment variable dictates where the system looks for command. It is a colon-separated list of directories. If you get a "command not found" error while you know that the command is installed, then setting <span class="monospaced">PATH</span> will help. For example suppose that the command <span class="monospaced">frobnicator</span> is in <span class="monospaced">/opt/local/bin</span>:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>user at localhost bash$ frobnicator
+bash<span style="color: #990000">:</span> frobnicator<span style="color: #990000">:</span> <span style="font-weight: bold"><span style="color: #0000FF">command</span></span> not found</tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>We verify that <span class="monospaced">/opt/local/bin</span> is not in <span class="monospaced">PATH</span>:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>user at localhost bash$ echo <span style="color: #009900">$PATH</span>
+/bin<span style="color: #990000">:</span>/usr/bin<span style="color: #990000">:</span>/usr/local/bin</tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>We can run <span class="monospaced">frobnicator</span> through it’s full path…</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>user at localhost bash$ /opt/local/bin/frobnicator
+<span style="font-style: italic"><span style="color: #9A1900"># => success!</span></span></tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>…or we can add <span class="monospaced">/opt/local/bin</span> to <span class="monospaced">PATH</span>.</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>user at localhost bash$ <span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">PATH</span><span style="color: #990000">=</span><span style="color: #009900">$PATH</span><span style="color: #990000">:</span>/opt/local/bin
+user at localhost bash$ frobnicator
+<span style="font-style: italic"><span style="color: #9A1900"># => success!</span></span></tt></pre>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_adding_phusion_passenger_8217_s_administration_tools_to_path"></span><h4 data-comment-topic="adding-phusion-passenger-s-administration-tools-to-path-xwppud" data-anchor="_adding_phusion_passenger_8217_s_administration_tools_to_path">14.2.1. Adding Phusion Passenger’s administration tools to PATH</h4>
+<div class="paragraph"><p>If you get a "command not found" error when invoking one of the Phusion Passenger administration tools (e.g. <span class="monospaced">passenger-status</span> or <span class="monospaced">passenger-memory-stats</span> then that means the tools are not in <span class="monospaced">PATH</span>, so you need to add them.</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+If you <a href="#rubygems_generic_install">installed Phusion Passenger with RubyGems</a>, then the tools are in your RubyGems executable path. You can view the gem path using the command <span class="monospaced">gem env</span>:
+</p>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ gem env
+RubyGems Environment:
+  - RUBYGEMS VERSION: 1.8.15
+  - RUBY VERSION: 1.8.7 (2011-12-28 patchlevel 357) [i686-darwin10.8.0]
+  - INSTALLATION DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
+  - RUBY EXECUTABLE: /opt/ruby-enterprise-1.8.7-2010.01/bin/ruby
+  - EXECUTABLE DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.01/bin    <--------- !!
+  - RUBYGEMS PLATFORMS:
+    - ruby
+    - x86-darwin-10
+  - GEM PATHS:
+     - /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
+     - /Users/hongli/.gem/ruby/1.8
+  - GEM CONFIGURATION:
+     - :update_sources => true
+     - :verbose => true
+     - :benchmark => false
+     - :backtrace => false
+     - :bulk_threshold => 1000
+     - "gem" => "--no-ri --no-rdoc"
+  - REMOTE SOURCES:
+     - http://rubygems.org/</pre>
+</div>
+</div>
+<div class="paragraph"><p>As you can see, the RubyGems executable path in the example happens to be <span class="monospaced">/opt/ruby-enterprise-1.8.7-2010.01/bin</span>. So that directory must be added to <span class="monospaced">PATH</span>.</p></div>
+</li>
+<li>
+<p>
+If you <a href="#tarball_generic_install">installed Phusion Passenger using the tarball</a>, then the tools are in the <span class="monospaced">bin</span> subdirectory of the Phusion Passenger tarball directory that you extracted. For example, if you extracted <span class="monospaced">passenger-4.9.0.tar.gz</span> inside <span class="monospaced">/opt</span>, then the tools are located in <span class="monospaced">/opt/passenger-4.0.9/bin</span>. In that case, you need to add <span class=" [...]
+</p>
+</li>
+<li>
+<p>
+If you installed Phusion Passenger using native OS packages, then some Phusion Passenger administration tools are in <span class="monospaced">/usr/bin</span>, while others are in <span class="monospaced">/usr/sbin</span>. If you are not logged in as root, then <span class="monospaced">/usr/sbin</span> may not be in <span class="monospaced">PATH</span>, which would explain why you get a "command not found" when trying to invoke some of the tools. You should <span class="monospaced">/usr/s [...]
+</p>
+</li>
+<li>
+<p>
+If you are unsure where your Phusion Passenger directory is then you can use the <span class="monospaced">find</span> command to look them up. Go to the root directory and invoke <span class="monospaced">find</span> with <span class="monospaced">sudo</span>:
+</p>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ cd /
+$ sudo find . -name passenger-status
+/usr/local/passenger/bin/passenger-status</pre>
+</div>
+</div>
+<div class="paragraph"><p>In this example, the administration tools happen to be in <span class="monospaced">/usr/local/passenger/bin</span>, so you must add that to <span class="monospaced">PATH</span>.</p></div>
+</li>
+</ul></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">You may still get a "command not found" when invoking the tools through sudo, even after you’ve added the relevant directory to <span class="monospaced">PATH</span>. Please read <a href="#env_vars_and_sudo">Environment variables and sudo</a> to learn more.</td>
+</tr></table>
+</div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_making_environment_variables_permanent"></span><h3 data-comment-topic="making-environment-variables-permanent-13x0l4h" data-anchor="_making_environment_variables_permanent">14.3. Making environment variables permanent</h3>
+<div class="paragraph"><p>When you exit your shell, the evironment variable changes are lost. There is no standard method to set environment variables system-wide, so you have to set them in different configuration files for different services.</p></div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_bash"></span><h4 data-comment-topic="bash-1pktn63" data-anchor="_bash">14.3.1. bash</h4>
+<div class="paragraph"><p>To make environment variables permanent for future bash sessions <strong>for the current user</strong>, add them to your <span class="monospaced">~/.bashrc</span>:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>echo <span style="color: #FF0000">'export FOO=bar'</span> <span style="color: #990000">>></span> <span style="color: #990000">~/.</span>bashrc
+echo <span style="color: #FF0000">'export PATH=/usr/local/bin:$PATH'</span> <span style="color: #990000">>></span> <span style="color: #990000">~/.</span>bashrc</tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>To make them permanent for future bash sessions <strong>for all users</strong>, add them to <span class="monospaced">/etc/bashrc</span>.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">Depending on the system, the bashrc file may have a different filename. On Debian and Ubuntu, it’s <span class="monospaced">/etc/bash.bashrc</span>.</td>
+</tr></table>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_apache"></span><h4 data-comment-topic="apache-15zqjvi" data-anchor="_apache">14.3.2. Apache</h4>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">This subsection describes how to set environment variables on Apache itself, not on apps served through Phusion Passenger for Apache. The environment variables you set here will be passed to all apps, but you cannot customize them on a per-app basis. See also <a href="#env_vars_passenger_apps">Setting environment variables on Phusion Passenger-served apps</a>.</td>
+</tr></table>
+</div>
+<div class="paragraph"><p>On Debian and Ubuntu, with an Apache installed through apt, Apache environment variables are defined in the file <span class="monospaced">/etc/apache2/envvars</span>. This is a shell script so environment variables must be specified with the shell syntax.</p></div>
+<div class="paragraph"><p>On Red Hat, Fedora, CentOS and ScientificLinux, with an Apache installed through YUM, Apache environment variables are defined in <span class="monospaced">/etc/sysconfig/httpd</span>.</p></div>
+<div class="paragraph"><p>On OS X they are defined in <span class="monospaced">/System/Library/LaunchDaemons/org.apache.httpd.plist</span>, as explained <a href="/System/Library/LaunchDaemons/org.apache.httpd.plist">here on Stack Overflow</a>.</p></div>
+<div class="paragraph"><p>On other systems, or if you did not install Apache through the system’s package manager, the configuration file for environment variables is specific to the vendor that supplied Apache. There may not even be such a configuration file. You should contact the vendor for support.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_nginx"></span><h4 data-comment-topic="nginx-l7ztbb" data-anchor="_nginx">14.3.3. Nginx</h4>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">This subsection describes how to set environment variables on Nginx itself, not on apps served through Phusion Passenger for Nginx. The environment variables you set here will be passed to all apps, but you cannot customize them on a per-app basis. See also <a href="#env_vars_passenger_apps">Setting environment variables on Phusion Passenger-served apps</a>.</td>
+</tr></table>
+</div>
+<div class="paragraph"><p>If you installed Nginx through <a href="#install_on_debian_ubuntu">the Brightbox packages</a>, then you can define environment variables in <span class="monospaced">/etc/default/nginx</span>. This is a shell script so you must use the <span class="monospaced">export FOO=bar</span> syntax.</p></div>
+<div class="paragraph"><p>Otherwise, environment variables are best set through the script which starts Nginx. For example, if you installed Nginx from source and you used
+the Nginx init script described in the <a href="http://www.modrails.com/documentation/Users%20guide%20Nginx.html">Phusion Passenger Users Guide, Nginx version</a>,
+then you should edit that script to define the environment variables. Those init scripts are regular shell scripts, so use the <span class="monospaced">export FOO=bar</span> syntax. Just make sure your set your environment variables before the script starts Nginx.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">Setting environment variables on Nginx has no effect on the <a href="#flying_passenger">Flying Passenger daemon</a> because the daemon is started seperately. You should set the environment variables in the shell right before starting the daemon.</td>
+</tr></table>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_cron"></span><h4 data-comment-topic="cron-1kjp7ck" data-anchor="_cron">14.3.4. cron</h4>
+<div class="paragraph"><p>To make environment variables permanent for cron jobs, add those variables to the relevant crontab. But note that inside crontabs you cannot refer to existing environment variables with the <span class="monospaced">$</span> syntax because crontabs are not shell scripts. You have to specify the entire value.</p></div>
+<div class="listingblock">
+<div class="title">What to put in "crontab -e"</div>
+<div class="content monospaced">
+<pre># Environment variable definitions
+FOO=bar
+APXS2=/usr/sbin/apxs2
+
+# **WRONG!** You cannot refer to existing variables with the `$` syntax!
+PATH=/usr/bin:$PATH
+# **WRONG!** You cannot use the 'export' keyword!
+export PATH=/usr/bin:/usr/local/bin
+# Correct:
+PATH=/usr/bin:/usr/local/bin
+
+# Jobs:
+# m h  dom mon dow   command
+  * *  *   *   *     frobnicator</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="env_vars_passenger_apps"></span><h4 data-comment-topic="phusion-passenger-served-apps-478vyt" data-anchor="env_vars_passenger_apps">14.3.5. Phusion Passenger-served apps</h4>
+<div class="paragraph"><p>You can pass environment variables to Phusion Passenger-served apps through various methods:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+When running Apache, use the <span class="monospaced">PassEnv</span> and <span class="monospaced">SetEnv</span> directives of <a href="http://httpd.apache.org/docs/2.4/mod/mod_env.html">mod_env</a>. This is supported starting from Phusion Passenger 4.0.
+</p>
+</li>
+<li>
+<p>
+When running Nginx, use the <span class="monospaced">env</span> directive. Unlike Apache, Nginx’s <span class="monospaced">env</span> directive can only be set globally and cannot be customized on a per-virtual host basis.
+</p>
+</li>
+<li>
+<p>
+Through your <span class="monospaced">bashrc</span>. Starting from version 4.0, Phusion Passenger 4.0 spawns applications through bash and inherit all bash environment variables. Phusion Passenger Standalone tends to be started from the shell and thus inherits all environment variables set by the shell.
+</p>
+</li>
+<li>
+<p>
+Through Apache and Nginx, as described earlier in this chapter. Any environment variables that you set on Apache and Nginx itself are inherited by Phusion Passenger, and thus by Phusion Passenger-served apps as well.
+</p>
+</li>
+<li>
+<p>
+Through the application itself. Most programming languages provide APIs for setting environment variables. For example in Ruby you can write:
+</p>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>ENV<span style="color: #990000">[</span><span style="color: #FF0000">'FOO'</span><span style="color: #990000">]</span> <span style="color: #990000">=</span> <span style="color: #FF0000">'bar'</span></tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>In Python you can write:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000080">import</span></span> os
+os<span style="color: #990000">.</span>environ<span style="color: #990000">[</span><span style="color: #FF0000">'FOO'</span><span style="color: #990000">]</span> <span style="color: #990000">=</span> <span style="color: #FF0000">'bar'</span></tt></pre>
+</div>
+</div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="env_vars_and_sudo"></span><h3 data-comment-topic="environment-variables-and-sudo-1odzcpz" data-anchor="env_vars_and_sudo">14.4. Environment variables and sudo</h3>
+<div class="paragraph"><p>The <span class="monospaced">sudo</span> command resets all environment variables before running the specified command, for security reasons. So if you set environment variables before running <span class="monospaced">sudo passenger-install-xxx-module</span>, <span class="monospaced">sudo passenger-status</span> or any other commands, then the environment variables are not correctly passed to the command. You can solve this by running sudo with <span class="mono [...]
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>user at localhost bash$ <span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">APXS2</span><span style="color: #990000">=</span>/usr/sbin/apxs<span style="color: #993399">2</span>
+user at localhost bash$ sudo -E passenger-install-apache<span style="color: #993399">2</span>-module</tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>Alternatively, you can obtain a root prompt with sudo first, and <strong>then</strong> set the environment variables, before running any further commands:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>user at localhost bash$ sudo -s
+Password: ...
+root at localhost bash# export APXS2=/usr/sbin/apxs2
+root at localhost bash# passenger-install-apache2-module</pre>
+</div>
+</div>
+</div>
+</div>
+</div>
 </div>
 <div id="footnotes"><hr></div>
 <div id="footer">
-<div id="footer-text">
-Last updated 2012-06-14 09:49:56 CEST
-</div>
+
 </div>
 <script>/*! jQuery v1.7.1 jquery.com | jquery.org/license */
 (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement( [...]
@@ -5571,6 +7653,7 @@ Mizuho.initializeTopBar = $.proxy(function() {
 	var isMobileDevice = this.isMobileDevice();
 	var timerId;
 	
+	// Create the floating table of contents used in the top bar.
 	var $floattoc = $('<div id="floattoc"></div>').html($('#toc').html());
 	$floattoc.find('#toctitle').remove();
 	$floattoc.find('.comments').remove();
@@ -5589,6 +7672,8 @@ Mizuho.initializeTopBar = $.proxy(function() {
 		self.internalLinkClicked(this, event);
 	});
 	
+	// Callback for when the user clicks on the Table of Contents
+	// button on the top bar.
 	function showFloatingToc() {
 		var scrollUpdateTimerId;
 		
@@ -5681,6 +7766,9 @@ Mizuho.initializeTopBar = $.proxy(function() {
 		$window.bind('scroll', onScroll);
 	}
 	
+	// Called whenever the user scrolls. Updates the title of the
+	// Table of Contents button in the top bar to the section that
+	// the user is currently reading.
 	function update() {
 		if ($title.offset().top + $title.height() < $document.scrollTop()) {
 			if (!$topbar.is(':visible')) {
@@ -5724,6 +7812,7 @@ Mizuho.initializeTopBar = $.proxy(function() {
 		}, 100);
 	}
 	
+	
 	if (isMobileDevice) {
 		// Mobile devices don't support position fixed.
 		$topbar.css('position', 'absolute');
@@ -5907,5 +7996,5 @@ Mizuho.topicListReceived = $.proxy(function(result) {
 $(document).ready(Mizuho.initializeCommenting);
 
 </script>
-</body>
+</body>
 </html>
diff --git a/doc/Users guide Apache.idmap.txt b/doc/Users guide Apache.idmap.txt
index 66aab19..564adbc 100644
--- a/doc/Users guide Apache.idmap.txt	
+++ b/doc/Users guide Apache.idmap.txt	
@@ -18,71 +18,59 @@
 
 1.2. Where to get support	=>	where-to-get-support-f3pbrb
 
-10. Appendix A: About this document	=>	appendix-a-about-this-document-103toqs
+2. Installation	=>	installing-upgrading-and-uninstalling-phusion-passenger-laryvs
 
-11. Appendix B: Terminology	=>	appendix-b-terminology-h4eaf4
+2.1. Synopsis	=>	synopsis-l0om5d
 
-11.1. Application root	=>	application-root-otx6xf
+2.2. Generic installation, upgrade and downgrade method: via RubyGems	=>	installing-via-the-gem-39jw1u
 
-12. Appendix C: Spawning methods explained	=>	appendix-c-spawning-methods-explained-owghi9
+2.3. Generic installation, upgrade and downgrade method: via tarball	=>	installing-via-the-source-tarball-1cgxrqc
 
-12.1. The most straightforward and traditional way: conservative spawning	=>	the-most-straightforward-and-traditional-way-conservative-spawning-1ybbli2
+2.4. Installing or upgrading on Debian 6 or Ubuntu	=>	installing-or-upgrading-on-ubuntu-1xg22xs
 
-12.2. The smart spawning method	=>	the-smart-spawning-method-1cvu9dd
+2.5. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux	=>	installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-1y5ie8b
 
-12.2.1. How it works	=>	how-it-works-672zja
+2.6. Upgrading from open source to Enterprise	=>	upgrading-from-open-source-to-enterprise-b17h8g
 
-12.2.2. Summary of benefits	=>	summary-of-benefits-1yrihfb
+2.7. Cryptographic verification of installation files	=>	cryptographic-verification-of-installation-files-ed3r9v
 
-12.3. Smart spawning gotcha #1: unintentional file descriptor sharing	=>	smart-spawning-gotcha-1-unintentional-file-descriptor-sharing-z1y55l
+2.7.1. Synopsis	=>	synopsis-uwnz2o
 
-12.3.1. Example 1: Memcached connection sharing (harmful)	=>	example-1-memcached-connection-sharing-harmful--c71wqw
+2.7.2. Importing the Phusion Software Signing key	=>	importing-the-phusion-software-signing-key-1x0rhv
 
-12.3.2. Example 2: Log file sharing (not harmful)	=>	example-2-log-file-sharing-not-harmful--1p2yuol
+2.7.3. Verifying the Phusion Software Signing key	=>	verifying-the-phusion-software-signing-key-10430lg
 
-12.4. Smart spawning gotcha #2: the need to revive threads	=>	smart-spawning-gotcha-2-the-need-to-revive-threads-1k6cj7d
+2.7.4. Verifying the gem and tarball	=>	verifying-the-gem-and-tarball-1nf0uov
 
-12.5. Smart spawning gotcha #3: code load order	=>	smart-spawning-gotcha-3-code-load-order-nkotiy
+2.7.5. Verifying Git signatures	=>	verifying-git-signatures-oaafwd
 
-2. Installing, upgrading and uninstalling Phusion Passenger	=>	installing-upgrading-and-uninstalling-phusion-passenger-laryvs
+2.7.6. Verifying DEB and RPM packages	=>	verifying-deb-and-rpm-packages-vgtv04
 
-2.1. Generic installation instructions	=>	generic-installation-instructions-17jo43j
+2.7.7. Revocation	=>	revocation-4o01n2
 
-2.1.1. Overview of installation methods	=>	overview-of-installation-methods-12vnjyb
+2.8. Non-interactive, automatic, headless installs or upgrades	=>	non-interactive-automatic-headless-installs-or-upgrades-1arnxii
 
-2.1.2. Preparation (gem and source tarball only)	=>	preparation-gem-and-source-tarball-only--1sxhbgg
+2.9. Customizing the compilation process	=>	customizing-the-compilation-process-1sds3od
 
-2.1.3. Installing via the gem	=>	installing-via-the-gem-39jw1u
+2.9.1. Setting the compiler	=>	setting-the-compiler-1symq7h
 
-2.1.4. Installing via the source tarball	=>	installing-via-the-source-tarball-1cgxrqc
+2.9.2. Adding additional compiler or linker flags	=>	adding-additional-compiler-or-linker-flags-wzu0ey
 
-2.1.5. Installing via a native Linux package	=>	installing-via-a-native-linux-package-i1tmhg
+2.9.3. Forcing location of command line tools and dependencies	=>	forcing-location-of-certain-command-line-tools-1hym30u
 
-2.1.6. What does the installer do?	=>	what-does-the-installer-do--3a7z1w
+2.10. Working with the Apache configuration file	=>	locating-the-apache-configuration-file-1fterqv
 
-2.2. Operating system-specific instructions and information	=>	operating-system-specific-instructions-and-information-1dfz365
+2.11. Disabling without uninstalling	=>	unloading-disabling-phusion-passenger-from-apache-without-uninstalling-it-s1axnx
 
-2.2.1. MacOS X	=>	macos-x-1lcpbz2
+2.12. Uninstalling	=>	uninstalling-phusion-passenger-1qb4ssq
 
-2.2.2. Ubuntu Linux	=>	ubuntu-linux-1xwc66
-
-2.2.3. OpenSolaris	=>	opensolaris-1e0dynj
-
-2.3. Upgrading or downgrading Phusion Passenger	=>	upgrading-or-downgrading-phusion-passenger-1dl8km6
-
-2.3.1. Via a gem or a source tarball	=>	via-a-gem-or-a-source-tarball-1vgkwhs
-
-2.3.2. Via a native Linux package	=>	via-a-native-linux-package-8dvooa
-
-2.4. Unloading (disabling) Phusion Passenger from Apache without uninstalling it	=>	unloading-disabling-phusion-passenger-from-apache-without-uninstalling-it-s1axnx
-
-2.5. Uninstalling Phusion Passenger	=>	uninstalling-phusion-passenger-1qb4ssq
+2.13. Moving to a different directory	=>	moving-to-a-different-directory-1n0gkwh
 
 3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3.x) application	=>	deploying-a-ruby-on-rails-1-x-or-2-x-but-not-rails-3-x-application-9r92hi
 
-3.1. Deploying to a virtual host’s root	=>	deploying-to-a-virtual-host-s-root-zzo4v7
+3.1. Deploying to a virtual host’s root	=>	deploying-to-a-virtual-host-s-root-ab4zj6
 
-3.2. Deploying to a sub URI	=>	deploying-to-a-sub-uri-zekba6
+3.2. Deploying to a sub URI	=>	deploying-to-a-sub-uri-13rfygg
 
 3.3. Redeploying (restarting the Ruby on Rails application)	=>	redeploying-restarting-the-ruby-on-rails-application--m5zqc6
 
@@ -94,9 +82,9 @@
 
 4.1. Tutorial/example: writing and deploying a Hello World Rack application	=>	tutorial-example-writing-and-deploying-a-hello-world-rack-application-axp5z5
 
-4.2. Deploying to a virtual host’s root	=>	deploying-to-a-virtual-host-s-root-ab4zj6
+4.2. Deploying to a virtual host’s root	=>	deploying-to-a-virtual-host-s-root-u9bfax
 
-4.3. Deploying to a sub URI	=>	deploying-to-a-sub-uri-13rfygg
+4.3. Deploying to a sub URI	=>	deploying-to-a-sub-uri-zekba6
 
 4.4. Redeploying (restarting the Rack application)	=>	redeploying-restarting-the-rack-application--18m41m1
 
@@ -114,185 +102,287 @@
 
 4.5.6. Sinatra	=>	sinatra-1hubto4
 
-5. Configuring Phusion Passenger	=>	configuring-phusion-passenger-11oztoe
+5. Deploying a WSGI (Python) application	=>	deploying-a-wsgi-python-application-7aygdl
+
+5.1. Tutorial/example: writing and deploying a Hello World WSGI application	=>	tutorial-example-writing-and-deploying-a-hello-world-wsgi-application-9ziqy8
+
+5.2. Deploying to a virtual host’s root	=>	deploying-to-a-virtual-host-s-root-zzo4v7
+
+5.3. Redeploying (restarting the WSGI application)	=>	redeploying-restarting-the-wsgi-application--na7pmf
+
+6. Configuring Phusion Passenger	=>	configuring-phusion-passenger-11oztoe
+
+6.1. PassengerRoot <directory>	=>	passengerroot-directory--sere8l
+
+6.2. PassengerDefaultRuby <filename>	=>	passengerdefaultruby-and-passengerruby-7zblp8
+
+6.3. PassengerRuby <filename>	=>	passengerruby-filename--1r3fv73
+
+6.4. PassengerPython <filename>	=>	passengerpython-filename--1ssesv3
+
+6.5. PassengerAppRoot <path/to/root>	=>	passengerapproot-path-to-root--uf24yd
+
+6.6. PassengerSpawnMethod <string>	=>	passengerspawnmethod-string--sodg2y
+
+6.7. PassengerEnabled <on|off>	=>	passengerenabled-on-off--74rzth
+
+6.8. PassengerTempDir <directory>	=>	passengertempdir-directory--68h2ng
+
+6.9. PassengerUploadBufferDir <directory>	=>	passengeruploadbufferdir-directory--kdr8at
+
+6.10. PassengerRestartDir <directory>	=>	passengerrestartdir-directory--1fmhmv0
+
+6.11. PassengerBufferResponse <on|off>	=>	passengerbufferresponse-on-off--1y7ilka
+
+6.12. PassengerRollingRestarts <on|off>	=>	passengerrollingrestarts
+
+6.13. PassengerResistDeploymentErrors <on|off>	=>	passengerresistdeploymenterrors
+
+6.14. Security options	=>	security-options-1pb75ho
+
+6.14.1. PassengerUserSwitching <on|off>	=>	passengeruserswitching
+
+6.14.2. PassengerUser <username>	=>	passengeruser
+
+6.14.3. PassengerGroup <group name>	=>	passengergroup
+
+6.14.4. PassengerDefaultUser <username>	=>	passengerdefaultuser
+
+6.14.5. PassengerDefaultGroup <group name>	=>	passengerdefaultgroup
+
+6.14.6. PassengerFriendlyErrorPages <on|off>	=>	passengerfriendlyerrorpages
+
+6.15. Resource control and optimization options	=>	resource-control-and-optimization-options-zu2f7u
+
+6.15.1. PassengerMaxPoolSize <integer>	=>	passengermaxpoolsize-integer--am64q8
+
+6.15.2. PassengerMinInstances <integer>	=>	passengermininstances-integer--wegq6b
+
+6.15.3. PassengerMaxInstances <integer>	=>	passengermaxinstances
+
+6.15.4. PassengerMaxInstancesPerApp <integer>	=>	passengermaxinstancesperapp
+
+6.15.5. PassengerPoolIdleTime <integer>	=>	passengerpoolidletime-integer--a3gunq
+
+6.15.6. PassengerMaxPreloaderIdleTime <integer>	=>	railsappspawneridletime-integer--1awgog1
+
+6.15.7. PassengerConcurrencyModel <process|thread>	=>	passengerconcurrencymodel-process-thread--1eipofj
+
+6.15.8. PassengerThreadCount <number>	=>	passengerthreadcount-number--10jl64a
+
+6.15.9. PassengerMaxRequests <integer>	=>	passengermaxrequests-integer--17qkw9n
+
+6.15.10. PassengerMaxRequestTime <seconds>	=>	passengermaxrequesttime-seconds--127v1i2
+
+6.15.11. PassengerMemoryLimit <integer>	=>	passengermemorylimit-integer--18irza1
+
+6.15.12. PassengerStatThrottleRate <integer>	=>	passengerstatthrottlerate-integer--1dcfda3
+
+6.15.13. PassengerPreStart <url>	=>	passengerprestart-url--1utb57k
+
+6.15.14. PassengerHighPerformance <on|off>	=>	passengerhighperformance-on-off--nvfa86
+
+6.16. Compatibility options	=>	compatibility-options-8jve5a
+
+6.16.1. PassengerResolveSymlinksInDocumentRoot <on|off>	=>	passengerresolvesymlinksindocumentroot-on-off--1r0qcp8
+
+6.16.2. PassengerAllowEncodedSlashes <on|off>	=>	passengerallowencodedslashes-on-off--1y3s1ww
+
+6.17. Logging and debugging options	=>	logging-and-debugging-options-el2cuc
+
+6.17.1. PassengerLogLevel <integer>	=>	passengerloglevel-integer--s3kbil
+
+6.17.2. PassengerDebugLogFile <filename>	=>	passengerdebuglogfile-filename--1wjm2j1
+
+6.17.3. PassengerDebugger <on|off>	=>	passengerdebugger-on-off--19you7e
+
+6.18. Classic Ruby on Rails (⇐ 2.x)-specific options	=>	ruby-on-rails-specific-options-1t10wfu
+
+6.18.1. RailsBaseURI <uri>	=>	railsbaseuri-uri--1txrw3k
+
+6.18.2. RailsEnv <string>	=>	railsenv-string--1b0xxvu
+
+6.19. Rack and Rails >= 3 specific options	=>	rack-specific-options-wk9qzt
+
+6.19.1. RackBaseURI <uri>	=>	rackbaseuri-uri--1to24pj
 
-5.1. PassengerRoot <directory>	=>	passengerroot-directory--sere8l
+6.19.2. RackEnv <string>	=>	rackenv-string--vve9py
 
-5.10. PassengerBufferResponse <on|off>	=>	passengerbufferresponse-on-off--1y7ilka
+6.20. Deprecated or removed options	=>	deprecated-options-pm9m57
 
-5.11. Security options	=>	security-options-1pb75ho
+6.20.1. RailsRuby	=>	railsruby-ht09ei
 
-5.11.1. PassengerUserSwitching <on|off>	=>	passengeruserswitching-on-off--100dc63
+6.20.2. RailsUserSwitching	=>	railsuserswitching-1npx8y4
 
-5.11.2. PassengerUser <username>	=>	passengeruser-username--iw6865
+6.20.3. RailsDefaultUser	=>	railsdefaultuser-19j7n3m
 
-5.11.3. PassengerGroup <group name>	=>	passengergroup-group-name--1ciwtix
+6.20.4. RailsAllowModRewrite	=>	railsallowmodrewrite-1vkziro
 
-5.11.4. PassengerDefaultUser <username>	=>	passengerdefaultuser-username--nbjs8w
+6.20.5. RailsSpawnMethod	=>	railsspawnmethod-1aljgpa
 
-5.11.5. PassengerDefaultGroup <group name>	=>	passengerdefaultgroup-group-name--1xwd1xj
+6.20.6. RailsAutoDetect, RackAutoDetect and WsgiAutoDetect	=>	railsautodetect-rackautodetect-and-wsgiautodetect-1qgakzs
 
-5.11.6. PassengerFriendlyErrorPages <on|off>	=>	passengerfriendlyerrorpages-on-off--rdq45f
+6.20.7. RailsAppSpawnerIdleTime	=>	railsappspawneridletime-heh41r
 
-5.12. Resource control and optimization options	=>	resource-control-and-optimization-options-zu2f7u
+6.20.8. RailsFrameworkSpawnerIdleTime	=>	railsframeworkspawneridletime-adcf9k
 
-5.12.1. PassengerMaxPoolSize <integer>	=>	passengermaxpoolsize-integer--am64q8
+7. Troubleshooting	=>	troubleshooting-2ihihi
 
-5.12.2. PassengerMinInstances <integer>	=>	passengermininstances-integer--wegq6b
+7.1. Operating system-specific problems	=>	operating-system-specific-problems-327gbk
 
-5.12.3. PassengerMaxInstancesPerApp <integer>	=>	passengermaxinstancesperapp-integer--1pteawn
+7.1.1. MacOS X: The installer cannot locate MAMP’s Apache	=>	macos-x-the-installer-cannot-locate-mamp-s-apache-or908n
 
-5.12.4. PassengerPoolIdleTime <integer>	=>	passengerpoolidletime-integer--a3gunq
+7.2. Problems during installation	=>	problems-during-installation-q1vlsu
 
-5.12.5. PassengerMaxRequests <integer>	=>	passengermaxrequests-integer--ietgd0
+7.2.1. Ruby development headers aren’t installed	=>	ruby-development-headers-aren-t-installed-1yqrom8
 
-5.12.6. PassengerStatThrottleRate <integer>	=>	passengerstatthrottlerate-integer--13zx4xo
+7.2.2. Apache development headers aren’t installed	=>	apache-development-headers-aren-t-installed-x2473y
 
-5.12.7. PassengerPreStart <url>	=>	passengerprestart-url--1v76tcz
+7.2.3. APR development headers aren’t installed	=>	apr-development-headers-aren-t-installed-13bk976
 
-5.12.8. PassengerHighPerformance <on|off>	=>	passengerhighperformance-on-off--36mw1l
+7.2.4. Phusion Passenger is using the wrong Apache during installation	=>	phusion-passenger-is-using-the-wrong-apache-during-installation-82qnt4
 
-5.13. Compatibility options	=>	compatibility-options-8jve5a
+7.2.5. Phusion Passenger is using the wrong Ruby during installation	=>	phusion-passenger-is-using-the-wrong-ruby-during-installation-1nh3zml
 
-5.13.1. PassengerResolveSymlinksInDocumentRoot <on|off>	=>	passengerresolvesymlinksindocumentroot-on-off--vblz7e
+7.3. Problems after installation	=>	problems-after-installation-fwd23q
 
-5.13.2. PassengerAllowEncodedSlashes <on|off>	=>	passengerallowencodedslashes-on-off--1ud9a92
+7.3.1. My Rails application works on Mongrel, but not on Phusion Passenger	=>	my-rails-application-works-on-mongrel-but-not-on-phusion-passenger-1f28drx
 
-5.14. Logging and debugging options	=>	logging-and-debugging-options-el2cuc
+7.3.2. Phusion Passenger has been compiled against the wrong Apache installation	=>	phusion-passenger-has-been-compiled-against-the-wrong-apache-installation-n74ce0
 
-5.14.1. PassengerLogLevel <integer>	=>	passengerloglevel-integer--1lt2yhq
+7.3.3. I get a "403 Forbidden" error	=>	i-get-a-403-forbidden-error-m0rlay
 
-5.14.2. PassengerDebugLogFile <filename>	=>	passengerdebuglogfile-filename--pgj55c
+7.3.4. Static assets such as images and stylesheets aren’t being displayed	=>	static-assets-such-as-images-and-stylesheets-aren-t-being-displayed-uaptpi
 
-5.15. Ruby on Rails-specific options	=>	ruby-on-rails-specific-options-1t10wfu
+7.3.5. The Apache error log says that the spawn manager script does not exist, or that it does not have permission to execute it	=>	the-apache-error-log-says-that-the-spawn-manager-script-does-not-exist-or-that-it-does-not-have-permission-to-execute-it-1fmoozk
 
-5.15.1. RailsAutoDetect <on|off>	=>	railsautodetect-on-off--tpigsd
+7.3.6. The Rails application reports that it’s unable to start because of a permission error	=>	the-rails-application-reports-that-it-s-unable-to-start-because-of-a-permission-error-v53i6s
 
-5.15.2. RailsBaseURI <uri>	=>	railsbaseuri-uri--1txrw3k
+7.3.7. My Rails application’s log file is not being written to	=>	my-rails-application-s-log-file-is-not-being-written-to-3i747l
 
-5.15.3. RailsEnv <string>	=>	railsenv-string--1b0xxvu
+7.3.8. I’ve deployed my app on SSL, but the app thinks its not on SSL	=>	i-ve-deployed-my-app-on-ssl-but-the-app-thinks-its-not-on-ssl-10rvgnr
 
-5.15.4. RailsFrameworkSpawnerIdleTime <integer>	=>	railsframeworkspawneridletime-integer--1ai8dgq
+7.4. Conflicting Apache modules	=>	conflicting-apache-modules-1uwpixk
 
-5.15.5. RailsAppSpawnerIdleTime <integer>	=>	railsappspawneridletime-integer--1awgog1
+7.4.1. mod_userdir	=>	mod-userdir-x5e2te
 
-5.16. Rack-specific options	=>	rack-specific-options-wk9qzt
+7.4.2. MultiViews (mod_negotiation)	=>	multiviews-mod-negotiation--zchfg0
 
-5.16.1. RackAutoDetect <on|off>	=>	rackautodetect-on-off--vl1lxy
+7.4.3. VirtualDocumentRoot	=>	virtualdocumentroot-14cwd7l
 
-5.16.2. RackBaseURI <uri>	=>	rackbaseuri-uri--1to24pj
+8. Analysis and system maintenance	=>	analysis-and-system-maintenance-qvkwzr
 
-5.16.3. RackEnv <string>	=>	rackenv-string--vve9py
+8.1. Inspecting memory usage	=>	inspecting-memory-usage-1bkis6i
 
-5.17. Deprecated options	=>	deprecated-options-pm9m57
+8.2. Inspecting Phusion Passenger’s internal status	=>	inspecting-phusion-passenger-s-internal-status-ukekf7
 
-5.17.1. RailsRuby	=>	railsruby-ht09ei
+8.3. Debugging frozen applications	=>	debugging-frozen-applications-1qsjqq7
 
-5.17.2. RailsUserSwitching	=>	railsuserswitching-1npx8y4
+8.4. Accessing individual application processes	=>	accessing-individual-application-processes-1p0j4jb
 
-5.17.3. RailsDefaultUser	=>	railsdefaultuser-19j7n3m
+8.5. Attaching an IRB console to an application process	=>	attaching-an-irb-console-to-an-application-process-1cma32j
 
-5.17.4. RailsAllowModRewrite	=>	railsallowmodrewrite-1vkziro
+9. Tips	=>	tips-19cwwf7
 
-5.17.5. RailsSpawnMethod	=>	railsspawnmethod-1aljgpa
+9.1. User Switching (security feature)	=>	user-switching-security--8njx1x
 
-5.2. PassengerRuby <filename>	=>	passengerruby-filename--1r3fv73
+9.1.1. Requirements	=>	requirements-yxvtxo
 
-5.3. PassengerAppRoot <path/to/root>	=>	passengerapproot-path-to-root--uf24yd
+9.1.2. Effects	=>	effects-1lko7vo
 
-5.4. PassengerSpawnMethod <string>	=>	passengerspawnmethod-string--sodg2y
+9.1.3. Caveats & troubleshooting	=>	caveats-troubleshooting-161hgge
 
-5.5. PassengerUseGlobalQueue <on|off>	=>	passengeruseglobalqueue-on-off--1ki369
+9.1.4. Finding out what user an application is running as	=>	finding-out-what-user-an-application-is-running-as-7uwrol
 
-5.6. PassengerEnabled <on|off>	=>	passengerenabled-on-off--74rzth
+9.2. Copy-on-write memory support (reducing memory consumption of Ruby applications)	=>	reducing-memory-consumption-of-ruby-on-rails-applications-by-33--1ubxnq0
 
-5.7. PassengerTempDir <directory>	=>	passengertempdir-directory--68h2ng
+9.3. Capistrano recipe	=>	capistrano-recipe-syzgo7
 
-5.8. PassengerUploadBufferDir <directory>	=>	passengeruploadbufferdir-directory--kdr8at
+9.4. Bundler support	=>	bundler-support-cf72ih
 
-5.9. PassengerRestartDir <directory>	=>	passengerrestartdir-directory--1fmhmv0
+9.4.1. Does Phusion Passenger itself need to be added to the Gemfile?	=>	does-phusion-passenger-itself-need-to-be-added-to-the-gemfile--17whimp
 
-6. Troubleshooting	=>	troubleshooting-2ihihi
+9.5. Installing multiple Ruby on Rails versions	=>	installing-multiple-ruby-on-rails-versions-mi5j14
 
-6.1. Operating system-specific problems	=>	operating-system-specific-problems-327gbk
+9.6. Making the application restart after each request	=>	making-the-application-restart-after-each-request-183bezx
 
-6.1.1. MacOS X: The installer cannot locate MAMP’s Apache	=>	macos-x-the-installer-cannot-locate-mamp-s-apache-or908n
+9.7. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments	=>	how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-a63b6r
 
-6.2. Problems during installation	=>	problems-during-installation-q1vlsu
+9.8. Out-of-Band Garbage Work and Out-of-Band Garbage Collection	=>	out-of-band-garbage-work-and-out-of-band-garbage-collection-kav2p8
 
-6.2.1. Ruby development headers aren’t installed	=>	ruby-development-headers-aren-t-installed-1yqrom8
+9.9. Flying Passenger	=>	flying-passenger-q916f7
 
-6.2.2. Apache development headers aren’t installed	=>	apache-development-headers-aren-t-installed-x2473y
+9.9.1. Requirements	=>	requirements-1ntkin3
 
-6.2.3. APR development headers aren’t installed	=>	apr-development-headers-aren-t-installed-13bk976
+9.9.2. Basic usage	=>	basic-usage-joifsk
 
-6.2.4. Phusion Passenger is using the wrong Apache during installation	=>	phusion-passenger-is-using-the-wrong-apache-during-installation-82qnt4
+9.9.3. Configuring Flying Passenger	=>	configuring-flying-passenger-1v35vgg
 
-6.2.5. Phusion Passenger is using the wrong Ruby during installation	=>	phusion-passenger-is-using-the-wrong-ruby-during-installation-1nh3zml
+9.9.4. Managing the Flying Passenger daemon	=>	managing-the-flying-passenger-daemon-1bng2bu
 
-6.3. Problems after installation	=>	problems-after-installation-fwd23q
+9.9.5. Caveats and limitations	=>	caveats-and-limitations-lz3rbb
 
-6.3.1. My Rails application works on Mongrel, but not on Phusion Passenger	=>	my-rails-application-works-on-mongrel-but-not-on-phusion-passenger-1f28drx
+9.10. X-Sendfile support	=>	x-sendfile-support-1cgyykw
 
-6.3.2. Phusion Passenger has been compiled against the wrong Apache installation	=>	phusion-passenger-has-been-compiled-against-the-wrong-apache-installation-n74ce0
+9.11. Upload progress	=>	upload-progress-71cyl7
 
-6.3.3. I get a "403 Forbidden" error	=>	i-get-a-403-forbidden-error-m0rlay
+10. Under the hood	=>	under-the-hood-21ue5t
 
-6.3.4. Static assets such as images and stylesheets aren’t being displayed	=>	static-assets-such-as-images-and-stylesheets-aren-t-being-displayed-uaptpi
+10.1. Static assets serving	=>	static-assets-serving-wo2d9v
 
-6.3.5. The Apache error log says that the spawn manager script does not exist, or that it does not have permission to execute it	=>	the-apache-error-log-says-that-the-spawn-manager-script-does-not-exist-or-that-it-does-not-have-permission-to-execute-it-1fmoozk
+10.2. Page caching support	=>	page-caching-support-kwq9b9
 
-6.3.6. The Rails application reports that it’s unable to start because of a permission error	=>	the-rails-application-reports-that-it-s-unable-to-start-because-of-a-permission-error-v53i6s
+10.3. How Phusion Passenger detects whether a virtual host is a web application	=>	how-phusion-passenger-detects-whether-a-virtual-host-is-a-web-application-179mp8m
 
-6.3.7. My Rails application’s log file is not being written to	=>	my-rails-application-s-log-file-is-not-being-written-to-3i747l
+11. Appendix A: About this document	=>	appendix-a-about-this-document-103toqs
 
-6.3.8. I’ve deployed my app on SSL, but the app thinks its not on SSL	=>	i-ve-deployed-my-app-on-ssl-but-the-app-thinks-its-not-on-ssl-10rvgnr
+12. Appendix B: Terminology	=>	appendix-b-terminology-h4eaf4
 
-6.4. Conflicting Apache modules	=>	conflicting-apache-modules-1uwpixk
+12.1. Application root	=>	application-root-otx6xf
 
-6.4.1. mod_userdir	=>	mod-userdir-x5e2te
+12.2. Idle process	=>	idle-process-potb6g
 
-6.4.2. MultiViews (mod_negotiation)	=>	multiviews-mod-negotiation--zchfg0
+12.3. Inactive process	=>	inactive-process-16gjv2e
 
-6.4.3. VirtualDocumentRoot	=>	virtualdocumentroot-14cwd7l
+13. Appendix C: Spawning methods explained	=>	appendix-c-spawning-methods-explained-owghi9
 
-7. Analysis and system maintenance	=>	analysis-and-system-maintenance-qvkwzr
+13.1. The most straightforward and traditional way: direct spawning	=>	the-most-straightforward-and-traditional-way-conservative-spawning-1ybbli2
 
-7.1. Inspecting memory usage	=>	inspecting-memory-usage-1bkis6i
+13.2. The smart spawning method	=>	the-smart-spawning-method-1cvu9dd
 
-7.2. Inspecting Phusion Passenger’s internal status	=>	inspecting-phusion-passenger-s-internal-status-ukekf7
+13.2.1. How it works	=>	how-it-works-672zja
 
-7.3. Debugging frozen applications	=>	debugging-frozen-applications-1qsjqq7
+13.2.2. Summary of benefits	=>	summary-of-benefits-1yrihfb
 
-7.4. Accessing individual application processes	=>	accessing-individual-application-processes-1p0j4jb
+13.3. Smart spawning gotcha #1: unintentional file descriptor sharing	=>	smart-spawning-gotcha-1-unintentional-file-descriptor-sharing-z1y55l
 
-8. Tips	=>	tips-19cwwf7
+13.3.1. Example 1: Memcached connection sharing (harmful)	=>	example-1-memcached-connection-sharing-harmful--c71wqw
 
-8.1. User switching (security)	=>	user-switching-security--8njx1x
+13.3.2. Example 2: Log file sharing (not harmful)	=>	example-2-log-file-sharing-not-harmful--1p2yuol
 
-8.10. Upload progress	=>	upload-progress-71cyl7
+13.4. Smart spawning gotcha #2: the need to revive threads	=>	smart-spawning-gotcha-2-the-need-to-revive-threads-1k6cj7d
 
-8.2. Reducing memory consumption of Ruby on Rails applications by 33%	=>	reducing-memory-consumption-of-ruby-on-rails-applications-by-33--1ubxnq0
+13.5. Smart spawning gotcha #3: code load order	=>	smart-spawning-gotcha-3-code-load-order-nkotiy
 
-8.3. Capistrano recipe	=>	capistrano-recipe-syzgo7
+14. Appendix D: About environment variables	=>	appendix-d-about-environment-variables-1lebv1u
 
-8.4. Bundler support	=>	bundler-support-cf72ih
+14.1. Working with environment variables	=>	working-with-environment-variables-85e6aa
 
-8.5. Moving Phusion Passenger to a different directory	=>	moving-phusion-passenger-to-a-different-directory-16fapwo
+14.2. The PATH environment variable	=>	the-path-environment-variable-p8e32r
 
-8.6. Installing multiple Ruby on Rails versions	=>	installing-multiple-ruby-on-rails-versions-mi5j14
+14.2.1. Adding Phusion Passenger’s administration tools to PATH	=>	adding-phusion-passenger-s-administration-tools-to-path-xwppud
 
-8.7. Making the application restart after each request	=>	making-the-application-restart-after-each-request-183bezx
+14.3. Making environment variables permanent	=>	making-environment-variables-permanent-13x0l4h
 
-8.8. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments	=>	how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-a63b6r
+14.3.1. bash	=>	bash-1pktn63
 
-8.9. X-Sendfile support	=>	x-sendfile-support-1cgyykw
+14.3.2. Apache	=>	apache-15zqjvi
 
-9. Under the hood	=>	under-the-hood-21ue5t
+14.3.3. Nginx	=>	nginx-l7ztbb
 
-9.1. Static assets serving	=>	static-assets-serving-wo2d9v
+14.3.4. cron	=>	cron-1kjp7ck
 
-9.2. Page caching support	=>	page-caching-support-kwq9b9
+14.3.5. Phusion Passenger-served apps	=>	phusion-passenger-served-apps-478vyt
 
-9.3. How Phusion Passenger detects whether a virtual host is a web application	=>	how-phusion-passenger-detects-whether-a-virtual-host-is-a-web-application-179mp8m
+14.4. Environment variables and sudo	=>	environment-variables-and-sudo-1odzcpz
 
diff --git a/doc/Users guide Apache.txt b/doc/Users guide Apache.txt
index 3b02f43..549e18e 100644
--- a/doc/Users guide Apache.txt	
+++ b/doc/Users guide Apache.txt	
@@ -1,340 +1,30 @@
-Phusion Passenger users guide
-=============================
+Phusion Passenger users guide, Apache version
+=============================================
 
 image:images/phusion_banner.png[link="http://www.phusion.nl/"]
 
-Phusion Passenger is an Apache module, which makes deploying Ruby and Ruby on
-Rails applications on Apache a breeze. It follows the usual Ruby on Rails
-conventions, such as "Don't-Repeat-Yourself" and ease of setup, while at the
-same time providing enough flexibility.
+Phusion Passenger is an application server which can directly integrate into Apache. It is designed to be easy to use, fast, stable and reliable and is used by link:http://trends.builtwith.com/Web-Server/Phusion-Passenger[hundreds of thousands of websites] all over the world.
+
+Phusion Passenger is a so-called polyglot application server because it supports applications written in multiple programming languages. At this time, Ruby and Python are supported.
 
 This users guide will teach you:
 
 - How to install Phusion Passenger.
 - How to configure Phusion Passenger.
-- How to deploy a Ruby on Rails application.
-- How to deploy a link:http://rack.rubyforge.org/[Rack]-based Ruby application.
+- How to deploy Ruby and Python applications.
 - How to solve common problems.
 
 This guide assumes that the reader is somewhat familiar with Apache and with
-using the commandline.
-
-
-== Support information ==
-
-=== Supported operating systems ===
-
-Phusion Passenger works on any POSIX-compliant operating system. In other
-words: practically any operating system on earth, except Microsoft Windows.
-
-Phusion Passenger is confirmed on a large number of operating systems and Linux
-distributions, including, but not limited to, Ubuntu, Debian, CentOS/Fedora/RHEL,
-Gentoo, Mac OS X, FreeBSD and Solaris. Both 32-bit and 64-bit platforms are supported.
-
-The only POSIX-compliant operating system on which Phusion Passenger for Apache is
-known not to work at this time, is OpenBSD. Please use Phusion Passenger for Nginx
-instead.
-
-Please
-link:http://code.google.com/p/phusion-passenger/issues/list[report a bug]
-or
-link:http://groups.google.com/group/phusion-passenger[join our discussion forum]
-if it doesn't work on your POSIX-compliant operating system.
-
-=== Where to get support ===
-
-* link:http://code.google.com/p/phusion-passenger/issues/list[Issue tracker] - report
-  bugs here.
-* link:http://groups.google.com/group/phusion-passenger[Discussion forum] - post a
-  message here if you're experiencing problems.
-
-
-== Installing, upgrading and uninstalling Phusion Passenger ==
-
-=== Generic installation instructions ===
-
-[[install_passenger]]
-==== Overview of installation methods ====
-
-There are three ways to install Phusion Passenger:
-
-1. By installing the Phusion Passenger gem, as instructed on the
-   link:http://www.modrails.com/install.html[``Install'' page on the Phusion
-   Passenger website].
-2. By downloading the source tarball from the Phusion Passenger website
-   ('passenger-x.x.x.tar.gz').
-3. By installing a native Linux package (e.g. Debian package).
-
-The following sections will explain each installation method. Please read the
-section for the installation method that you prefer. In our opinion, installing
-the gem or the native package is easiest. For these two installation methods,
-Phusion Passenger provides an easy-to-use installer.
-
-==== Preparation (gem and source tarball only)
-If you want to install Phusion Passenger via the gem or the source tarball,
-then some preparations might be required. You can skip this subsection if
-you're installing Phusion Passenger via a native Linux package, because no
-compilation is necessary.
-
-===== Switching to a root command prompt =====
-
-Before installing, you will probably need to switch to the `root` user first.
-When you install Phusion Passenger via a gem or a source tarball, some Phusion
-Passenger files have to be compiled, which requires write access to the
-directory in which the Phusion Passenger files are located. On Unix systems,
-the root user is the user who has write access to the entire system. So unless
-you know that your normal user account has write access to the Phusion Passenger
-directory, you should switch to root before installing Phusion Passenger.
-
-You can switch to root by typing the following command:
-
--------------------------
-sudo -s
--------------------------
-
-This will open a command prompt as the root user, from which you can proceed
-with installing Phusion Passenger.
-
-If your system does not have 'sudo' installed, please type the following command instead, which should do the same thing:
-
--------------------------
-su
--------------------------
-
-[[specifying_correct_apache_install]]
-===== Specifying the correct Apache installation =====
-
-The Phusion Passenger installer will attempt to automatically detect Apache,
-and compile Phusion Passenger against that Apache version. It does this by
-looking for the `apxs` or `apxs2` command in the PATH environment variable.
-Apxs is an integral part of any Apache installation.
-
-However, some systems have multiple Apache installations. This is likely
-the case on MacOS X: the OS ships with Apache, but users tend to install
-another Apache version seperately, e.g. via MacPorts. If your system has
-multiple Apache installations, then you will need to tell the Phusion Passenger
-installer which one to use. It is very important that you specify the
-correct Apache installation, because if you load Phusion Passenger in an
-Apache installation that it wasn't compiled against, then it will likely
-crash.
-
-On yet other systems, Apache is installed in a non-standard location,
-preventing the Phusion Passenger installer from detecting Apache. This
-is most likely the case on systems on which Apache was installed by hand
-from source, i.e. as opposed to installed through the system's native
-package manager. If this is the case, then you will also have to tell
-the installer where it can find Apache.
-
-To do so, set the `APXS2` environment variable to the full path of the
-correct `apxs` or `apxs2` command. Suppose that you want to use the Apache
-installation in '/opt/apache2'. Then, assuming that the corresponding
-`apxs` program's path is '/opt/apache2/bin/apxs', type:
-
-----------------------------------
-export APXS2=/opt/apache2/bin/apxs
-----------------------------------
-
-NOTE: On some systems, the `apxs` program might be called `apxs2`, and it might
-be located in the `sbin` folder instead of the `bin` folder.
-
-.Environment variables and 'sudo'
-NOTE: By default, the 'sudo' command will erase any environment variables that it
-doesn't recognize, prior to executing the given command. So if you set APXS2 as a
-normal user, then run `sudo passenger-install-apache2-module` (which is the command
-for the Phusion Passenger installer), then the installer will not receive the
-environment variable value that you set. To solve this problem, please become root
-prior to setting any environment variables, as described in the previous subsection.
-
-[[specifying_ruby_installation]]
-===== Specifying the correct Ruby installation =====
-
-If your system has multiple Ruby installations -- which is likely the case on
-MacOS X, or if you've also installed
-link:http://www.rubyenterpriseedition.com[Ruby Enterprise Edition] -- then you
-will need to tell the operating system which Ruby installation to use, prior to
-running the Phusion Passenger installer. If you only have one Ruby installation
-(the case on most Linux systems), then you can skip this section because Phusion
-Passenger will automatically detect it.
-
-To specify a Ruby installation, prepend your Ruby installation's `bin`
-directory to the `PATH` environment variable. For example, if you have the
-following Ruby installations:
-
-- /usr/bin/ruby
-- /opt/myruby/bin/ruby
-
-and you want to use the latter, then type:
-
-----------------------------------
-export PATH=/opt/myruby/bin:$PATH
-----------------------------------
-
-
-==== Installing via the gem ====
-
-Please install the gem and then run the Phusion Passenger installer, by typing the
-following commands:
-------------------------------------------------------
-gem install passenger-x.x.x.gem
-passenger-install-apache2-module
-------------------------------------------------------
-Please follow the instructions given by the installer.
-
-
-==== Installing via the source tarball ====
-
-Extract the tarball to whatever location you prefer. *The Phusion Passenger files
-are to reside in that location permanently.* For example, if you would like
-Phusion Passenger to reside in `/opt/passenger-x.x.x`:
-------------------------------------------------------
-cd /opt
-tar xzvf ~/YourDownloadsFolder/passenger-x.x.x.tar.gz
-------------------------------------------------------
-
-Next, run the included installer:
-------------------------------------------------------
-/opt/passenger-x.x.x/bin/passenger-install-apache2-module
-------------------------------------------------------
-Please follow the instructions given by the installer.
-
-IMPORTANT: Please do not remove the 'passenger-x.x.x' folder after
-installation. Furthermore, the 'passenger-x.x.x' folder must be accessible by Apache.
-
-
-==== Installing via a native Linux package ====
-
-John Leach from Brightbox has kindly provided a Ubuntu packages for Phusion Passenger. The package is available from the link:http://wiki.brightbox.co.uk/docs:phusion-passenger[Brightbox repository].
-
-==== What does the installer do? ====
-
-Although we call it an ``installer'', it doesn't actually install anything.
-The installer checks whether all required dependencies are installed,
-compiles Phusion Passenger for you, and tells you how to modify the Apache
-configuration file, but it doesn't copy any files around.
+using the command line.
 
-`passenger-install-apache2-module` is actually just a user-friendly frontend
-around the command `rake apache2`, which performs the actual compilation of
-Phusion Passenger.
 
+== Support information
 
-=== Operating system-specific instructions and information ===
+include::users_guide_snippets/support_information.txt[]
 
-==== MacOS X ====
+== Installation
 
-Ben Ruebenstein has written an excellent
-link:http://benr75.com/articles/2008/04/12/setup-mod_rails-phusion-mac-os-x-leopard[tutorial
-on installing Phusion Passenger on OS X].
-
-==== Ubuntu Linux ====
-
-Ben Hughes has written an link:http://www.railsgarden.com/2008/04/12/configurating-passenger-mod_rails-on-slicehost-with-ubuntu-710/[article on installing Phusion Passenger on Ubuntu].
-
-==== OpenSolaris ====
-
-J Aaron Farr has written a link:http://cubiclemuses.com/cm/articles/2009/04/09/rails-passenger-open-solaris-ec2/[guide]
-about setting up Ruby on Rails and Phusion Passenger on OpenSolaris and EC2.
-
-
-=== Upgrading or downgrading Phusion Passenger ===
-
-==== Via a gem or a source tarball ====
-
-To upgrade or downgrade Phusion Passenger via the gem or the source tarball, install the newer
-or older version as you normally would; that is, install the gem or unpack the tarball, and
-run `passenger-install-apache2-module`. Eventually `passenger-install-apache2-module` will tell
-you to copy & paste some settings into the Apache configuration file; something that looks along
-the lines of:
-
------------------------------------
-LoadModule passenger_module ...
-PassengerRoot ...
-PassengerRuby ...
------------------------------------
-
-Because you already had Phusion Passenger installed, you already had similar settings
-in your Apache configuration file, just with different values. *Replace* the old settings with
-the new ones that the installer outputs. It is important that the old settings are removed,
-otherwise Phusion Passenger may malfunction.
-
-When you're done, restart Apache.
-
-==== Via a native Linux package
-
-There are no special instructions required to upgrade or downgrade Phusion Passenger
-via a native Linux package.
-
-=== Unloading (disabling) Phusion Passenger from Apache without uninstalling it ===
-
-You can temporarily unload (disable) Phusion Passenger from Apache, without
-uninstalling the Phusion Passenger files, so that Apache behaves as if Phusion
-Passenger was never installed in the first place. This might be useful to you if,
-for example, you seem to be experiencing a problem caused by Phusion Passenger,
-but you want to make sure whether that's actually the case, without having
-to through the hassle of uninstalling Phusion Passenger completely. When disabled,
-Phusion Passenger will not occupy any memory or CPU or otherwise interfere with
-Apache.
-
-To unload Phusion Passenger from Apache, edit your Apache configuration file(s)
-and comment out:
-
-- all Phusion Passenger configuration directives.
-- the 'LoadModule passenger_module' directive.
-
-For example, if your configuration file looks like this...
-
------------------------------------
-Listen *:80
-NameVirtualHosts *:80
-....
-
-LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so
-
-PassengerRuby /usr/bin/ruby
-PassengerRoot /somewhere/passenger/x.x.x
-PassengerMaxPoolSize 10
-
-<VirtualHost *:80>
-    ServerName www.foo.com
-    DocumentRoot /webapps/foo/public
-    RailsBaseURI /rails
-</VirtualHost>
------------------------------------
-
-...then comment out the relevant directives, so that it looks like this:
-
------------------------------------
-Listen *:80
-NameVirtualHosts *:80
-....
-
-# LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so
-
-# PassengerRuby /usr/bin/ruby
-# PassengerRoot /somewhere/passenger/x.x.x
-# PassengerMaxPoolSize 10
-
-<VirtualHost *:80>
-    ServerName www.foo.com
-    DocumentRoot /webapps/foo/public
-    # RailsBaseURI /rails
-</VirtualHost>
------------------------------------
-
-After you've done this, save the file and restart Apache.
-
-=== Uninstalling Phusion Passenger ===
-
-To uninstall Phusion Passenger, please first remove all Phusion Passenger
-configuration directives from your Apache configuration file(s). After you've
-done this, you need to remove the Phusion Passenger files.
-
-- If you installed Phusion Passenger via a gem, then type `gem uninstall passenger`.
-  You might have to run this as root.
-- If you installed Phusion Passenger via a source tarball, then remove the directory
-  in which you placed the extracted Phusion Passenger files. This directory is the
-  same as the one pointed to the by 'PassengerRoot' configuration directive.
-- If you installed Phusion Passenger via a Debian package, then remove type
-  `sudo apt-get remove libapache2-mod-passenger`.
+include::users_guide_snippets/installation.txt[]
 
 
 == Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3.x) application ==
@@ -671,6 +361,114 @@ touch /webapps/rackapp/tmp/restart.txt
 include::users_guide_snippets/rackup_specifications.txt[]
 
 
+== Deploying a WSGI (Python) application
+
+Phusion Passenger supports all WSGI-compliant Python web applications. Suppose that you have a WSGI application in '/webapps/wsgiapp'. Then that folder must contain at least three entries:
+
+- 'passenger_wsgi.py', which Phusion Passenger will use as the main entry point for your application. This file must export a WSGI object called `application`.
+- 'public/', a folder containing public static web assets, like images and stylesheets.
+- 'tmp/', used for 'restart.txt' (our application restart mechanism). This will be explained in a following subsection.
+
+So '/webapps/wsgiapp' must, at minimum, look like this:
+----------------------
+/webapps/wsgiapp
+  |
+  +-- config.ru
+  |
+  +-- public/
+  |
+  +-- tmp/
+----------------------
+
+=== Tutorial/example: writing and deploying a Hello World WSGI application ===
+
+First we create a Phusion Passenger-compliant WSGI directory structure:
+
+-------------------------------------------
+$ mkdir /webapps/wsgi_example
+$ mkdir /webapps/wsgi_example/public
+$ mkdir /webapps/wsgi_example/tmp
+-------------------------------------------
+
+Next, we write a minimal "hello world" WSGI application:
+
+-------------------------------------------
+$ cd /webapps/wsgi_example
+$ some_awesome_editor passenger_wsgi.py
+...type in some source code...
+$ cat passenger_wsgi.py
+def application(environ, start_response):
+  start_response('200 OK', [('Content-Type', 'text/plain')])
+  return [b"hello world!\n"]
+-------------------------------------------
+
+Finally, we deploy it by adding the following configuration options to
+the Apache configuration file:
+
+-------------------------------------------
+<VirtualHost *:80>
+    ServerName www.wsgiexample.com
+    DocumentRoot /webapps/wsgi_example/public
+    <Directory /webapps/wsgi_example/public>
+        Allow from all
+        Options -MultiViews
+    </Directory>
+</VirtualHost>
+-------------------------------------------
+
+And we're done! After an Apache restart, the above WSGI application will be available
+under the URL 'http://www.wsgiexample.com/'.
+
+=== Deploying to a virtual host's root ===
+
+Add a virtual host entry to your Apache configuration file. Make sure that the
+following conditions are met:
+
+- The virtual host's document root must point to your WSGI application's
+  'public' folder.
+- The WSGI per-directory permissions must allow access to this folder.
+- MultiViews must be disabled for this folder.
+
+For example:
+-------------------------------------------
+<VirtualHost *:80>
+    ServerName www.wsgiapp.com
+    DocumentRoot /webapps/wsgiapp/public
+    <Directory /webapps/wsgiapp/public>
+        Allow from all
+        Options -MultiViews
+    </Directory>
+</VirtualHost>
+-------------------------------------------
+
+You may also need to tweak your file/folder permissions. Make sure that the
+following folders are readable and executable by Apache:
+
+ * this 'public' folder.
+ * the application's 'config' folder.
+ * all parent folders. That is, /webapps/wsgiapp and /webapps must also be readable and executable by Apache.
+
+Then restart Apache. The application has now been deployed.
+
+=== Redeploying (restarting the WSGI application) ===
+
+Deploying a new version of a WSGI application is as simple as
+re-uploading the application files, and restarting the application.
+
+There are two ways to restart the application:
+
+1. By restarting Apache.
+2. By creating or modifying the file 'tmp/restart.txt' in the WSGI
+   application's <<application_root,root folder>>. Phusion Passenger will
+   automatically restart the application.
+
+For example, to restart our example application, we type this in the
+command line:
+-------------------------------------------
+touch /webapps/wsgiapp/tmp/restart.txt
+-------------------------------------------
+
+
 == Configuring Phusion Passenger ==
 
 After installation, Phusion Passenger does not need any further configurations.
@@ -689,12 +487,75 @@ this option as well. Please read
 
 This required option may only occur once, in the global server configuration.
 
+[[PassengerDefaultRuby]]
+=== PassengerDefaultRuby <filename> ===
+:version: 4.0.0
+include::users_guide_snippets/since_version.txt[]
+
+This option specifies the default Ruby interpreter to use for web apps as well as for all sorts of internal Phusion Passenger helper scripts, e.g. the one used by <<PassengerPreStart,PassengerPreStart>>. Please see <<PassengerRuby,PassengerRuby>> for more information, as well as how it relates to <<PassengerRuby,PassengerRuby>>.
+
+This option may occur in the global server configuration. The default value is 'ruby', meaning that the Ruby interpreter will be looked up according to the `PATH` environment variable.
+
 [[PassengerRuby]]
 === PassengerRuby <filename> ===
-This option allows one to specify the Ruby interpreter to use.
+The `PassengerDefaultRuby` and `PassengerRuby` directives specify the Ruby interpreter to use. Similarly, the `PassengerPython` directive is for specifying the Python interpreter.
 
-This option may only occur once, in the global server configuration.
-The default is 'ruby'.
+The relationship between `PassengerDefaultRuby` and `PassengerRuby` is as follows:
+
+ * `PassengerDefaultRuby` may only occur in the global server configuration.
+ * `PassengerRuby` may occur everywhere: in the global server configuration, in `<VirtualHost>`, in `<Directory>`, in `<Location>`, and in '.htaccess' if `AllowOverride Options` is on.
+ * You don't *have* to specify `PassengerRuby`. In this case `PassengerDefaultRuby` is used as the Ruby interpreter. But if you do specify `PassengerRuby` then it will override `PassengerDefaultRuby` in that context. This allows you to use `PassengerRuby` to specify a different Ruby interpreter on a per-application basis.
+
+Phusion Passenger not only uses Ruby to run web apps, but also for running certain helper tools that are written in Ruby, e.g. the internal helper script used by <<PassengerPreStart,PassengerPreStart>>. These tools are always run using `PassengerDefaultRuby`, never by `PassengerRuby`. `PassengerRuby` is only used for running web apps.
+
+The reason why `PassengerDefaultRuby` exists at all is because limitations in the Apache API prevents us from implementing the same behavior using only the `PassengerRuby` directive.
+
+There is no `PassengerDefaultPython` because there are no Phusion Passenger tools written in Python. As such, having `PassengerPython` is enough.
+
+The following example illustrates how it works and how you can use these options to specify different Ruby/Python interpreters for different web apps.
+
+------------------------------
+# Use Ruby 1.8.7 by default.
+PassengerDefaultRuby /usr/bin/ruby1.8
+# Use Python 2.6 by default.
+PassengerPython /usr/bin/python2.6
+
+<VirtualHost *:80>
+    # This Rails web app will use Ruby 1.8.7
+    ServerName www.foo.com
+    DocumentRoot /webapps/foo/public
+</VirtualHost>
+
+<VirtualHost *:80>
+    # This Rails web app will use Ruby 1.9.3, as installed by RVM
+    PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3/ruby
+    ServerName www.bar.com
+    DocumentRoot /webapps/bar/public
+
+    # If you have a web app deployed in a sub-URI, customize
+    # PassengerRuby/PassengerPython inside a <Location> block.
+    # The web app under www.bar.com/blog will use JRuby 1.7.1
+    RackBaseURI /blog
+    <Location /blog>
+        PassengerRuby /usr/local/rvm/wrappers/jruby-1.7.1/ruby
+    </Location>
+</VirtualHost>
+
+<VirtualHost *:80>
+    # This Flask web app will use Python 3.0
+    PassengerPython /usr/bin/python3.0
+    ServerName www.baz.com
+    DocumentRoot /webapps/baz/public
+</VirtualHost>
+------------------------------
+
+include::users_guide_snippets/rvm_helper_tool.txt[]
+
+=== PassengerPython <filename> ===
+:version: 4.0.0
+include::users_guide_snippets/since_version.txt[]
+
+This option allows one to specify the Python interpreter to use. See <<PassengerRuby,PassengerRuby>> for more information. The default value is 'python', meaning that the Python interpreter will be looked up according to the `PATH` environment variable.
 
 [[PassengerAppRoot]]
 === PassengerAppRoot <path/to/root> ===
@@ -749,22 +610,7 @@ This option may occur in the following places:
 
 In each place, it may be specified at most once. The default value is 'smart-lv2'.
 
-[[PassengerUseGlobalQueue]]
-=== PassengerUseGlobalQueue <on|off> ===
-Turns the use of global queuing on or off.
-
-This option may occur in the following places:
-
- * In the global server configuration.
- * In a virtual host configuration block.
-
-In each place, it may be specified at most once. The default value is 'on'.
-
-'This feature is sponsored by http://www.37signals.com/[37signals].'
-
-include::users_guide_snippets/global_queueing_explained.txt[]
-
-
+[[PassengerEnabled]]
 === PassengerEnabled <on|off> ===
 You can set this option to 'off' to completely disable Phusion Passenger for
 a certain location. This is useful if, for example, you want to integrate a PHP
@@ -917,18 +763,31 @@ directory that's readable by Apache, but only writable by administrators.
 
 [[PassengerBufferResponse]]
 === PassengerBufferResponse <on|off> ===
-When turned on, application-generated responses are buffered in memory. By buffering
-responses, protection is provided against slow HTTP clients that can not read your
-response immediately.
-
-For example, consider an HTTP client that's on a dial-up modem link, and your
-application instance generates a 2 MB response. If response buffering is turned
-off then your application instance will be blocked until the entire 2 MB has been
-sent out to the HTTP client. This disallows your application instance to do any useful
-work in the mean time. By enabling response buffering, Phusion Passenger will read
-the application response as quickly as possible and will take care of slow clients.
-
-However, keep in mind that enabling this option will make streaming responses
+When turned on, application-generated responses are buffered by Apache. Buffering will
+happen in memory.
+
+Before we proceed with explaining this configuration option, we want to state the following to avoid confusion. If you use Phusion Passenger for Apache, there are in fact two response buffering systems active:
+
+1. The Apache response buffering system. `PassengerBufferResponse` turns this on or off.
+2. The Phusion Passenger response buffering system, a.k.a. 'real-time disk-backed response buffering'. This buffering system is always on, regardless of the value of `PassengerBufferResponse`.
+
+Response buffering is useful because it protects against slow HTTP clients that do not read responses immediately or quickly enough. Buffering prevents such slow clients from blocking web applications that have limited concurrency. Because Phusion Passenger's response buffering is always turned on, you are always protected. Therefore, `PassengerBufferResponse` is off by default, and you never should have to turn it on.
+
+If for whatever reason you want to turn Apache-level response buffering on, you can do so with this option.
+
+Apache's response buffering works differently from Phusion Passenger's. Apache's buffering system buffers the entire response before attempting to send it to the client, while Phusion Passenger's attempts to send the data to the client immediately. Therefore, if you turn on `PassengerBufferResponse`, you may interfere with applications that want to stream responses to the client.
+Apache's version also buffers to memory only, making it problematic for large responses. Phusion Passenger's version buffers to disk when the response exceeds a certain threshold.
+
+How does response buffering - whether it's done by Apache or by Phusion Passenger - exactly protect against slow clients?
+Consider an HTTP client that's on a dial-up modem link, and your
+application process generates a 2 MB response. If the response is buffered
+then your application process will be blocked until the entire 2 MB has been
+sent out to the HTTP client. This disallows your application process to do any useful
+work in the mean time. By buffering responses, Phusion Passenger or Apache will read
+the application response as quickly as possible and will take care of forwarding the data
+to slow clients.
+
+So keep in mind that enabling `passenger_buffering_response` will make streaming responses
 impossible. Consider for example this piece of Rails code:
 
 --------------------------------
@@ -958,11 +817,11 @@ app = lambda do |env|
 end
 --------------------------------
 
-When response buffering is turned on, Phusion Passenger will wait until
+When `PassengerBufferResponse` is turned on, Apache will wait until
 the application is done sending the entire response before forwarding it
 to the client. The client will not receive anything for 10 seconds,
 after which it receives the entire response at once.
-When response buffering is turned off, it works as expected: the client
+When `PassengerBufferResponse` is turned off, it works as expected: the client
 receives an "entry X" message every second for 10 seconds.
 
 This option may occur in the following places:
@@ -972,7 +831,7 @@ This option may occur in the following places:
  * In a `<Directory>` or `<Location>` block.
  * In '.htaccess'.
 
-In each place, it may be specified at most once. The default value is 'on'.
+In each place, it may be specified at most once. The default value is 'off'.
 
 [NOTE]
 =====================================================
@@ -980,6 +839,74 @@ The <<PassengerBufferResponse,PassengerBufferResponse>> directive should be turn
 if responses can be huge. Because entire responses are buffered in memory when turned on.
 =====================================================
 
+[[PassengerRollingRestarts]]
+=== PassengerRollingRestarts <on|off> ===
+:version: 3.0.0
+include::users_guide_snippets/enterprise_only.txt[]
+
+Enables or disables support for rolling restarts. Normally when you
+restart an application (by touching restart.txt), Phusion Passenger would
+shut down all application processes and spawn a new one. The spawning
+of a new application process could take a while, and any requests that
+come in during this time will be blocked until this first application
+process has spawned.
+
+But when rolling restarts are enabled, Phusion Passenger Enterprise will:
+
+1. Spawn a new process in the background.
+2. When it's done spawning, Phusion Passenger Enterprise will replace one of the old processes with this newly spawned one.
+3. Step 1 and 2 are repeated until all processes have been replaced.
+
+This way, visitors will not experience any delays when you are restarting your application. This allows you to, for example, upgrade your application often without degrading user experience.
+
+Rolling restarts have a few caveat however that you should be aware of:
+
+- Upgrading an application sometimes involves upgrading the database schema.
+  With rolling restarts, there may be a point in time during which processes
+  belonging to the previous version and processes belonging to the new version
+  both exist at the same time. Any database schema upgrades you perform must
+  therefore be backwards-compatible with the old application version.
+- Because there's no telling which process will serve a request, users may
+  not see changes brought about by the new version until all processes have
+  been restarted. It is for this reason that you should not use rolling
+  restarts in development, only in production.
+
+This option may occur in the following places:
+
+ * In the global server configuration.
+ * In a virtual host configuration block.
+ * In a `<Directory>` or `<Location>` block.
+ * In '.htaccess', if `AllowOverride Options` is on.
+
+In each place, it may be specified at most once. The default value is 'off'.
+
+=== PassengerResistDeploymentErrors <on|off> ===
+:version: 3.0.0
+include::users_guide_snippets/enterprise_only.txt[]
+
+Enables or disables resistance against deployment errors.
+
+Suppose you've upgraded your application and you've issues a command to restart it (by touching restart.txt), but the application code contains an error that prevents Phusion Passenger from successfully spawning a process (e.g. a syntax error). Phusion Passenger would normally display an error message in response to this.
+
+By enabling deployment error resistance, Phusion Passenger Enterprise would instead do this:
+
+- It passes the request to one of the existing application processes (that belong to the previous version of the application). The visitor will not see a Phusion Passenger process spawning error message.
+- It logs the error to the global web server error log file.
+- It sets an internal flag so that no processes for this application will be spawned (even when the current traffic would normally result in more processes being spawned) and no processes will be idle cleaned. Processes *could* still be shutdown because of other events, e.g. because their <<PassengerMemoryLimit,memory limit>> have been reached.
+
+This way, visitors will suffer minimally from deployment errors. Phusion Passenger will attempt to restart the application again next time restart.txt is touched.
+
+Enabling deployment error resistance only works if <<PassengerRollingRestarts,rolling restart>> is also enabled.
+
+This option may occur in the following places:
+
+ * In the global server configuration.
+ * In a virtual host configuration block.
+ * In a `<Directory>` or `<Location>` block.
+ * In '.htaccess', if `AllowOverride Options` is on.
+
+In each place, it may be specified at most once. The default value is 'off'.
+
 === Security options ===
 
 [[PassengerUserSwitching]]
@@ -989,6 +916,7 @@ Whether to enable <<user_switching,user switching support>>.
 This option may only occur once, in the global server configuration.
 The default value is 'on'.
 
+[[PassengerUser]]
 ==== PassengerUser <username> ====
 If <<user_switching,user switching support>> is enabled, then Phusion Passenger will
 by default run the web application as the owner of the file 'config/environment.rb'
@@ -1004,6 +932,7 @@ This option may occur in the following places:
 
 In each place, it may be specified at most once.
 
+[[PassengerGroup]]
 ==== PassengerGroup <group name> ====
 If <<user_switching,user switching support>> is enabled, then Phusion Passenger will
 by default run the web application as the primary group of the owner of the file
@@ -1041,6 +970,7 @@ This option may only occur once, in the global server configuration.
 The default value is the primary group of the user specifified by
 <<PassengerDefaultUser,PassengerDefaultUser>>.
 
+[[PassengerFriendlyErrorPages]]
 ==== PassengerFriendlyErrorPages <on|off> ====
 Phusion Passenger can display friendly error pages whenever an application fails
 to start. This friendly error page presents the startup error message, some
@@ -1063,44 +993,32 @@ In each place, it may be specified at most once. The default value is 'on'.
 === Resource control and optimization options ===
 
 ==== PassengerMaxPoolSize <integer> ====
-The maximum number of Ruby on Rails or Rack application instances that may
-be simultaneously active. A larger number results in higher memory usage,
-but improved ability to handle concurrent HTTP clients.
-
-The optimal value depends on your system's hardware and the server's average
-load. You should experiment with different values. But generally speaking,
-the value should be at least equal to the number of CPUs (or CPU cores) that
-you have. If your system has 2 GB of RAM, then we recommend a value of '30'.
-If your system is a Virtual Private Server (VPS) and has about 256 MB RAM, and
-is also running other services such as MySQL, then we recommend a value of '2'.
-
-If you find that your server is unable to handle the load on your Rails/Rack websites
-(i.e. running out of memory) then you should lower this value. (Though if your
-sites are really that popular, then you should strongly consider upgrading your
-hardware or getting more servers.)
+The maximum number of <<application_process,application processes>> that may
+simultaneously exist. A larger number results in higher memory usage,
+but improves the ability to handle concurrent HTTP requests.
+
+The optimal value depends on your system's hardware and your workload. You can learn more at the Phusion article link:http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/[Tuning Phusion Passenger's concurrency settings].
+
+If you find that your server is running out of memory then you should lower this value.
 
 This option may only occur once, in the global server configuration.
 The default value is '6'.
 
-TIP: We strongly recommend you to <<reducing_memory_usage,use Ruby Enterprise
-Edition>>. This allows you to reduce the memory usage of your Ruby on Rails applications
-by about 33%. And it's not hard to install.
-
 [[PassengerMinInstances]]
 ==== PassengerMinInstances <integer> ====
-This specifies the minimum number of application instances that must be kept around
-whenever Phusion Passenger cleans up idle instances. You should set this option to a
+This specifies the minimum number of application processes that should exist for a
+given application. You should set this option to a
 non-zero value if you want to avoid potentially long startup times after a website
-has been idle for an extended period.
+has been <<idle_process,idle>> for an extended period.
 
-Please note that this option does *not* pre-start application instances during Apache
+Please note that this option does *not* pre-start application processes during Apache
 startup. It just makes sure that when the application is first accessed:
 
-1. at least the given number of instances will be spawned.
-2. the given number of processes will be kept around even when instances are being
+1. at least the given number of processes will be spawned.
+2. the given number of processes will be kept around even when processes are being
    idle cleaned (see <<PassengerPoolIdleTime,PassengerPoolIdleTime>>).
 
-If you want to pre-start application instances during Apache startup, then you should use the <<PassengerPreStart,PassengerPreStart>> directive, possibly in combination with
+If you want to pre-start application processes during Apache startup, then you should use the <<PassengerPreStart,PassengerPreStart>> directive, possibly in combination with
 'PassengerMinInstances'. This behavior might seem counter-intuitive at first sight,
 but <<PassengerPreStart,PassengerPreStart>> explains the rationale behind it.
 
@@ -1117,16 +1035,16 @@ PassengerPoolIdleTime 10
 </VirtualHost>
 ---------------------------------
 
-When you start Apache, there are 0 application instances for 'foobar.com'. Things will
+When you start Apache, there are 0 application processes for 'foobar.com'. Things will
 stay that way until someone visits 'foobar.com'. Suppose that there is only 1 visitor.
-1 application instance will be started immediately to serve the visitor, while 2 will
+1 application process will be started immediately to serve the visitor, while 2 will
 be spawned in the background. After 10 seconds, when the idle timeout has
-been reached, these 3 application instances will not be cleaned up.
+been reached, these 3 application processes will not be cleaned up.
 
 Now suppose that there's a sudden spike of traffic, and 100 users visit 'foobar.com'
-simultanously. Phusion Passenger will start 12 more application instances. After the idle
+simultanously. Phusion Passenger will start 12 more application processes. After the idle
 timeout of 10 seconds have passed, Phusion Passenger will clean up 12 application
-instances, keeping 3 instances around.
+processes, keeping 3 processes around.
 
 The PassengerMinInstances option may occur in the following places:
 
@@ -1137,23 +1055,88 @@ The PassengerMinInstances option may occur in the following places:
 
 In each place, it may be specified at most once. The default value is '1'.
 
+==== PassengerMaxInstances <integer> ====
+:version: 3.0.0
+include::users_guide_snippets/enterprise_only.txt[]
+
+The maximum number of application processes that may simultaneously exist
+for an application. This helps to make sure that a single application
+will not occupy all available slots in the application pool.
+
+This value must be less than <<PassengerMaxPoolSize,PassengerMaxPoolSize>>. A value of 0
+means that there is no limit placed on the number of processes a single application
+may spawn, i.e. only the global limit of <<PassengerMaxPoolSize,PassengerMaxPoolSize>>
+will be enforced.
+
+This option may occur in the following places:
+
+ * In the global server configuration.
+ * In a virtual host configuration block.
+
+In each place, it may be specified at most once. The default value is '0'.
+
+.Practical usage example
+[TIP]
+===========================================================================
+Suppose that you're hosting two web applications on your server, a personal
+blog and an e-commerce website. You've set <<PassengerMaxPoolSize,PassengerMaxPoolSize>>
+to 10. The e-commerce website is more important to you. You can then set
+'PassengerMaxInstances' to 3 for your blog, so that it will never spawn more
+than 3 processes, even if it suddenly gets a lot of traffic. Your e-commerce website
+on the other hand will be free to spawn up to 10 processes if it gets a lot of traffic.
+===========================================================================
+
 ==== PassengerMaxInstancesPerApp <integer> ====
-The maximum number of application instances that may be simultaneously active
+The maximum number of application processes that may simultaneously exist
 for a single application. This helps to make sure that a single application
 will not occupy all available slots in the application pool.
 
 This value must be less than <<PassengerMaxPoolSize,PassengerMaxPoolSize>>. A value of 0
-means that there is no limit placed on the number of instances a single application
+means that there is no limit placed on the number of processes a single application
 may use, i.e. only the global limit of <<PassengerMaxPoolSize,PassengerMaxPoolSize>>
 will be enforced.
 
 This option may only occur once, in the global server configuration.
 The default value is '0'.
 
+.Practical usage example
+[TIP]
+===========================================================================
+Suppose that you're hosting two blogs (blog A and B) on your server, and that
+you've set <<PassengerMaxPoolSize,PassengerMaxPoolSize>> to 10. Under normal
+circumstances, if blog A suddenly gets a lot of traffic, then A will use all 10
+pool slots. If blog B suddenly gets some traffic, then it will only be able to
+use 1 pool slot (forcefully releasing 1 slot from A) until A's traffic has
+settled down and it has released more pool slots.
+
+If you consider both blogs equally important, then you can set
+'PassengerMaxInstancesPerApp' to 5. This way, both blogs will never use more
+than 5 pool slots.
+===========================================================================
+
+.Relation with PassengerMaxInstances
+[NOTE]
+===========================================================================
+Unlike <<PassengerMaxInstances,PassengerMaxInstances>>, this configuration
+option is global and applies to all applications. 'PassengerMaxInstances' on the
+other hand is per-virtual host.
+
+Suppose that you're hosting two web applications on your server, a personal
+blog and an e-commerce website. You've set <<PassengerMaxPoolSize,PassengerMaxPoolSize>>
+to 10. The e-commerce website is more important to you. You can then set
+'PassengerMaxInstances' to 3 for your blog, so that it will never use more than
+3 pool slots, even if it suddenly gets a lot of traffic. Your e-commerce website
+on the other hand will be free to use up all 10 slots if it gets a lot of traffic.
+
+In summary, 'PassengerMaxInstancesPerApp' divides the pool equally among the
+different web applications, while 'PassengerMaxInstances' allows one to divide
+the pool unequally, according to each web application's relative importance.
+===========================================================================
+
 [[PassengerPoolIdleTime]]
 ==== PassengerPoolIdleTime <integer> ====
-The maximum number of seconds that an application instance may be idle. That is,
-if an application instance hasn't received any traffic after the given number of
+The maximum number of seconds that an application process may be idle. That is,
+if an application process hasn't received any traffic after the given number of
 seconds, then it will be shutdown in order to conserve memory.
 
 Decreasing this value means that applications will have to be spawned
@@ -1166,22 +1149,82 @@ Rails/Rack web page. We recommend a value of `2 * x`, where `x` is the average
 number of seconds that a visitor spends on a single Rails/Rack web page. But your
 mileage may vary.
 
-When this value is set to '0', application instances will not be shutdown unless 
-it's really necessary, i.e. when Phusion Passenger is out of worker processes
-for a given application and one of the inactive application instances needs to
-make place for another application instance. Setting the value to 0 is
+When this value is set to '0', application processes will not be shutdown unless 
+it's really necessary, i.e. when Phusion Passenger is out of application processes
+for a given application and one of the <<inactive_process,inactive application processes>> needs to
+make place for another application process. Setting the value to 0 is
 recommended if you're on a non-shared host that's only running a few
 applications, each which must be available at all times.
 
 This option may only occur once, in the global server configuration.
 The default value is '300'.
 
+[[PassengerMaxPreloaderIdleTime]]
+==== PassengerMaxPreloaderIdleTime <integer> ====
+The ApplicationSpawner server (explained in <<spawning_methods_explained,Spawning
+methods explained>>) has an idle timeout, just like the backend processes spawned by
+Phusion Passenger do. That is, it will automatically shutdown if it hasn't done
+anything for a given period.
+
+This option allows you to set the ApplicationSpawner server's idle timeout, in
+seconds. A value of '0' means that it should never idle timeout.
+
+Setting a higher value will mean that the ApplicationSpawner server is kept around
+longer, which may slightly increase memory usage. But as long as the
+ApplicationSpawner server is running, the time to spawn a Ruby on Rails backend
+process only takes about 10% of the time that is normally needed, assuming that
+you're using the 'smart' or 'smart-lv2' <<PassengerSpawnMethod,spawning method>>. So if your
+system has enough memory, is it recommended that you set this option to a high
+value or to '0'.
+
+This option may occur in the following places:
+
+ * In the global server configuration.
+ * In a virtual host configuration block.
+
+In each place, it may be specified at most once. The default value is '300' (5 minutes).
+
+[[PassengerConcurrencyModel]]
+==== PassengerConcurrencyModel <process|thread> ====
+:version: 4.0.0
+include::users_guide_snippets/enterprise_only.txt[]
+
+Specifies the I/O concurrency model that should be used for application processes. Phusion Passenger supports two concurrency models:
+
+ * 'process' - single-threaded, multi-processed I/O concurrency. Each application process only has a single thread and can only handle 1 request at a time. This is the concurrency model that Ruby applications traditionally used. It has excellent compatiblity (can work with applications that are not designed to be thread-safe) but is unsuitable workloads in which the application has to wait for a lot of external I/O (e.g. HTTP API calls), and uses more memory because each process has a la [...]
+ * 'thread' - multi-threaded, multi-processed I/O concurrency. Each application process has multiple threads (customizable via <<PassengerThreadCount,PassengerThreadCount>>). This model provides much better I/O concurrency and uses less memory because threads share memory with each other within the same process. However, using this model may cause compatibility problems if the application is not designed to be thread-safe.
+
+This option may occur in the following places:
+
+ * In the global server configuration.
+ * In a virtual host configuration block.
+ * In a `<Directory>` or `<Location>` block.
+ * In '.htaccess'.
+
+In each place, it may be specified at most once. The default value is 'process'.
+
+[[PassengerThreadCount]]
+==== PassengerThreadCount <number> ====
+:version: 4.0.0
+include::users_guide_snippets/enterprise_only.txt[]
+
+Specifies the number of threads that Phusion Passenger should spawn per application process. This option only has effect if <<PassengerConcurrencyModel,PassengerConcurrencyModel>> is 'thread'.
+
+This option may occur in the following places:
+
+ * In the global server configuration.
+ * In a virtual host configuration block.
+ * In a `<Directory>` or `<Location>` block.
+ * In '.htaccess'.
+
+In each place, it may be specified at most once. The default value is '1'.
+
 [[PassengerMaxRequests]]
 ==== PassengerMaxRequests <integer> ====
-The maximum number of requests an application instance will process. After
-serving that many requests, the application instance will be shut down and
+The maximum number of requests an application process will process. After
+serving that many requests, the application process will be shut down and
 Phusion Passenger will restart it. A value of 0 means that there is no maximum:
-an application instance will thus be shut down when its idle timeout has been
+an application process will thus be shut down when its idle timeout has been
 reached.
 
 This option is useful if your application is leaking memory. By shutting
@@ -1205,6 +1248,106 @@ problem in your application rather than relying on these directives as a
 measure to avoid memory leaks.
 =====================================================
 
+[[PassengerMaxRequestTime]]
+==== PassengerMaxRequestTime <seconds> ====
+:version: 3.0.0
+include::users_guide_snippets/enterprise_only.txt[]
+
+The maximum amount of time, in seconds, that an application process may take
+to process a request. If the request takes longer than this amount of time,
+then the application process will be forcefully shut down, and possibly
+restarted upon the next request. A value of 0 means that there is no time limit.
+
+This option is useful for preventing your application from freezing for an
+indefinite period of time.
+
+This option may occur in the following places:
+
+ * In the global server configuration.
+ * In a virtual host configuration block.
+ * In a `<Directory>` or `<Location>` block.
+ * In '.htaccess', if `AllowOverride Limits` is on.
+
+In each place, it may be specified at most once. The default value is '0'.
+
+.Example
+Suppose that most of your requests are known to finish within 2 seconds.
+However, there is one URI, '/expensive_computation', which is known to take up
+to 10 seconds. You can then configure Phusion Passenger as follows:
+
+----------------------------------------------
+<VirtualHost *:80>
+    ServerName www.example.com
+    DocumentRoot /webapps/my_app/public
+    
+    PassengerMaxRequestTime 2
+    <Location /expensive_computation>
+        PassengerMaxRequestTime 10
+    </Location>
+</VirtualHost>
+----------------------------------------------
+
+If a request to '/expensive_computation' takes more than 10 seconds,
+or if a request to any other URI takes more than 2 seconds,
+then the corresponding application process will be forced to shutdown.
+
+[CAUTION]
+=====================================================
+The <<PassengerMaxRequestTime,PassengerMaxRequestTime>> directive should be
+considered as a workaround for misbehaving applications. It is advised that you
+fix the problem in your application rather than relying on these directives as a
+measure to avoid freezing applications.
+=====================================================
+
+[NOTE]
+=====================================================
+This option is currently only available for Ruby apps. It is not yet available
+for Python and Node.js.
+=====================================================
+
+[[PassengerMemoryLimit]]
+==== PassengerMemoryLimit <integer> ====
+:version: 3.0.0
+include::users_guide_snippets/enterprise_only.txt[]
+
+The maximum amount of memory that an application process may use, in megabytes.
+Once an application process has surpassed its memory limit, it will process
+all the requests currently present in its queue and then shut down.
+A value of 0 means that there is no maximum: the application's memory usage
+will not be checked.
+
+This option is useful if your application is leaking memory. By shutting
+it down, all of its memory is guaranteed to be freed by the operating system.
+
+This option may occur in the following places:
+
+ * In the global server configuration.
+ * In a virtual host configuration block.
+ * In a `<Directory>` or `<Location>` block.
+ * In '.htaccess', if `AllowOverride Limits` is on.
+
+In each place, it may be specified at most once. The default value is '0'.
+
+[NOTE]
+.A word about permissions
+=====================================================
+The <<PassengerMemoryLimit,PassengerMemoryLimit>> directive uses
+`ps` command to query memory usage information. On Linux, it further
+queries `/proc` to obtain additional memory usage information that's
+not obtainable through `ps`. You should ensure that the `ps` works
+correctly and that the `/proc` filesystem is accessible by the
+`PassengerHelperAgent` process.
+=====================================================
+
+[CAUTION]
+=====================================================
+The <<PassengerMaxRequests,PassengerMaxRequests>> and
+<<PassengerMemoryLimit,PassengerMemoryLimit>> directives should be considered
+as workarounds for misbehaving applications. It is advised that you fix the
+problem in your application rather than relying on these directives as a
+measure to avoid memory leaks.
+=====================================================
+
 ==== PassengerStatThrottleRate <integer> ====
 By default, Phusion Passenger performs several filesystem checks (or, in
 programmers jargon, 'stat() calls') each time a request is processed:
@@ -1236,11 +1379,11 @@ In each place, it may be specified at most once. The default value is '0'.
 
 [[PassengerPreStart]]
 ==== PassengerPreStart <url> ====
-By default, Phusion Passenger does not start any application instances until said
+By default, Phusion Passenger does not start any application processes until said
 web application is first accessed. The result is that the first visitor of said
 web application might experience a small delay as Phusion Passenger is starting
 the web application on demand. If that is undesirable, then this directive can be
-used to pre-started application instances during Apache startup.
+used to pre-started application processes during Apache startup.
 
 A few things to be careful of:
 
@@ -1254,7 +1397,7 @@ A few things to be careful of:
   * The path part of the URL must point to some URI that the web application
     handles.
 - You will probably want to combine this option with
-  <<PassengerMinInstances,PassengerMinInstances>> because application instances
+  <<PassengerMinInstances,PassengerMinInstances>> because application processes
   started with 'PassengerPreStart' are subject to the usual idle timeout rules.
   See the example below for an explanation.
 
@@ -1335,10 +1478,10 @@ PassengerPreStart http://myblog.com/    # <----- WRONG! Missing "/store" part.
 
 ===== Example 3: combining with PassengerMinInstances =====
 
-Application instances started with PassengerPreStart are
+Application processes started with PassengerPreStart are
 also subject to the idle timeout rules as specified by
 <<PassengerPoolIdleTime,PassengerPoolIdleTime>>! That means that by default,
-the pre-started application instances for foo.com are bar.com are shut down
+the pre-started application processes for foo.com are bar.com are shut down
 after a few minutes of inactivity. If you don't want that to happen, then
 you should combine PassengerPreStart with
 <<PassengerMinInstances,PassengerMinInstances>>, like this:
@@ -1347,13 +1490,15 @@ you should combine PassengerPreStart with
 <VirtualHost *:80>
    ServerName foo.com
    DocumentRoot /webapps/foo/public
-   PassengerMinInstances 1      # <--- added
+   # Added!
+   PassengerMinInstances 1
 </VirtualHost>
 
 <VirtualHost *:3500>
    ServerName bar.com
    DocumentRoot /webapps/bar/public
-   PassengerMinInstances 1      # <--- added
+   # Added!
+   PassengerMinInstances 1
 </VirtualHost>
 
 PassengerPreStart http://foo.com/
@@ -1579,6 +1724,7 @@ displaying maintenance.html will work fine even for URLs starting with "/users".
 
 === Logging and debugging options ===
 
+[[PassengerLogLevel]]
 ==== PassengerLogLevel <integer> ====
 This option allows one to specify how much information Phusion Passenger should
 write to the Apache error log file. A higher log level value means that more
@@ -1603,41 +1749,36 @@ error messages should be written to instead.
 
 This option may only occur once, in the global server configuration.
 
+==== PassengerDebugger <on|off> ====
+:version: 3.0.0
+include::users_guide_snippets/enterprise_only.txt[]
 
-=== Ruby on Rails-specific options ===
+Turns support for application debugging on or off. In case of Ruby applications,
+turning this option on will cause them to load the `ruby-debug` gem (when on Ruby 1.8)
+or the `debugger` gem (when on Ruby 1.9). If you're using Bundler, you should add
+this to your Gemfile:
 
-==== RailsAutoDetect <on|off> ====
-Whether Phusion Passenger should automatically detect whether a virtual host's
-document root is a Ruby on Rails application. The default is 'on'.
+-------------------------------------------
+gem 'ruby-debug', :platforms => :ruby_18
+gem 'debugger', :platforms => :ruby_19
+-------------------------------------------
 
-This option may occur in the global server configuration or in a virtual host
-configuration block.
+Once debugging is turned on, you can use the command `passenger-irb --debug <PID>` to attach an rdebug console to the application process with the given PID. Attaching will succeed once the application process executes a `debugger` command.
 
-For example, consider the following configuration:
+This option may occur in the following places:
 
------------------------------
-RailsAutoDetect off
-<VirtualHost *:80>
-    ServerName www.mycook.com
-    DocumentRoot /webapps/mycook/public
-</VirtualHost>
------------------------------
+ * In the global server configuration.
+ * In a virtual host configuration block.
+ * In a `<Directory>` or `<Location>` block.
+ * In '.htaccess', if `AllowOverride Options` is on.
 
-If one goes to 'http://www.mycook.com/', the visitor will see the contents of
-the '/webapps/mycook/public' folder, instead of the output of the Ruby on Rails
-application.
+In each place, it may be specified at most once. The default value is 'off'.
 
-It is possible to explicitly specify that the host is a Ruby on Rails
-application by using the <<RailsBaseURI,RailsBaseURI>> configuration option:
 
------------------------------
-RailsAutoDetect off
-<VirtualHost *:80>
-    ServerName www.mycook.com
-    DocumentRoot /webapps/mycook/public
-    RailsBaseURI /           # This line has been added.
-</VirtualHost>
------------------------------
+=== Classic Ruby on Rails (<= 2.x)-specific options ===
+
+These options only have effect on classic Ruby on Rails 1.x and 2.x applications.
+Ruby on Rails >= 3.x applications are considered Rack applications.
 
 [[RailsBaseURI]]
 ==== RailsBaseURI <uri> ====
@@ -1667,88 +1808,7 @@ This option may occur in the following places:
 
 In each place, it may be specified at most once. The default value is 'production'.
 
-==== RailsFrameworkSpawnerIdleTime <integer> ====
-The FrameworkSpawner server (explained in <<spawning_methods_explained,Spawning
-methods explained>>) has an idle timeout, just like the backend processes spawned by
-Phusion Passenger do. That is, it will automatically shutdown if it hasn't done
-anything for a given period.
-
-This option allows you to set the FrameworkSpawner server's idle timeout, in
-seconds. A value of '0' means that it should never idle timeout.
-
-Setting a higher value will mean that the FrameworkSpawner server is kept around
-longer, which may slightly increase memory usage. But as long as the
-FrameworkSpawner server is running, the time to spawn a Ruby on Rails backend
-process only takes about 40% of the time that is normally needed, assuming that
-you're using the 'smart' <<PassengerSpawnMethod,spawning method>>. So if your
-system has enough memory, is it recommended that you set this option to a high
-value or to '0'.
-
-This option may occur in the following places:
-
- * In the global server configuration.
- * In a virtual host configuration block.
-
-In each place, it may be specified at most once. The default value is '1800' (30 minutes).
-
-==== RailsAppSpawnerIdleTime <integer> ====
-The ApplicationSpawner server (explained in <<spawning_methods_explained,Spawning
-methods explained>>) has an idle timeout, just like the backend processes spawned by
-Phusion Passenger do. That is, it will automatically shutdown if it hasn't done
-anything for a given period.
-
-This option allows you to set the ApplicationSpawner server's idle timeout, in
-seconds. A value of '0' means that it should never idle timeout.
-
-Setting a higher value will mean that the ApplicationSpawner server is kept around
-longer, which may slightly increase memory usage. But as long as the
-ApplicationSpawner server is running, the time to spawn a Ruby on Rails backend
-process only takes about 10% of the time that is normally needed, assuming that
-you're using the 'smart' or 'smart-lv2' <<PassengerSpawnMethod,spawning method>>. So if your
-system has enough memory, is it recommended that you set this option to a high
-value or to '0'.
-
-This option may occur in the following places:
-
- * In the global server configuration.
- * In a virtual host configuration block.
-
-In each place, it may be specified at most once. The default value is '600' (10 minutes).
-
-=== Rack-specific options ===
-
-==== RackAutoDetect <on|off> ====
-Whether Phusion Passenger should automatically detect whether a virtual host's
-document root is a Rack application. The default is 'on'.
-
-This option may occur in the global server configuration or in a virtual host
-configuration block.
-
-For example, consider the following configuration:
-
------------------------------
-RackAutoDetect off
-<VirtualHost *:80>
-    ServerName www.rackapp.com
-    DocumentRoot /webapps/my_rack_app/public
-</VirtualHost>
------------------------------
-
-If one goes to 'http://www.rackapp.com/', the visitor will see the contents of
-the '/webapps/my_rack_app/public' folder, instead of the output of the Rack
-application.
-
-It is possible to explicitly specify that the host is a Rack
-application by using the <<RackBaseURI,RackBaseURI>> configuration option:
-
------------------------------
-RackAutoDetect off
-<VirtualHost *:80>
-    ServerName www.rackapp.com
-    DocumentRoot /webapps/my_rack_app/public
-    RackBaseURI /       # This line was added
-</VirtualHost>
------------------------------
+=== Rack and Rails >= 3 specific options ===
 
 [[RackBaseURI]]
 ==== RackBaseURI <uri> ====
@@ -1780,7 +1840,7 @@ This option may occur in the following places:
 
 In each place, it may be specified at most once. The default value is 'production'.
 
-=== Deprecated options ===
+=== Deprecated or removed options ===
 
 The following options have been deprecated, but are still supported for backwards
 compatibility reasons.
@@ -1800,7 +1860,18 @@ This option doesn't do anything anymore in recent versions of Phusion Passenger.
 ==== RailsSpawnMethod ====
 Deprecated in favor of <<PassengerSpawnMethod,PassengerSpawnMethod>>.
 
+==== RailsAutoDetect, RackAutoDetect and WsgiAutoDetect ====
+These options have been removed in version 4.0.0 as part of an optimization. You should use <<PassengerEnabled,PassengerEnabled>> instead.
+
+==== RailsAppSpawnerIdleTime ====
+This option has been removed in version 4.0.0, and replaced with <<PassengerMaxPreloaderIdleTime,PassengerMaxPreloaderIdleTime>>.
+
+==== RailsFrameworkSpawnerIdleTime ====
+This option is no longer available in version 4.0.0. There is no alternative because framework spawning has been removed altogether. You should use smart spawning instead.
 
+
+
+[[troubleshooting]]
 == Troubleshooting ==
 
 === Operating system-specific problems ===
@@ -2262,3 +2333,5 @@ include::users_guide_snippets/appendix_a_about.txt[]
 include::users_guide_snippets/appendix_b_terminology.txt[]
 
 include::users_guide_snippets/appendix_c_spawning_methods.txt[]
+
+include::users_guide_snippets/environment_variables.txt[]
diff --git a/doc/Users guide Nginx.html b/doc/Users guide Nginx.html
index 1ef9eae..38ebda9 100644
--- a/doc/Users guide Nginx.html	
+++ b/doc/Users guide Nginx.html	
@@ -1,9 +1,9 @@
 <!DOCTYPE html>
-<html lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta name="generator" content="AsciiDoc 8.6.7">
-<title>Phusion Passenger users guide, Nginx version</title>
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta name="generator" content="AsciiDoc 8.6.7">
+<title>Phusion Passenger users guide, Nginx version</title>
 <style type="text/css">
 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
 
@@ -603,7 +603,7 @@ div.exampleblock > div.content, div.sidebarblock > div.content, div.listingblock
 div.verseblock { border-left-width: 0; margin-left: 3em; }
 div.quoteblock { border-left-width: 3px; margin-left: 0; margin-right: 0;}
 div.admonitionblock td.content { border-left: 3px solid #E8E8E8; }
-</style>
+</style>
 <script type="text/javascript">
 /*<![CDATA[*/
 var asciidoc = {  // Namespace.
@@ -795,11 +795,14 @@ install: function(toclevels) {
 }
 
 }
-asciidoc.install(3);
+asciidoc.install();
 /*]]>*/
-</script><style type="text/css">
+</script>
+<style type="text/css">
 body {
-	margin: 1em 10% 1em 10%;
+	margin: 1em auto 1em auto;
+	padding: 0 1em 0 1em;
+	max-width: 800px;
 }
 
 a.image {
@@ -878,6 +881,10 @@ a.image {
 	margin: 2em;
 }
 
+pre {
+	overflow: auto;
+}
+
 @media print {
 	body {
 		font-size: 18pt;
@@ -1038,29 +1045,38 @@ a.image {
 	border-bottom-right-radius: 0;
 }
 
+/* http://nicolasgallagher.com/jump-links-and-viewport-positioning/ */
+.anchor_helper {
+	position: relative;
+	display: block;
+	top: -50px;
+	width: 1px;
+	height: 1px;
+}
+
 </style>
-</head>
+</head>
 <body class="article">
 <div id="topbar" style="display: none">
 	<div class="title">
+		<!-- Don't put a space between the img and a. That will break the hover layout. -->
 		<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAAEV95QVAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sGCRMSACDxkZwAAAAidEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVAgb24gYSBNYWOHqHdDAAAAZUlEQVQY032PSxbAIAjEIlfygL6ePF3UUvpzNjgSYWwqAMEhUQnANnsC7TQPeJpsVWzMuh2sog4vDTUbqP081zECrW4dtdaQGSIKlWluPyjK+VXxAz5XfcKufCzA130AfQHWB30HZxlPaP080xsAAAAASUVORK5CYII=" width="11" height="10" alt=""><a href="javascript:void(Mizuho.smoothlyScrollToToc())">Ph [...]
 	</div>
 	<a href="javascript:void(0)" id="current_section"></a>
 </div>
 <div id="header">
-<h1>Phusion Passenger users guide, Nginx version</h1>
+<h1>Phusion Passenger users guide, Nginx version</h1>
 <div id="preamble">
 <div class="sectionbody">
 <div class="paragraph"><p><span class="image">
 <a class="image" href="http://www.phusion.nl/">
-<img src="images/phusion_banner.png" alt="images/phusion_banner.png"></a>
+<img src="images/phusion_banner.png" alt="images/phusion_banner.png">
+</a>
 </span></p></div>
-<div class="paragraph"><p>Phusion Passenger is an Nginx module, which makes deploying Ruby and Ruby on
-Rails applications on Nginx a breeze. It follows the usual Ruby on Rails
-conventions, such as "Don’t-Repeat-Yourself" and ease of setup, while at the
-same time providing enough flexibility.</p></div>
+<div class="paragraph"><p>Phusion Passenger is an application server which can directly integrate into Nginx. It is designed to be easy to use, fast, stable and reliable and is used by <a href="http://trends.builtwith.com/Web-Server/Phusion-Passenger">hundreds of thousands of websites</a> all over the world.</p></div>
+<div class="paragraph"><p>Phusion Passenger is a so-called polyglot application server because it supports applications written in multiple programming languages. At this time, Ruby and Python are supported.</p></div>
 <div class="paragraph"><p>This users guide will teach you:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 How to install Nginx with Phusion Passenger support.
@@ -1073,12 +1089,7 @@ How to configure Phusion Passenger.
 </li>
 <li>
 <p>
-How to deploy a Ruby on Rails application.
-</p>
-</li>
-<li>
-<p>
-How to deploy a <a href="http://rack.rubyforge.org/">Rack</a>-based Ruby application.
+How to deploy Ruby and Python applications.
 </p>
 </li>
 <li>
@@ -1088,35 +1099,198 @@ How to solve common problems.
 </li>
 </ul></div>
 <div class="paragraph"><p>This guide assumes that the reader is somewhat familiar with Nginx and with
-using the commandline.</p></div>
-</div>
+using the command line.</p></div>
 </div>
+</div>
 <div id="toc">
-  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><div id="toctitle">Table of Contents</div>
-  <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
-</div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><div id="toctitle">Table of Contents</div>
+<div class="foo toclevel2"><a href="#_support_information">1. Support information</a></div>
+<div class="foo toclevel3"><a href="#_supported_operating_systems">1.1. Supported operating systems</a></div>
+<div class="foo toclevel3"><a href="#_where_to_get_support">1.2. Where to get support</a></div>
+<div class="foo toclevel2"><a href="#_installation">2. Installation</a></div>
+<div class="foo toclevel3"><a href="#_synopsis">2.1. Synopsis</a></div>
+<div class="foo toclevel3"><a href="#rubygems_generic_install">2.2. Generic installation, upgrade and downgrade method: via RubyGems</a></div>
+<div class="foo toclevel3"><a href="#tarball_generic_install">2.3. Generic installation, upgrade and downgrade method: via tarball</a></div>
+<div class="foo toclevel3"><a href="#install_on_debian_ubuntu">2.4. Installing or upgrading on Debian 6 or Ubuntu</a></div>
+<div class="foo toclevel3"><a href="#_installing_or_upgrading_on_red_hat_fedora_centos_or_scientificlinux">2.5. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux</a></div>
+<div class="foo toclevel3"><a href="#_upgrading_from_open_source_to_enterprise">2.6. Upgrading from open source to Enterprise</a></div>
+<div class="foo toclevel3"><a href="#_cryptographic_verification_of_installation_files">2.7. Cryptographic verification of installation files</a></div>
+<div class="foo toclevel4"><a href="#_synopsis_2">2.7.1. Synopsis</a></div>
+<div class="foo toclevel4"><a href="#_importing_the_phusion_software_signing_key">2.7.2. Importing the Phusion Software Signing key</a></div>
+<div class="foo toclevel4"><a href="#_verifying_the_phusion_software_signing_key">2.7.3. Verifying the Phusion Software Signing key</a></div>
+<div class="foo toclevel4"><a href="#_verifying_the_gem_and_tarball">2.7.4. Verifying the gem and tarball</a></div>
+<div class="foo toclevel4"><a href="#_verifying_git_signatures">2.7.5. Verifying Git signatures</a></div>
+<div class="foo toclevel4"><a href="#_verifying_deb_and_rpm_packages">2.7.6. Verifying DEB and RPM packages</a></div>
+<div class="foo toclevel4"><a href="#_revocation">2.7.7. Revocation</a></div>
+<div class="foo toclevel3"><a href="#_non_interactive_automatic_headless_installs_or_upgrades">2.8. Non-interactive, automatic, headless installs or upgrades</a></div>
+<div class="foo toclevel3"><a href="#_customizing_the_compilation_process">2.9. Customizing the compilation process</a></div>
+<div class="foo toclevel4"><a href="#_setting_the_compiler">2.9.1. Setting the compiler</a></div>
+<div class="foo toclevel4"><a href="#_adding_additional_compiler_or_linker_flags">2.9.2. Adding additional compiler or linker flags</a></div>
+<div class="foo toclevel4"><a href="#_forcing_location_of_command_line_tools_and_dependencies">2.9.3. Forcing location of command line tools and dependencies</a></div>
+<div class="foo toclevel3"><a href="#_installing_as_a_normal_nginx_module_without_using_the_installer">2.10. Installing as a normal Nginx module without using the installer</a></div>
+<div class="foo toclevel3"><a href="#nginx_init_script">2.11. Creating an Nginx init script</a></div>
+<div class="foo toclevel3"><a href="#_disabling_without_uninstalling">2.12. Disabling without uninstalling</a></div>
+<div class="foo toclevel3"><a href="#uninstalling">2.13. Uninstalling</a></div>
+<div class="foo toclevel3"><a href="#moving_phusion_passenger">2.14. Moving to a different directory</a></div>
+<div class="foo toclevel2"><a href="#deploying_a_ror_app">3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3) application</a></div>
+<div class="foo toclevel3"><a href="#_deploying_to_a_virtual_host_8217_s_root">3.1. Deploying to a virtual host’s root</a></div>
+<div class="foo toclevel3"><a href="#deploying_rails_to_sub_uri">3.2. Deploying to a sub URI</a></div>
+<div class="foo toclevel3"><a href="#_redeploying_restarting_the_ruby_on_rails_application">3.3. Redeploying (restarting the Ruby on Rails application)</a></div>
+<div class="foo toclevel3"><a href="#_migrations">3.4. Migrations</a></div>
+<div class="foo toclevel3"><a href="#_capistrano_integration">3.5. Capistrano integration</a></div>
+<div class="foo toclevel2"><a href="#deploying_a_rack_app">4. Deploying a Rack-based Ruby application (including Rails >= 3)</a></div>
+<div class="foo toclevel3"><a href="#_tutorial_example_writing_and_deploying_a_hello_world_rack_application">4.1. Tutorial/example: writing and deploying a Hello World Rack application</a></div>
+<div class="foo toclevel3"><a href="#_deploying_to_a_virtual_host_8217_s_root_2">4.2. Deploying to a virtual host’s root</a></div>
+<div class="foo toclevel3"><a href="#deploying_rack_to_sub_uri">4.3. Deploying to a sub URI</a></div>
+<div class="foo toclevel3"><a href="#_redeploying_restarting_the_rack_application">4.4. Redeploying (restarting the Rack application)</a></div>
+<div class="foo toclevel3"><a href="#_rackup_specifications_for_various_web_frameworks">4.5. Rackup specifications for various web frameworks</a></div>
+<div class="foo toclevel4"><a href="#_camping">4.5.1. Camping</a></div>
+<div class="foo toclevel4"><a href="#_halcyon">4.5.2. Halcyon</a></div>
+<div class="foo toclevel4"><a href="#_mack">4.5.3. Mack</a></div>
+<div class="foo toclevel4"><a href="#_merb">4.5.4. Merb</a></div>
+<div class="foo toclevel4"><a href="#_ramaze">4.5.5. Ramaze</a></div>
+<div class="foo toclevel4"><a href="#_sinatra">4.5.6. Sinatra</a></div>
+<div class="foo toclevel2"><a href="#_deploying_a_wsgi_python_application">5. Deploying a WSGI (Python) application</a></div>
+<div class="foo toclevel3"><a href="#_tutorial_example_writing_and_deploying_a_hello_world_wsgi_application">5.1. Tutorial/example: writing and deploying a Hello World WSGI application</a></div>
+<div class="foo toclevel3"><a href="#_deploying_to_a_virtual_host_8217_s_root_3">5.2. Deploying to a virtual host’s root</a></div>
+<div class="foo toclevel3"><a href="#_redeploying_restarting_the_wsgi_application">5.3. Redeploying (restarting the WSGI application)</a></div>
+<div class="foo toclevel2"><a href="#_configuring_phusion_passenger">6. Configuring Phusion Passenger</a></div>
+<div class="foo toclevel3"><a href="#_passenger_root_lt_directory_gt">6.1. passenger_root <directory></a></div>
+<div class="foo toclevel3"><a href="#PassengerRuby">6.2. passenger_ruby <filename></a></div>
+<div class="foo toclevel3"><a href="#_passenger_python_lt_filename_gt">6.3. passenger_python <filename></a></div>
+<div class="foo toclevel3"><a href="#PassengerAppRoot">6.4. passenger_app_root <path/to/root></a></div>
+<div class="foo toclevel3"><a href="#PassengerSpawnMethod">6.5. passenger_spawn_method <string></a></div>
+<div class="foo toclevel3"><a href="#PassengerRollingRestarts">6.6. passenger_rolling_restarts <on|off></a></div>
+<div class="foo toclevel3"><a href="#_passenger_resist_deployment_errors_lt_on_off_gt">6.7. passenger_resist_deployment_errors <on|off></a></div>
+<div class="foo toclevel3"><a href="#PassengerTempDir">6.8. passenger_temp_dir <directory></a></div>
+<div class="foo toclevel3"><a href="#_passenger_fly_with_lt_socket_filename_gt">6.9. passenger_fly_with <socket filename></a></div>
+<div class="foo toclevel3"><a href="#_important_deployment_options">6.10. Important deployment options</a></div>
+<div class="foo toclevel4"><a href="#_passenger_enabled_lt_on_off_gt">6.10.1. passenger_enabled <on|off></a></div>
+<div class="foo toclevel4"><a href="#PassengerBaseURI">6.10.2. passenger_base_uri <uri></a></div>
+<div class="foo toclevel3"><a href="#_connection_handling_options">6.11. Connection handling options</a></div>
+<div class="foo toclevel4"><a href="#_passenger_ignore_client_abort_lt_on_off_gt">6.11.1. passenger_ignore_client_abort <on|off></a></div>
+<div class="foo toclevel4"><a href="#_passenger_set_cgi_param_lt_cgi_environment_name_gt_lt_value_gt">6.11.2. passenger_set_cgi_param <CGI environment name> <value></a></div>
+<div class="foo toclevel4"><a href="#_passenger_pass_header_lt_header_name_gt">6.11.3. passenger_pass_header <header name></a></div>
+<div class="foo toclevel4"><a href="#_passenger_buffer_response_lt_on_off_gt">6.11.4. passenger_buffer_response <on|off></a></div>
+<div class="foo toclevel4"><a href="#_passenger_buffer_size">6.11.5. passenger_buffer_size</a></div>
+<div class="foo toclevel4"><a href="#_passenger_buffers">6.11.6. passenger_buffers</a></div>
+<div class="foo toclevel4"><a href="#_passenger_busy_buffer_size">6.11.7. passenger_busy_buffer_size</a></div>
+<div class="foo toclevel3"><a href="#_security_options">6.12. Security options</a></div>
+<div class="foo toclevel4"><a href="#PassengerUserSwitching">6.12.1. passenger_user_switching <on|off></a></div>
+<div class="foo toclevel4"><a href="#PassengerUser">6.12.2. passenger_user <username></a></div>
+<div class="foo toclevel4"><a href="#PassengerGroup">6.12.3. passenger_group <group name></a></div>
+<div class="foo toclevel4"><a href="#PassengerDefaultUser">6.12.4. passenger_default_user <username></a></div>
+<div class="foo toclevel4"><a href="#PassengerDefaultGroup">6.12.5. Passenger_default_group <group name></a></div>
+<div class="foo toclevel4"><a href="#_passenger_show_version_in_header_lt_on_off_gt">6.12.6. passenger_show_version_in_header <on|off></a></div>
+<div class="foo toclevel4"><a href="#PassengerFriendlyErrorPages">6.12.7. passenger_friendly_error_pages <on|off></a></div>
+<div class="foo toclevel3"><a href="#_resource_control_and_optimization_options">6.13. Resource control and optimization options</a></div>
+<div class="foo toclevel4"><a href="#PassengerMaxPoolSize">6.13.1. passenger_max_pool_size <integer></a></div>
+<div class="foo toclevel4"><a href="#PassengerMinInstances">6.13.2. passenger_min_instances <integer></a></div>
+<div class="foo toclevel4"><a href="#_passenger_max_instances_lt_integer_gt">6.13.3. passenger_max_instances <integer></a></div>
+<div class="foo toclevel4"><a href="#_passenger_max_instances_per_app_lt_integer_gt">6.13.4. passenger_max_instances_per_app <integer></a></div>
+<div class="foo toclevel4"><a href="#PassengerPoolIdleTime">6.13.5. passenger_pool_idle_time <integer></a></div>
+<div class="foo toclevel4"><a href="#_passenger_max_preloader_idle_time_lt_integer_gt">6.13.6. passenger_max_preloader_idle_time <integer></a></div>
+<div class="foo toclevel4"><a href="#PassengerConcurrencyModel">6.13.7. passenger_concurrency_model <process|thread></a></div>
+<div class="foo toclevel4"><a href="#PassengerThreadCount">6.13.8. passenger_thread_count <number></a></div>
+<div class="foo toclevel4"><a href="#PassengerMaxRequests">6.13.9. passenger_max_requests <integer></a></div>
+<div class="foo toclevel4"><a href="#PassengerMaxRequestTime">6.13.10. passenger_max_request_time <seconds></a></div>
+<div class="foo toclevel4"><a href="#PassengerMemoryLimit">6.13.11. passenger_memory_limit <integer></a></div>
+<div class="foo toclevel4"><a href="#PassengerPreStart">6.13.12. passenger_pre_start <url></a></div>
+<div class="foo toclevel3"><a href="#_logging_and_debugging_options">6.14. Logging and debugging options</a></div>
+<div class="foo toclevel4"><a href="#PassengerLogLevel">6.14.1. passenger_log_level <integer></a></div>
+<div class="foo toclevel4"><a href="#_passenger_debug_log_file_lt_filename_gt">6.14.2. passenger_debug_log_file <filename></a></div>
+<div class="foo toclevel4"><a href="#_passenger_debugger_lt_on_off_gt">6.14.3. passenger_debugger <on|off></a></div>
+<div class="foo toclevel3"><a href="#_ruby_on_rails_specific_options">6.15. Ruby on Rails-specific options</a></div>
+<div class="foo toclevel4"><a href="#RailsEnv">6.15.1. rails_env <string></a></div>
+<div class="foo toclevel3"><a href="#_rack_and_rails_gt_3_specific_options">6.16. Rack and Rails >= 3 specific options</a></div>
+<div class="foo toclevel4"><a href="#RackEnv">6.16.1. rack_env <string></a></div>
+<div class="foo toclevel3"><a href="#_deprecated_options">6.17. Deprecated options</a></div>
+<div class="foo toclevel4"><a href="#_rails_spawn_method">6.17.1. rails_spawn_method</a></div>
+<div class="foo toclevel2"><a href="#_analysis_and_system_maintenance">7. Analysis and system maintenance</a></div>
+<div class="foo toclevel3"><a href="#_inspecting_memory_usage">7.1. Inspecting memory usage</a></div>
+<div class="foo toclevel3"><a href="#_inspecting_phusion_passenger_8217_s_internal_status">7.2. Inspecting Phusion Passenger’s internal status</a></div>
+<div class="foo toclevel3"><a href="#debugging_frozen">7.3. Debugging frozen applications</a></div>
+<div class="foo toclevel3"><a href="#_accessing_individual_application_processes">7.4. Accessing individual application processes</a></div>
+<div class="foo toclevel3"><a href="#_attaching_an_irb_console_to_an_application_process">7.5. Attaching an IRB console to an application process</a></div>
+<div class="foo toclevel2"><a href="#_tips">8. Tips</a></div>
+<div class="foo toclevel3"><a href="#user_switching">8.1. User Switching (security feature)</a></div>
+<div class="foo toclevel4"><a href="#_requirements">8.1.1. Requirements</a></div>
+<div class="foo toclevel4"><a href="#_effects">8.1.2. Effects</a></div>
+<div class="foo toclevel4"><a href="#_caveats_amp_troubleshooting">8.1.3. Caveats & troubleshooting</a></div>
+<div class="foo toclevel4"><a href="#finding_out_app_user">8.1.4. Finding out what user an application is running as</a></div>
+<div class="foo toclevel3"><a href="#reducing_memory_usage">8.2. Copy-on-write memory support (reducing memory consumption of Ruby applications)</a></div>
+<div class="foo toclevel3"><a href="#capistrano">8.3. Capistrano recipe</a></div>
+<div class="foo toclevel3"><a href="#bundler_support">8.4. Bundler support</a></div>
+<div class="foo toclevel4"><a href="#add_passenger_to_gemfile">8.4.1. Does Phusion Passenger itself need to be added to the Gemfile?</a></div>
+<div class="foo toclevel3"><a href="#_installing_multiple_ruby_on_rails_versions">8.5. Installing multiple Ruby on Rails versions</a></div>
+<div class="foo toclevel3"><a href="#_making_the_application_restart_after_each_request">8.6. Making the application restart after each request</a></div>
+<div class="foo toclevel3"><a href="#sub_uri_deployment_uri_fix">8.7. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments</a></div>
+<div class="foo toclevel3"><a href="#_out_of_band_garbage_work_and_out_of_band_garbage_collection">8.8. Out-of-Band Garbage Work and Out-of-Band Garbage Collection</a></div>
+<div class="foo toclevel3"><a href="#flying_passenger">8.9. Flying Passenger</a></div>
+<div class="foo toclevel4"><a href="#_requirements_2">8.9.1. Requirements</a></div>
+<div class="foo toclevel4"><a href="#_basic_usage">8.9.2. Basic usage</a></div>
+<div class="foo toclevel4"><a href="#configuring_flying_passenger">8.9.3. Configuring Flying Passenger</a></div>
+<div class="foo toclevel4"><a href="#_managing_the_flying_passenger_daemon">8.9.4. Managing the Flying Passenger daemon</a></div>
+<div class="foo toclevel4"><a href="#flying_passenger_caveats">8.9.5. Caveats and limitations</a></div>
+<div class="foo toclevel2"><a href="#_under_the_hood">9. Under the hood</a></div>
+<div class="foo toclevel3"><a href="#_page_caching_support">9.1. Page caching support</a></div>
+<div class="foo toclevel3"><a href="#application_detection">9.2. How Phusion Passenger detects whether a virtual host is a web application</a></div>
+<div class="foo toclevel2"><a href="#_appendix_a_about_this_document">10. Appendix A: About this document</a></div>
+<div class="foo toclevel2"><a href="#_appendix_b_terminology">11. Appendix B: Terminology</a></div>
+<div class="foo toclevel3"><a href="#application_root">11.1. Application root</a></div>
+<div class="foo toclevel3"><a href="#idle_process">11.2. Idle process</a></div>
+<div class="foo toclevel3"><a href="#inactive_process">11.3. Inactive process</a></div>
+<div class="foo toclevel2"><a href="#spawning_methods_explained">12. Appendix C: Spawning methods explained</a></div>
+<div class="foo toclevel3"><a href="#_the_most_straightforward_and_traditional_way_direct_spawning">12.1. The most straightforward and traditional way: direct spawning</a></div>
+<div class="foo toclevel3"><a href="#_the_smart_spawning_method">12.2. The smart spawning method</a></div>
+<div class="foo toclevel4"><a href="#_how_it_works">12.2.1. How it works</a></div>
+<div class="foo toclevel4"><a href="#_summary_of_benefits">12.2.2. Summary of benefits</a></div>
+<div class="foo toclevel3"><a href="#_smart_spawning_gotcha_1_unintentional_file_descriptor_sharing">12.3. Smart spawning gotcha #1: unintentional file descriptor sharing</a></div>
+<div class="foo toclevel4"><a href="#_example_1_memcached_connection_sharing_harmful">12.3.1. Example 1: Memcached connection sharing (harmful)</a></div>
+<div class="foo toclevel4"><a href="#_example_2_log_file_sharing_not_harmful">12.3.2. Example 2: Log file sharing (not harmful)</a></div>
+<div class="foo toclevel3"><a href="#_smart_spawning_gotcha_2_the_need_to_revive_threads">12.4. Smart spawning gotcha #2: the need to revive threads</a></div>
+<div class="foo toclevel3"><a href="#_smart_spawning_gotcha_3_code_load_order">12.5. Smart spawning gotcha #3: code load order</a></div>
+<div class="foo toclevel2"><a href="#about_environment_variables">13. Appendix D: About environment variables</a></div>
+<div class="foo toclevel3"><a href="#_working_with_environment_variables">13.1. Working with environment variables</a></div>
+<div class="foo toclevel3"><a href="#_the_path_environment_variable">13.2. The PATH environment variable</a></div>
+<div class="foo toclevel4"><a href="#_adding_phusion_passenger_8217_s_administration_tools_to_path">13.2.1. Adding Phusion Passenger’s administration tools to PATH</a></div>
+<div class="foo toclevel3"><a href="#_making_environment_variables_permanent">13.3. Making environment variables permanent</a></div>
+<div class="foo toclevel4"><a href="#_bash">13.3.1. bash</a></div>
+<div class="foo toclevel4"><a href="#_apache">13.3.2. Apache</a></div>
+<div class="foo toclevel4"><a href="#_nginx">13.3.3. Nginx</a></div>
+<div class="foo toclevel4"><a href="#_cron">13.3.4. cron</a></div>
+<div class="foo toclevel4"><a href="#env_vars_passenger_apps">13.3.5. Phusion Passenger-served apps</a></div>
+<div class="foo toclevel3"><a href="#env_vars_and_sudo">13.4. Environment variables and sudo</a></div>
+</div>
 </div>
 <div id="content">
 
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_support_information" data-comment-topic="support-information-nl5gdn">1. Support information</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_support_information"></span><h2 data-comment-topic="support-information-nl5gdn" data-anchor="_support_information">1. Support information</h2>
 <div class="sectionbody">
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_supported_operating_systems" data-comment-topic="supported-operating-systems-a5n2x4">1.1. Supported operating systems</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_supported_operating_systems"></span><h3 data-comment-topic="supported-operating-systems-a5n2x4" data-anchor="_supported_operating_systems">1.1. Supported operating systems</h3>
 <div class="paragraph"><p>Phusion Passenger works on any POSIX-compliant operating system. In other
 words: practically any operating system on earth, except Microsoft Windows.</p></div>
 <div class="paragraph"><p>Phusion Passenger is confirmed on a large number of operating systems and Linux
 distributions, including, but not limited to, Ubuntu, Debian, CentOS/Fedora/RHEL,
-Gentoo, Mac OS X, FreeBSD and Solaris. Both 32-bit and 64-bit platforms are supported.
-Please
+Gentoo, Mac OS X, FreeBSD and Solaris. OpenBSD is supported since version 5.2.
+Both 32-bit and 64-bit platforms are supported.</p></div>
+<div class="paragraph"><p>Please
 <a href="http://code.google.com/p/phusion-passenger/issues/list">report a bug</a>
 or
 <a href="http://groups.google.com/group/phusion-passenger">join our discussion forum</a>
 if it doesn’t work on your POSIX-compliant operating system.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_where_to_get_support" data-comment-topic="where-to-get-support-2s9na5">1.2. Where to get support</h3>
-<div class="ulist"><ul>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_where_to_get_support"></span><h3 data-comment-topic="where-to-get-support-2s9na5" data-anchor="_where_to_get_support">1.2. Where to get support</h3>
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="http://groups.google.com/group/phusion-passenger">Discussion forum</a> - post a
+  message here if you’re experiencing problems. Support on this forum is provided by the community on a best-effort basis, so a (timely) response is not guaranteed.
+</p>
+</li>
 <li>
 <p>
 <a href="http://code.google.com/p/phusion-passenger/issues/list">Issue tracker</a> - report
@@ -1125,846 +1299,2276 @@ if it doesn’t work on your POSIX-compliant operating system.</p></div>
 </li>
 <li>
 <p>
-<a href="http://groups.google.com/group/phusion-passenger">Discussion forum</a> - post a
-  message here if you’re experiencing problems.
+Email <a href="mailto:support at phusion.nl">support at phusion.nl</a> if you are a <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> customer. Please mention your order reference. If you are not an Enterprise customer, we kindly redirect you to the community discussion forum instead.
+</p>
+</li>
+<li>
+<p>
+<a href="https://www.phusionpassenger.com/commercial_support">Commercial support contracts</a> are also available.
+</p>
+</li>
+<li>
+<p>
+Report security vulnerabilities to <a href="mailto:security at phusion.nl">security at phusion.nl</a>. We will do our best to respond to you as quickly as we can, so please do not disclose the vulnerability until then.
 </p>
 </li>
 </ul></div>
+<div class="paragraph"><p>Please consult <a href="https://www.phusionpassenger.com/support">the Phusion Passenger website</a> for a full list of support resources.</p></div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_installing_phusion_passenger" data-comment-topic="installing-phusion-passenger-hn03ac">2. Installing Phusion Passenger</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installation"></span><h2 data-comment-topic="installing-phusion-passenger-hn03ac" data-anchor="_installation">2. Installation</h2>
 <div class="sectionbody">
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_overview" data-comment-topic="overview-kvhzi4">2.1. Overview</h3>
-<div class="paragraph"><p>As you might already know, Nginx does not support loadable modules, in contrast
-to most other web servers (e.g. Apache). Therefore, to install Phusion Passenger
-for Nginx, one must recompile and reinstall Nginx with Phusion Passenger support.
-There are two ways to do this:</p></div>
-<div class="olist arabic"><ol class="arabic">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_synopsis"></span><h3 data-comment-topic="synopsis-1uu3sqp" data-anchor="_synopsis">2.1. Synopsis</h3>
+<div class="paragraph"><p>The Phusion Passenger installation process consists of two steps:</p></div>
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
-By running the Phusion Passenger installer for Nginx. This installer will
-   guide you through the entire installation process, including downloading,
-   compiling and installing Nginx. You should be able to get Nginx with Phusion
-   Passenger support up-and-running in a matter of minutes. This is the
-   recommended installation method.
+The <strong>obtainment step</strong>, where you download the Phusion Passenger files puts them somewhere on your system. This can be done through downloading the source tarball, installing the Ruby gem or installing a native OS package via APT or YUM.
 </p>
 </li>
 <li>
 <p>
-By manually configuring and compiling Nginx with Phusion Passenger support,
-   through Nginx’s <span class="monospaced">--add-module</span> configure option. Generally, using our
-   installer is easier, so you should only use this method if you’re already
-   familiar with compiling Nginx.
+The <strong>integration step</strong>, where you configure Phusion Passenger so that it works properly with other system components such as Apache, Nginx, Ruby, Python, etc.
 </p>
 </li>
 </ol></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<img src="./images/icons/tip.png" alt="Tip">
-</td>
-<td class="content">You might have to run the installation commands in the following sections
-as <em>root</em>. If the installer fails because of permission errors, it will tell
-you.</td>
-</tr></table>
-</div>
+<div class="paragraph"><p>Because Phusion Passenger is designed to run in a wide variety of operating systems and configurations, both steps can be done in multiple ways. Most users — especially first-time users — will be satisfied with the <em>generic installation instructions</em> which covers both steps. However some users may prefer <em>OS-specific installation instructions</em>, which allow Phusion Passenger to better integrate into the operating system. Better integration is charac [...]
+<div class="paragraph"><p>If you are not familiar with system administration and do not understand all the choices, then we recommend you to go with the <a href="#rubygems_generic_install">RubyGems generic installation method</a> (if you’re a Ruby user) or the <a href="#tarball_generic_install">tarball generic installation method</a> (if you’re not a Ruby user).</p></div>
+<div class="paragraph"><p>The steps for upgrading or downgrading Phusion Passenger is almost the same as the steps for installing. All the installation guides in this section will also teach you how to upgrade and downgrade.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="specifying_ruby_installation" data-comment-topic="specifying-the-correct-ruby-installation-jvqdv6">2.2. Specifying the correct Ruby installation</h3>
-<div class="paragraph"><p>If your system has multiple Ruby installations — which is likely the case on
-MacOS X, or if you’ve also installed
-<a href="http://www.rubyenterpriseedition.com">Ruby Enterprise Edition</a> — then you
-will need to tell the operating system which Ruby installation to use, prior to
-running the Phusion Passenger installer. If you only have one Ruby installation
-(the case on most Linux systems), then you can skip this section because Phusion
-Passenger will automatically detect it.</p></div>
-<div class="paragraph"><p>To specify a Ruby installation, prepend your Ruby installation’s <span class="monospaced">bin</span>
-directory to the <span class="monospaced">PATH</span> environment variable. For example, if you have the
-following Ruby installations:</p></div>
-<div class="ulist"><ul>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="rubygems_generic_install"></span><h3 data-comment-topic="generic-installation-upgrade-and-downgrade-method-via-rubygems-76uol7" data-anchor="rubygems_generic_install">2.2. Generic installation, upgrade and downgrade method: via RubyGems</h3>
+<div class="paragraph"><p>RubyGems is only used as a method to obtain the Phusion Passenger files, so in case you have multiple Ruby versions it does not matter which Ruby’s RubyGems you use for installation. Once installed, Phusion Passenger can work with all other Ruby versions on your system.</p></div>
+<span class="anchor_helper" id="is_ruby_home_or_system_wide_installed"></span><h4 class="float" data-anchor="is_ruby_home_or_system_wide_installed">Step 1: figuring out whether your Ruby is installed the home directory or system-wide</h4>
+<div class="paragraph"><p>Ruby may either be installed in the home directory, or system-wide. If it’s installed system-wide then we will want to install gems system-wide as well, so you need to switch to a root prompt first. If Ruby is installed in the home directory then we will want to install gems to the home directory as well, as a normal user.</p></div>
+<div class="paragraph"><p>To find out which case applies, run the following command to find out where the <span class="monospaced">ruby</span> command is:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>which ruby</pre>
+</div>
+</div>
+<div class="paragraph"><p>Do you see a filename that references <em>/home</em> or <em>/Users</em>? If so then your Ruby interpreter is installed in your home directory and you can proceed to step 2. Otherwise, you need to switch to a root prompt by running one of the following commands:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Are you using RVM? Run <span class="monospaced">rvmsudo -s</span>
+</p>
+</li>
 <li>
 <p>
-/usr/bin/ruby
+Are you not using RVM, or do you not know what RVM is? Run <span class="monospaced">sudo -s</span>
 </p>
 </li>
 <li>
 <p>
-/opt/myruby/bin/ruby
+Is <em>sudo</em> not installed on your system? Run <span class="monospaced">su -c bash</span>
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>and you want to use the latter, then type:</p></div>
+<div class="paragraph"><p>You must maintain this root prompt throughout this installation guide.</p></div>
+<span class="anchor_helper" id="_step_2_install_the_gem"></span><h4 class="float" data-anchor="_step_2_install_the_gem">Step 2: install the gem</h4>
+<div class="paragraph">
+<div class="title">Open Source</div>
+<p>Install the latest gem to obtain the files for the latest stable version of the open source Phusion Passenger:</p>
+</div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>export PATH=/opt/myruby/bin:$PATH</pre>
+<pre>gem install passenger</pre>
 </div>
 </div>
+<div class="paragraph"><p>Sometimes you will want to obtain the latest beta version of Phusion Passenger. Beta versions are not normally selected by <span class="monospaced">gem install</span>, so to opt-in for beta versions you have to add the <span class="monospaced">--pre</span> argument:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>gem install passenger --pre</pre>
+</div>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_installing_phusion_passenger_for_nginx_through_the_installer" data-comment-topic="installing-phusion-passenger-for-nginx-through-the-installer-1lqxes1">2.3. Installing Phusion Passenger for Nginx through the installer</h3>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_obtaining_the_phusion_passenger_files_and_running_the_installer" data-comment-topic="obtaining-the-phusion-passenger-files-and-running-the-installer-6l6ula">2.3.1. Obtaining the Phusion Passenger files and running the installer</h4>
-<div class="paragraph"><p>You must obtain the Phusion Passenger files in order to run the installer.
-This can be done either by installing the Phusion Passenger gem, or by
-downloading the source tarball.</p></div>
-<div class="sect4">
-<h5 id="_gem">Gem</h5>
-<div class="paragraph"><p>First, install the Phusion Passenger gem by running:</p></div>
+<div class="paragraph"><p>If you want to obtain a specific version of Phusion Passenger, e.g. because you are downgrading, then specify the version number with <span class="monospaced">--version</span>:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>gem install passenger</pre>
+<pre>gem install passenger --version 3.0.0</pre>
 </div>
 </div>
-<div class="paragraph"><p>Next, run the Phusion Passenger installer for Nginx:</p></div>
+<div class="paragraph"><p>If you want to obtain a specific <strong>beta</strong> version of Phusion Passenger then you must also pass <span class="monospaced">--pre</span>:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>passenger-install-nginx-module</pre>
+<pre>gem install passenger --version 3.9.1.beta --pre</pre>
 </div>
 </div>
-<div class="paragraph"><p>Please follow the instructions given by the installer.</p></div>
+<div class="paragraph">
+<div class="title">Enterprise</div>
+<p>The <span class="monospaced">gem install</span> command only installs the open source version of Phusion Passenger. <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> customers should obtain the gem from the <a href="https://www.phusionpassenger.com/orders">Customer Area</a> instead. Login with your order reference and password. The Customer Area will show you a list of files.</p>
 </div>
-<div class="sect4">
-<h5 id="_source_tarball">Source tarball</h5>
-<div class="paragraph"><p>The source tarball can be download from the
-<a href="http://www.modrails.com/">Phusion Passenger website</a>. Extract the tarball to
-whatever location you prefer. <strong>The Phusion Passenger files are to reside in that
-location permanently.</strong> For example, if you would like Phusion Passenger to
-reside in <span class="monospaced">/opt/passenger-x.x.x</span>, then type:</p></div>
+<div class="paragraph"><p>First, download the <strong>license key</strong> and save it as <em>/etc/passenger-enterprise-license</em>.</p></div>
+<div class="paragraph"><p>Next, download the <strong>gem file</strong> for the version you want (<span class="monospaced">passenger-enterprise-server-x.x.x.gem</span>) and install it with:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>cd /opt
-tar xzvf ~/YourDownloadsFolder/passenger-x.x.x.tar.gz</pre>
+<pre>gem install passenger-enterprise-server-x.x.x.gem</pre>
 </div>
 </div>
-<div class="paragraph"><p>Next, run the Phusion Passenger installer for Nginx:</p></div>
+<span class="anchor_helper" id="add_rubygems_bin_dir_to_path"></span><h4 class="float" data-anchor="add_rubygems_bin_dir_to_path">Step 3: add the RubyGems bin directory to your $PATH</h4>
+<div class="paragraph"><p>If you all of the following are applicable to you:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+You are on Debian or Ubuntu,
+</p>
+</li>
+<li>
+<p>
+and you installed RubyGems through APT,
+</p>
+</li>
+<li>
+<p>
+and your Ruby interpreter is installed system-wide,
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>…then you must ensure that the RubyGems bin directory is in your $PATH, which is the environment variable that dictates where your command prompt will look for commands. If any of the above conditions do not apply to you, then you can skip this step.</p></div>
+<div class="paragraph"><p>Open <em>/etc/bash.bashrc</em> or <em>/etc/bashrc</em> (whichever is available) and add the following to the end of the file. Also run this command in your terminal.</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>/opt/passenger-x.x.x/bin/passenger-install-nginx-module</pre>
+<pre>export PATH=$PATH:/var/lib/gems/1.8/bin:/var/lib/gems/1.9/bin</pre>
 </div>
 </div>
-<div class="paragraph"><p>Please follow the instructions given by the installer.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<img src="./images/icons/important.png" alt="Important">
-</td>
-<td class="content">Please do not remove the passenger-x.x.x folder after installation.
-Furthermore, the passenger-x.x.x folder must be accessible by Nginx.</td>
-</tr></table>
-</div>
-</div>
-</div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_non_interactive_automatic_installation" data-comment-topic="non-interactive-automatic-installation-1u97717">2.3.2. Non-interactive/automatic installation</h4>
-<div class="paragraph"><p>By default, the installer is interactive. If you want to automate installation,
-then you can do so by passing various answers to the installer through command
-line options.</p></div>
-<div class="paragraph"><p>Please run the installer with <span class="monospaced">--help</span> for a list of available command line
-options.</p></div>
+<span class="anchor_helper" id="_step_4_loosen_permissions"></span><h4 class="float" data-anchor="_step_4_loosen_permissions">Step 4: loosen permissions</h4>
+<div class="paragraph"><p>If in step 1 you determined that your Ruby interpreter is installed in your home directory, then you need to make sure that the Phusion Passenger gem directory is accessible by your web server. To do that, you must ensure that the Phusion Passenger gem directory, as well as all parent directories, have the world-executable permission.</p></div>
+<div class="paragraph"><p>To find out where the Phusion Passenger gem directory is, run:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>passenger-config --root</pre>
+</div>
 </div>
+<div class="paragraph"><p>Suppose that the above command outputs <em>/home/phusion/.rvm/gems/ruby-1.9.3-p362/gems/passenger-x.x.x</em>. Then you <span class="monospaced">chmod o+x</span> the directory itself and all parent directories up until <em>/home/phusion</em>:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>chmod o+x /home/phusion/.rvm/gems/ruby-1.9.3-p362/gems/passenger-x.x.x
+chmod o+x /home/phusion/.rvm/gems/ruby-1.9.3-p362/gems
+chmod o+x /home/phusion/.rvm/gems/ruby-1.9.3-p362
+chmod o+x /home/phusion/.rvm/gems
+chmod o+x /home/phusion/.rvm
+chmod o+x /home/phusion</pre>
+</div>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_installing_phusion_passenger_for_nginx_manually" data-comment-topic="installing-phusion-passenger-for-nginx-manually-1qg1e2x">2.4. Installing Phusion Passenger for Nginx manually</h3>
-<div class="paragraph"><p>You can also install Phusion Passenger the way you install any other Nginx module.
-To do this, run Nginx’s configure script with <span class="monospaced">--add-module=/path-to-passenger-root/ext/nginx</span>.</p></div>
-<div class="paragraph"><p>If you installed Phusion Passenger via the gem, then <em>path-to-passenger-root</em>
-can be obtained with the command:</p></div>
+<span class="anchor_helper" id="run_passenger_installer"></span><h4 class="float" data-anchor="run_passenger_installer">Step 5: run the Phusion Passenger installer</h4>
+<div class="paragraph"><p>Nginx is a different from other web servers in that it does not support loadable modules. The only way to extend Nginx is to recompile it entirely from source. Since Phusion Passenger consists of some external executables plus an Nginx module, you must recompile Nginx when first installing Phusion Passenger, but also when upgrading Nginx itself or when upgrading the Phusion Passenger version.</p></div>
+<div class="paragraph"><p>Recompiling Nginx and the Phusion Passenger executables is what we will do in this step. The good news is that Phusion Passenger provides a tool to make this easy for you.</p></div>
+<div class="paragraph"><p>If you’ve already installed Nginx before, but without Phusion Passenger support, then you <strong>should</strong> uninstall it first. You don’t have to, because you can also install another Nginx with Phusion Passenger support, in parallel to the existing Nginx. We merely recommend uninstalling the existing in order to avoid user confusion, but the choice is yours.</p></div>
+<div class="paragraph"><p>If you had previously installed Nginx with Phusion Passenger support, and you are upgrading, then you don’t have to uninstall your existing Nginx first. Instead we’ll overwrite it this step. But it is important that you recompile Nginx with the configure parameters that you used last time.</p></div>
+<div class="paragraph"><p>Here’s how you can uninstall the original Nginx:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+If you installed the existing Nginx through APT, run: <span class="monospaced">sudo apt-get remove nginx nginx-full nginx-light nginx-naxsi nginx-common</span>
+</p>
+</li>
+<li>
+<p>
+If you installed the existing Nginx through YUM, run <span class="monospaced">yum remove nginx</span> as root.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>To proceed with installing or upgrading Phusion Passenger, run the Phusion Passenger Nginx installer and follow the on-screen instructions:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>passenger-config --root</pre>
+<pre>passenger-install-nginx-module</pre>
 </div>
 </div>
-<div class="paragraph"><p>This will probably output something along the lines of <em>/usr/lib/ruby/gems/1.8/gems/passenger-x.x.x</em>,
-so you’ll probably have to specify something like <span class="monospaced">--add-module=/usr/lib/ruby/gems/1.8/gems/passenger-x.x.x/ext/nginx</span>.</p></div>
-<div class="paragraph"><p>If you installed Phusion Passenger via a source tarball, then <em>path-to-passenger-root</em>
-is the directory which contains the Phusion Passenger source code. So if you
-extracted the Phusion Passenger source code to <em>/opt/passenger-x.x.x</em>, then you’ll
-have to specify <span class="monospaced">--add-module=/opt/passenger-x.x.x/ext/nginx</span>.</p></div>
-<div class="paragraph"><p>After having installed Nginx with Phusion Passenger support, you must paste the following
-line into your Nginx configuration file:</p></div>
+<div class="paragraph"><p>At some point it will ask you which prefix to install Nginx to. If you’re upgrading, then specify the same prefix that you used last time, as well as the same configuration parameters that you used last time.</p></div>
+<span class="anchor_helper" id="_step_6_restarting_the_flying_passenger_daemon"></span><h4 class="float" data-anchor="_step_6_restarting_the_flying_passenger_daemon">Step 6: Restarting the Flying Passenger daemon</h4>
+<div class="paragraph"><p>If you are using <a href="#flying_passenger">Flying Passenger</a> then you must restart the Flying Passenger daemon by sending it the SIGTERM signal:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>passenger_root /path-to-passenger-root;</pre>
+<pre>kill `cat /path-to/flying-passenger.pid`</pre>
 </div>
 </div>
-<div class="paragraph"><p>After having done so, restart Nginx.</p></div>
+<div class="paragraph"><p>Or, if Flying Passenger is not running with a PID file, look up its PID us <span class="monospaced">ps</span> and then send it SIGTERM:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>ps auxw | grep flying-passenger
+kill PID_OF_FLYING_PASSENGER</pre>
+</div>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_upgrading_or_downgrading_phusion_passenger_or_nginx_itself" data-comment-topic="upgrading-or-downgrading-phusion-passenger-or-nginx-itself-8dulxz">2.5. Upgrading or downgrading Phusion Passenger or Nginx itself</h3>
-<div class="paragraph"><p>Whether you’re upgrading/downgrading Phusion Passenger or Nginx itself (or perhaps both),
-Nginx will have to be recompiled and reinstalled. The procedure is exactly the same as
-a normal installation so just follow the instructions in section 2.3 or 2.4.</p></div>
-<div class="paragraph"><p>When following the installation instructions, eventually <span class="monospaced">passenger-install-nginx-module</span>
-or this document will instruct you to copy & paste some settings into the Nginx
-configuration file; something that looks along the lines of:</p></div>
+<span class="anchor_helper" id="verify_passenger_running"></span><h4 class="float" data-anchor="verify_passenger_running">Step 7: Verifying that Phusion Passenger is running</h4>
+<div class="paragraph"><p>Restart your web server and run:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>passenger_root ...;
-passenger_ruby ...;</pre>
+<pre>passenger-memory-stats</pre>
 </div>
 </div>
-<div class="paragraph"><p>Because you already had Phusion Passenger installed, you already had similar settings
-in your Nginx configuration file, just with different values. <strong>Replace</strong> the old settings with
-the new ones that you are instructed to paste. It is important that the old settings are
-removed, otherwise Phusion Passenger may malfunction.</p></div>
-<div class="paragraph"><p>When you’re done, restart Nginx.</p></div>
+<div class="paragraph"><p>You should see the web server processes as well as a number of Phusion Passenger processes (e.g. PassengerWatchdog, PassengerHelperAgent). Congratulations, Phusion Passenger is now installed and running!
+At this point you may be interested in <a href="#nginx_init_script">creating an Nginx init script</a>.</p></div>
+<div class="paragraph"><p>If the output is not as expected, then please refer to the <a href="#troubleshooting">Troubleshooting</a> section.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_unloading_disabling_phusion_passenger_from_nginx_without_uninstalling_it" data-comment-topic="unloading-disabling-phusion-passenger-from-nginx-without-uninstalling-it-v447e0">2.6. Unloading (disabling) Phusion Passenger from Nginx without uninstalling it</h3>
-<div class="paragraph"><p>You can temporarily unload (disable) Phusion Passenger from Nginx, without
-uninstalling the Phusion Passenger files, so that Nginx behaves as if Phusion
-Passenger was never installed in the first place. This might be useful to you if,
-for example, you seem to be experiencing a problem caused by Phusion Passenger,
-but you want to make sure whether that’s actually the case, without having
-to go through the hassle of uninstalling Phusion Passenger completely. When disabled,
-Phusion Passenger will not occupy any memory or CPU or otherwise interfere with
-Nginx.</p></div>
-<div class="paragraph"><p>To unload Phusion Passenger, edit your Nginx configuration file(s)
-and comment out all Phusion Passenger configuration directives.</p></div>
-<div class="paragraph"><p>For example, if your configuration file looks like this…</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="tarball_generic_install"></span><h3 data-comment-topic="generic-installation-upgrade-and-downgrade-method-via-tarball-2gkx43" data-anchor="tarball_generic_install">2.3. Generic installation, upgrade and downgrade method: via tarball</h3>
+<span class="anchor_helper" id="_step_1_download_and_extract_the_tarball"></span><h4 class="float" data-anchor="_step_1_download_and_extract_the_tarball">Step 1: download and extract the tarball</h4>
+<div class="paragraph"><p>Download the open source Phusion Passenger tarball from <a href="https://www.phusionpassenger.com/download#open_source">the Phusion Passenger website</a>. Older versions can be found on <a href="https://www.phusionpassenger.com/file_releases">the release archive</a>.</p></div>
+<div class="paragraph"><p>If you a <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> customer, download the Phusion Passenger Enterprise tarball from the <a href="https://www.phusionpassenger.com/orders">Customer Area</a>. Also be sure to download the <strong>license key</strong> and save it as <em>/etc/passenger-enterprise-license</em>.</p></div>
+<div class="paragraph"><p>Once you have downloaded the tarball, pick a location to extract it to. You can pick any location. A good location is <em>/opt/passenger</em>. Let’s call this location <span class="monospaced">$PREFIX</span>. Create this directory and extract the tarball as follows:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>...
-
-http {
-    passenger_root /somewhere/passenger-x.x.x;
-    passenger_ruby /usr/bin/ruby;
-    passenger_max_pool_size 10;
-
-    gzip on;
-
-    server {
-        server_name www.foo.com;
-        listen 80;
-        root /webapps/foo/public;
-        passenger_enabled on;
-        passenger_use_global_queue on;
-    }
-}</pre>
+<pre>mkdir $PREFIX
+cd $PREFIX
+tar xzvf /location-to/passenger-x.x.x.tar.gz
+cd $PREFIX/passenger-x.x.x</pre>
 </div>
 </div>
-<div class="paragraph"><p>…then comment out the relevant directives, so that it looks like this:</p></div>
+<div class="paragraph"><p>Note that <span class="monospaced">passenger-x.x.x</span> should be <span class="monospaced">passenger-enterprise-server-x.x.x</span> if you’re using Phusion Passenger Enterprise.</p></div>
+<span class="anchor_helper" id="_step_2_loosen_permissions"></span><h4 class="float" data-anchor="_step_2_loosen_permissions">Step 2: loosen permissions</h4>
+<div class="paragraph"><p>The Phusion Passenger directory must be accessible by the web server and by any web apps you want to run. To do that, you must ensure that the Phusion Passenger gem directory, as well as all parent directories, have the world-executable permission.</p></div>
+<div class="paragraph"><p>Suppose that the Phusion Passenger directory is <em>/opt/passenger/passenger-4.0.0</em>. Run <span class="monospaced">chmod o+x</span> on the directory itself and all parent directories.</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>...
-
-http {
-    # passenger_root /somewhere/passenger-x.x.x;
-    # passenger_ruby /usr/bin/ruby;
-    # passenger_max_pool_size 10;
-
-    gzip on;
-
-    server {
-        server_name www.foo.com;
-        listen 80;
-        root /webapps/foo/public;
-        # passenger_enabled on;
-        # passenger_use_global_queue on;
-    }
-}</pre>
+<pre>chmod o+x /opt/passenger/passenger-4.0.0
+chmod o+x /opt/passenger
+chmod o+x /opt</pre>
 </div>
 </div>
-<div class="paragraph"><p>After you’ve done this, save the file and restart Nginx.</p></div>
+<span class="anchor_helper" id="_step_3_installing_ruby_and_rake"></span><h4 class="float" data-anchor="_step_3_installing_ruby_and_rake">Step 3: installing Ruby and Rake</h4>
+<div class="paragraph"><p>Phusion Passenger supports multiple languages and its core is written in C++, but its installer and administration tools are written in Ruby, so you must install that.</p></div>
+<div class="paragraph"><p>Even though Ruby is required, Ruby will not be loaded during normal operation unless you deploy a Ruby web application on Phusion Passenger.</p></div>
+<div class="paragraph"><p>Run <span class="monospaced">ruby --version</span> and <span class="monospaced">rake --version</span> to find out whether both commands are already installed and recent enough. Phusion Passenger requires Ruby >= 1.8.6. Any Rake version will do.</p></div>
+<div class="paragraph">
+<div class="title">Debian 6</div>
+<p>We recommend you to use <a href="http://wiki.brightbox.co.uk/docs:phusion-passenger">the Brightbox Ruby packages</a>. They provide more up-to-date versions of Ruby than Debian’s official repositories provide. Their Ubuntu Lucid repository is compatible with Debian 6. If you do not want to use the Brightbox repository, then follow the instructions for Debian 5.</p>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_uninstalling_phusion_passenger" data-comment-topic="uninstalling-phusion-passenger-wuycvb">2.7. Uninstalling Phusion Passenger</h3>
-<div class="paragraph"><p>To uninstall Phusion Passenger, please first remove all Phusion Passenger
-configuration directives from your Nginx configuration file(s). After you’ve
-done this, you need to remove the Phusion Passenger files.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-If you installed Phusion Passenger via a gem, then type <span class="monospaced">gem uninstall passenger</span>.
-  You might have to run this as root.
-</p>
-</li>
-<li>
-<p>
-If you installed Phusion Passenger via a source tarball, then remove the directory
-  in which you placed the extracted Phusion Passenger files. This directory is the
-  same as the one pointed to the by <em>PassengerRoot</em> configuration directive.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>After having done so, recompile and reinstall Nginx itself, this time without
-Phusion Passenger support, in order to purge any Phusion Passenger code from the
-Nginx binary.</p></div>
+<div class="paragraph"><p>Create <em>/etc/apt/sources.list.d/brightbox-source.list</em>:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>deb  http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu  lucid main</pre>
+</div>
 </div>
+<div class="paragraph"><p>Install the Brightbox APT public key:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6</pre>
+</div>
 </div>
+<div class="paragraph"><p>Then install Ruby and Rake:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>sudo apt-get update
+sudo apt-get install ruby1.9.3
+sudo gem install rake</pre>
+</div>
 </div>
-<div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="deploying_a_ror_app" data-comment-topic="deploying-a-ruby-on-rails-1-x-or-2-x-but-not-rails-3-application-b69gqa">3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3) application</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Suppose you have a Ruby on Rails application in <em>/webapps/mycook</em>, and you own
-the domain <em>www.mycook.com</em>. You can either deploy your application to the
-virtual host’s root (i.e. the application will be accessible from the root URL,
-<em>http://www.mycook.com/</em>), or in a sub URI (i.e. the application will be
-accessible from a sub URL, such as <em>http://www.mycook.com/railsapplication</em>).</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<img src="./images/icons/note.png" alt="Note">
-</td>
-<td class="content">The default <span class="monospaced">RAILS_ENV</span> environment in which deployed Rails applications
-are run, is “production”. You can change this by changing the
-<a href="#RailsEnv">rails_env</a> configuration option.</td>
-</tr></table>
+<div class="paragraph">
+<div class="title">Debian 5</div>
+<p>Run:</p>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_deploying_to_a_virtual_host_8217_s_root" data-comment-topic="deploying-to-a-virtual-host-s-root-1mh24z5">3.1. Deploying to a virtual host’s root</h3>
-<div class="paragraph"><p>Add a <em>server</em> virtual host entry to your Nginx configuration file. The virtual
-host’s root must point to your Ruby on Rails application’s <em>public</em> folder.</p></div>
-<div class="paragraph"><p>Inside the <em>server</em> block, set <em>passenger_enabled on</em>.</p></div>
-<div class="paragraph"><p>For example:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>http {
-    ...
-
-    server {
-        listen 80;
-        server_name www.mycook.com;
-        root /webapps/mycook/public;
-        passenger_enabled on;
-    }
-
-    ...
-}</pre>
+<pre>sudo apt-get update
+sudo apt-get install ruby rake</pre>
 </div>
 </div>
-<div class="paragraph"><p>Then restart Nginx. The application has now been deployed.</p></div>
+<div class="paragraph"><p>Then <a href="#add_rubygems_bin_dir_to_path">add the RubyGems bin directory to your $PATH</a>.</p></div>
+<div class="paragraph">
+<div class="title">Ubuntu</div>
+<p>We recommend you to use <a href="http://wiki.brightbox.co.uk/docs:phusion-passenger">the Brightbox Ruby packages</a>. They provide more up-to-date versions of Ruby than Ubuntu’s official repositories provide.</p>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="deploying_rails_to_sub_uri" data-comment-topic="deploying-to-a-sub-uri-1il2qj7">3.2. Deploying to a sub URI</h3>
-<div class="paragraph"><p>Suppose that you already have a <em>server</em> virtual host entry:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>http {
-    ...
-
-    server {
-        listen 80;
-        server_name www.phusion.nl;
-        root /websites/phusion;
-    }
-
-    ...
-}</pre>
+<pre>sudo apt-add-repository ppa:brightbox/passenger
+sudo apt-get update</pre>
 </div>
 </div>
-<div class="paragraph"><p>And you want your Ruby on Rails application to be accessible from the URL
-<em>http://www.phusion.nl/rails</em>.</p></div>
-<div class="paragraph"><p>To do this, make a symlink in the virtual host’s document root, and have it
-point to your Ruby on Rails application’s <em>public</em> folder. For example:</p></div>
+<div class="paragraph"><p>If you’re on the older Ubuntu 8.04 Hardy release, the <span class="monospaced">apt-add-repository</span> command isn’t available so you have to install the repository and the key by hand:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>ln -s /webapps/mycook/public /websites/phusion/rails</pre>
+<pre>sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger.list'
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
+sudo apt-get update</pre>
 </div>
 </div>
-<div class="paragraph"><p>Next, set <em>passenger_enabled on</em> and add a <a href="#PassengerBaseURI">passenger_base_uri</a>
-option to the <em>server</em> block:</p></div>
+<div class="paragraph">
+<div class="title">Other operating systems</div>
+<p>Please install Ruby from <a href="http://www.ruby-lang.org/">the Ruby website</a>. Once Ruby is installed, run the following command (<a href="#is_ruby_home_or_system_wide_installed">possibly as root</a>) to install Rake:</p>
+</div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>http {
-    ...
-
-    server {
-        listen 80;
-        server_name www.phusion.nl;
-        root /websites/phusion;
-        passenger_enabled on;        # <--- These lines have
-        passenger_base_uri /rails;   # <--- been added.
-    }
-
-    ...
-}</pre>
+<pre>gem install rake</pre>
 </div>
 </div>
-<div class="paragraph"><p>Then restart Nginx. The application has now been deployed.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<img src="./images/icons/tip.png" alt="Tip">
-</td>
-<td class="content">
-<div class="paragraph"><p>You can deploy multiple Rails applications under a virtual host, by specifying
-<a href="#PassengerBaseURI">passenger_base_uri</a> multiple times. For example:</p></div>
+<span class="anchor_helper" id="_step_4_figuring_out_whether_your_ruby_is_installed_the_home_directory_or_system_wide"></span><h4 class="float" data-anchor="_step_4_figuring_out_whether_your_ruby_is_installed_the_home_directory_or_system_wide">Step 4: figuring out whether your Ruby is installed the home directory or system-wide</h4>
+<div class="paragraph"><p>Depending on whether you installed Ruby system-wide, you need to enter a root prompt before continuing to step 5. Please refer to <a href="#is_ruby_home_or_system_wide_installed">this section</a>.</p></div>
+<span class="anchor_helper" id="_step_5_run_the_phusion_passenger_installer"></span><h4 class="float" data-anchor="_step_5_run_the_phusion_passenger_installer">Step 5: run the Phusion Passenger installer</h4>
+<div class="paragraph"><p>Please refer to <a href="#run_passenger_installer">this section</a>.
+Note that the <span class="monospaced">passenger-install-nginx-module</span> command is inside the <em>bin</em> subdirectory of the Phusion Passenger source directory, so you would have to run something like <em>/opt/passenger/passenger-x.x.x/bin/passenger-install-nginx-module</em>.</p></div>
+<span class="anchor_helper" id="_step_6_restarting_the_flying_passenger_daemon_2"></span><h4 class="float" data-anchor="_step_6_restarting_the_flying_passenger_daemon_2">Step 6: Restarting the Flying Passenger daemon</h4>
+<div class="paragraph"><p>If you are using <a href="#flying_passenger">Flying Passenger</a> then you must restart the Flying Passenger daemon by sending it the SIGTERM signal:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>server {
-    ...
-    passenger_base_uri /app1;
-    passenger_base_uri /app2;
-    passenger_base_uri /app3;
-}</pre>
+<pre>kill `cat /path-to/flying-passenger.pid`</pre>
 </div>
 </div>
-</td>
-</tr></table>
+<div class="paragraph"><p>Or, if Flying Passenger is not running with a PID file, look up its PID us <span class="monospaced">ps</span> and then send it SIGTERM:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>ps auxw | grep flying-passenger
+kill PID_OF_FLYING_PASSENGER</pre>
+</div>
 </div>
+<span class="anchor_helper" id="_step_7_verifying_that_phusion_passenger_is_running"></span><h4 class="float" data-anchor="_step_7_verifying_that_phusion_passenger_is_running">Step 7: Verifying that Phusion Passenger is running</h4>
+<div class="paragraph"><p>Please refer to <a href="#verify_passenger_running">this section</a>. Note that all Phusion Passenger administration scripts are located inside the <em>bin</em> subdirectory of the Phusion Passenger source directory, so you would have to run something like <em>/opt/passenger/passenger-x.x.x/bin/passenger-memory-stats</em>.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_redeploying_restarting_the_ruby_on_rails_application" data-comment-topic="redeploying-restarting-the-ruby-on-rails-application--1eso761">3.3. Redeploying (restarting the Ruby on Rails application)</h3>
-<div class="paragraph"><p>Deploying a new version of a Ruby on Rails application is as simple as
-re-uploading the application files, and restarting the application.</p></div>
-<div class="paragraph"><p>There are two ways to restart the application:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-By restarting Nginx.
-</p>
-</li>
-<li>
-<p>
-By creating or modifying the file <em>tmp/restart.txt</em> in the Rails
-   application’s <a href="#application_root">root folder</a>. Phusion Passenger will
-   automatically restart the application during the next request.
-</p>
-</li>
-</ol></div>
-<div class="paragraph"><p>For example, to restart our example MyCook application, we type this in the
-command line:</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="install_on_debian_ubuntu"></span><h3 data-comment-topic="installing-or-upgrading-on-ubuntu-fw5fvp" data-anchor="install_on_debian_ubuntu">2.4. Installing or upgrading on Debian 6 or Ubuntu</h3>
+<div class="paragraph"><p>John Leach from Brightbox has kindly provided Ubuntu packages for Phusion Passenger. The Ubuntu Lucid packages are compatible with Debian 6. The packages are available from the <a href="http://wiki.brightbox.co.uk/docs:phusion-passenger">Brightbox repository</a>. Only packages for the open source version of Phusion Passenger are provided. <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> customers should use the <a href="#rub [...]
+<div class="paragraph"><p>If you use these packages to install Phusion Passenger then you do not need to run <span class="monospaced">passenger-install-apache2-module</span> or <span class="monospaced">passenger-install-nginx-module</span>. These packages contain all the binaries that you need.</p></div>
+<div class="paragraph">
+<div class="title">Apache</div>
+<p>On Ubuntu versions newer than 8.04 Hardy, register the Brightbox Apache PPA as follows:</p>
+</div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>touch /webapps/mycook/tmp/restart.txt</pre>
+<pre>sudo apt-add-repository ppa:brightbox/passenger-experimental
+sudo apt-get update</pre>
 </div>
 </div>
-<div class="paragraph"><p>Please note that, unlike earlier versions of Phusion Passenger, <em>restart.txt</em>
-is not automatically deleted. Phusion Passenger checks whether the timestamp
-of this file has changed in order to determine whether the application should
-be restarted.</p></div>
+<div class="paragraph"><p>On Ubuntu 8.04 Hardy and on Debian, the <span class="monospaced">apt-add-repository</span> command isn’t available so you have to install the repository and the key by hand.</p></div>
+<div class="paragraph"><p>Debian 6:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu lucid main" > /etc/apt/sources.list.d/brightbox-passenger.list'
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
+sudo apt-get update</pre>
+</div>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_migrations" data-comment-topic="migrations-9yyb8w">3.4. Migrations</h3>
-<div class="paragraph"><p>Phusion Passenger is not related to Ruby on Rails migrations in any way. To
-run migrations on your deployment server, please login to your deployment
-server (e.g. with <em>ssh</em>) and type <span class="monospaced">rake db:migrate RAILS_ENV=production</span> in
-a shell console, just like one would normally run migrations.</p></div>
+<div class="paragraph"><p>Ubuntu 8.04 Hardy:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger.list'
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
+sudo apt-get update</pre>
+</div>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_capistrano_integration" data-comment-topic="capistrano-integration-1ktunm6">3.5. Capistrano integration</h3>
-<div class="paragraph"><p>See <a href="#capistrano">Capistrano recipe</a>.</p></div>
+<div class="paragraph"><p>You can proceed with installing Phusion Passenger by running:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>sudo apt-get install libapache2-mod-passenger</pre>
+</div>
 </div>
+<div class="paragraph"><p>The Apache package provides configuration snippets for you, so you don’t need to modify any Apache configuration to get it to load Phusion Passenger.</p></div>
+<div class="paragraph">
+<div class="title">Nginx</div>
+<p>On Ubuntu versions newer than 8.04 Hardy, register the Brightbox Apache PPA as follows:</p>
 </div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>sudo apt-add-repository ppa:brightbox/passenger-experimental
+sudo apt-get update</pre>
+</div>
 </div>
-<div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="deploying_a_rack_app" data-comment-topic="deploying-a-rack-based-ruby-application-including-rails-3--12benx3">4. Deploying a Rack-based Ruby application (including Rails >= 3)</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Phusion Passenger supports arbitrary Ruby web applications that follow the
-<a href="http://rack.rubyforge.org/">Rack</a> interface.</p></div>
-<div class="paragraph"><p>Phusion Passenger assumes that Rack application directories have a certain layout.
-Suppose that you have a Rack application in <em>/webapps/rackapp</em>. Then that
-folder must contain at least three entries:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<em>config.ru</em>, a Rackup file for starting the Rack application. This file must contain
-  the complete logic for initializing the application.
-</p>
-</li>
-<li>
-<p>
-<em>public/</em>, a folder containing public static web assets, like images and stylesheets.
-</p>
-</li>
-<li>
-<p>
-<em>tmp/</em>, used for <em>restart.txt</em> (our application restart mechanism). This will
-  be explained in a following subsection.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>So <em>/webapps/rackapp</em> must, at minimum, look like this:</p></div>
+<div class="paragraph"><p>On Ubuntu 8.04 Hardy and on Debian, the <span class="monospaced">apt-add-repository</span> command isn’t available so you have to install the repository and the key by hand.</p></div>
+<div class="paragraph"><p>Debian 6:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>/webapps/rackapp
-  |
-  +-- config.ru
-  |
-  +-- public/
-  |
-  +-- tmp/</pre>
+<pre>sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu lucid main" > /etc/apt/sources.list.d/brightbox-passenger-nginx.list'
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
+sudo apt-get update</pre>
 </div>
 </div>
-<div class="paragraph"><p>Suppose you own the domain <em>www.rackapp.com</em>. You can either deploy your application
-to the virtual host’s root (i.e. the application will be accessible from the root URL,
-<em>http://www.rackapp.com/</em>), or in a sub URI (i.e. the application will be
-accessible from a sub URL, such as <em>http://www.rackapp.com/rackapp</em>).</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<img src="./images/icons/note.png" alt="Note">
-</td>
-<td class="content">The default <span class="monospaced">RACK_ENV</span> environment in which deployed Rack applications
-are run, is “production”. You can change this by changing the
-<a href="#RackEnv">rack_env</a> configuration option.</td>
-</tr></table>
+<div class="paragraph"><p>Ubuntu 8.04 Hardy:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger-nginx.list'
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
+sudo apt-get update</pre>
+</div>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_tutorial_example_writing_and_deploying_a_hello_world_rack_application" data-comment-topic="tutorial-example-writing-and-deploying-a-hello-world-rack-application-1wstx99">4.1. Tutorial/example: writing and deploying a Hello World Rack application</h3>
-<div class="paragraph"><p>First we create a Phusion Passenger-compliant Rack directory structure:</p></div>
+<div class="paragraph"><p>Then:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>$ mkdir /webapps/rack_example
-$ mkdir /webapps/rack_example/public
-$ mkdir /webapps/rack_example/tmp</pre>
+<pre>sudo apt-get install nginx-full</pre>
 </div>
 </div>
-<div class="paragraph"><p>Next, we write a minimal "hello world" Rack application:</p></div>
+<div class="paragraph"><p>You’ll then need to enable the Phusion Passenger module in Nginx by creating the following configuration file:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>$ cd /webapps/rack_example
-$ some_awesome_editor config.ru
-...type in some source code...
-$ cat config.ru
-app = proc do |env|
-    [200, { "Content-Type" => "text/html" }, ["hello <b>world</b>"]]
-end
-run app</pre>
+<pre>sudo sh -c 'echo "passenger_root /usr/lib/phusion-passenger;" > /etc/nginx/conf.d/passenger.conf'</pre>
 </div>
 </div>
-<div class="paragraph"><p>Finally, we deploy it by adding the following configuration options to
-the Nginx configuration file:</p></div>
+<div class="paragraph"><p>Then restart Nginx to apply the changes:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>http {
-    ...
-    server {
-        listen 80;
-        server_name www.rackexample.com;
-        root /webapps/rack_example/public;
-        passenger_enabled on;
-    }
-    ...
-}</pre>
+<pre>sudo /etc/init.d/nginx restart</pre>
 </div>
 </div>
-<div class="paragraph"><p>And we’re done! After an Nginx restart, the above Rack application will be available
-under the URL <em>http://www.rackexample.com/</em>.</p></div>
+<div class="paragraph">
+<div class="title">Standalone</div>
+<p>Unfortunately, no packages are provided for Phusion Passenger Standalone.</p>
+</div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_deploying_to_a_virtual_host_8217_s_root_2" data-comment-topic="deploying-to-a-virtual-host-s-root-f02erj">4.2. Deploying to a virtual host’s root</h3>
-<div class="paragraph"><p>Add a <em>server</em> virtual host entry to your Nginx configuration file. The virtual host’s
-root must point to your Rack application’s <em>public</em> folder. You must also set
-<em>passenger_enabled on</em> in the <em>server</em> block.</p></div>
-<div class="paragraph"><p>For example:</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installing_or_upgrading_on_red_hat_fedora_centos_or_scientificlinux"></span><h3 data-comment-topic="installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-1uus5a1" data-anchor="_installing_or_upgrading_on_red_hat_fedora_centos_or_scientificlinux">2.5. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux</h3>
+<div class="paragraph"><p>YUM repositories with RPMs are maintained by <a href="https://github.com/erikogan/passenger">Erik Ogan</a> and <a href="http://stealthymonkeys.com/">Stealthy Monkeys Consulting</a>. Only packages for the open source version of Phusion Passenger are provided. <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> customers should use the <a href="#rubygems_generic_install">generic RubyGems installation method</a> or <a href="#tarba [...]
+<div class="paragraph"><p>If you use YUM to install Phusion Passenger then you do not need to run <span class="monospaced">passenger-install-apache2-module</span> or <span class="monospaced">passenger-install-nginx-module</span>. The YUM packages contain all the binaries that you need. You also don’t need to modify any Apache or Nginx configuration to get them to load Phusion Passenger, the packages provide configuration snippets for you as well.</p></div>
+<span class="anchor_helper" id="_step_1_import_the_stealthy_monkeys_consulting_8217_s_gpg_key"></span><h4 class="float" data-anchor="_step_1_import_the_stealthy_monkeys_consulting_8217_s_gpg_key">Step 1: Import the Stealthy Monkeys Consulting’s GPG key</h4>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>http {
-    ...
-    server {
-        listen 80;
-        server_name www.rackapp.com;
-        root /webapps/rackapp/public;
-        passenger_enabled on;
-    }
-    ...
-}</pre>
+<pre>rpm --import http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc</pre>
 </div>
 </div>
-<div class="paragraph"><p>Then restart Nginx. The application has now been deployed.</p></div>
+<span class="anchor_helper" id="_step_2_install_the_release_package"></span><h4 class="float" data-anchor="_step_2_install_the_release_package">Step 2: Install the release package</h4>
+<div class="paragraph"><p>Install the passenger-release package from the <a href="http://passenger.stealthymonkeys.com/">main repository</a>.</p></div>
+<div class="paragraph"><p>Fedora Core 17:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>yum install http://passenger.stealthymonkeys.com/fedora/17/passenger-release.noarch.rpm</pre>
+</div>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="deploying_rack_to_sub_uri" data-comment-topic="deploying-to-a-sub-uri-37q0ou">4.3. Deploying to a sub URI</h3>
-<div class="paragraph"><p>Suppose that you already have a virtual host:</p></div>
+<div class="paragraph"><p>Fedora Core 16:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>http {
-    ...
-
-    server {
-        listen 80;
-        server_name www.phusion.nl;
-        root /websites/phusion;
-        passenger_enabled on;
-    }
-
-    ...
-}</pre>
+<pre>yum install http://passenger.stealthymonkeys.com/fedora/16/passenger-release.noarch.rpm</pre>
 </div>
 </div>
-<div class="paragraph"><p>And you want your Rack application to be accessible from the URL
-<em>http://www.phusion.nl/rack</em>.</p></div>
-<div class="paragraph"><p>To do this, make a symlink in the virtual host’s document root, and have it
-point to your Rack application’s <em>public</em> folder. For example:</p></div>
+<div class="paragraph"><p>Fedora Core 15:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>ln -s /webapps/rackapp/public /websites/phusion/rack</pre>
+<pre>yum install http://passenger.stealthymonkeys.com/fedora/15/passenger-release.noarch.rpm</pre>
 </div>
 </div>
-<div class="paragraph"><p>Next, set <em>passenger_enabled on</em> and add a <a href="#PassengerBaseURI">passenger_base_uri</a>
-option to the <em>server</em> block:</p></div>
+<div class="paragraph"><p>Fedora Core 14:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>http {
-    ...
-
-    server {
-        listen 80;
-        server_name www.phusion.nl;
-        root /websites/phusion;
-        passenger_enabled on;        # <--- These lines have
-        passenger_base_uri /rack;    # <--- been added.
-    }
-
-    ...
-}</pre>
+<pre>yum install http://passenger.stealthymonkeys.com/fedora/14/passenger-release.noarch.rpm</pre>
 </div>
 </div>
-<div class="paragraph"><p>Then restart Nginx. The application has now been deployed.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<img src="./images/icons/tip.png" alt="Tip">
-</td>
-<td class="content">
-<div class="paragraph"><p>You can deploy multiple Rack applications under a virtual host, by specifying
-<a href="#PassengerBaseURI">passenger_base_uri</a> multiple times. For example:</p></div>
+<div class="paragraph"><p>RHEL 6 / CentOS 6 / ScientificLinux 6: (Note: these packages depend on <a href="http://fedoraproject.org/wiki/EPEL">EPEL</a>.)</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>server {
-    ...
-    passenger_base_uri /app1;
-    passenger_base_uri /app2;
-    passenger_base_uri /app3;
-}</pre>
+<pre>yum install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm</pre>
 </div>
 </div>
-</td>
-</tr></table>
+<div class="paragraph"><p>RHEL 5 / CentOS 5 / ScientificLinux 5: (Note: these packages depend on <a href="http://fedoraproject.org/wiki/EPEL">EPEL</a>.)</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm</pre>
+</div>
+</div>
+<span class="anchor_helper" id="_step_3_install_the_right_phusion_passenger_package"></span><h4 class="float" data-anchor="_step_3_install_the_right_phusion_passenger_package">Step 3: Install the right Phusion Passenger package</h4>
+<div class="paragraph"><p>From there you can use <a href="http://prefetch.net/articles/yum.html">YUM</a> to install packages. For example, try one of these:</p></div>
+<div class="paragraph"><p>Phusion Passenger for Apache:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>yum install mod_passenger</pre>
+</div>
+</div>
+<div class="paragraph"><p>Phusion Passenger for Nginx:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>yum install nginx-passenger</pre>
+</div>
+</div>
+<div class="paragraph"><p>Phusion Passenger Standalone:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>yum install passenger-standalone</pre>
+</div>
 </div>
+<span class="anchor_helper" id="_building_your_own_packages"></span><h4 class="float" data-anchor="_building_your_own_packages">Building your own packages</h4>
+<div class="paragraph"><p>There are instructions for building your own packages and Yum repositories in the <a href="https://github.com/FooBarWidget/passenger/tree/master/rpm#readme">rpm directory ReadMe</a> within the <a href="https://github.com/FooBarWidget/passenger">GitHub repository</a>.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_redeploying_restarting_the_rack_application" data-comment-topic="redeploying-restarting-the-rack-application--xnbfam">4.4. Redeploying (restarting the Rack application)</h3>
-<div class="paragraph"><p>Deploying a new version of a Rack application is as simple as
-re-uploading the application files, and restarting the application.</p></div>
-<div class="paragraph"><p>There are two ways to restart the application:</p></div>
-<div class="olist arabic"><ol class="arabic">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_upgrading_from_open_source_to_enterprise"></span><h3 data-comment-topic="upgrading-from-open-source-to-enterprise-1a58c2b" data-anchor="_upgrading_from_open_source_to_enterprise">2.6. Upgrading from open source to Enterprise</h3>
+<div class="paragraph"><p>Phusion Passenger comes in two variants: an open source version, as well as an <a href="https://www.phusionpassenger.com/enterprise">Enterprise version</a> which introduces a myriad of useful features that can improve stability and performance and efficiency.</p></div>
+<div class="paragraph"><p>Customers who have bought Phusion Passenger Enterprise can upgrade their open source installation to Enterprise as follows:</p></div>
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
-By restarting Nginx.
+<a href="#uninstalling">Uninstall the open source Phusion Passenger</a>.
 </p>
 </li>
 <li>
 <p>
-By creating or modifying the file <em>tmp/restart.txt</em> in the Rack
-   application’s <a href="#application_root">root folder</a>. Phusion Passenger will
-   automatically restart the application.
+Install the Enterprise version by following one of the installation guides in this section (e.g. <a href="#rubygems_generic_install">RubyGems generic installation</a> or <a href="#tarball_generic_install">tarball generic installation</a>).
 </p>
 </li>
 </ol></div>
-<div class="paragraph"><p>For example, to restart our example application, we type this in the
-command line:</p></div>
+<div class="paragraph"><p>The uninstallation is necessary because the Enterprise Ruby gem has a different gem name (<em>passenger-enterprise-server</em> instead of <em>passenger</em>), but the same administration command names (e.g. <span class="monospaced">passenger-status</span>). Uninstalling the open source version avoids any conflicts.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_cryptographic_verification_of_installation_files"></span><h3 data-comment-topic="cryptographic-verification-of-installation-files-2goray" data-anchor="_cryptographic_verification_of_installation_files">2.7. Cryptographic verification of installation files</h3>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_synopsis_2"></span><h4 data-comment-topic="synopsis-4fv6zw" data-anchor="_synopsis_2">2.7.1. Synopsis</h4>
+<div class="paragraph"><p>We digitally sign various files with our GPG key so that you can check whether they’re legit, i.e. whether they really came from Phusion and haven’t been tampered with by a third party. We apply signing since the open source version 4.0.0 RC 4, or the Enterprise version 4.0.0 RC 1.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_importing_the_phusion_software_signing_key"></span><h4 data-comment-topic="importing-the-phusion-software-signing-key-1qfpaj4" data-anchor="_importing_the_phusion_software_signing_key">2.7.2. Importing the Phusion Software Signing key</h4>
+<div class="paragraph"><p>Phusion’s GPG key for signing software is as follows:</p></div>
+<div class="literalblock">
+<div class="content monospaced">
+<pre>Phusion Software Signing (software-signing at phusion.nl)
+Short key ID: 0x0A212A8C
+Long key ID: 0x2AC745A50A212A8C
+Fingerprint: D5F0 8514 2693 9232 F437  AB72 2AC7 45A5 0A21 2A8C</pre>
+</div>
+</div>
+<div class="paragraph"><p>This key is stored at <a href="http://www.phusion.nl/about/gpg">the Phusion website</a> and at the key servers <a href="http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x2AC745A50A212A8C">sks-keyservers.net</a> and <a href="http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2AC745A50A212A8C">keyserver.ubuntu.com</a>. You can import it to your keyring with one of these command:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>touch /webapps/rackapp/tmp/restart.txt</pre>
+<pre>gpg --keyserver pool.sks-keyservers.net --search-keys 0x2AC745A50A212A8C
+# -OR-
+gpg --keyserver keyserver.ubuntu.com --search-keys 0x2AC745A50A212A8C</pre>
 </div>
 </div>
+<div class="paragraph"><p>The Phusion Software Signing key is only used for signing software. It’s never used for signing emails or for encrypting files, so please be suspicious if you encounter usage of this key outside the context of signing software, and alert us at <a href="mailto:support at phusion.nl">support at phusion.nl</a>. Include "notspam" in the message to bypass our spam filter.</p></div>
+<div class="paragraph"><p>The email address <a href="mailto:software-signing at phusion.nl">software-signing at phusion.nl</a> redirects to <a href="mailto:info at phusion.nl">info at phusion.nl</a> so it’s safe to send email there.</p></div>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_rackup_specifications_for_various_web_frameworks" data-comment-topic="rackup-specifications-for-various-web-frameworks-1a2cs41">4.5. Rackup specifications for various web frameworks</h3>
-<div class="paragraph"><p>This subsection shows example <em>config.ru</em> files for various web frameworks.</p></div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_camping" data-comment-topic="camping-16vz2yb">4.5.1. Camping</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_the_phusion_software_signing_key"></span><h4 data-comment-topic="verifying-the-phusion-software-signing-key-i7f1vj" data-anchor="_verifying_the_phusion_software_signing_key">2.7.3. Verifying the Phusion Software Signing key</h4>
+<div class="paragraph"><p>The Phusion Software Signing key is also <strong>signed by the Phusion founders</strong>. Their keys are as follows:</p></div>
+<div class="literalblock">
+<div class="content monospaced">
+<pre>Hongli Lai (hongli at phusion.nl)
+Short key ID: 4B6F4332
+Long key ID: 06A131094B6F4332
+Fingerprint: 64E8 0420 FC6A 499F 9E1F  81FA 06A1 3109 4B6F 4332</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content monospaced">
+<pre>Ninh Bui (ninh at phusion.nl)
+Short key ID: 6FAF3782
+Long key ID: BA8DA3F46FAF3782
+Fingerprint: 353A 398C 49AF 5CD5 74A0  656C BA8D A3F4 6FAF 3782</pre>
+</div>
+</div>
+<div class="paragraph"><p>Both keys are stored at both sks-servers.net and keyserver.ubuntu.com. Import them with:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>require 'rubygems'
-require 'rack'
-require 'camping'
-
-##### Begin Camping application
-Camping.goes :Blog
-
-...your application code here...
-##### End Camping application
-
-run Rack::Adapter::Camping.new(Blog)</pre>
+<pre>gpg --keyserver pool.sks-servers.net --search-keys 0x06A131094B6F4332
+gpg --keyserver pool.sks-servers.net --search-keys 0xBA8DA3F46FAF3782
+# -OR-
+gpg --keyserver keyserver.ubuntu.com --search-keys 0x06A131094B6F4332
+gpg --keyserver keyserver.ubuntu.com --search-keys 0xBA8DA3F46FAF3782</pre>
 </div>
 </div>
-<div class="paragraph"><p>For Camping versions 2.0 and up, using <span class="monospaced">run Blog</span> as the final line will do.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_halcyon" data-comment-topic="halcyon-1benlfl">4.5.2. Halcyon</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_the_gem_and_tarball"></span><h4 data-comment-topic="verifying-the-gem-and-tarball-dr9466" data-anchor="_verifying_the_gem_and_tarball">2.7.4. Verifying the gem and tarball</h4>
+<div class="paragraph"><p>You can find the open source version’s gem and tarball GPG signatures at <a href="https://www.phusionpassenger.com/signatures/">https://www.phusionpassenger.com/signatures/</a>. The Enterprise version’s GPG signatures can be found in the <a href="https://www.phusionpassenger.com/orders">Customer Area</a>. All signatures have the <em>.asc</em> extension. Once you have imported our key, you can verify the validity of a file against its signature as follows:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>require 'rubygems'
-require 'halcyon'
-$LOAD_PATH.unshift(Halcyon.root / 'lib')
-Halcyon::Runner.load_config Halcyon.root/'config'/'config.yml'
-run Halcyon::Runner.new</pre>
+<pre>$ gpg --verify passenger-x.x.x.tar.gz.asc passenger-x.x.x.tar.gz
+gpg: Signature made Mon Mar 11 09:45:46 2013 CET using RSA key ID 0A212A8C
+gpg: Good signature from "Phusion Software Signing <software-signing at phusion.nl>"</pre>
 </div>
 </div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_mack" data-comment-topic="mack-1ezijq6">4.5.3. Mack</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_git_signatures"></span><h4 data-comment-topic="verifying-git-signatures-dyo4fk" data-anchor="_verifying_git_signatures">2.7.5. Verifying Git signatures</h4>
+<div class="paragraph"><p>Tags in the <a href="https://github.com/FooBarWidget/passenger">Git repository for the open source version</a> are also tagged. You can verify a Git tag as follows:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>ENV["MACK_ENV"] = ENV["RACK_ENV"]
-load("Rakefile")
-require 'rubygems'
-require 'mack'
-run Mack::Utils::Server.build_app</pre>
+<pre>$ git tag --verify release-x.x.x
+object d886f34b5705e4314feccaf0d77b9a38416e15e0
+type commit
+tag release-4.0.0.rc5
+tagger Hongli Lai (Phusion) <hongli at phusion.nl> 1362993117 +0100
+
+This is a tag message.
+gpg: Signature made Mon Mar 11 10:12:02 2013 CET using RSA key ID 0A212A8C
+gpg: Good signature from "Phusion Software Signing <software-signing at phusion.nl>"</pre>
 </div>
 </div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_merb" data-comment-topic="merb-ddsh55">4.5.4. Merb</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_deb_and_rpm_packages"></span><h4 data-comment-topic="verifying-deb-and-rpm-packages-1ed36d5" data-anchor="_verifying_deb_and_rpm_packages">2.7.6. Verifying DEB and RPM packages</h4>
+<div class="paragraph"><p>The DEB and RPM packages are signed with the signatures of the respective packagers. Phusion does not provide signatures for them.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_revocation"></span><h4 data-comment-topic="revocation-xwvhea" data-anchor="_revocation">2.7.7. Revocation</h4>
+<div class="paragraph"><p>In the event our key is compromised, we will revoke the key and upload the revocation information to sks-servers.net and keyserver.ubuntu.com. However your system will not know about the revocation until you update the keys from the keyservers. You should update your keys regularly (e.g. once a week) by invoking:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>require 'rubygems'
-require 'merb-core'
-
-Merb::Config.setup(
-  :merb_root   => ::File.expand_path(::File.dirname(__FILE__)),
-  :environment => ENV['RACK_ENV']
-)
-Merb.environment = Merb::Config[:environment]
-Merb.root = Merb::Config[:merb_root]
-Merb::BootLoader.run
-
-run Merb::Rack::Application.new</pre>
+<pre>gpg --refresh-keys --keyserver pool.sks-servers.net
+# -OR-
+gpg --refresh-keys --keyserver keyserver.ubuntu.com</pre>
 </div>
 </div>
 </div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_ramaze" data-comment-topic="ramaze-1p2zod">4.5.5. Ramaze</h4>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>require "rubygems"
-require "ramaze"
-Ramaze.trait[:essentials].delete Ramaze::Adapter
-require "start"
-Ramaze.start!
-run Ramaze::Adapter::Base</pre>
-</div>
 </div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_non_interactive_automatic_headless_installs_or_upgrades"></span><h3 data-comment-topic="non-interactive-automatic-headless-installs-or-upgrades-834ymv" data-anchor="_non_interactive_automatic_headless_installs_or_upgrades">2.8. Non-interactive, automatic, headless installs or upgrades</h3>
+<div class="paragraph"><p>By default, the installer (<span class="monospaced">passenger-install-nginx-module</span>) is interactive. If you want to automate installation then you can do so by passing various answers to the installer through command line options. Please run the installer with <span class="monospaced">--help</span> for a list of available command line options.</p></div>
 </div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_customizing_the_compilation_process"></span><h3 data-comment-topic="customizing-the-compilation-process-u4cdcf" data-anchor="_customizing_the_compilation_process">2.9. Customizing the compilation process</h3>
+<div class="paragraph"><p>The Phusion Passenger compilation process can be customized with environment variables. You can learn more about environment variables in <a href="#about_environment_variables">About environment variables</a>.</p></div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_sinatra" data-comment-topic="sinatra-a7u9ag">4.5.6. Sinatra</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_setting_the_compiler"></span><h4 data-comment-topic="setting-the-compiler-1l6dpe1" data-anchor="_setting_the_compiler">2.9.1. Setting the compiler</h4>
+<div class="paragraph"><p>You can force the Phusion Passenger build system to use a specific C or C++ compiler by setting the <span class="monospaced">CC</span> and <span class="monospaced">CXX</span> environment variables. These may be set to any arbitrary shell commands.</p></div>
+<div class="paragraph"><p>For example, contributors who want to hack on Phusion Passenger may want to use Clang for faster compilation and <a href="http://ccache.samba.org/">ccache</a> for faster recompilation, and may want to enable more error-catching compilation flags:</p></div>
 <div class="listingblock">
-<div class="content monospaced">
-<pre>require 'rubygems'
-require 'sinatra'
-require 'app.rb'
-
-run Sinatra::Application</pre>
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">CC</span><span style="color: #990000">=</span><span style="color: #FF0000">'ccache clang -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'</span>
+<span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">CXX</span><span style="color: #990000">=</span><span style="color: #FF0000">'ccache clang++ -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'</span></tt></pre>
 </div>
 </div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">If you run the installer with <span class="monospaced">sudo</span> then environment variables may not be passed properly. Learn more at <a href="#env_vars_and_sudo">Environment variables and sudo</a>.</td>
+</tr></table>
 </div>
 </div>
-</div>
-</div>
-<div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_configuring_phusion_passenger" data-comment-topic="configuring-phusion-passenger-1g1svey">5. Configuring Phusion Passenger</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>After installation, Phusion Passenger does not need any further configurations.
-Nevertheless, the system administrator may be interested in changing
-Phusion Passenger’s behavior. Phusion Passenger supports the following configuration
-options in the Nginx configuration file:</p></div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_passenger_root_lt_directory_gt" data-comment-topic="passenger-root-directory--bqvhhz">5.1. passenger_root <directory></h3>
-<div class="paragraph"><p>The location to the Phusion Passenger root directory. This configuration option
-is essential to Phusion Passenger, and allows Phusion Passenger to locate its own
-data files. The correct value is given by the installer.</p></div>
-<div class="paragraph"><p>If you’ve moved Phusion Passenger to a different directory then you need to update
-this option as well. Please read
-<a href="#moving_phusion_passenger">Moving Phusion Passenger to a different directory</a> for more information.</p></div>
-<div class="paragraph"><p>This required option may only occur once, in the <em>http</em> configuration block.</p></div>
-</div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_passenger_ruby_lt_filename_gt" data-comment-topic="passenger-ruby-filename--1gnok5k">5.2. passenger_ruby <filename></h3>
-<div class="paragraph"><p>This option allows one to specify the Ruby interpreter to use.</p></div>
-<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
-The default is <em>ruby</em>.</p></div>
-</div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerSpawnMethod" data-comment-topic="passenger-spawn-method-string--1sc6njl">5.3. passenger_spawn_method <string></h3>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_adding_additional_compiler_or_linker_flags"></span><h4 data-comment-topic="adding-additional-compiler-or-linker-flags-1jehjon" data-anchor="_adding_additional_compiler_or_linker_flags">2.9.2. Adding additional compiler or linker flags</h4>
+<div class="paragraph"><p>On some systems, C/C++ libraries and headers that Phusion Passenger requires may be located in a non-standard directory. You can force the Phusion Passenger build system to look in those locations by injecting compiler and linker flags using the following environment variables:</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+<span class="monospaced">EXTRA_PRE_CFLAGS</span>
+</dt>
+<dd>
+<p>
+        These flags are injected into all C compiler invocations that involve compiling C or C++ source files. This includes compiler invocations that compile <strong>and</strong> link. The flags are injected at the beginning of the command string, even before <span class="monospaced">EXTRA_PRE_LDFLAGS</span>.
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">EXTRA_CFLAGS</span>
+</dt>
+<dd>
+<p>
+        Similar to <span class="monospaced">EXTRA_PRE_CFLAGS</span>, but injected at the end of the command string, before <span class="monospaced">EXTRA_LDFLAGS</span>.
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">EXTRA_PRE_CXXFLAGS</span>
+</dt>
+<dd>
+<p>
+        Similar to <span class="monospaced">EXTRA_PRE_CFLAGS</span>, but for C++ compiler invocations.
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">EXTRA_CXXFLAGS</span>
+</dt>
+<dd>
+<p>
+        Similar to <span class="monospaced">EXTRA_CFLAGS</span>, but for C++ compiler invocations.
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">EXTRA_PRE_LDFLAGS</span>
+</dt>
+<dd>
+<p>
+        These flags are injected into all C/C++ compiler invocations that involve linking. This includes compiler invocations that compile <strong>and</strong> link. The flags are injected at the beginning of the command string, but after <span class="monospaced">EXTRA_PRE_CFLAGS</span> and <span class="monospaced">EXTRA_PRE_CXXFLAGS</span>.
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">EXTRA_LDFLAGS</span>
+</dt>
+<dd>
+<p>
+        Similar to <span class="monospaced">EXTRA_PRE_LDFLAGS</span>, but injected at the very end of the command string, even after <span class="monospaced">EXTRA_CFLAGS</span> and <span class="monospaced">EXTRA_CXXFLAGS</span>.
+</p>
+</dd>
+</dl></div>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/tip.png" alt="Tip">
+<img src="./images/icons/note.png" alt="Note">
 </td>
-<td class="content">
-<div class="title">"What spawn method should I use?"</div>
-<div class="paragraph"><p>This subsection attempts to describe spawn methods, but it’s okay if you don’t (want to)
-understand it, as it’s mostly a technical detail. You can basically follow this rule of thumb:</p></div>
-<div class="sidebarblock">
-<div class="content">
-<div class="paragraph"><p>If your application works on Mongrel, but not on Phusion Passenger, then set
-<span class="monospaced">passenger_spawn_method</span> to <em>conservative</em>. Otherwise, leave it at <em>smart-lv2</em> (the default).</p></div>
-</div>
+<td class="content">If you run the installer with <span class="monospaced">sudo</span> then environment variables may not be passed properly. Learn more at <a href="#env_vars_and_sudo">Environment variables and sudo</a>.</td>
+</tr></table>
 </div>
-<div class="paragraph"><p>However, we do recommend you to try to understand it. The <em>smart</em> and <em>smart-lv2</em> spawn
-methods bring many benefits.</p></div>
-</td>
-</tr></table>
 </div>
-<div class="paragraph"><p>Internally, Phusion Passenger spawns multiple Ruby application processes in order to handle
-requests. But there are multiple ways with which processes can be spawned, each having
-its own set of pros and cons. Supported spawn methods are:</p></div>
-<div class="dlist"><dl>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_forcing_location_of_command_line_tools_and_dependencies"></span><h4 data-comment-topic="forcing-location-of-certain-command-line-tools-1j93cki" data-anchor="_forcing_location_of_command_line_tools_and_dependencies">2.9.3. Forcing location of command line tools and dependencies</h4>
+<div class="paragraph"><p>The Phusion Passenger build system attempts to autodetect many things by locating relevant helper tools. For example, to find out which compiler flags it should use for compiling Apache modules, it locates the <span class="monospaced">apxs2</span> command and queries it. To find out which compiler flags it should use for libcurl, it queries the <span class="monospaced">curl-config</span> command. These commands may not be in <span class="monospaced">$PATH</span> [...]
+<div class="paragraph"><p>You can force the build to find certain command line tools at certain locations by using the following environment variables:</p></div>
+<div class="dlist"><dl>
 <dt class="hdlist1">
-<em>smart</em>
+<span class="monospaced">HTTPD</span>
 </dt>
 <dd>
 <p>
-When this spawn method is used, Phusion Passenger will attempt to cache any
-framework code (e.g. Ruby on Rails itself) and application code for a limited
-period of time. Please read <a href="#spawning_methods_explained">Spawning methods explained</a>
-for a more detailed explanation of what smart spawning exactly does.
+        The location of the <span class="monospaced">httpd</span> executable (the Apache server executable).
 </p>
-<div class="paragraph"><p><strong>Pros:</strong>
-This can significantly decrease spawn time (by as much as 90%). And, when Ruby Enterprise
-Edition is used, <a href="#reducing_memory_usage">memory usage can be reduced by 33% on average</a>.</p></div>
-<div class="paragraph"><p><strong>Cons:</strong>
-Some applications and libraries are not compatible with smart spawning.
-If that’s the case for your application, then you should use <em>conservative</em> as
-spawning method. Please read <a href="#spawning_methods_explained">Spawning methods explained</a>
-for possible compatibility issues.</p></div>
 </dd>
 <dt class="hdlist1">
-<em>smart-lv2</em>
+<span class="monospaced">APXS2</span>
 </dt>
 <dd>
 <p>
-This spawning method is similar to <em>smart</em> but it skips the framework spawner
-and uses the application spawner directly. This means the framework code is not
-cached between multiple applications, although it is still cached within
-instances of the same application. Please read
-<a href="#spawning_methods_explained">Spawning methods explained</a> for a more detailed
-explanation of what smart-lv2 spawning exactly does.
+        The location of the <span class="monospaced">apxs2</span> executable (the Apache module developer tool). Only used by <span class="monospaced">passenger-install-apache2-module</span>.
 </p>
-<div class="paragraph"><p><strong>Pros:</strong> It is compatible with a larger number of applications when compared to
-the <em>smart</em> method, and still performs some caching.</p></div>
-<div class="paragraph"><p><strong>Cons:</strong> It is slower than smart spawning if you have many applications which
-use the same framework version. It is therefore advised that shared hosts use the
-<em>smart</em> method instead.</p></div>
+<div class="paragraph"><p>This environment variable, together with <span class="monospaced">HTTPD</span>, are what you need to customize if you have multiple Apache installations on your system, or if your Apache is located in a non-standard location which Phusion Passenger cannot detect. By setting <span class="monospaced">APXS2</span> and <span class="monospaced">HTTP</span> to the right paths, you can force Phusion Passenger to be compiled against that specific Apache installation.</p [...]
+<div class="paragraph"><p>For example, if your Apache installation is located in <span class="monospaced">/opt/lamp/apache2</span>, then you can run the installer as follows:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo bash
+# export HTTPD=/opt/lampp/apache2/bin/apache
+# export APXS2=/opt/lampp/apache2/bin/apxs
+# passenger-install-apache2-module</pre>
+</div>
+</div>
 </dd>
 <dt class="hdlist1">
-<em>conservative</em>
+<span class="monospaced">APR_CONFIG</span>
 </dt>
 <dd>
 <p>
-This spawning method is similar to the one used in Mongrel Cluster. It does not
-perform any code caching at all. Please read
-<a href="#spawning_methods_explained">Spawning methods explained</a> for a more detailed
-explanation of what conservative spawning exactly does.
+        The location of the <span class="monospaced">apr-config</span> executable (the Apache Portable Runtime developer tool).
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">APU_CONFIG</span>
+</dt>
+<dd>
+<p>
+        The location of the <span class="monospaced">apu-config</span> executable (the Apache Portable Runtime Utility developer tool).
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">MAKE</span>
+</dt>
+<dd>
+<p>
+        The location of a <span class="monospaced">make</span> tool. It does not matter which implementation of <span class="monospaced">make</span> this is.
+</p>
+</dd>
+<dt class="hdlist1">
+<span class="monospaced">GMAKE</span>
+</dt>
+<dd>
+<p>
+        The location of the GNU-compatible <span class="monospaced">make</span> tool.
 </p>
-<div class="paragraph"><p><strong>Pros:</strong>
-Conservative spawning is guaranteed to be compatible with all applications
-and libraries.</p></div>
-<div class="paragraph"><p><strong>Cons:</strong>
-Much slower than smart spawning. Every spawn action will be equally slow, though no slower than
-the startup time of a single server in Mongrel Cluster. Conservative spawning will also
-render <a href="#reducing_memory_usage">Ruby Enterprise Edition’s memory reduction technology</a> useless.</p></div>
 </dd>
 </dl></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">If you run the installer with <span class="monospaced">sudo</span> then environment variables may not be passed properly. Learn more at <a href="#env_vars_and_sudo">Environment variables and sudo</a>.</td>
+</tr></table>
+</div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installing_as_a_normal_nginx_module_without_using_the_installer"></span><h3 data-comment-topic="installing-as-a-normal-nginx-module-without-using-the-installer-1kkpes5" data-anchor="_installing_as_a_normal_nginx_module_without_using_the_installer">2.10. Installing as a normal Nginx module without using the installer</h3>
+<div class="paragraph"><p>You can also install Phusion Passenger the way you install any other Nginx module, e.g. with <span class="monospaced">--add-module</span>. Run Nginx’s configure script with <span class="monospaced">--add-module=/path-to-passenger-root/ext/nginx</span>.</p></div>
+<div class="paragraph"><p>If you installed Phusion Passenger via the gem, then <em>path-to-passenger-root</em> can be obtained with the command:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>passenger-config --root</pre>
+</div>
+</div>
+<div class="paragraph"><p>This will probably output something along the lines of <em>/usr/lib/ruby/gems/1.8/gems/passenger-x.x.x</em>,
+so you’ll probably have to specify something like <span class="monospaced">--add-module=/usr/lib/ruby/gems/1.8/gems/passenger-x.x.x/ext/nginx</span>.</p></div>
+<div class="paragraph"><p>If you installed Phusion Passenger via a source tarball, then <em>path-to-passenger-root</em>
+is the directory which contains the Phusion Passenger source code. So if you
+extracted the Phusion Passenger source code to <em>/opt/passenger-x.x.x</em>, then you’ll
+have to specify <span class="monospaced">--add-module=/opt/passenger-x.x.x/ext/nginx</span>.</p></div>
+<div class="paragraph"><p>After having installed Nginx with Phusion Passenger support, you must paste the following
+line into your Nginx configuration file:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>passenger_root /path-to-passenger-root;</pre>
+</div>
+</div>
+<div class="paragraph"><p>After having done so, restart Nginx.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="nginx_init_script"></span><h3 data-comment-topic="creating-an-nginx-init-script-1kd8zg5" data-anchor="nginx_init_script">2.11. Creating an Nginx init script</h3>
+<div class="paragraph"><p>If you installed Nginx with one of the generic installation methods then you won’t have an init script to start, stop and restart Nginx with. A bare Nginx installation works with signals: you start it by invoking it from the command line, you stop it by sending SIGTERM to it and you gracefully restart it by sending SIGHUP to it.</p></div>
+<div class="paragraph"><p>If you prefer to use an init script then please refer to the following resources:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="http://wiki.nginx.org/Nginx-init-ubuntu">Init script for Ubuntu 8.04-9.10</a>
+</p>
+</li>
+<li>
+<p>
+<a href="http://library.linode.com/web-servers/nginx/installation/ubuntu-12.04-precise-pangolin#sph_create-an-init-script-to-manage-nginx">Init script for Ubuntu 12.04</a>
+</p>
+</li>
+<li>
+<p>
+<a href="http://wiki.nginx.org/RedHatNginxInitScript">Init script for Red Hat, Fedora and CentOS</a>
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>When using one of those init scripts, please make sure that the paths inside the init script are correct. In particular, the paths to the Nginx binary, to the PID file and to the configuration file must match the actual locations of your Nginx installation.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_disabling_without_uninstalling"></span><h3 data-comment-topic="disabling-without-uninstalling-1t5tqan" data-anchor="_disabling_without_uninstalling">2.12. Disabling without uninstalling</h3>
+<div class="paragraph"><p>You can temporarily unload (disable) Phusion Passenger from the web server, without
+uninstalling the Phusion Passenger files, so that the web server behaves as if Phusion
+Passenger was never installed in the first place. This might be useful to you if -
+for example - you seem to be experiencing a problem caused by Phusion Passenger,
+but you want to make sure whether that’s actually the case without having
+to through the hassle of uninstalling Phusion Passenger completely. When disabled,
+Phusion Passenger will not occupy any memory or CPU or otherwise interfere with
+the web server.</p></div>
+<div class="paragraph"><p>To unload Phusion Passenger, edit your Nginx configuration file(s)
+and comment out all Phusion Passenger configuration directives.</p></div>
+<div class="paragraph"><p>For example, if your configuration file looks like this…</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>...
+
+http {
+    passenger_root /somewhere/passenger-x.x.x;
+    passenger_ruby /usr/bin/ruby;
+    passenger_max_pool_size 10;
+
+    gzip on;
+
+    server {
+        server_name www.foo.com;
+        listen 80;
+        root /webapps/foo/public;
+        passenger_enabled on;
+    }
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>…then comment out the relevant directives, so that it looks like this:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>...
+
+http {
+    # passenger_root /somewhere/passenger-x.x.x;
+    # passenger_ruby /usr/bin/ruby;
+    # passenger_max_pool_size 10;
+
+    gzip on;
+
+    server {
+        server_name www.foo.com;
+        listen 80;
+        root /webapps/foo/public;
+        # passenger_enabled on;
+    }
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>After you’ve done this, save the configuration file and restart the web server.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="uninstalling"></span><h3 data-comment-topic="uninstalling-phusion-passenger-wuycvb" data-anchor="uninstalling">2.13. Uninstalling</h3>
+<div class="paragraph"><p>To uninstall Phusion Passenger, please first remove all Phusion Passenger
+configuration directives from your web server configuration file(s). After you’ve
+done this, you need to remove the Phusion Passenger files.</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+If you installed Phusion Passenger via a Ruby gem, then run <span class="monospaced">gem uninstall passenger</span> (or, if you’re a <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> user, <span class="monospaced">gem uninstall passenger-enterprise-server</span>).
+  You <a href="#is_ruby_home_or_system_wide_installed">might have to run this as root</a>.
+</p>
+</li>
+<li>
+<p>
+If you installed Phusion Passenger via a source tarball, then remove the directory
+  in which you placed the extracted Phusion Passenger files. This directory is the
+  same as the one pointed to the by <span class="monospaced">PassengerRoot</span>/<span class="monospaced">passenger_root</span> configuration directive.
+</p>
+</li>
+<li>
+<p>
+If you installed Phusion Passenger through APT or YUM, then use them to uninstall Phusion Passenger.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Nginx does not have to be recompiled. Altough it contains Phusion Passenger code, it will not do anything when all Phusion Passenger configuration directives are removed.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="moving_phusion_passenger"></span><h3 data-comment-topic="moving-to-a-different-directory-gif3wo" data-anchor="moving_phusion_passenger">2.14. Moving to a different directory</h3>
+<div class="paragraph"><p>If you installed Phusion Passenger through a tarball then you can move the Phusion Passenger directory to another location. This is not possible if you used any of the other installation methods.</p></div>
+<div class="paragraph"><p>First, move the directory to whereever you like:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>mv /opt/passenger/passenger-4.0.0 /usr/local/passenger-4.0.0</pre>
+</div>
+</div>
+<div class="paragraph"><p>Next you must tell your web server that Phusion Passenger has moved.
+Open your Nginx configuration file and set the <em>passenger_root</em> directive to the new location:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>passenger_root /usr/local/passenger-4.0.0</pre>
+</div>
+</div>
+<div class="paragraph"><p>Restart your web server to finalize the change.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="deploying_a_ror_app"></span><h2 data-comment-topic="deploying-a-ruby-on-rails-1-x-or-2-x-but-not-rails-3-application-b69gqa" data-anchor="deploying_a_ror_app">3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3) application</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Suppose you have a Ruby on Rails application in <em>/webapps/mycook</em>, and you own
+the domain <em>www.mycook.com</em>. You can either deploy your application to the
+virtual host’s root (i.e. the application will be accessible from the root URL,
+<em>http://www.mycook.com/</em>), or in a sub URI (i.e. the application will be
+accessible from a sub URL, such as <em>http://www.mycook.com/railsapplication</em>).</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">The default <span class="monospaced">RAILS_ENV</span> environment in which deployed Rails applications
+are run, is “production”. You can change this by changing the
+<a href="#RailsEnv">rails_env</a> configuration option.</td>
+</tr></table>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deploying_to_a_virtual_host_8217_s_root"></span><h3 data-comment-topic="deploying-to-a-virtual-host-s-root-1mh24z5" data-anchor="_deploying_to_a_virtual_host_8217_s_root">3.1. Deploying to a virtual host’s root</h3>
+<div class="paragraph"><p>Add a <em>server</em> virtual host entry to your Nginx configuration file. The virtual
+host’s root must point to your Ruby on Rails application’s <em>public</em> folder.</p></div>
+<div class="paragraph"><p>Inside the <em>server</em> block, set <em>passenger_enabled on</em>.</p></div>
+<div class="paragraph"><p>For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>http {
+    ...
+
+    server {
+        listen 80;
+        server_name www.mycook.com;
+        root /webapps/mycook/public;
+        passenger_enabled on;
+    }
+
+    ...
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>Then restart Nginx. The application has now been deployed.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="deploying_rails_to_sub_uri"></span><h3 data-comment-topic="deploying-to-a-sub-uri-1il2qj7" data-anchor="deploying_rails_to_sub_uri">3.2. Deploying to a sub URI</h3>
+<div class="paragraph"><p>Suppose that you already have a <em>server</em> virtual host entry:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>http {
+    ...
+
+    server {
+        listen 80;
+        server_name www.phusion.nl;
+        root /websites/phusion;
+    }
+
+    ...
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>And you want your Ruby on Rails application to be accessible from the URL
+<em>http://www.phusion.nl/rails</em>.</p></div>
+<div class="paragraph"><p>To do this, make a symlink in the virtual host’s document root, and have it
+point to your Ruby on Rails application’s <em>public</em> folder. For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>ln -s /webapps/mycook/public /websites/phusion/rails</pre>
+</div>
+</div>
+<div class="paragraph"><p>Next, set <em>passenger_enabled on</em> and add a <a href="#PassengerBaseURI">passenger_base_uri</a>
+option to the <em>server</em> block:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>http {
+    ...
+
+    server {
+        listen 80;
+        server_name www.phusion.nl;
+        root /websites/phusion;
+        passenger_enabled on;        # <--- These lines have
+        passenger_base_uri /rails;   # <--- been added.
+    }
+
+    ...
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>Then restart Nginx. The application has now been deployed.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/tip.png" alt="Tip">
+</td>
+<td class="content">
+<div class="paragraph"><p>You can deploy multiple Rails applications under a virtual host, by specifying
+<a href="#PassengerBaseURI">passenger_base_uri</a> multiple times. For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>server {
+    ...
+    passenger_base_uri /app1;
+    passenger_base_uri /app2;
+    passenger_base_uri /app3;
+}</pre>
+</div>
+</div>
+</td>
+</tr></table>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_redeploying_restarting_the_ruby_on_rails_application"></span><h3 data-comment-topic="redeploying-restarting-the-ruby-on-rails-application--1eso761" data-anchor="_redeploying_restarting_the_ruby_on_rails_application">3.3. Redeploying (restarting the Ruby on Rails application)</h3>
+<div class="paragraph"><p>Deploying a new version of a Ruby on Rails application is as simple as
+re-uploading the application files, and restarting the application.</p></div>
+<div class="paragraph"><p>There are two ways to restart the application:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+By restarting Nginx.
+</p>
+</li>
+<li>
+<p>
+By creating or modifying the file <em>tmp/restart.txt</em> in the Rails
+   application’s <a href="#application_root">root folder</a>. Phusion Passenger will
+   automatically restart the application during the next request.
+</p>
+</li>
+</ol></div>
+<div class="paragraph"><p>For example, to restart our example MyCook application, we type this in the
+command line:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>touch /webapps/mycook/tmp/restart.txt</pre>
+</div>
+</div>
+<div class="paragraph"><p>Please note that, unlike earlier versions of Phusion Passenger, <em>restart.txt</em>
+is not automatically deleted. Phusion Passenger checks whether the timestamp
+of this file has changed in order to determine whether the application should
+be restarted.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_migrations"></span><h3 data-comment-topic="migrations-9yyb8w" data-anchor="_migrations">3.4. Migrations</h3>
+<div class="paragraph"><p>Phusion Passenger is not related to Ruby on Rails migrations in any way. To
+run migrations on your deployment server, please login to your deployment
+server (e.g. with <em>ssh</em>) and type <span class="monospaced">rake db:migrate RAILS_ENV=production</span> in
+a shell console, just like one would normally run migrations.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_capistrano_integration"></span><h3 data-comment-topic="capistrano-integration-1ktunm6" data-anchor="_capistrano_integration">3.5. Capistrano integration</h3>
+<div class="paragraph"><p>See <a href="#capistrano">Capistrano recipe</a>.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="deploying_a_rack_app"></span><h2 data-comment-topic="deploying-a-rack-based-ruby-application-including-rails-3--12benx3" data-anchor="deploying_a_rack_app">4. Deploying a Rack-based Ruby application (including Rails >= 3)</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Phusion Passenger supports arbitrary Ruby web applications that follow the
+<a href="http://rack.rubyforge.org/">Rack</a> interface.</p></div>
+<div class="paragraph"><p>Phusion Passenger assumes that Rack application directories have a certain layout.
+Suppose that you have a Rack application in <em>/webapps/rackapp</em>. Then that
+folder must contain at least three entries:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<em>config.ru</em>, a Rackup file for starting the Rack application. This file must contain
+  the complete logic for initializing the application.
+</p>
+</li>
+<li>
+<p>
+<em>public/</em>, a folder containing public static web assets, like images and stylesheets.
+</p>
+</li>
+<li>
+<p>
+<em>tmp/</em>, used for <em>restart.txt</em> (our application restart mechanism). This will
+  be explained in a following subsection.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>So <em>/webapps/rackapp</em> must, at minimum, look like this:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>/webapps/rackapp
+  |
+  +-- config.ru
+  |
+  +-- public/
+  |
+  +-- tmp/</pre>
+</div>
+</div>
+<div class="paragraph"><p>Suppose you own the domain <em>www.rackapp.com</em>. You can either deploy your application
+to the virtual host’s root (i.e. the application will be accessible from the root URL,
+<em>http://www.rackapp.com/</em>), or in a sub URI (i.e. the application will be
+accessible from a sub URL, such as <em>http://www.rackapp.com/rackapp</em>).</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">The default <span class="monospaced">RACK_ENV</span> environment in which deployed Rack applications
+are run, is “production”. You can change this by changing the
+<a href="#RackEnv">rack_env</a> configuration option.</td>
+</tr></table>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_tutorial_example_writing_and_deploying_a_hello_world_rack_application"></span><h3 data-comment-topic="tutorial-example-writing-and-deploying-a-hello-world-rack-application-1wstx99" data-anchor="_tutorial_example_writing_and_deploying_a_hello_world_rack_application">4.1. Tutorial/example: writing and deploying a Hello World Rack application</h3>
+<div class="paragraph"><p>First we create a Phusion Passenger-compliant Rack directory structure:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ mkdir /webapps/rack_example
+$ mkdir /webapps/rack_example/public
+$ mkdir /webapps/rack_example/tmp</pre>
+</div>
+</div>
+<div class="paragraph"><p>Next, we write a minimal "hello world" Rack application:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ cd /webapps/rack_example
+$ some_awesome_editor config.ru
+...type in some source code...
+$ cat config.ru
+app = proc do |env|
+    [200, { "Content-Type" => "text/html" }, ["hello <b>world</b>"]]
+end
+run app</pre>
+</div>
+</div>
+<div class="paragraph"><p>Finally, we deploy it by adding the following configuration options to
+the Nginx configuration file:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>http {
+    ...
+    server {
+        listen 80;
+        server_name www.rackexample.com;
+        root /webapps/rack_example/public;
+        passenger_enabled on;
+    }
+    ...
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>And we’re done! After an Nginx restart, the above Rack application will be available
+under the URL <em>http://www.rackexample.com/</em>.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deploying_to_a_virtual_host_8217_s_root_2"></span><h3 data-comment-topic="deploying-to-a-virtual-host-s-root-f02erj" data-anchor="_deploying_to_a_virtual_host_8217_s_root_2">4.2. Deploying to a virtual host’s root</h3>
+<div class="paragraph"><p>Add a <em>server</em> virtual host entry to your Nginx configuration file. The virtual host’s
+root must point to your Rack application’s <em>public</em> folder. You must also set
+<em>passenger_enabled on</em> in the <em>server</em> block.</p></div>
+<div class="paragraph"><p>For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>http {
+    ...
+    server {
+        listen 80;
+        server_name www.rackapp.com;
+        root /webapps/rackapp/public;
+        passenger_enabled on;
+    }
+    ...
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>Then restart Nginx. The application has now been deployed.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="deploying_rack_to_sub_uri"></span><h3 data-comment-topic="deploying-to-a-sub-uri-37q0ou" data-anchor="deploying_rack_to_sub_uri">4.3. Deploying to a sub URI</h3>
+<div class="paragraph"><p>Suppose that you already have a virtual host:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>http {
+    ...
+
+    server {
+        listen 80;
+        server_name www.phusion.nl;
+        root /websites/phusion;
+        passenger_enabled on;
+    }
+
+    ...
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>And you want your Rack application to be accessible from the URL
+<em>http://www.phusion.nl/rack</em>.</p></div>
+<div class="paragraph"><p>To do this, make a symlink in the virtual host’s document root, and have it
+point to your Rack application’s <em>public</em> folder. For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>ln -s /webapps/rackapp/public /websites/phusion/rack</pre>
+</div>
+</div>
+<div class="paragraph"><p>Next, set <em>passenger_enabled on</em> and add a <a href="#PassengerBaseURI">passenger_base_uri</a>
+option to the <em>server</em> block:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>http {
+    ...
+
+    server {
+        listen 80;
+        server_name www.phusion.nl;
+        root /websites/phusion;
+        passenger_enabled on;        # <--- These lines have
+        passenger_base_uri /rack;    # <--- been added.
+    }
+
+    ...
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>Then restart Nginx. The application has now been deployed.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/tip.png" alt="Tip">
+</td>
+<td class="content">
+<div class="paragraph"><p>You can deploy multiple Rack applications under a virtual host, by specifying
+<a href="#PassengerBaseURI">passenger_base_uri</a> multiple times. For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>server {
+    ...
+    passenger_base_uri /app1;
+    passenger_base_uri /app2;
+    passenger_base_uri /app3;
+}</pre>
+</div>
+</div>
+</td>
+</tr></table>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_redeploying_restarting_the_rack_application"></span><h3 data-comment-topic="redeploying-restarting-the-rack-application--xnbfam" data-anchor="_redeploying_restarting_the_rack_application">4.4. Redeploying (restarting the Rack application)</h3>
+<div class="paragraph"><p>Deploying a new version of a Rack application is as simple as
+re-uploading the application files, and restarting the application.</p></div>
+<div class="paragraph"><p>There are two ways to restart the application:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+By restarting Nginx.
+</p>
+</li>
+<li>
+<p>
+By creating or modifying the file <em>tmp/restart.txt</em> in the Rack
+   application’s <a href="#application_root">root folder</a>. Phusion Passenger will
+   automatically restart the application.
+</p>
+</li>
+</ol></div>
+<div class="paragraph"><p>For example, to restart our example application, we type this in the
+command line:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>touch /webapps/rackapp/tmp/restart.txt</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_rackup_specifications_for_various_web_frameworks"></span><h3 data-comment-topic="rackup-specifications-for-various-web-frameworks-1a2cs41" data-anchor="_rackup_specifications_for_various_web_frameworks">4.5. Rackup specifications for various web frameworks</h3>
+<div class="paragraph"><p>This subsection shows example <em>config.ru</em> files for various web frameworks.</p></div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_camping"></span><h4 data-comment-topic="camping-16vz2yb" data-anchor="_camping">4.5.1. Camping</h4>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>require 'rubygems'
+require 'rack'
+require 'camping'
+
+##### Begin Camping application
+Camping.goes :Blog
+
+...your application code here...
+##### End Camping application
+
+run Rack::Adapter::Camping.new(Blog)</pre>
+</div>
+</div>
+<div class="paragraph"><p>For Camping versions 2.0 and up, using <span class="monospaced">run Blog</span> as the final line will do.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_halcyon"></span><h4 data-comment-topic="halcyon-1benlfl" data-anchor="_halcyon">4.5.2. Halcyon</h4>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>require 'rubygems'
+require 'halcyon'
+$LOAD_PATH.unshift(Halcyon.root / 'lib')
+Halcyon::Runner.load_config Halcyon.root/'config'/'config.yml'
+run Halcyon::Runner.new</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_mack"></span><h4 data-comment-topic="mack-1ezijq6" data-anchor="_mack">4.5.3. Mack</h4>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>ENV["MACK_ENV"] = ENV["RACK_ENV"]
+load("Rakefile")
+require 'rubygems'
+require 'mack'
+run Mack::Utils::Server.build_app</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_merb"></span><h4 data-comment-topic="merb-ddsh55" data-anchor="_merb">4.5.4. Merb</h4>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>require 'rubygems'
+require 'merb-core'
+
+Merb::Config.setup(
+  :merb_root   => ::File.expand_path(::File.dirname(__FILE__)),
+  :environment => ENV['RACK_ENV']
+)
+Merb.environment = Merb::Config[:environment]
+Merb.root = Merb::Config[:merb_root]
+Merb::BootLoader.run
+
+run Merb::Rack::Application.new</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_ramaze"></span><h4 data-comment-topic="ramaze-1p2zod" data-anchor="_ramaze">4.5.5. Ramaze</h4>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>require "rubygems"
+require "ramaze"
+Ramaze.trait[:essentials].delete Ramaze::Adapter
+require "start"
+Ramaze.start!
+run Ramaze::Adapter::Base</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_sinatra"></span><h4 data-comment-topic="sinatra-a7u9ag" data-anchor="_sinatra">4.5.6. Sinatra</h4>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>require 'rubygems'
+require 'sinatra'
+
+set :environment, ENV['RACK_ENV'].to_sym
+disable :run, :reload
+
+require 'app.rb'
+
+run Sinatra::Application</pre>
+</div>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deploying_a_wsgi_python_application"></span><h2 data-comment-topic="deploying-a-wsgi-python-application-1or2efo" data-anchor="_deploying_a_wsgi_python_application">5. Deploying a WSGI (Python) application</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Phusion Passenger supports all WSGI-compliant Python web applications. Suppose that you have a WSGI application in <em>/webapps/wsgiapp</em>. Then that folder must contain at least three entries:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<em>passenger_wsgi.py</em>, which Phusion Passenger will use as the main entry point for your application. This file must export a WSGI object called <span class="monospaced">application</span>.
+</p>
+</li>
+<li>
+<p>
+<em>public/</em>, a folder containing public static web assets, like images and stylesheets.
+</p>
+</li>
+<li>
+<p>
+<em>tmp/</em>, used for <em>restart.txt</em> (our application restart mechanism). This will be explained in a following subsection.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>So <em>/webapps/wsgiapp</em> must, at minimum, look like this:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>/webapps/wsgiapp
+  |
+  +-- config.ru
+  |
+  +-- public/
+  |
+  +-- tmp/</pre>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_tutorial_example_writing_and_deploying_a_hello_world_wsgi_application"></span><h3 data-comment-topic="tutorial-example-writing-and-deploying-a-hello-world-wsgi-application-k5ron2" data-anchor="_tutorial_example_writing_and_deploying_a_hello_world_wsgi_application">5.1. Tutorial/example: writing and deploying a Hello World WSGI application</h3>
+<div class="paragraph"><p>First we create a Phusion Passenger-compliant WSGI directory structure:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ mkdir /webapps/wsgi_example
+$ mkdir /webapps/wsgi_example/public
+$ mkdir /webapps/wsgi_example/tmp</pre>
+</div>
+</div>
+<div class="paragraph"><p>Next, we write a minimal "hello world" WSGI application:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ cd /webapps/wsgi_example
+$ some_awesome_editor passenger_wsgi.py
+...type in some source code...
+$ cat passenger_wsgi.py
+def application(environ, start_response):
+  start_response('200 OK', [('Content-Type', 'text/plain')])
+  return [b"hello world!\n"]</pre>
+</div>
+</div>
+<div class="paragraph"><p>Finally, we deploy it by adding the following configuration options to
+the Nginx configuration file:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>http {
+    ...
+    server {
+        listen 80;
+        server_name www.wsgiexample.com;
+        root /webapps/wsgi_example/public;
+        passenger_enabled on;
+    }
+    ...
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>And we’re done! After an Nginx restart, the above WSGI application will be available
+under the URL <em>http://www.wsgiexample.com/</em>.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deploying_to_a_virtual_host_8217_s_root_3"></span><h3 data-comment-topic="deploying-to-a-virtual-host-s-root-1chcpbj" data-anchor="_deploying_to_a_virtual_host_8217_s_root_3">5.2. Deploying to a virtual host’s root</h3>
+<div class="paragraph"><p>Add a <em>server</em> virtual host entry to your Nginx configuration file. The virtual host’s
+root must point to your WSGI application’s <em>public</em> folder. You must also set
+<em>passenger_enabled on</em> in the <em>server</em> block.</p></div>
+<div class="paragraph"><p>For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>http {
+    ...
+    server {
+        listen 80;
+        server_name www.wsgiapp.com;
+        root /webapps/wsgiapp/public;
+        passenger_enabled on;
+    }
+    ...
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>Then restart Nginx. The application has now been deployed.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_redeploying_restarting_the_wsgi_application"></span><h3 data-comment-topic="redeploying-restarting-the-wsgi-application--10zdh2k" data-anchor="_redeploying_restarting_the_wsgi_application">5.3. Redeploying (restarting the WSGI application)</h3>
+<div class="paragraph"><p>Deploying a new version of a WSGI application is as simple as
+re-uploading the application files, and restarting the application.</p></div>
+<div class="paragraph"><p>There are two ways to restart the application:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+By restarting Nginx.
+</p>
+</li>
+<li>
+<p>
+By creating or modifying the file <em>tmp/restart.txt</em> in the WSGI
+   application’s <a href="#application_root">root folder</a>. Phusion Passenger will
+   automatically restart the application.
+</p>
+</li>
+</ol></div>
+<div class="paragraph"><p>For example, to restart our example application, we type this in the
+command line:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>touch /webapps/wsgiapp/tmp/restart.txt</pre>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_configuring_phusion_passenger"></span><h2 data-comment-topic="configuring-phusion-passenger-1g1svey" data-anchor="_configuring_phusion_passenger">6. Configuring Phusion Passenger</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>After installation, Phusion Passenger does not need any further configurations.
+Nevertheless, the system administrator may be interested in changing
+Phusion Passenger’s behavior. Phusion Passenger supports the following configuration
+options in the Nginx configuration file:</p></div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_root_lt_directory_gt"></span><h3 data-comment-topic="passenger-root-directory--bqvhhz" data-anchor="_passenger_root_lt_directory_gt">6.1. passenger_root <directory></h3>
+<div class="paragraph"><p>The location to the Phusion Passenger root directory. This configuration option
+is essential to Phusion Passenger, and allows Phusion Passenger to locate its own
+data files. The correct value is given by the installer.</p></div>
+<div class="paragraph"><p>If you’ve moved Phusion Passenger to a different directory then you need to update
+this option as well. Please read
+<a href="#moving_phusion_passenger">Moving Phusion Passenger to a different directory</a> for more information.</p></div>
+<div class="paragraph"><p>This required option may only occur once, in the <em>http</em> configuration block.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">This option has no effect when you are using <a href="#flying_passenger">Flying Passenger</a>.</td>
+</tr></table>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerRuby"></span><h3 data-comment-topic="passenger-ruby-filename--1gnok5k" data-anchor="PassengerRuby">6.2. passenger_ruby <filename></h3>
+<div class="paragraph"><p>The <span class="monospaced">passenger_ruby</span> option allows one to specify the Ruby interpreter to use. Similarly, the <span class="monospaced">passenger_python</span> option is for specifying the Python interpreter.</p></div>
+<div class="paragraph"><p>In versions prior to 4.0.0, only a single Ruby version was supported for the entire Nginx instance, so <span class="monospaced">passenger_ruby</span> may only occur in the global server configuration. Also, the <span class="monospaced">passenger_python</span> option was not supported.</p></div>
+<div class="paragraph"><p>Since version 4.0.0, the <span class="monospaced">passenger_python</span> option was added. Also, Phusion Passenger supports multiple Ruby or Python interpreters in the same Nginx instance. And so, since version 4.0.0, this option may occur in the following places:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+In the <em>http</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>server</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>location</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In an <em>if</em> configuration scope.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>The <span class="monospaced">passenger_ruby</span> in the <span class="monospaced">http</span> block - that is, the one that <span class="monospaced">passenger-install-nginx-module</span> outputs - is used for invoking certain Phusion Passenger tools that are written in Ruby, e.g. the internal helper script used by <a href="#PassengerPreStart">passenger_pre_start</a>. It is also used as the default Ruby interpreter for Ruby web apps. You don’t <strong>have</stro [...]
+<div class="paragraph"><p>The <span class="monospaced">passenger_python</span> option works in a similar manner, but applies to Python instead.</p></div>
+<div class="paragraph"><p>You can also override <span class="monospaced">passenger_ruby</span> or <span class="monospaced">passenger_python</span> in specific contexts if you want to use a different Ruby/Python interpreter for that web app. For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>http {
+    passenger_root ...;
+
+    # Use Ruby 1.8.7 by default.
+    passenger_ruby /usr/bin/ruby1.8;
+    # Use Python 2.6 by default.
+    passenger_python /usr/bin/python2.6;
+
+    server {
+        # This Rails web app will use Ruby 1.8.7
+        listen 80;
+        server_name www.foo.com;
+        root /webapps/foo/public;
+    }
+
+    server {
+        # This Rails web app will use Ruby 1.9.3, as installed by RVM
+        passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3/ruby;
+
+        listen 80;
+        server_name www.bar.com;
+        root /webapps/bar/public;
+
+        # If you have a web app deployed in a sub-URI, customize
+        # passenger_ruby/passenger_python inside a `location` block.
+        # The web app under www.bar.com/blog will use JRuby 1.7.1
+        passenger_base_uri /blog;
+        location /blog {
+            passenger_enabled on;
+            passenger_ruby /usr/local/rvm/wrappers/jruby-1.7.1/ruby;
+        }
+    }
+
+    server {
+        # This Flask web app will use Python 3.0
+        passenger_python /usr/bin/python3.0;
+
+        listen 80;
+        server_name www.baz.com;
+        root /webapps/baz/public;
+    }
+}</pre>
+</div>
+</div>
+<div class="paragraph">
+<div class="title">RVM helper tool</div>
+<p>Phusion Passenger provides the <span class="monospaced">passenger-config --ruby-command</span> tool for figuring out the correct command for invoking a specific Ruby interpreter. This is especially useful for RVM users. Suppose that you have both Ruby 1.8.7 and Ruby 1.9.3 installed through RVM, and you want to know the correct commands for each Ruby interpreter.</p>
+</div>
+<div class="paragraph"><p>For this purpose we’ll want to invoke <span class="monospaced">passenger-config</span> using its full path, because each time you <span class="monospaced">rvm use</span> a different Ruby interpreter, RVM changes <span class="monospaced">$PATH</span>. If you did not install Phusion Passenger through the generic tarball installation method, then here’s how you can figure out where <span class="monospaced">passenger-config</span> is:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ which passenger-config
+/opt/passenger/bin/passenger-config</pre>
+</div>
+</div>
+<div class="paragraph"><p>Now, switch to all the RVM Ruby interpreters you want to use. In each interpreter, invoke <span class="monospaced">passenger-config --ruby-command</span>. For Ruby 1.8.7:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ rvm use 1.8.7
+$ /opt/passenger/bin/passenger-config --ruby-command
+passenger-config was invoked through the following Ruby interpreter:
+  Command: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  Version: ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
+  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby /opt/passenger/bin/passenger start
+
+The following Ruby interpreter was found first in $PATH:
+  Command: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  Version: ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
+  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby /opt/passenger/bin/passenger start
+
+## Notes for RVM users
+Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'.</pre>
+</div>
+</div>
+<div class="paragraph"><p>Then, for Ruby 1.9.3:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ rvm use 1.9.3
+$ /opt/passenger/bin/passenger-config --ruby-command
+passenger-config was invoked through the following Ruby interpreter:
+  Command: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  Version: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
+  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby /opt/passenger/bin/passenger start
+
+The following Ruby interpreter was found first in $PATH:
+  Command: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  Version: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
+  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby /opt/passenger/bin/passenger start
+
+## Notes for RVM users
+Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'.</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_python_lt_filename_gt"></span><h3 data-comment-topic="passenger-python-filename--14p554" data-anchor="_passenger_python_lt_filename_gt">6.3. passenger_python <filename></h3>
+<div class="paragraph"><p><strong>Introduced in version 4.0.0.</strong></p></div>
+<div class="paragraph"><p>This option allows one to specify the Python interpreter to use. See <a href="#PassengerRuby">passenger_ruby</a> for more information. The default value is <em>python</em>, meaning that the Python interpreter will be looked up according to the <span class="monospaced">PATH</span> environment variable.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerAppRoot"></span><h3 data-comment-topic="passenger-app-root-path-to-root--1dbudc6" data-anchor="PassengerAppRoot">6.4. passenger_app_root <path/to/root></h3>
+<div class="paragraph"><p><strong>Introduced in version 4.0.0.</strong>
+By default, Phusion Passenger assumes that the application’s root directory
+is the parent directory of the <em>public</em> directory. This option allows one to
+specify the application’s root independently from the Nginx <em>root</em>, which
+is useful if the <em>public</em> directory lives in a non-standard place.</p></div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+In the <em>http</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>server</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>location</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In an <em>if</em> configuration scope.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
+<div class="paragraph"><p>Example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>server {
+    server_name test.host;
+    root /var/rails/zena/sites/example.com/public;
+    # normally Phusion Passenger would
+    # have assumed that the application
+    # root is "/var/rails/zena/sites/example.com"
+    passenger_app_root /var/rails/zena;
+}</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerSpawnMethod"></span><h3 data-comment-topic="passenger-spawn-method-string--1sc6njl" data-anchor="PassengerSpawnMethod">6.5. passenger_spawn_method <string></h3>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/tip.png" alt="Tip">
+</td>
+<td class="content">
+<div class="title">"What spawn method should I use?"</div>
+<div class="paragraph"><p>This subsection attempts to describe spawn methods, but it’s okay if you don’t (want to)
+understand it, as it’s mostly a technical detail. You can basically follow this rule of thumb:</p></div>
+<div class="sidebarblock">
+<div class="content">
+<div class="paragraph"><p>If your application works on Mongrel, but not on Phusion Passenger, then set
+<span class="monospaced">passenger_spawn_method</span> to <em>direct</em>. Otherwise, leave it at <em>smart</em> (the default).</p></div>
+</div>
+</div>
+<div class="paragraph"><p>However, we do recommend you to try to understand it. The <em>smart</em> spawn
+method brings many benefits.</p></div>
+</td>
+</tr></table>
+</div>
+<div class="paragraph"><p>Internally, Phusion Passenger spawns multiple Ruby application processes in order to handle
+requests. But there are multiple ways with which processes can be spawned, each having
+its own set of pros and cons. Supported spawn methods are:</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+<em>smart</em>
+</dt>
+<dd>
+<p>
+This spawning method caches code using the app preloader. Framework code is not
+cached between multiple applications, although it is cached within
+instances of the same application. Please read
+<a href="#spawning_methods_explained">Spawning methods explained</a> for a more detailed
+explanation of what smart spawning exactly does.
+</p>
+<div class="paragraph"><p><strong>Pros:</strong>
+Smart spawning caches code where possible to speed up the respawn process
+and is compatible with most applications</p></div>
+<div class="paragraph"><p><strong>Cons:</strong>
+It is possible that it may be incompatible with some applications</p></div>
+</dd>
+<dt class="hdlist1">
+<em>direct</em>
+</dt>
+<dd>
+<p>
+This spawning method is similar to the one used in Mongrel Cluster. It does not
+perform any code caching at all. Please read
+<a href="#spawning_methods_explained">Spawning methods explained</a> for a more detailed
+explanation of what direct spawning exactly does.
+</p>
+<div class="paragraph"><p><strong>Pros:</strong>
+Direct spawning is guaranteed to be compatible with all applications
+and libraries.</p></div>
+<div class="paragraph"><p><strong>Cons:</strong>
+Much slower than smart spawning. Every spawn action will be equally slow, though no slower than
+the startup time of a single server in Mongrel Cluster. Direct spawning will also
+render <a href="#reducing_memory_usage">Ruby Enterprise Edition’s memory reduction technology</a> useless.</p></div>
+</dd>
+</dl></div>
+<div class="sidebarblock">
+<div class="content">
+<div class="paragraph"><p>As of Passenger 3.2, <em>conservative</em> spawning was renamed to <em>direct</em> and <em>smart-lv2</em> was renamed
+to <em>smart</em>. The old <em>smart</em> spawning has been removed in favor of the new version.</p></div>
+</div>
+</div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+In the <em>http</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>server</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>location</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In an <em>if</em> configuration scope.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>smart</em>.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerRollingRestarts"></span><h3 data-comment-topic="passenger-rolling-restarts" data-anchor="PassengerRollingRestarts">6.6. passenger_rolling_restarts <on|off></h3>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>Enables or disables support for rolling restarts. Normally when you
+restart an application (by touching restart.txt), Phusion Passenger would
+shut down all application processes and spawn a new one. The spawning
+of a new application process could take a while, and any requests that
+come in during this time will be blocked until this first application
+process has spawned.</p></div>
+<div class="paragraph"><p>But when rolling restarts are enabled, Phusion Passenger Enterprise will:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+Spawn a new process in the background.
+</p>
+</li>
+<li>
+<p>
+When it’s done spawning, Phusion Passenger Enterprise will replace one of the old processes with this newly spawned one.
+</p>
+</li>
+<li>
+<p>
+Step 1 and 2 are repeated until all processes have been replaced.
+</p>
+</li>
+</ol></div>
+<div class="paragraph"><p>This way, visitors will not experience any delays when you are restarting your application. This allows you to, for example, upgrade your application often without degrading user experience.</p></div>
+<div class="paragraph"><p>Rolling restarts have a few caveat however that you should be aware of:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Upgrading an application sometimes involves upgrading the database schema.
+  With rolling restarts, there may be a point in time during which processes
+  belonging to the previous version and processes belonging to the new version
+  both exist at the same time. Any database schema upgrades you perform must
+  therefore be backwards-compatible with the old application version.
+</p>
+</li>
+<li>
+<p>
+Because there’s no telling which process will serve a request, users may
+  not see changes brought about by the new version until all processes have
+  been restarted. It is for this reason that you should not use rolling
+  restarts in development, only in production.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+In the <em>http</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>server</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>location</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In an <em>if</em> configuration scope.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_resist_deployment_errors_lt_on_off_gt"></span><h3 data-comment-topic="passenger-resist-deployment-errors-on-off--k9yf1" data-anchor="_passenger_resist_deployment_errors_lt_on_off_gt">6.7. passenger_resist_deployment_errors <on|off></h3>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>Enables or disables resistance against deployment errors.</p></div>
+<div class="paragraph"><p>Suppose you’ve upgraded your application and you’ve issues a command to restart it (by touching restart.txt), but the application code contains an error that prevents Phusion Passenger from successfully spawning a process (e.g. a syntax error). Phusion Passenger would normally display an error message in response to this.</p></div>
+<div class="paragraph"><p>By enabling deployment error resistance, Phusion Passenger Enterprise would instead do this:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+It passes the request to one of the existing application processes (that belong to the previous version of the application). The visitor will not see a Phusion Passenger process spawning error message.
+</p>
+</li>
+<li>
+<p>
+It logs the error to the global web server error log file.
+</p>
+</li>
+<li>
+<p>
+It sets an internal flag so that no processes for this application will be spawned (even when the current traffic would normally result in more processes being spawned) and no processes will be idle cleaned. Processes <strong>could</strong> still be shutdown because of other events, e.g. because their <a href="#PassengerMemoryLimit">memory limit</a> have been reached.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>This way, visitors will suffer minimally from deployment errors. Phusion Passenger will attempt to restart the application again next time restart.txt is touched.</p></div>
+<div class="paragraph"><p>Enabling deployment error resistance only works if <a href="#PassengerRollingRestarts">rolling restart</a> is also enabled.</p></div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+In the <em>http</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>server</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>location</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In an <em>if</em> configuration scope.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerTempDir"></span><h3 data-comment-topic="passenger-temp-dir-directory--1t3opri" data-anchor="PassengerTempDir">6.8. passenger_temp_dir <directory></h3>
+<div class="paragraph"><p>Specifies the directory that Phusion Passenger should use for storing temporary
+files. This includes things such as Unix socket files.</p></div>
+<div class="paragraph"><p>This option may only be specified in the <em>http</em> configuration block. The
+default temp directory that Phusion Passenger uses is <em>/tmp</em>.</p></div>
+<div class="paragraph"><p>This option is especially useful if Nginx is not allowed to write to /tmp
+(which is the case on some systems with strict SELinux policies) or if the
+partition that /tmp lives on doesn’t have enough disk space.</p></div>
+<div class="paragraph">
+<div class="title">Command line tools</div>
+<p>Some Phusion Passenger command line administration tools, such as
+<span class="monospaced">passenger-status</span>, must know what Phusion Passenger’s temp directory is
+in order to function properly. You can pass the directory through the
+<span class="monospaced">PASSENGER_TMPDIR</span> environment variable, or the <span class="monospaced">TMPDIR</span> environment variable
+(the former will be used if both are specified).</p>
+</div>
+<div class="paragraph"><p>For example, if you set <em>passenger_temp_dir</em> to <em>/my_temp_dir</em>, then invoke
+<span class="monospaced">passenger-status</span> after you’ve set the <span class="monospaced">PASSENGER_TMPDIR</span> or <span class="monospaced">TMPDIR</span>
+environment variable, like this:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>export PASSENGER_TMPDIR=/my_temp-dir
+sudo -E passenger-status
+# The -E option tells 'sudo' to preserve environment variables.</pre>
+</div>
+</div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">This option has no effect when you are using <a href="#flying_passenger">Flying Passenger</a>. Instead, you should configure this by passing the <span class="monospaced">--temp-dir</span> command line option to the Flying Passenger daemon.</td>
+</tr></table>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_fly_with_lt_socket_filename_gt"></span><h3 data-comment-topic="passenger-fly-with-socket-filename--1amd1xn" data-anchor="_passenger_fly_with_lt_socket_filename_gt">6.9. passenger_fly_with <socket filename></h3>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 4.1.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>Enables <a href="#flying_passenger">Flying Passenger</a> mode, and configures Nginx to connect to the Flying Passenger daemon that’s listening on the given socket filename.</p></div>
+<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block. When not set, Flying Passenger is not enabled.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_important_deployment_options"></span><h3 data-comment-topic="important-deployment-options-av567" data-anchor="_important_deployment_options">6.10. Important deployment options</h3>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_enabled_lt_on_off_gt"></span><h4 data-comment-topic="passenger-enabled-on-off--1rpb2t7" data-anchor="_passenger_enabled_lt_on_off_gt">6.10.1. passenger_enabled <on|off></h4>
+<div class="paragraph"><p>This option may be specified in the <em>http</em> configuration block, a
+<em>server</em> configuration block, a <em>location</em> configuration block or
+an <em>if</em> configuration scope, to enable or disable Phusion Passenger
+for that server or that location.</p></div>
+<div class="paragraph"><p>Phusion Passenger is disabled by default, so you must explicitly enable
+it for server blocks that you wish to serve through Phusion Passenger.
+Please see <a href="#deploying_a_ror_app">Deploying a Ruby on Rails application</a>
+and <a href="#deploying_a_rack_app">Deploying a Rack-based Ruby application</a>
+for examples.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerBaseURI"></span><h4 data-comment-topic="passenger-base-uri-uri--1xtuo50" data-anchor="PassengerBaseURI">6.10.2. passenger_base_uri <uri></h4>
+<div class="paragraph"><p>Used to specify that the given URI is an distinct application that should
+be served by Phusion Passenger. This option can be used for both Rails and
+Rack applications. See <a href="#deploying_rails_to_sub_uri">Deploying Rails to a sub URI</a>
+for an example.</p></div>
+<div class="paragraph"><p>It is allowed to specify this option multiple times. Do this to deploy multiple
+applications in different sub-URIs under the same virtual host.</p></div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+In the <em>http</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>server</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>location</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In an <em>if</em> configuration scope.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_connection_handling_options"></span><h3 data-comment-topic="connection-handling-options-8jgq90" data-anchor="_connection_handling_options">6.11. Connection handling options</h3>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_ignore_client_abort_lt_on_off_gt"></span><h4 data-comment-topic="passenger-ignore-client-abort" data-anchor="_passenger_ignore_client_abort_lt_on_off_gt">6.11.1. passenger_ignore_client_abort <on|off></h4>
+<div class="paragraph"><p>Normally, when the HTTP client aborts the connection (e.g. when the user clicked on "Stop"
+in the browser), the connection with the application process will be closed too. If the
+application process continues to send its response, then that will result in EPIPE errors
+in the application, which will be printed in the error log if the application doesn’t
+handle them gracefully.</p></div>
+<div class="paragraph"><p>If this option is turned on then upon client abort Phusion Passenger will continue to
+read the application process’s response while discarding all the read data. This prevents
+EPIPE errors but it’ll also mean the backend process will be unavailable for new requests
+until it is done sending its response.</p></div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+In the <em>http</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>server</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>location</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In an <em>if</em> configuration scope.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_set_cgi_param_lt_cgi_environment_name_gt_lt_value_gt"></span><h4 data-comment-topic="passenger-set-cgi-param-cgi-environment-name-value--rx9gc0" data-anchor="_passenger_set_cgi_param_lt_cgi_environment_name_gt_lt_value_gt">6.11.2. passenger_set_cgi_param <CGI environment name> <value></h4>
+<div class="paragraph"><p>Allows one to define additional CGI environment variables to pass to the backend
+application. This is equivalent to ngx_http_fastcgi_module’s <em>fastcgi_param</em>
+directive, and is comparable to ngx_http_proxy_module’s <em>proxy_set_header</em> option.
+Nginx variables in the value are interpolated.</p></div>
+<div class="paragraph"><p>For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre># Application will see a CGI environment "APP_NAME" with value "my super blog".
+passenger_set_cgi_param APP_NAME "my super blog";
+
+# Nginx variables are interpolated.
+passenger_set_cgi_param EXTRA_REQUEST_METHOD method=$request_method;</pre>
+</div>
+</div>
+<div class="paragraph"><p>If you want to set an HTTP header, then you must set it in the CGI environment name
+format, i.e. <em>HTTP_*</em>:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre># !!!THIS IS WRONG!!! Don't do this!
+passenger_set_cgi_param X-Forwarded-For 127.0.0.2;
+
+# Instead, write it like this:
+passenger_set_cgi_param HTTP_X_FORWARDED_FOR 127.0.0.2;</pre>
+</div>
+</div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+In the <em>http</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>server</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>location</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In an <em>if</em> configuration scope.
+</p>
+</li>
+</ul></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_pass_header_lt_header_name_gt"></span><h4 data-comment-topic="passenger-pass-header-header-name--1cg31je" data-anchor="_passenger_pass_header_lt_header_name_gt">6.11.3. passenger_pass_header <header name></h4>
+<div class="paragraph"><p>Some headers generated by backend applications are not forwarded to the HTTP client,
+e.g. <em>X-Accel-Redirect</em> which is directly processed by Nginx and then discarded from
+the final response. This directive allows one to force Nginx to pass those headers
+anyway, similar to how <em>proxy_pass_header</em> works.</p></div>
+<div class="paragraph"><p>For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>location / {
+   passenger_pass_header X-Accel-Redirect;
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+In the <em>http</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>server</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>location</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In an <em>if</em> configuration scope.
+</p>
+</li>
+</ul></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_buffer_response_lt_on_off_gt"></span><h4 data-comment-topic="passenger-buffer-response" data-anchor="_passenger_buffer_response_lt_on_off_gt">6.11.4. passenger_buffer_response <on|off></h4>
+<div class="paragraph"><p>When turned on, application-generated responses are buffered by Nginx. Buffering will
+happen in memory and also on disk if the response is larger than a certain threshold.</p></div>
+<div class="paragraph"><p>Before we proceed with explaining this configuration option, we want to state the following to avoid confusion. If you use Phusion Passenger for Nginx, there are in fact two response buffering systems active:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+The Nginx response buffering system. <span class="monospaced">passenger_buffer_response</span> turns this on or off.
+</p>
+</li>
+<li>
+<p>
+The Phusion Passenger response buffering system, a.k.a. <em>real-time disk-backed response buffering</em>. This buffering system is always on, regardless of the value of <span class="monospaced">passenger_buffer_response</span>.
+</p>
+</li>
+</ol></div>
+<div class="paragraph"><p>Response buffering is useful because it protects against slow HTTP clients that do not read responses immediately or quickly enough. Buffering prevents such slow clients from blocking web applications that have limited concurrency. Because Phusion Passenger’s response buffering is always turned on, you are always protected. Therefore, <span class="monospaced">passenger_buffer_response</span> is off by default, and you never should have to turn it on.</p></div>
+<div class="paragraph"><p>If for whatever reason you want to turn Nginx-level response buffering on, you can do so with this option.</p></div>
+<div class="paragraph"><p>Nginx’s response buffering works differently from Phusion Passenger’s. Nginx’s buffering system buffers the entire response before attempting to send it to the client, while Phusion Passenger’s attempts to send the data to the client immediately. Therefore, if you turn on <span class="monospaced">passenger_buffer_response</span>, you may interfere with applications that want to stream responses to the client.</p></div>
+<div class="paragraph"><p>How does response buffering - whether it’s done by Nginx or by Phusion Passenger - exactly protect against slow clients?
+Consider an HTTP client that’s on a dial-up modem link, and your
+application process generates a 2 MB response. If the response is buffered
+then your application process will be blocked until the entire 2 MB has been
+sent out to the HTTP client. This disallows your application process to do any useful
+work in the mean time. By buffering responses, Phusion Passenger or Nginx will read
+the application response as quickly as possible and will take care of forwarding the data
+to slow clients.</p></div>
+<div class="paragraph"><p>So keep in mind that enabling <span class="monospaced">passenger_buffering_response</span> will make streaming responses
+impossible. Consider for example this piece of Rails code:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>render :text => lambda { |response, output|
+    10.times do |i|
+        output.write("entry #{i}\n")
+        output.flush
+        sleep 1
+    end
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>…or this piece of Rack code:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>class Response
+    def each
+        10.times do |i|
+            yield("entry #{i}\n")
+            sleep 1
+        end
+    end
+end
+
+app = lambda do |env|
+    [200, { "Content-Type" => "text/plain" }, Response.new]
+end</pre>
+</div>
+</div>
+<div class="paragraph"><p>When <span class="monospaced">passenger_buffer_response</span> is turned on, Nginx will wait until
+the application is done sending the entire response before forwarding it
+to the client. The client will not receive anything for 10 seconds,
+after which it receives the entire response at once.
+When <span class="monospaced">passenger_buffer_response</span> is turned off, it works as expected: the client
+receives an "entry X" message every second for 10 seconds.</p></div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+In the <em>http</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>server</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In a <em>location</em> configuration block.
+</p>
+</li>
+<li>
+<p>
+In an <em>if</em> configuration scope.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_buffer_size"></span><h4 data-comment-topic="passenger-buffer-size-1jfkq87" data-anchor="_passenger_buffer_size">6.11.5. passenger_buffer_size</h4>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_buffers"></span><h4 data-comment-topic="passenger-busy-buffers" data-anchor="_passenger_buffers">6.11.6. passenger_buffers</h4>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_busy_buffer_size"></span><h4 data-comment-topic="passenger-busy-buffer-size-124sj61" data-anchor="_passenger_busy_buffer_size">6.11.7. passenger_busy_buffer_size</h4>
+<div class="paragraph"><p>These options have the same effect as proxy_module’s similarly named options.
+They can be used to modify the maximum allowed HTTP header size.</p></div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_security_options"></span><h3 data-comment-topic="security-options-1bv93g4" data-anchor="_security_options">6.12. Security options</h3>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerUserSwitching"></span><h4 data-comment-topic="passenger-user-switching-on-off--1p37u3l" data-anchor="PassengerUserSwitching">6.12.1. passenger_user_switching <on|off></h4>
+<div class="paragraph"><p>Whether to enable <a href="#user_switching">user switching support</a>.</p></div>
+<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
+The default value is <em>on</em>.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">This option has no effect when you are using <a href="#flying_passenger">Flying Passenger</a>. You can disable user switching for Flying Passenger by starting the Flying Passenger daemon as a non-root user.</td>
+</tr></table>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerUser"></span><h4 data-comment-topic="passenger-user-username--b06ur7" data-anchor="PassengerUser">6.12.2. passenger_user <username></h4>
+<div class="paragraph"><p>If <a href="#user_switching">user switching support</a> is enabled, then Phusion Passenger will
+by default run the web application as the owner of the file <em>config/environment.rb</em>
+(for Rails apps) or <em>config.ru</em> (for Rack apps). This option allows you to override
+that behavior and explicitly set a user to run the web application as, regardless
+of the ownership of <em>environment.rb</em>/<em>config.ru</em>.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the <em>http</em> configuration block.
@@ -1986,32 +3590,19 @@ In an <em>if</em> configuration scope.
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>smart-lv2</em>.</p></div>
-</div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_important_deployment_options" data-comment-topic="important-deployment-options-av567">5.4. Important deployment options</h3>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_enabled_lt_on_off_gt" data-comment-topic="passenger-enabled-on-off--1rpb2t7">5.4.1. passenger_enabled <on|off></h4>
-<div class="paragraph"><p>This option may be specified in the <em>http</em> configuration block, a
-<em>server</em> configuration block, a <em>location</em> configuration block or
-an <em>if</em> configuration scope, to enable or disable Phusion Passenger
-for that server or that location.</p></div>
-<div class="paragraph"><p>Phusion Passenger is disabled by default, so you must explicitly enable
-it for server blocks that you wish to serve through Phusion Passenger.
-Please see <a href="#deploying_a_ror_app">Deploying a Ruby on Rails application</a>
-and <a href="#deploying_a_rack_app">Deploying a Rack-based Ruby application</a>
-for examples.</p></div>
+<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerBaseURI" data-comment-topic="passenger-base-uri-uri--1xtuo50">5.4.2. passenger_base_uri <uri></h4>
-<div class="paragraph"><p>Used to specify that the given URI is an distinct application that should
-be served by Phusion Passenger. This option can be used for both Rails and
-Rack applications. See <a href="#deploying_rails_to_sub_uri">Deploying Rails to a sub URI</a>
-for an example.</p></div>
-<div class="paragraph"><p>It is allowed to specify this option multiple times. Do this to deploy multiple
-applications in different sub-URIs under the same virtual host.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerGroup"></span><h4 data-comment-topic="passenger-user-group-name--1fco4j7" data-anchor="PassengerGroup">6.12.3. passenger_group <group name></h4>
+<div class="paragraph"><p>If <a href="#user_switching">user switching support</a> is enabled, then Phusion Passenger will
+by default run the web application as the primary group of the owner of the file
+<em>config/environment.rb</em> (for Rails apps) or <em>config.ru</em> (for Rack apps). This option
+allows you to override that behavior and explicitly set a group to run the web application
+as, regardless of the ownership of <em>environment.rb</em>/<em>config.ru</em>.</p></div>
+<div class="paragraph"><p><em><group name></em> may also be set to the special value <em>!STARTUP_FILE!</em>, in which case
+the web application’s group will be set to <em>environment.rb</em>/<em>config.ru</em>'s group.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the <em>http</em> configuration block.
@@ -2033,15 +3624,59 @@ In an <em>if</em> configuration scope.
 </p>
 </li>
 </ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerDefaultUser"></span><h4 data-comment-topic="passenger-default-user-username--1h6cdmf" data-anchor="PassengerDefaultUser">6.12.4. passenger_default_user <username></h4>
+<div class="paragraph"><p>Phusion Passenger enables <a href="#user_switching">user switching support</a> by default.
+This configuration option allows one to specify the user that applications must
+run as, if user switching fails or is disabled.</p></div>
+<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
+The default value is <em>nobody</em>.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">This option has no effect when you are using <a href="#flying_passenger">Flying Passenger</a>. There is currently no way to set this option when using Flying Passenger, but if you want to disable user switching for Flying Passenger then you can do so by starting the Flying Passenger daemon as a non-root user.</td>
+</tr></table>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerDefaultGroup"></span><h4 data-comment-topic="passenger-default-group-group-name--1qxn2qa" data-anchor="PassengerDefaultGroup">6.12.5. Passenger_default_group <group name></h4>
+<div class="paragraph"><p>Phusion Passenger enables <a href="#user_switching">user switching support</a> by default.
+This configuration option allows one to specify the group that applications must
+run as, if user switching fails or is disabled.</p></div>
+<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
+The default value is the primary group of the user specifified by
+<a href="#PassengerDefaultUser">passenger_default_user</a>.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">This option has no effect when you are using <a href="#flying_passenger">Flying Passenger</a>. There is currently no way to set this option when using Flying Passenger, but if you want to disable user switching for Flying Passenger then you can do so by starting the Flying Passenger daemon as a non-root user.</td>
+</tr></table>
 </div>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_connection_handling_options" data-comment-topic="connection-handling-options-8jgq90">5.5. Connection handling options</h3>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerUseGlobalQueue" data-comment-topic="passenger-use-global-queue-on-off--14h9n22">5.5.1. passenger_use_global_queue <on|off></h4>
-<div class="paragraph"><p>Turns the use of global queuing on or off.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_show_version_in_header_lt_on_off_gt"></span><h4 data-comment-topic="passenger-show-version-in-header-on-off--2h49av" data-anchor="_passenger_show_version_in_header_lt_on_off_gt">6.12.6. passenger_show_version_in_header <on|off></h4>
+<div class="paragraph"><p>When turned on, Phusion Passenger will output its version number in the <span class="monospaced">Server</span> and <span class="monospaced">X-Powered-By</span> header in all Phusion Passenger-served requests:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>Server: nginx/1.3.11 + Phusion Passenger 4.0.0
+X-Powered-By: Phusion Passenger 4.0.0</pre>
+</div>
+</div>
+<div class="paragraph"><p>When turned off, the version number will be hidden:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>Server: nginx/1.3.11 + Phusion Passenger
+X-Powered-By: Phusion Passenger</pre>
+</div>
+</div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the <em>http</em> configuration block.
@@ -2064,99 +3699,18 @@ In an <em>if</em> configuration scope.
 </li>
 </ul></div>
 <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>on</em>.</p></div>
-<div class="paragraph"><p><em>This feature is sponsored by <a href="http://www.37signals.com/">37signals</a>.</em></p></div>
-<div class="paragraph">
-<div class="title">What does this option do?</div>
-<p>Recall that Phusion Passenger spawns multiple backend processes (e.g. multiple
-Ruby on Rails processes), each which processes HTTP requests serially. One of
-Phusion Passenger’s jobs is to forward HTTP requests to a suitable backend
-process. A backend process may take an arbitrary amount of time to process a
-specific HTTP request. If the websites are (temporarily) under high load, and
-the backend processes cannot process the requests fast enough, then some
-requests may have to be queued.</p>
-</div>
-<div class="paragraph"><p>If global queuing is turned off, then Phusion Passenger will use <em>fair load
-balancing</em>. This means that each backend process will have its own private
-queue. Phusion Passenger will forward an HTTP request to the backend process
-that has the least amount of requests in its queue.</p></div>
-<div class="paragraph"><p>If global queuing is turned on, then Phusion Passenger will use a global queue
-that’s shared between all backend processes. If an HTTP request comes in, and
-all the backend processes are still busy, then Phusion Passenger will wait until
-at least one backend process is done, and will then forward the request to that
-process.</p></div>
-<div class="paragraph">
-<div class="title">When to turn on global queuing?</div>
-<p>You should turn on global queuing if one of your web applications may have
-long-running requests.</p>
-</div>
-<div class="paragraph"><p>For example suppose that:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-global queuing is turned off.
-</p>
-</li>
-<li>
-<p>
-we’re currently in a state where all backend processes have 3 requests in
-  their queue, except for a single backend process, which has 1 request in its
-  queue.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The situation looks like this:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>Backend process A:  [*     ]  (1 request in queue)
-Backend process B:  [***   ]  (3 requests in queue)
-Backend process C:  [***   ]  (3 requests in queue)
-Backend process D:  [***   ]  (3 requests in queue)</pre>
-</div>
-</div>
-<div class="paragraph"><p>Each process is currently serving short-running requests.</p></div>
-<div class="paragraph"><p>Phusion Passenger will forward the next request to backend process A. A will
-now have 2 items in its queue. We’ll mark this new request with an X:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>Backend process A:  [*X    ]  (2 request in queue)
-Backend process B:  [***   ]  (3 requests in queue)
-Backend process C:  [***   ]  (3 requests in queue)
-Backend process D:  [***   ]  (3 requests in queue)</pre>
-</div>
-</div>
-<div class="paragraph"><p>Assuming that B, C and D still aren’t done with their current request, the next
-HTTP request - let’s call this Y - will be forwarded to backend process A as
-well, because it has the least number of items in its queue:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>Backend process A:  [*XY   ]  (3 requests in queue)
-Backend process B:  [***   ]  (3 requests in queue)
-Backend process C:  [***   ]  (3 requests in queue)
-Backend process D:  [***   ]  (3 requests in queue)</pre>
-</div>
-</div>
-<div class="paragraph"><p>But if request X happens to be a long-running request that needs 60 seconds to
-complete, then we’ll have a problem. Y won’t be processed for at least 60
-seconds. It would have been a better idea if Y was forward to processes B, C or
-D instead, because they only have short-living requests in their queues.</p></div>
-<div class="paragraph"><p>This problem will be avoided entirely if you turn global queuing on. With global
-queuing, all backend processes will share the same queue. The first backend
-process that becomes available will take from the queue, and so this
-“queuing-behind-long-running-request” problem will never occur.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_ignore_client_abort_lt_on_off_gt" data-comment-topic="passenger-ignore-client-abort-on-off--19bapt2">5.5.2. passenger_ignore_client_abort <on|off></h4>
-<div class="paragraph"><p>Normally, when the HTTP client aborts the connection (e.g. when the user clicked on "Stop"
-in the browser), the connection with the application process will be closed too. If the
-application process continues to send its response, then that will result in EPIPE errors
-in the application, which will be printed in the error log if the application doesn’t
-handle them gracefully.</p></div>
-<div class="paragraph"><p>If this option is turned on then upon client abort Phusion Passenger will continue to
-read the application process’s response while discarding all the read data. This prevents
-EPIPE errors but it’ll also mean the backend process will be unavailable for new requests
-until it is done sending its response.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerFriendlyErrorPages"></span><h4 data-comment-topic="passenger-friendly-error-pages-on-off--1ti1a0e" data-anchor="PassengerFriendlyErrorPages">6.12.7. passenger_friendly_error_pages <on|off></h4>
+<div class="paragraph"><p>Phusion Passenger can display friendly error pages whenever an application fails
+to start. This friendly error page presents the startup error message, some
+suggestions for solving the problem, and a backtrace. This feature is very useful
+during application development and useful for less experienced system administrators,
+but the page might reveal potentially sensitive information, depending on the
+application. Experienced system administrators who are using Phusion Passenger
+on serious production servers should consider turning this feature off.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the <em>http</em> configuration block.
@@ -2178,37 +3732,81 @@ In an <em>if</em> configuration scope.
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>on</em>.</p></div>
+</div>
 </div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_resource_control_and_optimization_options"></span><h3 data-comment-topic="resource-control-and-optimization-options-xd7evs" data-anchor="_resource_control_and_optimization_options">6.13. Resource control and optimization options</h3>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_set_cgi_param_lt_cgi_environment_name_gt_lt_value_gt" data-comment-topic="passenger-set-cgi-param-cgi-environment-name-value--rx9gc0">5.5.3. passenger_set_cgi_param <CGI environment name> <value></h4>
-<div class="paragraph"><p>Allows one to define additional CGI environment variables to pass to the backend
-application. This is equivalent to ngx_http_fastcgi_module’s <em>fastcgi_param</em>
-directive, and is comparable to ngx_http_proxy_module’s <em>proxy_set_header</em> option.
-Nginx variables in the value are interpolated.</p></div>
-<div class="paragraph"><p>For example:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre># Application will see a CGI environment "APP_NAME" with value "my super blog".
-passenger_set_cgi_param APP_NAME "my super blog";
-
-# Nginx variables are interpolated.
-passenger_set_cgi_param EXTRA_REQUEST_METHOD method=$request_method;</pre>
-</div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMaxPoolSize"></span><h4 data-comment-topic="passenger-max-pool-size-integer--3jzefs" data-anchor="PassengerMaxPoolSize">6.13.1. passenger_max_pool_size <integer></h4>
+<div class="paragraph"><p>The maximum number of <a href="#application_process">application processes</a> that may
+simultanously exist. A larger number results in higher memory usage,
+but improves the ability to handle concurrent HTTP requests.</p></div>
+<div class="paragraph"><p>The optimal value depends on your system’s hardware and your workload. You can learn more at the Phusion article <a href="http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/">Tuning Phusion Passenger’s concurrency settings</a>.</p></div>
+<div class="paragraph"><p>If you find that your server is running out of memory then you should lower this value.</p></div>
+<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
+The default value is <em>6</em>.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">This option has no effect when you are using <a href="#flying_passenger">Flying Passenger</a>. Instead, you should configure this by passing the <span class="monospaced">--max-pool-size</span> command line option to the Flying Passenger daemon.</td>
+</tr></table>
 </div>
-<div class="paragraph"><p>If you want to set an HTTP header, then you must set it in the CGI environment name
-format, i.e. <em>HTTP_*</em>:</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMinInstances"></span><h4 data-comment-topic="passenger-min-instances-integer--uclykt" data-anchor="PassengerMinInstances">6.13.2. passenger_min_instances <integer></h4>
+<div class="paragraph"><p>This specifies the minimum number of application processes that should exist for a
+given application. You should set this option to a
+non-zero value if you want to avoid potentially long startup times after a website
+has been <a href="#idle_process">idle</a> for an extended period.</p></div>
+<div class="paragraph"><p>Please note that this option does <strong>not</strong> pre-start application processes during Nginx
+startup. It just makes sure that when the application is first accessed:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+at least the given number of processes will be spawned.
+</p>
+</li>
+<li>
+<p>
+the given number of processes will be kept around even when processes are being
+   idle cleaned (see <a href="#PassengerPoolIdleTime">passenger_pool_idle_time</a>).
+</p>
+</li>
+</ol></div>
+<div class="paragraph"><p>If you want to pre-start application processes during Nginx startup, then you should use the <a href="#PassengerPreStart">passenger_pre_start</a> directive, possibly in combination with
+<em>passenger_min_instances</em>. This behavior might seem counter-intuitive at first sight,
+but <a href="#PassengerPreStart">passenger_pre_start</a> explains the rationale behind it.</p></div>
+<div class="paragraph"><p>For example, suppose that you have the following configuration:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre># !!!THIS IS WRONG!!! Don't do this!
-passenger_set_cgi_param X-Forwarded-For 127.0.0.2;
+<pre>http {
+    ...
+    passenger_max_pool_size 15;
+    passenger_pool_idle_time 10;
 
-# Instead, write it like this:
-passenger_set_cgi_param HTTP_X_FORWARDED_FOR 127.0.0.2;</pre>
+    server {
+        listen 80;
+        server_name foobar.com;
+        root /webapps/foobar/public;
+        passenger_min_instances 3;
+    }
+}</pre>
 </div>
 </div>
-<div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="paragraph"><p>When you start Nginx, there are 0 application processes for <em>foobar.com</em>. Things will
+stay that way until someone visits <em>foobar.com</em>. Suppose that there is only 1 visitor.
+1 application process will be started immediately to serve the visitor, while 2 will
+be spawned in the background. After 10 seconds, when the idle timeout has
+been reached, these 3 application processes will not be cleaned up.</p></div>
+<div class="paragraph"><p>Now suppose that there’s a sudden spike of traffic, and 100 users visit <em>foobar.com</em>
+simultanously. Phusion Passenger will start 12 more application processes. After the idle
+timeout of 10 seconds have passed, Phusion Passenger will clean up 12 application
+processes, keeping 3 processes around.</p></div>
+<div class="paragraph"><p>The passenger_min_instances option may occur in the following places:</p></div>
+<div class="ulist"><ul>
 <li>
 <p>
 In the <em>http</em> configuration block.
@@ -2230,23 +3828,20 @@ In an <em>if</em> configuration scope.
 </p>
 </li>
 </ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1</em>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_pass_header_lt_header_name_gt" data-comment-topic="passenger-pass-header-header-name--1cg31je">5.5.4. passenger_pass_header <header name></h4>
-<div class="paragraph"><p>Some headers generated by backend applications are not forwarded to the HTTP client,
-e.g. <em>X-Accel-Redirect</em> which is directly processed by Nginx and then discarded from
-the final response. This directive allows one to force Nginx to pass those headers
-anyway, similar to how <em>proxy_pass_header</em> works.</p></div>
-<div class="paragraph"><p>For example:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>location / {
-   passenger_pass_header X-Accel-Redirect;
-}</pre>
-</div>
-</div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_max_instances_lt_integer_gt"></span><h4 data-comment-topic="passenger-max-instances" data-anchor="_passenger_max_instances_lt_integer_gt">6.13.3. passenger_max_instances <integer></h4>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>The maximum number of application processes that may simultaneously exist
+for an application. This helps to make sure that a single application
+will not occupy all available slots in the application pool.</p></div>
+<div class="paragraph"><p>This value must be less than <a href="#PassengerMaxPoolSize">passenger_max_pool_size</a>. A value of 0
+means that there is no limit placed on the number of processes a single application
+may spawn, i.e. only the global limit of <a href="#PassengerMaxPoolSize">passenger_max_pool_size</a>
+will be enforced.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the <em>http</em> configuration block.
@@ -2268,57 +3863,82 @@ In an <em>if</em> configuration scope.
 </p>
 </li>
 </ul></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>0</em>.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/tip.png" alt="Tip">
+</td>
+<td class="content">
+<div class="title">Practical usage example</div>
+<div class="paragraph"><p>Suppose that you’re hosting two web applications on your server, a personal
+blog and an e-commerce website. You’ve set <a href="#PassengerMaxPoolSize">passenger_max_pool_size</a>
+to 10. The e-commerce website is more important to you. You can then set
+<em>passenger_max_instances</em> to 3 for your blog, so that it will never spawn more
+than 3 processes, even if it suddenly gets a lot of traffic. Your e-commerce website
+on the other hand will be free to spawn up to 10 processes if it gets a lot of traffic.</p></div>
+</td>
+</tr></table>
+</div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_buffer_response_lt_on_off_gt" data-comment-topic="passenger-buffer-response-on-off--1twmh51">5.5.5. passenger_buffer_response <on|off></h4>
-<div class="paragraph"><p>When turned on, application-generated responses are buffered in memory and also on
-disk if the response is larger than a certain threshold. By buffering responses,
-protection is provided against slow HTTP clients that can not read your response
-immediately.</p></div>
-<div class="paragraph"><p>For example, consider an HTTP client that’s on a dial-up modem link, and your
-application instance generates a 2 MB response. If response buffering is turned
-off then your application instance will be blocked until the entire 2 MB has been
-sent out to the HTTP client. This disallows your application instance to do any useful
-work in the mean time. By enabling response buffering, Phusion Passenger will read
-the application response as quickly as possible and will take care of slow clients.</p></div>
-<div class="paragraph"><p>However, keep in mind that enabling this option will make streaming responses
-impossible. Consider for example this piece of Rails code:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>render :text => lambda { |response, output|
-    10.times do |i|
-        output.write("entry #{i}\n")
-        output.flush
-        sleep 1
-    end
-}</pre>
-</div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_max_instances_per_app_lt_integer_gt"></span><h4 data-comment-topic="passenger-max-instances-per-app-integer--1xhbbne" data-anchor="_passenger_max_instances_per_app_lt_integer_gt">6.13.4. passenger_max_instances_per_app <integer></h4>
+<div class="paragraph"><p>The maximum number of application processes that may simultaneously exist
+for a single application. This helps to make sure that a single application
+will not occupy all available slots in the application pool.</p></div>
+<div class="paragraph"><p>This value must be less than <a href="#PassengerMaxPoolSize">passenger_max_pool_size</a>. A value of 0
+means that there is no limit placed on the number of processes a single application
+may use, i.e. only the global limit of <a href="#PassengerMaxPoolSize">passenger_max_pool_size</a>
+will be enforced.</p></div>
+<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
+The default value is <em>0</em>.</p></div>
 </div>
-<div class="paragraph"><p>…or this piece of Rack code:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>class Response
-    def each
-        10.times do |i|
-            yield("entry #{i}\n")
-            sleep 1
-        end
-    end
-end
-
-app = lambda do |env|
-    [200, { "Content-Type" => "text/plain" }, Response.new]
-end</pre>
-</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerPoolIdleTime"></span><h4 data-comment-topic="passenger-pool-idle-time-integer--xcw65o" data-anchor="PassengerPoolIdleTime">6.13.5. passenger_pool_idle_time <integer></h4>
+<div class="paragraph"><p>The maximum number of seconds that an application process may be idle. That is,
+if an application process hasn’t received any traffic after the given number of
+seconds, then it will be shutdown in order to conserve memory.</p></div>
+<div class="paragraph"><p>Decreasing this value means that applications will have to be spawned
+more often. Since spawning is a relatively slow operation, some visitors may
+notice a small delay when they visit your Rails/Rack website. However, it will also
+free up resources used by applications more quickly.</p></div>
+<div class="paragraph"><p>The optimal value depends on the average time that a visitor spends on a single
+Rails/Rack web page. We recommend a value of <span class="monospaced">2 * x</span>, where <span class="monospaced">x</span> is the average
+number of seconds that a visitor spends on a single Rails/Rack web page. But your
+mileage may vary.</p></div>
+<div class="paragraph"><p>When this value is set to <em>0</em>, application processes will not be shutdown unless
+it’s really necessary, i.e. when Phusion Passenger is out of worker processes
+for a given application and one of the <a href="#inactive_process">inactive application processes</a> needs to
+make place for another application process. Setting the value to 0 is
+recommended if you’re on a non-shared host that’s only running a few
+applications, each which must be available at all times.</p></div>
+<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
+The default value is <em>300</em>.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">This option has no effect when you are using <a href="#flying_passenger">Flying Passenger</a>. Instead, you should configure this by passing the <span class="monospaced">--pool-idle-time</span> command line option to the Flying Passenger daemon.</td>
+</tr></table>
 </div>
-<div class="paragraph"><p>When response buffering is turned on, Phusion Passenger will wait until
-the application is done sending the entire response before forwarding it
-to the client. The client will not receive anything for 10 seconds,
-after which it receives the entire response at once.
-When response buffering is turned off, it works as expected: the client
-receives an "entry X" message every second for 10 seconds.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_max_preloader_idle_time_lt_integer_gt"></span><h4 data-comment-topic="rails-app-spawner-idle-time-integer--1xjqe4b" data-anchor="_passenger_max_preloader_idle_time_lt_integer_gt">6.13.6. passenger_max_preloader_idle_time <integer></h4>
+<div class="paragraph"><p>The ApplicationSpawner server (explained in <a href="#spawning_methods_explained">Spawning methods explained</a>) has an idle timeout, just like the backend processes spawned by
+Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done
+anything for a given period.</p></div>
+<div class="paragraph"><p>This option allows you to set the ApplicationSpawner server’s idle timeout, in
+seconds. A value of <em>0</em> means that it should never idle timeout.</p></div>
+<div class="paragraph"><p>Setting a higher value will mean that the ApplicationSpawner server is kept around
+longer, which may slightly increase memory usage. But as long as the
+ApplicationSpawner server is running, the time to spawn a Ruby on Rails backend
+process only takes about 10% of the time that is normally needed, assuming that
+you’re using the <em>smart</em> or <em>smart-lv2</em> <a href="#RailsSpawnMethod">spawning method</a>. So if your
+system has enough memory, is it recommended that you set this option to a high
+value or to <em>0</em>.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the <em>http</em> configuration block.
@@ -2340,37 +3960,34 @@ In an <em>if</em> configuration scope.
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>on</em>.</p></div>
-</div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_buffer_size" data-comment-topic="passenger-buffer-size-1jfkq87">5.5.6. passenger_buffer_size</h4>
-</div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_buffers" data-comment-topic="passenger-buffers-12q1he5">5.5.7. passenger_buffers</h4>
-</div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_busy_buffer_size" data-comment-topic="passenger-busy-buffer-size-1gde265">5.5.8. passenger_busy_buffer_size</h4>
-<div class="paragraph"><p>These options have the same effect as proxy_module’s similarly named options.
-They can be used to modify the maximum allowed HTTP header size.</p></div>
-</div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>300</em> (5 minutes).</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">This option has no effect when you are using <a href="#flying_passenger">Flying Passenger</a>. Instead, you should configure this by passing the <span class="monospaced">--max-preloader-idle-time</span> command line option to the Flying Passenger daemon.</td>
+</tr></table>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_security_options" data-comment-topic="security-options-1bv93g4">5.6. Security options</h3>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerUserSwitching" data-comment-topic="passenger-user-switching-on-off--1p37u3l">5.6.1. passenger_user_switching <on|off></h4>
-<div class="paragraph"><p>Whether to enable <a href="#user_switching">user switching support</a>.</p></div>
-<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
-The default value is <em>on</em>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_user_lt_username_gt" data-comment-topic="passenger-user-username--b06ur7">5.6.2. passenger_user <username></h4>
-<div class="paragraph"><p>If <a href="#user_switching">user switching support</a> is enabled, then Phusion Passenger will
-by default run the web application as the owner of the file <em>config/environment.rb</em>
-(for Rails apps) or <em>config.ru</em> (for Rack apps). This option allows you to override
-that behavior and explicitly set a user to run the web application as, regardless
-of the ownership of <em>environment.rb</em>/<em>config.ru</em>.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerConcurrencyModel"></span><h4 data-comment-topic="passenger-concurrency-model-process-thread--brcvkk" data-anchor="PassengerConcurrencyModel">6.13.7. passenger_concurrency_model <process|thread></h4>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 4.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>Specifies the I/O concurrency model that should be used for application processes. Phusion Passenger supports two concurrency models:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<em>process</em> - single-threaded, multi-processed I/O concurrency. Each application process only has a single thread and can only handle 1 request at a time. This is the concurrency model that Ruby applications traditionally used. It has excellent compatiblity (can work with applications that are not designed to be thread-safe) but is unsuitable workloads in which the application has to wait for a lot of external I/O (e.g. HTTP API calls), and uses more memory because each process has  [...]
+</p>
+</li>
+<li>
+<p>
+<em>thread</em> - multi-threaded, multi-processed I/O concurrency. Each application process has multiple threads (customizable via <a href="#PassengerThreadCount">passenger_thread_count</a>). This model provides much better I/O concurrency and uses less memory because threads share memory with each other within the same process. However, using this model may cause compatibility problems if the application is not designed to be thread-safe.
+</p>
+</li>
+</ul></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the <em>http</em> configuration block.
@@ -2392,19 +4009,14 @@ In an <em>if</em> configuration scope.
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>process</em>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_user_lt_group_name_gt" data-comment-topic="passenger-user-group-name--1fco4j7">5.6.3. passenger_user <group name></h4>
-<div class="paragraph"><p>If <a href="#user_switching">user switching support</a> is enabled, then Phusion Passenger will
-by default run the web application as the primary group of the owner of the file
-<em>config/environment.rb</em> (for Rails apps) or <em>config.ru</em> (for Rack apps). This option
-allows you to override that behavior and explicitly set a group to run the web application
-as, regardless of the ownership of <em>environment.rb</em>/<em>config.ru</em>.</p></div>
-<div class="paragraph"><p><em><group name></em> may also be set to the special value <em>!STARTUP_FILE!</em>, in which case
-the web application’s group will be set to <em>environment.rb</em>/<em>config.ru</em>'s group.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerThreadCount"></span><h4 data-comment-topic="passenger-thread-count-number--1kd6ffy" data-anchor="PassengerThreadCount">6.13.8. passenger_thread_count <number></h4>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 4.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>Specifies the number of threads that Phusion Passenger should spawn per application process. This option only has effect if <a href="#PassengerConcurrencyModel">passenger_concurrency_model</a> is <em>thread</em>.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the <em>http</em> configuration block.
@@ -2426,36 +4038,20 @@ In an <em>if</em> configuration scope.
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
-</div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerDefaultUser" data-comment-topic="passenger-default-user-username--1h6cdmf">5.6.4. passenger_default_user <username></h4>
-<div class="paragraph"><p>Phusion Passenger enables <a href="#user_switching">user switching support</a> by default.
-This configuration option allows one to specify the user that applications must
-run as, if user switching fails or is disabled.</p></div>
-<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
-The default value is <em>nobody</em>.</p></div>
-</div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerDefaultGroup" data-comment-topic="passenger-default-group-group-name--1qxn2qa">5.6.5. Passenger_default_group <group name></h4>
-<div class="paragraph"><p>Phusion Passenger enables <a href="#user_switching">user switching support</a> by default.
-This configuration option allows one to specify the group that applications must
-run as, if user switching fails or is disabled.</p></div>
-<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
-The default value is the primary group of the user specifified by
-<a href="#PassengerDefaultUser">passenger_default_user</a>.</p></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1</em>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_friendly_error_pages_lt_on_off_gt" data-comment-topic="passenger-friendly-error-pages-on-off--27mews">5.6.6. passenger_friendly_error_pages <on|off></h4>
-<div class="paragraph"><p>Phusion Passenger can display friendly error pages whenever an application fails
-to start. This friendly error page presents the startup error message, some
-suggestions for solving the problem, and a backtrace. This feature is very useful
-during application development and useful for less experienced system administrators,
-but the page might reveal potentially sensitive information, depending on the
-application. Experienced system administrators who are using Phusion Passenger
-on serious production servers should consider turning this feature off.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMaxRequests"></span><h4 data-comment-topic="passenger-max-requests-integer--sgzint" data-anchor="PassengerMaxRequests">6.13.9. passenger_max_requests <integer></h4>
+<div class="paragraph"><p>The maximum number of requests an application process will process. After
+serving that many requests, the application process will be shut down and
+Phusion Passenger will restart it. A value of 0 means that there is no maximum:
+an application process will thus be shut down when its idle timeout has been
+reached.</p></div>
+<div class="paragraph"><p>This option is useful if your application is leaking memory. By shutting
+it down after a certain number of requests, all of its memory is guaranteed
+to be freed by the operating system.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the <em>http</em> configuration block.
@@ -2477,90 +4073,32 @@ In an <em>if</em> configuration scope.
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>on</em>.</p></div>
-</div>
-</div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_resource_control_and_optimization_options" data-comment-topic="resource-control-and-optimization-options-xd7evs">5.7. Resource control and optimization options</h3>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerMaxPoolSize" data-comment-topic="passenger-max-pool-size-integer--3jzefs">5.7.1. passenger_max_pool_size <integer></h4>
-<div class="paragraph"><p>The maximum number of Ruby on Rails or Rack application instances that may
-be simultaneously active. A larger number results in higher memory usage,
-but improved ability to handle concurrent HTTP clients.</p></div>
-<div class="paragraph"><p>The optimal value depends on your system’s hardware and the server’s average
-load. You should experiment with different values. But generally speaking,
-the value should be at least equal to the number of CPUs (or CPU cores) that
-you have. If your system has 2 GB of RAM, then we recommend a value of <em>30</em>.
-If your system is a Virtual Private Server (VPS) and has about 256 MB RAM, and
-is also running other services such as MySQL, then we recommend a value of <em>2</em>.</p></div>
-<div class="paragraph"><p>If you find that your server is unable to handle the load on your Rails/Rack websites
-(i.e. running out of memory) then you should lower this value. (Though if your
-sites are really that popular, then you should strongly consider upgrading your
-hardware or getting more servers.)</p></div>
-<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration bock.
-The default value is <em>6</em>.</p></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>0</em>.</p></div>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/tip.png" alt="Tip">
+<img src="./images/icons/caution.png" alt="Caution">
 </td>
-<td class="content">We strongly recommend you to <a href="#reducing_memory_usage">use Ruby Enterprise Edition</a>. This allows you to reduce the memory usage of your Ruby on Rails applications
-by about 33%. And it’s not hard to install.</td>
-</tr></table>
+<td class="content">
+<div class="paragraph"><p>The <a href="#PassengerMaxRequests">passenger_max_requests</a> directive should be considered
+as a workaround for misbehaving applications. It is advised that you fix the
+problem in your application rather than relying on these directives as a
+measure to avoid memory leaks.</p></div>
+</td>
+</tr></table>
 </div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerMinInstances" data-comment-topic="passenger-min-instances-integer--uclykt">5.7.2. passenger_min_instances <integer></h4>
-<div class="paragraph"><p>This specifies the minimum number of application instances that must be kept around
-whenever Phusion Passenger cleans up idle instances. You should set this option to a
-non-zero value if you want to avoid potentially long startup times after a website
-has been idle for an extended period.</p></div>
-<div class="paragraph"><p>Please note that this option does <strong>not</strong> pre-start application instances during Nginx
-startup. It just makes sure that when the application is first accessed:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-at least the given number of instances will be spawned.
-</p>
-</li>
-<li>
-<p>
-the given number of processes will be kept around even when instances are being
-   idle cleaned (see <a href="#PassengerPoolIdleTime">passenger_pool_idle_time</a>).
-</p>
-</li>
-</ol></div>
-<div class="paragraph"><p>If you want to pre-start application instances during Nginx startup, then you should use the <a href="#PassengerPreStart">passenger_pre_start</a> directive, possibly in combination with
-<em>passenger_min_instances</em>. This behavior might seem counter-intuitive at first sight,
-but <a href="#PassengerPreStart">passenger_pre_start</a> explains the rationale behind it.</p></div>
-<div class="paragraph"><p>For example, suppose that you have the following configuration:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>http {
-    ...
-    passenger_max_pool_size 15;
-    passenger_pool_idle_time 10;
-
-    server {
-        listen 80;
-        server_name foobar.com;
-        root /webapps/foobar/public;
-        passenger_min_instances 3;
-    }
-}</pre>
-</div>
-</div>
-<div class="paragraph"><p>When you start Nginx, there are 0 application instances for <em>foobar.com</em>. Things will
-stay that way until someone visits <em>foobar.com</em>. Suppose that there is only 1 visitor.
-1 application instance will be started immediately to serve the visitor, while 2 will
-be spawned in the background. After 10 seconds, when the idle timeout has
-been reached, these 3 application instances will not be cleaned up.</p></div>
-<div class="paragraph"><p>Now suppose that there’s a sudden spike of traffic, and 100 users visit <em>foobar.com</em>
-simultanously. Phusion Passenger will start 12 more application instances. After the idle
-timeout of 10 seconds have passed, Phusion Passenger will clean up 12 application
-instances, keeping 3 instances around.</p></div>
-<div class="paragraph"><p>The passenger_min_instances option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMaxRequestTime"></span><h4 data-comment-topic="passenger-max-request-time-seconds--1htog2g" data-anchor="PassengerMaxRequestTime">6.13.10. passenger_max_request_time <seconds></h4>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>The maximum amount of time, in seconds, that an application process may take
+to process a request. If the request takes longer than this amount of time,
+then the application process will be forcefully shut down, and possibly
+restarted upon the next request. A value of 0 means that there is no time limit.</p></div>
+<div class="paragraph"><p>This option is useful for preventing your application from freezing for an
+indefinite period of time.</p></div>
+<div class="paragraph"><p>This option may occur in the following places:</p></div>
+<div class="ulist"><ul>
 <li>
 <p>
 In the <em>http</em> configuration block.
@@ -2582,54 +4120,68 @@ In an <em>if</em> configuration scope.
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1</em>.</p></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>0</em>.</p></div>
+<div class="paragraph">
+<div class="title">Example</div>
+<p>Suppose that most of your requests are known to finish within 2 seconds.
+However, there is one URI, <em>/expensive_computation</em>, which is known to take up
+to 10 seconds. You can then configure Phusion Passenger as follows:</p>
 </div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_max_instances_per_app_lt_integer_gt" data-comment-topic="passenger-max-instances-per-app-integer--1p7q3cf">5.7.3. passenger_max_instances_per_app <integer></h4>
-<div class="paragraph"><p>The maximum number of application instances that may be simultaneously active
-for a single application. This helps to make sure that a single application
-will not occupy all available slots in the application pool.</p></div>
-<div class="paragraph"><p>This value must be less than <a href="#PassengerMaxPoolSize">passenger_max_pool_size</a>. A value of 0
-means that there is no limit placed on the number of instances a single application
-may use, i.e. only the global limit of <a href="#PassengerMaxPoolSize">passenger_max_pool_size</a>
-will be enforced.</p></div>
-<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
-The default value is <em>0</em>.</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>server {
+    listen 80;
+    server_name www.example.com;
+    root /webapps/my_app/public;
+    passenger_enabled on;
+    passenger_max_request_time 2;
+    location /expensive_compuation {
+        passenger_enabled on;
+        passenger_max_request_time 10;
+    }
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>If a request to <em>/expensive_computation</em> takes more than 10 seconds,
+or if a request to any other URI takes more than 2 seconds,
+then the corresponding application process will be forced to shutdown.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/caution.png" alt="Caution">
+</td>
+<td class="content">
+<div class="paragraph"><p>The <a href="#PassengerMaxRequestTime">passenger_max_request_time</a> directive should be
+considered as a workaround for misbehaving applications. It is advised that you
+fix the problem in your application rather than relying on these directives as a
+measure to avoid freezing applications.</p></div>
+</td>
+</tr></table>
+</div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">
+<div class="paragraph"><p>This option is currently only available for Ruby apps. It is not yet available
+for Python and Node.js.</p></div>
+</td>
+</tr></table>
 </div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerPoolIdleTime" data-comment-topic="passenger-pool-idle-time-integer--xcw65o">5.7.4. passenger_pool_idle_time <integer></h4>
-<div class="paragraph"><p>The maximum number of seconds that an application instance may be idle. That is,
-if an application instance hasn’t received any traffic after the given number of
-seconds, then it will be shutdown in order to conserve memory.</p></div>
-<div class="paragraph"><p>Decreasing this value means that applications will have to be spawned
-more often. Since spawning is a relatively slow operation, some visitors may
-notice a small delay when they visit your Rails/Rack website. However, it will also
-free up resources used by applications more quickly.</p></div>
-<div class="paragraph"><p>The optimal value depends on the average time that a visitor spends on a single
-Rails/Rack web page. We recommend a value of <span class="monospaced">2 * x</span>, where <span class="monospaced">x</span> is the average
-number of seconds that a visitor spends on a single Rails/Rack web page. But your
-mileage may vary.</p></div>
-<div class="paragraph"><p>When this value is set to <em>0</em>, application instances will not be shutdown unless
-it’s really necessary, i.e. when Phusion Passenger is out of worker processes
-for a given application and one of the inactive application instances needs to
-make place for another application instance. Setting the value to 0 is
-recommended if you’re on a non-shared host that’s only running a few
-applications, each which must be available at all times.</p></div>
-<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
-The default value is <em>300</em>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerMaxRequests" data-comment-topic="passenger-max-requests-integer--sgzint">5.7.5. passenger_max_requests <integer></h4>
-<div class="paragraph"><p>The maximum number of requests an application instance will process. After
-serving that many requests, the application instance will be shut down and
-Phusion Passenger will restart it. A value of 0 means that there is no maximum:
-an application instance will thus be shut down when its idle timeout has been
-reached.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMemoryLimit"></span><h4 data-comment-topic="passenger-memory-limit-integer--1ry7dwx" data-anchor="PassengerMemoryLimit">6.13.11. passenger_memory_limit <integer></h4>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>The maximum amount of memory that an application process may use, in megabytes.
+Once an application process has surpassed its memory limit, it will process
+all the requests currently present in its queue and then shut down.
+A value of 0 means that there is no maximum: the application’s memory usage
+will not be checked.</p></div>
 <div class="paragraph"><p>This option is useful if your application is leaking memory. By shutting
-it down after a certain number of requests, all of its memory is guaranteed
-to be freed by the operating system.</p></div>
+it down, all of its memory is guaranteed to be freed by the operating system.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the <em>http</em> configuration block.
@@ -2653,35 +4205,52 @@ In an <em>if</em> configuration scope.
 </ul></div>
 <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>0</em>.</p></div>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/caution.png" alt="Caution">
+<img src="./images/icons/note.png" alt="Note">
 </td>
 <td class="content">
-<div class="paragraph"><p>The <a href="#PassengerMaxRequests">passenger_max_requests</a> directive should be considered
-as a workaround for misbehaving applications. It is advised that you fix the
+<div class="title">A word about permissions</div>
+<div class="paragraph"><p>The <a href="#PassengerMemoryLimit">passenger_memory_limit</a> directive uses the
+<span class="monospaced">ps</span> command to query memory usage information. On Linux, it further
+queries <span class="monospaced">/proc</span> to obtain additional memory usage information that’s
+not obtainable through <span class="monospaced">ps</span>. You should ensure that the <span class="monospaced">ps</span> works
+correctly and that the <span class="monospaced">/proc</span> filesystem is accessible by the
+<span class="monospaced">PassengerHelperAgent</span> process.</p></div>
+</td>
+</tr></table>
+</div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/caution.png" alt="Caution">
+</td>
+<td class="content">
+<div class="paragraph"><p>The <a href="#PassengerMaxRequests">passenger_max_requests</a> and
+<a href="#PassengerMemoryLimit">passenger_memory_limit</a> directives should be considered
+as workarounds for misbehaving applications. It is advised that you fix the
 problem in your application rather than relying on these directives as a
 measure to avoid memory leaks.</p></div>
 </td>
-</tr></table>
+</tr></table>
 </div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerPreStart" data-comment-topic="passenger-pre-start-url--qeevln">5.7.6. passenger_pre_start <url></h4>
-<div class="paragraph"><p>By default, Phusion Passenger does not start any application instances until said
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerPreStart"></span><h4 data-comment-topic="passenger-pre-start-url--npldeb" data-anchor="PassengerPreStart">6.13.12. passenger_pre_start <url></h4>
+<div class="paragraph"><p>By default, Phusion Passenger does not start any application processes until said
 web application is first accessed. The result is that the first visitor of said
 web application might experience a small delay as Phusion Passenger is starting
 the web application on demand. If that is undesirable, then this directive can be
-used to pre-started application instances during Nginx startup.</p></div>
+used to pre-started application processes during Nginx startup.</p></div>
 <div class="paragraph"><p>A few things to be careful of:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 This directive accepts the <strong>URL</strong> of the web application you want to pre-start,
   not a on/off value! This might seem a bit weird, but read on for rationale. As
   for the specifics of the URL:
 </p>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 The domain part of the URL must be equal to the value of the <em>server_name</em>
@@ -2705,7 +4274,7 @@ The path part of the URL must point to some URI that the web application
 <li>
 <p>
 You will probably want to combine this option with
-  <a href="#PassengerMinInstances">passenger_min_instances</a> because application instances
+  <a href="#PassengerMinInstances">passenger_min_instances</a> because application processes
   started with <em>passenger_pre_start</em> are subject to the usual idle timeout rules.
   See the example below for an explanation.
 </p>
@@ -2713,6 +4282,14 @@ You will probably want to combine this option with
 </ul></div>
 <div class="paragraph"><p>This option may only occur in the <em>http</em> configuration block. It may be specified
 any number of times.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">This option is currently not available when using <a href="#flying_passenger">Flying Passenger</a>.</td>
+</tr></table>
+</div>
 <div class="sect4">
 <h5 id="_example_1_basic_usage">Example 1: basic usage</h5>
 <div class="paragraph"><p>Suppose that you have the following web applications.</p></div>
@@ -2767,7 +4344,7 @@ passenger_pre_start http://bar.com:3500/;      # <--- added</pre>
     listen 80;
     server_name myblog.com;
     root /webapps/wordpress;
-    rails_base_uri /store;
+    passenger_base_uri /store;
 }</pre>
 </div>
 </div>
@@ -2778,7 +4355,7 @@ passenger_pre_start http://bar.com:3500/;      # <--- added</pre>
     listen 80;
     server_name myblog.com;
     root /webapps/wordpress;
-    rails_base_uri /store;
+    passenger_base_uri /store;
 }
 
 passenger_pre_start http://myblog.com/store;    # <----- added</pre>
@@ -2794,10 +4371,10 @@ The following example is wrong and won’t pre-start the store web application:<
 </div>
 <div class="sect4">
 <h5 id="_example_3_combining_with_passenger_min_instances">Example 3: combining with passenger_min_instances</h5>
-<div class="paragraph"><p>Application instances started with passenger_pre_start are
+<div class="paragraph"><p>Application processes started with passenger_pre_start are
 also subject to the idle timeout rules as specified by
 <a href="#PassengerPoolIdleTime">passenger_pool_idle_time</a>! That means that by default,
-the pre-started application instances for foo.com are bar.com are shut down
+the pre-started application processes for foo.com are bar.com are shut down
 after a few minutes of inactivity. If you don’t want that to happen, then
 you should combine passenger_pre_start with
 <a href="#PassengerMinInstances">passenger_min_instances</a>, like this:</p></div>
@@ -2882,14 +4459,14 @@ the request ending up at a different web server in the cluster.</p></div>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_logging_and_debugging_options" data-comment-topic="logging-and-debugging-options-14e91ni">5.8. Logging and debugging options</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_logging_and_debugging_options"></span><h3 data-comment-topic="logging-and-debugging-options-14e91ni" data-anchor="_logging_and_debugging_options">6.14. Logging and debugging options</h3>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_log_level_lt_integer_gt" data-comment-topic="passenger-log-level-integer--17snhon">5.8.1. passenger_log_level <integer></h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerLogLevel"></span><h4 data-comment-topic="passenger-log-level-integer--17snhon" data-anchor="PassengerLogLevel">6.14.1. passenger_log_level <integer></h4>
 <div class="paragraph"><p>This option allows one to specify how much information Phusion Passenger should
 write to the Nginx error log file. A higher log level value means that more
 information will be logged.</p></div>
 <div class="paragraph"><p>Possible values are:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 <em>0</em>: Show only errors and warnings.
@@ -2917,59 +4494,36 @@ information will be logged.</p></div>
 The default is <em>0</em>.</p></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_debug_log_file_lt_filename_gt" data-comment-topic="passenger-debug-log-file-filename--21ubaj">5.8.2. passenger_debug_log_file <filename></h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_debug_log_file_lt_filename_gt"></span><h4 data-comment-topic="passenger-debug-log-file-filename--21ubaj" data-anchor="_passenger_debug_log_file_lt_filename_gt">6.14.2. passenger_debug_log_file <filename></h4>
 <div class="paragraph"><p>By default Phusion Passenger debugging and error messages are written to the global
 web server error log. This option allows one to specify the file that debugging and
 error messages should be written to instead.</p></div>
 <div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">This option has no effect when you are using <a href="#flying_passenger">Flying Passenger</a>. Instead, you should configure this by passing the <span class="monospaced">--log-file</span> command line option to the Flying Passenger daemon.</td>
+</tr></table>
 </div>
 </div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_ruby_on_rails_specific_options" data-comment-topic="ruby-on-rails-specific-options-12vfokt">5.9. Ruby on Rails-specific options</h3>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="RailsEnv" data-comment-topic="rails-env-string--jlh7v9">5.9.1. rails_env <string></h4>
-<div class="paragraph"><p>This option allows one to specify the default <span class="monospaced">RAILS_ENV</span> value.</p></div>
-<div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-In the <em>http</em> configuration block.
-</p>
-</li>
-<li>
-<p>
-In a <em>server</em> configuration block.
-</p>
-</li>
-<li>
-<p>
-In a <em>location</em> configuration block.
-</p>
-</li>
-<li>
-<p>
-In an <em>if</em> configuration scope.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>production</em>.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_debugger_lt_on_off_gt"></span><h4 data-comment-topic="passenger-debugger-on-off--1wkuq85" data-anchor="_passenger_debugger_lt_on_off_gt">6.14.3. passenger_debugger <on|off></h4>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>Turns support for application debugging on or off. In case of Ruby applications,
+turning this option on will cause them to load the <span class="monospaced">ruby-debug</span> gem (when on Ruby 1.8)
+or the <span class="monospaced">debugger</span> gem (when on Ruby 1.9). If you’re using Bundler, you should add
+this to your Gemfile:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>gem 'ruby-debug', :platforms => :ruby_18
+gem 'debugger', :platforms => :ruby_19</pre>
+</div>
 </div>
-<div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_rails_framework_spawner_idle_time_lt_integer_gt" data-comment-topic="rails-framework-spawner-idle-time-integer--q5ljd5">5.9.2. rails_framework_spawner_idle_time <integer></h4>
-<div class="paragraph"><p>The FrameworkSpawner server (explained in <a href="#spawning_methods_explained">Spawning methods explained</a>) has an idle timeout, just like the backend processes spawned by
-Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done
-anything for a given period.</p></div>
-<div class="paragraph"><p>This option allows you to set the FrameworkSpawner server’s idle timeout, in
-seconds. A value of <em>0</em> means that it should never idle timeout.</p></div>
-<div class="paragraph"><p>Setting a higher value will mean that the FrameworkSpawner server is kept around
-longer, which may slightly increase memory usage. But as long as the
-FrameworkSpawner server is running, the time to spawn a Ruby on Rails backend
-process only takes about 40% of the time that is normally needed, assuming that
-you’re using the <em>smart</em> <a href="#RailsSpawnMethod">spawning method</a>. So if your
-system has enough memory, is it recommended that you set this option to a high
-value or to <em>0</em>.</p></div>
+<div class="paragraph"><p>Once debugging is turned on, you can use the command <span class="monospaced">passenger-irb --debug <PID></span> to attach an rdebug console to the application process with the given PID. Attaching will succeed once the application process executes a <span class="monospaced">debugger</span> command.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the <em>http</em> configuration block.
@@ -2991,24 +4545,16 @@ In an <em>if</em> configuration scope.
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1800</em> (30 minutes).</p></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
+</div>
 </div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_ruby_on_rails_specific_options"></span><h3 data-comment-topic="ruby-on-rails-specific-options-12vfokt" data-anchor="_ruby_on_rails_specific_options">6.15. Ruby on Rails-specific options</h3>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_rails_app_spawner_idle_time_lt_integer_gt" data-comment-topic="rails-app-spawner-idle-time-integer--1xjqe4b">5.9.3. rails_app_spawner_idle_time <integer></h4>
-<div class="paragraph"><p>The ApplicationSpawner server (explained in <a href="#spawning_methods_explained">Spawning methods explained</a>) has an idle timeout, just like the backend processes spawned by
-Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done
-anything for a given period.</p></div>
-<div class="paragraph"><p>This option allows you to set the ApplicationSpawner server’s idle timeout, in
-seconds. A value of <em>0</em> means that it should never idle timeout.</p></div>
-<div class="paragraph"><p>Setting a higher value will mean that the ApplicationSpawner server is kept around
-longer, which may slightly increase memory usage. But as long as the
-ApplicationSpawner server is running, the time to spawn a Ruby on Rails backend
-process only takes about 10% of the time that is normally needed, assuming that
-you’re using the <em>smart</em> or <em>smart-lv2</em> <a href="#RailsSpawnMethod">spawning method</a>. So if your
-system has enough memory, is it recommended that you set this option to a high
-value or to <em>0</em>.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="RailsEnv"></span><h4 data-comment-topic="rails-env-string--jlh7v9" data-anchor="RailsEnv">6.15.1. rails_env <string></h4>
+<div class="paragraph"><p>This option allows one to specify the default <span class="monospaced">RAILS_ENV</span> value.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the <em>http</em> configuration block.
@@ -3030,16 +4576,16 @@ In an <em>if</em> configuration scope.
 </p>
 </li>
 </ul></div>
-<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>600</em> (10 minutes).</p></div>
+<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>production</em>.</p></div>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_rack_specific_options" data-comment-topic="rack-specific-options-13yvdxs">5.10. Rack-specific options</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_rack_and_rails_gt_3_specific_options"></span><h3 data-comment-topic="rack-specific-options-13yvdxs" data-anchor="_rack_and_rails_gt_3_specific_options">6.16. Rack and Rails >= 3 specific options</h3>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="RackEnv" data-comment-topic="rack-env-string--tqmrt0">5.10.1. rack_env <string></h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="RackEnv"></span><h4 data-comment-topic="rack-env-string--tqmrt0" data-anchor="RackEnv">6.16.1. rack_env <string></h4>
 <div class="paragraph"><p>This option allows one to specify the default <span class="monospaced">RACK_ENV</span> value.</p></div>
 <div class="paragraph"><p>This option may occur in the following places:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 In the <em>http</em> configuration block.
@@ -3065,23 +4611,23 @@ In an <em>if</em> configuration scope.
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_deprecated_options" data-comment-topic="deprecated-options-1dtzo0g">5.11. Deprecated options</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deprecated_options"></span><h3 data-comment-topic="deprecated-options-1dtzo0g" data-anchor="_deprecated_options">6.17. Deprecated options</h3>
 <div class="paragraph"><p>The following options have been deprecated, but are still supported for backwards
 compatibility reasons.</p></div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_rails_spawn_method" data-comment-topic="rails-spawn-method-17vdnpt">5.11.1. rails_spawn_method</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_rails_spawn_method"></span><h4 data-comment-topic="rails-spawn-method-17vdnpt" data-anchor="_rails_spawn_method">6.17.1. rails_spawn_method</h4>
 <div class="paragraph"><p>Deprecated in favor of <a href="#PassengerSpawnMethod">passenger_spawn_method</a>.</p></div>
 </div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_analysis_and_system_maintenance" data-comment-topic="analysis-and-system-maintenance-1nnlnj8">6. Analysis and system maintenance</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_analysis_and_system_maintenance"></span><h2 data-comment-topic="analysis-and-system-maintenance-1nnlnj8" data-anchor="_analysis_and_system_maintenance">7. Analysis and system maintenance</h2>
 <div class="sectionbody">
 <div class="paragraph"><p>Phusion Passenger provides a set of tools, which are useful for system analysis,
 maintenance and troubleshooting.</p></div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_inspecting_memory_usage" data-comment-topic="inspecting-memory-usage-1k6y8v0">6.1. Inspecting memory usage</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_inspecting_memory_usage"></span><h3 data-comment-topic="inspecting-memory-usage-1k6y8v0" data-anchor="_inspecting_memory_usage">7.1. Inspecting memory usage</h3>
 <div class="paragraph"><p>Process inspection tools such as <span class="monospaced">ps</span> and <span class="monospaced">top</span> are useful, but they
 <a href="http://groups.google.com/group/phusion-passenger/msg/1fd1c233456d3180">rarely show the correct memory usage</a>.
 The real memory usage is usually lower than what <span class="monospaced">ps</span> and <span class="monospaced">top</span> report.</p></div>
@@ -3089,7 +4635,7 @@ The real memory usage is usually lower than what <span class="monospaced">ps</sp
 the scope of this Users Guide. We kindly refer the interested reader to
 operating systems literature about <em>virtual memory</em> and <em>copy-on-write</em>.</p></div>
 <div class="paragraph"><p>The tool <span class="monospaced">passenger-memory-stats</span> allows one to easily analyze Phusion Passenger’s
-and Apache’s real memory usage. For example:</p></div>
+and the web server’s real memory usage. For example:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
 <pre>[bash at localhost root]# passenger-memory-stats
@@ -3107,6 +4653,12 @@ PID    PPID  Threads  VMSize   Private  Name
 ### Processes: 8
 ### Total private dirty RSS: 3.50 MB
 
+----------- Nginx processes ------------.
+PID    PPID   VMSize     Resident  Name
+----------------------------------------.
+51766  51764  82.7 MB    3.9 MB    nginx: master process ./objs/nginx
+51773  51766  82.9 MB    0.9 MB    nginx: worker process
+
 --------- Passenger processes ---------.
 PID    Threads  VMSize   Private  Name
 ---------------------------------------.
@@ -3119,22 +4671,22 @@ PID    Threads  VMSize   Private  Name
 </div>
 </div>
 <div class="paragraph"><p>The <em>Private</em> or <em>private dirty RSS</em> field shows the <strong>real</strong> memory usage of processes. Here,
-we see that all the Apache worker processes only take less than 1 MB memory each.
-This is a lot less than the 50 MB-ish memory usage as shown in the <em>VMSize</em> column
+we see that all the Apache and Nginx worker processes only take less than 1 MB memory each.
+This is a lot less than the 50-80 MB-ish memory usage as shown in the <em>VMSize</em> column
 (which is what a lot of people think is the real memory usage, but is actually not).</p></div>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/note.png" alt="Note">
+<img src="./images/icons/note.png" alt="Note">
 </td>
 <td class="content">Private dirty RSS reporting only works on Linux. Unfortunately other operating systems
 don’t provide facilities for determining processes' private dirty RSS. On non-Linux systems,
 the Resident Set Size is reported instead.</td>
-</tr></table>
+</tr></table>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_inspecting_phusion_passenger_8217_s_internal_status" data-comment-topic="inspecting-phusion-passenger-s-internal-status-v36wbc">6.2. Inspecting Phusion Passenger’s internal status</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_inspecting_phusion_passenger_8217_s_internal_status"></span><h3 data-comment-topic="inspecting-phusion-passenger-s-internal-status-v36wbc" data-anchor="_inspecting_phusion_passenger_8217_s_internal_status">7.2. Inspecting Phusion Passenger’s internal status</h3>
 <div class="paragraph"><p>One can inspect Phusion Passenger’s internal status with the tool <span class="monospaced">passenger-status</span>.
 This tool must typically be run as root. For example:</p></div>
 <div class="listingblock">
@@ -3152,7 +4704,7 @@ inactive = 1
 </div>
 </div>
 <div class="paragraph"><p>The <em>general information</em> section shows the following information:</p></div>
-<div class="dlist"><dl>
+<div class="dlist"><dl>
 <dt class="hdlist1">
 max
 </dt>
@@ -3196,7 +4748,7 @@ time). The value of <em>inactive</em> equals <span class="monospaced">count - ac
 </dl></div>
 <div class="paragraph"><p>The <em>domains</em> section shows, for each application directory, information about running
 application instances:</p></div>
-<div class="dlist"><dl>
+<div class="dlist"><dl>
 <dt class="hdlist1">
 Sessions
 </dt>
@@ -3243,57 +4795,42 @@ sessions compared to the others, then there might be a problem:</p></div>
 <pre>  PID: 4281      Sessions: 2      Processed: 7      Uptime: 5m 11s
   PID: 17468     Sessions: 8 <-+  Processed: 2      Uptime: 4m 47s
   PID: 4265      Sessions: 1   |  Processed: 6      Uptime: 5m 38s
-  PID: 4275      Sessions: 1   |  Processed: 7      Uptime: 3m 14s
-                               |
-                               +---- "spike"</pre>
-</div>
-</div>
-<div class="paragraph"><p>Possible reasons why spikes can occur:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-Your application is busy processing a request that takes a very long time.
-  If this is the case, then you might want to turn
-  <a href="#PassengerUseGlobalQueue">global queuing</a> on.
-</p>
-</li>
-<li>
-<p>
-Your application is frozen, i.e. has stopped responding. See
-  <a href="#debugging_frozen">Debugging frozen applications</a> for tips.
-</p>
-</li>
-</ol></div>
+  PID: 4275      Sessions: 1   |  Processed: 7      Uptime: 3m 14s
+                               |
+                               +---- "spike"</pre>
+</div>
+</div>
+<div class="paragraph"><p>The most likely reason why a spike occurs is because your application is frozen, i.e. it has stopped responding. See <a href="#debugging_frozen">Debugging frozen applications</a> for tips.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="debugging_frozen" data-comment-topic="debugging-frozen-applications-qoctl8">6.3. Debugging frozen applications</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="debugging_frozen"></span><h3 data-comment-topic="debugging-frozen-applications-qoctl8" data-anchor="debugging_frozen">7.3. Debugging frozen applications</h3>
 <div class="paragraph"><p>If one of your application instances is frozen (stopped responding), then you
 can figure out where it is frozen by killing it with <em>SIGABRT</em>. This will cause the
 application to raise an exception, with a backtrace.</p></div>
-<div class="paragraph"><p>The exception (with full backtrace information) is normally logged into the Apache
+<div class="paragraph"><p>The exception (with full backtrace information) is normally logged into the web server
 error log. But if your application or if its web framework has its own exception logging
 routines, then exceptions might be logged into the application’s log files instead.
 This is the case with Ruby on Rails. So if you kill a Ruby on Rails application with
 <em>SIGABRT</em>, please check the application’s <em>production.log</em> first (assuming that you’re
 running it in a <em>production</em> environment). If you don’t see a backtrace there, check
-the Apache error log.</p></div>
+the web server error log.</p></div>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/note.png" alt="Note">
+<img src="./images/icons/note.png" alt="Note">
 </td>
 <td class="content">It is safe to kill application instances, even in live environments. Phusion Passenger
 will restart killed application instances, as if nothing bad happened.</td>
-</tr></table>
+</tr></table>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_accessing_individual_application_processes" data-comment-topic="accessing-individual-application-processes-1qe4fqk">6.4. Accessing individual application processes</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_accessing_individual_application_processes"></span><h3 data-comment-topic="accessing-individual-application-processes-1qe4fqk" data-anchor="_accessing_individual_application_processes">7.4. Accessing individual application processes</h3>
 <div class="paragraph"><p>When a request is sent to the web server, Phusion Passenger will automatically forward
 the request to the most suitable application process, but sometimes it is desirable to
 be able to directly access the individual application processes. Use cases include, but
 are not limited to:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 One wants to debug a memory leak or memory bloat problem that only seems to appear on
@@ -3353,60 +4890,213 @@ through the <em>X-Passenger-Connect-Password</em> HTTP header, like this:</p></d
 </div>
 </div>
 </div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_attaching_an_irb_console_to_an_application_process"></span><h3 data-comment-topic="attaching-an-irb-console-to-an-application-process-d36enw" data-anchor="_attaching_an_irb_console_to_an_application_process">7.5. Attaching an IRB console to an application process</h3>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>You can attach an IRB console to any application process and inspect its state by executing arbitrary Ruby code. Do this by invoking <span class="monospaced">passenger-irb <PID></span> where <em><PID></em> is the PID of the application process you wish to inspect. Note that the IRB console is currently only available for Ruby apps, not for apps in any other languages.</p></div>
+</div>
 </div>
 </div>
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_tips" data-comment-topic="tips-n4c22d">7. Tips</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_tips"></span><h2 data-comment-topic="tips-n4c22d" data-anchor="_tips">8. Tips</h2>
 <div class="sectionbody">
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="user_switching" data-comment-topic="user-switching-security--zmsy9o">7.1. User switching (security)</h3>
-<div class="paragraph"><p>There is a problem that plagues most PHP web hosts, namely the fact that all PHP
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="user_switching"></span><h3 data-comment-topic="user-switching-security--zmsy9o" data-anchor="user_switching">8.1. User Switching (security feature)</h3>
+<div class="paragraph"><p>Phusion Passenger supports automatic <em>user switching</em>: by default, it attempts to run applications as the "right" user, instead of running all applications as the same user.</p></div>
+<div class="paragraph"><p>To better understand the problem, let us consider the situation with PHP.
+There is a problem that plagues most PHP web hosts, namely the fact that all PHP
 applications are run in the same user context as the web server. So for
 example, Joe’s PHP application will be able to read Jane’s PHP application’s
 passwords. This is obviously undesirable on many servers.</p></div>
-<div class="paragraph"><p>Phusion Passenger solves this problem by implementing <em>user switching</em>. A Rails
-application is started as the owner of the file <em>config/environment.rb</em>,
-and a Rack application is started as the owner of the file <em>config.ru</em>.
-So if <em>/home/webapps/foo/config/environment.rb</em> is owned by <em>joe</em>, then Phusion
-Passenger will launch the corresponding Rails application as <em>joe</em> as well.</p></div>
-<div class="paragraph"><p>This behavior is the default, and you don’t need to configure anything. But
-there are things that you should keep in mind:</p></div>
-<div class="ulist"><ul>
+<div class="paragraph"><p>Phusion Passenger’s <em>user switching</em> feature solves this problem. Applications are
+run as the owner of their "startup file". For Ruby apps, the startup file is
+<span class="monospaced">config.ru</span> (Rack and Rails >= 3) or <span class="monospaced">config/environment.rb</span> (Rails 1 and 2). For
+Python apps, the startup file is <span class="monospaced">passenger_wsgi.py</span>. So suppose that <span class="monospaced">config.ru</span>
+is owned by user <em>joe</em>, then Phusion Passenger will spawn the corresponding
+application as <em>joe</em> as well. The exact rules are a little bit more complicated,
+and they’re explained further down in this section.</p></div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_requirements"></span><h4 data-comment-topic="requirements-15ozqdj" data-anchor="_requirements">8.1.1. Requirements</h4>
+<div class="paragraph"><p>User switching is only enabled when all of the following conditions are met:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+When not using <a href="#flying_passenger">Flying Passenger</a> (this is probably the case):
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+The
+  <a href="#PassengerUserSwitching">passenger_user_switching</a>
+option must be enabled.
+</p>
+</li>
+<li>
+<p>
+The web server’s control process must have root privileges. This is the case on most installations.
+</p>
+</li>
+</ul></div>
+</li>
+<li>
+<p>
+When using <a href="#flying_passenger">Flying Passenger</a>:
+</p>
+<div class="ulist"><ul>
 <li>
 <p>
-The owner of <em>environment.rb</em>/<em>config.ru</em> must have read access to the application’s
-  root directory, and read/write access to the application’s <em>logs</em> directory.
+The Flying Passenger daemon must be run with root privileges.
 </p>
 </li>
+</ul></div>
+</li>
+</ul></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_effects"></span><h4 data-comment-topic="effects-nd2m44" data-anchor="_effects">8.1.2. Effects</h4>
+<div class="paragraph"><p>When not using Flying Passenger, the following table illustrates the effect for different combinations of the requirements.</p></div>
+<table class="tableblock frame-all grid-all" style="
+width:100%;
+">
+<col style="width:33%;">
+<col style="width:33%;">
+<col style="width:33%;">
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>passenger_user_switching on</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>passenger_user_switching off</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Web server has root privileges</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">User switching enabled.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">User switching disabled. Apps are run as
+  <a href="#PassengerDefaultUser">passenger_default_user</a> and
+  <a href="#PassengerDefaultGroup">passenger_default_group</a>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Web server has no root privileges</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">User switching disabled. Apps are run as the web server’s user.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">User switching disabled. Apps are run as the web server’s user.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph"><p>When using Flying Passenger, the effect is as follows:</p></div>
+<table class="tableblock frame-all grid-all" style="
+width:100%;
+">
+<col style="width:50%;">
+<col style="width:50%;">
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Daemon run with root privileges</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">User switching enabled.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Daemon run without root privileges</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">User switching disabled. Apps are run as the daemon’s user.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph"><p>When user switching is enabled, the following rules are followed to determine what user an application should be run as. The first matching rule is the rule that will be followed.</p></div>
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
-This feature is only available if Apache is started by <em>root</em>. This is the
-  case on most Apache installations.
+If
+  <a href="#PassengerUser">passenger_user</a> or
+  <a href="#PassengerGroup">passenger_group</a>
+are set, then the application will be run as the specified user/group. Thus, these options are a good way to override user switching settings.
 </p>
 </li>
 <li>
 <p>
-Under no circumstances will applications be run as <em>root</em>. If
-  <em>environment.rb</em>/<em>config.ru</em> is owned as root or by an unknown user, then the
-  Rails/Rack application will run as the user specified by
+If the startup file is owned by root or an unknown user, then the application will run as the user specified by
   <a href="#PassengerDefaultUser">passenger_default_user</a> and
   <a href="#PassengerDefaultGroup">passenger_default_group</a>.
 </p>
 </li>
+<li>
+<p>
+Otherwise, the application is run as the owner of the startup file.
+</p>
+</li>
+</ol></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_caveats_amp_troubleshooting"></span><h4 data-comment-topic="caveats-troubleshooting-mbw582" data-anchor="_caveats_amp_troubleshooting">8.1.3. Caveats & troubleshooting</h4>
+<div class="paragraph"><p>If your application regularly encounters permission errors or fails to find certain files, then this is an indication that your application is started as a user that you did not intent it to be run as. Other symptoms include:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+The application fails to start because Bundler complains that it cannot find gems. This probably indicates that Bundler does not have read access to the directory that contains Bundler-installed gems.
+</p>
+</li>
+<li>
+<p>
+The application fails to start and its error message mentions the path <em>/nonexistent</em>. This probably indicates that your application is started as the <em>nobody</em> user. This is because on many systems, the <em>nobody</em> user’s home directory is <em>/nonexistent</em>.
+</p>
+</li>
 </ul></div>
-<div class="paragraph"><p>User switching can be disabled with the
-<a href="#PassengerUserSwitching">passenger_user_switching</a>
-option.</p></div>
+<div class="paragraph"><p>To check whether it is indeed the case that your application is started as a different user than you intended to, see <a href="#finding_out_app_user">Finding out what user an application is running as</a>.</p></div>
+<div class="paragraph"><p>The most likely reason why your application is started as <em>nobody</em> is probably because your startup file is owned by <em>root</em>, by <em>nobody</em> or by an unknown user. To fix this, change the owner of the startup file to the owner that you want to run the application as.</p></div>
+<div class="paragraph"><p>Whatever user your application runs as, it must have read access to the <a href="#application_root">application root</a>, and read/write access to the application’s <em>logs</em> directory.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="finding_out_app_user"></span><h4 data-comment-topic="finding-out-what-user-an-application-is-running-as-1ni7zk6" data-anchor="finding_out_app_user">8.1.4. Finding out what user an application is running as</h4>
+<div class="paragraph"><p>To find our what user an application is started as, first access its URL in your browser so that Phusion Passenger starts the application. For example:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>http://www.example.local/</pre>
+</div>
+</div>
+<div class="paragraph"><p>The application will now either successfully start or fail to start. If it fails to start then you will see an error page that tells you what user the application was being started as. If you do not see the error page in the browser then set
+  <a href="#PassengerFriendlyErrorPages">passenger_friendly_error_pages</a>
+on.</p></div>
+<div class="paragraph"><p>If the application successfully started, then run <span class="monospaced">passenger-status</span> to find the process’s PID:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>.---------- General information -----------
+Max pool size : 6
+Processes     : 1
+Requests in top-level queue : 0
+
+.---------- Application groups -----------
+/webapps/example.local#default:
+  App root: /webapps/example.local
+  Requests in queue: 0
+  * PID: 16915   Sessions: 0       Processed: 1       Uptime: 2s
+    CPU: 0%      Memory  : 9M      Last used: 2s ago</pre>
+</div>
+</div>
+<div class="paragraph"><p>In the above example we see that the PID is 16915. Next, use <em>ps</em> to find out the user that it is running as:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre># ps -o pid,user,comm -p 16915
+  PID USER    COMM
+16915 phusion Passenger RackApp: /webapps/example.local</pre>
+</div>
+</div>
+<div class="paragraph"><p>As you can see, the application in this example is being run as user <em>phusion</em>.</p></div>
+</div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="reducing_memory_usage" data-comment-topic="reducing-memory-consumption-of-ruby-on-rails-applications-by-33--1o3z66q">7.2. Reducing memory consumption of Ruby on Rails applications by 33%</h3>
-<div class="paragraph"><p>Is it possible to reduce memory consumption of your Rails applications by 33% on average,
-by using <a href="http://www.rubyenterpriseedition.com/">Ruby Enterprise Edition</a>.
-Please visit the website for details.</p></div>
-<div class="paragraph"><p>Note that this feature does not apply to Rack applications.</p></div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="reducing_memory_usage"></span><h3 data-comment-topic="reducing-memory-consumption-of-ruby-on-rails-applications-by-33--1o3z66q" data-anchor="reducing_memory_usage">8.2. Copy-on-write memory support (reducing memory consumption of Ruby applications)</h3>
+<div class="paragraph"><p>Phusion Passenger automatically leverages operating system virtual memory copy-on-write features in order to reduce the memory usage of Ruby applications. Experience has shown that this reduces memory usage by 33% on average. For this mechanism to work, a Ruby interpreter with a copy-on-write friendly garbage collector is required. The following Ruby interpreters have copy-on-write friendly garbage collectors:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+MRI Ruby >= 2.0. Versions prior to 2.0 did not have a copy-on-write friendly garbage collector.
+</p>
+</li>
+<li>
+<p>
+<a href="http://www.rubyenterpriseedition.com/">Ruby Enterprise Edition</a>, which was Phusion’s branch of MRI Ruby 1.8 with a copy-on-write friendly garbage collector and other enhancement. It has reached End-Of-Life as of 2012, but remains available for legacy systems.
+</p>
+</li>
+</ul></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="capistrano" data-comment-topic="capistrano-recipe-pfn4qu">7.3. Capistrano recipe</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="capistrano"></span><h3 data-comment-topic="capistrano-recipe-pfn4qu" data-anchor="capistrano">8.3. Capistrano recipe</h3>
 <div class="paragraph"><p>Phusion Passenger can be combined with <a href="http://capify.org/">Capistrano</a>.
 The following Capistrano recipe demonstrates Phusion Passenger support.
 It assumes that you’re using Git as version control system.</p></div>
@@ -3441,10 +5131,12 @@ end</pre>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="bundler_support" data-comment-topic="bundler-support-19v1h43">7.4. Bundler support</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="bundler_support"></span><h3 data-comment-topic="bundler-support-19v1h43" data-anchor="bundler_support">8.4. Bundler support</h3>
 <div class="paragraph"><p>Phusion Passenger has automatic support for <a href="http://gembundler.com/git.html">Bundler</a>.
-It works as follows:</p></div>
-<div class="ulist"><ul>
+The support consists of loading your application under the environment defined by your
+Gemfile. In other words, Phusion Passenger loads your application as if <em>bundle exec</em> was used.</p></div>
+<div class="paragraph"><p>The Bundler support works as follows:</p></div>
+<div class="ulist"><ul>
 <li>
 <p>
 If you have a <em>.bundle/environment.rb</em> in your application root, then Phusion
@@ -3468,54 +5160,25 @@ have any negative effects.</p></div>
 <div class="paragraph"><p>Phusion Passenger assumes that you’re using Bundler >= 0.9.5. If you don’t want Phusion
 Passenger to run its Bundler support code, e.g. because you need to use an older version
 of Bundler with an incompatible API or because you use a system other than Bundler, then
-you can override Phusion Passenger’s Bundler support code by creating a file
+you can override Phusion Passenger’s Bundler support code by creating an empty file
 <em>config/setup_load_paths.rb</em>. If this file exists then it will be required before loading
 the application startup file. In this file you can do whatever you need to setup Bundler
 or a similar system.</p></div>
-</div>
-<div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="moving_phusion_passenger" data-comment-topic="moving-phusion-passenger-to-a-different-directory-1hel5cp">7.5. Moving Phusion Passenger to a different directory</h3>
-<div class="paragraph"><p>It is possible to relocate the Phusion Passenger files to a different directory. It
-involves two steps:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-Moving the directory.
-</p>
-</li>
-<li>
-<p>
-Updating the “PassengerRoot” configuration option in Apache.
-</p>
-</li>
-</ol></div>
-<div class="paragraph"><p>For example, if Phusion Passenger is located in <em>/opt/passenger/</em>, and you’d like to
-move it to <em>/usr/local/passenger/</em>, then do this:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-Run the following command:
-</p>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="add_passenger_to_gemfile"></span><h4 data-comment-topic="does-phusion-passenger-itself-need-to-be-added-to-the-gemfile--xn1a11" data-anchor="add_passenger_to_gemfile">8.4.1. Does Phusion Passenger itself need to be added to the Gemfile?</h4>
+<div class="paragraph"><p>It is never necessary to add Phusion Passenger to the application’s Gemfile. In case of Phusion Passenger Standalone, it is not necessary to execute the <span class="monospaced">passenger</span> command through <span class="monospaced">bundle exec</span>. The reason for this is because Phusion Passenger automatically loads the Gemfile environment. Most other Ruby application servers do not automatically load the Gemfile environment, which is why they must be add [...]
+<div class="paragraph"><p>Even when your application uses any of the Phusion Passenger APIs, you still do not need to add Phusion Passenger to the Gemfile. The only thing you need to do is to put Phusion Passenger API calls inside <span class="monospaced">if</span> blocks that check whether Phusion Passenger is active, by checking whether the <span class="monospaced">PhusionPassenger</span> namespace is defined:</p></div>
 <div class="listingblock">
 <div class="content monospaced">
-<pre>mv /opt/passenger /usr/local/passenger</pre>
+<pre><strong>if</strong> defined?(PhusionPassenger)
+    ...
+<strong>end</strong></pre>
 </div>
 </div>
-</li>
-<li>
-<p>
-Edit your Apache configuration file, and set:
-</p>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>PassengerRoot /usr/local/passenger</pre>
-</div>
 </div>
-</li>
-</ol></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_installing_multiple_ruby_on_rails_versions" data-comment-topic="installing-multiple-ruby-on-rails-versions-1bp1fff">7.6. Installing multiple Ruby on Rails versions</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installing_multiple_ruby_on_rails_versions"></span><h3 data-comment-topic="installing-multiple-ruby-on-rails-versions-1bp1fff" data-anchor="_installing_multiple_ruby_on_rails_versions">8.5. Installing multiple Ruby on Rails versions</h3>
 <div class="paragraph"><p>Each Ruby on Rails applications that are going to be deployed may require a
 specific Ruby on Rails version. You can install a specific version with
 this command:</p></div>
@@ -3529,7 +5192,7 @@ this command:</p></div>
 other. Phusion Passenger will automatically make use of the correct version.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_making_the_application_restart_after_each_request" data-comment-topic="making-the-application-restart-after-each-request-vimy48">7.7. Making the application restart after each request</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_making_the_application_restart_after_each_request"></span><h3 data-comment-topic="making-the-application-restart-after-each-request-vimy48" data-anchor="_making_the_application_restart_after_each_request">8.6. Making the application restart after each request</h3>
 <div class="paragraph"><p>In some situations it might be desirable to restart the web application after
 each request, for example when developing a non-Rails application that doesn’t
 support code reloading, or when developing a web framework.</p></div>
@@ -3538,21 +5201,23 @@ application’s root folder. Unlike <em>restart.txt</em>, Phusion Passenger does
 check for this file’s timestamp: Phusion Passenger will always restart the
 application, as long as <em>always_restart.txt</em> exists.</p></div>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/note.png" alt="Note">
+<img src="./images/icons/note.png" alt="Note">
 </td>
 <td class="content">If you’re just developing a Rails application then you probably don’t need
-this feature. If you set <em>RailsEnv development</em> in your Apache configuration,
+this feature. If you set
+<em>rails_env development</em>
+in your web server configuration,
 then Rails will automatically reload your application code after each request.
-<em>always_restart.txt</em> is only useful if you’re working on Ruby on Rails itself,
-or when you’re not developing a Rails application and your web framework
-does not support code reloading.</td>
-</tr></table>
+<em>always_restart.txt</em> is mostly useful when you’re using a web framework that
+doesn’t support code reloading by itself, of when you’re working on a web framework
+yourself.</td>
+</tr></table>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="sub_uri_deployment_uri_fix" data-comment-topic="how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-11mzwt6">7.8. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="sub_uri_deployment_uri_fix"></span><h3 data-comment-topic="how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-11mzwt6" data-anchor="sub_uri_deployment_uri_fix">8.7. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments</h3>
 <div class="paragraph"><p>Some people experience broken images and other broken static assets when they
 deploy their application to a sub-URI (i.e. <em>http://mysite.com/railsapp/</em>).
 The reason for this usually is that you used a
@@ -3589,16 +5254,307 @@ append a timestamp to the URI to better facilitate HTTP caching. For more inform
 please refer to
 <a href="http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html">the Rails API docs</a>.</p></div>
 </div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_out_of_band_garbage_work_and_out_of_band_garbage_collection"></span><h3 data-comment-topic="out-of-band-garbage-work-and-out-of-band-garbage-collection-v89lu2" data-anchor="_out_of_band_garbage_work_and_out_of_band_garbage_collection">8.8. Out-of-Band Garbage Work and Out-of-Band Garbage Collection</h3>
+<div class="paragraph"><p><strong>Available since Phusion Passenger 4.0.0.</strong></p></div>
+<div class="paragraph"><p><strong>At this time, this feature is only available on Ruby.</strong></p></div>
+<div class="paragraph"><p>The Out-of-Band Work feature allows you to run arbitrary long-running tasks outside normal request cycles. This works by letting current requests to the process finish, then telling the process to perform the out-of-band work, then resuming passing requests to the process after said work is finished.</p></div>
+<div class="paragraph"><p>A specific (and perhaps primary) use case of of Out-of-Band Work is <strong>Out-of-Band Garbage Collection</strong>. The garbage collector is run outside normal request cycles so that garbage collection runs inside normal request cycles can finish a lot faster. This can potentially save tens to hundreds of milliseconds of latency in requests.</p></div>
+<div class="paragraph"><p>Because Out-of-Band Work is implemented at the Phusion Passenger inter-process request routing level, and not by, say, spawning a thread inside the application process, Out-of-Band Work has the following useful properties:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+It works well even with tasks that can pause all threads. The MRI Ruby garbage collector is a stop-the-world mark-and-sweep garbage collector.
+</p>
+</li>
+<li>
+<p>
+Phusion Passenger can spawn more processes as necessary, in order to prevent situations in which all application processes are busy performing out-of-band work. Phusion Passenger guarantees that there’s at least one process that’s ready to process requests.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Applications can use Out-of-Band Work as follows:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+Request out-of-band work by outputting the <span class="monospaced">X-Passenger-Request-OOB-Work</span> header during a request. It does not matter what the value is. At this time, it is not possible to request out-of-band work from outside requests.
+</p>
+</li>
+<li>
+<p>
+You can actually perform out-of-band work when you receive a <span class="monospaced">:oob_work</span> Phusion Passenger event.
+</p>
+</li>
+</ol></div>
+<div class="paragraph"><p>Note that even though you can request out-of-band work, there’s no guarantee that Phusion Passenger will send an <span class="monospaced">oob_work</span> event in a timely manner, if at all. It is also possible that Phusion Passenger sends an <span class="monospaced">oob_work</span> event without you ever having requested one. This latter could for example happen if the OOB work is administrator-initiated. Do not make any assumptions in your code.</p></div>
+<div class="paragraph"><p>Here’s an example which implements out-of-band garbage collection using the Out-of-Band framework. This example code doesn’t do anything when the code is not being run in Phusion Passenger, thanks to the <span class="monospaced">if</span> block.</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-style: italic"><span style="color: #9A1900"># Somewhere in a controller method:</span></span>
+<span style="font-style: italic"><span style="color: #9A1900"># Tell Phusion Passenger we want to perform OOB work.</span></span>
+response<span style="color: #990000">.</span>headers<span style="color: #990000">[</span><span style="color: #FF0000">"X-Passenger-Request-OOB-Work"</span><span style="color: #990000">]</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"true"</span>
+
+<span style="font-style: italic"><span style="color: #9A1900"># Somewhere during application initialization:</span></span>
+<span style="font-weight: bold"><span style="color: #0000FF">if</span></span> <span style="font-weight: bold"><span style="color: #0000FF">defined</span></span><span style="color: #990000">?(</span>PhusionPassenger<span style="color: #990000">)</span>
+    PhusionPassenger<span style="color: #990000">.</span>on_event<span style="color: #990000">(:</span>oob_work<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">do</span></span>
+        <span style="font-style: italic"><span style="color: #9A1900"># Phusion Passenger has told us that we're ready to perform OOB work.</span></span>
+        t0 <span style="color: #990000">=</span> Time<span style="color: #990000">.</span>now
+        GC<span style="color: #990000">.</span>start
+        Rails<span style="color: #990000">.</span>logger<span style="color: #990000">.</span>info <span style="color: #FF0000">"Out-Of-Bound GC finished in #{Time.now - t0} sec"</span>
+    <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span></tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>For your convenience, Phusion Passenger provides a Rack middleware for out-of-band garbage collection. Add the following to your <span class="monospaced">config.ru</span>. Likewise, this example code doesn’t do anything when the code is not being run in Phusion Passenger, thanks to the <span class="monospaced">if</span> block.</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">if</span></span> <span style="font-weight: bold"><span style="color: #0000FF">defined</span></span><span style="color: #990000">?(</span>PhusionPassenger<span style="color: #990000">)</span>
+    <span style="font-weight: bold"><span style="color: #000080">require</span></span> <span style="color: #FF0000">'phusion_passenger/rack/out_of_band_gc'</span>
+
+    <span style="font-style: italic"><span style="color: #9A1900"># Trigger out-of-band GC every 5 requests.</span></span>
+    use PhusionPassenger<span style="color: #990000">::</span>Rack<span style="color: #990000">::</span>OutOfBandGc<span style="color: #990000">,</span> <span style="color: #993399">5</span>
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span></tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>It should be noted that, although the application uses the Phusion Passenger API, it is <a href="#add_passenger_to_gemfile"><strong>not</strong> necessary to add Phusion Passenger to the Gemfile</a>.</p></div>
+<div class="paragraph"><p>References:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="http://blog.phusion.nl/2013/01/22/phusion-passenger-4-technology-preview-out-of-band-work/">The Phusion Blog article which first introduced this feature.</a>
+</p>
+</li>
+</ul></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="flying_passenger"></span><h3 data-comment-topic="flying-passenger-137qg5e" data-anchor="flying_passenger">8.9. Flying Passenger</h3>
+<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 4.0.6. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
+<div class="paragraph"><p>Flying Passenger allows one to decouple Phusion Passenger’s life time from the web server’s life time, so that the web server can be independently restarted from Phusion Passenger, and from any of the application processes served by Phusion Passenger.</p></div>
+<div class="paragraph"><p>Normally, Phusion Passenger starts together with the web server, and shuts down together with the web server. The advantages of this default behavior is that it makes Phusion Passenger easy to administer: one only has to deal with the web server process and can expect all relevant processes to be cleaned up after a web server shut down. However this also brings about a disadvantage: every time one restarts the web server (e.g. to make a minor configuration chang [...]
+<div class="paragraph"><p>This problem is solved by <em>Flying Passenger</em>, which is an advanced mode of operation in Phusion Passenger that allows the web server to be indepedently restarted from Phusion Passenger. When this mode is enabled:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+One must start Phusion Passenger separately from the web server, namely by starting the Flying Passenger daemon. This daemon must - to an extent - be separately configured and managed from the web server.
+</p>
+</li>
+<li>
+<p>
+The web server must be configured to forward requests to the Flying Passenger daemon.
+</p>
+</li>
+<li>
+<p>
+You should beware of the <a href="#flying_passenger_caveats">caveats and limitations</a>.
+</p>
+</li>
+</ul></div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_requirements_2"></span><h4 data-comment-topic="requirements-194ysj6" data-anchor="_requirements_2">8.9.1. Requirements</h4>
+<div class="paragraph"><p>At this time, this feature is <strong>only available in the Enterprise version of Phusion Passenger for Nginx</strong>. You must have Phusion Passenger for Nginx properly installed.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_basic_usage"></span><h4 data-comment-topic="basic-usage-1qtgvwx" data-anchor="_basic_usage">8.9.2. Basic usage</h4>
+<div class="paragraph"><p>Start the Flying Passenger daemon by invoking the <span class="monospaced">flying-passenger</span> command. The only required option is <span class="monospaced">--socket-file</span>. Depending on whether you wish to enable <a href="#user_switching">User Switching</a>, you have to start <span class="monospaced">flying-passenger</span> with root privileges or not.</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock
+I, [2013-06-14T09:10:13.095339 #77179]  INFO -- : Welcome to Flying Passenger 4.1.0
+I, [2013-06-14T09:10:13.095339 #77179]  INFO -- : Starting PassengerWatchdog...
+I, [2013-06-14T09:10:13.097036 #77179]  INFO -- : PassengerWatchdog started on PID 77181
+...
+I, [2013-06-14T09:10:13.129017 #77179]  INFO -- : PassengerWatchdog initialized properly
+I, [2013-06-14T09:10:13.129127 #77179]  INFO -- : Flying Passenger up and listening on /var/run/flying-passenger.sock!</pre>
+</div>
+</div>
+<div class="paragraph"><p>Now configure Phusion Passenger for Nginx to make use of the Flying Passenger daemon, by setting the <span class="monospaced">passenger_fly_with</span> option to the socket filename:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>http {
+    ...
+    passenger_fly_with /var/run/flying-passenger.sock;
+    ...
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>After (re)starting Nginx, Nginx + Flying Passenger is fully operational:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo /path-to/nginx</pre>
+</div>
+</div>
+<div class="paragraph"><p>You can test it by adding a virtual host for a web app:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>http {
+    ...
+
+    server {
+        listen 80;
+        server_name www.foo.local;
+        root /webapps/foo/public;
+        passenger_enabled on;
+    }
+}</pre>
+</div>
+</div>
+<div class="paragraph"><p>Verify that it works by making an HTTP request to it:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ curl http://www.foo.local/</pre>
+</div>
+</div>
+<div class="paragraph"><p>Now let’s verify that restarting the web server does not restart the just-spawned application process. Run <span class="monospaced">passenger-status</span> to obtain the PID of the application process:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo passenger-status
+Version: 4.1.0
+Date   : 2013-06-14 09:21:51 -0400
+.---------- General information -----------
+Max pool size : 6
+Processes     : 1
+Requests in top-level queue : 0
+
+.---------- Application groups -----------
+/webapps/foo#default:
+  App root: /webapps/foo
+  Requests in queue: 0
+  * PID: 77283   Sessions: 0       Processed: 1       Uptime: 2s
+    CPU: 1%      Memory  : 8M      Last used: 2s ago</pre>
+</div>
+</div>
+<div class="paragraph"><p>As you can see, the PID of the application process is <strong>77283</strong>. Now let’s see what happens if we restart Nginx:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo /path-to/nginx -s stop
+$ sudo /path-to/nginx
+$ sudo passenger-status</pre>
+</div>
+</div>
+<div class="paragraph"><p>The application process should remain there, unchanged:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo passenger-status
+Version: 4.1.0
+Date   : 2013-06-14 09:21:51 -0400
+.---------- General information -----------
+Max pool size : 6
+Processes     : 1
+Requests in top-level queue : 0
+
+.---------- Application groups -----------
+/webapps/foo#default:
+  App root: /webapps/foo
+  Requests in queue: 0
+  * PID: 77283   Sessions: 0       Processed: 1       Uptime: 18s
+    CPU: 1%      Memory  : 8M      Last used: 18s ago</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="configuring_flying_passenger"></span><h4 data-comment-topic="configuring-flying-passenger-n558np" data-anchor="configuring_flying_passenger">8.9.3. Configuring Flying Passenger</h4>
+<div class="paragraph"><p>Flying Passenger gets <strong>some</strong> configuration from the web server, but not all. In particular, most web server directives that are only valid in the <span class="monospaced">http</span> context, e.g. <a href="#PassengerLogLevel">passenger_log_level</a>, have no effect when using Flying Passenger. Instead, you are supposed to pass these configuration directives through command line options to the Flying Passenger daemon. Configuration directives that  [...]
+<div class="paragraph"><p>For example, to achieve the same effect as setting passenger_log_level to 2, run the Flying Passenger daemon as follows:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock --log-level=2</pre>
+</div>
+</div>
+<div class="paragraph"><p>Currently, not all configuration directives have a Flying Passenger equivalent. Run the following command to see an overview of available options:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ flying-passenger --help</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_managing_the_flying_passenger_daemon"></span><h4 data-comment-topic="managing-the-flying-passenger-daemon-vjmzdh" data-anchor="_managing_the_flying_passenger_daemon">8.9.4. Managing the Flying Passenger daemon</h4>
+<div class="paragraph"><p>The Flying Passenger daemon runs in the foreground by default. This is undesirable on server environments. You can make it go into the background by passing <span class="monospaced">--daemonize</span>, <span class="monospaced">--log-file</span> and <span class="monospaced">--pid-file</span>:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock \
+    --daemonize --log-file=/var/log/flying-passenger.log \
+    --pid-file=/var/run/flying-passenger.pid</pre>
+</div>
+</div>
+<div class="paragraph"><p>You can shut down a Flying Passenger daemon by sending SIGINT or SIGTERM to it:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ kill `cat /var/run/flying-passenger.pid`</pre>
+</div>
+</div>
+<div class="paragraph"><p>We recommend using <a href="http://cr.yp.to/daemontools.html">daemontools</a> or <a href="http://smarden.org/runit/">runit</a> for managing the Flying Passenger daemon. These tools will allow automatically starting the Flying Passenger daemon at boot, and will automatically restart the daemon if it crashes. You can create and enable a daemontools/runit service as folows:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ sudo mkdir /etc/service/flying-passenger
+$ sudo nano /etc/service/flying-passenger/run
+#!/bin/sh
+exec /path-to/flying-passenger \
+    --socket-file=/var/run/flying-passenger.sock \
+    --log-file=/var/log/flying-passenger.log \
+    --pid-file=/var/run/flying-passenger.pid</pre>
+</div>
+</div>
+<div class="paragraph"><p>Immediately after creating the <span class="monospaced">run</span> file, daemontools/runit automatically runs it to start the daemon. Note that the location (<span class="monospaced">/etc/service</span>) depends on the OS or Linux distros. Sometimes it’s <span class="monospaced">/service</span>. Also note that we start the Flying Passenger daemon without <span class="monospaced">--daemonize</span>.</p></div>
+<div class="paragraph"><p>To shut down a daemontools/runit-managed daemon, you need to use <span class="monospaced">svc -d /etc/service/flying-passenger</span> (daemontools) or <span class="monospaced">sv stop /etc/service/flying-passenger</span> (runit) instead of sending a signal to the process.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="flying_passenger_caveats"></span><h4 data-comment-topic="caveats-and-limitations-15wakf" data-anchor="flying_passenger_caveats">8.9.5. Caveats and limitations</h4>
+<div class="paragraph"><p>Beware of the following caveats and limitations when using Flying Passenger:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+The Nginx executable <strong>must</strong> be compiled with the same version of Phusion Passenger as the Flying Passenger daemon. Failing to meet this requirement may result in cryptic errors, or may result in certain features not working, until you’ve fixed the situation. When upgrading Phusion Passenger, you must restart both Nginx and the Flying Passenger daemon.
+</p>
+</li>
+<li>
+<p>
+The <a href="#PassengerRoot">passenger_root</a> directive has no effect. When using Flying Passenger, you are not supposed to set <span class="monospaced">passenger_root</span>.
+</p>
+</li>
+<li>
+<p>
+When you add a new application to the web server configuration, Flying Passenger will automatically pick up the application’s settings and spawn this new application upon the first request to it. However it is not capable of automatically starting the new app before a request has been sent to it (i.e. <a href="#PassengerPreStart">passenger_pre_start</a>-like behavior is not available in this case). As a workaround, you can send an HTTP request to your application after starting the daemo [...]
+</p>
+</li>
+<li>
+<p>
+When you remove an application from the web server configuration, Flying Passenger will not detect the removal and will not shut down the associated application processes. Killing the application processes will also not help, because Flying Passenger will restart them per the (now-removed, but still in the Flying Passenger daemon’s memory) <a href="#PassengerMinInstances">passenger_min_instances</a> settings. At the moment, there are two ways to get rid of those processes:
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+Before removing the application from the web server configuration, explicitly set its <span class="monospaced">passenger_min_instances</span> to 0. Next, send a request to it, which will cause the Flying Passenger daemon to take over the new <span class="monospaced">passenger_min_instances 0</span> option. You can then proceed with removing the application from the web server configuration, and restarting the web server. Finally, kill the PIDs associated to those application processes an [...]
+</p>
+</li>
+<li>
+<p>
+Restart the Flying Passenger daemon.
+</p>
+</li>
+</ul></div>
+</li>
+</ul></div>
+</div>
+</div>
 </div>
 </div>
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_under_the_hood" data-comment-topic="under-the-hood-8uney">8. Under the hood</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_under_the_hood"></span><h2 data-comment-topic="under-the-hood-8uney" data-anchor="_under_the_hood">9. Under the hood</h2>
 <div class="sectionbody">
 <div class="paragraph"><p>Phusion Passenger hides a lot of complexity for the end user (i.e. the web server
 system administrator), but sometimes it is desirable to know what is going on.
 This section describes a few things that Phusion Passenger does under the hood.</p></div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_page_caching_support" data-comment-topic="page-caching-support-nafhf6">8.1. Page caching support</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_page_caching_support"></span><h3 data-comment-topic="page-caching-support-nafhf6" data-anchor="_page_caching_support">9.1. Page caching support</h3>
 <div class="paragraph"><p>For each HTTP request, Phusion Passenger will automatically look for a corresponding
 page cache file, and serve that if it exists. It does this by appending ".html" to
 the filename that the URI normally maps to, and checking whether that file exists.
@@ -3606,19 +5562,19 @@ This check occurs after checking whether the original mapped filename exists (as
 of static asset serving). All this is done without the need for special mod_rewrite
 rules.</p></div>
 <div class="paragraph"><p>For example, suppose that the browser requests <em>/foo/bar</em>.</p></div>
-<div class="olist arabic"><ol class="arabic">
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
 Phusion Passenger will first check whether this URI maps to a static file, i.e.
    whether the file <em>foo/bar</em> exists in the web application’s <em>public</em> directory.
-   If it does then Phusion Passenger will serve this file through Apache immediately.
+   If it does then Phusion Passenger will serve this file through the web server immediately.
 </p>
 </li>
 <li>
 <p>
 If that doesn’t exist, then Phusion Passenger will check whether the file
    <em>foo/bar.html</em> exists. If it does then Phusion Passenger will serve this file
-   through Apache immediately.
+   through the web server immediately.
 </p>
 </li>
 <li>
@@ -3634,7 +5590,7 @@ the <em>public</em> directory. In that case you’ll need to use mod_rewrite to
 page cache files.</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="application_detection" data-comment-topic="how-phusion-passenger-detects-whether-a-virtual-host-is-a-web-application-13qbmhn">8.2. How Phusion Passenger detects whether a virtual host is a web application</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="application_detection"></span><h3 data-comment-topic="how-phusion-passenger-detects-whether-a-virtual-host-is-a-web-application-13qbmhn" data-anchor="application_detection">9.2. How Phusion Passenger detects whether a virtual host is a web application</h3>
 <div class="paragraph"><p>After you’ve read the deployment instructions you might wonder how Phusion Passenger
 knows that the server root points to a web application that Phusion Passenger is
 able to serve, and how it knows what kind of web application it is (e.g. Rails or Rack).</p></div>
@@ -3647,7 +5603,7 @@ whether the following file exists:</p></div>
 </div>
 <div class="paragraph"><p>If you’re not a programmer and don’t understand the above pseudo-code snippet, it means
 that Phusion Passenger will:</p></div>
-<div class="olist arabic"><ol class="arabic">
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
 Extract the parent directory filename from the value of the “root” directive.
@@ -3675,28 +5631,30 @@ Phusion Passenger will look for <em>config.ru</em> instead of <em>config/environ
 </div>
 </div>
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_appendix_a_about_this_document" data-comment-topic="appendix-a-about-this-document-zfvixm">9. Appendix A: About this document</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_appendix_a_about_this_document"></span><h2 data-comment-topic="appendix-a-about-this-document-zfvixm" data-anchor="_appendix_a_about_this_document">10. Appendix A: About this document</h2>
 <div class="sectionbody">
 <div class="paragraph"><p>The text of this document is licensed under the
 <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons
 Attribution-Share Alike 3.0 Unported License</a>.</p></div>
 <div class="paragraph"><p><span class="image">
 <a class="image" href="http://creativecommons.org/licenses/by-sa/3.0/">
-<img src="images/by_sa.png" alt="images/by_sa.png"></a>
+<img src="images/by_sa.png" alt="images/by_sa.png">
+</a>
 </span></p></div>
 <div class="paragraph"><p>Phusion Passenger is brought to you by <a href="http://www.phusion.nl/">Phusion</a>.</p></div>
 <div class="paragraph"><p><span class="image">
 <a class="image" href="http://www.phusion.nl/">
-<img src="images/phusion_banner.png" alt="images/phusion_banner.png"></a>
+<img src="images/phusion_banner.png" alt="images/phusion_banner.png">
+</a>
 </span></p></div>
 <div class="paragraph"><p>Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.</p></div>
 </div>
 </div>
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_appendix_b_terminology" data-comment-topic="appendix-b-terminology-wzv5ro">10. Appendix B: Terminology</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_appendix_b_terminology"></span><h2 data-comment-topic="appendix-b-terminology-wzv5ro" data-anchor="_appendix_b_terminology">11. Appendix B: Terminology</h2>
 <div class="sectionbody">
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="application_root" data-comment-topic="application-root-1fd6bqv">10.1. Application root</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="application_root"></span><h3 data-comment-topic="application-root-1fd6bqv" data-anchor="application_root">11.1. Application root</h3>
 <div class="paragraph"><p>The root directory of an application that’s served by Phusion Passenger.</p></div>
 <div class="paragraph"><p>In case of Ruby on Rails applications, this is the directory that contains
 <em>Rakefile</em>, <em>app/</em>, <em>config/</em>, <em>public/</em>, etc. In other words, the directory
@@ -3757,10 +5715,18 @@ For example, take the following directory structure:</p></div>
 </div>
 </div>
 </div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="idle_process"></span><h3 data-comment-topic="idle-process-13byfw9" data-anchor="idle_process">11.2. Idle process</h3>
+<div class="paragraph"><p>An "idle process" refers to a process that hasn’t processed any requests for a while.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="inactive_process"></span><h3 data-comment-topic="inactive-process-1d2h0po" data-anchor="inactive_process">11.3. Inactive process</h3>
+<div class="paragraph"><p>An "inactive process" refers to a process that’s current not processing any requests. An idle process is always inactive, but an inactive process is not always considered idle.</p></div>
+</div>
 </div>
 </div>
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="spawning_methods_explained" data-comment-topic="appendix-c-spawning-methods-explained-tcp8e6">11. Appendix C: Spawning methods explained</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="spawning_methods_explained"></span><h2 data-comment-topic="appendix-c-spawning-methods-explained-tcp8e6" data-anchor="spawning_methods_explained">12. Appendix C: Spawning methods explained</h2>
 <div class="sectionbody">
 <div class="paragraph"><p>At its core, Phusion Passenger is an HTTP proxy and process manager. It spawns
 Ruby on Rails/Rack/WSGI worker processes (which may also be referred to as
@@ -3770,7 +5736,7 @@ processes.</p></div>
 Let’s go over the different spawning methods. For simplicity’s sake, let’s
 assume that we’re only talking about Ruby on Rails applications.</p></div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_the_most_straightforward_and_traditional_way_conservative_spawning" data-comment-topic="the-most-straightforward-and-traditional-way-conservative-spawning-civ29z">11.1. The most straightforward and traditional way: conservative spawning</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_the_most_straightforward_and_traditional_way_direct_spawning"></span><h3 data-comment-topic="the-most-straightforward-and-traditional-way-conservative-spawning-civ29z" data-anchor="_the_most_straightforward_and_traditional_way_direct_spawning">12.1. The most straightforward and traditional way: direct spawning</h3>
 <div class="paragraph"><p>Phusion Passenger could create a new Ruby process, which will then load the
 Rails application along with the entire Rails framework. This process will then
 enter an request handling main loop.</p></div>
@@ -3779,7 +5745,7 @@ familiar with the Mongrel application server, then this approach is exactly
 what mongrel_cluster performs: it creates N worker processes, each which loads
 a full copy of the Rails application and the Rails framework in memory. The Thin
 application server employs pretty much the same approach.</p></div>
-<div class="paragraph"><p>Note that Phusion Passenger’s version of conservative spawning differs slightly
+<div class="paragraph"><p>Note that Phusion Passenger’s version of direct spawning differs slightly
 from mongrel_cluster. Mongrel_cluster creates entirely new Ruby processes. In
 programmers jargon, mongrel_cluster creates new Ruby processes by forking the
 current process and exec()-ing a new Ruby interpreter. Phusion Passenger on the
@@ -3787,29 +5753,31 @@ other hand creates processes that reuse the already loaded Ruby interpreter. In
 programmers jargon, Phusion Passenger calls fork(), but not exec().</p></div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_the_smart_spawning_method" data-comment-topic="the-smart-spawning-method-7nhgtj">11.2. The smart spawning method</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_the_smart_spawning_method"></span><h3 data-comment-topic="the-smart-spawning-method-7nhgtj" data-anchor="_the_smart_spawning_method">12.2. The smart spawning method</h3>
 <div class="admonitionblock">
-<table><tr>
+<table><tr>
 <td class="icon">
-<img src="./images/icons/note.png" alt="Note">
+<img src="./images/icons/note.png" alt="Note">
 </td>
 <td class="content">Smart spawning is supported for all Ruby applications but not for WSGI applications.</td>
-</tr></table>
+</tr></table>
 </div>
-<div class="paragraph"><p>While conservative spawning works well, it’s not as efficient as it could be
+<div class="paragraph"><p>While direct spawning works well, it’s not as efficient as it could be
 because each worker process has its own private copy of the Rails application
 as well as the Rails framework. This wastes memory as well as startup time.</p></div>
 <div class="paragraph"><p><span class="image">
-<img src="images/conservative_spawning.png" alt="Worker processes and conservative spawning"></span><br><em>Figure: Worker processes and conservative spawning. Each worker process has its
+<img src="images/direct_spawning.png" alt="Worker processes and direct spawning">
+</span><br>
+<em>Figure: Worker processes and direct spawning. Each worker process has its
 own private copy of the application code and Rails framework code.</em></p></div>
 <div class="paragraph"><p>It is possible to make the different worker processes share the memory occupied
 by application and Rails framework code, by utilizing so-called
 copy-on-write semantics of the virtual memory system on modern operating
 systems. As a side effect, the startup time is also reduced. This is technique
-is exploited by Phusion Passenger’s <em>smart</em> and <em>smart-lv2</em> spawn methods.</p></div>
+is exploited by Phusion Passenger’s <em>smart</em> spawn method.</p></div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_how_it_works" data-comment-topic="how-it-works-f9umga">11.2.1. How it works</h4>
-<div class="paragraph"><p>When the <em>smart-lv2</em> spawn method is being used, Phusion Passenger will first
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_how_it_works"></span><h4 data-comment-topic="how-it-works-f9umga" data-anchor="_how_it_works">12.2.1. How it works</h4>
+<div class="paragraph"><p>When the <em>smart</em> spawn method is being used, Phusion Passenger will first
 create a so-called <em>ApplicationSpawner server</em> process. This process loads the
 entire Rails application along with the Rails framework, by loading
 <em>environment.rb</em>. Then, whenever Phusion Passenger needs a new worker process,
@@ -3824,22 +5792,15 @@ processes will share as much common
 memory as possible. That is, they will all share the same application and Rails
 framework code.</p></div>
 <div class="paragraph"><p><span class="image">
-<img src="images/smart-lv2.png" alt="images/smart-lv2.png"></span><br><em>Figure: Worker processes and the smart-lv2 spawn method. All worker processes,
+<img src="images/smart.png" alt="images/smart.png">
+</span><br>
+<em>Figure: Worker processes and the smart spawn method. All worker processes,
 as well as the ApplicationSpawner, share the same application code and Rails
 framework code.</em></p></div>
-<div class="paragraph"><p>The <em>smart</em> spawn method goes even further, by caching the Rails framework in
-another process called the <em>FrameworkSpawner server</em>. This process only loads
-the Rails framework, not the application. When a FrameworkSpawner server is
-instructed to create a new worker process, it will create a new
-ApplicationSpawner to which the instruction will be delegated. All those
-ApplicationSpawner servers, as well as all worker processes created by those
-ApplicationSpawner servers, will share the same Rails framework code.</p></div>
-<div class="paragraph"><p>The <em>smart-lv2</em> method allows different worker processes that belong to the same
-application to share memory. The <em>smart</em> method allows different worker
-processes - that happen to use the same Rails version - to share memory, even if
-they don’t belong to the same application.</p></div>
+<div class="paragraph"><p>The <em>smart</em> method allows different worker processes that belong to the same
+application to share memory.</p></div>
 <div class="paragraph"><p>Notes:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 Vendored Rails frameworks cannot be shared by different applications, even if
@@ -3849,53 +5810,32 @@ Vendored Rails frameworks cannot be shared by different applications, even if
 </li>
 <li>
 <p>
-ApplicationSpawner and FrameworkSpawner servers have an idle timeout just
-  like worker processes. If an ApplicationSpawner/FrameworkSpawner server hasn’t
-  been instructed to do anything for a while, it will be shutdown in order to
-  conserve memory. This idle timeout is configurable.
+ApplicationSpawner servers have an idle timeout just like worker processes.
+  If an ApplicationSpawner/FrameworkSpawner server hasn’t been instructed to do
+  anything for a while, it will be shutdown in order to conserve memory. This
+  idle timeout is configurable.
 </p>
 </li>
 </ul></div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_summary_of_benefits" data-comment-topic="summary-of-benefits-qovyvk">11.2.2. Summary of benefits</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_summary_of_benefits"></span><h4 data-comment-topic="summary-of-benefits-qovyvk" data-anchor="_summary_of_benefits">12.2.2. Summary of benefits</h4>
 <div class="paragraph"><p>Suppose that Phusion Passenger needs a new worker process for an application
 that uses Rails 2.2.1.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-If the <em>smart-lv2</em> spawning method is used, and an ApplicationSpawner server
-  for this application is already running, then worker process creation time is
-  about 10 times faster than conservative spawning. This worker process will also
-  share application and Rails framework code memory with the ApplicationSpawner
-  server and the worker processes that had been spawned by this ApplicationSpawner
-  server.
-</p>
-</li>
-<li>
-<p>
-If the <em>smart</em> spawning method is used, and a FrameworkSpawner server for
-  Rails 2.2.1 is already running, but no ApplicationSpawner server for this
-  application is running, then worker process creation time is about 2 times
-  faster than conservative spawning. If there is an ApplicationSpawner server
-  for this application running, then worker process creation time is about 10
-  times faster. This worker process will also share application and Rails
-  framework code memory with the ApplicationSpawner and FrameworkSpawner
-  servers.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>You could compare ApplicationSpawner and FrameworkSpawner servers with stem
-cells, that have the ability to quickly change into more specific cells (worker
-process).</p></div>
-<div class="paragraph"><p>In practice, the smart spawning methods could mean a memory saving of about 33%,
+<div class="paragraph"><p>If the <em>smart</em> spawning method is used, and an ApplicationSpawner server
+for this application is already running, then worker process creation time is
+about 10 times faster than direct spawning. This worker process will also
+share application and Rails framework code memory with the ApplicationSpawner
+server and the worker processes that had been spawned by this ApplicationSpawner
+server.</p></div>
+<div class="paragraph"><p>In practice, the smart spawning method could mean a memory saving of about 33%,
 assuming that your Ruby interpreter is <a href="#reducing_memory_usage">copy-on-write friendly</a>.</p></div>
 <div class="paragraph"><p>Of course, smart spawning is not without gotchas. But if you understand the
 gotchas you can easily reap the benefits of smart spawning.</p></div>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_smart_spawning_gotcha_1_unintentional_file_descriptor_sharing" data-comment-topic="smart-spawning-gotcha-1-unintentional-file-descriptor-sharing-cebw6q">11.3. Smart spawning gotcha #1: unintentional file descriptor sharing</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_smart_spawning_gotcha_1_unintentional_file_descriptor_sharing"></span><h3 data-comment-topic="smart-spawning-gotcha-1-unintentional-file-descriptor-sharing-cebw6q" data-anchor="_smart_spawning_gotcha_1_unintentional_file_descriptor_sharing">12.3. Smart spawning gotcha #1: unintentional file descriptor sharing</h3>
 <div class="paragraph"><p>Because worker processes are created by forking from an ApplicationSpawner
 server, it will share all file descriptors that are opened by the
 ApplicationSpawner server. (This is part of the semantics of the Unix
@@ -3921,7 +5861,7 @@ http://www.gnu.org/software/src-highlite -->
             <span style="font-style: italic"><span style="color: #9A1900"># We're in smart spawning mode.</span></span>
             <span style="color: #990000">...</span> code to reestablish socket connections here <span style="color: #990000">...</span>
         <span style="font-weight: bold"><span style="color: #0000FF">else</span></span>
-            <span style="font-style: italic"><span style="color: #9A1900"># We're in conservative spawning mode. We don't need to do anything.</span></span>
+            <span style="font-style: italic"><span style="color: #9A1900"># We're in direct spawning mode. We don't need to do anything.</span></span>
         <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
     <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
 <span style="font-weight: bold"><span style="color: #0000FF">end</span></span></tt></pre>
@@ -3931,7 +5871,7 @@ http://www.gnu.org/software/src-highlite -->
 database upon creating a new worker process, which is why you normally do not
 encounter any database issues when using smart spawning mode.</p></div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_example_1_memcached_connection_sharing_harmful" data-comment-topic="example-1-memcached-connection-sharing-harmful--1wfs3ad">11.3.1. Example 1: Memcached connection sharing (harmful)</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_example_1_memcached_connection_sharing_harmful"></span><h4 data-comment-topic="example-1-memcached-connection-sharing-harmful--1wfs3ad" data-anchor="_example_1_memcached_connection_sharing_harmful">12.3.1. Example 1: Memcached connection sharing (harmful)</h4>
 <div class="paragraph"><p>Suppose we have a Rails application that connects to a Memcached server in
 <em>environment.rb</em>. This causes the ApplicationSpawner to have a socket connection
 (file descriptor) to the Memcached server, as shown in the following figure:</p></div>
@@ -4022,7 +5962,7 @@ http://www.gnu.org/software/src-highlite -->
             <span style="font-style: italic"><span style="color: #9A1900"># We're in smart spawning mode.</span></span>
             reestablish_connection_to_memcached
         <span style="font-weight: bold"><span style="color: #0000FF">else</span></span>
-            <span style="font-style: italic"><span style="color: #9A1900"># We're in conservative spawning mode. We don't need to do anything.</span></span>
+            <span style="font-style: italic"><span style="color: #9A1900"># We're in direct spawning mode. We don't need to do anything.</span></span>
         <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
     <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
 <span style="font-weight: bold"><span style="color: #0000FF">end</span></span></tt></pre>
@@ -4030,7 +5970,7 @@ http://www.gnu.org/software/src-highlite -->
 </div>
 </div>
 <div class="sect3">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_example_2_log_file_sharing_not_harmful" data-comment-topic="example-2-log-file-sharing-not-harmful--ox4yfy">11.3.2. Example 2: Log file sharing (not harmful)</h4>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_example_2_log_file_sharing_not_harmful"></span><h4 data-comment-topic="example-2-log-file-sharing-not-harmful--ox4yfy" data-anchor="_example_2_log_file_sharing_not_harmful">12.3.2. Example 2: Log file sharing (not harmful)</h4>
 <div class="paragraph"><p>There are also cases in which unintentional file descriptor sharing is not harmful.
 One such case is log file file descriptor sharing. Even if two processes write
 to the log file at the same time, the worst thing that can happen is that the
@@ -4042,7 +5982,7 @@ Memcached example, doesn’t help.</p></div>
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_smart_spawning_gotcha_2_the_need_to_revive_threads" data-comment-topic="smart-spawning-gotcha-2-the-need-to-revive-threads-1ey176o">11.4. Smart spawning gotcha #2: the need to revive threads</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_smart_spawning_gotcha_2_the_need_to_revive_threads"></span><h3 data-comment-topic="smart-spawning-gotcha-2-the-need-to-revive-threads-1ey176o" data-anchor="_smart_spawning_gotcha_2_the_need_to_revive_threads">12.4. Smart spawning gotcha #2: the need to revive threads</h3>
 <div class="paragraph"><p>Another part of the <em>fork()</em> system call’s semantics is the fact that threads
 disappear after a fork call. So if you’ve created any threads in environment.rb,
 then those threads will no longer be running in newly created worker process.
@@ -4060,7 +6000,7 @@ http://www.gnu.org/software/src-highlite -->
             <span style="font-style: italic"><span style="color: #9A1900"># We're in smart spawning mode.</span></span>
             <span style="color: #990000">...</span> code to revive threads here <span style="color: #990000">...</span>
         <span style="font-weight: bold"><span style="color: #0000FF">else</span></span>
-            <span style="font-style: italic"><span style="color: #9A1900"># We're in conservative spawning mode. We don't need to do anything.</span></span>
+            <span style="font-style: italic"><span style="color: #9A1900"># We're in direct spawning mode. We don't need to do anything.</span></span>
         <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
     <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
 <span style="font-weight: bold"><span style="color: #0000FF">end</span></span></tt></pre>
@@ -4068,7 +6008,7 @@ http://www.gnu.org/software/src-highlite -->
 </div>
 </div>
 <div class="sect2">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_smart_spawning_gotcha_3_code_load_order" data-comment-topic="smart-spawning-gotcha-3-code-load-order-12ydsn8">11.5. Smart spawning gotcha #3: code load order</h3>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_smart_spawning_gotcha_3_code_load_order"></span><h3 data-comment-topic="smart-spawning-gotcha-3-code-load-order-12ydsn8" data-anchor="_smart_spawning_gotcha_3_code_load_order">12.5. Smart spawning gotcha #3: code load order</h3>
 <div class="paragraph"><p>This gotcha is only applicable to the <em>smart</em> spawn method, not the <em>smart-lv2</em>
 spawn method.</p></div>
 <div class="paragraph"><p>If your application expects the Rails framework to be not loaded during the
@@ -4087,12 +6027,405 @@ has no effect.</p></div>
 </div>
 </div>
 </div>
+<div class="sect1">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="about_environment_variables"></span><h2 data-comment-topic="appendix-d-about-environment-variables-1t2cuff" data-anchor="about_environment_variables">13. Appendix D: About environment variables</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The Phusion Passenger compilation process can be customized with environment variables.</p></div>
+<div class="paragraph"><p>Environment variables are named values that affect how the system works. For example they tell the system where to look for commands (the <span class="monospaced">PATH</span> variable) or where to look for libraries (<span class="monospaced">LD_LIBRARY_PATH</span>). Their names are often in all-uppercase. Sometimes people refer to an environment variable with a dollar sign <span class="monospaced">$</span> in front, but that’s the same thing: when people say "th [...]
+<div class="paragraph"><p>Environment variables are set on a <strong>per-process</strong> basis, but they are <strong>inherited</strong> by child processes. This means that if you set environment variables in process A, another already running process B will not see these new environment variables. But if A spawns a child process C, then C will have all environment variables that A had. If you once again change the environment variables in A, then C will not see the changes.</p></div>
+<div class="paragraph"><p>The per-process nature of environment variables some implications. When you set environment variables in your <span class="monospaced">bashrc</span> or other bash startup files…</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+…only newly spawned bash shells see them.
+</p>
+</li>
+<li>
+<p>
+…the web server usually does not see them, because the web server tends to be started from init scripts, not from bash.
+</p>
+</li>
+<li>
+<p>
+…cron jobs do not see them, because cron jobs' environment variables are entirely dictated by their crontabs.
+</p>
+</li>
+</ul></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">Because this chapter is meant for beginners, it assumes that the reader uses the bash shell. This chapter does not describe instructions for zsh, csh or other shells. We assume that users of other shells are familiar with the Bourne shell syntax, and know how to apply the instructions in this chapter in their shells' native syntaxes.</td>
+</tr></table>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_working_with_environment_variables"></span><h3 data-comment-topic="working-with-environment-variables-1kmvq8w" data-anchor="_working_with_environment_variables">13.1. Working with environment variables</h3>
+<div class="paragraph"><p>You can see all environment variables in your shell by running the following command:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>env</tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>You can set an evironment variable with the syntax <span class="monospaced">export <NAME>=<VALUE></span>. For example, to set the <span class="monospaced">APXS2</span> variable to the value <span class="monospaced">/usr/sbin/apxs2</span>:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">APXS2</span><span style="color: #990000">=</span>/usr/sbin/apxs<span style="color: #993399">2</span></tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>Any process that you run from your shell from that point on will have said environment variable:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">APXS2</span><span style="color: #990000">=</span>/usr/sbin/apxs<span style="color: #993399">2</span>
+ruby -e <span style="color: #FF0000">'p ENV["APXS2"]'</span>
+<span style="font-style: italic"><span style="color: #9A1900"># => "/usr/sbin/apxs2"</span></span></tt></pre>
+</div>
+</div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">
+<div class="title">The "export" keyword is important</div>
+<div class="paragraph"><p>You <strong>must</strong> set the <span class="monospaced">export</span> keyword. If you omit the <span class="monospaced">export</span> keyword then the environment variable will not be visible to other processes:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">APXS2</span><span style="color: #990000">=</span>/usr/sbin/apxs<span style="color: #993399">2</span>
+ruby -e <span style="color: #FF0000">'p ENV["APXS2"]'</span>
+<span style="font-style: italic"><span style="color: #9A1900"># => nil</span></span></tt></pre>
+</div>
+</div>
+</td>
+</tr></table>
+</div>
+<div class="paragraph"><p>You can reference an environment variable in your shell by typing the <span class="monospaced">$</span> sign followed by the environment variable’s name. For example, to see the value of the <span class="monospaced">PATH</span> variable:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>echo <span style="color: #009900">$PATH</span></tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>You can also use this trick to extend the value of an environment variable:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">PATH</span><span style="color: #990000">=</span>/usr/bin
+
+<span style="font-style: italic"><span style="color: #9A1900"># Prepends '/opt/local/bin', so that it becomes /opt/local/bin:/usr/bin</span></span>
+<span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">PATH</span><span style="color: #990000">=</span>/opt/local/bin<span style="color: #990000">:</span><span style="color: #009900">$PATH</span>
+<span style="font-style: italic"><span style="color: #9A1900"># Appends '/usr/local/bin', so that it becomes /opt/local/bin:/usr/bin:/usr/local/bin</span></span>
+<span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">PATH</span><span style="color: #990000">=</span><span style="color: #009900">$PATH</span><span style="color: #990000">:</span>/usr/local/bin</tt></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_the_path_environment_variable"></span><h3 data-comment-topic="the-path-environment-variable-vlp05e" data-anchor="_the_path_environment_variable">13.2. The PATH environment variable</h3>
+<div class="paragraph"><p>The <span class="monospaced">PATH</span> environment variable dictates where the system looks for command. It is a colon-separated list of directories. If you get a "command not found" error while you know that the command is installed, then setting <span class="monospaced">PATH</span> will help. For example suppose that the command <span class="monospaced">frobnicator</span> is in <span class="monospaced">/opt/local/bin</span>:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>user at localhost bash$ frobnicator
+bash<span style="color: #990000">:</span> frobnicator<span style="color: #990000">:</span> <span style="font-weight: bold"><span style="color: #0000FF">command</span></span> not found</tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>We verify that <span class="monospaced">/opt/local/bin</span> is not in <span class="monospaced">PATH</span>:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>user at localhost bash$ echo <span style="color: #009900">$PATH</span>
+/bin<span style="color: #990000">:</span>/usr/bin<span style="color: #990000">:</span>/usr/local/bin</tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>We can run <span class="monospaced">frobnicator</span> through it’s full path…</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>user at localhost bash$ /opt/local/bin/frobnicator
+<span style="font-style: italic"><span style="color: #9A1900"># => success!</span></span></tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>…or we can add <span class="monospaced">/opt/local/bin</span> to <span class="monospaced">PATH</span>.</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>user at localhost bash$ <span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">PATH</span><span style="color: #990000">=</span><span style="color: #009900">$PATH</span><span style="color: #990000">:</span>/opt/local/bin
+user at localhost bash$ frobnicator
+<span style="font-style: italic"><span style="color: #9A1900"># => success!</span></span></tt></pre>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_adding_phusion_passenger_8217_s_administration_tools_to_path"></span><h4 data-comment-topic="adding-phusion-passenger-s-administration-tools-to-path-1flz2tu" data-anchor="_adding_phusion_passenger_8217_s_administration_tools_to_path">13.2.1. Adding Phusion Passenger’s administration tools to PATH</h4>
+<div class="paragraph"><p>If you get a "command not found" error when invoking one of the Phusion Passenger administration tools (e.g. <span class="monospaced">passenger-status</span> or <span class="monospaced">passenger-memory-stats</span> then that means the tools are not in <span class="monospaced">PATH</span>, so you need to add them.</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+If you <a href="#rubygems_generic_install">installed Phusion Passenger with RubyGems</a>, then the tools are in your RubyGems executable path. You can view the gem path using the command <span class="monospaced">gem env</span>:
+</p>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ gem env
+RubyGems Environment:
+  - RUBYGEMS VERSION: 1.8.15
+  - RUBY VERSION: 1.8.7 (2011-12-28 patchlevel 357) [i686-darwin10.8.0]
+  - INSTALLATION DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
+  - RUBY EXECUTABLE: /opt/ruby-enterprise-1.8.7-2010.01/bin/ruby
+  - EXECUTABLE DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.01/bin    <--------- !!
+  - RUBYGEMS PLATFORMS:
+    - ruby
+    - x86-darwin-10
+  - GEM PATHS:
+     - /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
+     - /Users/hongli/.gem/ruby/1.8
+  - GEM CONFIGURATION:
+     - :update_sources => true
+     - :verbose => true
+     - :benchmark => false
+     - :backtrace => false
+     - :bulk_threshold => 1000
+     - "gem" => "--no-ri --no-rdoc"
+  - REMOTE SOURCES:
+     - http://rubygems.org/</pre>
+</div>
+</div>
+<div class="paragraph"><p>As you can see, the RubyGems executable path in the example happens to be <span class="monospaced">/opt/ruby-enterprise-1.8.7-2010.01/bin</span>. So that directory must be added to <span class="monospaced">PATH</span>.</p></div>
+</li>
+<li>
+<p>
+If you <a href="#tarball_generic_install">installed Phusion Passenger using the tarball</a>, then the tools are in the <span class="monospaced">bin</span> subdirectory of the Phusion Passenger tarball directory that you extracted. For example, if you extracted <span class="monospaced">passenger-4.9.0.tar.gz</span> inside <span class="monospaced">/opt</span>, then the tools are located in <span class="monospaced">/opt/passenger-4.0.9/bin</span>. In that case, you need to add <span class=" [...]
+</p>
+</li>
+<li>
+<p>
+If you installed Phusion Passenger using native OS packages, then some Phusion Passenger administration tools are in <span class="monospaced">/usr/bin</span>, while others are in <span class="monospaced">/usr/sbin</span>. If you are not logged in as root, then <span class="monospaced">/usr/sbin</span> may not be in <span class="monospaced">PATH</span>, which would explain why you get a "command not found" when trying to invoke some of the tools. You should <span class="monospaced">/usr/s [...]
+</p>
+</li>
+<li>
+<p>
+If you are unsure where your Phusion Passenger directory is then you can use the <span class="monospaced">find</span> command to look them up. Go to the root directory and invoke <span class="monospaced">find</span> with <span class="monospaced">sudo</span>:
+</p>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>$ cd /
+$ sudo find . -name passenger-status
+/usr/local/passenger/bin/passenger-status</pre>
+</div>
+</div>
+<div class="paragraph"><p>In this example, the administration tools happen to be in <span class="monospaced">/usr/local/passenger/bin</span>, so you must add that to <span class="monospaced">PATH</span>.</p></div>
+</li>
+</ul></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">You may still get a "command not found" when invoking the tools through sudo, even after you’ve added the relevant directory to <span class="monospaced">PATH</span>. Please read <a href="#env_vars_and_sudo">Environment variables and sudo</a> to learn more.</td>
+</tr></table>
+</div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_making_environment_variables_permanent"></span><h3 data-comment-topic="making-environment-variables-permanent-1wjyhzt" data-anchor="_making_environment_variables_permanent">13.3. Making environment variables permanent</h3>
+<div class="paragraph"><p>When you exit your shell, the evironment variable changes are lost. There is no standard method to set environment variables system-wide, so you have to set them in different configuration files for different services.</p></div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_bash"></span><h4 data-comment-topic="bash-19xsxec" data-anchor="_bash">13.3.1. bash</h4>
+<div class="paragraph"><p>To make environment variables permanent for future bash sessions <strong>for the current user</strong>, add them to your <span class="monospaced">~/.bashrc</span>:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>echo <span style="color: #FF0000">'export FOO=bar'</span> <span style="color: #990000">>></span> <span style="color: #990000">~/.</span>bashrc
+echo <span style="color: #FF0000">'export PATH=/usr/local/bin:$PATH'</span> <span style="color: #990000">>></span> <span style="color: #990000">~/.</span>bashrc</tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>To make them permanent for future bash sessions <strong>for all users</strong>, add them to <span class="monospaced">/etc/bashrc</span>.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">Depending on the system, the bashrc file may have a different filename. On Debian and Ubuntu, it’s <span class="monospaced">/etc/bash.bashrc</span>.</td>
+</tr></table>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_apache"></span><h4 data-comment-topic="apache-9hqtyj" data-anchor="_apache">13.3.2. Apache</h4>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">This subsection describes how to set environment variables on Apache itself, not on apps served through Phusion Passenger for Apache. The environment variables you set here will be passed to all apps, but you cannot customize them on a per-app basis. See also <a href="#env_vars_passenger_apps">Setting environment variables on Phusion Passenger-served apps</a>.</td>
+</tr></table>
+</div>
+<div class="paragraph"><p>On Debian and Ubuntu, with an Apache installed through apt, Apache environment variables are defined in the file <span class="monospaced">/etc/apache2/envvars</span>. This is a shell script so environment variables must be specified with the shell syntax.</p></div>
+<div class="paragraph"><p>On Red Hat, Fedora, CentOS and ScientificLinux, with an Apache installed through YUM, Apache environment variables are defined in <span class="monospaced">/etc/sysconfig/httpd</span>.</p></div>
+<div class="paragraph"><p>On OS X they are defined in <span class="monospaced">/System/Library/LaunchDaemons/org.apache.httpd.plist</span>, as explained <a href="/System/Library/LaunchDaemons/org.apache.httpd.plist">here on Stack Overflow</a>.</p></div>
+<div class="paragraph"><p>On other systems, or if you did not install Apache through the system’s package manager, the configuration file for environment variables is specific to the vendor that supplied Apache. There may not even be such a configuration file. You should contact the vendor for support.</p></div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_nginx"></span><h4 data-comment-topic="nginx-157dpwy" data-anchor="_nginx">13.3.3. Nginx</h4>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">This subsection describes how to set environment variables on Nginx itself, not on apps served through Phusion Passenger for Nginx. The environment variables you set here will be passed to all apps, but you cannot customize them on a per-app basis. See also <a href="#env_vars_passenger_apps">Setting environment variables on Phusion Passenger-served apps</a>.</td>
+</tr></table>
+</div>
+<div class="paragraph"><p>If you installed Nginx through <a href="#install_on_debian_ubuntu">the Brightbox packages</a>, then you can define environment variables in <span class="monospaced">/etc/default/nginx</span>. This is a shell script so you must use the <span class="monospaced">export FOO=bar</span> syntax.</p></div>
+<div class="paragraph"><p>Otherwise, environment variables are best set through the script which starts Nginx. For example, if you installed Nginx from source and you used
+<<nginx_init_script,the Nginx init script described earlier in this manual,
+then you should edit that script to define the environment variables. Those init scripts are regular shell scripts, so use the <span class="monospaced">export FOO=bar</span> syntax. Just make sure your set your environment variables before the script starts Nginx.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<img src="./images/icons/note.png" alt="Note">
+</td>
+<td class="content">Setting environment variables on Nginx has no effect on the <a href="#flying_passenger">Flying Passenger daemon</a> because the daemon is started seperately. You should set the environment variables in the shell right before starting the daemon.</td>
+</tr></table>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_cron"></span><h4 data-comment-topic="cron-1nuc9cz" data-anchor="_cron">13.3.4. cron</h4>
+<div class="paragraph"><p>To make environment variables permanent for cron jobs, add those variables to the relevant crontab. But note that inside crontabs you cannot refer to existing environment variables with the <span class="monospaced">$</span> syntax because crontabs are not shell scripts. You have to specify the entire value.</p></div>
+<div class="listingblock">
+<div class="title">What to put in "crontab -e"</div>
+<div class="content monospaced">
+<pre># Environment variable definitions
+FOO=bar
+APXS2=/usr/sbin/apxs2
+
+# **WRONG!** You cannot refer to existing variables with the `$` syntax!
+PATH=/usr/bin:$PATH
+# **WRONG!** You cannot use the 'export' keyword!
+export PATH=/usr/bin:/usr/local/bin
+# Correct:
+PATH=/usr/bin:/usr/local/bin
+
+# Jobs:
+# m h  dom mon dow   command
+  * *  *   *   *     frobnicator</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="env_vars_passenger_apps"></span><h4 data-comment-topic="phusion-passenger-served-apps-uiewl5" data-anchor="env_vars_passenger_apps">13.3.5. Phusion Passenger-served apps</h4>
+<div class="paragraph"><p>You can pass environment variables to Phusion Passenger-served apps through various methods:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+When running Apache, use the <span class="monospaced">PassEnv</span> and <span class="monospaced">SetEnv</span> directives of <a href="http://httpd.apache.org/docs/2.4/mod/mod_env.html">mod_env</a>. This is supported starting from Phusion Passenger 4.0.
+</p>
+</li>
+<li>
+<p>
+When running Nginx, use the <span class="monospaced">env</span> directive. Unlike Apache, Nginx’s <span class="monospaced">env</span> directive can only be set globally and cannot be customized on a per-virtual host basis.
+</p>
+</li>
+<li>
+<p>
+Through your <span class="monospaced">bashrc</span>. Starting from version 4.0, Phusion Passenger 4.0 spawns applications through bash and inherit all bash environment variables. Phusion Passenger Standalone tends to be started from the shell and thus inherits all environment variables set by the shell.
+</p>
+</li>
+<li>
+<p>
+Through Apache and Nginx, as described earlier in this chapter. Any environment variables that you set on Apache and Nginx itself are inherited by Phusion Passenger, and thus by Phusion Passenger-served apps as well.
+</p>
+</li>
+<li>
+<p>
+Through the application itself. Most programming languages provide APIs for setting environment variables. For example in Ruby you can write:
+</p>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>ENV<span style="color: #990000">[</span><span style="color: #FF0000">'FOO'</span><span style="color: #990000">]</span> <span style="color: #990000">=</span> <span style="color: #FF0000">'bar'</span></tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>In Python you can write:</p></div>
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000080">import</span></span> os
+os<span style="color: #990000">.</span>environ<span style="color: #990000">[</span><span style="color: #FF0000">'FOO'</span><span style="color: #990000">]</span> <span style="color: #990000">=</span> <span style="color: #FF0000">'bar'</span></tt></pre>
+</div>
+</div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="env_vars_and_sudo"></span><h3 data-comment-topic="environment-variables-and-sudo-10lphxn" data-anchor="env_vars_and_sudo">13.4. Environment variables and sudo</h3>
+<div class="paragraph"><p>The <span class="monospaced">sudo</span> command resets all environment variables before running the specified command, for security reasons. So if you set environment variables before running <span class="monospaced">sudo passenger-install-xxx-module</span>, <span class="monospaced">sudo passenger-status</span> or any other commands, then the environment variables are not correctly passed to the command. You can solve this by running sudo with <span class="mono [...]
+<div class="listingblock">
+<div class="content">
+<!-- Generator: GNU source-highlight 2.11.1
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>user at localhost bash$ <span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">APXS2</span><span style="color: #990000">=</span>/usr/sbin/apxs<span style="color: #993399">2</span>
+user at localhost bash$ sudo -E passenger-install-apache<span style="color: #993399">2</span>-module</tt></pre>
+</div>
+</div>
+<div class="paragraph"><p>Alternatively, you can obtain a root prompt with sudo first, and <strong>then</strong> set the environment variables, before running any further commands:</p></div>
+<div class="listingblock">
+<div class="content monospaced">
+<pre>user at localhost bash$ sudo -s
+Password: ...
+root at localhost bash# export APXS2=/usr/sbin/apxs2
+root at localhost bash# passenger-install-apache2-module</pre>
+</div>
+</div>
+</div>
+</div>
+</div>
 </div>
 <div id="footnotes"><hr></div>
 <div id="footer">
-<div id="footer-text">
-Last updated 2012-06-14 09:44:53 CEST
-</div>
+
 </div>
 <script>/*! jQuery v1.7.1 jquery.com | jquery.org/license */
 (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement( [...]
@@ -4429,6 +6762,7 @@ Mizuho.initializeTopBar = $.proxy(function() {
 	var isMobileDevice = this.isMobileDevice();
 	var timerId;
 	
+	// Create the floating table of contents used in the top bar.
 	var $floattoc = $('<div id="floattoc"></div>').html($('#toc').html());
 	$floattoc.find('#toctitle').remove();
 	$floattoc.find('.comments').remove();
@@ -4447,6 +6781,8 @@ Mizuho.initializeTopBar = $.proxy(function() {
 		self.internalLinkClicked(this, event);
 	});
 	
+	// Callback for when the user clicks on the Table of Contents
+	// button on the top bar.
 	function showFloatingToc() {
 		var scrollUpdateTimerId;
 		
@@ -4539,6 +6875,9 @@ Mizuho.initializeTopBar = $.proxy(function() {
 		$window.bind('scroll', onScroll);
 	}
 	
+	// Called whenever the user scrolls. Updates the title of the
+	// Table of Contents button in the top bar to the section that
+	// the user is currently reading.
 	function update() {
 		if ($title.offset().top + $title.height() < $document.scrollTop()) {
 			if (!$topbar.is(':visible')) {
@@ -4582,6 +6921,7 @@ Mizuho.initializeTopBar = $.proxy(function() {
 		}, 100);
 	}
 	
+	
 	if (isMobileDevice) {
 		// Mobile devices don't support position fixed.
 		$topbar.css('position', 'absolute');
@@ -4765,5 +7105,5 @@ Mizuho.topicListReceived = $.proxy(function(result) {
 $(document).ready(Mizuho.initializeCommenting);
 
 </script>
-</body>
+</body>
 </html>
diff --git a/doc/Users guide Nginx.idmap.txt b/doc/Users guide Nginx.idmap.txt
index cf09f26..91adcd1 100644
--- a/doc/Users guide Nginx.idmap.txt	
+++ b/doc/Users guide Nginx.idmap.txt	
@@ -18,49 +18,55 @@
 
 1.2. Where to get support	=>	where-to-get-support-2s9na5
 
-10. Appendix B: Terminology	=>	appendix-b-terminology-wzv5ro
+2. Installation	=>	installing-phusion-passenger-hn03ac
 
-10.1. Application root	=>	application-root-1fd6bqv
+2.1. Synopsis	=>	synopsis-1uu3sqp
 
-11. Appendix C: Spawning methods explained	=>	appendix-c-spawning-methods-explained-tcp8e6
+2.2. Generic installation, upgrade and downgrade method: via RubyGems	=>	generic-installation-upgrade-and-downgrade-method-via-rubygems-76uol7
 
-11.1. The most straightforward and traditional way: conservative spawning	=>	the-most-straightforward-and-traditional-way-conservative-spawning-civ29z
+2.3. Generic installation, upgrade and downgrade method: via tarball	=>	generic-installation-upgrade-and-downgrade-method-via-tarball-2gkx43
 
-11.2. The smart spawning method	=>	the-smart-spawning-method-7nhgtj
+2.4. Installing or upgrading on Debian 6 or Ubuntu	=>	installing-or-upgrading-on-ubuntu-fw5fvp
 
-11.2.1. How it works	=>	how-it-works-f9umga
+2.5. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux	=>	installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-1uus5a1
 
-11.2.2. Summary of benefits	=>	summary-of-benefits-qovyvk
+2.6. Upgrading from open source to Enterprise	=>	upgrading-from-open-source-to-enterprise-1a58c2b
 
-11.3. Smart spawning gotcha #1: unintentional file descriptor sharing	=>	smart-spawning-gotcha-1-unintentional-file-descriptor-sharing-cebw6q
+2.7. Cryptographic verification of installation files	=>	cryptographic-verification-of-installation-files-2goray
 
-11.3.1. Example 1: Memcached connection sharing (harmful)	=>	example-1-memcached-connection-sharing-harmful--1wfs3ad
+2.7.1. Synopsis	=>	synopsis-4fv6zw
 
-11.3.2. Example 2: Log file sharing (not harmful)	=>	example-2-log-file-sharing-not-harmful--ox4yfy
+2.7.2. Importing the Phusion Software Signing key	=>	importing-the-phusion-software-signing-key-1qfpaj4
 
-11.4. Smart spawning gotcha #2: the need to revive threads	=>	smart-spawning-gotcha-2-the-need-to-revive-threads-1ey176o
+2.7.3. Verifying the Phusion Software Signing key	=>	verifying-the-phusion-software-signing-key-i7f1vj
 
-11.5. Smart spawning gotcha #3: code load order	=>	smart-spawning-gotcha-3-code-load-order-12ydsn8
+2.7.4. Verifying the gem and tarball	=>	verifying-the-gem-and-tarball-dr9466
 
-2. Installing Phusion Passenger	=>	installing-phusion-passenger-hn03ac
+2.7.5. Verifying Git signatures	=>	verifying-git-signatures-dyo4fk
 
-2.1. Overview	=>	overview-kvhzi4
+2.7.6. Verifying DEB and RPM packages	=>	verifying-deb-and-rpm-packages-1ed36d5
 
-2.2. Specifying the correct Ruby installation	=>	specifying-the-correct-ruby-installation-jvqdv6
+2.7.7. Revocation	=>	revocation-xwvhea
 
-2.3. Installing Phusion Passenger for Nginx through the installer	=>	installing-phusion-passenger-for-nginx-through-the-installer-1lqxes1
+2.8. Non-interactive, automatic, headless installs or upgrades	=>	non-interactive-automatic-headless-installs-or-upgrades-834ymv
 
-2.3.1. Obtaining the Phusion Passenger files and running the installer	=>	obtaining-the-phusion-passenger-files-and-running-the-installer-6l6ula
+2.9. Customizing the compilation process	=>	customizing-the-compilation-process-u4cdcf
 
-2.3.2. Non-interactive/automatic installation	=>	non-interactive-automatic-installation-1u97717
+2.9.1. Setting the compiler	=>	setting-the-compiler-1l6dpe1
 
-2.4. Installing Phusion Passenger for Nginx manually	=>	installing-phusion-passenger-for-nginx-manually-1qg1e2x
+2.9.2. Adding additional compiler or linker flags	=>	adding-additional-compiler-or-linker-flags-1jehjon
 
-2.5. Upgrading or downgrading Phusion Passenger or Nginx itself	=>	upgrading-or-downgrading-phusion-passenger-or-nginx-itself-8dulxz
+2.9.3. Forcing location of command line tools and dependencies	=>	forcing-location-of-certain-command-line-tools-1j93cki
 
-2.6. Unloading (disabling) Phusion Passenger from Nginx without uninstalling it	=>	unloading-disabling-phusion-passenger-from-nginx-without-uninstalling-it-v447e0
+2.10. Installing as a normal Nginx module without using the installer	=>	installing-as-a-normal-nginx-module-without-using-the-installer-1kkpes5
 
-2.7. Uninstalling Phusion Passenger	=>	uninstalling-phusion-passenger-wuycvb
+2.11. Creating an Nginx init script	=>	creating-an-nginx-init-script-1kd8zg5
+
+2.12. Disabling without uninstalling	=>	disabling-without-uninstalling-1t5tqan
+
+2.13. Uninstalling	=>	uninstalling-phusion-passenger-wuycvb
+
+2.14. Moving to a different directory	=>	moving-to-a-different-directory-gif3wo
 
 3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3) application	=>	deploying-a-ruby-on-rails-1-x-or-2-x-but-not-rails-3-application-b69gqa
 
@@ -98,121 +104,225 @@
 
 4.5.6. Sinatra	=>	sinatra-a7u9ag
 
-5. Configuring Phusion Passenger	=>	configuring-phusion-passenger-1g1svey
+5. Deploying a WSGI (Python) application	=>	deploying-a-wsgi-python-application-1or2efo
+
+5.1. Tutorial/example: writing and deploying a Hello World WSGI application	=>	tutorial-example-writing-and-deploying-a-hello-world-wsgi-application-k5ron2
+
+5.2. Deploying to a virtual host’s root	=>	deploying-to-a-virtual-host-s-root-1chcpbj
+
+5.3. Redeploying (restarting the WSGI application)	=>	redeploying-restarting-the-wsgi-application--10zdh2k
+
+6. Configuring Phusion Passenger	=>	configuring-phusion-passenger-1g1svey
+
+6.1. passenger_root <directory>	=>	passenger-root-directory--bqvhhz
+
+6.2. passenger_ruby <filename>	=>	passenger-ruby-filename--1gnok5k
+
+6.3. passenger_python <filename>	=>	passenger-python-filename--14p554
+
+6.4. passenger_app_root <path/to/root>	=>	passenger-app-root-path-to-root--1dbudc6
+
+6.5. passenger_spawn_method <string>	=>	passenger-spawn-method-string--1sc6njl
+
+6.6. passenger_rolling_restarts <on|off>	=>	passenger-rolling-restarts
+
+6.7. passenger_resist_deployment_errors <on|off>	=>	passenger-resist-deployment-errors-on-off--k9yf1
+
+6.8. passenger_temp_dir <directory>	=>	passenger-temp-dir-directory--1t3opri
+
+6.9. passenger_fly_with <socket filename>	=>	passenger-fly-with-socket-filename--1amd1xn
+
+6.10. Important deployment options	=>	important-deployment-options-av567
+
+6.10.1. passenger_enabled <on|off>	=>	passenger-enabled-on-off--1rpb2t7
+
+6.10.2. passenger_base_uri <uri>	=>	passenger-base-uri-uri--1xtuo50
+
+6.11. Connection handling options	=>	connection-handling-options-8jgq90
+
+6.11.1. passenger_ignore_client_abort <on|off>	=>	passenger-ignore-client-abort
+
+6.11.2. passenger_set_cgi_param <CGI environment name> <value>	=>	passenger-set-cgi-param-cgi-environment-name-value--rx9gc0
+
+6.11.3. passenger_pass_header <header name>	=>	passenger-pass-header-header-name--1cg31je
+
+6.11.4. passenger_buffer_response <on|off>	=>	passenger-buffer-response
+
+6.11.5. passenger_buffer_size	=>	passenger-buffer-size-1jfkq87
+
+6.11.6. passenger_buffers	=>	passenger-busy-buffers
+
+6.11.7. passenger_busy_buffer_size	=>	passenger-busy-buffer-size-124sj61
+
+6.12. Security options	=>	security-options-1bv93g4
+
+6.12.1. passenger_user_switching <on|off>	=>	passenger-user-switching-on-off--1p37u3l
+
+6.12.2. passenger_user <username>	=>	passenger-user-username--b06ur7
+
+6.12.3. passenger_group <group name>	=>	passenger-user-group-name--1fco4j7
+
+6.12.4. passenger_default_user <username>	=>	passenger-default-user-username--1h6cdmf
+
+6.12.5. Passenger_default_group <group name>	=>	passenger-default-group-group-name--1qxn2qa
+
+6.12.6. passenger_show_version_in_header <on|off>	=>	passenger-show-version-in-header-on-off--2h49av
+
+6.12.7. passenger_friendly_error_pages <on|off>	=>	passenger-friendly-error-pages-on-off--1ti1a0e
+
+6.13. Resource control and optimization options	=>	resource-control-and-optimization-options-xd7evs
+
+6.13.1. passenger_max_pool_size <integer>	=>	passenger-max-pool-size-integer--3jzefs
+
+6.13.2. passenger_min_instances <integer>	=>	passenger-min-instances-integer--uclykt
+
+6.13.3. passenger_max_instances <integer>	=>	passenger-max-instances
+
+6.13.4. passenger_max_instances_per_app <integer>	=>	passenger-max-instances-per-app-integer--1xhbbne
+
+6.13.5. passenger_pool_idle_time <integer>	=>	passenger-pool-idle-time-integer--xcw65o
+
+6.13.6. passenger_max_preloader_idle_time <integer>	=>	rails-app-spawner-idle-time-integer--1xjqe4b
+
+6.13.7. passenger_concurrency_model <process|thread>	=>	passenger-concurrency-model-process-thread--brcvkk
+
+6.13.8. passenger_thread_count <number>	=>	passenger-thread-count-number--1kd6ffy
+
+6.13.9. passenger_max_requests <integer>	=>	passenger-max-requests-integer--sgzint
+
+6.13.10. passenger_max_request_time <seconds>	=>	passenger-max-request-time-seconds--1htog2g
+
+6.13.11. passenger_memory_limit <integer>	=>	passenger-memory-limit-integer--1ry7dwx
+
+6.13.12. passenger_pre_start <url>	=>	passenger-pre-start-url--npldeb
+
+6.14. Logging and debugging options	=>	logging-and-debugging-options-14e91ni
+
+6.14.1. passenger_log_level <integer>	=>	passenger-log-level-integer--17snhon
+
+6.14.2. passenger_debug_log_file <filename>	=>	passenger-debug-log-file-filename--21ubaj
+
+6.14.3. passenger_debugger <on|off>	=>	passenger-debugger-on-off--1wkuq85
+
+6.15. Ruby on Rails-specific options	=>	ruby-on-rails-specific-options-12vfokt
+
+6.15.1. rails_env <string>	=>	rails-env-string--jlh7v9
+
+6.16. Rack and Rails >= 3 specific options	=>	rack-specific-options-13yvdxs
 
-5.1. passenger_root <directory>	=>	passenger-root-directory--bqvhhz
+6.16.1. rack_env <string>	=>	rack-env-string--tqmrt0
 
-5.10. Rack-specific options	=>	rack-specific-options-13yvdxs
+6.17. Deprecated options	=>	deprecated-options-1dtzo0g
 
-5.10.1. rack_env <string>	=>	rack-env-string--tqmrt0
+6.17.1. rails_spawn_method	=>	rails-spawn-method-17vdnpt
 
-5.11. Deprecated options	=>	deprecated-options-1dtzo0g
+7. Analysis and system maintenance	=>	analysis-and-system-maintenance-1nnlnj8
 
-5.11.1. rails_spawn_method	=>	rails-spawn-method-17vdnpt
+7.1. Inspecting memory usage	=>	inspecting-memory-usage-1k6y8v0
 
-5.2. passenger_ruby <filename>	=>	passenger-ruby-filename--1gnok5k
+7.2. Inspecting Phusion Passenger’s internal status	=>	inspecting-phusion-passenger-s-internal-status-v36wbc
 
-5.3. passenger_spawn_method <string>	=>	passenger-spawn-method-string--1sc6njl
+7.3. Debugging frozen applications	=>	debugging-frozen-applications-qoctl8
 
-5.4. Important deployment options	=>	important-deployment-options-av567
+7.4. Accessing individual application processes	=>	accessing-individual-application-processes-1qe4fqk
 
-5.4.1. passenger_enabled <on|off>	=>	passenger-enabled-on-off--1rpb2t7
+7.5. Attaching an IRB console to an application process	=>	attaching-an-irb-console-to-an-application-process-d36enw
 
-5.4.2. passenger_base_uri <uri>	=>	passenger-base-uri-uri--1xtuo50
+8. Tips	=>	tips-n4c22d
 
-5.5. Connection handling options	=>	connection-handling-options-8jgq90
+8.1. User Switching (security feature)	=>	user-switching-security--zmsy9o
 
-5.5.1. passenger_use_global_queue <on|off>	=>	passenger-use-global-queue-on-off--14h9n22
+8.1.1. Requirements	=>	requirements-15ozqdj
 
-5.5.2. passenger_ignore_client_abort <on|off>	=>	passenger-ignore-client-abort-on-off--19bapt2
+8.1.2. Effects	=>	effects-nd2m44
 
-5.5.3. passenger_set_cgi_param <CGI environment name> <value>	=>	passenger-set-cgi-param-cgi-environment-name-value--rx9gc0
+8.1.3. Caveats & troubleshooting	=>	caveats-troubleshooting-mbw582
 
-5.5.4. passenger_pass_header <header name>	=>	passenger-pass-header-header-name--1cg31je
+8.1.4. Finding out what user an application is running as	=>	finding-out-what-user-an-application-is-running-as-1ni7zk6
 
-5.5.5. passenger_buffer_response <on|off>	=>	passenger-buffer-response-on-off--1twmh51
+8.2. Copy-on-write memory support (reducing memory consumption of Ruby applications)	=>	reducing-memory-consumption-of-ruby-on-rails-applications-by-33--1o3z66q
 
-5.5.6. passenger_buffer_size	=>	passenger-buffer-size-1jfkq87
+8.3. Capistrano recipe	=>	capistrano-recipe-pfn4qu
 
-5.5.7. passenger_buffers	=>	passenger-buffers-12q1he5
+8.4. Bundler support	=>	bundler-support-19v1h43
 
-5.5.8. passenger_busy_buffer_size	=>	passenger-busy-buffer-size-1gde265
+8.4.1. Does Phusion Passenger itself need to be added to the Gemfile?	=>	does-phusion-passenger-itself-need-to-be-added-to-the-gemfile--xn1a11
 
-5.6. Security options	=>	security-options-1bv93g4
+8.5. Installing multiple Ruby on Rails versions	=>	installing-multiple-ruby-on-rails-versions-1bp1fff
 
-5.6.1. passenger_user_switching <on|off>	=>	passenger-user-switching-on-off--1p37u3l
+8.6. Making the application restart after each request	=>	making-the-application-restart-after-each-request-vimy48
 
-5.6.2. passenger_user <username>	=>	passenger-user-username--b06ur7
+8.7. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments	=>	how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-11mzwt6
 
-5.6.3. passenger_user <group name>	=>	passenger-user-group-name--1fco4j7
+8.8. Out-of-Band Garbage Work and Out-of-Band Garbage Collection	=>	out-of-band-garbage-work-and-out-of-band-garbage-collection-v89lu2
 
-5.6.4. passenger_default_user <username>	=>	passenger-default-user-username--1h6cdmf
+8.9. Flying Passenger	=>	flying-passenger-137qg5e
 
-5.6.5. Passenger_default_group <group name>	=>	passenger-default-group-group-name--1qxn2qa
+8.9.1. Requirements	=>	requirements-194ysj6
 
-5.6.6. passenger_friendly_error_pages <on|off>	=>	passenger-friendly-error-pages-on-off--27mews
+8.9.2. Basic usage	=>	basic-usage-1qtgvwx
 
-5.7. Resource control and optimization options	=>	resource-control-and-optimization-options-xd7evs
+8.9.3. Configuring Flying Passenger	=>	configuring-flying-passenger-n558np
 
-5.7.1. passenger_max_pool_size <integer>	=>	passenger-max-pool-size-integer--3jzefs
+8.9.4. Managing the Flying Passenger daemon	=>	managing-the-flying-passenger-daemon-vjmzdh
 
-5.7.2. passenger_min_instances <integer>	=>	passenger-min-instances-integer--uclykt
+8.9.5. Caveats and limitations	=>	caveats-and-limitations-15wakf
 
-5.7.3. passenger_max_instances_per_app <integer>	=>	passenger-max-instances-per-app-integer--1p7q3cf
+9. Under the hood	=>	under-the-hood-8uney
 
-5.7.4. passenger_pool_idle_time <integer>	=>	passenger-pool-idle-time-integer--xcw65o
+9.1. Page caching support	=>	page-caching-support-nafhf6
 
-5.7.5. passenger_max_requests <integer>	=>	passenger-max-requests-integer--sgzint
+9.2. How Phusion Passenger detects whether a virtual host is a web application	=>	how-phusion-passenger-detects-whether-a-virtual-host-is-a-web-application-13qbmhn
 
-5.7.6. passenger_pre_start <url>	=>	passenger-pre-start-url--qeevln
+10. Appendix A: About this document	=>	appendix-a-about-this-document-zfvixm
 
-5.8. Logging and debugging options	=>	logging-and-debugging-options-14e91ni
+11. Appendix B: Terminology	=>	appendix-b-terminology-wzv5ro
 
-5.8.1. passenger_log_level <integer>	=>	passenger-log-level-integer--17snhon
+11.1. Application root	=>	application-root-1fd6bqv
 
-5.8.2. passenger_debug_log_file <filename>	=>	passenger-debug-log-file-filename--21ubaj
+11.2. Idle process	=>	idle-process-13byfw9
 
-5.9. Ruby on Rails-specific options	=>	ruby-on-rails-specific-options-12vfokt
+11.3. Inactive process	=>	inactive-process-1d2h0po
 
-5.9.1. rails_env <string>	=>	rails-env-string--jlh7v9
+12. Appendix C: Spawning methods explained	=>	appendix-c-spawning-methods-explained-tcp8e6
 
-5.9.2. rails_framework_spawner_idle_time <integer>	=>	rails-framework-spawner-idle-time-integer--q5ljd5
+12.1. The most straightforward and traditional way: direct spawning	=>	the-most-straightforward-and-traditional-way-conservative-spawning-civ29z
 
-5.9.3. rails_app_spawner_idle_time <integer>	=>	rails-app-spawner-idle-time-integer--1xjqe4b
+12.2. The smart spawning method	=>	the-smart-spawning-method-7nhgtj
 
-6. Analysis and system maintenance	=>	analysis-and-system-maintenance-1nnlnj8
+12.2.1. How it works	=>	how-it-works-f9umga
 
-6.1. Inspecting memory usage	=>	inspecting-memory-usage-1k6y8v0
+12.2.2. Summary of benefits	=>	summary-of-benefits-qovyvk
 
-6.2. Inspecting Phusion Passenger’s internal status	=>	inspecting-phusion-passenger-s-internal-status-v36wbc
+12.3. Smart spawning gotcha #1: unintentional file descriptor sharing	=>	smart-spawning-gotcha-1-unintentional-file-descriptor-sharing-cebw6q
 
-6.3. Debugging frozen applications	=>	debugging-frozen-applications-qoctl8
+12.3.1. Example 1: Memcached connection sharing (harmful)	=>	example-1-memcached-connection-sharing-harmful--1wfs3ad
 
-6.4. Accessing individual application processes	=>	accessing-individual-application-processes-1qe4fqk
+12.3.2. Example 2: Log file sharing (not harmful)	=>	example-2-log-file-sharing-not-harmful--ox4yfy
 
-7. Tips	=>	tips-n4c22d
+12.4. Smart spawning gotcha #2: the need to revive threads	=>	smart-spawning-gotcha-2-the-need-to-revive-threads-1ey176o
 
-7.1. User switching (security)	=>	user-switching-security--zmsy9o
+12.5. Smart spawning gotcha #3: code load order	=>	smart-spawning-gotcha-3-code-load-order-12ydsn8
 
-7.2. Reducing memory consumption of Ruby on Rails applications by 33%	=>	reducing-memory-consumption-of-ruby-on-rails-applications-by-33--1o3z66q
+13. Appendix D: About environment variables	=>	appendix-d-about-environment-variables-1t2cuff
 
-7.3. Capistrano recipe	=>	capistrano-recipe-pfn4qu
+13.1. Working with environment variables	=>	working-with-environment-variables-1kmvq8w
 
-7.4. Bundler support	=>	bundler-support-19v1h43
+13.2. The PATH environment variable	=>	the-path-environment-variable-vlp05e
 
-7.5. Moving Phusion Passenger to a different directory	=>	moving-phusion-passenger-to-a-different-directory-1hel5cp
+13.2.1. Adding Phusion Passenger’s administration tools to PATH	=>	adding-phusion-passenger-s-administration-tools-to-path-1flz2tu
 
-7.6. Installing multiple Ruby on Rails versions	=>	installing-multiple-ruby-on-rails-versions-1bp1fff
+13.3. Making environment variables permanent	=>	making-environment-variables-permanent-1wjyhzt
 
-7.7. Making the application restart after each request	=>	making-the-application-restart-after-each-request-vimy48
+13.3.1. bash	=>	bash-19xsxec
 
-7.8. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments	=>	how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-11mzwt6
+13.3.2. Apache	=>	apache-9hqtyj
 
-8. Under the hood	=>	under-the-hood-8uney
+13.3.3. Nginx	=>	nginx-157dpwy
 
-8.1. Page caching support	=>	page-caching-support-nafhf6
+13.3.4. cron	=>	cron-1nuc9cz
 
-8.2. How Phusion Passenger detects whether a virtual host is a web application	=>	how-phusion-passenger-detects-whether-a-virtual-host-is-a-web-application-13qbmhn
+13.3.5. Phusion Passenger-served apps	=>	phusion-passenger-served-apps-uiewl5
 
-9. Appendix A: About this document	=>	appendix-a-about-this-document-zfvixm
+13.4. Environment variables and sudo	=>	environment-variables-and-sudo-10lphxn
 
diff --git a/doc/Users guide Nginx.txt b/doc/Users guide Nginx.txt
index e573873..e061467 100644
--- a/doc/Users guide Nginx.txt	
+++ b/doc/Users guide Nginx.txt	
@@ -2,277 +2,28 @@
 
 image:images/phusion_banner.png[link="http://www.phusion.nl/"]
 
-Phusion Passenger is an Nginx module, which makes deploying Ruby and Ruby on
-Rails applications on Nginx a breeze. It follows the usual Ruby on Rails
-conventions, such as "Don't-Repeat-Yourself" and ease of setup, while at the
-same time providing enough flexibility.
+Phusion Passenger is an application server which can directly integrate into Nginx. It is designed to be easy to use, fast, stable and reliable and is used by link:http://trends.builtwith.com/Web-Server/Phusion-Passenger[hundreds of thousands of websites] all over the world.
+
+Phusion Passenger is a so-called polyglot application server because it supports applications written in multiple programming languages. At this time, Ruby and Python are supported.
 
 This users guide will teach you:
 
 - How to install Nginx with Phusion Passenger support.
 - How to configure Phusion Passenger.
-- How to deploy a Ruby on Rails application.
-- How to deploy a link:http://rack.rubyforge.org/[Rack]-based Ruby application.
+- How to deploy Ruby and Python applications.
 - How to solve common problems.
 
 This guide assumes that the reader is somewhat familiar with Nginx and with
-using the commandline.
-
-
-== Support information ==
-
-=== Supported operating systems ===
-
-Phusion Passenger works on any POSIX-compliant operating system. In other
-words: practically any operating system on earth, except Microsoft Windows.
-
-Phusion Passenger is confirmed on a large number of operating systems and Linux
-distributions, including, but not limited to, Ubuntu, Debian, CentOS/Fedora/RHEL,
-Gentoo, Mac OS X, FreeBSD and Solaris. Both 32-bit and 64-bit platforms are supported.
-Please
-link:http://code.google.com/p/phusion-passenger/issues/list[report a bug]
-or
-link:http://groups.google.com/group/phusion-passenger[join our discussion forum]
-if it doesn't work on your POSIX-compliant operating system.
-
-=== Where to get support ===
-
-* link:http://code.google.com/p/phusion-passenger/issues/list[Issue tracker] - report
-  bugs here.
-* link:http://groups.google.com/group/phusion-passenger[Discussion forum] - post a
-  message here if you're experiencing problems.
-
-
-== Installing Phusion Passenger ==
-
-=== Overview ===
-
-As you might already know, Nginx does not support loadable modules, in contrast
-to most other web servers (e.g. Apache). Therefore, to install Phusion Passenger
-for Nginx, one must recompile and reinstall Nginx with Phusion Passenger support.
-There are two ways to do this:
-
-1. By running the Phusion Passenger installer for Nginx. This installer will
-   guide you through the entire installation process, including downloading,
-   compiling and installing Nginx. You should be able to get Nginx with Phusion
-   Passenger support up-and-running in a matter of minutes. This is the
-   recommended installation method.
-2. By manually configuring and compiling Nginx with Phusion Passenger support,
-   through Nginx's `--add-module` configure option. Generally, using our
-   installer is easier, so you should only use this method if you're already
-   familiar with compiling Nginx.
-
-TIP: You might have to run the installation commands in the following sections
-as 'root'. If the installer fails because of permission errors, it will tell
-you.
-
-[[specifying_ruby_installation]]
-=== Specifying the correct Ruby installation ===
-
-If your system has multiple Ruby installations -- which is likely the case on
-MacOS X, or if you've also installed
-link:http://www.rubyenterpriseedition.com[Ruby Enterprise Edition] -- then you
-will need to tell the operating system which Ruby installation to use, prior to
-running the Phusion Passenger installer. If you only have one Ruby installation
-(the case on most Linux systems), then you can skip this section because Phusion
-Passenger will automatically detect it.
-
-To specify a Ruby installation, prepend your Ruby installation's `bin`
-directory to the `PATH` environment variable. For example, if you have the
-following Ruby installations:
-
-- /usr/bin/ruby
-- /opt/myruby/bin/ruby
-
-and you want to use the latter, then type:
-
-----------------------------------
-export PATH=/opt/myruby/bin:$PATH
-----------------------------------
-
-=== Installing Phusion Passenger for Nginx through the installer ===
-
-==== Obtaining the Phusion Passenger files and running the installer ====
-
-You must obtain the Phusion Passenger files in order to run the installer.
-This can be done either by installing the Phusion Passenger gem, or by
-downloading the source tarball.
-
-===== Gem =====
-
-First, install the Phusion Passenger gem by running:
-
----------------------------------
-gem install passenger
----------------------------------
-
-Next, run the Phusion Passenger installer for Nginx:
-
----------------------------------
-passenger-install-nginx-module
----------------------------------
-
-Please follow the instructions given by the installer.
-
-===== Source tarball =====
-
-The source tarball can be download from the
-link:http://www.modrails.com/[Phusion Passenger website]. Extract the tarball to
-whatever location you prefer. *The Phusion Passenger files are to reside in that
-location permanently.* For example, if you would like Phusion Passenger to
-reside in `/opt/passenger-x.x.x`, then type:
-
---------------------------------------------------------------
-cd /opt
-tar xzvf ~/YourDownloadsFolder/passenger-x.x.x.tar.gz
---------------------------------------------------------------
-
-Next, run the Phusion Passenger installer for Nginx:
-
---------------------------------------------------------------
-/opt/passenger-x.x.x/bin/passenger-install-nginx-module
---------------------------------------------------------------
-
-Please follow the instructions given by the installer.
-
-IMPORTANT: Please do not remove the passenger-x.x.x folder after installation.
-Furthermore, the passenger-x.x.x folder must be accessible by Nginx.
-
-==== Non-interactive/automatic installation ====
-
-By default, the installer is interactive. If you want to automate installation,
-then you can do so by passing various answers to the installer through command
-line options.
-
-Please run the installer with `--help` for a list of available command line
-options.
-
-=== Installing Phusion Passenger for Nginx manually ===
-
-You can also install Phusion Passenger the way you install any other Nginx module.
-To do this, run Nginx's configure script with `--add-module=/path-to-passenger-root/ext/nginx`.
-
-If you installed Phusion Passenger via the gem, then 'path-to-passenger-root'
-can be obtained with the command:
-
---------------------------
-passenger-config --root
---------------------------
-
-This will probably output something along the lines of '/usr/lib/ruby/gems/1.8/gems/passenger-x.x.x',
-so you'll probably have to specify something like `--add-module=/usr/lib/ruby/gems/1.8/gems/passenger-x.x.x/ext/nginx`.
-
-If you installed Phusion Passenger via a source tarball, then 'path-to-passenger-root'
-is the directory which contains the Phusion Passenger source code. So if you
-extracted the Phusion Passenger source code to '/opt/passenger-x.x.x', then you'll
-have to specify `--add-module=/opt/passenger-x.x.x/ext/nginx`.
-
-After having installed Nginx with Phusion Passenger support, you must paste the following
-line into your Nginx configuration file:
-
-------------------------------------------
-passenger_root /path-to-passenger-root;
-------------------------------------------
-
-After having done so, restart Nginx.
-
-=== Upgrading or downgrading Phusion Passenger or Nginx itself ===
-
-Whether you're upgrading/downgrading Phusion Passenger or Nginx itself (or perhaps both),
-Nginx will have to be recompiled and reinstalled. The procedure is exactly the same as
-a normal installation so just follow the instructions in section 2.3 or 2.4.
-
-When following the installation instructions, eventually `passenger-install-nginx-module`
-or this document will instruct you to copy & paste some settings into the Nginx
-configuration file; something that looks along the lines of:
-
-------------------------------------------
-passenger_root ...;
-passenger_ruby ...;
-------------------------------------------
-
-Because you already had Phusion Passenger installed, you already had similar settings
-in your Nginx configuration file, just with different values. *Replace* the old settings with
-the new ones that you are instructed to paste. It is important that the old settings are
-removed, otherwise Phusion Passenger may malfunction.
-
-When you're done, restart Nginx.
-
-=== Unloading (disabling) Phusion Passenger from Nginx without uninstalling it ===
+using the command line.
 
-You can temporarily unload (disable) Phusion Passenger from Nginx, without
-uninstalling the Phusion Passenger files, so that Nginx behaves as if Phusion
-Passenger was never installed in the first place. This might be useful to you if,
-for example, you seem to be experiencing a problem caused by Phusion Passenger,
-but you want to make sure whether that's actually the case, without having
-to go through the hassle of uninstalling Phusion Passenger completely. When disabled,
-Phusion Passenger will not occupy any memory or CPU or otherwise interfere with
-Nginx.
 
-To unload Phusion Passenger, edit your Nginx configuration file(s)
-and comment out all Phusion Passenger configuration directives.
+== Support information
 
-For example, if your configuration file looks like this...
+include::users_guide_snippets/support_information.txt[]
 
------------------------------------
-...
+== Installation
 
-http {
-    passenger_root /somewhere/passenger-x.x.x;
-    passenger_ruby /usr/bin/ruby;
-    passenger_max_pool_size 10;
-    
-    gzip on;
-    
-    server {
-        server_name www.foo.com;
-        listen 80;
-        root /webapps/foo/public;
-        passenger_enabled on;
-        passenger_use_global_queue on;
-    }
-}
------------------------------------
-
-...then comment out the relevant directives, so that it looks like this:
-
------------------------------------
-...
-
-http {
-    # passenger_root /somewhere/passenger-x.x.x;
-    # passenger_ruby /usr/bin/ruby;
-    # passenger_max_pool_size 10;
-    
-    gzip on;
-    
-    server {
-        server_name www.foo.com;
-        listen 80;
-        root /webapps/foo/public;
-        # passenger_enabled on;
-        # passenger_use_global_queue on;
-    }
-}
------------------------------------
-
-After you've done this, save the file and restart Nginx.
-
-=== Uninstalling Phusion Passenger ===
-
-To uninstall Phusion Passenger, please first remove all Phusion Passenger
-configuration directives from your Nginx configuration file(s). After you've
-done this, you need to remove the Phusion Passenger files.
-
-- If you installed Phusion Passenger via a gem, then type `gem uninstall passenger`.
-  You might have to run this as root.
-- If you installed Phusion Passenger via a source tarball, then remove the directory
-  in which you placed the extracted Phusion Passenger files. This directory is the
-  same as the one pointed to the by 'PassengerRoot' configuration directive.
-
-After having done so, recompile and reinstall Nginx itself, this time without
-Phusion Passenger support, in order to purge any Phusion Passenger code from the
-Nginx binary.
+include::users_guide_snippets/installation.txt[]
 
 
 [[deploying_a_ror_app]]
@@ -299,14 +50,14 @@ For example:
 -------------------------------------------
 http {
     ...
-    
+
     server {
         listen 80;
         server_name www.mycook.com;
         root /webapps/mycook/public;
         passenger_enabled on;
     }
-    
+
     ...
 }
 -------------------------------------------
@@ -320,13 +71,13 @@ Suppose that you already have a 'server' virtual host entry:
 -------------------------------------------
 http {
     ...
-    
+
     server {
         listen 80;
         server_name www.phusion.nl;
         root /websites/phusion;
     }
-    
+
     ...
 }
 -------------------------------------------
@@ -345,7 +96,7 @@ option to the 'server' block:
 -------------------------------------------
 http {
     ...
-    
+
     server {
         listen 80;
         server_name www.phusion.nl;
@@ -353,7 +104,7 @@ http {
         passenger_enabled on;        # <--- These lines have
         passenger_base_uri /rails;   # <--- been added.
     }
-    
+
     ...
 }
 -------------------------------------------
@@ -515,14 +266,14 @@ Suppose that you already have a virtual host:
 -------------------------------------------
 http {
     ...
-    
+
     server {
         listen 80;
         server_name www.phusion.nl;
         root /websites/phusion;
         passenger_enabled on;
     }
-    
+
     ...
 }
 -------------------------------------------
@@ -541,7 +292,7 @@ option to the 'server' block:
 -------------------------------------------
 http {
     ...
-    
+
     server {
         listen 80;
         server_name www.phusion.nl;
@@ -549,7 +300,7 @@ http {
         passenger_enabled on;        # <--- These lines have
         passenger_base_uri /rack;    # <--- been added.
     }
-    
+
     ...
 }
 -------------------------------------------
@@ -591,6 +342,106 @@ touch /webapps/rackapp/tmp/restart.txt
 include::users_guide_snippets/rackup_specifications.txt[]
 
 
+== Deploying a WSGI (Python) application
+
+Phusion Passenger supports all WSGI-compliant Python web applications. Suppose that you have a WSGI application in '/webapps/wsgiapp'. Then that folder must contain at least three entries:
+
+- 'passenger_wsgi.py', which Phusion Passenger will use as the main entry point for your application. This file must export a WSGI object called `application`.
+- 'public/', a folder containing public static web assets, like images and stylesheets.
+- 'tmp/', used for 'restart.txt' (our application restart mechanism). This will be explained in a following subsection.
+
+So '/webapps/wsgiapp' must, at minimum, look like this:
+----------------------
+/webapps/wsgiapp
+  |
+  +-- config.ru
+  |
+  +-- public/
+  |
+  +-- tmp/
+----------------------
+
+=== Tutorial/example: writing and deploying a Hello World WSGI application ===
+
+First we create a Phusion Passenger-compliant WSGI directory structure:
+
+-------------------------------------------
+$ mkdir /webapps/wsgi_example
+$ mkdir /webapps/wsgi_example/public
+$ mkdir /webapps/wsgi_example/tmp
+-------------------------------------------
+
+Next, we write a minimal "hello world" WSGI application:
+
+-------------------------------------------
+$ cd /webapps/wsgi_example
+$ some_awesome_editor passenger_wsgi.py
+...type in some source code...
+$ cat passenger_wsgi.py
+def application(environ, start_response):
+  start_response('200 OK', [('Content-Type', 'text/plain')])
+  return [b"hello world!\n"]
+-------------------------------------------
+
+Finally, we deploy it by adding the following configuration options to
+the Nginx configuration file:
+
+-------------------------------------------
+http {
+    ...
+    server {
+        listen 80;
+        server_name www.wsgiexample.com;
+        root /webapps/wsgi_example/public;
+        passenger_enabled on;
+    }
+    ...
+}
+-------------------------------------------
+
+And we're done! After an Nginx restart, the above WSGI application will be available
+under the URL 'http://www.wsgiexample.com/'.
+
+=== Deploying to a virtual host's root ===
+
+Add a 'server' virtual host entry to your Nginx configuration file. The virtual host's
+root must point to your WSGI application's 'public' folder. You must also set
+'passenger_enabled on' in the 'server' block.
+
+For example:
+-------------------------------------------
+http {
+    ...
+    server {
+        listen 80;
+        server_name www.wsgiapp.com;
+        root /webapps/wsgiapp/public;
+        passenger_enabled on;
+    }
+    ...
+}
+-------------------------------------------
+Then restart Nginx. The application has now been deployed.
+
+=== Redeploying (restarting the WSGI application) ===
+
+Deploying a new version of a WSGI application is as simple as
+re-uploading the application files, and restarting the application.
+
+There are two ways to restart the application:
+
+1. By restarting Nginx.
+2. By creating or modifying the file 'tmp/restart.txt' in the WSGI
+   application's <<application_root,root folder>>. Phusion Passenger will
+   automatically restart the application.
+
+For example, to restart our example application, we type this in the
+command line:
+-------------------------------------------
+touch /webapps/wsgiapp/tmp/restart.txt
+-------------------------------------------
+
+
 == Configuring Phusion Passenger ==
 
 After installation, Phusion Passenger does not need any further configurations.
@@ -609,11 +460,110 @@ this option as well. Please read
 
 This required option may only occur once, in the 'http' configuration block.
 
+NOTE: This option has no effect when you are using <<flying_passenger,Flying Passenger>>.
+
+[[PassengerRuby]]
 === passenger_ruby <filename> ===
-This option allows one to specify the Ruby interpreter to use.
+The `passenger_ruby` option allows one to specify the Ruby interpreter to use. Similarly, the `passenger_python` option is for specifying the Python interpreter.
 
-This option may only occur once, in the 'http' configuration block.
-The default is 'ruby'.
+In versions prior to 4.0.0, only a single Ruby version was supported for the entire Nginx instance, so `passenger_ruby` may only occur in the global server configuration. Also, the `passenger_python` option was not supported.
+
+Since version 4.0.0, the `passenger_python` option was added. Also, Phusion Passenger supports multiple Ruby or Python interpreters in the same Nginx instance. And so, since version 4.0.0, this option may occur in the following places:
+
+ * In the 'http' configuration block.
+ * In a 'server' configuration block.
+ * In a 'location' configuration block.
+ * In an 'if' configuration scope.
+
+The `passenger_ruby` in the `http` block - that is, the one that `passenger-install-nginx-module` outputs - is used for invoking certain Phusion Passenger tools that are written in Ruby, e.g. the internal helper script used by <<PassengerPreStart,passenger_pre_start>>. It is also used as the default Ruby interpreter for Ruby web apps. You don't *have* to specify a `passenger_ruby` in the `http` block though, because the default is to use the first `ruby` command found in `$PATH`.
+
+The `passenger_python` option works in a similar manner, but applies to Python instead.
+
+You can also override `passenger_ruby` or `passenger_python` in specific contexts if you want to use a different Ruby/Python interpreter for that web app. For example:
+
+------------------------------
+http {
+    passenger_root ...;
+    
+    # Use Ruby 1.8.7 by default.
+    passenger_ruby /usr/bin/ruby1.8;
+    # Use Python 2.6 by default.
+    passenger_python /usr/bin/python2.6;
+
+    server {
+        # This Rails web app will use Ruby 1.8.7
+        listen 80;
+        server_name www.foo.com;
+        root /webapps/foo/public;
+    }
+
+    server {
+        # This Rails web app will use Ruby 1.9.3, as installed by RVM
+        passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3/ruby;
+
+        listen 80;
+        server_name www.bar.com;
+        root /webapps/bar/public;
+
+        # If you have a web app deployed in a sub-URI, customize
+        # passenger_ruby/passenger_python inside a `location` block.
+        # The web app under www.bar.com/blog will use JRuby 1.7.1
+        passenger_base_uri /blog;
+        location /blog {
+            passenger_enabled on;
+            passenger_ruby /usr/local/rvm/wrappers/jruby-1.7.1/ruby;
+        }
+    }
+
+    server {
+        # This Flask web app will use Python 3.0
+        passenger_python /usr/bin/python3.0;
+
+        listen 80;
+        server_name www.baz.com;
+        root /webapps/baz/public;
+    }
+}
+------------------------------
+
+include::users_guide_snippets/rvm_helper_tool.txt[]
+
+=== passenger_python <filename> ===
+:version: 4.0.0
+include::users_guide_snippets/since_version.txt[]
+
+This option allows one to specify the Python interpreter to use. See <<PassengerRuby,passenger_ruby>> for more information. The default value is 'python', meaning that the Python interpreter will be looked up according to the `PATH` environment variable.
+
+[[PassengerAppRoot]]
+=== passenger_app_root <path/to/root> ===
+:version: 4.0.0
+include::users_guide_snippets/since_version.txt[]
+By default, Phusion Passenger assumes that the application's root directory
+is the parent directory of the 'public' directory. This option allows one to
+specify the application's root independently from the Nginx 'root', which
+is useful if the 'public' directory lives in a non-standard place.
+
+This option may occur in the following places:
+
+ * In the 'http' configuration block.
+ * In a 'server' configuration block.
+ * In a 'location' configuration block.
+ * In an 'if' configuration scope.
+
+In each place, it may be specified at most once.
+
+Example:
+
+-----------------------------
+server {
+    server_name test.host;
+    root /var/rails/zena/sites/example.com/public;
+    # normally Phusion Passenger would
+    # have assumed that the application
+    # root is "/var/rails/zena/sites/example.com"
+    passenger_app_root /var/rails/zena;
+}
+-----------------------------
 
 [[PassengerSpawnMethod]]
 === passenger_spawn_method <string> ===
@@ -625,11 +575,11 @@ understand it, as it's mostly a technical detail. You can basically follow this
 
 ************************************************
 If your application works on Mongrel, but not on Phusion Passenger, then set
-`passenger_spawn_method` to 'conservative'. Otherwise, leave it at 'smart-lv2' (the default).
+`passenger_spawn_method` to 'direct'. Otherwise, leave it at 'smart' (the default).
 ************************************************
 
-However, we do recommend you to try to understand it. The 'smart' and 'smart-lv2' spawn
-methods bring many benefits.
+However, we do recommend you to try to understand it. The 'smart' spawn
+method brings many benefits.
 =========================================================
 
 include::users_guide_snippets/passenger_spawn_method.txt[]
@@ -641,7 +591,115 @@ This option may occur in the following places:
  * In a 'location' configuration block.
  * In an 'if' configuration scope.
 
-In each place, it may be specified at most once. The default value is 'smart-lv2'.
+In each place, it may be specified at most once. The default value is 'smart'.
+
+[[PassengerRollingRestarts]]
+=== passenger_rolling_restarts <on|off> ===
+:version: 3.0.0
+include::users_guide_snippets/enterprise_only.txt[]
+
+Enables or disables support for rolling restarts. Normally when you
+restart an application (by touching restart.txt), Phusion Passenger would
+shut down all application processes and spawn a new one. The spawning
+of a new application process could take a while, and any requests that
+come in during this time will be blocked until this first application
+process has spawned.
+
+But when rolling restarts are enabled, Phusion Passenger Enterprise will:
+
+1. Spawn a new process in the background.
+2. When it's done spawning, Phusion Passenger Enterprise will replace one of the old processes with this newly spawned one.
+3. Step 1 and 2 are repeated until all processes have been replaced.
+
+This way, visitors will not experience any delays when you are restarting your application. This allows you to, for example, upgrade your application often without degrading user experience.
+
+Rolling restarts have a few caveat however that you should be aware of:
+
+- Upgrading an application sometimes involves upgrading the database schema.
+  With rolling restarts, there may be a point in time during which processes
+  belonging to the previous version and processes belonging to the new version
+  both exist at the same time. Any database schema upgrades you perform must
+  therefore be backwards-compatible with the old application version.
+- Because there's no telling which process will serve a request, users may
+  not see changes brought about by the new version until all processes have
+  been restarted. It is for this reason that you should not use rolling
+  restarts in development, only in production.
+
+This option may occur in the following places:
+
+ * In the 'http' configuration block.
+ * In a 'server' configuration block.
+ * In a 'location' configuration block.
+ * In an 'if' configuration scope.
+
+In each place, it may be specified at most once. The default value is 'off'.
+
+=== passenger_resist_deployment_errors <on|off> ===
+:version: 3.0.0
+include::users_guide_snippets/enterprise_only.txt[]
+
+Enables or disables resistance against deployment errors.
+
+Suppose you've upgraded your application and you've issues a command to restart it (by touching restart.txt), but the application code contains an error that prevents Phusion Passenger from successfully spawning a process (e.g. a syntax error). Phusion Passenger would normally display an error message in response to this.
+
+By enabling deployment error resistance, Phusion Passenger Enterprise would instead do this:
+
+- It passes the request to one of the existing application processes (that belong to the previous version of the application). The visitor will not see a Phusion Passenger process spawning error message.
+- It logs the error to the global web server error log file.
+- It sets an internal flag so that no processes for this application will be spawned (even when the current traffic would normally result in more processes being spawned) and no processes will be idle cleaned. Processes *could* still be shutdown because of other events, e.g. because their <<PassengerMemoryLimit,memory limit>> have been reached.
+
+This way, visitors will suffer minimally from deployment errors. Phusion Passenger will attempt to restart the application again next time restart.txt is touched.
+
+Enabling deployment error resistance only works if <<PassengerRollingRestarts,rolling restart>> is also enabled.
+
+This option may occur in the following places:
+
+ * In the 'http' configuration block.
+ * In a 'server' configuration block.
+ * In a 'location' configuration block.
+ * In an 'if' configuration scope.
+
+In each place, it may be specified at most once. The default value is 'off'.
+
+[[PassengerTempDir]]
+=== passenger_temp_dir <directory> ===
+Specifies the directory that Phusion Passenger should use for storing temporary
+files. This includes things such as Unix socket files.
+
+This option may only be specified in the 'http' configuration block. The
+default temp directory that Phusion Passenger uses is '/tmp'.
+
+This option is especially useful if Nginx is not allowed to write to /tmp
+(which is the case on some systems with strict SELinux policies) or if the
+partition that /tmp lives on doesn't have enough disk space.
+
+.Command line tools
+Some Phusion Passenger command line administration tools, such as
+`passenger-status`, must know what Phusion Passenger's temp directory is
+in order to function properly. You can pass the directory through the
+`PASSENGER_TMPDIR` environment variable, or the `TMPDIR` environment variable
+(the former will be used if both are specified).
+
+For example, if you set 'passenger_temp_dir' to '/my_temp_dir', then invoke
+`passenger-status` after you've set the `PASSENGER_TMPDIR` or `TMPDIR`
+environment variable, like this:
+
+----------------------------------------------------------
+export PASSENGER_TMPDIR=/my_temp-dir
+sudo -E passenger-status
+# The -E option tells 'sudo' to preserve environment variables.
+----------------------------------------------------------
+
+:option: `--temp-dir`
+include::users_guide_snippets/alternative_for_flying_passenger.txt[]
+
+=== passenger_fly_with <socket filename>
+:version: 4.1.0
+include::users_guide_snippets/enterprise_only.txt[]
+
+Enables <<flying_passenger,Flying Passenger>> mode, and configures Nginx to connect to the Flying Passenger daemon that's listening on the given socket filename.
+
+This option may only occur once, in the 'http' configuration block. When not set, Flying Passenger is not enabled.
 
 === Important deployment options ===
 ==== passenger_enabled <on|off> ====
@@ -675,23 +733,6 @@ This option may occur in the following places:
 
 === Connection handling options ===
 
-[[PassengerUseGlobalQueue]]
-==== passenger_use_global_queue <on|off> ====
-Turns the use of global queuing on or off.
-
-This option may occur in the following places:
-
- * In the 'http' configuration block.
- * In a 'server' configuration block.
- * In a 'location' configuration block.
- * In an 'if' configuration scope.
-
-In each place, it may be specified at most once. The default value is 'on'.
-
-'This feature is sponsored by http://www.37signals.com/[37signals].'
-
-include::users_guide_snippets/global_queueing_explained.txt[]
-
 ==== passenger_ignore_client_abort <on|off> ====
 Normally, when the HTTP client aborts the connection (e.g. when the user clicked on "Stop"
 in the browser), the connection with the application process will be closed too. If the
@@ -768,19 +809,30 @@ This option may occur in the following places:
  * In an 'if' configuration scope.
 
 ==== passenger_buffer_response <on|off> ====
-When turned on, application-generated responses are buffered in memory and also on
-disk if the response is larger than a certain threshold. By buffering responses,
-protection is provided against slow HTTP clients that can not read your response
-immediately.
-
-For example, consider an HTTP client that's on a dial-up modem link, and your
-application instance generates a 2 MB response. If response buffering is turned
-off then your application instance will be blocked until the entire 2 MB has been
-sent out to the HTTP client. This disallows your application instance to do any useful
-work in the mean time. By enabling response buffering, Phusion Passenger will read
-the application response as quickly as possible and will take care of slow clients.
-
-However, keep in mind that enabling this option will make streaming responses
+When turned on, application-generated responses are buffered by Nginx. Buffering will
+happen in memory and also on disk if the response is larger than a certain threshold.
+
+Before we proceed with explaining this configuration option, we want to state the following to avoid confusion. If you use Phusion Passenger for Nginx, there are in fact two response buffering systems active:
+
+1. The Nginx response buffering system. `passenger_buffer_response` turns this on or off.
+2. The Phusion Passenger response buffering system, a.k.a. 'real-time disk-backed response buffering'. This buffering system is always on, regardless of the value of `passenger_buffer_response`.
+
+Response buffering is useful because it protects against slow HTTP clients that do not read responses immediately or quickly enough. Buffering prevents such slow clients from blocking web applications that have limited concurrency. Because Phusion Passenger's response buffering is always turned on, you are always protected. Therefore, `passenger_buffer_response` is off by default, and you never should have to turn it on.
+
+If for whatever reason you want to turn Nginx-level response buffering on, you can do so with this option.
+
+Nginx's response buffering works differently from Phusion Passenger's. Nginx's buffering system buffers the entire response before attempting to send it to the client, while Phusion Passenger's attempts to send the data to the client immediately. Therefore, if you turn on `passenger_buffer_response`, you may interfere with applications that want to stream responses to the client.
+
+How does response buffering - whether it's done by Nginx or by Phusion Passenger - exactly protect against slow clients?
+Consider an HTTP client that's on a dial-up modem link, and your
+application process generates a 2 MB response. If the response is buffered
+then your application process will be blocked until the entire 2 MB has been
+sent out to the HTTP client. This disallows your application process to do any useful
+work in the mean time. By buffering responses, Phusion Passenger or Nginx will read
+the application response as quickly as possible and will take care of forwarding the data
+to slow clients.
+
+So keep in mind that enabling `passenger_buffering_response` will make streaming responses
 impossible. Consider for example this piece of Rails code:
 
 --------------------------------
@@ -810,11 +862,11 @@ app = lambda do |env|
 end
 --------------------------------
 
-When response buffering is turned on, Phusion Passenger will wait until
+When `passenger_buffer_response` is turned on, Nginx will wait until
 the application is done sending the entire response before forwarding it
 to the client. The client will not receive anything for 10 seconds,
 after which it receives the entire response at once.
-When response buffering is turned off, it works as expected: the client
+When `passenger_buffer_response` is turned off, it works as expected: the client
 receives an "entry X" message every second for 10 seconds.
 
 This option may occur in the following places:
@@ -824,7 +876,7 @@ This option may occur in the following places:
  * In a 'location' configuration block.
  * In an 'if' configuration scope.
 
-In each place, it may be specified at most once. The default value is 'on'.
+In each place, it may be specified at most once. The default value is 'off'.
 
 ==== passenger_buffer_size ====
 ==== passenger_buffers ====
@@ -840,6 +892,9 @@ Whether to enable <<user_switching,user switching support>>.
 This option may only occur once, in the 'http' configuration block.
 The default value is 'on'.
 
+NOTE: This option has no effect when you are using <<flying_passenger,Flying Passenger>>. You can disable user switching for Flying Passenger by starting the Flying Passenger daemon as a non-root user.
+
+[[PassengerUser]]
 ==== passenger_user <username> ====
 If <<user_switching,user switching support>> is enabled, then Phusion Passenger will
 by default run the web application as the owner of the file 'config/environment.rb'
@@ -856,7 +911,8 @@ This option may occur in the following places:
 
 In each place, it may be specified at most once.
 
-==== passenger_user <group name> ====
+[[PassengerGroup]]
+==== passenger_group <group name> ====
 If <<user_switching,user switching support>> is enabled, then Phusion Passenger will
 by default run the web application as the primary group of the owner of the file
 'config/environment.rb' (for Rails apps) or 'config.ru' (for Rack apps). This option
@@ -884,6 +940,8 @@ run as, if user switching fails or is disabled.
 This option may only occur once, in the 'http' configuration block.
 The default value is 'nobody'.
 
+NOTE: This option has no effect when you are using <<flying_passenger,Flying Passenger>>. There is currently no way to set this option when using Flying Passenger, but if you want to disable user switching for Flying Passenger then you can do so by starting the Flying Passenger daemon as a non-root user.
+
 [[PassengerDefaultGroup]]
 ==== Passenger_default_group <group name> ====
 Phusion Passenger enables <<user_switching,user switching support>> by default.
@@ -894,6 +952,33 @@ This option may only occur once, in the 'http' configuration block.
 The default value is the primary group of the user specifified by
 <<PassengerDefaultUser,passenger_default_user>>.
 
+NOTE: This option has no effect when you are using <<flying_passenger,Flying Passenger>>. There is currently no way to set this option when using Flying Passenger, but if you want to disable user switching for Flying Passenger then you can do so by starting the Flying Passenger daemon as a non-root user.
+
+==== passenger_show_version_in_header <on|off> ====
+When turned on, Phusion Passenger will output its version number in the `Server` and `X-Powered-By` header in all Phusion Passenger-served requests:
+
+----------------------------------------------------
+Server: nginx/1.3.11 + Phusion Passenger 4.0.0
+X-Powered-By: Phusion Passenger 4.0.0
+----------------------------------------------------
+
+When turned off, the version number will be hidden:
+
+----------------------------------------------------
+Server: nginx/1.3.11 + Phusion Passenger
+X-Powered-By: Phusion Passenger
+----------------------------------------------------
+
+This option may occur in the following places:
+
+ * In the 'http' configuration block.
+ * In a 'server' configuration block.
+ * In a 'location' configuration block.
+ * In an 'if' configuration scope.
+
+In each place, it may be specified at most once. The default value is 'on'.
+
+[[PassengerFriendlyErrorPages]]
 ==== passenger_friendly_error_pages <on|off> ====
 Phusion Passenger can display friendly error pages whenever an application fails
 to start. This friendly error page presents the startup error message, some
@@ -915,44 +1000,35 @@ In each place, it may be specified at most once. The default value is 'on'.
 === Resource control and optimization options ===
 [[PassengerMaxPoolSize]]
 ==== passenger_max_pool_size <integer> ====
-The maximum number of Ruby on Rails or Rack application instances that may
-be simultaneously active. A larger number results in higher memory usage,
-but improved ability to handle concurrent HTTP clients.
-
-The optimal value depends on your system's hardware and the server's average
-load. You should experiment with different values. But generally speaking,
-the value should be at least equal to the number of CPUs (or CPU cores) that
-you have. If your system has 2 GB of RAM, then we recommend a value of '30'.
-If your system is a Virtual Private Server (VPS) and has about 256 MB RAM, and
-is also running other services such as MySQL, then we recommend a value of '2'.
-
-If you find that your server is unable to handle the load on your Rails/Rack websites
-(i.e. running out of memory) then you should lower this value. (Though if your
-sites are really that popular, then you should strongly consider upgrading your
-hardware or getting more servers.)
-
-This option may only occur once, in the 'http' configuration bock.
+The maximum number of <<application_process,application processes>> that may
+simultanously exist. A larger number results in higher memory usage,
+but improves the ability to handle concurrent HTTP requests.
+
+The optimal value depends on your system's hardware and your workload. You can learn more at the Phusion article link:http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/[Tuning Phusion Passenger's concurrency settings].
+
+If you find that your server is running out of memory then you should lower this value.
+
+This option may only occur once, in the 'http' configuration block.
 The default value is '6'.
 
-TIP: We strongly recommend you to <<reducing_memory_usage,use Ruby Enterprise
-Edition>>. This allows you to reduce the memory usage of your Ruby on Rails applications
-by about 33%. And it's not hard to install.
+:option: `--max-pool-size`
+include::users_guide_snippets/alternative_for_flying_passenger.txt[]
 
 [[PassengerMinInstances]]
 ==== passenger_min_instances <integer> ====
-This specifies the minimum number of application instances that must be kept around
-whenever Phusion Passenger cleans up idle instances. You should set this option to a
+This specifies the minimum number of application processes that should exist for a
+given application. You should set this option to a
 non-zero value if you want to avoid potentially long startup times after a website
-has been idle for an extended period.
+has been <<idle_process,idle>> for an extended period.
 
-Please note that this option does *not* pre-start application instances during Nginx
+Please note that this option does *not* pre-start application processes during Nginx
 startup. It just makes sure that when the application is first accessed:
 
-1. at least the given number of instances will be spawned.
-2. the given number of processes will be kept around even when instances are being
+1. at least the given number of processes will be spawned.
+2. the given number of processes will be kept around even when processes are being
    idle cleaned (see <<PassengerPoolIdleTime,passenger_pool_idle_time>>).
 
-If you want to pre-start application instances during Nginx startup, then you should use the <<PassengerPreStart,passenger_pre_start>> directive, possibly in combination with
+If you want to pre-start application processes during Nginx startup, then you should use the <<PassengerPreStart,passenger_pre_start>> directive, possibly in combination with
 'passenger_min_instances'. This behavior might seem counter-intuitive at first sight,
 but <<PassengerPreStart,passenger_pre_start>> explains the rationale behind it.
 
@@ -963,7 +1039,7 @@ http {
     ...
     passenger_max_pool_size 15;
     passenger_pool_idle_time 10;
-    
+
     server {
         listen 80;
         server_name foobar.com;
@@ -973,16 +1049,16 @@ http {
 }
 ---------------------------------
 
-When you start Nginx, there are 0 application instances for 'foobar.com'. Things will
+When you start Nginx, there are 0 application processes for 'foobar.com'. Things will
 stay that way until someone visits 'foobar.com'. Suppose that there is only 1 visitor.
-1 application instance will be started immediately to serve the visitor, while 2 will
+1 application process will be started immediately to serve the visitor, while 2 will
 be spawned in the background. After 10 seconds, when the idle timeout has
-been reached, these 3 application instances will not be cleaned up.
+been reached, these 3 application processes will not be cleaned up.
 
 Now suppose that there's a sudden spike of traffic, and 100 users visit 'foobar.com'
-simultanously. Phusion Passenger will start 12 more application instances. After the idle
+simultanously. Phusion Passenger will start 12 more application processes. After the idle
 timeout of 10 seconds have passed, Phusion Passenger will clean up 12 application
-instances, keeping 3 instances around.
+processes, keeping 3 processes around.
 
 The passenger_min_instances option may occur in the following places:
 
@@ -993,13 +1069,46 @@ The passenger_min_instances option may occur in the following places:
 
 In each place, it may be specified at most once. The default value is '1'.
 
+==== passenger_max_instances <integer> ====
+:version: 3.0.0
+include::users_guide_snippets/enterprise_only.txt[]
+
+The maximum number of application processes that may simultaneously exist
+for an application. This helps to make sure that a single application
+will not occupy all available slots in the application pool.
+
+This value must be less than <<PassengerMaxPoolSize,passenger_max_pool_size>>. A value of 0
+means that there is no limit placed on the number of processes a single application
+may spawn, i.e. only the global limit of <<PassengerMaxPoolSize,passenger_max_pool_size>>
+will be enforced.
+
+This option may occur in the following places:
+
+ * In the 'http' configuration block.
+ * In a 'server' configuration block.
+ * In a 'location' configuration block.
+ * In an 'if' configuration scope.
+
+In each place, it may be specified at most once. The default value is '0'.
+
+.Practical usage example
+[TIP]
+===========================================================================
+Suppose that you're hosting two web applications on your server, a personal
+blog and an e-commerce website. You've set <<PassengerMaxPoolSize,passenger_max_pool_size>>
+to 10. The e-commerce website is more important to you. You can then set
+'passenger_max_instances' to 3 for your blog, so that it will never spawn more
+than 3 processes, even if it suddenly gets a lot of traffic. Your e-commerce website
+on the other hand will be free to spawn up to 10 processes if it gets a lot of traffic.
+===========================================================================
+
 ==== passenger_max_instances_per_app <integer> ====
-The maximum number of application instances that may be simultaneously active
+The maximum number of application processes that may simultaneously exist
 for a single application. This helps to make sure that a single application
 will not occupy all available slots in the application pool.
 
 This value must be less than <<PassengerMaxPoolSize,passenger_max_pool_size>>. A value of 0
-means that there is no limit placed on the number of instances a single application
+means that there is no limit placed on the number of processes a single application
 may use, i.e. only the global limit of <<PassengerMaxPoolSize,passenger_max_pool_size>>
 will be enforced.
 
@@ -1008,8 +1117,8 @@ The default value is '0'.
 
 [[PassengerPoolIdleTime]]
 ==== passenger_pool_idle_time <integer> ====
-The maximum number of seconds that an application instance may be idle. That is,
-if an application instance hasn't received any traffic after the given number of
+The maximum number of seconds that an application process may be idle. That is,
+if an application process hasn't received any traffic after the given number of
 seconds, then it will be shutdown in order to conserve memory.
 
 Decreasing this value means that applications will have to be spawned
@@ -1022,22 +1131,89 @@ Rails/Rack web page. We recommend a value of `2 * x`, where `x` is the average
 number of seconds that a visitor spends on a single Rails/Rack web page. But your
 mileage may vary.
 
-When this value is set to '0', application instances will not be shutdown unless 
+When this value is set to '0', application processes will not be shutdown unless 
 it's really necessary, i.e. when Phusion Passenger is out of worker processes
-for a given application and one of the inactive application instances needs to
-make place for another application instance. Setting the value to 0 is
+for a given application and one of the <<inactive_process,inactive application processes>> needs to
+make place for another application process. Setting the value to 0 is
 recommended if you're on a non-shared host that's only running a few
 applications, each which must be available at all times.
 
 This option may only occur once, in the 'http' configuration block.
 The default value is '300'.
 
+:option: `--pool-idle-time`
+include::users_guide_snippets/alternative_for_flying_passenger.txt[]
+
+==== passenger_max_preloader_idle_time <integer> ====
+The ApplicationSpawner server (explained in <<spawning_methods_explained,Spawning
+methods explained>>) has an idle timeout, just like the backend processes spawned by
+Phusion Passenger do. That is, it will automatically shutdown if it hasn't done
+anything for a given period.
+
+This option allows you to set the ApplicationSpawner server's idle timeout, in
+seconds. A value of '0' means that it should never idle timeout.
+
+Setting a higher value will mean that the ApplicationSpawner server is kept around
+longer, which may slightly increase memory usage. But as long as the
+ApplicationSpawner server is running, the time to spawn a Ruby on Rails backend
+process only takes about 10% of the time that is normally needed, assuming that
+you're using the 'smart' or 'smart-lv2' <<RailsSpawnMethod,spawning method>>. So if your
+system has enough memory, is it recommended that you set this option to a high
+value or to '0'.
+
+This option may occur in the following places:
+
+ * In the 'http' configuration block.
+ * In a 'server' configuration block.
+ * In a 'location' configuration block.
+ * In an 'if' configuration scope.
+
+In each place, it may be specified at most once. The default value is '300' (5 minutes).
+
+:option: `--max-preloader-idle-time`
+include::users_guide_snippets/alternative_for_flying_passenger.txt[]
+
+[[PassengerConcurrencyModel]]
+==== passenger_concurrency_model <process|thread> ====
+:version: 4.0.0
+include::users_guide_snippets/enterprise_only.txt[]
+
+Specifies the I/O concurrency model that should be used for application processes. Phusion Passenger supports two concurrency models:
+
+ * 'process' - single-threaded, multi-processed I/O concurrency. Each application process only has a single thread and can only handle 1 request at a time. This is the concurrency model that Ruby applications traditionally used. It has excellent compatiblity (can work with applications that are not designed to be thread-safe) but is unsuitable workloads in which the application has to wait for a lot of external I/O (e.g. HTTP API calls), and uses more memory because each process has a la [...]
+ * 'thread' - multi-threaded, multi-processed I/O concurrency. Each application process has multiple threads (customizable via <<PassengerThreadCount,passenger_thread_count>>). This model provides much better I/O concurrency and uses less memory because threads share memory with each other within the same process. However, using this model may cause compatibility problems if the application is not designed to be thread-safe.
+
+This option may occur in the following places:
+
+ * In the 'http' configuration block.
+ * In a 'server' configuration block.
+ * In a 'location' configuration block.
+ * In an 'if' configuration scope.
+
+In each place, it may be specified at most once. The default value is 'process'.
+
+[[PassengerThreadCount]]
+==== passenger_thread_count <number> ====
+:version: 4.0.0
+include::users_guide_snippets/enterprise_only.txt[]
+
+Specifies the number of threads that Phusion Passenger should spawn per application process. This option only has effect if <<PassengerConcurrencyModel,passenger_concurrency_model>> is 'thread'.
+
+This option may occur in the following places:
+
+ * In the 'http' configuration block.
+ * In a 'server' configuration block.
+ * In a 'location' configuration block.
+ * In an 'if' configuration scope.
+
+In each place, it may be specified at most once. The default value is '1'.
+
 [[PassengerMaxRequests]]
 ==== passenger_max_requests <integer> ====
-The maximum number of requests an application instance will process. After
-serving that many requests, the application instance will be shut down and
+The maximum number of requests an application process will process. After
+serving that many requests, the application process will be shut down and
 Phusion Passenger will restart it. A value of 0 means that there is no maximum:
-an application instance will thus be shut down when its idle timeout has been
+an application process will thus be shut down when its idle timeout has been
 reached.
 
 This option is useful if your application is leaking memory. By shutting
@@ -1061,13 +1237,115 @@ problem in your application rather than relying on these directives as a
 measure to avoid memory leaks.
 =====================================================
 
+[[PassengerMaxRequestTime]]
+==== passenger_max_request_time <seconds> ====
+:version: 3.0.0
+include::users_guide_snippets/enterprise_only.txt[]
+
+The maximum amount of time, in seconds, that an application process may take
+to process a request. If the request takes longer than this amount of time,
+then the application process will be forcefully shut down, and possibly
+restarted upon the next request. A value of 0 means that there is no time limit.
+
+This option is useful for preventing your application from freezing for an
+indefinite period of time.
+
+This option may occur in the following places:
+
+ * In the 'http' configuration block.
+ * In a 'server' configuration block.
+ * In a 'location' configuration block.
+ * In an 'if' configuration scope.
+
+In each place, it may be specified at most once. The default value is '0'.
+
+.Example
+Suppose that most of your requests are known to finish within 2 seconds.
+However, there is one URI, '/expensive_computation', which is known to take up
+to 10 seconds. You can then configure Phusion Passenger as follows:
+
+----------------------------------------------
+server {
+    listen 80;
+    server_name www.example.com;
+    root /webapps/my_app/public;
+    passenger_enabled on;
+    passenger_max_request_time 2;
+    location /expensive_compuation {
+        passenger_enabled on;
+        passenger_max_request_time 10;
+    }
+}
+----------------------------------------------
+
+If a request to '/expensive_computation' takes more than 10 seconds,
+or if a request to any other URI takes more than 2 seconds,
+then the corresponding application process will be forced to shutdown.
+
+[CAUTION]
+=====================================================
+The <<PassengerMaxRequestTime,passenger_max_request_time>> directive should be
+considered as a workaround for misbehaving applications. It is advised that you
+fix the problem in your application rather than relying on these directives as a
+measure to avoid freezing applications.
+=====================================================
+
+[NOTE]
+=====================================================
+This option is currently only available for Ruby apps. It is not yet available
+for Python and Node.js.
+=====================================================
+
+[[PassengerMemoryLimit]]
+==== passenger_memory_limit <integer> ====
+:version: 3.0.0
+include::users_guide_snippets/enterprise_only.txt[]
+
+The maximum amount of memory that an application process may use, in megabytes.
+Once an application process has surpassed its memory limit, it will process
+all the requests currently present in its queue and then shut down.
+A value of 0 means that there is no maximum: the application's memory usage
+will not be checked.
+
+This option is useful if your application is leaking memory. By shutting
+it down, all of its memory is guaranteed to be freed by the operating system.
+
+This option may occur in the following places:
+
+ * In the 'http' configuration block.
+ * In a 'server' configuration block.
+ * In a 'location' configuration block.
+ * In an 'if' configuration scope.
+
+In each place, it may be specified at most once. The default value is '0'.
+
+[NOTE]
+.A word about permissions
+=====================================================
+The <<PassengerMemoryLimit,passenger_memory_limit>> directive uses the
+`ps` command to query memory usage information. On Linux, it further
+queries `/proc` to obtain additional memory usage information that's
+not obtainable through `ps`. You should ensure that the `ps` works
+correctly and that the `/proc` filesystem is accessible by the
+`PassengerHelperAgent` process.
+=====================================================
+
+[CAUTION]
+=====================================================
+The <<PassengerMaxRequests,passenger_max_requests>> and
+<<PassengerMemoryLimit,passenger_memory_limit>> directives should be considered
+as workarounds for misbehaving applications. It is advised that you fix the
+problem in your application rather than relying on these directives as a
+measure to avoid memory leaks.
+=====================================================
+
 [[PassengerPreStart]]
 ==== passenger_pre_start <url> ====
-By default, Phusion Passenger does not start any application instances until said
+By default, Phusion Passenger does not start any application processes until said
 web application is first accessed. The result is that the first visitor of said
 web application might experience a small delay as Phusion Passenger is starting
 the web application on demand. If that is undesirable, then this directive can be
-used to pre-started application instances during Nginx startup.
+used to pre-started application processes during Nginx startup.
 
 A few things to be careful of:
 
@@ -1081,13 +1359,15 @@ A few things to be careful of:
   * The path part of the URL must point to some URI that the web application
     handles.
 - You will probably want to combine this option with
-  <<PassengerMinInstances,passenger_min_instances>> because application instances
+  <<PassengerMinInstances,passenger_min_instances>> because application processes
   started with 'passenger_pre_start' are subject to the usual idle timeout rules.
   See the example below for an explanation.
 
 This option may only occur in the 'http' configuration block. It may be specified
 any number of times.
 
+NOTE: This option is currently not available when using <<flying_passenger,Flying Passenger>>.
+
 ===== Example 1: basic usage =====
 
 Suppose that you have the following web applications.
@@ -1141,7 +1421,7 @@ server {
     listen 80;
     server_name myblog.com;
     root /webapps/wordpress;
-    rails_base_uri /store;
+    passenger_base_uri /store;
 }
 ---------------------------
 
@@ -1152,7 +1432,7 @@ server {
     listen 80;
     server_name myblog.com;
     root /webapps/wordpress;
-    rails_base_uri /store;
+    passenger_base_uri /store;
 }
 
 passenger_pre_start http://myblog.com/store;    # <----- added
@@ -1167,10 +1447,10 @@ passenger_pre_start http://myblog.com/;    # <----- WRONG! Missing "/store" part
 
 ===== Example 3: combining with passenger_min_instances =====
 
-Application instances started with passenger_pre_start are
+Application processes started with passenger_pre_start are
 also subject to the idle timeout rules as specified by
 <<PassengerPoolIdleTime,passenger_pool_idle_time>>! That means that by default,
-the pre-started application instances for foo.com are bar.com are shut down
+the pre-started application processes for foo.com are bar.com are shut down
 after a few minutes of inactivity. If you don't want that to happen, then
 you should combine passenger_pre_start with
 <<PassengerMinInstances,passenger_min_instances>>, like this:
@@ -1254,6 +1534,7 @@ Yes. And it does not perform any certificate validation.
 
 === Logging and debugging options ===
 
+[[PassengerLogLevel]]
 ==== passenger_log_level <integer> ====
 This option allows one to specify how much information Phusion Passenger should
 write to the Nginx error log file. A higher log level value means that more
@@ -1278,37 +1559,24 @@ error messages should be written to instead.
 
 This option may only occur once, in the 'http' configuration block.
 
+:option: `--log-file`
+include::users_guide_snippets/alternative_for_flying_passenger.txt[]
 
-=== Ruby on Rails-specific options ===
-[[RailsEnv]]
-==== rails_env <string> ====
-This option allows one to specify the default `RAILS_ENV` value.
-
-This option may occur in the following places:
-
- * In the 'http' configuration block.
- * In a 'server' configuration block.
- * In a 'location' configuration block.
- * In an 'if' configuration scope.
+==== passenger_debugger <on|off> ====
+:version: 3.0.0
+include::users_guide_snippets/enterprise_only.txt[]
 
-In each place, it may be specified at most once. The default value is 'production'.
-
-==== rails_framework_spawner_idle_time <integer> ====
-The FrameworkSpawner server (explained in <<spawning_methods_explained,Spawning
-methods explained>>) has an idle timeout, just like the backend processes spawned by
-Phusion Passenger do. That is, it will automatically shutdown if it hasn't done
-anything for a given period.
+Turns support for application debugging on or off. In case of Ruby applications,
+turning this option on will cause them to load the `ruby-debug` gem (when on Ruby 1.8)
+or the `debugger` gem (when on Ruby 1.9). If you're using Bundler, you should add
+this to your Gemfile:
 
-This option allows you to set the FrameworkSpawner server's idle timeout, in
-seconds. A value of '0' means that it should never idle timeout.
+-------------------------------------------
+gem 'ruby-debug', :platforms => :ruby_18
+gem 'debugger', :platforms => :ruby_19
+-------------------------------------------
 
-Setting a higher value will mean that the FrameworkSpawner server is kept around
-longer, which may slightly increase memory usage. But as long as the
-FrameworkSpawner server is running, the time to spawn a Ruby on Rails backend
-process only takes about 40% of the time that is normally needed, assuming that
-you're using the 'smart' <<RailsSpawnMethod,spawning method>>. So if your
-system has enough memory, is it recommended that you set this option to a high
-value or to '0'.
+Once debugging is turned on, you can use the command `passenger-irb --debug <PID>` to attach an rdebug console to the application process with the given PID. Attaching will succeed once the application process executes a `debugger` command.
 
 This option may occur in the following places:
 
@@ -1317,24 +1585,13 @@ This option may occur in the following places:
  * In a 'location' configuration block.
  * In an 'if' configuration scope.
 
-In each place, it may be specified at most once. The default value is '1800' (30 minutes).
+In each place, it may be specified at most once. The default value is 'off'.
 
-==== rails_app_spawner_idle_time <integer> ====
-The ApplicationSpawner server (explained in <<spawning_methods_explained,Spawning
-methods explained>>) has an idle timeout, just like the backend processes spawned by
-Phusion Passenger do. That is, it will automatically shutdown if it hasn't done
-anything for a given period.
 
-This option allows you to set the ApplicationSpawner server's idle timeout, in
-seconds. A value of '0' means that it should never idle timeout.
-
-Setting a higher value will mean that the ApplicationSpawner server is kept around
-longer, which may slightly increase memory usage. But as long as the
-ApplicationSpawner server is running, the time to spawn a Ruby on Rails backend
-process only takes about 10% of the time that is normally needed, assuming that
-you're using the 'smart' or 'smart-lv2' <<RailsSpawnMethod,spawning method>>. So if your
-system has enough memory, is it recommended that you set this option to a high
-value or to '0'.
+=== Ruby on Rails-specific options ===
+[[RailsEnv]]
+==== rails_env <string> ====
+This option allows one to specify the default `RAILS_ENV` value.
 
 This option may occur in the following places:
 
@@ -1343,9 +1600,9 @@ This option may occur in the following places:
  * In a 'location' configuration block.
  * In an 'if' configuration scope.
 
-In each place, it may be specified at most once. The default value is '600' (10 minutes).
+In each place, it may be specified at most once. The default value is 'production'.
 
-=== Rack-specific options ===
+=== Rack and Rails >= 3 specific options ===
 [[RackEnv]]
 ==== rack_env <string> ====
 This option allows one to specify the default `RACK_ENV` value.
@@ -1427,3 +1684,5 @@ include::users_guide_snippets/appendix_a_about.txt[]
 include::users_guide_snippets/appendix_b_terminology.txt[]
 
 include::users_guide_snippets/appendix_c_spawning_methods.txt[]
+
+include::users_guide_snippets/environment_variables.txt[]
diff --git a/doc/Users guide Standalone.html b/doc/Users guide Standalone.html
index 2b7f007..f3ea140 100644
--- a/doc/Users guide Standalone.html	
+++ b/doc/Users guide Standalone.html	
@@ -1,9 +1,9 @@
 <!DOCTYPE html>
-<html lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta name="generator" content="AsciiDoc 8.6.7">
-<title>Phusion Passenger Standalone users guide</title>
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta name="generator" content="AsciiDoc 8.6.7">
+<title>Phusion Passenger Standalone users guide</title>
 <style type="text/css">
 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
 
@@ -603,7 +603,7 @@ div.exampleblock > div.content, div.sidebarblock > div.content, div.listingblock
 div.verseblock { border-left-width: 0; margin-left: 3em; }
 div.quoteblock { border-left-width: 3px; margin-left: 0; margin-right: 0;}
 div.admonitionblock td.content { border-left: 3px solid #E8E8E8; }
-</style>
+</style>
 <script type="text/javascript">
 /*<![CDATA[*/
 var asciidoc = {  // Namespace.
@@ -795,11 +795,14 @@ install: function(toclevels) {
 }
 
 }
-asciidoc.install(3);
+asciidoc.install();
 /*]]>*/
-</script><style type="text/css">
+</script>
+<style type="text/css">
 body {
-	margin: 1em 10% 1em 10%;
+	margin: 1em auto 1em auto;
+	padding: 0 1em 0 1em;
+	max-width: 800px;
 }
 
 a.image {
@@ -878,6 +881,10 @@ a.image {
 	margin: 2em;
 }
 
+pre {
+	overflow: auto;
+}
+
 @media print {
 	body {
 		font-size: 18pt;
@@ -1038,26 +1045,37 @@ a.image {
 	border-bottom-right-radius: 0;
 }
 
+/* http://nicolasgallagher.com/jump-links-and-viewport-positioning/ */
+.anchor_helper {
+	position: relative;
+	display: block;
+	top: -50px;
+	width: 1px;
+	height: 1px;
+}
+
 </style>
-</head>
+</head>
 <body class="article">
 <div id="topbar" style="display: none">
 	<div class="title">
+		<!-- Don't put a space between the img and a. That will break the hover layout. -->
 		<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAAEV95QVAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sGCRMSACDxkZwAAAAidEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVAgb24gYSBNYWOHqHdDAAAAZUlEQVQY032PSxbAIAjEIlfygL6ePF3UUvpzNjgSYWwqAMEhUQnANnsC7TQPeJpsVWzMuh2sog4vDTUbqP081zECrW4dtdaQGSIKlWluPyjK+VXxAz5XfcKufCzA130AfQHWB30HZxlPaP080xsAAAAASUVORK5CYII=" width="11" height="10" alt=""><a href="javascript:void(Mizuho.smoothlyScrollToToc())">Ph [...]
 	</div>
 	<a href="javascript:void(0)" id="current_section"></a>
 </div>
 <div id="header">
-<h1>Phusion Passenger Standalone users guide</h1>
+<h1>Phusion Passenger Standalone users guide</h1>
 <div id="preamble">
 <div class="sectionbody">
 <div class="paragraph"><p><span class="image">
 <a class="image" href="http://www.phusion.nl/">
-<img src="images/phusion_banner.png" alt="images/phusion_banner.png"></a>
+<img src="images/phusion_banner.png" alt="images/phusion_banner.png">
+</a>
 </span></p></div>
 <div class="paragraph"><p>Phusion Passenger Standalone is a web server that allows one to run Ruby web applications.
 Here are some of the highlights:</p></div>
-<div class="ulist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 Unlike Phusion Passenger for Apache and Phusion Passenger for Nginx, Phusion Passenger
@@ -1086,16 +1104,72 @@ Can listen on a Unix socket, for use in reverse proxy setups.
 </li>
 </ul></div>
 </div>
-</div>
+</div>
 <div id="toc">
-  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><div id="toctitle">Table of Contents</div>
-  <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
-</div>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><div id="toctitle">Table of Contents</div>
+<div class="foo toclevel2"><a href="#_support_information">1. Support information</a></div>
+<div class="foo toclevel3"><a href="#_supported_operating_systems">1.1. Supported operating systems</a></div>
+<div class="foo toclevel3"><a href="#_where_to_get_support">1.2. Where to get support</a></div>
+<div class="foo toclevel2"><a href="#_installation">2. Installation</a></div>
+<div class="foo toclevel2"><a href="#_usage">3. Usage</a></div>
+</div>
 </div>
 <div id="content">
 
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_installation" data-comment-topic="installation-2vrmef">1. Installation</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_support_information"></span><h2 data-comment-topic="support-information-1x8e9ee" data-anchor="_support_information">1. Support information</h2>
+<div class="sectionbody">
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_supported_operating_systems"></span><h3 data-comment-topic="supported-operating-systems-1387080" data-anchor="_supported_operating_systems">1.1. Supported operating systems</h3>
+<div class="paragraph"><p>Phusion Passenger works on any POSIX-compliant operating system. In other
+words: practically any operating system on earth, except Microsoft Windows.</p></div>
+<div class="paragraph"><p>Phusion Passenger is confirmed on a large number of operating systems and Linux
+distributions, including, but not limited to, Ubuntu, Debian, CentOS/Fedora/RHEL,
+Gentoo, Mac OS X, FreeBSD and Solaris. OpenBSD is supported since version 5.2.
+Both 32-bit and 64-bit platforms are supported.</p></div>
+<div class="paragraph"><p>Please
+<a href="http://code.google.com/p/phusion-passenger/issues/list">report a bug</a>
+or
+<a href="http://groups.google.com/group/phusion-passenger">join our discussion forum</a>
+if it doesn’t work on your POSIX-compliant operating system.</p></div>
+</div>
+<div class="sect2">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_where_to_get_support"></span><h3 data-comment-topic="where-to-get-support-xkx7rx" data-anchor="_where_to_get_support">1.2. Where to get support</h3>
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="http://groups.google.com/group/phusion-passenger">Discussion forum</a> - post a
+  message here if you’re experiencing problems. Support on this forum is provided by the community on a best-effort basis, so a (timely) response is not guaranteed.
+</p>
+</li>
+<li>
+<p>
+<a href="http://code.google.com/p/phusion-passenger/issues/list">Issue tracker</a> - report
+  bugs here.
+</p>
+</li>
+<li>
+<p>
+Email <a href="mailto:support at phusion.nl">support at phusion.nl</a> if you are a <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> customer. Please mention your order reference. If you are not an Enterprise customer, we kindly redirect you to the community discussion forum instead.
+</p>
+</li>
+<li>
+<p>
+<a href="https://www.phusionpassenger.com/commercial_support">Commercial support contracts</a> are also available.
+</p>
+</li>
+<li>
+<p>
+Report security vulnerabilities to <a href="mailto:security at phusion.nl">security at phusion.nl</a>. We will do our best to respond to you as quickly as we can, so please do not disclose the vulnerability until then.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Please consult <a href="https://www.phusionpassenger.com/support">the Phusion Passenger website</a> for a full list of support resources.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installation"></span><h2 data-comment-topic="installation-2vrmef" data-anchor="_installation">2. Installation</h2>
 <div class="sectionbody">
 <div class="listingblock">
 <div class="content monospaced">
@@ -1105,7 +1179,7 @@ Can listen on a Unix socket, for use in reverse proxy setups.
 </div>
 </div>
 <div class="sect1">
-<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_usage" data-comment-topic="usage-1eyt33o">2. Usage</h2>
+<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_usage"></span><h2 data-comment-topic="usage-1eyt33o" data-anchor="_usage">3. Usage</h2>
 <div class="sectionbody">
 <div class="paragraph"><p>Go to your application’s root directory, and run:</p></div>
 <div class="listingblock">
@@ -1126,9 +1200,7 @@ use the <span class="monospaced">-p</span> option, e.g.:</p></div>
 </div>
 <div id="footnotes"><hr></div>
 <div id="footer">
-<div id="footer-text">
-Last updated 2012-04-16 09:27:43 CEST
-</div>
+
 </div>
 <script>/*! jQuery v1.7.1 jquery.com | jquery.org/license */
 (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement( [...]
@@ -1465,6 +1537,7 @@ Mizuho.initializeTopBar = $.proxy(function() {
 	var isMobileDevice = this.isMobileDevice();
 	var timerId;
 	
+	// Create the floating table of contents used in the top bar.
 	var $floattoc = $('<div id="floattoc"></div>').html($('#toc').html());
 	$floattoc.find('#toctitle').remove();
 	$floattoc.find('.comments').remove();
@@ -1483,6 +1556,8 @@ Mizuho.initializeTopBar = $.proxy(function() {
 		self.internalLinkClicked(this, event);
 	});
 	
+	// Callback for when the user clicks on the Table of Contents
+	// button on the top bar.
 	function showFloatingToc() {
 		var scrollUpdateTimerId;
 		
@@ -1575,6 +1650,9 @@ Mizuho.initializeTopBar = $.proxy(function() {
 		$window.bind('scroll', onScroll);
 	}
 	
+	// Called whenever the user scrolls. Updates the title of the
+	// Table of Contents button in the top bar to the section that
+	// the user is currently reading.
 	function update() {
 		if ($title.offset().top + $title.height() < $document.scrollTop()) {
 			if (!$topbar.is(':visible')) {
@@ -1618,6 +1696,7 @@ Mizuho.initializeTopBar = $.proxy(function() {
 		}, 100);
 	}
 	
+	
 	if (isMobileDevice) {
 		// Mobile devices don't support position fixed.
 		$topbar.css('position', 'absolute');
@@ -1801,5 +1880,5 @@ Mizuho.topicListReceived = $.proxy(function(result) {
 $(document).ready(Mizuho.initializeCommenting);
 
 </script>
-</body>
+</body>
 </html>
diff --git a/doc/Users guide Standalone.idmap.txt b/doc/Users guide Standalone.idmap.txt
index 652ad1c..df11259 100644
--- a/doc/Users guide Standalone.idmap.txt	
+++ b/doc/Users guide Standalone.idmap.txt	
@@ -12,7 +12,13 @@
 # and that Mizuho has found an ID which appears to be associated with that
 # section. You should check whether it is correct, and if not, fix it.
 
-1. Installation	=>	installation-2vrmef
+1. Support information	=>	support-information-1x8e9ee
 
-2. Usage	=>	usage-1eyt33o
+1.1. Supported operating systems	=>	supported-operating-systems-1387080
+
+1.2. Where to get support	=>	where-to-get-support-xkx7rx
+
+2. Installation	=>	installation-2vrmef
+
+3. Usage	=>	usage-1eyt33o
 
diff --git a/doc/Users guide Standalone.txt b/doc/Users guide Standalone.txt
index a89f2c4..76a98fc 100644
--- a/doc/Users guide Standalone.txt	
+++ b/doc/Users guide Standalone.txt	
@@ -16,6 +16,10 @@ Here are some of the highlights:
   resource management for you. Crashing application processes are automatically restarted.
 - Can listen on a Unix socket, for use in reverse proxy setups.
 
+== Support information ==
+
+include::users_guide_snippets/support_information.txt[]
+
 == Installation ==
 
 ------------------------------
diff --git a/doc/images/._phusion_banner.png b/doc/images/._phusion_banner.png
deleted file mode 100644
index f6f3cfd..0000000
Binary files a/doc/images/._phusion_banner.png and /dev/null differ
diff --git a/doc/images/glyphicons-halflings-white.png b/doc/images/glyphicons-halflings-white.png
new file mode 100644
index 0000000..3bf6484
Binary files /dev/null and b/doc/images/glyphicons-halflings-white.png differ
diff --git a/doc/images/glyphicons-halflings.png b/doc/images/glyphicons-halflings.png
new file mode 100644
index 0000000..79bc568
Binary files /dev/null and b/doc/images/glyphicons-halflings.png differ
diff --git a/doc/images/phusion_banner_small.png b/doc/images/phusion_banner_small.png
new file mode 100644
index 0000000..d0e8443
Binary files /dev/null and b/doc/images/phusion_banner_small.png differ
diff --git a/doc/images/smart-lv2.png b/doc/images/smart.png
similarity index 100%
rename from doc/images/smart-lv2.png
rename to doc/images/smart.png
diff --git a/doc/images/smart-lv2.svg b/doc/images/smart.svg
similarity index 100%
rename from doc/images/smart-lv2.svg
rename to doc/images/smart.svg
diff --git a/doc/templates/bootstrap.min.css b/doc/templates/bootstrap.min.css
new file mode 100644
index 0000000..317a1f1
--- /dev/null
+++ b/doc/templates/bootstrap.min.css
@@ -0,0 +1,397 @@
+/*!
+ * Bootstrap v2.0.3
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";}
+.clearfix:after{clear:both;}
+.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;}
+.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}
+article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
+audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
+audio:not([controls]){display:none;}
+html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
+a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+a:hover,a:active{outline:0;}
+sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
+sup{top:-0.5em;}
+sub{bottom:-0.25em;}
+img{max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;}
+button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
+button,input{*overflow:visible;line-height:normal;}
+button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
+button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
+input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;}
+input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
+textarea{overflow:auto;vertical-align:top;}
+body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;}
+a{color:#0088cc;text-decoration:none;}
+a:hover{color:#005580;text-decoration:underline;}
+p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;}
+.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;}
+h1,h2,h3,h4,h5,h6{margin:0;font-family:inherit;font-weight:bold;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;}
+h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;}
+h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;}
+h3{font-size:18px;line-height:27px;}h3 small{font-size:14px;}
+h4,h5,h6{line-height:18px;}
+h4{font-size:14px;}h4 small{font-size:12px;}
+h5{font-size:12px;}
+h6{font-size:11px;color:#999999;text-transform:uppercase;}
+.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;}
+.page-header h1{line-height:1;}
+ul,ol{padding:0;margin:0 0 9px 25px;}
+ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
+ul{list-style:disc;}
+ol{list-style:decimal;}
+li{line-height:18px;}
+ul.unstyled,ol.unstyled{margin-left:0;list-style:none;}
+dl{margin-bottom:18px;}
+dt,dd{line-height:18px;}
+dt{font-weight:bold;line-height:17px;}
+dd{margin-left:9px;}
+.dl-horizontal dt{float:left;width:120px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
+.dl-horizontal dd{margin-left:130px;}
+hr{margin:18px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;}
+strong{font-weight:bold;}
+em{font-style:italic;}
+.muted{color:#999999;}
+abbr[title]{cursor:help;border-bottom:1px dotted #ddd;}
+abbr.initialism{font-size:90%;text-transform:uppercase;}
+blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;}
+blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
+blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
+q:before,q:after,blockquote:before,blockquote:after{content:"";}
+address{display:block;margin-bottom:18px;font-style:normal;line-height:18px;}
+small{font-size:100%;}
+cite{font-style:normal;}
+code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;}
+pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12.025px;line-height:18px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}pre.prettyprint{margin-bottom:18px;}
+pre code{padding:0;color:inherit;background-color:transparent;border:0;}
+.pre-scrollable{max-height:340px;overflow-y:scroll;}
+.label,.badge{font-size:10.998px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;}
+.label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}
+a.label:hover,a.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;}
+.label-important,.badge-important{background-color:#b94a48;}
+.label-important[href],.badge-important[href]{background-color:#953b39;}
+.label-warning,.badge-warning{background-color:#f89406;}
+.label-warning[href],.badge-warning[href]{background-color:#c67605;}
+.label-success,.badge-success{background-color:#468847;}
+.label-success[href],.badge-success[href]{background-color:#356635;}
+.label-info,.badge-info{background-color:#3a87ad;}
+.label-info[href],.badge-info[href]{background-color:#2d6987;}
+.label-inverse,.badge-inverse{background-color:#333333;}
+.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;}
+table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;}
+.table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
+.table th{font-weight:bold;}
+.table thead th{vertical-align:bottom;}
+.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;}
+.table tbody+tbody{border-top:2px solid #dddddd;}
+.table-condensed th,.table-condensed td{padding:4px 5px;}
+.table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapsed;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;}
+.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
+.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px;}
+.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px;}
+.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;}
+.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;}
+.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
+.table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5;}
+table .span1{float:none;width:44px;margin-left:0;}
+table .span2{float:none;width:124px;margin-left:0;}
+table .span3{float:none;width:204px;margin-left:0;}
+table .span4{float:none;width:284px;margin-left:0;}
+table .span5{float:none;width:364px;margin-left:0;}
+table .span6{float:none;width:444px;margin-left:0;}
+table .span7{float:none;width:524px;margin-left:0;}
+table .span8{float:none;width:604px;margin-left:0;}
+table .span9{float:none;width:684px;margin-left:0;}
+table .span10{float:none;width:764px;margin-left:0;}
+table .span11{float:none;width:844px;margin-left:0;}
+table .span12{float:none;width:924px;margin-left:0;}
+table .span13{float:none;width:1004px;margin-left:0;}
+table .span14{float:none;width:1084px;margin-left:0;}
+table .span15{float:none;width:1164px;margin-left:0;}
+table .span16{float:none;width:1244px;margin-left:0;}
+table .span17{float:none;width:1324px;margin-left:0;}
+table .span18{float:none;width:1404px;margin-left:0;}
+table .span19{float:none;width:1484px;margin-left:0;}
+table .span20{float:none;width:1564px;margin-left:0;}
+table .span21{float:none;width:1644px;margin-left:0;}
+table .span22{float:none;width:1724px;margin-left:0;}
+table .span23{float:none;width:1804px;margin-left:0;}
+table .span24{float:none;width:1884px;margin-left:0;}
+form{margin:0 0 18px;}
+fieldset{padding:0;margin:0;border:0;}
+legend{display:block;width:100%;padding:0;margin-bottom:27px;font-size:19.5px;line-height:36px;color:#333333;border:0;border-bottom:1px solid #eee;}legend small{font-size:13.5px;color:#999999;}
+label,input,button,select,textarea{font-size:13px;font-weight:normal;line-height:18px;}
+input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;}
+label{display:block;margin-bottom:5px;color:#333333;}
+input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;margin-bottom:9px;font-size:13px;line-height:18px;color:#555555;background-color:#ffffff;border:1px solid #cccccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.uneditable-textarea{width:auto;height:auto;}
+label input,label textarea,label select{display:block;}
+input[type="image"],input[type="checkbox"],input[type="radio"]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;cursor:pointer;background-color:transparent;border:0 \9;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+input[type="image"]{border:0;}
+input[type="file"]{width:auto;padding:initial;line-height:initial;background-color:#ffffff;background-color:initial;border:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+input[type="button"],input[type="reset"],input[type="submit"]{width:auto;height:auto;}
+select,input[type="file"]{height:28px;*margin-top:4px;line-height:28px;}
+input[type="file"]{line-height:18px \9;}
+select{width:220px;background-color:#ffffff;}
+select[multiple],select[size]{height:auto;}
+input[type="image"]{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+textarea{height:auto;}
+input[type="hidden"]{display:none;}
+.radio,.checkbox{min-height:18px;padding-left:18px;}
+.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px;}
+.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;}
+.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;}
+.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;}
+input,textarea{-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;}
+input:focus,textarea:focus{border-color:rgba(82, 168, 236, 0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);}
+input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus,select:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+.input-mini{width:60px;}
+.input-small{width:90px;}
+.input-medium{width:150px;}
+.input-large{width:210px;}
+.input-xlarge{width:270px;}
+.input-xxlarge{width:530px;}
+input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0;}
+input,textarea,.uneditable-input{margin-left:0;}
+input.span12, textarea.span12, .uneditable-input.span12{width:930px;}
+input.span11, textarea.span11, .uneditable-input.span11{width:850px;}
+input.span10, textarea.span10, .uneditable-input.span10{width:770px;}
+input.span9, textarea.span9, .uneditable-input.span9{width:690px;}
+input.span8, textarea.span8, .uneditable-input.span8{width:610px;}
+input.span7, textarea.span7, .uneditable-input.span7{width:530px;}
+input.span6, textarea.span6, .uneditable-input.span6{width:450px;}
+input.span5, textarea.span5, .uneditable-input.span5{width:370px;}
+input.span4, textarea.span4, .uneditable-input.span4{width:290px;}
+input.span3, textarea.span3, .uneditable-input.span3{width:210px;}
+input.span2, textarea.span2, .uneditable-input.span2{width:130px;}
+input.span1, textarea.span1, .uneditable-input.span1{width:50px;}
+input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eeeeee;border-color:#ddd;}
+input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent;}
+.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;}
+.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853;}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:0 0 6px #dbc59e;-moz-box-shadow:0 0 6px #dbc59e;box-shadow:0 0 6px #dbc59e;}
+.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;}
+.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;}
+.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48;}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:0 0 6px #d59392;-moz-box-shadow:0 0 6px #d59392;box-shadow:0 0 6px #d59392;}
+.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;}
+.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;}
+.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847;}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:0 0 6px #7aba7b;-moz-box-shadow:0 0 6px #7aba7b;box-shadow:0 0 6px #7aba7b;}
+.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;}
+input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
+.form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#f5f5f5;border-top:1px solid #ddd;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";}
+.form-actions:after{clear:both;}
+.uneditable-input{overflow:hidden;white-space:nowrap;cursor:not-allowed;background-color:#ffffff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);}
+:-moz-placeholder{color:#999999;}
+::-webkit-input-placeholder{color:#999999;}
+.help-block,.help-inline{color:#555555;}
+.help-block{display:block;margin-bottom:9px;}
+.help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px;}
+.input-prepend,.input-append{margin-bottom:5px;}.input-prepend input,.input-append input,.input-prepend select,.input-append select,.input-prepend .uneditable-input,.input-append .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:middle;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}.input-prepend input:focus,.input-append input:focus,.input-prepend select:focus,.input-append select:focus,.input-prepend .uneditab [...]
+.input-prepend .uneditable-input,.input-append .uneditable-input{border-left-color:#ccc;}
+.input-prepend .add-on,.input-append .add-on{display:inline-block;width:auto;height:18px;min-width:16px;padding:4px 5px;font-weight:normal;line-height:18px;text-align:center;text-shadow:0 1px 0 #ffffff;vertical-align:middle;background-color:#eeeeee;border:1px solid #ccc;}
+.input-prepend .add-on,.input-append .add-on,.input-prepend .btn,.input-append .btn{margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546;}
+.input-prepend .add-on,.input-prepend .btn{margin-right:-1px;}
+.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
+.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
+.input-append .uneditable-input{border-right-color:#ccc;border-left-color:#eee;}
+.input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
+.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
+.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
+.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;}
+.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.fo [...]
+.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none;}
+.form-search label,.form-inline label{display:inline-block;}
+.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0;}
+.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle;}
+.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0;}
+.control-group{margin-bottom:9px;}
+legend+.control-group{margin-top:18px;-webkit-margin-top-collapse:separate;}
+.form-horizontal .control-group{margin-bottom:18px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";}
+.form-horizontal .control-group:after{clear:both;}
+.form-horizontal .control-label{float:left;width:140px;padding-top:5px;text-align:right;}
+.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:160px;*margin-left:0;}.form-horizontal .controls:first-child{*padding-left:160px;}
+.form-horizontal .help-block{margin-top:9px;margin-bottom:0;}
+.form-horizontal .form-actions{padding-left:160px;}
+.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 10px 4px;margin-bottom:0;font-size:13px;line-height:18px;*line-height:20px;color:#333333;text-align:center;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);background-image:-ms-linear-gradient(top, #ffffff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));backgroun [...]
+.btn:active,.btn.active{background-color:#cccccc \9;}
+.btn:first-child{*margin-left:0;}
+.btn:hover{color:#333333;text-decoration:none;background-color:#e6e6e6;*background-color:#d9d9d9;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-ms-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;}
+.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+.btn.active,.btn:active{background-color:#e6e6e6;background-color:#d9d9d9 \9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);}
+.btn.disabled,.btn[disabled]{cursor:default;background-color:#e6e6e6;background-image:none;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+.btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
+.btn-large [class^="icon-"]{margin-top:1px;}
+.btn-small{padding:5px 9px;font-size:11px;line-height:16px;}
+.btn-small [class^="icon-"]{margin-top:-1px;}
+.btn-mini{padding:2px 6px;font-size:11px;line-height:14px;}
+.btn-primary,.btn-primary:hover,.btn-warning,.btn-warning:hover,.btn-danger,.btn-danger:hover,.btn-success,.btn-success:hover,.btn-info,.btn-info:hover,.btn-inverse,.btn-inverse:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}
+.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255, 255, 255, 0.75);}
+.btn{border-color:#ccc;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
+.btn-primary{background-color:#0074cc;background-image:-moz-linear-gradient(top, #0088cc, #0055cc);background-image:-ms-linear-gradient(top, #0088cc, #0055cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0055cc));background-image:-webkit-linear-gradient(top, #0088cc, #0055cc);background-image:-o-linear-gradient(top, #0088cc, #0055cc);background-image:linear-gradient(top, #0088cc, #0055cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gra [...]
+.btn-primary:active,.btn-primary.active{background-color:#004099 \9;}
+.btn-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gra [...]
+.btn-warning:active,.btn-warning.active{background-color:#c67605 \9;}
+.btn-danger{background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-ms-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(top, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.grad [...]
+.btn-danger:active,.btn-danger.active{background-color:#942a25 \9;}
+.btn-success{background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-ms-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(top, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gra [...]
+.btn-success:active,.btn-success.active{background-color:#408140 \9;}
+.btn-info{background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-ms-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(top, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradie [...]
+.btn-info:active,.btn-info.active{background-color:#24748c \9;}
+.btn-inverse{background-color:#414141;background-image:-moz-linear-gradient(top, #555555, #222222);background-image:-ms-linear-gradient(top, #555555, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#555555), to(#222222));background-image:-webkit-linear-gradient(top, #555555, #222222);background-image:-o-linear-gradient(top, #555555, #222222);background-image:linear-gradient(top, #555555, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gra [...]
+.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9;}
+button.btn,input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;}
+button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px;}
+button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px;}
+button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px;}
+[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("images/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;}[class^="icon-"]:last-child,[class*=" icon-"]:last-child{*margin-left:0;}
+.icon-white{background-image:url("images/glyphicons-halflings-white.png");}
+.icon-glass{background-position:0 0;}
+.icon-music{background-position:-24px 0;}
+.icon-search{background-position:-48px 0;}
+.icon-envelope{background-position:-72px 0;}
+.icon-heart{background-position:-96px 0;}
+.icon-star{background-position:-120px 0;}
+.icon-star-empty{background-position:-144px 0;}
+.icon-user{background-position:-168px 0;}
+.icon-film{background-position:-192px 0;}
+.icon-th-large{background-position:-216px 0;}
+.icon-th{background-position:-240px 0;}
+.icon-th-list{background-position:-264px 0;}
+.icon-ok{background-position:-288px 0;}
+.icon-remove{background-position:-312px 0;}
+.icon-zoom-in{background-position:-336px 0;}
+.icon-zoom-out{background-position:-360px 0;}
+.icon-off{background-position:-384px 0;}
+.icon-signal{background-position:-408px 0;}
+.icon-cog{background-position:-432px 0;}
+.icon-trash{background-position:-456px 0;}
+.icon-home{background-position:0 -24px;}
+.icon-file{background-position:-24px -24px;}
+.icon-time{background-position:-48px -24px;}
+.icon-road{background-position:-72px -24px;}
+.icon-download-alt{background-position:-96px -24px;}
+.icon-download{background-position:-120px -24px;}
+.icon-upload{background-position:-144px -24px;}
+.icon-inbox{background-position:-168px -24px;}
+.icon-play-circle{background-position:-192px -24px;}
+.icon-repeat{background-position:-216px -24px;}
+.icon-refresh{background-position:-240px -24px;}
+.icon-list-alt{background-position:-264px -24px;}
+.icon-lock{background-position:-287px -24px;}
+.icon-flag{background-position:-312px -24px;}
+.icon-headphones{background-position:-336px -24px;}
+.icon-volume-off{background-position:-360px -24px;}
+.icon-volume-down{background-position:-384px -24px;}
+.icon-volume-up{background-position:-408px -24px;}
+.icon-qrcode{background-position:-432px -24px;}
+.icon-barcode{background-position:-456px -24px;}
+.icon-tag{background-position:0 -48px;}
+.icon-tags{background-position:-25px -48px;}
+.icon-book{background-position:-48px -48px;}
+.icon-bookmark{background-position:-72px -48px;}
+.icon-print{background-position:-96px -48px;}
+.icon-camera{background-position:-120px -48px;}
+.icon-font{background-position:-144px -48px;}
+.icon-bold{background-position:-167px -48px;}
+.icon-italic{background-position:-192px -48px;}
+.icon-text-height{background-position:-216px -48px;}
+.icon-text-width{background-position:-240px -48px;}
+.icon-align-left{background-position:-264px -48px;}
+.icon-align-center{background-position:-288px -48px;}
+.icon-align-right{background-position:-312px -48px;}
+.icon-align-justify{background-position:-336px -48px;}
+.icon-list{background-position:-360px -48px;}
+.icon-indent-left{background-position:-384px -48px;}
+.icon-indent-right{background-position:-408px -48px;}
+.icon-facetime-video{background-position:-432px -48px;}
+.icon-picture{background-position:-456px -48px;}
+.icon-pencil{background-position:0 -72px;}
+.icon-map-marker{background-position:-24px -72px;}
+.icon-adjust{background-position:-48px -72px;}
+.icon-tint{background-position:-72px -72px;}
+.icon-edit{background-position:-96px -72px;}
+.icon-share{background-position:-120px -72px;}
+.icon-check{background-position:-144px -72px;}
+.icon-move{background-position:-168px -72px;}
+.icon-step-backward{background-position:-192px -72px;}
+.icon-fast-backward{background-position:-216px -72px;}
+.icon-backward{background-position:-240px -72px;}
+.icon-play{background-position:-264px -72px;}
+.icon-pause{background-position:-288px -72px;}
+.icon-stop{background-position:-312px -72px;}
+.icon-forward{background-position:-336px -72px;}
+.icon-fast-forward{background-position:-360px -72px;}
+.icon-step-forward{background-position:-384px -72px;}
+.icon-eject{background-position:-408px -72px;}
+.icon-chevron-left{background-position:-432px -72px;}
+.icon-chevron-right{background-position:-456px -72px;}
+.icon-plus-sign{background-position:0 -96px;}
+.icon-minus-sign{background-position:-24px -96px;}
+.icon-remove-sign{background-position:-48px -96px;}
+.icon-ok-sign{background-position:-72px -96px;}
+.icon-question-sign{background-position:-96px -96px;}
+.icon-info-sign{background-position:-120px -96px;}
+.icon-screenshot{background-position:-144px -96px;}
+.icon-remove-circle{background-position:-168px -96px;}
+.icon-ok-circle{background-position:-192px -96px;}
+.icon-ban-circle{background-position:-216px -96px;}
+.icon-arrow-left{background-position:-240px -96px;}
+.icon-arrow-right{background-position:-264px -96px;}
+.icon-arrow-up{background-position:-289px -96px;}
+.icon-arrow-down{background-position:-312px -96px;}
+.icon-share-alt{background-position:-336px -96px;}
+.icon-resize-full{background-position:-360px -96px;}
+.icon-resize-small{background-position:-384px -96px;}
+.icon-plus{background-position:-408px -96px;}
+.icon-minus{background-position:-433px -96px;}
+.icon-asterisk{background-position:-456px -96px;}
+.icon-exclamation-sign{background-position:0 -120px;}
+.icon-gift{background-position:-24px -120px;}
+.icon-leaf{background-position:-48px -120px;}
+.icon-fire{background-position:-72px -120px;}
+.icon-eye-open{background-position:-96px -120px;}
+.icon-eye-close{background-position:-120px -120px;}
+.icon-warning-sign{background-position:-144px -120px;}
+.icon-plane{background-position:-168px -120px;}
+.icon-calendar{background-position:-192px -120px;}
+.icon-random{background-position:-216px -120px;}
+.icon-comment{background-position:-240px -120px;}
+.icon-magnet{background-position:-264px -120px;}
+.icon-chevron-up{background-position:-288px -120px;}
+.icon-chevron-down{background-position:-313px -119px;}
+.icon-retweet{background-position:-336px -120px;}
+.icon-shopping-cart{background-position:-360px -120px;}
+.icon-folder-close{background-position:-384px -120px;}
+.icon-folder-open{background-position:-408px -120px;}
+.icon-resize-vertical{background-position:-432px -119px;}
+.icon-resize-horizontal{background-position:-456px -118px;}
+.icon-hdd{background-position:0 -144px;}
+.icon-bullhorn{background-position:-24px -144px;}
+.icon-bell{background-position:-48px -144px;}
+.icon-certificate{background-position:-72px -144px;}
+.icon-thumbs-up{background-position:-96px -144px;}
+.icon-thumbs-down{background-position:-120px -144px;}
+.icon-hand-right{background-position:-144px -144px;}
+.icon-hand-left{background-position:-168px -144px;}
+.icon-hand-up{background-position:-192px -144px;}
+.icon-hand-down{background-position:-216px -144px;}
+.icon-circle-arrow-right{background-position:-240px -144px;}
+.icon-circle-arrow-left{background-position:-264px -144px;}
+.icon-circle-arrow-up{background-position:-288px -144px;}
+.icon-circle-arrow-down{background-position:-312px -144px;}
+.icon-globe{background-position:-336px -144px;}
+.icon-wrench{background-position:-360px -144px;}
+.icon-tasks{background-position:-384px -144px;}
+.icon-filter{background-position:-408px -144px;}
+.icon-briefcase{background-position:-432px -144px;}
+.icon-fullscreen{background-position:-456px -144px;}
diff --git a/doc/templates/markdown.html.erb b/doc/templates/markdown.html.erb
new file mode 100644
index 0000000..41ff779
--- /dev/null
+++ b/doc/templates/markdown.html.erb
@@ -0,0 +1,117 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title><%= title %></title>
+    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
+    <!--[if lt IE 9]>
+      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
+    <![endif]-->
+    <style type="text/css">
+      <%= css %>
+      
+      h1, h2, h3, h4, h5, h6 {
+        margin-bottom: 9px;
+      }
+
+      ul ul,
+      ul ol,
+      ol ol,
+      ol ul {
+        margin-bottom: 9px;
+      }
+
+      #container {
+        max-width: 767px;
+        margin-left: auto;
+        margin-right: auto;
+      }
+
+      #top-vertical-container-margin {
+        margin-top: 20px;
+      }
+
+      #bottom-vertical-container-margin {
+        margin-bottom: 20px;
+      }
+
+      #logo {
+        text-align: center;
+        margin-bottom: 9px;
+      }
+
+      #title {
+        text-align: center;
+        font-size: 400%;
+        line-height: 1em;
+        padding-bottom: 30px;
+        margin-bottom: 30px;
+        border-bottom: solid 1px #d0d0d0;
+      }
+
+      #toc {
+        margin-bottom: 20px;
+      }
+
+      #toc .level-2 {
+        margin-left: 18px;
+      }
+
+      #toc .level-3 {
+        margin-left: 36px;
+      }
+
+      footer {
+        border-top: solid 1px #d0d0d0;
+        margin-top: 9px;
+        padding-top: 9px;
+      }
+    </style>
+  </head>
+  <body>
+
+    <div id="container">
+      <div id="top-vertical-container-margin"></div>
+      <div id="logo">
+        <a href="http://www.phusion.nl/"><img src="images/phusion_banner_small.png" alt="Phusion docs" width="350" height="59"></a>
+      </div>
+      <div id="title"><%= title %></div>
+
+      <div id="toc" style="display: none">
+        <div class="header"><strong>Table of contents</strong></div>
+      </div>
+
+      <%= content %>
+
+      <footer>
+        <p>© Phusion</p>
+      </footer>
+
+      <div id="bottom-vertical-container-margin"></div>
+    </div>
+
+    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
+    <script>
+      (function() {
+        var toc = $('#toc');
+        var i = 1;
+
+        $('h1,h2,h3').each(function() {
+          var level = parseInt(this.nodeName.match(/\d+/)[0]);
+          var id = "header_" + i;
+          var item = $('<div><a></a></div>').appendTo(toc);
+          item.addClass("level-" + level);
+          item.find('a').
+            text($(this).text()).
+            prop('href', '#' + id);
+          $(this).prop('id', id);
+          i++;
+        });
+
+        toc.show();
+      })();
+    </script>
+
+  </body>
+</html>
diff --git a/doc/users_guide_snippets/alternative_for_flying_passenger.txt b/doc/users_guide_snippets/alternative_for_flying_passenger.txt
new file mode 100644
index 0000000..c19262a
--- /dev/null
+++ b/doc/users_guide_snippets/alternative_for_flying_passenger.txt
@@ -0,0 +1 @@
+NOTE: This option has no effect when you are using <<flying_passenger,Flying Passenger>>. Instead, you should configure this by passing the {option} command line option to the Flying Passenger daemon.
\ No newline at end of file
diff --git a/doc/users_guide_snippets/analysis_and_system_maintenance.txt b/doc/users_guide_snippets/analysis_and_system_maintenance.txt
index 73b6af8..82015f1 100644
--- a/doc/users_guide_snippets/analysis_and_system_maintenance.txt
+++ b/doc/users_guide_snippets/analysis_and_system_maintenance.txt
@@ -13,7 +13,7 @@ the scope of this Users Guide. We kindly refer the interested reader to
 operating systems literature about 'virtual memory' and 'copy-on-write'.
 
 The tool `passenger-memory-stats` allows one to easily analyze Phusion Passenger's
-and Apache's real memory usage. For example:
+and the web server's real memory usage. For example:
 
 -------------------------------------------------------
 [bash at localhost root]# passenger-memory-stats
@@ -31,6 +31,12 @@ PID    PPID  Threads  VMSize   Private  Name
 ### Processes: 8
 ### Total private dirty RSS: 3.50 MB
 
+----------- Nginx processes ------------.
+PID    PPID   VMSize     Resident  Name
+----------------------------------------.
+51766  51764  82.7 MB    3.9 MB    nginx: master process ./objs/nginx
+51773  51766  82.9 MB    0.9 MB    nginx: worker process
+
 --------- Passenger processes ---------.
 PID    Threads  VMSize   Private  Name
 ---------------------------------------.
@@ -43,8 +49,8 @@ PID    Threads  VMSize   Private  Name
 -------------------------------------------------------
 
 The 'Private' or 'private dirty RSS' field shows the *real* memory usage of processes. Here,
-we see that all the Apache worker processes only take less than 1 MB memory each.
-This is a lot less than the 50 MB-ish memory usage as shown in the 'VMSize' column
+we see that all the Apache and Nginx worker processes only take less than 1 MB memory each.
+This is a lot less than the 50-80 MB-ish memory usage as shown in the 'VMSize' column
 (which is what a lot of people think is the real memory usage, but is actually not).
 
 NOTE: Private dirty RSS reporting only works on Linux. Unfortunately other operating systems
@@ -116,13 +122,7 @@ sessions compared to the others, then there might be a problem:
                                +---- "spike"
 --------------------------------
 
-Possible reasons why spikes can occur:
-
-. Your application is busy processing a request that takes a very long time.
-  If this is the case, then you might want to turn
-  <<PassengerUseGlobalQueue,global queuing>> on.
-. Your application is frozen, i.e. has stopped responding. See
-  <<debugging_frozen,Debugging frozen applications>> for tips.
+The most likely reason why a spike occurs is because your application is frozen, i.e. it has stopped responding. See <<debugging_frozen,Debugging frozen applications>> for tips.
 
 
 [[debugging_frozen]]
@@ -132,13 +132,13 @@ If one of your application instances is frozen (stopped responding), then you
 can figure out where it is frozen by killing it with 'SIGABRT'. This will cause the
 application to raise an exception, with a backtrace.
 
-The exception (with full backtrace information) is normally logged into the Apache
+The exception (with full backtrace information) is normally logged into the web server
 error log. But if your application or if its web framework has its own exception logging
 routines, then exceptions might be logged into the application's log files instead.
 This is the case with Ruby on Rails. So if you kill a Ruby on Rails application with
 'SIGABRT', please check the application's 'production.log' first (assuming that you're
 running it in a 'production' environment). If you don't see a backtrace there, check
-the Apache error log.
+the web server error log.
 
 NOTE: It is safe to kill application instances, even in live environments. Phusion Passenger
 will restart killed application instances, as if nothing bad happened.
@@ -198,4 +198,10 @@ through the 'X-Passenger-Connect-Password' HTTP header, like this:
 
 -------------------------------------------
 bash# curl -H "X-Passenger-Connect-Password: nFfVOX1F8LjZ90HJh28Sd_htJOsgRsNne2QXKf8NIXw" http://127.0.0.1:58122/
--------------------------------------------
\ No newline at end of file
+-------------------------------------------
+
+=== Attaching an IRB console to an application process ===
+:version: 3.0.0
+include::enterprise_only.txt[]
+
+You can attach an IRB console to any application process and inspect its state by executing arbitrary Ruby code. Do this by invoking `passenger-irb <PID>` where '<PID>' is the PID of the application process you wish to inspect. Note that the IRB console is currently only available for Ruby apps, not for apps in any other languages.
diff --git a/doc/users_guide_snippets/appendix_b_terminology.txt b/doc/users_guide_snippets/appendix_b_terminology.txt
index d4bb713..79e1bbf 100644
--- a/doc/users_guide_snippets/appendix_b_terminology.txt
+++ b/doc/users_guide_snippets/appendix_b_terminology.txt
@@ -61,3 +61,11 @@ In case of Python (WSGI) applications, this is the directory that contains
    |
    +- ...
 -----------------------------------------
+
+[[idle_process]]
+=== Idle process ===
+An "idle process" refers to a process that hasn't processed any requests for a while.
+
+[[inactive_process]]
+=== Inactive process ===
+An "inactive process" refers to a process that's current not processing any requests. An idle process is always inactive, but an inactive process is not always considered idle.
diff --git a/doc/users_guide_snippets/appendix_c_spawning_methods.txt b/doc/users_guide_snippets/appendix_c_spawning_methods.txt
index 7c458fa..4facc9b 100644
--- a/doc/users_guide_snippets/appendix_c_spawning_methods.txt
+++ b/doc/users_guide_snippets/appendix_c_spawning_methods.txt
@@ -10,7 +10,7 @@ While this may sound simple, there's not just one way to spawn worker processes.
 Let's go over the different spawning methods. For simplicity's sake, let's
 assume that we're only talking about Ruby on Rails applications.
 
-=== The most straightforward and traditional way: conservative spawning ===
+=== The most straightforward and traditional way: direct spawning ===
 
 Phusion Passenger could create a new Ruby process, which will then load the
 Rails application along with the entire Rails framework. This process will then
@@ -22,7 +22,7 @@ what mongrel_cluster performs: it creates N worker processes, each which loads
 a full copy of the Rails application and the Rails framework in memory. The Thin
 application server employs pretty much the same approach.
 
-Note that Phusion Passenger's version of conservative spawning differs slightly
+Note that Phusion Passenger's version of direct spawning differs slightly
 from mongrel_cluster. Mongrel_cluster creates entirely new Ruby processes. In
 programmers jargon, mongrel_cluster creates new Ruby processes by forking the
 current process and exec()-ing a new Ruby interpreter. Phusion Passenger on the
@@ -33,23 +33,23 @@ programmers jargon, Phusion Passenger calls fork(), but not exec().
 
 NOTE: Smart spawning is supported for all Ruby applications but not for WSGI applications.
 
-While conservative spawning works well, it's not as efficient as it could be
+While direct spawning works well, it's not as efficient as it could be
 because each worker process has its own private copy of the Rails application
 as well as the Rails framework. This wastes memory as well as startup time.
 
-image:images/conservative_spawning.png[Worker processes and conservative spawning] +
-'Figure: Worker processes and conservative spawning. Each worker process has its
+image:images/direct_spawning.png[Worker processes and direct spawning] +
+'Figure: Worker processes and direct spawning. Each worker process has its
 own private copy of the application code and Rails framework code.'
 
 It is possible to make the different worker processes share the memory occupied
 by application and Rails framework code, by utilizing so-called
 copy-on-write semantics of the virtual memory system on modern operating
 systems. As a side effect, the startup time is also reduced. This is technique
-is exploited by Phusion Passenger's 'smart' and 'smart-lv2' spawn methods.
+is exploited by Phusion Passenger's 'smart' spawn method.
 
 ==== How it works ====
 
-When the 'smart-lv2' spawn method is being used, Phusion Passenger will first
+When the 'smart' spawn method is being used, Phusion Passenger will first
 create a so-called 'ApplicationSpawner server' process. This process loads the
 entire Rails application along with the Rails framework, by loading
 'environment.rb'. Then, whenever Phusion Passenger needs a new worker process,
@@ -64,59 +64,37 @@ processes will share as much common
 memory as possible. That is, they will all share the same application and Rails
 framework code.
 
-image:images/smart-lv2.png[] +
-'Figure: Worker processes and the smart-lv2 spawn method. All worker processes,
+image:images/smart.png[] +
+'Figure: Worker processes and the smart spawn method. All worker processes,
 as well as the ApplicationSpawner, share the same application code and Rails
 framework code.'
 
-The 'smart' spawn method goes even further, by caching the Rails framework in
-another process called the 'FrameworkSpawner server'. This process only loads
-the Rails framework, not the application. When a FrameworkSpawner server is
-instructed to create a new worker process, it will create a new
-ApplicationSpawner to which the instruction will be delegated. All those
-ApplicationSpawner servers, as well as all worker processes created by those
-ApplicationSpawner servers, will share the same Rails framework code.
-
-The 'smart-lv2' method allows different worker processes that belong to the same
-application to share memory. The 'smart' method allows different worker
-processes - that happen to use the same Rails version - to share memory, even if
-they don't belong to the same application.
+The 'smart' method allows different worker processes that belong to the same
+application to share memory.
 
 Notes:
 
 - Vendored Rails frameworks cannot be shared by different applications, even if
   both vendored Rails frameworks are the same version. So for efficiency reasons
   we don't recommend vendoring Rails.
-- ApplicationSpawner and FrameworkSpawner servers have an idle timeout just
-  like worker processes. If an ApplicationSpawner/FrameworkSpawner server hasn't
-  been instructed to do anything for a while, it will be shutdown in order to
-  conserve memory. This idle timeout is configurable.
+- ApplicationSpawner servers have an idle timeout just like worker processes.
+  If an ApplicationSpawner/FrameworkSpawner server hasn't been instructed to do
+  anything for a while, it will be shutdown in order to conserve memory. This
+  idle timeout is configurable.
 
 ==== Summary of benefits ====
 
 Suppose that Phusion Passenger needs a new worker process for an application
 that uses Rails 2.2.1.
 
-- If the 'smart-lv2' spawning method is used, and an ApplicationSpawner server
-  for this application is already running, then worker process creation time is
-  about 10 times faster than conservative spawning. This worker process will also
-  share application and Rails framework code memory with the ApplicationSpawner
-  server and the worker processes that had been spawned by this ApplicationSpawner
-  server.
-- If the 'smart' spawning method is used, and a FrameworkSpawner server for
-  Rails 2.2.1 is already running, but no ApplicationSpawner server for this
-  application is running, then worker process creation time is about 2 times
-  faster than conservative spawning. If there is an ApplicationSpawner server
-  for this application running, then worker process creation time is about 10
-  times faster. This worker process will also share application and Rails
-  framework code memory with the ApplicationSpawner and FrameworkSpawner
-  servers.
-
-You could compare ApplicationSpawner and FrameworkSpawner servers with stem
-cells, that have the ability to quickly change into more specific cells (worker
-process).
-
-In practice, the smart spawning methods could mean a memory saving of about 33%,
+If the 'smart' spawning method is used, and an ApplicationSpawner server
+for this application is already running, then worker process creation time is
+about 10 times faster than direct spawning. This worker process will also
+share application and Rails framework code memory with the ApplicationSpawner
+server and the worker processes that had been spawned by this ApplicationSpawner
+server.
+
+In practice, the smart spawning method could mean a memory saving of about 33%,
 assuming that your Ruby interpreter is <<reducing_memory_usage,copy-on-write friendly>>.
 
 Of course, smart spawning is not without gotchas. But if you understand the
@@ -147,7 +125,7 @@ if defined?(PhusionPassenger)
             # We're in smart spawning mode.
             ... code to reestablish socket connections here ...
         else
-            # We're in conservative spawning mode. We don't need to do anything.
+            # We're in direct spawning mode. We don't need to do anything.
         end
     end
 end
@@ -242,7 +220,7 @@ if defined?(PhusionPassenger)
             # We're in smart spawning mode.
             reestablish_connection_to_memcached
         else
-            # We're in conservative spawning mode. We don't need to do anything.
+            # We're in direct spawning mode. We don't need to do anything.
         end
     end
 end
@@ -276,7 +254,7 @@ if defined?(PhusionPassenger)
             # We're in smart spawning mode.
             ... code to revive threads here ...
         else
-            # We're in conservative spawning mode. We don't need to do anything.
+            # We're in direct spawning mode. We don't need to do anything.
         end
     end
 end
diff --git a/doc/users_guide_snippets/enterprise_only.txt b/doc/users_guide_snippets/enterprise_only.txt
new file mode 100644
index 0000000..1b806fe
--- /dev/null
+++ b/doc/users_guide_snippets/enterprise_only.txt
@@ -0,0 +1 @@
+**This feature is only available in link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise]. It was introduced in version {version}. link:https://www.phusionpassenger.com/download[Buy Phusion Passenger Enterprise here.]**
\ No newline at end of file
diff --git a/doc/users_guide_snippets/environment_variables.txt b/doc/users_guide_snippets/environment_variables.txt
new file mode 100644
index 0000000..fe66a58
--- /dev/null
+++ b/doc/users_guide_snippets/environment_variables.txt
@@ -0,0 +1,268 @@
+[[about_environment_variables]]
+== Appendix D: About environment variables
+
+The Phusion Passenger compilation process can be customized with environment variables.
+
+Environment variables are named values that affect how the system works. For example they tell the system where to look for commands (the `PATH` variable) or where to look for libraries (`LD_LIBRARY_PATH`). Their names are often in all-uppercase. Sometimes people refer to an environment variable with a dollar sign `$` in front, but that's the same thing: when people say "the $PATH environment variable" they mean "the PATH environment variable". This is because the dollar sign `$` is a sh [...]
+
+Environment variables are set on a **per-process** basis, but they are **inherited** by child processes. This means that if you set environment variables in process A, another already running process B will not see these new environment variables. But if A spawns a child process C, then C will have all environment variables that A had. If you once again change the environment variables in A, then C will not see the changes.
+
+The per-process nature of environment variables some implications. When you set environment variables in your `bashrc` or other bash startup files...
+
+ * ...only newly spawned bash shells see them.
+ * ...the web server usually does not see them, because the web server tends to be started from init scripts, not from bash.
+ * ...cron jobs do not see them, because cron jobs' environment variables are entirely dictated by their crontabs.
+
+NOTE: Because this chapter is meant for beginners, it assumes that the reader uses the bash shell. This chapter does not describe instructions for zsh, csh or other shells. We assume that users of other shells are familiar with the Bourne shell syntax, and know how to apply the instructions in this chapter in their shells' native syntaxes.
+
+=== Working with environment variables
+
+You can see all environment variables in your shell by running the following command:
+
+[source,sh]
+---------------------------------
+env
+---------------------------------
+
+You can set an evironment variable with the syntax `export <NAME>=<VALUE>`. For example, to set the `APXS2` variable to the value `/usr/sbin/apxs2`:
+
+[source,sh]
+---------------------------------
+export APXS2=/usr/sbin/apxs2
+---------------------------------
+
+Any process that you run from your shell from that point on will have said environment variable:
+
+[source,sh]
+---------------------------------
+export APXS2=/usr/sbin/apxs2
+ruby -e 'p ENV["APXS2"]'
+# => "/usr/sbin/apxs2"
+---------------------------------
+
+.The "export" keyword is important
+[NOTE]
+===================================================
+You **must** set the `export` keyword. If you omit the `export` keyword then the environment variable will not be visible to other processes:
+
+[source,sh]
+---------------------------------
+APXS2=/usr/sbin/apxs2
+ruby -e 'p ENV["APXS2"]'
+# => nil
+---------------------------------
+===================================================
+
+You can reference an environment variable in your shell by typing the `$` sign followed by the environment variable's name. For example, to see the value of the `PATH` variable:
+
+[source,sh]
+---------------------------------
+echo $PATH
+---------------------------------
+
+You can also use this trick to extend the value of an environment variable:
+
+[source,sh]
+---------------------------------
+export PATH=/usr/bin
+
+# Prepends '/opt/local/bin', so that it becomes /opt/local/bin:/usr/bin
+export PATH=/opt/local/bin:$PATH
+# Appends '/usr/local/bin', so that it becomes /opt/local/bin:/usr/bin:/usr/local/bin
+export PATH=$PATH:/usr/local/bin
+---------------------------------
+
+=== The PATH environment variable
+
+The `PATH` environment variable dictates where the system looks for command. It is a colon-separated list of directories. If you get a "command not found" error while you know that the command is installed, then setting `PATH` will help. For example suppose that the command `frobnicator` is in `/opt/local/bin`:
+
+[source,sh]
+----------------------
+user at localhost bash$ frobnicator
+bash: frobnicator: command not found
+----------------------
+
+We verify that `/opt/local/bin` is not in `PATH`:
+
+[source,sh]
+----------------------
+user at localhost bash$ echo $PATH
+/bin:/usr/bin:/usr/local/bin
+----------------------
+
+We can run `frobnicator` through it's full path...
+
+[source,sh]
+----------------------
+user at localhost bash$ /opt/local/bin/frobnicator
+# => success!
+----------------------
+
+...or we can add `/opt/local/bin` to `PATH`.
+
+[source,sh]
+----------------------
+user at localhost bash$ export PATH=$PATH:/opt/local/bin
+user at localhost bash$ frobnicator
+# => success!
+----------------------
+
+==== Adding Phusion Passenger's administration tools to PATH
+
+If you get a "command not found" error when invoking one of the Phusion Passenger administration tools (e.g. `passenger-status` or `passenger-memory-stats` then that means the tools are not in `PATH`, so you need to add them.
+
+ * If you <<rubygems_generic_install,installed Phusion Passenger with RubyGems>>, then the tools are in your RubyGems executable path. You can view the gem path using the command `gem env`:
++
+------------------------------
+$ gem env
+RubyGems Environment:
+  - RUBYGEMS VERSION: 1.8.15
+  - RUBY VERSION: 1.8.7 (2011-12-28 patchlevel 357) [i686-darwin10.8.0]
+  - INSTALLATION DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
+  - RUBY EXECUTABLE: /opt/ruby-enterprise-1.8.7-2010.01/bin/ruby
+  - EXECUTABLE DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.01/bin    <--------- !!
+  - RUBYGEMS PLATFORMS:
+    - ruby
+    - x86-darwin-10
+  - GEM PATHS:
+     - /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
+     - /Users/hongli/.gem/ruby/1.8
+  - GEM CONFIGURATION:
+     - :update_sources => true
+     - :verbose => true
+     - :benchmark => false
+     - :backtrace => false
+     - :bulk_threshold => 1000
+     - "gem" => "--no-ri --no-rdoc"
+  - REMOTE SOURCES:
+     - http://rubygems.org/
+------------------------------
++
+As you can see, the RubyGems executable path in the example happens to be `/opt/ruby-enterprise-1.8.7-2010.01/bin`. So that directory must be added to `PATH`.
+
+ * If you <<tarball_generic_install,installed Phusion Passenger using the tarball>>, then the tools are in the `bin` subdirectory of the Phusion Passenger tarball directory that you extracted. For example, if you extracted `passenger-4.9.0.tar.gz` inside `/opt`, then the tools are located in `/opt/passenger-4.0.9/bin`. In that case, you need to add `/opt/passenger-4.0.9/bin` to your `PATH`.
+ * If you installed Phusion Passenger using native OS packages, then some Phusion Passenger administration tools are in `/usr/bin`, while others are in `/usr/sbin`. If you are not logged in as root, then `/usr/sbin` may not be in `PATH`, which would explain why you get a "command not found" when trying to invoke some of the tools. You should `/usr/sbin` to `PATH`.
+ * If you are unsure where your Phusion Passenger directory is then you can use the `find` command to look them up. Go to the root directory and invoke `find` with `sudo`:
++
+--------------------------------
+$ cd /
+$ sudo find . -name passenger-status
+/usr/local/passenger/bin/passenger-status
+--------------------------------
++
+In this example, the administration tools happen to be in `/usr/local/passenger/bin`, so you must add that to `PATH`.
+
+NOTE: You may still get a "command not found" when invoking the tools through sudo, even after you've added the relevant directory to `PATH`. Please read <<env_vars_and_sudo,Environment variables and sudo>> to learn more.
+
+=== Making environment variables permanent
+
+When you exit your shell, the evironment variable changes are lost. There is no standard method to set environment variables system-wide, so you have to set them in different configuration files for different services.
+
+==== bash
+
+To make environment variables permanent for future bash sessions **for the current user**, add them to your `~/.bashrc`:
+
+[source,sh]
+---------------------------------
+echo 'export FOO=bar' >> ~/.bashrc
+echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bashrc
+---------------------------------
+
+To make them permanent for future bash sessions **for all users**, add them to `/etc/bashrc`.
+
+NOTE: Depending on the system, the bashrc file may have a different filename. On Debian and Ubuntu, it's `/etc/bash.bashrc`.
+
+==== Apache
+
+NOTE: This subsection describes how to set environment variables on Apache itself, not on apps served through Phusion Passenger for Apache. The environment variables you set here will be passed to all apps, but you cannot customize them on a per-app basis. See also <<env_vars_passenger_apps,Setting environment variables on Phusion Passenger-served apps>>.
+
+On Debian and Ubuntu, with an Apache installed through apt, Apache environment variables are defined in the file `/etc/apache2/envvars`. This is a shell script so environment variables must be specified with the shell syntax.
+
+On Red Hat, Fedora, CentOS and ScientificLinux, with an Apache installed through YUM, Apache environment variables are defined in `/etc/sysconfig/httpd`.
+
+On OS X they are defined in `/System/Library/LaunchDaemons/org.apache.httpd.plist`, as explained link:/System/Library/LaunchDaemons/org.apache.httpd.plist[here on Stack Overflow].
+
+On other systems, or if you did not install Apache through the system's package manager, the configuration file for environment variables is specific to the vendor that supplied Apache. There may not even be such a configuration file. You should contact the vendor for support.
+
+==== Nginx
+
+NOTE: This subsection describes how to set environment variables on Nginx itself, not on apps served through Phusion Passenger for Nginx. The environment variables you set here will be passed to all apps, but you cannot customize them on a per-app basis. See also <<env_vars_passenger_apps,Setting environment variables on Phusion Passenger-served apps>>.
+
+If you installed Nginx through <<install_on_debian_ubuntu,the Brightbox packages>>, then you can define environment variables in `/etc/default/nginx`. This is a shell script so you must use the `export FOO=bar` syntax.
+
+Otherwise, environment variables are best set through the script which starts Nginx. For example, if you installed Nginx from source and you used
+ifdef::apache[]
+the Nginx init script described in the link:http://www.modrails.com/documentation/Users%20guide%20Nginx.html[Phusion Passenger Users Guide, Nginx version],
+endif::apache[]
+ifdef::nginx[]
+<<nginx_init_script,the Nginx init script described earlier in this manual,
+endif::nginx[]
+then you should edit that script to define the environment variables. Those init scripts are regular shell scripts, so use the `export FOO=bar` syntax. Just make sure your set your environment variables before the script starts Nginx.
+
+NOTE: Setting environment variables on Nginx has no effect on the <<flying_passenger,Flying Passenger daemon>> because the daemon is started seperately. You should set the environment variables in the shell right before starting the daemon.
+
+==== cron
+
+To make environment variables permanent for cron jobs, add those variables to the relevant crontab. But note that inside crontabs you cannot refer to existing environment variables with the `$` syntax because crontabs are not shell scripts. You have to specify the entire value.
+
+.What to put in "crontab -e"
+-------------------------
+# Environment variable definitions
+FOO=bar
+APXS2=/usr/sbin/apxs2
+
+# **WRONG!** You cannot refer to existing variables with the `$` syntax!
+PATH=/usr/bin:$PATH
+# **WRONG!** You cannot use the 'export' keyword!
+export PATH=/usr/bin:/usr/local/bin
+# Correct:
+PATH=/usr/bin:/usr/local/bin
+
+# Jobs:
+# m h  dom mon dow   command
+  * *  *   *   *     frobnicator
+-------------------------
+
+[[env_vars_passenger_apps]]
+==== Phusion Passenger-served apps
+
+You can pass environment variables to Phusion Passenger-served apps through various methods:
+
+ * When running Apache, use the `PassEnv` and `SetEnv` directives of link:http://httpd.apache.org/docs/2.4/mod/mod_env.html[mod_env]. This is supported starting from Phusion Passenger 4.0.
+ * When running Nginx, use the `env` directive. Unlike Apache, Nginx's `env` directive can only be set globally and cannot be customized on a per-virtual host basis.
+ * Through your `bashrc`. Starting from version 4.0, Phusion Passenger 4.0 spawns applications through bash and inherit all bash environment variables. Phusion Passenger Standalone tends to be started from the shell and thus inherits all environment variables set by the shell.
+ * Through Apache and Nginx, as described earlier in this chapter. Any environment variables that you set on Apache and Nginx itself are inherited by Phusion Passenger, and thus by Phusion Passenger-served apps as well.
+ * Through the application itself. Most programming languages provide APIs for setting environment variables. For example in Ruby you can write:
++
+[source,ruby]
+-------------------
+ENV['FOO'] = 'bar'
+-------------------
++
+In Python you can write:
++
+[source,python]
+-------------------
+import os
+os.environ['FOO'] = 'bar'
+-------------------
+
+[[env_vars_and_sudo]]
+=== Environment variables and sudo
+
+The `sudo` command resets all environment variables before running the specified command, for security reasons. So if you set environment variables before running `sudo passenger-install-xxx-module`, `sudo passenger-status` or any other commands, then the environment variables are not correctly passed to the command. You can solve this by running sudo with `-E` (preserve environment variables):
+
+[source,sh]
+-------------------------
+user at localhost bash$ export APXS2=/usr/sbin/apxs2
+user at localhost bash$ sudo -E passenger-install-apache2-module
+-------------------------
+
+Alternatively, you can obtain a root prompt with sudo first, and *then* set the environment variables, before running any further commands:
+
+-------------------------
+user at localhost bash$ sudo -s
+Password: ...
+root at localhost bash# export APXS2=/usr/sbin/apxs2
+root at localhost bash# passenger-install-apache2-module
+-------------------------
diff --git a/doc/users_guide_snippets/installation.txt b/doc/users_guide_snippets/installation.txt
new file mode 100644
index 0000000..65813d1
--- /dev/null
+++ b/doc/users_guide_snippets/installation.txt
@@ -0,0 +1,914 @@
+=== Synopsis
+
+The Phusion Passenger installation process consists of two steps:
+
+1. The *obtainment step*, where you download the Phusion Passenger files puts them somewhere on your system. This can be done through downloading the source tarball, installing the Ruby gem or installing a native OS package via APT or YUM.
+2. The *integration step*, where you configure Phusion Passenger so that it works properly with other system components such as Apache, Nginx, Ruby, Python, etc.
+
+Because Phusion Passenger is designed to run in a wide variety of operating systems and configurations, both steps can be done in multiple ways. Most users -- especially first-time users -- will be satisfied with the _generic installation instructions_ which covers both steps. However some users may prefer _OS-specific installation instructions_, which allow Phusion Passenger to better integrate into the operating system. Better integration is characterized by following OS-specific conventions.
+
+If you are not familiar with system administration and do not understand all the choices, then we recommend you to go with the <<rubygems_generic_install,RubyGems generic installation method>> (if you're a Ruby user) or the <<tarball_generic_install,tarball generic installation method>> (if you're not a Ruby user).
+
+The steps for upgrading or downgrading Phusion Passenger is almost the same as the steps for installing. All the installation guides in this section will also teach you how to upgrade and downgrade.
+
+
+[[rubygems_generic_install]]
+=== Generic installation, upgrade and downgrade method: via RubyGems
+
+RubyGems is only used as a method to obtain the Phusion Passenger files, so in case you have multiple Ruby versions it does not matter which Ruby's RubyGems you use for installation. Once installed, Phusion Passenger can work with all other Ruby versions on your system.
+
+[[is_ruby_home_or_system_wide_installed]]
+[float]
+==== Step 1: figuring out whether your Ruby is installed the home directory or system-wide
+
+Ruby may either be installed in the home directory, or system-wide. If it's installed system-wide then we will want to install gems system-wide as well, so you need to switch to a root prompt first. If Ruby is installed in the home directory then we will want to install gems to the home directory as well, as a normal user.
+
+To find out which case applies, run the following command to find out where the `ruby` command is:
+
+--------------
+which ruby
+--------------
+
+Do you see a filename that references '/home' or '/Users'? If so then your Ruby interpreter is installed in your home directory and you can proceed to step 2. Otherwise, you need to switch to a root prompt by running one of the following commands:
+
+* Are you using RVM? Run `rvmsudo -s`
+* Are you not using RVM, or do you not know what RVM is? Run `sudo -s`
+* Is 'sudo' not installed on your system? Run `su -c bash`
+
+You must maintain this root prompt throughout this installation guide.
+
+[float]
+==== Step 2: install the gem
+
+.Open Source
+
+Install the latest gem to obtain the files for the latest stable version of the open source Phusion Passenger:
+
+----------------------
+gem install passenger
+----------------------
+
+Sometimes you will want to obtain the latest beta version of Phusion Passenger. Beta versions are not normally selected by `gem install`, so to opt-in for beta versions you have to add the `--pre` argument:
+
+-----------------------------------
+gem install passenger --pre
+-----------------------------------
+
+If you want to obtain a specific version of Phusion Passenger, e.g. because you are downgrading, then specify the version number with `--version`:
+
+-----------------------------------
+gem install passenger --version 3.0.0
+-----------------------------------
+
+If you want to obtain a specific *beta* version of Phusion Passenger then you must also pass `--pre`:
+
+----------------------------------------------------
+gem install passenger --version 3.9.1.beta --pre
+----------------------------------------------------
+
+.Enterprise
+
+The `gem install` command only installs the open source version of Phusion Passenger. link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] customers should obtain the gem from the link:https://www.phusionpassenger.com/orders[Customer Area] instead. Login with your order reference and password. The Customer Area will show you a list of files.
+
+First, download the *license key* and save it as '/etc/passenger-enterprise-license'.
+
+Next, download the *gem file* for the version you want (`passenger-enterprise-server-x.x.x.gem`) and install it with:
+
+-------------------------------------------------------
+gem install passenger-enterprise-server-x.x.x.gem
+-------------------------------------------------------
+
+[[add_rubygems_bin_dir_to_path]]
+[float]
+==== Step 3: add the RubyGems bin directory to your $PATH
+
+If you all of the following are applicable to you:
+
+- You are on Debian or Ubuntu,
+- and you installed RubyGems through APT,
+- and your Ruby interpreter is installed system-wide,
+
+...then you must ensure that the RubyGems bin directory is in your $PATH, which is the environment variable that dictates where your command prompt will look for commands. If any of the above conditions do not apply to you, then you can skip this step.
+
+Open '/etc/bash.bashrc' or '/etc/bashrc' (whichever is available) and add the following to the end of the file. Also run this command in your terminal.
+
+-----------------------------------------------------------------
+export PATH=$PATH:/var/lib/gems/1.8/bin:/var/lib/gems/1.9/bin
+-----------------------------------------------------------------
+
+[float]
+==== Step 4: loosen permissions
+
+If in step 1 you determined that your Ruby interpreter is installed in your home directory, then you need to make sure that the Phusion Passenger gem directory is accessible by your web server. To do that, you must ensure that the Phusion Passenger gem directory, as well as all parent directories, have the world-executable permission.
+
+To find out where the Phusion Passenger gem directory is, run:
+
+-------------------------
+passenger-config --root
+-------------------------
+
+Suppose that the above command outputs '/home/phusion/.rvm/gems/ruby-1.9.3-p362/gems/passenger-x.x.x'. Then you `chmod o+x` the directory itself and all parent directories up until '/home/phusion':
+
+-------------------------
+chmod o+x /home/phusion/.rvm/gems/ruby-1.9.3-p362/gems/passenger-x.x.x
+chmod o+x /home/phusion/.rvm/gems/ruby-1.9.3-p362/gems
+chmod o+x /home/phusion/.rvm/gems/ruby-1.9.3-p362
+chmod o+x /home/phusion/.rvm/gems
+chmod o+x /home/phusion/.rvm
+chmod o+x /home/phusion
+-------------------------
+
+[[run_passenger_installer]]
+[float]
+==== Step 5: run the Phusion Passenger installer
+
+ifdef::apache[]
+The Phusion Passenger gem only contains source files. In this step we will use the installer to compile the Phusion Passenger binaries, which include the various Phusion Passenger agent executables and the Phusion Passenger Apache module.
+
+Run the following command and follow the on-screen instructions.
+
+----------------------------------
+passenger-install-apache2-module
+----------------------------------
+
+At the end of the installation process, you will be asked to copy and paste a configuration snippet (containing `LoadModule`, `PassengerRoot`, etc.) into your Apache configuration file. If you're upgrading, then you already had a similar configuration snippet. Be sure to remove the old one before pasting the new one.
+
+Different operating systems and Apache installations have different conventions with regard to where the Apache configuration file is and how it is organized. Please read <<working_with_apache_conf,Working with the Apache configuration file>> if you're not familiar with it. That section is especially of interest for OS X Server >= 10.8 users because the configuration file may not be at a surprising location.
+
+If compilation doesn't succeed, then please consult the <<troubleshooting,Troubleshooting>> section.
+
+.What does the installer do?
+
+Despite the name, this "installer" doesn't actually install anything. The installer checks whether all required dependencies are installed, invokes the compiler, and tells you how to modify the Apache
+configuration file. However, it doesn't copy any files to outside the Phusion Passenger source directory.
+
+`passenger-install-apache2-module` is actually just a user-friendly frontend around the command `rake apache2`, which performs the actual compilation of Phusion Passenger.
+endif::[]
+ifdef::nginx[]
+Nginx is a different from other web servers in that it does not support loadable modules. The only way to extend Nginx is to recompile it entirely from source. Since Phusion Passenger consists of some external executables plus an Nginx module, you must recompile Nginx when first installing Phusion Passenger, but also when upgrading Nginx itself or when upgrading the Phusion Passenger version.
+
+Recompiling Nginx and the Phusion Passenger executables is what we will do in this step. The good news is that Phusion Passenger provides a tool to make this easy for you.
+
+If you've already installed Nginx before, but without Phusion Passenger support, then you *should* uninstall it first. You don't have to, because you can also install another Nginx with Phusion Passenger support, in parallel to the existing Nginx. We merely recommend uninstalling the existing in order to avoid user confusion, but the choice is yours.
+
+If you had previously installed Nginx with Phusion Passenger support, and you are upgrading, then you don't have to uninstall your existing Nginx first. Instead we'll overwrite it this step. But it is important that you recompile Nginx with the configure parameters that you used last time.
+
+Here's how you can uninstall the original Nginx:
+
+- If you installed the existing Nginx through APT, run: `sudo apt-get remove nginx nginx-full nginx-light nginx-naxsi nginx-common`
+- If you installed the existing Nginx through YUM, run `yum remove nginx` as root.
+
+To proceed with installing or upgrading Phusion Passenger, run the Phusion Passenger Nginx installer and follow the on-screen instructions:
+
+----------------------------------
+passenger-install-nginx-module
+----------------------------------
+
+At some point it will ask you which prefix to install Nginx to. If you're upgrading, then specify the same prefix that you used last time, as well as the same configuration parameters that you used last time.
+endif::[]
+
+[float]
+==== Step 6: Restarting the Flying Passenger daemon
+
+If you are using <<flying_passenger,Flying Passenger>> then you must restart the Flying Passenger daemon by sending it the SIGTERM signal:
+
+-------------------------------
+kill `cat /path-to/flying-passenger.pid`
+-------------------------------
+
+Or, if Flying Passenger is not running with a PID file, look up its PID us `ps` and then send it SIGTERM:
+
+-------------------------------
+ps auxw | grep flying-passenger
+kill PID_OF_FLYING_PASSENGER
+-------------------------------
+
+[[verify_passenger_running]]
+[float]
+==== Step 7: Verifying that Phusion Passenger is running
+
+Restart your web server and run:
+
+---------------------------
+passenger-memory-stats
+---------------------------
+
+You should see the web server processes as well as a number of Phusion Passenger processes (e.g. PassengerWatchdog, PassengerHelperAgent). Congratulations, Phusion Passenger is now installed and running!
+ifdef::nginx[]
+At this point you may be interested in <<nginx_init_script,creating an Nginx init script>>.
+endif::[]
+
+If the output is not as expected, then please refer to the <<troubleshooting,Troubleshooting>> section.
+
+
+[[tarball_generic_install]]
+=== Generic installation, upgrade and downgrade method: via tarball
+
+[float]
+==== Step 1: download and extract the tarball
+
+Download the open source Phusion Passenger tarball from link:https://www.phusionpassenger.com/download#open_source[the Phusion Passenger website]. Older versions can be found on link:https://www.phusionpassenger.com/file_releases[the release archive].
+
+If you a link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] customer, download the Phusion Passenger Enterprise tarball from the link:https://www.phusionpassenger.com/orders[Customer Area]. Also be sure to download the *license key* and save it as '/etc/passenger-enterprise-license'.
+
+Once you have downloaded the tarball, pick a location to extract it to. You can pick any location. A good location is '/opt/passenger'. Let's call this location `$PREFIX`. Create this directory and extract the tarball as follows:
+
+--------------------------------------------------
+mkdir $PREFIX
+cd $PREFIX
+tar xzvf /location-to/passenger-x.x.x.tar.gz
+cd $PREFIX/passenger-x.x.x
+--------------------------------------------------
+
+Note that `passenger-x.x.x` should be `passenger-enterprise-server-x.x.x` if you're using Phusion Passenger Enterprise.
+
+[float]
+==== Step 2: loosen permissions
+
+The Phusion Passenger directory must be accessible by the web server and by any web apps you want to run. To do that, you must ensure that the Phusion Passenger gem directory, as well as all parent directories, have the world-executable permission.
+
+Suppose that the Phusion Passenger directory is '/opt/passenger/passenger-4.0.0'. Run `chmod o+x` on the directory itself and all parent directories.
+
+-------------------------
+chmod o+x /opt/passenger/passenger-4.0.0
+chmod o+x /opt/passenger
+chmod o+x /opt
+-------------------------
+
+[float]
+==== Step 3: installing Ruby and Rake
+
+Phusion Passenger supports multiple languages and its core is written in C++, but its installer and administration tools are written in Ruby, so you must install that.
+
+Even though Ruby is required, Ruby will not be loaded during normal operation unless you deploy a Ruby web application on Phusion Passenger.
+
+Run `ruby --version` and `rake --version` to find out whether both commands are already installed and recent enough. Phusion Passenger requires Ruby >= 1.8.6. Any Rake version will do.
+
+.Debian 6
+
+We recommend you to use link:http://wiki.brightbox.co.uk/docs:phusion-passenger[the Brightbox Ruby packages]. They provide more up-to-date versions of Ruby than Debian's official repositories provide. Their Ubuntu Lucid repository is compatible with Debian 6. If you do not want to use the Brightbox repository, then follow the instructions for Debian 5.
+
+Create '/etc/apt/sources.list.d/brightbox-source.list':
+
+-----------------------------
+deb  http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu  lucid main
+-----------------------------
+
+Install the Brightbox APT public key:
+
+-----------------------------
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
+-----------------------------
+
+Then install Ruby and Rake:
+
+-----------------------------
+sudo apt-get update
+sudo apt-get install ruby1.9.3
+sudo gem install rake
+-----------------------------
+
+.Debian 5
+
+Run:
+
+-----------------------------
+sudo apt-get update
+sudo apt-get install ruby rake
+-----------------------------
+
+Then <<add_rubygems_bin_dir_to_path,add the RubyGems bin directory to your $PATH>>.
+
+.Ubuntu
+
+We recommend you to use link:http://wiki.brightbox.co.uk/docs:phusion-passenger[the Brightbox Ruby packages]. They provide more up-to-date versions of Ruby than Ubuntu's official repositories provide.
+
+-----------------------------
+sudo apt-add-repository ppa:brightbox/passenger
+sudo apt-get update
+-----------------------------
+
+If you're on the older Ubuntu 8.04 Hardy release, the `apt-add-repository` command isn't available so you have to install the repository and the key by hand:
+
+-----------------------------
+sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger.list'
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
+sudo apt-get update
+-----------------------------
+
+.Other operating systems
+
+Please install Ruby from link:http://www.ruby-lang.org/[the Ruby website]. Once Ruby is installed, run the following command (<<is_ruby_home_or_system_wide_installed,possibly as root>>) to install Rake:
+
+-----------------------
+gem install rake
+-----------------------
+
+[float]
+==== Step 4: figuring out whether your Ruby is installed the home directory or system-wide
+
+Depending on whether you installed Ruby system-wide, you need to enter a root prompt before continuing to step 5. Please refer to <<is_ruby_home_or_system_wide_installed,this section>>.
+
+[float]
+==== Step 5: run the Phusion Passenger installer
+
+Please refer to <<run_passenger_installer,this section>>.
+ifdef::apache[]
+Note that the `passenger-install-apache2-module` command is inside the 'bin' subdirectory of the Phusion Passenger source directory, so you would have to run something like '/opt/passenger/passenger-x.x.x/bin/passenger-install-apache2-module'.
+endif::[]
+ifdef::nginx[]
+Note that the `passenger-install-nginx-module` command is inside the 'bin' subdirectory of the Phusion Passenger source directory, so you would have to run something like '/opt/passenger/passenger-x.x.x/bin/passenger-install-nginx-module'.
+endif::[]
+
+[float]
+==== Step 6: Restarting the Flying Passenger daemon
+
+If you are using <<flying_passenger,Flying Passenger>> then you must restart the Flying Passenger daemon by sending it the SIGTERM signal:
+
+-------------------------------
+kill `cat /path-to/flying-passenger.pid`
+-------------------------------
+
+Or, if Flying Passenger is not running with a PID file, look up its PID us `ps` and then send it SIGTERM:
+
+-------------------------------
+ps auxw | grep flying-passenger
+kill PID_OF_FLYING_PASSENGER
+-------------------------------
+
+[float]
+==== Step 7: Verifying that Phusion Passenger is running
+
+Please refer to <<verify_passenger_running,this section>>. Note that all Phusion Passenger administration scripts are located inside the 'bin' subdirectory of the Phusion Passenger source directory, so you would have to run something like '/opt/passenger/passenger-x.x.x/bin/passenger-memory-stats'.
+
+
+[[install_on_debian_ubuntu]]
+=== Installing or upgrading on Debian 6 or Ubuntu
+
+John Leach from Brightbox has kindly provided Ubuntu packages for Phusion Passenger. The Ubuntu Lucid packages are compatible with Debian 6. The packages are available from the link:http://wiki.brightbox.co.uk/docs:phusion-passenger[Brightbox repository]. Only packages for the open source version of Phusion Passenger are provided. link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] customers should use the <<rubygems_generic_install,generic RubyGems installatio [...]
+
+If you use these packages to install Phusion Passenger then you do not need to run `passenger-install-apache2-module` or `passenger-install-nginx-module`. These packages contain all the binaries that you need.
+
+.Apache
+
+On Ubuntu versions newer than 8.04 Hardy, register the Brightbox Apache PPA as follows:
+
+-----------------------------
+sudo apt-add-repository ppa:brightbox/passenger-experimental
+sudo apt-get update
+-----------------------------
+
+On Ubuntu 8.04 Hardy and on Debian, the `apt-add-repository` command isn't available so you have to install the repository and the key by hand.
+
+Debian 6:
+
+-----------------------------
+sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu lucid main" > /etc/apt/sources.list.d/brightbox-passenger.list'
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
+sudo apt-get update
+-----------------------------
+
+Ubuntu 8.04 Hardy:
+
+-----------------------------
+sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger.list'
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
+sudo apt-get update
+-----------------------------
+
+You can proceed with installing Phusion Passenger by running:
+
+---------------------------------------------
+sudo apt-get install libapache2-mod-passenger
+---------------------------------------------
+
+The Apache package provides configuration snippets for you, so you don't need to modify any Apache configuration to get it to load Phusion Passenger.
+
+.Nginx
+
+On Ubuntu versions newer than 8.04 Hardy, register the Brightbox Apache PPA as follows:
+
+-----------------------------
+sudo apt-add-repository ppa:brightbox/passenger-experimental
+sudo apt-get update
+-----------------------------
+
+On Ubuntu 8.04 Hardy and on Debian, the `apt-add-repository` command isn't available so you have to install the repository and the key by hand.
+
+Debian 6:
+
+-----------------------------
+sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu lucid main" > /etc/apt/sources.list.d/brightbox-passenger-nginx.list'
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
+sudo apt-get update
+-----------------------------
+
+Ubuntu 8.04 Hardy:
+
+-----------------------------
+sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger-nginx.list'
+sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
+sudo apt-get update
+-----------------------------
+
+Then:
+
+---------------------------------------------
+sudo apt-get install nginx-full
+---------------------------------------------
+
+You'll then need to enable the Phusion Passenger module in Nginx by creating the following configuration file:
+
+-----------------------------------------------
+sudo sh -c 'echo "passenger_root /usr/lib/phusion-passenger;" > /etc/nginx/conf.d/passenger.conf'
+-----------------------------------------------
+
+Then restart Nginx to apply the changes:
+
+----------------------------------------
+sudo /etc/init.d/nginx restart
+----------------------------------------
+
+.Standalone
+
+Unfortunately, no packages are provided for Phusion Passenger Standalone.
+
+
+=== Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux
+
+YUM repositories with RPMs are maintained by link:https://github.com/erikogan/passenger[Erik Ogan] and link:http://stealthymonkeys.com/[Stealthy Monkeys Consulting]. Only packages for the open source version of Phusion Passenger are provided. link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] customers should use the <<rubygems_generic_install,generic RubyGems installation method>> or <<tarball_generic_install,the generic tarball installation method>> instead.
+
+If you use YUM to install Phusion Passenger then you do not need to run `passenger-install-apache2-module` or `passenger-install-nginx-module`. The YUM packages contain all the binaries that you need. You also don't need to modify any Apache or Nginx configuration to get them to load Phusion Passenger, the packages provide configuration snippets for you as well.
+
+[float]
+==== Step 1: Import the Stealthy Monkeys Consulting's GPG key
+
+---------------------------------------------
+rpm --import http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc
+---------------------------------------------
+
+[float]
+==== Step 2: Install the release package
+
+Install the passenger-release package from the link:http://passenger.stealthymonkeys.com/[main repository].
+
+Fedora Core 17:
+---------------------------------------------
+yum install http://passenger.stealthymonkeys.com/fedora/17/passenger-release.noarch.rpm
+---------------------------------------------
+
+Fedora Core 16:
+---------------------------------------------
+yum install http://passenger.stealthymonkeys.com/fedora/16/passenger-release.noarch.rpm
+---------------------------------------------
+
+Fedora Core 15:
+---------------------------------------------
+yum install http://passenger.stealthymonkeys.com/fedora/15/passenger-release.noarch.rpm
+---------------------------------------------
+
+Fedora Core 14:
+---------------------------------------------
+yum install http://passenger.stealthymonkeys.com/fedora/14/passenger-release.noarch.rpm
+---------------------------------------------
+
+RHEL 6 / CentOS 6 / ScientificLinux 6: (Note: these packages depend on link:http://fedoraproject.org/wiki/EPEL[EPEL].)
+---------------------------------------------
+yum install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm
+---------------------------------------------
+
+RHEL 5 / CentOS 5 / ScientificLinux 5: (Note: these packages depend on link:http://fedoraproject.org/wiki/EPEL[EPEL].)
+---------------------------------------------
+rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm
+---------------------------------------------
+
+[float]
+==== Step 3: Install the right Phusion Passenger package
+
+From there you can use link:http://prefetch.net/articles/yum.html[YUM] to install packages. For example, try one of these:
+
+Phusion Passenger for Apache:
+
+---------------------------------------------
+yum install mod_passenger
+---------------------------------------------
+
+Phusion Passenger for Nginx:
+
+---------------------------------------------
+yum install nginx-passenger
+---------------------------------------------
+
+Phusion Passenger Standalone:
+
+---------------------------------------------
+yum install passenger-standalone
+---------------------------------------------
+
+[float]
+==== Building your own packages
+
+There are instructions for building your own packages and Yum repositories in the link:https://github.com/FooBarWidget/passenger/tree/master/rpm#readme[rpm directory ReadMe] within the link:https://github.com/FooBarWidget/passenger[GitHub repository].
+
+
+=== Upgrading from open source to Enterprise
+
+Phusion Passenger comes in two variants: an open source version, as well as an link:https://www.phusionpassenger.com/enterprise[Enterprise version] which introduces a myriad of useful features that can improve stability and performance and efficiency.
+
+Customers who have bought Phusion Passenger Enterprise can upgrade their open source installation to Enterprise as follows:
+
+1. <<uninstalling,Uninstall the open source Phusion Passenger>>.
+2. Install the Enterprise version by following one of the installation guides in this section (e.g. <<rubygems_generic_install,RubyGems generic installation>> or <<tarball_generic_install,tarball generic installation>>).
+
+The uninstallation is necessary because the Enterprise Ruby gem has a different gem name ('passenger-enterprise-server' instead of 'passenger'), but the same administration command names (e.g. `passenger-status`). Uninstalling the open source version avoids any conflicts.
+
+
+=== Cryptographic verification of installation files
+
+==== Synopsis
+
+We digitally sign various files with our GPG key so that you can check whether they're legit, i.e. whether they really came from Phusion and haven't been tampered with by a third party. We apply signing since the open source version 4.0.0 RC 4, or the Enterprise version 4.0.0 RC 1.
+
+==== Importing the Phusion Software Signing key
+
+Phusion's GPG key for signing software is as follows:
+
+  Phusion Software Signing (software-signing at phusion.nl)
+  Short key ID: 0x0A212A8C
+  Long key ID: 0x2AC745A50A212A8C
+  Fingerprint: D5F0 8514 2693 9232 F437  AB72 2AC7 45A5 0A21 2A8C
+
+This key is stored at link:http://www.phusion.nl/about/gpg[the Phusion website] and at the key servers link:http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x2AC745A50A212A8C[sks-keyservers.net] and link:http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2AC745A50A212A8C[keyserver.ubuntu.com]. You can import it to your keyring with one of these command:
+
+-------------------------------------------------------------------------
+gpg --keyserver pool.sks-keyservers.net --search-keys 0x2AC745A50A212A8C
+# -OR-
+gpg --keyserver keyserver.ubuntu.com --search-keys 0x2AC745A50A212A8C
+-------------------------------------------------------------------------
+
+The Phusion Software Signing key is only used for signing software. It's never used for signing emails or for encrypting files, so please be suspicious if you encounter usage of this key outside the context of signing software, and alert us at support at phusion.nl. Include "notspam" in the message to bypass our spam filter.
+
+The email address software-signing at phusion.nl redirects to info at phusion.nl so it's safe to send email there.
+
+==== Verifying the Phusion Software Signing key
+
+The Phusion Software Signing key is also *signed by the Phusion founders*. Their keys are as follows:
+
+  Hongli Lai (hongli at phusion.nl)
+  Short key ID: 4B6F4332
+  Long key ID: 06A131094B6F4332
+  Fingerprint: 64E8 0420 FC6A 499F 9E1F  81FA 06A1 3109 4B6F 4332
+
+  Ninh Bui (ninh at phusion.nl)
+  Short key ID: 6FAF3782
+  Long key ID: BA8DA3F46FAF3782
+  Fingerprint: 353A 398C 49AF 5CD5 74A0  656C BA8D A3F4 6FAF 3782
+
+Both keys are stored at both sks-servers.net and keyserver.ubuntu.com. Import them with:
+
+------------------------------------------
+gpg --keyserver pool.sks-servers.net --search-keys 0x06A131094B6F4332
+gpg --keyserver pool.sks-servers.net --search-keys 0xBA8DA3F46FAF3782
+# -OR-
+gpg --keyserver keyserver.ubuntu.com --search-keys 0x06A131094B6F4332
+gpg --keyserver keyserver.ubuntu.com --search-keys 0xBA8DA3F46FAF3782
+------------------------------------------
+
+==== Verifying the gem and tarball
+
+You can find the open source version's gem and tarball GPG signatures at https://www.phusionpassenger.com/signatures/. The Enterprise version's GPG signatures can be found in the link:https://www.phusionpassenger.com/orders[Customer Area]. All signatures have the '.asc' extension. Once you have imported our key, you can verify the validity of a file against its signature as follows:
+
+-----------------------------------------
+$ gpg --verify passenger-x.x.x.tar.gz.asc passenger-x.x.x.tar.gz
+gpg: Signature made Mon Mar 11 09:45:46 2013 CET using RSA key ID 0A212A8C
+gpg: Good signature from "Phusion Software Signing <software-signing at phusion.nl>"
+-----------------------------------------
+
+==== Verifying Git signatures
+
+Tags in the link:https://github.com/FooBarWidget/passenger[Git repository for the open source version] are also tagged. You can verify a Git tag as follows:
+
+-------------------------------------------------------
+$ git tag --verify release-x.x.x
+object d886f34b5705e4314feccaf0d77b9a38416e15e0
+type commit
+tag release-4.0.0.rc5
+tagger Hongli Lai (Phusion) <hongli at phusion.nl> 1362993117 +0100
+
+This is a tag message.
+gpg: Signature made Mon Mar 11 10:12:02 2013 CET using RSA key ID 0A212A8C
+gpg: Good signature from "Phusion Software Signing <software-signing at phusion.nl>"
+-------------------------------------------------------
+
+==== Verifying DEB and RPM packages
+
+The DEB and RPM packages are signed with the signatures of the respective packagers. Phusion does not provide signatures for them.
+
+==== Revocation
+
+In the event our key is compromised, we will revoke the key and upload the revocation information to sks-servers.net and keyserver.ubuntu.com. However your system will not know about the revocation until you update the keys from the keyservers. You should update your keys regularly (e.g. once a week) by invoking:
+
+-------------------------------------------------------
+gpg --refresh-keys --keyserver pool.sks-servers.net
+# -OR-
+gpg --refresh-keys --keyserver keyserver.ubuntu.com
+-------------------------------------------------------
+
+
+=== Non-interactive, automatic, headless installs or upgrades
+
+ifdef::apache[]
+By default, the installer (`passenger-install-apache2-module`) is interactive. If you want to automate installation then you can do so by passing `--auto` to the installer. See also `passenger-install-apache2-module --help` for more options.
+endif::[]
+ifdef::nginx[]
+By default, the installer (`passenger-install-nginx-module`) is interactive. If you want to automate installation then you can do so by passing various answers to the installer through command line options. Please run the installer with `--help` for a list of available command line options.
+endif::[]
+
+
+=== Customizing the compilation process
+
+The Phusion Passenger compilation process can be customized with environment variables. You can learn more about environment variables in <<about_environment_variables,About environment variables>>.
+
+==== Setting the compiler
+
+You can force the Phusion Passenger build system to use a specific C or C++ compiler by setting the `CC` and `CXX` environment variables. These may be set to any arbitrary shell commands.
+
+For example, contributors who want to hack on Phusion Passenger may want to use Clang for faster compilation and link:http://ccache.samba.org/[ccache] for faster recompilation, and may want to enable more error-catching compilation flags:
+
+[source,sh]
+----------------------
+export CC='ccache clang -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'
+export CXX='ccache clang++ -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'
+----------------------
+
+NOTE: If you run the installer with `sudo` then environment variables may not be passed properly. Learn more at <<env_vars_and_sudo,Environment variables and sudo>>.
+
+==== Adding additional compiler or linker flags
+
+On some systems, C/C++ libraries and headers that Phusion Passenger requires may be located in a non-standard directory. You can force the Phusion Passenger build system to look in those locations by injecting compiler and linker flags using the following environment variables:
+
+`EXTRA_PRE_CFLAGS`::
+	These flags are injected into all C compiler invocations that involve compiling C or C++ source files. This includes compiler invocations that compile *and* link. The flags are injected at the beginning of the command string, even before `EXTRA_PRE_LDFLAGS`.
+`EXTRA_CFLAGS`::
+	Similar to `EXTRA_PRE_CFLAGS`, but injected at the end of the command string, before `EXTRA_LDFLAGS`.
+`EXTRA_PRE_CXXFLAGS`::
+	Similar to `EXTRA_PRE_CFLAGS`, but for C++ compiler invocations.
+`EXTRA_CXXFLAGS`::
+	Similar to `EXTRA_CFLAGS`, but for C++ compiler invocations.
+`EXTRA_PRE_LDFLAGS`::
+	These flags are injected into all C/C++ compiler invocations that involve linking. This includes compiler invocations that compile *and* link. The flags are injected at the beginning of the command string, but after `EXTRA_PRE_CFLAGS` and `EXTRA_PRE_CXXFLAGS`.
+`EXTRA_LDFLAGS`::
+	Similar to `EXTRA_PRE_LDFLAGS`, but injected at the very end of the command string, even after `EXTRA_CFLAGS` and `EXTRA_CXXFLAGS`.
+
+NOTE: If you run the installer with `sudo` then environment variables may not be passed properly. Learn more at <<env_vars_and_sudo,Environment variables and sudo>>.
+
+==== Forcing location of command line tools and dependencies
+
+The Phusion Passenger build system attempts to autodetect many things by locating relevant helper tools. For example, to find out which compiler flags it should use for compiling Apache modules, it locates the `apxs2` command and queries it. To find out which compiler flags it should use for libcurl, it queries the `curl-config` command. These commands may not be in `$PATH`, or even when they are you may want to use a different one.
+
+You can force the build to find certain command line tools at certain locations by using the following environment variables:
+
+`HTTPD`::
+	The location of the `httpd` executable (the Apache server executable).
+`APXS2`::
+	The location of the `apxs2` executable (the Apache module developer tool). Only used by `passenger-install-apache2-module`.
++
+This environment variable, together with `HTTPD`, are what you need to customize if you have multiple Apache installations on your system, or if your Apache is located in a non-standard location which Phusion Passenger cannot detect. By setting `APXS2` and `HTTP` to the right paths, you can force Phusion Passenger to be compiled against that specific Apache installation.
++
+For example, if your Apache installation is located in `/opt/lamp/apache2`, then you can run the installer as follows:
++
+---------------------------------------
+$ sudo bash
+# export HTTPD=/opt/lampp/apache2/bin/apache
+# export APXS2=/opt/lampp/apache2/bin/apxs
+# passenger-install-apache2-module
+---------------------------------------
+`APR_CONFIG`::
+	The location of the `apr-config` executable (the Apache Portable Runtime developer tool).
+`APU_CONFIG`::
+	The location of the `apu-config` executable (the Apache Portable Runtime Utility developer tool).
+`MAKE`::
+	The location of a `make` tool. It does not matter which implementation of `make` this is.
+`GMAKE`::
+	The location of the GNU-compatible `make` tool.
+
+NOTE: If you run the installer with `sudo` then environment variables may not be passed properly. Learn more at <<env_vars_and_sudo,Environment variables and sudo>>.
+
+
+ifdef::apache[]
+[[working_with_apache_conf]]
+=== Working with the Apache configuration file
+
+On most systems the Apache configuration file is located in either '/etc/apache2/httpd.conf' or '/etc/apache2/apache2.conf'. However, to allow better organization, many operating systems and Apache distributions also read configuration files in the 'conf.d', 'mods-enabled' and 'sites-enabled' subdirectories.
+
+'mods-enabled' contains symlinks to files in 'mods-available'. This latter subdirectory contains config files for all available modules, while 'mods-enabled' contains only a subset, namely the modules that should actually be enabled. The symlinks are created using the `a2enmod` tool. '*.load' files contain `LoadModule` directives, while '*.conf' files contain all other configuration directives.
+
+Use 'mods-enabled'/'mods-available' to store Phusion Passenger configuration if you can:
+
+- Create '/etc/apache2/mods-available/passenger.load' and paste the `LoadModule ...` directive that `passenger-install-apache2-module` outputs.
+- Create '/etc/apache2/mods-available/passenger.conf' and paste the `PassengerRoot` and other Phusion Passenger options.
+- Enable by running `sudo a2enmod passenger`.
+
+If the 'mods-enabled' mechanism is not available then you can paste configuration snippets into 'httpd.conf' or 'apache2.conf' directly.
+
+On OS X Server >= 10.8 Mountain Lion the location of the Apache configuration file depends on whether you use Web Services or not. If you do, then the configuration file is in '/Library/Server/Web/Config/apache2/httpd_server_app.conf'. If you do not, then the configuration file is in '/etc/apache2/httpd.conf'.
+endif::[]
+
+
+ifdef::nginx[]
+=== Installing as a normal Nginx module without using the installer
+
+You can also install Phusion Passenger the way you install any other Nginx module, e.g. with `--add-module`. Run Nginx's configure script with `--add-module=/path-to-passenger-root/ext/nginx`.
+
+If you installed Phusion Passenger via the gem, then 'path-to-passenger-root' can be obtained with the command:
+
+--------------------------
+passenger-config --root
+--------------------------
+
+This will probably output something along the lines of '/usr/lib/ruby/gems/1.8/gems/passenger-x.x.x',
+so you'll probably have to specify something like `--add-module=/usr/lib/ruby/gems/1.8/gems/passenger-x.x.x/ext/nginx`.
+
+If you installed Phusion Passenger via a source tarball, then 'path-to-passenger-root'
+is the directory which contains the Phusion Passenger source code. So if you
+extracted the Phusion Passenger source code to '/opt/passenger-x.x.x', then you'll
+have to specify `--add-module=/opt/passenger-x.x.x/ext/nginx`.
+
+After having installed Nginx with Phusion Passenger support, you must paste the following
+line into your Nginx configuration file:
+
+------------------------------------------
+passenger_root /path-to-passenger-root;
+------------------------------------------
+
+After having done so, restart Nginx.
+
+[[nginx_init_script]]
+=== Creating an Nginx init script
+
+If you installed Nginx with one of the generic installation methods then you won't have an init script to start, stop and restart Nginx with. A bare Nginx installation works with signals: you start it by invoking it from the command line, you stop it by sending SIGTERM to it and you gracefully restart it by sending SIGHUP to it.
+
+If you prefer to use an init script then please refer to the following resources:
+
+- link:http://wiki.nginx.org/Nginx-init-ubuntu[Init script for Ubuntu 8.04-9.10]
+- link:http://library.linode.com/web-servers/nginx/installation/ubuntu-12.04-precise-pangolin#sph_create-an-init-script-to-manage-nginx[Init script for Ubuntu 12.04]
+- link:http://wiki.nginx.org/RedHatNginxInitScript[Init script for Red Hat, Fedora and CentOS]
+
+When using one of those init scripts, please make sure that the paths inside the init script are correct. In particular, the paths to the Nginx binary, to the PID file and to the configuration file must match the actual locations of your Nginx installation.
+endif::[]
+
+
+=== Disabling without uninstalling
+
+You can temporarily unload (disable) Phusion Passenger from the web server, without
+uninstalling the Phusion Passenger files, so that the web server behaves as if Phusion
+Passenger was never installed in the first place. This might be useful to you if -
+for example - you seem to be experiencing a problem caused by Phusion Passenger,
+but you want to make sure whether that's actually the case without having
+to through the hassle of uninstalling Phusion Passenger completely. When disabled,
+Phusion Passenger will not occupy any memory or CPU or otherwise interfere with
+the web server.
+
+ifdef::apache[]
+To unload Phusion Passenger from the web server, edit your Apache configuration file(s)
+and comment out:
+
+- all Phusion Passenger configuration directives.
+- the `LoadModule passenger_module` directive.
+
+For example, if your configuration file looks like this...
+
+-----------------------------------
+Listen *:80
+NameVirtualHosts *:80
+....
+
+LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so
+
+PassengerRoot /somewhere/passenger/x.x.x
+PassengerDefaultRuby /usr/bin/ruby
+PassengerMaxPoolSize 10
+
+<VirtualHost *:80>
+    ServerName www.foo.com
+    DocumentRoot /webapps/foo/public
+    RailsBaseURI /rails
+</VirtualHost>
+-----------------------------------
+
+...then comment out the relevant directives, so that it looks like this:
+
+-----------------------------------
+Listen *:80
+NameVirtualHosts *:80
+....
+
+# LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so
+
+# PassengerRoot /somewhere/passenger/x.x.x
+# PassengerDefaultRuby /usr/bin/ruby
+# PassengerMaxPoolSize 10
+
+<VirtualHost *:80>
+    ServerName www.foo.com
+    DocumentRoot /webapps/foo/public
+    # RailsBaseURI /rails
+</VirtualHost>
+-----------------------------------
+endif::[]
+ifdef::nginx[]
+To unload Phusion Passenger, edit your Nginx configuration file(s)
+and comment out all Phusion Passenger configuration directives.
+
+For example, if your configuration file looks like this...
+
+-----------------------------------
+...
+
+http {
+    passenger_root /somewhere/passenger-x.x.x;
+    passenger_ruby /usr/bin/ruby;
+    passenger_max_pool_size 10;
+
+    gzip on;
+
+    server {
+        server_name www.foo.com;
+        listen 80;
+        root /webapps/foo/public;
+        passenger_enabled on;
+    }
+}
+-----------------------------------
+
+...then comment out the relevant directives, so that it looks like this:
+
+-----------------------------------
+...
+
+http {
+    # passenger_root /somewhere/passenger-x.x.x;
+    # passenger_ruby /usr/bin/ruby;
+    # passenger_max_pool_size 10;
+
+    gzip on;
+
+    server {
+        server_name www.foo.com;
+        listen 80;
+        root /webapps/foo/public;
+        # passenger_enabled on;
+    }
+}
+-----------------------------------
+endif::[]
+
+After you've done this, save the configuration file and restart the web server.
+
+[[uninstalling]]
+=== Uninstalling
+
+To uninstall Phusion Passenger, please first remove all Phusion Passenger
+configuration directives from your web server configuration file(s). After you've
+done this, you need to remove the Phusion Passenger files.
+
+- If you installed Phusion Passenger via a Ruby gem, then run `gem uninstall passenger` (or, if you're a link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] user, `gem uninstall passenger-enterprise-server`).
+  You <<is_ruby_home_or_system_wide_installed,might have to run this as root>>.
+- If you installed Phusion Passenger via a source tarball, then remove the directory
+  in which you placed the extracted Phusion Passenger files. This directory is the
+  same as the one pointed to the by `PassengerRoot`/`passenger_root` configuration directive.
+- If you installed Phusion Passenger through APT or YUM, then use them to uninstall Phusion Passenger.
+
+ifdef::nginx[]
+Nginx does not have to be recompiled. Altough it contains Phusion Passenger code, it will not do anything when all Phusion Passenger configuration directives are removed.
+endif::[]
+
+
+[[moving_phusion_passenger]]
+=== Moving to a different directory
+
+If you installed Phusion Passenger through a tarball then you can move the Phusion Passenger directory to another location. This is not possible if you used any of the other installation methods.
+
+First, move the directory to whereever you like:
+
+--------------------------------------------------------------
+mv /opt/passenger/passenger-4.0.0 /usr/local/passenger-4.0.0
+--------------------------------------------------------------
+
+Next you must tell your web server that Phusion Passenger has moved.
+ifdef::apache[]
+Open your <<working_with_apache_conf,Apache configuration file>> and set the 'PassengerRoot' directive to the new location:
+
+---------------------------------------------
+PassengerRoot /usr/local/passenger-4.0.0
+---------------------------------------------
+endif::[]
+ifdef::nginx[]
+Open your Nginx configuration file and set the 'passenger_root' directive to the new location:
+
+---------------------------------------------
+passenger_root /usr/local/passenger-4.0.0
+---------------------------------------------
+endif::[]
+
+Restart your web server to finalize the change.
diff --git a/doc/users_guide_snippets/passenger_spawn_method.txt b/doc/users_guide_snippets/passenger_spawn_method.txt
index bf71150..50b32d3 100644
--- a/doc/users_guide_snippets/passenger_spawn_method.txt
+++ b/doc/users_guide_snippets/passenger_spawn_method.txt
@@ -3,47 +3,35 @@ requests. But there are multiple ways with which processes can be spawned, each
 its own set of pros and cons. Supported spawn methods are:
 
 'smart'::
-When this spawn method is used, Phusion Passenger will attempt to cache any
-framework code (e.g. Ruby on Rails itself) and application code for a limited
-period of time. Please read <<spawning_methods_explained,Spawning methods explained>>
-for a more detailed explanation of what smart spawning exactly does.
-+
-*Pros:*
-This can significantly decrease spawn time (by as much as 90%). And, when Ruby Enterprise
-Edition is used, <<reducing_memory_usage,memory usage can be reduced by 33% on average>>.
-+
-*Cons:*
-Some applications and libraries are not compatible with smart spawning.
-If that's the case for your application, then you should use 'conservative' as
-spawning method. Please read <<spawning_methods_explained,Spawning methods explained>>
-for possible compatibility issues.
-
-'smart-lv2'::
-This spawning method is similar to 'smart' but it skips the framework spawner
-and uses the application spawner directly. This means the framework code is not
-cached between multiple applications, although it is still cached within
+This spawning method caches code using the app preloader. Framework code is not
+cached between multiple applications, although it is cached within
 instances of the same application. Please read
 <<spawning_methods_explained,Spawning methods explained>> for a more detailed
-explanation of what smart-lv2 spawning exactly does.
+explanation of what smart spawning exactly does.
 +
-*Pros:* It is compatible with a larger number of applications when compared to
-the 'smart' method, and still performs some caching.
+*Pros:*
+Smart spawning caches code where possible to speed up the respawn process
+and is compatible with most applications
 +
-*Cons:* It is slower than smart spawning if you have many applications which
-use the same framework version. It is therefore advised that shared hosts use the
-'smart' method instead.
+*Cons:*
+It is possible that it may be incompatible with some applications
 
-'conservative'::
+'direct'::
 This spawning method is similar to the one used in Mongrel Cluster. It does not
 perform any code caching at all. Please read
 <<spawning_methods_explained,Spawning methods explained>> for a more detailed
-explanation of what conservative spawning exactly does.
+explanation of what direct spawning exactly does.
 +
 *Pros:*
-Conservative spawning is guaranteed to be compatible with all applications
+Direct spawning is guaranteed to be compatible with all applications
 and libraries.
 +
 *Cons:*
 Much slower than smart spawning. Every spawn action will be equally slow, though no slower than
-the startup time of a single server in Mongrel Cluster. Conservative spawning will also
-render <<reducing_memory_usage,Ruby Enterprise Edition's memory reduction technology>> useless.
\ No newline at end of file
+the startup time of a single server in Mongrel Cluster. Direct spawning will also
+render <<reducing_memory_usage,Ruby Enterprise Edition's memory reduction technology>> useless.
+
+************************************************
+As of Passenger 3.2, 'conservative' spawning was renamed to 'direct' and 'smart-lv2' was renamed
+to 'smart'. The old 'smart' spawning has been removed in favor of the new version.
+************************************************
diff --git a/doc/users_guide_snippets/rackup_specifications.txt b/doc/users_guide_snippets/rackup_specifications.txt
index 16346af..2879b85 100644
--- a/doc/users_guide_snippets/rackup_specifications.txt
+++ b/doc/users_guide_snippets/rackup_specifications.txt
@@ -65,6 +65,10 @@ run Ramaze::Adapter::Base
 ------------------------------------------------------
 require 'rubygems'
 require 'sinatra'
+
+set :environment, ENV['RACK_ENV'].to_sym
+disable :run, :reload
+
 require 'app.rb'
 
 run Sinatra::Application
diff --git a/doc/users_guide_snippets/rvm_helper_tool.txt b/doc/users_guide_snippets/rvm_helper_tool.txt
new file mode 100644
index 0000000..2b58cbf
--- /dev/null
+++ b/doc/users_guide_snippets/rvm_helper_tool.txt
@@ -0,0 +1,56 @@
+.RVM helper tool
+
+Phusion Passenger provides the `passenger-config --ruby-command` tool for figuring out the correct command for invoking a specific Ruby interpreter. This is especially useful for RVM users. Suppose that you have both Ruby 1.8.7 and Ruby 1.9.3 installed through RVM, and you want to know the correct commands for each Ruby interpreter.
+
+For this purpose we'll want to invoke `passenger-config` using its full path, because each time you `rvm use` a different Ruby interpreter, RVM changes `$PATH`. If you did not install Phusion Passenger through the generic tarball installation method, then here's how you can figure out where `passenger-config` is:
+
+------------------------------
+$ which passenger-config
+/opt/passenger/bin/passenger-config
+------------------------------
+
+Now, switch to all the RVM Ruby interpreters you want to use. In each interpreter, invoke `passenger-config --ruby-command`. For Ruby 1.8.7:
+
+------------------------------
+$ rvm use 1.8.7
+$ /opt/passenger/bin/passenger-config --ruby-command
+passenger-config was invoked through the following Ruby interpreter:
+  Command: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  Version: ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
+  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby /opt/passenger/bin/passenger start
+
+The following Ruby interpreter was found first in $PATH:
+  Command: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  Version: ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
+  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
+  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby /opt/passenger/bin/passenger start
+
+## Notes for RVM users
+Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'.
+------------------------------
+
+Then, for Ruby 1.9.3:
+
+------------------------------
+$ rvm use 1.9.3
+$ /opt/passenger/bin/passenger-config --ruby-command
+passenger-config was invoked through the following Ruby interpreter:
+  Command: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  Version: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
+  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby /opt/passenger/bin/passenger start
+
+The following Ruby interpreter was found first in $PATH:
+  Command: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  Version: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
+  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
+  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby /opt/passenger/bin/passenger start
+
+## Notes for RVM users
+Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'.
+------------------------------
\ No newline at end of file
diff --git a/doc/users_guide_snippets/since_version.txt b/doc/users_guide_snippets/since_version.txt
new file mode 100644
index 0000000..945741a
--- /dev/null
+++ b/doc/users_guide_snippets/since_version.txt
@@ -0,0 +1 @@
+**Introduced in version {version}.**
\ No newline at end of file
diff --git a/doc/users_guide_snippets/support_information.txt b/doc/users_guide_snippets/support_information.txt
new file mode 100644
index 0000000..65b63b3
--- /dev/null
+++ b/doc/users_guide_snippets/support_information.txt
@@ -0,0 +1,27 @@
+=== Supported operating systems ===
+
+Phusion Passenger works on any POSIX-compliant operating system. In other
+words: practically any operating system on earth, except Microsoft Windows.
+
+Phusion Passenger is confirmed on a large number of operating systems and Linux
+distributions, including, but not limited to, Ubuntu, Debian, CentOS/Fedora/RHEL,
+Gentoo, Mac OS X, FreeBSD and Solaris. OpenBSD is supported since version 5.2.
+Both 32-bit and 64-bit platforms are supported.
+
+Please
+link:http://code.google.com/p/phusion-passenger/issues/list[report a bug]
+or
+link:http://groups.google.com/group/phusion-passenger[join our discussion forum]
+if it doesn't work on your POSIX-compliant operating system.
+
+=== Where to get support ===
+
+* link:http://groups.google.com/group/phusion-passenger[Discussion forum] - post a
+  message here if you're experiencing problems. Support on this forum is provided by the community on a best-effort basis, so a (timely) response is not guaranteed.
+* link:http://code.google.com/p/phusion-passenger/issues/list[Issue tracker] - report
+  bugs here.
+* Email support at phusion.nl if you are a link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] customer. Please mention your order reference. If you are not an Enterprise customer, we kindly redirect you to the community discussion forum instead.
+* link:https://www.phusionpassenger.com/commercial_support[Commercial support contracts] are also available.
+* Report security vulnerabilities to security at phusion.nl. We will do our best to respond to you as quickly as we can, so please do not disclose the vulnerability until then.
+
+Please consult link:https://www.phusionpassenger.com/support[the Phusion Passenger website] for a full list of support resources.
diff --git a/doc/users_guide_snippets/tips.txt b/doc/users_guide_snippets/tips.txt
index b6677ae..74797e8 100644
--- a/doc/users_guide_snippets/tips.txt
+++ b/doc/users_guide_snippets/tips.txt
@@ -1,27 +1,53 @@
 [[user_switching]]
-=== User switching (security) ===
+=== User Switching (security feature) ===
 
+Phusion Passenger supports automatic 'user switching': by default, it attempts to run applications as the "right" user, instead of running all applications as the same user.
+
+To better understand the problem, let us consider the situation with PHP.
 There is a problem that plagues most PHP web hosts, namely the fact that all PHP
 applications are run in the same user context as the web server. So for
 example, Joe's PHP application will be able to read Jane's PHP application's
 passwords. This is obviously undesirable on many servers.
 
-Phusion Passenger solves this problem by implementing 'user switching'. A Rails
-application is started as the owner of the file 'config/environment.rb',
-and a Rack application is started as the owner of the file 'config.ru'.
-So if '/home/webapps/foo/config/environment.rb' is owned by 'joe', then Phusion
-Passenger will launch the corresponding Rails application as 'joe' as well.
-
-This behavior is the default, and you don't need to configure anything. But
-there are things that you should keep in mind:
-
-- The owner of 'environment.rb'/'config.ru' must have read access to the application's
-  root directory, and read/write access to the application's 'logs' directory.
-- This feature is only available if Apache is started by 'root'. This is the
-  case on most Apache installations.
-- Under no circumstances will applications be run as 'root'. If
-  'environment.rb'/'config.ru' is owned as root or by an unknown user, then the
-  Rails/Rack application will run as the user specified by
+Phusion Passenger's 'user switching' feature solves this problem. Applications are
+run as the owner of their "startup file". For Ruby apps, the startup file is
+`config.ru` (Rack and Rails >= 3) or `config/environment.rb` (Rails 1 and 2). For
+Python apps, the startup file is `passenger_wsgi.py`. So suppose that `config.ru`
+is owned by user 'joe', then Phusion Passenger will spawn the corresponding
+application as 'joe' as well. The exact rules are a little bit more complicated,
+and they're explained further down in this section.
+
+==== Requirements
+
+User switching is only enabled when all of the following conditions are met:
+
+- When not using <<flying_passenger,Flying Passenger>> (this is probably the case):
+  * The
+ifdef::apache[]
+  <<PassengerUserSwitching,PassengerUserSwitching>>
+endif::[]
+ifdef::nginx[]
+  <<PassengerUserSwitching,passenger_user_switching>>
+endif::[]
+option must be enabled.
+  * The web server's control process must have root privileges. This is the case on most installations.
+- When using <<flying_passenger,Flying Passenger>>:
+  * The Flying Passenger daemon must be run with root privileges.
+
+==== Effects
+
+When not using Flying Passenger, the following table illustrates the effect for different combinations of the requirements.
+
+|==========================================================
+ifdef::apache[]
+|                                   | **PassengerUserSwitching on**   | **PassengerUserSwitching off**
+endif::[]
+ifdef::nginx[]
+|                                   | **passenger_user_switching on** | **passenger_user_switching off**
+endif::[]
+| **Web server has root privileges**
+  | User switching enabled.
+  | User switching disabled. Apps are run as
 ifdef::apache[]
   <<PassengerDefaultUser,PassengerDefaultUser>> and
   <<PassengerDefaultGroup,PassengerDefaultGroup>>.
@@ -30,21 +56,107 @@ ifdef::nginx[]
   <<PassengerDefaultUser,passenger_default_user>> and
   <<PassengerDefaultGroup,passenger_default_group>>.
 endif::[]
+| **Web server has no root privileges**
+  | User switching disabled. Apps are run as the web server's user.
+  | User switching disabled. Apps are run as the web server's user.
+|==========================================================
+
+When using Flying Passenger, the effect is as follows:
 
-User switching can be disabled with the
-ifdef::apache[<<PassengerUserSwitching,PassengerUserSwitching>>]
-ifdef::nginx[<<PassengerUserSwitching,passenger_user_switching>>]
-option.
+|==========================================================
+| **Daemon run with root privileges** | User switching enabled.
+| **Daemon run without root privileges** | User switching disabled. Apps are run as the daemon's user.
+|==========================================================
+
+When user switching is enabled, the following rules are followed to determine what user an application should be run as. The first matching rule is the rule that will be followed.
+
+1. If
+ifdef::apache[]
+  <<PassengerUser,PassengerUser>> or
+  <<PassengerGroup,PassengerGroup>>
+endif::[]
+ifdef::nginx[]
+  <<PassengerUser,passenger_user>> or
+  <<PassengerGroup,passenger_group>>
+endif::[]
+are set, then the application will be run as the specified user/group. Thus, these options are a good way to override user switching settings.
+2. If the startup file is owned by root or an unknown user, then the application will run as the user specified by
+ifdef::apache[]
+  <<PassengerDefaultUser,PassengerDefaultUser>> and
+  <<PassengerDefaultGroup,PassengerDefaultGroup>>.
+endif::[]
+ifdef::nginx[]
+  <<PassengerDefaultUser,passenger_default_user>> and
+  <<PassengerDefaultGroup,passenger_default_group>>.
+endif::[]
+3. Otherwise, the application is run as the owner of the startup file.
+
+==== Caveats & troubleshooting
+
+If your application regularly encounters permission errors or fails to find certain files, then this is an indication that your application is started as a user that you did not intent it to be run as. Other symptoms include:
+
+- The application fails to start because Bundler complains that it cannot find gems. This probably indicates that Bundler does not have read access to the directory that contains Bundler-installed gems.
+- The application fails to start and its error message mentions the path '/nonexistent'. This probably indicates that your application is started as the 'nobody' user. This is because on many systems, the 'nobody' user's home directory is '/nonexistent'.
+
+To check whether it is indeed the case that your application is started as a different user than you intended to, see <<finding_out_app_user,Finding out what user an application is running as>>.
+
+The most likely reason why your application is started as 'nobody' is probably because your startup file is owned by 'root', by 'nobody' or by an unknown user. To fix this, change the owner of the startup file to the owner that you want to run the application as.
+
+Whatever user your application runs as, it must have read access to the <<application_root,application root>>, and read/write access to the application's 'logs' directory.
+
+[[finding_out_app_user]]
+==== Finding out what user an application is running as
+
+To find our what user an application is started as, first access its URL in your browser so that Phusion Passenger starts the application. For example:
+
+----------------------------------
+http://www.example.local/
+----------------------------------
+
+The application will now either successfully start or fail to start. If it fails to start then you will see an error page that tells you what user the application was being started as. If you do not see the error page in the browser then set
+ifdef::apache[]
+  <<PassengerFriendlyErrorPages,PassengerFriendlyErrorPages>>
+endif::[]
+ifdef::nginx[]
+  <<PassengerFriendlyErrorPages,passenger_friendly_error_pages>>
+endif::[]
+on.
+
+If the application successfully started, then run `passenger-status` to find the process's PID:
+
+------------------------------------------------
+.---------- General information -----------
+Max pool size : 6
+Processes     : 1
+Requests in top-level queue : 0
+
+.---------- Application groups -----------
+/webapps/example.local#default:
+  App root: /webapps/example.local
+  Requests in queue: 0
+  * PID: 16915   Sessions: 0       Processed: 1       Uptime: 2s
+    CPU: 0%      Memory  : 9M      Last used: 2s ago
+------------------------------------------------
+
+In the above example we see that the PID is 16915. Next, use 'ps' to find out the user that it is running as:
+
+--------------------------------------------------
+# ps -o pid,user,comm -p 16915
+  PID USER    COMM
+16915 phusion Passenger RackApp: /webapps/example.local
+--------------------------------------------------
+
+As you can see, the application in this example is being run as user 'phusion'.
 
 
 [[reducing_memory_usage]]
-=== Reducing memory consumption of Ruby on Rails applications by 33% ===
+=== Copy-on-write memory support (reducing memory consumption of Ruby applications) ===
 
-Is it possible to reduce memory consumption of your Rails applications by 33% on average,
-by using http://www.rubyenterpriseedition.com/[Ruby Enterprise Edition].
-Please visit the website for details.
+Phusion Passenger automatically leverages operating system virtual memory copy-on-write features in order to reduce the memory usage of Ruby applications. Experience has shown that this reduces memory usage by 33% on average. For this mechanism to work, a Ruby interpreter with a copy-on-write friendly garbage collector is required. The following Ruby interpreters have copy-on-write friendly garbage collectors:
+
+- MRI Ruby >= 2.0. Versions prior to 2.0 did not have a copy-on-write friendly garbage collector.
+- http://www.rubyenterpriseedition.com/[Ruby Enterprise Edition], which was Phusion's branch of MRI Ruby 1.8 with a copy-on-write friendly garbage collector and other enhancement. It has reached End-Of-Life as of 2012, but remains available for legacy systems.
 
-Note that this feature does not apply to Rack applications.
 
 [[capistrano]]
 === Capistrano recipe ===
@@ -86,7 +198,10 @@ end
 === Bundler support ===
 
 Phusion Passenger has automatic support for link:http://gembundler.com/git.html[Bundler].
-It works as follows:
+The support consists of loading your application under the environment defined by your
+Gemfile. In other words, Phusion Passenger loads your application as if 'bundle exec' was used.
+
+The Bundler support works as follows:
 
 - If you have a '.bundle/environment.rb' in your application root, then Phusion
   Passenger will require that file before loading your application.
@@ -104,33 +219,23 @@ have any negative effects.
 Phusion Passenger assumes that you're using Bundler >= 0.9.5. If you don't want Phusion
 Passenger to run its Bundler support code, e.g. because you need to use an older version
 of Bundler with an incompatible API or because you use a system other than Bundler, then
-you can override Phusion Passenger's Bundler support code by creating a file
+you can override Phusion Passenger's Bundler support code by creating an empty file
 'config/setup_load_paths.rb'. If this file exists then it will be required before loading
 the application startup file. In this file you can do whatever you need to setup Bundler
 or a similar system.
 
+[[add_passenger_to_gemfile]]
+==== Does Phusion Passenger itself need to be added to the Gemfile?
 
-[[moving_phusion_passenger]]
-=== Moving Phusion Passenger to a different directory ===
-
-It is possible to relocate the Phusion Passenger files to a different directory. It
-involves two steps:
+It is never necessary to add Phusion Passenger to the application's Gemfile. In case of Phusion Passenger Standalone, it is not necessary to execute the `passenger` command through `bundle exec`. The reason for this is because Phusion Passenger automatically loads the Gemfile environment. Most other Ruby application servers do not automatically load the Gemfile environment, which is why they must be added to the Gemfile and be executed with `bundle exec`.
 
-1. Moving the directory.
-2. Updating the ``PassengerRoot'' configuration option in Apache.
+Even when your application uses any of the Phusion Passenger APIs, you still do not need to add Phusion Passenger to the Gemfile. The only thing you need to do is to put Phusion Passenger API calls inside `if` blocks that check whether Phusion Passenger is active, by checking whether the `PhusionPassenger` namespace is defined:
 
-For example, if Phusion Passenger is located in '/opt/passenger/', and you'd like to
-move it to '/usr/local/passenger/', then do this:
-
-1. Run the following command:
-+
-------------------------------------
-mv /opt/passenger /usr/local/passenger
+[code,ruby]
 ------------------------------------
-2. Edit your Apache configuration file, and set:
-+
-------------------------------------
-PassengerRoot /usr/local/passenger
+if defined?(PhusionPassenger)
+    ...
+end
 ------------------------------------
 
 === Installing multiple Ruby on Rails versions ===
@@ -158,11 +263,14 @@ check for this file's timestamp: Phusion Passenger will always restart the
 application, as long as 'always_restart.txt' exists.
 
 NOTE: If you're just developing a Rails application then you probably don't need
-this feature. If you set 'RailsEnv development' in your Apache configuration,
+this feature. If you set
+ifdef::apache['RailsEnv development']
+ifdef::nginx['rails_env development']
+in your web server configuration,
 then Rails will automatically reload your application code after each request.
-'always_restart.txt' is only useful if you're working on Ruby on Rails itself,
-or when you're not developing a Rails application and your web framework
-does not support code reloading.
+'always_restart.txt' is mostly useful when you're using a web framework that
+doesn't support code reloading by itself, of when you're working on a web framework
+yourself.
 
 [[sub_uri_deployment_uri_fix]]
 === How to fix broken images/CSS/JavaScript URIs in sub-URI deployments
@@ -204,4 +312,240 @@ so that your images will always work no matter what sub-URI you've deployed to.
 These helper methods are more valuable than you may think. For example they also
 append a timestamp to the URI to better facilitate HTTP caching. For more information,
 please refer to
-link:http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html[the Rails API docs].
\ No newline at end of file
+link:http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html[the Rails API docs].
+
+=== Out-of-Band Garbage Work and Out-of-Band Garbage Collection
+
+**Available since Phusion Passenger 4.0.0.**
+
+**At this time, this feature is only available on Ruby.**
+
+The Out-of-Band Work feature allows you to run arbitrary long-running tasks outside normal request cycles. This works by letting current requests to the process finish, then telling the process to perform the out-of-band work, then resuming passing requests to the process after said work is finished.
+
+A specific (and perhaps primary) use case of of Out-of-Band Work is *Out-of-Band Garbage Collection*. The garbage collector is run outside normal request cycles so that garbage collection runs inside normal request cycles can finish a lot faster. This can potentially save tens to hundreds of milliseconds of latency in requests.
+
+Because Out-of-Band Work is implemented at the Phusion Passenger inter-process request routing level, and not by, say, spawning a thread inside the application process, Out-of-Band Work has the following useful properties:
+
+- It works well even with tasks that can pause all threads. The MRI Ruby garbage collector is a stop-the-world mark-and-sweep garbage collector.
+- Phusion Passenger can spawn more processes as necessary, in order to prevent situations in which all application processes are busy performing out-of-band work. Phusion Passenger guarantees that there's at least one process that's ready to process requests.
+
+Applications can use Out-of-Band Work as follows:
+
+1. Request out-of-band work by outputting the `X-Passenger-Request-OOB-Work` header during a request. It does not matter what the value is. At this time, it is not possible to request out-of-band work from outside requests.
+2. You can actually perform out-of-band work when you receive a `:oob_work` Phusion Passenger event.
+
+Note that even though you can request out-of-band work, there's no guarantee that Phusion Passenger will send an `oob_work` event in a timely manner, if at all. It is also possible that Phusion Passenger sends an `oob_work` event without you ever having requested one. This latter could for example happen if the OOB work is administrator-initiated. Do not make any assumptions in your code.
+
+Here's an example which implements out-of-band garbage collection using the Out-of-Band framework. This example code doesn't do anything when the code is not being run in Phusion Passenger, thanks to the `if` block.
+
+[source, ruby]
+-------------------------------------------------
+# Somewhere in a controller method:
+# Tell Phusion Passenger we want to perform OOB work.
+response.headers["X-Passenger-Request-OOB-Work"] = "true"
+
+# Somewhere during application initialization:
+if defined?(PhusionPassenger)
+    PhusionPassenger.on_event(:oob_work) do
+        # Phusion Passenger has told us that we're ready to perform OOB work.
+        t0 = Time.now
+        GC.start
+        Rails.logger.info "Out-Of-Bound GC finished in #{Time.now - t0} sec"
+    end
+end
+-------------------------------------------------
+
+For your convenience, Phusion Passenger provides a Rack middleware for out-of-band garbage collection. Add the following to your `config.ru`. Likewise, this example code doesn't do anything when the code is not being run in Phusion Passenger, thanks to the `if` block.
+
+[source, ruby]
+----------------------------------------------------
+if defined?(PhusionPassenger)
+    require 'phusion_passenger/rack/out_of_band_gc'
+    
+    # Trigger out-of-band GC every 5 requests.
+    use PhusionPassenger::Rack::OutOfBandGc, 5
+end
+----------------------------------------------------
+
+It should be noted that, although the application uses the Phusion Passenger API, it is <<add_passenger_to_gemfile,*not* necessary to add Phusion Passenger to the Gemfile>>.
+
+References:
+
+- link:http://blog.phusion.nl/2013/01/22/phusion-passenger-4-technology-preview-out-of-band-work/[The Phusion Blog article which first introduced this feature.]
+
+[[flying_passenger]]
+=== Flying Passenger
+:version: 4.0.6
+include::enterprise_only.txt[]
+
+Flying Passenger allows one to decouple Phusion Passenger's life time from the web server's life time, so that the web server can be independently restarted from Phusion Passenger, and from any of the application processes served by Phusion Passenger.
+
+Normally, Phusion Passenger starts together with the web server, and shuts down together with the web server. The advantages of this default behavior is that it makes Phusion Passenger easy to administer: one only has to deal with the web server process and can expect all relevant processes to be cleaned up after a web server shut down. However this also brings about a disadvantage: every time one restarts the web server (e.g. to make a minor configuration change), Phusion Passenger and  [...]
+
+This problem is solved by 'Flying Passenger', which is an advanced mode of operation in Phusion Passenger that allows the web server to be indepedently restarted from Phusion Passenger. When this mode is enabled:
+
+- One must start Phusion Passenger separately from the web server, namely by starting the Flying Passenger daemon. This daemon must - to an extent - be separately configured and managed from the web server.
+- The web server must be configured to forward requests to the Flying Passenger daemon.
+- You should beware of the <<flying_passenger_caveats,caveats and limitations>>.
+
+==== Requirements
+
+At this time, this feature is **only available in the Enterprise version of Phusion Passenger for Nginx**. You must have Phusion Passenger for Nginx properly installed.
+
+==== Basic usage
+
+Start the Flying Passenger daemon by invoking the `flying-passenger` command. The only required option is `--socket-file`. Depending on whether you wish to enable <<user_switching,User Switching>>, you have to start `flying-passenger` with root privileges or not.
+
+-------------------
+$ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock
+I, [2013-06-14T09:10:13.095339 #77179]  INFO -- : Welcome to Flying Passenger 4.1.0
+I, [2013-06-14T09:10:13.095339 #77179]  INFO -- : Starting PassengerWatchdog...
+I, [2013-06-14T09:10:13.097036 #77179]  INFO -- : PassengerWatchdog started on PID 77181
+...
+I, [2013-06-14T09:10:13.129017 #77179]  INFO -- : PassengerWatchdog initialized properly
+I, [2013-06-14T09:10:13.129127 #77179]  INFO -- : Flying Passenger up and listening on /var/run/flying-passenger.sock!
+-------------------
+
+Now configure Phusion Passenger for Nginx to make use of the Flying Passenger daemon, by setting the `passenger_fly_with` option to the socket filename:
+
+-------------------
+http {
+    ...
+    passenger_fly_with /var/run/flying-passenger.sock;
+    ...
+}
+-------------------
+
+After (re)starting Nginx, Nginx + Flying Passenger is fully operational:
+
+-------------------
+$ sudo /path-to/nginx
+-------------------
+
+You can test it by adding a virtual host for a web app:
+
+-------------------
+http {
+    ...
+
+    server {
+        listen 80;
+        server_name www.foo.local;
+        root /webapps/foo/public;
+        passenger_enabled on;
+    }
+}
+-------------------
+
+Verify that it works by making an HTTP request to it:
+
+---------------------------------
+$ curl http://www.foo.local/
+---------------------------------
+
+Now let's verify that restarting the web server does not restart the just-spawned application process. Run `passenger-status` to obtain the PID of the application process:
+
+---------------------------------
+$ sudo passenger-status
+Version: 4.1.0
+Date   : 2013-06-14 09:21:51 -0400
+.---------- General information -----------
+Max pool size : 6
+Processes     : 1
+Requests in top-level queue : 0
+
+.---------- Application groups -----------
+/webapps/foo#default:
+  App root: /webapps/foo
+  Requests in queue: 0
+  * PID: 77283   Sessions: 0       Processed: 1       Uptime: 2s
+    CPU: 1%      Memory  : 8M      Last used: 2s ago
+---------------------------------
+
+As you can see, the PID of the application process is **77283**. Now let's see what happens if we restart Nginx:
+
+------------------------
+$ sudo /path-to/nginx -s stop
+$ sudo /path-to/nginx
+$ sudo passenger-status
+------------------------
+
+The application process should remain there, unchanged:
+
+---------------------------------
+$ sudo passenger-status
+Version: 4.1.0
+Date   : 2013-06-14 09:21:51 -0400
+.---------- General information -----------
+Max pool size : 6
+Processes     : 1
+Requests in top-level queue : 0
+
+.---------- Application groups -----------
+/webapps/foo#default:
+  App root: /webapps/foo
+  Requests in queue: 0
+  * PID: 77283   Sessions: 0       Processed: 1       Uptime: 18s
+    CPU: 1%      Memory  : 8M      Last used: 18s ago
+---------------------------------
+
+[[configuring_flying_passenger]]
+==== Configuring Flying Passenger
+
+Flying Passenger gets *some* configuration from the web server, but not all. In particular, most web server directives that are only valid in the `http` context, e.g. <<PassengerLogLevel,passenger_log_level>>, have no effect when using Flying Passenger. Instead, you are supposed to pass these configuration directives through command line options to the Flying Passenger daemon. Configuration directives that have no effect on Flying Passenger are documented as such. You can assume that con [...]
+
+For example, to achieve the same effect as setting passenger_log_level to 2, run the Flying Passenger daemon as follows:
+
+----------------------------------
+$ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock --log-level=2
+----------------------------------
+
+Currently, not all configuration directives have a Flying Passenger equivalent. Run the following command to see an overview of available options:
+
+----------------------------
+$ flying-passenger --help
+----------------------------
+
+==== Managing the Flying Passenger daemon
+
+The Flying Passenger daemon runs in the foreground by default. This is undesirable on server environments. You can make it go into the background by passing `--daemonize`, `--log-file` and `--pid-file`:
+
+--------------------------------------------------------------------------------
+$ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock \
+    --daemonize --log-file=/var/log/flying-passenger.log \
+    --pid-file=/var/run/flying-passenger.pid
+--------------------------------------------------------------------------------
+
+You can shut down a Flying Passenger daemon by sending SIGINT or SIGTERM to it:
+
+--------------------------------------------------------------------------------
+$ kill `cat /var/run/flying-passenger.pid`
+--------------------------------------------------------------------------------
+
+We recommend using link:http://cr.yp.to/daemontools.html[daemontools] or link:http://smarden.org/runit/[runit] for managing the Flying Passenger daemon. These tools will allow automatically starting the Flying Passenger daemon at boot, and will automatically restart the daemon if it crashes. You can create and enable a daemontools/runit service as folows:
+
+--------------------------------
+$ sudo mkdir /etc/service/flying-passenger
+$ sudo nano /etc/service/flying-passenger/run
+#!/bin/sh
+exec /path-to/flying-passenger \
+    --socket-file=/var/run/flying-passenger.sock \
+    --log-file=/var/log/flying-passenger.log \
+    --pid-file=/var/run/flying-passenger.pid
+--------------------------------
+
+Immediately after creating the `run` file, daemontools/runit automatically runs it to start the daemon. Note that the location (`/etc/service`) depends on the OS or Linux distros. Sometimes it's `/service`. Also note that we start the Flying Passenger daemon without `--daemonize`.
+
+To shut down a daemontools/runit-managed daemon, you need to use `svc -d /etc/service/flying-passenger` (daemontools) or `sv stop /etc/service/flying-passenger` (runit) instead of sending a signal to the process.
+
+[[flying_passenger_caveats]]
+==== Caveats and limitations
+
+Beware of the following caveats and limitations when using Flying Passenger:
+
+- The Nginx executable **must** be compiled with the same version of Phusion Passenger as the Flying Passenger daemon. Failing to meet this requirement may result in cryptic errors, or may result in certain features not working, until you've fixed the situation. When upgrading Phusion Passenger, you must restart both Nginx and the Flying Passenger daemon.
+- The <<PassengerRoot,passenger_root>> directive has no effect. When using Flying Passenger, you are not supposed to set `passenger_root`.
+- When you add a new application to the web server configuration, Flying Passenger will automatically pick up the application's settings and spawn this new application upon the first request to it. However it is not capable of automatically starting the new app before a request has been sent to it (i.e. <<PassengerPreStart,passenger_pre_start>>-like behavior is not available in this case). As a workaround, you can send an HTTP request to your application after starting the daemon, which  [...]
+- When you remove an application from the web server configuration, Flying Passenger will not detect the removal and will not shut down the associated application processes. Killing the application processes will also not help, because Flying Passenger will restart them per the (now-removed, but still in the Flying Passenger daemon's memory) <<PassengerMinInstances,passenger_min_instances>> settings. At the moment, there are two ways to get rid of those processes:
+  * Before removing the application from the web server configuration, explicitly set its `passenger_min_instances` to 0. Next, send a request to it, which will cause the Flying Passenger daemon to take over the new `passenger_min_instances 0` option. You can then proceed with removing the application from the web server configuration, and restarting the web server. Finally, kill the PIDs associated to those application processes and remove the application configuration.
+  * Restart the Flying Passenger daemon.
diff --git a/doc/users_guide_snippets/under_the_hood/page_caching_support.txt b/doc/users_guide_snippets/under_the_hood/page_caching_support.txt
index 7cfbafc..87173cb 100644
--- a/doc/users_guide_snippets/under_the_hood/page_caching_support.txt
+++ b/doc/users_guide_snippets/under_the_hood/page_caching_support.txt
@@ -9,10 +9,10 @@ For example, suppose that the browser requests '/foo/bar'.
 
 1. Phusion Passenger will first check whether this URI maps to a static file, i.e.
    whether the file 'foo/bar' exists in the web application's 'public' directory.
-   If it does then Phusion Passenger will serve this file through Apache immediately.
+   If it does then Phusion Passenger will serve this file through the web server immediately.
 2. If that doesn't exist, then Phusion Passenger will check whether the file
    'foo/bar.html' exists. If it does then Phusion Passenger will serve this file
-   through Apache immediately.
+   through the web server immediately.
 3. If 'foo/bar.html' doesn't exist either, then Phusion Passenger will forward the
    request to the underlying web application.
 
diff --git a/ext/apache2/Bucket.cpp b/ext/apache2/Bucket.cpp
index 1829235..995d67a 100644
--- a/ext/apache2/Bucket.cpp
+++ b/ext/apache2/Bucket.cpp
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -22,6 +22,8 @@
  *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  *  THE SOFTWARE.
  */
+
+#include <boost/make_shared.hpp>
 #include "Bucket.h"
 
 namespace Passenger {
@@ -41,26 +43,9 @@ static const apr_bucket_type_t apr_bucket_type_passenger_pipe = {
 };
 
 struct BucketData {
-	SessionPtr session;
+	FileDescriptor fd;
 	PassengerBucketStatePtr state;
-	int stream;
 	bool bufferResponse;
-	
-	~BucketData() {
-		/* The session here is an ApplicationPoolServer::RemoteSession.
-		 * The only reason why its destructor might fail is when sending
-		 * the 'close' command failed. We don't care about that, and we
-		 * don't want C++ exceptions to propagate onto a C stack (this
-		 * bucket is probably used by Apache's bucket brigade code, which
-		 * is written in C), so we ignore all errors in the session's
-		 * destructor.
-		 */
-		try {
-			session.reset();
-		} catch (const SystemException &e) {
-			// Do nothing.
-		}
-	}
 };
 
 static void
@@ -107,7 +92,7 @@ bucket_read(apr_bucket *bucket, const char **str, apr_size_t *len, apr_read_type
 	}
 	
 	do {
-		ret = read(data->stream, buf, APR_BUCKET_BUFF_SIZE);
+		ret = read(data->state->connection, buf, APR_BUCKET_BUFF_SIZE);
 	} while (ret == -1 && errno == EINTR);
 	
 	if (ret > 0) {
@@ -131,7 +116,7 @@ bucket_read(apr_bucket *bucket, const char **str, apr_size_t *len, apr_read_type
 		 * which can read the next chunk from the stream.
 		 */
 		APR_BUCKET_INSERT_AFTER(bucket, passenger_bucket_create(
-			data->session, data->state, bucket->list, data->bufferResponse));
+			data->state, bucket->list, data->bufferResponse));
 		
 		/* The newly created Passenger Bucket has a reference to the session
 		 * object, so we can delete data here.
@@ -164,10 +149,8 @@ bucket_read(apr_bucket *bucket, const char **str, apr_size_t *len, apr_read_type
 }
 
 static apr_bucket *
-passenger_bucket_make(apr_bucket *bucket, SessionPtr session, PassengerBucketStatePtr state, bool bufferResponse) {
+passenger_bucket_make(apr_bucket *bucket, const PassengerBucketStatePtr &state, bool bufferResponse) {
 	BucketData *data = new BucketData();
-	data->session  = session;
-	data->stream   = session->getStream();
 	data->state    = state;
 	data->bufferResponse = bufferResponse;
 	
@@ -179,14 +162,14 @@ passenger_bucket_make(apr_bucket *bucket, SessionPtr session, PassengerBucketSta
 }
 
 apr_bucket *
-passenger_bucket_create(SessionPtr session, PassengerBucketStatePtr state, apr_bucket_alloc_t *list, bool bufferResponse) {
+passenger_bucket_create(const PassengerBucketStatePtr &state, apr_bucket_alloc_t *list, bool bufferResponse) {
 	apr_bucket *bucket;
 	
 	bucket = (apr_bucket *) apr_bucket_alloc(sizeof(*bucket), list);
 	APR_BUCKET_INIT(bucket);
 	bucket->free = apr_bucket_free;
 	bucket->list = list;
-	return passenger_bucket_make(bucket, session, state, bufferResponse);
+	return passenger_bucket_make(bucket, state, bufferResponse);
 }
 
 } // namespace Passenger
diff --git a/ext/apache2/Bucket.h b/ext/apache2/Bucket.h
index 95717f1..7041320 100644
--- a/ext/apache2/Bucket.h
+++ b/ext/apache2/Bucket.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -27,7 +27,7 @@
 
 #include <boost/shared_ptr.hpp>
 #include <apr_buckets.h>
-#include "Session.h"
+#include <FileDescriptor.h>
 
 namespace Passenger {
 
@@ -51,10 +51,14 @@ struct PassengerBucketState {
 	 */
 	int errorCode;
 	
-	PassengerBucketState() {
-		bytesRead = 0;
-		completed = false;
-		errorCode = 0;
+	/** Connection to the helper agent. */
+	FileDescriptor connection;
+	
+	PassengerBucketState(const FileDescriptor &conn) {
+		bytesRead  = 0;
+		completed  = false;
+		errorCode  = 0;
+		connection = conn;
 	}
 };
 
@@ -71,15 +75,14 @@ typedef shared_ptr<PassengerBucketState> PassengerBucketStatePtr;
  *   to read less data than can actually be read.
  *
  * PassengerBucket is like apr_bucket_pipe, but:
- * - It also holds a reference to a Session. When a read error has occured
- *   or when end-of-stream has been reached, the Session will be
- *   dereferenced, so that the underlying file descriptor is closed.
+ * - It also holds a reference to the helper agent connection. When a read
+ *   error has occured or when end-of-stream has been reached this connection
+ *   will be closed.
  * - It ignores the APR_NONBLOCK_READ flag because that's known to cause
  *   strange I/O problems.
  * - It can store its current state in a PassengerBucketState data structure.
  */
-apr_bucket *passenger_bucket_create(SessionPtr session,
-                                    PassengerBucketStatePtr state,
+apr_bucket *passenger_bucket_create(const PassengerBucketStatePtr &state,
                                     apr_bucket_alloc_t *list,
                                     bool bufferResponse);
 
diff --git a/ext/apache2/Configuration.cpp b/ext/apache2/Configuration.cpp
index 79882bf..baeacd8 100644
--- a/ext/apache2/Configuration.cpp
+++ b/ext/apache2/Configuration.cpp
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -36,7 +36,8 @@
 
 #include "Configuration.hpp"
 #include "Utils.h"
-#include <LoggingAgent/FilterSupport.h>
+#include "Constants.h"
+#include <agents/LoggingAgent/FilterSupport.h>
 
 /* The APR headers must come after the Passenger headers. See Hooks.cpp
  * to learn why.
@@ -185,22 +186,19 @@ void *
 passenger_config_create_dir(apr_pool_t *p, char *dirspec) {
 	DirConfig *config = create_dir_config_struct(p);
 	config->enabled = DirConfig::UNSET;
-	config->autoDetectRails = DirConfig::UNSET;
-	config->autoDetectRack = DirConfig::UNSET;
-	config->autoDetectWSGI = DirConfig::UNSET;
+	config->ruby = NULL;
+	config->python = NULL;
 	config->environment = NULL;
 	config->appRoot = NULL;
 	config->user = NULL;
 	config->group = NULL;
 	config->spawnMethod = DirConfig::SM_UNSET;
-	config->frameworkSpawnerTimeout = -1;
-	config->appSpawnerTimeout = -1;
+	config->maxPreloaderIdleTime = -1;
 	config->maxRequests = 0;
 	config->maxRequestsSpecified = false;
 	config->minInstances = 1;
 	config->minInstancesSpecified = false;
 	config->highPerformance = DirConfig::UNSET;
-	config->useGlobalQueue = DirConfig::UNSET;
 	config->resolveSymlinksInDocRoot = DirConfig::UNSET;
 	config->allowEncodedSlashes = DirConfig::UNSET;
 	config->statThrottleRate = 0;
@@ -222,30 +220,23 @@ passenger_config_merge_dir(apr_pool_t *p, void *basev, void *addv) {
 	
 	config->enabled = (add->enabled == DirConfig::UNSET) ? base->enabled : add->enabled;
 	
-	config->railsBaseURIs = base->railsBaseURIs;
-	for (set<string>::const_iterator it(add->railsBaseURIs.begin()); it != add->railsBaseURIs.end(); it++) {
-		config->railsBaseURIs.insert(*it);
-	}
-	config->rackBaseURIs = base->rackBaseURIs;
-	for (set<string>::const_iterator it(add->rackBaseURIs.begin()); it != add->rackBaseURIs.end(); it++) {
-		config->rackBaseURIs.insert(*it);
+	config->baseURIs = base->baseURIs;
+	for (set<string>::const_iterator it(add->baseURIs.begin()); it != add->baseURIs.end(); it++) {
+		config->baseURIs.insert(*it);
 	}
 	
-	MERGE_THREEWAY_CONFIG(autoDetectRails);
-	MERGE_THREEWAY_CONFIG(autoDetectRack);
-	MERGE_THREEWAY_CONFIG(autoDetectWSGI);
+	MERGE_STR_CONFIG(ruby);
+	MERGE_STR_CONFIG(python);
 	MERGE_STR_CONFIG(environment);
 	MERGE_STR_CONFIG(appRoot);
 	MERGE_STRING_CONFIG(appGroupName);
 	MERGE_STR_CONFIG(user);
 	MERGE_STR_CONFIG(group);
 	config->spawnMethod = (add->spawnMethod == DirConfig::SM_UNSET) ? base->spawnMethod : add->spawnMethod;
-	config->frameworkSpawnerTimeout = (add->frameworkSpawnerTimeout == -1) ? base->frameworkSpawnerTimeout : add->frameworkSpawnerTimeout;
-	config->appSpawnerTimeout = (add->appSpawnerTimeout == -1) ? base->appSpawnerTimeout : add->appSpawnerTimeout;
+	config->maxPreloaderIdleTime = (add->maxPreloaderIdleTime == -1) ? base->maxPreloaderIdleTime : add->maxPreloaderIdleTime;
 	MERGE_INT_CONFIG(maxRequests);
 	MERGE_INT_CONFIG(minInstances);
 	MERGE_THREEWAY_CONFIG(highPerformance);
-	MERGE_THREEWAY_CONFIG(useGlobalQueue);
 	MERGE_INT_CONFIG(statThrottleRate);
 	MERGE_STR_CONFIG(restartDir);
 	MERGE_STR_CONFIG(uploadBufferDir);
@@ -271,7 +262,7 @@ passenger_config_merge_dir(apr_pool_t *p, void *basev, void *addv) {
  *************************************************/
 
 DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_root, root)
-DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_ruby, ruby)
+DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_default_ruby, defaultRuby)
 DEFINE_SERVER_INT_CONFIG_SETTER(cmd_passenger_log_level, logLevel, unsigned int, 0)
 DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_debug_log_file, debugLogFile)
 DEFINE_SERVER_INT_CONFIG_SETTER(cmd_passenger_max_pool_size, maxPoolSize, unsigned int, 1)
@@ -285,11 +276,14 @@ DEFINE_SERVER_STR_CONFIG_SETTER(cmd_union_station_gateway_address, unionStationG
 DEFINE_SERVER_INT_CONFIG_SETTER(cmd_union_station_gateway_port, unionStationGatewayPort, int, 1)
 DEFINE_SERVER_STR_CONFIG_SETTER(cmd_union_station_gateway_cert, unionStationGatewayCert)
 DEFINE_SERVER_STR_CONFIG_SETTER(cmd_union_station_proxy_address, unionStationProxyAddress)
-DEFINE_SERVER_STR_CONFIG_SETTER(cmd_union_station_proxy_type, unionStationProxyType)
-DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_analytics_log_dir, analyticsLogDir)
 DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_analytics_log_user, analyticsLogUser)
 DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_analytics_log_group, analyticsLogGroup)
-DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_analytics_log_permissions, analyticsLogPermissions)
+
+static const char *
+cmd_passenger_ctl(cmd_parms *cmd, void *dummy, const char *name, const char *value) {
+	serverConfig.ctl.set(name, value);
+	return NULL;
+}
 
 static const char *
 cmd_passenger_pre_start(cmd_parms *cmd, void *pcfg, const char *arg) {
@@ -298,10 +292,11 @@ cmd_passenger_pre_start(cmd_parms *cmd, void *pcfg, const char *arg) {
 }
 
 DEFINE_DIR_INT_CONFIG_SETTER(cmd_passenger_min_instances, minInstances, unsigned long, 0)
-DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_use_global_queue, useGlobalQueue)
 DEFINE_DIR_INT_CONFIG_SETTER(cmd_passenger_max_requests, maxRequests, unsigned long, 0)
 DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_high_performance, highPerformance)
 DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_enabled, enabled)
+DEFINE_DIR_STR_CONFIG_SETTER(cmd_passenger_ruby, ruby)
+DEFINE_DIR_STR_CONFIG_SETTER(cmd_passenger_python, python)
 DEFINE_DIR_STR_CONFIG_SETTER(cmd_environment, environment)
 DEFINE_DIR_INT_CONFIG_SETTER(cmd_passenger_stat_throttle_rate, statThrottleRate, unsigned long, 0)
 DEFINE_DIR_STR_CONFIG_SETTER(cmd_passenger_app_root, appRoot)
@@ -317,22 +312,44 @@ DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_friendly_error_pages, friendlyEr
 DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_union_station_support, unionStationSupport)
 DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_buffer_response, bufferResponse)
 
+#ifndef PASSENGER_IS_ENTERPRISE
+static const char *
+cmd_passenger_enterprise_only(cmd_parms *cmd, void *pcfg, const char *arg) {
+	return "this feature is only available in Phusion Passenger Enterprise. "
+		"You are currently running the open source Phusion Passenger Enterprise. "
+		"Please learn more about and/or buy Phusion Passenger Enterprise at https://www.phusionpassenger.com/enterprise";
+}
+#endif
+
 static const char *
 cmd_passenger_spawn_method(cmd_parms *cmd, void *pcfg, const char *arg) {
 	DirConfig *config = (DirConfig *) pcfg;
-	if (strcmp(arg, "smart") == 0) {
+	if (strcmp(arg, "smart") == 0 || strcmp(arg, "smart-lv2") == 0) {
 		config->spawnMethod = DirConfig::SM_SMART;
-	} else if (strcmp(arg, "smart-lv2") == 0) {
-		config->spawnMethod = DirConfig::SM_SMART_LV2;
-	} else if (strcmp(arg, "conservative") == 0) {
-		config->spawnMethod = DirConfig::SM_CONSERVATIVE;
+	} else if (strcmp(arg, "conservative") == 0 || strcmp(arg, "direct") == 0) {
+		config->spawnMethod = DirConfig::SM_DIRECT;
 	} else {
-		return "PassengerSpawnMethod may only be 'smart', 'smart-lv2' or 'conservative'.";
+		return "PassengerSpawnMethod may only be 'smart', 'direct'.";
 	}
 	return NULL;
 }
 
 static const char *
+cmd_passenger_base_uri(cmd_parms *cmd, void *pcfg, const char *arg) {
+	DirConfig *config = (DirConfig *) pcfg;
+	if (strlen(arg) == 0) {
+		return "PassengerBaseURI may not be set to the empty string";
+	} else if (arg[0] != '/') {
+		return "PassengerBaseURI must start with a slash (/)";
+	} else if (strlen(arg) > 1 && arg[strlen(arg) - 1] == '/') {
+		return "PassengerBaseURI must not end with a slash (/)";
+	} else {
+		config->baseURIs.insert(arg);
+		return NULL;
+	}
+}
+
+static const char *
 cmd_union_station_filter(cmd_parms *cmd, void *pcfg, const char *arg) {
 	DirConfig *config = (DirConfig *) pcfg;
 	if (strlen(arg) == 0) {
@@ -352,89 +369,26 @@ cmd_union_station_filter(cmd_parms *cmd, void *pcfg, const char *arg) {
 
 
 /*************************************************
- * Rails-specific settings
+ * Rack-specific settings
  *************************************************/
 
 static const char *
-cmd_rails_base_uri(cmd_parms *cmd, void *pcfg, const char *arg) {
-	DirConfig *config = (DirConfig *) pcfg;
-	if (strlen(arg) == 0) {
-		return "RailsBaseURI may not be set to the empty string";
-	} else if (arg[0] != '/') {
-		return "RailsBaseURI must start with a slash (/)";
-	} else if (strlen(arg) > 1 && arg[strlen(arg) - 1] == '/') {
-		return "RailsBaseURI must not end with a slash (/)";
-	} else {
-		config->railsBaseURIs.insert(arg);
-		return NULL;
-	}
-}
-
-DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_rails_auto_detect, autoDetectRails)
-
-static const char *
-cmd_rails_framework_spawner_idle_time(cmd_parms *cmd, void *pcfg, const char *arg) {
+cmd_passenger_max_preloader_idle_time(cmd_parms *cmd, void *pcfg, const char *arg) {
 	DirConfig *config = (DirConfig *) pcfg;
 	char *end;
 	long int result;
 	
 	result = strtol(arg, &end, 10);
 	if (*end != '\0') {
-		return "Invalid number specified for RailsFrameworkSpawnerIdleTime.";
+		return "Invalid number specified for PassengerMaxPreloaderIdleTime.";
 	} else if (result < 0) {
-		return "Value for RailsFrameworkSpawnerIdleTime must be at least 0.";
+		return "Value for PassengerMaxPreloaderIdleTime must be at least 0.";
 	} else {
-		config->frameworkSpawnerTimeout = result;
+		config->maxPreloaderIdleTime = result;
 		return NULL;
 	}
 }
 
-static const char *
-cmd_rails_app_spawner_idle_time(cmd_parms *cmd, void *pcfg, const char *arg) {
-	DirConfig *config = (DirConfig *) pcfg;
-	char *end;
-	long int result;
-	
-	result = strtol(arg, &end, 10);
-	if (*end != '\0') {
-		return "Invalid number specified for RailsAppSpawnerIdleTime.";
-	} else if (result < 0) {
-		return "Value for RailsAppSpawnerIdleTime must be at least 0.";
-	} else {
-		config->appSpawnerTimeout = result;
-		return NULL;
-	}
-}
-
-
-/*************************************************
- * Rack-specific settings
- *************************************************/
-
-static const char *
-cmd_rack_base_uri(cmd_parms *cmd, void *pcfg, const char *arg) {
-	DirConfig *config = (DirConfig *) pcfg;
-	if (strlen(arg) == 0) {
-		return "RackBaseURI may not be set to the empty string";
-	} else if (arg[0] != '/') {
-		return "RackBaseURI must start with a slash (/)";
-	} else if (strlen(arg) > 1 && arg[strlen(arg) - 1] == '/') {
-		return "RackBaseURI must not end with a slash (/)";
-	} else {
-		config->rackBaseURIs.insert(arg);
-		return NULL;
-	}
-}
-
-DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_rack_auto_detect, autoDetectRack)
-
-
-/*************************************************
- * WSGI-specific settings
- *************************************************/
-
-DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_wsgi_auto_detect, autoDetectWSGI)
-
 
 /*************************************************
  * Obsolete settings
@@ -444,7 +398,7 @@ static const char *
 cmd_rails_spawn_server(cmd_parms *cmd, void *pcfg, const char *arg) {
 	fprintf(stderr, "WARNING: The 'RailsSpawnServer' option is obsolete. "
 		"Please specify 'PassengerRoot' instead. The correct value was "
-		"given to you by 'passenger-install-apache2-module'.");
+		"given to you by 'passenger-install-apache2-module'.\n");
 	fflush(stderr);
 	return NULL;
 }
@@ -453,13 +407,31 @@ static const char *
 cmd_rails_allow_mod_rewrite(cmd_parms *cmd, void *pcfg, int arg) {
 	fprintf(stderr, "WARNING: The 'RailsAllowModRewrite' option is obsolete: "
 		"Phusion Passenger now fully supports mod_rewrite. "
-		"Please remove this option from your configuration file.");
+		"Please remove this option from your configuration file.\n");
+	fflush(stderr);
+	return NULL;
+}
+
+static const char *
+cmd_rails_framework_spawner_idle_time(cmd_parms *cmd, void *pcfg, const char *arg) {
+	fprintf(stderr, "WARNING: The 'RailsFrameworkSpawnerIdleTime' option is obsolete. "
+		"Please use 'PassengerMaxPreloaderIdleTime' instead.\n");
+	fflush(stderr);
+	return NULL;
+}
+
+static const char *
+cmd_passenger_use_global_queue(cmd_parms *cmd, void *pcfg, int arg) {
+	fprintf(stderr, "WARNING: The 'PassengerUseGlobalQueue' option is obsolete: "
+		"global queueing is now always turned on. "
+		"Please remove this option from your configuration file.\n");
 	fflush(stderr);
 	return NULL;
 }
 
 
 typedef const char * (*Take1Func)();
+typedef const char * (*Take2Func)();
 typedef const char * (*FlagFunc)();
 
 const command_rec passenger_commands[] = {
@@ -469,10 +441,20 @@ const command_rec passenger_commands[] = {
 		NULL,
 		RSRC_CONF,
 		"The Passenger root folder."),
+	AP_INIT_TAKE2("PassengerCtl",
+		(Take2Func) cmd_passenger_ctl,
+		NULL,
+		RSRC_CONF,
+		"Set advanced options."),
+	AP_INIT_TAKE1("PassengerDefaultRuby",
+		(Take1Func) cmd_passenger_default_ruby,
+		NULL,
+		RSRC_CONF,
+		"The default Ruby interpreter to use."),
 	AP_INIT_TAKE1("PassengerRuby",
 		(Take1Func) cmd_passenger_ruby,
 		NULL,
-		RSRC_CONF,
+		OR_OPTIONS | ACCESS_CONF,
 		"The Ruby interpreter to use."),
 	AP_INIT_TAKE1("PassengerLogLevel",
 		(Take1Func) cmd_passenger_log_level,
@@ -504,11 +486,6 @@ const command_rec passenger_commands[] = {
 		NULL,
 		RSRC_CONF,
 		"The maximum number of seconds that an application may be idle before it gets terminated."),
-	AP_INIT_FLAG("PassengerUseGlobalQueue",
-		(FlagFunc) cmd_passenger_use_global_queue,
-		NULL,
-		OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
-		"Enable or disable Passenger's global queuing mode mode."),
 	AP_INIT_FLAG("PassengerUserSwitching",
 		(FlagFunc) cmd_passenger_user_switching,
 		NULL,
@@ -614,6 +591,16 @@ const command_rec passenger_commands[] = {
 		NULL,
 		RSRC_CONF,
 		"The spawn method to use."),
+	AP_INIT_TAKE1("PassengerBaseURI",
+		(Take1Func) cmd_passenger_base_uri,
+		NULL,
+		OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
+		"Declare the given base URI as belonging to an application."),
+	AP_INIT_TAKE1("PassengerMaxPreloaderIdleTime",
+		(Take1Func) cmd_passenger_max_preloader_idle_time,
+		NULL,
+		RSRC_CONF,
+		"The maximum number of seconds that a preloader process may be idle before it is shutdown."),
 	AP_INIT_TAKE1("UnionStationGatewayAddress",
 		(Take1Func) cmd_union_station_gateway_address,
 		NULL,
@@ -634,16 +621,6 @@ const command_rec passenger_commands[] = {
 		NULL,
 		RSRC_CONF,
 		"The address of the proxy that should be used for sending data to Union Station."),
-	AP_INIT_TAKE1("UnionStationProxyType",
-		(Take1Func) cmd_union_station_proxy_type,
-		NULL,
-		RSRC_CONF,
-		"The type of the proxy that should be used for sending data to Union Station."),
-	AP_INIT_TAKE1("PassengerAnalyticsLogDir",
-		(Take1Func) cmd_passenger_analytics_log_dir,
-		NULL,
-		RSRC_CONF,
-		"Directory in which to store analytics logs."),
 	AP_INIT_TAKE1("PassengerAnalyticsLogUser",
 		(Take1Func) cmd_passenger_analytics_log_user,
 		NULL,
@@ -654,11 +631,6 @@ const command_rec passenger_commands[] = {
 		NULL,
 		RSRC_CONF,
 		"The group of analytics files."),
-	AP_INIT_TAKE1("PassengerAnalyticsLogPermissions",
-		(Take1Func) cmd_passenger_analytics_log_permissions,
-		NULL,
-		RSRC_CONF,
-		"The permissions of analytics files."),
 	AP_INIT_TAKE1("PassengerPreStart",
 		(Take1Func) cmd_passenger_pre_start,
 		NULL,
@@ -671,45 +643,55 @@ const command_rec passenger_commands[] = {
 		"Whether to enable logging through Union Station."),
 	
 	/*****************************/
-
-	// Rails-specific settings.
-	AP_INIT_TAKE1("RailsBaseURI",
-		(Take1Func) cmd_rails_base_uri,
+	AP_INIT_TAKE1("PassengerMemoryLimit",
+		(Take1Func) cmd_passenger_enterprise_only,
+		NULL,
+		OR_LIMIT | ACCESS_CONF | RSRC_CONF,
+		"The maximum amount of memory in MB that an application instance may use."),
+	AP_INIT_TAKE1("PassengerMaxInstances",
+		(Take1Func) cmd_passenger_enterprise_only,
+		NULL,
+		OR_LIMIT | ACCESS_CONF | RSRC_CONF,
+		"The maximum number of instances for the current application that Passenger may spawn."),
+	AP_INIT_TAKE1("PassengerMaxRequestTime",
+		(Take1Func) cmd_passenger_enterprise_only,
+		NULL,
+		OR_ALL,
+		"The maximum time (in seconds) that the current application may spend on a request."),
+	AP_INIT_FLAG("PassengerRollingRestarts",
+		(FlagFunc) cmd_passenger_enterprise_only,
 		NULL,
 		OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
-		"Reserve the given URI to a Rails application."),
-	AP_INIT_FLAG("RailsAutoDetect",
-		(FlagFunc) cmd_rails_auto_detect,
+		"Whether to turn on rolling restarts"),
+	AP_INIT_FLAG("PassengerResistDeploymentErrors",
+		(FlagFunc) cmd_passenger_enterprise_only,
 		NULL,
-		RSRC_CONF,
-		"Whether auto-detection of Ruby on Rails applications should be enabled."),
+		OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
+		"Whether to turn on deployment error resistance"),
+	AP_INIT_FLAG("PassengerDebugger",
+		(FlagFunc) cmd_passenger_enterprise_only,
+		NULL,
+		OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
+		"Whether to turn on debugger support"),
+	AP_INIT_TAKE1("PassengerConcurrencyModel",
+		(Take1Func) cmd_passenger_enterprise_only,
+		NULL,
+		OR_ALL,
+		"The concurrency model that should be used for applications."),
+	AP_INIT_TAKE1("PassengerThreadCount",
+		(Take1Func) cmd_passenger_enterprise_only,
+		NULL,
+		OR_ALL,
+		"The number of threads that Phusion Passenger should spawn per application."),
+
+	// Rails-specific settings.
 	AP_INIT_TAKE1("RailsEnv",
 		(Take1Func) cmd_environment,
 		NULL,
 		OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
 		"The environment under which a Rails app must run."),
-	AP_INIT_TAKE1("RailsFrameworkSpawnerIdleTime",
-		(Take1Func) cmd_rails_framework_spawner_idle_time,
-		NULL,
-		RSRC_CONF,
-		"The maximum number of seconds that a framework spawner may be idle before it is shutdown."),
-	AP_INIT_TAKE1("RailsAppSpawnerIdleTime",
-		(Take1Func) cmd_rails_app_spawner_idle_time,
-		NULL,
-		RSRC_CONF,
-		"The maximum number of seconds that an application spawner may be idle before it is shutdown."),
 	
 	// Rack-specific settings.
-	AP_INIT_TAKE1("RackBaseURI",
-		(Take1Func) cmd_rack_base_uri,
-		NULL,
-		OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
-		"Reserve the given URI to a Rack application."),
-	AP_INIT_FLAG("RackAutoDetect",
-		(FlagFunc) cmd_rack_auto_detect,
-		NULL,
-		RSRC_CONF,
-		"Whether auto-detection of Rack applications should be enabled."),
 	AP_INIT_TAKE1("RackEnv",
 		(Take1Func) cmd_environment,
 		NULL,
@@ -717,17 +699,17 @@ const command_rec passenger_commands[] = {
 		"The environment under which a Rack app must run."),
 	
 	// WSGI-specific settings.
-	AP_INIT_FLAG("PassengerWSGIAutoDetect",
-		(FlagFunc) cmd_wsgi_auto_detect,
+	AP_INIT_TAKE1("PassengerPython",
+		(Take1Func) cmd_passenger_python,
 		NULL,
-		RSRC_CONF,
-		"Whether auto-detection of WSGI applications should be enabled."),
+		OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
+		"The Python interpreter to use."),
 	
 	// Backwards compatibility options.
 	AP_INIT_TAKE1("RailsRuby",
 		(Take1Func) cmd_passenger_ruby,
 		NULL,
-		RSRC_CONF,
+		OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
 		"Deprecated option."),
 	AP_INIT_TAKE1("RailsMaxPoolSize",
 		(Take1Func) cmd_passenger_max_pool_size,
@@ -759,7 +741,22 @@ const command_rec passenger_commands[] = {
 		NULL,
 		RSRC_CONF,
 		"Deprecated option."),
-	
+	AP_INIT_TAKE1("RailsAppSpawnerIdleTime",
+		(Take1Func) cmd_passenger_max_preloader_idle_time,
+		NULL,
+		RSRC_CONF,
+		"Deprecated option."),
+	AP_INIT_TAKE1("RailsBaseURI",
+		(Take1Func) cmd_passenger_base_uri,
+		NULL,
+		OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
+		"Deprecated option."),
+	AP_INIT_TAKE1("RackBaseURI",
+		(Take1Func) cmd_passenger_base_uri,
+		NULL,
+		OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
+		"Deprecated option."),
+
 	// Obsolete options.
 	AP_INIT_TAKE1("RailsSpawnServer",
 		(Take1Func) cmd_rails_spawn_server,
@@ -770,8 +767,18 @@ const command_rec passenger_commands[] = {
 		(FlagFunc) cmd_rails_allow_mod_rewrite,
 		NULL,
 		RSRC_CONF,
-		"Whether custom mod_rewrite rules should be allowed."),
-	
+		"Obsolete option."),
+	AP_INIT_TAKE1("RailsFrameworkSpawnerIdleTime",
+		(Take1Func) cmd_rails_framework_spawner_idle_time,
+		NULL,
+		RSRC_CONF,
+		"Obsolete option."),
+	AP_INIT_FLAG("PassengerUseGlobalQueue",
+		(FlagFunc) cmd_passenger_use_global_queue,
+		NULL,
+		OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
+		"Obsolete option."),
+
 	{ NULL }
 };
 
diff --git a/ext/apache2/Configuration.h b/ext/apache2/Configuration.h
index d34277d..526a823 100644
--- a/ext/apache2/Configuration.h
+++ b/ext/apache2/Configuration.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/ext/apache2/Configuration.hpp b/ext/apache2/Configuration.hpp
index 0ee9978..3020a8c 100644
--- a/ext/apache2/Configuration.hpp
+++ b/ext/apache2/Configuration.hpp
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -25,10 +25,11 @@
 #ifndef _PASSENGER_CONFIGURATION_HPP_
 #define _PASSENGER_CONFIGURATION_HPP_
 
-#include "Utils.h"
-#include "Logging.h"
-#include "ServerInstanceDir.h"
-#include "Constants.h"
+#include <Logging.h>
+#include <ServerInstanceDir.h>
+#include <Constants.h>
+#include <Utils.h>
+#include <Utils/VariantMap.h>
 
 /* The APR headers must come after the Passenger headers. See Hooks.cpp
  * to learn why.
@@ -61,21 +62,17 @@ using namespace std;
  */
 struct DirConfig {
 	enum Threeway { ENABLED, DISABLED, UNSET };
-	enum SpawnMethod { SM_UNSET, SM_SMART, SM_SMART_LV2, SM_CONSERVATIVE };
+	enum SpawnMethod { SM_UNSET, SM_SMART, SM_DIRECT };
 	
 	Threeway enabled;
 	
-	std::set<std::string> railsBaseURIs;
-	std::set<std::string> rackBaseURIs;
+	std::set<std::string> baseURIs;
 	
-	/** Whether to autodetect Rails applications. */
-	Threeway autoDetectRails;
-	
-	/** Whether to autodetect Rack applications. */
-	Threeway autoDetectRack;
-	
-	/** Whether to autodetect WSGI applications. */
-	Threeway autoDetectWSGI;
+	/** The Ruby interpreter to use. */
+	const char *ruby;
+
+	/** The Python interpreter to use. */
+	const char *python;
 	
 	/** The environment (RAILS_ENV/RACK_ENV/WSGI_ENV) under which
 	 * applications should operate. */
@@ -88,10 +85,6 @@ struct DirConfig {
 	 */
 	const char *appRoot;
 	
-	/** The environment (i.e. value for RACK_ENV) under which
-	 * Rack applications should operate. */
-	const char *rackEnv;
-	
 	string appGroupName;
 	
 	/** The spawn method to use. */
@@ -103,18 +96,12 @@ struct DirConfig {
 	const char *group;
 	
 	/**
-	 * The idle timeout, in seconds, of Rails framework spawners.
-	 * May also be 0 (which indicates that the framework spawner should
-	 * never idle timeout) or -1 (which means that the value is not specified).
-	 */
-	long frameworkSpawnerTimeout;
-	
-	/**
-	 * The idle timeout, in seconds, of Rails application spawners.
+	 * The idle timeout, in seconds, of preloader processes.
 	 * May also be 0 (which indicates that the application spawner should
-	 * never idle timeout) or -1 (which means that the value is not specified).
+	 * never idle timeout) or -1 (which means that the value is not specified,
+	 * and the default value should be used).
 	 */
-	long appSpawnerTimeout;
+	long maxPreloaderIdleTime;
 	
 	/**
 	 * The maximum number of requests that the spawned application may process
@@ -146,9 +133,6 @@ struct DirConfig {
 	/** Whether high performance mode should be turned on. */
 	Threeway highPerformance;
 	
-	/** Whether global queuing should be used. */
-	Threeway useGlobalQueue;
-	
 	/**
 	 * Whether encoded slashes in URLs should be supported. This however conflicts
 	 * with mod_rewrite support because of a bug/limitation in Apache, so it's one
@@ -204,31 +188,7 @@ struct DirConfig {
 		return enabled != DISABLED;
 	}
 	
-	string getAppRoot(const char *documentRoot) const {
-		if (appRoot == NULL) {
-			if (resolveSymlinksInDocRoot == DirConfig::ENABLED) {
-				return extractDirName(resolveSymlink(documentRoot));
-			} else {
-				return extractDirName(documentRoot);
-			}
-		} else {
-			return appRoot;
-		}
-	}
-	
-	string getAppRoot(const string &documentRoot) const {
-		if (appRoot == NULL) {
-			if (resolveSymlinksInDocRoot == DirConfig::ENABLED) {
-				return extractDirName(resolveSymlink(documentRoot));
-			} else {
-				return extractDirName(documentRoot);
-			}
-		} else {
-			return appRoot;
-		}
-	}
-	
-	const char *getUser() const {
+	StaticString getUser() const {
 		if (user != NULL) {
 			return user;
 		} else {
@@ -236,7 +196,7 @@ struct DirConfig {
 		}
 	}
 	
-	const char *getGroup() const {
+	StaticString getGroup() const {
 		if (group != NULL) {
 			return group;
 		} else {
@@ -244,7 +204,7 @@ struct DirConfig {
 		}
 	}
 	
-	const char *getEnvironment() const {
+	StaticString getEnvironment() const {
 		if (environment != NULL) {
 			return environment;
 		} else {
@@ -252,7 +212,7 @@ struct DirConfig {
 		}
 	}
 	
-	string getAppGroupName(const string &appRoot) const {
+	StaticString getAppGroupName(const StaticString &appRoot) const {
 		if (appGroupName.empty()) {
 			return appRoot;
 		} else {
@@ -260,16 +220,14 @@ struct DirConfig {
 		}
 	}
 	
-	const char *getSpawnMethodString() const {
+	StaticString getSpawnMethodString() const {
 		switch (spawnMethod) {
 		case SM_SMART:
 			return "smart";
-		case SM_SMART_LV2:
-			return "smart-lv2";
-		case SM_CONSERVATIVE:
-			return "conservative";
+		case SM_DIRECT:
+			return "direct";
 		default:
-			return "smart-lv2";
+			return "smart";
 		}
 	}
 	
@@ -293,10 +251,6 @@ struct DirConfig {
 		return highPerformance == ENABLED;
 	}
 	
-	bool usingGlobalQueue() const {
-		return useGlobalQueue != DISABLED;
-	}
-	
 	bool allowsEncodedSlashes() const {
 		return allowEncodedSlashes == ENABLED;
 	}
@@ -309,7 +263,7 @@ struct DirConfig {
 		}
 	}
 	
-	const char *getRestartDir() const {
+	StaticString getRestartDir() const {
 		if (restartDir != NULL) {
 			return restartDir;
 		} else {
@@ -334,7 +288,7 @@ struct DirConfig {
 	}
 
 	bool getBufferResponse() const {
-		return bufferResponse != DISABLED;
+		return bufferResponse == ENABLED;
 	}
 	
 	string getUnionStationFilterString() const {
@@ -365,11 +319,13 @@ struct DirConfig {
  * the default value if the value is not specified.
  */
 struct ServerConfig {
-	/** The filename of the Ruby interpreter to use. */
-	const char *ruby;
-	
 	/** The Passenger root folder. */
 	const char *root;
+
+	VariantMap ctl;
+
+	/** The default Ruby interpreter to use. */
+	const char *defaultRuby;
 	
 	/** The log verbosity. */
 	int logLevel;
@@ -404,19 +360,16 @@ struct ServerConfig {
 	int unionStationGatewayPort;
 	string unionStationGatewayCert;
 	string unionStationProxyAddress;
-	string unionStationProxyType;
 	
 	/** Directory in which analytics logs should be saved. */
-	string analyticsLogDir;
 	string analyticsLogUser;
 	string analyticsLogGroup;
-	string analyticsLogPermissions;
 	
 	set<string> prestartURLs;
 	
 	ServerConfig() {
-		ruby               = "ruby";
 		root               = NULL;
+		defaultRuby        = DEFAULT_RUBY;
 		logLevel           = DEFAULT_LOG_LEVEL;
 		debugLogFile       = NULL;
 		maxPoolSize        = DEFAULT_MAX_POOL_SIZE;
@@ -429,10 +382,8 @@ struct ServerConfig {
 		unionStationGatewayPort    = DEFAULT_UNION_STATION_GATEWAY_PORT;
 		unionStationGatewayCert    = string();
 		unionStationProxyAddress   = string();
-		unionStationProxyType      = string();
 		analyticsLogUser   = DEFAULT_ANALYTICS_LOG_USER;
 		analyticsLogGroup  = DEFAULT_ANALYTICS_LOG_GROUP;
-		analyticsLogPermissions = DEFAULT_ANALYTICS_LOG_PERMISSIONS;
 	}
 	
 	/** Called after the configuration files have been loaded, inside
@@ -458,29 +409,6 @@ struct ServerConfig {
 			
 			defaultGroup = groupEntry->gr_name;
 		}
-		
-		if (analyticsLogDir.empty() && geteuid() == 0) {
-			analyticsLogDir = "/var/log/passenger-analytics";
-		} else if (analyticsLogDir.empty()) {
-			struct passwd *user = getpwuid(geteuid());
-			string username;
-			
-			if (user == NULL) {
-				username = user->pw_name;
-			} else {
-				username = "user-" + toString(geteuid());
-			}
-			analyticsLogDir = string(getSystemTempDir()) +
-				"/passenger-analytics-logs." +
-				username;
-		}
-		
-		if (unionStationProxyType != ""
-		 && unionStationProxyType != "http"
-		 && unionStationProxyType != "socks5") {
-			throw ConfigurationException(string("The option 'UnionStationProxyType' ") +
-				"may only be set to 'http' or 'socks5'.");
-		}
 	}
 };
 
diff --git a/ext/apache2/DirectoryMapper.h b/ext/apache2/DirectoryMapper.h
index 5d6dae4..8258807 100644
--- a/ext/apache2/DirectoryMapper.h
+++ b/ext/apache2/DirectoryMapper.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -32,8 +32,9 @@
 #include <oxt/backtrace.hpp>
 
 #include "Configuration.hpp"
-#include "Utils.h"
-#include "Utils/CachedFileStat.hpp"
+#include <ApplicationPool2/AppTypes.h>
+#include <Utils.h>
+#include <Utils/CachedFileStat.hpp>
 
 // The Apache/APR headers *must* come after the Boost headers, otherwise
 // compilation will fail on OpenBSD.
@@ -44,6 +45,18 @@ namespace Passenger {
 
 using namespace std;
 using namespace oxt;
+using namespace Passenger::ApplicationPool2;
+
+
+class DocumentRootDeterminationError: public oxt::tracable_exception {
+private:
+	string msg;
+public:
+	DocumentRootDeterminationError(const string &message): msg(message) {}
+	virtual ~DocumentRootDeterminationError() throw() {}
+	virtual const char *what() const throw() { return msg.c_str(); }
+};
+
 
 /**
  * Utility class for determining URI-to-application directory mappings.
@@ -55,38 +68,98 @@ using namespace oxt;
  * @ingroup Core
  */
 class DirectoryMapper {
-public:
-	enum ApplicationType {
-		NONE,
-		RAILS,
-		RACK,
-		WSGI
-	};
-
 private:
 	DirConfig *config;
 	request_rec *r;
 	CachedFileStat *cstat;
-	unsigned int throttleRate;
-	bool baseURIKnown;
 	const char *baseURI;
-	ApplicationType appType;
-	
-	inline bool shouldAutoDetectRails() {
-		return config->autoDetectRails == DirConfig::ENABLED ||
-			config->autoDetectRails == DirConfig::UNSET;
-	}
+	string publicDir;
+	string appRoot;
+	unsigned int throttleRate;
+	PassengerAppType appType: 7;
+	bool autoDetectionDone: 1;
 	
-	inline bool shouldAutoDetectRack() {
-		return config->autoDetectRack == DirConfig::ENABLED ||
-			config->autoDetectRack == DirConfig::UNSET;
+	const char *findBaseURI() const {
+		set<string>::const_iterator it, end = config->baseURIs.end();
+		const char *uri = r->uri;
+		size_t uri_len = strlen(uri);
+
+		for (it = config->baseURIs.begin(); it != end; it++) {
+			const string &base = *it;
+
+			if (base == "/") {
+                /* Ignore 'PassengerBaseURI /' options. Users usually
+                 * specify this out of ignorance.
+                 */
+                continue;
+            }
+
+			if (  base == "/"
+			 || ( uri_len == base.size() && memcmp(uri, base.c_str(), uri_len) == 0 )
+			 || ( uri_len  > base.size() && memcmp(uri, base.c_str(), base.size()) == 0
+			                             && uri[base.size()] == '/' )
+			) {
+				return base.c_str();
+			}
+		}
+		return NULL;
 	}
-	
-	inline bool shouldAutoDetectWSGI() {
-		return config->autoDetectWSGI == DirConfig::ENABLED ||
-			config->autoDetectWSGI == DirConfig::UNSET;
+
+	/**
+	 * @throws FileSystemException An error occured while examening the filesystem.
+	 * @throws DocumentRootDeterminationError Unable to query the location of the document root.
+	 * @throws TimeRetrievalException
+	 * @throws boost::thread_interrupted
+	 */
+	void autoDetect() {
+		if (autoDetectionDone) {
+			return;
+		}
+
+		TRACE_POINT();
+
+		/* Determine the document root without trailing slashes. */
+		StaticString docRoot = ap_document_root(r);
+		if (docRoot.size() > 1 && docRoot[docRoot.size() - 1] == '/') {
+			docRoot = docRoot.substr(0, docRoot.size() - 1);
+		}
+		if (docRoot.empty()) {
+			throw DocumentRootDeterminationError("Cannot determine the document root");
+		}
+
+		/* Find the base URI for this web application, if any. */
+		const char *baseURI = findBaseURI();
+		if (baseURI != NULL) {
+			/* We infer that the 'public' directory of the web application
+			 * is document root + base URI.
+			 */
+			publicDir = docRoot + baseURI;
+		} else {
+			/* No base URI directives are applicable for this request. So assume that
+			 * the web application's public directory is the document root.
+			 */
+			publicDir = docRoot;
+		}
+
+		UPDATE_TRACE_POINT();
+		AppTypeDetector detector(cstat, throttleRate);
+		PassengerAppType appType;
+		string appRoot;
+		if (config->appRoot == NULL) {
+			appType = detector.checkDocumentRoot(publicDir,
+				baseURI != NULL || config->resolveSymlinksInDocRoot == DirConfig::ENABLED,
+				&appRoot);
+		} else {
+			appRoot = config->appRoot;
+			appType = detector.checkAppRoot(appRoot);
+		}
+
+		this->appRoot = appRoot;
+		this->baseURI = baseURI;
+		this->appType = appType;
+		autoDetectionDone = true;
 	}
-	
+
 public:
 	/**
 	 * Create a new DirectoryMapper object.
@@ -102,152 +175,67 @@ public:
 		this->config = config;
 		this->cstat = cstat;
 		this->throttleRate = throttleRate;
-		appType = NONE;
-		baseURIKnown = false;
+		appType = PAT_NONE;
 		baseURI = NULL;
+		autoDetectionDone = false;
 	}
 	
 	/**
-	 * Determine whether the given HTTP request falls under one of the specified
-	 * RailsBaseURIs or RackBaseURIs. If yes, then the first matching base URI will
-	 * be returned.
-	 *
-	 * If Rails/Rack autodetection was enabled in the configuration, and the document
-	 * root seems to be a valid Rails/Rack 'public' folder, then this method will
-	 * return "/".
-	 *
+	 * Determines whether the given HTTP request falls under one of the specified
+	 * PassengerBaseURIs. If yes, then the first matching base URI will be returned.
 	 * Otherwise, NULL will be returned.
 	 *
-	 * @throws FileSystemException This method might also examine the filesystem in
-	 *            order to detect the application's type. During that process, a
-	 *            FileSystemException might be thrown.
+	 * @throws FileSystemException An error occured while examening the filesystem.
+	 * @throws DocumentRoot
+	 * @throws TimeRetrievalException
+	 * @throws boost::thread_interrupted
 	 * @warning The return value may only be used as long as <tt>config</tt>
 	 *          hasn't been destroyed.
 	 */
 	const char *getBaseURI() {
 		TRACE_POINT();
-		if (baseURIKnown) {
-			return baseURI;
-		}
-		
-		set<string>::const_iterator it;
-		const char *uri = r->uri;
-		size_t uri_len = strlen(uri);
-		
-		if (uri_len == 0 || uri[0] != '/') {
-			baseURIKnown = true;
-			return NULL;
-		}
-		
-		UPDATE_TRACE_POINT();
-		for (it = config->railsBaseURIs.begin(); it != config->railsBaseURIs.end(); it++) {
-			const string &base(*it);
-			if (  base == "/"
-			 || ( uri_len == base.size() && memcmp(uri, base.c_str(), uri_len) == 0 )
-			 || ( uri_len  > base.size() && memcmp(uri, base.c_str(), base.size()) == 0
-			                             && uri[base.size()] == '/' )
-			) {
-				baseURIKnown = true;
-				baseURI = base.c_str();
-				appType = RAILS;
-				return baseURI;
-			}
-		}
-		
-		UPDATE_TRACE_POINT();
-		for (it = config->rackBaseURIs.begin(); it != config->rackBaseURIs.end(); it++) {
-			const string &base(*it);
-			if (  base == "/"
-			 || ( uri_len == base.size() && memcmp(uri, base.c_str(), uri_len) == 0 )
-			 || ( uri_len  > base.size() && memcmp(uri, base.c_str(), base.size()) == 0
-			                             && uri[base.size()] == '/' )
-			) {
-				baseURIKnown = true;
-				baseURI = base.c_str();
-				appType = RACK;
-				return baseURI;
-			}
-		}
-		
-		UPDATE_TRACE_POINT();
-		if (shouldAutoDetectRack()
-		 && verifyRackDir(config->getAppRoot(ap_document_root(r)), cstat, throttleRate)) {
-			baseURIKnown = true;
-			baseURI = "/";
-			appType = RACK;
-			return baseURI;
-		}
-		
-		UPDATE_TRACE_POINT();
-		if (shouldAutoDetectRails()
-		 && verifyRailsDir(config->getAppRoot(ap_document_root(r)), cstat, throttleRate)) {
-			baseURIKnown = true;
-			baseURI = "/";
-			appType = RAILS;
-			return baseURI;
-		}
-		
-		UPDATE_TRACE_POINT();
-		if (shouldAutoDetectWSGI()
-		 && verifyWSGIDir(config->getAppRoot(ap_document_root(r)), cstat, throttleRate)) {
-			baseURIKnown = true;
-			baseURI = "/";
-			appType = WSGI;
-			return baseURI;
-		}
-		
-		baseURIKnown = true;
-		return NULL;
+		autoDetect();
+		return baseURI;
 	}
 	
 	/**
-	 * Returns the filename of the 'public' directory of the Rails/Rack application
+	 * Returns the filename of the 'public' directory of the application
 	 * that's associated with the HTTP request.
 	 *
-	 * Returns an empty string if the document root of the HTTP request
-	 * cannot be determined, or if it isn't a valid folder.
-	 *
 	 * @throws FileSystemException An error occured while examening the filesystem.
+	 * @throws DocumentRootDeterminationError Unable to query the location of the document root.
+	 * @throws TimeRetrievalException
+	 * @throws boost::thread_interrupted
 	 */
 	string getPublicDirectory() {
-		if (!baseURIKnown) {
-			getBaseURI();
-		}
-		if (baseURI == NULL) {
-			return "";
-		}
-		
-		const char *docRoot = ap_document_root(r);
-		size_t len = strlen(docRoot);
-		if (len > 0) {
-			string path;
-			if (docRoot[len - 1] == '/') {
-				path.assign(docRoot, len - 1);
-			} else {
-				path.assign(docRoot, len);
-			}
-			if (strcmp(baseURI, "/") != 0) {
-				/* Application is deployed in a sub-URI.
-				 * This is probably a symlink, so let's resolve it.
-				 */
-				path.append(baseURI);
-				path = resolveSymlink(path);
-			}
-			return path;
-		} else {
-			return "";
-		}
+		autoDetect();
+		return publicDir;
+	}
+
+	/**
+	 * Returns the application root, or the empty string if this request does not
+	 * belong to an application.
+	 *
+	 * @throws FileSystemException An error occured while examening the filesystem.
+	 * @throws DocumentRootDeterminationError Unable to query the location of the document root.
+	 * @throws TimeRetrievalException
+	 * @throws boost::thread_interrupted
+	 */
+	string getAppRoot() {
+		autoDetect();
+		return appRoot;
 	}
 	
 	/**
 	 * Returns the application type that's associated with the HTTP request.
 	 *
 	 * @throws FileSystemException An error occured while examening the filesystem.
+	 * @throws DocumentRootDeterminationError Unable to query the location of the document root.
+	 * @throws TimeRetrievalException
+	 * @throws boost::thread_interrupted
 	 */
-	ApplicationType getApplicationType() {
-		if (!baseURIKnown) {
-			getBaseURI();
-		}
+	PassengerAppType getApplicationType() {
+		autoDetect();
 		return appType;
 	}
 	
@@ -256,21 +244,13 @@ public:
 	 * with the HTTP request.
 	 *
 	 * @throws FileSystemException An error occured while examening the filesystem.
+	 * @throws DocumentRootDeterminationError Unable to query the location of the document root.
+	 * @throws TimeRetrievalException
+	 * @throws boost::thread_interrupted
 	 */
-	const char *getApplicationTypeString() {
-		if (!baseURIKnown) {
-			getBaseURI();
-		}
-		switch (appType) {
-		case RAILS:
-			return "rails";
-		case RACK:
-			return "rack";
-		case WSGI:
-			return "wsgi";
-		default:
-			return NULL;
-		};
+	const char *getApplicationTypeName() {
+		autoDetect();
+		return getAppTypeName(appType);
 	}
 };
 
diff --git a/ext/apache2/HelperAgent.cpp b/ext/apache2/HelperAgent.cpp
deleted file mode 100644
index 46fd2a3..0000000
--- a/ext/apache2/HelperAgent.cpp
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-
-#include <boost/shared_ptr.hpp>
-#include <boost/bind.hpp>
-#include <oxt/thread.hpp>
-#include <oxt/system_calls.hpp>
-#include <oxt/backtrace.hpp>
-
-#include <string>
-#include <sys/types.h>
-#include <sys/select.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <grp.h>
-#include <cstdlib>
-#include <cstring>
-#include <cerrno>
-
-#include "AgentBase.h"
-#include "HelperAgent/BacktracesServer.h"
-#include "Constants.h"
-#include "ApplicationPool/Pool.h"
-#include "ApplicationPool/Server.h"
-#include "AccountsDatabase.h"
-#include "Account.h"
-#include "MessageServer.h"
-#include "ServerInstanceDir.h"
-#include "ResourceLocator.h"
-#include "FileDescriptor.h"
-#include "Logging.h"
-#include "Exceptions.h"
-#include "Utils.h"
-#include "Utils/Timer.h"
-#include "Utils/MessageIO.h"
-
-using namespace std;
-using namespace boost;
-using namespace oxt;
-using namespace Passenger;
-
-class Server;
-
-
-class TimerUpdateHandler: public MessageServer::Handler {
-private:
-	Timer &timer;
-	unsigned int clients;
-	
-public:
-	TimerUpdateHandler(Timer &_timer): timer(_timer) {
-		clients = 0;
-	}
-	
-	virtual MessageServer::ClientContextPtr newClient(MessageServer::CommonClientContext &commonContext) {
-		clients++;
-		timer.stop();
-		return MessageServer::ClientContextPtr();
-	}
-	
-	virtual void clientDisconnected(MessageServer::CommonClientContext &commonContext,
-	                                MessageServer::ClientContextPtr &handlerSpecificContext)
-	{
-		clients--;
-		if (clients == 0) {
-			timer.start();
-		}
-	}
-	
-	virtual bool processMessage(MessageServer::CommonClientContext &commonContext,
-	                            MessageServer::ClientContextPtr &handlerSpecificContext,
-	                            const vector<string> &args)
-	{
-		return false;
-	}
-};
-
-class ExitHandler: public MessageServer::Handler {
-private:
-	EventFd &exitEvent;
-	
-public:
-	ExitHandler(EventFd &_exitEvent)
-		: exitEvent(_exitEvent)
-	{ }
-	
-	virtual bool processMessage(MessageServer::CommonClientContext &commonContext,
-	                            MessageServer::ClientContextPtr &handlerSpecificContext,
-	                            const vector<string> &args)
-	{
-		if (args[0] == "exit") {
-			TRACE_POINT();
-			commonContext.requireRights(Account::EXIT);
-			UPDATE_TRACE_POINT();
-			exitEvent.notify();
-			UPDATE_TRACE_POINT();
-			commonContext.channel.write("exit command received", NULL);
-			return true;
-		} else {
-			return false;
-		}
-	}
-};
-
-class Server {
-private:
-	static const unsigned int MESSAGE_SERVER_STACK_SIZE =
-		#ifdef __FreeBSD__
-			// localtime() on FreeBSD needs some more stack space.
-			1024 * 96;
-		#else
-			1024 * 64;
-		#endif
-	
-	ServerInstanceDir serverInstanceDir;
-	ServerInstanceDir::GenerationPtr generation;
-	FileDescriptor feedbackFd;
-	AnalyticsLoggerPtr analyticsLogger;
-	AccountsDatabasePtr accountsDatabase;
-	MessageServerPtr messageServer;
-	ApplicationPool::PoolPtr pool;
-	ResourceLocator resourceLocator;
-	shared_ptr<oxt::thread> prestarterThread;
-	shared_ptr<oxt::thread> messageServerThread;
-	EventFd exitEvent;
-	Timer exitTimer;
-	
-	string receivePassword() {
-		TRACE_POINT();
-		vector<string> args;
-		
-		if (!readArrayMessage(feedbackFd, args)) {
-			throw IOException("The watchdog unexpectedly closed the connection.");
-		}
-		if (args[0] != "request socket password" && args[0] != "message socket password") {
-			throw IOException("Unexpected input message '" + args[0] + "'");
-		}
-		return Base64::decode(args[1]);
-	}
-	
-	/**
-	 * Lowers this process's privilege to that of <em>username</em> and <em>groupname</em>.
-	 */
-	void lowerPrivilege(const string &username, const string &groupname) {
-		struct passwd *userEntry;
-		struct group  *groupEntry;
-		int            e;
-		
-		userEntry = getpwnam(username.c_str());
-		if (userEntry == NULL) {
-			throw NonExistentUserException(string("Unable to lower Passenger "
-				"HelperServer's privilege to that of user '") + username +
-				"': user does not exist.");
-		}
-		groupEntry = getgrnam(groupname.c_str());
-		if (groupEntry == NULL) {
-			throw NonExistentGroupException(string("Unable to lower Passenger "
-				"HelperServer's privilege to that of user '") + username +
-				"': user does not exist.");
-		}
-		
-		if (initgroups(username.c_str(), userEntry->pw_gid) != 0) {
-			e = errno;
-			throw SystemException(string("Unable to lower Passenger HelperServer's "
-				"privilege to that of user '") + username +
-				"': cannot set supplementary groups for this user", e);
-		}
-		if (setgid(groupEntry->gr_gid) != 0) {
-			e = errno;
-			throw SystemException(string("Unable to lower Passenger HelperServer's "
-				"privilege to that of user '") + username +
-				"': cannot set group ID", e);
-		}
-		if (setuid(userEntry->pw_uid) != 0) {
-			e = errno;
-			throw SystemException(string("Unable to lower Passenger HelperServer's "
-				"privilege to that of user '") + username +
-				"': cannot set user ID", e);
-		}
-	}
-	
-public:
-	Server(FileDescriptor feedbackFd,
-		pid_t webServerPid, const string &tempDir,
-		bool userSwitching, const string &defaultUser, const string &defaultGroup,
-		const string &passengerRoot, const string &rubyCommand,
-		unsigned int generationNumber, unsigned int maxPoolSize,
-		unsigned int maxInstancesPerApp, unsigned int poolIdleTime,
-		const VariantMap &options)
-		: serverInstanceDir(webServerPid, tempDir, false),
-		  resourceLocator(passengerRoot)
-	{
-		TRACE_POINT();
-		string messageSocketPassword;
-		string loggingAgentPassword;
-		
-		this->feedbackFd  = feedbackFd;
-		
-		UPDATE_TRACE_POINT();
-		messageSocketPassword = Base64::decode(options.get("message_socket_password"));
-		loggingAgentPassword  = options.get("logging_agent_password");
-		
-		generation       = serverInstanceDir.getGeneration(generationNumber);
-		accountsDatabase = AccountsDatabase::createDefault(generation,
-			userSwitching, defaultUser, defaultGroup);
-		accountsDatabase->add("_web_server", messageSocketPassword, false,
-			Account::GET | Account::DETACH | Account::SET_PARAMETERS | Account::EXIT);
-		messageServer = ptr(new MessageServer(generation->getPath() + "/socket", accountsDatabase));
-		
-		createFile(generation->getPath() + "/helper_server.pid",
-			toString(getpid()), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
-		
-		if (geteuid() == 0 && !userSwitching) {
-			lowerPrivilege(defaultUser, defaultGroup);
-		}
-		
-		UPDATE_TRACE_POINT();
-		analyticsLogger = ptr(new AnalyticsLogger(options.get("logging_agent_address"),
-			"logging", loggingAgentPassword));
-		
-		pool = ptr(new ApplicationPool::Pool(
-			resourceLocator.getSpawnServerFilename(), generation,
-			accountsDatabase, rubyCommand,
-			analyticsLogger,
-			options.getInt("log_level"),
-			options.get("debug_log_file", false)
-		));
-		pool->setMax(maxPoolSize);
-		pool->setMaxPerApp(maxInstancesPerApp);
-		pool->setMaxIdleTime(poolIdleTime);
-		
-		messageServer->addHandler(ptr(new TimerUpdateHandler(exitTimer)));
-		messageServer->addHandler(ptr(new ApplicationPool::Server(pool, analyticsLogger)));
-		messageServer->addHandler(ptr(new BacktracesServer()));
-		messageServer->addHandler(ptr(new ExitHandler(exitEvent)));
-		
-		UPDATE_TRACE_POINT();
-		writeArrayMessage(feedbackFd,
-			"initialized",
-			"",  // Request socket filename; not available in the Apache helper server.
-			messageServer->getSocketFilename().c_str(),
-			NULL);
-		
-		prestarterThread = ptr(new oxt::thread(
-			boost::bind(prestartWebApps, resourceLocator, options.get("prestart_urls"))
-		));
-	}
-	
-	~Server() {
-		TRACE_POINT();
-		prestarterThread->interrupt_and_join();
-		if (messageServerThread != NULL) {
-			messageServerThread->interrupt_and_join();
-		}
-	}
-	
-	void mainLoop() {
-		TRACE_POINT();
-		
-		messageServerThread.reset(new oxt::thread(
-			boost::bind(&MessageServer::mainLoop, messageServer.get()),
-			"MessageServer thread",
-			MESSAGE_SERVER_STACK_SIZE
-		));
-		
-		/* Wait until the watchdog closes the feedback fd (meaning it
-		 * was killed) or until we receive an exit message.
-		 */
-		this_thread::disable_syscall_interruption dsi;
-		fd_set fds;
-		int largestFd;
-		
-		FD_ZERO(&fds);
-		FD_SET(feedbackFd, &fds);
-		FD_SET(exitEvent.fd(), &fds);
-		largestFd = (feedbackFd > exitEvent.fd()) ? (int) feedbackFd : exitEvent.fd();
-		UPDATE_TRACE_POINT();
-		if (syscalls::select(largestFd + 1, &fds, NULL, NULL, NULL) == -1) {
-			int e = errno;
-			throw SystemException("select() failed", e);
-		}
-		
-		if (FD_ISSET(feedbackFd, &fds)) {
-			/* If the watchdog has been killed then we'll kill all descendant
-			 * processes and exit. There's no point in keeping this helper
-			 * server running because we can't detect when the web server exits,
-			 * and because this helper server doesn't own the server instance
-			 * directory. As soon as passenger-status is run, the server
-			 * instance directory will be cleaned up, making this helper server
-			 * inaccessible.
-			 */
-			syscalls::killpg(getpgrp(), SIGKILL);
-			_exit(2); // In case killpg() fails.
-		} else {
-			/* We received an exit command. We want to exit 5 seconds after
-			 * the last client has disconnected, .
-			 */
-			exitTimer.start();
-			exitTimer.wait(5000);
-		}
-	}
-};
-
-int
-main(int argc, char *argv[]) {
-	TRACE_POINT();
-	VariantMap options = initializeAgent(argc, argv, "PassengerHelperAgent");
-	pid_t   webServerPid  = options.getPid("web_server_pid");
-	string  tempDir       = options.get("temp_dir");
-	bool    userSwitching = options.getBool("user_switching");
-	string  defaultUser   = options.get("default_user");
-	string  defaultGroup  = options.get("default_group");
-	string  passengerRoot = options.get("passenger_root");
-	string  rubyCommand   = options.get("ruby");
-	unsigned int generationNumber   = options.getInt("generation_number");
-	unsigned int maxPoolSize        = options.getInt("max_pool_size");
-	unsigned int maxInstancesPerApp = options.getInt("max_instances_per_app");
-	unsigned int poolIdleTime       = options.getInt("pool_idle_time");
-	
-	try {
-		UPDATE_TRACE_POINT();
-		Server server(FEEDBACK_FD, webServerPid, tempDir,
-			userSwitching, defaultUser, defaultGroup,
-			passengerRoot, rubyCommand, generationNumber,
-			maxPoolSize, maxInstancesPerApp, poolIdleTime,
-			options);
-		
-		UPDATE_TRACE_POINT();
-		server.mainLoop();
-	} catch (const tracable_exception &e) {
-		P_ERROR(e.what() << "\n" << e.backtrace());
-		return 1;
-	} catch (const std::exception &e) {
-		P_ERROR(e.what());
-		return 1;
-	} catch (...) {
-		P_ERROR("Unknown exception thrown in main thread.");
-		throw;
-	}
-	
-	return 0;
-}
diff --git a/ext/apache2/Hooks.cpp b/ext/apache2/Hooks.cpp
index 02f636a..a332a90 100644
--- a/ext/apache2/Hooks.cpp
+++ b/ext/apache2/Hooks.cpp
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010, 2011, 2012 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -50,10 +50,10 @@
 #include "Bucket.h"
 #include "Configuration.hpp"
 #include "Utils.h"
+#include "Utils/IOUtils.h"
 #include "Utils/Timer.h"
 #include "Logging.h"
-#include "AgentsStarter.hpp"
-#include "ApplicationPool/Client.h"
+#include "AgentsStarter.h"
 #include "DirectoryMapper.h"
 #include "Constants.h"
 
@@ -149,6 +149,24 @@ private:
 			return OK;
 		}
 	};
+
+	class ReportDocumentRootDeterminationError: public ErrorReport {
+	private:
+		DocumentRootDeterminationError e;
+	
+	public:
+		ReportDocumentRootDeterminationError(const DocumentRootDeterminationError &ex): e(ex) { }
+		
+		int report(request_rec *r) {
+			r->status = 500;
+			ap_set_content_type(r, "text/html; charset=UTF-8");
+			ap_rputs("<h1>Passenger error #1</h1>\n", r);
+			ap_rputs("Cannot determine the document root for the current request.", r);
+			P_ERROR("Cannot determine the document root for the current request.\n" <<
+				"  Backtrace:\n" << e.backtrace());
+			return OK;
+		}
+	};
 	
 	struct RequestNote {
 		DirectoryMapper mapper;
@@ -159,6 +177,7 @@ private:
 		char *filenameBeforeModRewrite;
 		apr_filetype_e oldFileType;
 		const char *handlerBeforeModAutoIndex;
+		bool enabled;
 		
 		RequestNote(const DirectoryMapper &m, DirConfig *c)
 			: mapper(m),
@@ -169,6 +188,7 @@ private:
 			filenameBeforeModRewrite  = NULL;
 			oldFileType               = APR_NOFILE;
 			handlerBeforeModAutoIndex = NULL;
+			enabled                   = true;
 		}
 		
 		~RequestNote() {
@@ -181,55 +201,11 @@ private:
 		}
 	};
 	
-	/**
-	 * A StringListCreator which returns a list of environment variable
-	 * names and values, as found in r->subprocess_env.
-	 */
-	class EnvironmentVariablesStringListCreator: public StringListCreator {
-	private:
-		request_rec *r;
-		mutable StringListPtr result;
-	public:
-		EnvironmentVariablesStringListCreator(request_rec *r) {
-			this->r = r;
-		}
-		
-		virtual const StringListPtr getItems() const {
-			if (!result) {
-				const apr_array_header_t *env_arr;
-				apr_table_entry_t *env_entries;
-				
-				result.reset(new StringList());
-				
-				// Some standard CGI headers.
-				result->push_back("SERVER_SOFTWARE");
-				#ifdef AP_GET_SERVER_VERSION_DEPRECATED
-					result->push_back(ap_get_server_banner());
-				#else
-					result->push_back(ap_get_server_version());
-				#endif
-				
-				// Subprocess environment variables.
-				env_arr = apr_table_elts(r->subprocess_env);
-				env_entries = (apr_table_entry_t *) env_arr->elts;
-				for (int i = 0; i < env_arr->nelts; ++i) {
-					if (env_entries[i].key != NULL && env_entries[i].val != NULL) {
-						result->push_back(env_entries[i].key);
-						result->push_back(env_entries[i].val);
-					}
-				}
-			}
-			return result;
-		}
-	};
-	
 	enum Threeway { YES, NO, UNKNOWN };
 
-	thread_specific_ptr<ApplicationPool::Client> threadSpecificApplicationPool;
 	Threeway m_hasModRewrite, m_hasModDir, m_hasModAutoIndex, m_hasModXsendfile;
 	CachedFileStat cstat;
 	AgentsStarter agentsStarter;
-	AnalyticsLoggerPtr analyticsLogger;
 	
 	inline DirConfig *getDirConfig(request_rec *r) {
 		return (DirConfig *) ap_get_module_config(r->per_dir_config, &passenger_module);
@@ -239,78 +215,58 @@ private:
 	 * The existance of a request note means that the handler should be run.
 	 */
 	inline RequestNote *getRequestNote(request_rec *r) {
-		void *note = 0;
-		apr_pool_userdata_get(&note, "Phusion Passenger", r->pool);
-		return (RequestNote *) note;
-	}
-	
-	/**
-	 * Returns a usable ApplicationPool::Client object.
-	 *
-	 * When using the worker MPM and global queuing, deadlocks can occur, as
-	 * explained by ApplicationPool::Client's overview. This method allows us
-	 * to avoid deadlocks by making sure that each thread gets its own connection
-	 * to the application pool server.
-	 *
-	 * It also checks whether the currently cached ApplicationPool object
-	 * is disconnected (which can happen if an error previously occured).
-	 * If so, it will reconnect to the application pool server.
-	 *
-	 * @throws SystemException
-	 * @throws IOException
-	 * @throws RuntimeException
-	 * @throws SecurityException
-	 */
-	ApplicationPool::Client *getApplicationPool() {
-		TRACE_POINT();
-		ApplicationPool::Client *pool = threadSpecificApplicationPool.get();
-		if (pool == NULL || !pool->connected()) {
-			UPDATE_TRACE_POINT();
-			if (pool != NULL) {
-				P_DEBUG("Reconnecting to ApplicationPool server");
+		void *pointer = 0;
+		apr_pool_userdata_get(&pointer, "Phusion Passenger", r->pool);
+		if (pointer != NULL) {
+			RequestNote *note = (RequestNote *) pointer;
+			if (OXT_LIKELY(note->enabled)) {
+				return note;
+			} else {
+				return 0;
 			}
-			auto_ptr<ApplicationPool::Client> pool_ptr(new ApplicationPool::Client);
-			pool_ptr->connect(agentsStarter.getMessageSocketFilename(),
-				"_web_server", agentsStarter.getMessageSocketPassword());
-			pool = pool_ptr.release();
-			threadSpecificApplicationPool.reset(pool);
+		} else {
+			return 0;
+		}
+	}
+
+	void disableRequestNote(request_rec *r) {
+		RequestNote *note = getRequestNote(r);
+		if (note != NULL) {
+			note->enabled = false;
 		}
-		return pool;
 	}
 	
 	/**
-	 * Get a session from the application pool, similar to how
-	 * ApplicationPool::Interface::get() works. This method also checks whether
-	 * the helper server has crashed. If it did then it will attempt to
-	 * reconnect to the helper server for a small period of time until it's up
-	 * again.
-	 *
-	 * @throws SystemException
-	 * @throws IOException
-	 * @throws RuntimeException
-	 * @throws SecurityExcepion
+	 * Connect to the helper agent. If it looks like the helper agent crashed,
+	 * wait and retry for a short period of time until the helper agent has been
+	 * restarted.
 	 */
-	SessionPtr getSession(const PoolOptions &options) {
+	FileDescriptor connectToHelperAgent() {
 		TRACE_POINT();
-		ApplicationPool::Client *pool = getApplicationPool();
+		FileDescriptor conn;
+		
 		try {
-			return pool->get(options);
+			conn = connectToUnixServer(agentsStarter.getRequestSocketFilename());
+			writeExact(conn, agentsStarter.getRequestSocketPassword());
 		} catch (const SystemException &e) {
-			if (e.code() == EPIPE) {
+			if (e.code() == EPIPE || e.code() == ECONNREFUSED || e.code() == ENOENT) {
 				UPDATE_TRACE_POINT();
+				bool connected = false;
 				
-				// Maybe the helper server crashed. First wait 50 ms.
+				// Maybe the helper agent crashed. First wait 50 ms.
 				usleep(50000);
 				
-				// Then try to reconnect to the helper server for the
+				// Then try to reconnect to the helper agent for the
 				// next 5 seconds.
 				time_t deadline = time(NULL) + 5;
-				while (time(NULL) < deadline) {
+				while (!connected && time(NULL) < deadline) {
 					try {
-						pool = getApplicationPool();
+						conn = connectToUnixServer(agentsStarter.getRequestSocketFilename());
+						writeExact(conn, agentsStarter.getRequestSocketPassword());
+						connected = true;
 					} catch (const SystemException &e) {
-						if (e.code() == ECONNREFUSED || e.code() == ECONNRESET) {
-							// Looks like the helper server hasn't been
+						if (e.code() == EPIPE || e.code() == ECONNREFUSED || e.code() == ENOENT) {
+							// Looks like the helper agent hasn't been
 							// restarted yet. Wait between 20 and 100 ms.
 							usleep(20000 + rand() % 80000);
 							// Don't care about thread-safety of rand()
@@ -320,17 +276,16 @@ private:
 					}
 				}
 				
-				UPDATE_TRACE_POINT();
-				if (pool != NULL && pool->connected()) {
-					return pool->get(options);
-				} else {
+				if (!connected) {
 					UPDATE_TRACE_POINT();
-					throw IOException("Cannot connect to the helper server");
+					throw IOException("Cannot connect to the helper agent at " +
+						agentsStarter.getRequestSocketFilename());
 				}
 			} else {
 				throw;
 			}
 		}
+		return conn;
 	}
 	
 	bool hasModRewrite() {
@@ -377,13 +332,6 @@ private:
 		return m_hasModXsendfile == YES;
 	}
 	
-	int reportDocumentRootDeterminationError(request_rec *r) {
-		ap_set_content_type(r, "text/html; charset=UTF-8");
-		ap_rputs("<h1>Passenger error #1</h1>\n", r);
-		ap_rputs("Cannot determine the document root for the current request.", r);
-		return OK;
-	}
-	
 	int reportBusyException(request_rec *r) {
 		ap_custom_response(r, HTTP_SERVICE_UNAVAILABLE,
 			"This website is too busy right now.  Please try again later.");
@@ -416,10 +364,17 @@ private:
 		
 		DirectoryMapper mapper(r, config, &cstat, config->getStatThrottleRate());
 		try {
-			if (mapper.getBaseURI() == NULL) {
+			if (mapper.getApplicationType() == PAT_NONE) {
 				// (B) is not true.
+				disableRequestNote(r);
 				return false;
 			}
+		} catch (const DocumentRootDeterminationError &e) {
+			auto_ptr<RequestNote> note(new RequestNote(mapper, config));
+			note->errorReport = new ReportDocumentRootDeterminationError(e);
+			apr_pool_userdata_set(note.release(), "Phusion Passenger",
+				RequestNote::cleanup, r->pool);
+			return true;
 		} catch (const FileSystemException &e) {
 			/* DirectoryMapper tried to examine the filesystem in order
 			 * to autodetect the application type (e.g. by checking whether
@@ -441,6 +396,7 @@ private:
 					RequestNote::cleanup, r->pool);
 				return true;
 			} else {
+				disableRequestNote(r);
 				return false;
 			}
 		}
@@ -451,6 +407,7 @@ private:
 			FileType fileType = getFileType(filename);
 			if (fileType == FT_REGULAR) {
 				// (C) is true.
+				disableRequestNote(r);
 				return false;
 			}
 			
@@ -470,14 +427,14 @@ private:
 					len = strlen(filename);
 					if (len > 0 && filename[len - 1] == '/') {
 						pageCacheFile = apr_pstrcat(r->pool, filename,
-							"index.html", NULL);
+							"index.html", (char *) NULL);
 					} else {
 						pageCacheFile = apr_pstrcat(r->pool, filename,
-							".html", NULL);
+							".html", (char *) NULL);
 					}
 				} else {
 					pageCacheFile = apr_pstrcat(r->pool, filename,
-						".html", NULL);
+						".html", (char *) NULL);
 				}
 				if (!fileExists(pageCacheFile)) {
 					pageCacheFile = NULL;
@@ -511,6 +468,7 @@ private:
 			 * don't let the handler hook run so that Apache can decide how
 			 * to display the error.
 			 */
+			disableRequestNote(r);
 			return false;
 		}
 	}
@@ -542,14 +500,11 @@ private:
 		TRACE_POINT();
 		DirConfig *config = note->config;
 		DirectoryMapper &mapper = note->mapper;
-		string publicDirectory, appRoot;
 		
 		try {
-			publicDirectory = mapper.getPublicDirectory();
-			if (publicDirectory.empty()) {
-				return reportDocumentRootDeterminationError(r);
-			}
-			appRoot = config->getAppRoot(publicDirectory.c_str());
+			mapper.getPublicDirectory();
+		} catch (const DocumentRootDeterminationError &e) {
+			return ReportDocumentRootDeterminationError(e).report(r);
 		} catch (const FileSystemException &e) {
 			/* The application root cannot be determined. This could
 			 * happen if, for example, the user specified 'RailsBaseURI /foo'
@@ -562,18 +517,6 @@ private:
 		
 		UPDATE_TRACE_POINT();
 		try {
-			AnalyticsLogPtr log;
-			if (config->useUnionStation()) {
-				log = analyticsLogger->newTransaction(
-					config->getAppGroupName(appRoot),
-					"requests",
-					config->unionStationKey,
-					config->getUnionStationFilterString());
-				log->message(string("URI: ") + r->uri);
-			} else {
-				log.reset(new AnalyticsLog());
-			}
-			
 			/********** Step 2: handle HTTP upload data, if any **********/
 			
 			int httpStatus = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK);
@@ -583,7 +526,6 @@ private:
 			
 			this_thread::disable_interruption di;
 			this_thread::disable_syscall_interruption dsi;
-			SessionPtr session;
 			bool expectingUploadData;
 			string uploadDataMemory;
 			shared_ptr<BufferedUpload> uploadDataFile;
@@ -631,86 +573,49 @@ private:
 			}
 			
 			
-			/********** Step 3: forwarding the request to a backend
-			                    process from the application pool **********/
+			/********** Step 3: forwarding the request and request body
+			                    to the HelperAgent **********/
 			
-			AnalyticsScopeLog requestProcessingScope(log, "request processing");
+			vector<StaticString> requestData;
+			string headerData;
+			unsigned int size;
+			char sizeString[16];
+			int ret;
 			
-			try {
-				AnalyticsScopeLog scope(log, "get from pool");
-				PoolOptions options(
-					appRoot,
-					config->getAppGroupName(appRoot),
-					mapper.getApplicationTypeString(),
-					config->getEnvironment(),
-					config->getSpawnMethodString(),
-					config->getUser(),
-					config->getGroup(),
-					serverConfig.defaultUser,
-					serverConfig.defaultGroup,
-					config->frameworkSpawnerTimeout,
-					config->appSpawnerTimeout,
-					mapper.getBaseURI(),
-					config->getMaxRequests(),
-					config->getMinInstances(),
-					config->usingGlobalQueue(),
-					true,
-					config->getStatThrottleRate(),
-					config->getRestartDir(),
-					DEFAULT_BACKEND_ACCOUNT_RIGHTS,
-					false,
-					config->useUnionStation(),
-					log->isNull() ? AnalyticsLogPtr() : log
-				);
-				options.environmentVariables = ptr(new EnvironmentVariablesStringListCreator(r));
-				
-				session = getSession(options);
-				P_TRACE(3, "Forwarding " << r->uri << " to PID " << session->getPid());
-				scope.success();
-				log->message("Application PID: " + toString(session->getPid()) +
-					" (GUPID: " + session->getGupid() + ")");
-			} catch (const SpawnException &e) {
-				r->status = 500;
-				if (e.hasErrorPage() && config->showFriendlyErrorPages()) {
-					ap_set_content_type(r, "text/html; charset=utf-8");
-					ap_rputs(e.getErrorPage().c_str(), r);
-					return OK;
-				} else {
-					throw;
-				}
-			} catch (const BusyException &e) {
-				return reportBusyException(r);
-			}
+			requestData.reserve(3);
+			headerData.reserve(1024 * 2);
+			requestData.push_back(StaticString());
+			size = constructHeaders(r, config, requestData, mapper, headerData);
+			requestData.push_back(",");
 			
-			UPDATE_TRACE_POINT();
-			AnalyticsScopeLog requestProxyingScope(log, "request proxying");
+			ret = snprintf(sizeString, sizeof(sizeString) - 1, "%u:", size);
+			sizeString[ret] = '\0';
+			requestData[0] = StaticString(sizeString, ret);
 			
-			{
-				AnalyticsScopeLog scope(log, "send request headers");
-				sendHeaders(r, config, session, mapper.getBaseURI(), log, appRoot);
-				scope.success();
-			}
-			if (expectingUploadData) {
-				AnalyticsScopeLog scope(log, "send request body");
-				if (uploadDataFile != NULL) {
-					sendRequestBody(r, session, uploadDataFile);
-					uploadDataFile.reset();
-				} else {
-					sendRequestBody(r, session, uploadDataMemory);
-				}
-				scope.success();
+			if (expectingUploadData && uploadDataFile == NULL) {
+				requestData.push_back(uploadDataMemory);
 			}
-			try {
-				session->shutdownWriter();
-			} catch (const SystemException &e) {
-				// Ignore ENOTCONN. This error occurs for some people
-				// for unknown reasons, but it's harmless.
-				if (e.code() != ENOTCONN) {
-					throw;
-				}
+			
+			FileDescriptor conn = connectToHelperAgent();
+			gatheredWrite(conn, &requestData[0], requestData.size());
+			
+			if (expectingUploadData && uploadDataFile != NULL) {
+				sendRequestBody(conn, uploadDataFile);
+				uploadDataFile.reset();
 			}
 			
+			do {
+				ret = shutdown(conn, SHUT_WR);
+			} while (ret == -1 && errno == EINTR);
+			if (ret == -1 && errno != ENOTCONN) {
+				// FreeBSD has a kernel bug which causes shutdown()
+				// to harmlessly return ENOTCONN sometimes. See comment
+				// in safelyClose().
+				int e = errno;
+				throw SystemException("Cannot shutdown(SHUT_WR) HelperAgent connection", e);
+			}
 			
+
 			/********** Step 4: forwarding the response from the backend
 			                    process back to the HTTP client **********/
 			
@@ -718,21 +623,14 @@ private:
 			apr_bucket_brigade *bb;
 			apr_bucket *b;
 			PassengerBucketStatePtr bucketState;
-			pid_t backendPid;
 			
 			/* Setup the bucket brigade. */
-			bucketState = ptr(new PassengerBucketState());
 			bb = apr_brigade_create(r->connection->pool, r->connection->bucket_alloc);
-			b = passenger_bucket_create(session, bucketState, r->connection->bucket_alloc, config->getBufferResponse());
-			
-			/* The bucket (b) still has a reference to the session, so the reset()
-			 * call here is guaranteed not to throw any exceptions.
-			 */
-			backendPid = session->getPid();
-			session.reset();
 			
+			bucketState = make_shared<PassengerBucketState>(conn);
+			b = passenger_bucket_create(bucketState, r->connection->bucket_alloc, config->getBufferResponse());
 			APR_BRIGADE_INSERT_TAIL(bb, b);
-
+			
 			b = apr_bucket_eos_create(r->connection->bucket_alloc);
 			APR_BRIGADE_INSERT_TAIL(bb, b);
 
@@ -767,16 +665,16 @@ private:
 						r->status);
 				}
 				apr_table_setn(r->headers_out, "Status", r->status_line);
-				log->message(string("Status: ") + r->status_line);
 				
-				bool xsendfile = hasModXsendfile() &&
-					apr_table_get(r->err_headers_out, "X-Sendfile");
+				//bool xsendfile = hasModXsendfile() &&
+				//	apr_table_get(r->err_headers_out, "X-Sendfile");
 				
 				UPDATE_TRACE_POINT();
 				ap_pass_brigade(r->output_filters, bb);
 				
+				/*
 				if (r->connection->aborted) {
-					P_WARN("Either the vistor clicked on the 'Stop' button in the "
+					P_WARN("Either the visitor clicked on the 'Stop' button in the "
 						"web browser, or the visitor's connection has stalled "
 						"and couldn't receive the data that Apache is sending "
 						"to it. As a result, you will probably see a 'Broken Pipe' "
@@ -790,14 +688,12 @@ private:
 					P_WARN("Apache stopped forwarding the backend's response, "
 						"even though the HTTP client did not close the "
 						"connection. Is this an Apache bug?");
-				} else {
-					requestProxyingScope.success();
-					requestProcessingScope.success();
 				}
+				*/
 				
 				return OK;
 			} else if (backendData[0] == '\0') {
-				if ((long long) timer.elapsed() >= r->server->timeout / 1000) {
+				/* if ((long long) timer.elapsed() >= r->server->timeout / 1000) {
 					// Looks like an I/O timeout.
 					P_ERROR("No data received from " <<
 						"the backend application (process " <<
@@ -817,11 +713,11 @@ private:
 						"at all. It is possible that it has crashed; " <<
 						"please check whether there are crashing " <<
 						"bugs in this application.");
-				}
+				} */
 				apr_table_setn(r->err_headers_out, "Status", "500 Internal Server Error");
 				return HTTP_INTERNAL_SERVER_ERROR;
 			} else {
-				if ((long long) timer.elapsed() >= r->server->timeout / 1000) {
+				/* if ((long long) timer.elapsed() >= r->server->timeout / 1000) {
 					// Looks like an I/O timeout.
 					P_ERROR("The backend application (process " <<
 						backendPid << ") hasn't sent a valid " <<
@@ -846,7 +742,7 @@ private:
 						"are crashing problems in your application. " <<
 						"This is the data that it sent: [" <<
 						backendData << "]");
-				}
+				} */
 				apr_table_setn(r->err_headers_out, "Status", "500 Internal Server Error");
 				return HTTP_INTERNAL_SERVER_ERROR;
 			}
@@ -866,10 +762,6 @@ private:
 			P_ERROR("Unexpected error in mod_passenger: " <<
 				e.what() << "\n" << "  Backtrace: not available");
 			return HTTP_INTERNAL_SERVER_ERROR;
-		
-		} catch (...) {
-			P_ERROR("An unexpected, unknown error occured in mod_passenger.");
-			throw;
 		}
 	}
 	
@@ -926,7 +818,7 @@ private:
 	 * Convert an HTTP header name to a CGI environment name.
 	 */
 	char *httpToEnv(apr_pool_t *p, const char *headerName) {
-		char *result  = apr_pstrcat(p, "HTTP_", headerName, NULL);
+		char *result  = apr_pstrcat(p, "HTTP_", headerName, (char *) NULL);
 		char *current = result + sizeof("HTTP_") - 1;
 		
 		while (*current != '\0') {
@@ -961,20 +853,29 @@ private:
 		return lookupInTable(r->subprocess_env, name);
 	}
 	
-	void inline addHeader(apr_table_t *table, const char *name, const char *value) {
+	void addHeader(string &headers, const char *name, const char *value) {
 		if (name != NULL && value != NULL) {
-			apr_table_addn(table, name, value);
+			headers.append(name);
+			headers.append(1, '\0');
+			headers.append(value);
+			headers.append(1, '\0');
 		}
 	}
 	
-	apr_status_t sendHeaders(request_rec *r, DirConfig *config, SessionPtr &session,
-		const char *baseURI, const AnalyticsLogPtr &log, const string &appRoot)
-	{
-		apr_table_t *headers;
-		headers = apr_table_make(r->pool, 40);
-		if (headers == NULL) {
-			return APR_ENOMEM;
+	void addHeader(string &headers, const char *name, const StaticString &value) {
+		if (name != NULL) {
+			headers.append(name);
+			headers.append(1, '\0');
+			headers.append(value.c_str(), value.size());
+			headers.append(1, '\0');
 		}
+	}
+	
+	unsigned int constructHeaders(request_rec *r, DirConfig *config,
+		vector<StaticString> &requestData, DirectoryMapper &mapper,
+		string &output)
+	{
+		const char *baseURI = mapper.getBaseURI();
 		
 		/*
 		 * Apache unescapes URI's before passing them to Phusion Passenger,
@@ -990,28 +891,28 @@ private:
 		
 		// Set standard CGI variables.
 		#ifdef AP_GET_SERVER_VERSION_DEPRECATED
-			addHeader(headers, "SERVER_SOFTWARE", ap_get_server_banner());
+			addHeader(output, "SERVER_SOFTWARE", ap_get_server_banner());
 		#else
-			addHeader(headers, "SERVER_SOFTWARE", ap_get_server_version());
+			addHeader(output, "SERVER_SOFTWARE", ap_get_server_version());
 		#endif
-		addHeader(headers, "SERVER_PROTOCOL", r->protocol);
-		addHeader(headers, "SERVER_NAME",     ap_get_server_name(r));
-		addHeader(headers, "SERVER_ADMIN",    r->server->server_admin);
-		addHeader(headers, "SERVER_ADDR",     r->connection->local_ip);
-		addHeader(headers, "SERVER_PORT",     apr_psprintf(r->pool, "%u", ap_get_server_port(r)));
+		addHeader(output, "SERVER_PROTOCOL", r->protocol);
+		addHeader(output, "SERVER_NAME",     ap_get_server_name(r));
+		addHeader(output, "SERVER_ADMIN",    r->server->server_admin);
+		addHeader(output, "SERVER_ADDR",     r->connection->local_ip);
+		addHeader(output, "SERVER_PORT",     apr_psprintf(r->pool, "%u", ap_get_server_port(r)));
 		#if HTTP_VERSION(AP_SERVER_MAJORVERSION_NUMBER, AP_SERVER_MINORVERSION_NUMBER) >= 2004
-			addHeader(headers, "REMOTE_ADDR", r->connection->client_ip);
-			addHeader(headers, "REMOTE_PORT", apr_psprintf(r->pool, "%d", r->connection->client_addr->port));
+			addHeader(output, "REMOTE_ADDR", r->connection->client_ip);
+			addHeader(output, "REMOTE_PORT", apr_psprintf(r->pool, "%d", r->connection->client_addr->port));
 		#else
-			addHeader(headers, "REMOTE_ADDR", r->connection->remote_ip);
-			addHeader(headers, "REMOTE_PORT", apr_psprintf(r->pool, "%d", r->connection->remote_addr->port));
+			addHeader(output, "REMOTE_ADDR", r->connection->remote_ip);
+			addHeader(output, "REMOTE_PORT", apr_psprintf(r->pool, "%d", r->connection->remote_addr->port));
 		#endif
-		addHeader(headers, "REMOTE_USER",     r->user);
-		addHeader(headers, "REQUEST_METHOD",  r->method);
-		addHeader(headers, "QUERY_STRING",    r->args ? r->args : "");
-		addHeader(headers, "HTTPS",           lookupEnv(r, "HTTPS"));
-		addHeader(headers, "CONTENT_TYPE",    lookupHeader(r, "Content-type"));
-		addHeader(headers, "DOCUMENT_ROOT",   ap_document_root(r));
+		addHeader(output, "REMOTE_USER",     r->user);
+		addHeader(output, "REQUEST_METHOD",  r->method);
+		addHeader(output, "QUERY_STRING",    r->args ? r->args : "");
+		addHeader(output, "HTTPS",           lookupEnv(r, "HTTPS"));
+		addHeader(output, "CONTENT_TYPE",    lookupHeader(r, "Content-type"));
+		addHeader(output, "DOCUMENT_ROOT",   ap_document_root(r));
 		
 		if (config->allowsEncodedSlashes()) {
 			/*
@@ -1023,23 +924,23 @@ private:
 			 * http://code.google.com/p/phusion-passenger/issues/detail?id=113
 			 * http://code.google.com/p/phusion-passenger/issues/detail?id=230
 			 */
-			addHeader(headers, "REQUEST_URI", r->unparsed_uri);
+			addHeader(output, "REQUEST_URI", r->unparsed_uri);
 		} else {
 			const char *request_uri;
 			if (r->args != NULL) {
-				request_uri = apr_pstrcat(r->pool, escapedUri, "?", r->args, NULL);
+				request_uri = apr_pstrcat(r->pool, escapedUri, "?", r->args, (char *) NULL);
 			} else {
 				request_uri = escapedUri;
 			}
-			addHeader(headers, "REQUEST_URI", request_uri);
+			addHeader(output, "REQUEST_URI", request_uri);
 		}
 		
-		if (strcmp(baseURI, "/") == 0) {
-			addHeader(headers, "SCRIPT_NAME", "");
-			addHeader(headers, "PATH_INFO", escapedUri);
+		if (baseURI == NULL) {
+			addHeader(output, "SCRIPT_NAME", "");
+			addHeader(output, "PATH_INFO", escapedUri);
 		} else {
-			addHeader(headers, "SCRIPT_NAME", baseURI);
-			addHeader(headers, "PATH_INFO", escapedUri + strlen(baseURI));
+			addHeader(output, "SCRIPT_NAME", baseURI);
+			addHeader(output, "PATH_INFO", escapedUri + strlen(baseURI));
 		}
 		
 		// Set HTTP headers.
@@ -1051,7 +952,7 @@ private:
 		hdrs = (apr_table_entry_t *) hdrs_arr->elts;
 		for (i = 0; i < hdrs_arr->nelts; ++i) {
 			if (hdrs[i].key) {
-				addHeader(headers, httpToEnv(r->pool, hdrs[i].key), hdrs[i].val);
+				addHeader(output, httpToEnv(r->pool, hdrs[i].key), hdrs[i].val);
 			}
 		}
 		
@@ -1062,65 +963,47 @@ private:
 		env_arr = apr_table_elts(r->subprocess_env);
 		env = (apr_table_entry_t*) env_arr->elts;
 		for (i = 0; i < env_arr->nelts; ++i) {
-			addHeader(headers, env[i].key, env[i].val);
-		}
-		
-		if (!log->isNull()) {
-			addHeader(headers, "PASSENGER_GROUP_NAME",
-				config->getAppGroupName(appRoot).c_str());
-			addHeader(headers, "PASSENGER_TXN_ID", log->getTxnId().c_str());
-			addHeader(headers, "PASSENGER_UNION_STATION_KEY", config->unionStationKey.c_str());
+			addHeader(output, env[i].key, env[i].val);
 		}
 		
-		// Now send the headers.
-		string buffer;
-		
-		hdrs_arr = apr_table_elts(headers);
-    		hdrs = (apr_table_entry_t*) hdrs_arr->elts;
-    		buffer.reserve(1024 * 4);
-		for (i = 0; i < hdrs_arr->nelts; ++i) {
-			buffer.append(hdrs[i].key);
-			buffer.append(1, '\0');
-			buffer.append(hdrs[i].val);
-			buffer.append(1, '\0');
+		// Phusion Passenger options.
+		addHeader(output, "PASSENGER_STATUS_LINE", "false");
+		addHeader(output, "PASSENGER_APP_ROOT", mapper.getAppRoot());
+		addHeader(output, "PASSENGER_APP_GROUP_NAME", config->getAppGroupName(mapper.getAppRoot()));
+		addHeader(output, "PASSENGER_RUBY", config->ruby ? config->ruby : serverConfig.defaultRuby);
+		addHeader(output, "PASSENGER_PYTHON", config->python);
+		addHeader(output, "PASSENGER_ENV", config->getEnvironment());
+		addHeader(output, "PASSENGER_SPAWN_METHOD", config->getSpawnMethodString());
+		addHeader(output, "PASSENGER_USER", config->getUser());
+		addHeader(output, "PASSENGER_GROUP", config->getGroup());
+		addHeader(output, "PASSENGER_APP_TYPE", mapper.getApplicationTypeName());
+		addHeader(output, "PASSENGER_MIN_INSTANCES",
+			apr_psprintf(r->pool, "%ld", config->getMinInstances()));
+		addHeader(output, "PASSENGER_MAX_PRELOADER_IDLE_TIME",
+			apr_psprintf(r->pool, "%ld", config->maxPreloaderIdleTime));
+		addHeader(output, "PASSENGER_DEBUGGER", "false");
+		addHeader(output, "PASSENGER_SHOW_VERSION_IN_HEADER", "true");
+		addHeader(output, "PASSENGER_MAX_REQUESTS",
+			apr_psprintf(r->pool, "%ld", config->getMaxRequests()));
+		addHeader(output, "PASSENGER_STAT_THROTTLE_RATE",
+			apr_psprintf(r->pool, "%ld", config->getStatThrottleRate()));
+		addHeader(output, "PASSENGER_RESTART_DIR", config->getRestartDir());
+		addHeader(output, "PASSENGER_FRIENDLY_ERROR_PAGES",
+			config->showFriendlyErrorPages() ? "true" : "false");
+		if (config->useUnionStation() && !config->unionStationKey.empty()) {
+			addHeader(output, "UNION_STATION_SUPPORT", "true");
+			addHeader(output, "UNION_STATION_KEY", config->unionStationKey);
+			if (!config->unionStationFilters.empty()) {
+				addHeader(output, "UNION_STATION_FILTERS",
+					config->getUnionStationFilterString());
+			}
 		}
 		
-		buffer.append("PASSENGER_CONNECT_PASSWORD");
-		buffer.append(1, '\0');
-		buffer.append(session->getConnectPassword());
-		buffer.append(1, '\0');
-		
 		/*********************/
 		/*********************/
 		
-		/*
-		 * If the last header value is an empty string, then the buffer
-		 * will end with "\0\0". For example, if 'SSLOptions +ExportCertData'
-		 * is set, and there's no client certificate, and 'SSL_CLIENT_CERT'
-		 * is the last header, then the buffer will end with:
-		 *
-		 *   "SSL_CLIENT_CERT\0\0"
-		 *
-		 * The data in the buffer will be processed by the AbstractRequestHandler class,
-		 * which is implemented in Ruby. But it uses Hash[*data.split("\0")] to
-		 * unserialize the data. Unfortunately String#split will not transform
-		 * the trailing "\0\0" into an empty string:
-		 *
-		 *   "SSL_CLIENT_CERT\0\0".split("\0")
-		 *   # => desired result: ["SSL_CLIENT_CERT", ""]
-		 *   # => actual result:  ["SSL_CLIENT_CERT"]
-		 *
-		 * When that happens, Hash[..] will raise an ArgumentError because
-		 * data.split("\0") does not return an array with a length that is a
-		 * multiple of 2.
-		 *
-		 * So here, we add a dummy header to prevent situations like that from
-		 * happening.
-		 */
-		buffer.append("_\0_\0", 4);
-		
-		session->sendHeaders(buffer);
-		return APR_SUCCESS;
+		requestData.push_back(output);
+		return output.size();
 	}
 	
 	void throwUploadBufferingException(request_rec *r, int code) {
@@ -1211,7 +1094,7 @@ private:
 		
 		rv = ap_get_brigade(r->input_filters, bb, AP_MODE_READBYTES,
 		                    APR_BLOCK_READ, bufsiz);
-			
+		
 		/* We lose the failure code here.  This is why ap_get_client_block should
 		 * not be used.
 		 */
@@ -1354,7 +1237,7 @@ private:
 		}
 	}
 	
-	void sendRequestBody(request_rec *r, SessionPtr &session, shared_ptr<BufferedUpload> &uploadData) {
+	void sendRequestBody(const FileDescriptor &fd, shared_ptr<BufferedUpload> &uploadData) {
 		TRACE_POINT();
 		rewind(uploadData->handle);
 		while (!feof(uploadData->handle)) {
@@ -1362,19 +1245,14 @@ private:
 			size_t size;
 			
 			size = fread(buf, 1, sizeof(buf), uploadData->handle);
-			
-			session->sendBodyBlock(buf, size);
+			writeExact(fd, buf, size);
 		}
 	}
-	
-	void sendRequestBody(request_rec *r, SessionPtr &session, const string &buffer) {
-		session->sendBodyBlock(buffer.c_str(), buffer.size());
-	}
 
 public:
 	Hooks(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
 	    : cstat(1024),
-	      agentsStarter(AgentsStarter::APACHE)
+	      agentsStarter(AS_APACHE)
 	{
 		serverConfig.finalize();
 		Passenger::setLogLevel(serverConfig.logLevel);
@@ -1395,27 +1273,33 @@ public:
 				"TIP: The correct value for this option was given to you by "
 				"'passenger-install-apache2-module'.");
 		}
+
+		VariantMap params;
+		params
+			.setPid ("web_server_pid", getpid())
+			.setUid ("web_server_worker_uid", unixd_config.user_id)
+			.setGid ("web_server_worker_gid", unixd_config.group_id)
+			.setInt ("log_level", serverConfig.logLevel)
+			.set    ("debug_log_file", (serverConfig.debugLogFile == NULL) ? "" : serverConfig.debugLogFile)
+			.set    ("temp_dir", serverConfig.tempDir)
+			.setBool("user_switching", serverConfig.userSwitching)
+			.set    ("default_user", serverConfig.defaultUser)
+			.set    ("default_group", serverConfig.defaultGroup)
+			.set    ("default_ruby", serverConfig.defaultRuby)
+			.setInt ("max_pool_size", serverConfig.maxPoolSize)
+			.setInt ("pool_idle_time", serverConfig.poolIdleTime)
+			.setInt ("max_instances_per_app", serverConfig.maxInstancesPerApp)
+			.set    ("analytics_log_user", serverConfig.analyticsLogUser)
+			.set    ("analytics_log_group", serverConfig.analyticsLogGroup)
+			.set    ("union_station_gateway_address", serverConfig.unionStationGatewayAddress)
+			.setInt ("union_station_gateway_port", serverConfig.unionStationGatewayPort)
+			.set    ("union_station_gateway_cert", serverConfig.unionStationGatewayCert)
+			.set    ("union_station_proxy_address", serverConfig.unionStationProxyAddress)
+			.setStrSet("prestart_urls", serverConfig.prestartURLs);
 		
-		agentsStarter.start(serverConfig.logLevel,
-			(serverConfig.debugLogFile == NULL) ? "" : serverConfig.debugLogFile,
-			getpid(), serverConfig.tempDir,
-			serverConfig.userSwitching,
-			serverConfig.defaultUser, serverConfig.defaultGroup,
-			unixd_config.user_id, unixd_config.group_id,
-			serverConfig.root, serverConfig.ruby, serverConfig.maxPoolSize,
-			serverConfig.maxInstancesPerApp, serverConfig.poolIdleTime,
-			"",
-			serverConfig.analyticsLogDir, serverConfig.analyticsLogUser,
-			serverConfig.analyticsLogGroup, serverConfig.analyticsLogPermissions,
-			serverConfig.unionStationGatewayAddress,
-			serverConfig.unionStationGatewayPort,
-			serverConfig.unionStationGatewayCert,
-			serverConfig.unionStationProxyAddress,
-			serverConfig.unionStationProxyType,
-			serverConfig.prestartURLs);
-		
-		analyticsLogger = ptr(new AnalyticsLogger(agentsStarter.getLoggingSocketAddress(),
-			"logging", agentsStarter.getLoggingSocketPassword()));
+		serverConfig.ctl.addTo(params);
+
+		agentsStarter.start(serverConfig.root, params);
 		
 		// Store some relevant information in the generation directory.
 		string generationPath = agentsStarter.getGeneration()->getPath();
@@ -1747,11 +1631,11 @@ init_module(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *
 		
 		fprintf(stderr, "Output of 'uname -a' follows:\n");
 		fflush(stderr);
-		system("uname -a >&2");
+		::system("uname -a >&2");
 		
 		fprintf(stderr, "\nOutput of 'ulimit -a' follows:\n");
 		fflush(stderr);
-		system("ulimit -a >&2");
+		::system("ulimit -a >&2");
 		
 		return DECLINED;
 		
diff --git a/ext/apache2/Hooks.h b/ext/apache2/Hooks.h
index 8278e00..ec9b7af 100644
--- a/ext/apache2/Hooks.h
+++ b/ext/apache2/Hooks.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/ext/apache2/mod_passenger.c b/ext/apache2/mod_passenger.c
index 2687d0a..437833f 100644
--- a/ext/apache2/mod_passenger.c
+++ b/ext/apache2/mod_passenger.c
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010, 2011, 2012 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/ext/boost/._bind.hpp b/ext/boost/._bind.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._bind.hpp and /dev/null differ
diff --git a/ext/boost/._checked_delete.hpp b/ext/boost/._checked_delete.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._checked_delete.hpp and /dev/null differ
diff --git a/ext/boost/._enable_shared_from_this.hpp b/ext/boost/._enable_shared_from_this.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._enable_shared_from_this.hpp and /dev/null differ
diff --git a/ext/boost/._exception_ptr.hpp b/ext/boost/._exception_ptr.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._exception_ptr.hpp and /dev/null differ
diff --git a/ext/boost/._function_equal.hpp b/ext/boost/._function_equal.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._function_equal.hpp and /dev/null differ
diff --git a/ext/boost/._get_pointer.hpp b/ext/boost/._get_pointer.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._get_pointer.hpp and /dev/null differ
diff --git a/ext/boost/._implicit_cast.hpp b/ext/boost/._implicit_cast.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._implicit_cast.hpp and /dev/null differ
diff --git a/ext/boost/._integer.hpp b/ext/boost/._integer.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._integer.hpp and /dev/null differ
diff --git a/ext/boost/._io_fwd.hpp b/ext/boost/._io_fwd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._io_fwd.hpp and /dev/null differ
diff --git a/ext/boost/._is_placeholder.hpp b/ext/boost/._is_placeholder.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._is_placeholder.hpp and /dev/null differ
diff --git a/ext/boost/._limits.hpp b/ext/boost/._limits.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._limits.hpp and /dev/null differ
diff --git a/ext/boost/._make_shared.hpp b/ext/boost/._make_shared.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._make_shared.hpp and /dev/null differ
diff --git a/ext/boost/._mem_fn.hpp b/ext/boost/._mem_fn.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._mem_fn.hpp and /dev/null differ
diff --git a/ext/boost/._memory_order.hpp b/ext/boost/._memory_order.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._memory_order.hpp and /dev/null differ
diff --git a/ext/boost/._next_prior.hpp b/ext/boost/._next_prior.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._next_prior.hpp and /dev/null differ
diff --git a/ext/boost/._non_type.hpp b/ext/boost/._non_type.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._non_type.hpp and /dev/null differ
diff --git a/ext/boost/._noncopyable.hpp b/ext/boost/._noncopyable.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._noncopyable.hpp and /dev/null differ
diff --git a/ext/boost/._none_t.hpp b/ext/boost/._none_t.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._none_t.hpp and /dev/null differ
diff --git a/ext/boost/._optional.hpp b/ext/boost/._optional.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._optional.hpp and /dev/null differ
diff --git a/ext/boost/._ref.hpp b/ext/boost/._ref.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._ref.hpp and /dev/null differ
diff --git a/ext/boost/._scoped_array.hpp b/ext/boost/._scoped_array.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._scoped_array.hpp and /dev/null differ
diff --git a/ext/boost/._scoped_ptr.hpp b/ext/boost/._scoped_ptr.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._scoped_ptr.hpp and /dev/null differ
diff --git a/ext/boost/._shared_array.hpp b/ext/boost/._shared_array.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._shared_array.hpp and /dev/null differ
diff --git a/ext/boost/._shared_ptr.hpp b/ext/boost/._shared_ptr.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._shared_ptr.hpp and /dev/null differ
diff --git a/ext/boost/._thread.hpp b/ext/boost/._thread.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._thread.hpp and /dev/null differ
diff --git a/ext/boost/._token_iterator.hpp b/ext/boost/._token_iterator.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._token_iterator.hpp and /dev/null differ
diff --git a/ext/boost/._tokenizer.hpp b/ext/boost/._tokenizer.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._tokenizer.hpp and /dev/null differ
diff --git a/ext/boost/._type.hpp b/ext/boost/._type.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._type.hpp and /dev/null differ
diff --git a/ext/boost/._utility.hpp b/ext/boost/._utility.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._utility.hpp and /dev/null differ
diff --git a/ext/boost/._visit_each.hpp b/ext/boost/._visit_each.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._visit_each.hpp and /dev/null differ
diff --git a/ext/boost/._weak_ptr.hpp b/ext/boost/._weak_ptr.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/._weak_ptr.hpp and /dev/null differ
diff --git a/ext/boost/algorithm/string/._case_conv.hpp b/ext/boost/algorithm/string/._case_conv.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/algorithm/string/._case_conv.hpp and /dev/null differ
diff --git a/ext/boost/algorithm/string/._compare.hpp b/ext/boost/algorithm/string/._compare.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/algorithm/string/._compare.hpp and /dev/null differ
diff --git a/ext/boost/algorithm/string/._concept.hpp b/ext/boost/algorithm/string/._concept.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/algorithm/string/._concept.hpp and /dev/null differ
diff --git a/ext/boost/algorithm/string/._config.hpp b/ext/boost/algorithm/string/._config.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/algorithm/string/._config.hpp and /dev/null differ
diff --git a/ext/boost/algorithm/string/._constants.hpp b/ext/boost/algorithm/string/._constants.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/algorithm/string/._constants.hpp and /dev/null differ
diff --git a/ext/boost/algorithm/string/._erase.hpp b/ext/boost/algorithm/string/._erase.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/algorithm/string/._erase.hpp and /dev/null differ
diff --git a/ext/boost/algorithm/string/._find_format.hpp b/ext/boost/algorithm/string/._find_format.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/algorithm/string/._find_format.hpp and /dev/null differ
diff --git a/ext/boost/algorithm/string/._finder.hpp b/ext/boost/algorithm/string/._finder.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/algorithm/string/._finder.hpp and /dev/null differ
diff --git a/ext/boost/algorithm/string/._replace.hpp b/ext/boost/algorithm/string/._replace.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/algorithm/string/._replace.hpp and /dev/null differ
diff --git a/ext/boost/algorithm/string/._sequence_traits.hpp b/ext/boost/algorithm/string/._sequence_traits.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/algorithm/string/._sequence_traits.hpp and /dev/null differ
diff --git a/ext/boost/algorithm/string/._yes_no_type.hpp b/ext/boost/algorithm/string/._yes_no_type.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/algorithm/string/._yes_no_type.hpp and /dev/null differ
diff --git a/ext/boost/algorithm/string/detail/._finder.hpp b/ext/boost/algorithm/string/detail/._finder.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/algorithm/string/detail/._finder.hpp and /dev/null differ
diff --git a/ext/boost/algorithm/string/detail/._replace_storage.hpp b/ext/boost/algorithm/string/detail/._replace_storage.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/algorithm/string/detail/._replace_storage.hpp and /dev/null differ
diff --git a/ext/boost/algorithm/string/detail/._sequence.hpp b/ext/boost/algorithm/string/detail/._sequence.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/algorithm/string/detail/._sequence.hpp and /dev/null differ
diff --git a/ext/boost/algorithm/string/detail/._util.hpp b/ext/boost/algorithm/string/detail/._util.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/algorithm/string/detail/._util.hpp and /dev/null differ
diff --git a/ext/boost/algorithm/string/detail/case_conv.hpp b/ext/boost/algorithm/string/detail/case_conv.hpp
index 5b0064f..42621c7 100644
--- a/ext/boost/algorithm/string/detail/case_conv.hpp
+++ b/ext/boost/algorithm/string/detail/case_conv.hpp
@@ -15,6 +15,8 @@
 #include <locale>
 #include <functional>
 
+#include <boost/type_traits/make_unsigned.hpp>
+
 namespace boost {
     namespace algorithm {
         namespace detail {
@@ -37,7 +39,7 @@ namespace boost {
                 CharT operator ()( CharT Ch ) const
                 {
                     #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
-                        return std::tolower( Ch);
+                        return std::tolower( static_cast<typename boost::make_unsigned <CharT>::type> ( Ch ));
                     #else
                         return std::tolower<CharT>( Ch, *m_Loc );
                     #endif
@@ -57,7 +59,7 @@ namespace boost {
                 CharT operator ()( CharT Ch ) const
                 {
                     #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
-                        return std::toupper( Ch);
+                        return std::toupper( static_cast<typename boost::make_unsigned <CharT>::type> ( Ch ));
                     #else
                         return std::toupper<CharT>( Ch, *m_Loc );
                     #endif
diff --git a/ext/boost/algorithm/string/detail/find_format.hpp b/ext/boost/algorithm/string/detail/find_format.hpp
index 7f5f780..8b9ad42 100644
--- a/ext/boost/algorithm/string/detail/find_format.hpp
+++ b/ext/boost/algorithm/string/detail/find_format.hpp
@@ -74,17 +74,17 @@ namespace boost {
                 const InputT& Input,
                 FormatterT Formatter,
                 const FindResultT& FindResult )
-            {       
+            {   
                 if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) {
-                return ::boost::algorithm::detail::find_format_copy_impl2( 
-                    Output,
-                    Input,
-                    Formatter,
-                    FindResult,
-                    Formatter(FindResult) );
+                    return ::boost::algorithm::detail::find_format_copy_impl2( 
+                        Output,
+                        Input,
+                        Formatter,
+                        FindResult,
+                        Formatter(FindResult) );
                 } else {
                     return std::copy( ::boost::begin(Input), ::boost::end(Input), Output );
-            }
+                }
             }
 
  
@@ -137,14 +137,14 @@ namespace boost {
                 const FindResultT& FindResult)
             {
                 if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) {
-                return ::boost::algorithm::detail::find_format_copy_impl2(
-                    Input,
-                    Formatter,
-                    FindResult,
-                    Formatter(FindResult) );
+                    return ::boost::algorithm::detail::find_format_copy_impl2(
+                        Input,
+                        Formatter,
+                        FindResult,
+                        Formatter(FindResult) );
                 } else {
                     return Input;
-            }
+                }
             }
 
  // replace implementation ----------------------------------------------------//
@@ -189,12 +189,12 @@ namespace boost {
                 const FindResultT& FindResult)
             {
                 if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) {
-                ::boost::algorithm::detail::find_format_impl2(
-                    Input,
-                    Formatter,
-                    FindResult,
-                    Formatter(FindResult) );
-            }
+                    ::boost::algorithm::detail::find_format_impl2(
+                        Input,
+                        Formatter,
+                        FindResult,
+                        Formatter(FindResult) );
+                }
             }
 
         } // namespace detail
diff --git a/ext/boost/algorithm/string/detail/find_format_all.hpp b/ext/boost/algorithm/string/detail/find_format_all.hpp
index 0f184a3..978710c 100644
--- a/ext/boost/algorithm/string/detail/find_format_all.hpp
+++ b/ext/boost/algorithm/string/detail/find_format_all.hpp
@@ -84,18 +84,18 @@ namespace boost {
                 FinderT Finder,
                 FormatterT Formatter,
                 const FindResultT& FindResult )
-            {       
+            {   
                 if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) {
-                return ::boost::algorithm::detail::find_format_all_copy_impl2( 
-                    Output,
-                    Input,
-                    Finder,
-                    Formatter,
-                    FindResult,
-                    Formatter(FindResult) );
+                    return ::boost::algorithm::detail::find_format_all_copy_impl2( 
+                        Output,
+                        Input,
+                        Finder,
+                        Formatter,
+                        FindResult,
+                        Formatter(FindResult) );
                 } else {
                     return std::copy( ::boost::begin(Input), ::boost::end(Input), Output );
-            }
+                }
             }
 
  // find_format_all_copy implementation ----------------------------------------------//
@@ -161,15 +161,15 @@ namespace boost {
                 const FindResultT& FindResult)
             {
                 if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) {
-                return ::boost::algorithm::detail::find_format_all_copy_impl2(
-                    Input,
-                    Finder,
-                    Formatter,
-                    FindResult,
-                    Formatter(FindResult) );
+                    return ::boost::algorithm::detail::find_format_all_copy_impl2(
+                        Input,
+                        Finder,
+                        Formatter,
+                        FindResult,
+                        Formatter(FindResult) );
                 } else {
                     return Input;
-            }
+                }
             }
 
  // find_format_all implementation ------------------------------------------------//
@@ -257,13 +257,13 @@ namespace boost {
                 FindResultT FindResult)
             {
                 if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) {
-                ::boost::algorithm::detail::find_format_all_impl2(
-                    Input,
-                    Finder,
-                    Formatter,
-                    FindResult,
-                    Formatter(FindResult) );
-            }
+                    ::boost::algorithm::detail::find_format_all_impl2(
+                        Input,
+                        Finder,
+                        Formatter,
+                        FindResult,
+                        Formatter(FindResult) );
+                }
             }
 
         } // namespace detail
diff --git a/ext/boost/algorithm/string/detail/find_format_store.hpp b/ext/boost/algorithm/string/detail/find_format_store.hpp
index 24fe374..e8bd84a 100644
--- a/ext/boost/algorithm/string/detail/find_format_store.hpp
+++ b/ext/boost/algorithm/string/detail/find_format_store.hpp
@@ -53,7 +53,7 @@ namespace boost {
                 {
                     iterator_range<ForwardIteratorT>::operator=(FindResult);
                     if( !this->empty() ) {
-                    m_FormatResult=m_Formatter(FindResult);
+                        m_FormatResult=m_Formatter(FindResult);
                     }
                     
                     return *this;
@@ -71,7 +71,7 @@ namespace boost {
             };
 
             template<typename InputT, typename FindResultT>
-            bool check_find_result(InputT& Input, FindResultT& FindResult)
+            bool check_find_result(InputT&, FindResultT& FindResult)
             {
                 typedef BOOST_STRING_TYPENAME 
                     range_const_iterator<InputT>::type input_iterator_type; 
diff --git a/ext/boost/algorithm/string/detail/formatter.hpp b/ext/boost/algorithm/string/detail/formatter.hpp
index bd6a780..8e7b727 100644
--- a/ext/boost/algorithm/string/detail/formatter.hpp
+++ b/ext/boost/algorithm/string/detail/formatter.hpp
@@ -87,6 +87,31 @@ namespace boost {
                 }
             };
 
+//  dissect format functor ----------------------------------------------------//
+
+            // dissect format functor
+            template<typename FinderT>
+            struct dissect_formatF
+            {
+            public:
+                // Construction
+                dissect_formatF(FinderT Finder) :
+                  m_Finder(Finder) {}
+
+                  // Operation
+                  template<typename RangeT>
+                  inline iterator_range< 
+                      BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type>
+                  operator()(const RangeT& Replace) const
+                  {
+                      return m_Finder(::boost::begin(Replace), ::boost::end(Replace));
+                  }
+
+            private:
+                FinderT m_Finder;
+            };
+
+
         } // namespace detail
     } // namespace algorithm
 } // namespace boost
diff --git a/ext/boost/algorithm/string/formatter.hpp b/ext/boost/algorithm/string/formatter.hpp
index 50006df..ab5921e 100644
--- a/ext/boost/algorithm/string/formatter.hpp
+++ b/ext/boost/algorithm/string/formatter.hpp
@@ -36,7 +36,7 @@ namespace boost {
 
         //! Constant formatter
         /*!
-            Construct the \c const_formatter. Const formatter always returns
+            Constructs a \c const_formatter. Const formatter always returns
             the same value, regardless of the parameter.
 
             \param Format A predefined value used as a result for formating
@@ -55,7 +55,7 @@ namespace boost {
 
         //! Identity formatter
         /*!
-            Construct the \c identity_formatter. Identity formatter always returns
+            Constructs an \c identity_formatter. Identity formatter always returns
             the parameter.
 
             \return An instance of the \c identity_formatter object.
@@ -73,7 +73,7 @@ namespace boost {
 
         //! Empty formatter
         /*!
-            Construct the \c empty_formatter. Empty formatter always returns an empty
+            Constructs an \c empty_formatter. Empty formatter always returns an empty
             sequence. 
 
             \param Input container used to select a correct value_type for the
@@ -89,6 +89,22 @@ namespace boost {
                 BOOST_STRING_TYPENAME range_value<RangeT>::type>();
         }
 
+        //! Empty formatter
+        /*!
+            Constructs a \c dissect_formatter. Dissect formatter uses a specified finder
+            to extract a portion of the formatted sequence. The first finder's match is returned 
+            as a result
+
+            \param Finder a finder used to select a portion of the formated sequence
+            \return An instance of the \c dissect_formatter object.
+        */
+        template<typename FinderT>
+        inline detail::dissect_formatF< FinderT >
+        dissect_formatter(const FinderT& Finder)
+        {
+            return detail::dissect_formatF<FinderT>(Finder);
+        }
+
 
     } // namespace algorithm
 
@@ -96,6 +112,7 @@ namespace boost {
     using algorithm::const_formatter;
     using algorithm::identity_formatter;
     using algorithm::empty_formatter;
+    using algorithm::dissect_formatter;
 
 } // namespace boost
 
diff --git a/ext/boost/aligned_storage.hpp b/ext/boost/aligned_storage.hpp
new file mode 100644
index 0000000..ce277ab
--- /dev/null
+++ b/ext/boost/aligned_storage.hpp
@@ -0,0 +1,181 @@
+//-----------------------------------------------------------------------------
+// boost aligned_storage.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2002-2003
+// Eric Friedman, Itay Maman
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_ALIGNED_STORAGE_HPP
+#define BOOST_ALIGNED_STORAGE_HPP
+
+#include <cstddef> // for std::size_t
+
+#include "boost/config.hpp"
+#include "boost/detail/workaround.hpp"
+#include "boost/type_traits/alignment_of.hpp"
+#include "boost/type_traits/type_with_alignment.hpp"
+#include "boost/type_traits/is_pod.hpp"
+
+#include "boost/mpl/eval_if.hpp"
+#include "boost/mpl/identity.hpp"
+
+#include "boost/type_traits/detail/bool_trait_def.hpp"
+
+namespace boost {
+
+namespace detail { namespace aligned_storage {
+
+BOOST_STATIC_CONSTANT(
+      std::size_t
+    , alignment_of_max_align = ::boost::alignment_of<max_align>::value
+    );
+
+//
+// To be TR1 conforming this must be a POD type:
+//
+template <
+      std::size_t size_
+    , std::size_t alignment_
+>
+struct aligned_storage_imp
+{
+    union data_t
+    {
+        char buf[size_];
+
+        typename mpl::eval_if_c<
+              alignment_ == std::size_t(-1)
+            , mpl::identity<detail::max_align>
+            , type_with_alignment<alignment_>
+            >::type align_;
+    } data_;
+    void* address() const { return const_cast<aligned_storage_imp*>(this); }
+};
+
+template< std::size_t alignment_ >
+struct aligned_storage_imp<0u,alignment_>
+{
+    /* intentionally empty */
+    void* address() const { return 0; }
+};
+
+}} // namespace detail::aligned_storage
+
+template <
+      std::size_t size_
+    , std::size_t alignment_ = std::size_t(-1)
+>
+class aligned_storage : 
+#ifndef __BORLANDC__
+   private 
+#else
+   public
+#endif
+   detail::aligned_storage::aligned_storage_imp<size_, alignment_> 
+{
+ 
+public: // constants
+
+    typedef detail::aligned_storage::aligned_storage_imp<size_, alignment_> type;
+
+    BOOST_STATIC_CONSTANT(
+          std::size_t
+        , size = size_
+        );
+    BOOST_STATIC_CONSTANT(
+          std::size_t
+        , alignment = (
+              alignment_ == std::size_t(-1)
+            ? ::boost::detail::aligned_storage::alignment_of_max_align
+            : alignment_
+            )
+        );
+
+#if defined(__GNUC__) &&\
+    (__GNUC__ >  3) ||\
+    (__GNUC__ == 3 && (__GNUC_MINOR__ >  2 ||\
+                      (__GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ >=3)))
+
+private: // noncopyable
+
+    aligned_storage(const aligned_storage&);
+    aligned_storage& operator=(const aligned_storage&);
+
+#else // gcc less than 3.2.3
+
+public: // _should_ be noncopyable, but GCC compiler emits error
+
+    aligned_storage(const aligned_storage&);
+    aligned_storage& operator=(const aligned_storage&);
+
+#endif // gcc < 3.2.3 workaround
+
+public: // structors
+
+    aligned_storage()
+    {
+    }
+
+    ~aligned_storage()
+    {
+    }
+
+public: // accessors
+
+    void* address()
+    {
+        return static_cast<type*>(this)->address();
+    }
+
+#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+
+    const void* address() const
+    {
+        return static_cast<const type*>(this)->address();
+    }
+
+#else // MSVC6
+
+    const void* address() const;
+
+#endif // MSVC6 workaround
+
+};
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+
+// MSVC6 seems not to like inline functions with const void* returns, so we
+// declare the following here:
+
+template <std::size_t S, std::size_t A>
+const void* aligned_storage<S,A>::address() const
+{
+    return const_cast< aligned_storage<S,A>* >(this)->address();
+}
+
+#endif // MSVC6 workaround
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+//
+// Make sure that is_pod recognises aligned_storage<>::type
+// as a POD (Note that aligned_storage<> itself is not a POD):
+//
+template <std::size_t size_, std::size_t alignment_>
+struct is_pod<boost::detail::aligned_storage::aligned_storage_imp<size_,alignment_> >
+   BOOST_TT_AUX_BOOL_C_BASE(true)
+{ 
+    BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(true)
+}; 
+#endif
+
+
+} // namespace boost
+
+#include "boost/type_traits/detail/bool_trait_undef.hpp"
+
+#endif // BOOST_ALIGNED_STORAGE_HPP
diff --git a/ext/boost/array.hpp b/ext/boost/array.hpp
new file mode 100644
index 0000000..fa06fa9
--- /dev/null
+++ b/ext/boost/array.hpp
@@ -0,0 +1,446 @@
+/* The following code declares class array,
+ * an STL container (as wrapper) for arrays of constant size.
+ *
+ * See
+ *      http://www.boost.org/libs/array/
+ * for documentation.
+ *
+ * The original author site is at: http://www.josuttis.com/
+ *
+ * (C) Copyright Nicolai M. Josuttis 2001.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See
+ * accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * 14 Apr 2012 - (mtc) Added support for boost::hash
+ * 28 Dec 2010 - (mtc) Added cbegin and cend (and crbegin and crend) for C++Ox compatibility.
+ * 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group.
+ *      See <http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#776> or Trac issue #3168
+ *      Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow)
+ * 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow)
+ * 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis)
+ * 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries.
+ * 05 Aug 2001 - minor update (Nico Josuttis)
+ * 20 Jan 2001 - STLport fix (Beman Dawes)
+ * 29 Sep 2000 - Initial Revision (Nico Josuttis)
+ *
+ * Jan 29, 2004
+ */
+#ifndef BOOST_ARRAY_HPP
+#define BOOST_ARRAY_HPP
+
+#include <boost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)  
+# pragma warning(push)  
+# pragma warning(disable:4996) // 'std::equal': Function call with parameters that may be unsafe
+# pragma warning(disable:4510) // boost::array<T,N>' : default constructor could not be generated 
+# pragma warning(disable:4610) // warning C4610: class 'boost::array<T,N>' can never be instantiated - user defined constructor required 
+#endif
+
+#include <cstddef>
+#include <stdexcept>
+#include <boost/assert.hpp>
+#include <boost/swap.hpp>
+
+// Handles broken standard libraries better than <iterator>
+#include <boost/detail/iterator.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/functional/hash_fwd.hpp>
+#include <algorithm>
+
+// FIXES for broken compilers
+#include <boost/config.hpp>
+
+
+namespace boost {
+
+    template<class T, std::size_t N>
+    class array {
+      public:
+        T elems[N];    // fixed-size array of elements of type T
+
+      public:
+        // type definitions
+        typedef T              value_type;
+        typedef T*             iterator;
+        typedef const T*       const_iterator;
+        typedef T&             reference;
+        typedef const T&       const_reference;
+        typedef std::size_t    size_type;
+        typedef std::ptrdiff_t difference_type;
+
+        // iterator support
+        iterator        begin()       { return elems; }
+        const_iterator  begin() const { return elems; }
+        const_iterator cbegin() const { return elems; }
+        
+        iterator        end()       { return elems+N; }
+        const_iterator  end() const { return elems+N; }
+        const_iterator cend() const { return elems+N; }
+
+        // reverse iterator support
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
+        typedef std::reverse_iterator<iterator> reverse_iterator;
+        typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310)
+        // workaround for broken reverse_iterator in VC7
+        typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator,
+                                      reference, iterator, reference> > reverse_iterator;
+        typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
+                                      const_reference, iterator, reference> > const_reverse_iterator;
+#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) 
+        typedef std::reverse_iterator<iterator, std::random_access_iterator_tag, 
+              value_type, reference, iterator, difference_type> reverse_iterator; 
+        typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
+              value_type, const_reference, const_iterator, difference_type> const_reverse_iterator;
+#else
+        // workaround for broken reverse_iterator implementations
+        typedef std::reverse_iterator<iterator,T> reverse_iterator;
+        typedef std::reverse_iterator<const_iterator,T> const_reverse_iterator;
+#endif
+
+        reverse_iterator rbegin() { return reverse_iterator(end()); }
+        const_reverse_iterator rbegin() const {
+            return const_reverse_iterator(end());
+        }
+        const_reverse_iterator crbegin() const {
+            return const_reverse_iterator(end());
+        }
+
+        reverse_iterator rend() { return reverse_iterator(begin()); }
+        const_reverse_iterator rend() const {
+            return const_reverse_iterator(begin());
+        }
+        const_reverse_iterator crend() const {
+            return const_reverse_iterator(begin());
+        }
+
+        // operator[]
+        reference operator[](size_type i) 
+        { 
+            BOOST_ASSERT_MSG( i < N, "out of range" );
+            return elems[i];
+        }
+        
+        const_reference operator[](size_type i) const 
+        {     
+            BOOST_ASSERT_MSG( i < N, "out of range" );
+            return elems[i]; 
+        }
+
+        // at() with range check
+        reference at(size_type i) { rangecheck(i); return elems[i]; }
+        const_reference at(size_type i) const { rangecheck(i); return elems[i]; }
+    
+        // front() and back()
+        reference front() 
+        { 
+            return elems[0]; 
+        }
+        
+        const_reference front() const 
+        {
+            return elems[0];
+        }
+        
+        reference back() 
+        { 
+            return elems[N-1]; 
+        }
+        
+        const_reference back() const 
+        { 
+            return elems[N-1]; 
+        }
+
+        // size is constant
+        static size_type size() { return N; }
+        static bool empty() { return false; }
+        static size_type max_size() { return N; }
+        enum { static_size = N };
+
+        // swap (note: linear complexity)
+        void swap (array<T,N>& y) {
+            for (size_type i = 0; i < N; ++i)
+                boost::swap(elems[i],y.elems[i]);
+        }
+
+        // direct access to data (read-only)
+        const T* data() const { return elems; }
+        T* data() { return elems; }
+
+        // use array as C array (direct read/write access to data)
+        T* c_array() { return elems; }
+
+        // assignment with type conversion
+        template <typename T2>
+        array<T,N>& operator= (const array<T2,N>& rhs) {
+            std::copy(rhs.begin(),rhs.end(), begin());
+            return *this;
+        }
+
+        // assign one value to all elements
+        void assign (const T& value) { fill ( value ); }    // A synonym for fill
+        void fill   (const T& value)
+        {
+            std::fill_n(begin(),size(),value);
+        }
+
+        // check range (may be private because it is static)
+        static void rangecheck (size_type i) {
+            if (i >= size()) {
+                std::out_of_range e("array<>: index out of range");
+                boost::throw_exception(e);
+            }
+        }
+
+    };
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+    template< class T >
+    class array< T, 0 > {
+
+      public:
+        // type definitions
+        typedef T              value_type;
+        typedef T*             iterator;
+        typedef const T*       const_iterator;
+        typedef T&             reference;
+        typedef const T&       const_reference;
+        typedef std::size_t    size_type;
+        typedef std::ptrdiff_t difference_type;
+
+        // iterator support
+        iterator        begin()       { return       iterator( reinterpret_cast<       T * >( this ) ); }
+        const_iterator  begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); }
+        const_iterator cbegin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); }
+
+        iterator        end()       { return  begin(); }
+        const_iterator  end() const { return  begin(); }
+        const_iterator cend() const { return cbegin(); }
+
+        // reverse iterator support
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
+        typedef std::reverse_iterator<iterator> reverse_iterator;
+        typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310)
+        // workaround for broken reverse_iterator in VC7
+        typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator,
+                                      reference, iterator, reference> > reverse_iterator;
+        typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
+                                      const_reference, iterator, reference> > const_reverse_iterator;
+#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) 
+        typedef std::reverse_iterator<iterator, std::random_access_iterator_tag, 
+              value_type, reference, iterator, difference_type> reverse_iterator; 
+        typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
+              value_type, const_reference, const_iterator, difference_type> const_reverse_iterator;
+#else
+        // workaround for broken reverse_iterator implementations
+        typedef std::reverse_iterator<iterator,T> reverse_iterator;
+        typedef std::reverse_iterator<const_iterator,T> const_reverse_iterator;
+#endif
+
+        reverse_iterator rbegin() { return reverse_iterator(end()); }
+        const_reverse_iterator rbegin() const {
+            return const_reverse_iterator(end());
+        }
+        const_reverse_iterator crbegin() const {
+            return const_reverse_iterator(end());
+        }
+
+        reverse_iterator rend() { return reverse_iterator(begin()); }
+        const_reverse_iterator rend() const {
+            return const_reverse_iterator(begin());
+        }
+        const_reverse_iterator crend() const {
+            return const_reverse_iterator(begin());
+        }
+
+        // operator[]
+        reference operator[](size_type /*i*/)
+        {
+            return failed_rangecheck();
+        }
+
+        const_reference operator[](size_type /*i*/) const
+        {
+            return failed_rangecheck();
+        }
+
+        // at() with range check
+        reference at(size_type /*i*/)               {   return failed_rangecheck(); }
+        const_reference at(size_type /*i*/) const   {   return failed_rangecheck(); }
+
+        // front() and back()
+        reference front()
+        {
+            return failed_rangecheck();
+        }
+
+        const_reference front() const
+        {
+            return failed_rangecheck();
+        }
+
+        reference back()
+        {
+            return failed_rangecheck();
+        }
+
+        const_reference back() const
+        {
+            return failed_rangecheck();
+        }
+
+        // size is constant
+        static size_type size() { return 0; }
+        static bool empty() { return true; }
+        static size_type max_size() { return 0; }
+        enum { static_size = 0 };
+
+        void swap (array<T,0>& /*y*/) {
+        }
+
+        // direct access to data (read-only)
+        const T* data() const { return 0; }
+        T* data() { return 0; }
+
+        // use array as C array (direct read/write access to data)
+        T* c_array() { return 0; }
+
+        // assignment with type conversion
+        template <typename T2>
+        array<T,0>& operator= (const array<T2,0>& ) {
+            return *this;
+        }
+
+        // assign one value to all elements
+        void assign (const T& value) { fill ( value ); }
+        void fill   (const T& ) {}
+        
+        // check range (may be private because it is static)
+        static reference failed_rangecheck () {
+                std::out_of_range e("attempt to access element of an empty array");
+                boost::throw_exception(e);
+#if defined(BOOST_NO_EXCEPTIONS) || (!defined(BOOST_MSVC) && !defined(__PATHSCALE__))
+                //
+                // We need to return something here to keep
+                // some compilers happy: however we will never
+                // actually get here....
+                //
+                static T placeholder;
+                return placeholder;
+#endif
+            }
+    };
+#endif
+
+    // comparisons
+    template<class T, std::size_t N>
+    bool operator== (const array<T,N>& x, const array<T,N>& y) {
+        return std::equal(x.begin(), x.end(), y.begin());
+    }
+    template<class T, std::size_t N>
+    bool operator< (const array<T,N>& x, const array<T,N>& y) {
+        return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
+    }
+    template<class T, std::size_t N>
+    bool operator!= (const array<T,N>& x, const array<T,N>& y) {
+        return !(x==y);
+    }
+    template<class T, std::size_t N>
+    bool operator> (const array<T,N>& x, const array<T,N>& y) {
+        return y<x;
+    }
+    template<class T, std::size_t N>
+    bool operator<= (const array<T,N>& x, const array<T,N>& y) {
+        return !(y<x);
+    }
+    template<class T, std::size_t N>
+    bool operator>= (const array<T,N>& x, const array<T,N>& y) {
+        return !(x<y);
+    }
+
+    // global swap()
+    template<class T, std::size_t N>
+    inline void swap (array<T,N>& x, array<T,N>& y) {
+        x.swap(y);
+    }
+
+#if defined(__SUNPRO_CC)
+//  Trac ticket #4757; the Sun Solaris compiler can't handle
+//  syntax like 'T(&get_c_array(boost::array<T,N>& arg))[N]'
+//  
+//  We can't just use this for all compilers, because the 
+//      borland compilers can't handle this form. 
+    namespace detail {
+       template <typename T, std::size_t N> struct c_array
+       {
+           typedef T type[N];
+       };
+    }
+    
+   // Specific for boost::array: simply returns its elems data member.
+   template <typename T, std::size_t N>
+   typename detail::c_array<T,N>::type& get_c_array(boost::array<T,N>& arg)
+   {
+       return arg.elems;
+   }
+
+   // Specific for boost::array: simply returns its elems data member.
+   template <typename T, std::size_t N>
+   typename const detail::c_array<T,N>::type& get_c_array(const boost::array<T,N>& arg)
+   {
+       return arg.elems;
+   }
+#else
+// Specific for boost::array: simply returns its elems data member.
+    template <typename T, std::size_t N>
+    T(&get_c_array(boost::array<T,N>& arg))[N]
+    {
+        return arg.elems;
+    }
+    
+    // Const version.
+    template <typename T, std::size_t N>
+    const T(&get_c_array(const boost::array<T,N>& arg))[N]
+    {
+        return arg.elems;
+    }
+#endif
+    
+#if 0
+    // Overload for std::array, assuming that std::array will have
+    // explicit conversion functions as discussed at the WG21 meeting
+    // in Summit, March 2009.
+    template <typename T, std::size_t N>
+    T(&get_c_array(std::array<T,N>& arg))[N]
+    {
+        return static_cast<T(&)[N]>(arg);
+    }
+    
+    // Const version.
+    template <typename T, std::size_t N>
+    const T(&get_c_array(const std::array<T,N>& arg))[N]
+    {
+        return static_cast<T(&)[N]>(arg);
+    }
+#endif
+
+
+    template<class T, std::size_t N>
+    std::size_t hash_value(const array<T,N>& arr)
+    {
+        return boost::hash_range(arr.begin(), arr.end());
+    }
+
+} /* namespace boost */
+
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)  
+# pragma warning(pop)  
+#endif 
+
+#endif /*BOOST_ARRAY_HPP*/
diff --git a/ext/boost/assert.hpp b/ext/boost/assert.hpp
index c227f17..174f084 100644
--- a/ext/boost/assert.hpp
+++ b/ext/boost/assert.hpp
@@ -1,8 +1,11 @@
 //
 //  boost/assert.hpp - BOOST_ASSERT(expr)
+//                     BOOST_ASSERT_MSG(expr, msg)
+//                     BOOST_VERIFY(expr)
 //
 //  Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
 //  Copyright (c) 2007 Peter Dimov
+//  Copyright (c) Beman Dawes 2011
 //
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
@@ -13,6 +16,16 @@
 //  See http://www.boost.org/libs/utility/assert.html for documentation.
 //
 
+//
+// Stop inspect complaining about use of 'assert':
+//
+// boostinspect:naassert_macro
+//
+
+//--------------------------------------------------------------------------------------//
+//                                     BOOST_ASSERT                                     //
+//--------------------------------------------------------------------------------------//
+
 #undef BOOST_ASSERT
 
 #if defined(BOOST_DISABLE_ASSERTS)
@@ -25,18 +38,86 @@
 
 namespace boost
 {
-
-void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined
-
+  void assertion_failed(char const * expr,
+                        char const * function, char const * file, long line); // user defined
 } // namespace boost
 
-#define BOOST_ASSERT(expr) ((expr)? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
+#define BOOST_ASSERT(expr) ((expr) \
+  ? ((void)0) \
+  : ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
 
 #else
 # include <assert.h> // .h to support old libraries w/o <cassert> - effect is the same
 # define BOOST_ASSERT(expr) assert(expr)
 #endif
 
+//--------------------------------------------------------------------------------------//
+//                                   BOOST_ASSERT_MSG                                   //
+//--------------------------------------------------------------------------------------//
+
+# undef BOOST_ASSERT_MSG
+
+#if defined(BOOST_DISABLE_ASSERTS) || defined(NDEBUG)
+
+  #define BOOST_ASSERT_MSG(expr, msg) ((void)0)
+
+#elif defined(BOOST_ENABLE_ASSERT_HANDLER)
+
+  #include <boost/current_function.hpp>
+
+  namespace boost
+  {
+    void assertion_failed_msg(char const * expr, char const * msg,
+                              char const * function, char const * file, long line); // user defined
+  } // namespace boost
+
+  #define BOOST_ASSERT_MSG(expr, msg) ((expr) \
+    ? ((void)0) \
+    : ::boost::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
+
+#else
+  #ifndef BOOST_ASSERT_HPP
+    #define BOOST_ASSERT_HPP
+    #include <cstdlib>
+    #include <iostream>
+    #include <boost/current_function.hpp>
+
+    //  IDE's like Visual Studio perform better if output goes to std::cout or
+    //  some other stream, so allow user to configure output stream:
+    #ifndef BOOST_ASSERT_MSG_OSTREAM
+    # define BOOST_ASSERT_MSG_OSTREAM std::cerr
+    #endif
+
+    namespace boost
+    { 
+      namespace assertion 
+      { 
+        namespace detail
+        {
+          inline void assertion_failed_msg(char const * expr, char const * msg, char const * function,
+            char const * file, long line)
+          {
+            BOOST_ASSERT_MSG_OSTREAM
+              << "***** Internal Program Error - assertion (" << expr << ") failed in "
+              << function << ":\n"
+              << file << '(' << line << "): " << msg << std::endl;
+            std::abort();
+          }
+        } // detail
+      } // assertion
+    } // detail
+  #endif
+
+  #define BOOST_ASSERT_MSG(expr, msg) ((expr) \
+    ? ((void)0) \
+    : ::boost::assertion::detail::assertion_failed_msg(#expr, msg, \
+          BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
+#endif
+
+//--------------------------------------------------------------------------------------//
+//                                     BOOST_VERIFY                                     //
+//--------------------------------------------------------------------------------------//
+
 #undef BOOST_VERIFY
 
 #if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) )
diff --git a/ext/boost/bind/._arg.hpp b/ext/boost/bind/._arg.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/bind/._arg.hpp and /dev/null differ
diff --git a/ext/boost/bind/._bind_cc.hpp b/ext/boost/bind/._bind_cc.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/bind/._bind_cc.hpp and /dev/null differ
diff --git a/ext/boost/bind/._bind_mf2_cc.hpp b/ext/boost/bind/._bind_mf2_cc.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/bind/._bind_mf2_cc.hpp and /dev/null differ
diff --git a/ext/boost/bind/._bind_mf_cc.hpp b/ext/boost/bind/._bind_mf_cc.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/bind/._bind_mf_cc.hpp and /dev/null differ
diff --git a/ext/boost/bind/._bind_template.hpp b/ext/boost/bind/._bind_template.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/bind/._bind_template.hpp and /dev/null differ
diff --git a/ext/boost/bind/._mem_fn.hpp b/ext/boost/bind/._mem_fn.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/bind/._mem_fn.hpp and /dev/null differ
diff --git a/ext/boost/bind/._mem_fn_cc.hpp b/ext/boost/bind/._mem_fn_cc.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/bind/._mem_fn_cc.hpp and /dev/null differ
diff --git a/ext/boost/bind/._mem_fn_template.hpp b/ext/boost/bind/._mem_fn_template.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/bind/._mem_fn_template.hpp and /dev/null differ
diff --git a/ext/boost/bind/._placeholders.hpp b/ext/boost/bind/._placeholders.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/bind/._placeholders.hpp and /dev/null differ
diff --git a/ext/boost/bind/._storage.hpp b/ext/boost/bind/._storage.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/bind/._storage.hpp and /dev/null differ
diff --git a/ext/boost/bind/bind.hpp b/ext/boost/bind/bind.hpp
index a63d2a0..fb67097 100644
--- a/ext/boost/bind/bind.hpp
+++ b/ext/boost/bind/bind.hpp
@@ -1680,7 +1680,7 @@ template< class R, class T > struct add_cref< R (T::*) (), 1 >
     typedef void type;
 };
 
-#if !( defined(__IBMCPP__) && BOOST_WORKAROUND( __IBMCPP__, BOOST_TESTED_AT(600) ) )
+#if !defined(__IBMCPP__) || __IBMCPP_FUNC_CV_TMPL_ARG_DEDUCTION
 
 template< class R, class T > struct add_cref< R (T::*) () const, 1 >
 {
diff --git a/ext/boost/call_traits.hpp b/ext/boost/call_traits.hpp
deleted file mode 100644
index 5253a6d..0000000
--- a/ext/boost/call_traits.hpp
+++ /dev/null
@@ -1,24 +0,0 @@
-//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
-//  Use, modification and distribution are subject to the Boost Software License,
-//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-//  http://www.boost.org/LICENSE_1_0.txt).
-//
-//  See http://www.boost.org/libs/utility for most recent version including documentation.
-
-//  See boost/detail/call_traits.hpp and boost/detail/ob_call_traits.hpp
-//  for full copyright notices.
-
-#ifndef BOOST_CALL_TRAITS_HPP
-#define BOOST_CALL_TRAITS_HPP
-
-#ifndef BOOST_CONFIG_HPP
-#include <boost/config.hpp>
-#endif
-
-#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-#include <boost/detail/ob_call_traits.hpp>
-#else
-#include <boost/detail/call_traits.hpp>
-#endif
-
-#endif // BOOST_CALL_TRAITS_HPP
diff --git a/ext/boost/cerrno.hpp b/ext/boost/cerrno.hpp
new file mode 100644
index 0000000..6f26698
--- /dev/null
+++ b/ext/boost/cerrno.hpp
@@ -0,0 +1,331 @@
+//  Boost cerrno.hpp header  -------------------------------------------------//
+
+//  Copyright Beman Dawes 2005.
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/system
+
+#ifndef BOOST_CERRNO_HPP
+#define BOOST_CERRNO_HPP
+
+#include <cerrno>
+
+//  supply errno values likely to be missing, particularly on Windows
+
+#ifndef EAFNOSUPPORT
+#define EAFNOSUPPORT 9901
+#endif
+
+#ifndef EADDRINUSE
+#define EADDRINUSE 9902
+#endif
+
+#ifndef EADDRNOTAVAIL
+#define EADDRNOTAVAIL 9903
+#endif
+
+#ifndef EISCONN
+#define EISCONN 9904
+#endif
+
+#ifndef EBADMSG
+#define EBADMSG 9905
+#endif
+
+#ifndef ECONNABORTED
+#define ECONNABORTED 9906
+#endif
+
+#ifndef EALREADY
+#define EALREADY 9907
+#endif
+
+#ifndef ECONNREFUSED
+#define ECONNREFUSED 9908
+#endif
+
+#ifndef ECONNRESET
+#define ECONNRESET 9909
+#endif
+
+#ifndef EDESTADDRREQ
+#define EDESTADDRREQ 9910
+#endif
+
+#ifndef EHOSTUNREACH
+#define EHOSTUNREACH 9911
+#endif
+
+#ifndef EIDRM
+#define EIDRM 9912
+#endif
+
+#ifndef EMSGSIZE
+#define EMSGSIZE 9913
+#endif
+
+#ifndef ENETDOWN
+#define ENETDOWN 9914
+#endif
+
+#ifndef ENETRESET
+#define ENETRESET 9915
+#endif
+
+#ifndef ENETUNREACH
+#define ENETUNREACH 9916
+#endif
+
+#ifndef ENOBUFS
+#define ENOBUFS 9917
+#endif
+
+#ifndef ENOLINK
+#define ENOLINK 9918
+#endif
+
+#ifndef ENODATA
+#define ENODATA 9919
+#endif
+
+#ifndef ENOMSG
+#define ENOMSG 9920
+#endif
+
+#ifndef ENOPROTOOPT
+#define ENOPROTOOPT 9921
+#endif
+
+#ifndef ENOSR
+#define ENOSR 9922
+#endif
+
+#ifndef ENOTSOCK
+#define ENOTSOCK 9923
+#endif
+
+#ifndef ENOSTR
+#define ENOSTR 9924
+#endif
+
+#ifndef ENOTCONN
+#define ENOTCONN 9925
+#endif
+
+#ifndef ENOTSUP
+#define ENOTSUP 9926
+#endif
+
+#ifndef ECANCELED
+#define ECANCELED 9927
+#endif
+
+#ifndef EINPROGRESS
+#define EINPROGRESS 9928
+#endif
+
+#ifndef EOPNOTSUPP
+#define EOPNOTSUPP 9929
+#endif
+
+#ifndef EWOULDBLOCK
+#define EWOULDBLOCK 9930
+#endif
+
+#ifndef EOWNERDEAD
+#define EOWNERDEAD  9931
+#endif
+
+#ifndef EPROTO
+#define EPROTO 9932
+#endif
+
+#ifndef EPROTONOSUPPORT
+#define EPROTONOSUPPORT 9933
+#endif
+
+#ifndef ENOTRECOVERABLE
+#define ENOTRECOVERABLE 9934
+#endif
+
+#ifndef ETIME
+#define ETIME 9935
+#endif
+
+#ifndef ETXTBSY
+#define ETXTBSY 9936
+#endif
+
+#ifndef ETIMEDOUT
+#define ETIMEDOUT 9938
+#endif
+
+#ifndef ELOOP
+#define ELOOP 9939
+#endif
+
+#ifndef EOVERFLOW
+#define EOVERFLOW 9940
+#endif
+
+#ifndef EPROTOTYPE
+#define EPROTOTYPE 9941
+#endif
+
+#ifndef ENOSYS
+#define ENOSYS 9942
+#endif
+
+#ifndef EINVAL
+#define EINVAL 9943
+#endif
+
+#ifndef ERANGE
+#define ERANGE 9944
+#endif
+
+#ifndef EILSEQ
+#define EILSEQ 9945
+#endif
+
+//  Windows Mobile doesn't appear to define these:
+
+#ifndef E2BIG
+#define E2BIG 9946
+#endif
+
+#ifndef EDOM
+#define EDOM 9947
+#endif
+
+#ifndef EFAULT
+#define EFAULT 9948
+#endif
+
+#ifndef EBADF
+#define EBADF 9949
+#endif
+
+#ifndef EPIPE
+#define EPIPE 9950
+#endif
+
+#ifndef EXDEV
+#define EXDEV 9951
+#endif
+
+#ifndef EBUSY
+#define EBUSY 9952
+#endif
+
+#ifndef ENOTEMPTY
+#define ENOTEMPTY 9953
+#endif
+
+#ifndef ENOEXEC
+#define ENOEXEC 9954
+#endif
+
+#ifndef EEXIST
+#define EEXIST 9955
+#endif
+
+#ifndef EFBIG
+#define EFBIG 9956
+#endif
+
+#ifndef ENAMETOOLONG
+#define ENAMETOOLONG 9957
+#endif
+
+#ifndef ENOTTY
+#define ENOTTY 9958
+#endif
+
+#ifndef EINTR
+#define EINTR 9959
+#endif
+
+#ifndef ESPIPE
+#define ESPIPE 9960
+#endif
+
+#ifndef EIO
+#define EIO 9961
+#endif
+
+#ifndef EISDIR
+#define EISDIR 9962
+#endif
+
+#ifndef ECHILD
+#define ECHILD 9963
+#endif
+
+#ifndef ENOLCK
+#define ENOLCK 9964
+#endif
+
+#ifndef ENOSPC
+#define ENOSPC 9965
+#endif
+
+#ifndef ENXIO
+#define ENXIO 9966
+#endif
+
+#ifndef ENODEV
+#define ENODEV 9967
+#endif
+
+#ifndef ENOENT
+#define ENOENT 9968
+#endif
+
+#ifndef ESRCH
+#define ESRCH 9969
+#endif
+
+#ifndef ENOTDIR
+#define ENOTDIR 9970
+#endif
+
+#ifndef ENOMEM
+#define ENOMEM 9971
+#endif
+
+#ifndef EPERM
+#define EPERM 9972
+#endif
+
+#ifndef EACCES
+#define EACCES 9973
+#endif
+
+#ifndef EROFS
+#define EROFS 9974
+#endif
+
+#ifndef EDEADLK
+#define EDEADLK 9975
+#endif
+
+#ifndef EAGAIN
+#define EAGAIN 9976
+#endif
+
+#ifndef ENFILE
+#define ENFILE 9977
+#endif
+
+#ifndef EMFILE
+#define EMFILE 9978
+#endif
+
+#ifndef EMLINK
+#define EMLINK 9979
+#endif
+
+#endif // include guard
diff --git a/ext/boost/chrono/ceil.hpp b/ext/boost/chrono/ceil.hpp
new file mode 100644
index 0000000..7fbf9dd
--- /dev/null
+++ b/ext/boost/chrono/ceil.hpp
@@ -0,0 +1,36 @@
+//  boost/chrono/round.hpp  ------------------------------------------------------------//
+
+//  (C) Copyright Howard Hinnant
+//  Copyright 2011 Vicente J. Botet Escriba
+
+//  Distributed under the Boost Software License, Version 1.0. (See accompanying
+//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/chrono for documentation.
+
+#ifndef BOOST_CHRONO_CEIL_HPP
+#define BOOST_CHRONO_CEIL_HPP
+
+#include <boost/chrono/duration.hpp>
+
+namespace boost
+{
+  namespace chrono
+  {
+
+    /**
+     * rounds up
+     */
+    template <class To, class Rep, class Period>
+    To ceil(const duration<Rep, Period>& d)
+    {
+        To t = duration_cast<To>(d);
+        if (t < d)
+            ++t;
+        return t;
+    }
+
+  } // namespace chrono
+} // namespace boost
+
+#endif
diff --git a/ext/boost/chrono/clock_string.hpp b/ext/boost/chrono/clock_string.hpp
new file mode 100644
index 0000000..af025f2
--- /dev/null
+++ b/ext/boost/chrono/clock_string.hpp
@@ -0,0 +1,25 @@
+//
+//  (C) Copyright 2010-2011 Vicente J. Botet Escriba
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+
+#ifndef BOOST_CHRONO_CLOCK_STRING_HPP
+#define BOOST_CHRONO_CLOCK_STRING_HPP
+
+#include <string>
+
+namespace boost
+{
+  namespace chrono
+  {
+
+    template<class Clock, class CharT>
+    struct clock_string;
+
+  } // chrono
+
+} // boost
+
+#endif  // BOOST_CHRONO_CLOCK_STRING_HPP
diff --git a/ext/boost/chrono/config.hpp b/ext/boost/chrono/config.hpp
new file mode 100644
index 0000000..7812dad
--- /dev/null
+++ b/ext/boost/chrono/config.hpp
@@ -0,0 +1,215 @@
+//  boost/chrono/config.hpp  -------------------------------------------------//
+
+//  Copyright Beman Dawes 2003, 2006, 2008
+//  Copyright 2009-2011 Vicente J. Botet Escriba
+
+//  Distributed under the Boost Software License, Version 1.0. (See accompanying
+//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/chrono for documentation.
+
+#ifndef BOOST_CHRONO_CONFIG_HPP
+#define BOOST_CHRONO_CONFIG_HPP
+
+#include <boost/config.hpp>
+
+#if !defined BOOST_CHRONO_VERSION
+#define BOOST_CHRONO_VERSION 1
+#else
+#if BOOST_CHRONO_VERSION!=1  && BOOST_CHRONO_VERSION!=2
+#error "BOOST_CHRONO_VERSION must be 1 or 2"
+#endif
+#endif
+
+#if defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_USE_WINDOWS_H)
+#define BOOST_USE_WINDOWS_H
+#endif
+
+#if ! defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT \
+    && ! defined BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
+
+# define BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
+
+#endif
+
+//  BOOST_CHRONO_POSIX_API, BOOST_CHRONO_MAC_API, or BOOST_CHRONO_WINDOWS_API
+//  can be defined by the user to specify which API should be used
+
+#if defined(BOOST_CHRONO_WINDOWS_API)
+# warning Boost.Chrono will use the Windows API
+#elif defined(BOOST_CHRONO_MAC_API)
+# warning Boost.Chrono will use the Mac API
+#elif defined(BOOST_CHRONO_POSIX_API)
+# warning Boost.Chrono will use the POSIX API
+#endif
+
+# if defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_POSIX_API )
+#   error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_POSIX_API are defined
+# elif defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_MAC_API )
+#   error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_MAC_API are defined
+# elif defined( BOOST_CHRONO_MAC_API ) && defined( BOOST_CHRONO_POSIX_API )
+#   error both BOOST_CHRONO_MAC_API and BOOST_CHRONO_POSIX_API are defined
+# elif !defined( BOOST_CHRONO_WINDOWS_API ) && !defined( BOOST_CHRONO_MAC_API ) && !defined( BOOST_CHRONO_POSIX_API )
+#   if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32))
+#     define BOOST_CHRONO_WINDOWS_API
+#   elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
+#     define BOOST_CHRONO_MAC_API
+#   else
+#     define BOOST_CHRONO_POSIX_API
+#   endif
+# endif
+
+# if defined( BOOST_CHRONO_WINDOWS_API )
+#   ifndef UNDER_CE
+#     define BOOST_CHRONO_HAS_PROCESS_CLOCKS
+#   endif
+#   define BOOST_CHRONO_HAS_CLOCK_STEADY
+#   define BOOST_CHRONO_HAS_THREAD_CLOCK
+#   define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
+# endif
+
+# if defined( BOOST_CHRONO_MAC_API )
+#   define BOOST_CHRONO_HAS_PROCESS_CLOCKS
+#   define BOOST_CHRONO_HAS_CLOCK_STEADY
+#   define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
+# endif
+
+# if defined( BOOST_CHRONO_POSIX_API )
+#   define BOOST_CHRONO_HAS_PROCESS_CLOCKS
+#   include <time.h>  //to check for CLOCK_REALTIME and CLOCK_MONOTONIC and _POSIX_THREAD_CPUTIME
+#   if defined(CLOCK_MONOTONIC)
+#      define BOOST_CHRONO_HAS_CLOCK_STEADY
+#   endif
+#   if defined(_POSIX_THREAD_CPUTIME) && !defined(BOOST_DISABLE_THREADS)
+#     define BOOST_CHRONO_HAS_THREAD_CLOCK
+#     define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
+#   endif
+#   if defined(CLOCK_THREAD_CPUTIME_ID) && !defined(BOOST_DISABLE_THREADS)
+#     define BOOST_CHRONO_HAS_THREAD_CLOCK
+#     define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
+#   endif
+#   if defined(sun) || defined(__sun)
+#     undef BOOST_CHRONO_HAS_THREAD_CLOCK
+#     undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
+#   endif
+#   if defined(__HP_aCC) && defined(__hpux)
+#     undef BOOST_CHRONO_HAS_THREAD_CLOCK
+#     undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
+#   endif
+# endif
+
+#if defined(BOOST_CHRONO_THREAD_DISABLED) && defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
+#undef BOOST_CHRONO_HAS_THREAD_CLOCK
+#undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
+#endif
+
+//#undef BOOST_CHRONO_HAS_PROCESS_CLOCKS
+
+// unicode support  ------------------------------//
+
+#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) || defined(BOOST_NO_CXX11_CHAR16_T) || defined(BOOST_NO_CXX11_CHAR32_T)
+//~ #define BOOST_CHRONO_HAS_UNICODE_SUPPORT
+#else
+#define BOOST_CHRONO_HAS_UNICODE_SUPPORT 1
+#endif
+
+#if ! defined BOOST_NOEXCEPT
+#if defined(BOOST_NO_CXX11_NOEXCEPT)
+#define BOOST_NOEXCEPT
+#else
+#define BOOST_NOEXCEPT noexcept
+#endif
+#endif
+
+#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS )
+#define BOOST_CHRONO_LIB_CONSTEXPR
+#else
+#define BOOST_CHRONO_LIB_CONSTEXPR BOOST_CONSTEXPR
+#endif
+
+#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS )
+#  define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw()
+#else
+#ifdef BOOST_NO_NOEXCEPT
+#  define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw()
+#else
+#  define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW noexcept
+#endif
+#endif
+
+
+#if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \
+ && defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+#error "BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING && BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING defined"
+#endif
+
+#if defined BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 \
+ && defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
+#error "BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 && BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 defined"
+#endif
+
+#if ! defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \
+ && ! defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+#define BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING
+#endif
+
+#if (BOOST_CHRONO_VERSION == 2)
+#if ! defined BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 \
+ && ! defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
+#define BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
+#endif
+#endif
+
+#ifdef BOOST_CHRONO_HEADER_ONLY
+#define BOOST_CHRONO_INLINE inline
+#define BOOST_CHRONO_STATIC inline
+#define BOOST_CHRONO_DECL
+
+#else
+#define BOOST_CHRONO_INLINE
+#define BOOST_CHRONO_STATIC static
+
+//  enable dynamic linking on Windows  ---------------------------------------//
+
+// we need to import/export our code only if the user has specifically
+// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
+// libraries to be dynamically linked, or BOOST_CHRONO_DYN_LINK
+// if they want just this one to be dynamically liked:
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK)
+// export if this is our own source, otherwise import:
+#ifdef BOOST_CHRONO_SOURCE
+# define BOOST_CHRONO_DECL BOOST_SYMBOL_EXPORT
+#else
+# define BOOST_CHRONO_DECL BOOST_SYMBOL_IMPORT
+#endif  // BOOST_CHRONO_SOURCE
+#endif  // DYN_LINK
+//
+// if BOOST_CHRONO_DECL isn't defined yet define it now:
+#ifndef BOOST_CHRONO_DECL
+#define BOOST_CHRONO_DECL
+#endif
+
+
+
+//  enable automatic library variant selection  ------------------------------//
+
+#if !defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_CHRONO_NO_LIB)
+//
+// Set the name of our library; this will get undef'ed by auto_link.hpp
+// once it's done with it:
+//
+#define BOOST_LIB_NAME boost_chrono
+//
+// If we're importing code from a dll, then tell auto_link.hpp about it:
+//
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK)
+#  define BOOST_DYN_LINK
+#endif
+//
+// And include the header that does the work:
+//
+#include <boost/config/auto_link.hpp>
+#endif  // auto-linking disabled
+#endif // BOOST_CHRONO_HEADER_ONLY
+#endif // BOOST_CHRONO_CONFIG_HPP
+
diff --git a/ext/boost/chrono/detail/is_evenly_divisible_by.hpp b/ext/boost/chrono/detail/is_evenly_divisible_by.hpp
new file mode 100644
index 0000000..960a208
--- /dev/null
+++ b/ext/boost/chrono/detail/is_evenly_divisible_by.hpp
@@ -0,0 +1,31 @@
+//  is_evenly_divisible_by.hpp  --------------------------------------------------------------//
+
+//  Copyright 2009-2010 Vicente J. Botet Escriba
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+#ifndef BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP
+#define BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP
+
+#include <boost/chrono/config.hpp>
+
+#include <boost/mpl/logical.hpp>
+#include <boost/ratio/detail/overflow_helpers.hpp>
+
+namespace boost {
+namespace chrono {
+namespace chrono_detail {
+
+//  template <class R1, class R2>
+//  struct is_evenly_divisible_by : public boost::mpl::bool_ < ratio_divide<R1, R2>::type::den == 1 >
+//  {};
+  template <class R1, class R2>
+  struct is_evenly_divisible_by : public boost::ratio_detail::is_evenly_divisible_by<R1, R2>
+  {};
+
+} // namespace chrono_detail
+} // namespace detail
+} // namespace chrono
+
+#endif // BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP
diff --git a/ext/boost/chrono/detail/static_assert.hpp b/ext/boost/chrono/detail/static_assert.hpp
new file mode 100644
index 0000000..8615194
--- /dev/null
+++ b/ext/boost/chrono/detail/static_assert.hpp
@@ -0,0 +1,30 @@
+//  static_assert.hpp  --------------------------------------------------------------//
+
+//  Copyright 2009-2010 Vicente J. Botet Escriba
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+
+#ifndef BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP
+#define BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP
+
+#include <boost/chrono/config.hpp>
+
+#ifndef BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
+#elif defined(BOOST_CHRONO_USES_STATIC_ASSERT)
+#include <boost/static_assert.hpp>
+#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
+#elif defined(BOOST_CHRONO_USES_MPL_ASSERT)
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/bool.hpp>
+#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES)                                 \
+    BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
+#else
+//~ #elif defined(BOOST_CHRONO_USES_ARRAY_ASSERT)
+#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_JOIN(boost_chrono_test_,__LINE__)[(CND)?1:-1]
+//~ #define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES)
+#endif
+
+#endif // BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP
diff --git a/ext/boost/chrono/detail/system.hpp b/ext/boost/chrono/detail/system.hpp
new file mode 100644
index 0000000..0dcffe8
--- /dev/null
+++ b/ext/boost/chrono/detail/system.hpp
@@ -0,0 +1,29 @@
+//  Copyright 2009-2010 Vicente J. Botet Escriba
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+#ifndef BOOST_CHRONO_DETAIL_SYSTEM_HPP
+#define BOOST_CHRONO_DETAIL_SYSTEM_HPP
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+
+#include <boost/version.hpp>
+#include <boost/system/error_code.hpp>
+
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
+#define BOOST_CHRONO_SYSTEM_CATEGORY boost::system::system_category
+#else
+#define BOOST_CHRONO_SYSTEM_CATEGORY boost::system::system_category()
+#endif
+
+#ifdef BOOST_SYSTEM_NO_DEPRECATED
+#define BOOST_CHRONO_THROWS boost::throws()
+#define BOOST_CHRONO_IS_THROWS(EC) (&EC==&boost::throws())
+#else
+#define BOOST_CHRONO_THROWS boost::system::throws
+#define BOOST_CHRONO_IS_THROWS(EC) (&EC==&boost::system::throws)
+#endif
+
+#endif
+#endif
diff --git a/ext/boost/chrono/duration.hpp b/ext/boost/chrono/duration.hpp
new file mode 100644
index 0000000..97fe3d7
--- /dev/null
+++ b/ext/boost/chrono/duration.hpp
@@ -0,0 +1,795 @@
+//  duration.hpp  --------------------------------------------------------------//
+
+//  Copyright 2008 Howard Hinnant
+//  Copyright 2008 Beman Dawes
+//  Copyright 2009-2011 Vicente J. Botet Escriba
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+/*
+
+This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
+Many thanks to Howard for making his code available under the Boost license.
+The original code was modified to conform to Boost conventions and to section
+20.9 Time utilities [time] of the C++ committee's working paper N2798.
+See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
+
+time2_demo contained this comment:
+
+    Much thanks to Andrei Alexandrescu,
+                   Walter Brown,
+                   Peter Dimov,
+                   Jeff Garland,
+                   Terry Golubiewski,
+                   Daniel Krugler,
+                   Anthony Williams.
+*/
+
+
+#ifndef BOOST_CHRONO_DURATION_HPP
+#define BOOST_CHRONO_DURATION_HPP
+
+#include <boost/chrono/config.hpp>
+#include <boost/chrono/detail/static_assert.hpp>
+
+#include <climits>
+#include <limits>
+
+
+#include <boost/mpl/logical.hpp>
+#include <boost/ratio/ratio.hpp>
+#include <boost/type_traits/common_type.hpp>
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
+#include <boost/type_traits/is_unsigned.hpp>
+#include <boost/chrono/detail/is_evenly_divisible_by.hpp>
+
+#include <boost/cstdint.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/integer_traits.hpp>
+
+#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) || !defined(BOOST_CHRONO_USES_MPL_ASSERT)
+#define BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION        "A duration representation can not be a duration"
+#define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO "Second template parameter of duration must be a boost::ratio"
+#define BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE "duration period must be positive"
+#define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION "Second template parameter of time_point must be a boost::chrono::duration"
+#endif
+
+#ifndef BOOST_CHRONO_HEADER_ONLY
+// this must occur after all of the includes and before any code appears:
+#include <boost/config/abi_prefix.hpp> // must be the last #include
+#endif
+
+//----------------------------------------------------------------------------//
+//                                                                            //
+//                        20.9 Time utilities [time]                          //
+//                                 synopsis                                   //
+//                                                                            //
+//----------------------------------------------------------------------------//
+
+namespace boost {
+namespace chrono {
+
+    template <class Rep, class Period = ratio<1> >
+    class duration;
+
+    namespace detail
+    {
+    template <class T>
+      struct is_duration
+        : boost::false_type {};
+
+    template <class Rep, class Period>
+      struct is_duration<duration<Rep, Period> >
+        : boost::true_type  {};
+
+    template <class Duration, class Rep, bool = is_duration<Rep>::value>
+    struct duration_divide_result
+    {
+    };
+
+    template <class Duration, class Rep2,
+        bool = (
+                    ((boost::is_convertible<typename Duration::rep,
+                        typename common_type<typename Duration::rep, Rep2>::type>::value))
+                &&  ((boost::is_convertible<Rep2,
+                        typename common_type<typename Duration::rep, Rep2>::type>::value))
+                )
+        >
+    struct duration_divide_imp
+    {
+    };
+
+    template <class Rep1, class Period, class Rep2>
+    struct duration_divide_imp<duration<Rep1, Period>, Rep2, true>
+    {
+        typedef duration<typename common_type<Rep1, Rep2>::type, Period> type;
+    };
+
+    template <class Rep1, class Period, class Rep2>
+    struct duration_divide_result<duration<Rep1, Period>, Rep2, false>
+        : duration_divide_imp<duration<Rep1, Period>, Rep2>
+    {
+    };
+
+///
+    template <class Rep, class Duration, bool = is_duration<Rep>::value>
+    struct duration_divide_result2
+    {
+    };
+
+    template <class Rep, class Duration,
+        bool = (
+                    ((boost::is_convertible<typename Duration::rep,
+                        typename common_type<typename Duration::rep, Rep>::type>::value))
+                &&  ((boost::is_convertible<Rep,
+                        typename common_type<typename Duration::rep, Rep>::type>::value))
+                )
+        >
+    struct duration_divide_imp2
+    {
+    };
+
+    template <class Rep1, class Rep2, class Period >
+    struct duration_divide_imp2<Rep1, duration<Rep2, Period>, true>
+    {
+        //typedef typename common_type<Rep1, Rep2>::type type;
+        typedef double type;
+    };
+
+    template <class Rep1, class Rep2, class Period >
+    struct duration_divide_result2<Rep1, duration<Rep2, Period>, false>
+        : duration_divide_imp2<Rep1, duration<Rep2, Period> >
+    {
+    };
+
+///
+    template <class Duration, class Rep, bool = is_duration<Rep>::value>
+    struct duration_modulo_result
+    {
+    };
+
+    template <class Duration, class Rep2,
+        bool = (
+                    //boost::is_convertible<typename Duration::rep,
+                        //typename common_type<typename Duration::rep, Rep2>::type>::value
+                //&&
+    boost::is_convertible<Rep2,
+                        typename common_type<typename Duration::rep, Rep2>::type>::value
+                )
+        >
+    struct duration_modulo_imp
+    {
+    };
+
+    template <class Rep1, class Period, class Rep2>
+    struct duration_modulo_imp<duration<Rep1, Period>, Rep2, true>
+    {
+        typedef duration<typename common_type<Rep1, Rep2>::type, Period> type;
+    };
+
+    template <class Rep1, class Period, class Rep2>
+    struct duration_modulo_result<duration<Rep1, Period>, Rep2, false>
+        : duration_modulo_imp<duration<Rep1, Period>, Rep2>
+    {
+    };
+
+} // namespace detail
+} // namespace chrono
+
+
+// common_type trait specializations
+
+template <class Rep1, class Period1, class Rep2, class Period2>
+struct common_type<chrono::duration<Rep1, Period1>,
+                     chrono::duration<Rep2, Period2> >;
+
+
+namespace chrono {
+
+    // customization traits
+    template <class Rep> struct treat_as_floating_point;
+    template <class Rep> struct duration_values;
+
+    // convenience typedefs
+    typedef duration<boost::int_least64_t, nano> nanoseconds;    // at least 64 bits needed
+    typedef duration<boost::int_least64_t, micro> microseconds;  // at least 55 bits needed
+    typedef duration<boost::int_least64_t, milli> milliseconds;  // at least 45 bits needed
+    typedef duration<boost::int_least64_t> seconds;              // at least 35 bits needed
+    typedef duration<boost::int_least32_t, ratio< 60> > minutes; // at least 29 bits needed
+    typedef duration<boost::int_least32_t, ratio<3600> > hours;  // at least 23 bits needed
+
+//----------------------------------------------------------------------------//
+//                          duration helpers                                  //
+//----------------------------------------------------------------------------//
+
+namespace detail
+{
+
+    // duration_cast
+
+    // duration_cast is the heart of this whole prototype.  It can convert any
+    //   duration to any other.  It is also (implicitly) used in converting
+    //   time_points.  The conversion is always exact if possible.  And it is
+    //   always as efficient as hand written code.  If different representations
+    //   are involved, care is taken to never require implicit conversions.
+    //   Instead static_cast is used explicitly for every required conversion.
+    //   If there are a mixture of integral and floating point representations,
+    //   the use of common_type ensures that the most logical "intermediate"
+    //   representation is used.
+    template <class FromDuration, class ToDuration,
+              class Period,
+              bool PeriodNumEq1,
+              bool PeriodDenEq1>
+    struct duration_cast_aux;
+
+    // When the two periods are the same, all that is left to do is static_cast from
+    //   the source representation to the target representation (which may be a no-op).
+    //   This conversion is always exact as long as the static_cast from the source
+    //   representation to the destination representation is exact.
+    template <class FromDuration, class ToDuration, class Period>
+    struct duration_cast_aux<FromDuration, ToDuration, Period, true, true>
+    {
+        BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
+        {
+            return ToDuration(static_cast<typename ToDuration::rep>(fd.count()));
+        }
+    };
+
+    // When the numerator of FromPeriod / ToPeriod is 1, then all we need to do is
+    //   divide by the denominator of FromPeriod / ToPeriod.  The common_type of
+    //   the two representations is used for the intermediate computation before
+    //   static_cast'ing to the destination.
+    //   This conversion is generally not exact because of the division (but could be
+    //   if you get lucky on the run time value of fd.count()).
+    template <class FromDuration, class ToDuration, class Period>
+    struct duration_cast_aux<FromDuration, ToDuration, Period, true, false>
+    {
+        BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
+        {
+            typedef typename common_type<
+                typename ToDuration::rep,
+                typename FromDuration::rep,
+                boost::intmax_t>::type C;
+            return ToDuration(static_cast<typename ToDuration::rep>(
+                              static_cast<C>(fd.count()) / static_cast<C>(Period::den)));
+        }
+    };
+
+    // When the denominator of FromPeriod / ToPeriod is 1, then all we need to do is
+    //   multiply by the numerator of FromPeriod / ToPeriod.  The common_type of
+    //   the two representations is used for the intermediate computation before
+    //   static_cast'ing to the destination.
+    //   This conversion is always exact as long as the static_cast's involved are exact.
+    template <class FromDuration, class ToDuration, class Period>
+    struct duration_cast_aux<FromDuration, ToDuration, Period, false, true>
+    {
+        BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
+        {
+            typedef typename common_type<
+              typename ToDuration::rep,
+              typename FromDuration::rep,
+              boost::intmax_t>::type C;
+            return ToDuration(static_cast<typename ToDuration::rep>(
+                              static_cast<C>(fd.count()) * static_cast<C>(Period::num)));
+        }
+    };
+
+    // When neither the numerator or denominator of FromPeriod / ToPeriod is 1, then we need to
+    //   multiply by the numerator and divide by the denominator of FromPeriod / ToPeriod.  The
+    //   common_type of the two representations is used for the intermediate computation before
+    //   static_cast'ing to the destination.
+    //   This conversion is generally not exact because of the division (but could be
+    //   if you get lucky on the run time value of fd.count()).
+    template <class FromDuration, class ToDuration, class Period>
+    struct duration_cast_aux<FromDuration, ToDuration, Period, false, false>
+    {
+        BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
+        {
+            typedef typename common_type<
+              typename ToDuration::rep,
+              typename FromDuration::rep,
+              boost::intmax_t>::type C;
+            return ToDuration(static_cast<typename ToDuration::rep>(
+               static_cast<C>(fd.count()) * static_cast<C>(Period::num)
+                 / static_cast<C>(Period::den)));
+        }
+    };
+
+    template <class FromDuration, class ToDuration>
+    struct duration_cast {
+        typedef typename ratio_divide<typename FromDuration::period,
+              typename ToDuration::period>::type Period;
+        typedef duration_cast_aux<
+            FromDuration,
+            ToDuration,
+            Period,
+            Period::num == 1,
+            Period::den == 1
+        > Aux;
+        BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
+        {
+            return Aux()(fd);
+        }
+    };
+
+} // namespace detail
+
+//----------------------------------------------------------------------------//
+//                                                                            //
+//      20.9.2 Time-related traits [time.traits]                              //
+//                                                                            //
+//----------------------------------------------------------------------------//
+//----------------------------------------------------------------------------//
+//      20.9.2.1 treat_as_floating_point [time.traits.is_fp]                        //
+//      Probably should have been treat_as_floating_point. Editor notifed.    //
+//----------------------------------------------------------------------------//
+
+    // Support bidirectional (non-exact) conversions for floating point rep types
+    //   (or user defined rep types which specialize treat_as_floating_point).
+    template <class Rep>
+    struct treat_as_floating_point : boost::is_floating_point<Rep> {};
+
+//----------------------------------------------------------------------------//
+//      20.9.2.2 duration_values [time.traits.duration_values]                //
+//----------------------------------------------------------------------------//
+
+namespace detail {
+    template <class T, bool = is_arithmetic<T>::value>
+    struct chrono_numeric_limits {
+        static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits<T>::min)  ();}
+    };
+
+    template <class T>
+    struct chrono_numeric_limits<T,true> {
+        static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits<T>::min)  ();}
+    };
+
+    template <>
+    struct chrono_numeric_limits<float,true> {
+        static BOOST_CHRONO_LIB_CONSTEXPR float lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW
+        {
+            return -(std::numeric_limits<float>::max) ();
+        }
+    };
+
+    template <>
+    struct chrono_numeric_limits<double,true> {
+        static BOOST_CHRONO_LIB_CONSTEXPR double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW
+        {
+            return -(std::numeric_limits<double>::max) ();
+        }
+    };
+
+    template <>
+    struct chrono_numeric_limits<long double,true> {
+        static BOOST_CHRONO_LIB_CONSTEXPR long double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW
+        {
+            return -(std::numeric_limits<long double>::max)();
+        }
+    };
+
+    template <class T>
+    struct numeric_limits : chrono_numeric_limits<typename remove_cv<T>::type>
+    {};
+
+}
+template <class Rep>
+struct duration_values
+{
+    static BOOST_CONSTEXPR Rep zero() {return Rep(0);}
+    static BOOST_CHRONO_LIB_CONSTEXPR Rep max BOOST_PREVENT_MACRO_SUBSTITUTION ()
+    {
+        return (std::numeric_limits<Rep>::max)();
+    }
+
+    static BOOST_CHRONO_LIB_CONSTEXPR Rep min BOOST_PREVENT_MACRO_SUBSTITUTION ()
+    {
+        return detail::numeric_limits<Rep>::lowest();
+    }
+};
+
+}  // namespace chrono
+
+//----------------------------------------------------------------------------//
+//      20.9.2.3 Specializations of common_type [time.traits.specializations] //
+//----------------------------------------------------------------------------//
+
+template <class Rep1, class Period1, class Rep2, class Period2>
+struct common_type<chrono::duration<Rep1, Period1>,
+                   chrono::duration<Rep2, Period2> >
+{
+  typedef chrono::duration<typename common_type<Rep1, Rep2>::type,
+                      typename boost::ratio_gcd<Period1, Period2>::type> type;
+};
+
+
+//----------------------------------------------------------------------------//
+//                                                                            //
+//         20.9.3 Class template duration [time.duration]                     //
+//                                                                            //
+//----------------------------------------------------------------------------//
+
+
+namespace chrono {
+
+    template <class Rep, class Period>
+    class duration
+    {
+    //BOOST_CHRONO_STATIC_ASSERT(boost::is_integral<Rep>::value, BOOST_CHRONO_A_DURATION_REPRESENTATION_MUST_BE_INTEGRAL, ());
+    BOOST_CHRONO_STATIC_ASSERT(!boost::chrono::detail::is_duration<Rep>::value,
+            BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION, ());
+    BOOST_CHRONO_STATIC_ASSERT(boost::ratio_detail::is_ratio<typename Period::type>::value,
+            BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO, ());
+    BOOST_CHRONO_STATIC_ASSERT(Period::num>0,
+            BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE, ());
+    public:
+        typedef Rep rep;
+        typedef Period period;
+    private:
+        rep rep_;
+    public:
+
+        BOOST_CONSTEXPR
+        duration() : rep_(duration_values<rep>::zero()) { }
+        template <class Rep2>
+        BOOST_CONSTEXPR
+        explicit duration(const Rep2& r
+        , typename boost::enable_if <
+                    mpl::and_ <
+                        boost::is_convertible<Rep2, rep>,
+                        mpl::or_ <
+                            treat_as_floating_point<rep>,
+                            mpl::and_ <
+                                mpl::not_ < treat_as_floating_point<rep> >,
+                                mpl::not_ < treat_as_floating_point<Rep2> >
+                            >
+                        >
+                    >
+                >::type* = 0
+            ) : rep_(r) { }
+        //~duration() {} //= default;
+        //BOOST_CONSTEXPR
+        //duration(const duration& rhs) : rep_(rhs.rep_) {} // = default;
+        duration& operator=(const duration& rhs) // = default;
+        {
+            if (&rhs != this) rep_= rhs.rep_;
+            return *this;
+        }
+
+        // conversions
+        template <class Rep2, class Period2>
+        BOOST_CONSTEXPR
+        duration(const duration<Rep2, Period2>& d
+        , typename boost::enable_if <
+                    mpl::or_ <
+                        treat_as_floating_point<rep>,
+                        mpl::and_ <
+                            chrono_detail::is_evenly_divisible_by<Period2, period>,
+                            mpl::not_ < treat_as_floating_point<Rep2> >
+                        >
+                    >
+                >::type* = 0
+        )
+            : rep_(chrono::detail::duration_cast<duration<Rep2, Period2>, duration>()(d).count()) {}
+
+        // observer
+
+        BOOST_CONSTEXPR
+        rep count() const {return rep_;}
+
+        // arithmetic
+
+        BOOST_CONSTEXPR
+        duration  operator+() const {return duration(rep_);;}
+        BOOST_CONSTEXPR
+        duration  operator-() const {return duration(-rep_);}
+        duration& operator++()      {++rep_; return *this;}
+        duration  operator++(int)   {return duration(rep_++);}
+        duration& operator--()      {--rep_; return *this;}
+        duration  operator--(int)   {return duration(rep_--);}
+
+        duration& operator+=(const duration& d)
+        {
+            rep_ += d.count(); return *this;
+        }
+        duration& operator-=(const duration& d)
+        {
+            rep_ -= d.count(); return *this;
+        }
+
+        duration& operator*=(const rep& rhs) {rep_ *= rhs; return *this;}
+        duration& operator/=(const rep& rhs) {rep_ /= rhs; return *this;}
+        duration& operator%=(const rep& rhs) {rep_ %= rhs; return *this;}
+        duration& operator%=(const duration& rhs)
+        {
+            rep_ %= rhs.count(); return *this;
+        }
+        // 20.9.3.4 duration special values [time.duration.special]
+
+        static BOOST_CONSTEXPR duration zero()
+        {
+            return duration(duration_values<rep>::zero());
+        }
+        static BOOST_CHRONO_LIB_CONSTEXPR duration min BOOST_PREVENT_MACRO_SUBSTITUTION ()
+        {
+            return duration((duration_values<rep>::min)());
+        }
+        static BOOST_CHRONO_LIB_CONSTEXPR duration max BOOST_PREVENT_MACRO_SUBSTITUTION ()
+        {
+            return duration((duration_values<rep>::max)());
+        }
+    };
+
+//----------------------------------------------------------------------------//
+//      20.9.3.5 duration non-member arithmetic [time.duration.nonmember]     //
+//----------------------------------------------------------------------------//
+
+    // Duration +
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline BOOST_CONSTEXPR
+    typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
+    operator+(const duration<Rep1, Period1>& lhs,
+          const duration<Rep2, Period2>& rhs)
+    {
+      typedef typename common_type<duration<Rep1, Period1>,
+        duration<Rep2, Period2> >::type CD;
+      return CD(CD(lhs).count()+CD(rhs).count());
+    }
+
+    // Duration -
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline BOOST_CONSTEXPR
+    typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
+    operator-(const duration<Rep1, Period1>& lhs,
+          const duration<Rep2, Period2>& rhs)
+    {
+      typedef typename common_type<duration<Rep1, Period1>,
+            duration<Rep2, Period2> >::type CD;
+      return CD(CD(lhs).count()-CD(rhs).count());
+    }
+
+    // Duration *
+
+    template <class Rep1, class Period, class Rep2>
+    inline BOOST_CONSTEXPR
+    typename boost::enable_if <
+        mpl::and_ <
+        boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>,
+        boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type>
+        >,
+        duration<typename common_type<Rep1, Rep2>::type, Period>
+    >::type
+    operator*(const duration<Rep1, Period>& d, const Rep2& s)
+    {
+      typedef typename common_type<Rep1, Rep2>::type CR;
+      typedef duration<CR, Period> CD;
+      return CD(CD(d).count()*static_cast<CR>(s));
+    }
+
+    template <class Rep1, class Period, class Rep2>
+    inline BOOST_CONSTEXPR
+    typename boost::enable_if <
+        mpl::and_ <
+        boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>,
+        boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type>
+        >,
+        duration<typename common_type<Rep1, Rep2>::type, Period>
+    >::type
+    operator*(const Rep1& s, const duration<Rep2, Period>& d)
+    {
+        return d * s;
+    }
+
+    // Duration /
+
+    template <class Rep1, class Period, class Rep2>
+    inline BOOST_CONSTEXPR
+    typename boost::disable_if <boost::chrono::detail::is_duration<Rep2>,
+      typename boost::chrono::detail::duration_divide_result<
+        duration<Rep1, Period>, Rep2>::type
+    >::type
+    operator/(const duration<Rep1, Period>& d, const Rep2& s)
+    {
+        typedef typename common_type<Rep1, Rep2>::type CR;
+        typedef duration<CR, Period> CD;
+
+      return CD(CD(d).count()/static_cast<CR>(s));
+    }
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline BOOST_CONSTEXPR
+    typename common_type<Rep1, Rep2>::type
+    operator/(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs)
+    {
+        typedef typename common_type<duration<Rep1, Period1>,
+                                   duration<Rep2, Period2> >::type CD;
+        return CD(lhs).count() / CD(rhs).count();
+    }
+
+    #ifdef BOOST_CHRONO_EXTENSIONS
+    template <class Rep1, class Rep2, class Period>
+    inline BOOST_CONSTEXPR
+    typename boost::disable_if <boost::chrono::detail::is_duration<Rep1>,
+      typename boost::chrono::detail::duration_divide_result2<
+        Rep1, duration<Rep2, Period> >::type
+      >::type
+    operator/(const Rep1& s, const duration<Rep2, Period>& d)
+    {
+        typedef typename common_type<Rep1, Rep2>::type CR;
+        typedef duration<CR, Period> CD;
+
+      return static_cast<CR>(s)/CD(d).count();
+    }
+    #endif
+    // Duration %
+
+    template <class Rep1, class Period, class Rep2>
+    inline BOOST_CONSTEXPR
+    typename boost::disable_if <boost::chrono::detail::is_duration<Rep2>,
+      typename boost::chrono::detail::duration_modulo_result<
+        duration<Rep1, Period>, Rep2>::type
+    >::type
+    operator%(const duration<Rep1, Period>& d, const Rep2& s)
+    {
+        typedef typename common_type<Rep1, Rep2>::type CR;
+        typedef duration<CR, Period> CD;
+
+      return CD(CD(d).count()%static_cast<CR>(s));
+    }
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline BOOST_CONSTEXPR
+    typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
+    operator%(const duration<Rep1, Period1>& lhs,
+          const duration<Rep2, Period2>& rhs) {
+        typedef typename common_type<duration<Rep1, Period1>,
+                                 duration<Rep2, Period2> >::type CD;
+
+      return CD(CD(lhs).count()%CD(rhs).count());
+    }
+
+
+//----------------------------------------------------------------------------//
+//      20.9.3.6 duration comparisons [time.duration.comparisons]             //
+//----------------------------------------------------------------------------//
+
+namespace detail
+{
+    template <class LhsDuration, class RhsDuration>
+    struct duration_eq
+    {
+      BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs)
+        {
+            typedef typename common_type<LhsDuration, RhsDuration>::type CD;
+            return CD(lhs).count() == CD(rhs).count();
+        }
+    };
+
+    template <class LhsDuration>
+    struct duration_eq<LhsDuration, LhsDuration>
+    {
+      BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs)
+        {
+            return lhs.count() == rhs.count();
+        }
+    };
+
+    template <class LhsDuration, class RhsDuration>
+    struct duration_lt
+    {
+      BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs)
+        {
+            typedef typename common_type<LhsDuration, RhsDuration>::type CD;
+            return CD(lhs).count() < CD(rhs).count();
+        }
+    };
+
+    template <class LhsDuration>
+    struct duration_lt<LhsDuration, LhsDuration>
+    {
+      BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs)
+        {
+            return lhs.count() < rhs.count();
+        }
+    };
+
+} // namespace detail
+
+    // Duration ==
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline BOOST_CONSTEXPR
+    bool
+    operator==(const duration<Rep1, Period1>& lhs,
+          const duration<Rep2, Period2>& rhs)
+    {
+        return boost::chrono::detail::duration_eq<
+            duration<Rep1, Period1>, duration<Rep2, Period2> >()(lhs, rhs);
+    }
+
+    // Duration !=
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline BOOST_CONSTEXPR
+    bool
+    operator!=(const duration<Rep1, Period1>& lhs,
+          const duration<Rep2, Period2>& rhs)
+    {
+        return !(lhs == rhs);
+    }
+
+    // Duration <
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline BOOST_CONSTEXPR
+    bool
+    operator< (const duration<Rep1, Period1>& lhs,
+          const duration<Rep2, Period2>& rhs)
+    {
+        return boost::chrono::detail::duration_lt<
+          duration<Rep1, Period1>, duration<Rep2, Period2> >()(lhs, rhs);
+    }
+
+    // Duration >
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline BOOST_CONSTEXPR
+    bool
+    operator> (const duration<Rep1, Period1>& lhs,
+          const duration<Rep2, Period2>& rhs)
+    {
+        return rhs < lhs;
+    }
+
+    // Duration <=
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline BOOST_CONSTEXPR
+    bool
+    operator<=(const duration<Rep1, Period1>& lhs,
+          const duration<Rep2, Period2>& rhs)
+    {
+        return !(rhs < lhs);
+    }
+
+    // Duration >=
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline BOOST_CONSTEXPR
+    bool
+    operator>=(const duration<Rep1, Period1>& lhs,
+          const duration<Rep2, Period2>& rhs)
+    {
+        return !(lhs < rhs);
+    }
+
+//----------------------------------------------------------------------------//
+//      20.9.3.7 duration_cast [time.duration.cast]                           //
+//----------------------------------------------------------------------------//
+
+    // Compile-time select the most efficient algorithm for the conversion...
+    template <class ToDuration, class Rep, class Period>
+    inline BOOST_CONSTEXPR
+    typename boost::enable_if <
+      boost::chrono::detail::is_duration<ToDuration>, ToDuration>::type
+    duration_cast(const duration<Rep, Period>& fd)
+    {
+        return boost::chrono::detail::duration_cast<
+          duration<Rep, Period>, ToDuration>()(fd);
+    }
+
+} // namespace chrono
+} // namespace boost
+
+#ifndef BOOST_CHRONO_HEADER_ONLY
+// the suffix header occurs after all of our code:
+#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
+#endif
+
+#endif // BOOST_CHRONO_DURATION_HPP
diff --git a/ext/boost/chrono/system_clocks.hpp b/ext/boost/chrono/system_clocks.hpp
new file mode 100644
index 0000000..df8b79e
--- /dev/null
+++ b/ext/boost/chrono/system_clocks.hpp
@@ -0,0 +1,233 @@
+//  boost/chrono/system_clocks.hpp  --------------------------------------------------------------//
+
+//  Copyright 2008 Howard Hinnant
+//  Copyright 2008 Beman Dawes
+//  Copyright 2009-2011 Vicente J. Botet Escriba
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+/*
+
+This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
+Many thanks to Howard for making his code available under the Boost license.
+The original code was modified to conform to Boost conventions and to section
+20.9 Time utilities [time] of the C++ committee's working paper N2798.
+See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
+
+time2_demo contained this comment:
+
+    Much thanks to Andrei Alexandrescu,
+                   Walter Brown,
+                   Peter Dimov,
+                   Jeff Garland,
+                   Terry Golubiewski,
+                   Daniel Krugler,
+                   Anthony Williams.
+*/
+
+/*
+
+TODO:
+
+  * Fully implement error handling, with test cases.
+  * Consider issues raised by Michael Marcin:
+
+    > In the past I've seen QueryPerformanceCounter give incorrect results,
+    > especially with SpeedStep processors on laptops. This was many years ago and
+    > might have been fixed by service packs and drivers.
+    >
+    > Typically you check the results of QPC against GetTickCount to see if the
+    > results are reasonable.
+    > http://support.microsoft.com/kb/274323
+    >
+    > I've also heard of problems with QueryPerformanceCounter in multi-processor
+    > systems.
+    >
+    > I know some people SetThreadAffinityMask to 1 for the current thread call
+    > their QueryPerformance* functions then restore SetThreadAffinityMask. This
+    > seems horrible to me because it forces your program to jump to another
+    > physical processor if it isn't already on cpu0 but they claim it worked well
+    > in practice because they called the timing functions infrequently.
+    >
+    > In the past I have chosen to use timeGetTime with timeBeginPeriod(1) for
+    > high resolution timers to avoid these issues.
+
+*/
+
+#ifndef BOOST_CHRONO_SYSTEM_CLOCKS_HPP
+#define BOOST_CHRONO_SYSTEM_CLOCKS_HPP
+
+#include <boost/chrono/config.hpp>
+#include <boost/chrono/duration.hpp>
+#include <boost/chrono/time_point.hpp>
+#include <boost/chrono/detail/system.hpp>
+#include <boost/chrono/clock_string.hpp>
+
+#include <ctime>
+
+# if defined( BOOST_CHRONO_POSIX_API )
+#   if ! defined(CLOCK_REALTIME)
+#     error <time.h> does not supply CLOCK_REALTIME
+#   endif
+# endif
+
+#ifdef BOOST_CHRONO_WINDOWS_API
+// The system_clock tick is 100 nanoseconds
+# define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::duration<boost::int_least64_t, ratio<BOOST_RATIO_INTMAX_C(1), BOOST_RATIO_INTMAX_C(10000000)> >
+#else
+# define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::nanoseconds
+#endif
+
+// this must occur after all of the includes and before any code appears:
+#ifndef BOOST_CHRONO_HEADER_ONLY
+#include <boost/config/abi_prefix.hpp> // must be the last #include
+#endif
+
+
+//----------------------------------------------------------------------------//
+//                                                                            //
+//                        20.9 Time utilities [time]                          //
+//                                 synopsis                                   //
+//                                                                            //
+//----------------------------------------------------------------------------//
+
+namespace boost {
+namespace chrono {
+
+  // Clocks
+  class BOOST_CHRONO_DECL system_clock;
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+  class BOOST_CHRONO_DECL steady_clock;
+#endif
+
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+  typedef steady_clock high_resolution_clock;  // as permitted by [time.clock.hires]
+#else
+  typedef system_clock high_resolution_clock;  // as permitted by [time.clock.hires]
+#endif
+
+//----------------------------------------------------------------------------//
+//                                                                            //
+//      20.9.5 Clocks [time.clock]                                            //
+//                                                                            //
+//----------------------------------------------------------------------------//
+
+// If you're porting, clocks are the system-specific (non-portable) part.
+// You'll need to know how to get the current time and implement that under now().
+// You'll need to know what units (tick period) and representation makes the most
+// sense for your clock and set those accordingly.
+// If you know how to map this clock to time_t (perhaps your clock is std::time, which
+// makes that trivial), then you can fill out system_clock's to_time_t() and from_time_t().
+
+//----------------------------------------------------------------------------//
+//      20.9.5.1 Class system_clock [time.clock.system]                       //
+//----------------------------------------------------------------------------//
+
+  class BOOST_CHRONO_DECL system_clock
+  {
+  public:
+      typedef BOOST_SYSTEM_CLOCK_DURATION          duration;
+      typedef duration::rep                        rep;
+      typedef duration::period                     period;
+      typedef chrono::time_point<system_clock>     time_point;
+      BOOST_STATIC_CONSTEXPR bool is_steady =             false;
+
+      static BOOST_CHRONO_INLINE time_point  now() BOOST_NOEXCEPT;
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+      static BOOST_CHRONO_INLINE time_point  now(system::error_code & ec);
+#endif
+
+      static BOOST_CHRONO_INLINE std::time_t to_time_t(const time_point& t) BOOST_NOEXCEPT;
+      static BOOST_CHRONO_INLINE time_point  from_time_t(std::time_t t) BOOST_NOEXCEPT;
+  };
+
+//----------------------------------------------------------------------------//
+//      20.9.5.2 Class steady_clock [time.clock.steady]                 //
+//----------------------------------------------------------------------------//
+
+// As permitted  by [time.clock.steady]
+// The class steady_clock is conditionally supported.
+
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+  class BOOST_CHRONO_DECL steady_clock
+  {
+  public:
+      typedef nanoseconds                          duration;
+      typedef duration::rep                        rep;
+      typedef duration::period                     period;
+      typedef chrono::time_point<steady_clock>  time_point;
+      BOOST_STATIC_CONSTEXPR bool is_steady =             true;
+
+      static BOOST_CHRONO_INLINE time_point  now() BOOST_NOEXCEPT;
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+      static BOOST_CHRONO_INLINE time_point  now(system::error_code & ec);
+#endif
+  };
+#endif
+//----------------------------------------------------------------------------//
+//      20.9.5.3 Class high_resolution_clock [time.clock.hires]               //
+//----------------------------------------------------------------------------//
+
+//  As permitted, steady_clock or system_clock is a typedef for high_resolution_clock.
+//  See synopsis.
+
+
+  template<class CharT>
+  struct clock_string<system_clock, CharT>
+  {
+    static std::basic_string<CharT> name()
+    {
+      static const CharT u[] =
+      { 's', 'y', 's', 't', 'e', 'm', '_', 'c', 'l', 'o', 'c', 'k' };
+      static const std::basic_string<CharT> str(u, u + sizeof(u)
+          / sizeof(u[0]));
+      return str;
+    }
+    static std::basic_string<CharT> since()
+    {
+      static const CharT
+          u[] =
+              { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'J', 'a', 'n', ' ', '1', ',', ' ', '1', '9', '7', '0' };
+      static const std::basic_string<CharT> str(u, u + sizeof(u)
+          / sizeof(u[0]));
+      return str;
+    }
+  };
+
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+
+  template<class CharT>
+  struct clock_string<steady_clock, CharT>
+  {
+    static std::basic_string<CharT> name()
+    {
+      static const CharT
+          u[] =
+              { 's', 't', 'e', 'a', 'd', 'y', '_', 'c', 'l', 'o', 'c', 'k' };
+      static const std::basic_string<CharT> str(u, u + sizeof(u)
+          / sizeof(u[0]));
+      return str;
+    }
+    static std::basic_string<CharT> since()
+    {
+      const CharT u[] =
+      { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'b', 'o', 'o', 't' };
+      const std::basic_string<CharT> str(u, u + sizeof(u) / sizeof(u[0]));
+      return str;
+    }
+  };
+
+#endif
+
+} // namespace chrono
+} // namespace boost
+
+#ifndef BOOST_CHRONO_HEADER_ONLY
+// the suffix header occurs after all of our code:
+#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
+#else
+#include <boost/chrono/detail/inlined/chrono.hpp>
+#endif
+
+#endif // BOOST_CHRONO_SYSTEM_CLOCKS_HPP
diff --git a/ext/boost/chrono/time_point.hpp b/ext/boost/chrono/time_point.hpp
new file mode 100644
index 0000000..7e80b59
--- /dev/null
+++ b/ext/boost/chrono/time_point.hpp
@@ -0,0 +1,379 @@
+//  duration.hpp  --------------------------------------------------------------//
+
+//  Copyright 2008 Howard Hinnant
+//  Copyright 2008 Beman Dawes
+//  Copyright 2009-2012 Vicente J. Botet Escriba
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+/*
+
+This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
+Many thanks to Howard for making his code available under the Boost license.
+The original code was modified to conform to Boost conventions and to section
+20.9 Time utilities [time] of the C++ committee's working paper N2798.
+See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
+
+time2_demo contained this comment:
+
+    Much thanks to Andrei Alexandrescu,
+                   Walter Brown,
+                   Peter Dimov,
+                   Jeff Garland,
+                   Terry Golubiewski,
+                   Daniel Krugler,
+                   Anthony Williams.
+*/
+
+
+#ifndef BOOST_CHRONO_TIME_POINT_HPP
+#define BOOST_CHRONO_TIME_POINT_HPP
+
+#include <boost/chrono/duration.hpp>
+#include <iostream>
+
+#ifndef BOOST_CHRONO_HEADER_ONLY
+// this must occur after all of the includes and before any code appears:
+#include <boost/config/abi_prefix.hpp> // must be the last #include
+#endif
+
+//----------------------------------------------------------------------------//
+//                                                                            //
+//                        20.9 Time utilities [time]                          //
+//                                 synopsis                                   //
+//                                                                            //
+//----------------------------------------------------------------------------//
+
+namespace boost {
+namespace chrono {
+
+  template <class Clock, class Duration = typename Clock::duration>
+    class time_point;
+
+
+} // namespace chrono
+
+
+// common_type trait specializations
+
+template <class Clock, class Duration1, class Duration2>
+  struct common_type<chrono::time_point<Clock, Duration1>,
+                     chrono::time_point<Clock, Duration2> >;
+
+
+//----------------------------------------------------------------------------//
+//      20.9.2.3 Specializations of common_type [time.traits.specializations] //
+//----------------------------------------------------------------------------//
+
+
+template <class Clock, class Duration1, class Duration2>
+struct common_type<chrono::time_point<Clock, Duration1>,
+                   chrono::time_point<Clock, Duration2> >
+{
+  typedef chrono::time_point<Clock,
+    typename common_type<Duration1, Duration2>::type> type;
+};
+
+
+
+namespace chrono {
+
+    // time_point arithmetic
+    template <class Clock, class Duration1, class Rep2, class Period2>
+    inline BOOST_CONSTEXPR
+    time_point<Clock,
+        typename common_type<Duration1, duration<Rep2, Period2> >::type>
+    operator+(
+            const time_point<Clock, Duration1>& lhs,
+            const duration<Rep2, Period2>& rhs);
+    template <class Rep1, class Period1, class Clock, class Duration2>
+    inline BOOST_CONSTEXPR
+    time_point<Clock,
+        typename common_type<duration<Rep1, Period1>, Duration2>::type>
+    operator+(
+            const duration<Rep1, Period1>& lhs,
+            const time_point<Clock, Duration2>& rhs);
+    template <class Clock, class Duration1, class Rep2, class Period2>
+    inline BOOST_CONSTEXPR
+    time_point<Clock,
+        typename common_type<Duration1, duration<Rep2, Period2> >::type>
+    operator-(
+            const time_point<Clock, Duration1>& lhs,
+            const duration<Rep2, Period2>& rhs);
+    template <class Clock, class Duration1, class Duration2>
+    inline BOOST_CONSTEXPR
+    typename common_type<Duration1, Duration2>::type
+    operator-(
+            const time_point<Clock, Duration1>& lhs,
+            const time_point<Clock,
+            Duration2>& rhs);
+
+    // time_point comparisons
+    template <class Clock, class Duration1, class Duration2>
+    inline BOOST_CONSTEXPR
+    bool operator==(
+          const time_point<Clock, Duration1>& lhs,
+          const time_point<Clock, Duration2>& rhs);
+    template <class Clock, class Duration1, class Duration2>
+    inline BOOST_CONSTEXPR
+    bool operator!=(
+          const time_point<Clock, Duration1>& lhs,
+          const time_point<Clock, Duration2>& rhs);
+    template <class Clock, class Duration1, class Duration2>
+    inline BOOST_CONSTEXPR
+    bool operator< (
+          const time_point<Clock, Duration1>& lhs,
+          const time_point<Clock, Duration2>& rhs);
+    template <class Clock, class Duration1, class Duration2>
+    inline BOOST_CONSTEXPR
+    bool operator<=(
+          const time_point<Clock, Duration1>& lhs,
+          const time_point<Clock, Duration2>& rhs);
+    template <class Clock, class Duration1, class Duration2>
+    inline BOOST_CONSTEXPR
+    bool operator> (
+          const time_point<Clock, Duration1>& lhs,
+          const time_point<Clock, Duration2>& rhs);
+    template <class Clock, class Duration1, class Duration2>
+    inline BOOST_CONSTEXPR
+    bool operator>=(
+          const time_point<Clock, Duration1>& lhs,
+          const time_point<Clock, Duration2>& rhs);
+
+    // time_point_cast
+    template <class ToDuration, class Clock, class Duration>
+    inline BOOST_CONSTEXPR
+    time_point<Clock, ToDuration> time_point_cast(const time_point<Clock, Duration>& t);
+
+//----------------------------------------------------------------------------//
+//                                                                            //
+//      20.9.4 Class template time_point [time.point]                         //
+//                                                                            //
+//----------------------------------------------------------------------------//
+
+    template <class Clock, class Duration>
+    class time_point
+    {
+        BOOST_CHRONO_STATIC_ASSERT(boost::chrono::detail::is_duration<Duration>::value,
+                BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION, (Duration));
+    public:
+        typedef Clock                     clock;
+        typedef Duration                  duration;
+        typedef typename duration::rep    rep;
+        typedef typename duration::period period;
+        typedef Duration                  difference_type;
+
+    private:
+        duration d_;
+
+    public:
+        BOOST_CONSTEXPR
+        time_point() : d_(duration::zero())
+        {}
+        BOOST_CONSTEXPR explicit time_point(const duration& d)
+            : d_(d)
+        {}
+
+        // conversions
+        template <class Duration2>
+        BOOST_CONSTEXPR
+        time_point(const time_point<clock, Duration2>& t
+                , typename boost::enable_if
+                <
+                    boost::is_convertible<Duration2, duration>
+                >::type* = 0
+        )
+            : d_(t.time_since_epoch())
+        {
+        }
+        // observer
+
+        BOOST_CONSTEXPR
+        duration time_since_epoch() const
+        {
+            return d_;
+        }
+
+        // arithmetic
+
+#ifdef BOOST_CHRONO_EXTENSIONS
+        BOOST_CONSTEXPR
+        time_point  operator+() const {return *this;}
+        BOOST_CONSTEXPR
+        time_point  operator-() const {return time_point(-d_);}
+        time_point& operator++()      {++d_; return *this;}
+        time_point  operator++(int)   {return time_point(d_++);}
+        time_point& operator--()      {--d_; return *this;}
+        time_point  operator--(int)   {return time_point(d_--);}
+
+        time_point& operator+=(const rep& r) {d_ += duration(r); return *this;}
+        time_point& operator-=(const rep& r) {d_ -= duration(r); return *this;}
+
+#endif
+
+        time_point& operator+=(const duration& d) {d_ += d; return *this;}
+        time_point& operator-=(const duration& d) {d_ -= d; return *this;}
+
+        // special values
+
+        static BOOST_CHRONO_LIB_CONSTEXPR time_point
+        min BOOST_PREVENT_MACRO_SUBSTITUTION ()
+        {
+            return time_point((duration::min)());
+        }
+        static BOOST_CHRONO_LIB_CONSTEXPR time_point
+        max BOOST_PREVENT_MACRO_SUBSTITUTION ()
+        {
+            return time_point((duration::max)());
+        }
+    };
+
+//----------------------------------------------------------------------------//
+//      20.9.4.5 time_point non-member arithmetic [time.point.nonmember]      //
+//----------------------------------------------------------------------------//
+
+    // time_point operator+(time_point x, duration y);
+
+    template <class Clock, class Duration1, class Rep2, class Period2>
+    inline BOOST_CONSTEXPR
+    time_point<Clock,
+        typename common_type<Duration1, duration<Rep2, Period2> >::type>
+    operator+(const time_point<Clock, Duration1>& lhs,
+            const duration<Rep2, Period2>& rhs)
+    {
+      typedef typename common_type<Duration1, duration<Rep2, Period2> >::type CDuration;
+      typedef time_point<
+          Clock,
+          CDuration
+      > TimeResult;
+        return TimeResult(lhs.time_since_epoch() + CDuration(rhs));
+    }
+
+    // time_point operator+(duration x, time_point y);
+
+    template <class Rep1, class Period1, class Clock, class Duration2>
+    inline BOOST_CONSTEXPR
+    time_point<Clock,
+        typename common_type<duration<Rep1, Period1>, Duration2>::type>
+    operator+(const duration<Rep1, Period1>& lhs,
+            const time_point<Clock, Duration2>& rhs)
+    {
+        return rhs + lhs;
+    }
+
+    // time_point operator-(time_point x, duration y);
+
+    template <class Clock, class Duration1, class Rep2, class Period2>
+    inline BOOST_CONSTEXPR
+    time_point<Clock,
+        typename common_type<Duration1, duration<Rep2, Period2> >::type>
+    operator-(const time_point<Clock, Duration1>& lhs,
+            const duration<Rep2, Period2>& rhs)
+    {
+        return lhs + (-rhs);
+    }
+
+    // duration operator-(time_point x, time_point y);
+
+    template <class Clock, class Duration1, class Duration2>
+    inline BOOST_CONSTEXPR
+    typename common_type<Duration1, Duration2>::type
+    operator-(const time_point<Clock, Duration1>& lhs,
+            const time_point<Clock, Duration2>& rhs)
+    {
+        return lhs.time_since_epoch() - rhs.time_since_epoch();
+    }
+
+//----------------------------------------------------------------------------//
+//      20.9.4.6 time_point comparisons [time.point.comparisons]              //
+//----------------------------------------------------------------------------//
+
+    // time_point ==
+
+    template <class Clock, class Duration1, class Duration2>
+    inline BOOST_CONSTEXPR
+    bool
+    operator==(const time_point<Clock, Duration1>& lhs,
+             const time_point<Clock, Duration2>& rhs)
+    {
+        return lhs.time_since_epoch() == rhs.time_since_epoch();
+    }
+
+    // time_point !=
+
+    template <class Clock, class Duration1, class Duration2>
+    inline BOOST_CONSTEXPR
+    bool
+    operator!=(const time_point<Clock, Duration1>& lhs,
+             const time_point<Clock, Duration2>& rhs)
+    {
+        return !(lhs == rhs);
+    }
+
+    // time_point <
+
+    template <class Clock, class Duration1, class Duration2>
+    inline BOOST_CONSTEXPR
+    bool
+    operator<(const time_point<Clock, Duration1>& lhs,
+            const time_point<Clock, Duration2>& rhs)
+    {
+        return lhs.time_since_epoch() < rhs.time_since_epoch();
+    }
+
+    // time_point >
+
+    template <class Clock, class Duration1, class Duration2>
+    inline BOOST_CONSTEXPR
+    bool
+    operator>(const time_point<Clock, Duration1>& lhs,
+            const time_point<Clock, Duration2>& rhs)
+    {
+        return rhs < lhs;
+    }
+
+    // time_point <=
+
+    template <class Clock, class Duration1, class Duration2>
+    inline BOOST_CONSTEXPR
+    bool
+    operator<=(const time_point<Clock, Duration1>& lhs,
+             const time_point<Clock, Duration2>& rhs)
+    {
+        return !(rhs < lhs);
+    }
+
+    // time_point >=
+
+    template <class Clock, class Duration1, class Duration2>
+    inline BOOST_CONSTEXPR
+    bool
+    operator>=(const time_point<Clock, Duration1>& lhs,
+             const time_point<Clock, Duration2>& rhs)
+    {
+        return !(lhs < rhs);
+    }
+
+//----------------------------------------------------------------------------//
+//      20.9.4.7 time_point_cast [time.point.cast]                            //
+//----------------------------------------------------------------------------//
+
+    template <class ToDuration, class Clock, class Duration>
+    inline BOOST_CONSTEXPR
+    time_point<Clock, ToDuration>
+    time_point_cast(const time_point<Clock, Duration>& t)
+    {
+        return time_point<Clock, ToDuration>(
+                duration_cast<ToDuration>(t.time_since_epoch()));
+    }
+
+} // namespace chrono
+} // namespace boost
+
+#ifndef BOOST_CHRONO_HEADER_ONLY
+// the suffix header occurs after all of our code:
+#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
+#endif
+
+#endif // BOOST_CHRONO_TIME_POINT_HPP
diff --git a/ext/boost/concept/._assert.hpp b/ext/boost/concept/._assert.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/concept/._assert.hpp and /dev/null differ
diff --git a/ext/boost/concept/._usage.hpp b/ext/boost/concept/._usage.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/concept/._usage.hpp and /dev/null differ
diff --git a/ext/boost/concept/detail/._concept_def.hpp b/ext/boost/concept/detail/._concept_def.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/concept/detail/._concept_def.hpp and /dev/null differ
diff --git a/ext/boost/concept/detail/._concept_undef.hpp b/ext/boost/concept/detail/._concept_undef.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/concept/detail/._concept_undef.hpp and /dev/null differ
diff --git a/ext/boost/concept/detail/._general.hpp b/ext/boost/concept/detail/._general.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/concept/detail/._general.hpp and /dev/null differ
diff --git a/ext/boost/concept/detail/._has_constraints.hpp b/ext/boost/concept/detail/._has_constraints.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/concept/detail/._has_constraints.hpp and /dev/null differ
diff --git a/ext/boost/concept/detail/backward_compatibility.hpp b/ext/boost/concept/detail/backward_compatibility.hpp
index 88d5921..66d573e 100644
--- a/ext/boost/concept/detail/backward_compatibility.hpp
+++ b/ext/boost/concept/detail/backward_compatibility.hpp
@@ -8,7 +8,7 @@ namespace boost
 {
   namespace concepts {}
 
-# if !defined(BOOST_NO_CONCEPTS) && !defined(BOOST_CONCEPT_NO_BACKWARD_KEYWORD)
+# if defined(BOOST_HAS_CONCEPTS) && !defined(BOOST_CONCEPT_NO_BACKWARD_KEYWORD)
   namespace concept = concepts;
 # endif 
 } // namespace boost::concept
diff --git a/ext/boost/concept_check.hpp b/ext/boost/concept_check.hpp
index 7ee3036..bf5a2af 100644
--- a/ext/boost/concept_check.hpp
+++ b/ext/boost/concept_check.hpp
@@ -1,5 +1,7 @@
 //
 // (C) Copyright Jeremy Siek 2000.
+// Copyright 2002 The Trustees of Indiana University.
+//
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
@@ -36,14 +38,14 @@ namespace boost
   //
   // Backward compatibility
   //
-  
+
   template <class Model>
   inline void function_requires(Model* = 0)
   {
       BOOST_CONCEPT_ASSERT((Model));
-  }    
+  }
   template <class T> inline void ignore_unused_variable_warning(T const&) {}
-  
+
 #  define BOOST_CLASS_REQUIRE(type_var, ns, concept)    \
     BOOST_CONCEPT_ASSERT((ns::concept<type_var>))
 
@@ -56,20 +58,21 @@ namespace boost
 #  define BOOST_CLASS_REQUIRE4(tv1, tv2, tv3, tv4, ns, concept) \
     BOOST_CONCEPT_ASSERT((ns::concept<tv1,tv2,tv3,tv4>))
 
-  
+
   //
   // Begin concept definitions
   //
   BOOST_concept(Integer, (T))
   {
       BOOST_CONCEPT_USAGE(Integer)
-        { 
+        {
             x.error_type_must_be_an_integer_type();
         }
    private:
       T x;
   };
 
+  template <> struct Integer<char> {};
   template <> struct Integer<signed char> {};
   template <> struct Integer<unsigned char> {};
   template <> struct Integer<short> {};
@@ -87,7 +90,7 @@ namespace boost
 # endif
 
   BOOST_concept(SignedInteger,(T)) {
-    BOOST_CONCEPT_USAGE(SignedInteger) { 
+    BOOST_CONCEPT_USAGE(SignedInteger) {
       x.error_type_must_be_a_signed_integer_type();
     }
    private:
@@ -101,16 +104,16 @@ namespace boost
   template <> struct SignedInteger< ::boost::long_long_type> {};
 # elif defined(BOOST_HAS_MS_INT64)
   template <> struct SignedInteger<__int64> {};
-# endif      
+# endif
 
   BOOST_concept(UnsignedInteger,(T)) {
-    BOOST_CONCEPT_USAGE(UnsignedInteger) { 
+    BOOST_CONCEPT_USAGE(UnsignedInteger) {
       x.error_type_must_be_an_unsigned_integer_type();
     }
    private:
     T x;
   };
-  
+
   template <> struct UnsignedInteger<unsigned char> {};
   template <> struct UnsignedInteger<unsigned short> {};
   template <> struct UnsignedInteger<unsigned int> {};
@@ -136,23 +139,24 @@ namespace boost
   {
     BOOST_CONCEPT_USAGE(Assignable) {
 #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
-      a = a;             // require assignment operator
+      a = b;             // require assignment operator
 #endif
-      const_constraints(a);
+      const_constraints(b);
     }
    private:
-    void const_constraints(const TT& b) {
+    void const_constraints(const TT& x) {
 #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
-      a = b;              // const required for argument to assignment
+      a = x;              // const required for argument to assignment
 #else
-      ignore_unused_variable_warning(b);
+      ignore_unused_variable_warning(x);
 #endif
     }
    private:
     TT a;
+    TT b;
   };
 
-  
+
   BOOST_concept(CopyConstructible,(TT))
   {
     BOOST_CONCEPT_USAGE(CopyConstructible) {
@@ -180,22 +184,23 @@ namespace boost
   BOOST_concept(SGIAssignable,(TT))
   {
     BOOST_CONCEPT_USAGE(SGIAssignable) {
-      TT b(a);
+      TT c(a);
 #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
-      a = a;              // require assignment operator
+      a = b;              // require assignment operator
 #endif
-      const_constraints(a);
-      ignore_unused_variable_warning(b);
+      const_constraints(b);
+      ignore_unused_variable_warning(c);
     }
    private:
-    void const_constraints(const TT& b) {
-      TT c(b);
+    void const_constraints(const TT& x) {
+      TT c(x);
 #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
-      a = b;              // const required for argument to assignment
+      a = x;              // const required for argument to assignment
 #endif
       ignore_unused_variable_warning(c);
     }
     TT a;
+    TT b;
   };
 #if (defined _MSC_VER)
 # pragma warning( pop )
@@ -297,7 +302,7 @@ namespace boost
   BOOST_concept(Generator,(Func)(Return))
   {
       BOOST_CONCEPT_USAGE(Generator) { test(is_void<Return>()); }
-      
+
    private:
       void test(boost::mpl::false_)
       {
@@ -310,22 +315,22 @@ namespace boost
       {
           f();
       }
-      
+
       Func f;
   };
 
   BOOST_concept(UnaryFunction,(Func)(Return)(Arg))
   {
       BOOST_CONCEPT_USAGE(UnaryFunction) { test(is_void<Return>()); }
-      
+
    private:
       void test(boost::mpl::false_)
       {
           f(arg);               // "priming the pump" this way keeps msvc6 happy (ICE)
           Return r = f(arg);
-          ignore_unused_variable_warning(r); 
+          ignore_unused_variable_warning(r);
       }
-      
+
       void test(boost::mpl::true_)
       {
           f(arg);
@@ -354,12 +359,21 @@ namespace boost
           Return r = f(first, second); // require operator()
           (void)r;
       }
-      
+
       void test(boost::mpl::true_)
       {
           f(first,second);
       }
-      
+
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+                      && BOOST_WORKAROUND(__GNUC__, > 3)))
+      // Declare a dummy constructor to make gcc happy.
+      // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
+      // (warning: non-static reference "const double& boost::BinaryFunction<YourClassHere>::arg"
+      // in class without a constructor [-Wuninitialized])
+      BinaryFunction();
+#endif
+
       Func f;
       First first;
       Second second;
@@ -371,6 +385,15 @@ namespace boost
       require_boolean_expr(f(arg)); // require operator() returning bool
     }
    private:
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+                      && BOOST_WORKAROUND(__GNUC__, > 3)))
+      // Declare a dummy constructor to make gcc happy.
+      // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
+      // (warning: non-static reference "const double& boost::UnaryPredicate<YourClassHere>::arg"
+      // in class without a constructor [-Wuninitialized])
+      UnaryPredicate();
+#endif
+
     Func f;
     Arg arg;
   };
@@ -381,6 +404,14 @@ namespace boost
       require_boolean_expr(f(a, b)); // require operator() returning bool
     }
    private:
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+                      && BOOST_WORKAROUND(__GNUC__, > 3)))
+      // Declare a dummy constructor to make gcc happy.
+      // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
+      // (warning: non-static reference "const double& boost::BinaryPredicate<YourClassHere>::arg"
+      // in class without a constructor [-Wuninitialized])
+      BinaryPredicate();
+#endif
     Func f;
     First a;
     Second b;
@@ -390,7 +421,7 @@ namespace boost
   BOOST_concept(Const_BinaryPredicate,(Func)(First)(Second))
     : BinaryPredicate<Func, First, Second>
   {
-    BOOST_CONCEPT_USAGE(Const_BinaryPredicate) { 
+    BOOST_CONCEPT_USAGE(Const_BinaryPredicate) {
       const_constraints(f);
     }
    private:
@@ -398,6 +429,15 @@ namespace boost
       // operator() must be a const member function
       require_boolean_expr(fun(a, b));
     }
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+                      && BOOST_WORKAROUND(__GNUC__, > 3)))
+      // Declare a dummy constructor to make gcc happy.
+      // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
+      // (warning: non-static reference "const double& boost::Const_BinaryPredicate<YourClassHere>::arg"
+      // in class without a constructor [-Wuninitialized])
+      Const_BinaryPredicate();
+#endif
+
     Func f;
     First a;
     Second b;
@@ -407,7 +447,7 @@ namespace boost
     : Generator<Func, typename Func::result_type>
   {
       typedef typename Func::result_type result_type;
-      
+
       BOOST_CONCEPT_USAGE(AdaptableGenerator)
       {
           BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>));
@@ -438,7 +478,7 @@ namespace boost
       typedef typename Func::first_argument_type first_argument_type;
       typedef typename Func::second_argument_type second_argument_type;
       typedef typename Func::result_type result_type;
-      
+
       ~AdaptableBinaryFunction()
       {
           BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>));
@@ -476,7 +516,7 @@ namespace boost
       {
         BOOST_CONCEPT_ASSERT((SignedInteger<difference_type>));
         BOOST_CONCEPT_ASSERT((Convertible<iterator_category, std::input_iterator_tag>));
-        
+
         TT j(i);
         (void)*i;           // require dereference operator
         ++j;                // require preincrement operator
@@ -490,7 +530,7 @@ namespace boost
     : Assignable<TT>
   {
     BOOST_CONCEPT_USAGE(OutputIterator) {
-      
+
       ++i;                // require preincrement operator
       i++;                // require postincrement operator
       *i++ = t;           // require postincrement and assignment
@@ -509,11 +549,11 @@ namespace boost
               BOOST_DEDUCED_TYPENAME ForwardIterator::iterator_category
             , std::forward_iterator_tag
           >));
-          
+
           typename InputIterator<TT>::reference r = *i;
           ignore_unused_variable_warning(r);
       }
-      
+
    private:
       TT i;
   };
@@ -575,7 +615,7 @@ namespace boost
           n = i - j;                  // require difference operator
           (void)i[n];                 // require element access operator
       }
-      
+
    private:
     TT a, b;
     TT i, j;
@@ -613,7 +653,7 @@ namespace boost
           BOOST_CONCEPT_ASSERT((InputIterator<const_iterator>));
           const_constraints(c);
       }
-      
+
    private:
       void const_constraints(const C& cc) {
           i = cc.begin();
@@ -634,19 +674,19 @@ namespace boost
       typedef typename C::reference reference;
       typedef typename C::iterator iterator;
       typedef typename C::pointer pointer;
-    
+
       BOOST_CONCEPT_USAGE(Mutable_Container)
       {
           BOOST_CONCEPT_ASSERT((
                Assignable<typename Mutable_Container::value_type>));
-          
+
           BOOST_CONCEPT_ASSERT((InputIterator<iterator>));
-          
+
           i = c.begin();
           i = c.end();
           c.swap(c2);
       }
-      
+
    private:
       iterator i;
       C c, c2;
@@ -662,7 +702,7 @@ namespace boost
                     typename ForwardContainer::const_iterator
                >));
       }
-  };  
+  };
 
   BOOST_concept(Mutable_ForwardContainer,(C))
     : ForwardContainer<C>
@@ -675,7 +715,7 @@ namespace boost
                    typename Mutable_ForwardContainer::iterator
                >));
       }
-  };  
+  };
 
   BOOST_concept(ReversibleContainer,(C))
     : ForwardContainer<C>
@@ -689,9 +729,9 @@ namespace boost
           BOOST_CONCEPT_ASSERT((
               BidirectionalIterator<
                   typename ReversibleContainer::const_iterator>));
-          
+
           BOOST_CONCEPT_ASSERT((BidirectionalIterator<const_reverse_iterator>));
-          
+
           const_constraints(c);
       }
    private:
@@ -708,17 +748,17 @@ namespace boost
     , ReversibleContainer<C>
   {
       typedef typename C::reverse_iterator reverse_iterator;
-      
+
       BOOST_CONCEPT_USAGE(Mutable_ReversibleContainer)
       {
           typedef typename Mutable_ForwardContainer<C>::iterator iterator;
           BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator<iterator>));
           BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator<reverse_iterator>));
-          
+
           reverse_iterator i = c.rbegin();
           i = c.rend();
       }
-   private:  
+   private:
       C c;
   };
 
@@ -734,7 +774,7 @@ namespace boost
               RandomAccessIterator<
                   typename RandomAccessContainer::const_iterator
               >));
-          
+
           const_constraints(c);
       }
    private:
@@ -743,7 +783,7 @@ namespace boost
           const_reference r = cc[n];
           ignore_unused_variable_warning(r);
       }
-    
+
       C c;
       size_type n;
   };
@@ -759,11 +799,11 @@ namespace boost
       {
           BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator<typename self::iterator>));
           BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator<typename self::reverse_iterator>));
-          
+
           typename self::reference r = c[i];
           ignore_unused_variable_warning(r);
       }
-      
+
    private:
       typename Mutable_ReversibleContainer<C>::size_type i;
       C c;
@@ -779,7 +819,7 @@ namespace boost
   {
       BOOST_CONCEPT_USAGE(Sequence)
       {
-          S 
+          S
               c(n),
               c2(n, t),
               c3(first, last);
@@ -804,7 +844,7 @@ namespace boost
           typename Sequence::const_reference r = c.front();
           ignore_unused_variable_warning(r);
       }
-    
+
       typename S::value_type t;
       typename S::size_type n;
       typename S::value_type* first, *last;
@@ -863,11 +903,11 @@ namespace boost
           c.erase(r.first, r.second);
           const_constraints(c);
           BOOST_CONCEPT_ASSERT((BinaryPredicate<key_compare,key_type,key_type>));
-          
+
           typedef typename AssociativeContainer::value_type value_type_;
           BOOST_CONCEPT_ASSERT((BinaryPredicate<value_compare,value_type_,value_type_>));
       }
-      
+
       // Redundant with the base concept, but it helps below.
       typedef typename C::const_iterator const_iterator;
    private:
@@ -893,7 +933,7 @@ namespace boost
       BOOST_CONCEPT_USAGE(UniqueAssociativeContainer)
       {
           C c(first, last);
-      
+
           pos_flag = c.insert(t);
           c.insert(first, last);
 
@@ -911,7 +951,7 @@ namespace boost
       BOOST_CONCEPT_USAGE(MultipleAssociativeContainer)
       {
           C c(first, last);
-      
+
           pos = c.insert(t);
           c.insert(first, last);
 
@@ -954,7 +994,7 @@ namespace boost
   {
       BOOST_CONCEPT_USAGE(SortedAssociativeContainer)
       {
-          C 
+          C
               c(kc),
               c2(first, last),
               c3(first, last, kc);
@@ -962,15 +1002,15 @@ namespace boost
           p = c.upper_bound(k);
           p = c.lower_bound(k);
           r = c.equal_range(k);
-      
+
           c.insert(p, t);
-      
+
           ignore_unused_variable_warning(c);
           ignore_unused_variable_warning(c2);
           ignore_unused_variable_warning(c3);
           const_constraints(c);
       }
-      
+
       void const_constraints(const C& c)
       {
           kc = c.key_comp();
@@ -980,7 +1020,7 @@ namespace boost
           cp = c.lower_bound(k);
           cr = c.equal_range(k);
       }
-      
+
    private:
       typename C::key_compare kc;
       typename C::value_compare vc;
@@ -999,6 +1039,42 @@ namespace boost
 
   // HashedAssociativeContainer
 
+  BOOST_concept(Collection,(C))
+  {
+      BOOST_CONCEPT_USAGE(Collection)
+      {
+        boost::function_requires<boost::InputIteratorConcept<iterator> >();
+        boost::function_requires<boost::InputIteratorConcept<const_iterator> >();
+        boost::function_requires<boost::CopyConstructibleConcept<value_type> >();
+        const_constraints(c);
+        i = c.begin();
+        i = c.end();
+        c.swap(c);
+      }
+
+      void const_constraints(const C& cc) {
+        ci = cc.begin();
+        ci = cc.end();
+        n = cc.size();
+        b = cc.empty();
+      }
+
+    private:
+      typedef typename C::value_type value_type;
+      typedef typename C::iterator iterator;
+      typedef typename C::const_iterator const_iterator;
+      typedef typename C::reference reference;
+      typedef typename C::const_reference const_reference;
+      // typedef typename C::pointer pointer;
+      typedef typename C::difference_type difference_type;
+      typedef typename C::size_type size_type;
+
+      C c;
+      bool b;
+      iterator i;
+      const_iterator ci;
+      size_type n;
+  };
 } // namespace boost
 
 # include <boost/concept/detail/concept_undef.hpp>
diff --git a/ext/boost/config.hpp b/ext/boost/config.hpp
index 055a278..f37585e 100644
--- a/ext/boost/config.hpp
+++ b/ext/boost/config.hpp
@@ -36,7 +36,7 @@
 #endif
 
 // if we don't have a std library config set, try and find one:
-#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG)
+#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG) && defined(__cplusplus)
 #  include <boost/config/select_stdlib_config.hpp>
 #endif
 // if we have a std library config, include it now:
diff --git a/ext/boost/config/._abi_prefix.hpp b/ext/boost/config/._abi_prefix.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/._abi_prefix.hpp and /dev/null differ
diff --git a/ext/boost/config/._abi_suffix.hpp b/ext/boost/config/._abi_suffix.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/._abi_suffix.hpp and /dev/null differ
diff --git a/ext/boost/config/._posix_features.hpp b/ext/boost/config/._posix_features.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/._posix_features.hpp and /dev/null differ
diff --git a/ext/boost/config/._requires_threads.hpp b/ext/boost/config/._requires_threads.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/._requires_threads.hpp and /dev/null differ
diff --git a/ext/boost/config/._user.hpp b/ext/boost/config/._user.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/._user.hpp and /dev/null differ
diff --git a/ext/boost/config/abi/._borland_prefix.hpp b/ext/boost/config/abi/._borland_prefix.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/abi/._borland_prefix.hpp and /dev/null differ
diff --git a/ext/boost/config/abi/._borland_suffix.hpp b/ext/boost/config/abi/._borland_suffix.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/abi/._borland_suffix.hpp and /dev/null differ
diff --git a/ext/boost/config/abi/._msvc_prefix.hpp b/ext/boost/config/abi/._msvc_prefix.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/abi/._msvc_prefix.hpp and /dev/null differ
diff --git a/ext/boost/config/abi/._msvc_suffix.hpp b/ext/boost/config/abi/._msvc_suffix.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/abi/._msvc_suffix.hpp and /dev/null differ
diff --git a/ext/boost/config/auto_link.hpp b/ext/boost/config/auto_link.hpp
index 0d17eb8..ad021f4 100644
--- a/ext/boost/config/auto_link.hpp
+++ b/ext/boost/config/auto_link.hpp
@@ -145,11 +145,16 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
    // vc90:
 #  define BOOST_LIB_TOOLSET "vc90"
 
-#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1600)
+#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1600)
 
    // vc10:
 #  define BOOST_LIB_TOOLSET "vc100"
 
+#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1700)
+
+   // vc11:
+#  define BOOST_LIB_TOOLSET "vc110"
+
 #elif defined(__BORLANDC__)
 
    // CBuilder 6:
@@ -362,9 +367,9 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
       && defined(BOOST_LIB_VERSION)
 
 #ifdef BOOST_AUTO_LINK_TAGGED
-#  pragma commentcomment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
+#  pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
 #  ifdef BOOST_LIB_DIAGNOSTIC
-#     pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
+#     pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
 #  endif
 #elif defined(BOOST_AUTO_LINK_NOMANGLE)
 #  pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
@@ -414,7 +419,4 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 #if defined(BOOST_DYN_LINK)
 #  undef BOOST_DYN_LINK
 #endif
-#if defined(BOOST_AUTO_LINK_NOMANGLE)
-#  undef BOOST_AUTO_LINK_NOMANGLE
-#endif
 
diff --git a/ext/boost/config/compiler/._comeau.hpp b/ext/boost/config/compiler/._comeau.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/compiler/._comeau.hpp and /dev/null differ
diff --git a/ext/boost/config/compiler/._compaq_cxx.hpp b/ext/boost/config/compiler/._compaq_cxx.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/compiler/._compaq_cxx.hpp and /dev/null differ
diff --git a/ext/boost/config/compiler/._greenhills.hpp b/ext/boost/config/compiler/._greenhills.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/compiler/._greenhills.hpp and /dev/null differ
diff --git a/ext/boost/config/compiler/._kai.hpp b/ext/boost/config/compiler/._kai.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/compiler/._kai.hpp and /dev/null differ
diff --git a/ext/boost/config/compiler/._sgi_mipspro.hpp b/ext/boost/config/compiler/._sgi_mipspro.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/compiler/._sgi_mipspro.hpp and /dev/null differ
diff --git a/ext/boost/config/compiler/borland.hpp b/ext/boost/config/compiler/borland.hpp
index bd3a8c3..cffa8ea 100644
--- a/ext/boost/config/compiler/borland.hpp
+++ b/ext/boost/config/compiler/borland.hpp
@@ -46,6 +46,8 @@
 // Borland C++Builder 5, command-line compiler 5.5:
 #       define BOOST_NO_OPERATORS_IN_NAMESPACE
 #     endif
+// Variadic macros do not exist for C++ Builder versions 5 and below
+#define BOOST_NO_CXX11_VARIADIC_MACROS
 #   endif
 
 // Version 5.51 and below:
@@ -54,8 +56,13 @@
 #  define BOOST_NO_CV_VOID_SPECIALIZATIONS
 #  define BOOST_NO_DEDUCED_TYPENAME
 // workaround for missing WCHAR_MAX/WCHAR_MIN:
+#ifdef __cplusplus
 #include <climits>
 #include <cwchar>
+#else
+#include <limits.h>
+#include <wchar.h>
+#endif // __cplusplus
 #ifndef WCHAR_MAX
 #  define WCHAR_MAX 0xffff
 #endif
@@ -67,7 +74,7 @@
 // Borland C++ Builder 6 and below:
 #if (__BORLANDC__ <= 0x564)
 
-#  ifdef NDEBUG
+#  if defined(NDEBUG) && defined(__cplusplus)
       // fix broken <cstring> so that Boost.test works:
 #     include <cstring>
 #     undef strcmp
@@ -143,14 +150,14 @@
 // C++0x Macros:
 //
 #if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610)
-#  define BOOST_NO_CHAR16_T
-#  define BOOST_NO_CHAR32_T
-#  define BOOST_NO_DECLTYPE
-#  define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#  define BOOST_NO_EXTERN_TEMPLATE
-#  define BOOST_NO_RVALUE_REFERENCES 
-#  define BOOST_NO_SCOPED_ENUMS
-#  define BOOST_NO_STATIC_ASSERT
+#  define BOOST_NO_CXX11_CHAR16_T
+#  define BOOST_NO_CXX11_CHAR32_T
+#  define BOOST_NO_CXX11_DECLTYPE
+#  define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#  define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#  define BOOST_NO_CXX11_RVALUE_REFERENCES 
+#  define BOOST_NO_CXX11_SCOPED_ENUMS
+#  define BOOST_NO_CXX11_STATIC_ASSERT
 #else
 #  define BOOST_HAS_ALIGNOF
 #  define BOOST_HAS_CHAR16_T
@@ -162,23 +169,27 @@
 #  define BOOST_HAS_STATIC_ASSERT
 #endif
 
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CONCEPTS
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
 #define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS    // UTF-8 still not supported
-#define BOOST_NO_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS    // UTF-8 still not supported
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
 
 #if __BORLANDC__ >= 0x590
 #  define BOOST_HAS_TR1_HASH
@@ -273,3 +284,4 @@
 
 
 
+
diff --git a/ext/boost/config/compiler/clang.hpp b/ext/boost/config/compiler/clang.hpp
index 85f4484..aab3c61 100644
--- a/ext/boost/config/compiler/clang.hpp
+++ b/ext/boost/config/compiler/clang.hpp
@@ -8,50 +8,123 @@
 
 // Clang compiler setup.
 
-#if __has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
-#else
+#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
 #  define BOOST_NO_EXCEPTIONS
 #endif
 
-#if __has_feature(cxx_rtti)
-#else
+#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI)
 #  define BOOST_NO_RTTI
 #endif
 
+#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID)
+#  define BOOST_NO_TYPEID
+#endif
+
 #if defined(__int64)
 #  define BOOST_HAS_MS_INT64
 #endif
 
 #define BOOST_HAS_NRVO
 
-// NOTE: Clang's C++0x support is not worth detecting. However, it
-// supports both extern templates and "long long" even in C++98/03
-// mode.
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CONCEPTS
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
-#define BOOST_NO_STATIC_ASSERT
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
-#define BOOST_NO_VARIADIC_TEMPLATES
-
-// HACK: Clang does support extern templates, but Boost's test for
-// them is wrong.
-#define BOOST_NO_EXTERN_TEMPLATE
+// Clang supports "long long" in all compilation modes.
+#define BOOST_HAS_LONG_LONG
+
+#if !__has_feature(cxx_auto_type)
+#  define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#  define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#endif
+
+#if !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
+#  define BOOST_NO_CXX11_CHAR16_T
+#  define BOOST_NO_CXX11_CHAR32_T
+#endif
+
+#if !__has_feature(cxx_constexpr)
+#  define BOOST_NO_CXX11_CONSTEXPR
+#endif
+
+#if !__has_feature(cxx_decltype)
+#  define BOOST_NO_CXX11_DECLTYPE
+#endif
+
+#if !__has_feature(cxx_decltype_incomplete_return_types)
+#  define BOOST_NO_CXX11_DECLTYPE_N3276
+#endif
+
+#if !__has_feature(cxx_defaulted_functions)
+#  define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#endif
+
+#if !__has_feature(cxx_deleted_functions)
+#  define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#endif
+
+#if !__has_feature(cxx_explicit_conversions)
+#  define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#endif
+
+#if !__has_feature(cxx_default_function_template_args)
+#  define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#endif
+
+#if !__has_feature(cxx_generalized_initializers)
+#  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#endif
+
+#if !__has_feature(cxx_lambdas)
+#  define BOOST_NO_CXX11_LAMBDAS
+#endif
+
+#if !__has_feature(cxx_local_type_template_args)
+#  define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#endif
+
+#if !__has_feature(cxx_noexcept)
+#  define BOOST_NO_CXX11_NOEXCEPT
+#endif
+
+#if !__has_feature(cxx_nullptr)
+#  define BOOST_NO_CXX11_NULLPTR
+#endif
+
+#if !__has_feature(cxx_range_for)
+#  define BOOST_NO_CXX11_RANGE_BASED_FOR
+#endif
+
+#if !__has_feature(cxx_raw_string_literals)
+#  define BOOST_NO_CXX11_RAW_LITERALS
+#endif
+
+#if !__has_feature(cxx_generalized_initializers)
+#  define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#endif
+
+#if !__has_feature(cxx_rvalue_references)
+#  define BOOST_NO_CXX11_RVALUE_REFERENCES
+#endif
+
+#if !__has_feature(cxx_strong_enums)
+#  define BOOST_NO_CXX11_SCOPED_ENUMS
+#endif
+
+#if !__has_feature(cxx_static_assert)
+#  define BOOST_NO_CXX11_STATIC_ASSERT
+#endif
+
+#if !__has_feature(cxx_alias_templates)
+#  define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#endif
+
+#if !__has_feature(cxx_unicode_literals)
+#  define BOOST_NO_CXX11_UNICODE_LITERALS
+#endif
+
+#if !__has_feature(cxx_variadic_templates)
+#  define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#endif
+
+// Clang always supports variadic macros
+// Clang always supports extern templates
 
 #ifndef BOOST_COMPILER
 #  define BOOST_COMPILER "Clang version " __clang_version__
diff --git a/ext/boost/config/compiler/codegear.hpp b/ext/boost/config/compiler/codegear.hpp
index f6dc4c0..1a6df33 100644
--- a/ext/boost/config/compiler/codegear.hpp
+++ b/ext/boost/config/compiler/codegear.hpp
@@ -60,7 +60,7 @@
 // (Niels Dekker, LKEB, April 2010)
 #  define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
 
-#  ifdef NDEBUG
+#  if defined(NDEBUG) && defined(__cplusplus)
       // fix broken <cstring> so that Boost.test works:
 #     include <cstring>
 #     undef strcmp
@@ -76,7 +76,7 @@
 // C++0x macros:
 //
 #if (__CODEGEARC__ <= 0x620)
-#define BOOST_NO_STATIC_ASSERT
+#define BOOST_NO_CXX11_STATIC_ASSERT
 #else
 #define BOOST_HAS_STATIC_ASSERT
 #endif
@@ -91,23 +91,25 @@
 // #define BOOST_HAS_STATIC_ASSERT
 #define BOOST_HAS_STD_TYPE_TRAITS
 
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CONCEPTS
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_EXTERN_TEMPLATE
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
 #define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
-#define BOOST_NO_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
 
 //
 // TR1 macros:
@@ -119,7 +121,7 @@
 
 #define BOOST_HAS_MACRO_USE_FACET
 
-#define BOOST_NO_INITIALIZER_LISTS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
 
 // On non-Win32 platforms let the platform config figure this out:
 #ifdef _WIN32
diff --git a/ext/boost/config/compiler/common_edg.hpp b/ext/boost/config/compiler/common_edg.hpp
index cb28337..441a055 100644
--- a/ext/boost/config/compiler/common_edg.hpp
+++ b/ext/boost/config/compiler/common_edg.hpp
@@ -60,40 +60,44 @@
 //   See above for BOOST_NO_LONG_LONG
 //
 #if (__EDG_VERSION__ < 310)
-#  define BOOST_NO_EXTERN_TEMPLATE
+#  define BOOST_NO_CXX11_EXTERN_TEMPLATE
 #endif
-#if (__EDG_VERSION__ <= 310) || !defined(BOOST_STRICT_CONFIG)
+#if (__EDG_VERSION__ <= 310)
 // No support for initializer lists
-#  define BOOST_NO_INITIALIZER_LISTS
+#  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#endif
+#if (__EDG_VERSION__ < 400)
+#  define BOOST_NO_CXX11_VARIADIC_MACROS
 #endif
 
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CONCEPTS
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
 #define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_STATIC_ASSERT
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
-#define BOOST_NO_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
 
 #ifdef c_plusplus
 // EDG has "long long" in non-strict mode
 // However, some libraries have insufficient "long long" support
 // #define BOOST_HAS_LONG_LONG
 #endif
-
-
-
diff --git a/ext/boost/config/compiler/cray.hpp b/ext/boost/config/compiler/cray.hpp
new file mode 100644
index 0000000..5463ea0
--- /dev/null
+++ b/ext/boost/config/compiler/cray.hpp
@@ -0,0 +1,63 @@
+//  (C) Copyright John Maddock 2011.
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org for most recent version.
+
+//  Greenhills C compiler setup:
+
+#define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE)
+
+#if _RELEASE < 7
+#  error "Boost is not configured for Cray compilers prior to version 7, please try the configure script."
+#endif
+
+//
+// Check this is a recent EDG based compiler, otherwise we don't support it here:
+//
+#ifndef __EDG_VERSION__
+#  error "Unsupported Cray compiler, please try running the configure script."
+#endif
+
+#include "boost/config/compiler/common_edg.hpp"
+
+//
+// Cray peculiarities, probably version 7 specific:
+//
+#undef BOOST_NO_CXX11_AUTO_DECLARATIONS
+#undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_HAS_NRVO
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+#define BOOST_HAS_NRVO
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_SFINAE_EXPR
+#define BOOST_NO_CXX11_SCOPED_ENUMS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CHAR16_T
+//#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
+#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
+//#define BOOST_HAS_FPCLASSIFY
+
+#define BOOST_SP_USE_PTHREADS 
+#define BOOST_AC_USE_PTHREADS 
+
diff --git a/ext/boost/config/compiler/digitalmars.hpp b/ext/boost/config/compiler/digitalmars.hpp
index bd37d2f..15cc209 100644
--- a/ext/boost/config/compiler/digitalmars.hpp
+++ b/ext/boost/config/compiler/digitalmars.hpp
@@ -44,7 +44,9 @@
 //
 // Is this really the best way to detect whether the std lib is in namespace std?
 //
+#ifdef __cplusplus
 #include <cstddef>
+#endif
 #if !defined(__STL_IMPORT_VENDOR_CSTD) && !defined(_STLP_IMPORT_VENDOR_CSTD)
 #  define BOOST_NO_STDC_NAMESPACE
 #endif
@@ -58,28 +60,36 @@
 //
 // C++0x features
 //
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CONCEPTS
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_EXTERN_TEMPLATE
-#define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
 #define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_STATIC_ASSERT
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
-#define BOOST_NO_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+
+#if (__DMC__ < 0x812)
+#define BOOST_NO_CXX11_VARIADIC_MACROS
+#endif
 
 #if __DMC__ < 0x800
 #error "Compiler not supported or configured - please reconfigure"
diff --git a/ext/boost/config/compiler/gcc.hpp b/ext/boost/config/compiler/gcc.hpp
index 54f1bb9..de8875c 100644
--- a/ext/boost/config/compiler/gcc.hpp
+++ b/ext/boost/config/compiler/gcc.hpp
@@ -42,7 +42,9 @@
 #   define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
 #   define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
 #   define BOOST_NO_IS_ABSTRACT
-#   define BOOST_NO_EXTERN_TEMPLATE
+#   define BOOST_NO_CXX11_EXTERN_TEMPLATE
+// Variadic macros do not exist for gcc versions before 3.0
+#   define BOOST_NO_CXX11_VARIADIC_MACROS
 #elif __GNUC__ == 3
 #  if defined (__PATHSCALE__)
 #     define BOOST_NO_TWO_PHASE_NAME_LOOKUP
@@ -59,7 +61,7 @@
 #  if __GNUC_MINOR__ < 4
 #     define BOOST_NO_IS_ABSTRACT
 #  endif
-#  define BOOST_NO_EXTERN_TEMPLATE
+#  define BOOST_NO_CXX11_EXTERN_TEMPLATE
 #endif
 #if __GNUC__ < 4
 //
@@ -113,7 +115,7 @@
 // Dynamic shared object (DSO) and dynamic-link library (DLL) support
 //
 #if __GNUC__ >= 4
-#  if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+#  if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__)
      // All Win32 development environments, including 64-bit Windows and MinGW, define 
      // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment,
      // so does not define _WIN32 or its variants.
@@ -144,11 +146,6 @@
 #  endif
 #endif
 
-// C++0x features not implemented in any GCC version
-//
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_TEMPLATE_ALIASES
 
 // C++0x features in 4.3.n and later
 //
@@ -161,52 +158,73 @@
 #  define BOOST_HAS_STATIC_ASSERT
 #  define BOOST_HAS_VARIADIC_TMPL
 #else
-#  define BOOST_NO_DECLTYPE
-#  define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#  define BOOST_NO_RVALUE_REFERENCES
-#  define BOOST_NO_STATIC_ASSERT
+#  define BOOST_NO_CXX11_DECLTYPE
+#  define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#  define BOOST_NO_CXX11_RVALUE_REFERENCES
+#  define BOOST_NO_CXX11_STATIC_ASSERT
 
 // Variadic templates compiler: 
 //   http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html
-#  ifdef __VARIADIC_TEMPLATES
+#  if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__))
 #    define BOOST_HAS_VARIADIC_TMPL
 #  else
-#    define BOOST_NO_VARIADIC_TEMPLATES
+#    define BOOST_NO_CXX11_VARIADIC_TEMPLATES
 #  endif
 #endif
 
 // C++0x features in 4.4.n and later
 //
 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
-#  define BOOST_NO_AUTO_DECLARATIONS
-#  define BOOST_NO_AUTO_MULTIDECLARATIONS
-#  define BOOST_NO_CHAR16_T
-#  define BOOST_NO_CHAR32_T
-#  define BOOST_NO_DEFAULTED_FUNCTIONS
-#  define BOOST_NO_DELETED_FUNCTIONS
-#  define BOOST_NO_INITIALIZER_LISTS
-#  define BOOST_NO_SCOPED_ENUMS  
+#  define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#  define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#  define BOOST_NO_CXX11_CHAR16_T
+#  define BOOST_NO_CXX11_CHAR32_T
+#  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#  define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#  define BOOST_NO_CXX11_DELETED_FUNCTIONS
 #endif
 
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
 #  define BOOST_NO_SFINAE_EXPR
 #endif
 
-// C++0x features in 4.4.1 and later
+// C++0x features in 4.5.0 and later
+//
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+#  define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#  define BOOST_NO_CXX11_LAMBDAS
+#  define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#  define BOOST_NO_CXX11_RAW_LITERALS
+#  define BOOST_NO_CXX11_UNICODE_LITERALS
+#endif
+
+// C++0x features in 4.5.1 and later
 //
-#if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40401) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
-// scoped enums have a serious bug in 4.4.0, so define BOOST_NO_SCOPED_ENUMS before 4.4.1
+#if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40501) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+// scoped enums have a serious bug in 4.4.0, so define BOOST_NO_CXX11_SCOPED_ENUMS before 4.5.1
 // See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
-#  define BOOST_NO_SCOPED_ENUMS
+#  define BOOST_NO_CXX11_SCOPED_ENUMS
 #endif
 
-// C++0x features in 4.5.n and later
+// C++0x features in 4.6.n and later
 //
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
-#  define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#  define BOOST_NO_LAMBDAS
-#  define BOOST_NO_RAW_LITERALS
-#  define BOOST_NO_UNICODE_LITERALS
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#endif
+
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+#  define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#endif
+// C++0x features not supported at all yet
+//
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+
+#ifndef BOOST_COMPILER
+#  define BOOST_COMPILER "GNU C++ version " __VERSION__
 #endif
 
 // ConceptGCC compiler:
@@ -214,23 +232,16 @@
 #ifdef __GXX_CONCEPTS__
 #  define BOOST_HAS_CONCEPTS
 #  define BOOST_COMPILER "ConceptGCC version " __VERSION__
-#else
-#  define BOOST_NO_CONCEPTS
 #endif
 
-#ifndef BOOST_COMPILER
-#  define BOOST_COMPILER "GNU C++ version " __VERSION__
-#endif
-
-//
 // versions check:
 // we don't know gcc prior to version 2.90:
 #if (__GNUC__ == 2) && (__GNUC_MINOR__ < 90)
 #  error "Compiler not configured - please reconfigure"
 #endif
 //
-// last known and checked version is 4.4 (Pre-release):
-#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 4))
+// last known and checked version is 4.6 (Pre-release):
+#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6))
 #  if defined(BOOST_ASSERT_CONFIG)
 #     error "Unknown compiler version - please run the configure tests and report the results"
 #  else
diff --git a/ext/boost/config/compiler/gcc_xml.hpp b/ext/boost/config/compiler/gcc_xml.hpp
index 7f884b1..eaed4b5 100644
--- a/ext/boost/config/compiler/gcc_xml.hpp
+++ b/ext/boost/config/compiler/gcc_xml.hpp
@@ -27,28 +27,33 @@
 
 // C++0x features:
 //
-#  define BOOST_NO_CONSTEXPR
-#  define BOOST_NO_NULLPTR
-#  define BOOST_NO_TEMPLATE_ALIASES
-#  define BOOST_NO_DECLTYPE
-#  define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#  define BOOST_NO_RVALUE_REFERENCES
-#  define BOOST_NO_STATIC_ASSERT
-#  define BOOST_NO_VARIADIC_TEMPLATES
-#  define BOOST_NO_AUTO_DECLARATIONS
-#  define BOOST_NO_AUTO_MULTIDECLARATIONS
-#  define BOOST_NO_CHAR16_T
-#  define BOOST_NO_CHAR32_T
-#  define BOOST_NO_DEFAULTED_FUNCTIONS
-#  define BOOST_NO_DELETED_FUNCTIONS
-#  define BOOST_NO_INITIALIZER_LISTS
-#  define BOOST_NO_SCOPED_ENUMS  
+#  define BOOST_NO_CXX11_CONSTEXPR
+#  define BOOST_NO_CXX11_NULLPTR
+#  define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#  define BOOST_NO_CXX11_DECLTYPE
+#  define BOOST_NO_CXX11_DECLTYPE_N3276
+#  define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#  define BOOST_NO_CXX11_RVALUE_REFERENCES
+#  define BOOST_NO_CXX11_STATIC_ASSERT
+#  define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#  define BOOST_NO_CXX11_VARIADIC_MACROS
+#  define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#  define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#  define BOOST_NO_CXX11_CHAR16_T
+#  define BOOST_NO_CXX11_CHAR32_T
+#  define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#  define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#  define BOOST_NO_CXX11_SCOPED_ENUMS  
 #  define BOOST_NO_SFINAE_EXPR
-#  define BOOST_NO_SCOPED_ENUMS
-#  define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#  define BOOST_NO_LAMBDAS
-#  define BOOST_NO_RAW_LITERALS
-#  define BOOST_NO_UNICODE_LITERALS
+#  define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#  define BOOST_NO_CXX11_LAMBDAS
+#  define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#  define BOOST_NO_CXX11_RANGE_BASED_FOR
+#  define BOOST_NO_CXX11_RAW_LITERALS
+#  define BOOST_NO_CXX11_UNICODE_LITERALS
+#  define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
 
 #define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__
 
diff --git a/ext/boost/config/compiler/hp_acc.hpp b/ext/boost/config/compiler/hp_acc.hpp
index 98e7772..4f5f81b 100644
--- a/ext/boost/config/compiler/hp_acc.hpp
+++ b/ext/boost/config/compiler/hp_acc.hpp
@@ -92,29 +92,42 @@
 //
 #if !defined(__EDG__)
 
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CONCEPTS
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_EXTERN_TEMPLATE
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
 #define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_STATIC_ASSERT
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
-#define BOOST_NO_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+
+/* 
+  See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and
+      https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443436
+*/
+
+#if (__HP_aCC < 62500) || !defined(HP_CXX0x_SOURCE)
+  #define BOOST_NO_CXX11_VARIADIC_MACROS
+#endif
+
 #endif
 
 //
diff --git a/ext/boost/config/compiler/intel.hpp b/ext/boost/config/compiler/intel.hpp
index e7bc95b..8c746c1 100644
--- a/ext/boost/config/compiler/intel.hpp
+++ b/ext/boost/config/compiler/intel.hpp
@@ -26,7 +26,19 @@
 #  define BOOST_INTEL_CXX_VERSION __ECC
 #endif
 
+// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x'
+#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__)
+#  define BOOST_INTEL_STDCXX0X
+#endif
+#if defined(_MSC_VER) && (_MSC_VER >= 1600)
+#  define BOOST_INTEL_STDCXX0X
+#endif
+
+#ifdef BOOST_INTEL_STDCXX0X
+#define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
+#else
 #define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
+#endif
 #define BOOST_INTEL BOOST_INTEL_CXX_VERSION
 
 #if defined(_WIN32) || defined(_WIN64)
@@ -99,7 +111,7 @@
 #     define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
 #  endif
 #endif
-#if (defined(__GNUC__) && (__GNUC__ < 4)) || defined(_WIN32) || (BOOST_INTEL_CXX_VERSION <= 1110)
+#if (defined(__GNUC__) && (__GNUC__ < 4)) || defined(_WIN32) || (BOOST_INTEL_CXX_VERSION <= 1200)
 // GCC or VC emulation:
 #define BOOST_NO_TWO_PHASE_NAME_LOOKUP
 #endif
@@ -109,6 +121,7 @@
 // in type_traits code among other things, getting this correct
 // for the Intel compiler is actually remarkably fragile and tricky:
 //
+#ifdef __cplusplus
 #if defined(BOOST_NO_INTRINSIC_WCHAR_T)
 #include <cwchar>
 template< typename T > struct assert_no_intrinsic_wchar_t;
@@ -122,8 +135,9 @@ template<> struct assert_intrinsic_wchar_t<wchar_t> {};
 // if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line:
 template<> struct assert_intrinsic_wchar_t<unsigned short> {};
 #endif
+#endif
 
-#if _MSC_VER+0 >= 1000
+#if defined(_MSC_VER) && (_MSC_VER+0 >= 1000)
 #  if _MSC_VER >= 1200
 #     define BOOST_HAS_MS_INT64
 #  endif
@@ -165,8 +179,9 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
 // intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some 
 // cases when it should be value-initialized.
 // (Niels Dekker, LKEB, May 2010)
+// Apparently Intel 12.1 (compiler version number 9999 !!) has the same issue (compiler regression).
 #if defined(__INTEL_COMPILER)
-#  if __INTEL_COMPILER <= 1110
+#  if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999)
 #    define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
 #  endif
 #endif
@@ -179,10 +194,71 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
 #  define BOOST_SYMBOL_IMPORT
 #  define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default")))
 #endif
+//
+// C++0x features
+//     - ICC added static_assert in 11.0 (first version with C++0x support)
+//
+#if defined(BOOST_INTEL_STDCXX0X)
+#  undef  BOOST_NO_CXX11_STATIC_ASSERT
+//
+// These pass our test cases, but aren't officially supported according to:
+// http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/
+//
+//#  undef  BOOST_NO_CXX11_LAMBDAS
+//#  undef  BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+//#  undef  BOOST_NO_CXX11_DECLTYPE
+//#  undef  BOOST_NO_CXX11_AUTO_DECLARATIONS
+//#  undef  BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#endif
+
+#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION >= 1200)
+//#  undef  BOOST_NO_CXX11_RVALUE_REFERENCES // Enabling this breaks Filesystem and Exception libraries
+//#  undef  BOOST_NO_CXX11_SCOPED_ENUMS  // doesn't really work!!
+#  undef  BOOST_NO_CXX11_DELETED_FUNCTIONS
+#  undef  BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#  undef  BOOST_NO_CXX11_LAMBDAS
+#  undef  BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#  undef  BOOST_NO_CXX11_DECLTYPE
+#  undef  BOOST_NO_CXX11_AUTO_DECLARATIONS
+#  undef  BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#endif
+
+// icl Version 12.1.0.233 Build 20110811 and possibly some other builds
+// had an incorrect __INTEL_COMPILER value of 9999. Intel say this has been fixed. 
+#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION > 1200)
+#  undef  BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#  undef  BOOST_NO_CXX11_NULLPTR
+#  undef  BOOST_NO_CXX11_RVALUE_REFERENCES
+#  undef  BOOST_NO_SFINAE_EXPR
+#  undef  BOOST_NO_CXX11_TEMPLATE_ALIASES
+#  undef  BOOST_NO_CXX11_VARIADIC_TEMPLATES
+
+// http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/
+// continues to list scoped enum support as "Partial" 
+//#  undef  BOOST_NO_CXX11_SCOPED_ENUMS 
+#endif
+
+#if defined(_MSC_VER) && (_MSC_VER <= 1700)
+//
+// Although the Intel compiler is capable of supporting these, it appears not to in MSVC compatibility mode:
+//
+#  define  BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#  define  BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#  define  BOOST_NO_CXX11_DELETED_FUNCTIONS
+#  define  BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#  define  BOOST_NO_CXX11_TEMPLATE_ALIASES
+#endif
+
+#if (BOOST_INTEL_CXX_VERSION < 1200)
+//
+// fenv.h appears not to work with Intel prior to 12.0:
+//
+#  define BOOST_NO_FENV_H
+#endif
 
 //
 // last known and checked version:
-#if (BOOST_INTEL_CXX_VERSION > 1110)
+#if (BOOST_INTEL_CXX_VERSION > 1200)
 #  if defined(BOOST_ASSERT_CONFIG)
 #     error "Unknown compiler version - please run the configure tests and report the results"
 #  elif defined(_MSC_VER)
diff --git a/ext/boost/config/compiler/metrowerks.hpp b/ext/boost/config/compiler/metrowerks.hpp
index 3bc9d97..184cb71 100644
--- a/ext/boost/config/compiler/metrowerks.hpp
+++ b/ext/boost/config/compiler/metrowerks.hpp
@@ -90,30 +90,35 @@
 #if __MWERKS__ > 0x3206 && __option(rvalue_refs)
 #  define BOOST_HAS_RVALUE_REFS
 #else
-#  define BOOST_NO_RVALUE_REFERENCES              
+#  define BOOST_NO_CXX11_RVALUE_REFERENCES              
 #endif
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CONCEPTS
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_EXTERN_TEMPLATE
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_SCOPED_ENUMS
 #define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_STATIC_ASSERT
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
-#define BOOST_NO_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_VARIADIC_MACROS
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
 
 #define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
 
diff --git a/ext/boost/config/compiler/mpw.hpp b/ext/boost/config/compiler/mpw.hpp
index 4db14dd..14adee0 100644
--- a/ext/boost/config/compiler/mpw.hpp
+++ b/ext/boost/config/compiler/mpw.hpp
@@ -40,29 +40,34 @@
 //
 //   See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
 //
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CONCEPTS
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_EXTERN_TEMPLATE
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
 #define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_STATIC_ASSERT
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
-#define BOOST_NO_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_VARIADIC_MACROS
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
 
 //
 // versions check:
diff --git a/ext/boost/config/compiler/nvcc.hpp b/ext/boost/config/compiler/nvcc.hpp
index e31c3e2..03203fb 100644
--- a/ext/boost/config/compiler/nvcc.hpp
+++ b/ext/boost/config/compiler/nvcc.hpp
@@ -17,70 +17,12 @@
 
 // Boost support macro for NVCC 
 // NVCC Basically behaves like some flavor of MSVC6 + some specific quirks
-#define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-#define BOOST_MSVC6_MEMBER_TEMPLATES
-#define BOOST_HAS_UNISTD_H
-#define BOOST_HAS_STDINT_H
-#define BOOST_HAS_SIGACTION
-#define BOOST_HAS_SCHED_YIELD
-#define BOOST_HAS_PTHREADS
-#define BOOST_HAS_PTHREAD_YIELD
-#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
-#define BOOST_HAS_PARTIAL_STD_ALLOCATOR
-#define BOOST_HAS_NRVO
-#define BOOST_HAS_NL_TYPES_H
-#define BOOST_HAS_NANOSLEEP
-#define BOOST_HAS_LONG_LONG
-#define BOOST_HAS_LOG1P
-#define BOOST_HAS_GETTIMEOFDAY
-#define BOOST_HAS_EXPM1
-#define BOOST_HAS_DIRENT_H
-#define BOOST_HAS_CLOCK_GETTIME
-#define BOOST_NO_VARIADIC_TEMPLATES
-#define BOOST_NO_UNICODE_LITERALS
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_STD_UNORDERED
-#define BOOST_NO_STATIC_ASSERT
-#define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_SCOPED_ENUMS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_MS_INT64_NUMERIC_LIMITS
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_EXTERN_TEMPLATE
-#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_CONCEPTS
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_0X_HDR_UNORDERED_SET
-#define BOOST_NO_0X_HDR_UNORDERED_MAP
-#define BOOST_NO_0X_HDR_TYPE_TRAITS
-#define BOOST_NO_0X_HDR_TUPLE
-#define BOOST_NO_0X_HDR_THREAD
-#define BOOST_NO_0X_HDR_TYPEINDEX
-#define BOOST_NO_0X_HDR_SYSTEM_ERROR
-#define BOOST_NO_0X_HDR_REGEX
-#define BOOST_NO_0X_HDR_RATIO
-#define BOOST_NO_0X_HDR_RANDOM
-#define BOOST_NO_0X_HDR_MUTEX
-#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
-#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
-#define BOOST_NO_0X_HDR_INITIALIZER_LIST
-#define BOOST_NO_0X_HDR_FUTURE
-#define BOOST_NO_0X_HDR_FORWARD_LIST
-#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
-#define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-#define BOOST_NO_0X_HDR_CONCEPTS
-#define BOOST_NO_0X_HDR_CODECVT
-#define BOOST_NO_0X_HDR_CHRONO
-#define BOOST_NO_0X_HDR_ARRAY
+#ifdef __GNUC__
 
+#include <boost/config/compiler/gcc.hpp>
+
+#elif defined(_MSC_VER)
+
+#include <boost/config/compiler/visualc.hpp>
+
+#endif
diff --git a/ext/boost/config/compiler/pathscale.hpp b/ext/boost/config/compiler/pathscale.hpp
new file mode 100644
index 0000000..3041126
--- /dev/null
+++ b/ext/boost/config/compiler/pathscale.hpp
@@ -0,0 +1,80 @@
+//  (C) Copyright Bryce Lelbach 2011
+
+//  Use, modification and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org for most recent version.
+
+// PathScale EKOPath C++ Compiler
+
+#ifndef BOOST_COMPILER
+#  define BOOST_COMPILER "PathScale EKOPath C++ Compiler version " __PATHSCALE__
+#endif
+
+#if __PATHCC__ >= 4
+#  define BOOST_MSVC6_MEMBER_TEMPLATES
+#  define BOOST_HAS_UNISTD_H
+#  define BOOST_HAS_STDINT_H
+#  define BOOST_HAS_SIGACTION
+#  define BOOST_HAS_SCHED_YIELD
+#  define BOOST_HAS_THREADS
+#  define BOOST_HAS_PTHREADS
+#  define BOOST_HAS_PTHREAD_YIELD
+#  define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+#  define BOOST_HAS_PARTIAL_STD_ALLOCATOR
+#  define BOOST_HAS_NRVO
+#  define BOOST_HAS_NL_TYPES_H
+#  define BOOST_HAS_NANOSLEEP
+#  define BOOST_HAS_LONG_LONG
+#  define BOOST_HAS_LOG1P
+#  define BOOST_HAS_GETTIMEOFDAY
+#  define BOOST_HAS_EXPM1
+#  define BOOST_HAS_DIRENT_H
+#  define BOOST_HAS_CLOCK_GETTIME
+#  define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#  define BOOST_NO_CXX11_UNICODE_LITERALS
+#  define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#  define BOOST_NO_CXX11_STATIC_ASSERT
+#  define BOOST_NO_SFINAE_EXPR
+#  define BOOST_NO_CXX11_SCOPED_ENUMS
+#  define BOOST_NO_CXX11_RVALUE_REFERENCES
+#  define BOOST_NO_CXX11_RANGE_BASED_FOR
+#  define BOOST_NO_CXX11_RAW_LITERALS
+#  define BOOST_NO_CXX11_NULLPTR
+#  define BOOST_NO_CXX11_NUMERIC_LIMITS
+#  define BOOST_NO_CXX11_NOEXCEPT
+#  define BOOST_NO_CXX11_LAMBDAS
+#  define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#  define BOOST_NO_MS_INT64_NUMERIC_LIMITS
+#  define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#  define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#  define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#  define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#  define BOOST_NO_CXX11_DECLTYPE
+#  define BOOST_NO_CXX11_DECLTYPE_N3276
+#  define BOOST_NO_CXX11_CONSTEXPR
+#  define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+#  define BOOST_NO_CXX11_CHAR32_T
+#  define BOOST_NO_CXX11_CHAR16_T
+#  define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#  define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#  define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#  define BOOST_NO_CXX11_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+#  define BOOST_NO_CXX11_HDR_TYPEINDEX
+#  define BOOST_NO_CXX11_HDR_TUPLE
+#  define BOOST_NO_CXX11_HDR_THREAD
+#  define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+#  define BOOST_NO_CXX11_HDR_REGEX
+#  define BOOST_NO_CXX11_HDR_RATIO
+#  define BOOST_NO_CXX11_HDR_RANDOM
+#  define BOOST_NO_CXX11_HDR_MUTEX
+#  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#  define BOOST_NO_CXX11_HDR_FUTURE
+#  define BOOST_NO_CXX11_HDR_FORWARD_LIST
+#  define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+#  define BOOST_NO_CXX11_HDR_CODECVT
+#  define BOOST_NO_CXX11_HDR_CHRONO
+#endif
+
diff --git a/ext/boost/config/compiler/pgi.hpp b/ext/boost/config/compiler/pgi.hpp
index 1c7c84b..fa32fef 100644
--- a/ext/boost/config/compiler/pgi.hpp
+++ b/ext/boost/config/compiler/pgi.hpp
@@ -1,6 +1,6 @@
 //  (C) Copyright Noel Belcourt 2007.
-//  Use, modification and distribution are subject to the 
-//  Boost Software License, Version 1.0. (See accompanying file 
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 //  See http://www.boost.org for most recent version.
@@ -8,7 +8,7 @@
 //  PGI C++ compiler setup:
 
 #define BOOST_COMPILER_VERSION __PGIC__##__PGIC_MINOR__
-#define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(_COMPILER_VERSION)
+#define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
 
 //
 // Threading support:
@@ -16,13 +16,29 @@
 // if no threading API is detected.
 //
 
-// PGI 10.x doesn't seem to define __PGIC__
-
-// versions earlier than 10.x do define __PGIC__
-#if __PGIC__ >= 10
+#if __PGIC__ >= 11
 
 // options requested by configure --enable-test
 #define BOOST_HAS_PTHREADS
+#define BOOST_HAS_THREADS
+#define BOOST_HAS_PTHREAD_YIELD
+#define BOOST_HAS_NRVO
+#define BOOST_HAS_LONG_LONG
+
+// options --enable-test wants undefined
+#undef BOOST_NO_STDC_NAMESPACE
+#undef BOOST_NO_EXCEPTION_STD_NAMESPACE
+#undef BOOST_DEDUCED_TYPENAME
+
+#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+
+#elif __PGIC__ >= 10
+
+// options requested by configure --enable-test
+#define BOOST_HAS_THREADS
 #define BOOST_HAS_NRVO
 #define BOOST_HAS_LONG_LONG
 
@@ -33,11 +49,11 @@
 
 #elif __PGIC__ >= 7
 
-#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL 
+#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
 #define BOOST_NO_TWO_PHASE_NAME_LOOKUP
 #define BOOST_NO_SWPRINTF
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
 
 #else
 
@@ -49,27 +65,52 @@
 //
 //   See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
 //
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CONCEPTS
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_EXTERN_TEMPLATE
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_NUMERIC_LIMITS
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
 #define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_STATIC_ASSERT
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
-#define BOOST_NO_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_SWPRINTF
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_VARIADIC_MACROS
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+
+#define BOOST_NO_CXX11_HDR_UNORDERED_SET
+#define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+#define BOOST_NO_CXX11_HDR_TYPEINDEX
+#define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+#define BOOST_NO_CXX11_HDR_TUPLE
+#define BOOST_NO_CXX11_HDR_THREAD
+#define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+#define BOOST_NO_CXX11_HDR_REGEX
+#define BOOST_NO_CXX11_HDR_RATIO
+#define BOOST_NO_CXX11_HDR_RANDOM
+#define BOOST_NO_CXX11_HDR_MUTEX
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_HDR_FUTURE
+#define BOOST_NO_CXX11_HDR_FORWARD_LIST
+#define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+#define BOOST_NO_CXX11_HDR_CODECVT
+#define BOOST_NO_CXX11_HDR_CHRONO
+#define BOOST_NO_CXX11_HDR_ARRAY
 
 //
 // version check:
diff --git a/ext/boost/config/compiler/sunpro_cc.hpp b/ext/boost/config/compiler/sunpro_cc.hpp
index aca49fa..65beb50 100644
--- a/ext/boost/config/compiler/sunpro_cc.hpp
+++ b/ext/boost/config/compiler/sunpro_cc.hpp
@@ -99,29 +99,34 @@
 //
 #  define BOOST_HAS_LONG_LONG
 
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CONCEPTS
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_EXTERN_TEMPLATE
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
 #define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_STATIC_ASSERT
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
-#define BOOST_NO_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_VARIADIC_MACROS
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
 
 //
 // Version
diff --git a/ext/boost/config/compiler/vacpp.hpp b/ext/boost/config/compiler/vacpp.hpp
index e5b6971..2410d5a 100644
--- a/ext/boost/config/compiler/vacpp.hpp
+++ b/ext/boost/config/compiler/vacpp.hpp
@@ -27,7 +27,6 @@
 
 #if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG)
 #  define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
-#  define BOOST_NO_INITIALIZER_LISTS
 #endif
 
 #if (__IBMCPP__ <= 1110)
@@ -54,43 +53,78 @@
 #error "Compiler not supported or configured - please reconfigure"
 #endif
 //
-// last known and checked version is 600:
-#if (__IBMCPP__ > 1010)
+// last known and checked version is 1110:
+#if (__IBMCPP__ > 1110)
 #  if defined(BOOST_ASSERT_CONFIG)
 #     error "Unknown compiler version - please run the configure tests and report the results"
 #  endif
 #endif
 
 // Some versions of the compiler have issues with default arguments on partial specializations
+#if __IBMCPP__ <= 1010
 #define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
+#endif
 
 //
 // C++0x features
 //
 //   See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
 //
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CONCEPTS
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_EXTERN_TEMPLATE
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
+#if ! __IBMCPP_AUTO_TYPEDEDUCTION
+#  define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#  define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#endif
+#if ! __IBMCPP_UTF_LITERAL__
+#  define BOOST_NO_CXX11_CHAR16_T
+#  define BOOST_NO_CXX11_CHAR32_T
+#endif
+#if ! __IBMCPP_CONSTEXPR
+#  define BOOST_NO_CXX11_CONSTEXPR
+#endif
+#if ! __IBMCPP_DECLTYPE
+#  define BOOST_NO_CXX11_DECLTYPE
+#else
+#  define BOOST_HAS_DECLTYPE
+#endif
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#if ! __IBMCPP_EXPLICIT_CONVERSION_OPERATORS
+#  define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#endif
+#if ! __IBMCPP_EXTERN_TEMPLATE
+#  define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#endif
+#if ! __IBMCPP_VARIADIC_TEMPLATES
+// not enabled separately at this time
+#  define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#endif
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#if ! __IBMCPP_RVALUE_REFERENCES
+#  define BOOST_NO_CXX11_RVALUE_REFERENCES
+#endif
+#if ! __IBMCPP_SCOPED_ENUM
+#  define BOOST_NO_CXX11_SCOPED_ENUMS
+#endif
 #define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_STATIC_ASSERT
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
-#define BOOST_NO_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#if ! __IBMCPP_STATIC_ASSERT
+#  define BOOST_NO_CXX11_STATIC_ASSERT
+#endif
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#if ! __IBMCPP_VARIADIC_TEMPLATES
+#  define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#endif
+#if ! __C99_MACRO_WITH_VA_ARGS
+#  define BOOST_NO_CXX11_VARIADIC_MACROS
+#endif
 
 
 
diff --git a/ext/boost/config/compiler/visualc.hpp b/ext/boost/config/compiler/visualc.hpp
index a862570..0b11faa 100644
--- a/ext/boost/config/compiler/visualc.hpp
+++ b/ext/boost/config/compiler/visualc.hpp
@@ -9,35 +9,54 @@
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 //  See http://www.boost.org for most recent version.
-
+//
 //  Microsoft Visual C++ compiler setup:
+//
+//  We need to be careful with the checks in this file, as contrary
+//  to popular belief there are versions with _MSC_VER with the final
+//  digit non-zero (mainly the MIPS cross compiler).
+//
+//  So we either test _MSC_VER >= XXXX or else _MSC_VER < XXXX.
+//  No other comparisons (==, >, or <=) are safe.
+//
 
 #define BOOST_MSVC _MSC_VER
 
+//
+// Helper macro BOOST_MSVC_FULL_VER for use in Boost code:
+//
 #if _MSC_FULL_VER > 100000000
 #  define BOOST_MSVC_FULL_VER _MSC_FULL_VER
 #else
 #  define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10)
 #endif
 
-// turn off the warnings before we #include anything
+// Attempt to suppress VC6 warnings about the length of decorated names (obsolete):
 #pragma warning( disable : 4503 ) // warning: decorated name length exceeded
 
+//
+// versions check:
+// we don't support Visual C++ prior to version 6:
+#if _MSC_VER < 1200
+#  error "Compiler not supported or configured - please reconfigure"
+#endif
+
 #if _MSC_VER < 1300  // 1200 == VC++ 6.0, 1200-1202 == eVC++4
 #  pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info
 #  define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
 #  define BOOST_NO_VOID_RETURNS
 #  define BOOST_NO_EXCEPTION_STD_NAMESPACE
 
-#  if BOOST_MSVC == 1202
+#  if _MSC_VER == 1202
 #    define BOOST_NO_STD_TYPEINFO
 #  endif
 
-   // disable min/max macro defines on vc6:
-   //
 #endif
 
-#if (_MSC_VER <= 1300)  // 1300 == VC++ 7.0
+/// Visual Studio has no fenv.h
+#define BOOST_NO_FENV_H
+
+#if (_MSC_VER < 1310)  // 130X == VC++ 7.0
 
 #  if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS)      // VC7 bug with /Za
 #    define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
@@ -69,7 +88,7 @@
 #  define BOOST_NO_IS_ABSTRACT
 #  define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
 // TODO: what version is meant here? Have there really been any fixes in cl 12.01 (as e.g. shipped with eVC4)?
-#  if (_MSC_VER > 1200)
+#  if (_MSC_VER >= 1300)
 #     define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
 #  endif
 
@@ -80,7 +99,9 @@
 // it appears not to actually work:
 #  define BOOST_NO_SWPRINTF
 // Our extern template tests also fail for this compiler:
-#  define BOOST_NO_EXTERN_TEMPLATE
+#  define BOOST_NO_CXX11_EXTERN_TEMPLATE
+// Variadic macros do not exist for VC7.1 and lower
+#  define BOOST_NO_CXX11_VARIADIC_MACROS
 #endif
 
 #if defined(UNDER_CE)
@@ -88,21 +109,16 @@
 #  define BOOST_NO_SWPRINTF
 #endif
 
-#if _MSC_VER <= 1400  // 1400 == VC++ 8.0
+#if _MSC_VER < 1500  // 140X == VC++ 8.0
 #  define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
 #endif
 
-#if _MSC_VER <= 1600  // 1600 == VC++ 10.0
-#  define BOOST_NO_TWO_PHASE_NAME_LOOKUP
-#endif
-
-#if _MSC_VER == 1500  // 1500 == VC++ 9.0
+#if _MSC_VER < 1600  // 150X == VC++ 9.0
    // A bug in VC9:
 #  define BOOST_NO_ADL_BARRIER
 #endif
 
 
-#if (_MSC_VER <= 1600)
 // MSVC (including the latest checked version) has not yet completely 
 // implemented value-initialization, as is reported:
 // "VC++ does not value-initialize members of derived classes without 
@@ -116,11 +132,10 @@
 // https://connect.microsoft.com/VisualStudio/feedback/details/100744
 // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
 // (Niels Dekker, LKEB, May 2010)
-#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
-#endif
+#  define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
 
-#if _MSC_VER <= 1500  || !defined(BOOST_STRICT_CONFIG) // 1500 == VC++ 9.0
-#  define BOOST_NO_INITIALIZER_LISTS
+#if _MSC_VER < 1600  || !defined(BOOST_STRICT_CONFIG) // 150X == VC++ 9.0
+#  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
 #endif
 
 #ifndef _NATIVE_WCHAR_T_DEFINED
@@ -128,11 +143,15 @@
 #endif
 
 #if defined(_WIN32_WCE) || defined(UNDER_CE)
-#  define BOOST_NO_THREADEX
-#  define BOOST_NO_GETSYSTEMTIMEASFILETIME
 #  define BOOST_NO_SWPRINTF
 #endif
 
+// we have ThreadEx or GetSystemTimeAsFileTime unless we're running WindowsCE
+#if !defined(_WIN32_WCE) && !defined(UNDER_CE)
+#  define BOOST_HAS_THREADEX
+#  define BOOST_HAS_GETSYSTEMTIMEASFILETIME
+#endif
+
 //   
 // check for exception handling support:   
 #if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)
@@ -172,34 +191,44 @@
 // C++ features supported by VC++ 10 (aka 2010)
 //
 #if _MSC_VER < 1600
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_STATIC_ASSERT
-#define BOOST_NO_NULLPTR
+#  define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#  define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#  define BOOST_NO_CXX11_LAMBDAS
+#  define BOOST_NO_CXX11_RVALUE_REFERENCES
+#  define BOOST_NO_CXX11_STATIC_ASSERT
+#  define BOOST_NO_CXX11_NULLPTR
+#  define BOOST_NO_CXX11_DECLTYPE
 #endif // _MSC_VER < 1600
+
 #if _MSC_VER >= 1600
-#define BOOST_HAS_STDINT_H
+#  define BOOST_HAS_STDINT_H
 #endif
 
+// C++ features supported by VC++ 11 (aka 2012)
+//
+#if _MSC_VER < 1700
+#  define BOOST_NO_CXX11_RANGE_BASED_FOR
+#  define BOOST_NO_CXX11_SCOPED_ENUMS
+#endif // _MSC_VER < 1700
+
 // C++0x features not supported by any versions
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CONCEPTS
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
 #define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
-#define BOOST_NO_VARIADIC_TEMPLATES
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
 //
 // prefix and suffix headers:
 //
@@ -210,6 +239,7 @@
 #  define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp"
 #endif
 
+#ifndef BOOST_COMPILER
 // TODO:
 // these things are mostly bogus. 1200 means version 12.0 of the compiler. The 
 // artificial versions assigned to them only refer to the versions of some IDE
@@ -221,12 +251,21 @@
       // Note: these are so far off, they are not really supported
 #   elif _MSC_VER < 1300 // eVC++ 4 comes with 1200-1202
 #     define BOOST_COMPILER_VERSION evc4.0
-#   elif _MSC_VER == 1400
+#   elif _MSC_VER < 1400
+      // Note: I'm not aware of any CE compiler with version 13xx
+#      if defined(BOOST_ASSERT_CONFIG)
+#         error "Unknown EVC++ compiler version - please run the configure tests and report the results"
+#      else
+#         pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results")
+#      endif
+#   elif _MSC_VER < 1500
 #     define BOOST_COMPILER_VERSION evc8
-#   elif _MSC_VER == 1500
+#   elif _MSC_VER < 1600
 #     define BOOST_COMPILER_VERSION evc9
-#   elif _MSC_VER == 1600
+#   elif _MSC_VER < 1700
 #     define BOOST_COMPILER_VERSION evc10
+#   elif _MSC_VER < 1800 
+#     define BOOST_COMPILER_VERSION evc11 
 #   else
 #      if defined(BOOST_ASSERT_CONFIG)
 #         error "Unknown EVC++ compiler version - please run the configure tests and report the results"
@@ -240,32 +279,29 @@
 #     define BOOST_COMPILER_VERSION 5.0
 #   elif _MSC_VER < 1300
 #       define BOOST_COMPILER_VERSION 6.0
-#   elif _MSC_VER == 1300
+#   elif _MSC_VER < 1310
 #     define BOOST_COMPILER_VERSION 7.0
-#   elif _MSC_VER == 1310
+#   elif _MSC_VER < 1400
 #     define BOOST_COMPILER_VERSION 7.1
-#   elif _MSC_VER == 1400
+#   elif _MSC_VER < 1500
 #     define BOOST_COMPILER_VERSION 8.0
-#   elif _MSC_VER == 1500
+#   elif _MSC_VER < 1600
 #     define BOOST_COMPILER_VERSION 9.0
-#   elif _MSC_VER == 1600
+#   elif _MSC_VER < 1700
 #     define BOOST_COMPILER_VERSION 10.0
+#   elif _MSC_VER < 1800 
+#     define BOOST_COMPILER_VERSION 11.0 
 #   else
 #     define BOOST_COMPILER_VERSION _MSC_VER
 #   endif
 # endif
 
-#define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
-
-//
-// versions check:
-// we don't support Visual C++ prior to version 6:
-#if _MSC_VER < 1200
-#error "Compiler not supported or configured - please reconfigure"
+#  define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
 #endif
+
 //
-// last known and checked version is 1600 (VC10, aka 2010):
-#if (_MSC_VER > 1600)
+// last known and checked version is 1700 (VC11, aka 2011):
+#if (_MSC_VER > 1700)
 #  if defined(BOOST_ASSERT_CONFIG)
 #     error "Unknown compiler version - please run the configure tests and report the results"
 #  else
diff --git a/ext/boost/config/no_tr1/._cmath.hpp b/ext/boost/config/no_tr1/._cmath.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/no_tr1/._cmath.hpp and /dev/null differ
diff --git a/ext/boost/config/no_tr1/._complex.hpp b/ext/boost/config/no_tr1/._complex.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/no_tr1/._complex.hpp and /dev/null differ
diff --git a/ext/boost/config/no_tr1/._functional.hpp b/ext/boost/config/no_tr1/._functional.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/no_tr1/._functional.hpp and /dev/null differ
diff --git a/ext/boost/config/no_tr1/._memory.hpp b/ext/boost/config/no_tr1/._memory.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/no_tr1/._memory.hpp and /dev/null differ
diff --git a/ext/boost/config/no_tr1/._utility.hpp b/ext/boost/config/no_tr1/._utility.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/no_tr1/._utility.hpp and /dev/null differ
diff --git a/ext/boost/config/platform/._aix.hpp b/ext/boost/config/platform/._aix.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/platform/._aix.hpp and /dev/null differ
diff --git a/ext/boost/config/platform/._amigaos.hpp b/ext/boost/config/platform/._amigaos.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/platform/._amigaos.hpp and /dev/null differ
diff --git a/ext/boost/config/platform/._beos.hpp b/ext/boost/config/platform/._beos.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/platform/._beos.hpp and /dev/null differ
diff --git a/ext/boost/config/platform/._hpux.hpp b/ext/boost/config/platform/._hpux.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/platform/._hpux.hpp and /dev/null differ
diff --git a/ext/boost/config/platform/._irix.hpp b/ext/boost/config/platform/._irix.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/platform/._irix.hpp and /dev/null differ
diff --git a/ext/boost/config/platform/._qnxnto.hpp b/ext/boost/config/platform/._qnxnto.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/platform/._qnxnto.hpp and /dev/null differ
diff --git a/ext/boost/config/platform/._solaris.hpp b/ext/boost/config/platform/._solaris.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/platform/._solaris.hpp and /dev/null differ
diff --git a/ext/boost/config/platform/._vxworks.hpp b/ext/boost/config/platform/._vxworks.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/config/platform/._vxworks.hpp and /dev/null differ
diff --git a/ext/boost/config/platform/bsd.hpp b/ext/boost/config/platform/bsd.hpp
index f02b0e2..a014297 100644
--- a/ext/boost/config/platform/bsd.hpp
+++ b/ext/boost/config/platform/bsd.hpp
@@ -56,7 +56,7 @@
 #endif
 
 #if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) \
-      || (__NetBSD_GCC__ >= 2095003) || defined(__DragonFly__))
+      || (defined(__NetBSD_GCC__) && (__NetBSD_GCC__ >= 2095003)) || defined(__DragonFly__))
 #  define BOOST_NO_CWCHAR
 #endif
 //
diff --git a/ext/boost/config/platform/cray.hpp b/ext/boost/config/platform/cray.hpp
new file mode 100644
index 0000000..5c476e4
--- /dev/null
+++ b/ext/boost/config/platform/cray.hpp
@@ -0,0 +1,18 @@
+//  (C) Copyright John Maddock 2011.
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+
+//  See http://www.boost.org for most recent version.
+
+//  SGI Irix specific config options:
+
+#define BOOST_PLATFORM "Cray"
+
+// boilerplate code:
+#define BOOST_HAS_UNISTD_H
+#include <boost/config/posix_features.hpp>
+
+
+
diff --git a/ext/boost/config/platform/cygwin.hpp b/ext/boost/config/platform/cygwin.hpp
index 5627dd6..b7ef572 100644
--- a/ext/boost/config/platform/cygwin.hpp
+++ b/ext/boost/config/platform/cygwin.hpp
@@ -39,8 +39,18 @@
 #define BOOST_HAS_STDINT_H
 #endif
 
+/// Cygwin has no fenv.h
+#define BOOST_NO_FENV_H
+
 // boilerplate code:
 #include <boost/config/posix_features.hpp>
+
+//
+// Cygwin lies about XSI conformance, there is no nl_types.h:
+//
+#ifdef BOOST_HAS_NL_TYPES_H
+#  undef BOOST_HAS_NL_TYPES_H
+#endif
  
 
 
diff --git a/ext/boost/config/platform/linux.hpp b/ext/boost/config/platform/linux.hpp
index 51ae133..a02aff7 100644
--- a/ext/boost/config/platform/linux.hpp
+++ b/ext/boost/config/platform/linux.hpp
@@ -11,7 +11,11 @@
 #define BOOST_PLATFORM "linux"
 
 // make sure we have __GLIBC_PREREQ if available at all
+#ifdef __cplusplus
 #include <cstdlib>
+#else
+#include <stdlib.h>
+#endif
 
 //
 // <stdint.h> added to glibc 2.1.1
@@ -68,6 +72,7 @@
 // boilerplate code:
 #define BOOST_HAS_UNISTD_H
 #include <boost/config/posix_features.hpp>
+#define BOOST_HAS_PTHREAD_YIELD
 
 #ifndef __GNUC__
 //
diff --git a/ext/boost/config/platform/macos.hpp b/ext/boost/config/platform/macos.hpp
index 2780ef9..6d876b1 100644
--- a/ext/boost/config/platform/macos.hpp
+++ b/ext/boost/config/platform/macos.hpp
@@ -64,16 +64,17 @@
 #  if ( defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON ) || ( defined(TARGET_CARBON) && TARGET_CARBON )
 
 #  if !defined(BOOST_HAS_PTHREADS)
-#    define BOOST_HAS_MPTASKS
+// MPTasks support is deprecated/removed from Boost:
+//#    define BOOST_HAS_MPTASKS
 #  elif ( __dest_os == __mac_os_x )
 // We are doing a Carbon/Mach-O/MSL build which has pthreads, but only the
 // gettimeofday and no posix.
 #  define BOOST_HAS_GETTIMEOFDAY
 #  endif
 
-// The MP task implementation of Boost Threads aims to replace MP-unsafe
-// parts of the MSL, so we turn on threads unconditionally.
-#    define BOOST_HAS_THREADS
+#ifdef BOOST_HAS_PTHREADS
+#  define BOOST_HAS_THREADS
+#endif
 
 // The remote call manager depends on this.
 #    define BOOST_BIND_ENABLE_PASCAL
diff --git a/ext/boost/config/platform/symbian.hpp b/ext/boost/config/platform/symbian.hpp
index ad37943..e02a778 100644
--- a/ext/boost/config/platform/symbian.hpp
+++ b/ext/boost/config/platform/symbian.hpp
@@ -18,8 +18,11 @@
 // Open C / C++ plugin was introdused in this SDK, earlier versions don't have CRT / STL
 #  define BOOST_S60_3rd_EDITION_FP2_OR_LATER_SDK
 // make sure we have __GLIBC_PREREQ if available at all
-#  include <cstdlib>
-// boilerplate code:
+#ifdef __cplusplus
+#include <cstdlib>
+#else
+#include <stdlib.h>
+#endif// boilerplate code:
 #  define BOOST_HAS_UNISTD_H
 #  include <boost/config/posix_features.hpp>
 // S60 SDK defines _POSIX_VERSION as POSIX.1
diff --git a/ext/boost/config/platform/vms.hpp b/ext/boost/config/platform/vms.hpp
new file mode 100644
index 0000000..f70efcf
--- /dev/null
+++ b/ext/boost/config/platform/vms.hpp
@@ -0,0 +1,25 @@
+//  (C) Copyright Artyom Beilis 2010.  
+//  Use, modification and distribution are subject to the  
+//  Boost Software License, Version 1.0. (See accompanying file  
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 
+
+#ifndef BOOST_CONFIG_PLATFORM_VMS_HPP 
+#define BOOST_CONFIG_PLATFORM_VMS_HPP 
+
+#define BOOST_PLATFORM "OpenVMS" 
+
+#undef  BOOST_HAS_STDINT_H 
+#define BOOST_HAS_UNISTD_H 
+#define BOOST_HAS_NL_TYPES_H 
+#define BOOST_HAS_GETTIMEOFDAY 
+#define BOOST_HAS_DIRENT_H 
+#define BOOST_HAS_PTHREADS 
+#define BOOST_HAS_NANOSLEEP 
+#define BOOST_HAS_CLOCK_GETTIME 
+#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE 
+#define BOOST_HAS_LOG1P 
+#define BOOST_HAS_EXPM1 
+#define BOOST_HAS_THREADS 
+#undef  BOOST_HAS_SCHED_YIELD 
+
+#endif 
diff --git a/ext/boost/config/platform/win32.hpp b/ext/boost/config/platform/win32.hpp
deleted file mode 100644
index f59c4ea..0000000
--- a/ext/boost/config/platform/win32.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-//  (C) Copyright John Maddock 2001 - 2003. 
-//  (C) Copyright Bill Kempf 2001. 
-//  (C) Copyright Aleksey Gurtovoy 2003. 
-//  (C) Copyright Rene Rivera 2005.
-//  Use, modification and distribution are subject to the 
-//  Boost Software License, Version 1.0. (See accompanying file 
-//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-//  See http://www.boost.org for most recent version.
-
-//  Win32 specific config options:
-
-#define BOOST_PLATFORM "Win32"
-
-//  Get the information about the MinGW runtime, i.e. __MINGW32_*VERSION.
-#if defined(__MINGW32__)
-#  include <_mingw.h>
-#endif
-
-#if defined(__GNUC__) && !defined(BOOST_NO_SWPRINTF)
-#  define BOOST_NO_SWPRINTF
-#endif
-
-//  Default defines for BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_IMPORT
-//  If a compiler doesn't support __declspec(dllexport)/__declspec(dllimport),
-//  its boost/config/compiler/ file must define BOOST_SYMBOL_EXPORT and
-//  BOOST_SYMBOL_IMPORT
-#ifndef BOOST_SYMBOL_EXPORT
-#  define BOOST_HAS_DECLSPEC
-#  define BOOST_SYMBOL_EXPORT __declspec(dllexport)
-#  define BOOST_SYMBOL_IMPORT __declspec(dllimport)
-#endif
-
-
-#if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0)))
-#  define BOOST_HAS_STDINT_H
-#  define __STDC_LIMIT_MACROS
-#  define BOOST_HAS_DIRENT_H
-#  define BOOST_HAS_UNISTD_H
-#endif
-
-//
-// Win32 will normally be using native Win32 threads,
-// but there is a pthread library avaliable as an option,
-// we used to disable this when BOOST_DISABLE_WIN32 was 
-// defined but no longer - this should allow some
-// files to be compiled in strict mode - while maintaining
-// a consistent setting of BOOST_HAS_THREADS across
-// all translation units (needed for shared_ptr etc).
-//
-
-#ifdef _WIN32_WCE
-#  define BOOST_NO_ANSI_APIS
-#endif
-
-#ifndef BOOST_HAS_PTHREADS
-#  define BOOST_HAS_WINTHREADS
-#endif
-
-#ifndef BOOST_DISABLE_WIN32
-// WEK: Added
-#define BOOST_HAS_FTIME
-#define BOOST_WINDOWS 1
-
-#endif
diff --git a/ext/boost/config/select_compiler_config.hpp b/ext/boost/config/select_compiler_config.hpp
index f9b086a..0d47b25 100644
--- a/ext/boost/config/select_compiler_config.hpp
+++ b/ext/boost/config/select_compiler_config.hpp
@@ -10,31 +10,6 @@
 
 //  See http://www.boost.org/ for most recent version.
 
-
-// one identification macro for each of the
-// compilers we support:
-
-#   define BOOST_CXX_GCCXML   0
-#   define BOOST_CXX_CLANG    0
-#   define BOOST_CXX_COMO     0
-#   define BOOST_CXX_DMC      0
-#   define BOOST_CXX_INTEL    0
-#   define BOOST_CXX_GNUC     0
-#   define BOOST_CXX_KCC      0
-#   define BOOST_CXX_SGI      0
-#   define BOOST_CXX_TRU64    0
-#   define BOOST_CXX_GHS      0
-#   define BOOST_CXX_BORLAND  0
-#   define BOOST_CXX_CW       0
-#   define BOOST_CXX_SUNPRO   0
-#   define BOOST_CXX_HPACC    0
-#   define BOOST_CXX_MPW      0
-#   define BOOST_CXX_IBMCPP   0
-#   define BOOST_CXX_MSVC     0
-#   define BOOST_CXX_PGI      0
-#   define BOOST_CXX_NVCC     0
-
-
 // locate which compiler we are using and define
 // BOOST_COMPILER_CONFIG as needed: 
 
@@ -42,6 +17,10 @@
 // GCC-XML emulates other compilers, it has to appear first here!
 #   define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp"
 
+#elif defined(_CRAYC)
+// EDG based Cray compiler:
+#   define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp"
+
 #elif defined __CUDACC__
 //  NVIDIA CUDA C++ compiler for GPU
 #   define BOOST_COMPILER_CONFIG "boost/config/compiler/nvcc.hpp"
@@ -50,6 +29,10 @@
 //  Comeau C++
 #   define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"
 
+#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4)
+// PathScale EKOPath compiler (has to come before clang and gcc)
+#   define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp"
+
 #elif defined __clang__
 //  Clang C++ emulates GCC, so it has to appear early.
 #   define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp"
diff --git a/ext/boost/config/select_platform_config.hpp b/ext/boost/config/select_platform_config.hpp
index 8606e12..2af61d2 100644
--- a/ext/boost/config/select_platform_config.hpp
+++ b/ext/boost/config/select_platform_config.hpp
@@ -13,7 +13,7 @@
 // <header_name> in order to prevent macro expansion within the header
 // name (for example "linux" is a macro on linux systems).
 
-#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) 
+#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC)
 // linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though?
 #  define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp"
 
@@ -69,6 +69,13 @@
 // Symbian: 
 #  define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp" 
 
+#elif defined(_CRAYC)
+// Cray:
+#  define BOOST_PLATFORM_CONFIG "boost/config/platform/cray.hpp" 
+
+#elif defined(__VMS) 
+// VMS:
+#  define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp" 
 #else
 
 #  if defined(unix) \
diff --git a/ext/boost/config/select_stdlib_config.hpp b/ext/boost/config/select_stdlib_config.hpp
index 2a1430a..96ede00 100644
--- a/ext/boost/config/select_stdlib_config.hpp
+++ b/ext/boost/config/select_stdlib_config.hpp
@@ -14,7 +14,11 @@
 // First include <cstddef> to determine if some version of STLport is in use as the std lib
 // (do not rely on this header being included since users can short-circuit this header 
 //  if they know whose std lib they are using.)
-#include <cstddef>
+#ifdef __cplusplus
+#  include <cstddef>
+#else
+#  include <stddef.h>
+#endif
 
 #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
 // STLPort library; this _must_ come first, otherwise since
@@ -40,6 +44,10 @@
 // Rogue Wave library:
 #  define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp"
 
+#elif defined(_LIBCPP_VERSION)
+// libc++
+#  define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp"
+
 #elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
 // GNU libstdc++ 3
 #  define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp"
diff --git a/ext/boost/config/stdlib/dinkumware.hpp b/ext/boost/config/stdlib/dinkumware.hpp
index ea8faf1..e0032b9 100644
--- a/ext/boost/config/stdlib/dinkumware.hpp
+++ b/ext/boost/config/stdlib/dinkumware.hpp
@@ -87,44 +87,44 @@
 #endif
 
 #include <typeinfo>
-#if !_HAS_EXCEPTIONS
+#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) 
 #  define BOOST_NO_STD_TYPEINFO    
 #endif  
 
 //  C++0x headers implemented in 520 (as shipped by Microsoft)
 //
 #if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520
-#  define BOOST_NO_0X_HDR_ARRAY
-#  define BOOST_NO_0X_HDR_CODECVT
-#  define BOOST_NO_0X_HDR_FORWARD_LIST
-#  define BOOST_NO_0X_HDR_INITIALIZER_LIST
-#  define BOOST_NO_0X_HDR_RANDOM
-#  define BOOST_NO_0X_HDR_REGEX
-#  define BOOST_NO_0X_HDR_SYSTEM_ERROR
-#  define BOOST_NO_0X_HDR_TYPE_TRAITS
-#  define BOOST_NO_STD_UNORDERED        // deprecated; see following
-#  define BOOST_NO_0X_HDR_UNORDERED_MAP
-#  define BOOST_NO_0X_HDR_UNORDERED_SET
-#  define BOOST_NO_0X_HDR_TUPLE
-#  define BOOST_NO_0X_HDR_TYPEINDEX
+#  define BOOST_NO_CXX11_HDR_ARRAY
+#  define BOOST_NO_CXX11_HDR_CODECVT
+#  define BOOST_NO_CXX11_HDR_FORWARD_LIST
+#  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#  define BOOST_NO_CXX11_HDR_RANDOM
+#  define BOOST_NO_CXX11_HDR_REGEX
+#  define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+#  define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+#  define BOOST_NO_CXX11_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_HDR_TUPLE
+#  define BOOST_NO_CXX11_HDR_TYPEINDEX
+#  define BOOST_NO_CXX11_HDR_FUNCTIONAL
+#  define BOOST_NO_CXX11_NUMERIC_LIMITS
+#  define BOOST_NO_CXX11_SMART_PTR
 #endif
 
-#if !defined(_HAS_TR1_IMPORTS) && !defined(BOOST_NO_0X_HDR_TUPLE)
-#  define BOOST_NO_0X_HDR_TUPLE
+#if (!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(BOOST_NO_CXX11_HDR_TUPLE)
+#  define BOOST_NO_CXX11_HDR_TUPLE
 #endif
-
-//  C++0x headers not yet implemented
 //
-#  define BOOST_NO_0X_HDR_CHRONO
-#  define BOOST_NO_0X_HDR_CONCEPTS
-#  define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-#  define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
-#  define BOOST_NO_0X_HDR_FUTURE
-#  define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
-#  define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
-#  define BOOST_NO_0X_HDR_MUTEX
-#  define BOOST_NO_0X_HDR_RATIO
-#  define BOOST_NO_0X_HDR_THREAD
+//  C++0x headers not yet (fully) implemented:
+//
+#  define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+#  define BOOST_NO_CXX11_HDR_CHRONO
+#  define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+#  define BOOST_NO_CXX11_HDR_FUTURE
+#  define BOOST_NO_CXX11_HDR_MUTEX
+#  define BOOST_NO_CXX11_HDR_RATIO
+#  define BOOST_NO_CXX11_HDR_THREAD
+#  define BOOST_NO_CXX11_ALLOCATOR
+#  define BOOST_NO_CXX11_ATOMIC_SMART_PTR
 
 #ifdef _CPPLIB_VER
 #  define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER
diff --git a/ext/boost/config/stdlib/libcomo.hpp b/ext/boost/config/stdlib/libcomo.hpp
index 97a39f3..29490f1 100644
--- a/ext/boost/config/stdlib/libcomo.hpp
+++ b/ext/boost/config/stdlib/libcomo.hpp
@@ -35,29 +35,29 @@
 
 //  C++0x headers not yet implemented
 //
-#  define BOOST_NO_0X_HDR_ARRAY
-#  define BOOST_NO_0X_HDR_CHRONO
-#  define BOOST_NO_0X_HDR_CODECVT
-#  define BOOST_NO_0X_HDR_CONCEPTS
-#  define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-#  define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
-#  define BOOST_NO_0X_HDR_FORWARD_LIST
-#  define BOOST_NO_0X_HDR_FUTURE
-#  define BOOST_NO_0X_HDR_INITIALIZER_LIST
-#  define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
-#  define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
-#  define BOOST_NO_0X_HDR_MUTEX
-#  define BOOST_NO_0X_HDR_RANDOM
-#  define BOOST_NO_0X_HDR_RATIO
-#  define BOOST_NO_0X_HDR_REGEX
-#  define BOOST_NO_0X_HDR_SYSTEM_ERROR
-#  define BOOST_NO_0X_HDR_THREAD
-#  define BOOST_NO_0X_HDR_TUPLE
-#  define BOOST_NO_0X_HDR_TYPE_TRAITS
-#  define BOOST_NO_0X_HDR_TYPEINDEX
-#  define BOOST_NO_STD_UNORDERED        // deprecated; see following
-#  define BOOST_NO_0X_HDR_UNORDERED_MAP
-#  define BOOST_NO_0X_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_HDR_ARRAY
+#  define BOOST_NO_CXX11_HDR_CHRONO
+#  define BOOST_NO_CXX11_HDR_CODECVT
+#  define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+#  define BOOST_NO_CXX11_HDR_FORWARD_LIST
+#  define BOOST_NO_CXX11_HDR_FUTURE
+#  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#  define BOOST_NO_CXX11_HDR_MUTEX
+#  define BOOST_NO_CXX11_HDR_RANDOM
+#  define BOOST_NO_CXX11_HDR_RATIO
+#  define BOOST_NO_CXX11_HDR_REGEX
+#  define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+#  define BOOST_NO_CXX11_HDR_THREAD
+#  define BOOST_NO_CXX11_HDR_TUPLE
+#  define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+#  define BOOST_NO_CXX11_HDR_TYPEINDEX
+#  define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+#  define BOOST_NO_CXX11_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_NUMERIC_LIMITS
+#  define BOOST_NO_CXX11_ALLOCATOR
+#  define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+#  define BOOST_NO_CXX11_SMART_PTR
+#  define BOOST_NO_CXX11_HDR_FUNCTIONAL
 
 //
 // Intrinsic type_traits support.
diff --git a/ext/boost/config/stdlib/libcpp.hpp b/ext/boost/config/stdlib/libcpp.hpp
new file mode 100644
index 0000000..3d57440
--- /dev/null
+++ b/ext/boost/config/stdlib/libcpp.hpp
@@ -0,0 +1,37 @@
+//  (C) Copyright Christopher Jefferson 2011.
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org for most recent version.
+
+//  config for libc++
+//  Might need more in here later.
+
+#if !defined(_LIBCPP_VERSION)
+#  include <ciso646>
+#  if !defined(_LIBCPP_VERSION)
+#      error "This is not libc++!"
+#  endif
+#endif
+
+#define BOOST_STDLIB "libc++ version " BOOST_STRINGIZE(_LIBCPP_VERSION)
+
+#define BOOST_HAS_THREADS
+
+#ifdef _LIBCPP_HAS_NO_VARIADICS
+#    define BOOST_NO_CXX11_HDR_TUPLE
+#endif
+
+//
+// These appear to be unusable/incomplete so far:
+//
+#  define BOOST_NO_CXX11_HDR_CHRONO
+#  define BOOST_NO_CXX11_HDR_FUTURE
+#  define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+#  define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+
+// libc++ uses a non-standard messages_base
+#define BOOST_NO_STD_MESSAGES
+
+//  --- end ---
diff --git a/ext/boost/config/stdlib/libstdcpp3.hpp b/ext/boost/config/stdlib/libstdcpp3.hpp
index e68fecf..c56dff2 100644
--- a/ext/boost/config/stdlib/libstdcpp3.hpp
+++ b/ext/boost/config/stdlib/libstdcpp3.hpp
@@ -9,6 +9,8 @@
 //  config for libstdc++ v3
 //  not much to go in here:
 
+#define BOOST_GNU_STDLIB 1
+
 #ifdef __GLIBCXX__
 #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__)
 #else
@@ -32,7 +34,8 @@
 #ifdef __GLIBCXX__ // gcc 3.4 and greater:
 #  if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
         || defined(_GLIBCXX__PTHREADS) \
-        || defined(_GLIBCXX_HAS_GTHREADS)
+        || defined(_GLIBCXX_HAS_GTHREADS) \
+        || defined(_WIN32)
       //
       // If the std lib has thread support turned on, then turn it on in Boost
       // as well.  We do this because some gcc-3.4 std lib headers define _REENTANT
@@ -55,7 +58,6 @@
 #  define BOOST_HAS_THREADS
 #endif
 
-
 #if !defined(_GLIBCPP_USE_LONG_LONG) \
     && !defined(_GLIBCXX_USE_LONG_LONG)\
     && defined(BOOST_HAS_LONG_LONG)
@@ -64,6 +66,16 @@
 #  undef BOOST_HAS_LONG_LONG
 #endif
 
+// Apple doesn't seem to reliably defined a *unix* macro
+#if !defined(CYGWIN) && (  defined(__unix__)  \
+                        || defined(__unix)    \
+                        || defined(unix)      \
+                        || defined(__APPLE__) \
+                        || defined(__APPLE)   \
+                        || defined(APPLE))
+#  include <unistd.h>
+#endif
+
 #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0
 #  define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx
 #  define BOOST_HAS_SLIST
@@ -93,37 +105,61 @@
 //  C++0x headers in GCC 4.3.0 and later
 //
 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
-#  define BOOST_NO_0X_HDR_ARRAY
-#  define BOOST_NO_0X_HDR_RANDOM
-#  define BOOST_NO_0X_HDR_REGEX
-#  define BOOST_NO_0X_HDR_TUPLE
-#  define BOOST_NO_0X_HDR_TYPE_TRAITS
-#  define BOOST_NO_STD_UNORDERED  // deprecated; see following
-#  define BOOST_NO_0X_HDR_UNORDERED_MAP
-#  define BOOST_NO_0X_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_HDR_ARRAY
+#  define BOOST_NO_CXX11_HDR_REGEX
+#  define BOOST_NO_CXX11_HDR_TUPLE
+#  define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+#  define BOOST_NO_CXX11_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_HDR_FUNCTIONAL
 #endif
 
 //  C++0x headers in GCC 4.4.0 and later
 //
 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
-#  define BOOST_NO_0X_HDR_CHRONO
-#  define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-#  define BOOST_NO_0X_HDR_FORWARD_LIST
-#  define BOOST_NO_0X_HDR_INITIALIZER_LIST
-#  define BOOST_NO_0X_HDR_MUTEX
-#  define BOOST_NO_0X_HDR_RATIO
-#  define BOOST_NO_0X_HDR_SYSTEM_ERROR
-#  define BOOST_NO_0X_HDR_THREAD
+#  define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+#  define BOOST_NO_CXX11_HDR_FORWARD_LIST
+#  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#  define BOOST_NO_CXX11_HDR_MUTEX
+#  define BOOST_NO_CXX11_HDR_RATIO
+#  define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+#  define BOOST_NO_CXX11_SMART_PTR
+#else
+#  define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG 
+#  define BOOST_HAS_TR1_COMPLEX_OVERLOADS 
+#endif
+
+#if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) && (!defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) || !defined(BOOST_NO_CXX11_HDR_MUTEX))
+#  define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+#  define BOOST_NO_CXX11_HDR_MUTEX
 #endif
 
-//  C++0x headers not yet implemented
+//  C++0x features in GCC 4.5.0 and later
+//
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+#  define BOOST_NO_CXX11_NUMERIC_LIMITS
+#  define BOOST_NO_CXX11_HDR_FUTURE
+#  define BOOST_NO_CXX11_HDR_RANDOM
+#endif
+
+//  C++0x features in GCC 4.6.0 and later
+//
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+#  define BOOST_NO_CXX11_HDR_TYPEINDEX
+#endif
+
+//  C++0x features in GCC 4.7.0 and later
+//
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+// Note that although <chrono> existed prior to 4.7, "stead_clock" is spelled "monotonic_clock"
+// so 4.7.0 is the first truely conforming one.
+#  define BOOST_NO_CXX11_HDR_CHRONO
+#  define BOOST_NO_CXX11_ALLOCATOR
+#endif
+//  C++0x headers not yet (fully!) implemented
 //
-#  define BOOST_NO_0X_HDR_CODECVT
-#  define BOOST_NO_0X_HDR_CONCEPTS
-#  define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
-#  define BOOST_NO_0X_HDR_FUTURE
-#  define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
-#  define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
-#  define BOOST_NO_0X_HDR_TYPEINDEX
+#  define BOOST_NO_CXX11_HDR_THREAD
+#  define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+#  define BOOST_NO_CXX11_HDR_CODECVT
+#  define BOOST_NO_CXX11_ATOMIC_SMART_PTR
 
 //  --- end ---
diff --git a/ext/boost/config/stdlib/modena.hpp b/ext/boost/config/stdlib/modena.hpp
index 10792cd..b483b6e 100644
--- a/ext/boost/config/stdlib/modena.hpp
+++ b/ext/boost/config/stdlib/modena.hpp
@@ -24,29 +24,29 @@
 
 //  C++0x headers not yet implemented
 //
-#  define BOOST_NO_0X_HDR_ARRAY
-#  define BOOST_NO_0X_HDR_CHRONO
-#  define BOOST_NO_0X_HDR_CODECVT
-#  define BOOST_NO_0X_HDR_CONCEPTS
-#  define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-#  define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
-#  define BOOST_NO_0X_HDR_FORWARD_LIST
-#  define BOOST_NO_0X_HDR_FUTURE
-#  define BOOST_NO_0X_HDR_INITIALIZER_LIST
-#  define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
-#  define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
-#  define BOOST_NO_0X_HDR_MUTEX
-#  define BOOST_NO_0X_HDR_RANDOM
-#  define BOOST_NO_0X_HDR_RATIO
-#  define BOOST_NO_0X_HDR_REGEX
-#  define BOOST_NO_0X_HDR_SYSTEM_ERROR
-#  define BOOST_NO_0X_HDR_THREAD
-#  define BOOST_NO_0X_HDR_TUPLE
-#  define BOOST_NO_0X_HDR_TYPE_TRAITS
-#  define BOOST_NO_0X_HDR_TYPEINDEX
-#  define BOOST_NO_STD_UNORDERED        // deprecated; see following
-#  define BOOST_NO_0X_HDR_UNORDERED_MAP
-#  define BOOST_NO_0X_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_HDR_ARRAY
+#  define BOOST_NO_CXX11_HDR_CHRONO
+#  define BOOST_NO_CXX11_HDR_CODECVT
+#  define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+#  define BOOST_NO_CXX11_HDR_FORWARD_LIST
+#  define BOOST_NO_CXX11_HDR_FUTURE
+#  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#  define BOOST_NO_CXX11_HDR_MUTEX
+#  define BOOST_NO_CXX11_HDR_RANDOM
+#  define BOOST_NO_CXX11_HDR_RATIO
+#  define BOOST_NO_CXX11_HDR_REGEX
+#  define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+#  define BOOST_NO_CXX11_HDR_THREAD
+#  define BOOST_NO_CXX11_HDR_TUPLE
+#  define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+#  define BOOST_NO_CXX11_HDR_TYPEINDEX
+#  define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+#  define BOOST_NO_CXX11_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_NUMERIC_LIMITS
+#  define BOOST_NO_CXX11_ALLOCATOR
+#  define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+#  define BOOST_NO_CXX11_SMART_PTR
+#  define BOOST_NO_CXX11_HDR_FUNCTIONAL
 
 #define BOOST_STDLIB "Modena C++ standard library"
 
diff --git a/ext/boost/config/stdlib/msl.hpp b/ext/boost/config/stdlib/msl.hpp
index beb15de..4f9a2da 100644
--- a/ext/boost/config/stdlib/msl.hpp
+++ b/ext/boost/config/stdlib/msl.hpp
@@ -48,29 +48,29 @@
 
 //  C++0x headers not yet implemented
 //
-#  define BOOST_NO_0X_HDR_ARRAY
-#  define BOOST_NO_0X_HDR_CHRONO
-#  define BOOST_NO_0X_HDR_CODECVT
-#  define BOOST_NO_0X_HDR_CONCEPTS
-#  define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-#  define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
-#  define BOOST_NO_0X_HDR_FORWARD_LIST
-#  define BOOST_NO_0X_HDR_FUTURE
-#  define BOOST_NO_0X_HDR_INITIALIZER_LIST
-#  define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
-#  define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
-#  define BOOST_NO_0X_HDR_MUTEX
-#  define BOOST_NO_0X_HDR_RANDOM
-#  define BOOST_NO_0X_HDR_RATIO
-#  define BOOST_NO_0X_HDR_REGEX
-#  define BOOST_NO_0X_HDR_SYSTEM_ERROR
-#  define BOOST_NO_0X_HDR_THREAD
-#  define BOOST_NO_0X_HDR_TUPLE
-#  define BOOST_NO_0X_HDR_TYPE_TRAITS
-#  define BOOST_NO_0X_HDR_TYPEINDEX
-#  define BOOST_NO_STD_UNORDERED        // deprecated; see following
-#  define BOOST_NO_0X_HDR_UNORDERED_MAP
-#  define BOOST_NO_0X_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_HDR_ARRAY
+#  define BOOST_NO_CXX11_HDR_CHRONO
+#  define BOOST_NO_CXX11_HDR_CODECVT
+#  define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+#  define BOOST_NO_CXX11_HDR_FORWARD_LIST
+#  define BOOST_NO_CXX11_HDR_FUTURE
+#  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#  define BOOST_NO_CXX11_HDR_MUTEX
+#  define BOOST_NO_CXX11_HDR_RANDOM
+#  define BOOST_NO_CXX11_HDR_RATIO
+#  define BOOST_NO_CXX11_HDR_REGEX
+#  define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+#  define BOOST_NO_CXX11_HDR_THREAD
+#  define BOOST_NO_CXX11_HDR_TUPLE
+#  define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+#  define BOOST_NO_CXX11_HDR_TYPEINDEX
+#  define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+#  define BOOST_NO_CXX11_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_NUMERIC_LIMITS
+#  define BOOST_NO_CXX11_ALLOCATOR
+#  define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+#  define BOOST_NO_CXX11_SMART_PTR
+#  define BOOST_NO_CXX11_HDR_FUNCTIONAL
 
 #define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__)
 
diff --git a/ext/boost/config/stdlib/roguewave.hpp b/ext/boost/config/stdlib/roguewave.hpp
index 830c32e..cb80f57 100644
--- a/ext/boost/config/stdlib/roguewave.hpp
+++ b/ext/boost/config/stdlib/roguewave.hpp
@@ -10,6 +10,8 @@
 
 //  Rogue Wave std lib:
 
+#define BOOST_RW_STDLIB 1 
+
 #if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)
 #  include <boost/config/no_tr1/utility.hpp>
 #  if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)
@@ -152,29 +154,33 @@
 #  endif
 #endif
 
+#if _RWSTD_VER < 0x05000000
+#  define BOOST_NO_CXX11_HDR_ARRAY
+#endif
+// type_traits header is incomplete:
+#  define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+//
 //  C++0x headers not yet implemented
 //
-#  define BOOST_NO_0X_HDR_ARRAY
-#  define BOOST_NO_0X_HDR_CHRONO
-#  define BOOST_NO_0X_HDR_CODECVT
-#  define BOOST_NO_0X_HDR_CONCEPTS
-#  define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-#  define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
-#  define BOOST_NO_0X_HDR_FORWARD_LIST
-#  define BOOST_NO_0X_HDR_FUTURE
-#  define BOOST_NO_0X_HDR_INITIALIZER_LIST
-#  define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
-#  define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
-#  define BOOST_NO_0X_HDR_MUTEX
-#  define BOOST_NO_0X_HDR_RANDOM
-#  define BOOST_NO_0X_HDR_RATIO
-#  define BOOST_NO_0X_HDR_REGEX
-#  define BOOST_NO_0X_HDR_SYSTEM_ERROR
-#  define BOOST_NO_0X_HDR_THREAD
-#  define BOOST_NO_0X_HDR_TUPLE
-#  define BOOST_NO_0X_HDR_TYPE_TRAITS
-#  define BOOST_NO_0X_HDR_TYPEINDEX
-#  define BOOST_NO_STD_UNORDERED        // deprecated; see following
-#  define BOOST_NO_0X_HDR_UNORDERED_MAP
-#  define BOOST_NO_0X_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_HDR_CHRONO
+#  define BOOST_NO_CXX11_HDR_CODECVT
+#  define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+#  define BOOST_NO_CXX11_HDR_FORWARD_LIST
+#  define BOOST_NO_CXX11_HDR_FUTURE
+#  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#  define BOOST_NO_CXX11_HDR_MUTEX
+#  define BOOST_NO_CXX11_HDR_RANDOM
+#  define BOOST_NO_CXX11_HDR_RATIO
+#  define BOOST_NO_CXX11_HDR_REGEX
+#  define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+#  define BOOST_NO_CXX11_HDR_THREAD
+#  define BOOST_NO_CXX11_HDR_TUPLE
+#  define BOOST_NO_CXX11_HDR_TYPEINDEX
+#  define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+#  define BOOST_NO_CXX11_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_NUMERIC_LIMITS
+#  define BOOST_NO_CXX11_ALLOCATOR
+#  define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+#  define BOOST_NO_CXX11_SMART_PTR
+#  define BOOST_NO_CXX11_HDR_FUNCTIONAL
 
diff --git a/ext/boost/config/stdlib/sgi.hpp b/ext/boost/config/stdlib/sgi.hpp
index 293886b..ae9b6ad 100644
--- a/ext/boost/config/stdlib/sgi.hpp
+++ b/ext/boost/config/stdlib/sgi.hpp
@@ -40,6 +40,17 @@
 #  define BOOST_NO_STRINGSTREAM
 #endif
 
+// Apple doesn't seem to reliably defined a *unix* macro
+#if !defined(CYGWIN) && (  defined(__unix__)  \
+                        || defined(__unix)    \
+                        || defined(unix)      \
+                        || defined(__APPLE__) \
+                        || defined(__APPLE)   \
+                        || defined(APPLE))
+#  include <unistd.h>
+#endif
+
+
 //
 // Assume no std::locale without own iostreams (this may be an
 // incorrect assumption in some cases):
@@ -107,29 +118,29 @@
 
 //  C++0x headers not yet implemented
 //
-#  define BOOST_NO_0X_HDR_ARRAY
-#  define BOOST_NO_0X_HDR_CHRONO
-#  define BOOST_NO_0X_HDR_CODECVT
-#  define BOOST_NO_0X_HDR_CONCEPTS
-#  define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-#  define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
-#  define BOOST_NO_0X_HDR_FORWARD_LIST
-#  define BOOST_NO_0X_HDR_FUTURE
-#  define BOOST_NO_0X_HDR_INITIALIZER_LIST
-#  define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
-#  define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
-#  define BOOST_NO_0X_HDR_MUTEX
-#  define BOOST_NO_0X_HDR_RANDOM
-#  define BOOST_NO_0X_HDR_RATIO
-#  define BOOST_NO_0X_HDR_REGEX
-#  define BOOST_NO_0X_HDR_SYSTEM_ERROR
-#  define BOOST_NO_0X_HDR_THREAD
-#  define BOOST_NO_0X_HDR_TUPLE
-#  define BOOST_NO_0X_HDR_TYPE_TRAITS
-#  define BOOST_NO_0X_HDR_TYPEINDEX
-#  define BOOST_NO_STD_UNORDERED        // deprecated; see following
-#  define BOOST_NO_0X_HDR_UNORDERED_MAP
-#  define BOOST_NO_0X_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_HDR_ARRAY
+#  define BOOST_NO_CXX11_HDR_CHRONO
+#  define BOOST_NO_CXX11_HDR_CODECVT
+#  define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+#  define BOOST_NO_CXX11_HDR_FORWARD_LIST
+#  define BOOST_NO_CXX11_HDR_FUTURE
+#  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#  define BOOST_NO_CXX11_HDR_MUTEX
+#  define BOOST_NO_CXX11_HDR_RANDOM
+#  define BOOST_NO_CXX11_HDR_RATIO
+#  define BOOST_NO_CXX11_HDR_REGEX
+#  define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+#  define BOOST_NO_CXX11_HDR_THREAD
+#  define BOOST_NO_CXX11_HDR_TUPLE
+#  define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+#  define BOOST_NO_CXX11_HDR_TYPEINDEX
+#  define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+#  define BOOST_NO_CXX11_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_NUMERIC_LIMITS
+#  define BOOST_NO_CXX11_ALLOCATOR
+#  define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+#  define BOOST_NO_CXX11_SMART_PTR
+#  define BOOST_NO_CXX11_HDR_FUNCTIONAL
 
 #define BOOST_STDLIB "SGI standard library"
 
diff --git a/ext/boost/config/stdlib/stlport.hpp b/ext/boost/config/stdlib/stlport.hpp
index bb6fe13..bcc30b9 100644
--- a/ext/boost/config/stdlib/stlport.hpp
+++ b/ext/boost/config/stdlib/stlport.hpp
@@ -16,6 +16,16 @@
 #  endif
 #endif
 
+// Apple doesn't seem to reliably defined a *unix* macro
+#if !defined(CYGWIN) && (  defined(__unix__)  \
+                        || defined(__unix)    \
+                        || defined(unix)      \
+                        || defined(__APPLE__) \
+                        || defined(__APPLE)   \
+                        || defined(APPLE))
+#  include <unistd.h>
+#endif
+
 //
 // __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
 // for versions prior to 4.1(beta)
@@ -61,10 +71,6 @@
 #  endif
 #endif
 
-#if defined(_STLPORT_VERSION) && ((_STLPORT_VERSION < 0x500) || (_STLPORT_VERSION >= 0x520))
-#  define BOOST_NO_STD_UNORDERED
-#endif
-
 #if defined(_STLPORT_VERSION) && (_STLPORT_VERSION >= 0x520)
 #  define BOOST_HAS_TR1_UNORDERED_SET
 #  define BOOST_HAS_TR1_UNORDERED_MAP
@@ -202,29 +208,29 @@ namespace boost { using std::min; using std::max; }
 
 //  C++0x headers not yet implemented
 //
-#  define BOOST_NO_0X_HDR_ARRAY
-#  define BOOST_NO_0X_HDR_CHRONO
-#  define BOOST_NO_0X_HDR_CODECVT
-#  define BOOST_NO_0X_HDR_CONCEPTS
-#  define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-#  define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
-#  define BOOST_NO_0X_HDR_FORWARD_LIST
-#  define BOOST_NO_0X_HDR_FUTURE
-#  define BOOST_NO_0X_HDR_INITIALIZER_LIST
-#  define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
-#  define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
-#  define BOOST_NO_0X_HDR_MUTEX
-#  define BOOST_NO_0X_HDR_RANDOM
-#  define BOOST_NO_0X_HDR_RATIO
-#  define BOOST_NO_0X_HDR_REGEX
-#  define BOOST_NO_0X_HDR_SYSTEM_ERROR
-#  define BOOST_NO_0X_HDR_THREAD
-#  define BOOST_NO_0X_HDR_TUPLE
-#  define BOOST_NO_0X_HDR_TYPE_TRAITS
-#  define BOOST_NO_0X_HDR_TYPEINDEX
-#  define BOOST_NO_STD_UNORDERED        // deprecated; see following
-#  define BOOST_NO_0X_HDR_UNORDERED_MAP
-#  define BOOST_NO_0X_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_HDR_ARRAY
+#  define BOOST_NO_CXX11_HDR_CHRONO
+#  define BOOST_NO_CXX11_HDR_CODECVT
+#  define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+#  define BOOST_NO_CXX11_HDR_FORWARD_LIST
+#  define BOOST_NO_CXX11_HDR_FUTURE
+#  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#  define BOOST_NO_CXX11_HDR_MUTEX
+#  define BOOST_NO_CXX11_HDR_RANDOM
+#  define BOOST_NO_CXX11_HDR_RATIO
+#  define BOOST_NO_CXX11_HDR_REGEX
+#  define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+#  define BOOST_NO_CXX11_HDR_THREAD
+#  define BOOST_NO_CXX11_HDR_TUPLE
+#  define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+#  define BOOST_NO_CXX11_HDR_TYPEINDEX
+#  define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+#  define BOOST_NO_CXX11_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_NUMERIC_LIMITS
+#  define BOOST_NO_CXX11_ALLOCATOR
+#  define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+#  define BOOST_NO_CXX11_SMART_PTR
+#  define BOOST_NO_CXX11_HDR_FUNCTIONAL
 
 #define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)
 
diff --git a/ext/boost/config/stdlib/vacpp.hpp b/ext/boost/config/stdlib/vacpp.hpp
index 3504971..9d16946 100644
--- a/ext/boost/config/stdlib/vacpp.hpp
+++ b/ext/boost/config/stdlib/vacpp.hpp
@@ -12,31 +12,41 @@
 #define BOOST_HAS_MACRO_USE_FACET
 #define BOOST_NO_STD_MESSAGES
 
+// Apple doesn't seem to reliably defined a *unix* macro
+#if !defined(CYGWIN) && (  defined(__unix__)  \
+                        || defined(__unix)    \
+                        || defined(unix)      \
+                        || defined(__APPLE__) \
+                        || defined(__APPLE)   \
+                        || defined(APPLE))
+#  include <unistd.h>
+#endif
+
 //  C++0x headers not yet implemented
 //
-#  define BOOST_NO_0X_HDR_ARRAY
-#  define BOOST_NO_0X_HDR_CHRONO
-#  define BOOST_NO_0X_HDR_CODECVT
-#  define BOOST_NO_0X_HDR_CONCEPTS
-#  define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-#  define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
-#  define BOOST_NO_0X_HDR_FORWARD_LIST
-#  define BOOST_NO_0X_HDR_FUTURE
-#  define BOOST_NO_0X_HDR_INITIALIZER_LIST
-#  define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
-#  define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
-#  define BOOST_NO_0X_HDR_MUTEX
-#  define BOOST_NO_0X_HDR_RANDOM
-#  define BOOST_NO_0X_HDR_RATIO
-#  define BOOST_NO_0X_HDR_REGEX
-#  define BOOST_NO_0X_HDR_SYSTEM_ERROR
-#  define BOOST_NO_0X_HDR_THREAD
-#  define BOOST_NO_0X_HDR_TUPLE
-#  define BOOST_NO_0X_HDR_TYPE_TRAITS
-#  define BOOST_NO_0X_HDR_TYPEINDEX
-#  define BOOST_NO_STD_UNORDERED        // deprecated; see following
-#  define BOOST_NO_0X_HDR_UNORDERED_MAP
-#  define BOOST_NO_0X_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_HDR_ARRAY
+#  define BOOST_NO_CXX11_HDR_CHRONO
+#  define BOOST_NO_CXX11_HDR_CODECVT
+#  define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+#  define BOOST_NO_CXX11_HDR_FORWARD_LIST
+#  define BOOST_NO_CXX11_HDR_FUTURE
+#  define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#  define BOOST_NO_CXX11_HDR_MUTEX
+#  define BOOST_NO_CXX11_HDR_RANDOM
+#  define BOOST_NO_CXX11_HDR_RATIO
+#  define BOOST_NO_CXX11_HDR_REGEX
+#  define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+#  define BOOST_NO_CXX11_HDR_THREAD
+#  define BOOST_NO_CXX11_HDR_TUPLE
+#  define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+#  define BOOST_NO_CXX11_HDR_TYPEINDEX
+#  define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+#  define BOOST_NO_CXX11_HDR_UNORDERED_SET
+#  define BOOST_NO_CXX11_NUMERIC_LIMITS
+#  define BOOST_NO_CXX11_ALLOCATOR
+#  define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+#  define BOOST_NO_CXX11_SMART_PTR
+#  define BOOST_NO_CXX11_HDR_FUNCTIONAL
 
 #define BOOST_STDLIB "Visual Age default standard library"
 
diff --git a/ext/boost/config/suffix.hpp b/ext/boost/config/suffix.hpp
index 3408d22..2d24813 100644
--- a/ext/boost/config/suffix.hpp
+++ b/ext/boost/config/suffix.hpp
@@ -25,6 +25,14 @@
 #ifndef BOOST_CONFIG_SUFFIX_HPP
 #define BOOST_CONFIG_SUFFIX_HPP
 
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+//
+// Some GCC-4.x versions issue warnings even when __extension__ is used,
+// so use this as a workaround:
+//
+#pragma GCC system_header
+#endif
+
 //
 // ensure that visibility macros are always defined, thus symplifying use
 //
@@ -96,13 +104,6 @@
 #endif
 
 //
-// Normalize BOOST_NO_STATIC_ASSERT and (depricated) BOOST_HAS_STATIC_ASSERT:
-//
-#if !defined(BOOST_NO_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT)
-#  define BOOST_HAS_STATIC_ASSERT
-#endif
-
-//
 // if there is no __int64 then there is no specialisation
 // for numeric_limits<__int64> either:
 //
@@ -326,21 +327,6 @@
 #  define BOOST_HASH_MAP_HEADER <hash_map>
 #endif
 
-//
-// Set BOOST_NO_INITIALIZER_LISTS if there is no library support.
-//
-
-#if defined(BOOST_NO_0X_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)
-#  define BOOST_NO_INITIALIZER_LISTS
-#endif
-
-//
-// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_RVALUE_REFERENCES is not defined
-//
-#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS)
-#define BOOST_HAS_RVALUE_REFS
-#endif
-
 //  BOOST_HAS_ABI_HEADERS
 //  This macro gets set if we have headers that fix the ABI,
 //  and prevent ODR violations when linking to external libraries:
@@ -361,7 +347,7 @@
 //  works as expected with standard conforming compilers.  The resulting
 //  double inclusion of <cstddef> is harmless.
 
-# ifdef BOOST_NO_STDC_NAMESPACE
+# if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus)
 #   include <cstddef>
     namespace std { using ::ptrdiff_t; using ::size_t; }
 # endif
@@ -380,7 +366,7 @@
 
 //  BOOST_NO_STD_MIN_MAX workaround  -----------------------------------------//
 
-#  ifdef BOOST_NO_STD_MIN_MAX
+#  if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus)
 
 namespace std {
   template <class _Tp>
@@ -491,7 +477,7 @@ namespace std {
 // but it's use may generate either warnings (with -ansi), or errors
 // (with -pedantic -ansi) unless it's use is prefixed by __extension__
 //
-#if defined(BOOST_HAS_LONG_LONG)
+#if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus)
 namespace boost{
 #  ifdef __GNUC__
    __extension__ typedef long long long_long_type;
@@ -545,7 +531,7 @@ namespace boost{
 //
 
 
-#if defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
+#if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) && defined(__cplusplus)
 
 #  include "boost/type.hpp"
 #  include "boost/non_type.hpp"
@@ -583,9 +569,9 @@ namespace boost{
 
 // When BOOST_NO_STD_TYPEINFO is defined, we can just import
 // the global definition into std namespace:
-#ifdef BOOST_NO_STD_TYPEINFO
+#if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus)
 #include <typeinfo>
-namespace std{ using ::typeinfo; }
+namespace std{ using ::type_info; }
 #endif
 
 // ---------------------------------------------------------------------------//
@@ -635,5 +621,287 @@ namespace std{ using ::typeinfo; }
 #  ifndef BOOST_GPU_ENABLED
 #  define BOOST_GPU_ENABLED 
 #  endif
+
+// BOOST_FORCEINLINE ---------------------------------------------//
+// Macro to use in place of 'inline' to force a function to be inline
+#if !defined(BOOST_FORCEINLINE)
+#  if defined(_MSC_VER)
+#    define BOOST_FORCEINLINE __forceinline
+#  elif defined(__GNUC__) && __GNUC__ > 3
+#    define BOOST_FORCEINLINE inline __attribute__ ((always_inline))
+#  else
+#    define BOOST_FORCEINLINE inline
+#  endif
+#endif
+
+//
+// Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined
+//
+#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
+#define	BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE
+#endif
+
+//  -------------------- Deprecated macros for 1.50 ---------------------------
+//  These will go away in a future release
+
+//  Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP
+//           instead of BOOST_NO_STD_UNORDERED
+#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET)
+# ifndef BOOST_NO_STD_UNORDERED
+#  define BOOST_NO_STD_UNORDERED
+# endif
+#endif
+
+//  Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS
+#if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)
+#  define BOOST_NO_INITIALIZER_LISTS
+#endif
+
+//  Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY
+#if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_BOOST_NO_0X_HDR_ARRAY)
+#  define BOOST_NO_0X_HDR_ARRAY
+#endif
+//  Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO
+#if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO)
+#  define BOOST_NO_0X_HDR_CHRONO
+#endif
+//  Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT
+#if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT)
+#  define BOOST_NO_0X_HDR_CODECVT
+#endif
+//  Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE
+#if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE)
+#  define BOOST_NO_0X_HDR_CONDITION_VARIABLE
+#endif
+//  Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST
+#if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST)
+#  define BOOST_NO_0X_HDR_FORWARD_LIST
+#endif
+//  Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE
+#if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE)
+#  define BOOST_NO_0X_HDR_FUTURE
+#endif
+
+//  Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST 
+//  instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS
+#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST
+#  define BOOST_NO_0X_HDR_INITIALIZER_LIST
+# endif
+# ifndef BOOST_NO_INITIALIZER_LISTS
+#  define BOOST_NO_INITIALIZER_LISTS
+# endif
+#endif
+
+//  Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX
+#if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX)
+#  define BOOST_NO_0X_HDR_MUTEX
+#endif
+//  Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM
+#if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM)
+#  define BOOST_NO_0X_HDR_RANDOM
+#endif
+//  Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO
+#if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO)
+#  define BOOST_NO_0X_HDR_RATIO
+#endif
+//  Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX
+#if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX)
+#  define BOOST_NO_0X_HDR_REGEX
+#endif
+//  Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR
+#if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR)
+#  define BOOST_NO_0X_HDR_SYSTEM_ERROR
+#endif
+//  Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD
+#if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD)
+#  define BOOST_NO_0X_HDR_THREAD
+#endif
+//  Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE
+#if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE)
+#  define BOOST_NO_0X_HDR_TUPLE
+#endif
+//  Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS
+#if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS)
+#  define BOOST_NO_0X_HDR_TYPE_TRAITS
+#endif
+//  Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX
+#if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX)
+#  define BOOST_NO_0X_HDR_TYPEINDEX
+#endif
+//  Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP
+#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP)
+#  define BOOST_NO_0X_HDR_UNORDERED_MAP
+#endif
+//  Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET
+#if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET)
+#  define BOOST_NO_0X_HDR_UNORDERED_SET
 #endif
 
+//  ------------------ End of deprecated macros for 1.50 ---------------------------
+
+//  -------------------- Deprecated macros for 1.51 ---------------------------
+//  These will go away in a future release
+
+//  Use     BOOST_NO_CXX11_AUTO_DECLARATIONS instead of   BOOST_NO_AUTO_DECLARATIONS
+#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_AUTO_DECLARATIONS)
+#  define BOOST_NO_AUTO_DECLARATIONS
+#endif
+//  Use     BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS instead of   BOOST_NO_AUTO_MULTIDECLARATIONS
+#if defined(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS) && !defined(BOOST_NO_AUTO_MULTIDECLARATIONS)
+#  define BOOST_NO_AUTO_MULTIDECLARATIONS
+#endif
+//  Use     BOOST_NO_CXX11_CHAR16_T instead of   BOOST_NO_CHAR16_T
+#if defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CHAR16_T)
+#  define BOOST_NO_CHAR16_T
+#endif
+//  Use     BOOST_NO_CXX11_CHAR32_T instead of   BOOST_NO_CHAR32_T
+#if defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CHAR32_T)
+#  define BOOST_NO_CHAR32_T
+#endif
+//  Use     BOOST_NO_CXX11_TEMPLATE_ALIASES instead of   BOOST_NO_TEMPLATE_ALIASES
+#if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_TEMPLATE_ALIASES)
+#  define BOOST_NO_TEMPLATE_ALIASES
+#endif
+//  Use     BOOST_NO_CXX11_CONSTEXPR instead of   BOOST_NO_CONSTEXPR
+#if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CONSTEXPR)
+#  define BOOST_NO_CONSTEXPR
+#endif
+//  Use     BOOST_NO_CXX11_DECLTYPE_N3276 instead of   BOOST_NO_DECLTYPE_N3276
+#if defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_DECLTYPE_N3276)
+#  define BOOST_NO_DECLTYPE_N3276
+#endif
+//  Use     BOOST_NO_CXX11_DECLTYPE instead of   BOOST_NO_DECLTYPE
+#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE)
+#  define BOOST_NO_DECLTYPE
+#endif
+//  Use     BOOST_NO_CXX11_DEFAULTED_FUNCTIONS instead of   BOOST_NO_DEFAULTED_FUNCTIONS
+#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_DEFAULTED_FUNCTIONS)
+#  define BOOST_NO_DEFAULTED_FUNCTIONS
+#endif
+//  Use     BOOST_NO_CXX11_DELETED_FUNCTIONS instead of   BOOST_NO_DELETED_FUNCTIONS
+#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_DELETED_FUNCTIONS)
+#  define BOOST_NO_DELETED_FUNCTIONS
+#endif
+//  Use     BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS instead of   BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS)
+#  define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#endif
+//  Use     BOOST_NO_CXX11_EXTERN_TEMPLATE instead of   BOOST_NO_EXTERN_TEMPLATE
+#if defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) && !defined(BOOST_NO_EXTERN_TEMPLATE)
+#  define BOOST_NO_EXTERN_TEMPLATE
+#endif
+//  Use     BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS instead of   BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#if defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
+#  define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#endif
+//  Use     BOOST_NO_CXX11_LAMBDAS instead of   BOOST_NO_LAMBDAS
+#if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS)
+#  define BOOST_NO_LAMBDAS
+#endif
+//  Use     BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS instead of   BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#if defined(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS) && !defined(BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS)
+#  define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#endif
+//  Use     BOOST_NO_CXX11_NOEXCEPT instead of   BOOST_NO_NOEXCEPT
+#if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT)
+#  define BOOST_NO_NOEXCEPT
+#endif
+//  Use     BOOST_NO_CXX11_NULLPTR instead of   BOOST_NO_NULLPTR
+#if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR)
+#  define BOOST_NO_NULLPTR
+#endif
+//  Use     BOOST_NO_CXX11_RAW_LITERALS instead of   BOOST_NO_RAW_LITERALS
+#if defined(BOOST_NO_CXX11_RAW_LITERALS) && !defined(BOOST_NO_RAW_LITERALS)
+#  define BOOST_NO_RAW_LITERALS
+#endif
+//  Use     BOOST_NO_CXX11_RVALUE_REFERENCES instead of   BOOST_NO_RVALUE_REFERENCES
+#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_RVALUE_REFERENCES)
+#  define BOOST_NO_RVALUE_REFERENCES
+#endif
+//  Use     BOOST_NO_CXX11_SCOPED_ENUMS instead of   BOOST_NO_SCOPED_ENUMS
+#if defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_NO_SCOPED_ENUMS)
+#  define BOOST_NO_SCOPED_ENUMS
+#endif
+//  Use     BOOST_NO_CXX11_STATIC_ASSERT instead of   BOOST_NO_STATIC_ASSERT
+#if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT)
+#  define BOOST_NO_STATIC_ASSERT
+#endif
+//  Use     BOOST_NO_CXX11_STD_UNORDERD instead of   BOOST_NO_STD_UNORDERD
+#if defined(BOOST_NO_CXX11_STD_UNORDERD) && !defined(BOOST_NO_STD_UNORDERD)
+#  define BOOST_NO_STD_UNORDERD
+#endif
+//  Use     BOOST_NO_CXX11_UNICODE_LITERALS instead of   BOOST_NO_UNICODE_LITERALS
+#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS)
+#  define BOOST_NO_UNICODE_LITERALS
+#endif
+//  Use     BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead of   BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX)
+#  define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#endif
+//  Use     BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of   BOOST_NO_VARIADIC_TEMPLATES
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#  define BOOST_NO_VARIADIC_TEMPLATES
+#endif
+//  Use     BOOST_NO_CXX11_VARIADIC_MACROS instead of   BOOST_NO_VARIADIC_MACROS
+#if defined(BOOST_NO_CXX11_VARIADIC_MACROS) && !defined(BOOST_NO_VARIADIC_MACROS)
+#  define BOOST_NO_VARIADIC_MACROS
+#endif
+//  Use     BOOST_NO_CXX11_NUMERIC_LIMITS instead of   BOOST_NO_NUMERIC_LIMITS_LOWEST
+#if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST)
+#  define BOOST_NO_NUMERIC_LIMITS_LOWEST
+#endif
+//  ------------------ End of deprecated macros for 1.51 ---------------------------
+
+
+
+//
+// Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR
+// These aid the transition to C++11 while still supporting C++03 compilers
+//
+#ifdef BOOST_NO_NOEXCEPT
+#  define BOOST_NOEXCEPT
+#  define BOOST_NOEXCEPT_IF(Predicate)
+#  define BOOST_NOEXCEPT_EXPR(Expression) false
+#else
+#  define BOOST_NOEXCEPT noexcept
+#  define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
+#  define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
+#endif
+
+//
+// Normalize BOOST_NO_STATIC_ASSERT and (depricated) BOOST_HAS_STATIC_ASSERT:
+//
+#if !defined(BOOST_NO_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT)
+#  define BOOST_HAS_STATIC_ASSERT
+#endif
+
+//
+// constexpr workarounds
+// 
+#if defined(BOOST_NO_CONSTEXPR)
+#define BOOST_CONSTEXPR
+#define BOOST_CONSTEXPR_OR_CONST const
+#else
+#define BOOST_CONSTEXPR constexpr
+#define BOOST_CONSTEXPR_OR_CONST constexpr
+#endif
+
+#define BOOST_STATIC_CONSTEXPR  static BOOST_CONSTEXPR_OR_CONST
+
+//
+// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_RVALUE_REFERENCES is not defined
+//
+#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS)
+#define BOOST_HAS_RVALUE_REFS
+#endif
+
+//
+// Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_VARIADIC_TEMPLATES is not defined
+//
+#if !defined(BOOST_NO_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL)
+#define BOOST_HAS_VARIADIC_TMPL
+#endif
+
+
+#endif
diff --git a/ext/boost/config/warning_disable.hpp b/ext/boost/config/warning_disable.hpp
index 26ff132..fea8e82 100644
--- a/ext/boost/config/warning_disable.hpp
+++ b/ext/boost/config/warning_disable.hpp
@@ -23,7 +23,7 @@
 //  Note that THIS HEADER MUST NOT INCLUDE ANY OTHER HEADERS:
 //  not even std library ones!  Doing so may turn the warning
 //  off too late to be of any use.  For example the VC++ C4996
-//  warning can be omitted from <iosfwd> if that header is included
+//  warning can be emitted from <iosfwd> if that header is included
 //  before or by this one :-(
 //
 
diff --git a/ext/boost/container/container_fwd.hpp b/ext/boost/container/container_fwd.hpp
new file mode 100644
index 0000000..bdefd81
--- /dev/null
+++ b/ext/boost/container/container_fwd.hpp
@@ -0,0 +1,173 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP
+#define BOOST_CONTAINER_CONTAINER_FWD_HPP
+
+#if (defined _MSC_VER) && (_MSC_VER >= 1200)
+#  pragma once
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+//                        Standard predeclarations
+//////////////////////////////////////////////////////////////////////////////
+
+/// @cond
+
+namespace boost{
+namespace intrusive{
+   //Create namespace to avoid compilation errors
+}}
+
+namespace boost{ namespace container{ namespace container_detail{
+
+namespace bi = boost::intrusive;
+
+}}}
+
+#include <utility>
+#include <memory>
+#include <functional>
+#include <iosfwd>
+#include <string>
+
+/// @endcond
+
+//////////////////////////////////////////////////////////////////////////////
+//                             Containers
+//////////////////////////////////////////////////////////////////////////////
+
+namespace boost {
+namespace container {
+
+//vector class
+template <class T
+         ,class Allocator = std::allocator<T> >
+class vector;
+
+//vector class
+template <class T
+         ,class Allocator = std::allocator<T> >
+class stable_vector;
+
+//vector class
+template <class T
+         ,class Allocator = std::allocator<T> >
+class deque;
+
+//list class
+template <class T
+         ,class Allocator = std::allocator<T> >
+class list;
+
+//slist class
+template <class T
+         ,class Allocator = std::allocator<T> >
+class slist;
+
+//set class
+template <class Key
+         ,class Compare  = std::less<Key>
+         ,class Allocator = std::allocator<Key> >
+class set;
+
+//multiset class
+template <class Key
+         ,class Compare  = std::less<Key>
+         ,class Allocator = std::allocator<Key> >
+class multiset;
+
+//map class
+template <class Key
+         ,class T
+         ,class Compare  = std::less<Key>
+         ,class Allocator = std::allocator<std::pair<const Key, T> > >
+class map;
+
+//multimap class
+template <class Key
+         ,class T
+         ,class Compare  = std::less<Key>
+         ,class Allocator = std::allocator<std::pair<const Key, T> > >
+class multimap;
+
+//flat_set class
+template <class Key
+         ,class Compare  = std::less<Key>
+         ,class Allocator = std::allocator<Key> >
+class flat_set;
+
+//flat_multiset class
+template <class Key
+         ,class Compare  = std::less<Key>
+         ,class Allocator = std::allocator<Key> >
+class flat_multiset;
+
+//flat_map class
+template <class Key
+         ,class T
+         ,class Compare  = std::less<Key>
+         ,class Allocator = std::allocator<std::pair<Key, T> > >
+class flat_map;
+
+//flat_multimap class
+template <class Key
+         ,class T
+         ,class Compare  = std::less<Key>
+         ,class Allocator = std::allocator<std::pair<Key, T> > >
+class flat_multimap;
+
+//basic_string class
+template <class CharT
+         ,class Traits = std::char_traits<CharT>
+         ,class Allocator  = std::allocator<CharT> >
+class basic_string;
+
+//! Type used to tag that the input range is
+//! guaranteed to be ordered
+struct ordered_range_t
+{};
+
+//! Type used to tag that the input range is
+//! guaranteed to be ordered and unique
+struct ordered_unique_range_t
+   : public ordered_range_t
+{};
+
+//! Value used to tag that the input range is
+//! guaranteed to be ordered
+static const ordered_range_t ordered_range = ordered_range_t();
+
+//! Value used to tag that the input range is
+//! guaranteed to be ordered and unique
+static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t();
+
+/// @cond
+
+namespace detail_really_deep_namespace {
+
+//Otherwise, gcc issues a warning of previously defined
+//anonymous_instance and unique_instance
+struct dummy
+{
+   dummy()
+   {
+      (void)ordered_range;
+      (void)ordered_unique_range;
+   }
+};
+
+}  //detail_really_deep_namespace {
+
+/// @endcond
+
+}}  //namespace boost { namespace container {
+
+#endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP
diff --git a/ext/boost/cstdint.hpp b/ext/boost/cstdint.hpp
index db7f86e..ccb6768 100644
--- a/ext/boost/cstdint.hpp
+++ b/ext/boost/cstdint.hpp
@@ -137,10 +137,8 @@ namespace boost
 
 } // namespace boost
 
-#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__) || \
-      defined(__SOLARIS9__) || defined(__NetBSD__)
-// FreeBSD, Tru64 and Solaris 9 have an <inttypes.h> that contains much of 
-// what we need.
+#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__) || defined(__VMS) || defined(__SOLARIS9__) || defined(__NetBSD__)
+// FreeBSD and Tru64 have an <inttypes.h> that contains much of what we need.
 # include <inttypes.h>
 
 namespace boost {
@@ -258,20 +256,27 @@ namespace boost
 
 //  32-bit types  -----------------------------------------------------------//
 
-# if ULONG_MAX == 0xffffffff
-     typedef long            int32_t;
-     typedef long            int_least32_t;
-     typedef long            int_fast32_t;
-     typedef unsigned long   uint32_t;
-     typedef unsigned long   uint_least32_t;
-     typedef unsigned long   uint_fast32_t;
-# elif UINT_MAX == 0xffffffff
+# if UINT_MAX == 0xffffffff
      typedef int             int32_t;
      typedef int             int_least32_t;
      typedef int             int_fast32_t;
      typedef unsigned int    uint32_t;
      typedef unsigned int    uint_least32_t;
      typedef unsigned int    uint_fast32_t;
+# elif (USHRT_MAX == 0xffffffff)
+     typedef short             int32_t;
+     typedef short             int_least32_t;
+     typedef short             int_fast32_t;
+     typedef unsigned short    uint32_t;
+     typedef unsigned short    uint_least32_t;
+     typedef unsigned short    uint_fast32_t;
+# elif ULONG_MAX == 0xffffffff
+     typedef long            int32_t;
+     typedef long            int_least32_t;
+     typedef long            int_fast32_t;
+     typedef unsigned long   uint32_t;
+     typedef unsigned long   uint_least32_t;
+     typedef unsigned long   uint_fast32_t;
 # elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__) 
       // Integers are 64 bits on the MTA / XMT 
       typedef __int32           int32_t; 
diff --git a/ext/boost/current_function.hpp b/ext/boost/current_function.hpp
index aa5756e..cb36e35 100644
--- a/ext/boost/current_function.hpp
+++ b/ext/boost/current_function.hpp
@@ -28,7 +28,7 @@ namespace detail
 inline void current_function_helper()
 {
 
-#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600))
+#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__)
 
 # define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__
 
@@ -65,3 +65,4 @@ inline void current_function_helper()
 } // namespace boost
 
 #endif // #ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED
+
diff --git a/ext/boost/date_time/._adjust_functors.hpp b/ext/boost/date_time/._adjust_functors.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._adjust_functors.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._constrained_value.hpp b/ext/boost/date_time/._constrained_value.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._constrained_value.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._date.hpp b/ext/boost/date_time/._date.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._date.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._date_clock_device.hpp b/ext/boost/date_time/._date_clock_device.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._date_clock_device.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._date_defs.hpp b/ext/boost/date_time/._date_defs.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._date_defs.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._date_duration.hpp b/ext/boost/date_time/._date_duration.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._date_duration.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._date_duration_types.hpp b/ext/boost/date_time/._date_duration_types.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._date_duration_types.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._date_facet.hpp b/ext/boost/date_time/._date_facet.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._date_facet.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._date_format_simple.hpp b/ext/boost/date_time/._date_format_simple.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._date_format_simple.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._date_formatting_limited.hpp b/ext/boost/date_time/._date_formatting_limited.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._date_formatting_limited.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._date_formatting_locales.hpp b/ext/boost/date_time/._date_formatting_locales.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._date_formatting_locales.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._date_generator_formatter.hpp b/ext/boost/date_time/._date_generator_formatter.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._date_generator_formatter.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._date_generator_parser.hpp b/ext/boost/date_time/._date_generator_parser.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._date_generator_parser.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._date_generators.hpp b/ext/boost/date_time/._date_generators.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._date_generators.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._date_iterator.hpp b/ext/boost/date_time/._date_iterator.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._date_iterator.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._date_names_put.hpp b/ext/boost/date_time/._date_names_put.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._date_names_put.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._date_parsing.hpp b/ext/boost/date_time/._date_parsing.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._date_parsing.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._dst_rules.hpp b/ext/boost/date_time/._dst_rules.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._dst_rules.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._format_date_parser.hpp b/ext/boost/date_time/._format_date_parser.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._format_date_parser.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._gregorian_calendar.hpp b/ext/boost/date_time/._gregorian_calendar.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._gregorian_calendar.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._int_adapter.hpp b/ext/boost/date_time/._int_adapter.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._int_adapter.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._iso_format.hpp b/ext/boost/date_time/._iso_format.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._iso_format.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._locale_config.hpp b/ext/boost/date_time/._locale_config.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._locale_config.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._microsec_time_clock.hpp b/ext/boost/date_time/._microsec_time_clock.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._microsec_time_clock.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._parse_format_base.hpp b/ext/boost/date_time/._parse_format_base.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._parse_format_base.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._period.hpp b/ext/boost/date_time/._period.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._period.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._period_formatter.hpp b/ext/boost/date_time/._period_formatter.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._period_formatter.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._period_parser.hpp b/ext/boost/date_time/._period_parser.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._period_parser.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._special_defs.hpp b/ext/boost/date_time/._special_defs.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._special_defs.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._special_values_formatter.hpp b/ext/boost/date_time/._special_values_formatter.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._special_values_formatter.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._special_values_parser.hpp b/ext/boost/date_time/._special_values_parser.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._special_values_parser.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._string_convert.hpp b/ext/boost/date_time/._string_convert.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._string_convert.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._string_parse_tree.hpp b/ext/boost/date_time/._string_parse_tree.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._string_parse_tree.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._time.hpp b/ext/boost/date_time/._time.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._time.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._time_clock.hpp b/ext/boost/date_time/._time_clock.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._time_clock.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._time_defs.hpp b/ext/boost/date_time/._time_defs.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._time_defs.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._time_duration.hpp b/ext/boost/date_time/._time_duration.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._time_duration.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._time_formatting_streams.hpp b/ext/boost/date_time/._time_formatting_streams.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._time_formatting_streams.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._time_iterator.hpp b/ext/boost/date_time/._time_iterator.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._time_iterator.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._time_parsing.hpp b/ext/boost/date_time/._time_parsing.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._time_parsing.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._time_resolution_traits.hpp b/ext/boost/date_time/._time_resolution_traits.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._time_resolution_traits.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._time_system_counted.hpp b/ext/boost/date_time/._time_system_counted.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._time_system_counted.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._time_system_split.hpp b/ext/boost/date_time/._time_system_split.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._time_system_split.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._wrapping_int.hpp b/ext/boost/date_time/._wrapping_int.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._wrapping_int.hpp and /dev/null differ
diff --git a/ext/boost/date_time/._year_month_day.hpp b/ext/boost/date_time/._year_month_day.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/._year_month_day.hpp and /dev/null differ
diff --git a/ext/boost/date_time/adjust_functors.hpp b/ext/boost/date_time/adjust_functors.hpp
index 7854ae4..dde8ca8 100644
--- a/ext/boost/date_time/adjust_functors.hpp
+++ b/ext/boost/date_time/adjust_functors.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/date.hpp"
diff --git a/ext/boost/date_time/c_time.hpp b/ext/boost/date_time/c_time.hpp
index 24ccfe5..f7e116b 100644
--- a/ext/boost/date_time/c_time.hpp
+++ b/ext/boost/date_time/c_time.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
+ * $Date: 2012-09-22 09:04:10 -0700 (Sat, 22 Sep 2012) $
  */
 
 
@@ -57,7 +57,15 @@ namespace date_time {
       static std::tm* localtime(const std::time_t* t, std::tm* result)
       {
         // localtime_r() not in namespace std???
+ 	#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64
+ 	std::tm tmp;
+ 	if(!localtime_r(t,&tmp))
+            result = 0;
+	else
+            *result = tmp;	
+ 	#else
         result = localtime_r(t, result);
+	#endif
         if (!result)
           boost::throw_exception(std::runtime_error("could not convert calendar time to local time"));
         return result;
@@ -67,7 +75,15 @@ namespace date_time {
       static std::tm* gmtime(const std::time_t* t, std::tm* result)
       {
         // gmtime_r() not in namespace std???
+ 	#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64
+ 	std::tm tmp;
+ 	if(!gmtime_r(t,&tmp))
+          result = 0;
+        else
+          *result = tmp;	
+	#else
         result = gmtime_r(t, result);
+	#endif
         if (!result)
           boost::throw_exception(std::runtime_error("could not convert calendar time to UTC time"));
         return result;
diff --git a/ext/boost/date_time/compiler_config.hpp b/ext/boost/date_time/compiler_config.hpp
index 0dc893f..1aa1330 100644
--- a/ext/boost/date_time/compiler_config.hpp
+++ b/ext/boost/date_time/compiler_config.hpp
@@ -5,7 +5,7 @@
  * Subject to the Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
+ * $Date: 2011-07-26 10:40:21 -0700 (Tue, 26 Jul 2011) $
  */
 
 #include <cstdlib>
@@ -118,20 +118,18 @@ namespace std {
  * 
  */
 
-#ifdef BOOST_HAS_DECLSPEC // defined in config system
-   // we need to import/export our code only if the user has specifically
-   // asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
-   // libraries to be dynamically linked, or BOOST_DATE_TIME_DYN_LINK
-   // if they want just this one to be dynamically liked:
-#  if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_DATE_TIME_DYN_LINK)
-      // export if this is our own source, otherwise import:
-#     ifdef BOOST_DATE_TIME_SOURCE
-#       define BOOST_DATE_TIME_DECL __declspec(dllexport)
-#     else
-#       define BOOST_DATE_TIME_DECL __declspec(dllimport)
-#     endif  // BOOST_DATE_TIME_SOURCE
-#  endif  // DYN_LINK
-#endif  // BOOST_HAS_DECLSPEC
+// we need to import/export our code only if the user has specifically
+// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
+// libraries to be dynamically linked, or BOOST_DATE_TIME_DYN_LINK
+// if they want just this one to be dynamically liked:
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_DATE_TIME_DYN_LINK)
+    // export if this is our own source, otherwise import:
+#   ifdef BOOST_DATE_TIME_SOURCE
+#     define BOOST_DATE_TIME_DECL BOOST_SYMBOL_EXPORT
+#   else
+#     define BOOST_DATE_TIME_DECL BOOST_SYMBOL_IMPORT
+#   endif  // BOOST_DATE_TIME_SOURCE
+#endif  // DYN_LINK
 //
 // if BOOST_WHATEVER_DECL isn't defined yet define it now:
 #ifndef BOOST_DATE_TIME_DECL
diff --git a/ext/boost/date_time/constrained_value.hpp b/ext/boost/date_time/constrained_value.hpp
index b273dd5..7338105 100644
--- a/ext/boost/date_time/constrained_value.hpp
+++ b/ext/boost/date_time/constrained_value.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland 
- * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
+ * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $
  */
 
 #include <exception>
diff --git a/ext/boost/date_time/date.hpp b/ext/boost/date_time/date.hpp
index 1056fb6..f77ae29 100644
--- a/ext/boost/date_time/date.hpp
+++ b/ext/boost/date_time/date.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
+ * $Date: 2012-09-22 15:33:33 -0700 (Sat, 22 Sep 2012) $
  */
 
 #include <boost/operators.hpp>
@@ -191,8 +191,8 @@ namespace date_time {
       dates.  It is not exposed to users since that would require class
       users to understand the inner workings of the date class.
     */
-    explicit date(date_int_type days) : days_(days) {};
-    explicit date(date_rep_type days) : days_(days.as_number()) {};
+    explicit date(date_int_type days) : days_(days) {}
+    explicit date(date_rep_type days) : days_(days.as_number()) {}
     date_int_type days_;
 
   };
diff --git a/ext/boost/date_time/date_clock_device.hpp b/ext/boost/date_time/date_clock_device.hpp
index 6ccb26e..6202f6c 100644
--- a/ext/boost/date_time/date_clock_device.hpp
+++ b/ext/boost/date_time/date_clock_device.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/c_time.hpp"
diff --git a/ext/boost/date_time/date_defs.hpp b/ext/boost/date_time/date_defs.hpp
index bc25b56..ae7e4c5 100644
--- a/ext/boost/date_time/date_defs.hpp
+++ b/ext/boost/date_time/date_defs.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 
diff --git a/ext/boost/date_time/date_duration.hpp b/ext/boost/date_time/date_duration.hpp
index 3871aac..c573944 100644
--- a/ext/boost/date_time/date_duration.hpp
+++ b/ext/boost/date_time/date_duration.hpp
@@ -2,11 +2,11 @@
 #define DATE_TIME_DATE_DURATION__
 
 /* Copyright (c) 2002,2003 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the 
+ * Use, modification and distribution is subject to the
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
+ * $Date: 2012-09-22 15:33:33 -0700 (Sat, 22 Sep 2012) $
  */
 
 
@@ -26,14 +26,14 @@ namespace date_time {
             , boost::subtractable1< date_duration< duration_rep_traits >
             , boost::dividable2< date_duration< duration_rep_traits >, int
             > > > > >
-  { 
+  {
   public:
     typedef typename duration_rep_traits::int_type duration_rep_type;
     typedef typename duration_rep_traits::impl_type duration_rep;
-    
+
     //! Construct from a day count
-    explicit date_duration(duration_rep day_count) : days_(day_count) {};
-    
+    explicit date_duration(duration_rep day_count) : days_(day_count) {}
+
     /*! construct from special_values - only works when
      * instantiated with duration_traits_adapted */
     date_duration(special_values sv) :
@@ -125,7 +125,7 @@ namespace date_time {
   {
     typedef long int_type;
     typedef long impl_type;
-    static int_type as_number(impl_type i) { return i; };
+    static int_type as_number(impl_type i) { return i; }
   };
 
   /*! Struct for instantiating date_duration <b>WITH</b> special values
@@ -135,9 +135,9 @@ namespace date_time {
   {
     typedef long int_type;
     typedef boost::date_time::int_adapter<long> impl_type;
-    static int_type as_number(impl_type i) { return i.as_number(); };
+    static int_type as_number(impl_type i) { return i.as_number(); }
   };
-  
+
 
 } } //namspace date_time
 
diff --git a/ext/boost/date_time/date_duration_types.hpp b/ext/boost/date_time/date_duration_types.hpp
index 1512c0e..e44c59f 100644
--- a/ext/boost/date_time/date_duration_types.hpp
+++ b/ext/boost/date_time/date_duration_types.hpp
@@ -6,7 +6,7 @@
  * (See accompanying file LICENSE_1_0.txt or 
  * http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
                                                                                 
 #include <boost/date_time/int_adapter.hpp>
diff --git a/ext/boost/date_time/date_facet.hpp b/ext/boost/date_time/date_facet.hpp
index 3eda4c7..fc2ddc2 100644
--- a/ext/boost/date_time/date_facet.hpp
+++ b/ext/boost/date_time/date_facet.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author:  Martin Andrian, Jeff Garland, Bart Garst
- * $Date: 2009-06-04 07:40:18 -0400 (Thu, 04 Jun 2009) $
+ * $Date: 2012-09-30 16:25:22 -0700 (Sun, 30 Sep 2012) $
  */
 
 #include <locale>
@@ -208,7 +208,8 @@ namespace boost { namespace date_time {
       //  return do_put_special(next, a_ios, fill_char, d.as_special());
       //}
       //The following line of code required the date to support a to_tm function
-      std::tm dtm = {};
+      std::tm dtm;
+      std::memset(&dtm, 0, sizeof(dtm));
       dtm.tm_mon = m - 1;
       return do_put_tm(next, a_ios, fill_char, dtm, m_month_format);
     }
@@ -219,7 +220,8 @@ namespace boost { namespace date_time {
                 char_type fill_char,
                 const day_type& day) const
     {
-      std::tm dtm = {};
+      std::tm dtm;
+      std::memset(&dtm, 0, sizeof(dtm));
       dtm.tm_mday = day.as_number();
       char_type tmp[3] = {'%','d'};
       string_type temp_format(tmp);
@@ -235,7 +237,8 @@ namespace boost { namespace date_time {
       //  return do_put_special(next, a_ios, fill_char, d.as_special());
       //}
       //The following line of code required the date to support a to_tm function
-      std::tm dtm = {};
+      std::tm dtm;
+      std::memset(&dtm, 0, sizeof(dtm));
       dtm.tm_wday = dow;
       return do_put_tm(next, a_ios, fill_char, dtm, m_weekday_format);
     }
diff --git a/ext/boost/date_time/date_format_simple.hpp b/ext/boost/date_time/date_format_simple.hpp
index be21ce4..05119c4 100644
--- a/ext/boost/date_time/date_format_simple.hpp
+++ b/ext/boost/date_time/date_format_simple.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/parse_format_base.hpp"
diff --git a/ext/boost/date_time/date_formatting.hpp b/ext/boost/date_time/date_formatting.hpp
index abe547a..06709bc 100644
--- a/ext/boost/date_time/date_formatting.hpp
+++ b/ext/boost/date_time/date_formatting.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2012-09-30 16:25:22 -0700 (Sun, 30 Sep 2012) $
  */
 
 #include "boost/date_time/iso_format.hpp"
@@ -54,7 +54,9 @@ namespace date_time {
           os << std::setw(2) << std::setfill(os.widen('0')) << month.as_number();
           break;
         }
-     
+        default:
+          break;
+          
       }
       return os;
     } // format_month
@@ -79,7 +81,13 @@ namespace date_time {
     {
       typedef typename ymd_type::month_type month_type;
       std::basic_ostringstream<charT> ss;
+
+      // Temporarily switch to classic locale to prevent possible formatting
+      // of year with comma or other character (for example 2,008).
+      ss.imbue(std::locale::classic());
       ss << ymd.year;
+      ss.imbue(std::locale());
+
       if (format_type::has_date_sep_chars()) {
         ss << format_type::month_sep_char();
       }
diff --git a/ext/boost/date_time/date_formatting_limited.hpp b/ext/boost/date_time/date_formatting_limited.hpp
index 38fee07..5721473 100644
--- a/ext/boost/date_time/date_formatting_limited.hpp
+++ b/ext/boost/date_time/date_formatting_limited.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/iso_format.hpp"
diff --git a/ext/boost/date_time/date_formatting_locales.hpp b/ext/boost/date_time/date_formatting_locales.hpp
index 4ac9c4e..e3aec49 100644
--- a/ext/boost/date_time/date_formatting_locales.hpp
+++ b/ext/boost/date_time/date_formatting_locales.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 
diff --git a/ext/boost/date_time/date_generator_formatter.hpp b/ext/boost/date_time/date_generator_formatter.hpp
index 88cd7e1..159cf36 100644
--- a/ext/boost/date_time/date_generator_formatter.hpp
+++ b/ext/boost/date_time/date_generator_formatter.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-11-13 14:05:31 -0500 (Thu, 13 Nov 2008) $
+ * $Date: 2008-11-13 11:05:31 -0800 (Thu, 13 Nov 2008) $
  */
 
 #include <iostream>
diff --git a/ext/boost/date_time/date_generator_parser.hpp b/ext/boost/date_time/date_generator_parser.hpp
index f11eb42..7cff9ca 100644
--- a/ext/boost/date_time/date_generator_parser.hpp
+++ b/ext/boost/date_time/date_generator_parser.hpp
@@ -7,7 +7,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
+ * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $
  */
 
 #include <string>
diff --git a/ext/boost/date_time/date_generators.hpp b/ext/boost/date_time/date_generators.hpp
index 1f1a34a..6d3a4ac 100644
--- a/ext/boost/date_time/date_generators.hpp
+++ b/ext/boost/date_time/date_generators.hpp
@@ -2,11 +2,11 @@
 #define DATE_TIME_DATE_GENERATORS_HPP__
 
 /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the 
+ * Use, modification and distribution is subject to the
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
- * Author: Jeff Garland, Bart Garst 
- * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
+ * Author: Jeff Garland, Bart Garst
+ * $Date: 2012-09-22 15:33:33 -0700 (Sat, 22 Sep 2012) $
  */
 
 /*! @file date_generators.hpp
@@ -34,16 +34,16 @@ namespace date_time {
   public:
     typedef typename date_type::calendar_type calendar_type;
     typedef typename calendar_type::year_type        year_type;
-    year_based_generator() {};
-    virtual ~year_based_generator() {};
+    year_based_generator() {}
+    virtual ~year_based_generator() {}
     virtual date_type get_date(year_type y) const = 0;
     //! Returns a string for use in a POSIX time_zone string
     virtual std::string to_string() const =0;
   };
-  
+
   //! Generates a date by applying the year to the given month and day.
   /*!
-    Example usage: 
+    Example usage:
     @code
     partial_date pd(1, Jan);
     partial_date pd2(70);
@@ -123,9 +123,9 @@ namespace date_time {
      //months are equal
      return (day_ < rhs.day_);
    }
-   
+
    // added for streaming purposes
-   month_type month() const 
+   month_type month() const
    {
      return month_;
    }
@@ -135,15 +135,15 @@ namespace date_time {
    }
 
    //! Returns string suitable for use in POSIX time zone string
-   /*! Returns string formatted with up to 3 digits: 
-    * Jan-01 == "0" 
+   /*! Returns string formatted with up to 3 digits:
+    * Jan-01 == "0"
     * Feb-29 == "58"
     * Dec-31 == "365" */
    virtual std::string to_string() const
    {
      std::ostringstream ss;
      date_type d(2004, month_, day_);
-     unsigned short c = d.day_of_year();     
+     unsigned short c = d.day_of_year();
      c--; // numbered 0-365 while day_of_year is 1 based...
      ss << c;
      return ss.str();
@@ -161,7 +161,7 @@ namespace date_time {
   /*! Based on the idea in Cal. Calc. for finding holidays that are
    *  the 'first Monday of September'. When instantiated with
    *  'fifth' kday of month, the result will be the last kday of month
-   *  which can be the fourth or fifth depending on the structure of 
+   *  which can be the fourth or fifth depending on the structure of
    *  the month.
    *
    *  The algorithm here basically guesses for the first
@@ -169,8 +169,8 @@ namespace date_time {
    *  type.  That is, if the first of the month is a Tuesday
    *  and it needs Wenesday then we simply increment by a day
    *  and then we can add the length of a week until we get
-   *  to the 'nth kday'.  There are probably more efficient 
-   *  algorithms based on using a mod 7, but this one works 
+   *  to the 'nth kday'.  There are probably more efficient
+   *  algorithms based on using a mod 7, but this one works
    *  reasonably well for basic applications.
    *  \ingroup date_alg
    */
@@ -233,7 +233,7 @@ namespace date_time {
     virtual std::string to_string() const
     {
      std::ostringstream ss;
-     ss << 'M' 
+     ss << 'M'
        << static_cast<int>(month_) << '.'
        << static_cast<int>(wn_) << '.'
        << static_cast<int>(dow_);
@@ -244,7 +244,7 @@ namespace date_time {
     week_num wn_;
     day_of_week_type dow_;
   };
-  
+
   //! Useful generator functor for finding holidays and daylight savings
   /*! Similar to nth_kday_of_month, but requires less paramters
    *  \ingroup date_alg
@@ -290,7 +290,7 @@ namespace date_time {
     virtual std::string to_string() const
     {
      std::ostringstream ss;
-     ss << 'M' 
+     ss << 'M'
        << static_cast<int>(month_) << '.'
        << 1 << '.'
        << static_cast<int>(dow_);
@@ -300,9 +300,9 @@ namespace date_time {
     month_type month_;
     day_of_week_type dow_;
   };
-  
-  
-  
+
+
+
   //! Calculate something like Last Sunday of January
   /*! Useful generator functor for finding holidays and daylight savings
    *  Get the last day of the month and then calculate the difference
@@ -351,7 +351,7 @@ namespace date_time {
     virtual std::string to_string() const
     {
       std::ostringstream ss;
-      ss << 'M' 
+      ss << 'M'
          << static_cast<int>(month_) << '.'
          << 5 << '.'
          << static_cast<int>(dow_);
@@ -361,8 +361,8 @@ namespace date_time {
     month_type month_;
     day_of_week_type dow_;
    };
-  
-  
+
+
   //! Calculate something like "First Sunday after Jan 1,2002
   /*! Date generator that takes a date and finds kday after
    *@code
@@ -400,7 +400,7 @@ namespace date_time {
   private:
     day_of_week_type dow_;
   };
-  
+
   //! Calculate something like "First Sunday before Jan 1,2002
   /*! Date generator that takes a date and finds kday after
    *@code
@@ -438,10 +438,10 @@ namespace date_time {
   private:
     day_of_week_type dow_;
   };
-  
+
   //! Calculates the number of days until the next weekday
   /*! Calculates the number of days until the next weekday.
-   * If the date given falls on a Sunday and the given weekday 
+   * If the date given falls on a Sunday and the given weekday
    * is Tuesday the result will be 2 days */
   template<typename date_type, class weekday_type>
   inline
@@ -458,8 +458,8 @@ namespace date_time {
 
   //! Calculates the number of days since the previous weekday
   /*! Calculates the number of days since the previous weekday
-   * If the date given falls on a Sunday and the given weekday 
-   * is Tuesday the result will be 5 days. The answer will be a positive 
+   * If the date given falls on a Sunday and the given weekday
+   * is Tuesday the result will be 5 days. The answer will be a positive
    * number because Tuesday is 5 days before Sunday, not -5 days before. */
   template<typename date_type, class weekday_type>
   inline
@@ -477,9 +477,9 @@ namespace date_time {
   }
 
   //! Generates a date object representing the date of the following weekday from the given date
-  /*! Generates a date object representing the date of the following 
-   * weekday from the given date. If the date given is 2004-May-9 
-   * (a Sunday) and the given weekday is Tuesday then the resulting date 
+  /*! Generates a date object representing the date of the following
+   * weekday from the given date. If the date given is 2004-May-9
+   * (a Sunday) and the given weekday is Tuesday then the resulting date
    * will be 2004-May-11. */
   template<class date_type, class weekday_type>
   inline
@@ -489,9 +489,9 @@ namespace date_time {
   }
 
   //! Generates a date object representing the date of the previous weekday from the given date
-  /*! Generates a date object representing the date of the previous 
-   * weekday from the given date. If the date given is 2004-May-9 
-   * (a Sunday) and the given weekday is Tuesday then the resulting date 
+  /*! Generates a date object representing the date of the previous
+   * weekday from the given date. If the date given is 2004-May-9
+   * (a Sunday) and the given weekday is Tuesday then the resulting date
    * will be 2004-May-4. */
   template<class date_type, class weekday_type>
   inline
diff --git a/ext/boost/date_time/date_iterator.hpp b/ext/boost/date_time/date_iterator.hpp
index 284dc74..c8ec50e 100644
--- a/ext/boost/date_time/date_iterator.hpp
+++ b/ext/boost/date_time/date_iterator.hpp
@@ -2,11 +2,11 @@
 #define DATE_ITERATOR_HPP___
 
 /* Copyright (c) 2002,2003 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the 
+ * Use, modification and distribution is subject to the
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2012-09-22 15:33:33 -0700 (Sat, 22 Sep 2012) $
  */
 
 #include <iterator>
@@ -32,7 +32,7 @@ namespace date_time {
   template<class date_type>
   class date_itr_base {
   // works, but benefit unclear at the moment
-  //   class date_itr_base : public std::iterator<std::input_iterator_tag, 
+  //   class date_itr_base : public std::iterator<std::input_iterator_tag,
   //                                             date_type, void, void, void>{
   public:
     typedef typename date_type::duration_type duration_type;
@@ -40,31 +40,31 @@ namespace date_time {
     typedef std::input_iterator_tag iterator_category;
 
     date_itr_base(date_type d) : current_(d) {}
-    virtual ~date_itr_base() {};
-    date_itr_base& operator++() 
+    virtual ~date_itr_base() {}
+    date_itr_base& operator++()
     {
       current_ = current_ + get_offset(current_);
       return *this;
     }
-    date_itr_base& operator--() 
+    date_itr_base& operator--()
     {
       current_ = current_ + get_neg_offset(current_);
       return *this;
     }
     virtual duration_type get_offset(const date_type& current) const=0;
     virtual duration_type get_neg_offset(const date_type& current) const=0;
-    date_type operator*() {return current_;};
-    date_type* operator->() {return &current_;};
+    date_type operator*() {return current_;}
+    date_type* operator->() {return &current_;}
     bool operator<  (const date_type& d) {return current_ < d;}
     bool operator<= (const date_type& d) {return current_ <= d;}
     bool operator>  (const date_type& d) {return current_ > d;}
     bool operator>= (const date_type& d) {return current_ >= d;}
     bool operator== (const date_type& d) {return current_ == d;}
-    bool operator!= (const date_type& d) {return current_ != d;}    
+    bool operator!= (const date_type& d) {return current_ != d;}
   private:
     date_type current_;
   };
-  
+
   //! Overrides the base date iterator providing hook for functors
   /*
    *  <b>offset_functor</b>
@@ -77,9 +77,9 @@ namespace date_time {
   class date_itr : public date_itr_base<date_type> {
   public:
     typedef typename date_type::duration_type duration_type;
-    date_itr(date_type d, int factor=1) : 
-      date_itr_base<date_type>(d), 
-      of_(factor) 
+    date_itr(date_type d, int factor=1) :
+      date_itr_base<date_type>(d),
+      of_(factor)
     {}
   private:
     virtual duration_type get_offset(const date_type& current) const
@@ -92,9 +92,9 @@ namespace date_time {
     }
     offset_functor of_;
   };
-  
 
-  
+
+
 } } //namespace date_time
 
 
diff --git a/ext/boost/date_time/date_names_put.hpp b/ext/boost/date_time/date_names_put.hpp
index c6f0ce2..32aeb36 100644
--- a/ext/boost/date_time/date_names_put.hpp
+++ b/ext/boost/date_time/date_names_put.hpp
@@ -2,11 +2,11 @@
 #define DATE_TIME_DATE_NAMES_PUT_HPP___
 
 /* Copyright (c) 2002-2005 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the 
+ * Use, modification and distribution is subject to the
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
- * Author: Jeff Garland, Bart Garst 
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * Author: Jeff Garland, Bart Garst
+ * $Date: 2012-09-22 15:33:33 -0700 (Sat, 22 Sep 2012) $
  */
 
 
@@ -27,22 +27,22 @@ namespace date_time {
     //! Output facet base class for gregorian dates.
     /*! This class is a base class for date facets used to localize the
      *  names of months and the names of days in the week.
-     * 
+     *
      * Requirements of Config
-     *  - define an enumeration month_enum that enumerates the months. 
+     *  - define an enumeration month_enum that enumerates the months.
      *    The enumeration should be '1' based eg: Jan==1
      *  - define as_short_string and as_long_string
      *
      * (see langer & kreft p334).
-     * 
+     *
      */
     template<class Config,
-             class charT = char, 
+             class charT = char,
              class OutputIterator = std::ostreambuf_iterator<charT> >
     class date_names_put : public std::locale::facet
     {
     public:
-      date_names_put() {};
+      date_names_put() {}
       typedef OutputIterator iter_type;
       typedef typename Config::month_type month_type;
       typedef typename Config::month_enum month_enum;
@@ -118,7 +118,7 @@ namespace date_time {
         put_string(oitr, gm.as_short_string(c));
       }
       //! Default facet implementation uses month_type defaults
-      virtual void do_put_month_long(iter_type& oitr, 
+      virtual void do_put_month_long(iter_type& oitr,
                                      month_enum moy) const
       {
         month_type gm(moy);
@@ -160,7 +160,7 @@ namespace date_time {
         string_type s(separator); //put in '-'
         put_string(oitr, s);
       }
-      //! Default for date order 
+      //! Default for date order
       virtual ymd_order_spec do_date_order() const
       {
         return ymd_order_iso;
@@ -186,27 +186,27 @@ namespace date_time {
         }
       }
     };
-    
+
     template<class Config, class charT, class OutputIterator>
-    const typename date_names_put<Config, charT, OutputIterator>::char_type 
-    date_names_put<Config, charT, OutputIterator>::default_special_value_names[3][17] = { 
+    const typename date_names_put<Config, charT, OutputIterator>::char_type
+    date_names_put<Config, charT, OutputIterator>::default_special_value_names[3][17] = {
       {'n','o','t','-','a','-','d','a','t','e','-','t','i','m','e'},
       {'-','i','n','f','i','n','i','t','y'},
       {'+','i','n','f','i','n','i','t','y'} };
 
     template<class Config, class charT, class OutputIterator>
-    const typename date_names_put<Config, charT, OutputIterator>::char_type 
-    date_names_put<Config, charT, OutputIterator>::separator[2] = 
+    const typename date_names_put<Config, charT, OutputIterator>::char_type
+    date_names_put<Config, charT, OutputIterator>::separator[2] =
       {'-', '\0'} ;
-    
 
-    //! Generate storage location for a std::locale::id 
+
+    //! Generate storage location for a std::locale::id
     template<class Config, class charT, class OutputIterator>
     std::locale::id date_names_put<Config, charT, OutputIterator>::id;
 
     //! A date name output facet that takes an array of char* to define strings
     template<class Config,
-             class charT = char, 
+             class charT = char,
              class OutputIterator = std::ostreambuf_iterator<charT> >
     class all_date_names_put : public date_names_put<Config, charT, OutputIterator>
     {
@@ -230,29 +230,29 @@ namespace date_time {
         separator_char_[0] = separator_char;
         separator_char_[1] = '\0';
 
-      };
+      }
       typedef OutputIterator iter_type;
       typedef typename Config::month_enum month_enum;
       typedef typename Config::weekday_enum weekday_enum;
       typedef typename Config::special_value_enum special_value_enum;
 
-      const charT* const* get_short_month_names() const 
+      const charT* const* get_short_month_names() const
       {
         return month_short_names_;
       }
-      const charT* const* get_long_month_names() const 
+      const charT* const* get_long_month_names() const
       {
         return month_long_names_;
       }
-      const charT* const* get_special_value_names() const 
+      const charT* const* get_special_value_names() const
       {
         return special_value_names_;
       }
-      const charT* const* get_short_weekday_names()const  
+      const charT* const* get_short_weekday_names()const
       {
         return weekday_short_names_;
       }
-      const charT* const* get_long_weekday_names()const 
+      const charT* const* get_long_weekday_names()const
       {
         return weekday_long_names_;
       }
@@ -263,7 +263,7 @@ namespace date_time {
       {
         this->put_string(oitr, month_short_names_[moy-1]);
       }
-      //! Long month names 
+      //! Long month names
       virtual void do_put_month_long(iter_type& oitr, month_enum moy) const
       {
         this->put_string(oitr, month_long_names_[moy-1]);
@@ -310,7 +310,7 @@ namespace date_time {
       const charT* const* weekday_long_names_;
       charT separator_char_[2];
       ymd_order_spec order_spec_;
-      month_format_spec month_format_spec_;      
+      month_format_spec month_format_spec_;
     };
 
 } } //namespace boost::date_time
diff --git a/ext/boost/date_time/date_parsing.hpp b/ext/boost/date_time/date_parsing.hpp
index f361bc8..35ec8e4 100644
--- a/ext/boost/date_time/date_parsing.hpp
+++ b/ext/boost/date_time/date_parsing.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2009-06-04 04:24:49 -0400 (Thu, 04 Jun 2009) $
+ * $Date: 2012-09-30 16:25:22 -0700 (Sun, 30 Sep 2012) $
  */
 
 #include <string>
@@ -148,6 +148,7 @@ namespace date_time {
             day = boost::lexical_cast<unsigned short>(*beg);
             break;
           }
+          default: break;
         } //switch
       }
       return date_type(year, month, day);
@@ -180,6 +181,7 @@ namespace date_time {
         case 0: y = i; break;
         case 1: m = i; break;
         case 2: d = i; break;
+        default:       break;
         }
         pos++;
       }
diff --git a/ext/boost/date_time/dst_rules.hpp b/ext/boost/date_time/dst_rules.hpp
index 20cb40b..cf65c16 100644
--- a/ext/boost/date_time/dst_rules.hpp
+++ b/ext/boost/date_time/dst_rules.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2012-09-30 16:25:22 -0700 (Sun, 30 Sep 2012) $
  */
 
 /*! @file dst_rules.hpp
@@ -371,7 +371,7 @@ namespace boost {
         return is_not_in_dst;
       }
 
-      static bool is_dst_boundary_day(date_type d)
+      static bool is_dst_boundary_day(date_type /*d*/)
       {
         return false;
       }
diff --git a/ext/boost/date_time/filetime_functions.hpp b/ext/boost/date_time/filetime_functions.hpp
index 27ed754..3c7f13f 100644
--- a/ext/boost/date_time/filetime_functions.hpp
+++ b/ext/boost/date_time/filetime_functions.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2009-06-06 07:24:09 -0400 (Sat, 06 Jun 2009) $
+ * $Date: 2012-09-22 09:04:10 -0700 (Sat, 22 Sep 2012) $
  */
 
 /*! @file filetime_functions.hpp
@@ -73,12 +73,12 @@ namespace winapi {
         file_time ft_utc;
         GetSystemTimeAsFileTime(&ft_utc);
         FileTimeToLocalFileTime(&ft_utc, &ft);
-#elif defined(BOOST_NO_GETSYSTEMTIMEASFILETIME)
+#elif defined(BOOST_HAS_GETSYSTEMTIMEASFILETIME)
+        GetSystemTimeAsFileTime(&ft);
+#else
         system_time st;
         GetSystemTime(&st);
         SystemTimeToFileTime(&st, &ft);
-#else
-        GetSystemTimeAsFileTime(&ft);
 #endif
     }
 
diff --git a/ext/boost/date_time/format_date_parser.hpp b/ext/boost/date_time/format_date_parser.hpp
index a4a4d0d..0c3503f 100644
--- a/ext/boost/date_time/format_date_parser.hpp
+++ b/ext/boost/date_time/format_date_parser.hpp
@@ -7,7 +7,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2009-06-04 04:24:49 -0400 (Thu, 04 Jun 2009) $
+ * $Date: 2012-09-30 16:25:22 -0700 (Sun, 30 Sep 2012) $
  */
 
 
@@ -256,7 +256,6 @@ class format_date_parser
     
     // skip leading whitespace
     while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } 
-    charT current_char = *sitr;
 
     short year(0), month(0), day(0), day_of_year(0);// wkday(0); 
     /* Initialized the following to their minimum values. These intermediate 
@@ -290,7 +289,6 @@ class format_date_parser
               }
               wkday = mr.current_match;
               if (mr.has_remaining()) {
-                current_char = mr.last_char();
                 use_current_char = true;
               }
               break;
@@ -310,7 +308,6 @@ class format_date_parser
               }
               wkday = mr.current_match;
               if (mr.has_remaining()) {
-                current_char = mr.last_char();
                 use_current_char = true;
               }
               break;
@@ -326,7 +323,6 @@ class format_date_parser
               }
               t_month = month_type(mr.current_match);
               if (mr.has_remaining()) {
-                current_char = mr.last_char();
                 use_current_char = true;
               }
               break;
@@ -342,7 +338,6 @@ class format_date_parser
               }
               t_month = month_type(mr.current_match);
               if (mr.has_remaining()) {
-                current_char = mr.last_char();
                 use_current_char = true;
               }
               break;
@@ -438,7 +433,6 @@ class format_date_parser
         itr++;
         if (use_current_char) {
           use_current_char = false;
-          current_char = *sitr;
         }
         else {
           sitr++;
diff --git a/ext/boost/date_time/gregorian/._conversion.hpp b/ext/boost/date_time/gregorian/._conversion.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._conversion.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/._formatters.hpp b/ext/boost/date_time/gregorian/._formatters.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._formatters.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/._formatters_limited.hpp b/ext/boost/date_time/gregorian/._formatters_limited.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._formatters_limited.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/._greg_calendar.hpp b/ext/boost/date_time/gregorian/._greg_calendar.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._greg_calendar.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/._greg_date.hpp b/ext/boost/date_time/gregorian/._greg_date.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._greg_date.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/._greg_day.hpp b/ext/boost/date_time/gregorian/._greg_day.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._greg_day.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/._greg_day_of_year.hpp b/ext/boost/date_time/gregorian/._greg_day_of_year.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._greg_day_of_year.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/._greg_duration.hpp b/ext/boost/date_time/gregorian/._greg_duration.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._greg_duration.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/._greg_duration_types.hpp b/ext/boost/date_time/gregorian/._greg_duration_types.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._greg_duration_types.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/._greg_month.hpp b/ext/boost/date_time/gregorian/._greg_month.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._greg_month.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/._greg_weekday.hpp b/ext/boost/date_time/gregorian/._greg_weekday.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._greg_weekday.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/._greg_year.hpp b/ext/boost/date_time/gregorian/._greg_year.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._greg_year.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/._greg_ymd.hpp b/ext/boost/date_time/gregorian/._greg_ymd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._greg_ymd.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/._gregorian.hpp b/ext/boost/date_time/gregorian/._gregorian.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._gregorian.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/._gregorian_io.hpp b/ext/boost/date_time/gregorian/._gregorian_io.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._gregorian_io.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/._gregorian_types.hpp b/ext/boost/date_time/gregorian/._gregorian_types.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._gregorian_types.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/._parsers.hpp b/ext/boost/date_time/gregorian/._parsers.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/gregorian/._parsers.hpp and /dev/null differ
diff --git a/ext/boost/date_time/gregorian/conversion.hpp b/ext/boost/date_time/gregorian/conversion.hpp
index c505bdd..33f6856 100644
--- a/ext/boost/date_time/gregorian/conversion.hpp
+++ b/ext/boost/date_time/gregorian/conversion.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2010-06-09 14:10:13 -0400 (Wed, 09 Jun 2010) $
+ * $Date: 2010-06-09 11:10:13 -0700 (Wed, 09 Jun 2010) $
  */
 
 #include <cstring>
diff --git a/ext/boost/date_time/gregorian/formatters.hpp b/ext/boost/date_time/gregorian/formatters.hpp
index 786e79f..eda7dc3 100644
--- a/ext/boost/date_time/gregorian/formatters.hpp
+++ b/ext/boost/date_time/gregorian/formatters.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/compiler_config.hpp"
diff --git a/ext/boost/date_time/gregorian/formatters_limited.hpp b/ext/boost/date_time/gregorian/formatters_limited.hpp
index 4531ebe..8dfd2d0 100644
--- a/ext/boost/date_time/gregorian/formatters_limited.hpp
+++ b/ext/boost/date_time/gregorian/formatters_limited.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/gregorian/gregorian_types.hpp"
diff --git a/ext/boost/date_time/gregorian/greg_calendar.hpp b/ext/boost/date_time/gregorian/greg_calendar.hpp
index 483ead5..e9c1852 100644
--- a/ext/boost/date_time/gregorian/greg_calendar.hpp
+++ b/ext/boost/date_time/gregorian/greg_calendar.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland
- * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
+ * $Date: 2010-01-10 11:17:23 -0800 (Sun, 10 Jan 2010) $
  */
 
 #include <boost/cstdint.hpp>
diff --git a/ext/boost/date_time/gregorian/greg_date.hpp b/ext/boost/date_time/gregorian/greg_date.hpp
index ad67c0c..860a407 100644
--- a/ext/boost/date_time/gregorian/greg_date.hpp
+++ b/ext/boost/date_time/gregorian/greg_date.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland
- * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
+ * $Date: 2010-01-10 11:17:23 -0800 (Sun, 10 Jan 2010) $
  */
 
 #include <boost/throw_exception.hpp>
diff --git a/ext/boost/date_time/gregorian/greg_day.hpp b/ext/boost/date_time/gregorian/greg_day.hpp
index 92ea6ab..4ea829f 100644
--- a/ext/boost/date_time/gregorian/greg_day.hpp
+++ b/ext/boost/date_time/gregorian/greg_day.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland 
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/constrained_value.hpp"
diff --git a/ext/boost/date_time/gregorian/greg_day_of_year.hpp b/ext/boost/date_time/gregorian/greg_day_of_year.hpp
index 36b22c2..2f8874d 100644
--- a/ext/boost/date_time/gregorian/greg_day_of_year.hpp
+++ b/ext/boost/date_time/gregorian/greg_day_of_year.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland 
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/constrained_value.hpp"
diff --git a/ext/boost/date_time/gregorian/greg_duration.hpp b/ext/boost/date_time/gregorian/greg_duration.hpp
index fd75542..a9c0c17 100644
--- a/ext/boost/date_time/gregorian/greg_duration.hpp
+++ b/ext/boost/date_time/gregorian/greg_duration.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst 
- * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
+ * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $
  */
 
 #include <boost/date_time/date_duration.hpp>
diff --git a/ext/boost/date_time/gregorian/greg_duration_types.hpp b/ext/boost/date_time/gregorian/greg_duration_types.hpp
index 3d1ce62..8328ca3 100644
--- a/ext/boost/date_time/gregorian/greg_duration_types.hpp
+++ b/ext/boost/date_time/gregorian/greg_duration_types.hpp
@@ -5,7 +5,7 @@
  * Subject to Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
+ * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $
  */
 
 
diff --git a/ext/boost/date_time/gregorian/greg_month.hpp b/ext/boost/date_time/gregorian/greg_month.hpp
index fc9c861..b48a8a8 100644
--- a/ext/boost/date_time/gregorian/greg_month.hpp
+++ b/ext/boost/date_time/gregorian/greg_month.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/constrained_value.hpp"
diff --git a/ext/boost/date_time/gregorian/greg_weekday.hpp b/ext/boost/date_time/gregorian/greg_weekday.hpp
index 9b566c4..ab68fcd 100644
--- a/ext/boost/date_time/gregorian/greg_weekday.hpp
+++ b/ext/boost/date_time/gregorian/greg_weekday.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
+ * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $
  */
 
 #include "boost/date_time/constrained_value.hpp"
diff --git a/ext/boost/date_time/gregorian/greg_year.hpp b/ext/boost/date_time/gregorian/greg_year.hpp
index ef1735f..322f40d 100644
--- a/ext/boost/date_time/gregorian/greg_year.hpp
+++ b/ext/boost/date_time/gregorian/greg_year.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland 
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/constrained_value.hpp"
diff --git a/ext/boost/date_time/gregorian/greg_ymd.hpp b/ext/boost/date_time/gregorian/greg_ymd.hpp
index 086e73d..e7d441e 100644
--- a/ext/boost/date_time/gregorian/greg_ymd.hpp
+++ b/ext/boost/date_time/gregorian/greg_ymd.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland 
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/year_month_day.hpp"
diff --git a/ext/boost/date_time/gregorian/gregorian.hpp b/ext/boost/date_time/gregorian/gregorian.hpp
index bfafa1b..becbc06 100644
--- a/ext/boost/date_time/gregorian/gregorian.hpp
+++ b/ext/boost/date_time/gregorian/gregorian.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst 
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 /*! @file gregorian.hpp
diff --git a/ext/boost/date_time/gregorian/gregorian_io.hpp b/ext/boost/date_time/gregorian/gregorian_io.hpp
index 62a759f..e6ba01f 100644
--- a/ext/boost/date_time/gregorian/gregorian_io.hpp
+++ b/ext/boost/date_time/gregorian/gregorian_io.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
+ * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $
  */
 
 #include <locale>
diff --git a/ext/boost/date_time/gregorian/gregorian_types.hpp b/ext/boost/date_time/gregorian/gregorian_types.hpp
index 0c74857..3f4b92f 100644
--- a/ext/boost/date_time/gregorian/gregorian_types.hpp
+++ b/ext/boost/date_time/gregorian/gregorian_types.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 /*! @file gregorian_types.hpp
diff --git a/ext/boost/date_time/gregorian/parsers.hpp b/ext/boost/date_time/gregorian/parsers.hpp
index 95d4f23..a2fa4e1 100644
--- a/ext/boost/date_time/gregorian/parsers.hpp
+++ b/ext/boost/date_time/gregorian/parsers.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/gregorian/gregorian_types.hpp"
diff --git a/ext/boost/date_time/gregorian_calendar.hpp b/ext/boost/date_time/gregorian_calendar.hpp
index c27c09e..b645aa4 100644
--- a/ext/boost/date_time/gregorian_calendar.hpp
+++ b/ext/boost/date_time/gregorian_calendar.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland
- * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
+ * $Date: 2010-01-10 11:17:23 -0800 (Sun, 10 Jan 2010) $
  */
 
 
diff --git a/ext/boost/date_time/gregorian_calendar.ipp b/ext/boost/date_time/gregorian_calendar.ipp
index a281b45..af19394 100644
--- a/ext/boost/date_time/gregorian_calendar.ipp
+++ b/ext/boost/date_time/gregorian_calendar.ipp
@@ -3,7 +3,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
+ * $Date: 2012-09-22 09:04:10 -0700 (Sat, 22 Sep 2012) $
  */
 
 #ifndef NO_BOOST_DATE_TIME_INLINE
@@ -47,7 +47,7 @@ namespace date_time {
       return week;
     }
 
-    if ((week == 53)) {
+    if (week == 53) {
       if((day==6) ||(day == 5 && is_leap_year(ymd.year))) {
         return week; //under these circumstances week == 53.
       } else {
diff --git a/ext/boost/date_time/int_adapter.hpp b/ext/boost/date_time/int_adapter.hpp
index fc98fc1..d1246e7 100644
--- a/ext/boost/date_time/int_adapter.hpp
+++ b/ext/boost/date_time/int_adapter.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
+ * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $
  */
 
 
diff --git a/ext/boost/date_time/iso_format.hpp b/ext/boost/date_time/iso_format.hpp
index 8262fa2..1f9e73d 100644
--- a/ext/boost/date_time/iso_format.hpp
+++ b/ext/boost/date_time/iso_format.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/parse_format_base.hpp"
diff --git a/ext/boost/date_time/locale_config.hpp b/ext/boost/date_time/locale_config.hpp
index d01e008..194d5dd 100644
--- a/ext/boost/date_time/locale_config.hpp
+++ b/ext/boost/date_time/locale_config.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 // This file configures whether the library will support locales and hence
diff --git a/ext/boost/date_time/microsec_time_clock.hpp b/ext/boost/date_time/microsec_time_clock.hpp
index 9396579..177811e 100644
--- a/ext/boost/date_time/microsec_time_clock.hpp
+++ b/ext/boost/date_time/microsec_time_clock.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2010-05-10 05:15:48 -0400 (Mon, 10 May 2010) $
+ * $Date: 2010-05-10 02:15:48 -0700 (Mon, 10 May 2010) $
  */
 
 
diff --git a/ext/boost/date_time/parse_format_base.hpp b/ext/boost/date_time/parse_format_base.hpp
index b17a5c8..087baf9 100644
--- a/ext/boost/date_time/parse_format_base.hpp
+++ b/ext/boost/date_time/parse_format_base.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland 
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 namespace boost {
diff --git a/ext/boost/date_time/period.hpp b/ext/boost/date_time/period.hpp
index c67bc36..3e34def 100644
--- a/ext/boost/date_time/period.hpp
+++ b/ext/boost/date_time/period.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst 
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 /*! \file period.hpp
diff --git a/ext/boost/date_time/period_formatter.hpp b/ext/boost/date_time/period_formatter.hpp
index 08082e1..b6ddc82 100644
--- a/ext/boost/date_time/period_formatter.hpp
+++ b/ext/boost/date_time/period_formatter.hpp
@@ -7,7 +7,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2012-09-22 15:33:33 -0700 (Sat, 22 Sep 2012) $
  */
 
 
@@ -114,10 +114,10 @@ namespace boost { namespace date_time {
     {
       m_range_option = option;
     }
-    void delimiter_strings(const string_type& separator,
-                           const string_type& start_delim,
-                           const string_type& open_end_delim,
-                           const string_type& closed_end_delim)
+    void delimiter_strings(const string_type& ,
+                           const string_type& ,
+                           const string_type& ,
+                           const string_type& )
     {
       m_period_separator;
       m_period_start_delimeter;
diff --git a/ext/boost/date_time/period_parser.hpp b/ext/boost/date_time/period_parser.hpp
index 9cd57e1..84b9d13 100644
--- a/ext/boost/date_time/period_parser.hpp
+++ b/ext/boost/date_time/period_parser.hpp
@@ -7,7 +7,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-11-13 15:10:23 -0500 (Thu, 13 Nov 2008) $
+ * $Date: 2008-11-13 12:10:23 -0800 (Thu, 13 Nov 2008) $
  */
 
 #include <boost/throw_exception.hpp>
diff --git a/ext/boost/date_time/posix_time/._conversion.hpp b/ext/boost/date_time/posix_time/._conversion.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/posix_time/._conversion.hpp and /dev/null differ
diff --git a/ext/boost/date_time/posix_time/._date_duration_operators.hpp b/ext/boost/date_time/posix_time/._date_duration_operators.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/posix_time/._date_duration_operators.hpp and /dev/null differ
diff --git a/ext/boost/date_time/posix_time/._posix_time.hpp b/ext/boost/date_time/posix_time/._posix_time.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/posix_time/._posix_time.hpp and /dev/null differ
diff --git a/ext/boost/date_time/posix_time/._posix_time_config.hpp b/ext/boost/date_time/posix_time/._posix_time_config.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/posix_time/._posix_time_config.hpp and /dev/null differ
diff --git a/ext/boost/date_time/posix_time/._posix_time_duration.hpp b/ext/boost/date_time/posix_time/._posix_time_duration.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/posix_time/._posix_time_duration.hpp and /dev/null differ
diff --git a/ext/boost/date_time/posix_time/._posix_time_io.hpp b/ext/boost/date_time/posix_time/._posix_time_io.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/posix_time/._posix_time_io.hpp and /dev/null differ
diff --git a/ext/boost/date_time/posix_time/._posix_time_system.hpp b/ext/boost/date_time/posix_time/._posix_time_system.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/posix_time/._posix_time_system.hpp and /dev/null differ
diff --git a/ext/boost/date_time/posix_time/._posix_time_types.hpp b/ext/boost/date_time/posix_time/._posix_time_types.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/posix_time/._posix_time_types.hpp and /dev/null differ
diff --git a/ext/boost/date_time/posix_time/._ptime.hpp b/ext/boost/date_time/posix_time/._ptime.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/posix_time/._ptime.hpp and /dev/null differ
diff --git a/ext/boost/date_time/posix_time/._time_formatters.hpp b/ext/boost/date_time/posix_time/._time_formatters.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/posix_time/._time_formatters.hpp and /dev/null differ
diff --git a/ext/boost/date_time/posix_time/._time_parsers.hpp b/ext/boost/date_time/posix_time/._time_parsers.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/posix_time/._time_parsers.hpp and /dev/null differ
diff --git a/ext/boost/date_time/posix_time/._time_period.hpp b/ext/boost/date_time/posix_time/._time_period.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/date_time/posix_time/._time_period.hpp and /dev/null differ
diff --git a/ext/boost/date_time/posix_time/conversion.hpp b/ext/boost/date_time/posix_time/conversion.hpp
index 3fb21d7..83ccf60 100644
--- a/ext/boost/date_time/posix_time/conversion.hpp
+++ b/ext/boost/date_time/posix_time/conversion.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2010-06-09 14:10:13 -0400 (Wed, 09 Jun 2010) $
+ * $Date: 2010-06-09 11:10:13 -0700 (Wed, 09 Jun 2010) $
  */
 
 #include <cstring>
diff --git a/ext/boost/date_time/posix_time/date_duration_operators.hpp b/ext/boost/date_time/posix_time/date_duration_operators.hpp
index e6899ba..6846a77 100644
--- a/ext/boost/date_time/posix_time/date_duration_operators.hpp
+++ b/ext/boost/date_time/posix_time/date_duration_operators.hpp
@@ -6,7 +6,7 @@
  * (See accompanying file LICENSE_1_0.txt or 
  * http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/gregorian/greg_duration_types.hpp"
diff --git a/ext/boost/date_time/posix_time/posix_time.hpp b/ext/boost/date_time/posix_time/posix_time.hpp
index 4e9294c..3b85ff4 100644
--- a/ext/boost/date_time/posix_time/posix_time.hpp
+++ b/ext/boost/date_time/posix_time/posix_time.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst 
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 /*!@file posix_time.hpp Global header file to get all of posix time types 
  */
diff --git a/ext/boost/date_time/posix_time/posix_time_config.hpp b/ext/boost/date_time/posix_time/posix_time_config.hpp
index 60c3f7e..d0b7653 100644
--- a/ext/boost/date_time/posix_time/posix_time_config.hpp
+++ b/ext/boost/date_time/posix_time/posix_time_config.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2009-06-04 07:52:28 -0400 (Thu, 04 Jun 2009) $
+ * $Date: 2012-10-10 12:05:03 -0700 (Wed, 10 Oct 2012) $
  */
 
 #include <cstdlib> //for MCW 7.2 std::abs(long long)
@@ -81,7 +81,7 @@ namespace posix_time {
     {}
     //Give duration access to ticks constructor -- hide from users
     friend class date_time::time_duration<time_duration, time_res_traits>;
-  private:
+  protected:
     explicit time_duration(impl_type tick_count) :
       date_time::time_duration<time_duration, time_res_traits>(tick_count)
     {}
diff --git a/ext/boost/date_time/posix_time/posix_time_duration.hpp b/ext/boost/date_time/posix_time/posix_time_duration.hpp
index db3b85f..9778fd7 100644
--- a/ext/boost/date_time/posix_time/posix_time_duration.hpp
+++ b/ext/boost/date_time/posix_time/posix_time_duration.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/posix_time/posix_time_config.hpp"
diff --git a/ext/boost/date_time/posix_time/posix_time_io.hpp b/ext/boost/date_time/posix_time/posix_time_io.hpp
index 9a80737..fb63a91 100644
--- a/ext/boost/date_time/posix_time/posix_time_io.hpp
+++ b/ext/boost/date_time/posix_time/posix_time_io.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-11-13 14:05:31 -0500 (Thu, 13 Nov 2008) $
+ * $Date: 2008-11-13 11:05:31 -0800 (Thu, 13 Nov 2008) $
  */
 
 #include <locale>
diff --git a/ext/boost/date_time/posix_time/posix_time_system.hpp b/ext/boost/date_time/posix_time/posix_time_system.hpp
index 3d44e0f..13626e9 100644
--- a/ext/boost/date_time/posix_time/posix_time_system.hpp
+++ b/ext/boost/date_time/posix_time/posix_time_system.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 
diff --git a/ext/boost/date_time/posix_time/ptime.hpp b/ext/boost/date_time/posix_time/ptime.hpp
index 2abc02d..3f1cb04 100644
--- a/ext/boost/date_time/posix_time/ptime.hpp
+++ b/ext/boost/date_time/posix_time/ptime.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland 
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/posix_time/posix_time_system.hpp"
diff --git a/ext/boost/date_time/posix_time/time_formatters.hpp b/ext/boost/date_time/posix_time/time_formatters.hpp
index 466331b..534b952 100644
--- a/ext/boost/date_time/posix_time/time_formatters.hpp
+++ b/ext/boost/date_time/posix_time/time_formatters.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
+ * $Date: 2010-01-10 11:17:23 -0800 (Sun, 10 Jan 2010) $
  */
 
 #include <boost/date_time/gregorian/gregorian.hpp>
diff --git a/ext/boost/date_time/posix_time/time_parsers.hpp b/ext/boost/date_time/posix_time/time_parsers.hpp
index 8a352f6..3dc02b1 100644
--- a/ext/boost/date_time/posix_time/time_parsers.hpp
+++ b/ext/boost/date_time/posix_time/time_parsers.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland 
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/gregorian/gregorian.hpp"
diff --git a/ext/boost/date_time/posix_time/time_period.hpp b/ext/boost/date_time/posix_time/time_period.hpp
index cb7bf07..11f8120 100644
--- a/ext/boost/date_time/posix_time/time_period.hpp
+++ b/ext/boost/date_time/posix_time/time_period.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland 
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/period.hpp"
diff --git a/ext/boost/date_time/special_defs.hpp b/ext/boost/date_time/special_defs.hpp
index 56eb6fe..661814e 100644
--- a/ext/boost/date_time/special_defs.hpp
+++ b/ext/boost/date_time/special_defs.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland 
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 namespace boost {
diff --git a/ext/boost/date_time/special_values_formatter.hpp b/ext/boost/date_time/special_values_formatter.hpp
index 33542b6..53fe984 100644
--- a/ext/boost/date_time/special_values_formatter.hpp
+++ b/ext/boost/date_time/special_values_formatter.hpp
@@ -7,7 +7,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include <vector>
diff --git a/ext/boost/date_time/string_convert.hpp b/ext/boost/date_time/string_convert.hpp
index 54a979c..a3cc86c 100644
--- a/ext/boost/date_time/string_convert.hpp
+++ b/ext/boost/date_time/string_convert.hpp
@@ -5,7 +5,7 @@
  * Subject to the Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 #include "boost/date_time/compiler_config.hpp"
diff --git a/ext/boost/date_time/string_parse_tree.hpp b/ext/boost/date_time/string_parse_tree.hpp
index 0d515ff..d67bf6b 100644
--- a/ext/boost/date_time/string_parse_tree.hpp
+++ b/ext/boost/date_time/string_parse_tree.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
+ * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $
  */
 
 
diff --git a/ext/boost/date_time/strings_from_facet.hpp b/ext/boost/date_time/strings_from_facet.hpp
index 2bc26fb..7c0765b 100644
--- a/ext/boost/date_time/strings_from_facet.hpp
+++ b/ext/boost/date_time/strings_from_facet.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland
- * $Date: 2009-02-01 06:29:43 -0500 (Sun, 01 Feb 2009) $
+ * $Date: 2012-09-22 09:04:10 -0700 (Sat, 22 Sep 2012) $
  */
 
 #include <sstream>
@@ -50,8 +50,8 @@ gather_month_strings(const std::locale& locale, bool short_strings=true)
     //grab the needed strings by using the locale to
     //output each month
     const charT* p_outfmt = outfmt.c_str(), *p_outfmt_end = p_outfmt + outfmt.size();
+    tm tm_value = {};
     for (int m=0; m < 12; m++) {
-      tm tm_value;
       tm_value.tm_mon = m;
       stringstream_type ss;
       ostream_iter_type oitr(ss);
@@ -103,8 +103,8 @@ gather_weekday_strings(const std::locale& locale, bool short_strings=true)
     //grab the needed strings by using the locale to
     //output each month / weekday
     const charT* p_outfmt = outfmt.c_str(), *p_outfmt_end = p_outfmt + outfmt.size();
+    tm tm_value = {};
     for (int i=0; i < 7; i++) {
-      tm tm_value;
       tm_value.tm_wday = i;
       stringstream_type ss;
       ostream_iter_type oitr(ss);
diff --git a/ext/boost/date_time/time.hpp b/ext/boost/date_time/time.hpp
index 6a6cbe1..8b21144 100644
--- a/ext/boost/date_time/time.hpp
+++ b/ext/boost/date_time/time.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
+ * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $
  */
 
 
diff --git a/ext/boost/date_time/time_clock.hpp b/ext/boost/date_time/time_clock.hpp
index 1ea5d2e..9aa2ff0 100644
--- a/ext/boost/date_time/time_clock.hpp
+++ b/ext/boost/date_time/time_clock.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 /*! @file time_clock.hpp
diff --git a/ext/boost/date_time/time_defs.hpp b/ext/boost/date_time/time_defs.hpp
index 55fe42a..d74631d 100644
--- a/ext/boost/date_time/time_defs.hpp
+++ b/ext/boost/date_time/time_defs.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland 
- * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
+ * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $
  */
 
 
diff --git a/ext/boost/date_time/time_duration.hpp b/ext/boost/date_time/time_duration.hpp
index 2fd2590..fc3660b 100644
--- a/ext/boost/date_time/time_duration.hpp
+++ b/ext/boost/date_time/time_duration.hpp
@@ -2,15 +2,16 @@
 #define DATE_TIME_TIME_DURATION_HPP___
 
 /* Copyright (c) 2002,2003 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the 
+ * Use, modification and distribution is subject to the
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2009-06-04 04:24:49 -0400 (Thu, 04 Jun 2009) $
+ * $Date: 2012-10-10 12:05:03 -0700 (Wed, 10 Oct 2012) $
  */
 
 #include <boost/cstdint.hpp>
 #include <boost/operators.hpp>
+#include <boost/static_assert.hpp>
 #include <boost/date_time/time_defs.hpp>
 #include <boost/date_time/special_defs.hpp>
 #include <boost/date_time/compiler_config.hpp>
@@ -179,7 +180,7 @@ namespace date_time {
       return duration_type(ticks_);
     }
     //! Division operations on a duration with an integer.
-    duration_type operator/=(int divisor) 
+    duration_type operator/=(int divisor)
     {
       ticks_ = ticks_ / divisor;
       return duration_type(ticks_);
@@ -251,7 +252,7 @@ namespace date_time {
     }
 
   protected:
-    explicit time_duration(impl_type in) : ticks_(in) {};
+    explicit time_duration(impl_type in) : ticks_(in) {}
     impl_type ticks_;
   };
 
@@ -265,10 +266,20 @@ namespace date_time {
   class subsecond_duration : public base_duration
   {
   public:
+    typedef typename base_duration::impl_type impl_type;
     typedef typename base_duration::traits_type traits_type;
+
+  private:
+    // To avoid integer overflow we precompute the duration resolution conversion coefficient (ticket #3471)
+    BOOST_STATIC_ASSERT_MSG((traits_type::ticks_per_second >= frac_of_second ? traits_type::ticks_per_second % frac_of_second : frac_of_second % traits_type::ticks_per_second) == 0,\
+      "The base duration resolution must be a multiple of the subsecond duration resolution");
+    BOOST_STATIC_CONSTANT(boost::int64_t, adjustment_ratio = (traits_type::ticks_per_second >= frac_of_second ? traits_type::ticks_per_second / frac_of_second : frac_of_second / traits_type::ticks_per_second));
+
+  public:
     explicit subsecond_duration(boost::int64_t ss) :
-      base_duration(0,0,0,ss*traits_type::res_adjust()/frac_of_second)
-    {}
+      base_duration(impl_type(traits_type::ticks_per_second >= frac_of_second ? ss * adjustment_ratio : ss / adjustment_ratio))
+    {
+    }
   };
 
 
diff --git a/ext/boost/date_time/time_facet.hpp b/ext/boost/date_time/time_facet.hpp
index a456db9..8346ca3 100644
--- a/ext/boost/date_time/time_facet.hpp
+++ b/ext/boost/date_time/time_facet.hpp
@@ -7,7 +7,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author:  Martin Andrian, Jeff Garland, Bart Garst
- * $Date: 2010-06-09 12:39:31 -0400 (Wed, 09 Jun 2010) $
+ * $Date: 2012-09-22 09:04:10 -0700 (Sat, 22 Sep 2012) $
  */
 
 #include <cctype>
@@ -244,22 +244,22 @@ namespace date_time {
 #endif
 
     //! sets default formats for ptime, local_date_time, and time_duration
-    explicit time_facet(::size_t a_ref = 0)
-      : base_type(default_time_format, period_formatter_type(), special_values_formatter_type(), date_gen_formatter_type(), a_ref),
+    explicit time_facet(::size_t ref_arg = 0)
+      : base_type(default_time_format, period_formatter_type(), special_values_formatter_type(), date_gen_formatter_type(), ref_arg),
         m_time_duration_format(string_type(duration_sign_negative_only) + default_time_duration_format)
     {}
 
     //! Construct the facet with an explicitly specified format
-    explicit time_facet(const char_type* a_format,
-                        period_formatter_type period_formatter = period_formatter_type(),
+    explicit time_facet(const char_type* format_arg,
+                        period_formatter_type period_formatter_arg = period_formatter_type(),
                         const special_values_formatter_type& special_value_formatter = special_values_formatter_type(),
                         date_gen_formatter_type dg_formatter = date_gen_formatter_type(),
-                         ::size_t a_ref = 0)
-      : base_type(a_format,
-                  period_formatter,
+                         ::size_t ref_arg = 0)
+      : base_type(format_arg,
+                  period_formatter_arg,
                   special_value_formatter,
                   dg_formatter,
-                  a_ref),
+                  ref_arg),
         m_time_duration_format(string_type(duration_sign_negative_only) + default_time_duration_format)
     {}
 
@@ -278,56 +278,56 @@ namespace date_time {
       this->m_format = iso_time_format_extended_specifier;
     }
 
-    OutItrT put(OutItrT a_next,
-                std::ios_base& a_ios,
-                char_type a_fill,
-                const time_type& a_time) const
+    OutItrT put(OutItrT next_arg,
+                std::ios_base& ios_arg,
+                char_type fill_arg,
+                const time_type& time_arg) const
     {
-      if (a_time.is_special()) {
-        return this->do_put_special(a_next, a_ios, a_fill,
-                              a_time.date().as_special());
+      if (time_arg.is_special()) {
+        return this->do_put_special(next_arg, ios_arg, fill_arg,
+                              time_arg.date().as_special());
       }
-      string_type format(this->m_format);
+      string_type local_format(this->m_format);
 
       // %T and %R have to be replaced here since they are not standard
-      boost::algorithm::replace_all(format,
+      boost::algorithm::replace_all(local_format,
         boost::as_literal(formats_type::full_24_hour_time_format),
         boost::as_literal(formats_type::full_24_hour_time_expanded_format));
-      boost::algorithm::replace_all(format,
+      boost::algorithm::replace_all(local_format,
         boost::as_literal(formats_type::short_24_hour_time_format),
         boost::as_literal(formats_type::short_24_hour_time_expanded_format));
 
       string_type frac_str;
-      if (format.find(seconds_with_fractional_seconds_format) != string_type::npos) {
+      if (local_format.find(seconds_with_fractional_seconds_format) != string_type::npos) {
         // replace %s with %S.nnn
         frac_str =
-          fractional_seconds_as_string(a_time.time_of_day(), false);
-        char_type sep = std::use_facet<std::numpunct<char_type> >(a_ios.getloc()).decimal_point();
+          fractional_seconds_as_string(time_arg.time_of_day(), false);
+        char_type sep = std::use_facet<std::numpunct<char_type> >(ios_arg.getloc()).decimal_point();
 
         string_type replace_string(seconds_format);
         replace_string += sep;
         replace_string += frac_str;
-        boost::algorithm::replace_all(format,
+        boost::algorithm::replace_all(local_format,
                                       seconds_with_fractional_seconds_format,
                                       replace_string);
       }
       /* NOTE: replacing posix_zone_string_format must be done BEFORE
        * zone_name_format: "%ZP" & "%Z", if Z is checked first it will
        * incorrectly replace a zone_name where a posix_string should go */
-      if (format.find(posix_zone_string_format) != string_type::npos) {
-        if(a_time.zone_abbrev().empty()) {
+      if (local_format.find(posix_zone_string_format) != string_type::npos) {
+        if(time_arg.zone_abbrev().empty()) {
           // if zone_abbrev() returns an empty string, we want to
           // erase posix_zone_string_format from format
-          boost::algorithm::erase_all(format, posix_zone_string_format);
+          boost::algorithm::erase_all(local_format, posix_zone_string_format);
         }
         else{
-          boost::algorithm::replace_all(format,
+          boost::algorithm::replace_all(local_format,
                                         posix_zone_string_format,
-                                        a_time.zone_as_posix_string());
+                                        time_arg.zone_as_posix_string());
         }
       }
-      if (format.find(zone_name_format) != string_type::npos) {
-        if(a_time.zone_name().empty()) {
+      if (local_format.find(zone_name_format) != string_type::npos) {
+        if(time_arg.zone_name().empty()) {
           /* TODO: this'll probably create problems if a user places
            * the zone_*_format flag in the format with a ptime. This
            * code removes the flag from the default formats */
@@ -336,16 +336,16 @@ namespace date_time {
           // erase zone_name_format & one preceeding space
           std::basic_ostringstream<char_type> ss;
           ss << ' ' << zone_name_format;
-          boost::algorithm::erase_all(format, ss.str());
+          boost::algorithm::erase_all(local_format, ss.str());
         }
         else{
-          boost::algorithm::replace_all(format,
+          boost::algorithm::replace_all(local_format,
                                         zone_name_format,
-                                        a_time.zone_name());
+                                        time_arg.zone_name());
         }
       }
-      if (format.find(zone_abbrev_format) != string_type::npos) {
-        if(a_time.zone_abbrev(false).empty()) {
+      if (local_format.find(zone_abbrev_format) != string_type::npos) {
+        if(time_arg.zone_abbrev(false).empty()) {
           /* TODO: this'll probably create problems if a user places
            * the zone_*_format flag in the format with a ptime. This
            * code removes the flag from the default formats */
@@ -354,93 +354,93 @@ namespace date_time {
           // erase zone_abbrev_format & one preceeding space
           std::basic_ostringstream<char_type> ss;
           ss << ' ' << zone_abbrev_format;
-          boost::algorithm::erase_all(format, ss.str());
+          boost::algorithm::erase_all(local_format, ss.str());
         }
         else{
-          boost::algorithm::replace_all(format,
+          boost::algorithm::replace_all(local_format,
                                         zone_abbrev_format,
-                                        a_time.zone_abbrev(false));
+                                        time_arg.zone_abbrev(false));
         }
       }
-      if (format.find(zone_iso_extended_format) != string_type::npos) {
-        if(a_time.zone_name(true).empty()) {
+      if (local_format.find(zone_iso_extended_format) != string_type::npos) {
+        if(time_arg.zone_name(true).empty()) {
           /* TODO: this'll probably create problems if a user places
            * the zone_*_format flag in the format with a ptime. This
            * code removes the flag from the default formats */
 
           // if zone_name() returns an empty string, we want to
           // erase zone_iso_extended_format from format
-          boost::algorithm::erase_all(format, zone_iso_extended_format);
+          boost::algorithm::erase_all(local_format, zone_iso_extended_format);
         }
         else{
-          boost::algorithm::replace_all(format,
+          boost::algorithm::replace_all(local_format,
                                         zone_iso_extended_format,
-                                        a_time.zone_name(true));
+                                        time_arg.zone_name(true));
         }
       }
 
-      if (format.find(zone_iso_format) != string_type::npos) {
-        if(a_time.zone_abbrev(true).empty()) {
+      if (local_format.find(zone_iso_format) != string_type::npos) {
+        if(time_arg.zone_abbrev(true).empty()) {
           /* TODO: this'll probably create problems if a user places
            * the zone_*_format flag in the format with a ptime. This
            * code removes the flag from the default formats */
 
           // if zone_abbrev() returns an empty string, we want to
           // erase zone_iso_format from format
-          boost::algorithm::erase_all(format, zone_iso_format);
+          boost::algorithm::erase_all(local_format, zone_iso_format);
         }
         else{
-          boost::algorithm::replace_all(format,
+          boost::algorithm::replace_all(local_format,
                                         zone_iso_format,
-                                        a_time.zone_abbrev(true));
+                                        time_arg.zone_abbrev(true));
         }
       }
-      if (format.find(fractional_seconds_format) != string_type::npos) {
+      if (local_format.find(fractional_seconds_format) != string_type::npos) {
         // replace %f with nnnnnnn
         if (frac_str.empty()) {
-          frac_str = fractional_seconds_as_string(a_time.time_of_day(), false);
+          frac_str = fractional_seconds_as_string(time_arg.time_of_day(), false);
         }
-        boost::algorithm::replace_all(format,
+        boost::algorithm::replace_all(local_format,
                                       fractional_seconds_format,
                                       frac_str);
       }
 
-      if (format.find(fractional_seconds_or_none_format) != string_type::npos) {
+      if (local_format.find(fractional_seconds_or_none_format) != string_type::npos) {
         // replace %F with nnnnnnn or nothing if fs == 0
         frac_str =
-          fractional_seconds_as_string(a_time.time_of_day(), true);
+          fractional_seconds_as_string(time_arg.time_of_day(), true);
         if (frac_str.size()) {
-          char_type sep = std::use_facet<std::numpunct<char_type> >(a_ios.getloc()).decimal_point();
+          char_type sep = std::use_facet<std::numpunct<char_type> >(ios_arg.getloc()).decimal_point();
           string_type replace_string;
           replace_string += sep;
           replace_string += frac_str;
-          boost::algorithm::replace_all(format,
+          boost::algorithm::replace_all(local_format,
                                         fractional_seconds_or_none_format,
                                         replace_string);
         }
         else {
-          boost::algorithm::erase_all(format,
+          boost::algorithm::erase_all(local_format,
                                       fractional_seconds_or_none_format);
         }
       }
 
-      return this->do_put_tm(a_next, a_ios, a_fill,
-                       to_tm(a_time), format);
+      return this->do_put_tm(next_arg, ios_arg, fill_arg,
+                       to_tm(time_arg), local_format);
     }
 
     //! put function for time_duration
-    OutItrT put(OutItrT a_next,
-                std::ios_base& a_ios,
-                char_type a_fill,
-                const time_duration_type& a_time_dur) const
+    OutItrT put(OutItrT next_arg,
+                std::ios_base& ios_arg,
+                char_type fill_arg,
+                const time_duration_type& time_dur_arg) const
     {
-      if (a_time_dur.is_special()) {
-        return this->do_put_special(a_next, a_ios, a_fill,
-                              a_time_dur.get_rep().as_special());
+      if (time_dur_arg.is_special()) {
+        return this->do_put_special(next_arg, ios_arg, fill_arg,
+                              time_dur_arg.get_rep().as_special());
       }
 
       string_type format(m_time_duration_format);
-      if (a_time_dur.is_negative()) {
+      if (time_dur_arg.is_negative()) {
         // replace %- with minus sign.  Should we use the numpunct facet?
         boost::algorithm::replace_all(format,
                                       duration_sign_negative_only,
@@ -477,7 +477,7 @@ namespace date_time {
        */
       string_type hours_str;
       if (format.find(unrestricted_hours_format) != string_type::npos) {
-        hours_str = hours_as_string(a_time_dur);
+        hours_str = hours_as_string(time_dur_arg);
         boost::algorithm::replace_all(format, unrestricted_hours_format, hours_str);
       }
       // We still have to process restricted hours format specifier. In order to
@@ -485,7 +485,7 @@ namespace date_time {
       // restrict the stringified hours length to 2 characters.
       if (format.find(hours_format) != string_type::npos) {
         if (hours_str.empty())
-          hours_str = hours_as_string(a_time_dur);
+          hours_str = hours_as_string(time_dur_arg);
         BOOST_ASSERT(hours_str.length() <= 2);
         boost::algorithm::replace_all(format, hours_format, hours_str);
       }
@@ -494,8 +494,8 @@ namespace date_time {
       if (format.find(seconds_with_fractional_seconds_format) != string_type::npos) {
         // replace %s with %S.nnn
         frac_str =
-          fractional_seconds_as_string(a_time_dur, false);
-        char_type sep = std::use_facet<std::numpunct<char_type> >(a_ios.getloc()).decimal_point();
+          fractional_seconds_as_string(time_dur_arg, false);
+        char_type sep = std::use_facet<std::numpunct<char_type> >(ios_arg.getloc()).decimal_point();
 
         string_type replace_string(seconds_format);
         replace_string += sep;
@@ -507,7 +507,7 @@ namespace date_time {
       if (format.find(fractional_seconds_format) != string_type::npos) {
         // replace %f with nnnnnnn
         if (!frac_str.size()) {
-          frac_str = fractional_seconds_as_string(a_time_dur, false);
+          frac_str = fractional_seconds_as_string(time_dur_arg, false);
         }
         boost::algorithm::replace_all(format,
                                       fractional_seconds_format,
@@ -517,9 +517,9 @@ namespace date_time {
       if (format.find(fractional_seconds_or_none_format) != string_type::npos) {
         // replace %F with nnnnnnn or nothing if fs == 0
         frac_str =
-          fractional_seconds_as_string(a_time_dur, true);
+          fractional_seconds_as_string(time_dur_arg, true);
         if (frac_str.size()) {
-          char_type sep = std::use_facet<std::numpunct<char_type> >(a_ios.getloc()).decimal_point();
+          char_type sep = std::use_facet<std::numpunct<char_type> >(ios_arg.getloc()).decimal_point();
           string_type replace_string;
           replace_string += sep;
           replace_string += frac_str;
@@ -533,14 +533,14 @@ namespace date_time {
         }
       }
 
-      return this->do_put_tm(a_next, a_ios, a_fill,
-                       to_tm(a_time_dur), format);
+      return this->do_put_tm(next_arg, ios_arg, fill_arg,
+                       to_tm(time_dur_arg), format);
     }
 
-    OutItrT put(OutItrT next, std::ios_base& a_ios,
+    OutItrT put(OutItrT next, std::ios_base& ios_arg,
                 char_type fill, const period_type& p) const
     {
-      return this->m_period_formatter.put_period(next, a_ios, fill,p,*this);
+      return this->m_period_formatter.put_period(next, ios_arg, fill,p,*this);
     }
 
 
@@ -548,11 +548,11 @@ namespace date_time {
 
     static
     string_type
-    fractional_seconds_as_string(const time_duration_type& a_time,
+    fractional_seconds_as_string(const time_duration_type& time_arg,
                                  bool null_when_zero)
     {
       typename time_duration_type::fractional_seconds_type frac_sec =
-        a_time.fractional_seconds();
+        time_arg.fractional_seconds();
 
       if (null_when_zero && (frac_sec == 0)) {
         return string_type();
@@ -566,9 +566,9 @@ namespace date_time {
 
     static
     string_type
-    hours_as_string(const time_duration_type& a_time, int width = 2)
+    hours_as_string(const time_duration_type& time_arg, int width = 2)
     {
-      return integral_as_string(date_time::absolute_value(a_time.hours()), width);
+      return integral_as_string(date_time::absolute_value(time_arg.hours()), width);
     }
 
     template< typename IntT >
@@ -731,8 +731,8 @@ namespace date_time {
       static std::locale::id id;
 
       //! Constructor that takes a format string for a ptime
-      explicit time_input_facet(const string_type& format, ::size_t a_ref = 0)
-        : base_type(format, a_ref),
+      explicit time_input_facet(const string_type& format, ::size_t ref_arg = 0)
+        : base_type(format, ref_arg),
           m_time_duration_format(default_time_duration_format)
       { }
 
@@ -741,19 +741,19 @@ namespace date_time {
                                 const special_values_parser_type& sv_parser,
                                 const period_parser_type& per_parser,
                                 const date_gen_parser_type& date_gen_parser,
-                                ::size_t a_ref = 0)
+                                ::size_t ref_arg = 0)
         : base_type(format,
                     date_parser,
                     sv_parser,
                     per_parser,
                     date_gen_parser,
-                    a_ref),
+                    ref_arg),
           m_time_duration_format(default_time_duration_format)
       {}
 
       //! sets default formats for ptime, local_date_time, and time_duration
-      explicit time_input_facet(::size_t a_ref = 0)
-        : base_type(default_time_input_format, a_ref),
+      explicit time_input_facet(::size_t ref_arg = 0)
+        : base_type(default_time_input_format, ref_arg),
           m_time_duration_format(default_time_duration_format)
       { }
 
@@ -772,12 +772,12 @@ namespace date_time {
 
       InItrT get(InItrT& sitr,
                  InItrT& stream_end,
-                 std::ios_base& a_ios,
+                 std::ios_base& ios_arg,
                  period_type& p) const
       {
         p = this->m_period_parser.get_period(sitr,
                                              stream_end,
-                                             a_ios,
+                                             ios_arg,
                                              p,
                                              time_duration_type::unit(),
                                              *this);
@@ -789,7 +789,7 @@ namespace date_time {
 
       InItrT get(InItrT& sitr,
                  InItrT& stream_end,
-                 std::ios_base& a_ios,
+                 std::ios_base& ios_arg,
                  time_duration_type& td) const
       {
         // skip leading whitespace
@@ -813,10 +813,10 @@ namespace date_time {
         typename time_duration_type::fractional_seconds_type frac(0);
 
         typedef std::num_get<CharT, InItrT> num_get;
-        if(!std::has_facet<num_get>(a_ios.getloc())) {
+        if(!std::has_facet<num_get>(ios_arg.getloc())) {
           num_get* ng = new num_get();
-          std::locale loc = std::locale(a_ios.getloc(), ng);
-          a_ios.imbue(loc);
+          std::locale loc = std::locale(ios_arg.getloc(), ng);
+          ios_arg.imbue(loc);
         }
 
         const_itr itr(m_time_duration_format.begin());
@@ -928,27 +928,27 @@ namespace date_time {
       //! Parses a time object from the input stream
       InItrT get(InItrT& sitr,
                  InItrT& stream_end,
-                 std::ios_base& a_ios,
+                 std::ios_base& ios_arg,
                  time_type& t) const
       {
         string_type tz_str;
-        return get(sitr, stream_end, a_ios, t, tz_str, false);
+        return get(sitr, stream_end, ios_arg, t, tz_str, false);
       }
       //! Expects a time_zone in the input stream
       InItrT get_local_time(InItrT& sitr,
                             InItrT& stream_end,
-                            std::ios_base& a_ios,
+                            std::ios_base& ios_arg,
                             time_type& t,
                             string_type& tz_str) const
       {
-        return get(sitr, stream_end, a_ios, t, tz_str, true);
+        return get(sitr, stream_end, ios_arg, t, tz_str, true);
       }
 
     protected:
 
       InItrT get(InItrT& sitr,
                  InItrT& stream_end,
-                 std::ios_base& a_ios,
+                 std::ios_base& ios_arg,
                  time_type& t,
                  string_type& tz_str,
                  bool time_is_local) const
@@ -985,10 +985,10 @@ namespace date_time {
         day_type t_day(1);
 
         typedef std::num_get<CharT, InItrT> num_get;
-        if(!std::has_facet<num_get>(a_ios.getloc())) {
+        if(!std::has_facet<num_get>(ios_arg.getloc())) {
           num_get* ng = new num_get();
-          std::locale loc = std::locale(a_ios.getloc(), ng);
-          a_ios.imbue(loc);
+          std::locale loc = std::locale(ios_arg.getloc(), ng);
+          ios_arg.imbue(loc);
         }
 
         const_itr itr(this->m_format.begin());
diff --git a/ext/boost/date_time/time_formatting_streams.hpp b/ext/boost/date_time/time_formatting_streams.hpp
index 3537c10..2d07d34 100644
--- a/ext/boost/date_time/time_formatting_streams.hpp
+++ b/ext/boost/date_time/time_formatting_streams.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
+ * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $
  */
 
 #include <boost/date_time/compiler_config.hpp>
diff --git a/ext/boost/date_time/time_iterator.hpp b/ext/boost/date_time/time_iterator.hpp
index 2258a33..4c33f39 100644
--- a/ext/boost/date_time/time_iterator.hpp
+++ b/ext/boost/date_time/time_iterator.hpp
@@ -2,50 +2,50 @@
 #define DATE_TIME_TIME_ITERATOR_HPP___
 
 /* Copyright (c) 2002,2003 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the 
+ * Use, modification and distribution is subject to the
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2012-09-22 15:33:33 -0700 (Sat, 22 Sep 2012) $
  */
 
 
 namespace boost {
 namespace date_time {
-  
+
 
   //! Simple time iterator skeleton class
   template<class time_type>
   class time_itr {
   public:
     typedef typename time_type::time_duration_type time_duration_type;
-    time_itr(time_type t, time_duration_type d) : current_(t), offset_(d) {};
-    time_itr& operator++() 
+    time_itr(time_type t, time_duration_type d) : current_(t), offset_(d) {}
+    time_itr& operator++()
     {
       current_ = current_ + offset_;
       return *this;
     }
-    time_itr& operator--() 
+    time_itr& operator--()
     {
       current_ = current_ - offset_;
       return *this;
     }
-    time_type operator*() {return current_;};
-    time_type* operator->() {return &current_;};
-    bool operator<  (const time_type& t) {return current_ < t;};
-    bool operator<= (const time_type& t) {return current_ <= t;};
-    bool operator!=  (const time_type& t) {return current_ != t;};
-    bool operator== (const time_type& t) {return current_ == t;};
-    bool operator>  (const time_type& t) {return current_ > t;};
-    bool operator>= (const time_type& t) {return current_ >= t;};
-    
+    time_type operator*() {return current_;}
+    time_type* operator->() {return &current_;}
+    bool operator<  (const time_type& t) {return current_ < t;}
+    bool operator<= (const time_type& t) {return current_ <= t;}
+    bool operator!=  (const time_type& t) {return current_ != t;}
+    bool operator== (const time_type& t) {return current_ == t;}
+    bool operator>  (const time_type& t) {return current_ > t;}
+    bool operator>= (const time_type& t) {return current_ >= t;}
+
   private:
     time_type current_;
     time_duration_type offset_;
   };
-  
 
-  
+
+
 } }//namespace date_time
 
 
diff --git a/ext/boost/date_time/time_parsing.hpp b/ext/boost/date_time/time_parsing.hpp
index dfccf6a..7b71de0 100644
--- a/ext/boost/date_time/time_parsing.hpp
+++ b/ext/boost/date_time/time_parsing.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2012-10-10 12:05:03 -0700 (Wed, 10 Oct 2012) $
  */
 
 #include "boost/tokenizer.hpp"
@@ -116,6 +116,7 @@ namespace date_time {
         
         break;
       }
+      default: break;
       }//switch
       pos++;
     }
@@ -153,9 +154,10 @@ namespace date_time {
         std::string& first,
         std::string& second)
   {
-    int sep_pos = static_cast<int>(s.find(sep));
+    std::string::size_type sep_pos = s.find(sep);
     first = s.substr(0,sep_pos);
-    second = s.substr(sep_pos+1);
+    if (sep_pos!=std::string::npos)
+        second = s.substr(sep_pos+1);
     return true;
   }
 
@@ -280,6 +282,7 @@ namespace date_time {
             
             break;
           }
+          default: break;
       };
       pos++;
     }
diff --git a/ext/boost/date_time/time_resolution_traits.hpp b/ext/boost/date_time/time_resolution_traits.hpp
index 658f3d2..903830c 100644
--- a/ext/boost/date_time/time_resolution_traits.hpp
+++ b/ext/boost/date_time/time_resolution_traits.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2009-06-06 07:25:55 -0400 (Sat, 06 Jun 2009) $
+ * $Date: 2009-06-06 04:25:55 -0700 (Sat, 06 Jun 2009) $
  */
 
 
diff --git a/ext/boost/date_time/time_system_counted.hpp b/ext/boost/date_time/time_system_counted.hpp
index fa88390..5425f62 100644
--- a/ext/boost/date_time/time_system_counted.hpp
+++ b/ext/boost/date_time/time_system_counted.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 
diff --git a/ext/boost/date_time/time_system_split.hpp b/ext/boost/date_time/time_system_split.hpp
index 08ea1ec..6fc4a33 100644
--- a/ext/boost/date_time/time_system_split.hpp
+++ b/ext/boost/date_time/time_system_split.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-11-13 15:10:23 -0500 (Thu, 13 Nov 2008) $
+ * $Date: 2008-11-13 12:10:23 -0800 (Thu, 13 Nov 2008) $
  */
 
 
diff --git a/ext/boost/date_time/wrapping_int.hpp b/ext/boost/date_time/wrapping_int.hpp
index 969b078..e6f87d5 100644
--- a/ext/boost/date_time/wrapping_int.hpp
+++ b/ext/boost/date_time/wrapping_int.hpp
@@ -2,11 +2,11 @@
 #define _DATE_TIME_WRAPPING_INT_HPP__
 
 /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the 
+ * Use, modification and distribution is subject to the
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
+ * $Date: 2012-09-22 15:33:33 -0700 (Sat, 22 Sep 2012) $
  */
 
 
@@ -16,15 +16,15 @@ namespace date_time {
 //! A wrapping integer used to support time durations (WARNING: only instantiate with a signed type)
 /*! In composite date and time types this type is used to
  *  wrap at the day boundary.
- *  Ex: 
- *  A wrapping_int<short, 10> will roll over after nine, and 
+ *  Ex:
+ *  A wrapping_int<short, 10> will roll over after nine, and
  *  roll under below zero. This gives a range of [0,9]
  *
- * NOTE: it is strongly recommended that wrapping_int2 be used 
- * instead of wrapping_int as wrapping_int is to be depricated 
+ * NOTE: it is strongly recommended that wrapping_int2 be used
+ * instead of wrapping_int as wrapping_int is to be depricated
  * at some point soon.
  *
- * Also Note that warnings will occur if instantiated with an 
+ * Also Note that warnings will occur if instantiated with an
  * unsigned type. Only a signed type should be used!
  */
 template<typename int_type_, int_type_ wrap_val>
@@ -34,17 +34,17 @@ public:
   //typedef overflow_type_ overflow_type;
   static int_type wrap_value() {return wrap_val;}
   //!Add, return true if wrapped
-  wrapping_int(int_type v) : value_(v) {};
+  wrapping_int(int_type v) : value_(v) {}
   //! Explicit converion method
   int_type as_int()   const   {return value_;}
   operator int_type() const   {return value_;}
   //!Add, return number of wraps performed
-  /*! The sign of the returned value will indicate which direction the 
+  /*! The sign of the returned value will indicate which direction the
    * wraps went. Ex: add a negative number and wrapping under could occur,
-   * this would be indicated by a negative return value. If wrapping over 
+   * this would be indicated by a negative return value. If wrapping over
    * took place, a positive value would be returned */
   template< typename IntT >
-  IntT add(IntT v) 
+  IntT add(IntT v)
   {
     int_type remainder = static_cast<int_type>(v % (wrap_val));
     IntT overflow = static_cast<IntT>(v / (wrap_val));
@@ -53,12 +53,12 @@ public:
   }
   //! Subtract will return '+d' if wrapping under took place ('d' is the number of wraps)
   /*! The sign of the returned value will indicate which direction the
-   * wraps went (positive indicates wrap under, negative indicates wrap over). 
-   * Ex: subtract a negative number and wrapping over could 
-   * occur, this would be indicated by a negative return value. If 
+   * wraps went (positive indicates wrap under, negative indicates wrap over).
+   * Ex: subtract a negative number and wrapping over could
+   * occur, this would be indicated by a negative return value. If
    * wrapping under took place, a positive value would be returned. */
   template< typename IntT >
-  IntT subtract(IntT v) 
+  IntT subtract(IntT v)
   {
     int_type remainder = static_cast<int_type>(v % (wrap_val));
     IntT underflow = static_cast<IntT>(-(v / (wrap_val)));
@@ -71,19 +71,19 @@ private:
   template< typename IntT >
   IntT calculate_wrap(IntT wrap)
   {
-    if ((value_) >= wrap_val) 
+    if ((value_) >= wrap_val)
     {
       ++wrap;
       value_ -= (wrap_val);
     }
-    else if(value_ < 0) 
+    else if(value_ < 0)
     {
       --wrap;
       value_ += (wrap_val);
     }
     return wrap;
   }
-                  
+
 };
 
 
@@ -113,12 +113,12 @@ public:
   int_type as_int()   const   {return value_;}
   operator int_type() const {return value_;}
   //!Add, return number of wraps performed
-  /*! The sign of the returned value will indicate which direction the 
+  /*! The sign of the returned value will indicate which direction the
    * wraps went. Ex: add a negative number and wrapping under could occur,
-   * this would be indicated by a negative return value. If wrapping over 
+   * this would be indicated by a negative return value. If wrapping over
    * took place, a positive value would be returned */
   template< typename IntT >
-  IntT add(IntT v) 
+  IntT add(IntT v)
   {
     int_type remainder = static_cast<int_type>(v % (wrap_max - wrap_min + 1));
     IntT overflow = static_cast<IntT>(v / (wrap_max - wrap_min + 1));
@@ -127,30 +127,30 @@ public:
   }
   //! Subtract will return '-d' if wrapping under took place ('d' is the number of wraps)
   /*! The sign of the returned value will indicate which direction the
-   * wraps went. Ex: subtract a negative number and wrapping over could 
-   * occur, this would be indicated by a positive return value. If 
+   * wraps went. Ex: subtract a negative number and wrapping over could
+   * occur, this would be indicated by a positive return value. If
    * wrapping under took place, a negative value would be returned */
   template< typename IntT >
-  IntT subtract(IntT v) 
+  IntT subtract(IntT v)
   {
     int_type remainder = static_cast<int_type>(v % (wrap_max - wrap_min + 1));
     IntT underflow = static_cast<IntT>(-(v / (wrap_max - wrap_min + 1)));
     value_ = static_cast<int_type>(value_ - remainder);
     return calculate_wrap(underflow);
   }
-            
+
 private:
   int_type value_;
 
   template< typename IntT >
   IntT calculate_wrap(IntT wrap)
   {
-    if ((value_) > wrap_max) 
+    if ((value_) > wrap_max)
     {
       ++wrap;
       value_ -= (wrap_max - wrap_min + 1);
     }
-    else if((value_) < wrap_min) 
+    else if((value_) < wrap_min)
     {
       --wrap;
       value_ += (wrap_max - wrap_min + 1);
diff --git a/ext/boost/date_time/year_month_day.hpp b/ext/boost/date_time/year_month_day.hpp
index 802ce42..9340e53 100644
--- a/ext/boost/date_time/year_month_day.hpp
+++ b/ext/boost/date_time/year_month_day.hpp
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland 
- * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
+ * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $
  */
 
 namespace boost {
diff --git a/ext/boost/detail/._indirect_traits.hpp b/ext/boost/detail/._indirect_traits.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/detail/._indirect_traits.hpp and /dev/null differ
diff --git a/ext/boost/detail/._iterator.hpp b/ext/boost/detail/._iterator.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/detail/._iterator.hpp and /dev/null differ
diff --git a/ext/boost/detail/._lcast_precision.hpp b/ext/boost/detail/._lcast_precision.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/detail/._lcast_precision.hpp and /dev/null differ
diff --git a/ext/boost/detail/._limits.hpp b/ext/boost/detail/._limits.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/detail/._limits.hpp and /dev/null differ
diff --git a/ext/boost/detail/._no_exceptions_support.hpp b/ext/boost/detail/._no_exceptions_support.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/detail/._no_exceptions_support.hpp and /dev/null differ
diff --git a/ext/boost/detail/._reference_content.hpp b/ext/boost/detail/._reference_content.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/detail/._reference_content.hpp and /dev/null differ
diff --git a/ext/boost/detail/._workaround.hpp b/ext/boost/detail/._workaround.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/detail/._workaround.hpp and /dev/null differ
diff --git a/ext/boost/detail/call_traits.hpp b/ext/boost/detail/call_traits.hpp
deleted file mode 100644
index 6ad646e..0000000
--- a/ext/boost/detail/call_traits.hpp
+++ /dev/null
@@ -1,164 +0,0 @@
-//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
-//  Use, modification and distribution are subject to the Boost Software License,
-//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-//  http://www.boost.org/LICENSE_1_0.txt).
-//
-//  See http://www.boost.org/libs/utility for most recent version including documentation.
-
-// call_traits: defines typedefs for function usage
-// (see libs/utility/call_traits.htm)
-
-/* Release notes:
-   23rd July 2000:
-      Fixed array specialization. (JM)
-      Added Borland specific fixes for reference types
-      (issue raised by Steve Cleary).
-*/
-
-#ifndef BOOST_DETAIL_CALL_TRAITS_HPP
-#define BOOST_DETAIL_CALL_TRAITS_HPP
-
-#ifndef BOOST_CONFIG_HPP
-#include <boost/config.hpp>
-#endif
-#include <cstddef>
-
-#include <boost/type_traits/is_arithmetic.hpp>
-#include <boost/type_traits/is_pointer.hpp>
-#include <boost/detail/workaround.hpp>
-
-namespace boost{
-
-namespace detail{
-
-template <typename T, bool small_>
-struct ct_imp2
-{
-   typedef const T& param_type;
-};
-
-template <typename T>
-struct ct_imp2<T, true>
-{
-   typedef const T param_type;
-};
-
-template <typename T, bool isp, bool b1>
-struct ct_imp
-{
-   typedef const T& param_type;
-};
-
-template <typename T, bool isp>
-struct ct_imp<T, isp, true>
-{
-   typedef typename ct_imp2<T, sizeof(T) <= sizeof(void*)>::param_type param_type;
-};
-
-template <typename T, bool b1>
-struct ct_imp<T, true, b1>
-{
-   typedef const T param_type;
-};
-
-}
-
-template <typename T>
-struct call_traits
-{
-public:
-   typedef T value_type;
-   typedef T& reference;
-   typedef const T& const_reference;
-   //
-   // C++ Builder workaround: we should be able to define a compile time
-   // constant and pass that as a single template parameter to ct_imp<T,bool>,
-   // however compiler bugs prevent this - instead pass three bool's to
-   // ct_imp<T,bool,bool,bool> and add an extra partial specialisation
-   // of ct_imp to handle the logic. (JM)
-   typedef typename boost::detail::ct_imp<
-      T,
-      ::boost::is_pointer<T>::value,
-      ::boost::is_arithmetic<T>::value
-   >::param_type param_type;
-};
-
-template <typename T>
-struct call_traits<T&>
-{
-   typedef T& value_type;
-   typedef T& reference;
-   typedef const T& const_reference;
-   typedef T& param_type;  // hh removed const
-};
-
-#if BOOST_WORKAROUND( __BORLANDC__,  < 0x5A0 )
-// these are illegal specialisations; cv-qualifies applied to
-// references have no effect according to [8.3.2p1],
-// C++ Builder requires them though as it treats cv-qualified
-// references as distinct types...
-template <typename T>
-struct call_traits<T&const>
-{
-   typedef T& value_type;
-   typedef T& reference;
-   typedef const T& const_reference;
-   typedef T& param_type;  // hh removed const
-};
-template <typename T>
-struct call_traits<T&volatile>
-{
-   typedef T& value_type;
-   typedef T& reference;
-   typedef const T& const_reference;
-   typedef T& param_type;  // hh removed const
-};
-template <typename T>
-struct call_traits<T&const volatile>
-{
-   typedef T& value_type;
-   typedef T& reference;
-   typedef const T& const_reference;
-   typedef T& param_type;  // hh removed const
-};
-
-template <typename T>
-struct call_traits< T * >
-{
-   typedef T * value_type;
-   typedef T * & reference;
-   typedef T * const & const_reference;
-   typedef T * const param_type;  // hh removed const
-};
-#endif
-#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
-template <typename T, std::size_t N>
-struct call_traits<T [N]>
-{
-private:
-   typedef T array_type[N];
-public:
-   // degrades array to pointer:
-   typedef const T* value_type;
-   typedef array_type& reference;
-   typedef const array_type& const_reference;
-   typedef const T* const param_type;
-};
-
-template <typename T, std::size_t N>
-struct call_traits<const T [N]>
-{
-private:
-   typedef const T array_type[N];
-public:
-   // degrades array to pointer:
-   typedef const T* value_type;
-   typedef array_type& reference;
-   typedef const array_type& const_reference;
-   typedef const T* const param_type;
-};
-#endif
-
-}
-
-#endif // BOOST_DETAIL_CALL_TRAITS_HPP
diff --git a/ext/boost/detail/container_fwd.hpp b/ext/boost/detail/container_fwd.hpp
new file mode 100644
index 0000000..ef17498
--- /dev/null
+++ b/ext/boost/detail/container_fwd.hpp
@@ -0,0 +1,162 @@
+
+// Copyright 2005-2011 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// Note: if you change this include guard, you also need to change
+// container_fwd_compile_fail.cpp
+#if !defined(BOOST_DETAIL_CONTAINER_FWD_HPP)
+#define BOOST_DETAIL_CONTAINER_FWD_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020) && \
+    !defined(BOOST_DETAIL_TEST_CONFIG_ONLY)
+# pragma once
+#endif
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+////////////////////////////////////////////////////////////////////////////////
+//                                                                            //
+// Define BOOST_DETAIL_NO_CONTAINER_FWD if you don't want this header to      //
+// forward declare standard containers.                                       //
+//                                                                            //
+// BOOST_DETAIL_CONTAINER_FWD to make it foward declare containers even if it //
+// normally doesn't.                                                          //
+//                                                                            //
+// BOOST_DETAIL_NO_CONTAINER_FWD overrides BOOST_DETAIL_CONTAINER_FWD.        //
+//                                                                            //
+////////////////////////////////////////////////////////////////////////////////
+
+#if !defined(BOOST_DETAIL_NO_CONTAINER_FWD)
+#  if defined(BOOST_DETAIL_CONTAINER_FWD)
+     // Force forward declarations.
+#  elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
+     // STLport
+#    define BOOST_DETAIL_NO_CONTAINER_FWD
+#  elif defined(__LIBCOMO__)
+     // Comeau STL:
+#    define BOOST_DETAIL_NO_CONTAINER_FWD
+#  elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
+     // Rogue Wave library:
+#    define BOOST_DETAIL_NO_CONTAINER_FWD
+#  elif defined(_LIBCPP_VERSION)
+     // libc++
+#    define BOOST_DETAIL_NO_CONTAINER_FWD
+#  elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
+     // GNU libstdc++ 3
+     //
+     // Disable forwarding for all recent versions, as the library has a
+     // versioned namespace mode, and I don't know how to detect it.
+#    if __GLIBCXX__ >= 20070513 \
+        || defined(_GLIBCXX_DEBUG) \
+        || defined(_GLIBCXX_PARALLEL) \
+        || defined(_GLIBCXX_PROFILE)
+#      define BOOST_DETAIL_NO_CONTAINER_FWD
+#    else
+#      if defined(__GLIBCXX__) && __GLIBCXX__ >= 20040530
+#        define BOOST_CONTAINER_FWD_COMPLEX_STRUCT
+#      endif
+#    endif
+#  elif defined(__STL_CONFIG_H)
+     // generic SGI STL
+     //
+     // Forward declaration seems to be okay, but it has a couple of odd
+     // implementations.
+#    define BOOST_CONTAINER_FWD_BAD_BITSET
+#    if !defined(__STL_NON_TYPE_TMPL_PARAM_BUG)
+#      define BOOST_CONTAINER_FWD_BAD_DEQUE
+#     endif
+#  elif defined(__MSL_CPP__)
+     // MSL standard lib:
+#    define BOOST_DETAIL_NO_CONTAINER_FWD
+#  elif defined(__IBMCPP__)
+     // The default VACPP std lib, forward declaration seems to be fine.
+#  elif defined(MSIPL_COMPILE_H)
+     // Modena C++ standard library
+#    define BOOST_DETAIL_NO_CONTAINER_FWD
+#  elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
+     // Dinkumware Library (this has to appear after any possible replacement
+     // libraries)
+#  else
+#    define BOOST_DETAIL_NO_CONTAINER_FWD
+#  endif
+#endif
+
+#if !defined(BOOST_DETAIL_TEST_CONFIG_ONLY)
+
+#if defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \
+    !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD)
+
+#include <deque>
+#include <list>
+#include <vector>
+#include <map>
+#include <set>
+#include <bitset>
+#include <string>
+#include <complex>
+
+#else
+
+#include <cstddef>
+
+#if defined(BOOST_CONTAINER_FWD_BAD_DEQUE)
+#include <deque>
+#endif
+
+#if defined(BOOST_CONTAINER_FWD_BAD_BITSET)
+#include <bitset>
+#endif
+
+#if defined(BOOST_MSVC)
+#pragma warning(push)
+#pragma warning(disable:4099) // struct/class mismatch in fwd declarations
+#endif
+
+namespace std
+{
+    template <class T> class allocator;
+    template <class charT, class traits, class Allocator> class basic_string;
+
+#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+
+    template <class charT> struct string_char_traits;
+#else
+    template <class charT> struct char_traits;
+#endif
+
+#if defined(BOOST_CONTAINER_FWD_COMPLEX_STRUCT)
+    template <class T> struct complex;
+#else
+    template <class T> class complex;
+#endif
+
+#if !defined(BOOST_CONTAINER_FWD_BAD_DEQUE)
+    template <class T, class Allocator> class deque;
+#endif
+
+    template <class T, class Allocator> class list;
+    template <class T, class Allocator> class vector;
+    template <class Key, class T, class Compare, class Allocator> class map;
+    template <class Key, class T, class Compare, class Allocator>
+    class multimap;
+    template <class Key, class Compare, class Allocator> class set;
+    template <class Key, class Compare, class Allocator> class multiset;
+
+#if !defined(BOOST_CONTAINER_FWD_BAD_BITSET)
+    template <size_t N> class bitset;
+#endif
+    template <class T1, class T2> struct pair;
+}
+
+#if defined(BOOST_MSVC)
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_DETAIL_NO_CONTAINER_FWD &&
+       // !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD)
+
+#endif // BOOST_DETAIL_TEST_CONFIG_ONLY
+
+#endif
diff --git a/ext/boost/detail/endian.hpp b/ext/boost/detail/endian.hpp
index 5f9b90e..98c870c 100644
--- a/ext/boost/detail/endian.hpp
+++ b/ext/boost/detail/endian.hpp
@@ -44,11 +44,13 @@
 # endif
 # define BOOST_BYTE_ORDER __BYTE_ORDER
 #elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || \
-    defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
+    defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) || \
+    defined(_STLP_BIG_ENDIAN) && !defined(_STLP_LITTLE_ENDIAN)
 # define BOOST_BIG_ENDIAN
 # define BOOST_BYTE_ORDER 4321
 #elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) || \
-    defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
+    defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) || \
+    defined(_STLP_LITTLE_ENDIAN) && !defined(_STLP_BIG_ENDIAN)
 # define BOOST_LITTLE_ENDIAN
 # define BOOST_BYTE_ORDER 1234
 #elif defined(__sparc) || defined(__sparc__) \
diff --git a/ext/boost/detail/fenv.hpp b/ext/boost/detail/fenv.hpp
new file mode 100644
index 0000000..f048706
--- /dev/null
+++ b/ext/boost/detail/fenv.hpp
@@ -0,0 +1,74 @@
+/*=============================================================================
+    Copyright (c) 2010      Bryce Lelbach
+
+    Distributed under the Boost Software License, Version 1.0. (See accompanying
+    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+#include <boost/config.hpp>
+
+#if defined(BOOST_NO_FENV_H)
+  #error This platform does not have a floating point environment
+#endif
+
+#if !defined(BOOST_DETAIL_FENV_HPP)
+#define BOOST_DETAIL_FENV_HPP
+
+/* If we're using clang + glibc, we have to get hacky. 
+ * See http://llvm.org/bugs/show_bug.cgi?id=6907 */
+#if defined(__clang__)       &&  (__clang_major__ < 3) &&    \
+    defined(__GNU_LIBRARY__) && /* up to version 5 */ \
+    defined(__GLIBC__) &&         /* version 6 + */ \
+    !defined(_FENV_H)
+  #define _FENV_H
+
+  #include <features.h>
+  #include <bits/fenv.h>
+
+  extern "C" {
+    extern int fegetexceptflag (fexcept_t*, int) __THROW;
+    extern int fesetexceptflag (__const fexcept_t*, int) __THROW;
+    extern int feclearexcept (int) __THROW;
+    extern int feraiseexcept (int) __THROW;
+    extern int fetestexcept (int) __THROW;
+    extern int fegetround (void) __THROW;
+    extern int fesetround (int) __THROW;
+    extern int fegetenv (fenv_t*) __THROW;
+    extern int fesetenv (__const fenv_t*) __THROW;
+    extern int feupdateenv (__const fenv_t*) __THROW;
+    extern int feholdexcept (fenv_t*) __THROW;
+
+    #ifdef __USE_GNU
+      extern int feenableexcept (int) __THROW;
+      extern int fedisableexcept (int) __THROW;
+      extern int fegetexcept (void) __THROW;
+    #endif
+  }
+
+  namespace std { namespace tr1 {
+    using ::fenv_t;
+    using ::fexcept_t;
+    using ::fegetexceptflag;
+    using ::fesetexceptflag;
+    using ::feclearexcept;
+    using ::feraiseexcept;
+    using ::fetestexcept;
+    using ::fegetround;
+    using ::fesetround;
+    using ::fegetenv;
+    using ::fesetenv;
+    using ::feupdateenv;
+    using ::feholdexcept;
+  } }
+
+#else /* if we're not using GNU's C stdlib, fenv.h should work with clang */
+  #if defined(__SUNPRO_CC) /* lol suncc */
+    #include <stdio.h>
+  #endif
+  
+  #include <fenv.h>
+
+#endif
+
+#endif /* BOOST_DETAIL_FENV_HPP */
+ 
diff --git a/ext/boost/detail/is_incrementable.hpp b/ext/boost/detail/is_incrementable.hpp
new file mode 100644
index 0000000..e7ef9dc
--- /dev/null
+++ b/ext/boost/detail/is_incrementable.hpp
@@ -0,0 +1,134 @@
+// Copyright David Abrahams 2004. Use, modification and distribution is
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef IS_INCREMENTABLE_DWA200415_HPP
+# define IS_INCREMENTABLE_DWA200415_HPP
+
+# include <boost/type_traits/detail/template_arity_spec.hpp>
+# include <boost/type_traits/remove_cv.hpp>
+# include <boost/mpl/aux_/lambda_support.hpp>
+# include <boost/mpl/bool.hpp>
+# include <boost/detail/workaround.hpp>
+
+// Must be the last include
+# include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost { namespace detail { 
+
+// is_incrementable<T> metafunction
+//
+// Requires: Given x of type T&, if the expression ++x is well-formed
+// it must have complete type; otherwise, it must neither be ambiguous
+// nor violate access.
+
+// This namespace ensures that ADL doesn't mess things up.
+namespace is_incrementable_
+{
+  // a type returned from operator++ when no increment is found in the
+  // type's own namespace
+  struct tag {};
+  
+  // any soaks up implicit conversions and makes the following
+  // operator++ less-preferred than any other such operator that
+  // might be found via ADL.
+  struct any { template <class T> any(T const&); };
+
+  // This is a last-resort operator++ for when none other is found
+# if BOOST_WORKAROUND(__GNUC__, == 4) && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 2
+  
+}
+
+namespace is_incrementable_2
+{
+  is_incrementable_::tag operator++(is_incrementable_::any const&);
+  is_incrementable_::tag operator++(is_incrementable_::any const&,int);
+}
+using namespace is_incrementable_2;
+
+namespace is_incrementable_
+{
+  
+# else
+  
+  tag operator++(any const&);
+  tag operator++(any const&,int);
+  
+# endif 
+
+# if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \
+    || BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+#  define BOOST_comma(a,b) (a)
+# else 
+  // In case an operator++ is found that returns void, we'll use ++x,0
+  tag operator,(tag,int);  
+#  define BOOST_comma(a,b) (a,b)
+# endif 
+
+# if defined(BOOST_MSVC)
+#  pragma warning(push)
+#  pragma warning(disable:4913) // Warning about operator,
+# endif 
+
+  // two check overloads help us identify which operator++ was picked
+  char (& check_(tag) )[2];
+  
+  template <class T>
+  char check_(T const&);
+  
+
+  template <class T>
+  struct impl
+  {
+      static typename boost::remove_cv<T>::type& x;
+
+      BOOST_STATIC_CONSTANT(
+          bool
+        , value = sizeof(is_incrementable_::check_(BOOST_comma(++x,0))) == 1
+      );
+  };
+
+  template <class T>
+  struct postfix_impl
+  {
+      static typename boost::remove_cv<T>::type& x;
+
+      BOOST_STATIC_CONSTANT(
+          bool
+        , value = sizeof(is_incrementable_::check_(BOOST_comma(x++,0))) == 1
+      );
+  };
+
+# if defined(BOOST_MSVC)
+#  pragma warning(pop)
+# endif 
+
+}
+
+# undef BOOST_comma
+
+template<typename T> 
+struct is_incrementable 
+BOOST_TT_AUX_BOOL_C_BASE(::boost::detail::is_incrementable_::impl<T>::value)
+{ 
+    BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(::boost::detail::is_incrementable_::impl<T>::value)
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_incrementable,(T))
+};
+
+template<typename T> 
+struct is_postfix_incrementable 
+BOOST_TT_AUX_BOOL_C_BASE(::boost::detail::is_incrementable_::impl<T>::value)
+{ 
+    BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(::boost::detail::is_incrementable_::postfix_impl<T>::value)
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_postfix_incrementable,(T))
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1, ::boost::detail::is_incrementable)
+BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1, ::boost::detail::is_postfix_incrementable)
+
+} // namespace boost
+
+# include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // IS_INCREMENTABLE_DWA200415_HPP
diff --git a/ext/boost/detail/scoped_enum_emulation.hpp b/ext/boost/detail/scoped_enum_emulation.hpp
new file mode 100644
index 0000000..80394cf
--- /dev/null
+++ b/ext/boost/detail/scoped_enum_emulation.hpp
@@ -0,0 +1,337 @@
+//  scoped_enum_emulation.hpp  ---------------------------------------------------------//
+
+//  Copyright Beman Dawes, 2009
+//  Copyright (C) 2011-2012 Vicente J. Botet Escriba
+//  Copyright (C) 2012 Anthony Williams
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+/*
+[section:scoped_enums Scoped Enums]
+
+Generates C++0x scoped enums if the feature is present, otherwise emulates C++0x
+scoped enums with C++03 namespaces and enums. The Boost.Config BOOST_NO_SCOPED_ENUMS
+macro is used to detect feature support.
+
+See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf for a
+description of the scoped enum feature. Note that the committee changed the name
+from strongly typed enum to scoped enum.
+
+Some of the enumerations defined in the standard library are scoped enums.
+
+  enum class future_errc
+  {
+      broken_promise,
+      future_already_retrieved,
+      promise_already_satisfied,
+      no_state
+  };
+
+On compilers that don't support them, the library provides two emulations:
+
+[heading Strict]
+
+* Able to specify the underlying type.
+* explicit conversion to/from underlying type.
+* The wrapper is not a C++03 enum type.
+
+The user can declare  declare these types as
+
+  BOOST_SCOPED_ENUM_DECLARE_BEGIN(future_errc)
+  {
+      broken_promise,
+      future_already_retrieved,
+      promise_already_satisfied,
+      no_state
+  }
+  BOOST_SCOPED_ENUM_DECLARE_END(future_errc)
+
+These macros allows to use 'future_errc' in almost all the cases as an scoped enum.
+
+  future_errc err = future_errc::no_state;
+
+There are however some limitations:
+
+* The type is not a C++ enum, so 'is_enum<future_errc>' will be false_type.
+* The emulated scoped enum can not be used in switch nor in template arguments. For these cases the user needs to use some macros.
+
+Instead of
+
+        switch (ev)
+        {
+        case future_errc::broken_promise:
+  // ...
+
+use
+
+        switch (boost::native_value(ev))
+        {
+        case future_errc::broken_promise:
+
+And instead of
+
+    #ifdef BOOST_NO_SCOPED_ENUMS
+    template <>
+    struct BOOST_SYMBOL_VISIBLE is_error_code_enum<future_errc> : public true_type { };
+    #endif
+
+use
+
+    #ifdef BOOST_NO_SCOPED_ENUMS
+    template <>
+    struct BOOST_SYMBOL_VISIBLE is_error_code_enum<future_errc::enum_type > : public true_type { };
+    #endif
+
+
+Sample usage:
+
+     BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(algae, char) { green, red, cyan }; BOOST_SCOPED_ENUM_DECLARE_END(algae)
+     ...
+     algae sample( algae::red );
+     void foo( algae color );
+     ...
+     sample = algae::green;
+     foo( algae::cyan );
+
+ Light
+  Caution: only the syntax is emulated; the semantics are not emulated and
+  the syntax emulation doesn't include being able to specify the underlying
+  representation type.
+
+  The literal scoped emulation is via struct rather than namespace to allow use within classes.
+  Thanks to Andrey Semashev for pointing that out.
+  However the type is an real C++03 enum and so convertible implicitly to an int.
+
+  Sample usage:
+
+     BOOST_SCOPED_ENUM_START(algae) { green, red, cyan }; BOOST_SCOPED_ENUM_END
+     ...
+     BOOST_SCOPED_ENUM(algae) sample( algae::red );
+     void foo( BOOST_SCOPED_ENUM(algae) color );
+     ...
+     sample = algae::green;
+     foo( algae::cyan );
+
+  Helpful comments and suggestions were also made by Kjell Elster, Phil Endecott,
+  Joel Falcou, Mathias Gaunard, Felipe Magno de Almeida, Matt Calabrese, Vicente
+  Botet, and Daniel James.
+
+[endsect]
+*/
+
+
+#ifndef BOOST_SCOPED_ENUM_EMULATION_HPP
+#define BOOST_SCOPED_ENUM_EMULATION_HPP
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+namespace boost
+{
+
+#ifdef BOOST_NO_SCOPED_ENUMS
+  /**
+   * Meta-function to get the underlying type of a scoped enum.
+   *
+   * Requires EnumType must be an enum type or the emulation of a scoped enum
+   */
+  template <typename EnumType>
+  struct underlying_type
+  {
+    /**
+     * The member typedef type names the underlying type of EnumType. It is EnumType::underlying_type when the EnumType is an emulated scoped enum,
+     * std::underlying_type<EnumType>::type when the standard library std::underlying_type is provided.
+     *
+     * The user will need to specialize it when the compiler supports scoped enums but don't provides std::underlying_type.
+     */
+    typedef typename EnumType::underlying_type type;
+  };
+
+  /**
+   * Meta-function to get the native enum type associated to an enum class or its emulation.
+   */
+  template <typename EnumType>
+  struct native_type
+  {
+    /**
+     * The member typedef type names the native enum type associated to the scoped enum,
+     * which is it self if the compiler supports scoped enums or EnumType::enum_type if it is an emulated scoped enum.
+     */
+    typedef typename EnumType::enum_type type;
+  };
+
+  /**
+   * Casts a scoped enum to its underlying type.
+   *
+   * This function is useful when working with scoped enum classes, which doens't implicitly convert to the underlying type.
+   * @param v A scoped enum.
+   * @returns The underlying type.
+   * @throws No-throws.
+   */
+  template <typename UnderlyingType, typename EnumType>
+  UnderlyingType underlying_cast(EnumType v)
+  {
+    return v.get_underlying_value_();
+  }
+
+  /**
+   * Casts a scoped enum to its native enum type.
+   *
+   * This function is useful to make programs portable when the scoped enum emulation can not be use where native enums can.
+   *
+   * EnumType the scoped enum type
+   *
+   * @param v A scoped enum.
+   * @returns The native enum value.
+   * @throws No-throws.
+   */
+  template <typename EnumType>
+  inline
+  typename EnumType::enum_type native_value(EnumType e)
+  {
+    return e.native_value_();
+  }
+
+#else  // BOOST_NO_SCOPED_ENUMS
+
+  template <typename EnumType>
+  struct underlying_type
+  {
+    //typedef typename std::underlying_type<EnumType>::type type;
+  };
+
+  template <typename EnumType>
+  struct native_type
+  {
+    typedef EnumType type;
+  };
+
+  template <typename UnderlyingType, typename EnumType>
+  UnderlyingType underlying_cast(EnumType v)
+  {
+    return static_cast<UnderlyingType>(v);
+  }
+
+  template <typename EnumType>
+  inline
+  EnumType native_value(EnumType e)
+  {
+    return e;
+ }
+
+#endif
+}
+
+
+#ifdef BOOST_NO_SCOPED_ENUMS
+
+#ifndef BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+
+#define BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR \
+     explicit operator underlying_type() const { return get_underlying_value_(); }
+
+#else
+
+#define BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR
+
+#endif
+
+/**
+ * Start a declaration of a scoped enum.
+ *
+ * @param EnumType The new scoped enum.
+ * @param UnderlyingType The underlying type.
+ */
+#define BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType, UnderlyingType)    \
+    struct EnumType {                                                   \
+        typedef UnderlyingType underlying_type;                         \
+        EnumType() BOOST_NOEXCEPT {}                                    \
+        explicit EnumType(underlying_type v) : v_(v) {}                 \
+        underlying_type get_underlying_value_() const { return v_; }               \
+        BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR                \
+    private:                                                            \
+        underlying_type v_;                                             \
+        typedef EnumType self_type;                                     \
+    public:                                                             \
+        enum enum_type
+
+#define BOOST_SCOPED_ENUM_DECLARE_END2() \
+        enum_type get_native_value_() const BOOST_NOEXCEPT { return enum_type(v_); } \
+        operator enum_type() const BOOST_NOEXCEPT { return get_native_value_(); } \
+        friend bool operator ==(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)==enum_type(rhs.v_); } \
+        friend bool operator ==(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)==rhs; } \
+        friend bool operator ==(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs==enum_type(rhs.v_); } \
+        friend bool operator !=(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)!=enum_type(rhs.v_); } \
+        friend bool operator !=(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)!=rhs; } \
+        friend bool operator !=(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs!=enum_type(rhs.v_); } \
+        friend bool operator <(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)<enum_type(rhs.v_); } \
+        friend bool operator <(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)<rhs; } \
+        friend bool operator <(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs<enum_type(rhs.v_); } \
+        friend bool operator <=(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)<=enum_type(rhs.v_); } \
+        friend bool operator <=(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)<=rhs; } \
+        friend bool operator <=(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs<=enum_type(rhs.v_); } \
+        friend bool operator >(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>enum_type(rhs.v_); } \
+        friend bool operator >(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>rhs; } \
+        friend bool operator >(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs>enum_type(rhs.v_); } \
+        friend bool operator >=(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>=enum_type(rhs.v_); } \
+        friend bool operator >=(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>=rhs; } \
+        friend bool operator >=(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs>=enum_type(rhs.v_); } \
+    };
+
+#define BOOST_SCOPED_ENUM_DECLARE_END(EnumType) \
+    ; \
+    EnumType(enum_type v) BOOST_NOEXCEPT : v_(v) {}                 \
+    BOOST_SCOPED_ENUM_DECLARE_END2()
+
+/**
+ * Starts a declaration of a scoped enum with the default int underlying type.
+ *
+ * @param EnumType The new scoped enum.
+ */
+#define BOOST_SCOPED_ENUM_DECLARE_BEGIN(EnumType) \
+  BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType,int)
+
+/**
+ * Name of the native enum type.
+ *
+ * @param NT The new scoped enum.
+ */
+#define BOOST_SCOPED_ENUM_NATIVE(EnumType) EnumType::enum_type
+/**
+ * Forward declares an scoped enum.
+ *
+ * @param NT The scoped enum.
+ */
+#define BOOST_SCOPED_ENUM_FORWARD_DECLARE(EnumType) struct EnumType
+
+#else  // BOOST_NO_SCOPED_ENUMS
+
+#define BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType,UnderlyingType) enum class EnumType:UnderlyingType
+#define BOOST_SCOPED_ENUM_DECLARE_BEGIN(EnumType) enum class EnumType
+#define BOOST_SCOPED_ENUM_DECLARE_END2()
+#define BOOST_SCOPED_ENUM_DECLARE_END(EnumType) ;
+
+#define BOOST_SCOPED_ENUM_NATIVE(EnumType) EnumType
+#define BOOST_SCOPED_ENUM_FORWARD_DECLARE(EnumType) enum class EnumType
+
+#endif  // BOOST_NO_SCOPED_ENUMS
+
+#define BOOST_SCOPED_ENUM_START(name) BOOST_SCOPED_ENUM_DECLARE_BEGIN(name)
+#define BOOST_SCOPED_ENUM_END BOOST_SCOPED_ENUM_DECLARE_END2()
+#define BOOST_SCOPED_ENUM(name) BOOST_SCOPED_ENUM_NATIVE(name)
+
+//#ifdef BOOST_NO_SCOPED_ENUMS
+//
+//# define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_type
+//# define BOOST_SCOPED_ENUM_END };
+//# define BOOST_SCOPED_ENUM(name) name::enum_type
+//
+//#else
+//
+//# define BOOST_SCOPED_ENUM_START(name) enum class name
+//# define BOOST_SCOPED_ENUM_END
+//# define BOOST_SCOPED_ENUM(name) name
+//
+//#endif
+#endif  // BOOST_SCOPED_ENUM_EMULATION_HPP
diff --git a/ext/boost/detail/sp_typeinfo.hpp b/ext/boost/detail/sp_typeinfo.hpp
index 3ee934f..43fae78 100644
--- a/ext/boost/detail/sp_typeinfo.hpp
+++ b/ext/boost/detail/sp_typeinfo.hpp
@@ -74,7 +74,13 @@ template<class T> struct sp_typeid_
     }
 };
 
+#if defined(__SUNPRO_CC)
+// see #4199, the Sun Studio compiler gets confused about static initialization 
+// constructor arguments. But an assignment works just fine. 
 template<class T> sp_typeinfo sp_typeid_< T >::ti_ = sp_typeid_< T >::name();
+#else
+template<class T> sp_typeinfo sp_typeid_< T >::ti_(sp_typeid_< T >::name());
+#endif
 
 template<class T> struct sp_typeid_< T & >: sp_typeid_< T >
 {
diff --git a/ext/boost/exception/._current_exception_cast.hpp b/ext/boost/exception/._current_exception_cast.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/exception/._current_exception_cast.hpp and /dev/null differ
diff --git a/ext/boost/exception/._get_error_info.hpp b/ext/boost/exception/._get_error_info.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/exception/._get_error_info.hpp and /dev/null differ
diff --git a/ext/boost/exception/._to_string.hpp b/ext/boost/exception/._to_string.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/exception/._to_string.hpp and /dev/null differ
diff --git a/ext/boost/exception/._to_string_stub.hpp b/ext/boost/exception/._to_string_stub.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/exception/._to_string_stub.hpp and /dev/null differ
diff --git a/ext/boost/exception/detail/._attribute_noreturn.hpp b/ext/boost/exception/detail/._attribute_noreturn.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/exception/detail/._attribute_noreturn.hpp and /dev/null differ
diff --git a/ext/boost/exception/detail/._is_output_streamable.hpp b/ext/boost/exception/detail/._is_output_streamable.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/exception/detail/._is_output_streamable.hpp and /dev/null differ
diff --git a/ext/boost/exception/detail/._object_hex_dump.hpp b/ext/boost/exception/detail/._object_hex_dump.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/exception/detail/._object_hex_dump.hpp and /dev/null differ
diff --git a/ext/boost/exception/detail/attribute_noreturn.hpp b/ext/boost/exception/detail/attribute_noreturn.hpp
index f6a0b59..ae9f031 100644
--- a/ext/boost/exception/detail/attribute_noreturn.hpp
+++ b/ext/boost/exception/detail/attribute_noreturn.hpp
@@ -9,7 +9,7 @@
 #if defined(_MSC_VER)
 #define BOOST_ATTRIBUTE_NORETURN __declspec(noreturn)
 #elif defined(__GNUC__)
-#define BOOST_ATTRIBUTE_NORETURN __attribute__((noreturn))
+#define BOOST_ATTRIBUTE_NORETURN __attribute__((__noreturn__))
 #else
 #define BOOST_ATTRIBUTE_NORETURN
 #endif
diff --git a/ext/boost/exception/detail/clone_current_exception.hpp b/ext/boost/exception/detail/clone_current_exception.hpp
new file mode 100644
index 0000000..cc201b9
--- /dev/null
+++ b/ext/boost/exception/detail/clone_current_exception.hpp
@@ -0,0 +1,47 @@
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_81522C0EB56511DFAB613DB0DFD72085
+#define UUID_81522C0EB56511DFAB613DB0DFD72085
+
+#ifdef BOOST_NO_EXCEPTIONS
+#    error This header requires exception handling to be enabled.
+#endif
+
+namespace
+boost
+    {
+    namespace
+    exception_detail
+        {
+        class clone_base;
+
+#ifdef BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR
+        int clone_current_exception_non_intrusive( clone_base const * & cloned );
+#endif
+
+        namespace
+        clone_current_exception_result
+            {
+            int const success=0;
+            int const bad_alloc=1;
+            int const bad_exception=2;
+            int const not_supported=3;
+            }
+
+        inline
+        int
+        clone_current_exception( clone_base const * & cloned )
+            {
+#ifdef BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR
+            return clone_current_exception_non_intrusive(cloned);
+#else
+            return clone_current_exception_result::not_supported;
+#endif
+            }
+        }
+    }
+
+#endif
diff --git a/ext/boost/exception/detail/error_info_impl.hpp b/ext/boost/exception/detail/error_info_impl.hpp
index f432aab..a8d1aa7 100644
--- a/ext/boost/exception/detail/error_info_impl.hpp
+++ b/ext/boost/exception/detail/error_info_impl.hpp
@@ -30,7 +30,8 @@ boost
 
             protected:
 
-            virtual ~error_info_base() throw()
+            virtual
+            ~error_info_base() throw()
                 {
                 }
             };
diff --git a/ext/boost/exception/detail/exception_ptr.hpp b/ext/boost/exception/detail/exception_ptr.hpp
index 0510fe2..5e5a267 100644
--- a/ext/boost/exception/detail/exception_ptr.hpp
+++ b/ext/boost/exception/detail/exception_ptr.hpp
@@ -20,18 +20,52 @@
 #include <boost/exception/info.hpp>
 #include <boost/exception/diagnostic_information.hpp>
 #include <boost/exception/detail/type_info.hpp>
+#include <boost/exception/detail/clone_current_exception.hpp>
 #include <boost/shared_ptr.hpp>
 #include <stdexcept>
 #include <new>
 #include <ios>
+#include <stdlib.h>
 
 namespace
 boost
     {
-    typedef shared_ptr<exception_detail::clone_base const> exception_ptr;
-
+    class exception_ptr;
+    BOOST_ATTRIBUTE_NORETURN void rethrow_exception( exception_ptr const & );
     exception_ptr current_exception();
 
+    class
+    exception_ptr
+        {
+        typedef boost::shared_ptr<exception_detail::clone_base const> impl;
+        impl ptr_;
+        friend void rethrow_exception( exception_ptr const & );
+        typedef exception_detail::clone_base const * (impl::*unspecified_bool_type)() const;
+        public:
+        exception_ptr()
+            {
+            }
+        explicit
+        exception_ptr( impl const & ptr ):
+            ptr_(ptr)
+            {
+            }
+        bool
+        operator==( exception_ptr const & other ) const
+            {
+            return ptr_==other.ptr_;
+            }
+        bool
+        operator!=( exception_ptr const & other ) const
+            {
+            return ptr_!=other.ptr_;
+            }
+        operator unspecified_bool_type() const
+            {
+            return ptr_?&impl::get:0;
+            }
+        };
+
     template <class T>
     inline
     exception_ptr
@@ -67,35 +101,49 @@ boost
             boost::exception,
             std::bad_alloc
                 {
+                ~bad_alloc_() throw() { }
                 };
 
-        template <int Dummy>
+        struct
+        bad_exception_:
+            boost::exception,
+            std::bad_exception
+                {
+                ~bad_exception_() throw() { }
+                };
+
+        template <class Exception>
         exception_ptr
-        get_bad_alloc()
+        get_static_exception_object()
             {
-            bad_alloc_ ba;
-            exception_detail::clone_impl<bad_alloc_> c(ba);
+            Exception ba;
+            exception_detail::clone_impl<Exception> c(ba);
             c <<
                 throw_function(BOOST_CURRENT_FUNCTION) <<
                 throw_file(__FILE__) <<
                 throw_line(__LINE__);
-            static exception_ptr ep(new exception_detail::clone_impl<bad_alloc_>(c));
+            static exception_ptr ep(shared_ptr<exception_detail::clone_base const>(new exception_detail::clone_impl<Exception>(c)));
             return ep;
             }
 
-        template <int Dummy>
+        template <class Exception>
         struct
-        exception_ptr_bad_alloc
+        exception_ptr_static_exception_object
             {
             static exception_ptr const e;
             };
 
-        template <int Dummy>
+        template <class Exception>
         exception_ptr const
-        exception_ptr_bad_alloc<Dummy>::
-        e = get_bad_alloc<Dummy>();
+        exception_ptr_static_exception_object<Exception>::
+        e = get_static_exception_object<Exception>();
         }
 
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+#  pragma GCC visibility push (default)
+# endif
+#endif
     class
     unknown_exception:
         public boost::exception,
@@ -135,6 +183,11 @@ boost
 #endif
             }
         };
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+#  pragma GCC visibility pop
+# endif
+#endif
 
     namespace
     exception_detail
@@ -244,101 +297,131 @@ boost
         exception_ptr
         current_exception_impl()
             {
-            try
-                {
-                throw;
-                }
-            catch(
-            exception_detail::clone_base & e )
-                {
-                return exception_ptr(e.clone());
-                }
-            catch(
-            std::domain_error & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::invalid_argument & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::length_error & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::out_of_range & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::logic_error & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::range_error & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::overflow_error & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::underflow_error & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::ios_base::failure & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::runtime_error & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::bad_alloc & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
+            exception_detail::clone_base const * e=0;
+            switch(
+            exception_detail::clone_current_exception(e) )
+                {
+                case exception_detail::clone_current_exception_result::
+                success:
+                    {
+                    BOOST_ASSERT(e!=0);
+                    return exception_ptr(shared_ptr<exception_detail::clone_base const>(e));
+                    }
+                case exception_detail::clone_current_exception_result::
+                bad_alloc:
+                    {
+                    BOOST_ASSERT(!e);
+                    return exception_detail::exception_ptr_static_exception_object<bad_alloc_>::e;
+                    }
+                case exception_detail::clone_current_exception_result::
+                bad_exception:
+                    {
+                    BOOST_ASSERT(!e);
+                    return exception_detail::exception_ptr_static_exception_object<bad_exception_>::e;
+                    }
+                default:
+                    BOOST_ASSERT(0);
+                case exception_detail::clone_current_exception_result::
+                not_supported:
+                    {
+                    BOOST_ASSERT(!e);
+                    try
+                        {
+                        throw;
+                        }
+                    catch(
+                    exception_detail::clone_base & e )
+                        {
+                        return exception_ptr(shared_ptr<exception_detail::clone_base const>(e.clone()));
+                        }
+                    catch(
+                    std::domain_error & e )
+                        {
+                        return exception_detail::current_exception_std_exception(e);
+                        }
+                    catch(
+                    std::invalid_argument & e )
+                        {
+                        return exception_detail::current_exception_std_exception(e);
+                        }
+                    catch(
+                    std::length_error & e )
+                        {
+                        return exception_detail::current_exception_std_exception(e);
+                        }
+                    catch(
+                    std::out_of_range & e )
+                        {
+                        return exception_detail::current_exception_std_exception(e);
+                        }
+                    catch(
+                    std::logic_error & e )
+                        {
+                        return exception_detail::current_exception_std_exception(e);
+                        }
+                    catch(
+                    std::range_error & e )
+                        {
+                        return exception_detail::current_exception_std_exception(e);
+                        }
+                    catch(
+                    std::overflow_error & e )
+                        {
+                        return exception_detail::current_exception_std_exception(e);
+                        }
+                    catch(
+                    std::underflow_error & e )
+                        {
+                        return exception_detail::current_exception_std_exception(e);
+                        }
+                    catch(
+                    std::ios_base::failure & e )
+                        {
+                        return exception_detail::current_exception_std_exception(e);
+                        }
+                    catch(
+                    std::runtime_error & e )
+                        {
+                        return exception_detail::current_exception_std_exception(e);
+                        }
+                    catch(
+                    std::bad_alloc & e )
+                        {
+                        return exception_detail::current_exception_std_exception(e);
+                        }
 #ifndef BOOST_NO_TYPEID
-            catch(
-            std::bad_cast & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::bad_typeid & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
+                    catch(
+                    std::bad_cast & e )
+                        {
+                        return exception_detail::current_exception_std_exception(e);
+                        }
+                    catch(
+                    std::bad_typeid & e )
+                        {
+                        return exception_detail::current_exception_std_exception(e);
+                        }
 #endif
-            catch(
-            std::bad_exception & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::exception & e )
-                {
-                return exception_detail::current_exception_unknown_std_exception(e);
-                }
-            catch(
-            boost::exception & e )
-                {
-                return exception_detail::current_exception_unknown_boost_exception(e);
-                }
-            catch(
-            ... )
-                {
-                return exception_detail::current_exception_unknown_exception();
+                    catch(
+                    std::bad_exception & e )
+                        {
+                        return exception_detail::current_exception_std_exception(e);
+                        }
+                    catch(
+                    std::exception & e )
+                        {
+                        return exception_detail::current_exception_unknown_std_exception(e);
+                        }
+                    catch(
+                    boost::exception & e )
+                        {
+                        return exception_detail::current_exception_unknown_boost_exception(e);
+                        }
+                    catch(
+                    ... )
+                        {
+                        return exception_detail::current_exception_unknown_exception();
+                        }
+                    }
                 }
             }
         }
@@ -348,7 +431,6 @@ boost
     current_exception()
         {
         exception_ptr ret;
-        BOOST_ASSERT(!ret);
         try
             {
             ret=exception_detail::current_exception_impl();
@@ -356,36 +438,31 @@ boost
         catch(
         std::bad_alloc & )
             {
-            ret=exception_detail::exception_ptr_bad_alloc<42>::e;
+            ret=exception_detail::exception_ptr_static_exception_object<exception_detail::bad_alloc_>::e;
             }
         catch(
         ... )
             {
-            try
-                {
-                ret=exception_detail::current_exception_std_exception(std::bad_exception());
-                }
-            catch(
-            std::bad_alloc & )
-                {
-                ret=exception_detail::exception_ptr_bad_alloc<42>::e;
-                }
-            catch(
-            ... )
-                {
-                BOOST_ASSERT(0);
-                }
+            ret=exception_detail::exception_ptr_static_exception_object<exception_detail::bad_exception_>::e;
             }
         BOOST_ASSERT(ret);
         return ret;
         }
 
+    BOOST_ATTRIBUTE_NORETURN
     inline
     void
     rethrow_exception( exception_ptr const & p )
         {
         BOOST_ASSERT(p);
-        p->rethrow();
+        p.ptr_->rethrow();
+        BOOST_ASSERT(0);
+        #if defined(UNDER_CE)
+            // some CE platforms don't define ::abort()
+            exit(-1);
+        #else
+            abort();
+        #endif
         }
 
     inline
diff --git a/ext/boost/exception/detail/type_info.hpp b/ext/boost/exception/detail/type_info.hpp
index 9ab1c57..92f8464 100644
--- a/ext/boost/exception/detail/type_info.hpp
+++ b/ext/boost/exception/detail/type_info.hpp
@@ -53,11 +53,11 @@ boost
         struct
         type_info_
             {
-            detail::sp_typeinfo const & type_;
+            detail::sp_typeinfo const * type_;
 
             explicit
             type_info_( detail::sp_typeinfo const & type ):
-                type_(type)
+                type_(&type)
                 {
                 }
 
@@ -65,7 +65,7 @@ boost
             bool
             operator<( type_info_ const & a, type_info_ const & b )
                 {
-                return 0!=(a.type_.before(b.type_));
+                return 0!=(a.type_->before(*b.type_));
                 }
             };
         }
diff --git a/ext/boost/exception/diagnostic_information.hpp b/ext/boost/exception/diagnostic_information.hpp
index 1d6bc2c..ef89d73 100644
--- a/ext/boost/exception/diagnostic_information.hpp
+++ b/ext/boost/exception/diagnostic_information.hpp
@@ -14,6 +14,7 @@
 
 #include <boost/config.hpp>
 #include <boost/exception/get_error_info.hpp>
+#include <boost/exception/info.hpp>
 #include <boost/utility/enable_if.hpp>
 #ifndef BOOST_NO_RTTI
 #include <boost/units/detail/utility.hpp>
@@ -85,19 +86,23 @@ boost
         char const *
         get_diagnostic_information( exception const & x, char const * header )
             {
-            if( error_info_container * c=x.data_.get() )
 #ifndef BOOST_NO_EXCEPTIONS
-                try
-                    {
+            try
+                {
 #endif
-                    return c->diagnostic_information(header);
+                error_info_container * c=x.data_.get();
+                if( !c )
+                    x.data_.adopt(c=new exception_detail::error_info_container_impl);
+                char const * di=c->diagnostic_information(header);
+                BOOST_ASSERT(di!=0);
+                return di;
 #ifndef BOOST_NO_EXCEPTIONS
-                    }
-                catch(...)
-                    {
-                    }
+                }
+            catch(...)
+                {
+                return 0;
+                }
 #endif
-            return 0;
             }
 
         inline
@@ -122,22 +127,30 @@ boost
             std::ostringstream tmp;
             if( be )
                 {
-                if( char const * const * f=get_error_info<throw_file>(*be) )
+                char const * const * f=get_error_info<throw_file>(*be);
+                int const * l=get_error_info<throw_line>(*be);
+                char const * const * fn=get_error_info<throw_function>(*be);
+                if( !f && !l && !fn )
+                    tmp << "Throw location unknown (consider using BOOST_THROW_EXCEPTION)\n";
+                else
                     {
-                    tmp << *f;
-                    if( int const * l=get_error_info<throw_line>(*be) )
-                        tmp << '(' << *l << "): ";
+                    if( f )
+                        {
+                        tmp << *f;
+                        if( int const * l=get_error_info<throw_line>(*be) )
+                            tmp << '(' << *l << "): ";
+                        }
+                    tmp << "Throw in function ";
+                    if( char const * const * fn=get_error_info<throw_function>(*be) )
+                        tmp << *fn;
+                    else
+                        tmp << "(unknown)";
+                    tmp << '\n';
                     }
-                tmp << "Throw in function ";
-                if( char const * const * fn=get_error_info<throw_function>(*be) )
-                    tmp << *fn;
-                else
-                    tmp << "(unknown)";
-                tmp << '\n';
                 }
 #ifndef BOOST_NO_RTTI
             tmp << std::string("Dynamic exception type: ") <<
-                units::detail::demangle((be?BOOST_EXCEPTION_DYNAMIC_TYPEID(*be):BOOST_EXCEPTION_DYNAMIC_TYPEID(*se)).type_.name()) << '\n';
+                units::detail::demangle((be?(BOOST_EXCEPTION_DYNAMIC_TYPEID(*be)):(BOOST_EXCEPTION_DYNAMIC_TYPEID(*se))).type_->name()) << '\n';
 #endif
             if( with_what && se )
                 tmp << "std::exception::what: " << wh << '\n';
@@ -166,7 +179,10 @@ boost
             {
 #endif
             (void) exception_detail::diagnostic_information_impl(&e,0,false);
-            return exception_detail::get_diagnostic_information(e,0);
+            if( char const * di=exception_detail::get_diagnostic_information(e,0) )
+                return di;
+            else
+                return "Failed to produce boost::diagnostic_information_what()";
 #ifndef BOOST_NO_EXCEPTIONS
             }
         catch(
diff --git a/ext/boost/exception/exception.hpp b/ext/boost/exception/exception.hpp
index adaac68..42d2787 100644
--- a/ext/boost/exception/exception.hpp
+++ b/ext/boost/exception/exception.hpp
@@ -132,7 +132,17 @@ boost
             }
         };
 
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+#  pragma GCC visibility push (default)
+# endif
+#endif
     class exception;
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+#  pragma GCC visibility pop
+# endif
+#endif
 
     template <class T>
     class shared_ptr;
@@ -189,6 +199,11 @@ boost
         E const & set_info( E const &, throw_line const & );
         }
 
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+#  pragma GCC visibility push (default)
+# endif
+#endif
     class
     exception
         {
@@ -250,6 +265,11 @@ boost
         mutable char const * throw_file_;
         mutable int throw_line_;
         };
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+#  pragma GCC visibility pop
+# endif
+#endif
 
     inline
     exception::
@@ -290,6 +310,11 @@ boost
     namespace
     exception_detail
         {
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+#  pragma GCC visibility push (default)
+# endif
+#endif
         template <class T>
         struct
         error_info_injector:
@@ -306,6 +331,11 @@ boost
                 {
                 }
             };
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+#  pragma GCC visibility pop
+# endif
+#endif
 
         struct large_size { char c[256]; };
         large_size dispatch_boost_exception( exception const * );
@@ -334,7 +364,7 @@ boost
         struct
         enable_error_info_return_type
             {
-            typedef typename enable_error_info_helper<T,sizeof(exception_detail::dispatch_boost_exception((T*)0))>::type type;
+            typedef typename enable_error_info_helper<T,sizeof(exception_detail::dispatch_boost_exception(static_cast<T *>(0)))>::type type;
             };
         }
 
@@ -353,6 +383,11 @@ boost
     namespace
     exception_detail
         {
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+#  pragma GCC visibility push (default)
+# endif
+#endif
         class
         clone_base
             {
@@ -366,6 +401,11 @@ boost
                 {
                 }
             };
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+#  pragma GCC visibility pop
+# endif
+#endif
 
         inline
         void
@@ -390,8 +430,15 @@ boost
         class
         clone_impl:
             public T,
-            public clone_base
+            public virtual clone_base
             {
+            struct clone_tag { };
+            clone_impl( clone_impl const & x, clone_tag ):
+                T(x)
+                {
+                copy_boost_exception(this,&x);
+                }
+
             public:
 
             explicit
@@ -410,7 +457,7 @@ boost
             clone_base const *
             clone() const
                 {
-                return new clone_impl(*this);
+                return new clone_impl(*this,clone_tag());
                 }
 
             void
diff --git a/ext/boost/exception/info.hpp b/ext/boost/exception/info.hpp
index c918dbd..7b56076 100644
--- a/ext/boost/exception/info.hpp
+++ b/ext/boost/exception/info.hpp
@@ -97,7 +97,7 @@ boost
                     {
                     shared_ptr<error_info_base> const & p = i->second;
 #ifndef BOOST_NO_RTTI
-                    BOOST_ASSERT( BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==ti.type_ );
+                    BOOST_ASSERT( *BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==*ti.type_ );
 #endif
                     return p;
                     }
@@ -109,7 +109,6 @@ boost
                 {
                 if( header )
                     {
-                    BOOST_ASSERT(*header!=0);
                     std::ostringstream tmp;
                     tmp << header;
                     for( error_info_map::const_iterator i=info_.begin(),end=info_.end(); i!=end; ++i )
diff --git a/ext/boost/foreach.hpp b/ext/boost/foreach.hpp
new file mode 100644
index 0000000..571b45c
--- /dev/null
+++ b/ext/boost/foreach.hpp
@@ -0,0 +1,1128 @@
+///////////////////////////////////////////////////////////////////////////////
+// foreach.hpp header file
+//
+// Copyright 2004 Eric Niebler.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/foreach for documentation
+//
+// Credits:
+//  Anson Tsao        - for the initial inspiration and several good suggestions.
+//  Thorsten Ottosen  - for Boost.Range, and for suggesting a way to detect
+//                      const-qualified rvalues at compile time on VC7.1+
+//  Russell Hind      - For help porting to Borland
+//  Alisdair Meredith - For help porting to Borland
+//  Stefan Slapeta    - For help porting to Intel
+//  David Jenkins     - For help finding a Microsoft Code Analysis bug
+//  mimomorin at ...     - For a patch to use rvalue refs on supporting compilers
+
+#ifndef BOOST_FOREACH
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <cstddef>
+#include <utility>  // for std::pair
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+// Some compilers let us detect even const-qualified rvalues at compile-time
+#if !defined(BOOST_NO_RVALUE_REFERENCES)                                                         \
+ || BOOST_WORKAROUND(BOOST_MSVC, >= 1310) && !defined(_PREFAST_)                                 \
+ || (BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ <= 5) && !defined(BOOST_INTEL) &&       \
+                                                                  !defined(BOOST_CLANG))         \
+ || (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ >= 4) && !defined(BOOST_INTEL) &&       \
+                                                                  !defined(BOOST_CLANG))
+# define BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION
+#else
+// Some compilers allow temporaries to be bound to non-const references.
+// These compilers make it impossible to for BOOST_FOREACH to detect
+// temporaries and avoid reevaluation of the collection expression.
+# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)                                                      \
+  || BOOST_WORKAROUND(__BORLANDC__, < 0x593)                                                    \
+  || (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER))                   \
+  || BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)                                                    \
+  || BOOST_WORKAROUND(__DECCXX_VER, <= 60590042)
+#  define BOOST_FOREACH_NO_RVALUE_DETECTION
+# endif
+// Some compilers do not correctly implement the lvalue/rvalue conversion
+// rules of the ternary conditional operator.
+# if defined(BOOST_FOREACH_NO_RVALUE_DETECTION)                                                 \
+  || defined(BOOST_NO_SFINAE)                                                                   \
+  || BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400))                                        \
+  || BOOST_WORKAROUND(BOOST_INTEL_WIN, BOOST_TESTED_AT(1400))                                   \
+  || BOOST_WORKAROUND(__GNUC__, < 3)                                                            \
+  || (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ <= 2))                                \
+  || (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ <= 3) && defined(__APPLE_CC__))       \
+  || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))                                         \
+  || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206))                                      \
+  || BOOST_WORKAROUND(__SUNPRO_CC, >= 0x5100)                                                   \
+  || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x590))
+#  define BOOST_FOREACH_NO_CONST_RVALUE_DETECTION
+# else
+#  define BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION
+# endif
+#endif
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/logical.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/noncopyable.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/rend.hpp>
+#include <boost/range/rbegin.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/reverse_iterator.hpp>
+#include <boost/type_traits/is_array.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_abstract.hpp>
+#include <boost/type_traits/is_base_and_derived.hpp>
+#include <boost/type_traits/is_rvalue_reference.hpp>
+#include <boost/iterator/iterator_traits.hpp>
+#include <boost/utility/addressof.hpp>
+#include <boost/foreach_fwd.hpp>
+
+#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION
+# include <new>
+# include <boost/aligned_storage.hpp>
+# include <boost/utility/enable_if.hpp>
+# include <boost/type_traits/remove_const.hpp>
+#endif
+
+namespace boost
+{
+
+// forward declarations for iterator_range
+template<typename T>
+class iterator_range;
+
+// forward declarations for sub_range
+template<typename T>
+class sub_range;
+
+namespace foreach
+{
+    ///////////////////////////////////////////////////////////////////////////////
+    // in_range
+    //
+    template<typename T>
+    inline std::pair<T, T> in_range(T begin, T end)
+    {
+        return std::make_pair(begin, end);
+    }
+
+    ///////////////////////////////////////////////////////////////////////////////
+    // boost::foreach::is_lightweight_proxy
+    //   Specialize this for user-defined collection types if they are inexpensive to copy.
+    //   This tells BOOST_FOREACH it can avoid the rvalue/lvalue detection stuff.
+    template<typename T>
+    struct is_lightweight_proxy
+      : boost::mpl::false_
+    {
+    };
+
+    ///////////////////////////////////////////////////////////////////////////////
+    // boost::foreach::is_noncopyable
+    //   Specialize this for user-defined collection types if they cannot be copied.
+    //   This also tells BOOST_FOREACH to avoid the rvalue/lvalue detection stuff.
+    template<typename T>
+    struct is_noncopyable
+    #if !defined(BOOST_BROKEN_IS_BASE_AND_DERIVED) && !defined(BOOST_NO_IS_ABSTRACT)
+      : boost::mpl::or_<
+            boost::is_abstract<T>
+          , boost::is_base_and_derived<boost::noncopyable, T>
+        >
+    #elif !defined(BOOST_BROKEN_IS_BASE_AND_DERIVED)
+      : boost::is_base_and_derived<boost::noncopyable, T>
+    #elif !defined(BOOST_NO_IS_ABSTRACT)
+      : boost::is_abstract<T>
+    #else
+      : boost::mpl::false_
+    #endif
+    {
+    };
+
+} // namespace foreach
+
+} // namespace boost
+
+// vc6/7 needs help ordering the following overloads
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+# define BOOST_FOREACH_TAG_DEFAULT ...
+#else
+# define BOOST_FOREACH_TAG_DEFAULT boost::foreach::tag
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// boost_foreach_is_lightweight_proxy
+//   Another customization point for the is_lightweight_proxy optimization,
+//   this one works on legacy compilers. Overload boost_foreach_is_lightweight_proxy
+//   at the global namespace for your type.
+template<typename T>
+inline boost::foreach::is_lightweight_proxy<T> *
+boost_foreach_is_lightweight_proxy(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; }
+
+template<typename T>
+inline boost::mpl::true_ *
+boost_foreach_is_lightweight_proxy(std::pair<T, T> *&, boost::foreach::tag) { return 0; }
+
+template<typename T>
+inline boost::mpl::true_ *
+boost_foreach_is_lightweight_proxy(boost::iterator_range<T> *&, boost::foreach::tag) { return 0; }
+
+template<typename T>
+inline boost::mpl::true_ *
+boost_foreach_is_lightweight_proxy(boost::sub_range<T> *&, boost::foreach::tag) { return 0; }
+
+template<typename T>
+inline boost::mpl::true_ *
+boost_foreach_is_lightweight_proxy(T **&, boost::foreach::tag) { return 0; }
+
+///////////////////////////////////////////////////////////////////////////////
+// boost_foreach_is_noncopyable
+//   Another customization point for the is_noncopyable trait,
+//   this one works on legacy compilers. Overload boost_foreach_is_noncopyable
+//   at the global namespace for your type.
+template<typename T>
+inline boost::foreach::is_noncopyable<T> *
+boost_foreach_is_noncopyable(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; }
+
+namespace boost
+{
+
+namespace foreach_detail_
+{
+
+///////////////////////////////////////////////////////////////////////////////
+// Define some utilities for assessing the properties of expressions
+//
+template<typename Bool1, typename Bool2>
+inline boost::mpl::and_<Bool1, Bool2> *and_(Bool1 *, Bool2 *) { return 0; }
+
+template<typename Bool1, typename Bool2, typename Bool3>
+inline boost::mpl::and_<Bool1, Bool2, Bool3> *and_(Bool1 *, Bool2 *, Bool3 *) { return 0; }
+
+template<typename Bool1, typename Bool2>
+inline boost::mpl::or_<Bool1, Bool2> *or_(Bool1 *, Bool2 *) { return 0; }
+
+template<typename Bool1, typename Bool2, typename Bool3>
+inline boost::mpl::or_<Bool1, Bool2, Bool3> *or_(Bool1 *, Bool2 *, Bool3 *) { return 0; }
+
+template<typename Bool1>
+inline boost::mpl::not_<Bool1> *not_(Bool1 *) { return 0; }
+
+template<typename T>
+inline boost::is_array<T> *is_array_(T const &) { return 0; }
+
+template<typename T>
+inline boost::is_const<T> *is_const_(T &) { return 0; }
+
+#ifndef BOOST_FOREACH_NO_RVALUE_DETECTION
+template<typename T>
+inline boost::mpl::true_ *is_const_(T const &) { return 0; }
+#endif
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+template<typename T>
+inline boost::mpl::false_ *is_rvalue_(T &, int) { return 0; }
+
+template<typename T>
+inline boost::mpl::true_ *is_rvalue_(T const &, ...) { return 0; }
+#else
+template<typename T>
+inline boost::is_rvalue_reference<T &&> *is_rvalue_(T &&, int) { return 0; }
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// auto_any_t/auto_any
+//  General utility for putting an object of any type into automatic storage
+struct auto_any_base
+{
+    // auto_any_base must evaluate to false in boolean context so that
+    // they can be declared in if() statements.
+    operator bool() const
+    {
+        return false;
+    }
+};
+
+template<typename T>
+struct auto_any : auto_any_base
+{
+    explicit auto_any(T const &t)
+      : item(t)
+    {
+    }
+
+    // temporaries of type auto_any will be bound to const auto_any_base
+    // references, but we still want to be able to mutate the stored
+    // data, so declare it as mutable.
+    mutable T item;
+};
+
+typedef auto_any_base const &auto_any_t;
+
+template<typename T, typename C>
+inline BOOST_DEDUCED_TYPENAME boost::mpl::if_<C, T const, T>::type &auto_any_cast(auto_any_t a)
+{
+    return static_cast<auto_any<T> const &>(a).item;
+}
+
+typedef boost::mpl::true_ const_;
+
+///////////////////////////////////////////////////////////////////////////////
+// type2type
+//
+template<typename T, typename C = boost::mpl::false_>
+struct type2type
+  : boost::mpl::if_<C, T const, T>
+{
+};
+
+template<typename T>
+struct wrap_cstr
+{
+    typedef T type;
+};
+
+template<>
+struct wrap_cstr<char *>
+{
+    typedef wrap_cstr<char *> type;
+    typedef char *iterator;
+    typedef char *const_iterator;
+};
+
+template<>
+struct wrap_cstr<char const *>
+{
+    typedef wrap_cstr<char const *> type;
+    typedef char const *iterator;
+    typedef char const *const_iterator;
+};
+
+template<>
+struct wrap_cstr<wchar_t *>
+{
+    typedef wrap_cstr<wchar_t *> type;
+    typedef wchar_t *iterator;
+    typedef wchar_t *const_iterator;
+};
+
+template<>
+struct wrap_cstr<wchar_t const *>
+{
+    typedef wrap_cstr<wchar_t const *> type;
+    typedef wchar_t const *iterator;
+    typedef wchar_t const *const_iterator;
+};
+
+template<typename T>
+struct is_char_array
+  : mpl::and_<
+        is_array<T>
+      , mpl::or_<
+            is_convertible<T, char const *>
+          , is_convertible<T, wchar_t const *>
+        >
+    >
+{};
+
+template<typename T, typename C = boost::mpl::false_>
+struct foreach_iterator
+{
+    // **** READ THIS IF YOUR COMPILE BREAKS HERE ****
+    //
+    // There is an ambiguity about how to iterate over arrays of char and wchar_t. 
+    // Should the last array element be treated as a null terminator to be skipped, or
+    // is it just like any other element in the array? To fix the problem, you must
+    // say which behavior you want.
+    //
+    // To treat the container as a null-terminated string, merely cast it to a
+    // char const *, as in BOOST_FOREACH( char ch, (char const *)"hello" ) ...
+    //
+    // To treat the container as an array, use boost::as_array() in <boost/range/as_array.hpp>,
+    // as in BOOST_FOREACH( char ch, boost::as_array("hello") ) ...
+    #if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
+    BOOST_MPL_ASSERT_MSG( (!is_char_array<T>::value), IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING, (T&) );
+    #endif
+
+    // If the type is a pointer to a null terminated string (as opposed 
+    // to an array type), there is no ambiguity.
+    typedef BOOST_DEDUCED_TYPENAME wrap_cstr<T>::type container;
+
+    typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if<
+        C
+      , range_const_iterator<container>
+      , range_mutable_iterator<container>
+    >::type type;
+};
+
+
+template<typename T, typename C = boost::mpl::false_>
+struct foreach_reverse_iterator
+{
+    // **** READ THIS IF YOUR COMPILE BREAKS HERE ****
+    //
+    // There is an ambiguity about how to iterate over arrays of char and wchar_t. 
+    // Should the last array element be treated as a null terminator to be skipped, or
+    // is it just like any other element in the array? To fix the problem, you must
+    // say which behavior you want.
+    //
+    // To treat the container as a null-terminated string, merely cast it to a
+    // char const *, as in BOOST_FOREACH( char ch, (char const *)"hello" ) ...
+    //
+    // To treat the container as an array, use boost::as_array() in <boost/range/as_array.hpp>,
+    // as in BOOST_FOREACH( char ch, boost::as_array("hello") ) ...
+    #if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
+    BOOST_MPL_ASSERT_MSG( (!is_char_array<T>::value), IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING, (T&) );
+    #endif
+
+    // If the type is a pointer to a null terminated string (as opposed 
+    // to an array type), there is no ambiguity.
+    typedef BOOST_DEDUCED_TYPENAME wrap_cstr<T>::type container;
+
+    typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if<
+        C
+      , range_reverse_iterator<container const>
+      , range_reverse_iterator<container>
+    >::type type;
+};
+
+template<typename T, typename C = boost::mpl::false_>
+struct foreach_reference
+  : iterator_reference<BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type>
+{
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// encode_type
+//
+template<typename T>
+inline type2type<T> *encode_type(T &, boost::mpl::false_ *) { return 0; }
+
+template<typename T>
+inline type2type<T, const_> *encode_type(T const &, boost::mpl::true_ *) { return 0; }
+
+///////////////////////////////////////////////////////////////////////////////
+// set_false
+//
+inline bool set_false(bool &b)
+{
+    b = false;
+    return false;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// to_ptr
+//
+template<typename T>
+inline T *&to_ptr(T const &)
+{
+    static T *t = 0;
+    return t;
+}
+
+// Borland needs a little extra help with arrays
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+template<typename T,std::size_t N>
+inline T (*&to_ptr(T (&)[N]))[N]
+{
+    static T (*t)[N] = 0;
+    return t;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// derefof
+//
+template<typename T>
+inline T &derefof(T *t)
+{
+    // This is a work-around for a compiler bug in Borland. If T* is a pointer to array type U(*)[N],
+    // then dereferencing it results in a U* instead of U(&)[N]. The cast forces the issue.
+    return reinterpret_cast<T &>(
+        *const_cast<char *>(
+            reinterpret_cast<char const volatile *>(t)
+        )
+    );
+}
+
+# define BOOST_FOREACH_DEREFOF(T) boost::foreach_detail_::derefof(*T)
+#else
+# define BOOST_FOREACH_DEREFOF(T) (*T)
+#endif
+
+#if defined(BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION)                                  \
+ && !defined(BOOST_NO_RVALUE_REFERENCES)
+///////////////////////////////////////////////////////////////////////////////
+// Rvalue references makes it drop-dead simple to detect at compile time
+// whether an expression is an rvalue.
+///////////////////////////////////////////////////////////////////////////////
+
+# define BOOST_FOREACH_IS_RVALUE(COL)                                                           \
+    boost::foreach_detail_::is_rvalue_((COL), 0)
+
+#elif defined(BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION)                                \
+ && defined(BOOST_NO_RVALUE_REFERENCES)
+///////////////////////////////////////////////////////////////////////////////
+// Detect at compile-time whether an expression yields an rvalue or
+// an lvalue. This is rather non-standard, but some popular compilers
+// accept it.
+///////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+// rvalue_probe
+//
+template<typename T>
+struct rvalue_probe
+{
+    struct private_type_ {};
+    // can't ever return an array by value
+    typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_<
+        boost::mpl::or_<boost::is_abstract<T>, boost::is_array<T> >, private_type_, T
+    >::type value_type;
+    operator value_type() { return *reinterpret_cast<value_type *>(this); } // never called
+    operator T &() const { return *reinterpret_cast<T *>(const_cast<rvalue_probe *>(this)); } // never called
+};
+
+template<typename T>
+rvalue_probe<T> const make_probe(T const &)
+{
+    return rvalue_probe<T>();
+}
+
+# define BOOST_FOREACH_IS_RVALUE(COL)                                                           \
+    boost::foreach_detail_::and_(                                                               \
+        boost::foreach_detail_::not_(boost::foreach_detail_::is_array_(COL))                    \
+      , (true ? 0 : boost::foreach_detail_::is_rvalue_(                                         \
+            (true ? boost::foreach_detail_::make_probe(COL) : (COL)), 0)))
+
+#elif defined(BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION)
+///////////////////////////////////////////////////////////////////////////////
+// Detect at run-time whether an expression yields an rvalue
+// or an lvalue. This is 100% standard C++, but not all compilers
+// accept it. Also, it causes FOREACH to break when used with non-
+// copyable collection types.
+///////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+// rvalue_probe
+//
+template<typename T>
+struct rvalue_probe
+{
+    rvalue_probe(T &t, bool &b)
+      : value(t)
+      , is_rvalue(b)
+    {
+    }
+
+    struct private_type_ {};
+    // can't ever return an array or an abstract type by value
+    #ifdef BOOST_NO_IS_ABSTRACT
+    typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_<
+        boost::is_array<T>, private_type_, T
+    >::type value_type;
+    #else
+    typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_<
+        boost::mpl::or_<boost::is_abstract<T>, boost::is_array<T> >, private_type_, T
+    >::type value_type;
+    #endif
+    
+    operator value_type()
+    {
+        this->is_rvalue = true;
+        return this->value;
+    }
+
+    operator T &() const
+    {
+        return this->value;
+    }
+
+private:
+    T &value;
+    bool &is_rvalue;
+};
+
+template<typename T>
+rvalue_probe<T> make_probe(T &t, bool &b) { return rvalue_probe<T>(t, b); }
+
+template<typename T>
+rvalue_probe<T const> make_probe(T const &t, bool &b)  { return rvalue_probe<T const>(t, b); }
+
+///////////////////////////////////////////////////////////////////////////////
+// simple_variant
+//  holds either a T or a T const*
+template<typename T>
+struct simple_variant
+{
+    simple_variant(T const *t)
+      : is_rvalue(false)
+    {
+        *static_cast<T const **>(this->data.address()) = t;
+    }
+
+    simple_variant(T const &t)
+      : is_rvalue(true)
+    {
+        ::new(this->data.address()) T(t);
+    }
+
+    simple_variant(simple_variant const &that)
+      : is_rvalue(that.is_rvalue)
+    {
+        if(this->is_rvalue)
+            ::new(this->data.address()) T(*that.get());
+        else
+            *static_cast<T const **>(this->data.address()) = that.get();
+    }
+
+    ~simple_variant()
+    {
+        if(this->is_rvalue)
+            this->get()->~T();
+    }
+
+    T const *get() const
+    {
+        if(this->is_rvalue)
+            return static_cast<T const *>(this->data.address());
+        else
+            return *static_cast<T const * const *>(this->data.address());
+    }
+
+private:
+    enum size_type { size = sizeof(T) > sizeof(T*) ? sizeof(T) : sizeof(T*) };
+    simple_variant &operator =(simple_variant const &); 
+    bool const is_rvalue;
+    aligned_storage<size> data;
+};
+
+// If the collection is an array or is noncopyable, it must be an lvalue.
+// If the collection is a lightweight proxy, treat it as an rvalue
+// BUGBUG what about a noncopyable proxy?
+template<typename LValue, typename IsProxy>
+inline BOOST_DEDUCED_TYPENAME boost::enable_if<boost::mpl::or_<LValue, IsProxy>, IsProxy>::type *
+should_copy_impl(LValue *, IsProxy *, bool *)
+{
+    return 0;
+}
+
+// Otherwise, we must determine at runtime whether it's an lvalue or rvalue
+inline bool *
+should_copy_impl(boost::mpl::false_ *, boost::mpl::false_ *, bool *is_rvalue)
+{
+    return is_rvalue;
+}
+
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// contain
+//
+template<typename T>
+inline auto_any<T> contain(T const &t, boost::mpl::true_ *) // rvalue
+{
+    return auto_any<T>(t);
+}
+
+template<typename T>
+inline auto_any<T *> contain(T &t, boost::mpl::false_ *) // lvalue
+{
+    // Cannot seem to get sunpro to handle addressof() with array types.
+    #if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x570))
+    return auto_any<T *>(&t);
+    #else
+    return auto_any<T *>(boost::addressof(t));
+    #endif
+}
+
+#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION
+template<typename T>
+inline auto_any<simple_variant<T> >
+contain(T const &t, bool *rvalue)
+{
+    return auto_any<simple_variant<T> >(*rvalue ? simple_variant<T>(t) : simple_variant<T>(&t));
+}
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// begin
+//
+template<typename T, typename C>
+inline auto_any<BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type>
+begin(auto_any_t col, type2type<T, C> *, boost::mpl::true_ *) // rvalue
+{
+    return auto_any<BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type>(
+        boost::begin(auto_any_cast<T, C>(col)));
+}
+
+template<typename T, typename C>
+inline auto_any<BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type>
+begin(auto_any_t col, type2type<T, C> *, boost::mpl::false_ *) // lvalue
+{
+    typedef BOOST_DEDUCED_TYPENAME type2type<T, C>::type type;
+    typedef BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type iterator;
+    return auto_any<BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type>(
+        iterator(boost::begin(BOOST_FOREACH_DEREFOF((auto_any_cast<type *, boost::mpl::false_>(col))))));
+}
+
+#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION
+template<typename T>
+inline auto_any<BOOST_DEDUCED_TYPENAME foreach_iterator<T, const_>::type>
+begin(auto_any_t col, type2type<T, const_> *, bool *)
+{
+    return auto_any<BOOST_DEDUCED_TYPENAME foreach_iterator<T, const_>::type>(
+        boost::begin(*auto_any_cast<simple_variant<T>, boost::mpl::false_>(col).get()));
+}
+#endif
+
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+template<typename T, typename C>
+inline auto_any<T *>
+begin(auto_any_t col, type2type<T *, C> *, boost::mpl::true_ *) // null-terminated C-style strings
+{
+    return auto_any<T *>(auto_any_cast<T *, boost::mpl::false_>(col));
+}
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// end
+//
+template<typename T, typename C>
+inline auto_any<BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type>
+end(auto_any_t col, type2type<T, C> *, boost::mpl::true_ *) // rvalue
+{
+    return auto_any<BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type>(
+        boost::end(auto_any_cast<T, C>(col)));
+}
+
+template<typename T, typename C>
+inline auto_any<BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type>
+end(auto_any_t col, type2type<T, C> *, boost::mpl::false_ *) // lvalue
+{
+    typedef BOOST_DEDUCED_TYPENAME type2type<T, C>::type type;
+    typedef BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type iterator;
+    return auto_any<BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type>(
+        iterator(boost::end(BOOST_FOREACH_DEREFOF((auto_any_cast<type *, boost::mpl::false_>(col))))));
+}
+
+#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION
+template<typename T>
+inline auto_any<BOOST_DEDUCED_TYPENAME foreach_iterator<T, const_>::type>
+end(auto_any_t col, type2type<T, const_> *, bool *)
+{
+    return auto_any<BOOST_DEDUCED_TYPENAME foreach_iterator<T, const_>::type>(
+        boost::end(*auto_any_cast<simple_variant<T>, boost::mpl::false_>(col).get()));
+}
+#endif
+
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+template<typename T, typename C>
+inline auto_any<int>
+end(auto_any_t, type2type<T *, C> *, boost::mpl::true_ *) // null-terminated C-style strings
+{
+    return auto_any<int>(0); // not used
+}
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// done
+//
+template<typename T, typename C>
+inline bool done(auto_any_t cur, auto_any_t end, type2type<T, C> *)
+{
+    typedef BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type iter_t;
+    return auto_any_cast<iter_t, boost::mpl::false_>(cur) == auto_any_cast<iter_t, boost::mpl::false_>(end);
+}
+
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+template<typename T, typename C>
+inline bool done(auto_any_t cur, auto_any_t, type2type<T *, C> *) // null-terminated C-style strings
+{
+    return ! *auto_any_cast<T *, boost::mpl::false_>(cur);
+}
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// next
+//
+template<typename T, typename C>
+inline void next(auto_any_t cur, type2type<T, C> *)
+{
+    typedef BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type iter_t;
+    ++auto_any_cast<iter_t, boost::mpl::false_>(cur);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// deref
+//
+template<typename T, typename C>
+inline BOOST_DEDUCED_TYPENAME foreach_reference<T, C>::type
+deref(auto_any_t cur, type2type<T, C> *)
+{
+    typedef BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type iter_t;
+    return *auto_any_cast<iter_t, boost::mpl::false_>(cur);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// rbegin
+//
+template<typename T, typename C>
+inline auto_any<BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type>
+rbegin(auto_any_t col, type2type<T, C> *, boost::mpl::true_ *) // rvalue
+{
+    return auto_any<BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type>(
+        boost::rbegin(auto_any_cast<T, C>(col)));
+}
+
+template<typename T, typename C>
+inline auto_any<BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type>
+rbegin(auto_any_t col, type2type<T, C> *, boost::mpl::false_ *) // lvalue
+{
+    typedef BOOST_DEDUCED_TYPENAME type2type<T, C>::type type;
+    typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type iterator;
+    return auto_any<BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type>(
+        iterator(boost::rbegin(BOOST_FOREACH_DEREFOF((auto_any_cast<type *, boost::mpl::false_>(col))))));
+}
+
+#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION
+template<typename T>
+inline auto_any<BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, const_>::type>
+rbegin(auto_any_t col, type2type<T, const_> *, bool *)
+{
+    return auto_any<BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, const_>::type>(
+        boost::rbegin(*auto_any_cast<simple_variant<T>, boost::mpl::false_>(col).get()));
+}
+#endif
+
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+template<typename T, typename C>
+inline auto_any<reverse_iterator<T *> >
+rbegin(auto_any_t col, type2type<T *, C> *, boost::mpl::true_ *) // null-terminated C-style strings
+{
+    T *p = auto_any_cast<T *, boost::mpl::false_>(col);
+    while(0 != *p)
+        ++p;
+    return auto_any<reverse_iterator<T *> >(reverse_iterator<T *>(p));
+}
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// rend
+//
+template<typename T, typename C>
+inline auto_any<BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type>
+rend(auto_any_t col, type2type<T, C> *, boost::mpl::true_ *) // rvalue
+{
+    return auto_any<BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type>(
+        boost::rend(auto_any_cast<T, C>(col)));
+}
+
+template<typename T, typename C>
+inline auto_any<BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type>
+rend(auto_any_t col, type2type<T, C> *, boost::mpl::false_ *) // lvalue
+{
+    typedef BOOST_DEDUCED_TYPENAME type2type<T, C>::type type;
+    typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type iterator;
+    return auto_any<BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type>(
+        iterator(boost::rend(BOOST_FOREACH_DEREFOF((auto_any_cast<type *, boost::mpl::false_>(col))))));
+}
+
+#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION
+template<typename T>
+inline auto_any<BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, const_>::type>
+rend(auto_any_t col, type2type<T, const_> *, bool *)
+{
+    return auto_any<BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, const_>::type>(
+        boost::rend(*auto_any_cast<simple_variant<T>, boost::mpl::false_>(col).get()));
+}
+#endif
+
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+template<typename T, typename C>
+inline auto_any<reverse_iterator<T *> >
+rend(auto_any_t col, type2type<T *, C> *, boost::mpl::true_ *) // null-terminated C-style strings
+{
+    return auto_any<reverse_iterator<T *> >(
+        reverse_iterator<T *>(auto_any_cast<T *, boost::mpl::false_>(col)));
+}
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// rdone
+//
+template<typename T, typename C>
+inline bool rdone(auto_any_t cur, auto_any_t end, type2type<T, C> *)
+{
+    typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type iter_t;
+    return auto_any_cast<iter_t, boost::mpl::false_>(cur) == auto_any_cast<iter_t, boost::mpl::false_>(end);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// rnext
+//
+template<typename T, typename C>
+inline void rnext(auto_any_t cur, type2type<T, C> *)
+{
+    typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type iter_t;
+    ++auto_any_cast<iter_t, boost::mpl::false_>(cur);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// rderef
+//
+template<typename T, typename C>
+inline BOOST_DEDUCED_TYPENAME foreach_reference<T, C>::type
+rderef(auto_any_t cur, type2type<T, C> *)
+{
+    typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type iter_t;
+    return *auto_any_cast<iter_t, boost::mpl::false_>(cur);
+}
+
+} // namespace foreach_detail_
+} // namespace boost
+
+// Suppress a bogus code analysis warning on vc8+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+# define BOOST_FOREACH_SUPPRESS_WARNINGS() __pragma(warning(suppress:6001))
+#else
+# define BOOST_FOREACH_SUPPRESS_WARNINGS()
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// Define a macro for giving hidden variables a unique name. Not strictly
+// needed, but eliminates some warnings on some compilers.
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
+// With some versions of MSVC, use of __LINE__ to create unique identifiers
+// can fail when the Edit-and-Continue debug flag is used.
+# define BOOST_FOREACH_ID(x) x
+#else
+# define BOOST_FOREACH_ID(x) BOOST_PP_CAT(x, __LINE__)
+#endif
+
+// A sneaky way to get the type of the collection without evaluating the expression
+#define BOOST_FOREACH_TYPEOF(COL)                                                               \
+    (true ? 0 : boost::foreach_detail_::encode_type(COL, boost::foreach_detail_::is_const_(COL)))
+
+// returns true_* if the type is noncopyable
+#define BOOST_FOREACH_IS_NONCOPYABLE(COL)                                                       \
+    boost_foreach_is_noncopyable(                                                               \
+        boost::foreach_detail_::to_ptr(COL)                                                     \
+      , boost_foreach_argument_dependent_lookup_hack_value)
+
+// returns true_* if the type is a lightweight proxy (and is not noncopyable)
+#define BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL)                                                 \
+    boost::foreach_detail_::and_(                                                               \
+        boost::foreach_detail_::not_(BOOST_FOREACH_IS_NONCOPYABLE(COL))                         \
+      , boost_foreach_is_lightweight_proxy(                                                     \
+            boost::foreach_detail_::to_ptr(COL)                                                 \
+          , boost_foreach_argument_dependent_lookup_hack_value))
+
+#if defined(BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION)
+///////////////////////////////////////////////////////////////////////////////
+// R-values and const R-values supported here with zero runtime overhead
+///////////////////////////////////////////////////////////////////////////////
+
+// No variable is needed to track the rvalue-ness of the collection expression
+# define BOOST_FOREACH_PREAMBLE()                                                               \
+    BOOST_FOREACH_SUPPRESS_WARNINGS()
+
+// Evaluate the collection expression
+# define BOOST_FOREACH_EVALUATE(COL)                                                            \
+    (COL)
+
+# define BOOST_FOREACH_SHOULD_COPY(COL)                                                         \
+    (true ? 0 : boost::foreach_detail_::or_(                                                    \
+        BOOST_FOREACH_IS_RVALUE(COL)                                                            \
+      , BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL)))
+
+#elif defined(BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION)
+///////////////////////////////////////////////////////////////////////////////
+// R-values and const R-values supported here
+///////////////////////////////////////////////////////////////////////////////
+
+// Declare a variable to track the rvalue-ness of the collection expression
+# define BOOST_FOREACH_PREAMBLE()                                                               \
+    BOOST_FOREACH_SUPPRESS_WARNINGS()                                                           \
+    if (bool BOOST_FOREACH_ID(_foreach_is_rvalue) = false) {} else
+
+// Evaluate the collection expression, and detect if it is an lvalue or and rvalue
+# define BOOST_FOREACH_EVALUATE(COL)                                                            \
+    (true ? boost::foreach_detail_::make_probe((COL), BOOST_FOREACH_ID(_foreach_is_rvalue)) : (COL))
+
+// The rvalue/lvalue-ness of the collection expression is determined dynamically, unless
+// type type is an array or is noncopyable or is non-const, in which case we know it's an lvalue.
+// If the type happens to be a lightweight proxy, always make a copy.
+# define BOOST_FOREACH_SHOULD_COPY(COL)                                                         \
+    (boost::foreach_detail_::should_copy_impl(                                                  \
+        true ? 0 : boost::foreach_detail_::or_(                                                 \
+            boost::foreach_detail_::is_array_(COL)                                              \
+          , BOOST_FOREACH_IS_NONCOPYABLE(COL)                                                   \
+          , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(COL)))               \
+      , true ? 0 : BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL)                                      \
+      , &BOOST_FOREACH_ID(_foreach_is_rvalue)))
+
+#elif !defined(BOOST_FOREACH_NO_RVALUE_DETECTION)
+///////////////////////////////////////////////////////////////////////////////
+// R-values supported here, const R-values NOT supported here
+///////////////////////////////////////////////////////////////////////////////
+
+// No variable is needed to track the rvalue-ness of the collection expression
+# define BOOST_FOREACH_PREAMBLE()                                                               \
+    BOOST_FOREACH_SUPPRESS_WARNINGS()
+
+// Evaluate the collection expression
+# define BOOST_FOREACH_EVALUATE(COL)                                                            \
+    (COL)
+
+// Determine whether the collection expression is an lvalue or an rvalue.
+// NOTE: this gets the answer wrong for const rvalues.
+# define BOOST_FOREACH_SHOULD_COPY(COL)                                                         \
+    (true ? 0 : boost::foreach_detail_::or_(                                                    \
+        boost::foreach_detail_::is_rvalue_((COL), 0)                                            \
+      , BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL)))
+
+#else
+///////////////////////////////////////////////////////////////////////////////
+// R-values NOT supported here
+///////////////////////////////////////////////////////////////////////////////
+
+// No variable is needed to track the rvalue-ness of the collection expression
+# define BOOST_FOREACH_PREAMBLE()                                                               \
+    BOOST_FOREACH_SUPPRESS_WARNINGS()
+
+// Evaluate the collection expression
+# define BOOST_FOREACH_EVALUATE(COL)                                                            \
+    (COL)
+
+// Can't use rvalues with BOOST_FOREACH (unless they are lightweight proxies)
+# define BOOST_FOREACH_SHOULD_COPY(COL)                                                         \
+    (true ? 0 : BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL))
+
+#endif
+
+#define BOOST_FOREACH_CONTAIN(COL)                                                              \
+    boost::foreach_detail_::contain(                                                            \
+        BOOST_FOREACH_EVALUATE(COL)                                                             \
+      , BOOST_FOREACH_SHOULD_COPY(COL))
+
+#define BOOST_FOREACH_BEGIN(COL)                                                                \
+    boost::foreach_detail_::begin(                                                              \
+        BOOST_FOREACH_ID(_foreach_col)                                                          \
+      , BOOST_FOREACH_TYPEOF(COL)                                                               \
+      , BOOST_FOREACH_SHOULD_COPY(COL))
+
+#define BOOST_FOREACH_END(COL)                                                                  \
+    boost::foreach_detail_::end(                                                                \
+        BOOST_FOREACH_ID(_foreach_col)                                                          \
+      , BOOST_FOREACH_TYPEOF(COL)                                                               \
+      , BOOST_FOREACH_SHOULD_COPY(COL))
+
+#define BOOST_FOREACH_DONE(COL)                                                                 \
+    boost::foreach_detail_::done(                                                               \
+        BOOST_FOREACH_ID(_foreach_cur)                                                          \
+      , BOOST_FOREACH_ID(_foreach_end)                                                          \
+      , BOOST_FOREACH_TYPEOF(COL))
+
+#define BOOST_FOREACH_NEXT(COL)                                                                 \
+    boost::foreach_detail_::next(                                                               \
+        BOOST_FOREACH_ID(_foreach_cur)                                                          \
+      , BOOST_FOREACH_TYPEOF(COL))
+
+#define BOOST_FOREACH_DEREF(COL)                                                                \
+    boost::foreach_detail_::deref(                                                              \
+        BOOST_FOREACH_ID(_foreach_cur)                                                          \
+      , BOOST_FOREACH_TYPEOF(COL))
+
+#define BOOST_FOREACH_RBEGIN(COL)                                                               \
+    boost::foreach_detail_::rbegin(                                                             \
+        BOOST_FOREACH_ID(_foreach_col)                                                          \
+      , BOOST_FOREACH_TYPEOF(COL)                                                               \
+      , BOOST_FOREACH_SHOULD_COPY(COL))
+
+#define BOOST_FOREACH_REND(COL)                                                                 \
+    boost::foreach_detail_::rend(                                                               \
+        BOOST_FOREACH_ID(_foreach_col)                                                          \
+      , BOOST_FOREACH_TYPEOF(COL)                                                               \
+      , BOOST_FOREACH_SHOULD_COPY(COL))
+
+#define BOOST_FOREACH_RDONE(COL)                                                                \
+    boost::foreach_detail_::rdone(                                                              \
+        BOOST_FOREACH_ID(_foreach_cur)                                                          \
+      , BOOST_FOREACH_ID(_foreach_end)                                                          \
+      , BOOST_FOREACH_TYPEOF(COL))
+
+#define BOOST_FOREACH_RNEXT(COL)                                                                \
+    boost::foreach_detail_::rnext(                                                              \
+        BOOST_FOREACH_ID(_foreach_cur)                                                          \
+      , BOOST_FOREACH_TYPEOF(COL))
+
+#define BOOST_FOREACH_RDEREF(COL)                                                               \
+    boost::foreach_detail_::rderef(                                                             \
+        BOOST_FOREACH_ID(_foreach_cur)                                                          \
+      , BOOST_FOREACH_TYPEOF(COL))
+
+///////////////////////////////////////////////////////////////////////////////
+// BOOST_FOREACH
+//
+//   For iterating over collections. Collections can be
+//   arrays, null-terminated strings, or STL containers.
+//   The loop variable can be a value or reference. For
+//   example:
+//
+//   std::list<int> int_list(/*stuff*/);
+//   BOOST_FOREACH(int &i, int_list)
+//   {
+//       /* 
+//        * loop body goes here.
+//        * i is a reference to the int in int_list.
+//        */
+//   }
+//
+//   Alternately, you can declare the loop variable first,
+//   so you can access it after the loop finishes. Obviously,
+//   if you do it this way, then the loop variable cannot be
+//   a reference.
+//
+//   int i;
+//   BOOST_FOREACH(i, int_list)
+//       { ... }
+//
+#define BOOST_FOREACH(VAR, COL)                                                                                   \
+    BOOST_FOREACH_PREAMBLE()                                                                                      \
+    if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_col) = BOOST_FOREACH_CONTAIN(COL)) {} else   \
+    if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_cur) = BOOST_FOREACH_BEGIN(COL)) {} else     \
+    if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_end) = BOOST_FOREACH_END(COL)) {} else       \
+    for (bool BOOST_FOREACH_ID(_foreach_continue) = true;                                                         \
+              BOOST_FOREACH_ID(_foreach_continue) && !BOOST_FOREACH_DONE(COL);                                    \
+              BOOST_FOREACH_ID(_foreach_continue) ? BOOST_FOREACH_NEXT(COL) : (void)0)                            \
+        if  (boost::foreach_detail_::set_false(BOOST_FOREACH_ID(_foreach_continue))) {} else                      \
+        for (VAR = BOOST_FOREACH_DEREF(COL); !BOOST_FOREACH_ID(_foreach_continue); BOOST_FOREACH_ID(_foreach_continue) = true)
+
+///////////////////////////////////////////////////////////////////////////////
+// BOOST_REVERSE_FOREACH
+//
+//   For iterating over collections in reverse order. In
+//   all other respects, BOOST_REVERSE_FOREACH is like
+//   BOOST_FOREACH.
+//
+#define BOOST_REVERSE_FOREACH(VAR, COL)                                                                           \
+    BOOST_FOREACH_PREAMBLE()                                                                                      \
+    if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_col) = BOOST_FOREACH_CONTAIN(COL)) {} else   \
+    if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_cur) = BOOST_FOREACH_RBEGIN(COL)) {} else    \
+    if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_end) = BOOST_FOREACH_REND(COL)) {} else      \
+    for (bool BOOST_FOREACH_ID(_foreach_continue) = true;                                                         \
+              BOOST_FOREACH_ID(_foreach_continue) && !BOOST_FOREACH_RDONE(COL);                                   \
+              BOOST_FOREACH_ID(_foreach_continue) ? BOOST_FOREACH_RNEXT(COL) : (void)0)                           \
+        if  (boost::foreach_detail_::set_false(BOOST_FOREACH_ID(_foreach_continue))) {} else                      \
+        for (VAR = BOOST_FOREACH_RDEREF(COL); !BOOST_FOREACH_ID(_foreach_continue); BOOST_FOREACH_ID(_foreach_continue) = true)
+
+#endif
diff --git a/ext/boost/foreach_fwd.hpp b/ext/boost/foreach_fwd.hpp
new file mode 100644
index 0000000..4e0bb37
--- /dev/null
+++ b/ext/boost/foreach_fwd.hpp
@@ -0,0 +1,51 @@
+///////////////////////////////////////////////////////////////////////////////
+// foreach.hpp header file
+//
+// Copyright 2010 Eric Niebler.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/foreach for documentation
+//
+// Credits:
+// Kazutoshi Satoda: for suggesting the need for a _fwd header for foreach's
+//                      customization points.
+
+#ifndef BOOST_FOREACH_FWD_HPP
+#define BOOST_FOREACH_FWD_HPP
+
+// This must be at global scope, hence the uglified name
+enum boost_foreach_argument_dependent_lookup_hack
+{
+    boost_foreach_argument_dependent_lookup_hack_value
+};
+
+namespace boost
+{
+
+namespace foreach
+{
+    ///////////////////////////////////////////////////////////////////////////////
+    // boost::foreach::tag
+    //
+    typedef boost_foreach_argument_dependent_lookup_hack tag;
+
+    ///////////////////////////////////////////////////////////////////////////////
+    // boost::foreach::is_lightweight_proxy
+    //   Specialize this for user-defined collection types if they are inexpensive to copy.
+    //   This tells BOOST_FOREACH it can avoid the rvalue/lvalue detection stuff.
+    template<typename T>
+    struct is_lightweight_proxy;
+
+    ///////////////////////////////////////////////////////////////////////////////
+    // boost::foreach::is_noncopyable
+    //   Specialize this for user-defined collection types if they cannot be copied.
+    //   This also tells BOOST_FOREACH to avoid the rvalue/lvalue detection stuff.
+    template<typename T>
+    struct is_noncopyable;
+
+} // namespace foreach
+
+} // namespace boost
+
+#endif
diff --git a/ext/boost/function.hpp b/ext/boost/function.hpp
index bdb2769..b72842b 100644
--- a/ext/boost/function.hpp
+++ b/ext/boost/function.hpp
@@ -23,8 +23,8 @@
 // in anything that may be included by function_template.hpp doesn't break
 #include <boost/function/detail/prologue.hpp>
 
-// Visual Age C++ doesn't handle the file iteration well
-#if BOOST_WORKAROUND(__IBMCPP__, >= 500)
+// Older Visual Age C++ version do not handle the file iteration well
+#if BOOST_WORKAROUND(__IBMCPP__, >= 500) && BOOST_WORKAROUND(__IBMCPP__, < 800)
 #  if BOOST_FUNCTION_MAX_ARGS >= 0
 #    include <boost/function/function0.hpp>
 #  endif
diff --git a/ext/boost/function/._function_fwd.hpp b/ext/boost/function/._function_fwd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/function/._function_fwd.hpp and /dev/null differ
diff --git a/ext/boost/function/detail/._function_iterate.hpp b/ext/boost/function/detail/._function_iterate.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/function/detail/._function_iterate.hpp and /dev/null differ
diff --git a/ext/boost/function/detail/._maybe_include.hpp b/ext/boost/function/detail/._maybe_include.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/function/detail/._maybe_include.hpp and /dev/null differ
diff --git a/ext/boost/function/detail/._prologue.hpp b/ext/boost/function/detail/._prologue.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/function/detail/._prologue.hpp and /dev/null differ
diff --git a/ext/boost/function/function_base.hpp b/ext/boost/function/function_base.hpp
index fe9bbbe..78b7dd1 100644
--- a/ext/boost/function/function_base.hpp
+++ b/ext/boost/function/function_base.hpp
@@ -203,11 +203,11 @@ namespace boost {
         {
           switch (op) {
           case clone_functor_tag: 
-            out_buffer.obj_ref.obj_ptr = in_buffer.obj_ref.obj_ptr;
+            out_buffer.obj_ref = in_buffer.obj_ref;
             return;
 
           case move_functor_tag:
-            out_buffer.obj_ref.obj_ptr = in_buffer.obj_ref.obj_ptr;
+            out_buffer.obj_ref = in_buffer.obj_ref;
             in_buffer.obj_ref.obj_ptr = 0;
             return;
 
@@ -315,14 +315,18 @@ namespace boost {
           if (op == clone_functor_tag || op == move_functor_tag) {
             const functor_type* in_functor = 
               reinterpret_cast<const functor_type*>(&in_buffer.data);
-            new ((void*)&out_buffer.data) functor_type(*in_functor);
+            new (reinterpret_cast<void*>(&out_buffer.data)) functor_type(*in_functor);
 
             if (op == move_functor_tag) {
-              reinterpret_cast<functor_type*>(&in_buffer.data)->~Functor();
+              functor_type* f = reinterpret_cast<functor_type*>(&in_buffer.data);
+              (void)f; // suppress warning about the value of f not being used (MSVC)
+              f->~Functor();
             }
           } else if (op == destroy_functor_tag) {
             // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type.
-            reinterpret_cast<functor_type*>(&out_buffer.data)->~Functor();
+             functor_type* f = reinterpret_cast<functor_type*>(&out_buffer.data);
+             (void)f; // suppress warning about the value of f not being used (MSVC)
+             f->~Functor();
           } else if (op == check_functor_type_tag) {
             const detail::sp_typeinfo& check_type 
               = *out_buffer.type.type;
@@ -369,8 +373,10 @@ namespace boost {
             // Clone the functor
             // GCC 2.95.3 gets the CV qualifiers wrong here, so we
             // can't do the static_cast that we should do.
+            // jewillco: Changing this to static_cast because GCC 2.95.3 is
+            // obsolete.
             const functor_type* f =
-              (const functor_type*)(in_buffer.obj_ptr);
+              static_cast<const functor_type*>(in_buffer.obj_ptr);
             functor_type* new_f = new functor_type(*f);
             out_buffer.obj_ptr = new_f;
           } else if (op == move_functor_tag) {
@@ -474,7 +480,7 @@ namespace boost {
             // GCC 2.95.3 gets the CV qualifiers wrong here, so we
             // can't do the static_cast that we should do.
             const functor_wrapper_type* f =
-              (const functor_wrapper_type*)(in_buffer.obj_ptr);
+              static_cast<const functor_wrapper_type*>(in_buffer.obj_ptr);
             wrapper_allocator_type wrapper_allocator(static_cast<Allocator const &>(*f));
             wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
             wrapper_allocator.construct(copy, *f);
@@ -671,7 +677,7 @@ public:
                       detail::function::check_functor_type_tag);
       // GCC 2.95.3 gets the CV qualifiers wrong here, so we
       // can't do the static_cast that we should do.
-      return (const Functor*)(type_result.obj_ptr);
+      return static_cast<const Functor*>(type_result.obj_ptr);
     }
 
   template<typename F>
@@ -715,7 +721,7 @@ public:
 public: // should be protected, but GCC 2.95.3 will fail to allow access
   detail::function::vtable_base* get_vtable() const {
     return reinterpret_cast<detail::function::vtable_base*>(
-             reinterpret_cast<std::size_t>(vtable) & ~(std::size_t)0x01);
+             reinterpret_cast<std::size_t>(vtable) & ~static_cast<std::size_t>(0x01));
   }
 
   bool has_trivial_copy_and_destroy() const {
diff --git a/ext/boost/function/function_template.hpp b/ext/boost/function/function_template.hpp
index 6a99109..f9699d0 100644
--- a/ext/boost/function/function_template.hpp
+++ b/ext/boost/function/function_template.hpp
@@ -486,19 +486,19 @@ namespace boost {
                                             BOOST_FUNCTION_TEMPLATE_ARGS);
 
         template<typename F>
-        bool assign_to(F f, function_buffer& functor)
+        bool assign_to(F f, function_buffer& functor) const
         {
           typedef typename get_function_tag<F>::type tag;
           return assign_to(f, functor, tag());
         }
         template<typename F,typename Allocator>
-        bool assign_to_a(F f, function_buffer& functor, Allocator a)
+        bool assign_to_a(F f, function_buffer& functor, Allocator a) const
         {
           typedef typename get_function_tag<F>::type tag;
           return assign_to_a(f, functor, a, tag());
         }
 
-        void clear(function_buffer& functor)
+        void clear(function_buffer& functor) const
         {
           if (base.manager)
             base.manager(functor, functor, destroy_functor_tag);
@@ -508,13 +508,13 @@ namespace boost {
         // Function pointers
         template<typename FunctionPtr>
         bool 
-        assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag)
+        assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const
         {
           this->clear(functor);
           if (f) {
             // should be a reinterpret cast, but some compilers insist
             // on giving cv-qualifiers to free functions
-            functor.func_ptr = (void (*)())(f);
+            functor.func_ptr = reinterpret_cast<void (*)()>(f);
             return true;
           } else {
             return false;
@@ -522,7 +522,7 @@ namespace boost {
         }
         template<typename FunctionPtr,typename Allocator>
         bool 
-        assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag)
+        assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
         {
           return assign_to(f,functor,function_ptr_tag());
         }
@@ -530,26 +530,26 @@ namespace boost {
         // Member pointers
 #if BOOST_FUNCTION_NUM_ARGS > 0
         template<typename MemberPtr>
-        bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag)
+        bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
         {
           // DPG TBD: Add explicit support for member function
           // objects, so we invoke through mem_fn() but we retain the
           // right target_type() values.
           if (f) {
-            this->assign_to(mem_fn(f), functor);
+            this->assign_to(boost::mem_fn(f), functor);
             return true;
           } else {
             return false;
           }
         }
         template<typename MemberPtr,typename Allocator>
-        bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag)
+        bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) const
         {
           // DPG TBD: Add explicit support for member function
           // objects, so we invoke through mem_fn() but we retain the
           // right target_type() values.
           if (f) {
-            this->assign_to_a(mem_fn(f), functor, a);
+            this->assign_to_a(boost::mem_fn(f), functor, a);
             return true;
           } else {
             return false;
@@ -561,13 +561,13 @@ namespace boost {
         // Assign to a function object using the small object optimization
         template<typename FunctionObj>
         void 
-        assign_functor(FunctionObj f, function_buffer& functor, mpl::true_)
+        assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
         {
-          new ((void*)&functor.data) FunctionObj(f);
+          new (reinterpret_cast<void*>(&functor.data)) FunctionObj(f);
         }
         template<typename FunctionObj,typename Allocator>
         void 
-        assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_)
+        assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const
         {
           assign_functor(f,functor,mpl::true_());
         }
@@ -575,13 +575,13 @@ namespace boost {
         // Assign to a function object allocated on the heap.
         template<typename FunctionObj>
         void 
-        assign_functor(FunctionObj f, function_buffer& functor, mpl::false_)
+        assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const
         {
           functor.obj_ptr = new FunctionObj(f);
         }
         template<typename FunctionObj,typename Allocator>
         void 
-        assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_)
+        assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const
         {
           typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
           typedef typename Allocator::template rebind<functor_wrapper_type>::other
@@ -596,7 +596,7 @@ namespace boost {
 
         template<typename FunctionObj>
         bool 
-        assign_to(FunctionObj f, function_buffer& functor, function_obj_tag)
+        assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const
         {
           if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
             assign_functor(f, functor, 
@@ -608,7 +608,7 @@ namespace boost {
         }
         template<typename FunctionObj,typename Allocator>
         bool 
-        assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag)
+        assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
         {
           if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
             assign_functor_a(f, functor, a,
@@ -623,9 +623,9 @@ namespace boost {
         template<typename FunctionObj>
         bool 
         assign_to(const reference_wrapper<FunctionObj>& f, 
-                  function_buffer& functor, function_obj_ref_tag)
+                  function_buffer& functor, function_obj_ref_tag) const
         {
-          functor.obj_ref.obj_ptr = (void *)f.get_pointer();
+          functor.obj_ref.obj_ptr = (void *)(f.get_pointer());
           functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
           functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
           return true;
@@ -633,7 +633,7 @@ namespace boost {
         template<typename FunctionObj,typename Allocator>
         bool 
         assign_to_a(const reference_wrapper<FunctionObj>& f, 
-                  function_buffer& functor, Allocator, function_obj_ref_tag)
+                  function_buffer& functor, Allocator, function_obj_ref_tag) const
         {
           return assign_to(f,functor,function_obj_ref_tag());
         }
@@ -677,7 +677,7 @@ namespace boost {
 
     vtable_type* get_vtable() const {
       return reinterpret_cast<vtable_type*>(
-               reinterpret_cast<std::size_t>(vtable) & ~(std::size_t)0x01);
+               reinterpret_cast<std::size_t>(vtable) & ~static_cast<size_t>(0x01));
     }
 
     struct clear_type {};
@@ -748,12 +748,16 @@ namespace boost {
     {
       this->assign_to_own(f);
     }
-
+    
+#ifndef BOOST_NO_RVALUE_REFERENCES
+    BOOST_FUNCTION_FUNCTION(BOOST_FUNCTION_FUNCTION&& f) : function_base()
+    {
+      this->move_assign(f);
+    }
+#endif
+    
     ~BOOST_FUNCTION_FUNCTION() { clear(); }
 
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-    // MSVC 6.0 and prior require all definitions to be inline, but
-    // these definitions can become very costly.
     result_type operator()(BOOST_FUNCTION_PARMS) const
     {
       if (this->empty())
@@ -762,9 +766,6 @@ namespace boost {
       return get_vtable()->invoker
                (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS);
     }
-#else
-    result_type operator()(BOOST_FUNCTION_PARMS) const;
-#endif
 
     // The distinction between when to use BOOST_FUNCTION_FUNCTION and
     // when to use self_type is obnoxious. MSVC cannot handle self_type as
@@ -836,6 +837,26 @@ namespace boost {
       BOOST_CATCH_END
       return *this;
     }
+    
+#ifndef BOOST_NO_RVALUE_REFERENCES
+    // Move assignment from another BOOST_FUNCTION_FUNCTION
+    BOOST_FUNCTION_FUNCTION& operator=(BOOST_FUNCTION_FUNCTION&& f)
+    {
+      
+      if (&f == this)
+        return *this;
+
+      this->clear();
+      BOOST_TRY {
+        this->move_assign(f);
+      } BOOST_CATCH (...) {
+        vtable = 0;
+        BOOST_RETHROW;
+      }
+      BOOST_CATCH_END
+      return *this;
+    }
+#endif
 
     void swap(BOOST_FUNCTION_FUNCTION& other)
     {
@@ -864,7 +885,7 @@ namespace boost {
 #else
   private:
     struct dummy {
-      void nonnull() {};
+      void nonnull() {}
     };
 
     typedef void (dummy::*safe_bool)();
@@ -909,7 +930,7 @@ namespace boost {
       // static initialization. Otherwise, we will have a race
       // condition here in multi-threaded code. See
       // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/.
-      static vtable_type stored_vtable = 
+      static const vtable_type stored_vtable = 
         { { &manager_type::manage }, &invoker_type::invoke };
 
       if (stored_vtable.assign_to(f, functor)) {
@@ -917,7 +938,7 @@ namespace boost {
         if (boost::has_trivial_copy_constructor<Functor>::value &&
             boost::has_trivial_destructor<Functor>::value &&
             detail::function::function_allows_small_object_optimization<Functor>::value)
-          value |= (std::size_t)0x01;
+          value |= static_cast<size_t>(0x01);
         vtable = reinterpret_cast<detail::function::vtable_base *>(value);
       } else 
         vtable = 0;
@@ -943,7 +964,7 @@ namespace boost {
       // static initialization. Otherwise, we will have a race
       // condition here in multi-threaded code. See
       // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/.
-      static vtable_type stored_vtable =
+      static const vtable_type stored_vtable =
         { { &manager_type::manage }, &invoker_type::invoke };
 
       if (stored_vtable.assign_to_a(f, functor, a)) { 
@@ -951,7 +972,7 @@ namespace boost {
         if (boost::has_trivial_copy_constructor<Functor>::value &&
             boost::has_trivial_destructor<Functor>::value &&
             detail::function::function_allows_small_object_optimization<Functor>::value)
-          value |= (std::size_t)0x01;
+          value |= static_cast<std::size_t>(0x01);
         vtable = reinterpret_cast<detail::function::vtable_base *>(value);
       } else 
         vtable = 0;
@@ -998,22 +1019,6 @@ namespace boost {
     f1.swap(f2);
   }
 
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-  template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
-  typename BOOST_FUNCTION_FUNCTION<
-      R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS>::result_type
-  inline 
-  BOOST_FUNCTION_FUNCTION<R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS>
-  ::operator()(BOOST_FUNCTION_PARMS) const
-  {
-    if (this->empty())
-      boost::throw_exception(bad_function_call());
-
-    return get_vtable()->invoker
-             (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS);
-  }
-#endif
-
 // Poison comparisons between boost::function objects of the same type.
 template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
   void operator==(const BOOST_FUNCTION_FUNCTION<
@@ -1085,12 +1090,26 @@ public:
 
   function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
 
+#ifndef BOOST_NO_RVALUE_REFERENCES
+  // Move constructors
+  function(self_type&& f): base_type(static_cast<base_type&&>(f)){}
+  function(base_type&& f): base_type(static_cast<base_type&&>(f)){}
+#endif
+  
   self_type& operator=(const self_type& f)
   {
     self_type(f).swap(*this);
     return *this;
   }
 
+#ifndef BOOST_NO_RVALUE_REFERENCES
+  self_type& operator=(self_type&& f)
+  {
+    self_type(static_cast<self_type&&>(f)).swap(*this);
+    return *this;
+  }
+#endif  
+
   template<typename Functor>
 #ifndef BOOST_NO_SFINAE
   typename enable_if_c<
@@ -1119,6 +1138,14 @@ public:
     self_type(f).swap(*this);
     return *this;
   }
+  
+#ifndef BOOST_NO_RVALUE_REFERENCES
+  self_type& operator=(base_type&& f)
+  {
+    self_type(static_cast<base_type&&>(f)).swap(*this);
+    return *this;
+  }
+#endif 
 };
 
 #undef BOOST_FUNCTION_PARTIAL_SPEC
diff --git a/ext/boost/functional/hash.hpp b/ext/boost/functional/hash.hpp
new file mode 100644
index 0000000..44983f1
--- /dev/null
+++ b/ext/boost/functional/hash.hpp
@@ -0,0 +1,7 @@
+
+// Copyright 2005-2009 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/functional/hash/hash.hpp>
+
diff --git a/ext/boost/functional/hash/detail/container_fwd_0x.hpp b/ext/boost/functional/hash/detail/container_fwd_0x.hpp
new file mode 100644
index 0000000..bed7730
--- /dev/null
+++ b/ext/boost/functional/hash/detail/container_fwd_0x.hpp
@@ -0,0 +1,29 @@
+
+// Copyright 2012 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#if !defined(BOOST_DETAIL_CONTAINER_FWD_0X_HPP)
+#define BOOST_DETAIL_CONTAINER_FWD_0X_HPP
+
+#include <boost/detail/container_fwd.hpp>
+
+// std::array
+
+#if !defined(BOOST_NO_CXX11_HDR_ARRAY)
+#   include <array>
+#endif
+
+// std::tuple
+
+#if !defined(BOOST_NO_CXX11_HDR_TUPLE)
+#   include <tuple>
+#endif
+
+// std::shared_ptr/std::unique_ptr
+
+#if !defined(BOOST_NO_CXX11_HDR_MEMORY)
+#   include <memory>
+#endif
+
+#endif
diff --git a/ext/boost/functional/hash/detail/float_functions.hpp b/ext/boost/functional/hash/detail/float_functions.hpp
new file mode 100644
index 0000000..ae03ff0
--- /dev/null
+++ b/ext/boost/functional/hash/detail/float_functions.hpp
@@ -0,0 +1,246 @@
+
+// Copyright 2005-2009 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_FLOAT_FUNCTIONS_HPP)
+#define BOOST_FUNCTIONAL_HASH_DETAIL_FLOAT_FUNCTIONS_HPP
+
+#include <boost/config.hpp>
+#include <boost/config/no_tr1/cmath.hpp>
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+// The C++ standard requires that the C float functions are overloarded
+// for float, double and long double in the std namespace, but some of the older
+// library implementations don't support this. On some that don't, the C99
+// float functions (frexpf, frexpl, etc.) are available.
+//
+// The following tries to automatically detect which are available.
+
+namespace boost {
+    namespace hash_detail {
+
+        // Returned by dummy versions of the float functions.
+    
+        struct not_found {
+            // Implicitly convertible to float and long double in order to avoid
+            // a compile error when the dummy float functions are used.
+
+            inline operator float() const { return 0; }
+            inline operator long double() const { return 0; }
+        };
+          
+        // A type for detecting the return type of functions.
+
+        template <typename T> struct is;
+        template <> struct is<float> { char x[10]; };
+        template <> struct is<double> { char x[20]; };
+        template <> struct is<long double> { char x[30]; };
+        template <> struct is<boost::hash_detail::not_found> { char x[40]; };
+            
+        // Used to convert the return type of a function to a type for sizeof.
+
+        template <typename T> is<T> float_type(T);
+
+        // call_ldexp
+        //
+        // This will get specialized for float and long double
+        
+        template <typename Float> struct call_ldexp
+        {
+            typedef double float_type;
+            
+            inline double operator()(double a, int b) const
+            {
+                using namespace std;
+                return ldexp(a, b);
+            }
+        };
+
+        // call_frexp
+        //
+        // This will get specialized for float and long double
+
+        template <typename Float> struct call_frexp
+        {
+            typedef double float_type;
+            
+            inline double operator()(double a, int* b) const
+            {
+                using namespace std;
+                return frexp(a, b);
+            }
+        };
+    }
+}
+            
+// A namespace for dummy functions to detect when the actual function we want
+// isn't available. ldexpl, ldexpf etc. might be added tby the macros below.
+//
+// AFAICT these have to be outside of the boost namespace, as if they're in
+// the boost namespace they'll always be preferable to any other function
+// (since the arguments are built in types, ADL can't be used).
+
+namespace boost_hash_detect_float_functions {
+    template <class Float> boost::hash_detail::not_found ldexp(Float, int);
+    template <class Float> boost::hash_detail::not_found frexp(Float, int*);    
+}
+
+// Macros for generating specializations of call_ldexp and call_frexp.
+//
+// check_cpp and check_c99 check if the C++ or C99 functions are available.
+//
+// Then the call_* functions select an appropriate implementation.
+//
+// I used c99_func in a few places just to get a unique name.
+//
+// Important: when using 'using namespace' at namespace level, include as
+// little as possible in that namespace, as Visual C++ has an odd bug which
+// can cause the namespace to be imported at the global level. This seems to
+// happen mainly when there's a template in the same namesapce.
+
+#define BOOST_HASH_CALL_FLOAT_FUNC(cpp_func, c99_func, type1, type2)    \
+namespace boost_hash_detect_float_functions {                           \
+    template <class Float>                                              \
+    boost::hash_detail::not_found c99_func(Float, type2);               \
+}                                                                       \
+                                                                        \
+namespace boost {                                                       \
+    namespace hash_detail {                                             \
+        namespace c99_func##_detect {                                   \
+            using namespace std;                                        \
+            using namespace boost_hash_detect_float_functions;          \
+                                                                        \
+            struct check {                                              \
+                static type1 x;                                         \
+                static type2 y;                                         \
+                BOOST_STATIC_CONSTANT(bool, cpp =                       \
+                    sizeof(float_type(cpp_func(x,y)))                   \
+                        == sizeof(is<type1>));                          \
+                BOOST_STATIC_CONSTANT(bool, c99 =                       \
+                    sizeof(float_type(c99_func(x,y)))                   \
+                        == sizeof(is<type1>));                          \
+            };                                                          \
+        }                                                               \
+                                                                        \
+        template <bool x>                                               \
+        struct call_c99_##c99_func :                                    \
+            boost::hash_detail::call_##cpp_func<double> {};             \
+                                                                        \
+        template <>                                                     \
+        struct call_c99_##c99_func<true> {                              \
+            typedef type1 float_type;                                   \
+                                                                        \
+            template <typename T>                                       \
+            inline type1 operator()(type1 a, T b)  const                \
+            {                                                           \
+                using namespace std;                                    \
+                return c99_func(a, b);                                  \
+            }                                                           \
+        };                                                              \
+                                                                        \
+        template <bool x>                                               \
+        struct call_cpp_##c99_func :                                    \
+            call_c99_##c99_func<                                        \
+                ::boost::hash_detail::c99_func##_detect::check::c99     \
+            > {};                                                       \
+                                                                        \
+        template <>                                                     \
+        struct call_cpp_##c99_func<true> {                              \
+            typedef type1 float_type;                                   \
+                                                                        \
+            template <typename T>                                       \
+            inline type1 operator()(type1 a, T b)  const                \
+            {                                                           \
+                using namespace std;                                    \
+                return cpp_func(a, b);                                  \
+            }                                                           \
+        };                                                              \
+                                                                        \
+        template <>                                                     \
+        struct call_##cpp_func<type1> :                                 \
+            call_cpp_##c99_func<                                        \
+                ::boost::hash_detail::c99_func##_detect::check::cpp     \
+            > {};                                                       \
+    }                                                                   \
+}
+
+#define BOOST_HASH_CALL_FLOAT_MACRO(cpp_func, c99_func, type1, type2)   \
+namespace boost {                                                       \
+    namespace hash_detail {                                             \
+                                                                        \
+        template <>                                                     \
+        struct call_##cpp_func<type1> {                                 \
+            typedef type1 float_type;                                   \
+            inline type1 operator()(type1 x, type2 y) const {           \
+                return c99_func(x, y);                                  \
+            }                                                           \
+        };                                                              \
+    }                                                                   \
+}
+
+#if defined(ldexpf)
+BOOST_HASH_CALL_FLOAT_MACRO(ldexp, ldexpf, float, int)
+#else
+BOOST_HASH_CALL_FLOAT_FUNC(ldexp, ldexpf, float, int)
+#endif
+
+#if defined(ldexpl)
+BOOST_HASH_CALL_FLOAT_MACRO(ldexp, ldexpl, long double, int)
+#else
+BOOST_HASH_CALL_FLOAT_FUNC(ldexp, ldexpl, long double, int)
+#endif
+
+#if defined(frexpf)
+BOOST_HASH_CALL_FLOAT_MACRO(frexp, frexpf, float, int*)
+#else
+BOOST_HASH_CALL_FLOAT_FUNC(frexp, frexpf, float, int*)
+#endif
+
+#if defined(frexpl)
+BOOST_HASH_CALL_FLOAT_MACRO(frexp, frexpl, long double, int*)
+#else
+BOOST_HASH_CALL_FLOAT_FUNC(frexp, frexpl, long double, int*)
+#endif
+
+#undef BOOST_HASH_CALL_FLOAT_MACRO
+#undef BOOST_HASH_CALL_FLOAT_FUNC
+
+
+namespace boost
+{
+    namespace hash_detail
+    {
+        template <typename Float1, typename Float2>
+        struct select_hash_type_impl {
+            typedef double type;
+        };
+
+        template <>
+        struct select_hash_type_impl<float, float> {
+            typedef float type;
+        };
+
+        template <>
+        struct select_hash_type_impl<long double, long double> {
+            typedef long double type;
+        };
+
+
+        // select_hash_type
+        //
+        // If there is support for a particular floating point type, use that
+        // otherwise use double (there's always support for double).
+             
+        template <typename Float>
+        struct select_hash_type : select_hash_type_impl<
+                BOOST_DEDUCED_TYPENAME call_ldexp<Float>::float_type,
+                BOOST_DEDUCED_TYPENAME call_frexp<Float>::float_type
+            > {};            
+    }
+}
+
+#endif
diff --git a/ext/boost/functional/hash/detail/hash_float.hpp b/ext/boost/functional/hash/detail/hash_float.hpp
new file mode 100644
index 0000000..3edc6ab
--- /dev/null
+++ b/ext/boost/functional/hash/detail/hash_float.hpp
@@ -0,0 +1,268 @@
+
+// Copyright 2005-2012 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HEADER)
+#define BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HEADER
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <boost/config.hpp>
+#include <boost/functional/hash/detail/float_functions.hpp>
+#include <boost/functional/hash/detail/limits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/integer/static_log2.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/assert.hpp>
+#include <boost/limits.hpp>
+#include <cstring>
+
+#if defined(BOOST_MSVC)
+#pragma warning(push)
+#if BOOST_MSVC >= 1400
+#pragma warning(disable:6294) // Ill-defined for-loop: initial condition does
+                              // not satisfy test. Loop body not executed
+#endif
+#endif
+
+// Can we use fpclassify?
+
+// STLport
+#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
+#define BOOST_HASH_USE_FPCLASSIFY 0
+
+// GNU libstdc++ 3
+#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
+#  if (defined(__USE_ISOC99) || defined(_GLIBCXX_USE_C99_MATH)) && \
+      !(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
+#    define BOOST_HASH_USE_FPCLASSIFY 1
+#  else
+#    define BOOST_HASH_USE_FPCLASSIFY 0
+#  endif
+
+// Everything else
+#else
+#  define BOOST_HASH_USE_FPCLASSIFY 0
+#endif
+
+namespace boost
+{
+    namespace hash_detail
+    {
+        inline void hash_float_combine(std::size_t& seed, std::size_t value)
+        {
+            seed ^= value + (seed<<6) + (seed>>2);
+        }
+
+        ////////////////////////////////////////////////////////////////////////
+        // Binary hash function
+        //
+        // Only used for floats with known iec559 floats, and certain values in
+        // numeric_limits
+
+        inline std::size_t hash_binary(char* ptr, std::size_t length)
+        {
+            std::size_t seed = 0;
+
+            if (length >= sizeof(std::size_t)) {
+                seed = *(std::size_t*) ptr;
+                length -= sizeof(std::size_t);
+                ptr += sizeof(std::size_t);
+
+                while(length >= sizeof(std::size_t)) {
+                    hash_float_combine(seed, *(std::size_t*) ptr);
+                    length -= sizeof(std::size_t);
+                    ptr += sizeof(std::size_t);
+                }
+            }
+
+            if (length > 0) {
+                std::size_t buffer = 0;
+                std::memcpy(&buffer, ptr, length);
+                hash_float_combine(seed, buffer);
+            }
+
+            return seed;
+        }
+
+        template <typename Float>
+        inline std::size_t float_hash_impl(Float v,
+            BOOST_DEDUCED_TYPENAME boost::enable_if_c<
+                std::numeric_limits<Float>::is_iec559 &&
+                std::numeric_limits<Float>::digits == 24 &&
+                std::numeric_limits<Float>::radix == 2 &&
+                std::numeric_limits<Float>::max_exponent == 128,
+                int>::type
+            )
+        {
+            return hash_binary((char*) &v, 4);
+        }
+
+
+        template <typename Float>
+        inline std::size_t float_hash_impl(Float v,
+            BOOST_DEDUCED_TYPENAME boost::enable_if_c<
+                std::numeric_limits<Float>::is_iec559 &&
+                std::numeric_limits<Float>::digits == 53 &&
+                std::numeric_limits<Float>::radix == 2 &&
+                std::numeric_limits<Float>::max_exponent == 1024,
+                int>::type
+            )
+        {
+            return hash_binary((char*) &v, 8);
+        }
+
+        template <typename Float>
+        inline std::size_t float_hash_impl(Float v,
+            BOOST_DEDUCED_TYPENAME boost::enable_if_c<
+                std::numeric_limits<Float>::is_iec559 &&
+                std::numeric_limits<Float>::digits == 64 &&
+                std::numeric_limits<Float>::radix == 2 &&
+                std::numeric_limits<Float>::max_exponent == 16384,
+                int>::type
+            )
+        {
+            return hash_binary((char*) &v, 10);
+        }
+
+        template <typename Float>
+        inline std::size_t float_hash_impl(Float v,
+            BOOST_DEDUCED_TYPENAME boost::enable_if_c<
+                std::numeric_limits<Float>::is_iec559 &&
+                std::numeric_limits<Float>::digits == 113 &&
+                std::numeric_limits<Float>::radix == 2 &&
+                std::numeric_limits<Float>::max_exponent == 16384,
+                int>::type
+            )
+        {
+            return hash_binary((char*) &v, 16);
+        }
+
+        ////////////////////////////////////////////////////////////////////////
+        // Portable hash function
+        //
+        // Used as a fallback when the binary hash function isn't supported.
+
+        template <class T>
+        inline std::size_t float_hash_impl2(T v)
+        {
+            boost::hash_detail::call_frexp<T> frexp;
+            boost::hash_detail::call_ldexp<T> ldexp;
+
+            int exp = 0;
+
+            v = frexp(v, &exp);
+
+            // A postive value is easier to hash, so combine the
+            // sign with the exponent and use the absolute value.
+            if(v < 0) {
+                v = -v;
+                exp += limits<T>::max_exponent -
+                    limits<T>::min_exponent;
+            }
+
+            v = ldexp(v, limits<std::size_t>::digits);
+            std::size_t seed = static_cast<std::size_t>(v);
+            v -= static_cast<T>(seed);
+
+            // ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1;
+            std::size_t const length
+                = (limits<T>::digits *
+                        boost::static_log2<limits<T>::radix>::value
+                        + limits<std::size_t>::digits - 1)
+                / limits<std::size_t>::digits;
+
+            for(std::size_t i = 0; i != length; ++i)
+            {
+                v = ldexp(v, limits<std::size_t>::digits);
+                std::size_t part = static_cast<std::size_t>(v);
+                v -= static_cast<T>(part);
+                hash_float_combine(seed, part);
+            }
+
+            hash_float_combine(seed, exp);
+
+            return seed;
+        }
+
+#if !defined(BOOST_HASH_DETAIL_TEST_WITHOUT_GENERIC)
+        template <class T>
+        inline std::size_t float_hash_impl(T v, ...)
+        {
+            typedef BOOST_DEDUCED_TYPENAME select_hash_type<T>::type type;
+            return float_hash_impl2(static_cast<type>(v));
+        }
+#endif
+    }
+}
+
+#if BOOST_HASH_USE_FPCLASSIFY
+
+#include <boost/config/no_tr1/cmath.hpp>
+
+namespace boost
+{
+    namespace hash_detail
+    {
+        template <class T>
+        inline std::size_t float_hash_value(T v)
+        {
+            using namespace std;
+            switch (fpclassify(v)) {
+            case FP_ZERO:
+                return 0;
+            case FP_INFINITE:
+                return (std::size_t)(v > 0 ? -1 : -2);
+            case FP_NAN:
+                return (std::size_t)(-3);
+            case FP_NORMAL:
+            case FP_SUBNORMAL:
+                return float_hash_impl(v, 0);
+            default:
+                BOOST_ASSERT(0);
+                return 0;
+            }
+        }
+    }
+}
+
+#else // !BOOST_HASH_USE_FPCLASSIFY
+
+namespace boost
+{
+    namespace hash_detail
+    {
+        template <class T>
+        inline bool is_zero(T v)
+        {
+#if !defined(__GNUC__)
+            return v == 0;
+#else
+            // GCC's '-Wfloat-equal' will complain about comparing
+            // v to 0, but because it disables warnings for system
+            // headers it won't complain if you use std::equal_to to
+            // compare with 0. Resulting in this silliness:
+            return std::equal_to<T>()(v, 0);
+#endif
+        }
+
+        template <class T>
+        inline std::size_t float_hash_value(T v)
+        {
+            return boost::hash_detail::is_zero(v) ? 0 : float_hash_impl(v, 0);
+        }
+    }
+}
+
+#endif // BOOST_HASH_USE_FPCLASSIFY
+
+#undef BOOST_HASH_USE_FPCLASSIFY
+
+#if defined(BOOST_MSVC)
+#pragma warning(pop)
+#endif
+
+#endif
diff --git a/ext/boost/functional/hash/detail/limits.hpp b/ext/boost/functional/hash/detail/limits.hpp
new file mode 100644
index 0000000..f5b520e
--- /dev/null
+++ b/ext/boost/functional/hash/detail/limits.hpp
@@ -0,0 +1,61 @@
+
+// Copyright 2005-2009 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// On some platforms std::limits gives incorrect values for long double.
+// This tries to work around them.
+
+#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER)
+#define BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <boost/limits.hpp>
+
+// On OpenBSD, numeric_limits is not reliable for long doubles, but
+// the macros defined in <float.h> are and support long double when STLport
+// doesn't.
+
+#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE)
+#include <float.h>
+#endif
+
+namespace boost
+{
+    namespace hash_detail
+    {
+        template <class T>
+        struct limits : std::numeric_limits<T> {};
+
+#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE)
+        template <>
+        struct limits<long double>
+             : std::numeric_limits<long double>
+        {
+            static long double epsilon() {
+                return LDBL_EPSILON;
+            }
+
+            static long double (max)() {
+                return LDBL_MAX;
+            }
+
+            static long double (min)() {
+                return LDBL_MIN;
+            }
+
+            BOOST_STATIC_CONSTANT(int, digits = LDBL_MANT_DIG);
+            BOOST_STATIC_CONSTANT(int, max_exponent = LDBL_MAX_EXP);
+            BOOST_STATIC_CONSTANT(int, min_exponent = LDBL_MIN_EXP);
+#if defined(_STLP_NO_LONG_DOUBLE)
+            BOOST_STATIC_CONSTANT(int, radix = FLT_RADIX);
+#endif
+        };
+#endif // __OpenBSD__
+    }
+}
+
+#endif
diff --git a/ext/boost/functional/hash/extensions.hpp b/ext/boost/functional/hash/extensions.hpp
new file mode 100644
index 0000000..4358736
--- /dev/null
+++ b/ext/boost/functional/hash/extensions.hpp
@@ -0,0 +1,367 @@
+
+// Copyright 2005-2009 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  Based on Peter Dimov's proposal
+//  http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf
+//  issue 6.18. 
+
+// This implements the extensions to the standard.
+// It's undocumented, so you shouldn't use it....
+
+#if !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP)
+#define BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP
+
+#include <boost/functional/hash/hash.hpp>
+#include <boost/functional/hash/detail/container_fwd_0x.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
+#include <boost/type_traits/is_array.hpp>
+#endif
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+#include <boost/type_traits/is_const.hpp>
+#endif
+
+namespace boost
+{
+    template <class A, class B>
+    std::size_t hash_value(std::pair<A, B> const&);
+    template <class T, class A>
+    std::size_t hash_value(std::vector<T, A> const&);
+    template <class T, class A>
+    std::size_t hash_value(std::list<T, A> const& v);
+    template <class T, class A>
+    std::size_t hash_value(std::deque<T, A> const& v);
+    template <class K, class C, class A>
+    std::size_t hash_value(std::set<K, C, A> const& v);
+    template <class K, class C, class A>
+    std::size_t hash_value(std::multiset<K, C, A> const& v);
+    template <class K, class T, class C, class A>
+    std::size_t hash_value(std::map<K, T, C, A> const& v);
+    template <class K, class T, class C, class A>
+    std::size_t hash_value(std::multimap<K, T, C, A> const& v);
+
+    template <class T>
+    std::size_t hash_value(std::complex<T> const&);
+
+    template <class A, class B>
+    std::size_t hash_value(std::pair<A, B> const& v)
+    {
+        std::size_t seed = 0;
+        boost::hash_combine(seed, v.first);
+        boost::hash_combine(seed, v.second);
+        return seed;
+    }
+
+    template <class T, class A>
+    std::size_t hash_value(std::vector<T, A> const& v)
+    {
+        return boost::hash_range(v.begin(), v.end());
+    }
+
+    template <class T, class A>
+    std::size_t hash_value(std::list<T, A> const& v)
+    {
+        return boost::hash_range(v.begin(), v.end());
+    }
+
+    template <class T, class A>
+    std::size_t hash_value(std::deque<T, A> const& v)
+    {
+        return boost::hash_range(v.begin(), v.end());
+    }
+
+    template <class K, class C, class A>
+    std::size_t hash_value(std::set<K, C, A> const& v)
+    {
+        return boost::hash_range(v.begin(), v.end());
+    }
+
+    template <class K, class C, class A>
+    std::size_t hash_value(std::multiset<K, C, A> const& v)
+    {
+        return boost::hash_range(v.begin(), v.end());
+    }
+
+    template <class K, class T, class C, class A>
+    std::size_t hash_value(std::map<K, T, C, A> const& v)
+    {
+        return boost::hash_range(v.begin(), v.end());
+    }
+
+    template <class K, class T, class C, class A>
+    std::size_t hash_value(std::multimap<K, T, C, A> const& v)
+    {
+        return boost::hash_range(v.begin(), v.end());
+    }
+
+    template <class T>
+    std::size_t hash_value(std::complex<T> const& v)
+    {
+        boost::hash<T> hasher;
+        std::size_t seed = hasher(v.imag());
+        seed ^= hasher(v.real()) + (seed<<6) + (seed>>2);
+        return seed;
+    }
+
+#if !defined(BOOST_NO_CXX11_HDR_ARRAY)
+    template <class T, std::size_t N>
+    std::size_t hash_value(std::array<T, N> const& v)
+    {
+        return boost::hash_range(v.begin(), v.end());
+    }
+#endif
+
+#if !defined(BOOST_NO_CXX11_HDR_TUPLE)
+    namespace hash_detail {
+        template <std::size_t I, typename T>
+        inline typename boost::enable_if_c<(I == std::tuple_size<T>::value),
+                void>::type
+            hash_combine_tuple(std::size_t&, T const&)
+        {
+        }
+
+        template <std::size_t I, typename T>
+        inline typename boost::enable_if_c<(I < std::tuple_size<T>::value),
+                void>::type
+            hash_combine_tuple(std::size_t& seed, T const& v)
+        {
+            boost::hash_combine(seed, std::get<I>(v));
+            boost::hash_detail::hash_combine_tuple<I + 1>(seed, v);
+        }
+
+        template <typename T>
+        inline std::size_t hash_tuple(T const& v)
+        {
+            std::size_t seed = 0;
+            boost::hash_detail::hash_combine_tuple<0>(seed, v);
+            return seed;
+        }
+    }
+
+#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
+    template <typename... T>
+    inline std::size_t hash_value(std::tuple<T...> const& v)
+    {
+        return boost::hash_detail::hash_tuple(v);
+    }
+#else
+
+    inline std::size_t hash_value(std::tuple<> const& v)
+    {
+        return boost::hash_detail::hash_tuple(v);
+    }
+
+#   define BOOST_HASH_TUPLE_F(z, n, _)                                      \
+    template<                                                               \
+        BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)                            \
+    >                                                                       \
+    inline std::size_t hash_value(std::tuple<                               \
+        BOOST_PP_ENUM_PARAMS_Z(z, n, A)                                     \
+    > const& v)                                                             \
+    {                                                                       \
+        return boost::hash_detail::hash_tuple(v);                           \
+    }
+
+    BOOST_PP_REPEAT_FROM_TO(1, 11, BOOST_HASH_TUPLE_F, _)
+#   undef BOOST_HASH_TUPLE_F
+#endif
+
+#endif
+
+#if !defined(BOOST_NO_CXX11_SMART_PTR)
+    template <typename T>
+    inline std::size_t hash_value(std::shared_ptr<T> const& x) {
+        return boost::hash_value(x.get());
+    }
+
+    template <typename T, typename Deleter>
+    inline std::size_t hash_value(std::unique_ptr<T, Deleter> const& x) {
+        return boost::hash_value(x.get());
+    }
+#endif
+
+    //
+    // call_hash_impl
+    //
+
+    // On compilers without function template ordering, this deals with arrays.
+
+#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
+    namespace hash_detail
+    {
+        template <bool IsArray>
+        struct call_hash_impl
+        {
+            template <class T>
+            struct inner
+            {
+                static std::size_t call(T const& v)
+                {
+                    using namespace boost;
+                    return hash_value(v);
+                }
+            };
+        };
+
+        template <>
+        struct call_hash_impl<true>
+        {
+            template <class Array>
+            struct inner
+            {
+#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+                static std::size_t call(Array const& v)
+#else
+                static std::size_t call(Array& v)
+#endif
+                {
+                    const int size = sizeof(v) / sizeof(*v);
+                    return boost::hash_range(v, v + size);
+                }
+            };
+        };
+
+        template <class T>
+        struct call_hash
+            : public call_hash_impl<boost::is_array<T>::value>
+                ::BOOST_NESTED_TEMPLATE inner<T>
+        {
+        };
+    }
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+    //
+    // boost::hash
+    //
+
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+    template <class T> struct hash
+        : std::unary_function<T, std::size_t>
+    {
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
+        std::size_t operator()(T const& val) const
+        {
+            return hash_value(val);
+        }
+#else
+        std::size_t operator()(T const& val) const
+        {
+            return hash_detail::call_hash<T>::call(val);
+        }
+#endif
+    };
+
+#if BOOST_WORKAROUND(__DMC__, <= 0x848)
+    template <class T, unsigned int n> struct hash<T[n]>
+        : std::unary_function<T[n], std::size_t>
+    {
+        std::size_t operator()(const T* val) const
+        {
+            return boost::hash_range(val, val+n);
+        }
+    };
+#endif
+
+#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+    // On compilers without partial specialization, boost::hash<T>
+    // has already been declared to deal with pointers, so just
+    // need to supply the non-pointer version of hash_impl.
+
+    namespace hash_detail
+    {
+        template <bool IsPointer>
+        struct hash_impl;
+
+#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+
+        template <>
+        struct hash_impl<false>
+        {
+            template <class T>
+            struct inner
+                : std::unary_function<T, std::size_t>
+            {
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
+                std::size_t operator()(T const& val) const
+                {
+                    return hash_value(val);
+                }
+#else
+                std::size_t operator()(T const& val) const
+                {
+                    return hash_detail::call_hash<T>::call(val);
+                }
+#endif
+            };
+        };
+
+#else // Visual C++ 6.5
+
+        // Visual C++ 6.5 has problems with nested member functions and
+        // applying const to const types in templates. So we get this:
+
+        template <bool IsConst>
+        struct hash_impl_msvc
+        {
+            template <class T>
+            struct inner
+                : public std::unary_function<T, std::size_t>
+            {
+                std::size_t operator()(T const& val) const
+                {
+                    return hash_detail::call_hash<T const>::call(val);
+                }
+
+                std::size_t operator()(T& val) const
+                {
+                    return hash_detail::call_hash<T>::call(val);
+                }
+            };
+        };
+
+        template <>
+        struct hash_impl_msvc<true>
+        {
+            template <class T>
+            struct inner
+                : public std::unary_function<T, std::size_t>
+            {
+                std::size_t operator()(T& val) const
+                {
+                    return hash_detail::call_hash<T>::call(val);
+                }
+            };
+        };
+        
+        template <class T>
+        struct hash_impl_msvc2
+            : public hash_impl_msvc<boost::is_const<T>::value>
+                    ::BOOST_NESTED_TEMPLATE inner<T> {};
+        
+        template <>
+        struct hash_impl<false>
+        {
+            template <class T>
+            struct inner : public hash_impl_msvc2<T> {};
+        };
+
+#endif // Visual C++ 6.5
+    }
+#endif  // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+}
+
+#endif
diff --git a/ext/boost/functional/hash/hash.hpp b/ext/boost/functional/hash/hash.hpp
new file mode 100644
index 0000000..647fd68
--- /dev/null
+++ b/ext/boost/functional/hash/hash.hpp
@@ -0,0 +1,509 @@
+
+// Copyright 2005-2009 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  Based on Peter Dimov's proposal
+//  http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf
+//  issue 6.18. 
+
+#if !defined(BOOST_FUNCTIONAL_HASH_HASH_HPP)
+#define BOOST_FUNCTIONAL_HASH_HASH_HPP
+
+#include <boost/functional/hash/hash_fwd.hpp>
+#include <functional>
+#include <boost/functional/hash/detail/hash_float.hpp>
+#include <string>
+#include <boost/limits.hpp>
+#include <boost/type_traits/is_enum.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#include <boost/type_traits/is_pointer.hpp>
+#endif
+
+#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
+#include <typeindex>
+#endif
+
+#if BOOST_WORKAROUND(__GNUC__, < 3) \
+    && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+#define BOOST_HASH_CHAR_TRAITS string_char_traits
+#else
+#define BOOST_HASH_CHAR_TRAITS char_traits
+#endif
+
+namespace boost
+{
+    namespace hash_detail
+    {
+        struct enable_hash_value { typedef std::size_t type; };
+
+        template <typename T> struct basic_numbers {};
+        template <typename T> struct long_numbers {};
+        template <typename T> struct ulong_numbers {};
+        template <typename T> struct float_numbers {};
+
+        template <> struct basic_numbers<bool> :
+            boost::hash_detail::enable_hash_value {};
+        template <> struct basic_numbers<char> :
+            boost::hash_detail::enable_hash_value {};
+        template <> struct basic_numbers<unsigned char> :
+            boost::hash_detail::enable_hash_value {};
+        template <> struct basic_numbers<signed char> :
+            boost::hash_detail::enable_hash_value {};
+        template <> struct basic_numbers<short> :
+            boost::hash_detail::enable_hash_value {};
+        template <> struct basic_numbers<unsigned short> :
+            boost::hash_detail::enable_hash_value {};
+        template <> struct basic_numbers<int> :
+            boost::hash_detail::enable_hash_value {};
+        template <> struct basic_numbers<unsigned int> :
+            boost::hash_detail::enable_hash_value {};
+        template <> struct basic_numbers<long> :
+            boost::hash_detail::enable_hash_value {};
+        template <> struct basic_numbers<unsigned long> :
+            boost::hash_detail::enable_hash_value {};
+
+#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
+        template <> struct basic_numbers<wchar_t> :
+            boost::hash_detail::enable_hash_value {};
+#endif
+
+#if !defined(BOOST_NO_LONG_LONG)
+        template <> struct long_numbers<boost::long_long_type> :
+            boost::hash_detail::enable_hash_value {};
+        template <> struct ulong_numbers<boost::ulong_long_type> :
+            boost::hash_detail::enable_hash_value {};
+#endif
+
+        template <> struct float_numbers<float> :
+            boost::hash_detail::enable_hash_value {};
+        template <> struct float_numbers<double> :
+            boost::hash_detail::enable_hash_value {};
+        template <> struct float_numbers<long double> :
+            boost::hash_detail::enable_hash_value {};
+    }
+
+    template <typename T>
+    typename boost::hash_detail::basic_numbers<T>::type hash_value(T);
+    template <typename T>
+    typename boost::hash_detail::long_numbers<T>::type hash_value(T);
+    template <typename T>
+    typename boost::hash_detail::ulong_numbers<T>::type hash_value(T);
+
+    template <typename T>
+    typename boost::enable_if<boost::is_enum<T>, std::size_t>::type
+    	hash_value(T);
+
+#if !BOOST_WORKAROUND(__DMC__, <= 0x848)
+    template <class T> std::size_t hash_value(T* const&);
+#else
+    template <class T> std::size_t hash_value(T*);
+#endif
+
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
+    template< class T, unsigned N >
+    std::size_t hash_value(const T (&x)[N]);
+
+    template< class T, unsigned N >
+    std::size_t hash_value(T (&x)[N]);
+#endif
+
+    template <class Ch, class A>
+    std::size_t hash_value(
+        std::basic_string<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch>, A> const&);
+
+    template <typename T>
+    typename boost::hash_detail::float_numbers<T>::type hash_value(T);
+
+#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
+    std::size_t hash_value(std::type_index);
+#endif
+
+    // Implementation
+
+    namespace hash_detail
+    {
+        template <class T>
+        inline std::size_t hash_value_signed(T val)
+        {
+             const int size_t_bits = std::numeric_limits<std::size_t>::digits;
+             // ceiling(std::numeric_limits<T>::digits / size_t_bits) - 1
+             const int length = (std::numeric_limits<T>::digits - 1)
+                 / size_t_bits;
+
+             std::size_t seed = 0;
+             T positive = val < 0 ? -1 - val : val;
+
+             // Hopefully, this loop can be unrolled.
+             for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits)
+             {
+                 seed ^= (std::size_t) (positive >> i) + (seed<<6) + (seed>>2);
+             }
+             seed ^= (std::size_t) val + (seed<<6) + (seed>>2);
+
+             return seed;
+        }
+
+        template <class T>
+        inline std::size_t hash_value_unsigned(T val)
+        {
+             const int size_t_bits = std::numeric_limits<std::size_t>::digits;
+             // ceiling(std::numeric_limits<T>::digits / size_t_bits) - 1
+             const int length = (std::numeric_limits<T>::digits - 1)
+                 / size_t_bits;
+
+             std::size_t seed = 0;
+
+             // Hopefully, this loop can be unrolled.
+             for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits)
+             {
+                 seed ^= (std::size_t) (val >> i) + (seed<<6) + (seed>>2);
+             }
+             seed ^= (std::size_t) val + (seed<<6) + (seed>>2);
+
+             return seed;
+        }
+    }
+
+    template <typename T>
+    typename boost::hash_detail::basic_numbers<T>::type hash_value(T v)
+    {
+        return static_cast<std::size_t>(v);
+    }
+
+    template <typename T>
+    typename boost::hash_detail::long_numbers<T>::type hash_value(T v)
+    {
+        return hash_detail::hash_value_signed(v);
+    }
+
+    template <typename T>
+    typename boost::hash_detail::ulong_numbers<T>::type hash_value(T v)
+    {
+        return hash_detail::hash_value_unsigned(v);
+    }
+
+    template <typename T>
+    typename boost::enable_if<boost::is_enum<T>, std::size_t>::type
+    	hash_value(T v)
+    {
+    	return static_cast<std::size_t>(v);
+    }
+
+    // Implementation by Alberto Barbati and Dave Harris.
+#if !BOOST_WORKAROUND(__DMC__, <= 0x848)
+    template <class T> std::size_t hash_value(T* const& v)
+#else
+    template <class T> std::size_t hash_value(T* v)
+#endif
+    {
+#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64
+    // for some reason ptrdiff_t on OpenVMS compiler with
+    // 64 bit is not 64 bit !!!
+        std::size_t x = static_cast<std::size_t>(
+           reinterpret_cast<long long int>(v));
+#else
+        std::size_t x = static_cast<std::size_t>(
+           reinterpret_cast<std::ptrdiff_t>(v));
+#endif
+        return x + (x >> 3);
+    }
+
+#if defined(BOOST_MSVC)
+#pragma warning(push)
+#if BOOST_MSVC <= 1400
+#pragma warning(disable:4267) // 'argument' : conversion from 'size_t' to
+                              // 'unsigned int', possible loss of data
+                              // A misguided attempt to detect 64-bit
+                              // incompatability.
+#endif
+#endif
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+    template <class T>
+    inline void hash_combine(std::size_t& seed, T& v)
+#else
+    template <class T>
+    inline void hash_combine(std::size_t& seed, T const& v)
+#endif
+    {
+        boost::hash<T> hasher;
+        seed ^= hasher(v) + 0x9e3779b9 + (seed<<6) + (seed>>2);
+    }
+
+#if defined(BOOST_MSVC)
+#pragma warning(pop)
+#endif
+
+    template <class It>
+    inline std::size_t hash_range(It first, It last)
+    {
+        std::size_t seed = 0;
+
+        for(; first != last; ++first)
+        {
+            hash_combine(seed, *first);
+        }
+
+        return seed;
+    }
+
+    template <class It>
+    inline void hash_range(std::size_t& seed, It first, It last)
+    {
+        for(; first != last; ++first)
+        {
+            hash_combine(seed, *first);
+        }
+    }
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
+    template <class T>
+    inline std::size_t hash_range(T* first, T* last)
+    {
+        std::size_t seed = 0;
+
+        for(; first != last; ++first)
+        {
+            boost::hash<T> hasher;
+            seed ^= hasher(*first) + 0x9e3779b9 + (seed<<6) + (seed>>2);
+        }
+
+        return seed;
+    }
+
+    template <class T>
+    inline void hash_range(std::size_t& seed, T* first, T* last)
+    {
+        for(; first != last; ++first)
+        {
+            boost::hash<T> hasher;
+            seed ^= hasher(*first) + 0x9e3779b9 + (seed<<6) + (seed>>2);
+        }
+    }
+#endif
+
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
+    template< class T, unsigned N >
+    inline std::size_t hash_value(const T (&x)[N])
+    {
+        return hash_range(x, x + N);
+    }
+
+    template< class T, unsigned N >
+    inline std::size_t hash_value(T (&x)[N])
+    {
+        return hash_range(x, x + N);
+    }
+#endif
+
+    template <class Ch, class A>
+    inline std::size_t hash_value(
+        std::basic_string<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch>, A> const& v)
+    {
+        return hash_range(v.begin(), v.end());
+    }
+
+    template <typename T>
+    typename boost::hash_detail::float_numbers<T>::type hash_value(T v)
+    {
+        return boost::hash_detail::float_hash_value(v);
+    }
+
+#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
+    inline std::size_t hash_value(std::type_index v)
+    {
+        return v.hash_code();
+    }
+#endif
+
+    //
+    // boost::hash
+    //
+    
+    // Define the specializations required by the standard. The general purpose
+    // boost::hash is defined later in extensions.hpp if
+    // BOOST_HASH_NO_EXTENSIONS is not defined.
+    
+    // BOOST_HASH_SPECIALIZE - define a specialization for a type which is
+    // passed by copy.
+    //
+    // BOOST_HASH_SPECIALIZE_REF - define a specialization for a type which is
+    // passed by copy.
+    //
+    // These are undefined later.
+
+#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+#define BOOST_HASH_SPECIALIZE(type) \
+    template <> struct hash<type> \
+         : public std::unary_function<type, std::size_t> \
+    { \
+        std::size_t operator()(type v) const \
+        { \
+            return boost::hash_value(v); \
+        } \
+    };
+
+#define BOOST_HASH_SPECIALIZE_REF(type) \
+    template <> struct hash<type> \
+         : public std::unary_function<type, std::size_t> \
+    { \
+        std::size_t operator()(type const& v) const \
+        { \
+            return boost::hash_value(v); \
+        } \
+    };
+#else
+#define BOOST_HASH_SPECIALIZE(type) \
+    template <> struct hash<type> \
+         : public std::unary_function<type, std::size_t> \
+    { \
+        std::size_t operator()(type v) const \
+        { \
+            return boost::hash_value(v); \
+        } \
+    }; \
+    \
+    template <> struct hash<const type> \
+         : public std::unary_function<const type, std::size_t> \
+    { \
+        std::size_t operator()(const type v) const \
+        { \
+            return boost::hash_value(v); \
+        } \
+    };
+
+#define BOOST_HASH_SPECIALIZE_REF(type) \
+    template <> struct hash<type> \
+         : public std::unary_function<type, std::size_t> \
+    { \
+        std::size_t operator()(type const& v) const \
+        { \
+            return boost::hash_value(v); \
+        } \
+    }; \
+    \
+    template <> struct hash<const type> \
+         : public std::unary_function<const type, std::size_t> \
+    { \
+        std::size_t operator()(type const& v) const \
+        { \
+            return boost::hash_value(v); \
+        } \
+    };
+#endif
+
+    BOOST_HASH_SPECIALIZE(bool)
+    BOOST_HASH_SPECIALIZE(char)
+    BOOST_HASH_SPECIALIZE(signed char)
+    BOOST_HASH_SPECIALIZE(unsigned char)
+#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
+    BOOST_HASH_SPECIALIZE(wchar_t)
+#endif
+    BOOST_HASH_SPECIALIZE(short)
+    BOOST_HASH_SPECIALIZE(unsigned short)
+    BOOST_HASH_SPECIALIZE(int)
+    BOOST_HASH_SPECIALIZE(unsigned int)
+    BOOST_HASH_SPECIALIZE(long)
+    BOOST_HASH_SPECIALIZE(unsigned long)
+
+    BOOST_HASH_SPECIALIZE(float)
+    BOOST_HASH_SPECIALIZE(double)
+    BOOST_HASH_SPECIALIZE(long double)
+
+    BOOST_HASH_SPECIALIZE_REF(std::string)
+#if !defined(BOOST_NO_STD_WSTRING)
+    BOOST_HASH_SPECIALIZE_REF(std::wstring)
+#endif
+
+#if !defined(BOOST_NO_LONG_LONG)
+    BOOST_HASH_SPECIALIZE(boost::long_long_type)
+    BOOST_HASH_SPECIALIZE(boost::ulong_long_type)
+#endif
+
+#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
+    BOOST_HASH_SPECIALIZE(std::type_index)
+#endif
+
+#undef BOOST_HASH_SPECIALIZE
+#undef BOOST_HASH_SPECIALIZE_REF
+
+// Specializing boost::hash for pointers.
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+    template <class T>
+    struct hash<T*>
+        : public std::unary_function<T*, std::size_t>
+    {
+        std::size_t operator()(T* v) const
+        {
+#if !BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
+            return boost::hash_value(v);
+#else
+            std::size_t x = static_cast<std::size_t>(
+                reinterpret_cast<std::ptrdiff_t>(v));
+
+            return x + (x >> 3);
+#endif
+        }
+    };
+
+#else
+
+    // For compilers without partial specialization, we define a
+    // boost::hash for all remaining types. But hash_impl is only defined
+    // for pointers in 'extensions.hpp' - so when BOOST_HASH_NO_EXTENSIONS
+    // is defined there will still be a compile error for types not supported
+    // in the standard.
+
+    namespace hash_detail
+    {
+        template <bool IsPointer>
+        struct hash_impl;
+
+        template <>
+        struct hash_impl<true>
+        {
+            template <class T>
+            struct inner
+                : public std::unary_function<T, std::size_t>
+            {
+                std::size_t operator()(T val) const
+                {
+#if !BOOST_WORKAROUND(__SUNPRO_CC, <= 590)
+                    return boost::hash_value(val);
+#else
+                    std::size_t x = static_cast<std::size_t>(
+                        reinterpret_cast<std::ptrdiff_t>(val));
+
+                    return x + (x >> 3);
+#endif
+                }
+            };
+        };
+    }
+
+    template <class T> struct hash
+        : public boost::hash_detail::hash_impl<boost::is_pointer<T>::value>
+            ::BOOST_NESTED_TEMPLATE inner<T>
+    {
+    };
+
+#endif
+}
+
+#undef BOOST_HASH_CHAR_TRAITS
+
+#endif // BOOST_FUNCTIONAL_HASH_HASH_HPP
+
+// Include this outside of the include guards in case the file is included
+// twice - once with BOOST_HASH_NO_EXTENSIONS defined, and then with it
+// undefined.
+
+#if !defined(BOOST_HASH_NO_EXTENSIONS) \
+    && !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP)
+#include <boost/functional/hash/extensions.hpp>
+#endif
diff --git a/ext/boost/functional/hash/hash_fwd.hpp b/ext/boost/functional/hash/hash_fwd.hpp
new file mode 100644
index 0000000..1d51b07
--- /dev/null
+++ b/ext/boost/functional/hash/hash_fwd.hpp
@@ -0,0 +1,40 @@
+
+// Copyright 2005-2009 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  Based on Peter Dimov's proposal
+//  http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf
+//  issue 6.18. 
+
+#if !defined(BOOST_FUNCTIONAL_HASH_FWD_HPP)
+#define BOOST_FUNCTIONAL_HASH_FWD_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <boost/config.hpp>
+#include <cstddef>
+#include <boost/detail/workaround.hpp>
+
+namespace boost
+{
+    template <class T> struct hash;
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+    template <class T> void hash_combine(std::size_t& seed, T& v);
+#else
+    template <class T> void hash_combine(std::size_t& seed, T const& v);
+#endif
+
+    template <class It> std::size_t hash_range(It, It);
+    template <class It> void hash_range(std::size_t&, It, It);
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
+    template <class T> inline std::size_t hash_range(T*, T*);
+    template <class T> inline void hash_range(std::size_t&, T*, T*);
+#endif
+}
+
+#endif
diff --git a/ext/boost/functional/hash_fwd.hpp b/ext/boost/functional/hash_fwd.hpp
new file mode 100644
index 0000000..b640988
--- /dev/null
+++ b/ext/boost/functional/hash_fwd.hpp
@@ -0,0 +1,7 @@
+
+// Copyright 2005-2009 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/functional/hash/hash_fwd.hpp>
+
diff --git a/ext/boost/implicit_cast.hpp b/ext/boost/implicit_cast.hpp
deleted file mode 100644
index 5b1cd92..0000000
--- a/ext/boost/implicit_cast.hpp
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright David Abrahams 2003.
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-#ifndef IMPLICIT_CAST_DWA200356_HPP
-# define IMPLICIT_CAST_DWA200356_HPP
-
-# include <boost/mpl/identity.hpp>
-
-namespace boost {
-
-// implementation originally suggested by C. Green in
-// http://lists.boost.org/MailArchives/boost/msg00886.php
-
-// The use of identity creates a non-deduced form, so that the
-// explicit template argument must be supplied
-template <typename T>
-inline T implicit_cast (typename mpl::identity<T>::type x) {
-    return x;
-}
-
-// incomplete return type now is here
-//template <typename T>
-//void implicit_cast (...);
-
-} // namespace boost
-
-
-#endif // IMPLICIT_CAST_DWA200356_HPP
diff --git a/ext/boost/indirect_reference.hpp b/ext/boost/indirect_reference.hpp
new file mode 100644
index 0000000..5fbb342
--- /dev/null
+++ b/ext/boost/indirect_reference.hpp
@@ -0,0 +1,43 @@
+#ifndef INDIRECT_REFERENCE_DWA200415_HPP
+# define INDIRECT_REFERENCE_DWA200415_HPP
+
+//
+// Copyright David Abrahams 2004. Use, modification and distribution is
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// typename indirect_reference<P>::type provides the type of *p.
+//
+// http://www.boost.org/libs/iterator/doc/pointee.html
+//
+
+# include <boost/detail/is_incrementable.hpp>
+# include <boost/iterator/iterator_traits.hpp>
+# include <boost/type_traits/remove_cv.hpp>
+# include <boost/mpl/eval_if.hpp>
+# include <boost/pointee.hpp>
+
+namespace boost { 
+
+namespace detail
+{
+  template <class P>
+  struct smart_ptr_reference
+  {
+      typedef typename boost::pointee<P>::type& type;
+  };
+}
+
+template <class P>
+struct indirect_reference
+  : mpl::eval_if<
+        detail::is_incrementable<P>
+      , iterator_reference<P>
+      , detail::smart_ptr_reference<P>
+    >
+{
+};
+  
+} // namespace boost
+
+#endif // INDIRECT_REFERENCE_DWA200415_HPP
diff --git a/ext/boost/integer.hpp b/ext/boost/integer.hpp
index fc0b398..35a1e10 100644
--- a/ext/boost/integer.hpp
+++ b/ext/boost/integer.hpp
@@ -20,6 +20,7 @@
 #include <boost/integer_traits.hpp>  // for boost::::boost::integer_traits
 #include <boost/limits.hpp>          // for ::std::numeric_limits
 #include <boost/cstdint.hpp>         // for boost::int64_t and BOOST_NO_INTEGRAL_INT64_T
+#include <boost/static_assert.hpp>
 
 //
 // We simply cannot include this header on gcc without getting copious warnings of the kind:
@@ -51,6 +52,7 @@ namespace boost
 
   //  convert category to type 
   template< int Category > struct int_least_helper {}; // default is empty
+  template< int Category > struct uint_least_helper {}; // default is empty
 
   //  specializatons: 1=long, 2=int, 3=short, 4=signed char,
   //     6=unsigned long, 7=unsigned int, 8=unsigned short, 9=unsigned char
@@ -65,14 +67,14 @@ namespace boost
   template<> struct int_least_helper<4> { typedef short least; };
   template<> struct int_least_helper<5> { typedef signed char least; };
 #ifdef BOOST_HAS_LONG_LONG
-  template<> struct int_least_helper<6> { typedef boost::ulong_long_type least; };
+  template<> struct uint_least_helper<1> { typedef boost::ulong_long_type least; };
 #elif defined(BOOST_HAS_MS_INT64)
-  template<> struct int_least_helper<6> { typedef unsigned __int64 least; };
+  template<> struct uint_least_helper<1> { typedef unsigned __int64 least; };
 #endif
-  template<> struct int_least_helper<7> { typedef unsigned long least; };
-  template<> struct int_least_helper<8> { typedef unsigned int least; };
-  template<> struct int_least_helper<9> { typedef unsigned short least; };
-  template<> struct int_least_helper<10> { typedef unsigned char least; };
+  template<> struct uint_least_helper<2> { typedef unsigned long least; };
+  template<> struct uint_least_helper<3> { typedef unsigned int least; };
+  template<> struct uint_least_helper<4> { typedef unsigned short least; };
+  template<> struct uint_least_helper<5> { typedef unsigned char least; };
 
   template <int Bits>
   struct exact_signed_base_helper{};
@@ -111,10 +113,12 @@ namespace boost
   template< int Bits >   // bits (including sign) required
   struct int_t : public detail::exact_signed_base_helper<Bits>
   {
+      BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::intmax_t) * CHAR_BIT),
+         "No suitable signed integer type with the requested number of bits is available.");
       typedef typename detail::int_least_helper
         <
 #ifdef BOOST_HAS_LONG_LONG
-          (Bits-1 <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
+          (Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
 #else
            1 +
 #endif
@@ -130,6 +134,8 @@ namespace boost
   template< int Bits >   // bits required
   struct uint_t : public detail::exact_unsigned_base_helper<Bits>
   {
+     BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::uintmax_t) * CHAR_BIT),
+         "No suitable unsigned integer type with the requested number of bits is available.");
 #if (defined(__BORLANDC__) || defined(__CODEGEAR__)) && defined(BOOST_NO_INTEGRAL_INT64_T)
      // It's really not clear why this workaround should be needed... shrug I guess!  JM
      BOOST_STATIC_CONSTANT(int, s = 
@@ -140,11 +146,10 @@ namespace boost
           (Bits <= ::std::numeric_limits<unsigned char>::digits));
      typedef typename detail::int_least_helper< ::boost::uint_t<Bits>::s>::least least;
 #else
-      typedef typename detail::int_least_helper
+      typedef typename detail::uint_least_helper
         < 
-          5 +
 #ifdef BOOST_HAS_LONG_LONG
-          (Bits-1 <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
+          (Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
 #else
            1 +
 #endif
@@ -217,7 +222,7 @@ namespace boost
      // It's really not clear why this workaround should be needed... shrug I guess!  JM
 #if defined(BOOST_NO_INTEGRAL_INT64_T)
       BOOST_STATIC_CONSTANT(unsigned, which = 
-           6 +
+           1 +
           (MaxValue <= ::boost::integer_traits<unsigned long>::const_max) +
           (MaxValue <= ::boost::integer_traits<unsigned int>::const_max) +
           (MaxValue <= ::boost::integer_traits<unsigned short>::const_max) +
@@ -225,18 +230,17 @@ namespace boost
       typedef typename detail::int_least_helper< ::boost::uint_value_t<MaxValue>::which>::least least;
 #else // BOOST_NO_INTEGRAL_INT64_T
       BOOST_STATIC_CONSTANT(unsigned, which = 
-           5 +
+           1 +
           (MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) +
           (MaxValue <= ::boost::integer_traits<unsigned long>::const_max) +
           (MaxValue <= ::boost::integer_traits<unsigned int>::const_max) +
           (MaxValue <= ::boost::integer_traits<unsigned short>::const_max) +
           (MaxValue <= ::boost::integer_traits<unsigned char>::const_max));
-      typedef typename detail::int_least_helper< ::boost::uint_value_t<MaxValue>::which>::least least;
+      typedef typename detail::uint_least_helper< ::boost::uint_value_t<MaxValue>::which>::least least;
 #endif // BOOST_NO_INTEGRAL_INT64_T
 #else
-      typedef typename detail::int_least_helper
+      typedef typename detail::uint_least_helper
         < 
-          5 +
 #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
           (MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) +
 #else
diff --git a/ext/boost/integer/static_log2.hpp b/ext/boost/integer/static_log2.hpp
new file mode 100644
index 0000000..56c7a00
--- /dev/null
+++ b/ext/boost/integer/static_log2.hpp
@@ -0,0 +1,127 @@
+// -------------- Boost static_log2.hpp header file  ----------------------- //
+//
+//                 Copyright (C) 2001 Daryle Walker.
+//                 Copyright (C) 2003 Vesa Karvonen.
+//                 Copyright (C) 2003 Gennaro Prota.
+//
+//     Distributed under the Boost Software License, Version 1.0.
+//        (See accompanying file LICENSE_1_0.txt or copy at
+//              http://www.boost.org/LICENSE_1_0.txt)
+//
+//         ---------------------------------------------------
+//       See http://www.boost.org/libs/integer for documentation.
+// ------------------------------------------------------------------------- //
+
+
+#ifndef BOOST_INTEGER_STATIC_LOG2_HPP
+#define BOOST_INTEGER_STATIC_LOG2_HPP
+
+#include "boost/integer_fwd.hpp" // for boost::intmax_t
+
+namespace boost {
+
+ namespace detail {
+
+     namespace static_log2_impl {
+
+     // choose_initial_n<>
+     //
+     // Recursively doubles its integer argument, until it
+     // becomes >= of the "width" (C99, 6.2.6.2p4) of
+     // static_log2_argument_type.
+     //
+     // Used to get the maximum power of two less then the width.
+     //
+     // Example: if on your platform argument_type has 48 value
+     //          bits it yields n=32.
+     //
+     // It's easy to prove that, starting from such a value
+     // of n, the core algorithm works correctly for any width
+     // of static_log2_argument_type and that recursion always
+     // terminates with x = 1 and n = 0 (see the algorithm's
+     // invariant).
+
+     typedef boost::static_log2_argument_type argument_type;
+     typedef boost::static_log2_result_type result_type;
+
+     template <result_type n>
+     struct choose_initial_n {
+
+         BOOST_STATIC_CONSTANT(bool, c = (argument_type(1) << n << n) != 0);
+         BOOST_STATIC_CONSTANT(
+             result_type,
+             value = !c*n + choose_initial_n<2*c*n>::value
+         );
+
+     };
+
+     template <>
+     struct choose_initial_n<0> {
+         BOOST_STATIC_CONSTANT(result_type, value = 0);
+     };
+
+
+
+     // start computing from n_zero - must be a power of two
+     const result_type n_zero = 16;
+     const result_type initial_n = choose_initial_n<n_zero>::value;
+
+     // static_log2_impl<>
+     //
+     // * Invariant:
+     //                 2n
+     //  1 <= x && x < 2    at the start of each recursion
+     //                     (see also choose_initial_n<>)
+     //
+     // * Type requirements:
+     //
+     //   argument_type maybe any unsigned type with at least n_zero + 1
+     //   value bits. (Note: If larger types will be standardized -e.g.
+     //   unsigned long long- then the argument_type typedef can be
+     //   changed without affecting the rest of the code.)
+     //
+
+     template <argument_type x, result_type n = initial_n>
+     struct static_log2_impl {
+
+         BOOST_STATIC_CONSTANT(bool, c = (x >> n) > 0); // x >= 2**n ?
+         BOOST_STATIC_CONSTANT(
+             result_type,
+             value = c*n + (static_log2_impl< (x>>c*n), n/2 >::value)
+         );
+
+     };
+
+     template <>
+     struct static_log2_impl<1, 0> {
+        BOOST_STATIC_CONSTANT(result_type, value = 0);
+     };
+
+     }
+ } // detail
+
+
+
+ // --------------------------------------
+ // static_log2<x>
+ // ----------------------------------------
+
+ template <static_log2_argument_type x>
+ struct static_log2 {
+
+     BOOST_STATIC_CONSTANT(
+         static_log2_result_type,
+         value = detail::static_log2_impl::static_log2_impl<x>::value
+     );
+
+ };
+
+
+ template <>
+ struct static_log2<0> { };
+
+}
+
+
+
+#endif // include guard
diff --git a/ext/boost/integer_fwd.hpp b/ext/boost/integer_fwd.hpp
index e6045ca..20eff2b 100644
--- a/ext/boost/integer_fwd.hpp
+++ b/ext/boost/integer_fwd.hpp
@@ -136,22 +136,6 @@ template < std::size_t Bits >
 template <  >
     struct low_bits_mask_t< ::std::numeric_limits<unsigned char>::digits >;
 
-#if USHRT_MAX > UCHAR_MAX
-template <  >
-    struct low_bits_mask_t< ::std::numeric_limits<unsigned short>::digits >;
-#endif
-
-#if UINT_MAX > USHRT_MAX
-template <  >
-    struct low_bits_mask_t< ::std::numeric_limits<unsigned int>::digits >;
-#endif
-
-#if ULONG_MAX > UINT_MAX
-template <  >
-    struct low_bits_mask_t< ::std::numeric_limits<unsigned long>::digits >;
-#endif
-
-
 //  From <boost/integer/static_log2.hpp>  ------------------------------------//
 
 template <static_log2_argument_type Value >
diff --git a/ext/boost/integer_traits.hpp b/ext/boost/integer_traits.hpp
index 129ce82..98fdd93 100644
--- a/ext/boost/integer_traits.hpp
+++ b/ext/boost/integer_traits.hpp
@@ -5,7 +5,7 @@
  * accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * $Id: integer_traits.hpp 58381 2009-12-14 18:14:48Z johnmaddock $
+ * $Id: integer_traits.hpp 80740 2012-09-28 18:34:12Z jewillco $
  *
  * Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers
  */
@@ -227,7 +227,7 @@ class integer_traits< ::boost::ulong_long_type>
 template<>
 class integer_traits< ::boost::long_long_type>
   : public std::numeric_limits< ::boost::long_long_type>,
-    public detail::integer_traits_base< ::boost::long_long_type, (1LL << (sizeof(::boost::long_long_type) - 1)), ~(1LL << (sizeof(::boost::long_long_type) - 1))>
+    public detail::integer_traits_base< ::boost::long_long_type, (1LL << (sizeof(::boost::long_long_type) * CHAR_BIT - 1)), ~(1LL << (sizeof(::boost::long_long_type) * CHAR_BIT - 1))>
 { };
 
 template<>
diff --git a/ext/boost/io/._ios_state.hpp b/ext/boost/io/._ios_state.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/io/._ios_state.hpp and /dev/null differ
diff --git a/ext/boost/iterator.hpp b/ext/boost/iterator.hpp
index a43cfe1..6adab0e 100644
--- a/ext/boost/iterator.hpp
+++ b/ext/boost/iterator.hpp
@@ -1,4 +1,4 @@
-//  interator.hpp workarounds for non-conforming standard libraries  ---------//
+//  iterator.hpp workarounds for non-conforming standard libraries  ---------//
 
 //  (C) Copyright Beman Dawes 2000. Distributed under the Boost
 //  Software License, Version 1.0. (See accompanying file
diff --git a/ext/boost/iterator/._interoperable.hpp b/ext/boost/iterator/._interoperable.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/iterator/._interoperable.hpp and /dev/null differ
diff --git a/ext/boost/iterator/._iterator_categories.hpp b/ext/boost/iterator/._iterator_categories.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/iterator/._iterator_categories.hpp and /dev/null differ
diff --git a/ext/boost/iterator/._iterator_concepts.hpp b/ext/boost/iterator/._iterator_concepts.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/iterator/._iterator_concepts.hpp and /dev/null differ
diff --git a/ext/boost/iterator/._iterator_traits.hpp b/ext/boost/iterator/._iterator_traits.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/iterator/._iterator_traits.hpp and /dev/null differ
diff --git a/ext/boost/iterator/._reverse_iterator.hpp b/ext/boost/iterator/._reverse_iterator.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/iterator/._reverse_iterator.hpp and /dev/null differ
diff --git a/ext/boost/iterator/detail/._config_def.hpp b/ext/boost/iterator/detail/._config_def.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/iterator/detail/._config_def.hpp and /dev/null differ
diff --git a/ext/boost/iterator/detail/._config_undef.hpp b/ext/boost/iterator/detail/._config_undef.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/iterator/detail/._config_undef.hpp and /dev/null differ
diff --git a/ext/boost/iterator/detail/._enable_if.hpp b/ext/boost/iterator/detail/._enable_if.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/iterator/detail/._enable_if.hpp and /dev/null differ
diff --git a/ext/boost/iterator/detail/._facade_iterator_category.hpp b/ext/boost/iterator/detail/._facade_iterator_category.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/iterator/detail/._facade_iterator_category.hpp and /dev/null differ
diff --git a/ext/boost/iterator/detail/._minimum_category.hpp b/ext/boost/iterator/detail/._minimum_category.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/iterator/detail/._minimum_category.hpp and /dev/null differ
diff --git a/ext/boost/iterator/iterator_adaptor.hpp b/ext/boost/iterator/iterator_adaptor.hpp
index 27b08ff..9f2fbb0 100644
--- a/ext/boost/iterator/iterator_adaptor.hpp
+++ b/ext/boost/iterator/iterator_adaptor.hpp
@@ -24,15 +24,9 @@
 
 #ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
 # include <boost/type_traits/remove_reference.hpp>
-
-# if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610))
-#   include <boost/type_traits/add_reference.hpp>
-# endif
-
-#else
-# include <boost/type_traits/add_reference.hpp>
 #endif
 
+#include <boost/type_traits/add_reference.hpp>
 #include <boost/iterator/detail/config_def.hpp>
 
 #include <boost/iterator/iterator_traits.hpp>
diff --git a/ext/boost/iterator/iterator_facade.hpp b/ext/boost/iterator/iterator_facade.hpp
index 967d60f..d84b402 100644
--- a/ext/boost/iterator/iterator_facade.hpp
+++ b/ext/boost/iterator/iterator_facade.hpp
@@ -14,8 +14,8 @@
 #include <boost/iterator/detail/facade_iterator_category.hpp>
 #include <boost/iterator/detail/enable_if.hpp>
 
-#include <boost/implicit_cast.hpp>
 #include <boost/static_assert.hpp>
+#include <boost/utility/addressof.hpp>
 
 #include <boost/type_traits/is_same.hpp>
 #include <boost/type_traits/add_const.hpp>
@@ -105,6 +105,7 @@ namespace boost
         
         typedef typename remove_const<ValueParam>::type value_type;
         
+        // Not the real associated pointer type
         typedef typename mpl::eval_if<
             boost::detail::iterator_writability_disabled<ValueParam,Reference>
           , add_pointer<const value_type>
@@ -146,7 +147,7 @@ namespace boost
 
         // Returning a mutable reference allows nonsense like
         // (*r++).mutate(), but it imposes fewer assumptions about the
-        // behavior of the value_type.  In particular, recall taht
+        // behavior of the value_type.  In particular, recall that
         // (*r).mutate() is legal if operator* returns by value.
         value_type&
         operator*() const
@@ -293,46 +294,43 @@ namespace boost
 
     // operator->() needs special support for input iterators to strictly meet the
     // standard's requirements. If *i is not a reference type, we must still
-    // produce a lvalue to which a pointer can be formed. We do that by
-    // returning an instantiation of this special proxy class template.
-    template <class T>
-    struct operator_arrow_proxy
+    // produce an lvalue to which a pointer can be formed.  We do that by
+    // returning a proxy object containing an instance of the reference object.
+    template <class Reference, class Pointer>
+    struct operator_arrow_dispatch // proxy references
     {
-        operator_arrow_proxy(T const* px) : m_value(*px) {}
-        T* operator->() const { return &m_value; }
-        // This function is needed for MWCW and BCC, which won't call operator->
-        // again automatically per 13.3.1.2 para 8
-        operator T*() const { return &m_value; }
-        mutable T m_value;
+        struct proxy
+        {
+            explicit proxy(Reference const & x) : m_ref(x) {}
+            Reference* operator->() { return boost::addressof(m_ref); }
+            // This function is needed for MWCW and BCC, which won't call
+            // operator-> again automatically per 13.3.1.2 para 8
+            operator Reference*() { return boost::addressof(m_ref); }
+            Reference m_ref;
+        };
+        typedef proxy result_type;
+        static result_type apply(Reference const & x)
+        {
+            return result_type(x);
+        }
     };
 
-    // A metafunction that gets the result type for operator->.  Also
-    // has a static function make() which builds the result from a
-    // Reference
-    template <class ValueType, class Reference, class Pointer>
-    struct operator_arrow_result
+    template <class T, class Pointer>
+    struct operator_arrow_dispatch<T&, Pointer> // "real" references
     {
-        // CWPro8.3 won't accept "operator_arrow_result::type", and we
-        // need that type below, so metafunction forwarding would be a
-        // losing proposition here.
-        typedef typename mpl::if_<
-            is_reference<Reference>
-          , Pointer
-          , operator_arrow_proxy<ValueType>
-        >::type type;
-
-        static type make(Reference x)
+        typedef Pointer result_type;
+        static result_type apply(T& x)
         {
-            return implicit_cast<type>(&x);
+            return boost::addressof(x);
         }
     };
 
 # if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
     // Deal with ETI
     template<>
-    struct operator_arrow_result<int, int, int>
+    struct operator_arrow_dispatch<int, int>
     {
-        typedef int type;
+        typedef int result_type;
     };
 # endif
 
@@ -617,6 +615,11 @@ namespace boost
          Value, CategoryOrTraversal, Reference, Difference
       > associated_types;
 
+      typedef boost::detail::operator_arrow_dispatch<
+          Reference
+        , typename associated_types::pointer
+      > operator_arrow_dispatch_;
+
    protected:
       // For use by derived classes
       typedef iterator_facade<Derived,Value,CategoryOrTraversal,Reference,Difference> iterator_facade_;
@@ -626,7 +629,9 @@ namespace boost
       typedef typename associated_types::value_type value_type;
       typedef Reference reference;
       typedef Difference difference_type;
-      typedef typename associated_types::pointer pointer;
+
+      typedef typename operator_arrow_dispatch_::result_type pointer;
+
       typedef typename associated_types::iterator_category iterator_category;
 
       reference operator*() const
@@ -634,18 +639,9 @@ namespace boost
           return iterator_core_access::dereference(this->derived());
       }
 
-      typename boost::detail::operator_arrow_result<
-          value_type
-        , reference
-        , pointer
-      >::type
-      operator->() const
+      pointer operator->() const
       {
-          return boost::detail::operator_arrow_result<
-              value_type
-            , reference
-            , pointer
-          >::make(*this->derived());
+          return operator_arrow_dispatch_::apply(*this->derived());
       }
         
       typename boost::detail::operator_brackets_result<Derived,Value,reference>::type
diff --git a/ext/boost/iterator/reverse_iterator.hpp b/ext/boost/iterator/reverse_iterator.hpp
index 97b6b48..79cc7f2 100644
--- a/ext/boost/iterator/reverse_iterator.hpp
+++ b/ext/boost/iterator/reverse_iterator.hpp
@@ -7,8 +7,8 @@
 #ifndef BOOST_REVERSE_ITERATOR_23022003THW_HPP
 #define BOOST_REVERSE_ITERATOR_23022003THW_HPP
 
+#include <boost/next_prior.hpp>
 #include <boost/iterator.hpp>
-#include <boost/utility.hpp>
 #include <boost/iterator/iterator_adaptor.hpp>
 
 namespace boost
diff --git a/ext/boost/iterator/transform_iterator.hpp b/ext/boost/iterator/transform_iterator.hpp
index c365fe0..b79a440 100644
--- a/ext/boost/iterator/transform_iterator.hpp
+++ b/ext/boost/iterator/transform_iterator.hpp
@@ -20,6 +20,8 @@
 #include <boost/type_traits/is_reference.hpp>
 #include <boost/type_traits/remove_const.hpp>
 #include <boost/type_traits/remove_reference.hpp>
+#include <boost/utility/result_of.hpp>
+
 
 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
 # include <boost/type_traits/is_base_and_derived.hpp>
@@ -35,33 +37,16 @@ namespace boost
 
   namespace detail 
   {
-
-    template <class UnaryFunc>
-    struct function_object_result
-    {
-      typedef typename UnaryFunc::result_type type;
-    };
-
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-    template <class Return, class Argument>
-    struct function_object_result<Return(*)(Argument)>
-    {
-      typedef Return type;
-    };
-#endif
-
     // Compute the iterator_adaptor instantiation to be used for transform_iterator
     template <class UnaryFunc, class Iterator, class Reference, class Value>
     struct transform_iterator_base
     {
      private:
         // By default, dereferencing the iterator yields the same as
-        // the function.  Do we need to adjust the way
-        // function_object_result is computed for the standard
-        // proposal (e.g. using Doug's result_of)?
+        // the function.
         typedef typename ia_dflt_help<
             Reference
-          , function_object_result<UnaryFunc>
+          , result_of<const UnaryFunc(typename std::iterator_traits<Iterator>::reference)>
         >::type reference;
 
         // To get the default for Value: remove any reference on the
@@ -113,7 +98,7 @@ namespace boost
 #endif 
     }
 
-    template<
+    template <
         class OtherUnaryFunction
       , class OtherIterator
       , class OtherReference
diff --git a/ext/boost/lambda/core.hpp b/ext/boost/lambda/core.hpp
new file mode 100644
index 0000000..e42766f
--- /dev/null
+++ b/ext/boost/lambda/core.hpp
@@ -0,0 +1,79 @@
+// -- core.hpp -- Boost Lambda Library -------------------------------------
+//
+// Copyright (C) 2000 Gary Powell (powellg at amazon.com)
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+// 
+// Includes the core of LL, without any real features for client:
+// 
+// tuples, lambda functors, return type deduction templates,
+// argument substitution mechanism (select functions)
+// 
+// Some functionality comes as well:
+// Assignment and subscript operators, as well as function
+// call operator for placeholder variables.
+// -------------------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_CORE_HPP
+#define BOOST_LAMBDA_CORE_HPP
+
+#include "boost/type_traits/transform_traits.hpp"
+#include "boost/type_traits/cv_traits.hpp"
+
+#include "boost/tuple/tuple.hpp"
+
+// inject some of the tuple names into lambda 
+namespace boost {
+namespace lambda {
+
+using ::boost::tuples::tuple;
+using ::boost::tuples::null_type;
+
+} // lambda
+} // boost
+
+#include "boost/lambda/detail/lambda_config.hpp"
+#include "boost/lambda/detail/lambda_fwd.hpp"
+
+#include "boost/lambda/detail/arity_code.hpp"
+#include "boost/lambda/detail/actions.hpp"
+
+#include "boost/lambda/detail/lambda_traits.hpp"
+
+#include "boost/lambda/detail/function_adaptors.hpp"
+#include "boost/lambda/detail/return_type_traits.hpp"
+
+#include "boost/lambda/detail/select_functions.hpp"
+
+#include "boost/lambda/detail/lambda_functor_base.hpp"
+
+#include "boost/lambda/detail/lambda_functors.hpp"
+
+#include "boost/lambda/detail/ret.hpp"
+
+namespace boost {
+namespace lambda {
+
+namespace {
+
+  // These are constants types and need to be initialised
+  boost::lambda::placeholder1_type free1 = boost::lambda::placeholder1_type();
+  boost::lambda::placeholder2_type free2 = boost::lambda::placeholder2_type();
+  boost::lambda::placeholder3_type free3 = boost::lambda::placeholder3_type();
+
+  boost::lambda::placeholder1_type& _1 = free1;
+  boost::lambda::placeholder2_type& _2 = free2;
+  boost::lambda::placeholder3_type& _3 = free3;
+  // _1, _2, ... naming scheme by Peter Dimov
+} // unnamed
+   
+} // lambda
+} // boost
+   
+   
+#endif //BOOST_LAMBDA_CORE_HPP
diff --git a/ext/boost/lambda/detail/actions.hpp b/ext/boost/lambda/detail/actions.hpp
new file mode 100644
index 0000000..668799f
--- /dev/null
+++ b/ext/boost/lambda/detail/actions.hpp
@@ -0,0 +1,174 @@
+// -- Boost Lambda Library - actions.hpp ----------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see www.boost.org
+
+// ----------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_ACTIONS_HPP
+#define BOOST_LAMBDA_ACTIONS_HPP
+
+namespace boost { 
+namespace lambda {
+
+
+
+template<int Arity, class Act> class action;
+
+// these need to be defined here, since the corresponding lambda 
+// functions are members of lambda_functor classes
+
+class assignment_action {};
+class subscript_action {};
+
+template <class Action> class other_action;
+
+// action for specifying the explicit return type
+template <class RET> class explicit_return_type_action {};
+
+// action for preventing the expansion of a lambda expression
+struct protect_action {};
+
+  // must be defined here, comma is a special case
+struct comma_action {};
+
+
+  // actions, for which the existence of protect is checked in return type 
+  // deduction.
+
+template <class Action> struct is_protectable {
+  BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+// NOTE: comma action is protectable. Other protectable actions
+// are listed in operator_actions.hpp
+
+template<> struct is_protectable<other_action<comma_action> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+
+namespace detail {
+
+  // this type is used in return type deductions to signal that deduction 
+  // did not find a result. It does not necessarily mean an error, it commonly
+  // means that something else should be tried.
+  class unspecified {};
+}
+
+  // function action is a special case: bind functions can be called with 
+  // the return type specialized explicitly e.g. bind<int>(foo);
+  // If this call syntax is used, the return type is stored in the latter
+  // argument of function_action template. Otherwise the argument gets the type
+  // 'unspecified'.
+  // This argument is only relevant in the return type deduction code
+template <int I, class Result_type = detail::unspecified> 
+class function_action {};
+   
+template<class T> class function_action<1, T> {
+public:
+  template<class RET, class A1>
+  static RET apply(A1& a1) {
+    return function_adaptor<typename boost::remove_cv<A1>::type>::
+      template apply<RET>(a1);
+  }
+};
+
+template<class T> class function_action<2, T> {
+public:
+  template<class RET, class A1, class A2>
+  static RET apply(A1& a1, A2& a2) {
+    return function_adaptor<typename boost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2);
+  }
+};
+
+template<class T> class function_action<3, T> {
+public:
+  template<class RET, class A1, class A2, class A3>
+  static RET apply(A1& a1, A2& a2, A3& a3) {
+    return function_adaptor<typename boost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2, a3);
+  }
+};
+
+template<class T> class function_action<4, T> {
+public:
+  template<class RET, class A1, class A2, class A3, class A4>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4) {
+    return function_adaptor<typename boost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2, a3, a4);
+  }
+};
+
+template<class T> class function_action<5, T> {
+public:
+  template<class RET, class A1, class A2, class A3, class A4, class A5>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
+    return function_adaptor<typename boost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2, a3, a4, a5);
+  }
+};
+
+template<class T> class function_action<6, T> {
+public:
+  template<class RET, class A1, class A2, class A3, class A4, class A5, 
+           class A6>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
+    return function_adaptor<typename boost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2, a3, a4, a5, a6);
+  }
+};
+
+template<class T> class function_action<7, T> {
+public:
+  template<class RET, class A1, class A2, class A3, class A4, class A5,  
+           class A6, class A7>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
+    return function_adaptor<typename boost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2, a3, a4, a5, a6, a7);
+  }
+};
+
+template<class T> class function_action<8, T> {
+public:
+  template<class RET, class A1, class A2, class A3, class A4, class A5, 
+           class A6, class A7, class A8>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, 
+                   A8& a8) {
+    return function_adaptor<typename boost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2, a3, a4, a5, a6, a7, a8);
+  }
+};
+
+template<class T> class function_action<9, T> {
+public:
+  template<class RET, class A1, class A2, class A3, class A4, class A5, 
+           class A6, class A7, class A8, class A9>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, 
+                   A8& a8, A9& a9) {
+    return function_adaptor<typename boost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2, a3, a4, a5, a6, a7, a8, a9);
+  }
+};
+
+template<class T> class function_action<10, T> {
+public:
+  template<class RET, class A1, class A2, class A3, class A4, class A5, 
+           class A6, class A7, class A8, class A9, class A10>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, 
+                   A8& a8, A9& a9, A10& a10) {
+    return function_adaptor<typename boost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+  }
+};
+
+} // namespace lambda
+} // namespace boost
+
+#endif
diff --git a/ext/boost/lambda/detail/arity_code.hpp b/ext/boost/lambda/detail/arity_code.hpp
new file mode 100644
index 0000000..bed34b9
--- /dev/null
+++ b/ext/boost/lambda/detail/arity_code.hpp
@@ -0,0 +1,110 @@
+// -- Boost Lambda Library -------------------------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+// --------------------------------------------------
+
+#ifndef BOOST_LAMBDA_ARITY_CODE_HPP
+#define BOOST_LAMBDA_ARITY_CODE_HPP
+
+#include "boost/type_traits/cv_traits.hpp"
+#include "boost/type_traits/transform_traits.hpp"
+
+namespace boost { 
+namespace lambda {
+
+// These constants state, whether a lambda_functor instantiation results from 
+// an expression which contains no placeholders (NONE), 
+// only free1 placeholders (FIRST), 
+// free2 placeholders and maybe free1 placeholders (SECOND),
+// free3 and maybe free1 and free2 placeholders (THIRD),
+// freeE placeholders and maybe free1 and free2  (EXCEPTION).
+// RETHROW means, that a rethrow expression is used somewhere in the lambda_functor.
+
+enum { NONE             = 0x00, // Notice we are using bits as flags here.
+       FIRST            = 0x01, 
+       SECOND           = 0x02, 
+       THIRD            = 0x04, 
+       EXCEPTION        = 0x08, 
+       RETHROW          = 0x10};
+
+
+template<class T>
+struct get_tuple_arity;
+
+namespace detail {
+
+template <class T> struct get_arity_;
+
+} // end detail;
+
+template <class T> struct get_arity {
+
+  BOOST_STATIC_CONSTANT(int, value = detail::get_arity_<typename boost::remove_cv<typename boost::remove_reference<T>::type>::type>::value);
+
+};
+
+namespace detail {
+
+template<class T>
+struct get_arity_ {
+  BOOST_STATIC_CONSTANT(int, value = 0);
+};
+
+template<class T>
+struct get_arity_<lambda_functor<T> > {
+  BOOST_STATIC_CONSTANT(int, value = get_arity<T>::value);
+};
+
+template<class Action, class Args>
+struct get_arity_<lambda_functor_base<Action, Args> > {
+  BOOST_STATIC_CONSTANT(int, value = get_tuple_arity<Args>::value);
+};
+
+template<int I>
+struct get_arity_<placeholder<I> > {
+  BOOST_STATIC_CONSTANT(int, value = I);
+};
+
+} // detail 
+
+template<class T>
+struct get_tuple_arity {
+  BOOST_STATIC_CONSTANT(int, value = get_arity<typename T::head_type>::value | get_tuple_arity<typename T::tail_type>::value);
+};
+
+
+template<>
+struct get_tuple_arity<null_type> {
+  BOOST_STATIC_CONSTANT(int, value = 0);
+};
+
+
+  // Does T have placeholder<I> as it's subexpression?
+
+template<class T, int I>
+struct has_placeholder {
+  BOOST_STATIC_CONSTANT(bool, value = (get_arity<T>::value & I) != 0);
+}; 
+
+template<int I, int J>
+struct includes_placeholder {
+  BOOST_STATIC_CONSTANT(bool, value = (J & I) != 0);
+};
+
+template<int I, int J>
+struct lacks_placeholder {
+  BOOST_STATIC_CONSTANT(bool, value = ((J & I) == 0));
+};
+
+
+} // namespace lambda
+} // namespace boost
+
+#endif
diff --git a/ext/boost/lambda/detail/function_adaptors.hpp b/ext/boost/lambda/detail/function_adaptors.hpp
new file mode 100644
index 0000000..35db8b4
--- /dev/null
+++ b/ext/boost/lambda/detail/function_adaptors.hpp
@@ -0,0 +1,789 @@
+// Boost Lambda Library -  function_adaptors.hpp ----------------------------
+ 
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+
+#ifndef BOOST_LAMBDA_FUNCTION_ADAPTORS_HPP
+#define BOOST_LAMBDA_FUNCTION_ADAPTORS_HPP
+
+#include "boost/mpl/has_xxx.hpp"
+#include "boost/tuple/tuple.hpp"
+#include "boost/type_traits/same_traits.hpp"
+#include "boost/type_traits/remove_reference.hpp"
+#include "boost/type_traits/remove_cv.hpp"
+#include "boost/type_traits/add_const.hpp"
+#include "boost/type_traits/add_volatile.hpp"
+#include "boost/utility/result_of.hpp"
+
+namespace boost { 
+namespace lambda {
+
+namespace detail {
+
+BOOST_MPL_HAS_XXX_TEMPLATE_DEF(sig)
+
+template<class Tuple>
+struct remove_references_from_elements {
+  typedef typename boost::tuples::cons<
+    typename boost::remove_reference<typename Tuple::head_type>::type,
+    typename remove_references_from_elements<typename Tuple::tail_type>::type
+  > type;
+};
+
+template<>
+struct remove_references_from_elements<boost::tuples::null_type> {
+  typedef boost::tuples::null_type type;
+};
+
+}
+
+template <class Func> struct function_adaptor {
+
+  typedef typename detail::remove_reference_and_cv<Func>::type plainF;
+
+#if !defined(BOOST_NO_RESULT_OF)
+  // Support functors that use the boost::result_of return type convention.
+  template<class Tuple, int Length, bool HasSig>
+  struct result_converter;
+  template<class Tuple, int Length>
+  struct result_converter<Tuple, Length, true>
+    : plainF::template sig<
+        typename detail::remove_references_from_elements<Tuple>::type
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 0, false>
+    : result_of<plainF()>
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 1, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type)
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 2, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type,
+        typename tuples::element<2, Tuple>::type)
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 3, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type,
+        typename tuples::element<2, Tuple>::type,
+        typename tuples::element<3, Tuple>::type)
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 4, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type,
+        typename tuples::element<2, Tuple>::type,
+        typename tuples::element<3, Tuple>::type,
+        typename tuples::element<4, Tuple>::type)
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 5, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type,
+        typename tuples::element<2, Tuple>::type,
+        typename tuples::element<3, Tuple>::type,
+        typename tuples::element<4, Tuple>::type,
+        typename tuples::element<5, Tuple>::type)
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 6, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type,
+        typename tuples::element<2, Tuple>::type,
+        typename tuples::element<3, Tuple>::type,
+        typename tuples::element<4, Tuple>::type,
+        typename tuples::element<5, Tuple>::type,
+        typename tuples::element<6, Tuple>::type)
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 7, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type,
+        typename tuples::element<2, Tuple>::type,
+        typename tuples::element<3, Tuple>::type,
+        typename tuples::element<4, Tuple>::type,
+        typename tuples::element<5, Tuple>::type,
+        typename tuples::element<6, Tuple>::type,
+        typename tuples::element<7, Tuple>::type)
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 8, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type,
+        typename tuples::element<2, Tuple>::type,
+        typename tuples::element<3, Tuple>::type,
+        typename tuples::element<4, Tuple>::type,
+        typename tuples::element<5, Tuple>::type,
+        typename tuples::element<6, Tuple>::type,
+        typename tuples::element<7, Tuple>::type,
+        typename tuples::element<8, Tuple>::type)
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 9, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type,
+        typename tuples::element<2, Tuple>::type,
+        typename tuples::element<3, Tuple>::type,
+        typename tuples::element<4, Tuple>::type,
+        typename tuples::element<5, Tuple>::type,
+        typename tuples::element<6, Tuple>::type,
+        typename tuples::element<7, Tuple>::type,
+        typename tuples::element<8, Tuple>::type,
+        typename tuples::element<9, Tuple>::type)
+      >
+  {};
+
+  // we do not know the return type off-hand, we must ask it from Func
+  // To sig we pass a cons list, where the head is the function object type
+  // itself (potentially cv-qualified)
+  // and the tail contains the types of the actual arguments to be passed
+  // to the function object. The arguments can be cv qualified
+  // as well.
+  template <class Args>
+  struct sig
+    : result_converter<
+        Args
+      , tuples::length<typename Args::tail_type>::value
+      , detail::has_sig<plainF>::value
+      >
+  {};
+#else // BOOST_NO_RESULT_OF
+
+  template <class Args> class sig {
+    typedef typename detail::remove_reference_and_cv<Func>::type plainF;
+  public:
+    typedef typename plainF::template sig<
+      typename detail::remove_references_from_elements<Args>::type
+    >::type type;
+  };
+#endif
+
+  template<class RET, class A1>
+  static RET apply(A1& a1) {
+    return a1();
+  }
+  template<class RET, class A1, class A2>
+  static RET apply(A1& a1, A2& a2) {
+    return a1(a2);
+  }
+  template<class RET, class A1, class A2, class A3>
+  static RET apply(A1& a1, A2& a2, A3& a3) {
+    return a1(a2, a3);
+  }
+  template<class RET, class A1, class A2, class A3, class A4>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4) {
+    return a1(a2, a3, a4);
+  }
+  template<class RET, class A1, class A2, class A3, class A4, class A5>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
+    return a1(a2, a3, a4, a5);
+  }
+  template<class RET, class A1, class A2, class A3, class A4, class A5, class A6>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
+    return a1(a2, a3, a4, a5, a6);
+  }
+  template<class RET, class A1, class A2, class A3, class A4, class A5, class A6, 
+           class A7>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, 
+                           A7& a7) {
+    return a1(a2, a3, a4, a5, a6, a7);
+  }
+  template<class RET, class A1, class A2, class A3, class A4, class A5, class A6, 
+           class A7, class A8>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, 
+                           A7& a7, A8& a8) {
+    return a1(a2, a3, a4, a5, a6, a7, a8);
+  }
+  template<class RET, class A1, class A2, class A3, class A4, class A5, class A6, 
+           class A7, class A8, class A9>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, 
+                           A7& a7, A8& a8, A9& a9) {
+    return a1(a2, a3, a4, a5, a6, a7, a8, a9);
+  }
+  template<class RET, class A1, class A2, class A3, class A4, class A5, class A6, 
+           class A7, class A8, class A9, class A10>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, 
+                           A7& a7, A8& a8, A9& a9, A10& a10) {
+    return a1(a2, a3, a4, a5, a6, a7, a8, a9, a10);
+  }
+};
+
+template <class Func> struct function_adaptor<const Func>; // error 
+
+// -- function adaptors with data member access
+template <class Object, class T>
+struct function_adaptor<T Object::*> {
+
+  //  typedef detail::unspecified type;
+
+  // T can have qualifiers and can be a reference type
+  // We get the return type by adding const, if the object through which
+  // the data member is accessed is const, and finally adding a reference
+  template<class Args> class sig { 
+    typedef typename boost::tuples::element<1, Args>::type argument_type;
+    typedef typename boost::remove_reference<
+      argument_type
+    >::type unref_type;
+
+    typedef typename detail::IF<boost::is_const<unref_type>::value,
+      typename boost::add_const<T>::type,
+      T
+    >::RET properly_consted_return_type;
+
+    typedef typename detail::IF<boost::is_volatile<unref_type>::value,
+      typename boost::add_volatile<properly_consted_return_type>::type,
+      properly_consted_return_type
+    >::RET properly_cvd_return_type;
+
+
+  public:
+    typedef typename detail::IF<boost::is_reference<argument_type>::value,
+      typename boost::add_reference<properly_cvd_return_type>::type,
+      typename boost::remove_cv<T>::type
+    >::RET type;
+  };
+
+  template <class RET>
+  static RET apply( T Object::*data, Object& o) {
+    return o.*data;
+  }
+  template <class RET>
+  static RET apply( T Object::*data, const Object& o) {
+    return o.*data;
+  }
+  template <class RET>
+  static RET apply( T Object::*data, volatile Object& o) {
+    return o.*data;
+  }
+  template <class RET>
+  static RET apply( T Object::*data, const volatile Object& o) {
+    return o.*data;
+  }
+  template <class RET>
+  static RET apply( T Object::*data, Object* o) {
+    return o->*data;
+  }
+  template <class RET>
+  static RET apply( T Object::*data, const Object* o) {
+    return o->*data;
+  }
+  template <class RET>
+  static RET apply( T Object::*data, volatile Object* o) {
+    return o->*data;
+  }
+  template <class RET>
+  static RET apply( T Object::*data, const volatile Object* o) {
+    return o->*data;
+  }
+};
+
+// -- function adaptors with 1 argument apply
+   
+template <class Result>
+struct function_adaptor<Result (void)> {
+  
+  template<class T> struct sig { typedef Result type; };
+  template <class RET>
+  static Result apply(Result (*func)()) {
+    return func();
+  }
+};
+
+template <class Result>
+struct function_adaptor<Result (*)(void)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET>
+  static Result apply(Result (*func)()) {
+    return func();
+  }
+};
+
+
+// -- function adaptors with 2 argument apply
+template <class Object, class Result>
+struct function_adaptor<Result (Object::*)() const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET>
+  static Result apply( Result (Object::*func)() const, const Object* o) {
+    return (o->*func)();
+  }
+  template <class RET>
+  static Result apply( Result (Object::*func)() const, const Object& o) {
+    return (o.*func)();
+  }
+};
+
+template <class Object, class Result>
+struct function_adaptor<Result (Object::*)()> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET>
+  static Result apply( Result (Object::*func)(), Object* o) {
+    return (o->*func)();
+  }
+  template <class RET>
+  static Result apply( Result (Object::*func)(), Object& o) {
+    return (o.*func)();
+  }
+};
+
+template <class Arg1, class Result>
+struct function_adaptor<Result (Arg1)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1>
+  static Result apply(Result (*func)(Arg1), A1& a1) {
+    return func(a1);
+  }
+};
+
+template <class Arg1, class Result>
+struct function_adaptor<Result (*)(Arg1)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1>
+  static Result apply(Result (*func)(Arg1), A1& a1) {
+    return func(a1);
+  }
+};
+
+
+// -- function adaptors with 3 argument apply
+template <class Object, class Arg1, class Result>
+struct function_adaptor<Result (Object::*)(Arg1) const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1>
+  static Result apply( Result (Object::*func)(Arg1) const, const Object* o, 
+    A1& a1) {
+    return (o->*func)(a1);
+  }
+  template <class RET, class A1>
+  static Result apply( Result (Object::*func)(Arg1) const, const Object& o, 
+    A1& a1) {
+    return (o.*func)(a1);
+  }
+};
+
+template <class Object, class Arg1, class Result>
+struct function_adaptor<Result (Object::*)(Arg1)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1>
+  static Result apply( Result (Object::*func)(Arg1), Object* o, A1& a1) {
+    return (o->*func)(a1);
+  }
+  template <class RET, class A1>
+  static Result apply( Result (Object::*func)(Arg1), Object& o, A1& a1) {
+    return (o.*func)(a1);
+  }
+};
+
+template <class Arg1, class Arg2, class Result>
+struct function_adaptor<Result (Arg1, Arg2)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2>
+  static Result apply(Result (*func)(Arg1, Arg2), A1& a1, A2& a2) {
+    return func(a1, a2);
+  }
+};
+
+template <class Arg1, class Arg2, class Result>
+struct function_adaptor<Result (*)(Arg1, Arg2)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2>
+  static Result apply(Result (*func)(Arg1, Arg2), A1& a1, A2& a2) {
+    return func(a1, a2);
+  }
+};
+
+
+// -- function adaptors with 4 argument apply
+template <class Object, class Arg1, class Arg2, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2) const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2>
+  static Result apply( Result (Object::*func)(Arg1, Arg2) const, const Object* o, A1& a1, A2& a2) {
+    return (o->*func)(a1, a2);
+  }
+  template <class RET, class A1, class A2>
+  static Result apply( Result (Object::*func)(Arg1, Arg2) const, const Object& o, A1& a1, A2& a2) {
+    return (o.*func)(a1, a2);
+  }
+};
+
+template <class Object, class Arg1, class Arg2, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2>
+  static Result apply( Result (Object::*func)(Arg1, Arg2), Object* o, A1& a1, A2& a2) {
+    return (o->*func)(a1, a2);
+  }
+  template <class RET, class A1, class A2>
+  static Result apply( Result (Object::*func)(Arg1, Arg2), Object& o, A1& a1, A2& a2) {
+    return (o.*func)(a1, a2);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Result>
+struct function_adaptor<Result (Arg1, Arg2, Arg3)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3), A1& a1, A2& a2, A3& a3) {
+    return func(a1, a2, a3);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Result>
+struct function_adaptor<Result (*)(Arg1, Arg2, Arg3)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3), A1& a1, A2& a2, A3& a3) {
+    return func(a1, a2, a3);
+  }
+};
+
+
+// -- function adaptors with 5 argument apply
+template <class Object, class Arg1, class Arg2, class Arg3, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3) const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3) const, const Object* o, A1& a1, A2& a2, A3& a3) {
+    return (o->*func)(a1, a2, a3);
+  }
+  template <class RET, class A1, class A2, class A3>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3) const, const Object& o, A1& a1, A2& a2, A3& a3) {
+    return (o.*func)(a1, a2, a3);
+  }
+};
+
+template <class Object, class Arg1, class Arg2, class Arg3, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3), Object* o, A1& a1, A2& a2, A3& a3) {
+    return (o->*func)(a1, a2, a3);
+  }
+  template <class RET, class A1, class A2, class A3>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3), Object& o, A1& a1, A2& a2, A3& a3) {
+    return (o.*func)(a1, a2, a3);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Result>
+struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4), A1& a1, A2& a2, A3& a3, A4& a4) {
+    return func(a1, a2, a3, a4);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Result>
+struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4), A1& a1, A2& a2, A3& a3, A4& a4) {
+    return func(a1, a2, a3, a4);
+  }
+};
+
+
+// -- function adaptors with 6 argument apply
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4) const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4) {
+    return (o->*func)(a1, a2, a3, a4);
+  }
+  template <class RET, class A1, class A2, class A3, class A4>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4) {
+    return (o.*func)(a1, a2, a3, a4);
+  }
+};
+
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4), Object* o, A1& a1, A2& a2, A3& a3, A4& a4) {
+    return (o->*func)(a1, a2, a3, a4);
+  }
+  template <class RET, class A1, class A2, class A3, class A4>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4), Object& o, A1& a1, A2& a2, A3& a3, A4& a4) {
+    return (o.*func)(a1, a2, a3, a4);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Result>
+struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4, Arg5)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
+    return func(a1, a2, a3, a4, a5);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Result>
+struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4, Arg5)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
+    return func(a1, a2, a3, a4, a5);
+  }
+};
+
+
+// -- function adaptors with 7 argument apply
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5) const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
+    return (o->*func)(a1, a2, a3, a4, a5);
+  }
+  template <class RET, class A1, class A2, class A3, class A4, class A5>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
+    return (o.*func)(a1, a2, a3, a4, a5);
+  }
+};
+
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5), Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
+    return (o->*func)(a1, a2, a3, a4, a5);
+  }
+  template <class RET, class A1, class A2, class A3, class A4, class A5>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
+    return (o.*func)(a1, a2, a3, a4, a5);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Result>
+struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
+    return func(a1, a2, a3, a4, a5, a6);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Result>
+struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
+    return func(a1, a2, a3, a4, a5, a6);
+  }
+};
+
+
+// -- function adaptors with 8 argument apply
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
+    return (o->*func)(a1, a2, a3, a4, a5, a6);
+  }
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
+    return (o.*func)(a1, a2, a3, a4, a5, a6);
+  }
+};
+
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
+    return (o->*func)(a1, a2, a3, a4, a5, a6);
+  }
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
+    return (o.*func)(a1, a2, a3, a4, a5, a6);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Result>
+struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
+    return func(a1, a2, a3, a4, a5, a6, a7);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Result>
+struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
+    return func(a1, a2, a3, a4, a5, a6, a7);
+  }
+};
+
+
+// -- function adaptors with 9 argument apply
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
+    return (o->*func)(a1, a2, a3, a4, a5, a6, a7);
+  }
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
+    return (o.*func)(a1, a2, a3, a4, a5, a6, a7);
+  }
+};
+
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
+    return (o->*func)(a1, a2, a3, a4, a5, a6, a7);
+  }
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
+    return (o.*func)(a1, a2, a3, a4, a5, a6, a7);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Result>
+struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
+    return func(a1, a2, a3, a4, a5, a6, a7, a8);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Result>
+struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
+    return func(a1, a2, a3, a4, a5, a6, a7, a8);
+  }
+};
+
+
+// -- function adaptors with 10 argument apply
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
+    return (o->*func)(a1, a2, a3, a4, a5, a6, a7, a8);
+  }
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
+    return (o.*func)(a1, a2, a3, a4, a5, a6, a7, a8);
+  }
+};
+
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
+    return (o->*func)(a1, a2, a3, a4, a5, a6, a7, a8);
+  }
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
+    return (o.*func)(a1, a2, a3, a4, a5, a6, a7, a8);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9, class Result>
+struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9) {
+    return func(a1, a2, a3, a4, a5, a6, a7, a8, a9);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9, class Result>
+struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9) {
+    return func(a1, a2, a3, a4, a5, a6, a7, a8, a9);
+  }
+};
+
+} // namespace lambda
+} // namespace boost
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ext/boost/lambda/detail/is_instance_of.hpp b/ext/boost/lambda/detail/is_instance_of.hpp
new file mode 100644
index 0000000..1dfbd43
--- /dev/null
+++ b/ext/boost/lambda/detail/is_instance_of.hpp
@@ -0,0 +1,104 @@
+// Boost Lambda Library - is_instance_of.hpp ---------------------
+
+// Copyright (C) 2001 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+// ---------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_IS_INSTANCE_OF
+#define BOOST_LAMBDA_IS_INSTANCE_OF
+
+#include "boost/config.hpp" // for BOOST_STATIC_CONSTANT
+#include "boost/type_traits/conversion_traits.hpp" // for is_convertible
+#include "boost/preprocessor/enum_shifted_params.hpp"
+#include "boost/preprocessor/repeat_2nd.hpp"
+
+// is_instance_of --------------------------------
+// 
+// is_instance_of_n<A, B>::value is true, if type A is 
+// an instantiation of a template B, or A derives from an instantiation 
+// of template B
+//
+// n is the number of template arguments for B
+// 
+// Example:
+// is_instance_of_2<std::istream, basic_stream>::value == true
+
+// The original implementation was somewhat different, with different versions
+// for different compilers. However, there was still a problem
+// with gcc.3.0.2 and 3.0.3 compilers, which didn't think regard
+// is_instance_of_N<...>::value was a constant.
+// John Maddock suggested the way around this problem by building 
+// is_instance_of templates using boost::is_convertible.
+// Now we only have one version of is_instance_of templates, which delagate
+// all the nasty compiler tricks to is_convertible. 
+
+#define BOOST_LAMBDA_CLASS(z, N,A) BOOST_PP_COMMA_IF(N) class
+#define BOOST_LAMBDA_CLASS_ARG(z, N,A) BOOST_PP_COMMA_IF(N) class A##N 
+#define BOOST_LAMBDA_ARG(z, N,A) BOOST_PP_COMMA_IF(N) A##N 
+
+#define BOOST_LAMBDA_CLASS_LIST(n, NAME) BOOST_PP_REPEAT(n, BOOST_LAMBDA_CLASS, NAME)
+
+#define BOOST_LAMBDA_CLASS_ARG_LIST(n, NAME) BOOST_PP_REPEAT(n, BOOST_LAMBDA_CLASS_ARG, NAME)
+
+#define BOOST_LAMBDA_ARG_LIST(n, NAME) BOOST_PP_REPEAT(n, BOOST_LAMBDA_ARG, NAME)
+
+namespace boost {
+namespace lambda {
+
+#define BOOST_LAMBDA_IS_INSTANCE_OF_TEMPLATE(INDEX)                         \
+                                                                            \
+namespace detail {                                                          \
+                                                                            \
+template <template<BOOST_LAMBDA_CLASS_LIST(INDEX,T)> class F>               \
+struct BOOST_PP_CAT(conversion_tester_,INDEX) {                             \
+  template<BOOST_LAMBDA_CLASS_ARG_LIST(INDEX,A)>                            \
+  BOOST_PP_CAT(conversion_tester_,INDEX)                                    \
+    (const F<BOOST_LAMBDA_ARG_LIST(INDEX,A)>&);                             \
+};                                                                          \
+                                                                            \
+} /* end detail */                                                          \
+                                                                            \
+template <class From, template <BOOST_LAMBDA_CLASS_LIST(INDEX,T)> class To> \
+struct BOOST_PP_CAT(is_instance_of_,INDEX)                                  \
+{                                                                           \
+ private:                                                                   \
+   typedef ::boost::is_convertible<                                         \
+     From,                                                                  \
+     BOOST_PP_CAT(detail::conversion_tester_,INDEX)<To>                     \
+   > helper_type;                                                           \
+                                                                            \
+public:                                                                     \
+  BOOST_STATIC_CONSTANT(bool, value = helper_type::value);                  \
+};
+
+
+#define BOOST_LAMBDA_HELPER(z, N, A) BOOST_LAMBDA_IS_INSTANCE_OF_TEMPLATE( BOOST_PP_INC(N) )
+
+// Generate the traits for 1-4 argument templates
+
+BOOST_PP_REPEAT_2ND(4,BOOST_LAMBDA_HELPER,FOO)
+
+#undef BOOST_LAMBDA_HELPER
+#undef BOOST_LAMBDA_IS_INSTANCE_OF_TEMPLATE
+#undef BOOST_LAMBDA_CLASS
+#undef BOOST_LAMBDA_ARG
+#undef BOOST_LAMBDA_CLASS_ARG
+#undef BOOST_LAMBDA_CLASS_LIST
+#undef BOOST_LAMBDA_ARG_LIST
+#undef BOOST_LAMBDA_CLASS_ARG_LIST
+
+} // lambda
+} // boost
+
+#endif
+
+
+
+
+
diff --git a/ext/boost/lambda/detail/lambda_config.hpp b/ext/boost/lambda/detail/lambda_config.hpp
new file mode 100644
index 0000000..9fd1a7b
--- /dev/null
+++ b/ext/boost/lambda/detail/lambda_config.hpp
@@ -0,0 +1,48 @@
+// Boost Lambda Library - lambda_config.hpp ------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+// ---------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_LAMBDA_CONFIG_HPP
+#define BOOST_LAMBDA_LAMBDA_CONFIG_HPP
+
+// add to boost/config.hpp
+// for now
+
+
+# if defined __GNUC__
+#   if (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) 
+#     define BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
+#     define BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
+#   endif
+#   if (__GNUC__ == 2 && __GNUC_MINOR__ <= 97) 
+#     define BOOST_NO_TEMPLATED_STREAMS
+#     define BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
+#   endif
+#   if (__GNUC__ == 2 && __GNUC_MINOR__ <= 95) 
+#     define BOOST_LAMBDA_FAILS_IN_TEMPLATE_KEYWORD_AFTER_SCOPE_OPER
+#   endif
+# endif  // __GNUC__
+ 
+
+#if defined __KCC
+
+#define BOOST_NO_FDECL_TEMPLATES_AS_TEMPLATE_TEMPLATE_PARAMS
+
+#endif  // __KCC
+
+#endif
+
+
+
+
+
+
+
diff --git a/ext/boost/lambda/detail/lambda_functor_base.hpp b/ext/boost/lambda/detail/lambda_functor_base.hpp
new file mode 100644
index 0000000..b084acd
--- /dev/null
+++ b/ext/boost/lambda/detail/lambda_functor_base.hpp
@@ -0,0 +1,615 @@
+// Boost Lambda Library  lambda_functor_base.hpp -----------------------------
+//
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+// ------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_HPP
+#define BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_HPP
+
+#include "boost/type_traits/add_reference.hpp"
+#include "boost/type_traits/add_const.hpp"
+#include "boost/type_traits/remove_const.hpp"
+#include "boost/lambda/detail/lambda_fwd.hpp"
+#include "boost/lambda/detail/lambda_traits.hpp"
+
+namespace boost { 
+namespace lambda {
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(push)
+#pragma warning(disable:4512) //assignment operator could not be generated
+#endif
+
+  // for return type deductions we wrap bound argument to this class,
+  // which fulfils the base class contract for lambda_functors
+template <class T>
+class identity {
+
+  T elem;
+public:
+  
+  typedef T element_t;
+
+  // take all parameters as const references. Note that non-const references
+  // stay as they are.
+  typedef typename boost::add_reference<
+    typename boost::add_const<T>::type
+  >::type par_t;
+
+  explicit identity(par_t t) : elem(t) {}
+
+  template <typename SigArgs> 
+  struct sig { typedef typename boost::remove_const<element_t>::type type; };
+
+  template<class RET, CALL_TEMPLATE_ARGS>
+  RET call(CALL_FORMAL_ARGS) const { CALL_USE_ARGS; return elem; }
+};
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(pop)
+#endif
+
+template <class T> 
+inline lambda_functor<identity<T&> > var(T& t) { return identity<T&>(t); }
+
+  // for lambda functors, var is an identity operator. It was forbidden
+  // at some point, but we might want to var something that can be a 
+  // non-lambda functor or a lambda functor.
+template <class T>
+lambda_functor<T> var(const lambda_functor<T>& t) { return t; }
+
+template <class T> struct var_type {
+  typedef lambda_functor<identity<T&> > type;
+};
+
+
+template <class T> 
+inline 
+lambda_functor<identity<typename bound_argument_conversion<const T>::type> >
+constant(const T& t) { 
+  return identity<typename bound_argument_conversion<const T>::type>(t); 
+}
+template <class T>
+lambda_functor<T> constant(const lambda_functor<T>& t) { return t; }
+
+template <class T> struct constant_type {
+  typedef 
+   lambda_functor<
+     identity<typename bound_argument_conversion<const T>::type> 
+   > type;
+};
+
+
+
+template <class T> 
+inline lambda_functor<identity<const T&> > constant_ref(const T& t) { 
+  return identity<const T&>(t); 
+}
+template <class T>
+lambda_functor<T> constant_ref(const lambda_functor<T>& t) { return t; }
+
+template <class T> struct constant_ref_type {
+  typedef 
+   lambda_functor<identity<const T&> > type;
+};
+
+
+
+  // as_lambda_functor turns any types to lambda functors 
+  // non-lambda_functors will be bound argument types
+template <class T>
+struct as_lambda_functor { 
+  typedef typename 
+    detail::remove_reference_and_cv<T>::type plain_T;
+  typedef typename 
+    detail::IF<is_lambda_functor<plain_T>::value, 
+      plain_T,
+      lambda_functor<
+        identity<typename bound_argument_conversion<T>::type> 
+      >
+    >::RET type; 
+};
+
+// turns arbitrary objects into lambda functors
+template <class T> 
+inline 
+lambda_functor<identity<typename bound_argument_conversion<const T>::type> > 
+to_lambda_functor(const T& t) { 
+  return identity<typename bound_argument_conversion<const T>::type>(t);
+}
+
+template <class T> 
+inline lambda_functor<T> 
+to_lambda_functor(const lambda_functor<T>& t) { 
+  return t;
+}
+
+namespace detail {   
+
+
+
+// In a call constify_rvals<T>::go(x)
+// x should be of type T. If T is a non-reference type, do
+// returns x as const reference. 
+// Otherwise the type doesn't change.
+// The purpose of this class is to avoid 
+// 'cannot bind temporaries to non-const references' errors.
+template <class T> struct constify_rvals {
+  template<class U>
+  static inline const U& go(const U& u) { return u; }
+};
+
+template <class T> struct constify_rvals<T&> {
+  template<class U>
+  static inline U& go(U& u) { return u; }
+};
+
+  // check whether one of the elements of a tuple (cons list) is of type
+  // null_type. Needed, because the compiler goes ahead and instantiates
+  // sig template for nullary case even if the nullary operator() is not
+  // called
+template <class T> struct is_null_type 
+{ BOOST_STATIC_CONSTANT(bool, value = false); };
+
+template <> struct is_null_type<null_type> 
+{ BOOST_STATIC_CONSTANT(bool, value = true); };
+
+template<class Tuple> struct has_null_type {
+  BOOST_STATIC_CONSTANT(bool, value = (is_null_type<typename Tuple::head_type>::value || has_null_type<typename Tuple::tail_type>::value));
+};
+template<> struct has_null_type<null_type> {
+  BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+
+// helpers -------------------
+
+
+template<class Args, class SigArgs>
+class deduce_argument_types_ {
+  typedef typename as_lambda_functor<typename Args::head_type>::type lf_t;
+  typedef typename lf_t::inherited::template sig<SigArgs>::type el_t;  
+public:
+  typedef
+    boost::tuples::cons<
+      el_t, 
+      typename deduce_argument_types_<typename Args::tail_type, SigArgs>::type
+    > type;
+};
+
+template<class SigArgs>
+class deduce_argument_types_<null_type, SigArgs> {
+public:
+  typedef null_type type; 
+};
+
+
+//  // note that tuples cannot have plain function types as elements.
+//  // Hence, all other types will be non-const, except references to 
+//  // functions.
+//  template <class T> struct remove_reference_except_from_functions {
+//    typedef typename boost::remove_reference<T>::type t;
+//    typedef typename detail::IF<boost::is_function<t>::value, T, t>::RET type;
+//  };
+
+template<class Args, class SigArgs>
+class deduce_non_ref_argument_types_ {
+  typedef typename as_lambda_functor<typename Args::head_type>::type lf_t;
+  typedef typename lf_t::inherited::template sig<SigArgs>::type el_t;  
+public:
+  typedef
+    boost::tuples::cons<
+  //      typename detail::remove_reference_except_from_functions<el_t>::type, 
+      typename boost::remove_reference<el_t>::type, 
+      typename deduce_non_ref_argument_types_<typename Args::tail_type, SigArgs>::type
+    > type;
+};
+
+template<class SigArgs>
+class deduce_non_ref_argument_types_<null_type, SigArgs> {
+public:
+  typedef null_type type; 
+};
+
+  // -------------
+
+// take stored Args and Open Args, and return a const list with 
+// deduced elements (real return types)
+template<class Args, class SigArgs>
+class deduce_argument_types {
+  typedef typename deduce_argument_types_<Args, SigArgs>::type t1;
+public:
+  typedef typename detail::IF<
+    has_null_type<t1>::value, null_type, t1
+  >::RET type; 
+};
+
+// take stored Args and Open Args, and return a const list with 
+// deduced elements (references are stripped from the element types)
+
+template<class Args, class SigArgs>
+class deduce_non_ref_argument_types {
+  typedef typename deduce_non_ref_argument_types_<Args, SigArgs>::type t1;
+public:
+  typedef typename detail::IF<
+    has_null_type<t1>::value, null_type, t1
+  >::RET type; 
+};
+
+template <int N, class Args, class SigArgs>
+struct nth_return_type_sig {
+  typedef typename 
+          as_lambda_functor<
+            typename boost::tuples::element<N, Args>::type 
+  //            typename tuple_element_as_reference<N, Args>::type 
+        >::type lf_type;
+
+  typedef typename lf_type::inherited::template sig<SigArgs>::type type;  
+};
+
+template<int N, class Tuple> struct element_or_null {
+  typedef typename boost::tuples::element<N, Tuple>::type type;
+};
+
+template<int N> struct element_or_null<N, null_type> {
+  typedef null_type type;
+};
+
+
+   
+   
+} // end detail
+   
+ // -- lambda_functor base ---------------------
+
+// the explicit_return_type_action case -----------------------------------
+template<class RET, class Args>
+class lambda_functor_base<explicit_return_type_action<RET>, Args> 
+{
+public:
+  Args args;
+
+  typedef RET result_type;
+
+  explicit lambda_functor_base(const Args& a) : args(a) {}
+
+  template <class SigArgs> struct sig { typedef RET type; };
+
+  template<class RET_, CALL_TEMPLATE_ARGS>
+  RET call(CALL_FORMAL_ARGS) const 
+  {
+    return detail::constify_rvals<RET>::go(
+     detail::r_select<RET>::go(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS));
+  }
+};
+
+// the protect_action case -----------------------------------
+template<class Args>
+class lambda_functor_base<protect_action, Args>
+{
+public:
+  Args args;
+public:
+
+  explicit lambda_functor_base(const Args& a) : args(a) {}
+
+
+  template<class RET, CALL_TEMPLATE_ARGS>
+  RET call(CALL_FORMAL_ARGS) const 
+  {
+     CALL_USE_ARGS;
+     return boost::tuples::get<0>(args);
+  }
+
+  template<class SigArgs> struct sig { 
+    //    typedef typename detail::tuple_element_as_reference<0, SigArgs>::type type;
+    typedef typename boost::tuples::element<0, Args>::type type;
+  };
+};
+
+// Do nothing --------------------------------------------------------
+class do_nothing_action {};
+
+template<class Args>
+class lambda_functor_base<do_nothing_action, Args> {
+  //  Args args;
+public:
+  //  explicit lambda_functor_base(const Args& a) {}
+  lambda_functor_base() {}
+
+
+  template<class RET, CALL_TEMPLATE_ARGS> RET call(CALL_FORMAL_ARGS) const {
+    return CALL_USE_ARGS;
+  }
+
+  template<class SigArgs> struct sig { typedef void type; };
+};  
+
+
+//  These specializations provide a shorter notation to define actions.
+//  These lambda_functor_base instances take care of the recursive evaluation
+//  of the arguments and pass the evaluated arguments to the apply function
+//  of an action class. To make action X work with these classes, one must
+//  instantiate the lambda_functor_base as:
+//  lambda_functor_base<action<ARITY, X>, Args>
+//  Where ARITY is the arity of the apply function in X
+
+//  The return type is queried as:
+//  return_type_N<X, EvaluatedArgumentTypes>::type
+//  for which there must be a specialization.
+
+//  Function actions, casts, throws,... all go via these classes.
+
+
+template<class Act, class Args>  
+class lambda_functor_base<action<0, Act>, Args>           
+{  
+public:  
+//  Args args; not needed
+  explicit lambda_functor_base(const Args& /*a*/) {}  
+  
+  template<class SigArgs> struct sig {  
+    typedef typename return_type_N<Act, null_type>::type type;
+  };
+  
+  template<class RET, CALL_TEMPLATE_ARGS>  
+  RET call(CALL_FORMAL_ARGS) const {  
+    CALL_USE_ARGS;
+    return Act::template apply<RET>();
+  }
+};
+
+
+#if defined BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART  
+#error "Multiple defines of BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART"  
+#endif  
+  
+  
+#define BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(ARITY)             \
+template<class Act, class Args>                                        \
+class lambda_functor_base<action<ARITY, Act>, Args>                    \
+{                                                                      \
+public:                                                                \
+  Args args;                                                           \
+                                                                       \
+  explicit lambda_functor_base(const Args& a) : args(a) {}             \
+                                                                       \
+  template<class SigArgs> struct sig {                                 \
+    typedef typename                                                   \
+    detail::deduce_argument_types<Args, SigArgs>::type rets_t;         \
+  public:                                                              \
+    typedef typename                                                   \
+      return_type_N_prot<Act, rets_t>::type type;                      \
+  };                                                                   \
+                                                                       \
+                                                                       \
+  template<class RET, CALL_TEMPLATE_ARGS>                              \
+  RET call(CALL_FORMAL_ARGS) const {                                   \
+    using boost::tuples::get;                                          \
+    using detail::constify_rvals;                                      \
+    using detail::r_select;                                            \
+    using detail::element_or_null;                                     \
+    using detail::deduce_argument_types;                                
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(1)
+
+  typedef typename
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS))
+    );
+  }
+};
+
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(2)
+  
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS))
+    );
+  }
+};
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(3)
+
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+  typedef typename element_or_null<2, rets_t>::type rt2;
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), CALL_ACTUAL_ARGS))
+    );
+  }
+};
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(4)
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+  typedef typename element_or_null<2, rets_t>::type rt2;
+  typedef typename element_or_null<3, rets_t>::type rt3;
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), CALL_ACTUAL_ARGS))
+    );
+  }
+};
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(5)
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+  typedef typename element_or_null<2, rets_t>::type rt2;
+  typedef typename element_or_null<3, rets_t>::type rt3;
+  typedef typename element_or_null<4, rets_t>::type rt4;
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), CALL_ACTUAL_ARGS))
+    );
+  }
+};
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(6)
+
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+  typedef typename element_or_null<2, rets_t>::type rt2;
+  typedef typename element_or_null<3, rets_t>::type rt3;
+  typedef typename element_or_null<4, rets_t>::type rt4;
+  typedef typename element_or_null<5, rets_t>::type rt5;
+
+
+    return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt5>::go(r_select<rt5>::go(get<5>(args), CALL_ACTUAL_ARGS)) 
+    );
+  }
+};
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(7)
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+  typedef typename element_or_null<2, rets_t>::type rt2;
+  typedef typename element_or_null<3, rets_t>::type rt3;
+  typedef typename element_or_null<4, rets_t>::type rt4;
+  typedef typename element_or_null<5, rets_t>::type rt5;
+  typedef typename element_or_null<6, rets_t>::type rt6;
+
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt5>::go(r_select<rt5>::go(get<5>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt6>::go(r_select<rt6>::go(get<6>(args), CALL_ACTUAL_ARGS))
+    );
+  }
+};
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(8)
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+  typedef typename element_or_null<2, rets_t>::type rt2;
+  typedef typename element_or_null<3, rets_t>::type rt3;
+  typedef typename element_or_null<4, rets_t>::type rt4;
+  typedef typename element_or_null<5, rets_t>::type rt5;
+  typedef typename element_or_null<6, rets_t>::type rt6;
+  typedef typename element_or_null<7, rets_t>::type rt7;
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt5>::go(r_select<rt5>::go(get<5>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt6>::go(r_select<rt6>::go(get<6>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt7>::go(r_select<rt7>::go(get<7>(args), CALL_ACTUAL_ARGS))
+    );
+  }
+};
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(9)
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+  typedef typename element_or_null<2, rets_t>::type rt2;
+  typedef typename element_or_null<3, rets_t>::type rt3;
+  typedef typename element_or_null<4, rets_t>::type rt4;
+  typedef typename element_or_null<5, rets_t>::type rt5;
+  typedef typename element_or_null<6, rets_t>::type rt6;
+  typedef typename element_or_null<7, rets_t>::type rt7;
+  typedef typename element_or_null<8, rets_t>::type rt8;
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt5>::go(r_select<rt5>::go(get<5>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt6>::go(r_select<rt6>::go(get<6>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt7>::go(r_select<rt7>::go(get<7>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt8>::go(r_select<rt8>::go(get<8>(args), CALL_ACTUAL_ARGS))
+    );
+  }
+};
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(10) 
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+  typedef typename element_or_null<2, rets_t>::type rt2;
+  typedef typename element_or_null<3, rets_t>::type rt3;
+  typedef typename element_or_null<4, rets_t>::type rt4;
+  typedef typename element_or_null<5, rets_t>::type rt5;
+  typedef typename element_or_null<6, rets_t>::type rt6;
+  typedef typename element_or_null<7, rets_t>::type rt7;
+  typedef typename element_or_null<8, rets_t>::type rt8;
+  typedef typename element_or_null<9, rets_t>::type rt9;
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt5>::go(r_select<rt5>::go(get<5>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt6>::go(r_select<rt6>::go(get<6>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt7>::go(r_select<rt7>::go(get<7>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt8>::go(r_select<rt8>::go(get<8>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt9>::go(r_select<rt9>::go(get<9>(args), CALL_ACTUAL_ARGS)) 
+    );
+  }
+};
+
+#undef BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART
+
+
+} // namespace lambda
+} // namespace boost
+
+#endif
diff --git a/ext/boost/lambda/detail/lambda_functors.hpp b/ext/boost/lambda/detail/lambda_functors.hpp
new file mode 100644
index 0000000..9b1b082
--- /dev/null
+++ b/ext/boost/lambda/detail/lambda_functors.hpp
@@ -0,0 +1,324 @@
+// Boost Lambda Library -  lambda_functors.hpp -------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org
+
+// ------------------------------------------------
+
+#ifndef BOOST_LAMBDA_LAMBDA_FUNCTORS_HPP
+#define BOOST_LAMBDA_LAMBDA_FUNCTORS_HPP
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+
+#include <boost/mpl/or.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_array.hpp>
+
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY1(A1, R1)\
+  typename lazy_disable_if<is_array<A1>, typename R1 >::type
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY2(A1, A2, R1, R2) \
+  typename lazy_disable_if<mpl::or_<is_array<A1>, is_array<A2> >, typename R1, R2 >::type
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY3(A1, A2, A3, R1, R2, R3) \
+  typename lazy_disable_if<mpl::or_<is_array<A1>, is_array<A2>, is_array<A3> >, typename R1, R2, R3 >::type
+
+#else
+
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY1(A1, R1) typename R1::type
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY2(A1, A2, R1, R2) typename R1, R2::type
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY3(A1, A2, A3, R1, R2, R3) typename R1, R2, R3::type
+
+#endif
+
+namespace boost { 
+namespace lambda {
+
+// -- lambda_functor --------------------------------------------
+// --------------------------------------------------------------
+
+//inline const null_type const_null_type() { return null_type(); }
+
+namespace detail {
+namespace {
+
+  static const null_type constant_null_type = null_type();
+
+} // unnamed
+} // detail
+
+class unused {};
+
+#define cnull_type() detail::constant_null_type
+
+// -- free variables types -------------------------------------------------- 
+ 
+  // helper to work around the case where the nullary return type deduction 
+  // is always performed, even though the functor is not nullary  
+namespace detail {
+  template<int N, class Tuple> struct get_element_or_null_type {
+    typedef typename 
+      detail::tuple_element_as_reference<N, Tuple>::type type;
+  };
+  template<int N> struct get_element_or_null_type<N, null_type> {
+    typedef null_type type;
+  };
+}
+
+template <int I> struct placeholder;
+
+template<> struct placeholder<FIRST> {
+
+  template<class SigArgs> struct sig {
+    typedef typename detail::get_element_or_null_type<0, SigArgs>::type type;
+  };
+
+  template<class RET, CALL_TEMPLATE_ARGS> 
+  RET call(CALL_FORMAL_ARGS) const { 
+    BOOST_STATIC_ASSERT(boost::is_reference<RET>::value); 
+    CALL_USE_ARGS; // does nothing, prevents warnings for unused args
+    return a; 
+  }
+};
+
+template<> struct placeholder<SECOND> {
+
+  template<class SigArgs> struct sig {
+    typedef typename detail::get_element_or_null_type<1, SigArgs>::type type;
+  };
+
+  template<class RET, CALL_TEMPLATE_ARGS> 
+  RET call(CALL_FORMAL_ARGS) const { CALL_USE_ARGS; return b; }
+};
+
+template<> struct placeholder<THIRD> {
+
+  template<class SigArgs> struct sig {
+    typedef typename detail::get_element_or_null_type<2, SigArgs>::type type;
+  };
+
+  template<class RET, CALL_TEMPLATE_ARGS> 
+  RET call(CALL_FORMAL_ARGS) const { CALL_USE_ARGS; return c; }
+};
+
+template<> struct placeholder<EXCEPTION> {
+
+  template<class SigArgs> struct sig {
+    typedef typename detail::get_element_or_null_type<3, SigArgs>::type type;
+  };
+
+  template<class RET, CALL_TEMPLATE_ARGS> 
+  RET call(CALL_FORMAL_ARGS) const { CALL_USE_ARGS; return env; }
+};
+   
+typedef const lambda_functor<placeholder<FIRST> >  placeholder1_type;
+typedef const lambda_functor<placeholder<SECOND> > placeholder2_type;
+typedef const lambda_functor<placeholder<THIRD> >  placeholder3_type;
+   
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+// free variables are lambda_functors. This is to allow uniform handling with 
+// other lambda_functors.
+// -------------------------------------------------------------------
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(push)
+#pragma warning(disable:4512) //assignment operator could not be generated
+#endif
+
+// -- lambda_functor NONE ------------------------------------------------
+template <class T>
+class lambda_functor : public T 
+{
+
+BOOST_STATIC_CONSTANT(int, arity_bits = get_arity<T>::value);
+ 
+public:
+  typedef T inherited;
+
+  lambda_functor() {}
+  lambda_functor(const lambda_functor& l) : inherited(l) {}
+
+  lambda_functor(const T& t) : inherited(t) {}
+
+  template <class SigArgs> struct sig {
+    typedef typename inherited::template 
+      sig<typename SigArgs::tail_type>::type type;
+  };
+
+  // Note that this return type deduction template is instantiated, even 
+  // if the nullary 
+  // operator() is not called at all. One must make sure that it does not fail.
+  typedef typename 
+    inherited::template sig<null_type>::type
+      nullary_return_type;
+
+  // Support for boost::result_of.
+  template <class Sig> struct result;
+  template <class F>
+  struct result<F()> {
+    typedef nullary_return_type type;
+  };
+  template <class F, class A>
+  struct result<F(A)> {
+    typedef typename sig<tuple<F, A> >::type type;
+  };
+  template <class F, class A, class B>
+  struct result<F(A, B)> {
+    typedef typename sig<tuple<F, A, B> >::type type;
+  };
+  template <class F, class A, class B, class C>
+  struct result<F(A, B, C)> {
+    typedef typename sig<tuple<F, A, B, C> >::type type;
+  };
+
+  nullary_return_type operator()() const { 
+    return inherited::template 
+      call<nullary_return_type>
+        (cnull_type(), cnull_type(), cnull_type(), cnull_type()); 
+  }
+
+  template<class A>
+  typename inherited::template sig<tuple<A&> >::type
+  operator()(A& a) const { 
+    return inherited::template call<
+      typename inherited::template sig<tuple<A&> >::type
+    >(a, cnull_type(), cnull_type(), cnull_type());
+  }
+
+  template<class A>
+  BOOST_LAMBDA_DISABLE_IF_ARRAY1(A, inherited::template sig<tuple<A const&> >)
+  operator()(A const& a) const { 
+    return inherited::template call<
+      typename inherited::template sig<tuple<A const&> >::type
+    >(a, cnull_type(), cnull_type(), cnull_type());
+  }
+
+  template<class A, class B>
+  typename inherited::template sig<tuple<A&, B&> >::type
+  operator()(A& a, B& b) const { 
+    return inherited::template call<
+      typename inherited::template sig<tuple<A&, B&> >::type
+    >(a, b, cnull_type(), cnull_type()); 
+  }
+
+  template<class A, class B>
+  BOOST_LAMBDA_DISABLE_IF_ARRAY2(A, B, inherited::template sig<tuple<A const&, B&> >)
+  operator()(A const& a, B& b) const { 
+    return inherited::template call<
+      typename inherited::template sig<tuple<A const&, B&> >::type
+    >(a, b, cnull_type(), cnull_type()); 
+  }
+
+  template<class A, class B>
+  BOOST_LAMBDA_DISABLE_IF_ARRAY2(A, B, inherited::template sig<tuple<A&, B const&> >)
+  operator()(A& a, B const& b) const { 
+    return inherited::template call<
+      typename inherited::template sig<tuple<A&, B const&> >::type
+    >(a, b, cnull_type(), cnull_type()); 
+  }
+
+  template<class A, class B>
+  BOOST_LAMBDA_DISABLE_IF_ARRAY2(A, B, inherited::template sig<tuple<A const&, B const&> >)
+  operator()(A const& a, B const& b) const { 
+    return inherited::template call<
+      typename inherited::template sig<tuple<A const&, B const&> >::type
+    >(a, b, cnull_type(), cnull_type()); 
+  }
+
+  template<class A, class B, class C>
+  typename inherited::template sig<tuple<A&, B&, C&> >::type
+  operator()(A& a, B& b, C& c) const
+  { 
+    return inherited::template call<
+      typename inherited::template sig<tuple<A&, B&, C&> >::type
+    >(a, b, c, cnull_type()); 
+  }
+
+  template<class A, class B, class C>
+  BOOST_LAMBDA_DISABLE_IF_ARRAY3(A, B, C, inherited::template sig<tuple<A const&, B const&, C const&> >)
+  operator()(A const& a, B const& b, C const& c) const
+  { 
+    return inherited::template call<
+      typename inherited::template sig<tuple<A const&, B const&, C const&> >::type
+    >(a, b, c, cnull_type()); 
+  }
+
+  // for internal calls with env
+  template<CALL_TEMPLATE_ARGS>
+  typename inherited::template sig<tuple<CALL_REFERENCE_TYPES> >::type
+  internal_call(CALL_FORMAL_ARGS) const { 
+     return inherited::template 
+       call<typename inherited::template 
+         sig<tuple<CALL_REFERENCE_TYPES> >::type>(CALL_ACTUAL_ARGS); 
+  }
+
+  template<class A>
+  const lambda_functor<lambda_functor_base<
+                  other_action<assignment_action>,
+                  boost::tuple<lambda_functor,
+                  typename const_copy_argument <const A>::type> > >
+  operator=(const A& a) const {
+    return lambda_functor_base<
+                  other_action<assignment_action>,
+                  boost::tuple<lambda_functor,
+                  typename const_copy_argument <const A>::type> >
+     (  boost::tuple<lambda_functor,
+             typename const_copy_argument <const A>::type>(*this, a) );
+  }
+
+  template<class A> 
+  const lambda_functor<lambda_functor_base< 
+                  other_action<subscript_action>, 
+                  boost::tuple<lambda_functor, 
+                        typename const_copy_argument <const A>::type> > > 
+  operator[](const A& a) const { 
+    return lambda_functor_base< 
+                  other_action<subscript_action>, 
+                  boost::tuple<lambda_functor, 
+                        typename const_copy_argument <const A>::type> >
+     ( boost::tuple<lambda_functor, 
+             typename const_copy_argument <const A>::type>(*this, a ) ); 
+  } 
+};
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(pop)
+#endif
+
+} // namespace lambda
+} // namespace boost
+
+// is_placeholder
+
+#include <boost/is_placeholder.hpp>
+
+namespace boost
+{
+
+template<> struct is_placeholder< lambda::lambda_functor< lambda::placeholder<lambda::FIRST> > >
+{
+    enum _vt { value = 1 };
+};
+
+template<> struct is_placeholder< lambda::lambda_functor< lambda::placeholder<lambda::SECOND> > >
+{
+    enum _vt { value = 2 };
+};
+
+template<> struct is_placeholder< lambda::lambda_functor< lambda::placeholder<lambda::THIRD> > >
+{
+    enum _vt { value = 3 };
+};
+
+} // namespace boost
+
+#endif
diff --git a/ext/boost/lambda/detail/lambda_fwd.hpp b/ext/boost/lambda/detail/lambda_fwd.hpp
new file mode 100644
index 0000000..a27bfad
--- /dev/null
+++ b/ext/boost/lambda/detail/lambda_fwd.hpp
@@ -0,0 +1,74 @@
+//  lambda_fwd.hpp - Boost Lambda Library -------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+// -------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_FWD_HPP
+#define BOOST_LAMBDA_FWD_HPP
+
+namespace boost { 
+namespace lambda { 
+
+namespace detail {
+
+template<class T> struct generate_error;
+
+}   
+// -- placeholders --------------------------------------------
+
+template <int I> struct placeholder;
+
+// function_adaptors
+template <class Func> 
+struct function_adaptor;
+
+template <int I, class Act> class action;
+
+template <class Base> 
+class lambda_functor;
+
+template <class Act, class Args> 
+class lambda_functor_base;
+
+} // namespace lambda
+} // namespace boost
+
+
+//  #define CALL_TEMPLATE_ARGS class A, class Env
+//  #define CALL_FORMAL_ARGS A& a, Env& env
+//  #define CALL_ACTUAL_ARGS a, env
+//  #define CALL_ACTUAL_ARGS_NO_ENV a
+//  #define CALL_REFERENCE_TYPES A&, Env&
+//  #define CALL_PLAIN_TYPES A, Env
+#define CALL_TEMPLATE_ARGS class A, class B, class C, class Env
+#define CALL_FORMAL_ARGS A& a, B& b, C& c, Env& env
+#define CALL_ACTUAL_ARGS a, b, c, env
+#define CALL_ACTUAL_ARGS_NO_ENV a, b, c
+#define CALL_REFERENCE_TYPES A&, B&, C&, Env&
+#define CALL_PLAIN_TYPES A, B, C, Env
+
+namespace boost {
+namespace lambda {
+namespace detail {
+
+template<class A1, class A2, class A3, class A4>
+void do_nothing(A1&, A2&, A3&, A4&) {}
+
+} // detail
+} // lambda
+} // boost
+
+// prevent the warnings from unused arguments
+#define CALL_USE_ARGS \
+::boost::lambda::detail::do_nothing(a, b, c, env)
+
+
+
+#endif
diff --git a/ext/boost/lambda/detail/lambda_traits.hpp b/ext/boost/lambda/detail/lambda_traits.hpp
new file mode 100644
index 0000000..f35fa09
--- /dev/null
+++ b/ext/boost/lambda/detail/lambda_traits.hpp
@@ -0,0 +1,578 @@
+// - lambda_traits.hpp --- Boost Lambda Library ----------------------------
+//
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+// -------------------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_LAMBDA_TRAITS_HPP
+#define BOOST_LAMBDA_LAMBDA_TRAITS_HPP
+
+#include "boost/type_traits/transform_traits.hpp"
+#include "boost/type_traits/cv_traits.hpp"
+#include "boost/type_traits/function_traits.hpp"
+#include "boost/type_traits/object_traits.hpp"
+#include "boost/tuple/tuple.hpp"
+
+namespace boost {
+namespace lambda {
+
+// -- if construct ------------------------------------------------
+// Proposed by Krzysztof Czarnecki and Ulrich Eisenecker
+
+namespace detail {
+
+template <bool If, class Then, class Else> struct IF { typedef Then RET; };
+
+template <class Then, class Else> struct IF<false, Then, Else> {
+  typedef Else RET;
+};
+
+
+// An if construct that doesn't instantiate the non-matching template:
+
+// Called as: 
+//  IF_type<condition, A, B>::type 
+// The matching template must define the typeded 'type'
+// I.e. A::type if condition is true, B::type if condition is false
+// Idea from Vesa Karvonen (from C&E as well I guess)
+template<class T>
+struct IF_type_
+{
+  typedef typename T::type type;
+};
+
+
+template<bool C, class T, class E>
+struct IF_type
+{
+  typedef typename
+    IF_type_<typename IF<C, T, E>::RET >::type type;
+};
+
+// helper that can be used to give typedef T to some type
+template <class T> struct identity_mapping { typedef T type; };
+
+// An if construct for finding an integral constant 'value'
+// Does not instantiate the non-matching branch
+// Called as IF_value<condition, A, B>::value
+// If condition is true A::value must be defined, otherwise B::value
+
+template<class T>
+struct IF_value_
+{
+  BOOST_STATIC_CONSTANT(int, value = T::value);
+};
+
+
+template<bool C, class T, class E>
+struct IF_value
+{
+  BOOST_STATIC_CONSTANT(int, value = (IF_value_<typename IF<C, T, E>::RET>::value));
+};
+
+
+// --------------------------------------------------------------
+
+// removes reference from other than function types:
+template<class T> class remove_reference_if_valid
+{
+
+  typedef typename boost::remove_reference<T>::type plainT;
+public:
+  typedef typename IF<
+    boost::is_function<plainT>::value,
+    T,
+    plainT
+  >::RET type;
+
+};
+
+
+template<class T> struct remove_reference_and_cv {
+   typedef typename boost::remove_cv<
+     typename boost::remove_reference<T>::type
+   >::type type;
+};
+
+
+   
+// returns a reference to the element of tuple T
+template<int N, class T> struct tuple_element_as_reference {   
+  typedef typename
+     boost::tuples::access_traits<
+       typename boost::tuples::element<N, T>::type
+     >::non_const_type type;
+};
+
+// returns the cv and reverence stripped type of a tuple element
+template<int N, class T> struct tuple_element_stripped {   
+  typedef typename
+     remove_reference_and_cv<
+       typename boost::tuples::element<N, T>::type
+     >::type type;
+};
+
+// is_lambda_functor -------------------------------------------------   
+
+template <class T> struct is_lambda_functor_ {
+  BOOST_STATIC_CONSTANT(bool, value = false);
+};
+   
+template <class Arg> struct is_lambda_functor_<lambda_functor<Arg> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+   
+} // end detail
+
+   
+template <class T> struct is_lambda_functor {
+  BOOST_STATIC_CONSTANT(bool, 
+     value = 
+       detail::is_lambda_functor_<
+         typename detail::remove_reference_and_cv<T>::type
+       >::value);
+};
+   
+
+namespace detail {
+
+// -- parameter_traits_ ---------------------------------------------
+
+// An internal parameter type traits class that respects
+// the reference_wrapper class.
+
+// The conversions performed are:
+// references -> compile_time_error
+// T1 -> T2, 
+// reference_wrapper<T> -> T&
+// const array -> ref to const array
+// array -> ref to array
+// function -> ref to function
+
+// ------------------------------------------------------------------------
+
+template<class T1, class T2> 
+struct parameter_traits_ {
+  typedef T2 type;
+};
+
+// Do not instantiate with reference types
+template<class T, class Any> struct parameter_traits_<T&, Any> {
+  typedef typename 
+    generate_error<T&>::
+      parameter_traits_class_instantiated_with_reference_type type;
+};
+
+// Arrays can't be stored as plain types; convert them to references
+template<class T, int n, class Any> struct parameter_traits_<T[n], Any> {
+  typedef T (&type)[n];
+};
+   
+template<class T, int n, class Any> 
+struct parameter_traits_<const T[n], Any> {
+  typedef const T (&type)[n];
+};
+
+template<class T, int n, class Any> 
+struct parameter_traits_<volatile T[n], Any> {
+  typedef volatile  T (&type)[n];
+};
+template<class T, int n, class Any> 
+struct parameter_traits_<const volatile T[n], Any> {
+  typedef const volatile T (&type)[n];
+};
+
+
+template<class T, class Any> 
+struct parameter_traits_<boost::reference_wrapper<T>, Any >{
+  typedef T& type;
+};
+
+template<class T, class Any> 
+struct parameter_traits_<const boost::reference_wrapper<T>, Any >{
+  typedef T& type;
+};
+
+template<class T, class Any> 
+struct parameter_traits_<volatile boost::reference_wrapper<T>, Any >{
+  typedef T& type;
+};
+
+template<class T, class Any> 
+struct parameter_traits_<const volatile boost::reference_wrapper<T>, Any >{
+  typedef T& type;
+};
+
+template<class Any>
+struct parameter_traits_<void, Any> {
+  typedef void type;
+};
+
+template<class Arg, class Any>
+struct parameter_traits_<lambda_functor<Arg>, Any > {
+  typedef lambda_functor<Arg> type;
+};
+
+template<class Arg, class Any>
+struct parameter_traits_<const lambda_functor<Arg>, Any > {
+  typedef lambda_functor<Arg> type;
+};
+
+// Are the volatile versions needed?
+template<class Arg, class Any>
+struct parameter_traits_<volatile lambda_functor<Arg>, Any > {
+  typedef lambda_functor<Arg> type;
+};
+
+template<class Arg, class Any>
+struct parameter_traits_<const volatile lambda_functor<Arg>, Any > {
+  typedef lambda_functor<Arg> type;
+};
+
+} // end namespace detail
+
+
+// ------------------------------------------------------------------------
+// traits classes for lambda expressions (bind functions, operators ...)   
+
+// must be instantiated with non-reference types
+
+// The default is const plain type -------------------------
+// const T -> const T, 
+// T -> const T, 
+// references -> compile_time_error
+// reference_wrapper<T> -> T&
+// array -> const ref array
+template<class T>
+struct const_copy_argument {
+  typedef typename 
+    detail::parameter_traits_<
+      T,
+      typename detail::IF<boost::is_function<T>::value, T&, const T>::RET
+    >::type type;
+};
+
+// T may be a function type. Without the IF test, const would be added 
+// to a function type, which is illegal.
+
+// all arrays are converted to const.
+// This traits template is used for 'const T&' parameter passing 
+// and thus the knowledge of the potential 
+// non-constness of an actual argument is lost.   
+template<class T, int n>  struct const_copy_argument <T[n]> {
+  typedef const T (&type)[n];
+};
+template<class T, int n>  struct const_copy_argument <volatile T[n]> {
+     typedef const volatile T (&type)[n];
+};
+   
+template<class T>
+struct const_copy_argument<T&> {};
+// do not instantiate with references
+  //  typedef typename detail::generate_error<T&>::references_not_allowed type;
+
+
+template<>
+struct const_copy_argument<void> {
+  typedef void type;
+};
+
+
+// Does the same as const_copy_argument, but passes references through as such
+template<class T>
+struct bound_argument_conversion {
+  typedef typename const_copy_argument<T>::type type; 
+};
+
+template<class T>
+struct bound_argument_conversion<T&> {
+  typedef T& type; 
+};
+   
+// The default is non-const reference -------------------------
+// const T -> const T&, 
+// T -> T&, 
+// references -> compile_time_error
+// reference_wrapper<T> -> T&
+template<class T>
+struct reference_argument {
+  typedef typename detail::parameter_traits_<T, T&>::type type; 
+};
+
+template<class T>
+struct reference_argument<T&> {
+  typedef typename detail::generate_error<T&>::references_not_allowed type; 
+};
+
+template<class Arg>
+struct reference_argument<lambda_functor<Arg> > {
+  typedef lambda_functor<Arg> type;
+};
+
+template<class Arg>
+struct reference_argument<const lambda_functor<Arg> > {
+  typedef lambda_functor<Arg> type;
+};
+
+// Are the volatile versions needed?
+template<class Arg>
+struct reference_argument<volatile lambda_functor<Arg> > {
+  typedef lambda_functor<Arg> type;
+};
+
+template<class Arg>
+struct reference_argument<const volatile lambda_functor<Arg> > {
+  typedef lambda_functor<Arg> type;
+};
+
+template<>
+struct reference_argument<void> {
+  typedef void type;
+};
+
+namespace detail {
+   
+// Array to pointer conversion
+template <class T>
+struct array_to_pointer { 
+  typedef T type;
+};
+
+template <class T, int N>
+struct array_to_pointer <const T[N]> { 
+  typedef const T* type;
+};
+template <class T, int N>
+struct array_to_pointer <T[N]> { 
+  typedef T* type;
+};
+
+template <class T, int N>
+struct array_to_pointer <const T (&) [N]> { 
+  typedef const T* type;
+};
+template <class T, int N>
+struct array_to_pointer <T (&) [N]> { 
+  typedef T* type;
+};
+
+
+// ---------------------------------------------------------------------------
+// The call_traits for bind
+// Respects the reference_wrapper class.
+
+// These templates are used outside of bind functions as well.
+// the bind_tuple_mapper provides a shorter notation for default
+// bound argument storing semantics, if all arguments are treated
+// uniformly.
+
+// from template<class T> foo(const T& t) : bind_traits<const T>::type
+// from template<class T> foo(T& t) : bind_traits<T>::type
+
+// Conversions:
+// T -> const T,
+// cv T -> cv T, 
+// T& -> T& 
+// reference_wrapper<T> -> T&
+// const reference_wrapper<T> -> T&
+// array -> const ref array
+
+// make bound arguments const, this is a deliberate design choice, the
+// purpose is to prevent side effects to bound arguments that are stored
+// as copies
+template<class T>
+struct bind_traits {
+  typedef const T type; 
+};
+
+template<class T>
+struct bind_traits<T&> {
+  typedef T& type; 
+};
+
+// null_types are an exception, we always want to store them as non const
+// so that other templates can assume that null_type is always without const
+template<>
+struct bind_traits<null_type> {
+  typedef null_type type;
+};
+
+// the bind_tuple_mapper, bind_type_generators may 
+// introduce const to null_type
+template<>
+struct bind_traits<const null_type> {
+  typedef null_type type;
+};
+
+// Arrays can't be stored as plain types; convert them to references.
+// All arrays are converted to const. This is because bind takes its
+// parameters as const T& and thus the knowledge of the potential 
+// non-constness of actual argument is lost.
+template<class T, int n>  struct bind_traits <T[n]> {
+  typedef const T (&type)[n];
+};
+
+template<class T, int n> 
+struct bind_traits<const T[n]> {
+  typedef const T (&type)[n];
+};
+
+template<class T, int n>  struct bind_traits<volatile T[n]> {
+  typedef const volatile T (&type)[n];
+};
+
+template<class T, int n> 
+struct bind_traits<const volatile T[n]> {
+  typedef const volatile T (&type)[n];
+};
+
+template<class R>
+struct bind_traits<R()> {
+    typedef R(&type)();
+};
+
+template<class R, class Arg1>
+struct bind_traits<R(Arg1)> {
+    typedef R(&type)(Arg1);
+};
+
+template<class R, class Arg1, class Arg2>
+struct bind_traits<R(Arg1, Arg2)> {
+    typedef R(&type)(Arg1, Arg2);
+};
+
+template<class R, class Arg1, class Arg2, class Arg3>
+struct bind_traits<R(Arg1, Arg2, Arg3)> {
+    typedef R(&type)(Arg1, Arg2, Arg3);
+};
+
+template<class R, class Arg1, class Arg2, class Arg3, class Arg4>
+struct bind_traits<R(Arg1, Arg2, Arg3, Arg4)> {
+    typedef R(&type)(Arg1, Arg2, Arg3, Arg4);
+};
+
+template<class R, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5>
+struct bind_traits<R(Arg1, Arg2, Arg3, Arg4, Arg5)> {
+    typedef R(&type)(Arg1, Arg2, Arg3, Arg4, Arg5);
+};
+
+template<class R, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6>
+struct bind_traits<R(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)> {
+    typedef R(&type)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6);
+};
+
+template<class R, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7>
+struct bind_traits<R(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7)> {
+    typedef R(&type)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7);
+};
+
+template<class R, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8>
+struct bind_traits<R(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8)> {
+    typedef R(&type)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8);
+};
+
+template<class R, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9>
+struct bind_traits<R(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9)> {
+    typedef R(&type)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9);
+};
+
+template<class T> 
+struct bind_traits<reference_wrapper<T> >{
+  typedef T& type;
+};
+
+template<class T> 
+struct bind_traits<const reference_wrapper<T> >{
+  typedef T& type;
+};
+
+template<>
+struct bind_traits<void> {
+  typedef void type;
+};
+
+
+
+template <
+  class T0 = null_type, class T1 = null_type, class T2 = null_type, 
+  class T3 = null_type, class T4 = null_type, class T5 = null_type, 
+  class T6 = null_type, class T7 = null_type, class T8 = null_type, 
+  class T9 = null_type
+>
+struct bind_tuple_mapper {
+  typedef
+    tuple<typename bind_traits<T0>::type, 
+          typename bind_traits<T1>::type, 
+          typename bind_traits<T2>::type, 
+          typename bind_traits<T3>::type, 
+          typename bind_traits<T4>::type, 
+          typename bind_traits<T5>::type, 
+          typename bind_traits<T6>::type, 
+          typename bind_traits<T7>::type,
+          typename bind_traits<T8>::type,
+          typename bind_traits<T9>::type> type;
+};
+
+// bind_traits, except map const T& -> const T
+  // this is needed e.g. in currying. Const reference arguments can
+  // refer to temporaries, so it is not safe to store them as references.
+  template <class T> struct remove_const_reference {
+    typedef typename bind_traits<T>::type type;
+  };
+
+  template <class T> struct remove_const_reference<const T&> {
+    typedef const T type;
+  };
+
+
+// maps the bind argument types to the resulting lambda functor type
+template <
+  class T0 = null_type, class T1 = null_type, class T2 = null_type, 
+  class T3 = null_type, class T4 = null_type, class T5 = null_type, 
+  class T6 = null_type, class T7 = null_type, class T8 = null_type, 
+  class T9 = null_type
+>
+class bind_type_generator {
+
+  typedef typename
+  detail::bind_tuple_mapper<
+    T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+  >::type args_t;
+
+  BOOST_STATIC_CONSTANT(int, nof_elems = boost::tuples::length<args_t>::value);
+
+  typedef 
+    action<
+      nof_elems, 
+      function_action<nof_elems>
+    > action_type;
+
+public:
+  typedef
+    lambda_functor<
+      lambda_functor_base<
+        action_type, 
+        args_t
+      >
+    > type; 
+    
+};
+
+
+   
+} // detail
+   
+template <class T> inline const T&  make_const(const T& t) { return t; }
+
+
+} // end of namespace lambda
+} // end of namespace boost
+
+
+   
+#endif // BOOST_LAMBDA_TRAITS_HPP
diff --git a/ext/boost/lambda/detail/member_ptr.hpp b/ext/boost/lambda/detail/member_ptr.hpp
new file mode 100644
index 0000000..288f70c
--- /dev/null
+++ b/ext/boost/lambda/detail/member_ptr.hpp
@@ -0,0 +1,737 @@
+// Boost Lambda Library -- member_ptr.hpp ---------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+// Copyright (C) 2000 Gary Powell (gary.powell at sierra.com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+// --------------------------------------------------------------------------
+
+#if !defined(BOOST_LAMBDA_MEMBER_PTR_HPP)
+#define BOOST_LAMBDA_MEMBER_PTR_HPP
+
+namespace boost { 
+namespace lambda {
+
+
+class member_pointer_action {};
+
+
+namespace detail {
+
+// the boost type_traits member_pointer traits are not enough, 
+// need to know more details.
+template<class T>
+struct member_pointer {
+  typedef typename boost::add_reference<T>::type type;
+  typedef detail::unspecified class_type;
+  typedef detail::unspecified qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = false);
+};
+
+template<class T, class U>
+struct member_pointer<T U::*> {
+  typedef typename boost::add_reference<T>::type type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = true);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = false);
+};
+
+template<class T, class U>
+struct member_pointer<const T U::*> {
+  typedef typename boost::add_reference<const T>::type type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = true);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = false);
+};
+
+template<class T, class U>
+struct member_pointer<volatile T U::*> {
+  typedef typename boost::add_reference<volatile T>::type type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = true);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = false);
+};
+
+template<class T, class U>
+struct member_pointer<const volatile T U::*> {
+  typedef typename boost::add_reference<const volatile T>::type type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = true);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = false);
+};
+
+// -- nonconst member functions --
+template<class T, class U>
+struct member_pointer<T (U::*)()> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1>
+struct member_pointer<T (U::*)(A1)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2>
+struct member_pointer<T (U::*)(A1, A2)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3>
+struct member_pointer<T (U::*)(A1, A2, A3)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4>
+struct member_pointer<T (U::*)(A1, A2, A3, A4)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7, class A8>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7, class A8, class A9>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+// -- const member functions --
+template<class T, class U>
+struct member_pointer<T (U::*)() const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1>
+struct member_pointer<T (U::*)(A1) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2>
+struct member_pointer<T (U::*)(A1, A2) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3>
+struct member_pointer<T (U::*)(A1, A2, A3) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4>
+struct member_pointer<T (U::*)(A1, A2, A3, A4) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7, class A8>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7, class A8, class A9>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8, A9) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+  // -- volatile --
+template<class T, class U>
+struct member_pointer<T (U::*)() volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1>
+struct member_pointer<T (U::*)(A1) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2>
+struct member_pointer<T (U::*)(A1, A2) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3>
+struct member_pointer<T (U::*)(A1, A2, A3) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4>
+struct member_pointer<T (U::*)(A1, A2, A3, A4) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7, class A8>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7, class A8, class A9>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8, A9) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+  // -- const volatile
+template<class T, class U>
+struct member_pointer<T (U::*)() const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1>
+struct member_pointer<T (U::*)(A1) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2>
+struct member_pointer<T (U::*)(A1, A2) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3>
+struct member_pointer<T (U::*)(A1, A2, A3) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4>
+struct member_pointer<T (U::*)(A1, A2, A3, A4) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7, class A8>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7, class A8, class A9>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8, A9) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+
+} // detail
+
+namespace detail {
+
+  // this class holds a pointer to a member function and the object.
+  // when called, it just calls the member function with the parameters 
+  // provided
+
+  // It would have been possible to use existing lambda_functors to represent
+  // a bound member function like this, but to have a separate template is 
+  // safer, since now this functor doesn't mix and match with lambda_functors
+  // only thing you can do with this is to call it
+
+  // note that previously instantiated classes 
+  // (other_action<member_pointer_action> and member_pointer_action_helper
+  // guarantee, that A and B are 
+  // such types, that for objects a and b of corresponding types, a->*b leads 
+  // to the builtin ->* to be called. So types that would end in a  call to 
+  // a user defined ->* do not create a member_pointer_caller object.
+
+template<class RET, class A, class B>
+class member_pointer_caller {
+  A a; B b;
+
+public:
+  member_pointer_caller(const A& aa, const B& bb) : a(aa), b(bb) {}
+
+  RET operator()() const { return (a->*b)(); } 
+
+  template<class A1>
+  RET operator()(const A1& a1) const { return (a->*b)(a1); } 
+
+  template<class A1, class A2>
+  RET operator()(const A1& a1, const A2& a2) const { return (a->*b)(a1, a2); } 
+
+  template<class A1, class A2, class A3>
+  RET operator()(const A1& a1, const A2& a2, const A3& a3) const { 
+    return (a->*b)(a1, a2, a3); 
+  } 
+
+  template<class A1, class A2, class A3, class A4>
+  RET operator()(const A1& a1, const A2& a2, const A3& a3, 
+                 const A4& a4) const { 
+    return (a->*b)(a1, a2, a3, a4); 
+  } 
+
+  template<class A1, class A2, class A3, class A4, class A5>
+  RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, 
+                 const A5& a5) const { 
+    return (a->*b)(a1, a2, a3, a4, a5); 
+  } 
+
+  template<class A1, class A2, class A3, class A4, class A5, class A6>
+  RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, 
+                 const A5& a5, const A6& a6) const { 
+    return (a->*b)(a1, a2, a3, a4, a5, a6); 
+  } 
+
+  template<class A1, class A2, class A3, class A4, class A5, class A6, 
+           class A7>
+  RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, 
+                 const A5& a5, const A6& a6, const A7& a7) const { 
+    return (a->*b)(a1, a2, a3, a4, a5, a6, a7); 
+  } 
+
+  template<class A1, class A2, class A3, class A4, class A5, class A6, 
+           class A7, class A8>
+  RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, 
+                 const A5& a5, const A6& a6, const A7& a7,
+                 const A8& a8) const { 
+    return (a->*b)(a1, a2, a3, a4, a5, a6, a7, a8); 
+  } 
+
+  template<class A1, class A2, class A3, class A4, class A5, class A6, 
+           class A7, class A8, class A9>
+  RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, 
+                 const A5& a5, const A6& a6, const A7& a7,
+                 const A8& a8, const A9& a9) const { 
+    return (a->*b)(a1, a2, a3, a4, a5, a6, a7, a8, a9); 
+  } 
+
+};
+
+// helper templates for return type deduction and action classes
+// different cases for data member, function member, neither
+
+// true-true case
+template <bool Is_data_member, bool Is_function_member>
+struct member_pointer_action_helper;
+  // cannot be both, no body provided
+
+  // data member case
+  // this means, that B is a data member and A is a pointer type,
+  // so either built-in ->* should be called, or there is an error
+template <>
+struct member_pointer_action_helper<true, false> {
+public:
+
+  template<class RET, class A, class B>
+  static RET apply(A& a, B& b) { 
+    return a->*b; 
+  }
+
+  template<class A, class B>
+  struct return_type {
+  private:
+    typedef typename detail::remove_reference_and_cv<B>::type plainB;
+
+    typedef typename detail::member_pointer<plainB>::type type0;
+    // we remove the reference now, as we may have to add cv:s 
+    typedef typename boost::remove_reference<type0>::type type1;
+
+    // A is a reference to pointer
+    // remove the top level cv qualifiers and reference
+    typedef typename 
+      detail::remove_reference_and_cv<A>::type non_ref_A;
+
+    // A is a pointer type, so take the type pointed to
+    typedef typename ::boost::remove_pointer<non_ref_A>::type non_pointer_A; 
+
+  public:
+    // For non-reference types, we must add const and/or volatile if
+    // the pointer type has these qualifiers
+    // If the member is a reference, these do not have any effect
+    //   (cv T == T if T is a reference type)
+    typedef typename detail::IF<
+      ::boost::is_const<non_pointer_A>::value, 
+      typename ::boost::add_const<type1>::type,
+      type1
+    >::RET type2;
+    typedef typename detail::IF<
+      ::boost::is_volatile<non_pointer_A>::value, 
+      typename ::boost::add_volatile<type2>::type,
+      type2
+    >::RET type3;
+    // add reference back
+    typedef typename ::boost::add_reference<type3>::type type;
+  };
+};
+
+  // neither case
+template <>
+struct member_pointer_action_helper<false, false> {
+public:
+  template<class RET, class A, class B>
+  static RET apply(A& a, B& b) { 
+// not a built in member pointer operator, just call ->*
+    return a->*b; 
+  }
+  // an overloaded member pointer operators, user should have specified
+  // the return type
+  // At this point we know that there is no matching specialization for
+  // return_type_2, so try return_type_2_plain
+  template<class A, class B>
+  struct return_type {
+
+    typedef typename plain_return_type_2<
+      other_action<member_pointer_action>, A, B
+    >::type type;
+  };
+  
+};
+
+
+// member pointer function case
+// This is a built in ->* call for a member function, 
+// the only thing that you can do with that, is to give it some arguments
+// note, it is guaranteed that A is a pointer type, and thus it cannot
+// be a call to overloaded ->*
+template <>
+struct member_pointer_action_helper<false, true> {
+  public:
+
+  template<class RET, class A, class B>
+  static RET apply(A& a, B& b) { 
+    typedef typename ::boost::remove_cv<B>::type plainB;
+    typedef typename detail::member_pointer<plainB>::type ret_t; 
+    typedef typename ::boost::remove_cv<A>::type plainA;
+
+    // we always strip cv:s to 
+    // make the two routes (calling and type deduction)
+    // to give the same results (and the const does not make any functional
+    // difference)
+    return detail::member_pointer_caller<ret_t, plainA, plainB>(a, b); 
+  }
+
+  template<class A, class B>
+  struct return_type {
+    typedef typename detail::remove_reference_and_cv<B>::type plainB;
+    typedef typename detail::member_pointer<plainB>::type ret_t; 
+    typedef typename detail::remove_reference_and_cv<A>::type plainA; 
+
+    typedef detail::member_pointer_caller<ret_t, plainA, plainB> type; 
+  };
+};
+
+} // detail
+
+template<> class other_action<member_pointer_action>  {
+public:
+  template<class RET, class A, class B>
+  static RET apply(A& a, B& b) {
+    typedef typename 
+      ::boost::remove_cv<B>::type plainB;
+
+    return detail::member_pointer_action_helper<
+        boost::is_pointer<A>::value && 
+          detail::member_pointer<plainB>::is_data_member,
+        boost::is_pointer<A>::value && 
+          detail::member_pointer<plainB>::is_function_member
+      >::template apply<RET>(a, b); 
+    }
+};
+
+  // return type deduction --
+
+  // If the right argument is a pointer to data member, 
+  // and the left argument is of compatible pointer to class type
+  // return type is a reference to the data member type
+
+  // if right argument is a pointer to a member function, and the left 
+  // argument is of a compatible type, the return type is a 
+  // member_pointer_caller (see above)
+
+  // Otherwise, return type deduction fails. There is either an error, 
+  // or the user is trying to call an overloaded ->*
+  // In such a case either ret<> must be used, or a return_type_2 user 
+  // defined specialization must be provided
+
+
+template<class A, class B>
+struct return_type_2<other_action<member_pointer_action>, A, B> {
+private:
+  typedef typename 
+    detail::remove_reference_and_cv<B>::type plainB;
+public:
+  typedef typename 
+    detail::member_pointer_action_helper<
+      detail::member_pointer<plainB>::is_data_member,
+      detail::member_pointer<plainB>::is_function_member
+    >::template return_type<A, B>::type type; 
+};
+
+  // this is the way the generic lambda_functor_base functions instantiate
+  // return type deduction. We turn it into return_type_2, so that the 
+  // user can provide specializations on that level.
+template<class Args>
+struct return_type_N<other_action<member_pointer_action>, Args> {
+  typedef typename boost::tuples::element<0, Args>::type A;
+  typedef typename boost::tuples::element<1, Args>::type B;
+  typedef typename 
+    return_type_2<other_action<member_pointer_action>, 
+                  typename boost::remove_reference<A>::type, 
+                  typename boost::remove_reference<B>::type
+                 >::type type;
+};
+
+
+template<class Arg1, class Arg2>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<2, other_action<member_pointer_action> >,
+    tuple<lambda_functor<Arg1>, typename const_copy_argument<Arg2>::type>
+  >
+>
+operator->*(const lambda_functor<Arg1>& a1, const Arg2& a2)
+{
+  return 
+      lambda_functor_base<
+        action<2, other_action<member_pointer_action> >,
+        tuple<lambda_functor<Arg1>, typename const_copy_argument<Arg2>::type>
+      >
+      (tuple<lambda_functor<Arg1>, 
+             typename const_copy_argument<Arg2>::type>(a1, a2));
+}
+
+template<class Arg1, class Arg2>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<2, other_action<member_pointer_action> >,
+    tuple<lambda_functor<Arg1>, lambda_functor<Arg2> >
+  >
+>
+operator->*(const lambda_functor<Arg1>& a1, const lambda_functor<Arg2>& a2)
+{
+  return 
+      lambda_functor_base<
+        action<2, other_action<member_pointer_action> >,
+        tuple<lambda_functor<Arg1>, lambda_functor<Arg2> >
+      >
+    (tuple<lambda_functor<Arg1>, lambda_functor<Arg2> >(a1, a2));
+}
+
+template<class Arg1, class Arg2>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<2, other_action<member_pointer_action> >,
+    tuple<typename const_copy_argument<Arg1>::type, lambda_functor<Arg2> >
+  >
+>
+operator->*(const Arg1& a1, const lambda_functor<Arg2>& a2)
+{
+  return 
+      lambda_functor_base<
+        action<2, other_action<member_pointer_action> >,
+        tuple<typename const_copy_argument<Arg1>::type, lambda_functor<Arg2> >
+      >
+      (tuple<typename const_copy_argument<Arg1>::type, 
+             lambda_functor<Arg2> >(a1, a2));
+}
+
+
+} // namespace lambda 
+} // namespace boost
+
+
+#endif
+
+
+
+
+
+
diff --git a/ext/boost/lambda/detail/operator_actions.hpp b/ext/boost/lambda/detail/operator_actions.hpp
new file mode 100644
index 0000000..949b40f
--- /dev/null
+++ b/ext/boost/lambda/detail/operator_actions.hpp
@@ -0,0 +1,139 @@
+// -- operator_actions.hpp - Boost Lambda Library ----------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://lambda.cs.utu.fi 
+
+#ifndef BOOST_LAMBDA_OPERATOR_ACTIONS_HPP
+#define BOOST_LAMBDA_OPERATOR_ACTIONS_HPP
+
+namespace boost { 
+namespace lambda {
+
+
+// -- artihmetic ----------------------
+
+class plus_action {};
+class minus_action {};
+class multiply_action {};
+class divide_action {};
+class remainder_action {};
+
+// -- bitwise  -------------------
+
+class leftshift_action {};
+class rightshift_action {};
+class xor_action {};
+
+
+// -- bitwise/logical -------------------
+
+class and_action {};
+class or_action {};
+class not_action {};
+
+// -- relational -------------------------
+
+class less_action {};
+class greater_action {};
+class lessorequal_action {};
+class greaterorequal_action {};
+class equal_action {};
+class notequal_action {};
+
+// -- increment/decrement ------------------------------
+
+class increment_action {};
+class decrement_action {};
+
+// -- void return ------------------------------
+
+// -- other  ------------------------------
+
+class addressof_action {};
+  // class comma_action {}; // defined in actions.hpp
+class contentsof_action {};
+// class member_pointer_action {}; (defined in member_ptr.hpp)
+
+
+// -- actioun group templates --------------------
+
+template <class Action> class arithmetic_action;
+template <class Action> class bitwise_action;
+template <class Action> class logical_action;
+template <class Action> class relational_action;
+template <class Action> class arithmetic_assignment_action;
+template <class Action> class bitwise_assignment_action;
+template <class Action> class unary_arithmetic_action;
+template <class Action> class pre_increment_decrement_action;
+template <class Action> class post_increment_decrement_action;
+
+// ---------------------------------------------------------
+
+  // actions, for which the existence of protect is checked in return type 
+  // deduction.
+
+template <class Act> struct is_protectable<arithmetic_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <class Act> struct is_protectable<bitwise_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <class Act> struct is_protectable<logical_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <class Act> struct is_protectable<relational_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <class Act> 
+struct is_protectable<arithmetic_assignment_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <class Act> struct is_protectable<bitwise_assignment_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <class Act> struct is_protectable<unary_arithmetic_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <class Act> 
+struct is_protectable<pre_increment_decrement_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <class Act> struct 
+is_protectable<post_increment_decrement_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <> struct is_protectable<other_action<addressof_action> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <> struct is_protectable<other_action<contentsof_action> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template<> struct is_protectable<other_action<subscript_action> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template<> struct is_protectable<other_action<assignment_action> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+// NOTE: comma action is also protectable, but the specialization is
+  // in actions.hpp
+
+
+} // namespace lambda 
+} // namespace boost
+
+#endif
+
+
+
+
+
+
+
diff --git a/ext/boost/lambda/detail/operator_lambda_func_base.hpp b/ext/boost/lambda/detail/operator_lambda_func_base.hpp
new file mode 100644
index 0000000..12a6d93
--- /dev/null
+++ b/ext/boost/lambda/detail/operator_lambda_func_base.hpp
@@ -0,0 +1,271 @@
+// Boost Lambda Library  - operator_lambda_func_base.hpp -----------------
+//
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+// ------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_OPERATOR_LAMBDA_FUNC_BASE_HPP
+#define BOOST_LAMBDA_OPERATOR_LAMBDA_FUNC_BASE_HPP
+
+namespace boost { 
+namespace lambda {
+
+
+// These operators cannot be implemented as apply functions of action 
+// templates
+
+
+// Specialization for comma.
+template<class Args>
+class lambda_functor_base<other_action<comma_action>, Args> {
+public:
+  Args args;
+public:
+  explicit lambda_functor_base(const Args& a) : args(a) {}
+
+  template<class RET, CALL_TEMPLATE_ARGS>
+  RET call(CALL_FORMAL_ARGS) const {
+    return detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS), 
+           detail::select(boost::tuples::get<1>(args), CALL_ACTUAL_ARGS); 
+  }
+
+
+  template<class SigArgs> struct sig { 
+  private:
+    typedef typename
+      detail::deduce_argument_types<Args, SigArgs>::type rets_t;      
+  public:
+    typedef typename return_type_2_comma< // comma needs special handling
+      typename detail::element_or_null<0, rets_t>::type,
+      typename detail::element_or_null<1, rets_t>::type
+    >::type type;
+  };
+
+};  
+
+namespace detail {
+
+// helper traits to make the expression shorter, takes binary action
+// bound argument tuple, open argument tuple and gives the return type
+
+template<class Action, class Bound, class Open> class binary_rt {
+  private:
+    typedef typename
+      detail::deduce_argument_types<Bound, Open>::type rets_t;      
+  public:
+    typedef typename return_type_2_prot<
+      Action,  
+      typename detail::element_or_null<0, rets_t>::type,
+      typename detail::element_or_null<1, rets_t>::type
+    >::type type;
+};
+
+
+  // same for unary actions
+template<class Action, class Bound, class Open> class unary_rt {
+  private:
+    typedef typename
+      detail::deduce_argument_types<Bound, Open>::type rets_t;      
+  public:
+    typedef typename return_type_1_prot<
+      Action,  
+      typename detail::element_or_null<0, rets_t>::type
+    >::type type;
+};
+
+
+} // end detail
+
+// Specialization for logical and (to preserve shortcircuiting)
+// this could be done with a macro as the others, code used to be different
+template<class Args>
+class lambda_functor_base<logical_action<and_action>, Args> {
+public:
+  Args args;
+public:
+  explicit lambda_functor_base(const Args& a) : args(a) {}
+
+  template<class RET, CALL_TEMPLATE_ARGS>
+  RET call(CALL_FORMAL_ARGS) const {
+    return detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS) && 
+           detail::select(boost::tuples::get<1>(args), CALL_ACTUAL_ARGS); 
+  }
+  template<class SigArgs> struct sig { 
+    typedef typename
+      detail::binary_rt<logical_action<and_action>, Args, SigArgs>::type type;
+  };      
+};  
+
+// Specialization for logical or (to preserve shortcircuiting)
+// this could be done with a macro as the others, code used to be different
+template<class Args>
+class lambda_functor_base<logical_action< or_action>, Args> {
+public:
+  Args args;
+public:
+  explicit lambda_functor_base(const Args& a) : args(a) {}
+
+  template<class RET, CALL_TEMPLATE_ARGS>
+  RET call(CALL_FORMAL_ARGS) const {
+    return detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS) || 
+           detail::select(boost::tuples::get<1>(args), CALL_ACTUAL_ARGS); 
+  }
+
+  template<class SigArgs> struct sig { 
+    typedef typename
+      detail::binary_rt<logical_action<or_action>, Args, SigArgs>::type type;
+  };      
+};  
+
+// Specialization for subscript
+template<class Args>
+class lambda_functor_base<other_action<subscript_action>, Args> {
+public:
+  Args args;
+public:
+  explicit lambda_functor_base(const Args& a) : args(a) {}
+
+  template<class RET, CALL_TEMPLATE_ARGS>
+  RET call(CALL_FORMAL_ARGS) const {
+    return detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS) 
+           [detail::select(boost::tuples::get<1>(args), CALL_ACTUAL_ARGS)]; 
+  }
+
+  template<class SigArgs> struct sig { 
+    typedef typename
+      detail::binary_rt<other_action<subscript_action>, Args, SigArgs>::type 
+        type;
+  };      
+};  
+
+
+#define BOOST_LAMBDA_BINARY_ACTION(SYMBOL, ACTION_CLASS)  \
+template<class Args>                                                      \
+class lambda_functor_base<ACTION_CLASS, Args> {                           \
+public:                                                                   \
+  Args args;                                                              \
+public:                                                                   \
+  explicit lambda_functor_base(const Args& a) : args(a) {}                \
+                                                                          \
+  template<class RET, CALL_TEMPLATE_ARGS>                                 \
+  RET call(CALL_FORMAL_ARGS) const {                                      \
+    return detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS)  \
+           SYMBOL                                                         \
+           detail::select(boost::tuples::get<1>(args), CALL_ACTUAL_ARGS); \
+  }                                                                       \
+  template<class SigArgs> struct sig {                                    \
+    typedef typename                                                      \
+      detail::binary_rt<ACTION_CLASS, Args, SigArgs>::type type;          \
+  };                                                                      \
+};  
+
+#define BOOST_LAMBDA_PREFIX_UNARY_ACTION(SYMBOL, ACTION_CLASS)            \
+template<class Args>                                                      \
+class lambda_functor_base<ACTION_CLASS, Args> {                           \
+public:                                                                   \
+  Args args;                                                              \
+public:                                                                   \
+  explicit lambda_functor_base(const Args& a) : args(a) {}                \
+                                                                          \
+  template<class RET, CALL_TEMPLATE_ARGS>                                 \
+  RET call(CALL_FORMAL_ARGS) const {                                      \
+    return SYMBOL                                                         \
+           detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS); \
+  }                                                                       \
+  template<class SigArgs> struct sig {                                    \
+    typedef typename                                                      \
+      detail::unary_rt<ACTION_CLASS, Args, SigArgs>::type type;           \
+  };                                                                      \
+};  
+
+#define BOOST_LAMBDA_POSTFIX_UNARY_ACTION(SYMBOL, ACTION_CLASS)           \
+template<class Args>                                                      \
+class lambda_functor_base<ACTION_CLASS, Args> {                           \
+public:                                                                   \
+  Args args;                                                              \
+public:                                                                   \
+  explicit lambda_functor_base(const Args& a) : args(a) {}                \
+                                                                          \
+  template<class RET, CALL_TEMPLATE_ARGS>                                 \
+  RET call(CALL_FORMAL_ARGS) const {                                      \
+    return                                                                \
+    detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS) SYMBOL; \
+  }                                                                       \
+  template<class SigArgs> struct sig {                                    \
+    typedef typename                                                      \
+      detail::unary_rt<ACTION_CLASS, Args, SigArgs>::type type;           \
+  };                                                                      \
+};  
+
+BOOST_LAMBDA_BINARY_ACTION(+,arithmetic_action<plus_action>)
+BOOST_LAMBDA_BINARY_ACTION(-,arithmetic_action<minus_action>)
+BOOST_LAMBDA_BINARY_ACTION(*,arithmetic_action<multiply_action>)
+BOOST_LAMBDA_BINARY_ACTION(/,arithmetic_action<divide_action>)
+BOOST_LAMBDA_BINARY_ACTION(%,arithmetic_action<remainder_action>)
+
+BOOST_LAMBDA_BINARY_ACTION(<<,bitwise_action<leftshift_action>)
+BOOST_LAMBDA_BINARY_ACTION(>>,bitwise_action<rightshift_action>)
+BOOST_LAMBDA_BINARY_ACTION(&,bitwise_action<and_action>)
+BOOST_LAMBDA_BINARY_ACTION(|,bitwise_action<or_action>)
+BOOST_LAMBDA_BINARY_ACTION(^,bitwise_action<xor_action>)
+
+BOOST_LAMBDA_BINARY_ACTION(<,relational_action<less_action>)
+BOOST_LAMBDA_BINARY_ACTION(>,relational_action<greater_action>)
+BOOST_LAMBDA_BINARY_ACTION(<=,relational_action<lessorequal_action>)
+BOOST_LAMBDA_BINARY_ACTION(>=,relational_action<greaterorequal_action>)
+BOOST_LAMBDA_BINARY_ACTION(==,relational_action<equal_action>)
+BOOST_LAMBDA_BINARY_ACTION(!=,relational_action<notequal_action>)
+
+BOOST_LAMBDA_BINARY_ACTION(+=,arithmetic_assignment_action<plus_action>)
+BOOST_LAMBDA_BINARY_ACTION(-=,arithmetic_assignment_action<minus_action>)
+BOOST_LAMBDA_BINARY_ACTION(*=,arithmetic_assignment_action<multiply_action>)
+BOOST_LAMBDA_BINARY_ACTION(/=,arithmetic_assignment_action<divide_action>)
+BOOST_LAMBDA_BINARY_ACTION(%=,arithmetic_assignment_action<remainder_action>)
+
+BOOST_LAMBDA_BINARY_ACTION(<<=,bitwise_assignment_action<leftshift_action>)
+BOOST_LAMBDA_BINARY_ACTION(>>=,bitwise_assignment_action<rightshift_action>)
+BOOST_LAMBDA_BINARY_ACTION(&=,bitwise_assignment_action<and_action>)
+BOOST_LAMBDA_BINARY_ACTION(|=,bitwise_assignment_action<or_action>)
+BOOST_LAMBDA_BINARY_ACTION(^=,bitwise_assignment_action<xor_action>)
+
+BOOST_LAMBDA_BINARY_ACTION(=,other_action< assignment_action>)
+
+
+BOOST_LAMBDA_PREFIX_UNARY_ACTION(+, unary_arithmetic_action<plus_action>)
+BOOST_LAMBDA_PREFIX_UNARY_ACTION(-, unary_arithmetic_action<minus_action>)
+BOOST_LAMBDA_PREFIX_UNARY_ACTION(~, bitwise_action<not_action>)
+BOOST_LAMBDA_PREFIX_UNARY_ACTION(!, logical_action<not_action>)
+BOOST_LAMBDA_PREFIX_UNARY_ACTION(++, pre_increment_decrement_action<increment_action>)
+BOOST_LAMBDA_PREFIX_UNARY_ACTION(--, pre_increment_decrement_action<decrement_action>)
+
+BOOST_LAMBDA_PREFIX_UNARY_ACTION(&,other_action<addressof_action>)
+BOOST_LAMBDA_PREFIX_UNARY_ACTION(*,other_action<contentsof_action>)
+
+BOOST_LAMBDA_POSTFIX_UNARY_ACTION(++, post_increment_decrement_action<increment_action>)
+BOOST_LAMBDA_POSTFIX_UNARY_ACTION(--, post_increment_decrement_action<decrement_action>)
+
+
+#undef BOOST_LAMBDA_POSTFIX_UNARY_ACTION
+#undef BOOST_LAMBDA_PREFIX_UNARY_ACTION
+#undef BOOST_LAMBDA_BINARY_ACTION
+
+} // namespace lambda
+} // namespace boost
+
+#endif
+
+
+
+
+
+
+
+
+
+
diff --git a/ext/boost/lambda/detail/operator_return_type_traits.hpp b/ext/boost/lambda/detail/operator_return_type_traits.hpp
new file mode 100644
index 0000000..b2d3d3a
--- /dev/null
+++ b/ext/boost/lambda/detail/operator_return_type_traits.hpp
@@ -0,0 +1,917 @@
+//  operator_return_type_traits.hpp -- Boost Lambda Library ------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+#ifndef BOOST_LAMBDA_OPERATOR_RETURN_TYPE_TRAITS_HPP
+#define BOOST_LAMBDA_OPERATOR_RETURN_TYPE_TRAITS_HPP
+
+#include "boost/lambda/detail/is_instance_of.hpp"
+#include "boost/type_traits/same_traits.hpp"
+
+#include "boost/indirect_reference.hpp"
+#include "boost/detail/container_fwd.hpp"
+
+#include <cstddef> // needed for the ptrdiff_t
+#include <iosfwd>  // for istream and ostream
+
+#include <iterator> // needed for operator&
+
+namespace boost { 
+namespace lambda {
+namespace detail {
+
+// -- general helper templates for type deduction ------------------
+
+// Much of the type deduction code for standard arithmetic types from Gary Powell
+
+template <class A> struct promote_code { static const int value = -1; };
+// this means that a code is not defined for A
+
+// -- the next 5 types are needed in if_then_else_return 
+// the promotion order is not important, but they must have distinct values.
+template <> struct promote_code<bool> { static const int value = 10; };
+template <> struct promote_code<char> { static const int value = 20; };
+template <> struct promote_code<unsigned char> { static const int value = 30; };
+template <> struct promote_code<signed char> { static const int value = 40; };
+template <> struct promote_code<short int> { static const int value = 50; };
+// ----------
+
+template <> struct promote_code<int> { static const int value = 100; };
+template <> struct promote_code<unsigned int> { static const int value = 200; };
+template <> struct promote_code<long> { static const int value = 300; };
+template <> struct promote_code<unsigned long> { static const int value = 400; };
+
+template <> struct promote_code<float> { static const int value = 500; };
+template <> struct promote_code<double> { static const int value = 600; };
+template <> struct promote_code<long double> { static const int value = 700; };
+
+// TODO: wchar_t
+
+// forward delcaration of complex.
+
+} // namespace detail
+} // namespace lambda 
+} // namespace boost
+
+namespace boost { 
+namespace lambda {
+namespace detail {
+
+template <> struct promote_code< std::complex<float> > { static const int value = 800; };
+template <> struct promote_code< std::complex<double> > { static const int value = 900; };
+template <> struct promote_code< std::complex<long double> > { static const int value = 1000; };
+
+// -- int promotion -------------------------------------------
+template <class T> struct promote_to_int { typedef T type; };
+
+template <> struct promote_to_int<bool> { typedef int type; };
+template <> struct promote_to_int<char> { typedef int type; };
+template <> struct promote_to_int<unsigned char> { typedef int type; };
+template <> struct promote_to_int<signed char> { typedef int type; };
+template <> struct promote_to_int<short int> { typedef int type; };
+
+// The unsigned short int promotion rule is this:
+// unsigned short int to signed int if a signed int can hold all values 
+// of unsigned short int, otherwise go to unsigned int.
+template <> struct promote_to_int<unsigned short int>
+{ 
+        typedef
+                detail::IF<sizeof(int) <= sizeof(unsigned short int),        
+// I had the logic reversed but ">" messes up the parsing.
+                unsigned int,
+                int>::RET type; 
+};
+
+
+// TODO: think, should there be default behaviour for non-standard types?
+
+} // namespace detail
+
+// ------------------------------------------ 
+// Unary actions ----------------------------
+// ------------------------------------------ 
+
+template<class Act, class A>
+struct plain_return_type_1 {
+  typedef detail::unspecified type;
+};
+
+
+
+template<class Act, class A>
+struct plain_return_type_1<unary_arithmetic_action<Act>, A> {
+  typedef A type;
+};
+
+template<class Act, class A> 
+struct return_type_1<unary_arithmetic_action<Act>, A> { 
+  typedef 
+    typename plain_return_type_1<
+      unary_arithmetic_action<Act>,
+      typename detail::remove_reference_and_cv<A>::type
+    >::type type;
+};
+
+
+template<class A>
+struct plain_return_type_1<bitwise_action<not_action>, A> {
+  typedef A type;
+};
+
+// bitwise not, operator~()
+template<class A> struct return_type_1<bitwise_action<not_action>, A> {
+  typedef 
+    typename plain_return_type_1<
+      bitwise_action<not_action>,
+      typename detail::remove_reference_and_cv<A>::type
+    >::type type;
+};
+
+
+// prefix increment and decrement operators return 
+// their argument by default as a non-const reference
+template<class Act, class A> 
+struct plain_return_type_1<pre_increment_decrement_action<Act>, A> {
+  typedef A& type;
+};
+
+template<class Act, class A> 
+struct return_type_1<pre_increment_decrement_action<Act>, A> {
+  typedef 
+    typename plain_return_type_1<
+      pre_increment_decrement_action<Act>,
+      typename detail::remove_reference_and_cv<A>::type
+    >::type type;
+};
+
+// post decrement just returns the same plain type.
+template<class Act, class A>
+struct plain_return_type_1<post_increment_decrement_action<Act>, A> {
+  typedef A type;
+};
+
+template<class Act, class A> 
+struct return_type_1<post_increment_decrement_action<Act>, A> 
+{ 
+  typedef 
+    typename plain_return_type_1<
+      post_increment_decrement_action<Act>,
+      typename detail::remove_reference_and_cv<A>::type
+    >::type type;
+};
+
+// logical not, operator!()
+template<class A> 
+struct plain_return_type_1<logical_action<not_action>, A> {
+  typedef bool type;
+};
+
+template<class A>
+struct return_type_1<logical_action<not_action>, A> {
+  typedef 
+    typename plain_return_type_1<
+      logical_action<not_action>,
+      typename detail::remove_reference_and_cv<A>::type
+    >::type type;
+};
+
+// address of action ---------------------------------------
+
+
+template<class A> 
+struct return_type_1<other_action<addressof_action>, A> { 
+  typedef 
+    typename plain_return_type_1<
+      other_action<addressof_action>, 
+      typename detail::remove_reference_and_cv<A>::type
+    >::type type1;
+
+  // If no user defined specialization for A, then return the
+  // cv qualified pointer to A
+  typedef typename detail::IF<
+    boost::is_same<type1, detail::unspecified>::value, 
+    typename boost::remove_reference<A>::type*,
+    type1
+  >::RET type;
+};
+
+// contentsof action ------------------------------------
+
+// TODO: this deduction may lead to fail directly, 
+// (if A has no specialization for iterator_traits and has no
+// typedef A::reference.
+// There is no easy way around this, cause there doesn't seem to be a way
+// to test whether a class is an iterator or not.
+ 
+// The default works with std::iterators.
+
+namespace detail {
+
+  // A is a nonreference type
+template <class A> struct contentsof_type {
+  typedef typename boost::indirect_reference<A>::type type; 
+};
+
+  // this is since the nullary () in lambda_functor is always instantiated
+template <> struct contentsof_type<null_type> {
+  typedef detail::unspecified type;
+};
+
+
+template <class A> struct contentsof_type<const A> {
+  typedef typename contentsof_type<A>::type type;
+};
+
+template <class A> struct contentsof_type<volatile A> {
+  typedef typename contentsof_type<A>::type type;
+};
+
+template <class A> struct contentsof_type<const volatile A> {
+  typedef typename contentsof_type<A>::type type;
+};
+
+  // standard iterator traits should take care of the pointer types 
+  // but just to be on the safe side, we have the specializations here:
+  // these work even if A is cv-qualified.
+template <class A> struct contentsof_type<A*> {
+  typedef A& type;
+};
+template <class A> struct contentsof_type<A* const> {
+  typedef A& type;
+};
+template <class A> struct contentsof_type<A* volatile> {
+  typedef A& type;
+};
+template <class A> struct contentsof_type<A* const volatile> {
+  typedef A& type;
+};
+
+template<class A, int N> struct contentsof_type<A[N]> { 
+  typedef A& type; 
+};
+template<class A, int N> struct contentsof_type<const A[N]> { 
+  typedef const A& type; 
+};
+template<class A, int N> struct contentsof_type<volatile A[N]> { 
+  typedef volatile A& type; 
+};
+template<class A, int N> struct contentsof_type<const volatile A[N]> { 
+  typedef const volatile A& type; 
+};
+
+
+
+
+
+} // end detail
+
+template<class A> 
+struct return_type_1<other_action<contentsof_action>, A> { 
+
+  typedef 
+    typename plain_return_type_1<
+      other_action<contentsof_action>, 
+      typename detail::remove_reference_and_cv<A>::type
+    >::type type1;
+
+  // If no user defined specialization for A, then return the
+  // cv qualified pointer to A
+  typedef typename 
+  detail::IF_type<
+    boost::is_same<type1, detail::unspecified>::value, 
+    detail::contentsof_type<
+      typename boost::remove_reference<A>::type
+    >,
+    detail::identity_mapping<type1>
+  >::type type;
+};
+
+
+// ------------------------------------------------------------------
+// binary actions ---------------------------------------------------
+// ------------------------------------------------------------------
+
+// here the default case is: no user defined versions:
+template <class Act, class A, class B>
+struct plain_return_type_2 {
+  typedef detail::unspecified type; 
+};
+
+namespace detail {
+
+// error classes
+class illegal_pointer_arithmetic{};
+
+// pointer arithmetic type deductions ----------------------
+// value = false means that this is not a pointer arithmetic case
+// value = true means, that this can be a pointer arithmetic case, but not necessarily is
+// This means, that for user defined operators for pointer types, say for some operator+(X, *Y),
+// the deductions must be coded at an earliel level (return_type_2).
+
+template<class Act, class A, class B> 
+struct pointer_arithmetic_traits { static const bool value = false; };
+
+template<class A, class B> 
+struct pointer_arithmetic_traits<plus_action, A, B> { 
+
+  typedef typename 
+    array_to_pointer<typename boost::remove_reference<A>::type>::type AP;
+  typedef typename 
+    array_to_pointer<typename boost::remove_reference<B>::type>::type BP;
+
+  static const bool is_pointer_A = boost::is_pointer<AP>::value;
+  static const bool is_pointer_B = boost::is_pointer<BP>::value;  
+
+  static const bool value = is_pointer_A || is_pointer_B;
+
+  // can't add two pointers.
+  // note, that we do not check wether the other type is valid for 
+  // addition with a pointer.
+  // the compiler will catch it in the apply function
+
+  typedef typename 
+  detail::IF<
+    is_pointer_A && is_pointer_B, 
+      detail::return_type_deduction_failure<
+        detail::illegal_pointer_arithmetic
+      >,
+      typename detail::IF<is_pointer_A, AP, BP>::RET
+  >::RET type; 
+
+};
+
+template<class A, class B> 
+struct pointer_arithmetic_traits<minus_action, A, B> { 
+  typedef typename 
+    array_to_pointer<typename boost::remove_reference<A>::type>::type AP;
+  typedef typename 
+    array_to_pointer<typename boost::remove_reference<B>::type>::type BP;
+
+  static const bool is_pointer_A = boost::is_pointer<AP>::value;
+  static const bool is_pointer_B = boost::is_pointer<BP>::value;  
+
+  static const bool value = is_pointer_A || is_pointer_B;
+
+  static const bool same_pointer_type =
+    is_pointer_A && is_pointer_B && 
+    boost::is_same<
+      typename boost::remove_const<
+        typename boost::remove_pointer<
+          typename boost::remove_const<AP>::type
+        >::type
+      >::type,
+      typename boost::remove_const<
+        typename boost::remove_pointer<
+          typename boost::remove_const<BP>::type
+        >::type
+      >::type
+    >::value;
+
+  // ptr - ptr has type ptrdiff_t
+  // note, that we do not check if, in ptr - B, B is 
+  // valid for subtraction with a pointer.
+  // the compiler will catch it in the apply function
+
+  typedef typename 
+  detail::IF<
+    same_pointer_type, const std::ptrdiff_t,
+    typename detail::IF<
+      is_pointer_A, 
+      AP, 
+      detail::return_type_deduction_failure<detail::illegal_pointer_arithmetic>
+    >::RET
+  >::RET type; 
+};
+
+} // namespace detail
+   
+// -- arithmetic actions ---------------------------------------------
+
+namespace detail {
+   
+template<bool is_pointer_arithmetic, class Act, class A, class B> 
+struct return_type_2_arithmetic_phase_1;
+
+template<class A, class B> struct return_type_2_arithmetic_phase_2;
+template<class A, class B> struct return_type_2_arithmetic_phase_3;
+
+} // namespace detail
+  
+
+// drop any qualifiers from the argument types within arithmetic_action
+template<class A, class B, class Act> 
+struct return_type_2<arithmetic_action<Act>, A, B>
+{
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<arithmetic_action<Act>, plain_A, plain_B>::type type1;
+  
+  // if user defined return type, do not enter the whole arithmetic deductions
+  typedef typename 
+    detail::IF_type<
+      boost::is_same<type1, detail::unspecified>::value, 
+      detail::return_type_2_arithmetic_phase_1<
+         detail::pointer_arithmetic_traits<Act, A, B>::value, Act, A, B
+      >,
+      plain_return_type_2<arithmetic_action<Act>, plain_A, plain_B>
+    >::type type;
+};
+
+namespace detail {
+   
+// perform integral promotion, no pointer arithmetic
+template<bool is_pointer_arithmetic, class Act, class A, class B> 
+struct return_type_2_arithmetic_phase_1
+{
+  typedef typename 
+    return_type_2_arithmetic_phase_2<
+      typename remove_reference_and_cv<A>::type,
+      typename remove_reference_and_cv<B>::type
+    >::type type;
+};
+
+// pointer_arithmetic
+template<class Act, class A, class B> 
+struct return_type_2_arithmetic_phase_1<true, Act, A, B>
+{
+  typedef typename 
+    pointer_arithmetic_traits<Act, A, B>::type type;
+};
+
+template<class A, class B>
+struct return_type_2_arithmetic_phase_2 {
+  typedef typename
+    return_type_2_arithmetic_phase_3<
+      typename promote_to_int<A>::type, 
+      typename promote_to_int<B>::type
+    >::type type;
+};
+
+// specialization for unsigned int.
+// We only have to do these two specialization because the value promotion will
+// take care of the other cases.
+// The unsigned int promotion rule is this:
+// unsigned int to long if a long can hold all values of unsigned int,
+// otherwise go to unsigned long.
+
+// struct so I don't have to type this twice.
+struct promotion_of_unsigned_int
+{
+        typedef
+        detail::IF<sizeof(long) <= sizeof(unsigned int),        
+                unsigned long,
+                long>::RET type; 
+};
+
+template<>
+struct return_type_2_arithmetic_phase_2<unsigned int, long>
+{
+        typedef promotion_of_unsigned_int::type type;
+};
+template<>
+struct return_type_2_arithmetic_phase_2<long, unsigned int>
+{
+        typedef promotion_of_unsigned_int::type type;
+};
+
+
+template<class A, class B> struct return_type_2_arithmetic_phase_3 { 
+   enum { promote_code_A_value = promote_code<A>::value,
+         promote_code_B_value = promote_code<B>::value }; // enums for KCC
+  typedef typename
+    detail::IF<
+      promote_code_A_value == -1 || promote_code_B_value == -1,
+      detail::return_type_deduction_failure<return_type_2_arithmetic_phase_3>,
+      typename detail::IF<
+        ((int)promote_code_A_value > (int)promote_code_B_value), 
+        A, 
+        B
+      >::RET
+    >::RET type;                    
+};
+
+} // namespace detail
+
+// --  bitwise actions -------------------------------------------
+// note: for integral types deuduction is similar to arithmetic actions. 
+
+// drop any qualifiers from the argument types within arithmetic action
+template<class A, class B, class Act> 
+struct return_type_2<bitwise_action<Act>, A, B>
+{
+
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<bitwise_action<Act>, plain_A, plain_B>::type type1;
+  
+  // if user defined return type, do not enter type deductions
+  typedef typename 
+    detail::IF_type<
+      boost::is_same<type1, detail::unspecified>::value, 
+      return_type_2<arithmetic_action<plus_action>, A, B>,
+      plain_return_type_2<bitwise_action<Act>, plain_A, plain_B>
+    >::type type;
+
+  // plus_action is just a random pick, has to be a concrete instance
+
+  // TODO: This check is only valid for built-in types, overloaded types might
+  // accept floating point operators
+
+  // bitwise operators not defined for floating point types
+  // these test are not strictly needed here, since the error will be caught in
+  // the apply function
+  BOOST_STATIC_ASSERT(!(boost::is_float<plain_A>::value && boost::is_float<plain_B>::value));
+
+};
+
+namespace detail {
+
+#ifdef BOOST_NO_TEMPLATED_STREAMS
+
+template<class A, class B>
+struct leftshift_type {
+
+  typedef typename detail::IF<
+    boost::is_convertible<
+      typename boost::remove_reference<A>::type*,
+      std::ostream*
+    >::value,
+    std::ostream&, 
+    typename detail::remove_reference_and_cv<A>::type
+  >::RET type;
+};
+
+template<class A, class B>
+struct rightshift_type {
+
+  typedef typename detail::IF<
+
+    boost::is_convertible<
+      typename boost::remove_reference<A>::type*,
+      std::istream*
+    >::value, 
+    std::istream&,
+    typename detail::remove_reference_and_cv<A>::type
+  >::RET type;
+};
+
+#else
+
+template <class T> struct get_ostream_type {
+  typedef std::basic_ostream<typename T::char_type, 
+                             typename T::traits_type>& type;
+};
+
+template <class T> struct get_istream_type {
+  typedef std::basic_istream<typename T::char_type, 
+                             typename T::traits_type>& type;
+};
+
+template<class A, class B>
+struct leftshift_type {
+private:
+  typedef typename boost::remove_reference<A>::type plainA;
+public:
+  typedef typename detail::IF_type<
+    is_instance_of_2<plainA, std::basic_ostream>::value, 
+    get_ostream_type<plainA>, //reference to the stream 
+    detail::remove_reference_and_cv<A>
+  >::type type;
+};
+
+template<class A, class B>
+struct rightshift_type {
+private:
+  typedef typename boost::remove_reference<A>::type plainA;
+public:
+  typedef typename detail::IF_type<
+    is_instance_of_2<plainA, std::basic_istream>::value, 
+    get_istream_type<plainA>, //reference to the stream 
+    detail::remove_reference_and_cv<A>
+  >::type type;
+};
+
+
+#endif
+
+} // end detail
+
+// ostream
+template<class A, class B> 
+struct return_type_2<bitwise_action<leftshift_action>, A, B>
+{
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<bitwise_action<leftshift_action>, plain_A, plain_B>::type type1;
+  
+  // if user defined return type, do not enter type deductions
+  typedef typename 
+    detail::IF_type<
+      boost::is_same<type1, detail::unspecified>::value, 
+      detail::leftshift_type<A, B>,
+      plain_return_type_2<bitwise_action<leftshift_action>, plain_A, plain_B>
+    >::type type;
+};
+
+// istream
+template<class A, class B> 
+struct return_type_2<bitwise_action<rightshift_action>, A, B>
+{
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<bitwise_action<rightshift_action>, plain_A, plain_B>::type type1;
+  
+  // if user defined return type, do not enter type deductions
+  typedef typename 
+    detail::IF_type<
+      boost::is_same<type1, detail::unspecified>::value, 
+      detail::rightshift_type<A, B>,
+      plain_return_type_2<bitwise_action<rightshift_action>, plain_A, plain_B>
+    >::type type;
+};
+
+// -- logical actions ----------------------------------------
+// always bool
+// NOTE: this may not be true for some weird user-defined types,
+template<class A, class B, class Act> 
+struct plain_return_type_2<logical_action<Act>, A, B> { 
+  typedef bool type; 
+};
+
+template<class A, class B, class Act> 
+struct return_type_2<logical_action<Act>, A, B> { 
+
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<logical_action<Act>, plain_A, plain_B>::type type;
+  
+};
+
+
+// -- relational actions ----------------------------------------
+// always bool
+// NOTE: this may not be true for some weird user-defined types,
+template<class A, class B, class Act> 
+struct plain_return_type_2<relational_action<Act>, A, B> { 
+  typedef bool type; 
+};
+
+template<class A, class B, class Act> 
+struct return_type_2<relational_action<Act>, A, B> { 
+
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<relational_action<Act>, plain_A, plain_B>::type type; 
+};
+
+// Assingment actions -----------------------------------------------
+// return type is the type of the first argument as reference
+
+// note that cv-qualifiers are preserved.
+// Yes, assignment operator can be const!
+
+// NOTE: this may not be true for some weird user-defined types,
+
+template<class A, class B, class Act> 
+struct return_type_2<arithmetic_assignment_action<Act>, A, B> { 
+
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<
+      arithmetic_assignment_action<Act>, plain_A, plain_B
+    >::type type1;
+  
+  typedef typename 
+    detail::IF<
+      boost::is_same<type1, detail::unspecified>::value, 
+      typename boost::add_reference<A>::type,
+      type1
+    >::RET type;
+};
+
+template<class A, class B, class Act> 
+struct return_type_2<bitwise_assignment_action<Act>, A, B> { 
+
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<
+      bitwise_assignment_action<Act>, plain_A, plain_B
+    >::type type1;
+  
+  typedef typename 
+    detail::IF<
+      boost::is_same<type1, detail::unspecified>::value, 
+      typename boost::add_reference<A>::type,
+      type1
+    >::RET type;
+};
+
+template<class A, class B> 
+struct return_type_2<other_action<assignment_action>, A, B> { 
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<
+      other_action<assignment_action>, plain_A, plain_B
+    >::type type1;
+  
+  typedef typename 
+    detail::IF<
+      boost::is_same<type1, detail::unspecified>::value, 
+      typename boost::add_reference<A>::type,
+      type1
+    >::RET type;
+};
+
+// -- other actions ----------------------------------------
+
+// comma action ----------------------------------
+// Note: this may not be true for some weird user-defined types,
+
+// NOTE! This only tries the plain_return_type_2 layer and gives
+// detail::unspecified as default. If no such specialization is found, the 
+// type rule in the spcecialization of the return_type_2_prot is used
+// to give the type of the right argument (which can be a reference too)
+// (The built in operator, can return a l- or rvalue).
+template<class A, class B> 
+struct return_type_2<other_action<comma_action>, A, B> { 
+
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<
+      other_action<comma_action>, plain_A, plain_B
+    >::type type;
+  };
+
+// subscript action -----------------------------------------------
+
+
+namespace detail {
+  // A and B are nonreference types
+template <class A, class B> struct subscript_type {
+  typedef detail::unspecified type; 
+};
+
+template <class A, class B> struct subscript_type<A*, B> {
+  typedef A& type;
+};
+template <class A, class B> struct subscript_type<A* const, B> {
+  typedef A& type;
+};
+template <class A, class B> struct subscript_type<A* volatile, B> {
+  typedef A& type;
+};
+template <class A, class B> struct subscript_type<A* const volatile, B> {
+  typedef A& type;
+};
+
+
+template<class A, class B, int N> struct subscript_type<A[N], B> { 
+  typedef A& type; 
+};
+
+  // these 3 specializations are needed to make gcc <3 happy
+template<class A, class B, int N> struct subscript_type<const A[N], B> { 
+  typedef const A& type; 
+};
+template<class A, class B, int N> struct subscript_type<volatile A[N], B> { 
+  typedef volatile A& type; 
+};
+template<class A, class B, int N> struct subscript_type<const volatile A[N], B> { 
+  typedef const volatile A& type; 
+};
+
+} // end detail
+
+template<class A, class B>
+struct return_type_2<other_action<subscript_action>, A, B> {
+
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename boost::remove_reference<A>::type nonref_A;
+  typedef typename boost::remove_reference<B>::type nonref_B;
+
+  typedef typename 
+    plain_return_type_2<
+      other_action<subscript_action>, plain_A, plain_B
+    >::type type1;
+  
+  typedef typename 
+    detail::IF_type<
+      boost::is_same<type1, detail::unspecified>::value, 
+      detail::subscript_type<nonref_A, nonref_B>,
+      plain_return_type_2<other_action<subscript_action>, plain_A, plain_B>
+    >::type type;
+
+};
+
+template<class Key, class T, class Cmp, class Allocator, class B> 
+struct plain_return_type_2<other_action<subscript_action>, std::map<Key, T, Cmp, Allocator>, B> { 
+  typedef T& type;
+  // T == std::map<Key, T, Cmp, Allocator>::mapped_type; 
+};
+
+template<class Key, class T, class Cmp, class Allocator, class B> 
+struct plain_return_type_2<other_action<subscript_action>, std::multimap<Key, T, Cmp, Allocator>, B> { 
+  typedef T& type;
+  // T == std::map<Key, T, Cmp, Allocator>::mapped_type; 
+};
+
+  // deque
+template<class T, class Allocator, class B> 
+struct plain_return_type_2<other_action<subscript_action>, std::deque<T, Allocator>, B> { 
+  typedef typename std::deque<T, Allocator>::reference type;
+};
+template<class T, class Allocator, class B> 
+struct plain_return_type_2<other_action<subscript_action>, const std::deque<T, Allocator>, B> { 
+  typedef typename std::deque<T, Allocator>::const_reference type;
+};
+
+  // vector
+template<class T, class Allocator, class B> 
+struct plain_return_type_2<other_action<subscript_action>, std::vector<T, Allocator>, B> { 
+  typedef typename std::vector<T, Allocator>::reference type;
+};
+template<class T, class Allocator, class B> 
+struct plain_return_type_2<other_action<subscript_action>, const std::vector<T, Allocator>, B> { 
+  typedef typename std::vector<T, Allocator>::const_reference type;
+};
+
+  // basic_string
+template<class Char, class Traits, class Allocator, class B> 
+struct plain_return_type_2<other_action<subscript_action>, std::basic_string<Char, Traits, Allocator>, B> { 
+  typedef typename std::basic_string<Char, Traits, Allocator>::reference type;
+};
+template<class Char, class Traits, class Allocator, class B> 
+struct plain_return_type_2<other_action<subscript_action>, const std::basic_string<Char, Traits, Allocator>, B> { 
+  typedef typename std::basic_string<Char, Traits, Allocator>::const_reference type;
+};
+
+template<class Char, class Traits, class Allocator> 
+struct plain_return_type_2<arithmetic_action<plus_action>,
+                           std::basic_string<Char, Traits, Allocator>,
+                           std::basic_string<Char, Traits, Allocator> > { 
+  typedef std::basic_string<Char, Traits, Allocator> type;
+};
+
+template<class Char, class Traits, class Allocator> 
+struct plain_return_type_2<arithmetic_action<plus_action>,
+                           const Char*,
+                           std::basic_string<Char, Traits, Allocator> > { 
+  typedef std::basic_string<Char, Traits, Allocator> type;
+};
+
+template<class Char, class Traits, class Allocator> 
+struct plain_return_type_2<arithmetic_action<plus_action>,
+                           std::basic_string<Char, Traits, Allocator>,
+                           const Char*> { 
+  typedef std::basic_string<Char, Traits, Allocator> type;
+};
+
+template<class Char, class Traits, class Allocator, std::size_t N> 
+struct plain_return_type_2<arithmetic_action<plus_action>,
+                           Char[N],
+                           std::basic_string<Char, Traits, Allocator> > { 
+  typedef std::basic_string<Char, Traits, Allocator> type;
+};
+
+template<class Char, class Traits, class Allocator, std::size_t N> 
+struct plain_return_type_2<arithmetic_action<plus_action>,
+                           std::basic_string<Char, Traits, Allocator>,
+                           Char[N]> { 
+  typedef std::basic_string<Char, Traits, Allocator> type;
+};
+
+
+} // namespace lambda
+} // namespace boost
+
+#endif
+
+
diff --git a/ext/boost/lambda/detail/operators.hpp b/ext/boost/lambda/detail/operators.hpp
new file mode 100644
index 0000000..149e1ee
--- /dev/null
+++ b/ext/boost/lambda/detail/operators.hpp
@@ -0,0 +1,370 @@
+// Boost Lambda Library - operators.hpp --------------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+// ---------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_OPERATORS_HPP
+#define BOOST_LAMBDA_OPERATORS_HPP
+
+#include "boost/lambda/detail/is_instance_of.hpp"
+
+namespace boost { 
+namespace lambda {
+
+#if defined BOOST_LAMBDA_BE1
+#error "Multiple defines of BOOST_LAMBDA_BE1"
+#endif
+
+  // For all BOOSTA_LAMBDA_BE* macros:
+
+  // CONSTA must be either 'A' or 'const A'
+  // CONSTB must be either 'B' or 'const B'
+
+  // It is stupid to have the names A and B as macro arguments, but it avoids
+  // the need to pass in emtpy macro arguments, which gives warnings on some
+  // compilers
+
+#define BOOST_LAMBDA_BE1(OPER_NAME, ACTION, CONSTA, CONSTB, CONVERSION)      \
+template<class Arg, class B>                                                 \
+inline const                                                                 \
+lambda_functor<                                                              \
+  lambda_functor_base<                                                       \
+    ACTION,                                                                  \
+    tuple<lambda_functor<Arg>, typename const_copy_argument <CONSTB>::type>  \
+  >                                                                          \
+>                                                                            \
+OPER_NAME (const lambda_functor<Arg>& a, CONSTB& b) {                      \
+  return                                                                     \
+    lambda_functor_base<                                                     \
+      ACTION,                                                                \
+      tuple<lambda_functor<Arg>, typename const_copy_argument <CONSTB>::type>\
+    >                                                                        \
+   (tuple<lambda_functor<Arg>, typename const_copy_argument <CONSTB>::type>(a, b)); \
+}
+
+
+#if defined BOOST_LAMBDA_BE2
+#error "Multiple defines of BOOST_LAMBDA_BE2"
+#endif
+
+#define BOOST_LAMBDA_BE2(OPER_NAME, ACTION, CONSTA, CONSTB, CONVERSION)      \
+template<class A, class Arg>                                                 \
+inline const                                                                 \
+lambda_functor<                                                              \
+  lambda_functor_base<                                                       \
+    ACTION,                                                                  \
+    tuple<typename CONVERSION <CONSTA>::type, lambda_functor<Arg> >        \
+  >                                                                          \
+>                                                                            \
+OPER_NAME (CONSTA& a, const lambda_functor<Arg>& b) {                      \
+  return                                                                     \
+    lambda_functor_base<                                                     \
+      ACTION,                                                                \
+      tuple<typename CONVERSION <CONSTA>::type, lambda_functor<Arg> >      \
+    >                                                                        \
+  (tuple<typename CONVERSION <CONSTA>::type, lambda_functor<Arg> >(a, b)); \
+}
+
+
+#if defined BOOST_LAMBDA_BE3
+#error "Multiple defines of BOOST_LAMBDA_BE3"
+#endif
+
+#define BOOST_LAMBDA_BE3(OPER_NAME, ACTION, CONSTA, CONSTB, CONVERSION)    \
+template<class ArgA, class ArgB>                                           \
+inline const                                                               \
+lambda_functor<                                                            \
+  lambda_functor_base<                                                     \
+    ACTION,                                                                \
+    tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >                     \
+  >                                                                        \
+>                                                                          \
+OPER_NAME (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { \
+  return                                                                   \
+    lambda_functor_base<                                                   \
+      ACTION,                                                              \
+      tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >                   \
+    >                                                                      \
+  (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b));              \
+}
+
+#if defined BOOST_LAMBDA_BE
+#error "Multiple defines of BOOST_LAMBDA_BE"
+#endif
+
+#define BOOST_LAMBDA_BE(OPER_NAME, ACTION, CONSTA, CONSTB, CONST_CONVERSION) \
+BOOST_LAMBDA_BE1(OPER_NAME, ACTION, CONSTA, CONSTB, CONST_CONVERSION)        \
+BOOST_LAMBDA_BE2(OPER_NAME, ACTION, CONSTA, CONSTB, CONST_CONVERSION)        \
+BOOST_LAMBDA_BE3(OPER_NAME, ACTION, CONSTA, CONSTB, CONST_CONVERSION)
+
+#define BOOST_LAMBDA_EMPTY() 
+
+BOOST_LAMBDA_BE(operator+, arithmetic_action<plus_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator-, arithmetic_action<minus_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator*, arithmetic_action<multiply_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator/, arithmetic_action<divide_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator%, arithmetic_action<remainder_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator<<, bitwise_action<leftshift_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator>>, bitwise_action<rightshift_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator&, bitwise_action<and_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator|, bitwise_action<or_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator^, bitwise_action<xor_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator&&, logical_action<and_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator||, logical_action<or_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator<, relational_action<less_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator>, relational_action<greater_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator<=, relational_action<lessorequal_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator>=, relational_action<greaterorequal_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator==, relational_action<equal_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator!=, relational_action<notequal_action>, const A, const B, const_copy_argument)
+
+BOOST_LAMBDA_BE(operator+=, arithmetic_assignment_action<plus_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator-=, arithmetic_assignment_action<minus_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator*=, arithmetic_assignment_action<multiply_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator/=, arithmetic_assignment_action<divide_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator%=, arithmetic_assignment_action<remainder_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator<<=, bitwise_assignment_action<leftshift_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator>>=, bitwise_assignment_action<rightshift_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator&=, bitwise_assignment_action<and_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator|=, bitwise_assignment_action<or_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator^=, bitwise_assignment_action<xor_action>, A, const B, reference_argument)
+
+
+// A special trick for comma operator for correct preprocessing
+#if defined BOOST_LAMBDA_COMMA_OPERATOR_NAME
+#error "Multiple defines of BOOST_LAMBDA_COMMA_OPERATOR_NAME"
+#endif
+
+#define BOOST_LAMBDA_COMMA_OPERATOR_NAME operator,
+
+BOOST_LAMBDA_BE1(BOOST_LAMBDA_COMMA_OPERATOR_NAME, other_action<comma_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE2(BOOST_LAMBDA_COMMA_OPERATOR_NAME, other_action<comma_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE3(BOOST_LAMBDA_COMMA_OPERATOR_NAME, other_action<comma_action>, const A, const B, const_copy_argument)
+
+
+
+namespace detail {
+
+// special cases for ostream& << Any and istream& >> Any ---------------
+// the actual stream classes may vary and thus a specialisation for, 
+// say ostream& does not match (the general case above is chosen). 
+// Therefore we specialise for non-const reference:
+// if the left argument is a stream, we store the stream as reference
+// if it is something else, we store a const plain by default
+
+// Note that the overloading is const vs. non-const first argument
+
+#ifdef BOOST_NO_TEMPLATED_STREAMS
+template<class T> struct convert_ostream_to_ref_others_to_c_plain_by_default {
+  typedef typename detail::IF<
+                       boost::is_convertible<T*, std::ostream*>::value,
+                       T&,
+                       typename const_copy_argument <T>::type
+                     >::RET type;
+};
+
+template<class T> struct convert_istream_to_ref_others_to_c_plain_by_default {
+  typedef typename detail::IF<
+                       boost::is_convertible<T*, std::istream*>::value,
+                       T&,
+                       typename const_copy_argument <T>::type
+                     >::RET type;
+};
+#else
+
+template<class T> struct convert_ostream_to_ref_others_to_c_plain_by_default {
+  typedef typename detail::IF<
+                       is_instance_of_2<
+                         T, std::basic_ostream
+                       >::value,
+                       T&,
+                       typename const_copy_argument <T>::type
+                     >::RET type;
+};
+
+template<class T> struct convert_istream_to_ref_others_to_c_plain_by_default {
+  typedef typename detail::IF<
+                       is_instance_of_2<
+                         T, std::basic_istream
+                       >::value,
+                       T&,
+                       typename const_copy_argument <T>::type
+                     >::RET type;
+};
+#endif
+
+} // detail
+
+BOOST_LAMBDA_BE2(operator<<, bitwise_action< leftshift_action>, A, const B, detail::convert_ostream_to_ref_others_to_c_plain_by_default)
+BOOST_LAMBDA_BE2(operator>>, bitwise_action< rightshift_action>, A, const B, detail::convert_istream_to_ref_others_to_c_plain_by_default)      
+
+
+// special case for io_manipulators.
+// function references cannot be given as arguments to lambda operator
+// expressions in general. With << and >> the use of manipulators is
+// so common, that specializations are provided to make them work.
+
+template<class Arg, class Ret, class ManipArg>
+inline const 
+lambda_functor<
+  lambda_functor_base<
+    bitwise_action<leftshift_action>,
+    tuple<lambda_functor<Arg>, Ret(&)(ManipArg)> 
+  > 
+>
+operator<<(const lambda_functor<Arg>& a, Ret(&b)(ManipArg))
+{
+  return 
+      lambda_functor_base<
+        bitwise_action<leftshift_action>,
+        tuple<lambda_functor<Arg>, Ret(&)(ManipArg)>
+      > 
+    ( tuple<lambda_functor<Arg>, Ret(&)(ManipArg)>(a, b) );
+}
+
+template<class Arg, class Ret, class ManipArg>
+inline const 
+lambda_functor<
+  lambda_functor_base<
+    bitwise_action<rightshift_action>,
+    tuple<lambda_functor<Arg>, Ret(&)(ManipArg)>
+  > 
+>
+operator>>(const lambda_functor<Arg>& a, Ret(&b)(ManipArg))
+{
+  return 
+      lambda_functor_base<
+        bitwise_action<rightshift_action>,
+        tuple<lambda_functor<Arg>, Ret(&)(ManipArg)>
+      > 
+    ( tuple<lambda_functor<Arg>, Ret(&)(ManipArg)>(a, b) );
+}
+
+
+// (+ and -) take their arguments as const references. 
+// This has consquences with pointer artihmetic
+// E.g int a[]; ... *a = 1 works but not *(a+1) = 1. 
+// the result of a+1 would be const
+// To make the latter work too, 
+// non-const arrays are taken as non-const and stored as non-const as well.
+#if defined  BOOST_LAMBDA_PTR_ARITHMETIC_E1
+#error "Multiple defines of  BOOST_LAMBDA_PTR_ARITHMETIC_E1"
+#endif
+
+#define BOOST_LAMBDA_PTR_ARITHMETIC_E1(OPER_NAME, ACTION, CONSTB)           \
+template<class Arg, int N, class B>                                         \
+inline const                                                                \
+lambda_functor<                                                             \
+  lambda_functor_base<ACTION, tuple<lambda_functor<Arg>, CONSTB(&)[N]> >    \
+>                                                                           \
+OPER_NAME (const lambda_functor<Arg>& a, CONSTB(&b)[N])                     \
+{                                                                           \
+  return                                                                    \
+    lambda_functor_base<ACTION, tuple<lambda_functor<Arg>, CONSTB(&)[N]> >  \
+  (tuple<lambda_functor<Arg>, CONSTB(&)[N]>(a, b));                         \
+}
+
+
+#if defined  BOOST_LAMBDA_PTR_ARITHMETIC_E2
+#error "Multiple defines of  BOOST_LAMBDA_PTR_ARITHMETIC_E2"
+#endif
+
+#define BOOST_LAMBDA_PTR_ARITHMETIC_E2(OPER_NAME, ACTION, CONSTA)           \
+template<int N, class A, class Arg>                                         \
+inline const                                                                \
+lambda_functor<                                                             \
+  lambda_functor_base<ACTION, tuple<CONSTA(&)[N], lambda_functor<Arg> > >   \
+>                                                                           \
+OPER_NAME (CONSTA(&a)[N], const lambda_functor<Arg>& b)                     \
+{                                                                           \
+  return                                                                    \
+    lambda_functor_base<ACTION, tuple<CONSTA(&)[N], lambda_functor<Arg> > > \
+    (tuple<CONSTA(&)[N], lambda_functor<Arg> >(a, b));                      \
+}
+
+
+BOOST_LAMBDA_PTR_ARITHMETIC_E1(operator+, arithmetic_action<plus_action>, B)
+BOOST_LAMBDA_PTR_ARITHMETIC_E2(operator+, arithmetic_action<plus_action>, A)
+BOOST_LAMBDA_PTR_ARITHMETIC_E1(operator+, arithmetic_action<plus_action>,const B)
+BOOST_LAMBDA_PTR_ARITHMETIC_E2(operator+, arithmetic_action<plus_action>,const A)
+
+
+//BOOST_LAMBDA_PTR_ARITHMETIC_E1(operator-, arithmetic_action<minus_action>)
+// This is not needed, since the result of ptr-ptr is an rvalue anyway
+
+BOOST_LAMBDA_PTR_ARITHMETIC_E2(operator-, arithmetic_action<minus_action>, A)
+BOOST_LAMBDA_PTR_ARITHMETIC_E2(operator-, arithmetic_action<minus_action>, const A)
+
+
+#undef BOOST_LAMBDA_BE1
+#undef BOOST_LAMBDA_BE2
+#undef BOOST_LAMBDA_BE3
+#undef BOOST_LAMBDA_BE
+#undef BOOST_LAMBDA_COMMA_OPERATOR_NAME
+
+#undef BOOST_LAMBDA_PTR_ARITHMETIC_E1
+#undef BOOST_LAMBDA_PTR_ARITHMETIC_E2
+
+
+// ---------------------------------------------------------------------
+// unary operators -----------------------------------------------------
+// ---------------------------------------------------------------------
+
+#if defined BOOST_LAMBDA_UE
+#error "Multiple defines of BOOST_LAMBDA_UE"
+#endif
+
+#define BOOST_LAMBDA_UE(OPER_NAME, ACTION)                                 \
+template<class Arg>                                                        \
+inline const                                                               \
+lambda_functor<lambda_functor_base<ACTION, tuple<lambda_functor<Arg> > > > \
+OPER_NAME (const lambda_functor<Arg>& a)                                   \
+{                                                                          \
+  return                                                                   \
+    lambda_functor_base<ACTION, tuple<lambda_functor<Arg> > >              \
+    ( tuple<lambda_functor<Arg> >(a) );                                    \
+}
+
+
+BOOST_LAMBDA_UE(operator+, unary_arithmetic_action<plus_action>)
+BOOST_LAMBDA_UE(operator-, unary_arithmetic_action<minus_action>)
+BOOST_LAMBDA_UE(operator~, bitwise_action<not_action>)
+BOOST_LAMBDA_UE(operator!, logical_action<not_action>)
+BOOST_LAMBDA_UE(operator++, pre_increment_decrement_action<increment_action>)
+BOOST_LAMBDA_UE(operator--, pre_increment_decrement_action<decrement_action>)
+BOOST_LAMBDA_UE(operator*, other_action<contentsof_action>)
+BOOST_LAMBDA_UE(operator&, other_action<addressof_action>)
+
+#if defined BOOST_LAMBDA_POSTFIX_UE
+#error "Multiple defines of BOOST_LAMBDA_POSTFIX_UE"
+#endif
+
+#define BOOST_LAMBDA_POSTFIX_UE(OPER_NAME, ACTION)                         \
+template<class Arg>                                                        \
+inline const                                                               \
+lambda_functor<lambda_functor_base<ACTION, tuple<lambda_functor<Arg> > > > \
+OPER_NAME (const lambda_functor<Arg>& a, int)                              \
+{                                                                          \
+  return                                                                   \
+    lambda_functor_base<ACTION, tuple<lambda_functor<Arg> > >              \
+    ( tuple<lambda_functor<Arg> >(a) );                                    \
+}
+
+
+BOOST_LAMBDA_POSTFIX_UE(operator++, post_increment_decrement_action<increment_action>)
+BOOST_LAMBDA_POSTFIX_UE(operator--, post_increment_decrement_action<decrement_action>)
+
+#undef BOOST_LAMBDA_UE
+#undef BOOST_LAMBDA_POSTFIX_UE
+
+} // namespace lambda
+} // namespace boost
+
+#endif
diff --git a/ext/boost/lambda/detail/ret.hpp b/ext/boost/lambda/detail/ret.hpp
new file mode 100644
index 0000000..fbd8b3a
--- /dev/null
+++ b/ext/boost/lambda/detail/ret.hpp
@@ -0,0 +1,325 @@
+// Boost Lambda Library  ret.hpp -----------------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+
+#ifndef BOOST_LAMBDA_RET_HPP
+#define BOOST_LAMBDA_RET_HPP
+
+namespace boost { 
+namespace lambda {
+
+  // TODO:
+
+//  Add specializations for function references for ret, protect and unlambda
+//  e.g void foo(); unlambda(foo); fails, as it would add a const qualifier
+  // for a function type. 
+  // on the other hand unlambda(*foo) does work
+
+
+// -- ret -------------------------
+// the explicit return type template 
+
+  // TODO: It'd be nice to make ret a nop for other than lambda functors
+  // but causes an ambiguiyty with gcc (not with KCC), check what is the
+  // right interpretation.
+
+  //  // ret for others than lambda functors has no effect
+  // template <class U, class T>
+  // inline const T& ret(const T& t) { return t; }
+
+
+template<class RET, class Arg>
+inline const 
+lambda_functor<
+  lambda_functor_base<
+    explicit_return_type_action<RET>, 
+    tuple<lambda_functor<Arg> >
+  > 
+>
+ret(const lambda_functor<Arg>& a1)
+{
+  return  
+    lambda_functor_base<
+      explicit_return_type_action<RET>, 
+      tuple<lambda_functor<Arg> >
+    > 
+    (tuple<lambda_functor<Arg> >(a1));
+}
+
+// protect ------------------
+
+  // protecting others than lambda functors has no effect
+template <class T>
+inline const T& protect(const T& t) { return t; }
+
+template<class Arg>
+inline const 
+lambda_functor<
+  lambda_functor_base<
+    protect_action, 
+    tuple<lambda_functor<Arg> >
+  > 
+>
+protect(const lambda_functor<Arg>& a1)
+{
+  return 
+      lambda_functor_base<
+        protect_action, 
+        tuple<lambda_functor<Arg> >
+      > 
+    (tuple<lambda_functor<Arg> >(a1));
+}
+   
+// -------------------------------------------------------------------
+
+// Hides the lambda functorness of a lambda functor. 
+// After this, the functor is immune to argument substitution, etc.
+// This can be used, e.g. to make it safe to pass lambda functors as 
+// arguments to functions, which might use them as target functions
+
+// note, unlambda and protect are different things. Protect hides the lambda
+// functor for one application, unlambda for good.
+
+template <class LambdaFunctor>
+class non_lambda_functor
+{
+  LambdaFunctor lf;
+public:
+  
+  // This functor defines the result_type typedef.
+  // The result type must be deducible without knowing the arguments
+
+  template <class SigArgs> struct sig {
+    typedef typename 
+      LambdaFunctor::inherited:: 
+        template sig<typename SigArgs::tail_type>::type type;
+  };
+
+  explicit non_lambda_functor(const LambdaFunctor& a) : lf(a) {}
+
+  typename LambdaFunctor::nullary_return_type  
+  operator()() const {
+    return lf.template 
+      call<typename LambdaFunctor::nullary_return_type>
+        (cnull_type(), cnull_type(), cnull_type(), cnull_type()); 
+  }
+
+  template<class A>
+  typename sig<tuple<const non_lambda_functor, A&> >::type 
+  operator()(A& a) const {
+    return lf.template call<typename sig<tuple<const non_lambda_functor, A&> >::type >(a, cnull_type(), cnull_type(), cnull_type()); 
+  }
+
+  template<class A, class B>
+  typename sig<tuple<const non_lambda_functor, A&, B&> >::type 
+  operator()(A& a, B& b) const {
+    return lf.template call<typename sig<tuple<const non_lambda_functor, A&, B&> >::type >(a, b, cnull_type(), cnull_type()); 
+  }
+
+  template<class A, class B, class C>
+  typename sig<tuple<const non_lambda_functor, A&, B&, C&> >::type 
+  operator()(A& a, B& b, C& c) const {
+    return lf.template call<typename sig<tuple<const non_lambda_functor, A&, B&, C&> >::type>(a, b, c, cnull_type()); 
+  }
+};
+
+template <class Arg>
+inline const Arg& unlambda(const Arg& a) { return a; }
+
+template <class Arg>
+inline const non_lambda_functor<lambda_functor<Arg> > 
+unlambda(const lambda_functor<Arg>& a)
+{
+  return non_lambda_functor<lambda_functor<Arg> >(a);
+}
+
+  // Due to a language restriction, lambda functors cannot be made to
+  // accept non-const rvalue arguments. Usually iterators do not return 
+  // temporaries, but sometimes they do. That's why a workaround is provided.
+  // Note, that this potentially breaks const correctness, so be careful!
+
+// any lambda functor can be turned into a const_incorrect_lambda_functor
+// The operator() takes arguments as consts and then casts constness
+// away. So this breaks const correctness!!! but is a necessary workaround
+// in some cases due to language limitations.
+// Note, that this is not a lambda_functor anymore, so it can not be used
+// as a sub lambda expression.
+
+template <class LambdaFunctor>
+struct const_incorrect_lambda_functor {
+  LambdaFunctor lf;
+public:
+
+  explicit const_incorrect_lambda_functor(const LambdaFunctor& a) : lf(a) {}
+
+  template <class SigArgs> struct sig {
+    typedef typename
+      LambdaFunctor::inherited::template 
+        sig<typename SigArgs::tail_type>::type type;
+  };
+
+  // The nullary case is not needed (no arguments, no parameter type problems)
+
+  template<class A>
+  typename sig<tuple<const const_incorrect_lambda_functor, A&> >::type
+  operator()(const A& a) const {
+    return lf.template call<typename sig<tuple<const const_incorrect_lambda_functor, A&> >::type >(const_cast<A&>(a), cnull_type(), cnull_type(), cnull_type());
+  }
+
+  template<class A, class B>
+  typename sig<tuple<const const_incorrect_lambda_functor, A&, B&> >::type
+  operator()(const A& a, const B& b) const {
+    return lf.template call<typename sig<tuple<const const_incorrect_lambda_functor, A&, B&> >::type >(const_cast<A&>(a), const_cast<B&>(b), cnull_type(), cnull_type());
+  }
+
+  template<class A, class B, class C>
+  typename sig<tuple<const const_incorrect_lambda_functor, A&, B&, C&> >::type
+  operator()(const A& a, const B& b, const C& c) const {
+    return lf.template call<typename sig<tuple<const const_incorrect_lambda_functor, A&, B&, C&> >::type>(const_cast<A&>(a), const_cast<B&>(b), const_cast<C&>(c), cnull_type());
+  }
+};
+
+// ------------------------------------------------------------------------
+// any lambda functor can be turned into a const_parameter_lambda_functor
+// The operator() takes arguments as const.
+// This is useful if lambda functors are called with non-const rvalues.
+// Note, that this is not a lambda_functor anymore, so it can not be used
+// as a sub lambda expression.
+
+template <class LambdaFunctor>
+struct const_parameter_lambda_functor {
+  LambdaFunctor lf;
+public:
+
+  explicit const_parameter_lambda_functor(const LambdaFunctor& a) : lf(a) {}
+
+  template <class SigArgs> struct sig {
+    typedef typename
+      LambdaFunctor::inherited::template 
+        sig<typename SigArgs::tail_type>::type type;
+  };
+
+  // The nullary case is not needed: no arguments, no constness problems.
+
+  template<class A>
+  typename sig<tuple<const const_parameter_lambda_functor, const A&> >::type
+  operator()(const A& a) const {
+    return lf.template call<typename sig<tuple<const const_parameter_lambda_functor, const A&> >::type >(a, cnull_type(), cnull_type(), cnull_type());
+  }
+
+  template<class A, class B>
+  typename sig<tuple<const const_parameter_lambda_functor, const A&, const B&> >::type
+  operator()(const A& a, const B& b) const {
+    return lf.template call<typename sig<tuple<const const_parameter_lambda_functor, const A&, const B&> >::type >(a, b, cnull_type(), cnull_type());
+  }
+
+  template<class A, class B, class C>
+  typename sig<tuple<const const_parameter_lambda_functor, const A&, const B&, const C&>
+>::type
+  operator()(const A& a, const B& b, const C& c) const {
+    return lf.template call<typename sig<tuple<const const_parameter_lambda_functor, const A&, const B&, const C&> >::type>(a, b, c, cnull_type());
+  }
+};
+
+template <class Arg>
+inline const const_incorrect_lambda_functor<lambda_functor<Arg> >
+break_const(const lambda_functor<Arg>& lf)
+{
+  return const_incorrect_lambda_functor<lambda_functor<Arg> >(lf);
+}
+
+
+template <class Arg>
+inline const const_parameter_lambda_functor<lambda_functor<Arg> >
+const_parameters(const lambda_functor<Arg>& lf)
+{
+  return const_parameter_lambda_functor<lambda_functor<Arg> >(lf);
+}
+
+// make void ------------------------------------------------
+// make_void( x ) turns a lambda functor x with some return type y into
+// another lambda functor, which has a void return type
+// when called, the original return type is discarded
+
+// we use this action. The action class will be called, which means that
+// the wrapped lambda functor is evaluated, but we just don't do anything
+// with the result.
+struct voidifier_action {
+  template<class Ret, class A> static void apply(A&) {}
+};
+
+template<class Args> struct return_type_N<voidifier_action, Args> {
+  typedef void type;
+};
+
+template<class Arg1>
+inline const 
+lambda_functor<
+  lambda_functor_base<
+    action<1, voidifier_action>,
+    tuple<lambda_functor<Arg1> >
+  > 
+> 
+make_void(const lambda_functor<Arg1>& a1) { 
+return 
+    lambda_functor_base<
+      action<1, voidifier_action>,
+      tuple<lambda_functor<Arg1> >
+    > 
+  (tuple<lambda_functor<Arg1> > (a1));
+}
+
+// for non-lambda functors, make_void does nothing 
+// (the argument gets evaluated immediately)
+
+template<class Arg1>
+inline const 
+lambda_functor<
+  lambda_functor_base<do_nothing_action, null_type> 
+> 
+make_void(const Arg1& a1) { 
+return 
+    lambda_functor_base<do_nothing_action, null_type>();
+}
+
+// std_functor -----------------------------------------------------
+
+//  The STL uses the result_type typedef as the convention to let binders know
+//  the return type of a function object. 
+//  LL uses the sig template.
+//  To let LL know that the function object has the result_type typedef 
+//  defined, it can be wrapped with the std_functor function.
+
+
+// Just inherit form the template parameter (the standard functor), 
+// and provide a sig template. So we have a class which is still the
+// same functor + the sig template.
+
+template<class T>
+struct result_type_to_sig : public T {
+  template<class Args> struct sig { typedef typename T::result_type type; };
+  result_type_to_sig(const T& t) : T(t) {}
+};
+
+template<class F>
+inline result_type_to_sig<F> std_functor(const F& f) { return f; }
+
+
+} // namespace lambda 
+} // namespace boost
+
+#endif
+
+
+
+
+
+
+
diff --git a/ext/boost/lambda/detail/return_type_traits.hpp b/ext/boost/lambda/detail/return_type_traits.hpp
new file mode 100644
index 0000000..bf2394e
--- /dev/null
+++ b/ext/boost/lambda/detail/return_type_traits.hpp
@@ -0,0 +1,282 @@
+//  return_type_traits.hpp -- Boost Lambda Library ---------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+
+#ifndef BOOST_LAMBDA_RETURN_TYPE_TRAITS_HPP
+#define BOOST_LAMBDA_RETURN_TYPE_TRAITS_HPP
+
+#include "boost/mpl/has_xxx.hpp"
+
+#include <cstddef> // needed for the ptrdiff_t
+
+namespace boost { 
+namespace lambda {
+
+using ::boost::type_traits::ice_and;
+using ::boost::type_traits::ice_or;
+using ::boost::type_traits::ice_not;
+
+// Much of the type deduction code for standard arithmetic types 
+// from Gary Powell
+
+  // different arities:
+template <class Act, class A1> struct return_type_1; // 1-ary actions
+template <class Act, class A1, class A2> struct return_type_2; // 2-ary
+template <class Act, class Args> struct return_type_N; // >3- ary
+
+template <class Act, class A1> struct return_type_1_prot;
+template <class Act, class A1, class A2> struct return_type_2_prot; // 2-ary
+template <class Act, class A1> struct return_type_N_prot; // >3-ary
+
+
+namespace detail {
+
+template<class> class return_type_deduction_failure {};
+
+  // In some cases return type deduction should fail (an invalid lambda 
+  // expression). Sometimes the lambda expression can be ok, the return type
+  // just is not deducible (user defined operators). Then return type deduction
+  // should never be entered at all, and the use of ret<> does this.
+  // However, for nullary lambda functors, return type deduction is always
+  // entered, and there seems to be no way around this.
+
+  // (the return type is part of the prototype of the non-template
+  // operator()(). The prototype is instantiated, even though the body 
+  // is not.) 
+ 
+  // So, in the case the return type deduction should fail, it should not
+  // fail directly, but rather result in a valid but wrong return type,
+  // causing a compile time error only if the function is really called.
+
+
+
+} // end detail
+
+
+
+// return_type_X_prot classes --------------------------------------------
+// These classes are the first layer that gets instantiated from the 
+// lambda_functor_base sig templates. It will check whether 
+// the action is protectable and one of arguments is "protected" or its
+// evaluation will otherwise result in another lambda functor.
+// If this is a case, the result type will be another lambda functor.
+
+// The arguments are always non-reference types, except for comma action
+// where the right argument can be a reference too. This is because it 
+// matters (in the builtin case) whether the argument is an lvalue or 
+// rvalue: int i; i, 1 -> rvalue; 1, i -> lvalue
+
+template <class Act, class A> struct return_type_1_prot {
+public:
+  typedef typename 
+    detail::IF<
+  //      is_protectable<Act>::value && is_lambda_functor<A>::value,
+      ice_and<is_protectable<Act>::value, is_lambda_functor<A>::value>::value,
+      lambda_functor<
+        lambda_functor_base< 
+          Act, 
+          tuple<typename detail::remove_reference_and_cv<A>::type>
+        >
+      >,
+      typename return_type_1<Act, A>::type
+    >::RET type;  
+};
+
+  // take care of the unavoidable instantiation for nullary case
+template<class Act> struct return_type_1_prot<Act, null_type> {
+  typedef null_type type;
+};
+ 
+// Unary actions (result from unary operators)
+// do not have a default return type.
+template<class Act, class A> struct return_type_1 { 
+   typedef typename 
+     detail::return_type_deduction_failure<return_type_1> type;
+};
+
+
+namespace detail {
+
+  template <class T>
+  class protect_conversion {
+      typedef typename boost::remove_reference<T>::type non_ref_T;
+    public:
+
+  // add const to rvalues, so that all rvalues are stored as const in 
+  // the args tuple
+    typedef typename detail::IF_type<
+//      boost::is_reference<T>::value && !boost::is_const<non_ref_T>::value,
+      ice_and<boost::is_reference<T>::value,
+              ice_not<boost::is_const<non_ref_T>::value>::value>::value,
+      detail::identity_mapping<T>,
+      const_copy_argument<non_ref_T> // handles funtion and array 
+    >::type type;                      // types correctly
+  };
+
+} // end detail
+
+template <class Act, class A, class B> struct return_type_2_prot {
+
+// experimental feature
+  // We may have a lambda functor as a result type of a subexpression 
+  // (if protect) has  been used.
+  // Thus, if one of the parameter types is a lambda functor, the result
+  // is a lambda functor as well. 
+  // We need to make a conservative choise here.
+  // The resulting lambda functor stores all const reference arguments as
+  // const copies. References to non-const are stored as such.
+  // So if the source of the argument is a const open argument, a bound
+  // argument stored as a const reference, or a function returning a 
+  // const reference, that information is lost. There is no way of 
+  // telling apart 'real const references' from just 'LL internal
+  // const references' (or it would be really hard)
+
+  // The return type is a subclass of lambda_functor, which has a converting 
+  // copy constructor. It can copy any lambda functor, that has the same 
+  // action type and code, and a copy compatible argument tuple.
+
+
+  typedef typename boost::remove_reference<A>::type non_ref_A;
+  typedef typename boost::remove_reference<B>::type non_ref_B;
+
+typedef typename 
+  detail::IF<
+//    is_protectable<Act>::value &&
+//      (is_lambda_functor<A>::value || is_lambda_functor<B>::value),
+    ice_and<is_protectable<Act>::value,
+            ice_or<is_lambda_functor<A>::value, 
+                   is_lambda_functor<B>::value>::value>::value,
+    lambda_functor<
+      lambda_functor_base< 
+        Act, 
+        tuple<typename detail::protect_conversion<A>::type, 
+              typename detail::protect_conversion<B>::type>
+      >
+    >,
+    typename return_type_2<Act, non_ref_A, non_ref_B>::type
+  >::RET type;
+};
+
+  // take care of the unavoidable instantiation for nullary case
+template<class Act> struct return_type_2_prot<Act, null_type, null_type> {
+  typedef null_type type;
+};
+  // take care of the unavoidable instantiation for nullary case
+template<class Act, class Other> struct return_type_2_prot<Act, Other, null_type> {
+  typedef null_type type;
+};
+  // take care of the unavoidable instantiation for nullary case
+template<class Act, class Other> struct return_type_2_prot<Act, null_type, Other> {
+  typedef null_type type;
+};
+
+  // comma is a special case, as the user defined operator can return
+  // an lvalue (reference) too, hence it must be handled at this level.
+template<class A, class B> 
+struct return_type_2_comma
+{
+  typedef typename boost::remove_reference<A>::type non_ref_A;
+  typedef typename boost::remove_reference<B>::type non_ref_B;
+
+typedef typename 
+  detail::IF<
+//  is_protectable<other_action<comma_action> >::value && // it is protectable
+//  (is_lambda_functor<A>::value || is_lambda_functor<B>::value),
+    ice_and<is_protectable<other_action<comma_action> >::value, // it is protectable
+            ice_or<is_lambda_functor<A>::value, 
+                   is_lambda_functor<B>::value>::value>::value,
+    lambda_functor<
+      lambda_functor_base< 
+        other_action<comma_action>, 
+        tuple<typename detail::protect_conversion<A>::type, 
+              typename detail::protect_conversion<B>::type>
+      >
+    >,
+    typename 
+      return_type_2<other_action<comma_action>, non_ref_A, non_ref_B>::type
+  >::RET type1;
+
+   // if no user defined return_type_2 (or plain_return_type_2) specialization
+  // matches, then return the righthand argument
+  typedef typename 
+    detail::IF<
+      boost::is_same<type1, detail::unspecified>::value, 
+      B,
+      type1
+    >::RET type;
+
+};
+
+
+  // currently there are no protectable actions with > 2 args
+
+template<class Act, class Args> struct return_type_N_prot {
+  typedef typename return_type_N<Act, Args>::type type;
+};
+
+  // take care of the unavoidable instantiation for nullary case
+template<class Act> struct return_type_N_prot<Act, null_type> {
+  typedef null_type type;
+};
+
+// handle different kind of actions ------------------------
+
+  // use the return type given in the bind invocation as bind<Ret>(...)
+template<int I, class Args, class Ret> 
+struct return_type_N<function_action<I, Ret>, Args> { 
+  typedef Ret type;
+};
+
+// ::result_type support
+
+namespace detail
+{
+
+BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type)
+
+template<class F> struct get_result_type
+{
+  typedef typename F::result_type type;
+};
+
+template<class F, class A> struct get_sig
+{
+  typedef typename function_adaptor<F>::template sig<A>::type type;
+};
+
+} // namespace detail
+
+  // Ret is detail::unspecified, so try to deduce return type
+template<int I, class Args> 
+struct return_type_N<function_action<I, detail::unspecified>, Args > { 
+
+  // in the case of function action, the first element in Args is 
+  // some type of function
+  typedef typename Args::head_type Func;
+  typedef typename detail::remove_reference_and_cv<Func>::type plain_Func;
+
+public: 
+  // pass the function to function_adaptor, and get the return type from 
+  // that
+  typedef typename detail::IF<
+    detail::has_result_type<plain_Func>::value,
+    detail::get_result_type<plain_Func>,
+    detail::get_sig<plain_Func, Args>
+  >::RET::type type;
+};
+
+
+} // namespace lambda
+} // namespace boost
+
+#endif
+
+
+
diff --git a/ext/boost/lambda/detail/select_functions.hpp b/ext/boost/lambda/detail/select_functions.hpp
new file mode 100644
index 0000000..956045c
--- /dev/null
+++ b/ext/boost/lambda/detail/select_functions.hpp
@@ -0,0 +1,74 @@
+// -- select_functions.hpp -- Boost Lambda Library --------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org
+
+
+#ifndef BOOST_LAMBDA_SELECT_FUNCTIONS_HPP
+#define BOOST_LAMBDA_SELECT_FUNCTIONS_HPP
+
+namespace boost { 
+namespace lambda {
+namespace detail {
+
+
+// select functions -------------------------------
+template<class Any, CALL_TEMPLATE_ARGS>
+inline Any& select(Any& any, CALL_FORMAL_ARGS) { CALL_USE_ARGS; return any; }
+
+
+template<class Arg, CALL_TEMPLATE_ARGS>
+inline typename Arg::template sig<tuple<CALL_REFERENCE_TYPES> >::type
+select ( const lambda_functor<Arg>& op, CALL_FORMAL_ARGS ) { 
+  return op.template call<
+    typename Arg::template sig<tuple<CALL_REFERENCE_TYPES> >::type
+  >(CALL_ACTUAL_ARGS); 
+}
+template<class Arg, CALL_TEMPLATE_ARGS>
+inline typename Arg::template sig<tuple<CALL_REFERENCE_TYPES> >::type
+select ( lambda_functor<Arg>& op, CALL_FORMAL_ARGS) { 
+  return op.template call<
+    typename Arg::template sig<tuple<CALL_REFERENCE_TYPES> >::type
+  >(CALL_ACTUAL_ARGS); 
+}
+
+// ------------------------------------------------------------------------
+// select functions where the return type is explicitly given
+// Note: on many functions, this return type is just discarded.
+// The select functions are inside a class template, and the return type
+// is a class template argument.
+// The first implementation used function templates with an explicitly 
+// specified template parameter.
+// However, this resulted in ambiguous calls (at least with gcc 2.95.2 
+// and edg 2.44). Not sure whether the compilers were right or wrong. 
+  
+template<class RET> struct r_select {
+
+// Any == RET
+  template<class Any, CALL_TEMPLATE_ARGS>
+  static 
+  inline RET go (Any& any, CALL_FORMAL_ARGS) { CALL_USE_ARGS; return any; }
+
+
+  template<class Arg, CALL_TEMPLATE_ARGS> 
+  static 
+  inline RET go (const lambda_functor<Arg>& op, CALL_FORMAL_ARGS ) {
+    return op.template call<RET>(CALL_ACTUAL_ARGS); 
+  }
+  template<class Arg, CALL_TEMPLATE_ARGS> 
+  static 
+  inline RET go (lambda_functor<Arg>& op, CALL_FORMAL_ARGS ) { 
+    return op.template call<RET>(CALL_ACTUAL_ARGS); 
+  }
+};
+   
+} // namespace detail
+} // namespace lambda
+} // namespace boost
+
+#endif
diff --git a/ext/boost/lambda/lambda.hpp b/ext/boost/lambda/lambda.hpp
new file mode 100644
index 0000000..75b06c7
--- /dev/null
+++ b/ext/boost/lambda/lambda.hpp
@@ -0,0 +1,34 @@
+// -- lambda.hpp -- Boost Lambda Library -----------------------------------
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://lambda.cs.utu.fi 
+
+#ifndef BOOST_LAMBDA_LAMBDA_HPP
+#define BOOST_LAMBDA_LAMBDA_HPP
+
+
+#include "boost/lambda/core.hpp"
+
+#ifdef BOOST_NO_FDECL_TEMPLATES_AS_TEMPLATE_TEMPLATE_PARAMS
+#include <istream>
+#include <ostream>
+#endif
+
+#include "boost/lambda/detail/operator_actions.hpp"
+#include "boost/lambda/detail/operator_lambda_func_base.hpp"
+#include "boost/lambda/detail/operator_return_type_traits.hpp"
+
+
+#include "boost/lambda/detail/operators.hpp"
+
+#ifndef BOOST_LAMBDA_FAILS_IN_TEMPLATE_KEYWORD_AFTER_SCOPE_OPER
+// sorry, member ptr does not work with gcc2.95
+#include "boost/lambda/detail/member_ptr.hpp"
+#endif
+
+
+#endif
diff --git a/ext/boost/lexical_cast.hpp b/ext/boost/lexical_cast.hpp
index d7d9052..c475982 100644
--- a/ext/boost/lexical_cast.hpp
+++ b/ext/boost/lexical_cast.hpp
@@ -1,6 +1,12 @@
 #ifndef BOOST_LEXICAL_CAST_INCLUDED
 #define BOOST_LEXICAL_CAST_INCLUDED
 
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
 // Boost lexical_cast.hpp header  -------------------------------------------//
 //
 // See http://www.boost.org/libs/conversion for documentation.
@@ -11,28 +17,43 @@
 //        enhanced with contributions from Terje Slettebo,
 //        with additional fixes and suggestions from Gennaro Prota,
 //        Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
-//        Alexander Nasonov and other Boosters
-// when:  November 2000, March 2003, June 2005, June 2006
+//        Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
+//        Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
+// when:  November 2000, March 2003, June 2005, June 2006, March 2011 - 2012
+
+#include <boost/config.hpp>
+#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING)
+#define BOOST_LCAST_NO_WCHAR_T
+#endif
 
 #include <climits>
 #include <cstddef>
-#include <istream>
 #include <string>
+#include <cstring>
+#include <cstdio>
 #include <typeinfo>
 #include <exception>
-#include <boost/config.hpp>
 #include <boost/limits.hpp>
 #include <boost/mpl/if.hpp>
 #include <boost/throw_exception.hpp>
+#include <boost/type_traits/ice.hpp>
 #include <boost/type_traits/is_pointer.hpp>
-#include <boost/type_traits/make_unsigned.hpp>
-#include <boost/call_traits.hpp>
 #include <boost/static_assert.hpp>
 #include <boost/detail/lcast_precision.hpp>
 #include <boost/detail/workaround.hpp>
 
+
 #ifndef BOOST_NO_STD_LOCALE
-#include <locale>
+#   include <locale>
+#else
+#   ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+        // Getting error at this point means, that your STL library is old/lame/misconfigured.
+        // If nothing can be done with STL library, define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE,
+        // but beware: lexical_cast will understand only 'C' locale delimeters and thousands
+        // separators.
+#       error "Unable to use <locale> header. Define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE to force "
+#       error "boost::lexical_cast to use only 'C' locale during conversions."
+#   endif
 #endif
 
 #ifdef BOOST_NO_STRINGSTREAM
@@ -41,10 +62,6 @@
 #include <sstream>
 #endif
 
-#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING)
-#define BOOST_LCAST_NO_WCHAR_T
-#endif
-
 #ifdef BOOST_NO_TYPEID
 #define BOOST_LCAST_THROW_BAD_CAST(S, T) throw_exception(bad_lexical_cast())
 #else
@@ -55,7 +72,13 @@
 namespace boost
 {
     // exception used to indicate runtime lexical_cast failure
-    class bad_lexical_cast : public std::bad_cast
+    class BOOST_SYMBOL_VISIBLE bad_lexical_cast :
+    // workaround MSVC bug with std::bad_cast when _HAS_EXCEPTIONS == 0 
+#if defined(BOOST_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS 
+        public std::exception 
+#else 
+        public std::bad_cast 
+#endif 
 
 #if defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, < 0x560 )
         // under bcc32 5.5.1 bad_cast doesn't derive from exception
@@ -64,7 +87,7 @@ namespace boost
 
     {
     public:
-        bad_lexical_cast() :
+        bad_lexical_cast() BOOST_NOEXCEPT :
 #ifndef BOOST_NO_TYPEID
           source(&typeid(void)), target(&typeid(void))
 #else
@@ -75,7 +98,7 @@ namespace boost
 
         bad_lexical_cast(
             const std::type_info &source_type_arg,
-            const std::type_info &target_type_arg) :
+            const std::type_info &target_type_arg) BOOST_NOEXCEPT :
             source(&source_type_arg), target(&target_type_arg)
         {
         }
@@ -89,81 +112,222 @@ namespace boost
             return *target;
         }
 
+#ifndef BOOST_NO_NOEXCEPT
+        virtual const char *what() const noexcept
+#else
         virtual const char *what() const throw()
+#endif
         {
             return "bad lexical cast: "
                    "source type value could not be interpreted as target";
         }
+
+#ifndef BOOST_NO_NOEXCEPT
+        virtual ~bad_lexical_cast() BOOST_NOEXCEPT
+#else
         virtual ~bad_lexical_cast() throw()
-        {
-        }
+#endif
+        {}
     private:
         const std::type_info *source;
         const std::type_info *target;
     };
 
-    namespace detail // selectors for choosing stream character type
+    namespace detail // widest_char
     {
-        template<typename Type>
+        template <typename TargetChar, typename SourceChar>
+        struct widest_char
+        {
+            typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
+                (sizeof(TargetChar) > sizeof(SourceChar))
+                , TargetChar
+                , SourceChar >::type type;
+        };
+    }
+} // namespace boost
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(__SUNPRO_CC) && !defined(__PGIC__)
+
+#include <cmath>
+#include <istream>
+
+#if !defined(BOOST_NO_CXX11_HDR_ARRAY) && defined(BOOST_HAS_TR1_ARRAY)
+#include <array>
+#endif
+
+#include <boost/array.hpp>
+#include <boost/numeric/conversion/cast.hpp>
+#include <boost/type_traits/make_unsigned.hpp>
+#include <boost/type_traits/is_signed.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/math/special_functions/sign.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/range/iterator_range_core.hpp>
+#include <boost/container/container_fwd.hpp>
+#ifndef BOOST_NO_CWCHAR
+#   include <cwchar>
+#endif
+
+namespace boost {
+    namespace detail // widest_char<...> (continuation)
+    {
+        struct not_a_character_type{};
+
+        template <typename CharT>
+        struct widest_char<not_a_character_type, CharT >
+        {
+            typedef CharT type;
+        };
+
+        template <typename CharT>
+        struct widest_char< CharT, not_a_character_type >
+        {
+            typedef CharT type;
+        };
+                
+        template <>
+        struct widest_char< not_a_character_type, not_a_character_type >
+        {
+            typedef char type;
+        };
+    } 
+
+    namespace detail // is_char_or_wchar<...> and stream_char<...> templates
+    {
+        // returns true, if T is one of the character types
+        template <typename T>
+        struct is_char_or_wchar
+        {
+            typedef ::boost::type_traits::ice_or<
+                    ::boost::is_same< T, char >::value,
+                    #ifndef BOOST_LCAST_NO_WCHAR_T
+                        ::boost::is_same< T, wchar_t >::value,
+                    #endif
+                    #ifndef BOOST_NO_CHAR16_T
+                        ::boost::is_same< T, char16_t >::value,
+                    #endif
+                    #ifndef BOOST_NO_CHAR32_T
+                        ::boost::is_same< T, char32_t >::value,
+                    #endif
+                    ::boost::is_same< T, unsigned char >::value,
+                    ::boost::is_same< T, signed char >::value
+            > result_type;
+
+            BOOST_STATIC_CONSTANT(bool, value = (result_type::value) );
+        };
+
+        // selectors for choosing stream character type
+        // returns one of char, wchar_t, char16_t, char32_t or not_a_character_type types
+        template <typename Type>
         struct stream_char
         {
+            typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
+                is_char_or_wchar<Type >::value,
+                Type,
+                boost::detail::not_a_character_type
+            >::type type;
+        };
+
+        template <>
+        struct stream_char<unsigned char>
+        {
+            typedef char type;
+        };
+
+        template <>
+        struct stream_char<signed char>
+        {
             typedef char type;
         };
 
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-        template<class CharT, class Traits, class Alloc>
-        struct stream_char< std::basic_string<CharT,Traits,Alloc> >
+        template <typename CharT>
+        struct stream_char<CharT*>
+        {
+            typedef BOOST_DEDUCED_TYPENAME stream_char<CharT>::type type;
+        };
+
+        template <typename CharT>
+        struct stream_char<const CharT*>
+        {
+            typedef BOOST_DEDUCED_TYPENAME stream_char<CharT>::type type;
+        };
+
+        template <typename CharT>
+        struct stream_char<iterator_range<CharT*> >
+        {
+            typedef BOOST_DEDUCED_TYPENAME stream_char<CharT*>::type type;
+        };
+    
+        template <typename CharT>
+        struct stream_char<iterator_range<const CharT*> >
+        {
+            typedef BOOST_DEDUCED_TYPENAME stream_char<const CharT*>::type type;
+        };
+
+        template <class CharT, class Traits, class Alloc>
+        struct stream_char< std::basic_string<CharT, Traits, Alloc> >
         {
             typedef CharT type;
         };
-#endif
 
-#ifndef BOOST_LCAST_NO_WCHAR_T
-#ifndef BOOST_NO_INTRINSIC_WCHAR_T
-        template<>
-        struct stream_char<wchar_t>
+        template <class CharT, class Traits, class Alloc>
+        struct stream_char< ::boost::container::basic_string<CharT, Traits, Alloc> >
         {
-            typedef wchar_t type;
+            typedef CharT type;
         };
-#endif
 
-        template<>
-        struct stream_char<wchar_t *>
+        template<typename CharT, std::size_t N>
+        struct stream_char<boost::array<CharT, N> >
         {
-            typedef wchar_t type;
+            typedef BOOST_DEDUCED_TYPENAME stream_char<CharT>::type type;
         };
 
-        template<>
-        struct stream_char<const wchar_t *>
+        template<typename CharT, std::size_t N>
+        struct stream_char<boost::array<const CharT, N> >
         {
-            typedef wchar_t type;
+            typedef BOOST_DEDUCED_TYPENAME stream_char<CharT>::type type;
+        };
+
+#if !defined(BOOST_NO_CXX11_HDR_ARRAY) && defined(BOOST_HAS_TR1_ARRAY)
+        template <typename CharT, std::size_t N>
+        struct stream_char<std::array<CharT, N> >
+        {
+            typedef BOOST_DEDUCED_TYPENAME stream_char<CharT>::type type;
         };
 
-#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+        template <typename CharT, std::size_t N>
+        struct stream_char<std::array<const CharT, N> >
+        {
+            typedef BOOST_DEDUCED_TYPENAME stream_char<CharT>::type type;
+        };
+#endif // !defined(BOOST_NO_CXX11_HDR_ARRAY) && defined(BOOST_HAS_TR1_ARRAY)
+
+#if !defined(BOOST_LCAST_NO_WCHAR_T) && defined(BOOST_NO_INTRINSIC_WCHAR_T)
         template<>
-        struct stream_char<std::wstring>
+        struct stream_char<wchar_t>
         {
-            typedef wchar_t type;
+            typedef boost::detail::not_a_character_type type;
         };
-#endif
-#endif
 
-        template<typename TargetChar, typename SourceChar>
-        struct widest_char
+        template<>
+        struct stream_char<wchar_t*>
         {
-            typedef TargetChar type;
+            typedef wchar_t type;
         };
 
         template<>
-        struct widest_char<char, wchar_t>
+        struct stream_char<const wchar_t*>
         {
             typedef wchar_t type;
         };
+#endif
     }
 
     namespace detail // deduce_char_traits template
     {
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
         template<class CharT, class Target, class Source>
         struct deduce_char_traits
         {
@@ -188,140 +352,73 @@ namespace boost
             typedef Traits type;
         };
 
-        template<class CharT, class Traits, class Alloc1, class Alloc2>
+        template<class CharT, class Traits, class Alloc, class Source>
         struct deduce_char_traits< CharT
-                                 , std::basic_string<CharT,Traits,Alloc1>
-                                 , std::basic_string<CharT,Traits,Alloc2>
+                                 , ::boost::container::basic_string<CharT,Traits,Alloc>
+                                 , Source
                                  >
         {
             typedef Traits type;
         };
-#endif
-    }
-
-    namespace detail // lcast_src_length
-    {
-        // Return max. length of string representation of Source;
-        // 0 if unlimited (with exceptions for some types, see below).
-        // Values with limited string representation are placed to
-        // the buffer locally defined in lexical_cast function.
-        // 1 is returned for few types such as CharT const* or
-        // std::basic_string<CharT> that already have an internal
-        // buffer ready to be reused by lexical_stream_limited_src.
-        // Each specialization should have a correspondent operator<<
-        // defined in lexical_stream_limited_src.
-        template< class CharT  // A result of widest_char transformation.
-                , class Source // Source type of lexical_cast.
-                >
-        struct lcast_src_length
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 0);
-            // To check coverage, build the test with
-            // bjam --v2 profile optimization=off
-            static void check_coverage() {}
-        };
-
-        template<>
-        struct lcast_src_length<char, bool>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-
-        template<>
-        struct lcast_src_length<char, char>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-
-        // No specializations for:
-        // lcast_src_length<char, signed char>
-        // lcast_src_length<char, unsigned char>
-        // lcast_src_length<char, signed char*>
-        // lcast_src_length<char, unsigned char*>
-        // lcast_src_length<char, signed char const*>
-        // lcast_src_length<char, unsigned char const*>
-
-#ifndef BOOST_LCAST_NO_WCHAR_T
-        template<>
-        struct lcast_src_length<wchar_t, bool>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-
-        template<>
-        struct lcast_src_length<wchar_t, char>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-
-#ifndef BOOST_NO_INTRINSIC_WCHAR_T
-        template<>
-        struct lcast_src_length<wchar_t, wchar_t>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-#endif
-#endif
 
-        template<>
-        struct lcast_src_length<char, char const*>
+        template<class CharT, class Target, class Traits, class Alloc>
+        struct deduce_char_traits< CharT
+                                 , Target
+                                 , ::boost::container::basic_string<CharT,Traits,Alloc>
+                                 >
         {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
+            typedef Traits type;
         };
 
-        template<>
-        struct lcast_src_length<char, char*>
+        template<class CharT, class Traits, class Alloc1, class Alloc2>
+        struct deduce_char_traits< CharT
+                                 , std::basic_string<CharT,Traits,Alloc1>
+                                 , std::basic_string<CharT,Traits,Alloc2>
+                                 >
         {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
+            typedef Traits type;
         };
 
-#ifndef BOOST_LCAST_NO_WCHAR_T
-        template<>
-        struct lcast_src_length<wchar_t, wchar_t const*>
+        template<class CharT, class Traits, class Alloc1, class Alloc2>
+        struct deduce_char_traits< CharT
+                                 , ::boost::container::basic_string<CharT,Traits,Alloc1>
+                                 , ::boost::container::basic_string<CharT,Traits,Alloc2>
+                                 >
         {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
+            typedef Traits type;
         };
 
-        template<>
-        struct lcast_src_length<wchar_t, wchar_t*>
+        template<class CharT, class Traits, class Alloc1, class Alloc2>
+        struct deduce_char_traits< CharT
+                                 , ::boost::container::basic_string<CharT,Traits,Alloc1>
+                                 , ::std::basic_string<CharT,Traits,Alloc2>
+                                 >
         {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
+            typedef Traits type;
         };
-#endif
 
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-        template<class CharT, class Traits, class Alloc>
-        struct lcast_src_length< CharT, std::basic_string<CharT,Traits,Alloc> >
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-#else
-        template<>
-        struct lcast_src_length< char, std::basic_string<char> >
+        template<class CharT, class Traits, class Alloc1, class Alloc2>
+        struct deduce_char_traits< CharT
+                                 , ::std::basic_string<CharT,Traits,Alloc1>
+                                 , ::boost::container::basic_string<CharT,Traits,Alloc2>
+                                 >
         {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
+            typedef Traits type;
         };
+    }
 
-#ifndef BOOST_LCAST_NO_WCHAR_T
-        template<>
-        struct lcast_src_length< wchar_t, std::basic_string<wchar_t> >
+    namespace detail // lcast_src_length
+    {
+        // Return max. length of string representation of Source;
+        template< class Source // Source type of lexical_cast.
+                >
+        struct lcast_src_length
         {
             BOOST_STATIC_CONSTANT(std::size_t, value = 1);
+            // To check coverage, build the test with
+            // bjam --v2 profile optimization=off
             static void check_coverage() {}
         };
-#endif
-#endif
 
         // Helper for integral types.
         // Notes on length calculation:
@@ -342,7 +439,7 @@ namespace boost
 #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
             BOOST_STATIC_CONSTANT(std::size_t, value =
                   std::numeric_limits<Source>::is_signed +
-                  std::numeric_limits<Source>::is_specialized + // == 1
+                  std::numeric_limits<Source>::is_specialized + /* == 1 */
                   std::numeric_limits<Source>::digits10 * 2
               );
 #else
@@ -351,19 +448,11 @@ namespace boost
 #endif
         };
 
-#define BOOST_LCAST_DEF1(CharT, T)               \
-    template<> struct lcast_src_length<CharT, T> \
+#define BOOST_LCAST_DEF(T)               \
+    template<> struct lcast_src_length<T> \
         : lcast_src_length_integral<T>           \
     { static void check_coverage() {} };
 
-#ifdef BOOST_LCAST_NO_WCHAR_T
-#define BOOST_LCAST_DEF(T) BOOST_LCAST_DEF1(char, T)
-#else
-#define BOOST_LCAST_DEF(T)          \
-        BOOST_LCAST_DEF1(char, T)   \
-        BOOST_LCAST_DEF1(wchar_t, T)
-#endif
-
         BOOST_LCAST_DEF(short)
         BOOST_LCAST_DEF(unsigned short)
         BOOST_LCAST_DEF(int)
@@ -379,7 +468,6 @@ namespace boost
 #endif
 
 #undef BOOST_LCAST_DEF
-#undef BOOST_LCAST_DEF1
 
 #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
         // Helper for floating point types.
@@ -405,53 +493,30 @@ namespace boost
         };
 
         template<>
-        struct lcast_src_length<char,float>
+        struct lcast_src_length<float>
           : lcast_src_length_floating<float>
         {
             static void check_coverage() {}
         };
 
         template<>
-        struct lcast_src_length<char,double>
+        struct lcast_src_length<double>
           : lcast_src_length_floating<double>
         {
             static void check_coverage() {}
         };
 
         template<>
-        struct lcast_src_length<char,long double>
+        struct lcast_src_length<long double>
           : lcast_src_length_floating<long double>
         {
             static void check_coverage() {}
         };
 
-#ifndef BOOST_LCAST_NO_WCHAR_T
-    template<>
-    struct lcast_src_length<wchar_t,float>
-      : lcast_src_length_floating<float>
-    {
-        static void check_coverage() {}
-    };
-
-    template<>
-    struct lcast_src_length<wchar_t,double>
-      : lcast_src_length_floating<double>
-    {
-        static void check_coverage() {}
-    };
-
-    template<>
-    struct lcast_src_length<wchar_t,long double>
-      : lcast_src_length_floating<long double>
-    {
-        static void check_coverage() {}
-    };
-
-#endif // #ifndef BOOST_LCAST_NO_WCHAR_T
 #endif // #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
     }
 
-    namespace detail // '0' and '-' constants
+    namespace detail // '0', '+' and '-' constants
     {
         template<typename CharT> struct lcast_char_constants;
 
@@ -460,6 +525,10 @@ namespace boost
         {
             BOOST_STATIC_CONSTANT(char, zero  = '0');
             BOOST_STATIC_CONSTANT(char, minus = '-');
+            BOOST_STATIC_CONSTANT(char, plus = '+');
+            BOOST_STATIC_CONSTANT(char, lowercase_e = 'e');
+            BOOST_STATIC_CONSTANT(char, capital_e = 'E');
+            BOOST_STATIC_CONSTANT(char, c_decimal_separator = '.');
         };
 
 #ifndef BOOST_LCAST_NO_WCHAR_T
@@ -468,15 +537,38 @@ namespace boost
         {
             BOOST_STATIC_CONSTANT(wchar_t, zero  = L'0');
             BOOST_STATIC_CONSTANT(wchar_t, minus = L'-');
+            BOOST_STATIC_CONSTANT(wchar_t, plus = L'+');
+            BOOST_STATIC_CONSTANT(wchar_t, lowercase_e = L'e');
+            BOOST_STATIC_CONSTANT(wchar_t, capital_e = L'E');
+            BOOST_STATIC_CONSTANT(wchar_t, c_decimal_separator = L'.');
         };
 #endif
-    }
 
-    namespace detail // lexical_streambuf_fake
-    {
-        struct lexical_streambuf_fake
-        {
+#if !defined(BOOST_NO_CHAR16_T) && !defined(BOOST_NO_UNICODE_LITERALS)
+        template<>
+        struct lcast_char_constants<char16_t>
+        {
+            BOOST_STATIC_CONSTANT(char16_t, zero  = u'0');
+            BOOST_STATIC_CONSTANT(char16_t, minus = u'-');
+            BOOST_STATIC_CONSTANT(char16_t, plus = u'+');
+            BOOST_STATIC_CONSTANT(char16_t, lowercase_e = u'e');
+            BOOST_STATIC_CONSTANT(char16_t, capital_e = u'E');
+            BOOST_STATIC_CONSTANT(char16_t, c_decimal_separator = u'.');
         };
+#endif
+
+#if !defined(BOOST_NO_CHAR32_T) && !defined(BOOST_NO_UNICODE_LITERALS)
+        template<>
+        struct lcast_char_constants<char32_t>
+        {
+            BOOST_STATIC_CONSTANT(char32_t, zero  = U'0');
+            BOOST_STATIC_CONSTANT(char32_t, minus = U'-');
+            BOOST_STATIC_CONSTANT(char32_t, plus = U'+');
+            BOOST_STATIC_CONSTANT(char32_t, lowercase_e = U'e');
+            BOOST_STATIC_CONSTANT(char32_t, capital_e = U'E');
+            BOOST_STATIC_CONSTANT(char32_t, c_decimal_separator = U'.');
+        };
+#endif
     }
 
     namespace detail // lcast_to_unsigned
@@ -490,10 +582,10 @@ namespace boost
 #endif
         template<class T>
         inline
-        BOOST_DEDUCED_TYPENAME make_unsigned<T>::type lcast_to_unsigned(T value)
+        BOOST_DEDUCED_TYPENAME make_unsigned<T>::type lcast_to_unsigned(T value) BOOST_NOEXCEPT
         {
             typedef BOOST_DEDUCED_TYPENAME make_unsigned<T>::type result_type;
-            result_type uvalue = static_cast<result_type>(value);
+            const result_type uvalue = static_cast<result_type>(value);
             return value < 0 ? -uvalue : uvalue;
         }
 #if (defined _MSC_VER)
@@ -506,257 +598,1096 @@ namespace boost
     namespace detail // lcast_put_unsigned
     {
         template<class Traits, class T, class CharT>
-        CharT* lcast_put_unsigned(T n, CharT* finish)
+        CharT* lcast_put_unsigned(const T n_param, CharT* finish)
         {
 #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
             BOOST_STATIC_ASSERT(!std::numeric_limits<T>::is_signed);
 #endif
 
-#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
-            // TODO: use BOOST_NO_STD_LOCALE
-            std::locale loc;
-            typedef std::numpunct<CharT> numpunct;
-            numpunct const& np = BOOST_USE_FACET(numpunct, loc);
-            std::string const& grouping = np.grouping();
-            std::string::size_type const grouping_size = grouping.size();
-            CharT thousands_sep = grouping_size ? np.thousands_sep() : 0;
-            std::string::size_type group = 0; // current group number
-            char last_grp_size = grouping[0] <= 0 ? CHAR_MAX : grouping[0];
-            // a) Since grouping is const, grouping[grouping.size()] returns 0.
-            // b) It's safe to assume here and below that CHAR_MAX
-            //    is equivalent to unlimited grouping:
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-            BOOST_STATIC_ASSERT(std::numeric_limits<T>::digits10 < CHAR_MAX);
-#endif
-
-            char left = last_grp_size;
-#endif
-
             typedef typename Traits::int_type int_type;
             CharT const czero = lcast_char_constants<CharT>::zero;
             int_type const zero = Traits::to_int_type(czero);
+            BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
+                    (sizeof(int_type) > sizeof(T))
+                    , int_type
+                    , T
+            >::type n = n_param;
 
-            do
-            {
 #ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
-                if(left == 0)
-                {
-                    ++group;
-                    if(group < grouping_size)
-                    {
-                        char const grp_size = grouping[group];
-                        last_grp_size = grp_size <= 0 ? CHAR_MAX : grp_size;
-                    }
+            std::locale loc;
+            if (loc != std::locale::classic()) {
+                typedef std::numpunct<CharT> numpunct;
+                numpunct const& np = BOOST_USE_FACET(numpunct, loc);
+                std::string const grouping = np.grouping();
+                std::string::size_type const grouping_size = grouping.size();
 
-                    left = last_grp_size;
-                    --finish;
-                    Traits::assign(*finish, thousands_sep);
-                }
+                if ( grouping_size && grouping[0] > 0 )
+                {
 
-                --left;
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+                // Check that ulimited group is unreachable:
+                BOOST_STATIC_ASSERT(std::numeric_limits<T>::digits10 < CHAR_MAX);
 #endif
+                    CharT thousands_sep = np.thousands_sep();
+                    std::string::size_type group = 0; // current group number
+                    char last_grp_size = grouping[0];
+                    char left = last_grp_size;
 
-                --finish;
-                int_type const digit = static_cast<int_type>(n % 10U);
-                Traits::assign(*finish, Traits::to_char_type(zero + digit));
-                n /= 10;
-            } while(n);
+                    do
+                    {
+                        if(left == 0)
+                        {
+                            ++group;
+                            if(group < grouping_size)
+                            {
+                                char const grp_size = grouping[group];
+                                last_grp_size = grp_size <= 0 ? CHAR_MAX : grp_size;
+                            }
+
+                            left = last_grp_size;
+                            --finish;
+                            Traits::assign(*finish, thousands_sep);
+                        }
+
+                        --left;
+
+                        --finish;
+                        int_type const digit = static_cast<int_type>(n % 10U);
+                        Traits::assign(*finish, Traits::to_char_type(zero + digit));
+                        n /= 10;
+                    } while(n);
+                    return finish;
+                }
+            }
+#endif
+            {
+                do
+                {
+                    --finish;
+                    int_type const digit = static_cast<int_type>(n % 10U);
+                    Traits::assign(*finish, Traits::to_char_type(zero + digit));
+                    n /= 10;
+                } while(n);
+            }
 
             return finish;
         }
     }
 
-    namespace detail // stream wrapper for handling lexical conversions
+    namespace detail // lcast_ret_unsigned
     {
-        template<typename Target, typename Source, typename Traits>
-        class lexical_stream
+        template<class Traits, class T, class CharT>
+        inline bool lcast_ret_unsigned(T& value, const CharT* const begin, const CharT* end)
         {
-        private:
-            typedef typename widest_char<
-                typename stream_char<Target>::type,
-                typename stream_char<Source>::type>::type char_type;
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+            BOOST_STATIC_ASSERT(!std::numeric_limits<T>::is_signed);
+#endif
+            typedef typename Traits::int_type int_type;
+            CharT const czero = lcast_char_constants<CharT>::zero;
+            --end;
+            value = 0;
 
-            typedef Traits traits_type;
+            if (begin > end || *end < czero || *end >= czero + 10)
+                return false;
+            value = *end - czero;
+            --end;
+            T multiplier = 1;
+            bool multiplier_overflowed = false;
 
-        public:
-            lexical_stream(char_type* = 0, char_type* = 0)
-            {
-                stream.unsetf(std::ios::skipws);
-                lcast_set_precision(stream, static_cast<Source*>(0), static_cast<Target*>(0) );
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+            std::locale loc;
+            if (loc != std::locale::classic()) {
+                typedef std::numpunct<CharT> numpunct;
+                numpunct const& np = BOOST_USE_FACET(numpunct, loc);
+                std::string const& grouping = np.grouping();
+                std::string::size_type const grouping_size = grouping.size();
+
+                /* According to Programming languages - C++
+                 * we MUST check for correct grouping
+                 */
+                if (grouping_size && grouping[0] > 0)
+                {
+                    unsigned char current_grouping = 0;
+                    CharT const thousands_sep = np.thousands_sep();
+                    char remained = grouping[current_grouping] - 1;
+                    bool shall_we_return = true;
+
+                    for(;end>=begin; --end)
+                    {
+                        if (remained) {
+                            T const multiplier_10 = multiplier * 10;
+                            if (multiplier_10 / 10 != multiplier) multiplier_overflowed = true;
+
+                            T const dig_value = *end - czero;
+                            T const new_sub_value = multiplier_10 * dig_value;
+
+                            if (*end < czero || *end >= czero + 10
+                                    /* detecting overflow */
+                                    || (dig_value && new_sub_value / dig_value != multiplier_10)
+                                    || static_cast<T>((std::numeric_limits<T>::max)()-new_sub_value) < value
+                                    || (multiplier_overflowed && dig_value)
+                                    )
+                                return false;
+
+                            value += new_sub_value;
+                            multiplier *= 10;
+                            --remained;
+                        } else {
+                            if ( !Traits::eq(*end, thousands_sep) ) //|| begin == end ) return false;
+                            {
+                                /*
+                                 * According to Programming languages - C++
+                                 * Digit grouping is checked. That is, the positions of discarded
+                                 * separators is examined for consistency with
+                                 * use_facet<numpunct<charT> >(loc ).grouping()
+                                 *
+                                 * BUT what if there is no separators at all and grouping()
+                                 * is not empty? Well, we have no extraced separators, so we
+                                 * won`t check them for consistency. This will allow us to
+                                 * work with "C" locale from other locales
+                                 */
+                                shall_we_return = false;
+                                break;
+                            } else {
+                                if ( begin == end ) return false;
+                                if (current_grouping < grouping_size-1 ) ++current_grouping;
+                                remained = grouping[current_grouping];
+                            }
+                        }
+                    }
+
+                    if (shall_we_return) return true;
+                }
             }
-            ~lexical_stream()
+#endif
             {
-                #if defined(BOOST_NO_STRINGSTREAM)
-                stream.freeze(false);
-                #endif
+                while ( begin <= end )
+                {
+                    T const multiplier_10 = multiplier * 10;
+                    if (multiplier_10 / 10 != multiplier) multiplier_overflowed = true;
+
+                    T const dig_value = *end - czero;
+                    T const new_sub_value = multiplier_10 * dig_value;
+
+                    if (*end < czero || *end >= czero + 10
+                            /* detecting overflow */
+                            || (dig_value && new_sub_value / dig_value != multiplier_10)
+                            || static_cast<T>((std::numeric_limits<T>::max)()-new_sub_value) < value
+                            || (multiplier_overflowed && dig_value)
+                            )
+                        return false;
+
+                    value += new_sub_value;
+                    multiplier *= 10;
+                    --end;
+                }
             }
-            bool operator<<(const Source &input)
-            {
-                return !(stream << input).fail();
+            return true;
+        }
+    }
+
+    namespace detail
+    {
+        template <class CharT>
+        bool lc_iequal(const CharT* val, const CharT* lcase, const CharT* ucase, unsigned int len) BOOST_NOEXCEPT {
+            for( unsigned int i=0; i < len; ++i ) {
+                if ( val[i] != lcase[i] && val[i] != ucase[i] ) return false;
             }
-            template<typename InputStreamable>
-            bool operator>>(InputStreamable &output)
+
+            return true;
+        }
+
+        /* Returns true and sets the correct value if found NaN or Inf. */
+        template <class CharT, class T>
+        inline bool parse_inf_nan_impl(const CharT* begin, const CharT* end, T& value
+            , const CharT* lc_NAN, const CharT* lc_nan
+            , const CharT* lc_INFINITY, const CharT* lc_infinity
+            , const CharT opening_brace, const CharT closing_brace) BOOST_NOEXCEPT
+        {
+            using namespace std;
+            if (begin == end) return false;
+            const CharT minus = lcast_char_constants<CharT>::minus;
+            const CharT plus = lcast_char_constants<CharT>::plus;
+            const int inifinity_size = 8;
+
+            bool has_minus = false;
+            /* Parsing +/- */
+            if( *begin == minus)
             {
-                return !is_pointer<InputStreamable>::value &&
-                       stream >> output &&
-                       stream.get() ==
-#if defined(__GNUC__) && (__GNUC__<3) && defined(BOOST_NO_STD_WSTRING)
-// GCC 2.9x lacks std::char_traits<>::eof().
-// We use BOOST_NO_STD_WSTRING to filter out STLport and libstdc++-v3
-// configurations, which do provide std::char_traits<>::eof().
-    
-                           EOF;
-#else
-                           traits_type::eof();
-#endif
+                ++ begin;
+                has_minus = true;
             }
+            else if( *begin == plus ) ++begin;
 
-#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+            if( end-begin < 3 ) return false;
+            if( lc_iequal(begin, lc_nan, lc_NAN, 3) )
+            {
+                begin += 3;
+                if (end != begin) /* It is 'nan(...)' or some bad input*/
+                {
+                    if(end-begin<2) return false; // bad input
+                    -- end;
+                    if( *begin != opening_brace || *end != closing_brace) return false; // bad input
+                }
 
-            bool operator>>(std::string &output)
+                if( !has_minus ) value = std::numeric_limits<T>::quiet_NaN();
+                else value = (boost::math::changesign) (std::numeric_limits<T>::quiet_NaN());
+                return true;
+            } else
+            if (( /* 'INF' or 'inf' */
+                  end-begin==3
+                  &&
+                  lc_iequal(begin, lc_infinity, lc_INFINITY, 3)
+                )
+                ||
+                ( /* 'INFINITY' or 'infinity' */
+                  end-begin==inifinity_size
+                  &&
+                  lc_iequal(begin, lc_infinity, lc_INFINITY, inifinity_size)
+                )
+             )
             {
-                #if defined(BOOST_NO_STRINGSTREAM)
-                stream << '\0';
-                #endif
-                stream.str().swap(output);
+                if( !has_minus ) value = std::numeric_limits<T>::infinity();
+                else value = (boost::math::changesign) (std::numeric_limits<T>::infinity());
                 return true;
             }
-            #ifndef BOOST_LCAST_NO_WCHAR_T
-            bool operator>>(std::wstring &output)
+
+            return false;
+        }
+
+        template <class CharT, class T>
+        bool put_inf_nan_impl(CharT* begin, CharT*& end, const T& value
+                         , const CharT* lc_nan
+                         , const CharT* lc_infinity) BOOST_NOEXCEPT
+        {
+            using namespace std;
+            const CharT minus = lcast_char_constants<CharT>::minus;
+            if ( (boost::math::isnan)(value) )
             {
-                stream.str().swap(output);
+                if ( (boost::math::signbit)(value) )
+                {
+                    *begin = minus;
+                    ++ begin;
+                }
+
+                memcpy(begin, lc_nan, 3 * sizeof(CharT));
+                end = begin + 3;
+                return true;
+            } else if ( (boost::math::isinf)(value) )
+            {
+                if ( (boost::math::signbit)(value) )
+                {
+                    *begin = minus;
+                    ++ begin;
+                }
+
+                memcpy(begin, lc_infinity, 3 * sizeof(CharT));
+                end = begin + 3;
                 return true;
             }
-            #endif
 
+            return false;
+        }
+
+
+#ifndef BOOST_LCAST_NO_WCHAR_T
+        template <class T>
+        bool parse_inf_nan(const wchar_t* begin, const wchar_t* end, T& value) BOOST_NOEXCEPT
+        {
+            return parse_inf_nan_impl(begin, end, value
+                               , L"NAN", L"nan"
+                               , L"INFINITY", L"infinity"
+                               , L'(', L')');
+        }
+
+        template <class T>
+        bool put_inf_nan(wchar_t* begin, wchar_t*& end, const T& value) BOOST_NOEXCEPT
+        {
+            return put_inf_nan_impl(begin, end, value, L"nan", L"infinity");
+        }
+
+#endif
+#if !defined(BOOST_NO_CHAR16_T) && !defined(BOOST_NO_UNICODE_LITERALS)
+        template <class T>
+        bool parse_inf_nan(const char16_t* begin, const char16_t* end, T& value) BOOST_NOEXCEPT
+        {
+            return parse_inf_nan_impl(begin, end, value
+                               , u"NAN", u"nan"
+                               , u"INFINITY", u"infinity"
+                               , u'(', u')');
+        }
+
+        template <class T>
+        bool put_inf_nan(char16_t* begin, char16_t*& end, const T& value) BOOST_NOEXCEPT
+        {
+            return put_inf_nan_impl(begin, end, value, u"nan", u"infinity");
+        }
+#endif
+#if !defined(BOOST_NO_CHAR32_T) && !defined(BOOST_NO_UNICODE_LITERALS)
+        template <class T>
+        bool parse_inf_nan(const char32_t* begin, const char32_t* end, T& value) BOOST_NOEXCEPT
+        {
+            return parse_inf_nan_impl(begin, end, value
+                               , U"NAN", U"nan"
+                               , U"INFINITY", U"infinity"
+                               , U'(', U')');
+        }
+
+        template <class T>
+        bool put_inf_nan(char32_t* begin, char32_t*& end, const T& value) BOOST_NOEXCEPT
+        {
+            return put_inf_nan_impl(begin, end, value, U"nan", U"infinity");
+        }
+#endif
+
+        template <class CharT, class T>
+        bool parse_inf_nan(const CharT* begin, const CharT* end, T& value) BOOST_NOEXCEPT
+        {
+            return parse_inf_nan_impl(begin, end, value
+                               , "NAN", "nan"
+                               , "INFINITY", "infinity"
+                               , '(', ')');
+        }
+
+        template <class CharT, class T>
+        bool put_inf_nan(CharT* begin, CharT*& end, const T& value) BOOST_NOEXCEPT
+        {
+            return put_inf_nan_impl(begin, end, value, "nan", "infinity");
+        }
+    }
+
+
+    namespace detail // lcast_ret_float
+    {
+        template <class T>
+        struct mantissa_holder_type
+        {
+            /* Can not be used with this type */
+        };
+
+        template <>
+        struct mantissa_holder_type<float>
+        {
+            typedef unsigned int type;
+        };
+
+        template <>
+        struct mantissa_holder_type<double>
+        {
+#if defined(BOOST_HAS_LONG_LONG)
+            typedef boost::ulong_long_type type;
+#elif defined(BOOST_HAS_MS_INT64)
+            typedef unsigned __int64 type;
+#endif
+        };
+
+        template<class Traits, class T, class CharT>
+        inline bool lcast_ret_float(T& value, const CharT* begin, const CharT* end)
+        {
+
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+            std::locale loc;
+            typedef std::numpunct<CharT> numpunct;
+            numpunct const& np = BOOST_USE_FACET(numpunct, loc);
+            std::string const grouping(
+                    (loc == std::locale::classic())
+                    ? std::string()
+                    : np.grouping()
+            );
+            std::string::size_type const grouping_size = grouping.size();
+            CharT const thousands_sep = grouping_size ? np.thousands_sep() : 0;
+            CharT const decimal_point = np.decimal_point();
+            bool found_grouping = false;
+            std::string::size_type last_grouping_pos = grouping_size - 1;
 #else
-            bool operator>>(std::basic_string<char_type,traits_type>& output)
-            {
-                stream.str().swap(output);
-                return true;
+            CharT const decimal_point = lcast_char_constants<CharT>::c_decimal_separator;
+#endif
+
+            CharT const czero = lcast_char_constants<CharT>::zero;
+            CharT const minus = lcast_char_constants<CharT>::minus;
+            CharT const plus = lcast_char_constants<CharT>::plus;
+            CharT const capital_e = lcast_char_constants<CharT>::capital_e;
+            CharT const lowercase_e = lcast_char_constants<CharT>::lowercase_e;
+
+            value = static_cast<T>(0);
+
+            if (parse_inf_nan(begin, end, value)) return true;
+
+            typedef typename Traits::int_type int_type;
+            typedef BOOST_DEDUCED_TYPENAME mantissa_holder_type<T>::type mantissa_type;
+            int_type const zero = Traits::to_int_type(czero);
+            if (begin == end) return false;
+
+            /* Getting the plus/minus sign */
+            bool has_minus = false;
+            if (Traits::eq(*begin, minus) ) {
+                ++ begin;
+                has_minus = true;
+                if (begin == end) return false;
+            } else if (Traits::eq(*begin, plus) ) {
+                ++begin;
+                if (begin == end) return false;
             }
 
-            template<class Alloc>
-            bool operator>>(std::basic_string<char_type,traits_type,Alloc>& out)
+            bool found_decimal = false;
+            bool found_number_before_exp = false;
+            int pow_of_10 = 0;
+            mantissa_type mantissa=0;
+            bool is_mantissa_full = false;
+
+            char length_since_last_delim = 0;
+
+            while ( begin != end )
             {
-                std::basic_string<char_type,traits_type> str(stream.str());
-                out.assign(str.begin(), str.end());
-                return true;
+                if (found_decimal) {
+                    /* We allow no thousand_separators after decimal point */
+
+                    mantissa_type tmp_mantissa = mantissa * 10u;
+                    if (Traits::eq(*begin, lowercase_e) || Traits::eq(*begin, capital_e)) break;
+                    if ( *begin < czero || *begin >= czero + 10 ) return false;
+                    if (    is_mantissa_full
+                            || tmp_mantissa / 10u != mantissa
+                            || (std::numeric_limits<mantissa_type>::max)()-(*begin - zero) < tmp_mantissa
+                            ) {
+                        is_mantissa_full = true;
+                        ++ begin;
+                        continue;
+                    }
+
+                    -- pow_of_10;
+                    mantissa = tmp_mantissa;
+                    mantissa += *begin - zero;
+
+                    found_number_before_exp = true;
+                } else {
+
+                    if (*begin >= czero && *begin < czero + 10) {
+
+                        /* Checking for mantissa overflow. If overflow will
+                         * occur, them we only increase multiplyer
+                         */
+                        mantissa_type tmp_mantissa = mantissa * 10u;
+                        if(     !is_mantissa_full
+                                && tmp_mantissa / 10u == mantissa
+                                && (std::numeric_limits<mantissa_type>::max)()-(*begin - zero) >= tmp_mantissa
+                            )
+                        {
+                            mantissa = tmp_mantissa;
+                            mantissa += *begin - zero;
+                        } else
+                        {
+                            is_mantissa_full = true;
+                            ++ pow_of_10;
+                        }
+
+                        found_number_before_exp = true;
+                        ++ length_since_last_delim;
+                    } else if (Traits::eq(*begin, decimal_point) || Traits::eq(*begin, lowercase_e) || Traits::eq(*begin, capital_e)) {
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+                        /* If ( we need to check grouping
+                         *      and (   grouping missmatches
+                         *              or grouping position is incorrect
+                         *              or we are using the grouping position 0 twice
+                         *           )
+                         *    ) then return error
+                         */
+                        if( grouping_size && found_grouping
+                            && (
+                                   length_since_last_delim != grouping[0]
+                                   || last_grouping_pos>1
+                                   || (last_grouping_pos==0 && grouping_size>1)
+                                )
+                           ) return false;
+#endif
+
+                        if(Traits::eq(*begin, decimal_point)) {
+                            ++ begin;
+                            found_decimal = true;
+                            if (!found_number_before_exp && begin==end) return false;
+                            continue;
+                        }else {
+                            if (!found_number_before_exp) return false;
+                            break;
+                        }
+                    }
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+                    else if (grouping_size && Traits::eq(*begin, thousands_sep)){
+                        if(found_grouping)
+                        {
+                            /* It is not he first time, when we find thousands separator,
+                             * so we need to chek, is the distance between two groupings
+                             * equal to grouping[last_grouping_pos] */
+
+                            if (length_since_last_delim != grouping[last_grouping_pos] )
+                            {
+                                if (!last_grouping_pos) return false;
+                                else
+                                {
+                                    -- last_grouping_pos;
+                                    if (length_since_last_delim != grouping[last_grouping_pos]) return false;
+                                }
+                            } else
+                                /* We are calling the grouping[0] twice, when grouping size is more than 1 */
+                                if (grouping_size>1u && last_grouping_pos+1<grouping_size) return false;
+
+                        } else {
+                            /* Delimiter at the begining ',000' */
+                            if (!length_since_last_delim) return false;
+
+                            found_grouping = true;
+                            if (length_since_last_delim > grouping[last_grouping_pos] ) return false;
+                        }
+
+                        length_since_last_delim = 0;
+                        ++ begin;
+
+                        /* Delimiter at the end '100,' */
+                        if (begin == end) return false;
+                        continue;
+                    }
+#endif
+                    else return false;
+                }
+
+                ++begin;
             }
+
+            // Exponent found
+            if ( begin != end && (Traits::eq(*begin, lowercase_e) || Traits::eq(*begin, capital_e)) ) {
+                ++ begin;
+                if ( begin == end ) return false;
+
+                bool exp_has_minus = false;
+                if(Traits::eq(*begin, minus)) {
+                    exp_has_minus = true;
+                    ++ begin;
+                    if ( begin == end ) return false;
+                } else if (Traits::eq(*begin, plus)) {
+                    ++ begin;
+                    if ( begin == end ) return false;
+                }
+
+                int exp_pow_of_10 = 0;
+                while ( begin != end )
+                {
+                    if ( *begin < czero
+                            || *begin >= czero + 10
+                            || exp_pow_of_10 * 10 < exp_pow_of_10) /* Overflows are checked lower more precisely*/
+                        return false;
+
+                    exp_pow_of_10 *= 10;
+                    exp_pow_of_10 += *begin - zero;
+                    ++ begin;
+                };
+
+                if ( exp_pow_of_10 ) {
+                    /* Overflows are checked lower */
+                    if ( exp_has_minus ) {
+                        pow_of_10 -= exp_pow_of_10;
+                    } else {
+                        pow_of_10 += exp_pow_of_10;
+                    }
+                }
+            }
+
+            /* We need a more accurate algorithm... We can not use current algorithm
+             * with long doubles (and with doubles if sizeof(double)==sizeof(long double)).
+             */
+            long double result = std::pow(10.0L, pow_of_10) * mantissa;
+            value = static_cast<T>( has_minus ? (boost::math::changesign)(result) : result);
+
+            if ( (boost::math::isinf)(value) || (boost::math::isnan)(value) ) return false;
+
+            return true;
+        }
+    }
+
+    namespace detail // stl_buf_unlocker
+    {
+        template< class BufferType, class CharT >
+        class stl_buf_unlocker: public BufferType{
+        public:
+            typedef BufferType base_class;
+#ifndef BOOST_NO_USING_TEMPLATE
+            using base_class::pptr;
+            using base_class::pbase;
+            using base_class::setg;
+            using base_class::setp;
+#else
+            CharT* pptr() const { return base_class::pptr(); }
+            CharT* pbase() const { return base_class::pbase(); }
+            void setg(CharT* gbeg, CharT* gnext, CharT* gend){ return base_class::setg(gbeg, gnext, gend); }
+            void setp(CharT* pbeg, CharT* pend) { return setp(pbeg, pend); }
 #endif
-        private:
-            #if defined(BOOST_NO_STRINGSTREAM)
-            std::strstream stream;
-            #elif defined(BOOST_NO_STD_LOCALE)
-            std::stringstream stream;
-            #else
-            std::basic_stringstream<char_type,traits_type> stream;
-            #endif
         };
     }
 
+    namespace detail
+    {
+        struct do_not_construct_out_stream_t{};
+    }
+
     namespace detail // optimized stream wrapper
     {
         // String representation of Source has an upper limit.
         template< class CharT // a result of widest_char transformation
-                , class Base // lexical_streambuf_fake or basic_streambuf<CharT>
                 , class Traits // usually char_traits<CharT>
+                , bool RequiresStringbuffer
                 >
-        class lexical_stream_limited_src : public Base
+        class lexical_stream_limited_src
         {
+
+#if defined(BOOST_NO_STRINGSTREAM)
+            typedef std::ostrstream                         out_stream_t;
+            typedef stl_buf_unlocker<std::strstreambuf, char>  unlocked_but_t;
+#elif defined(BOOST_NO_STD_LOCALE)
+            typedef std::ostringstream                      out_stream_t;
+            typedef stl_buf_unlocker<std::stringbuf, char>  unlocked_but_t;
+#else
+            typedef std::basic_ostringstream<CharT, Traits>       out_stream_t;
+            typedef stl_buf_unlocker<std::basic_stringbuf<CharT, Traits>, CharT> unlocked_but_t;
+#endif
+            typedef BOOST_DEDUCED_TYPENAME ::boost::mpl::if_c<
+                RequiresStringbuffer,
+                out_stream_t,
+                do_not_construct_out_stream_t
+            >::type deduced_out_stream_t;
+
             // A string representation of Source is written to [start, finish).
-            // Currently, it is assumed that [start, finish) is big enough
-            // to hold a string representation of any Source value.
             CharT* start;
             CharT* finish;
+            deduced_out_stream_t out_stream;
+
+        public:
+            lexical_stream_limited_src(CharT* sta, CharT* fin)
+              : start(sta)
+              , finish(fin)
+            {}
 
         private:
+            // Undefined:
+            lexical_stream_limited_src(lexical_stream_limited_src const&);
+            void operator=(lexical_stream_limited_src const&);
 
-            static void widen_and_assign(char*p, char ch)
+/************************************ HELPER FUNCTIONS FOR OPERATORS << ( ... ) ********************************/
+            bool shl_char(CharT ch) BOOST_NOEXCEPT
             {
-                Traits::assign(*p, ch);
+                Traits::assign(*start, ch);
+                finish = start + 1;
+                return true;
             }
 
 #ifndef BOOST_LCAST_NO_WCHAR_T
-            static void widen_and_assign(wchar_t* p, char ch)
+            template <class T>
+            bool shl_char(T ch)
             {
-                // TODO: use BOOST_NO_STD_LOCALE
+                BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)) ,
+                    "boost::lexical_cast does not support narrowing of char types."
+                    "Use boost::locale instead" );
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
                 std::locale loc;
-                wchar_t w = BOOST_USE_FACET(std::ctype<wchar_t>, loc).widen(ch);
-                Traits::assign(*p, w);
+                CharT const w = BOOST_USE_FACET(std::ctype<CharT>, loc).widen(ch);
+#else
+                CharT const w = ch;
+#endif
+                Traits::assign(*start, w);
+                finish = start + 1;
+                return true;
             }
+#endif
 
-            static void widen_and_assign(wchar_t* p, wchar_t ch)
+            bool shl_char_array(CharT const* str) BOOST_NOEXCEPT
             {
-                Traits::assign(*p, ch);
+                start = const_cast<CharT*>(str);
+                finish = start + Traits::length(str);
+                return true;
             }
 
-            static void widen_and_assign(char*, wchar_t ch); // undefined
-#endif
+            template <class T>
+            bool shl_char_array(T const* str)
+            {
+                BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)),
+                    "boost::lexical_cast does not support narrowing of char types."
+                    "Use boost::locale instead" );
+                return shl_input_streamable(str);
+            }
+            
+            bool shl_char_array_limited(CharT const* str, std::size_t max_size) BOOST_NOEXCEPT
+            {
+                start = const_cast<CharT*>(str);
+                finish = std::find(start, start + max_size, Traits::to_char_type(0));
+                return true;
+            }
 
-            template<class OutputStreamable>
-            bool lcast_put(const OutputStreamable& input)
+            template<typename InputStreamable>
+            bool shl_input_streamable(InputStreamable& input)
             {
-                this->setp(start, finish);
-                std::basic_ostream<CharT> stream(static_cast<Base*>(this));
-                lcast_set_precision(stream, static_cast<OutputStreamable*>(0));
-                bool const result = !(stream << input).fail();
-                finish = this->pptr();
+#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE)
+                // If you have compilation error at this point, than your STL library
+                // does not support such conversions. Try updating it.
+                BOOST_STATIC_ASSERT((boost::is_same<char, CharT>::value));
+#endif
+                bool const result = !(out_stream << input).fail();
+                const unlocked_but_t* const p
+                        = static_cast<unlocked_but_t*>(out_stream.rdbuf()) ;
+                start = p->pbase();
+                finish = p->pptr();
                 return result;
             }
 
-            // Undefined:
-            lexical_stream_limited_src(lexical_stream_limited_src const&);
-            void operator=(lexical_stream_limited_src const&);
+            template <class T>
+            inline bool shl_signed(T n)
+            {
+                start = lcast_put_unsigned<Traits>(lcast_to_unsigned(n), finish);
+                if(n < 0)
+                {
+                    --start;
+                    CharT const minus = lcast_char_constants<CharT>::minus;
+                    Traits::assign(*start, minus);
+                }
+                return true;
+            }
 
-        public:
+            template <class T, class SomeCharT>
+            bool shl_real_type(const T& val, SomeCharT* begin, SomeCharT*& end)
+            {
+                if (put_inf_nan(begin, end, val)) return true;
+                lcast_set_precision(out_stream, &val);
+                return shl_input_streamable(val);
+            }
 
-            lexical_stream_limited_src(CharT* sta, CharT* fin)
-              : start(sta)
-              , finish(fin)
-            {}
+            static bool shl_real_type(float val, char* begin, char*& end)
+            {   using namespace std;
+                if (put_inf_nan(begin, end, val)) return true;
+                const double val_as_double = val;
+                end = begin + 
+#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+                    sprintf_s(begin, end-begin,
+#else
+                    sprintf(begin, 
+#endif
+                    "%.*g", static_cast<int>(boost::detail::lcast_get_precision<float>()), val_as_double);
+                return end > begin;
+            }
+
+            static bool shl_real_type(double val, char* begin, char*& end)
+            {   using namespace std;
+                if (put_inf_nan(begin, end, val)) return true;
+                end = begin + 
+#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+                    sprintf_s(begin, end-begin,
+#else
+                    sprintf(begin, 
+#endif
+                    "%.*g", static_cast<int>(boost::detail::lcast_get_precision<double>()), val);
+                return end > begin;
+            }
 
-        public: // output
+#ifndef __MINGW32__
+            static bool shl_real_type(long double val, char* begin, char*& end)
+            {   using namespace std;
+                if (put_inf_nan(begin, end, val)) return true;
+                end = begin + 
+#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+                    sprintf_s(begin, end-begin,
+#else
+                    sprintf(begin, 
+#endif
+                    "%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double>()), val );
+                return end > begin;
+            }
+#endif
+
+
+#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__)
+            static bool shl_real_type(float val, wchar_t* begin, wchar_t*& end)
+            {   using namespace std;
+                if (put_inf_nan(begin, end, val)) return true;
+                const double val_as_double = val;
+                end = begin + swprintf(begin, end-begin,
+                                       L"%.*g",
+                                       static_cast<int>(boost::detail::lcast_get_precision<float >()),
+                                       val_as_double );
+                return end > begin;
+            }
 
+            static bool shl_real_type(double val, wchar_t* begin, wchar_t*& end)
+            {   using namespace std;
+                if (put_inf_nan(begin, end, val)) return true;
+                end = begin + swprintf(begin, end-begin,
+                                          L"%.*g", static_cast<int>(boost::detail::lcast_get_precision<double >()), val );
+                return end > begin;
+            }
+
+            static bool shl_real_type(long double val, wchar_t* begin, wchar_t*& end)
+            {   using namespace std;
+                if (put_inf_nan(begin, end, val)) return true;
+                end = begin + swprintf(begin, end-begin,
+                                          L"%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double >()), val );
+                return end > begin;
+            }
+#endif
+
+/************************************ OPERATORS << ( ... ) ********************************/
+        public:
             template<class Alloc>
-            bool operator<<(std::basic_string<CharT,Traits,Alloc> const& str)
+            bool operator<<(std::basic_string<CharT,Traits,Alloc> const& str) BOOST_NOEXCEPT
             {
                 start = const_cast<CharT*>(str.data());
                 finish = start + str.length();
                 return true;
             }
 
-            bool operator<<(bool);
-            bool operator<<(char);
-#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
-            bool operator<<(wchar_t);
-#endif
-            bool operator<<(CharT const*);
-            bool operator<<(short);
-            bool operator<<(int);
-            bool operator<<(long);
-            bool operator<<(unsigned short);
-            bool operator<<(unsigned int);
-            bool operator<<(unsigned long);
+            template<class Alloc>
+            bool operator<<(::boost::container::basic_string<CharT,Traits,Alloc> const& str) BOOST_NOEXCEPT
+            {
+                start = const_cast<CharT*>(str.data());
+                finish = start + str.length();
+                return true;
+            }
+
+            bool operator<<(bool value) BOOST_NOEXCEPT
+            {
+                CharT const czero = lcast_char_constants<CharT>::zero;
+                Traits::assign(*start, Traits::to_char_type(czero + value));
+                finish = start + 1;
+                return true;
+            }
+
+            bool operator<<(const iterator_range<CharT*>& rng) BOOST_NOEXCEPT
+            {
+                start = rng.begin();
+                finish = rng.end();
+                return true; 
+            }
+            
+            bool operator<<(const iterator_range<const CharT*>& rng) BOOST_NOEXCEPT
+            {
+                start = const_cast<CharT*>(rng.begin());
+                finish = const_cast<CharT*>(rng.end());
+                return true; 
+            }
+
+            bool operator<<(const iterator_range<const signed char*>& rng) BOOST_NOEXCEPT
+            {
+                return (*this) << iterator_range<char*>(
+                    const_cast<char*>(reinterpret_cast<const char*>(rng.begin())),
+                    const_cast<char*>(reinterpret_cast<const char*>(rng.end()))
+                );
+            }
+
+            bool operator<<(const iterator_range<const unsigned char*>& rng) BOOST_NOEXCEPT
+            {
+                return (*this) << iterator_range<char*>(
+                    const_cast<char*>(reinterpret_cast<const char*>(rng.begin())),
+                    const_cast<char*>(reinterpret_cast<const char*>(rng.end()))
+                );
+            }
+
+            bool operator<<(const iterator_range<signed char*>& rng) BOOST_NOEXCEPT
+            {
+                return (*this) << iterator_range<char*>(
+                    reinterpret_cast<char*>(rng.begin()),
+                    reinterpret_cast<char*>(rng.end())
+                );
+            }
+
+            bool operator<<(const iterator_range<unsigned char*>& rng) BOOST_NOEXCEPT
+            {
+                return (*this) << iterator_range<char*>(
+                    reinterpret_cast<char*>(rng.begin()),
+                    reinterpret_cast<char*>(rng.end())
+                );
+            }
+
+            bool operator<<(char ch)                    { return shl_char(ch); }
+            bool operator<<(unsigned char ch)           { return ((*this) << static_cast<char>(ch)); }
+            bool operator<<(signed char ch)             { return ((*this) << static_cast<char>(ch)); }
+#if !defined(BOOST_LCAST_NO_WCHAR_T)
+            bool operator<<(wchar_t const* str)         { return shl_char_array(str); }
+            bool operator<<(wchar_t * str)              { return shl_char_array(str); }
+#ifndef BOOST_NO_INTRINSIC_WCHAR_T
+            bool operator<<(wchar_t ch)                 { return shl_char(ch); }
+#endif
+#endif
+#if !defined(BOOST_NO_CHAR16_T) && !defined(BOOST_NO_UNICODE_LITERALS)
+            bool operator<<(char16_t ch)                { return shl_char(ch); }
+            bool operator<<(char16_t * str)             { return shl_char_array(str); }
+            bool operator<<(char16_t const * str)       { return shl_char_array(str); }
+#endif
+#if !defined(BOOST_NO_CHAR32_T) && !defined(BOOST_NO_UNICODE_LITERALS)
+            bool operator<<(char32_t ch)                { return shl_char(ch); }
+            bool operator<<(char32_t * str)             { return shl_char_array(str); }
+            bool operator<<(char32_t const * str)       { return shl_char_array(str); }
+#endif
+            bool operator<<(unsigned char const* ch)    { return ((*this) << reinterpret_cast<char const*>(ch)); }
+            bool operator<<(unsigned char * ch)         { return ((*this) << reinterpret_cast<char *>(ch)); }
+            bool operator<<(signed char const* ch)      { return ((*this) << reinterpret_cast<char const*>(ch)); }
+            bool operator<<(signed char * ch)           { return ((*this) << reinterpret_cast<char *>(ch)); }
+            bool operator<<(char const* str)            { return shl_char_array(str); }
+            bool operator<<(char* str)                  { return shl_char_array(str); }
+            bool operator<<(short n)                    { return shl_signed(n); }
+            bool operator<<(int n)                      { return shl_signed(n); }
+            bool operator<<(long n)                     { return shl_signed(n); }
+            bool operator<<(unsigned short n)           { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+            bool operator<<(unsigned int n)             { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+            bool operator<<(unsigned long n)            { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+
 #if defined(BOOST_HAS_LONG_LONG)
-            bool operator<<(boost::ulong_long_type);
-            bool operator<<(boost::long_long_type );
+            bool operator<<(boost::ulong_long_type n)   { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+            bool operator<<(boost::long_long_type n)    { return shl_signed(n); }
 #elif defined(BOOST_HAS_MS_INT64)
-            bool operator<<(unsigned __int64);
-            bool operator<<(         __int64);
+            bool operator<<(unsigned __int64 n)         { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+            bool operator<<(         __int64 n)         { return shl_signed(n); }
+#endif
+            bool operator<<(float val)                  { return shl_real_type(val, start, finish); }
+            bool operator<<(double val)                 { return shl_real_type(val, start, finish); }
+            bool operator<<(long double val)            {
+#ifndef __MINGW32__
+                return shl_real_type(val, start, finish);
+#else
+                return shl_real_type(static_cast<double>(val), start, finish);
 #endif
-            // These three operators use ostream and streambuf.
-            // lcast_streambuf_for_source<T>::value is true.
-            bool operator<<(float);
-            bool operator<<(double);
-            bool operator<<(long double);
+            }
+            
+            template <std::size_t N>
+            bool operator<<(boost::array<CharT, N> const& input) BOOST_NOEXCEPT
+            { return shl_char_array_limited(input.begin(), N); }
+
+            template <std::size_t N>
+            bool operator<<(boost::array<unsigned char, N> const& input) BOOST_NOEXCEPT
+            { return ((*this) << reinterpret_cast<boost::array<char, N> const& >(input)); }
+
+            template <std::size_t N>
+            bool operator<<(boost::array<signed char, N> const& input) BOOST_NOEXCEPT
+            { return ((*this) << reinterpret_cast<boost::array<char, N> const& >(input)); }
+
+            template <std::size_t N>
+            bool operator<<(boost::array<const CharT, N> const& input) BOOST_NOEXCEPT
+            { return shl_char_array_limited(input.begin(), N); }
+
+            template <std::size_t N>
+            bool operator<<(boost::array<const unsigned char, N> const& input) BOOST_NOEXCEPT
+            { return ((*this) << reinterpret_cast<boost::array<const char, N> const& >(input)); }
+
+            template <std::size_t N>
+            bool operator<<(boost::array<const signed char, N> const& input) BOOST_NOEXCEPT
+            { return ((*this) << reinterpret_cast<boost::array<const char, N> const& >(input)); }
+ 
+#if !defined(BOOST_NO_CXX11_HDR_ARRAY) && defined(BOOST_HAS_TR1_ARRAY)
+            template <std::size_t N>
+            bool operator<<(std::array<CharT, N> const& input) BOOST_NOEXCEPT
+            { return shl_char_array_limited(input.begin(), N); }
+
+            template <std::size_t N>
+            bool operator<<(std::array<unsigned char, N> const& input) BOOST_NOEXCEPT
+            { return ((*this) << reinterpret_cast<boost::array<char, N> const& >(input)); }
+
+            template <std::size_t N>
+            bool operator<<(std::array<signed char, N> const& input) BOOST_NOEXCEPT
+            { return ((*this) << reinterpret_cast<boost::array<char, N> const& >(input)); }
+
+            template <std::size_t N>
+            bool operator<<(std::array<const CharT, N> const& input) BOOST_NOEXCEPT
+            { return shl_char_array_limited(input.begin(), N); }
+
+            template <std::size_t N>
+            bool operator<<(std::array<const unsigned char, N> const& input) BOOST_NOEXCEPT
+            { return ((*this) << reinterpret_cast<boost::array<const char, N> const& >(input)); }
+
+            template <std::size_t N>
+            bool operator<<(std::array<const signed char, N> const& input) BOOST_NOEXCEPT
+            { return ((*this) << reinterpret_cast<boost::array<const char, N> const& >(input)); }
+#endif // !defined(BOOST_NO_CXX11_HDR_ARRAY) && defined(BOOST_HAS_TR1_ARRAY)
+            
+            template <class InStreamable>
+            bool operator<<(const InStreamable& input)  { return shl_input_streamable(input); }
+
+/************************************ HELPER FUNCTIONS FOR OPERATORS >> ( ... ) ********************************/
+        private:
 
-        public: // input
+            template <typename Type>
+            bool shr_unsigned(Type& output)
+            {
+                if (start == finish) return false;
+                CharT const minus = lcast_char_constants<CharT>::minus;
+                CharT const plus = lcast_char_constants<CharT>::plus;
+                bool has_minus = false;
+
+                /* We won`t use `start' any more, so no need in decrementing it after */
+                if ( Traits::eq(minus,*start) )
+                {
+                    ++start;
+                    has_minus = true;
+                } else if ( Traits::eq( plus, *start ) )
+                {
+                    ++start;
+                }
+
+                bool const succeed = lcast_ret_unsigned<Traits>(output, start, finish);
+#if (defined _MSC_VER)
+# pragma warning( push )
+// C4146: unary minus operator applied to unsigned type, result still unsigned
+# pragma warning( disable : 4146 )
+#elif defined( __BORLANDC__ )
+# pragma option push -w-8041
+#endif
+                if (has_minus) output = static_cast<Type>(-output);
+#if (defined _MSC_VER)
+# pragma warning( pop )
+#elif defined( __BORLANDC__ )
+# pragma option pop
+#endif
+                return succeed;
+            }
+
+            template <typename Type>
+            bool shr_signed(Type& output)
+            {
+                if (start == finish) return false;
+                CharT const minus = lcast_char_constants<CharT>::minus;
+                CharT const plus = lcast_char_constants<CharT>::plus;
+                typedef BOOST_DEDUCED_TYPENAME make_unsigned<Type>::type utype;
+                utype out_tmp =0;
+                bool has_minus = false;
+
+                /* We won`t use `start' any more, so no need in decrementing it after */
+                if ( Traits::eq(minus,*start) )
+                {
+                    ++start;
+                    has_minus = true;
+                } else if ( Traits::eq(plus, *start) )
+                {
+                    ++start;
+                }
+
+                bool succeed = lcast_ret_unsigned<Traits>(out_tmp, start, finish);
+                if (has_minus) {
+#if (defined _MSC_VER)
+# pragma warning( push )
+// C4146: unary minus operator applied to unsigned type, result still unsigned
+# pragma warning( disable : 4146 )
+#elif defined( __BORLANDC__ )
+# pragma option push -w-8041
+#endif
+                    utype const comp_val = static_cast<utype>(-(std::numeric_limits<Type>::min)());
+                    succeed = succeed && out_tmp<=comp_val;
+                    output = -out_tmp;
+#if (defined _MSC_VER)
+# pragma warning( pop )
+#elif defined( __BORLANDC__ )
+# pragma option pop
+#endif
+                } else {
+                    utype const comp_val = static_cast<utype>((std::numeric_limits<Type>::max)());
+                    succeed = succeed && out_tmp<=comp_val;
+                    output = out_tmp;
+                }
+                return succeed;
+            }
 
-            // Generic istream-based algorithm.
-            // lcast_streambuf_for_target<InputStreamable>::value is true.
             template<typename InputStreamable>
-            bool operator>>(InputStreamable& output)
+            bool shr_using_base_class(InputStreamable& output)
             {
 #if (defined _MSC_VER)
 # pragma warning( push )
@@ -766,8 +1697,22 @@ namespace boost
                 if(is_pointer<InputStreamable>::value)
                     return false;
 
-                this->setg(start, start, finish);
-                std::basic_istream<CharT> stream(static_cast<Base*>(this));
+#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE)
+                // If you have compilation error at this point, than your STL library
+                // unsupports such conversions. Try updating it.
+                BOOST_STATIC_ASSERT((boost::is_same<char, CharT>::value));
+#endif
+
+#if defined(BOOST_NO_STRINGSTREAM)
+                std::istrstream stream(start, finish - start);
+#elif defined(BOOST_NO_STD_LOCALE)
+                std::istringstream stream;
+#else
+                std::basic_istringstream<CharT, Traits> stream;
+#endif
+                static_cast<unlocked_but_t*>(stream.rdbuf())
+                        ->setg(start, start, finish);
+
                 stream.unsetf(std::ios::skipws);
                 lcast_set_precision(stream, static_cast<InputStreamable*>(0));
 #if (defined _MSC_VER)
@@ -786,395 +1731,741 @@ namespace boost
 #endif
             }
 
-            bool operator>>(CharT&);
-
-#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-// This #if is in sync with lcast_streambuf_for_target
-
-            bool operator>>(std::string&);
+            template<class T>
+            inline bool shr_xchar(T& output)
+            {
+                BOOST_STATIC_ASSERT_MSG(( sizeof(CharT) == sizeof(T) ),
+                    "boost::lexical_cast does not support narrowing of character types."
+                    "Use boost::locale instead" );
+                bool const ok = (finish - start == 1);
+                if (ok) {
+                    CharT out;
+                    Traits::assign(out, *start);
+                    output = static_cast<T>(out);
+                }
+                return ok;
+            }
 
-#ifndef BOOST_LCAST_NO_WCHAR_T
-            bool operator>>(std::wstring&);
+/************************************ OPERATORS >> ( ... ) ********************************/
+            public:
+            bool operator>>(unsigned short& output)             { return shr_unsigned(output); }
+            bool operator>>(unsigned int& output)               { return shr_unsigned(output); }
+            bool operator>>(unsigned long int& output)          { return shr_unsigned(output); }
+            bool operator>>(short& output)                      { return shr_signed(output); }
+            bool operator>>(int& output)                        { return shr_signed(output); }
+            bool operator>>(long int& output)                   { return shr_signed(output); }
+#if defined(BOOST_HAS_LONG_LONG)
+            bool operator>>(boost::ulong_long_type& output)     { return shr_unsigned(output); }
+            bool operator>>(boost::long_long_type& output)      { return shr_signed(output); }
+#elif defined(BOOST_HAS_MS_INT64)
+            bool operator>>(unsigned __int64& output)           { return shr_unsigned(output); }
+            bool operator>>(__int64& output)                    { return shr_signed(output); }
 #endif
+            bool operator>>(char& output)                       { return shr_xchar(output); }
+            bool operator>>(unsigned char& output)              { return shr_xchar(output); }
+            bool operator>>(signed char& output)                { return shr_xchar(output); }
+#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
+            bool operator>>(wchar_t& output)                    { return shr_xchar(output); }
+#endif
+#if !defined(BOOST_NO_CHAR16_T) && !defined(BOOST_NO_UNICODE_LITERALS)
+            bool operator>>(char16_t& output)                   { return shr_xchar(output); }
+#endif
+#if !defined(BOOST_NO_CHAR32_T) && !defined(BOOST_NO_UNICODE_LITERALS)
+            bool operator>>(char32_t& output)                   { return shr_xchar(output); }
+#endif
+            template<class Alloc>
+            bool operator>>(std::basic_string<CharT,Traits,Alloc>& str) { str.assign(start, finish); return true; }
 
-#else
             template<class Alloc>
-            bool operator>>(std::basic_string<CharT,Traits,Alloc>& str)
+            bool operator>>(::boost::container::basic_string<CharT,Traits,Alloc>& str) { str.assign(start, finish); return true; }
+
+            
+    private:
+            template <std::size_t N, class ArrayT>
+            bool shr_std_array(ArrayT& output) BOOST_NOEXCEPT
             {
-                str.assign(start, finish);
+                using namespace std;
+                const std::size_t size = finish - start;
+                if (size > N - 1) { // `-1` because we need to store \0 at the end 
+                    return false;
+                }
+
+                memcpy(output.begin(), start, size * sizeof(CharT));
+                *(output.begin() + size) = Traits::to_char_type(0);
                 return true;
             }
-#endif
-        };
 
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                bool value)
-        {
-            typedef typename Traits::int_type int_type;
-            CharT const czero = lcast_char_constants<CharT>::zero;
-            int_type const zero = Traits::to_int_type(czero);
-            Traits::assign(*start, Traits::to_char_type(zero + value));
-            finish = start + 1;
-            return true;
-        }
+    public:
 
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                char ch)
-        {
-            widen_and_assign(start, ch);
-            finish = start + 1;
-            return true;
-        }
+            template <std::size_t N>
+            bool operator>>(boost::array<CharT, N>& output) BOOST_NOEXCEPT
+            { 
+                return shr_std_array<N>(output); 
+            }
 
-#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                wchar_t ch)
-        {
-            widen_and_assign(start, ch);
-            finish = start + 1;
-            return true;
-        }
-#endif
+            template <std::size_t N>
+            bool operator>>(boost::array<unsigned char, N>& output)   
+            { 
+                return ((*this) >> reinterpret_cast<boost::array<char, N>& >(output)); 
+            }
 
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                short n)
-        {
-            start = lcast_put_unsigned<Traits>(lcast_to_unsigned(n), finish);
-            if(n < 0)
-            {
-                --start;
-                CharT const minus = lcast_char_constants<CharT>::minus;
-                Traits::assign(*start, minus);
+            template <std::size_t N>
+            bool operator>>(boost::array<signed char, N>& output)   
+            { 
+                return ((*this) >> reinterpret_cast<boost::array<char, N>& >(output)); 
+            }
+ 
+#if !defined(BOOST_NO_CXX11_HDR_ARRAY) && defined(BOOST_HAS_TR1_ARRAY)
+            template <std::size_t N>
+            bool operator>>(std::array<CharT, N>& output) BOOST_NOEXCEPT
+            { 
+                return shr_std_array<N>(output); 
             }
-            return true;
-        }
 
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                int n)
-        {
-            start = lcast_put_unsigned<Traits>(lcast_to_unsigned(n), finish);
-            if(n < 0)
-            {
-                --start;
-                CharT const minus = lcast_char_constants<CharT>::minus;
-                Traits::assign(*start, minus);
+            template <std::size_t N>
+            bool operator>>(std::array<unsigned char, N>& output)   
+            { 
+                return ((*this) >> reinterpret_cast<std::array<char, N>& >(output)); 
             }
-            return true;
-        }
 
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                long n)
-        {
-            start = lcast_put_unsigned<Traits>(lcast_to_unsigned(n), finish);
-            if(n < 0)
-            {
-                --start;
-                CharT const minus = lcast_char_constants<CharT>::minus;
-                Traits::assign(*start, minus);
+            template <std::size_t N>
+            bool operator>>(std::array<signed char, N>& in)   
+            { 
+                return ((*this) >> reinterpret_cast<std::array<char, N>& >(output)); 
             }
-            return true;
-        }
+#endif // !defined(BOOST_NO_CXX11_HDR_ARRAY) && defined(BOOST_HAS_TR1_ARRAY)
 
-#if defined(BOOST_HAS_LONG_LONG)
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                boost::long_long_type n)
-        {
-            start = lcast_put_unsigned<Traits>(lcast_to_unsigned(n), finish);
-            if(n < 0)
+
+            /*
+             * case "-0" || "0" || "+0" :   output = false; return true;
+             * case "1" || "+1":            output = true;  return true;
+             * default:                     return false;
+             */
+            bool operator>>(bool& output) BOOST_NOEXCEPT
             {
-                --start;
+                CharT const zero = lcast_char_constants<CharT>::zero;
+                CharT const plus = lcast_char_constants<CharT>::plus;
                 CharT const minus = lcast_char_constants<CharT>::minus;
-                Traits::assign(*start, minus);
+
+                switch(finish-start)
+                {
+                    case 1:
+                        output = Traits::eq(start[0],  zero+1);
+                        return output || Traits::eq(start[0], zero );
+                    case 2:
+                        if ( Traits::eq( plus, *start) )
+                        {
+                            ++start;
+                            output = Traits::eq(start[0], zero +1);
+                            return output || Traits::eq(start[0], zero );
+                        } else
+                        {
+                            output = false;
+                            return Traits::eq( minus, *start)
+                                && Traits::eq( zero, start[1]);
+                        }
+                    default:
+                        output = false; // Suppress warning about uninitalized variable
+                        return false;
+                }
             }
-            return true;
-        }
-#elif defined(BOOST_HAS_MS_INT64)
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                __int64 n)
-        {
-            start = lcast_put_unsigned<Traits>(lcast_to_unsigned(n), finish);
-            if(n < 0)
-            {
-                --start;
+
+            bool operator>>(float& output) { return lcast_ret_float<Traits>(output,start,finish); }
+
+        private:
+            // Not optimised converter
+            template <class T>
+            bool float_types_converter_internal(T& output, int /*tag*/) {
+                if (parse_inf_nan(start, finish, output)) return true;
+                bool return_value = shr_using_base_class(output);
+
+                /* Some compilers and libraries successfully
+                 * parse 'inf', 'INFINITY', '1.0E', '1.0E-'...
+                 * We are trying to provide a unified behaviour,
+                 * so we just forbid such conversions (as some
+                 * of the most popular compilers/libraries do)
+                 * */
                 CharT const minus = lcast_char_constants<CharT>::minus;
-                Traits::assign(*start, minus);
+                CharT const plus = lcast_char_constants<CharT>::plus;
+                CharT const capital_e = lcast_char_constants<CharT>::capital_e;
+                CharT const lowercase_e = lcast_char_constants<CharT>::lowercase_e;
+                if ( return_value &&
+                     (
+                        Traits::eq(*(finish-1), lowercase_e)                   // 1.0e
+                        || Traits::eq(*(finish-1), capital_e)                  // 1.0E
+                        || Traits::eq(*(finish-1), minus)                      // 1.0e- or 1.0E-
+                        || Traits::eq(*(finish-1), plus)                       // 1.0e+ or 1.0E+
+                     )
+                ) return false;
+
+                return return_value;
             }
-            return true;
-        }
+
+            // Optimised converter
+            bool float_types_converter_internal(double& output,char /*tag*/) {
+                return lcast_ret_float<Traits>(output,start,finish);
+            }
+        public:
+
+            bool operator>>(double& output)
+            {
+                /*
+                 * Some compilers implement long double as double. In that case these types have
+                 * same size, same precision, same max and min values... And it means,
+                 * that current implementation of lcast_ret_float cannot be used for type
+                 * double, because it will give a big precision loss.
+                 * */
+                boost::mpl::if_c<
+#if defined(BOOST_HAS_LONG_LONG) || defined(BOOST_HAS_MS_INT64)
+                    ::boost::type_traits::ice_eq< sizeof(double), sizeof(long double) >::value,
+#else
+                     0
 #endif
+                    int,
+                    char
+                >::type tag = 0;
 
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                unsigned short n)
-        {
-            start = lcast_put_unsigned<Traits>(n, finish);
-            return true;
-        }
+                return float_types_converter_internal(output, tag);
+            }
 
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                unsigned int n)
-        {
-            start = lcast_put_unsigned<Traits>(n, finish);
-            return true;
-        }
+            bool operator>>(long double& output)
+            {
+                int tag = 0;
+                return float_types_converter_internal(output, tag);
+            }
 
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                unsigned long n)
-        {
-            start = lcast_put_unsigned<Traits>(n, finish);
-            return true;
-        }
+            // Generic istream-based algorithm.
+            // lcast_streambuf_for_target<InputStreamable>::value is true.
+            template<typename InputStreamable>
+            bool operator>>(InputStreamable& output) { return shr_using_base_class(output); }
+        };
+    }
 
-#if defined(BOOST_HAS_LONG_LONG)
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                boost::ulong_long_type n)
-        {
-            start = lcast_put_unsigned<Traits>(n, finish);
-            return true;
-        }
-#elif defined(BOOST_HAS_MS_INT64)
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                unsigned __int64 n)
+    namespace detail
+    {
+        template<class T>
+        struct array_to_pointer_decay
         {
-            start = lcast_put_unsigned<Traits>(n, finish);
-            return true;
-        }
-#endif
+            typedef T type;
+        };
 
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                float val)
+        template<class T, std::size_t N>
+        struct array_to_pointer_decay<T[N]>
         {
-            return this->lcast_put(val);
-        }
+            typedef const T * type;
+        };
 
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                double val)
+        template<typename T>
+        struct is_stdstring
         {
-            return this->lcast_put(val);
-        }
+            BOOST_STATIC_CONSTANT(bool, value = false );
+        };
 
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                long double val)
+        template<typename CharT, typename Traits, typename Alloc>
+        struct is_stdstring< std::basic_string<CharT, Traits, Alloc> >
         {
-            return this->lcast_put(val);
-        }
+            BOOST_STATIC_CONSTANT(bool, value = true );
+        };
 
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                CharT const* str)
+        template<typename CharT, typename Traits, typename Alloc>
+        struct is_stdstring< ::boost::container::basic_string<CharT, Traits, Alloc> >
         {
-            start = const_cast<CharT*>(str);
-            finish = start + Traits::length(str);
-            return true;
-        }
+            BOOST_STATIC_CONSTANT(bool, value = true );
+        };
 
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator>>(
-                CharT& output)
-        {
-            bool const ok = (finish - start == 1);
-            if(ok)
-                Traits::assign(output, *start);
-            return ok;
-        }
+        template<typename Target, typename Source>
+        struct is_arithmetic_and_not_xchars
+        {
+            BOOST_STATIC_CONSTANT(bool, value =
+               (
+                   ::boost::type_traits::ice_and<
+                           ::boost::is_arithmetic<Source>::value,
+                           ::boost::is_arithmetic<Target>::value,
+                           ::boost::type_traits::ice_not<
+                                detail::is_char_or_wchar<Target>::value
+                           >::value,
+                           ::boost::type_traits::ice_not<
+                                detail::is_char_or_wchar<Source>::value
+                           >::value
+                   >::value
+               )
+            );
+        };
 
-#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator>>(
-                std::string& str)
-        {
-            str.assign(start, finish);
-            return true;
-        }
+        /*
+         * is_xchar_to_xchar<Target, Source>::value is true, when
+         * Target and Souce are the same char types, or when
+         * Target and Souce are char types of the same size.
+         */
+        template<typename Target, typename Source>
+        struct is_xchar_to_xchar
+        {
+            BOOST_STATIC_CONSTANT(bool, value =
+                (
+                    ::boost::type_traits::ice_or<
+                        ::boost::type_traits::ice_and<
+                             is_same<Source,Target>::value,
+                             is_char_or_wchar<Target>::value
+                        >::value,
+                        ::boost::type_traits::ice_and<
+                             ::boost::type_traits::ice_eq< sizeof(char),sizeof(Target)>::value,
+                             ::boost::type_traits::ice_eq< sizeof(char),sizeof(Source)>::value,
+                             is_char_or_wchar<Target>::value,
+                             is_char_or_wchar<Source>::value
+                        >::value
+                    >::value
+                )
+            );
+        };
 
-#ifndef BOOST_LCAST_NO_WCHAR_T
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator>>(
-                std::wstring& str)
+
+        // this metafunction evaluates to true, if we have optimized comnversion 
+        // from Float type to Char array. 
+        // Must be in sync with lexical_stream_limited_src<Char, ...>::shl_real_type(...)
+        template <typename Float, typename Char>
+        struct is_this_float_conversion_optimized 
         {
-            str.assign(start, finish);
-            return true;
-        }
-#endif
+            typedef ::boost::type_traits::ice_and<
+                ::boost::is_float<Float>::value,
+#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__)
+                ::boost::type_traits::ice_or<
+                    ::boost::type_traits::ice_eq<sizeof(Char), sizeof(char) >::value,
+                    ::boost::is_same<Char, wchar_t>::value
+                >::value
+#else
+                ::boost::type_traits::ice_eq<sizeof(Char), sizeof(char) >::value
 #endif
-    }
+            > result_type;
 
-    namespace detail // lcast_streambuf_for_source
-    {
-        // Returns true if optimized stream wrapper needs ostream for writing.
-        template<class Source>
-        struct lcast_streambuf_for_source
-        {
-            BOOST_STATIC_CONSTANT(bool, value = false);
+            BOOST_STATIC_CONSTANT(bool, value = (result_type::value) );
         };
 
-        template<>
-        struct lcast_streambuf_for_source<float>
+        template<typename Target, typename Source>
+        struct is_char_array_to_stdstring
         {
-            BOOST_STATIC_CONSTANT(bool, value = true);
+            BOOST_STATIC_CONSTANT(bool, value = false );
         };
- 
-        template<>
-        struct lcast_streambuf_for_source<double>
+
+        template<typename CharT, typename Traits, typename Alloc>
+        struct is_char_array_to_stdstring< std::basic_string<CharT, Traits, Alloc>, CharT* >
         {
-            BOOST_STATIC_CONSTANT(bool, value = true);
+            BOOST_STATIC_CONSTANT(bool, value = true );
         };
-  
-        template<>
-        struct lcast_streambuf_for_source<long double>
+
+        template<typename CharT, typename Traits, typename Alloc>
+        struct is_char_array_to_stdstring< std::basic_string<CharT, Traits, Alloc>, const CharT* >
         {
-            BOOST_STATIC_CONSTANT(bool, value = true);
+            BOOST_STATIC_CONSTANT(bool, value = true );
         };
-    }
 
-    namespace detail // lcast_streambuf_for_target
-    {
-        // Returns true if optimized stream wrapper needs istream for reading.
-        template<class Target>
-        struct lcast_streambuf_for_target
+        template<typename CharT, typename Traits, typename Alloc>
+        struct is_char_array_to_stdstring< ::boost::container::basic_string<CharT, Traits, Alloc>, CharT* >
         {
-            BOOST_STATIC_CONSTANT(bool, value = true);
+            BOOST_STATIC_CONSTANT(bool, value = true );
         };
 
-        template<>
-        struct lcast_streambuf_for_target<char>
+        template<typename CharT, typename Traits, typename Alloc>
+        struct is_char_array_to_stdstring< ::boost::container::basic_string<CharT, Traits, Alloc>, const CharT* >
         {
-            BOOST_STATIC_CONSTANT(bool, value = false);
+            BOOST_STATIC_CONSTANT(bool, value = true );
         };
 
-#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
-        template<>
-        struct lcast_streambuf_for_target<wchar_t>
+#if (defined _MSC_VER)
+# pragma warning( push )
+# pragma warning( disable : 4701 ) // possible use of ... before initialization
+# pragma warning( disable : 4702 ) // unreachable code
+# pragma warning( disable : 4267 ) // conversion from 'size_t' to 'unsigned int'
+#endif
+        template<typename Target, typename Source>
+        struct lexical_cast_do_cast
         {
-            BOOST_STATIC_CONSTANT(bool, value = false);
+            static inline Target lexical_cast_impl(const Source& arg)
+            {
+                typedef BOOST_DEDUCED_TYPENAME detail::array_to_pointer_decay<Source>::type src;
+                typedef BOOST_DEDUCED_TYPENAME ::boost::remove_cv<src>::type no_cv_src;
+                typedef BOOST_DEDUCED_TYPENAME detail::stream_char<Target>::type target_char_t;
+                typedef BOOST_DEDUCED_TYPENAME detail::stream_char<no_cv_src>::type src_char_type;
+                typedef BOOST_DEDUCED_TYPENAME detail::widest_char<
+                    target_char_t, src_char_type
+                >::type char_type;
+
+#if !defined(BOOST_NO_CHAR16_T) && defined(BOOST_NO_UNICODE_LITERALS)
+                BOOST_STATIC_ASSERT_MSG(( !::boost::is_same<char16_t, src_char_type>::value
+                                          && !::boost::is_same<char16_t, target_char_t>::value),
+                    "Your compiler does not have full support for char16_t" );
+#endif
+#if !defined(BOOST_NO_CHAR32_T) && defined(BOOST_NO_UNICODE_LITERALS)
+                BOOST_STATIC_ASSERT_MSG(( !::boost::is_same<char32_t, src_char_type>::value
+                                          && !::boost::is_same<char32_t, target_char_t>::value),
+                    "Your compiler does not have full support for char32_t" );
+#endif
+
+                typedef BOOST_DEDUCED_TYPENAME ::boost::detail::deduce_char_traits<
+                    char_type, Target, no_cv_src
+                >::type traits;
+
+                typedef ::boost::type_traits::ice_and<
+                    ::boost::detail::is_char_or_wchar<src_char_type>::value,                    // source is lexical type
+                    ::boost::detail::is_char_or_wchar<target_char_t>::value,                    // target is a lexical type
+                    ::boost::is_same<char, src_char_type>::value,                               // source is not a wide character based type
+                    ::boost::type_traits::ice_ne<sizeof(char), sizeof(target_char_t) >::value   // target type is based on wide character
+                >   is_string_widening_required_t;
+
+                typedef ::boost::type_traits::ice_or<
+                    ::boost::is_integral<no_cv_src>::value,
+                    ::boost::detail::is_this_float_conversion_optimized<no_cv_src, char_type >::value,
+                    ::boost::detail::is_char_or_wchar<src_char_type >::value
+                >   is_source_input_optimized_t;
+
+                // Target type must be default constructible
+                Target result;
+
+                // If we have an optimized conversion for
+                // Source, we do not need to construct stringbuf.
+                const bool requires_stringbuf = ::boost::type_traits::ice_or<
+                        is_string_widening_required_t::value,
+                        ::boost::type_traits::ice_not< is_source_input_optimized_t::value >::value
+                >::value;
+               
+                typedef detail::lexical_stream_limited_src<char_type, traits, requires_stringbuf > interpreter_type;
+
+                typedef detail::lcast_src_length<no_cv_src> lcast_src_length;
+                std::size_t const src_len = lcast_src_length::value;
+                char_type buf[src_len + 1];
+                lcast_src_length::check_coverage();
+
+                interpreter_type interpreter(buf, buf + src_len);
+
+                // Disabling ADL, by directly specifying operators.
+                if(!(interpreter.operator <<(arg) && interpreter.operator >>(result)))
+                  BOOST_LCAST_THROW_BAD_CAST(Source, Target);
+
+                return result;
+            }
         };
+#if (defined _MSC_VER)
+# pragma warning( pop )
 #endif
 
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-        template<class Traits, class Alloc>
-        struct lcast_streambuf_for_target<
-                    std::basic_string<char,Traits,Alloc> >
+        template <typename Source>
+        struct lexical_cast_copy
         {
-            BOOST_STATIC_CONSTANT(bool, value = false);
+            static inline const Source& lexical_cast_impl(const Source &arg) BOOST_NOEXCEPT
+            {
+                return arg;
+            }
         };
 
-#ifndef BOOST_LCAST_NO_WCHAR_T
-        template<class Traits, class Alloc>
-        struct lcast_streambuf_for_target<
-                    std::basic_string<wchar_t,Traits,Alloc> >
+        template <class Source, class Target >
+        struct detect_precision_loss
         {
-            BOOST_STATIC_CONSTANT(bool, value = false);
-        };
-#endif
-#else
-        template<>
-        struct lcast_streambuf_for_target<std::string>
+         typedef boost::numeric::Trunc<Source> Rounder;
+         typedef Source source_type ;
+
+         typedef BOOST_DEDUCED_TYPENAME mpl::if_<
+            ::boost::is_arithmetic<Source>, Source, Source const&
+          >::type argument_type ;
+
+         static source_type nearbyint ( argument_type s )
+         {
+            const source_type orig_div_round = s / Rounder::nearbyint(s);
+            const source_type eps = std::numeric_limits<source_type>::epsilon();
+
+            if ((orig_div_round > 1 ? orig_div_round - 1 : 1 - orig_div_round) > eps)
+                BOOST_LCAST_THROW_BAD_CAST(Source, Target);
+
+            return s ;
+         }
+
+         typedef typename Rounder::round_style round_style;
+        } ;
+
+        template <class Source, class Target >
+        struct nothrow_overflow_handler
         {
-            BOOST_STATIC_CONSTANT(bool, value = false);
+          void operator() ( boost::numeric::range_check_result r )
+          {
+            if (r != boost::numeric::cInRange)
+                BOOST_LCAST_THROW_BAD_CAST(Source, Target);
+          }
+        } ;
+
+        template <typename Target, typename Source>
+        struct lexical_cast_dynamic_num_not_ignoring_minus
+        {
+            static inline Target lexical_cast_impl(const Source &arg)
+            {
+                return boost::numeric::converter<
+                        Target,
+                        Source,
+                        boost::numeric::conversion_traits<Target,Source>,
+                        nothrow_overflow_handler<Source, Target>,
+                        detect_precision_loss<Source, Target>
+                >::convert(arg);
+            }
         };
 
-#ifndef BOOST_LCAST_NO_WCHAR_T
-        template<>
-        struct lcast_streambuf_for_target<std::wstring>
+        template <typename Target, typename Source>
+        struct lexical_cast_dynamic_num_ignoring_minus
         {
-            BOOST_STATIC_CONSTANT(bool, value = false);
+            static inline Target lexical_cast_impl(const Source &arg)
+            {
+                typedef boost::numeric::converter<
+                        Target,
+                        Source,
+                        boost::numeric::conversion_traits<Target,Source>,
+                        nothrow_overflow_handler<Source, Target>,
+                        detect_precision_loss<Source, Target>
+                > converter_t;
+
+                return (
+                    arg < 0 ? -converter_t::convert(-arg) : converter_t::convert(arg)
+                );
+            }
+        };
+
+        /*
+         * lexical_cast_dynamic_num follows the rules:
+         * 1) If Source can be converted to Target without precision loss and
+         * without overflows, then assign Source to Target and return
+         *
+         * 2) If Source is less than 0 and Target is an unsigned integer,
+         * then negate Source, check the requirements of rule 1) and if
+         * successful, assign static_casted Source to Target and return
+         *
+         * 3) Otherwise throw a bad_lexical_cast exception
+         *
+         *
+         * Rule 2) required because boost::lexical_cast has the behavior of
+         * stringstream, which uses the rules of scanf for conversions. And
+         * in the C99 standard for unsigned input value minus sign is
+         * optional, so if a negative number is read, no errors will arise
+         * and the result will be the two's complement.
+         */
+        template <typename Target, typename Source>
+        struct lexical_cast_dynamic_num
+        {
+            static inline Target lexical_cast_impl(const Source &arg)
+            {
+                typedef BOOST_DEDUCED_TYPENAME ::boost::mpl::if_c<
+                    ::boost::type_traits::ice_and<
+                        ::boost::type_traits::ice_or<
+                            ::boost::is_signed<Source>::value,
+                            ::boost::is_float<Source>::value
+                        >::value,
+                        ::boost::type_traits::ice_not<
+                            ::boost::is_same<Source, bool>::value
+                        >::value,
+                        ::boost::type_traits::ice_not<
+                            ::boost::is_same<Target, bool>::value
+                        >::value,
+                        ::boost::is_unsigned<Target>::value
+                    >::value,
+                    lexical_cast_dynamic_num_ignoring_minus<Target, Source>,
+                    lexical_cast_dynamic_num_not_ignoring_minus<Target, Source>
+                >::type caster_type;
+
+                return caster_type::lexical_cast_impl(arg);
+            }
         };
+    }
+
+    template <typename Target, typename Source>
+    inline Target lexical_cast(const Source &arg)
+    {
+        typedef BOOST_DEDUCED_TYPENAME ::boost::detail::array_to_pointer_decay<Source>::type src;
+
+        typedef BOOST_DEDUCED_TYPENAME ::boost::type_traits::ice_or<
+                ::boost::detail::is_xchar_to_xchar<Target, src >::value,
+                ::boost::detail::is_char_array_to_stdstring<Target, src >::value,
+                ::boost::type_traits::ice_and<
+                     ::boost::is_same<Target, src >::value,
+                     ::boost::detail::is_stdstring<Target >::value
+                >::value
+        > shall_we_copy_t;
+
+        typedef BOOST_DEDUCED_TYPENAME
+                ::boost::detail::is_arithmetic_and_not_xchars<Target, src > shall_we_copy_with_dynamic_check_t;
+
+        typedef BOOST_DEDUCED_TYPENAME ::boost::mpl::if_c<
+            shall_we_copy_t::value,
+            ::boost::detail::lexical_cast_copy<src >,
+            BOOST_DEDUCED_TYPENAME ::boost::mpl::if_c<
+                 shall_we_copy_with_dynamic_check_t::value,
+                 ::boost::detail::lexical_cast_dynamic_num<Target, src >,
+                 ::boost::detail::lexical_cast_do_cast<Target, src >
+            >::type
+        >::type caster_type;
+
+        return caster_type::lexical_cast_impl(arg);
+    }
+
+    template <typename Target>
+    inline Target lexical_cast(const char* chars, std::size_t count)
+    {
+        return ::boost::lexical_cast<Target>(
+            ::boost::iterator_range<const char*>(chars, chars + count)
+        );
+    }
+
+
+    template <typename Target>
+    inline Target lexical_cast(const unsigned char* chars, std::size_t count)
+    {
+        return ::boost::lexical_cast<Target>(
+            ::boost::iterator_range<const unsigned char*>(chars, chars + count)
+        );
+    }
+
+    template <typename Target>
+    inline Target lexical_cast(const signed char* chars, std::size_t count)
+    {
+        return ::boost::lexical_cast<Target>(
+            ::boost::iterator_range<const signed char*>(chars, chars + count)
+        );
+    }
+
+#ifndef BOOST_LCAST_NO_WCHAR_T
+    template <typename Target>
+    inline Target lexical_cast(const wchar_t* chars, std::size_t count)
+    {
+        return ::boost::lexical_cast<Target>(
+            ::boost::iterator_range<const wchar_t*>(chars, chars + count)
+        );
+    }
 #endif
+#ifndef BOOST_NO_CHAR16_T
+    template <typename Target>
+    inline Target lexical_cast(const char16_t* chars, std::size_t count)
+    {
+        return ::boost::lexical_cast<Target>(
+            ::boost::iterator_range<const char16_t*>(chars, chars + count)
+        );
+    }
 #endif
+#ifndef BOOST_NO_CHAR32_T
+    template <typename Target>
+    inline Target lexical_cast(const char32_t* chars, std::size_t count)
+    {
+        return ::boost::lexical_cast<Target>(
+            ::boost::iterator_range<const char32_t*>(chars, chars + count)
+        );
     }
+#endif
 
-    #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+} // namespace boost
 
-    // call-by-const reference version
+#else // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 
+namespace boost {
     namespace detail
     {
-        template<class T>
-        struct array_to_pointer_decay
+
+        // selectors for choosing stream character type
+        template<typename Type>
+        struct stream_char
         {
-            typedef T type;
+            typedef char type;
         };
 
-        template<class T, std::size_t N>
-        struct array_to_pointer_decay<T[N]>
+#ifndef BOOST_LCAST_NO_WCHAR_T
+#ifndef BOOST_NO_INTRINSIC_WCHAR_T
+        template<>
+        struct stream_char<wchar_t>
         {
-            typedef const T * type;
+            typedef wchar_t type;
         };
+#endif
 
-#if (defined _MSC_VER)
-# pragma warning( push )
-# pragma warning( disable : 4701 ) // possible use of ... before initialization
-# pragma warning( disable : 4702 ) // unreachable code
+        template<>
+        struct stream_char<wchar_t *>
+        {
+            typedef wchar_t type;
+        };
+
+        template<>
+        struct stream_char<const wchar_t *>
+        {
+            typedef wchar_t type;
+        };
+
+        template<>
+        struct stream_char<std::wstring>
+        {
+            typedef wchar_t type;
+        };
 #endif
 
-        template< typename Target
-                , typename Source
-                , bool Unlimited // string representation of Source is unlimited
-                , typename CharT
-                >
-        Target lexical_cast(
-            BOOST_DEDUCED_TYPENAME boost::call_traits<Source>::param_type arg,
-            CharT* buf, std::size_t src_len)
+        // stream wrapper for handling lexical conversions
+        template<typename Target, typename Source, typename Traits>
+        class lexical_stream
         {
-            typedef BOOST_DEDUCED_TYPENAME
-                deduce_char_traits<CharT,Target,Source>::type traits;
+        private:
+            typedef typename widest_char<
+                typename stream_char<Target>::type,
+                typename stream_char<Source>::type>::type char_type;
 
-            typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
-                lcast_streambuf_for_target<Target>::value ||
-                lcast_streambuf_for_source<Source>::value
-              , std::basic_streambuf<CharT>
-              , lexical_streambuf_fake
-              >::type base;
+            typedef Traits traits_type;
 
-            BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
-                Unlimited
-              , detail::lexical_stream<Target,Source,traits>
-              , detail::lexical_stream_limited_src<CharT,base,traits>
-              >::type interpreter(buf, buf + src_len);
+        public:
+            lexical_stream(char_type* = 0, char_type* = 0)
+            {
+                stream.unsetf(std::ios::skipws);
+                lcast_set_precision(stream, static_cast<Source*>(0), static_cast<Target*>(0) );
+            }
+            ~lexical_stream()
+            {
+                #if defined(BOOST_NO_STRINGSTREAM)
+                stream.freeze(false);
+                #endif
+            }
+            bool operator<<(const Source &input)
+            {
+                return !(stream << input).fail();
+            }
+            template<typename InputStreamable>
+            bool operator>>(InputStreamable &output)
+            {
+                return !is_pointer<InputStreamable>::value &&
+                       stream >> output &&
+                       stream.get() ==
+#if defined(__GNUC__) && (__GNUC__<3) && defined(BOOST_NO_STD_WSTRING)
+// GCC 2.9x lacks std::char_traits<>::eof().
+// We use BOOST_NO_STD_WSTRING to filter out STLport and libstdc++-v3
+// configurations, which do provide std::char_traits<>::eof().
 
-            Target result;
-            if(!(interpreter << arg && interpreter >> result))
-                BOOST_LCAST_THROW_BAD_CAST(Source, Target);
-            return result;
-        }
-#if (defined _MSC_VER)
-# pragma warning( pop )
+                           EOF;
+#else
+                           traits_type::eof();
 #endif
-    }
+            }
 
-    template<typename Target, typename Source>
-    inline Target lexical_cast(const Source &arg)
-    {
-        typedef typename detail::array_to_pointer_decay<Source>::type src;
-
-        typedef typename detail::widest_char<
-            typename detail::stream_char<Target>::type
-          , typename detail::stream_char<src>::type
-          >::type char_type;
-
-        typedef detail::lcast_src_length<char_type, src> lcast_src_length;
-        std::size_t const src_len = lcast_src_length::value;
-        char_type buf[src_len + 1];
-        lcast_src_length::check_coverage();
-        return detail::lexical_cast<Target, src, !src_len>(arg, buf, src_len);
-    }
+            bool operator>>(std::string &output)
+            {
+                #if defined(BOOST_NO_STRINGSTREAM)
+                stream << '\0';
+                #endif
+                stream.str().swap(output);
+                return true;
+            }
+            #ifndef BOOST_LCAST_NO_WCHAR_T
+            bool operator>>(std::wstring &output)
+            {
+                stream.str().swap(output);
+                return true;
+            }
+            #endif
 
-    #else
+        private:
+            #if defined(BOOST_NO_STRINGSTREAM)
+            std::strstream stream;
+            #elif defined(BOOST_NO_STD_LOCALE)
+            std::stringstream stream;
+            #else
+            std::basic_stringstream<char_type,traits_type> stream;
+            #endif
+        };
+    }
 
     // call-by-value fallback version (deprecated)
 
@@ -1191,23 +2482,24 @@ namespace boost
         Target result;
 
         if(!(interpreter << arg && interpreter >> result))
-#ifndef BOOST_NO_TYPEID
-            throw_exception(bad_lexical_cast(typeid(Source), typeid(Target)));
-#else
-            throw_exception(bad_lexical_cast());
-#endif
+          BOOST_LCAST_THROW_BAD_CAST(Source, Target);
         return result;
     }
 
-    #endif
-}
+} // namespace boost
+
+#endif
 
 // Copyright Kevlin Henney, 2000-2005.
-// Copyright Alexander Nasonov, 2006-2007.
+// Copyright Alexander Nasonov, 2006-2010.
+// Copyright Antony Polukhin, 2011-2012.
 //
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
+#undef BOOST_LCAST_THROW_BAD_CAST
 #undef BOOST_LCAST_NO_WCHAR_T
-#endif
+
+#endif // BOOST_LEXICAL_CAST_INCLUDED
+
diff --git a/ext/boost/libs/system/src/error_code.cpp b/ext/boost/libs/system/src/error_code.cpp
new file mode 100644
index 0000000..6772d15
--- /dev/null
+++ b/ext/boost/libs/system/src/error_code.cpp
@@ -0,0 +1,430 @@
+//  error_code support implementation file  ----------------------------------//
+
+//  Copyright Beman Dawes 2002, 2006
+
+//  Distributed under the Boost Software License, Version 1.0. (See accompanying
+//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/system
+
+//----------------------------------------------------------------------------//
+
+#include <boost/config/warning_disable.hpp>
+
+// define BOOST_SYSTEM_SOURCE so that <boost/system/config.hpp> knows
+// the library is being built (possibly exporting rather than importing code)
+#define BOOST_SYSTEM_SOURCE 
+
+#include <boost/system/config.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/cerrno.hpp>
+#include <vector>
+#include <cstdlib>
+#include <cassert>
+
+using namespace boost::system;
+using namespace boost::system::errc;
+
+#include <cstring> // for strerror/strerror_r
+
+# if defined( BOOST_WINDOWS_API )
+#   include <windows.h>
+#   include "local_free_on_destruction.hpp"
+#   ifndef ERROR_INCORRECT_SIZE
+#     define ERROR_INCORRECT_SIZE ERROR_BAD_ARGUMENTS
+#   endif
+# endif
+
+//----------------------------------------------------------------------------//
+
+namespace
+{
+#if defined(__PGI)
+  using boost::system::errc::invalid_argument;
+#endif
+  //  standard error categories  ---------------------------------------------//
+
+  class generic_error_category : public error_category
+  {
+  public:
+    generic_error_category(){}
+    const char *   name() const;
+    std::string    message( int ev ) const;
+  };
+
+  class system_error_category : public error_category
+  {
+  public:
+    system_error_category(){}
+    const char *        name() const;
+    std::string         message( int ev ) const;
+    error_condition     default_error_condition( int ev ) const;
+  };
+
+  //  generic_error_category implementation  ---------------------------------//
+
+  const char * generic_error_category::name() const
+  {
+    return "generic";
+  }
+
+  std::string generic_error_category::message( int ev ) const
+  {
+    static std::string unknown_err( "Unknown error" );
+  // strerror_r is preferred because it is always thread safe,
+  // however, we fallback to strerror in certain cases because:
+  //   -- Windows doesn't provide strerror_r.
+  //   -- HP and Sun do provide strerror_r on newer systems, but there is
+  //      no way to tell if is available at runtime and in any case their
+  //      versions of strerror are thread safe anyhow.
+  //   -- Linux only sometimes provides strerror_r.
+  //   -- Tru64 provides strerror_r only when compiled -pthread.
+  //   -- VMS doesn't provide strerror_r, but on this platform, strerror is
+  //      thread safe.
+  # if defined(BOOST_WINDOWS_API) || defined(__hpux) || defined(__sun)\
+     || (defined(__linux) && (!defined(__USE_XOPEN2K) || defined(BOOST_SYSTEM_USE_STRERROR)))\
+     || (defined(__osf__) && !defined(_REENTRANT))\
+     || (defined(__INTEGRITY))\
+     || (defined(__vms))\
+     || (defined(__QNXNTO__))
+      const char * c_str = std::strerror( ev );
+      return  c_str
+        ? std::string( c_str )
+        : unknown_err;
+  # else  // use strerror_r
+      char buf[64];
+      char * bp = buf;
+      std::size_t sz = sizeof(buf);
+  #  if defined(__CYGWIN__) || defined(__USE_GNU)
+      // Oddball version of strerror_r
+      const char * c_str = strerror_r( ev, bp, sz );
+      return  c_str
+        ? std::string( c_str )
+        : unknown_err;
+  #  else
+      // POSIX version of strerror_r
+      int result;
+      for (;;)
+      {
+        // strerror_r returns 0 on success, otherwise ERANGE if buffer too small,
+        // invalid_argument if ev not a valid error number
+  #  if defined (__sgi)
+        const char * c_str = strerror( ev );
+        result = 0;
+      return  c_str
+        ? std::string( c_str )
+        : unknown_err;
+  #  else
+        result = strerror_r( ev, bp, sz );
+  #  endif
+        if (result == 0 )
+          break;
+        else
+        {
+  #  if defined(__linux)
+          // Linux strerror_r returns -1 on error, with error number in errno
+          result = errno;
+  #  endif
+          if ( result !=  ERANGE ) break;
+          if ( sz > sizeof(buf) ) std::free( bp );
+          sz *= 2;
+          if ( (bp = static_cast<char*>(std::malloc( sz ))) == 0 )
+            return std::string( "ENOMEM" );
+        }
+      }
+      std::string msg;
+      try
+      {
+        msg = ( ( result == invalid_argument ) ? "Unknown error" : bp );
+      }
+
+#   ifndef BOOST_NO_EXCEPTIONS
+      // See ticket #2098
+      catch(...)
+      {
+        // just eat the exception
+      }
+#   endif
+
+      if ( sz > sizeof(buf) ) std::free( bp );
+      sz = 0;
+      return msg;
+  #  endif   // else POSIX version of strerror_r
+  # endif  // else use strerror_r
+  }
+  //  system_error_category implementation  --------------------------------// 
+
+  const char * system_error_category::name() const
+  {
+    return "system";
+  }
+
+  error_condition system_error_category::default_error_condition( int ev ) const
+  {
+    switch ( ev )
+    {
+    case 0: return make_error_condition( success );
+# if defined(BOOST_POSIX_API)
+    // POSIX-like O/S -> posix_errno decode table  ---------------------------//
+    case E2BIG: return make_error_condition( argument_list_too_long );
+    case EACCES: return make_error_condition( permission_denied );
+    case EADDRINUSE: return make_error_condition( address_in_use );
+    case EADDRNOTAVAIL: return make_error_condition( address_not_available );
+    case EAFNOSUPPORT: return make_error_condition( address_family_not_supported );
+    case EAGAIN: return make_error_condition( resource_unavailable_try_again );
+#   if EALREADY != EBUSY  //  EALREADY and EBUSY are the same on QNX Neutrino
+    case EALREADY: return make_error_condition( connection_already_in_progress );
+#   endif
+    case EBADF: return make_error_condition( bad_file_descriptor );
+    case EBADMSG: return make_error_condition( bad_message );
+    case EBUSY: return make_error_condition( device_or_resource_busy );
+    case ECANCELED: return make_error_condition( operation_canceled );
+    case ECHILD: return make_error_condition( no_child_process );
+    case ECONNABORTED: return make_error_condition( connection_aborted );
+    case ECONNREFUSED: return make_error_condition( connection_refused );
+    case ECONNRESET: return make_error_condition( connection_reset );
+    case EDEADLK: return make_error_condition( resource_deadlock_would_occur );
+    case EDESTADDRREQ: return make_error_condition( destination_address_required );
+    case EDOM: return make_error_condition( argument_out_of_domain );
+    case EEXIST: return make_error_condition( file_exists );
+    case EFAULT: return make_error_condition( bad_address );
+    case EFBIG: return make_error_condition( file_too_large );
+    case EHOSTUNREACH: return make_error_condition( host_unreachable );
+    case EIDRM: return make_error_condition( identifier_removed );
+    case EILSEQ: return make_error_condition( illegal_byte_sequence );
+    case EINPROGRESS: return make_error_condition( operation_in_progress );
+    case EINTR: return make_error_condition( interrupted );
+    case EINVAL: return make_error_condition( invalid_argument );
+    case EIO: return make_error_condition( io_error );
+    case EISCONN: return make_error_condition( already_connected );
+    case EISDIR: return make_error_condition( is_a_directory );
+    case ELOOP: return make_error_condition( too_many_symbolic_link_levels );
+    case EMFILE: return make_error_condition( too_many_files_open );
+    case EMLINK: return make_error_condition( too_many_links );
+    case EMSGSIZE: return make_error_condition( message_size );
+    case ENAMETOOLONG: return make_error_condition( filename_too_long );
+    case ENETDOWN: return make_error_condition( network_down );
+    case ENETRESET: return make_error_condition( network_reset );
+    case ENETUNREACH: return make_error_condition( network_unreachable );
+    case ENFILE: return make_error_condition( too_many_files_open_in_system );
+    case ENOBUFS: return make_error_condition( no_buffer_space );
+    case ENODATA: return make_error_condition( no_message_available );
+    case ENODEV: return make_error_condition( no_such_device );
+    case ENOENT: return make_error_condition( no_such_file_or_directory );
+    case ENOEXEC: return make_error_condition( executable_format_error );
+    case ENOLCK: return make_error_condition( no_lock_available );
+    case ENOLINK: return make_error_condition( no_link );
+    case ENOMEM: return make_error_condition( not_enough_memory );
+    case ENOMSG: return make_error_condition( no_message );
+    case ENOPROTOOPT: return make_error_condition( no_protocol_option );
+    case ENOSPC: return make_error_condition( no_space_on_device );
+    case ENOSR: return make_error_condition( no_stream_resources );
+    case ENOSTR: return make_error_condition( not_a_stream );
+    case ENOSYS: return make_error_condition( function_not_supported );
+    case ENOTCONN: return make_error_condition( not_connected );
+    case ENOTDIR: return make_error_condition( not_a_directory );
+  # if ENOTEMPTY != EEXIST // AIX treats ENOTEMPTY and EEXIST as the same value
+    case ENOTEMPTY: return make_error_condition( directory_not_empty );
+  # endif // ENOTEMPTY != EEXIST
+  # if ENOTRECOVERABLE != ECONNRESET // the same on some Broadcom chips 
+    case ENOTRECOVERABLE: return make_error_condition( state_not_recoverable ); 
+  # endif // ENOTRECOVERABLE != ECONNRESET 
+    case ENOTSOCK: return make_error_condition( not_a_socket );
+    case ENOTSUP: return make_error_condition( not_supported );
+    case ENOTTY: return make_error_condition( inappropriate_io_control_operation );
+    case ENXIO: return make_error_condition( no_such_device_or_address );
+  # if EOPNOTSUPP != ENOTSUP
+    case EOPNOTSUPP: return make_error_condition( operation_not_supported );
+  # endif // EOPNOTSUPP != ENOTSUP
+    case EOVERFLOW: return make_error_condition( value_too_large );
+  # if EOWNERDEAD != ECONNABORTED // the same on some Broadcom chips 
+    case EOWNERDEAD: return make_error_condition( owner_dead ); 
+  # endif // EOWNERDEAD != ECONNABORTED 
+    case EPERM: return make_error_condition( operation_not_permitted );
+    case EPIPE: return make_error_condition( broken_pipe );
+    case EPROTO: return make_error_condition( protocol_error );
+    case EPROTONOSUPPORT: return make_error_condition( protocol_not_supported );
+    case EPROTOTYPE: return make_error_condition( wrong_protocol_type );
+    case ERANGE: return make_error_condition( result_out_of_range );
+    case EROFS: return make_error_condition( read_only_file_system );
+    case ESPIPE: return make_error_condition( invalid_seek );
+    case ESRCH: return make_error_condition( no_such_process );
+    case ETIME: return make_error_condition( stream_timeout );
+    case ETIMEDOUT: return make_error_condition( timed_out );
+    case ETXTBSY: return make_error_condition( text_file_busy );
+  # if EAGAIN != EWOULDBLOCK
+    case EWOULDBLOCK: return make_error_condition( operation_would_block );
+  # endif // EAGAIN != EWOULDBLOCK
+    case EXDEV: return make_error_condition( cross_device_link );
+  #else
+    // Windows system -> posix_errno decode table  ---------------------------//
+    // see WinError.h comments for descriptions of errors
+    case ERROR_ACCESS_DENIED: return make_error_condition( permission_denied );
+    case ERROR_ALREADY_EXISTS: return make_error_condition( file_exists );
+    case ERROR_BAD_UNIT: return make_error_condition( no_such_device );
+    case ERROR_BUFFER_OVERFLOW: return make_error_condition( filename_too_long );
+    case ERROR_BUSY: return make_error_condition( device_or_resource_busy );
+    case ERROR_BUSY_DRIVE: return make_error_condition( device_or_resource_busy );
+    case ERROR_CANNOT_MAKE: return make_error_condition( permission_denied );
+    case ERROR_CANTOPEN: return make_error_condition( io_error );
+    case ERROR_CANTREAD: return make_error_condition( io_error );
+    case ERROR_CANTWRITE: return make_error_condition( io_error );
+    case ERROR_CURRENT_DIRECTORY: return make_error_condition( permission_denied );
+    case ERROR_DEV_NOT_EXIST: return make_error_condition( no_such_device );
+    case ERROR_DEVICE_IN_USE: return make_error_condition( device_or_resource_busy );
+    case ERROR_DIR_NOT_EMPTY: return make_error_condition( directory_not_empty );
+    case ERROR_DIRECTORY: return make_error_condition( invalid_argument ); // WinError.h: "The directory name is invalid"
+    case ERROR_DISK_FULL: return make_error_condition( no_space_on_device );
+    case ERROR_FILE_EXISTS: return make_error_condition( file_exists );
+    case ERROR_FILE_NOT_FOUND: return make_error_condition( no_such_file_or_directory );
+    case ERROR_HANDLE_DISK_FULL: return make_error_condition( no_space_on_device );
+    case ERROR_INVALID_ACCESS: return make_error_condition( permission_denied );
+    case ERROR_INVALID_DRIVE: return make_error_condition( no_such_device );
+    case ERROR_INVALID_FUNCTION: return make_error_condition( function_not_supported );
+    case ERROR_INVALID_HANDLE: return make_error_condition( invalid_argument );
+    case ERROR_INVALID_NAME: return make_error_condition( invalid_argument );
+    case ERROR_LOCK_VIOLATION: return make_error_condition( no_lock_available );
+    case ERROR_LOCKED: return make_error_condition( no_lock_available );
+    case ERROR_NEGATIVE_SEEK: return make_error_condition( invalid_argument );
+    case ERROR_NOACCESS: return make_error_condition( permission_denied );
+    case ERROR_NOT_ENOUGH_MEMORY: return make_error_condition( not_enough_memory );
+    case ERROR_NOT_READY: return make_error_condition( resource_unavailable_try_again );
+    case ERROR_NOT_SAME_DEVICE: return make_error_condition( cross_device_link );
+    case ERROR_OPEN_FAILED: return make_error_condition( io_error );
+    case ERROR_OPEN_FILES: return make_error_condition( device_or_resource_busy );
+    case ERROR_OPERATION_ABORTED: return make_error_condition( operation_canceled );
+    case ERROR_OUTOFMEMORY: return make_error_condition( not_enough_memory );
+    case ERROR_PATH_NOT_FOUND: return make_error_condition( no_such_file_or_directory );
+    case ERROR_READ_FAULT: return make_error_condition( io_error );
+    case ERROR_RETRY: return make_error_condition( resource_unavailable_try_again );
+    case ERROR_SEEK: return make_error_condition( io_error );
+    case ERROR_SHARING_VIOLATION: return make_error_condition( permission_denied );
+    case ERROR_TOO_MANY_OPEN_FILES: return make_error_condition( too_many_files_open );
+    case ERROR_WRITE_FAULT: return make_error_condition( io_error );
+    case ERROR_WRITE_PROTECT: return make_error_condition( permission_denied );
+    case WSAEACCES: return make_error_condition( permission_denied );
+    case WSAEADDRINUSE: return make_error_condition( address_in_use );
+    case WSAEADDRNOTAVAIL: return make_error_condition( address_not_available );
+    case WSAEAFNOSUPPORT: return make_error_condition( address_family_not_supported );
+    case WSAEALREADY: return make_error_condition( connection_already_in_progress );
+    case WSAEBADF: return make_error_condition( bad_file_descriptor );
+    case WSAECONNABORTED: return make_error_condition( connection_aborted );
+    case WSAECONNREFUSED: return make_error_condition( connection_refused );
+    case WSAECONNRESET: return make_error_condition( connection_reset );
+    case WSAEDESTADDRREQ: return make_error_condition( destination_address_required );
+    case WSAEFAULT: return make_error_condition( bad_address );
+    case WSAEHOSTUNREACH: return make_error_condition( host_unreachable );
+    case WSAEINPROGRESS: return make_error_condition( operation_in_progress );
+    case WSAEINTR: return make_error_condition( interrupted );
+    case WSAEINVAL: return make_error_condition( invalid_argument );
+    case WSAEISCONN: return make_error_condition( already_connected );
+    case WSAEMFILE: return make_error_condition( too_many_files_open );
+    case WSAEMSGSIZE: return make_error_condition( message_size );
+    case WSAENAMETOOLONG: return make_error_condition( filename_too_long );
+    case WSAENETDOWN: return make_error_condition( network_down );
+    case WSAENETRESET: return make_error_condition( network_reset );
+    case WSAENETUNREACH: return make_error_condition( network_unreachable );
+    case WSAENOBUFS: return make_error_condition( no_buffer_space );
+    case WSAENOPROTOOPT: return make_error_condition( no_protocol_option );
+    case WSAENOTCONN: return make_error_condition( not_connected );
+    case WSAENOTSOCK: return make_error_condition( not_a_socket );
+    case WSAEOPNOTSUPP: return make_error_condition( operation_not_supported );
+    case WSAEPROTONOSUPPORT: return make_error_condition( protocol_not_supported );
+    case WSAEPROTOTYPE: return make_error_condition( wrong_protocol_type );
+    case WSAETIMEDOUT: return make_error_condition( timed_out );
+    case WSAEWOULDBLOCK: return make_error_condition( operation_would_block );
+  #endif
+    default: return error_condition( ev, system_category() );
+    }
+  }
+
+# if !defined( BOOST_WINDOWS_API )
+
+  std::string system_error_category::message( int ev ) const
+  {
+    return generic_category().message( ev );
+  }
+# else
+
+  std::string system_error_category::message( int ev ) const
+  {
+# ifndef BOOST_NO_ANSI_APIS  
+    LPVOID lpMsgBuf = 0;
+    DWORD retval = ::FormatMessageA( 
+        FORMAT_MESSAGE_ALLOCATE_BUFFER | 
+        FORMAT_MESSAGE_FROM_SYSTEM | 
+        FORMAT_MESSAGE_IGNORE_INSERTS,
+        NULL,
+        ev,
+        MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
+        (LPSTR) &lpMsgBuf,
+        0,
+        NULL 
+    );
+    detail::local_free_on_destruction lfod(lpMsgBuf);
+    if (retval == 0)
+        return std::string("Unknown error");
+        
+    std::string str( static_cast<LPCSTR>(lpMsgBuf) );
+# else  // WinCE workaround
+    LPVOID lpMsgBuf = 0;
+    DWORD retval = ::FormatMessageW( 
+        FORMAT_MESSAGE_ALLOCATE_BUFFER | 
+        FORMAT_MESSAGE_FROM_SYSTEM | 
+        FORMAT_MESSAGE_IGNORE_INSERTS,
+        NULL,
+        ev,
+        MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
+        (LPWSTR) &lpMsgBuf,
+        0,
+        NULL 
+    );
+    detail::local_free_on_destruction lfod(lpMsgBuf);
+    if (retval == 0)
+        return std::string("Unknown error");
+    
+    int num_chars = (wcslen( static_cast<LPCWSTR>(lpMsgBuf) ) + 1) * 2;
+    LPSTR narrow_buffer = (LPSTR)_alloca( num_chars );
+    if (::WideCharToMultiByte(CP_ACP, 0, static_cast<LPCWSTR>(lpMsgBuf), -1, narrow_buffer, num_chars, NULL, NULL) == 0)
+        return std::string("Unknown error");
+
+    std::string str( narrow_buffer );
+# endif
+    while ( str.size()
+      && (str[str.size()-1] == '\n' || str[str.size()-1] == '\r') )
+        str.erase( str.size()-1 );
+    if ( str.size() && str[str.size()-1] == '.' ) 
+      { str.erase( str.size()-1 ); }
+    return str;
+  }
+# endif
+
+} // unnamed namespace
+
+namespace boost
+{
+  namespace system
+  {
+
+# ifndef BOOST_SYSTEM_NO_DEPRECATED
+    BOOST_SYSTEM_DECL error_code throws; // "throw on error" special error_code;
+                                         //  note that it doesn't matter if this
+                                         //  isn't initialized before use since
+                                         //  the only use is to take its
+                                         //  address for comparison purposes
+# endif
+
+    BOOST_SYSTEM_DECL const error_category & system_category()
+    {
+      static const system_error_category  system_category_const;
+      return system_category_const;
+    }
+
+    BOOST_SYSTEM_DECL const error_category & generic_category()
+    {
+      static const generic_error_category generic_category_const;
+      return generic_category_const;
+    }
+
+  } // namespace system
+} // namespace boost
diff --git a/ext/boost/libs/system/src/local_free_on_destruction.hpp b/ext/boost/libs/system/src/local_free_on_destruction.hpp
new file mode 100644
index 0000000..110024f
--- /dev/null
+++ b/ext/boost/libs/system/src/local_free_on_destruction.hpp
@@ -0,0 +1,40 @@
+//  local_free_on_exit.hpp  ------------------------------------------------------------//
+
+//  Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//  Copyright (c) 2010 Beman Dawes
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+//  This is derived from boost/asio/detail/local_free_on_block_exit.hpp to avoid
+//  a dependency on asio. Thanks to Chris Kohlhoff for pointing it out.
+
+#ifndef BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP
+#define BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP
+
+namespace boost {
+namespace system {
+namespace detail {
+
+class local_free_on_destruction
+{
+public:
+  explicit local_free_on_destruction(void* p)
+    : p_(p) {}
+
+  ~local_free_on_destruction()
+  {
+    ::LocalFree(p_);
+  }
+
+private:
+  void* p_;
+  local_free_on_destruction(const local_free_on_destruction&);  // = deleted
+  local_free_on_destruction& operator=(const local_free_on_destruction&);  // = deleted
+};
+
+} // namespace detail
+} // namespace system
+} // namespace boost
+
+#endif  // BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP
diff --git a/ext/boost/libs/thread/src/future.cpp b/ext/boost/libs/thread/src/future.cpp
new file mode 100644
index 0000000..33980f5
--- /dev/null
+++ b/ext/boost/libs/thread/src/future.cpp
@@ -0,0 +1,61 @@
+// (C) Copyright 2012 Vicente J. Botet Escriba
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/config.hpp>
+#ifndef BOOST_NO_EXCEPTIONS
+
+
+#include <boost/thread/future.hpp>
+
+namespace boost
+{
+
+  namespace thread_detail
+  {
+
+    class  future_error_category :
+      public boost::system::error_category
+    {
+    public:
+        virtual const char* name() const; //BOOST_NOEXCEPT;
+        virtual std::string message(int ev) const;
+    };
+
+    const char*
+    future_error_category::name() const //BOOST_NOEXCEPT
+    {
+        return "future";
+    }
+
+    std::string
+    future_error_category::message(int ev) const
+    {
+        switch (BOOST_SCOPED_ENUM_NATIVE(future_errc)(ev))
+        {
+        case future_errc::broken_promise:
+            return std::string("The associated promise has been destructed prior "
+                          "to the associated state becoming ready.");
+        case future_errc::future_already_retrieved:
+            return std::string("The future has already been retrieved from "
+                          "the promise or packaged_task.");
+        case future_errc::promise_already_satisfied:
+            return std::string("The state of the promise has already been set.");
+        case future_errc::no_state:
+            return std::string("Operation not permitted on an object without "
+                          "an associated state.");
+        }
+        return std::string("unspecified future_errc value\n");
+    }
+  }
+
+  const system::error_category&
+  future_category() BOOST_NOEXCEPT
+  {
+      static thread_detail::future_error_category f;
+      return f;
+  }
+
+}
+#endif
diff --git a/ext/boost/libs/thread/src/pthread/once.cpp b/ext/boost/libs/thread/src/pthread/once.cpp
new file mode 100644
index 0000000..d5fd656
--- /dev/null
+++ b/ext/boost/libs/thread/src/pthread/once.cpp
@@ -0,0 +1,72 @@
+// Copyright (C) 2007 Anthony Williams
+//
+//  Distributed under the Boost Software License, Version 1.0. (See accompanying
+//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#define __STDC_CONSTANT_MACROS
+#include <boost/thread/once.hpp>
+#include <boost/assert.hpp>
+#include <pthread.h>
+#include <stdlib.h>
+#include <memory>
+
+namespace boost
+{
+    namespace detail
+    {
+        BOOST_THREAD_DECL thread_detail::uintmax_atomic_t once_global_epoch=BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C;
+        BOOST_THREAD_DECL pthread_mutex_t once_epoch_mutex=PTHREAD_MUTEX_INITIALIZER;
+        BOOST_THREAD_DECL pthread_cond_t once_epoch_cv = PTHREAD_COND_INITIALIZER;
+
+        namespace
+        {
+            pthread_key_t epoch_tss_key;
+            pthread_once_t epoch_tss_key_flag=PTHREAD_ONCE_INIT;
+
+            extern "C"
+            {
+                static void delete_epoch_tss_data(void* data)
+                {
+                    free(data);
+                }
+
+                static void create_epoch_tss_key()
+                {
+                    BOOST_VERIFY(!pthread_key_create(&epoch_tss_key,delete_epoch_tss_data));
+                }
+            }
+
+#if defined BOOST_THREAD_PATCH
+            const pthread_once_t pthread_once_init_value=PTHREAD_ONCE_INIT;
+            struct BOOST_THREAD_DECL delete_epoch_tss_key_on_dlclose_t
+            {
+                delete_epoch_tss_key_on_dlclose_t()
+                {
+                }
+                ~delete_epoch_tss_key_on_dlclose_t()
+                {
+                    if(memcmp(&epoch_tss_key_flag, &pthread_once_init_value, sizeof(pthread_once_t)))
+                    {
+                        pthread_key_delete(epoch_tss_key);
+                    }
+                }
+            };
+            delete_epoch_tss_key_on_dlclose_t delete_epoch_tss_key_on_dlclose;
+#endif
+        }
+
+        thread_detail::uintmax_atomic_t& get_once_per_thread_epoch()
+        {
+            BOOST_VERIFY(!pthread_once(&epoch_tss_key_flag,create_epoch_tss_key));
+            void* data=pthread_getspecific(epoch_tss_key);
+            if(!data)
+            {
+                data=malloc(sizeof(thread_detail::uintmax_atomic_t));
+                BOOST_VERIFY(!pthread_setspecific(epoch_tss_key,data));
+                *static_cast<thread_detail::uintmax_atomic_t*>(data)=BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C;
+            }
+            return *static_cast<thread_detail::uintmax_atomic_t*>(data);
+        }
+    }
+
+}
diff --git a/ext/boost/libs/thread/src/pthread/thread.cpp b/ext/boost/libs/thread/src/pthread/thread.cpp
new file mode 100644
index 0000000..4321a26
--- /dev/null
+++ b/ext/boost/libs/thread/src/pthread/thread.cpp
@@ -0,0 +1,712 @@
+// Copyright (C) 2001-2003
+// William E. Kempf
+// Copyright (C) 2007-8 Anthony Williams
+// (C) Copyright 2011 Vicente J. Botet Escriba
+//
+//  Distributed under the Boost Software License, Version 1.0. (See accompanying
+//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/config.hpp>
+
+#include <boost/thread/thread.hpp>
+#include <boost/thread/xtime.hpp>
+#include <boost/thread/condition_variable.hpp>
+#include <boost/thread/locks.hpp>
+#include <boost/thread/once.hpp>
+#include <boost/thread/tss.hpp>
+#include <boost/throw_exception.hpp>
+
+#ifdef __GLIBC__
+#include <sys/sysinfo.h>
+#elif defined(__APPLE__) || defined(__FreeBSD__)
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#elif defined BOOST_HAS_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "./timeconv.inl"
+
+namespace boost
+{
+    namespace detail
+    {
+        thread_data_base::~thread_data_base()
+        {
+          {
+            for (notify_list_t::iterator i = notify.begin(), e = notify.end();
+                    i != e; ++i)
+            {
+                i->second->unlock();
+                i->first->notify_all();
+            }
+          }
+        }
+
+        struct thread_exit_callback_node
+        {
+            boost::detail::thread_exit_function_base* func;
+            thread_exit_callback_node* next;
+
+            thread_exit_callback_node(boost::detail::thread_exit_function_base* func_,
+                                      thread_exit_callback_node* next_):
+                func(func_),next(next_)
+            {}
+        };
+
+        namespace
+        {
+#ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11
+          boost::once_flag current_thread_tls_init_flag;
+#else
+            boost::once_flag current_thread_tls_init_flag=BOOST_ONCE_INIT;
+#endif
+            pthread_key_t current_thread_tls_key;
+
+            extern "C"
+            {
+                static void tls_destructor(void* data)
+                {
+                    boost::detail::thread_data_base* thread_info=static_cast<boost::detail::thread_data_base*>(data);
+                    if(thread_info)
+                    {
+                        while(!thread_info->tss_data.empty() || thread_info->thread_exit_callbacks)
+                        {
+                            while(thread_info->thread_exit_callbacks)
+                            {
+                                detail::thread_exit_callback_node* const current_node=thread_info->thread_exit_callbacks;
+                                thread_info->thread_exit_callbacks=current_node->next;
+                                if(current_node->func)
+                                {
+                                    (*current_node->func)();
+                                    delete current_node->func;
+                                }
+                                delete current_node;
+                            }
+                            for(std::map<void const*,tss_data_node>::iterator next=thread_info->tss_data.begin(),
+                                    current,
+                                    end=thread_info->tss_data.end();
+                                next!=end;)
+                            {
+                                current=next;
+                                ++next;
+                                if(current->second.func && (current->second.value!=0))
+                                {
+                                    (*current->second.func)(current->second.value);
+                                }
+                                thread_info->tss_data.erase(current);
+                            }
+                        }
+                        thread_info->self.reset();
+                    }
+                }
+            }
+
+#if defined BOOST_THREAD_PATCH
+
+            struct  delete_current_thread_tls_key_on_dlclose_t
+            {
+                delete_current_thread_tls_key_on_dlclose_t()
+                {
+                }
+                ~delete_current_thread_tls_key_on_dlclose_t()
+                {
+                    if (current_thread_tls_init_flag.epoch!=BOOST_ONCE_INITIAL_FLAG_VALUE)
+                    {
+                        pthread_key_delete(current_thread_tls_key);
+                    }
+                }
+            };
+            delete_current_thread_tls_key_on_dlclose_t delete_current_thread_tls_key_on_dlclose;
+#endif
+
+            void create_current_thread_tls_key()
+            {
+                BOOST_VERIFY(!pthread_key_create(&current_thread_tls_key,&tls_destructor));
+            }
+        }
+
+        boost::detail::thread_data_base* get_current_thread_data()
+        {
+            boost::call_once(current_thread_tls_init_flag,create_current_thread_tls_key);
+            return (boost::detail::thread_data_base*)pthread_getspecific(current_thread_tls_key);
+        }
+
+        void set_current_thread_data(detail::thread_data_base* new_data)
+        {
+            boost::call_once(current_thread_tls_init_flag,create_current_thread_tls_key);
+            BOOST_VERIFY(!pthread_setspecific(current_thread_tls_key,new_data));
+        }
+    }
+
+    namespace
+    {
+        extern "C"
+        {
+            static void* thread_proxy(void* param)
+            {
+                boost::detail::thread_data_ptr thread_info = static_cast<boost::detail::thread_data_base*>(param)->self;
+                thread_info->self.reset();
+                detail::set_current_thread_data(thread_info.get());
+                BOOST_TRY
+                {
+                    thread_info->run();
+                }
+                BOOST_CATCH (thread_interrupted const&)
+                {
+                }
+                BOOST_CATCH_END
+// Removed as it stops the debugger identifying the cause of the exception
+// Unhandled exceptions still cause the application to terminate
+//                 BOOST_CATCH(...)
+//                 {
+//                     std::terminate();
+//                 }
+
+                detail::tls_destructor(thread_info.get());
+                detail::set_current_thread_data(0);
+                boost::lock_guard<boost::mutex> lock(thread_info->data_mutex);
+                thread_info->done=true;
+                thread_info->done_condition.notify_all();
+                return 0;
+            }
+        }
+
+        struct externally_launched_thread:
+            detail::thread_data_base
+        {
+            externally_launched_thread()
+            {
+                interrupt_enabled=false;
+            }
+
+            void run()
+            {}
+            void notify_all_at_thread_exit(condition_variable*, mutex*)
+            {}
+
+        private:
+            externally_launched_thread(externally_launched_thread&);
+            void operator=(externally_launched_thread&);
+        };
+
+        detail::thread_data_base* make_external_thread_data()
+        {
+            detail::thread_data_base* const me(new externally_launched_thread());
+            me->self.reset(me);
+            set_current_thread_data(me);
+            return me;
+        }
+
+
+        detail::thread_data_base* get_or_make_current_thread_data()
+        {
+            detail::thread_data_base* current_thread_data(detail::get_current_thread_data());
+            if(!current_thread_data)
+            {
+                current_thread_data=make_external_thread_data();
+            }
+            return current_thread_data;
+        }
+
+    }
+
+
+    thread::thread() BOOST_NOEXCEPT
+    {}
+
+    void thread::start_thread()
+    {
+        thread_info->self=thread_info;
+        int const res = pthread_create(&thread_info->thread_handle, 0, &thread_proxy, thread_info.get());
+        if (res != 0)
+        {
+            thread_info->self.reset();
+            boost::throw_exception(thread_resource_error(res, "boost thread: failed in pthread_create"));
+        }
+    }
+
+    void thread::start_thread(const attributes& attr)
+    {
+        thread_info->self=thread_info;
+        const attributes::native_handle_type* h = attr.native_handle();
+        int res = pthread_create(&thread_info->thread_handle, h, &thread_proxy, thread_info.get());
+        if (res != 0)
+        {
+            thread_info->self.reset();
+            boost::throw_exception(thread_resource_error());
+        }
+        int detached_state;
+        res = pthread_attr_getdetachstate(h, &detached_state);
+        if (res != 0)
+        {
+            thread_info->self.reset();
+            boost::throw_exception(thread_resource_error());
+        }
+        if (PTHREAD_CREATE_DETACHED==detached_state)
+        {
+          detail::thread_data_ptr local_thread_info;
+          thread_info.swap(local_thread_info);
+
+          if(local_thread_info)
+          {
+              //lock_guard<mutex> lock(local_thread_info->data_mutex);
+              if(!local_thread_info->join_started)
+              {
+                  //BOOST_VERIFY(!pthread_detach(local_thread_info->thread_handle));
+                  local_thread_info->join_started=true;
+                  local_thread_info->joined=true;
+              }
+          }
+        }
+    }
+
+
+
+    detail::thread_data_ptr thread::get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const
+    {
+        return thread_info;
+    }
+
+    void thread::join()
+    {
+        if (this_thread::get_id() == get_id())
+        {
+            boost::throw_exception(thread_resource_error(system::errc::resource_deadlock_would_occur, "boost thread: trying joining itself"));
+        }
+        detail::thread_data_ptr const local_thread_info=(get_thread_info)();
+        if(local_thread_info)
+        {
+            bool do_join=false;
+
+            {
+                unique_lock<mutex> lock(local_thread_info->data_mutex);
+                while(!local_thread_info->done)
+                {
+                    local_thread_info->done_condition.wait(lock);
+                }
+                do_join=!local_thread_info->join_started;
+
+                if(do_join)
+                {
+                    local_thread_info->join_started=true;
+                }
+                else
+                {
+                    while(!local_thread_info->joined)
+                    {
+                        local_thread_info->done_condition.wait(lock);
+                    }
+                }
+            }
+            if(do_join)
+            {
+                void* result=0;
+                BOOST_VERIFY(!pthread_join(local_thread_info->thread_handle,&result));
+                lock_guard<mutex> lock(local_thread_info->data_mutex);
+                local_thread_info->joined=true;
+                local_thread_info->done_condition.notify_all();
+            }
+
+            if(thread_info==local_thread_info)
+            {
+                thread_info.reset();
+            }
+        }
+        else
+        {
+#ifdef BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED
+          boost::throw_exception(thread_resource_error(system::errc::invalid_argument, "boost thread: thread not joinable"));
+#endif
+        }
+    }
+
+    bool thread::do_try_join_until(struct timespec const &timeout)
+    {
+        if (this_thread::get_id() == get_id())
+        {
+            boost::throw_exception(thread_resource_error(system::errc::resource_deadlock_would_occur, "boost thread: trying joining itself"));
+        }
+        detail::thread_data_ptr const local_thread_info=(get_thread_info)();
+        if(local_thread_info)
+        {
+            bool do_join=false;
+
+            {
+                unique_lock<mutex> lock(local_thread_info->data_mutex);
+                while(!local_thread_info->done)
+                {
+                    if(!local_thread_info->done_condition.do_timed_wait(lock,timeout))
+                    {
+                        return false;
+                    }
+                }
+                do_join=!local_thread_info->join_started;
+
+                if(do_join)
+                {
+                    local_thread_info->join_started=true;
+                }
+                else
+                {
+                    while(!local_thread_info->joined)
+                    {
+                        local_thread_info->done_condition.wait(lock);
+                    }
+                }
+            }
+            if(do_join)
+            {
+                void* result=0;
+                BOOST_VERIFY(!pthread_join(local_thread_info->thread_handle,&result));
+                lock_guard<mutex> lock(local_thread_info->data_mutex);
+                local_thread_info->joined=true;
+                local_thread_info->done_condition.notify_all();
+            }
+
+            if(thread_info==local_thread_info)
+            {
+                thread_info.reset();
+            }
+            return true;
+        }
+        else
+        {
+#ifdef BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED
+          boost::throw_exception(thread_resource_error(system::errc::invalid_argument, "boost thread: thread not joinable"));
+#endif
+        }
+    }
+
+    bool thread::joinable() const BOOST_NOEXCEPT
+    {
+        return (get_thread_info)();
+    }
+
+
+    void thread::detach()
+    {
+        detail::thread_data_ptr local_thread_info;
+        thread_info.swap(local_thread_info);
+
+        if(local_thread_info)
+        {
+            lock_guard<mutex> lock(local_thread_info->data_mutex);
+            if(!local_thread_info->join_started)
+            {
+                BOOST_VERIFY(!pthread_detach(local_thread_info->thread_handle));
+                local_thread_info->join_started=true;
+                local_thread_info->joined=true;
+            }
+        }
+    }
+
+    namespace this_thread
+    {
+
+#ifdef __DECXXX
+        /// Workaround of DECCXX issue of incorrect template substitution
+        template<>
+#endif
+        void sleep(const system_time& st)
+        {
+            detail::thread_data_base* const thread_info=detail::get_current_thread_data();
+
+            if(thread_info)
+            {
+                unique_lock<mutex> lk(thread_info->sleep_mutex);
+                while(thread_info->sleep_condition.timed_wait(lk,st)) {}
+            }
+            else
+            {
+                xtime const xt=get_xtime(st);
+
+                for (int foo=0; foo < 5; ++foo)
+                {
+#   if defined(BOOST_HAS_PTHREAD_DELAY_NP)
+                    timespec ts;
+                    to_timespec_duration(xt, ts);
+                    BOOST_VERIFY(!pthread_delay_np(&ts));
+#   elif defined(BOOST_HAS_NANOSLEEP)
+                    timespec ts;
+                    to_timespec_duration(xt, ts);
+
+                    //  nanosleep takes a timespec that is an offset, not
+                    //  an absolute time.
+                    nanosleep(&ts, 0);
+#   else
+                    mutex mx;
+                    mutex::scoped_lock lock(mx);
+                    condition cond;
+                    cond.timed_wait(lock, xt);
+#   endif
+                    xtime cur;
+                    xtime_get(&cur, TIME_UTC_);
+                    if (xtime_cmp(xt, cur) <= 0)
+                        return;
+                }
+            }
+        }
+
+        void yield() BOOST_NOEXCEPT
+        {
+#   if defined(BOOST_HAS_SCHED_YIELD)
+            BOOST_VERIFY(!sched_yield());
+#   elif defined(BOOST_HAS_PTHREAD_YIELD)
+            BOOST_VERIFY(!pthread_yield());
+#   else
+            xtime xt;
+            xtime_get(&xt, TIME_UTC_);
+            sleep(xt);
+#   endif
+        }
+    }
+    unsigned thread::hardware_concurrency() BOOST_NOEXCEPT
+    {
+#if defined(PTW32_VERSION) || defined(__hpux)
+        return pthread_num_processors_np();
+#elif defined(__APPLE__) || defined(__FreeBSD__)
+        int count;
+        size_t size=sizeof(count);
+        return sysctlbyname("hw.ncpu",&count,&size,NULL,0)?0:count;
+#elif defined(BOOST_HAS_UNISTD_H) && defined(_SC_NPROCESSORS_ONLN)
+        int const count=sysconf(_SC_NPROCESSORS_ONLN);
+        return (count>0)?count:0;
+#elif defined(__GLIBC__)
+        return get_nprocs();
+#else
+        return 0;
+#endif
+    }
+
+    thread::id thread::get_id() const BOOST_NOEXCEPT
+    {
+    #if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+        //return local_thread_info->thread_handle;
+        return const_cast<thread*>(this)->native_handle();
+    #else
+        detail::thread_data_ptr const local_thread_info=(get_thread_info)();
+        if(local_thread_info)
+        {
+            return id(local_thread_info);
+        }
+        else
+        {
+                return id();
+        }
+    #endif
+    }
+
+    void thread::interrupt()
+    {
+        detail::thread_data_ptr const local_thread_info=(get_thread_info)();
+        if(local_thread_info)
+        {
+            lock_guard<mutex> lk(local_thread_info->data_mutex);
+            local_thread_info->interrupt_requested=true;
+            if(local_thread_info->current_cond)
+            {
+                boost::pthread::pthread_mutex_scoped_lock internal_lock(local_thread_info->cond_mutex);
+                BOOST_VERIFY(!pthread_cond_broadcast(local_thread_info->current_cond));
+            }
+        }
+    }
+
+    bool thread::interruption_requested() const BOOST_NOEXCEPT
+    {
+        detail::thread_data_ptr const local_thread_info=(get_thread_info)();
+        if(local_thread_info)
+        {
+            lock_guard<mutex> lk(local_thread_info->data_mutex);
+            return local_thread_info->interrupt_requested;
+        }
+        else
+        {
+            return false;
+        }
+    }
+
+    thread::native_handle_type thread::native_handle()
+    {
+        detail::thread_data_ptr const local_thread_info=(get_thread_info)();
+        if(local_thread_info)
+        {
+            lock_guard<mutex> lk(local_thread_info->data_mutex);
+            return local_thread_info->thread_handle;
+        }
+        else
+        {
+            return pthread_t();
+        }
+    }
+
+
+
+    namespace this_thread
+    {
+        thread::id get_id() BOOST_NOEXCEPT
+        {
+        #if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+             return pthread_self();
+        #else
+            boost::detail::thread_data_base* const thread_info=get_or_make_current_thread_data();
+            return thread::id(thread_info?thread_info->shared_from_this():detail::thread_data_ptr());
+        #endif
+        }
+
+        void interruption_point()
+        {
+#ifndef BOOST_NO_EXCEPTIONS
+            boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data();
+            if(thread_info && thread_info->interrupt_enabled)
+            {
+                lock_guard<mutex> lg(thread_info->data_mutex);
+                if(thread_info->interrupt_requested)
+                {
+                    thread_info->interrupt_requested=false;
+                    throw thread_interrupted();
+                }
+            }
+#endif
+        }
+
+        bool interruption_enabled() BOOST_NOEXCEPT
+        {
+            boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data();
+            return thread_info && thread_info->interrupt_enabled;
+        }
+
+        bool interruption_requested() BOOST_NOEXCEPT
+        {
+            boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data();
+            if(!thread_info)
+            {
+                return false;
+            }
+            else
+            {
+                lock_guard<mutex> lg(thread_info->data_mutex);
+                return thread_info->interrupt_requested;
+            }
+        }
+
+        disable_interruption::disable_interruption() BOOST_NOEXCEPT:
+            interruption_was_enabled(interruption_enabled())
+        {
+            if(interruption_was_enabled)
+            {
+                detail::get_current_thread_data()->interrupt_enabled=false;
+            }
+        }
+
+        disable_interruption::~disable_interruption() BOOST_NOEXCEPT
+        {
+            if(detail::get_current_thread_data())
+            {
+                detail::get_current_thread_data()->interrupt_enabled=interruption_was_enabled;
+            }
+        }
+
+        restore_interruption::restore_interruption(disable_interruption& d) BOOST_NOEXCEPT
+        {
+            if(d.interruption_was_enabled)
+            {
+                detail::get_current_thread_data()->interrupt_enabled=true;
+            }
+        }
+
+        restore_interruption::~restore_interruption() BOOST_NOEXCEPT
+        {
+            if(detail::get_current_thread_data())
+            {
+                detail::get_current_thread_data()->interrupt_enabled=false;
+            }
+        }
+    }
+
+    namespace detail
+    {
+        void add_thread_exit_function(thread_exit_function_base* func)
+        {
+            detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
+            thread_exit_callback_node* const new_node=
+                new thread_exit_callback_node(func,current_thread_data->thread_exit_callbacks);
+            current_thread_data->thread_exit_callbacks=new_node;
+        }
+
+        tss_data_node* find_tss_data(void const* key)
+        {
+            detail::thread_data_base* const current_thread_data(get_current_thread_data());
+            if(current_thread_data)
+            {
+                std::map<void const*,tss_data_node>::iterator current_node=
+                    current_thread_data->tss_data.find(key);
+                if(current_node!=current_thread_data->tss_data.end())
+                {
+                    return &current_node->second;
+                }
+            }
+            return 0;
+        }
+
+        void* get_tss_data(void const* key)
+        {
+            if(tss_data_node* const current_node=find_tss_data(key))
+            {
+                return current_node->value;
+            }
+            return 0;
+        }
+
+        void add_new_tss_node(void const* key,
+                              boost::shared_ptr<tss_cleanup_function> func,
+                              void* tss_data)
+        {
+            detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
+            current_thread_data->tss_data.insert(std::make_pair(key,tss_data_node(func,tss_data)));
+        }
+
+        void erase_tss_node(void const* key)
+        {
+            detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
+            current_thread_data->tss_data.erase(key);
+        }
+
+        void set_tss_data(void const* key,
+                          boost::shared_ptr<tss_cleanup_function> func,
+                          void* tss_data,bool cleanup_existing)
+        {
+            if(tss_data_node* const current_node=find_tss_data(key))
+            {
+                if(cleanup_existing && current_node->func && (current_node->value!=0))
+                {
+                    (*current_node->func)(current_node->value);
+                }
+                if(func || (tss_data!=0))
+                {
+                    current_node->func=func;
+                    current_node->value=tss_data;
+                }
+                else
+                {
+                    erase_tss_node(key);
+                }
+            }
+            else if(func || (tss_data!=0))
+            {
+                add_new_tss_node(key,func,tss_data);
+            }
+        }
+    }
+    BOOST_THREAD_DECL void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk)
+    {
+      detail::thread_data_base* const current_thread_data(detail::get_current_thread_data());
+      if(current_thread_data)
+      {
+        current_thread_data->notify_all_at_thread_exit(&cond, lk.release());
+      }
+    }
+
+
+
+}
diff --git a/ext/boost/libs/thread/src/pthread/timeconv.inl b/ext/boost/libs/thread/src/pthread/timeconv.inl
new file mode 100644
index 0000000..cab7c55
--- /dev/null
+++ b/ext/boost/libs/thread/src/pthread/timeconv.inl
@@ -0,0 +1,132 @@
+// Copyright (C) 2001-2003
+// William E. Kempf
+// Copyright (C) 2009 Anthony Williams
+//
+//  Distributed under the Boost Software License, Version 1.0. (See accompanying 
+//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// boostinspect:nounnamed
+
+#include <boost/assert.hpp>
+
+namespace {
+const int MILLISECONDS_PER_SECOND = 1000;
+const int NANOSECONDS_PER_SECOND = 1000000000;
+const int NANOSECONDS_PER_MILLISECOND = 1000000;
+
+const int MICROSECONDS_PER_SECOND = 1000000;
+const int NANOSECONDS_PER_MICROSECOND = 1000;
+
+inline void to_time(int milliseconds, boost::xtime& xt)
+{
+    int res = 0;
+    res = boost::xtime_get(&xt, boost::TIME_UTC_);
+    BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
+
+    xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
+    xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
+        NANOSECONDS_PER_MILLISECOND);
+
+    if (xt.nsec >= NANOSECONDS_PER_SECOND)
+    {
+        ++xt.sec;
+        xt.nsec -= NANOSECONDS_PER_SECOND;
+    }
+}
+#if defined(BOOST_HAS_PTHREADS)
+inline void to_timespec(const boost::xtime& xt, timespec& ts)
+{
+    ts.tv_sec = static_cast<int>(xt.sec);
+    ts.tv_nsec = static_cast<int>(xt.nsec);
+    if(ts.tv_nsec >= NANOSECONDS_PER_SECOND)
+    {
+        ts.tv_sec += ts.tv_nsec / NANOSECONDS_PER_SECOND;
+        ts.tv_nsec %= NANOSECONDS_PER_SECOND;
+    }
+}
+
+inline void to_time(int milliseconds, timespec& ts)
+{
+    boost::xtime xt;
+    to_time(milliseconds, xt);
+    to_timespec(xt, ts);
+}
+
+inline void to_timespec_duration(const boost::xtime& xt, timespec& ts)
+{
+    boost::xtime cur;
+    int res = 0;
+    res = boost::xtime_get(&cur, boost::TIME_UTC_);
+    BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
+
+    if (boost::xtime_cmp(xt, cur) <= 0)
+    {
+        ts.tv_sec = 0;
+        ts.tv_nsec = 0;
+    }
+    else
+    {
+        ts.tv_sec = xt.sec - cur.sec;
+        ts.tv_nsec = xt.nsec - cur.nsec;
+
+        if( ts.tv_nsec < 0 )
+        {
+            ts.tv_sec -= 1;
+            ts.tv_nsec += NANOSECONDS_PER_SECOND;
+        }
+        if(ts.tv_nsec >= NANOSECONDS_PER_SECOND)
+        {
+            ts.tv_sec += ts.tv_nsec / NANOSECONDS_PER_SECOND;
+            ts.tv_nsec %= NANOSECONDS_PER_SECOND;
+        }
+    }
+}
+#endif
+
+inline void to_duration(boost::xtime xt, int& milliseconds)
+{
+    boost::xtime cur;
+    int res = 0;
+    res = boost::xtime_get(&cur, boost::TIME_UTC_);
+    BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
+
+    if (boost::xtime_cmp(xt, cur) <= 0)
+        milliseconds = 0;
+    else
+    {
+        if (cur.nsec > xt.nsec)
+        {
+            xt.nsec += NANOSECONDS_PER_SECOND;
+            --xt.sec;
+        }
+        milliseconds = (int)((xt.sec - cur.sec) * MILLISECONDS_PER_SECOND) +
+            (((xt.nsec - cur.nsec) + (NANOSECONDS_PER_MILLISECOND/2)) /
+                NANOSECONDS_PER_MILLISECOND);
+    }
+}
+
+inline void to_microduration(boost::xtime xt, int& microseconds)
+{
+    boost::xtime cur;
+    int res = 0;
+    res = boost::xtime_get(&cur, boost::TIME_UTC_);
+    BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
+
+    if (boost::xtime_cmp(xt, cur) <= 0)
+        microseconds = 0;
+    else
+    {
+        if (cur.nsec > xt.nsec)
+        {
+            xt.nsec += NANOSECONDS_PER_SECOND;
+            --xt.sec;
+        }
+        microseconds = (int)((xt.sec - cur.sec) * MICROSECONDS_PER_SECOND) +
+            (((xt.nsec - cur.nsec) + (NANOSECONDS_PER_MICROSECOND/2)) /
+                NANOSECONDS_PER_MICROSECOND);
+    }
+}
+}
+
+// Change Log:
+//    1 Jun 01  Initial creation.
diff --git a/ext/boost/libs/thread/src/tss_null.cpp b/ext/boost/libs/thread/src/tss_null.cpp
new file mode 100644
index 0000000..b5029f1
--- /dev/null
+++ b/ext/boost/libs/thread/src/tss_null.cpp
@@ -0,0 +1,38 @@
+// (C) Copyright Michael Glassford 2004.
+// (C) Copyright 2007 Anthony Williams
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/config.hpp>
+
+#if defined(BOOST_HAS_WINTHREADS) && (defined(BOOST_THREAD_BUILD_LIB) || defined(BOOST_THREAD_TEST) || defined(UNDER_CE)) && (!defined(_MSC_VER) || defined(UNDER_CE))
+
+namespace boost
+{
+    /*
+    This file is a "null" implementation of tss cleanup; it's
+    purpose is to to eliminate link errors in cases
+    where it is known that tss cleanup is not needed.
+    */
+
+    void tss_cleanup_implemented(void)
+    {
+        /*
+        This function's sole purpose is to cause a link error in cases where
+        automatic tss cleanup is not implemented by Boost.Threads as a
+        reminder that user code is responsible for calling the necessary
+        functions at the appropriate times (and for implementing an a
+        tss_cleanup_implemented() function to eliminate the linker's
+        missing symbol error).
+
+        If Boost.Threads later implements automatic tss cleanup in cases
+        where it currently doesn't (which is the plan), the duplicate
+        symbol error will warn the user that their custom solution is no
+        longer needed and can be removed.
+        */
+    }
+
+}
+
+#endif //defined(BOOST_HAS_WINTHREADS) && defined(BOOST_THREAD_BUILD_LIB) && !defined(_MSC_VER)
diff --git a/ext/boost/math/policies/policy.hpp b/ext/boost/math/policies/policy.hpp
new file mode 100644
index 0000000..01fe3d0
--- /dev/null
+++ b/ext/boost/math/policies/policy.hpp
@@ -0,0 +1,982 @@
+//  Copyright John Maddock 2007.
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_POLICY_HPP
+#define BOOST_MATH_POLICY_HPP
+
+#include <boost/mpl/list.hpp>
+#include <boost/mpl/contains.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/find_if.hpp>
+#include <boost/mpl/remove_if.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/push_back.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/comparison.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/assert.hpp>
+#include <boost/math/tools/config.hpp>
+#include <limits>
+// Sadly we do need the .h versions of these to be sure of getting
+// FLT_MANT_DIG etc.
+#include <limits.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <math.h>
+
+namespace boost{ namespace math{ 
+
+namespace tools{
+
+template <class T>
+int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T));
+template <class T>
+T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T));
+
+}
+
+namespace policies{
+
+//
+// Define macros for our default policies, if they're not defined already:
+//
+#ifndef BOOST_MATH_DOMAIN_ERROR_POLICY
+#define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error
+#endif
+#ifndef BOOST_MATH_POLE_ERROR_POLICY
+#define BOOST_MATH_POLE_ERROR_POLICY throw_on_error
+#endif
+#ifndef BOOST_MATH_OVERFLOW_ERROR_POLICY
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error
+#endif
+#ifndef BOOST_MATH_EVALUATION_ERROR_POLICY
+#define BOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error
+#endif
+#ifndef BOOST_MATH_ROUNDING_ERROR_POLICY
+#define BOOST_MATH_ROUNDING_ERROR_POLICY throw_on_error
+#endif
+#ifndef BOOST_MATH_UNDERFLOW_ERROR_POLICY
+#define BOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error
+#endif
+#ifndef BOOST_MATH_DENORM_ERROR_POLICY
+#define BOOST_MATH_DENORM_ERROR_POLICY ignore_error
+#endif
+#ifndef BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY
+#define BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY ignore_error
+#endif
+#ifndef BOOST_MATH_DIGITS10_POLICY
+#define BOOST_MATH_DIGITS10_POLICY 0
+#endif
+#ifndef BOOST_MATH_PROMOTE_FLOAT_POLICY
+#define BOOST_MATH_PROMOTE_FLOAT_POLICY true
+#endif
+#ifndef BOOST_MATH_PROMOTE_DOUBLE_POLICY
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false
+#else
+#define BOOST_MATH_PROMOTE_DOUBLE_POLICY true
+#endif
+#endif
+#ifndef BOOST_MATH_DISCRETE_QUANTILE_POLICY
+#define BOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards
+#endif
+#ifndef BOOST_MATH_ASSERT_UNDEFINED_POLICY
+#define BOOST_MATH_ASSERT_UNDEFINED_POLICY true
+#endif
+#ifndef BOOST_MATH_MAX_SERIES_ITERATION_POLICY
+#define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000
+#endif
+#ifndef BOOST_MATH_MAX_ROOT_ITERATION_POLICY
+#define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200
+#endif
+
+#if !defined(__BORLANDC__) \
+   && !(defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ <= 2))
+#define BOOST_MATH_META_INT(type, name, Default)\
+   template <type N = Default> struct name : public boost::mpl::int_<N>{};\
+   namespace detail{\
+   template <type N>\
+   char test_is_valid_arg(const name<N>*);\
+   char test_is_default_arg(const name<Default>*);\
+   template <class T> struct is_##name##_imp\
+   {\
+      template <type N> static char test(const name<N>*);\
+      static double test(...);\
+      BOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast<T*>(0))) == 1);\
+   };\
+   }\
+   template <class T> struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp<T>::value>{};
+
+#define BOOST_MATH_META_BOOL(name, Default)\
+   template <bool N = Default> struct name : public boost::mpl::bool_<N>{};\
+   namespace detail{\
+   template <bool N>\
+   char test_is_valid_arg(const name<N>*);\
+   char test_is_default_arg(const name<Default>*);\
+   template <class T> struct is_##name##_imp\
+   {\
+      template <bool N> static char test(const name<N>*);\
+      static double test(...);\
+      BOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast<T*>(0))) == 1);\
+   };\
+   }\
+   template <class T> struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp<T>::value>{};
+#else
+#define BOOST_MATH_META_INT(Type, name, Default)\
+   template <Type N = Default> struct name : public boost::mpl::int_<N>{};\
+   namespace detail{\
+   template <Type N>\
+   char test_is_valid_arg(const name<N>*);\
+   char test_is_default_arg(const name<Default>*);\
+   template <class T> struct is_##name##_tester\
+   {\
+      template <Type N> static char test(const name<N>&);\
+      static double test(...);\
+   };\
+   template <class T> struct is_##name##_imp\
+   {\
+      static T inst;\
+      BOOST_STATIC_CONSTANT(bool, value = sizeof( ::boost::math::policies::detail::is_##name##_tester<T>::test(inst)) == 1);\
+   };\
+   }\
+   template <class T> struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp<T>::value>\
+   {\
+      template <class U> struct apply{ typedef is_##name<U> type; };\
+   };
+
+#define BOOST_MATH_META_BOOL(name, Default)\
+   template <bool N = Default> struct name : public boost::mpl::bool_<N>{};\
+   namespace detail{\
+   template <bool N>\
+   char test_is_valid_arg(const name<N>*);\
+   char test_is_default_arg(const name<Default>*);\
+   template <class T> struct is_##name##_tester\
+   {\
+      template <bool N> static char test(const name<N>&);\
+      static double test(...);\
+   };\
+   template <class T> struct is_##name##_imp\
+   {\
+      static T inst;\
+      BOOST_STATIC_CONSTANT(bool, value = sizeof( ::boost::math::policies::detail::is_##name##_tester<T>::test(inst)) == 1);\
+   };\
+   }\
+   template <class T> struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp<T>::value>\
+   {\
+      template <class U> struct apply{ typedef is_##name<U> type;  };\
+   };
+#endif
+//
+// Begin by defining policy types for error handling:
+//
+enum error_policy_type
+{
+   throw_on_error = 0,
+   errno_on_error = 1,
+   ignore_error = 2,
+   user_error = 3
+};
+
+BOOST_MATH_META_INT(error_policy_type, domain_error, BOOST_MATH_DOMAIN_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, pole_error, BOOST_MATH_POLE_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, overflow_error, BOOST_MATH_OVERFLOW_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, underflow_error, BOOST_MATH_UNDERFLOW_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, denorm_error, BOOST_MATH_DENORM_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, evaluation_error, BOOST_MATH_EVALUATION_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, rounding_error, BOOST_MATH_ROUNDING_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, indeterminate_result_error, BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY)
+
+//
+// Policy types for internal promotion:
+//
+BOOST_MATH_META_BOOL(promote_float, BOOST_MATH_PROMOTE_FLOAT_POLICY)
+BOOST_MATH_META_BOOL(promote_double, BOOST_MATH_PROMOTE_DOUBLE_POLICY)
+BOOST_MATH_META_BOOL(assert_undefined, BOOST_MATH_ASSERT_UNDEFINED_POLICY)
+//
+// Policy types for discrete quantiles:
+//
+enum discrete_quantile_policy_type
+{
+   real,
+   integer_round_outwards,
+   integer_round_inwards,
+   integer_round_down,
+   integer_round_up,
+   integer_round_nearest
+};
+
+BOOST_MATH_META_INT(discrete_quantile_policy_type, discrete_quantile, BOOST_MATH_DISCRETE_QUANTILE_POLICY)
+//
+// Precision:
+//
+BOOST_MATH_META_INT(int, digits10, BOOST_MATH_DIGITS10_POLICY)
+BOOST_MATH_META_INT(int, digits2, 0)
+//
+// Iterations:
+//
+BOOST_MATH_META_INT(unsigned long, max_series_iterations, BOOST_MATH_MAX_SERIES_ITERATION_POLICY)
+BOOST_MATH_META_INT(unsigned long, max_root_iterations, BOOST_MATH_MAX_ROOT_ITERATION_POLICY)
+//
+// Define the names for each possible policy:
+//
+#define BOOST_MATH_PARAMETER(name)\
+   BOOST_PARAMETER_TEMPLATE_KEYWORD(name##_name)\
+   BOOST_PARAMETER_NAME(name##_name)
+
+struct default_policy{};
+
+namespace detail{
+//
+// Trait to work out bits precision from digits10 and digits2:
+//
+template <class Digits10, class Digits2>
+struct precision
+{
+   //
+   // Now work out the precision:
+   //
+   typedef typename mpl::if_c<
+      (Digits10::value == 0),
+      digits2<0>,
+      digits2<((Digits10::value + 1) * 1000L) / 301L>
+   >::type digits2_type;
+public:
+#ifdef __BORLANDC__
+   typedef typename mpl::if_c<
+      (Digits2::value > ::boost::math::policies::detail::precision<Digits10,Digits2>::digits2_type::value),
+      Digits2, digits2_type>::type type;
+#else
+   typedef typename mpl::if_c<
+      (Digits2::value > digits2_type::value),
+      Digits2, digits2_type>::type type;
+#endif
+};
+
+template <class A, class B, bool b>
+struct select_result
+{
+   typedef A type;
+};
+template <class A, class B>
+struct select_result<A, B, false>
+{
+   typedef typename mpl::deref<B>::type type;
+};
+
+template <class Seq, class Pred, class DefaultType>
+struct find_arg
+{
+private:
+   typedef typename mpl::find_if<Seq, Pred>::type iter;
+   typedef typename mpl::end<Seq>::type end_type;
+public:
+   typedef typename select_result<
+      DefaultType, iter,
+      ::boost::is_same<iter, end_type>::value>::type type;
+};
+
+double test_is_valid_arg(...);
+double test_is_default_arg(...);
+char test_is_valid_arg(const default_policy*);
+char test_is_default_arg(const default_policy*);
+
+template <class T>
+struct is_valid_policy_imp 
+{
+   BOOST_STATIC_CONSTANT(bool, value = sizeof(::boost::math::policies::detail::test_is_valid_arg(static_cast<T*>(0))) == 1);
+};
+
+template <class T>
+struct is_default_policy_imp
+{
+   BOOST_STATIC_CONSTANT(bool, value = sizeof(::boost::math::policies::detail::test_is_default_arg(static_cast<T*>(0))) == 1);
+};
+
+template <class T> struct is_valid_policy 
+: public mpl::bool_< 
+   ::boost::math::policies::detail::is_valid_policy_imp<T>::value>
+{};
+
+template <class T> struct is_default_policy 
+: public mpl::bool_< 
+   ::boost::math::policies::detail::is_default_policy_imp<T>::value>
+{
+   template <class U>
+   struct apply
+   {
+      typedef is_default_policy<U> type;
+   };
+};
+
+template <class Seq, class T, int N>
+struct append_N
+{
+   typedef typename mpl::push_back<Seq, T>::type new_seq;
+   typedef typename append_N<new_seq, T, N-1>::type type;
+};
+
+template <class Seq, class T>
+struct append_N<Seq, T, 0>
+{
+   typedef Seq type;
+};
+
+//
+// Traits class to work out what template parameters our default
+// policy<> class will have when modified for forwarding:
+//
+template <bool f, bool d>
+struct default_args
+{
+   typedef promote_float<false> arg1;
+   typedef promote_double<false> arg2;
+};
+
+template <>
+struct default_args<false, false>
+{
+   typedef default_policy arg1;
+   typedef default_policy arg2;
+};
+
+template <>
+struct default_args<true, false>
+{
+   typedef promote_float<false> arg1;
+   typedef default_policy arg2;
+};
+
+template <>
+struct default_args<false, true>
+{
+   typedef promote_double<false> arg1;
+   typedef default_policy arg2;
+};
+
+typedef default_args<BOOST_MATH_PROMOTE_FLOAT_POLICY, BOOST_MATH_PROMOTE_DOUBLE_POLICY>::arg1 forwarding_arg1;
+typedef default_args<BOOST_MATH_PROMOTE_FLOAT_POLICY, BOOST_MATH_PROMOTE_DOUBLE_POLICY>::arg2 forwarding_arg2;
+
+} // detail
+//
+// Now define the policy type with enough arguments to handle all
+// the policies:
+//
+template <class A1 = default_policy, 
+          class A2 = default_policy, 
+          class A3 = default_policy,
+          class A4 = default_policy,
+          class A5 = default_policy,
+          class A6 = default_policy,
+          class A7 = default_policy,
+          class A8 = default_policy,
+          class A9 = default_policy,
+          class A10 = default_policy,
+          class A11 = default_policy,
+          class A12 = default_policy,
+          class A13 = default_policy>
+struct policy
+{
+private:
+   //
+   // Validate all our arguments:
+   //
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A1>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A2>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A3>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A4>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A5>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A6>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A7>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A8>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A9>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A10>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A11>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A12>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A13>::value);
+   //
+   // Typelist of the arguments:
+   //
+   typedef mpl::list<A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13> arg_list;
+
+public:
+   typedef typename detail::find_arg<arg_list, is_domain_error<mpl::_1>, domain_error<> >::type domain_error_type;
+   typedef typename detail::find_arg<arg_list, is_pole_error<mpl::_1>, pole_error<> >::type pole_error_type;
+   typedef typename detail::find_arg<arg_list, is_overflow_error<mpl::_1>, overflow_error<> >::type overflow_error_type;
+   typedef typename detail::find_arg<arg_list, is_underflow_error<mpl::_1>, underflow_error<> >::type underflow_error_type;
+   typedef typename detail::find_arg<arg_list, is_denorm_error<mpl::_1>, denorm_error<> >::type denorm_error_type;
+   typedef typename detail::find_arg<arg_list, is_evaluation_error<mpl::_1>, evaluation_error<> >::type evaluation_error_type;
+   typedef typename detail::find_arg<arg_list, is_rounding_error<mpl::_1>, rounding_error<> >::type rounding_error_type;
+   typedef typename detail::find_arg<arg_list, is_indeterminate_result_error<mpl::_1>, indeterminate_result_error<> >::type indeterminate_result_error_type;
+private:
+   //
+   // Now work out the precision:
+   //
+   typedef typename detail::find_arg<arg_list, is_digits10<mpl::_1>, digits10<> >::type digits10_type;
+   typedef typename detail::find_arg<arg_list, is_digits2<mpl::_1>, digits2<> >::type bits_precision_type;
+public:
+   typedef typename detail::precision<digits10_type, bits_precision_type>::type precision_type;
+   //
+   // Internal promotion:
+   //
+   typedef typename detail::find_arg<arg_list, is_promote_float<mpl::_1>, promote_float<> >::type promote_float_type;
+   typedef typename detail::find_arg<arg_list, is_promote_double<mpl::_1>, promote_double<> >::type promote_double_type;
+   //
+   // Discrete quantiles:
+   //
+   typedef typename detail::find_arg<arg_list, is_discrete_quantile<mpl::_1>, discrete_quantile<> >::type discrete_quantile_type;
+   //
+   // Mathematically undefined properties:
+   //
+   typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, assert_undefined<> >::type assert_undefined_type;
+   //
+   // Max iterations:
+   //
+   typedef typename detail::find_arg<arg_list, is_max_series_iterations<mpl::_1>, max_series_iterations<> >::type max_series_iterations_type;
+   typedef typename detail::find_arg<arg_list, is_max_root_iterations<mpl::_1>, max_root_iterations<> >::type max_root_iterations_type;
+};
+//
+// These full specializations are defined to reduce the amount of
+// template instantiations that have to take place when using the default
+// policies, they have quite a large impact on compile times:
+//
+template <>
+struct policy<default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy>
+{
+public:
+   typedef domain_error<> domain_error_type;
+   typedef pole_error<> pole_error_type;
+   typedef overflow_error<> overflow_error_type;
+   typedef underflow_error<> underflow_error_type;
+   typedef denorm_error<> denorm_error_type;
+   typedef evaluation_error<> evaluation_error_type;
+   typedef rounding_error<> rounding_error_type;
+   typedef indeterminate_result_error<> indeterminate_result_error_type;
+#if BOOST_MATH_DIGITS10_POLICY == 0
+   typedef digits2<> precision_type;
+#else
+   typedef detail::precision<digits10<>, digits2<> >::type precision_type;
+#endif
+   typedef promote_float<> promote_float_type;
+   typedef promote_double<> promote_double_type;
+   typedef discrete_quantile<> discrete_quantile_type;
+   typedef assert_undefined<> assert_undefined_type;
+   typedef max_series_iterations<> max_series_iterations_type;
+   typedef max_root_iterations<> max_root_iterations_type;
+};
+
+template <>
+struct policy<detail::forwarding_arg1, detail::forwarding_arg2, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy>
+{
+public:
+   typedef domain_error<> domain_error_type;
+   typedef pole_error<> pole_error_type;
+   typedef overflow_error<> overflow_error_type;
+   typedef underflow_error<> underflow_error_type;
+   typedef denorm_error<> denorm_error_type;
+   typedef evaluation_error<> evaluation_error_type;
+   typedef rounding_error<> rounding_error_type;
+   typedef indeterminate_result_error<> indeterminate_result_error_type;
+#if BOOST_MATH_DIGITS10_POLICY == 0
+   typedef digits2<> precision_type;
+#else
+   typedef detail::precision<digits10<>, digits2<> >::type precision_type;
+#endif
+   typedef promote_float<false> promote_float_type;
+   typedef promote_double<false> promote_double_type;
+   typedef discrete_quantile<> discrete_quantile_type;
+   typedef assert_undefined<> assert_undefined_type;
+   typedef max_series_iterations<> max_series_iterations_type;
+   typedef max_root_iterations<> max_root_iterations_type;
+};
+
+template <class Policy, 
+          class A1 = default_policy, 
+          class A2 = default_policy, 
+          class A3 = default_policy,
+          class A4 = default_policy,
+          class A5 = default_policy,
+          class A6 = default_policy,
+          class A7 = default_policy,
+          class A8 = default_policy,
+          class A9 = default_policy,
+          class A10 = default_policy,
+          class A11 = default_policy,
+          class A12 = default_policy,
+          class A13 = default_policy>
+struct normalise
+{
+private:
+   typedef mpl::list<A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13> arg_list;
+   typedef typename detail::find_arg<arg_list, is_domain_error<mpl::_1>, typename Policy::domain_error_type >::type domain_error_type;
+   typedef typename detail::find_arg<arg_list, is_pole_error<mpl::_1>, typename Policy::pole_error_type >::type pole_error_type;
+   typedef typename detail::find_arg<arg_list, is_overflow_error<mpl::_1>, typename Policy::overflow_error_type >::type overflow_error_type;
+   typedef typename detail::find_arg<arg_list, is_underflow_error<mpl::_1>, typename Policy::underflow_error_type >::type underflow_error_type;
+   typedef typename detail::find_arg<arg_list, is_denorm_error<mpl::_1>, typename Policy::denorm_error_type >::type denorm_error_type;
+   typedef typename detail::find_arg<arg_list, is_evaluation_error<mpl::_1>, typename Policy::evaluation_error_type >::type evaluation_error_type;
+   typedef typename detail::find_arg<arg_list, is_rounding_error<mpl::_1>, typename Policy::rounding_error_type >::type rounding_error_type;
+   typedef typename detail::find_arg<arg_list, is_indeterminate_result_error<mpl::_1>, typename Policy::indeterminate_result_error_type >::type indeterminate_result_error_type;
+   //
+   // Now work out the precision:
+   //
+   typedef typename detail::find_arg<arg_list, is_digits10<mpl::_1>, digits10<> >::type digits10_type;
+   typedef typename detail::find_arg<arg_list, is_digits2<mpl::_1>, typename Policy::precision_type >::type bits_precision_type;
+   typedef typename detail::precision<digits10_type, bits_precision_type>::type precision_type;
+   //
+   // Internal promotion:
+   //
+   typedef typename detail::find_arg<arg_list, is_promote_float<mpl::_1>, typename Policy::promote_float_type >::type promote_float_type;
+   typedef typename detail::find_arg<arg_list, is_promote_double<mpl::_1>, typename Policy::promote_double_type >::type promote_double_type;
+   //
+   // Discrete quantiles:
+   //
+   typedef typename detail::find_arg<arg_list, is_discrete_quantile<mpl::_1>, typename Policy::discrete_quantile_type >::type discrete_quantile_type;
+   //
+   // Mathematically undefined properties:
+   //
+   typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, typename Policy::assert_undefined_type >::type assert_undefined_type;
+   //
+   // Max iterations:
+   //
+   typedef typename detail::find_arg<arg_list, is_max_series_iterations<mpl::_1>, typename Policy::max_series_iterations_type>::type max_series_iterations_type;
+   typedef typename detail::find_arg<arg_list, is_max_root_iterations<mpl::_1>, typename Policy::max_root_iterations_type>::type max_root_iterations_type;
+   //
+   // Define a typelist of the policies:
+   //
+   typedef mpl::vector<
+      domain_error_type,
+      pole_error_type,
+      overflow_error_type,
+      underflow_error_type,
+      denorm_error_type,
+      evaluation_error_type,
+      rounding_error_type,
+      indeterminate_result_error_type,
+      precision_type,
+      promote_float_type,
+      promote_double_type,
+      discrete_quantile_type,
+      assert_undefined_type,
+      max_series_iterations_type,
+      max_root_iterations_type> result_list;
+   //
+   // Remove all the policies that are the same as the default:
+   //
+   typedef typename mpl::remove_if<result_list, detail::is_default_policy<mpl::_> >::type reduced_list;
+   //
+   // Pad out the list with defaults:
+   //
+   typedef typename detail::append_N<reduced_list, default_policy, (14 - ::boost::mpl::size<reduced_list>::value)>::type result_type;
+public:
+   typedef policy<
+      typename mpl::at<result_type, mpl::int_<0> >::type,
+      typename mpl::at<result_type, mpl::int_<1> >::type,
+      typename mpl::at<result_type, mpl::int_<2> >::type,
+      typename mpl::at<result_type, mpl::int_<3> >::type,
+      typename mpl::at<result_type, mpl::int_<4> >::type,
+      typename mpl::at<result_type, mpl::int_<5> >::type,
+      typename mpl::at<result_type, mpl::int_<6> >::type,
+      typename mpl::at<result_type, mpl::int_<7> >::type,
+      typename mpl::at<result_type, mpl::int_<8> >::type,
+      typename mpl::at<result_type, mpl::int_<9> >::type,
+      typename mpl::at<result_type, mpl::int_<10> >::type,
+      typename mpl::at<result_type, mpl::int_<11> >::type,
+      typename mpl::at<result_type, mpl::int_<12> >::type > type;
+};
+//
+// Full specialisation to speed up compilation of the common case:
+//
+template <>
+struct normalise<policy<>, 
+          promote_float<false>, 
+          promote_double<false>, 
+          discrete_quantile<>,
+          assert_undefined<>,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy>
+{
+   typedef policy<detail::forwarding_arg1, detail::forwarding_arg2> type;
+};
+
+template <>
+struct normalise<policy<detail::forwarding_arg1, detail::forwarding_arg2>,
+          promote_float<false>,
+          promote_double<false>,
+          discrete_quantile<>,
+          assert_undefined<>,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy>
+{
+   typedef policy<detail::forwarding_arg1, detail::forwarding_arg2> type;
+};
+
+inline policy<> make_policy()
+{ return policy<>(); }
+
+template <class A1>
+inline typename normalise<policy<>, A1>::type make_policy(const A1&)
+{ 
+   typedef typename normalise<policy<>, A1>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2>
+inline typename normalise<policy<>, A1, A2>::type make_policy(const A1&, const A2&)
+{ 
+   typedef typename normalise<policy<>, A1, A2>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3>
+inline typename normalise<policy<>, A1, A2, A3>::type make_policy(const A1&, const A2&, const A3&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4>
+inline typename normalise<policy<>, A1, A2, A3, A4>::type make_policy(const A1&, const A2&, const A3&, const A4&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&, const A11&)
+{
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type result_type;
+   return result_type();
+}
+
+//
+// Traits class to handle internal promotion:
+//
+template <class Real, class Policy>
+struct evaluation
+{
+   typedef Real type;
+};
+
+template <class Policy>
+struct evaluation<float, Policy>
+{
+   typedef typename mpl::if_<typename Policy::promote_float_type, double, float>::type type;
+};
+
+template <class Policy>
+struct evaluation<double, Policy>
+{
+   typedef typename mpl::if_<typename Policy::promote_double_type, long double, double>::type type;
+};
+
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+
+template <class Real>
+struct basic_digits : public mpl::int_<0>{ };
+template <>
+struct basic_digits<float> : public mpl::int_<FLT_MANT_DIG>{ };
+template <>
+struct basic_digits<double> : public mpl::int_<DBL_MANT_DIG>{ };
+template <>
+struct basic_digits<long double> : public mpl::int_<LDBL_MANT_DIG>{ };
+
+template <class Real, class Policy>
+struct precision
+{
+   BOOST_STATIC_ASSERT( ::std::numeric_limits<Real>::radix == 2);
+   typedef typename Policy::precision_type precision_type;
+   typedef basic_digits<Real> digits_t;
+   typedef typename mpl::if_<
+      mpl::equal_to<digits_t, mpl::int_<0> >,
+      // Possibly unknown precision:
+      precision_type,
+      typename mpl::if_<
+         mpl::or_<mpl::less_equal<digits_t, precision_type>, mpl::less_equal<precision_type, mpl::int_<0> > >,
+         // Default case, full precision for RealType:
+         digits2< ::std::numeric_limits<Real>::digits>,
+         // User customised precision:
+         precision_type
+      >::type
+   >::type type;
+};
+
+template <class Policy>
+struct precision<float, Policy>
+{
+   typedef digits2<FLT_MANT_DIG> type;
+};
+template <class Policy>
+struct precision<double, Policy>
+{
+   typedef digits2<DBL_MANT_DIG> type;
+};
+template <class Policy>
+struct precision<long double, Policy>
+{
+   typedef digits2<LDBL_MANT_DIG> type;
+};
+
+#else
+
+template <class Real, class Policy>
+struct precision
+{
+   BOOST_STATIC_ASSERT((::std::numeric_limits<Real>::radix == 2) || ((::std::numeric_limits<Real>::is_specialized == 0) || (::std::numeric_limits<Real>::digits == 0)));
+#ifndef __BORLANDC__
+   typedef typename Policy::precision_type precision_type;
+   typedef typename mpl::if_c<
+      ((::std::numeric_limits<Real>::is_specialized == 0) || (::std::numeric_limits<Real>::digits == 0)),
+      // Possibly unknown precision:
+      precision_type,
+      typename mpl::if_c<
+         ((::std::numeric_limits<Real>::digits <= precision_type::value) 
+         || (Policy::precision_type::value <= 0)),
+         // Default case, full precision for RealType:
+         digits2< ::std::numeric_limits<Real>::digits>,
+         // User customised precision:
+         precision_type
+      >::type
+   >::type type;
+#else
+   typedef typename Policy::precision_type precision_type;
+   typedef mpl::int_< ::std::numeric_limits<Real>::digits> digits_t;
+   typedef mpl::bool_< ::std::numeric_limits<Real>::is_specialized> spec_t;
+   typedef typename mpl::if_<
+      mpl::or_<mpl::equal_to<spec_t, mpl::false_>, mpl::equal_to<digits_t, mpl::int_<0> > >,
+      // Possibly unknown precision:
+      precision_type,
+      typename mpl::if_<
+         mpl::or_<mpl::less_equal<digits_t, precision_type>, mpl::less_equal<precision_type, mpl::int_<0> > >,
+         // Default case, full precision for RealType:
+         digits2< ::std::numeric_limits<Real>::digits>,
+         // User customised precision:
+         precision_type
+      >::type
+   >::type type;
+#endif
+};
+
+#endif
+
+namespace detail{
+
+template <class T, class Policy>
+inline int digits_imp(mpl::true_ const&)
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+#else
+   BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+#endif
+   typedef typename boost::math::policies::precision<T, Policy>::type p_t;
+   return p_t::value;
+}
+
+template <class T, class Policy>
+inline int digits_imp(mpl::false_ const&)
+{
+   return tools::digits<T>();
+}
+
+} // namespace detail
+
+template <class T, class Policy>
+inline int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
+{
+   typedef mpl::bool_< std::numeric_limits<T>::is_specialized > tag_type;
+   return detail::digits_imp<T, Policy>(tag_type());
+}
+
+template <class Policy>
+inline unsigned long get_max_series_iterations()
+{
+   typedef typename Policy::max_series_iterations_type iter_type;
+   return iter_type::value;
+}
+
+template <class Policy>
+inline unsigned long get_max_root_iterations()
+{
+   typedef typename Policy::max_root_iterations_type iter_type;
+   return iter_type::value;
+}
+
+namespace detail{
+
+template <class T, class Digits, class Small, class Default>
+struct series_factor_calc
+{
+   static T get()
+   {
+      return ldexp(T(1.0), 1 - Digits::value);
+   }
+};
+
+template <class T, class Digits>
+struct series_factor_calc<T, Digits, mpl::true_, mpl::true_>
+{
+   static T get()
+   {
+      return boost::math::tools::epsilon<T>();
+   }
+};
+template <class T, class Digits>
+struct series_factor_calc<T, Digits, mpl::true_, mpl::false_>
+{
+   static T get()
+   {
+      static const boost::uintmax_t v = static_cast<boost::uintmax_t>(1u) << (Digits::value - 1);
+      return 1 / static_cast<T>(v);
+   }
+};
+template <class T, class Digits>
+struct series_factor_calc<T, Digits, mpl::false_, mpl::true_>
+{
+   static T get()
+   {
+      return boost::math::tools::epsilon<T>();
+   }
+};
+
+template <class T, class Policy>
+inline T get_epsilon_imp(mpl::true_ const&)
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+   BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::radix == 2);
+#else
+   BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+   BOOST_ASSERT(::std::numeric_limits<T>::radix == 2);
+#endif
+   typedef typename boost::math::policies::precision<T, Policy>::type p_t;
+   typedef mpl::bool_<p_t::value <= std::numeric_limits<boost::uintmax_t>::digits> is_small_int;
+   typedef mpl::bool_<p_t::value >= std::numeric_limits<T>::digits> is_default_value;
+   return series_factor_calc<T, p_t, is_small_int, is_default_value>::get();
+}
+
+template <class T, class Policy>
+inline T get_epsilon_imp(mpl::false_ const&)
+{
+   return tools::epsilon<T>();
+}
+
+} // namespace detail
+
+template <class T, class Policy>
+inline T get_epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
+{
+   typedef mpl::bool_< (std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::radix == 2)) > tag_type;
+   return detail::get_epsilon_imp<T, Policy>(tag_type());
+}
+
+namespace detail{
+
+template <class A1, 
+          class A2, 
+          class A3,
+          class A4,
+          class A5,
+          class A6,
+          class A7,
+          class A8,
+          class A9,
+          class A10,
+          class A11>
+char test_is_policy(const policy<A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11>*);
+double test_is_policy(...);
+
+template <class P>
+struct is_policy_imp
+{
+   BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::math::policies::detail::test_is_policy(static_cast<P*>(0))) == 1));
+};
+
+}
+
+template <class P>
+struct is_policy : public mpl::bool_< ::boost::math::policies::detail::is_policy_imp<P>::value> {};
+
+//
+// Helper traits class for distribution error handling:
+//
+template <class Policy>
+struct constructor_error_check
+{
+   typedef typename Policy::domain_error_type domain_error_type;
+   typedef typename mpl::if_c<
+      (domain_error_type::value == throw_on_error) || (domain_error_type::value == user_error),
+      mpl::true_,
+      mpl::false_>::type type;
+};
+
+template <class Policy>
+struct method_error_check
+{
+   typedef typename Policy::domain_error_type domain_error_type;
+   typedef typename mpl::if_c<
+      (domain_error_type::value == throw_on_error) && (domain_error_type::value != user_error),
+      mpl::false_,
+      mpl::true_>::type type;
+};
+
+}}} // namespaces
+
+#endif // BOOST_MATH_POLICY_HPP
+
+
+
diff --git a/ext/boost/math/special_functions/detail/fp_traits.hpp b/ext/boost/math/special_functions/detail/fp_traits.hpp
new file mode 100644
index 0000000..50c034d
--- /dev/null
+++ b/ext/boost/math/special_functions/detail/fp_traits.hpp
@@ -0,0 +1,570 @@
+// fp_traits.hpp
+
+#ifndef BOOST_MATH_FP_TRAITS_HPP
+#define BOOST_MATH_FP_TRAITS_HPP
+
+// Copyright (c) 2006 Johan Rade
+
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+/*
+To support old compilers, care has been taken to avoid partial template
+specialization and meta function forwarding.
+With these techniques, the code could be simplified.
+*/
+
+#if defined(__vms) && defined(__DECCXX) && !__IEEE_FLOAT
+// The VAX floating point formats are used (for float and double)
+#   define BOOST_FPCLASSIFY_VAX_FORMAT
+#endif
+
+#include <cstring>
+
+#include <boost/assert.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/detail/endian.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+  namespace std{ using ::memcpy; }
+#endif
+
+#ifndef FP_NORMAL
+
+#define FP_ZERO        0
+#define FP_NORMAL      1
+#define FP_INFINITE    2
+#define FP_NAN         3
+#define FP_SUBNORMAL   4
+
+#else
+
+#define BOOST_HAS_FPCLASSIFY
+
+#ifndef fpclassify
+#  if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
+         && defined(_GLIBCXX_USE_C99_MATH) \
+         && !(defined(_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) \
+         && (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC != 0))
+#     ifdef _STLP_VENDOR_CSTD
+#        if _STLPORT_VERSION >= 0x520
+#           define BOOST_FPCLASSIFY_PREFIX ::__std_alias:: 
+#        else
+#           define BOOST_FPCLASSIFY_PREFIX ::_STLP_VENDOR_CSTD:: 
+#        endif
+#     else
+#        define BOOST_FPCLASSIFY_PREFIX ::std::
+#     endif
+#  else
+#     undef BOOST_HAS_FPCLASSIFY
+#     define BOOST_FPCLASSIFY_PREFIX
+#  endif
+#elif (defined(__HP_aCC) && !defined(__hppa))
+// aCC 6 appears to do "#define fpclassify fpclassify" which messes us up a bit!
+#  define BOOST_FPCLASSIFY_PREFIX ::
+#else
+#  define BOOST_FPCLASSIFY_PREFIX
+#endif
+
+#ifdef __MINGW32__
+#  undef BOOST_HAS_FPCLASSIFY
+#endif
+
+#endif
+
+
+//------------------------------------------------------------------------------
+
+namespace boost {
+namespace math {
+namespace detail {
+
+//------------------------------------------------------------------------------
+
+/* 
+The following classes are used to tag the different methods that are used
+for floating point classification
+*/
+
+struct native_tag {};
+template <bool has_limits>
+struct generic_tag {};
+struct ieee_tag {};
+struct ieee_copy_all_bits_tag : public ieee_tag {};
+struct ieee_copy_leading_bits_tag : public ieee_tag {};
+
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+//
+// These helper functions are used only when numeric_limits<>
+// members are not compile time constants:
+//
+inline bool is_generic_tag_false(const generic_tag<false>*)
+{
+   return true;
+}
+inline bool is_generic_tag_false(const void*)
+{
+   return false;
+}
+#endif
+
+//------------------------------------------------------------------------------
+
+/*
+Most processors support three different floating point precisions:
+single precision (32 bits), double precision (64 bits)
+and extended double precision (80 - 128 bits, depending on the processor)
+
+Note that the C++ type long double can be implemented
+both as double precision and extended double precision.
+*/
+
+struct unknown_precision{};
+struct single_precision {};
+struct double_precision {};
+struct extended_double_precision {};
+
+// native_tag version --------------------------------------------------------------
+
+template<class T> struct fp_traits_native
+{
+    typedef native_tag method;
+};
+
+// generic_tag version -------------------------------------------------------------
+
+template<class T, class U> struct fp_traits_non_native
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   typedef generic_tag<std::numeric_limits<T>::is_specialized> method;
+#else
+   typedef generic_tag<false> method;
+#endif
+};
+
+// ieee_tag versions ---------------------------------------------------------------
+
+/*
+These specializations of fp_traits_non_native contain information needed
+to "parse" the binary representation of a floating point number.
+
+Typedef members:
+
+  bits -- the target type when copying the leading bytes of a floating
+      point number. It is a typedef for uint32_t or uint64_t.
+
+  method -- tells us whether all bytes are copied or not.
+      It is a typedef for ieee_copy_all_bits_tag or ieee_copy_leading_bits_tag.
+
+Static data members:
+
+  sign, exponent, flag, significand -- bit masks that give the meaning of the
+  bits in the leading bytes.
+
+Static function members:
+
+  get_bits(), set_bits() -- provide access to the leading bytes.
+
+*/
+
+// ieee_tag version, float (32 bits) -----------------------------------------------
+
+#ifndef BOOST_FPCLASSIFY_VAX_FORMAT
+
+template<> struct fp_traits_non_native<float, single_precision>
+{
+    typedef ieee_copy_all_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7f800000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00000000);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x007fffff);
+
+    typedef uint32_t bits;
+    static void get_bits(float x, uint32_t& a) { std::memcpy(&a, &x, 4); }
+    static void set_bits(float& x, uint32_t a) { std::memcpy(&x, &a, 4); }
+};
+
+// ieee_tag version, double (64 bits) ----------------------------------------------
+
+#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) \
+   || defined(__BORLANDC__) || defined(__CODEGEAR__)
+
+template<> struct fp_traits_non_native<double, double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7ff00000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
+
+    typedef uint32_t bits;
+
+    static void get_bits(double x, uint32_t& a)
+    {
+        std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+    }
+
+    static void set_bits(double& x, uint32_t a)
+    {
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+    }
+
+private:
+
+#if defined(BOOST_BIG_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif defined(BOOST_LITTLE_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 4);
+#else
+    BOOST_STATIC_ASSERT(false);
+#endif
+};
+
+//..............................................................................
+
+#else
+
+template<> struct fp_traits_non_native<double, double_precision>
+{
+    typedef ieee_copy_all_bits_tag method;
+
+    static const uint64_t sign     = ((uint64_t)0x80000000u) << 32;
+    static const uint64_t exponent = ((uint64_t)0x7ff00000) << 32;
+    static const uint64_t flag     = 0;
+    static const uint64_t significand
+        = (((uint64_t)0x000fffff) << 32) + ((uint64_t)0xffffffffu);
+
+    typedef uint64_t bits;
+    static void get_bits(double x, uint64_t& a) { std::memcpy(&a, &x, 8); }
+    static void set_bits(double& x, uint64_t a) { std::memcpy(&x, &a, 8); }
+};
+
+#endif
+
+#endif  // #ifndef BOOST_FPCLASSIFY_VAX_FORMAT
+
+// long double (64 bits) -------------------------------------------------------
+
+#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)\
+   || defined(__BORLANDC__) || defined(__CODEGEAR__)
+
+template<> struct fp_traits_non_native<long double, double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7ff00000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
+
+    typedef uint32_t bits;
+
+    static void get_bits(long double x, uint32_t& a)
+    {
+        std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+    }
+
+    static void set_bits(long double& x, uint32_t a)
+    {
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+    }
+
+private:
+
+#if defined(BOOST_BIG_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif defined(BOOST_LITTLE_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 4);
+#else
+    BOOST_STATIC_ASSERT(false);
+#endif
+};
+
+//..............................................................................
+
+#else
+
+template<> struct fp_traits_non_native<long double, double_precision>
+{
+    typedef ieee_copy_all_bits_tag method;
+
+    static const uint64_t sign     = (uint64_t)0x80000000u << 32;
+    static const uint64_t exponent = (uint64_t)0x7ff00000 << 32;
+    static const uint64_t flag     = 0;
+    static const uint64_t significand
+        = ((uint64_t)0x000fffff << 32) + (uint64_t)0xffffffffu;
+
+    typedef uint64_t bits;
+    static void get_bits(long double x, uint64_t& a) { std::memcpy(&a, &x, 8); }
+    static void set_bits(long double& x, uint64_t a) { std::memcpy(&x, &a, 8); }
+};
+
+#endif
+
+
+// long double (>64 bits), x86 and x64 -----------------------------------------
+
+#if defined(__i386) || defined(__i386__) || defined(_M_IX86) \
+    || defined(__amd64) || defined(__amd64__)  || defined(_M_AMD64) \
+    || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64)
+
+// Intel extended double precision format (80 bits)
+
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7fff0000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00008000);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff);
+
+    typedef uint32_t bits;
+
+    static void get_bits(long double x, uint32_t& a)
+    {
+        std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + 6, 4);
+    }
+
+    static void set_bits(long double& x, uint32_t a)
+    {
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + 6, &a, 4);
+    }
+};
+
+
+// long double (>64 bits), Itanium ---------------------------------------------
+
+#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
+
+// The floating point format is unknown at compile time
+// No template specialization is provided.
+// The generic_tag definition is used.
+
+// The Itanium supports both
+// the Intel extended double precision format (80 bits) and
+// the IEEE extended double precision format with 15 exponent bits (128 bits).
+
+
+// long double (>64 bits), PowerPC ---------------------------------------------
+
+#elif defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__) \
+    || defined(__ppc) || defined(__ppc__) || defined(__PPC__)
+
+// PowerPC extended double precision format (128 bits)
+
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7ff00000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00000000);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
+
+    typedef uint32_t bits;
+
+    static void get_bits(long double x, uint32_t& a)
+    {
+        std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+    }
+
+    static void set_bits(long double& x, uint32_t a)
+    {
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+    }
+
+private:
+
+#if defined(BOOST_BIG_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif defined(BOOST_LITTLE_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 12);
+#else
+    BOOST_STATIC_ASSERT(false);
+#endif
+};
+
+
+// long double (>64 bits), Motorola 68K ----------------------------------------
+
+#elif defined(__m68k) || defined(__m68k__) \
+    || defined(__mc68000) || defined(__mc68000__) \
+
+// Motorola extended double precision format (96 bits)
+
+// It is the same format as the Intel extended double precision format,
+// except that 1) it is big-endian, 2) the 3rd and 4th byte are padding, and
+// 3) the flag bit is not set for infinity
+
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7fff0000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00008000);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff);
+
+    // copy 1st, 2nd, 5th and 6th byte. 3rd and 4th byte are padding.
+
+    typedef uint32_t bits;
+
+    static void get_bits(long double x, uint32_t& a)
+    {
+        std::memcpy(&a, &x, 2);
+        std::memcpy(reinterpret_cast<unsigned char*>(&a) + 2,
+               reinterpret_cast<const unsigned char*>(&x) + 4, 2);
+    }
+
+    static void set_bits(long double& x, uint32_t a)
+    {
+        std::memcpy(&x, &a, 2);
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + 4,
+               reinterpret_cast<const unsigned char*>(&a) + 2, 2);
+    }
+};
+
+
+// long double (>64 bits), All other processors --------------------------------
+
+#else
+
+// IEEE extended double precision format with 15 exponent bits (128 bits)
+
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7fff0000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00000000);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x0000ffff);
+
+    typedef uint32_t bits;
+
+    static void get_bits(long double x, uint32_t& a)
+    {
+        std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+    }
+
+    static void set_bits(long double& x, uint32_t a)
+    {
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+    }
+
+private:
+
+#if defined(BOOST_BIG_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif defined(BOOST_LITTLE_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 12);
+#else
+    BOOST_STATIC_ASSERT(false);
+#endif
+};
+
+#endif
+
+//------------------------------------------------------------------------------
+
+// size_to_precision is a type switch for converting a C++ floating point type
+// to the corresponding precision type.
+
+template<int n, bool fp> struct size_to_precision
+{
+   typedef unknown_precision type;
+};
+
+template<> struct size_to_precision<4, true>
+{
+    typedef single_precision type;
+};
+
+template<> struct size_to_precision<8, true>
+{
+    typedef double_precision type;
+};
+
+template<> struct size_to_precision<10, true>
+{
+    typedef extended_double_precision type;
+};
+
+template<> struct size_to_precision<12, true>
+{
+    typedef extended_double_precision type;
+};
+
+template<> struct size_to_precision<16, true>
+{
+    typedef extended_double_precision type;
+};
+
+//------------------------------------------------------------------------------
+//
+// Figure out whether to use native classification functions based on
+// whether T is a built in floating point type or not:
+//
+template <class T>
+struct select_native
+{
+    typedef BOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T), ::boost::is_floating_point<T>::value>::type precision;
+    typedef fp_traits_non_native<T, precision> type;
+};
+template<>
+struct select_native<float>
+{
+    typedef fp_traits_native<float> type;
+};
+template<>
+struct select_native<double>
+{
+    typedef fp_traits_native<double> type;
+};
+template<>
+struct select_native<long double>
+{
+    typedef fp_traits_native<long double> type;
+};
+
+//------------------------------------------------------------------------------
+
+// fp_traits is a type switch that selects the right fp_traits_non_native
+
+#if (defined(BOOST_MATH_USE_C99) && !(defined(__GNUC__) && (__GNUC__ < 4))) \
+   && !defined(__hpux) \
+   && !defined(__DECCXX)\
+   && !defined(__osf__) \
+   && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)\
+   && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
+#  define BOOST_MATH_USE_STD_FPCLASSIFY
+#endif
+
+template<class T> struct fp_traits
+{
+    typedef BOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T), ::boost::is_floating_point<T>::value>::type precision;
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
+    typedef typename select_native<T>::type type;
+#else
+    typedef fp_traits_non_native<T, precision> type;
+#endif
+    typedef fp_traits_non_native<T, precision> sign_change_type;
+};
+
+//------------------------------------------------------------------------------
+
+}   // namespace detail
+}   // namespace math
+}   // namespace boost
+
+#endif
diff --git a/ext/boost/math/special_functions/detail/round_fwd.hpp b/ext/boost/math/special_functions/detail/round_fwd.hpp
new file mode 100644
index 0000000..952259a
--- /dev/null
+++ b/ext/boost/math/special_functions/detail/round_fwd.hpp
@@ -0,0 +1,80 @@
+// Copyright John Maddock 2008.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_SPECIAL_ROUND_FWD_HPP
+#define BOOST_MATH_SPECIAL_ROUND_FWD_HPP
+
+#include <boost/config.hpp>
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+namespace boost
+{
+   namespace math
+   { 
+
+   template <class T, class Policy>
+   T trunc(const T& v, const Policy& pol);
+   template <class T>
+   T trunc(const T& v);
+   template <class T, class Policy>
+   int itrunc(const T& v, const Policy& pol);
+   template <class T>
+   int itrunc(const T& v);
+   template <class T, class Policy>
+   long ltrunc(const T& v, const Policy& pol);
+   template <class T>
+   long ltrunc(const T& v);
+#ifdef BOOST_HAS_LONG_LONG
+   template <class T, class Policy>
+   boost::long_long_type lltrunc(const T& v, const Policy& pol);
+   template <class T>
+   boost::long_long_type lltrunc(const T& v);
+#endif
+   template <class T, class Policy>
+   T round(const T& v, const Policy& pol);
+   template <class T>
+   T round(const T& v);
+   template <class T, class Policy>
+   int iround(const T& v, const Policy& pol);
+   template <class T>
+   int iround(const T& v);
+   template <class T, class Policy>
+   long lround(const T& v, const Policy& pol);
+   template <class T>
+   long lround(const T& v);
+#ifdef BOOST_HAS_LONG_LONG
+   template <class T, class Policy>
+   boost::long_long_type llround(const T& v, const Policy& pol);
+   template <class T>
+   boost::long_long_type llround(const T& v);
+#endif
+   template <class T, class Policy>
+   T modf(const T& v, T* ipart, const Policy& pol);
+   template <class T>
+   T modf(const T& v, T* ipart);
+   template <class T, class Policy>
+   T modf(const T& v, int* ipart, const Policy& pol);
+   template <class T>
+   T modf(const T& v, int* ipart);
+   template <class T, class Policy>
+   T modf(const T& v, long* ipart, const Policy& pol);
+   template <class T>
+   T modf(const T& v, long* ipart);
+#ifdef BOOST_HAS_LONG_LONG
+   template <class T, class Policy>
+   T modf(const T& v, boost::long_long_type* ipart, const Policy& pol);
+   template <class T>
+   T modf(const T& v, boost::long_long_type* ipart);
+#endif
+
+   }
+}
+#endif // BOOST_MATH_SPECIAL_ROUND_FWD_HPP
+
diff --git a/ext/boost/math/special_functions/fpclassify.hpp b/ext/boost/math/special_functions/fpclassify.hpp
new file mode 100644
index 0000000..6f92d18
--- /dev/null
+++ b/ext/boost/math/special_functions/fpclassify.hpp
@@ -0,0 +1,537 @@
+//  Copyright John Maddock 2005-2008.
+//  Copyright (c) 2006-2008 Johan Rade
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_FPCLASSIFY_HPP
+#define BOOST_MATH_FPCLASSIFY_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <math.h>
+#include <boost/config/no_tr1/cmath.hpp>
+#include <boost/limits.hpp>
+#include <boost/math/tools/real_cast.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
+#include <boost/math/special_functions/math_fwd.hpp>
+#include <boost/math/special_functions/detail/fp_traits.hpp>
+/*!
+  \file fpclassify.hpp
+  \brief Classify floating-point value as normal, subnormal, zero, infinite, or NaN.
+  \version 1.0
+  \author John Maddock
+ */
+
+/*
+
+1. If the platform is C99 compliant, then the native floating point
+classification functions are used.  However, note that we must only
+define the functions which call std::fpclassify etc if that function
+really does exist: otherwise a compiler may reject the code even though
+the template is never instantiated.
+
+2. If the platform is not C99 compliant, and the binary format for
+a floating point type (float, double or long double) can be determined
+at compile time, then the following algorithm is used:
+
+        If all exponent bits, the flag bit (if there is one), 
+        and all significand bits are 0, then the number is zero.
+
+        If all exponent bits and the flag bit (if there is one) are 0, 
+        and at least one significand bit is 1, then the number is subnormal.
+
+        If all exponent bits are 1 and all significand bits are 0, 
+        then the number is infinity.
+
+        If all exponent bits are 1 and at least one significand bit is 1,
+        then the number is a not-a-number.
+
+        Otherwise the number is normal.
+
+        This algorithm works for the IEEE 754 representation,
+        and also for several non IEEE 754 formats.
+
+    Most formats have the structure
+        sign bit + exponent bits + significand bits.
+    
+    A few have the structure
+        sign bit + exponent bits + flag bit + significand bits.
+    The flag bit is 0 for zero and subnormal numbers,
+        and 1 for normal numbers and NaN.
+        It is 0 (Motorola 68K) or 1 (Intel) for infinity.
+
+    To get the bits, the four or eight most significant bytes are copied
+    into an uint32_t or uint64_t and bit masks are applied.
+    This covers all the exponent bits and the flag bit (if there is one),
+    but not always all the significand bits.
+    Some of the functions below have two implementations,
+    depending on whether all the significand bits are copied or not.
+
+3. If the platform is not C99 compliant, and the binary format for
+a floating point type (float, double or long double) can not be determined
+at compile time, then comparison with std::numeric_limits values
+is used.
+
+*/
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+#include <float.h>
+#endif
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+  namespace std{ using ::abs; using ::fabs; }
+#endif
+
+namespace boost{ 
+
+//
+// This must not be located in any namespace under boost::math
+// otherwise we can get into an infinite loop if isnan is
+// a #define for "isnan" !
+//
+namespace math_detail{
+
+template <class T>
+inline bool is_nan_helper(T t, const boost::true_type&)
+{
+#ifdef isnan
+   return isnan(t);
+#elif defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY) || !defined(BOOST_HAS_FPCLASSIFY)
+   return false;
+#else // BOOST_HAS_FPCLASSIFY
+   return (BOOST_FPCLASSIFY_PREFIX fpclassify(t) == (int)FP_NAN);
+#endif
+}
+
+template <class T>
+inline bool is_nan_helper(T, const boost::false_type&)
+{
+   return false;
+}
+
+}
+
+namespace math{
+
+namespace detail{
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+template <class T>
+inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const native_tag&)
+{
+   return (std::fpclassify)(t);
+}
+#endif
+
+template <class T>
+inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag<true>&)
+{
+   BOOST_MATH_INSTRUMENT_VARIABLE(t);
+
+   // whenever possible check for Nan's first:
+#if defined(BOOST_HAS_FPCLASSIFY)  && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
+   if(::boost::math_detail::is_nan_helper(t, ::boost::is_floating_point<T>()))
+      return FP_NAN;
+#elif defined(isnan)
+   if(boost::math_detail::is_nan_helper(t, ::boost::is_floating_point<T>()))
+      return FP_NAN;
+#elif defined(_MSC_VER) || defined(__BORLANDC__)
+   if(::_isnan(boost::math::tools::real_cast<double>(t)))
+      return FP_NAN;
+#endif
+   // std::fabs broken on a few systems especially for long long!!!!
+   T at = (t < T(0)) ? -t : t;
+
+   // Use a process of exclusion to figure out
+   // what kind of type we have, this relies on
+   // IEEE conforming reals that will treat
+   // Nan's as unordered.  Some compilers
+   // don't do this once optimisations are
+   // turned on, hence the check for nan's above.
+   if(at <= (std::numeric_limits<T>::max)())
+   {
+      if(at >= (std::numeric_limits<T>::min)())
+         return FP_NORMAL;
+      return (at != 0) ? FP_SUBNORMAL : FP_ZERO;
+   }
+   else if(at > (std::numeric_limits<T>::max)())
+      return FP_INFINITE;
+   return FP_NAN;
+}
+
+template <class T>
+inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag<false>&)
+{
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   if(std::numeric_limits<T>::is_specialized)
+      return fpclassify_imp(t, generic_tag<true>());
+#endif
+   // 
+   // An unknown type with no numeric_limits support,
+   // so what are we supposed to do we do here?
+   //
+   BOOST_MATH_INSTRUMENT_VARIABLE(t);
+
+   return t == 0 ? FP_ZERO : FP_NORMAL;
+}
+
+template<class T> 
+int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_all_bits_tag)
+{
+   typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+   BOOST_MATH_INSTRUMENT_VARIABLE(x);
+
+   BOOST_DEDUCED_TYPENAME traits::bits a;
+   traits::get_bits(x,a);
+   BOOST_MATH_INSTRUMENT_VARIABLE(a);
+   a &= traits::exponent | traits::flag | traits::significand;
+   BOOST_MATH_INSTRUMENT_VARIABLE((traits::exponent | traits::flag | traits::significand));
+   BOOST_MATH_INSTRUMENT_VARIABLE(a);
+
+   if(a <= traits::significand) {
+      if(a == 0)
+         return FP_ZERO;
+      else
+         return FP_SUBNORMAL;
+   }
+
+   if(a < traits::exponent) return FP_NORMAL;
+
+   a &= traits::significand;
+   if(a == 0) return FP_INFINITE;
+
+   return FP_NAN;
+}
+
+template<class T> 
+int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag)
+{
+   typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+   BOOST_MATH_INSTRUMENT_VARIABLE(x);
+
+   BOOST_DEDUCED_TYPENAME traits::bits a;
+   traits::get_bits(x,a); 
+   a &= traits::exponent | traits::flag | traits::significand;
+
+   if(a <= traits::significand) {
+      if(x == 0)
+         return FP_ZERO;
+      else
+         return FP_SUBNORMAL;
+   }
+
+   if(a < traits::exponent) return FP_NORMAL;
+
+   a &= traits::significand;
+   traits::set_bits(x,a);
+   if(x == 0) return FP_INFINITE;
+
+   return FP_NAN;
+}
+
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+template <>
+inline int fpclassify_imp<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+{
+   return boost::math::detail::fpclassify_imp(t, generic_tag<true>());
+}
+#endif
+
+}  // namespace detail
+
+template <class T>
+inline int fpclassify BOOST_NO_MACRO_EXPAND(T t)
+{
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   typedef typename tools::promote_args<T>::type value_type;
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   if(std::numeric_limits<T>::is_specialized && detail::is_generic_tag_false(static_cast<method*>(0)))
+      return detail::fpclassify_imp(static_cast<value_type>(t), detail::generic_tag<true>());
+   return detail::fpclassify_imp(static_cast<value_type>(t), method());
+#else
+   return detail::fpclassify_imp(static_cast<value_type>(t), method());
+#endif
+}
+
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+    template<class T> 
+    inline bool isfinite_impl(T x, native_tag const&)
+    {
+        return (std::isfinite)(x);
+    }
+#endif
+
+    template<class T> 
+    inline bool isfinite_impl(T x, generic_tag<true> const&)
+    {
+        return x >= -(std::numeric_limits<T>::max)()
+            && x <= (std::numeric_limits<T>::max)();
+    }
+
+    template<class T> 
+    inline bool isfinite_impl(T x, generic_tag<false> const&)
+    {
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+      if(std::numeric_limits<T>::is_specialized)
+         return isfinite_impl(x, generic_tag<true>());
+#endif
+       (void)x; // warning supression.
+       return true;
+    }
+
+    template<class T> 
+    inline bool isfinite_impl(T x, ieee_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits;
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a &= traits::exponent;
+        return a != traits::exponent;
+    }
+
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+template <>
+inline bool isfinite_impl<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+{
+   return boost::math::detail::isfinite_impl(t, generic_tag<true>());
+}
+#endif
+
+}
+
+template<class T> 
+inline bool (isfinite)(T x)
+{ //!< \brief return true if floating-point type t is finite.
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   typedef typename boost::is_floating_point<T>::type fp_tag;
+   typedef typename tools::promote_args<T>::type value_type;
+   return detail::isfinite_impl(static_cast<value_type>(x), method());
+}
+
+//------------------------------------------------------------------------------
+
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+    template<class T> 
+    inline bool isnormal_impl(T x, native_tag const&)
+    {
+        return (std::isnormal)(x);
+    }
+#endif
+
+    template<class T> 
+    inline bool isnormal_impl(T x, generic_tag<true> const&)
+    {
+        if(x < 0) x = -x;
+        return x >= (std::numeric_limits<T>::min)()
+            && x <= (std::numeric_limits<T>::max)();
+    }
+
+    template<class T> 
+    inline bool isnormal_impl(T x, generic_tag<false> const&)
+    {
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+      if(std::numeric_limits<T>::is_specialized)
+         return isnormal_impl(x, generic_tag<true>());
+#endif
+       return !(x == 0);
+    }
+
+    template<class T> 
+    inline bool isnormal_impl(T x, ieee_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits;
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a &= traits::exponent | traits::flag;
+        return (a != 0) && (a < traits::exponent);
+    }
+
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+template <>
+inline bool isnormal_impl<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+{
+   return boost::math::detail::isnormal_impl(t, generic_tag<true>());
+}
+#endif
+
+}
+
+template<class T> 
+inline bool (isnormal)(T x)
+{
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   typedef typename boost::is_floating_point<T>::type fp_tag;
+   typedef typename tools::promote_args<T>::type value_type;
+   return detail::isnormal_impl(static_cast<value_type>(x), method());
+}
+
+//------------------------------------------------------------------------------
+
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+    template<class T> 
+    inline bool isinf_impl(T x, native_tag const&)
+    {
+        return (std::isinf)(x);
+    }
+#endif
+
+    template<class T> 
+    inline bool isinf_impl(T x, generic_tag<true> const&)
+    {
+        (void)x; // in case the compiler thinks that x is unused because std::numeric_limits<T>::has_infinity is false
+        return std::numeric_limits<T>::has_infinity 
+            && ( x == std::numeric_limits<T>::infinity()
+                 || x == -std::numeric_limits<T>::infinity());
+    }
+
+    template<class T> 
+    inline bool isinf_impl(T x, generic_tag<false> const&)
+    {
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+      if(std::numeric_limits<T>::is_specialized)
+         return isinf_impl(x, generic_tag<true>());
+#endif
+        (void)x; // warning supression.
+        return false;
+    }
+
+    template<class T> 
+    inline bool isinf_impl(T x, ieee_copy_all_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a &= traits::exponent | traits::significand;
+        return a == traits::exponent;
+    }
+
+    template<class T> 
+    inline bool isinf_impl(T x, ieee_copy_leading_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a &= traits::exponent | traits::significand;
+        if(a != traits::exponent)
+            return false;
+
+        traits::set_bits(x,0);
+        return x == 0;
+    }
+
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+template <>
+inline bool isinf_impl<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+{
+   return boost::math::detail::isinf_impl(t, generic_tag<true>());
+}
+#endif
+
+}   // namespace detail
+
+template<class T> 
+inline bool (isinf)(T x)
+{
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   typedef typename boost::is_floating_point<T>::type fp_tag;
+   typedef typename tools::promote_args<T>::type value_type;
+   return detail::isinf_impl(static_cast<value_type>(x), method());
+}
+
+//------------------------------------------------------------------------------
+
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+    template<class T> 
+    inline bool isnan_impl(T x, native_tag const&)
+    {
+        return (std::isnan)(x);
+    }
+#endif
+
+    template<class T> 
+    inline bool isnan_impl(T x, generic_tag<true> const&)
+    {
+        return std::numeric_limits<T>::has_infinity
+            ? !(x <= std::numeric_limits<T>::infinity())
+            : x != x;
+    }
+
+    template<class T> 
+    inline bool isnan_impl(T x, generic_tag<false> const&)
+    {
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+      if(std::numeric_limits<T>::is_specialized)
+         return isnan_impl(x, generic_tag<true>());
+#endif
+        (void)x; // warning supression
+        return false;
+    }
+
+    template<class T> 
+    inline bool isnan_impl(T x, ieee_copy_all_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a &= traits::exponent | traits::significand;
+        return a > traits::exponent;
+    }
+
+    template<class T> 
+    inline bool isnan_impl(T x, ieee_copy_leading_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+
+        a &= traits::exponent | traits::significand;
+        if(a < traits::exponent)
+            return false;
+
+        a &= traits::significand;
+        traits::set_bits(x,a);
+        return x != 0;
+    }
+
+}   // namespace detail
+
+template<class T> bool (isnan)(T x)
+{ //!< \brief return true if floating-point type t is NaN (Not A Number).
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   typedef typename boost::is_floating_point<T>::type fp_tag;
+   return detail::isnan_impl(x, method());
+}
+
+#ifdef isnan
+template <> inline bool isnan BOOST_NO_MACRO_EXPAND<float>(float t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); }
+template <> inline bool isnan BOOST_NO_MACRO_EXPAND<double>(double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); }
+template <> inline bool isnan BOOST_NO_MACRO_EXPAND<long double>(long double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); }
+#endif
+
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_FPCLASSIFY_HPP
+
diff --git a/ext/boost/math/special_functions/math_fwd.hpp b/ext/boost/math/special_functions/math_fwd.hpp
new file mode 100644
index 0000000..6669e3f
--- /dev/null
+++ b/ext/boost/math/special_functions/math_fwd.hpp
@@ -0,0 +1,1296 @@
+// math_fwd.hpp
+
+// TODO revise completely for new distribution classes.
+
+// Copyright Paul A. Bristow 2006.
+// Copyright John Maddock 2006.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// Omnibus list of forward declarations of math special functions.
+
+// IT = Integer type.
+// RT = Real type (built-in floating-point types, float, double, long double) & User Defined Types
+// AT = Integer or Real type 
+
+#ifndef BOOST_MATH_SPECIAL_MATH_FWD_HPP
+#define BOOST_MATH_SPECIAL_MATH_FWD_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/special_functions/detail/round_fwd.hpp>
+#include <boost/math/tools/promotion.hpp> // for argument promotion.
+#include <boost/math/policies/policy.hpp>
+#include <boost/mpl/comparison.hpp>
+#include <boost/config/no_tr1/complex.hpp>
+
+#define BOOST_NO_MACRO_EXPAND /**/
+
+namespace boost
+{
+   namespace math
+   { // Math functions (in roughly alphabetic order).
+
+   // Beta functions.
+   template <class RT1, class RT2>
+   typename tools::promote_args<RT1, RT2>::type 
+         beta(RT1 a, RT2 b); // Beta function (2 arguments).
+
+   template <class RT1, class RT2, class A>
+   typename tools::promote_args<RT1, RT2, A>::type 
+         beta(RT1 a, RT2 b, A x); // Beta function (3 arguments).
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         beta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Beta function (3 arguments).
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         betac(RT1 a, RT2 b, RT3 x);
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         betac(RT1 a, RT2 b, RT3 x, const Policy& pol);
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta(RT1 a, RT2 b, RT3 x); // Incomplete beta function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibetac(RT1 a, RT2 b, RT3 x); // Incomplete beta complement function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibetac(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta complement function.
+
+   template <class T1, class T2, class T3, class T4>
+   typename tools::promote_args<T1, T2, T3, T4>::type  
+         ibeta_inv(T1 a, T2 b, T3 p, T4* py);
+
+   template <class T1, class T2, class T3, class T4, class Policy>
+   typename tools::promote_args<T1, T2, T3, T4>::type  
+         ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol);
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta_inv(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta_inv(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta_inva(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta_inva(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta_invb(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta_invb(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
+
+   template <class T1, class T2, class T3, class T4>
+   typename tools::promote_args<T1, T2, T3, T4>::type 
+         ibetac_inv(T1 a, T2 b, T3 q, T4* py);
+
+   template <class T1, class T2, class T3, class T4, class Policy>
+   typename tools::promote_args<T1, T2, T3, T4>::type 
+         ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol);
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibetac_inv(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibetac_inva(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibetac_inva(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibetac_invb(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibetac_invb(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta_derivative(RT1 a, RT2 b, RT3 x);  // derivative of incomplete beta
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol);  // derivative of incomplete beta
+
+   // erf & erfc error functions.
+   template <class RT> // Error function.
+   typename tools::promote_args<RT>::type erf(RT z);
+   template <class RT, class Policy> // Error function.
+   typename tools::promote_args<RT>::type erf(RT z, const Policy&);
+
+   template <class RT>// Error function complement.
+   typename tools::promote_args<RT>::type erfc(RT z);
+   template <class RT, class Policy>// Error function complement.
+   typename tools::promote_args<RT>::type erfc(RT z, const Policy&);
+
+   template <class RT>// Error function inverse.
+   typename tools::promote_args<RT>::type erf_inv(RT z);
+   template <class RT, class Policy>// Error function inverse.
+   typename tools::promote_args<RT>::type erf_inv(RT z, const Policy& pol);
+
+   template <class RT>// Error function complement inverse.
+   typename tools::promote_args<RT>::type erfc_inv(RT z);
+   template <class RT, class Policy>// Error function complement inverse.
+   typename tools::promote_args<RT>::type erfc_inv(RT z, const Policy& pol);
+
+   // Polynomials:
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type 
+         legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1);
+
+   template <class T>
+   typename tools::promote_args<T>::type 
+         legendre_p(int l, T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type 
+         legendre_p(int l, T x, const Policy& pol);
+
+   template <class T>
+   typename tools::promote_args<T>::type 
+         legendre_q(unsigned l, T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type 
+         legendre_q(unsigned l, T x, const Policy& pol);
+
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type 
+         legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1);
+
+   template <class T>
+   typename tools::promote_args<T>::type 
+         legendre_p(int l, int m, T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type 
+         legendre_p(int l, int m, T x, const Policy& pol);
+
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type  
+         laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1);
+
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type  
+      laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1);
+
+   template <class T>
+   typename tools::promote_args<T>::type 
+      laguerre(unsigned n, T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type 
+      laguerre(unsigned n, unsigned m, T x, const Policy& pol);
+
+   template <class T1, class T2>
+   struct laguerre_result
+   {
+      typedef typename mpl::if_<
+         policies::is_policy<T2>,
+         typename tools::promote_args<T1>::type,
+         typename tools::promote_args<T2>::type
+      >::type type;
+   };
+
+   template <class T1, class T2>
+   typename laguerre_result<T1, T2>::type 
+      laguerre(unsigned n, T1 m, T2 x);
+
+   template <class T>
+   typename tools::promote_args<T>::type 
+      hermite(unsigned n, T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type 
+      hermite(unsigned n, T x, const Policy& pol);
+
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type 
+      hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
+
+   template <class T1, class T2>
+   std::complex<typename tools::promote_args<T1, T2>::type> 
+         spherical_harmonic(unsigned n, int m, T1 theta, T2 phi);
+
+   template <class T1, class T2, class Policy>
+   std::complex<typename tools::promote_args<T1, T2>::type> 
+      spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type 
+         spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type 
+      spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type 
+         spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type 
+      spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
+
+   // Elliptic integrals:
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type 
+         ellint_rf(T1 x, T2 y, T3 z);
+
+   template <class T1, class T2, class T3, class Policy>
+   typename tools::promote_args<T1, T2, T3>::type 
+         ellint_rf(T1 x, T2 y, T3 z, const Policy& pol);
+
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type 
+         ellint_rd(T1 x, T2 y, T3 z);
+
+   template <class T1, class T2, class T3, class Policy>
+   typename tools::promote_args<T1, T2, T3>::type 
+         ellint_rd(T1 x, T2 y, T3 z, const Policy& pol);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type 
+         ellint_rc(T1 x, T2 y);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type 
+         ellint_rc(T1 x, T2 y, const Policy& pol);
+
+   template <class T1, class T2, class T3, class T4>
+   typename tools::promote_args<T1, T2, T3, T4>::type 
+         ellint_rj(T1 x, T2 y, T3 z, T4 p);
+
+   template <class T1, class T2, class T3, class T4, class Policy>
+   typename tools::promote_args<T1, T2, T3, T4>::type 
+         ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol);
+
+   template <typename T>
+   typename tools::promote_args<T>::type ellint_2(T k);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi, const Policy& pol);
+
+   template <typename T>
+   typename tools::promote_args<T>::type ellint_1(T k);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi, const Policy& pol);
+
+   namespace detail{
+
+   template <class T, class U, class V>
+   struct ellint_3_result
+   {
+      typedef typename mpl::if_<
+         policies::is_policy<V>,
+         typename tools::promote_args<T, U>::type,
+         typename tools::promote_args<T, U, V>::type
+      >::type type;
+   };
+
+   } // namespace detail
+
+
+   template <class T1, class T2, class T3>
+   typename detail::ellint_3_result<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi);
+
+   template <class T1, class T2, class T3, class Policy>
+   typename tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi, const Policy& pol);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v);
+
+   // Factorial functions.
+   // Note: not for integral types, at present.
+   template <class RT>
+   struct max_factorial;
+   template <class RT>
+   RT factorial(unsigned int);
+   template <class RT, class Policy>
+   RT factorial(unsigned int, const Policy& pol);
+   template <class RT>
+   RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT)); 
+   template <class RT>
+   RT double_factorial(unsigned i);
+   template <class RT, class Policy>
+   RT double_factorial(unsigned i, const Policy& pol);
+
+   template <class RT>
+   typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n, const Policy& pol);
+
+   template <class RT>
+   typename tools::promote_args<RT>::type rising_factorial(RT x, int n);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type rising_factorial(RT x, int n, const Policy& pol);
+
+   // Gamma functions.
+   template <class RT>
+   typename tools::promote_args<RT>::type tgamma(RT z);
+
+   template <class RT>
+   typename tools::promote_args<RT>::type tgamma1pm1(RT z);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type tgamma1pm1(RT z, const Policy& pol);
+
+   template <class RT1, class RT2>
+   typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z);
+
+   template <class RT1, class RT2, class Policy>
+   typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z, const Policy& pol);
+
+   template <class RT>
+   typename tools::promote_args<RT>::type lgamma(RT z, int* sign);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type lgamma(RT z, int* sign, const Policy& pol);
+
+   template <class RT>
+   typename tools::promote_args<RT>::type lgamma(RT x);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type lgamma(RT x, const Policy& pol);
+
+   template <class RT1, class RT2>
+   typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z);
+
+   template <class RT1, class RT2, class Policy>
+   typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z, const Policy&);
+
+   template <class RT1, class RT2>
+   typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z);
+
+   template <class RT1, class RT2, class Policy>
+   typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z, const Policy&);
+
+   template <class RT1, class RT2>
+   typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z);
+
+   template <class RT1, class RT2, class Policy>
+   typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x, const Policy&);
+
+   // gamma inverse.
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q, const Policy&);
+
+   // digamma:
+   template <class T>
+   typename tools::promote_args<T>::type digamma(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type digamma(T x, const Policy&);
+
+   // Hypotenuse function sqrt(x ^ 2 + y ^ 2).
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type 
+         hypot(T1 x, T2 y);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type 
+         hypot(T1 x, T2 y, const Policy&);
+
+   // cbrt - cube root.
+   template <class RT>
+   typename tools::promote_args<RT>::type cbrt(RT z);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type cbrt(RT z, const Policy&);
+
+   // log1p is log(x + 1)
+   template <class T>
+   typename tools::promote_args<T>::type log1p(T);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type log1p(T, const Policy&);
+
+   // log1pmx is log(x + 1) - x
+   template <class T>
+   typename tools::promote_args<T>::type log1pmx(T);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type log1pmx(T, const Policy&);
+
+   // Exp (x) minus 1 functions.
+   template <class T>
+   typename tools::promote_args<T>::type expm1(T);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type expm1(T, const Policy&);
+
+   // Power - 1
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type 
+         powm1(const T1 a, const T2 z);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type 
+         powm1(const T1 a, const T2 z, const Policy&);
+
+   // sqrt(1+x) - 1
+   template <class T>
+   typename tools::promote_args<T>::type sqrt1pm1(const T& val);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type sqrt1pm1(const T& val, const Policy&);
+
+   // sinus cardinals:
+   template <class T>
+   typename tools::promote_args<T>::type sinc_pi(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type sinc_pi(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type sinhc_pi(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type sinhc_pi(T x, const Policy&);
+
+   // inverse hyperbolics:
+   template<typename T>
+   typename tools::promote_args<T>::type asinh(T x);
+
+   template<typename T, class Policy>
+   typename tools::promote_args<T>::type asinh(T x, const Policy&);
+
+   template<typename T>
+   typename tools::promote_args<T>::type acosh(T x);
+
+   template<typename T, class Policy>
+   typename tools::promote_args<T>::type acosh(T x, const Policy&);
+
+   template<typename T>
+   typename tools::promote_args<T>::type atanh(T x);
+
+   template<typename T, class Policy>
+   typename tools::promote_args<T>::type atanh(T x, const Policy&);
+
+   namespace detail{
+
+      typedef mpl::int_<0> bessel_no_int_tag;      // No integer optimisation possible.
+      typedef mpl::int_<1> bessel_maybe_int_tag;   // Maybe integer optimisation.
+      typedef mpl::int_<2> bessel_int_tag;         // Definite integer optimistaion.
+
+      template <class T1, class T2, class Policy>
+      struct bessel_traits
+      {
+         typedef typename tools::promote_args<
+            T1, T2
+         >::type result_type;
+
+         typedef typename policies::precision<result_type, Policy>::type precision_type;
+
+         typedef typename mpl::if_<
+            mpl::or_<
+               mpl::less_equal<precision_type, mpl::int_<0> >,
+               mpl::greater<precision_type, mpl::int_<64> > >,
+            bessel_no_int_tag,
+            typename mpl::if_<
+               is_integral<T1>,
+               bessel_int_tag,
+               bessel_maybe_int_tag
+            >::type
+         >::type optimisation_tag;
+      };
+   } // detail
+
+   // Bessel functions:
+   template <class T1, class T2, class Policy>
+   typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j(T1 v, T2 x);
+
+   template <class T, class Policy>
+   typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel(unsigned v, T x, const Policy& pol);
+
+   template <class T>
+   typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel(unsigned v, T x);
+
+   template <class T1, class T2, class Policy>
+   typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i(T1 v, T2 x);
+
+   template <class T1, class T2, class Policy>
+   typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k(T1 v, T2 x);
+
+   template <class T1, class T2, class Policy>
+   typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann(T1 v, T2 x);
+
+   template <class T, class Policy>
+   typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann(unsigned v, T x, const Policy& pol);
+
+   template <class T>
+   typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann(unsigned v, T x);
+
+   template <class T1, class T2, class Policy>
+   std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_1(T1 v, T2 x);
+
+   template <class T1, class T2, class Policy>
+   std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_2(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_2(T1 v, T2 x);
+
+   template <class T1, class T2, class Policy>
+   std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_1(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> sph_hankel_1(T1 v, T2 x);
+
+   template <class T1, class T2, class Policy>
+   std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_2(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> sph_hankel_2(T1 v, T2 x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type airy_ai(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type airy_ai(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type airy_bi(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type airy_bi(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type airy_ai_prime(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type airy_ai_prime(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type airy_bi_prime(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type airy_bi_prime(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type sin_pi(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type sin_pi(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type cos_pi(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type cos_pi(T x);
+
+   template <class T>
+   int fpclassify BOOST_NO_MACRO_EXPAND(T t);
+
+   template <class T>
+   bool isfinite BOOST_NO_MACRO_EXPAND(T z);
+
+   template <class T>
+   bool isinf BOOST_NO_MACRO_EXPAND(T t);
+
+   template <class T>
+   bool isnan BOOST_NO_MACRO_EXPAND(T t);
+
+   template <class T>
+   bool isnormal BOOST_NO_MACRO_EXPAND(T t);
+
+   template<class T> 
+   int signbit BOOST_NO_MACRO_EXPAND(T x);
+
+   template <class T>
+   int sign BOOST_NO_MACRO_EXPAND(const T& z);
+
+   template <class T>
+   T copysign BOOST_NO_MACRO_EXPAND(const T& x, const T& y);
+
+   template <class T>
+   T changesign BOOST_NO_MACRO_EXPAND(const T& z);
+
+   // Exponential integrals:
+   namespace detail{
+
+   template <class T, class U>
+   struct expint_result
+   {
+      typedef typename mpl::if_<
+         policies::is_policy<U>,
+         typename tools::promote_args<T>::type,
+         typename tools::promote_args<U>::type
+      >::type type;
+   };
+
+   } // namespace detail
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type expint(unsigned n, T z, const Policy&);
+
+   template <class T, class U>
+   typename detail::expint_result<T, U>::type expint(T const z, U const u);
+
+   template <class T>
+   typename tools::promote_args<T>::type expint(T z);
+
+   // Zeta:
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type zeta(T s, const Policy&);
+
+   // Owen's T function:
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a, const Policy& pol);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a);
+
+   // Jacobi Functions:
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type jacobi_elliptic(T k, T theta, T* pcn, T* pdn, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type jacobi_elliptic(T k, T theta, T* pcn = 0, T* pdn = 0);
+
+   template <class U, class T, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta, const Policy& pol);
+
+   template <class U, class T>
+   typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_cn(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_cn(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_dn(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_dn(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_cd(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_cd(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_dc(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_dc(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_ns(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_ns(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_sd(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_sd(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_ds(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_ds(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_nc(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_nc(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_nd(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_nd(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_sc(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_sc(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_cs(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_cs(T k, U theta);
+
+
+   template <class T>
+   typename tools::promote_args<T>::type zeta(T s);
+
+   // pow:
+   template <int N, typename T, class Policy>
+   typename tools::promote_args<T>::type pow(T base, const Policy& policy);
+
+   template <int N, typename T>
+   typename tools::promote_args<T>::type pow(T base);
+
+   // next:
+   template <class T, class Policy>
+   T nextafter(const T&, const T&, const Policy&);
+   template <class T>
+   T nextafter(const T&, const T&);
+   template <class T, class Policy>
+   T float_next(const T&, const Policy&);
+   template <class T>
+   T float_next(const T&);
+   template <class T, class Policy>
+   T float_prior(const T&, const Policy&);
+   template <class T>
+   T float_prior(const T&);
+   template <class T, class Policy>
+   T float_distance(const T&, const T&, const Policy&);
+   template <class T>
+   T float_distance(const T&, const T&);
+
+    } // namespace math
+} // namespace boost
+
+#ifdef BOOST_HAS_LONG_LONG
+#define BOOST_MATH_DETAIL_LL_FUNC(Policy)\
+   \
+   template <class T>\
+   inline T modf(const T& v, boost::long_long_type* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
+   \
+   template <class T>\
+   inline boost::long_long_type lltrunc(const T& v){ using boost::math::lltrunc; return lltrunc(v, Policy()); }\
+   \
+   template <class T>\
+   inline boost::long_long_type llround(const T& v){ using boost::math::llround; return llround(v, Policy()); }\
+
+#else
+#define BOOST_MATH_DETAIL_LL_FUNC(Policy)
+#endif
+
+#define BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(Policy)\
+   \
+   BOOST_MATH_DETAIL_LL_FUNC(Policy)\
+   \
+   template <class RT1, class RT2>\
+   inline typename boost::math::tools::promote_args<RT1, RT2>::type \
+   beta(RT1 a, RT2 b) { return ::boost::math::beta(a, b, Policy()); }\
+\
+   template <class RT1, class RT2, class A>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, A>::type \
+   beta(RT1 a, RT2 b, A x){ return ::boost::math::beta(a, b, x, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   betac(RT1 a, RT2 b, RT3 x) { return ::boost::math::betac(a, b, x, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibeta(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta(a, b, x, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibetac(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibetac(a, b, x, Policy()); }\
+\
+   template <class T1, class T2, class T3, class T4>\
+   inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type  \
+   ibeta_inv(T1 a, T2 b, T3 p, T4* py){ return ::boost::math::ibeta_inv(a, b, p, py, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibeta_inv(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inv(a, b, p, Policy()); }\
+\
+   template <class T1, class T2, class T3, class T4>\
+   inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \
+   ibetac_inv(T1 a, T2 b, T3 q, T4* py){ return ::boost::math::ibetac_inv(a, b, q, py, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibeta_inva(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inva(a, b, p, Policy()); }\
+\
+   template <class T1, class T2, class T3>\
+   inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
+   ibetac_inva(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_inva(a, b, q, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibeta_invb(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_invb(a, b, p, Policy()); }\
+\
+   template <class T1, class T2, class T3>\
+   inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
+   ibetac_invb(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_invb(a, b, q, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibetac_inv(RT1 a, RT2 b, RT3 q){ return ::boost::math::ibetac_inv(a, b, q, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibeta_derivative(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta_derivative(a, b, x, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type erf(RT z) { return ::boost::math::erf(z, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type erfc(RT z){ return ::boost::math::erfc(z, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type erf_inv(RT z) { return ::boost::math::erf_inv(z, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type erfc_inv(RT z){ return ::boost::math::erfc_inv(z, Policy()); }\
+\
+   using boost::math::legendre_next;\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type \
+   legendre_p(int l, T x){ return ::boost::math::legendre_p(l, x, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type \
+   legendre_q(unsigned l, T x){ return ::boost::math::legendre_q(l, x, Policy()); }\
+\
+   using ::boost::math::legendre_next;\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type \
+   legendre_p(int l, int m, T x){ return ::boost::math::legendre_p(l, m, x, Policy()); }\
+\
+   using ::boost::math::laguerre_next;\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type \
+   laguerre(unsigned n, T x){ return ::boost::math::laguerre(n, x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::laguerre_result<T1, T2>::type \
+   laguerre(unsigned n, T1 m, T2 x) { return ::boost::math::laguerre(n, m, x, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type \
+   hermite(unsigned n, T x){ return ::boost::math::hermite(n, x, Policy()); }\
+\
+   using boost::math::hermite_next;\
+\
+   template <class T1, class T2>\
+   inline std::complex<typename boost::math::tools::promote_args<T1, T2>::type> \
+   spherical_harmonic(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic(n, m, theta, phi, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type \
+   spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi){ return ::boost::math::spherical_harmonic_r(n, m, theta, phi, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type \
+   spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic_i(n, m, theta, phi, Policy()); }\
+\
+   template <class T1, class T2, class Policy>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type \
+      spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);\
+\
+   template <class T1, class T2, class T3>\
+   inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
+   ellint_rf(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rf(x, y, z, Policy()); }\
+\
+   template <class T1, class T2, class T3>\
+   inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
+   ellint_rd(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rd(x, y, z, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type \
+   ellint_rc(T1 x, T2 y){ return ::boost::math::ellint_rc(x, y, Policy()); }\
+\
+   template <class T1, class T2, class T3, class T4>\
+   inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \
+   ellint_rj(T1 x, T2 y, T3 z, T4 p){ return boost::math::ellint_rj(x, y, z, p, Policy()); }\
+\
+   template <typename T>\
+   inline typename boost::math::tools::promote_args<T>::type ellint_2(T k){ return boost::math::ellint_2(k, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi){ return boost::math::ellint_2(k, phi, Policy()); }\
+\
+   template <typename T>\
+   inline typename boost::math::tools::promote_args<T>::type ellint_1(T k){ return boost::math::ellint_1(k, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi){ return boost::math::ellint_1(k, phi, Policy()); }\
+\
+   template <class T1, class T2, class T3>\
+   inline typename boost::math::tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi){ return boost::math::ellint_3(k, v, phi, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v){ return boost::math::ellint_3(k, v, Policy()); }\
+\
+   using boost::math::max_factorial;\
+   template <class RT>\
+   inline RT factorial(unsigned int i) { return boost::math::factorial<RT>(i, Policy()); }\
+   using boost::math::unchecked_factorial;\
+   template <class RT>\
+   inline RT double_factorial(unsigned i){ return boost::math::double_factorial<RT>(i, Policy()); }\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type falling_factorial(RT x, unsigned n){ return boost::math::falling_factorial(x, n, Policy()); }\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type rising_factorial(RT x, unsigned n){ return boost::math::rising_factorial(x, n, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type tgamma(RT z){ return boost::math::tgamma(z, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type tgamma1pm1(RT z){ return boost::math::tgamma1pm1(z, Policy()); }\
+\
+   template <class RT1, class RT2>\
+   inline typename boost::math::tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z){ return boost::math::tgamma(a, z, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type lgamma(RT z, int* sign){ return boost::math::lgamma(z, sign, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type lgamma(RT x){ return boost::math::lgamma(x, Policy()); }\
+\
+   template <class RT1, class RT2>\
+   inline typename boost::math::tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z){ return boost::math::tgamma_lower(a, z, Policy()); }\
+\
+   template <class RT1, class RT2>\
+   inline typename boost::math::tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z){ return boost::math::gamma_q(a, z, Policy()); }\
+\
+   template <class RT1, class RT2>\
+   inline typename boost::math::tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z){ return boost::math::gamma_p(a, z, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta){ return boost::math::tgamma_delta_ratio(z, delta, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b) { return boost::math::tgamma_ratio(a, b, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x){ return boost::math::gamma_p_derivative(a, x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p){ return boost::math::gamma_p_inv(a, p, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p){ return boost::math::gamma_p_inva(a, p, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q){ return boost::math::gamma_q_inv(a, q, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q){ return boost::math::gamma_q_inva(a, q, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type digamma(T x){ return boost::math::digamma(x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type \
+   hypot(T1 x, T2 y){ return boost::math::hypot(x, y, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type cbrt(RT z){ return boost::math::cbrt(z, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type log1p(T x){ return boost::math::log1p(x, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type log1pmx(T x){ return boost::math::log1pmx(x, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type expm1(T x){ return boost::math::expm1(x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type \
+   powm1(const T1 a, const T2 z){ return boost::math::powm1(a, z, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type sqrt1pm1(const T& val){ return boost::math::sqrt1pm1(val, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type sinc_pi(T x){ return boost::math::sinc_pi(x, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type sinhc_pi(T x){ return boost::math::sinhc_pi(x, Policy()); }\
+\
+   template<typename T>\
+   inline typename boost::math::tools::promote_args<T>::type asinh(const T x){ return boost::math::asinh(x, Policy()); }\
+\
+   template<typename T>\
+   inline typename boost::math::tools::promote_args<T>::type acosh(const T x){ return boost::math::acosh(x, Policy()); }\
+\
+   template<typename T>\
+   inline typename boost::math::tools::promote_args<T>::type atanh(const T x){ return boost::math::atanh(x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type cyl_bessel_j(T1 v, T2 x)\
+   { return boost::math::cyl_bessel_j(v, x, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type sph_bessel(unsigned v, T x)\
+   { return boost::math::sph_bessel(v, x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+   cyl_bessel_i(T1 v, T2 x) { return boost::math::cyl_bessel_i(v, x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+   cyl_bessel_k(T1 v, T2 x) { return boost::math::cyl_bessel_k(v, x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+   cyl_neumann(T1 v, T2 x){ return boost::math::cyl_neumann(v, x, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type \
+   sph_neumann(unsigned v, T x){ return boost::math::sph_neumann(v, x, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type sin_pi(T x){ return boost::math::sin_pi(x); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type cos_pi(T x){ return boost::math::cos_pi(x); }\
+\
+   using boost::math::fpclassify;\
+   using boost::math::isfinite;\
+   using boost::math::isinf;\
+   using boost::math::isnan;\
+   using boost::math::isnormal;\
+   using boost::math::signbit;\
+   using boost::math::sign;\
+   using boost::math::copysign;\
+   using boost::math::changesign;\
+   \
+   template <class T, class U>\
+   inline typename boost::math::tools::promote_args<T,U>::type expint(T const& z, U const& u)\
+   { return boost::math::expint(z, u, Policy()); }\
+   \
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type expint(T z){ return boost::math::expint(z, Policy()); }\
+   \
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type zeta(T s){ return boost::math::zeta(s, Policy()); }\
+   \
+   template <class T>\
+   inline T round(const T& v){ using boost::math::round; return round(v, Policy()); }\
+   \
+   template <class T>\
+   inline int iround(const T& v){ using boost::math::iround; return iround(v, Policy()); }\
+   \
+   template <class T>\
+   inline long lround(const T& v){ using boost::math::lround; return lround(v, Policy()); }\
+   \
+   template <class T>\
+   inline T trunc(const T& v){ using boost::math::trunc; return trunc(v, Policy()); }\
+   \
+   template <class T>\
+   inline int itrunc(const T& v){ using boost::math::itrunc; return itrunc(v, Policy()); }\
+   \
+   template <class T>\
+   inline long ltrunc(const T& v){ using boost::math::ltrunc; return ltrunc(v, Policy()); }\
+   \
+   template <class T>\
+   inline T modf(const T& v, T* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
+   \
+   template <class T>\
+   inline T modf(const T& v, int* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
+   \
+   template <class T>\
+   inline T modf(const T& v, long* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
+   \
+   template <int N, class T>\
+   inline typename boost::math::tools::promote_args<T>::type pow(T v){ return boost::math::pow<N>(v, Policy()); }\
+   \
+   template <class T> T nextafter(const T& a, const T& b){ return boost::math::nextafter(a, b, Policy()); }\
+   template <class T> T float_next(const T& a){ return boost::math::float_next(a, Policy()); }\
+   template <class T> T float_prior(const T& a){ return boost::math::float_prior(a, Policy()); }\
+   template <class T> T float_distance(const T& a, const T& b){ return boost::math::float_distance(a, b, Policy()); }\
+   \
+   template <class RT1, class RT2>\
+   inline typename boost::math::tools::promote_args<RT1, RT2>::type owens_t(RT1 a, RT2 z){ return boost::math::owens_t(a, z, Policy()); }\
+   \
+   template <class T1, class T2>\
+   inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> cyl_hankel_1(T1 v, T2 x)\
+   {  return boost::math::cyl_hankel_1(v, x, Policy()); }\
+   \
+   template <class T1, class T2>\
+   inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> cyl_hankel_2(T1 v, T2 x)\
+   { return boost::math::cyl_hankel_2(v, x, Policy()); }\
+   \
+   template <class T1, class T2>\
+   inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> sph_hankel_1(T1 v, T2 x)\
+   { return boost::math::sph_hankel_1(v, x, Policy()); }\
+   \
+   template <class T1, class T2>\
+   inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> sph_hankel_2(T1 v, T2 x)\
+   { return boost::math::sph_hankel_2(v, x, Policy()); }\
+   \
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type jacobi_elliptic(T k, T theta, T* pcn, T* pdn)\
+   { return boost::math::jacobi_elliptic(k, theta, pcn, pdn, Policy()); }\
+   \
+   template <class U, class T>\
+   inline typename boost::math::tools::promote_args<T, U>::type jacobi_sn(U k, T theta)\
+   { return boost::math::jacobi_sn(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename boost::math::tools::promote_args<T, U>::type jacobi_cn(T k, U theta)\
+   { return boost::math::jacobi_cn(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename boost::math::tools::promote_args<T, U>::type jacobi_dn(T k, U theta)\
+   { return boost::math::jacobi_dn(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename boost::math::tools::promote_args<T, U>::type jacobi_cd(T k, U theta)\
+   { return boost::math::jacobi_cd(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename boost::math::tools::promote_args<T, U>::type jacobi_dc(T k, U theta)\
+   { return boost::math::jacobi_dc(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename boost::math::tools::promote_args<T, U>::type jacobi_ns(T k, U theta)\
+   { return boost::math::jacobi_ns(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename boost::math::tools::promote_args<T, U>::type jacobi_sd(T k, U theta)\
+   { return boost::math::jacobi_sd(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename boost::math::tools::promote_args<T, U>::type jacobi_ds(T k, U theta)\
+   { return boost::math::jacobi_ds(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename boost::math::tools::promote_args<T, U>::type jacobi_nc(T k, U theta)\
+   { return boost::math::jacobi_nc(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename boost::math::tools::promote_args<T, U>::type jacobi_nd(T k, U theta)\
+   { return boost::math::jacobi_nd(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename boost::math::tools::promote_args<T, U>::type jacobi_sc(T k, U theta)\
+   { return boost::math::jacobi_sc(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename boost::math::tools::promote_args<T, U>::type jacobi_cs(T k, U theta)\
+   { return boost::math::jacobi_cs(k, theta, Policy()); }\
+   \
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type airy_ai(T x)\
+   {  return boost::math::airy_ai(x, Policy());  }\
+   \
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type airy_bi(T x)\
+   {  return boost::math::airy_bi(x, Policy());  }\
+   \
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type airy_ai_prime(T x)\
+   {  return boost::math::airy_ai_prime(x, Policy());  }\
+   \
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type airy_bi_prime(T x)\
+   {  return boost::math::airy_bi_prime(x, Policy());  }\
+   \
+
+
+
+
+
+#endif // BOOST_MATH_SPECIAL_MATH_FWD_HPP
+
+
diff --git a/ext/boost/math/special_functions/sign.hpp b/ext/boost/math/special_functions/sign.hpp
new file mode 100644
index 0000000..6de88b2
--- /dev/null
+++ b/ext/boost/math/special_functions/sign.hpp
@@ -0,0 +1,145 @@
+//  (C) Copyright John Maddock 2006.
+//  (C) Copyright Johan Rade 2006.
+//  (C) Copyright Paul A. Bristow 2011 (added changesign).
+
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_SIGN_HPP
+#define BOOST_MATH_TOOLS_SIGN_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/tools/config.hpp>
+#include <boost/math/special_functions/math_fwd.hpp>
+#include <boost/math/special_functions/detail/fp_traits.hpp>
+
+namespace boost{ namespace math{ 
+
+namespace detail {
+
+  // signbit
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+    template<class T> 
+    inline int signbit_impl(T x, native_tag const&)
+    {
+        return (std::signbit)(x);
+    }
+#endif
+
+    template<class T> 
+    inline int signbit_impl(T x, generic_tag<true> const&)
+    {
+        return x < 0;
+    }
+
+    template<class T> 
+    inline int signbit_impl(T x, generic_tag<false> const&)
+    {
+        return x < 0;
+    }
+
+    template<class T> 
+    inline int signbit_impl(T x, ieee_copy_all_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        return a & traits::sign ? 1 : 0;
+    }
+
+    template<class T> 
+    inline int signbit_impl(T x, ieee_copy_leading_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+
+        return a & traits::sign ? 1 : 0;
+    }
+
+    // Changesign
+
+    template<class T>
+    inline T (changesign_impl)(T x, generic_tag<true> const&)
+    {
+        return -x;
+    }
+
+    template<class T>
+    inline T (changesign_impl)(T x, generic_tag<false> const&)
+    {
+        return -x;
+    }
+
+
+    template<class T>
+    inline T changesign_impl(T x, ieee_copy_all_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::sign_change_type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a ^= traits::sign;
+        traits::set_bits(x,a);
+        return x;
+    }
+
+    template<class T>
+    inline T (changesign_impl)(T x, ieee_copy_leading_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::sign_change_type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a ^= traits::sign;
+        traits::set_bits(x,a);
+        return x;
+    }
+
+
+}   // namespace detail
+
+template<class T> int (signbit)(T x)
+{ 
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   typedef typename boost::is_floating_point<T>::type fp_tag;
+   return detail::signbit_impl(x, method());
+}
+
+template <class T>
+inline int sign BOOST_NO_MACRO_EXPAND(const T& z)
+{
+   return (z == 0) ? 0 : (boost::math::signbit)(z) ? -1 : 1;
+}
+
+template<class T> T (changesign)(const T& x)
+{ //!< \brief return unchanged binary pattern of x, except for change of sign bit. 
+   typedef typename detail::fp_traits<T>::sign_change_type traits;
+   typedef typename traits::method method;
+   typedef typename boost::is_floating_point<T>::type fp_tag;
+
+   return detail::changesign_impl(x, method());
+}
+
+template <class T>
+inline T copysign BOOST_NO_MACRO_EXPAND(const T& x, const T& y)
+{
+   BOOST_MATH_STD_USING
+   return (boost::math::signbit)(x) != (boost::math::signbit)(y) ? (boost::math::changesign)(x) : x;
+}
+
+} // namespace math
+} // namespace boost
+
+
+#endif // BOOST_MATH_TOOLS_SIGN_HPP
+
+
diff --git a/ext/boost/math/tools/config.hpp b/ext/boost/math/tools/config.hpp
new file mode 100644
index 0000000..b1fcd13
--- /dev/null
+++ b/ext/boost/math/tools/config.hpp
@@ -0,0 +1,330 @@
+//  Copyright (c) 2006-7 John Maddock
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_CONFIG_HPP
+#define BOOST_MATH_TOOLS_CONFIG_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/config.hpp>
+#include <boost/cstdint.hpp> // for boost::uintmax_t
+#include <boost/detail/workaround.hpp>
+#include <algorithm>  // for min and max
+#include <boost/config/no_tr1/cmath.hpp>
+#include <climits>
+#include <cfloat>
+#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
+#  include <math.h>
+#endif
+
+#include <boost/math/tools/user.hpp>
+#include <boost/math/special_functions/detail/round_fwd.hpp>
+
+#if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \
+   || (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \
+   && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+//
+// Borland post 5.8.2 uses Dinkumware's std C lib which
+// doesn't have true long double precision.  Earlier
+// versions are problematic too:
+//
+#  define BOOST_MATH_NO_REAL_CONCEPT_TESTS
+#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#  define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
+#  include <float.h>
+#endif
+#ifdef __IBMCPP__
+//
+// For reasons I don't unserstand, the tests with IMB's compiler all
+// pass at long double precision, but fail with real_concept, those tests
+// are disabled for now.  (JM 2012).
+#  define BOOST_MATH_NO_REAL_CONCEPT_TESTS
+#endif
+#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106)) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+//
+// Darwin's rather strange "double double" is rather hard to
+// support, it should be possible given enough effort though...
+//
+#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
+#if defined(unix) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER <= 1000) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+//
+// Intel compiler prior to version 10 has sporadic problems
+// calling the long double overloads of the std lib math functions:
+// calling ::powl is OK, but std::pow(long double, long double) 
+// may segfault depending upon the value of the arguments passed 
+// and the specific Linux distribution.
+//
+// We'll be conservative and disable long double support for this compiler.
+//
+// Comment out this #define and try building the tests to determine whether
+// your Intel compiler version has this issue or not.
+//
+#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
+#if defined(unix) && defined(__INTEL_COMPILER)
+//
+// Intel compiler has sporadic issues compiling std::fpclassify depending on
+// the exact OS version used.  Use our own code for this as we know it works
+// well on Intel processors:
+//
+#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
+#endif
+
+#if defined(BOOST_MSVC) && !defined(_WIN32_WCE)
+   // Better safe than sorry, our tests don't support hardware exceptions:
+#  define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
+#endif
+
+#ifdef __IBMCPP__
+#  define BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS
+#endif
+
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901))
+#  define BOOST_MATH_USE_C99
+#endif
+
+#if (defined(__hpux) && !defined(__hppa))
+#  define BOOST_MATH_USE_C99
+#endif
+
+#if defined(__GNUC__) && defined(_GLIBCXX_USE_C99)
+#  define BOOST_MATH_USE_C99
+#endif
+
+#if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \
+  || defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \
+  || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99))
+#  define BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY
+#endif
+
+#if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
+
+#  include "boost/type.hpp"
+#  include "boost/non_type.hpp"
+
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)         boost::type<t>* = 0
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)    boost::type<t>*
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)  boost::non_type<t, v>* = 0
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)  boost::non_type<t, v>*
+
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t)         \
+             , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)    \
+             , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)  \
+             , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)  \
+             , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+#else
+
+// no workaround needed: expand to nothing
+
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+
+#endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
+
+#if (defined(__SUNPRO_CC) || defined(__hppa) || defined(__GNUC__)) && !defined(BOOST_MATH_SMALL_CONSTANT)
+// Sun's compiler emits a hard error if a constant underflows,
+// as does aCC on PA-RISC, while gcc issues a large number of warnings:
+#  define BOOST_MATH_SMALL_CONSTANT(x) 0
+#else
+#  define BOOST_MATH_SMALL_CONSTANT(x) x
+#endif
+
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
+//
+// Define if constants too large for a float cause "bad"
+// values to be stored in the data, rather than infinity
+// or a suitably large value.
+//
+#  define BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS
+#endif
+//
+// Tune performance options for specific compilers:
+//
+#ifdef BOOST_MSVC
+#  define BOOST_MATH_POLY_METHOD 2
+#elif defined(BOOST_INTEL)
+#  define BOOST_MATH_POLY_METHOD 2
+#  define BOOST_MATH_RATIONAL_METHOD 2
+#elif defined(__GNUC__)
+#  define BOOST_MATH_POLY_METHOD 3
+#  define BOOST_MATH_RATIONAL_METHOD 3
+#  define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
+#  define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
+#endif
+
+#if defined(BOOST_NO_LONG_LONG) && !defined(BOOST_MATH_INT_TABLE_TYPE)
+#  define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
+#  define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
+#endif
+
+//
+// The maximum order of polynomial that will be evaluated 
+// via an unrolled specialisation:
+//
+#ifndef BOOST_MATH_MAX_POLY_ORDER
+#  define BOOST_MATH_MAX_POLY_ORDER 17
+#endif 
+//
+// Set the method used to evaluate polynomials and rationals:
+//
+#ifndef BOOST_MATH_POLY_METHOD
+#  define BOOST_MATH_POLY_METHOD 1
+#endif 
+#ifndef BOOST_MATH_RATIONAL_METHOD
+#  define BOOST_MATH_RATIONAL_METHOD 0
+#endif 
+//
+// decide whether to store constants as integers or reals:
+//
+#ifndef BOOST_MATH_INT_TABLE_TYPE
+#  define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
+#endif
+#ifndef BOOST_MATH_INT_VALUE_SUFFIX
+#  define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF
+#endif
+
+//
+// Helper macro for controlling the FP behaviour:
+//
+#ifndef BOOST_MATH_CONTROL_FP
+#  define BOOST_MATH_CONTROL_FP
+#endif
+//
+// Helper macro for using statements:
+//
+#define BOOST_MATH_STD_USING \
+   using std::abs;\
+   using std::acos;\
+   using std::cos;\
+   using std::fmod;\
+   using std::modf;\
+   using std::tan;\
+   using std::asin;\
+   using std::cosh;\
+   using std::frexp;\
+   using std::pow;\
+   using std::tanh;\
+   using std::atan;\
+   using std::exp;\
+   using std::ldexp;\
+   using std::sin;\
+   using std::atan2;\
+   using std::fabs;\
+   using std::log;\
+   using std::sinh;\
+   using std::ceil;\
+   using std::floor;\
+   using std::log10;\
+   using std::sqrt;\
+   using boost::math::round;\
+   using boost::math::iround;\
+   using boost::math::lround;\
+   using boost::math::trunc;\
+   using boost::math::itrunc;\
+   using boost::math::ltrunc;\
+   using boost::math::modf;
+
+
+namespace boost{ namespace math{
+namespace tools
+{
+
+template <class T>
+inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c)
+{
+   return (std::max)((std::max)(a, b), c);
+}
+
+template <class T>
+inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c, T d)
+{
+   return (std::max)((std::max)(a, b), (std::max)(c, d));
+}
+
+} // namespace tools
+
+template <class T>
+void suppress_unused_variable_warning(const T&)
+{
+}
+
+}} // namespace boost namespace math
+
+#if ((defined(__linux__) && !defined(__UCLIBC__)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(BOOST_NO_FENV_H)
+
+   #include <boost/detail/fenv.hpp>
+
+#  ifdef FE_ALL_EXCEPT
+
+namespace boost{ namespace math{
+   namespace detail
+   {
+   struct fpu_guard
+   {
+      fpu_guard()
+      {
+         fegetexceptflag(&m_flags, FE_ALL_EXCEPT);
+         feclearexcept(FE_ALL_EXCEPT);
+      }
+      ~fpu_guard()
+      {
+         fesetexceptflag(&m_flags, FE_ALL_EXCEPT);
+      }
+   private:
+      fexcept_t m_flags;
+   };
+
+   } // namespace detail
+   }} // namespaces
+
+#    define BOOST_FPU_EXCEPTION_GUARD boost::math::detail::fpu_guard local_guard_object;
+#    define BOOST_MATH_INSTRUMENT_FPU do{ fexcept_t cpu_flags; fegetexceptflag(&cpu_flags, FE_ALL_EXCEPT); BOOST_MATH_INSTRUMENT_VARIABLE(cpu_flags); } while(0); 
+
+#  else
+
+#    define BOOST_FPU_EXCEPTION_GUARD
+#    define BOOST_MATH_INSTRUMENT_FPU
+
+#  endif
+
+#else // All other platforms.
+#  define BOOST_FPU_EXCEPTION_GUARD
+#  define BOOST_MATH_INSTRUMENT_FPU
+#endif
+
+#ifdef BOOST_MATH_INSTRUMENT
+#define BOOST_MATH_INSTRUMENT_CODE(x) \
+   std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl;
+#define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name)
+#else
+#define BOOST_MATH_INSTRUMENT_CODE(x)
+#define BOOST_MATH_INSTRUMENT_VARIABLE(name)
+#endif
+
+#endif // BOOST_MATH_TOOLS_CONFIG_HPP
+
+
+
+
+
diff --git a/ext/boost/math/tools/promotion.hpp b/ext/boost/math/tools/promotion.hpp
new file mode 100644
index 0000000..728aaf1
--- /dev/null
+++ b/ext/boost/math/tools/promotion.hpp
@@ -0,0 +1,150 @@
+// boost\math\tools\promotion.hpp
+
+// Copyright John Maddock 2006.
+// Copyright Paul A. Bristow 2006.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// Promote arguments functions to allow math functions to have arguments
+// provided as integer OR real (floating-point, built-in or UDT)
+// (called ArithmeticType in functions that use promotion)
+// that help to reduce the risk of creating multiple instantiations.
+// Allows creation of an inline wrapper that forwards to a foo(RT, RT) function,
+// so you never get to instantiate any mixed foo(RT, IT) functions.
+
+#ifndef BOOST_MATH_PROMOTION_HPP
+#define BOOST_MATH_PROMOTION_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+// Boost type traits:
+#include <boost/math/tools/config.hpp>
+#include <boost/type_traits/is_floating_point.hpp> // for boost::is_floating_point;
+#include <boost/type_traits/is_integral.hpp> // for boost::is_integral
+#include <boost/type_traits/is_convertible.hpp> // for boost::is_convertible
+#include <boost/type_traits/is_same.hpp>// for boost::is_same
+#include <boost/type_traits/remove_cv.hpp>// for boost::remove_cv
+// Boost Template meta programming:
+#include <boost/mpl/if.hpp> // for boost::mpl::if_c.
+#include <boost/mpl/and.hpp> // for boost::mpl::if_c.
+#include <boost/mpl/or.hpp> // for boost::mpl::if_c.
+#include <boost/mpl/not.hpp> // for boost::mpl::if_c.
+
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#include <boost/static_assert.hpp>
+#endif
+
+namespace boost
+{
+  namespace math
+  {
+    namespace tools
+    {
+      // If either T1 or T2 is an integer type,
+      // pretend it was a double (for the purposes of further analysis).
+      // Then pick the wider of the two floating-point types
+      // as the actual signature to forward to.
+      // For example:
+      // foo(int, short) -> double foo(double, double);
+      // foo(int, float) -> double foo(double, double);
+      // Note: NOT float foo(float, float)
+      // foo(int, double) -> foo(double, double);
+      // foo(double, float) -> double foo(double, double);
+      // foo(double, float) -> double foo(double, double);
+      // foo(any-int-or-float-type, long double) -> foo(long double, long double);
+      // but ONLY float foo(float, float) is unchanged.
+      // So the only way to get an entirely float version is to call foo(1.F, 2.F),
+      // But since most (all?) the math functions convert to double internally,
+      // probably there would not be the hoped-for gain by using float here.
+
+      // This follows the C-compatible conversion rules of pow, etc
+      // where pow(int, float) is converted to pow(double, double).
+
+      template <class T>
+      struct promote_arg
+      { // If T is integral type, then promote to double.
+        typedef typename mpl::if_<is_integral<T>, double, T>::type type;
+      };
+      // These full specialisations reduce mpl::if_ usage and speed up
+      // compilation:
+      template <> struct promote_arg<float> { typedef float type; };
+      template <> struct promote_arg<double>{ typedef double type; };
+      template <> struct promote_arg<long double> { typedef long double type; };
+      template <> struct promote_arg<int> {  typedef double type; };
+
+      template <class T1, class T2>
+      struct promote_args_2
+      { // Promote, if necessary, & pick the wider of the two floating-point types.
+        // for both parameter types, if integral promote to double.
+        typedef typename promote_arg<T1>::type T1P; // T1 perhaps promoted.
+        typedef typename promote_arg<T2>::type T2P; // T2 perhaps promoted.
+
+        typedef typename mpl::if_<
+          typename mpl::and_<is_floating_point<T1P>, is_floating_point<T2P> >::type, // both T1P and T2P are floating-point?
+          typename mpl::if_< typename mpl::or_<is_same<long double, T1P>, is_same<long double, T2P> >::type, // either long double?
+            long double, // then result type is long double.
+            typename mpl::if_< typename mpl::or_<is_same<double, T1P>, is_same<double, T2P> >::type, // either double?
+            double, // result type is double.
+          float // else result type is float.
+          >::type
+          >::type,
+          // else one or the other is a user-defined type:
+          typename mpl::if_< typename mpl::and_<mpl::not_<is_floating_point<T2P> >, ::boost::is_convertible<T1P, T2P> >, T2P, T1P>::type>::type type;
+      }; // promote_arg2
+      // These full specialisations reduce mpl::if_ usage and speed up
+      // compilation:
+      template <> struct promote_args_2<float, float> { typedef float type; };
+      template <> struct promote_args_2<double, double>{ typedef double type; };
+      template <> struct promote_args_2<long double, long double> { typedef long double type; };
+      template <> struct promote_args_2<int, int> {  typedef double type; };
+      template <> struct promote_args_2<int, float> {  typedef double type; };
+      template <> struct promote_args_2<float, int> {  typedef double type; };
+      template <> struct promote_args_2<int, double> {  typedef double type; };
+      template <> struct promote_args_2<double, int> {  typedef double type; };
+      template <> struct promote_args_2<int, long double> {  typedef long double type; };
+      template <> struct promote_args_2<long double, int> {  typedef long double type; };
+      template <> struct promote_args_2<float, double> {  typedef double type; };
+      template <> struct promote_args_2<double, float> {  typedef double type; };
+      template <> struct promote_args_2<float, long double> {  typedef long double type; };
+      template <> struct promote_args_2<long double, float> {  typedef long double type; };
+      template <> struct promote_args_2<double, long double> {  typedef long double type; };
+      template <> struct promote_args_2<long double, double> {  typedef long double type; };
+
+      template <class T1, class T2=float, class T3=float, class T4=float, class T5=float, class T6=float>
+      struct promote_args
+      {
+         typedef typename promote_args_2<
+            typename remove_cv<T1>::type,
+            typename promote_args_2<
+               typename remove_cv<T2>::type,
+               typename promote_args_2<
+                  typename remove_cv<T3>::type,
+                  typename promote_args_2<
+                     typename remove_cv<T4>::type,
+                     typename promote_args_2<
+                        typename remove_cv<T5>::type, typename remove_cv<T6>::type
+                     >::type
+                  >::type
+               >::type
+            >::type
+         >::type type;
+
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+         //
+         // Guard against use of long double if it's not supported:
+         //
+         BOOST_STATIC_ASSERT((0 == ::boost::is_same<type, long double>::value));
+#endif
+      };
+
+    } // namespace tools
+  } // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_PROMOTION_HPP
+
diff --git a/ext/boost/math/tools/real_cast.hpp b/ext/boost/math/tools/real_cast.hpp
new file mode 100644
index 0000000..9b854e3
--- /dev/null
+++ b/ext/boost/math/tools/real_cast.hpp
@@ -0,0 +1,29 @@
+//  Copyright John Maddock 2006.
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_REAL_CAST_HPP
+#define BOOST_MATH_TOOLS_REAL_CAST_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+namespace boost{ namespace math
+{
+  namespace tools
+  {
+    template <class To, class T>
+    inline To real_cast(T t)
+    {
+       return static_cast<To>(t);
+    }
+  } // namespace tools
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_TOOLS_REAL_CAST_HPP
+
+
+
diff --git a/ext/boost/math/tools/user.hpp b/ext/boost/math/tools/user.hpp
new file mode 100644
index 0000000..c1bdaf7
--- /dev/null
+++ b/ext/boost/math/tools/user.hpp
@@ -0,0 +1,97 @@
+// Copyright John Maddock 2007.
+// Copyright Paul A. Bristow 2007.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_USER_HPP
+#define BOOST_MATH_TOOLS_USER_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+// This file can be modified by the user to change the default policies.
+// See "Changing the Policy Defaults" in documentation.
+
+// define this if the platform has no long double functions,
+// or if the long double versions have only double precision:
+//
+// #define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+//
+// Performance tuning options:
+//
+// #define BOOST_MATH_POLY_METHOD 3
+// #define BOOST_MATH_RATIONAL_METHOD 3
+//
+// The maximum order of polynomial that will be evaluated
+// via an unrolled specialisation:
+//
+// #define BOOST_MATH_MAX_POLY_ORDER 17
+//
+// decide whether to store constants as integers or reals:
+//
+// #define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
+
+//
+// Default policies follow:
+//
+// Domain errors:
+//
+// #define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error
+//
+// Pole errors:
+//
+// #define BOOST_MATH_POLE_ERROR_POLICY throw_on_error
+//
+// Overflow Errors:
+//
+// #define BOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error
+//
+// Internal Evaluation Errors:
+//
+// #define BOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error
+//
+// Underfow:
+//
+// #define BOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error
+//
+// Denorms:
+//
+// #define BOOST_MATH_DENORM_ERROR_POLICY ignore_error
+//
+// Max digits to use for internal calculations:
+//
+// #define BOOST_MATH_DIGITS10_POLICY 0
+//
+// Promote floats to doubles internally?
+//
+// #define BOOST_MATH_PROMOTE_FLOAT_POLICY true
+//
+// Promote doubles to long double internally:
+//
+// #define BOOST_MATH_PROMOTE_DOUBLE_POLICY true
+//
+// What do discrete quantiles return?
+//
+// #define BOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards
+//
+// If a function is mathematically undefined
+// (for example the Cauchy distribution has no mean),
+// then do we stop the code from compiling?
+//
+// #define BOOST_MATH_ASSERT_UNDEFINED_POLICY true
+//
+// Maximum series iterstions permitted:
+//
+// #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000
+//
+// Maximum root finding steps permitted:
+//
+// define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200
+
+#endif // BOOST_MATH_TOOLS_USER_HPP
+
+
diff --git a/ext/boost/move/move.hpp b/ext/boost/move/move.hpp
new file mode 100644
index 0000000..6029d6d
--- /dev/null
+++ b/ext/boost/move/move.hpp
@@ -0,0 +1,1273 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright David Abrahams, Vicente Botet 2009.
+// (C) Copyright Ion Gaztanaga 2009-2010.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! \file
+
+#ifndef BOOST_MOVE_MOVE_HPP
+#define BOOST_MOVE_MOVE_HPP
+
+#if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+
+/// @cond
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_MSVC
+   #ifndef _CRT_SECURE_NO_DEPRECATE
+      #define  BOOST_INTERPROCESS_CRT_SECURE_NO_DEPRECATE
+      #define _CRT_SECURE_NO_DEPRECATE
+   #endif
+   #ifndef _SCL_SECURE_NO_WARNINGS
+      #define  BOOST_INTERPROCESS_SCL_SECURE_NO_WARNINGS
+      #define _SCL_SECURE_NO_WARNINGS
+   #endif
+   #pragma warning (push)
+   #pragma warning(disable:4996)
+#endif
+
+#include <algorithm> //copy, copy_backward
+#include <memory>    //uninitialized_copy
+#include <iterator>  //std::iterator
+
+#define BOOST_MOVE_AVOID_BOOST_DEPENDENCIES
+
+//If boost dependencies are avoided include all machinery
+#if !defined(BOOST_MOVE_AVOID_BOOST_DEPENDENCIES)
+   #include <boost/utility/enable_if.hpp>
+   #include <boost/utility/addressof.hpp>
+   #include <boost/mpl/if.hpp>
+   #include <boost/mpl/bool.hpp>
+   #include <boost/mpl/and.hpp>
+   #include <boost/mpl/not.hpp>
+   #include <boost/mpl/identity.hpp>
+   #include <boost/type_traits/is_class.hpp>
+   #include <boost/type_traits/is_convertible.hpp>
+   #include <boost/type_traits/has_trivial_destructor.hpp>
+   #include <boost/type_traits/integral_constant.hpp>
+
+   #define BOOST_MOVE_MPL_NS    ::boost::mpl
+   #define BOOST_MOVE_BOOST_NS  ::boost
+#else
+   #define BOOST_MOVE_MPL_NS    ::boost::move_detail
+   #define BOOST_MOVE_BOOST_NS  ::boost::move_detail
+#endif   //#ifdef BOOST_MOVE_AVOID_BOOST_DEPENDENCIES
+
+//Small meta-typetraits to support move
+#ifdef BOOST_MOVE_AVOID_BOOST_DEPENDENCIES
+
+   namespace boost {
+   namespace move_detail {
+
+   //if_
+   template<bool C, typename T1, typename T2>
+   struct if_c
+   {
+       typedef T1 type;
+   };
+
+   template<typename T1, typename T2>
+   struct if_c<false,T1,T2>
+   {
+       typedef T2 type;
+   };
+
+   template<typename T1, typename T2, typename T3>
+   struct if_
+   {
+      typedef typename if_c<0 != T1::value, T2, T3>::type type;
+   };
+
+   //enable_if_
+   template <bool B, class T = void>
+   struct enable_if_c
+   {
+      typedef T type;
+   };
+
+   template <class T>
+   struct enable_if_c<false, T> {};
+
+   template <class Cond, class T = void>
+   struct enable_if : public enable_if_c<Cond::value, T> {};
+
+   template <class Cond, class T = void>
+   struct disable_if : public enable_if_c<!Cond::value, T> {};
+
+   //integral_constant
+   template<class T, T v>
+   struct integral_constant
+   {
+      static const T value = v;
+      typedef T value_type;
+      typedef integral_constant<T, v> type;
+   };
+
+   //identity
+   template <class T>
+   struct identity
+   {
+      typedef T type;
+   };
+
+   //is_convertible
+   template <class T, class U>
+   class is_convertible
+   {
+      typedef char true_t;
+      class false_t { char dummy[2]; };
+      static true_t dispatch(U);
+      static false_t dispatch(...);
+      static T &trigger();
+      public:
+      enum { value = sizeof(dispatch(trigger())) == sizeof(true_t) };
+   };
+
+   //and_ not_
+   template <typename Condition1, typename Condition2, typename Condition3 = integral_constant<bool, true> >
+     struct and_
+       : public integral_constant<bool, Condition1::value && Condition2::value && Condition3::value>
+   {};
+
+   template <typename Boolean>
+     struct not_
+       : public integral_constant<bool, !Boolean::value>
+   {};
+
+   //is_lvalue_reference
+   template<class T>
+   struct is_lvalue_reference
+      : public integral_constant<bool, false>
+   {};
+
+   template<class T>
+   struct is_lvalue_reference<T&>
+      : public integral_constant<bool, true>
+   {};
+
+   //has_trivial_destructor
+   template<class T>
+   struct has_trivial_destructor
+      : public integral_constant<bool, false>
+   {};
+
+   //addressof
+   template<class T> struct addr_impl_ref
+   {
+      T & v_;
+      inline addr_impl_ref( T & v ): v_( v ) {}
+      inline operator T& () const { return v_; }
+
+      private:
+      addr_impl_ref & operator=(const addr_impl_ref &);
+   };
+
+   template<class T> struct addressof_impl
+   {
+      static inline T * f( T & v, long )
+      {
+         return reinterpret_cast<T*>(
+            &const_cast<char&>(reinterpret_cast<const volatile char &>(v)));
+      }
+
+      static inline T * f( T * v, int )
+      {  return v;  }
+   };
+
+   template<class T>
+   inline T * addressof( T & v )
+   {
+      return ::boost::move_detail::addressof_impl<T>::f
+         ( ::boost::move_detail::addr_impl_ref<T>( v ), 0 );
+   }
+
+   }  //namespace move_detail {
+   }  //namespace boost {
+
+#endif   //BOOST_MOVE_AVOID_BOOST_DEPENDENCIES
+
+//Compiler workaround detection
+#if !defined(BOOST_NO_RVALUE_REFERENCES)
+
+   #if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5) && !defined(__clang__)
+      //Pre-standard rvalue binding rules
+      #define BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
+   #elif defined(_MSC_VER) && (_MSC_VER == 1600)
+      //Standard rvalue binding rules but with some bugs
+      #define BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG
+      //Use standard library for MSVC to avoid namespace issues as
+      //some move calls in the STL are not fully qualified.
+      //#define BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE
+   #endif
+
+#endif
+
+/// @endcond
+
+#endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+
+#if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+
+   //Move emulation rv breaks standard aliasing rules so add workarounds for some compilers
+   #if defined(__GNUC__) && (__GNUC__ >= 4)
+      #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS __attribute__((__may_alias__))
+   #else
+      #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS
+   #endif
+
+   namespace boost {
+
+   namespace move_detail {
+      template<class T>
+      struct is_class_or_union
+      {
+         struct twochar { char _[2]; };
+         template <class U>
+         static char is_class_or_union_tester(void(U::*)(void));
+         template <class U>
+         static twochar is_class_or_union_tester(...);
+         static const bool value = sizeof(is_class_or_union_tester<T>(0)) == sizeof(char);
+      };
+      struct empty{};
+   }
+
+   //////////////////////////////////////////////////////////////////////////////
+   //
+   //                            struct rv
+   //
+   //////////////////////////////////////////////////////////////////////////////
+   template <class T>
+   class rv
+      : public BOOST_MOVE_MPL_NS::if_c
+         < ::boost::move_detail::is_class_or_union<T>::value
+         , T
+         , ::boost::move_detail::empty
+         >::type
+   {
+      rv();
+      ~rv();
+      rv(rv const&);
+      void operator=(rv const&);
+   } BOOST_MOVE_ATTRIBUTE_MAY_ALIAS;
+
+
+
+   //////////////////////////////////////////////////////////////////////////////
+   //
+   //                            move_detail::is_rv
+   //
+   //////////////////////////////////////////////////////////////////////////////
+
+   namespace move_detail {
+
+   template <class T>
+   struct is_rv
+      : BOOST_MOVE_BOOST_NS::integral_constant<bool, false>
+   {};
+
+   template <class T>
+   struct is_rv< rv<T> >
+      : BOOST_MOVE_BOOST_NS::integral_constant<bool, true>
+   {};
+
+   template <class T>
+   struct is_rv< const rv<T> >
+      : BOOST_MOVE_BOOST_NS::integral_constant<bool, true>
+   {};
+
+   }  //namespace move_detail {
+
+   //////////////////////////////////////////////////////////////////////////////
+   //
+   //                               has_move_emulation_enabled
+   //
+   //////////////////////////////////////////////////////////////////////////////
+   template<class T>
+   struct has_move_emulation_enabled
+      : BOOST_MOVE_BOOST_NS::is_convertible< T, ::boost::rv<T>& >
+   {};
+
+   template<class T>
+   struct has_move_emulation_enabled<T&>
+      : BOOST_MOVE_BOOST_NS::integral_constant<bool, false>
+   {};
+
+   template<class T>
+   struct has_move_emulation_enabled< ::boost::rv<T> >
+      : BOOST_MOVE_BOOST_NS::integral_constant<bool, false>
+   {};
+
+   template <class T>
+   struct has_move_emulation_enabled_aux
+     : has_move_emulation_enabled<T> {};
+    
+   template <class T>
+   struct has_nothrow_move
+      : public BOOST_MOVE_BOOST_NS::integral_constant<bool, false>
+   {};
+
+   //////////////////////////////////////////////////////////////////////////////
+   //
+   //                            move()
+   //
+   //////////////////////////////////////////////////////////////////////////////
+   
+   template <class T>
+   inline typename BOOST_MOVE_BOOST_NS::disable_if<has_move_emulation_enabled_aux<T>, T&>::type move(T& x)
+   {
+      return x;
+   }
+
+   template <class T>
+   inline typename BOOST_MOVE_BOOST_NS::enable_if<has_move_emulation_enabled<T>, rv<T>&>::type move(T& x)
+   {
+      return *static_cast<rv<T>* >(BOOST_MOVE_BOOST_NS::addressof(x));
+   }
+
+   template <class T>
+   inline typename BOOST_MOVE_BOOST_NS::enable_if<has_move_emulation_enabled<T>, rv<T>&>::type move(rv<T>& x)
+   {
+      return x;
+   }
+
+   #define BOOST_RV_REF(TYPE)\
+      ::boost::rv< TYPE >& \
+   //
+
+   #define BOOST_RV_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\
+      ::boost::rv< TYPE<ARG1, ARG2> >& \
+   //
+
+   #define BOOST_RV_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\
+      ::boost::rv< TYPE<ARG1, ARG2, ARG3> >& \
+   //
+
+   #define BOOST_RV_REF_BEG\
+      ::boost::rv<   \
+   //
+
+   #define BOOST_RV_REF_END\
+      >& \
+   //
+
+
+
+   #define BOOST_FWD_REF(TYPE)\
+      const TYPE & \
+   //
+
+   #define BOOST_CATCH_CONST_RLVALUE(TYPE)\
+      const ::boost::rv< TYPE >& \
+   //
+
+   #define BOOST_COPY_ASSIGN_REF(TYPE)\
+      const ::boost::rv< TYPE >& \
+   //
+
+   #define BOOST_COPY_ASSIGN_REF_BEG \
+      const ::boost::rv<  \
+   //
+
+   #define BOOST_COPY_ASSIGN_REF_END \
+      >& \
+   //
+
+   #define BOOST_MOVE_COPY_ASSIGN_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\
+      const ::boost::rv< TYPE<ARG1, ARG2> >& \
+   //
+
+   #define BOOST_MOVE_COPY_ASSIGN_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\
+      const ::boost::rv< TYPE<ARG1, ARG2, ARG3> >& \
+   //
+
+   //////////////////////////////////////////////////////////////////////////////
+   //
+   //                            forward()
+   //
+   //////////////////////////////////////////////////////////////////////////////
+
+   template <class T>
+   inline typename BOOST_MOVE_BOOST_NS::enable_if< ::boost::move_detail::is_rv<T>, T &>::type
+      forward(const typename BOOST_MOVE_MPL_NS::identity<T>::type &x)
+   {
+      return const_cast<T&>(x);
+   }
+
+   template <class T>
+   inline typename BOOST_MOVE_BOOST_NS::disable_if< ::boost::move_detail::is_rv<T>, const T &>::type
+      forward(const typename BOOST_MOVE_MPL_NS::identity<T>::type &x)
+   {
+      return x;
+   }
+
+   //////////////////////////////////////////////////////////////////////////////
+   //
+   //                         BOOST_MOVABLE_BUT_NOT_COPYABLE
+   //
+   //////////////////////////////////////////////////////////////////////////////
+   #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\
+      private:\
+      TYPE(TYPE &);\
+      TYPE& operator=(TYPE &);\
+      public:\
+      operator ::boost::rv<TYPE>&() \
+      {  return *static_cast< ::boost::rv<TYPE>* >(this);  }\
+      operator const ::boost::rv<TYPE>&() const \
+      {  return *static_cast<const ::boost::rv<TYPE>* >(this);  }\
+      private:\
+   //
+
+   //////////////////////////////////////////////////////////////////////////////
+   //
+   //                         BOOST_COPYABLE_AND_MOVABLE
+   //
+   //////////////////////////////////////////////////////////////////////////////
+
+   #define BOOST_COPYABLE_AND_MOVABLE(TYPE)\
+      public:\
+      TYPE& operator=(TYPE &t)\
+      {  this->operator=(static_cast<const ::boost::rv<TYPE> &>(const_cast<const TYPE &>(t))); return *this;}\
+      public:\
+      operator ::boost::rv<TYPE>&() \
+      {  return *static_cast< ::boost::rv<TYPE>* >(this);  }\
+      operator const ::boost::rv<TYPE>&() const \
+      {  return *static_cast<const ::boost::rv<TYPE>* >(this);  }\
+      private:\
+   //
+
+   #define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\
+      public:\
+      operator ::boost::rv<TYPE>&() \
+      {  return *static_cast< ::boost::rv<TYPE>* >(this);  }\
+      operator const ::boost::rv<TYPE>&() const \
+      {  return *static_cast<const ::boost::rv<TYPE>* >(this);  }\
+      private:\
+   //
+
+   }  //namespace boost
+
+#else    //BOOST_NO_RVALUE_REFERENCES
+
+   namespace boost{
+
+   //! By default this traits returns false. Classes with non-throwing move constructor
+   //! and assignment should specialize this trait to obtain some performance improvements.
+   template <class T>
+   struct has_nothrow_move
+      : public BOOST_MOVE_MPL_NS::integral_constant<bool, false>
+   {};
+
+   }  //      namespace boost{
+
+   #if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
+      #include <utility>
+
+      namespace boost{
+
+      using ::std::move;
+      using ::std::forward;
+      using ::std::move_backward;
+
+      }  //namespace boost
+
+   #else //!BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE
+
+      #include <boost/type_traits/remove_reference.hpp>
+
+      namespace boost {
+
+      //////////////////////////////////////////////////////////////////////////////
+      //
+      //                                  move
+      //
+      //////////////////////////////////////////////////////////////////////////////
+
+      #if defined(BOOST_MOVE_DOXYGEN_INVOKED)
+         //! This function provides a way to convert a reference into a rvalue reference
+         //! in compilers with rvalue references. For other compilers converts T & into
+         //! <i>::boost::rv<T> &</i> so that move emulation is activated.
+         template <class T>
+         rvalue_reference move (input_reference);
+
+      #elif defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES)
+
+         //Old move approach, lvalues could bind to rvalue references
+         template <class T>
+         inline typename remove_reference<T>::type && move(T&& t)
+         {  return t;   }
+
+      #else //Old move
+
+         template <class T>
+         inline typename remove_reference<T>::type && move(T&& t)
+         { return static_cast<typename remove_reference<T>::type &&>(t); }
+
+      #endif   //Old move
+
+      //////////////////////////////////////////////////////////////////////////////
+      //
+      //                                  forward
+      //
+      //////////////////////////////////////////////////////////////////////////////
+
+
+      #if defined(BOOST_MOVE_DOXYGEN_INVOKED)
+         //! This function provides limited form of forwarding that is usually enough for
+         //! in-place construction and avoids the exponential overloading necessary for
+         //! perfect forwarding in C++03.
+         //!
+         //! For compilers with rvalue references this function provides perfect forwarding.
+         //!
+         //! Otherwise:
+         //! * If input_reference binds to const ::boost::rv<T> & then it output_reference is
+         //!   ::boost::rev<T> &
+         //!
+         //! * Else, input_reference is equal to output_reference is equal to input_reference.
+         template <class T> output_reference forward(input_reference);
+      #elif defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES)
+
+         //Old move approach, lvalues could bind to rvalue references
+
+         template <class T>
+         inline T&& forward (typename BOOST_MOVE_MPL_NS::identity<T>::type&& t)
+         {  return t;   }
+
+      #else //Old move
+
+         //Implementation #5 from N2951, thanks to Howard Hinnant
+
+         template <class T, class U>
+         inline T&& forward(U&& t
+             , typename BOOST_MOVE_BOOST_NS::enable_if_c<
+               move_detail::is_lvalue_reference<T>::value ? move_detail::is_lvalue_reference<U>::value : true>::type * = 0/*
+             , typename BOOST_MOVE_BOOST_NS::enable_if_c<
+               move_detail::is_convertible
+                  <typename remove_reference<U>::type*, typename remove_reference<T>::type*>::value>::type * = 0*/)
+         { return static_cast<T&&>(t);   }
+
+      #endif   //BOOST_MOVE_DOXYGEN_INVOKED
+
+      }  //namespace boost {
+
+   #endif   //#if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
+
+   //! This macro marks a type as movable but not copyable, disabling copy construction
+   //! and assignment. The user will need to write a move constructor/assignment as explained
+   //! in the documentation to fully write a movable but not copyable class.
+   #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\
+      public:\
+      typedef int boost_move_emulation_t;\
+      private:\
+      TYPE(const TYPE &);\
+      TYPE& operator=(const TYPE &);\
+   //
+
+   //! This macro marks a type as copyable and movable.
+   //! The user will need to write a move constructor/assignment and a copy assignment
+   //! as explained in the documentation to fully write a copyable and movable class.
+   #define BOOST_COPYABLE_AND_MOVABLE(TYPE)\
+   //
+
+   #define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\
+   //
+
+   //!This macro is used to achieve portable syntax in move
+   //!constructors and assignments for classes marked as
+   //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE
+   #define BOOST_RV_REF(TYPE)\
+      TYPE && \
+   //
+
+   //!This macro is used to achieve portable syntax in move
+   //!constructors and assignments for template classes marked as
+   //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE.
+   //!As macros have problem with comma-separatd template arguments,
+   //!the template argument must be preceded with BOOST_RV_REF_START
+   //!and ended with BOOST_RV_REF_END
+   #define BOOST_RV_REF_BEG\
+         \
+   //
+
+   //!This macro is used to achieve portable syntax in move
+   //!constructors and assignments for template classes marked as
+   //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE.
+   //!As macros have problem with comma-separatd template arguments,
+   //!the template argument must be preceded with BOOST_RV_REF_START
+   //!and ended with BOOST_RV_REF_END
+   #define BOOST_RV_REF_END\
+      && \
+
+   //!This macro is used to achieve portable syntax in copy
+   //!assignment for classes marked as BOOST_COPYABLE_AND_MOVABLE.
+   #define BOOST_COPY_ASSIGN_REF(TYPE)\
+      const TYPE & \
+   //
+
+   //! This macro is used to implement portable perfect forwarding
+   //! as explained in the documentation.
+   #define BOOST_FWD_REF(TYPE)\
+      TYPE && \
+   //
+
+
+   #if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   /// @cond
+
+   #define BOOST_RV_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\
+      TYPE<ARG1, ARG2> && \
+   //
+
+   #define BOOST_RV_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\
+      TYPE<ARG1, ARG2, ARG3> && \
+   //
+
+   #define BOOST_COPY_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\
+      const TYPE<ARG1, ARG2> & \
+   //
+
+   #define BOOST_COPY_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\
+      TYPE<ARG1, ARG2, ARG3>& \
+   //
+
+   #define BOOST_CATCH_CONST_RLVALUE(TYPE)\
+      const TYPE & \
+   //
+
+   /// @endcond
+
+   #endif   //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+
+#endif   //BOOST_NO_RVALUE_REFERENCES
+
+namespace boost {
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//                            move_iterator
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! Class template move_iterator is an iterator adaptor with the same behavior
+//! as the underlying iterator except that its dereference operator implicitly
+//! converts the value returned by the underlying iterator's dereference operator
+//! to an rvalue reference. Some generic algorithms can be called with move
+//! iterators to replace copying with moving.
+template <class It>
+class move_iterator
+{
+   public:
+   typedef It                                                              iterator_type;
+   typedef typename std::iterator_traits<iterator_type>::value_type        value_type;
+   #if !defined(BOOST_NO_RVALUE_REFERENCES) || defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   typedef value_type &&                                                   reference;
+   #else
+   typedef typename BOOST_MOVE_MPL_NS::if_
+      < ::boost::has_move_emulation_enabled<value_type>
+      , ::boost::rv<value_type>&
+      , value_type & >::type                                               reference;
+   #endif
+   typedef It                                                              pointer;
+   typedef typename std::iterator_traits<iterator_type>::difference_type   difference_type;
+   typedef typename std::iterator_traits<iterator_type>::iterator_category iterator_category;
+
+   move_iterator()
+   {}
+
+   explicit move_iterator(It i)
+      :  m_it(i)
+   {}
+
+   template <class U>
+   move_iterator(const move_iterator<U>& u)
+      :  m_it(u.base())
+   {}
+
+   iterator_type base() const
+   {  return m_it;   }
+
+   reference operator*() const
+   {
+      #if defined(BOOST_NO_RVALUE_REFERENCES) || defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES)
+      return *m_it;
+      #else
+      return ::boost::move(*m_it);
+      #endif
+   }
+
+   pointer   operator->() const
+   {  return m_it;   }
+
+   move_iterator& operator++()
+   {  ++m_it; return *this;   }
+
+   move_iterator<iterator_type>  operator++(int)
+   {  move_iterator<iterator_type> tmp(*this); ++(*this); return tmp;   }
+
+   move_iterator& operator--()
+   {  --m_it; return *this;   }
+
+   move_iterator<iterator_type>  operator--(int)
+   {  move_iterator<iterator_type> tmp(*this); --(*this); return tmp;   }
+
+   move_iterator<iterator_type>  operator+ (difference_type n) const
+   {  return move_iterator<iterator_type>(m_it + n);  }
+
+   move_iterator& operator+=(difference_type n)
+   {  m_it += n; return *this;   }
+
+   move_iterator<iterator_type>  operator- (difference_type n) const
+   {  return move_iterator<iterator_type>(m_it - n);  }
+
+   move_iterator& operator-=(difference_type n)
+   {  m_it -= n; return *this;   }
+
+   reference operator[](difference_type n) const
+   {
+      #if defined(BOOST_NO_RVALUE_REFERENCES) || defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES)
+      return m_it[n];
+      #else
+      return ::boost::move(m_it[n]);
+      #endif
+   }
+
+   friend bool operator==(const move_iterator& x, const move_iterator& y)
+   {  return x.base() == y.base();  }
+
+   friend bool operator!=(const move_iterator& x, const move_iterator& y)
+   {  return x.base() != y.base();  }
+
+   friend bool operator< (const move_iterator& x, const move_iterator& y)
+   {  return x.base() < y.base();   }
+
+   friend bool operator<=(const move_iterator& x, const move_iterator& y)
+   {  return x.base() <= y.base();  }
+
+   friend bool operator> (const move_iterator& x, const move_iterator& y)
+   {  return x.base() > y.base();  }
+
+   friend bool operator>=(const move_iterator& x, const move_iterator& y)
+   {  return x.base() >= y.base();  }
+
+   friend difference_type operator-(const move_iterator& x, const move_iterator& y)
+   {  return x.base() - y.base();   }
+
+   friend move_iterator operator+(difference_type n, const move_iterator& x)
+   {  return move_iterator(x.base() + n);   }
+
+   private:
+   It m_it;
+};
+
+
+//is_move_iterator
+namespace move_detail {
+
+template <class I>
+struct is_move_iterator
+   : public BOOST_MOVE_BOOST_NS::integral_constant<bool, false>
+{
+};
+
+template <class I>
+struct is_move_iterator< ::boost::move_iterator<I> >
+   : public BOOST_MOVE_BOOST_NS::integral_constant<bool, true>
+{
+};
+
+}  //namespace move_detail {
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//                            move_iterator
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//!
+//! <b>Returns</b>: move_iterator<It>(i).
+template<class It>
+inline move_iterator<It> make_move_iterator(const It &it)
+{  return move_iterator<It>(it); }
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//                         back_move_insert_iterator
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//! A move insert iterator that move constructs elements at the
+//! back of a container
+template <typename C> // C models Container
+class back_move_insert_iterator
+   : public std::iterator<std::output_iterator_tag, void, void, void, void>
+{
+   C* container_m;
+
+   public:
+   typedef C                        container_type;
+   typedef typename C::value_type   value_type;
+   typedef typename C::reference    reference;
+
+   explicit back_move_insert_iterator(C& x) : container_m(&x) { }
+
+   back_move_insert_iterator& operator=(reference x)
+   { container_m->push_back(boost::move(x)); return *this; }
+
+   back_move_insert_iterator& operator=(BOOST_RV_REF(value_type) x)
+   {  reference rx = x; return this->operator=(rx);  }
+
+   back_move_insert_iterator& operator*()     { return *this; }
+   back_move_insert_iterator& operator++()    { return *this; }
+   back_move_insert_iterator& operator++(int) { return *this; }
+};
+
+//!
+//! <b>Returns</b>: back_move_insert_iterator<C>(x).
+template <typename C> // C models Container
+inline back_move_insert_iterator<C> back_move_inserter(C& x)
+{
+   return back_move_insert_iterator<C>(x);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//                         front_move_insert_iterator
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! A move insert iterator that move constructs elements int the
+//! front of a container
+template <typename C> // C models Container
+class front_move_insert_iterator
+   : public std::iterator<std::output_iterator_tag, void, void, void, void>
+{
+   C* container_m;
+
+public:
+   typedef C                        container_type;
+   typedef typename C::value_type   value_type;
+   typedef typename C::reference    reference;
+
+   explicit front_move_insert_iterator(C& x) : container_m(&x) { }
+
+   front_move_insert_iterator& operator=(reference x)
+   { container_m->push_front(boost::move(x)); return *this; }
+
+   front_move_insert_iterator& operator=(BOOST_RV_REF(value_type) x)
+   {  reference rx = x; return this->operator=(rx);  }
+
+   front_move_insert_iterator& operator*()     { return *this; }
+   front_move_insert_iterator& operator++()    { return *this; }
+   front_move_insert_iterator& operator++(int) { return *this; }
+};
+
+//!
+//! <b>Returns</b>: front_move_insert_iterator<C>(x).
+template <typename C> // C models Container
+inline front_move_insert_iterator<C> front_move_inserter(C& x)
+{
+   return front_move_insert_iterator<C>(x);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//                         insert_move_iterator
+//
+//////////////////////////////////////////////////////////////////////////////
+template <typename C> // C models Container
+class move_insert_iterator
+   : public std::iterator<std::output_iterator_tag, void, void, void, void>
+{
+   C* container_m;
+   typename C::iterator pos_;
+
+   public:
+   typedef C                        container_type;
+   typedef typename C::value_type   value_type;
+   typedef typename C::reference    reference;
+
+   explicit move_insert_iterator(C& x, typename C::iterator pos)
+      : container_m(&x), pos_(pos)
+   {}
+
+   move_insert_iterator& operator=(reference x)
+   {
+      pos_ = container_m->insert(pos_, ::boost::move(x));
+      ++pos_;
+      return *this;
+   }
+
+   move_insert_iterator& operator=(BOOST_RV_REF(value_type) x)
+   {  reference rx = x; return this->operator=(rx);  }
+
+   move_insert_iterator& operator*()     { return *this; }
+   move_insert_iterator& operator++()    { return *this; }
+   move_insert_iterator& operator++(int) { return *this; }
+};
+
+//!
+//! <b>Returns</b>: move_insert_iterator<C>(x, it).
+template <typename C> // C models Container
+inline move_insert_iterator<C> move_inserter(C& x, typename C::iterator it)
+{
+   return move_insert_iterator<C>(x, it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//                               move
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#if !defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
+
+   //! <b>Effects</b>: Moves elements in the range [first,last) into the range [result,result + (last -
+   //!   first)) starting from first and proceeding to last. For each non-negative integer n < (last-first),
+   //!   performs *(result + n) = ::boost::move (*(first + n)).
+   //!
+   //! <b>Effects</b>: result + (last - first).
+   //!
+   //! <b>Requires</b>: result shall not be in the range [first,last).
+   //!
+   //! <b>Complexity</b>: Exactly last - first move assignments.
+   template <typename I, // I models InputIterator
+            typename O> // O models OutputIterator
+   O move(I f, I l, O result)
+   {
+      while (f != l) {
+         *result = ::boost::move(*f);
+         ++f; ++result;
+      }
+      return result;
+   }
+
+   //////////////////////////////////////////////////////////////////////////////
+   //
+   //                               move_backward
+   //
+   //////////////////////////////////////////////////////////////////////////////
+
+   //! <b>Effects</b>: Moves elements in the range [first,last) into the range
+   //!   [result - (last-first),result) starting from last - 1 and proceeding to
+   //!   first. For each positive integer n <= (last - first),
+   //!   performs *(result - n) = ::boost::move(*(last - n)).
+   //!
+   //! <b>Requires</b>: result shall not be in the range [first,last).
+   //!
+   //! <b>Returns</b>: result - (last - first).
+   //!
+   //! <b>Complexity</b>: Exactly last - first assignments.
+   template <typename I, // I models BidirectionalIterator
+   typename O> // O models BidirectionalIterator
+   O move_backward(I f, I l, O result)
+   {
+      while (f != l) {
+         --l; --result;
+         *result = ::boost::move(*l);
+      }
+      return result;
+   }
+
+#endif   //!defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//                               uninitialized_move
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! <b>Effects</b>:
+//!   \code
+//!   for (; first != last; ++result, ++first)
+//!      new (static_cast<void*>(&*result))
+//!         typename iterator_traits<ForwardIterator>::value_type(boost::move(*first));
+//!   \endcode
+//!
+//! <b>Returns</b>: result
+template
+   <typename I, // I models InputIterator
+    typename F> // F models ForwardIterator
+F uninitialized_move(I f, I l, F r
+   /// @cond
+//   ,typename BOOST_MOVE_BOOST_NS::enable_if<has_move_emulation_enabled<typename std::iterator_traits<I>::value_type> >::type* = 0
+   /// @endcond
+   )
+{
+   typedef typename std::iterator_traits<I>::value_type input_value_type;
+   while (f != l) {
+      ::new(static_cast<void*>(&*r)) input_value_type(boost::move(*f));
+      ++f; ++r;
+   }
+   return r;
+}
+
+/// @cond
+/*
+template
+   <typename I,   // I models InputIterator
+    typename F>   // F models ForwardIterator
+F uninitialized_move(I f, I l, F r,
+   typename BOOST_MOVE_BOOST_NS::disable_if<has_move_emulation_enabled<typename std::iterator_traits<I>::value_type> >::type* = 0)
+{
+   return std::uninitialized_copy(f, l, r);
+}
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//                            uninitialized_copy_or_move
+//
+//////////////////////////////////////////////////////////////////////////////
+
+namespace move_detail {
+
+template
+<typename I,   // I models InputIterator
+typename F>   // F models ForwardIterator
+inline F uninitialized_move_move_iterator(I f, I l, F r
+//                             ,typename BOOST_MOVE_BOOST_NS::enable_if< has_move_emulation_enabled<typename I::value_type> >::type* = 0
+)
+{
+   return ::boost::uninitialized_move(f, l, r);
+}
+/*
+template
+<typename I,   // I models InputIterator
+typename F>   // F models ForwardIterator
+F uninitialized_move_move_iterator(I f, I l, F r,
+                                   typename BOOST_MOVE_BOOST_NS::disable_if< has_move_emulation_enabled<typename I::value_type> >::type* = 0)
+{
+   return std::uninitialized_copy(f.base(), l.base(), r);
+}
+*/
+}  //namespace move_detail {
+
+template
+<typename I,   // I models InputIterator
+typename F>   // F models ForwardIterator
+inline F uninitialized_copy_or_move(I f, I l, F r,
+                             typename BOOST_MOVE_BOOST_NS::enable_if< move_detail::is_move_iterator<I> >::type* = 0)
+{
+   return ::boost::move_detail::uninitialized_move_move_iterator(f, l, r);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//                            copy_or_move
+//
+//////////////////////////////////////////////////////////////////////////////
+
+namespace move_detail {
+
+template
+<typename I,   // I models InputIterator
+typename F>   // F models ForwardIterator
+inline F move_move_iterator(I f, I l, F r
+//                             ,typename BOOST_MOVE_BOOST_NS::enable_if< has_move_emulation_enabled<typename I::value_type> >::type* = 0
+)
+{
+   return ::boost::move(f, l, r);
+}
+/*
+template
+<typename I,   // I models InputIterator
+typename F>   // F models ForwardIterator
+F move_move_iterator(I f, I l, F r,
+                                   typename BOOST_MOVE_BOOST_NS::disable_if< has_move_emulation_enabled<typename I::value_type> >::type* = 0)
+{
+   return std::copy(f.base(), l.base(), r);
+}
+*/
+
+}  //namespace move_detail {
+
+template
+<typename I,   // I models InputIterator
+typename F>   // F models ForwardIterator
+inline F copy_or_move(I f, I l, F r,
+                             typename BOOST_MOVE_BOOST_NS::enable_if< move_detail::is_move_iterator<I> >::type* = 0)
+{
+   return ::boost::move_detail::move_move_iterator(f, l, r);
+}
+
+/// @endcond
+
+//! <b>Effects</b>:
+//!   \code
+//!   for (; first != last; ++result, ++first)
+//!      new (static_cast<void*>(&*result))
+//!         typename iterator_traits<ForwardIterator>::value_type(*first);
+//!   \endcode
+//!
+//! <b>Returns</b>: result
+//!
+//! <b>Note</b>: This function is provided because
+//!   <i>std::uninitialized_copy</i> from some STL implementations
+//!    is not compatible with <i>move_iterator</i>
+template
+<typename I,   // I models InputIterator
+typename F>   // F models ForwardIterator
+inline F uninitialized_copy_or_move(I f, I l, F r
+   /// @cond
+   ,typename BOOST_MOVE_BOOST_NS::disable_if< move_detail::is_move_iterator<I> >::type* = 0
+   /// @endcond
+   )
+{
+   return std::uninitialized_copy(f, l, r);
+}
+
+//! <b>Effects</b>:
+//!   \code
+//!   for (; first != last; ++result, ++first)
+//!      *result = *first;
+//!   \endcode
+//!
+//! <b>Returns</b>: result
+//!
+//! <b>Note</b>: This function is provided because
+//!   <i>std::uninitialized_copy</i> from some STL implementations
+//!    is not compatible with <i>move_iterator</i>
+template
+<typename I,   // I models InputIterator
+typename F>   // F models ForwardIterator
+inline F copy_or_move(I f, I l, F r
+   /// @cond
+   ,typename BOOST_MOVE_BOOST_NS::disable_if< move_detail::is_move_iterator<I> >::type* = 0
+   /// @endcond
+   )
+{
+   return std::copy(f, l, r);
+}
+
+//! If this trait yields to true
+//! (<i>has_trivial_destructor_after_move <T>::value == true</i>)
+//! means that if T is used as argument of a move construction/assignment,
+//! there is no need to call T's destructor.
+//! This optimization tipically is used to improve containers' performance.
+//!
+//! By default this trait is true if the type has trivial destructor,
+//! every class should specialize this trait if it wants to improve performance
+//! when inserted in containers.
+template <class T>
+struct has_trivial_destructor_after_move
+   : BOOST_MOVE_BOOST_NS::has_trivial_destructor<T>
+{};
+
+
+
+namespace move_detail {
+
+// Code from Jeffrey Lee Hellrung, many thanks
+
+#ifndef BOOST_NO_RVALUE_REFERENCES
+   template< class T> struct forward_type { typedef T type; };
+#else // #ifndef BOOST_NO_RVALUE_REFERENCES
+   template< class T>
+   struct forward_type
+   { typedef const T &type; };
+
+   template< class T>
+   struct forward_type< boost::rv<T> >
+   { typedef T type; };
+#endif // #ifndef BOOST_NO_RVALUE_REFERENCES
+
+
+
+// Code from Jeffrey Lee Hellrung, many thanks
+
+template< class T > struct is_rvalue_reference : BOOST_MOVE_BOOST_NS::integral_constant<bool, false> { };
+#ifndef BOOST_NO_RVALUE_REFERENCES
+   template< class T > struct is_rvalue_reference< T&& > : BOOST_MOVE_BOOST_NS::integral_constant<bool, true> { };
+#else // #ifndef BOOST_NO_RVALUE_REFERENCES
+   template< class T > struct is_rvalue_reference< boost::rv<T>& >
+      :  BOOST_MOVE_BOOST_NS::integral_constant<bool, true>
+   {};
+
+   template< class T > struct is_rvalue_reference< const boost::rv<T>& >
+      : BOOST_MOVE_BOOST_NS::integral_constant<bool, true>
+   {};
+#endif // #ifndef BOOST_NO_RVALUE_REFERENCES
+
+#ifndef BOOST_NO_RVALUE_REFERENCES
+   template< class T > struct add_rvalue_reference { typedef T&& type; };
+#else // #ifndef BOOST_NO_RVALUE_REFERENCES
+   namespace detail_add_rvalue_reference
+   {
+      template< class T
+              , bool emulation = ::boost::has_move_emulation_enabled<T>::value
+              , bool rv        = ::boost::move_detail::is_rv<T>::value  >
+      struct add_rvalue_reference_impl { typedef T type; };
+
+      template< class T, bool emulation>
+      struct add_rvalue_reference_impl< T, emulation, true > { typedef T & type; };
+
+      template< class T, bool rv >
+      struct add_rvalue_reference_impl< T, true, rv > { typedef ::boost::rv<T>& type; };
+   } // namespace detail_add_rvalue_reference
+
+   template< class T >
+   struct add_rvalue_reference
+      : detail_add_rvalue_reference::add_rvalue_reference_impl<T>
+   { };
+
+   template< class T >
+   struct add_rvalue_reference<T &>
+   {  typedef T & type; };
+
+#endif // #ifndef BOOST_NO_RVALUE_REFERENCES
+
+template< class T > struct remove_rvalue_reference { typedef T type; };
+
+#ifndef BOOST_NO_RVALUE_REFERENCES
+   template< class T > struct remove_rvalue_reference< T&& >                  { typedef T type; };
+#else // #ifndef BOOST_NO_RVALUE_REFERENCES
+   template< class T > struct remove_rvalue_reference< rv<T> >                { typedef T type; };
+   template< class T > struct remove_rvalue_reference< const rv<T> >          { typedef T type; };
+   template< class T > struct remove_rvalue_reference< volatile rv<T> >       { typedef T type; };
+   template< class T > struct remove_rvalue_reference< const volatile rv<T> > { typedef T type; };
+   template< class T > struct remove_rvalue_reference< rv<T>& >               { typedef T type; };
+   template< class T > struct remove_rvalue_reference< const rv<T>& >         { typedef T type; };
+   template< class T > struct remove_rvalue_reference< volatile rv<T>& >      { typedef T type; };
+   template< class T > struct remove_rvalue_reference< const volatile rv<T>& >{ typedef T type; };
+#endif // #ifndef BOOST_NO_RVALUE_REFERENCES
+
+template <typename T>
+typename boost::move_detail::add_rvalue_reference<T>::type declval();
+
+}
+// Ideas from Boost.Move review, Jeffrey Lee Hellrung:
+//
+//- TypeTraits metafunctions is_lvalue_reference, add_lvalue_reference, and remove_lvalue_reference ?
+//  Perhaps add_reference and remove_reference can be modified so that they behave wrt emulated rvalue
+//  references the same as wrt real rvalue references, i.e., add_reference< rv<T>& > -> T& rather than
+//  rv<T>& (since T&& & -> T&).
+//
+//- Add'l TypeTraits has_[trivial_]move_{constructor,assign}...?
+//
+//- An as_lvalue(T& x) function, which amounts to an identity operation in C++0x, but strips emulated
+//  rvalue references in C++03.  This may be necessary to prevent "accidental moves".
+
+}  //namespace boost {
+
+#if defined BOOST_MSVC
+   #pragma warning (pop)
+   #ifdef BOOST_INTERPROCESS_CRT_SECURE_NO_DEPRECATE
+      #undef BOOST_INTERPROCESS_CRT_SECURE_NO_DEPRECATE
+      #undef _CRT_SECURE_NO_DEPRECATE
+   #endif
+
+   #ifdef BOOST_INTERPROCESS_SCL_SECURE_NO_WARNINGS
+      #undef BOOST_INTERPROCESS_SCL_SECURE_NO_WARNINGS
+      #undef _SCL_SECURE_NO_WARNINGS
+   #endif
+#endif
+
+#endif //#ifndef BOOST_MOVE_MOVE_HPP
diff --git a/ext/boost/mpl/._always.hpp b/ext/boost/mpl/._always.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._always.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._and.hpp b/ext/boost/mpl/._and.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._and.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._apply.hpp b/ext/boost/mpl/._apply.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._apply.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._apply_fwd.hpp b/ext/boost/mpl/._apply_fwd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._apply_fwd.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._apply_wrap.hpp b/ext/boost/mpl/._apply_wrap.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._apply_wrap.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._arg.hpp b/ext/boost/mpl/._arg.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._arg.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._arg_fwd.hpp b/ext/boost/mpl/._arg_fwd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._arg_fwd.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._assert.hpp b/ext/boost/mpl/._assert.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._assert.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._bind.hpp b/ext/boost/mpl/._bind.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._bind.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._bind_fwd.hpp b/ext/boost/mpl/._bind_fwd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._bind_fwd.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._bool.hpp b/ext/boost/mpl/._bool.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._bool.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._bool_fwd.hpp b/ext/boost/mpl/._bool_fwd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._bool_fwd.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._eval_if.hpp b/ext/boost/mpl/._eval_if.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._eval_if.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._has_xxx.hpp b/ext/boost/mpl/._has_xxx.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._has_xxx.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._identity.hpp b/ext/boost/mpl/._identity.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._identity.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._if.hpp b/ext/boost/mpl/._if.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._if.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._int.hpp b/ext/boost/mpl/._int.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._int.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._int_fwd.hpp b/ext/boost/mpl/._int_fwd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._int_fwd.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._integral_c.hpp b/ext/boost/mpl/._integral_c.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._integral_c.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._integral_c_fwd.hpp b/ext/boost/mpl/._integral_c_fwd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._integral_c_fwd.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._integral_c_tag.hpp b/ext/boost/mpl/._integral_c_tag.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._integral_c_tag.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._lambda.hpp b/ext/boost/mpl/._lambda.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._lambda.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._lambda_fwd.hpp b/ext/boost/mpl/._lambda_fwd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._lambda_fwd.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._logical.hpp b/ext/boost/mpl/._logical.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._logical.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._next.hpp b/ext/boost/mpl/._next.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._next.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._next_prior.hpp b/ext/boost/mpl/._next_prior.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._next_prior.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._not.hpp b/ext/boost/mpl/._not.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._not.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._or.hpp b/ext/boost/mpl/._or.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._or.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._placeholders.hpp b/ext/boost/mpl/._placeholders.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._placeholders.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._protect.hpp b/ext/boost/mpl/._protect.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._protect.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._quote.hpp b/ext/boost/mpl/._quote.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._quote.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._size_t.hpp b/ext/boost/mpl/._size_t.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._size_t.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._size_t_fwd.hpp b/ext/boost/mpl/._size_t_fwd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._size_t_fwd.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._void.hpp b/ext/boost/mpl/._void.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._void.hpp and /dev/null differ
diff --git a/ext/boost/mpl/._void_fwd.hpp b/ext/boost/mpl/._void_fwd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/._void_fwd.hpp and /dev/null differ
diff --git a/ext/boost/mpl/O1_size.hpp b/ext/boost/mpl/O1_size.hpp
new file mode 100644
index 0000000..8baaa79
--- /dev/null
+++ b/ext/boost/mpl/O1_size.hpp
@@ -0,0 +1,40 @@
+
+#ifndef BOOST_MPL_O1_SIZE_HPP_INCLUDED
+#define BOOST_MPL_O1_SIZE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/O1_size_fwd.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/O1_size_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+// returns sequence size if it's an O(1) operation; otherwise returns -1
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    >
+struct O1_size
+    : O1_size_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1, O1_size, (Sequence))
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, O1_size)
+
+}}
+
+#endif // BOOST_MPL_O1_SIZE_HPP_INCLUDED
diff --git a/ext/boost/mpl/O1_size_fwd.hpp b/ext/boost/mpl/O1_size_fwd.hpp
new file mode 100644
index 0000000..d975382
--- /dev/null
+++ b/ext/boost/mpl/O1_size_fwd.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
+#define BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: O1_size_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct O1_size_impl;
+template< typename Sequence > struct O1_size;
+
+}}
+
+#endif // BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/accumulate.hpp b/ext/boost/mpl/accumulate.hpp
new file mode 100644
index 0000000..23b76c8
--- /dev/null
+++ b/ext/boost/mpl/accumulate.hpp
@@ -0,0 +1,39 @@
+
+#ifndef BOOST_MPL_ACCUMULATE_HPP_INCLUDED
+#define BOOST_MPL_ACCUMULATE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright David Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: accumulate.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(State)
+    , typename BOOST_MPL_AUX_NA_PARAM(ForwardOp)
+    >
+struct accumulate
+    : fold<Sequence,State,ForwardOp>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3,accumulate,(Sequence,State,ForwardOp))
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, accumulate)
+
+}}
+
+#endif // BOOST_MPL_ACCUMULATE_HPP_INCLUDED
diff --git a/ext/boost/mpl/advance.hpp b/ext/boost/mpl/advance.hpp
new file mode 100644
index 0000000..d811a80
--- /dev/null
+++ b/ext/boost/mpl/advance.hpp
@@ -0,0 +1,76 @@
+
+#ifndef BOOST_MPL_ADVANCE_HPP_INCLUDED
+#define BOOST_MPL_ADVANCE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: advance.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/advance_fwd.hpp>
+#include <boost/mpl/less.hpp>
+#include <boost/mpl/negate.hpp>
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/tag.hpp>
+#include <boost/mpl/apply_wrap.hpp>
+#include <boost/mpl/aux_/advance_forward.hpp>
+#include <boost/mpl/aux_/advance_backward.hpp>
+#include <boost/mpl/aux_/value_wknd.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/nttp_decl.hpp>
+
+namespace boost { namespace mpl {
+
+// default implementation for forward/bidirectional iterators
+template< typename Tag >
+struct advance_impl
+{
+    template< typename Iterator, typename N > struct apply
+    {
+        typedef typename less< N,long_<0> >::type backward_;
+        typedef typename if_< backward_, negate<N>, N >::type offset_;
+
+        typedef typename if_<
+              backward_
+            , aux::advance_backward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value >
+            , aux::advance_forward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value >
+            >::type f_;
+
+        typedef typename apply_wrap1<f_,Iterator>::type type;
+    };
+};
+
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Iterator)
+    , typename BOOST_MPL_AUX_NA_PARAM(N)
+    >
+struct advance
+    : advance_impl< typename tag<Iterator>::type >
+        ::template apply<Iterator,N>
+{
+};
+
+template<
+      typename Iterator
+    , BOOST_MPL_AUX_NTTP_DECL(long, N)
+    >
+struct advance_c
+    : advance_impl< typename tag<Iterator>::type >
+        ::template apply<Iterator,long_<N> >
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, advance)
+
+}}
+
+#endif // BOOST_MPL_ADVANCE_HPP_INCLUDED
diff --git a/ext/boost/mpl/advance_fwd.hpp b/ext/boost/mpl/advance_fwd.hpp
new file mode 100644
index 0000000..08ba5fc
--- /dev/null
+++ b/ext/boost/mpl/advance_fwd.hpp
@@ -0,0 +1,28 @@
+
+#ifndef BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED
+#define BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: advance_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/common_name_wknd.hpp>
+
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_COMMON_NAME_WKND(advance)
+
+template< typename Tag > struct advance_impl;
+template< typename Iterator, typename N > struct advance;
+
+}}
+
+#endif // BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/alias.hpp b/ext/boost/mpl/alias.hpp
new file mode 100644
index 0000000..ff7b7bd
--- /dev/null
+++ b/ext/boost/mpl/alias.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_ALIAS_HPP_INCLUDED
+#define BOOST_MPL_ALIAS_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: alias.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace {
+namespace mpl = boost::mpl;
+}
+
+#endif // BOOST_MPL_ALIAS_HPP_INCLUDED
diff --git a/ext/boost/mpl/always.hpp b/ext/boost/mpl/always.hpp
index f984231..5094b3e 100644
--- a/ext/boost/mpl/always.hpp
+++ b/ext/boost/mpl/always.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: always.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>
diff --git a/ext/boost/mpl/and.hpp b/ext/boost/mpl/and.hpp
index 1b3ede2..da257c8 100644
--- a/ext/boost/mpl/and.hpp
+++ b/ext/boost/mpl/and.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: and.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/use_preprocessed.hpp>
diff --git a/ext/boost/mpl/apply.hpp b/ext/boost/mpl/apply.hpp
index 944619e..b0455bc 100644
--- a/ext/boost/mpl/apply.hpp
+++ b/ext/boost/mpl/apply.hpp
@@ -15,7 +15,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
diff --git a/ext/boost/mpl/apply_fwd.hpp b/ext/boost/mpl/apply_fwd.hpp
index a78ae8b..8cbdfaf 100644
--- a/ext/boost/mpl/apply_fwd.hpp
+++ b/ext/boost/mpl/apply_fwd.hpp
@@ -15,7 +15,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: apply_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
diff --git a/ext/boost/mpl/apply_wrap.hpp b/ext/boost/mpl/apply_wrap.hpp
index b3cb12b..5c5c6df 100644
--- a/ext/boost/mpl/apply_wrap.hpp
+++ b/ext/boost/mpl/apply_wrap.hpp
@@ -15,7 +15,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: apply_wrap.hpp 49272 2008-10-11 06:50:46Z agurtovoy $
-// $Date: 2008-10-11 02:50:46 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:50:46 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49272 $
 
 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
diff --git a/ext/boost/mpl/arg.hpp b/ext/boost/mpl/arg.hpp
index c1c7072..c323a1a 100644
--- a/ext/boost/mpl/arg.hpp
+++ b/ext/boost/mpl/arg.hpp
@@ -16,7 +16,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: arg.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
diff --git a/ext/boost/mpl/arg_fwd.hpp b/ext/boost/mpl/arg_fwd.hpp
index c96b48f..f79e056 100644
--- a/ext/boost/mpl/arg_fwd.hpp
+++ b/ext/boost/mpl/arg_fwd.hpp
@@ -12,7 +12,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: arg_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/adl_barrier.hpp>
diff --git a/ext/boost/mpl/arithmetic.hpp b/ext/boost/mpl/arithmetic.hpp
new file mode 100644
index 0000000..0384042
--- /dev/null
+++ b/ext/boost/mpl/arithmetic.hpp
@@ -0,0 +1,25 @@
+
+#ifndef BOOST_MPL_ARITHMETIC_HPP_INCLUDED
+#define BOOST_MPL_ARITHMETIC_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: arithmetic.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/times.hpp>
+#include <boost/mpl/divides.hpp>
+#include <boost/mpl/modulus.hpp>
+#include <boost/mpl/negate.hpp>
+#include <boost/mpl/multiplies.hpp> // deprecated
+
+#endif // BOOST_MPL_ARITHMETIC_HPP_INCLUDED
diff --git a/ext/boost/mpl/as_sequence.hpp b/ext/boost/mpl/as_sequence.hpp
new file mode 100644
index 0000000..9fb5af3
--- /dev/null
+++ b/ext/boost/mpl/as_sequence.hpp
@@ -0,0 +1,38 @@
+
+#ifndef BOOST_MPL_AS_SEQUENCE_HPP_INCLUDED
+#define BOOST_MPL_AS_SEQUENCE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: as_sequence.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/mpl/single_view.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct as_sequence
+    : if_< is_sequence<T>, T, single_view<T> >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,as_sequence,(T))
+};
+
+BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, as_sequence)
+
+}}
+
+#endif // BOOST_MPL_AS_SEQUENCE_HPP_INCLUDED
diff --git a/ext/boost/mpl/assert.hpp b/ext/boost/mpl/assert.hpp
index 33b82f3..acc3954 100644
--- a/ext/boost/mpl/assert.hpp
+++ b/ext/boost/mpl/assert.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: assert.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/not.hpp>
diff --git a/ext/boost/mpl/at.hpp b/ext/boost/mpl/at.hpp
new file mode 100644
index 0000000..d247d71
--- /dev/null
+++ b/ext/boost/mpl/at.hpp
@@ -0,0 +1,52 @@
+
+#ifndef BOOST_MPL_AT_HPP_INCLUDED
+#define BOOST_MPL_AT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: at.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/at_fwd.hpp>
+#include <boost/mpl/aux_/at_impl.hpp>
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/nttp_decl.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(N)
+    >
+struct at
+    : at_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence,N >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,at,(Sequence,N))
+};
+
+template<
+      typename Sequence
+    , BOOST_MPL_AUX_NTTP_DECL(long, N)
+    >
+struct at_c
+    : at_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence,mpl::long_<N> >
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, at)
+
+}}
+
+#endif // BOOST_MPL_AT_HPP_INCLUDED
diff --git a/ext/boost/mpl/at_fwd.hpp b/ext/boost/mpl/at_fwd.hpp
new file mode 100644
index 0000000..a4825f0
--- /dev/null
+++ b/ext/boost/mpl/at_fwd.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_AT_FWD_HPP_INCLUDED
+#define BOOST_MPL_AT_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: at_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct at_impl;
+template< typename Sequence, typename N > struct at;
+
+}}
+
+#endif // BOOST_MPL_AT_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/._adl_barrier.hpp b/ext/boost/mpl/aux_/._adl_barrier.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._adl_barrier.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._arg_typedef.hpp b/ext/boost/mpl/aux_/._arg_typedef.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._arg_typedef.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._arity.hpp b/ext/boost/mpl/aux_/._arity.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._arity.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._arity_spec.hpp b/ext/boost/mpl/aux_/._arity_spec.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._arity_spec.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._common_name_wknd.hpp b/ext/boost/mpl/aux_/._common_name_wknd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._common_name_wknd.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._full_lambda.hpp b/ext/boost/mpl/aux_/._full_lambda.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._full_lambda.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._has_apply.hpp b/ext/boost/mpl/aux_/._has_apply.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._has_apply.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._has_type.hpp b/ext/boost/mpl/aux_/._has_type.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._has_type.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._include_preprocessed.hpp b/ext/boost/mpl/aux_/._include_preprocessed.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._include_preprocessed.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._integral_wrapper.hpp b/ext/boost/mpl/aux_/._integral_wrapper.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._integral_wrapper.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._lambda_arity_param.hpp b/ext/boost/mpl/aux_/._lambda_arity_param.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._lambda_arity_param.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._lambda_support.hpp b/ext/boost/mpl/aux_/._lambda_support.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._lambda_support.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._msvc_never_true.hpp b/ext/boost/mpl/aux_/._msvc_never_true.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._msvc_never_true.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._na.hpp b/ext/boost/mpl/aux_/._na.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._na.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._na_assert.hpp b/ext/boost/mpl/aux_/._na_assert.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._na_assert.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._na_fwd.hpp b/ext/boost/mpl/aux_/._na_fwd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._na_fwd.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._na_spec.hpp b/ext/boost/mpl/aux_/._na_spec.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._na_spec.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._nested_type_wknd.hpp b/ext/boost/mpl/aux_/._nested_type_wknd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._nested_type_wknd.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._nttp_decl.hpp b/ext/boost/mpl/aux_/._nttp_decl.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._nttp_decl.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._static_cast.hpp b/ext/boost/mpl/aux_/._static_cast.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._static_cast.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._template_arity.hpp b/ext/boost/mpl/aux_/._template_arity.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._template_arity.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._template_arity_fwd.hpp b/ext/boost/mpl/aux_/._template_arity_fwd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._template_arity_fwd.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._type_wrapper.hpp b/ext/boost/mpl/aux_/._type_wrapper.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._type_wrapper.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._value_wknd.hpp b/ext/boost/mpl/aux_/._value_wknd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._value_wknd.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/._yes_no.hpp b/ext/boost/mpl/aux_/._yes_no.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/._yes_no.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/O1_size_impl.hpp b/ext/boost/mpl/aux_/O1_size_impl.hpp
new file mode 100644
index 0000000..614730d
--- /dev/null
+++ b/ext/boost/mpl/aux_/O1_size_impl.hpp
@@ -0,0 +1,87 @@
+
+#ifndef BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED
+#define BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: O1_size_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/O1_size_fwd.hpp>
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/aux_/has_size.hpp>
+#include <boost/mpl/aux_/config/forwarding.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+#include <boost/mpl/aux_/config/msvc.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+namespace boost { namespace mpl {
+
+// default implementation - returns 'Sequence::size' if sequence has a 'size'
+// member, and -1 otherwise; conrete sequences might override it by 
+// specializing either the 'O1_size_impl' or the primary 'O1_size' template
+
+#   if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) \
+    && !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
+
+namespace aux {
+template< typename Sequence > struct O1_size_impl
+    : Sequence::size
+{
+};
+}
+
+template< typename Tag >
+struct O1_size_impl
+{
+    template< typename Sequence > struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
+        : if_<
+              aux::has_size<Sequence>
+            , aux::O1_size_impl<Sequence>
+            , long_<-1>
+            >::type
+    {
+#else
+    {
+        typedef typename if_<
+              aux::has_size<Sequence>
+            , aux::O1_size_impl<Sequence>
+            , long_<-1>
+            >::type type;
+
+        BOOST_STATIC_CONSTANT(long, value =
+              (if_<
+                  aux::has_size<Sequence>
+                , aux::O1_size_impl<Sequence>
+                , long_<-1>
+                >::type::value)
+            );
+#endif
+    };
+};
+
+#   else // BOOST_MSVC
+
+template< typename Tag >
+struct O1_size_impl
+{
+    template< typename Sequence > struct apply
+        : long_<-1>
+        {
+        };
+};
+
+#   endif
+
+}}
+
+#endif // BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/adl_barrier.hpp b/ext/boost/mpl/aux_/adl_barrier.hpp
index 7d9eaea..077f46f 100644
--- a/ext/boost/mpl/aux_/adl_barrier.hpp
+++ b/ext/boost/mpl/aux_/adl_barrier.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: adl_barrier.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/adl.hpp>
diff --git a/ext/boost/mpl/aux_/advance_backward.hpp b/ext/boost/mpl/aux_/advance_backward.hpp
new file mode 100644
index 0000000..d44c59f
--- /dev/null
+++ b/ext/boost/mpl/aux_/advance_backward.hpp
@@ -0,0 +1,128 @@
+
+#if !defined(BOOST_PP_IS_ITERATING)
+
+///// header body
+
+#ifndef BOOST_MPL_AUX778076_ADVANCE_BACKWARD_HPP_INCLUDED
+#define BOOST_MPL_AUX778076_ADVANCE_BACKWARD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: advance_backward.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/prior.hpp>
+#   include <boost/mpl/apply_wrap.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if    !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER advance_backward.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/limits/unrolling.hpp>
+#   include <boost/mpl/aux_/nttp_decl.hpp>
+#   include <boost/mpl/aux_/config/eti.hpp>
+
+#   include <boost/preprocessor/iterate.hpp>
+#   include <boost/preprocessor/cat.hpp>
+#   include <boost/preprocessor/inc.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+// forward declaration
+template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_backward;
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/advance_backward.hpp>))
+#   include BOOST_PP_ITERATE()
+
+// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING
+template< BOOST_MPL_AUX_NTTP_DECL(long, N) >
+struct advance_backward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_backward<BOOST_MPL_LIMIT_UNROLLING>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_backward<(
+                (N - BOOST_MPL_LIMIT_UNROLLING) < 0
+                    ? 0
+                    : N - BOOST_MPL_LIMIT_UNROLLING
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_AUX778076_ADVANCE_BACKWARD_HPP_INCLUDED
+
+///// iteration, depth == 1
+
+// For gcc 4.4 compatability, we must include the
+// BOOST_PP_ITERATION_DEPTH test inside an #else clause.
+#else // BOOST_PP_IS_ITERATING
+#if BOOST_PP_ITERATION_DEPTH() == 1
+#define i_ BOOST_PP_FRAME_ITERATION(1)
+
+template<>
+struct advance_backward< BOOST_PP_FRAME_ITERATION(1) >
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+
+#if i_ > 0
+#   define BOOST_PP_ITERATION_PARAMS_2 \
+    (3,(1, BOOST_PP_FRAME_ITERATION(1), <boost/mpl/aux_/advance_backward.hpp>))
+#   include BOOST_PP_ITERATE()
+#endif
+
+        typedef BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(1)) type;
+    };
+
+#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
+    /// ETI workaround
+    template<> struct apply<int>
+    {
+        typedef int type;
+    };
+#endif
+};
+
+#undef i_
+
+///// iteration, depth == 2
+
+#elif BOOST_PP_ITERATION_DEPTH() == 2
+
+#   define AUX778076_ITER_0 BOOST_PP_CAT(iter,BOOST_PP_DEC(BOOST_PP_FRAME_ITERATION(2)))
+#   define AUX778076_ITER_1 BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(2))
+
+        typedef typename prior<AUX778076_ITER_0>::type AUX778076_ITER_1;
+        
+#   undef AUX778076_ITER_1
+#   undef AUX778076_ITER_0
+
+#endif // BOOST_PP_ITERATION_DEPTH()
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ext/boost/mpl/aux_/advance_forward.hpp b/ext/boost/mpl/aux_/advance_forward.hpp
new file mode 100644
index 0000000..4edd3ea
--- /dev/null
+++ b/ext/boost/mpl/aux_/advance_forward.hpp
@@ -0,0 +1,127 @@
+
+#if !defined(BOOST_PP_IS_ITERATING)
+
+///// header body
+
+#ifndef BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED
+#define BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: advance_forward.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/next.hpp>
+#   include <boost/mpl/apply_wrap.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if    !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER advance_forward.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/limits/unrolling.hpp>
+#   include <boost/mpl/aux_/nttp_decl.hpp>
+#   include <boost/mpl/aux_/config/eti.hpp>
+
+#   include <boost/preprocessor/iterate.hpp>
+#   include <boost/preprocessor/cat.hpp>
+#   include <boost/preprocessor/inc.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+// forward declaration
+template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_forward;
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/advance_forward.hpp>))
+#   include BOOST_PP_ITERATE()
+
+// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING
+template< BOOST_MPL_AUX_NTTP_DECL(long, N) > 
+struct advance_forward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_forward<BOOST_MPL_LIMIT_UNROLLING>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_forward<(
+                (N - BOOST_MPL_LIMIT_UNROLLING) < 0
+                    ? 0
+                    : N - BOOST_MPL_LIMIT_UNROLLING
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED
+
+///// iteration, depth == 1
+
+// For gcc 4.4 compatability, we must include the
+// BOOST_PP_ITERATION_DEPTH test inside an #else clause.
+#else // BOOST_PP_IS_ITERATING
+#if BOOST_PP_ITERATION_DEPTH() == 1
+#define i_ BOOST_PP_FRAME_ITERATION(1)
+
+template<>
+struct advance_forward< BOOST_PP_FRAME_ITERATION(1) >
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+
+#if i_ > 0
+#   define BOOST_PP_ITERATION_PARAMS_2 \
+    (3,(1, i_, <boost/mpl/aux_/advance_forward.hpp>))
+#   include BOOST_PP_ITERATE()
+#endif
+        typedef BOOST_PP_CAT(iter,i_) type;
+    };
+
+#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
+    /// ETI workaround
+    template<> struct apply<int>
+    {
+        typedef int type;
+    };
+#endif
+};
+
+#undef i_
+
+///// iteration, depth == 2
+
+#elif BOOST_PP_ITERATION_DEPTH() == 2
+
+#   define AUX778076_ITER_0 BOOST_PP_CAT(iter,BOOST_PP_DEC(BOOST_PP_FRAME_ITERATION(2)))
+#   define AUX778076_ITER_1 BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(2))
+
+        typedef typename next<AUX778076_ITER_0>::type AUX778076_ITER_1;
+        
+#   undef AUX778076_ITER_1
+#   undef AUX778076_ITER_0
+
+#endif // BOOST_PP_ITERATION_DEPTH()
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ext/boost/mpl/aux_/apply_1st.hpp b/ext/boost/mpl/aux_/apply_1st.hpp
new file mode 100644
index 0000000..0620215
--- /dev/null
+++ b/ext/boost/mpl/aux_/apply_1st.hpp
@@ -0,0 +1,35 @@
+
+#ifndef BOOST_MPL_AUX_APPLY_1ST_HPP_INCLUDED
+#define BOOST_MPL_AUX_APPLY_1ST_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: apply_1st.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/apply.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+struct apply_1st
+{
+    template< typename Pair, typename T > struct apply
+        : apply2<
+              typename Pair::first
+            , typename Pair::second
+            , T
+            >
+    {
+    };
+};
+
+}}}
+
+#endif // BOOST_MPL_AUX_APPLY_1ST_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/arg_typedef.hpp b/ext/boost/mpl/aux_/arg_typedef.hpp
index e4737b9..ed5e5bd 100644
--- a/ext/boost/mpl/aux_/arg_typedef.hpp
+++ b/ext/boost/mpl/aux_/arg_typedef.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: arg_typedef.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/lambda.hpp>
diff --git a/ext/boost/mpl/aux_/arithmetic_op.hpp b/ext/boost/mpl/aux_/arithmetic_op.hpp
new file mode 100644
index 0000000..0a310b7
--- /dev/null
+++ b/ext/boost/mpl/aux_/arithmetic_op.hpp
@@ -0,0 +1,92 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: arithmetic_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/integral_c.hpp>
+#   include <boost/mpl/aux_/largest_int.hpp>
+#   include <boost/mpl/aux_/value_wknd.hpp>
+#endif
+
+#if !defined(AUX778076_OP_PREFIX)
+#   define AUX778076_OP_PREFIX AUX778076_OP_NAME
+#endif
+
+#include <boost/mpl/aux_/numeric_op.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER AUX778076_OP_PREFIX.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/aux_/config/workaround.hpp>
+#   include <boost/preprocessor/cat.hpp>
+
+
+namespace boost { namespace mpl {
+
+#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
+namespace aux {
+template< typename T, T n1, T n2 >
+struct BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd)
+{
+    BOOST_STATIC_CONSTANT(T, value = (n1 AUX778076_OP_TOKEN n2));
+    typedef integral_c<T,value> type;
+};
+}
+#endif
+
+template<>
+struct AUX778076_OP_IMPL_NAME<integral_c_tag,integral_c_tag>
+{
+    template< typename N1, typename N2 > struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  AUX778076_OP_TOKEN BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+#else
+        : aux::BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd)<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+#endif
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#undef AUX778076_OP_TAG_NAME
+#undef AUX778076_OP_IMPL_NAME
+#undef AUX778076_OP_ARITY
+#undef AUX778076_OP_PREFIX
+#undef AUX778076_OP_NAME
+#undef AUX778076_OP_TOKEN
diff --git a/ext/boost/mpl/aux_/arity.hpp b/ext/boost/mpl/aux_/arity.hpp
index f639a10..adedcc6 100644
--- a/ext/boost/mpl/aux_/arity.hpp
+++ b/ext/boost/mpl/aux_/arity.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: arity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/dtp.hpp>
diff --git a/ext/boost/mpl/aux_/arity_spec.hpp b/ext/boost/mpl/aux_/arity_spec.hpp
index ea164a6..6ae5cc7 100644
--- a/ext/boost/mpl/aux_/arity_spec.hpp
+++ b/ext/boost/mpl/aux_/arity_spec.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: arity_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/int.hpp>
diff --git a/ext/boost/mpl/aux_/at_impl.hpp b/ext/boost/mpl/aux_/at_impl.hpp
new file mode 100644
index 0000000..4af7cfe
--- /dev/null
+++ b/ext/boost/mpl/aux_/at_impl.hpp
@@ -0,0 +1,45 @@
+
+#ifndef BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: at_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/advance.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+
+namespace boost { namespace mpl {
+
+// default implementation; conrete sequences might override it by 
+// specializing either the 'at_impl' or the primary 'at' template
+
+template< typename Tag >
+struct at_impl
+{
+    template< typename Sequence, typename N > struct apply
+    {
+        typedef typename advance<
+              typename begin<Sequence>::type
+            , N
+            >::type iter_;
+
+        typedef typename deref<iter_>::type type;
+    };
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, at_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/back_impl.hpp b/ext/boost/mpl/aux_/back_impl.hpp
new file mode 100644
index 0000000..3b7e4a9
--- /dev/null
+++ b/ext/boost/mpl/aux_/back_impl.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_AUX_BACK_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_BACK_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: back_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+
+namespace boost { namespace mpl {
+
+// default implementation, requires at least bi-directional iterators;
+// conrete sequences might override it by specializing either the 
+// 'back_impl' or the primary 'back' template
+
+template< typename Tag >
+struct back_impl
+{
+    template< typename Sequence > struct apply
+    {
+        typedef typename end<Sequence>::type end_;
+        typedef typename prior<end_>::type last_;
+        typedef typename deref<last_>::type type;
+    };
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, back_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_BACK_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/basic_bind.hpp b/ext/boost/mpl/aux_/basic_bind.hpp
new file mode 100644
index 0000000..90cac01
--- /dev/null
+++ b/ext/boost/mpl/aux_/basic_bind.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_AUX_BASIC_BIND_HPP_INCLUDED
+#define BOOST_MPL_AUX_BASIC_BIND_HPP_INCLUDED
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: basic_bind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT
+#include <boost/mpl/bind.hpp>
+
+#endif // BOOST_MPL_AUX_BASIC_BIND_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/begin_end_impl.hpp b/ext/boost/mpl/aux_/begin_end_impl.hpp
new file mode 100644
index 0000000..1a220a2
--- /dev/null
+++ b/ext/boost/mpl/aux_/begin_end_impl.hpp
@@ -0,0 +1,101 @@
+
+#ifndef BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: begin_end_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end_fwd.hpp>
+#include <boost/mpl/sequence_tag_fwd.hpp>
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/aux_/has_begin.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+#include <boost/mpl/aux_/config/eti.hpp>
+
+namespace boost { namespace mpl {
+
+
+namespace aux { 
+
+template< typename Sequence > 
+struct begin_type 
+{ 
+    typedef typename Sequence::begin type; 
+};
+template< typename Sequence > 
+struct end_type
+{ 
+    typedef typename Sequence::end type; 
+};
+
+}
+
+// default implementation; conrete sequences might override it by 
+// specializing either the 'begin_impl/end_impl' or the primary 
+// 'begin/end' templates
+
+template< typename Tag >
+struct begin_impl
+{
+    template< typename Sequence > struct apply
+    {
+        typedef typename eval_if<aux::has_begin<Sequence, true_>,
+                                 aux::begin_type<Sequence>, void_>::type type;
+    };
+};
+
+template< typename Tag >
+struct end_impl
+{
+    template< typename Sequence > struct apply
+    {
+        typedef typename eval_if<aux::has_begin<Sequence, true_>,
+                                 aux::end_type<Sequence>, void_>::type type;
+    };
+};
+
+// specialize 'begin_trait/end_trait' for two pre-defined tags
+
+#   define AUX778076_IMPL_SPEC(name, tag, result) \
+template<> \
+struct name##_impl<tag> \
+{ \
+    template< typename Sequence > struct apply \
+    { \
+        typedef result type; \
+    }; \
+}; \
+/**/
+
+// a sequence with nested 'begin/end' typedefs; just query them
+AUX778076_IMPL_SPEC(begin, nested_begin_end_tag, typename Sequence::begin)
+AUX778076_IMPL_SPEC(end, nested_begin_end_tag, typename Sequence::end)
+
+// if a type 'T' does not contain 'begin/end' or 'tag' members 
+// and doesn't specialize either 'begin/end' or 'begin_impl/end_impl' 
+// templates, then we end up here
+AUX778076_IMPL_SPEC(begin, non_sequence_tag, void_)
+AUX778076_IMPL_SPEC(end, non_sequence_tag, void_)
+AUX778076_IMPL_SPEC(begin, na, void_)
+AUX778076_IMPL_SPEC(end, na, void_)
+
+#   undef AUX778076_IMPL_SPEC
+
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(1,begin_impl)
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(1,end_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/clear_impl.hpp b/ext/boost/mpl/aux_/clear_impl.hpp
new file mode 100644
index 0000000..3850086
--- /dev/null
+++ b/ext/boost/mpl/aux_/clear_impl.hpp
@@ -0,0 +1,35 @@
+
+#ifndef BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: clear_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/clear_fwd.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+#include <boost/mpl/aux_/config/eti.hpp>
+
+namespace boost { namespace mpl {
+
+// no default implementation; the definition is needed to make MSVC happy
+
+template< typename Tag >
+struct clear_impl
+{
+    template< typename Sequence > struct apply;
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, clear_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/common_name_wknd.hpp b/ext/boost/mpl/aux_/common_name_wknd.hpp
index 9d0b4b4..a6c7898 100644
--- a/ext/boost/mpl/aux_/common_name_wknd.hpp
+++ b/ext/boost/mpl/aux_/common_name_wknd.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: common_name_wknd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/workaround.hpp>
diff --git a/ext/boost/mpl/aux_/comparison_op.hpp b/ext/boost/mpl/aux_/comparison_op.hpp
new file mode 100644
index 0000000..f0850a4
--- /dev/null
+++ b/ext/boost/mpl/aux_/comparison_op.hpp
@@ -0,0 +1,83 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: comparison_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/bool.hpp>
+#   include <boost/mpl/aux_/value_wknd.hpp>
+#endif
+
+#if !defined(AUX778076_OP_PREFIX)
+#   define AUX778076_OP_PREFIX AUX778076_OP_NAME
+#endif
+
+#define AUX778076_OP_ARITY 2
+
+#include <boost/mpl/aux_/numeric_op.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER AUX778076_OP_PREFIX.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/aux_/config/integral.hpp>
+#   include <boost/preprocessor/cat.hpp>
+
+namespace boost { namespace mpl {
+
+// MSVC workaround: implement less in terms of greater
+#if 0 AUX778076_OP_TOKEN 1 && !(1 AUX778076_OP_TOKEN 0) && !(0 AUX778076_OP_TOKEN 0)
+#   define AUX778076_OP(N1, N2) \
+    ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) \
+/**/
+#else
+#   define AUX778076_OP(N1, N2) \
+    ( BOOST_MPL_AUX_VALUE_WKND(N1)::value \
+          AUX778076_OP_TOKEN BOOST_MPL_AUX_VALUE_WKND(N2)::value \
+        ) \
+/**/
+#endif
+
+template<>
+struct AUX778076_OP_IMPL_NAME<integral_c_tag,integral_c_tag>
+{
+    template< typename N1, typename N2 > struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
+        : bool_< AUX778076_OP(N1, N2) >
+    {
+#else
+    {
+        BOOST_STATIC_CONSTANT(bool, value = AUX778076_OP(N1, N2));
+        typedef bool_<value> type;
+#endif
+    };
+};
+
+#undef AUX778076_OP
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#undef AUX778076_OP_TAG_NAME
+#undef AUX778076_OP_IMPL_NAME
+#undef AUX778076_OP_ARITY
+#undef AUX778076_OP_PREFIX
+#undef AUX778076_OP_NAME
+#undef AUX778076_OP_TOKEN
diff --git a/ext/boost/mpl/aux_/config/._adl.hpp b/ext/boost/mpl/aux_/config/._adl.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._adl.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._arrays.hpp b/ext/boost/mpl/aux_/config/._arrays.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._arrays.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._bcc.hpp b/ext/boost/mpl/aux_/config/._bcc.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._bcc.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._bind.hpp b/ext/boost/mpl/aux_/config/._bind.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._bind.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._compiler.hpp b/ext/boost/mpl/aux_/config/._compiler.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._compiler.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._ctps.hpp b/ext/boost/mpl/aux_/config/._ctps.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._ctps.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._dtp.hpp b/ext/boost/mpl/aux_/config/._dtp.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._dtp.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._eti.hpp b/ext/boost/mpl/aux_/config/._eti.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._eti.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._gcc.hpp b/ext/boost/mpl/aux_/config/._gcc.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._gcc.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._has_apply.hpp b/ext/boost/mpl/aux_/config/._has_apply.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._has_apply.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._has_xxx.hpp b/ext/boost/mpl/aux_/config/._has_xxx.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._has_xxx.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._integral.hpp b/ext/boost/mpl/aux_/config/._integral.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._integral.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._intel.hpp b/ext/boost/mpl/aux_/config/._intel.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._intel.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._lambda.hpp b/ext/boost/mpl/aux_/config/._lambda.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._lambda.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._msvc.hpp b/ext/boost/mpl/aux_/config/._msvc.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._msvc.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._msvc_typename.hpp b/ext/boost/mpl/aux_/config/._msvc_typename.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._msvc_typename.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._nttp.hpp b/ext/boost/mpl/aux_/config/._nttp.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._nttp.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._overload_resolution.hpp b/ext/boost/mpl/aux_/config/._overload_resolution.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._overload_resolution.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._pp_counter.hpp b/ext/boost/mpl/aux_/config/._pp_counter.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._pp_counter.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._preprocessor.hpp b/ext/boost/mpl/aux_/config/._preprocessor.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._preprocessor.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._static_constant.hpp b/ext/boost/mpl/aux_/config/._static_constant.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._static_constant.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._ttp.hpp b/ext/boost/mpl/aux_/config/._ttp.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._ttp.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._use_preprocessed.hpp b/ext/boost/mpl/aux_/config/._use_preprocessed.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._use_preprocessed.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/._workaround.hpp b/ext/boost/mpl/aux_/config/._workaround.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/config/._workaround.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/config/adl.hpp b/ext/boost/mpl/aux_/config/adl.hpp
index 130ee9f..d6ead71 100644
--- a/ext/boost/mpl/aux_/config/adl.hpp
+++ b/ext/boost/mpl/aux_/config/adl.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: adl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/msvc.hpp>
diff --git a/ext/boost/mpl/aux_/config/arrays.hpp b/ext/boost/mpl/aux_/config/arrays.hpp
index 56ee0a3..d801cf7 100644
--- a/ext/boost/mpl/aux_/config/arrays.hpp
+++ b/ext/boost/mpl/aux_/config/arrays.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: arrays.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/msvc.hpp>
diff --git a/ext/boost/mpl/aux_/config/bind.hpp b/ext/boost/mpl/aux_/config/bind.hpp
index d0450e6..02a7814 100644
--- a/ext/boost/mpl/aux_/config/bind.hpp
+++ b/ext/boost/mpl/aux_/config/bind.hpp
@@ -12,7 +12,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: bind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/msvc.hpp>
diff --git a/ext/boost/mpl/aux_/config/compiler.hpp b/ext/boost/mpl/aux_/config/compiler.hpp
index 3238963..e80ccde 100644
--- a/ext/boost/mpl/aux_/config/compiler.hpp
+++ b/ext/boost/mpl/aux_/config/compiler.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: compiler.hpp 53189 2009-05-22 20:07:55Z hkaiser $
-// $Date: 2009-05-22 16:07:55 -0400 (Fri, 22 May 2009) $
+// $Date: 2009-05-22 13:07:55 -0700 (Fri, 22 May 2009) $
 // $Revision: 53189 $
 
 #if !defined(BOOST_MPL_CFG_COMPILER_DIR)
diff --git a/ext/boost/mpl/aux_/config/ctps.hpp b/ext/boost/mpl/aux_/config/ctps.hpp
index b908cee..9a4aaf7 100644
--- a/ext/boost/mpl/aux_/config/ctps.hpp
+++ b/ext/boost/mpl/aux_/config/ctps.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: ctps.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/workaround.hpp>
diff --git a/ext/boost/mpl/aux_/config/dependent_nttp.hpp b/ext/boost/mpl/aux_/config/dependent_nttp.hpp
new file mode 100644
index 0000000..3b5a288
--- /dev/null
+++ b/ext/boost/mpl/aux_/config/dependent_nttp.hpp
@@ -0,0 +1,35 @@
+
+#ifndef BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED
+#define BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: dependent_nttp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/gcc.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+// GCC and EDG-based compilers incorrectly reject the following code:
+//   template< typename T, T n > struct a;
+//   template< typename T > struct b;
+//   template< typename T, T n > struct b< a<T,n> > {};
+
+#if    !defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE) \
+    && (   BOOST_WORKAROUND(__EDG_VERSION__, BOOST_TESTED_AT(300)) \
+        || BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \
+        )
+
+#   define BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC
+
+#endif
+
+#endif // BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp b/ext/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp
new file mode 100644
index 0000000..f5f53f7
--- /dev/null
+++ b/ext/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp
@@ -0,0 +1,27 @@
+
+#ifndef BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED
+#define BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: dmc_ambiguous_ctps.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+#if    !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE) \
+    && BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
+
+#   define BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS
+
+#endif
+
+#endif // BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/config/dtp.hpp b/ext/boost/mpl/aux_/config/dtp.hpp
index 8f03a83..e53929b 100644
--- a/ext/boost/mpl/aux_/config/dtp.hpp
+++ b/ext/boost/mpl/aux_/config/dtp.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: dtp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/workaround.hpp>
diff --git a/ext/boost/mpl/aux_/config/eti.hpp b/ext/boost/mpl/aux_/config/eti.hpp
index 7328b6d..c3fd1c6 100644
--- a/ext/boost/mpl/aux_/config/eti.hpp
+++ b/ext/boost/mpl/aux_/config/eti.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: eti.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/msvc.hpp>
diff --git a/ext/boost/mpl/aux_/config/forwarding.hpp b/ext/boost/mpl/aux_/config/forwarding.hpp
new file mode 100644
index 0000000..0919d07
--- /dev/null
+++ b/ext/boost/mpl/aux_/config/forwarding.hpp
@@ -0,0 +1,27 @@
+
+#ifndef BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED
+#define BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: forwarding.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+#if    !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE) \
+    && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
+
+#   define BOOST_MPL_CFG_NO_NESTED_FORWARDING
+
+#endif
+
+#endif // BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/config/gcc.hpp b/ext/boost/mpl/aux_/config/gcc.hpp
index 3380d61..b9d8f7d 100644
--- a/ext/boost/mpl/aux_/config/gcc.hpp
+++ b/ext/boost/mpl/aux_/config/gcc.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: gcc.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #if defined(__GNUC__) && !defined(__EDG_VERSION__)
diff --git a/ext/boost/mpl/aux_/config/has_apply.hpp b/ext/boost/mpl/aux_/config/has_apply.hpp
index fc9176f..cc52eba 100644
--- a/ext/boost/mpl/aux_/config/has_apply.hpp
+++ b/ext/boost/mpl/aux_/config/has_apply.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: has_apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/has_xxx.hpp>
diff --git a/ext/boost/mpl/aux_/config/has_xxx.hpp b/ext/boost/mpl/aux_/config/has_xxx.hpp
index e03fe11..1139b68 100644
--- a/ext/boost/mpl/aux_/config/has_xxx.hpp
+++ b/ext/boost/mpl/aux_/config/has_xxx.hpp
@@ -12,7 +12,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: has_xxx.hpp 63518 2010-07-02 08:32:03Z agurtovoy $
-// $Date: 2010-07-02 04:32:03 -0400 (Fri, 02 Jul 2010) $
+// $Date: 2010-07-02 01:32:03 -0700 (Fri, 02 Jul 2010) $
 // $Revision: 63518 $
 
 #include <boost/mpl/aux_/config/overload_resolution.hpp>
diff --git a/ext/boost/mpl/aux_/config/integral.hpp b/ext/boost/mpl/aux_/config/integral.hpp
index 4dec725..6a89160 100644
--- a/ext/boost/mpl/aux_/config/integral.hpp
+++ b/ext/boost/mpl/aux_/config/integral.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: integral.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/msvc.hpp>
diff --git a/ext/boost/mpl/aux_/config/intel.hpp b/ext/boost/mpl/aux_/config/intel.hpp
index 8f1de76..141a952 100644
--- a/ext/boost/mpl/aux_/config/intel.hpp
+++ b/ext/boost/mpl/aux_/config/intel.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: intel.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 
diff --git a/ext/boost/mpl/aux_/config/lambda.hpp b/ext/boost/mpl/aux_/config/lambda.hpp
index a46b46a..7be16bf 100644
--- a/ext/boost/mpl/aux_/config/lambda.hpp
+++ b/ext/boost/mpl/aux_/config/lambda.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: lambda.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/ttp.hpp>
diff --git a/ext/boost/mpl/aux_/config/msvc.hpp b/ext/boost/mpl/aux_/config/msvc.hpp
index 18bed83..fe89cda 100644
--- a/ext/boost/mpl/aux_/config/msvc.hpp
+++ b/ext/boost/mpl/aux_/config/msvc.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: msvc.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 
diff --git a/ext/boost/mpl/aux_/config/msvc_typename.hpp b/ext/boost/mpl/aux_/config/msvc_typename.hpp
index 042c804..603e275 100644
--- a/ext/boost/mpl/aux_/config/msvc_typename.hpp
+++ b/ext/boost/mpl/aux_/config/msvc_typename.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: msvc_typename.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/msvc.hpp>
diff --git a/ext/boost/mpl/aux_/config/nttp.hpp b/ext/boost/mpl/aux_/config/nttp.hpp
index 4873e20..f8bd39e 100644
--- a/ext/boost/mpl/aux_/config/nttp.hpp
+++ b/ext/boost/mpl/aux_/config/nttp.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: nttp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/msvc.hpp>
diff --git a/ext/boost/mpl/aux_/config/operators.hpp b/ext/boost/mpl/aux_/config/operators.hpp
new file mode 100644
index 0000000..a6af5b1
--- /dev/null
+++ b/ext/boost/mpl/aux_/config/operators.hpp
@@ -0,0 +1,33 @@
+
+#ifndef BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED
+#define BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: operators.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/gcc.hpp>
+#include <boost/mpl/aux_/config/msvc.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+#if !defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING) \
+    && ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
+        || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
+        || BOOST_WORKAROUND(__EDG_VERSION__, <= 245) \
+        || BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, <= 0x0295) \
+        || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) \
+        )
+
+#   define BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING
+
+#endif
+
+#endif // BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/config/overload_resolution.hpp b/ext/boost/mpl/aux_/config/overload_resolution.hpp
index 88c3d53..9de579f 100644
--- a/ext/boost/mpl/aux_/config/overload_resolution.hpp
+++ b/ext/boost/mpl/aux_/config/overload_resolution.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: overload_resolution.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/workaround.hpp>
diff --git a/ext/boost/mpl/aux_/config/pp_counter.hpp b/ext/boost/mpl/aux_/config/pp_counter.hpp
index a4d0715..4592272 100644
--- a/ext/boost/mpl/aux_/config/pp_counter.hpp
+++ b/ext/boost/mpl/aux_/config/pp_counter.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: pp_counter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #if !defined(BOOST_MPL_AUX_PP_COUNTER)
diff --git a/ext/boost/mpl/aux_/config/preprocessor.hpp b/ext/boost/mpl/aux_/config/preprocessor.hpp
index 52229cd..39190c4 100644
--- a/ext/boost/mpl/aux_/config/preprocessor.hpp
+++ b/ext/boost/mpl/aux_/config/preprocessor.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: preprocessor.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/workaround.hpp>
diff --git a/ext/boost/mpl/aux_/config/static_constant.hpp b/ext/boost/mpl/aux_/config/static_constant.hpp
index 855d22f..02cf9c4 100644
--- a/ext/boost/mpl/aux_/config/static_constant.hpp
+++ b/ext/boost/mpl/aux_/config/static_constant.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: static_constant.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
diff --git a/ext/boost/mpl/aux_/config/ttp.hpp b/ext/boost/mpl/aux_/config/ttp.hpp
index a5a0c2c..879ec1d 100644
--- a/ext/boost/mpl/aux_/config/ttp.hpp
+++ b/ext/boost/mpl/aux_/config/ttp.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: ttp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/msvc.hpp>
diff --git a/ext/boost/mpl/aux_/config/typeof.hpp b/ext/boost/mpl/aux_/config/typeof.hpp
new file mode 100644
index 0000000..2244d2c
--- /dev/null
+++ b/ext/boost/mpl/aux_/config/typeof.hpp
@@ -0,0 +1,38 @@
+
+#ifndef BOOST_MPL_AUX_CONFIG_TYPEOF_HPP_INCLUDED
+#define BOOST_MPL_AUX_CONFIG_TYPEOF_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: typeof.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/gcc.hpp>
+
+#if !defined(BOOST_MPL_CFG_HAS_TYPEOF) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE) \
+    && (   defined(BOOST_MPL_CFG_GCC) && BOOST_MPL_CFG_GCC >= 0x0302 \
+        || defined(__MWERKS__) && __MWERKS__ >= 0x3000 \
+        )
+
+#   define BOOST_MPL_CFG_HAS_TYPEOF
+
+#endif
+
+
+#if !defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE) \
+    && defined(BOOST_MPL_CFG_HAS_TYPEOF)
+
+#   define BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+#endif
+
+#endif // BOOST_MPL_AUX_CONFIG_TYPEOF_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/config/use_preprocessed.hpp b/ext/boost/mpl/aux_/config/use_preprocessed.hpp
index 3bbc229..4494366 100644
--- a/ext/boost/mpl/aux_/config/use_preprocessed.hpp
+++ b/ext/boost/mpl/aux_/config/use_preprocessed.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: use_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 // #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
diff --git a/ext/boost/mpl/aux_/config/workaround.hpp b/ext/boost/mpl/aux_/config/workaround.hpp
index 337bcf7..8ec172f 100644
--- a/ext/boost/mpl/aux_/config/workaround.hpp
+++ b/ext/boost/mpl/aux_/config/workaround.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: workaround.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/detail/workaround.hpp>
diff --git a/ext/boost/mpl/aux_/contains_impl.hpp b/ext/boost/mpl/aux_/contains_impl.hpp
new file mode 100644
index 0000000..2dcb609
--- /dev/null
+++ b/ext/boost/mpl/aux_/contains_impl.hpp
@@ -0,0 +1,61 @@
+
+#ifndef BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED
+
+// Copyright Eric Friedman 2002
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: contains_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/contains_fwd.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/find.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+#include <boost/mpl/aux_/config/forwarding.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl {
+
+template< typename Tag >
+struct contains_impl
+{
+    template< typename Sequence, typename T > struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
+        : not_< is_same<
+              typename find<Sequence,T>::type
+            , typename end<Sequence>::type
+            > >
+    {
+#else
+    {
+        typedef not_< is_same<
+              typename find<Sequence,T>::type
+            , typename end<Sequence>::type
+            > > type;
+
+        BOOST_STATIC_CONSTANT(bool, value = 
+              (not_< is_same<
+                  typename find<Sequence,T>::type
+                , typename end<Sequence>::type
+                > >::value)
+            );
+#endif
+    };
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,contains_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/count_args.hpp b/ext/boost/mpl/aux_/count_args.hpp
new file mode 100644
index 0000000..1ab000d
--- /dev/null
+++ b/ext/boost/mpl/aux_/count_args.hpp
@@ -0,0 +1,105 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: count_args.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/preprocessor/expr_if.hpp>
+#include <boost/preprocessor/inc.hpp>
+#include <boost/preprocessor/cat.hpp>
+
+#if !defined(AUX778076_COUNT_ARGS_PARAM_NAME)
+#   define AUX778076_COUNT_ARGS_PARAM_NAME T
+#endif
+
+#if !defined(AUX778076_COUNT_ARGS_TEMPLATE_PARAM)
+#   define AUX778076_COUNT_ARGS_TEMPLATE_PARAM typename AUX778076_COUNT_ARGS_PARAM_NAME
+#endif
+
+// local macros, #undef-ined at the end of the header
+
+#if !defined(AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES)
+
+#   include <boost/mpl/aux_/preprocessor/repeat.hpp>
+#   include <boost/mpl/aux_/preprocessor/params.hpp>
+
+#   define AUX778076_COUNT_ARGS_REPEAT BOOST_MPL_PP_REPEAT
+#   define AUX778076_COUNT_ARGS_PARAMS(param) \
+    BOOST_MPL_PP_PARAMS( \
+          AUX778076_COUNT_ARGS_ARITY \
+        , param \
+        ) \
+    /**/
+
+#else
+
+#   include <boost/preprocessor/enum_shifted_params.hpp>
+#   include <boost/preprocessor/repeat.hpp>
+#   include <boost/preprocessor/inc.hpp>
+
+#   define AUX778076_COUNT_ARGS_REPEAT BOOST_PP_REPEAT
+#   define AUX778076_COUNT_ARGS_PARAMS(param) \
+    BOOST_PP_ENUM_SHIFTED_PARAMS( \
+          BOOST_PP_INC(AUX778076_COUNT_ARGS_ARITY) \
+        , param \
+        ) \
+    /**/
+
+#endif // AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES
+
+
+#define AUX778076_IS_ARG_TEMPLATE_NAME \
+    BOOST_PP_CAT(is_,BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_arg)) \
+/**/
+
+#define AUX778076_COUNT_ARGS_FUNC(unused, i, param) \
+    BOOST_PP_EXPR_IF(i, +) \
+    AUX778076_IS_ARG_TEMPLATE_NAME<BOOST_PP_CAT(param,BOOST_PP_INC(i))>::value \
+/**/
+
+// is_<xxx>_arg
+template< AUX778076_COUNT_ARGS_TEMPLATE_PARAM >
+struct AUX778076_IS_ARG_TEMPLATE_NAME
+{
+    BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template<>
+struct AUX778076_IS_ARG_TEMPLATE_NAME<AUX778076_COUNT_ARGS_DEFAULT>
+{
+    BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+// <xxx>_count_args
+template<
+      AUX778076_COUNT_ARGS_PARAMS(AUX778076_COUNT_ARGS_TEMPLATE_PARAM)
+    >
+struct BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_count_args)
+{
+    BOOST_STATIC_CONSTANT(int, value = AUX778076_COUNT_ARGS_REPEAT(
+          AUX778076_COUNT_ARGS_ARITY
+        , AUX778076_COUNT_ARGS_FUNC
+        , AUX778076_COUNT_ARGS_PARAM_NAME
+        ));
+};
+
+#undef AUX778076_COUNT_ARGS_FUNC
+#undef AUX778076_IS_ARG_TEMPLATE_NAME
+#undef AUX778076_COUNT_ARGS_PARAMS
+#undef AUX778076_COUNT_ARGS_REPEAT
+
+#undef AUX778076_COUNT_ARGS_ARITY
+#undef AUX778076_COUNT_ARGS_DEFAULT
+#undef AUX778076_COUNT_ARGS_PREFIX
+#undef AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES
+#undef AUX778076_COUNT_ARGS_TEMPLATE_PARAM
+#undef AUX778076_COUNT_ARGS_PARAM_NAME
diff --git a/ext/boost/mpl/aux_/count_impl.hpp b/ext/boost/mpl/aux_/count_impl.hpp
new file mode 100644
index 0000000..8b80c02
--- /dev/null
+++ b/ext/boost/mpl/aux_/count_impl.hpp
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_AUX_COUNT_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_COUNT_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: count_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/count_fwd.hpp>
+#include <boost/mpl/count_if.hpp>
+#include <boost/mpl/same_as.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct count_impl
+{
+    template< typename Sequence, typename T > struct apply
+#if BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x561))
+    {
+        typedef typename count_if< Sequence,same_as<T> >::type type;
+        BOOST_STATIC_CONSTANT(int, value = BOOST_MPL_AUX_VALUE_WKND(type)::value);
+#else
+        : count_if< Sequence,same_as<T> >
+    {
+#endif
+    };
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,count_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_COUNT_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/empty_impl.hpp b/ext/boost/mpl/aux_/empty_impl.hpp
new file mode 100644
index 0000000..0b4b979
--- /dev/null
+++ b/ext/boost/mpl/aux_/empty_impl.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: empty_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/empty_fwd.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl {
+
+// default implementation; conrete sequences might override it by 
+// specializing either the 'empty_impl' or the primary 'empty' template
+
+template< typename Tag >
+struct empty_impl
+{
+    template< typename Sequence > struct apply
+        : is_same<
+              typename begin<Sequence>::type
+            , typename end<Sequence>::type
+            >
+    {
+    };
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,empty_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/erase_impl.hpp b/ext/boost/mpl/aux_/erase_impl.hpp
new file mode 100644
index 0000000..5fc1712
--- /dev/null
+++ b/ext/boost/mpl/aux_/erase_impl.hpp
@@ -0,0 +1,69 @@
+
+#ifndef BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: erase_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/clear.hpp>
+#include <boost/mpl/push_front.hpp>
+#include <boost/mpl/reverse_fold.hpp>
+#include <boost/mpl/iterator_range.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/aux_/na.hpp>
+
+namespace boost { namespace mpl {
+
+// default implementation; conrete sequences might override it by 
+// specializing either the 'erase_impl' or the primary 'erase' template
+
+template< typename Tag >
+struct erase_impl
+{
+    template<
+          typename Sequence
+        , typename First
+        , typename Last
+        >
+    struct apply
+    {
+        typedef typename if_na< Last,typename next<First>::type >::type last_;
+        
+        // 1st half: [begin, first)
+        typedef iterator_range<
+              typename begin<Sequence>::type
+            , First
+            > first_half_;
+
+        // 2nd half: [last, end) ... that is, [last + 1, end)
+        typedef iterator_range<
+              last_
+            , typename end<Sequence>::type
+            > second_half_;
+
+        typedef typename reverse_fold<
+              second_half_
+            , typename clear<Sequence>::type
+            , push_front<_,_>
+            >::type half_sequence_;
+
+        typedef typename reverse_fold<
+              first_half_
+            , half_sequence_
+            , push_front<_,_>
+            >::type type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/erase_key_impl.hpp b/ext/boost/mpl/aux_/erase_key_impl.hpp
new file mode 100644
index 0000000..e479c66
--- /dev/null
+++ b/ext/boost/mpl/aux_/erase_key_impl.hpp
@@ -0,0 +1,32 @@
+
+#ifndef BOOST_MPL_AUX_ERASE_KEY_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_ERASE_KEY_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: erase_key_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/erase_key_fwd.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+
+namespace boost { namespace mpl {
+
+template< typename Tag >
+struct erase_key_impl
+{
+    template< typename Sequence, typename Key > struct apply;
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, erase_key_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_ERASE_KEY_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/filter_iter.hpp b/ext/boost/mpl/aux_/filter_iter.hpp
new file mode 100644
index 0000000..6fb1411
--- /dev/null
+++ b/ext/boost/mpl/aux_/filter_iter.hpp
@@ -0,0 +1,140 @@
+
+#ifndef BOOST_MPL_AUX_FILTER_ITER_HPP_INCLUDED
+#define BOOST_MPL_AUX_FILTER_ITER_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: filter_iter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/find_if.hpp>
+#include <boost/mpl/iterator_range.hpp>
+#include <boost/mpl/iterator_tags.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/aux_/lambda_spec.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename Iterator
+    , typename LastIterator
+    , typename Predicate
+    > 
+struct filter_iter;
+
+template<
+      typename Iterator
+    , typename LastIterator
+    , typename Predicate
+    >
+struct next_filter_iter
+{
+    typedef typename find_if<
+          iterator_range<Iterator,LastIterator>
+        , Predicate
+        >::type base_iter_;
+ 
+    typedef filter_iter<base_iter_,LastIterator,Predicate> type;
+};
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template<
+      typename Iterator
+    , typename LastIterator
+    , typename Predicate
+    >
+struct filter_iter
+{
+    typedef Iterator base;
+    typedef forward_iterator_tag category;
+    typedef typename aux::next_filter_iter<
+          typename mpl::next<base>::type
+        , LastIterator
+        , Predicate
+        >::type next;
+    
+    typedef typename deref<base>::type type;
+};
+
+template<
+      typename LastIterator
+    , typename Predicate
+    >
+struct filter_iter< LastIterator,LastIterator,Predicate >
+{
+    typedef LastIterator base;
+    typedef forward_iterator_tag category;
+};
+
+#else
+
+template< bool >
+struct filter_iter_impl
+{
+    template<
+          typename Iterator
+        , typename LastIterator
+        , typename Predicate
+        >
+    struct result_
+    {
+        typedef Iterator base;
+        typedef forward_iterator_tag category;
+        typedef typename next_filter_iter<
+              typename mpl::next<Iterator>::type
+            , LastIterator
+            , Predicate
+            >::type next;
+        
+        typedef typename deref<base>::type type;
+    };
+};
+
+template<>
+struct filter_iter_impl< true >
+{
+    template<
+          typename Iterator
+        , typename LastIterator
+        , typename Predicate
+        >
+    struct result_
+    {
+        typedef Iterator base;
+        typedef forward_iterator_tag category;
+    };
+};
+
+template<
+      typename Iterator
+    , typename LastIterator
+    , typename Predicate
+    >
+struct filter_iter
+    : filter_iter_impl<
+          ::boost::is_same<Iterator,LastIterator>::value
+        >::template result_< Iterator,LastIterator,Predicate >
+{
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace aux
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::filter_iter)
+
+}}
+
+#endif // BOOST_MPL_AUX_FILTER_ITER_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/find_if_pred.hpp b/ext/boost/mpl/aux_/find_if_pred.hpp
new file mode 100644
index 0000000..c07d89d
--- /dev/null
+++ b/ext/boost/mpl/aux_/find_if_pred.hpp
@@ -0,0 +1,31 @@
+
+#ifndef BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED
+#define BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Eric Friedman 2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+#include <boost/mpl/aux_/iter_apply.hpp>
+#include <boost/mpl/not.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename Predicate >
+struct find_if_pred
+{
+    template< typename Iterator >
+    struct apply
+    {
+        typedef not_< aux::iter_apply1<Predicate,Iterator> > type;
+    };
+};
+
+}}}
+
+#endif // BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/fold_impl.hpp b/ext/boost/mpl/aux_/fold_impl.hpp
new file mode 100644
index 0000000..cc64022
--- /dev/null
+++ b/ext/boost/mpl/aux_/fold_impl.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: fold_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/next_prior.hpp>
+#   include <boost/mpl/apply.hpp>
+#   include <boost/mpl/deref.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#       include <boost/mpl/if.hpp>
+#       include <boost/type_traits/is_same.hpp>
+#   endif
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER fold_impl.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   define AUX778076_FOLD_IMPL_OP(iter) typename deref<iter>::type
+#   define AUX778076_FOLD_IMPL_NAME_PREFIX fold
+#   include <boost/mpl/aux_/fold_impl_body.hpp>
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/fold_impl_body.hpp b/ext/boost/mpl/aux_/fold_impl_body.hpp
new file mode 100644
index 0000000..0750990
--- /dev/null
+++ b/ext/boost/mpl/aux_/fold_impl_body.hpp
@@ -0,0 +1,365 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+#if !defined(BOOST_PP_IS_ITERATING)
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: fold_impl_body.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#   include <boost/mpl/limits/unrolling.hpp>
+#   include <boost/mpl/aux_/preprocessor/repeat.hpp>
+#   include <boost/mpl/aux_/config/workaround.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   include <boost/mpl/aux_/nttp_decl.hpp>
+#   include <boost/mpl/aux_/config/eti.hpp>
+
+#   include <boost/preprocessor/iterate.hpp>
+#   include <boost/preprocessor/dec.hpp>
+#   include <boost/preprocessor/cat.hpp>
+
+// local macros, #undef-ined at the end of the header
+
+#   define AUX778076_ITER_FOLD_STEP(unused, i, unused2) \
+    typedef typename apply2< \
+          ForwardOp \
+        , BOOST_PP_CAT(state,i) \
+        , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,i)) \
+        >::type BOOST_PP_CAT(state,BOOST_PP_INC(i)); \
+    typedef typename mpl::next<BOOST_PP_CAT(iter,i)>::type \
+        BOOST_PP_CAT(iter,BOOST_PP_INC(i)); \
+    /**/
+
+#   define AUX778076_FOLD_IMPL_NAME \
+    BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_impl) \
+    /**/
+
+#   define AUX778076_FOLD_CHUNK_NAME \
+    BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_chunk) \
+    /**/
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+template<
+      BOOST_MPL_AUX_NTTP_DECL(int, N)
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    > 
+struct AUX778076_FOLD_IMPL_NAME;
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+#   if !BOOST_WORKAROUND(__BORLANDC__, < 0x600)
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/fold_impl_body.hpp>))
+#   include BOOST_PP_ITERATE()
+
+// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING
+template<
+      BOOST_MPL_AUX_NTTP_DECL(int, N)
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    > 
+struct AUX778076_FOLD_IMPL_NAME
+{
+    typedef AUX778076_FOLD_IMPL_NAME<
+          BOOST_MPL_LIMIT_UNROLLING
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef AUX778076_FOLD_IMPL_NAME<
+          ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+        
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+// fallback implementation for sequences of unknown size
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    > 
+struct AUX778076_FOLD_IMPL_NAME<-1,First,Last,State,ForwardOp>
+    : AUX778076_FOLD_IMPL_NAME<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    > 
+struct AUX778076_FOLD_IMPL_NAME<-1,Last,Last,State,ForwardOp>
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+#   else // BOOST_WORKAROUND(__BORLANDC__, < 0x600)
+
+// Borland have some serious problems with the unrolled version, so
+// we always use a basic implementation
+template<
+      BOOST_MPL_AUX_NTTP_DECL(int, N)
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    > 
+struct AUX778076_FOLD_IMPL_NAME
+{
+    typedef AUX778076_FOLD_IMPL_NAME<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+    typedef state type;
+};
+
+template<
+      BOOST_MPL_AUX_NTTP_DECL(int, N)
+     , typename Last
+    , typename State
+    , typename ForwardOp
+    > 
+struct AUX778076_FOLD_IMPL_NAME<N,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+    typedef state type;
+};
+
+#   endif // BOOST_WORKAROUND(__BORLANDC__, < 0x600)
+ 
+#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+template< BOOST_MPL_AUX_NTTP_DECL(int, N) >
+struct AUX778076_FOLD_CHUNK_NAME;
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/fold_impl_body.hpp>))
+#   include BOOST_PP_ITERATE()
+
+// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING
+template< BOOST_MPL_AUX_NTTP_DECL(int, N) > 
+struct AUX778076_FOLD_CHUNK_NAME
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        > 
+    struct result_
+    {
+        typedef AUX778076_FOLD_IMPL_NAME<
+              BOOST_MPL_LIMIT_UNROLLING
+            , First
+            , Last
+            , State
+            , ForwardOp
+            > chunk_;
+
+        typedef AUX778076_FOLD_IMPL_NAME<
+              ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING )
+            , typename chunk_::iterator
+            , Last
+            , typename chunk_::state
+            , ForwardOp
+            > res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+// fallback implementation for sequences of unknown size
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    > 
+struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step);
+
+template<
+      typename Last
+    , typename State
+    >
+struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step)
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<> 
+struct AUX778076_FOLD_CHUNK_NAME<-1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        > 
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same<First,Last>::type
+            , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step)<Last,State>
+            , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step)<First,Last,State,ForwardOp>
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+
+#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
+    /// ETI workaround
+    template<> struct result_<int,int,int,int>
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+#endif
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    > 
+struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step)
+{
+    // can't inherit here - it breaks MSVC 7.0
+    typedef AUX778076_FOLD_CHUNK_NAME<-1>::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type
+        , ForwardOp
+        > chunk_;
+
+    typedef typename chunk_::state state;
+    typedef typename chunk_::iterator iterator;
+};
+
+template<
+      BOOST_MPL_AUX_NTTP_DECL(int, N)
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    > 
+struct AUX778076_FOLD_IMPL_NAME
+    : AUX778076_FOLD_CHUNK_NAME<N>
+        ::template result_<First,Last,State,ForwardOp>
+{
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+}}}
+
+#   undef AUX778076_FOLD_IMPL_NAME
+#   undef AUX778076_FOLD_CHUNK_NAME
+#   undef AUX778076_ITER_FOLD_STEP
+
+#undef AUX778076_FOLD_IMPL_OP
+#undef AUX778076_FOLD_IMPL_NAME_PREFIX
+
+///// iteration
+
+#else
+
+#   define n_ BOOST_PP_FRAME_ITERATION(1)
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct AUX778076_FOLD_IMPL_NAME<n_,First,Last,State,ForwardOp>
+{
+    typedef First iter0;
+    typedef State state0;
+
+    BOOST_MPL_PP_REPEAT(n_, AUX778076_ITER_FOLD_STEP, unused)
+
+    typedef BOOST_PP_CAT(state,n_) state;
+    typedef BOOST_PP_CAT(iter,n_) iterator;
+};
+
+#else
+
+template<> struct AUX778076_FOLD_CHUNK_NAME<n_>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+
+        BOOST_MPL_PP_REPEAT(n_, AUX778076_ITER_FOLD_STEP, unused)
+
+        typedef BOOST_PP_CAT(state,n_) state;
+        typedef BOOST_PP_CAT(iter,n_) iterator;
+    };
+
+#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
+    /// ETI workaround
+    template<> struct result_<int,int,int,int>
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+#endif
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#   undef n_
+
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ext/boost/mpl/aux_/fold_op.hpp b/ext/boost/mpl/aux_/fold_op.hpp
new file mode 100644
index 0000000..3fc6ce9
--- /dev/null
+++ b/ext/boost/mpl/aux_/fold_op.hpp
@@ -0,0 +1,37 @@
+
+#ifndef BOOST_MPL_AUX_FOLD_OP_HPP_INCLUDED
+#define BOOST_MPL_AUX_FOLD_OP_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: fold_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/apply.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+// hand-written version is more efficient than bind/lambda expression
+template< typename Op >
+struct fold_op
+{
+    template< typename T1, typename T2 > struct apply
+    {
+        typedef typename apply2<
+              Op
+            , T1
+            , typename T2::type
+            >::type type;
+    };
+};
+
+}}}
+
+#endif // BOOST_MPL_AUX_FOLD_OP_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/fold_pred.hpp b/ext/boost/mpl/aux_/fold_pred.hpp
new file mode 100644
index 0000000..f645464
--- /dev/null
+++ b/ext/boost/mpl/aux_/fold_pred.hpp
@@ -0,0 +1,37 @@
+
+#ifndef BOOST_MPL_AUX_FOLD_PRED_HPP_INCLUDED
+#define BOOST_MPL_AUX_FOLD_PRED_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: fold_pred.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/same_as.hpp>
+#include <boost/mpl/apply.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename Last >
+struct fold_pred
+{
+    template<
+          typename State
+        , typename Iterator
+        >
+    struct apply
+        : not_same_as<Last>::template apply<Iterator>
+    {
+    };
+};
+
+}}}
+
+#endif // BOOST_MPL_AUX_FOLD_PRED_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/front_impl.hpp b/ext/boost/mpl/aux_/front_impl.hpp
new file mode 100644
index 0000000..a666e67
--- /dev/null
+++ b/ext/boost/mpl/aux_/front_impl.hpp
@@ -0,0 +1,41 @@
+
+#ifndef BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: front_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/front_fwd.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+
+namespace boost { namespace mpl {
+
+// default implementation; conrete sequences might override it by 
+// specializing either the 'front_impl' or the primary 'front' template
+
+template< typename Tag >
+struct front_impl
+{
+    template< typename Sequence > struct apply
+    {
+        typedef typename begin<Sequence>::type iter_;
+        typedef typename deref<iter_>::type type;
+    };
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,front_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/full_lambda.hpp b/ext/boost/mpl/aux_/full_lambda.hpp
index dfaaedb..e931199 100644
--- a/ext/boost/mpl/aux_/full_lambda.hpp
+++ b/ext/boost/mpl/aux_/full_lambda.hpp
@@ -15,7 +15,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: full_lambda.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
diff --git a/ext/boost/mpl/aux_/has_apply.hpp b/ext/boost/mpl/aux_/has_apply.hpp
index b77b561..cfb496e 100644
--- a/ext/boost/mpl/aux_/has_apply.hpp
+++ b/ext/boost/mpl/aux_/has_apply.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: has_apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/has_xxx.hpp>
diff --git a/ext/boost/mpl/aux_/has_begin.hpp b/ext/boost/mpl/aux_/has_begin.hpp
new file mode 100644
index 0000000..c2b3bdb
--- /dev/null
+++ b/ext/boost/mpl/aux_/has_begin.hpp
@@ -0,0 +1,23 @@
+
+#ifndef BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED
+#define BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: has_begin.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/has_xxx.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_begin, begin, true)
+}}}
+
+#endif // BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/has_key_impl.hpp b/ext/boost/mpl/aux_/has_key_impl.hpp
new file mode 100644
index 0000000..e7c7fc4
--- /dev/null
+++ b/ext/boost/mpl/aux_/has_key_impl.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+// Copyright David Abrahams 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: has_key_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/has_key_fwd.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+
+namespace boost { namespace mpl {
+
+// no default implementation; the definition is needed to make MSVC happy 
+
+template< typename Tag > struct has_key_impl
+{
+    template< typename AssociativeSequence, typename Key > struct apply;
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,has_key_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/has_rebind.hpp b/ext/boost/mpl/aux_/has_rebind.hpp
new file mode 100644
index 0000000..f07e79e
--- /dev/null
+++ b/ext/boost/mpl/aux_/has_rebind.hpp
@@ -0,0 +1,99 @@
+
+#ifndef BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
+#define BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: has_rebind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/msvc.hpp>
+#include <boost/mpl/aux_/config/intel.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+#if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
+#   include <boost/mpl/has_xxx.hpp>
+#elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+#   include <boost/mpl/has_xxx.hpp>
+#   include <boost/mpl/if.hpp>
+#   include <boost/mpl/bool.hpp>
+#   include <boost/mpl/aux_/msvc_is_class.hpp>
+#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
+#   include <boost/mpl/if.hpp>
+#   include <boost/mpl/bool.hpp>
+#   include <boost/mpl/aux_/yes_no.hpp>
+#   include <boost/mpl/aux_/config/static_constant.hpp>
+#   include <boost/type_traits/is_class.hpp>
+#else
+#   include <boost/mpl/aux_/type_wrapper.hpp>
+#   include <boost/mpl/aux_/yes_no.hpp>
+#   include <boost/mpl/aux_/config/static_constant.hpp>
+#endif
+
+namespace boost { namespace mpl { namespace aux {
+
+#if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
+
+BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind, rebind, false)
+
+#elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+
+BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind_impl, rebind, false)
+
+template< typename T >
+struct has_rebind
+    : if_< 
+          msvc_is_class<T>
+        , has_rebind_impl<T>
+        , bool_<false>
+        >::type
+{
+};
+
+#else // the rest
+
+template< typename T > struct has_rebind_tag {};
+no_tag operator|(has_rebind_tag<int>, void const volatile*);
+
+#   if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
+template< typename T >
+struct has_rebind
+{
+    static has_rebind_tag<T>* get();
+    BOOST_STATIC_CONSTANT(bool, value = 
+          sizeof(has_rebind_tag<int>() | get()) == sizeof(yes_tag)
+        );
+};
+#   else // __BORLANDC__
+template< typename T >
+struct has_rebind_impl
+{
+    static T* get();
+    BOOST_STATIC_CONSTANT(bool, value = 
+          sizeof(has_rebind_tag<int>() | get()) == sizeof(yes_tag)
+        );
+};
+
+template< typename T >
+struct has_rebind
+    : if_< 
+          is_class<T>
+        , has_rebind_impl<T>
+        , bool_<false>
+        >::type
+{
+};
+#   endif // __BORLANDC__
+
+#endif
+
+}}}
+
+#endif // BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/has_size.hpp b/ext/boost/mpl/aux_/has_size.hpp
new file mode 100644
index 0000000..23588af
--- /dev/null
+++ b/ext/boost/mpl/aux_/has_size.hpp
@@ -0,0 +1,23 @@
+
+#ifndef BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED
+#define BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: has_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/has_xxx.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+BOOST_MPL_HAS_XXX_TRAIT_DEF(size)
+}}}
+
+#endif // BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/has_tag.hpp b/ext/boost/mpl/aux_/has_tag.hpp
new file mode 100644
index 0000000..915a8b6
--- /dev/null
+++ b/ext/boost/mpl/aux_/has_tag.hpp
@@ -0,0 +1,23 @@
+
+#ifndef BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED
+#define BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: has_tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/has_xxx.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_tag, tag, false)
+}}}
+
+#endif // BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/has_type.hpp b/ext/boost/mpl/aux_/has_type.hpp
index 1d301a2..4f05072 100644
--- a/ext/boost/mpl/aux_/has_type.hpp
+++ b/ext/boost/mpl/aux_/has_type.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: has_type.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/has_xxx.hpp>
diff --git a/ext/boost/mpl/aux_/include_preprocessed.hpp b/ext/boost/mpl/aux_/include_preprocessed.hpp
index b214eeb..162b05c 100644
--- a/ext/boost/mpl/aux_/include_preprocessed.hpp
+++ b/ext/boost/mpl/aux_/include_preprocessed.hpp
@@ -10,7 +10,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/compiler.hpp>
diff --git a/ext/boost/mpl/aux_/insert_impl.hpp b/ext/boost/mpl/aux_/insert_impl.hpp
new file mode 100644
index 0000000..a0de6e9
--- /dev/null
+++ b/ext/boost/mpl/aux_/insert_impl.hpp
@@ -0,0 +1,68 @@
+
+#ifndef BOOST_MPL_INSERT_IMPL_HPP_INCLUDED
+#define BOOST_MPL_INSERT_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: insert_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/reverse_fold.hpp>
+#include <boost/mpl/iterator_range.hpp>
+#include <boost/mpl/clear.hpp>
+#include <boost/mpl/push_front.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl {
+
+// default implementation; conrete sequences might override it by 
+// specializing either the 'insert_impl' or the primary 'insert' template
+
+template< typename Tag >
+struct insert_impl
+{
+    template<
+          typename Sequence
+        , typename Pos
+        , typename T
+        >
+    struct apply
+    {
+        typedef iterator_range<
+              typename begin<Sequence>::type
+            , Pos
+            > first_half_;
+
+        typedef iterator_range<
+              Pos
+            , typename end<Sequence>::type
+            > second_half_;
+
+        typedef typename reverse_fold<
+              second_half_
+            , typename clear<Sequence>::type
+            , push_front<_,_>
+            >::type half_sequence_;
+
+        typedef typename reverse_fold<
+              first_half_
+            , typename push_front<half_sequence_,T>::type
+            , push_front<_,_>
+            >::type type;
+    };
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_impl)
+
+}}
+
+#endif // BOOST_MPL_INSERT_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/insert_range_impl.hpp b/ext/boost/mpl/aux_/insert_range_impl.hpp
new file mode 100644
index 0000000..d7357b4
--- /dev/null
+++ b/ext/boost/mpl/aux_/insert_range_impl.hpp
@@ -0,0 +1,77 @@
+
+#ifndef BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: insert_range_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/copy.hpp>
+#include <boost/mpl/clear.hpp>
+#include <boost/mpl/front_inserter.hpp>
+#include <boost/mpl/joint_view.hpp>
+#include <boost/mpl/iterator_range.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/iter_push_front.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+#include <boost/mpl/aux_/config/forwarding.hpp>
+
+#include <boost/type_traits/same_traits.hpp>
+
+namespace boost { namespace mpl {
+
+// default implementation; conrete sequences might override it by 
+// specializing either the 'insert_range_impl' or the primary 
+// 'insert_range' template
+
+
+template< typename Tag >
+struct insert_range_impl
+{
+    template<
+          typename Sequence
+        , typename Pos
+        , typename Range
+        >
+    struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
+        : reverse_copy<
+              joint_view< 
+                  iterator_range<typename begin<Sequence>::type,Pos>
+                , joint_view< 
+                      Range
+                    , iterator_range<Pos,typename end<Sequence>::type>
+                    >
+                >
+            , front_inserter< typename clear<Sequence>::type >
+            >
+    {
+#else
+    {
+        typedef typename reverse_copy<
+              joint_view< 
+                  iterator_range<typename begin<Sequence>::type,Pos>
+                , joint_view< 
+                      Range
+                    , iterator_range<Pos,typename end<Sequence>::type>
+                    >
+                >
+            , front_inserter< typename clear<Sequence>::type >
+            >::type type;
+#endif
+    };
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_range_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/inserter_algorithm.hpp b/ext/boost/mpl/aux_/inserter_algorithm.hpp
new file mode 100644
index 0000000..2d7e1d9
--- /dev/null
+++ b/ext/boost/mpl/aux_/inserter_algorithm.hpp
@@ -0,0 +1,159 @@
+
+#ifndef BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED
+#define BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: inserter_algorithm.hpp 55648 2009-08-18 05:16:53Z agurtovoy $
+// $Date: 2009-08-17 22:16:53 -0700 (Mon, 17 Aug 2009) $
+// $Revision: 55648 $
+
+#include <boost/mpl/back_inserter.hpp>
+#include <boost/mpl/front_inserter.hpp>
+#include <boost/mpl/push_back.hpp>
+#include <boost/mpl/push_front.hpp>
+#include <boost/mpl/back_inserter.hpp>
+#include <boost/mpl/front_inserter.hpp>
+#include <boost/mpl/clear.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/mpl/aux_/common_name_wknd.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/preprocessor/params.hpp>
+#include <boost/mpl/aux_/preprocessor/default_params.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+#include <boost/preprocessor/arithmetic/dec.hpp>
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+#   define BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(arity, name) \
+BOOST_MPL_AUX_COMMON_NAME_WKND(name) \
+template< \
+      BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \
+    > \
+struct name \
+    : aux::name##_impl<BOOST_MPL_PP_PARAMS(arity, P)> \
+{ \
+}; \
+\
+template< \
+      BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \
+    > \
+struct name< BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P),na > \
+    : if_< has_push_back< typename clear<P1>::type> \
+        , aux::name##_impl< \
+              BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
+            , back_inserter< typename clear<P1>::type > \
+            > \
+        , aux::reverse_##name##_impl< \
+              BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
+            , front_inserter< typename clear<P1>::type > \
+            > \
+        >::type \
+{ \
+}; \
+\
+template< \
+      BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \
+    > \
+struct reverse_##name \
+    : aux::reverse_##name##_impl<BOOST_MPL_PP_PARAMS(arity, P)> \
+{ \
+}; \
+\
+template< \
+      BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \
+    > \
+struct reverse_##name< BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P),na > \
+    : if_< has_push_back<P1> \
+        , aux::reverse_##name##_impl< \
+              BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
+            , back_inserter< typename clear<P1>::type > \
+            > \
+        , aux::name##_impl< \
+              BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
+            , front_inserter< typename clear<P1>::type > \
+            > \
+        >::type \
+{ \
+}; \
+BOOST_MPL_AUX_NA_SPEC(arity, name) \
+BOOST_MPL_AUX_NA_SPEC(arity, reverse_##name) \
+/**/
+
+#else
+
+#   define BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(arity, name) \
+BOOST_MPL_AUX_COMMON_NAME_WKND(name) \
+template< \
+      BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \
+    > \
+struct def_##name##_impl \
+    : if_< has_push_back<P1> \
+        , aux::name##_impl< \
+              BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
+            , back_inserter< typename clear<P1>::type > \
+            > \
+        , aux::reverse_##name##_impl< \
+              BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
+            , front_inserter< typename clear<P1>::type > \
+            > \
+        >::type \
+{ \
+}; \
+\
+template< \
+      BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \
+    > \
+struct name \
+{ \
+    typedef typename eval_if< \
+          is_na<BOOST_PP_CAT(P, arity)> \
+        , def_##name##_impl<BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P)> \
+        , aux::name##_impl<BOOST_MPL_PP_PARAMS(arity, P)> \
+        >::type type; \
+}; \
+\
+template< \
+      BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \
+    > \
+struct def_reverse_##name##_impl \
+    : if_< has_push_back<P1> \
+        , aux::reverse_##name##_impl< \
+              BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
+            , back_inserter< typename clear<P1>::type > \
+            > \
+        , aux::name##_impl< \
+              BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
+            , front_inserter< typename clear<P1>::type > \
+            > \
+        >::type \
+{ \
+}; \
+template< \
+      BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \
+    > \
+struct reverse_##name \
+{ \
+    typedef typename eval_if< \
+          is_na<BOOST_PP_CAT(P, arity)> \
+        , def_reverse_##name##_impl<BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P)> \
+        , aux::reverse_##name##_impl<BOOST_MPL_PP_PARAMS(arity, P)> \
+        >::type type; \
+}; \
+BOOST_MPL_AUX_NA_SPEC(arity, name) \
+BOOST_MPL_AUX_NA_SPEC(arity, reverse_##name) \
+/**/
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif // BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/integral_wrapper.hpp b/ext/boost/mpl/aux_/integral_wrapper.hpp
index 963a738..d36e7cb 100644
--- a/ext/boost/mpl/aux_/integral_wrapper.hpp
+++ b/ext/boost/mpl/aux_/integral_wrapper.hpp
@@ -8,7 +8,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: integral_wrapper.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
diff --git a/ext/boost/mpl/aux_/is_msvc_eti_arg.hpp b/ext/boost/mpl/aux_/is_msvc_eti_arg.hpp
new file mode 100644
index 0000000..917b57c
--- /dev/null
+++ b/ext/boost/mpl/aux_/is_msvc_eti_arg.hpp
@@ -0,0 +1,64 @@
+
+#ifndef BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED
+#define BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: is_msvc_eti_arg.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/yes_no.hpp>
+#include <boost/mpl/aux_/config/eti.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
+
+#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
+
+template< typename T >
+struct is_msvc_eti_arg
+{ 
+    BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+#else // BOOST_MPL_CFG_MSVC_60_ETI_BUG
+
+struct eti_int_convertible
+{
+    eti_int_convertible(int);
+};
+
+template< typename T >
+struct is_msvc_eti_arg
+{ 
+    static no_tag test(...);
+    static yes_tag test(eti_int_convertible);
+    static T& get();
+
+    BOOST_STATIC_CONSTANT(bool, value = 
+          sizeof(test(get())) == sizeof(yes_tag)
+        );
+};
+
+#endif
+
+template<>
+struct is_msvc_eti_arg<int>
+{ 
+    BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+#endif // BOOST_MPL_CFG_MSVC_ETI_BUG
+
+}}}
+
+#endif // BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/iter_apply.hpp b/ext/boost/mpl/aux_/iter_apply.hpp
new file mode 100644
index 0000000..fee4d81
--- /dev/null
+++ b/ext/boost/mpl/aux_/iter_apply.hpp
@@ -0,0 +1,47 @@
+
+#ifndef BOOST_MPL_ITER_APPLY_HPP_INCLUDED
+#define BOOST_MPL_ITER_APPLY_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: iter_apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/deref.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+template<
+      typename F
+    , typename Iterator
+    >
+struct iter_apply1
+    : apply1< F,typename deref<Iterator>::type >
+{
+};
+
+template<
+      typename F
+    , typename Iterator1
+    , typename Iterator2
+    >
+struct iter_apply2
+    : apply2<
+          F
+        , typename deref<Iterator1>::type
+        , typename deref<Iterator2>::type
+        >
+{
+};
+
+}}}
+
+#endif // BOOST_MPL_ITER_APPLY_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/iter_fold_if_impl.hpp b/ext/boost/mpl/aux_/iter_fold_if_impl.hpp
new file mode 100644
index 0000000..ad80250
--- /dev/null
+++ b/ext/boost/mpl/aux_/iter_fold_if_impl.hpp
@@ -0,0 +1,210 @@
+
+#ifndef BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright David Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: iter_fold_if_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/identity.hpp>
+#   include <boost/mpl/next.hpp>
+#   include <boost/mpl/if.hpp>
+#   include <boost/mpl/apply.hpp>
+#   include <boost/mpl/aux_/value_wknd.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER iter_fold_if_impl.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/limits/unrolling.hpp>
+#   include <boost/preprocessor/arithmetic/sub.hpp>
+#   include <boost/preprocessor/repeat.hpp>
+#   include <boost/preprocessor/inc.hpp>
+#   include <boost/preprocessor/dec.hpp>
+#   include <boost/preprocessor/cat.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename Iterator, typename State >
+struct iter_fold_if_null_step
+{
+    typedef State state;
+    typedef Iterator iterator;
+};
+
+template< bool >
+struct iter_fold_if_step_impl
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef typename apply2<StateOp,State,Iterator>::type state;
+        typedef typename IteratorOp::type iterator;
+    };
+};
+
+template<>
+struct iter_fold_if_step_impl<false>
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef State state;
+        typedef Iterator iterator;
+    };
+};
+
+// agurt, 25/jun/02: MSVC 6.5 workaround, had to get rid of inheritance 
+// here and in 'iter_fold_if_backward_step', because sometimes it interfered 
+// with the "early template instantiation bug" in _really_ ugly ways
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_forward_step
+{
+    typedef typename apply2<Predicate,State,Iterator>::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,ForwardOp,mpl::next<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename BackwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_backward_step
+{
+    typedef typename apply2<Predicate,State,Iterator>::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+
+// local macros, #undef-ined at the end of the header
+
+#   define AUX_ITER_FOLD_FORWARD_STEP(unused, i, unused2) \
+    typedef iter_fold_if_forward_step< \
+          typename BOOST_PP_CAT(forward_step,i)::iterator \
+        , typename BOOST_PP_CAT(forward_step,i)::state \
+        , ForwardOp \
+        , ForwardPredicate \
+        > BOOST_PP_CAT(forward_step, BOOST_PP_INC(i)); \
+    /**/
+
+#   define AUX_ITER_FOLD_BACKWARD_STEP_FUNC(i) \
+    typedef iter_fold_if_backward_step< \
+          typename BOOST_PP_CAT(forward_step,BOOST_PP_DEC(i))::iterator \
+        , typename BOOST_PP_CAT(backward_step,i)::state \
+        , BackwardOp \
+        , BackwardPredicate \
+        > BOOST_PP_CAT(backward_step,BOOST_PP_DEC(i)); \
+    /**/
+
+#   define AUX_ITER_FOLD_BACKWARD_STEP(unused, i, unused2) \
+    AUX_ITER_FOLD_BACKWARD_STEP_FUNC( \
+        BOOST_PP_SUB_D(1,BOOST_MPL_LIMIT_UNROLLING,i) \
+        ) \
+    /**/
+
+#   define AUX_LAST_FORWARD_STEP \
+    BOOST_PP_CAT(forward_step, BOOST_MPL_LIMIT_UNROLLING) \
+    /**/
+
+#   define AUX_LAST_BACKWARD_STEP \
+    BOOST_PP_CAT(backward_step, BOOST_MPL_LIMIT_UNROLLING) \
+    /**/
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename ForwardPredicate
+    , typename BackwardOp
+    , typename BackwardPredicate
+    >
+struct iter_fold_if_impl
+{
+ private:
+    typedef iter_fold_if_null_step<Iterator,State> forward_step0;
+    BOOST_PP_REPEAT(
+          BOOST_MPL_LIMIT_UNROLLING
+        , AUX_ITER_FOLD_FORWARD_STEP
+        , unused
+        )
+    
+    typedef typename if_<
+          typename AUX_LAST_FORWARD_STEP::not_last
+        , iter_fold_if_impl<
+              typename AUX_LAST_FORWARD_STEP::iterator
+            , typename AUX_LAST_FORWARD_STEP::state
+            , ForwardOp
+            , ForwardPredicate
+            , BackwardOp
+            , BackwardPredicate
+            >
+        , iter_fold_if_null_step<
+              typename AUX_LAST_FORWARD_STEP::iterator
+            , typename AUX_LAST_FORWARD_STEP::state
+            >
+        >::type AUX_LAST_BACKWARD_STEP;
+
+    BOOST_PP_REPEAT(
+          BOOST_MPL_LIMIT_UNROLLING
+        , AUX_ITER_FOLD_BACKWARD_STEP
+        , unused
+        )
+
+ public:
+    typedef typename backward_step0::state state;
+    typedef typename AUX_LAST_BACKWARD_STEP::iterator iterator;
+};
+
+#   undef AUX_LAST_BACKWARD_STEP
+#   undef AUX_LAST_FORWARD_STEP
+#   undef AUX_ITER_FOLD_BACKWARD_STEP
+#   undef AUX_ITER_FOLD_BACKWARD_STEP_FUNC
+#   undef AUX_ITER_FOLD_FORWARD_STEP
+
+}}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/iter_fold_impl.hpp b/ext/boost/mpl/aux_/iter_fold_impl.hpp
new file mode 100644
index 0000000..7bc5720
--- /dev/null
+++ b/ext/boost/mpl/aux_/iter_fold_impl.hpp
@@ -0,0 +1,42 @@
+
+#ifndef BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: iter_fold_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/next_prior.hpp>
+#   include <boost/mpl/apply.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#       include <boost/mpl/if.hpp>
+#       include <boost/type_traits/is_same.hpp>
+#   endif
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER iter_fold_impl.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   define AUX778076_FOLD_IMPL_OP(iter) iter
+#   define AUX778076_FOLD_IMPL_NAME_PREFIX iter_fold
+#   include <boost/mpl/aux_/fold_impl_body.hpp>
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/iter_push_front.hpp b/ext/boost/mpl/aux_/iter_push_front.hpp
new file mode 100644
index 0000000..3a01b03
--- /dev/null
+++ b/ext/boost/mpl/aux_/iter_push_front.hpp
@@ -0,0 +1,36 @@
+
+#ifndef BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED
+#define BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: iter_push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/push_front.hpp>
+#include <boost/mpl/deref.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+template<
+      typename Sequence
+    , typename Iterator
+    >
+struct iter_push_front
+{
+    typedef typename push_front<
+          Sequence
+        , typename deref<Iterator>::type
+        >::type type;
+};
+
+}}}
+
+#endif // BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/joint_iter.hpp b/ext/boost/mpl/aux_/joint_iter.hpp
new file mode 100644
index 0000000..e78028d
--- /dev/null
+++ b/ext/boost/mpl/aux_/joint_iter.hpp
@@ -0,0 +1,120 @@
+
+#ifndef BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED
+#define BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: joint_iter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/iterator_tags.hpp>
+#include <boost/mpl/aux_/lambda_spec.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#   include <boost/type_traits/is_same.hpp>
+#endif
+
+namespace boost { namespace mpl {
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template<
+      typename Iterator1
+    , typename LastIterator1
+    , typename Iterator2
+    >
+struct joint_iter
+{
+    typedef Iterator1 base;
+    typedef forward_iterator_tag category;
+};
+
+template<
+      typename LastIterator1
+    , typename Iterator2
+    >
+struct joint_iter<LastIterator1,LastIterator1,Iterator2>
+{
+    typedef Iterator2 base;
+    typedef forward_iterator_tag category;
+};
+
+
+template< typename I1, typename L1, typename I2 >
+struct deref< joint_iter<I1,L1,I2> >
+{
+    typedef typename joint_iter<I1,L1,I2>::base base_;
+    typedef typename deref<base_>::type type;
+};
+
+template< typename I1, typename L1, typename I2 >
+struct next< joint_iter<I1,L1,I2> >
+{
+    typedef joint_iter< typename mpl::next<I1>::type,L1,I2 > type;
+};
+
+template< typename L1, typename I2 >
+struct next< joint_iter<L1,L1,I2> >
+{
+    typedef joint_iter< L1,L1,typename mpl::next<I2>::type > type;
+};
+
+#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+template<
+      typename Iterator1
+    , typename LastIterator1
+    , typename Iterator2
+    >
+struct joint_iter;
+
+template< bool > struct joint_iter_impl
+{
+    template< typename I1, typename L1, typename I2 > struct result_
+    {
+        typedef I1 base;
+        typedef forward_iterator_tag category;
+        typedef joint_iter< typename mpl::next<I1>::type,L1,I2 > next;
+        typedef typename deref<I1>::type type;
+    };
+};
+
+template<> struct joint_iter_impl<true>
+{
+    template< typename I1, typename L1, typename I2 > struct result_
+    {
+        typedef I2 base;
+        typedef forward_iterator_tag category;
+        typedef joint_iter< L1,L1,typename mpl::next<I2>::type > next;
+        typedef typename deref<I2>::type type;
+    };
+};
+
+template<
+      typename Iterator1
+    , typename LastIterator1
+    , typename Iterator2
+    >
+struct joint_iter
+    : joint_iter_impl< is_same<Iterator1,LastIterator1>::value >
+        ::template result_<Iterator1,LastIterator1,Iterator2>
+{
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, joint_iter)
+
+}}
+
+#endif // BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/lambda_arity_param.hpp b/ext/boost/mpl/aux_/lambda_arity_param.hpp
index 720918e..5418f2c 100644
--- a/ext/boost/mpl/aux_/lambda_arity_param.hpp
+++ b/ext/boost/mpl/aux_/lambda_arity_param.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: lambda_arity_param.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/ttp.hpp>
diff --git a/ext/boost/mpl/aux_/lambda_no_ctps.hpp b/ext/boost/mpl/aux_/lambda_no_ctps.hpp
new file mode 100644
index 0000000..1c383b4
--- /dev/null
+++ b/ext/boost/mpl/aux_/lambda_no_ctps.hpp
@@ -0,0 +1,193 @@
+
+#if !defined(BOOST_PP_IS_ITERATING)
+
+///// header body
+
+#ifndef BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
+#define BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: lambda_no_ctps.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/lambda_fwd.hpp>
+#   include <boost/mpl/bind_fwd.hpp>
+#   include <boost/mpl/protect.hpp>
+#   include <boost/mpl/is_placeholder.hpp>
+#   include <boost/mpl/if.hpp>
+#   include <boost/mpl/identity.hpp>
+#   include <boost/mpl/bool.hpp>
+#   include <boost/mpl/aux_/na_spec.hpp>
+#   include <boost/mpl/aux_/lambda_support.hpp>
+#   include <boost/mpl/aux_/template_arity.hpp>
+#   include <boost/mpl/aux_/value_wknd.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if    !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER lambda_no_ctps.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/limits/arity.hpp>
+#   include <boost/mpl/aux_/preprocessor/params.hpp>
+#   include <boost/mpl/aux_/preprocessor/default_params.hpp>
+#   include <boost/mpl/aux_/preprocessor/repeat.hpp>
+#   include <boost/mpl/aux_/preprocessor/enum.hpp>
+#   include <boost/mpl/aux_/config/msvc.hpp>
+#   include <boost/mpl/aux_/config/workaround.hpp>
+
+#   include <boost/preprocessor/comma_if.hpp>
+#   include <boost/preprocessor/iterate.hpp>
+#   include <boost/preprocessor/inc.hpp>
+#   include <boost/preprocessor/cat.hpp>
+
+namespace boost { namespace mpl {
+
+#   define AUX778076_LAMBDA_PARAMS(i_, param) \
+    BOOST_MPL_PP_PARAMS(i_, param) \
+    /**/
+
+namespace aux {
+
+#define n_ BOOST_MPL_LIMIT_METAFUNCTION_ARITY
+template<
+      BOOST_MPL_PP_DEFAULT_PARAMS(n_,bool C,false)
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< BOOST_MPL_PP_ENUM(n_,false) >
+    : false_
+{
+};
+#undef n_
+
+template< typename Arity > struct lambda_impl
+{
+    template< typename T, typename Tag, typename Protect > struct result_
+    {
+        typedef T type;
+        typedef is_placeholder<T> is_le;
+    };
+};
+
+#define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/aux_/lambda_no_ctps.hpp>))
+#include BOOST_PP_ITERATE()
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+    , typename Protect
+    >
+struct lambda
+{
+    /// Metafunction forwarding confuses MSVC 6.x
+    typedef typename aux::template_arity<T>::type arity_;
+    typedef typename aux::lambda_impl<arity_>
+        ::template result_< T,Tag,Protect > l_;
+
+    typedef typename l_::type type;
+    typedef typename l_::is_le is_le;
+    
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect))
+};
+
+BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+#   undef AUX778076_LAMBDA_PARAMS
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
+
+///// iteration, depth == 1
+
+#else
+
+#define i_ BOOST_PP_FRAME_ITERATION(1)
+
+#   define AUX778076_LAMBDA_TYPEDEF(unused, i_, F) \
+    typedef lambda< \
+          typename F::BOOST_PP_CAT(arg,BOOST_PP_INC(i_)) \
+        , Tag \
+        , false_ \
+        > BOOST_PP_CAT(l,BOOST_PP_INC(i_)); \
+    /**/
+
+#   define AUX778076_IS_LE_TYPEDEF(unused, i_, unused2) \
+    typedef typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::is_le \
+        BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)); \
+    /**/
+
+#   define AUX778076_IS_LAMBDA_EXPR(unused, i_, unused2) \
+    BOOST_PP_COMMA_IF(i_) \
+    BOOST_MPL_AUX_MSVC_VALUE_WKND(BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)))::value \
+    /**/
+
+#   define AUX778076_LAMBDA_RESULT(unused, i_, unused2) \
+    , typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::type \
+    /**/
+
+template<> struct lambda_impl< int_<i_> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_TYPEDEF, F)
+        BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LE_TYPEDEF, unused)
+
+        typedef aux::lambda_or<
+              BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LAMBDA_EXPR, unused)
+            > is_le;
+
+        typedef BOOST_PP_CAT(bind,i_)<
+              typename F::rebind
+            BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_RESULT, unused)
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+    
+        typedef typename type_::type type;
+    };
+};
+
+#   undef AUX778076_LAMBDA_RESULT
+#   undef AUX778076_IS_LAMBDA_EXPR
+#   undef AUX778076_IS_LE_TYPEDEF
+#   undef AUX778076_LAMBDA_TYPEDEF
+
+#undef i_
+
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ext/boost/mpl/aux_/lambda_spec.hpp b/ext/boost/mpl/aux_/lambda_spec.hpp
new file mode 100644
index 0000000..52b1dcd
--- /dev/null
+++ b/ext/boost/mpl/aux_/lambda_spec.hpp
@@ -0,0 +1,49 @@
+
+#ifndef BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED
+#define BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2007
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: lambda_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/lambda_fwd.hpp>
+#include <boost/mpl/int_fwd.hpp>
+#include <boost/mpl/aux_/preprocessor/params.hpp>
+#include <boost/mpl/aux_/lambda_arity_param.hpp>
+#include <boost/mpl/aux_/config/lambda.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
+
+#   define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) \
+template< \
+      BOOST_MPL_PP_PARAMS(i, typename T) \
+    , typename Tag \
+    > \
+struct lambda< \
+      name< BOOST_MPL_PP_PARAMS(i, T) > \
+    , Tag \
+    BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<i>) \
+    > \
+{ \
+    typedef false_ is_le; \
+    typedef name< BOOST_MPL_PP_PARAMS(i, T) > result_; \
+    typedef result_ type; \
+}; \
+/**/
+
+#else
+
+#   define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) /**/
+
+#endif
+
+#endif // BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/lambda_support.hpp b/ext/boost/mpl/aux_/lambda_support.hpp
index fa000d8..2d25348 100644
--- a/ext/boost/mpl/aux_/lambda_support.hpp
+++ b/ext/boost/mpl/aux_/lambda_support.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: lambda_support.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/lambda.hpp>
diff --git a/ext/boost/mpl/aux_/largest_int.hpp b/ext/boost/mpl/aux_/largest_int.hpp
new file mode 100644
index 0000000..1b9f1cf
--- /dev/null
+++ b/ext/boost/mpl/aux_/largest_int.hpp
@@ -0,0 +1,63 @@
+
+#ifndef BOOST_MPL_AUX_LARGEST_INT_HPP_INCLUDED
+#define BOOST_MPL_AUX_LARGEST_INT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: largest_int.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/aux_/config/integral.hpp>
+#include <boost/config.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename T > struct integral_rank;
+
+template<> struct integral_rank<bool>           : int_<1> {};
+template<> struct integral_rank<signed char>    : int_<2> {};
+template<> struct integral_rank<char>           : int_<3> {};
+template<> struct integral_rank<unsigned char>  : int_<4> {};
+#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
+template<> struct integral_rank<wchar_t>        : int_<5> {};
+#endif
+template<> struct integral_rank<short>          : int_<6> {};
+template<> struct integral_rank<unsigned short> : int_<7> {};
+template<> struct integral_rank<int>            : int_<8> {};
+template<> struct integral_rank<unsigned int>   : int_<9> {};
+template<> struct integral_rank<long>           : int_<10> {};
+template<> struct integral_rank<unsigned long>  : int_<11> {};
+
+#if defined(BOOST_HAS_LONG_LONG)
+template<> struct integral_rank<long_long_type> : int_<12> {};
+template<> struct integral_rank<ulong_long_type>: int_<13> {};
+#endif
+
+template< typename T1, typename T2 > struct largest_int
+#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
+    : if_c< 
+          ( integral_rank<T1>::value >= integral_rank<T2>::value )
+        , T1
+        , T2
+        >
+{
+#else
+{
+    enum { rank1 = integral_rank<T1>::value };
+    enum { rank2 = integral_rank<T2>::value };
+    typedef typename if_c< (rank1 >= rank2),T1,T2 >::type type;
+#endif
+};
+
+}}}
+
+#endif // BOOST_MPL_AUX_LARGEST_INT_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/logical_op.hpp b/ext/boost/mpl/aux_/logical_op.hpp
new file mode 100644
index 0000000..d964049
--- /dev/null
+++ b/ext/boost/mpl/aux_/logical_op.hpp
@@ -0,0 +1,165 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: logical_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/bool.hpp>
+#   include <boost/mpl/aux_/nested_type_wknd.hpp>
+#   include <boost/mpl/aux_/na_spec.hpp>
+#   include <boost/mpl/aux_/lambda_support.hpp>
+#endif
+
+#include <boost/mpl/limits/arity.hpp>
+#include <boost/mpl/aux_/preprocessor/params.hpp>
+#include <boost/mpl/aux_/preprocessor/ext_params.hpp>
+#include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>
+#include <boost/mpl/aux_/preprocessor/enum.hpp>
+#include <boost/mpl/aux_/preprocessor/sub.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/inc.hpp>
+#include <boost/preprocessor/cat.hpp>
+
+namespace boost { namespace mpl {
+
+#   define AUX778076_PARAMS(param, sub) \
+    BOOST_MPL_PP_PARAMS( \
+          BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY, sub) \
+        , param \
+        ) \
+    /**/
+
+#   define AUX778076_SHIFTED_PARAMS(param, sub) \
+    BOOST_MPL_PP_EXT_PARAMS( \
+          2, BOOST_MPL_PP_SUB(BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY), sub) \
+        , param \
+        ) \
+    /**/
+
+#   define AUX778076_SPEC_PARAMS(param) \
+    BOOST_MPL_PP_ENUM( \
+          BOOST_PP_DEC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \
+        , param \
+        ) \
+    /**/
+
+namespace aux {
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< bool C_, AUX778076_PARAMS(typename T, 1) >
+struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)
+    : BOOST_PP_CAT(AUX778076_OP_VALUE1,_)
+{
+};
+
+template< AUX778076_PARAMS(typename T, 1) >
+struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)< AUX778076_OP_VALUE2,AUX778076_PARAMS(T, 1) >
+    : BOOST_PP_CAT(AUX778076_OP_NAME,impl)<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , AUX778076_SHIFTED_PARAMS(T, 1)
+        , BOOST_PP_CAT(AUX778076_OP_VALUE2,_)
+        >
+{
+};
+
+template<>
+struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<
+          AUX778076_OP_VALUE2
+        , AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_))
+        >
+    : BOOST_PP_CAT(AUX778076_OP_VALUE2,_)
+{
+};
+
+#else
+
+template< bool C_ > struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)
+{
+    template< AUX778076_PARAMS(typename T, 1) > struct result_
+        : BOOST_PP_CAT(AUX778076_OP_VALUE1,_)
+    {
+    };
+};
+
+template<> struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<AUX778076_OP_VALUE2>
+{
+    template< AUX778076_PARAMS(typename T, 1) > struct result_
+        : BOOST_PP_CAT(AUX778076_OP_NAME,impl)< 
+              BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+            >::template result_< AUX778076_SHIFTED_PARAMS(T,1),BOOST_PP_CAT(AUX778076_OP_VALUE2,_) >
+    {
+    };
+
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
+    template<> struct result_<AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_))>
+        : BOOST_PP_CAT(AUX778076_OP_VALUE2,_)
+    {
+    };
+};
+#else
+};
+
+template<>
+struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<AUX778076_OP_VALUE2>
+    ::result_< AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) >
+        : BOOST_PP_CAT(AUX778076_OP_VALUE2,_)
+{
+};
+#endif // BOOST_MSVC == 1300
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename T, BOOST_PP_CAT(AUX778076_OP_VALUE2,_))
+    >
+struct AUX778076_OP_NAME
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+    : aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , AUX778076_SHIFTED_PARAMS(T,0)
+        >
+#else
+    : aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)< 
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        >::template result_< AUX778076_SHIFTED_PARAMS(T,0) >
+#endif
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          BOOST_MPL_LIMIT_METAFUNCTION_ARITY
+        , AUX778076_OP_NAME
+        , (AUX778076_PARAMS(T, 0))
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , BOOST_MPL_LIMIT_METAFUNCTION_ARITY
+    , AUX778076_OP_NAME
+    )
+
+}}
+
+#undef AUX778076_SPEC_PARAMS
+#undef AUX778076_SHIFTED_PARAMS
+#undef AUX778076_PARAMS
+#undef AUX778076_OP_NAME
+#undef AUX778076_OP_VALUE1
+#undef AUX778076_OP_VALUE2
diff --git a/ext/boost/mpl/aux_/msvc_dtw.hpp b/ext/boost/mpl/aux_/msvc_dtw.hpp
new file mode 100644
index 0000000..b8953f5
--- /dev/null
+++ b/ext/boost/mpl/aux_/msvc_dtw.hpp
@@ -0,0 +1,68 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: msvc_dtw.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
+
+#include <boost/mpl/aux_/preprocessor/params.hpp>
+
+// local macros, #undef-ined at the end of the header
+#define AUX778076_DTW_PARAMS(param) \
+    BOOST_MPL_PP_PARAMS(AUX778076_MSVC_DTW_ARITY, param) \
+/**/
+
+#define AUX778076_DTW_ORIGINAL_NAME \
+    AUX778076_MSVC_DTW_ORIGINAL_NAME \
+/**/
+
+// warning: not a well-formed C++
+// workaround for MSVC 6.5's "dependent template typedef bug"
+
+template< typename F>
+struct AUX778076_MSVC_DTW_NAME
+{
+    template< bool > struct f_ : F {};
+    template<> struct f_<true>
+    {
+#if AUX778076_MSVC_DTW_ARITY > 0
+        template< AUX778076_DTW_PARAMS(typename P) > struct AUX778076_DTW_ORIGINAL_NAME
+        {
+            typedef int type;
+        };
+    };
+
+    template< AUX778076_DTW_PARAMS(typename T) > struct result_
+        : f_< aux::msvc_never_true<F>::value >
+            ::template AUX778076_DTW_ORIGINAL_NAME< AUX778076_DTW_PARAMS(T) >
+    {
+    };
+#else
+        template< typename P = int > struct AUX778076_DTW_ORIGINAL_NAME
+        {
+            typedef int type;
+        };
+    };
+
+    template< typename T = int > struct result_
+        : f_< aux::msvc_never_true<F>::value >
+            ::template AUX778076_DTW_ORIGINAL_NAME<>
+    {
+    };
+#endif
+};
+
+#undef AUX778076_DTW_ORIGINAL_NAME
+#undef AUX778076_DTW_PARAMS
+
+#undef AUX778076_MSVC_DTW_NAME
+#undef AUX778076_MSVC_DTW_ORIGINAL_NAME
+#undef AUX778076_MSVC_DTW_ARITY
diff --git a/ext/boost/mpl/aux_/msvc_eti_base.hpp b/ext/boost/mpl/aux_/msvc_eti_base.hpp
new file mode 100644
index 0000000..61bd38a
--- /dev/null
+++ b/ext/boost/mpl/aux_/msvc_eti_base.hpp
@@ -0,0 +1,77 @@
+
+#ifndef BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED
+#define BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: msvc_eti_base.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/is_msvc_eti_arg.hpp>
+#include <boost/mpl/aux_/config/eti.hpp>
+#include <boost/mpl/aux_/config/gcc.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+#if defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG)
+
+template< bool > struct msvc_eti_base_impl
+{
+    template< typename T > struct result_
+        : T
+    {
+        typedef T type;
+    };
+};
+
+template<> struct msvc_eti_base_impl<true>
+{
+    template< typename T > struct result_
+    {
+        typedef result_ type;
+        typedef result_ first;
+        typedef result_ second;
+        typedef result_ tag;
+        enum { value = 0 };
+    };
+};
+
+template< typename T > struct msvc_eti_base
+    : msvc_eti_base_impl< is_msvc_eti_arg<T>::value >
+        ::template result_<T>
+{
+};
+
+#else // !BOOST_MPL_CFG_MSVC_70_ETI_BUG
+
+template< typename T > struct msvc_eti_base
+    : T
+{
+#if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304))
+    msvc_eti_base();
+#endif
+    typedef T type;
+};
+
+#endif 
+
+template<> struct msvc_eti_base<int>
+{
+    typedef msvc_eti_base type;
+    typedef msvc_eti_base first;
+    typedef msvc_eti_base second;
+    typedef msvc_eti_base tag;
+    enum { value = 0 };
+};
+
+}}}
+
+#endif // BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/msvc_is_class.hpp b/ext/boost/mpl/aux_/msvc_is_class.hpp
new file mode 100644
index 0000000..54a2c57
--- /dev/null
+++ b/ext/boost/mpl/aux_/msvc_is_class.hpp
@@ -0,0 +1,58 @@
+
+#ifndef BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED
+#define BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: msvc_is_class.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/aux_/type_wrapper.hpp>
+#include <boost/mpl/aux_/yes_no.hpp>
+
+#include <boost/type_traits/is_reference.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename T > struct is_class_helper
+{
+    typedef int (T::* type)();
+};
+
+// MSVC 6.x-specific lightweight 'is_class' implementation; 
+// Distinguishing feature: does not instantiate the type being tested.
+template< typename T >
+struct msvc_is_class_impl
+{
+    template< typename U>
+    static yes_tag  test(type_wrapper<U>*, /*typename*/ is_class_helper<U>::type = 0);
+    static no_tag   test(void const volatile*, ...);
+
+    enum { value = sizeof(test((type_wrapper<T>*)0)) == sizeof(yes_tag) };
+    typedef bool_<value> type;
+};
+
+// agurt, 17/sep/04: have to check for 'is_reference' upfront to avoid ICEs in
+// complex metaprograms
+template< typename T >
+struct msvc_is_class
+    : if_<
+          is_reference<T>
+        , false_
+        , msvc_is_class_impl<T>
+        >::type
+{
+};
+
+}}}
+
+#endif // BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/msvc_never_true.hpp b/ext/boost/mpl/aux_/msvc_never_true.hpp
index 93da72e..ca35adc 100644
--- a/ext/boost/mpl/aux_/msvc_never_true.hpp
+++ b/ext/boost/mpl/aux_/msvc_never_true.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: msvc_never_true.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/msvc.hpp>
diff --git a/ext/boost/mpl/aux_/msvc_type.hpp b/ext/boost/mpl/aux_/msvc_type.hpp
new file mode 100644
index 0000000..643fd83
--- /dev/null
+++ b/ext/boost/mpl/aux_/msvc_type.hpp
@@ -0,0 +1,62 @@
+
+#ifndef BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED
+#define BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: msvc_type.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/eti.hpp>
+#include <boost/mpl/aux_/is_msvc_eti_arg.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+#if defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG)
+
+template< bool > struct msvc_type_impl
+{
+    template< typename T > struct result_
+    {
+        typedef typename T::type type;
+    };
+};
+
+template<> struct msvc_type_impl<true>
+{
+    template< typename T > struct result_
+    {
+        typedef result_ type;
+    };
+};
+
+template< typename T > struct msvc_type
+    : msvc_type_impl< is_msvc_eti_arg<T>::value >
+        ::template result_<T>
+{
+};
+
+#else // BOOST_MPL_CFG_MSVC_70_ETI_BUG
+
+template< typename T > struct msvc_type 
+{
+    typedef typename T::type type;
+};
+
+template<> struct msvc_type<int>
+{
+    typedef int type;
+};
+
+#endif
+
+}}}
+
+#endif // BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/na.hpp b/ext/boost/mpl/aux_/na.hpp
index 314250c..b75fcdd 100644
--- a/ext/boost/mpl/aux_/na.hpp
+++ b/ext/boost/mpl/aux_/na.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: na.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/bool.hpp>
diff --git a/ext/boost/mpl/aux_/na_assert.hpp b/ext/boost/mpl/aux_/na_assert.hpp
index ece7f4c..df88ba3 100644
--- a/ext/boost/mpl/aux_/na_assert.hpp
+++ b/ext/boost/mpl/aux_/na_assert.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: na_assert.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/na.hpp>
diff --git a/ext/boost/mpl/aux_/na_fwd.hpp b/ext/boost/mpl/aux_/na_fwd.hpp
index dd64fc1..2409fc8 100644
--- a/ext/boost/mpl/aux_/na_fwd.hpp
+++ b/ext/boost/mpl/aux_/na_fwd.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: na_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/adl_barrier.hpp>
diff --git a/ext/boost/mpl/aux_/na_spec.hpp b/ext/boost/mpl/aux_/na_spec.hpp
index 92b2e5a..6cd7721 100644
--- a/ext/boost/mpl/aux_/na_spec.hpp
+++ b/ext/boost/mpl/aux_/na_spec.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: na_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
diff --git a/ext/boost/mpl/aux_/nested_type_wknd.hpp b/ext/boost/mpl/aux_/nested_type_wknd.hpp
index cee3831..cc46286 100644
--- a/ext/boost/mpl/aux_/nested_type_wknd.hpp
+++ b/ext/boost/mpl/aux_/nested_type_wknd.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: nested_type_wknd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/gcc.hpp>
diff --git a/ext/boost/mpl/aux_/nttp_decl.hpp b/ext/boost/mpl/aux_/nttp_decl.hpp
index 0fa254d..65e2929 100644
--- a/ext/boost/mpl/aux_/nttp_decl.hpp
+++ b/ext/boost/mpl/aux_/nttp_decl.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: nttp_decl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/nttp.hpp>
diff --git a/ext/boost/mpl/aux_/numeric_cast_utils.hpp b/ext/boost/mpl/aux_/numeric_cast_utils.hpp
new file mode 100644
index 0000000..11f04ed
--- /dev/null
+++ b/ext/boost/mpl/aux_/numeric_cast_utils.hpp
@@ -0,0 +1,77 @@
+
+#ifndef BOOST_MPL_AUX_NUMERIC_CAST_HPP_INCLUDED
+#define BOOST_MPL_AUX_NUMERIC_CAST_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: numeric_cast_utils.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/numeric_cast.hpp>
+#include <boost/mpl/apply_wrap.hpp>
+#include <boost/mpl/aux_/config/forwarding.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+template<
+      typename F
+    , typename Tag1
+    , typename Tag2
+    >
+struct cast1st_impl
+{
+    template< typename N1, typename N2 > struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
+        : apply_wrap2< 
+              F
+            , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST<Tag1,Tag2>,N1 >::type
+            , N2
+            >
+    {
+#else
+    {
+    typedef typename apply_wrap2< 
+              F
+            , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST<Tag1,Tag2>,N1 >::type
+            , N2
+            >::type type;
+#endif
+    };
+};
+
+template<
+      typename F
+    , typename Tag1
+    , typename Tag2
+    >
+struct cast2nd_impl
+{
+    template< typename N1, typename N2 > struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
+        : apply_wrap2< 
+              F
+            , N1
+            , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST<Tag2,Tag1>,N2 >::type
+            >
+    {
+#else
+    {
+        typedef typename apply_wrap2< 
+              F
+            , N1
+            , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST<Tag2,Tag1>,N2 >::type
+            >::type type;
+#endif
+    };
+};
+
+}}}
+
+#endif // BOOST_MPL_AUX_NUMERIC_CAST_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/numeric_op.hpp b/ext/boost/mpl/aux_/numeric_op.hpp
new file mode 100644
index 0000000..896935c
--- /dev/null
+++ b/ext/boost/mpl/aux_/numeric_op.hpp
@@ -0,0 +1,315 @@
+
+#if !defined(BOOST_PP_IS_ITERATING)
+
+///// header body
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: numeric_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/numeric_cast.hpp>
+#   include <boost/mpl/apply_wrap.hpp>
+#   include <boost/mpl/if.hpp>
+#   include <boost/mpl/tag.hpp>
+#   include <boost/mpl/aux_/numeric_cast_utils.hpp>
+#   include <boost/mpl/aux_/na.hpp>
+#   include <boost/mpl/aux_/na_spec.hpp>
+#   include <boost/mpl/aux_/lambda_support.hpp>
+#   include <boost/mpl/aux_/msvc_eti_base.hpp>
+#   include <boost/mpl/aux_/value_wknd.hpp>
+#   include <boost/mpl/aux_/config/eti.hpp>
+#   include <boost/mpl/aux_/nttp_decl.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/static_constant.hpp>
+
+#if defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    || defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   include <boost/mpl/limits/arity.hpp>
+#   include <boost/mpl/aux_/preprocessor/partial_spec_params.hpp>
+#   include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>
+#   include <boost/mpl/aux_/preprocessor/repeat.hpp>
+#   include <boost/mpl/aux_/preprocessor/ext_params.hpp>
+#   include <boost/mpl/aux_/preprocessor/params.hpp>
+#   include <boost/mpl/aux_/preprocessor/enum.hpp>
+#   include <boost/mpl/aux_/preprocessor/add.hpp>
+#   include <boost/mpl/aux_/preprocessor/sub.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   include <boost/mpl/aux_/config/eti.hpp>
+#   include <boost/mpl/aux_/config/msvc.hpp>
+#   include <boost/mpl/aux_/config/workaround.hpp>
+
+#   include <boost/preprocessor/dec.hpp>
+#   include <boost/preprocessor/inc.hpp>
+#   include <boost/preprocessor/iterate.hpp>
+#   include <boost/preprocessor/cat.hpp>
+
+
+#if !defined(AUX778076_OP_ARITY)
+#   define AUX778076_OP_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY
+#endif
+
+#if !defined(AUX778076_OP_IMPL_NAME)
+#   define AUX778076_OP_IMPL_NAME BOOST_PP_CAT(AUX778076_OP_PREFIX,_impl)
+#endif
+
+#if !defined(AUX778076_OP_TAG_NAME)
+#   define AUX778076_OP_TAG_NAME BOOST_PP_CAT(AUX778076_OP_PREFIX,_tag)
+#endif
+
+namespace boost { namespace mpl {
+
+template< 
+      typename Tag1
+    , typename Tag2
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value 
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value 
+    >
+struct AUX778076_OP_IMPL_NAME
+    : if_c<
+          ( tag1_ > tag2_ )
+#else
+    >
+struct AUX778076_OP_IMPL_NAME
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+#endif
+        , aux::cast2nd_impl< AUX778076_OP_IMPL_NAME<Tag1,Tag1>,Tag1,Tag2 >
+        , aux::cast1st_impl< AUX778076_OP_IMPL_NAME<Tag2,Tag2>,Tag1,Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct AUX778076_OP_IMPL_NAME<na,na>
+{
+    template< typename U1, typename U2 > struct apply 
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value = 0);
+    };
+};
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+template< typename Tag > struct AUX778076_OP_IMPL_NAME<na,Tag>
+{
+    template< typename U1, typename U2 > struct apply 
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value = 0);
+    };
+};
+
+template< typename Tag > struct AUX778076_OP_IMPL_NAME<Tag,na>
+{
+    template< typename U1, typename U2 > struct apply 
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value = 0);
+    };
+};
+#else
+template<> struct AUX778076_OP_IMPL_NAME<na,integral_c_tag>
+{
+    template< typename U1, typename U2 > struct apply 
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value = 0);
+    };
+};
+
+template<> struct AUX778076_OP_IMPL_NAME<integral_c_tag,na>
+{
+    template< typename U1, typename U2 > struct apply 
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value = 0);
+    };
+};
+#endif
+
+
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+    && BOOST_WORKAROUND(BOOST_MSVC, >= 1300)
+template< typename T > struct AUX778076_OP_TAG_NAME
+    : tag<T,na>
+{
+};
+#else
+template< typename T > struct AUX778076_OP_TAG_NAME
+{
+    typedef typename T::tag type;
+};
+#endif
+
+
+#if AUX778076_OP_ARITY != 2
+
+#   if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+#   define AUX778076_OP_RIGHT_OPERAND(unused, i, N) , BOOST_PP_CAT(N, BOOST_MPL_PP_ADD(i, 2))>
+#   define AUX778076_OP_N_CALLS(i, N) \
+    BOOST_MPL_PP_REPEAT( BOOST_PP_DEC(i), BOOST_MPL_PP_REPEAT_IDENTITY_FUNC, AUX778076_OP_NAME< ) \
+    N1 BOOST_MPL_PP_REPEAT( BOOST_MPL_PP_SUB(i, 1), AUX778076_OP_RIGHT_OPERAND, N ) \
+/**/
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename N, na)
+    >
+struct AUX778076_OP_NAME
+    : AUX778076_OP_N_CALLS(AUX778076_OP_ARITY, N)
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          AUX778076_OP_ARITY
+        , AUX778076_OP_NAME
+        , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) )
+        )
+};
+
+#define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,( BOOST_PP_DEC(AUX778076_OP_ARITY), 2, <boost/mpl/aux_/numeric_op.hpp> ))
+#include BOOST_PP_ITERATE()
+
+#   undef AUX778076_OP_N_CALLS
+#   undef AUX778076_OP_RIGHT_OPERAND
+
+#   else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+/// forward declaration
+template< 
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct BOOST_PP_CAT(AUX778076_OP_NAME,2);
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename N, na)
+    >
+struct AUX778076_OP_NAME
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
+    : aux::msvc_eti_base< typename if_<
+#else
+    : if_<
+#endif
+          is_na<N3>
+        , BOOST_PP_CAT(AUX778076_OP_NAME,2)<N1,N2>
+        , AUX778076_OP_NAME<
+              BOOST_PP_CAT(AUX778076_OP_NAME,2)<N1,N2>
+            , BOOST_MPL_PP_EXT_PARAMS(3, BOOST_PP_INC(AUX778076_OP_ARITY), N)
+            >
+        >::type
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
+    >
+#endif
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          AUX778076_OP_ARITY
+        , AUX778076_OP_NAME
+        , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) )
+        )
+};
+
+template< 
+      typename N1
+    , typename N2
+    >
+struct BOOST_PP_CAT(AUX778076_OP_NAME,2)
+
+#endif
+
+#else // AUX778076_OP_ARITY == 2
+
+template< 
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct AUX778076_OP_NAME
+
+#endif
+
+#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
+    : AUX778076_OP_IMPL_NAME<
+          typename AUX778076_OP_TAG_NAME<N1>::type
+        , typename AUX778076_OP_TAG_NAME<N2>::type
+        >::template apply<N1,N2>::type
+#else
+    : aux::msvc_eti_base< typename apply_wrap2<
+          AUX778076_OP_IMPL_NAME<
+              typename AUX778076_OP_TAG_NAME<N1>::type
+            , typename AUX778076_OP_TAG_NAME<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+#endif
+{
+#if AUX778076_OP_ARITY != 2
+
+#   if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          AUX778076_OP_ARITY
+        , AUX778076_OP_NAME
+        , ( BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(2, N, na) )
+        )
+#   else
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, BOOST_PP_CAT(AUX778076_OP_NAME,2), (N1, N2))
+#   endif
+
+#else
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, AUX778076_OP_NAME, (N1, N2))
+#endif
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, AUX778076_OP_ARITY, AUX778076_OP_NAME)
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+///// iteration, depth == 1
+
+// For gcc 4.4 compatability, we must include the
+// BOOST_PP_ITERATION_DEPTH test inside an #else clause.
+#else // BOOST_PP_IS_ITERATING
+#if BOOST_PP_ITERATION_DEPTH() == 1
+
+#   define i_ BOOST_PP_FRAME_ITERATION(1)
+
+template<
+      BOOST_MPL_PP_PARAMS(i_, typename N)
+    >
+struct AUX778076_OP_NAME<BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(i_, N, na)>
+#if i_ != 2
+    : AUX778076_OP_N_CALLS(i_, N)
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          AUX778076_OP_ARITY
+        , AUX778076_OP_NAME
+        , ( BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(i_, N, na) )
+        )
+};
+#endif
+
+#   undef i_
+
+#endif // BOOST_PP_ITERATION_DEPTH()
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ext/boost/mpl/aux_/order_impl.hpp b/ext/boost/mpl/aux_/order_impl.hpp
new file mode 100644
index 0000000..9d8b04c
--- /dev/null
+++ b/ext/boost/mpl/aux_/order_impl.hpp
@@ -0,0 +1,76 @@
+
+#ifndef BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: order_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/order_fwd.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/has_key.hpp>
+#include <boost/mpl/aux_/overload_names.hpp>
+#include <boost/mpl/aux_/static_cast.hpp>
+#include <boost/mpl/aux_/type_wrapper.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+#include <boost/mpl/aux_/config/msvc.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+namespace boost { namespace mpl {
+
+// default implementation; requires 'Seq' to provide corresponding overloads 
+// of BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY
+
+template< typename Seq, typename Key > struct x_order_impl
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
+    || BOOST_WORKAROUND(__EDG_VERSION__, <= 245)
+{
+    BOOST_STATIC_CONSTANT(long, value = 
+          sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY(
+              Seq
+            , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<Key>*, 0)
+            ) )
+        );
+
+    typedef long_<value> type;
+
+#else // ISO98 C++
+    : long_< 
+          sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY(
+              Seq
+            , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<Key>*, 0)
+            ) )
+        >
+{
+#endif
+};
+
+template< typename Tag >
+struct order_impl
+{
+    template< typename Seq, typename Key > struct apply
+        : if_<
+              typename has_key_impl<Tag>::template apply<Seq,Key>
+            , x_order_impl<Seq,Key>
+            , void_
+            >::type
+    {
+    };
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,order_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/overload_names.hpp b/ext/boost/mpl/aux_/overload_names.hpp
new file mode 100644
index 0000000..27e8642
--- /dev/null
+++ b/ext/boost/mpl/aux_/overload_names.hpp
@@ -0,0 +1,48 @@
+
+#ifndef BOOST_MPL_AUX_OVERLOAD_NAMES_HPP_INCLUDED
+#define BOOST_MPL_AUX_OVERLOAD_NAMES_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: overload_names.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/ptr_to_ref.hpp>
+#include <boost/mpl/aux_/config/operators.hpp>
+
+#if defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING)
+
+#   include <boost/mpl/aux_/static_cast.hpp>
+
+#   define BOOST_MPL_AUX_OVERLOAD_VALUE_BY_KEY  operator/
+#   define BOOST_MPL_AUX_OVERLOAD_ITEM_BY_ORDER operator|
+#   define BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY  operator||
+#   define BOOST_MPL_AUX_OVERLOAD_IS_MASKED     operator%
+
+#   define BOOST_MPL_AUX_OVERLOAD_CALL_VALUE_BY_KEY(T, x)   BOOST_MPL_AUX_PTR_TO_REF(T) / x
+#   define BOOST_MPL_AUX_OVERLOAD_CALL_ITEM_BY_ORDER(T, x)  BOOST_MPL_AUX_PTR_TO_REF(T) | x
+#   define BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY(T, x)   BOOST_MPL_AUX_PTR_TO_REF(T) || x
+#   define BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(T, x)      BOOST_MPL_AUX_PTR_TO_REF(T) % x
+
+#else
+
+#   define BOOST_MPL_AUX_OVERLOAD_VALUE_BY_KEY  value_by_key_
+#   define BOOST_MPL_AUX_OVERLOAD_ITEM_BY_ORDER item_by_order_
+#   define BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY  order_by_key_
+#   define BOOST_MPL_AUX_OVERLOAD_IS_MASKED     is_masked_
+
+#   define BOOST_MPL_AUX_OVERLOAD_CALL_VALUE_BY_KEY(T, x)   T::BOOST_MPL_AUX_OVERLOAD_VALUE_BY_KEY( BOOST_MPL_AUX_PTR_TO_REF(T), x )
+#   define BOOST_MPL_AUX_OVERLOAD_CALL_ITEM_BY_ORDER(T, x)  T::BOOST_MPL_AUX_OVERLOAD_ITEM_BY_ORDER( BOOST_MPL_AUX_PTR_TO_REF(T), x )
+#   define BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY(T, x)   T::BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY( BOOST_MPL_AUX_PTR_TO_REF(T), x )
+#   define BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(T, x)      T::BOOST_MPL_AUX_OVERLOAD_IS_MASKED( BOOST_MPL_AUX_PTR_TO_REF(T), x )
+
+#endif
+
+#endif // BOOST_MPL_AUX_OVERLOAD_NAMES_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/partition_op.hpp b/ext/boost/mpl/aux_/partition_op.hpp
new file mode 100644
index 0000000..1844d09
--- /dev/null
+++ b/ext/boost/mpl/aux_/partition_op.hpp
@@ -0,0 +1,58 @@
+
+#ifndef BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED
+#define BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED
+
+// Copyright Eric Friedman 2003
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: partition_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/pair.hpp>
+#include <boost/mpl/aux_/lambda_spec.hpp>
+
+namespace boost { namespace mpl { 
+
+namespace aux {
+
+template< typename Pred, typename In1Op, typename In2Op >
+struct partition_op
+{
+    template< typename State, typename T >
+    struct apply
+    {
+        typedef typename State::first first_;
+        typedef typename State::second second_;
+        typedef typename apply1< Pred,T >::type pred_;
+
+        typedef typename eval_if<
+              pred_
+            , apply2<In1Op,first_,T>
+            , apply2<In2Op,second_,T>
+            >::type result_;
+
+        typedef typename if_<
+              pred_
+            , pair< result_,second_ >
+            , pair< first_,result_ >
+            >::type type;
+    };
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::partition_op)
+
+}}
+
+#endif // BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/pop_back_impl.hpp b/ext/boost/mpl/aux_/pop_back_impl.hpp
new file mode 100644
index 0000000..05613e5
--- /dev/null
+++ b/ext/boost/mpl/aux_/pop_back_impl.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_AUX_POP_BACK_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_POP_BACK_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: pop_back_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/pop_back_fwd.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+
+namespace boost { namespace mpl {
+
+// no default implementation; the definition is needed to make MSVC happy
+
+template< typename Tag >
+struct pop_back_impl
+{
+    template< typename Sequence > struct apply;
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, pop_back_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_POP_BACK_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/pop_front_impl.hpp b/ext/boost/mpl/aux_/pop_front_impl.hpp
new file mode 100644
index 0000000..21a76f3
--- /dev/null
+++ b/ext/boost/mpl/aux_/pop_front_impl.hpp
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: pop_front_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/pop_front_fwd.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+#include <boost/mpl/aux_/config/msvc.hpp>
+
+namespace boost { namespace mpl {
+
+// no default implementation; the definition is needed to make MSVC happy
+
+template< typename Tag >
+struct pop_front_impl
+{
+    template< typename Sequence > struct apply
+    // conservatively placed, but maybe should go outside surrounding
+    // braces.
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) 
+    {
+        typedef int type;
+    }
+#endif
+    ;
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, pop_front_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp
new file mode 100644
index 0000000..5cb50dc
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "advance_backward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_backward;
+template<>
+struct advance_backward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_backward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_backward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_backward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_backward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef typename prior<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_backward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_backward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_backward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp
new file mode 100644
index 0000000..9654ee3
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "advance_forward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_forward;
+template<>
+struct advance_forward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_forward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_forward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_forward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_forward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef typename next<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_forward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_forward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_forward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/and.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/and.hpp
new file mode 100644
index 0000000..f345689
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/and.hpp
@@ -0,0 +1,69 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "and.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C_, typename T1, typename T2, typename T3, typename T4 >
+struct and_impl
+    : false_
+{
+};
+
+template< typename T1, typename T2, typename T3, typename T4 >
+struct and_impl< true,T1,T2,T3,T4 >
+    : and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4
+        , true_
+        >
+{
+};
+
+template<>
+struct and_impl<
+          true
+        , true_, true_, true_, true_
+        >
+    : true_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = true_, typename T4 = true_, typename T5 = true_
+    >
+struct and_
+
+    : aux::and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4, T5
+        >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , and_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , and_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/apply.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/apply.hpp
new file mode 100644
index 0000000..bce7c2c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/apply.hpp
@@ -0,0 +1,169 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "apply.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct apply0
+
+    : apply_wrap0<
+          typename lambda<F>::type
+       
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          1
+        , apply0
+        , (F )
+        )
+};
+
+template<
+      typename F
+    >
+struct apply< F,na,na,na,na,na >
+    : apply0<F>
+{
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply1
+
+    : apply_wrap1<
+          typename lambda<F>::type
+        , T1
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          2
+        , apply1
+        , (F, T1)
+        )
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply< F,T1,na,na,na,na >
+    : apply1< F,T1 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2
+
+    : apply_wrap2<
+          typename lambda<F>::type
+        , T1, T2
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , apply2
+        , (F, T1, T2)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply< F,T1,T2,na,na,na >
+    : apply2< F,T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3
+
+    : apply_wrap3<
+          typename lambda<F>::type
+        , T1, T2, T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , apply3
+        , (F, T1, T2, T3)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply< F,T1,T2,T3,na,na >
+    : apply3< F,T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4
+
+    : apply_wrap4<
+          typename lambda<F>::type
+        , T1, T2, T3, T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , apply4
+        , (F, T1, T2, T3, T4)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply< F,T1,T2,T3,T4,na >
+    : apply4< F,T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5
+
+    : apply_wrap5<
+          typename lambda<F>::type
+        , T1, T2, T3, T4, T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          6
+        , apply5
+        , (F, T1, T2, T3, T4, T5)
+        )
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply
+    : apply5< F,T1,T2,T3,T4,T5 >
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp
new file mode 100644
index 0000000..1ba706f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp
@@ -0,0 +1,52 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "apply_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na
+    >
+struct apply;
+
+template<
+      typename F
+    >
+struct apply0;
+
+template<
+      typename F, typename T1
+    >
+struct apply1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp
new file mode 100644
index 0000000..45b75c7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp
@@ -0,0 +1,461 @@
+
+// Copyright Aleksey Gurtovoy 2000-2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "apply_wrap.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      int N, typename F
+    >
+struct apply_wrap_impl0;
+
+template< typename F, bool F_has_apply >
+struct apply_wrap_impl0_bcb {
+    typedef typename F::template apply<na> type;
+};
+
+template< typename F >
+struct apply_wrap_impl0_bcb< F,true > {
+    typedef typename F::apply type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          0
+        , F
+       
+        >
+{
+    typedef apply_wrap_impl0_bcb< F, aux::has_apply<F>::value >::type type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          1
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          2
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na, na
+
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          3
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na, na, na
+
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          4
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na, na, na, na
+
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          5
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na, na, na, na, na
+
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap0
+    : apply_wrap_impl0<
+          ::boost::mpl::aux::arity< F,0 >::value
+        , F
+       
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1
+    >
+struct apply_wrap_impl1;
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          1
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          2
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        , na
+
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          3
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        , na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          4
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        , na, na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          5
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        , na, na, na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap1
+    : apply_wrap_impl1<
+          ::boost::mpl::aux::arity< F,1 >::value
+        , F
+        , T1
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2<
+          2
+        , F
+        , T1, T2
+        >
+{
+    typedef typename F::template apply<
+          T1, T2
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2<
+          3
+        , F
+        , T1, T2
+        >
+{
+    typedef typename F::template apply<
+          T1, T2
+
+        , na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2<
+          4
+        , F
+        , T1, T2
+        >
+{
+    typedef typename F::template apply<
+          T1, T2
+
+        , na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2<
+          5
+        , F
+        , T1, T2
+        >
+{
+    typedef typename F::template apply<
+          T1, T2
+
+        , na, na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap2
+    : apply_wrap_impl2<
+          ::boost::mpl::aux::arity< F,2 >::value
+        , F
+        , T1, T2
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap_impl3;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap_impl3<
+          3
+        , F
+        , T1, T2, T3
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap_impl3<
+          4
+        , F
+        , T1, T2, T3
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3
+
+        , na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap_impl3<
+          5
+        , F
+        , T1, T2, T3
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3
+
+        , na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap3
+    : apply_wrap_impl3<
+          ::boost::mpl::aux::arity< F,3 >::value
+        , F
+        , T1, T2, T3
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap_impl4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap_impl4<
+          4
+        , F
+        , T1, T2, T3, T4
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3, T4
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap_impl4<
+          5
+        , F
+        , T1, T2, T3, T4
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3, T4
+
+        , na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap4
+    : apply_wrap_impl4<
+          ::boost::mpl::aux::arity< F,4 >::value
+        , F
+        , T1, T2, T3, T4
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply_wrap_impl5;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply_wrap_impl5<
+          5
+        , F
+        , T1, T2, T3, T4, T5
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3, T4, T5
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply_wrap5
+    : apply_wrap_impl5<
+          ::boost::mpl::aux::arity< F,5 >::value
+        , F
+        , T1, T2, T3, T4, T5
+        >::type
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/arg.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/arg.hpp
new file mode 100644
index 0000000..3ac4340
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/arg.hpp
@@ -0,0 +1,117 @@
+
+// Copyright Peter Dimov 2001-2002
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "arg.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+template<> struct arg< -1 >
+{
+    BOOST_STATIC_CONSTANT(int, value  = -1);
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<1>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 1);
+    typedef arg<2> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<2>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 2);
+    typedef arg<3> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+        typedef U2 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<3>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 3);
+    typedef arg<4> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+        typedef U3 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<4>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 4);
+    typedef arg<5> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+        typedef U4 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<5>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 5);
+    typedef arg<6> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+        typedef U5 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg)
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp
new file mode 100644
index 0000000..74b0029
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp
@@ -0,0 +1,300 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "basic_bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+{
+    typedef T type;
+};
+
+template<
+      int N, typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
+{
+    typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind0<F>, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind0<F> f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename U1, typename U2, typename U3
+    , typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind1< F,T1 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind1< F,T1 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename U1, typename U2
+    , typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind2< F,T1,T2 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind2< F,T1,T2 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename U1
+    , typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind3< F,T1,T2,T3 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind4< F,T1,T2,T3,T4 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+        typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
+
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind5< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/bind.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/bind.hpp
new file mode 100644
index 0000000..e769a0c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/bind.hpp
@@ -0,0 +1,397 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+{
+    typedef T type;
+};
+
+template<
+      typename T
+    , typename Arg
+    >
+struct replace_unnamed_arg
+{
+    typedef Arg next;
+    typedef T type;
+};
+
+template<
+      typename Arg
+    >
+struct replace_unnamed_arg< arg< -1 >, Arg >
+{
+    typedef typename Arg::next next;
+    typedef Arg type;
+};
+
+template<
+      int N, typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
+{
+    typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind0<F>, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind0<F> f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename U1, typename U2, typename U3
+    , typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind1< F,T1 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind1< F,T1 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename U1, typename U2
+    , typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind2< F,T1,T2 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind2< F,T1,T2 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename U1
+    , typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind3< F,T1,T2,T3 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind4< F,T1,T2,T3,T4 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+        typedef aux::replace_unnamed_arg< T5,n5 > r5;
+        typedef typename r5::type a5;
+        typedef typename r5::next n6;
+        typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5;
+        ///
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind5< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp
new file mode 100644
index 0000000..962b5c9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp
@@ -0,0 +1,46 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "bind_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct bind0;
+
+template<
+      typename F, typename T1
+    >
+struct bind1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/bitand.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/bitand.hpp
new file mode 100644
index 0000000..527b689
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/bitand.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "bitand.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitand_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitand_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitand_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitand_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitand_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitand_
+    : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitand_< N1,N2,N3,N4,na >
+
+    : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitand_< N1,N2,N3,na,na >
+
+    : bitand_< bitand_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitand_< N1,N2,na,na,na >
+    : bitand_impl<
+          typename bitand_tag<N1>::type
+        , typename bitand_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitand_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  & BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/bitor.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/bitor.hpp
new file mode 100644
index 0000000..3f0d5ca
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/bitor.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "bitor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitor_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitor_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitor_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitor_
+    : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitor_< N1,N2,N3,N4,na >
+
+    : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitor_< N1,N2,N3,na,na >
+
+    : bitor_< bitor_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitor_< N1,N2,na,na,na >
+    : bitor_impl<
+          typename bitor_tag<N1>::type
+        , typename bitor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  | BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp
new file mode 100644
index 0000000..06996c0
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "bitxor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitxor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitxor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitxor_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitxor_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitxor_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitxor_
+    : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitxor_< N1,N2,N3,N4,na >
+
+    : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitxor_< N1,N2,N3,na,na >
+
+    : bitxor_< bitxor_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitxor_< N1,N2,na,na,na >
+    : bitxor_impl<
+          typename bitxor_tag<N1>::type
+        , typename bitxor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitxor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/deque.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/deque.hpp
new file mode 100644
index 0000000..06505c9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/deque.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "deque.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct deque;
+
+template<
+     
+    >
+struct deque<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector0<  >
+{
+    typedef vector0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct deque<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector1<T0>
+{
+    typedef typename vector1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct deque<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector2< T0,T1 >
+{
+    typedef typename vector2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct deque<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector3< T0,T1,T2 >
+{
+    typedef typename vector3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct deque<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector4< T0,T1,T2,T3 >
+{
+    typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct deque<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector5< T0,T1,T2,T3,T4 >
+{
+    typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : vector15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : vector16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : vector17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : vector18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : vector19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct deque
+    : vector20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/divides.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/divides.hpp
new file mode 100644
index 0000000..6b4178a
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/divides.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "divides.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct divides_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct divides_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct divides_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct divides_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct divides_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct divides
+    : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , divides
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct divides< N1,N2,N3,N4,na >
+
+    : divides< divides< divides< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct divides< N1,N2,N3,na,na >
+
+    : divides< divides< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct divides< N1,N2,na,na,na >
+    : divides_impl<
+          typename divides_tag<N1>::type
+        , typename divides_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, divides)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct divides_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  / BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp
new file mode 100644
index 0000000..901a93c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct equal_to_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct equal_to_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct equal_to
+
+    : equal_to_impl<
+          typename equal_to_tag<N1>::type
+        , typename equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value  == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp
new file mode 100644
index 0000000..45ab4e7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp
@@ -0,0 +1,180 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 0,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 1,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef state1 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 2,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef state2 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 3,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef state3 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 4,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef state4 state;
+    typedef iter4 iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl
+{
+    typedef fold_impl<
+          4
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< -1,First,Last,State,ForwardOp >
+    : fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< -1,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp
new file mode 100644
index 0000000..8b2bf59
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp
@@ -0,0 +1,558 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "full_lambda.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+    , typename Arity
+    >
+struct lambda
+{
+    typedef false_ is_le;
+    typedef T result_;
+    typedef T type;
+};
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+template< int N, typename Tag >
+struct lambda< arg<N>,Tag, int_< -1 > >
+{
+    typedef true_ is_le;
+    typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41
+    typedef mpl::protect<result_> type;
+};
+
+template<
+      typename F
+    , typename Tag
+    >
+struct lambda<
+          bind0<F>
+        , Tag
+        , int_<1>
+        >
+{
+    typedef false_ is_le;
+    typedef bind0<
+          F
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1
+{
+    typedef F<
+          typename L1::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1< true_,Tag,F,L1 >
+{
+    typedef bind1<
+          quote1< F,Tag >
+        , typename L1::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1 > class F
+    , typename T1
+    , typename Tag
+    >
+struct lambda<
+          F<T1>
+        , Tag
+        , int_<1>
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef typename l1::is_le is_le1;
+    typedef typename aux::lambda_or<
+          is_le1::value
+        >::type is_le;
+
+    typedef aux::le_result1<
+          is_le, Tag, F, l1
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1
+    , typename Tag
+    >
+struct lambda<
+          bind1< F,T1 >
+        , Tag
+        , int_<2>
+        >
+{
+    typedef false_ is_le;
+    typedef bind1<
+          F
+        , T1
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2
+{
+    typedef F<
+          typename L1::type, typename L2::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2< true_,Tag,F,L1,L2 >
+{
+    typedef bind2<
+          quote2< F,Tag >
+        , typename L1::result_, typename L2::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2 > class F
+    , typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2 >
+        , Tag
+        , int_<2>
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value
+        >::type is_le;
+
+    typedef aux::le_result2<
+          is_le, Tag, F, l1, l2
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          bind2< F,T1,T2 >
+        , Tag
+        , int_<3>
+        >
+{
+    typedef false_ is_le;
+    typedef bind2<
+          F
+        , T1, T2
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3< true_,Tag,F,L1,L2,L3 >
+{
+    typedef bind3<
+          quote3< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3 > class F
+    , typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3 >
+        , Tag
+        , int_<3>
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value
+        >::type is_le;
+
+    typedef aux::le_result3<
+          is_le, Tag, F, l1, l2, l3
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          bind3< F,T1,T2,T3 >
+        , Tag
+        , int_<4>
+        >
+{
+    typedef false_ is_le;
+    typedef bind3<
+          F
+        , T1, T2, T3
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4< true_,Tag,F,L1,L2,L3,L4 >
+{
+    typedef bind4<
+          quote4< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4 >
+        , Tag
+        , int_<4>
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        >::type is_le;
+
+    typedef aux::le_result4<
+          is_le, Tag, F, l1, l2, l3, l4
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          bind4< F,T1,T2,T3,T4 >
+        , Tag
+        , int_<5>
+        >
+{
+    typedef false_ is_le;
+    typedef bind4<
+          F
+        , T1, T2, T3, T4
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type, typename L5::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 >
+{
+    typedef bind5<
+          quote5< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_, typename L5::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template<
+          typename P1, typename P2, typename P3, typename P4
+        , typename P5
+        >
+      class F
+    , typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4,T5 >
+        , Tag
+        , int_<5>
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    typedef lambda< T5,Tag > l5;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    typedef typename l5::is_le is_le5;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        , is_le5::value
+        >::type is_le;
+
+    typedef aux::le_result5<
+          is_le, Tag, F, l1, l2, l3, l4, l5
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind5< F,T1,T2,T3,T4,T5 >
+        , Tag
+        , int_<6>
+        >
+{
+    typedef false_ is_le;
+    typedef bind5<
+          F
+        , T1, T2, T3, T4, T5
+        > result_;
+
+    typedef result_ type;
+};
+
+/// special case for 'protect'
+template< typename T, typename Tag >
+struct lambda< mpl::protect<T>,Tag, int_<1> >
+{
+    typedef false_ is_le;
+    typedef mpl::protect<T> result_;
+    typedef result_ type;
+};
+
+/// specializations for the main 'bind' form
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind< F,T1,T2,T3,T4,T5 >
+        , Tag
+        , int_<6>
+        >
+{
+    typedef false_ is_le;
+    typedef bind< F,T1,T2,T3,T4,T5 > result_;
+    typedef result_ type;
+};
+
+template<
+      typename F
+    , typename Tag1
+    , typename Tag2
+    , typename Arity
+    >
+struct lambda<
+          lambda< F,Tag1,Arity >
+        , Tag2
+        , int_<3>
+        >
+{
+    typedef lambda< F,Tag2 > l1;
+    typedef lambda< Tag1,Tag2 > l2;
+    typedef typename l1::is_le is_le;
+    typedef bind1< quote1<aux::template_arity>, typename l1::result_ > arity_;
+    typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3;
+    typedef aux::le_result3<is_le, Tag2, mpl::lambda, l1, l2, l3> le_result_;
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/greater.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/greater.hpp
new file mode 100644
index 0000000..3d1c3dc
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/greater.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "greater.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater
+
+    : greater_impl<
+          typename greater_tag<N1>::type
+        , typename greater_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp
new file mode 100644
index 0000000..fb01186
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "greater_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_equal_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_equal_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater_equal
+
+    : greater_equal_impl<
+          typename greater_equal_tag<N1>::type
+        , typename greater_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/inherit.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/inherit.hpp
new file mode 100644
index 0000000..6adcc01
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/inherit.hpp
@@ -0,0 +1,139 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "inherit.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    >
+struct inherit2
+    : T1, T2
+{
+    typedef inherit2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2))
+};
+
+template< typename T1 >
+struct inherit2< T1,empty_base >
+{
+    typedef T1 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base))
+};
+
+template< typename T2 >
+struct inherit2< empty_base,T2 >
+{
+    typedef T2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2))
+};
+
+template<>
+struct inherit2< empty_base,empty_base >
+{
+    typedef empty_base type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, inherit2)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na
+    >
+struct inherit3
+    : inherit2<
+          typename inherit2<
+              T1, T2
+            >::type
+        , T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , inherit3
+        , ( T1, T2, T3)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, inherit3)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    >
+struct inherit4
+    : inherit2<
+          typename inherit3<
+              T1, T2, T3
+            >::type
+        , T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , inherit4
+        , ( T1, T2, T3, T4)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(4, inherit4)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    , typename T5 = na
+    >
+struct inherit5
+    : inherit2<
+          typename inherit4<
+              T1, T2, T3, T4
+            >::type
+        , T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , inherit5
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(5, inherit5)
+
+/// primary template
+
+template<
+      typename T1 = empty_base, typename T2 = empty_base
+    , typename T3 = empty_base, typename T4 = empty_base
+    , typename T5 = empty_base
+    >
+struct inherit
+    : inherit5< T1,T2,T3,T4,T5 >
+{
+};
+
+template<>
+struct inherit< na,na,na,na,na >
+{
+    template<
+
+          typename T1, typename T2, typename T3, typename T4, typename T5
+
+        >
+    struct apply
+        : inherit< T1,T2,T3,T4,T5 >
+    {
+    };
+};
+
+BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp
new file mode 100644
index 0000000..b767e95
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp
@@ -0,0 +1,133 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright David Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "iter_fold_if_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename Iterator, typename State >
+struct iter_fold_if_null_step
+{
+    typedef State state;
+    typedef Iterator iterator;
+};
+
+template< bool >
+struct iter_fold_if_step_impl
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef typename apply2< StateOp,State,Iterator >::type state;
+        typedef typename IteratorOp::type iterator;
+    };
+};
+
+template<>
+struct iter_fold_if_step_impl<false>
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef State state;
+        typedef Iterator iterator;
+    };
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_forward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename BackwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_backward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename ForwardPredicate
+    , typename BackwardOp
+    , typename BackwardPredicate
+    >
+struct iter_fold_if_impl
+{
+ private:
+    typedef iter_fold_if_null_step< Iterator,State > forward_step0;
+    typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1;
+    typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2;
+    typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3;
+    typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4;
+    
+
+    typedef typename if_<
+          typename forward_step4::not_last
+        , iter_fold_if_impl<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            , ForwardOp
+            , ForwardPredicate
+            , BackwardOp
+            , BackwardPredicate
+            >
+        , iter_fold_if_null_step<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            >
+        >::type backward_step4;
+
+    typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3;
+    typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2;
+    typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1;
+    typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0;
+    
+
+ public:
+    typedef typename backward_step0::state state;
+    typedef typename backward_step4::iterator iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp
new file mode 100644
index 0000000..1dd216c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp
@@ -0,0 +1,180 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 0,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 1,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef state1 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 2,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef state2 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 3,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef state3 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 4,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef state4 state;
+    typedef iter4 iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl
+{
+    typedef iter_fold_impl<
+          4
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef iter_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< -1,First,Last,State,ForwardOp >
+    : iter_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< -1,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp
new file mode 100644
index 0000000..75b30ce
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp
@@ -0,0 +1,229 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "lambda_no_ctps.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+template< typename Arity > struct lambda_impl
+{
+    template< typename T, typename Tag, typename Protect > struct result_
+    {
+        typedef T type;
+        typedef is_placeholder<T> is_le;
+    };
+};
+
+template<> struct lambda_impl< int_<1> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef typename l1::is_le is_le1;
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value
+            > is_le;
+
+        typedef bind1<
+              typename F::rebind
+            , typename l1::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<2> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value
+            > is_le;
+
+        typedef bind2<
+              typename F::rebind
+            , typename l1::type, typename l2::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<3> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value
+            > is_le;
+
+        typedef bind3<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<4> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value
+            > is_le;
+
+        typedef bind4<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<5> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        typedef lambda< typename F::arg5, Tag, false_ > l5;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        typedef typename l5::is_le is_le5;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value
+            > is_le;
+
+        typedef bind5<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type, typename l5::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+    , typename Protect
+    >
+struct lambda
+{
+    /// Metafunction forwarding confuses MSVC 6.x
+    typedef typename aux::template_arity<T>::type arity_;
+    typedef typename aux::lambda_impl<arity_>
+        ::template result_< T,Tag,Protect > l_;
+
+    typedef typename l_::type type;
+    typedef typename l_::is_le is_le;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect))
+};
+
+BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/less.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/less.hpp
new file mode 100644
index 0000000..0b6ce1d
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/less.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "less.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less
+
+    : less_impl<
+          typename less_tag<N1>::type
+        , typename less_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp
new file mode 100644
index 0000000..0010e08
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "less_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_equal_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_equal_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less_equal
+
+    : less_equal_impl<
+          typename less_equal_tag<N1>::type
+        , typename less_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/list.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/list.hpp
new file mode 100644
index 0000000..cbd58ac
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/list.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "list.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct list;
+
+template<
+     
+    >
+struct list<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list0<  >
+{
+    typedef list0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct list<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list1<T0>
+{
+    typedef typename list1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct list<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list2< T0,T1 >
+{
+    typedef typename list2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct list<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list3< T0,T1,T2 >
+{
+    typedef typename list3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct list<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list4< T0,T1,T2,T3 >
+{
+    typedef typename list4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct list<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list5< T0,T1,T2,T3,T4 >
+{
+    typedef typename list5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : list15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : list16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : list17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : list18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : list19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct list
+    : list20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/list_c.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/list_c.hpp
new file mode 100644
index 0000000..495c3f7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/list_c.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "list_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct list_c;
+
+template<
+      typename T
+    >
+struct list_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list0_c<T>
+{
+    typedef typename list0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct list_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list1_c< T,C0 >
+{
+    typedef typename list1_c< T,C0 >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct list_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list2_c< T,C0,C1 >
+{
+    typedef typename list2_c< T,C0,C1 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct list_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list3_c< T,C0,C1,C2 >
+{
+    typedef typename list3_c< T,C0,C1,C2 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct list_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list4_c< T,C0,C1,C2,C3 >
+{
+    typedef typename list4_c< T,C0,C1,C2,C3 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list5_c< T,C0,C1,C2,C3,C4 >
+{
+    typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list6_c< T,C0,C1,C2,C3,C4,C5 >
+{
+    typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+{
+    typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+{
+    typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+{
+    typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+{
+    typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+{
+    typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+{
+    typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+{
+    typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list14_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        >
+{
+    typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list15_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        >
+{
+    typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list16_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15
+        >
+{
+    typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list17_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16
+        >
+{
+    typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : list18_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17
+        >
+{
+    typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : list19_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18
+        >
+{
+    typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct list_c
+    : list20_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, C19
+        >
+{
+    typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/map.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/map.hpp
new file mode 100644
index 0000000..80ef156
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/map.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "map.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct map;
+
+template<
+     
+    >
+struct map<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map0<  >
+{
+    typedef map0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct map<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map1<T0>
+{
+    typedef typename map1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct map<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map2< T0,T1 >
+{
+    typedef typename map2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct map<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map3< T0,T1,T2 >
+{
+    typedef typename map3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct map<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map4< T0,T1,T2,T3 >
+{
+    typedef typename map4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct map<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map5< T0,T1,T2,T3,T4 >
+{
+    typedef typename map5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : map15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : map16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : map17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : map18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : map19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct map
+    : map20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/minus.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/minus.hpp
new file mode 100644
index 0000000..cfddc15
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/minus.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "minus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct minus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct minus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct minus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct minus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct minus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct minus
+    : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , minus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct minus< N1,N2,N3,N4,na >
+
+    : minus< minus< minus< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct minus< N1,N2,N3,na,na >
+
+    : minus< minus< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct minus< N1,N2,na,na,na >
+    : minus_impl<
+          typename minus_tag<N1>::type
+        , typename minus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, minus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct minus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  - BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/modulus.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/modulus.hpp
new file mode 100644
index 0000000..eb5eff0
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/modulus.hpp
@@ -0,0 +1,101 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "modulus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct modulus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct modulus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct modulus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct modulus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct modulus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct modulus
+
+    : modulus_impl<
+          typename modulus_tag<N1>::type
+        , typename modulus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct modulus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  % BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp
new file mode 100644
index 0000000..68356ee
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "not_equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct not_equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct not_equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct not_equal_to_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct not_equal_to_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct not_equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct not_equal_to
+
+    : not_equal_to_impl<
+          typename not_equal_to_tag<N1>::type
+        , typename not_equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct not_equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/or.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/or.hpp
new file mode 100644
index 0000000..ff7ce9f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/or.hpp
@@ -0,0 +1,69 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "or.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C_, typename T1, typename T2, typename T3, typename T4 >
+struct or_impl
+    : true_
+{
+};
+
+template< typename T1, typename T2, typename T3, typename T4 >
+struct or_impl< false,T1,T2,T3,T4 >
+    : or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4
+        , false_
+        >
+{
+};
+
+template<>
+struct or_impl<
+          false
+        , false_, false_, false_, false_
+        >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = false_, typename T4 = false_, typename T5 = false_
+    >
+struct or_
+
+    : aux::or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4, T5
+        >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , or_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , or_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp
new file mode 100644
index 0000000..b306bbb
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp
@@ -0,0 +1,105 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright Peter Dimov 2001-2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "placeholders.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg< -1 > _;
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_;
+}
+
+}}
+
+/// agurt, 17/mar/02: one more placeholder for the last 'apply#' 
+/// specialization
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<1> _1;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<2> _2;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<3> _3;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<4> _4;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<5> _5;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<6> _6;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6;
+}
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/plus.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/plus.hpp
new file mode 100644
index 0000000..82539ab
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/plus.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "plus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct plus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct plus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct plus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct plus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct plus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct plus
+    : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , plus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct plus< N1,N2,N3,N4,na >
+
+    : plus< plus< plus< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct plus< N1,N2,N3,na,na >
+
+    : plus< plus< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct plus< N1,N2,na,na,na >
+    : plus_impl<
+          typename plus_tag<N1>::type
+        , typename plus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, plus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct plus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  + BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/quote.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/quote.hpp
new file mode 100644
index 0000000..677a3f9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/quote.hpp
@@ -0,0 +1,119 @@
+
+// Copyright Aleksey Gurtovoy 2000-2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "quote.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template< typename T, bool has_type_ >
+struct quote_impl
+
+{
+    typedef typename T::type type;
+};
+
+template< typename T >
+struct quote_impl< T,false >
+{
+    typedef T type;
+};
+
+template<
+      template< typename P1 > class F
+    , typename Tag = void_
+    >
+struct quote1
+{
+    template< typename U1 > struct apply
+
+    {
+        typedef typename quote_impl<
+              F<U1>
+            , aux::has_type< F<U1> >::value
+            >::type type;
+    };
+};
+
+template<
+      template< typename P1, typename P2 > class F
+    , typename Tag = void_
+    >
+struct quote2
+{
+    template< typename U1, typename U2 > struct apply
+
+    {
+        typedef typename quote_impl<
+              F< U1,U2 >
+            , aux::has_type< F< U1,U2 > >::value
+            >::type type;
+    };
+};
+
+template<
+      template< typename P1, typename P2, typename P3 > class F
+    , typename Tag = void_
+    >
+struct quote3
+{
+    template< typename U1, typename U2, typename U3 > struct apply
+
+    {
+        typedef typename quote_impl<
+              F< U1,U2,U3 >
+            , aux::has_type< F< U1,U2,U3 > >::value
+            >::type type;
+    };
+};
+
+template<
+      template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename Tag = void_
+    >
+struct quote4
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4
+        >
+    struct apply
+
+    {
+        typedef typename quote_impl<
+              F< U1,U2,U3,U4 >
+            , aux::has_type< F< U1,U2,U3,U4 > >::value
+            >::type type;
+    };
+};
+
+template<
+      template<
+          typename P1, typename P2, typename P3, typename P4
+        , typename P5
+        >
+      class F
+    , typename Tag = void_
+    >
+struct quote5
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4
+        , typename U5
+        >
+    struct apply
+
+    {
+        typedef typename quote_impl<
+              F< U1,U2,U3,U4,U5 >
+            , aux::has_type< F< U1,U2,U3,U4,U5 > >::value
+            >::type type;
+    };
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp
new file mode 100644
index 0000000..372f0d2
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp
@@ -0,0 +1,295 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "reverse_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl;
+
+template< long N >
+struct reverse_fold_chunk;
+
+template<> struct reverse_fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef fwd_state0 bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter0 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef fwd_state1 bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter1 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef fwd_state2 bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter2 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef fwd_state3 bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter3 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef fwd_state4 bkwd_state4;
+        typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter4 iterator;
+    };
+};
+
+template< long N >
+struct reverse_fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef reverse_fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , iter4
+            , Last
+            , fwd_state4
+            , BackwardOp
+            , ForwardOp
+            > nested_chunk;
+
+        typedef typename nested_chunk::state bkwd_state4;
+        typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef typename nested_chunk::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct reverse_fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct reverse_fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , reverse_fold_null_step< Last,State >
+            , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_step
+{
+    typedef reverse_fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , typename deref<First>::type
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl
+    : reverse_fold_chunk<N>
+        ::template result_< First,Last,State,BackwardOp,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp
new file mode 100644
index 0000000..44aadf7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp
@@ -0,0 +1,295 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "reverse_iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl;
+
+template< long N >
+struct reverse_iter_fold_chunk;
+
+template<> struct reverse_iter_fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef fwd_state0 bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter0 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef fwd_state1 bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter1 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef fwd_state2 bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter2 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef fwd_state3 bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter3 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef fwd_state4 bkwd_state4;
+        typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter4 iterator;
+    };
+};
+
+template< long N >
+struct reverse_iter_fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef reverse_iter_fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , iter4
+            , Last
+            , fwd_state4
+            , BackwardOp
+            , ForwardOp
+            > nested_chunk;
+
+        typedef typename nested_chunk::state bkwd_state4;
+        typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef typename nested_chunk::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct reverse_iter_fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct reverse_iter_fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , reverse_iter_fold_null_step< Last,State >
+            , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_step
+{
+    typedef reverse_iter_fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , First
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl
+    : reverse_iter_fold_chunk<N>
+        ::template result_< First,Last,State,BackwardOp,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/set.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/set.hpp
new file mode 100644
index 0000000..ace3a4f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/set.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "set.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct set;
+
+template<
+     
+    >
+struct set<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set0<  >
+{
+    typedef set0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct set<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set1<T0>
+{
+    typedef typename set1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct set<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set2< T0,T1 >
+{
+    typedef typename set2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct set<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set3< T0,T1,T2 >
+{
+    typedef typename set3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct set<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set4< T0,T1,T2,T3 >
+{
+    typedef typename set4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct set<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set5< T0,T1,T2,T3,T4 >
+{
+    typedef typename set5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : set15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : set16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : set17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : set18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : set19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct set
+    : set20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/set_c.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/set_c.hpp
new file mode 100644
index 0000000..4e6993c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/set_c.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "set_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct set_c;
+
+template<
+      typename T
+    >
+struct set_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set0_c<T>
+{
+    typedef typename set0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct set_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set1_c< T,C0 >
+{
+    typedef typename set1_c< T,C0 >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct set_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set2_c< T,C0,C1 >
+{
+    typedef typename set2_c< T,C0,C1 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct set_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set3_c< T,C0,C1,C2 >
+{
+    typedef typename set3_c< T,C0,C1,C2 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct set_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set4_c< T,C0,C1,C2,C3 >
+{
+    typedef typename set4_c< T,C0,C1,C2,C3 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set5_c< T,C0,C1,C2,C3,C4 >
+{
+    typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set6_c< T,C0,C1,C2,C3,C4,C5 >
+{
+    typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+{
+    typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+{
+    typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+{
+    typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+{
+    typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+{
+    typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+{
+    typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+{
+    typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set14_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        >
+{
+    typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set15_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        >
+{
+    typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set16_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15
+        >
+{
+    typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set17_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16
+        >
+{
+    typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : set18_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17
+        >
+{
+    typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : set19_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18
+        >
+{
+    typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct set_c
+    : set20_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, C19
+        >
+{
+    typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp
new file mode 100644
index 0000000..6d19e94
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp
@@ -0,0 +1,99 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "shift_left.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_left_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_left_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_left_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_left_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_left_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_left
+
+    : shift_left_impl<
+          typename shift_left_tag<N1>::type
+        , typename shift_left_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct shift_left_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  << BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/shift_right.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/shift_right.hpp
new file mode 100644
index 0000000..dd31d97
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/shift_right.hpp
@@ -0,0 +1,99 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "shift_right.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_right_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_right_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_right_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_right_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_right_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_right
+
+    : shift_right_impl<
+          typename shift_right_tag<N1>::type
+        , typename shift_right_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct shift_right_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  >> BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp
new file mode 100644
index 0000000..b24a0a7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp
@@ -0,0 +1,40 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "template_arity.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< bool >
+struct template_arity_impl
+{
+    template< typename F > struct result_
+        : mpl::int_< -1 >
+    {
+    };
+};
+
+template<>
+struct template_arity_impl<true>
+{
+    template< typename F > struct result_
+        : F::arity
+    {
+    };
+};
+
+template< typename F >
+struct template_arity
+    : template_arity_impl< ::boost::mpl::aux::has_rebind<F>::value >
+        ::template result_<F>
+{
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/times.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/times.hpp
new file mode 100644
index 0000000..ab100f1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/times.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "times.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct times_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct times_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct times_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct times_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct times_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct times
+    : times< times< times< times< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , times
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct times< N1,N2,N3,N4,na >
+
+    : times< times< times< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct times< N1,N2,N3,na,na >
+
+    : times< times< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct times< N1,N2,na,na,na >
+    : times_impl<
+          typename times_tag<N1>::type
+        , typename times_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, times)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct times_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  * BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp
new file mode 100644
index 0000000..f391dc1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "unpack_args.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< int size, typename F, typename Args >
+struct unpack_args_impl;
+
+template< typename F, typename Args >
+struct unpack_args_impl< 0,F,Args >
+    : apply0<
+          F
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 1,F,Args >
+    : apply1<
+          F
+        , typename at_c< Args,0 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 2,F,Args >
+    : apply2<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 3,F,Args >
+    : apply3<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 4,F,Args >
+    : apply4<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 5,F,Args >
+    : apply5<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+        , typename at_c< Args,4 >::type
+        >
+{
+};
+
+}
+
+template<
+      typename F
+    >
+struct unpack_args
+{
+    template< typename Args > struct apply
+    {
+        typedef typename aux::unpack_args_impl<
+              size<Args>::value
+            , F
+            , Args
+            >::type type;
+
+    };
+};
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/vector.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/vector.hpp
new file mode 100644
index 0000000..803e217
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/vector.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "vector.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct vector;
+
+template<
+     
+    >
+struct vector<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector0<  >
+{
+    typedef vector0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct vector<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector1<T0>
+{
+    typedef typename vector1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct vector<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector2< T0,T1 >
+{
+    typedef typename vector2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct vector<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector3< T0,T1,T2 >
+{
+    typedef typename vector3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct vector<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector4< T0,T1,T2,T3 >
+{
+    typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct vector<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector5< T0,T1,T2,T3,T4 >
+{
+    typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : vector15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : vector16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : vector17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : vector18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : vector19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct vector
+    : vector20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp b/ext/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp
new file mode 100644
index 0000000..643b7fd
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp
@@ -0,0 +1,309 @@
+
+// Copyright Aleksey Gurtovoy 2000-2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "vector_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct vector_c;
+
+template<
+      typename T
+    >
+struct vector_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector0_c<T>
+{
+    typedef typename vector0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct vector_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector1_c< T, T(C0) >
+{
+    typedef typename vector1_c< T, T(C0) >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct vector_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector2_c< T, T(C0), T(C1) >
+{
+    typedef typename vector2_c< T, T(C0), T(C1) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct vector_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector3_c< T, T(C0), T(C1), T(C2) >
+{
+    typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector4_c< T, T(C0), T(C1), T(C2), T(C3) >
+{
+    typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >
+{
+    typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >
+{
+    typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >
+{
+    typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >
+{
+    typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >
+{
+    typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >
+{
+    typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >
+{
+    typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >
+{
+    typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >
+{
+    typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >
+{
+    typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >
+{
+    typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >
+{
+    typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >
+{
+    typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >
+{
+    typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >
+{
+    typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct vector_c
+    : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >
+{
+    typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp
new file mode 100644
index 0000000..26de94c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_backward;
+template<>
+struct advance_backward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_backward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_backward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_backward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_backward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef typename prior<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_backward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_backward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_backward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp
new file mode 100644
index 0000000..b137cc7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_forward;
+template<>
+struct advance_forward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_forward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_forward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_forward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_forward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef typename next<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_forward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_forward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_forward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/and.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/and.hpp
new file mode 100644
index 0000000..010ad1f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/and.hpp
@@ -0,0 +1,69 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/and.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C_, typename T1, typename T2, typename T3, typename T4 >
+struct and_impl
+    : false_
+{
+};
+
+template< typename T1, typename T2, typename T3, typename T4 >
+struct and_impl< true,T1,T2,T3,T4 >
+    : and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4
+        , true_
+        >
+{
+};
+
+template<>
+struct and_impl<
+          true
+        , true_, true_, true_, true_
+        >
+    : true_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = true_, typename T4 = true_, typename T5 = true_
+    >
+struct and_
+
+    : aux::and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4, T5
+        >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , and_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , and_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/apply.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/apply.hpp
new file mode 100644
index 0000000..e08eacc
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/apply.hpp
@@ -0,0 +1,169 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct apply0
+
+    : apply_wrap0<
+          typename lambda<F>::type
+       
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          1
+        , apply0
+        , (F )
+        )
+};
+
+template<
+      typename F
+    >
+struct apply< F,na,na,na,na,na >
+    : apply0<F>
+{
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply1
+
+    : apply_wrap1<
+          typename lambda<F>::type
+        , T1
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          2
+        , apply1
+        , (F, T1)
+        )
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply< F,T1,na,na,na,na >
+    : apply1< F,T1 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2
+
+    : apply_wrap2<
+          typename lambda<F>::type
+        , T1, T2
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , apply2
+        , (F, T1, T2)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply< F,T1,T2,na,na,na >
+    : apply2< F,T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3
+
+    : apply_wrap3<
+          typename lambda<F>::type
+        , T1, T2, T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , apply3
+        , (F, T1, T2, T3)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply< F,T1,T2,T3,na,na >
+    : apply3< F,T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4
+
+    : apply_wrap4<
+          typename lambda<F>::type
+        , T1, T2, T3, T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , apply4
+        , (F, T1, T2, T3, T4)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply< F,T1,T2,T3,T4,na >
+    : apply4< F,T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5
+
+    : apply_wrap5<
+          typename lambda<F>::type
+        , T1, T2, T3, T4, T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          6
+        , apply5
+        , (F, T1, T2, T3, T4, T5)
+        )
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply
+    : apply5< F,T1,T2,T3,T4,T5 >
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp
new file mode 100644
index 0000000..b2ed5d5
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp
@@ -0,0 +1,52 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na
+    >
+struct apply;
+
+template<
+      typename F
+    >
+struct apply0;
+
+template<
+      typename F, typename T1
+    >
+struct apply1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp
new file mode 100644
index 0000000..2ffe709
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp
@@ -0,0 +1,456 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply_wrap.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      int N, typename F
+    >
+struct apply_wrap_impl0;
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          0
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+/// since the defaults are "lost", we have to pass *something* even for nullary
+/// metafunction classes
+        na
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          1
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          2
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na, na
+
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          3
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na, na, na
+
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          4
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na, na, na, na
+
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          5
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na, na, na, na, na
+
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap0
+    : apply_wrap_impl0<
+          ::boost::mpl::aux::arity< F,0 >::value
+        , F
+       
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1
+    >
+struct apply_wrap_impl1;
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          1
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          2
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        , na
+
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          3
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        , na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          4
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        , na, na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          5
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        , na, na, na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap1
+    : apply_wrap_impl1<
+          ::boost::mpl::aux::arity< F,1 >::value
+        , F
+        , T1
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2<
+          2
+        , F
+        , T1, T2
+        >
+{
+    typedef typename F::template apply<
+          T1, T2
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2<
+          3
+        , F
+        , T1, T2
+        >
+{
+    typedef typename F::template apply<
+          T1, T2
+
+        , na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2<
+          4
+        , F
+        , T1, T2
+        >
+{
+    typedef typename F::template apply<
+          T1, T2
+
+        , na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2<
+          5
+        , F
+        , T1, T2
+        >
+{
+    typedef typename F::template apply<
+          T1, T2
+
+        , na, na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap2
+    : apply_wrap_impl2<
+          ::boost::mpl::aux::arity< F,2 >::value
+        , F
+        , T1, T2
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap_impl3;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap_impl3<
+          3
+        , F
+        , T1, T2, T3
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap_impl3<
+          4
+        , F
+        , T1, T2, T3
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3
+
+        , na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap_impl3<
+          5
+        , F
+        , T1, T2, T3
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3
+
+        , na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap3
+    : apply_wrap_impl3<
+          ::boost::mpl::aux::arity< F,3 >::value
+        , F
+        , T1, T2, T3
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap_impl4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap_impl4<
+          4
+        , F
+        , T1, T2, T3, T4
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3, T4
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap_impl4<
+          5
+        , F
+        , T1, T2, T3, T4
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3, T4
+
+        , na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap4
+    : apply_wrap_impl4<
+          ::boost::mpl::aux::arity< F,4 >::value
+        , F
+        , T1, T2, T3, T4
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply_wrap_impl5;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply_wrap_impl5<
+          5
+        , F
+        , T1, T2, T3, T4, T5
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3, T4, T5
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply_wrap5
+    : apply_wrap_impl5<
+          ::boost::mpl::aux::arity< F,5 >::value
+        , F
+        , T1, T2, T3, T4, T5
+        >::type
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/arg.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/arg.hpp
new file mode 100644
index 0000000..6f2f8a8
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/arg.hpp
@@ -0,0 +1,123 @@
+
+// Copyright Peter Dimov 2001-2002
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/arg.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+template<> struct arg< -1 >
+{
+    BOOST_STATIC_CONSTANT(int, value  = -1);
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<1>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 1);
+    typedef arg<2> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<2>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 2);
+    typedef arg<3> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U2 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<3>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 3);
+    typedef arg<4> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U3 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<4>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 4);
+    typedef arg<5> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U4 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<5>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 5);
+    typedef arg<6> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U5 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg)
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp
new file mode 100644
index 0000000..a29daa0
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp
@@ -0,0 +1,306 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+{
+    typedef T type;
+};
+
+template<
+      int N, typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
+{
+    typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind0<F>, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind0<F> f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename U1, typename U2, typename U3
+    , typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind1< F,T1 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind1< F,T1 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename U1, typename U2
+    , typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind2< F,T1,T2 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind2< F,T1,T2 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename U1
+    , typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind3< F,T1,T2,T3 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind4< F,T1,T2,T3,T4 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+        typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
+
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind5< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/bind.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/bind.hpp
new file mode 100644
index 0000000..34b1b5c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/bind.hpp
@@ -0,0 +1,403 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+{
+    typedef T type;
+};
+
+template<
+      typename T
+    , typename Arg
+    >
+struct replace_unnamed_arg
+{
+    typedef Arg next;
+    typedef T type;
+};
+
+template<
+      typename Arg
+    >
+struct replace_unnamed_arg< arg< -1 >, Arg >
+{
+    typedef typename Arg::next next;
+    typedef Arg type;
+};
+
+template<
+      int N, typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
+{
+    typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind0<F>, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind0<F> f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename U1, typename U2, typename U3
+    , typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind1< F,T1 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind1< F,T1 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename U1, typename U2
+    , typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind2< F,T1,T2 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind2< F,T1,T2 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename U1
+    , typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind3< F,T1,T2,T3 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind4< F,T1,T2,T3,T4 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+        typedef aux::replace_unnamed_arg< T5,n5 > r5;
+        typedef typename r5::type a5;
+        typedef typename r5::next n6;
+        typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5;
+        ///
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind5< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp
new file mode 100644
index 0000000..022cba3
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp
@@ -0,0 +1,46 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bind_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct bind0;
+
+template<
+      typename F, typename T1
+    >
+struct bind1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp
new file mode 100644
index 0000000..0bbf54e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitand.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitand_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitand_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitand_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitand_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitand_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitand_
+    : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitand_< N1,N2,N3,N4,na >
+
+    : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitand_< N1,N2,N3,na,na >
+
+    : bitand_< bitand_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitand_< N1,N2,na,na,na >
+    : bitand_impl<
+          typename bitand_tag<N1>::type
+        , typename bitand_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitand_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  & BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp
new file mode 100644
index 0000000..55b31cb
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitor_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitor_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitor_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitor_
+    : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitor_< N1,N2,N3,N4,na >
+
+    : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitor_< N1,N2,N3,na,na >
+
+    : bitor_< bitor_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitor_< N1,N2,na,na,na >
+    : bitor_impl<
+          typename bitor_tag<N1>::type
+        , typename bitor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  | BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp
new file mode 100644
index 0000000..ec19391
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitxor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitxor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitxor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitxor_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitxor_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitxor_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitxor_
+    : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitxor_< N1,N2,N3,N4,na >
+
+    : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitxor_< N1,N2,N3,na,na >
+
+    : bitxor_< bitxor_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitxor_< N1,N2,na,na,na >
+    : bitxor_impl<
+          typename bitxor_tag<N1>::type
+        , typename bitxor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitxor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/deque.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/deque.hpp
new file mode 100644
index 0000000..de67398
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/deque.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/deque.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct deque;
+
+template<
+     
+    >
+struct deque<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector0<  >
+{
+    typedef vector0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct deque<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector1<T0>
+{
+    typedef typename vector1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct deque<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector2< T0,T1 >
+{
+    typedef typename vector2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct deque<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector3< T0,T1,T2 >
+{
+    typedef typename vector3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct deque<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector4< T0,T1,T2,T3 >
+{
+    typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct deque<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector5< T0,T1,T2,T3,T4 >
+{
+    typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : vector15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : vector16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : vector17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : vector18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : vector19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct deque
+    : vector20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/divides.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/divides.hpp
new file mode 100644
index 0000000..86f1682
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/divides.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/divides.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct divides_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct divides_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct divides_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct divides_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct divides_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct divides
+    : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , divides
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct divides< N1,N2,N3,N4,na >
+
+    : divides< divides< divides< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct divides< N1,N2,N3,na,na >
+
+    : divides< divides< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct divides< N1,N2,na,na,na >
+    : divides_impl<
+          typename divides_tag<N1>::type
+        , typename divides_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, divides)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct divides_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  / BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp
new file mode 100644
index 0000000..62c9945
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct equal_to_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct equal_to_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct equal_to
+
+    : equal_to_impl<
+          typename equal_to_tag<N1>::type
+        , typename equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value  == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp
new file mode 100644
index 0000000..9e7a293
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp
@@ -0,0 +1,180 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 0,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 1,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef state1 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 2,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef state2 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 3,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef state3 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 4,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef state4 state;
+    typedef iter4 iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl
+{
+    typedef fold_impl<
+          4
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< -1,First,Last,State,ForwardOp >
+    : fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< -1,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp
new file mode 100644
index 0000000..e3eef71
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp
@@ -0,0 +1,558 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+    , typename Arity
+    >
+struct lambda
+{
+    typedef false_ is_le;
+    typedef T result_;
+    typedef T type;
+};
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+template< int N, typename Tag >
+struct lambda< arg<N>,Tag, int_< -1 > >
+{
+    typedef true_ is_le;
+    typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41
+    typedef mpl::protect<result_> type;
+};
+
+template<
+      typename F
+    , typename Tag
+    >
+struct lambda<
+          bind0<F>
+        , Tag
+        , int_<1>
+        >
+{
+    typedef false_ is_le;
+    typedef bind0<
+          F
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1
+{
+    typedef F<
+          typename L1::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1< true_,Tag,F,L1 >
+{
+    typedef bind1<
+          quote1< F,Tag >
+        , typename L1::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1 > class F
+    , typename T1
+    , typename Tag
+    >
+struct lambda<
+          F<T1>
+        , Tag
+        , int_<1>
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef typename l1::is_le is_le1;
+    typedef typename aux::lambda_or<
+          is_le1::value
+        >::type is_le;
+
+    typedef aux::le_result1<
+          is_le, Tag, F, l1
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1
+    , typename Tag
+    >
+struct lambda<
+          bind1< F,T1 >
+        , Tag
+        , int_<2>
+        >
+{
+    typedef false_ is_le;
+    typedef bind1<
+          F
+        , T1
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2
+{
+    typedef F<
+          typename L1::type, typename L2::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2< true_,Tag,F,L1,L2 >
+{
+    typedef bind2<
+          quote2< F,Tag >
+        , typename L1::result_, typename L2::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2 > class F
+    , typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2 >
+        , Tag
+        , int_<2>
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value
+        >::type is_le;
+
+    typedef aux::le_result2<
+          is_le, Tag, F, l1, l2
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          bind2< F,T1,T2 >
+        , Tag
+        , int_<3>
+        >
+{
+    typedef false_ is_le;
+    typedef bind2<
+          F
+        , T1, T2
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3< true_,Tag,F,L1,L2,L3 >
+{
+    typedef bind3<
+          quote3< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3 > class F
+    , typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3 >
+        , Tag
+        , int_<3>
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value
+        >::type is_le;
+
+    typedef aux::le_result3<
+          is_le, Tag, F, l1, l2, l3
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          bind3< F,T1,T2,T3 >
+        , Tag
+        , int_<4>
+        >
+{
+    typedef false_ is_le;
+    typedef bind3<
+          F
+        , T1, T2, T3
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4< true_,Tag,F,L1,L2,L3,L4 >
+{
+    typedef bind4<
+          quote4< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4 >
+        , Tag
+        , int_<4>
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        >::type is_le;
+
+    typedef aux::le_result4<
+          is_le, Tag, F, l1, l2, l3, l4
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          bind4< F,T1,T2,T3,T4 >
+        , Tag
+        , int_<5>
+        >
+{
+    typedef false_ is_le;
+    typedef bind4<
+          F
+        , T1, T2, T3, T4
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type, typename L5::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 >
+{
+    typedef bind5<
+          quote5< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_, typename L5::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template<
+          typename P1, typename P2, typename P3, typename P4
+        , typename P5
+        >
+      class F
+    , typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4,T5 >
+        , Tag
+        , int_<5>
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    typedef lambda< T5,Tag > l5;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    typedef typename l5::is_le is_le5;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        , is_le5::value
+        >::type is_le;
+
+    typedef aux::le_result5<
+          is_le, Tag, F, l1, l2, l3, l4, l5
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind5< F,T1,T2,T3,T4,T5 >
+        , Tag
+        , int_<6>
+        >
+{
+    typedef false_ is_le;
+    typedef bind5<
+          F
+        , T1, T2, T3, T4, T5
+        > result_;
+
+    typedef result_ type;
+};
+
+/// special case for 'protect'
+template< typename T, typename Tag >
+struct lambda< mpl::protect<T>,Tag, int_<1> >
+{
+    typedef false_ is_le;
+    typedef mpl::protect<T> result_;
+    typedef result_ type;
+};
+
+/// specializations for the main 'bind' form
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind< F,T1,T2,T3,T4,T5 >
+        , Tag
+        , int_<6>
+        >
+{
+    typedef false_ is_le;
+    typedef bind< F,T1,T2,T3,T4,T5 > result_;
+    typedef result_ type;
+};
+
+template<
+      typename F
+    , typename Tag1
+    , typename Tag2
+    , typename Arity
+    >
+struct lambda<
+          lambda< F,Tag1,Arity >
+        , Tag2
+        , int_<3>
+        >
+{
+    typedef lambda< F,Tag2 > l1;
+    typedef lambda< Tag1,Tag2 > l2;
+    typedef typename l1::is_le is_le;
+    typedef bind1< quote1<aux::template_arity>, typename l1::result_ > arity_;
+    typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3;
+    typedef aux::le_result3<is_le, Tag2, mpl::lambda, l1, l2, l3> le_result_;
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/greater.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/greater.hpp
new file mode 100644
index 0000000..14d8e08
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/greater.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater
+
+    : greater_impl<
+          typename greater_tag<N1>::type
+        , typename greater_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp
new file mode 100644
index 0000000..2603f91
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_equal_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_equal_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater_equal
+
+    : greater_equal_impl<
+          typename greater_equal_tag<N1>::type
+        , typename greater_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp
new file mode 100644
index 0000000..00f31c4
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp
@@ -0,0 +1,141 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/inherit.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    >
+struct inherit2
+    : T1, T2
+{
+    typedef inherit2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2))
+};
+
+template< typename T1 >
+struct inherit2< T1,empty_base >
+{
+    typedef T1 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base))
+};
+
+template< typename T2 >
+struct inherit2< empty_base,T2 >
+{
+    typedef T2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2))
+};
+
+template<>
+struct inherit2< empty_base,empty_base >
+{
+    typedef empty_base type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, inherit2)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na
+    >
+struct inherit3
+    : inherit2<
+          typename inherit2<
+              T1, T2
+            >::type
+        , T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , inherit3
+        , ( T1, T2, T3)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, inherit3)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    >
+struct inherit4
+    : inherit2<
+          typename inherit3<
+              T1, T2, T3
+            >::type
+        , T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , inherit4
+        , ( T1, T2, T3, T4)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(4, inherit4)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    , typename T5 = na
+    >
+struct inherit5
+    : inherit2<
+          typename inherit4<
+              T1, T2, T3, T4
+            >::type
+        , T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , inherit5
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(5, inherit5)
+
+/// primary template
+
+template<
+      typename T1 = empty_base, typename T2 = empty_base
+    , typename T3 = empty_base, typename T4 = empty_base
+    , typename T5 = empty_base
+    >
+struct inherit
+    : inherit5< T1,T2,T3,T4,T5 >
+{
+};
+
+template<>
+struct inherit< na,na,na,na,na >
+{
+    template<
+
+          typename T1 = empty_base, typename T2 = empty_base
+        , typename T3 = empty_base, typename T4 = empty_base
+        , typename T5 = empty_base
+
+        >
+    struct apply
+        : inherit< T1,T2,T3,T4,T5 >
+    {
+    };
+};
+
+BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp
new file mode 100644
index 0000000..6951795
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp
@@ -0,0 +1,133 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright David Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename Iterator, typename State >
+struct iter_fold_if_null_step
+{
+    typedef State state;
+    typedef Iterator iterator;
+};
+
+template< bool >
+struct iter_fold_if_step_impl
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef typename apply2< StateOp,State,Iterator >::type state;
+        typedef typename IteratorOp::type iterator;
+    };
+};
+
+template<>
+struct iter_fold_if_step_impl<false>
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef State state;
+        typedef Iterator iterator;
+    };
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_forward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename BackwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_backward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename ForwardPredicate
+    , typename BackwardOp
+    , typename BackwardPredicate
+    >
+struct iter_fold_if_impl
+{
+ private:
+    typedef iter_fold_if_null_step< Iterator,State > forward_step0;
+    typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1;
+    typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2;
+    typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3;
+    typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4;
+    
+
+    typedef typename if_<
+          typename forward_step4::not_last
+        , iter_fold_if_impl<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            , ForwardOp
+            , ForwardPredicate
+            , BackwardOp
+            , BackwardPredicate
+            >
+        , iter_fold_if_null_step<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            >
+        >::type backward_step4;
+
+    typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3;
+    typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2;
+    typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1;
+    typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0;
+    
+
+ public:
+    typedef typename backward_step0::state state;
+    typedef typename backward_step4::iterator iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp
new file mode 100644
index 0000000..805790e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp
@@ -0,0 +1,180 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 0,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 1,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef state1 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 2,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef state2 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 3,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef state3 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 4,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef state4 state;
+    typedef iter4 iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl
+{
+    typedef iter_fold_impl<
+          4
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef iter_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< -1,First,Last,State,ForwardOp >
+    : iter_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< -1,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp
new file mode 100644
index 0000000..890a198
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp
@@ -0,0 +1,229 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+template< typename Arity > struct lambda_impl
+{
+    template< typename T, typename Tag, typename Protect > struct result_
+    {
+        typedef T type;
+        typedef is_placeholder<T> is_le;
+    };
+};
+
+template<> struct lambda_impl< int_<1> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef typename l1::is_le is_le1;
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value
+            > is_le;
+
+        typedef bind1<
+              typename F::rebind
+            , typename l1::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<2> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value
+            > is_le;
+
+        typedef bind2<
+              typename F::rebind
+            , typename l1::type, typename l2::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<3> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value
+            > is_le;
+
+        typedef bind3<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<4> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value
+            > is_le;
+
+        typedef bind4<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<5> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        typedef lambda< typename F::arg5, Tag, false_ > l5;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        typedef typename l5::is_le is_le5;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value
+            > is_le;
+
+        typedef bind5<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type, typename l5::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+    , typename Protect
+    >
+struct lambda
+{
+    /// Metafunction forwarding confuses MSVC 6.x
+    typedef typename aux::template_arity<T>::type arity_;
+    typedef typename aux::lambda_impl<arity_>
+        ::template result_< T,Tag,Protect > l_;
+
+    typedef typename l_::type type;
+    typedef typename l_::is_le is_le;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect))
+};
+
+BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/less.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/less.hpp
new file mode 100644
index 0000000..4fe3cd1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/less.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less
+
+    : less_impl<
+          typename less_tag<N1>::type
+        , typename less_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp
new file mode 100644
index 0000000..ca2894f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_equal_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_equal_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less_equal
+
+    : less_equal_impl<
+          typename less_equal_tag<N1>::type
+        , typename less_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/list.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/list.hpp
new file mode 100644
index 0000000..4e8ad53
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/list.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct list;
+
+template<
+     
+    >
+struct list<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list0<  >
+{
+    typedef list0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct list<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list1<T0>
+{
+    typedef typename list1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct list<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list2< T0,T1 >
+{
+    typedef typename list2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct list<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list3< T0,T1,T2 >
+{
+    typedef typename list3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct list<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list4< T0,T1,T2,T3 >
+{
+    typedef typename list4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct list<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list5< T0,T1,T2,T3,T4 >
+{
+    typedef typename list5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : list15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : list16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : list17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : list18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : list19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct list
+    : list20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp
new file mode 100644
index 0000000..0b48a7f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct list_c;
+
+template<
+      typename T
+    >
+struct list_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list0_c<T>
+{
+    typedef typename list0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct list_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list1_c< T,C0 >
+{
+    typedef typename list1_c< T,C0 >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct list_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list2_c< T,C0,C1 >
+{
+    typedef typename list2_c< T,C0,C1 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct list_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list3_c< T,C0,C1,C2 >
+{
+    typedef typename list3_c< T,C0,C1,C2 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct list_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list4_c< T,C0,C1,C2,C3 >
+{
+    typedef typename list4_c< T,C0,C1,C2,C3 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list5_c< T,C0,C1,C2,C3,C4 >
+{
+    typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list6_c< T,C0,C1,C2,C3,C4,C5 >
+{
+    typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+{
+    typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+{
+    typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+{
+    typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+{
+    typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+{
+    typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+{
+    typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+{
+    typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list14_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        >
+{
+    typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list15_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        >
+{
+    typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list16_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15
+        >
+{
+    typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list17_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16
+        >
+{
+    typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : list18_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17
+        >
+{
+    typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : list19_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18
+        >
+{
+    typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct list_c
+    : list20_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, C19
+        >
+{
+    typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/map.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/map.hpp
new file mode 100644
index 0000000..837e013
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/map.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct map;
+
+template<
+     
+    >
+struct map<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map0<  >
+{
+    typedef map0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct map<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map1<T0>
+{
+    typedef typename map1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct map<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map2< T0,T1 >
+{
+    typedef typename map2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct map<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map3< T0,T1,T2 >
+{
+    typedef typename map3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct map<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map4< T0,T1,T2,T3 >
+{
+    typedef typename map4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct map<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map5< T0,T1,T2,T3,T4 >
+{
+    typedef typename map5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : map15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : map16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : map17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : map18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : map19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct map
+    : map20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/minus.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/minus.hpp
new file mode 100644
index 0000000..71d4913
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/minus.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/minus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct minus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct minus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct minus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct minus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct minus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct minus
+    : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , minus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct minus< N1,N2,N3,N4,na >
+
+    : minus< minus< minus< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct minus< N1,N2,N3,na,na >
+
+    : minus< minus< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct minus< N1,N2,na,na,na >
+    : minus_impl<
+          typename minus_tag<N1>::type
+        , typename minus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, minus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct minus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  - BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp
new file mode 100644
index 0000000..224b349
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp
@@ -0,0 +1,101 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/modulus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct modulus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct modulus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct modulus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct modulus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct modulus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct modulus
+
+    : modulus_impl<
+          typename modulus_tag<N1>::type
+        , typename modulus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct modulus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  % BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp
new file mode 100644
index 0000000..98b21b1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/not_equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct not_equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct not_equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct not_equal_to_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct not_equal_to_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct not_equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct not_equal_to
+
+    : not_equal_to_impl<
+          typename not_equal_to_tag<N1>::type
+        , typename not_equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct not_equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/or.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/or.hpp
new file mode 100644
index 0000000..31e1aaa
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/or.hpp
@@ -0,0 +1,69 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/or.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C_, typename T1, typename T2, typename T3, typename T4 >
+struct or_impl
+    : true_
+{
+};
+
+template< typename T1, typename T2, typename T3, typename T4 >
+struct or_impl< false,T1,T2,T3,T4 >
+    : or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4
+        , false_
+        >
+{
+};
+
+template<>
+struct or_impl<
+          false
+        , false_, false_, false_, false_
+        >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = false_, typename T4 = false_, typename T5 = false_
+    >
+struct or_
+
+    : aux::or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4, T5
+        >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , or_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , or_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp
new file mode 100644
index 0000000..ff97364
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp
@@ -0,0 +1,105 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright Peter Dimov 2001-2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/placeholders.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg< -1 > _;
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_;
+}
+
+}}
+
+/// agurt, 17/mar/02: one more placeholder for the last 'apply#' 
+/// specialization
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<1> _1;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<2> _2;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<3> _3;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<4> _4;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<5> _5;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<6> _6;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6;
+}
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/plus.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/plus.hpp
new file mode 100644
index 0000000..a9f6ee7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/plus.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/plus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct plus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct plus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct plus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct plus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct plus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct plus
+    : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , plus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct plus< N1,N2,N3,N4,na >
+
+    : plus< plus< plus< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct plus< N1,N2,N3,na,na >
+
+    : plus< plus< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct plus< N1,N2,na,na,na >
+    : plus_impl<
+          typename plus_tag<N1>::type
+        , typename plus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, plus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct plus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  + BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/quote.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/quote.hpp
new file mode 100644
index 0000000..e7a7f00
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/quote.hpp
@@ -0,0 +1,11 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/quote.hpp" header
+// -- DO NOT modify by hand!
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp
new file mode 100644
index 0000000..7a07414
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp
@@ -0,0 +1,295 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl;
+
+template< long N >
+struct reverse_fold_chunk;
+
+template<> struct reverse_fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef fwd_state0 bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter0 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef fwd_state1 bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter1 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef fwd_state2 bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter2 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef fwd_state3 bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter3 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef fwd_state4 bkwd_state4;
+        typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter4 iterator;
+    };
+};
+
+template< long N >
+struct reverse_fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef reverse_fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , iter4
+            , Last
+            , fwd_state4
+            , BackwardOp
+            , ForwardOp
+            > nested_chunk;
+
+        typedef typename nested_chunk::state bkwd_state4;
+        typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef typename nested_chunk::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct reverse_fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct reverse_fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , reverse_fold_null_step< Last,State >
+            , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_step
+{
+    typedef reverse_fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , typename deref<First>::type
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl
+    : reverse_fold_chunk<N>
+        ::template result_< First,Last,State,BackwardOp,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp
new file mode 100644
index 0000000..39a4057
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp
@@ -0,0 +1,295 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl;
+
+template< long N >
+struct reverse_iter_fold_chunk;
+
+template<> struct reverse_iter_fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef fwd_state0 bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter0 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef fwd_state1 bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter1 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef fwd_state2 bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter2 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef fwd_state3 bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter3 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef fwd_state4 bkwd_state4;
+        typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter4 iterator;
+    };
+};
+
+template< long N >
+struct reverse_iter_fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef reverse_iter_fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , iter4
+            , Last
+            , fwd_state4
+            , BackwardOp
+            , ForwardOp
+            > nested_chunk;
+
+        typedef typename nested_chunk::state bkwd_state4;
+        typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef typename nested_chunk::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct reverse_iter_fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct reverse_iter_fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , reverse_iter_fold_null_step< Last,State >
+            , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_step
+{
+    typedef reverse_iter_fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , First
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl
+    : reverse_iter_fold_chunk<N>
+        ::template result_< First,Last,State,BackwardOp,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/set.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/set.hpp
new file mode 100644
index 0000000..5721922
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/set.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct set;
+
+template<
+     
+    >
+struct set<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set0<  >
+{
+    typedef set0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct set<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set1<T0>
+{
+    typedef typename set1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct set<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set2< T0,T1 >
+{
+    typedef typename set2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct set<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set3< T0,T1,T2 >
+{
+    typedef typename set3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct set<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set4< T0,T1,T2,T3 >
+{
+    typedef typename set4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct set<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set5< T0,T1,T2,T3,T4 >
+{
+    typedef typename set5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : set15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : set16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : set17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : set18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : set19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct set
+    : set20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/set_c.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/set_c.hpp
new file mode 100644
index 0000000..cbeb932
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/set_c.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct set_c;
+
+template<
+      typename T
+    >
+struct set_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set0_c<T>
+{
+    typedef typename set0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct set_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set1_c< T,C0 >
+{
+    typedef typename set1_c< T,C0 >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct set_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set2_c< T,C0,C1 >
+{
+    typedef typename set2_c< T,C0,C1 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct set_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set3_c< T,C0,C1,C2 >
+{
+    typedef typename set3_c< T,C0,C1,C2 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct set_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set4_c< T,C0,C1,C2,C3 >
+{
+    typedef typename set4_c< T,C0,C1,C2,C3 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set5_c< T,C0,C1,C2,C3,C4 >
+{
+    typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set6_c< T,C0,C1,C2,C3,C4,C5 >
+{
+    typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+{
+    typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+{
+    typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+{
+    typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+{
+    typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+{
+    typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+{
+    typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+{
+    typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set14_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        >
+{
+    typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set15_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        >
+{
+    typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set16_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15
+        >
+{
+    typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set17_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16
+        >
+{
+    typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : set18_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17
+        >
+{
+    typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : set19_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18
+        >
+{
+    typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct set_c
+    : set20_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, C19
+        >
+{
+    typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp
new file mode 100644
index 0000000..b5b181c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp
@@ -0,0 +1,99 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_left.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_left_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_left_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_left_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_left_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_left_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_left
+
+    : shift_left_impl<
+          typename shift_left_tag<N1>::type
+        , typename shift_left_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct shift_left_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  << BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp
new file mode 100644
index 0000000..f7a342e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp
@@ -0,0 +1,99 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_right.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_right_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_right_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_right_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_right_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_right_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_right
+
+    : shift_right_impl<
+          typename shift_right_tag<N1>::type
+        , typename shift_right_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct shift_right_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  >> BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp
new file mode 100644
index 0000000..1164f0f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp
@@ -0,0 +1,40 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< bool >
+struct template_arity_impl
+{
+    template< typename F > struct result_
+        : mpl::int_< -1 >
+    {
+    };
+};
+
+template<>
+struct template_arity_impl<true>
+{
+    template< typename F > struct result_
+        : F::arity
+    {
+    };
+};
+
+template< typename F >
+struct template_arity
+    : template_arity_impl< ::boost::mpl::aux::has_rebind<F>::value >
+        ::template result_<F>
+{
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/times.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/times.hpp
new file mode 100644
index 0000000..cb97cc4
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/times.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/times.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct times_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct times_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct times_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct times_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct times_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct times
+    : times< times< times< times< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , times
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct times< N1,N2,N3,N4,na >
+
+    : times< times< times< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct times< N1,N2,N3,na,na >
+
+    : times< times< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct times< N1,N2,na,na,na >
+    : times_impl<
+          typename times_tag<N1>::type
+        , typename times_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, times)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct times_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  * BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp
new file mode 100644
index 0000000..ef7c2b0
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/unpack_args.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< int size, typename F, typename Args >
+struct unpack_args_impl;
+
+template< typename F, typename Args >
+struct unpack_args_impl< 0,F,Args >
+    : apply0<
+          F
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 1,F,Args >
+    : apply1<
+          F
+        , typename at_c< Args,0 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 2,F,Args >
+    : apply2<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 3,F,Args >
+    : apply3<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 4,F,Args >
+    : apply4<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 5,F,Args >
+    : apply5<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+        , typename at_c< Args,4 >::type
+        >
+{
+};
+
+}
+
+template<
+      typename F
+    >
+struct unpack_args
+{
+    template< typename Args > struct apply
+    {
+        typedef typename aux::unpack_args_impl<
+              size<Args>::value
+            , F
+            , Args
+            >::type type;
+
+    };
+};
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/vector.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/vector.hpp
new file mode 100644
index 0000000..bfa9565
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/vector.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct vector;
+
+template<
+     
+    >
+struct vector<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector0<  >
+{
+    typedef vector0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct vector<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector1<T0>
+{
+    typedef typename vector1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct vector<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector2< T0,T1 >
+{
+    typedef typename vector2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct vector<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector3< T0,T1,T2 >
+{
+    typedef typename vector3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct vector<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector4< T0,T1,T2,T3 >
+{
+    typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct vector<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector5< T0,T1,T2,T3,T4 >
+{
+    typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : vector15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : vector16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : vector17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : vector18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : vector19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct vector
+    : vector20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp b/ext/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp
new file mode 100644
index 0000000..0f1560d
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp
@@ -0,0 +1,309 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct vector_c;
+
+template<
+      typename T
+    >
+struct vector_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector0_c<T>
+{
+    typedef typename vector0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct vector_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector1_c< T, T(C0) >
+{
+    typedef typename vector1_c< T, T(C0) >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct vector_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector2_c< T, T(C0), T(C1) >
+{
+    typedef typename vector2_c< T, T(C0), T(C1) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct vector_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector3_c< T, T(C0), T(C1), T(C2) >
+{
+    typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector4_c< T, T(C0), T(C1), T(C2), T(C3) >
+{
+    typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >
+{
+    typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >
+{
+    typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >
+{
+    typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >
+{
+    typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >
+{
+    typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >
+{
+    typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >
+{
+    typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >
+{
+    typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >
+{
+    typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >
+{
+    typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >
+{
+    typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >
+{
+    typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >
+{
+    typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >
+{
+    typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >
+{
+    typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct vector_c
+    : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >
+{
+    typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/advance_backward.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/advance_backward.hpp
new file mode 100644
index 0000000..5cb50dc
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/advance_backward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "advance_backward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_backward;
+template<>
+struct advance_backward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_backward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_backward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_backward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_backward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef typename prior<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_backward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_backward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_backward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/advance_forward.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/advance_forward.hpp
new file mode 100644
index 0000000..9654ee3
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/advance_forward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "advance_forward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_forward;
+template<>
+struct advance_forward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_forward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_forward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_forward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_forward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef typename next<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_forward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_forward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_forward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/and.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/and.hpp
new file mode 100644
index 0000000..f345689
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/and.hpp
@@ -0,0 +1,69 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "and.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C_, typename T1, typename T2, typename T3, typename T4 >
+struct and_impl
+    : false_
+{
+};
+
+template< typename T1, typename T2, typename T3, typename T4 >
+struct and_impl< true,T1,T2,T3,T4 >
+    : and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4
+        , true_
+        >
+{
+};
+
+template<>
+struct and_impl<
+          true
+        , true_, true_, true_, true_
+        >
+    : true_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = true_, typename T4 = true_, typename T5 = true_
+    >
+struct and_
+
+    : aux::and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4, T5
+        >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , and_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , and_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/apply.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/apply.hpp
new file mode 100644
index 0000000..bce7c2c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/apply.hpp
@@ -0,0 +1,169 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "apply.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct apply0
+
+    : apply_wrap0<
+          typename lambda<F>::type
+       
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          1
+        , apply0
+        , (F )
+        )
+};
+
+template<
+      typename F
+    >
+struct apply< F,na,na,na,na,na >
+    : apply0<F>
+{
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply1
+
+    : apply_wrap1<
+          typename lambda<F>::type
+        , T1
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          2
+        , apply1
+        , (F, T1)
+        )
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply< F,T1,na,na,na,na >
+    : apply1< F,T1 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2
+
+    : apply_wrap2<
+          typename lambda<F>::type
+        , T1, T2
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , apply2
+        , (F, T1, T2)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply< F,T1,T2,na,na,na >
+    : apply2< F,T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3
+
+    : apply_wrap3<
+          typename lambda<F>::type
+        , T1, T2, T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , apply3
+        , (F, T1, T2, T3)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply< F,T1,T2,T3,na,na >
+    : apply3< F,T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4
+
+    : apply_wrap4<
+          typename lambda<F>::type
+        , T1, T2, T3, T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , apply4
+        , (F, T1, T2, T3, T4)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply< F,T1,T2,T3,T4,na >
+    : apply4< F,T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5
+
+    : apply_wrap5<
+          typename lambda<F>::type
+        , T1, T2, T3, T4, T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          6
+        , apply5
+        , (F, T1, T2, T3, T4, T5)
+        )
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply
+    : apply5< F,T1,T2,T3,T4,T5 >
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/apply_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/apply_fwd.hpp
new file mode 100644
index 0000000..1ba706f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/apply_fwd.hpp
@@ -0,0 +1,52 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "apply_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na
+    >
+struct apply;
+
+template<
+      typename F
+    >
+struct apply0;
+
+template<
+      typename F, typename T1
+    >
+struct apply1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/apply_wrap.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/apply_wrap.hpp
new file mode 100644
index 0000000..d88129d
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/apply_wrap.hpp
@@ -0,0 +1,456 @@
+
+// Copyright Aleksey Gurtovoy 2000-2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "apply_wrap.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      int N, typename F
+    >
+struct apply_wrap_impl0;
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          0
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+/// since the defaults are "lost", we have to pass *something* even for nullary
+/// metafunction classes
+        na
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          1
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          2
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na, na
+
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          3
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na, na, na
+
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          4
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na, na, na, na
+
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          5
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na, na, na, na, na
+
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap0
+    : apply_wrap_impl0<
+          ::boost::mpl::aux::arity< F,0 >::value
+        , F
+       
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1
+    >
+struct apply_wrap_impl1;
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          1
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          2
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        , na
+
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          3
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        , na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          4
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        , na, na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          5
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        , na, na, na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap1
+    : apply_wrap_impl1<
+          ::boost::mpl::aux::arity< F,1 >::value
+        , F
+        , T1
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2<
+          2
+        , F
+        , T1, T2
+        >
+{
+    typedef typename F::template apply<
+          T1, T2
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2<
+          3
+        , F
+        , T1, T2
+        >
+{
+    typedef typename F::template apply<
+          T1, T2
+
+        , na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2<
+          4
+        , F
+        , T1, T2
+        >
+{
+    typedef typename F::template apply<
+          T1, T2
+
+        , na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2<
+          5
+        , F
+        , T1, T2
+        >
+{
+    typedef typename F::template apply<
+          T1, T2
+
+        , na, na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap2
+    : apply_wrap_impl2<
+          ::boost::mpl::aux::arity< F,2 >::value
+        , F
+        , T1, T2
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap_impl3;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap_impl3<
+          3
+        , F
+        , T1, T2, T3
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap_impl3<
+          4
+        , F
+        , T1, T2, T3
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3
+
+        , na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap_impl3<
+          5
+        , F
+        , T1, T2, T3
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3
+
+        , na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap3
+    : apply_wrap_impl3<
+          ::boost::mpl::aux::arity< F,3 >::value
+        , F
+        , T1, T2, T3
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap_impl4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap_impl4<
+          4
+        , F
+        , T1, T2, T3, T4
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3, T4
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap_impl4<
+          5
+        , F
+        , T1, T2, T3, T4
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3, T4
+
+        , na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap4
+    : apply_wrap_impl4<
+          ::boost::mpl::aux::arity< F,4 >::value
+        , F
+        , T1, T2, T3, T4
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply_wrap_impl5;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply_wrap_impl5<
+          5
+        , F
+        , T1, T2, T3, T4, T5
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3, T4, T5
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply_wrap5
+    : apply_wrap_impl5<
+          ::boost::mpl::aux::arity< F,5 >::value
+        , F
+        , T1, T2, T3, T4, T5
+        >::type
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/arg.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/arg.hpp
new file mode 100644
index 0000000..3ac4340
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/arg.hpp
@@ -0,0 +1,117 @@
+
+// Copyright Peter Dimov 2001-2002
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "arg.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+template<> struct arg< -1 >
+{
+    BOOST_STATIC_CONSTANT(int, value  = -1);
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<1>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 1);
+    typedef arg<2> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<2>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 2);
+    typedef arg<3> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+        typedef U2 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<3>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 3);
+    typedef arg<4> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+        typedef U3 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<4>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 4);
+    typedef arg<5> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+        typedef U4 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<5>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 5);
+    typedef arg<6> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+        typedef U5 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg)
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/basic_bind.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/basic_bind.hpp
new file mode 100644
index 0000000..74b0029
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/basic_bind.hpp
@@ -0,0 +1,300 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "basic_bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+{
+    typedef T type;
+};
+
+template<
+      int N, typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
+{
+    typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind0<F>, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind0<F> f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename U1, typename U2, typename U3
+    , typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind1< F,T1 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind1< F,T1 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename U1, typename U2
+    , typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind2< F,T1,T2 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind2< F,T1,T2 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename U1
+    , typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind3< F,T1,T2,T3 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind4< F,T1,T2,T3,T4 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+        typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
+
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind5< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bind.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bind.hpp
new file mode 100644
index 0000000..e769a0c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bind.hpp
@@ -0,0 +1,397 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+{
+    typedef T type;
+};
+
+template<
+      typename T
+    , typename Arg
+    >
+struct replace_unnamed_arg
+{
+    typedef Arg next;
+    typedef T type;
+};
+
+template<
+      typename Arg
+    >
+struct replace_unnamed_arg< arg< -1 >, Arg >
+{
+    typedef typename Arg::next next;
+    typedef Arg type;
+};
+
+template<
+      int N, typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
+{
+    typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind0<F>, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind0<F> f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename U1, typename U2, typename U3
+    , typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind1< F,T1 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind1< F,T1 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename U1, typename U2
+    , typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind2< F,T1,T2 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind2< F,T1,T2 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename U1
+    , typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind3< F,T1,T2,T3 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind4< F,T1,T2,T3,T4 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4, typename U5
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+        typedef aux::replace_unnamed_arg< T5,n5 > r5;
+        typedef typename r5::type a5;
+        typedef typename r5::next n6;
+        typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5;
+        ///
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind5< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bind_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bind_fwd.hpp
new file mode 100644
index 0000000..962b5c9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bind_fwd.hpp
@@ -0,0 +1,46 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "bind_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct bind0;
+
+template<
+      typename F, typename T1
+    >
+struct bind1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bitand.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bitand.hpp
new file mode 100644
index 0000000..527b689
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bitand.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "bitand.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitand_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitand_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitand_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitand_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitand_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitand_
+    : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitand_< N1,N2,N3,N4,na >
+
+    : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitand_< N1,N2,N3,na,na >
+
+    : bitand_< bitand_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitand_< N1,N2,na,na,na >
+    : bitand_impl<
+          typename bitand_tag<N1>::type
+        , typename bitand_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitand_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  & BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bitor.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bitor.hpp
new file mode 100644
index 0000000..3f0d5ca
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bitor.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "bitor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitor_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitor_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitor_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitor_
+    : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitor_< N1,N2,N3,N4,na >
+
+    : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitor_< N1,N2,N3,na,na >
+
+    : bitor_< bitor_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitor_< N1,N2,na,na,na >
+    : bitor_impl<
+          typename bitor_tag<N1>::type
+        , typename bitor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  | BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bitxor.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bitxor.hpp
new file mode 100644
index 0000000..06996c0
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bitxor.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "bitxor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitxor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitxor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitxor_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitxor_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitxor_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitxor_
+    : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitxor_< N1,N2,N3,N4,na >
+
+    : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitxor_< N1,N2,N3,na,na >
+
+    : bitxor_< bitxor_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitxor_< N1,N2,na,na,na >
+    : bitxor_impl<
+          typename bitxor_tag<N1>::type
+        , typename bitxor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitxor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/deque.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/deque.hpp
new file mode 100644
index 0000000..06505c9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/deque.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "deque.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct deque;
+
+template<
+     
+    >
+struct deque<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector0<  >
+{
+    typedef vector0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct deque<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector1<T0>
+{
+    typedef typename vector1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct deque<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector2< T0,T1 >
+{
+    typedef typename vector2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct deque<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector3< T0,T1,T2 >
+{
+    typedef typename vector3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct deque<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector4< T0,T1,T2,T3 >
+{
+    typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct deque<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector5< T0,T1,T2,T3,T4 >
+{
+    typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : vector15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : vector16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : vector17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : vector18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : vector19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct deque
+    : vector20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/divides.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/divides.hpp
new file mode 100644
index 0000000..6b4178a
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/divides.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "divides.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct divides_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct divides_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct divides_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct divides_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct divides_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct divides
+    : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , divides
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct divides< N1,N2,N3,N4,na >
+
+    : divides< divides< divides< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct divides< N1,N2,N3,na,na >
+
+    : divides< divides< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct divides< N1,N2,na,na,na >
+    : divides_impl<
+          typename divides_tag<N1>::type
+        , typename divides_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, divides)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct divides_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  / BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/equal_to.hpp
new file mode 100644
index 0000000..901a93c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/equal_to.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct equal_to_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct equal_to_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct equal_to
+
+    : equal_to_impl<
+          typename equal_to_tag<N1>::type
+        , typename equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value  == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/fold_impl.hpp
new file mode 100644
index 0000000..45ab4e7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/fold_impl.hpp
@@ -0,0 +1,180 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 0,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 1,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef state1 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 2,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef state2 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 3,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef state3 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 4,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef state4 state;
+    typedef iter4 iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl
+{
+    typedef fold_impl<
+          4
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< -1,First,Last,State,ForwardOp >
+    : fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< -1,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/full_lambda.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/full_lambda.hpp
new file mode 100644
index 0000000..8b2bf59
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/full_lambda.hpp
@@ -0,0 +1,558 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "full_lambda.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+    , typename Arity
+    >
+struct lambda
+{
+    typedef false_ is_le;
+    typedef T result_;
+    typedef T type;
+};
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+template< int N, typename Tag >
+struct lambda< arg<N>,Tag, int_< -1 > >
+{
+    typedef true_ is_le;
+    typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41
+    typedef mpl::protect<result_> type;
+};
+
+template<
+      typename F
+    , typename Tag
+    >
+struct lambda<
+          bind0<F>
+        , Tag
+        , int_<1>
+        >
+{
+    typedef false_ is_le;
+    typedef bind0<
+          F
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1
+{
+    typedef F<
+          typename L1::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1< true_,Tag,F,L1 >
+{
+    typedef bind1<
+          quote1< F,Tag >
+        , typename L1::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1 > class F
+    , typename T1
+    , typename Tag
+    >
+struct lambda<
+          F<T1>
+        , Tag
+        , int_<1>
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef typename l1::is_le is_le1;
+    typedef typename aux::lambda_or<
+          is_le1::value
+        >::type is_le;
+
+    typedef aux::le_result1<
+          is_le, Tag, F, l1
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1
+    , typename Tag
+    >
+struct lambda<
+          bind1< F,T1 >
+        , Tag
+        , int_<2>
+        >
+{
+    typedef false_ is_le;
+    typedef bind1<
+          F
+        , T1
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2
+{
+    typedef F<
+          typename L1::type, typename L2::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2< true_,Tag,F,L1,L2 >
+{
+    typedef bind2<
+          quote2< F,Tag >
+        , typename L1::result_, typename L2::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2 > class F
+    , typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2 >
+        , Tag
+        , int_<2>
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value
+        >::type is_le;
+
+    typedef aux::le_result2<
+          is_le, Tag, F, l1, l2
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          bind2< F,T1,T2 >
+        , Tag
+        , int_<3>
+        >
+{
+    typedef false_ is_le;
+    typedef bind2<
+          F
+        , T1, T2
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3< true_,Tag,F,L1,L2,L3 >
+{
+    typedef bind3<
+          quote3< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3 > class F
+    , typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3 >
+        , Tag
+        , int_<3>
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value
+        >::type is_le;
+
+    typedef aux::le_result3<
+          is_le, Tag, F, l1, l2, l3
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          bind3< F,T1,T2,T3 >
+        , Tag
+        , int_<4>
+        >
+{
+    typedef false_ is_le;
+    typedef bind3<
+          F
+        , T1, T2, T3
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4< true_,Tag,F,L1,L2,L3,L4 >
+{
+    typedef bind4<
+          quote4< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4 >
+        , Tag
+        , int_<4>
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        >::type is_le;
+
+    typedef aux::le_result4<
+          is_le, Tag, F, l1, l2, l3, l4
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          bind4< F,T1,T2,T3,T4 >
+        , Tag
+        , int_<5>
+        >
+{
+    typedef false_ is_le;
+    typedef bind4<
+          F
+        , T1, T2, T3, T4
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type, typename L5::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 >
+{
+    typedef bind5<
+          quote5< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_, typename L5::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template<
+          typename P1, typename P2, typename P3, typename P4
+        , typename P5
+        >
+      class F
+    , typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4,T5 >
+        , Tag
+        , int_<5>
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    typedef lambda< T5,Tag > l5;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    typedef typename l5::is_le is_le5;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        , is_le5::value
+        >::type is_le;
+
+    typedef aux::le_result5<
+          is_le, Tag, F, l1, l2, l3, l4, l5
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind5< F,T1,T2,T3,T4,T5 >
+        , Tag
+        , int_<6>
+        >
+{
+    typedef false_ is_le;
+    typedef bind5<
+          F
+        , T1, T2, T3, T4, T5
+        > result_;
+
+    typedef result_ type;
+};
+
+/// special case for 'protect'
+template< typename T, typename Tag >
+struct lambda< mpl::protect<T>,Tag, int_<1> >
+{
+    typedef false_ is_le;
+    typedef mpl::protect<T> result_;
+    typedef result_ type;
+};
+
+/// specializations for the main 'bind' form
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind< F,T1,T2,T3,T4,T5 >
+        , Tag
+        , int_<6>
+        >
+{
+    typedef false_ is_le;
+    typedef bind< F,T1,T2,T3,T4,T5 > result_;
+    typedef result_ type;
+};
+
+template<
+      typename F
+    , typename Tag1
+    , typename Tag2
+    , typename Arity
+    >
+struct lambda<
+          lambda< F,Tag1,Arity >
+        , Tag2
+        , int_<3>
+        >
+{
+    typedef lambda< F,Tag2 > l1;
+    typedef lambda< Tag1,Tag2 > l2;
+    typedef typename l1::is_le is_le;
+    typedef bind1< quote1<aux::template_arity>, typename l1::result_ > arity_;
+    typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3;
+    typedef aux::le_result3<is_le, Tag2, mpl::lambda, l1, l2, l3> le_result_;
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/greater.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/greater.hpp
new file mode 100644
index 0000000..3d1c3dc
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/greater.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "greater.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater
+
+    : greater_impl<
+          typename greater_tag<N1>::type
+        , typename greater_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/greater_equal.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/greater_equal.hpp
new file mode 100644
index 0000000..fb01186
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/greater_equal.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "greater_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_equal_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_equal_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater_equal
+
+    : greater_equal_impl<
+          typename greater_equal_tag<N1>::type
+        , typename greater_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/inherit.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/inherit.hpp
new file mode 100644
index 0000000..6adcc01
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/inherit.hpp
@@ -0,0 +1,139 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "inherit.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    >
+struct inherit2
+    : T1, T2
+{
+    typedef inherit2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2))
+};
+
+template< typename T1 >
+struct inherit2< T1,empty_base >
+{
+    typedef T1 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base))
+};
+
+template< typename T2 >
+struct inherit2< empty_base,T2 >
+{
+    typedef T2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2))
+};
+
+template<>
+struct inherit2< empty_base,empty_base >
+{
+    typedef empty_base type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, inherit2)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na
+    >
+struct inherit3
+    : inherit2<
+          typename inherit2<
+              T1, T2
+            >::type
+        , T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , inherit3
+        , ( T1, T2, T3)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, inherit3)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    >
+struct inherit4
+    : inherit2<
+          typename inherit3<
+              T1, T2, T3
+            >::type
+        , T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , inherit4
+        , ( T1, T2, T3, T4)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(4, inherit4)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    , typename T5 = na
+    >
+struct inherit5
+    : inherit2<
+          typename inherit4<
+              T1, T2, T3, T4
+            >::type
+        , T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , inherit5
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(5, inherit5)
+
+/// primary template
+
+template<
+      typename T1 = empty_base, typename T2 = empty_base
+    , typename T3 = empty_base, typename T4 = empty_base
+    , typename T5 = empty_base
+    >
+struct inherit
+    : inherit5< T1,T2,T3,T4,T5 >
+{
+};
+
+template<>
+struct inherit< na,na,na,na,na >
+{
+    template<
+
+          typename T1, typename T2, typename T3, typename T4, typename T5
+
+        >
+    struct apply
+        : inherit< T1,T2,T3,T4,T5 >
+    {
+    };
+};
+
+BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_if_impl.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_if_impl.hpp
new file mode 100644
index 0000000..b767e95
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_if_impl.hpp
@@ -0,0 +1,133 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright David Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "iter_fold_if_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename Iterator, typename State >
+struct iter_fold_if_null_step
+{
+    typedef State state;
+    typedef Iterator iterator;
+};
+
+template< bool >
+struct iter_fold_if_step_impl
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef typename apply2< StateOp,State,Iterator >::type state;
+        typedef typename IteratorOp::type iterator;
+    };
+};
+
+template<>
+struct iter_fold_if_step_impl<false>
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef State state;
+        typedef Iterator iterator;
+    };
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_forward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename BackwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_backward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename ForwardPredicate
+    , typename BackwardOp
+    , typename BackwardPredicate
+    >
+struct iter_fold_if_impl
+{
+ private:
+    typedef iter_fold_if_null_step< Iterator,State > forward_step0;
+    typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1;
+    typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2;
+    typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3;
+    typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4;
+    
+
+    typedef typename if_<
+          typename forward_step4::not_last
+        , iter_fold_if_impl<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            , ForwardOp
+            , ForwardPredicate
+            , BackwardOp
+            , BackwardPredicate
+            >
+        , iter_fold_if_null_step<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            >
+        >::type backward_step4;
+
+    typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3;
+    typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2;
+    typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1;
+    typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0;
+    
+
+ public:
+    typedef typename backward_step0::state state;
+    typedef typename backward_step4::iterator iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_impl.hpp
new file mode 100644
index 0000000..1dd216c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_impl.hpp
@@ -0,0 +1,180 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 0,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 1,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef state1 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 2,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef state2 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 3,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef state3 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 4,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef state4 state;
+    typedef iter4 iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl
+{
+    typedef iter_fold_impl<
+          4
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef iter_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< -1,First,Last,State,ForwardOp >
+    : iter_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< -1,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/lambda_no_ctps.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/lambda_no_ctps.hpp
new file mode 100644
index 0000000..75b30ce
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/lambda_no_ctps.hpp
@@ -0,0 +1,229 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "lambda_no_ctps.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+template< typename Arity > struct lambda_impl
+{
+    template< typename T, typename Tag, typename Protect > struct result_
+    {
+        typedef T type;
+        typedef is_placeholder<T> is_le;
+    };
+};
+
+template<> struct lambda_impl< int_<1> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef typename l1::is_le is_le1;
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value
+            > is_le;
+
+        typedef bind1<
+              typename F::rebind
+            , typename l1::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<2> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value
+            > is_le;
+
+        typedef bind2<
+              typename F::rebind
+            , typename l1::type, typename l2::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<3> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value
+            > is_le;
+
+        typedef bind3<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<4> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value
+            > is_le;
+
+        typedef bind4<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<5> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        typedef lambda< typename F::arg5, Tag, false_ > l5;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        typedef typename l5::is_le is_le5;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value
+            > is_le;
+
+        typedef bind5<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type, typename l5::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+    , typename Protect
+    >
+struct lambda
+{
+    /// Metafunction forwarding confuses MSVC 6.x
+    typedef typename aux::template_arity<T>::type arity_;
+    typedef typename aux::lambda_impl<arity_>
+        ::template result_< T,Tag,Protect > l_;
+
+    typedef typename l_::type type;
+    typedef typename l_::is_le is_le;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect))
+};
+
+BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/less.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/less.hpp
new file mode 100644
index 0000000..0b6ce1d
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/less.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "less.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less
+
+    : less_impl<
+          typename less_tag<N1>::type
+        , typename less_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/less_equal.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/less_equal.hpp
new file mode 100644
index 0000000..0010e08
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/less_equal.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "less_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_equal_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_equal_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less_equal
+
+    : less_equal_impl<
+          typename less_equal_tag<N1>::type
+        , typename less_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/list.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/list.hpp
new file mode 100644
index 0000000..cbd58ac
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/list.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "list.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct list;
+
+template<
+     
+    >
+struct list<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list0<  >
+{
+    typedef list0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct list<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list1<T0>
+{
+    typedef typename list1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct list<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list2< T0,T1 >
+{
+    typedef typename list2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct list<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list3< T0,T1,T2 >
+{
+    typedef typename list3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct list<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list4< T0,T1,T2,T3 >
+{
+    typedef typename list4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct list<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list5< T0,T1,T2,T3,T4 >
+{
+    typedef typename list5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : list15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : list16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : list17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : list18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : list19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct list
+    : list20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/list_c.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/list_c.hpp
new file mode 100644
index 0000000..495c3f7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/list_c.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "list_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct list_c;
+
+template<
+      typename T
+    >
+struct list_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list0_c<T>
+{
+    typedef typename list0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct list_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list1_c< T,C0 >
+{
+    typedef typename list1_c< T,C0 >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct list_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list2_c< T,C0,C1 >
+{
+    typedef typename list2_c< T,C0,C1 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct list_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list3_c< T,C0,C1,C2 >
+{
+    typedef typename list3_c< T,C0,C1,C2 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct list_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list4_c< T,C0,C1,C2,C3 >
+{
+    typedef typename list4_c< T,C0,C1,C2,C3 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list5_c< T,C0,C1,C2,C3,C4 >
+{
+    typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list6_c< T,C0,C1,C2,C3,C4,C5 >
+{
+    typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+{
+    typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+{
+    typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+{
+    typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+{
+    typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+{
+    typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+{
+    typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+{
+    typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list14_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        >
+{
+    typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list15_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        >
+{
+    typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list16_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15
+        >
+{
+    typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list17_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16
+        >
+{
+    typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : list18_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17
+        >
+{
+    typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : list19_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18
+        >
+{
+    typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct list_c
+    : list20_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, C19
+        >
+{
+    typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/map.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/map.hpp
new file mode 100644
index 0000000..80ef156
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/map.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "map.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct map;
+
+template<
+     
+    >
+struct map<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map0<  >
+{
+    typedef map0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct map<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map1<T0>
+{
+    typedef typename map1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct map<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map2< T0,T1 >
+{
+    typedef typename map2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct map<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map3< T0,T1,T2 >
+{
+    typedef typename map3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct map<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map4< T0,T1,T2,T3 >
+{
+    typedef typename map4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct map<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map5< T0,T1,T2,T3,T4 >
+{
+    typedef typename map5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : map15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : map16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : map17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : map18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : map19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct map
+    : map20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/minus.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/minus.hpp
new file mode 100644
index 0000000..cfddc15
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/minus.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "minus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct minus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct minus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct minus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct minus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct minus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct minus
+    : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , minus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct minus< N1,N2,N3,N4,na >
+
+    : minus< minus< minus< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct minus< N1,N2,N3,na,na >
+
+    : minus< minus< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct minus< N1,N2,na,na,na >
+    : minus_impl<
+          typename minus_tag<N1>::type
+        , typename minus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, minus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct minus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  - BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/modulus.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/modulus.hpp
new file mode 100644
index 0000000..eb5eff0
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/modulus.hpp
@@ -0,0 +1,101 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "modulus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct modulus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct modulus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct modulus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct modulus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct modulus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct modulus
+
+    : modulus_impl<
+          typename modulus_tag<N1>::type
+        , typename modulus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct modulus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  % BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/not_equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/not_equal_to.hpp
new file mode 100644
index 0000000..68356ee
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/not_equal_to.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "not_equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct not_equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct not_equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct not_equal_to_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct not_equal_to_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct not_equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct not_equal_to
+
+    : not_equal_to_impl<
+          typename not_equal_to_tag<N1>::type
+        , typename not_equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct not_equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/or.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/or.hpp
new file mode 100644
index 0000000..ff7ce9f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/or.hpp
@@ -0,0 +1,69 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "or.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C_, typename T1, typename T2, typename T3, typename T4 >
+struct or_impl
+    : true_
+{
+};
+
+template< typename T1, typename T2, typename T3, typename T4 >
+struct or_impl< false,T1,T2,T3,T4 >
+    : or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4
+        , false_
+        >
+{
+};
+
+template<>
+struct or_impl<
+          false
+        , false_, false_, false_, false_
+        >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = false_, typename T4 = false_, typename T5 = false_
+    >
+struct or_
+
+    : aux::or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4, T5
+        >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , or_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , or_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/placeholders.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/placeholders.hpp
new file mode 100644
index 0000000..b306bbb
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/placeholders.hpp
@@ -0,0 +1,105 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright Peter Dimov 2001-2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "placeholders.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg< -1 > _;
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_;
+}
+
+}}
+
+/// agurt, 17/mar/02: one more placeholder for the last 'apply#' 
+/// specialization
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<1> _1;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<2> _2;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<3> _3;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<4> _4;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<5> _5;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<6> _6;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6;
+}
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/plus.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/plus.hpp
new file mode 100644
index 0000000..82539ab
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/plus.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "plus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct plus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct plus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct plus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct plus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct plus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct plus
+    : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , plus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct plus< N1,N2,N3,N4,na >
+
+    : plus< plus< plus< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct plus< N1,N2,N3,na,na >
+
+    : plus< plus< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct plus< N1,N2,na,na,na >
+    : plus_impl<
+          typename plus_tag<N1>::type
+        , typename plus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, plus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct plus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  + BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/quote.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/quote.hpp
new file mode 100644
index 0000000..7f9d18b
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/quote.hpp
@@ -0,0 +1,11 @@
+
+// Copyright Aleksey Gurtovoy 2000-2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "quote.hpp" header
+// -- DO NOT modify by hand!
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_fold_impl.hpp
new file mode 100644
index 0000000..372f0d2
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_fold_impl.hpp
@@ -0,0 +1,295 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "reverse_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl;
+
+template< long N >
+struct reverse_fold_chunk;
+
+template<> struct reverse_fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef fwd_state0 bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter0 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef fwd_state1 bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter1 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef fwd_state2 bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter2 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef fwd_state3 bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter3 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef fwd_state4 bkwd_state4;
+        typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter4 iterator;
+    };
+};
+
+template< long N >
+struct reverse_fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef reverse_fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , iter4
+            , Last
+            , fwd_state4
+            , BackwardOp
+            , ForwardOp
+            > nested_chunk;
+
+        typedef typename nested_chunk::state bkwd_state4;
+        typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef typename nested_chunk::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct reverse_fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct reverse_fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , reverse_fold_null_step< Last,State >
+            , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_step
+{
+    typedef reverse_fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , typename deref<First>::type
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl
+    : reverse_fold_chunk<N>
+        ::template result_< First,Last,State,BackwardOp,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_iter_fold_impl.hpp
new file mode 100644
index 0000000..44aadf7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_iter_fold_impl.hpp
@@ -0,0 +1,295 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "reverse_iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl;
+
+template< long N >
+struct reverse_iter_fold_chunk;
+
+template<> struct reverse_iter_fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef fwd_state0 bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter0 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef fwd_state1 bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter1 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef fwd_state2 bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter2 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef fwd_state3 bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter3 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef fwd_state4 bkwd_state4;
+        typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter4 iterator;
+    };
+};
+
+template< long N >
+struct reverse_iter_fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef reverse_iter_fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , iter4
+            , Last
+            , fwd_state4
+            , BackwardOp
+            , ForwardOp
+            > nested_chunk;
+
+        typedef typename nested_chunk::state bkwd_state4;
+        typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef typename nested_chunk::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct reverse_iter_fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct reverse_iter_fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , reverse_iter_fold_null_step< Last,State >
+            , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_step
+{
+    typedef reverse_iter_fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , First
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl
+    : reverse_iter_fold_chunk<N>
+        ::template result_< First,Last,State,BackwardOp,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/set.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/set.hpp
new file mode 100644
index 0000000..ace3a4f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/set.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "set.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct set;
+
+template<
+     
+    >
+struct set<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set0<  >
+{
+    typedef set0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct set<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set1<T0>
+{
+    typedef typename set1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct set<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set2< T0,T1 >
+{
+    typedef typename set2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct set<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set3< T0,T1,T2 >
+{
+    typedef typename set3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct set<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set4< T0,T1,T2,T3 >
+{
+    typedef typename set4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct set<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set5< T0,T1,T2,T3,T4 >
+{
+    typedef typename set5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : set15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : set16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : set17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : set18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : set19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct set
+    : set20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/set_c.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/set_c.hpp
new file mode 100644
index 0000000..4e6993c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/set_c.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "set_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct set_c;
+
+template<
+      typename T
+    >
+struct set_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set0_c<T>
+{
+    typedef typename set0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct set_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set1_c< T,C0 >
+{
+    typedef typename set1_c< T,C0 >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct set_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set2_c< T,C0,C1 >
+{
+    typedef typename set2_c< T,C0,C1 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct set_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set3_c< T,C0,C1,C2 >
+{
+    typedef typename set3_c< T,C0,C1,C2 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct set_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set4_c< T,C0,C1,C2,C3 >
+{
+    typedef typename set4_c< T,C0,C1,C2,C3 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set5_c< T,C0,C1,C2,C3,C4 >
+{
+    typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set6_c< T,C0,C1,C2,C3,C4,C5 >
+{
+    typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+{
+    typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+{
+    typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+{
+    typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+{
+    typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+{
+    typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+{
+    typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+{
+    typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set14_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        >
+{
+    typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set15_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        >
+{
+    typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set16_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15
+        >
+{
+    typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set17_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16
+        >
+{
+    typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : set18_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17
+        >
+{
+    typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : set19_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18
+        >
+{
+    typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct set_c
+    : set20_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, C19
+        >
+{
+    typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/shift_left.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/shift_left.hpp
new file mode 100644
index 0000000..6d19e94
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/shift_left.hpp
@@ -0,0 +1,99 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "shift_left.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_left_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_left_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_left_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_left_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_left_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_left
+
+    : shift_left_impl<
+          typename shift_left_tag<N1>::type
+        , typename shift_left_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct shift_left_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  << BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/shift_right.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/shift_right.hpp
new file mode 100644
index 0000000..dd31d97
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/shift_right.hpp
@@ -0,0 +1,99 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "shift_right.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_right_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_right_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_right_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_right_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_right_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_right
+
+    : shift_right_impl<
+          typename shift_right_tag<N1>::type
+        , typename shift_right_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct shift_right_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  >> BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/template_arity.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/template_arity.hpp
new file mode 100644
index 0000000..b24a0a7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/template_arity.hpp
@@ -0,0 +1,40 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "template_arity.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< bool >
+struct template_arity_impl
+{
+    template< typename F > struct result_
+        : mpl::int_< -1 >
+    {
+    };
+};
+
+template<>
+struct template_arity_impl<true>
+{
+    template< typename F > struct result_
+        : F::arity
+    {
+    };
+};
+
+template< typename F >
+struct template_arity
+    : template_arity_impl< ::boost::mpl::aux::has_rebind<F>::value >
+        ::template result_<F>
+{
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/times.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/times.hpp
new file mode 100644
index 0000000..ab100f1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/times.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "times.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct times_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct times_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct times_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct times_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct times_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct times
+    : times< times< times< times< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , times
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct times< N1,N2,N3,N4,na >
+
+    : times< times< times< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct times< N1,N2,N3,na,na >
+
+    : times< times< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct times< N1,N2,na,na,na >
+    : times_impl<
+          typename times_tag<N1>::type
+        , typename times_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, times)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct times_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  * BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/unpack_args.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/unpack_args.hpp
new file mode 100644
index 0000000..f391dc1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/unpack_args.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "unpack_args.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< int size, typename F, typename Args >
+struct unpack_args_impl;
+
+template< typename F, typename Args >
+struct unpack_args_impl< 0,F,Args >
+    : apply0<
+          F
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 1,F,Args >
+    : apply1<
+          F
+        , typename at_c< Args,0 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 2,F,Args >
+    : apply2<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 3,F,Args >
+    : apply3<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 4,F,Args >
+    : apply4<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 5,F,Args >
+    : apply5<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+        , typename at_c< Args,4 >::type
+        >
+{
+};
+
+}
+
+template<
+      typename F
+    >
+struct unpack_args
+{
+    template< typename Args > struct apply
+    {
+        typedef typename aux::unpack_args_impl<
+              size<Args>::value
+            , F
+            , Args
+            >::type type;
+
+    };
+};
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/vector.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/vector.hpp
new file mode 100644
index 0000000..803e217
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/vector.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "vector.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct vector;
+
+template<
+     
+    >
+struct vector<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector0<  >
+{
+    typedef vector0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct vector<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector1<T0>
+{
+    typedef typename vector1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct vector<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector2< T0,T1 >
+{
+    typedef typename vector2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct vector<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector3< T0,T1,T2 >
+{
+    typedef typename vector3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct vector<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector4< T0,T1,T2,T3 >
+{
+    typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct vector<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector5< T0,T1,T2,T3,T4 >
+{
+    typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : vector15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : vector16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : vector17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : vector18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : vector19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct vector
+    : vector20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/bcc_pre590/vector_c.hpp b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/vector_c.hpp
new file mode 100644
index 0000000..643b7fd
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/bcc_pre590/vector_c.hpp
@@ -0,0 +1,309 @@
+
+// Copyright Aleksey Gurtovoy 2000-2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// *Preprocessed* version of the main "vector_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct vector_c;
+
+template<
+      typename T
+    >
+struct vector_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector0_c<T>
+{
+    typedef typename vector0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct vector_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector1_c< T, T(C0) >
+{
+    typedef typename vector1_c< T, T(C0) >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct vector_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector2_c< T, T(C0), T(C1) >
+{
+    typedef typename vector2_c< T, T(C0), T(C1) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct vector_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector3_c< T, T(C0), T(C1), T(C2) >
+{
+    typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector4_c< T, T(C0), T(C1), T(C2), T(C3) >
+{
+    typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >
+{
+    typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >
+{
+    typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >
+{
+    typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >
+{
+    typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >
+{
+    typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >
+{
+    typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >
+{
+    typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >
+{
+    typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >
+{
+    typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >
+{
+    typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >
+{
+    typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >
+{
+    typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >
+{
+    typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >
+{
+    typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >
+{
+    typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct vector_c
+    : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >
+{
+    typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp
new file mode 100644
index 0000000..26de94c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_backward;
+template<>
+struct advance_backward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_backward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_backward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_backward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_backward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef typename prior<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_backward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_backward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_backward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp
new file mode 100644
index 0000000..b137cc7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_forward;
+template<>
+struct advance_forward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_forward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_forward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_forward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_forward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef typename next<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_forward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_forward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_forward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/and.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/and.hpp
new file mode 100644
index 0000000..010ad1f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/and.hpp
@@ -0,0 +1,69 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/and.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C_, typename T1, typename T2, typename T3, typename T4 >
+struct and_impl
+    : false_
+{
+};
+
+template< typename T1, typename T2, typename T3, typename T4 >
+struct and_impl< true,T1,T2,T3,T4 >
+    : and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4
+        , true_
+        >
+{
+};
+
+template<>
+struct and_impl<
+          true
+        , true_, true_, true_, true_
+        >
+    : true_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = true_, typename T4 = true_, typename T5 = true_
+    >
+struct and_
+
+    : aux::and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4, T5
+        >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , and_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , and_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/apply.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/apply.hpp
new file mode 100644
index 0000000..e08eacc
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/apply.hpp
@@ -0,0 +1,169 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct apply0
+
+    : apply_wrap0<
+          typename lambda<F>::type
+       
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          1
+        , apply0
+        , (F )
+        )
+};
+
+template<
+      typename F
+    >
+struct apply< F,na,na,na,na,na >
+    : apply0<F>
+{
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply1
+
+    : apply_wrap1<
+          typename lambda<F>::type
+        , T1
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          2
+        , apply1
+        , (F, T1)
+        )
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply< F,T1,na,na,na,na >
+    : apply1< F,T1 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2
+
+    : apply_wrap2<
+          typename lambda<F>::type
+        , T1, T2
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , apply2
+        , (F, T1, T2)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply< F,T1,T2,na,na,na >
+    : apply2< F,T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3
+
+    : apply_wrap3<
+          typename lambda<F>::type
+        , T1, T2, T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , apply3
+        , (F, T1, T2, T3)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply< F,T1,T2,T3,na,na >
+    : apply3< F,T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4
+
+    : apply_wrap4<
+          typename lambda<F>::type
+        , T1, T2, T3, T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , apply4
+        , (F, T1, T2, T3, T4)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply< F,T1,T2,T3,T4,na >
+    : apply4< F,T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5
+
+    : apply_wrap5<
+          typename lambda<F>::type
+        , T1, T2, T3, T4, T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          6
+        , apply5
+        , (F, T1, T2, T3, T4, T5)
+        )
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply
+    : apply5< F,T1,T2,T3,T4,T5 >
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp
new file mode 100644
index 0000000..b2ed5d5
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp
@@ -0,0 +1,52 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na
+    >
+struct apply;
+
+template<
+      typename F
+    >
+struct apply0;
+
+template<
+      typename F, typename T1
+    >
+struct apply1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp
new file mode 100644
index 0000000..34d51a1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp
@@ -0,0 +1,84 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply_wrap.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+
+    , typename has_apply_ = typename aux::has_apply<F>::type
+
+    >
+struct apply_wrap0
+
+    : F::template apply<  >
+{
+};
+
+template< typename F >
+struct apply_wrap0< F,true_ >
+    : F::apply
+{
+};
+
+template<
+      typename F, typename T1
+
+    >
+struct apply_wrap1
+
+    : F::template apply<T1>
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+
+    >
+struct apply_wrap2
+
+    : F::template apply< T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+
+    >
+struct apply_wrap3
+
+    : F::template apply< T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+
+    >
+struct apply_wrap4
+
+    : F::template apply< T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+
+    >
+struct apply_wrap5
+
+    : F::template apply< T1,T2,T3,T4,T5 >
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/arg.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/arg.hpp
new file mode 100644
index 0000000..6f2f8a8
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/arg.hpp
@@ -0,0 +1,123 @@
+
+// Copyright Peter Dimov 2001-2002
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/arg.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+template<> struct arg< -1 >
+{
+    BOOST_STATIC_CONSTANT(int, value  = -1);
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<1>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 1);
+    typedef arg<2> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<2>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 2);
+    typedef arg<3> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U2 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<3>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 3);
+    typedef arg<4> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U3 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<4>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 4);
+    typedef arg<5> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U4 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<5>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 5);
+    typedef arg<6> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U5 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg)
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp
new file mode 100644
index 0000000..1e73429
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp
@@ -0,0 +1,406 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+{
+    typedef T type;
+};
+
+template<
+      int N, typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
+{
+    typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 >
+{
+    typedef bind< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename F, int dummy_
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind0<F>, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind0<F> f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F, int dummy_
+    >
+struct bind< F,na,na,na,na,na >
+    : bind0<F>
+{
+};
+
+template<
+      typename F, typename T1, int dummy_
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename U1, typename U2, typename U3
+    , typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind1< F,T1 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind1< F,T1 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1, int dummy_
+    >
+struct bind< F,T1,na,na,na,na >
+    : bind1< F,T1 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, int dummy_
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename U1, typename U2
+    , typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind2< F,T1,T2 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind2< F,T1,T2 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2, int dummy_
+    >
+struct bind< F,T1,T2,na,na,na >
+    : bind2< F,T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, int dummy_
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename U1
+    , typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind3< F,T1,T2,T3 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3, int dummy_
+    >
+struct bind< F,T1,T2,T3,na,na >
+    : bind3< F,T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , int dummy_
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind4< F,T1,T2,T3,T4 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , int dummy_
+    >
+struct bind< F,T1,T2,T3,T4,na >
+    : bind4< F,T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, int dummy_
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+        typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
+
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind5< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+
+/// primary template (not a specialization!)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, int dummy_
+    >
+struct bind
+    : bind5< F,T1,T2,T3,T4,T5 >
+{
+};
+
+/// if_/eval_if specializations
+template< template< typename T1, typename T2, typename T3 > class F, typename Tag >
+struct quote3;
+
+template< typename T1, typename T2, typename T3 > struct if_;
+
+template<
+      typename Tag, typename T1, typename T2, typename T3
+    >
+struct bind3<
+      quote3< if_,Tag >
+    , T1, T2, T3
+    >
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef mpl::arg<1> n1;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef typename if_<
+              typename t1::type
+            , t2, t3
+            >::type f_;
+
+     public:
+        typedef typename f_::type type;
+    };
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/bind.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/bind.hpp
new file mode 100644
index 0000000..94bfe1f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/bind.hpp
@@ -0,0 +1,515 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+{
+    typedef T type;
+};
+
+template<
+      typename T
+    , typename Arg
+    >
+struct replace_unnamed_arg
+{
+    typedef Arg next;
+    typedef T type;
+};
+
+template<
+      typename Arg
+    >
+struct replace_unnamed_arg< arg< -1 >, Arg >
+{
+    typedef typename Arg::next next;
+    typedef Arg type;
+};
+
+template<
+      int N, typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
+{
+    typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 >
+{
+    typedef bind< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename F, int dummy_
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind0<F>, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind0<F> f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F, int dummy_
+    >
+struct bind< F,na,na,na,na,na >
+    : bind0<F>
+{
+};
+
+template<
+      typename F, typename T1, int dummy_
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename U1, typename U2, typename U3
+    , typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind1< F,T1 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind1< F,T1 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1, int dummy_
+    >
+struct bind< F,T1,na,na,na,na >
+    : bind1< F,T1 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, int dummy_
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename U1, typename U2
+    , typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind2< F,T1,T2 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind2< F,T1,T2 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2, int dummy_
+    >
+struct bind< F,T1,T2,na,na,na >
+    : bind2< F,T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, int dummy_
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename U1
+    , typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind3< F,T1,T2,T3 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3, int dummy_
+    >
+struct bind< F,T1,T2,T3,na,na >
+    : bind3< F,T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , int dummy_
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind4< F,T1,T2,T3,T4 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , int dummy_
+    >
+struct bind< F,T1,T2,T3,T4,na >
+    : bind4< F,T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, int dummy_
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+        typedef aux::replace_unnamed_arg< T5,n5 > r5;
+        typedef typename r5::type a5;
+        typedef typename r5::next n6;
+        typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5;
+        ///
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind5< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+
+/// primary template (not a specialization!)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, int dummy_
+    >
+struct bind
+    : bind5< F,T1,T2,T3,T4,T5 >
+{
+};
+
+/// if_/eval_if specializations
+template< template< typename T1, typename T2, typename T3 > class F, typename Tag >
+struct quote3;
+
+template< typename T1, typename T2, typename T3 > struct if_;
+
+template<
+      typename Tag, typename T1, typename T2, typename T3
+    >
+struct bind3<
+      quote3< if_,Tag >
+    , T1, T2, T3
+    >
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef mpl::arg<1> n1;
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef typename if_<
+              typename t1::type
+            , t2, t3
+            >::type f_;
+
+     public:
+        typedef typename f_::type type;
+    };
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp
new file mode 100644
index 0000000..181bc77
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp
@@ -0,0 +1,53 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bind_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, int dummy_ = 0
+    >
+struct bind;
+
+template<
+      typename F, int dummy_ = 0
+    >
+struct bind0;
+
+template<
+      typename F, typename T1, int dummy_ = 0
+    >
+struct bind1;
+
+template<
+      typename F, typename T1, typename T2, int dummy_ = 0
+    >
+struct bind2;
+
+template<
+      typename F, typename T1, typename T2, typename T3, int dummy_ = 0
+    >
+struct bind3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , int dummy_ = 0
+    >
+struct bind4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, int dummy_ = 0
+    >
+struct bind5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/bitand.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/bitand.hpp
new file mode 100644
index 0000000..0bbf54e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/bitand.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitand.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitand_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitand_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitand_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitand_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitand_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitand_
+    : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitand_< N1,N2,N3,N4,na >
+
+    : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitand_< N1,N2,N3,na,na >
+
+    : bitand_< bitand_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitand_< N1,N2,na,na,na >
+    : bitand_impl<
+          typename bitand_tag<N1>::type
+        , typename bitand_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitand_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  & BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/bitor.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/bitor.hpp
new file mode 100644
index 0000000..55b31cb
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/bitor.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitor_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitor_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitor_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitor_
+    : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitor_< N1,N2,N3,N4,na >
+
+    : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitor_< N1,N2,N3,na,na >
+
+    : bitor_< bitor_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitor_< N1,N2,na,na,na >
+    : bitor_impl<
+          typename bitor_tag<N1>::type
+        , typename bitor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  | BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp
new file mode 100644
index 0000000..ec19391
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitxor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitxor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitxor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitxor_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitxor_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitxor_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitxor_
+    : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitxor_< N1,N2,N3,N4,na >
+
+    : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitxor_< N1,N2,N3,na,na >
+
+    : bitxor_< bitxor_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitxor_< N1,N2,na,na,na >
+    : bitxor_impl<
+          typename bitxor_tag<N1>::type
+        , typename bitxor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitxor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/deque.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/deque.hpp
new file mode 100644
index 0000000..de67398
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/deque.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/deque.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct deque;
+
+template<
+     
+    >
+struct deque<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector0<  >
+{
+    typedef vector0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct deque<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector1<T0>
+{
+    typedef typename vector1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct deque<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector2< T0,T1 >
+{
+    typedef typename vector2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct deque<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector3< T0,T1,T2 >
+{
+    typedef typename vector3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct deque<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector4< T0,T1,T2,T3 >
+{
+    typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct deque<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector5< T0,T1,T2,T3,T4 >
+{
+    typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : vector15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : vector16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : vector17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : vector18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : vector19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct deque
+    : vector20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/divides.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/divides.hpp
new file mode 100644
index 0000000..86f1682
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/divides.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/divides.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct divides_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct divides_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct divides_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct divides_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct divides_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct divides
+    : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , divides
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct divides< N1,N2,N3,N4,na >
+
+    : divides< divides< divides< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct divides< N1,N2,N3,na,na >
+
+    : divides< divides< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct divides< N1,N2,na,na,na >
+    : divides_impl<
+          typename divides_tag<N1>::type
+        , typename divides_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, divides)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct divides_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  / BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp
new file mode 100644
index 0000000..62c9945
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct equal_to_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct equal_to_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct equal_to
+
+    : equal_to_impl<
+          typename equal_to_tag<N1>::type
+        , typename equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value  == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp
new file mode 100644
index 0000000..9e7a293
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp
@@ -0,0 +1,180 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 0,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 1,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef state1 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 2,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef state2 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 3,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef state3 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 4,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef state4 state;
+    typedef iter4 iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl
+{
+    typedef fold_impl<
+          4
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< -1,First,Last,State,ForwardOp >
+    : fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< -1,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp
new file mode 100644
index 0000000..026418c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp
@@ -0,0 +1,536 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+   
+    >
+struct lambda
+{
+    typedef false_ is_le;
+    typedef T result_;
+    typedef T type;
+};
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+template< int N, typename Tag >
+struct lambda< arg<N>, Tag >
+{
+    typedef true_ is_le;
+    typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41
+    typedef mpl::protect<result_> type;
+};
+
+template<
+      typename F
+    , typename Tag
+    >
+struct lambda<
+          bind0<F>
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind0<
+          F
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1
+{
+    typedef F<
+          typename L1::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1< true_,Tag,F,L1 >
+{
+    typedef bind1<
+          quote1< F,Tag >
+        , typename L1::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1 > class F
+    , typename T1
+    , typename Tag
+    >
+struct lambda<
+          F<T1>
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef typename l1::is_le is_le1;
+    typedef typename aux::lambda_or<
+          is_le1::value
+        >::type is_le;
+
+    typedef aux::le_result1<
+          is_le, Tag, F, l1
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1
+    , typename Tag
+    >
+struct lambda<
+          bind1< F,T1 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind1<
+          F
+        , T1
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2
+{
+    typedef F<
+          typename L1::type, typename L2::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2< true_,Tag,F,L1,L2 >
+{
+    typedef bind2<
+          quote2< F,Tag >
+        , typename L1::result_, typename L2::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2 > class F
+    , typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value
+        >::type is_le;
+
+    typedef aux::le_result2<
+          is_le, Tag, F, l1, l2
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          bind2< F,T1,T2 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind2<
+          F
+        , T1, T2
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3< true_,Tag,F,L1,L2,L3 >
+{
+    typedef bind3<
+          quote3< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3 > class F
+    , typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value
+        >::type is_le;
+
+    typedef aux::le_result3<
+          is_le, Tag, F, l1, l2, l3
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          bind3< F,T1,T2,T3 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind3<
+          F
+        , T1, T2, T3
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4< true_,Tag,F,L1,L2,L3,L4 >
+{
+    typedef bind4<
+          quote4< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        >::type is_le;
+
+    typedef aux::le_result4<
+          is_le, Tag, F, l1, l2, l3, l4
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          bind4< F,T1,T2,T3,T4 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind4<
+          F
+        , T1, T2, T3, T4
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type, typename L5::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 >
+{
+    typedef bind5<
+          quote5< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_, typename L5::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template<
+          typename P1, typename P2, typename P3, typename P4
+        , typename P5
+        >
+      class F
+    , typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    typedef lambda< T5,Tag > l5;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    typedef typename l5::is_le is_le5;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        , is_le5::value
+        >::type is_le;
+
+    typedef aux::le_result5<
+          is_le, Tag, F, l1, l2, l3, l4, l5
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind5< F,T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind5<
+          F
+        , T1, T2, T3, T4, T5
+        > result_;
+
+    typedef result_ type;
+};
+
+/// special case for 'protect'
+template< typename T, typename Tag >
+struct lambda< mpl::protect<T>, Tag >
+{
+    typedef false_ is_le;
+    typedef mpl::protect<T> result_;
+    typedef result_ type;
+};
+
+/// specializations for the main 'bind' form
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind< F,T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind< F,T1,T2,T3,T4,T5 > result_;
+    typedef result_ type;
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, lambda)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/greater.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/greater.hpp
new file mode 100644
index 0000000..14d8e08
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/greater.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater
+
+    : greater_impl<
+          typename greater_tag<N1>::type
+        , typename greater_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp
new file mode 100644
index 0000000..2603f91
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_equal_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_equal_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater_equal
+
+    : greater_equal_impl<
+          typename greater_equal_tag<N1>::type
+        , typename greater_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/inherit.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/inherit.hpp
new file mode 100644
index 0000000..00f31c4
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/inherit.hpp
@@ -0,0 +1,141 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/inherit.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    >
+struct inherit2
+    : T1, T2
+{
+    typedef inherit2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2))
+};
+
+template< typename T1 >
+struct inherit2< T1,empty_base >
+{
+    typedef T1 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base))
+};
+
+template< typename T2 >
+struct inherit2< empty_base,T2 >
+{
+    typedef T2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2))
+};
+
+template<>
+struct inherit2< empty_base,empty_base >
+{
+    typedef empty_base type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, inherit2)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na
+    >
+struct inherit3
+    : inherit2<
+          typename inherit2<
+              T1, T2
+            >::type
+        , T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , inherit3
+        , ( T1, T2, T3)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, inherit3)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    >
+struct inherit4
+    : inherit2<
+          typename inherit3<
+              T1, T2, T3
+            >::type
+        , T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , inherit4
+        , ( T1, T2, T3, T4)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(4, inherit4)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    , typename T5 = na
+    >
+struct inherit5
+    : inherit2<
+          typename inherit4<
+              T1, T2, T3, T4
+            >::type
+        , T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , inherit5
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(5, inherit5)
+
+/// primary template
+
+template<
+      typename T1 = empty_base, typename T2 = empty_base
+    , typename T3 = empty_base, typename T4 = empty_base
+    , typename T5 = empty_base
+    >
+struct inherit
+    : inherit5< T1,T2,T3,T4,T5 >
+{
+};
+
+template<>
+struct inherit< na,na,na,na,na >
+{
+    template<
+
+          typename T1 = empty_base, typename T2 = empty_base
+        , typename T3 = empty_base, typename T4 = empty_base
+        , typename T5 = empty_base
+
+        >
+    struct apply
+        : inherit< T1,T2,T3,T4,T5 >
+    {
+    };
+};
+
+BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp
new file mode 100644
index 0000000..6951795
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp
@@ -0,0 +1,133 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright David Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename Iterator, typename State >
+struct iter_fold_if_null_step
+{
+    typedef State state;
+    typedef Iterator iterator;
+};
+
+template< bool >
+struct iter_fold_if_step_impl
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef typename apply2< StateOp,State,Iterator >::type state;
+        typedef typename IteratorOp::type iterator;
+    };
+};
+
+template<>
+struct iter_fold_if_step_impl<false>
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef State state;
+        typedef Iterator iterator;
+    };
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_forward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename BackwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_backward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename ForwardPredicate
+    , typename BackwardOp
+    , typename BackwardPredicate
+    >
+struct iter_fold_if_impl
+{
+ private:
+    typedef iter_fold_if_null_step< Iterator,State > forward_step0;
+    typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1;
+    typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2;
+    typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3;
+    typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4;
+    
+
+    typedef typename if_<
+          typename forward_step4::not_last
+        , iter_fold_if_impl<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            , ForwardOp
+            , ForwardPredicate
+            , BackwardOp
+            , BackwardPredicate
+            >
+        , iter_fold_if_null_step<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            >
+        >::type backward_step4;
+
+    typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3;
+    typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2;
+    typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1;
+    typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0;
+    
+
+ public:
+    typedef typename backward_step0::state state;
+    typedef typename backward_step4::iterator iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp
new file mode 100644
index 0000000..805790e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp
@@ -0,0 +1,180 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 0,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 1,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef state1 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 2,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef state2 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 3,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef state3 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 4,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef state4 state;
+    typedef iter4 iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl
+{
+    typedef iter_fold_impl<
+          4
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef iter_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< -1,First,Last,State,ForwardOp >
+    : iter_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< -1,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp
new file mode 100644
index 0000000..890a198
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp
@@ -0,0 +1,229 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+template< typename Arity > struct lambda_impl
+{
+    template< typename T, typename Tag, typename Protect > struct result_
+    {
+        typedef T type;
+        typedef is_placeholder<T> is_le;
+    };
+};
+
+template<> struct lambda_impl< int_<1> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef typename l1::is_le is_le1;
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value
+            > is_le;
+
+        typedef bind1<
+              typename F::rebind
+            , typename l1::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<2> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value
+            > is_le;
+
+        typedef bind2<
+              typename F::rebind
+            , typename l1::type, typename l2::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<3> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value
+            > is_le;
+
+        typedef bind3<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<4> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value
+            > is_le;
+
+        typedef bind4<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<5> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        typedef lambda< typename F::arg5, Tag, false_ > l5;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        typedef typename l5::is_le is_le5;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value
+            > is_le;
+
+        typedef bind5<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type, typename l5::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+    , typename Protect
+    >
+struct lambda
+{
+    /// Metafunction forwarding confuses MSVC 6.x
+    typedef typename aux::template_arity<T>::type arity_;
+    typedef typename aux::lambda_impl<arity_>
+        ::template result_< T,Tag,Protect > l_;
+
+    typedef typename l_::type type;
+    typedef typename l_::is_le is_le;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect))
+};
+
+BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/less.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/less.hpp
new file mode 100644
index 0000000..4fe3cd1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/less.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less
+
+    : less_impl<
+          typename less_tag<N1>::type
+        , typename less_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp
new file mode 100644
index 0000000..ca2894f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_equal_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_equal_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less_equal
+
+    : less_equal_impl<
+          typename less_equal_tag<N1>::type
+        , typename less_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/list.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/list.hpp
new file mode 100644
index 0000000..4e8ad53
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/list.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct list;
+
+template<
+     
+    >
+struct list<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list0<  >
+{
+    typedef list0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct list<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list1<T0>
+{
+    typedef typename list1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct list<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list2< T0,T1 >
+{
+    typedef typename list2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct list<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list3< T0,T1,T2 >
+{
+    typedef typename list3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct list<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list4< T0,T1,T2,T3 >
+{
+    typedef typename list4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct list<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list5< T0,T1,T2,T3,T4 >
+{
+    typedef typename list5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : list15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : list16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : list17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : list18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : list19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct list
+    : list20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/list_c.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/list_c.hpp
new file mode 100644
index 0000000..0b48a7f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/list_c.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct list_c;
+
+template<
+      typename T
+    >
+struct list_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list0_c<T>
+{
+    typedef typename list0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct list_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list1_c< T,C0 >
+{
+    typedef typename list1_c< T,C0 >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct list_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list2_c< T,C0,C1 >
+{
+    typedef typename list2_c< T,C0,C1 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct list_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list3_c< T,C0,C1,C2 >
+{
+    typedef typename list3_c< T,C0,C1,C2 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct list_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list4_c< T,C0,C1,C2,C3 >
+{
+    typedef typename list4_c< T,C0,C1,C2,C3 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list5_c< T,C0,C1,C2,C3,C4 >
+{
+    typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list6_c< T,C0,C1,C2,C3,C4,C5 >
+{
+    typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+{
+    typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+{
+    typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+{
+    typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+{
+    typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+{
+    typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+{
+    typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+{
+    typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list14_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        >
+{
+    typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list15_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        >
+{
+    typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list16_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15
+        >
+{
+    typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list17_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16
+        >
+{
+    typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : list18_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17
+        >
+{
+    typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : list19_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18
+        >
+{
+    typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct list_c
+    : list20_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, C19
+        >
+{
+    typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/map.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/map.hpp
new file mode 100644
index 0000000..837e013
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/map.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct map;
+
+template<
+     
+    >
+struct map<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map0<  >
+{
+    typedef map0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct map<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map1<T0>
+{
+    typedef typename map1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct map<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map2< T0,T1 >
+{
+    typedef typename map2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct map<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map3< T0,T1,T2 >
+{
+    typedef typename map3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct map<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map4< T0,T1,T2,T3 >
+{
+    typedef typename map4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct map<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map5< T0,T1,T2,T3,T4 >
+{
+    typedef typename map5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : map15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : map16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : map17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : map18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : map19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct map
+    : map20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/minus.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/minus.hpp
new file mode 100644
index 0000000..71d4913
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/minus.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/minus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct minus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct minus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct minus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct minus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct minus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct minus
+    : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , minus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct minus< N1,N2,N3,N4,na >
+
+    : minus< minus< minus< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct minus< N1,N2,N3,na,na >
+
+    : minus< minus< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct minus< N1,N2,na,na,na >
+    : minus_impl<
+          typename minus_tag<N1>::type
+        , typename minus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, minus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct minus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  - BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/modulus.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/modulus.hpp
new file mode 100644
index 0000000..224b349
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/modulus.hpp
@@ -0,0 +1,101 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/modulus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct modulus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct modulus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct modulus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct modulus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct modulus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct modulus
+
+    : modulus_impl<
+          typename modulus_tag<N1>::type
+        , typename modulus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct modulus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  % BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp
new file mode 100644
index 0000000..98b21b1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/not_equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct not_equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct not_equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct not_equal_to_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct not_equal_to_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct not_equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct not_equal_to
+
+    : not_equal_to_impl<
+          typename not_equal_to_tag<N1>::type
+        , typename not_equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct not_equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/or.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/or.hpp
new file mode 100644
index 0000000..31e1aaa
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/or.hpp
@@ -0,0 +1,69 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/or.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C_, typename T1, typename T2, typename T3, typename T4 >
+struct or_impl
+    : true_
+{
+};
+
+template< typename T1, typename T2, typename T3, typename T4 >
+struct or_impl< false,T1,T2,T3,T4 >
+    : or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4
+        , false_
+        >
+{
+};
+
+template<>
+struct or_impl<
+          false
+        , false_, false_, false_, false_
+        >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = false_, typename T4 = false_, typename T5 = false_
+    >
+struct or_
+
+    : aux::or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4, T5
+        >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , or_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , or_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/placeholders.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/placeholders.hpp
new file mode 100644
index 0000000..ff97364
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/placeholders.hpp
@@ -0,0 +1,105 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright Peter Dimov 2001-2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/placeholders.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg< -1 > _;
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_;
+}
+
+}}
+
+/// agurt, 17/mar/02: one more placeholder for the last 'apply#' 
+/// specialization
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<1> _1;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<2> _2;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<3> _3;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<4> _4;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<5> _5;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<6> _6;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6;
+}
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/plus.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/plus.hpp
new file mode 100644
index 0000000..a9f6ee7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/plus.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/plus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct plus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct plus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct plus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct plus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct plus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct plus
+    : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , plus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct plus< N1,N2,N3,N4,na >
+
+    : plus< plus< plus< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct plus< N1,N2,N3,na,na >
+
+    : plus< plus< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct plus< N1,N2,na,na,na >
+    : plus_impl<
+          typename plus_tag<N1>::type
+        , typename plus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, plus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct plus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  + BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/quote.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/quote.hpp
new file mode 100644
index 0000000..d7d0420
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/quote.hpp
@@ -0,0 +1,123 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/quote.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template< typename T, bool has_type_ >
+struct quote_impl
+    : T
+{
+};
+
+template< typename T >
+struct quote_impl< T,false >
+{
+    typedef T type;
+};
+
+template<
+      template< typename P1 > class F
+    , typename Tag = void_
+    >
+struct quote1
+{
+    template< typename U1 > struct apply
+
+        : quote_impl<
+              F<U1>
+            , aux::has_type< F<U1> >::value
+            >
+
+    {
+    };
+};
+
+template<
+      template< typename P1, typename P2 > class F
+    , typename Tag = void_
+    >
+struct quote2
+{
+    template< typename U1, typename U2 > struct apply
+
+        : quote_impl<
+              F< U1,U2 >
+            , aux::has_type< F< U1,U2 > >::value
+            >
+
+    {
+    };
+};
+
+template<
+      template< typename P1, typename P2, typename P3 > class F
+    , typename Tag = void_
+    >
+struct quote3
+{
+    template< typename U1, typename U2, typename U3 > struct apply
+
+        : quote_impl<
+              F< U1,U2,U3 >
+            , aux::has_type< F< U1,U2,U3 > >::value
+            >
+
+    {
+    };
+};
+
+template<
+      template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename Tag = void_
+    >
+struct quote4
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4
+        >
+    struct apply
+
+        : quote_impl<
+              F< U1,U2,U3,U4 >
+            , aux::has_type< F< U1,U2,U3,U4 > >::value
+            >
+
+    {
+    };
+};
+
+template<
+      template<
+          typename P1, typename P2, typename P3, typename P4
+        , typename P5
+        >
+      class F
+    , typename Tag = void_
+    >
+struct quote5
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4
+        , typename U5
+        >
+    struct apply
+
+        : quote_impl<
+              F< U1,U2,U3,U4,U5 >
+            , aux::has_type< F< U1,U2,U3,U4,U5 > >::value
+            >
+
+    {
+    };
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp
new file mode 100644
index 0000000..c468684
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp
@@ -0,0 +1,231 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef fwd_state0 bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef fwd_state1 bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef fwd_state2 bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef fwd_state3 bkwd_state3;
+    typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef fwd_state4 bkwd_state4;
+    typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+    typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter4 iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef reverse_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , iter4
+        , Last
+        , fwd_state4
+        , BackwardOp
+        , ForwardOp
+        > nested_chunk;
+
+    typedef typename nested_chunk::state bkwd_state4;
+    typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+    typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef typename nested_chunk::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef reverse_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , typename deref<First>::type
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp
new file mode 100644
index 0000000..658f92a
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp
@@ -0,0 +1,231 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef fwd_state0 bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef fwd_state1 bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef fwd_state2 bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef fwd_state3 bkwd_state3;
+    typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef fwd_state4 bkwd_state4;
+    typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+    typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter4 iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef reverse_iter_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , iter4
+        , Last
+        , fwd_state4
+        , BackwardOp
+        , ForwardOp
+        > nested_chunk;
+
+    typedef typename nested_chunk::state bkwd_state4;
+    typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+    typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef typename nested_chunk::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef reverse_iter_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , First
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/set.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/set.hpp
new file mode 100644
index 0000000..5721922
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/set.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct set;
+
+template<
+     
+    >
+struct set<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set0<  >
+{
+    typedef set0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct set<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set1<T0>
+{
+    typedef typename set1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct set<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set2< T0,T1 >
+{
+    typedef typename set2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct set<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set3< T0,T1,T2 >
+{
+    typedef typename set3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct set<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set4< T0,T1,T2,T3 >
+{
+    typedef typename set4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct set<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set5< T0,T1,T2,T3,T4 >
+{
+    typedef typename set5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : set15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : set16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : set17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : set18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : set19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct set
+    : set20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/set_c.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/set_c.hpp
new file mode 100644
index 0000000..cbeb932
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/set_c.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct set_c;
+
+template<
+      typename T
+    >
+struct set_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set0_c<T>
+{
+    typedef typename set0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct set_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set1_c< T,C0 >
+{
+    typedef typename set1_c< T,C0 >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct set_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set2_c< T,C0,C1 >
+{
+    typedef typename set2_c< T,C0,C1 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct set_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set3_c< T,C0,C1,C2 >
+{
+    typedef typename set3_c< T,C0,C1,C2 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct set_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set4_c< T,C0,C1,C2,C3 >
+{
+    typedef typename set4_c< T,C0,C1,C2,C3 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set5_c< T,C0,C1,C2,C3,C4 >
+{
+    typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set6_c< T,C0,C1,C2,C3,C4,C5 >
+{
+    typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+{
+    typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+{
+    typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+{
+    typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+{
+    typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+{
+    typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+{
+    typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+{
+    typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set14_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        >
+{
+    typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set15_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        >
+{
+    typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set16_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15
+        >
+{
+    typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set17_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16
+        >
+{
+    typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : set18_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17
+        >
+{
+    typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : set19_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18
+        >
+{
+    typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct set_c
+    : set20_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, C19
+        >
+{
+    typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp
new file mode 100644
index 0000000..b5b181c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp
@@ -0,0 +1,99 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_left.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_left_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_left_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_left_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_left_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_left_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_left
+
+    : shift_left_impl<
+          typename shift_left_tag<N1>::type
+        , typename shift_left_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct shift_left_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  << BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/shift_right.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/shift_right.hpp
new file mode 100644
index 0000000..f7a342e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/shift_right.hpp
@@ -0,0 +1,99 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_right.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_right_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_right_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_right_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_right_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_right_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_right
+
+    : shift_right_impl<
+          typename shift_right_tag<N1>::type
+        , typename shift_right_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct shift_right_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  >> BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/template_arity.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/template_arity.hpp
new file mode 100644
index 0000000..a23fc23
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/template_arity.hpp
@@ -0,0 +1,11 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header
+// -- DO NOT modify by hand!
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/times.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/times.hpp
new file mode 100644
index 0000000..cb97cc4
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/times.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/times.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct times_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct times_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct times_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct times_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct times_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct times
+    : times< times< times< times< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , times
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct times< N1,N2,N3,N4,na >
+
+    : times< times< times< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct times< N1,N2,N3,na,na >
+
+    : times< times< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct times< N1,N2,na,na,na >
+    : times_impl<
+          typename times_tag<N1>::type
+        , typename times_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, times)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct times_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  * BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp
new file mode 100644
index 0000000..2194ce9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/unpack_args.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< int size, typename F, typename Args >
+struct unpack_args_impl;
+
+template< typename F, typename Args >
+struct unpack_args_impl< 0,F,Args >
+    : apply0<
+          F
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 1,F,Args >
+    : apply1<
+          F
+        , typename at_c< Args,0 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 2,F,Args >
+    : apply2<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 3,F,Args >
+    : apply3<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 4,F,Args >
+    : apply4<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 5,F,Args >
+    : apply5<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+        , typename at_c< Args,4 >::type
+        >
+{
+};
+
+}
+
+template<
+      typename F
+    >
+struct unpack_args
+{
+    template< typename Args > struct apply
+
+        : aux::unpack_args_impl< size<Args>::value,F, Args >
+
+    {
+    };
+};
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/vector.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/vector.hpp
new file mode 100644
index 0000000..bfa9565
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/vector.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct vector;
+
+template<
+     
+    >
+struct vector<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector0<  >
+{
+    typedef vector0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct vector<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector1<T0>
+{
+    typedef typename vector1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct vector<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector2< T0,T1 >
+{
+    typedef typename vector2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct vector<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector3< T0,T1,T2 >
+{
+    typedef typename vector3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct vector<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector4< T0,T1,T2,T3 >
+{
+    typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct vector<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector5< T0,T1,T2,T3,T4 >
+{
+    typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : vector15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : vector16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : vector17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : vector18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : vector19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct vector
+    : vector20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp b/ext/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp
new file mode 100644
index 0000000..0f1560d
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp
@@ -0,0 +1,309 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct vector_c;
+
+template<
+      typename T
+    >
+struct vector_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector0_c<T>
+{
+    typedef typename vector0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct vector_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector1_c< T, T(C0) >
+{
+    typedef typename vector1_c< T, T(C0) >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct vector_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector2_c< T, T(C0), T(C1) >
+{
+    typedef typename vector2_c< T, T(C0), T(C1) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct vector_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector3_c< T, T(C0), T(C1), T(C2) >
+{
+    typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector4_c< T, T(C0), T(C1), T(C2), T(C3) >
+{
+    typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >
+{
+    typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >
+{
+    typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >
+{
+    typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >
+{
+    typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >
+{
+    typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >
+{
+    typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >
+{
+    typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >
+{
+    typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >
+{
+    typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >
+{
+    typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >
+{
+    typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >
+{
+    typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >
+{
+    typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >
+{
+    typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >
+{
+    typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct vector_c
+    : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >
+{
+    typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/._and.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/._and.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessed/gcc/._and.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/._apply.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/._apply.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessed/gcc/._apply.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/._apply_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/._apply_fwd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessed/gcc/._apply_fwd.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/._apply_wrap.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/._apply_wrap.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessed/gcc/._apply_wrap.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/._arg.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/._arg.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessed/gcc/._arg.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/._bind.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/._bind.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessed/gcc/._bind.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/._bind_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/._bind_fwd.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessed/gcc/._bind_fwd.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/._full_lambda.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/._full_lambda.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessed/gcc/._full_lambda.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/._or.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/._or.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessed/gcc/._or.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/._placeholders.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/._placeholders.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessed/gcc/._placeholders.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/._quote.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/._quote.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessed/gcc/._quote.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/._template_arity.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/._template_arity.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessed/gcc/._template_arity.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp
new file mode 100644
index 0000000..26de94c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_backward;
+template<>
+struct advance_backward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_backward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_backward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_backward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_backward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef typename prior<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_backward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_backward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_backward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp
new file mode 100644
index 0000000..b137cc7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_forward;
+template<>
+struct advance_forward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_forward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_forward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_forward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_forward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef typename next<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_forward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_forward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_forward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp
new file mode 100644
index 0000000..b070232
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp
@@ -0,0 +1,440 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+{
+    typedef T type;
+};
+
+template<
+      int N, typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
+{
+    typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 >
+{
+    typedef bind< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind0<F>, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind0<F> f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F
+    >
+struct bind< F,na,na,na,na,na >
+    : bind0<F>
+{
+};
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename U1, typename U2, typename U3
+    , typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind1< F,T1 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind1< F,T1 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1
+    >
+struct bind< F,T1,na,na,na,na >
+    : bind1< F,T1 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename U1, typename U2
+    , typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind2< F,T1,T2 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind2< F,T1,T2 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind< F,T1,T2,na,na,na >
+    : bind2< F,T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename U1
+    , typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind3< F,T1,T2,T3 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind< F,T1,T2,T3,na,na >
+    : bind3< F,T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind4< F,T1,T2,T3,T4 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind< F,T1,T2,T3,T4,na >
+    : bind4< F,T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+        typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
+
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind5< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+
+/// primary template (not a specialization!)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind
+    : bind5< F,T1,T2,T3,T4,T5 >
+{
+};
+
+/// if_/eval_if specializations
+template< template< typename T1, typename T2, typename T3 > class F, typename Tag >
+struct quote3;
+
+template< typename T1, typename T2, typename T3 > struct if_;
+
+template<
+      typename Tag, typename T1, typename T2, typename T3
+    >
+struct bind3<
+      quote3< if_,Tag >
+    , T1, T2, T3
+    >
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef mpl::arg<1> n1;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef typename if_<
+              typename t1::type
+            , t2, t3
+            >::type f_;
+
+     public:
+        typedef typename f_::type type;
+    };
+};
+
+template<
+      template< typename T1, typename T2, typename T3 > class F, typename Tag
+    >
+struct quote3;
+
+template< typename T1, typename T2, typename T3 > struct eval_if;
+
+template<
+      typename Tag, typename T1, typename T2, typename T3
+    >
+struct bind3<
+      quote3< eval_if,Tag >
+    , T1, T2, T3
+    >
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef mpl::arg<1> n1;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef typename eval_if<
+              typename t1::type
+            , t2, t3
+            >::type f_;
+
+     public:
+        typedef typename f_::type type;
+    };
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/bitand.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/bitand.hpp
new file mode 100644
index 0000000..0bbf54e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/bitand.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitand.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitand_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitand_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitand_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitand_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitand_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitand_
+    : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitand_< N1,N2,N3,N4,na >
+
+    : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitand_< N1,N2,N3,na,na >
+
+    : bitand_< bitand_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitand_< N1,N2,na,na,na >
+    : bitand_impl<
+          typename bitand_tag<N1>::type
+        , typename bitand_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitand_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  & BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/bitor.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/bitor.hpp
new file mode 100644
index 0000000..55b31cb
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/bitor.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitor_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitor_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitor_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitor_
+    : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitor_< N1,N2,N3,N4,na >
+
+    : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitor_< N1,N2,N3,na,na >
+
+    : bitor_< bitor_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitor_< N1,N2,na,na,na >
+    : bitor_impl<
+          typename bitor_tag<N1>::type
+        , typename bitor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  | BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp
new file mode 100644
index 0000000..ec19391
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitxor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitxor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitxor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitxor_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitxor_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitxor_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitxor_
+    : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitxor_< N1,N2,N3,N4,na >
+
+    : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitxor_< N1,N2,N3,na,na >
+
+    : bitxor_< bitxor_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitxor_< N1,N2,na,na,na >
+    : bitxor_impl<
+          typename bitxor_tag<N1>::type
+        , typename bitxor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitxor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/deque.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/deque.hpp
new file mode 100644
index 0000000..de67398
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/deque.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/deque.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct deque;
+
+template<
+     
+    >
+struct deque<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector0<  >
+{
+    typedef vector0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct deque<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector1<T0>
+{
+    typedef typename vector1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct deque<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector2< T0,T1 >
+{
+    typedef typename vector2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct deque<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector3< T0,T1,T2 >
+{
+    typedef typename vector3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct deque<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector4< T0,T1,T2,T3 >
+{
+    typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct deque<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector5< T0,T1,T2,T3,T4 >
+{
+    typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : vector15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : vector16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : vector17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : vector18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : vector19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct deque
+    : vector20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/divides.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/divides.hpp
new file mode 100644
index 0000000..86f1682
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/divides.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/divides.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct divides_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct divides_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct divides_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct divides_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct divides_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct divides
+    : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , divides
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct divides< N1,N2,N3,N4,na >
+
+    : divides< divides< divides< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct divides< N1,N2,N3,na,na >
+
+    : divides< divides< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct divides< N1,N2,na,na,na >
+    : divides_impl<
+          typename divides_tag<N1>::type
+        , typename divides_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, divides)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct divides_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  / BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp
new file mode 100644
index 0000000..62c9945
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct equal_to_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct equal_to_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct equal_to
+
+    : equal_to_impl<
+          typename equal_to_tag<N1>::type
+        , typename equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value  == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp
new file mode 100644
index 0000000..9e7a293
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp
@@ -0,0 +1,180 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 0,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 1,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef state1 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 2,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef state2 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 3,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef state3 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 4,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef state4 state;
+    typedef iter4 iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl
+{
+    typedef fold_impl<
+          4
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< -1,First,Last,State,ForwardOp >
+    : fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< -1,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/greater.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/greater.hpp
new file mode 100644
index 0000000..14d8e08
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/greater.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater
+
+    : greater_impl<
+          typename greater_tag<N1>::type
+        , typename greater_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp
new file mode 100644
index 0000000..2603f91
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_equal_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_equal_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater_equal
+
+    : greater_equal_impl<
+          typename greater_equal_tag<N1>::type
+        , typename greater_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/inherit.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/inherit.hpp
new file mode 100644
index 0000000..00f31c4
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/inherit.hpp
@@ -0,0 +1,141 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/inherit.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    >
+struct inherit2
+    : T1, T2
+{
+    typedef inherit2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2))
+};
+
+template< typename T1 >
+struct inherit2< T1,empty_base >
+{
+    typedef T1 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base))
+};
+
+template< typename T2 >
+struct inherit2< empty_base,T2 >
+{
+    typedef T2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2))
+};
+
+template<>
+struct inherit2< empty_base,empty_base >
+{
+    typedef empty_base type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, inherit2)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na
+    >
+struct inherit3
+    : inherit2<
+          typename inherit2<
+              T1, T2
+            >::type
+        , T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , inherit3
+        , ( T1, T2, T3)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, inherit3)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    >
+struct inherit4
+    : inherit2<
+          typename inherit3<
+              T1, T2, T3
+            >::type
+        , T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , inherit4
+        , ( T1, T2, T3, T4)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(4, inherit4)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    , typename T5 = na
+    >
+struct inherit5
+    : inherit2<
+          typename inherit4<
+              T1, T2, T3, T4
+            >::type
+        , T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , inherit5
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(5, inherit5)
+
+/// primary template
+
+template<
+      typename T1 = empty_base, typename T2 = empty_base
+    , typename T3 = empty_base, typename T4 = empty_base
+    , typename T5 = empty_base
+    >
+struct inherit
+    : inherit5< T1,T2,T3,T4,T5 >
+{
+};
+
+template<>
+struct inherit< na,na,na,na,na >
+{
+    template<
+
+          typename T1 = empty_base, typename T2 = empty_base
+        , typename T3 = empty_base, typename T4 = empty_base
+        , typename T5 = empty_base
+
+        >
+    struct apply
+        : inherit< T1,T2,T3,T4,T5 >
+    {
+    };
+};
+
+BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp
new file mode 100644
index 0000000..6951795
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp
@@ -0,0 +1,133 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright David Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename Iterator, typename State >
+struct iter_fold_if_null_step
+{
+    typedef State state;
+    typedef Iterator iterator;
+};
+
+template< bool >
+struct iter_fold_if_step_impl
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef typename apply2< StateOp,State,Iterator >::type state;
+        typedef typename IteratorOp::type iterator;
+    };
+};
+
+template<>
+struct iter_fold_if_step_impl<false>
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef State state;
+        typedef Iterator iterator;
+    };
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_forward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename BackwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_backward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename ForwardPredicate
+    , typename BackwardOp
+    , typename BackwardPredicate
+    >
+struct iter_fold_if_impl
+{
+ private:
+    typedef iter_fold_if_null_step< Iterator,State > forward_step0;
+    typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1;
+    typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2;
+    typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3;
+    typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4;
+    
+
+    typedef typename if_<
+          typename forward_step4::not_last
+        , iter_fold_if_impl<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            , ForwardOp
+            , ForwardPredicate
+            , BackwardOp
+            , BackwardPredicate
+            >
+        , iter_fold_if_null_step<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            >
+        >::type backward_step4;
+
+    typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3;
+    typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2;
+    typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1;
+    typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0;
+    
+
+ public:
+    typedef typename backward_step0::state state;
+    typedef typename backward_step4::iterator iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp
new file mode 100644
index 0000000..805790e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp
@@ -0,0 +1,180 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 0,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 1,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef state1 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 2,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef state2 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 3,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef state3 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 4,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef state4 state;
+    typedef iter4 iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl
+{
+    typedef iter_fold_impl<
+          4
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef iter_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< -1,First,Last,State,ForwardOp >
+    : iter_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< -1,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp
new file mode 100644
index 0000000..890a198
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp
@@ -0,0 +1,229 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+template< typename Arity > struct lambda_impl
+{
+    template< typename T, typename Tag, typename Protect > struct result_
+    {
+        typedef T type;
+        typedef is_placeholder<T> is_le;
+    };
+};
+
+template<> struct lambda_impl< int_<1> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef typename l1::is_le is_le1;
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value
+            > is_le;
+
+        typedef bind1<
+              typename F::rebind
+            , typename l1::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<2> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value
+            > is_le;
+
+        typedef bind2<
+              typename F::rebind
+            , typename l1::type, typename l2::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<3> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value
+            > is_le;
+
+        typedef bind3<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<4> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value
+            > is_le;
+
+        typedef bind4<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<5> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        typedef lambda< typename F::arg5, Tag, false_ > l5;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        typedef typename l5::is_le is_le5;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value
+            > is_le;
+
+        typedef bind5<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type, typename l5::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+    , typename Protect
+    >
+struct lambda
+{
+    /// Metafunction forwarding confuses MSVC 6.x
+    typedef typename aux::template_arity<T>::type arity_;
+    typedef typename aux::lambda_impl<arity_>
+        ::template result_< T,Tag,Protect > l_;
+
+    typedef typename l_::type type;
+    typedef typename l_::is_le is_le;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect))
+};
+
+BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/less.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/less.hpp
new file mode 100644
index 0000000..4fe3cd1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/less.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less
+
+    : less_impl<
+          typename less_tag<N1>::type
+        , typename less_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp
new file mode 100644
index 0000000..ca2894f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_equal_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_equal_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less_equal
+
+    : less_equal_impl<
+          typename less_equal_tag<N1>::type
+        , typename less_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/list.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/list.hpp
new file mode 100644
index 0000000..4e8ad53
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/list.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct list;
+
+template<
+     
+    >
+struct list<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list0<  >
+{
+    typedef list0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct list<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list1<T0>
+{
+    typedef typename list1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct list<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list2< T0,T1 >
+{
+    typedef typename list2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct list<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list3< T0,T1,T2 >
+{
+    typedef typename list3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct list<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list4< T0,T1,T2,T3 >
+{
+    typedef typename list4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct list<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list5< T0,T1,T2,T3,T4 >
+{
+    typedef typename list5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : list15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : list16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : list17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : list18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : list19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct list
+    : list20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/list_c.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/list_c.hpp
new file mode 100644
index 0000000..0b48a7f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/list_c.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct list_c;
+
+template<
+      typename T
+    >
+struct list_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list0_c<T>
+{
+    typedef typename list0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct list_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list1_c< T,C0 >
+{
+    typedef typename list1_c< T,C0 >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct list_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list2_c< T,C0,C1 >
+{
+    typedef typename list2_c< T,C0,C1 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct list_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list3_c< T,C0,C1,C2 >
+{
+    typedef typename list3_c< T,C0,C1,C2 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct list_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list4_c< T,C0,C1,C2,C3 >
+{
+    typedef typename list4_c< T,C0,C1,C2,C3 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list5_c< T,C0,C1,C2,C3,C4 >
+{
+    typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list6_c< T,C0,C1,C2,C3,C4,C5 >
+{
+    typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+{
+    typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+{
+    typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+{
+    typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+{
+    typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+{
+    typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+{
+    typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+{
+    typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list14_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        >
+{
+    typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list15_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        >
+{
+    typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list16_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15
+        >
+{
+    typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list17_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16
+        >
+{
+    typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : list18_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17
+        >
+{
+    typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : list19_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18
+        >
+{
+    typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct list_c
+    : list20_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, C19
+        >
+{
+    typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/map.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/map.hpp
new file mode 100644
index 0000000..837e013
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/map.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct map;
+
+template<
+     
+    >
+struct map<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map0<  >
+{
+    typedef map0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct map<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map1<T0>
+{
+    typedef typename map1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct map<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map2< T0,T1 >
+{
+    typedef typename map2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct map<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map3< T0,T1,T2 >
+{
+    typedef typename map3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct map<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map4< T0,T1,T2,T3 >
+{
+    typedef typename map4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct map<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map5< T0,T1,T2,T3,T4 >
+{
+    typedef typename map5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : map15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : map16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : map17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : map18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : map19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct map
+    : map20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/minus.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/minus.hpp
new file mode 100644
index 0000000..71d4913
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/minus.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/minus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct minus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct minus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct minus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct minus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct minus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct minus
+    : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , minus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct minus< N1,N2,N3,N4,na >
+
+    : minus< minus< minus< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct minus< N1,N2,N3,na,na >
+
+    : minus< minus< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct minus< N1,N2,na,na,na >
+    : minus_impl<
+          typename minus_tag<N1>::type
+        , typename minus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, minus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct minus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  - BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/modulus.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/modulus.hpp
new file mode 100644
index 0000000..224b349
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/modulus.hpp
@@ -0,0 +1,101 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/modulus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct modulus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct modulus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct modulus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct modulus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct modulus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct modulus
+
+    : modulus_impl<
+          typename modulus_tag<N1>::type
+        , typename modulus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct modulus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  % BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp
new file mode 100644
index 0000000..98b21b1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/not_equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct not_equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct not_equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct not_equal_to_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct not_equal_to_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct not_equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct not_equal_to
+
+    : not_equal_to_impl<
+          typename not_equal_to_tag<N1>::type
+        , typename not_equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct not_equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/plus.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/plus.hpp
new file mode 100644
index 0000000..a9f6ee7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/plus.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/plus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct plus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct plus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct plus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct plus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct plus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct plus
+    : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , plus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct plus< N1,N2,N3,N4,na >
+
+    : plus< plus< plus< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct plus< N1,N2,N3,na,na >
+
+    : plus< plus< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct plus< N1,N2,na,na,na >
+    : plus_impl<
+          typename plus_tag<N1>::type
+        , typename plus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, plus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct plus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  + BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp
new file mode 100644
index 0000000..c468684
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp
@@ -0,0 +1,231 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef fwd_state0 bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef fwd_state1 bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef fwd_state2 bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef fwd_state3 bkwd_state3;
+    typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef fwd_state4 bkwd_state4;
+    typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+    typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter4 iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef reverse_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , iter4
+        , Last
+        , fwd_state4
+        , BackwardOp
+        , ForwardOp
+        > nested_chunk;
+
+    typedef typename nested_chunk::state bkwd_state4;
+    typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+    typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef typename nested_chunk::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef reverse_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , typename deref<First>::type
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp
new file mode 100644
index 0000000..658f92a
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp
@@ -0,0 +1,231 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef fwd_state0 bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef fwd_state1 bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef fwd_state2 bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef fwd_state3 bkwd_state3;
+    typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef fwd_state4 bkwd_state4;
+    typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+    typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter4 iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef reverse_iter_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , iter4
+        , Last
+        , fwd_state4
+        , BackwardOp
+        , ForwardOp
+        > nested_chunk;
+
+    typedef typename nested_chunk::state bkwd_state4;
+    typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+    typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef typename nested_chunk::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef reverse_iter_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , First
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/set.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/set.hpp
new file mode 100644
index 0000000..5721922
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/set.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct set;
+
+template<
+     
+    >
+struct set<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set0<  >
+{
+    typedef set0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct set<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set1<T0>
+{
+    typedef typename set1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct set<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set2< T0,T1 >
+{
+    typedef typename set2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct set<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set3< T0,T1,T2 >
+{
+    typedef typename set3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct set<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set4< T0,T1,T2,T3 >
+{
+    typedef typename set4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct set<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set5< T0,T1,T2,T3,T4 >
+{
+    typedef typename set5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : set15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : set16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : set17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : set18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : set19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct set
+    : set20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/set_c.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/set_c.hpp
new file mode 100644
index 0000000..cbeb932
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/set_c.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct set_c;
+
+template<
+      typename T
+    >
+struct set_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set0_c<T>
+{
+    typedef typename set0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct set_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set1_c< T,C0 >
+{
+    typedef typename set1_c< T,C0 >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct set_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set2_c< T,C0,C1 >
+{
+    typedef typename set2_c< T,C0,C1 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct set_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set3_c< T,C0,C1,C2 >
+{
+    typedef typename set3_c< T,C0,C1,C2 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct set_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set4_c< T,C0,C1,C2,C3 >
+{
+    typedef typename set4_c< T,C0,C1,C2,C3 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set5_c< T,C0,C1,C2,C3,C4 >
+{
+    typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set6_c< T,C0,C1,C2,C3,C4,C5 >
+{
+    typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+{
+    typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+{
+    typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+{
+    typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+{
+    typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+{
+    typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+{
+    typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+{
+    typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set14_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        >
+{
+    typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set15_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        >
+{
+    typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set16_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15
+        >
+{
+    typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set17_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16
+        >
+{
+    typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : set18_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17
+        >
+{
+    typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : set19_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18
+        >
+{
+    typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct set_c
+    : set20_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, C19
+        >
+{
+    typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp
new file mode 100644
index 0000000..b5b181c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp
@@ -0,0 +1,99 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_left.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_left_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_left_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_left_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_left_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_left_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_left
+
+    : shift_left_impl<
+          typename shift_left_tag<N1>::type
+        , typename shift_left_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct shift_left_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  << BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp
new file mode 100644
index 0000000..f7a342e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp
@@ -0,0 +1,99 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_right.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_right_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_right_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_right_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_right_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_right_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_right
+
+    : shift_right_impl<
+          typename shift_right_tag<N1>::type
+        , typename shift_right_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct shift_right_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  >> BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/times.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/times.hpp
new file mode 100644
index 0000000..cb97cc4
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/times.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/times.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct times_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct times_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct times_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct times_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct times_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct times
+    : times< times< times< times< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , times
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct times< N1,N2,N3,N4,na >
+
+    : times< times< times< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct times< N1,N2,N3,na,na >
+
+    : times< times< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct times< N1,N2,na,na,na >
+    : times_impl<
+          typename times_tag<N1>::type
+        , typename times_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, times)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct times_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  * BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp
new file mode 100644
index 0000000..2194ce9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/unpack_args.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< int size, typename F, typename Args >
+struct unpack_args_impl;
+
+template< typename F, typename Args >
+struct unpack_args_impl< 0,F,Args >
+    : apply0<
+          F
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 1,F,Args >
+    : apply1<
+          F
+        , typename at_c< Args,0 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 2,F,Args >
+    : apply2<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 3,F,Args >
+    : apply3<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 4,F,Args >
+    : apply4<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 5,F,Args >
+    : apply5<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+        , typename at_c< Args,4 >::type
+        >
+{
+};
+
+}
+
+template<
+      typename F
+    >
+struct unpack_args
+{
+    template< typename Args > struct apply
+
+        : aux::unpack_args_impl< size<Args>::value,F, Args >
+
+    {
+    };
+};
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/vector.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/vector.hpp
new file mode 100644
index 0000000..bfa9565
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/vector.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct vector;
+
+template<
+     
+    >
+struct vector<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector0<  >
+{
+    typedef vector0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct vector<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector1<T0>
+{
+    typedef typename vector1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct vector<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector2< T0,T1 >
+{
+    typedef typename vector2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct vector<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector3< T0,T1,T2 >
+{
+    typedef typename vector3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct vector<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector4< T0,T1,T2,T3 >
+{
+    typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct vector<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector5< T0,T1,T2,T3,T4 >
+{
+    typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : vector15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : vector16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : vector17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : vector18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : vector19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct vector
+    : vector20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp b/ext/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp
new file mode 100644
index 0000000..0f1560d
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp
@@ -0,0 +1,309 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct vector_c;
+
+template<
+      typename T
+    >
+struct vector_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector0_c<T>
+{
+    typedef typename vector0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct vector_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector1_c< T, T(C0) >
+{
+    typedef typename vector1_c< T, T(C0) >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct vector_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector2_c< T, T(C0), T(C1) >
+{
+    typedef typename vector2_c< T, T(C0), T(C1) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct vector_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector3_c< T, T(C0), T(C1), T(C2) >
+{
+    typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector4_c< T, T(C0), T(C1), T(C2), T(C3) >
+{
+    typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >
+{
+    typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >
+{
+    typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >
+{
+    typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >
+{
+    typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >
+{
+    typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >
+{
+    typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >
+{
+    typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >
+{
+    typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >
+{
+    typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >
+{
+    typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >
+{
+    typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >
+{
+    typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >
+{
+    typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >
+{
+    typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >
+{
+    typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct vector_c
+    : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >
+{
+    typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp
new file mode 100644
index 0000000..36337c8
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp
@@ -0,0 +1,132 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_backward;
+template<>
+struct advance_backward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+
+    /// ETI workaround
+    template<> struct apply<int>
+    {
+        typedef int type;
+    };
+
+};
+
+template<>
+struct advance_backward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef iter1 type;
+    };
+
+    /// ETI workaround
+    template<> struct apply<int>
+    {
+        typedef int type;
+    };
+
+};
+
+template<>
+struct advance_backward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef iter2 type;
+    };
+
+    /// ETI workaround
+    template<> struct apply<int>
+    {
+        typedef int type;
+    };
+
+};
+
+template<>
+struct advance_backward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef iter3 type;
+    };
+
+    /// ETI workaround
+    template<> struct apply<int>
+    {
+        typedef int type;
+    };
+
+};
+
+template<>
+struct advance_backward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef typename prior<iter3>::type iter4;
+        typedef iter4 type;
+    };
+
+    /// ETI workaround
+    template<> struct apply<int>
+    {
+        typedef int type;
+    };
+
+};
+
+template< long N >
+struct advance_backward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_backward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_backward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp
new file mode 100644
index 0000000..4ffbe78
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp
@@ -0,0 +1,132 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_forward;
+template<>
+struct advance_forward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+
+    /// ETI workaround
+    template<> struct apply<int>
+    {
+        typedef int type;
+    };
+
+};
+
+template<>
+struct advance_forward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef iter1 type;
+    };
+
+    /// ETI workaround
+    template<> struct apply<int>
+    {
+        typedef int type;
+    };
+
+};
+
+template<>
+struct advance_forward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef iter2 type;
+    };
+
+    /// ETI workaround
+    template<> struct apply<int>
+    {
+        typedef int type;
+    };
+
+};
+
+template<>
+struct advance_forward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef iter3 type;
+    };
+
+    /// ETI workaround
+    template<> struct apply<int>
+    {
+        typedef int type;
+    };
+
+};
+
+template<>
+struct advance_forward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef typename next<iter3>::type iter4;
+        typedef iter4 type;
+    };
+
+    /// ETI workaround
+    template<> struct apply<int>
+    {
+        typedef int type;
+    };
+
+};
+
+template< long N >
+struct advance_forward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_forward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_forward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/and.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/and.hpp
new file mode 100644
index 0000000..555c800
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/and.hpp
@@ -0,0 +1,73 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/and.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< bool C_ > struct and_impl
+{
+    template<
+          typename T1, typename T2, typename T3, typename T4
+        >
+    struct result_
+        : false_
+    {
+    };
+};
+
+template<> struct and_impl<true>
+{
+    template<
+          typename T1, typename T2, typename T3, typename T4
+        >
+    struct result_
+        : and_impl<
+              BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+            >::template result_< T2,T3,T4,true_ >
+    {
+    };
+};
+
+template<>
+struct and_impl<true>
+    ::result_< true_,true_,true_,true_ >
+        : true_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = true_, typename T4 = true_, typename T5 = true_
+    >
+struct and_
+
+    : aux::and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        >::template result_< T2,T3,T4,T5 >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , and_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , and_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/apply.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/apply.hpp
new file mode 100644
index 0000000..a3e2929
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/apply.hpp
@@ -0,0 +1,166 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct apply0
+
+{
+    typedef typename apply_wrap0<
+          typename lambda<F>::type
+       
+        >::type type;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          1
+        , apply0
+        , (F )
+        )
+};
+
+/// workaround for ETI bug
+template<>
+struct apply0<int>
+{
+    typedef int type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply1
+
+{
+    typedef typename apply_wrap1<
+          typename lambda<F>::type
+        , T1
+        >::type type;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          2
+        , apply1
+        , (F, T1)
+        )
+};
+
+/// workaround for ETI bug
+template<>
+struct apply1< int,int >
+{
+    typedef int type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2
+
+{
+    typedef typename apply_wrap2<
+          typename lambda<F>::type
+        , T1, T2
+        >::type type;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , apply2
+        , (F, T1, T2)
+        )
+};
+
+/// workaround for ETI bug
+template<>
+struct apply2< int,int,int >
+{
+    typedef int type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3
+
+{
+    typedef typename apply_wrap3<
+          typename lambda<F>::type
+        , T1, T2, T3
+        >::type type;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , apply3
+        , (F, T1, T2, T3)
+        )
+};
+
+/// workaround for ETI bug
+template<>
+struct apply3< int,int,int,int >
+{
+    typedef int type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4
+
+{
+    typedef typename apply_wrap4<
+          typename lambda<F>::type
+        , T1, T2, T3, T4
+        >::type type;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , apply4
+        , (F, T1, T2, T3, T4)
+        )
+};
+
+/// workaround for ETI bug
+template<>
+struct apply4< int,int,int,int,int >
+{
+    typedef int type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5
+
+{
+    typedef typename apply_wrap5<
+          typename lambda<F>::type
+        , T1, T2, T3, T4, T5
+        >::type type;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          6
+        , apply5
+        , (F, T1, T2, T3, T4, T5)
+        )
+};
+
+/// workaround for ETI bug
+template<>
+struct apply5< int,int,int,int,int,int >
+{
+    typedef int type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp
new file mode 100644
index 0000000..f0f86c1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp
@@ -0,0 +1,46 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct apply0;
+
+template<
+      typename F, typename T1
+    >
+struct apply1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp
new file mode 100644
index 0000000..4e89507
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp
@@ -0,0 +1,247 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply_wrap.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template< typename F>
+struct msvc_apply0
+{
+    template< bool > struct f_ : F {};
+    template<> struct f_<true>
+    {
+        template< typename P  = int > struct apply
+        {
+            typedef int type;
+        };
+    };
+
+    template< typename T  = int > struct result_
+        : f_< aux::msvc_never_true<F>::value >
+            ::template apply<>
+    {
+    };
+
+};
+
+template<
+      typename F
+    >
+struct apply_wrap0
+{
+    typedef typename msvc_apply0<F>::template result_<
+         
+        >::type type;
+};
+
+/// workaround for ETI bug
+template<>
+struct apply_wrap0<int>
+{
+    typedef int type;
+};
+
+template< typename F>
+struct msvc_apply1
+{
+    template< bool > struct f_ : F {};
+    template<> struct f_<true>
+    {
+        template< typename P1 > struct apply
+        {
+            typedef int type;
+        };
+    };
+
+    template< typename T1 > struct result_
+        : f_< aux::msvc_never_true<F>::value >
+            ::template apply<T1>
+    {
+    };
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap1
+{
+    typedef typename msvc_apply1<F>::template result_<
+          T1
+        >::type type;
+};
+
+/// workaround for ETI bug
+template<>
+struct apply_wrap1< int,int >
+{
+    typedef int type;
+};
+
+template< typename F>
+struct msvc_apply2
+{
+    template< bool > struct f_ : F {};
+    template<> struct f_<true>
+    {
+        template< typename P1, typename P2 > struct apply
+        {
+            typedef int type;
+        };
+    };
+
+    template< typename T1, typename T2 > struct result_
+        : f_< aux::msvc_never_true<F>::value >
+            ::template apply< T1,T2 >
+    {
+    };
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap2
+{
+    typedef typename msvc_apply2<F>::template result_<
+          T1, T2
+        >::type type;
+};
+
+/// workaround for ETI bug
+template<>
+struct apply_wrap2< int,int,int >
+{
+    typedef int type;
+};
+
+template< typename F>
+struct msvc_apply3
+{
+    template< bool > struct f_ : F {};
+    template<> struct f_<true>
+    {
+        template< typename P1, typename P2, typename P3 > struct apply
+        {
+            typedef int type;
+        };
+    };
+
+    template< typename T1, typename T2, typename T3 > struct result_
+        : f_< aux::msvc_never_true<F>::value >
+            ::template apply< T1,T2,T3 >
+    {
+    };
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap3
+{
+    typedef typename msvc_apply3<F>::template result_<
+          T1, T2, T3
+        >::type type;
+};
+
+/// workaround for ETI bug
+template<>
+struct apply_wrap3< int,int,int,int >
+{
+    typedef int type;
+};
+
+template< typename F>
+struct msvc_apply4
+{
+    template< bool > struct f_ : F {};
+    template<> struct f_<true>
+    {
+        template<
+              typename P1, typename P2, typename P3, typename P4
+            >
+        struct apply
+        {
+            typedef int type;
+        };
+    };
+
+    template<
+          typename T1, typename T2, typename T3, typename T4
+        >
+    struct result_
+        : f_< aux::msvc_never_true<F>::value >
+            ::template apply< T1,T2,T3,T4 >
+    {
+    };
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap4
+{
+    typedef typename msvc_apply4<F>::template result_<
+          T1, T2, T3, T4
+        >::type type;
+};
+
+/// workaround for ETI bug
+template<>
+struct apply_wrap4< int,int,int,int,int >
+{
+    typedef int type;
+};
+
+template< typename F>
+struct msvc_apply5
+{
+    template< bool > struct f_ : F {};
+    template<> struct f_<true>
+    {
+        template<
+              typename P1, typename P2, typename P3, typename P4
+            , typename P5
+            >
+        struct apply
+        {
+            typedef int type;
+        };
+    };
+
+    template<
+          typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+        : f_< aux::msvc_never_true<F>::value >
+            ::template apply< T1,T2,T3,T4,T5 >
+    {
+    };
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply_wrap5
+{
+    typedef typename msvc_apply5<F>::template result_<
+          T1, T2, T3, T4, T5
+        >::type type;
+};
+
+/// workaround for ETI bug
+template<>
+struct apply_wrap5< int,int,int,int,int,int >
+{
+    typedef int type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/arg.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/arg.hpp
new file mode 100644
index 0000000..6f2f8a8
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/arg.hpp
@@ -0,0 +1,123 @@
+
+// Copyright Peter Dimov 2001-2002
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/arg.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+template<> struct arg< -1 >
+{
+    BOOST_STATIC_CONSTANT(int, value  = -1);
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<1>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 1);
+    typedef arg<2> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<2>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 2);
+    typedef arg<3> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U2 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<3>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 3);
+    typedef arg<4> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U3 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<4>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 4);
+    typedef arg<5> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U4 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<5>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 5);
+    typedef arg<6> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U5 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg)
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp
new file mode 100644
index 0000000..4f12a40
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< bool >
+struct resolve_arg_impl
+{
+    template<
+          typename T, typename U1, typename U2, typename U3
+        , typename U4, typename U5
+        >
+    struct result_
+    {
+        typedef T type;
+    };
+};
+
+template<>
+struct resolve_arg_impl<true>
+{
+    template<
+          typename T, typename U1, typename U2, typename U3
+        , typename U4, typename U5
+        >
+    struct result_
+    {
+        typedef typename apply_wrap5<
+              T
+            , U1, U2, U3, U4, U5
+            >::type type;
+    };
+};
+
+template< typename T > struct is_bind_template;
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+    : resolve_arg_impl< is_bind_template<T>::value >
+            ::template result_< T,U1,U2,U3,U4,U5 >
+{
+};
+
+template< int arity_ > struct bind_chooser;
+
+aux::no_tag is_bind_helper(...);
+template< typename T > aux::no_tag is_bind_helper(protect<T>*);
+
+template< int N >
+aux::yes_tag is_bind_helper(arg<N>*);
+
+template< bool is_ref_  = true >
+struct is_bind_template_impl
+{
+    template< typename T > struct result_
+    {
+        BOOST_STATIC_CONSTANT(bool, value  = false);
+    };
+};
+
+template<>
+struct is_bind_template_impl<false>
+{
+    template< typename T > struct result_
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+              sizeof(aux::is_bind_helper(static_cast<T*>(0)))
+                == sizeof(aux::yes_tag)
+            );
+    };
+};
+
+template< typename T > struct is_bind_template
+    : is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
+        ::template result_<T>
+{
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F
+    >
+aux::yes_tag
+is_bind_helper(bind0<F>*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1
+    >
+aux::yes_tag
+is_bind_helper(bind1< F,T1 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2
+    >
+aux::yes_tag
+is_bind_helper(bind2< F,T1,T2 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+aux::yes_tag
+is_bind_helper(bind3< F,T1,T2,T3 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+aux::yes_tag
+is_bind_helper(bind4< F,T1,T2,T3,T4 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+        typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
+
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+aux::yes_tag
+is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/bind.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/bind.hpp
new file mode 100644
index 0000000..53c76e8
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/bind.hpp
@@ -0,0 +1,432 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< bool >
+struct resolve_arg_impl
+{
+    template<
+          typename T, typename U1, typename U2, typename U3
+        , typename U4, typename U5
+        >
+    struct result_
+    {
+        typedef T type;
+    };
+};
+
+template<>
+struct resolve_arg_impl<true>
+{
+    template<
+          typename T, typename U1, typename U2, typename U3
+        , typename U4, typename U5
+        >
+    struct result_
+    {
+        typedef typename apply_wrap5<
+              T
+            , U1, U2, U3, U4, U5
+            >::type type;
+    };
+};
+
+template< typename T > struct is_bind_template;
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+    : resolve_arg_impl< is_bind_template<T>::value >
+            ::template result_< T,U1,U2,U3,U4,U5 >
+{
+};
+
+template< typename T >
+struct replace_unnamed_arg_impl
+{
+    template< typename Arg > struct result_
+    {
+        typedef Arg next;
+        typedef T type;
+    };
+};
+
+template<>
+struct replace_unnamed_arg_impl< arg< -1 > >
+{
+    template< typename Arg > struct result_
+    {
+        typedef typename next<Arg>::type next;
+        typedef Arg type;
+    };
+};
+
+template< typename T, typename Arg >
+struct replace_unnamed_arg
+    : replace_unnamed_arg_impl<T>::template result_<Arg>
+{
+};
+
+template< int arity_ > struct bind_chooser;
+
+aux::no_tag is_bind_helper(...);
+template< typename T > aux::no_tag is_bind_helper(protect<T>*);
+
+template< int N >
+aux::yes_tag is_bind_helper(arg<N>*);
+
+template< bool is_ref_  = true >
+struct is_bind_template_impl
+{
+    template< typename T > struct result_
+    {
+        BOOST_STATIC_CONSTANT(bool, value  = false);
+    };
+};
+
+template<>
+struct is_bind_template_impl<false>
+{
+    template< typename T > struct result_
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+              sizeof(aux::is_bind_helper(static_cast<T*>(0)))
+                == sizeof(aux::yes_tag)
+            );
+    };
+};
+
+template< typename T > struct is_bind_template
+    : is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
+        ::template result_<T>
+{
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F
+    >
+aux::yes_tag
+is_bind_helper(bind0<F>*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1
+    >
+aux::yes_tag
+is_bind_helper(bind1< F,T1 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2
+    >
+aux::yes_tag
+is_bind_helper(bind2< F,T1,T2 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+aux::yes_tag
+is_bind_helper(bind3< F,T1,T2,T3 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+aux::yes_tag
+is_bind_helper(bind4< F,T1,T2,T3,T4 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+        typedef aux::replace_unnamed_arg< T5,n5 > r5;
+        typedef typename r5::type a5;
+        typedef typename r5::next n6;
+        typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5;
+        ///
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+aux::yes_tag
+is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp
new file mode 100644
index 0000000..022cba3
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp
@@ -0,0 +1,46 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bind_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct bind0;
+
+template<
+      typename F, typename T1
+    >
+struct bind1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp
new file mode 100644
index 0000000..e96cf1a
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp
@@ -0,0 +1,149 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitand.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct bitand_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitand_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitand_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitand_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitand_tag
+{
+    typedef typename T::tag type;
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct bitand_2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitand_
+
+    : if_<
+
+          is_na<N3>
+        , bitand_2< N1,N2 >
+        , bitand_<
+              bitand_2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct bitand_2
+    : aux::msvc_eti_base< typename apply_wrap2<
+          bitand_impl<
+              typename bitand_tag<N1>::type
+            , typename bitand_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct bitand_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 & n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct bitand_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::bitand_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp
new file mode 100644
index 0000000..bbc96ab
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp
@@ -0,0 +1,149 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct bitor_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitor_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitor_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitor_tag
+{
+    typedef typename T::tag type;
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct bitor_2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitor_
+
+    : if_<
+
+          is_na<N3>
+        , bitor_2< N1,N2 >
+        , bitor_<
+              bitor_2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct bitor_2
+    : aux::msvc_eti_base< typename apply_wrap2<
+          bitor_impl<
+              typename bitor_tag<N1>::type
+            , typename bitor_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct bitor_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 | n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct bitor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::bitor_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp
new file mode 100644
index 0000000..4c14297
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp
@@ -0,0 +1,149 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitxor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct bitxor_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitxor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitxor_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitxor_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitxor_tag
+{
+    typedef typename T::tag type;
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct bitxor_2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitxor_
+
+    : if_<
+
+          is_na<N3>
+        , bitxor_2< N1,N2 >
+        , bitxor_<
+              bitxor_2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct bitxor_2
+    : aux::msvc_eti_base< typename apply_wrap2<
+          bitxor_impl<
+              typename bitxor_tag<N1>::type
+            , typename bitxor_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct bitxor_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 ^ n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct bitxor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::bitxor_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/deque.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/deque.hpp
new file mode 100644
index 0000000..a0445d9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/deque.hpp
@@ -0,0 +1,556 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/deque.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct deque_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct deque_chooser<0>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef vector0<
+             
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<1>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector1<
+              T0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<2>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector2<
+              T0, T1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<3>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector3<
+              T0, T1, T2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<4>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector4<
+              T0, T1, T2, T3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<5>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector5<
+              T0, T1, T2, T3, T4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<6>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector6<
+              T0, T1, T2, T3, T4, T5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<7>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector7<
+              T0, T1, T2, T3, T4, T5, T6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<8>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector8<
+              T0, T1, T2, T3, T4, T5, T6, T7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<9>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector9<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<10>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector10<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<11>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector11<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<12>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector12<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<13>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector13<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<14>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector14<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<15>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector15<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<16>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector16<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<17>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector17<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<18>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector18<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<19>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector19<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<20>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector20<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_deque_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_deque_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename T6, typename T7, typename T8, typename T9, typename T10
+    , typename T11, typename T12, typename T13, typename T14, typename T15
+    , typename T16, typename T17, typename T18, typename T19, typename T20
+    >
+struct deque_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_deque_arg<T1>::value + is_deque_arg<T2>::value 
+        + is_deque_arg<T3>::value + is_deque_arg<T4>::value 
+        + is_deque_arg<T5>::value + is_deque_arg<T6>::value 
+        + is_deque_arg<T7>::value + is_deque_arg<T8>::value 
+        + is_deque_arg<T9>::value + is_deque_arg<T10>::value 
+        + is_deque_arg<T11>::value + is_deque_arg<T12>::value 
+        + is_deque_arg<T13>::value + is_deque_arg<T14>::value 
+        + is_deque_arg<T15>::value + is_deque_arg<T16>::value 
+        + is_deque_arg<T17>::value + is_deque_arg<T18>::value 
+        + is_deque_arg<T19>::value + is_deque_arg<T20>::value
+        );
+
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct deque_impl
+{
+    typedef aux::deque_count_args<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        > arg_num_;
+
+    typedef typename aux::deque_chooser< arg_num_::value >
+        ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct deque
+    : aux::deque_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type
+{
+    typedef typename aux::deque_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/divides.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/divides.hpp
new file mode 100644
index 0000000..7681491
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/divides.hpp
@@ -0,0 +1,148 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/divides.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct divides_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct divides_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct divides_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct divides_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct divides_tag
+{
+    typedef typename T::tag type;
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct divides2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct divides
+
+    : if_<
+
+          is_na<N3>
+        , divides2< N1,N2 >
+        , divides<
+              divides2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , divides
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct divides2
+    : aux::msvc_eti_base< typename apply_wrap2<
+          divides_impl<
+              typename divides_tag<N1>::type
+            , typename divides_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, divides)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct divides_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 / n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct divides_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::divides_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp
new file mode 100644
index 0000000..64e9065
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp
@@ -0,0 +1,102 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct equal_to_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct equal_to_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct equal_to_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct equal_to
+    : aux::msvc_eti_base< typename apply_wrap2<
+          equal_to_impl<
+              typename equal_to_tag<N1>::type
+            , typename equal_to_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ==
+             BOOST_MPL_AUX_VALUE_WKND(N2)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp
new file mode 100644
index 0000000..4b3c690
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp
@@ -0,0 +1,293 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl;
+
+template< int N >
+struct fold_chunk;
+
+template<> struct fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef state0 state;
+        typedef iter0 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<> struct fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef state1 state;
+        typedef iter1 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<> struct fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef state2 state;
+        typedef iter2 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<> struct fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef state3 state;
+        typedef iter3 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<> struct fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef state4 state;
+        typedef iter4 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template< int N >
+struct fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef fold_impl<
+              4
+            , First
+            , Last
+            , State
+            , ForwardOp
+            > chunk_;
+
+        typedef fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , typename chunk_::iterator
+            , Last
+            , typename chunk_::state
+            , ForwardOp
+            > res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , fold_null_step< Last,State >
+            , fold_step< First,Last,State,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_step
+{
+    typedef fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , ForwardOp
+        > chunk_;
+
+    typedef typename chunk_::state state;
+    typedef typename chunk_::iterator iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl
+    : fold_chunk<N>
+        ::template result_< First,Last,State,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp
new file mode 100644
index 0000000..bf81873
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp
@@ -0,0 +1,554 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+   
+    >
+struct lambda
+{
+    typedef false_ is_le;
+    typedef T result_;
+    typedef T type;
+};
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+template< int N, typename Tag >
+struct lambda< arg<N>, Tag >
+{
+    typedef true_ is_le;
+    typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41
+    typedef mpl::protect<result_> type;
+};
+
+template<
+      typename F
+    , typename Tag
+    >
+struct lambda<
+          bind0<F>
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind0<
+          F
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1
+{
+    typedef F<
+          typename L1::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1< true_,Tag,F,L1 >
+{
+    typedef bind1<
+          quote1< F,Tag >
+        , typename L1::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1 > class F
+    , typename T1
+    , typename Tag
+    >
+struct lambda<
+          F<T1>
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef typename l1::is_le is_le1;
+    typedef typename aux::lambda_or<
+          is_le1::value
+        >::type is_le;
+
+    typedef aux::le_result1<
+          is_le, Tag, F, l1
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1
+    , typename Tag
+    >
+struct lambda<
+          bind1< F,T1 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind1<
+          F
+        , T1
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2
+{
+    typedef F<
+          typename L1::type, typename L2::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2< true_,Tag,F,L1,L2 >
+{
+    typedef bind2<
+          quote2< F,Tag >
+        , typename L1::result_, typename L2::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2 > class F
+    , typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value
+        >::type is_le;
+
+    typedef aux::le_result2<
+          is_le, Tag, F, l1, l2
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          bind2< F,T1,T2 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind2<
+          F
+        , T1, T2
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3< true_,Tag,F,L1,L2,L3 >
+{
+    typedef bind3<
+          quote3< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3 > class F
+    , typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value
+        >::type is_le;
+
+    typedef aux::le_result3<
+          is_le, Tag, F, l1, l2, l3
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          bind3< F,T1,T2,T3 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind3<
+          F
+        , T1, T2, T3
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4< true_,Tag,F,L1,L2,L3,L4 >
+{
+    typedef bind4<
+          quote4< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        >::type is_le;
+
+    typedef aux::le_result4<
+          is_le, Tag, F, l1, l2, l3, l4
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          bind4< F,T1,T2,T3,T4 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind4<
+          F
+        , T1, T2, T3, T4
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type, typename L5::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 >
+{
+    typedef bind5<
+          quote5< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_, typename L5::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template<
+          typename P1, typename P2, typename P3, typename P4
+        , typename P5
+        >
+      class F
+    , typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    typedef lambda< T5,Tag > l5;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    typedef typename l5::is_le is_le5;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        , is_le5::value
+        >::type is_le;
+
+    typedef aux::le_result5<
+          is_le, Tag, F, l1, l2, l3, l4, l5
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind5< F,T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind5<
+          F
+        , T1, T2, T3, T4, T5
+        > result_;
+
+    typedef result_ type;
+};
+
+/// special case for 'protect'
+template< typename T, typename Tag >
+struct lambda< mpl::protect<T>, Tag >
+{
+    typedef false_ is_le;
+    typedef mpl::protect<T> result_;
+    typedef result_ type;
+};
+
+/// specializations for the main 'bind' form
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind< F,T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind< F,T1,T2,T3,T4,T5 > result_;
+    typedef result_ type;
+};
+
+/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars
+
+template<
+      typename F, typename Tag1, typename Tag2
+    >
+struct lambda<
+          lambda< F,Tag1 >
+        , Tag2
+        >
+{
+    typedef lambda< F,Tag2 > l1;
+    typedef lambda< Tag1,Tag2 > l2;
+    typedef typename l1::is_le is_le;
+    typedef aux::le_result2<is_le, Tag2, mpl::lambda, l1, l2> le_result_;
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, lambda)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/greater.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/greater.hpp
new file mode 100644
index 0000000..5f5662d
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/greater.hpp
@@ -0,0 +1,102 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct greater_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct greater_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct greater_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater
+    : aux::msvc_eti_base< typename apply_wrap2<
+          greater_impl<
+              typename greater_tag<N1>::type
+            , typename greater_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >
+             BOOST_MPL_AUX_VALUE_WKND(N2)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp
new file mode 100644
index 0000000..ae776fc
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp
@@ -0,0 +1,102 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct greater_equal_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct greater_equal_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct greater_equal_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater_equal
+    : aux::msvc_eti_base< typename apply_wrap2<
+          greater_equal_impl<
+              typename greater_equal_tag<N1>::type
+            , typename greater_equal_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >=
+             BOOST_MPL_AUX_VALUE_WKND(N2)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp
new file mode 100644
index 0000000..233a1ec
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp
@@ -0,0 +1,166 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/inherit.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C1, bool C2 >
+struct inherit2_impl
+{
+    template< typename Derived, typename T1, typename T2 > struct result_
+        : T1, T2
+    {
+        typedef Derived type_;
+    };
+};
+
+template<>
+struct inherit2_impl< false,true >
+{
+    template< typename Derived, typename T1, typename T2 > struct result_
+        : T1
+    {
+        typedef T1 type_;
+    };
+};
+
+template<>
+struct inherit2_impl< true,false >
+{
+    template< typename Derived, typename T1, typename T2 > struct result_
+        : T2
+    {
+        typedef T2 type_;
+    };
+};
+
+template<>
+struct inherit2_impl< true,true >
+{
+    template< typename Derived, typename T1, typename T2 > struct result_
+    {
+        typedef T1 type_;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    >
+struct inherit2
+    : aux::inherit2_impl<
+          is_empty_base<T1>::value
+        , is_empty_base<T2>::value
+        >::template result_< inherit2< T1,T2 >,T1, T2 >
+{
+    typedef typename inherit2::type_ type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, inherit2)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na
+    >
+struct inherit3
+    : inherit2<
+          typename inherit2<
+              T1, T2
+            >::type
+        , T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , inherit3
+        , ( T1, T2, T3)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, inherit3)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    >
+struct inherit4
+    : inherit2<
+          typename inherit3<
+              T1, T2, T3
+            >::type
+        , T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , inherit4
+        , ( T1, T2, T3, T4)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(4, inherit4)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    , typename T5 = na
+    >
+struct inherit5
+    : inherit2<
+          typename inherit4<
+              T1, T2, T3, T4
+            >::type
+        , T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , inherit5
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(5, inherit5)
+
+/// primary template
+
+template<
+      typename T1 = empty_base, typename T2 = empty_base
+    , typename T3 = empty_base, typename T4 = empty_base
+    , typename T5 = empty_base
+    >
+struct inherit
+    : inherit5< T1,T2,T3,T4,T5 >
+{
+};
+
+template<>
+struct inherit< na,na,na,na,na >
+{
+    template<
+
+          typename T1 = empty_base, typename T2 = empty_base
+        , typename T3 = empty_base, typename T4 = empty_base
+        , typename T5 = empty_base
+
+        >
+    struct apply
+        : inherit< T1,T2,T3,T4,T5 >
+    {
+    };
+};
+
+BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp
new file mode 100644
index 0000000..6951795
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp
@@ -0,0 +1,133 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright David Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename Iterator, typename State >
+struct iter_fold_if_null_step
+{
+    typedef State state;
+    typedef Iterator iterator;
+};
+
+template< bool >
+struct iter_fold_if_step_impl
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef typename apply2< StateOp,State,Iterator >::type state;
+        typedef typename IteratorOp::type iterator;
+    };
+};
+
+template<>
+struct iter_fold_if_step_impl<false>
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef State state;
+        typedef Iterator iterator;
+    };
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_forward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename BackwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_backward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename ForwardPredicate
+    , typename BackwardOp
+    , typename BackwardPredicate
+    >
+struct iter_fold_if_impl
+{
+ private:
+    typedef iter_fold_if_null_step< Iterator,State > forward_step0;
+    typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1;
+    typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2;
+    typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3;
+    typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4;
+    
+
+    typedef typename if_<
+          typename forward_step4::not_last
+        , iter_fold_if_impl<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            , ForwardOp
+            , ForwardPredicate
+            , BackwardOp
+            , BackwardPredicate
+            >
+        , iter_fold_if_null_step<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            >
+        >::type backward_step4;
+
+    typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3;
+    typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2;
+    typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1;
+    typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0;
+    
+
+ public:
+    typedef typename backward_step0::state state;
+    typedef typename backward_step4::iterator iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp
new file mode 100644
index 0000000..69aadc4
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp
@@ -0,0 +1,293 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl;
+
+template< int N >
+struct iter_fold_chunk;
+
+template<> struct iter_fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef state0 state;
+        typedef iter0 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<> struct iter_fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef state1 state;
+        typedef iter1 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<> struct iter_fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef state2 state;
+        typedef iter2 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<> struct iter_fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef state3 state;
+        typedef iter3 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<> struct iter_fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef state4 state;
+        typedef iter4 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template< int N >
+struct iter_fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef iter_fold_impl<
+              4
+            , First
+            , Last
+            , State
+            , ForwardOp
+            > chunk_;
+
+        typedef iter_fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , typename chunk_::iterator
+            , Last
+            , typename chunk_::state
+            , ForwardOp
+            > res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct iter_fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct iter_fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , iter_fold_null_step< Last,State >
+            , iter_fold_step< First,Last,State,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_step
+{
+    typedef iter_fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , ForwardOp
+        > chunk_;
+
+    typedef typename chunk_::state state;
+    typedef typename chunk_::iterator iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl
+    : iter_fold_chunk<N>
+        ::template result_< First,Last,State,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp
new file mode 100644
index 0000000..890a198
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp
@@ -0,0 +1,229 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+template< typename Arity > struct lambda_impl
+{
+    template< typename T, typename Tag, typename Protect > struct result_
+    {
+        typedef T type;
+        typedef is_placeholder<T> is_le;
+    };
+};
+
+template<> struct lambda_impl< int_<1> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef typename l1::is_le is_le1;
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value
+            > is_le;
+
+        typedef bind1<
+              typename F::rebind
+            , typename l1::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<2> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value
+            > is_le;
+
+        typedef bind2<
+              typename F::rebind
+            , typename l1::type, typename l2::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<3> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value
+            > is_le;
+
+        typedef bind3<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<4> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value
+            > is_le;
+
+        typedef bind4<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<5> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        typedef lambda< typename F::arg5, Tag, false_ > l5;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        typedef typename l5::is_le is_le5;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value
+            > is_le;
+
+        typedef bind5<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type, typename l5::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+    , typename Protect
+    >
+struct lambda
+{
+    /// Metafunction forwarding confuses MSVC 6.x
+    typedef typename aux::template_arity<T>::type arity_;
+    typedef typename aux::lambda_impl<arity_>
+        ::template result_< T,Tag,Protect > l_;
+
+    typedef typename l_::type type;
+    typedef typename l_::is_le is_le;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect))
+};
+
+BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/less.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/less.hpp
new file mode 100644
index 0000000..951f060
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/less.hpp
@@ -0,0 +1,102 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct less_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct less_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct less_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less
+    : aux::msvc_eti_base< typename apply_wrap2<
+          less_impl<
+              typename less_tag<N1>::type
+            , typename less_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N2)::value >
+             BOOST_MPL_AUX_VALUE_WKND(N1)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp
new file mode 100644
index 0000000..a56e692
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp
@@ -0,0 +1,102 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct less_equal_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct less_equal_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct less_equal_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less_equal
+    : aux::msvc_eti_base< typename apply_wrap2<
+          less_equal_impl<
+              typename less_equal_tag<N1>::type
+            , typename less_equal_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <=
+             BOOST_MPL_AUX_VALUE_WKND(N2)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/list.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/list.hpp
new file mode 100644
index 0000000..e5ea456
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/list.hpp
@@ -0,0 +1,556 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct list_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct list_chooser<0>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef list0<
+             
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<1>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list1<
+              T0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<2>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list2<
+              T0, T1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<3>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list3<
+              T0, T1, T2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<4>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list4<
+              T0, T1, T2, T3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<5>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list5<
+              T0, T1, T2, T3, T4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<6>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list6<
+              T0, T1, T2, T3, T4, T5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<7>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list7<
+              T0, T1, T2, T3, T4, T5, T6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<8>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list8<
+              T0, T1, T2, T3, T4, T5, T6, T7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<9>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list9<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<10>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list10<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<11>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list11<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<12>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list12<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<13>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list13<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<14>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list14<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<15>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list15<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<16>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list16<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<17>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list17<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<18>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list18<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<19>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list19<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<20>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list20<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_list_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_list_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename T6, typename T7, typename T8, typename T9, typename T10
+    , typename T11, typename T12, typename T13, typename T14, typename T15
+    , typename T16, typename T17, typename T18, typename T19, typename T20
+    >
+struct list_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_list_arg<T1>::value + is_list_arg<T2>::value 
+        + is_list_arg<T3>::value + is_list_arg<T4>::value 
+        + is_list_arg<T5>::value + is_list_arg<T6>::value 
+        + is_list_arg<T7>::value + is_list_arg<T8>::value 
+        + is_list_arg<T9>::value + is_list_arg<T10>::value 
+        + is_list_arg<T11>::value + is_list_arg<T12>::value 
+        + is_list_arg<T13>::value + is_list_arg<T14>::value 
+        + is_list_arg<T15>::value + is_list_arg<T16>::value 
+        + is_list_arg<T17>::value + is_list_arg<T18>::value 
+        + is_list_arg<T19>::value + is_list_arg<T20>::value
+        );
+
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct list_impl
+{
+    typedef aux::list_count_args<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        > arg_num_;
+
+    typedef typename aux::list_chooser< arg_num_::value >
+        ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct list
+    : aux::list_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type
+{
+    typedef typename aux::list_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp
new file mode 100644
index 0000000..ab25482
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp
@@ -0,0 +1,534 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct list_c_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct list_c_chooser<0>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list0_c<
+              T
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<1>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list1_c<
+              T, C0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<2>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list2_c<
+              T, C0, C1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<3>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list3_c<
+              T, C0, C1, C2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<4>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list4_c<
+              T, C0, C1, C2, C3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<5>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list5_c<
+              T, C0, C1, C2, C3, C4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<6>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list6_c<
+              T, C0, C1, C2, C3, C4, C5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<7>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list7_c<
+              T, C0, C1, C2, C3, C4, C5, C6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<8>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list8_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<9>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list9_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<10>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list10_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<11>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list11_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<12>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list12_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<13>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list13_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<14>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list14_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<15>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list15_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<16>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list16_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<17>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list17_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<18>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list18_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<19>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list19_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<20>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list20_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< long C >
+struct is_list_c_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_list_c_arg<LONG_MAX>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8
+    , long C9, long C10, long C11, long C12, long C13, long C14, long C15
+    , long C16, long C17, long C18, long C19, long C20
+    >
+struct list_c_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_list_c_arg<C1>::value + is_list_c_arg<C2>::value 
+        + is_list_c_arg<C3>::value + is_list_c_arg<C4>::value 
+        + is_list_c_arg<C5>::value + is_list_c_arg<C6>::value 
+        + is_list_c_arg<C7>::value + is_list_c_arg<C8>::value 
+        + is_list_c_arg<C9>::value + is_list_c_arg<C10>::value 
+        + is_list_c_arg<C11>::value + is_list_c_arg<C12>::value 
+        + is_list_c_arg<C13>::value + is_list_c_arg<C14>::value 
+        + is_list_c_arg<C15>::value + is_list_c_arg<C16>::value 
+        + is_list_c_arg<C17>::value + is_list_c_arg<C18>::value 
+        + is_list_c_arg<C19>::value + is_list_c_arg<C20>::value
+        );
+
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct list_c_impl
+{
+    typedef aux::list_c_count_args<
+          C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        > arg_num_;
+
+    typedef typename aux::list_c_chooser< arg_num_::value >
+        ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct list_c
+    : aux::list_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type
+{
+    typedef typename aux::list_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/map.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/map.hpp
new file mode 100644
index 0000000..970e0b7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/map.hpp
@@ -0,0 +1,556 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct map_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct map_chooser<0>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef map0<
+             
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<1>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map1<
+              T0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<2>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map2<
+              T0, T1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<3>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map3<
+              T0, T1, T2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<4>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map4<
+              T0, T1, T2, T3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<5>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map5<
+              T0, T1, T2, T3, T4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<6>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map6<
+              T0, T1, T2, T3, T4, T5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<7>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map7<
+              T0, T1, T2, T3, T4, T5, T6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<8>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map8<
+              T0, T1, T2, T3, T4, T5, T6, T7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<9>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map9<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<10>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map10<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<11>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map11<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<12>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map12<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<13>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map13<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<14>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map14<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<15>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map15<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<16>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map16<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<17>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map17<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<18>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map18<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<19>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map19<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<20>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map20<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_map_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_map_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename T6, typename T7, typename T8, typename T9, typename T10
+    , typename T11, typename T12, typename T13, typename T14, typename T15
+    , typename T16, typename T17, typename T18, typename T19, typename T20
+    >
+struct map_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_map_arg<T1>::value + is_map_arg<T2>::value 
+        + is_map_arg<T3>::value + is_map_arg<T4>::value 
+        + is_map_arg<T5>::value + is_map_arg<T6>::value 
+        + is_map_arg<T7>::value + is_map_arg<T8>::value 
+        + is_map_arg<T9>::value + is_map_arg<T10>::value 
+        + is_map_arg<T11>::value + is_map_arg<T12>::value 
+        + is_map_arg<T13>::value + is_map_arg<T14>::value 
+        + is_map_arg<T15>::value + is_map_arg<T16>::value 
+        + is_map_arg<T17>::value + is_map_arg<T18>::value 
+        + is_map_arg<T19>::value + is_map_arg<T20>::value
+        );
+
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct map_impl
+{
+    typedef aux::map_count_args<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        > arg_num_;
+
+    typedef typename aux::map_chooser< arg_num_::value >
+        ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct map
+    : aux::map_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type
+{
+    typedef typename aux::map_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/minus.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/minus.hpp
new file mode 100644
index 0000000..b47f328
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/minus.hpp
@@ -0,0 +1,148 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/minus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct minus_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct minus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct minus_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct minus_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct minus_tag
+{
+    typedef typename T::tag type;
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct minus2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct minus
+
+    : if_<
+
+          is_na<N3>
+        , minus2< N1,N2 >
+        , minus<
+              minus2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , minus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct minus2
+    : aux::msvc_eti_base< typename apply_wrap2<
+          minus_impl<
+              typename minus_tag<N1>::type
+            , typename minus_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, minus)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct minus_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 - n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct minus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::minus_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp
new file mode 100644
index 0000000..c12b3f9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp
@@ -0,0 +1,115 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/modulus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct modulus_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct modulus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct modulus_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct modulus_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct modulus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct modulus
+    : aux::msvc_eti_base< typename apply_wrap2<
+          modulus_impl<
+              typename modulus_tag<N1>::type
+            , typename modulus_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct modulus_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 % n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct modulus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::modulus_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp
new file mode 100644
index 0000000..6e56b1e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp
@@ -0,0 +1,102 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/not_equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct not_equal_to_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct not_equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct not_equal_to_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct not_equal_to_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct not_equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct not_equal_to
+    : aux::msvc_eti_base< typename apply_wrap2<
+          not_equal_to_impl<
+              typename not_equal_to_tag<N1>::type
+            , typename not_equal_to_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct not_equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N1)::value !=
+             BOOST_MPL_AUX_VALUE_WKND(N2)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/or.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/or.hpp
new file mode 100644
index 0000000..3f7394e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/or.hpp
@@ -0,0 +1,73 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/or.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< bool C_ > struct or_impl
+{
+    template<
+          typename T1, typename T2, typename T3, typename T4
+        >
+    struct result_
+        : true_
+    {
+    };
+};
+
+template<> struct or_impl<false>
+{
+    template<
+          typename T1, typename T2, typename T3, typename T4
+        >
+    struct result_
+        : or_impl<
+              BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+            >::template result_< T2,T3,T4,false_ >
+    {
+    };
+};
+
+template<>
+struct or_impl<false>
+    ::result_< false_,false_,false_,false_ >
+        : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = false_, typename T4 = false_, typename T5 = false_
+    >
+struct or_
+
+    : aux::or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        >::template result_< T2,T3,T4,T5 >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , or_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , or_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp
new file mode 100644
index 0000000..ff97364
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp
@@ -0,0 +1,105 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright Peter Dimov 2001-2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/placeholders.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg< -1 > _;
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_;
+}
+
+}}
+
+/// agurt, 17/mar/02: one more placeholder for the last 'apply#' 
+/// specialization
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<1> _1;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<2> _2;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<3> _3;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<4> _4;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<5> _5;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<6> _6;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6;
+}
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/plus.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/plus.hpp
new file mode 100644
index 0000000..1052335
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/plus.hpp
@@ -0,0 +1,148 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/plus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct plus_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct plus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct plus_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct plus_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct plus_tag
+{
+    typedef typename T::tag type;
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct plus2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct plus
+
+    : if_<
+
+          is_na<N3>
+        , plus2< N1,N2 >
+        , plus<
+              plus2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , plus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct plus2
+    : aux::msvc_eti_base< typename apply_wrap2<
+          plus_impl<
+              typename plus_tag<N1>::type
+            , typename plus_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, plus)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct plus_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 + n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct plus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::plus_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/quote.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/quote.hpp
new file mode 100644
index 0000000..e7a7f00
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/quote.hpp
@@ -0,0 +1,11 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/quote.hpp" header
+// -- DO NOT modify by hand!
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp
new file mode 100644
index 0000000..adf15b6
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp
@@ -0,0 +1,343 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl;
+
+template< long N >
+struct reverse_fold_chunk;
+
+template<> struct reverse_fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef fwd_state0 bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter0 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<> struct reverse_fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef fwd_state1 bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter1 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<> struct reverse_fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef fwd_state2 bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter2 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<> struct reverse_fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef fwd_state3 bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter3 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<> struct reverse_fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef fwd_state4 bkwd_state4;
+        typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter4 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template< long N >
+struct reverse_fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef reverse_fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , iter4
+            , Last
+            , fwd_state4
+            , BackwardOp
+            , ForwardOp
+            > nested_chunk;
+
+        typedef typename nested_chunk::state bkwd_state4;
+        typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef typename nested_chunk::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct reverse_fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct reverse_fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , reverse_fold_null_step< Last,State >
+            , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_step
+{
+    typedef reverse_fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , typename deref<First>::type
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl
+    : reverse_fold_chunk<N>
+        ::template result_< First,Last,State,BackwardOp,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp
new file mode 100644
index 0000000..208ad97
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp
@@ -0,0 +1,343 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl;
+
+template< long N >
+struct reverse_iter_fold_chunk;
+
+template<> struct reverse_iter_fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef fwd_state0 bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter0 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<> struct reverse_iter_fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef fwd_state1 bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter1 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<> struct reverse_iter_fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef fwd_state2 bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter2 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<> struct reverse_iter_fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef fwd_state3 bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter3 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<> struct reverse_iter_fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef fwd_state4 bkwd_state4;
+        typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter4 iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template< long N >
+struct reverse_iter_fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef reverse_iter_fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , iter4
+            , Last
+            , fwd_state4
+            , BackwardOp
+            , ForwardOp
+            > nested_chunk;
+
+        typedef typename nested_chunk::state bkwd_state4;
+        typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef typename nested_chunk::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct reverse_iter_fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct reverse_iter_fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , reverse_iter_fold_null_step< Last,State >
+            , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+
+    /// ETI workaround
+    template<> struct result_< int,int,int,int,int >
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_step
+{
+    typedef reverse_iter_fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , First
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl
+    : reverse_iter_fold_chunk<N>
+        ::template result_< First,Last,State,BackwardOp,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/set.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/set.hpp
new file mode 100644
index 0000000..95aaa5c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/set.hpp
@@ -0,0 +1,556 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct set_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct set_chooser<0>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef set0<
+             
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<1>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set1<
+              T0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<2>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set2<
+              T0, T1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<3>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set3<
+              T0, T1, T2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<4>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set4<
+              T0, T1, T2, T3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<5>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set5<
+              T0, T1, T2, T3, T4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<6>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set6<
+              T0, T1, T2, T3, T4, T5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<7>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set7<
+              T0, T1, T2, T3, T4, T5, T6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<8>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set8<
+              T0, T1, T2, T3, T4, T5, T6, T7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<9>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set9<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<10>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set10<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<11>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set11<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<12>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set12<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<13>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set13<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<14>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set14<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<15>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set15<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<16>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set16<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<17>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set17<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<18>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set18<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<19>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set19<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<20>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set20<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_set_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_set_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename T6, typename T7, typename T8, typename T9, typename T10
+    , typename T11, typename T12, typename T13, typename T14, typename T15
+    , typename T16, typename T17, typename T18, typename T19, typename T20
+    >
+struct set_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_set_arg<T1>::value + is_set_arg<T2>::value 
+        + is_set_arg<T3>::value + is_set_arg<T4>::value 
+        + is_set_arg<T5>::value + is_set_arg<T6>::value 
+        + is_set_arg<T7>::value + is_set_arg<T8>::value 
+        + is_set_arg<T9>::value + is_set_arg<T10>::value 
+        + is_set_arg<T11>::value + is_set_arg<T12>::value 
+        + is_set_arg<T13>::value + is_set_arg<T14>::value 
+        + is_set_arg<T15>::value + is_set_arg<T16>::value 
+        + is_set_arg<T17>::value + is_set_arg<T18>::value 
+        + is_set_arg<T19>::value + is_set_arg<T20>::value
+        );
+
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct set_impl
+{
+    typedef aux::set_count_args<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        > arg_num_;
+
+    typedef typename aux::set_chooser< arg_num_::value >
+        ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct set
+    : aux::set_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type
+{
+    typedef typename aux::set_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/set_c.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/set_c.hpp
new file mode 100644
index 0000000..1ff34f9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/set_c.hpp
@@ -0,0 +1,534 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct set_c_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct set_c_chooser<0>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set0_c<
+              T
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<1>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set1_c<
+              T, C0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<2>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set2_c<
+              T, C0, C1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<3>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set3_c<
+              T, C0, C1, C2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<4>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set4_c<
+              T, C0, C1, C2, C3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<5>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set5_c<
+              T, C0, C1, C2, C3, C4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<6>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set6_c<
+              T, C0, C1, C2, C3, C4, C5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<7>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set7_c<
+              T, C0, C1, C2, C3, C4, C5, C6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<8>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set8_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<9>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set9_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<10>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set10_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<11>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set11_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<12>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set12_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<13>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set13_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<14>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set14_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<15>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set15_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<16>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set16_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<17>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set17_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<18>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set18_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<19>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set19_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<20>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set20_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< long C >
+struct is_set_c_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_set_c_arg<LONG_MAX>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8
+    , long C9, long C10, long C11, long C12, long C13, long C14, long C15
+    , long C16, long C17, long C18, long C19, long C20
+    >
+struct set_c_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_set_c_arg<C1>::value + is_set_c_arg<C2>::value 
+        + is_set_c_arg<C3>::value + is_set_c_arg<C4>::value 
+        + is_set_c_arg<C5>::value + is_set_c_arg<C6>::value 
+        + is_set_c_arg<C7>::value + is_set_c_arg<C8>::value 
+        + is_set_c_arg<C9>::value + is_set_c_arg<C10>::value 
+        + is_set_c_arg<C11>::value + is_set_c_arg<C12>::value 
+        + is_set_c_arg<C13>::value + is_set_c_arg<C14>::value 
+        + is_set_c_arg<C15>::value + is_set_c_arg<C16>::value 
+        + is_set_c_arg<C17>::value + is_set_c_arg<C18>::value 
+        + is_set_c_arg<C19>::value + is_set_c_arg<C20>::value
+        );
+
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct set_c_impl
+{
+    typedef aux::set_c_count_args<
+          C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        > arg_num_;
+
+    typedef typename aux::set_c_chooser< arg_num_::value >
+        ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct set_c
+    : aux::set_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type
+{
+    typedef typename aux::set_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp
new file mode 100644
index 0000000..3861ca1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp
@@ -0,0 +1,114 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_left.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct shift_left_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_left_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct shift_left_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct shift_left_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_left_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_left
+    : aux::msvc_eti_base< typename apply_wrap2<
+          shift_left_impl<
+              typename shift_left_tag<N1>::type
+            , typename shift_left_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, typename Shift, T n, Shift s >
+struct shift_left_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n << s));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct shift_left_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+        : aux::shift_left_wknd<
+              typename N::value_type
+            , typename S::value_type
+            , N::value
+            , S::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp
new file mode 100644
index 0000000..24ea094
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp
@@ -0,0 +1,114 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_right.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct shift_right_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_right_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct shift_right_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct shift_right_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_right_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_right
+    : aux::msvc_eti_base< typename apply_wrap2<
+          shift_right_impl<
+              typename shift_right_tag<N1>::type
+            , typename shift_right_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, typename Shift, T n, Shift s >
+struct shift_right_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n >> s));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct shift_right_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+        : aux::shift_right_wknd<
+              typename N::value_type
+            , typename S::value_type
+            , N::value
+            , S::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp
new file mode 100644
index 0000000..1668771
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp
@@ -0,0 +1,46 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< bool >
+struct template_arity_impl
+{
+    template< typename F > struct result_
+        : mpl::int_< -1 >
+    {
+    };
+};
+
+template<>
+struct template_arity_impl<true>
+{
+    template< typename F > struct result_
+        : F::arity
+    {
+    };
+};
+
+template< typename F >
+struct template_arity
+    : template_arity_impl< ::boost::mpl::aux::has_rebind<F>::value >
+        ::template result_<F>
+{
+};
+
+template<>
+struct template_arity<int>
+    : mpl::int_< -1 >
+{
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/times.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/times.hpp
new file mode 100644
index 0000000..dee7fd4
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/times.hpp
@@ -0,0 +1,148 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/times.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct times_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct times_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct times_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct times_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct times_tag
+{
+    typedef typename T::tag type;
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct times2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct times
+
+    : if_<
+
+          is_na<N3>
+        , times2< N1,N2 >
+        , times<
+              times2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , times
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct times2
+    : aux::msvc_eti_base< typename apply_wrap2<
+          times_impl<
+              typename times_tag<N1>::type
+            , typename times_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, times)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct times_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 * n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct times_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::times_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp
new file mode 100644
index 0000000..26533dd
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp
@@ -0,0 +1,109 @@
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/unpack_args.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl
+{
+    template< typename F, typename Args > struct apply;
+};
+
+template<> struct unpack_args_impl<0>
+{
+    template< typename F, typename Args > struct apply
+        : apply0<
+              F
+            >
+    {
+    };
+};
+
+template<> struct unpack_args_impl<1>
+{
+    template< typename F, typename Args > struct apply
+        : apply1<
+              F
+            , typename at_c< Args,0 >::type
+            >
+    {
+    };
+};
+
+template<> struct unpack_args_impl<2>
+{
+    template< typename F, typename Args > struct apply
+        : apply2<
+              F
+            , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+            >
+    {
+    };
+};
+
+template<> struct unpack_args_impl<3>
+{
+    template< typename F, typename Args > struct apply
+        : apply3<
+              F
+            , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+            , typename at_c< Args,2 >::type
+            >
+    {
+    };
+};
+
+template<> struct unpack_args_impl<4>
+{
+    template< typename F, typename Args > struct apply
+        : apply4<
+              F
+            , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+            , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+            >
+    {
+    };
+};
+
+template<> struct unpack_args_impl<5>
+{
+    template< typename F, typename Args > struct apply
+        : apply5<
+              F
+            , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+            , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+            , typename at_c< Args,4 >::type
+            >
+    {
+    };
+};
+
+}
+
+template<
+      typename F
+    >
+struct unpack_args
+{
+    template< typename Args > struct apply
+
+        : aux::unpack_args_impl< size<Args>::value >
+            ::template apply< F,Args >
+
+    {
+    };
+};
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/vector.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/vector.hpp
new file mode 100644
index 0000000..a6c7b62
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/vector.hpp
@@ -0,0 +1,556 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct vector_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct vector_chooser<0>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef vector0<
+             
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<1>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector1<
+              T0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<2>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector2<
+              T0, T1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<3>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector3<
+              T0, T1, T2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<4>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector4<
+              T0, T1, T2, T3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<5>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector5<
+              T0, T1, T2, T3, T4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<6>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector6<
+              T0, T1, T2, T3, T4, T5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<7>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector7<
+              T0, T1, T2, T3, T4, T5, T6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<8>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector8<
+              T0, T1, T2, T3, T4, T5, T6, T7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<9>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector9<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<10>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector10<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<11>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector11<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<12>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector12<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<13>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector13<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<14>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector14<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<15>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector15<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<16>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector16<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<17>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector17<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<18>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector18<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<19>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector19<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<20>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector20<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_vector_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_vector_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename T6, typename T7, typename T8, typename T9, typename T10
+    , typename T11, typename T12, typename T13, typename T14, typename T15
+    , typename T16, typename T17, typename T18, typename T19, typename T20
+    >
+struct vector_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_vector_arg<T1>::value + is_vector_arg<T2>::value 
+        + is_vector_arg<T3>::value + is_vector_arg<T4>::value 
+        + is_vector_arg<T5>::value + is_vector_arg<T6>::value 
+        + is_vector_arg<T7>::value + is_vector_arg<T8>::value 
+        + is_vector_arg<T9>::value + is_vector_arg<T10>::value 
+        + is_vector_arg<T11>::value + is_vector_arg<T12>::value 
+        + is_vector_arg<T13>::value + is_vector_arg<T14>::value 
+        + is_vector_arg<T15>::value + is_vector_arg<T16>::value 
+        + is_vector_arg<T17>::value + is_vector_arg<T18>::value 
+        + is_vector_arg<T19>::value + is_vector_arg<T20>::value
+        );
+
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct vector_impl
+{
+    typedef aux::vector_count_args<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        > arg_num_;
+
+    typedef typename aux::vector_chooser< arg_num_::value >
+        ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct vector
+    : aux::vector_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type
+{
+    typedef typename aux::vector_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp b/ext/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp
new file mode 100644
index 0000000..c522d08
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp
@@ -0,0 +1,534 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct vector_c_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<0>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector0_c<
+              T
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<1>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector1_c<
+              T, T(C0)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<2>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector2_c<
+              T, T(C0), T(C1)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<3>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector3_c<
+              T, T(C0), T(C1), T(C2)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<4>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector4_c<
+              T, T(C0), T(C1), T(C2), T(C3)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<5>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector5_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<6>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector6_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<7>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector7_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<8>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector8_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<9>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector9_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<10>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector10_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<11>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector11_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<12>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector12_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<13>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector13_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<14>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector14_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<15>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector15_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<16>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector16_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<17>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector17_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<18>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector18_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<19>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector19_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<20>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector20_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< long C >
+struct is_vector_c_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_vector_c_arg<LONG_MAX>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8
+    , long C9, long C10, long C11, long C12, long C13, long C14, long C15
+    , long C16, long C17, long C18, long C19, long C20
+    >
+struct vector_c_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_vector_c_arg<C1>::value + is_vector_c_arg<C2>::value 
+        + is_vector_c_arg<C3>::value + is_vector_c_arg<C4>::value 
+        + is_vector_c_arg<C5>::value + is_vector_c_arg<C6>::value 
+        + is_vector_c_arg<C7>::value + is_vector_c_arg<C8>::value 
+        + is_vector_c_arg<C9>::value + is_vector_c_arg<C10>::value 
+        + is_vector_c_arg<C11>::value + is_vector_c_arg<C12>::value 
+        + is_vector_c_arg<C13>::value + is_vector_c_arg<C14>::value 
+        + is_vector_c_arg<C15>::value + is_vector_c_arg<C16>::value 
+        + is_vector_c_arg<C17>::value + is_vector_c_arg<C18>::value 
+        + is_vector_c_arg<C19>::value + is_vector_c_arg<C20>::value
+        );
+
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct vector_c_impl
+{
+    typedef aux::vector_c_count_args<
+          C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        > arg_num_;
+
+    typedef typename aux::vector_c_chooser< arg_num_::value >
+        ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct vector_c
+    : aux::vector_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type
+{
+    typedef typename aux::vector_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp
new file mode 100644
index 0000000..26de94c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_backward;
+template<>
+struct advance_backward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_backward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_backward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_backward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_backward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef typename prior<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_backward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_backward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_backward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp
new file mode 100644
index 0000000..b137cc7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_forward;
+template<>
+struct advance_forward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_forward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_forward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_forward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_forward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef typename next<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_forward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_forward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_forward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/and.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/and.hpp
new file mode 100644
index 0000000..e58640a
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/and.hpp
@@ -0,0 +1,71 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/and.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< bool C_ > struct and_impl
+{
+    template<
+          typename T1, typename T2, typename T3, typename T4
+        >
+    struct result_
+        : false_
+    {
+    };
+};
+
+template<> struct and_impl<true>
+{
+    template<
+          typename T1, typename T2, typename T3, typename T4
+        >
+    struct result_
+        : and_impl<
+              BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+            >::template result_< T2,T3,T4,true_ >
+    {
+    };
+
+    template<> struct result_< true_,true_,true_,true_ >
+        : true_
+    {
+    };
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = true_, typename T4 = true_, typename T5 = true_
+    >
+struct and_
+
+    : aux::and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        >::template result_< T2,T3,T4,T5 >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , and_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , and_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/apply.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/apply.hpp
new file mode 100644
index 0000000..d46d030
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/apply.hpp
@@ -0,0 +1,160 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct apply0
+
+    : apply_wrap0<
+          typename lambda<F>::type
+       
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          1
+        , apply0
+        , (F )
+        )
+};
+
+/// workaround for ETI bug
+template<>
+struct apply0<int>
+{
+    typedef int type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply1
+
+    : apply_wrap1<
+          typename lambda<F>::type
+        , T1
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          2
+        , apply1
+        , (F, T1)
+        )
+};
+
+/// workaround for ETI bug
+template<>
+struct apply1< int,int >
+{
+    typedef int type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2
+
+    : apply_wrap2<
+          typename lambda<F>::type
+        , T1, T2
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , apply2
+        , (F, T1, T2)
+        )
+};
+
+/// workaround for ETI bug
+template<>
+struct apply2< int,int,int >
+{
+    typedef int type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3
+
+    : apply_wrap3<
+          typename lambda<F>::type
+        , T1, T2, T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , apply3
+        , (F, T1, T2, T3)
+        )
+};
+
+/// workaround for ETI bug
+template<>
+struct apply3< int,int,int,int >
+{
+    typedef int type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4
+
+    : apply_wrap4<
+          typename lambda<F>::type
+        , T1, T2, T3, T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , apply4
+        , (F, T1, T2, T3, T4)
+        )
+};
+
+/// workaround for ETI bug
+template<>
+struct apply4< int,int,int,int,int >
+{
+    typedef int type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5
+
+    : apply_wrap5<
+          typename lambda<F>::type
+        , T1, T2, T3, T4, T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          6
+        , apply5
+        , (F, T1, T2, T3, T4, T5)
+        )
+};
+
+/// workaround for ETI bug
+template<>
+struct apply5< int,int,int,int,int,int >
+{
+    typedef int type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp
new file mode 100644
index 0000000..f0f86c1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp
@@ -0,0 +1,46 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct apply0;
+
+template<
+      typename F, typename T1
+    >
+struct apply1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp
new file mode 100644
index 0000000..d307517
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp
@@ -0,0 +1,138 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply_wrap.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+
+    , typename has_apply_ = typename aux::has_apply<F>::type
+
+    >
+struct apply_wrap0
+
+{
+    typedef typename F::template apply<
+        
+        >::type type;
+
+};
+
+/// workaround for ETI bug
+template<>
+struct apply_wrap0<int>
+{
+    typedef int type;
+};
+
+template<
+      typename F, typename T1
+
+    >
+struct apply_wrap1
+
+{
+    typedef typename F::template apply<
+         T1
+        >::type type;
+
+};
+
+/// workaround for ETI bug
+template<>
+struct apply_wrap1< int,int >
+{
+    typedef int type;
+};
+
+template<
+      typename F, typename T1, typename T2
+
+    >
+struct apply_wrap2
+
+{
+    typedef typename F::template apply<
+         T1, T2
+        >::type type;
+
+};
+
+/// workaround for ETI bug
+template<>
+struct apply_wrap2< int,int,int >
+{
+    typedef int type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+
+    >
+struct apply_wrap3
+
+{
+    typedef typename F::template apply<
+         T1, T2, T3
+        >::type type;
+
+};
+
+/// workaround for ETI bug
+template<>
+struct apply_wrap3< int,int,int,int >
+{
+    typedef int type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+
+    >
+struct apply_wrap4
+
+{
+    typedef typename F::template apply<
+         T1, T2, T3, T4
+        >::type type;
+
+};
+
+/// workaround for ETI bug
+template<>
+struct apply_wrap4< int,int,int,int,int >
+{
+    typedef int type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+
+    >
+struct apply_wrap5
+
+{
+    typedef typename F::template apply<
+         T1, T2, T3, T4, T5
+        >::type type;
+
+};
+
+/// workaround for ETI bug
+template<>
+struct apply_wrap5< int,int,int,int,int,int >
+{
+    typedef int type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/arg.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/arg.hpp
new file mode 100644
index 0000000..6f2f8a8
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/arg.hpp
@@ -0,0 +1,123 @@
+
+// Copyright Peter Dimov 2001-2002
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/arg.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+template<> struct arg< -1 >
+{
+    BOOST_STATIC_CONSTANT(int, value  = -1);
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<1>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 1);
+    typedef arg<2> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<2>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 2);
+    typedef arg<3> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U2 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<3>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 3);
+    typedef arg<4> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U3 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<4>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 4);
+    typedef arg<5> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U4 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<5>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 5);
+    typedef arg<6> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U5 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg)
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp
new file mode 100644
index 0000000..4f12a40
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< bool >
+struct resolve_arg_impl
+{
+    template<
+          typename T, typename U1, typename U2, typename U3
+        , typename U4, typename U5
+        >
+    struct result_
+    {
+        typedef T type;
+    };
+};
+
+template<>
+struct resolve_arg_impl<true>
+{
+    template<
+          typename T, typename U1, typename U2, typename U3
+        , typename U4, typename U5
+        >
+    struct result_
+    {
+        typedef typename apply_wrap5<
+              T
+            , U1, U2, U3, U4, U5
+            >::type type;
+    };
+};
+
+template< typename T > struct is_bind_template;
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+    : resolve_arg_impl< is_bind_template<T>::value >
+            ::template result_< T,U1,U2,U3,U4,U5 >
+{
+};
+
+template< int arity_ > struct bind_chooser;
+
+aux::no_tag is_bind_helper(...);
+template< typename T > aux::no_tag is_bind_helper(protect<T>*);
+
+template< int N >
+aux::yes_tag is_bind_helper(arg<N>*);
+
+template< bool is_ref_  = true >
+struct is_bind_template_impl
+{
+    template< typename T > struct result_
+    {
+        BOOST_STATIC_CONSTANT(bool, value  = false);
+    };
+};
+
+template<>
+struct is_bind_template_impl<false>
+{
+    template< typename T > struct result_
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+              sizeof(aux::is_bind_helper(static_cast<T*>(0)))
+                == sizeof(aux::yes_tag)
+            );
+    };
+};
+
+template< typename T > struct is_bind_template
+    : is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
+        ::template result_<T>
+{
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F
+    >
+aux::yes_tag
+is_bind_helper(bind0<F>*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1
+    >
+aux::yes_tag
+is_bind_helper(bind1< F,T1 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2
+    >
+aux::yes_tag
+is_bind_helper(bind2< F,T1,T2 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+aux::yes_tag
+is_bind_helper(bind3< F,T1,T2,T3 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+aux::yes_tag
+is_bind_helper(bind4< F,T1,T2,T3,T4 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+        typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
+
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+aux::yes_tag
+is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/bind.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/bind.hpp
new file mode 100644
index 0000000..53c76e8
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/bind.hpp
@@ -0,0 +1,432 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< bool >
+struct resolve_arg_impl
+{
+    template<
+          typename T, typename U1, typename U2, typename U3
+        , typename U4, typename U5
+        >
+    struct result_
+    {
+        typedef T type;
+    };
+};
+
+template<>
+struct resolve_arg_impl<true>
+{
+    template<
+          typename T, typename U1, typename U2, typename U3
+        , typename U4, typename U5
+        >
+    struct result_
+    {
+        typedef typename apply_wrap5<
+              T
+            , U1, U2, U3, U4, U5
+            >::type type;
+    };
+};
+
+template< typename T > struct is_bind_template;
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+    : resolve_arg_impl< is_bind_template<T>::value >
+            ::template result_< T,U1,U2,U3,U4,U5 >
+{
+};
+
+template< typename T >
+struct replace_unnamed_arg_impl
+{
+    template< typename Arg > struct result_
+    {
+        typedef Arg next;
+        typedef T type;
+    };
+};
+
+template<>
+struct replace_unnamed_arg_impl< arg< -1 > >
+{
+    template< typename Arg > struct result_
+    {
+        typedef typename next<Arg>::type next;
+        typedef Arg type;
+    };
+};
+
+template< typename T, typename Arg >
+struct replace_unnamed_arg
+    : replace_unnamed_arg_impl<T>::template result_<Arg>
+{
+};
+
+template< int arity_ > struct bind_chooser;
+
+aux::no_tag is_bind_helper(...);
+template< typename T > aux::no_tag is_bind_helper(protect<T>*);
+
+template< int N >
+aux::yes_tag is_bind_helper(arg<N>*);
+
+template< bool is_ref_  = true >
+struct is_bind_template_impl
+{
+    template< typename T > struct result_
+    {
+        BOOST_STATIC_CONSTANT(bool, value  = false);
+    };
+};
+
+template<>
+struct is_bind_template_impl<false>
+{
+    template< typename T > struct result_
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+              sizeof(aux::is_bind_helper(static_cast<T*>(0)))
+                == sizeof(aux::yes_tag)
+            );
+    };
+};
+
+template< typename T > struct is_bind_template
+    : is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
+        ::template result_<T>
+{
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F
+    >
+aux::yes_tag
+is_bind_helper(bind0<F>*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1
+    >
+aux::yes_tag
+is_bind_helper(bind1< F,T1 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2
+    >
+aux::yes_tag
+is_bind_helper(bind2< F,T1,T2 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+aux::yes_tag
+is_bind_helper(bind3< F,T1,T2,T3 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+aux::yes_tag
+is_bind_helper(bind4< F,T1,T2,T3,T4 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+        typedef aux::replace_unnamed_arg< T5,n5 > r5;
+        typedef typename r5::type a5;
+        typedef typename r5::next n6;
+        typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5;
+        ///
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+aux::yes_tag
+is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp
new file mode 100644
index 0000000..022cba3
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp
@@ -0,0 +1,46 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bind_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct bind0;
+
+template<
+      typename F, typename T1
+    >
+struct bind1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp
new file mode 100644
index 0000000..e54b4ce
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp
@@ -0,0 +1,151 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitand.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct bitand_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitand_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitand_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitand_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitand_tag
+    : tag< T,na >
+{
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct bitand_2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitand_
+
+    : aux::msvc_eti_base< typename if_<
+
+          is_na<N3>
+        , bitand_2< N1,N2 >
+        , bitand_<
+              bitand_2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+    >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct bitand_2
+    : aux::msvc_eti_base< typename apply_wrap2<
+          bitand_impl<
+              typename bitand_tag<N1>::type
+            , typename bitand_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct bitand_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 & n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct bitand_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::bitand_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp
new file mode 100644
index 0000000..3b465b3
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp
@@ -0,0 +1,151 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct bitor_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitor_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitor_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitor_tag
+    : tag< T,na >
+{
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct bitor_2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitor_
+
+    : aux::msvc_eti_base< typename if_<
+
+          is_na<N3>
+        , bitor_2< N1,N2 >
+        , bitor_<
+              bitor_2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+    >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct bitor_2
+    : aux::msvc_eti_base< typename apply_wrap2<
+          bitor_impl<
+              typename bitor_tag<N1>::type
+            , typename bitor_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct bitor_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 | n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct bitor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::bitor_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp
new file mode 100644
index 0000000..f7c5d43
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp
@@ -0,0 +1,151 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitxor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct bitxor_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitxor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitxor_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitxor_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitxor_tag
+    : tag< T,na >
+{
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct bitxor_2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitxor_
+
+    : aux::msvc_eti_base< typename if_<
+
+          is_na<N3>
+        , bitxor_2< N1,N2 >
+        , bitxor_<
+              bitxor_2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+    >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct bitxor_2
+    : aux::msvc_eti_base< typename apply_wrap2<
+          bitxor_impl<
+              typename bitxor_tag<N1>::type
+            , typename bitxor_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct bitxor_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 ^ n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct bitxor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::bitxor_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/deque.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/deque.hpp
new file mode 100644
index 0000000..a0445d9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/deque.hpp
@@ -0,0 +1,556 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/deque.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct deque_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct deque_chooser<0>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef vector0<
+             
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<1>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector1<
+              T0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<2>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector2<
+              T0, T1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<3>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector3<
+              T0, T1, T2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<4>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector4<
+              T0, T1, T2, T3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<5>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector5<
+              T0, T1, T2, T3, T4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<6>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector6<
+              T0, T1, T2, T3, T4, T5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<7>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector7<
+              T0, T1, T2, T3, T4, T5, T6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<8>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector8<
+              T0, T1, T2, T3, T4, T5, T6, T7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<9>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector9<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<10>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector10<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<11>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector11<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<12>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector12<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<13>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector13<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<14>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector14<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<15>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector15<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<16>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector16<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<17>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector17<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<18>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector18<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<19>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector19<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<20>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector20<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_deque_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_deque_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename T6, typename T7, typename T8, typename T9, typename T10
+    , typename T11, typename T12, typename T13, typename T14, typename T15
+    , typename T16, typename T17, typename T18, typename T19, typename T20
+    >
+struct deque_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_deque_arg<T1>::value + is_deque_arg<T2>::value 
+        + is_deque_arg<T3>::value + is_deque_arg<T4>::value 
+        + is_deque_arg<T5>::value + is_deque_arg<T6>::value 
+        + is_deque_arg<T7>::value + is_deque_arg<T8>::value 
+        + is_deque_arg<T9>::value + is_deque_arg<T10>::value 
+        + is_deque_arg<T11>::value + is_deque_arg<T12>::value 
+        + is_deque_arg<T13>::value + is_deque_arg<T14>::value 
+        + is_deque_arg<T15>::value + is_deque_arg<T16>::value 
+        + is_deque_arg<T17>::value + is_deque_arg<T18>::value 
+        + is_deque_arg<T19>::value + is_deque_arg<T20>::value
+        );
+
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct deque_impl
+{
+    typedef aux::deque_count_args<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        > arg_num_;
+
+    typedef typename aux::deque_chooser< arg_num_::value >
+        ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct deque
+    : aux::deque_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type
+{
+    typedef typename aux::deque_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/divides.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/divides.hpp
new file mode 100644
index 0000000..0c60c43
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/divides.hpp
@@ -0,0 +1,150 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/divides.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct divides_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct divides_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct divides_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct divides_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct divides_tag
+    : tag< T,na >
+{
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct divides2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct divides
+
+    : aux::msvc_eti_base< typename if_<
+
+          is_na<N3>
+        , divides2< N1,N2 >
+        , divides<
+              divides2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+    >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , divides
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct divides2
+    : aux::msvc_eti_base< typename apply_wrap2<
+          divides_impl<
+              typename divides_tag<N1>::type
+            , typename divides_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, divides)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct divides_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 / n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct divides_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::divides_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp
new file mode 100644
index 0000000..107912b
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp
@@ -0,0 +1,102 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct equal_to_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct equal_to_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct equal_to_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct equal_to_tag
+    : tag< T,na >
+{
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct equal_to
+    : aux::msvc_eti_base< typename apply_wrap2<
+          equal_to_impl<
+              typename equal_to_tag<N1>::type
+            , typename equal_to_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ==
+             BOOST_MPL_AUX_VALUE_WKND(N2)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp
new file mode 100644
index 0000000..58066d8
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp
@@ -0,0 +1,245 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl;
+
+template< int N >
+struct fold_chunk;
+
+template<> struct fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef state0 state;
+        typedef iter0 iterator;
+    };
+};
+
+template<> struct fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef state1 state;
+        typedef iter1 iterator;
+    };
+};
+
+template<> struct fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef state2 state;
+        typedef iter2 iterator;
+    };
+};
+
+template<> struct fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef state3 state;
+        typedef iter3 iterator;
+    };
+};
+
+template<> struct fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef state4 state;
+        typedef iter4 iterator;
+    };
+};
+
+template< int N >
+struct fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef fold_impl<
+              4
+            , First
+            , Last
+            , State
+            , ForwardOp
+            > chunk_;
+
+        typedef fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , typename chunk_::iterator
+            , Last
+            , typename chunk_::state
+            , ForwardOp
+            > res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , fold_null_step< Last,State >
+            , fold_step< First,Last,State,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_step
+{
+    typedef fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , ForwardOp
+        > chunk_;
+
+    typedef typename chunk_::state state;
+    typedef typename chunk_::iterator iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl
+    : fold_chunk<N>
+        ::template result_< First,Last,State,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp
new file mode 100644
index 0000000..bf81873
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp
@@ -0,0 +1,554 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+   
+    >
+struct lambda
+{
+    typedef false_ is_le;
+    typedef T result_;
+    typedef T type;
+};
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+template< int N, typename Tag >
+struct lambda< arg<N>, Tag >
+{
+    typedef true_ is_le;
+    typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41
+    typedef mpl::protect<result_> type;
+};
+
+template<
+      typename F
+    , typename Tag
+    >
+struct lambda<
+          bind0<F>
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind0<
+          F
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1
+{
+    typedef F<
+          typename L1::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1< true_,Tag,F,L1 >
+{
+    typedef bind1<
+          quote1< F,Tag >
+        , typename L1::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1 > class F
+    , typename T1
+    , typename Tag
+    >
+struct lambda<
+          F<T1>
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef typename l1::is_le is_le1;
+    typedef typename aux::lambda_or<
+          is_le1::value
+        >::type is_le;
+
+    typedef aux::le_result1<
+          is_le, Tag, F, l1
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1
+    , typename Tag
+    >
+struct lambda<
+          bind1< F,T1 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind1<
+          F
+        , T1
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2
+{
+    typedef F<
+          typename L1::type, typename L2::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2< true_,Tag,F,L1,L2 >
+{
+    typedef bind2<
+          quote2< F,Tag >
+        , typename L1::result_, typename L2::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2 > class F
+    , typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value
+        >::type is_le;
+
+    typedef aux::le_result2<
+          is_le, Tag, F, l1, l2
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          bind2< F,T1,T2 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind2<
+          F
+        , T1, T2
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3< true_,Tag,F,L1,L2,L3 >
+{
+    typedef bind3<
+          quote3< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3 > class F
+    , typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value
+        >::type is_le;
+
+    typedef aux::le_result3<
+          is_le, Tag, F, l1, l2, l3
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          bind3< F,T1,T2,T3 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind3<
+          F
+        , T1, T2, T3
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4< true_,Tag,F,L1,L2,L3,L4 >
+{
+    typedef bind4<
+          quote4< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        >::type is_le;
+
+    typedef aux::le_result4<
+          is_le, Tag, F, l1, l2, l3, l4
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          bind4< F,T1,T2,T3,T4 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind4<
+          F
+        , T1, T2, T3, T4
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type, typename L5::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 >
+{
+    typedef bind5<
+          quote5< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_, typename L5::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template<
+          typename P1, typename P2, typename P3, typename P4
+        , typename P5
+        >
+      class F
+    , typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    typedef lambda< T5,Tag > l5;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    typedef typename l5::is_le is_le5;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        , is_le5::value
+        >::type is_le;
+
+    typedef aux::le_result5<
+          is_le, Tag, F, l1, l2, l3, l4, l5
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind5< F,T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind5<
+          F
+        , T1, T2, T3, T4, T5
+        > result_;
+
+    typedef result_ type;
+};
+
+/// special case for 'protect'
+template< typename T, typename Tag >
+struct lambda< mpl::protect<T>, Tag >
+{
+    typedef false_ is_le;
+    typedef mpl::protect<T> result_;
+    typedef result_ type;
+};
+
+/// specializations for the main 'bind' form
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind< F,T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind< F,T1,T2,T3,T4,T5 > result_;
+    typedef result_ type;
+};
+
+/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars
+
+template<
+      typename F, typename Tag1, typename Tag2
+    >
+struct lambda<
+          lambda< F,Tag1 >
+        , Tag2
+        >
+{
+    typedef lambda< F,Tag2 > l1;
+    typedef lambda< Tag1,Tag2 > l2;
+    typedef typename l1::is_le is_le;
+    typedef aux::le_result2<is_le, Tag2, mpl::lambda, l1, l2> le_result_;
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, lambda)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/greater.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/greater.hpp
new file mode 100644
index 0000000..f60a860
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/greater.hpp
@@ -0,0 +1,102 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct greater_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct greater_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct greater_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_tag
+    : tag< T,na >
+{
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater
+    : aux::msvc_eti_base< typename apply_wrap2<
+          greater_impl<
+              typename greater_tag<N1>::type
+            , typename greater_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >
+             BOOST_MPL_AUX_VALUE_WKND(N2)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp
new file mode 100644
index 0000000..2ab09fd
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp
@@ -0,0 +1,102 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct greater_equal_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct greater_equal_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct greater_equal_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_equal_tag
+    : tag< T,na >
+{
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater_equal
+    : aux::msvc_eti_base< typename apply_wrap2<
+          greater_equal_impl<
+              typename greater_equal_tag<N1>::type
+            , typename greater_equal_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >=
+             BOOST_MPL_AUX_VALUE_WKND(N2)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp
new file mode 100644
index 0000000..233a1ec
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp
@@ -0,0 +1,166 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/inherit.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C1, bool C2 >
+struct inherit2_impl
+{
+    template< typename Derived, typename T1, typename T2 > struct result_
+        : T1, T2
+    {
+        typedef Derived type_;
+    };
+};
+
+template<>
+struct inherit2_impl< false,true >
+{
+    template< typename Derived, typename T1, typename T2 > struct result_
+        : T1
+    {
+        typedef T1 type_;
+    };
+};
+
+template<>
+struct inherit2_impl< true,false >
+{
+    template< typename Derived, typename T1, typename T2 > struct result_
+        : T2
+    {
+        typedef T2 type_;
+    };
+};
+
+template<>
+struct inherit2_impl< true,true >
+{
+    template< typename Derived, typename T1, typename T2 > struct result_
+    {
+        typedef T1 type_;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    >
+struct inherit2
+    : aux::inherit2_impl<
+          is_empty_base<T1>::value
+        , is_empty_base<T2>::value
+        >::template result_< inherit2< T1,T2 >,T1, T2 >
+{
+    typedef typename inherit2::type_ type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, inherit2)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na
+    >
+struct inherit3
+    : inherit2<
+          typename inherit2<
+              T1, T2
+            >::type
+        , T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , inherit3
+        , ( T1, T2, T3)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, inherit3)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    >
+struct inherit4
+    : inherit2<
+          typename inherit3<
+              T1, T2, T3
+            >::type
+        , T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , inherit4
+        , ( T1, T2, T3, T4)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(4, inherit4)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    , typename T5 = na
+    >
+struct inherit5
+    : inherit2<
+          typename inherit4<
+              T1, T2, T3, T4
+            >::type
+        , T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , inherit5
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(5, inherit5)
+
+/// primary template
+
+template<
+      typename T1 = empty_base, typename T2 = empty_base
+    , typename T3 = empty_base, typename T4 = empty_base
+    , typename T5 = empty_base
+    >
+struct inherit
+    : inherit5< T1,T2,T3,T4,T5 >
+{
+};
+
+template<>
+struct inherit< na,na,na,na,na >
+{
+    template<
+
+          typename T1 = empty_base, typename T2 = empty_base
+        , typename T3 = empty_base, typename T4 = empty_base
+        , typename T5 = empty_base
+
+        >
+    struct apply
+        : inherit< T1,T2,T3,T4,T5 >
+    {
+    };
+};
+
+BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp
new file mode 100644
index 0000000..6951795
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp
@@ -0,0 +1,133 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright David Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename Iterator, typename State >
+struct iter_fold_if_null_step
+{
+    typedef State state;
+    typedef Iterator iterator;
+};
+
+template< bool >
+struct iter_fold_if_step_impl
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef typename apply2< StateOp,State,Iterator >::type state;
+        typedef typename IteratorOp::type iterator;
+    };
+};
+
+template<>
+struct iter_fold_if_step_impl<false>
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef State state;
+        typedef Iterator iterator;
+    };
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_forward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename BackwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_backward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename ForwardPredicate
+    , typename BackwardOp
+    , typename BackwardPredicate
+    >
+struct iter_fold_if_impl
+{
+ private:
+    typedef iter_fold_if_null_step< Iterator,State > forward_step0;
+    typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1;
+    typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2;
+    typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3;
+    typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4;
+    
+
+    typedef typename if_<
+          typename forward_step4::not_last
+        , iter_fold_if_impl<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            , ForwardOp
+            , ForwardPredicate
+            , BackwardOp
+            , BackwardPredicate
+            >
+        , iter_fold_if_null_step<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            >
+        >::type backward_step4;
+
+    typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3;
+    typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2;
+    typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1;
+    typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0;
+    
+
+ public:
+    typedef typename backward_step0::state state;
+    typedef typename backward_step4::iterator iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp
new file mode 100644
index 0000000..50ea754
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp
@@ -0,0 +1,245 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl;
+
+template< int N >
+struct iter_fold_chunk;
+
+template<> struct iter_fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef state0 state;
+        typedef iter0 iterator;
+    };
+};
+
+template<> struct iter_fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef state1 state;
+        typedef iter1 iterator;
+    };
+};
+
+template<> struct iter_fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef state2 state;
+        typedef iter2 iterator;
+    };
+};
+
+template<> struct iter_fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef state3 state;
+        typedef iter3 iterator;
+    };
+};
+
+template<> struct iter_fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef state4 state;
+        typedef iter4 iterator;
+    };
+};
+
+template< int N >
+struct iter_fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef iter_fold_impl<
+              4
+            , First
+            , Last
+            , State
+            , ForwardOp
+            > chunk_;
+
+        typedef iter_fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , typename chunk_::iterator
+            , Last
+            , typename chunk_::state
+            , ForwardOp
+            > res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct iter_fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct iter_fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , iter_fold_null_step< Last,State >
+            , iter_fold_step< First,Last,State,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_step
+{
+    typedef iter_fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , ForwardOp
+        > chunk_;
+
+    typedef typename chunk_::state state;
+    typedef typename chunk_::iterator iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl
+    : iter_fold_chunk<N>
+        ::template result_< First,Last,State,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp
new file mode 100644
index 0000000..890a198
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp
@@ -0,0 +1,229 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+template< typename Arity > struct lambda_impl
+{
+    template< typename T, typename Tag, typename Protect > struct result_
+    {
+        typedef T type;
+        typedef is_placeholder<T> is_le;
+    };
+};
+
+template<> struct lambda_impl< int_<1> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef typename l1::is_le is_le1;
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value
+            > is_le;
+
+        typedef bind1<
+              typename F::rebind
+            , typename l1::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<2> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value
+            > is_le;
+
+        typedef bind2<
+              typename F::rebind
+            , typename l1::type, typename l2::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<3> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value
+            > is_le;
+
+        typedef bind3<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<4> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value
+            > is_le;
+
+        typedef bind4<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<5> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        typedef lambda< typename F::arg5, Tag, false_ > l5;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        typedef typename l5::is_le is_le5;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value
+            > is_le;
+
+        typedef bind5<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type, typename l5::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+    , typename Protect
+    >
+struct lambda
+{
+    /// Metafunction forwarding confuses MSVC 6.x
+    typedef typename aux::template_arity<T>::type arity_;
+    typedef typename aux::lambda_impl<arity_>
+        ::template result_< T,Tag,Protect > l_;
+
+    typedef typename l_::type type;
+    typedef typename l_::is_le is_le;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect))
+};
+
+BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/less.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/less.hpp
new file mode 100644
index 0000000..72338de
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/less.hpp
@@ -0,0 +1,102 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct less_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct less_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct less_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_tag
+    : tag< T,na >
+{
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less
+    : aux::msvc_eti_base< typename apply_wrap2<
+          less_impl<
+              typename less_tag<N1>::type
+            , typename less_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N2)::value >
+             BOOST_MPL_AUX_VALUE_WKND(N1)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp
new file mode 100644
index 0000000..b588697
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp
@@ -0,0 +1,102 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct less_equal_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct less_equal_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct less_equal_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_equal_tag
+    : tag< T,na >
+{
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less_equal
+    : aux::msvc_eti_base< typename apply_wrap2<
+          less_equal_impl<
+              typename less_equal_tag<N1>::type
+            , typename less_equal_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <=
+             BOOST_MPL_AUX_VALUE_WKND(N2)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/list.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/list.hpp
new file mode 100644
index 0000000..e5ea456
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/list.hpp
@@ -0,0 +1,556 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct list_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct list_chooser<0>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef list0<
+             
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<1>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list1<
+              T0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<2>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list2<
+              T0, T1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<3>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list3<
+              T0, T1, T2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<4>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list4<
+              T0, T1, T2, T3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<5>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list5<
+              T0, T1, T2, T3, T4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<6>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list6<
+              T0, T1, T2, T3, T4, T5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<7>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list7<
+              T0, T1, T2, T3, T4, T5, T6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<8>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list8<
+              T0, T1, T2, T3, T4, T5, T6, T7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<9>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list9<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<10>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list10<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<11>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list11<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<12>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list12<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<13>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list13<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<14>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list14<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<15>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list15<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<16>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list16<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<17>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list17<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<18>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list18<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<19>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list19<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<20>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list20<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_list_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_list_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename T6, typename T7, typename T8, typename T9, typename T10
+    , typename T11, typename T12, typename T13, typename T14, typename T15
+    , typename T16, typename T17, typename T18, typename T19, typename T20
+    >
+struct list_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_list_arg<T1>::value + is_list_arg<T2>::value 
+        + is_list_arg<T3>::value + is_list_arg<T4>::value 
+        + is_list_arg<T5>::value + is_list_arg<T6>::value 
+        + is_list_arg<T7>::value + is_list_arg<T8>::value 
+        + is_list_arg<T9>::value + is_list_arg<T10>::value 
+        + is_list_arg<T11>::value + is_list_arg<T12>::value 
+        + is_list_arg<T13>::value + is_list_arg<T14>::value 
+        + is_list_arg<T15>::value + is_list_arg<T16>::value 
+        + is_list_arg<T17>::value + is_list_arg<T18>::value 
+        + is_list_arg<T19>::value + is_list_arg<T20>::value
+        );
+
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct list_impl
+{
+    typedef aux::list_count_args<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        > arg_num_;
+
+    typedef typename aux::list_chooser< arg_num_::value >
+        ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct list
+    : aux::list_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type
+{
+    typedef typename aux::list_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp
new file mode 100644
index 0000000..ab25482
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp
@@ -0,0 +1,534 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct list_c_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct list_c_chooser<0>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list0_c<
+              T
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<1>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list1_c<
+              T, C0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<2>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list2_c<
+              T, C0, C1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<3>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list3_c<
+              T, C0, C1, C2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<4>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list4_c<
+              T, C0, C1, C2, C3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<5>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list5_c<
+              T, C0, C1, C2, C3, C4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<6>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list6_c<
+              T, C0, C1, C2, C3, C4, C5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<7>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list7_c<
+              T, C0, C1, C2, C3, C4, C5, C6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<8>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list8_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<9>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list9_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<10>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list10_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<11>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list11_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<12>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list12_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<13>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list13_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<14>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list14_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<15>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list15_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<16>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list16_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<17>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list17_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<18>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list18_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<19>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list19_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<20>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list20_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< long C >
+struct is_list_c_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_list_c_arg<LONG_MAX>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8
+    , long C9, long C10, long C11, long C12, long C13, long C14, long C15
+    , long C16, long C17, long C18, long C19, long C20
+    >
+struct list_c_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_list_c_arg<C1>::value + is_list_c_arg<C2>::value 
+        + is_list_c_arg<C3>::value + is_list_c_arg<C4>::value 
+        + is_list_c_arg<C5>::value + is_list_c_arg<C6>::value 
+        + is_list_c_arg<C7>::value + is_list_c_arg<C8>::value 
+        + is_list_c_arg<C9>::value + is_list_c_arg<C10>::value 
+        + is_list_c_arg<C11>::value + is_list_c_arg<C12>::value 
+        + is_list_c_arg<C13>::value + is_list_c_arg<C14>::value 
+        + is_list_c_arg<C15>::value + is_list_c_arg<C16>::value 
+        + is_list_c_arg<C17>::value + is_list_c_arg<C18>::value 
+        + is_list_c_arg<C19>::value + is_list_c_arg<C20>::value
+        );
+
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct list_c_impl
+{
+    typedef aux::list_c_count_args<
+          C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        > arg_num_;
+
+    typedef typename aux::list_c_chooser< arg_num_::value >
+        ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct list_c
+    : aux::list_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type
+{
+    typedef typename aux::list_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/map.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/map.hpp
new file mode 100644
index 0000000..970e0b7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/map.hpp
@@ -0,0 +1,556 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct map_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct map_chooser<0>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef map0<
+             
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<1>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map1<
+              T0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<2>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map2<
+              T0, T1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<3>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map3<
+              T0, T1, T2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<4>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map4<
+              T0, T1, T2, T3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<5>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map5<
+              T0, T1, T2, T3, T4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<6>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map6<
+              T0, T1, T2, T3, T4, T5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<7>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map7<
+              T0, T1, T2, T3, T4, T5, T6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<8>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map8<
+              T0, T1, T2, T3, T4, T5, T6, T7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<9>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map9<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<10>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map10<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<11>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map11<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<12>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map12<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<13>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map13<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<14>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map14<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<15>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map15<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<16>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map16<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<17>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map17<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<18>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map18<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<19>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map19<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<20>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map20<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_map_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_map_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename T6, typename T7, typename T8, typename T9, typename T10
+    , typename T11, typename T12, typename T13, typename T14, typename T15
+    , typename T16, typename T17, typename T18, typename T19, typename T20
+    >
+struct map_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_map_arg<T1>::value + is_map_arg<T2>::value 
+        + is_map_arg<T3>::value + is_map_arg<T4>::value 
+        + is_map_arg<T5>::value + is_map_arg<T6>::value 
+        + is_map_arg<T7>::value + is_map_arg<T8>::value 
+        + is_map_arg<T9>::value + is_map_arg<T10>::value 
+        + is_map_arg<T11>::value + is_map_arg<T12>::value 
+        + is_map_arg<T13>::value + is_map_arg<T14>::value 
+        + is_map_arg<T15>::value + is_map_arg<T16>::value 
+        + is_map_arg<T17>::value + is_map_arg<T18>::value 
+        + is_map_arg<T19>::value + is_map_arg<T20>::value
+        );
+
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct map_impl
+{
+    typedef aux::map_count_args<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        > arg_num_;
+
+    typedef typename aux::map_chooser< arg_num_::value >
+        ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct map
+    : aux::map_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type
+{
+    typedef typename aux::map_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/minus.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/minus.hpp
new file mode 100644
index 0000000..3237fa6
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/minus.hpp
@@ -0,0 +1,150 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/minus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct minus_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct minus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct minus_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct minus_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct minus_tag
+    : tag< T,na >
+{
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct minus2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct minus
+
+    : aux::msvc_eti_base< typename if_<
+
+          is_na<N3>
+        , minus2< N1,N2 >
+        , minus<
+              minus2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+    >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , minus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct minus2
+    : aux::msvc_eti_base< typename apply_wrap2<
+          minus_impl<
+              typename minus_tag<N1>::type
+            , typename minus_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, minus)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct minus_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 - n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct minus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::minus_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp
new file mode 100644
index 0000000..9c672c0
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp
@@ -0,0 +1,115 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/modulus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct modulus_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct modulus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct modulus_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct modulus_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct modulus_tag
+    : tag< T,na >
+{
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct modulus
+    : aux::msvc_eti_base< typename apply_wrap2<
+          modulus_impl<
+              typename modulus_tag<N1>::type
+            , typename modulus_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct modulus_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 % n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct modulus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::modulus_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp
new file mode 100644
index 0000000..1e48e7f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp
@@ -0,0 +1,102 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/not_equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct not_equal_to_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct not_equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct not_equal_to_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct not_equal_to_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct not_equal_to_tag
+    : tag< T,na >
+{
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct not_equal_to
+    : aux::msvc_eti_base< typename apply_wrap2<
+          not_equal_to_impl<
+              typename not_equal_to_tag<N1>::type
+            , typename not_equal_to_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct not_equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N1)::value !=
+             BOOST_MPL_AUX_VALUE_WKND(N2)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/or.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/or.hpp
new file mode 100644
index 0000000..8d0ba0a
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/or.hpp
@@ -0,0 +1,71 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/or.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< bool C_ > struct or_impl
+{
+    template<
+          typename T1, typename T2, typename T3, typename T4
+        >
+    struct result_
+        : true_
+    {
+    };
+};
+
+template<> struct or_impl<false>
+{
+    template<
+          typename T1, typename T2, typename T3, typename T4
+        >
+    struct result_
+        : or_impl<
+              BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+            >::template result_< T2,T3,T4,false_ >
+    {
+    };
+
+    template<> struct result_< false_,false_,false_,false_ >
+        : false_
+    {
+    };
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = false_, typename T4 = false_, typename T5 = false_
+    >
+struct or_
+
+    : aux::or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        >::template result_< T2,T3,T4,T5 >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , or_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , or_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp
new file mode 100644
index 0000000..ff97364
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp
@@ -0,0 +1,105 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright Peter Dimov 2001-2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/placeholders.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg< -1 > _;
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_;
+}
+
+}}
+
+/// agurt, 17/mar/02: one more placeholder for the last 'apply#' 
+/// specialization
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<1> _1;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<2> _2;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<3> _3;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<4> _4;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<5> _5;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<6> _6;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6;
+}
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/plus.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/plus.hpp
new file mode 100644
index 0000000..c8f3355
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/plus.hpp
@@ -0,0 +1,150 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/plus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct plus_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct plus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct plus_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct plus_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct plus_tag
+    : tag< T,na >
+{
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct plus2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct plus
+
+    : aux::msvc_eti_base< typename if_<
+
+          is_na<N3>
+        , plus2< N1,N2 >
+        , plus<
+              plus2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+    >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , plus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct plus2
+    : aux::msvc_eti_base< typename apply_wrap2<
+          plus_impl<
+              typename plus_tag<N1>::type
+            , typename plus_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, plus)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct plus_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 + n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct plus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::plus_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/quote.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/quote.hpp
new file mode 100644
index 0000000..b85880f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/quote.hpp
@@ -0,0 +1,116 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/quote.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+template< bool > struct quote_impl
+{
+    template< typename T > struct result_
+        : T
+    {
+    };
+};
+
+template<> struct quote_impl<false>
+{
+    template< typename T > struct result_
+    {
+        typedef T type;
+    };
+};
+
+template<
+      template< typename P1 > class F
+    , typename Tag = void_
+    >
+struct quote1
+{
+    template< typename U1 > struct apply
+
+        : quote_impl< aux::has_type< F<U1> >::value >
+            ::template result_< F<U1> >
+
+    {
+    };
+};
+
+template<
+      template< typename P1, typename P2 > class F
+    , typename Tag = void_
+    >
+struct quote2
+{
+    template< typename U1, typename U2 > struct apply
+
+        : quote_impl< aux::has_type< F< U1,U2 > >::value >
+            ::template result_< F< U1,U2 > >
+
+    {
+    };
+};
+
+template<
+      template< typename P1, typename P2, typename P3 > class F
+    , typename Tag = void_
+    >
+struct quote3
+{
+    template< typename U1, typename U2, typename U3 > struct apply
+
+        : quote_impl< aux::has_type< F< U1,U2,U3 > >::value >
+            ::template result_< F< U1,U2,U3 > >
+
+    {
+    };
+};
+
+template<
+      template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename Tag = void_
+    >
+struct quote4
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4
+        >
+    struct apply
+
+        : quote_impl< aux::has_type< F< U1,U2,U3,U4 > >::value >
+            ::template result_< F< U1,U2,U3,U4 > >
+
+    {
+    };
+};
+
+template<
+      template<
+          typename P1, typename P2, typename P3, typename P4
+        , typename P5
+        >
+      class F
+    , typename Tag = void_
+    >
+struct quote5
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4
+        , typename U5
+        >
+    struct apply
+
+        : quote_impl< aux::has_type< F< U1,U2,U3,U4,U5 > >::value >
+            ::template result_< F< U1,U2,U3,U4,U5 > >
+
+    {
+    };
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp
new file mode 100644
index 0000000..7a07414
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp
@@ -0,0 +1,295 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl;
+
+template< long N >
+struct reverse_fold_chunk;
+
+template<> struct reverse_fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef fwd_state0 bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter0 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef fwd_state1 bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter1 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef fwd_state2 bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter2 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef fwd_state3 bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter3 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef fwd_state4 bkwd_state4;
+        typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter4 iterator;
+    };
+};
+
+template< long N >
+struct reverse_fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef reverse_fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , iter4
+            , Last
+            , fwd_state4
+            , BackwardOp
+            , ForwardOp
+            > nested_chunk;
+
+        typedef typename nested_chunk::state bkwd_state4;
+        typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef typename nested_chunk::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct reverse_fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct reverse_fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , reverse_fold_null_step< Last,State >
+            , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_step
+{
+    typedef reverse_fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , typename deref<First>::type
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl
+    : reverse_fold_chunk<N>
+        ::template result_< First,Last,State,BackwardOp,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp
new file mode 100644
index 0000000..39a4057
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp
@@ -0,0 +1,295 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl;
+
+template< long N >
+struct reverse_iter_fold_chunk;
+
+template<> struct reverse_iter_fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef fwd_state0 bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter0 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef fwd_state1 bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter1 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef fwd_state2 bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter2 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef fwd_state3 bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter3 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef fwd_state4 bkwd_state4;
+        typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter4 iterator;
+    };
+};
+
+template< long N >
+struct reverse_iter_fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef reverse_iter_fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , iter4
+            , Last
+            , fwd_state4
+            , BackwardOp
+            , ForwardOp
+            > nested_chunk;
+
+        typedef typename nested_chunk::state bkwd_state4;
+        typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef typename nested_chunk::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct reverse_iter_fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct reverse_iter_fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , reverse_iter_fold_null_step< Last,State >
+            , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_step
+{
+    typedef reverse_iter_fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , First
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl
+    : reverse_iter_fold_chunk<N>
+        ::template result_< First,Last,State,BackwardOp,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/set.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/set.hpp
new file mode 100644
index 0000000..95aaa5c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/set.hpp
@@ -0,0 +1,556 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct set_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct set_chooser<0>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef set0<
+             
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<1>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set1<
+              T0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<2>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set2<
+              T0, T1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<3>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set3<
+              T0, T1, T2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<4>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set4<
+              T0, T1, T2, T3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<5>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set5<
+              T0, T1, T2, T3, T4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<6>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set6<
+              T0, T1, T2, T3, T4, T5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<7>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set7<
+              T0, T1, T2, T3, T4, T5, T6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<8>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set8<
+              T0, T1, T2, T3, T4, T5, T6, T7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<9>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set9<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<10>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set10<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<11>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set11<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<12>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set12<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<13>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set13<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<14>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set14<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<15>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set15<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<16>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set16<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<17>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set17<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<18>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set18<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<19>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set19<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<20>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set20<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_set_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_set_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename T6, typename T7, typename T8, typename T9, typename T10
+    , typename T11, typename T12, typename T13, typename T14, typename T15
+    , typename T16, typename T17, typename T18, typename T19, typename T20
+    >
+struct set_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_set_arg<T1>::value + is_set_arg<T2>::value 
+        + is_set_arg<T3>::value + is_set_arg<T4>::value 
+        + is_set_arg<T5>::value + is_set_arg<T6>::value 
+        + is_set_arg<T7>::value + is_set_arg<T8>::value 
+        + is_set_arg<T9>::value + is_set_arg<T10>::value 
+        + is_set_arg<T11>::value + is_set_arg<T12>::value 
+        + is_set_arg<T13>::value + is_set_arg<T14>::value 
+        + is_set_arg<T15>::value + is_set_arg<T16>::value 
+        + is_set_arg<T17>::value + is_set_arg<T18>::value 
+        + is_set_arg<T19>::value + is_set_arg<T20>::value
+        );
+
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct set_impl
+{
+    typedef aux::set_count_args<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        > arg_num_;
+
+    typedef typename aux::set_chooser< arg_num_::value >
+        ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct set
+    : aux::set_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type
+{
+    typedef typename aux::set_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/set_c.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/set_c.hpp
new file mode 100644
index 0000000..1ff34f9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/set_c.hpp
@@ -0,0 +1,534 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct set_c_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct set_c_chooser<0>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set0_c<
+              T
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<1>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set1_c<
+              T, C0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<2>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set2_c<
+              T, C0, C1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<3>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set3_c<
+              T, C0, C1, C2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<4>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set4_c<
+              T, C0, C1, C2, C3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<5>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set5_c<
+              T, C0, C1, C2, C3, C4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<6>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set6_c<
+              T, C0, C1, C2, C3, C4, C5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<7>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set7_c<
+              T, C0, C1, C2, C3, C4, C5, C6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<8>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set8_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<9>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set9_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<10>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set10_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<11>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set11_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<12>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set12_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<13>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set13_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<14>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set14_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<15>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set15_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<16>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set16_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<17>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set17_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<18>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set18_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<19>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set19_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<20>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set20_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< long C >
+struct is_set_c_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_set_c_arg<LONG_MAX>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8
+    , long C9, long C10, long C11, long C12, long C13, long C14, long C15
+    , long C16, long C17, long C18, long C19, long C20
+    >
+struct set_c_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_set_c_arg<C1>::value + is_set_c_arg<C2>::value 
+        + is_set_c_arg<C3>::value + is_set_c_arg<C4>::value 
+        + is_set_c_arg<C5>::value + is_set_c_arg<C6>::value 
+        + is_set_c_arg<C7>::value + is_set_c_arg<C8>::value 
+        + is_set_c_arg<C9>::value + is_set_c_arg<C10>::value 
+        + is_set_c_arg<C11>::value + is_set_c_arg<C12>::value 
+        + is_set_c_arg<C13>::value + is_set_c_arg<C14>::value 
+        + is_set_c_arg<C15>::value + is_set_c_arg<C16>::value 
+        + is_set_c_arg<C17>::value + is_set_c_arg<C18>::value 
+        + is_set_c_arg<C19>::value + is_set_c_arg<C20>::value
+        );
+
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct set_c_impl
+{
+    typedef aux::set_c_count_args<
+          C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        > arg_num_;
+
+    typedef typename aux::set_c_chooser< arg_num_::value >
+        ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct set_c
+    : aux::set_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type
+{
+    typedef typename aux::set_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp
new file mode 100644
index 0000000..176fc00
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp
@@ -0,0 +1,114 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_left.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct shift_left_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_left_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct shift_left_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct shift_left_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_left_tag
+    : tag< T,na >
+{
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_left
+    : aux::msvc_eti_base< typename apply_wrap2<
+          shift_left_impl<
+              typename shift_left_tag<N1>::type
+            , typename shift_left_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, typename Shift, T n, Shift s >
+struct shift_left_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n << s));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct shift_left_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+        : aux::shift_left_wknd<
+              typename N::value_type
+            , typename S::value_type
+            , N::value
+            , S::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp
new file mode 100644
index 0000000..6b6e01f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp
@@ -0,0 +1,114 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_right.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct shift_right_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_right_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct shift_right_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct shift_right_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_right_tag
+    : tag< T,na >
+{
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_right
+    : aux::msvc_eti_base< typename apply_wrap2<
+          shift_right_impl<
+              typename shift_right_tag<N1>::type
+            , typename shift_right_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, typename Shift, T n, Shift s >
+struct shift_right_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n >> s));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct shift_right_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+        : aux::shift_right_wknd<
+              typename N::value_type
+            , typename S::value_type
+            , N::value
+            , S::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp
new file mode 100644
index 0000000..1668771
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp
@@ -0,0 +1,46 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< bool >
+struct template_arity_impl
+{
+    template< typename F > struct result_
+        : mpl::int_< -1 >
+    {
+    };
+};
+
+template<>
+struct template_arity_impl<true>
+{
+    template< typename F > struct result_
+        : F::arity
+    {
+    };
+};
+
+template< typename F >
+struct template_arity
+    : template_arity_impl< ::boost::mpl::aux::has_rebind<F>::value >
+        ::template result_<F>
+{
+};
+
+template<>
+struct template_arity<int>
+    : mpl::int_< -1 >
+{
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/times.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/times.hpp
new file mode 100644
index 0000000..a6ae333
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/times.hpp
@@ -0,0 +1,150 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/times.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag1_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
+    , BOOST_MPL_AUX_NTTP_DECL(int, tag2_)  = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
+    >
+struct times_impl
+    : if_c<
+          ( tag1_ > tag2_ )
+        , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct times_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct times_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct times_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct times_tag
+    : tag< T,na >
+{
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct times2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct times
+
+    : aux::msvc_eti_base< typename if_<
+
+          is_na<N3>
+        , times2< N1,N2 >
+        , times<
+              times2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+    >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , times
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct times2
+    : aux::msvc_eti_base< typename apply_wrap2<
+          times_impl<
+              typename times_tag<N1>::type
+            , typename times_tag<N2>::type
+            >
+        , N1
+        , N2
+        >::type >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, times)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct times_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 * n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct times_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::times_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp
new file mode 100644
index 0000000..26533dd
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp
@@ -0,0 +1,109 @@
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/unpack_args.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl
+{
+    template< typename F, typename Args > struct apply;
+};
+
+template<> struct unpack_args_impl<0>
+{
+    template< typename F, typename Args > struct apply
+        : apply0<
+              F
+            >
+    {
+    };
+};
+
+template<> struct unpack_args_impl<1>
+{
+    template< typename F, typename Args > struct apply
+        : apply1<
+              F
+            , typename at_c< Args,0 >::type
+            >
+    {
+    };
+};
+
+template<> struct unpack_args_impl<2>
+{
+    template< typename F, typename Args > struct apply
+        : apply2<
+              F
+            , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+            >
+    {
+    };
+};
+
+template<> struct unpack_args_impl<3>
+{
+    template< typename F, typename Args > struct apply
+        : apply3<
+              F
+            , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+            , typename at_c< Args,2 >::type
+            >
+    {
+    };
+};
+
+template<> struct unpack_args_impl<4>
+{
+    template< typename F, typename Args > struct apply
+        : apply4<
+              F
+            , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+            , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+            >
+    {
+    };
+};
+
+template<> struct unpack_args_impl<5>
+{
+    template< typename F, typename Args > struct apply
+        : apply5<
+              F
+            , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+            , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+            , typename at_c< Args,4 >::type
+            >
+    {
+    };
+};
+
+}
+
+template<
+      typename F
+    >
+struct unpack_args
+{
+    template< typename Args > struct apply
+
+        : aux::unpack_args_impl< size<Args>::value >
+            ::template apply< F,Args >
+
+    {
+    };
+};
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/vector.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/vector.hpp
new file mode 100644
index 0000000..a6c7b62
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/vector.hpp
@@ -0,0 +1,556 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct vector_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct vector_chooser<0>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef vector0<
+             
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<1>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector1<
+              T0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<2>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector2<
+              T0, T1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<3>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector3<
+              T0, T1, T2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<4>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector4<
+              T0, T1, T2, T3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<5>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector5<
+              T0, T1, T2, T3, T4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<6>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector6<
+              T0, T1, T2, T3, T4, T5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<7>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector7<
+              T0, T1, T2, T3, T4, T5, T6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<8>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector8<
+              T0, T1, T2, T3, T4, T5, T6, T7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<9>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector9<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<10>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector10<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<11>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector11<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<12>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector12<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<13>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector13<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<14>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector14<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<15>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector15<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<16>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector16<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<17>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector17<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<18>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector18<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<19>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector19<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<20>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector20<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_vector_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_vector_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename T6, typename T7, typename T8, typename T9, typename T10
+    , typename T11, typename T12, typename T13, typename T14, typename T15
+    , typename T16, typename T17, typename T18, typename T19, typename T20
+    >
+struct vector_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_vector_arg<T1>::value + is_vector_arg<T2>::value 
+        + is_vector_arg<T3>::value + is_vector_arg<T4>::value 
+        + is_vector_arg<T5>::value + is_vector_arg<T6>::value 
+        + is_vector_arg<T7>::value + is_vector_arg<T8>::value 
+        + is_vector_arg<T9>::value + is_vector_arg<T10>::value 
+        + is_vector_arg<T11>::value + is_vector_arg<T12>::value 
+        + is_vector_arg<T13>::value + is_vector_arg<T14>::value 
+        + is_vector_arg<T15>::value + is_vector_arg<T16>::value 
+        + is_vector_arg<T17>::value + is_vector_arg<T18>::value 
+        + is_vector_arg<T19>::value + is_vector_arg<T20>::value
+        );
+
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct vector_impl
+{
+    typedef aux::vector_count_args<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        > arg_num_;
+
+    typedef typename aux::vector_chooser< arg_num_::value >
+        ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct vector
+    : aux::vector_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type
+{
+    typedef typename aux::vector_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp b/ext/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp
new file mode 100644
index 0000000..c522d08
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp
@@ -0,0 +1,534 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct vector_c_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<0>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector0_c<
+              T
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<1>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector1_c<
+              T, T(C0)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<2>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector2_c<
+              T, T(C0), T(C1)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<3>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector3_c<
+              T, T(C0), T(C1), T(C2)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<4>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector4_c<
+              T, T(C0), T(C1), T(C2), T(C3)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<5>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector5_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<6>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector6_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<7>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector7_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<8>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector8_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<9>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector9_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<10>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector10_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<11>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector11_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<12>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector12_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<13>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector13_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<14>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector14_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<15>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector15_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<16>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector16_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<17>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector17_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<18>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector18_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<19>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector19_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<20>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector20_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< long C >
+struct is_vector_c_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_vector_c_arg<LONG_MAX>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8
+    , long C9, long C10, long C11, long C12, long C13, long C14, long C15
+    , long C16, long C17, long C18, long C19, long C20
+    >
+struct vector_c_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_vector_c_arg<C1>::value + is_vector_c_arg<C2>::value 
+        + is_vector_c_arg<C3>::value + is_vector_c_arg<C4>::value 
+        + is_vector_c_arg<C5>::value + is_vector_c_arg<C6>::value 
+        + is_vector_c_arg<C7>::value + is_vector_c_arg<C8>::value 
+        + is_vector_c_arg<C9>::value + is_vector_c_arg<C10>::value 
+        + is_vector_c_arg<C11>::value + is_vector_c_arg<C12>::value 
+        + is_vector_c_arg<C13>::value + is_vector_c_arg<C14>::value 
+        + is_vector_c_arg<C15>::value + is_vector_c_arg<C16>::value 
+        + is_vector_c_arg<C17>::value + is_vector_c_arg<C18>::value 
+        + is_vector_c_arg<C19>::value + is_vector_c_arg<C20>::value
+        );
+
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct vector_c_impl
+{
+    typedef aux::vector_c_count_args<
+          C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        > arg_num_;
+
+    typedef typename aux::vector_c_chooser< arg_num_::value >
+        ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct vector_c
+    : aux::vector_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type
+{
+    typedef typename aux::vector_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp
new file mode 100644
index 0000000..26de94c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_backward;
+template<>
+struct advance_backward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_backward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_backward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_backward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_backward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef typename prior<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_backward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_backward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_backward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp
new file mode 100644
index 0000000..b137cc7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_forward;
+template<>
+struct advance_forward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_forward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_forward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_forward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_forward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef typename next<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_forward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_forward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_forward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/and.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/and.hpp
new file mode 100644
index 0000000..010ad1f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/and.hpp
@@ -0,0 +1,69 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/and.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C_, typename T1, typename T2, typename T3, typename T4 >
+struct and_impl
+    : false_
+{
+};
+
+template< typename T1, typename T2, typename T3, typename T4 >
+struct and_impl< true,T1,T2,T3,T4 >
+    : and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4
+        , true_
+        >
+{
+};
+
+template<>
+struct and_impl<
+          true
+        , true_, true_, true_, true_
+        >
+    : true_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = true_, typename T4 = true_, typename T5 = true_
+    >
+struct and_
+
+    : aux::and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4, T5
+        >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , and_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , and_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/apply.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/apply.hpp
new file mode 100644
index 0000000..e08eacc
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/apply.hpp
@@ -0,0 +1,169 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct apply0
+
+    : apply_wrap0<
+          typename lambda<F>::type
+       
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          1
+        , apply0
+        , (F )
+        )
+};
+
+template<
+      typename F
+    >
+struct apply< F,na,na,na,na,na >
+    : apply0<F>
+{
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply1
+
+    : apply_wrap1<
+          typename lambda<F>::type
+        , T1
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          2
+        , apply1
+        , (F, T1)
+        )
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply< F,T1,na,na,na,na >
+    : apply1< F,T1 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2
+
+    : apply_wrap2<
+          typename lambda<F>::type
+        , T1, T2
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , apply2
+        , (F, T1, T2)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply< F,T1,T2,na,na,na >
+    : apply2< F,T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3
+
+    : apply_wrap3<
+          typename lambda<F>::type
+        , T1, T2, T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , apply3
+        , (F, T1, T2, T3)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply< F,T1,T2,T3,na,na >
+    : apply3< F,T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4
+
+    : apply_wrap4<
+          typename lambda<F>::type
+        , T1, T2, T3, T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , apply4
+        , (F, T1, T2, T3, T4)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply< F,T1,T2,T3,T4,na >
+    : apply4< F,T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5
+
+    : apply_wrap5<
+          typename lambda<F>::type
+        , T1, T2, T3, T4, T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          6
+        , apply5
+        , (F, T1, T2, T3, T4, T5)
+        )
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply
+    : apply5< F,T1,T2,T3,T4,T5 >
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp
new file mode 100644
index 0000000..b2ed5d5
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp
@@ -0,0 +1,52 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na
+    >
+struct apply;
+
+template<
+      typename F
+    >
+struct apply0;
+
+template<
+      typename F, typename T1
+    >
+struct apply1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp
new file mode 100644
index 0000000..2ffe709
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp
@@ -0,0 +1,456 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply_wrap.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      int N, typename F
+    >
+struct apply_wrap_impl0;
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          0
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+/// since the defaults are "lost", we have to pass *something* even for nullary
+/// metafunction classes
+        na
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          1
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          2
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na, na
+
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          3
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na, na, na
+
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          4
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na, na, na, na
+
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap_impl0<
+          5
+        , F
+       
+        >
+{
+    typedef typename F::template apply<
+         
+        na, na, na, na, na
+
+        > type;
+};
+
+template<
+      typename F
+    >
+struct apply_wrap0
+    : apply_wrap_impl0<
+          ::boost::mpl::aux::arity< F,0 >::value
+        , F
+       
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1
+    >
+struct apply_wrap_impl1;
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          1
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          2
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        , na
+
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          3
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        , na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          4
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        , na, na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap_impl1<
+          5
+        , F
+        , T1
+        >
+{
+    typedef typename F::template apply<
+          T1
+        , na, na, na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply_wrap1
+    : apply_wrap_impl1<
+          ::boost::mpl::aux::arity< F,1 >::value
+        , F
+        , T1
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2<
+          2
+        , F
+        , T1, T2
+        >
+{
+    typedef typename F::template apply<
+          T1, T2
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2<
+          3
+        , F
+        , T1, T2
+        >
+{
+    typedef typename F::template apply<
+          T1, T2
+
+        , na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2<
+          4
+        , F
+        , T1, T2
+        >
+{
+    typedef typename F::template apply<
+          T1, T2
+
+        , na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap_impl2<
+          5
+        , F
+        , T1, T2
+        >
+{
+    typedef typename F::template apply<
+          T1, T2
+
+        , na, na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply_wrap2
+    : apply_wrap_impl2<
+          ::boost::mpl::aux::arity< F,2 >::value
+        , F
+        , T1, T2
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap_impl3;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap_impl3<
+          3
+        , F
+        , T1, T2, T3
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap_impl3<
+          4
+        , F
+        , T1, T2, T3
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3
+
+        , na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap_impl3<
+          5
+        , F
+        , T1, T2, T3
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3
+
+        , na, na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply_wrap3
+    : apply_wrap_impl3<
+          ::boost::mpl::aux::arity< F,3 >::value
+        , F
+        , T1, T2, T3
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap_impl4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap_impl4<
+          4
+        , F
+        , T1, T2, T3, T4
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3, T4
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap_impl4<
+          5
+        , F
+        , T1, T2, T3, T4
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3, T4
+
+        , na
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply_wrap4
+    : apply_wrap_impl4<
+          ::boost::mpl::aux::arity< F,4 >::value
+        , F
+        , T1, T2, T3, T4
+        >::type
+{
+};
+
+template<
+      int N, typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply_wrap_impl5;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply_wrap_impl5<
+          5
+        , F
+        , T1, T2, T3, T4, T5
+        >
+{
+    typedef typename F::template apply<
+          T1, T2, T3, T4, T5
+
+        > type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply_wrap5
+    : apply_wrap_impl5<
+          ::boost::mpl::aux::arity< F,5 >::value
+        , F
+        , T1, T2, T3, T4, T5
+        >::type
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/arg.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/arg.hpp
new file mode 100644
index 0000000..6f2f8a8
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/arg.hpp
@@ -0,0 +1,123 @@
+
+// Copyright Peter Dimov 2001-2002
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/arg.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+template<> struct arg< -1 >
+{
+    BOOST_STATIC_CONSTANT(int, value  = -1);
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<1>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 1);
+    typedef arg<2> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<2>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 2);
+    typedef arg<3> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U2 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<3>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 3);
+    typedef arg<4> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U3 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<4>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 4);
+    typedef arg<5> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U4 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<5>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 5);
+    typedef arg<6> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U5 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg)
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp
new file mode 100644
index 0000000..b070232
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp
@@ -0,0 +1,440 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+{
+    typedef T type;
+};
+
+template<
+      int N, typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
+{
+    typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 >
+{
+    typedef bind< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind0<F>, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind0<F> f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F
+    >
+struct bind< F,na,na,na,na,na >
+    : bind0<F>
+{
+};
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename U1, typename U2, typename U3
+    , typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind1< F,T1 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind1< F,T1 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1
+    >
+struct bind< F,T1,na,na,na,na >
+    : bind1< F,T1 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename U1, typename U2
+    , typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind2< F,T1,T2 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind2< F,T1,T2 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind< F,T1,T2,na,na,na >
+    : bind2< F,T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename U1
+    , typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind3< F,T1,T2,T3 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind< F,T1,T2,T3,na,na >
+    : bind3< F,T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind4< F,T1,T2,T3,T4 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind< F,T1,T2,T3,T4,na >
+    : bind4< F,T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+        typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
+
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind5< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+
+/// primary template (not a specialization!)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind
+    : bind5< F,T1,T2,T3,T4,T5 >
+{
+};
+
+/// if_/eval_if specializations
+template< template< typename T1, typename T2, typename T3 > class F, typename Tag >
+struct quote3;
+
+template< typename T1, typename T2, typename T3 > struct if_;
+
+template<
+      typename Tag, typename T1, typename T2, typename T3
+    >
+struct bind3<
+      quote3< if_,Tag >
+    , T1, T2, T3
+    >
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef mpl::arg<1> n1;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef typename if_<
+              typename t1::type
+            , t2, t3
+            >::type f_;
+
+     public:
+        typedef typename f_::type type;
+    };
+};
+
+template<
+      template< typename T1, typename T2, typename T3 > class F, typename Tag
+    >
+struct quote3;
+
+template< typename T1, typename T2, typename T3 > struct eval_if;
+
+template<
+      typename Tag, typename T1, typename T2, typename T3
+    >
+struct bind3<
+      quote3< eval_if,Tag >
+    , T1, T2, T3
+    >
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef mpl::arg<1> n1;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef typename eval_if<
+              typename t1::type
+            , t2, t3
+            >::type f_;
+
+     public:
+        typedef typename f_::type type;
+    };
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/bind.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/bind.hpp
new file mode 100644
index 0000000..0e9513a
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/bind.hpp
@@ -0,0 +1,561 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+{
+    typedef T type;
+};
+
+template<
+      typename T
+    , typename Arg
+    >
+struct replace_unnamed_arg
+{
+    typedef Arg next;
+    typedef T type;
+};
+
+template<
+      typename Arg
+    >
+struct replace_unnamed_arg< arg< -1 >, Arg >
+{
+    typedef typename Arg::next next;
+    typedef Arg type;
+};
+
+template<
+      int N, typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
+{
+    typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 >
+{
+    typedef bind< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind0<F>, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind0<F> f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F
+    >
+struct bind< F,na,na,na,na,na >
+    : bind0<F>
+{
+};
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename U1, typename U2, typename U3
+    , typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind1< F,T1 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind1< F,T1 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1
+    >
+struct bind< F,T1,na,na,na,na >
+    : bind1< F,T1 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename U1, typename U2
+    , typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind2< F,T1,T2 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind2< F,T1,T2 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind< F,T1,T2,na,na,na >
+    : bind2< F,T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename U1
+    , typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind3< F,T1,T2,T3 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind< F,T1,T2,T3,na,na >
+    : bind3< F,T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind4< F,T1,T2,T3,T4 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind< F,T1,T2,T3,T4,na >
+    : bind4< F,T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+        typedef aux::replace_unnamed_arg< T5,n5 > r5;
+        typedef typename r5::type a5;
+        typedef typename r5::next n6;
+        typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5;
+        ///
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind5< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+
+/// primary template (not a specialization!)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind
+    : bind5< F,T1,T2,T3,T4,T5 >
+{
+};
+
+/// if_/eval_if specializations
+template< template< typename T1, typename T2, typename T3 > class F, typename Tag >
+struct quote3;
+
+template< typename T1, typename T2, typename T3 > struct if_;
+
+template<
+      typename Tag, typename T1, typename T2, typename T3
+    >
+struct bind3<
+      quote3< if_,Tag >
+    , T1, T2, T3
+    >
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef mpl::arg<1> n1;
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef typename if_<
+              typename t1::type
+            , t2, t3
+            >::type f_;
+
+     public:
+        typedef typename f_::type type;
+    };
+};
+
+template<
+      template< typename T1, typename T2, typename T3 > class F, typename Tag
+    >
+struct quote3;
+
+template< typename T1, typename T2, typename T3 > struct eval_if;
+
+template<
+      typename Tag, typename T1, typename T2, typename T3
+    >
+struct bind3<
+      quote3< eval_if,Tag >
+    , T1, T2, T3
+    >
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef mpl::arg<1> n1;
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef typename eval_if<
+              typename t1::type
+            , t2, t3
+            >::type f_;
+
+     public:
+        typedef typename f_::type type;
+    };
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp
new file mode 100644
index 0000000..c4a5060
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp
@@ -0,0 +1,52 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bind_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na
+    >
+struct bind;
+
+template<
+      typename F
+    >
+struct bind0;
+
+template<
+      typename F, typename T1
+    >
+struct bind1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp
new file mode 100644
index 0000000..0bbf54e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitand.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitand_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitand_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitand_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitand_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitand_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitand_
+    : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitand_< N1,N2,N3,N4,na >
+
+    : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitand_< N1,N2,N3,na,na >
+
+    : bitand_< bitand_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitand_< N1,N2,na,na,na >
+    : bitand_impl<
+          typename bitand_tag<N1>::type
+        , typename bitand_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitand_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  & BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp
new file mode 100644
index 0000000..55b31cb
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitor_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitor_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitor_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitor_
+    : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitor_< N1,N2,N3,N4,na >
+
+    : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitor_< N1,N2,N3,na,na >
+
+    : bitor_< bitor_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitor_< N1,N2,na,na,na >
+    : bitor_impl<
+          typename bitor_tag<N1>::type
+        , typename bitor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  | BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp
new file mode 100644
index 0000000..ec19391
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp
@@ -0,0 +1,147 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitxor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitxor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitxor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitxor_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitxor_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitxor_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitxor_
+    : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitxor_< N1,N2,N3,N4,na >
+
+    : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitxor_< N1,N2,N3,na,na >
+
+    : bitxor_< bitxor_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitxor_< N1,N2,na,na,na >
+    : bitxor_impl<
+          typename bitxor_tag<N1>::type
+        , typename bitxor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitxor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/deque.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/deque.hpp
new file mode 100644
index 0000000..de67398
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/deque.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/deque.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct deque;
+
+template<
+     
+    >
+struct deque<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector0<  >
+{
+    typedef vector0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct deque<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector1<T0>
+{
+    typedef typename vector1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct deque<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector2< T0,T1 >
+{
+    typedef typename vector2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct deque<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector3< T0,T1,T2 >
+{
+    typedef typename vector3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct deque<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector4< T0,T1,T2,T3 >
+{
+    typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct deque<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector5< T0,T1,T2,T3,T4 >
+{
+    typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : vector15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : vector16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : vector17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : vector18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : vector19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct deque
+    : vector20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/divides.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/divides.hpp
new file mode 100644
index 0000000..86f1682
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/divides.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/divides.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct divides_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct divides_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct divides_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct divides_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct divides_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct divides
+    : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , divides
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct divides< N1,N2,N3,N4,na >
+
+    : divides< divides< divides< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct divides< N1,N2,N3,na,na >
+
+    : divides< divides< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct divides< N1,N2,na,na,na >
+    : divides_impl<
+          typename divides_tag<N1>::type
+        , typename divides_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, divides)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct divides_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  / BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp
new file mode 100644
index 0000000..62c9945
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct equal_to_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct equal_to_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct equal_to
+
+    : equal_to_impl<
+          typename equal_to_tag<N1>::type
+        , typename equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value  == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp
new file mode 100644
index 0000000..9e7a293
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp
@@ -0,0 +1,180 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 0,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 1,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef state1 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 2,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef state2 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 3,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef state3 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 4,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef state4 state;
+    typedef iter4 iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl
+{
+    typedef fold_impl<
+          4
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< -1,First,Last,State,ForwardOp >
+    : fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< -1,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp
new file mode 100644
index 0000000..bf81873
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp
@@ -0,0 +1,554 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+   
+    >
+struct lambda
+{
+    typedef false_ is_le;
+    typedef T result_;
+    typedef T type;
+};
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+template< int N, typename Tag >
+struct lambda< arg<N>, Tag >
+{
+    typedef true_ is_le;
+    typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41
+    typedef mpl::protect<result_> type;
+};
+
+template<
+      typename F
+    , typename Tag
+    >
+struct lambda<
+          bind0<F>
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind0<
+          F
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1
+{
+    typedef F<
+          typename L1::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1< true_,Tag,F,L1 >
+{
+    typedef bind1<
+          quote1< F,Tag >
+        , typename L1::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1 > class F
+    , typename T1
+    , typename Tag
+    >
+struct lambda<
+          F<T1>
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef typename l1::is_le is_le1;
+    typedef typename aux::lambda_or<
+          is_le1::value
+        >::type is_le;
+
+    typedef aux::le_result1<
+          is_le, Tag, F, l1
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1
+    , typename Tag
+    >
+struct lambda<
+          bind1< F,T1 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind1<
+          F
+        , T1
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2
+{
+    typedef F<
+          typename L1::type, typename L2::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2< true_,Tag,F,L1,L2 >
+{
+    typedef bind2<
+          quote2< F,Tag >
+        , typename L1::result_, typename L2::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2 > class F
+    , typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value
+        >::type is_le;
+
+    typedef aux::le_result2<
+          is_le, Tag, F, l1, l2
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          bind2< F,T1,T2 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind2<
+          F
+        , T1, T2
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3< true_,Tag,F,L1,L2,L3 >
+{
+    typedef bind3<
+          quote3< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3 > class F
+    , typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value
+        >::type is_le;
+
+    typedef aux::le_result3<
+          is_le, Tag, F, l1, l2, l3
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          bind3< F,T1,T2,T3 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind3<
+          F
+        , T1, T2, T3
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4< true_,Tag,F,L1,L2,L3,L4 >
+{
+    typedef bind4<
+          quote4< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        >::type is_le;
+
+    typedef aux::le_result4<
+          is_le, Tag, F, l1, l2, l3, l4
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          bind4< F,T1,T2,T3,T4 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind4<
+          F
+        , T1, T2, T3, T4
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type, typename L5::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 >
+{
+    typedef bind5<
+          quote5< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_, typename L5::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template<
+          typename P1, typename P2, typename P3, typename P4
+        , typename P5
+        >
+      class F
+    , typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    typedef lambda< T5,Tag > l5;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    typedef typename l5::is_le is_le5;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        , is_le5::value
+        >::type is_le;
+
+    typedef aux::le_result5<
+          is_le, Tag, F, l1, l2, l3, l4, l5
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind5< F,T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind5<
+          F
+        , T1, T2, T3, T4, T5
+        > result_;
+
+    typedef result_ type;
+};
+
+/// special case for 'protect'
+template< typename T, typename Tag >
+struct lambda< mpl::protect<T>, Tag >
+{
+    typedef false_ is_le;
+    typedef mpl::protect<T> result_;
+    typedef result_ type;
+};
+
+/// specializations for the main 'bind' form
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind< F,T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind< F,T1,T2,T3,T4,T5 > result_;
+    typedef result_ type;
+};
+
+/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars
+
+template<
+      typename F, typename Tag1, typename Tag2
+    >
+struct lambda<
+          lambda< F,Tag1 >
+        , Tag2
+        >
+{
+    typedef lambda< F,Tag2 > l1;
+    typedef lambda< Tag1,Tag2 > l2;
+    typedef typename l1::is_le is_le;
+    typedef aux::le_result2<is_le, Tag2, mpl::lambda, l1, l2> le_result_;
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, lambda)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/greater.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/greater.hpp
new file mode 100644
index 0000000..14d8e08
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/greater.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater
+
+    : greater_impl<
+          typename greater_tag<N1>::type
+        , typename greater_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp
new file mode 100644
index 0000000..2603f91
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_equal_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_equal_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater_equal
+
+    : greater_equal_impl<
+          typename greater_equal_tag<N1>::type
+        , typename greater_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp
new file mode 100644
index 0000000..00f31c4
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp
@@ -0,0 +1,141 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/inherit.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    >
+struct inherit2
+    : T1, T2
+{
+    typedef inherit2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2))
+};
+
+template< typename T1 >
+struct inherit2< T1,empty_base >
+{
+    typedef T1 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base))
+};
+
+template< typename T2 >
+struct inherit2< empty_base,T2 >
+{
+    typedef T2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2))
+};
+
+template<>
+struct inherit2< empty_base,empty_base >
+{
+    typedef empty_base type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, inherit2)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na
+    >
+struct inherit3
+    : inherit2<
+          typename inherit2<
+              T1, T2
+            >::type
+        , T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , inherit3
+        , ( T1, T2, T3)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, inherit3)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    >
+struct inherit4
+    : inherit2<
+          typename inherit3<
+              T1, T2, T3
+            >::type
+        , T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , inherit4
+        , ( T1, T2, T3, T4)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(4, inherit4)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    , typename T5 = na
+    >
+struct inherit5
+    : inherit2<
+          typename inherit4<
+              T1, T2, T3, T4
+            >::type
+        , T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , inherit5
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(5, inherit5)
+
+/// primary template
+
+template<
+      typename T1 = empty_base, typename T2 = empty_base
+    , typename T3 = empty_base, typename T4 = empty_base
+    , typename T5 = empty_base
+    >
+struct inherit
+    : inherit5< T1,T2,T3,T4,T5 >
+{
+};
+
+template<>
+struct inherit< na,na,na,na,na >
+{
+    template<
+
+          typename T1 = empty_base, typename T2 = empty_base
+        , typename T3 = empty_base, typename T4 = empty_base
+        , typename T5 = empty_base
+
+        >
+    struct apply
+        : inherit< T1,T2,T3,T4,T5 >
+    {
+    };
+};
+
+BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp
new file mode 100644
index 0000000..6951795
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp
@@ -0,0 +1,133 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright David Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename Iterator, typename State >
+struct iter_fold_if_null_step
+{
+    typedef State state;
+    typedef Iterator iterator;
+};
+
+template< bool >
+struct iter_fold_if_step_impl
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef typename apply2< StateOp,State,Iterator >::type state;
+        typedef typename IteratorOp::type iterator;
+    };
+};
+
+template<>
+struct iter_fold_if_step_impl<false>
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef State state;
+        typedef Iterator iterator;
+    };
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_forward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename BackwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_backward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename ForwardPredicate
+    , typename BackwardOp
+    , typename BackwardPredicate
+    >
+struct iter_fold_if_impl
+{
+ private:
+    typedef iter_fold_if_null_step< Iterator,State > forward_step0;
+    typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1;
+    typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2;
+    typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3;
+    typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4;
+    
+
+    typedef typename if_<
+          typename forward_step4::not_last
+        , iter_fold_if_impl<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            , ForwardOp
+            , ForwardPredicate
+            , BackwardOp
+            , BackwardPredicate
+            >
+        , iter_fold_if_null_step<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            >
+        >::type backward_step4;
+
+    typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3;
+    typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2;
+    typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1;
+    typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0;
+    
+
+ public:
+    typedef typename backward_step0::state state;
+    typedef typename backward_step4::iterator iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp
new file mode 100644
index 0000000..805790e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp
@@ -0,0 +1,180 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 0,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 1,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef state1 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 2,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef state2 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 3,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef state3 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 4,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef state4 state;
+    typedef iter4 iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl
+{
+    typedef iter_fold_impl<
+          4
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef iter_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< -1,First,Last,State,ForwardOp >
+    : iter_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< -1,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp
new file mode 100644
index 0000000..890a198
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp
@@ -0,0 +1,229 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+template< typename Arity > struct lambda_impl
+{
+    template< typename T, typename Tag, typename Protect > struct result_
+    {
+        typedef T type;
+        typedef is_placeholder<T> is_le;
+    };
+};
+
+template<> struct lambda_impl< int_<1> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef typename l1::is_le is_le1;
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value
+            > is_le;
+
+        typedef bind1<
+              typename F::rebind
+            , typename l1::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<2> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value
+            > is_le;
+
+        typedef bind2<
+              typename F::rebind
+            , typename l1::type, typename l2::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<3> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value
+            > is_le;
+
+        typedef bind3<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<4> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value
+            > is_le;
+
+        typedef bind4<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<5> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        typedef lambda< typename F::arg5, Tag, false_ > l5;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        typedef typename l5::is_le is_le5;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value
+            > is_le;
+
+        typedef bind5<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type, typename l5::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+    , typename Protect
+    >
+struct lambda
+{
+    /// Metafunction forwarding confuses MSVC 6.x
+    typedef typename aux::template_arity<T>::type arity_;
+    typedef typename aux::lambda_impl<arity_>
+        ::template result_< T,Tag,Protect > l_;
+
+    typedef typename l_::type type;
+    typedef typename l_::is_le is_le;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect))
+};
+
+BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/less.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/less.hpp
new file mode 100644
index 0000000..4fe3cd1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/less.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less
+
+    : less_impl<
+          typename less_tag<N1>::type
+        , typename less_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp
new file mode 100644
index 0000000..ca2894f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_equal_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_equal_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less_equal
+
+    : less_equal_impl<
+          typename less_equal_tag<N1>::type
+        , typename less_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/list.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/list.hpp
new file mode 100644
index 0000000..4e8ad53
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/list.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct list;
+
+template<
+     
+    >
+struct list<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list0<  >
+{
+    typedef list0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct list<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list1<T0>
+{
+    typedef typename list1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct list<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list2< T0,T1 >
+{
+    typedef typename list2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct list<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list3< T0,T1,T2 >
+{
+    typedef typename list3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct list<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list4< T0,T1,T2,T3 >
+{
+    typedef typename list4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct list<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list5< T0,T1,T2,T3,T4 >
+{
+    typedef typename list5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : list15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : list16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : list17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : list18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : list19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct list
+    : list20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp
new file mode 100644
index 0000000..0b48a7f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct list_c;
+
+template<
+      typename T
+    >
+struct list_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list0_c<T>
+{
+    typedef typename list0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct list_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list1_c< T,C0 >
+{
+    typedef typename list1_c< T,C0 >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct list_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list2_c< T,C0,C1 >
+{
+    typedef typename list2_c< T,C0,C1 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct list_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list3_c< T,C0,C1,C2 >
+{
+    typedef typename list3_c< T,C0,C1,C2 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct list_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list4_c< T,C0,C1,C2,C3 >
+{
+    typedef typename list4_c< T,C0,C1,C2,C3 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list5_c< T,C0,C1,C2,C3,C4 >
+{
+    typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list6_c< T,C0,C1,C2,C3,C4,C5 >
+{
+    typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+{
+    typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+{
+    typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+{
+    typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+{
+    typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+{
+    typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+{
+    typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+{
+    typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list14_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        >
+{
+    typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list15_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        >
+{
+    typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list16_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15
+        >
+{
+    typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list17_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16
+        >
+{
+    typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : list18_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17
+        >
+{
+    typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : list19_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18
+        >
+{
+    typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct list_c
+    : list20_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, C19
+        >
+{
+    typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/map.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/map.hpp
new file mode 100644
index 0000000..837e013
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/map.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct map;
+
+template<
+     
+    >
+struct map<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map0<  >
+{
+    typedef map0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct map<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map1<T0>
+{
+    typedef typename map1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct map<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map2< T0,T1 >
+{
+    typedef typename map2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct map<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map3< T0,T1,T2 >
+{
+    typedef typename map3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct map<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map4< T0,T1,T2,T3 >
+{
+    typedef typename map4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct map<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map5< T0,T1,T2,T3,T4 >
+{
+    typedef typename map5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : map15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : map16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : map17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : map18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : map19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct map
+    : map20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/minus.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/minus.hpp
new file mode 100644
index 0000000..71d4913
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/minus.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/minus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct minus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct minus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct minus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct minus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct minus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct minus
+    : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , minus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct minus< N1,N2,N3,N4,na >
+
+    : minus< minus< minus< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct minus< N1,N2,N3,na,na >
+
+    : minus< minus< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct minus< N1,N2,na,na,na >
+    : minus_impl<
+          typename minus_tag<N1>::type
+        , typename minus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, minus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct minus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  - BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp
new file mode 100644
index 0000000..224b349
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp
@@ -0,0 +1,101 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/modulus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct modulus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct modulus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct modulus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct modulus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct modulus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct modulus
+
+    : modulus_impl<
+          typename modulus_tag<N1>::type
+        , typename modulus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct modulus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  % BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp
new file mode 100644
index 0000000..98b21b1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/not_equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct not_equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct not_equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct not_equal_to_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct not_equal_to_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct not_equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct not_equal_to
+
+    : not_equal_to_impl<
+          typename not_equal_to_tag<N1>::type
+        , typename not_equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct not_equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/or.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/or.hpp
new file mode 100644
index 0000000..31e1aaa
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/or.hpp
@@ -0,0 +1,69 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/or.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C_, typename T1, typename T2, typename T3, typename T4 >
+struct or_impl
+    : true_
+{
+};
+
+template< typename T1, typename T2, typename T3, typename T4 >
+struct or_impl< false,T1,T2,T3,T4 >
+    : or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4
+        , false_
+        >
+{
+};
+
+template<>
+struct or_impl<
+          false
+        , false_, false_, false_, false_
+        >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = false_, typename T4 = false_, typename T5 = false_
+    >
+struct or_
+
+    : aux::or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4, T5
+        >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , or_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , or_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp
new file mode 100644
index 0000000..ff97364
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp
@@ -0,0 +1,105 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright Peter Dimov 2001-2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/placeholders.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg< -1 > _;
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_;
+}
+
+}}
+
+/// agurt, 17/mar/02: one more placeholder for the last 'apply#' 
+/// specialization
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<1> _1;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<2> _2;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<3> _3;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<4> _4;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<5> _5;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<6> _6;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6;
+}
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/plus.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/plus.hpp
new file mode 100644
index 0000000..a9f6ee7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/plus.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/plus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct plus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct plus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct plus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct plus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct plus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct plus
+    : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , plus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct plus< N1,N2,N3,N4,na >
+
+    : plus< plus< plus< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct plus< N1,N2,N3,na,na >
+
+    : plus< plus< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct plus< N1,N2,na,na,na >
+    : plus_impl<
+          typename plus_tag<N1>::type
+        , typename plus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, plus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct plus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  + BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/quote.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/quote.hpp
new file mode 100644
index 0000000..d7d0420
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/quote.hpp
@@ -0,0 +1,123 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/quote.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template< typename T, bool has_type_ >
+struct quote_impl
+    : T
+{
+};
+
+template< typename T >
+struct quote_impl< T,false >
+{
+    typedef T type;
+};
+
+template<
+      template< typename P1 > class F
+    , typename Tag = void_
+    >
+struct quote1
+{
+    template< typename U1 > struct apply
+
+        : quote_impl<
+              F<U1>
+            , aux::has_type< F<U1> >::value
+            >
+
+    {
+    };
+};
+
+template<
+      template< typename P1, typename P2 > class F
+    , typename Tag = void_
+    >
+struct quote2
+{
+    template< typename U1, typename U2 > struct apply
+
+        : quote_impl<
+              F< U1,U2 >
+            , aux::has_type< F< U1,U2 > >::value
+            >
+
+    {
+    };
+};
+
+template<
+      template< typename P1, typename P2, typename P3 > class F
+    , typename Tag = void_
+    >
+struct quote3
+{
+    template< typename U1, typename U2, typename U3 > struct apply
+
+        : quote_impl<
+              F< U1,U2,U3 >
+            , aux::has_type< F< U1,U2,U3 > >::value
+            >
+
+    {
+    };
+};
+
+template<
+      template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename Tag = void_
+    >
+struct quote4
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4
+        >
+    struct apply
+
+        : quote_impl<
+              F< U1,U2,U3,U4 >
+            , aux::has_type< F< U1,U2,U3,U4 > >::value
+            >
+
+    {
+    };
+};
+
+template<
+      template<
+          typename P1, typename P2, typename P3, typename P4
+        , typename P5
+        >
+      class F
+    , typename Tag = void_
+    >
+struct quote5
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4
+        , typename U5
+        >
+    struct apply
+
+        : quote_impl<
+              F< U1,U2,U3,U4,U5 >
+            , aux::has_type< F< U1,U2,U3,U4,U5 > >::value
+            >
+
+    {
+    };
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp
new file mode 100644
index 0000000..c468684
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp
@@ -0,0 +1,231 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef fwd_state0 bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef fwd_state1 bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef fwd_state2 bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef fwd_state3 bkwd_state3;
+    typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef fwd_state4 bkwd_state4;
+    typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+    typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter4 iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef reverse_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , iter4
+        , Last
+        , fwd_state4
+        , BackwardOp
+        , ForwardOp
+        > nested_chunk;
+
+    typedef typename nested_chunk::state bkwd_state4;
+    typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+    typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef typename nested_chunk::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef reverse_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , typename deref<First>::type
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp
new file mode 100644
index 0000000..658f92a
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp
@@ -0,0 +1,231 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef fwd_state0 bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef fwd_state1 bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef fwd_state2 bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef fwd_state3 bkwd_state3;
+    typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef fwd_state4 bkwd_state4;
+    typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+    typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter4 iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef reverse_iter_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , iter4
+        , Last
+        , fwd_state4
+        , BackwardOp
+        , ForwardOp
+        > nested_chunk;
+
+    typedef typename nested_chunk::state bkwd_state4;
+    typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+    typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef typename nested_chunk::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef reverse_iter_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , First
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/set.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/set.hpp
new file mode 100644
index 0000000..5721922
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/set.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct set;
+
+template<
+     
+    >
+struct set<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set0<  >
+{
+    typedef set0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct set<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set1<T0>
+{
+    typedef typename set1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct set<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set2< T0,T1 >
+{
+    typedef typename set2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct set<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set3< T0,T1,T2 >
+{
+    typedef typename set3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct set<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set4< T0,T1,T2,T3 >
+{
+    typedef typename set4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct set<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set5< T0,T1,T2,T3,T4 >
+{
+    typedef typename set5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : set15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : set16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : set17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : set18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : set19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct set
+    : set20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/set_c.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/set_c.hpp
new file mode 100644
index 0000000..cbeb932
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/set_c.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct set_c;
+
+template<
+      typename T
+    >
+struct set_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set0_c<T>
+{
+    typedef typename set0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct set_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set1_c< T,C0 >
+{
+    typedef typename set1_c< T,C0 >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct set_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set2_c< T,C0,C1 >
+{
+    typedef typename set2_c< T,C0,C1 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct set_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set3_c< T,C0,C1,C2 >
+{
+    typedef typename set3_c< T,C0,C1,C2 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct set_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set4_c< T,C0,C1,C2,C3 >
+{
+    typedef typename set4_c< T,C0,C1,C2,C3 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set5_c< T,C0,C1,C2,C3,C4 >
+{
+    typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set6_c< T,C0,C1,C2,C3,C4,C5 >
+{
+    typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+{
+    typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+{
+    typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+{
+    typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+{
+    typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+{
+    typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+{
+    typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+{
+    typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set14_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        >
+{
+    typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set15_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        >
+{
+    typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set16_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15
+        >
+{
+    typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set17_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16
+        >
+{
+    typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : set18_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17
+        >
+{
+    typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : set19_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18
+        >
+{
+    typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct set_c
+    : set20_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, C19
+        >
+{
+    typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp
new file mode 100644
index 0000000..b5b181c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp
@@ -0,0 +1,99 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_left.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_left_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_left_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_left_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_left_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_left_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_left
+
+    : shift_left_impl<
+          typename shift_left_tag<N1>::type
+        , typename shift_left_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct shift_left_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  << BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp
new file mode 100644
index 0000000..f7a342e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp
@@ -0,0 +1,99 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_right.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_right_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_right_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_right_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_right_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_right_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_right
+
+    : shift_right_impl<
+          typename shift_right_tag<N1>::type
+        , typename shift_right_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct shift_right_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  >> BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp
new file mode 100644
index 0000000..a23fc23
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp
@@ -0,0 +1,11 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header
+// -- DO NOT modify by hand!
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/times.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/times.hpp
new file mode 100644
index 0000000..cb97cc4
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/times.hpp
@@ -0,0 +1,146 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/times.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct times_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct times_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct times_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct times_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct times_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct times
+    : times< times< times< times< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , times
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct times< N1,N2,N3,N4,na >
+
+    : times< times< times< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct times< N1,N2,N3,na,na >
+
+    : times< times< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct times< N1,N2,na,na,na >
+    : times_impl<
+          typename times_tag<N1>::type
+        , typename times_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, times)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct times_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  * BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp
new file mode 100644
index 0000000..2194ce9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/unpack_args.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< int size, typename F, typename Args >
+struct unpack_args_impl;
+
+template< typename F, typename Args >
+struct unpack_args_impl< 0,F,Args >
+    : apply0<
+          F
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 1,F,Args >
+    : apply1<
+          F
+        , typename at_c< Args,0 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 2,F,Args >
+    : apply2<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 3,F,Args >
+    : apply3<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 4,F,Args >
+    : apply4<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 5,F,Args >
+    : apply5<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+        , typename at_c< Args,4 >::type
+        >
+{
+};
+
+}
+
+template<
+      typename F
+    >
+struct unpack_args
+{
+    template< typename Args > struct apply
+
+        : aux::unpack_args_impl< size<Args>::value,F, Args >
+
+    {
+    };
+};
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/vector.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/vector.hpp
new file mode 100644
index 0000000..bfa9565
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/vector.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct vector;
+
+template<
+     
+    >
+struct vector<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector0<  >
+{
+    typedef vector0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct vector<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector1<T0>
+{
+    typedef typename vector1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct vector<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector2< T0,T1 >
+{
+    typedef typename vector2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct vector<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector3< T0,T1,T2 >
+{
+    typedef typename vector3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct vector<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector4< T0,T1,T2,T3 >
+{
+    typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct vector<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector5< T0,T1,T2,T3,T4 >
+{
+    typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : vector15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : vector16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : vector17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : vector18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : vector19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct vector
+    : vector20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp b/ext/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp
new file mode 100644
index 0000000..0f1560d
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp
@@ -0,0 +1,309 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct vector_c;
+
+template<
+      typename T
+    >
+struct vector_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector0_c<T>
+{
+    typedef typename vector0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct vector_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector1_c< T, T(C0) >
+{
+    typedef typename vector1_c< T, T(C0) >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct vector_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector2_c< T, T(C0), T(C1) >
+{
+    typedef typename vector2_c< T, T(C0), T(C1) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct vector_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector3_c< T, T(C0), T(C1), T(C2) >
+{
+    typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector4_c< T, T(C0), T(C1), T(C2), T(C3) >
+{
+    typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >
+{
+    typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >
+{
+    typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >
+{
+    typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >
+{
+    typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >
+{
+    typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >
+{
+    typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >
+{
+    typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >
+{
+    typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >
+{
+    typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >
+{
+    typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >
+{
+    typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >
+{
+    typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >
+{
+    typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >
+{
+    typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >
+{
+    typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct vector_c
+    : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >
+{
+    typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp
new file mode 100644
index 0000000..26de94c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_backward;
+template<>
+struct advance_backward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_backward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_backward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_backward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_backward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef typename prior<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_backward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_backward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_backward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp
new file mode 100644
index 0000000..b137cc7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_forward;
+template<>
+struct advance_forward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_forward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_forward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_forward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_forward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef typename next<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_forward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_forward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_forward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/and.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/and.hpp
new file mode 100644
index 0000000..555c800
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/and.hpp
@@ -0,0 +1,73 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/and.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< bool C_ > struct and_impl
+{
+    template<
+          typename T1, typename T2, typename T3, typename T4
+        >
+    struct result_
+        : false_
+    {
+    };
+};
+
+template<> struct and_impl<true>
+{
+    template<
+          typename T1, typename T2, typename T3, typename T4
+        >
+    struct result_
+        : and_impl<
+              BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+            >::template result_< T2,T3,T4,true_ >
+    {
+    };
+};
+
+template<>
+struct and_impl<true>
+    ::result_< true_,true_,true_,true_ >
+        : true_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = true_, typename T4 = true_, typename T5 = true_
+    >
+struct and_
+
+    : aux::and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        >::template result_< T2,T3,T4,T5 >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , and_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , and_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp
new file mode 100644
index 0000000..9838e79
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp
@@ -0,0 +1,268 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct apply0
+
+    : apply_wrap0<
+          typename lambda<F>::type
+       
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          1
+        , apply0
+        , (F )
+        )
+};
+
+namespace aux {
+
+template<>
+struct apply_chooser<0>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef apply0<
+              F
+            > type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename F, typename T1
+    >
+struct apply1
+
+    : apply_wrap1<
+          typename lambda<F>::type
+        , T1
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          2
+        , apply1
+        , (F, T1)
+        )
+};
+
+namespace aux {
+
+template<>
+struct apply_chooser<1>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef apply1<
+              F, T1
+            > type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2
+
+    : apply_wrap2<
+          typename lambda<F>::type
+        , T1, T2
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , apply2
+        , (F, T1, T2)
+        )
+};
+
+namespace aux {
+
+template<>
+struct apply_chooser<2>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef apply2<
+              F, T1, T2
+            > type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3
+
+    : apply_wrap3<
+          typename lambda<F>::type
+        , T1, T2, T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , apply3
+        , (F, T1, T2, T3)
+        )
+};
+
+namespace aux {
+
+template<>
+struct apply_chooser<3>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef apply3<
+              F, T1, T2, T3
+            > type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4
+
+    : apply_wrap4<
+          typename lambda<F>::type
+        , T1, T2, T3, T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , apply4
+        , (F, T1, T2, T3, T4)
+        )
+};
+
+namespace aux {
+
+template<>
+struct apply_chooser<4>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef apply4<
+              F, T1, T2, T3, T4
+            > type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5
+
+    : apply_wrap5<
+          typename lambda<F>::type
+        , T1, T2, T3, T4, T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          6
+        , apply5
+        , (F, T1, T2, T3, T4, T5)
+        )
+};
+
+namespace aux {
+
+template<>
+struct apply_chooser<5>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef apply5<
+              F, T1, T2, T3, T4, T5
+            > type;
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_apply_arg
+{
+    static bool const value  = true;
+};
+
+template<>
+struct is_apply_arg<na>
+{
+    static bool const value  = false;
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    >
+struct apply_count_args
+{
+    static int const value  = is_apply_arg<T1>::value + is_apply_arg<T2>::value + is_apply_arg<T3>::value + is_apply_arg<T4>::value + is_apply_arg<T5>::value;
+
+};
+
+}
+
+template<
+      typename F, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na
+    >
+struct apply
+    : aux::apply_chooser<
+          aux::apply_count_args< T1,T2,T3,T4,T5 >::value
+        >::template result_< F,T1,T2,T3,T4,T5 >::type
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp
new file mode 100644
index 0000000..7de6dad
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp
@@ -0,0 +1,50 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser;
+}
+
+template<
+      typename F
+    >
+struct apply0;
+
+template<
+      typename F, typename T1
+    >
+struct apply1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp
new file mode 100644
index 0000000..efa213d
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp
@@ -0,0 +1,78 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply_wrap.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+
+    , typename has_apply_ = typename aux::has_apply<F>::type
+
+    >
+struct apply_wrap0
+
+    : F::template apply<  >
+{
+};
+
+template<
+      typename F, typename T1
+
+    >
+struct apply_wrap1
+
+    : F::template apply<T1>
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+
+    >
+struct apply_wrap2
+
+    : F::template apply< T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+
+    >
+struct apply_wrap3
+
+    : F::template apply< T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+
+    >
+struct apply_wrap4
+
+    : F::template apply< T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+
+    >
+struct apply_wrap5
+
+    : F::template apply< T1,T2,T3,T4,T5 >
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp
new file mode 100644
index 0000000..6f2f8a8
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp
@@ -0,0 +1,123 @@
+
+// Copyright Peter Dimov 2001-2002
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/arg.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+template<> struct arg< -1 >
+{
+    BOOST_STATIC_CONSTANT(int, value  = -1);
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<1>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 1);
+    typedef arg<2> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<2>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 2);
+    typedef arg<3> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U2 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<3>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 3);
+    typedef arg<4> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U3 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<4>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 4);
+    typedef arg<5> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U4 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<5>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 5);
+    typedef arg<6> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U5 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg)
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp
new file mode 100644
index 0000000..254e5b8
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp
@@ -0,0 +1,486 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< bool >
+struct resolve_arg_impl
+{
+    template<
+          typename T, typename U1, typename U2, typename U3
+        , typename U4, typename U5
+        >
+    struct result_
+    {
+        typedef T type;
+    };
+};
+
+template<>
+struct resolve_arg_impl<true>
+{
+    template<
+          typename T, typename U1, typename U2, typename U3
+        , typename U4, typename U5
+        >
+    struct result_
+    {
+        typedef typename apply_wrap5<
+              T
+            , U1, U2, U3, U4, U5
+            >::type type;
+    };
+};
+
+template< typename T > struct is_bind_template;
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+    : resolve_arg_impl< is_bind_template<T>::value >
+            ::template result_< T,U1,U2,U3,U4,U5 >
+{
+};
+
+template< int arity_ > struct bind_chooser;
+
+aux::no_tag is_bind_helper(...);
+template< typename T > aux::no_tag is_bind_helper(protect<T>*);
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+aux::yes_tag is_bind_helper(bind< F,T1,T2,T3,T4,T5 >*);
+
+template< int N >
+aux::yes_tag is_bind_helper(arg<N>*);
+
+template< bool is_ref_  = true >
+struct is_bind_template_impl
+{
+    template< typename T > struct result_
+    {
+        BOOST_STATIC_CONSTANT(bool, value  = false);
+    };
+};
+
+template<>
+struct is_bind_template_impl<false>
+{
+    template< typename T > struct result_
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+              sizeof(aux::is_bind_helper(static_cast<T*>(0)))
+                == sizeof(aux::yes_tag)
+            );
+    };
+};
+
+template< typename T > struct is_bind_template
+    : is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
+        ::template result_<T>
+{
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F
+    >
+aux::yes_tag
+is_bind_helper(bind0<F>*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+namespace aux {
+
+template<>
+struct bind_chooser<0>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef bind0<F> type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1
+    >
+aux::yes_tag
+is_bind_helper(bind1< F,T1 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+namespace aux {
+
+template<>
+struct bind_chooser<1>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef bind1< F,T1 > type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2
+    >
+aux::yes_tag
+is_bind_helper(bind2< F,T1,T2 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+namespace aux {
+
+template<>
+struct bind_chooser<2>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef bind2< F,T1,T2 > type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+aux::yes_tag
+is_bind_helper(bind3< F,T1,T2,T3 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+namespace aux {
+
+template<>
+struct bind_chooser<3>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef bind3< F,T1,T2,T3 > type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+aux::yes_tag
+is_bind_helper(bind4< F,T1,T2,T3,T4 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+namespace aux {
+
+template<>
+struct bind_chooser<4>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef bind4< F,T1,T2,T3,T4 > type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+        typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
+
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+aux::yes_tag
+is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+
+namespace aux {
+
+template<>
+struct bind_chooser<5>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef bind5< F,T1,T2,T3,T4,T5 > type;
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_bind_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_bind_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    >
+struct bind_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_bind_arg<T1>::value + is_bind_arg<T2>::value 
+        + is_bind_arg<T3>::value + is_bind_arg<T4>::value 
+        + is_bind_arg<T5>::value
+        );
+
+};
+
+}
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind
+    : aux::bind_chooser<
+          aux::bind_count_args< T1,T2,T3,T4,T5 >::value
+        >::template result_< F,T1,T2,T3,T4,T5 >::type
+{
+};
+
+BOOST_MPL_AUX_ARITY_SPEC(
+      6
+    , bind
+    )
+
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(
+      6
+    , bind
+    )
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp
new file mode 100644
index 0000000..12062b4
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp
@@ -0,0 +1,590 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< bool >
+struct resolve_arg_impl
+{
+    template<
+          typename T, typename U1, typename U2, typename U3
+        , typename U4, typename U5
+        >
+    struct result_
+    {
+        typedef T type;
+    };
+};
+
+template<>
+struct resolve_arg_impl<true>
+{
+    template<
+          typename T, typename U1, typename U2, typename U3
+        , typename U4, typename U5
+        >
+    struct result_
+    {
+        typedef typename apply_wrap5<
+              T
+            , U1, U2, U3, U4, U5
+            >::type type;
+    };
+};
+
+template< typename T > struct is_bind_template;
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+    : resolve_arg_impl< is_bind_template<T>::value >
+            ::template result_< T,U1,U2,U3,U4,U5 >
+{
+};
+
+template< typename T >
+struct replace_unnamed_arg_impl
+{
+    template< typename Arg > struct result_
+    {
+        typedef Arg next;
+        typedef T type;
+    };
+};
+
+template<>
+struct replace_unnamed_arg_impl< arg< -1 > >
+{
+    template< typename Arg > struct result_
+    {
+        typedef typename next<Arg>::type next;
+        typedef Arg type;
+    };
+};
+
+template< typename T, typename Arg >
+struct replace_unnamed_arg
+    : replace_unnamed_arg_impl<T>::template result_<Arg>
+{
+};
+
+template< int arity_ > struct bind_chooser;
+
+aux::no_tag is_bind_helper(...);
+template< typename T > aux::no_tag is_bind_helper(protect<T>*);
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+aux::yes_tag is_bind_helper(bind< F,T1,T2,T3,T4,T5 >*);
+
+template< int N >
+aux::yes_tag is_bind_helper(arg<N>*);
+
+template< bool is_ref_  = true >
+struct is_bind_template_impl
+{
+    template< typename T > struct result_
+    {
+        BOOST_STATIC_CONSTANT(bool, value  = false);
+    };
+};
+
+template<>
+struct is_bind_template_impl<false>
+{
+    template< typename T > struct result_
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+              sizeof(aux::is_bind_helper(static_cast<T*>(0)))
+                == sizeof(aux::yes_tag)
+            );
+    };
+};
+
+template< typename T > struct is_bind_template
+    : is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
+        ::template result_<T>
+{
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F
+    >
+aux::yes_tag
+is_bind_helper(bind0<F>*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+namespace aux {
+
+template<>
+struct bind_chooser<0>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef bind0<F> type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1
+    >
+aux::yes_tag
+is_bind_helper(bind1< F,T1 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+namespace aux {
+
+template<>
+struct bind_chooser<1>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef bind1< F,T1 > type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2
+    >
+aux::yes_tag
+is_bind_helper(bind2< F,T1,T2 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+namespace aux {
+
+template<>
+struct bind_chooser<2>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef bind2< F,T1,T2 > type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+aux::yes_tag
+is_bind_helper(bind3< F,T1,T2,T3 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+namespace aux {
+
+template<>
+struct bind_chooser<3>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef bind3< F,T1,T2,T3 > type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+aux::yes_tag
+is_bind_helper(bind4< F,T1,T2,T3,T4 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+namespace aux {
+
+template<>
+struct bind_chooser<4>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef bind4< F,T1,T2,T3,T4 > type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+        typedef aux::replace_unnamed_arg< T5,n5 > r5;
+        typedef typename r5::type a5;
+        typedef typename r5::next n6;
+        typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5;
+        ///
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+aux::yes_tag
+is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*);
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+
+namespace aux {
+
+template<>
+struct bind_chooser<5>
+{
+    template<
+          typename F, typename T1, typename T2, typename T3, typename T4
+        , typename T5
+        >
+    struct result_
+    {
+        typedef bind5< F,T1,T2,T3,T4,T5 > type;
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_bind_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_bind_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    >
+struct bind_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_bind_arg<T1>::value + is_bind_arg<T2>::value 
+        + is_bind_arg<T3>::value + is_bind_arg<T4>::value 
+        + is_bind_arg<T5>::value
+        );
+
+};
+
+}
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind
+    : aux::bind_chooser<
+          aux::bind_count_args< T1,T2,T3,T4,T5 >::value
+        >::template result_< F,T1,T2,T3,T4,T5 >::type
+{
+};
+
+BOOST_MPL_AUX_ARITY_SPEC(
+      6
+    , bind
+    )
+
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(
+      6
+    , bind
+    )
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp
new file mode 100644
index 0000000..c4a5060
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp
@@ -0,0 +1,52 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bind_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na
+    >
+struct bind;
+
+template<
+      typename F
+    >
+struct bind0;
+
+template<
+      typename F, typename T1
+    >
+struct bind1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp
new file mode 100644
index 0000000..020d6ba
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp
@@ -0,0 +1,134 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitand.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitand_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitand_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitand_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitand_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitand_tag
+{
+    typedef typename T::tag type;
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct bitand_2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitand_
+
+    : if_<
+
+          is_na<N3>
+        , bitand_2< N1,N2 >
+        , bitand_<
+              bitand_2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct bitand_2
+    : bitand_impl<
+          typename bitand_tag<N1>::type
+        , typename bitand_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitand_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  & BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp
new file mode 100644
index 0000000..0474877
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp
@@ -0,0 +1,134 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitor_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitor_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitor_tag
+{
+    typedef typename T::tag type;
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct bitor_2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitor_
+
+    : if_<
+
+          is_na<N3>
+        , bitor_2< N1,N2 >
+        , bitor_<
+              bitor_2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct bitor_2
+    : bitor_impl<
+          typename bitor_tag<N1>::type
+        , typename bitor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  | BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp
new file mode 100644
index 0000000..42a9758
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp
@@ -0,0 +1,134 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitxor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitxor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitxor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitxor_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct bitxor_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitxor_tag
+{
+    typedef typename T::tag type;
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct bitxor_2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitxor_
+
+    : if_<
+
+          is_na<N3>
+        , bitxor_2< N1,N2 >
+        , bitxor_<
+              bitxor_2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct bitxor_2
+    : bitxor_impl<
+          typename bitxor_tag<N1>::type
+        , typename bitxor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitxor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp
new file mode 100644
index 0000000..a0445d9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp
@@ -0,0 +1,556 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/deque.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct deque_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct deque_chooser<0>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef vector0<
+             
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<1>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector1<
+              T0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<2>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector2<
+              T0, T1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<3>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector3<
+              T0, T1, T2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<4>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector4<
+              T0, T1, T2, T3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<5>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector5<
+              T0, T1, T2, T3, T4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<6>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector6<
+              T0, T1, T2, T3, T4, T5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<7>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector7<
+              T0, T1, T2, T3, T4, T5, T6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<8>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector8<
+              T0, T1, T2, T3, T4, T5, T6, T7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<9>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector9<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<10>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector10<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<11>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector11<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<12>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector12<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<13>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector13<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<14>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector14<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<15>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector15<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<16>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector16<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<17>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector17<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<18>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector18<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<19>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector19<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct deque_chooser<20>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector20<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_deque_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_deque_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename T6, typename T7, typename T8, typename T9, typename T10
+    , typename T11, typename T12, typename T13, typename T14, typename T15
+    , typename T16, typename T17, typename T18, typename T19, typename T20
+    >
+struct deque_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_deque_arg<T1>::value + is_deque_arg<T2>::value 
+        + is_deque_arg<T3>::value + is_deque_arg<T4>::value 
+        + is_deque_arg<T5>::value + is_deque_arg<T6>::value 
+        + is_deque_arg<T7>::value + is_deque_arg<T8>::value 
+        + is_deque_arg<T9>::value + is_deque_arg<T10>::value 
+        + is_deque_arg<T11>::value + is_deque_arg<T12>::value 
+        + is_deque_arg<T13>::value + is_deque_arg<T14>::value 
+        + is_deque_arg<T15>::value + is_deque_arg<T16>::value 
+        + is_deque_arg<T17>::value + is_deque_arg<T18>::value 
+        + is_deque_arg<T19>::value + is_deque_arg<T20>::value
+        );
+
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct deque_impl
+{
+    typedef aux::deque_count_args<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        > arg_num_;
+
+    typedef typename aux::deque_chooser< arg_num_::value >
+        ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct deque
+    : aux::deque_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type
+{
+    typedef typename aux::deque_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp
new file mode 100644
index 0000000..00636dc
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp
@@ -0,0 +1,133 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/divides.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct divides_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct divides_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct divides_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct divides_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct divides_tag
+{
+    typedef typename T::tag type;
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct divides2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct divides
+
+    : if_<
+
+          is_na<N3>
+        , divides2< N1,N2 >
+        , divides<
+              divides2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , divides
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct divides2
+    : divides_impl<
+          typename divides_tag<N1>::type
+        , typename divides_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, divides)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct divides_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  / BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp
new file mode 100644
index 0000000..b14cdda
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct equal_to_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct equal_to_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct equal_to
+
+    : equal_to_impl<
+          typename equal_to_tag<N1>::type
+        , typename equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value  == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp
new file mode 100644
index 0000000..58066d8
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp
@@ -0,0 +1,245 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl;
+
+template< int N >
+struct fold_chunk;
+
+template<> struct fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef state0 state;
+        typedef iter0 iterator;
+    };
+};
+
+template<> struct fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef state1 state;
+        typedef iter1 iterator;
+    };
+};
+
+template<> struct fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef state2 state;
+        typedef iter2 iterator;
+    };
+};
+
+template<> struct fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef state3 state;
+        typedef iter3 iterator;
+    };
+};
+
+template<> struct fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef state4 state;
+        typedef iter4 iterator;
+    };
+};
+
+template< int N >
+struct fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef fold_impl<
+              4
+            , First
+            , Last
+            , State
+            , ForwardOp
+            > chunk_;
+
+        typedef fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , typename chunk_::iterator
+            , Last
+            , typename chunk_::state
+            , ForwardOp
+            > res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , fold_null_step< Last,State >
+            , fold_step< First,Last,State,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_step
+{
+    typedef fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , ForwardOp
+        > chunk_;
+
+    typedef typename chunk_::state state;
+    typedef typename chunk_::iterator iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl
+    : fold_chunk<N>
+        ::template result_< First,Last,State,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp
new file mode 100644
index 0000000..bf81873
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp
@@ -0,0 +1,554 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+   
+    >
+struct lambda
+{
+    typedef false_ is_le;
+    typedef T result_;
+    typedef T type;
+};
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+template< int N, typename Tag >
+struct lambda< arg<N>, Tag >
+{
+    typedef true_ is_le;
+    typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41
+    typedef mpl::protect<result_> type;
+};
+
+template<
+      typename F
+    , typename Tag
+    >
+struct lambda<
+          bind0<F>
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind0<
+          F
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1
+{
+    typedef F<
+          typename L1::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1< true_,Tag,F,L1 >
+{
+    typedef bind1<
+          quote1< F,Tag >
+        , typename L1::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1 > class F
+    , typename T1
+    , typename Tag
+    >
+struct lambda<
+          F<T1>
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef typename l1::is_le is_le1;
+    typedef typename aux::lambda_or<
+          is_le1::value
+        >::type is_le;
+
+    typedef aux::le_result1<
+          is_le, Tag, F, l1
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1
+    , typename Tag
+    >
+struct lambda<
+          bind1< F,T1 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind1<
+          F
+        , T1
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2
+{
+    typedef F<
+          typename L1::type, typename L2::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2< true_,Tag,F,L1,L2 >
+{
+    typedef bind2<
+          quote2< F,Tag >
+        , typename L1::result_, typename L2::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2 > class F
+    , typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value
+        >::type is_le;
+
+    typedef aux::le_result2<
+          is_le, Tag, F, l1, l2
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          bind2< F,T1,T2 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind2<
+          F
+        , T1, T2
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3< true_,Tag,F,L1,L2,L3 >
+{
+    typedef bind3<
+          quote3< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3 > class F
+    , typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value
+        >::type is_le;
+
+    typedef aux::le_result3<
+          is_le, Tag, F, l1, l2, l3
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          bind3< F,T1,T2,T3 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind3<
+          F
+        , T1, T2, T3
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4< true_,Tag,F,L1,L2,L3,L4 >
+{
+    typedef bind4<
+          quote4< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        >::type is_le;
+
+    typedef aux::le_result4<
+          is_le, Tag, F, l1, l2, l3, l4
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          bind4< F,T1,T2,T3,T4 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind4<
+          F
+        , T1, T2, T3, T4
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type, typename L5::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 >
+{
+    typedef bind5<
+          quote5< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_, typename L5::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template<
+          typename P1, typename P2, typename P3, typename P4
+        , typename P5
+        >
+      class F
+    , typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    typedef lambda< T5,Tag > l5;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    typedef typename l5::is_le is_le5;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        , is_le5::value
+        >::type is_le;
+
+    typedef aux::le_result5<
+          is_le, Tag, F, l1, l2, l3, l4, l5
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind5< F,T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind5<
+          F
+        , T1, T2, T3, T4, T5
+        > result_;
+
+    typedef result_ type;
+};
+
+/// special case for 'protect'
+template< typename T, typename Tag >
+struct lambda< mpl::protect<T>, Tag >
+{
+    typedef false_ is_le;
+    typedef mpl::protect<T> result_;
+    typedef result_ type;
+};
+
+/// specializations for the main 'bind' form
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind< F,T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind< F,T1,T2,T3,T4,T5 > result_;
+    typedef result_ type;
+};
+
+/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars
+
+template<
+      typename F, typename Tag1, typename Tag2
+    >
+struct lambda<
+          lambda< F,Tag1 >
+        , Tag2
+        >
+{
+    typedef lambda< F,Tag2 > l1;
+    typedef lambda< Tag1,Tag2 > l2;
+    typedef typename l1::is_le is_le;
+    typedef aux::le_result2<is_le, Tag2, mpl::lambda, l1, l2> le_result_;
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, lambda)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp
new file mode 100644
index 0000000..6fdf8ba
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct greater_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct greater_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater
+
+    : greater_impl<
+          typename greater_tag<N1>::type
+        , typename greater_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp
new file mode 100644
index 0000000..f848eef
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct greater_equal_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct greater_equal_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater_equal
+
+    : greater_equal_impl<
+          typename greater_equal_tag<N1>::type
+        , typename greater_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp
new file mode 100644
index 0000000..233a1ec
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp
@@ -0,0 +1,166 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/inherit.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C1, bool C2 >
+struct inherit2_impl
+{
+    template< typename Derived, typename T1, typename T2 > struct result_
+        : T1, T2
+    {
+        typedef Derived type_;
+    };
+};
+
+template<>
+struct inherit2_impl< false,true >
+{
+    template< typename Derived, typename T1, typename T2 > struct result_
+        : T1
+    {
+        typedef T1 type_;
+    };
+};
+
+template<>
+struct inherit2_impl< true,false >
+{
+    template< typename Derived, typename T1, typename T2 > struct result_
+        : T2
+    {
+        typedef T2 type_;
+    };
+};
+
+template<>
+struct inherit2_impl< true,true >
+{
+    template< typename Derived, typename T1, typename T2 > struct result_
+    {
+        typedef T1 type_;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    >
+struct inherit2
+    : aux::inherit2_impl<
+          is_empty_base<T1>::value
+        , is_empty_base<T2>::value
+        >::template result_< inherit2< T1,T2 >,T1, T2 >
+{
+    typedef typename inherit2::type_ type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, inherit2)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na
+    >
+struct inherit3
+    : inherit2<
+          typename inherit2<
+              T1, T2
+            >::type
+        , T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , inherit3
+        , ( T1, T2, T3)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, inherit3)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    >
+struct inherit4
+    : inherit2<
+          typename inherit3<
+              T1, T2, T3
+            >::type
+        , T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , inherit4
+        , ( T1, T2, T3, T4)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(4, inherit4)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    , typename T5 = na
+    >
+struct inherit5
+    : inherit2<
+          typename inherit4<
+              T1, T2, T3, T4
+            >::type
+        , T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , inherit5
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(5, inherit5)
+
+/// primary template
+
+template<
+      typename T1 = empty_base, typename T2 = empty_base
+    , typename T3 = empty_base, typename T4 = empty_base
+    , typename T5 = empty_base
+    >
+struct inherit
+    : inherit5< T1,T2,T3,T4,T5 >
+{
+};
+
+template<>
+struct inherit< na,na,na,na,na >
+{
+    template<
+
+          typename T1 = empty_base, typename T2 = empty_base
+        , typename T3 = empty_base, typename T4 = empty_base
+        , typename T5 = empty_base
+
+        >
+    struct apply
+        : inherit< T1,T2,T3,T4,T5 >
+    {
+    };
+};
+
+BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp
new file mode 100644
index 0000000..6951795
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp
@@ -0,0 +1,133 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright David Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename Iterator, typename State >
+struct iter_fold_if_null_step
+{
+    typedef State state;
+    typedef Iterator iterator;
+};
+
+template< bool >
+struct iter_fold_if_step_impl
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef typename apply2< StateOp,State,Iterator >::type state;
+        typedef typename IteratorOp::type iterator;
+    };
+};
+
+template<>
+struct iter_fold_if_step_impl<false>
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef State state;
+        typedef Iterator iterator;
+    };
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_forward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename BackwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_backward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename ForwardPredicate
+    , typename BackwardOp
+    , typename BackwardPredicate
+    >
+struct iter_fold_if_impl
+{
+ private:
+    typedef iter_fold_if_null_step< Iterator,State > forward_step0;
+    typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1;
+    typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2;
+    typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3;
+    typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4;
+    
+
+    typedef typename if_<
+          typename forward_step4::not_last
+        , iter_fold_if_impl<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            , ForwardOp
+            , ForwardPredicate
+            , BackwardOp
+            , BackwardPredicate
+            >
+        , iter_fold_if_null_step<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            >
+        >::type backward_step4;
+
+    typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3;
+    typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2;
+    typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1;
+    typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0;
+    
+
+ public:
+    typedef typename backward_step0::state state;
+    typedef typename backward_step4::iterator iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp
new file mode 100644
index 0000000..50ea754
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp
@@ -0,0 +1,245 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl;
+
+template< int N >
+struct iter_fold_chunk;
+
+template<> struct iter_fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef state0 state;
+        typedef iter0 iterator;
+    };
+};
+
+template<> struct iter_fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef state1 state;
+        typedef iter1 iterator;
+    };
+};
+
+template<> struct iter_fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef state2 state;
+        typedef iter2 iterator;
+    };
+};
+
+template<> struct iter_fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef state3 state;
+        typedef iter3 iterator;
+    };
+};
+
+template<> struct iter_fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State state0;
+        typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef state4 state;
+        typedef iter4 iterator;
+    };
+};
+
+template< int N >
+struct iter_fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef iter_fold_impl<
+              4
+            , First
+            , Last
+            , State
+            , ForwardOp
+            > chunk_;
+
+        typedef iter_fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , typename chunk_::iterator
+            , Last
+            , typename chunk_::state
+            , ForwardOp
+            > res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct iter_fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct iter_fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , iter_fold_null_step< Last,State >
+            , iter_fold_step< First,Last,State,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_step
+{
+    typedef iter_fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , ForwardOp
+        > chunk_;
+
+    typedef typename chunk_::state state;
+    typedef typename chunk_::iterator iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl
+    : iter_fold_chunk<N>
+        ::template result_< First,Last,State,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp
new file mode 100644
index 0000000..890a198
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp
@@ -0,0 +1,229 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+template< typename Arity > struct lambda_impl
+{
+    template< typename T, typename Tag, typename Protect > struct result_
+    {
+        typedef T type;
+        typedef is_placeholder<T> is_le;
+    };
+};
+
+template<> struct lambda_impl< int_<1> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef typename l1::is_le is_le1;
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value
+            > is_le;
+
+        typedef bind1<
+              typename F::rebind
+            , typename l1::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<2> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value
+            > is_le;
+
+        typedef bind2<
+              typename F::rebind
+            , typename l1::type, typename l2::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<3> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value
+            > is_le;
+
+        typedef bind3<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<4> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value
+            > is_le;
+
+        typedef bind4<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<5> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        typedef lambda< typename F::arg5, Tag, false_ > l5;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        typedef typename l5::is_le is_le5;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value
+            > is_le;
+
+        typedef bind5<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type, typename l5::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+    , typename Protect
+    >
+struct lambda
+{
+    /// Metafunction forwarding confuses MSVC 6.x
+    typedef typename aux::template_arity<T>::type arity_;
+    typedef typename aux::lambda_impl<arity_>
+        ::template result_< T,Tag,Protect > l_;
+
+    typedef typename l_::type type;
+    typedef typename l_::is_le is_le;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect))
+};
+
+BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/less.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/less.hpp
new file mode 100644
index 0000000..7fb35e1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/less.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct less_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct less_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less
+
+    : less_impl<
+          typename less_tag<N1>::type
+        , typename less_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp
new file mode 100644
index 0000000..206ecdc
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct less_equal_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct less_equal_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less_equal
+
+    : less_equal_impl<
+          typename less_equal_tag<N1>::type
+        , typename less_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/list.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/list.hpp
new file mode 100644
index 0000000..e5ea456
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/list.hpp
@@ -0,0 +1,556 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct list_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct list_chooser<0>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef list0<
+             
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<1>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list1<
+              T0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<2>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list2<
+              T0, T1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<3>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list3<
+              T0, T1, T2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<4>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list4<
+              T0, T1, T2, T3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<5>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list5<
+              T0, T1, T2, T3, T4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<6>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list6<
+              T0, T1, T2, T3, T4, T5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<7>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list7<
+              T0, T1, T2, T3, T4, T5, T6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<8>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list8<
+              T0, T1, T2, T3, T4, T5, T6, T7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<9>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list9<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<10>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list10<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<11>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list11<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<12>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list12<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<13>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list13<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<14>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list14<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<15>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list15<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<16>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list16<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<17>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list17<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<18>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list18<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<19>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list19<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_chooser<20>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename list20<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_list_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_list_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename T6, typename T7, typename T8, typename T9, typename T10
+    , typename T11, typename T12, typename T13, typename T14, typename T15
+    , typename T16, typename T17, typename T18, typename T19, typename T20
+    >
+struct list_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_list_arg<T1>::value + is_list_arg<T2>::value 
+        + is_list_arg<T3>::value + is_list_arg<T4>::value 
+        + is_list_arg<T5>::value + is_list_arg<T6>::value 
+        + is_list_arg<T7>::value + is_list_arg<T8>::value 
+        + is_list_arg<T9>::value + is_list_arg<T10>::value 
+        + is_list_arg<T11>::value + is_list_arg<T12>::value 
+        + is_list_arg<T13>::value + is_list_arg<T14>::value 
+        + is_list_arg<T15>::value + is_list_arg<T16>::value 
+        + is_list_arg<T17>::value + is_list_arg<T18>::value 
+        + is_list_arg<T19>::value + is_list_arg<T20>::value
+        );
+
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct list_impl
+{
+    typedef aux::list_count_args<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        > arg_num_;
+
+    typedef typename aux::list_chooser< arg_num_::value >
+        ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct list
+    : aux::list_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type
+{
+    typedef typename aux::list_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp
new file mode 100644
index 0000000..ab25482
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp
@@ -0,0 +1,534 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct list_c_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct list_c_chooser<0>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list0_c<
+              T
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<1>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list1_c<
+              T, C0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<2>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list2_c<
+              T, C0, C1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<3>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list3_c<
+              T, C0, C1, C2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<4>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list4_c<
+              T, C0, C1, C2, C3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<5>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list5_c<
+              T, C0, C1, C2, C3, C4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<6>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list6_c<
+              T, C0, C1, C2, C3, C4, C5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<7>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list7_c<
+              T, C0, C1, C2, C3, C4, C5, C6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<8>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list8_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<9>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list9_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<10>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list10_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<11>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list11_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<12>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list12_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<13>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list13_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<14>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list14_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<15>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list15_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<16>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list16_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<17>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list17_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<18>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list18_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<19>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list19_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct list_c_chooser<20>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename list20_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< long C >
+struct is_list_c_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_list_c_arg<LONG_MAX>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8
+    , long C9, long C10, long C11, long C12, long C13, long C14, long C15
+    , long C16, long C17, long C18, long C19, long C20
+    >
+struct list_c_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_list_c_arg<C1>::value + is_list_c_arg<C2>::value 
+        + is_list_c_arg<C3>::value + is_list_c_arg<C4>::value 
+        + is_list_c_arg<C5>::value + is_list_c_arg<C6>::value 
+        + is_list_c_arg<C7>::value + is_list_c_arg<C8>::value 
+        + is_list_c_arg<C9>::value + is_list_c_arg<C10>::value 
+        + is_list_c_arg<C11>::value + is_list_c_arg<C12>::value 
+        + is_list_c_arg<C13>::value + is_list_c_arg<C14>::value 
+        + is_list_c_arg<C15>::value + is_list_c_arg<C16>::value 
+        + is_list_c_arg<C17>::value + is_list_c_arg<C18>::value 
+        + is_list_c_arg<C19>::value + is_list_c_arg<C20>::value
+        );
+
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct list_c_impl
+{
+    typedef aux::list_c_count_args<
+          C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        > arg_num_;
+
+    typedef typename aux::list_c_chooser< arg_num_::value >
+        ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct list_c
+    : aux::list_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type
+{
+    typedef typename aux::list_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/map.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/map.hpp
new file mode 100644
index 0000000..970e0b7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/map.hpp
@@ -0,0 +1,556 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct map_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct map_chooser<0>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef map0<
+             
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<1>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map1<
+              T0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<2>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map2<
+              T0, T1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<3>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map3<
+              T0, T1, T2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<4>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map4<
+              T0, T1, T2, T3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<5>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map5<
+              T0, T1, T2, T3, T4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<6>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map6<
+              T0, T1, T2, T3, T4, T5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<7>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map7<
+              T0, T1, T2, T3, T4, T5, T6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<8>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map8<
+              T0, T1, T2, T3, T4, T5, T6, T7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<9>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map9<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<10>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map10<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<11>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map11<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<12>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map12<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<13>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map13<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<14>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map14<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<15>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map15<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<16>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map16<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<17>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map17<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<18>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map18<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<19>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map19<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct map_chooser<20>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename map20<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_map_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_map_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename T6, typename T7, typename T8, typename T9, typename T10
+    , typename T11, typename T12, typename T13, typename T14, typename T15
+    , typename T16, typename T17, typename T18, typename T19, typename T20
+    >
+struct map_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_map_arg<T1>::value + is_map_arg<T2>::value 
+        + is_map_arg<T3>::value + is_map_arg<T4>::value 
+        + is_map_arg<T5>::value + is_map_arg<T6>::value 
+        + is_map_arg<T7>::value + is_map_arg<T8>::value 
+        + is_map_arg<T9>::value + is_map_arg<T10>::value 
+        + is_map_arg<T11>::value + is_map_arg<T12>::value 
+        + is_map_arg<T13>::value + is_map_arg<T14>::value 
+        + is_map_arg<T15>::value + is_map_arg<T16>::value 
+        + is_map_arg<T17>::value + is_map_arg<T18>::value 
+        + is_map_arg<T19>::value + is_map_arg<T20>::value
+        );
+
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct map_impl
+{
+    typedef aux::map_count_args<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        > arg_num_;
+
+    typedef typename aux::map_chooser< arg_num_::value >
+        ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct map
+    : aux::map_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type
+{
+    typedef typename aux::map_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp
new file mode 100644
index 0000000..7b49450
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp
@@ -0,0 +1,133 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/minus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct minus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct minus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct minus_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct minus_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct minus_tag
+{
+    typedef typename T::tag type;
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct minus2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct minus
+
+    : if_<
+
+          is_na<N3>
+        , minus2< N1,N2 >
+        , minus<
+              minus2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , minus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct minus2
+    : minus_impl<
+          typename minus_tag<N1>::type
+        , typename minus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, minus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct minus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  - BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp
new file mode 100644
index 0000000..8badbab
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp
@@ -0,0 +1,101 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/modulus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct modulus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct modulus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct modulus_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct modulus_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct modulus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct modulus
+
+    : modulus_impl<
+          typename modulus_tag<N1>::type
+        , typename modulus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct modulus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  % BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp
new file mode 100644
index 0000000..d87d8cd
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/not_equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct not_equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct not_equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct not_equal_to_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct not_equal_to_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct not_equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct not_equal_to
+
+    : not_equal_to_impl<
+          typename not_equal_to_tag<N1>::type
+        , typename not_equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct not_equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/or.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/or.hpp
new file mode 100644
index 0000000..3f7394e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/or.hpp
@@ -0,0 +1,73 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/or.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< bool C_ > struct or_impl
+{
+    template<
+          typename T1, typename T2, typename T3, typename T4
+        >
+    struct result_
+        : true_
+    {
+    };
+};
+
+template<> struct or_impl<false>
+{
+    template<
+          typename T1, typename T2, typename T3, typename T4
+        >
+    struct result_
+        : or_impl<
+              BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+            >::template result_< T2,T3,T4,false_ >
+    {
+    };
+};
+
+template<>
+struct or_impl<false>
+    ::result_< false_,false_,false_,false_ >
+        : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = false_, typename T4 = false_, typename T5 = false_
+    >
+struct or_
+
+    : aux::or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        >::template result_< T2,T3,T4,T5 >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , or_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , or_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp
new file mode 100644
index 0000000..ff97364
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp
@@ -0,0 +1,105 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright Peter Dimov 2001-2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/placeholders.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg< -1 > _;
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_;
+}
+
+}}
+
+/// agurt, 17/mar/02: one more placeholder for the last 'apply#' 
+/// specialization
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<1> _1;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<2> _2;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<3> _3;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<4> _4;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<5> _5;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<6> _6;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6;
+}
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp
new file mode 100644
index 0000000..a55b24c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp
@@ -0,0 +1,133 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/plus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct plus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct plus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct plus_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct plus_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct plus_tag
+{
+    typedef typename T::tag type;
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct plus2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct plus
+
+    : if_<
+
+          is_na<N3>
+        , plus2< N1,N2 >
+        , plus<
+              plus2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , plus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct plus2
+    : plus_impl<
+          typename plus_tag<N1>::type
+        , typename plus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, plus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct plus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  + BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp
new file mode 100644
index 0000000..b85880f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp
@@ -0,0 +1,116 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/quote.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+template< bool > struct quote_impl
+{
+    template< typename T > struct result_
+        : T
+    {
+    };
+};
+
+template<> struct quote_impl<false>
+{
+    template< typename T > struct result_
+    {
+        typedef T type;
+    };
+};
+
+template<
+      template< typename P1 > class F
+    , typename Tag = void_
+    >
+struct quote1
+{
+    template< typename U1 > struct apply
+
+        : quote_impl< aux::has_type< F<U1> >::value >
+            ::template result_< F<U1> >
+
+    {
+    };
+};
+
+template<
+      template< typename P1, typename P2 > class F
+    , typename Tag = void_
+    >
+struct quote2
+{
+    template< typename U1, typename U2 > struct apply
+
+        : quote_impl< aux::has_type< F< U1,U2 > >::value >
+            ::template result_< F< U1,U2 > >
+
+    {
+    };
+};
+
+template<
+      template< typename P1, typename P2, typename P3 > class F
+    , typename Tag = void_
+    >
+struct quote3
+{
+    template< typename U1, typename U2, typename U3 > struct apply
+
+        : quote_impl< aux::has_type< F< U1,U2,U3 > >::value >
+            ::template result_< F< U1,U2,U3 > >
+
+    {
+    };
+};
+
+template<
+      template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename Tag = void_
+    >
+struct quote4
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4
+        >
+    struct apply
+
+        : quote_impl< aux::has_type< F< U1,U2,U3,U4 > >::value >
+            ::template result_< F< U1,U2,U3,U4 > >
+
+    {
+    };
+};
+
+template<
+      template<
+          typename P1, typename P2, typename P3, typename P4
+        , typename P5
+        >
+      class F
+    , typename Tag = void_
+    >
+struct quote5
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4
+        , typename U5
+        >
+    struct apply
+
+        : quote_impl< aux::has_type< F< U1,U2,U3,U4,U5 > >::value >
+            ::template result_< F< U1,U2,U3,U4,U5 > >
+
+    {
+    };
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp
new file mode 100644
index 0000000..7a07414
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp
@@ -0,0 +1,295 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl;
+
+template< long N >
+struct reverse_fold_chunk;
+
+template<> struct reverse_fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef fwd_state0 bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter0 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef fwd_state1 bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter1 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef fwd_state2 bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter2 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef fwd_state3 bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter3 iterator;
+    };
+};
+
+template<> struct reverse_fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef fwd_state4 bkwd_state4;
+        typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter4 iterator;
+    };
+};
+
+template< long N >
+struct reverse_fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef reverse_fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , iter4
+            , Last
+            , fwd_state4
+            , BackwardOp
+            , ForwardOp
+            > nested_chunk;
+
+        typedef typename nested_chunk::state bkwd_state4;
+        typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+        typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+        typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+        typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef typename nested_chunk::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct reverse_fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct reverse_fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , reverse_fold_null_step< Last,State >
+            , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_step
+{
+    typedef reverse_fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , typename deref<First>::type
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl
+    : reverse_fold_chunk<N>
+        ::template result_< First,Last,State,BackwardOp,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp
new file mode 100644
index 0000000..39a4057
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp
@@ -0,0 +1,295 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl;
+
+template< long N >
+struct reverse_iter_fold_chunk;
+
+template<> struct reverse_iter_fold_chunk<0>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef fwd_state0 bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter0 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        
+
+        typedef fwd_state1 bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        typedef bkwd_state0 state;
+        typedef iter1 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<2>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        
+
+        typedef fwd_state2 bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter2 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<3>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        
+
+        typedef fwd_state3 bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter3 iterator;
+    };
+};
+
+template<> struct reverse_iter_fold_chunk<4>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef fwd_state4 bkwd_state4;
+        typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef iter4 iterator;
+    };
+};
+
+template< long N >
+struct reverse_iter_fold_chunk
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+        typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+        typedef typename mpl::next<iter0>::type iter1;
+        typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+        typedef typename mpl::next<iter1>::type iter2;
+        typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+        typedef typename mpl::next<iter2>::type iter3;
+        typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+        typedef typename mpl::next<iter3>::type iter4;
+        
+
+        typedef reverse_iter_fold_impl<
+              ( (N - 4) < 0 ? 0 : N - 4 )
+            , iter4
+            , Last
+            , fwd_state4
+            , BackwardOp
+            , ForwardOp
+            > nested_chunk;
+
+        typedef typename nested_chunk::state bkwd_state4;
+        typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+        typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+        typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+        typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+        
+
+        typedef bkwd_state0 state;
+        typedef typename nested_chunk::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_step;
+
+template<
+      typename Last
+    , typename State
+    >
+struct reverse_iter_fold_null_step
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<>
+struct reverse_iter_fold_chunk< -1 >
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same< First,Last >::type
+            , reverse_iter_fold_null_step< Last,State >
+            , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp >
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_step
+{
+    typedef reverse_iter_fold_chunk< -1 >::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , First
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl
+    : reverse_iter_fold_chunk<N>
+        ::template result_< First,Last,State,BackwardOp,ForwardOp >
+{
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/set.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/set.hpp
new file mode 100644
index 0000000..95aaa5c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/set.hpp
@@ -0,0 +1,556 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct set_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct set_chooser<0>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef set0<
+             
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<1>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set1<
+              T0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<2>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set2<
+              T0, T1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<3>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set3<
+              T0, T1, T2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<4>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set4<
+              T0, T1, T2, T3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<5>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set5<
+              T0, T1, T2, T3, T4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<6>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set6<
+              T0, T1, T2, T3, T4, T5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<7>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set7<
+              T0, T1, T2, T3, T4, T5, T6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<8>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set8<
+              T0, T1, T2, T3, T4, T5, T6, T7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<9>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set9<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<10>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set10<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<11>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set11<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<12>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set12<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<13>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set13<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<14>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set14<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<15>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set15<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<16>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set16<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<17>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set17<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<18>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set18<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<19>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set19<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_chooser<20>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename set20<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_set_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_set_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename T6, typename T7, typename T8, typename T9, typename T10
+    , typename T11, typename T12, typename T13, typename T14, typename T15
+    , typename T16, typename T17, typename T18, typename T19, typename T20
+    >
+struct set_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_set_arg<T1>::value + is_set_arg<T2>::value 
+        + is_set_arg<T3>::value + is_set_arg<T4>::value 
+        + is_set_arg<T5>::value + is_set_arg<T6>::value 
+        + is_set_arg<T7>::value + is_set_arg<T8>::value 
+        + is_set_arg<T9>::value + is_set_arg<T10>::value 
+        + is_set_arg<T11>::value + is_set_arg<T12>::value 
+        + is_set_arg<T13>::value + is_set_arg<T14>::value 
+        + is_set_arg<T15>::value + is_set_arg<T16>::value 
+        + is_set_arg<T17>::value + is_set_arg<T18>::value 
+        + is_set_arg<T19>::value + is_set_arg<T20>::value
+        );
+
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct set_impl
+{
+    typedef aux::set_count_args<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        > arg_num_;
+
+    typedef typename aux::set_chooser< arg_num_::value >
+        ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct set
+    : aux::set_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type
+{
+    typedef typename aux::set_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp
new file mode 100644
index 0000000..1ff34f9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp
@@ -0,0 +1,534 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct set_c_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct set_c_chooser<0>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set0_c<
+              T
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<1>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set1_c<
+              T, C0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<2>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set2_c<
+              T, C0, C1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<3>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set3_c<
+              T, C0, C1, C2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<4>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set4_c<
+              T, C0, C1, C2, C3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<5>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set5_c<
+              T, C0, C1, C2, C3, C4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<6>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set6_c<
+              T, C0, C1, C2, C3, C4, C5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<7>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set7_c<
+              T, C0, C1, C2, C3, C4, C5, C6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<8>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set8_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<9>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set9_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<10>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set10_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<11>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set11_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<12>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set12_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<13>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set13_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<14>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set14_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<15>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set15_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<16>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set16_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<17>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set17_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<18>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set18_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<19>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set19_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct set_c_chooser<20>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename set20_c<
+              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< long C >
+struct is_set_c_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_set_c_arg<LONG_MAX>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8
+    , long C9, long C10, long C11, long C12, long C13, long C14, long C15
+    , long C16, long C17, long C18, long C19, long C20
+    >
+struct set_c_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_set_c_arg<C1>::value + is_set_c_arg<C2>::value 
+        + is_set_c_arg<C3>::value + is_set_c_arg<C4>::value 
+        + is_set_c_arg<C5>::value + is_set_c_arg<C6>::value 
+        + is_set_c_arg<C7>::value + is_set_c_arg<C8>::value 
+        + is_set_c_arg<C9>::value + is_set_c_arg<C10>::value 
+        + is_set_c_arg<C11>::value + is_set_c_arg<C12>::value 
+        + is_set_c_arg<C13>::value + is_set_c_arg<C14>::value 
+        + is_set_c_arg<C15>::value + is_set_c_arg<C16>::value 
+        + is_set_c_arg<C17>::value + is_set_c_arg<C18>::value 
+        + is_set_c_arg<C19>::value + is_set_c_arg<C20>::value
+        );
+
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct set_c_impl
+{
+    typedef aux::set_c_count_args<
+          C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        > arg_num_;
+
+    typedef typename aux::set_c_chooser< arg_num_::value >
+        ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct set_c
+    : aux::set_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type
+{
+    typedef typename aux::set_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp
new file mode 100644
index 0000000..d14a5e4
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp
@@ -0,0 +1,99 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_left.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_left_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_left_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct shift_left_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct shift_left_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_left_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_left
+
+    : shift_left_impl<
+          typename shift_left_tag<N1>::type
+        , typename shift_left_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct shift_left_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  << BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp
new file mode 100644
index 0000000..08c4915
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp
@@ -0,0 +1,99 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_right.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_right_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_right_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct shift_right_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct shift_right_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_right_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_right
+
+    : shift_right_impl<
+          typename shift_right_tag<N1>::type
+        , typename shift_right_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct shift_right_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  >> BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp
new file mode 100644
index 0000000..1164f0f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp
@@ -0,0 +1,40 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< bool >
+struct template_arity_impl
+{
+    template< typename F > struct result_
+        : mpl::int_< -1 >
+    {
+    };
+};
+
+template<>
+struct template_arity_impl<true>
+{
+    template< typename F > struct result_
+        : F::arity
+    {
+    };
+};
+
+template< typename F >
+struct template_arity
+    : template_arity_impl< ::boost::mpl::aux::has_rebind<F>::value >
+        ::template result_<F>
+{
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/times.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/times.hpp
new file mode 100644
index 0000000..fd773cc
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/times.hpp
@@ -0,0 +1,133 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/times.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct times_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct times_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct times_impl< na,integral_c_tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template<> struct times_impl< integral_c_tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct times_tag
+{
+    typedef typename T::tag type;
+};
+
+/// forward declaration
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct times2;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct times
+
+    : if_<
+
+          is_na<N3>
+        , times2< N1,N2 >
+        , times<
+              times2< N1,N2 >
+            , N3, N4, N5
+            >
+        >::type
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , times
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1
+    , typename N2
+    >
+struct times2
+    : times_impl<
+          typename times_tag<N1>::type
+        , typename times_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times2, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, times)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct times_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  * BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp
new file mode 100644
index 0000000..26533dd
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp
@@ -0,0 +1,109 @@
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/unpack_args.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl
+{
+    template< typename F, typename Args > struct apply;
+};
+
+template<> struct unpack_args_impl<0>
+{
+    template< typename F, typename Args > struct apply
+        : apply0<
+              F
+            >
+    {
+    };
+};
+
+template<> struct unpack_args_impl<1>
+{
+    template< typename F, typename Args > struct apply
+        : apply1<
+              F
+            , typename at_c< Args,0 >::type
+            >
+    {
+    };
+};
+
+template<> struct unpack_args_impl<2>
+{
+    template< typename F, typename Args > struct apply
+        : apply2<
+              F
+            , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+            >
+    {
+    };
+};
+
+template<> struct unpack_args_impl<3>
+{
+    template< typename F, typename Args > struct apply
+        : apply3<
+              F
+            , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+            , typename at_c< Args,2 >::type
+            >
+    {
+    };
+};
+
+template<> struct unpack_args_impl<4>
+{
+    template< typename F, typename Args > struct apply
+        : apply4<
+              F
+            , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+            , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+            >
+    {
+    };
+};
+
+template<> struct unpack_args_impl<5>
+{
+    template< typename F, typename Args > struct apply
+        : apply5<
+              F
+            , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+            , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+            , typename at_c< Args,4 >::type
+            >
+    {
+    };
+};
+
+}
+
+template<
+      typename F
+    >
+struct unpack_args
+{
+    template< typename Args > struct apply
+
+        : aux::unpack_args_impl< size<Args>::value >
+            ::template apply< F,Args >
+
+    {
+    };
+};
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp
new file mode 100644
index 0000000..a6c7b62
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp
@@ -0,0 +1,556 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct vector_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct vector_chooser<0>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef vector0<
+             
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<1>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector1<
+              T0
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<2>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector2<
+              T0, T1
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<3>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector3<
+              T0, T1, T2
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<4>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector4<
+              T0, T1, T2, T3
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<5>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector5<
+              T0, T1, T2, T3, T4
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<6>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector6<
+              T0, T1, T2, T3, T4, T5
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<7>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector7<
+              T0, T1, T2, T3, T4, T5, T6
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<8>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector8<
+              T0, T1, T2, T3, T4, T5, T6, T7
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<9>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector9<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<10>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector10<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<11>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector11<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<12>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector12<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<13>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector13<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<14>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector14<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<15>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector15<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<16>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector16<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<17>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector17<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<18>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector18<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<19>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector19<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_chooser<20>
+{
+    template<
+          typename T0, typename T1, typename T2, typename T3, typename T4
+        , typename T5, typename T6, typename T7, typename T8, typename T9
+        , typename T10, typename T11, typename T12, typename T13, typename T14
+        , typename T15, typename T16, typename T17, typename T18, typename T19
+        >
+    struct result_
+    {
+        typedef typename vector20<
+              T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< typename T >
+struct is_vector_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_vector_arg<na>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename T6, typename T7, typename T8, typename T9, typename T10
+    , typename T11, typename T12, typename T13, typename T14, typename T15
+    , typename T16, typename T17, typename T18, typename T19, typename T20
+    >
+struct vector_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_vector_arg<T1>::value + is_vector_arg<T2>::value 
+        + is_vector_arg<T3>::value + is_vector_arg<T4>::value 
+        + is_vector_arg<T5>::value + is_vector_arg<T6>::value 
+        + is_vector_arg<T7>::value + is_vector_arg<T8>::value 
+        + is_vector_arg<T9>::value + is_vector_arg<T10>::value 
+        + is_vector_arg<T11>::value + is_vector_arg<T12>::value 
+        + is_vector_arg<T13>::value + is_vector_arg<T14>::value 
+        + is_vector_arg<T15>::value + is_vector_arg<T16>::value 
+        + is_vector_arg<T17>::value + is_vector_arg<T18>::value 
+        + is_vector_arg<T19>::value + is_vector_arg<T20>::value
+        );
+
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct vector_impl
+{
+    typedef aux::vector_count_args<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        > arg_num_;
+
+    typedef typename aux::vector_chooser< arg_num_::value >
+        ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct vector
+    : aux::vector_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type
+{
+    typedef typename aux::vector_impl<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp b/ext/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp
new file mode 100644
index 0000000..c522d08
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp
@@ -0,0 +1,534 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< int N >
+struct vector_c_chooser;
+
+}
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<0>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector0_c<
+              T
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<1>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector1_c<
+              T, T(C0)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<2>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector2_c<
+              T, T(C0), T(C1)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<3>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector3_c<
+              T, T(C0), T(C1), T(C2)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<4>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector4_c<
+              T, T(C0), T(C1), T(C2), T(C3)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<5>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector5_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<6>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector6_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<7>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector7_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<8>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector8_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<9>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector9_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<10>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector10_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<11>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector11_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<12>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector12_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<13>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector13_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<14>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector14_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<15>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector15_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<16>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector16_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<17>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector17_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<18>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector18_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<19>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector19_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template<>
+struct vector_c_chooser<20>
+{
+    template<
+          typename T, long C0, long C1, long C2, long C3, long C4, long C5
+        , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+        , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+        >
+    struct result_
+    {
+        typedef typename vector20_c<
+              T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19)
+            >::type type;
+
+    };
+};
+
+} // namespace aux
+
+namespace aux {
+
+template< long C >
+struct is_vector_c_arg
+{
+    BOOST_STATIC_CONSTANT(bool, value  = true);
+};
+
+template<>
+struct is_vector_c_arg<LONG_MAX>
+{
+    BOOST_STATIC_CONSTANT(bool, value  = false);
+};
+
+template<
+      long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8
+    , long C9, long C10, long C11, long C12, long C13, long C14, long C15
+    , long C16, long C17, long C18, long C19, long C20
+    >
+struct vector_c_count_args
+{
+    BOOST_STATIC_CONSTANT(int, value =
+          is_vector_c_arg<C1>::value + is_vector_c_arg<C2>::value 
+        + is_vector_c_arg<C3>::value + is_vector_c_arg<C4>::value 
+        + is_vector_c_arg<C5>::value + is_vector_c_arg<C6>::value 
+        + is_vector_c_arg<C7>::value + is_vector_c_arg<C8>::value 
+        + is_vector_c_arg<C9>::value + is_vector_c_arg<C10>::value 
+        + is_vector_c_arg<C11>::value + is_vector_c_arg<C12>::value 
+        + is_vector_c_arg<C13>::value + is_vector_c_arg<C14>::value 
+        + is_vector_c_arg<C15>::value + is_vector_c_arg<C16>::value 
+        + is_vector_c_arg<C17>::value + is_vector_c_arg<C18>::value 
+        + is_vector_c_arg<C19>::value + is_vector_c_arg<C20>::value
+        );
+
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct vector_c_impl
+{
+    typedef aux::vector_c_count_args<
+          C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        > arg_num_;
+
+    typedef typename aux::vector_c_chooser< arg_num_::value >
+        ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct vector_c
+    : aux::vector_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type
+{
+    typedef typename aux::vector_c_impl<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
+        >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp
new file mode 100644
index 0000000..26de94c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_backward;
+template<>
+struct advance_backward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_backward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_backward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_backward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_backward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef typename prior<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_backward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_backward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_backward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp
new file mode 100644
index 0000000..b137cc7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_forward;
+template<>
+struct advance_forward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_forward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_forward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_forward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_forward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef typename next<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_forward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_forward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_forward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/and.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/and.hpp
new file mode 100644
index 0000000..010ad1f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/and.hpp
@@ -0,0 +1,69 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/and.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C_, typename T1, typename T2, typename T3, typename T4 >
+struct and_impl
+    : false_
+{
+};
+
+template< typename T1, typename T2, typename T3, typename T4 >
+struct and_impl< true,T1,T2,T3,T4 >
+    : and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4
+        , true_
+        >
+{
+};
+
+template<>
+struct and_impl<
+          true
+        , true_, true_, true_, true_
+        >
+    : true_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = true_, typename T4 = true_, typename T5 = true_
+    >
+struct and_
+
+    : aux::and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4, T5
+        >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , and_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , and_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp
new file mode 100644
index 0000000..e08eacc
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp
@@ -0,0 +1,169 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct apply0
+
+    : apply_wrap0<
+          typename lambda<F>::type
+       
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          1
+        , apply0
+        , (F )
+        )
+};
+
+template<
+      typename F
+    >
+struct apply< F,na,na,na,na,na >
+    : apply0<F>
+{
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply1
+
+    : apply_wrap1<
+          typename lambda<F>::type
+        , T1
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          2
+        , apply1
+        , (F, T1)
+        )
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply< F,T1,na,na,na,na >
+    : apply1< F,T1 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2
+
+    : apply_wrap2<
+          typename lambda<F>::type
+        , T1, T2
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , apply2
+        , (F, T1, T2)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply< F,T1,T2,na,na,na >
+    : apply2< F,T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3
+
+    : apply_wrap3<
+          typename lambda<F>::type
+        , T1, T2, T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , apply3
+        , (F, T1, T2, T3)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply< F,T1,T2,T3,na,na >
+    : apply3< F,T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4
+
+    : apply_wrap4<
+          typename lambda<F>::type
+        , T1, T2, T3, T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , apply4
+        , (F, T1, T2, T3, T4)
+        )
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply< F,T1,T2,T3,T4,na >
+    : apply4< F,T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5
+
+    : apply_wrap5<
+          typename lambda<F>::type
+        , T1, T2, T3, T4, T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          6
+        , apply5
+        , (F, T1, T2, T3, T4, T5)
+        )
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply
+    : apply5< F,T1,T2,T3,T4,T5 >
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp
new file mode 100644
index 0000000..b2ed5d5
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp
@@ -0,0 +1,52 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na
+    >
+struct apply;
+
+template<
+      typename F
+    >
+struct apply0;
+
+template<
+      typename F, typename T1
+    >
+struct apply1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp
new file mode 100644
index 0000000..34d51a1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp
@@ -0,0 +1,84 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply_wrap.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+
+    , typename has_apply_ = typename aux::has_apply<F>::type
+
+    >
+struct apply_wrap0
+
+    : F::template apply<  >
+{
+};
+
+template< typename F >
+struct apply_wrap0< F,true_ >
+    : F::apply
+{
+};
+
+template<
+      typename F, typename T1
+
+    >
+struct apply_wrap1
+
+    : F::template apply<T1>
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+
+    >
+struct apply_wrap2
+
+    : F::template apply< T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+
+    >
+struct apply_wrap3
+
+    : F::template apply< T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+
+    >
+struct apply_wrap4
+
+    : F::template apply< T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+
+    >
+struct apply_wrap5
+
+    : F::template apply< T1,T2,T3,T4,T5 >
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp
new file mode 100644
index 0000000..6f2f8a8
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp
@@ -0,0 +1,123 @@
+
+// Copyright Peter Dimov 2001-2002
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/arg.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+template<> struct arg< -1 >
+{
+    BOOST_STATIC_CONSTANT(int, value  = -1);
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<1>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 1);
+    typedef arg<2> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<2>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 2);
+    typedef arg<3> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U2 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<3>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 3);
+    typedef arg<4> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U3 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<4>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 4);
+    typedef arg<5> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U4 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<5>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 5);
+    typedef arg<6> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U5 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg)
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp
new file mode 100644
index 0000000..095b84d
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp
@@ -0,0 +1,369 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+{
+    typedef T type;
+};
+
+template<
+      int N, typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
+{
+    typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 >
+{
+    typedef bind< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind0<F>, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind0<F> f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F
+    >
+struct bind< F,na,na,na,na,na >
+    : bind0<F>
+{
+};
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename U1, typename U2, typename U3
+    , typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind1< F,T1 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind1< F,T1 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1
+    >
+struct bind< F,T1,na,na,na,na >
+    : bind1< F,T1 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename U1, typename U2
+    , typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind2< F,T1,T2 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind2< F,T1,T2 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind< F,T1,T2,na,na,na >
+    : bind2< F,T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename U1
+    , typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind3< F,T1,T2,T3 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind< F,T1,T2,T3,na,na >
+    : bind3< F,T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind4< F,T1,T2,T3,T4 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind< F,T1,T2,T3,T4,na >
+    : bind4< F,T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+        typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
+
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind5< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+
+/// primary template (not a specialization!)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind
+    : bind5< F,T1,T2,T3,T4,T5 >
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp
new file mode 100644
index 0000000..2891440
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp
@@ -0,0 +1,466 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+{
+    typedef T type;
+};
+
+template<
+      typename T
+    , typename Arg
+    >
+struct replace_unnamed_arg
+{
+    typedef Arg next;
+    typedef T type;
+};
+
+template<
+      typename Arg
+    >
+struct replace_unnamed_arg< arg< -1 >, Arg >
+{
+    typedef typename Arg::next next;
+    typedef Arg type;
+};
+
+template<
+      int N, typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
+{
+    typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 >
+{
+    typedef bind< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind0<F>, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind0<F> f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F
+    >
+struct bind< F,na,na,na,na,na >
+    : bind0<F>
+{
+};
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename U1, typename U2, typename U3
+    , typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind1< F,T1 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind1< F,T1 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1
+    >
+struct bind< F,T1,na,na,na,na >
+    : bind1< F,T1 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename U1, typename U2
+    , typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind2< F,T1,T2 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind2< F,T1,T2 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind< F,T1,T2,na,na,na >
+    : bind2< F,T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename U1
+    , typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind3< F,T1,T2,T3 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind< F,T1,T2,T3,na,na >
+    : bind3< F,T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind4< F,T1,T2,T3,T4 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind< F,T1,T2,T3,T4,na >
+    : bind4< F,T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+        typedef aux::replace_unnamed_arg< T5,n5 > r5;
+        typedef typename r5::type a5;
+        typedef typename r5::next n6;
+        typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5;
+        ///
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind5< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+
+/// primary template (not a specialization!)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind
+    : bind5< F,T1,T2,T3,T4,T5 >
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp
new file mode 100644
index 0000000..c4a5060
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp
@@ -0,0 +1,52 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bind_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na
+    >
+struct bind;
+
+template<
+      typename F
+    >
+struct bind0;
+
+template<
+      typename F, typename T1
+    >
+struct bind1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp
new file mode 100644
index 0000000..282771b
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp
@@ -0,0 +1,157 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitand.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitand_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitand_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitand_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitand_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitand_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitand_
+    : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitand_< N1,N2,N3,N4,na >
+
+    : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitand_< N1,N2,N3,na,na >
+
+    : bitand_< bitand_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitand_< N1,N2,na,na,na >
+    : bitand_impl<
+          typename bitand_tag<N1>::type
+        , typename bitand_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct bitand_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 & n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct bitand_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::bitand_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp
new file mode 100644
index 0000000..bc9c198
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp
@@ -0,0 +1,157 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitor_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitor_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitor_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitor_
+    : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitor_< N1,N2,N3,N4,na >
+
+    : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitor_< N1,N2,N3,na,na >
+
+    : bitor_< bitor_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitor_< N1,N2,na,na,na >
+    : bitor_impl<
+          typename bitor_tag<N1>::type
+        , typename bitor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct bitor_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 | n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct bitor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::bitor_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp
new file mode 100644
index 0000000..76ce540
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp
@@ -0,0 +1,157 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitxor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitxor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitxor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitxor_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitxor_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitxor_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitxor_
+    : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitxor_< N1,N2,N3,N4,na >
+
+    : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitxor_< N1,N2,N3,na,na >
+
+    : bitxor_< bitxor_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitxor_< N1,N2,na,na,na >
+    : bitxor_impl<
+          typename bitxor_tag<N1>::type
+        , typename bitxor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct bitxor_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 ^ n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct bitxor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::bitxor_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp
new file mode 100644
index 0000000..de67398
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/deque.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct deque;
+
+template<
+     
+    >
+struct deque<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector0<  >
+{
+    typedef vector0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct deque<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector1<T0>
+{
+    typedef typename vector1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct deque<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector2< T0,T1 >
+{
+    typedef typename vector2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct deque<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector3< T0,T1,T2 >
+{
+    typedef typename vector3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct deque<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector4< T0,T1,T2,T3 >
+{
+    typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct deque<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector5< T0,T1,T2,T3,T4 >
+{
+    typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : vector15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : vector16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : vector17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : vector18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : vector19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct deque
+    : vector20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp
new file mode 100644
index 0000000..9bc7fb1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp
@@ -0,0 +1,156 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/divides.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct divides_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct divides_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct divides_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct divides_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct divides_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct divides
+    : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , divides
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct divides< N1,N2,N3,N4,na >
+
+    : divides< divides< divides< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct divides< N1,N2,N3,na,na >
+
+    : divides< divides< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct divides< N1,N2,na,na,na >
+    : divides_impl<
+          typename divides_tag<N1>::type
+        , typename divides_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, divides)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct divides_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 / n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct divides_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::divides_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp
new file mode 100644
index 0000000..fa2dc4a
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp
@@ -0,0 +1,98 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct equal_to_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct equal_to_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct equal_to
+
+    : equal_to_impl<
+          typename equal_to_tag<N1>::type
+        , typename equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ==
+             BOOST_MPL_AUX_VALUE_WKND(N2)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp
new file mode 100644
index 0000000..9e7a293
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp
@@ -0,0 +1,180 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 0,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 1,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef state1 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 2,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef state2 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 3,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef state3 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 4,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef state4 state;
+    typedef iter4 iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl
+{
+    typedef fold_impl<
+          4
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< -1,First,Last,State,ForwardOp >
+    : fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< -1,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp
new file mode 100644
index 0000000..bf81873
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp
@@ -0,0 +1,554 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+   
+    >
+struct lambda
+{
+    typedef false_ is_le;
+    typedef T result_;
+    typedef T type;
+};
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+template< int N, typename Tag >
+struct lambda< arg<N>, Tag >
+{
+    typedef true_ is_le;
+    typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41
+    typedef mpl::protect<result_> type;
+};
+
+template<
+      typename F
+    , typename Tag
+    >
+struct lambda<
+          bind0<F>
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind0<
+          F
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1
+{
+    typedef F<
+          typename L1::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1< true_,Tag,F,L1 >
+{
+    typedef bind1<
+          quote1< F,Tag >
+        , typename L1::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1 > class F
+    , typename T1
+    , typename Tag
+    >
+struct lambda<
+          F<T1>
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef typename l1::is_le is_le1;
+    typedef typename aux::lambda_or<
+          is_le1::value
+        >::type is_le;
+
+    typedef aux::le_result1<
+          is_le, Tag, F, l1
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1
+    , typename Tag
+    >
+struct lambda<
+          bind1< F,T1 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind1<
+          F
+        , T1
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2
+{
+    typedef F<
+          typename L1::type, typename L2::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2< true_,Tag,F,L1,L2 >
+{
+    typedef bind2<
+          quote2< F,Tag >
+        , typename L1::result_, typename L2::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2 > class F
+    , typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value
+        >::type is_le;
+
+    typedef aux::le_result2<
+          is_le, Tag, F, l1, l2
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          bind2< F,T1,T2 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind2<
+          F
+        , T1, T2
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3< true_,Tag,F,L1,L2,L3 >
+{
+    typedef bind3<
+          quote3< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3 > class F
+    , typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value
+        >::type is_le;
+
+    typedef aux::le_result3<
+          is_le, Tag, F, l1, l2, l3
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          bind3< F,T1,T2,T3 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind3<
+          F
+        , T1, T2, T3
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4< true_,Tag,F,L1,L2,L3,L4 >
+{
+    typedef bind4<
+          quote4< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        >::type is_le;
+
+    typedef aux::le_result4<
+          is_le, Tag, F, l1, l2, l3, l4
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          bind4< F,T1,T2,T3,T4 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind4<
+          F
+        , T1, T2, T3, T4
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type, typename L5::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 >
+{
+    typedef bind5<
+          quote5< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_, typename L5::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template<
+          typename P1, typename P2, typename P3, typename P4
+        , typename P5
+        >
+      class F
+    , typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    typedef lambda< T5,Tag > l5;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    typedef typename l5::is_le is_le5;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        , is_le5::value
+        >::type is_le;
+
+    typedef aux::le_result5<
+          is_le, Tag, F, l1, l2, l3, l4, l5
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind5< F,T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind5<
+          F
+        , T1, T2, T3, T4, T5
+        > result_;
+
+    typedef result_ type;
+};
+
+/// special case for 'protect'
+template< typename T, typename Tag >
+struct lambda< mpl::protect<T>, Tag >
+{
+    typedef false_ is_le;
+    typedef mpl::protect<T> result_;
+    typedef result_ type;
+};
+
+/// specializations for the main 'bind' form
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind< F,T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind< F,T1,T2,T3,T4,T5 > result_;
+    typedef result_ type;
+};
+
+/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars
+
+template<
+      typename F, typename Tag1, typename Tag2
+    >
+struct lambda<
+          lambda< F,Tag1 >
+        , Tag2
+        >
+{
+    typedef lambda< F,Tag2 > l1;
+    typedef lambda< Tag1,Tag2 > l2;
+    typedef typename l1::is_le is_le;
+    typedef aux::le_result2<is_le, Tag2, mpl::lambda, l1, l2> le_result_;
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, lambda)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp
new file mode 100644
index 0000000..faa3f2b
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp
@@ -0,0 +1,98 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater
+
+    : greater_impl<
+          typename greater_tag<N1>::type
+        , typename greater_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >
+             BOOST_MPL_AUX_VALUE_WKND(N2)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp
new file mode 100644
index 0000000..392d142
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp
@@ -0,0 +1,98 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_equal_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_equal_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater_equal
+
+    : greater_equal_impl<
+          typename greater_equal_tag<N1>::type
+        , typename greater_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >=
+             BOOST_MPL_AUX_VALUE_WKND(N2)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp
new file mode 100644
index 0000000..00f31c4
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp
@@ -0,0 +1,141 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/inherit.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    >
+struct inherit2
+    : T1, T2
+{
+    typedef inherit2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2))
+};
+
+template< typename T1 >
+struct inherit2< T1,empty_base >
+{
+    typedef T1 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base))
+};
+
+template< typename T2 >
+struct inherit2< empty_base,T2 >
+{
+    typedef T2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2))
+};
+
+template<>
+struct inherit2< empty_base,empty_base >
+{
+    typedef empty_base type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, inherit2)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na
+    >
+struct inherit3
+    : inherit2<
+          typename inherit2<
+              T1, T2
+            >::type
+        , T3
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          3
+        , inherit3
+        , ( T1, T2, T3)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, inherit3)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    >
+struct inherit4
+    : inherit2<
+          typename inherit3<
+              T1, T2, T3
+            >::type
+        , T4
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , inherit4
+        , ( T1, T2, T3, T4)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(4, inherit4)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    , typename T5 = na
+    >
+struct inherit5
+    : inherit2<
+          typename inherit4<
+              T1, T2, T3, T4
+            >::type
+        , T5
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , inherit5
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(5, inherit5)
+
+/// primary template
+
+template<
+      typename T1 = empty_base, typename T2 = empty_base
+    , typename T3 = empty_base, typename T4 = empty_base
+    , typename T5 = empty_base
+    >
+struct inherit
+    : inherit5< T1,T2,T3,T4,T5 >
+{
+};
+
+template<>
+struct inherit< na,na,na,na,na >
+{
+    template<
+
+          typename T1 = empty_base, typename T2 = empty_base
+        , typename T3 = empty_base, typename T4 = empty_base
+        , typename T5 = empty_base
+
+        >
+    struct apply
+        : inherit< T1,T2,T3,T4,T5 >
+    {
+    };
+};
+
+BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp
new file mode 100644
index 0000000..6951795
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp
@@ -0,0 +1,133 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright David Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename Iterator, typename State >
+struct iter_fold_if_null_step
+{
+    typedef State state;
+    typedef Iterator iterator;
+};
+
+template< bool >
+struct iter_fold_if_step_impl
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef typename apply2< StateOp,State,Iterator >::type state;
+        typedef typename IteratorOp::type iterator;
+    };
+};
+
+template<>
+struct iter_fold_if_step_impl<false>
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef State state;
+        typedef Iterator iterator;
+    };
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_forward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename BackwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_backward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename ForwardPredicate
+    , typename BackwardOp
+    , typename BackwardPredicate
+    >
+struct iter_fold_if_impl
+{
+ private:
+    typedef iter_fold_if_null_step< Iterator,State > forward_step0;
+    typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1;
+    typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2;
+    typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3;
+    typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4;
+    
+
+    typedef typename if_<
+          typename forward_step4::not_last
+        , iter_fold_if_impl<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            , ForwardOp
+            , ForwardPredicate
+            , BackwardOp
+            , BackwardPredicate
+            >
+        , iter_fold_if_null_step<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            >
+        >::type backward_step4;
+
+    typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3;
+    typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2;
+    typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1;
+    typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0;
+    
+
+ public:
+    typedef typename backward_step0::state state;
+    typedef typename backward_step4::iterator iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp
new file mode 100644
index 0000000..805790e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp
@@ -0,0 +1,180 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 0,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 1,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef state1 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 2,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef state2 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 3,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef state3 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 4,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef state4 state;
+    typedef iter4 iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl
+{
+    typedef iter_fold_impl<
+          4
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef iter_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< -1,First,Last,State,ForwardOp >
+    : iter_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< -1,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp
new file mode 100644
index 0000000..890a198
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp
@@ -0,0 +1,229 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+template< typename Arity > struct lambda_impl
+{
+    template< typename T, typename Tag, typename Protect > struct result_
+    {
+        typedef T type;
+        typedef is_placeholder<T> is_le;
+    };
+};
+
+template<> struct lambda_impl< int_<1> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef typename l1::is_le is_le1;
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value
+            > is_le;
+
+        typedef bind1<
+              typename F::rebind
+            , typename l1::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<2> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value
+            > is_le;
+
+        typedef bind2<
+              typename F::rebind
+            , typename l1::type, typename l2::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<3> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value
+            > is_le;
+
+        typedef bind3<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<4> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value
+            > is_le;
+
+        typedef bind4<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<5> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        typedef lambda< typename F::arg5, Tag, false_ > l5;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        typedef typename l5::is_le is_le5;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value
+            > is_le;
+
+        typedef bind5<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type, typename l5::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+    , typename Protect
+    >
+struct lambda
+{
+    /// Metafunction forwarding confuses MSVC 6.x
+    typedef typename aux::template_arity<T>::type arity_;
+    typedef typename aux::lambda_impl<arity_>
+        ::template result_< T,Tag,Protect > l_;
+
+    typedef typename l_::type type;
+    typedef typename l_::is_le is_le;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect))
+};
+
+BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/less.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/less.hpp
new file mode 100644
index 0000000..6451680
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/less.hpp
@@ -0,0 +1,98 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less
+
+    : less_impl<
+          typename less_tag<N1>::type
+        , typename less_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N2)::value >
+             BOOST_MPL_AUX_VALUE_WKND(N1)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp
new file mode 100644
index 0000000..00ae0d3
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp
@@ -0,0 +1,98 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_equal_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_equal_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less_equal
+
+    : less_equal_impl<
+          typename less_equal_tag<N1>::type
+        , typename less_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <=
+             BOOST_MPL_AUX_VALUE_WKND(N2)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/list.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/list.hpp
new file mode 100644
index 0000000..4e8ad53
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/list.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct list;
+
+template<
+     
+    >
+struct list<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list0<  >
+{
+    typedef list0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct list<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list1<T0>
+{
+    typedef typename list1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct list<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list2< T0,T1 >
+{
+    typedef typename list2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct list<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list3< T0,T1,T2 >
+{
+    typedef typename list3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct list<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list4< T0,T1,T2,T3 >
+{
+    typedef typename list4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct list<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list5< T0,T1,T2,T3,T4 >
+{
+    typedef typename list5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : list15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : list16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : list17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : list18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : list19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct list
+    : list20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp
new file mode 100644
index 0000000..0b48a7f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct list_c;
+
+template<
+      typename T
+    >
+struct list_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list0_c<T>
+{
+    typedef typename list0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct list_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list1_c< T,C0 >
+{
+    typedef typename list1_c< T,C0 >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct list_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list2_c< T,C0,C1 >
+{
+    typedef typename list2_c< T,C0,C1 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct list_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list3_c< T,C0,C1,C2 >
+{
+    typedef typename list3_c< T,C0,C1,C2 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct list_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list4_c< T,C0,C1,C2,C3 >
+{
+    typedef typename list4_c< T,C0,C1,C2,C3 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list5_c< T,C0,C1,C2,C3,C4 >
+{
+    typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list6_c< T,C0,C1,C2,C3,C4,C5 >
+{
+    typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+{
+    typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+{
+    typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+{
+    typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+{
+    typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+{
+    typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+{
+    typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+{
+    typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list14_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        >
+{
+    typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list15_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        >
+{
+    typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list16_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15
+        >
+{
+    typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list17_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16
+        >
+{
+    typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : list18_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17
+        >
+{
+    typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : list19_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18
+        >
+{
+    typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct list_c
+    : list20_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, C19
+        >
+{
+    typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/map.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/map.hpp
new file mode 100644
index 0000000..837e013
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/map.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct map;
+
+template<
+     
+    >
+struct map<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map0<  >
+{
+    typedef map0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct map<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map1<T0>
+{
+    typedef typename map1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct map<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map2< T0,T1 >
+{
+    typedef typename map2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct map<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map3< T0,T1,T2 >
+{
+    typedef typename map3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct map<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map4< T0,T1,T2,T3 >
+{
+    typedef typename map4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct map<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map5< T0,T1,T2,T3,T4 >
+{
+    typedef typename map5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : map15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : map16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : map17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : map18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : map19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct map
+    : map20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp
new file mode 100644
index 0000000..bb67c59
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp
@@ -0,0 +1,156 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/minus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct minus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct minus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct minus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct minus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct minus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct minus
+    : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , minus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct minus< N1,N2,N3,N4,na >
+
+    : minus< minus< minus< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct minus< N1,N2,N3,na,na >
+
+    : minus< minus< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct minus< N1,N2,na,na,na >
+    : minus_impl<
+          typename minus_tag<N1>::type
+        , typename minus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, minus)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct minus_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 - n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct minus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::minus_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp
new file mode 100644
index 0000000..6fd0cab
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp
@@ -0,0 +1,111 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/modulus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct modulus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct modulus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct modulus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct modulus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct modulus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct modulus
+
+    : modulus_impl<
+          typename modulus_tag<N1>::type
+        , typename modulus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct modulus_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 % n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct modulus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::modulus_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp
new file mode 100644
index 0000000..7c940a5
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp
@@ -0,0 +1,98 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/not_equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct not_equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct not_equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct not_equal_to_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct not_equal_to_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct not_equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct not_equal_to
+
+    : not_equal_to_impl<
+          typename not_equal_to_tag<N1>::type
+        , typename not_equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct not_equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+    {
+        BOOST_STATIC_CONSTANT(bool, value =
+             ( BOOST_MPL_AUX_VALUE_WKND(N1)::value !=
+             BOOST_MPL_AUX_VALUE_WKND(N2)::value )
+            );
+        typedef bool_<value> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/or.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/or.hpp
new file mode 100644
index 0000000..31e1aaa
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/or.hpp
@@ -0,0 +1,69 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/or.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C_, typename T1, typename T2, typename T3, typename T4 >
+struct or_impl
+    : true_
+{
+};
+
+template< typename T1, typename T2, typename T3, typename T4 >
+struct or_impl< false,T1,T2,T3,T4 >
+    : or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4
+        , false_
+        >
+{
+};
+
+template<>
+struct or_impl<
+          false
+        , false_, false_, false_, false_
+        >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = false_, typename T4 = false_, typename T5 = false_
+    >
+struct or_
+
+    : aux::or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4, T5
+        >
+
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , or_
+        , ( T1, T2, T3, T4, T5)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , or_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp
new file mode 100644
index 0000000..ff97364
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp
@@ -0,0 +1,105 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright Peter Dimov 2001-2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/placeholders.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg< -1 > _;
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_;
+}
+
+}}
+
+/// agurt, 17/mar/02: one more placeholder for the last 'apply#' 
+/// specialization
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<1> _1;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<2> _2;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<3> _3;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<4> _4;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<5> _5;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<6> _6;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6;
+}
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp
new file mode 100644
index 0000000..cecead7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp
@@ -0,0 +1,156 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/plus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct plus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct plus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct plus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct plus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct plus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct plus
+    : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , plus
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct plus< N1,N2,N3,N4,na >
+
+    : plus< plus< plus< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct plus< N1,N2,N3,na,na >
+
+    : plus< plus< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct plus< N1,N2,na,na,na >
+    : plus_impl<
+          typename plus_tag<N1>::type
+        , typename plus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, plus)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct plus_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 + n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct plus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::plus_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp
new file mode 100644
index 0000000..e7a7f00
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp
@@ -0,0 +1,11 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/quote.hpp" header
+// -- DO NOT modify by hand!
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp
new file mode 100644
index 0000000..c468684
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp
@@ -0,0 +1,231 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef fwd_state0 bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef fwd_state1 bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef fwd_state2 bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef fwd_state3 bkwd_state3;
+    typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef fwd_state4 bkwd_state4;
+    typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+    typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter4 iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef reverse_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , iter4
+        , Last
+        , fwd_state4
+        , BackwardOp
+        , ForwardOp
+        > nested_chunk;
+
+    typedef typename nested_chunk::state bkwd_state4;
+    typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+    typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef typename nested_chunk::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef reverse_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , typename deref<First>::type
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp
new file mode 100644
index 0000000..658f92a
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp
@@ -0,0 +1,231 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef fwd_state0 bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef fwd_state1 bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef fwd_state2 bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef fwd_state3 bkwd_state3;
+    typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef fwd_state4 bkwd_state4;
+    typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+    typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter4 iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef reverse_iter_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , iter4
+        , Last
+        , fwd_state4
+        , BackwardOp
+        , ForwardOp
+        > nested_chunk;
+
+    typedef typename nested_chunk::state bkwd_state4;
+    typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+    typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef typename nested_chunk::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef reverse_iter_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , First
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/set.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/set.hpp
new file mode 100644
index 0000000..5721922
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/set.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct set;
+
+template<
+     
+    >
+struct set<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set0<  >
+{
+    typedef set0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct set<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set1<T0>
+{
+    typedef typename set1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct set<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set2< T0,T1 >
+{
+    typedef typename set2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct set<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set3< T0,T1,T2 >
+{
+    typedef typename set3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct set<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set4< T0,T1,T2,T3 >
+{
+    typedef typename set4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct set<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set5< T0,T1,T2,T3,T4 >
+{
+    typedef typename set5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : set15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : set16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : set17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : set18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : set19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct set
+    : set20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp
new file mode 100644
index 0000000..cbeb932
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct set_c;
+
+template<
+      typename T
+    >
+struct set_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set0_c<T>
+{
+    typedef typename set0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct set_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set1_c< T,C0 >
+{
+    typedef typename set1_c< T,C0 >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct set_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set2_c< T,C0,C1 >
+{
+    typedef typename set2_c< T,C0,C1 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct set_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set3_c< T,C0,C1,C2 >
+{
+    typedef typename set3_c< T,C0,C1,C2 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct set_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set4_c< T,C0,C1,C2,C3 >
+{
+    typedef typename set4_c< T,C0,C1,C2,C3 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set5_c< T,C0,C1,C2,C3,C4 >
+{
+    typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set6_c< T,C0,C1,C2,C3,C4,C5 >
+{
+    typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+{
+    typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+{
+    typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+{
+    typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+{
+    typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+{
+    typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+{
+    typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+{
+    typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set14_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        >
+{
+    typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set15_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        >
+{
+    typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set16_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15
+        >
+{
+    typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set17_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16
+        >
+{
+    typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : set18_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17
+        >
+{
+    typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : set19_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18
+        >
+{
+    typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct set_c
+    : set20_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, C19
+        >
+{
+    typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp
new file mode 100644
index 0000000..7ef4672
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp
@@ -0,0 +1,110 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_left.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_left_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_left_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_left_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_left_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_left_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_left
+
+    : shift_left_impl<
+          typename shift_left_tag<N1>::type
+        , typename shift_left_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, typename Shift, T n, Shift s >
+struct shift_left_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n << s));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct shift_left_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+        : aux::shift_left_wknd<
+              typename N::value_type
+            , typename S::value_type
+            , N::value
+            , S::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp
new file mode 100644
index 0000000..91a98f7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp
@@ -0,0 +1,110 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_right.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_right_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_right_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_right_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_right_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_right_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_right
+
+    : shift_right_impl<
+          typename shift_right_tag<N1>::type
+        , typename shift_right_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2))
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, typename Shift, T n, Shift s >
+struct shift_right_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n >> s));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct shift_right_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+        : aux::shift_right_wknd<
+              typename N::value_type
+            , typename S::value_type
+            , N::value
+            , S::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp
new file mode 100644
index 0000000..1164f0f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp
@@ -0,0 +1,40 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< bool >
+struct template_arity_impl
+{
+    template< typename F > struct result_
+        : mpl::int_< -1 >
+    {
+    };
+};
+
+template<>
+struct template_arity_impl<true>
+{
+    template< typename F > struct result_
+        : F::arity
+    {
+    };
+};
+
+template< typename F >
+struct template_arity
+    : template_arity_impl< ::boost::mpl::aux::has_rebind<F>::value >
+        ::template result_<F>
+{
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/times.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/times.hpp
new file mode 100644
index 0000000..d019b57
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/times.hpp
@@ -0,0 +1,156 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/times.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct times_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct times_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct times_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct times_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct times_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct times
+    : times< times< times< times< N1,N2 >, N3>, N4>, N5>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          5
+        , times
+        , ( N1, N2, N3, N4, N5 )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct times< N1,N2,N3,N4,na >
+
+    : times< times< times< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct times< N1,N2,N3,na,na >
+
+    : times< times< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct times< N1,N2,na,na,na >
+    : times_impl<
+          typename times_tag<N1>::type
+        , typename times_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, times)
+
+}}
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T, T n1, T n2 >
+struct times_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value  = (n1 * n2));
+    typedef integral_c< T,value > type;
+};
+
+}
+
+template<>
+struct times_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+        : aux::times_wknd<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , N1::value
+            , N2::value
+            >::type
+
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp
new file mode 100644
index 0000000..2194ce9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/unpack_args.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< int size, typename F, typename Args >
+struct unpack_args_impl;
+
+template< typename F, typename Args >
+struct unpack_args_impl< 0,F,Args >
+    : apply0<
+          F
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 1,F,Args >
+    : apply1<
+          F
+        , typename at_c< Args,0 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 2,F,Args >
+    : apply2<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 3,F,Args >
+    : apply3<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 4,F,Args >
+    : apply4<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 5,F,Args >
+    : apply5<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+        , typename at_c< Args,4 >::type
+        >
+{
+};
+
+}
+
+template<
+      typename F
+    >
+struct unpack_args
+{
+    template< typename Args > struct apply
+
+        : aux::unpack_args_impl< size<Args>::value,F, Args >
+
+    {
+    };
+};
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp
new file mode 100644
index 0000000..bfa9565
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct vector;
+
+template<
+     
+    >
+struct vector<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector0<  >
+{
+    typedef vector0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct vector<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector1<T0>
+{
+    typedef typename vector1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct vector<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector2< T0,T1 >
+{
+    typedef typename vector2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct vector<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector3< T0,T1,T2 >
+{
+    typedef typename vector3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct vector<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector4< T0,T1,T2,T3 >
+{
+    typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct vector<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector5< T0,T1,T2,T3,T4 >
+{
+    typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : vector15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : vector16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : vector17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : vector18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : vector19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct vector
+    : vector20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp b/ext/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp
new file mode 100644
index 0000000..0f1560d
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp
@@ -0,0 +1,309 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct vector_c;
+
+template<
+      typename T
+    >
+struct vector_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector0_c<T>
+{
+    typedef typename vector0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct vector_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector1_c< T, T(C0) >
+{
+    typedef typename vector1_c< T, T(C0) >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct vector_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector2_c< T, T(C0), T(C1) >
+{
+    typedef typename vector2_c< T, T(C0), T(C1) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct vector_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector3_c< T, T(C0), T(C1), T(C2) >
+{
+    typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector4_c< T, T(C0), T(C1), T(C2), T(C3) >
+{
+    typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >
+{
+    typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >
+{
+    typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >
+{
+    typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >
+{
+    typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >
+{
+    typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >
+{
+    typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >
+{
+    typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >
+{
+    typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >
+{
+    typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >
+{
+    typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >
+{
+    typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >
+{
+    typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >
+{
+    typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >
+{
+    typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >
+{
+    typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct vector_c
+    : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >
+{
+    typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp b/ext/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp
new file mode 100644
index 0000000..26de94c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_backward;
+template<>
+struct advance_backward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_backward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_backward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_backward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_backward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename prior<iter0>::type iter1;
+        typedef typename prior<iter1>::type iter2;
+        typedef typename prior<iter2>::type iter3;
+        typedef typename prior<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_backward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_backward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_backward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp b/ext/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp
new file mode 100644
index 0000000..b137cc7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< long N > struct advance_forward;
+template<>
+struct advance_forward<0>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef iter0 type;
+    };
+};
+
+template<>
+struct advance_forward<1>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef iter1 type;
+    };
+};
+
+template<>
+struct advance_forward<2>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef iter2 type;
+    };
+};
+
+template<>
+struct advance_forward<3>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef iter3 type;
+    };
+};
+
+template<>
+struct advance_forward<4>
+{
+    template< typename Iterator > struct apply
+    {
+        typedef Iterator iter0;
+        typedef typename next<iter0>::type iter1;
+        typedef typename next<iter1>::type iter2;
+        typedef typename next<iter2>::type iter3;
+        typedef typename next<iter3>::type iter4;
+        typedef iter4 type;
+    };
+};
+
+template< long N >
+struct advance_forward
+{
+    template< typename Iterator > struct apply
+    {
+        typedef typename apply_wrap1<
+              advance_forward<4>
+            , Iterator
+            >::type chunk_result_;
+
+        typedef typename apply_wrap1<
+              advance_forward<(
+                (N - 4) < 0
+                    ? 0
+                    : N - 4
+                    )>
+            , chunk_result_
+            >::type type;
+    };
+};
+
+}}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/and.hpp b/ext/boost/mpl/aux_/preprocessed/plain/and.hpp
new file mode 100644
index 0000000..163913f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/and.hpp
@@ -0,0 +1,64 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/and.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C_, typename T1, typename T2, typename T3, typename T4 >
+struct and_impl
+    : false_
+{
+};
+
+template< typename T1, typename T2, typename T3, typename T4 >
+struct and_impl< true,T1,T2,T3,T4 >
+    : and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4
+        , true_
+        >
+{
+};
+
+template<>
+struct and_impl<
+          true
+        , true_, true_, true_, true_
+        >
+    : true_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = true_, typename T4 = true_, typename T5 = true_
+    >
+struct and_
+
+    : aux::and_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4, T5
+        >
+
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , and_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/apply.hpp b/ext/boost/mpl/aux_/preprocessed/plain/apply.hpp
new file mode 100644
index 0000000..89d9e4b
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/apply.hpp
@@ -0,0 +1,139 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+    >
+struct apply0
+
+    : apply_wrap0<
+          typename lambda<F>::type
+       
+        >
+{
+};
+
+template<
+      typename F
+    >
+struct apply< F,na,na,na,na,na >
+    : apply0<F>
+{
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply1
+
+    : apply_wrap1<
+          typename lambda<F>::type
+        , T1
+        >
+{
+};
+
+template<
+      typename F, typename T1
+    >
+struct apply< F,T1,na,na,na,na >
+    : apply1< F,T1 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2
+
+    : apply_wrap2<
+          typename lambda<F>::type
+        , T1, T2
+        >
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply< F,T1,T2,na,na,na >
+    : apply2< F,T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3
+
+    : apply_wrap3<
+          typename lambda<F>::type
+        , T1, T2, T3
+        >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply< F,T1,T2,T3,na,na >
+    : apply3< F,T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4
+
+    : apply_wrap4<
+          typename lambda<F>::type
+        , T1, T2, T3, T4
+        >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply< F,T1,T2,T3,T4,na >
+    : apply4< F,T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5
+
+    : apply_wrap5<
+          typename lambda<F>::type
+        , T1, T2, T3, T4, T5
+        >
+{
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply
+    : apply5< F,T1,T2,T3,T4,T5 >
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp
new file mode 100644
index 0000000..b2ed5d5
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp
@@ -0,0 +1,52 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na
+    >
+struct apply;
+
+template<
+      typename F
+    >
+struct apply0;
+
+template<
+      typename F, typename T1
+    >
+struct apply1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct apply2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct apply3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct apply4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct apply5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp b/ext/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp
new file mode 100644
index 0000000..34d51a1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp
@@ -0,0 +1,84 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/apply_wrap.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F
+
+    , typename has_apply_ = typename aux::has_apply<F>::type
+
+    >
+struct apply_wrap0
+
+    : F::template apply<  >
+{
+};
+
+template< typename F >
+struct apply_wrap0< F,true_ >
+    : F::apply
+{
+};
+
+template<
+      typename F, typename T1
+
+    >
+struct apply_wrap1
+
+    : F::template apply<T1>
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+
+    >
+struct apply_wrap2
+
+    : F::template apply< T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+
+    >
+struct apply_wrap3
+
+    : F::template apply< T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+
+    >
+struct apply_wrap4
+
+    : F::template apply< T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+
+    >
+struct apply_wrap5
+
+    : F::template apply< T1,T2,T3,T4,T5 >
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/arg.hpp b/ext/boost/mpl/aux_/preprocessed/plain/arg.hpp
new file mode 100644
index 0000000..6f2f8a8
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/arg.hpp
@@ -0,0 +1,123 @@
+
+// Copyright Peter Dimov 2001-2002
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/arg.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+template<> struct arg< -1 >
+{
+    BOOST_STATIC_CONSTANT(int, value  = -1);
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<1>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 1);
+    typedef arg<2> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U1 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<2>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 2);
+    typedef arg<3> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U2 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<3>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 3);
+    typedef arg<4> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U3 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<4>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 4);
+    typedef arg<5> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U4 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+template<> struct arg<5>
+{
+    BOOST_STATIC_CONSTANT(int, value  = 5);
+    typedef arg<6> next;
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
+    BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
+
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+        typedef U5 type;
+        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
+    };
+};
+
+BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg)
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp b/ext/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp
new file mode 100644
index 0000000..b070232
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp
@@ -0,0 +1,440 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+{
+    typedef T type;
+};
+
+template<
+      int N, typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
+{
+    typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 >
+{
+    typedef bind< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind0<F>, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind0<F> f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F
+    >
+struct bind< F,na,na,na,na,na >
+    : bind0<F>
+{
+};
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename U1, typename U2, typename U3
+    , typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind1< F,T1 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind1< F,T1 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1
+    >
+struct bind< F,T1,na,na,na,na >
+    : bind1< F,T1 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename U1, typename U2
+    , typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind2< F,T1,T2 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind2< F,T1,T2 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind< F,T1,T2,na,na,na >
+    : bind2< F,T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename U1
+    , typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind3< F,T1,T2,T3 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind< F,T1,T2,T3,na,na >
+    : bind3< F,T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind4< F,T1,T2,T3,T4 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind< F,T1,T2,T3,T4,na >
+    : bind4< F,T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
+        typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
+
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind5< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+
+/// primary template (not a specialization!)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind
+    : bind5< F,T1,T2,T3,T4,T5 >
+{
+};
+
+/// if_/eval_if specializations
+template< template< typename T1, typename T2, typename T3 > class F, typename Tag >
+struct quote3;
+
+template< typename T1, typename T2, typename T3 > struct if_;
+
+template<
+      typename Tag, typename T1, typename T2, typename T3
+    >
+struct bind3<
+      quote3< if_,Tag >
+    , T1, T2, T3
+    >
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef mpl::arg<1> n1;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef typename if_<
+              typename t1::type
+            , t2, t3
+            >::type f_;
+
+     public:
+        typedef typename f_::type type;
+    };
+};
+
+template<
+      template< typename T1, typename T2, typename T3 > class F, typename Tag
+    >
+struct quote3;
+
+template< typename T1, typename T2, typename T3 > struct eval_if;
+
+template<
+      typename Tag, typename T1, typename T2, typename T3
+    >
+struct bind3<
+      quote3< eval_if,Tag >
+    , T1, T2, T3
+    >
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef mpl::arg<1> n1;
+        typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
+        typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
+        typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
+        typedef typename eval_if<
+              typename t1::type
+            , t2, t3
+            >::type f_;
+
+     public:
+        typedef typename f_::type type;
+    };
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/bind.hpp b/ext/boost/mpl/aux_/preprocessed/plain/bind.hpp
new file mode 100644
index 0000000..0e9513a
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/bind.hpp
@@ -0,0 +1,561 @@
+
+// Copyright Peter Dimov 2001
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bind.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename T, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg
+{
+    typedef T type;
+};
+
+template<
+      typename T
+    , typename Arg
+    >
+struct replace_unnamed_arg
+{
+    typedef Arg next;
+    typedef T type;
+};
+
+template<
+      typename Arg
+    >
+struct replace_unnamed_arg< arg< -1 >, Arg >
+{
+    typedef typename Arg::next next;
+    typedef Arg type;
+};
+
+template<
+      int N, typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
+{
+    typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 >
+{
+    typedef bind< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename F
+    >
+struct bind0
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+     public:
+        typedef typename apply_wrap0<
+              f_
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind0<F>, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind0<F> f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
+
+template<
+      typename F
+    >
+struct bind< F,na,na,na,na,na >
+    : bind0<F>
+{
+};
+
+template<
+      typename F, typename T1
+    >
+struct bind1
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+     public:
+        typedef typename apply_wrap1<
+              f_
+            , typename t1::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename U1, typename U2, typename U3
+    , typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind1< F,T1 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind1< F,T1 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
+
+template<
+      typename F, typename T1
+    >
+struct bind< F,T1,na,na,na,na >
+    : bind1< F,T1 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+     public:
+        typedef typename apply_wrap2<
+              f_
+            , typename t1::type, typename t2::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename U1, typename U2
+    , typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind2< F,T1,T2 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind2< F,T1,T2 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind< F,T1,T2,na,na,na >
+    : bind2< F,T1,T2 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+     public:
+        typedef typename apply_wrap3<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename U1
+    , typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind3< F,T1,T2,T3 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind< F,T1,T2,T3,na,na >
+    : bind3< F,T1,T2,T3 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+     public:
+        typedef typename apply_wrap4<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename U1, typename U2, typename U3, typename U4, typename U5
+    >
+struct resolve_bind_arg<
+      bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind4< F,T1,T2,T3,T4 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind< F,T1,T2,T3,T4,na >
+    : bind4< F,T1,T2,T3,T4 >
+{
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+        typedef typename r0::type a0;
+        typedef typename r0::next n1;
+        typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+        ///
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef aux::replace_unnamed_arg< T4,n4 > r4;
+        typedef typename r4::type a4;
+        typedef typename r4::next n5;
+        typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+        ///
+        typedef aux::replace_unnamed_arg< T5,n5 > r5;
+        typedef typename r5::type a5;
+        typedef typename r5::next n6;
+        typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5;
+        ///
+     public:
+        typedef typename apply_wrap5<
+              f_
+            , typename t1::type, typename t2::type, typename t3::type
+            , typename t4::type, typename t5::type
+            >::type type;
+
+    };
+};
+
+namespace aux {
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename U1, typename U2, typename U3, typename U4
+    , typename U5
+    >
+struct resolve_bind_arg<
+      bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
+    >
+{
+    typedef bind5< F,T1,T2,T3,T4,T5 > f_;
+    typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
+BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
+
+/// primary template (not a specialization!)
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind
+    : bind5< F,T1,T2,T3,T4,T5 >
+{
+};
+
+/// if_/eval_if specializations
+template< template< typename T1, typename T2, typename T3 > class F, typename Tag >
+struct quote3;
+
+template< typename T1, typename T2, typename T3 > struct if_;
+
+template<
+      typename Tag, typename T1, typename T2, typename T3
+    >
+struct bind3<
+      quote3< if_,Tag >
+    , T1, T2, T3
+    >
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef mpl::arg<1> n1;
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef typename if_<
+              typename t1::type
+            , t2, t3
+            >::type f_;
+
+     public:
+        typedef typename f_::type type;
+    };
+};
+
+template<
+      template< typename T1, typename T2, typename T3 > class F, typename Tag
+    >
+struct quote3;
+
+template< typename T1, typename T2, typename T3 > struct eval_if;
+
+template<
+      typename Tag, typename T1, typename T2, typename T3
+    >
+struct bind3<
+      quote3< eval_if,Tag >
+    , T1, T2, T3
+    >
+{
+    template<
+          typename U1 = na, typename U2 = na, typename U3 = na
+        , typename U4 = na, typename U5 = na
+        >
+    struct apply
+    {
+     private:
+        typedef mpl::arg<1> n1;
+        typedef aux::replace_unnamed_arg< T1,n1 > r1;
+        typedef typename r1::type a1;
+        typedef typename r1::next n2;
+        typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+        ///
+        typedef aux::replace_unnamed_arg< T2,n2 > r2;
+        typedef typename r2::type a2;
+        typedef typename r2::next n3;
+        typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+        ///
+        typedef aux::replace_unnamed_arg< T3,n3 > r3;
+        typedef typename r3::type a3;
+        typedef typename r3::next n4;
+        typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+        ///
+        typedef typename eval_if<
+              typename t1::type
+            , t2, t3
+            >::type f_;
+
+     public:
+        typedef typename f_::type type;
+    };
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp b/ext/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp
new file mode 100644
index 0000000..c4a5060
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp
@@ -0,0 +1,52 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bind_fwd.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename F, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na
+    >
+struct bind;
+
+template<
+      typename F
+    >
+struct bind0;
+
+template<
+      typename F, typename T1
+    >
+struct bind1;
+
+template<
+      typename F, typename T1, typename T2
+    >
+struct bind2;
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    >
+struct bind3;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    >
+struct bind4;
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct bind5;
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/bitand.hpp b/ext/boost/mpl/aux_/preprocessed/plain/bitand.hpp
new file mode 100644
index 0000000..ee40fb3
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/bitand.hpp
@@ -0,0 +1,142 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitand.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitand_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitand_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitand_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitand_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitand_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitand_
+    : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5>
+{
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitand_< N1,N2,N3,N4,na >
+
+    : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitand_< N1,N2,N3,na,na >
+
+    : bitand_< bitand_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitand_< N1,N2,na,na,na >
+    : bitand_impl<
+          typename bitand_tag<N1>::type
+        , typename bitand_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitand_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitand_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  & BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/bitor.hpp b/ext/boost/mpl/aux_/preprocessed/plain/bitor.hpp
new file mode 100644
index 0000000..1e28d3b
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/bitor.hpp
@@ -0,0 +1,142 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitor_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitor_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitor_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitor_
+    : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5>
+{
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitor_< N1,N2,N3,N4,na >
+
+    : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitor_< N1,N2,N3,na,na >
+
+    : bitor_< bitor_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitor_< N1,N2,na,na,na >
+    : bitor_impl<
+          typename bitor_tag<N1>::type
+        , typename bitor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitor_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  | BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/bitxor.hpp b/ext/boost/mpl/aux_/preprocessed/plain/bitxor.hpp
new file mode 100644
index 0000000..2ba879d
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/bitxor.hpp
@@ -0,0 +1,142 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/bitxor.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct bitxor_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct bitxor_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitxor_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct bitxor_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct bitxor_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct bitxor_
+    : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5>
+{
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct bitxor_< N1,N2,N3,N4,na >
+
+    : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct bitxor_< N1,N2,N3,na,na >
+
+    : bitxor_< bitxor_< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct bitxor_< N1,N2,na,na,na >
+    : bitxor_impl<
+          typename bitxor_tag<N1>::type
+        , typename bitxor_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , bitxor_
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct bitxor_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/deque.hpp b/ext/boost/mpl/aux_/preprocessed/plain/deque.hpp
new file mode 100644
index 0000000..de67398
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/deque.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/deque.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct deque;
+
+template<
+     
+    >
+struct deque<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector0<  >
+{
+    typedef vector0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct deque<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector1<T0>
+{
+    typedef typename vector1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct deque<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector2< T0,T1 >
+{
+    typedef typename vector2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct deque<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector3< T0,T1,T2 >
+{
+    typedef typename vector3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct deque<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector4< T0,T1,T2,T3 >
+{
+    typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct deque<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector5< T0,T1,T2,T3,T4 >
+{
+    typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : vector15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : vector16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : vector17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : vector18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct deque<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : vector19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct deque
+    : vector20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/divides.hpp b/ext/boost/mpl/aux_/preprocessed/plain/divides.hpp
new file mode 100644
index 0000000..f365d62
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/divides.hpp
@@ -0,0 +1,141 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/divides.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct divides_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct divides_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct divides_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct divides_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct divides_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct divides
+    : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5>
+{
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct divides< N1,N2,N3,N4,na >
+
+    : divides< divides< divides< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct divides< N1,N2,N3,na,na >
+
+    : divides< divides< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct divides< N1,N2,na,na,na >
+    : divides_impl<
+          typename divides_tag<N1>::type
+        , typename divides_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , divides
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, divides)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct divides_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  / BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/plain/equal_to.hpp
new file mode 100644
index 0000000..bbc6bf0
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/equal_to.hpp
@@ -0,0 +1,92 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct equal_to_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct equal_to_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct equal_to
+
+    : equal_to_impl<
+          typename equal_to_tag<N1>::type
+        , typename equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value  == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp
new file mode 100644
index 0000000..9e7a293
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp
@@ -0,0 +1,180 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 0,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 1,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef state1 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 2,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef state2 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 3,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef state3 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< 4,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef state4 state;
+    typedef iter4 iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl
+{
+    typedef fold_impl<
+          4
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< -1,First,Last,State,ForwardOp >
+    : fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct fold_impl< -1,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp b/ext/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp
new file mode 100644
index 0000000..bf81873
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp
@@ -0,0 +1,554 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+   
+    >
+struct lambda
+{
+    typedef false_ is_le;
+    typedef T result_;
+    typedef T type;
+};
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+template< int N, typename Tag >
+struct lambda< arg<N>, Tag >
+{
+    typedef true_ is_le;
+    typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41
+    typedef mpl::protect<result_> type;
+};
+
+template<
+      typename F
+    , typename Tag
+    >
+struct lambda<
+          bind0<F>
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind0<
+          F
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1
+{
+    typedef F<
+          typename L1::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1 > class F
+    , typename L1
+    >
+struct le_result1< true_,Tag,F,L1 >
+{
+    typedef bind1<
+          quote1< F,Tag >
+        , typename L1::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1 > class F
+    , typename T1
+    , typename Tag
+    >
+struct lambda<
+          F<T1>
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef typename l1::is_le is_le1;
+    typedef typename aux::lambda_or<
+          is_le1::value
+        >::type is_le;
+
+    typedef aux::le_result1<
+          is_le, Tag, F, l1
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1
+    , typename Tag
+    >
+struct lambda<
+          bind1< F,T1 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind1<
+          F
+        , T1
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2
+{
+    typedef F<
+          typename L1::type, typename L2::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2 > class F
+    , typename L1, typename L2
+    >
+struct le_result2< true_,Tag,F,L1,L2 >
+{
+    typedef bind2<
+          quote2< F,Tag >
+        , typename L1::result_, typename L2::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2 > class F
+    , typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value
+        >::type is_le;
+
+    typedef aux::le_result2<
+          is_le, Tag, F, l1, l2
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2
+    , typename Tag
+    >
+struct lambda<
+          bind2< F,T1,T2 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind2<
+          F
+        , T1, T2
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3 > class F
+    , typename L1, typename L2, typename L3
+    >
+struct le_result3< true_,Tag,F,L1,L2,L3 >
+{
+    typedef bind3<
+          quote3< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3 > class F
+    , typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value
+        >::type is_le;
+
+    typedef aux::le_result3<
+          is_le, Tag, F, l1, l2, l3
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3
+    , typename Tag
+    >
+struct lambda<
+          bind3< F,T1,T2,T3 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind3<
+          F
+        , T1, T2, T3
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename L1, typename L2, typename L3, typename L4
+    >
+struct le_result4< true_,Tag,F,L1,L2,L3,L4 >
+{
+    typedef bind4<
+          quote4< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        >::type is_le;
+
+    typedef aux::le_result4<
+          is_le, Tag, F, l1, l2, l3, l4
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename Tag
+    >
+struct lambda<
+          bind4< F,T1,T2,T3,T4 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind4<
+          F
+        , T1, T2, T3, T4
+        > result_;
+
+    typedef result_ type;
+};
+
+namespace aux {
+
+template<
+      typename IsLE, typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5
+{
+    typedef F<
+          typename L1::type, typename L2::type, typename L3::type
+        , typename L4::type, typename L5::type
+        > result_;
+
+    typedef result_ type;
+};
+
+template<
+      typename Tag
+    , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+    , typename L1, typename L2, typename L3, typename L4, typename L5
+    >
+struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 >
+{
+    typedef bind5<
+          quote5< F,Tag >
+        , typename L1::result_, typename L2::result_, typename L3::result_
+        , typename L4::result_, typename L5::result_
+        > result_;
+
+    typedef mpl::protect<result_> type;
+};
+
+} // namespace aux
+
+template<
+      template<
+          typename P1, typename P2, typename P3, typename P4
+        , typename P5
+        >
+      class F
+    , typename T1, typename T2, typename T3, typename T4, typename T5
+    , typename Tag
+    >
+struct lambda<
+          F< T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef lambda< T1,Tag > l1;
+    typedef lambda< T2,Tag > l2;
+    typedef lambda< T3,Tag > l3;
+    typedef lambda< T4,Tag > l4;
+    typedef lambda< T5,Tag > l5;
+    
+    typedef typename l1::is_le is_le1;
+    typedef typename l2::is_le is_le2;
+    typedef typename l3::is_le is_le3;
+    typedef typename l4::is_le is_le4;
+    typedef typename l5::is_le is_le5;
+    
+
+    typedef typename aux::lambda_or<
+          is_le1::value, is_le2::value, is_le3::value, is_le4::value
+        , is_le5::value
+        >::type is_le;
+
+    typedef aux::le_result5<
+          is_le, Tag, F, l1, l2, l3, l4, l5
+        > le_result_;
+
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind5< F,T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind5<
+          F
+        , T1, T2, T3, T4, T5
+        > result_;
+
+    typedef result_ type;
+};
+
+/// special case for 'protect'
+template< typename T, typename Tag >
+struct lambda< mpl::protect<T>, Tag >
+{
+    typedef false_ is_le;
+    typedef mpl::protect<T> result_;
+    typedef result_ type;
+};
+
+/// specializations for the main 'bind' form
+
+template<
+      typename F, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    , typename Tag
+    >
+struct lambda<
+          bind< F,T1,T2,T3,T4,T5 >
+        , Tag
+       
+        >
+{
+    typedef false_ is_le;
+    typedef bind< F,T1,T2,T3,T4,T5 > result_;
+    typedef result_ type;
+};
+
+/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars
+
+template<
+      typename F, typename Tag1, typename Tag2
+    >
+struct lambda<
+          lambda< F,Tag1 >
+        , Tag2
+        >
+{
+    typedef lambda< F,Tag2 > l1;
+    typedef lambda< Tag1,Tag2 > l2;
+    typedef typename l1::is_le is_le;
+    typedef aux::le_result2<is_le, Tag2, mpl::lambda, l1, l2> le_result_;
+    typedef typename le_result_::result_ result_;
+    typedef typename le_result_::type type;
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, lambda)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/greater.hpp b/ext/boost/mpl/aux_/preprocessed/plain/greater.hpp
new file mode 100644
index 0000000..38c8bb3
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/greater.hpp
@@ -0,0 +1,92 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater
+
+    : greater_impl<
+          typename greater_tag<N1>::type
+        , typename greater_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp b/ext/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp
new file mode 100644
index 0000000..2aa8370
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp
@@ -0,0 +1,92 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/greater_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct greater_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct greater_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_equal_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct greater_equal_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct greater_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct greater_equal
+
+    : greater_equal_impl<
+          typename greater_equal_tag<N1>::type
+        , typename greater_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct greater_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/inherit.hpp b/ext/boost/mpl/aux_/preprocessed/plain/inherit.hpp
new file mode 100644
index 0000000..8b34e71
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/inherit.hpp
@@ -0,0 +1,125 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/inherit.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    >
+struct inherit2
+    : T1, T2
+{
+    typedef inherit2 type;
+};
+
+template< typename T1 >
+struct inherit2< T1,empty_base >
+{
+    typedef T1 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base))
+};
+
+template< typename T2 >
+struct inherit2< empty_base,T2 >
+{
+    typedef T2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2))
+};
+
+template<>
+struct inherit2< empty_base,empty_base >
+{
+    typedef empty_base type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, inherit2)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na
+    >
+struct inherit3
+    : inherit2<
+          typename inherit2<
+              T1, T2
+            >::type
+        , T3
+        >
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, inherit3)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    >
+struct inherit4
+    : inherit2<
+          typename inherit3<
+              T1, T2, T3
+            >::type
+        , T4
+        >
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC(4, inherit4)
+
+template<
+      typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+    , typename T5 = na
+    >
+struct inherit5
+    : inherit2<
+          typename inherit4<
+              T1, T2, T3, T4
+            >::type
+        , T5
+        >
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC(5, inherit5)
+
+/// primary template
+
+template<
+      typename T1 = empty_base, typename T2 = empty_base
+    , typename T3 = empty_base, typename T4 = empty_base
+    , typename T5 = empty_base
+    >
+struct inherit
+    : inherit5< T1,T2,T3,T4,T5 >
+{
+};
+
+template<>
+struct inherit< na,na,na,na,na >
+{
+    template<
+
+          typename T1 = empty_base, typename T2 = empty_base
+        , typename T3 = empty_base, typename T4 = empty_base
+        , typename T5 = empty_base
+
+        >
+    struct apply
+        : inherit< T1,T2,T3,T4,T5 >
+    {
+    };
+};
+
+BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit)
+BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit)
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp b/ext/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp
new file mode 100644
index 0000000..6951795
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp
@@ -0,0 +1,133 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright David Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename Iterator, typename State >
+struct iter_fold_if_null_step
+{
+    typedef State state;
+    typedef Iterator iterator;
+};
+
+template< bool >
+struct iter_fold_if_step_impl
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef typename apply2< StateOp,State,Iterator >::type state;
+        typedef typename IteratorOp::type iterator;
+    };
+};
+
+template<>
+struct iter_fold_if_step_impl<false>
+{
+    template<
+          typename Iterator
+        , typename State
+        , typename StateOp
+        , typename IteratorOp
+        >
+    struct result_
+    {
+        typedef State state;
+        typedef Iterator iterator;
+    };
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_forward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename BackwardOp
+    , typename Predicate
+    >
+struct iter_fold_if_backward_step
+{
+    typedef typename apply2< Predicate,State,Iterator >::type not_last;
+    typedef typename iter_fold_if_step_impl<
+          BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
+        >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_;
+
+    typedef typename impl_::state state;
+    typedef typename impl_::iterator iterator;
+};
+
+template<
+      typename Iterator
+    , typename State
+    , typename ForwardOp
+    , typename ForwardPredicate
+    , typename BackwardOp
+    , typename BackwardPredicate
+    >
+struct iter_fold_if_impl
+{
+ private:
+    typedef iter_fold_if_null_step< Iterator,State > forward_step0;
+    typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1;
+    typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2;
+    typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3;
+    typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4;
+    
+
+    typedef typename if_<
+          typename forward_step4::not_last
+        , iter_fold_if_impl<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            , ForwardOp
+            , ForwardPredicate
+            , BackwardOp
+            , BackwardPredicate
+            >
+        , iter_fold_if_null_step<
+              typename forward_step4::iterator
+            , typename forward_step4::state
+            >
+        >::type backward_step4;
+
+    typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3;
+    typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2;
+    typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1;
+    typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0;
+    
+
+ public:
+    typedef typename backward_step0::state state;
+    typedef typename backward_step4::iterator iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp
new file mode 100644
index 0000000..805790e
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp
@@ -0,0 +1,180 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 0,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 1,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef state1 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 2,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef state2 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 3,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef state3 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< 4,First,Last,State,ForwardOp >
+{
+    typedef First iter0;
+    typedef State state0;
+    typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef state4 state;
+    typedef iter4 iterator;
+};
+
+template<
+      int N
+    , typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl
+{
+    typedef iter_fold_impl<
+          4
+        , First
+        , Last
+        , State
+        , ForwardOp
+        > chunk_;
+
+    typedef iter_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , typename chunk_::iterator
+        , Last
+        , typename chunk_::state
+        , ForwardOp
+        > res_;
+
+    typedef typename res_::state state;
+    typedef typename res_::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< -1,First,Last,State,ForwardOp >
+    : iter_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , ForwardOp
+        >
+{
+};
+
+template<
+      typename Last
+    , typename State
+    , typename ForwardOp
+    >
+struct iter_fold_impl< -1,Last,Last,State,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp b/ext/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp
new file mode 100644
index 0000000..f8f109c
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp
@@ -0,0 +1,228 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+    , bool C5 = false
+    >
+struct lambda_or
+    : true_
+{
+};
+
+template<>
+struct lambda_or< false,false,false,false,false >
+    : false_
+{
+};
+
+template< typename Arity > struct lambda_impl
+{
+    template< typename T, typename Tag, typename Protect > struct result_
+    {
+        typedef T type;
+        typedef is_placeholder<T> is_le;
+    };
+};
+
+template<> struct lambda_impl< int_<1> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef typename l1::is_le is_le1;
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value
+            > is_le;
+
+        typedef bind1<
+              typename F::rebind
+            , typename l1::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<2> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value
+            > is_le;
+
+        typedef bind2<
+              typename F::rebind
+            , typename l1::type, typename l2::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<3> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value
+            > is_le;
+
+        typedef bind3<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<4> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value
+            > is_le;
+
+        typedef bind4<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+template<> struct lambda_impl< int_<5> >
+{
+    template< typename F, typename Tag, typename Protect > struct result_
+    {
+        typedef lambda< typename F::arg1, Tag, false_ > l1;
+        typedef lambda< typename F::arg2, Tag, false_ > l2;
+        typedef lambda< typename F::arg3, Tag, false_ > l3;
+        typedef lambda< typename F::arg4, Tag, false_ > l4;
+        typedef lambda< typename F::arg5, Tag, false_ > l5;
+        
+        typedef typename l1::is_le is_le1;
+        typedef typename l2::is_le is_le2;
+        typedef typename l3::is_le is_le3;
+        typedef typename l4::is_le is_le4;
+        typedef typename l5::is_le is_le5;
+        
+
+        typedef aux::lambda_or<
+              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value
+            > is_le;
+
+        typedef bind5<
+              typename F::rebind
+            , typename l1::type, typename l2::type, typename l3::type
+            , typename l4::type, typename l5::type
+            > bind_;
+
+        typedef typename if_<
+              is_le
+            , if_< Protect, mpl::protect<bind_>, bind_ >
+            , identity<F>
+            >::type type_;
+
+        typedef typename type_::type type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename T
+    , typename Tag
+    , typename Protect
+    >
+struct lambda
+{
+    /// Metafunction forwarding confuses MSVC 6.x
+    typedef typename aux::template_arity<T>::type arity_;
+    typedef typename aux::lambda_impl<arity_>
+        ::template result_< T,Tag,Protect > l_;
+
+    typedef typename l_::type type;
+    typedef typename l_::is_le is_le;
+};
+
+BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
+
+template<
+      typename T
+    >
+struct is_lambda_expression
+    : lambda<T>::is_le
+{
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/less.hpp b/ext/boost/mpl/aux_/preprocessed/plain/less.hpp
new file mode 100644
index 0000000..928d0e3
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/less.hpp
@@ -0,0 +1,92 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less
+
+    : less_impl<
+          typename less_tag<N1>::type
+        , typename less_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/less_equal.hpp b/ext/boost/mpl/aux_/preprocessed/plain/less_equal.hpp
new file mode 100644
index 0000000..364cd96
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/less_equal.hpp
@@ -0,0 +1,92 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/less_equal.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct less_equal_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct less_equal_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_equal_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct less_equal_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct less_equal_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct less_equal
+
+    : less_equal_impl<
+          typename less_equal_tag<N1>::type
+        , typename less_equal_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct less_equal_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/list.hpp b/ext/boost/mpl/aux_/preprocessed/plain/list.hpp
new file mode 100644
index 0000000..4e8ad53
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/list.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct list;
+
+template<
+     
+    >
+struct list<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list0<  >
+{
+    typedef list0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct list<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list1<T0>
+{
+    typedef typename list1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct list<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list2< T0,T1 >
+{
+    typedef typename list2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct list<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list3< T0,T1,T2 >
+{
+    typedef typename list3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct list<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list4< T0,T1,T2,T3 >
+{
+    typedef typename list4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct list<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list5< T0,T1,T2,T3,T4 >
+{
+    typedef typename list5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : list15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : list16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : list17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : list18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct list<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : list19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct list
+    : list20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/list_c.hpp b/ext/boost/mpl/aux_/preprocessed/plain/list_c.hpp
new file mode 100644
index 0000000..0b48a7f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/list_c.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct list_c;
+
+template<
+      typename T
+    >
+struct list_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list0_c<T>
+{
+    typedef typename list0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct list_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list1_c< T,C0 >
+{
+    typedef typename list1_c< T,C0 >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct list_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list2_c< T,C0,C1 >
+{
+    typedef typename list2_c< T,C0,C1 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct list_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list3_c< T,C0,C1,C2 >
+{
+    typedef typename list3_c< T,C0,C1,C2 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct list_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list4_c< T,C0,C1,C2,C3 >
+{
+    typedef typename list4_c< T,C0,C1,C2,C3 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list5_c< T,C0,C1,C2,C3,C4 >
+{
+    typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list6_c< T,C0,C1,C2,C3,C4,C5 >
+{
+    typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+{
+    typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+{
+    typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+{
+    typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+{
+    typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+{
+    typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+{
+    typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+{
+    typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list14_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        >
+{
+    typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list15_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        >
+{
+    typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list16_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15
+        >
+{
+    typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : list17_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16
+        >
+{
+    typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : list18_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17
+        >
+{
+    typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct list_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : list19_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18
+        >
+{
+    typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct list_c
+    : list20_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, C19
+        >
+{
+    typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/map.hpp b/ext/boost/mpl/aux_/preprocessed/plain/map.hpp
new file mode 100644
index 0000000..837e013
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/map.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct map;
+
+template<
+     
+    >
+struct map<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map0<  >
+{
+    typedef map0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct map<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map1<T0>
+{
+    typedef typename map1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct map<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map2< T0,T1 >
+{
+    typedef typename map2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct map<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map3< T0,T1,T2 >
+{
+    typedef typename map3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct map<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map4< T0,T1,T2,T3 >
+{
+    typedef typename map4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct map<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map5< T0,T1,T2,T3,T4 >
+{
+    typedef typename map5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : map15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : map16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : map17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : map18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct map<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : map19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct map
+    : map20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/minus.hpp b/ext/boost/mpl/aux_/preprocessed/plain/minus.hpp
new file mode 100644
index 0000000..0b8b5ce
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/minus.hpp
@@ -0,0 +1,141 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/minus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct minus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct minus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct minus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct minus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct minus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct minus
+    : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5>
+{
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct minus< N1,N2,N3,N4,na >
+
+    : minus< minus< minus< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct minus< N1,N2,N3,na,na >
+
+    : minus< minus< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct minus< N1,N2,na,na,na >
+    : minus_impl<
+          typename minus_tag<N1>::type
+        , typename minus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , minus
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, minus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct minus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  - BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/modulus.hpp b/ext/boost/mpl/aux_/preprocessed/plain/modulus.hpp
new file mode 100644
index 0000000..6a64e49
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/modulus.hpp
@@ -0,0 +1,99 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/modulus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct modulus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct modulus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct modulus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct modulus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct modulus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct modulus
+
+    : modulus_impl<
+          typename modulus_tag<N1>::type
+        , typename modulus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct modulus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  % BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp b/ext/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp
new file mode 100644
index 0000000..c08d7f0
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp
@@ -0,0 +1,92 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/not_equal_to.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct not_equal_to_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct not_equal_to_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct not_equal_to_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct not_equal_to_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct not_equal_to_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct not_equal_to
+
+    : not_equal_to_impl<
+          typename not_equal_to_tag<N1>::type
+        , typename not_equal_to_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to)
+
+}}
+
+namespace boost { namespace mpl {
+
+template<>
+struct not_equal_to_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/or.hpp b/ext/boost/mpl/aux_/preprocessed/plain/or.hpp
new file mode 100644
index 0000000..986b2e0
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/or.hpp
@@ -0,0 +1,64 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/or.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool C_, typename T1, typename T2, typename T3, typename T4 >
+struct or_impl
+    : true_
+{
+};
+
+template< typename T1, typename T2, typename T3, typename T4 >
+struct or_impl< false,T1,T2,T3,T4 >
+    : or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4
+        , false_
+        >
+{
+};
+
+template<>
+struct or_impl<
+          false
+        , false_, false_, false_, false_
+        >
+    : false_
+{
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    , typename T3 = false_, typename T4 = false_, typename T5 = false_
+    >
+struct or_
+
+    : aux::or_impl<
+          BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
+        , T2, T3, T4, T5
+        >
+
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC2(
+      2
+    , 5
+    , or_
+    )
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/placeholders.hpp b/ext/boost/mpl/aux_/preprocessed/plain/placeholders.hpp
new file mode 100644
index 0000000..ff97364
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/placeholders.hpp
@@ -0,0 +1,105 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright Peter Dimov 2001-2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/placeholders.hpp" header
+// -- DO NOT modify by hand!
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg< -1 > _;
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_;
+}
+
+}}
+
+/// agurt, 17/mar/02: one more placeholder for the last 'apply#' 
+/// specialization
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<1> _1;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<2> _2;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<3> _3;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<4> _4;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<5> _5;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5;
+}
+
+}}
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+typedef arg<6> _6;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6)
+
+namespace placeholders {
+using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6;
+}
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/plus.hpp b/ext/boost/mpl/aux_/preprocessed/plain/plus.hpp
new file mode 100644
index 0000000..ed2e432
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/plus.hpp
@@ -0,0 +1,141 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/plus.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct plus_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct plus_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct plus_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct plus_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct plus_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct plus
+    : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5>
+{
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct plus< N1,N2,N3,N4,na >
+
+    : plus< plus< plus< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct plus< N1,N2,N3,na,na >
+
+    : plus< plus< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct plus< N1,N2,na,na,na >
+    : plus_impl<
+          typename plus_tag<N1>::type
+        , typename plus_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , plus
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, plus)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct plus_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  + BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/quote.hpp b/ext/boost/mpl/aux_/preprocessed/plain/quote.hpp
new file mode 100644
index 0000000..d7d0420
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/quote.hpp
@@ -0,0 +1,123 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/quote.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template< typename T, bool has_type_ >
+struct quote_impl
+    : T
+{
+};
+
+template< typename T >
+struct quote_impl< T,false >
+{
+    typedef T type;
+};
+
+template<
+      template< typename P1 > class F
+    , typename Tag = void_
+    >
+struct quote1
+{
+    template< typename U1 > struct apply
+
+        : quote_impl<
+              F<U1>
+            , aux::has_type< F<U1> >::value
+            >
+
+    {
+    };
+};
+
+template<
+      template< typename P1, typename P2 > class F
+    , typename Tag = void_
+    >
+struct quote2
+{
+    template< typename U1, typename U2 > struct apply
+
+        : quote_impl<
+              F< U1,U2 >
+            , aux::has_type< F< U1,U2 > >::value
+            >
+
+    {
+    };
+};
+
+template<
+      template< typename P1, typename P2, typename P3 > class F
+    , typename Tag = void_
+    >
+struct quote3
+{
+    template< typename U1, typename U2, typename U3 > struct apply
+
+        : quote_impl<
+              F< U1,U2,U3 >
+            , aux::has_type< F< U1,U2,U3 > >::value
+            >
+
+    {
+    };
+};
+
+template<
+      template< typename P1, typename P2, typename P3, typename P4 > class F
+    , typename Tag = void_
+    >
+struct quote4
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4
+        >
+    struct apply
+
+        : quote_impl<
+              F< U1,U2,U3,U4 >
+            , aux::has_type< F< U1,U2,U3,U4 > >::value
+            >
+
+    {
+    };
+};
+
+template<
+      template<
+          typename P1, typename P2, typename P3, typename P4
+        , typename P5
+        >
+      class F
+    , typename Tag = void_
+    >
+struct quote5
+{
+    template<
+          typename U1, typename U2, typename U3, typename U4
+        , typename U5
+        >
+    struct apply
+
+        : quote_impl<
+              F< U1,U2,U3,U4,U5 >
+            , aux::has_type< F< U1,U2,U3,U4,U5 > >::value
+            >
+
+    {
+    };
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp
new file mode 100644
index 0000000..c468684
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp
@@ -0,0 +1,231 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef fwd_state0 bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef fwd_state1 bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef fwd_state2 bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef fwd_state3 bkwd_state3;
+    typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef fwd_state4 bkwd_state4;
+    typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+    typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter4 iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef reverse_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , iter4
+        , Last
+        , fwd_state4
+        , BackwardOp
+        , ForwardOp
+        > nested_chunk;
+
+    typedef typename nested_chunk::state bkwd_state4;
+    typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+    typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+    typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+    typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef typename nested_chunk::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef reverse_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , typename deref<First>::type
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp b/ext/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp
new file mode 100644
index 0000000..658f92a
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp
@@ -0,0 +1,231 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl;
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef fwd_state0 bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter0 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    
+
+    typedef fwd_state1 bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    typedef bkwd_state0 state;
+    typedef iter1 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    
+
+    typedef fwd_state2 bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter2 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    
+
+    typedef fwd_state3 bkwd_state3;
+    typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter3 iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef fwd_state4 bkwd_state4;
+    typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+    typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef iter4 iterator;
+};
+
+template<
+      long N
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+    typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
+    typedef typename mpl::next<iter0>::type iter1;
+    typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
+    typedef typename mpl::next<iter1>::type iter2;
+    typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
+    typedef typename mpl::next<iter2>::type iter3;
+    typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
+    typedef typename mpl::next<iter3>::type iter4;
+    
+
+    typedef reverse_iter_fold_impl<
+          ( (N - 4) < 0 ? 0 : N - 4 )
+        , iter4
+        , Last
+        , fwd_state4
+        , BackwardOp
+        , ForwardOp
+        > nested_chunk;
+
+    typedef typename nested_chunk::state bkwd_state4;
+    typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
+    typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
+    typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
+    typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
+    
+
+    typedef bkwd_state0 state;
+    typedef typename nested_chunk::iterator iterator;
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp >
+{
+    typedef reverse_iter_fold_impl<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2< ForwardOp,State,First >::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , First
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp >
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+}}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/set.hpp b/ext/boost/mpl/aux_/preprocessed/plain/set.hpp
new file mode 100644
index 0000000..5721922
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/set.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct set;
+
+template<
+     
+    >
+struct set<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set0<  >
+{
+    typedef set0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct set<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set1<T0>
+{
+    typedef typename set1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct set<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set2< T0,T1 >
+{
+    typedef typename set2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct set<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set3< T0,T1,T2 >
+{
+    typedef typename set3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct set<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set4< T0,T1,T2,T3 >
+{
+    typedef typename set4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct set<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set5< T0,T1,T2,T3,T4 >
+{
+    typedef typename set5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : set15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : set16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : set17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : set18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct set<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : set19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct set
+    : set20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/set_c.hpp b/ext/boost/mpl/aux_/preprocessed/plain/set_c.hpp
new file mode 100644
index 0000000..cbeb932
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/set_c.hpp
@@ -0,0 +1,328 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct set_c;
+
+template<
+      typename T
+    >
+struct set_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set0_c<T>
+{
+    typedef typename set0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct set_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set1_c< T,C0 >
+{
+    typedef typename set1_c< T,C0 >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct set_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set2_c< T,C0,C1 >
+{
+    typedef typename set2_c< T,C0,C1 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct set_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set3_c< T,C0,C1,C2 >
+{
+    typedef typename set3_c< T,C0,C1,C2 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct set_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set4_c< T,C0,C1,C2,C3 >
+{
+    typedef typename set4_c< T,C0,C1,C2,C3 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set5_c< T,C0,C1,C2,C3,C4 >
+{
+    typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set6_c< T,C0,C1,C2,C3,C4,C5 >
+{
+    typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+{
+    typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+{
+    typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+{
+    typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+{
+    typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+{
+    typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+{
+    typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+{
+    typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set14_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        >
+{
+    typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set15_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        >
+{
+    typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set16_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15
+        >
+{
+    typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : set17_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16
+        >
+{
+    typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : set18_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17
+        >
+{
+    typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct set_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : set19_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18
+        >
+{
+    typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct set_c
+    : set20_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, C19
+        >
+{
+    typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/shift_left.hpp b/ext/boost/mpl/aux_/preprocessed/plain/shift_left.hpp
new file mode 100644
index 0000000..cf9c837
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/shift_left.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_left.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_left_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_left_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_left_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_left_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_left_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_left
+
+    : shift_left_impl<
+          typename shift_left_tag<N1>::type
+        , typename shift_left_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct shift_left_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  << BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/shift_right.hpp b/ext/boost/mpl/aux_/preprocessed/plain/shift_right.hpp
new file mode 100644
index 0000000..477229f
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/shift_right.hpp
@@ -0,0 +1,97 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/shift_right.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct shift_right_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct shift_right_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_right_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct shift_right_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct shift_right_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct shift_right
+
+    : shift_right_impl<
+          typename shift_right_tag<N1>::type
+        , typename shift_right_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct shift_right_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N, typename S > struct apply
+
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  >> BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/template_arity.hpp b/ext/boost/mpl/aux_/preprocessed/plain/template_arity.hpp
new file mode 100644
index 0000000..a23fc23
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/template_arity.hpp
@@ -0,0 +1,11 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header
+// -- DO NOT modify by hand!
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/times.hpp b/ext/boost/mpl/aux_/preprocessed/plain/times.hpp
new file mode 100644
index 0000000..ca88d40
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/times.hpp
@@ -0,0 +1,141 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/times.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename Tag1
+    , typename Tag2
+    >
+struct times_impl
+    : if_c<
+          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
+              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
+            )
+
+        , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 >
+        , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 >
+        >::type
+{
+};
+
+/// for Digital Mars C++/compilers with no CTPS/TTP support
+template<> struct times_impl< na,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct times_impl< na,Tag >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename Tag > struct times_impl< Tag,na >
+{
+    template< typename U1, typename U2 > struct apply
+    {
+        typedef apply type;
+        BOOST_STATIC_CONSTANT(int, value  = 0);
+    };
+};
+
+template< typename T > struct times_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    , typename N3 = na, typename N4 = na, typename N5 = na
+    >
+struct times
+    : times< times< times< times< N1,N2 >, N3>, N4>, N5>
+{
+};
+
+template<
+      typename N1, typename N2, typename N3, typename N4
+    >
+struct times< N1,N2,N3,N4,na >
+
+    : times< times< times< N1,N2 >, N3>, N4>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, N3, N4, na )
+        )
+};
+
+template<
+      typename N1, typename N2, typename N3
+    >
+struct times< N1,N2,N3,na,na >
+
+    : times< times< N1,N2 >, N3>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, N3, na, na )
+        )
+};
+
+template<
+      typename N1, typename N2
+    >
+struct times< N1,N2,na,na,na >
+    : times_impl<
+          typename times_tag<N1>::type
+        , typename times_tag<N2>::type
+        >::template apply< N1,N2 >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
+          5
+        , times
+        , ( N1, N2, na, na, na )
+        )
+
+};
+
+BOOST_MPL_AUX_NA_SPEC2(2, 5, times)
+
+}}
+
+namespace boost { namespace mpl {
+template<>
+struct times_impl< integral_c_tag,integral_c_tag >
+{
+    template< typename N1, typename N2 > struct apply
+
+        : integral_c<
+              typename aux::largest_int<
+                  typename N1::value_type
+                , typename N2::value_type
+                >::type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
+                  * BOOST_MPL_AUX_VALUE_WKND(N2)::value
+                )
+            >
+    {
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp b/ext/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp
new file mode 100644
index 0000000..2194ce9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp
@@ -0,0 +1,94 @@
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/unpack_args.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< int size, typename F, typename Args >
+struct unpack_args_impl;
+
+template< typename F, typename Args >
+struct unpack_args_impl< 0,F,Args >
+    : apply0<
+          F
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 1,F,Args >
+    : apply1<
+          F
+        , typename at_c< Args,0 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 2,F,Args >
+    : apply2<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 3,F,Args >
+    : apply3<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 4,F,Args >
+    : apply4<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+        >
+{
+};
+
+template< typename F, typename Args >
+struct unpack_args_impl< 5,F,Args >
+    : apply5<
+          F
+        , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
+        , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
+        , typename at_c< Args,4 >::type
+        >
+{
+};
+
+}
+
+template<
+      typename F
+    >
+struct unpack_args
+{
+    template< typename Args > struct apply
+
+        : aux::unpack_args_impl< size<Args>::value,F, Args >
+
+    {
+    };
+};
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/vector.hpp b/ext/boost/mpl/aux_/preprocessed/plain/vector.hpp
new file mode 100644
index 0000000..bfa9565
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/vector.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+    , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+    , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+    , typename T12 = na, typename T13 = na, typename T14 = na
+    , typename T15 = na, typename T16 = na, typename T17 = na
+    , typename T18 = na, typename T19 = na
+    >
+struct vector;
+
+template<
+     
+    >
+struct vector<
+          na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector0<  >
+{
+    typedef vector0<  >::type type;
+};
+
+template<
+      typename T0
+    >
+struct vector<
+          T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector1<T0>
+{
+    typedef typename vector1<T0>::type type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct vector<
+          T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector2< T0,T1 >
+{
+    typedef typename vector2< T0,T1 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct vector<
+          T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector3< T0,T1,T2 >
+{
+    typedef typename vector3< T0,T1,T2 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct vector<
+          T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector4< T0,T1,T2,T3 >
+{
+    typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct vector<
+          T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector5< T0,T1,T2,T3,T4 >
+{
+    typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector6< T0,T1,T2,T3,T4,T5 >
+{
+    typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+    typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+    typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+    typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+    typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+        , na, na, na
+        >
+    : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+    typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+        , na, na, na, na
+        >
+    : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+    typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+        , na, na, na, na
+        >
+    : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+    typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+        , na, na, na, na
+        >
+    : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+    typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+        , na, na, na, na
+        >
+    : vector15<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        >
+{
+    typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, na, na, na, na
+        >
+    : vector16<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15
+        >
+{
+    typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, na, na, na
+        >
+    : vector17<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16
+        >
+{
+    typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, na, na
+        >
+    : vector18<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17
+        >
+{
+    typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct vector<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, na
+        >
+    : vector19<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18
+        >
+{
+    typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct vector
+    : vector20<
+          T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+        , T15, T16, T17, T18, T19
+        >
+{
+    typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessed/plain/vector_c.hpp b/ext/boost/mpl/aux_/preprocessed/plain/vector_c.hpp
new file mode 100644
index 0000000..0f1560d
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessed/plain/vector_c.hpp
@@ -0,0 +1,309 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
+    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
+    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
+    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
+    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
+    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
+    , long C18 = LONG_MAX, long C19 = LONG_MAX
+    >
+struct vector_c;
+
+template<
+      typename T
+    >
+struct vector_c<
+          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector0_c<T>
+{
+    typedef typename vector0_c<T>::type type;
+};
+
+template<
+      typename T, long C0
+    >
+struct vector_c<
+          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector1_c< T, T(C0) >
+{
+    typedef typename vector1_c< T, T(C0) >::type type;
+};
+
+template<
+      typename T, long C0, long C1
+    >
+struct vector_c<
+          T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector2_c< T, T(C0), T(C1) >
+{
+    typedef typename vector2_c< T, T(C0), T(C1) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2
+    >
+struct vector_c<
+          T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector3_c< T, T(C0), T(C1), T(C2) >
+{
+    typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector4_c< T, T(C0), T(C1), T(C2), T(C3) >
+{
+    typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >
+{
+    typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >
+{
+    typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >
+{
+    typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX
+        >
+    : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >
+{
+    typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >
+{
+    typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        , LONG_MAX
+        >
+    : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >
+{
+    typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >
+{
+    typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >
+{
+    typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >
+{
+    typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >
+{
+    typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >
+{
+    typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >
+{
+    typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX
+        >
+    : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >
+{
+    typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, LONG_MAX, LONG_MAX
+        >
+    : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >
+{
+    typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type;
+};
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18
+    >
+struct vector_c<
+          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14
+        , C15, C16, C17, C18, LONG_MAX
+        >
+    : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >
+{
+    typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type;
+};
+
+/// primary template (not a specialization!)
+
+template<
+      typename T, long C0, long C1, long C2, long C3, long C4, long C5
+    , long C6, long C7, long C8, long C9, long C10, long C11, long C12
+    , long C13, long C14, long C15, long C16, long C17, long C18, long C19
+    >
+struct vector_c
+    : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >
+{
+    typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type;
+};
+
+}}
+
diff --git a/ext/boost/mpl/aux_/preprocessor/._def_params_tail.hpp b/ext/boost/mpl/aux_/preprocessor/._def_params_tail.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessor/._def_params_tail.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessor/._enum.hpp b/ext/boost/mpl/aux_/preprocessor/._enum.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessor/._enum.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessor/._filter_params.hpp b/ext/boost/mpl/aux_/preprocessor/._filter_params.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessor/._filter_params.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessor/._params.hpp b/ext/boost/mpl/aux_/preprocessor/._params.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessor/._params.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessor/._sub.hpp b/ext/boost/mpl/aux_/preprocessor/._sub.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/aux_/preprocessor/._sub.hpp and /dev/null differ
diff --git a/ext/boost/mpl/aux_/preprocessor/add.hpp b/ext/boost/mpl/aux_/preprocessor/add.hpp
new file mode 100644
index 0000000..26a70e7
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessor/add.hpp
@@ -0,0 +1,65 @@
+
+#ifndef BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED
+#define BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: add.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/preprocessor.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES)
+
+#   include <boost/mpl/aux_/preprocessor/tuple.hpp>
+
+#if defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION)
+#   include <boost/preprocessor/cat.hpp>
+
+#   define BOOST_MPL_PP_ADD(i,j) \
+    BOOST_MPL_PP_ADD_DELAY(i,j) \
+    /**/
+
+#   define BOOST_MPL_PP_ADD_DELAY(i,j) \
+    BOOST_PP_CAT(BOOST_MPL_PP_TUPLE_11_ELEM_##i,BOOST_MPL_PP_ADD_##j) \
+    /**/
+#else
+#   define BOOST_MPL_PP_ADD(i,j) \
+    BOOST_MPL_PP_ADD_DELAY(i,j) \
+    /**/
+
+#   define BOOST_MPL_PP_ADD_DELAY(i,j) \
+    BOOST_MPL_PP_TUPLE_11_ELEM_##i BOOST_MPL_PP_ADD_##j \
+    /**/
+#endif
+
+#   define BOOST_MPL_PP_ADD_0 (0,1,2,3,4,5,6,7,8,9,10)
+#   define BOOST_MPL_PP_ADD_1 (1,2,3,4,5,6,7,8,9,10,0)
+#   define BOOST_MPL_PP_ADD_2 (2,3,4,5,6,7,8,9,10,0,0)
+#   define BOOST_MPL_PP_ADD_3 (3,4,5,6,7,8,9,10,0,0,0)
+#   define BOOST_MPL_PP_ADD_4 (4,5,6,7,8,9,10,0,0,0,0)
+#   define BOOST_MPL_PP_ADD_5 (5,6,7,8,9,10,0,0,0,0,0)
+#   define BOOST_MPL_PP_ADD_6 (6,7,8,9,10,0,0,0,0,0,0)
+#   define BOOST_MPL_PP_ADD_7 (7,8,9,10,0,0,0,0,0,0,0)
+#   define BOOST_MPL_PP_ADD_8 (8,9,10,0,0,0,0,0,0,0,0)
+#   define BOOST_MPL_PP_ADD_9 (9,10,0,0,0,0,0,0,0,0,0)
+#   define BOOST_MPL_PP_ADD_10 (10,0,0,0,0,0,0,0,0,0,0)
+
+#else
+
+#   include <boost/preprocessor/arithmetic/add.hpp>
+
+#   define BOOST_MPL_PP_ADD(i,j) \
+    BOOST_PP_ADD(i,j) \
+    /**/
+    
+#endif 
+
+#endif // BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/preprocessor/def_params_tail.hpp b/ext/boost/mpl/aux_/preprocessor/def_params_tail.hpp
index 7b0b0af..c51636e 100644
--- a/ext/boost/mpl/aux_/preprocessor/def_params_tail.hpp
+++ b/ext/boost/mpl/aux_/preprocessor/def_params_tail.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: def_params_tail.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/limits/arity.hpp>
diff --git a/ext/boost/mpl/aux_/preprocessor/default_params.hpp b/ext/boost/mpl/aux_/preprocessor/default_params.hpp
new file mode 100644
index 0000000..66d6d03
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessor/default_params.hpp
@@ -0,0 +1,67 @@
+
+#ifndef BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED
+#define BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: default_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/preprocessor.hpp>
+
+// BOOST_MPL_PP_DEFAULT_PARAMS(0,T,int): <nothing>
+// BOOST_MPL_PP_DEFAULT_PARAMS(1,T,int): T1 = int
+// BOOST_MPL_PP_DEFAULT_PARAMS(2,T,int): T1 = int, T2 = int
+// BOOST_MPL_PP_DEFAULT_PARAMS(n,T,int): T1 = int, T2 = int, .., Tn = int
+
+#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES)
+
+#   include <boost/preprocessor/cat.hpp>
+
+#   define BOOST_MPL_PP_DEFAULT_PARAMS(n,p,v) \
+    BOOST_PP_CAT(BOOST_MPL_PP_DEFAULT_PARAMS_,n)(p,v) \
+    /**/
+    
+#   define BOOST_MPL_PP_DEFAULT_PARAMS_0(p,v)
+#   define BOOST_MPL_PP_DEFAULT_PARAMS_1(p,v) p##1=v
+#   define BOOST_MPL_PP_DEFAULT_PARAMS_2(p,v) p##1=v,p##2=v
+#   define BOOST_MPL_PP_DEFAULT_PARAMS_3(p,v) p##1=v,p##2=v,p##3=v
+#   define BOOST_MPL_PP_DEFAULT_PARAMS_4(p,v) p##1=v,p##2=v,p##3=v,p##4=v
+#   define BOOST_MPL_PP_DEFAULT_PARAMS_5(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v
+#   define BOOST_MPL_PP_DEFAULT_PARAMS_6(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v
+#   define BOOST_MPL_PP_DEFAULT_PARAMS_7(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v
+#   define BOOST_MPL_PP_DEFAULT_PARAMS_8(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v,p##8=v
+#   define BOOST_MPL_PP_DEFAULT_PARAMS_9(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v,p##8=v,p##9=v
+
+#else
+
+#   include <boost/preprocessor/tuple/elem.hpp>
+#   include <boost/preprocessor/comma_if.hpp>
+#   include <boost/preprocessor/repeat.hpp>
+#   include <boost/preprocessor/inc.hpp>
+#   include <boost/preprocessor/cat.hpp>
+
+#   define BOOST_MPL_PP_AUX_DEFAULT_PARAM_FUNC(unused, i, pv) \
+    BOOST_PP_COMMA_IF(i) \
+    BOOST_PP_CAT( BOOST_PP_TUPLE_ELEM(2,0,pv), BOOST_PP_INC(i) ) \
+        = BOOST_PP_TUPLE_ELEM(2,1,pv) \
+    /**/
+
+#   define BOOST_MPL_PP_DEFAULT_PARAMS(n, param, value) \
+    BOOST_PP_REPEAT( \
+          n \
+        , BOOST_MPL_PP_AUX_DEFAULT_PARAM_FUNC \
+        , (param,value) \
+        ) \
+    /**/
+
+#endif
+
+#endif // BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/preprocessor/enum.hpp b/ext/boost/mpl/aux_/preprocessor/enum.hpp
index a7f95e3..11541a0 100644
--- a/ext/boost/mpl/aux_/preprocessor/enum.hpp
+++ b/ext/boost/mpl/aux_/preprocessor/enum.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: enum.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/preprocessor.hpp>
diff --git a/ext/boost/mpl/aux_/preprocessor/ext_params.hpp b/ext/boost/mpl/aux_/preprocessor/ext_params.hpp
new file mode 100644
index 0000000..a89535d
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessor/ext_params.hpp
@@ -0,0 +1,78 @@
+
+#ifndef BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED
+#define BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: ext_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/preprocessor.hpp>
+
+// BOOST_MPL_PP_EXT_PARAMS(2,2,T): <nothing>
+// BOOST_MPL_PP_EXT_PARAMS(2,3,T): T2
+// BOOST_MPL_PP_EXT_PARAMS(2,4,T): T2, T3
+// BOOST_MPL_PP_EXT_PARAMS(2,n,T): T2, T3, .., Tn-1
+
+#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES)
+
+#   include <boost/mpl/aux_/preprocessor/filter_params.hpp>
+#   include <boost/mpl/aux_/preprocessor/sub.hpp>
+
+#   define BOOST_MPL_PP_EXT_PARAMS(i,j,p) \
+    BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,BOOST_MPL_PP_SUB(j,i),p) \
+    /**/
+
+#   define BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,n,p) \
+    BOOST_MPL_PP_EXT_PARAMS_DELAY_2(i,n,p) \
+    /**/
+
+#   define BOOST_MPL_PP_EXT_PARAMS_DELAY_2(i,n,p) \
+    BOOST_MPL_PP_EXT_PARAMS_##i(n,p) \
+    /**/
+
+#   define BOOST_MPL_PP_EXT_PARAMS_1(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9)
+#   define BOOST_MPL_PP_EXT_PARAMS_2(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9,p1)
+#   define BOOST_MPL_PP_EXT_PARAMS_3(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##3,p##4,p##5,p##6,p##7,p##8,p##9,p1,p2)
+#   define BOOST_MPL_PP_EXT_PARAMS_4(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##4,p##5,p##6,p##7,p##8,p##9,p1,p2,p3)
+#   define BOOST_MPL_PP_EXT_PARAMS_5(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##5,p##6,p##7,p##8,p##9,p1,p2,p3,p4)
+#   define BOOST_MPL_PP_EXT_PARAMS_6(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##6,p##7,p##8,p##9,p1,p2,p3,p4,p5)
+#   define BOOST_MPL_PP_EXT_PARAMS_7(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##7,p##8,p##9,p1,p2,p3,p4,p5,p6)
+#   define BOOST_MPL_PP_EXT_PARAMS_8(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##8,p##9,p1,p2,p3,p4,p5,p6,p7)
+#   define BOOST_MPL_PP_EXT_PARAMS_9(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##9,p1,p2,p3,p4,p5,p6,p7,p8)
+
+#else
+
+#   include <boost/preprocessor/arithmetic/add.hpp>
+#   include <boost/preprocessor/arithmetic/sub.hpp>
+#   include <boost/preprocessor/comma_if.hpp>
+#   include <boost/preprocessor/repeat.hpp>
+#   include <boost/preprocessor/tuple/elem.hpp>
+#   include <boost/preprocessor/cat.hpp>
+
+#   define BOOST_MPL_PP_AUX_EXT_PARAM_FUNC(unused, i, op) \
+    BOOST_PP_COMMA_IF(i) \
+    BOOST_PP_CAT( \
+          BOOST_PP_TUPLE_ELEM(2,1,op) \
+        , BOOST_PP_ADD_D(1, i, BOOST_PP_TUPLE_ELEM(2,0,op)) \
+        ) \
+    /**/
+
+#   define BOOST_MPL_PP_EXT_PARAMS(i, j, param) \
+    BOOST_PP_REPEAT( \
+          BOOST_PP_SUB_D(1,j,i) \
+        , BOOST_MPL_PP_AUX_EXT_PARAM_FUNC \
+        , (i,param) \
+        ) \
+    /**/
+
+#endif
+
+#endif // BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/preprocessor/filter_params.hpp b/ext/boost/mpl/aux_/preprocessor/filter_params.hpp
index 38f3cbf..fefd984 100644
--- a/ext/boost/mpl/aux_/preprocessor/filter_params.hpp
+++ b/ext/boost/mpl/aux_/preprocessor/filter_params.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: filter_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #define BOOST_MPL_PP_FILTER_PARAMS_0(p1,p2,p3,p4,p5,p6,p7,p8,p9) 
diff --git a/ext/boost/mpl/aux_/preprocessor/is_seq.hpp b/ext/boost/mpl/aux_/preprocessor/is_seq.hpp
new file mode 100644
index 0000000..db7eaa4
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessor/is_seq.hpp
@@ -0,0 +1,54 @@
+
+#ifndef BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED
+#define BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED
+
+// Copyright Paul Mensonides 2003
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: is_seq.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/preprocessor/seq/size.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/punctuation/paren.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/config/config.hpp>
+
+// returns 1 if 'seq' is a PP-sequence, 0 otherwise:
+//
+//   BOOST_PP_ASSERT( BOOST_PP_NOT( BOOST_MPL_PP_IS_SEQ( int ) ) )
+//   BOOST_PP_ASSERT( BOOST_MPL_PP_IS_SEQ( (int) ) )
+//   BOOST_PP_ASSERT( BOOST_MPL_PP_IS_SEQ( (1)(2) ) )
+
+#if (BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC()) || defined(_MSC_VER) && defined(__INTEL_COMPILER) && __INTEL_COMPILER == 1010
+
+#   define BOOST_MPL_PP_IS_SEQ(seq) BOOST_PP_DEC( BOOST_PP_SEQ_SIZE( BOOST_MPL_PP_IS_SEQ_(seq) ) )
+#   define BOOST_MPL_PP_IS_SEQ_(seq) BOOST_MPL_PP_IS_SEQ_SEQ_( BOOST_MPL_PP_IS_SEQ_SPLIT_ seq )
+#   define BOOST_MPL_PP_IS_SEQ_SEQ_(x) (x)
+#   define BOOST_MPL_PP_IS_SEQ_SPLIT_(unused) unused)((unused)
+
+#else
+
+#   if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
+#       define BOOST_MPL_PP_IS_SEQ(seq) BOOST_MPL_PP_IS_SEQ_MWCC_((seq))
+#       define BOOST_MPL_PP_IS_SEQ_MWCC_(args) BOOST_MPL_PP_IS_SEQ_ ## args
+#   else
+#       define BOOST_MPL_PP_IS_SEQ(seq) BOOST_MPL_PP_IS_SEQ_(seq)
+#   endif
+
+#   define BOOST_MPL_PP_IS_SEQ_(seq) BOOST_PP_CAT(BOOST_MPL_PP_IS_SEQ_, BOOST_MPL_PP_IS_SEQ_0 seq BOOST_PP_RPAREN())
+#   define BOOST_MPL_PP_IS_SEQ_0(x) BOOST_MPL_PP_IS_SEQ_1(x
+#   define BOOST_MPL_PP_IS_SEQ_ALWAYS_0(unused) 0
+#   define BOOST_MPL_PP_IS_SEQ_BOOST_MPL_PP_IS_SEQ_0 BOOST_MPL_PP_IS_SEQ_ALWAYS_0(
+#   define BOOST_MPL_PP_IS_SEQ_BOOST_MPL_PP_IS_SEQ_1(unused) 1
+
+#endif
+
+#endif // BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/preprocessor/params.hpp b/ext/boost/mpl/aux_/preprocessor/params.hpp
index 410a8d0..ac861ec 100644
--- a/ext/boost/mpl/aux_/preprocessor/params.hpp
+++ b/ext/boost/mpl/aux_/preprocessor/params.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/preprocessor.hpp>
diff --git a/ext/boost/mpl/aux_/preprocessor/partial_spec_params.hpp b/ext/boost/mpl/aux_/preprocessor/partial_spec_params.hpp
new file mode 100644
index 0000000..e2e1fa9
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessor/partial_spec_params.hpp
@@ -0,0 +1,32 @@
+
+#ifndef BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED
+#define BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: partial_spec_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/limits/arity.hpp>
+#include <boost/mpl/aux_/preprocessor/params.hpp>
+#include <boost/mpl/aux_/preprocessor/enum.hpp>
+#include <boost/mpl/aux_/preprocessor/sub.hpp>
+#include <boost/preprocessor/comma_if.hpp>
+
+#define BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \
+BOOST_MPL_PP_PARAMS(n, param) \
+BOOST_PP_COMMA_IF(BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,n)) \
+BOOST_MPL_PP_ENUM( \
+      BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,n) \
+    , def \
+    ) \
+/**/
+
+#endif // BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/preprocessor/range.hpp b/ext/boost/mpl/aux_/preprocessor/range.hpp
new file mode 100644
index 0000000..e69a9e1
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessor/range.hpp
@@ -0,0 +1,23 @@
+
+#ifndef BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED
+#define BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: range.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/preprocessor/seq/subseq.hpp>
+
+#define BOOST_MPL_PP_RANGE(first, length) \
+    BOOST_PP_SEQ_SUBSEQ((0)(1)(2)(3)(4)(5)(6)(7)(8)(9), first, length) \
+/**/
+
+#endif // BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/preprocessor/repeat.hpp b/ext/boost/mpl/aux_/preprocessor/repeat.hpp
new file mode 100644
index 0000000..2c314ec
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessor/repeat.hpp
@@ -0,0 +1,51 @@
+
+#ifndef BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED
+#define BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: repeat.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/preprocessor.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES)
+
+#   include <boost/preprocessor/cat.hpp>
+
+#   define BOOST_MPL_PP_REPEAT(n,f,param) \
+    BOOST_PP_CAT(BOOST_MPL_PP_REPEAT_,n)(f,param) \
+    /**/
+    
+#   define BOOST_MPL_PP_REPEAT_0(f,p)
+#   define BOOST_MPL_PP_REPEAT_1(f,p) f(0,0,p)
+#   define BOOST_MPL_PP_REPEAT_2(f,p) f(0,0,p) f(0,1,p)
+#   define BOOST_MPL_PP_REPEAT_3(f,p) f(0,0,p) f(0,1,p) f(0,2,p)
+#   define BOOST_MPL_PP_REPEAT_4(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p)
+#   define BOOST_MPL_PP_REPEAT_5(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p)
+#   define BOOST_MPL_PP_REPEAT_6(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p)
+#   define BOOST_MPL_PP_REPEAT_7(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p)
+#   define BOOST_MPL_PP_REPEAT_8(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p)
+#   define BOOST_MPL_PP_REPEAT_9(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) f(0,8,p)
+#   define BOOST_MPL_PP_REPEAT_10(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) f(0,8,p) f(0,9,p)
+
+#else 
+
+#   include <boost/preprocessor/repeat.hpp>
+
+#   define BOOST_MPL_PP_REPEAT(n,f,param) \
+    BOOST_PP_REPEAT(n,f,param) \
+    /**/
+
+#endif 
+
+#define BOOST_MPL_PP_REPEAT_IDENTITY_FUNC(unused1, unused2, x) x
+
+#endif // BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/preprocessor/sub.hpp b/ext/boost/mpl/aux_/preprocessor/sub.hpp
index 8ba8132..7f5e291 100644
--- a/ext/boost/mpl/aux_/preprocessor/sub.hpp
+++ b/ext/boost/mpl/aux_/preprocessor/sub.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: sub.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/preprocessor.hpp>
diff --git a/ext/boost/mpl/aux_/preprocessor/token_equal.hpp b/ext/boost/mpl/aux_/preprocessor/token_equal.hpp
new file mode 100644
index 0000000..b65f3d8
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessor/token_equal.hpp
@@ -0,0 +1,56 @@
+
+#ifndef BOOST_MPL_AUX_PREPROCESSOR_TOKEN_EQUAL_HPP_INCLUDED
+#define BOOST_MPL_AUX_PREPROCESSOR_TOKEN_EQUAL_HPP_INCLUDED
+
+// Copyright Paul Mensonides 2003
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: token_equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/preprocessor/is_seq.hpp>
+
+#include <boost/preprocessor/if.hpp>
+#include <boost/preprocessor/logical/bitand.hpp>
+#include <boost/preprocessor/logical/compl.hpp>
+#include <boost/preprocessor/tuple/eat.hpp>
+#include <boost/preprocessor/cat.hpp>
+
+// compares tokens 'a' and 'b' for equality:
+//
+//   #define BOOST_MPL_PP_TOKEN_EQUAL_apple(x) x
+//   #define BOOST_MPL_PP_TOKEN_EQUAL_orange(x) x
+//
+//   BOOST_PP_ASSERT( BOOST_PP_NOT( BOOST_MPL_PP_TOKEN_EQUAL(apple, abc) ) )
+//   BOOST_PP_ASSERT( BOOST_PP_NOT( BOOST_MPL_PP_TOKEN_EQUAL(abc, apple) ) )
+//   BOOST_PP_ASSERT( BOOST_PP_NOT( BOOST_MPL_PP_TOKEN_EQUAL(apple, orange) ) )
+//   BOOST_PP_ASSERT( BOOST_MPL_PP_TOKEN_EQUAL(apple, apple) )
+//   BOOST_PP_ASSERT( BOOST_MPL_PP_TOKEN_EQUAL(orange, orange) )
+
+#define BOOST_MPL_PP_TOKEN_EQUAL(a, b) \
+    BOOST_PP_IIF( \
+        BOOST_PP_BITAND( \
+              BOOST_MPL_PP_IS_SEQ( BOOST_PP_CAT(BOOST_MPL_PP_TOKEN_EQUAL_, a)((unused)) ) \
+            , BOOST_MPL_PP_IS_SEQ( BOOST_PP_CAT(BOOST_MPL_PP_TOKEN_EQUAL_, b)((unused)) ) \
+            ) \
+        , BOOST_MPL_PP_TOKEN_EQUAL_I \
+        , 0 BOOST_PP_TUPLE_EAT(2) \
+        )(a, b) \
+/**/
+
+#define BOOST_MPL_PP_TOKEN_EQUAL_I(a, b) \
+    BOOST_PP_COMPL(BOOST_MPL_PP_IS_SEQ( \
+        BOOST_MPL_PP_TOKEN_EQUAL_ ## a( \
+            BOOST_MPL_PP_TOKEN_EQUAL_ ## b \
+            )((unused)) \
+        )) \
+/**/
+
+#endif // BOOST_MPL_AUX_PREPROCESSOR_TOKEN_EQUAL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/preprocessor/tuple.hpp b/ext/boost/mpl/aux_/preprocessor/tuple.hpp
new file mode 100644
index 0000000..ed59407
--- /dev/null
+++ b/ext/boost/mpl/aux_/preprocessor/tuple.hpp
@@ -0,0 +1,29 @@
+
+#ifndef BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED
+#define BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: tuple.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define BOOST_MPL_PP_TUPLE_11_ELEM_0(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e0
+#define BOOST_MPL_PP_TUPLE_11_ELEM_1(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e1
+#define BOOST_MPL_PP_TUPLE_11_ELEM_2(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e2
+#define BOOST_MPL_PP_TUPLE_11_ELEM_3(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e3
+#define BOOST_MPL_PP_TUPLE_11_ELEM_4(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e4
+#define BOOST_MPL_PP_TUPLE_11_ELEM_5(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e5
+#define BOOST_MPL_PP_TUPLE_11_ELEM_6(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e6
+#define BOOST_MPL_PP_TUPLE_11_ELEM_7(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e7
+#define BOOST_MPL_PP_TUPLE_11_ELEM_8(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e8
+#define BOOST_MPL_PP_TUPLE_11_ELEM_9(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e9
+#define BOOST_MPL_PP_TUPLE_11_ELEM_10(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e10
+
+#endif // BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/ptr_to_ref.hpp b/ext/boost/mpl/aux_/ptr_to_ref.hpp
new file mode 100644
index 0000000..e81ebe8
--- /dev/null
+++ b/ext/boost/mpl/aux_/ptr_to_ref.hpp
@@ -0,0 +1,46 @@
+
+#ifndef BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED
+#define BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: ptr_to_ref.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/static_cast.hpp>
+#include <boost/mpl/aux_/config/msvc.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
+    ||  ( BOOST_WORKAROUND(__EDG_VERSION__, <= 245) \
+        && !(defined(__STD_STRICT_ANSI) \
+            || defined(__STD_STRICT_ANSI_ERRORS)) )
+
+#   define BOOST_MPL_AUX_PTR_TO_REF(X) \
+    *BOOST_MPL_AUX_STATIC_CAST(X*, 0) \
+/**/
+
+#else
+
+#   define BOOST_MPL_AUX_PTR_TO_REF(X) \
+    aux::ptr_to_ref(BOOST_MPL_AUX_STATIC_CAST(X*, 0)) \
+/**/
+
+#endif
+
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename T > static T const& ptr_to_ref(T*);
+
+}}}
+
+#endif // BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/push_back_impl.hpp b/ext/boost/mpl/aux_/push_back_impl.hpp
new file mode 100644
index 0000000..732c43c
--- /dev/null
+++ b/ext/boost/mpl/aux_/push_back_impl.hpp
@@ -0,0 +1,70 @@
+
+#ifndef BOOST_MPL_AUX_PUSH_BACK_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_PUSH_BACK_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: push_back_impl.hpp 55679 2009-08-20 07:50:16Z agurtovoy $
+// $Date: 2009-08-20 00:50:16 -0700 (Thu, 20 Aug 2009) $
+// $Revision: 55679 $
+
+#include <boost/mpl/push_back_fwd.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/aux_/has_type.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+#include <boost/mpl/aux_/config/forwarding.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl {
+
+struct has_push_back_arg {};
+
+// agurt 05/feb/04: no default implementation; the stub definition is needed 
+// to enable the default 'has_push_back' implementation below
+template< typename Tag >
+struct push_back_impl
+{
+    template< typename Sequence, typename T > struct apply
+    {
+        // should be instantiated only in the context of 'has_push_back_impl';
+        // if you've got an assert here, you are requesting a 'push_back' 
+        // specialization that doesn't exist.
+        BOOST_MPL_ASSERT_MSG(
+              ( boost::is_same< T, has_push_back_arg >::value )
+            , REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST
+            , ( Sequence )
+            );
+    };
+};
+
+template< typename Tag >
+struct has_push_back_impl
+{
+    template< typename Seq > struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
+        : aux::has_type< push_back< Seq, has_push_back_arg > >
+    {
+#else
+    {
+        typedef aux::has_type< push_back< Seq, has_push_back_arg > > type;
+        BOOST_STATIC_CONSTANT(bool, value = 
+              (aux::has_type< push_back< Seq, has_push_back_arg > >::value)
+            );
+#endif
+    };
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, push_back_impl)
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, has_push_back_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_PUSH_BACK_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/push_front_impl.hpp b/ext/boost/mpl/aux_/push_front_impl.hpp
new file mode 100644
index 0000000..ae1bc22
--- /dev/null
+++ b/ext/boost/mpl/aux_/push_front_impl.hpp
@@ -0,0 +1,71 @@
+
+#ifndef BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: push_front_impl.hpp 55679 2009-08-20 07:50:16Z agurtovoy $
+// $Date: 2009-08-20 00:50:16 -0700 (Thu, 20 Aug 2009) $
+// $Revision: 55679 $
+
+#include <boost/mpl/push_front_fwd.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/aux_/has_type.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+#include <boost/mpl/aux_/config/forwarding.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl {
+
+struct has_push_front_arg {};
+
+// agurt 05/feb/04: no default implementation; the stub definition is needed 
+// to enable the default 'has_push_front' implementation below
+
+template< typename Tag >
+struct push_front_impl
+{
+    template< typename Sequence, typename T > struct apply
+    {
+        // should be instantiated only in the context of 'has_push_front_impl';
+        // if you've got an assert here, you are requesting a 'push_front' 
+        // specialization that doesn't exist.
+        BOOST_MPL_ASSERT_MSG(
+              ( boost::is_same< T, has_push_front_arg >::value )
+            , REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST
+            , ( Sequence )
+            );
+    };
+};
+
+template< typename Tag >
+struct has_push_front_impl
+{
+    template< typename Seq > struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
+        : aux::has_type< push_front< Seq, has_push_front_arg > >
+    {
+#else
+    {
+        typedef aux::has_type< push_front< Seq, has_push_front_arg > > type;
+        BOOST_STATIC_CONSTANT(bool, value = 
+              (aux::has_type< push_front< Seq, has_push_front_arg > >::value)
+            );
+#endif
+    };
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, push_front_impl)
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, has_push_front_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/range_c/O1_size.hpp b/ext/boost/mpl/aux_/range_c/O1_size.hpp
new file mode 100644
index 0000000..6945285
--- /dev/null
+++ b/ext/boost/mpl/aux_/range_c/O1_size.hpp
@@ -0,0 +1,31 @@
+
+#ifndef BOOST_MPL_AUX_RANGE_C_O1_SIZE_HPP_INCLUDED
+#define BOOST_MPL_AUX_RANGE_C_O1_SIZE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/O1_size_fwd.hpp>
+#include <boost/mpl/aux_/range_c/size.hpp>
+#include <boost/mpl/aux_/range_c/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct O1_size_impl< aux::half_open_range_tag >
+    : size_impl< aux::half_open_range_tag >
+{
+};
+
+}}
+
+#endif // BOOST_MPL_AUX_RANGE_C_O1_SIZE_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/range_c/back.hpp b/ext/boost/mpl/aux_/range_c/back.hpp
new file mode 100644
index 0000000..0d6cc6e
--- /dev/null
+++ b/ext/boost/mpl/aux_/range_c/back.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_AUX_RANGE_C_BACK_HPP_INCLUDED
+#define BOOST_MPL_AUX_RANGE_C_BACK_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/back_fwd.hpp>
+#include <boost/mpl/prior.hpp>
+#include <boost/mpl/aux_/range_c/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct back_impl< aux::half_open_range_tag >
+{
+    template< typename Range > struct apply
+    {
+        typedef typename prior< typename Range::finish >::type type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_AUX_RANGE_C_BACK_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/range_c/empty.hpp b/ext/boost/mpl/aux_/range_c/empty.hpp
new file mode 100644
index 0000000..d78e5b3
--- /dev/null
+++ b/ext/boost/mpl/aux_/range_c/empty.hpp
@@ -0,0 +1,37 @@
+
+#ifndef BOOST_MPL_AUX_RANGE_C_EMPTY_HPP_INCLUDED
+#define BOOST_MPL_AUX_RANGE_C_EMPTY_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/empty_fwd.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/aux_/range_c/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct empty_impl< aux::half_open_range_tag >
+{
+    template< typename Range > struct apply
+        : equal_to<
+              typename Range::start
+            , typename Range::finish
+            >
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_AUX_RANGE_C_EMPTY_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/range_c/front.hpp b/ext/boost/mpl/aux_/range_c/front.hpp
new file mode 100644
index 0000000..e3265ab
--- /dev/null
+++ b/ext/boost/mpl/aux_/range_c/front.hpp
@@ -0,0 +1,33 @@
+
+#ifndef BOOST_MPL_AUX_RANGE_C_FRONT_HPP_INCLUDED
+#define BOOST_MPL_AUX_RANGE_C_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/front_fwd.hpp>
+#include <boost/mpl/aux_/range_c/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct front_impl< aux::half_open_range_tag >
+{
+    template< typename Range > struct apply
+    {
+        typedef typename Range::start type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_AUX_RANGE_C_FRONT_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/range_c/iterator.hpp b/ext/boost/mpl/aux_/range_c/iterator.hpp
new file mode 100644
index 0000000..5d5b1d0
--- /dev/null
+++ b/ext/boost/mpl/aux_/range_c/iterator.hpp
@@ -0,0 +1,106 @@
+
+#ifndef BOOST_MPL_AUX_RANGE_C_ITERATOR_HPP_INCLUDED
+#define BOOST_MPL_AUX_RANGE_C_ITERATOR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/iterator_tags.hpp>
+#include <boost/mpl/advance_fwd.hpp>
+#include <boost/mpl/distance_fwd.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/aux_/value_wknd.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+namespace boost { namespace mpl {
+
+// theoretically will work on any discrete numeric type
+template< typename N > struct r_iter
+{
+    typedef aux::r_iter_tag tag;
+    typedef random_access_iterator_tag category;
+    typedef N type;
+
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+    typedef r_iter< typename mpl::next<N>::type > next;
+    typedef r_iter< typename mpl::prior<N>::type > prior;
+#endif
+};
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template<
+      typename N
+    >
+struct next< r_iter<N> >
+{
+    typedef r_iter< typename mpl::next<N>::type > type;
+};
+
+template<
+      typename N
+    >
+struct prior< r_iter<N> >
+{
+    typedef r_iter< typename mpl::prior<N>::type > type;
+};
+
+#endif
+
+
+template<> struct advance_impl<aux::r_iter_tag>
+{
+    template< typename Iter, typename Dist > struct apply
+    {
+        typedef typename deref<Iter>::type n_;
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+        typedef typename plus_impl<integral_c_tag,integral_c_tag>
+            ::template apply<n_,Dist>::type m_;
+#else
+        typedef typename plus<n_,Dist>::type m_;
+#endif
+        // agurt, 10/nov/04: to be generic, the code have to do something along
+        // the lines below...
+        //
+        // typedef typename apply_wrap1<
+        //       numeric_cast< typename m_::tag, typename n_::tag >
+        //     , m_
+        //     >::type result_;
+        //
+        // ... meanwhile:
+        
+        typedef integral_c< 
+              typename aux::value_type_wknd<n_>::type
+            , BOOST_MPL_AUX_VALUE_WKND(m_)::value 
+            > result_;
+        
+        typedef r_iter<result_> type;
+    };
+};
+
+template<> struct distance_impl<aux::r_iter_tag>
+{
+    template< typename Iter1, typename Iter2 > struct apply
+        : minus<
+              typename Iter2::type
+            , typename Iter1::type
+            >
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_AUX_RANGE_C_ITERATOR_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/range_c/size.hpp b/ext/boost/mpl/aux_/range_c/size.hpp
new file mode 100644
index 0000000..dbd8ade
--- /dev/null
+++ b/ext/boost/mpl/aux_/range_c/size.hpp
@@ -0,0 +1,37 @@
+
+#ifndef BOOST_MPL_AUX_RANGE_C_SIZE_HPP_INCLUDED
+#define BOOST_MPL_AUX_RANGE_C_SIZE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/size_fwd.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/aux_/range_c/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct size_impl< aux::half_open_range_tag >
+{
+    template< typename Range > struct apply
+        : minus<
+              typename Range::finish
+            , typename Range::start
+            >
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_AUX_RANGE_C_SIZE_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/range_c/tag.hpp b/ext/boost/mpl/aux_/range_c/tag.hpp
new file mode 100644
index 0000000..f56d86f
--- /dev/null
+++ b/ext/boost/mpl/aux_/range_c/tag.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_AUX_RANGE_C_TAG_HPP_INCLUDED
+#define BOOST_MPL_AUX_RANGE_C_TAG_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl { namespace aux {
+
+struct half_open_range_tag;
+struct r_iter_tag;
+
+}}}
+
+#endif // BOOST_MPL_AUX_RANGE_C_TAG_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/reverse_fold_impl.hpp b/ext/boost/mpl/aux_/reverse_fold_impl.hpp
new file mode 100644
index 0000000..9c17c01
--- /dev/null
+++ b/ext/boost/mpl/aux_/reverse_fold_impl.hpp
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: reverse_fold_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/next_prior.hpp>
+#   include <boost/mpl/deref.hpp>
+#   include <boost/mpl/apply.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+    || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC)
+#       include <boost/mpl/if.hpp>
+#       include <boost/type_traits/is_same.hpp>
+#   endif
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER reverse_fold_impl.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   define AUX778076_FOLD_IMPL_OP(iter) typename deref<iter>::type
+#   define AUX778076_FOLD_IMPL_NAME_PREFIX reverse_fold
+#   include <boost/mpl/aux_/reverse_fold_impl_body.hpp>
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/reverse_fold_impl_body.hpp b/ext/boost/mpl/aux_/reverse_fold_impl_body.hpp
new file mode 100644
index 0000000..c815e0a
--- /dev/null
+++ b/ext/boost/mpl/aux_/reverse_fold_impl_body.hpp
@@ -0,0 +1,412 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
+
+#if !defined(BOOST_PP_IS_ITERATING)
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: reverse_fold_impl_body.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#   include <boost/mpl/limits/unrolling.hpp>
+#   include <boost/mpl/aux_/preprocessor/repeat.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   include <boost/mpl/aux_/nttp_decl.hpp>
+
+#   include <boost/preprocessor/arithmetic/sub.hpp>
+#   include <boost/preprocessor/iterate.hpp>
+#   include <boost/preprocessor/dec.hpp>
+#   include <boost/preprocessor/inc.hpp>
+#   include <boost/preprocessor/cat.hpp>
+
+// local macros, #undef-ined at the end of the header
+
+#   define AUX778076_ITER_FOLD_FORWARD_STEP(unused, n_, unused2) \
+    typedef typename apply2< \
+          ForwardOp \
+        , BOOST_PP_CAT(fwd_state,n_) \
+        , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,n_)) \
+        >::type BOOST_PP_CAT(fwd_state,BOOST_PP_INC(n_)); \
+    typedef typename mpl::next<BOOST_PP_CAT(iter,n_)>::type \
+        BOOST_PP_CAT(iter,BOOST_PP_INC(n_)); \
+    /**/
+
+#   define AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC(n_) \
+    typedef typename apply2< \
+          BackwardOp \
+        , BOOST_PP_CAT(bkwd_state,n_) \
+        , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,BOOST_PP_DEC(n_))) \
+        >::type BOOST_PP_CAT(bkwd_state,BOOST_PP_DEC(n_)); \
+    /**/
+
+#   define AUX778076_ITER_FOLD_BACKWARD_STEP(unused, n_, j) \
+    AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC( \
+          BOOST_PP_SUB_D(1,j,n_) \
+        ) \
+    /**/
+
+#   define AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(n_) \
+    typedef typename nested_chunk::state BOOST_PP_CAT(bkwd_state,n_);
+    /**/
+
+#   define AUX778076_FOLD_IMPL_NAME \
+    BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_impl) \
+    /**/
+
+#   define AUX778076_FOLD_CHUNK_NAME \
+    BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_chunk) \
+    /**/
+
+namespace boost { namespace mpl { namespace aux {
+
+/// forward declaration
+template<
+      BOOST_MPL_AUX_NTTP_DECL(long, N)
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    > 
+struct AUX778076_FOLD_IMPL_NAME;
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+    && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC)
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/reverse_fold_impl_body.hpp>))
+#   include BOOST_PP_ITERATE()
+
+// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING
+template<
+      BOOST_MPL_AUX_NTTP_DECL(long, N)
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    > 
+struct AUX778076_FOLD_IMPL_NAME
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+
+    BOOST_MPL_PP_REPEAT(
+          BOOST_MPL_LIMIT_UNROLLING
+        , AUX778076_ITER_FOLD_FORWARD_STEP
+        , unused
+        )
+
+    typedef AUX778076_FOLD_IMPL_NAME<
+          ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING )
+        , BOOST_PP_CAT(iter,BOOST_MPL_LIMIT_UNROLLING)
+        , Last
+        , BOOST_PP_CAT(fwd_state,BOOST_MPL_LIMIT_UNROLLING)
+        , BackwardOp
+        , ForwardOp
+        > nested_chunk;
+        
+    AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(BOOST_MPL_LIMIT_UNROLLING)
+
+    BOOST_MPL_PP_REPEAT(
+          BOOST_MPL_LIMIT_UNROLLING
+        , AUX778076_ITER_FOLD_BACKWARD_STEP
+        , BOOST_MPL_LIMIT_UNROLLING
+        )
+
+    typedef bkwd_state0 state;
+    typedef typename nested_chunk::iterator iterator;
+};
+
+// fallback implementation for sequences of unknown size
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    > 
+struct AUX778076_FOLD_IMPL_NAME<-1,First,Last,State,BackwardOp,ForwardOp>
+{
+    typedef AUX778076_FOLD_IMPL_NAME<
+          -1
+        , typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , AUX778076_FOLD_IMPL_OP(First)
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    > 
+struct AUX778076_FOLD_IMPL_NAME<-1,Last,Last,State,BackwardOp,ForwardOp>
+{
+    typedef State state;
+    typedef Last iterator;
+};
+
+#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+template< BOOST_MPL_AUX_NTTP_DECL(long, N) >
+struct AUX778076_FOLD_CHUNK_NAME;
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/reverse_fold_impl_body.hpp>))
+#   include BOOST_PP_ITERATE()
+
+// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING
+template< BOOST_MPL_AUX_NTTP_DECL(long, N) > 
+struct AUX778076_FOLD_CHUNK_NAME
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        > 
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+
+        BOOST_MPL_PP_REPEAT(
+              BOOST_MPL_LIMIT_UNROLLING
+            , AUX778076_ITER_FOLD_FORWARD_STEP
+            , unused
+            )
+
+        typedef AUX778076_FOLD_IMPL_NAME<
+              ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING )
+            , BOOST_PP_CAT(iter,BOOST_MPL_LIMIT_UNROLLING)
+            , Last
+            , BOOST_PP_CAT(fwd_state,BOOST_MPL_LIMIT_UNROLLING)
+            , BackwardOp
+            , ForwardOp
+            > nested_chunk;
+            
+        AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(BOOST_MPL_LIMIT_UNROLLING)
+
+        BOOST_MPL_PP_REPEAT(
+              BOOST_MPL_LIMIT_UNROLLING
+            , AUX778076_ITER_FOLD_BACKWARD_STEP
+            , BOOST_MPL_LIMIT_UNROLLING
+            )
+
+        typedef bkwd_state0 state;
+        typedef typename nested_chunk::iterator iterator;
+    };
+};
+
+// fallback implementation for sequences of unknown size
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    > 
+struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step);
+
+template<
+      typename Last
+    , typename State
+    >
+struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step)
+{
+    typedef Last iterator;
+    typedef State state;
+};
+
+template<> 
+struct AUX778076_FOLD_CHUNK_NAME<-1>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        > 
+    struct result_
+    {
+        typedef typename if_<
+              typename is_same<First,Last>::type
+            , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step)<Last,State>
+            , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step)<First,Last,State,BackwardOp,ForwardOp>
+            >::type res_;
+
+        typedef typename res_::state state;
+        typedef typename res_::iterator iterator;
+    };
+
+#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
+    /// ETI workaround
+    template<> struct result_<int,int,int,int,int>
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+#endif
+};
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    > 
+struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step)
+{
+    typedef AUX778076_FOLD_CHUNK_NAME<-1>::template result_<
+          typename mpl::next<First>::type
+        , Last
+        , typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type
+        , BackwardOp
+        , ForwardOp
+        > nested_step;
+
+    typedef typename apply2<
+          BackwardOp
+        , typename nested_step::state
+        , AUX778076_FOLD_IMPL_OP(First)
+        >::type state;
+
+    typedef typename nested_step::iterator iterator;
+};
+
+template<
+      BOOST_MPL_AUX_NTTP_DECL(long, N)
+    , typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    > 
+struct AUX778076_FOLD_IMPL_NAME
+    : AUX778076_FOLD_CHUNK_NAME<N>
+        ::template result_<First,Last,State,BackwardOp,ForwardOp>
+{
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+}}}
+
+#   undef AUX778076_FIRST_BACKWARD_STATE_TYPEDEF
+#   undef AUX778076_ITER_FOLD_BACKWARD_STEP
+#   undef AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC
+#   undef AUX778076_ITER_FOLD_FORWARD_STEP
+
+#undef AUX778076_FOLD_IMPL_OP
+#undef AUX778076_FOLD_IMPL_NAME_PREFIX
+
+///// iteration
+
+#else
+
+#   define n_ BOOST_PP_FRAME_ITERATION(1)
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+    && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC)
+
+template<
+      typename First
+    , typename Last
+    , typename State
+    , typename BackwardOp
+    , typename ForwardOp
+    >
+struct AUX778076_FOLD_IMPL_NAME<n_,First,Last,State,BackwardOp,ForwardOp>
+{
+    typedef First iter0;
+    typedef State fwd_state0;
+
+    BOOST_MPL_PP_REPEAT(
+          n_
+        , AUX778076_ITER_FOLD_FORWARD_STEP
+        , unused
+        )
+
+    typedef BOOST_PP_CAT(fwd_state,n_) BOOST_PP_CAT(bkwd_state,n_);
+
+    BOOST_MPL_PP_REPEAT(
+          n_
+        , AUX778076_ITER_FOLD_BACKWARD_STEP
+        , n_
+        )
+
+    typedef bkwd_state0 state;
+    typedef BOOST_PP_CAT(iter,n_) iterator;
+};
+
+#else
+
+template<> struct AUX778076_FOLD_CHUNK_NAME<n_>
+{
+    template<
+          typename First
+        , typename Last
+        , typename State
+        , typename BackwardOp
+        , typename ForwardOp
+        >
+    struct result_
+    {
+        typedef First iter0;
+        typedef State fwd_state0;
+
+        BOOST_MPL_PP_REPEAT(
+              n_
+            , AUX778076_ITER_FOLD_FORWARD_STEP
+            , unused
+            )
+
+        typedef BOOST_PP_CAT(fwd_state,n_) BOOST_PP_CAT(bkwd_state,n_);
+
+        BOOST_MPL_PP_REPEAT(
+              n_
+            , AUX778076_ITER_FOLD_BACKWARD_STEP
+            , n_
+            )
+
+        typedef bkwd_state0 state;
+        typedef BOOST_PP_CAT(iter,n_) iterator;
+    };
+
+#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
+    /// ETI workaround
+    template<> struct result_<int,int,int,int,int>
+    {
+        typedef int state;
+        typedef int iterator;
+    };
+#endif
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#   undef n_
+
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ext/boost/mpl/aux_/reverse_iter_fold_impl.hpp b/ext/boost/mpl/aux_/reverse_iter_fold_impl.hpp
new file mode 100644
index 0000000..63557ce
--- /dev/null
+++ b/ext/boost/mpl/aux_/reverse_iter_fold_impl.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: reverse_iter_fold_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/next_prior.hpp>
+#   include <boost/mpl/apply.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+    || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC)
+#       include <boost/mpl/if.hpp>
+#       include <boost/type_traits/is_same.hpp>
+#   endif
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER reverse_iter_fold_impl.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   define AUX778076_FOLD_IMPL_OP(iter) iter
+#   define AUX778076_FOLD_IMPL_NAME_PREFIX reverse_iter_fold
+#   include <boost/mpl/aux_/reverse_fold_impl_body.hpp>
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/sequence_wrapper.hpp b/ext/boost/mpl/aux_/sequence_wrapper.hpp
new file mode 100644
index 0000000..8b49c74
--- /dev/null
+++ b/ext/boost/mpl/aux_/sequence_wrapper.hpp
@@ -0,0 +1,292 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+#if !defined(BOOST_PP_IS_ITERATING)
+
+///// header body
+
+// Copyright Aleksey Gurtovoy 2000-2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: sequence_wrapper.hpp 49271 2008-10-11 06:46:00Z agurtovoy $
+// $Date: 2008-10-10 23:46:00 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49271 $
+
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   include <boost/mpl/aux_/config/static_constant.hpp>
+#   include <boost/mpl/aux_/nttp_decl.hpp>
+
+#   include <boost/preprocessor/arithmetic/sub.hpp>
+#   include <boost/preprocessor/tuple/elem.hpp>
+#   include <boost/preprocessor/enum_params_with_a_default.hpp>
+#   include <boost/preprocessor/enum_params.hpp>
+#   include <boost/preprocessor/enum.hpp>
+#   include <boost/preprocessor/repeat.hpp>
+#   include <boost/preprocessor/comma_if.hpp>
+#   include <boost/preprocessor/iterate.hpp>
+
+#if defined(BOOST_MPL_PREPROCESSING_MODE)
+#   undef LONG_MAX
+#endif
+
+namespace boost { namespace mpl {
+
+#if !defined(AUX778076_SEQUENCE_BASE_NAME)
+#   define AUX778076_SEQUENCE_BASE_NAME AUX778076_SEQUENCE_NAME
+#endif
+
+#if !defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER)
+
+#   define AUX778076_SEQUENCE_PARAM_NAME T
+#   define AUX778076_SEQUENCE_TEMPLATE_PARAM typename T
+#   define AUX778076_SEQUENCE_DEFAULT na
+
+#   define AUX778076_SEQUENCE_NAME_N(n) \
+    BOOST_PP_CAT(AUX778076_SEQUENCE_BASE_NAME,n) \
+    /**/
+
+#   define AUX778076_SEQUENCE_PARAMS() \
+    BOOST_PP_ENUM_PARAMS( \
+          AUX778076_SEQUENCE_LIMIT \
+        , AUX778076_SEQUENCE_TEMPLATE_PARAM \
+        ) \
+    /**/
+
+#   define AUX778076_SEQUENCE_ARGS() \
+    BOOST_PP_ENUM_PARAMS( \
+          AUX778076_SEQUENCE_LIMIT \
+        , T \
+        ) \
+    /**/
+
+#   define AUX778076_SEQUENCE_DEFAULT_PARAMS() \
+     BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( \
+          AUX778076_SEQUENCE_LIMIT \
+        , AUX778076_SEQUENCE_TEMPLATE_PARAM \
+        , AUX778076_SEQUENCE_DEFAULT \
+        ) \
+    /**/
+
+#   define AUX778076_SEQUENCE_N_PARAMS(n) \
+    BOOST_PP_ENUM_PARAMS(n, AUX778076_SEQUENCE_TEMPLATE_PARAM) \
+    /**/
+
+#   define AUX778076_SEQUENCE_N_ARGS(n) \
+    BOOST_PP_ENUM_PARAMS(n, T) \
+    /**/
+
+#   define AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS(n) \
+    BOOST_PP_ENUM_PARAMS(n, T) \
+    BOOST_PP_COMMA_IF(n) \
+    BOOST_PP_ENUM( \
+          BOOST_PP_SUB_D(1,AUX778076_SEQUENCE_LIMIT,n) \
+        , BOOST_PP_TUPLE_ELEM_3_2 \
+        , AUX778076_SEQUENCE_DEFAULT \
+        ) \
+    /**/
+
+#else // AUX778076_SEQUENCE_INTEGRAL_WRAPPER
+
+#   define AUX778076_SEQUENCE_PARAM_NAME C
+#   define AUX778076_SEQUENCE_TEMPLATE_PARAM BOOST_MPL_AUX_NTTP_DECL(long, C)
+#   define AUX778076_SEQUENCE_DEFAULT LONG_MAX
+
+#   define AUX778076_SEQUENCE_PARAMS() \
+    typename T, BOOST_PP_ENUM_PARAMS( \
+          AUX778076_SEQUENCE_LIMIT \
+        , AUX778076_SEQUENCE_TEMPLATE_PARAM \
+        ) \
+    /**/
+
+#   define AUX778076_SEQUENCE_ARGS() \
+    T, BOOST_PP_ENUM_PARAMS( \
+          AUX778076_SEQUENCE_LIMIT \
+        , C \
+        ) \
+    /**/
+
+#   define AUX778076_SEQUENCE_DEFAULT_PARAMS() \
+    typename T, \
+    BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( \
+          AUX778076_SEQUENCE_LIMIT \
+        , AUX778076_SEQUENCE_TEMPLATE_PARAM \
+        , AUX778076_SEQUENCE_DEFAULT \
+        ) \
+    /**/
+
+#   define AUX778076_SEQUENCE_N_PARAMS(n) \
+    typename T BOOST_PP_COMMA_IF(n) \
+    BOOST_PP_ENUM_PARAMS(n, AUX778076_SEQUENCE_TEMPLATE_PARAM) \
+    /**/
+
+#   if !defined(AUX778076_SEQUENCE_CONVERT_CN_TO)
+#       define AUX778076_SEQUENCE_CONVERT_CN_TO(z,n,TARGET) BOOST_PP_CAT(C,n)
+#   endif
+
+#   define AUX778076_SEQUENCE_N_ARGS(n) \
+    T BOOST_PP_COMMA_IF(n) \
+    BOOST_PP_ENUM(n,AUX778076_SEQUENCE_CONVERT_CN_TO,T) \
+    /**/
+
+#   define AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS(n) \
+    T, BOOST_PP_ENUM_PARAMS(n, C) \
+    BOOST_PP_COMMA_IF(n) \
+    BOOST_PP_ENUM( \
+          BOOST_PP_SUB_D(1,AUX778076_SEQUENCE_LIMIT,n) \
+        , BOOST_PP_TUPLE_ELEM_3_2 \
+        , AUX778076_SEQUENCE_DEFAULT \
+        ) \
+    /**/
+
+#endif // AUX778076_SEQUENCE_INTEGRAL_WRAPPER
+
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+// forward declaration
+template<
+      AUX778076_SEQUENCE_DEFAULT_PARAMS()
+    >
+struct AUX778076_SEQUENCE_NAME;
+#else
+namespace aux {
+template< BOOST_MPL_AUX_NTTP_DECL(int, N) > 
+struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser);
+}
+#endif
+
+#define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(0, AUX778076_SEQUENCE_LIMIT, <boost/mpl/aux_/sequence_wrapper.hpp>))
+#include BOOST_PP_ITERATE()
+
+// real C++ version is already taken care of
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+namespace aux {
+// ???_count_args
+#define AUX778076_COUNT_ARGS_PREFIX         AUX778076_SEQUENCE_NAME
+#define AUX778076_COUNT_ARGS_DEFAULT        AUX778076_SEQUENCE_DEFAULT
+#define AUX778076_COUNT_ARGS_PARAM_NAME     AUX778076_SEQUENCE_PARAM_NAME
+#define AUX778076_COUNT_ARGS_TEMPLATE_PARAM AUX778076_SEQUENCE_TEMPLATE_PARAM
+#define AUX778076_COUNT_ARGS_ARITY          AUX778076_SEQUENCE_LIMIT
+#define AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES
+#include <boost/mpl/aux_/count_args.hpp>
+
+template<
+      AUX778076_SEQUENCE_PARAMS()
+    >
+struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_impl)
+{
+    typedef aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_count_args)<
+          BOOST_PP_ENUM_PARAMS(AUX778076_SEQUENCE_LIMIT, AUX778076_SEQUENCE_PARAM_NAME)
+        > arg_num_;
+    
+    typedef typename aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser)< arg_num_::value >
+        ::template result_< AUX778076_SEQUENCE_ARGS() >::type type;
+};
+
+} // namespace aux
+
+template<
+      AUX778076_SEQUENCE_DEFAULT_PARAMS()
+    >
+struct AUX778076_SEQUENCE_NAME
+    : aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_impl)<
+          AUX778076_SEQUENCE_ARGS()
+        >::type
+{
+    typedef typename aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_impl)<
+          AUX778076_SEQUENCE_ARGS()
+        >::type type;
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#   undef AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS
+#   undef AUX778076_SEQUENCE_N_ARGS
+#   undef AUX778076_SEQUENCE_CONVERT_CN_TO
+#   undef AUX778076_SEQUENCE_N_PARAMS
+#   undef AUX778076_SEQUENCE_DEFAULT_PARAMS
+#   undef AUX778076_SEQUENCE_ARGS
+#   undef AUX778076_SEQUENCE_PARAMS
+#   undef AUX778076_SEQUENCE_NAME_N
+#   undef AUX778076_SEQUENCE_DEFAULT
+#   undef AUX778076_SEQUENCE_TEMPLATE_PARAM
+#   undef AUX778076_SEQUENCE_PARAM_NAME
+#   undef AUX778076_SEQUENCE_LIMIT
+#   undef AUX778076_SEQUENCE_BASE_NAME
+#   undef AUX778076_SEQUENCE_NAME
+#   undef AUX778076_SEQUENCE_INTEGRAL_WRAPPER
+
+}}
+
+///// iteration
+
+#else
+#define i_ BOOST_PP_FRAME_ITERATION(1)
+
+#   if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+#if i_ == AUX778076_SEQUENCE_LIMIT
+
+/// primary template (not a specialization!)
+template<
+      AUX778076_SEQUENCE_N_PARAMS(i_)
+    >
+struct AUX778076_SEQUENCE_NAME
+    : AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >
+{
+    typedef typename AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type;
+};
+
+#else
+
+template<
+      AUX778076_SEQUENCE_N_PARAMS(i_)
+    >
+struct AUX778076_SEQUENCE_NAME< AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS(i_) >
+    : AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >
+{
+#if i_ > 0 || defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER)
+    typedef typename AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type;
+#else
+    typedef AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type;
+#endif
+};
+
+#endif // i_ == AUX778076_SEQUENCE_LIMIT
+
+#   else
+
+namespace aux {
+
+template<>
+struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser)<i_>
+{
+    template<
+          AUX778076_SEQUENCE_PARAMS()
+        >
+    struct result_
+    {
+#if i_ > 0 || defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER)
+        typedef typename AUX778076_SEQUENCE_NAME_N(i_)<
+              AUX778076_SEQUENCE_N_ARGS(i_)
+            >::type type;
+#else
+        typedef AUX778076_SEQUENCE_NAME_N(i_)<
+              AUX778076_SEQUENCE_N_ARGS(i_)
+            >::type type;
+#endif
+    };
+};
+
+} // namespace aux
+
+#   endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#undef i_
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ext/boost/mpl/aux_/shift_op.hpp b/ext/boost/mpl/aux_/shift_op.hpp
new file mode 100644
index 0000000..982d66a
--- /dev/null
+++ b/ext/boost/mpl/aux_/shift_op.hpp
@@ -0,0 +1,87 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: shift_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/integral_c.hpp>
+#   include <boost/mpl/aux_/value_wknd.hpp>
+#endif
+
+#if !defined(AUX778076_OP_PREFIX)
+#   define AUX778076_OP_PREFIX AUX778076_OP_NAME
+#endif
+
+#define AUX778076_OP_ARITY 2
+
+#include <boost/mpl/aux_/numeric_op.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER AUX778076_OP_PREFIX.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/aux_/config/integral.hpp>
+#   include <boost/preprocessor/cat.hpp>
+
+namespace boost { namespace mpl {
+
+#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
+namespace aux {
+template< typename T, typename Shift, T n, Shift s >
+struct BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd)
+{
+    BOOST_STATIC_CONSTANT(T, value = (n AUX778076_OP_TOKEN s));
+    typedef integral_c<T,value> type;
+};
+}
+#endif
+
+template<>
+struct AUX778076_OP_IMPL_NAME<integral_c_tag,integral_c_tag>
+{
+    template< typename N, typename S > struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
+        : integral_c<
+              typename N::value_type
+            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
+                  AUX778076_OP_TOKEN BOOST_MPL_AUX_VALUE_WKND(S)::value
+                )
+            >
+#else
+        : aux::BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd)<
+              typename N::value_type
+            , typename S::value_type
+            , N::value
+            , S::value
+            >::type
+#endif
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#undef AUX778076_OP_TAG_NAME
+#undef AUX778076_OP_IMPL_NAME
+#undef AUX778076_OP_ARITY
+#undef AUX778076_OP_PREFIX
+#undef AUX778076_OP_NAME
+#undef AUX778076_OP_TOKEN
diff --git a/ext/boost/mpl/aux_/single_element_iter.hpp b/ext/boost/mpl/aux_/single_element_iter.hpp
new file mode 100644
index 0000000..e17abb9
--- /dev/null
+++ b/ext/boost/mpl/aux_/single_element_iter.hpp
@@ -0,0 +1,118 @@
+
+#ifndef BOOST_MPL_AUX_SINGLE_ELEMENT_ITER_HPP_INCLUDED
+#define BOOST_MPL_AUX_SINGLE_ELEMENT_ITER_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: single_element_iter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/iterator_tags.hpp>
+#include <boost/mpl/advance_fwd.hpp>
+#include <boost/mpl/distance_fwd.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/aux_/nttp_decl.hpp>
+#include <boost/mpl/aux_/value_wknd.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+namespace boost { namespace mpl { 
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+namespace aux {
+
+template< typename T, BOOST_MPL_AUX_NTTP_DECL(int, is_last_) >
+struct sel_iter;
+
+template< typename T >
+struct sel_iter<T,0>
+{
+    typedef random_access_iterator_tag category;
+    typedef sel_iter<T,1> next;
+    typedef T type;
+};
+
+template< typename T >
+struct sel_iter<T,1>
+{
+    typedef random_access_iterator_tag category;
+    typedef sel_iter<T,0> prior;
+};
+
+} // namespace aux
+
+template< typename T, BOOST_MPL_AUX_NTTP_DECL(int, is_last_), typename Distance >
+struct advance< aux::sel_iter<T,is_last_>,Distance>
+{
+    typedef aux::sel_iter<
+          T
+        , ( is_last_ + BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Distance) )
+        > type;
+};
+
+template< 
+      typename T
+    , BOOST_MPL_AUX_NTTP_DECL(int, l1)
+    , BOOST_MPL_AUX_NTTP_DECL(int, l2) 
+    >
+struct distance< aux::sel_iter<T,l1>, aux::sel_iter<T,l2> >
+    : int_<( l2 - l1 )>
+{
+};
+
+#else
+
+namespace aux {
+
+struct sel_iter_tag;
+
+template< typename T, BOOST_MPL_AUX_NTTP_DECL(int, is_last_) >
+struct sel_iter
+{
+    enum { pos_ = is_last_ };
+    typedef aux::sel_iter_tag tag;
+    typedef random_access_iterator_tag category;
+
+    typedef sel_iter<T,(is_last_ + 1)> next;
+    typedef sel_iter<T,(is_last_ - 1)> prior;
+    typedef T type;
+};
+
+} // namespace aux
+
+template<> struct advance_impl<aux::sel_iter_tag>
+{
+    template< typename Iterator, typename N > struct apply
+    {
+        enum { pos_ = Iterator::pos_, n_ = N::value };
+        typedef aux::sel_iter<
+              typename Iterator::type
+            , (pos_ + n_)
+            > type;
+    };
+};
+
+template<> struct distance_impl<aux::sel_iter_tag>
+{
+    template< typename Iter1, typename Iter2 > struct apply
+    {
+        enum { pos1_ = Iter1::pos_, pos2_ = Iter2::pos_ };
+        typedef int_<( pos2_ - pos1_ )> type;
+        BOOST_STATIC_CONSTANT(int, value = ( pos2_ - pos1_ ));
+    };
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+}}
+
+#endif // BOOST_MPL_AUX_SINGLE_ELEMENT_ITER_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/size_impl.hpp b/ext/boost/mpl/aux_/size_impl.hpp
new file mode 100644
index 0000000..73dc50d
--- /dev/null
+++ b/ext/boost/mpl/aux_/size_impl.hpp
@@ -0,0 +1,52 @@
+
+#ifndef BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: size_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/size_fwd.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/distance.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+namespace boost { namespace mpl {
+
+// default implementation; conrete sequences might override it by 
+// specializing either the 'size_impl' or the primary 'size' template
+
+template< typename Tag >
+struct size_impl
+{
+    template< typename Sequence > struct apply
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561))
+        : distance<
+              typename begin<Sequence>::type
+            , typename end<Sequence>::type
+            >
+    {
+#else
+    {
+        typedef typename distance<
+              typename begin<Sequence>::type
+            , typename end<Sequence>::type
+            >::type type;
+#endif
+    };
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, size_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/sort_impl.hpp b/ext/boost/mpl/aux_/sort_impl.hpp
new file mode 100644
index 0000000..76bc311
--- /dev/null
+++ b/ext/boost/mpl/aux_/sort_impl.hpp
@@ -0,0 +1,121 @@
+
+#ifndef BOOST_MPL_AUX_SORT_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_SORT_IMPL_HPP_INCLUDED
+
+// Copyright Eric Friedman 2002-2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: sort_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/partition.hpp>
+#include <boost/mpl/copy.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/back_inserter.hpp>
+#include <boost/mpl/front_inserter.hpp>
+#include <boost/mpl/iterator_range.hpp>
+#include <boost/mpl/joint_view.hpp>
+#include <boost/mpl/single_view.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/empty.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/less.hpp>
+#include <boost/mpl/aux_/na.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename Seq, typename Pred >
+struct quick_sort;
+
+// agurt, 10/nov/04: for the sake of deficeint compilers 
+template< typename Pred, typename Pivot >
+struct quick_sort_pred
+{
+    template< typename T > struct apply
+    {
+        typedef typename apply2<Pred,T,Pivot>::type type;
+    };
+};
+
+template< 
+      typename Seq
+    , typename Pred
+    >
+struct quick_sort_impl
+{
+    typedef typename begin<Seq>::type pivot;
+    typedef typename partition<
+          iterator_range< 
+              typename next<pivot>::type
+            , typename end<Seq>::type
+            >
+        , protect< aux::quick_sort_pred< Pred, typename deref<pivot>::type > >
+        , back_inserter< vector<> >
+        , back_inserter< vector<> >
+        >::type partitioned;
+
+    typedef typename quick_sort< typename partitioned::first, Pred >::type part1;
+    typedef typename quick_sort< typename partitioned::second, Pred >::type part2;
+
+    typedef joint_view< 
+              joint_view< part1, single_view< typename deref<pivot>::type > >
+            , part2
+            > type;
+};
+
+template< 
+      typename Seq
+    , typename Pred
+    >
+struct quick_sort
+    : eval_if<
+          empty<Seq>
+        , identity<Seq>
+        , quick_sort_impl<Seq,Pred>
+        >
+{
+};
+
+
+template <
+      typename Sequence
+    , typename Pred
+    , typename In
+    >
+struct sort_impl
+{
+    typedef typename quick_sort< 
+          Sequence
+        , typename if_na<Pred,less<> >::type
+        >::type result_;
+        
+    typedef typename copy<result_,In>::type type;
+};
+
+template <
+      typename Sequence
+    , typename Pred
+    , typename In
+    >
+struct reverse_sort_impl
+{
+    typedef typename quick_sort< 
+          Sequence
+        , typename if_na<Pred,less<> >::type
+        >::type result_;
+        
+    typedef typename reverse_copy<result_,In>::type type;
+};
+
+}}}
+
+#endif // BOOST_MPL_AUX_SORT_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/static_cast.hpp b/ext/boost/mpl/aux_/static_cast.hpp
index 133730d..8c12128 100644
--- a/ext/boost/mpl/aux_/static_cast.hpp
+++ b/ext/boost/mpl/aux_/static_cast.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: static_cast.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/workaround.hpp>
diff --git a/ext/boost/mpl/aux_/template_arity.hpp b/ext/boost/mpl/aux_/template_arity.hpp
index ed26ea2..5e3f6e0 100644
--- a/ext/boost/mpl/aux_/template_arity.hpp
+++ b/ext/boost/mpl/aux_/template_arity.hpp
@@ -15,7 +15,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: template_arity.hpp 61584 2010-04-26 18:48:26Z agurtovoy $
-// $Date: 2010-04-26 14:48:26 -0400 (Mon, 26 Apr 2010) $
+// $Date: 2010-04-26 11:48:26 -0700 (Mon, 26 Apr 2010) $
 // $Revision: 61584 $
 
 #include <boost/mpl/aux_/config/ttp.hpp>
diff --git a/ext/boost/mpl/aux_/template_arity_fwd.hpp b/ext/boost/mpl/aux_/template_arity_fwd.hpp
index 4b7c8b8..44bc9d2 100644
--- a/ext/boost/mpl/aux_/template_arity_fwd.hpp
+++ b/ext/boost/mpl/aux_/template_arity_fwd.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: template_arity_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 namespace boost { namespace mpl { namespace aux {
diff --git a/ext/boost/mpl/aux_/test.hpp b/ext/boost/mpl/aux_/test.hpp
new file mode 100644
index 0000000..f676a31
--- /dev/null
+++ b/ext/boost/mpl/aux_/test.hpp
@@ -0,0 +1,32 @@
+
+#ifndef BOOST_MPL_AUX_TEST_HPP_INCLUDED
+#define BOOST_MPL_AUX_TEST_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: test.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/test/test_case.hpp>
+#include <boost/mpl/aux_/test/data.hpp>
+#include <boost/mpl/aux_/test/assert.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+int main()
+{
+    return boost::report_errors();
+}
+
+using namespace boost;
+using namespace mpl;
+
+#endif // BOOST_MPL_AUX_TEST_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/test/assert.hpp b/ext/boost/mpl/aux_/test/assert.hpp
new file mode 100644
index 0000000..0d107df
--- /dev/null
+++ b/ext/boost/mpl/aux_/test/assert.hpp
@@ -0,0 +1,29 @@
+
+#ifndef BOOST_MPL_AUX_TEST_ASSERT_HPP_INCLUDED
+#define BOOST_MPL_AUX_TEST_ASSERT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: assert.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/assert.hpp>
+#include <boost/preprocessor/cat.hpp>
+
+#define MPL_ASSERT(pred)                BOOST_MPL_ASSERT(pred)
+#define MPL_ASSERT_NOT(pred)            BOOST_MPL_ASSERT_NOT(pred)
+#define MPL_ASSERT_MSG(c, msg, types)   BOOST_MPL_ASSERT_MSG(c, msg, types)
+#define MPL_ASSERT_RELATION(x, rel, y)  BOOST_MPL_ASSERT_RELATION(x, rel, y)
+
+#define MPL_ASSERT_INSTANTIATION(x) \
+    enum { BOOST_PP_CAT(instantiation_test, __LINE__) = sizeof( x ) } \
+/**/
+
+#endif // BOOST_MPL_AUX_TEST_ASSERT_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/test/data.hpp b/ext/boost/mpl/aux_/test/data.hpp
new file mode 100644
index 0000000..6eee823
--- /dev/null
+++ b/ext/boost/mpl/aux_/test/data.hpp
@@ -0,0 +1,25 @@
+
+#ifndef BOOST_MPL_AUX_TEST_DATA_HPP_INCLUDED
+#define BOOST_MPL_AUX_TEST_DATA_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: data.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/noncopyable.hpp>
+
+enum enum_ {};
+struct UDT {};
+struct incomplete;
+class abstract { public: virtual ~abstract() = 0; };
+using boost::noncopyable;
+
+#endif // BOOST_MPL_AUX_TEST_DATA_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/test/test_case.hpp b/ext/boost/mpl/aux_/test/test_case.hpp
new file mode 100644
index 0000000..a23330c
--- /dev/null
+++ b/ext/boost/mpl/aux_/test/test_case.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_AUX_TEST_TEST_CASE_HPP_INCLUDED
+#define BOOST_MPL_AUX_TEST_TEST_CASE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: test_case.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/preprocessor/cat.hpp>
+
+#define MPL_TEST_CASE() void BOOST_PP_CAT(test,__LINE__)()
+
+#endif // BOOST_MPL_AUX_TEST_TEST_CASE_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/traits_lambda_spec.hpp b/ext/boost/mpl/aux_/traits_lambda_spec.hpp
new file mode 100644
index 0000000..c9b60fe
--- /dev/null
+++ b/ext/boost/mpl/aux_/traits_lambda_spec.hpp
@@ -0,0 +1,63 @@
+
+#ifndef BOOST_MPL_AUX_TRAITS_LAMBDA_SPEC_HPP_INCLUDED
+#define BOOST_MPL_AUX_TRAITS_LAMBDA_SPEC_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: traits_lambda_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/sequence_tag_fwd.hpp>
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/aux_/preprocessor/params.hpp>
+#include <boost/mpl/aux_/config/lambda.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
+
+#   define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) /**/
+
+#elif !defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
+
+#   define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) \
+template<> struct trait<void_> \
+{ \
+    template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \
+    { \
+    }; \
+}; \
+/**/
+
+#else
+
+#   define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) \
+template<> struct trait<void_> \
+{ \
+    template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \
+    { \
+    }; \
+}; \
+template<> struct trait<int> \
+{ \
+    template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \
+    { \
+        typedef int type; \
+    }; \
+}; \
+/**/
+
+#endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT
+
+
+#define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(i, trait) \
+    BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) \
+    template<> struct trait<non_sequence_tag> {}; \
+/**/
+
+#endif // BOOST_MPL_AUX_TRAITS_LAMBDA_SPEC_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/transform_iter.hpp b/ext/boost/mpl/aux_/transform_iter.hpp
new file mode 100644
index 0000000..3faee5f
--- /dev/null
+++ b/ext/boost/mpl/aux_/transform_iter.hpp
@@ -0,0 +1,123 @@
+
+#ifndef BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED
+#define BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: transform_iter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/iterator_tags.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/aux_/lambda_spec.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl { 
+
+namespace aux {
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template<
+      typename Iterator
+    , typename LastIterator
+    , typename F
+    >
+struct transform_iter
+{
+    typedef Iterator base;
+    typedef forward_iterator_tag category;
+    typedef transform_iter< typename mpl::next<base>::type,LastIterator,F > next;
+    
+    typedef typename apply1<
+          F
+        , typename deref<base>::type
+        >::type type;
+};
+
+template<
+      typename LastIterator
+    , typename F
+    >
+struct transform_iter< LastIterator,LastIterator,F >
+{
+    typedef LastIterator base;
+    typedef forward_iterator_tag category;
+};
+
+#else
+
+template<
+      typename Iterator
+    , typename LastIterator
+    , typename F
+    >
+struct transform_iter;
+
+template< bool >
+struct transform_iter_impl 
+{
+    template<
+          typename Iterator
+        , typename LastIterator
+        , typename F
+        >
+    struct result_
+    {
+        typedef Iterator base;
+        typedef forward_iterator_tag category;
+        typedef transform_iter< typename mpl::next<Iterator>::type,LastIterator,F > next;
+        
+        typedef typename apply1<
+              F
+            , typename deref<Iterator>::type
+            >::type type;
+    };
+};
+
+template<>
+struct transform_iter_impl<true>
+{
+    template<
+          typename Iterator
+        , typename LastIterator
+        , typename F
+        >
+    struct result_
+    {
+        typedef Iterator base;
+        typedef forward_iterator_tag category;
+    };
+};
+
+template<
+      typename Iterator
+    , typename LastIterator
+    , typename F
+    >
+struct transform_iter
+    : transform_iter_impl<
+          ::boost::is_same<Iterator,LastIterator>::value
+        >::template result_< Iterator,LastIterator,F >
+{
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace aux
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::transform_iter)
+
+}}
+
+#endif // BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/type_wrapper.hpp b/ext/boost/mpl/aux_/type_wrapper.hpp
index 0583f72..6d6091b 100644
--- a/ext/boost/mpl/aux_/type_wrapper.hpp
+++ b/ext/boost/mpl/aux_/type_wrapper.hpp
@@ -12,7 +12,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: type_wrapper.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/ctps.hpp>
diff --git a/ext/boost/mpl/aux_/unwrap.hpp b/ext/boost/mpl/aux_/unwrap.hpp
new file mode 100644
index 0000000..bc734f0
--- /dev/null
+++ b/ext/boost/mpl/aux_/unwrap.hpp
@@ -0,0 +1,47 @@
+
+#ifndef BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED
+#define BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED
+
+// Copyright Peter Dimov and Multi Media Ltd 2001, 2002
+// Copyright David Abrahams 2001
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: unwrap.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/ref.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+template< typename F >
+inline
+F& unwrap(F& f, long)
+{
+    return f;
+}
+
+template< typename F >
+inline
+F&
+unwrap(reference_wrapper<F>& f, int)
+{
+    return f;
+}
+
+template< typename F >
+inline
+F&
+unwrap(reference_wrapper<F> const& f, int)
+{
+    return f;
+}
+
+}}}
+
+#endif // BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED
diff --git a/ext/boost/mpl/aux_/value_wknd.hpp b/ext/boost/mpl/aux_/value_wknd.hpp
index 9de1103..7baa8bf 100644
--- a/ext/boost/mpl/aux_/value_wknd.hpp
+++ b/ext/boost/mpl/aux_/value_wknd.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: value_wknd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/static_cast.hpp>
diff --git a/ext/boost/mpl/aux_/yes_no.hpp b/ext/boost/mpl/aux_/yes_no.hpp
index c3f567d..ebcb00d 100644
--- a/ext/boost/mpl/aux_/yes_no.hpp
+++ b/ext/boost/mpl/aux_/yes_no.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: yes_no.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/nttp_decl.hpp>
diff --git a/ext/boost/mpl/back.hpp b/ext/boost/mpl/back.hpp
new file mode 100644
index 0000000..ff6b5d6
--- /dev/null
+++ b/ext/boost/mpl/back.hpp
@@ -0,0 +1,39 @@
+
+#ifndef BOOST_MPL_BACK_HPP_INCLUDED
+#define BOOST_MPL_BACK_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/back_fwd.hpp>
+#include <boost/mpl/aux_/back_impl.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    >
+struct back
+    : back_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,back,(Sequence))
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, back)
+
+}}
+
+#endif // BOOST_MPL_BACK_HPP_INCLUDED
diff --git a/ext/boost/mpl/back_fwd.hpp b/ext/boost/mpl/back_fwd.hpp
new file mode 100644
index 0000000..c8b1fe9
--- /dev/null
+++ b/ext/boost/mpl/back_fwd.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_BACK_FWD_HPP_INCLUDED
+#define BOOST_MPL_BACK_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: back_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct back_impl;
+template< typename Sequence > struct back;
+
+}}
+
+#endif // BOOST_MPL_BACK_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/back_inserter.hpp b/ext/boost/mpl/back_inserter.hpp
new file mode 100644
index 0000000..ce2a284
--- /dev/null
+++ b/ext/boost/mpl/back_inserter.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_BACK_INSERTER_HPP_INCLUDED
+#define BOOST_MPL_BACK_INSERTER_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: back_inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/push_back.hpp>
+#include <boost/mpl/inserter.hpp>
+
+namespace boost {
+namespace mpl {
+
+template<
+      typename Sequence
+    >
+struct back_inserter
+    : inserter< Sequence,push_back<> >
+{
+};
+
+}}
+
+#endif // BOOST_MPL_BACK_INSERTER_HPP_INCLUDED
diff --git a/ext/boost/mpl/base.hpp b/ext/boost/mpl/base.hpp
new file mode 100644
index 0000000..0dcd712
--- /dev/null
+++ b/ext/boost/mpl/base.hpp
@@ -0,0 +1,35 @@
+
+#ifndef BOOST_MPL_BASE_HPP_INCLUDED
+#define BOOST_MPL_BASE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: base.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct base
+{
+    typedef typename T::base type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,base,(T))
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, base)
+
+}}
+
+#endif // BOOST_MPL_BASE_HPP_INCLUDED
diff --git a/ext/boost/mpl/begin.hpp b/ext/boost/mpl/begin.hpp
new file mode 100644
index 0000000..9dab265
--- /dev/null
+++ b/ext/boost/mpl/begin.hpp
@@ -0,0 +1,19 @@
+
+#ifndef BOOST_MPL_BEGIN_HPP_INCLUDED
+#define BOOST_MPL_BEGIN_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: begin.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end.hpp>
+
+#endif // BOOST_MPL_BEGIN_HPP_INCLUDED
diff --git a/ext/boost/mpl/begin_end.hpp b/ext/boost/mpl/begin_end.hpp
new file mode 100644
index 0000000..6c3accc
--- /dev/null
+++ b/ext/boost/mpl/begin_end.hpp
@@ -0,0 +1,57 @@
+
+#ifndef BOOST_MPL_BEGIN_END_HPP_INCLUDED
+#define BOOST_MPL_BEGIN_END_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: begin_end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end_fwd.hpp>
+#include <boost/mpl/aux_/begin_end_impl.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+// agurt, 13/sep/02: switched from inheritance to typedef; MSVC is more
+// happy this way (less ETI-related errors), and it doesn't affect 
+// anything else
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    >
+struct begin
+{
+    typedef typename sequence_tag<Sequence>::type tag_;
+    typedef typename begin_impl< tag_ >
+        ::template apply< Sequence >::type type;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,begin,(Sequence))
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    >
+struct end
+{
+    typedef typename sequence_tag<Sequence>::type tag_;
+    typedef typename end_impl< tag_ >
+        ::template apply< Sequence >::type type;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,end,(Sequence))
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, begin)
+BOOST_MPL_AUX_NA_SPEC(1, end)
+
+}}
+
+#endif // BOOST_MPL_BEGIN_END_HPP_INCLUDED
diff --git a/ext/boost/mpl/begin_end_fwd.hpp b/ext/boost/mpl/begin_end_fwd.hpp
new file mode 100644
index 0000000..d1edaca
--- /dev/null
+++ b/ext/boost/mpl/begin_end_fwd.hpp
@@ -0,0 +1,27 @@
+
+#ifndef BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED
+#define BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: begin_end_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct begin_impl;
+template< typename Tag > struct end_impl;
+
+template< typename Sequence > struct begin;
+template< typename Sequence > struct end;
+
+}}
+
+#endif // BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/bind.hpp b/ext/boost/mpl/bind.hpp
index 5d851ef..25e46b4 100644
--- a/ext/boost/mpl/bind.hpp
+++ b/ext/boost/mpl/bind.hpp
@@ -16,7 +16,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: bind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
diff --git a/ext/boost/mpl/bind_fwd.hpp b/ext/boost/mpl/bind_fwd.hpp
index 18ac881..35795ac 100644
--- a/ext/boost/mpl/bind_fwd.hpp
+++ b/ext/boost/mpl/bind_fwd.hpp
@@ -15,7 +15,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: bind_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
diff --git a/ext/boost/mpl/bitand.hpp b/ext/boost/mpl/bitand.hpp
new file mode 100644
index 0000000..7292569
--- /dev/null
+++ b/ext/boost/mpl/bitand.hpp
@@ -0,0 +1,45 @@
+
+#ifndef BOOST_MPL_BITAND_HPP_INCLUDED
+#define BOOST_MPL_BITAND_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2009
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: bitand.hpp 63520 2010-07-02 08:59:55Z agurtovoy $
+// $Date: 2010-07-02 01:59:55 -0700 (Fri, 02 Jul 2010) $
+// $Revision: 63520 $
+
+// agurt, 23/jan/10: workaround a conflict with <iso646.h> header's 
+// macros, see http://tinyurl.com/ycwdxco; 'defined(bitand)'
+// has to be checked in a separate condition, otherwise GCC complains 
+// about 'bitand' being an alternative token
+#if defined(_MSC_VER) 
+#ifndef __GCCXML__
+#if defined(bitand)
+#   pragma push_macro("bitand")
+#   undef bitand
+#   define bitand(x)
+#endif
+#endif
+#endif
+
+#define AUX778076_OP_NAME   bitand_
+#define AUX778076_OP_PREFIX bitand
+#define AUX778076_OP_TOKEN  &
+#include <boost/mpl/aux_/arithmetic_op.hpp>
+
+#if defined(_MSC_VER)
+#ifndef __GCCXML__
+#if defined(bitand)
+#   pragma pop_macro("bitand")
+#endif
+#endif
+#endif
+
+#endif // BOOST_MPL_BITAND_HPP_INCLUDED
diff --git a/ext/boost/mpl/bitor.hpp b/ext/boost/mpl/bitor.hpp
new file mode 100644
index 0000000..11f092c
--- /dev/null
+++ b/ext/boost/mpl/bitor.hpp
@@ -0,0 +1,45 @@
+
+#ifndef BOOST_MPL_BITOR_HPP_INCLUDED
+#define BOOST_MPL_BITOR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2009
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: bitor.hpp 63520 2010-07-02 08:59:55Z agurtovoy $
+// $Date: 2010-07-02 01:59:55 -0700 (Fri, 02 Jul 2010) $
+// $Revision: 63520 $
+
+// agurt, 23/jan/10: workaround a conflict with <iso646.h> header's 
+// macros, see http://tinyurl.com/ycwdxco; 'defined(bitor)'
+// has to be checked in a separate condition, otherwise GCC complains 
+// about 'bitor' being an alternative token
+#if defined(_MSC_VER) 
+#ifndef __GCCXML__
+#if defined(bitor)
+#   pragma push_macro("bitor")
+#   undef bitor
+#   define bitor(x)
+#endif
+#endif
+#endif
+
+#define AUX778076_OP_NAME   bitor_
+#define AUX778076_OP_PREFIX bitor
+#define AUX778076_OP_TOKEN  |
+#include <boost/mpl/aux_/arithmetic_op.hpp>
+
+#if defined(_MSC_VER)
+#ifndef __GCCXML__
+#if defined(bitor)
+#   pragma pop_macro("bitor")
+#endif
+#endif
+#endif
+
+#endif // BOOST_MPL_BITOR_HPP_INCLUDED
diff --git a/ext/boost/mpl/bitwise.hpp b/ext/boost/mpl/bitwise.hpp
new file mode 100644
index 0000000..fdaa0c5
--- /dev/null
+++ b/ext/boost/mpl/bitwise.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_BITWISE_HPP_INCLUDED
+#define BOOST_MPL_BITWISE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: bitwise.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/bitand.hpp>
+#include <boost/mpl/bitor.hpp>
+#include <boost/mpl/bitxor.hpp>
+#include <boost/mpl/shift_left.hpp>
+#include <boost/mpl/shift_right.hpp>
+
+#endif // BOOST_MPL_BITWISE_HPP_INCLUDED
diff --git a/ext/boost/mpl/bitxor.hpp b/ext/boost/mpl/bitxor.hpp
new file mode 100644
index 0000000..1d1ec6e
--- /dev/null
+++ b/ext/boost/mpl/bitxor.hpp
@@ -0,0 +1,23 @@
+
+#ifndef BOOST_MPL_BITXOR_HPP_INCLUDED
+#define BOOST_MPL_BITXOR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: bitxor.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME   bitxor_
+#define AUX778076_OP_PREFIX bitxor
+#define AUX778076_OP_TOKEN  ^
+#include <boost/mpl/aux_/arithmetic_op.hpp>
+
+#endif // BOOST_MPL_BITXOR_HPP_INCLUDED
diff --git a/ext/boost/mpl/bool.hpp b/ext/boost/mpl/bool.hpp
index a815ac5..cabf22f 100644
--- a/ext/boost/mpl/bool.hpp
+++ b/ext/boost/mpl/bool.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: bool.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/bool_fwd.hpp>
diff --git a/ext/boost/mpl/bool_fwd.hpp b/ext/boost/mpl/bool_fwd.hpp
index 080d876..e71ab9c 100644
--- a/ext/boost/mpl/bool_fwd.hpp
+++ b/ext/boost/mpl/bool_fwd.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: bool_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/adl_barrier.hpp>
diff --git a/ext/boost/mpl/char.hpp b/ext/boost/mpl/char.hpp
new file mode 100644
index 0000000..08828c2
--- /dev/null
+++ b/ext/boost/mpl/char.hpp
@@ -0,0 +1,22 @@
+
+#ifndef BOOST_MPL_CHAR_HPP_INCLUDED
+#define BOOST_MPL_CHAR_HPP_INCLUDED
+
+// Copyright Eric Niebler 2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Source$
+// $Date: 2008-06-14 08:41:37 -0700 (Sat, 16 Jun 2008) $
+// $Revision: 24874 $
+
+#include <boost/mpl/char_fwd.hpp>
+
+#define AUX_WRAPPER_VALUE_TYPE char
+#include <boost/mpl/aux_/integral_wrapper.hpp>
+
+#endif // BOOST_MPL_CHAR_HPP_INCLUDED
diff --git a/ext/boost/mpl/char_fwd.hpp b/ext/boost/mpl/char_fwd.hpp
new file mode 100644
index 0000000..442d0a1
--- /dev/null
+++ b/ext/boost/mpl/char_fwd.hpp
@@ -0,0 +1,27 @@
+
+#ifndef BOOST_MPL_CHAR_FWD_HPP_INCLUDED
+#define BOOST_MPL_CHAR_FWD_HPP_INCLUDED
+
+// Copyright Eric Niebler 2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Source$
+// $Date: 2008-06-14 08:41:37 -0700 (Sat, 16 Jun 2008) $
+// $Revision: 24874 $
+
+#include <boost/mpl/aux_/adl_barrier.hpp>
+#include <boost/mpl/aux_/nttp_decl.hpp>
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+
+template< BOOST_MPL_AUX_NTTP_DECL(char, N) > struct char_;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+BOOST_MPL_AUX_ADL_BARRIER_DECL(char_)
+
+#endif // BOOST_MPL_CHAR_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/clear.hpp b/ext/boost/mpl/clear.hpp
new file mode 100644
index 0000000..9cf16fa
--- /dev/null
+++ b/ext/boost/mpl/clear.hpp
@@ -0,0 +1,39 @@
+
+#ifndef BOOST_MPL_CLEAR_HPP_INCLUDED
+#define BOOST_MPL_CLEAR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: clear.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/clear_fwd.hpp>
+#include <boost/mpl/aux_/clear_impl.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    >
+struct clear
+    : clear_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,clear,(Sequence))
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, clear)
+
+}}
+
+#endif // BOOST_MPL_CLEAR_HPP_INCLUDED
diff --git a/ext/boost/mpl/clear_fwd.hpp b/ext/boost/mpl/clear_fwd.hpp
new file mode 100644
index 0000000..e660bc2
--- /dev/null
+++ b/ext/boost/mpl/clear_fwd.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_CLEAR_FWD_HPP_INCLUDED
+#define BOOST_MPL_CLEAR_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: clear_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct clear_impl;
+template< typename Sequence > struct clear;
+
+}}
+
+#endif // BOOST_MPL_CLEAR_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/comparison.hpp b/ext/boost/mpl/comparison.hpp
new file mode 100644
index 0000000..223b9ef
--- /dev/null
+++ b/ext/boost/mpl/comparison.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_COMPARISON_HPP_INCLUDED
+#define BOOST_MPL_COMPARISON_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: comparison.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/not_equal_to.hpp>
+#include <boost/mpl/less.hpp>
+#include <boost/mpl/greater.hpp>
+#include <boost/mpl/less_equal.hpp>
+#include <boost/mpl/greater_equal.hpp>
+
+#endif // BOOST_MPL_COMPARISON_HPP_INCLUDED
diff --git a/ext/boost/mpl/contains.hpp b/ext/boost/mpl/contains.hpp
new file mode 100644
index 0000000..620fe41
--- /dev/null
+++ b/ext/boost/mpl/contains.hpp
@@ -0,0 +1,41 @@
+
+#ifndef BOOST_MPL_CONTAINS_HPP_INCLUDED
+#define BOOST_MPL_CONTAINS_HPP_INCLUDED
+
+// Copyright Eric Friedman 2002
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: contains.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/contains_fwd.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/contains_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct contains
+    : contains_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence,T >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,contains,(Sequence,T))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, contains)
+
+}}
+
+#endif // BOOST_MPL_CONTAINS_HPP_INCLUDED
diff --git a/ext/boost/mpl/contains_fwd.hpp b/ext/boost/mpl/contains_fwd.hpp
new file mode 100644
index 0000000..af7721a
--- /dev/null
+++ b/ext/boost/mpl/contains_fwd.hpp
@@ -0,0 +1,25 @@
+
+#ifndef BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED
+#define BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED
+
+// Copyright Eric Friedman 2002
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: contains_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct contains_impl;
+template< typename Sequence, typename T > struct contains;
+
+}}
+
+#endif // BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/copy.hpp b/ext/boost/mpl/copy.hpp
new file mode 100644
index 0000000..6849ec8
--- /dev/null
+++ b/ext/boost/mpl/copy.hpp
@@ -0,0 +1,58 @@
+
+#ifndef BOOST_MPL_COPY_HPP_INCLUDED
+#define BOOST_MPL_COPY_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: copy.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/reverse_fold.hpp>
+#include <boost/mpl/aux_/inserter_algorithm.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename Sequence
+    , typename Inserter
+    >
+struct copy_impl
+    : fold< 
+          Sequence
+        , typename Inserter::state
+        , typename Inserter::operation
+        >
+{
+};
+
+template<
+      typename Sequence
+    , typename Inserter
+    >
+struct reverse_copy_impl
+    : reverse_fold<
+          Sequence
+        , typename Inserter::state
+        , typename Inserter::operation
+        >
+{
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(2, copy)
+
+}}
+
+#endif // BOOST_MPL_COPY_HPP_INCLUDED
diff --git a/ext/boost/mpl/copy_if.hpp b/ext/boost/mpl/copy_if.hpp
new file mode 100644
index 0000000..c7eb283
--- /dev/null
+++ b/ext/boost/mpl/copy_if.hpp
@@ -0,0 +1,96 @@
+
+#ifndef BOOST_MPL_COPY_IF_HPP_INCLUDED
+#define BOOST_MPL_COPY_IF_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: copy_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/reverse_fold.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/protect.hpp>
+#include <boost/mpl/aux_/inserter_algorithm.hpp>
+#include <boost/mpl/aux_/config/forwarding.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename Operation
+    , typename Predicate
+    >
+struct copy_if_op
+{
+    template< typename Sequence, typename T > struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
+        : eval_if<
+              typename apply1<Predicate,T>::type
+            , apply2<Operation,Sequence,T>
+            , identity<Sequence>
+            >
+    {
+#else
+    {
+        typedef typename eval_if<
+              typename apply1<Predicate,T>::type
+            , apply2<Operation,Sequence,T>
+            , identity<Sequence>
+            >::type type;
+#endif
+    };
+};
+
+template<
+      typename Sequence
+    , typename Predicate
+    , typename Inserter
+    >
+struct copy_if_impl
+    : fold<
+          Sequence
+        , typename Inserter::state
+        , protect< aux::copy_if_op<
+              typename Inserter::operation
+            , Predicate
+            > >
+        >
+{
+};
+
+template<
+      typename Sequence
+    , typename Predicate
+    , typename Inserter
+    >
+struct reverse_copy_if_impl
+    : reverse_fold<
+          Sequence
+        , typename Inserter::state
+        , protect< aux::copy_if_op<
+              typename Inserter::operation
+            , Predicate
+            > >
+        >
+{
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, copy_if)
+
+}}
+
+#endif // BOOST_MPL_COPY_IF_HPP_INCLUDED
diff --git a/ext/boost/mpl/count.hpp b/ext/boost/mpl/count.hpp
new file mode 100644
index 0000000..04fdb5f
--- /dev/null
+++ b/ext/boost/mpl/count.hpp
@@ -0,0 +1,40 @@
+
+#ifndef BOOST_MPL_COUNT_HPP_INCLUDED
+#define BOOST_MPL_COUNT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: count.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/count_fwd.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/count_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct count
+    : count_impl< typename sequence_tag<Sequence>::type >
+        ::template apply<Sequence,T>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,count,(Sequence,T))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, count)
+
+}}
+
+#endif // BOOST_MPL_COUNT_HPP_INCLUDED
diff --git a/ext/boost/mpl/count_fwd.hpp b/ext/boost/mpl/count_fwd.hpp
new file mode 100644
index 0000000..4a0b4ef
--- /dev/null
+++ b/ext/boost/mpl/count_fwd.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_COUNT_FWD_HPP_INCLUDED
+#define BOOST_MPL_COUNT_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: count_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct count_impl;
+template< typename Sequence, typename T > struct count;
+
+}}
+
+#endif // BOOST_MPL_COUNT_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/count_if.hpp b/ext/boost/mpl/count_if.hpp
new file mode 100644
index 0000000..d800ad0
--- /dev/null
+++ b/ext/boost/mpl/count_if.hpp
@@ -0,0 +1,79 @@
+
+#ifndef BOOST_MPL_COUNT_IF_HPP_INCLUDED
+#define BOOST_MPL_COUNT_IF_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: count_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/integral_c.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/aux_/msvc_eti_base.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/config/forwarding.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< typename Predicate >
+struct next_if
+{
+    template<
+          typename N
+        , typename T
+        >
+    struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
+        : eval_if<
+              typename apply1<Predicate,T>::type
+            , next<N>
+            , identity<N>
+            >
+    {
+#else
+    {
+        typedef typename eval_if<
+              typename apply1<Predicate,T>::type
+            , next<N>
+            , identity<N>
+            >::type type;
+#endif
+    };
+};
+
+} // namespace aux
+
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(Predicate)
+    >
+struct count_if
+    : aux::msvc_eti_base< typename fold<
+          Sequence
+        , integral_c<unsigned long,0>
+        , protect< aux::next_if<Predicate> >
+        >::type >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,count_if,(Sequence,Predicate))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, count_if)
+
+}}
+
+#endif // BOOST_MPL_COUNT_IF_HPP_INCLUDED
diff --git a/ext/boost/mpl/deque.hpp b/ext/boost/mpl/deque.hpp
new file mode 100644
index 0000000..0fa2fcf
--- /dev/null
+++ b/ext/boost/mpl/deque.hpp
@@ -0,0 +1,58 @@
+
+#ifndef BOOST_MPL_DEQUE_HPP_INCLUDED
+#define BOOST_MPL_DEQUE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: deque.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/limits/vector.hpp>
+#   include <boost/mpl/aux_/na.hpp>
+#   include <boost/mpl/aux_/config/preprocessor.hpp>
+
+#   include <boost/preprocessor/inc.hpp>
+#   include <boost/preprocessor/cat.hpp>
+#   include <boost/preprocessor/stringize.hpp>
+
+#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
+#   define AUX778076_DEQUE_HEADER \
+    BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE).hpp \
+    /**/
+#else
+#   define AUX778076_DEQUE_HEADER \
+    BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE)##.hpp \
+    /**/
+#endif
+
+#   include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_DEQUE_HEADER)
+#   undef AUX778076_DEQUE_HEADER
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER deque.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/limits/vector.hpp>
+
+#   define AUX778076_SEQUENCE_NAME deque
+#   define AUX778076_SEQUENCE_BASE_NAME vector
+#   define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_VECTOR_SIZE
+#   include <boost/mpl/aux_/sequence_wrapper.hpp>
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_DEQUE_HPP_INCLUDED
diff --git a/ext/boost/mpl/deref.hpp b/ext/boost/mpl/deref.hpp
new file mode 100644
index 0000000..15479e1
--- /dev/null
+++ b/ext/boost/mpl/deref.hpp
@@ -0,0 +1,41 @@
+
+#ifndef BOOST_MPL_DEREF_HPP_INCLUDED
+#define BOOST_MPL_DEREF_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: deref.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/msvc_type.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/config/eti.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Iterator)
+    >
+struct deref
+{
+#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG)
+    typedef typename Iterator::type type;
+#else
+    typedef typename aux::msvc_type<Iterator>::type type;
+#endif
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,deref,(Iterator))
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, deref)
+
+}}
+
+#endif // BOOST_MPL_DEREF_HPP_INCLUDED
diff --git a/ext/boost/mpl/distance.hpp b/ext/boost/mpl/distance.hpp
new file mode 100644
index 0000000..8ecd3c1
--- /dev/null
+++ b/ext/boost/mpl/distance.hpp
@@ -0,0 +1,78 @@
+
+#ifndef BOOST_MPL_DISTANCE_HPP_INCLUDED
+#define BOOST_MPL_DISTANCE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: distance.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/distance_fwd.hpp>
+#include <boost/mpl/iter_fold.hpp>
+#include <boost/mpl/iterator_range.hpp>
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/tag.hpp>
+#include <boost/mpl/apply_wrap.hpp>
+#include <boost/mpl/aux_/msvc_eti_base.hpp>
+#include <boost/mpl/aux_/value_wknd.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/config/forwarding.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+
+
+namespace boost { namespace mpl {
+
+// default implementation for forward/bidirectional iterators
+template< typename Tag > struct distance_impl
+{
+    template< typename First, typename Last > struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
+        : aux::msvc_eti_base< typename iter_fold<
+              iterator_range<First,Last>
+            , mpl::long_<0>
+            , next<>
+            >::type >
+    {
+#else
+    {
+        typedef typename iter_fold<
+              iterator_range<First,Last>
+            , mpl::long_<0>
+            , next<>
+            >::type type;
+        
+        BOOST_STATIC_CONSTANT(long, value =
+              (iter_fold<
+                  iterator_range<First,Last>
+                , mpl::long_<0>
+                , next<>
+                >::type::value)
+            );
+#endif
+    };
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(First)
+    , typename BOOST_MPL_AUX_NA_PARAM(Last)
+    >
+struct distance
+    : distance_impl< typename tag<First>::type >
+        ::template apply<First, Last>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, distance, (First, Last))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, distance)
+
+}}
+
+#endif // BOOST_MPL_DISTANCE_HPP_INCLUDED
diff --git a/ext/boost/mpl/distance_fwd.hpp b/ext/boost/mpl/distance_fwd.hpp
new file mode 100644
index 0000000..766ceb4
--- /dev/null
+++ b/ext/boost/mpl/distance_fwd.hpp
@@ -0,0 +1,28 @@
+
+#ifndef BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED
+#define BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: distance_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/common_name_wknd.hpp>
+
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_COMMON_NAME_WKND(distance)
+
+template< typename Tag > struct distance_impl;
+template< typename First, typename Last > struct distance;
+
+}}
+
+#endif // BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/divides.hpp b/ext/boost/mpl/divides.hpp
new file mode 100644
index 0000000..6f54496
--- /dev/null
+++ b/ext/boost/mpl/divides.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_DIVIDES_HPP_INCLUDED
+#define BOOST_MPL_DIVIDES_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: divides.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME divides
+#define AUX778076_OP_TOKEN /
+#include <boost/mpl/aux_/arithmetic_op.hpp>
+
+#endif // BOOST_MPL_DIVIDES_HPP_INCLUDED
diff --git a/ext/boost/mpl/empty.hpp b/ext/boost/mpl/empty.hpp
new file mode 100644
index 0000000..e25c04c
--- /dev/null
+++ b/ext/boost/mpl/empty.hpp
@@ -0,0 +1,39 @@
+
+#ifndef BOOST_MPL_EMPTY_HPP_INCLUDED
+#define BOOST_MPL_EMPTY_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/empty_fwd.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/empty_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    >
+struct empty
+    : empty_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,empty,(Sequence))
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, empty)
+
+}}
+
+#endif // BOOST_MPL_EMPTY_HPP_INCLUDED
diff --git a/ext/boost/mpl/empty_base.hpp b/ext/boost/mpl/empty_base.hpp
new file mode 100644
index 0000000..095003e
--- /dev/null
+++ b/ext/boost/mpl/empty_base.hpp
@@ -0,0 +1,59 @@
+
+#ifndef BOOST_MPL_EMPTY_BASE_HPP_INCLUDED
+#define BOOST_MPL_EMPTY_BASE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: empty_base.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/aux_/config/msvc.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+#include <boost/type_traits/is_empty.hpp>
+
+// should be always the last #include directive
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost { namespace mpl {
+
+// empty base class, guaranteed to have no members; inheritance from
+// 'empty_base' through the 'inherit' metafunction is a no-op - see 
+// "mpl/inherit.hpp> header for the details
+struct empty_base {};
+
+template< typename T >
+struct is_empty_base
+    : false_
+{
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+    using false_::value;
+#endif
+};
+
+template<>
+struct is_empty_base<empty_base>
+    : true_
+{
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+    using true_::value;
+#endif
+};
+
+}}
+
+namespace boost {
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_empty, mpl::empty_base, true)
+}
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_MPL_EMPTY_BASE_HPP_INCLUDED
diff --git a/ext/boost/mpl/empty_fwd.hpp b/ext/boost/mpl/empty_fwd.hpp
new file mode 100644
index 0000000..4bf6868
--- /dev/null
+++ b/ext/boost/mpl/empty_fwd.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_EMPTY_FWD_HPP_INCLUDED
+#define BOOST_MPL_EMPTY_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: empty_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct empty_impl;
+template< typename Sequence > struct empty;
+
+}}
+
+#endif // BOOST_MPL_EMPTY_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/empty_sequence.hpp b/ext/boost/mpl/empty_sequence.hpp
new file mode 100644
index 0000000..fe505ea
--- /dev/null
+++ b/ext/boost/mpl/empty_sequence.hpp
@@ -0,0 +1,42 @@
+
+#ifndef BOOST_MPL_EMPTY_SEQUENCE_HPP_INCLUDED
+#define BOOST_MPL_EMPTY_SEQUENCE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2004
+// Copyright Alexander Nasonov 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: empty_sequence.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/size_fwd.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/iterator_tags.hpp>
+
+namespace boost { namespace mpl {
+
+struct empty_sequence
+{
+    struct tag; 
+    struct begin { typedef random_access_iterator_tag category; };    
+    typedef begin end;
+};
+
+template<>
+struct size_impl<empty_sequence::tag>
+{
+    template< typename Sequence > struct apply
+        : int_<0>
+    {
+    };
+};
+
+}}
+
+#endif // #ifndef BOOST_MPL_EMPTY_SEQUENCE_HPP_INCLUDED
diff --git a/ext/boost/mpl/end.hpp b/ext/boost/mpl/end.hpp
new file mode 100644
index 0000000..ddee556
--- /dev/null
+++ b/ext/boost/mpl/end.hpp
@@ -0,0 +1,19 @@
+
+#ifndef BOOST_MPL_END_HPP_INCLUDED
+#define BOOST_MPL_END_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end.hpp>
+
+#endif // BOOST_MPL_END_HPP_INCLUDED
diff --git a/ext/boost/mpl/equal.hpp b/ext/boost/mpl/equal.hpp
new file mode 100644
index 0000000..09e26db
--- /dev/null
+++ b/ext/boost/mpl/equal.hpp
@@ -0,0 +1,112 @@
+
+#ifndef BOOST_MPL_EQUAL_HPP_INCLUDED
+#define BOOST_MPL_EQUAL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/iter_fold_if_impl.hpp>
+#include <boost/mpl/aux_/iter_apply.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/always.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/bind.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/msvc_eti_base.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename Predicate
+    , typename LastIterator1
+    , typename LastIterator2
+    >
+struct equal_pred
+{
+    template<
+          typename Iterator2
+        , typename Iterator1
+        >
+    struct apply
+    {
+        typedef typename and_< 
+              not_< is_same<Iterator1,LastIterator1> >
+            , not_< is_same<Iterator2,LastIterator2> >
+            , aux::iter_apply2<Predicate,Iterator1,Iterator2>
+            >::type type;
+    };
+};
+
+template<
+      typename Sequence1
+    , typename Sequence2
+    , typename Predicate
+    >
+struct equal_impl
+{
+    typedef typename begin<Sequence1>::type first1_;
+    typedef typename begin<Sequence2>::type first2_;
+    typedef typename end<Sequence1>::type last1_;
+    typedef typename end<Sequence2>::type last2_;
+
+    typedef aux::iter_fold_if_impl<
+          first1_
+        , first2_
+        , next<>
+        , protect< aux::equal_pred<Predicate,last1_,last2_> >
+        , void_
+        , always<false_>
+        > fold_;
+
+    typedef typename fold_::iterator iter1_;
+    typedef typename fold_::state iter2_;
+    typedef and_<
+          is_same<iter1_,last1_>
+        , is_same<iter2_,last2_>
+        > result_;
+
+    typedef typename result_::type type;
+};
+
+
+} // namespace aux
+
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence1)
+    , typename BOOST_MPL_AUX_NA_PARAM(Sequence2)
+    , typename Predicate = is_same<_,_>
+    >
+struct equal
+    : aux::msvc_eti_base< 
+          typename aux::equal_impl<Sequence1,Sequence2,Predicate>::type
+        >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,equal,(Sequence1,Sequence2))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, equal)
+
+}}
+
+#endif // BOOST_MPL_EQUAL_HPP_INCLUDED
diff --git a/ext/boost/mpl/equal_to.hpp b/ext/boost/mpl/equal_to.hpp
new file mode 100644
index 0000000..359031c
--- /dev/null
+++ b/ext/boost/mpl/equal_to.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_EQUAL_TO_HPP_INCLUDED
+#define BOOST_MPL_EQUAL_TO_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: equal_to.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME equal_to
+#define AUX778076_OP_TOKEN ==
+#include <boost/mpl/aux_/comparison_op.hpp>
+
+#endif // BOOST_MPL_EQUAL_TO_HPP_INCLUDED
diff --git a/ext/boost/mpl/erase.hpp b/ext/boost/mpl/erase.hpp
new file mode 100644
index 0000000..2bc09ad
--- /dev/null
+++ b/ext/boost/mpl/erase.hpp
@@ -0,0 +1,42 @@
+
+#ifndef BOOST_MPL_ERASE_HPP_INCLUDED
+#define BOOST_MPL_ERASE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: erase.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/erase_fwd.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/erase_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/config/msvc_typename.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(First)
+    , typename BOOST_MPL_AUX_NA_PARAM(Last)
+    >
+struct erase
+    : erase_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence,First,Last >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3,erase,(Sequence,First,Last))
+};
+
+BOOST_MPL_AUX_NA_SPEC(3,erase)
+
+}}
+
+#endif // BOOST_MPL_ERASE_HPP_INCLUDED
diff --git a/ext/boost/mpl/erase_fwd.hpp b/ext/boost/mpl/erase_fwd.hpp
new file mode 100644
index 0000000..1f833ca
--- /dev/null
+++ b/ext/boost/mpl/erase_fwd.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_ERASE_FWD_HPP_INCLUDED
+#define BOOST_MPL_ERASE_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: erase_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct erase_impl;
+template< typename Sequence, typename First, typename Last > struct erase;
+
+}}
+
+#endif // BOOST_MPL_ERASE_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/erase_key.hpp b/ext/boost/mpl/erase_key.hpp
new file mode 100644
index 0000000..9dcca4b
--- /dev/null
+++ b/ext/boost/mpl/erase_key.hpp
@@ -0,0 +1,41 @@
+
+#ifndef BOOST_MPL_ERASE_KEY_HPP_INCLUDED
+#define BOOST_MPL_ERASE_KEY_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: erase_key.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/erase_key_fwd.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/erase_key_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/config/msvc_typename.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(Key)
+    >
+struct erase_key
+    : erase_key_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence,Key >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,erase_key,(Sequence,Key))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2,erase_key)
+
+}}
+
+#endif // BOOST_MPL_ERASE_KEY_HPP_INCLUDED
diff --git a/ext/boost/mpl/erase_key_fwd.hpp b/ext/boost/mpl/erase_key_fwd.hpp
new file mode 100644
index 0000000..cebe5c6
--- /dev/null
+++ b/ext/boost/mpl/erase_key_fwd.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED
+#define BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: erase_key_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct erase_key_impl;
+template< typename Sequence, typename Key > struct erase_key;
+
+}}
+
+#endif // BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/eval_if.hpp b/ext/boost/mpl/eval_if.hpp
index d483c72..f1a5b70 100644
--- a/ext/boost/mpl/eval_if.hpp
+++ b/ext/boost/mpl/eval_if.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: eval_if.hpp 61921 2010-05-11 21:33:24Z neilgroves $
-// $Date: 2010-05-11 17:33:24 -0400 (Tue, 11 May 2010) $
+// $Date: 2010-05-11 14:33:24 -0700 (Tue, 11 May 2010) $
 // $Revision: 61921 $
 
 #include <boost/mpl/if.hpp>
diff --git a/ext/boost/mpl/filter_view.hpp b/ext/boost/mpl/filter_view.hpp
new file mode 100644
index 0000000..c56b215
--- /dev/null
+++ b/ext/boost/mpl/filter_view.hpp
@@ -0,0 +1,46 @@
+
+#ifndef BOOST_MPL_FILTER_VIEW_HPP_INCLUDED
+#define BOOST_MPL_FILTER_VIEW_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: filter_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/aux_/filter_iter.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(Predicate)
+    >
+struct filter_view
+{
+ private:    
+    typedef typename lambda<Predicate>::type pred_;
+    typedef typename begin<Sequence>::type first_;
+    typedef typename end<Sequence>::type last_;
+
+ public:
+    struct tag;
+    typedef filter_view type;
+    typedef typename aux::next_filter_iter< first_,last_,pred_ >::type begin;
+    typedef aux::filter_iter< last_,last_,pred_ > end;
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, filter_view)
+
+}}
+
+#endif // BOOST_MPL_FILTER_VIEW_HPP_INCLUDED
diff --git a/ext/boost/mpl/find.hpp b/ext/boost/mpl/find.hpp
new file mode 100644
index 0000000..7b09423
--- /dev/null
+++ b/ext/boost/mpl/find.hpp
@@ -0,0 +1,38 @@
+
+#ifndef BOOST_MPL_FIND_HPP_INCLUDED
+#define BOOST_MPL_FIND_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: find.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/find_if.hpp>
+#include <boost/mpl/same_as.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct find
+    : find_if< Sequence,same_as<T> >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find,(Sequence,T))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, find)
+
+}}
+
+#endif // BOOST_MPL_FIND_HPP_INCLUDED
diff --git a/ext/boost/mpl/find_if.hpp b/ext/boost/mpl/find_if.hpp
new file mode 100644
index 0000000..a066e71
--- /dev/null
+++ b/ext/boost/mpl/find_if.hpp
@@ -0,0 +1,50 @@
+
+#ifndef BOOST_MPL_FIND_IF_HPP_INCLUDED
+#define BOOST_MPL_FIND_IF_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: find_if.hpp 49274 2008-10-11 07:22:05Z agurtovoy $
+// $Date: 2008-10-11 00:22:05 -0700 (Sat, 11 Oct 2008) $
+// $Revision: 49274 $
+
+#include <boost/mpl/aux_/find_if_pred.hpp>
+#include <boost/mpl/arg.hpp>
+#include <boost/mpl/iter_fold_if.hpp>
+#include <boost/mpl/aux_/common_name_wknd.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_COMMON_NAME_WKND(find_if)
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(Predicate)
+    >
+struct find_if
+{
+    typedef typename iter_fold_if<
+          Sequence
+        , void
+        , mpl::arg<1> // ignore
+        , protect< aux::find_if_pred<Predicate> >
+        >::type result_;
+
+    typedef typename second<result_>::type type;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find_if,(Sequence,Predicate))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2,find_if)
+
+}}
+
+#endif // BOOST_MPL_FIND_IF_HPP_INCLUDED
diff --git a/ext/boost/mpl/fold.hpp b/ext/boost/mpl/fold.hpp
new file mode 100644
index 0000000..e5e02bd
--- /dev/null
+++ b/ext/boost/mpl/fold.hpp
@@ -0,0 +1,48 @@
+
+#ifndef BOOST_MPL_FOLD_HPP_INCLUDED
+#define BOOST_MPL_FOLD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright David Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/O1_size.hpp>
+#include <boost/mpl/aux_/fold_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(State)
+    , typename BOOST_MPL_AUX_NA_PARAM(ForwardOp)
+    >
+struct fold
+{
+    typedef typename aux::fold_impl<
+          ::boost::mpl::O1_size<Sequence>::value
+        , typename begin<Sequence>::type
+        , typename end<Sequence>::type
+        , State
+        , ForwardOp
+        >::state type;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3,fold,(Sequence,State,ForwardOp))
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, fold)
+
+}}
+
+#endif // BOOST_MPL_FOLD_HPP_INCLUDED
diff --git a/ext/boost/mpl/for_each.hpp b/ext/boost/mpl/for_each.hpp
new file mode 100644
index 0000000..016d990
--- /dev/null
+++ b/ext/boost/mpl/for_each.hpp
@@ -0,0 +1,116 @@
+
+#ifndef BOOST_MPL_FOR_EACH_HPP_INCLUDED
+#define BOOST_MPL_FOR_EACH_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: for_each.hpp 55648 2009-08-18 05:16:53Z agurtovoy $
+// $Date: 2009-08-17 22:16:53 -0700 (Mon, 17 Aug 2009) $
+// $Revision: 55648 $
+
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/aux_/unwrap.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/utility/value_init.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< bool done = true >
+struct for_each_impl
+{
+    template<
+          typename Iterator
+        , typename LastIterator
+        , typename TransformFunc
+        , typename F
+        >
+    static void execute(
+          Iterator*
+        , LastIterator*
+        , TransformFunc*
+        , F
+        )
+    {
+    }
+};
+
+template<>
+struct for_each_impl<false>
+{
+    template<
+          typename Iterator
+        , typename LastIterator
+        , typename TransformFunc
+        , typename F
+        >
+    static void execute(
+          Iterator*
+        , LastIterator*
+        , TransformFunc* 
+        , F f
+        )
+    {
+        typedef typename deref<Iterator>::type item;
+        typedef typename apply1<TransformFunc,item>::type arg;
+    
+        // dwa 2002/9/10 -- make sure not to invoke undefined behavior
+        // when we pass arg.
+        value_initialized<arg> x;
+        aux::unwrap(f, 0)(boost::get(x));
+        
+        typedef typename mpl::next<Iterator>::type iter;
+        for_each_impl<boost::is_same<iter,LastIterator>::value>
+            ::execute( static_cast<iter*>(0), static_cast<LastIterator*>(0), static_cast<TransformFunc*>(0), f);
+    }
+};
+
+} // namespace aux
+
+// agurt, 17/mar/02: pointer default parameters are necessary to workaround 
+// MSVC 6.5 function template signature's mangling bug
+template<
+      typename Sequence
+    , typename TransformOp
+    , typename F
+    >
+inline
+void for_each(F f, Sequence* = 0, TransformOp* = 0)
+{
+    BOOST_MPL_ASSERT(( is_sequence<Sequence> ));
+
+    typedef typename begin<Sequence>::type first;
+    typedef typename end<Sequence>::type last;
+
+    aux::for_each_impl< boost::is_same<first,last>::value >
+        ::execute(static_cast<first*>(0), static_cast<last*>(0), static_cast<TransformOp*>(0), f);
+}
+
+template<
+      typename Sequence
+    , typename F
+    >
+inline
+void for_each(F f, Sequence* = 0)
+{
+    for_each<Sequence, identity<> >(f);
+}
+
+}}
+
+#endif // BOOST_MPL_FOR_EACH_HPP_INCLUDED
diff --git a/ext/boost/mpl/front.hpp b/ext/boost/mpl/front.hpp
new file mode 100644
index 0000000..b2c5678
--- /dev/null
+++ b/ext/boost/mpl/front.hpp
@@ -0,0 +1,39 @@
+
+#ifndef BOOST_MPL_FRONT_HPP_INCLUDED
+#define BOOST_MPL_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/front_fwd.hpp>
+#include <boost/mpl/aux_/front_impl.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    >
+struct front
+    : front_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,front,(Sequence))
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, front)
+
+}}
+
+#endif // BOOST_MPL_FRONT_HPP_INCLUDED
diff --git a/ext/boost/mpl/front_fwd.hpp b/ext/boost/mpl/front_fwd.hpp
new file mode 100644
index 0000000..6275001
--- /dev/null
+++ b/ext/boost/mpl/front_fwd.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_FRONT_FWD_HPP_INCLUDED
+#define BOOST_MPL_FRONT_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: front_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct front_impl;
+template< typename Sequence > struct front;
+
+}}
+
+#endif // BOOST_MPL_FRONT_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/front_inserter.hpp b/ext/boost/mpl/front_inserter.hpp
new file mode 100644
index 0000000..7220f76
--- /dev/null
+++ b/ext/boost/mpl/front_inserter.hpp
@@ -0,0 +1,33 @@
+
+#ifndef BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED
+#define BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: front_inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/push_front.hpp>
+#include <boost/mpl/inserter.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename Sequence
+    >
+struct front_inserter
+    : inserter< Sequence,push_front<> >
+{
+};
+
+}}
+
+#endif // BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED
diff --git a/ext/boost/mpl/greater.hpp b/ext/boost/mpl/greater.hpp
new file mode 100644
index 0000000..c73276b
--- /dev/null
+++ b/ext/boost/mpl/greater.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_GREATER_HPP_INCLUDED
+#define BOOST_MPL_GREATER_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: greater.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME greater
+#define AUX778076_OP_TOKEN >
+#include <boost/mpl/aux_/comparison_op.hpp>
+
+#endif // BOOST_MPL_GREATER_HPP_INCLUDED
diff --git a/ext/boost/mpl/greater_equal.hpp b/ext/boost/mpl/greater_equal.hpp
new file mode 100644
index 0000000..119710f
--- /dev/null
+++ b/ext/boost/mpl/greater_equal.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED
+#define BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: greater_equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME greater_equal
+#define AUX778076_OP_TOKEN >=
+#include <boost/mpl/aux_/comparison_op.hpp>
+
+#endif // BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED
diff --git a/ext/boost/mpl/has_key.hpp b/ext/boost/mpl/has_key.hpp
new file mode 100644
index 0000000..bdb96b4
--- /dev/null
+++ b/ext/boost/mpl/has_key.hpp
@@ -0,0 +1,41 @@
+
+#ifndef BOOST_MPL_HAS_KEY_HPP_INCLUDED
+#define BOOST_MPL_HAS_KEY_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: has_key.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/has_key_fwd.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/has_key_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(AssociativeSequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(Key)
+    >
+struct has_key
+    : has_key_impl< typename sequence_tag<AssociativeSequence>::type >
+        ::template apply<AssociativeSequence,Key>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,has_key,(AssociativeSequence,Key))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, has_key)
+
+}}
+
+#endif // BOOST_MPL_HAS_KEY_HPP_INCLUDED
diff --git a/ext/boost/mpl/has_key_fwd.hpp b/ext/boost/mpl/has_key_fwd.hpp
new file mode 100644
index 0000000..9c784a1
--- /dev/null
+++ b/ext/boost/mpl/has_key_fwd.hpp
@@ -0,0 +1,25 @@
+
+#ifndef BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED
+#define BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: has_key_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct has_key_impl;
+template< typename AssociativeSequence, typename Key > struct has_key;
+
+}}
+
+#endif // BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/has_xxx.hpp b/ext/boost/mpl/has_xxx.hpp
index 9258759..121bc48 100644
--- a/ext/boost/mpl/has_xxx.hpp
+++ b/ext/boost/mpl/has_xxx.hpp
@@ -13,7 +13,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: has_xxx.hpp 64146 2010-07-19 00:46:31Z djwalker $
-// $Date: 2010-07-18 20:46:31 -0400 (Sun, 18 Jul 2010) $
+// $Date: 2010-07-18 17:46:31 -0700 (Sun, 18 Jul 2010) $
 // $Revision: 64146 $
 
 #include <boost/mpl/bool.hpp>
diff --git a/ext/boost/mpl/identity.hpp b/ext/boost/mpl/identity.hpp
index d72540b..5424f71 100644
--- a/ext/boost/mpl/identity.hpp
+++ b/ext/boost/mpl/identity.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: identity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/na_spec.hpp>
diff --git a/ext/boost/mpl/if.hpp b/ext/boost/mpl/if.hpp
index aa14d88..245c993 100644
--- a/ext/boost/mpl/if.hpp
+++ b/ext/boost/mpl/if.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/value_wknd.hpp>
diff --git a/ext/boost/mpl/index_if.hpp b/ext/boost/mpl/index_if.hpp
new file mode 100644
index 0000000..3df5763
--- /dev/null
+++ b/ext/boost/mpl/index_if.hpp
@@ -0,0 +1,60 @@
+
+#ifndef BOOST_MPL_INDEX_IF_HPP_INCLUDED
+#define BOOST_MPL_INDEX_IF_HPP_INCLUDED
+
+// Copyright Eric Friedman 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: index_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/find_if_pred.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/iter_fold_if.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(Predicate)
+    >
+struct index_if
+{
+    typedef typename iter_fold_if<
+          Sequence
+        , int_<0>
+        , next<>
+        , aux::find_if_pred<Predicate>
+        >::type result_;
+
+    typedef typename end<Sequence>::type not_found_;
+    typedef typename first<result_>::type result_index_;
+    typedef typename second<result_>::type result_iterator_;
+
+    typedef typename if_<
+          is_same< result_iterator_,not_found_ >
+        , void_
+        , result_index_
+        >::type type;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,index_if,(Sequence,Predicate))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, index_if)
+
+}}
+
+#endif // BOOST_MPL_INDEX_IF_HPP_INCLUDED
diff --git a/ext/boost/mpl/index_of.hpp b/ext/boost/mpl/index_of.hpp
new file mode 100644
index 0000000..0f49f04
--- /dev/null
+++ b/ext/boost/mpl/index_of.hpp
@@ -0,0 +1,39 @@
+
+#ifndef BOOST_MPL_INDEX_OF_HPP_INCLUDED
+#define BOOST_MPL_INDEX_OF_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright Eric Friedman 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: index_of.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/index_if.hpp>
+#include <boost/mpl/same_as.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct index_of
+    : index_if< Sequence,same_as<T> >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,index_of,(Sequence,T))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, index_of)
+
+}}
+
+#endif // BOOST_MPL_INDEX_OF_HPP_INCLUDED
diff --git a/ext/boost/mpl/inherit.hpp b/ext/boost/mpl/inherit.hpp
new file mode 100644
index 0000000..59715ed
--- /dev/null
+++ b/ext/boost/mpl/inherit.hpp
@@ -0,0 +1,229 @@
+
+#if !defined(BOOST_PP_IS_ITERATING)
+
+///// header body
+
+#ifndef BOOST_MPL_INHERIT_HPP_INCLUDED
+#define BOOST_MPL_INHERIT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: inherit.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/empty_base.hpp>
+#   include <boost/mpl/aux_/na_spec.hpp>
+#   include <boost/mpl/aux_/lambda_support.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER inherit.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/limits/arity.hpp>
+#   include <boost/mpl/aux_/preprocessor/params.hpp>
+#   include <boost/mpl/aux_/preprocessor/default_params.hpp>
+#   include <boost/mpl/aux_/preprocessor/enum.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   include <boost/mpl/aux_/config/dtp.hpp>
+
+#   include <boost/preprocessor/iterate.hpp>
+#   include <boost/preprocessor/dec.hpp>
+#   include <boost/preprocessor/cat.hpp>
+
+namespace boost { namespace mpl {
+
+// 'inherit<T1,T2,..,Tn>' metafunction; returns an unspecified class type
+// produced by public derivation from all metafunction's parameters 
+// (T1,T2,..,Tn), except the parameters of 'empty_base' class type; 
+// regardless the position and number of 'empty_base' parameters in the 
+// metafunction's argument list, derivation from them is always a no-op;
+// for instance:
+//      inherit<her>::type == her
+//      inherit<her,my>::type == struct unspecified : her, my {};
+//      inherit<empty_base,her>::type == her
+//      inherit<empty_base,her,empty_base,empty_base>::type == her
+//      inherit<her,empty_base,my>::type == struct unspecified : her, my {};
+//      inherit<empty_base,empty_base>::type == empty_base
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< 
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    > 
+struct inherit2
+    : T1, T2
+{
+    typedef inherit2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1,T2))
+};
+
+template< typename T1 > 
+struct inherit2<T1,empty_base>
+{
+    typedef T1 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1,empty_base))
+};
+
+template< typename T2 > 
+struct inherit2<empty_base,T2>
+{
+    typedef T2 type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base,T2))
+};
+
+// needed to disambiguate the previous two in case when both 
+// T1 and T2 == empty_base
+template<> 
+struct inherit2<empty_base,empty_base>
+{
+    typedef empty_base type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base,empty_base))
+};
+
+#else
+
+namespace aux {
+
+template< bool C1, bool C2 >
+struct inherit2_impl
+{
+    template< typename Derived, typename T1, typename T2 > struct result_ 
+        : T1, T2
+    {
+        typedef Derived type_;
+    };
+};
+
+template<>
+struct inherit2_impl<false,true>
+{
+    template< typename Derived, typename T1, typename T2 > struct result_
+        : T1
+    {
+        typedef T1 type_;
+    };
+};
+
+template<>
+struct inherit2_impl<true,false>
+{
+    template< typename Derived, typename T1, typename T2 > struct result_
+        : T2 
+    {
+        typedef T2 type_;
+    };
+};
+
+template<>
+struct inherit2_impl<true,true>
+{
+    template< typename Derived, typename T1, typename T2 > struct result_
+    {
+        typedef T1 type_;
+    };
+};
+
+} // namespace aux
+
+template< 
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    > 
+struct inherit2
+    : aux::inherit2_impl<
+          is_empty_base<T1>::value
+        , is_empty_base<T2>::value
+        >::template result_< inherit2<T1,T2>,T1,T2 >
+{
+    typedef typename inherit2::type_ type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1,T2))
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+BOOST_MPL_AUX_NA_SPEC(2, inherit2)
+
+#define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(3, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/inherit.hpp>))
+#include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_INHERIT_HPP_INCLUDED
+
+///// iteration
+
+#else
+#define n_ BOOST_PP_FRAME_ITERATION(1)
+
+template<
+      BOOST_MPL_PP_DEFAULT_PARAMS(n_, typename T, na)
+    >
+struct BOOST_PP_CAT(inherit,n_)
+    : inherit2<
+          typename BOOST_PP_CAT(inherit,BOOST_PP_DEC(n_))<
+              BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(n_), T)
+            >::type
+        , BOOST_PP_CAT(T,n_)
+        >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          n_
+        , BOOST_PP_CAT(inherit,n_)
+        , (BOOST_MPL_PP_PARAMS(n_, T))
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(n_, BOOST_PP_CAT(inherit,n_))
+
+#if n_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY
+/// primary template
+template<
+      BOOST_MPL_PP_DEFAULT_PARAMS(n_, typename T, empty_base)
+    >
+struct inherit
+    : BOOST_PP_CAT(inherit,n_)<BOOST_MPL_PP_PARAMS(n_, T)>
+{
+};
+
+// 'na' specialization
+template<>
+struct inherit< BOOST_MPL_PP_ENUM(5, na) >
+{
+    template<
+#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
+          BOOST_MPL_PP_DEFAULT_PARAMS(n_, typename T, empty_base)
+#else
+          BOOST_MPL_PP_PARAMS(n_, typename T)
+#endif
+        >
+    struct apply
+        : inherit< BOOST_MPL_PP_PARAMS(n_, T) >
+    {
+    };
+};
+
+BOOST_MPL_AUX_NA_SPEC_LAMBDA(n_, inherit)
+BOOST_MPL_AUX_NA_SPEC_ARITY(n_, inherit)
+BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(n_, n_, inherit)
+#endif
+
+#undef n_
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ext/boost/mpl/inherit_linearly.hpp b/ext/boost/mpl/inherit_linearly.hpp
new file mode 100644
index 0000000..5bc2d7f
--- /dev/null
+++ b/ext/boost/mpl/inherit_linearly.hpp
@@ -0,0 +1,39 @@
+
+#ifndef BOOST_MPL_INHERIT_FRONT_TO_BACK_HPP_INCLUDED
+#define BOOST_MPL_INHERIT_FRONT_TO_BACK_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: inherit_linearly.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/empty_base.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Types_)
+    , typename BOOST_MPL_AUX_NA_PARAM(Node_)
+    , typename Root_ = empty_base
+    >
+struct inherit_linearly
+    : fold<Types_,Root_,Node_>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3,inherit_linearly,(Types_,Node_,Root_))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, inherit_linearly)
+
+}}
+
+#endif // BOOST_MPL_INHERIT_FRONT_TO_BACK_HPP_INCLUDED
diff --git a/ext/boost/mpl/insert.hpp b/ext/boost/mpl/insert.hpp
new file mode 100644
index 0000000..ff03de6
--- /dev/null
+++ b/ext/boost/mpl/insert.hpp
@@ -0,0 +1,41 @@
+
+#ifndef BOOST_MPL_INSERT_HPP_INCLUDED
+#define BOOST_MPL_INSERT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: insert.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/insert_fwd.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/insert_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(Pos_or_T)
+    , typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct insert
+    : insert_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence,Pos_or_T,T >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3,insert,(Sequence,Pos_or_T,T))
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, insert)
+
+}}
+
+#endif // BOOST_MPL_INSERT_HPP_INCLUDED
diff --git a/ext/boost/mpl/insert_fwd.hpp b/ext/boost/mpl/insert_fwd.hpp
new file mode 100644
index 0000000..8e3208e
--- /dev/null
+++ b/ext/boost/mpl/insert_fwd.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_INSERT_FWD_HPP_INCLUDED
+#define BOOST_MPL_INSERT_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: insert_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct insert_impl;
+template< typename Sequence, typename Pos_or_T, typename T > struct insert;
+
+}}
+
+#endif // BOOST_MPL_INSERT_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/insert_range.hpp b/ext/boost/mpl/insert_range.hpp
new file mode 100644
index 0000000..30baf1d
--- /dev/null
+++ b/ext/boost/mpl/insert_range.hpp
@@ -0,0 +1,41 @@
+
+#ifndef BOOST_MPL_INSERT_RANGE_HPP_INCLUDED
+#define BOOST_MPL_INSERT_RANGE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: insert_range.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/insert_range_fwd.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/insert_range_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(Pos)
+    , typename BOOST_MPL_AUX_NA_PARAM(Range)
+    >
+struct insert_range
+    : insert_range_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence,Pos,Range >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3,insert_range,(Sequence,Pos,Range))
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, insert_range)
+
+}}
+
+#endif // BOOST_MPL_INSERT_RANGE_HPP_INCLUDED
diff --git a/ext/boost/mpl/insert_range_fwd.hpp b/ext/boost/mpl/insert_range_fwd.hpp
new file mode 100644
index 0000000..de85c0e
--- /dev/null
+++ b/ext/boost/mpl/insert_range_fwd.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED
+#define BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: insert_range_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct insert_range_impl;
+template< typename Sequence, typename Pos, typename Range > struct insert_range;
+
+}}
+
+#endif // BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/inserter.hpp b/ext/boost/mpl/inserter.hpp
new file mode 100644
index 0000000..0c014d1
--- /dev/null
+++ b/ext/boost/mpl/inserter.hpp
@@ -0,0 +1,32 @@
+
+#ifndef BOOST_MPL_INSERTER_HPP_INCLUDED
+#define BOOST_MPL_INSERTER_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template<
+      typename Sequence
+    , typename Operation
+    >
+struct inserter
+{
+    typedef Sequence    state;
+    typedef Operation   operation;
+};
+
+}}
+
+#endif // BOOST_MPL_INSERTER_HPP_INCLUDED
diff --git a/ext/boost/mpl/int.hpp b/ext/boost/mpl/int.hpp
index 971ca90..14db548 100644
--- a/ext/boost/mpl/int.hpp
+++ b/ext/boost/mpl/int.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: int.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/int_fwd.hpp>
diff --git a/ext/boost/mpl/int_fwd.hpp b/ext/boost/mpl/int_fwd.hpp
index 0a0140f..87b043c 100644
--- a/ext/boost/mpl/int_fwd.hpp
+++ b/ext/boost/mpl/int_fwd.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: int_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/adl_barrier.hpp>
diff --git a/ext/boost/mpl/integral_c.hpp b/ext/boost/mpl/integral_c.hpp
index 6c4d2bc..e270dc5 100644
--- a/ext/boost/mpl/integral_c.hpp
+++ b/ext/boost/mpl/integral_c.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: integral_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/integral_c_fwd.hpp>
diff --git a/ext/boost/mpl/integral_c_fwd.hpp b/ext/boost/mpl/integral_c_fwd.hpp
index 46da935..7fcbfd5 100644
--- a/ext/boost/mpl/integral_c_fwd.hpp
+++ b/ext/boost/mpl/integral_c_fwd.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: integral_c_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/workaround.hpp>
diff --git a/ext/boost/mpl/integral_c_tag.hpp b/ext/boost/mpl/integral_c_tag.hpp
index 2b43e79..27da563 100644
--- a/ext/boost/mpl/integral_c_tag.hpp
+++ b/ext/boost/mpl/integral_c_tag.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: integral_c_tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 
diff --git a/ext/boost/mpl/is_placeholder.hpp b/ext/boost/mpl/is_placeholder.hpp
new file mode 100644
index 0000000..565df89
--- /dev/null
+++ b/ext/boost/mpl/is_placeholder.hpp
@@ -0,0 +1,67 @@
+
+#ifndef BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED
+#define BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: is_placeholder.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/arg_fwd.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/aux_/yes_no.hpp>
+#include <boost/mpl/aux_/type_wrapper.hpp>
+#include <boost/mpl/aux_/nttp_decl.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+
+namespace boost { namespace mpl {
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< typename T >
+struct is_placeholder
+    : bool_<false>
+{
+};
+
+template< BOOST_MPL_AUX_NTTP_DECL(int, N) >
+struct is_placeholder< arg<N> >
+    : bool_<true>
+{
+};
+
+#else
+
+namespace aux {
+
+aux::no_tag is_placeholder_helper(...);
+
+template< BOOST_MPL_AUX_NTTP_DECL(int, N) >
+aux::yes_tag is_placeholder_helper(aux::type_wrapper< arg<N> >*);
+
+} // namespace aux
+
+template< typename T >
+struct is_placeholder
+{
+    static aux::type_wrapper<T>* get();
+    BOOST_STATIC_CONSTANT(bool, value = 
+          sizeof(aux::is_placeholder_helper(get())) == sizeof(aux::yes_tag)
+        );
+    
+    typedef bool_<value> type;
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+}}
+
+#endif // BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED
diff --git a/ext/boost/mpl/is_sequence.hpp b/ext/boost/mpl/is_sequence.hpp
new file mode 100644
index 0000000..4e61fcf
--- /dev/null
+++ b/ext/boost/mpl/is_sequence.hpp
@@ -0,0 +1,112 @@
+
+#ifndef BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED
+#define BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: is_sequence.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/sequence_tag_fwd.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/aux_/has_tag.hpp>
+#include <boost/mpl/aux_/has_begin.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/config/eti.hpp>
+#include <boost/mpl/aux_/config/msvc.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+#   include <boost/mpl/aux_/msvc_is_class.hpp>
+#elif BOOST_WORKAROUND(BOOST_MSVC, == 1300)
+#   include <boost/type_traits/is_class.hpp>
+#endif
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl {
+
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+
+namespace aux {
+
+// agurt, 11/jun/03: 
+// MSVC 6.5/7.0 fails if 'has_begin' is instantiated on a class type that has a
+// 'begin' member that doesn't name a type; e.g. 'has_begin< std::vector<int> >'
+// would fail; requiring 'T' to have _both_ 'tag' and 'begin' members workarounds
+// the issue for most real-world cases
+template< typename T > struct is_sequence_impl
+    : and_<
+          identity< aux::has_tag<T> >
+        , identity< aux::has_begin<T> >
+        >
+{
+};
+
+} // namespace aux
+        
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct is_sequence
+    : if_<
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+          aux::msvc_is_class<T> 
+#else
+          boost::is_class<T> 
+#endif
+        , aux::is_sequence_impl<T>
+        , bool_<false>
+        >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T))
+};
+
+#elif defined(BOOST_MPL_CFG_NO_HAS_XXX)
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct is_sequence
+    : bool_<false>
+{
+};
+
+#else
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct is_sequence
+    : not_< is_same< typename begin<T>::type, void_ > >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T))
+};
+
+#endif // BOOST_MSVC
+
+#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
+template<> struct is_sequence<int>
+    : bool_<false>
+{
+};
+#endif
+
+BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, is_sequence)
+
+}}
+
+#endif // BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED
diff --git a/ext/boost/mpl/iter_fold.hpp b/ext/boost/mpl/iter_fold.hpp
new file mode 100644
index 0000000..1b52dd4
--- /dev/null
+++ b/ext/boost/mpl/iter_fold.hpp
@@ -0,0 +1,49 @@
+
+#ifndef BOOST_MPL_ITER_FOLD_HPP_INCLUDED
+#define BOOST_MPL_ITER_FOLD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright David Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: iter_fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/O1_size.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/aux_/iter_fold_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(State)
+    , typename BOOST_MPL_AUX_NA_PARAM(ForwardOp)
+    >
+struct iter_fold
+{
+    typedef typename aux::iter_fold_impl<
+          ::boost::mpl::O1_size<Sequence>::value
+        , typename begin<Sequence>::type
+        , typename end<Sequence>::type
+        , State
+        , typename lambda<ForwardOp>::type
+        >::state type;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3,iter_fold,(Sequence,State,ForwardOp))
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, iter_fold)
+
+}}
+
+#endif // BOOST_MPL_ITER_FOLD_HPP_INCLUDED
diff --git a/ext/boost/mpl/iter_fold_if.hpp b/ext/boost/mpl/iter_fold_if.hpp
new file mode 100644
index 0000000..01847ef
--- /dev/null
+++ b/ext/boost/mpl/iter_fold_if.hpp
@@ -0,0 +1,117 @@
+
+#ifndef BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED
+#define BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright Eric Friedman 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: iter_fold_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/logical.hpp>
+#include <boost/mpl/always.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/pair.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/aux_/iter_fold_if_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/config/forwarding.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< typename Predicate, typename LastIterator >
+struct iter_fold_if_pred
+{
+    template< typename State, typename Iterator > struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
+        : and_<
+              not_< is_same<Iterator,LastIterator> >
+            , apply1<Predicate,Iterator>
+            >
+    {
+#else
+    {
+        typedef and_<
+              not_< is_same<Iterator,LastIterator> >
+            , apply1<Predicate,Iterator>
+            > type;
+#endif
+    };
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(State)
+    , typename BOOST_MPL_AUX_NA_PARAM(ForwardOp)
+    , typename BOOST_MPL_AUX_NA_PARAM(ForwardPredicate)
+    , typename BOOST_MPL_AUX_NA_PARAM(BackwardOp)
+    , typename BOOST_MPL_AUX_NA_PARAM(BackwardPredicate)
+    >
+struct iter_fold_if
+{
+
+    typedef typename begin<Sequence>::type first_;
+    typedef typename end<Sequence>::type last_;
+
+    typedef typename eval_if<
+          is_na<BackwardPredicate>
+        , if_< is_na<BackwardOp>, always<false_>, always<true_> >
+        , identity<BackwardPredicate>
+        >::type backward_pred_;
+
+// cwpro8 doesn't like 'cut-off' type here (use typedef instead)
+#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) && !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
+    struct result_ :
+#else
+    typedef
+#endif
+        aux::iter_fold_if_impl<
+          first_
+        , State
+        , ForwardOp
+        , protect< aux::iter_fold_if_pred< ForwardPredicate,last_ > >
+        , BackwardOp
+        , backward_pred_
+        >
+#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) && !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
+    { };
+#else
+    result_;
+#endif
+
+public:
+
+    typedef pair<
+          typename result_::state
+        , typename result_::iterator
+        > type;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          6
+        , iter_fold_if
+        , (Sequence,State,ForwardOp,ForwardPredicate,BackwardOp,BackwardPredicate)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(6, iter_fold_if)
+
+}}
+
+#endif // BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED
diff --git a/ext/boost/mpl/iterator_category.hpp b/ext/boost/mpl/iterator_category.hpp
new file mode 100644
index 0000000..6ccc1b1
--- /dev/null
+++ b/ext/boost/mpl/iterator_category.hpp
@@ -0,0 +1,35 @@
+
+#ifndef BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED
+#define BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: iterator_category.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost {  namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Iterator)
+    >
+struct iterator_category
+{
+    typedef typename Iterator::category type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,iterator_category,(Iterator))
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, iterator_category)
+
+}}
+
+#endif // BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED
diff --git a/ext/boost/mpl/iterator_range.hpp b/ext/boost/mpl/iterator_range.hpp
new file mode 100644
index 0000000..995ddc0
--- /dev/null
+++ b/ext/boost/mpl/iterator_range.hpp
@@ -0,0 +1,42 @@
+
+#ifndef BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED
+#define BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: iterator_range.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+struct iterator_range_tag;
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(First)
+    , typename BOOST_MPL_AUX_NA_PARAM(Last)
+    >
+struct iterator_range
+{
+    typedef iterator_range_tag tag;
+    typedef iterator_range type;
+    typedef First begin;
+    typedef Last end;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,iterator_range,(First,Last))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, iterator_range)
+
+}}
+
+#endif // BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED
diff --git a/ext/boost/mpl/iterator_tags.hpp b/ext/boost/mpl/iterator_tags.hpp
new file mode 100644
index 0000000..fce2734
--- /dev/null
+++ b/ext/boost/mpl/iterator_tags.hpp
@@ -0,0 +1,27 @@
+
+#ifndef BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED
+#define BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: iterator_tags.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace mpl {
+
+struct forward_iterator_tag       : int_<0> { typedef forward_iterator_tag type; };
+struct bidirectional_iterator_tag : int_<1> { typedef bidirectional_iterator_tag type; };
+struct random_access_iterator_tag : int_<2> { typedef random_access_iterator_tag type; };
+
+}}
+
+#endif // BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED
diff --git a/ext/boost/mpl/joint_view.hpp b/ext/boost/mpl/joint_view.hpp
new file mode 100644
index 0000000..2672fad
--- /dev/null
+++ b/ext/boost/mpl/joint_view.hpp
@@ -0,0 +1,65 @@
+
+#ifndef BOOST_MPL_JOINT_VIEW_HPP_INCLUDED
+#define BOOST_MPL_JOINT_VIEW_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: joint_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/joint_iter.hpp>
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/size_fwd.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+struct joint_view_tag;
+}
+
+template<>
+struct size_impl< aux::joint_view_tag >
+{
+    template < typename JointView > struct apply
+      : plus<
+            size<typename JointView::sequence1_>
+          , size<typename JointView::sequence2_>
+          >
+    {};
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence1_)
+    , typename BOOST_MPL_AUX_NA_PARAM(Sequence2_)
+    >
+struct joint_view
+{
+    typedef typename mpl::begin<Sequence1_>::type   first1_;
+    typedef typename mpl::end<Sequence1_>::type     last1_;
+    typedef typename mpl::begin<Sequence2_>::type   first2_;
+    typedef typename mpl::end<Sequence2_>::type     last2_;
+
+    // agurt, 25/may/03: for the 'size_traits' implementation above
+    typedef Sequence1_ sequence1_;
+    typedef Sequence2_ sequence2_;
+
+    typedef joint_view type;
+    typedef aux::joint_view_tag tag;
+    typedef joint_iter<first1_,last1_,first2_>  begin;
+    typedef joint_iter<last1_,last1_,last2_>    end;
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, joint_view)
+
+}}
+
+#endif // BOOST_MPL_JOINT_VIEW_HPP_INCLUDED
diff --git a/ext/boost/mpl/key_type.hpp b/ext/boost/mpl/key_type.hpp
new file mode 100644
index 0000000..e1e0cd9
--- /dev/null
+++ b/ext/boost/mpl/key_type.hpp
@@ -0,0 +1,42 @@
+
+#ifndef BOOST_MPL_KEY_TYPE_HPP_INCLUDED
+#define BOOST_MPL_KEY_TYPE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: key_type.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/key_type_fwd.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/apply_wrap.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(AssociativeSequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct key_type
+    : apply_wrap2< 
+          key_type_impl< typename sequence_tag<AssociativeSequence>::type >
+        , AssociativeSequence, T>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,key_type,(AssociativeSequence,T))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, key_type)
+
+}}
+
+#endif // BOOST_MPL_KEY_TYPE_HPP_INCLUDED
diff --git a/ext/boost/mpl/key_type_fwd.hpp b/ext/boost/mpl/key_type_fwd.hpp
new file mode 100644
index 0000000..e59b395
--- /dev/null
+++ b/ext/boost/mpl/key_type_fwd.hpp
@@ -0,0 +1,25 @@
+
+#ifndef BOOST_MPL_KEY_TYPE_FWD_HPP_INCLUDED
+#define BOOST_MPL_KEY_TYPE_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: key_type_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct key_type_impl;
+template< typename AssociativeSequence, typename T > struct key_type;
+
+}}
+
+#endif // BOOST_MPL_KEY_TYPE_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/lambda.hpp b/ext/boost/mpl/lambda.hpp
index 165135f..05c2716 100644
--- a/ext/boost/mpl/lambda.hpp
+++ b/ext/boost/mpl/lambda.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: lambda.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/lambda_fwd.hpp>
diff --git a/ext/boost/mpl/lambda_fwd.hpp b/ext/boost/mpl/lambda_fwd.hpp
index f02837b..16c73e4 100644
--- a/ext/boost/mpl/lambda_fwd.hpp
+++ b/ext/boost/mpl/lambda_fwd.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: lambda_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/void_fwd.hpp>
diff --git a/ext/boost/mpl/less.hpp b/ext/boost/mpl/less.hpp
new file mode 100644
index 0000000..33a570c
--- /dev/null
+++ b/ext/boost/mpl/less.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_LESS_HPP_INCLUDED
+#define BOOST_MPL_LESS_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: less.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME less
+#define AUX778076_OP_TOKEN <
+#include <boost/mpl/aux_/comparison_op.hpp>
+
+#endif // BOOST_MPL_LESS_HPP_INCLUDED
diff --git a/ext/boost/mpl/less_equal.hpp b/ext/boost/mpl/less_equal.hpp
new file mode 100644
index 0000000..8b9a4ff
--- /dev/null
+++ b/ext/boost/mpl/less_equal.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_LESS_EQUAL_HPP_INCLUDED
+#define BOOST_MPL_LESS_EQUAL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: less_equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME less_equal
+#define AUX778076_OP_TOKEN <=
+#include <boost/mpl/aux_/comparison_op.hpp>
+
+#endif // BOOST_MPL_LESS_EQUAL_HPP_INCLUDED
diff --git a/ext/boost/mpl/limits/._arity.hpp b/ext/boost/mpl/limits/._arity.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/mpl/limits/._arity.hpp and /dev/null differ
diff --git a/ext/boost/mpl/limits/arity.hpp b/ext/boost/mpl/limits/arity.hpp
index 91e4606..9da70ab 100644
--- a/ext/boost/mpl/limits/arity.hpp
+++ b/ext/boost/mpl/limits/arity.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: arity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #if !defined(BOOST_MPL_LIMIT_METAFUNCTION_ARITY)
diff --git a/ext/boost/mpl/limits/list.hpp b/ext/boost/mpl/limits/list.hpp
new file mode 100644
index 0000000..6ae7387
--- /dev/null
+++ b/ext/boost/mpl/limits/list.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_LIMITS_LIST_HPP_INCLUDED
+#define BOOST_MPL_LIMITS_LIST_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_LIMIT_LIST_SIZE)
+#   define BOOST_MPL_LIMIT_LIST_SIZE 20
+#endif
+
+#endif // BOOST_MPL_LIMITS_LIST_HPP_INCLUDED
diff --git a/ext/boost/mpl/limits/map.hpp b/ext/boost/mpl/limits/map.hpp
new file mode 100644
index 0000000..92c4a24
--- /dev/null
+++ b/ext/boost/mpl/limits/map.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_LIMITS_MAP_HPP_INCLUDED
+#define BOOST_MPL_LIMITS_MAP_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: map.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_LIMIT_MAP_SIZE)
+#   define BOOST_MPL_LIMIT_MAP_SIZE 20
+#endif
+
+#endif // BOOST_MPL_LIMITS_MAP_HPP_INCLUDED
diff --git a/ext/boost/mpl/limits/set.hpp b/ext/boost/mpl/limits/set.hpp
new file mode 100644
index 0000000..a4473b0
--- /dev/null
+++ b/ext/boost/mpl/limits/set.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_LIMITS_SET_HPP_INCLUDED
+#define BOOST_MPL_LIMITS_SET_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: set.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_LIMIT_SET_SIZE)
+#   define BOOST_MPL_LIMIT_SET_SIZE 20
+#endif
+
+#endif // BOOST_MPL_LIMITS_SET_HPP_INCLUDED
diff --git a/ext/boost/mpl/limits/string.hpp b/ext/boost/mpl/limits/string.hpp
new file mode 100644
index 0000000..eb85aa3
--- /dev/null
+++ b/ext/boost/mpl/limits/string.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_LIMITS_STRING_HPP_INCLUDED
+#define BOOST_MPL_LIMITS_STRING_HPP_INCLUDED
+
+// Copyright Eric Niebler 2009
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: string.hpp 49239 2009-04-01 09:10:26Z eric_niebler $
+// $Date: 2009-04-01 02:10:26 -0700 (Wed, 1 Apr 2009) $
+// $Revision: 49239 $
+
+#if !defined(BOOST_MPL_LIMIT_STRING_SIZE)
+#   define BOOST_MPL_LIMIT_STRING_SIZE 32
+#endif
+
+#endif // BOOST_MPL_LIMITS_STRING_HPP_INCLUDED
diff --git a/ext/boost/mpl/limits/unrolling.hpp b/ext/boost/mpl/limits/unrolling.hpp
new file mode 100644
index 0000000..3914f0a
--- /dev/null
+++ b/ext/boost/mpl/limits/unrolling.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_LIMITS_UNROLLING_HPP_INCLUDED
+#define BOOST_MPL_LIMITS_UNROLLING_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: unrolling.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_LIMIT_UNROLLING)
+#   define BOOST_MPL_LIMIT_UNROLLING 4
+#endif
+
+#endif // BOOST_MPL_LIMITS_UNROLLING_HPP_INCLUDED
diff --git a/ext/boost/mpl/limits/vector.hpp b/ext/boost/mpl/limits/vector.hpp
new file mode 100644
index 0000000..5de3811
--- /dev/null
+++ b/ext/boost/mpl/limits/vector.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_LIMITS_VECTOR_HPP_INCLUDED
+#define BOOST_MPL_LIMITS_VECTOR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: vector.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_LIMIT_VECTOR_SIZE)
+#   define BOOST_MPL_LIMIT_VECTOR_SIZE 20
+#endif
+
+#endif // BOOST_MPL_LIMITS_VECTOR_HPP_INCLUDED
diff --git a/ext/boost/mpl/list.hpp b/ext/boost/mpl/list.hpp
new file mode 100644
index 0000000..6d96831
--- /dev/null
+++ b/ext/boost/mpl/list.hpp
@@ -0,0 +1,57 @@
+
+#ifndef BOOST_MPL_LIST_HPP_INCLUDED
+#define BOOST_MPL_LIST_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/limits/list.hpp>
+#   include <boost/mpl/aux_/na.hpp>
+#   include <boost/mpl/aux_/config/preprocessor.hpp>
+
+#   include <boost/preprocessor/inc.hpp>
+#   include <boost/preprocessor/cat.hpp>
+#   include <boost/preprocessor/stringize.hpp>
+
+#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
+#   define AUX778076_LIST_HEADER \
+    BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE).hpp \
+    /**/
+#else
+#   define AUX778076_LIST_HEADER \
+    BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE)##.hpp \
+    /**/
+#endif
+
+#   include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_LIST_HEADER)
+#   undef AUX778076_LIST_HEADER
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/limits/list.hpp>
+
+#   define AUX778076_SEQUENCE_NAME list
+#   define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_LIST_SIZE
+#   include <boost/mpl/aux_/sequence_wrapper.hpp>
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_LIST_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/aux_/O1_size.hpp b/ext/boost/mpl/list/aux_/O1_size.hpp
new file mode 100644
index 0000000..0d93dab
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/O1_size.hpp
@@ -0,0 +1,33 @@
+
+#ifndef BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/O1_size_fwd.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct O1_size_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+        : List::size
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/aux_/begin_end.hpp b/ext/boost/mpl/list/aux_/begin_end.hpp
new file mode 100644
index 0000000..7fbddad
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/begin_end.hpp
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: begin_end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end_fwd.hpp>
+#include <boost/mpl/list/aux_/iterator.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+#include <boost/mpl/list/aux_/item.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct begin_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+    {
+        typedef l_iter<typename List::type> type;
+    };
+};
+
+template<>
+struct end_impl< aux::list_tag >
+{
+    template< typename > struct apply
+    {
+        typedef l_iter<l_end> type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/aux_/clear.hpp b/ext/boost/mpl/list/aux_/clear.hpp
new file mode 100644
index 0000000..3deafe7
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/clear.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: clear.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/clear_fwd.hpp>
+#include <boost/mpl/list/aux_/item.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct clear_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+    {
+        typedef l_end type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/aux_/empty.hpp b/ext/boost/mpl/list/aux_/empty.hpp
new file mode 100644
index 0000000..c282cfe
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/empty.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/empty_fwd.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct empty_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+        : not_<typename List::size>
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/aux_/front.hpp b/ext/boost/mpl/list/aux_/front.hpp
new file mode 100644
index 0000000..eb0b689
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/front.hpp
@@ -0,0 +1,33 @@
+
+#ifndef BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/front_fwd.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct front_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+    {
+        typedef typename List::item type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/aux_/include_preprocessed.hpp b/ext/boost/mpl/list/aux_/include_preprocessed.hpp
new file mode 100644
index 0000000..4e7f6e4
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/include_preprocessed.hpp
@@ -0,0 +1,35 @@
+
+// Copyright Aleksey Gurtovoy 2001-2006
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
+
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/stringize.hpp>
+
+#   define AUX778076_HEADER \
+    aux_/preprocessed/plain/BOOST_MPL_PREPROCESSED_HEADER \
+/**/
+
+#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700))
+#   define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER)
+#   include AUX778076_INCLUDE_STRING
+#   undef AUX778076_INCLUDE_STRING
+#else
+#   include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER)
+#endif
+
+#   undef AUX778076_HEADER
+
+#undef BOOST_MPL_PREPROCESSED_HEADER
diff --git a/ext/boost/mpl/list/aux_/item.hpp b/ext/boost/mpl/list/aux_/item.hpp
new file mode 100644
index 0000000..24b5e40
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/item.hpp
@@ -0,0 +1,55 @@
+
+#ifndef BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+#include <boost/mpl/aux_/config/msvc.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename Size
+    , typename T
+    , typename Next
+    >
+struct l_item
+{
+// agurt, 17/jul/03: to facilitate the deficient 'is_sequence' implementation 
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+    typedef int begin;
+#endif
+    typedef aux::list_tag tag;
+    typedef l_item type;
+
+    typedef Size size;
+    typedef T item;
+    typedef Next next;
+};
+
+struct l_end
+{
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+    typedef int begin;
+#endif
+    typedef aux::list_tag tag;
+    typedef l_end type;
+    typedef long_<0> size;
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/aux_/iterator.hpp b/ext/boost/mpl/list/aux_/iterator.hpp
new file mode 100644
index 0000000..4d0431f
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/iterator.hpp
@@ -0,0 +1,76 @@
+
+#ifndef BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/iterator_tags.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/list/aux_/item.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/mpl/aux_/lambda_spec.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+namespace boost { namespace mpl {
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< typename Node >
+struct l_iter
+{
+    typedef aux::l_iter_tag tag;
+    typedef forward_iterator_tag category;
+};
+
+template< typename Node >
+struct deref< l_iter<Node> >
+{
+    typedef typename Node::item type;
+};
+
+template< typename Node >
+struct next< l_iter<Node> >
+{
+    typedef l_iter< typename Node::next > type;
+};
+
+#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+template< typename Node >
+struct l_iter
+{
+    typedef aux::l_iter_tag tag;
+    typedef forward_iterator_tag category;
+    typedef typename Node::item type;
+    typedef l_iter< typename mpl::next<Node>::type > next;
+};
+
+#endif
+
+
+template<> struct l_iter<l_end>
+{
+    typedef aux::l_iter_tag tag;
+    typedef forward_iterator_tag category;
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+    typedef na type;
+    typedef l_iter next;
+#endif
+};
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, l_iter)
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/aux_/numbered.hpp b/ext/boost/mpl/list/aux_/numbered.hpp
new file mode 100644
index 0000000..7b661e5
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/numbered.hpp
@@ -0,0 +1,68 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+// Copyright Peter Dimov 2000-2002
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: numbered.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/enum_params.hpp>
+#include <boost/preprocessor/enum_shifted_params.hpp>
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/cat.hpp>
+
+#define i BOOST_PP_FRAME_ITERATION(1)
+
+#if i == 1
+
+template<
+      BOOST_PP_ENUM_PARAMS(i, typename T)
+    >
+struct list1
+    : l_item<
+          long_<1>
+        , T0
+        , l_end
+        >
+{
+    typedef list1 type;
+};
+
+#else
+
+#   define MPL_AUX_LIST_TAIL(list, i, T) \
+    BOOST_PP_CAT(list,BOOST_PP_DEC(i))< \
+      BOOST_PP_ENUM_SHIFTED_PARAMS(i, T) \
+    > \
+    /**/
+    
+template<
+      BOOST_PP_ENUM_PARAMS(i, typename T)
+    >
+struct BOOST_PP_CAT(list,i)
+    : l_item<
+          long_<i>
+        , T0
+        , MPL_AUX_LIST_TAIL(list,i,T)
+        >
+{
+    typedef BOOST_PP_CAT(list,i) type;
+};
+
+#   undef MPL_AUX_LIST_TAIL
+
+#endif // i == 1
+
+#undef i
+
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ext/boost/mpl/list/aux_/numbered_c.hpp b/ext/boost/mpl/list/aux_/numbered_c.hpp
new file mode 100644
index 0000000..0c8e9f6
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/numbered_c.hpp
@@ -0,0 +1,71 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: numbered_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/enum_params.hpp>
+#include <boost/preprocessor/enum_shifted_params.hpp>
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/cat.hpp>
+
+#define i BOOST_PP_FRAME_ITERATION(1)
+
+#if i == 1
+
+template<
+      typename T
+    , BOOST_PP_ENUM_PARAMS(i, T C)
+    >
+struct list1_c
+    : l_item<
+          long_<1>
+        , integral_c<T,C0>
+        , l_end
+        >
+{
+    typedef list1_c type;
+    typedef T value_type;
+};
+
+#else
+
+#   define MPL_AUX_LIST_C_TAIL(list, i, C) \
+    BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_PP_DEC(i)),_c)<T, \
+      BOOST_PP_ENUM_SHIFTED_PARAMS(i, C) \
+    > \
+    /**/
+    
+template<
+      typename T
+    , BOOST_PP_ENUM_PARAMS(i, T C)
+    >
+struct BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c)
+    : l_item<
+          long_<i>
+        , integral_c<T,C0>
+        , MPL_AUX_LIST_C_TAIL(list,i,C)
+        >
+{
+    typedef BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c) type;
+    typedef T value_type;
+};
+
+#   undef MPL_AUX_LIST_C_TAIL
+
+#endif // i == 1
+
+#undef i
+
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ext/boost/mpl/list/aux_/pop_front.hpp b/ext/boost/mpl/list/aux_/pop_front.hpp
new file mode 100644
index 0000000..9c72228
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/pop_front.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: pop_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/pop_front_fwd.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct pop_front_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+    {
+        typedef typename mpl::next<List>::type type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/aux_/preprocessed/plain/list10.hpp b/ext/boost/mpl/list/aux_/preprocessed/plain/list10.hpp
new file mode 100644
index 0000000..99368d2
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/preprocessed/plain/list10.hpp
@@ -0,0 +1,149 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list/list10.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0
+    >
+struct list1
+    : l_item<
+          long_<1>
+        , T0
+        , l_end
+        >
+{
+    typedef list1 type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct list2
+    : l_item<
+          long_<2>
+        , T0
+        , list1<T1>
+        >
+{
+    typedef list2 type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct list3
+    : l_item<
+          long_<3>
+        , T0
+        , list2< T1,T2 >
+        >
+{
+    typedef list3 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct list4
+    : l_item<
+          long_<4>
+        , T0
+        , list3< T1,T2,T3 >
+        >
+{
+    typedef list4 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct list5
+    : l_item<
+          long_<5>
+        , T0
+        , list4< T1,T2,T3,T4 >
+        >
+{
+    typedef list5 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct list6
+    : l_item<
+          long_<6>
+        , T0
+        , list5< T1,T2,T3,T4,T5 >
+        >
+{
+    typedef list6 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct list7
+    : l_item<
+          long_<7>
+        , T0
+        , list6< T1,T2,T3,T4,T5,T6 >
+        >
+{
+    typedef list7 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct list8
+    : l_item<
+          long_<8>
+        , T0
+        , list7< T1,T2,T3,T4,T5,T6,T7 >
+        >
+{
+    typedef list8 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct list9
+    : l_item<
+          long_<9>
+        , T0
+        , list8< T1,T2,T3,T4,T5,T6,T7,T8 >
+        >
+{
+    typedef list9 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct list10
+    : l_item<
+          long_<10>
+        , T0
+        , list9< T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+        >
+{
+    typedef list10 type;
+};
+
+}}
diff --git a/ext/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp b/ext/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp
new file mode 100644
index 0000000..7133d71
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp
@@ -0,0 +1,164 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list/list10_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0
+    >
+struct list1_c
+    : l_item<
+          long_<1>
+        , integral_c< T,C0 >
+        , l_end
+        >
+{
+    typedef list1_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1
+    >
+struct list2_c
+    : l_item<
+          long_<2>
+        , integral_c< T,C0 >
+        , list1_c< T,C1 >
+        >
+{
+    typedef list2_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2
+    >
+struct list3_c
+    : l_item<
+          long_<3>
+        , integral_c< T,C0 >
+        , list2_c< T,C1,C2 >
+        >
+{
+    typedef list3_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3
+    >
+struct list4_c
+    : l_item<
+          long_<4>
+        , integral_c< T,C0 >
+        , list3_c< T,C1,C2,C3 >
+        >
+{
+    typedef list4_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4
+    >
+struct list5_c
+    : l_item<
+          long_<5>
+        , integral_c< T,C0 >
+        , list4_c< T,C1,C2,C3,C4 >
+        >
+{
+    typedef list5_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5
+    >
+struct list6_c
+    : l_item<
+          long_<6>
+        , integral_c< T,C0 >
+        , list5_c< T,C1,C2,C3,C4,C5 >
+        >
+{
+    typedef list6_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6
+    >
+struct list7_c
+    : l_item<
+          long_<7>
+        , integral_c< T,C0 >
+        , list6_c< T,C1,C2,C3,C4,C5,C6 >
+        >
+{
+    typedef list7_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7
+    >
+struct list8_c
+    : l_item<
+          long_<8>
+        , integral_c< T,C0 >
+        , list7_c< T,C1,C2,C3,C4,C5,C6,C7 >
+        >
+{
+    typedef list8_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8
+    >
+struct list9_c
+    : l_item<
+          long_<9>
+        , integral_c< T,C0 >
+        , list8_c< T,C1,C2,C3,C4,C5,C6,C7,C8 >
+        >
+{
+    typedef list9_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9
+    >
+struct list10_c
+    : l_item<
+          long_<10>
+        , integral_c< T,C0 >
+        , list9_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+        >
+{
+    typedef list10_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/list/aux_/preprocessed/plain/list20.hpp b/ext/boost/mpl/list/aux_/preprocessed/plain/list20.hpp
new file mode 100644
index 0000000..750e495
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/preprocessed/plain/list20.hpp
@@ -0,0 +1,169 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list/list20.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct list11
+    : l_item<
+          long_<11>
+        , T0
+        , list10< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+        >
+{
+    typedef list11 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct list12
+    : l_item<
+          long_<12>
+        , T0
+        , list11< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+        >
+{
+    typedef list12 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct list13
+    : l_item<
+          long_<13>
+        , T0
+        , list12< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+        >
+{
+    typedef list13 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct list14
+    : l_item<
+          long_<14>
+        , T0
+        , list13< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+        >
+{
+    typedef list14 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct list15
+    : l_item<
+          long_<15>
+        , T0
+        , list14< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >
+        >
+{
+    typedef list15 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct list16
+    : l_item<
+          long_<16>
+        , T0
+        , list15< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >
+        >
+{
+    typedef list16 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct list17
+    : l_item<
+          long_<17>
+        , T0
+        , list16< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >
+        >
+{
+    typedef list17 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct list18
+    : l_item<
+          long_<18>
+        , T0
+        , list17< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >
+        >
+{
+    typedef list18 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct list19
+    : l_item<
+          long_<19>
+        , T0
+        , list18< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >
+        >
+{
+    typedef list19 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct list20
+    : l_item<
+          long_<20>
+        , T0
+        , list19< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >
+        >
+{
+    typedef list20 type;
+};
+
+}}
diff --git a/ext/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp b/ext/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp
new file mode 100644
index 0000000..7f15acf
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp
@@ -0,0 +1,173 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list/list20_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    >
+struct list11_c
+    : l_item<
+          long_<11>
+        , integral_c< T,C0 >
+        , list10_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+        >
+{
+    typedef list11_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11
+    >
+struct list12_c
+    : l_item<
+          long_<12>
+        , integral_c< T,C0 >
+        , list11_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+        >
+{
+    typedef list12_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12
+    >
+struct list13_c
+    : l_item<
+          long_<13>
+        , integral_c< T,C0 >
+        , list12_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+        >
+{
+    typedef list13_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13
+    >
+struct list14_c
+    : l_item<
+          long_<14>
+        , integral_c< T,C0 >
+        , list13_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >
+        >
+{
+    typedef list14_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14
+    >
+struct list15_c
+    : l_item<
+          long_<15>
+        , integral_c< T,C0 >
+        , list14_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >
+        >
+{
+    typedef list15_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15
+    >
+struct list16_c
+    : l_item<
+          long_<16>
+        , integral_c< T,C0 >
+        , list15_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >
+        >
+{
+    typedef list16_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16
+    >
+struct list17_c
+    : l_item<
+          long_<17>
+        , integral_c< T,C0 >
+        , list16_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >
+        >
+{
+    typedef list17_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17
+    >
+struct list18_c
+    : l_item<
+          long_<18>
+        , integral_c< T,C0 >
+        , list17_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >
+        >
+{
+    typedef list18_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18
+    >
+struct list19_c
+    : l_item<
+          long_<19>
+        , integral_c< T,C0 >
+        , list18_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >
+        >
+{
+    typedef list19_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19
+    >
+struct list20_c
+    : l_item<
+          long_<20>
+        , integral_c< T,C0 >
+        , list19_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >
+        >
+{
+    typedef list20_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/list/aux_/preprocessed/plain/list30.hpp b/ext/boost/mpl/list/aux_/preprocessed/plain/list30.hpp
new file mode 100644
index 0000000..5459101
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/preprocessed/plain/list30.hpp
@@ -0,0 +1,189 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list/list30.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20
+    >
+struct list21
+    : l_item<
+          long_<21>
+        , T0
+        , list20< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20 >
+        >
+{
+    typedef list21 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21
+    >
+struct list22
+    : l_item<
+          long_<22>
+        , T0
+        , list21< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21 >
+        >
+{
+    typedef list22 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22
+    >
+struct list23
+    : l_item<
+          long_<23>
+        , T0
+        , list22< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22 >
+        >
+{
+    typedef list23 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23
+    >
+struct list24
+    : l_item<
+          long_<24>
+        , T0
+        , list23< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23 >
+        >
+{
+    typedef list24 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    >
+struct list25
+    : l_item<
+          long_<25>
+        , T0
+        , list24< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24 >
+        >
+{
+    typedef list25 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25
+    >
+struct list26
+    : l_item<
+          long_<26>
+        , T0
+        , list25< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25 >
+        >
+{
+    typedef list26 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26
+    >
+struct list27
+    : l_item<
+          long_<27>
+        , T0
+        , list26< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26 >
+        >
+{
+    typedef list27 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27
+    >
+struct list28
+    : l_item<
+          long_<28>
+        , T0
+        , list27< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27 >
+        >
+{
+    typedef list28 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28
+    >
+struct list29
+    : l_item<
+          long_<29>
+        , T0
+        , list28< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28 >
+        >
+{
+    typedef list29 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    >
+struct list30
+    : l_item<
+          long_<30>
+        , T0
+        , list29< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29 >
+        >
+{
+    typedef list30 type;
+};
+
+}}
diff --git a/ext/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp b/ext/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp
new file mode 100644
index 0000000..5393d79
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp
@@ -0,0 +1,183 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list/list30_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    >
+struct list21_c
+    : l_item<
+          long_<21>
+        , integral_c< T,C0 >
+        , list20_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20 >
+        >
+{
+    typedef list21_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21
+    >
+struct list22_c
+    : l_item<
+          long_<22>
+        , integral_c< T,C0 >
+        , list21_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21 >
+        >
+{
+    typedef list22_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22
+    >
+struct list23_c
+    : l_item<
+          long_<23>
+        , integral_c< T,C0 >
+        , list22_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22 >
+        >
+{
+    typedef list23_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23
+    >
+struct list24_c
+    : l_item<
+          long_<24>
+        , integral_c< T,C0 >
+        , list23_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 >
+        >
+{
+    typedef list24_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24
+    >
+struct list25_c
+    : l_item<
+          long_<25>
+        , integral_c< T,C0 >
+        , list24_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24 >
+        >
+{
+    typedef list25_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25
+    >
+struct list26_c
+    : l_item<
+          long_<26>
+        , integral_c< T,C0 >
+        , list25_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25 >
+        >
+{
+    typedef list26_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26
+    >
+struct list27_c
+    : l_item<
+          long_<27>
+        , integral_c< T,C0 >
+        , list26_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26 >
+        >
+{
+    typedef list27_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27
+    >
+struct list28_c
+    : l_item<
+          long_<28>
+        , integral_c< T,C0 >
+        , list27_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27 >
+        >
+{
+    typedef list28_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28
+    >
+struct list29_c
+    : l_item<
+          long_<29>
+        , integral_c< T,C0 >
+        , list28_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28 >
+        >
+{
+    typedef list29_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29
+    >
+struct list30_c
+    : l_item<
+          long_<30>
+        , integral_c< T,C0 >
+        , list29_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29 >
+        >
+{
+    typedef list30_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/list/aux_/preprocessed/plain/list40.hpp b/ext/boost/mpl/list/aux_/preprocessed/plain/list40.hpp
new file mode 100644
index 0000000..68c6761
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/preprocessed/plain/list40.hpp
@@ -0,0 +1,209 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list/list40.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30
+    >
+struct list31
+    : l_item<
+          long_<31>
+        , T0
+        , list30< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30 >
+        >
+{
+    typedef list31 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31
+    >
+struct list32
+    : l_item<
+          long_<32>
+        , T0
+        , list31< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31 >
+        >
+{
+    typedef list32 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32
+    >
+struct list33
+    : l_item<
+          long_<33>
+        , T0
+        , list32< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32 >
+        >
+{
+    typedef list33 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33
+    >
+struct list34
+    : l_item<
+          long_<34>
+        , T0
+        , list33< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33 >
+        >
+{
+    typedef list34 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    >
+struct list35
+    : l_item<
+          long_<35>
+        , T0
+        , list34< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34 >
+        >
+{
+    typedef list35 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35
+    >
+struct list36
+    : l_item<
+          long_<36>
+        , T0
+        , list35< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35 >
+        >
+{
+    typedef list36 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36
+    >
+struct list37
+    : l_item<
+          long_<37>
+        , T0
+        , list36< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36 >
+        >
+{
+    typedef list37 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37
+    >
+struct list38
+    : l_item<
+          long_<38>
+        , T0
+        , list37< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37 >
+        >
+{
+    typedef list38 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38
+    >
+struct list39
+    : l_item<
+          long_<39>
+        , T0
+        , list38< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38 >
+        >
+{
+    typedef list39 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    >
+struct list40
+    : l_item<
+          long_<40>
+        , T0
+        , list39< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39 >
+        >
+{
+    typedef list40 type;
+};
+
+}}
diff --git a/ext/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp b/ext/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp
new file mode 100644
index 0000000..0c51ba2
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp
@@ -0,0 +1,193 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list/list40_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    >
+struct list31_c
+    : l_item<
+          long_<31>
+        , integral_c< T,C0 >
+        , list30_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30 >
+        >
+{
+    typedef list31_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31
+    >
+struct list32_c
+    : l_item<
+          long_<32>
+        , integral_c< T,C0 >
+        , list31_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31 >
+        >
+{
+    typedef list32_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32
+    >
+struct list33_c
+    : l_item<
+          long_<33>
+        , integral_c< T,C0 >
+        , list32_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32 >
+        >
+{
+    typedef list33_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33
+    >
+struct list34_c
+    : l_item<
+          long_<34>
+        , integral_c< T,C0 >
+        , list33_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33 >
+        >
+{
+    typedef list34_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34
+    >
+struct list35_c
+    : l_item<
+          long_<35>
+        , integral_c< T,C0 >
+        , list34_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34 >
+        >
+{
+    typedef list35_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35
+    >
+struct list36_c
+    : l_item<
+          long_<36>
+        , integral_c< T,C0 >
+        , list35_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35 >
+        >
+{
+    typedef list36_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36
+    >
+struct list37_c
+    : l_item<
+          long_<37>
+        , integral_c< T,C0 >
+        , list36_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36 >
+        >
+{
+    typedef list37_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37
+    >
+struct list38_c
+    : l_item<
+          long_<38>
+        , integral_c< T,C0 >
+        , list37_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37 >
+        >
+{
+    typedef list38_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38
+    >
+struct list39_c
+    : l_item<
+          long_<39>
+        , integral_c< T,C0 >
+        , list38_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38 >
+        >
+{
+    typedef list39_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39
+    >
+struct list40_c
+    : l_item<
+          long_<40>
+        , integral_c< T,C0 >
+        , list39_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39 >
+        >
+{
+    typedef list40_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/list/aux_/preprocessed/plain/list50.hpp b/ext/boost/mpl/list/aux_/preprocessed/plain/list50.hpp
new file mode 100644
index 0000000..4cc22da
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/preprocessed/plain/list50.hpp
@@ -0,0 +1,229 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list/list50.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40
+    >
+struct list41
+    : l_item<
+          long_<41>
+        , T0
+        , list40< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40 >
+        >
+{
+    typedef list41 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41
+    >
+struct list42
+    : l_item<
+          long_<42>
+        , T0
+        , list41< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41 >
+        >
+{
+    typedef list42 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42
+    >
+struct list43
+    : l_item<
+          long_<43>
+        , T0
+        , list42< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42 >
+        >
+{
+    typedef list43 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43
+    >
+struct list44
+    : l_item<
+          long_<44>
+        , T0
+        , list43< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43 >
+        >
+{
+    typedef list44 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    >
+struct list45
+    : l_item<
+          long_<45>
+        , T0
+        , list44< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44 >
+        >
+{
+    typedef list45 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45
+    >
+struct list46
+    : l_item<
+          long_<46>
+        , T0
+        , list45< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45 >
+        >
+{
+    typedef list46 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46
+    >
+struct list47
+    : l_item<
+          long_<47>
+        , T0
+        , list46< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46 >
+        >
+{
+    typedef list47 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47
+    >
+struct list48
+    : l_item<
+          long_<48>
+        , T0
+        , list47< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47 >
+        >
+{
+    typedef list48 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47, typename T48
+    >
+struct list49
+    : l_item<
+          long_<49>
+        , T0
+        , list48< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48 >
+        >
+{
+    typedef list49 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47, typename T48, typename T49
+    >
+struct list50
+    : l_item<
+          long_<50>
+        , T0
+        , list49< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49 >
+        >
+{
+    typedef list50 type;
+};
+
+}}
diff --git a/ext/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp b/ext/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp
new file mode 100644
index 0000000..28c061d
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp
@@ -0,0 +1,203 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/list/list50_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    >
+struct list41_c
+    : l_item<
+          long_<41>
+        , integral_c< T,C0 >
+        , list40_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40 >
+        >
+{
+    typedef list41_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41
+    >
+struct list42_c
+    : l_item<
+          long_<42>
+        , integral_c< T,C0 >
+        , list41_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41 >
+        >
+{
+    typedef list42_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42
+    >
+struct list43_c
+    : l_item<
+          long_<43>
+        , integral_c< T,C0 >
+        , list42_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42 >
+        >
+{
+    typedef list43_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43
+    >
+struct list44_c
+    : l_item<
+          long_<44>
+        , integral_c< T,C0 >
+        , list43_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43 >
+        >
+{
+    typedef list44_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44
+    >
+struct list45_c
+    : l_item<
+          long_<45>
+        , integral_c< T,C0 >
+        , list44_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44 >
+        >
+{
+    typedef list45_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45
+    >
+struct list46_c
+    : l_item<
+          long_<46>
+        , integral_c< T,C0 >
+        , list45_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45 >
+        >
+{
+    typedef list46_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46
+    >
+struct list47_c
+    : l_item<
+          long_<47>
+        , integral_c< T,C0 >
+        , list46_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46 >
+        >
+{
+    typedef list47_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47
+    >
+struct list48_c
+    : l_item<
+          long_<48>
+        , integral_c< T,C0 >
+        , list47_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47 >
+        >
+{
+    typedef list48_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48
+    >
+struct list49_c
+    : l_item<
+          long_<49>
+        , integral_c< T,C0 >
+        , list48_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48 >
+        >
+{
+    typedef list49_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49
+    >
+struct list50_c
+    : l_item<
+          long_<50>
+        , integral_c< T,C0 >
+        , list49_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48,C49 >
+        >
+{
+    typedef list50_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/list/aux_/push_back.hpp b/ext/boost/mpl/list/aux_/push_back.hpp
new file mode 100644
index 0000000..8e9c34b
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/push_back.hpp
@@ -0,0 +1,36 @@
+
+#ifndef BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: push_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/push_back_fwd.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct has_push_back_impl;
+
+template<>
+struct has_push_back_impl< aux::list_tag >
+{
+    template< typename Seq > struct apply
+        : false_
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/aux_/push_front.hpp b/ext/boost/mpl/list/aux_/push_front.hpp
new file mode 100644
index 0000000..942508b
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/push_front.hpp
@@ -0,0 +1,39 @@
+
+#ifndef BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/push_front_fwd.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/list/aux_/item.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct push_front_impl< aux::list_tag >
+{
+    template< typename List, typename T > struct apply
+    {
+        typedef l_item<
+              typename next<typename List::size>::type
+            , T
+            , typename List::type
+            > type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/aux_/size.hpp b/ext/boost/mpl/list/aux_/size.hpp
new file mode 100644
index 0000000..9d7191f
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/size.hpp
@@ -0,0 +1,33 @@
+
+#ifndef BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/size_fwd.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct size_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+        : List::size
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/aux_/tag.hpp b/ext/boost/mpl/list/aux_/tag.hpp
new file mode 100644
index 0000000..e1a7533
--- /dev/null
+++ b/ext/boost/mpl/list/aux_/tag.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl { namespace aux {
+
+struct list_tag;
+struct l_iter_tag;
+
+}}}
+
+#endif // BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/list0.hpp b/ext/boost/mpl/list/list0.hpp
new file mode 100644
index 0000000..3ecdac3
--- /dev/null
+++ b/ext/boost/mpl/list/list0.hpp
@@ -0,0 +1,42 @@
+
+#ifndef BOOST_MPL_LIST_LIST0_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST0_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/mpl/list/aux_/push_front.hpp>
+#include <boost/mpl/list/aux_/pop_front.hpp>
+#include <boost/mpl/list/aux_/push_back.hpp>
+#include <boost/mpl/list/aux_/front.hpp>
+#include <boost/mpl/list/aux_/clear.hpp>
+#include <boost/mpl/list/aux_/O1_size.hpp>
+#include <boost/mpl/list/aux_/size.hpp>
+#include <boost/mpl/list/aux_/empty.hpp>
+#include <boost/mpl/list/aux_/begin_end.hpp>
+#include <boost/mpl/list/aux_/item.hpp>
+
+namespace boost { namespace mpl {
+
+template< typename Dummy = na > struct list0;
+
+template<> struct list0<na>
+    : l_end
+{
+    typedef l_end type;
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_LIST0_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/list0_c.hpp b/ext/boost/mpl/list/list0_c.hpp
new file mode 100644
index 0000000..066661f
--- /dev/null
+++ b/ext/boost/mpl/list/list0_c.hpp
@@ -0,0 +1,31 @@
+
+#ifndef BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list0_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/list/list0.hpp>
+#include <boost/mpl/integral_c.hpp>
+
+namespace boost { namespace mpl {
+
+template< typename T > struct list0_c
+    : l_end
+{
+    typedef l_end type;
+    typedef T value_type;
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/list10.hpp b/ext/boost/mpl/list/list10.hpp
new file mode 100644
index 0000000..2354694
--- /dev/null
+++ b/ext/boost/mpl/list/list10.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST10_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST10_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list10.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list0.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list10.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(1, 10, <boost/mpl/list/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST10_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/list10_c.hpp b/ext/boost/mpl/list/list10_c.hpp
new file mode 100644
index 0000000..b1c8e1b
--- /dev/null
+++ b/ext/boost/mpl/list/list10_c.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list10_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list0_c.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list10_c.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(1, 10, <boost/mpl/list/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/list20.hpp b/ext/boost/mpl/list/list20.hpp
new file mode 100644
index 0000000..29f7d5d
--- /dev/null
+++ b/ext/boost/mpl/list/list20.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST20_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST20_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list20.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list10.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list20.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(11, 20, <boost/mpl/list/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST20_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/list20_c.hpp b/ext/boost/mpl/list/list20_c.hpp
new file mode 100644
index 0000000..d7f772c
--- /dev/null
+++ b/ext/boost/mpl/list/list20_c.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list20_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list10_c.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list20_c.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(11, 20, <boost/mpl/list/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/list30.hpp b/ext/boost/mpl/list/list30.hpp
new file mode 100644
index 0000000..704cbdf
--- /dev/null
+++ b/ext/boost/mpl/list/list30.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST30_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST30_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list30.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list20.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list30.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(21, 30, <boost/mpl/list/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST30_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/list30_c.hpp b/ext/boost/mpl/list/list30_c.hpp
new file mode 100644
index 0000000..54fd22f
--- /dev/null
+++ b/ext/boost/mpl/list/list30_c.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list30_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list20_c.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list30_c.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(21, 30, <boost/mpl/list/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/list40.hpp b/ext/boost/mpl/list/list40.hpp
new file mode 100644
index 0000000..11d12e3
--- /dev/null
+++ b/ext/boost/mpl/list/list40.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST40_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST40_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list40.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list30.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list40.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(31, 40, <boost/mpl/list/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST40_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/list40_c.hpp b/ext/boost/mpl/list/list40_c.hpp
new file mode 100644
index 0000000..0ae99fc
--- /dev/null
+++ b/ext/boost/mpl/list/list40_c.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list40_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list30_c.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list40_c.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(31, 40, <boost/mpl/list/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/list50.hpp b/ext/boost/mpl/list/list50.hpp
new file mode 100644
index 0000000..4050a81
--- /dev/null
+++ b/ext/boost/mpl/list/list50.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST50_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST50_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list50.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list40.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list50.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(41, 50, <boost/mpl/list/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST50_HPP_INCLUDED
diff --git a/ext/boost/mpl/list/list50_c.hpp b/ext/boost/mpl/list/list50_c.hpp
new file mode 100644
index 0000000..4b5b654
--- /dev/null
+++ b/ext/boost/mpl/list/list50_c.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list50_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list40_c.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list50_c.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(41, 50, <boost/mpl/list/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/list_c.hpp b/ext/boost/mpl/list_c.hpp
new file mode 100644
index 0000000..984f6c3
--- /dev/null
+++ b/ext/boost/mpl/list_c.hpp
@@ -0,0 +1,60 @@
+
+#ifndef BOOST_MPL_LIST_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/limits/list.hpp>
+#   include <boost/mpl/aux_/nttp_decl.hpp>
+#   include <boost/mpl/aux_/config/preprocessor.hpp>
+
+#   include <boost/preprocessor/inc.hpp>
+#   include <boost/preprocessor/cat.hpp>
+#   include <boost/preprocessor/stringize.hpp>
+
+#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
+#   define AUX778076_LIST_C_HEADER \
+    BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE),_c).hpp \
+    /**/
+#else
+#   define AUX778076_LIST_C_HEADER \
+    BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE),_c)##.hpp \
+    /**/
+#endif
+
+#   include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_LIST_C_HEADER)
+#   undef AUX778076_LIST_C_HEADER
+#   include <climits>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list_c.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/limits/list.hpp>
+
+#   define AUX778076_SEQUENCE_NAME list_c
+#   define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_LIST_SIZE
+#   define AUX778076_SEQUENCE_NAME_N(n) BOOST_PP_CAT(BOOST_PP_CAT(list,n),_c)
+#   define AUX778076_SEQUENCE_INTEGRAL_WRAPPER
+#   include <boost/mpl/aux_/sequence_wrapper.hpp>
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_LIST_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/logical.hpp b/ext/boost/mpl/logical.hpp
index 256ea32..f8b8fc3 100644
--- a/ext/boost/mpl/logical.hpp
+++ b/ext/boost/mpl/logical.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: logical.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/or.hpp>
diff --git a/ext/boost/mpl/long.hpp b/ext/boost/mpl/long.hpp
new file mode 100644
index 0000000..1c79afd
--- /dev/null
+++ b/ext/boost/mpl/long.hpp
@@ -0,0 +1,22 @@
+
+#ifndef BOOST_MPL_LONG_HPP_INCLUDED
+#define BOOST_MPL_LONG_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: long.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/long_fwd.hpp>
+
+#define AUX_WRAPPER_VALUE_TYPE long
+#include <boost/mpl/aux_/integral_wrapper.hpp>
+
+#endif // BOOST_MPL_LONG_HPP_INCLUDED
diff --git a/ext/boost/mpl/long_fwd.hpp b/ext/boost/mpl/long_fwd.hpp
new file mode 100644
index 0000000..17accd3
--- /dev/null
+++ b/ext/boost/mpl/long_fwd.hpp
@@ -0,0 +1,27 @@
+
+#ifndef BOOST_MPL_LONG_FWD_HPP_INCLUDED
+#define BOOST_MPL_LONG_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: long_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/adl_barrier.hpp>
+#include <boost/mpl/aux_/nttp_decl.hpp>
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+
+template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct long_;
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+BOOST_MPL_AUX_ADL_BARRIER_DECL(long_)
+
+#endif // BOOST_MPL_LONG_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/lower_bound.hpp b/ext/boost/mpl/lower_bound.hpp
new file mode 100644
index 0000000..058e0ba
--- /dev/null
+++ b/ext/boost/mpl/lower_bound.hpp
@@ -0,0 +1,143 @@
+
+#ifndef BOOST_MPL_LOWER_BOUND_HPP_INCLUDED
+#define BOOST_MPL_LOWER_BOUND_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: lower_bound.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/less.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
+#   define BOOST_MPL_CFG_STRIPPED_DOWN_LOWER_BOUND_IMPL
+#endif
+
+#if !defined(BOOST_MPL_CFG_STRIPPED_DOWN_LOWER_BOUND_IMPL)
+#   include <boost/mpl/minus.hpp>
+#   include <boost/mpl/divides.hpp>
+#   include <boost/mpl/size.hpp>
+#   include <boost/mpl/advance.hpp>
+#   include <boost/mpl/begin_end.hpp>
+#   include <boost/mpl/long.hpp>
+#   include <boost/mpl/eval_if.hpp>
+#   include <boost/mpl/prior.hpp>
+#   include <boost/mpl/deref.hpp>
+#   include <boost/mpl/apply.hpp>
+#   include <boost/mpl/aux_/value_wknd.hpp>
+#else
+#   include <boost/mpl/not.hpp>
+#   include <boost/mpl/find.hpp>
+#   include <boost/mpl/bind.hpp>
+#endif
+
+#include <boost/config.hpp>
+
+namespace boost { namespace mpl {
+
+#if defined(BOOST_MPL_CFG_STRIPPED_DOWN_LOWER_BOUND_IMPL)
+
+// agurt 23/oct/02: has a wrong complexity etc., but at least it works
+// feel free to contribute a better implementation!
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(T)
+    , typename Predicate = less<>
+    , typename pred_ = typename lambda<Predicate>::type
+    >
+struct lower_bound
+    : find_if< Sequence, bind1< not_<>, bind2<pred_,_,T> > >
+{
+};
+
+#else
+
+namespace aux {
+
+template<
+      typename Distance
+    , typename Predicate
+    , typename T
+    , typename DeferredIterator
+    >
+struct lower_bound_step_impl;
+
+template< 
+      typename Distance
+    , typename Predicate
+    , typename T
+    , typename DeferredIterator
+    >
+struct lower_bound_step
+{
+    typedef typename eval_if<
+          Distance
+        , lower_bound_step_impl<Distance,Predicate,T,DeferredIterator>
+        , DeferredIterator
+        >::type type;
+};
+    
+template<
+      typename Distance
+    , typename Predicate
+    , typename T
+    , typename DeferredIterator
+    >
+struct lower_bound_step_impl
+{
+    typedef typename divides< Distance, long_<2> >::type offset_;
+    typedef typename DeferredIterator::type iter_;
+    typedef typename advance< iter_,offset_ >::type middle_;
+    typedef typename apply2<
+              Predicate
+            , typename deref<middle_>::type
+            , T
+            >::type cond_;
+
+    typedef typename prior< minus< Distance, offset_> >::type step_;
+    typedef lower_bound_step< offset_,Predicate,T,DeferredIterator > step_forward_;
+    typedef lower_bound_step< step_,Predicate,T,next<middle_> > step_backward_;
+    typedef typename eval_if<
+          cond_
+        , step_backward_
+        , step_forward_
+        >::type type;
+};
+
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(T)
+    , typename Predicate = less<>
+    >
+struct lower_bound
+{
+ private:
+    typedef typename lambda<Predicate>::type pred_;
+    typedef typename size<Sequence>::type size_;
+
+ public:
+    typedef typename aux::lower_bound_step<
+        size_,pred_,T,begin<Sequence>
+        >::type type;
+};
+
+#endif // BOOST_MPL_CFG_STRIPPED_DOWN_LOWER_BOUND_IMPL
+
+BOOST_MPL_AUX_NA_SPEC(2, lower_bound)
+
+}}
+
+#endif // BOOST_MPL_LOWER_BOUND_HPP_INCLUDED
diff --git a/ext/boost/mpl/map.hpp b/ext/boost/mpl/map.hpp
new file mode 100644
index 0000000..3355f00
--- /dev/null
+++ b/ext/boost/mpl/map.hpp
@@ -0,0 +1,57 @@
+
+#ifndef BOOST_MPL_MAP_HPP_INCLUDED
+#define BOOST_MPL_MAP_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: map.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/limits/map.hpp>
+#   include <boost/mpl/aux_/na.hpp>
+#   include <boost/mpl/aux_/config/preprocessor.hpp>
+
+#   include <boost/preprocessor/inc.hpp>
+#   include <boost/preprocessor/cat.hpp>
+#   include <boost/preprocessor/stringize.hpp>
+
+#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
+#   define AUX778076_MAP_HEADER \
+    BOOST_PP_CAT(map, BOOST_MPL_LIMIT_MAP_SIZE).hpp \
+    /**/
+#else
+#   define AUX778076_MAP_HEADER \
+    BOOST_PP_CAT(map, BOOST_MPL_LIMIT_MAP_SIZE)##.hpp \
+    /**/
+#endif
+
+#   include BOOST_PP_STRINGIZE(boost/mpl/map/AUX778076_MAP_HEADER)
+#   undef AUX778076_MAP_HEADER
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER map.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/limits/map.hpp>
+
+#   define AUX778076_SEQUENCE_NAME map
+#   define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_MAP_SIZE
+#   include <boost/mpl/aux_/sequence_wrapper.hpp>
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_MAP_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/aux_/at_impl.hpp b/ext/boost/mpl/map/aux_/at_impl.hpp
new file mode 100644
index 0000000..e531a70
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/at_impl.hpp
@@ -0,0 +1,144 @@
+
+#ifndef BOOST_MPL_MAP_AUX_AT_IMPL_HPP_INCLUDED
+#define BOOST_MPL_MAP_AUX_AT_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: at_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/at_fwd.hpp>
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/map/aux_/tag.hpp>
+#include <boost/mpl/aux_/order_impl.hpp>
+#include <boost/mpl/aux_/overload_names.hpp>
+#include <boost/mpl/aux_/type_wrapper.hpp>
+#include <boost/mpl/aux_/ptr_to_ref.hpp>
+#include <boost/mpl/aux_/static_cast.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+#if !defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+#   include <boost/mpl/eval_if.hpp>
+#   include <boost/mpl/pair.hpp>
+#   include <boost/mpl/void.hpp>
+#   include <boost/mpl/aux_/config/static_constant.hpp>
+#endif
+
+namespace boost { namespace mpl {
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+template< typename Map, typename Key >
+struct m_at
+{
+    typedef aux::type_wrapper<Key> key_;
+    typedef __typeof__( BOOST_MPL_AUX_OVERLOAD_CALL_VALUE_BY_KEY(
+          Map
+        , BOOST_MPL_AUX_STATIC_CAST(key_*, 0)
+        ) ) type;
+};
+
+template<>
+struct at_impl< aux::map_tag >
+{
+    template< typename Map, typename Key > struct apply
+        : aux::wrapped_type< typename m_at<
+              Map
+            , Key
+            >::type >
+    {
+    };
+};
+
+// agurt 31/jan/04: two-step implementation for the sake of GCC 3.x
+template< typename Map, long order > 
+struct item_by_order_impl
+{
+    typedef __typeof__( BOOST_MPL_AUX_OVERLOAD_CALL_ITEM_BY_ORDER(
+          Map 
+        , BOOST_MPL_AUX_STATIC_CAST(long_<order>*, 0)
+        ) ) type;
+};
+
+template< typename Map, long order >
+struct item_by_order
+    : aux::wrapped_type<
+          typename item_by_order_impl<Map,order>::type
+        >
+{
+};
+
+#else // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+#   if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< typename Map, long n > struct m_at
+{
+    typedef void_ type;
+};
+
+#   else
+
+template< long n > struct m_at_impl
+{
+    template< typename Map > struct result_
+    {
+        typedef void_ type;
+    };
+};
+
+template< typename Map, long n > struct m_at
+{
+    typedef typename m_at_impl<n>::result_<Map>::type type;
+};
+
+#   endif
+
+
+template<>
+struct at_impl< aux::map_tag >
+{
+    template< typename Map, typename Key > struct apply
+    {
+        typedef typename m_at< Map, (x_order_impl<Map,Key>::value - 2) >::type item_;       
+        typedef typename eval_if<
+              is_void_<item_>
+            , void_
+            , second<item_>
+            >::type type;
+    };
+};
+
+template< typename Map, long order > struct is_item_masked
+{
+    BOOST_STATIC_CONSTANT(bool, value = 
+          sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(
+              Map
+            , BOOST_MPL_AUX_STATIC_CAST(long_<order>*, 0)
+            ) ) == sizeof(aux::yes_tag)
+        );
+};
+
+template< typename Map, long order > struct item_by_order
+{    
+    typedef typename eval_if_c< 
+          is_item_masked<Map,order>::value
+        , void_
+        , m_at<Map,(order - 2)>
+        >::type type;
+};
+
+#endif
+
+}}
+
+#endif // BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/aux_/begin_end_impl.hpp b/ext/boost/mpl/map/aux_/begin_end_impl.hpp
new file mode 100644
index 0000000..b450ecf
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/begin_end_impl.hpp
@@ -0,0 +1,50 @@
+
+#ifndef BOOST_MPL_MAP_AUX_BEGIN_END_IMPL_HPP_INCLUDED
+#define BOOST_MPL_MAP_AUX_BEGIN_END_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: begin_end_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end_fwd.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/map/aux_/iterator.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct begin_impl< aux::map_tag >
+{
+    template< typename Map > struct apply
+    {
+        typedef typename next< typename Map::order >::type max_order_;
+        typedef m_iter<
+              Map
+            , next_order<Map,1,max_order_::value>::value
+            , max_order_::value
+            > type;
+    };
+};
+
+template<>
+struct end_impl< aux::map_tag >
+{
+    template< typename Map > struct apply
+    {
+        typedef typename next< typename Map::order >::type max_order_;
+        typedef m_iter< Map,max_order_::value,max_order_::value > type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_MAP_AUX_BEGIN_END_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/aux_/clear_impl.hpp b/ext/boost/mpl/map/aux_/clear_impl.hpp
new file mode 100644
index 0000000..d2020a2
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/clear_impl.hpp
@@ -0,0 +1,35 @@
+
+#ifndef BOOST_MPL_MAP_AUX_CLEAR_IMPL_HPP_INCLUDED
+#define BOOST_MPL_MAP_AUX_CLEAR_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: clear_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/clear_fwd.hpp>
+#include <boost/mpl/map/aux_/map0.hpp>
+#include <boost/mpl/map/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct clear_impl< aux::map_tag >
+{
+    template< typename Map > struct apply
+    {
+        typedef map0<> type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_MAP_AUX_CLEAR_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/aux_/contains_impl.hpp b/ext/boost/mpl/map/aux_/contains_impl.hpp
new file mode 100644
index 0000000..6740233
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/contains_impl.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_MAP_AUX_CONTAINS_IMPL_HPP_INCLUDED
+#define BOOST_MPL_MAP_AUX_CONTAINS_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: contains_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/contains_fwd.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/map/aux_/at_impl.hpp>
+#include <boost/mpl/map/aux_/tag.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct contains_impl< aux::map_tag >
+{
+    template< typename Map, typename Pair > struct apply
+        : is_same< 
+              typename at_impl<aux::map_tag>::apply<
+                  Map
+                , typename Pair::first
+                >::type
+            , typename Pair::second
+            >
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_MAP_AUX_CONTAINS_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/aux_/empty_impl.hpp b/ext/boost/mpl/map/aux_/empty_impl.hpp
new file mode 100644
index 0000000..b4f3511
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/empty_impl.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_MAP_AUX_EMPTY_IMPL_HPP_INCLUDED
+#define BOOST_MPL_MAP_AUX_EMPTY_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: empty_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/empty_fwd.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/map/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct empty_impl< aux::map_tag >
+{
+    template< typename Map > struct apply
+        : not_< typename Map::size >
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_MAP_AUX_EMPTY_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/aux_/erase_impl.hpp b/ext/boost/mpl/map/aux_/erase_impl.hpp
new file mode 100644
index 0000000..8328e80
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/erase_impl.hpp
@@ -0,0 +1,41 @@
+
+#ifndef BOOST_MPL_MAP_AUX_ERASE_IMPL_HPP_INCLUDED
+#define BOOST_MPL_MAP_AUX_ERASE_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: erase_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/erase_fwd.hpp>
+#include <boost/mpl/map/aux_/erase_key_impl.hpp>
+#include <boost/mpl/map/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct erase_impl< aux::map_tag >
+{
+    template< 
+          typename Map
+        , typename Pos
+        , typename unused_
+        > 
+    struct apply
+        : erase_key_impl<aux::map_tag>
+            ::apply<Map,typename Pos::type::first>
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_MAP_AUX_ERASE_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/aux_/erase_key_impl.hpp b/ext/boost/mpl/map/aux_/erase_key_impl.hpp
new file mode 100644
index 0000000..9a8a715
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/erase_key_impl.hpp
@@ -0,0 +1,53 @@
+
+#ifndef BOOST_MPL_MAP_AUX_ERASE_KEY_IMPL_HPP_INCLUDED
+#define BOOST_MPL_MAP_AUX_ERASE_KEY_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: erase_key_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/erase_key_fwd.hpp>
+#include <boost/mpl/map/aux_/has_key_impl.hpp>
+#include <boost/mpl/map/aux_/item.hpp>
+#include <boost/mpl/map/aux_/tag.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/base.hpp>
+#include <boost/mpl/eval_if.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct erase_key_impl< aux::map_tag >
+{
+    template< 
+          typename Map
+        , typename Key
+        > 
+    struct apply
+        : eval_if< 
+              has_key_impl<aux::map_tag>::apply<Map,Key>
+            , eval_if< 
+                  is_same< Key,typename Map::key_ > 
+                , base<Map>
+                , identity< m_mask<Key,Map> >
+                >
+            , identity<Map>
+            >
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_MAP_AUX_ERASE_KEY_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/aux_/has_key_impl.hpp b/ext/boost/mpl/map/aux_/has_key_impl.hpp
new file mode 100644
index 0000000..3ff49c2
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/has_key_impl.hpp
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_MAP_AUX_HAS_KEY_IMPL_HPP_INCLUDED
+#define BOOST_MPL_MAP_AUX_HAS_KEY_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: has_key_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/has_key_fwd.hpp>
+#include <boost/mpl/map/aux_/tag.hpp>
+#include <boost/mpl/map/aux_/at_impl.hpp>
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct has_key_impl< aux::map_tag >
+{
+    template< typename Map, typename Key > struct apply
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+        : is_not_void_< 
+              typename at_impl<aux::map_tag>
+                ::apply<Map,Key>::type
+            >
+#else
+        : bool_< ( x_order_impl<Map,Key>::value > 1 ) >
+#endif
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_MAP_AUX_HAS_KEY_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/aux_/include_preprocessed.hpp b/ext/boost/mpl/map/aux_/include_preprocessed.hpp
new file mode 100644
index 0000000..89e4b16
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/include_preprocessed.hpp
@@ -0,0 +1,53 @@
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
+
+#include <boost/mpl/aux_/config/typeof.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+#include <boost/mpl/aux_/config/preprocessor.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/stringize.hpp>
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+#   define AUX778076_INCLUDE_DIR typeof_based
+#elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#   define AUX778076_INCLUDE_DIR no_ctps
+#else
+#   define AUX778076_INCLUDE_DIR plain
+#endif
+
+#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
+#   define AUX778076_HEADER \
+    AUX778076_INCLUDE_DIR/BOOST_MPL_PREPROCESSED_HEADER \
+/**/
+#else
+#   define AUX778076_HEADER \
+    BOOST_PP_CAT(AUX778076_INCLUDE_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \
+/**/
+#endif
+
+#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700))
+#   define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/map/aux_/preprocessed/AUX778076_HEADER)
+#   include AUX778076_INCLUDE_STRING
+#   undef AUX778076_INCLUDE_STRING
+#else
+#   include BOOST_PP_STRINGIZE(boost/mpl/map/aux_/preprocessed/AUX778076_HEADER)
+#endif
+
+#   undef AUX778076_HEADER
+#   undef AUX778076_INCLUDE_DIR
+
+#undef BOOST_MPL_PREPROCESSED_HEADER
diff --git a/ext/boost/mpl/map/aux_/insert_impl.hpp b/ext/boost/mpl/map/aux_/insert_impl.hpp
new file mode 100644
index 0000000..ab0aad3
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/insert_impl.hpp
@@ -0,0 +1,72 @@
+
+#ifndef BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED
+#define BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: insert_impl.hpp 55751 2009-08-24 04:11:00Z agurtovoy $
+// $Date: 2009-08-23 21:11:00 -0700 (Sun, 23 Aug 2009) $
+// $Revision: 55751 $
+
+#include <boost/mpl/insert_fwd.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/map/aux_/contains_impl.hpp>
+#include <boost/mpl/map/aux_/item.hpp>
+#include <boost/mpl/map/aux_/tag.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename Map, typename Pair > 
+struct map_insert_impl
+    : if_< 
+          contains_impl<aux::map_tag>::apply<Map,Pair>
+        , Map
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+        , m_item<
+              typename Pair::first
+            , typename Pair::second
+            , Map
+            >
+#else
+        , m_item<
+              Map::order::value
+            , typename Pair::first
+            , typename Pair::second
+            , Map
+            >
+#endif
+        >
+{
+};
+}
+
+template<>
+struct insert_impl< aux::map_tag >
+{
+    template< 
+          typename Map
+        , typename PosOrKey
+        , typename KeyOrNA
+        > 
+    struct apply
+        : aux::map_insert_impl<
+              Map
+            , typename if_na<KeyOrNA,PosOrKey>::type
+            >
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/aux_/item.hpp b/ext/boost/mpl/map/aux_/item.hpp
new file mode 100644
index 0000000..8ff86b3
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/item.hpp
@@ -0,0 +1,138 @@
+
+#ifndef BOOST_MPL_MAP_AUX_ITEM_HPP_INCLUDED
+#define BOOST_MPL_MAP_AUX_ITEM_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/pair.hpp>
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/prior.hpp>
+#include <boost/mpl/map/aux_/map0.hpp>
+#include <boost/mpl/aux_/order_impl.hpp>
+#include <boost/mpl/aux_/yes_no.hpp>
+#include <boost/mpl/aux_/type_wrapper.hpp>
+#include <boost/mpl/aux_/config/arrays.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+
+namespace boost { namespace mpl {
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+template< typename Key, typename T, typename Base >
+struct m_item
+    : Base
+{
+    typedef Key         key_;
+    typedef pair<Key,T> item;
+    typedef Base        base;
+    
+    typedef typename next< typename Base::size >::type  size;
+    typedef typename next< typename Base::order >::type order;
+
+#if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES)
+    typedef typename aux::weighted_tag<BOOST_MPL_AUX_MSVC_VALUE_WKND(order)::value>::type order_tag_;
+#else
+    typedef char (&order_tag_)[BOOST_MPL_AUX_MSVC_VALUE_WKND(order)::value];
+#endif
+
+    BOOST_MPL_AUX_MAP_OVERLOAD( aux::type_wrapper<T>, VALUE_BY_KEY, m_item, aux::type_wrapper<Key>* );
+    BOOST_MPL_AUX_MAP_OVERLOAD( aux::type_wrapper<item>, ITEM_BY_ORDER, m_item, order* );
+    BOOST_MPL_AUX_MAP_OVERLOAD( order_tag_, ORDER_BY_KEY, m_item, aux::type_wrapper<Key>* );
+};
+
+
+template< typename Key, typename Base >
+struct m_mask
+    : Base
+{
+    typedef void_   key_;
+    typedef Base    base;
+
+    typedef typename prior< typename Base::size >::type  size;
+    typedef typename x_order_impl<Base,Key>::type key_order_;
+    
+    BOOST_MPL_AUX_MAP_OVERLOAD( aux::type_wrapper<void_>, VALUE_BY_KEY, m_mask, aux::type_wrapper<Key>* );
+    BOOST_MPL_AUX_MAP_OVERLOAD( aux::type_wrapper<void_>, ITEM_BY_ORDER, m_mask, key_order_* );
+};
+
+#else // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+
+#   if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< long n, typename Key, typename T, typename Base >
+struct m_item;
+
+#   else
+
+template< long n >
+struct m_item_impl
+{
+    template< typename Key, typename T, typename Base >
+    struct result_;
+};
+
+template< long n, typename Key, typename T, typename Base >
+struct m_item
+    : m_item_impl<n>::result_<Key,T,Base>
+{
+};
+
+
+#   endif
+
+
+template< typename Key, typename T, typename Base >
+struct m_item_
+    : Base
+{
+    typedef Key     key_;
+    typedef Base    base;
+    typedef m_item_ type;
+    
+    typedef typename next< typename Base::size >::type  size;
+    typedef typename next< typename Base::order >::type order;
+
+#if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES)
+    typedef typename aux::weighted_tag<BOOST_MPL_AUX_MSVC_VALUE_WKND(order)::value>::type order_tag_;
+#else
+    typedef char (&order_tag_)[BOOST_MPL_AUX_MSVC_VALUE_WKND(order)::value];
+#endif
+
+    BOOST_MPL_AUX_MAP_OVERLOAD( order_tag_, ORDER_BY_KEY, m_item_, aux::type_wrapper<Key>* );
+};
+
+template< typename Key, typename Base >
+struct m_mask
+    : Base
+{
+    typedef void_   key_;
+    typedef Base    base;
+
+    typedef typename prior< typename Base::size >::type  size;
+    typedef typename x_order_impl<Base,Key>::type key_order_;
+    
+    BOOST_MPL_AUX_MAP_OVERLOAD( aux::no_tag, ORDER_BY_KEY, m_mask, aux::type_wrapper<Key>* );
+    BOOST_MPL_AUX_MAP_OVERLOAD( aux::yes_tag, IS_MASKED, m_mask, key_order_* );
+};
+
+#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+}}
+
+#endif // BOOST_MPL_MAP_AUX_ITEM_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/aux_/iterator.hpp b/ext/boost/mpl/map/aux_/iterator.hpp
new file mode 100644
index 0000000..ecae6f8
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/iterator.hpp
@@ -0,0 +1,169 @@
+
+#ifndef BOOST_MPL_MAP_AUX_ITERATOR_HPP_INCLUDED
+#define BOOST_MPL_MAP_AUX_ITERATOR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/map/aux_/map0.hpp>
+#include <boost/mpl/map/aux_/at_impl.hpp>
+#include <boost/mpl/map/aux_/tag.hpp>
+#include <boost/mpl/iterator_tags.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/aux_/nttp_decl.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+namespace boost { namespace mpl {
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< 
+      typename Map
+    , long order
+    , long max_order
+    >
+struct next_order
+    : if_< 
+          is_void_< typename item_by_order<Map,order>::type >
+        , next_order<Map,(order+1),max_order>
+        , long_<order>
+        >::type
+{
+};
+
+template< 
+      typename Map
+    , long max_order
+    >
+struct next_order<Map,max_order,max_order>
+    : long_<max_order>
+{
+};
+
+
+template< typename Map, long order, long max_order >
+struct m_iter
+{
+    typedef forward_iterator_tag category;
+    typedef typename item_by_order<Map,order>::type type;
+};
+
+template< typename Map, long max_order >
+struct m_iter<Map,max_order,max_order>
+{
+    typedef forward_iterator_tag category;
+};
+
+
+template< typename Map, long order, long max_order > 
+struct next< m_iter<Map,order,max_order> >
+{
+    typedef m_iter<
+          Map
+        , next_order<Map,order+1,max_order>::value
+        , max_order
+        > type;
+};
+
+template< typename Map, long max_order > 
+struct next< m_iter<Map,max_order,max_order> >
+{
+};
+
+#else
+
+template< 
+      typename Map
+    , BOOST_MPL_AUX_NTTP_DECL(long, order)
+    , BOOST_MPL_AUX_NTTP_DECL(long, max_order)
+    >
+struct next_order;
+
+template< 
+      typename Map
+    , BOOST_MPL_AUX_NTTP_DECL(long, order)
+    , BOOST_MPL_AUX_NTTP_DECL(long, max_order)
+    >
+struct next_order_impl
+    : if_< 
+          is_void_< typename item_by_order<Map,order>::type >
+        , next_order<Map,(order+1),max_order>
+        , long_<order>
+        >::type
+    {
+    };
+
+template< 
+      typename Map
+    , BOOST_MPL_AUX_NTTP_DECL(long, order)
+    , BOOST_MPL_AUX_NTTP_DECL(long, max_order)
+    >
+struct next_order
+    : if_c<
+          (order != max_order)
+        , next_order_impl<Map,order,max_order>
+        , long_<order>
+        >::type
+{
+};
+
+
+template<
+      typename Map
+    , BOOST_MPL_AUX_NTTP_DECL(long, order)
+    , BOOST_MPL_AUX_NTTP_DECL(long, max_order)
+    >
+struct m_iter;
+
+struct m_iter_empty_base {};
+
+template< 
+      typename Map
+    , BOOST_MPL_AUX_NTTP_DECL(long, order)
+    , BOOST_MPL_AUX_NTTP_DECL(long, max_order)
+    >
+struct m_iter_base
+{
+    typedef typename item_by_order<Map,order>::type type;
+    
+    typedef m_iter<
+          Map
+        , next_order<Map,order+1,max_order>::value
+        , max_order
+        > next;
+};
+
+template<
+      typename Map
+    , BOOST_MPL_AUX_NTTP_DECL(long, order)
+    , BOOST_MPL_AUX_NTTP_DECL(long, max_order)
+    >
+struct m_iter
+  : if_c<
+          (order == max_order)
+        , m_iter_empty_base
+        , m_iter_base<Map,order,max_order>
+        >::type
+{
+    typedef forward_iterator_tag category;
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+}}
+
+#endif // BOOST_MPL_MAP_AUX_ITERATOR_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/aux_/key_type_impl.hpp b/ext/boost/mpl/map/aux_/key_type_impl.hpp
new file mode 100644
index 0000000..df883fc
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/key_type_impl.hpp
@@ -0,0 +1,36 @@
+
+#ifndef BOOST_MPL_MAP_AUX_KEY_TYPE_IMPL_HPP_INCLUDED
+#define BOOST_MPL_MAP_AUX_KEY_TYPE_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: key_type_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/key_type_fwd.hpp>
+#include <boost/mpl/pair.hpp>
+#include <boost/mpl/map/aux_/tag.hpp>
+
+namespace boost {
+namespace mpl {
+
+template<>
+struct key_type_impl< aux::map_tag >
+{
+    template< typename Map, typename T > struct apply
+        : first<T>
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_MAP_AUX_KEY_TYPE_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/aux_/map0.hpp b/ext/boost/mpl/map/aux_/map0.hpp
new file mode 100644
index 0000000..acba1a4
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/map0.hpp
@@ -0,0 +1,74 @@
+
+#ifndef BOOST_MPL_MAP_AUX_MAP0_HPP_INCLUDED
+#define BOOST_MPL_MAP_AUX_MAP0_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: map0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/map/aux_/tag.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/mpl/aux_/yes_no.hpp>
+#include <boost/mpl/aux_/overload_names.hpp>
+#include <boost/mpl/aux_/config/operators.hpp>
+
+#include <boost/preprocessor/cat.hpp>
+
+namespace boost { namespace mpl {
+
+#if defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING)
+
+#   define BOOST_MPL_AUX_MAP0_OVERLOAD(R, f, X, T) \
+    friend R BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f)(X const&, T) \
+/**/
+
+#   define BOOST_MPL_AUX_MAP_OVERLOAD(R, f, X, T) \
+    BOOST_MPL_AUX_MAP0_OVERLOAD(R, f, X, T) \
+/**/
+
+#else
+
+#   define BOOST_MPL_AUX_MAP0_OVERLOAD(R, f, X, T) \
+    static R BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f)(X const&, T) \
+/**/
+
+#   define BOOST_MPL_AUX_MAP_OVERLOAD(R, f, X, T) \
+    BOOST_MPL_AUX_MAP0_OVERLOAD(R, f, X, T); \
+    using Base::BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f) \
+/**/
+
+#endif
+
+
+template< typename Dummy = na > struct map0
+{
+    typedef map0            type;
+    typedef aux::map_tag    tag;
+    typedef void_           key_;
+    typedef long_<1>        order;
+    typedef long_<0>        size;
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+    BOOST_MPL_AUX_MAP0_OVERLOAD( aux::type_wrapper<void_>, VALUE_BY_KEY, map0<>, void const volatile* );
+    BOOST_MPL_AUX_MAP0_OVERLOAD( aux::type_wrapper<void_>, ITEM_BY_ORDER, map0<>, long_<1>* );
+    BOOST_MPL_AUX_MAP0_OVERLOAD( aux::no_tag, ORDER_BY_KEY, map0<>, void const volatile* );
+#else
+    BOOST_MPL_AUX_MAP0_OVERLOAD( aux::no_tag, ORDER_BY_KEY, map0<>, void const volatile* );
+    BOOST_MPL_AUX_MAP0_OVERLOAD( aux::no_tag, IS_MASKED, map0<>, void const volatile* );
+#endif
+};
+
+}}
+
+#endif // BOOST_MPL_MAP_AUX_MAP0_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/aux_/numbered.hpp b/ext/boost/mpl/map/aux_/numbered.hpp
new file mode 100644
index 0000000..453fe87
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/numbered.hpp
@@ -0,0 +1,110 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+#if !defined(BOOST_PP_IS_ITERATING)
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: numbered.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#else
+
+#include <boost/mpl/aux_/config/typeof.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+#include <boost/preprocessor/enum_params.hpp>
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/cat.hpp>
+
+#define i_ BOOST_PP_FRAME_ITERATION(1)
+
+#   define AUX778076_MAP_TAIL(map, i_, P) \
+    BOOST_PP_CAT(map,i_)< \
+          BOOST_PP_ENUM_PARAMS(i_, P) \
+        > \
+    /**/
+
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+template<
+      BOOST_PP_ENUM_PARAMS(i_, typename P)
+    >
+struct BOOST_PP_CAT(map,i_)
+    : m_item<
+          typename BOOST_PP_CAT(P,BOOST_PP_DEC(i_))::first
+        , typename BOOST_PP_CAT(P,BOOST_PP_DEC(i_))::second
+        , AUX778076_MAP_TAIL(map,BOOST_PP_DEC(i_),P)
+        >
+{
+    typedef BOOST_PP_CAT(map,i_) type;
+};
+
+#else // "brute force" implementation
+
+#   if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< typename Map>
+struct m_at<Map,BOOST_PP_DEC(i_)>
+{
+    typedef typename Map::BOOST_PP_CAT(item,BOOST_PP_DEC(i_)) type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item<i_,Key,T,Base>
+    : m_item_<Key,T,Base>
+{
+    typedef pair<Key,T> BOOST_PP_CAT(item,BOOST_PP_DEC(i_));
+};
+
+#   else
+
+template<>
+struct m_at_impl<BOOST_PP_DEC(i_)>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::BOOST_PP_CAT(item,BOOST_PP_DEC(i_)) type;
+    };
+};
+
+template<>
+struct m_item_impl<i_>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_<Key,T,Base>
+    {
+        typedef pair<Key,T> BOOST_PP_CAT(item,BOOST_PP_DEC(i_));
+    };
+};
+
+#   endif
+
+template<
+      BOOST_PP_ENUM_PARAMS(i_, typename P)
+    >
+struct BOOST_PP_CAT(map,i_)
+    : m_item<
+          i_
+        , typename BOOST_PP_CAT(P,BOOST_PP_DEC(i_))::first
+        , typename BOOST_PP_CAT(P,BOOST_PP_DEC(i_))::second
+        , AUX778076_MAP_TAIL(map,BOOST_PP_DEC(i_),P)
+        >
+{
+    typedef BOOST_PP_CAT(map,i_) type;
+};
+
+#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+#   undef AUX778076_MAP_TAIL
+
+#undef i_
+
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map10.hpp b/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map10.hpp
new file mode 100644
index 0000000..626c456
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map10.hpp
@@ -0,0 +1,350 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map/map10.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<>
+struct m_at_impl<0>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item0 type;
+    };
+};
+
+template<>
+struct m_item_impl<1>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item0;
+    };
+};
+
+template<
+      typename P0
+    >
+struct map1
+    : m_item<
+          1
+        , typename P0::first
+        , typename P0::second
+        , map0<  >
+        >
+{
+    typedef map1 type;
+};
+
+template<>
+struct m_at_impl<1>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item1 type;
+    };
+};
+
+template<>
+struct m_item_impl<2>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item1;
+    };
+};
+
+template<
+      typename P0, typename P1
+    >
+struct map2
+    : m_item<
+          2
+        , typename P1::first
+        , typename P1::second
+        , map1<P0>
+        >
+{
+    typedef map2 type;
+};
+
+template<>
+struct m_at_impl<2>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item2 type;
+    };
+};
+
+template<>
+struct m_item_impl<3>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item2;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2
+    >
+struct map3
+    : m_item<
+          3
+        , typename P2::first
+        , typename P2::second
+        , map2< P0,P1 >
+        >
+{
+    typedef map3 type;
+};
+
+template<>
+struct m_at_impl<3>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item3 type;
+    };
+};
+
+template<>
+struct m_item_impl<4>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item3;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3
+    >
+struct map4
+    : m_item<
+          4
+        , typename P3::first
+        , typename P3::second
+        , map3< P0,P1,P2 >
+        >
+{
+    typedef map4 type;
+};
+
+template<>
+struct m_at_impl<4>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item4 type;
+    };
+};
+
+template<>
+struct m_item_impl<5>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item4;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    >
+struct map5
+    : m_item<
+          5
+        , typename P4::first
+        , typename P4::second
+        , map4< P0,P1,P2,P3 >
+        >
+{
+    typedef map5 type;
+};
+
+template<>
+struct m_at_impl<5>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item5 type;
+    };
+};
+
+template<>
+struct m_item_impl<6>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item5;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5
+    >
+struct map6
+    : m_item<
+          6
+        , typename P5::first
+        , typename P5::second
+        , map5< P0,P1,P2,P3,P4 >
+        >
+{
+    typedef map6 type;
+};
+
+template<>
+struct m_at_impl<6>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item6 type;
+    };
+};
+
+template<>
+struct m_item_impl<7>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item6;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6
+    >
+struct map7
+    : m_item<
+          7
+        , typename P6::first
+        , typename P6::second
+        , map6< P0,P1,P2,P3,P4,P5 >
+        >
+{
+    typedef map7 type;
+};
+
+template<>
+struct m_at_impl<7>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item7 type;
+    };
+};
+
+template<>
+struct m_item_impl<8>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item7;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7
+    >
+struct map8
+    : m_item<
+          8
+        , typename P7::first
+        , typename P7::second
+        , map7< P0,P1,P2,P3,P4,P5,P6 >
+        >
+{
+    typedef map8 type;
+};
+
+template<>
+struct m_at_impl<8>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item8 type;
+    };
+};
+
+template<>
+struct m_item_impl<9>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item8;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8
+    >
+struct map9
+    : m_item<
+          9
+        , typename P8::first
+        , typename P8::second
+        , map8< P0,P1,P2,P3,P4,P5,P6,P7 >
+        >
+{
+    typedef map9 type;
+};
+
+template<>
+struct m_at_impl<9>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item9 type;
+    };
+};
+
+template<>
+struct m_item_impl<10>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item9;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    >
+struct map10
+    : m_item<
+          10
+        , typename P9::first
+        , typename P9::second
+        , map9< P0,P1,P2,P3,P4,P5,P6,P7,P8 >
+        >
+{
+    typedef map10 type;
+};
+
+}}
diff --git a/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map20.hpp b/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map20.hpp
new file mode 100644
index 0000000..ac9e379
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map20.hpp
@@ -0,0 +1,370 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map/map20.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<>
+struct m_at_impl<10>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item10 type;
+    };
+};
+
+template<>
+struct m_item_impl<11>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item10;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10
+    >
+struct map11
+    : m_item<
+          11
+        , typename P10::first
+        , typename P10::second
+        , map10< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9 >
+        >
+{
+    typedef map11 type;
+};
+
+template<>
+struct m_at_impl<11>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item11 type;
+    };
+};
+
+template<>
+struct m_item_impl<12>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item11;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11
+    >
+struct map12
+    : m_item<
+          12
+        , typename P11::first
+        , typename P11::second
+        , map11< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10 >
+        >
+{
+    typedef map12 type;
+};
+
+template<>
+struct m_at_impl<12>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item12 type;
+    };
+};
+
+template<>
+struct m_item_impl<13>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item12;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12
+    >
+struct map13
+    : m_item<
+          13
+        , typename P12::first
+        , typename P12::second
+        , map12< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11 >
+        >
+{
+    typedef map13 type;
+};
+
+template<>
+struct m_at_impl<13>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item13 type;
+    };
+};
+
+template<>
+struct m_item_impl<14>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item13;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13
+    >
+struct map14
+    : m_item<
+          14
+        , typename P13::first
+        , typename P13::second
+        , map13< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12 >
+        >
+{
+    typedef map14 type;
+};
+
+template<>
+struct m_at_impl<14>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item14 type;
+    };
+};
+
+template<>
+struct m_item_impl<15>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item14;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    >
+struct map15
+    : m_item<
+          15
+        , typename P14::first
+        , typename P14::second
+        , map14< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13 >
+        >
+{
+    typedef map15 type;
+};
+
+template<>
+struct m_at_impl<15>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item15 type;
+    };
+};
+
+template<>
+struct m_item_impl<16>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item15;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15
+    >
+struct map16
+    : m_item<
+          16
+        , typename P15::first
+        , typename P15::second
+        , map15< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14 >
+        >
+{
+    typedef map16 type;
+};
+
+template<>
+struct m_at_impl<16>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item16 type;
+    };
+};
+
+template<>
+struct m_item_impl<17>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item16;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16
+    >
+struct map17
+    : m_item<
+          17
+        , typename P16::first
+        , typename P16::second
+        , map16< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15 >
+        >
+{
+    typedef map17 type;
+};
+
+template<>
+struct m_at_impl<17>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item17 type;
+    };
+};
+
+template<>
+struct m_item_impl<18>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item17;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17
+    >
+struct map18
+    : m_item<
+          18
+        , typename P17::first
+        , typename P17::second
+        , map17< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16 >
+        >
+{
+    typedef map18 type;
+};
+
+template<>
+struct m_at_impl<18>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item18 type;
+    };
+};
+
+template<>
+struct m_item_impl<19>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item18;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18
+    >
+struct map19
+    : m_item<
+          19
+        , typename P18::first
+        , typename P18::second
+        , map18< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17 >
+        >
+{
+    typedef map19 type;
+};
+
+template<>
+struct m_at_impl<19>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item19 type;
+    };
+};
+
+template<>
+struct m_item_impl<20>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item19;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    >
+struct map20
+    : m_item<
+          20
+        , typename P19::first
+        , typename P19::second
+        , map19< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18 >
+        >
+{
+    typedef map20 type;
+};
+
+}}
diff --git a/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map30.hpp b/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map30.hpp
new file mode 100644
index 0000000..5aa118f
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map30.hpp
@@ -0,0 +1,390 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map/map30.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<>
+struct m_at_impl<20>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item20 type;
+    };
+};
+
+template<>
+struct m_item_impl<21>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item20;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20
+    >
+struct map21
+    : m_item<
+          21
+        , typename P20::first
+        , typename P20::second
+        , map20< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19 >
+        >
+{
+    typedef map21 type;
+};
+
+template<>
+struct m_at_impl<21>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item21 type;
+    };
+};
+
+template<>
+struct m_item_impl<22>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item21;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21
+    >
+struct map22
+    : m_item<
+          22
+        , typename P21::first
+        , typename P21::second
+        , map21< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20 >
+        >
+{
+    typedef map22 type;
+};
+
+template<>
+struct m_at_impl<22>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item22 type;
+    };
+};
+
+template<>
+struct m_item_impl<23>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item22;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22
+    >
+struct map23
+    : m_item<
+          23
+        , typename P22::first
+        , typename P22::second
+        , map22< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21 >
+        >
+{
+    typedef map23 type;
+};
+
+template<>
+struct m_at_impl<23>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item23 type;
+    };
+};
+
+template<>
+struct m_item_impl<24>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item23;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23
+    >
+struct map24
+    : m_item<
+          24
+        , typename P23::first
+        , typename P23::second
+        , map23< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22 >
+        >
+{
+    typedef map24 type;
+};
+
+template<>
+struct m_at_impl<24>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item24 type;
+    };
+};
+
+template<>
+struct m_item_impl<25>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item24;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    >
+struct map25
+    : m_item<
+          25
+        , typename P24::first
+        , typename P24::second
+        , map24< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23 >
+        >
+{
+    typedef map25 type;
+};
+
+template<>
+struct m_at_impl<25>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item25 type;
+    };
+};
+
+template<>
+struct m_item_impl<26>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item25;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25
+    >
+struct map26
+    : m_item<
+          26
+        , typename P25::first
+        , typename P25::second
+        , map25< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24 >
+        >
+{
+    typedef map26 type;
+};
+
+template<>
+struct m_at_impl<26>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item26 type;
+    };
+};
+
+template<>
+struct m_item_impl<27>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item26;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26
+    >
+struct map27
+    : m_item<
+          27
+        , typename P26::first
+        , typename P26::second
+        , map26< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25 >
+        >
+{
+    typedef map27 type;
+};
+
+template<>
+struct m_at_impl<27>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item27 type;
+    };
+};
+
+template<>
+struct m_item_impl<28>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item27;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27
+    >
+struct map28
+    : m_item<
+          28
+        , typename P27::first
+        , typename P27::second
+        , map27< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26 >
+        >
+{
+    typedef map28 type;
+};
+
+template<>
+struct m_at_impl<28>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item28 type;
+    };
+};
+
+template<>
+struct m_item_impl<29>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item28;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28
+    >
+struct map29
+    : m_item<
+          29
+        , typename P28::first
+        , typename P28::second
+        , map28< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27 >
+        >
+{
+    typedef map29 type;
+};
+
+template<>
+struct m_at_impl<29>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item29 type;
+    };
+};
+
+template<>
+struct m_item_impl<30>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item29;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    >
+struct map30
+    : m_item<
+          30
+        , typename P29::first
+        , typename P29::second
+        , map29< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28 >
+        >
+{
+    typedef map30 type;
+};
+
+}}
diff --git a/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map40.hpp b/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map40.hpp
new file mode 100644
index 0000000..dca60d5
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map40.hpp
@@ -0,0 +1,410 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map/map40.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<>
+struct m_at_impl<30>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item30 type;
+    };
+};
+
+template<>
+struct m_item_impl<31>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item30;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30
+    >
+struct map31
+    : m_item<
+          31
+        , typename P30::first
+        , typename P30::second
+        , map30< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29 >
+        >
+{
+    typedef map31 type;
+};
+
+template<>
+struct m_at_impl<31>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item31 type;
+    };
+};
+
+template<>
+struct m_item_impl<32>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item31;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31
+    >
+struct map32
+    : m_item<
+          32
+        , typename P31::first
+        , typename P31::second
+        , map31< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30 >
+        >
+{
+    typedef map32 type;
+};
+
+template<>
+struct m_at_impl<32>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item32 type;
+    };
+};
+
+template<>
+struct m_item_impl<33>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item32;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32
+    >
+struct map33
+    : m_item<
+          33
+        , typename P32::first
+        , typename P32::second
+        , map32< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31 >
+        >
+{
+    typedef map33 type;
+};
+
+template<>
+struct m_at_impl<33>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item33 type;
+    };
+};
+
+template<>
+struct m_item_impl<34>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item33;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33
+    >
+struct map34
+    : m_item<
+          34
+        , typename P33::first
+        , typename P33::second
+        , map33< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32 >
+        >
+{
+    typedef map34 type;
+};
+
+template<>
+struct m_at_impl<34>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item34 type;
+    };
+};
+
+template<>
+struct m_item_impl<35>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item34;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    >
+struct map35
+    : m_item<
+          35
+        , typename P34::first
+        , typename P34::second
+        , map34< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33 >
+        >
+{
+    typedef map35 type;
+};
+
+template<>
+struct m_at_impl<35>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item35 type;
+    };
+};
+
+template<>
+struct m_item_impl<36>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item35;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35
+    >
+struct map36
+    : m_item<
+          36
+        , typename P35::first
+        , typename P35::second
+        , map35< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34 >
+        >
+{
+    typedef map36 type;
+};
+
+template<>
+struct m_at_impl<36>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item36 type;
+    };
+};
+
+template<>
+struct m_item_impl<37>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item36;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36
+    >
+struct map37
+    : m_item<
+          37
+        , typename P36::first
+        , typename P36::second
+        , map36< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35 >
+        >
+{
+    typedef map37 type;
+};
+
+template<>
+struct m_at_impl<37>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item37 type;
+    };
+};
+
+template<>
+struct m_item_impl<38>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item37;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37
+    >
+struct map38
+    : m_item<
+          38
+        , typename P37::first
+        , typename P37::second
+        , map37< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36 >
+        >
+{
+    typedef map38 type;
+};
+
+template<>
+struct m_at_impl<38>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item38 type;
+    };
+};
+
+template<>
+struct m_item_impl<39>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item38;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38
+    >
+struct map39
+    : m_item<
+          39
+        , typename P38::first
+        , typename P38::second
+        , map38< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37 >
+        >
+{
+    typedef map39 type;
+};
+
+template<>
+struct m_at_impl<39>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item39 type;
+    };
+};
+
+template<>
+struct m_item_impl<40>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item39;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    >
+struct map40
+    : m_item<
+          40
+        , typename P39::first
+        , typename P39::second
+        , map39< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38 >
+        >
+{
+    typedef map40 type;
+};
+
+}}
diff --git a/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map50.hpp b/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map50.hpp
new file mode 100644
index 0000000..cd81908
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map50.hpp
@@ -0,0 +1,430 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map/map50.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<>
+struct m_at_impl<40>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item40 type;
+    };
+};
+
+template<>
+struct m_item_impl<41>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item40;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40
+    >
+struct map41
+    : m_item<
+          41
+        , typename P40::first
+        , typename P40::second
+        , map40< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39 >
+        >
+{
+    typedef map41 type;
+};
+
+template<>
+struct m_at_impl<41>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item41 type;
+    };
+};
+
+template<>
+struct m_item_impl<42>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item41;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41
+    >
+struct map42
+    : m_item<
+          42
+        , typename P41::first
+        , typename P41::second
+        , map41< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40 >
+        >
+{
+    typedef map42 type;
+};
+
+template<>
+struct m_at_impl<42>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item42 type;
+    };
+};
+
+template<>
+struct m_item_impl<43>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item42;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42
+    >
+struct map43
+    : m_item<
+          43
+        , typename P42::first
+        , typename P42::second
+        , map42< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41 >
+        >
+{
+    typedef map43 type;
+};
+
+template<>
+struct m_at_impl<43>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item43 type;
+    };
+};
+
+template<>
+struct m_item_impl<44>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item43;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43
+    >
+struct map44
+    : m_item<
+          44
+        , typename P43::first
+        , typename P43::second
+        , map43< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42 >
+        >
+{
+    typedef map44 type;
+};
+
+template<>
+struct m_at_impl<44>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item44 type;
+    };
+};
+
+template<>
+struct m_item_impl<45>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item44;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    >
+struct map45
+    : m_item<
+          45
+        , typename P44::first
+        , typename P44::second
+        , map44< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43 >
+        >
+{
+    typedef map45 type;
+};
+
+template<>
+struct m_at_impl<45>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item45 type;
+    };
+};
+
+template<>
+struct m_item_impl<46>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item45;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    , typename P45
+    >
+struct map46
+    : m_item<
+          46
+        , typename P45::first
+        , typename P45::second
+        , map45< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44 >
+        >
+{
+    typedef map46 type;
+};
+
+template<>
+struct m_at_impl<46>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item46 type;
+    };
+};
+
+template<>
+struct m_item_impl<47>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item46;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    , typename P45, typename P46
+    >
+struct map47
+    : m_item<
+          47
+        , typename P46::first
+        , typename P46::second
+        , map46< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45 >
+        >
+{
+    typedef map47 type;
+};
+
+template<>
+struct m_at_impl<47>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item47 type;
+    };
+};
+
+template<>
+struct m_item_impl<48>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item47;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    , typename P45, typename P46, typename P47
+    >
+struct map48
+    : m_item<
+          48
+        , typename P47::first
+        , typename P47::second
+        , map47< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46 >
+        >
+{
+    typedef map48 type;
+};
+
+template<>
+struct m_at_impl<48>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item48 type;
+    };
+};
+
+template<>
+struct m_item_impl<49>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item48;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    , typename P45, typename P46, typename P47, typename P48
+    >
+struct map49
+    : m_item<
+          49
+        , typename P48::first
+        , typename P48::second
+        , map48< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46,P47 >
+        >
+{
+    typedef map49 type;
+};
+
+template<>
+struct m_at_impl<49>
+{
+    template< typename Map > struct result_
+    {
+        typedef typename Map::item49 type;
+    };
+};
+
+template<>
+struct m_item_impl<50>
+{
+    template< typename Key, typename T, typename Base > struct result_
+        : m_item_< Key,T,Base >
+    {
+        typedef pair< Key,T > item49;
+    };
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    , typename P45, typename P46, typename P47, typename P48, typename P49
+    >
+struct map50
+    : m_item<
+          50
+        , typename P49::first
+        , typename P49::second
+        , map49< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46,P47,P48 >
+        >
+{
+    typedef map50 type;
+};
+
+}}
diff --git a/ext/boost/mpl/map/aux_/preprocessed/plain/map10.hpp b/ext/boost/mpl/map/aux_/preprocessed/plain/map10.hpp
new file mode 100644
index 0000000..ce0d2fb
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/preprocessed/plain/map10.hpp
@@ -0,0 +1,290 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map/map10.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template< typename Map>
+struct m_at< Map,0 >
+{
+    typedef typename Map::item0 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 1,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item0;
+};
+
+template<
+      typename P0
+    >
+struct map1
+    : m_item<
+          1
+        , typename P0::first
+        , typename P0::second
+        , map0<  >
+        >
+{
+    typedef map1 type;
+};
+
+template< typename Map>
+struct m_at< Map,1 >
+{
+    typedef typename Map::item1 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 2,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item1;
+};
+
+template<
+      typename P0, typename P1
+    >
+struct map2
+    : m_item<
+          2
+        , typename P1::first
+        , typename P1::second
+        , map1<P0>
+        >
+{
+    typedef map2 type;
+};
+
+template< typename Map>
+struct m_at< Map,2 >
+{
+    typedef typename Map::item2 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 3,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item2;
+};
+
+template<
+      typename P0, typename P1, typename P2
+    >
+struct map3
+    : m_item<
+          3
+        , typename P2::first
+        , typename P2::second
+        , map2< P0,P1 >
+        >
+{
+    typedef map3 type;
+};
+
+template< typename Map>
+struct m_at< Map,3 >
+{
+    typedef typename Map::item3 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 4,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item3;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3
+    >
+struct map4
+    : m_item<
+          4
+        , typename P3::first
+        , typename P3::second
+        , map3< P0,P1,P2 >
+        >
+{
+    typedef map4 type;
+};
+
+template< typename Map>
+struct m_at< Map,4 >
+{
+    typedef typename Map::item4 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 5,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item4;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    >
+struct map5
+    : m_item<
+          5
+        , typename P4::first
+        , typename P4::second
+        , map4< P0,P1,P2,P3 >
+        >
+{
+    typedef map5 type;
+};
+
+template< typename Map>
+struct m_at< Map,5 >
+{
+    typedef typename Map::item5 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 6,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item5;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5
+    >
+struct map6
+    : m_item<
+          6
+        , typename P5::first
+        , typename P5::second
+        , map5< P0,P1,P2,P3,P4 >
+        >
+{
+    typedef map6 type;
+};
+
+template< typename Map>
+struct m_at< Map,6 >
+{
+    typedef typename Map::item6 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 7,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item6;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6
+    >
+struct map7
+    : m_item<
+          7
+        , typename P6::first
+        , typename P6::second
+        , map6< P0,P1,P2,P3,P4,P5 >
+        >
+{
+    typedef map7 type;
+};
+
+template< typename Map>
+struct m_at< Map,7 >
+{
+    typedef typename Map::item7 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 8,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item7;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7
+    >
+struct map8
+    : m_item<
+          8
+        , typename P7::first
+        , typename P7::second
+        , map7< P0,P1,P2,P3,P4,P5,P6 >
+        >
+{
+    typedef map8 type;
+};
+
+template< typename Map>
+struct m_at< Map,8 >
+{
+    typedef typename Map::item8 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 9,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item8;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8
+    >
+struct map9
+    : m_item<
+          9
+        , typename P8::first
+        , typename P8::second
+        , map8< P0,P1,P2,P3,P4,P5,P6,P7 >
+        >
+{
+    typedef map9 type;
+};
+
+template< typename Map>
+struct m_at< Map,9 >
+{
+    typedef typename Map::item9 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 10,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item9;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    >
+struct map10
+    : m_item<
+          10
+        , typename P9::first
+        , typename P9::second
+        , map9< P0,P1,P2,P3,P4,P5,P6,P7,P8 >
+        >
+{
+    typedef map10 type;
+};
+
+}}
diff --git a/ext/boost/mpl/map/aux_/preprocessed/plain/map20.hpp b/ext/boost/mpl/map/aux_/preprocessed/plain/map20.hpp
new file mode 100644
index 0000000..e0a147c
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/preprocessed/plain/map20.hpp
@@ -0,0 +1,310 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map/map20.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template< typename Map>
+struct m_at< Map,10 >
+{
+    typedef typename Map::item10 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 11,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item10;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10
+    >
+struct map11
+    : m_item<
+          11
+        , typename P10::first
+        , typename P10::second
+        , map10< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9 >
+        >
+{
+    typedef map11 type;
+};
+
+template< typename Map>
+struct m_at< Map,11 >
+{
+    typedef typename Map::item11 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 12,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item11;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11
+    >
+struct map12
+    : m_item<
+          12
+        , typename P11::first
+        , typename P11::second
+        , map11< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10 >
+        >
+{
+    typedef map12 type;
+};
+
+template< typename Map>
+struct m_at< Map,12 >
+{
+    typedef typename Map::item12 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 13,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item12;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12
+    >
+struct map13
+    : m_item<
+          13
+        , typename P12::first
+        , typename P12::second
+        , map12< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11 >
+        >
+{
+    typedef map13 type;
+};
+
+template< typename Map>
+struct m_at< Map,13 >
+{
+    typedef typename Map::item13 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 14,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item13;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13
+    >
+struct map14
+    : m_item<
+          14
+        , typename P13::first
+        , typename P13::second
+        , map13< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12 >
+        >
+{
+    typedef map14 type;
+};
+
+template< typename Map>
+struct m_at< Map,14 >
+{
+    typedef typename Map::item14 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 15,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item14;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    >
+struct map15
+    : m_item<
+          15
+        , typename P14::first
+        , typename P14::second
+        , map14< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13 >
+        >
+{
+    typedef map15 type;
+};
+
+template< typename Map>
+struct m_at< Map,15 >
+{
+    typedef typename Map::item15 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 16,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item15;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15
+    >
+struct map16
+    : m_item<
+          16
+        , typename P15::first
+        , typename P15::second
+        , map15< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14 >
+        >
+{
+    typedef map16 type;
+};
+
+template< typename Map>
+struct m_at< Map,16 >
+{
+    typedef typename Map::item16 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 17,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item16;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16
+    >
+struct map17
+    : m_item<
+          17
+        , typename P16::first
+        , typename P16::second
+        , map16< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15 >
+        >
+{
+    typedef map17 type;
+};
+
+template< typename Map>
+struct m_at< Map,17 >
+{
+    typedef typename Map::item17 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 18,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item17;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17
+    >
+struct map18
+    : m_item<
+          18
+        , typename P17::first
+        , typename P17::second
+        , map17< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16 >
+        >
+{
+    typedef map18 type;
+};
+
+template< typename Map>
+struct m_at< Map,18 >
+{
+    typedef typename Map::item18 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 19,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item18;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18
+    >
+struct map19
+    : m_item<
+          19
+        , typename P18::first
+        , typename P18::second
+        , map18< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17 >
+        >
+{
+    typedef map19 type;
+};
+
+template< typename Map>
+struct m_at< Map,19 >
+{
+    typedef typename Map::item19 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 20,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item19;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    >
+struct map20
+    : m_item<
+          20
+        , typename P19::first
+        , typename P19::second
+        , map19< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18 >
+        >
+{
+    typedef map20 type;
+};
+
+}}
diff --git a/ext/boost/mpl/map/aux_/preprocessed/plain/map30.hpp b/ext/boost/mpl/map/aux_/preprocessed/plain/map30.hpp
new file mode 100644
index 0000000..d2f2e17
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/preprocessed/plain/map30.hpp
@@ -0,0 +1,330 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map/map30.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template< typename Map>
+struct m_at< Map,20 >
+{
+    typedef typename Map::item20 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 21,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item20;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20
+    >
+struct map21
+    : m_item<
+          21
+        , typename P20::first
+        , typename P20::second
+        , map20< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19 >
+        >
+{
+    typedef map21 type;
+};
+
+template< typename Map>
+struct m_at< Map,21 >
+{
+    typedef typename Map::item21 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 22,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item21;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21
+    >
+struct map22
+    : m_item<
+          22
+        , typename P21::first
+        , typename P21::second
+        , map21< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20 >
+        >
+{
+    typedef map22 type;
+};
+
+template< typename Map>
+struct m_at< Map,22 >
+{
+    typedef typename Map::item22 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 23,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item22;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22
+    >
+struct map23
+    : m_item<
+          23
+        , typename P22::first
+        , typename P22::second
+        , map22< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21 >
+        >
+{
+    typedef map23 type;
+};
+
+template< typename Map>
+struct m_at< Map,23 >
+{
+    typedef typename Map::item23 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 24,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item23;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23
+    >
+struct map24
+    : m_item<
+          24
+        , typename P23::first
+        , typename P23::second
+        , map23< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22 >
+        >
+{
+    typedef map24 type;
+};
+
+template< typename Map>
+struct m_at< Map,24 >
+{
+    typedef typename Map::item24 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 25,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item24;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    >
+struct map25
+    : m_item<
+          25
+        , typename P24::first
+        , typename P24::second
+        , map24< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23 >
+        >
+{
+    typedef map25 type;
+};
+
+template< typename Map>
+struct m_at< Map,25 >
+{
+    typedef typename Map::item25 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 26,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item25;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25
+    >
+struct map26
+    : m_item<
+          26
+        , typename P25::first
+        , typename P25::second
+        , map25< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24 >
+        >
+{
+    typedef map26 type;
+};
+
+template< typename Map>
+struct m_at< Map,26 >
+{
+    typedef typename Map::item26 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 27,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item26;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26
+    >
+struct map27
+    : m_item<
+          27
+        , typename P26::first
+        , typename P26::second
+        , map26< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25 >
+        >
+{
+    typedef map27 type;
+};
+
+template< typename Map>
+struct m_at< Map,27 >
+{
+    typedef typename Map::item27 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 28,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item27;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27
+    >
+struct map28
+    : m_item<
+          28
+        , typename P27::first
+        , typename P27::second
+        , map27< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26 >
+        >
+{
+    typedef map28 type;
+};
+
+template< typename Map>
+struct m_at< Map,28 >
+{
+    typedef typename Map::item28 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 29,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item28;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28
+    >
+struct map29
+    : m_item<
+          29
+        , typename P28::first
+        , typename P28::second
+        , map28< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27 >
+        >
+{
+    typedef map29 type;
+};
+
+template< typename Map>
+struct m_at< Map,29 >
+{
+    typedef typename Map::item29 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 30,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item29;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    >
+struct map30
+    : m_item<
+          30
+        , typename P29::first
+        , typename P29::second
+        , map29< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28 >
+        >
+{
+    typedef map30 type;
+};
+
+}}
diff --git a/ext/boost/mpl/map/aux_/preprocessed/plain/map40.hpp b/ext/boost/mpl/map/aux_/preprocessed/plain/map40.hpp
new file mode 100644
index 0000000..692f014
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/preprocessed/plain/map40.hpp
@@ -0,0 +1,350 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map/map40.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template< typename Map>
+struct m_at< Map,30 >
+{
+    typedef typename Map::item30 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 31,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item30;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30
+    >
+struct map31
+    : m_item<
+          31
+        , typename P30::first
+        , typename P30::second
+        , map30< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29 >
+        >
+{
+    typedef map31 type;
+};
+
+template< typename Map>
+struct m_at< Map,31 >
+{
+    typedef typename Map::item31 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 32,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item31;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31
+    >
+struct map32
+    : m_item<
+          32
+        , typename P31::first
+        , typename P31::second
+        , map31< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30 >
+        >
+{
+    typedef map32 type;
+};
+
+template< typename Map>
+struct m_at< Map,32 >
+{
+    typedef typename Map::item32 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 33,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item32;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32
+    >
+struct map33
+    : m_item<
+          33
+        , typename P32::first
+        , typename P32::second
+        , map32< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31 >
+        >
+{
+    typedef map33 type;
+};
+
+template< typename Map>
+struct m_at< Map,33 >
+{
+    typedef typename Map::item33 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 34,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item33;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33
+    >
+struct map34
+    : m_item<
+          34
+        , typename P33::first
+        , typename P33::second
+        , map33< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32 >
+        >
+{
+    typedef map34 type;
+};
+
+template< typename Map>
+struct m_at< Map,34 >
+{
+    typedef typename Map::item34 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 35,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item34;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    >
+struct map35
+    : m_item<
+          35
+        , typename P34::first
+        , typename P34::second
+        , map34< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33 >
+        >
+{
+    typedef map35 type;
+};
+
+template< typename Map>
+struct m_at< Map,35 >
+{
+    typedef typename Map::item35 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 36,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item35;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35
+    >
+struct map36
+    : m_item<
+          36
+        , typename P35::first
+        , typename P35::second
+        , map35< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34 >
+        >
+{
+    typedef map36 type;
+};
+
+template< typename Map>
+struct m_at< Map,36 >
+{
+    typedef typename Map::item36 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 37,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item36;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36
+    >
+struct map37
+    : m_item<
+          37
+        , typename P36::first
+        , typename P36::second
+        , map36< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35 >
+        >
+{
+    typedef map37 type;
+};
+
+template< typename Map>
+struct m_at< Map,37 >
+{
+    typedef typename Map::item37 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 38,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item37;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37
+    >
+struct map38
+    : m_item<
+          38
+        , typename P37::first
+        , typename P37::second
+        , map37< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36 >
+        >
+{
+    typedef map38 type;
+};
+
+template< typename Map>
+struct m_at< Map,38 >
+{
+    typedef typename Map::item38 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 39,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item38;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38
+    >
+struct map39
+    : m_item<
+          39
+        , typename P38::first
+        , typename P38::second
+        , map38< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37 >
+        >
+{
+    typedef map39 type;
+};
+
+template< typename Map>
+struct m_at< Map,39 >
+{
+    typedef typename Map::item39 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 40,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item39;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    >
+struct map40
+    : m_item<
+          40
+        , typename P39::first
+        , typename P39::second
+        , map39< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38 >
+        >
+{
+    typedef map40 type;
+};
+
+}}
diff --git a/ext/boost/mpl/map/aux_/preprocessed/plain/map50.hpp b/ext/boost/mpl/map/aux_/preprocessed/plain/map50.hpp
new file mode 100644
index 0000000..3bd2a25
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/preprocessed/plain/map50.hpp
@@ -0,0 +1,370 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map/map50.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template< typename Map>
+struct m_at< Map,40 >
+{
+    typedef typename Map::item40 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 41,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item40;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40
+    >
+struct map41
+    : m_item<
+          41
+        , typename P40::first
+        , typename P40::second
+        , map40< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39 >
+        >
+{
+    typedef map41 type;
+};
+
+template< typename Map>
+struct m_at< Map,41 >
+{
+    typedef typename Map::item41 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 42,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item41;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41
+    >
+struct map42
+    : m_item<
+          42
+        , typename P41::first
+        , typename P41::second
+        , map41< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40 >
+        >
+{
+    typedef map42 type;
+};
+
+template< typename Map>
+struct m_at< Map,42 >
+{
+    typedef typename Map::item42 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 43,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item42;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42
+    >
+struct map43
+    : m_item<
+          43
+        , typename P42::first
+        , typename P42::second
+        , map42< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41 >
+        >
+{
+    typedef map43 type;
+};
+
+template< typename Map>
+struct m_at< Map,43 >
+{
+    typedef typename Map::item43 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 44,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item43;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43
+    >
+struct map44
+    : m_item<
+          44
+        , typename P43::first
+        , typename P43::second
+        , map43< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42 >
+        >
+{
+    typedef map44 type;
+};
+
+template< typename Map>
+struct m_at< Map,44 >
+{
+    typedef typename Map::item44 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 45,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item44;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    >
+struct map45
+    : m_item<
+          45
+        , typename P44::first
+        , typename P44::second
+        , map44< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43 >
+        >
+{
+    typedef map45 type;
+};
+
+template< typename Map>
+struct m_at< Map,45 >
+{
+    typedef typename Map::item45 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 46,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item45;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    , typename P45
+    >
+struct map46
+    : m_item<
+          46
+        , typename P45::first
+        , typename P45::second
+        , map45< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44 >
+        >
+{
+    typedef map46 type;
+};
+
+template< typename Map>
+struct m_at< Map,46 >
+{
+    typedef typename Map::item46 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 47,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item46;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    , typename P45, typename P46
+    >
+struct map47
+    : m_item<
+          47
+        , typename P46::first
+        , typename P46::second
+        , map46< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45 >
+        >
+{
+    typedef map47 type;
+};
+
+template< typename Map>
+struct m_at< Map,47 >
+{
+    typedef typename Map::item47 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 48,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item47;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    , typename P45, typename P46, typename P47
+    >
+struct map48
+    : m_item<
+          48
+        , typename P47::first
+        , typename P47::second
+        , map47< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46 >
+        >
+{
+    typedef map48 type;
+};
+
+template< typename Map>
+struct m_at< Map,48 >
+{
+    typedef typename Map::item48 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 49,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item48;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    , typename P45, typename P46, typename P47, typename P48
+    >
+struct map49
+    : m_item<
+          49
+        , typename P48::first
+        , typename P48::second
+        , map48< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46,P47 >
+        >
+{
+    typedef map49 type;
+};
+
+template< typename Map>
+struct m_at< Map,49 >
+{
+    typedef typename Map::item49 type;
+};
+
+template< typename Key, typename T, typename Base >
+struct m_item< 50,Key,T,Base >
+    : m_item_< Key,T,Base >
+{
+    typedef pair< Key,T > item49;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    , typename P45, typename P46, typename P47, typename P48, typename P49
+    >
+struct map50
+    : m_item<
+          50
+        , typename P49::first
+        , typename P49::second
+        , map49< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46,P47,P48 >
+        >
+{
+    typedef map50 type;
+};
+
+}}
diff --git a/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map10.hpp b/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map10.hpp
new file mode 100644
index 0000000..e48e991
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map10.hpp
@@ -0,0 +1,150 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map/map10.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename P0
+    >
+struct map1
+    : m_item<
+          typename P0::first
+        , typename P0::second
+        , map0<  >
+        >
+{
+    typedef map1 type;
+};
+
+template<
+      typename P0, typename P1
+    >
+struct map2
+    : m_item<
+          typename P1::first
+        , typename P1::second
+        , map1<P0>
+        >
+{
+    typedef map2 type;
+};
+
+template<
+      typename P0, typename P1, typename P2
+    >
+struct map3
+    : m_item<
+          typename P2::first
+        , typename P2::second
+        , map2< P0,P1 >
+        >
+{
+    typedef map3 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3
+    >
+struct map4
+    : m_item<
+          typename P3::first
+        , typename P3::second
+        , map3< P0,P1,P2 >
+        >
+{
+    typedef map4 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    >
+struct map5
+    : m_item<
+          typename P4::first
+        , typename P4::second
+        , map4< P0,P1,P2,P3 >
+        >
+{
+    typedef map5 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5
+    >
+struct map6
+    : m_item<
+          typename P5::first
+        , typename P5::second
+        , map5< P0,P1,P2,P3,P4 >
+        >
+{
+    typedef map6 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6
+    >
+struct map7
+    : m_item<
+          typename P6::first
+        , typename P6::second
+        , map6< P0,P1,P2,P3,P4,P5 >
+        >
+{
+    typedef map7 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7
+    >
+struct map8
+    : m_item<
+          typename P7::first
+        , typename P7::second
+        , map7< P0,P1,P2,P3,P4,P5,P6 >
+        >
+{
+    typedef map8 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8
+    >
+struct map9
+    : m_item<
+          typename P8::first
+        , typename P8::second
+        , map8< P0,P1,P2,P3,P4,P5,P6,P7 >
+        >
+{
+    typedef map9 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    >
+struct map10
+    : m_item<
+          typename P9::first
+        , typename P9::second
+        , map9< P0,P1,P2,P3,P4,P5,P6,P7,P8 >
+        >
+{
+    typedef map10 type;
+};
+
+}}
diff --git a/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map20.hpp b/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map20.hpp
new file mode 100644
index 0000000..bb8d388
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map20.hpp
@@ -0,0 +1,170 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map/map20.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10
+    >
+struct map11
+    : m_item<
+          typename P10::first
+        , typename P10::second
+        , map10< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9 >
+        >
+{
+    typedef map11 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11
+    >
+struct map12
+    : m_item<
+          typename P11::first
+        , typename P11::second
+        , map11< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10 >
+        >
+{
+    typedef map12 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12
+    >
+struct map13
+    : m_item<
+          typename P12::first
+        , typename P12::second
+        , map12< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11 >
+        >
+{
+    typedef map13 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13
+    >
+struct map14
+    : m_item<
+          typename P13::first
+        , typename P13::second
+        , map13< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12 >
+        >
+{
+    typedef map14 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    >
+struct map15
+    : m_item<
+          typename P14::first
+        , typename P14::second
+        , map14< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13 >
+        >
+{
+    typedef map15 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15
+    >
+struct map16
+    : m_item<
+          typename P15::first
+        , typename P15::second
+        , map15< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14 >
+        >
+{
+    typedef map16 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16
+    >
+struct map17
+    : m_item<
+          typename P16::first
+        , typename P16::second
+        , map16< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15 >
+        >
+{
+    typedef map17 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17
+    >
+struct map18
+    : m_item<
+          typename P17::first
+        , typename P17::second
+        , map17< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16 >
+        >
+{
+    typedef map18 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18
+    >
+struct map19
+    : m_item<
+          typename P18::first
+        , typename P18::second
+        , map18< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17 >
+        >
+{
+    typedef map19 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    >
+struct map20
+    : m_item<
+          typename P19::first
+        , typename P19::second
+        , map19< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18 >
+        >
+{
+    typedef map20 type;
+};
+
+}}
diff --git a/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map30.hpp b/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map30.hpp
new file mode 100644
index 0000000..6a45c0d
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map30.hpp
@@ -0,0 +1,190 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map/map30.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20
+    >
+struct map21
+    : m_item<
+          typename P20::first
+        , typename P20::second
+        , map20< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19 >
+        >
+{
+    typedef map21 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21
+    >
+struct map22
+    : m_item<
+          typename P21::first
+        , typename P21::second
+        , map21< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20 >
+        >
+{
+    typedef map22 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22
+    >
+struct map23
+    : m_item<
+          typename P22::first
+        , typename P22::second
+        , map22< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21 >
+        >
+{
+    typedef map23 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23
+    >
+struct map24
+    : m_item<
+          typename P23::first
+        , typename P23::second
+        , map23< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22 >
+        >
+{
+    typedef map24 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    >
+struct map25
+    : m_item<
+          typename P24::first
+        , typename P24::second
+        , map24< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23 >
+        >
+{
+    typedef map25 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25
+    >
+struct map26
+    : m_item<
+          typename P25::first
+        , typename P25::second
+        , map25< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24 >
+        >
+{
+    typedef map26 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26
+    >
+struct map27
+    : m_item<
+          typename P26::first
+        , typename P26::second
+        , map26< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25 >
+        >
+{
+    typedef map27 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27
+    >
+struct map28
+    : m_item<
+          typename P27::first
+        , typename P27::second
+        , map27< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26 >
+        >
+{
+    typedef map28 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28
+    >
+struct map29
+    : m_item<
+          typename P28::first
+        , typename P28::second
+        , map28< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27 >
+        >
+{
+    typedef map29 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    >
+struct map30
+    : m_item<
+          typename P29::first
+        , typename P29::second
+        , map29< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28 >
+        >
+{
+    typedef map30 type;
+};
+
+}}
diff --git a/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map40.hpp b/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map40.hpp
new file mode 100644
index 0000000..6fc4f4b
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map40.hpp
@@ -0,0 +1,210 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map/map40.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30
+    >
+struct map31
+    : m_item<
+          typename P30::first
+        , typename P30::second
+        , map30< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29 >
+        >
+{
+    typedef map31 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31
+    >
+struct map32
+    : m_item<
+          typename P31::first
+        , typename P31::second
+        , map31< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30 >
+        >
+{
+    typedef map32 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32
+    >
+struct map33
+    : m_item<
+          typename P32::first
+        , typename P32::second
+        , map32< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31 >
+        >
+{
+    typedef map33 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33
+    >
+struct map34
+    : m_item<
+          typename P33::first
+        , typename P33::second
+        , map33< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32 >
+        >
+{
+    typedef map34 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    >
+struct map35
+    : m_item<
+          typename P34::first
+        , typename P34::second
+        , map34< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33 >
+        >
+{
+    typedef map35 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35
+    >
+struct map36
+    : m_item<
+          typename P35::first
+        , typename P35::second
+        , map35< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34 >
+        >
+{
+    typedef map36 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36
+    >
+struct map37
+    : m_item<
+          typename P36::first
+        , typename P36::second
+        , map36< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35 >
+        >
+{
+    typedef map37 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37
+    >
+struct map38
+    : m_item<
+          typename P37::first
+        , typename P37::second
+        , map37< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36 >
+        >
+{
+    typedef map38 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38
+    >
+struct map39
+    : m_item<
+          typename P38::first
+        , typename P38::second
+        , map38< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37 >
+        >
+{
+    typedef map39 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    >
+struct map40
+    : m_item<
+          typename P39::first
+        , typename P39::second
+        , map39< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38 >
+        >
+{
+    typedef map40 type;
+};
+
+}}
diff --git a/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map50.hpp b/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map50.hpp
new file mode 100644
index 0000000..7b3980d
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map50.hpp
@@ -0,0 +1,230 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/map/map50.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40
+    >
+struct map41
+    : m_item<
+          typename P40::first
+        , typename P40::second
+        , map40< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39 >
+        >
+{
+    typedef map41 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41
+    >
+struct map42
+    : m_item<
+          typename P41::first
+        , typename P41::second
+        , map41< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40 >
+        >
+{
+    typedef map42 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42
+    >
+struct map43
+    : m_item<
+          typename P42::first
+        , typename P42::second
+        , map42< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41 >
+        >
+{
+    typedef map43 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43
+    >
+struct map44
+    : m_item<
+          typename P43::first
+        , typename P43::second
+        , map43< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42 >
+        >
+{
+    typedef map44 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    >
+struct map45
+    : m_item<
+          typename P44::first
+        , typename P44::second
+        , map44< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43 >
+        >
+{
+    typedef map45 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    , typename P45
+    >
+struct map46
+    : m_item<
+          typename P45::first
+        , typename P45::second
+        , map45< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44 >
+        >
+{
+    typedef map46 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    , typename P45, typename P46
+    >
+struct map47
+    : m_item<
+          typename P46::first
+        , typename P46::second
+        , map46< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45 >
+        >
+{
+    typedef map47 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    , typename P45, typename P46, typename P47
+    >
+struct map48
+    : m_item<
+          typename P47::first
+        , typename P47::second
+        , map47< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46 >
+        >
+{
+    typedef map48 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    , typename P45, typename P46, typename P47, typename P48
+    >
+struct map49
+    : m_item<
+          typename P48::first
+        , typename P48::second
+        , map48< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46,P47 >
+        >
+{
+    typedef map49 type;
+};
+
+template<
+      typename P0, typename P1, typename P2, typename P3, typename P4
+    , typename P5, typename P6, typename P7, typename P8, typename P9
+    , typename P10, typename P11, typename P12, typename P13, typename P14
+    , typename P15, typename P16, typename P17, typename P18, typename P19
+    , typename P20, typename P21, typename P22, typename P23, typename P24
+    , typename P25, typename P26, typename P27, typename P28, typename P29
+    , typename P30, typename P31, typename P32, typename P33, typename P34
+    , typename P35, typename P36, typename P37, typename P38, typename P39
+    , typename P40, typename P41, typename P42, typename P43, typename P44
+    , typename P45, typename P46, typename P47, typename P48, typename P49
+    >
+struct map50
+    : m_item<
+          typename P49::first
+        , typename P49::second
+        , map49< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46,P47,P48 >
+        >
+{
+    typedef map50 type;
+};
+
+}}
diff --git a/ext/boost/mpl/map/aux_/size_impl.hpp b/ext/boost/mpl/map/aux_/size_impl.hpp
new file mode 100644
index 0000000..786e169
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/size_impl.hpp
@@ -0,0 +1,33 @@
+
+#ifndef BOOST_MPL_MAP_AUX_SIZE_IMPL_HPP_INCLUDED
+#define BOOST_MPL_MAP_AUX_SIZE_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: size_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/size_fwd.hpp>
+#include <boost/mpl/map/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct size_impl< aux::map_tag >
+{
+    template< typename Map > struct apply
+        : Map::size
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_MAP_AUX_SIZE_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/aux_/tag.hpp b/ext/boost/mpl/map/aux_/tag.hpp
new file mode 100644
index 0000000..05bb3ab
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/tag.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_MAP_AUX_TAG_HPP_INCLUDED
+#define BOOST_MPL_MAP_AUX_TAG_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl { namespace aux {
+
+struct map_tag;
+
+}}}
+
+#endif // BOOST_MPL_MAP_AUX_TAG_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/aux_/value_type_impl.hpp b/ext/boost/mpl/map/aux_/value_type_impl.hpp
new file mode 100644
index 0000000..edf3d89
--- /dev/null
+++ b/ext/boost/mpl/map/aux_/value_type_impl.hpp
@@ -0,0 +1,36 @@
+
+#ifndef BOOST_MPL_MAP_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED
+#define BOOST_MPL_MAP_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: value_type_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/value_type_fwd.hpp>
+#include <boost/mpl/pair.hpp>
+#include <boost/mpl/map/aux_/tag.hpp>
+
+namespace boost {
+namespace mpl {
+
+template<>
+struct value_type_impl< aux::map_tag >
+{
+    template< typename Map, typename T > struct apply
+        : second<T>
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_MAP_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/map0.hpp b/ext/boost/mpl/map/map0.hpp
new file mode 100644
index 0000000..c1082ff
--- /dev/null
+++ b/ext/boost/mpl/map/map0.hpp
@@ -0,0 +1,36 @@
+
+#ifndef BOOST_MPL_MAP_MAP0_HPP_INCLUDED
+#define BOOST_MPL_MAP_MAP0_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: map0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/map/aux_/contains_impl.hpp>
+#include <boost/mpl/map/aux_/at_impl.hpp>
+//#include <boost/mpl/map/aux_/O1_size.hpp>
+#include <boost/mpl/map/aux_/insert_impl.hpp>
+#include <boost/mpl/map/aux_/erase_impl.hpp>
+#include <boost/mpl/map/aux_/erase_key_impl.hpp>
+#include <boost/mpl/map/aux_/has_key_impl.hpp>
+#include <boost/mpl/map/aux_/key_type_impl.hpp>
+#include <boost/mpl/map/aux_/value_type_impl.hpp>
+#include <boost/mpl/map/aux_/clear_impl.hpp>
+#include <boost/mpl/map/aux_/size_impl.hpp>
+#include <boost/mpl/map/aux_/empty_impl.hpp>
+#include <boost/mpl/map/aux_/begin_end_impl.hpp>
+#include <boost/mpl/map/aux_/iterator.hpp>
+#include <boost/mpl/map/aux_/item.hpp>
+#include <boost/mpl/map/aux_/map0.hpp>
+#include <boost/mpl/map/aux_/tag.hpp>
+
+#endif // BOOST_MPL_MAP_MAP0_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/map10.hpp b/ext/boost/mpl/map/map10.hpp
new file mode 100644
index 0000000..efe0e6a
--- /dev/null
+++ b/ext/boost/mpl/map/map10.hpp
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_MAP_MAP10_HPP_INCLUDED
+#define BOOST_MPL_MAP_MAP10_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: map10.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/map/map0.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER map10.hpp
+#   include <boost/mpl/map/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(1, 10, <boost/mpl/map/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_MAP_MAP10_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/map20.hpp b/ext/boost/mpl/map/map20.hpp
new file mode 100644
index 0000000..2450083
--- /dev/null
+++ b/ext/boost/mpl/map/map20.hpp
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_MAP_MAP20_HPP_INCLUDED
+#define BOOST_MPL_MAP_MAP20_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: map20.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/map/map10.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER map20.hpp
+#   include <boost/mpl/map/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(11, 20, <boost/mpl/map/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_MAP_MAP20_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/map30.hpp b/ext/boost/mpl/map/map30.hpp
new file mode 100644
index 0000000..3480ebe
--- /dev/null
+++ b/ext/boost/mpl/map/map30.hpp
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_MAP_MAP30_HPP_INCLUDED
+#define BOOST_MPL_MAP_MAP30_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: map30.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/map/map20.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER map30.hpp
+#   include <boost/mpl/map/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(21, 30, <boost/mpl/map/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_MAP_MAP30_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/map40.hpp b/ext/boost/mpl/map/map40.hpp
new file mode 100644
index 0000000..ef928fa
--- /dev/null
+++ b/ext/boost/mpl/map/map40.hpp
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_MAP_MAP40_HPP_INCLUDED
+#define BOOST_MPL_MAP_MAP40_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: map40.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/map/map30.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER map40.hpp
+#   include <boost/mpl/map/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(31, 40, <boost/mpl/map/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_MAP_MAP40_HPP_INCLUDED
diff --git a/ext/boost/mpl/map/map50.hpp b/ext/boost/mpl/map/map50.hpp
new file mode 100644
index 0000000..8eae640
--- /dev/null
+++ b/ext/boost/mpl/map/map50.hpp
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_MAP_MAP50_HPP_INCLUDED
+#define BOOST_MPL_MAP_MAP50_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: map50.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/map/map40.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER map50.hpp
+#   include <boost/mpl/map/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(41, 50, <boost/mpl/map/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_MAP_MAP50_HPP_INCLUDED
diff --git a/ext/boost/mpl/math/fixed_c.hpp b/ext/boost/mpl/math/fixed_c.hpp
new file mode 100644
index 0000000..15b6b3d
--- /dev/null
+++ b/ext/boost/mpl/math/fixed_c.hpp
@@ -0,0 +1,36 @@
+
+#ifndef BOOST_MPL_FIXED_C_HPP_INCLUDED
+#define BOOST_MPL_FIXED_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: fixed_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/static_constant.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      long IntegerPart
+    , unsigned long FractionPart
+    >
+struct fixed_c
+{
+    BOOST_STATIC_CONSTANT(long, integer_part = IntegerPart);
+    BOOST_STATIC_CONSTANT(unsigned long, fraction_part = FractionPart);
+    typedef fixed_c<IntegerPart, FractionPart> type;
+    
+    fixed_c() {}
+};
+
+}}
+
+#endif // BOOST_MPL_FIXED_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/math/is_even.hpp b/ext/boost/mpl/math/is_even.hpp
new file mode 100644
index 0000000..eb8aada
--- /dev/null
+++ b/ext/boost/mpl/math/is_even.hpp
@@ -0,0 +1,54 @@
+
+#ifndef BOOST_MPL_MATH_IS_EVEN_HPP_INCLUDED
+#define BOOST_MPL_MATH_IS_EVEN_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: is_even.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/config/msvc.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+namespace boost { namespace mpl {
+
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+namespace aux
+{
+  template <class N>
+  struct is_even_base
+  {
+      enum { value = (N::value % 2) == 0 };
+      typedef bool_<value> type;
+  };
+}
+#endif 
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N)
+    >
+struct is_even
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+  : aux::is_even_base<N>::type
+#else
+  : bool_<((N::value % 2) == 0)>
+#endif 
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_even,(N))
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, is_even)
+
+}}
+
+#endif // BOOST_MPL_MATH_IS_EVEN_HPP_INCLUDED
diff --git a/ext/boost/mpl/math/rational_c.hpp b/ext/boost/mpl/math/rational_c.hpp
new file mode 100644
index 0000000..3742920
--- /dev/null
+++ b/ext/boost/mpl/math/rational_c.hpp
@@ -0,0 +1,37 @@
+
+#ifndef BOOST_MPL_RATIONAL_C_HPP_INCLUDED
+#define BOOST_MPL_RATIONAL_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: rational_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/static_constant.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename IntegerType
+    , IntegerType N
+    , IntegerType D = 1
+    >
+struct rational_c
+{
+    BOOST_STATIC_CONSTANT(IntegerType, numerator = N);
+    BOOST_STATIC_CONSTANT(IntegerType, denominator = D);
+    
+    typedef rational_c<IntegerType,N,D> type;
+    rational_c() {}
+};
+
+}}
+
+#endif // BOOST_MPL_RATIONAL_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/max.hpp b/ext/boost/mpl/max.hpp
new file mode 100644
index 0000000..dec4bc1
--- /dev/null
+++ b/ext/boost/mpl/max.hpp
@@ -0,0 +1,19 @@
+
+#ifndef BOOST_MPL_MAX_HPP_INCLUDED
+#define BOOST_MPL_MAX_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: max.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/min_max.hpp>
+
+#endif // BOOST_MPL_MAX_HPP_INCLUDED
diff --git a/ext/boost/mpl/max_element.hpp b/ext/boost/mpl/max_element.hpp
new file mode 100644
index 0000000..cbfb711
--- /dev/null
+++ b/ext/boost/mpl/max_element.hpp
@@ -0,0 +1,72 @@
+
+#ifndef BOOST_MPL_MAX_ELEMENT_HPP_INCLUDED
+#define BOOST_MPL_MAX_ELEMENT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: max_element.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/less.hpp>
+#include <boost/mpl/iter_fold.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/aux_/common_name_wknd.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_COMMON_NAME_WKND(max_element)
+
+namespace aux {
+
+template< typename Predicate >
+struct select_max
+{
+    template< typename OldIterator, typename Iterator >
+    struct apply
+    {
+        typedef typename apply2<
+              Predicate
+            , typename deref<OldIterator>::type
+            , typename deref<Iterator>::type
+            >::type condition_;
+
+        typedef typename if_<
+              condition_
+            , Iterator
+            , OldIterator
+            >::type type;
+    };
+};
+
+} // namespace aux 
+
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename Predicate = less<_,_>
+    >
+struct max_element
+    : iter_fold<
+          Sequence
+        , typename begin<Sequence>::type
+        , protect< aux::select_max<Predicate> >
+        >
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, max_element)
+
+}}
+
+#endif // BOOST_MPL_MAX_ELEMENT_HPP_INCLUDED
diff --git a/ext/boost/mpl/min.hpp b/ext/boost/mpl/min.hpp
new file mode 100644
index 0000000..b39461e
--- /dev/null
+++ b/ext/boost/mpl/min.hpp
@@ -0,0 +1,19 @@
+
+#ifndef BOOST_MPL_MIN_HPP_INCLUDED
+#define BOOST_MPL_MIN_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: min.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/min_max.hpp>
+
+#endif // BOOST_MPL_MIN_HPP_INCLUDED
diff --git a/ext/boost/mpl/min_element.hpp b/ext/boost/mpl/min_element.hpp
new file mode 100644
index 0000000..45c0681
--- /dev/null
+++ b/ext/boost/mpl/min_element.hpp
@@ -0,0 +1,40 @@
+
+#ifndef BOOST_MPL_MIN_ELEMENT_HPP_INCLUDED
+#define BOOST_MPL_MIN_ELEMENT_HPP_INCLUDED
+
+// Copyright David Abrahams 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: min_element.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/max_element.hpp>
+#include <boost/mpl/not.hpp>
+
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_COMMON_NAME_WKND(min_element)
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename Predicate = less<_,_>
+    >
+struct min_element
+    : max_element<
+          Sequence
+        , mpl::not_<Predicate>
+        >
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, min_element)
+
+}}
+
+#endif // BOOST_MPL_MIN_ELEMENT_HPP_INCLUDED
diff --git a/ext/boost/mpl/min_max.hpp b/ext/boost/mpl/min_max.hpp
new file mode 100644
index 0000000..97261bb
--- /dev/null
+++ b/ext/boost/mpl/min_max.hpp
@@ -0,0 +1,46 @@
+
+#ifndef BOOST_MPL_MIN_MAX_HPP_INCLUDED
+#define BOOST_MPL_MIN_MAX_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: min_max.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/less.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct min
+    : if_< less<N1,N2>,N1,N2 >
+{
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct max
+    : if_< less<N1,N2>,N2,N1 >
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, min)
+BOOST_MPL_AUX_NA_SPEC(2, max)
+
+}}
+
+#endif // BOOST_MPL_MIN_MAX_HPP_INCLUDED
diff --git a/ext/boost/mpl/minus.hpp b/ext/boost/mpl/minus.hpp
new file mode 100644
index 0000000..123b8af
--- /dev/null
+++ b/ext/boost/mpl/minus.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_MINUS_HPP_INCLUDED
+#define BOOST_MPL_MINUS_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: minus.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME minus
+#define AUX778076_OP_TOKEN -
+#include <boost/mpl/aux_/arithmetic_op.hpp>
+
+#endif // BOOST_MPL_MINUS_HPP_INCLUDED
diff --git a/ext/boost/mpl/modulus.hpp b/ext/boost/mpl/modulus.hpp
new file mode 100644
index 0000000..99338b1
--- /dev/null
+++ b/ext/boost/mpl/modulus.hpp
@@ -0,0 +1,22 @@
+
+#ifndef BOOST_MPL_MODULUS_HPP_INCLUDED
+#define BOOST_MPL_MODULUS_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: modulus.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME modulus
+#define AUX778076_OP_TOKEN %
+#define AUX778076_OP_ARITY 2
+#include <boost/mpl/aux_/arithmetic_op.hpp>
+
+#endif // BOOST_MPL_MODULUS_HPP_INCLUDED
diff --git a/ext/boost/mpl/multiplies.hpp b/ext/boost/mpl/multiplies.hpp
new file mode 100644
index 0000000..1c0ec9f
--- /dev/null
+++ b/ext/boost/mpl/multiplies.hpp
@@ -0,0 +1,53 @@
+
+#ifndef BOOST_MPL_MULTIPLIES_HPP_INCLUDED
+#define BOOST_MPL_MULTIPLIES_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: multiplies.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/times.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/preprocessor/default_params.hpp>
+#include <boost/mpl/aux_/preprocessor/params.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+// backward compatibility header, deprecated
+
+namespace boost { namespace mpl {
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#   define AUX778076_OP_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY
+#else
+#   define AUX778076_OP_ARITY 2
+#endif
+
+template<
+      BOOST_MPL_PP_DEFAULT_PARAMS(AUX778076_OP_ARITY, typename N, na)
+    >
+struct multiplies
+    : times< BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          AUX778076_OP_ARITY
+        , multiplies
+        , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) )
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(AUX778076_OP_ARITY, multiplies)
+
+#undef AUX778076_OP_ARITY
+
+}}
+
+#endif // BOOST_MPL_MULTIPLIES_HPP_INCLUDED
diff --git a/ext/boost/mpl/multiset/aux_/count_impl.hpp b/ext/boost/mpl/multiset/aux_/count_impl.hpp
new file mode 100644
index 0000000..e2fb634
--- /dev/null
+++ b/ext/boost/mpl/multiset/aux_/count_impl.hpp
@@ -0,0 +1,82 @@
+
+#ifndef BOOST_MPL_MULTISET_AUX_COUNT_IMPL_HPP_INCLUDED
+#define BOOST_MPL_MULTISET_AUX_COUNT_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: count_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/multiset/aux_/tag.hpp>
+#include <boost/mpl/count_fwd.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/aux_/type_wrapper.hpp>
+#include <boost/mpl/aux_/static_cast.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+#include <boost/mpl/aux_/config/msvc.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+#   include <boost/mpl/if.hpp>
+#   include <boost/type_traits/is_reference.hpp>
+#endif
+
+namespace boost { namespace mpl {
+
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+
+namespace aux {
+template< typename S, typename U >
+struct multiset_count_impl
+    : int_< sizeof(S::key_count(BOOST_MPL_AUX_STATIC_CAST(U*,0))) - 1 >
+{
+};
+
+template< typename S, typename U >
+struct multiset_count_ref_impl
+{
+    typedef U (* u_)();
+    typedef int_< sizeof(S::ref_key_count(BOOST_MPL_AUX_STATIC_CAST(u_,0))) - 1 > type_;
+    BOOST_STATIC_CONSTANT(int, value = type_::value);
+    typedef type_ type;
+};
+}
+
+template<>
+struct count_impl< aux::multiset_tag >
+{
+    template< typename Set, typename Key > struct apply
+        : if_< 
+              is_reference<Key>
+            , aux::multiset_count_ref_impl<Set,Key>
+            , aux::multiset_count_impl<Set,Key>
+            >::type
+    {
+    };
+};
+
+#else
+
+template<>
+struct count_impl< aux::multiset_tag >
+{
+    template< typename Set, typename Key > struct apply
+    {
+        enum { msvc71_wknd_ = sizeof(Set::key_count(BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<Key>*,0))) - 1 };
+        typedef int_< msvc71_wknd_ > type;
+        BOOST_STATIC_CONSTANT(int, value = msvc71_wknd_);
+    };
+};
+
+#endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+
+}}
+
+#endif // BOOST_MPL_MULTISET_AUX_COUNT_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/multiset/aux_/insert_impl.hpp b/ext/boost/mpl/multiset/aux_/insert_impl.hpp
new file mode 100644
index 0000000..8fd694e
--- /dev/null
+++ b/ext/boost/mpl/multiset/aux_/insert_impl.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_MULTISET_AUX_INSERT_IMPL_HPP_INCLUDED
+#define BOOST_MPL_MULTISET_AUX_INSERT_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: insert_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/multiset/aux_/item.hpp>
+#include <boost/mpl/multiset/aux_/tag.hpp>
+#include <boost/mpl/insert_fwd.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct insert_impl< aux::multiset_tag >
+{
+    template< typename Set, typename Key, typename unused_ > struct apply
+    {
+        typedef ms_item<Key,Set> type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_MULTISET_AUX_INSERT_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/multiset/aux_/item.hpp b/ext/boost/mpl/multiset/aux_/item.hpp
new file mode 100644
index 0000000..86499d1
--- /dev/null
+++ b/ext/boost/mpl/multiset/aux_/item.hpp
@@ -0,0 +1,114 @@
+
+#ifndef BOOST_MPL_MULTISET_AUX_ITEM_HPP_INCLUDED
+#define BOOST_MPL_MULTISET_AUX_ITEM_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/multiset/aux_/tag.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/aux_/type_wrapper.hpp>
+#include <boost/mpl/aux_/yes_no.hpp>
+#include <boost/mpl/aux_/value_wknd.hpp>
+#include <boost/mpl/aux_/static_cast.hpp>
+#include <boost/mpl/aux_/config/arrays.hpp>
+#include <boost/mpl/aux_/config/msvc.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+#   include <boost/mpl/eval_if.hpp>
+#   include <boost/mpl/next.hpp>
+#   include <boost/type_traits/is_same.hpp>
+#endif
+
+
+namespace boost { namespace mpl {
+
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+
+template< typename T, typename Base >
+struct ms_item
+{
+    typedef aux::multiset_tag tag;
+
+    template< typename U > struct prior_count
+    {
+        enum { msvc70_wknd_ = sizeof(Base::key_count(BOOST_MPL_AUX_STATIC_CAST(U*,0))) };
+        typedef int_< msvc70_wknd_ > count_;
+        typedef typename eval_if< is_same<T,U>, next<count_>, count_ >::type c_;
+#if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES)
+        typedef typename aux::weighted_tag<BOOST_MPL_AUX_MSVC_VALUE_WKND(c_)::value>::type type;
+#else
+        typedef char (&type)[BOOST_MPL_AUX_MSVC_VALUE_WKND(c_)::value];
+#endif
+    };
+
+    template< typename U > struct prior_ref_count
+    {
+        typedef U (* u_)();
+        enum { msvc70_wknd_ = sizeof(Base::ref_key_count(BOOST_MPL_AUX_STATIC_CAST(u_,0))) }; 
+        typedef int_< msvc70_wknd_ > count_;
+        typedef typename eval_if< is_same<T,U>, next<count_>, count_ >::type c_;
+#if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES)
+        typedef typename aux::weighted_tag<BOOST_MPL_AUX_MSVC_VALUE_WKND(c_)::value>::type type;
+#else
+        typedef char (&type)[BOOST_MPL_AUX_MSVC_VALUE_WKND(c_)::value];
+#endif
+    };
+
+    template< typename U >
+    static typename prior_count<U>::type key_count(U*);
+
+    template< typename U >
+    static typename prior_ref_count<U>::type ref_key_count(U (*)());
+};
+
+#else // BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+
+namespace aux {
+template< typename U, typename Base >
+struct prior_key_count
+{
+    enum { msvc71_wknd_ = sizeof(Base::key_count(BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<U>*,0))) }; 
+    typedef int_< msvc71_wknd_ > count_;
+#if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES)
+    typedef typename aux::weighted_tag< BOOST_MPL_AUX_VALUE_WKND(count_)::value >::type type;
+#else
+    typedef char (&type)[count_::value];
+#endif
+};
+}
+
+template< typename T, typename Base >
+struct ms_item
+{
+    typedef aux::multiset_tag tag;
+
+    enum { msvc71_wknd_ = sizeof(Base::key_count(BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<T>*,0))) + 1 };
+    typedef int_< msvc71_wknd_ > count_;
+#if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES)
+    static 
+    typename aux::weighted_tag< BOOST_MPL_AUX_VALUE_WKND(count_)::value >::type
+        key_count(aux::type_wrapper<T>*);
+#else
+    static char (& key_count(aux::type_wrapper<T>*) )[count_::value];
+#endif
+
+    template< typename U >
+    static typename aux::prior_key_count<U,Base>::type key_count(aux::type_wrapper<U>*);
+};
+
+#endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+
+}}
+
+#endif // BOOST_MPL_MULTISET_AUX_ITEM_HPP_INCLUDED
diff --git a/ext/boost/mpl/multiset/aux_/multiset0.hpp b/ext/boost/mpl/multiset/aux_/multiset0.hpp
new file mode 100644
index 0000000..e29799e
--- /dev/null
+++ b/ext/boost/mpl/multiset/aux_/multiset0.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_MULTISET_AUX_MULTISET0_HPP_INCLUDED
+#define BOOST_MPL_MULTISET_AUX_MULTISET0_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: multiset0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/multiset/aux_/tag.hpp>
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace mpl {
+
+template< int dummy_ = 0 >
+struct multiset0
+{
+    typedef aux::multiset_tag tag;
+
+    typedef int_<1> count_;
+    static char (& key_count(...) )[count_::value];
+    static char (& ref_key_count(...) )[count_::value];
+};
+
+}}
+
+#endif // BOOST_MPL_MULTISET_AUX_MULTISET0_HPP_INCLUDED
diff --git a/ext/boost/mpl/multiset/aux_/tag.hpp b/ext/boost/mpl/multiset/aux_/tag.hpp
new file mode 100644
index 0000000..d8fc9db
--- /dev/null
+++ b/ext/boost/mpl/multiset/aux_/tag.hpp
@@ -0,0 +1,23 @@
+
+#ifndef BOOST_MPL_MULTISET_AUX_TAG_HPP_INCLUDED
+#define BOOST_MPL_MULTISET_AUX_TAG_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl { namespace aux {
+
+struct multiset_tag;
+
+}}}
+
+#endif // BOOST_MPL_MULTISET_AUX_TAG_HPP_INCLUDED
diff --git a/ext/boost/mpl/multiset/multiset0.hpp b/ext/boost/mpl/multiset/multiset0.hpp
new file mode 100644
index 0000000..3b05121
--- /dev/null
+++ b/ext/boost/mpl/multiset/multiset0.hpp
@@ -0,0 +1,36 @@
+
+#ifndef BOOST_MPL_MULTISET_MULTISET0_HPP_INCLUDED
+#define BOOST_MPL_MULTISET_MULTISET0_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: multiset0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+//#include <boost/mpl/multiset/aux_/at.hpp>
+//#include <boost/mpl/multiset/aux_/front.hpp>
+//#include <boost/mpl/multiset/aux_/push_front.hpp>
+//#include <boost/mpl/multiset/aux_/pop_front.hpp>
+//#include <boost/mpl/multiset/aux_/back.hpp>
+//#include <boost/mpl/multiset/aux_/clear.hpp>
+//#include <boost/mpl/multiset/aux_/O1_size.hpp>
+//#include <boost/mpl/multiset/aux_/size.hpp>
+//#include <boost/mpl/multiset/aux_/empty.hpp>
+//#include <boost/mpl/multiset/aux_/empty.hpp>
+#include <boost/mpl/multiset/aux_/insert_impl.hpp>
+#include <boost/mpl/multiset/aux_/count_impl.hpp>
+//#include <boost/mpl/multiset/aux_/has_key_impl.hpp>
+//#include <boost/mpl/multiset/aux_/begin_end_impl.hpp>
+//#include <boost/mpl/multiset/aux_/iterator.hpp>
+#include <boost/mpl/multiset/aux_/item.hpp>
+#include <boost/mpl/multiset/aux_/multiset0.hpp>
+#include <boost/mpl/multiset/aux_/tag.hpp>
+
+#endif // BOOST_MPL_MULTISET_MULTISET0_HPP_INCLUDED
diff --git a/ext/boost/mpl/negate.hpp b/ext/boost/mpl/negate.hpp
new file mode 100644
index 0000000..3d51caf
--- /dev/null
+++ b/ext/boost/mpl/negate.hpp
@@ -0,0 +1,81 @@
+
+#ifndef BOOST_MPL_NEGATE_HPP_INCLUDED
+#define BOOST_MPL_NEGATE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: negate.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/integral_c.hpp>
+#include <boost/mpl/aux_/msvc_eti_base.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/config/eti.hpp>
+#include <boost/mpl/aux_/config/integral.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct negate_impl;
+
+template< typename T > struct negate_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N)
+    >
+struct negate
+#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
+    : negate_impl<
+          typename negate_tag<N>::type
+        >::template apply<N>::type
+#else
+    : aux::msvc_eti_base< typename apply_wrap1<
+          negate_impl< typename negate_tag<N>::type >
+        , N
+        >::type >::type
+#endif
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1, negate, (N))
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, negate)
+
+
+#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
+namespace aux {
+template< typename T, T n > struct negate_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value = -n);
+    typedef integral_c<T,value> type;
+};
+}
+#endif
+
+template<>
+struct negate_impl<integral_c_tag>
+{
+#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
+    template< typename N > struct apply
+        : aux::negate_wknd< typename N::value_type, N::value >
+#else
+    template< typename N > struct apply
+        : integral_c< typename N::value_type, (-N::value) >
+#endif    
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_NEGATE_HPP_INCLUDED
diff --git a/ext/boost/mpl/next.hpp b/ext/boost/mpl/next.hpp
index 3d4e711..fcfb01b 100644
--- a/ext/boost/mpl/next.hpp
+++ b/ext/boost/mpl/next.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: next.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/next_prior.hpp>
diff --git a/ext/boost/mpl/next_prior.hpp b/ext/boost/mpl/next_prior.hpp
index 4a9655b..c65d4c4 100644
--- a/ext/boost/mpl/next_prior.hpp
+++ b/ext/boost/mpl/next_prior.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: next_prior.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/common_name_wknd.hpp>
diff --git a/ext/boost/mpl/not.hpp b/ext/boost/mpl/not.hpp
index 2abc0db..9886d7d 100644
--- a/ext/boost/mpl/not.hpp
+++ b/ext/boost/mpl/not.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: not.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/bool.hpp>
diff --git a/ext/boost/mpl/not_equal_to.hpp b/ext/boost/mpl/not_equal_to.hpp
new file mode 100644
index 0000000..b6997df
--- /dev/null
+++ b/ext/boost/mpl/not_equal_to.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED
+#define BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: not_equal_to.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME not_equal_to
+#define AUX778076_OP_TOKEN !=
+#include <boost/mpl/aux_/comparison_op.hpp>
+
+#endif // BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED
diff --git a/ext/boost/mpl/numeric_cast.hpp b/ext/boost/mpl/numeric_cast.hpp
new file mode 100644
index 0000000..f890e44
--- /dev/null
+++ b/ext/boost/mpl/numeric_cast.hpp
@@ -0,0 +1,41 @@
+
+#ifndef BOOST_MPL_NUMERIC_CAST_HPP_INCLUDED
+#define BOOST_MPL_NUMERIC_CAST_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: numeric_cast.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/msvc.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+// agurt 21/sep/04: portability macro for the sake of MSVC 6.x-7.0;
+// resolves conflicts with 'boost::numeric_cast' function template.
+// use it in your own code _only_ if you care about compatibility with
+// these outdated compilers!
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570) )
+#   define BOOST_MPL_AUX_NUMERIC_CAST numeric_cast_
+#else
+#   define BOOST_MPL_AUX_NUMERIC_CAST numeric_cast
+#endif
+
+namespace boost { namespace mpl {
+
+// no default implementation; the definition is needed to make MSVC happy
+
+template< typename SourceTag, typename TargetTag > struct BOOST_MPL_AUX_NUMERIC_CAST
+{
+    template< typename N > struct apply;
+};
+
+}}
+
+#endif // BOOST_MPL_NUMERIC_CAST_HPP_INCLUDED
diff --git a/ext/boost/mpl/or.hpp b/ext/boost/mpl/or.hpp
index 4706449..16b42c1 100644
--- a/ext/boost/mpl/or.hpp
+++ b/ext/boost/mpl/or.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: or.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/config/use_preprocessed.hpp>
diff --git a/ext/boost/mpl/order.hpp b/ext/boost/mpl/order.hpp
new file mode 100644
index 0000000..e37da0e
--- /dev/null
+++ b/ext/boost/mpl/order.hpp
@@ -0,0 +1,41 @@
+
+#ifndef BOOST_MPL_ORDER_HPP_INCLUDED
+#define BOOST_MPL_ORDER_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: order.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/order_fwd.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/order_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(AssociativeSequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(Key)
+    >
+struct order
+    : order_impl< typename sequence_tag<AssociativeSequence>::type >
+        ::template apply<AssociativeSequence,Key>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,order,(AssociativeSequence,Key))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, order)
+
+}}
+
+#endif // BOOST_MPL_ORDER_HPP_INCLUDED
diff --git a/ext/boost/mpl/order_fwd.hpp b/ext/boost/mpl/order_fwd.hpp
new file mode 100644
index 0000000..bce09fa
--- /dev/null
+++ b/ext/boost/mpl/order_fwd.hpp
@@ -0,0 +1,25 @@
+
+#ifndef BOOST_MPL_ORDER_FWD_HPP_INCLUDED
+#define BOOST_MPL_ORDER_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: order_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct order_impl;
+template< typename AssociativeSequence, typename Key > struct order;
+
+}}
+
+#endif // BOOST_MPL_ORDER_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/pair.hpp b/ext/boost/mpl/pair.hpp
new file mode 100644
index 0000000..9336ca1
--- /dev/null
+++ b/ext/boost/mpl/pair.hpp
@@ -0,0 +1,70 @@
+
+#ifndef BOOST_MPL_PAIR_HPP_INCLUDED
+#define BOOST_MPL_PAIR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: pair.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/msvc_eti_base.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/config/eti.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T1)
+    , typename BOOST_MPL_AUX_NA_PARAM(T2)
+    >
+struct pair
+{
+    typedef pair type;
+    typedef T1 first;
+    typedef T2 second;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,pair,(T1,T2))
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(P)
+    >
+struct first
+{
+#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG)
+    typedef typename P::first type;
+#else
+    typedef typename aux::msvc_eti_base<P>::first type;
+#endif
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,first,(P))
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(P)
+    >
+struct second
+{
+#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG)
+    typedef typename P::second type;
+#else
+    typedef typename aux::msvc_eti_base<P>::second type;
+#endif
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,second,(P))
+};
+
+
+BOOST_MPL_AUX_NA_SPEC_NO_ETI(2, pair)
+BOOST_MPL_AUX_NA_SPEC(1, first)
+BOOST_MPL_AUX_NA_SPEC(1, second)
+
+}}
+
+#endif // BOOST_MPL_PAIR_HPP_INCLUDED
diff --git a/ext/boost/mpl/pair_view.hpp b/ext/boost/mpl/pair_view.hpp
new file mode 100644
index 0000000..06f6bac
--- /dev/null
+++ b/ext/boost/mpl/pair_view.hpp
@@ -0,0 +1,169 @@
+
+#ifndef BOOST_MPL_PAIR_VIEW_HPP_INCLUDED
+#define BOOST_MPL_PAIR_VIEW_HPP_INCLUDED
+
+// Copyright David Abrahams 2003-2004
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: pair_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/iterator_category.hpp>
+#include <boost/mpl/advance.hpp>
+#include <boost/mpl/distance.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/min_max.hpp>
+#include <boost/mpl/pair.hpp>
+#include <boost/mpl/iterator_tags.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+struct pair_iter_tag;
+
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< typename Iter1, typename Iter2, typename Category >
+struct pair_iter;
+
+template< typename Category > struct prior_pair_iter
+{
+    template< typename Iter1, typename Iter2 > struct apply
+    {
+        typedef typename mpl::prior<Iter1>::type i1_;
+        typedef typename mpl::prior<Iter2>::type i2_;
+        typedef pair_iter<i1_,i2_,Category> type;
+    };
+};
+
+template<> struct prior_pair_iter<forward_iterator_tag>
+{
+    template< typename Iter1, typename Iter2 > struct apply
+    {
+        typedef pair_iter<Iter1,Iter2,forward_iterator_tag> type;
+    };
+};
+
+#endif
+}
+
+template< 
+      typename Iter1
+    , typename Iter2
+    , typename Category
+    >
+struct pair_iter
+{
+    typedef aux::pair_iter_tag tag;
+    typedef Category category;
+    typedef Iter1 first;
+    typedef Iter2 second;
+    
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+    typedef pair< 
+          typename deref<Iter1>::type
+        , typename deref<Iter2>::type
+        > type;
+
+    typedef typename mpl::next<Iter1>::type i1_;
+    typedef typename mpl::next<Iter2>::type i2_;
+    typedef pair_iter<i1_,i2_,Category> next;
+    
+    typedef apply_wrap2< aux::prior_pair_iter<Category>,Iter1,Iter2 >::type prior;
+#endif
+};
+
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< typename Iter1, typename Iter2, typename C >
+struct deref< pair_iter<Iter1,Iter2,C> >
+{
+    typedef pair< 
+          typename deref<Iter1>::type
+        , typename deref<Iter2>::type
+        > type;
+};
+
+template< typename Iter1, typename Iter2, typename C >
+struct next< pair_iter<Iter1,Iter2,C> >
+{
+    typedef typename mpl::next<Iter1>::type i1_;
+    typedef typename mpl::next<Iter2>::type i2_;
+    typedef pair_iter<i1_,i2_,C> type;
+};
+
+template< typename Iter1, typename Iter2, typename C >
+struct prior< pair_iter<Iter1,Iter2,C> >
+{
+    typedef typename mpl::prior<Iter1>::type i1_;
+    typedef typename mpl::prior<Iter2>::type i2_;
+    typedef pair_iter<i1_,i2_,C> type;
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+
+template<> struct advance_impl<aux::pair_iter_tag>
+{
+    template< typename Iter, typename D > struct apply
+    {
+        typedef typename mpl::advance< typename Iter::first,D >::type i1_;
+        typedef typename mpl::advance< typename Iter::second,D >::type i2_;
+        typedef pair_iter<i1_,i2_,typename Iter::category> type;
+    };
+};
+
+template<> struct distance_impl<aux::pair_iter_tag>
+{
+    template< typename Iter1, typename Iter2 > struct apply
+    {
+        // agurt, 10/nov/04: MSVC 6.5 ICE-s on forwarding
+        typedef typename mpl::distance<
+              typename first<Iter1>::type
+            , typename first<Iter2>::type
+            >::type type;
+    };
+};
+
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence1)
+    , typename BOOST_MPL_AUX_NA_PARAM(Sequence2)
+    >
+struct pair_view
+{
+    typedef nested_begin_end_tag tag;
+
+    typedef typename begin<Sequence1>::type iter1_;
+    typedef typename begin<Sequence2>::type iter2_;
+    typedef typename min<
+          typename iterator_category<iter1_>::type
+        , typename iterator_category<iter2_>::type
+        >::type category_;
+    
+    typedef pair_iter<iter1_,iter2_,category_> begin;
+    
+    typedef pair_iter<
+          typename end<Sequence1>::type
+        , typename end<Sequence2>::type
+        , category_
+        > end;
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, pair_view)
+
+}}
+
+#endif // BOOST_MPL_PAIR_VIEW_HPP_INCLUDED
diff --git a/ext/boost/mpl/partition.hpp b/ext/boost/mpl/partition.hpp
new file mode 100644
index 0000000..888653e
--- /dev/null
+++ b/ext/boost/mpl/partition.hpp
@@ -0,0 +1,53 @@
+
+#ifndef BOOST_MPL_PARTITION_HPP_INCLUDED
+#define BOOST_MPL_PARTITION_HPP_INCLUDED
+
+// Copyright Eric Friedman 2002-2003
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: partition.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/stable_partition.hpp>
+#include <boost/mpl/aux_/inserter_algorithm.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+ 
+template <
+      typename Sequence
+    , typename Pred
+    , typename In1
+    , typename In2
+    >
+struct partition_impl
+    : stable_partition_impl<Sequence,Pred,In1,In2>
+{
+};
+
+template <
+      typename Sequence
+    , typename Pred
+    , typename In1
+    , typename In2
+    >
+struct reverse_partition_impl
+    : reverse_stable_partition_impl<Sequence,Pred,In1,In2>
+{
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, partition)
+
+}}
+
+#endif // BOOST_MPL_PARTITION_HPP_INCLUDED
diff --git a/ext/boost/mpl/placeholders.hpp b/ext/boost/mpl/placeholders.hpp
index c1a38d9..891a818 100644
--- a/ext/boost/mpl/placeholders.hpp
+++ b/ext/boost/mpl/placeholders.hpp
@@ -16,7 +16,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: placeholders.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 
diff --git a/ext/boost/mpl/plus.hpp b/ext/boost/mpl/plus.hpp
new file mode 100644
index 0000000..9f68c49
--- /dev/null
+++ b/ext/boost/mpl/plus.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_PLUS_HPP_INCLUDED
+#define BOOST_MPL_PLUS_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: plus.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME plus
+#define AUX778076_OP_TOKEN +
+#include <boost/mpl/aux_/arithmetic_op.hpp>
+
+#endif // BOOST_MPL_PLUS_HPP_INCLUDED
diff --git a/ext/boost/mpl/pop_back.hpp b/ext/boost/mpl/pop_back.hpp
new file mode 100644
index 0000000..e4affca
--- /dev/null
+++ b/ext/boost/mpl/pop_back.hpp
@@ -0,0 +1,39 @@
+
+#ifndef BOOST_MPL_POP_BACK_HPP_INCLUDED
+#define BOOST_MPL_POP_BACK_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: pop_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/pop_back_fwd.hpp>
+#include <boost/mpl/aux_/pop_back_impl.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    >
+struct pop_back
+    : pop_back_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,pop_back,(Sequence))
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, pop_back)
+
+}}
+
+#endif // BOOST_MPL_POP_BACK_HPP_INCLUDED
diff --git a/ext/boost/mpl/pop_back_fwd.hpp b/ext/boost/mpl/pop_back_fwd.hpp
new file mode 100644
index 0000000..c8209a7
--- /dev/null
+++ b/ext/boost/mpl/pop_back_fwd.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_POP_BACK_FWD_HPP_INCLUDED
+#define BOOST_MPL_POP_BACK_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: pop_back_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct pop_back_impl;
+template< typename Sequence > struct pop_back;
+
+}}
+
+#endif // BOOST_MPL_POP_BACK_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/pop_front.hpp b/ext/boost/mpl/pop_front.hpp
new file mode 100644
index 0000000..dead80f
--- /dev/null
+++ b/ext/boost/mpl/pop_front.hpp
@@ -0,0 +1,39 @@
+
+#ifndef BOOST_MPL_POP_FRONT_HPP_INCLUDED
+#define BOOST_MPL_POP_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: pop_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/pop_front_fwd.hpp>
+#include <boost/mpl/aux_/pop_front_impl.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    >
+struct pop_front
+    : pop_front_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,pop_front,(Sequence))
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, pop_front)
+
+}}
+
+#endif // BOOST_MPL_POP_FRONT_HPP_INCLUDED
diff --git a/ext/boost/mpl/pop_front_fwd.hpp b/ext/boost/mpl/pop_front_fwd.hpp
new file mode 100644
index 0000000..eb78347
--- /dev/null
+++ b/ext/boost/mpl/pop_front_fwd.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_POP_FRONT_FWD_HPP_INCLUDED
+#define BOOST_MPL_POP_FRONT_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: pop_front_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct pop_front_impl;
+template< typename Sequence > struct pop_front;
+
+}}
+
+#endif // BOOST_MPL_POP_FRONT_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/print.hpp b/ext/boost/mpl/print.hpp
new file mode 100644
index 0000000..c726fac
--- /dev/null
+++ b/ext/boost/mpl/print.hpp
@@ -0,0 +1,74 @@
+
+#ifndef BOOST_MPL_PRINT_HPP_INCLUDED
+#define BOOST_MPL_PRINT_HPP_INCLUDED
+
+// Copyright David Abrahams 2003
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: print.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/msvc.hpp>
+#include <boost/mpl/identity.hpp>
+
+namespace boost { namespace mpl {
+  
+namespace aux {
+#if defined(BOOST_MSVC)
+# pragma warning(push, 3)
+// we only want one warning from MSVC, so turn off the other one
+# pragma warning(disable: 4307)
+#elif defined(__MWERKS__)
+# pragma warn_hidevirtual on
+   struct print_base { virtual void f() {} };
+#endif
+
+#if defined(__EDG_VERSION__)
+  template <class T>
+  struct dependent_unsigned
+  {
+      static const unsigned value = 1;
+  };
+#endif
+} // namespace aux 
+
+
+template <class T>
+struct print
+    : mpl::identity<T>
+#if defined(__MWERKS__)
+    , aux::print_base
+#endif 
+{
+#if defined(BOOST_MSVC)
+    enum { n = sizeof(T) + -1 };
+#elif defined(__MWERKS__)
+    void f(int);
+#else 
+    enum {
+        n =
+# if defined(__EDG_VERSION__)
+           aux::dependent_unsigned<T>::value > -1
+# else 
+           sizeof(T) > -1
+# endif 
+        };
+#endif 
+};
+
+#if defined(BOOST_MSVC)
+# pragma warning(pop)
+#elif defined(__MWERKS__)
+# pragma warn_hidevirtual reset
+#endif
+
+}}
+
+#endif // BOOST_MPL_PRINT_HPP_INCLUDED
diff --git a/ext/boost/mpl/prior.hpp b/ext/boost/mpl/prior.hpp
new file mode 100644
index 0000000..b8f0dff
--- /dev/null
+++ b/ext/boost/mpl/prior.hpp
@@ -0,0 +1,19 @@
+
+#ifndef BOOST_MPL_PRIOR_HPP_INCLUDED
+#define BOOST_MPL_PRIOR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: prior.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/next_prior.hpp>
+
+#endif // BOOST_MPL_PRIOR_HPP_INCLUDED
diff --git a/ext/boost/mpl/protect.hpp b/ext/boost/mpl/protect.hpp
index 4fad835..e3daa4f 100644
--- a/ext/boost/mpl/protect.hpp
+++ b/ext/boost/mpl/protect.hpp
@@ -12,7 +12,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: protect.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/arity.hpp>
diff --git a/ext/boost/mpl/push_back.hpp b/ext/boost/mpl/push_back.hpp
new file mode 100644
index 0000000..2e8ad06
--- /dev/null
+++ b/ext/boost/mpl/push_back.hpp
@@ -0,0 +1,53 @@
+
+#ifndef BOOST_MPL_PUSH_BACK_HPP_INCLUDED
+#define BOOST_MPL_PUSH_BACK_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: push_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/push_back_fwd.hpp>
+#include <boost/mpl/aux_/push_back_impl.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct push_back
+    : push_back_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence,T >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,push_back,(Sequence,T))
+};
+
+
+template< 
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    >
+struct has_push_back
+    : has_push_back_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,has_push_back,(Sequence))
+};
+
+
+BOOST_MPL_AUX_NA_SPEC(2, push_back)
+BOOST_MPL_AUX_NA_SPEC(1, has_push_back)
+
+}}
+
+#endif // BOOST_MPL_PUSH_BACK_HPP_INCLUDED
diff --git a/ext/boost/mpl/push_back_fwd.hpp b/ext/boost/mpl/push_back_fwd.hpp
new file mode 100644
index 0000000..ef04ff5
--- /dev/null
+++ b/ext/boost/mpl/push_back_fwd.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_PUSH_BACK_FWD_HPP_INCLUDED
+#define BOOST_MPL_PUSH_BACK_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: push_back_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct push_back_impl;
+template< typename Sequence, typename T > struct push_back;
+
+}}
+
+#endif // BOOST_MPL_PUSH_BACK_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/push_front.hpp b/ext/boost/mpl/push_front.hpp
new file mode 100644
index 0000000..ca943bb
--- /dev/null
+++ b/ext/boost/mpl/push_front.hpp
@@ -0,0 +1,52 @@
+
+#ifndef BOOST_MPL_PUSH_FRONT_HPP_INCLUDED
+#define BOOST_MPL_PUSH_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/push_front_fwd.hpp>
+#include <boost/mpl/aux_/push_front_impl.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct push_front
+    : push_front_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence,T >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,push_front,(Sequence,T))
+};
+
+
+template< 
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    >
+struct has_push_front
+    : has_push_front_impl< typename sequence_tag<Sequence>::type >
+        ::template apply< Sequence >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,has_push_front,(Sequence))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, push_front)
+BOOST_MPL_AUX_NA_SPEC(1, has_push_front)
+
+}}
+
+#endif // BOOST_MPL_PUSH_FRONT_HPP_INCLUDED
diff --git a/ext/boost/mpl/push_front_fwd.hpp b/ext/boost/mpl/push_front_fwd.hpp
new file mode 100644
index 0000000..fa3667c
--- /dev/null
+++ b/ext/boost/mpl/push_front_fwd.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_PUSH_FRONT_FWD_HPP_INCLUDED
+#define BOOST_MPL_PUSH_FRONT_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: push_front_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct push_front_impl;
+template< typename Sequence, typename T > struct push_front;
+
+}}
+
+#endif // BOOST_MPL_PUSH_FRONT_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/quote.hpp b/ext/boost/mpl/quote.hpp
index 52f67bf..53b5712 100644
--- a/ext/boost/mpl/quote.hpp
+++ b/ext/boost/mpl/quote.hpp
@@ -15,7 +15,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: quote.hpp 49272 2008-10-11 06:50:46Z agurtovoy $
-// $Date: 2008-10-11 02:50:46 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:50:46 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49272 $
 
 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
diff --git a/ext/boost/mpl/range_c.hpp b/ext/boost/mpl/range_c.hpp
new file mode 100644
index 0000000..7072ad3
--- /dev/null
+++ b/ext/boost/mpl/range_c.hpp
@@ -0,0 +1,48 @@
+
+#ifndef BOOST_MPL_RANGE_C_HPP_INCLUDED
+#define BOOST_MPL_RANGE_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: range_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/integral_c.hpp>
+#include <boost/mpl/aux_/range_c/front.hpp>
+#include <boost/mpl/aux_/range_c/back.hpp>
+#include <boost/mpl/aux_/range_c/size.hpp>
+#include <boost/mpl/aux_/range_c/O1_size.hpp>
+#include <boost/mpl/aux_/range_c/empty.hpp>
+#include <boost/mpl/aux_/range_c/iterator.hpp>
+#include <boost/mpl/aux_/range_c/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T Start
+    , T Finish
+    >
+struct range_c
+{
+    typedef aux::half_open_range_tag tag;
+    typedef T value_type;
+    typedef range_c type;
+
+    typedef integral_c<T,Start> start;
+    typedef integral_c<T,Finish> finish;
+
+    typedef r_iter<start> begin;
+    typedef r_iter<finish> end;
+};
+
+}}
+
+#endif // BOOST_MPL_RANGE_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/remove.hpp b/ext/boost/mpl/remove.hpp
new file mode 100644
index 0000000..7ed621f
--- /dev/null
+++ b/ext/boost/mpl/remove.hpp
@@ -0,0 +1,52 @@
+
+#ifndef BOOST_MPL_REMOVE_HPP_INCLUDED
+#define BOOST_MPL_REMOVE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: remove.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/remove_if.hpp>
+#include <boost/mpl/same_as.hpp>
+#include <boost/mpl/aux_/inserter_algorithm.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename Sequence
+    , typename T
+    , typename Inserter 
+    >
+struct remove_impl
+    : remove_if_impl< Sequence, same_as<T>, Inserter >
+{
+};
+
+template<
+      typename Sequence
+    , typename T
+    , typename Inserter 
+    >
+struct reverse_remove_impl
+    : reverse_remove_if_impl< Sequence, same_as<T>, Inserter >
+{
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, remove)
+
+}}
+
+#endif // BOOST_MPL_REMOVE_HPP_INCLUDED
diff --git a/ext/boost/mpl/remove_if.hpp b/ext/boost/mpl/remove_if.hpp
new file mode 100644
index 0000000..1275bd4
--- /dev/null
+++ b/ext/boost/mpl/remove_if.hpp
@@ -0,0 +1,83 @@
+
+#ifndef BOOST_MPL_REMOVE_IF_HPP_INCLUDED
+#define BOOST_MPL_REMOVE_IF_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: remove_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/reverse_fold.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/protect.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/aux_/inserter_algorithm.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< typename Pred, typename InsertOp > struct remove_if_helper
+{
+    template< typename Sequence, typename U > struct apply
+    {
+        typedef typename eval_if<
+              typename apply1<Pred,U>::type
+            , identity<Sequence>
+            , apply2<InsertOp,Sequence,U>
+            >::type type;
+    };
+};
+
+template<
+      typename Sequence
+    , typename Predicate
+    , typename Inserter
+    >
+struct remove_if_impl
+    : fold<
+          Sequence
+        , typename Inserter::state
+        , protect< aux::remove_if_helper<
+              typename lambda<Predicate>::type
+            , typename Inserter::operation
+            > >
+        >
+{
+};
+
+template<
+      typename Sequence
+    , typename Predicate
+    , typename Inserter
+    >
+struct reverse_remove_if_impl
+    : reverse_fold<
+          Sequence
+        , typename Inserter::state
+        , protect< aux::remove_if_helper<
+              typename lambda<Predicate>::type
+            , typename Inserter::operation
+            > >
+        >
+{
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, remove_if)
+
+}}
+
+#endif // BOOST_MPL_REMOVE_IF_HPP_INCLUDED
diff --git a/ext/boost/mpl/replace.hpp b/ext/boost/mpl/replace.hpp
new file mode 100644
index 0000000..3fab346
--- /dev/null
+++ b/ext/boost/mpl/replace.hpp
@@ -0,0 +1,55 @@
+
+#ifndef BOOST_MPL_REPLACE_HPP_INCLUDED
+#define BOOST_MPL_REPLACE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright John R. Bandela 2000-2002
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: replace.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/replace_if.hpp>
+#include <boost/mpl/same_as.hpp>
+#include <boost/mpl/aux_/inserter_algorithm.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template<
+      typename Sequence
+    , typename OldType
+    , typename NewType
+    , typename Inserter 
+    >
+struct replace_impl
+    : replace_if_impl< Sequence, same_as<OldType>, NewType, Inserter >
+{
+};
+
+template<
+      typename Sequence
+    , typename OldType
+    , typename NewType
+    , typename Inserter 
+    >
+struct reverse_replace_impl
+    : reverse_replace_if_impl< Sequence, same_as<OldType>, NewType, Inserter >
+{
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, replace)
+
+}}
+
+#endif // BOOST_MPL_REPLACE_HPP_INCLUDED
diff --git a/ext/boost/mpl/replace_if.hpp b/ext/boost/mpl/replace_if.hpp
new file mode 100644
index 0000000..349480e
--- /dev/null
+++ b/ext/boost/mpl/replace_if.hpp
@@ -0,0 +1,88 @@
+
+#ifndef BOOST_MPL_REPLACE_IF_HPP_INCLUDED
+#define BOOST_MPL_REPLACE_IF_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright John R. Bandela 2000-2002
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: replace_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/transform.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/aux_/inserter_algorithm.hpp>
+#include <boost/mpl/aux_/config/forwarding.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< typename Predicate, typename T >
+struct replace_if_op
+{
+    template< typename U > struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
+        : if_<
+              typename apply1<Predicate,U>::type
+            , T
+            , U
+            >
+    {
+#else
+    {
+        typedef typename if_<
+              typename apply1<Predicate,U>::type
+            , T
+            , U
+            >::type type;
+#endif
+    };
+};
+
+
+template<
+      typename Sequence
+    , typename Predicate
+    , typename T
+    , typename Inserter
+    >
+struct replace_if_impl
+    : transform1_impl<
+          Sequence
+        , protect< aux::replace_if_op<Predicate,T> >
+        , Inserter
+        >
+{
+};
+
+template<
+      typename Sequence
+    , typename Predicate
+    , typename T
+    , typename Inserter
+    >
+struct reverse_replace_if_impl
+    : reverse_transform1_impl<
+          Sequence
+        , protect< aux::replace_if_op<Predicate,T> >
+        , Inserter
+        >
+{
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, replace_if)
+
+}}
+
+#endif // BOOST_MPL_REPLACE_IF_HPP_INCLUDED
diff --git a/ext/boost/mpl/reverse.hpp b/ext/boost/mpl/reverse.hpp
new file mode 100644
index 0000000..3221ecb
--- /dev/null
+++ b/ext/boost/mpl/reverse.hpp
@@ -0,0 +1,38 @@
+
+#ifndef BOOST_MPL_REVERSE_HPP_INCLUDED
+#define BOOST_MPL_REVERSE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: reverse.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/copy.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(Inserter)
+    >
+struct reverse
+    : reverse_copy<
+          Sequence
+        , Inserter
+        >
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, reverse)
+
+}}
+
+#endif // BOOST_MPL_REVERSE_HPP_INCLUDED
diff --git a/ext/boost/mpl/reverse_fold.hpp b/ext/boost/mpl/reverse_fold.hpp
new file mode 100644
index 0000000..bcf3157
--- /dev/null
+++ b/ext/boost/mpl/reverse_fold.hpp
@@ -0,0 +1,50 @@
+
+#ifndef BOOST_MPL_REVERSE_FOLD_HPP_INCLUDED
+#define BOOST_MPL_REVERSE_FOLD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright David Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: reverse_fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/O1_size.hpp>
+#include <boost/mpl/arg.hpp>
+#include <boost/mpl/aux_/reverse_fold_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(State)
+    , typename BOOST_MPL_AUX_NA_PARAM(BackwardOp)
+    , typename ForwardOp = arg<1>
+    >
+struct reverse_fold
+{
+    typedef typename aux::reverse_fold_impl<
+          ::boost::mpl::O1_size<Sequence>::value
+        , typename begin<Sequence>::type
+        , typename end<Sequence>::type
+        , State
+        , BackwardOp
+        , ForwardOp
+        >::state type;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3,reverse_fold,(Sequence,State,BackwardOp))
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, reverse_fold)
+
+}}
+
+#endif // BOOST_MPL_REVERSE_FOLD_HPP_INCLUDED
diff --git a/ext/boost/mpl/reverse_iter_fold.hpp b/ext/boost/mpl/reverse_iter_fold.hpp
new file mode 100644
index 0000000..9965c27
--- /dev/null
+++ b/ext/boost/mpl/reverse_iter_fold.hpp
@@ -0,0 +1,56 @@
+
+#ifndef BOOST_MPL_ITER_FOLD_BACKWARD_HPP_INCLUDED
+#define BOOST_MPL_ITER_FOLD_BACKWARD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+// Copyright Dave Abrahams 2001-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: reverse_iter_fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/O1_size.hpp>
+#include <boost/mpl/arg.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/aux_/reverse_iter_fold_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(State)
+    , typename BOOST_MPL_AUX_NA_PARAM(BackwardOp)
+    , typename ForwardOp = arg<1>
+    >
+struct reverse_iter_fold
+{
+    typedef typename aux::reverse_iter_fold_impl<
+          ::boost::mpl::O1_size<Sequence>::value
+        , typename begin<Sequence>::type
+        , typename end<Sequence>::type
+        , State
+        , typename lambda<BackwardOp>::type
+        , typename lambda<ForwardOp>::type
+        >::state type;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(
+          4
+        , reverse_iter_fold
+        , (Sequence,State,BackwardOp,ForwardOp)
+        )
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, reverse_iter_fold)
+
+}}
+
+#endif // BOOST_MPL_ITER_FOLD_BACKWARD_HPP_INCLUDED
diff --git a/ext/boost/mpl/same_as.hpp b/ext/boost/mpl/same_as.hpp
new file mode 100644
index 0000000..c82cfd7
--- /dev/null
+++ b/ext/boost/mpl/same_as.hpp
@@ -0,0 +1,55 @@
+
+#ifndef BOOST_MPL_SAME_AS_HPP_INCLUDED
+#define BOOST_MPL_SAME_AS_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: same_as.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/aux_/lambda_spec.hpp>
+#include <boost/mpl/aux_/config/forwarding.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl {
+
+template< typename T1 >
+struct same_as
+{
+    template< typename T2 > struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
+        : is_same<T1,T2>
+    {
+#else
+    {
+        typedef typename is_same<T1,T2>::type type;
+#endif
+    };
+};
+
+template< typename T1 >
+struct not_same_as
+{
+    template< typename T2 > struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
+        : not_< is_same<T1,T2> >
+    {
+#else
+    {
+        typedef typename not_< is_same<T1,T2> >::type type;
+#endif
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_SAME_AS_HPP_INCLUDED
diff --git a/ext/boost/mpl/sequence_tag.hpp b/ext/boost/mpl/sequence_tag.hpp
new file mode 100644
index 0000000..479175e
--- /dev/null
+++ b/ext/boost/mpl/sequence_tag.hpp
@@ -0,0 +1,124 @@
+
+#ifndef BOOST_MPL_SEQUENCE_TAG_HPP_INCLUDED
+#define BOOST_MPL_SEQUENCE_TAG_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: sequence_tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/sequence_tag_fwd.hpp>
+#include <boost/mpl/aux_/has_tag.hpp>
+#include <boost/mpl/aux_/has_begin.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/is_msvc_eti_arg.hpp>
+#include <boost/mpl/aux_/config/eti.hpp>
+#include <boost/mpl/aux_/yes_no.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+namespace boost { namespace mpl {
+
+// agurt, 27/nov/02: have to use a simplistic 'sequence_tag' implementation
+// on MSVC to avoid dreadful "internal structure overflow" error
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) \
+    || defined(BOOST_MPL_CFG_NO_HAS_XXX)
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    >
+struct sequence_tag
+{
+    typedef typename Sequence::tag type;
+};
+
+#elif BOOST_WORKAROUND(BOOST_MSVC, == 1300)
+
+// agurt, 07/feb/03: workaround for what seems to be MSVC 7.0-specific ETI issue
+
+namespace aux {
+
+template< bool >
+struct sequence_tag_impl
+{
+    template< typename Sequence > struct result_
+    {
+        typedef typename Sequence::tag type;
+    };
+};
+
+template<>
+struct sequence_tag_impl<false>
+{
+    template< typename Sequence > struct result_
+    {
+        typedef int type;
+    };
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    >
+struct sequence_tag
+    : aux::sequence_tag_impl< !aux::is_msvc_eti_arg<Sequence>::value >
+        ::template result_<Sequence>
+{
+};
+
+#else
+
+namespace aux {
+
+template< bool has_tag_, bool has_begin_ >
+struct sequence_tag_impl
+{
+    // agurt 24/nov/02: MSVC 6.5 gets confused in 'sequence_tag_impl<true>' 
+    // specialization below, if we name it 'result_' here
+    template< typename Sequence > struct result2_;
+};
+
+#   define AUX_CLASS_SEQUENCE_TAG_SPEC(has_tag, has_begin, result_type) \
+template<> struct sequence_tag_impl<has_tag,has_begin> \
+{ \
+    template< typename Sequence > struct result2_ \
+    { \
+        typedef result_type type; \
+    }; \
+}; \
+/**/
+
+AUX_CLASS_SEQUENCE_TAG_SPEC(true, true, typename Sequence::tag)
+AUX_CLASS_SEQUENCE_TAG_SPEC(true, false, typename Sequence::tag)
+AUX_CLASS_SEQUENCE_TAG_SPEC(false, true, nested_begin_end_tag)
+AUX_CLASS_SEQUENCE_TAG_SPEC(false, false, non_sequence_tag)
+
+#   undef AUX_CLASS_SEQUENCE_TAG_SPEC
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    >
+struct sequence_tag
+    : aux::sequence_tag_impl<
+          ::boost::mpl::aux::has_tag<Sequence>::value
+        , ::boost::mpl::aux::has_begin<Sequence>::value
+        >::template result2_<Sequence>
+{
+};
+
+#endif // BOOST_MSVC
+
+BOOST_MPL_AUX_NA_SPEC(1, sequence_tag)
+
+}}
+
+#endif // BOOST_MPL_SEQUENCE_TAG_HPP_INCLUDED
diff --git a/ext/boost/mpl/sequence_tag_fwd.hpp b/ext/boost/mpl/sequence_tag_fwd.hpp
new file mode 100644
index 0000000..07a6707
--- /dev/null
+++ b/ext/boost/mpl/sequence_tag_fwd.hpp
@@ -0,0 +1,26 @@
+
+#ifndef BOOST_MPL_SEQUENCE_TAG_FWD_HPP_INCLUDED
+#define BOOST_MPL_SEQUENCE_TAG_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: sequence_tag_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+struct nested_begin_end_tag;
+struct non_sequence_tag;
+
+template< typename Sequence > struct sequence_tag;
+
+}}
+
+#endif // BOOST_MPL_SEQUENCE_TAG_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/set.hpp b/ext/boost/mpl/set.hpp
new file mode 100644
index 0000000..5392d5f
--- /dev/null
+++ b/ext/boost/mpl/set.hpp
@@ -0,0 +1,57 @@
+
+#ifndef BOOST_MPL_SET_HPP_INCLUDED
+#define BOOST_MPL_SET_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: set.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/limits/set.hpp>
+#   include <boost/mpl/aux_/na.hpp>
+#   include <boost/mpl/aux_/config/preprocessor.hpp>
+
+#   include <boost/preprocessor/inc.hpp>
+#   include <boost/preprocessor/cat.hpp>
+#   include <boost/preprocessor/stringize.hpp>
+
+#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
+#   define AUX778076_SET_HEADER \
+    BOOST_PP_CAT(set, BOOST_MPL_LIMIT_SET_SIZE).hpp \
+    /**/
+#else
+#   define AUX778076_SET_HEADER \
+    BOOST_PP_CAT(set, BOOST_MPL_LIMIT_SET_SIZE)##.hpp \
+    /**/
+#endif
+
+#   include BOOST_PP_STRINGIZE(boost/mpl/set/AUX778076_SET_HEADER)
+#   undef AUX778076_SET_HEADER
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER set.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/limits/set.hpp>
+
+#   define AUX778076_SEQUENCE_NAME set
+#   define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_SET_SIZE
+#   include <boost/mpl/aux_/sequence_wrapper.hpp>
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_SET_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/aux_/at_impl.hpp b/ext/boost/mpl/set/aux_/at_impl.hpp
new file mode 100644
index 0000000..feed3d3
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/at_impl.hpp
@@ -0,0 +1,40 @@
+
+#ifndef BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED
+#define BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: at_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/at_fwd.hpp>
+#include <boost/mpl/set/aux_/has_key_impl.hpp>
+#include <boost/mpl/set/aux_/tag.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/void.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct at_impl< aux::set_tag >
+{
+    template< typename Set, typename T > struct apply
+    {
+        typedef typename if_< 
+              has_key_impl<aux::set_tag>::apply<Set,T>
+            , T
+            , void_
+            >::type type;            
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/aux_/begin_end_impl.hpp b/ext/boost/mpl/set/aux_/begin_end_impl.hpp
new file mode 100644
index 0000000..09d2702
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/begin_end_impl.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED
+#define BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2007
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: begin_end_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end_fwd.hpp>
+#include <boost/mpl/set/aux_/iterator.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct begin_impl< aux::set_tag >
+{
+    template< typename Set > struct apply
+        : s_iter_get<Set,typename Set::item_>
+    {
+    };
+};
+
+template<>
+struct end_impl< aux::set_tag >
+{
+    template< typename Set > struct apply
+    {
+        typedef s_iter< Set,set0<> > type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/aux_/clear_impl.hpp b/ext/boost/mpl/set/aux_/clear_impl.hpp
new file mode 100644
index 0000000..c0b1450
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/clear_impl.hpp
@@ -0,0 +1,35 @@
+
+#ifndef BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED
+#define BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: clear_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/clear_fwd.hpp>
+#include <boost/mpl/set/aux_/set0.hpp>
+#include <boost/mpl/set/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct clear_impl< aux::set_tag >
+{
+    template< typename Set > struct apply
+    {
+        typedef set0<> type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/aux_/empty_impl.hpp b/ext/boost/mpl/set/aux_/empty_impl.hpp
new file mode 100644
index 0000000..1940c55
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/empty_impl.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED
+#define BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: empty_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/empty_fwd.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/set/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct empty_impl< aux::set_tag >
+{
+    template< typename Set > struct apply
+        : not_< typename Set::size >
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/aux_/erase_impl.hpp b/ext/boost/mpl/set/aux_/erase_impl.hpp
new file mode 100644
index 0000000..541c785
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/erase_impl.hpp
@@ -0,0 +1,41 @@
+
+#ifndef BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED
+#define BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: erase_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/erase_fwd.hpp>
+#include <boost/mpl/set/aux_/erase_key_impl.hpp>
+#include <boost/mpl/set/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct erase_impl< aux::set_tag >
+{
+    template< 
+          typename Set
+        , typename Pos
+        , typename unused_
+        > 
+    struct apply
+        : erase_key_impl<aux::set_tag>
+            ::apply<Set,typename Pos::type>
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/aux_/erase_key_impl.hpp b/ext/boost/mpl/set/aux_/erase_key_impl.hpp
new file mode 100644
index 0000000..3cee21d
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/erase_key_impl.hpp
@@ -0,0 +1,53 @@
+
+#ifndef BOOST_MPL_SET_AUX_ERASE_KEY_IMPL_HPP_INCLUDED
+#define BOOST_MPL_SET_AUX_ERASE_KEY_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2007
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: erase_key_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/erase_key_fwd.hpp>
+#include <boost/mpl/set/aux_/has_key_impl.hpp>
+#include <boost/mpl/set/aux_/item.hpp>
+#include <boost/mpl/set/aux_/tag.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/base.hpp>
+#include <boost/mpl/eval_if.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct erase_key_impl< aux::set_tag >
+{
+    template< 
+          typename Set
+        , typename T
+        > 
+    struct apply
+        : eval_if< 
+              has_key_impl<aux::set_tag>::apply<Set,T>
+            , eval_if< 
+                  is_same< T,typename Set::item_type_ > 
+                , base<Set>
+                , identity< s_mask<T,typename Set::item_> >
+                >
+            , identity<Set>
+            >
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_SET_AUX_ERASE_KEY_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/aux_/has_key_impl.hpp b/ext/boost/mpl/set/aux_/has_key_impl.hpp
new file mode 100644
index 0000000..e760195
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/has_key_impl.hpp
@@ -0,0 +1,60 @@
+
+#ifndef BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED
+#define BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: has_key_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/set/aux_/tag.hpp>
+#include <boost/mpl/has_key_fwd.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/aux_/overload_names.hpp>
+#include <boost/mpl/aux_/static_cast.hpp>
+#include <boost/mpl/aux_/yes_no.hpp>
+#include <boost/mpl/aux_/type_wrapper.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct has_key_impl< aux::set_tag >
+{
+    template< typename Set, typename T > struct apply
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
+    || BOOST_WORKAROUND(__EDG_VERSION__, <= 245)
+    {
+        BOOST_STATIC_CONSTANT(bool, value = 
+              ( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(
+                    Set
+                  , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<T>*, 0)
+                  ) ) == sizeof(aux::no_tag) )
+            );
+
+        typedef bool_<value> type;
+
+#else // ISO98 C++
+        : bool_< 
+              ( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(
+                    Set
+                  , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<T>*, 0)
+                  ) ) == sizeof(aux::no_tag) )
+            >
+    {
+#endif
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/aux_/include_preprocessed.hpp b/ext/boost/mpl/set/aux_/include_preprocessed.hpp
new file mode 100644
index 0000000..08cb734
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/include_preprocessed.hpp
@@ -0,0 +1,42 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+// Copyright Aleksey Gurtovoy 2001-2006
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/preprocessor.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/stringize.hpp>
+
+#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
+#   define AUX778076_HEADER \
+    plain/BOOST_MPL_PREPROCESSED_HEADER \
+/**/
+#else
+#   define AUX778076_HEADER \
+    BOOST_PP_CAT(plain,/)##BOOST_MPL_PREPROCESSED_HEADER \
+/**/
+#endif
+
+#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700))
+#   define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/set/aux_/preprocessed/AUX778076_HEADER)
+#   include AUX778076_INCLUDE_STRING
+#   undef AUX778076_INCLUDE_STRING
+#else
+#   include BOOST_PP_STRINGIZE(boost/mpl/set/aux_/preprocessed/AUX778076_HEADER)
+#endif
+
+#   undef AUX778076_HEADER
+
+#undef BOOST_MPL_PREPROCESSED_HEADER
diff --git a/ext/boost/mpl/set/aux_/insert_impl.hpp b/ext/boost/mpl/set/aux_/insert_impl.hpp
new file mode 100644
index 0000000..3d3d41d
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/insert_impl.hpp
@@ -0,0 +1,65 @@
+
+#ifndef BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED
+#define BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2007
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: insert_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/insert_fwd.hpp>
+#include <boost/mpl/set/aux_/has_key_impl.hpp>
+#include <boost/mpl/set/aux_/item.hpp>
+#include <boost/mpl/set/aux_/tag.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/base.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/aux_/na.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template<  typename Set, typename T > struct set_insert_impl
+    : eval_if< 
+          has_key_impl<aux::set_tag>::apply<Set,T>
+        , identity<Set>
+        , eval_if< 
+              is_same< T,typename Set::last_masked_ > 
+            , base<Set>
+            , identity< s_item<T,typename Set::item_> >
+            >
+        >
+{
+};
+}
+
+template<>
+struct insert_impl< aux::set_tag >
+{
+    template< 
+          typename Set
+        , typename PosOrKey
+        , typename KeyOrNA
+        > 
+    struct apply
+        : aux::set_insert_impl<
+              Set
+            , typename if_na<KeyOrNA,PosOrKey>::type
+            >
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/aux_/item.hpp b/ext/boost/mpl/set/aux_/item.hpp
new file mode 100644
index 0000000..bc39662
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/item.hpp
@@ -0,0 +1,80 @@
+
+#ifndef BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED
+#define BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2007
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/prior.hpp>
+#include <boost/mpl/set/aux_/set0.hpp>
+#include <boost/mpl/aux_/type_wrapper.hpp>
+#include <boost/mpl/aux_/config/arrays.hpp>
+
+namespace boost { namespace mpl {
+
+template< typename T, typename Base >
+struct s_item
+    : Base
+{
+    typedef s_item<T,Base> item_;
+    typedef void_       last_masked_;
+    typedef T           item_type_;
+    typedef Base        base;
+    
+    typedef typename next< typename Base::size >::type  size;
+    typedef typename next< typename Base::order >::type order;
+
+#if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES)
+    typedef typename aux::weighted_tag<BOOST_MPL_AUX_MSVC_VALUE_WKND(order)::value>::type order_tag_;
+#else
+    typedef char (&order_tag_)[BOOST_MPL_AUX_MSVC_VALUE_WKND(order)::value];
+#endif
+
+    BOOST_MPL_AUX_SET_OVERLOAD( order_tag_, ORDER_BY_KEY, s_item, aux::type_wrapper<T>* );
+    BOOST_MPL_AUX_SET_OVERLOAD( aux::no_tag, IS_MASKED, s_item, aux::type_wrapper<T>* );
+};
+
+
+template< typename T, typename Base >
+struct s_mask
+    : Base
+{
+    typedef s_mask<T,Base> item_;
+    typedef T       last_masked_;
+    typedef void_   item_type_;
+    typedef Base    base;
+    typedef typename prior< typename Base::size >::type  size;
+
+    BOOST_MPL_AUX_SET_OVERLOAD( aux::yes_tag, IS_MASKED, s_mask, aux::type_wrapper<T>* );
+};
+
+
+template< typename T, typename Base >
+struct s_unmask
+    : Base
+{
+    typedef s_unmask<T,Base> item_;
+    typedef void_   last_masked_;
+    typedef T       item_type_;
+    typedef Base    base;
+    typedef typename next< typename Base::size >::type  size;
+
+    BOOST_MPL_AUX_SET_OVERLOAD( aux::no_tag, IS_MASKED, s_unmask, aux::type_wrapper<T>* );
+};
+
+}}
+
+#endif // BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/aux_/iterator.hpp b/ext/boost/mpl/set/aux_/iterator.hpp
new file mode 100644
index 0000000..c855b3e
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/iterator.hpp
@@ -0,0 +1,98 @@
+
+#ifndef BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED
+#define BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2007
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/set/aux_/set0.hpp>
+#include <boost/mpl/has_key.hpp>
+#include <boost/mpl/iterator_tags.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+namespace boost { namespace mpl {
+
+// used by 's_iter_get'
+template< typename Set, typename Tail > struct s_iter;
+
+template< typename Set, typename Tail > struct s_iter_get
+    : eval_if< 
+          has_key< Set,typename Tail::item_type_ >
+        , identity< s_iter<Set,Tail> >
+        , next< s_iter<Set,Tail> >
+        >
+{
+};
+
+template< typename Set, typename Tail > struct s_iter_impl
+{
+    typedef Tail                        tail_;
+    typedef forward_iterator_tag        category;
+    typedef typename Tail::item_type_   type;
+
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+    typedef typename s_iter_get< Set,typename Tail::base >::type next;
+#endif
+};
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< typename Set, typename Tail > 
+struct next< s_iter<Set,Tail> >
+    : s_iter_get< Set,typename Tail::base >
+{
+};
+
+template< typename Set > 
+struct next< s_iter<Set,set0<> > >
+{
+    typedef s_iter<Set,set0<> > type;
+};
+
+template< typename Set, typename Tail > struct s_iter
+    : s_iter_impl<Set,Tail>
+{
+};
+
+template< typename Set > struct s_iter<Set, set0<> >
+{
+    typedef forward_iterator_tag category;
+};
+
+#else
+
+template< typename Set >
+struct s_end_iter
+{
+    typedef forward_iterator_tag    category;
+    typedef s_iter<Set,set0<> >     next;
+};
+
+template< typename Set, typename Tail > struct s_iter
+    : if_< 
+          is_same< Tail,set0<> >
+        , s_end_iter<Set>
+        , s_iter_impl<Set,Tail>
+        >::type
+{
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+}}
+
+#endif // BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/aux_/key_type_impl.hpp b/ext/boost/mpl/set/aux_/key_type_impl.hpp
new file mode 100644
index 0000000..1a22168
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/key_type_impl.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_SET_AUX_KEY_TYPE_IMPL_HPP_INCLUDED
+#define BOOST_MPL_SET_AUX_KEY_TYPE_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: key_type_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/key_type_fwd.hpp>
+#include <boost/mpl/set/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct key_type_impl< aux::set_tag >
+{
+    template< typename Set, typename T > struct apply
+    {
+        typedef T type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_SET_AUX_KEY_TYPE_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/aux_/numbered.hpp b/ext/boost/mpl/set/aux_/numbered.hpp
new file mode 100644
index 0000000..95cea0c
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/numbered.hpp
@@ -0,0 +1,48 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+#if defined(BOOST_PP_IS_ITERATING)
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: numbered.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/preprocessor/enum_params.hpp>
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/cat.hpp>
+
+#define i_ BOOST_PP_FRAME_ITERATION(1)
+
+#   define AUX778076_SET_TAIL(set, i_, T) \
+    typename BOOST_PP_CAT(set,i_)< \
+          BOOST_PP_ENUM_PARAMS(i_, T) \
+        >::item_                           \
+    /**/
+
+#if i_ > 0
+template<
+      BOOST_PP_ENUM_PARAMS(i_, typename T)
+    >
+struct BOOST_PP_CAT(set,i_)
+    : s_item<
+          BOOST_PP_CAT(T,BOOST_PP_DEC(i_))
+        , AUX778076_SET_TAIL(set,BOOST_PP_DEC(i_),T)
+        >
+{
+    typedef BOOST_PP_CAT(set,i_) type;
+};
+#endif
+
+#   undef AUX778076_SET_TAIL
+
+#undef i_
+
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ext/boost/mpl/set/aux_/numbered_c.hpp b/ext/boost/mpl/set/aux_/numbered_c.hpp
new file mode 100644
index 0000000..6365d2a
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/numbered_c.hpp
@@ -0,0 +1,48 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+#if defined(BOOST_PP_IS_ITERATING)
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: numbered_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/cat.hpp>
+
+#define i_ BOOST_PP_FRAME_ITERATION(1)
+
+#   define AUX778076_SET_C_TAIL(set, i_, T, C) \
+    BOOST_PP_CAT(BOOST_PP_CAT(set,i_),_c)< \
+          T BOOST_PP_ENUM_TRAILING_PARAMS(i_, C) \
+        > \
+    /**/
+
+template<
+      typename T
+    , BOOST_PP_ENUM_PARAMS(i_, T C)
+    >
+struct BOOST_PP_CAT(BOOST_PP_CAT(set,i_),_c)
+    : s_item<
+          integral_c<T,BOOST_PP_CAT(C,BOOST_PP_DEC(i_))>
+        , AUX778076_SET_C_TAIL(set,BOOST_PP_DEC(i_), T, C)
+        >
+{
+    typedef BOOST_PP_CAT(BOOST_PP_CAT(set,i_),_c) type;
+};
+
+#   undef AUX778076_SET_C_TAIL
+
+#undef i_
+
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ext/boost/mpl/set/aux_/preprocessed/plain/set10.hpp b/ext/boost/mpl/set/aux_/preprocessed/plain/set10.hpp
new file mode 100644
index 0000000..2c42b38
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/preprocessed/plain/set10.hpp
@@ -0,0 +1,140 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set/set10.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0
+    >
+struct set1
+    : s_item<
+          T0
+        , typename set0<  >::item_
+        >
+{
+    typedef set1 type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct set2
+    : s_item<
+          T1
+        , typename set1<T0>::item_
+        >
+{
+    typedef set2 type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct set3
+    : s_item<
+          T2
+        , typename set2< T0,T1 >::item_
+        >
+{
+    typedef set3 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct set4
+    : s_item<
+          T3
+        , typename set3< T0,T1,T2 >::item_
+        >
+{
+    typedef set4 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct set5
+    : s_item<
+          T4
+        , typename set4< T0,T1,T2,T3 >::item_
+        >
+{
+    typedef set5 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct set6
+    : s_item<
+          T5
+        , typename set5< T0,T1,T2,T3,T4 >::item_
+        >
+{
+    typedef set6 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct set7
+    : s_item<
+          T6
+        , typename set6< T0,T1,T2,T3,T4,T5 >::item_
+        >
+{
+    typedef set7 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct set8
+    : s_item<
+          T7
+        , typename set7< T0,T1,T2,T3,T4,T5,T6 >::item_
+        >
+{
+    typedef set8 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct set9
+    : s_item<
+          T8
+        , typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::item_
+        >
+{
+    typedef set9 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct set10
+    : s_item<
+          T9
+        , typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::item_
+        >
+{
+    typedef set10 type;
+};
+
+}}
diff --git a/ext/boost/mpl/set/aux_/preprocessed/plain/set10_c.hpp b/ext/boost/mpl/set/aux_/preprocessed/plain/set10_c.hpp
new file mode 100644
index 0000000..e9bdb29
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/preprocessed/plain/set10_c.hpp
@@ -0,0 +1,145 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set/set10_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0
+    >
+struct set1_c
+    : s_item<
+          integral_c< T,C0 >
+        , set0_c<T>
+        >
+{
+    typedef set1_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1
+    >
+struct set2_c
+    : s_item<
+          integral_c< T,C1 >
+        , set1_c< T,C0 >
+        >
+{
+    typedef set2_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2
+    >
+struct set3_c
+    : s_item<
+          integral_c< T,C2 >
+        , set2_c< T,C0,C1 >
+        >
+{
+    typedef set3_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3
+    >
+struct set4_c
+    : s_item<
+          integral_c< T,C3 >
+        , set3_c< T,C0,C1,C2 >
+        >
+{
+    typedef set4_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4
+    >
+struct set5_c
+    : s_item<
+          integral_c< T,C4 >
+        , set4_c< T,C0,C1,C2,C3 >
+        >
+{
+    typedef set5_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5
+    >
+struct set6_c
+    : s_item<
+          integral_c< T,C5 >
+        , set5_c< T,C0,C1,C2,C3,C4 >
+        >
+{
+    typedef set6_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6
+    >
+struct set7_c
+    : s_item<
+          integral_c< T,C6 >
+        , set6_c< T,C0,C1,C2,C3,C4,C5 >
+        >
+{
+    typedef set7_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7
+    >
+struct set8_c
+    : s_item<
+          integral_c< T,C7 >
+        , set7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+        >
+{
+    typedef set8_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8
+    >
+struct set9_c
+    : s_item<
+          integral_c< T,C8 >
+        , set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+        >
+{
+    typedef set9_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9
+    >
+struct set10_c
+    : s_item<
+          integral_c< T,C9 >
+        , set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+        >
+{
+    typedef set10_c type;
+};
+
+}}
diff --git a/ext/boost/mpl/set/aux_/preprocessed/plain/set20.hpp b/ext/boost/mpl/set/aux_/preprocessed/plain/set20.hpp
new file mode 100644
index 0000000..cb4e466
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/preprocessed/plain/set20.hpp
@@ -0,0 +1,168 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set/set20.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct set11
+    : s_item<
+          T10
+        , typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::item_
+        >
+{
+    typedef set11 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct set12
+    : s_item<
+          T11
+        , typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::item_
+        >
+{
+    typedef set12 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct set13
+    : s_item<
+          T12
+        , typename set12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
+        , T11 >::item_
+        >
+{
+    typedef set13 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct set14
+    : s_item<
+          T13
+        , typename set13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12 >::item_
+        >
+{
+    typedef set14 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct set15
+    : s_item<
+          T14
+        , typename set14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13 >::item_
+        >
+{
+    typedef set15 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct set16
+    : s_item<
+          T15
+        , typename set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14 >::item_
+        >
+{
+    typedef set16 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct set17
+    : s_item<
+          T16
+        , typename set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15 >::item_
+        >
+{
+    typedef set17 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct set18
+    : s_item<
+          T17
+        , typename set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16 >::item_
+        >
+{
+    typedef set18 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct set19
+    : s_item<
+          T18
+        , typename set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17 >::item_
+        >
+{
+    typedef set19 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct set20
+    : s_item<
+          T19
+        , typename set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18 >::item_
+        >
+{
+    typedef set20 type;
+};
+
+}}
diff --git a/ext/boost/mpl/set/aux_/preprocessed/plain/set20_c.hpp b/ext/boost/mpl/set/aux_/preprocessed/plain/set20_c.hpp
new file mode 100644
index 0000000..445b546
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/preprocessed/plain/set20_c.hpp
@@ -0,0 +1,154 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set/set20_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    >
+struct set11_c
+    : s_item<
+          integral_c< T,C10 >
+        , set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+        >
+{
+    typedef set11_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11
+    >
+struct set12_c
+    : s_item<
+          integral_c< T,C11 >
+        , set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+        >
+{
+    typedef set12_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12
+    >
+struct set13_c
+    : s_item<
+          integral_c< T,C12 >
+        , set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+        >
+{
+    typedef set13_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13
+    >
+struct set14_c
+    : s_item<
+          integral_c< T,C13 >
+        , set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+        >
+{
+    typedef set14_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14
+    >
+struct set15_c
+    : s_item<
+          integral_c< T,C14 >
+        , set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >
+        >
+{
+    typedef set15_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15
+    >
+struct set16_c
+    : s_item<
+          integral_c< T,C15 >
+        , set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >
+        >
+{
+    typedef set16_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16
+    >
+struct set17_c
+    : s_item<
+          integral_c< T,C16 >
+        , set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >
+        >
+{
+    typedef set17_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17
+    >
+struct set18_c
+    : s_item<
+          integral_c< T,C17 >
+        , set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >
+        >
+{
+    typedef set18_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18
+    >
+struct set19_c
+    : s_item<
+          integral_c< T,C18 >
+        , set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >
+        >
+{
+    typedef set19_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19
+    >
+struct set20_c
+    : s_item<
+          integral_c< T,C19 >
+        , set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >
+        >
+{
+    typedef set20_c type;
+};
+
+}}
diff --git a/ext/boost/mpl/set/aux_/preprocessed/plain/set30.hpp b/ext/boost/mpl/set/aux_/preprocessed/plain/set30.hpp
new file mode 100644
index 0000000..08f2cda
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/preprocessed/plain/set30.hpp
@@ -0,0 +1,195 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set/set30.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20
+    >
+struct set21
+    : s_item<
+          T20
+        , typename set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19 >::item_
+        >
+{
+    typedef set21 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21
+    >
+struct set22
+    : s_item<
+          T21
+        , typename set21< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20 >::item_
+        >
+{
+    typedef set22 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22
+    >
+struct set23
+    : s_item<
+          T22
+        , typename set22< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21 >::item_
+        >
+{
+    typedef set23 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23
+    >
+struct set24
+    : s_item<
+          T23
+        , typename set23< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22 >::item_
+        >
+{
+    typedef set24 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    >
+struct set25
+    : s_item<
+          T24
+        , typename set24< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23 >::item_
+        >
+{
+    typedef set25 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25
+    >
+struct set26
+    : s_item<
+          T25
+        , typename set25< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23
+        , T24 >::item_
+        >
+{
+    typedef set26 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26
+    >
+struct set27
+    : s_item<
+          T26
+        , typename set26< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24
+        , T25 >::item_
+        >
+{
+    typedef set27 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27
+    >
+struct set28
+    : s_item<
+          T27
+        , typename set27< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26 >::item_
+        >
+{
+    typedef set28 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28
+    >
+struct set29
+    : s_item<
+          T28
+        , typename set28< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27 >::item_
+        >
+{
+    typedef set29 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    >
+struct set30
+    : s_item<
+          T29
+        , typename set29< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28 >::item_
+        >
+{
+    typedef set30 type;
+};
+
+}}
diff --git a/ext/boost/mpl/set/aux_/preprocessed/plain/set30_c.hpp b/ext/boost/mpl/set/aux_/preprocessed/plain/set30_c.hpp
new file mode 100644
index 0000000..7c0150c
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/preprocessed/plain/set30_c.hpp
@@ -0,0 +1,164 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set/set30_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    >
+struct set21_c
+    : s_item<
+          integral_c< T,C20 >
+        , set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >
+        >
+{
+    typedef set21_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21
+    >
+struct set22_c
+    : s_item<
+          integral_c< T,C21 >
+        , set21_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20 >
+        >
+{
+    typedef set22_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22
+    >
+struct set23_c
+    : s_item<
+          integral_c< T,C22 >
+        , set22_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21 >
+        >
+{
+    typedef set23_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23
+    >
+struct set24_c
+    : s_item<
+          integral_c< T,C23 >
+        , set23_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22 >
+        >
+{
+    typedef set24_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24
+    >
+struct set25_c
+    : s_item<
+          integral_c< T,C24 >
+        , set24_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 >
+        >
+{
+    typedef set25_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25
+    >
+struct set26_c
+    : s_item<
+          integral_c< T,C25 >
+        , set25_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24 >
+        >
+{
+    typedef set26_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26
+    >
+struct set27_c
+    : s_item<
+          integral_c< T,C26 >
+        , set26_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25 >
+        >
+{
+    typedef set27_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27
+    >
+struct set28_c
+    : s_item<
+          integral_c< T,C27 >
+        , set27_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26 >
+        >
+{
+    typedef set28_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28
+    >
+struct set29_c
+    : s_item<
+          integral_c< T,C28 >
+        , set28_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27 >
+        >
+{
+    typedef set29_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29
+    >
+struct set30_c
+    : s_item<
+          integral_c< T,C29 >
+        , set29_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28 >
+        >
+{
+    typedef set30_c type;
+};
+
+}}
diff --git a/ext/boost/mpl/set/aux_/preprocessed/plain/set40.hpp b/ext/boost/mpl/set/aux_/preprocessed/plain/set40.hpp
new file mode 100644
index 0000000..a8571a6
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/preprocessed/plain/set40.hpp
@@ -0,0 +1,221 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set/set40.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30
+    >
+struct set31
+    : s_item<
+          T30
+        , typename set30< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29 >::item_
+        >
+{
+    typedef set31 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31
+    >
+struct set32
+    : s_item<
+          T31
+        , typename set31< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30 >::item_
+        >
+{
+    typedef set32 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32
+    >
+struct set33
+    : s_item<
+          T32
+        , typename set32< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31 >::item_
+        >
+{
+    typedef set33 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33
+    >
+struct set34
+    : s_item<
+          T33
+        , typename set33< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32 >::item_
+        >
+{
+    typedef set34 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    >
+struct set35
+    : s_item<
+          T34
+        , typename set34< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32, T33 >::item_
+        >
+{
+    typedef set35 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35
+    >
+struct set36
+    : s_item<
+          T35
+        , typename set35< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32, T33, T34 >::item_
+        >
+{
+    typedef set36 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36
+    >
+struct set37
+    : s_item<
+          T36
+        , typename set36< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35 >::item_
+        >
+{
+    typedef set37 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37
+    >
+struct set38
+    : s_item<
+          T37
+        , typename set37< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36 >::item_
+        >
+{
+    typedef set38 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38
+    >
+struct set39
+    : s_item<
+          T38
+        , typename set38< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37 >::item_
+        >
+{
+    typedef set39 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    >
+struct set40
+    : s_item<
+          T39
+        , typename set39< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37
+        , T38 >::item_
+        >
+{
+    typedef set40 type;
+};
+
+}}
diff --git a/ext/boost/mpl/set/aux_/preprocessed/plain/set40_c.hpp b/ext/boost/mpl/set/aux_/preprocessed/plain/set40_c.hpp
new file mode 100644
index 0000000..0b0e49c
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/preprocessed/plain/set40_c.hpp
@@ -0,0 +1,174 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set/set40_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    >
+struct set31_c
+    : s_item<
+          integral_c< T,C30 >
+        , set30_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29 >
+        >
+{
+    typedef set31_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31
+    >
+struct set32_c
+    : s_item<
+          integral_c< T,C31 >
+        , set31_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30 >
+        >
+{
+    typedef set32_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32
+    >
+struct set33_c
+    : s_item<
+          integral_c< T,C32 >
+        , set32_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31 >
+        >
+{
+    typedef set33_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33
+    >
+struct set34_c
+    : s_item<
+          integral_c< T,C33 >
+        , set33_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32 >
+        >
+{
+    typedef set34_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34
+    >
+struct set35_c
+    : s_item<
+          integral_c< T,C34 >
+        , set34_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33 >
+        >
+{
+    typedef set35_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35
+    >
+struct set36_c
+    : s_item<
+          integral_c< T,C35 >
+        , set35_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34 >
+        >
+{
+    typedef set36_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36
+    >
+struct set37_c
+    : s_item<
+          integral_c< T,C36 >
+        , set36_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35 >
+        >
+{
+    typedef set37_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37
+    >
+struct set38_c
+    : s_item<
+          integral_c< T,C37 >
+        , set37_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36 >
+        >
+{
+    typedef set38_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38
+    >
+struct set39_c
+    : s_item<
+          integral_c< T,C38 >
+        , set38_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37 >
+        >
+{
+    typedef set39_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39
+    >
+struct set40_c
+    : s_item<
+          integral_c< T,C39 >
+        , set39_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38 >
+        >
+{
+    typedef set40_c type;
+};
+
+}}
diff --git a/ext/boost/mpl/set/aux_/preprocessed/plain/set50.hpp b/ext/boost/mpl/set/aux_/preprocessed/plain/set50.hpp
new file mode 100644
index 0000000..79798ab
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/preprocessed/plain/set50.hpp
@@ -0,0 +1,250 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set/set50.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40
+    >
+struct set41
+    : s_item<
+          T40
+        , typename set40< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38
+        , T39 >::item_
+        >
+{
+    typedef set41 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41
+    >
+struct set42
+    : s_item<
+          T41
+        , typename set41< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39
+        , T40 >::item_
+        >
+{
+    typedef set42 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42
+    >
+struct set43
+    : s_item<
+          T42
+        , typename set42< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39
+        , T40, T41 >::item_
+        >
+{
+    typedef set43 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43
+    >
+struct set44
+    : s_item<
+          T43
+        , typename set43< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39
+        , T40, T41, T42 >::item_
+        >
+{
+    typedef set44 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    >
+struct set45
+    : s_item<
+          T44
+        , typename set44< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39
+        , T40, T41, T42, T43 >::item_
+        >
+{
+    typedef set45 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45
+    >
+struct set46
+    : s_item<
+          T45
+        , typename set45< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39
+        , T40, T41, T42, T43, T44 >::item_
+        >
+{
+    typedef set46 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46
+    >
+struct set47
+    : s_item<
+          T46
+        , typename set46< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39
+        , T40, T41, T42, T43, T44, T45 >::item_
+        >
+{
+    typedef set47 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47
+    >
+struct set48
+    : s_item<
+          T47
+        , typename set47< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39
+        , T40, T41, T42, T43, T44, T45, T46 >::item_
+        >
+{
+    typedef set48 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47, typename T48
+    >
+struct set49
+    : s_item<
+          T48
+        , typename set48< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39
+        , T40, T41, T42, T43, T44, T45, T46, T47 >::item_
+        >
+{
+    typedef set49 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47, typename T48, typename T49
+    >
+struct set50
+    : s_item<
+          T49
+        , typename set49< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11
+        , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25
+        , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39
+        , T40, T41, T42, T43, T44, T45, T46, T47, T48 >::item_
+        >
+{
+    typedef set50 type;
+};
+
+}}
diff --git a/ext/boost/mpl/set/aux_/preprocessed/plain/set50_c.hpp b/ext/boost/mpl/set/aux_/preprocessed/plain/set50_c.hpp
new file mode 100644
index 0000000..83627fa
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/preprocessed/plain/set50_c.hpp
@@ -0,0 +1,184 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/set/set50_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    >
+struct set41_c
+    : s_item<
+          integral_c< T,C40 >
+        , set40_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39 >
+        >
+{
+    typedef set41_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41
+    >
+struct set42_c
+    : s_item<
+          integral_c< T,C41 >
+        , set41_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40 >
+        >
+{
+    typedef set42_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42
+    >
+struct set43_c
+    : s_item<
+          integral_c< T,C42 >
+        , set42_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41 >
+        >
+{
+    typedef set43_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43
+    >
+struct set44_c
+    : s_item<
+          integral_c< T,C43 >
+        , set43_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42 >
+        >
+{
+    typedef set44_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44
+    >
+struct set45_c
+    : s_item<
+          integral_c< T,C44 >
+        , set44_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43 >
+        >
+{
+    typedef set45_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45
+    >
+struct set46_c
+    : s_item<
+          integral_c< T,C45 >
+        , set45_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44 >
+        >
+{
+    typedef set46_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46
+    >
+struct set47_c
+    : s_item<
+          integral_c< T,C46 >
+        , set46_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45 >
+        >
+{
+    typedef set47_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47
+    >
+struct set48_c
+    : s_item<
+          integral_c< T,C47 >
+        , set47_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46 >
+        >
+{
+    typedef set48_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48
+    >
+struct set49_c
+    : s_item<
+          integral_c< T,C48 >
+        , set48_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47 >
+        >
+{
+    typedef set49_c type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49
+    >
+struct set50_c
+    : s_item<
+          integral_c< T,C49 >
+        , set49_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48 >
+        >
+{
+    typedef set50_c type;
+};
+
+}}
diff --git a/ext/boost/mpl/set/aux_/set0.hpp b/ext/boost/mpl/set/aux_/set0.hpp
new file mode 100644
index 0000000..82719b8
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/set0.hpp
@@ -0,0 +1,69 @@
+
+#ifndef BOOST_MPL_SET_AUX_SET0_HPP_INCLUDED
+#define BOOST_MPL_SET_AUX_SET0_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: set0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/mpl/set/aux_/tag.hpp>
+#include <boost/mpl/aux_/yes_no.hpp>
+#include <boost/mpl/aux_/overload_names.hpp>
+#include <boost/mpl/aux_/config/operators.hpp>
+
+#include <boost/preprocessor/cat.hpp>
+
+namespace boost { namespace mpl {
+
+#if defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING)
+
+#   define BOOST_MPL_AUX_SET0_OVERLOAD(R, f, X, T) \
+    friend R BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f)(X const&, T) \
+/**/
+
+#   define BOOST_MPL_AUX_SET_OVERLOAD(R, f, X, T) \
+    BOOST_MPL_AUX_SET0_OVERLOAD(R, f, X, T) \
+/**/
+
+#else
+
+#   define BOOST_MPL_AUX_SET0_OVERLOAD(R, f, X, T) \
+    static R BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f)(X const&, T) \
+/**/
+
+#   define BOOST_MPL_AUX_SET_OVERLOAD(R, f, X, T) \
+    BOOST_MPL_AUX_SET0_OVERLOAD(R, f, X, T); \
+    using Base::BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f) \
+/**/
+
+#endif
+
+template< typename Dummy = na > struct set0
+{
+    typedef set0<>          item_;
+    typedef item_           type;
+    typedef aux::set_tag    tag;
+    typedef void_           last_masked_;
+    typedef void_           item_type_;
+    typedef long_<0>        size;
+    typedef long_<1>        order;
+
+    BOOST_MPL_AUX_SET0_OVERLOAD( aux::no_tag, ORDER_BY_KEY, set0<>, void const volatile* );
+    BOOST_MPL_AUX_SET0_OVERLOAD( aux::yes_tag, IS_MASKED, set0<>, void const volatile* );
+};
+
+}}
+
+#endif // BOOST_MPL_SET_AUX_SET0_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/aux_/size_impl.hpp b/ext/boost/mpl/set/aux_/size_impl.hpp
new file mode 100644
index 0000000..2e35bdb
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/size_impl.hpp
@@ -0,0 +1,33 @@
+
+#ifndef BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED
+#define BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: size_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/size_fwd.hpp>
+#include <boost/mpl/set/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct size_impl< aux::set_tag >
+{
+    template< typename Set > struct apply
+        : Set::size
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/aux_/tag.hpp b/ext/boost/mpl/set/aux_/tag.hpp
new file mode 100644
index 0000000..b3e76a1
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/tag.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_SET_AUX_TAG_HPP_INCLUDED
+#define BOOST_MPL_SET_AUX_TAG_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl { namespace aux {
+
+struct set_tag;
+
+}}}
+
+#endif // BOOST_MPL_SET_AUX_TAG_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/aux_/value_type_impl.hpp b/ext/boost/mpl/set/aux_/value_type_impl.hpp
new file mode 100644
index 0000000..19cea4e
--- /dev/null
+++ b/ext/boost/mpl/set/aux_/value_type_impl.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_SET_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED
+#define BOOST_MPL_SET_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: value_type_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/value_type_fwd.hpp>
+#include <boost/mpl/set/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct value_type_impl< aux::set_tag >
+{
+    template< typename Set, typename T > struct apply
+    {
+        typedef T type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_SET_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/set0.hpp b/ext/boost/mpl/set/set0.hpp
new file mode 100644
index 0000000..9fd1950
--- /dev/null
+++ b/ext/boost/mpl/set/set0.hpp
@@ -0,0 +1,35 @@
+
+#ifndef BOOST_MPL_SET_SET0_HPP_INCLUDED
+#define BOOST_MPL_SET_SET0_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: set0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/set/aux_/at_impl.hpp>
+#include <boost/mpl/set/aux_/clear_impl.hpp>
+//#include <boost/mpl/set/aux_/O1_size.hpp>
+#include <boost/mpl/set/aux_/size_impl.hpp>
+#include <boost/mpl/set/aux_/empty_impl.hpp>
+#include <boost/mpl/set/aux_/insert_impl.hpp>
+#include <boost/mpl/set/aux_/erase_impl.hpp>
+#include <boost/mpl/set/aux_/erase_key_impl.hpp>
+#include <boost/mpl/set/aux_/has_key_impl.hpp>
+#include <boost/mpl/set/aux_/key_type_impl.hpp>
+#include <boost/mpl/set/aux_/value_type_impl.hpp>
+#include <boost/mpl/set/aux_/begin_end_impl.hpp>
+#include <boost/mpl/set/aux_/iterator.hpp>
+#include <boost/mpl/set/aux_/item.hpp>
+#include <boost/mpl/set/aux_/set0.hpp>
+#include <boost/mpl/set/aux_/tag.hpp>
+
+#endif // BOOST_MPL_SET_SET0_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/set0_c.hpp b/ext/boost/mpl/set/set0_c.hpp
new file mode 100644
index 0000000..cf54889
--- /dev/null
+++ b/ext/boost/mpl/set/set0_c.hpp
@@ -0,0 +1,32 @@
+
+#ifndef BOOST_MPL_SET_SET0_C_HPP_INCLUDED
+#define BOOST_MPL_SET_SET0_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: set0_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/set/set0.hpp>
+#include <boost/mpl/integral_c.hpp>
+
+namespace boost { namespace mpl {
+
+template< typename T > struct set0_c
+    : set0<>
+{
+    typedef set0_c type;
+    typedef T value_type;
+};
+
+}}
+
+#endif // BOOST_MPL_SET_SET0_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/set10.hpp b/ext/boost/mpl/set/set10.hpp
new file mode 100644
index 0000000..5cf0add
--- /dev/null
+++ b/ext/boost/mpl/set/set10.hpp
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_SET_SET10_HPP_INCLUDED
+#define BOOST_MPL_SET_SET10_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: set10.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/set/set0.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER set10.hpp
+#   include <boost/mpl/set/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(0, 10, <boost/mpl/set/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_SET_SET10_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/set10_c.hpp b/ext/boost/mpl/set/set10_c.hpp
new file mode 100644
index 0000000..e40fd55
--- /dev/null
+++ b/ext/boost/mpl/set/set10_c.hpp
@@ -0,0 +1,45 @@
+
+#ifndef BOOST_MPL_SET_SET10_C_HPP_INCLUDED
+#define BOOST_MPL_SET_SET10_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: set10_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/set/set0_c.hpp>
+#   include <boost/mpl/set/set10.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER set10_c.hpp
+#   include <boost/mpl/set/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(1, 10, <boost/mpl/set/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_SET_SET10_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/set20.hpp b/ext/boost/mpl/set/set20.hpp
new file mode 100644
index 0000000..c4928bf
--- /dev/null
+++ b/ext/boost/mpl/set/set20.hpp
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_SET_SET20_HPP_INCLUDED
+#define BOOST_MPL_SET_SET20_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: set20.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/set/set10.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER set20.hpp
+#   include <boost/mpl/set/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(11, 20, <boost/mpl/set/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_SET_SET20_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/set20_c.hpp b/ext/boost/mpl/set/set20_c.hpp
new file mode 100644
index 0000000..669420e
--- /dev/null
+++ b/ext/boost/mpl/set/set20_c.hpp
@@ -0,0 +1,45 @@
+
+#ifndef BOOST_MPL_SET_SET20_C_HPP_INCLUDED
+#define BOOST_MPL_SET_SET20_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: set20_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/set/set10_c.hpp>
+#   include <boost/mpl/set/set20.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER set20_c.hpp
+#   include <boost/mpl/set/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(11, 20, <boost/mpl/set/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_SET_SET20_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/set30.hpp b/ext/boost/mpl/set/set30.hpp
new file mode 100644
index 0000000..401cc23
--- /dev/null
+++ b/ext/boost/mpl/set/set30.hpp
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_SET_SET30_HPP_INCLUDED
+#define BOOST_MPL_SET_SET30_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: set30.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/set/set20.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER set30.hpp
+#   include <boost/mpl/set/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(21, 30, <boost/mpl/set/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_SET_SET30_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/set30_c.hpp b/ext/boost/mpl/set/set30_c.hpp
new file mode 100644
index 0000000..ba5ce1c
--- /dev/null
+++ b/ext/boost/mpl/set/set30_c.hpp
@@ -0,0 +1,45 @@
+
+#ifndef BOOST_MPL_SET_SET30_C_HPP_INCLUDED
+#define BOOST_MPL_SET_SET30_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: set30_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/set/set20_c.hpp>
+#   include <boost/mpl/set/set30.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER set30_c.hpp
+#   include <boost/mpl/set/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(21, 30, <boost/mpl/set/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_SET_SET30_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/set40.hpp b/ext/boost/mpl/set/set40.hpp
new file mode 100644
index 0000000..a22d54c
--- /dev/null
+++ b/ext/boost/mpl/set/set40.hpp
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_SET_SET40_HPP_INCLUDED
+#define BOOST_MPL_SET_SET40_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: set40.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/set/set30.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER set40.hpp
+#   include <boost/mpl/set/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(31, 40, <boost/mpl/set/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_SET_SET40_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/set40_c.hpp b/ext/boost/mpl/set/set40_c.hpp
new file mode 100644
index 0000000..d593bd5
--- /dev/null
+++ b/ext/boost/mpl/set/set40_c.hpp
@@ -0,0 +1,45 @@
+
+#ifndef BOOST_MPL_SET_SET40_C_HPP_INCLUDED
+#define BOOST_MPL_SET_SET40_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: set40_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/set/set30_c.hpp>
+#   include <boost/mpl/set/set40.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER set40_c.hpp
+#   include <boost/mpl/set/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(31, 40, <boost/mpl/set/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_SET_SET40_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/set50.hpp b/ext/boost/mpl/set/set50.hpp
new file mode 100644
index 0000000..4f42537
--- /dev/null
+++ b/ext/boost/mpl/set/set50.hpp
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_SET_SET50_HPP_INCLUDED
+#define BOOST_MPL_SET_SET50_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: set50.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/set/set40.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER set50.hpp
+#   include <boost/mpl/set/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(41, 50, <boost/mpl/set/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_SET_SET50_HPP_INCLUDED
diff --git a/ext/boost/mpl/set/set50_c.hpp b/ext/boost/mpl/set/set50_c.hpp
new file mode 100644
index 0000000..f64c8ee
--- /dev/null
+++ b/ext/boost/mpl/set/set50_c.hpp
@@ -0,0 +1,45 @@
+
+#ifndef BOOST_MPL_SET_SET50_C_HPP_INCLUDED
+#define BOOST_MPL_SET_SET50_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: set50_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/set/set40_c.hpp>
+#   include <boost/mpl/set/set50.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER set50_c.hpp
+#   include <boost/mpl/set/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(41, 50, <boost/mpl/set/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_SET_SET50_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/set_c.hpp b/ext/boost/mpl/set_c.hpp
new file mode 100644
index 0000000..c7bf849
--- /dev/null
+++ b/ext/boost/mpl/set_c.hpp
@@ -0,0 +1,60 @@
+
+#ifndef BOOST_MPL_SET_C_HPP_INCLUDED
+#define BOOST_MPL_SET_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: set_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/limits/set.hpp>
+#   include <boost/mpl/aux_/nttp_decl.hpp>
+#   include <boost/mpl/aux_/config/preprocessor.hpp>
+
+#   include <boost/preprocessor/inc.hpp>
+#   include <boost/preprocessor/cat.hpp>
+#   include <boost/preprocessor/stringize.hpp>
+
+#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
+#   define AUX778076_SET_C_HEADER \
+    BOOST_PP_CAT(BOOST_PP_CAT(set,BOOST_MPL_LIMIT_SET_SIZE),_c).hpp \
+    /**/
+#else
+#   define AUX778076_SET_C_HEADER \
+    BOOST_PP_CAT(BOOST_PP_CAT(set,BOOST_MPL_LIMIT_SET_SIZE),_c)##.hpp \
+    /**/
+#endif
+
+#   include BOOST_PP_STRINGIZE(boost/mpl/set/AUX778076_SET_C_HEADER)
+#   undef AUX778076_SET_C_HEADER
+#   include <climits>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER set_c.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/limits/set.hpp>
+
+#   define AUX778076_SEQUENCE_NAME set_c
+#   define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_SET_SIZE
+#   define AUX778076_SEQUENCE_NAME_N(n) BOOST_PP_CAT(BOOST_PP_CAT(set,n),_c)
+#   define AUX778076_SEQUENCE_INTEGRAL_WRAPPER
+#   include <boost/mpl/aux_/sequence_wrapper.hpp>
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_SET_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/shift_left.hpp b/ext/boost/mpl/shift_left.hpp
new file mode 100644
index 0000000..a20bf05
--- /dev/null
+++ b/ext/boost/mpl/shift_left.hpp
@@ -0,0 +1,22 @@
+
+#ifndef BOOST_MPL_SHIFT_LEFT_HPP_INCLUDED
+#define BOOST_MPL_SHIFT_LEFT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: shift_left.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME shift_left
+#define AUX778076_OP_TOKEN <<
+#include <boost/mpl/aux_/shift_op.hpp>
+
+#endif // BOOST_MPL_SHIFT_LEFT_HPP_INCLUDED
diff --git a/ext/boost/mpl/shift_right.hpp b/ext/boost/mpl/shift_right.hpp
new file mode 100644
index 0000000..a03444c
--- /dev/null
+++ b/ext/boost/mpl/shift_right.hpp
@@ -0,0 +1,22 @@
+
+#ifndef BOOST_MPL_SHIFT_RIGHT_HPP_INCLUDED
+#define BOOST_MPL_SHIFT_RIGHT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Jaap Suter 2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: shift_right.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME shift_right
+#define AUX778076_OP_TOKEN >>
+#include <boost/mpl/aux_/shift_op.hpp>
+
+#endif // BOOST_MPL_SHIFT_RIGHT_HPP_INCLUDED
diff --git a/ext/boost/mpl/single_view.hpp b/ext/boost/mpl/single_view.hpp
new file mode 100644
index 0000000..132121f
--- /dev/null
+++ b/ext/boost/mpl/single_view.hpp
@@ -0,0 +1,38 @@
+
+#ifndef BOOST_MPL_SINGLE_VIEW_HPP_INCLUDED
+#define BOOST_MPL_SINGLE_VIEW_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: single_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/single_element_iter.hpp>
+#include <boost/mpl/iterator_range.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct single_view
+    : iterator_range<
+          aux::sel_iter<T,0>
+        , aux::sel_iter<T,1>
+        >
+{
+};
+
+BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, single_view)
+
+}}
+
+#endif // BOOST_MPL_SINGLE_VIEW_HPP_INCLUDED
diff --git a/ext/boost/mpl/size.hpp b/ext/boost/mpl/size.hpp
new file mode 100644
index 0000000..54b13cb
--- /dev/null
+++ b/ext/boost/mpl/size.hpp
@@ -0,0 +1,42 @@
+
+#ifndef BOOST_MPL_SIZE_HPP_INCLUDED
+#define BOOST_MPL_SIZE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/size_fwd.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/size_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/msvc_eti_base.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    >
+struct size
+    : aux::msvc_eti_base<
+        typename size_impl< typename sequence_tag<Sequence>::type >
+            ::template apply< Sequence >::type
+      >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1, size, (Sequence))
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, size)
+
+}}
+
+#endif // BOOST_MPL_SIZE_HPP_INCLUDED
diff --git a/ext/boost/mpl/size_fwd.hpp b/ext/boost/mpl/size_fwd.hpp
new file mode 100644
index 0000000..8702da7
--- /dev/null
+++ b/ext/boost/mpl/size_fwd.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_SIZE_FWD_HPP_INCLUDED
+#define BOOST_MPL_SIZE_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: size_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct size_impl;
+template< typename Sequence > struct size;
+
+}}
+
+#endif // BOOST_MPL_SIZE_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/size_t.hpp b/ext/boost/mpl/size_t.hpp
index e72d77f..54a05c6 100644
--- a/ext/boost/mpl/size_t.hpp
+++ b/ext/boost/mpl/size_t.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: size_t.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/size_t_fwd.hpp>
diff --git a/ext/boost/mpl/size_t_fwd.hpp b/ext/boost/mpl/size_t_fwd.hpp
index 84e903b..396a521 100644
--- a/ext/boost/mpl/size_t_fwd.hpp
+++ b/ext/boost/mpl/size_t_fwd.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: size_t_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/adl_barrier.hpp>
diff --git a/ext/boost/mpl/sizeof.hpp b/ext/boost/mpl/sizeof.hpp
new file mode 100644
index 0000000..018f826
--- /dev/null
+++ b/ext/boost/mpl/sizeof.hpp
@@ -0,0 +1,36 @@
+
+#ifndef BOOST_MPL_SIZEOF_HPP_INCLUDED
+#define BOOST_MPL_SIZEOF_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2003
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: sizeof.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/size_t.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct sizeof_
+    : mpl::size_t< sizeof(T) >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,sizeof_,(T))
+};
+
+BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, sizeof_)
+
+}}
+
+#endif // BOOST_MPL_SIZEOF_HPP_INCLUDED
diff --git a/ext/boost/mpl/sort.hpp b/ext/boost/mpl/sort.hpp
new file mode 100644
index 0000000..04bdad6
--- /dev/null
+++ b/ext/boost/mpl/sort.hpp
@@ -0,0 +1,27 @@
+
+#ifndef BOOST_MPL_SORT_HPP_INCLUDED
+#define BOOST_MPL_SORT_HPP_INCLUDED
+
+// Copyright Eric Friedman 2002-2003
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: sort.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/sort_impl.hpp>
+#include <boost/mpl/aux_/inserter_algorithm.hpp>
+
+namespace boost { namespace mpl {
+
+BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, sort)
+
+}}
+
+#endif // BOOST_MPL_SORT_HPP_INCLUDED
diff --git a/ext/boost/mpl/stable_partition.hpp b/ext/boost/mpl/stable_partition.hpp
new file mode 100644
index 0000000..93066bb
--- /dev/null
+++ b/ext/boost/mpl/stable_partition.hpp
@@ -0,0 +1,75 @@
+
+#ifndef BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED
+#define BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED
+
+// Copyright Eric Friedman 2002-2003
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: stable_partition.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/reverse_fold.hpp>
+#include <boost/mpl/protect.hpp>
+#include <boost/mpl/aux_/partition_op.hpp>
+#include <boost/mpl/aux_/inserter_algorithm.hpp>
+#include <boost/mpl/aux_/na.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+ 
+template <
+      typename Sequence
+    , typename Pred
+    , typename In
+    , typename In2
+    , typename In1 = typename if_na<In,In2>::type
+    >
+struct stable_partition_impl
+    : fold<
+          Sequence
+        , pair< typename In1::state, typename In2::state >
+        , protect< partition_op< 
+              Pred
+            , typename In1::operation
+            , typename In2::operation
+            > >
+        >
+{
+};
+
+template <
+      typename Sequence
+    , typename Pred
+    , typename In
+    , typename In2
+    , typename In1 = typename if_na<In,In2>::type
+    >
+struct reverse_stable_partition_impl
+    : reverse_fold<
+          Sequence
+        , pair< typename In1::state, typename In2::state >
+        , protect< partition_op< 
+              Pred
+            , typename In1::operation
+            , typename In2::operation
+            > >
+        >
+{
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, stable_partition)
+
+}}
+
+#endif // BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED
diff --git a/ext/boost/mpl/string.hpp b/ext/boost/mpl/string.hpp
new file mode 100644
index 0000000..c62d8ab
--- /dev/null
+++ b/ext/boost/mpl/string.hpp
@@ -0,0 +1,607 @@
+
+#ifndef BOOST_MPL_STRING_HPP_INCLUDED
+#define BOOST_MPL_STRING_HPP_INCLUDED
+
+// Copyright Eric Niebler 2009
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: string.hpp 49239 2009-04-01 09:10:26Z eric_niebler $
+// $Date: 2009-04-01 02:10:26 -0700 (Wed, 1 Apr 2009) $
+// $Revision: 49239 $
+//
+// Thanks to:
+//   Dmitry Goncharov for porting this to the Sun compiler
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/detail/endian.hpp>
+#include <boost/mpl/limits/string.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/char.hpp>
+#include <boost/mpl/copy.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/empty.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/size_t.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/joint_view.hpp>
+#include <boost/mpl/insert_range.hpp>
+#include <boost/mpl/back_inserter.hpp>
+#include <boost/mpl/front_inserter.hpp>
+#include <boost/mpl/iterator_range.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/arithmetic/add.hpp>
+#include <boost/preprocessor/arithmetic/div.hpp>
+#include <boost/preprocessor/punctuation/comma_if.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+
+#include <iterator> // for bidirectional_iterator_tag
+#include <climits>
+
+namespace boost { namespace mpl
+{
+    #define BOOST_MPL_STRING_MAX_PARAMS                                                             \
+      BOOST_PP_DIV(BOOST_PP_ADD(BOOST_MPL_LIMIT_STRING_SIZE, 3), 4)
+
+    // Low-level bit-twiddling is done by macros. Any implementation-defined behavior of
+    // multi-character literals should be localized to these macros.
+
+    #define BOOST_MPL_MULTICHAR_LENGTH(c)                                                           \
+      (std::size_t)((c<CHAR_MIN) ? 4 : ((c>0xffffff)+(c>0xffff)+(c>0xff)+1))
+
+    #if defined(BOOST_LITTLE_ENDIAN) && defined(__SUNPRO_CC)
+
+        #define BOOST_MPL_MULTICHAR_AT(c,i)                                                         \
+          (char)(0xff&((unsigned)(c)>>(8*(std::size_t)(i))))
+
+        #define BOOST_MPL_MULTICHAR_PUSH_BACK(c,i)                                                  \
+          ((((unsigned char)(i))<<(BOOST_MPL_MULTICHAR_LENGTH(c)*8))|(unsigned)(c))
+
+        #define BOOST_MPL_MULTICHAR_PUSH_FRONT(c,i)                                                 \
+          (((unsigned)(c)<<8)|(unsigned char)(i))
+
+        #define BOOST_MPL_MULTICHAR_POP_BACK(c)                                                     \
+          (((1<<((BOOST_MPL_MULTICHAR_LENGTH(c)-1)*8))-1)&(unsigned)(c))
+
+        #define BOOST_MPL_MULTICHAR_POP_FRONT(c)                                                    \
+          ((unsigned)(c)>>8)
+
+    #else
+
+        #define BOOST_MPL_MULTICHAR_AT(c,i)                                                         \
+          (char)(0xff&((unsigned)(c)>>(8*(BOOST_MPL_MULTICHAR_LENGTH(c)-(std::size_t)(i)-1))))
+
+        #define BOOST_MPL_MULTICHAR_PUSH_BACK(c,i)                                                  \
+          (((unsigned)(c)<<8)|(unsigned char)(i))
+
+        #define BOOST_MPL_MULTICHAR_PUSH_FRONT(c,i)                                                 \
+          ((((unsigned char)(i))<<(BOOST_MPL_MULTICHAR_LENGTH(c)*8))|(unsigned)(c))
+
+        #define BOOST_MPL_MULTICHAR_POP_BACK(c)                                                     \
+          ((unsigned)(c)>>8)
+
+        #define BOOST_MPL_MULTICHAR_POP_FRONT(c)                                                    \
+          (((1<<((BOOST_MPL_MULTICHAR_LENGTH(c)-1)*8))-1)&(unsigned)(c))
+
+    #endif
+
+    struct string_tag;
+    struct string_iterator_tag;
+
+    template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_MPL_STRING_MAX_PARAMS, int C, 0)>
+    struct string;
+
+    template<typename Sequence, int I, int J>
+    struct string_iterator;
+
+    template<typename Sequence>
+    struct sequence_tag;
+
+    template<typename Tag>
+    struct size_impl;
+
+    template<>
+    struct size_impl<mpl::string_tag>
+    {
+        template<typename Sequence>
+        struct apply;
+
+        #define M0(z, n, data)                                                                      \
+        + BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C,n))
+
+        #define M1(z, n, data)                                                                      \
+        template<BOOST_PP_ENUM_PARAMS_Z(z, n, int C)>                                               \
+        struct apply<mpl::string<BOOST_PP_ENUM_PARAMS_Z(z, n, C)> >                                 \
+          : mpl::size_t<(0 BOOST_PP_REPEAT_ ## z(n, M0, ~))>                                        \
+        {};
+
+        BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(BOOST_MPL_STRING_MAX_PARAMS), M1, ~)
+        #undef M0
+        #undef M1
+    };
+
+    template<>
+    struct size_impl<mpl::string_tag>::apply<mpl::string<> >
+      : mpl::size_t<0>
+    {};
+
+    template<typename Tag>
+    struct begin_impl;
+
+    template<>
+    struct begin_impl<mpl::string_tag>
+    {
+        template<typename Sequence>
+        struct apply
+        {
+            typedef mpl::string_iterator<Sequence, 0, 0> type;
+        };
+    };
+
+    template<typename Tag>
+    struct end_impl;
+
+    template<>
+    struct end_impl<mpl::string_tag>
+    {
+        template<typename Sequence>
+        struct apply;
+
+        #define M0(z,n,data)                                                                        \
+        template<BOOST_PP_ENUM_PARAMS_Z(z, n, int C)>                                               \
+        struct apply<mpl::string<BOOST_PP_ENUM_PARAMS_Z(z, n, C)> >                                 \
+        {                                                                                           \
+            typedef mpl::string_iterator<mpl::string<BOOST_PP_ENUM_PARAMS_Z(z, n, C)>, n, 0> type;  \
+        };
+
+        BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(BOOST_MPL_STRING_MAX_PARAMS), M0, ~)
+        #undef M0
+    };
+
+    template<>
+    struct end_impl<mpl::string_tag>::apply<mpl::string<> >
+    {
+        typedef mpl::string_iterator<mpl::string<>, 0, 0> type;
+    };
+
+    template<typename Tag>
+    struct push_back_impl;
+
+    template<>
+    struct push_back_impl<mpl::string_tag>
+    {
+        template<typename Sequence, typename Value, bool B = (4==BOOST_MPL_MULTICHAR_LENGTH(Sequence::back_))>
+        struct apply
+        {
+            BOOST_MPL_ASSERT_MSG(
+                (BOOST_MPL_LIMIT_STRING_SIZE != mpl::size<Sequence>::type::value)
+              , PUSH_BACK_FAILED_MPL_STRING_IS_FULL
+              , (Sequence)
+            );
+            // If the above assertion didn't fire, then the string is sparse.
+            // Repack the string and retry the push_back
+            typedef
+                typename mpl::push_back<
+                    typename mpl::copy<
+                        Sequence
+                      , mpl::back_inserter<mpl::string<> >
+                    >::type
+                  , Value
+                >::type
+            type;
+        };
+
+        template<typename Value>
+        struct apply<mpl::string<>, Value, false>
+        {
+            typedef mpl::string<(char)Value::value> type;
+        };
+
+        #define M0(z,n,data)                                                                        \
+        template<BOOST_PP_ENUM_PARAMS_Z(z, n, int C), typename Value>                               \
+        struct apply<mpl::string<BOOST_PP_ENUM_PARAMS_Z(z, n, C)>, Value, false>                    \
+        {                                                                                           \
+            typedef                                                                                 \
+                mpl::string<                                                                        \
+                    BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), C)                                   \
+                    BOOST_PP_COMMA_IF(BOOST_PP_DEC(n))                                              \
+                    ((unsigned)BOOST_PP_CAT(C,BOOST_PP_DEC(n))>0xffffff)                            \
+                    ?BOOST_PP_CAT(C,BOOST_PP_DEC(n))                                                \
+                    :BOOST_MPL_MULTICHAR_PUSH_BACK(BOOST_PP_CAT(C,BOOST_PP_DEC(n)), Value::value)   \
+                  , ((unsigned)BOOST_PP_CAT(C,BOOST_PP_DEC(n))>0xffffff)                            \
+                    ?(char)Value::value                                                             \
+                    :0                                                                              \
+                >                                                                                   \
+            type;                                                                                   \
+        };
+
+        BOOST_PP_REPEAT_FROM_TO(1, BOOST_MPL_STRING_MAX_PARAMS, M0, ~)
+        #undef M0
+
+        template<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, int C), typename Value>
+        struct apply<mpl::string<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C)>, Value, false>
+        {
+            typedef
+                mpl::string<
+                    BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(BOOST_MPL_STRING_MAX_PARAMS), C)
+                  , BOOST_MPL_MULTICHAR_PUSH_BACK(BOOST_PP_CAT(C,BOOST_PP_DEC(BOOST_MPL_STRING_MAX_PARAMS)), Value::value)
+                >
+            type;
+        };
+    };
+
+    template<typename Tag>
+    struct has_push_back_impl;
+
+    template<>
+    struct has_push_back_impl<mpl::string_tag>
+    {
+        template<typename Sequence>
+        struct apply
+          : mpl::true_
+        {};
+    };
+
+    template<typename Tag>
+    struct pop_back_impl;
+
+    template<>
+    struct pop_back_impl<mpl::string_tag>
+    {
+        template<typename Sequence>
+        struct apply;
+
+        #define M0(z,n,data)                                                                        \
+        template<BOOST_PP_ENUM_PARAMS_Z(z, n, int C)>                                               \
+        struct apply<mpl::string<BOOST_PP_ENUM_PARAMS_Z(z, n, C)> >                                 \
+        {                                                                                           \
+            BOOST_MPL_ASSERT_MSG((C0 != 0), POP_BACK_FAILED_MPL_STRING_IS_EMPTY, (mpl::string<>));  \
+            typedef                                                                                 \
+                mpl::string<                                                                        \
+                    BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), C)                                   \
+                    BOOST_PP_COMMA_IF(BOOST_PP_DEC(n))                                              \
+                    BOOST_MPL_MULTICHAR_POP_BACK(BOOST_PP_CAT(C,BOOST_PP_DEC(n)))                   \
+                >                                                                                   \
+            type;                                                                                   \
+        };
+
+        BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(BOOST_MPL_STRING_MAX_PARAMS), M0, ~)
+        #undef M0
+    };
+
+    template<typename Tag>
+    struct has_pop_back_impl;
+
+    template<>
+    struct has_pop_back_impl<mpl::string_tag>
+    {
+        template<typename Sequence>
+        struct apply
+          : mpl::true_
+        {};
+    };
+
+    template<typename Tag>
+    struct push_front_impl;
+
+    template<>
+    struct push_front_impl<mpl::string_tag>
+    {
+        template<typename Sequence, typename Value, bool B = (4==BOOST_MPL_MULTICHAR_LENGTH(Sequence::front_))>
+        struct apply
+        {
+            BOOST_MPL_ASSERT_MSG(
+                (BOOST_MPL_LIMIT_STRING_SIZE != mpl::size<Sequence>::type::value)
+              , PUSH_FRONT_FAILED_MPL_STRING_IS_FULL
+              , (Sequence)
+            );
+            // If the above assertion didn't fire, then the string is sparse.
+            // Repack the string and retry the push_front.
+            typedef
+                typename mpl::push_front<
+                    typename mpl::reverse_copy<
+                        Sequence
+                      , mpl::front_inserter<string<> >
+                    >::type
+                  , Value
+                >::type
+            type;
+        };
+
+        #if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
+        template<typename Value>
+        struct apply<mpl::string<>, Value, false>
+        {
+            typedef mpl::string<(char)Value::value> type;
+        };
+        #endif
+
+        #define M0(z,n,data)                                                                        \
+        template<BOOST_PP_ENUM_PARAMS_Z(z, n, int C), typename Value>                               \
+        struct apply<mpl::string<BOOST_PP_ENUM_PARAMS_Z(z, n, C)>, Value, true>                     \
+        {                                                                                           \
+            typedef                                                                                 \
+                mpl::string<                                                                        \
+                    (char)Value::value                                                              \
+                    BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, n, C)                                        \
+                >                                                                                   \
+            type;                                                                                   \
+        };
+
+        BOOST_PP_REPEAT_FROM_TO(1, BOOST_MPL_STRING_MAX_PARAMS, M0, ~)
+        #undef M0
+
+        template<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, int C), typename Value>
+        struct apply<mpl::string<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C)>, Value, false>
+        {
+            typedef
+                mpl::string<
+                    BOOST_MPL_MULTICHAR_PUSH_FRONT(C0, Value::value)
+                  , BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C)
+                >
+            type0;
+
+            #if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
+            typedef
+                typename mpl::if_<
+                    mpl::empty<mpl::string<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C)> >
+                  , mpl::string<(char)Value::value>
+                  , type0
+                >::type
+            type;
+            #else
+            typedef type0 type;
+            #endif
+        };
+    };
+
+    template<typename Tag>
+    struct has_push_front_impl;
+
+    template<>
+    struct has_push_front_impl<mpl::string_tag>
+    {
+        template<typename Sequence>
+        struct apply
+          : mpl::true_
+        {};
+    };
+
+    template<typename Tag>
+    struct pop_front_impl;
+
+    template<>
+    struct pop_front_impl<mpl::string_tag>
+    {
+        template<typename Sequence, bool B = (1==BOOST_MPL_MULTICHAR_LENGTH(Sequence::front_))>
+        struct apply;
+
+        #define M0(z,n,data)                                                                        \
+        template<BOOST_PP_ENUM_PARAMS_Z(z, n, int C)>                                               \
+        struct apply<mpl::string<BOOST_PP_ENUM_PARAMS_Z(z, n, C)>, true>                            \
+        {                                                                                           \
+            BOOST_MPL_ASSERT_MSG((C0 != 0), POP_FRONT_FAILED_MPL_STRING_IS_EMPTY, (mpl::string<>)); \
+            typedef                                                                                 \
+                mpl::string<BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, n, C)>                                \
+            type;                                                                                   \
+        };
+
+        BOOST_PP_REPEAT_FROM_TO(1, BOOST_MPL_STRING_MAX_PARAMS, M0, ~)
+        #undef M0
+
+        template<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, int C)>
+        struct apply<mpl::string<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C)>, false>
+        {
+            typedef
+                mpl::string<
+                    BOOST_MPL_MULTICHAR_POP_FRONT(C0)
+                  , BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C)
+                >
+            type;
+        };
+    };
+
+    template<typename Tag>
+    struct has_pop_front_impl;
+
+    template<>
+    struct has_pop_front_impl<mpl::string_tag>
+    {
+        template<typename Sequence>
+        struct apply
+          : mpl::true_
+        {};
+    };
+
+    template<typename Tag>
+    struct insert_range_impl;
+
+    template<>
+    struct insert_range_impl<mpl::string_tag>
+    {
+        template<typename Sequence, typename Pos, typename Range>
+        struct apply
+          : mpl::copy<
+                mpl::joint_view<
+                    mpl::iterator_range<
+                        mpl::string_iterator<Sequence, 0, 0>
+                      , Pos
+                    >
+                  , mpl::joint_view<
+                        Range
+                      , mpl::iterator_range<
+                            Pos
+                          , typename mpl::end<Sequence>::type
+                        >
+                    >
+                >
+              , mpl::back_inserter<mpl::string<> >
+            >
+        {};
+    };
+
+    template<typename Tag>
+    struct insert_impl;
+
+    template<>
+    struct insert_impl<mpl::string_tag>
+    {
+        template<typename Sequence, typename Pos, typename Value>
+        struct apply
+          : mpl::insert_range<Sequence, Pos, mpl::string<(char)Value::value> >
+        {};
+    };
+
+    template<typename Tag>
+    struct erase_impl;
+
+    template<>
+    struct erase_impl<mpl::string_tag>
+    {
+        template<typename Sequence, typename First, typename Last>
+        struct apply
+          : mpl::copy<
+                mpl::joint_view<
+                    mpl::iterator_range<
+                        mpl::string_iterator<Sequence, 0, 0>
+                      , First
+                    >
+                  , mpl::iterator_range<
+                        typename mpl::if_na<Last, typename mpl::next<First>::type>::type
+                      , typename mpl::end<Sequence>::type
+                    >
+                >
+              , mpl::back_inserter<mpl::string<> >
+            >
+        {};
+    };
+
+    template<typename Tag>
+    struct clear_impl;
+
+    template<>
+    struct clear_impl<mpl::string_tag>
+    {
+        template<typename>
+        struct apply
+        {
+            typedef mpl::string<> type;
+        };
+    };
+
+    #define M0(z, n, data)                                                                            \
+    template<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, int C), int J>                         \
+    struct string_iterator<mpl::string<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C)>, n, J>   \
+    {                                                                                                 \
+        enum { eomc_ = (BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, n)) == J + 1) };                   \
+        typedef mpl::string<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C)> string;             \
+        typedef std::bidirectional_iterator_tag category;                                             \
+        typedef                                                                                       \
+            mpl::string_iterator<string, n + eomc_, eomc_ ? 0 : J + 1>                                \
+        next;                                                                                         \
+        typedef                                                                                       \
+            mpl::string_iterator<string, n, J - 1>                                                    \
+        prior;                                                                                        \
+        typedef mpl::char_<BOOST_MPL_MULTICHAR_AT(BOOST_PP_CAT(C, n), J)> type;                       \
+    };                                                                                                \
+    template<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, int C)>                                \
+    struct string_iterator<mpl::string<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C)>, n, 0>   \
+    {                                                                                                 \
+        enum { eomc_ = (BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, n)) == 1) };                       \
+        typedef mpl::string<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C)> string;             \
+        typedef std::bidirectional_iterator_tag category;                                             \
+        typedef                                                                                       \
+            mpl::string_iterator<string, n + eomc_, !eomc_>                                           \
+        next;                                                                                         \
+        typedef                                                                                       \
+            mpl::string_iterator<                                                                     \
+                string                                                                                \
+              , n - 1                                                                                 \
+              , BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, BOOST_PP_DEC(n))) - 1                      \
+            >                                                                                         \
+        prior;                                                                                        \
+        typedef mpl::char_<BOOST_MPL_MULTICHAR_AT(BOOST_PP_CAT(C, n), 0)> type;                       \
+    };
+
+    BOOST_PP_REPEAT(BOOST_MPL_STRING_MAX_PARAMS, M0, ~)
+    #undef M0
+
+    template<BOOST_PP_ENUM_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, int C)>
+    struct string
+    {
+        /// INTERNAL ONLY
+        enum
+        {
+            front_  = C0
+          , back_   = BOOST_PP_CAT(C, BOOST_PP_DEC(BOOST_MPL_STRING_MAX_PARAMS))
+        };
+
+        typedef char        value_type;
+        typedef string      type;
+        typedef string_tag  tag;
+    };
+
+    namespace aux_
+    {
+        template<typename It, typename End>
+        struct next_unless
+          : mpl::next<It>
+        {};
+
+        template<typename End>
+        struct next_unless<End, End>
+        {
+            typedef End type;
+        };
+
+        template<typename It, typename End>
+        struct deref_unless
+          : mpl::deref<It>
+        {};
+
+        template<typename End>
+        struct deref_unless<End, End>
+        {
+            typedef mpl::char_<'\0'> type;
+        };
+    }
+
+    template<typename Sequence>
+    struct c_str
+    {
+        typedef typename mpl::end<Sequence>::type iend;
+        typedef typename mpl::begin<Sequence>::type i0;
+        #define M0(z, n, data)                                                                      \
+        typedef                                                                                     \
+            typename mpl::aux_::next_unless<BOOST_PP_CAT(i, n), iend>::type                         \
+        BOOST_PP_CAT(i, BOOST_PP_INC(n));
+        BOOST_PP_REPEAT(BOOST_MPL_LIMIT_STRING_SIZE, M0, ~)
+        #undef M0
+
+        typedef c_str type;
+        static typename Sequence::value_type const value[BOOST_MPL_LIMIT_STRING_SIZE+1];
+    };
+
+    template<typename Sequence>
+    typename Sequence::value_type const c_str<Sequence>::value[BOOST_MPL_LIMIT_STRING_SIZE+1] =
+    {
+        #define M0(z, n, data)                                                                      \
+        mpl::aux_::deref_unless<BOOST_PP_CAT(i, n), iend>::type::value,
+        BOOST_PP_REPEAT(BOOST_MPL_LIMIT_STRING_SIZE, M0, ~)
+        #undef M0
+        '\0'
+    };
+
+}} // namespace boost
+
+#endif // BOOST_MPL_STRING_HPP_INCLUDED
diff --git a/ext/boost/mpl/switch.hpp b/ext/boost/mpl/switch.hpp
new file mode 100644
index 0000000..b5cba77
--- /dev/null
+++ b/ext/boost/mpl/switch.hpp
@@ -0,0 +1,49 @@
+
+#ifndef BOOST_MPL_SWITCH_HPP_INCLUDED
+#define BOOST_MPL_SWITCH_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: switch.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/find_if.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/pair.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template< 
+      typename BOOST_MPL_AUX_NA_PARAM(Body)
+    , typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct switch_
+{
+    typedef typename find_if<
+          Body
+        , apply1< lambda< first<_1> >, T >
+        >::type iter_;
+        
+    typedef typename deref<iter_>::type pair_;
+    typedef typename lambda< typename second<pair_>::type >::type f_;
+    typedef typename apply1<f_,T>::type type;
+
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,switch_,(Body,T))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, switch_)
+
+}}
+
+#endif // BOOST_MPL_SWITCH_HPP_INCLUDED
diff --git a/ext/boost/mpl/tag.hpp b/ext/boost/mpl/tag.hpp
new file mode 100644
index 0000000..fc0aee2
--- /dev/null
+++ b/ext/boost/mpl/tag.hpp
@@ -0,0 +1,52 @@
+
+#ifndef BOOST_MPL_TAG_HPP_INCLUDED
+#define BOOST_MPL_TAG_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/aux_/has_tag.hpp>
+#include <boost/mpl/aux_/config/eti.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template< typename T > struct tag_impl
+{
+    typedef typename T::tag type;
+};
+}
+
+template< typename T, typename Default = void_ > struct tag
+#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
+    : if_< 
+          aux::has_tag<T>
+        , aux::tag_impl<T>
+        , Default
+        >::type
+{
+#else
+{
+    typedef typename eval_if< 
+          aux::has_tag<T>
+        , aux::tag_impl<T>
+        , Default
+        >::type type;
+
+#endif
+};
+
+}}
+
+#endif // BOOST_MPL_TAG_HPP_INCLUDED
diff --git a/ext/boost/mpl/times.hpp b/ext/boost/mpl/times.hpp
new file mode 100644
index 0000000..c73256d
--- /dev/null
+++ b/ext/boost/mpl/times.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_TIMES_HPP_INCLUDED
+#define BOOST_MPL_TIMES_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: times.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME times
+#define AUX778076_OP_TOKEN *
+#include <boost/mpl/aux_/arithmetic_op.hpp>
+
+#endif // BOOST_MPL_TIMES_HPP_INCLUDED
diff --git a/ext/boost/mpl/transform.hpp b/ext/boost/mpl/transform.hpp
new file mode 100644
index 0000000..cb2b64e
--- /dev/null
+++ b/ext/boost/mpl/transform.hpp
@@ -0,0 +1,145 @@
+
+#ifndef BOOST_MPL_TRANSFORM_HPP_INCLUDED
+#define BOOST_MPL_TRANSFORM_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: transform.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/reverse_fold.hpp>
+#include <boost/mpl/pair_view.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/bind.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/mpl/aux_/inserter_algorithm.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux { 
+
+template< 
+      typename Seq
+    , typename Op
+    , typename In
+    >
+struct transform1_impl
+    : fold< 
+          Seq
+        , typename In::state
+        , bind2< typename lambda< typename In::operation >::type
+            , _1
+            , bind1< typename lambda<Op>::type, _2>
+            > 
+        >
+{
+};
+
+template< 
+      typename Seq
+    , typename Op
+    , typename In
+    >
+struct reverse_transform1_impl
+    : reverse_fold< 
+          Seq
+        , typename In::state
+        , bind2< typename lambda< typename In::operation >::type
+            , _1
+            , bind1< typename lambda<Op>::type, _2>
+            > 
+        >
+{
+};
+
+template< 
+      typename Seq1
+    , typename Seq2
+    , typename Op
+    , typename In
+    >
+struct transform2_impl
+    : fold< 
+          pair_view<Seq1,Seq2>
+        , typename In::state
+        , bind2< typename lambda< typename In::operation >::type
+            , _1
+            , bind2<
+                  typename lambda<Op>::type
+                , bind1<first<>,_2>
+                , bind1<second<>,_2>
+                >
+            > 
+        >
+{
+};
+
+template< 
+      typename Seq1
+    , typename Seq2
+    , typename Op
+    , typename In
+    >
+struct reverse_transform2_impl
+    : reverse_fold< 
+          pair_view<Seq1,Seq2>
+        , typename In::state
+        , bind2< typename lambda< typename In::operation >::type
+            , _1
+            , bind2< typename lambda< Op >::type
+                , bind1<first<>,_2>
+                , bind1<second<>,_2>
+                >
+            > 
+        >
+{
+};
+
+} // namespace aux 
+
+BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, transform1)                    
+BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, transform2)
+    
+#define AUX778076_TRANSFORM_DEF(name)                                   \
+template<                                                               \
+      typename BOOST_MPL_AUX_NA_PARAM(Seq1)                             \
+    , typename BOOST_MPL_AUX_NA_PARAM(Seq2OrOperation)                  \
+    , typename BOOST_MPL_AUX_NA_PARAM(OperationOrInserter)              \
+    , typename BOOST_MPL_AUX_NA_PARAM(Inserter)                         \
+    >                                                                   \
+struct name                                                             \
+{                                                                       \
+    typedef typename eval_if<                                           \
+          or_<                                                          \
+              is_na<OperationOrInserter>                                \
+            , is_lambda_expression< Seq2OrOperation >                   \
+            , not_< is_sequence<Seq2OrOperation> >                      \
+            >                                                           \
+        , name##1<Seq1,Seq2OrOperation,OperationOrInserter>             \
+        , name##2<Seq1,Seq2OrOperation,OperationOrInserter,Inserter>    \
+        >::type type;                                                   \
+};                                                                      \
+BOOST_MPL_AUX_NA_SPEC(4, name)                                          \
+/**/
+
+AUX778076_TRANSFORM_DEF(transform)
+AUX778076_TRANSFORM_DEF(reverse_transform)
+
+#undef AUX778076_TRANSFORM_DEF
+
+}}
+
+#endif // BOOST_MPL_TRANSFORM_HPP_INCLUDED
diff --git a/ext/boost/mpl/transform_view.hpp b/ext/boost/mpl/transform_view.hpp
new file mode 100644
index 0000000..88b46b1
--- /dev/null
+++ b/ext/boost/mpl/transform_view.hpp
@@ -0,0 +1,46 @@
+
+#ifndef BOOST_MPL_TRANSFORM_VIEW_HPP_INCLUDED
+#define BOOST_MPL_TRANSFORM_VIEW_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: transform_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/aux_/transform_iter.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(F)
+    >
+struct transform_view
+{
+ private:
+    typedef typename lambda<F>::type f_;
+    typedef typename begin<Sequence>::type first_;
+    typedef typename end<Sequence>::type last_;
+ 
+ public:
+    struct tag;
+    typedef transform_view type;
+    typedef aux::transform_iter< first_,last_,f_ > begin;
+    typedef aux::transform_iter< last_,last_,f_ > end;
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, transform_view)
+
+}}
+
+#endif // BOOST_MPL_TRANSFORM_VIEW_HPP_INCLUDED
diff --git a/ext/boost/mpl/unique.hpp b/ext/boost/mpl/unique.hpp
new file mode 100644
index 0000000..7e9c1e9
--- /dev/null
+++ b/ext/boost/mpl/unique.hpp
@@ -0,0 +1,85 @@
+
+#ifndef BOOST_MPL_UNIQUE_HPP_INCLUDED
+#define BOOST_MPL_UNIQUE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright John R. Bandela 2000-2002
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: unique.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/reverse_fold.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/pair.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/aux_/inserter_algorithm.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_spec.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< typename Predicate, typename Operation >
+struct unique_op
+{
+    template< typename Pair, typename T > struct apply
+    {
+        typedef typename Pair::first seq_;
+        typedef typename Pair::second prior_;
+        typedef typename eval_if<
+              and_< is_not_na<prior_>, apply2<Predicate,prior_,T> >
+            , identity<seq_>
+            , apply2<Operation,seq_,T>
+            >::type new_seq_;
+
+        typedef pair<new_seq_,T> type;
+    };
+};
+
+template<
+      typename Sequence
+    , typename Predicate
+    , typename Inserter
+    >
+struct unique_impl
+    : first< typename fold<
+          Sequence
+        , pair< typename Inserter::state,na >
+        , protect< aux::unique_op<Predicate,typename Inserter::operation> >
+        >::type >
+{
+};
+
+template<
+      typename Sequence
+    , typename Predicate
+    , typename Inserter
+    >
+struct reverse_unique_impl
+    : first< typename reverse_fold<
+          Sequence
+        , pair< typename Inserter::state,na >
+        , protect< aux::unique_op<Predicate,typename Inserter::operation> >
+        >::type >
+{
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, unique)
+
+}}
+
+#endif // BOOST_MPL_UNIQUE_HPP_INCLUDED
diff --git a/ext/boost/mpl/unpack_args.hpp b/ext/boost/mpl/unpack_args.hpp
new file mode 100644
index 0000000..1e4d48c
--- /dev/null
+++ b/ext/boost/mpl/unpack_args.hpp
@@ -0,0 +1,150 @@
+
+#if !defined(BOOST_PP_IS_ITERATING)
+
+///// header body
+
+#ifndef BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED
+#define BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: unpack_args.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/apply.hpp>
+#   include <boost/mpl/at.hpp>
+#   include <boost/mpl/size.hpp>
+#   include <boost/mpl/aux_/nttp_decl.hpp>
+#   include <boost/mpl/aux_/lambda_spec.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER unpack_args.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/limits/arity.hpp>
+#   include <boost/mpl/aux_/preprocessor/repeat.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   include <boost/mpl/aux_/config/forwarding.hpp>
+#   include <boost/preprocessor/iterate.hpp>
+#   include <boost/preprocessor/cat.hpp>
+
+
+namespace boost { namespace mpl {
+
+// local macros, #undef-ined at the end of the header
+
+#   define AUX778076_UNPACK(unused, i, Args) \
+    , typename at_c<Args,i>::type \
+    /**/
+
+#   define AUX778076_UNPACKED_ARGS(n, Args) \
+    BOOST_MPL_PP_REPEAT(n, AUX778076_UNPACK, Args) \
+    /**/
+
+namespace aux {
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+template< int size, typename F, typename Args >
+struct unpack_args_impl;
+#else
+template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl
+{
+    template< typename F, typename Args > struct apply;
+};
+#endif
+
+#define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/unpack_args.hpp>))
+#include BOOST_PP_ITERATE()
+
+}
+
+template<
+      typename F
+    >
+struct unpack_args
+{
+    template< typename Args > struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
+#   if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+        : aux::unpack_args_impl< size<Args>::value,F,Args >
+#   else
+        : aux::unpack_args_impl< size<Args>::value >
+            ::template apply< F,Args >
+#   endif
+    {
+#else // BOOST_MPL_CFG_NO_NESTED_FORWARDING
+    {
+        typedef typename aux::unpack_args_impl< 
+              size<Args>::value
+            , F
+            , Args
+            >::type type;
+#endif
+    };
+};
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
+
+#   undef AUX778076_UNPACK
+#   undef AUX778076_UNPACKED_ARGS
+
+}}
+
+#endif // BOOST_MPL_CFG_USE_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED
+
+///// iteration, depth == 1
+
+// For gcc 4.4 compatability, we must include the
+// BOOST_PP_ITERATION_DEPTH test inside an #else clause.
+#else // BOOST_PP_IS_ITERATING
+#if BOOST_PP_ITERATION_DEPTH() == 1
+
+#   define i_ BOOST_PP_FRAME_ITERATION(1)
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< typename F, typename Args >
+struct unpack_args_impl<i_,F,Args>
+    : BOOST_PP_CAT(apply,i_)<
+          F
+        AUX778076_UNPACKED_ARGS(i_, Args)
+        >
+{
+};
+
+#else
+
+template<> struct unpack_args_impl<i_>
+{
+    template< typename F, typename Args > struct apply
+        : BOOST_PP_CAT(apply,i_)<
+              F
+            AUX778076_UNPACKED_ARGS(i_, Args)
+            >
+    {
+    };
+};
+
+#endif
+
+#   undef i_
+
+#endif // BOOST_PP_ITERATION_DEPTH()
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ext/boost/mpl/upper_bound.hpp b/ext/boost/mpl/upper_bound.hpp
new file mode 100644
index 0000000..caf5cdf
--- /dev/null
+++ b/ext/boost/mpl/upper_bound.hpp
@@ -0,0 +1,141 @@
+
+#ifndef BOOST_MPL_UPPER_BOUND_HPP_INCLUDED
+#define BOOST_MPL_UPPER_BOUND_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2001-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: upper_bound.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/less.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
+#   define BOOST_MPL_CFG_STRIPPED_DOWN_UPPER_BOUND_IMPL
+#endif
+
+#if !defined(BOOST_MPL_CFG_STRIPPED_DOWN_UPPER_BOUND_IMPL)
+#   include <boost/mpl/minus.hpp>
+#   include <boost/mpl/divides.hpp>
+#   include <boost/mpl/size.hpp>
+#   include <boost/mpl/advance.hpp>
+#   include <boost/mpl/begin_end.hpp>
+#   include <boost/mpl/long.hpp>
+#   include <boost/mpl/eval_if.hpp>
+#   include <boost/mpl/prior.hpp>
+#   include <boost/mpl/deref.hpp>
+#   include <boost/mpl/apply.hpp>
+#   include <boost/mpl/aux_/value_wknd.hpp>
+#else
+#   include <boost/mpl/find.hpp>
+#   include <boost/mpl/bind.hpp>
+#endif
+
+#include <boost/config.hpp>
+
+namespace boost { namespace mpl {
+
+#if defined(BOOST_MPL_CFG_STRIPPED_DOWN_UPPER_BOUND_IMPL)
+
+// agurt 23/oct/02: has a wrong complexity etc., but at least it works;
+// feel free to contribute a better implementation!
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(T)
+    , typename Predicate = less<>
+    , typename pred_ = typename lambda<Predicate>::type
+    >
+struct upper_bound
+    : find_if< Sequence, bind2<pred_,T,_> >
+{
+};
+
+#else
+
+namespace aux {
+
+template<
+      typename Distance
+    , typename Predicate
+    , typename T
+    , typename DeferredIterator
+    >
+struct upper_bound_step_impl;
+
+template< 
+      typename Distance
+    , typename Predicate
+    , typename T
+    , typename DeferredIterator
+    >
+struct upper_bound_step
+{
+    typedef typename eval_if<
+          Distance
+        , upper_bound_step_impl<Distance,Predicate,T,DeferredIterator>
+        , DeferredIterator
+        >::type type;
+};
+    
+template<
+      typename Distance
+    , typename Predicate
+    , typename T
+    , typename DeferredIterator
+    >
+struct upper_bound_step_impl
+{
+    typedef typename divides< Distance, long_<2> >::type offset_;
+    typedef typename DeferredIterator::type iter_;
+    typedef typename advance< iter_,offset_ >::type middle_;
+    typedef typename apply2<
+              Predicate
+            , T
+            , typename deref<middle_>::type
+            >::type cond_;
+
+    typedef typename prior< minus< Distance, offset_ > >::type step_;
+    typedef upper_bound_step< offset_,Predicate,T,DeferredIterator > step_forward_;
+    typedef upper_bound_step< step_,Predicate,T,next<middle_> > step_backward_;
+    typedef typename eval_if<
+          cond_
+        , step_forward_
+        , step_backward_
+        >::type type;
+};
+
+} // namespace aux
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(T)
+    , typename Predicate = less<>
+    >
+struct upper_bound
+{
+ private:
+    typedef typename lambda<Predicate>::type pred_;
+    typedef typename size<Sequence>::type size_;
+
+ public:
+    typedef typename aux::upper_bound_step<
+        size_,pred_,T,begin<Sequence>
+        >::type type;
+};
+
+#endif // BOOST_MPL_CFG_STRIPPED_DOWN_UPPER_BOUND_IMPL
+
+BOOST_MPL_AUX_NA_SPEC(2, upper_bound)
+
+}}
+
+#endif // BOOST_MPL_UPPER_BOUND_HPP_INCLUDED
diff --git a/ext/boost/mpl/value_type.hpp b/ext/boost/mpl/value_type.hpp
new file mode 100644
index 0000000..ad34393
--- /dev/null
+++ b/ext/boost/mpl/value_type.hpp
@@ -0,0 +1,42 @@
+
+#ifndef BOOST_MPL_VALUE_TYPE_HPP_INCLUDED
+#define BOOST_MPL_VALUE_TYPE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: value_type.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/value_type_fwd.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/apply_wrap.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(AssociativeSequence)
+    , typename BOOST_MPL_AUX_NA_PARAM(T)
+    >
+struct value_type
+    : apply_wrap2<
+          value_type_impl< typename sequence_tag<AssociativeSequence>::type >
+        , AssociativeSequence, T >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2,value_type,(AssociativeSequence,T))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, value_type)
+    
+}}
+
+#endif // BOOST_MPL_VALUE_TYPE_HPP_INCLUDED
diff --git a/ext/boost/mpl/value_type_fwd.hpp b/ext/boost/mpl/value_type_fwd.hpp
new file mode 100644
index 0000000..e9f0b28
--- /dev/null
+++ b/ext/boost/mpl/value_type_fwd.hpp
@@ -0,0 +1,25 @@
+
+#ifndef BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED
+#define BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2003-2004
+// Copyright David Abrahams 2003-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: value_type_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct value_type_impl;
+template< typename AssociativeSequence, typename T > struct value_type;
+
+}}
+
+#endif // BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector.hpp b/ext/boost/mpl/vector.hpp
new file mode 100644
index 0000000..833f193
--- /dev/null
+++ b/ext/boost/mpl/vector.hpp
@@ -0,0 +1,57 @@
+
+#ifndef BOOST_MPL_VECTOR_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: vector.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/limits/vector.hpp>
+#   include <boost/mpl/aux_/na.hpp>
+#   include <boost/mpl/aux_/config/preprocessor.hpp>
+
+#   include <boost/preprocessor/inc.hpp>
+#   include <boost/preprocessor/cat.hpp>
+#   include <boost/preprocessor/stringize.hpp>
+
+#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
+#   define AUX778076_VECTOR_HEADER \
+    BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE).hpp \
+    /**/
+#else
+#   define AUX778076_VECTOR_HEADER \
+    BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE)##.hpp \
+    /**/
+#endif
+
+#   include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_VECTOR_HEADER)
+#   undef AUX778076_VECTOR_HEADER
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER vector.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/limits/vector.hpp>
+
+#   define AUX778076_SEQUENCE_NAME vector
+#   define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_VECTOR_SIZE
+#   include <boost/mpl/aux_/sequence_wrapper.hpp>
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_VECTOR_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/aux_/O1_size.hpp b/ext/boost/mpl/vector/aux_/O1_size.hpp
new file mode 100644
index 0000000..3ca8d21
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/O1_size.hpp
@@ -0,0 +1,56 @@
+
+#ifndef BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/O1_size_fwd.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/vector/aux_/tag.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+namespace boost { namespace mpl {
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+template<>
+struct O1_size_impl< aux::vector_tag >
+{
+    template< typename Vector > struct apply
+        : Vector::size
+    {
+    };
+};
+
+#else
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< long N >
+struct O1_size_impl< aux::vector_tag<N> >
+{
+    template< typename Vector > struct apply
+        : mpl::long_<N>
+    {
+    };
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+}}
+
+#endif // BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/aux_/at.hpp b/ext/boost/mpl/vector/aux_/at.hpp
new file mode 100644
index 0000000..9da0595
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/at.hpp
@@ -0,0 +1,116 @@
+
+#ifndef BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: at.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/at_fwd.hpp>
+#include <boost/mpl/vector/aux_/tag.hpp>
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/aux_/nttp_decl.hpp>
+#include <boost/mpl/aux_/type_wrapper.hpp>
+#include <boost/mpl/aux_/value_wknd.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+namespace boost { namespace mpl {
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+template< typename Vector, long n_ >
+struct v_at_impl
+{
+    typedef long_< (Vector::lower_bound_::value + n_) > index_;
+    typedef __typeof__( Vector::item_(index_()) ) type;
+};
+
+
+template< typename Vector, long n_ >
+struct v_at
+    : aux::wrapped_type< typename v_at_impl<Vector,n_>::type >
+{
+};
+
+template<>
+struct at_impl< aux::vector_tag >
+{
+    template< typename Vector, typename N > struct apply
+        : v_at<
+              Vector
+            , BOOST_MPL_AUX_VALUE_WKND(N)::value
+            >
+    {
+    };
+};
+
+#else
+
+#   if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+    && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC)
+
+template< typename Vector, BOOST_MPL_AUX_NTTP_DECL(long, n_) > struct v_at;
+
+template< BOOST_MPL_AUX_NTTP_DECL(long, n_) >
+struct at_impl< aux::vector_tag<n_> >
+{
+    template< typename Vector, typename N > struct apply
+#if !defined(__BORLANDC__)
+        : v_at<
+              Vector
+            , BOOST_MPL_AUX_VALUE_WKND(N)::value
+            >
+    {
+#else
+    {
+        typedef typename v_at<
+              Vector
+            , BOOST_MPL_AUX_VALUE_WKND(N)::value
+            >::type type;
+#endif
+    };
+};
+
+#   else
+
+namespace aux {
+
+template< BOOST_MPL_AUX_NTTP_DECL(long, n_) > struct v_at_impl
+{
+    template< typename V > struct result_;
+};
+
+// to work around ETI, etc.
+template<> struct v_at_impl<-1>
+{
+    template< typename V > struct result_
+    {
+        typedef void_ type;
+    };
+};
+
+} // namespace aux
+
+template< typename T, BOOST_MPL_AUX_NTTP_DECL(long, n_) >
+struct v_at
+    : aux::v_at_impl<n_>::template result_<T>
+{
+};
+
+#   endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+}}
+
+#endif // BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/aux_/back.hpp b/ext/boost/mpl/vector/aux_/back.hpp
new file mode 100644
index 0000000..ce84c7a
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/back.hpp
@@ -0,0 +1,59 @@
+
+#ifndef BOOST_MPL_VECTOR_AUX_BACK_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_AUX_BACK_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/back_fwd.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/vector/aux_/at.hpp>
+#include <boost/mpl/vector/aux_/tag.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+namespace boost { namespace mpl {
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+template<>
+struct back_impl< aux::vector_tag >
+{
+    template< typename Vector > struct apply
+        : v_at<
+              Vector
+            , prior<typename Vector::size>::type::value
+            >
+    {
+    };
+};
+
+#else
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< long n_ >
+struct back_impl< aux::vector_tag<n_> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+}}
+
+#endif // BOOST_MPL_VECTOR_AUX_BACK_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/aux_/begin_end.hpp b/ext/boost/mpl/vector/aux_/begin_end.hpp
new file mode 100644
index 0000000..d79ef9a
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/begin_end.hpp
@@ -0,0 +1,49 @@
+
+#ifndef BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: begin_end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/typeof.hpp>
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+#   include <boost/mpl/begin_end_fwd.hpp>
+#   include <boost/mpl/vector/aux_/iterator.hpp>
+#   include <boost/mpl/vector/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct begin_impl< aux::vector_tag >
+{
+    template< typename Vector > struct apply
+    {
+        typedef v_iter<Vector,0> type;
+    };
+};
+
+template<>
+struct end_impl< aux::vector_tag >
+{
+    template< typename Vector > struct apply
+    {
+        typedef v_iter<Vector,Vector::size::value> type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+#endif // BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/aux_/clear.hpp b/ext/boost/mpl/vector/aux_/clear.hpp
new file mode 100644
index 0000000..3308518
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/clear.hpp
@@ -0,0 +1,55 @@
+
+#ifndef BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: clear.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/clear_fwd.hpp>
+#include <boost/mpl/vector/aux_/vector0.hpp>
+#include <boost/mpl/vector/aux_/tag.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+namespace boost { namespace mpl {
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+template<>
+struct clear_impl< aux::vector_tag >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+#else
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< long N >
+struct clear_impl< aux::vector_tag<N> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+}}
+
+#endif // BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/aux_/empty.hpp b/ext/boost/mpl/vector/aux_/empty.hpp
new file mode 100644
index 0000000..84c8792
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/empty.hpp
@@ -0,0 +1,68 @@
+
+#ifndef BOOST_MPL_VECTOR_AUX_EMPTY_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_AUX_EMPTY_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/empty_fwd.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/vector/aux_/tag.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace mpl {
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+template<>
+struct empty_impl< aux::vector_tag >
+{
+    template< typename Vector > struct apply
+        : is_same<
+              typename Vector::lower_bound_
+            , typename Vector::upper_bound_
+            >
+    {
+    };
+};
+
+#else
+
+template<>
+struct empty_impl< aux::vector_tag<0> >
+{
+    template< typename Vector > struct apply
+        : true_
+    {
+    };
+};
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< long N >
+struct empty_impl< aux::vector_tag<N> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+}}
+
+#endif // BOOST_MPL_VECTOR_AUX_EMPTY_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/aux_/front.hpp b/ext/boost/mpl/vector/aux_/front.hpp
new file mode 100644
index 0000000..ff2414e
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/front.hpp
@@ -0,0 +1,56 @@
+
+#ifndef BOOST_MPL_VECTOR_AUX_FRONT_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_AUX_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/front_fwd.hpp>
+#include <boost/mpl/vector/aux_/at.hpp>
+#include <boost/mpl/vector/aux_/tag.hpp>
+#include <boost/mpl/aux_/nttp_decl.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+namespace boost { namespace mpl {
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+template<>
+struct front_impl< aux::vector_tag >
+{
+    template< typename Vector > struct apply
+        : v_at<Vector,0>
+    {
+    };
+};
+
+#else
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< BOOST_MPL_AUX_NTTP_DECL(long, n_) >
+struct front_impl< aux::vector_tag<n_> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+}}
+
+#endif // BOOST_MPL_VECTOR_AUX_FRONT_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/aux_/include_preprocessed.hpp b/ext/boost/mpl/vector/aux_/include_preprocessed.hpp
new file mode 100644
index 0000000..5c16008
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/include_preprocessed.hpp
@@ -0,0 +1,55 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+// Copyright Aleksey Gurtovoy 2000-2006
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/typeof.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+#include <boost/mpl/aux_/config/preprocessor.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/stringize.hpp>
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+#   define AUX778076_INCLUDE_DIR typeof_based
+#elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+   || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC)
+#   define AUX778076_INCLUDE_DIR no_ctps
+#else
+#   define AUX778076_INCLUDE_DIR plain
+#endif
+
+#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
+#   define AUX778076_HEADER \
+    AUX778076_INCLUDE_DIR/BOOST_MPL_PREPROCESSED_HEADER \
+/**/
+#else
+#   define AUX778076_HEADER \
+    BOOST_PP_CAT(AUX778076_INCLUDE_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \
+/**/
+#endif
+
+
+#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700))
+#   define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/vector/aux_/preprocessed/AUX778076_HEADER)
+#   include AUX778076_INCLUDE_STRING
+#   undef AUX778076_INCLUDE_STRING
+#else
+#   include BOOST_PP_STRINGIZE(boost/mpl/vector/aux_/preprocessed/AUX778076_HEADER)
+#endif
+
+#   undef AUX778076_HEADER
+#   undef AUX778076_INCLUDE_DIR
+
+#undef BOOST_MPL_PREPROCESSED_HEADER
diff --git a/ext/boost/mpl/vector/aux_/item.hpp b/ext/boost/mpl/vector/aux_/item.hpp
new file mode 100644
index 0000000..da2b01b
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/item.hpp
@@ -0,0 +1,103 @@
+
+#ifndef BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/aux_/type_wrapper.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+namespace boost { namespace mpl {
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+template< 
+      typename T
+    , typename Base
+    , int at_front = 0
+    >
+struct v_item
+    : Base
+{
+    typedef typename Base::upper_bound_ index_;
+    typedef typename next<index_>::type upper_bound_;
+    typedef typename next<typename Base::size>::type size;
+    typedef Base base;
+    typedef v_item type;
+
+    // agurt 10/sep/04: MWCW <= 9.3 workaround here and below; the compiler
+    // breaks if using declaration comes _before_ the new overload
+    static aux::type_wrapper<T> item_(index_);
+    using Base::item_;
+};
+
+template<
+      typename T
+    , typename Base
+    >
+struct v_item<T,Base,1>
+    : Base
+{
+    typedef typename prior<typename Base::lower_bound_>::type index_;
+    typedef index_ lower_bound_;
+    typedef typename next<typename Base::size>::type size;
+    typedef Base base;
+    typedef v_item type;
+
+    static aux::type_wrapper<T> item_(index_);
+    using Base::item_;
+};
+
+// "erasure" item
+template< 
+      typename Base
+    , int at_front
+    >
+struct v_mask
+    : Base
+{
+    typedef typename prior<typename Base::upper_bound_>::type index_;
+    typedef index_ upper_bound_;
+    typedef typename prior<typename Base::size>::type size;
+    typedef Base base;
+    typedef v_mask type;
+
+    static aux::type_wrapper<void_> item_(index_);
+    using Base::item_;
+};
+
+template< 
+      typename Base
+    >
+struct v_mask<Base,1>
+    : Base
+{
+    typedef typename Base::lower_bound_ index_;
+    typedef typename next<index_>::type lower_bound_;
+    typedef typename prior<typename Base::size>::type size;
+    typedef Base base;
+    typedef v_mask type;
+
+    static aux::type_wrapper<void_> item_(index_);
+    using Base::item_;
+};
+
+#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+}}
+
+#endif // BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/aux_/iterator.hpp b/ext/boost/mpl/vector/aux_/iterator.hpp
new file mode 100644
index 0000000..770ed15
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/iterator.hpp
@@ -0,0 +1,130 @@
+
+#ifndef BOOST_MPL_AUX_VECTOR_ITERATOR_HPP_INCLUDED
+#define BOOST_MPL_AUX_VECTOR_ITERATOR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/vector/aux_/at.hpp>
+#include <boost/mpl/iterator_tags.hpp>
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/advance_fwd.hpp>
+#include <boost/mpl/distance_fwd.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/prior.hpp>
+#include <boost/mpl/aux_/nttp_decl.hpp>
+#include <boost/mpl/aux_/value_wknd.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename Vector
+    , BOOST_MPL_AUX_NTTP_DECL(long, n_)
+    >
+struct v_iter
+{
+    typedef aux::v_iter_tag tag;
+    typedef random_access_iterator_tag category;
+    typedef typename v_at<Vector,n_>::type type;
+
+    typedef Vector vector_;
+    typedef mpl::long_<n_> pos;
+
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+    enum { 
+          next_ = n_ + 1
+        , prior_ = n_ - 1
+        , pos_ = n_
+    };
+    
+    typedef v_iter<Vector,next_> next;
+    typedef v_iter<Vector,prior_> prior;
+#endif
+
+};
+
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template<
+      typename Vector
+    , BOOST_MPL_AUX_NTTP_DECL(long, n_)
+    >
+struct next< v_iter<Vector,n_> >
+{
+    typedef v_iter<Vector,(n_ + 1)> type;
+};
+
+template<
+      typename Vector
+    , BOOST_MPL_AUX_NTTP_DECL(long, n_)
+    >
+struct prior< v_iter<Vector,n_> >
+{
+    typedef v_iter<Vector,(n_ - 1)> type;
+};
+
+template<
+      typename Vector
+    , BOOST_MPL_AUX_NTTP_DECL(long, n_)
+    , typename Distance
+    >
+struct advance< v_iter<Vector,n_>,Distance>
+{
+    typedef v_iter<
+          Vector
+        , (n_ + BOOST_MPL_AUX_NESTED_VALUE_WKND(long, Distance))
+        > type;
+};
+
+template< 
+      typename Vector
+    , BOOST_MPL_AUX_NTTP_DECL(long, n_)
+    , BOOST_MPL_AUX_NTTP_DECL(long, m_)
+    > 
+struct distance< v_iter<Vector,n_>, v_iter<Vector,m_> >
+    : mpl::long_<(m_ - n_)>
+{
+};
+
+#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+template<> struct advance_impl<aux::v_iter_tag>
+{
+    template< typename Iterator, typename N > struct apply
+    {
+        enum { pos_ = Iterator::pos_, n_ = N::value };
+        typedef v_iter<
+              typename Iterator::vector_
+            , (pos_ + n_)
+            > type;
+    };
+};
+
+template<> struct distance_impl<aux::v_iter_tag>
+{
+    template< typename Iter1, typename Iter2 > struct apply
+    {
+        enum { pos1_ = Iter1::pos_, pos2_ = Iter2::pos_ };
+        typedef long_<( pos2_ - pos1_ )> type;
+        BOOST_STATIC_CONSTANT(long, value = ( pos2_ - pos1_ ));
+    };
+};
+
+#endif
+
+}}
+
+#endif // BOOST_MPL_AUX_VECTOR_ITERATOR_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/aux_/numbered.hpp b/ext/boost/mpl/vector/aux_/numbered.hpp
new file mode 100644
index 0000000..04265a3
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/numbered.hpp
@@ -0,0 +1,218 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+#if defined(BOOST_PP_IS_ITERATING)
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: numbered.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/preprocessor/enum_params.hpp>
+#include <boost/preprocessor/enum_shifted_params.hpp>
+#include <boost/preprocessor/comma_if.hpp>
+#include <boost/preprocessor/repeat.hpp>
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/cat.hpp>
+
+#define i_ BOOST_PP_FRAME_ITERATION(1)
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+#   define AUX778076_VECTOR_TAIL(vector, i_, T) \
+    BOOST_PP_CAT(vector,i_)< \
+          BOOST_PP_ENUM_PARAMS(i_, T) \
+        > \
+    /**/
+
+#if i_ > 0
+template<
+      BOOST_PP_ENUM_PARAMS(i_, typename T)
+    >
+struct BOOST_PP_CAT(vector,i_)
+    : v_item<
+          BOOST_PP_CAT(T,BOOST_PP_DEC(i_))
+        , AUX778076_VECTOR_TAIL(vector,BOOST_PP_DEC(i_),T)
+        >
+{
+    typedef BOOST_PP_CAT(vector,i_) type;
+};
+#endif
+
+#   undef AUX778076_VECTOR_TAIL
+
+#else // "brute force" implementation
+
+#   if i_ > 0
+
+template<
+      BOOST_PP_ENUM_PARAMS(i_, typename T)
+    >
+struct BOOST_PP_CAT(vector,i_)
+{
+    typedef aux::vector_tag<i_> tag;
+    typedef BOOST_PP_CAT(vector,i_) type;
+
+#   define AUX778076_VECTOR_ITEM(unused, i_, unused2) \
+    typedef BOOST_PP_CAT(T,i_) BOOST_PP_CAT(item,i_); \
+    /**/
+
+    BOOST_PP_REPEAT(i_, AUX778076_VECTOR_ITEM, unused)
+#   undef AUX778076_VECTOR_ITEM
+    typedef void_ BOOST_PP_CAT(item,i_);
+    typedef BOOST_PP_CAT(T,BOOST_PP_DEC(i_)) back;
+
+    // Borland forces us to use 'type' here (instead of the class name)
+    typedef v_iter<type,0> begin;
+    typedef v_iter<type,i_> end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<BOOST_PP_DEC(i_)> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef BOOST_PP_CAT(vector,i_)<
+              T
+              BOOST_PP_COMMA_IF(BOOST_PP_DEC(i_))
+              BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(i_), typename Vector::item)
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<i_> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef BOOST_PP_CAT(vector,BOOST_PP_DEC(i_))<
+              BOOST_PP_ENUM_SHIFTED_PARAMS(i_, typename Vector::item)
+            > type;
+    };
+};
+
+
+template<>
+struct push_back_impl< aux::vector_tag<BOOST_PP_DEC(i_)> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef BOOST_PP_CAT(vector,i_)<
+              BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(i_), typename Vector::item)
+              BOOST_PP_COMMA_IF(BOOST_PP_DEC(i_))
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<i_> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef BOOST_PP_CAT(vector,BOOST_PP_DEC(i_))<
+              BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(i_), typename Vector::item)
+            > type;
+    };
+};
+
+#   endif // i_ > 0
+
+#   if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+    && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC)
+
+template< typename V >
+struct v_at<V,i_>
+{
+    typedef typename V::BOOST_PP_CAT(item,i_) type;
+};
+
+#   else
+
+namespace aux {
+template<> struct v_at_impl<i_>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::BOOST_PP_CAT(item,i_) type;
+    };
+};
+}
+
+template<>
+struct at_impl< aux::vector_tag<i_> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+#if i_ > 0
+template<>
+struct front_impl< aux::vector_tag<i_> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<i_> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<i_> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+#endif
+
+template<>
+struct size_impl< aux::vector_tag<i_> >
+{
+    template< typename Vector > struct apply
+        : long_<i_>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<i_> >
+    : size_impl< aux::vector_tag<i_> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<i_> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+#   endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+#undef i_
+
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ext/boost/mpl/vector/aux_/numbered_c.hpp b/ext/boost/mpl/vector/aux_/numbered_c.hpp
new file mode 100644
index 0000000..6a7cf40
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/numbered_c.hpp
@@ -0,0 +1,77 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+#if defined(BOOST_PP_IS_ITERATING)
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: numbered_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/preprocessor/enum_params.hpp>
+#include <boost/preprocessor/enum_shifted_params.hpp>
+#include <boost/preprocessor/comma_if.hpp>
+#include <boost/preprocessor/repeat.hpp>
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/cat.hpp>
+
+#define i_ BOOST_PP_FRAME_ITERATION(1)
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+#   define AUX778076_VECTOR_TAIL(vector, i_, C) \
+    BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c)<T \
+          BOOST_PP_COMMA_IF(i_) BOOST_PP_ENUM_PARAMS(i_, C) \
+        > \
+    /**/
+
+#if i_ > 0
+template<
+      typename T
+    , BOOST_PP_ENUM_PARAMS(i_, T C)
+    >
+struct BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c)
+    : v_item<
+          integral_c<T,BOOST_PP_CAT(C,BOOST_PP_DEC(i_))>
+        , AUX778076_VECTOR_TAIL(vector,BOOST_PP_DEC(i_),C)
+        >
+{
+    typedef BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) type;
+    typedef T value_type;
+};
+#endif
+
+#   undef AUX778076_VECTOR_TAIL
+
+#else // "brute force" implementation
+
+#   define AUX778076_VECTOR_C_PARAM_FUNC(unused, i_, param) \
+    BOOST_PP_COMMA_IF(i_) \
+    integral_c<T,BOOST_PP_CAT(param,i_)> \
+    /**/
+
+template<
+      typename T
+    , BOOST_PP_ENUM_PARAMS(i_, T C)
+    >
+struct BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c)
+    : BOOST_PP_CAT(vector,i_)< BOOST_PP_REPEAT(i_,AUX778076_VECTOR_C_PARAM_FUNC,C) >
+{
+    typedef BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) type;
+    typedef T value_type;
+};
+
+#   undef AUX778076_VECTOR_C_PARAM_FUNC
+
+#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+#undef i_
+
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ext/boost/mpl/vector/aux_/pop_back.hpp b/ext/boost/mpl/vector/aux_/pop_back.hpp
new file mode 100644
index 0000000..a43a3a6
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/pop_back.hpp
@@ -0,0 +1,40 @@
+
+#ifndef BOOST_MPL_VECTOR_AUX_POP_BACK_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_AUX_POP_BACK_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: pop_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/pop_back_fwd.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+#   include <boost/mpl/vector/aux_/item.hpp>
+#   include <boost/mpl/vector/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct pop_back_impl< aux::vector_tag >
+{
+    template< typename Vector > struct apply
+    {
+        typedef v_mask<Vector,0> type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+#endif // BOOST_MPL_VECTOR_AUX_POP_BACK_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/aux_/pop_front.hpp b/ext/boost/mpl/vector/aux_/pop_front.hpp
new file mode 100644
index 0000000..a448d25
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/pop_front.hpp
@@ -0,0 +1,40 @@
+
+#ifndef BOOST_MPL_VECTOR_AUX_POP_FRONT_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_AUX_POP_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: pop_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/pop_front_fwd.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+#   include <boost/mpl/vector/aux_/item.hpp>
+#   include <boost/mpl/vector/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct pop_front_impl< aux::vector_tag >
+{
+    template< typename Vector > struct apply
+    {
+        typedef v_mask<Vector,1> type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+#endif // BOOST_MPL_VECTOR_AUX_POP_FRONT_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp
new file mode 100644
index 0000000..c79a1ac
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp
@@ -0,0 +1,1528 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector10.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+namespace aux {
+template<> struct v_at_impl<0>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item0 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<0> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<0> >
+{
+    template< typename Vector > struct apply
+        : long_<0>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<0> >
+    : size_impl< aux::vector_tag<0> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<0> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0
+    >
+struct vector1
+{
+    typedef aux::vector_tag<1> tag;
+    typedef vector1 type;
+    typedef T0 item0;
+    typedef void_ item1;
+    typedef T0 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,1 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<0> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector1<
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<1> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<
+             
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<0> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector1<
+             
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<1> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<
+             
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<1>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item1 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<1> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<1> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<1> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<1> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<1> >
+{
+    template< typename Vector > struct apply
+        : long_<1>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<1> >
+    : size_impl< aux::vector_tag<1> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<1> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1
+    >
+struct vector2
+{
+    typedef aux::vector_tag<2> tag;
+    typedef vector2 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    
+
+    typedef void_ item2;
+    typedef T1 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,2 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<1> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector2<
+              T
+              ,
+              typename Vector::item0
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<2> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector1<
+              typename Vector::item1
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<1> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector2<
+              typename Vector::item0
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<2> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector1<
+              typename Vector::item0
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<2>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item2 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<2> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<2> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<2> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<2> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<2> >
+{
+    template< typename Vector > struct apply
+        : long_<2>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<2> >
+    : size_impl< aux::vector_tag<2> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<2> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct vector3
+{
+    typedef aux::vector_tag<3> tag;
+    typedef vector3 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    
+
+    typedef void_ item3;
+    typedef T2 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,3 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<2> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector3<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<3> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector2<
+              typename Vector::item1, typename Vector::item2
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<2> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector3<
+              typename Vector::item0, typename Vector::item1
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<3> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector2<
+              typename Vector::item0, typename Vector::item1
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<3>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item3 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<3> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<3> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<3> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<3> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<3> >
+{
+    template< typename Vector > struct apply
+        : long_<3>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<3> >
+    : size_impl< aux::vector_tag<3> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<3> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct vector4
+{
+    typedef aux::vector_tag<4> tag;
+    typedef vector4 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    
+
+    typedef void_ item4;
+    typedef T3 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,4 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<3> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector4<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<4> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector3<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<3> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector4<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<4> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector3<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<4>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item4 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<4> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<4> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<4> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<4> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<4> >
+{
+    template< typename Vector > struct apply
+        : long_<4>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<4> >
+    : size_impl< aux::vector_tag<4> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<4> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct vector5
+{
+    typedef aux::vector_tag<5> tag;
+    typedef vector5 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    
+
+    typedef void_ item5;
+    typedef T4 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,5 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<4> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector5<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<5> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector4<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<4> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector5<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<5> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector4<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<5>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item5 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<5> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<5> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<5> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<5> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<5> >
+{
+    template< typename Vector > struct apply
+        : long_<5>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<5> >
+    : size_impl< aux::vector_tag<5> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<5> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct vector6
+{
+    typedef aux::vector_tag<6> tag;
+    typedef vector6 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    
+
+    typedef void_ item6;
+    typedef T5 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,6 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<5> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector6<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<6> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector5<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<5> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector6<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<6> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector5<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<6>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item6 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<6> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<6> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<6> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<6> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<6> >
+{
+    template< typename Vector > struct apply
+        : long_<6>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<6> >
+    : size_impl< aux::vector_tag<6> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<6> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct vector7
+{
+    typedef aux::vector_tag<7> tag;
+    typedef vector7 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    
+
+    typedef void_ item7;
+    typedef T6 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,7 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<6> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector7<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<7> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector6<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<6> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector7<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<7> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector6<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<7>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item7 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<7> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<7> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<7> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<7> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<7> >
+{
+    template< typename Vector > struct apply
+        : long_<7>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<7> >
+    : size_impl< aux::vector_tag<7> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<7> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct vector8
+{
+    typedef aux::vector_tag<8> tag;
+    typedef vector8 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    
+
+    typedef void_ item8;
+    typedef T7 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,8 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<7> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector8<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<8> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector7<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<7> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector8<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<8> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector7<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<8>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item8 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<8> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<8> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<8> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<8> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<8> >
+{
+    template< typename Vector > struct apply
+        : long_<8>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<8> >
+    : size_impl< aux::vector_tag<8> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<8> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct vector9
+{
+    typedef aux::vector_tag<9> tag;
+    typedef vector9 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    
+
+    typedef void_ item9;
+    typedef T8 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,9 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<8> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector9<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<9> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector8<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<8> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector9<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<9> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector8<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<9>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item9 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<9> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<9> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<9> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<9> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<9> >
+{
+    template< typename Vector > struct apply
+        : long_<9>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<9> >
+    : size_impl< aux::vector_tag<9> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<9> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct vector10
+{
+    typedef aux::vector_tag<10> tag;
+    typedef vector10 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    
+
+    typedef void_ item10;
+    typedef T9 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,10 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<9> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector10<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<10> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector9<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<9> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector10<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<10> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector9<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<10>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item10 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<10> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<10> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<10> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<10> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<10> >
+{
+    template< typename Vector > struct apply
+        : long_<10>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<10> >
+    : size_impl< aux::vector_tag<10> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<10> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp
new file mode 100644
index 0000000..8b36f6a
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp
@@ -0,0 +1,149 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector10_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0
+    >
+struct vector1_c
+    : vector1< integral_c< T,C0 > >
+{
+    typedef vector1_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1
+    >
+struct vector2_c
+    : vector2< integral_c< T,C0 >, integral_c< T,C1 > >
+{
+    typedef vector2_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2
+    >
+struct vector3_c
+    : vector3< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > >
+{
+    typedef vector3_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3
+    >
+struct vector4_c
+    : vector4<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >, integral_c<T
+        , C3> 
+ >
+{
+    typedef vector4_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4
+    >
+struct vector5_c
+    : vector5<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 > 
+ >
+{
+    typedef vector5_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5
+    >
+struct vector6_c
+    : vector6<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 > 
+ >
+{
+    typedef vector6_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6
+    >
+struct vector7_c
+    : vector7<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c<T
+        , C6> 
+ >
+{
+    typedef vector7_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7
+    >
+struct vector8_c
+    : vector8<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 > 
+ >
+{
+    typedef vector8_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8
+    >
+struct vector9_c
+    : vector9<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 > 
+ >
+{
+    typedef vector9_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9
+    >
+struct vector10_c
+    : vector10<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > 
+ >
+{
+    typedef vector10_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp
new file mode 100644
index 0000000..eb92a78
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp
@@ -0,0 +1,1804 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector20.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct vector11
+{
+    typedef aux::vector_tag<11> tag;
+    typedef vector11 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    
+
+    typedef void_ item11;
+    typedef T10 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,11 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<10> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector11<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<11> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector10<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<10> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector11<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<11> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector10<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<11>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item11 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<11> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<11> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<11> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<11> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<11> >
+{
+    template< typename Vector > struct apply
+        : long_<11>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<11> >
+    : size_impl< aux::vector_tag<11> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<11> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct vector12
+{
+    typedef aux::vector_tag<12> tag;
+    typedef vector12 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    
+
+    typedef void_ item12;
+    typedef T11 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,12 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<11> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector12<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<12> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector11<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<11> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector12<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<12> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector11<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<12>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item12 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<12> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<12> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<12> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<12> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<12> >
+{
+    template< typename Vector > struct apply
+        : long_<12>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<12> >
+    : size_impl< aux::vector_tag<12> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<12> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct vector13
+{
+    typedef aux::vector_tag<13> tag;
+    typedef vector13 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    
+
+    typedef void_ item13;
+    typedef T12 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,13 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<12> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector13<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<13> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector12<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<12> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector13<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<13> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector12<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<13>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item13 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<13> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<13> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<13> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<13> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<13> >
+{
+    template< typename Vector > struct apply
+        : long_<13>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<13> >
+    : size_impl< aux::vector_tag<13> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<13> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct vector14
+{
+    typedef aux::vector_tag<14> tag;
+    typedef vector14 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    
+
+    typedef void_ item14;
+    typedef T13 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,14 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<13> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector14<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<14> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector13<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<13> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector14<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<14> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector13<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<14>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item14 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<14> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<14> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<14> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<14> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<14> >
+{
+    template< typename Vector > struct apply
+        : long_<14>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<14> >
+    : size_impl< aux::vector_tag<14> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<14> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct vector15
+{
+    typedef aux::vector_tag<15> tag;
+    typedef vector15 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    
+
+    typedef void_ item15;
+    typedef T14 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,15 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<14> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector15<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<15> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector14<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<14> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector15<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<15> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector14<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<15>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item15 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<15> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<15> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<15> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<15> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<15> >
+{
+    template< typename Vector > struct apply
+        : long_<15>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<15> >
+    : size_impl< aux::vector_tag<15> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<15> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct vector16
+{
+    typedef aux::vector_tag<16> tag;
+    typedef vector16 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    
+
+    typedef void_ item16;
+    typedef T15 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,16 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<15> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector16<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<16> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector15<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<15> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector16<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<16> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector15<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<16>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item16 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<16> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<16> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<16> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<16> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<16> >
+{
+    template< typename Vector > struct apply
+        : long_<16>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<16> >
+    : size_impl< aux::vector_tag<16> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<16> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct vector17
+{
+    typedef aux::vector_tag<17> tag;
+    typedef vector17 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    
+
+    typedef void_ item17;
+    typedef T16 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,17 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<16> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector17<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<17> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector16<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<16> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector17<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<17> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector16<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<17>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item17 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<17> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<17> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<17> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<17> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<17> >
+{
+    template< typename Vector > struct apply
+        : long_<17>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<17> >
+    : size_impl< aux::vector_tag<17> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<17> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct vector18
+{
+    typedef aux::vector_tag<18> tag;
+    typedef vector18 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    
+
+    typedef void_ item18;
+    typedef T17 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,18 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<17> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector18<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<18> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector17<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<17> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector18<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<18> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector17<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<18>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item18 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<18> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<18> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<18> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<18> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<18> >
+{
+    template< typename Vector > struct apply
+        : long_<18>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<18> >
+    : size_impl< aux::vector_tag<18> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<18> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct vector19
+{
+    typedef aux::vector_tag<19> tag;
+    typedef vector19 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    
+
+    typedef void_ item19;
+    typedef T18 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,19 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<18> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector19<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<19> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector18<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<18> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector19<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<19> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector18<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<19>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item19 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<19> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<19> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<19> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<19> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<19> >
+{
+    template< typename Vector > struct apply
+        : long_<19>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<19> >
+    : size_impl< aux::vector_tag<19> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<19> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct vector20
+{
+    typedef aux::vector_tag<20> tag;
+    typedef vector20 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    
+
+    typedef void_ item20;
+    typedef T19 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,20 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<19> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector20<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<20> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector19<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<19> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector20<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<20> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector19<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<20>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item20 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<20> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<20> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<20> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<20> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<20> >
+{
+    template< typename Vector > struct apply
+        : long_<20>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<20> >
+    : size_impl< aux::vector_tag<20> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<20> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp
new file mode 100644
index 0000000..56ca53f
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp
@@ -0,0 +1,195 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector20_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    >
+struct vector11_c
+    : vector11<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >, integral_c<T
+        , C10> 
+ >
+{
+    typedef vector11_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11
+    >
+struct vector12_c
+    : vector12<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 > 
+ >
+{
+    typedef vector12_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12
+    >
+struct vector13_c
+    : vector13<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > 
+ >
+{
+    typedef vector13_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13
+    >
+struct vector14_c
+    : vector14<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >, integral_c<T
+        , C13> 
+ >
+{
+    typedef vector14_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14
+    >
+struct vector15_c
+    : vector15<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 > 
+ >
+{
+    typedef vector15_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15
+    >
+struct vector16_c
+    : vector16<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > 
+ >
+{
+    typedef vector16_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16
+    >
+struct vector17_c
+    : vector17<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >, integral_c<T
+        , C16> 
+ >
+{
+    typedef vector17_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17
+    >
+struct vector18_c
+    : vector18<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 > 
+ >
+{
+    typedef vector18_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18
+    >
+struct vector19_c
+    : vector19<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > 
+ >
+{
+    typedef vector19_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19
+    >
+struct vector20_c
+    : vector20<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >, integral_c<T
+        , C19> 
+ >
+{
+    typedef vector20_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp
new file mode 100644
index 0000000..a685019
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp
@@ -0,0 +1,2124 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector30.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20
+    >
+struct vector21
+{
+    typedef aux::vector_tag<21> tag;
+    typedef vector21 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    
+
+    typedef void_ item21;
+    typedef T20 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,21 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<20> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector21<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<21> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector20<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<20> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector21<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<21> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector20<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<21>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item21 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<21> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<21> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<21> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<21> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<21> >
+{
+    template< typename Vector > struct apply
+        : long_<21>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<21> >
+    : size_impl< aux::vector_tag<21> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<21> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21
+    >
+struct vector22
+{
+    typedef aux::vector_tag<22> tag;
+    typedef vector22 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    
+
+    typedef void_ item22;
+    typedef T21 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,22 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<21> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector22<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<22> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector21<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<21> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector22<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<22> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector21<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<22>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item22 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<22> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<22> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<22> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<22> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<22> >
+{
+    template< typename Vector > struct apply
+        : long_<22>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<22> >
+    : size_impl< aux::vector_tag<22> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<22> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22
+    >
+struct vector23
+{
+    typedef aux::vector_tag<23> tag;
+    typedef vector23 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    
+
+    typedef void_ item23;
+    typedef T22 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,23 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<22> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector23<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<23> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector22<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<22> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector23<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<23> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector22<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<23>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item23 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<23> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<23> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<23> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<23> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<23> >
+{
+    template< typename Vector > struct apply
+        : long_<23>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<23> >
+    : size_impl< aux::vector_tag<23> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<23> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23
+    >
+struct vector24
+{
+    typedef aux::vector_tag<24> tag;
+    typedef vector24 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    
+
+    typedef void_ item24;
+    typedef T23 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,24 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<23> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector24<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<24> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector23<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<23> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector24<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<24> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector23<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<24>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item24 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<24> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<24> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<24> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<24> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<24> >
+{
+    template< typename Vector > struct apply
+        : long_<24>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<24> >
+    : size_impl< aux::vector_tag<24> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<24> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    >
+struct vector25
+{
+    typedef aux::vector_tag<25> tag;
+    typedef vector25 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    
+
+    typedef void_ item25;
+    typedef T24 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,25 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<24> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector25<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<25> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector24<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<24> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector25<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<25> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector24<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<25>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item25 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<25> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<25> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<25> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<25> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<25> >
+{
+    template< typename Vector > struct apply
+        : long_<25>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<25> >
+    : size_impl< aux::vector_tag<25> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<25> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25
+    >
+struct vector26
+{
+    typedef aux::vector_tag<26> tag;
+    typedef vector26 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    
+
+    typedef void_ item26;
+    typedef T25 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,26 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<25> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector26<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<26> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector25<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<25> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector26<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<26> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector25<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<26>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item26 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<26> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<26> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<26> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<26> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<26> >
+{
+    template< typename Vector > struct apply
+        : long_<26>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<26> >
+    : size_impl< aux::vector_tag<26> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<26> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26
+    >
+struct vector27
+{
+    typedef aux::vector_tag<27> tag;
+    typedef vector27 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    
+
+    typedef void_ item27;
+    typedef T26 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,27 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<26> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector27<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<27> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector26<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<26> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector27<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<27> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector26<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<27>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item27 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<27> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<27> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<27> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<27> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<27> >
+{
+    template< typename Vector > struct apply
+        : long_<27>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<27> >
+    : size_impl< aux::vector_tag<27> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<27> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27
+    >
+struct vector28
+{
+    typedef aux::vector_tag<28> tag;
+    typedef vector28 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    
+
+    typedef void_ item28;
+    typedef T27 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,28 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<27> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector28<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<28> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector27<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<27> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector28<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<28> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector27<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<28>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item28 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<28> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<28> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<28> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<28> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<28> >
+{
+    template< typename Vector > struct apply
+        : long_<28>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<28> >
+    : size_impl< aux::vector_tag<28> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<28> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28
+    >
+struct vector29
+{
+    typedef aux::vector_tag<29> tag;
+    typedef vector29 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    
+
+    typedef void_ item29;
+    typedef T28 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,29 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<28> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector29<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<29> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector28<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<28> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector29<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<29> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector28<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<29>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item29 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<29> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<29> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<29> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<29> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<29> >
+{
+    template< typename Vector > struct apply
+        : long_<29>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<29> >
+    : size_impl< aux::vector_tag<29> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<29> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    >
+struct vector30
+{
+    typedef aux::vector_tag<30> tag;
+    typedef vector30 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    
+
+    typedef void_ item30;
+    typedef T29 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,30 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<29> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector30<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<30> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector29<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<29> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector30<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<30> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector29<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<30>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item30 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<30> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<30> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<30> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<30> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<30> >
+{
+    template< typename Vector > struct apply
+        : long_<30>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<30> >
+    : size_impl< aux::vector_tag<30> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<30> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp
new file mode 100644
index 0000000..6251dbc
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp
@@ -0,0 +1,238 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector30_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    >
+struct vector21_c
+    : vector21<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 > 
+ >
+{
+    typedef vector21_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21
+    >
+struct vector22_c
+    : vector22<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > 
+ >
+{
+    typedef vector22_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22
+    >
+struct vector23_c
+    : vector23<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >, integral_c<T
+        , C22> 
+ >
+{
+    typedef vector23_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23
+    >
+struct vector24_c
+    : vector24<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 > 
+ >
+{
+    typedef vector24_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24
+    >
+struct vector25_c
+    : vector25<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > 
+ >
+{
+    typedef vector25_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25
+    >
+struct vector26_c
+    : vector26<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >, integral_c<T
+        , C25> 
+ >
+{
+    typedef vector26_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26
+    >
+struct vector27_c
+    : vector27<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 > 
+ >
+{
+    typedef vector27_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27
+    >
+struct vector28_c
+    : vector28<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > 
+ >
+{
+    typedef vector28_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28
+    >
+struct vector29_c
+    : vector29<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >, integral_c<T
+        , C28> 
+ >
+{
+    typedef vector29_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29
+    >
+struct vector30_c
+    : vector30<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 > 
+ >
+{
+    typedef vector30_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp
new file mode 100644
index 0000000..1ed648a
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp
@@ -0,0 +1,2444 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector40.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30
+    >
+struct vector31
+{
+    typedef aux::vector_tag<31> tag;
+    typedef vector31 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    
+
+    typedef void_ item31;
+    typedef T30 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,31 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<30> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector31<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<31> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector30<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<30> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector31<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<31> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector30<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<31>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item31 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<31> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<31> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<31> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<31> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<31> >
+{
+    template< typename Vector > struct apply
+        : long_<31>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<31> >
+    : size_impl< aux::vector_tag<31> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<31> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31
+    >
+struct vector32
+{
+    typedef aux::vector_tag<32> tag;
+    typedef vector32 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    
+
+    typedef void_ item32;
+    typedef T31 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,32 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<31> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector32<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<32> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector31<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<31> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector32<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<32> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector31<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<32>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item32 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<32> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<32> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<32> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<32> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<32> >
+{
+    template< typename Vector > struct apply
+        : long_<32>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<32> >
+    : size_impl< aux::vector_tag<32> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<32> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32
+    >
+struct vector33
+{
+    typedef aux::vector_tag<33> tag;
+    typedef vector33 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    
+
+    typedef void_ item33;
+    typedef T32 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,33 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<32> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector33<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<33> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector32<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<32> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector33<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<33> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector32<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<33>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item33 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<33> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<33> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<33> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<33> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<33> >
+{
+    template< typename Vector > struct apply
+        : long_<33>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<33> >
+    : size_impl< aux::vector_tag<33> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<33> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33
+    >
+struct vector34
+{
+    typedef aux::vector_tag<34> tag;
+    typedef vector34 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    
+
+    typedef void_ item34;
+    typedef T33 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,34 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<33> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector34<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<34> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector33<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<33> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector34<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<34> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector33<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<34>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item34 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<34> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<34> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<34> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<34> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<34> >
+{
+    template< typename Vector > struct apply
+        : long_<34>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<34> >
+    : size_impl< aux::vector_tag<34> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<34> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    >
+struct vector35
+{
+    typedef aux::vector_tag<35> tag;
+    typedef vector35 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    
+
+    typedef void_ item35;
+    typedef T34 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,35 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<34> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector35<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<35> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector34<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<34> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector35<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<35> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector34<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<35>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item35 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<35> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<35> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<35> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<35> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<35> >
+{
+    template< typename Vector > struct apply
+        : long_<35>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<35> >
+    : size_impl< aux::vector_tag<35> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<35> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35
+    >
+struct vector36
+{
+    typedef aux::vector_tag<36> tag;
+    typedef vector36 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    
+
+    typedef void_ item36;
+    typedef T35 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,36 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<35> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector36<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<36> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector35<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<35> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector36<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<36> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector35<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<36>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item36 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<36> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<36> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<36> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<36> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<36> >
+{
+    template< typename Vector > struct apply
+        : long_<36>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<36> >
+    : size_impl< aux::vector_tag<36> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<36> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36
+    >
+struct vector37
+{
+    typedef aux::vector_tag<37> tag;
+    typedef vector37 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    
+
+    typedef void_ item37;
+    typedef T36 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,37 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<36> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector37<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<37> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector36<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<36> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector37<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<37> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector36<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<37>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item37 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<37> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<37> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<37> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<37> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<37> >
+{
+    template< typename Vector > struct apply
+        : long_<37>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<37> >
+    : size_impl< aux::vector_tag<37> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<37> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37
+    >
+struct vector38
+{
+    typedef aux::vector_tag<38> tag;
+    typedef vector38 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    
+
+    typedef void_ item38;
+    typedef T37 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,38 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<37> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector38<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<38> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector37<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<37> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector38<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<38> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector37<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<38>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item38 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<38> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<38> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<38> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<38> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<38> >
+{
+    template< typename Vector > struct apply
+        : long_<38>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<38> >
+    : size_impl< aux::vector_tag<38> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<38> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38
+    >
+struct vector39
+{
+    typedef aux::vector_tag<39> tag;
+    typedef vector39 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    
+
+    typedef void_ item39;
+    typedef T38 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,39 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<38> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector39<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<39> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector38<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<38> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector39<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<39> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector38<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<39>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item39 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<39> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<39> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<39> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<39> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<39> >
+{
+    template< typename Vector > struct apply
+        : long_<39>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<39> >
+    : size_impl< aux::vector_tag<39> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<39> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    >
+struct vector40
+{
+    typedef aux::vector_tag<40> tag;
+    typedef vector40 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    
+
+    typedef void_ item40;
+    typedef T39 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,40 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<39> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector40<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<40> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector39<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<39> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector40<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<40> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector39<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<40>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item40 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<40> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<40> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<40> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<40> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<40> >
+{
+    template< typename Vector > struct apply
+        : long_<40>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<40> >
+    : size_impl< aux::vector_tag<40> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<40> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp
new file mode 100644
index 0000000..ba0ffa8
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp
@@ -0,0 +1,281 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector40_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    >
+struct vector31_c
+    : vector31<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > 
+ >
+{
+    typedef vector31_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31
+    >
+struct vector32_c
+    : vector32<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >, integral_c<T
+        , C31> 
+ >
+{
+    typedef vector32_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32
+    >
+struct vector33_c
+    : vector33<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 > 
+ >
+{
+    typedef vector33_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33
+    >
+struct vector34_c
+    : vector34<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > 
+ >
+{
+    typedef vector34_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34
+    >
+struct vector35_c
+    : vector35<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >, integral_c<T
+        , C34> 
+ >
+{
+    typedef vector35_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35
+    >
+struct vector36_c
+    : vector36<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 > 
+ >
+{
+    typedef vector36_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36
+    >
+struct vector37_c
+    : vector37<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > 
+ >
+{
+    typedef vector37_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37
+    >
+struct vector38_c
+    : vector38<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >, integral_c<T
+        , C37> 
+ >
+{
+    typedef vector38_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38
+    >
+struct vector39_c
+    : vector39<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 > 
+ >
+{
+    typedef vector39_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39
+    >
+struct vector40_c
+    : vector40<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > 
+ >
+{
+    typedef vector40_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp
new file mode 100644
index 0000000..3da323a
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp
@@ -0,0 +1,2764 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector50.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40
+    >
+struct vector41
+{
+    typedef aux::vector_tag<41> tag;
+    typedef vector41 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    
+
+    typedef void_ item41;
+    typedef T40 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,41 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<40> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector41<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<41> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector40<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<40> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector41<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<41> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector40<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<41>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item41 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<41> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<41> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<41> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<41> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<41> >
+{
+    template< typename Vector > struct apply
+        : long_<41>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<41> >
+    : size_impl< aux::vector_tag<41> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<41> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41
+    >
+struct vector42
+{
+    typedef aux::vector_tag<42> tag;
+    typedef vector42 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    
+
+    typedef void_ item42;
+    typedef T41 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,42 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<41> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector42<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<42> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector41<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<41> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector42<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<42> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector41<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<42>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item42 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<42> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<42> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<42> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<42> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<42> >
+{
+    template< typename Vector > struct apply
+        : long_<42>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<42> >
+    : size_impl< aux::vector_tag<42> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<42> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42
+    >
+struct vector43
+{
+    typedef aux::vector_tag<43> tag;
+    typedef vector43 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    typedef T42 item42;
+    
+
+    typedef void_ item43;
+    typedef T42 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,43 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<42> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector43<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<43> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector42<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41, typename Vector::item42
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<42> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector43<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<43> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector42<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<43>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item43 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<43> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<43> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<43> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<43> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<43> >
+{
+    template< typename Vector > struct apply
+        : long_<43>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<43> >
+    : size_impl< aux::vector_tag<43> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<43> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43
+    >
+struct vector44
+{
+    typedef aux::vector_tag<44> tag;
+    typedef vector44 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    typedef T42 item42;
+    typedef T43 item43;
+    
+
+    typedef void_ item44;
+    typedef T43 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,44 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<43> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector44<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<44> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector43<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41, typename Vector::item42
+            , typename Vector::item43
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<43> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector44<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<44> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector43<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<44>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item44 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<44> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<44> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<44> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<44> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<44> >
+{
+    template< typename Vector > struct apply
+        : long_<44>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<44> >
+    : size_impl< aux::vector_tag<44> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<44> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    >
+struct vector45
+{
+    typedef aux::vector_tag<45> tag;
+    typedef vector45 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    typedef T42 item42;
+    typedef T43 item43;
+    typedef T44 item44;
+    
+
+    typedef void_ item45;
+    typedef T44 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,45 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<44> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector45<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<45> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector44<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41, typename Vector::item42
+            , typename Vector::item43, typename Vector::item44
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<44> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector45<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<45> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector44<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<45>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item45 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<45> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<45> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<45> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<45> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<45> >
+{
+    template< typename Vector > struct apply
+        : long_<45>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<45> >
+    : size_impl< aux::vector_tag<45> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<45> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45
+    >
+struct vector46
+{
+    typedef aux::vector_tag<46> tag;
+    typedef vector46 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    typedef T42 item42;
+    typedef T43 item43;
+    typedef T44 item44;
+    typedef T45 item45;
+    
+
+    typedef void_ item46;
+    typedef T45 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,46 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<45> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector46<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<46> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector45<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41, typename Vector::item42
+            , typename Vector::item43, typename Vector::item44
+            , typename Vector::item45
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<45> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector46<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<46> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector45<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<46>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item46 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<46> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<46> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<46> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<46> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<46> >
+{
+    template< typename Vector > struct apply
+        : long_<46>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<46> >
+    : size_impl< aux::vector_tag<46> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<46> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46
+    >
+struct vector47
+{
+    typedef aux::vector_tag<47> tag;
+    typedef vector47 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    typedef T42 item42;
+    typedef T43 item43;
+    typedef T44 item44;
+    typedef T45 item45;
+    typedef T46 item46;
+    
+
+    typedef void_ item47;
+    typedef T46 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,47 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<46> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector47<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<47> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector46<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41, typename Vector::item42
+            , typename Vector::item43, typename Vector::item44
+            , typename Vector::item45, typename Vector::item46
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<46> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector47<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<47> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector46<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<47>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item47 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<47> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<47> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<47> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<47> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<47> >
+{
+    template< typename Vector > struct apply
+        : long_<47>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<47> >
+    : size_impl< aux::vector_tag<47> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<47> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47
+    >
+struct vector48
+{
+    typedef aux::vector_tag<48> tag;
+    typedef vector48 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    typedef T42 item42;
+    typedef T43 item43;
+    typedef T44 item44;
+    typedef T45 item45;
+    typedef T46 item46;
+    typedef T47 item47;
+    
+
+    typedef void_ item48;
+    typedef T47 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,48 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<47> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector48<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<48> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector47<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41, typename Vector::item42
+            , typename Vector::item43, typename Vector::item44
+            , typename Vector::item45, typename Vector::item46
+            , typename Vector::item47
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<47> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector48<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<48> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector47<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<48>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item48 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<48> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<48> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<48> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<48> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<48> >
+{
+    template< typename Vector > struct apply
+        : long_<48>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<48> >
+    : size_impl< aux::vector_tag<48> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<48> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47, typename T48
+    >
+struct vector49
+{
+    typedef aux::vector_tag<49> tag;
+    typedef vector49 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    typedef T42 item42;
+    typedef T43 item43;
+    typedef T44 item44;
+    typedef T45 item45;
+    typedef T46 item46;
+    typedef T47 item47;
+    typedef T48 item48;
+    
+
+    typedef void_ item49;
+    typedef T48 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,49 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<48> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector49<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46, typename Vector::item47
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<49> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector48<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41, typename Vector::item42
+            , typename Vector::item43, typename Vector::item44
+            , typename Vector::item45, typename Vector::item46
+            , typename Vector::item47, typename Vector::item48
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<48> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector49<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46, typename Vector::item47
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<49> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector48<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46, typename Vector::item47
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<49>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item49 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<49> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<49> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<49> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<49> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<49> >
+{
+    template< typename Vector > struct apply
+        : long_<49>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<49> >
+    : size_impl< aux::vector_tag<49> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<49> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47, typename T48, typename T49
+    >
+struct vector50
+{
+    typedef aux::vector_tag<50> tag;
+    typedef vector50 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    typedef T42 item42;
+    typedef T43 item43;
+    typedef T44 item44;
+    typedef T45 item45;
+    typedef T46 item46;
+    typedef T47 item47;
+    typedef T48 item48;
+    typedef T49 item49;
+    
+
+    typedef void_ item50;
+    typedef T49 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,50 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<49> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector50<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46, typename Vector::item47
+            , typename Vector::item48
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<50> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector49<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41, typename Vector::item42
+            , typename Vector::item43, typename Vector::item44
+            , typename Vector::item45, typename Vector::item46
+            , typename Vector::item47, typename Vector::item48
+            , typename Vector::item49
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<49> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector50<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46, typename Vector::item47
+            , typename Vector::item48
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<50> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector49<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46, typename Vector::item47
+            , typename Vector::item48
+            > type;
+    };
+};
+
+namespace aux {
+template<> struct v_at_impl<50>
+{
+    template< typename V_ > struct result_
+    {
+        typedef typename V_::item50 type;
+    };
+};
+
+}
+
+template<>
+struct at_impl< aux::vector_tag<50> >
+{
+    template< typename V_, typename N > struct apply
+    {
+        typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value>
+            ::template result_<V_>::type type;
+    };
+};
+
+template<>
+struct front_impl< aux::vector_tag<50> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::item0 type;
+    };
+};
+
+template<>
+struct back_impl< aux::vector_tag<50> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef typename Vector::back type;
+    };
+};
+
+template<>
+struct empty_impl< aux::vector_tag<50> >
+{
+    template< typename Vector > struct apply
+        : false_
+    {
+    };
+};
+
+template<>
+struct size_impl< aux::vector_tag<50> >
+{
+    template< typename Vector > struct apply
+        : long_<50>
+    {
+    };
+};
+
+template<>
+struct O1_size_impl< aux::vector_tag<50> >
+    : size_impl< aux::vector_tag<50> >
+{
+};
+
+template<>
+struct clear_impl< aux::vector_tag<50> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<> type;
+    };
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp
new file mode 100644
index 0000000..e07f2b3
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp
@@ -0,0 +1,325 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector50_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    >
+struct vector41_c
+    : vector41<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >, integral_c<T
+        , C40> 
+ >
+{
+    typedef vector41_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41
+    >
+struct vector42_c
+    : vector42<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 > 
+ >
+{
+    typedef vector42_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42
+    >
+struct vector43_c
+    : vector43<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > 
+ >
+{
+    typedef vector43_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43
+    >
+struct vector44_c
+    : vector44<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >, integral_c<T
+        , C43> 
+ >
+{
+    typedef vector44_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44
+    >
+struct vector45_c
+    : vector45<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >
+        , integral_c< T,C43 >, integral_c< T,C44 > 
+ >
+{
+    typedef vector45_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45
+    >
+struct vector46_c
+    : vector46<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >
+        , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > 
+ >
+{
+    typedef vector46_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46
+    >
+struct vector47_c
+    : vector47<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >
+        , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 >, integral_c<T
+        , C46> 
+ >
+{
+    typedef vector47_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47
+    >
+struct vector48_c
+    : vector48<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >
+        , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 >
+        , integral_c< T,C46 >, integral_c< T,C47 > 
+ >
+{
+    typedef vector48_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48
+    >
+struct vector49_c
+    : vector49<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >
+        , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 >
+        , integral_c< T,C46 >, integral_c< T,C47 >, integral_c< T,C48 > 
+ >
+{
+    typedef vector49_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49
+    >
+struct vector50_c
+    : vector50<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >
+        , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 >
+        , integral_c< T,C46 >, integral_c< T,C47 >, integral_c< T,C48 >, integral_c<T
+        , C49> 
+ >
+{
+    typedef vector50_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp
new file mode 100644
index 0000000..88bbd3b
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp
@@ -0,0 +1,829 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector10.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template< typename V >
+struct v_at< V,0 >
+{
+    typedef typename V::item0 type;
+};
+
+template<
+      typename T0
+    >
+struct vector1
+{
+    typedef aux::vector_tag<1> tag;
+    typedef vector1 type;
+    typedef T0 item0;
+    typedef void_ item1;
+    typedef T0 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,1 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<0> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector1<
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<1> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<
+             
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<0> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector1<
+             
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<1> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector0<
+             
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,1 >
+{
+    typedef typename V::item1 type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct vector2
+{
+    typedef aux::vector_tag<2> tag;
+    typedef vector2 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    
+
+    typedef void_ item2;
+    typedef T1 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,2 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<1> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector2<
+              T
+              ,
+              typename Vector::item0
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<2> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector1<
+              typename Vector::item1
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<1> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector2<
+              typename Vector::item0
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<2> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector1<
+              typename Vector::item0
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,2 >
+{
+    typedef typename V::item2 type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct vector3
+{
+    typedef aux::vector_tag<3> tag;
+    typedef vector3 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    
+
+    typedef void_ item3;
+    typedef T2 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,3 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<2> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector3<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<3> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector2<
+              typename Vector::item1, typename Vector::item2
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<2> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector3<
+              typename Vector::item0, typename Vector::item1
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<3> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector2<
+              typename Vector::item0, typename Vector::item1
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,3 >
+{
+    typedef typename V::item3 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct vector4
+{
+    typedef aux::vector_tag<4> tag;
+    typedef vector4 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    
+
+    typedef void_ item4;
+    typedef T3 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,4 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<3> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector4<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<4> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector3<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<3> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector4<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<4> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector3<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,4 >
+{
+    typedef typename V::item4 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct vector5
+{
+    typedef aux::vector_tag<5> tag;
+    typedef vector5 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    
+
+    typedef void_ item5;
+    typedef T4 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,5 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<4> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector5<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<5> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector4<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<4> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector5<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<5> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector4<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,5 >
+{
+    typedef typename V::item5 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct vector6
+{
+    typedef aux::vector_tag<6> tag;
+    typedef vector6 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    
+
+    typedef void_ item6;
+    typedef T5 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,6 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<5> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector6<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<6> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector5<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<5> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector6<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<6> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector5<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,6 >
+{
+    typedef typename V::item6 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct vector7
+{
+    typedef aux::vector_tag<7> tag;
+    typedef vector7 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    
+
+    typedef void_ item7;
+    typedef T6 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,7 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<6> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector7<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<7> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector6<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<6> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector7<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<7> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector6<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,7 >
+{
+    typedef typename V::item7 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct vector8
+{
+    typedef aux::vector_tag<8> tag;
+    typedef vector8 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    
+
+    typedef void_ item8;
+    typedef T7 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,8 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<7> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector8<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<8> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector7<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<7> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector8<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<8> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector7<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,8 >
+{
+    typedef typename V::item8 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct vector9
+{
+    typedef aux::vector_tag<9> tag;
+    typedef vector9 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    
+
+    typedef void_ item9;
+    typedef T8 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,9 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<8> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector9<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<9> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector8<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<8> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector9<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<9> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector8<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,9 >
+{
+    typedef typename V::item9 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct vector10
+{
+    typedef aux::vector_tag<10> tag;
+    typedef vector10 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    
+
+    typedef void_ item10;
+    typedef T9 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,10 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<9> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector10<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<10> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector9<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<9> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector10<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<10> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector9<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,10 >
+{
+    typedef typename V::item10 type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp
new file mode 100644
index 0000000..8b36f6a
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp
@@ -0,0 +1,149 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector10_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0
+    >
+struct vector1_c
+    : vector1< integral_c< T,C0 > >
+{
+    typedef vector1_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1
+    >
+struct vector2_c
+    : vector2< integral_c< T,C0 >, integral_c< T,C1 > >
+{
+    typedef vector2_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2
+    >
+struct vector3_c
+    : vector3< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > >
+{
+    typedef vector3_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3
+    >
+struct vector4_c
+    : vector4<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >, integral_c<T
+        , C3> 
+ >
+{
+    typedef vector4_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4
+    >
+struct vector5_c
+    : vector5<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 > 
+ >
+{
+    typedef vector5_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5
+    >
+struct vector6_c
+    : vector6<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 > 
+ >
+{
+    typedef vector6_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6
+    >
+struct vector7_c
+    : vector7<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c<T
+        , C6> 
+ >
+{
+    typedef vector7_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7
+    >
+struct vector8_c
+    : vector8<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 > 
+ >
+{
+    typedef vector8_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8
+    >
+struct vector9_c
+    : vector9<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 > 
+ >
+{
+    typedef vector9_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9
+    >
+struct vector10_c
+    : vector10<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > 
+ >
+{
+    typedef vector10_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp
new file mode 100644
index 0000000..8c6c8bb
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp
@@ -0,0 +1,1144 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector20.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct vector11
+{
+    typedef aux::vector_tag<11> tag;
+    typedef vector11 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    
+
+    typedef void_ item11;
+    typedef T10 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,11 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<10> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector11<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<11> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector10<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<10> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector11<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<11> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector10<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,11 >
+{
+    typedef typename V::item11 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct vector12
+{
+    typedef aux::vector_tag<12> tag;
+    typedef vector12 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    
+
+    typedef void_ item12;
+    typedef T11 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,12 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<11> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector12<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<12> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector11<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<11> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector12<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<12> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector11<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,12 >
+{
+    typedef typename V::item12 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct vector13
+{
+    typedef aux::vector_tag<13> tag;
+    typedef vector13 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    
+
+    typedef void_ item13;
+    typedef T12 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,13 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<12> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector13<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<13> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector12<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<12> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector13<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<13> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector12<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,13 >
+{
+    typedef typename V::item13 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct vector14
+{
+    typedef aux::vector_tag<14> tag;
+    typedef vector14 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    
+
+    typedef void_ item14;
+    typedef T13 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,14 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<13> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector14<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<14> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector13<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<13> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector14<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<14> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector13<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,14 >
+{
+    typedef typename V::item14 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct vector15
+{
+    typedef aux::vector_tag<15> tag;
+    typedef vector15 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    
+
+    typedef void_ item15;
+    typedef T14 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,15 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<14> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector15<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<15> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector14<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<14> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector15<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<15> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector14<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,15 >
+{
+    typedef typename V::item15 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct vector16
+{
+    typedef aux::vector_tag<16> tag;
+    typedef vector16 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    
+
+    typedef void_ item16;
+    typedef T15 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,16 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<15> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector16<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<16> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector15<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<15> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector16<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<16> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector15<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,16 >
+{
+    typedef typename V::item16 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct vector17
+{
+    typedef aux::vector_tag<17> tag;
+    typedef vector17 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    
+
+    typedef void_ item17;
+    typedef T16 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,17 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<16> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector17<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<17> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector16<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<16> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector17<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<17> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector16<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,17 >
+{
+    typedef typename V::item17 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct vector18
+{
+    typedef aux::vector_tag<18> tag;
+    typedef vector18 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    
+
+    typedef void_ item18;
+    typedef T17 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,18 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<17> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector18<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<18> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector17<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<17> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector18<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<18> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector17<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,18 >
+{
+    typedef typename V::item18 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct vector19
+{
+    typedef aux::vector_tag<19> tag;
+    typedef vector19 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    
+
+    typedef void_ item19;
+    typedef T18 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,19 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<18> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector19<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<19> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector18<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<18> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector19<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<19> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector18<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,19 >
+{
+    typedef typename V::item19 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct vector20
+{
+    typedef aux::vector_tag<20> tag;
+    typedef vector20 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    
+
+    typedef void_ item20;
+    typedef T19 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,20 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<19> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector20<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<20> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector19<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<19> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector20<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<20> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector19<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,20 >
+{
+    typedef typename V::item20 type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp
new file mode 100644
index 0000000..56ca53f
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp
@@ -0,0 +1,195 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector20_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    >
+struct vector11_c
+    : vector11<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >, integral_c<T
+        , C10> 
+ >
+{
+    typedef vector11_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11
+    >
+struct vector12_c
+    : vector12<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 > 
+ >
+{
+    typedef vector12_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12
+    >
+struct vector13_c
+    : vector13<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > 
+ >
+{
+    typedef vector13_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13
+    >
+struct vector14_c
+    : vector14<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >, integral_c<T
+        , C13> 
+ >
+{
+    typedef vector14_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14
+    >
+struct vector15_c
+    : vector15<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 > 
+ >
+{
+    typedef vector15_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15
+    >
+struct vector16_c
+    : vector16<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > 
+ >
+{
+    typedef vector16_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16
+    >
+struct vector17_c
+    : vector17<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >, integral_c<T
+        , C16> 
+ >
+{
+    typedef vector17_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17
+    >
+struct vector18_c
+    : vector18<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 > 
+ >
+{
+    typedef vector18_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18
+    >
+struct vector19_c
+    : vector19<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > 
+ >
+{
+    typedef vector19_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19
+    >
+struct vector20_c
+    : vector20<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >, integral_c<T
+        , C19> 
+ >
+{
+    typedef vector20_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp
new file mode 100644
index 0000000..b7da8e7
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp
@@ -0,0 +1,1464 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector30.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20
+    >
+struct vector21
+{
+    typedef aux::vector_tag<21> tag;
+    typedef vector21 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    
+
+    typedef void_ item21;
+    typedef T20 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,21 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<20> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector21<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<21> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector20<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<20> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector21<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<21> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector20<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,21 >
+{
+    typedef typename V::item21 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21
+    >
+struct vector22
+{
+    typedef aux::vector_tag<22> tag;
+    typedef vector22 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    
+
+    typedef void_ item22;
+    typedef T21 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,22 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<21> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector22<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<22> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector21<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<21> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector22<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<22> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector21<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,22 >
+{
+    typedef typename V::item22 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22
+    >
+struct vector23
+{
+    typedef aux::vector_tag<23> tag;
+    typedef vector23 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    
+
+    typedef void_ item23;
+    typedef T22 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,23 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<22> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector23<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<23> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector22<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<22> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector23<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<23> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector22<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,23 >
+{
+    typedef typename V::item23 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23
+    >
+struct vector24
+{
+    typedef aux::vector_tag<24> tag;
+    typedef vector24 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    
+
+    typedef void_ item24;
+    typedef T23 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,24 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<23> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector24<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<24> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector23<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<23> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector24<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<24> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector23<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,24 >
+{
+    typedef typename V::item24 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    >
+struct vector25
+{
+    typedef aux::vector_tag<25> tag;
+    typedef vector25 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    
+
+    typedef void_ item25;
+    typedef T24 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,25 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<24> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector25<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<25> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector24<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<24> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector25<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<25> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector24<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,25 >
+{
+    typedef typename V::item25 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25
+    >
+struct vector26
+{
+    typedef aux::vector_tag<26> tag;
+    typedef vector26 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    
+
+    typedef void_ item26;
+    typedef T25 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,26 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<25> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector26<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<26> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector25<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<25> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector26<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<26> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector25<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,26 >
+{
+    typedef typename V::item26 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26
+    >
+struct vector27
+{
+    typedef aux::vector_tag<27> tag;
+    typedef vector27 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    
+
+    typedef void_ item27;
+    typedef T26 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,27 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<26> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector27<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<27> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector26<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<26> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector27<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<27> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector26<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,27 >
+{
+    typedef typename V::item27 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27
+    >
+struct vector28
+{
+    typedef aux::vector_tag<28> tag;
+    typedef vector28 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    
+
+    typedef void_ item28;
+    typedef T27 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,28 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<27> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector28<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<28> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector27<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<27> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector28<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<28> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector27<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,28 >
+{
+    typedef typename V::item28 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28
+    >
+struct vector29
+{
+    typedef aux::vector_tag<29> tag;
+    typedef vector29 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    
+
+    typedef void_ item29;
+    typedef T28 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,29 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<28> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector29<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<29> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector28<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<28> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector29<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<29> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector28<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,29 >
+{
+    typedef typename V::item29 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    >
+struct vector30
+{
+    typedef aux::vector_tag<30> tag;
+    typedef vector30 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    
+
+    typedef void_ item30;
+    typedef T29 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,30 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<29> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector30<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<30> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector29<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<29> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector30<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<30> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector29<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,30 >
+{
+    typedef typename V::item30 type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp
new file mode 100644
index 0000000..6251dbc
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp
@@ -0,0 +1,238 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector30_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    >
+struct vector21_c
+    : vector21<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 > 
+ >
+{
+    typedef vector21_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21
+    >
+struct vector22_c
+    : vector22<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > 
+ >
+{
+    typedef vector22_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22
+    >
+struct vector23_c
+    : vector23<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >, integral_c<T
+        , C22> 
+ >
+{
+    typedef vector23_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23
+    >
+struct vector24_c
+    : vector24<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 > 
+ >
+{
+    typedef vector24_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24
+    >
+struct vector25_c
+    : vector25<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > 
+ >
+{
+    typedef vector25_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25
+    >
+struct vector26_c
+    : vector26<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >, integral_c<T
+        , C25> 
+ >
+{
+    typedef vector26_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26
+    >
+struct vector27_c
+    : vector27<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 > 
+ >
+{
+    typedef vector27_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27
+    >
+struct vector28_c
+    : vector28<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > 
+ >
+{
+    typedef vector28_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28
+    >
+struct vector29_c
+    : vector29<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >, integral_c<T
+        , C28> 
+ >
+{
+    typedef vector29_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29
+    >
+struct vector30_c
+    : vector30<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 > 
+ >
+{
+    typedef vector30_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp
new file mode 100644
index 0000000..7487be4
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp
@@ -0,0 +1,1784 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector40.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30
+    >
+struct vector31
+{
+    typedef aux::vector_tag<31> tag;
+    typedef vector31 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    
+
+    typedef void_ item31;
+    typedef T30 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,31 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<30> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector31<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<31> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector30<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<30> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector31<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<31> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector30<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,31 >
+{
+    typedef typename V::item31 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31
+    >
+struct vector32
+{
+    typedef aux::vector_tag<32> tag;
+    typedef vector32 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    
+
+    typedef void_ item32;
+    typedef T31 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,32 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<31> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector32<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<32> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector31<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<31> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector32<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<32> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector31<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,32 >
+{
+    typedef typename V::item32 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32
+    >
+struct vector33
+{
+    typedef aux::vector_tag<33> tag;
+    typedef vector33 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    
+
+    typedef void_ item33;
+    typedef T32 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,33 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<32> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector33<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<33> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector32<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<32> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector33<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<33> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector32<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,33 >
+{
+    typedef typename V::item33 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33
+    >
+struct vector34
+{
+    typedef aux::vector_tag<34> tag;
+    typedef vector34 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    
+
+    typedef void_ item34;
+    typedef T33 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,34 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<33> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector34<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<34> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector33<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<33> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector34<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<34> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector33<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,34 >
+{
+    typedef typename V::item34 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    >
+struct vector35
+{
+    typedef aux::vector_tag<35> tag;
+    typedef vector35 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    
+
+    typedef void_ item35;
+    typedef T34 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,35 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<34> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector35<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<35> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector34<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<34> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector35<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<35> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector34<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,35 >
+{
+    typedef typename V::item35 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35
+    >
+struct vector36
+{
+    typedef aux::vector_tag<36> tag;
+    typedef vector36 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    
+
+    typedef void_ item36;
+    typedef T35 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,36 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<35> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector36<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<36> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector35<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<35> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector36<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<36> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector35<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,36 >
+{
+    typedef typename V::item36 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36
+    >
+struct vector37
+{
+    typedef aux::vector_tag<37> tag;
+    typedef vector37 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    
+
+    typedef void_ item37;
+    typedef T36 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,37 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<36> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector37<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<37> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector36<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<36> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector37<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<37> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector36<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,37 >
+{
+    typedef typename V::item37 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37
+    >
+struct vector38
+{
+    typedef aux::vector_tag<38> tag;
+    typedef vector38 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    
+
+    typedef void_ item38;
+    typedef T37 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,38 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<37> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector38<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<38> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector37<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<37> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector38<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<38> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector37<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,38 >
+{
+    typedef typename V::item38 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38
+    >
+struct vector39
+{
+    typedef aux::vector_tag<39> tag;
+    typedef vector39 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    
+
+    typedef void_ item39;
+    typedef T38 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,39 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<38> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector39<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<39> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector38<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<38> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector39<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<39> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector38<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,39 >
+{
+    typedef typename V::item39 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    >
+struct vector40
+{
+    typedef aux::vector_tag<40> tag;
+    typedef vector40 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    
+
+    typedef void_ item40;
+    typedef T39 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,40 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<39> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector40<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<40> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector39<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<39> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector40<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<40> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector39<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,40 >
+{
+    typedef typename V::item40 type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp
new file mode 100644
index 0000000..ba0ffa8
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp
@@ -0,0 +1,281 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector40_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    >
+struct vector31_c
+    : vector31<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > 
+ >
+{
+    typedef vector31_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31
+    >
+struct vector32_c
+    : vector32<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >, integral_c<T
+        , C31> 
+ >
+{
+    typedef vector32_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32
+    >
+struct vector33_c
+    : vector33<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 > 
+ >
+{
+    typedef vector33_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33
+    >
+struct vector34_c
+    : vector34<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > 
+ >
+{
+    typedef vector34_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34
+    >
+struct vector35_c
+    : vector35<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >, integral_c<T
+        , C34> 
+ >
+{
+    typedef vector35_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35
+    >
+struct vector36_c
+    : vector36<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 > 
+ >
+{
+    typedef vector36_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36
+    >
+struct vector37_c
+    : vector37<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > 
+ >
+{
+    typedef vector37_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37
+    >
+struct vector38_c
+    : vector38<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >, integral_c<T
+        , C37> 
+ >
+{
+    typedef vector38_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38
+    >
+struct vector39_c
+    : vector39<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 > 
+ >
+{
+    typedef vector39_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39
+    >
+struct vector40_c
+    : vector40<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > 
+ >
+{
+    typedef vector40_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp
new file mode 100644
index 0000000..5a4c6d7
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp
@@ -0,0 +1,2104 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector50.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40
+    >
+struct vector41
+{
+    typedef aux::vector_tag<41> tag;
+    typedef vector41 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    
+
+    typedef void_ item41;
+    typedef T40 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,41 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<40> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector41<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<41> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector40<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<40> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector41<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<41> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector40<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,41 >
+{
+    typedef typename V::item41 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41
+    >
+struct vector42
+{
+    typedef aux::vector_tag<42> tag;
+    typedef vector42 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    
+
+    typedef void_ item42;
+    typedef T41 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,42 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<41> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector42<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<42> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector41<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<41> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector42<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<42> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector41<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,42 >
+{
+    typedef typename V::item42 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42
+    >
+struct vector43
+{
+    typedef aux::vector_tag<43> tag;
+    typedef vector43 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    typedef T42 item42;
+    
+
+    typedef void_ item43;
+    typedef T42 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,43 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<42> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector43<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<43> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector42<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41, typename Vector::item42
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<42> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector43<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<43> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector42<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,43 >
+{
+    typedef typename V::item43 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43
+    >
+struct vector44
+{
+    typedef aux::vector_tag<44> tag;
+    typedef vector44 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    typedef T42 item42;
+    typedef T43 item43;
+    
+
+    typedef void_ item44;
+    typedef T43 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,44 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<43> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector44<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<44> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector43<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41, typename Vector::item42
+            , typename Vector::item43
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<43> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector44<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<44> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector43<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,44 >
+{
+    typedef typename V::item44 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    >
+struct vector45
+{
+    typedef aux::vector_tag<45> tag;
+    typedef vector45 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    typedef T42 item42;
+    typedef T43 item43;
+    typedef T44 item44;
+    
+
+    typedef void_ item45;
+    typedef T44 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,45 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<44> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector45<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<45> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector44<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41, typename Vector::item42
+            , typename Vector::item43, typename Vector::item44
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<44> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector45<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<45> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector44<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,45 >
+{
+    typedef typename V::item45 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45
+    >
+struct vector46
+{
+    typedef aux::vector_tag<46> tag;
+    typedef vector46 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    typedef T42 item42;
+    typedef T43 item43;
+    typedef T44 item44;
+    typedef T45 item45;
+    
+
+    typedef void_ item46;
+    typedef T45 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,46 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<45> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector46<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<46> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector45<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41, typename Vector::item42
+            , typename Vector::item43, typename Vector::item44
+            , typename Vector::item45
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<45> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector46<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<46> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector45<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,46 >
+{
+    typedef typename V::item46 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46
+    >
+struct vector47
+{
+    typedef aux::vector_tag<47> tag;
+    typedef vector47 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    typedef T42 item42;
+    typedef T43 item43;
+    typedef T44 item44;
+    typedef T45 item45;
+    typedef T46 item46;
+    
+
+    typedef void_ item47;
+    typedef T46 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,47 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<46> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector47<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<47> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector46<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41, typename Vector::item42
+            , typename Vector::item43, typename Vector::item44
+            , typename Vector::item45, typename Vector::item46
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<46> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector47<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<47> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector46<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,47 >
+{
+    typedef typename V::item47 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47
+    >
+struct vector48
+{
+    typedef aux::vector_tag<48> tag;
+    typedef vector48 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    typedef T42 item42;
+    typedef T43 item43;
+    typedef T44 item44;
+    typedef T45 item45;
+    typedef T46 item46;
+    typedef T47 item47;
+    
+
+    typedef void_ item48;
+    typedef T47 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,48 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<47> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector48<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<48> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector47<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41, typename Vector::item42
+            , typename Vector::item43, typename Vector::item44
+            , typename Vector::item45, typename Vector::item46
+            , typename Vector::item47
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<47> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector48<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<48> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector47<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,48 >
+{
+    typedef typename V::item48 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47, typename T48
+    >
+struct vector49
+{
+    typedef aux::vector_tag<49> tag;
+    typedef vector49 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    typedef T42 item42;
+    typedef T43 item43;
+    typedef T44 item44;
+    typedef T45 item45;
+    typedef T46 item46;
+    typedef T47 item47;
+    typedef T48 item48;
+    
+
+    typedef void_ item49;
+    typedef T48 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,49 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<48> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector49<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46, typename Vector::item47
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<49> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector48<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41, typename Vector::item42
+            , typename Vector::item43, typename Vector::item44
+            , typename Vector::item45, typename Vector::item46
+            , typename Vector::item47, typename Vector::item48
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<48> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector49<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46, typename Vector::item47
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<49> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector48<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46, typename Vector::item47
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,49 >
+{
+    typedef typename V::item49 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47, typename T48, typename T49
+    >
+struct vector50
+{
+    typedef aux::vector_tag<50> tag;
+    typedef vector50 type;
+    typedef T0 item0;
+    typedef T1 item1;
+    typedef T2 item2;
+    typedef T3 item3;
+    typedef T4 item4;
+    typedef T5 item5;
+    typedef T6 item6;
+    typedef T7 item7;
+    typedef T8 item8;
+    typedef T9 item9;
+    typedef T10 item10;
+    typedef T11 item11;
+    typedef T12 item12;
+    typedef T13 item13;
+    typedef T14 item14;
+    typedef T15 item15;
+    typedef T16 item16;
+    typedef T17 item17;
+    typedef T18 item18;
+    typedef T19 item19;
+    typedef T20 item20;
+    typedef T21 item21;
+    typedef T22 item22;
+    typedef T23 item23;
+    typedef T24 item24;
+    typedef T25 item25;
+    typedef T26 item26;
+    typedef T27 item27;
+    typedef T28 item28;
+    typedef T29 item29;
+    typedef T30 item30;
+    typedef T31 item31;
+    typedef T32 item32;
+    typedef T33 item33;
+    typedef T34 item34;
+    typedef T35 item35;
+    typedef T36 item36;
+    typedef T37 item37;
+    typedef T38 item38;
+    typedef T39 item39;
+    typedef T40 item40;
+    typedef T41 item41;
+    typedef T42 item42;
+    typedef T43 item43;
+    typedef T44 item44;
+    typedef T45 item45;
+    typedef T46 item46;
+    typedef T47 item47;
+    typedef T48 item48;
+    typedef T49 item49;
+    
+
+    typedef void_ item50;
+    typedef T49 back;
+    typedef v_iter< type,0 > begin;
+    typedef v_iter< type,50 > end;
+};
+
+template<>
+struct push_front_impl< aux::vector_tag<49> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector50<
+              T
+              ,
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46, typename Vector::item47
+            , typename Vector::item48
+            > type;
+    };
+};
+
+template<>
+struct pop_front_impl< aux::vector_tag<50> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector49<
+              typename Vector::item1, typename Vector::item2
+            , typename Vector::item3, typename Vector::item4
+            , typename Vector::item5, typename Vector::item6
+            , typename Vector::item7, typename Vector::item8
+            , typename Vector::item9, typename Vector::item10
+            , typename Vector::item11, typename Vector::item12
+            , typename Vector::item13, typename Vector::item14
+            , typename Vector::item15, typename Vector::item16
+            , typename Vector::item17, typename Vector::item18
+            , typename Vector::item19, typename Vector::item20
+            , typename Vector::item21, typename Vector::item22
+            , typename Vector::item23, typename Vector::item24
+            , typename Vector::item25, typename Vector::item26
+            , typename Vector::item27, typename Vector::item28
+            , typename Vector::item29, typename Vector::item30
+            , typename Vector::item31, typename Vector::item32
+            , typename Vector::item33, typename Vector::item34
+            , typename Vector::item35, typename Vector::item36
+            , typename Vector::item37, typename Vector::item38
+            , typename Vector::item39, typename Vector::item40
+            , typename Vector::item41, typename Vector::item42
+            , typename Vector::item43, typename Vector::item44
+            , typename Vector::item45, typename Vector::item46
+            , typename Vector::item47, typename Vector::item48
+            , typename Vector::item49
+            > type;
+    };
+};
+
+template<>
+struct push_back_impl< aux::vector_tag<49> >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef vector50<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46, typename Vector::item47
+            , typename Vector::item48
+              ,
+              T
+            > type;
+    };
+};
+
+template<>
+struct pop_back_impl< aux::vector_tag<50> >
+{
+    template< typename Vector > struct apply
+    {
+        typedef vector49<
+              typename Vector::item0, typename Vector::item1
+            , typename Vector::item2, typename Vector::item3
+            , typename Vector::item4, typename Vector::item5
+            , typename Vector::item6, typename Vector::item7
+            , typename Vector::item8, typename Vector::item9
+            , typename Vector::item10, typename Vector::item11
+            , typename Vector::item12, typename Vector::item13
+            , typename Vector::item14, typename Vector::item15
+            , typename Vector::item16, typename Vector::item17
+            , typename Vector::item18, typename Vector::item19
+            , typename Vector::item20, typename Vector::item21
+            , typename Vector::item22, typename Vector::item23
+            , typename Vector::item24, typename Vector::item25
+            , typename Vector::item26, typename Vector::item27
+            , typename Vector::item28, typename Vector::item29
+            , typename Vector::item30, typename Vector::item31
+            , typename Vector::item32, typename Vector::item33
+            , typename Vector::item34, typename Vector::item35
+            , typename Vector::item36, typename Vector::item37
+            , typename Vector::item38, typename Vector::item39
+            , typename Vector::item40, typename Vector::item41
+            , typename Vector::item42, typename Vector::item43
+            , typename Vector::item44, typename Vector::item45
+            , typename Vector::item46, typename Vector::item47
+            , typename Vector::item48
+            > type;
+    };
+};
+
+template< typename V >
+struct v_at< V,50 >
+{
+    typedef typename V::item50 type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp
new file mode 100644
index 0000000..e07f2b3
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp
@@ -0,0 +1,325 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector50_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    >
+struct vector41_c
+    : vector41<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >, integral_c<T
+        , C40> 
+ >
+{
+    typedef vector41_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41
+    >
+struct vector42_c
+    : vector42<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 > 
+ >
+{
+    typedef vector42_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42
+    >
+struct vector43_c
+    : vector43<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > 
+ >
+{
+    typedef vector43_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43
+    >
+struct vector44_c
+    : vector44<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >, integral_c<T
+        , C43> 
+ >
+{
+    typedef vector44_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44
+    >
+struct vector45_c
+    : vector45<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >
+        , integral_c< T,C43 >, integral_c< T,C44 > 
+ >
+{
+    typedef vector45_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45
+    >
+struct vector46_c
+    : vector46<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >
+        , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > 
+ >
+{
+    typedef vector46_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46
+    >
+struct vector47_c
+    : vector47<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >
+        , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 >, integral_c<T
+        , C46> 
+ >
+{
+    typedef vector47_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47
+    >
+struct vector48_c
+    : vector48<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >
+        , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 >
+        , integral_c< T,C46 >, integral_c< T,C47 > 
+ >
+{
+    typedef vector48_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48
+    >
+struct vector49_c
+    : vector49<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >
+        , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 >
+        , integral_c< T,C46 >, integral_c< T,C47 >, integral_c< T,C48 > 
+ >
+{
+    typedef vector49_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49
+    >
+struct vector50_c
+    : vector50<
+          integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >
+        , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 >
+        , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >
+        , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >
+        , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >
+        , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >
+        , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >
+        , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >
+        , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >
+        , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >
+        , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >
+        , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >
+        , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >
+        , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >
+        , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 >
+        , integral_c< T,C46 >, integral_c< T,C47 >, integral_c< T,C48 >, integral_c<T
+        , C49> 
+ >
+{
+    typedef vector50_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp
new file mode 100644
index 0000000..e4c6407
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp
@@ -0,0 +1,139 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector10.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0
+    >
+struct vector1
+    : v_item<
+          T0
+        , vector0<  >
+        >
+{
+    typedef vector1 type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct vector2
+    : v_item<
+          T1
+        , vector1<T0>
+        >
+{
+    typedef vector2 type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct vector3
+    : v_item<
+          T2
+        , vector2< T0,T1 >
+        >
+{
+    typedef vector3 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct vector4
+    : v_item<
+          T3
+        , vector3< T0,T1,T2 >
+        >
+{
+    typedef vector4 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct vector5
+    : v_item<
+          T4
+        , vector4< T0,T1,T2,T3 >
+        >
+{
+    typedef vector5 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct vector6
+    : v_item<
+          T5
+        , vector5< T0,T1,T2,T3,T4 >
+        >
+{
+    typedef vector6 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct vector7
+    : v_item<
+          T6
+        , vector6< T0,T1,T2,T3,T4,T5 >
+        >
+{
+    typedef vector7 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct vector8
+    : v_item<
+          T7
+        , vector7< T0,T1,T2,T3,T4,T5,T6 >
+        >
+{
+    typedef vector8 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct vector9
+    : v_item<
+          T8
+        , vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+        >
+{
+    typedef vector9 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct vector10
+    : v_item<
+          T9
+        , vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+        >
+{
+    typedef vector10 type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp
new file mode 100644
index 0000000..18eabc6
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp
@@ -0,0 +1,154 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector10_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0
+    >
+struct vector1_c
+    : v_item<
+          integral_c< T,C0 >
+        , vector0_c<T>
+        >
+{
+    typedef vector1_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1
+    >
+struct vector2_c
+    : v_item<
+          integral_c< T,C1 >
+        , vector1_c< T,C0 >
+        >
+{
+    typedef vector2_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2
+    >
+struct vector3_c
+    : v_item<
+          integral_c< T,C2 >
+        , vector2_c< T,C0,C1 >
+        >
+{
+    typedef vector3_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3
+    >
+struct vector4_c
+    : v_item<
+          integral_c< T,C3 >
+        , vector3_c< T,C0,C1,C2 >
+        >
+{
+    typedef vector4_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4
+    >
+struct vector5_c
+    : v_item<
+          integral_c< T,C4 >
+        , vector4_c< T,C0,C1,C2,C3 >
+        >
+{
+    typedef vector5_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5
+    >
+struct vector6_c
+    : v_item<
+          integral_c< T,C5 >
+        , vector5_c< T,C0,C1,C2,C3,C4 >
+        >
+{
+    typedef vector6_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6
+    >
+struct vector7_c
+    : v_item<
+          integral_c< T,C6 >
+        , vector6_c< T,C0,C1,C2,C3,C4,C5 >
+        >
+{
+    typedef vector7_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7
+    >
+struct vector8_c
+    : v_item<
+          integral_c< T,C7 >
+        , vector7_c< T,C0,C1,C2,C3,C4,C5,C6 >
+        >
+{
+    typedef vector8_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8
+    >
+struct vector9_c
+    : v_item<
+          integral_c< T,C8 >
+        , vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >
+        >
+{
+    typedef vector9_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9
+    >
+struct vector10_c
+    : v_item<
+          integral_c< T,C9 >
+        , vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >
+        >
+{
+    typedef vector10_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp
new file mode 100644
index 0000000..78ccac4
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp
@@ -0,0 +1,159 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector20.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct vector11
+    : v_item<
+          T10
+        , vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+        >
+{
+    typedef vector11 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct vector12
+    : v_item<
+          T11
+        , vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+        >
+{
+    typedef vector12 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct vector13
+    : v_item<
+          T12
+        , vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+        >
+{
+    typedef vector13 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct vector14
+    : v_item<
+          T13
+        , vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+        >
+{
+    typedef vector14 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct vector15
+    : v_item<
+          T14
+        , vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+        >
+{
+    typedef vector15 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct vector16
+    : v_item<
+          T15
+        , vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >
+        >
+{
+    typedef vector16 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct vector17
+    : v_item<
+          T16
+        , vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >
+        >
+{
+    typedef vector17 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct vector18
+    : v_item<
+          T17
+        , vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >
+        >
+{
+    typedef vector18 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct vector19
+    : v_item<
+          T18
+        , vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >
+        >
+{
+    typedef vector19 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct vector20
+    : v_item<
+          T19
+        , vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >
+        >
+{
+    typedef vector20 type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp
new file mode 100644
index 0000000..4bf6742
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp
@@ -0,0 +1,163 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector20_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    >
+struct vector11_c
+    : v_item<
+          integral_c< T,C10 >
+        , vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+        >
+{
+    typedef vector11_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11
+    >
+struct vector12_c
+    : v_item<
+          integral_c< T,C11 >
+        , vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+        >
+{
+    typedef vector12_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12
+    >
+struct vector13_c
+    : v_item<
+          integral_c< T,C12 >
+        , vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+        >
+{
+    typedef vector13_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13
+    >
+struct vector14_c
+    : v_item<
+          integral_c< T,C13 >
+        , vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+        >
+{
+    typedef vector14_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14
+    >
+struct vector15_c
+    : v_item<
+          integral_c< T,C14 >
+        , vector14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >
+        >
+{
+    typedef vector15_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15
+    >
+struct vector16_c
+    : v_item<
+          integral_c< T,C15 >
+        , vector15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >
+        >
+{
+    typedef vector16_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16
+    >
+struct vector17_c
+    : v_item<
+          integral_c< T,C16 >
+        , vector16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >
+        >
+{
+    typedef vector17_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17
+    >
+struct vector18_c
+    : v_item<
+          integral_c< T,C17 >
+        , vector17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >
+        >
+{
+    typedef vector18_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18
+    >
+struct vector19_c
+    : v_item<
+          integral_c< T,C18 >
+        , vector18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >
+        >
+{
+    typedef vector19_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19
+    >
+struct vector20_c
+    : v_item<
+          integral_c< T,C19 >
+        , vector19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >
+        >
+{
+    typedef vector20_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp
new file mode 100644
index 0000000..c404990
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp
@@ -0,0 +1,179 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector30.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20
+    >
+struct vector21
+    : v_item<
+          T20
+        , vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >
+        >
+{
+    typedef vector21 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21
+    >
+struct vector22
+    : v_item<
+          T21
+        , vector21< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20 >
+        >
+{
+    typedef vector22 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22
+    >
+struct vector23
+    : v_item<
+          T22
+        , vector22< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21 >
+        >
+{
+    typedef vector23 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23
+    >
+struct vector24
+    : v_item<
+          T23
+        , vector23< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22 >
+        >
+{
+    typedef vector24 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    >
+struct vector25
+    : v_item<
+          T24
+        , vector24< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23 >
+        >
+{
+    typedef vector25 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25
+    >
+struct vector26
+    : v_item<
+          T25
+        , vector25< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24 >
+        >
+{
+    typedef vector26 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26
+    >
+struct vector27
+    : v_item<
+          T26
+        , vector26< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25 >
+        >
+{
+    typedef vector27 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27
+    >
+struct vector28
+    : v_item<
+          T27
+        , vector27< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26 >
+        >
+{
+    typedef vector28 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28
+    >
+struct vector29
+    : v_item<
+          T28
+        , vector28< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27 >
+        >
+{
+    typedef vector29 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    >
+struct vector30
+    : v_item<
+          T29
+        , vector29< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28 >
+        >
+{
+    typedef vector30 type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp
new file mode 100644
index 0000000..5741bb4
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp
@@ -0,0 +1,173 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector30_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    >
+struct vector21_c
+    : v_item<
+          integral_c< T,C20 >
+        , vector20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >
+        >
+{
+    typedef vector21_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21
+    >
+struct vector22_c
+    : v_item<
+          integral_c< T,C21 >
+        , vector21_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20 >
+        >
+{
+    typedef vector22_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22
+    >
+struct vector23_c
+    : v_item<
+          integral_c< T,C22 >
+        , vector22_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21 >
+        >
+{
+    typedef vector23_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23
+    >
+struct vector24_c
+    : v_item<
+          integral_c< T,C23 >
+        , vector23_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22 >
+        >
+{
+    typedef vector24_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24
+    >
+struct vector25_c
+    : v_item<
+          integral_c< T,C24 >
+        , vector24_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 >
+        >
+{
+    typedef vector25_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25
+    >
+struct vector26_c
+    : v_item<
+          integral_c< T,C25 >
+        , vector25_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24 >
+        >
+{
+    typedef vector26_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26
+    >
+struct vector27_c
+    : v_item<
+          integral_c< T,C26 >
+        , vector26_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25 >
+        >
+{
+    typedef vector27_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27
+    >
+struct vector28_c
+    : v_item<
+          integral_c< T,C27 >
+        , vector27_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26 >
+        >
+{
+    typedef vector28_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28
+    >
+struct vector29_c
+    : v_item<
+          integral_c< T,C28 >
+        , vector28_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27 >
+        >
+{
+    typedef vector29_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29
+    >
+struct vector30_c
+    : v_item<
+          integral_c< T,C29 >
+        , vector29_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28 >
+        >
+{
+    typedef vector30_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp
new file mode 100644
index 0000000..debcf70
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp
@@ -0,0 +1,199 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector40.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30
+    >
+struct vector31
+    : v_item<
+          T30
+        , vector30< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29 >
+        >
+{
+    typedef vector31 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31
+    >
+struct vector32
+    : v_item<
+          T31
+        , vector31< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30 >
+        >
+{
+    typedef vector32 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32
+    >
+struct vector33
+    : v_item<
+          T32
+        , vector32< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31 >
+        >
+{
+    typedef vector33 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33
+    >
+struct vector34
+    : v_item<
+          T33
+        , vector33< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32 >
+        >
+{
+    typedef vector34 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    >
+struct vector35
+    : v_item<
+          T34
+        , vector34< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33 >
+        >
+{
+    typedef vector35 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35
+    >
+struct vector36
+    : v_item<
+          T35
+        , vector35< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34 >
+        >
+{
+    typedef vector36 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36
+    >
+struct vector37
+    : v_item<
+          T36
+        , vector36< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35 >
+        >
+{
+    typedef vector37 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37
+    >
+struct vector38
+    : v_item<
+          T37
+        , vector37< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36 >
+        >
+{
+    typedef vector38 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38
+    >
+struct vector39
+    : v_item<
+          T38
+        , vector38< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37 >
+        >
+{
+    typedef vector39 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    >
+struct vector40
+    : v_item<
+          T39
+        , vector39< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38 >
+        >
+{
+    typedef vector40 type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp
new file mode 100644
index 0000000..88d742e
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp
@@ -0,0 +1,183 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector40_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    >
+struct vector31_c
+    : v_item<
+          integral_c< T,C30 >
+        , vector30_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29 >
+        >
+{
+    typedef vector31_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31
+    >
+struct vector32_c
+    : v_item<
+          integral_c< T,C31 >
+        , vector31_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30 >
+        >
+{
+    typedef vector32_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32
+    >
+struct vector33_c
+    : v_item<
+          integral_c< T,C32 >
+        , vector32_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31 >
+        >
+{
+    typedef vector33_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33
+    >
+struct vector34_c
+    : v_item<
+          integral_c< T,C33 >
+        , vector33_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32 >
+        >
+{
+    typedef vector34_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34
+    >
+struct vector35_c
+    : v_item<
+          integral_c< T,C34 >
+        , vector34_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33 >
+        >
+{
+    typedef vector35_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35
+    >
+struct vector36_c
+    : v_item<
+          integral_c< T,C35 >
+        , vector35_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34 >
+        >
+{
+    typedef vector36_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36
+    >
+struct vector37_c
+    : v_item<
+          integral_c< T,C36 >
+        , vector36_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35 >
+        >
+{
+    typedef vector37_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37
+    >
+struct vector38_c
+    : v_item<
+          integral_c< T,C37 >
+        , vector37_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36 >
+        >
+{
+    typedef vector38_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38
+    >
+struct vector39_c
+    : v_item<
+          integral_c< T,C38 >
+        , vector38_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37 >
+        >
+{
+    typedef vector39_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39
+    >
+struct vector40_c
+    : v_item<
+          integral_c< T,C39 >
+        , vector39_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38 >
+        >
+{
+    typedef vector40_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp
new file mode 100644
index 0000000..8db06df
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp
@@ -0,0 +1,219 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector50.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40
+    >
+struct vector41
+    : v_item<
+          T40
+        , vector40< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39 >
+        >
+{
+    typedef vector41 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41
+    >
+struct vector42
+    : v_item<
+          T41
+        , vector41< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40 >
+        >
+{
+    typedef vector42 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42
+    >
+struct vector43
+    : v_item<
+          T42
+        , vector42< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41 >
+        >
+{
+    typedef vector43 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43
+    >
+struct vector44
+    : v_item<
+          T43
+        , vector43< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42 >
+        >
+{
+    typedef vector44 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    >
+struct vector45
+    : v_item<
+          T44
+        , vector44< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43 >
+        >
+{
+    typedef vector45 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45
+    >
+struct vector46
+    : v_item<
+          T45
+        , vector45< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44 >
+        >
+{
+    typedef vector46 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46
+    >
+struct vector47
+    : v_item<
+          T46
+        , vector46< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45 >
+        >
+{
+    typedef vector47 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47
+    >
+struct vector48
+    : v_item<
+          T47
+        , vector47< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46 >
+        >
+{
+    typedef vector48 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47, typename T48
+    >
+struct vector49
+    : v_item<
+          T48
+        , vector48< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47 >
+        >
+{
+    typedef vector49 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47, typename T48, typename T49
+    >
+struct vector50
+    : v_item<
+          T49
+        , vector49< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48 >
+        >
+{
+    typedef vector50 type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp
new file mode 100644
index 0000000..f56d6af
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp
@@ -0,0 +1,193 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "boost/mpl/vector/vector50_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    >
+struct vector41_c
+    : v_item<
+          integral_c< T,C40 >
+        , vector40_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39 >
+        >
+{
+    typedef vector41_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41
+    >
+struct vector42_c
+    : v_item<
+          integral_c< T,C41 >
+        , vector41_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40 >
+        >
+{
+    typedef vector42_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42
+    >
+struct vector43_c
+    : v_item<
+          integral_c< T,C42 >
+        , vector42_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41 >
+        >
+{
+    typedef vector43_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43
+    >
+struct vector44_c
+    : v_item<
+          integral_c< T,C43 >
+        , vector43_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42 >
+        >
+{
+    typedef vector44_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44
+    >
+struct vector45_c
+    : v_item<
+          integral_c< T,C44 >
+        , vector44_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43 >
+        >
+{
+    typedef vector45_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45
+    >
+struct vector46_c
+    : v_item<
+          integral_c< T,C45 >
+        , vector45_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44 >
+        >
+{
+    typedef vector46_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46
+    >
+struct vector47_c
+    : v_item<
+          integral_c< T,C46 >
+        , vector46_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45 >
+        >
+{
+    typedef vector47_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47
+    >
+struct vector48_c
+    : v_item<
+          integral_c< T,C47 >
+        , vector47_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46 >
+        >
+{
+    typedef vector48_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48
+    >
+struct vector49_c
+    : v_item<
+          integral_c< T,C48 >
+        , vector48_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47 >
+        >
+{
+    typedef vector49_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49
+    >
+struct vector50_c
+    : v_item<
+          integral_c< T,C49 >
+        , vector49_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48 >
+        >
+{
+    typedef vector50_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ext/boost/mpl/vector/aux_/push_back.hpp b/ext/boost/mpl/vector/aux_/push_back.hpp
new file mode 100644
index 0000000..d8783cc
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/push_back.hpp
@@ -0,0 +1,40 @@
+
+#ifndef BOOST_MPL_VECTOR_AUX_PUSH_BACK_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_AUX_PUSH_BACK_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: push_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/push_back_fwd.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+#   include <boost/mpl/vector/aux_/item.hpp>
+#   include <boost/mpl/vector/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct push_back_impl< aux::vector_tag >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef v_item<T,Vector,0> type;
+    };
+};
+
+}}
+
+#endif 
+
+#endif // BOOST_MPL_VECTOR_AUX_PUSH_BACK_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/aux_/push_front.hpp b/ext/boost/mpl/vector/aux_/push_front.hpp
new file mode 100644
index 0000000..26b5f00
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/push_front.hpp
@@ -0,0 +1,40 @@
+
+#ifndef BOOST_MPL_VECTOR_AUX_PUSH_FRONT_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_AUX_PUSH_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/push_front_fwd.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+#   include <boost/mpl/vector/aux_/item.hpp>
+#   include <boost/mpl/vector/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct push_front_impl< aux::vector_tag >
+{
+    template< typename Vector, typename T > struct apply
+    {
+        typedef v_item<T,Vector,1> type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+#endif // BOOST_MPL_VECTOR_AUX_PUSH_FRONT_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/aux_/size.hpp b/ext/boost/mpl/vector/aux_/size.hpp
new file mode 100644
index 0000000..41b7be6
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/size.hpp
@@ -0,0 +1,49 @@
+
+#ifndef BOOST_MPL_VECTOR_AUX_SIZE_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_AUX_SIZE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/size_fwd.hpp>
+#include <boost/mpl/vector/aux_/O1_size.hpp>
+#include <boost/mpl/vector/aux_/tag.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+namespace boost { namespace mpl {
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+
+template<>
+struct size_impl< aux::vector_tag >
+    : O1_size_impl< aux::vector_tag >
+{
+};
+
+#else
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< long N >
+struct size_impl< aux::vector_tag<N> >
+    : O1_size_impl< aux::vector_tag<N> >
+{
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
+
+}}
+
+#endif // BOOST_MPL_VECTOR_AUX_SIZE_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/aux_/tag.hpp b/ext/boost/mpl/vector/aux_/tag.hpp
new file mode 100644
index 0000000..0f37e92
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/tag.hpp
@@ -0,0 +1,32 @@
+
+#ifndef BOOST_MPL_VECTOR_AUX_TAG_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_AUX_TAG_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/aux_/config/typeof.hpp>
+#include <boost/mpl/aux_/nttp_decl.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+struct v_iter_tag;
+
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+struct vector_tag;
+#else
+template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct vector_tag;
+#endif
+
+}}}
+
+#endif // BOOST_MPL_VECTOR_AUX_TAG_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/aux_/vector0.hpp b/ext/boost/mpl/vector/aux_/vector0.hpp
new file mode 100644
index 0000000..b3bb13b
--- /dev/null
+++ b/ext/boost/mpl/vector/aux_/vector0.hpp
@@ -0,0 +1,52 @@
+
+#ifndef BOOST_MPL_VECTOR_AUX_VECTOR0_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_AUX_VECTOR0_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: vector0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/mpl/aux_/type_wrapper.hpp>
+
+#include <boost/mpl/vector/aux_/iterator.hpp>
+#include <boost/mpl/vector/aux_/tag.hpp>
+#include <boost/mpl/aux_/config/typeof.hpp>
+
+namespace boost { namespace mpl {
+
+template< typename Dummy = na > struct vector0;
+
+template<> struct vector0<na>
+{
+#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
+    typedef aux::vector_tag tag;
+    typedef vector0         type;
+    typedef long_<32768>    lower_bound_;
+    typedef lower_bound_    upper_bound_;
+    typedef long_<0>        size;
+
+    static aux::type_wrapper<void_> item_(...);
+#else
+    typedef aux::vector_tag<0> tag;
+    typedef vector0 type;
+    typedef void_ item0;
+    
+    typedef v_iter<vector0<>,0> begin;
+    typedef v_iter<vector0<>,0> end;
+#endif
+};
+
+}}
+
+#endif // BOOST_MPL_VECTOR_AUX_VECTOR0_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/vector0.hpp b/ext/boost/mpl/vector/vector0.hpp
new file mode 100644
index 0000000..9d18104
--- /dev/null
+++ b/ext/boost/mpl/vector/vector0.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: vector0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/vector/aux_/at.hpp>
+#include <boost/mpl/vector/aux_/front.hpp>
+#include <boost/mpl/vector/aux_/push_front.hpp>
+#include <boost/mpl/vector/aux_/pop_front.hpp>
+#include <boost/mpl/vector/aux_/push_back.hpp>
+#include <boost/mpl/vector/aux_/pop_back.hpp>
+#include <boost/mpl/vector/aux_/back.hpp>
+#include <boost/mpl/vector/aux_/clear.hpp>
+#include <boost/mpl/vector/aux_/O1_size.hpp>
+#include <boost/mpl/vector/aux_/size.hpp>
+#include <boost/mpl/vector/aux_/empty.hpp>
+#include <boost/mpl/vector/aux_/item.hpp>
+#include <boost/mpl/vector/aux_/iterator.hpp>
+#include <boost/mpl/vector/aux_/vector0.hpp>
+#include <boost/mpl/vector/aux_/begin_end.hpp>
+#include <boost/mpl/vector/aux_/tag.hpp>
+
+#endif // BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/vector0_c.hpp b/ext/boost/mpl/vector/vector0_c.hpp
new file mode 100644
index 0000000..eb1dcf9
--- /dev/null
+++ b/ext/boost/mpl/vector/vector0_c.hpp
@@ -0,0 +1,31 @@
+
+#ifndef BOOST_MPL_VECTOR_VECTOR0_C_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_VECTOR0_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: vector0_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/vector/vector0.hpp>
+#include <boost/mpl/integral_c.hpp>
+
+namespace boost { namespace mpl {
+
+template< typename T > struct vector0_c
+    : vector0<>
+{
+    typedef vector0_c type;
+    typedef T value_type;
+};
+
+}}
+
+#endif // BOOST_MPL_VECTOR_VECTOR0_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/vector10.hpp b/ext/boost/mpl/vector/vector10.hpp
new file mode 100644
index 0000000..848dd82
--- /dev/null
+++ b/ext/boost/mpl/vector/vector10.hpp
@@ -0,0 +1,45 @@
+
+#ifndef BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: vector10.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/vector/vector0.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER vector10.hpp
+#   include <boost/mpl/vector/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/aux_/config/typeof.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(0, 10, <boost/mpl/vector/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/vector10_c.hpp b/ext/boost/mpl/vector/vector10_c.hpp
new file mode 100644
index 0000000..4e6cf3b
--- /dev/null
+++ b/ext/boost/mpl/vector/vector10_c.hpp
@@ -0,0 +1,46 @@
+
+#ifndef BOOST_MPL_VECTOR_VECTOR10_C_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_VECTOR10_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: vector10_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/vector/vector0_c.hpp>
+#   include <boost/mpl/vector/vector10.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER vector10_c.hpp
+#   include <boost/mpl/vector/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/aux_/config/typeof.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(1, 10, <boost/mpl/vector/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_VECTOR_VECTOR10_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/vector20.hpp b/ext/boost/mpl/vector/vector20.hpp
new file mode 100644
index 0000000..173eacf
--- /dev/null
+++ b/ext/boost/mpl/vector/vector20.hpp
@@ -0,0 +1,45 @@
+
+#ifndef BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: vector20.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/vector/vector10.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER vector20.hpp
+#   include <boost/mpl/vector/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/aux_/config/typeof.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(11, 20, <boost/mpl/vector/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/vector20_c.hpp b/ext/boost/mpl/vector/vector20_c.hpp
new file mode 100644
index 0000000..c6b7187
--- /dev/null
+++ b/ext/boost/mpl/vector/vector20_c.hpp
@@ -0,0 +1,46 @@
+
+#ifndef BOOST_MPL_VECTOR_VECTOR20_C_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_VECTOR20_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: vector20_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/vector/vector10_c.hpp>
+#   include <boost/mpl/vector/vector20.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER vector20_c.hpp
+#   include <boost/mpl/vector/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/aux_/config/typeof.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(11, 20, <boost/mpl/vector/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_VECTOR_VECTOR20_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/vector30.hpp b/ext/boost/mpl/vector/vector30.hpp
new file mode 100644
index 0000000..476ec35
--- /dev/null
+++ b/ext/boost/mpl/vector/vector30.hpp
@@ -0,0 +1,45 @@
+
+#ifndef BOOST_MPL_VECTOR_VECTOR30_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_VECTOR30_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: vector30.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/vector/vector20.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER vector30.hpp
+#   include <boost/mpl/vector/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/aux_/config/typeof.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(21, 30, <boost/mpl/vector/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_VECTOR_VECTOR30_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/vector30_c.hpp b/ext/boost/mpl/vector/vector30_c.hpp
new file mode 100644
index 0000000..c20d8f9
--- /dev/null
+++ b/ext/boost/mpl/vector/vector30_c.hpp
@@ -0,0 +1,47 @@
+
+#ifndef BOOST_MPL_VECTOR_VECTOR30_C_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_VECTOR30_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: vector30_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/vector/vector20_c.hpp>
+#   include <boost/mpl/vector/vector30.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER vector30_c.hpp
+#   include <boost/mpl/vector/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/aux_/config/typeof.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   include <boost/preprocessor/iterate.hpp>
+#   include <boost/config.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(21, 30, <boost/mpl/vector/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_USE_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_VECTOR_VECTOR30_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/vector40.hpp b/ext/boost/mpl/vector/vector40.hpp
new file mode 100644
index 0000000..69203d0
--- /dev/null
+++ b/ext/boost/mpl/vector/vector40.hpp
@@ -0,0 +1,45 @@
+
+#ifndef BOOST_MPL_VECTOR_VECTOR40_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_VECTOR40_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: vector40.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/vector/vector30.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER vector40.hpp
+#   include <boost/mpl/vector/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/aux_/config/typeof.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(31, 40, <boost/mpl/vector/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_VECTOR_VECTOR40_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/vector40_c.hpp b/ext/boost/mpl/vector/vector40_c.hpp
new file mode 100644
index 0000000..bd7310c
--- /dev/null
+++ b/ext/boost/mpl/vector/vector40_c.hpp
@@ -0,0 +1,46 @@
+
+#ifndef BOOST_MPL_VECTOR_VECTOR40_C_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_VECTOR40_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: vector40_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/vector/vector30_c.hpp>
+#   include <boost/mpl/vector/vector40.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER vector40_c.hpp
+#   include <boost/mpl/vector/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/aux_/config/typeof.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(31, 40, <boost/mpl/vector/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_VECTOR_VECTOR40_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/vector50.hpp b/ext/boost/mpl/vector/vector50.hpp
new file mode 100644
index 0000000..4c3e231
--- /dev/null
+++ b/ext/boost/mpl/vector/vector50.hpp
@@ -0,0 +1,45 @@
+
+#ifndef BOOST_MPL_VECTOR_VECTOR50_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_VECTOR50_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: vector50.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/vector/vector40.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER vector50.hpp
+#   include <boost/mpl/vector/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/aux_/config/typeof.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(41, 50, <boost/mpl/vector/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_VECTOR_VECTOR50_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector/vector50_c.hpp b/ext/boost/mpl/vector/vector50_c.hpp
new file mode 100644
index 0000000..2d2e705
--- /dev/null
+++ b/ext/boost/mpl/vector/vector50_c.hpp
@@ -0,0 +1,46 @@
+
+#ifndef BOOST_MPL_VECTOR_VECTOR50_C_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_VECTOR50_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: vector50_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/vector/vector40_c.hpp>
+#   include <boost/mpl/vector/vector50.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER vector50_c.hpp
+#   include <boost/mpl/vector/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/aux_/config/typeof.hpp>
+#   include <boost/mpl/aux_/config/ctps.hpp>
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(41, 50, <boost/mpl/vector/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_VECTOR_VECTOR50_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/vector_c.hpp b/ext/boost/mpl/vector_c.hpp
new file mode 100644
index 0000000..d9f35d0
--- /dev/null
+++ b/ext/boost/mpl/vector_c.hpp
@@ -0,0 +1,61 @@
+
+#ifndef BOOST_MPL_VECTOR_C_HPP_INCLUDED
+#define BOOST_MPL_VECTOR_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: vector_c.hpp 49271 2008-10-11 06:46:00Z agurtovoy $
+// $Date: 2008-10-10 23:46:00 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49271 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/limits/vector.hpp>
+#   include <boost/mpl/aux_/nttp_decl.hpp>
+#   include <boost/mpl/aux_/config/preprocessor.hpp>
+
+#   include <boost/preprocessor/inc.hpp>
+#   include <boost/preprocessor/cat.hpp>
+#   include <boost/preprocessor/stringize.hpp>
+
+#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
+#   define AUX778076_VECTOR_C_HEADER \
+    BOOST_PP_CAT(BOOST_PP_CAT(vector,BOOST_MPL_LIMIT_VECTOR_SIZE),_c).hpp \
+    /**/
+#else
+#   define AUX778076_VECTOR_C_HEADER \
+    BOOST_PP_CAT(BOOST_PP_CAT(vector,BOOST_MPL_LIMIT_VECTOR_SIZE),_c)##.hpp \
+    /**/
+#endif
+
+#   include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_VECTOR_C_HEADER)
+#   undef AUX778076_VECTOR_C_HEADER
+#   include <climits>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER vector_c.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/limits/vector.hpp>
+
+#   define AUX778076_SEQUENCE_NAME vector_c
+#   define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_VECTOR_SIZE
+#   define AUX778076_SEQUENCE_NAME_N(n) BOOST_PP_CAT(BOOST_PP_CAT(vector,n),_c)
+#   define AUX778076_SEQUENCE_CONVERT_CN_TO(z,n,TARGET) TARGET(BOOST_PP_CAT(C,n))
+#   define AUX778076_SEQUENCE_INTEGRAL_WRAPPER
+#   include <boost/mpl/aux_/sequence_wrapper.hpp>
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_VECTOR_C_HPP_INCLUDED
diff --git a/ext/boost/mpl/void.hpp b/ext/boost/mpl/void.hpp
index f464acb..ad5aa56 100644
--- a/ext/boost/mpl/void.hpp
+++ b/ext/boost/mpl/void.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: void.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/void_fwd.hpp>
diff --git a/ext/boost/mpl/void_fwd.hpp b/ext/boost/mpl/void_fwd.hpp
index 0dcd639..9643dec 100644
--- a/ext/boost/mpl/void_fwd.hpp
+++ b/ext/boost/mpl/void_fwd.hpp
@@ -11,7 +11,7 @@
 // See http://www.boost.org/libs/mpl for documentation.
 
 // $Id: void_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
 // $Revision: 49267 $
 
 #include <boost/mpl/aux_/adl_barrier.hpp>
diff --git a/ext/boost/mpl/zip_view.hpp b/ext/boost/mpl/zip_view.hpp
new file mode 100644
index 0000000..4bc26c1
--- /dev/null
+++ b/ext/boost/mpl/zip_view.hpp
@@ -0,0 +1,65 @@
+
+#ifndef BOOST_MPL_ZIP_VIEW_HPP_INCLUDED
+#define BOOST_MPL_ZIP_VIEW_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2010
+// Copyright David Abrahams 2000-2002
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: zip_view.hpp 61591 2010-04-26 21:31:09Z agurtovoy $
+// $Date: 2010-04-26 14:31:09 -0700 (Mon, 26 Apr 2010) $
+// $Revision: 61591 $
+
+#include <boost/mpl/transform.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/iterator_tags.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+
+namespace boost { namespace mpl {
+
+template< typename IteratorSeq >
+struct zip_iterator
+{
+    typedef forward_iterator_tag category;
+    typedef typename transform1<
+          IteratorSeq
+        , deref<_1>
+        >::type type;
+
+    typedef zip_iterator<
+          typename transform1<
+                IteratorSeq
+              , mpl::next<_1>
+            >::type
+        > next;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(Sequences)
+    >
+struct zip_view
+{
+ private:
+    typedef typename transform1< Sequences, mpl::begin<_1> >::type first_ones_;
+    typedef typename transform1< Sequences, mpl::end<_1> >::type last_ones_;
+    
+ public:
+    typedef nested_begin_end_tag tag;
+    typedef zip_view type;
+    typedef zip_iterator<first_ones_> begin;
+    typedef zip_iterator<last_ones_> end;
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, zip_view)
+
+}}
+
+#endif // BOOST_MPL_ZIP_VIEW_HPP_INCLUDED
diff --git a/ext/boost/none.hpp b/ext/boost/none.hpp
index bd342da..e9fc062 100644
--- a/ext/boost/none.hpp
+++ b/ext/boost/none.hpp
@@ -20,7 +20,7 @@
 
 namespace boost {
 
-none_t const none = ((none_t)0) ;
+none_t const none = (static_cast<none_t>(0)) ;
 
 } // namespace boost
 
diff --git a/ext/boost/numeric/conversion/bounds.hpp b/ext/boost/numeric/conversion/bounds.hpp
new file mode 100644
index 0000000..e4c7c7d
--- /dev/null
+++ b/ext/boost/numeric/conversion/bounds.hpp
@@ -0,0 +1,24 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola at hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_BOUNDS_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_BOUNDS_12NOV2002_HPP
+
+#include "boost/numeric/conversion/detail/bounds.hpp"
+
+namespace boost { namespace numeric 
+{
+
+template<class N>
+struct bounds : boundsdetail::get_impl<N>::type
+{} ;
+
+} } // namespace boost::numeric
+
+#endif
diff --git a/ext/boost/numeric/conversion/cast.hpp b/ext/boost/numeric/conversion/cast.hpp
new file mode 100644
index 0000000..1ee0251
--- /dev/null
+++ b/ext/boost/numeric/conversion/cast.hpp
@@ -0,0 +1,61 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola at hotmail.com
+//
+//
+//  Revision History
+//
+//    19 Nov 2001 Syntatic changes as suggested by Darin Adler (Fernando Cacciola)
+//    08 Nov 2001 Fixes to accommodate MSVC (Fernando Cacciola)
+//    04 Nov 2001 Fixes to accommodate gcc2.92 (Fernando Cacciola)
+//    30 Oct 2001 Some fixes suggested by Daryle Walker (Fernando Cacciola)
+//    25 Oct 2001 Initial boostification (Fernando Cacciola)
+//    23 Jan 2004 Inital add to cvs (post review)s
+//    22 Jun 2011 Added support for specializing cast policies via numeric_cast_traits (Brandon Kohn).
+//
+#ifndef BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP
+#define BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP
+
+#include <boost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+
+#  include<boost/numeric/conversion/detail/old_numeric_cast.hpp>
+
+#else
+
+#include <boost/type.hpp>
+#include <boost/numeric/conversion/converter.hpp>
+#include <boost/numeric/conversion/numeric_cast_traits.hpp>
+
+namespace boost
+{
+    template <typename Target, typename Source> 
+    inline Target numeric_cast( Source arg )
+    {
+        typedef numeric::conversion_traits<Target, Source>   conv_traits;
+        typedef numeric::numeric_cast_traits<Target, Source> cast_traits;
+        typedef boost::numeric::converter
+            <
+                Target,
+                Source, 
+                conv_traits,
+                typename cast_traits::overflow_policy, 
+                typename cast_traits::rounding_policy, 
+                boost::numeric::raw_converter< conv_traits >,
+                typename cast_traits::range_checking_policy
+            > converter;
+        return converter::convert(arg);
+    }
+    
+    using numeric::bad_numeric_cast;
+} // namespace boost
+
+#endif
+
+#endif
diff --git a/ext/boost/numeric/conversion/conversion_traits.hpp b/ext/boost/numeric/conversion/conversion_traits.hpp
new file mode 100644
index 0000000..6da6178
--- /dev/null
+++ b/ext/boost/numeric/conversion/conversion_traits.hpp
@@ -0,0 +1,39 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola at hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_CONVERSION_TRAITS_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_CONVERSION_TRAITS_FLC_12NOV2002_HPP
+
+#include "boost/numeric/conversion/detail/conversion_traits.hpp"
+#include "boost/detail/workaround.hpp"
+#include "boost/config.hpp"
+
+namespace boost { namespace numeric
+{
+
+template<class T, class S>
+struct conversion_traits 
+    : convdetail::get_conversion_traits<T,S>::type 
+{
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+    typedef typename convdetail::get_conversion_traits<T,S>::type base_;
+    typedef typename base_::target_type     target_type;
+    typedef typename base_::source_type     source_type;
+    typedef typename base_::result_type     result_type;
+    typedef typename base_::argument_type   argument_type;
+#endif
+} ;
+
+} } // namespace boost::numeric
+
+#endif
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/ext/boost/numeric/conversion/converter.hpp b/ext/boost/numeric/conversion/converter.hpp
new file mode 100644
index 0000000..331cadd
--- /dev/null
+++ b/ext/boost/numeric/conversion/converter.hpp
@@ -0,0 +1,68 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola at hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_CONVERTER_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_CONVERTER_FLC_12NOV2002_HPP
+
+#include "boost/numeric/conversion/conversion_traits.hpp"
+#include "boost/numeric/conversion/converter_policies.hpp"
+
+#include "boost/numeric/conversion/detail/converter.hpp"
+
+namespace boost { namespace numeric 
+{
+
+template<class T,
+         class S,
+         class Traits           = conversion_traits<T,S>,
+         class OverflowHandler  = def_overflow_handler,
+         class Float2IntRounder = Trunc< BOOST_DEDUCED_TYPENAME Traits::source_type>  ,
+         class RawConverter     = raw_converter<Traits>,
+         class UserRangeChecker = UseInternalRangeChecker
+        >
+struct converter : convdetail::get_converter_impl<Traits,
+                                                  OverflowHandler,
+                                                  Float2IntRounder,
+                                                  RawConverter,
+                                                  UserRangeChecker
+                                                 >::type
+{
+  typedef Traits traits ;
+
+  typedef typename Traits::argument_type argument_type ;
+  typedef typename Traits::result_type   result_type   ;
+
+  result_type operator() ( argument_type s ) const { return this->convert(s) ; }
+} ;
+
+
+
+template<class S,
+         class OverflowHandler  = def_overflow_handler,
+         class Float2IntRounder = Trunc<S>  ,
+         class UserRangeChecker = UseInternalRangeChecker
+        >
+struct make_converter_from
+{
+  template<class T,
+           class Traits       = conversion_traits<T,S>,
+           class RawConverter = raw_converter<Traits>
+          > 
+  struct to
+  {
+    typedef converter<T,S,Traits,OverflowHandler,Float2IntRounder,RawConverter,UserRangeChecker> type ;
+  } ;
+
+} ;
+
+} } // namespace boost::numeric
+
+#endif
+
+
diff --git a/ext/boost/numeric/conversion/converter_policies.hpp b/ext/boost/numeric/conversion/converter_policies.hpp
new file mode 100644
index 0000000..e7a5e67
--- /dev/null
+++ b/ext/boost/numeric/conversion/converter_policies.hpp
@@ -0,0 +1,194 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola at hotmail.com
+//
+#ifndef BOOST_NUMERIC_CONVERSION_CONVERTER_POLICIES_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_CONVERTER_POLICIES_FLC_12NOV2002_HPP
+
+#include <typeinfo> // for std::bad_cast
+
+#include <boost/config/no_tr1/cmath.hpp> // for std::floor and std::ceil
+#include <boost/throw_exception.hpp>
+
+#include <functional>
+
+#include "boost/type_traits/is_arithmetic.hpp"
+
+#include "boost/mpl/if.hpp"
+#include "boost/mpl/integral_c.hpp"
+
+namespace boost { namespace numeric
+{
+
+template<class S>
+struct Trunc
+{
+  typedef S source_type ;
+
+  typedef typename mpl::if_< is_arithmetic<S>,S,S const&>::type argument_type ;
+
+  static source_type nearbyint ( argument_type s )
+  {
+#if !defined(BOOST_NO_STDC_NAMESPACE)
+    using std::floor ;
+    using std::ceil  ;
+#endif
+
+    return s < static_cast<S>(0) ? ceil(s) : floor(s) ;
+  }
+
+  typedef mpl::integral_c< std::float_round_style, std::round_toward_zero> round_style ;
+} ;
+
+
+
+template<class S>
+struct Floor
+{
+  typedef S source_type ;
+
+  typedef typename mpl::if_< is_arithmetic<S>,S,S const&>::type argument_type ;
+
+  static source_type nearbyint ( argument_type s )
+  {
+#if !defined(BOOST_NO_STDC_NAMESPACE)
+    using std::floor ;
+#endif
+
+    return floor(s) ;
+  }
+
+  typedef mpl::integral_c< std::float_round_style, std::round_toward_neg_infinity> round_style ;
+} ;
+
+template<class S>
+struct Ceil
+{
+  typedef S source_type ;
+
+  typedef typename mpl::if_< is_arithmetic<S>,S,S const&>::type argument_type ;
+
+  static source_type nearbyint ( argument_type s )
+  {
+#if !defined(BOOST_NO_STDC_NAMESPACE)
+    using std::ceil ;
+#endif
+
+    return ceil(s) ;
+  }
+
+  typedef mpl::integral_c< std::float_round_style, std::round_toward_infinity> round_style ;
+} ;
+
+template<class S>
+struct RoundEven
+{
+  typedef S source_type ;
+
+  typedef typename mpl::if_< is_arithmetic<S>,S,S const&>::type argument_type ;
+
+  static source_type nearbyint ( argument_type s )
+  {
+    // Algorithm contributed by Guillaume Melquiond
+
+#if !defined(BOOST_NO_STDC_NAMESPACE)
+    using std::floor ;
+    using std::ceil  ;
+#endif
+
+    // only works inside the range not at the boundaries
+    S prev = floor(s);
+    S next = ceil(s);
+
+    S rt = (s - prev) - (next - s); // remainder type
+
+    S const zero(0.0);
+    S const two(2.0);
+
+    if ( rt < zero )
+      return prev;
+    else if ( rt > zero )
+      return next;
+    else
+    {
+      bool is_prev_even = two * floor(prev / two) == prev ;
+      return ( is_prev_even ? prev : next ) ;
+    }
+  }
+
+  typedef mpl::integral_c< std::float_round_style, std::round_to_nearest> round_style ;
+} ;
+
+
+enum range_check_result
+{
+  cInRange     = 0 ,
+  cNegOverflow = 1 ,
+  cPosOverflow = 2
+} ;
+
+class bad_numeric_cast : public std::bad_cast
+{
+  public:
+
+    virtual const char * what() const throw()
+      {  return "bad numeric conversion: overflow"; }
+};
+
+class negative_overflow : public bad_numeric_cast
+{
+  public:
+
+    virtual const char * what() const throw()
+      {  return "bad numeric conversion: negative overflow"; }
+};
+class positive_overflow : public bad_numeric_cast
+{
+  public:
+
+    virtual const char * what() const throw()
+      { return "bad numeric conversion: positive overflow"; }
+};
+
+struct def_overflow_handler
+{
+  void operator() ( range_check_result r ) // throw(negative_overflow,positive_overflow)
+  {
+#ifndef BOOST_NO_EXCEPTIONS
+    if ( r == cNegOverflow )
+      throw negative_overflow() ;
+    else if ( r == cPosOverflow )
+           throw positive_overflow() ;
+#else
+    if ( r == cNegOverflow )
+      ::boost::throw_exception(negative_overflow()) ;
+    else if ( r == cPosOverflow )
+           ::boost::throw_exception(positive_overflow()) ;
+#endif
+  }
+} ;
+
+struct silent_overflow_handler
+{
+  void operator() ( range_check_result ) {} // throw()
+} ;
+
+template<class Traits>
+struct raw_converter
+{
+  typedef typename Traits::result_type   result_type   ;
+  typedef typename Traits::argument_type argument_type ;
+
+  static result_type low_level_convert ( argument_type s ) { return static_cast<result_type>(s) ; }
+} ;
+
+struct UseInternalRangeChecker {} ;
+
+} } // namespace boost::numeric
+
+#endif
diff --git a/ext/boost/numeric/conversion/detail/bounds.hpp b/ext/boost/numeric/conversion/detail/bounds.hpp
new file mode 100644
index 0000000..67342b8
--- /dev/null
+++ b/ext/boost/numeric/conversion/detail/bounds.hpp
@@ -0,0 +1,58 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola at hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP
+
+#include "boost/limits.hpp"
+#include "boost/config.hpp"
+#include "boost/mpl/if.hpp"
+
+namespace boost { namespace numeric { namespace boundsdetail
+{
+  template<class N>
+  class Integral
+  {
+      typedef std::numeric_limits<N> limits ;
+
+    public :
+    
+      static N lowest  () { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); }
+      static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); }
+      static N smallest() { return static_cast<N>(1); }
+  } ;
+
+  template<class N>
+  class Float
+  {
+      typedef std::numeric_limits<N> limits ;
+
+    public :
+    
+      static N lowest  () { return static_cast<N>(-limits::max BOOST_PREVENT_MACRO_SUBSTITUTION ()) ; }
+      static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); }
+      static N smallest() { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); }
+  } ;
+
+  template<class N>
+  struct get_impl
+  {
+    typedef mpl::bool_< ::std::numeric_limits<N>::is_integer > is_int ;
+
+    typedef Integral<N> impl_int   ;
+    typedef Float   <N> impl_float ;
+
+    typedef typename mpl::if_<is_int,impl_int,impl_float>::type type ;
+  } ;
+
+} } } // namespace boost::numeric::boundsdetail.
+
+#endif
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/ext/boost/numeric/conversion/detail/conversion_traits.hpp b/ext/boost/numeric/conversion/detail/conversion_traits.hpp
new file mode 100644
index 0000000..ed25349
--- /dev/null
+++ b/ext/boost/numeric/conversion/detail/conversion_traits.hpp
@@ -0,0 +1,97 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola at hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_CONVERSION_TRAITS_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_DETAIL_CONVERSION_TRAITS_FLC_12NOV2002_HPP
+
+#include "boost/type_traits/is_arithmetic.hpp"
+#include "boost/type_traits/is_same.hpp"
+#include "boost/type_traits/remove_cv.hpp"
+
+#include "boost/numeric/conversion/detail/meta.hpp"
+#include "boost/numeric/conversion/detail/int_float_mixture.hpp"
+#include "boost/numeric/conversion/detail/sign_mixture.hpp"
+#include "boost/numeric/conversion/detail/udt_builtin_mixture.hpp"
+#include "boost/numeric/conversion/detail/is_subranged.hpp"
+
+namespace boost { namespace numeric { namespace convdetail
+{
+  //-------------------------------------------------------------------
+  // Implementation of the Conversion Traits for T != S
+  //
+  // This is a VISIBLE base class of the user-level conversion_traits<> class.
+  //-------------------------------------------------------------------
+  template<class T,class S>
+  struct non_trivial_traits_impl
+  {
+    typedef typename get_int_float_mixture   <T,S>::type int_float_mixture ;
+    typedef typename get_sign_mixture        <T,S>::type sign_mixture ;
+    typedef typename get_udt_builtin_mixture <T,S>::type udt_builtin_mixture ;
+
+    typedef typename get_is_subranged<T,S>::type subranged ;
+
+    typedef mpl::false_ trivial ;
+
+    typedef T target_type ;
+    typedef S source_type ;
+    typedef T result_type ;
+
+    typedef typename mpl::if_< is_arithmetic<S>, S, S const&>::type argument_type ;
+
+    typedef typename mpl::if_<subranged,S,T>::type supertype ;
+    typedef typename mpl::if_<subranged,T,S>::type subtype   ;
+  } ;
+
+  //-------------------------------------------------------------------
+  // Implementation of the Conversion Traits for T == S
+  //
+  // This is a VISIBLE base class of the user-level conversion_traits<> class.
+  //-------------------------------------------------------------------
+  template<class N>
+  struct trivial_traits_impl
+  {
+    typedef typename get_int_float_mixture  <N,N>::type int_float_mixture ;
+    typedef typename get_sign_mixture       <N,N>::type sign_mixture ;
+    typedef typename get_udt_builtin_mixture<N,N>::type udt_builtin_mixture ;
+
+    typedef mpl::false_ subranged ;
+    typedef mpl::true_  trivial ;
+
+    typedef N        target_type ;
+    typedef N        source_type ;
+    typedef N const& result_type ;
+    typedef N const& argument_type ;
+
+    typedef N supertype ;
+    typedef N subtype  ;
+
+  } ;
+
+  //-------------------------------------------------------------------
+  // Top level implementation selector.
+  //-------------------------------------------------------------------
+  template<class T, class S>
+  struct get_conversion_traits
+  {
+    typedef typename remove_cv<T>::type target_type ;
+    typedef typename remove_cv<S>::type source_type ;
+
+    typedef typename is_same<target_type,source_type>::type is_trivial ;
+
+    typedef trivial_traits_impl    <target_type>             trivial_imp ;
+    typedef non_trivial_traits_impl<target_type,source_type> non_trivial_imp ;
+
+    typedef typename mpl::if_<is_trivial,trivial_imp,non_trivial_imp>::type type ;
+  } ;
+
+} } } // namespace boost::numeric::convdetail
+
+#endif
+
+
diff --git a/ext/boost/numeric/conversion/detail/converter.hpp b/ext/boost/numeric/conversion/detail/converter.hpp
new file mode 100644
index 0000000..10550f8
--- /dev/null
+++ b/ext/boost/numeric/conversion/detail/converter.hpp
@@ -0,0 +1,602 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola at hotmail.com
+//
+#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_CONVERTER_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_DETAIL_CONVERTER_FLC_12NOV2002_HPP
+
+#include <functional>
+
+#include "boost/numeric/conversion/detail/meta.hpp"
+#include "boost/numeric/conversion/detail/conversion_traits.hpp"
+#include "boost/numeric/conversion/bounds.hpp"
+
+#include "boost/type_traits/is_same.hpp"
+
+#include "boost/mpl/integral_c.hpp"
+
+namespace boost { namespace numeric { namespace convdetail
+{
+  // Integral Constants representing rounding modes
+  typedef mpl::integral_c<std::float_round_style, std::round_toward_zero>         round2zero_c ;
+  typedef mpl::integral_c<std::float_round_style, std::round_to_nearest>          round2nearest_c ;
+  typedef mpl::integral_c<std::float_round_style, std::round_toward_infinity>     round2inf_c ;
+  typedef mpl::integral_c<std::float_round_style, std::round_toward_neg_infinity> round2neg_inf_c ;
+
+  // Metafunction:
+  //
+  //   for_round_style<RoundStyle,RoundToZero,RoundToNearest,RoundToInf,RoundToNegInf>::type
+  //
+  // {RoundStyle} Integral Constant specifying a round style as declared above.
+  // {RoundToZero,RoundToNearest,RoundToInf,RoundToNegInf} arbitrary types.
+  //
+  // Selects one of the 4 types according to the value of RoundStyle.
+  //
+  template<class RoundStyle,class RoundToZero,class RoundToNearest,class RoundToInf,class RoundToNegInf>
+  struct for_round_style
+  {
+    typedef ct_switch4<RoundStyle
+                       , round2zero_c, round2nearest_c, round2inf_c // round2neg_inf_c
+                       , RoundToZero , RoundToNearest , RoundToInf , RoundToNegInf
+                      > selector ;
+
+    typedef typename selector::type type ;
+  } ;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//--------------------------------------------------------------------------
+//                             Range Checking Logic.
+//
+// The range checking logic is built up by combining 1 or 2 predicates.
+// Each predicate is encapsulated in a template class and exposes
+// the static member function 'apply'.
+//
+//--------------------------------------------------------------------------
+
+
+  // Because a particular logic can combine either 1 or two predicates, the following
+  // tags are used to allow the predicate applier to receive 2 preds, but optimize away
+  // one of them if it is 'non-applicable'
+  struct non_applicable { typedef mpl::false_ do_apply ; } ;
+  struct applicable     { typedef mpl::true_  do_apply ; } ;
+
+
+  //--------------------------------------------------------------------------
+  //
+  //                      Range Checking Logic implementations.
+  //
+  // The following classes, collectivelly named 'Predicates', are instantiated within
+  // the corresponding range checkers.
+  // Their static member function 'apply' is called to perform the actual range checking logic.
+  //--------------------------------------------------------------------------
+
+    // s < Lowest(T) ? cNegOverflow : cInRange
+    //
+    template<class Traits>
+    struct LT_LoT : applicable
+    {
+      typedef typename Traits::target_type T ;
+      typedef typename Traits::source_type S ;
+      typedef typename Traits::argument_type argument_type ;
+
+      static range_check_result apply ( argument_type s )
+      {
+        return s < static_cast<S>(bounds<T>::lowest()) ? cNegOverflow : cInRange ;
+      }
+    } ;
+
+    // s < 0 ? cNegOverflow : cInRange
+    //
+    template<class Traits>
+    struct LT_Zero : applicable
+    {
+      typedef typename Traits::source_type S ;
+      typedef typename Traits::argument_type argument_type ;
+
+      static range_check_result apply ( argument_type s )
+      {
+        return s < static_cast<S>(0) ? cNegOverflow : cInRange ;
+      }
+    } ;
+
+    // s <= Lowest(T)-1 ? cNegOverflow : cInRange
+    //
+    template<class Traits>
+    struct LE_PrevLoT : applicable
+    {
+      typedef typename Traits::target_type T ;
+      typedef typename Traits::source_type S ;
+      typedef typename Traits::argument_type argument_type ;
+
+      static range_check_result apply ( argument_type s )
+      {
+        return s <= static_cast<S>(bounds<T>::lowest()) - static_cast<S>(1.0)
+                 ? cNegOverflow : cInRange ;
+      }
+    } ;
+
+    // s < Lowest(T)-0.5 ? cNegOverflow : cInRange
+    //
+    template<class Traits>
+    struct LT_HalfPrevLoT : applicable
+    {
+      typedef typename Traits::target_type T ;
+      typedef typename Traits::source_type S ;
+      typedef typename Traits::argument_type argument_type ;
+
+      static range_check_result apply ( argument_type s )
+      {
+        return s < static_cast<S>(bounds<T>::lowest()) - static_cast<S>(0.5)
+                 ? cNegOverflow : cInRange ;
+      }
+    } ;
+
+    // s > Highest(T) ? cPosOverflow : cInRange
+    //
+    template<class Traits>
+    struct GT_HiT : applicable
+    {
+      typedef typename Traits::target_type T ;
+      typedef typename Traits::source_type S ;
+      typedef typename Traits::argument_type argument_type ;
+
+      static range_check_result apply ( argument_type s )
+      {
+        return s > static_cast<S>(bounds<T>::highest())
+                 ? cPosOverflow : cInRange ;
+      }
+    } ;
+
+    // s >= Lowest(T) + 1 ? cPosOverflow : cInRange
+    //
+    template<class Traits>
+    struct GE_SuccHiT : applicable
+    {
+      typedef typename Traits::target_type T ;
+      typedef typename Traits::source_type S ;
+      typedef typename Traits::argument_type argument_type ;
+
+      static range_check_result apply ( argument_type s )
+      {
+        return s >= static_cast<S>(bounds<T>::highest()) + static_cast<S>(1.0)
+                 ? cPosOverflow : cInRange ;
+      }
+    } ;
+
+    // s >= Lowest(T) + 0.5 ? cPosgOverflow : cInRange
+    //
+    template<class Traits>
+    struct GT_HalfSuccHiT : applicable
+    {
+      typedef typename Traits::target_type T ;
+      typedef typename Traits::source_type S ;
+      typedef typename Traits::argument_type argument_type ;
+
+      static range_check_result apply ( argument_type s )
+      {
+        return s >= static_cast<S>(bounds<T>::highest()) + static_cast<S>(0.5)
+                 ? cPosOverflow : cInRange ;
+      }
+    } ;
+
+
+  //--------------------------------------------------------------------------
+  //
+  // Predicate Combiner.
+  //
+  // This helper classes are used to possibly combine the range checking logic
+  // individually performed by the predicates
+  //
+  //--------------------------------------------------------------------------
+
+
+    // Applies both predicates: first 'PredA', and if it equals 'cInRange', 'PredB'
+    template<class PredA, class PredB>
+    struct applyBoth
+    {
+      typedef typename PredA::argument_type argument_type ;
+
+      static range_check_result apply ( argument_type s )
+      {
+        range_check_result r = PredA::apply(s) ;
+        if ( r == cInRange )
+          r = PredB::apply(s);
+        return r ;
+      }
+    } ;
+
+    template<class PredA, class PredB>
+    struct combine
+    {
+      typedef applyBoth<PredA,PredB> Both ;
+      typedef void                   NNone ; // 'None' is defined as a macro in (/usr/X11R6/include/X11/X.h)
+
+      typedef typename PredA::do_apply do_applyA ;
+      typedef typename PredB::do_apply do_applyB ;
+
+      typedef typename for_both<do_applyA, do_applyB, Both, PredA, PredB, NNone>::type type ;
+    } ;
+
+
+
+
+
+
+
+
+
+
+
+
+//--------------------------------------------------------------------------
+//                             Range Checker classes.
+//
+// The following classes are VISIBLE base classes of the user-level converter<> class.
+// They supply the optimized 'out_of_range()' and 'validate_range()' static member functions
+// visible in the user interface.
+//
+//--------------------------------------------------------------------------
+
+  // Dummy range checker.
+  template<class Traits>
+  struct dummy_range_checker
+  {
+    typedef typename Traits::argument_type argument_type ;
+
+    static range_check_result out_of_range ( argument_type ) { return cInRange ; }
+    static void validate_range ( argument_type ) {}
+  } ;
+
+  // Generic range checker.
+  //
+  // All the range checking logic for all possible combinations of source and target
+  // can be arranged in terms of one or two predicates, which test overflow on both neg/pos 'sides'
+  // of the ranges.
+  //
+  // These predicates are given here as IsNegOverflow and IsPosOverflow.
+  //
+  template<class Traits, class IsNegOverflow, class IsPosOverflow, class OverflowHandler>
+  struct generic_range_checker
+  {
+    typedef OverflowHandler overflow_handler ;
+
+    typedef typename Traits::argument_type argument_type ;
+
+    static range_check_result out_of_range ( argument_type s )
+    {
+      typedef typename combine<IsNegOverflow,IsPosOverflow>::type Predicate ;
+
+      return Predicate::apply(s);
+    }
+
+    static void validate_range ( argument_type s )
+      { OverflowHandler()( out_of_range(s) ) ; }
+  } ;
+
+
+
+//--------------------------------------------------------------------------
+//
+// Selectors for the optimized Range Checker class.
+//
+//--------------------------------------------------------------------------
+
+  template<class Traits,class OverflowHandler>
+  struct GetRC_Sig2Sig_or_Unsig2Unsig
+  {
+    typedef dummy_range_checker<Traits> Dummy ;
+
+    typedef LT_LoT<Traits> Pred1 ;
+    typedef GT_HiT<Traits> Pred2 ;
+
+    typedef generic_range_checker<Traits,Pred1,Pred2,OverflowHandler> Normal ;
+
+    typedef typename Traits::subranged subranged ;
+
+    typedef typename mpl::if_<subranged,Normal,Dummy>::type type ;
+  } ;
+
+  template<class Traits, class OverflowHandler>
+  struct GetRC_Sig2Unsig
+  {
+    typedef LT_Zero<Traits> Pred1 ;
+    typedef GT_HiT <Traits> Pred2 ;
+
+    typedef generic_range_checker<Traits,Pred1,Pred2,OverflowHandler> ChoiceA ;
+
+    typedef generic_range_checker<Traits,Pred1,non_applicable,OverflowHandler> ChoiceB ;
+
+    typedef typename Traits::target_type T ;
+    typedef typename Traits::source_type S ;
+
+    typedef typename subranged_Unsig2Sig<S,T>::type oposite_subranged ;
+
+    typedef typename mpl::not_<oposite_subranged>::type positively_subranged ;
+
+    typedef typename mpl::if_<positively_subranged,ChoiceA,ChoiceB>::type type ;
+  } ;
+
+  template<class Traits, class OverflowHandler>
+  struct GetRC_Unsig2Sig
+  {
+    typedef GT_HiT<Traits> Pred1 ;
+
+    typedef generic_range_checker<Traits,non_applicable,Pred1,OverflowHandler> type ;
+  } ;
+
+  template<class Traits,class OverflowHandler>
+  struct GetRC_Int2Int
+  {
+    typedef GetRC_Sig2Sig_or_Unsig2Unsig<Traits,OverflowHandler> Sig2SigQ     ;
+    typedef GetRC_Sig2Unsig             <Traits,OverflowHandler> Sig2UnsigQ   ;
+    typedef GetRC_Unsig2Sig             <Traits,OverflowHandler> Unsig2SigQ   ;
+    typedef Sig2SigQ                                             Unsig2UnsigQ ;
+
+    typedef typename Traits::sign_mixture sign_mixture ;
+
+    typedef typename
+      for_sign_mixture<sign_mixture,Sig2SigQ,Sig2UnsigQ,Unsig2SigQ,Unsig2UnsigQ>::type
+        selector ;
+
+    typedef typename selector::type type ;
+  } ;
+
+  template<class Traits>
+  struct GetRC_Int2Float
+  {
+    typedef dummy_range_checker<Traits> type ;
+  } ;
+
+  template<class Traits, class OverflowHandler, class Float2IntRounder>
+  struct GetRC_Float2Int
+  {
+    typedef LE_PrevLoT    <Traits> Pred1 ;
+    typedef GE_SuccHiT    <Traits> Pred2 ;
+    typedef LT_HalfPrevLoT<Traits> Pred3 ;
+    typedef GT_HalfSuccHiT<Traits> Pred4 ;
+    typedef GT_HiT        <Traits> Pred5 ;
+    typedef LT_LoT        <Traits> Pred6 ;
+
+    typedef generic_range_checker<Traits,Pred1,Pred2,OverflowHandler> ToZero    ;
+    typedef generic_range_checker<Traits,Pred3,Pred4,OverflowHandler> ToNearest ;
+    typedef generic_range_checker<Traits,Pred1,Pred5,OverflowHandler> ToInf     ;
+    typedef generic_range_checker<Traits,Pred6,Pred2,OverflowHandler> ToNegInf  ;
+
+    typedef typename Float2IntRounder::round_style round_style ;
+
+    typedef typename for_round_style<round_style,ToZero,ToNearest,ToInf,ToNegInf>::type type ;
+  } ;
+
+  template<class Traits, class OverflowHandler>
+  struct GetRC_Float2Float
+  {
+    typedef dummy_range_checker<Traits> Dummy ;
+
+    typedef LT_LoT<Traits> Pred1 ;
+    typedef GT_HiT<Traits> Pred2 ;
+
+    typedef generic_range_checker<Traits,Pred1,Pred2,OverflowHandler> Normal ;
+
+    typedef typename Traits::subranged subranged ;
+
+    typedef typename mpl::if_<subranged,Normal,Dummy>::type type ;
+  } ;
+
+  template<class Traits, class OverflowHandler, class Float2IntRounder>
+  struct GetRC_BuiltIn2BuiltIn
+  {
+    typedef GetRC_Int2Int<Traits,OverflowHandler>                    Int2IntQ ;
+    typedef GetRC_Int2Float<Traits>                                  Int2FloatQ ;
+    typedef GetRC_Float2Int<Traits,OverflowHandler,Float2IntRounder> Float2IntQ ;
+    typedef GetRC_Float2Float<Traits,OverflowHandler>                Float2FloatQ ;
+
+    typedef typename Traits::int_float_mixture int_float_mixture ;
+
+    typedef typename for_int_float_mixture<int_float_mixture, Int2IntQ, Int2FloatQ, Float2IntQ, Float2FloatQ>::type selector ;
+
+    typedef typename selector::type type ;
+  } ;
+
+  template<class Traits, class OverflowHandler, class Float2IntRounder>
+  struct GetRC
+  {
+    typedef GetRC_BuiltIn2BuiltIn<Traits,OverflowHandler,Float2IntRounder> BuiltIn2BuiltInQ ;
+
+    typedef dummy_range_checker<Traits> Dummy ;
+
+    typedef mpl::identity<Dummy> DummyQ ;
+
+    typedef typename Traits::udt_builtin_mixture udt_builtin_mixture ;
+
+    typedef typename for_udt_builtin_mixture<udt_builtin_mixture,BuiltIn2BuiltInQ,DummyQ,DummyQ,DummyQ>::type selector ;
+
+    typedef typename selector::type type ;
+  } ;
+
+
+
+
+//--------------------------------------------------------------------------
+//                             Converter classes.
+//
+// The following classes are VISIBLE base classes of the user-level converter<> class.
+// They supply the optimized 'nearbyint()' and 'convert()' static member functions
+// visible in the user interface.
+//
+//--------------------------------------------------------------------------
+
+  //
+  // Trivial Converter : used when (cv-unqualified) T == (cv-unqualified)  S
+  //
+  template<class Traits>
+  struct trivial_converter_impl : public std::unary_function<  BOOST_DEDUCED_TYPENAME Traits::argument_type
+                                                              ,BOOST_DEDUCED_TYPENAME Traits::result_type
+                                                            >
+                                 ,public dummy_range_checker<Traits>
+  {
+    typedef Traits traits ;
+
+    typedef typename Traits::source_type   source_type   ;
+    typedef typename Traits::argument_type argument_type ;
+    typedef typename Traits::result_type   result_type   ;
+
+    static result_type low_level_convert ( argument_type s ) { return s ; }
+    static source_type nearbyint         ( argument_type s ) { return s ; }
+    static result_type convert           ( argument_type s ) { return s ; }
+  } ;
+
+
+  //
+  // Rounding Converter : used for float to integral conversions.
+  //
+  template<class Traits,class RangeChecker,class RawConverter,class Float2IntRounder>
+  struct rounding_converter : public std::unary_function<  BOOST_DEDUCED_TYPENAME Traits::argument_type
+                                                          ,BOOST_DEDUCED_TYPENAME Traits::result_type
+                                                        >
+                             ,public RangeChecker
+                             ,public Float2IntRounder
+                             ,public RawConverter
+  {
+    typedef RangeChecker     RangeCheckerBase ;
+    typedef Float2IntRounder Float2IntRounderBase ;
+    typedef RawConverter     RawConverterBase ;
+
+    typedef Traits traits ;
+
+    typedef typename Traits::source_type   source_type   ;
+    typedef typename Traits::argument_type argument_type ;
+    typedef typename Traits::result_type   result_type   ;
+
+    static result_type convert ( argument_type s )
+    {
+      RangeCheckerBase::validate_range(s);
+      source_type s1 = Float2IntRounderBase::nearbyint(s);
+      return RawConverterBase::low_level_convert(s1);
+    }
+  } ;
+
+
+  //
+  // Non-Rounding Converter : used for all other conversions.
+  //
+  template<class Traits,class RangeChecker,class RawConverter>
+  struct non_rounding_converter : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type
+                                                             ,BOOST_DEDUCED_TYPENAME Traits::result_type
+                                                           >
+                                 ,public RangeChecker
+                                 ,public RawConverter
+  {
+    typedef RangeChecker RangeCheckerBase ;
+    typedef RawConverter RawConverterBase ;
+
+    typedef Traits traits ;
+
+    typedef typename Traits::source_type   source_type   ;
+    typedef typename Traits::argument_type argument_type ;
+    typedef typename Traits::result_type   result_type   ;
+
+    static source_type nearbyint ( argument_type s ) { return s ; }
+
+    static result_type convert ( argument_type s )
+    {
+      RangeCheckerBase::validate_range(s);
+      return RawConverterBase::low_level_convert(s);
+    }
+  } ;
+
+
+
+
+//--------------------------------------------------------------------------
+//
+// Selectors for the optimized Converter class.
+//
+//--------------------------------------------------------------------------
+
+  template<class Traits,class OverflowHandler,class Float2IntRounder,class RawConverter, class UserRangeChecker>
+  struct get_non_trivial_converter
+  {
+    typedef GetRC<Traits,OverflowHandler,Float2IntRounder> InternalRangeCheckerQ ;
+
+    typedef is_same<UserRangeChecker,UseInternalRangeChecker> use_internal_RC ;
+
+    typedef mpl::identity<UserRangeChecker> UserRangeCheckerQ ;
+
+    typedef typename
+      mpl::eval_if<use_internal_RC,InternalRangeCheckerQ,UserRangeCheckerQ>::type
+        RangeChecker ;
+
+    typedef non_rounding_converter<Traits,RangeChecker,RawConverter>              NonRounding ;
+    typedef rounding_converter<Traits,RangeChecker,RawConverter,Float2IntRounder> Rounding ;
+
+    typedef mpl::identity<NonRounding> NonRoundingQ ;
+    typedef mpl::identity<Rounding>    RoundingQ    ;
+
+    typedef typename Traits::int_float_mixture int_float_mixture ;
+
+    typedef typename
+      for_int_float_mixture<int_float_mixture, NonRoundingQ, NonRoundingQ, RoundingQ, NonRoundingQ>::type
+        selector ;
+
+    typedef typename selector::type type ;
+  } ;
+
+  template< class Traits
+           ,class OverflowHandler
+           ,class Float2IntRounder
+           ,class RawConverter
+           ,class UserRangeChecker
+          >
+  struct get_converter_impl
+  {
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT( 0x0561 ) )
+    // bcc55 prefers sometimes template parameters to be explicit local types.
+    // (notice that is is illegal to reuse the names like this)
+    typedef Traits           Traits ;
+    typedef OverflowHandler  OverflowHandler ;
+    typedef Float2IntRounder Float2IntRounder ;
+    typedef RawConverter     RawConverter ;
+    typedef UserRangeChecker UserRangeChecker ;
+#endif
+
+    typedef trivial_converter_impl<Traits> Trivial ;
+    typedef mpl::identity        <Trivial> TrivialQ ;
+
+    typedef get_non_trivial_converter< Traits
+                                      ,OverflowHandler
+                                      ,Float2IntRounder
+                                      ,RawConverter
+                                      ,UserRangeChecker
+                                     > NonTrivialQ ;
+
+    typedef typename Traits::trivial trivial ;
+
+    typedef typename mpl::eval_if<trivial,TrivialQ,NonTrivialQ>::type type ;
+  } ;
+
+} } } // namespace boost::numeric::convdetail
+
+#endif
+
+
diff --git a/ext/boost/numeric/conversion/detail/int_float_mixture.hpp b/ext/boost/numeric/conversion/detail/int_float_mixture.hpp
new file mode 100644
index 0000000..464e527
--- /dev/null
+++ b/ext/boost/numeric/conversion/detail/int_float_mixture.hpp
@@ -0,0 +1,72 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola at hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_INT_FLOAT_MIXTURE_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_DETAIL_INT_FLOAT_MIXTURE_FLC_12NOV2002_HPP
+
+#include "boost/config.hpp"
+#include "boost/limits.hpp"
+
+#include "boost/numeric/conversion/int_float_mixture_enum.hpp"
+#include "boost/numeric/conversion/detail/meta.hpp"
+
+#include "boost/mpl/integral_c.hpp"
+
+namespace boost { namespace numeric { namespace convdetail
+{
+  // Integral Constants for 'IntFloatMixture'
+  typedef mpl::integral_c<int_float_mixture_enum, integral_to_integral> int2int_c ;
+  typedef mpl::integral_c<int_float_mixture_enum, integral_to_float>    int2float_c ;
+  typedef mpl::integral_c<int_float_mixture_enum, float_to_integral>    float2int_c ;
+  typedef mpl::integral_c<int_float_mixture_enum, float_to_float>       float2float_c ;
+
+  // Metafunction:
+  //
+  //   get_int_float_mixture<T,S>::type
+  //
+  // Selects the appropriate Int-Float Mixture Integral Constant for the combination T,S.
+  //
+  template<class T,class S>
+  struct get_int_float_mixture
+  {
+    typedef mpl::bool_< ::std::numeric_limits<S>::is_integer > S_int ;
+    typedef mpl::bool_< ::std::numeric_limits<T>::is_integer > T_int ;
+
+    typedef typename
+      for_both<S_int, T_int, int2int_c, int2float_c, float2int_c, float2float_c>::type
+        type ;
+  } ;
+
+  // Metafunction:
+  //
+  //   for_int_float_mixture<Mixture,int_int,int_float,float_int,float_float>::type
+  //
+  // {Mixture} is one of the Integral Constants for Mixture, declared above.
+  // {int_int,int_float,float_int,float_float} are aribtrary types. (not metafunctions)
+  //
+  // According to the value of 'IntFloatMixture', selects the corresponding type.
+  //
+  template<class IntFloatMixture, class Int2Int, class Int2Float, class Float2Int, class Float2Float>
+  struct for_int_float_mixture
+  {
+    typedef typename
+      ct_switch4<IntFloatMixture
+                 ,int2int_c, int2float_c, float2int_c  // default
+                 ,Int2Int  , Int2Float  , Float2Int  , Float2Float
+                >::type
+        type ;
+  } ;
+
+} } } // namespace boost::numeric::convdetail
+
+#endif
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/ext/boost/numeric/conversion/detail/is_subranged.hpp b/ext/boost/numeric/conversion/detail/is_subranged.hpp
new file mode 100644
index 0000000..b5e7fe8
--- /dev/null
+++ b/ext/boost/numeric/conversion/detail/is_subranged.hpp
@@ -0,0 +1,234 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola at hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_IS_SUBRANGED_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_DETAIL_IS_SUBRANGED_FLC_12NOV2002_HPP
+
+#include "boost/config.hpp"
+#include "boost/limits.hpp"
+
+#include "boost/mpl/int.hpp"
+#include "boost/mpl/multiplies.hpp"
+#include "boost/mpl/less.hpp"
+#include "boost/mpl/equal_to.hpp"
+
+#include "boost/type_traits/is_same.hpp"
+
+#include "boost/numeric/conversion/detail/meta.hpp"
+#include "boost/numeric/conversion/detail/int_float_mixture.hpp"
+#include "boost/numeric/conversion/detail/sign_mixture.hpp"
+#include "boost/numeric/conversion/detail/udt_builtin_mixture.hpp"
+
+namespace boost { namespace numeric { namespace convdetail
+{
+  //---------------------------------------------------------------
+  // Implementations of the compile time predicate "T is subranged"
+  //---------------------------------------------------------------
+
+    // for integral to integral conversions
+    template<class T,class S>
+    struct subranged_Sig2Unsig
+    {
+      // Signed to unsigned conversions are 'subranged' because of possible loose
+      // of negative values.
+      typedef mpl::true_ type ;
+    } ;
+
+    // for unsigned integral to signed integral conversions
+    template<class T,class S>
+    struct subranged_Unsig2Sig
+    {
+       // IMPORTANT NOTE:
+       //
+       // This code assumes that signed/unsigned integral values are represented
+       // such that:
+       //
+       //  numeric_limits<signed T>::digits + 1 == numeric_limits<unsigned T>::digits
+       //
+       // The '+1' is required since numeric_limits<>::digits gives 1 bit less for signed integral types.
+       //
+       // This fact is used by the following logic:
+       //
+       //  if ( (numeric_limits<T>::digits+1) < (2*numeric_limits<S>::digits) )
+       //    then the conversion is subranged.
+       //
+
+       typedef mpl::int_< ::std::numeric_limits<S>::digits > S_digits ;
+       typedef mpl::int_< ::std::numeric_limits<T>::digits > T_digits ;
+
+       // T is signed, so take digits+1
+       typedef typename T_digits::next u_T_digits ;
+
+       typedef mpl::int_<2> Two ;
+
+       typedef typename mpl::multiplies<S_digits,Two>::type S_digits_times_2 ;
+
+       typedef typename mpl::less<u_T_digits,S_digits_times_2>::type type ;
+    } ;
+
+    // for integral to integral conversions of the same sign.
+    template<class T,class S>
+    struct subranged_SameSign
+    {
+       // An integral conversion of the same sign is subranged if digits(T) < digits(S).
+
+       typedef mpl::int_< ::std::numeric_limits<S>::digits > S_digits ;
+       typedef mpl::int_< ::std::numeric_limits<T>::digits > T_digits ;
+
+       typedef typename mpl::less<T_digits,S_digits>::type type ;
+    } ;
+
+    // for integral to float conversions
+    template<class T,class S>
+    struct subranged_Int2Float
+    {
+      typedef mpl::false_ type ;
+    } ;
+
+    // for float to integral conversions
+    template<class T,class S>
+    struct subranged_Float2Int
+    {
+      typedef mpl::true_ type ;
+    } ;
+
+    // for float to float conversions
+    template<class T,class S>
+    struct subranged_Float2Float
+    {
+      // If both T and S are floats,
+      // compare exponent bits and if they match, mantisa bits.
+
+      typedef mpl::int_< ::std::numeric_limits<S>::digits > S_mantisa ;
+      typedef mpl::int_< ::std::numeric_limits<T>::digits > T_mantisa ;
+
+      typedef mpl::int_< ::std::numeric_limits<S>::max_exponent > S_exponent ;
+      typedef mpl::int_< ::std::numeric_limits<T>::max_exponent > T_exponent ;
+
+      typedef typename mpl::less<T_exponent,S_exponent>::type T_smaller_exponent ;
+
+      typedef typename mpl::equal_to<T_exponent,S_exponent>::type equal_exponents ;
+
+      typedef mpl::less<T_mantisa,S_mantisa> T_smaller_mantisa ;
+
+      typedef mpl::eval_if<equal_exponents,T_smaller_mantisa,mpl::false_> not_bigger_exponent_case ;
+
+      typedef typename
+        mpl::eval_if<T_smaller_exponent,mpl::true_,not_bigger_exponent_case>::type
+          type ;
+    } ;
+
+    // for Udt to built-in conversions
+    template<class T,class S>
+    struct subranged_Udt2BuiltIn
+    {
+      typedef mpl::true_ type ;
+    } ;
+
+    // for built-in to Udt conversions
+    template<class T,class S>
+    struct subranged_BuiltIn2Udt
+    {
+      typedef mpl::false_ type ;
+    } ;
+
+    // for Udt to Udt conversions
+    template<class T,class S>
+    struct subranged_Udt2Udt
+    {
+      typedef mpl::false_ type ;
+    } ;
+
+  //-------------------------------------------------------------------
+  // Selectors for the implementations of the subranged predicate
+  //-------------------------------------------------------------------
+
+    template<class T,class S>
+    struct get_subranged_Int2Int
+    {
+      typedef subranged_SameSign<T,S>  Sig2Sig     ;
+      typedef subranged_Sig2Unsig<T,S> Sig2Unsig   ;
+      typedef subranged_Unsig2Sig<T,S> Unsig2Sig   ;
+      typedef Sig2Sig                  Unsig2Unsig ;
+
+      typedef typename get_sign_mixture<T,S>::type sign_mixture ;
+
+      typedef typename
+        for_sign_mixture<sign_mixture, Sig2Sig, Sig2Unsig, Unsig2Sig, Unsig2Unsig>::type
+           type ;
+    } ;
+
+    template<class T,class S>
+    struct get_subranged_BuiltIn2BuiltIn
+    {
+      typedef get_subranged_Int2Int<T,S> Int2IntQ ;
+
+      typedef subranged_Int2Float  <T,S> Int2Float   ;
+      typedef subranged_Float2Int  <T,S> Float2Int   ;
+      typedef subranged_Float2Float<T,S> Float2Float ;
+
+      typedef mpl::identity<Int2Float  > Int2FloatQ   ;
+      typedef mpl::identity<Float2Int  > Float2IntQ   ;
+      typedef mpl::identity<Float2Float> Float2FloatQ ;
+
+      typedef typename get_int_float_mixture<T,S>::type int_float_mixture ;
+
+      typedef for_int_float_mixture<int_float_mixture, Int2IntQ, Int2FloatQ, Float2IntQ, Float2FloatQ> for_ ;
+
+      typedef typename for_::type selected ;
+
+      typedef typename selected::type type ;
+    } ;
+
+    template<class T,class S>
+    struct get_subranged
+    {
+      typedef get_subranged_BuiltIn2BuiltIn<T,S> BuiltIn2BuiltInQ ;
+
+      typedef subranged_BuiltIn2Udt<T,S> BuiltIn2Udt ;
+      typedef subranged_Udt2BuiltIn<T,S> Udt2BuiltIn ;
+      typedef subranged_Udt2Udt<T,S>     Udt2Udt ;
+
+      typedef mpl::identity<BuiltIn2Udt> BuiltIn2UdtQ ;
+      typedef mpl::identity<Udt2BuiltIn> Udt2BuiltInQ ;
+      typedef mpl::identity<Udt2Udt    > Udt2UdtQ     ;
+
+      typedef typename get_udt_builtin_mixture<T,S>::type udt_builtin_mixture ;
+      
+      typedef typename
+        for_udt_builtin_mixture<udt_builtin_mixture, BuiltIn2BuiltInQ, BuiltIn2UdtQ, Udt2BuiltInQ, Udt2UdtQ>::type
+          selected ;
+
+      typedef typename selected::type selected2 ;
+ 
+      typedef typename selected2::type type ;
+    } ;
+
+
+  //-------------------------------------------------------------------
+  // Top level implementation selector.
+  //-------------------------------------------------------------------
+  template<class T, class S>
+  struct get_is_subranged
+  {
+    typedef get_subranged<T,S>         non_trivial_case ;
+    typedef mpl::identity<mpl::false_> trivial_case ;
+
+    typedef is_same<T,S> is_trivial ;
+   
+    typedef typename mpl::if_<is_trivial,trivial_case,non_trivial_case>::type selected ;
+    
+    typedef typename selected::type type ;
+  } ;
+
+} } } // namespace boost::numeric::convdetail
+
+#endif
+
+
diff --git a/ext/boost/numeric/conversion/detail/meta.hpp b/ext/boost/numeric/conversion/detail/meta.hpp
new file mode 100644
index 0000000..246a1b4
--- /dev/null
+++ b/ext/boost/numeric/conversion/detail/meta.hpp
@@ -0,0 +1,120 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola at hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_META_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_DETAIL_META_FLC_12NOV2002_HPP
+
+#include "boost/type_traits/remove_cv.hpp"
+
+#include "boost/mpl/if.hpp"
+#include "boost/mpl/eval_if.hpp"
+#include "boost/mpl/equal_to.hpp"
+#include "boost/mpl/not.hpp"
+#include "boost/mpl/and.hpp"
+#include "boost/mpl/bool.hpp"
+#include "boost/mpl/identity.hpp"
+
+namespace boost { namespace numeric { namespace convdetail
+{
+   template< class T1, class T2>
+   struct equal_to
+   {
+   #if !defined(__BORLANDC__)
+   
+       enum { x = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value == BOOST_MPL_AUX_VALUE_WKND(T2)::value ) };
+           
+       BOOST_STATIC_CONSTANT(bool, value = x);
+           
+       typedef mpl::bool_<value> type;
+       
+   #else
+   
+       BOOST_STATIC_CONSTANT(bool, value = (
+             BOOST_MPL_AUX_VALUE_WKND(T1)::value 
+               == BOOST_MPL_AUX_VALUE_WKND(T2)::value
+           ));
+           
+       typedef mpl::bool_<(
+             BOOST_MPL_AUX_VALUE_WKND(T1)::value 
+               == BOOST_MPL_AUX_VALUE_WKND(T2)::value
+           )> type;
+   #endif
+   };
+    
+// Metafunction:
+  //
+  //   ct_switch4<Value,Case0Val,Case1Val,Case2Val,Case0Type,Case1Type,Case2Type,DefaultType>::type
+  //
+  // {Value,Case(X)Val} are Integral Constants (such as: mpl::int_<>)
+  // {Case(X)Type,DefaultType} are arbitrary types. (not metafunctions)
+  //
+  // Returns Case(X)Type if Val==Case(X)Val; DefaultType otherwise.
+  //
+  template<class Value,
+           class Case0Val,
+           class Case1Val,
+           class Case2Val,
+           class Case0Type,
+           class Case1Type,
+           class Case2Type,
+           class DefaultType
+          >
+  struct ct_switch4
+  {
+    typedef mpl::identity<Case0Type> Case0TypeQ ;
+    typedef mpl::identity<Case1Type> Case1TypeQ ;
+
+    typedef equal_to<Value,Case0Val> is_case0 ;
+    typedef equal_to<Value,Case1Val> is_case1 ;
+    typedef equal_to<Value,Case2Val> is_case2 ;
+
+    typedef mpl::if_<is_case2,Case2Type,DefaultType> choose_2_3Q ;
+    typedef mpl::eval_if<is_case1,Case1TypeQ,choose_2_3Q> choose_1_2_3Q ;
+
+    typedef typename
+      mpl::eval_if<is_case0,Case0TypeQ,choose_1_2_3Q>::type
+        type ;
+  } ;
+
+
+
+
+  // Metafunction:
+  //
+  //   for_both<expr0,expr1,TT,TF,FT,FF>::type
+  //
+  // {exp0,expr1} are Boolean Integral Constants
+  // {TT,TF,FT,FF} are aribtrary types. (not metafunctions)
+  //
+  // According to the combined boolean value of 'expr0 && expr1', selects the corresponding type.
+  //
+  template<class expr0, class expr1, class TT, class TF, class FT, class FF>
+  struct for_both
+  {
+    typedef mpl::identity<TF> TF_Q ;
+    typedef mpl::identity<TT> TT_Q ;
+
+    typedef typename mpl::not_<expr0>::type not_expr0 ;
+    typedef typename mpl::not_<expr1>::type not_expr1 ;
+
+    typedef typename mpl::and_<expr0,expr1>::type     caseTT ;
+    typedef typename mpl::and_<expr0,not_expr1>::type caseTF ;
+    typedef typename mpl::and_<not_expr0,expr1>::type caseFT ;
+
+    typedef mpl::if_<caseFT,FT,FF>                    choose_FT_FF_Q ;
+    typedef mpl::eval_if<caseTF,TF_Q,choose_FT_FF_Q> choose_TF_FT_FF_Q ;
+
+    typedef typename mpl::eval_if<caseTT,TT_Q,choose_TF_FT_FF_Q>::type type ;
+  } ;
+
+} } } // namespace boost::numeric::convdetail
+
+#endif
+
+
diff --git a/ext/boost/numeric/conversion/detail/numeric_cast_traits.hpp b/ext/boost/numeric/conversion/detail/numeric_cast_traits.hpp
new file mode 100644
index 0000000..150490d
--- /dev/null
+++ b/ext/boost/numeric/conversion/detail/numeric_cast_traits.hpp
@@ -0,0 +1,138 @@
+//
+//! Copyright (c) 2011-2012
+//! Brandon Kohn
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#if !defined(BOOST_NUMERIC_CONVERSION_DONT_USE_PREPROCESSED_FILES)
+
+    #include <boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp>
+	
+	#if !defined(BOOST_NO_LONG_LONG)
+        #include <boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp>
+	#endif
+	
+#else
+#if !BOOST_PP_IS_ITERATING
+
+    #include <boost/preprocessor/seq/elem.hpp>
+    #include <boost/preprocessor/seq/size.hpp>
+    #include <boost/preprocessor/iteration/iterate.hpp>
+    
+    #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+        #pragma wave option(preserve: 2, line: 0, output: "preprocessed/numeric_cast_traits_common.hpp")
+    #endif
+//
+//! Copyright (c) 2011-2012
+//! Brandon Kohn
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+    #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+        #pragma wave option(preserve: 1)
+    #endif
+	
+	//! These are the assumed common built in fundamental types (not typedefs/macros.)
+	#define BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES() \
+        (char)                                            \
+        (signed char)                                     \
+        (unsigned char)                                   \
+        (short)                                           \
+        (unsigned short)                                  \
+        (int)                                             \
+        (unsigned int)                                    \
+        (long)                                            \
+        (unsigned long)                                   \
+        (float)                                           \
+        (double)                                          \
+        (long double)                                     \
+    /***/
+	
+    #define BOOST_NUMERIC_CONVERSION_SEQ_A() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES()
+	#define BOOST_NUMERIC_CONVERSION_SEQ_B() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES()
+
+namespace boost { namespace numeric {
+
+    #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_SEQ_A())), <boost/numeric/conversion/detail/numeric_cast_traits.hpp>))
+    #include BOOST_PP_ITERATE()    
+
+}}//namespace boost::numeric;
+
+    #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+        #pragma wave option(output: null)
+    #endif   
+	
+	#if ( defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) ) || !defined(BOOST_NO_LONG_LONG)
+	
+	    #undef BOOST_NUMERIC_CONVERSION_SEQ_A
+	    #undef BOOST_NUMERIC_CONVERSION_SEQ_B
+
+	    #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+            #pragma wave option(preserve: 2, line: 0, output: "preprocessed/numeric_cast_traits_long_long.hpp")
+        #endif
+
+//
+//! Copyright (c) 2011-2012
+//! Brandon Kohn
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+        #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+            #pragma wave option(preserve: 1)
+        #endif
+
+namespace boost { namespace numeric {
+
+    #define BOOST_NUMERIC_CONVERSION_SEQ_A() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES()(boost::long_long_type)(boost::ulong_long_type)
+	#define BOOST_NUMERIC_CONVERSION_SEQ_B() (boost::long_long_type)(boost::ulong_long_type)
+    
+    #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_SEQ_A())), <boost/numeric/conversion/detail/numeric_cast_traits.hpp>))
+    #include BOOST_PP_ITERATE()    
+
+}}//namespace boost::numeric;
+
+        #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+            #pragma wave option(output: null)
+        #endif   
+	
+	#endif
+		
+    #undef BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES
+	#undef BOOST_NUMERIC_CONVERSION_SEQ_A
+	#undef BOOST_NUMERIC_CONVERSION_SEQ_B
+    
+#elif BOOST_PP_ITERATION_DEPTH() == 1
+
+    #define BOOST_PP_ITERATION_PARAMS_2 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_SEQ_B())), <boost/numeric/conversion/detail/numeric_cast_traits.hpp>))
+    #include BOOST_PP_ITERATE()
+
+#elif BOOST_PP_ITERATION_DEPTH() == 2
+
+    //! Generate default traits for the specified source and target.
+    #define BOOST_NUMERIC_CONVERSION_A BOOST_PP_FRAME_ITERATION(1)
+    #define BOOST_NUMERIC_CONVERSION_B BOOST_PP_FRAME_ITERATION(2)
+
+    template <>
+    struct numeric_cast_traits
+        <
+            BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_A, BOOST_NUMERIC_CONVERSION_SEQ_A())
+          , BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_B, BOOST_NUMERIC_CONVERSION_SEQ_B())
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_B, BOOST_NUMERIC_CONVERSION_SEQ_B())> rounding_policy;
+    };     
+
+    #undef BOOST_NUMERIC_CONVERSION_A
+    #undef BOOST_NUMERIC_CONVERSION_B
+
+#endif//! Depth 2.
+#endif// BOOST_NUMERIC_CONVERSION_DONT_USE_PREPROCESSED_FILES
diff --git a/ext/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp b/ext/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp
new file mode 100644
index 0000000..01dc932
--- /dev/null
+++ b/ext/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp
@@ -0,0 +1,1741 @@
+//
+//! Copyright (c) 2011-2012
+//! Brandon Kohn
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+	
+	
+	
+namespace boost { namespace numeric {
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+}}
diff --git a/ext/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp b/ext/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp
new file mode 100644
index 0000000..b358b9c
--- /dev/null
+++ b/ext/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp
@@ -0,0 +1,347 @@
+//
+//! Copyright (c) 2011-2012
+//! Brandon Kohn
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+namespace boost { namespace numeric {
+    
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , boost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , boost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , boost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , boost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , boost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , boost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , boost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , boost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , boost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , boost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , boost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , boost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , boost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , boost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , boost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , boost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , boost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , boost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , boost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , boost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , boost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , boost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , boost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , boost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            boost::long_long_type
+          , boost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            boost::long_long_type
+          , boost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            boost::ulong_long_type
+          , boost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            boost::ulong_long_type
+          , boost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<boost::ulong_long_type> rounding_policy;
+    }; 
+}}
diff --git a/ext/boost/numeric/conversion/detail/sign_mixture.hpp b/ext/boost/numeric/conversion/detail/sign_mixture.hpp
new file mode 100644
index 0000000..c7f9e42
--- /dev/null
+++ b/ext/boost/numeric/conversion/detail/sign_mixture.hpp
@@ -0,0 +1,72 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola at hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_SIGN_MIXTURE_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_DETAIL_SIGN_MIXTURE_FLC_12NOV2002_HPP
+
+#include "boost/config.hpp"
+#include "boost/limits.hpp"
+
+#include "boost/numeric/conversion/sign_mixture_enum.hpp"
+#include "boost/numeric/conversion/detail/meta.hpp"
+
+#include "boost/mpl/integral_c.hpp"
+
+namespace boost { namespace numeric { namespace convdetail
+{
+  // Integral Constants for 'SignMixture'
+  typedef mpl::integral_c<sign_mixture_enum, unsigned_to_unsigned> unsig2unsig_c ;
+  typedef mpl::integral_c<sign_mixture_enum, signed_to_signed>     sig2sig_c ;
+  typedef mpl::integral_c<sign_mixture_enum, signed_to_unsigned>   sig2unsig_c ;
+  typedef mpl::integral_c<sign_mixture_enum, unsigned_to_signed>   unsig2sig_c ;
+
+  // Metafunction:
+  //
+  //   get_sign_mixture<T,S>::type
+  //
+  // Selects the appropriate SignMixture Integral Constant for the combination T,S.
+  //
+  template<class T,class S>
+  struct get_sign_mixture
+  {
+    typedef mpl::bool_< ::std::numeric_limits<S>::is_signed > S_signed ;
+    typedef mpl::bool_< ::std::numeric_limits<T>::is_signed > T_signed ;
+
+    typedef typename
+      for_both<S_signed, T_signed, sig2sig_c, sig2unsig_c, unsig2sig_c, unsig2unsig_c>::type
+        type ;
+  } ;
+
+  // Metafunction:
+  //
+  //   for_sign_mixture<SignMixture,Sig2Sig,Sig2Unsig,Unsig2Sig,Unsig2Unsig>::type
+  //
+  // {SignMixture} is one of the Integral Constants for SignMixture, declared above.
+  // {Sig2Sig,Sig2Unsig,Unsig2Sig,Unsig2Unsig} are aribtrary types. (not metafunctions)
+  //
+  // According to the value of 'SignMixture', selects the corresponding type.
+  //
+  template<class SignMixture, class Sig2Sig, class Sig2Unsig, class Unsig2Sig, class Unsig2Unsig>
+  struct for_sign_mixture
+  {
+    typedef typename
+      ct_switch4<SignMixture
+                 , sig2sig_c, sig2unsig_c, unsig2sig_c  // default
+                 , Sig2Sig  , Sig2Unsig  , Unsig2Sig  , Unsig2Unsig
+                >::type
+        type ;
+  } ;
+
+} } } // namespace boost::numeric::convdetail
+
+#endif
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/ext/boost/numeric/conversion/detail/udt_builtin_mixture.hpp b/ext/boost/numeric/conversion/detail/udt_builtin_mixture.hpp
new file mode 100644
index 0000000..36dbc49
--- /dev/null
+++ b/ext/boost/numeric/conversion/detail/udt_builtin_mixture.hpp
@@ -0,0 +1,69 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola at hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_UDT_BUILTIN_MIXTURE_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_DETAIL_UDT_BUILTIN_MIXTURE_FLC_12NOV2002_HPP
+
+#include "boost/type_traits/is_arithmetic.hpp"
+
+#include "boost/numeric/conversion/udt_builtin_mixture_enum.hpp"
+#include "boost/numeric/conversion/detail/meta.hpp"
+
+#include "boost/mpl/integral_c.hpp"
+
+namespace boost { namespace numeric { namespace convdetail
+{
+  // Integral Constants for 'UdtMixture'
+  typedef mpl::integral_c<udt_builtin_mixture_enum, builtin_to_builtin> builtin2builtin_c ;
+  typedef mpl::integral_c<udt_builtin_mixture_enum, builtin_to_udt>     builtin2udt_c ;
+  typedef mpl::integral_c<udt_builtin_mixture_enum, udt_to_builtin>     udt2builtin_c ;
+  typedef mpl::integral_c<udt_builtin_mixture_enum, udt_to_udt>         udt2udt_c ;
+
+  // Metafunction:
+  //
+  //   for_udt_mixture<UdtMixture,BuiltIn2BuiltIn,BuiltIn2Udt,Udt2BuiltIn,Udt2Udt>::type
+  //
+  // {UdtMixture} is one of the Integral Constants for UdMixture, declared above.
+  // {BuiltIn2BuiltIn,BuiltIn2Udt,Udt2BuiltIn,Udt2Udt} are aribtrary types. (not metafunctions)
+  //
+  // According to the value of 'UdtMixture', selects the corresponding type.
+  //
+  template<class UdtMixture, class BuiltIn2BuiltIn, class BuiltIn2Udt, class Udt2BuiltIn, class Udt2Udt>
+  struct for_udt_builtin_mixture
+  {
+    typedef typename
+      ct_switch4<UdtMixture
+                 , builtin2builtin_c, builtin2udt_c, udt2builtin_c // default
+                 , BuiltIn2BuiltIn  , BuiltIn2Udt  , Udt2BuiltIn  , Udt2Udt
+                >::type
+        type ;
+  } ;
+
+  // Metafunction:
+  //
+  //   get_udt_mixture<T,S>::type
+  //
+  // Selects the appropriate UdtMixture Integral Constant for the combination T,S.
+  //
+  template<class T,class S>
+  struct get_udt_builtin_mixture
+  {
+    typedef is_arithmetic<S> S_builtin ;
+    typedef is_arithmetic<T> T_builtin ;
+
+    typedef typename
+      for_both<S_builtin, T_builtin, builtin2builtin_c, builtin2udt_c, udt2builtin_c, udt2udt_c>::type
+        type ;
+  } ;
+
+} } } // namespace boost::numeric::convdetail
+
+#endif
+
+
diff --git a/ext/boost/numeric/conversion/int_float_mixture_enum.hpp b/ext/boost/numeric/conversion/int_float_mixture_enum.hpp
new file mode 100644
index 0000000..d0c2daa
--- /dev/null
+++ b/ext/boost/numeric/conversion/int_float_mixture_enum.hpp
@@ -0,0 +1,29 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola at hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_INT_FLOAT_MIXTURE_ENUM_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_INT_FLOAT_MIXTURE_ENUM_FLC_12NOV2002_HPP
+
+namespace boost { namespace numeric
+{
+  enum int_float_mixture_enum
+  {
+     integral_to_integral
+    ,integral_to_float
+    ,float_to_integral
+    ,float_to_float
+  } ;
+
+} } // namespace boost::numeric
+
+#endif
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/ext/boost/numeric/conversion/numeric_cast_traits.hpp b/ext/boost/numeric/conversion/numeric_cast_traits.hpp
new file mode 100644
index 0000000..e24296b
--- /dev/null
+++ b/ext/boost/numeric/conversion/numeric_cast_traits.hpp
@@ -0,0 +1,31 @@
+//
+//! Copyright (c) 2011
+//! Brandon Kohn
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef BOOST_NUMERIC_CAST_TRAITS_HPP
+#define BOOST_NUMERIC_CAST_TRAITS_HPP
+
+#include <boost/numeric/conversion/converter_policies.hpp>
+
+namespace boost { namespace numeric {
+
+    template <typename Target, typename Source, typename EnableIf = void>
+    struct numeric_cast_traits
+    {
+        typedef def_overflow_handler    overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<Source>           rounding_policy;
+    };
+
+}}//namespace boost::numeric;
+
+#if !defined( BOOST_NUMERIC_CONVERSION_RELAX_BUILT_IN_CAST_TRAITS )
+#include <boost/cstdint.hpp>
+#include <boost/numeric/conversion/detail/numeric_cast_traits.hpp>
+#endif//!defined BOOST_NUMERIC_CONVERSION_RELAX_BUILT_IN_CAST_TRAITS
+
+#endif//BOOST_NUMERIC_CAST_TRAITS_HPP
diff --git a/ext/boost/numeric/conversion/sign_mixture_enum.hpp b/ext/boost/numeric/conversion/sign_mixture_enum.hpp
new file mode 100644
index 0000000..1525f8d
--- /dev/null
+++ b/ext/boost/numeric/conversion/sign_mixture_enum.hpp
@@ -0,0 +1,29 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola at hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_SIGN_MIXTURE_ENUM_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_SIGN_MIXTURE_ENUM_FLC_12NOV2002_HPP
+
+namespace boost { namespace numeric
+{
+  enum sign_mixture_enum
+  {
+     unsigned_to_unsigned
+    ,signed_to_signed
+    ,signed_to_unsigned
+    ,unsigned_to_signed
+  } ;
+
+} } // namespace boost::numeric
+
+#endif
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/ext/boost/numeric/conversion/udt_builtin_mixture_enum.hpp b/ext/boost/numeric/conversion/udt_builtin_mixture_enum.hpp
new file mode 100644
index 0000000..2540e80
--- /dev/null
+++ b/ext/boost/numeric/conversion/udt_builtin_mixture_enum.hpp
@@ -0,0 +1,26 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola at hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_UDT_BUILTIN_MIXTURE_ENUM_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_UDT_BUILTIN_MIXTURE_ENUM_FLC_12NOV2002_HPP
+
+namespace boost { namespace numeric
+{
+  enum udt_builtin_mixture_enum
+  {
+     builtin_to_builtin
+    ,builtin_to_udt
+    ,udt_to_builtin
+    ,udt_to_udt
+  } ;
+
+} } // namespace boost::numeric
+
+#endif
+
diff --git a/ext/boost/operators.hpp b/ext/boost/operators.hpp
index 4b47ba4..b524cee 100644
--- a/ext/boost/operators.hpp
+++ b/ext/boost/operators.hpp
@@ -8,6 +8,8 @@
 //  See http://www.boost.org/libs/utility/operators.htm for documentation.
 
 //  Revision History
+//  16 Dec 10 Limit warning suppression for 4284 to older versions of VC++
+//            (Matthew Bradbury, fixes #4432)
 //  07 Aug 08 Added "euclidean" spelling. (Daniel Frey)
 //  03 Apr 08 Make sure "convertible to bool" is sufficient
 //            for T::operator<, etc. (Daniel Frey)
@@ -88,7 +90,7 @@
 #   pragma set woff 1234
 #endif
 
-#if defined(BOOST_MSVC)
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1600)
 #   pragma warning( disable : 4284 ) // complaint about return type of 
 #endif                               // operator-> not begin a UDT
 
diff --git a/ext/boost/optional/optional.hpp b/ext/boost/optional/optional.hpp
index 88041d1..0d6dba4 100644
--- a/ext/boost/optional/optional.hpp
+++ b/ext/boost/optional/optional.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
+// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
 //
 // Use, modification, and distribution is subject to the Boost Software
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -9,27 +9,34 @@
 // You are welcome to contact the author at:
 //  fernando_cacciola at hotmail.com
 //
+// Revisions:
+// 27 Apr 2008 (improved swap) Fernando Cacciola, Niels Dekker, Thorsten Ottosen
+//
 #ifndef BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP
 #define BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP
 
-#include<new>
-#include<algorithm>
-
-#include "boost/config.hpp"
-#include "boost/assert.hpp"
-#include "boost/type.hpp"
-#include "boost/type_traits/alignment_of.hpp"
-#include "boost/type_traits/type_with_alignment.hpp"
-#include "boost/type_traits/remove_reference.hpp"
-#include "boost/type_traits/is_reference.hpp"
-#include "boost/mpl/if.hpp"
-#include "boost/mpl/bool.hpp"
-#include "boost/mpl/not.hpp"
-#include "boost/detail/reference_content.hpp"
-#include "boost/none.hpp"
-#include "boost/utility/compare_pointees.hpp"
-
-#include "boost/optional/optional_fwd.hpp"
+#include <new>
+#include <algorithm>
+
+#include <boost/config.hpp>
+#include <boost/assert.hpp>
+#include <boost/type.hpp>
+#include <boost/type_traits/alignment_of.hpp>
+#include <boost/type_traits/has_nothrow_constructor.hpp>
+#include <boost/type_traits/type_with_alignment.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/detail/reference_content.hpp>
+#include <boost/none.hpp>
+#include <boost/utility/swap.hpp>
+#include <boost/utility/addressof.hpp>
+#include <boost/utility/compare_pointees.hpp>
+#include <boost/utility/in_place_factory.hpp>
+
+#include <boost/optional/optional_fwd.hpp>
 
 #if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
 // VC6.0 has the following bug:
@@ -76,6 +83,15 @@
 #define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
 #endif
 
+#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) > 302 \
+    && !defined(__INTEL_COMPILER)
+// GCC since 3.3 has may_alias attribute that helps to alleviate optimizer issues with
+// regard to violation of the strict aliasing rules. The optional< T > storage type is marked
+// with this attribute in order to let the compiler know that it will alias objects of type T
+// and silence compilation warnings.
+#define BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS
+#endif
+
 // Daniel Wallin discovered that bind/apply.hpp badly interacts with the apply<>
 // member template of a factory as used in the optional<> implementation.
 // He proposed this simple fix which is to move the call to apply<> outside
@@ -83,7 +99,7 @@
 namespace boost_optional_detail
 {
   template <class T, class Factory>
-  void construct(Factory const& factory, void* address)
+  inline void construct(Factory const& factory, void* address)
   {
     factory.BOOST_NESTED_TEMPLATE apply<T>(address);
   }
@@ -95,6 +111,9 @@ namespace boost {
 class in_place_factory_base ;
 class typed_in_place_factory_base ;
 
+// This forward is needed to refer to namespace scope swap from the member swap
+template<class T> void swap ( optional<T>& x, optional<T>& y );
+
 namespace optional_detail {
 
 // This local class is used instead of that in "aligned_storage.hpp"
@@ -105,7 +124,12 @@ template <class T>
 class aligned_storage
 {
     // Borland ICEs if unnamed unions are used for this!
-    union dummy_u
+    union
+    // This works around GCC warnings about breaking strict aliasing rules when casting storage address to T*
+#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
+    __attribute__((may_alias))
+#endif
+    dummy_u
     {
         char data[ sizeof(T) ];
         BOOST_DEDUCED_TYPENAME type_with_alignment<
@@ -114,8 +138,13 @@ class aligned_storage
 
   public:
 
-    void const* address() const { return &dummy_.data[0]; }
-    void      * address()       { return &dummy_.data[0]; }
+#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
+    void const* address() const { return &dummy_; }
+    void      * address()       { return &dummy_; }
+#else
+    void const* address() const { return dummy_.data; }
+    void      * address()       { return dummy_.data; }
+#endif
 } ;
 
 template<class T>
@@ -149,7 +178,7 @@ class optional_base : public optional_tag
     typedef
 #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
     BOOST_DEDUCED_TYPENAME
-#endif 
+#endif
     ::boost::detail::make_reference_content<T>::type internal_type ;
 
     typedef aligned_storage<internal_type> storage_type ;
@@ -200,7 +229,7 @@ class optional_base : public optional_tag
     {
       construct(val);
     }
-    
+
     // Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialzed optional<T>.
     // Can throw if T::T(T const&) does
     optional_base ( bool cond, argument_type val )
@@ -421,8 +450,22 @@ class optional_base : public optional_tag
   private :
 
     // internal_type can be either T or reference_content<T>
+#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
+    // This workaround is supposed to silence GCC warnings about broken strict aliasing rules
+    internal_type const* get_object() const
+    {
+        union { void const* ap_pvoid; internal_type const* as_ptype; } caster = { m_storage.address() };
+        return caster.as_ptype;
+    }
+    internal_type *      get_object()
+    {
+        union { void* ap_pvoid; internal_type* as_ptype; } caster = { m_storage.address() };
+        return caster.as_ptype;
+    }
+#else
     internal_type const* get_object() const { return static_cast<internal_type const*>(m_storage.address()); }
     internal_type *      get_object()       { return static_cast<internal_type *>     (m_storage.address()); }
+#endif
 
     // reference_content<T> lacks an implicit conversion to T&, so the following is needed to obtain a proper reference.
     reference_const_type dereference( internal_type const* p, is_not_reference_tag ) const { return *p ; }
@@ -513,12 +556,12 @@ class optional : public optional_detail::optional_base<T>
     // Depending on the above some T ctor is called.
     // Can throw is the resolved T ctor throws.
     template<class Expr>
-    explicit optional ( Expr const& expr ) : base(expr,&expr) {}
+    explicit optional ( Expr const& expr ) : base(expr,boost::addressof(expr)) {}
 #endif
 
     // Creates a deep copy of another optional<T>
     // Can throw if T::T(T const&) does
-    optional ( optional const& rhs ) : base(rhs) {}
+    optional ( optional const& rhs ) : base( static_cast<base const&>(rhs) ) {}
 
    // No-throw (assuming T::~T() doesn't)
     ~optional() {}
@@ -527,9 +570,9 @@ class optional : public optional_detail::optional_base<T>
     // Assigns from an expression. See corresponding constructor.
     // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED
     template<class Expr>
-    optional& operator= ( Expr expr )
+    optional& operator= ( Expr const& expr )
       {
-        this->assign_expr(expr,&expr);
+        this->assign_expr(expr,boost::addressof(expr));
         return *this ;
       }
 #endif
@@ -552,7 +595,7 @@ class optional : public optional_detail::optional_base<T>
     //  (NOTE: On BCB, this operator is not actually called and left is left UNMODIFIED in case of a throw)
     optional& operator= ( optional const& rhs )
       {
-        this->assign( rhs ) ;
+        this->assign( static_cast<base const&>(rhs) ) ;
         return *this ;
       }
 
@@ -573,6 +616,14 @@ class optional : public optional_detail::optional_base<T>
         return *this ;
       }
 
+    void swap( optional & arg )
+      {
+        // allow for Koenig lookup
+        using boost::swap;
+        swap(*this, arg);
+      }
+
+
     // Returns a reference to the value if this is initialized, otherwise,
     // the behaviour is UNDEFINED
     // No-throw
@@ -582,7 +633,7 @@ class optional : public optional_detail::optional_base<T>
     // Returns a copy of the value if this is initialized, 'v' otherwise
     reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; }
     reference_type       get_value_or ( reference_type       v )       { return this->is_initialized() ? get() : v ; }
-    
+
     // Returns a pointer to the value if this is initialized, otherwise,
     // the behaviour is UNDEFINED
     // No-throw
@@ -599,22 +650,22 @@ class optional : public optional_detail::optional_base<T>
     // No-throw
     operator unspecified_bool_type() const { return this->safe_bool() ; }
 
-       // This is provided for those compilers which don't like the conversion to bool
-       // on some contexts.
-       bool operator!() const { return !this->is_initialized() ; }
+    // This is provided for those compilers which don't like the conversion to bool
+    // on some contexts.
+    bool operator!() const { return !this->is_initialized() ; }
 } ;
 
 // Returns optional<T>(v)
-template<class T> 
-inline 
+template<class T>
+inline
 optional<T> make_optional ( T const& v  )
 {
   return optional<T>(v);
 }
 
 // Returns optional<T>(cond,v)
-template<class T> 
-inline 
+template<class T>
+inline
 optional<T> make_optional ( bool cond, T const& v )
 {
   return optional<T>(cond,v);
@@ -839,12 +890,12 @@ bool operator >= ( optional<T> const& x, none_t y )
 
 template<class T>
 inline
-bool operator == ( none_t x, optional<T> const& y )
+bool operator == ( none_t , optional<T> const& y )
 { return equal_pointees(optional<T>() ,y); }
 
 template<class T>
 inline
-bool operator < ( none_t x, optional<T> const& y )
+bool operator < ( none_t , optional<T> const& y )
 { return less_pointees(optional<T>() ,y); }
 
 template<class T>
@@ -867,58 +918,74 @@ inline
 bool operator >= ( none_t x, optional<T> const& y )
 { return !( x < y ) ; }
 
-//
-// The following swap implementation follows the GCC workaround as found in
-//  "boost/detail/compressed_pair.hpp"
-//
 namespace optional_detail {
 
-// GCC < 3.2 gets the using declaration at namespace scope (FLC, DWA)
-#if BOOST_WORKAROUND(__GNUC__, < 3)                             \
-    || BOOST_WORKAROUND(__GNUC__, == 3) && __GNUC_MINOR__ <= 2
-   using std::swap;
-#define BOOST_OPTIONAL_STD_SWAP_INTRODUCED_AT_NS_SCOPE
-#endif
+template<bool use_default_constructor> struct swap_selector;
 
-// optional's swap:
-// If both are initialized, calls swap(T&, T&). If this swap throws, both will remain initialized but their values are now unspecified.
-// If only one is initialized, calls U.reset(*I), THEN I.reset().
-// If U.reset(*I) throws, both are left UNCHANGED (U is kept uinitialized and I is never reset)
-// If both are uninitialized, do nothing (no-throw)
-template<class T>
-inline
-void optional_swap ( optional<T>& x, optional<T>& y )
+template<>
+struct swap_selector<true>
 {
-  if ( !x && !!y )
-  {
-    x.reset(*y);
-    y.reset();
-  }
-  else if ( !!x && !y )
-  {
-    y.reset(*x);
-    x.reset();
-  }
-  else if ( !!x && !!y )
-  {
-// GCC > 3.2 and all other compilers have the using declaration at function scope (FLC)
-#ifndef BOOST_OPTIONAL_STD_SWAP_INTRODUCED_AT_NS_SCOPE
-    // allow for Koenig lookup
-    using std::swap ;
-#endif
-    swap(*x,*y);
-  }
-}
+    template<class T>
+    static void optional_swap ( optional<T>& x, optional<T>& y )
+    {
+        const bool hasX = !!x;
+        const bool hasY = !!y;
+
+        if ( !hasX && !hasY )
+            return;
+
+        if( !hasX )
+            x = boost::in_place();
+        else if ( !hasY )
+            y = boost::in_place();
+
+        // Boost.Utility.Swap will take care of ADL and workarounds for broken compilers
+        boost::swap(x.get(),y.get());
+
+        if( !hasX )
+            y = boost::none ;
+        else if( !hasY )
+            x = boost::none ;
+    }
+};
+
+template<>
+struct swap_selector<false>
+{
+    template<class T>
+    static void optional_swap ( optional<T>& x, optional<T>& y )
+    {
+        const bool hasX = !!x;
+        const bool hasY = !!y;
+
+        if ( !hasX && hasY )
+        {
+            x = y.get();
+            y = boost::none ;
+        }
+        else if ( hasX && !hasY )
+        {
+            y = x.get();
+            x = boost::none ;
+        }
+        else if ( hasX && hasY )
+        {
+            // Boost.Utility.Swap will take care of ADL and workarounds for broken compilers
+            boost::swap(x.get(),y.get());
+        }
+    }
+};
 
 } // namespace optional_detail
 
+template<class T>
+struct optional_swap_should_use_default_constructor : has_nothrow_default_constructor<T> {} ;
+
 template<class T> inline void swap ( optional<T>& x, optional<T>& y )
 {
-  optional_detail::optional_swap(x,y);
+    optional_detail::swap_selector<optional_swap_should_use_default_constructor<T>::value>::optional_swap(x, y);
 }
 
-
 } // namespace boost
 
 #endif
-
diff --git a/ext/boost/optional/optional_fwd.hpp b/ext/boost/optional/optional_fwd.hpp
index dcde233..388cc1c 100644
--- a/ext/boost/optional/optional_fwd.hpp
+++ b/ext/boost/optional/optional_fwd.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
+// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
 //
 // Use, modification, and distribution is subject to the Boost Software
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -9,6 +9,9 @@
 // You are welcome to contact the author at:
 //  fernando_cacciola at hotmail.com
 //
+// Revisions:
+// 10 May 2008 (added swap related forward declaration) Niels Dekker
+// 
 #ifndef BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP
 #define BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP
 
@@ -16,6 +19,10 @@ namespace boost {
 
 template<class T> class optional ;
 
+template<class T> void swap ( optional<T>& , optional<T>& ) ;
+
+template<class T> struct optional_swap_should_use_default_constructor ;
+
 } // namespace boost
 
 #endif
diff --git a/ext/boost/pointee.hpp b/ext/boost/pointee.hpp
new file mode 100644
index 0000000..9794b8e
--- /dev/null
+++ b/ext/boost/pointee.hpp
@@ -0,0 +1,74 @@
+#ifndef POINTEE_DWA200415_HPP
+# define POINTEE_DWA200415_HPP
+
+//
+// Copyright David Abrahams 2004. Use, modification and distribution is
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// typename pointee<P>::type provides the pointee type of P.
+//
+// For example, it is T for T* and X for shared_ptr<X>.
+//
+// http://www.boost.org/libs/iterator/doc/pointee.html
+//
+
+# include <boost/detail/is_incrementable.hpp>
+# include <boost/iterator/iterator_traits.hpp>
+# include <boost/type_traits/add_const.hpp>
+# include <boost/type_traits/remove_cv.hpp>
+# include <boost/mpl/if.hpp>
+# include <boost/mpl/eval_if.hpp>
+
+namespace boost { 
+
+namespace detail
+{
+  template <class P>
+  struct smart_ptr_pointee
+  {
+      typedef typename P::element_type type;
+  };
+
+  template <class Iterator>
+  struct iterator_pointee
+  {
+      typedef typename iterator_traits<Iterator>::value_type value_type;
+      
+      struct impl
+      {
+          template <class T>
+          static char test(T const&);
+          
+          static char (& test(value_type&) )[2];
+          
+          static Iterator& x;
+      };
+      
+      BOOST_STATIC_CONSTANT(bool, is_constant = sizeof(impl::test(*impl::x)) == 1);
+      
+      typedef typename mpl::if_c<
+#  if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
+          ::boost::detail::iterator_pointee<Iterator>::is_constant
+#  else
+          is_constant
+#  endif 
+        , typename add_const<value_type>::type
+        , value_type
+      >::type type;
+  };
+}
+
+template <class P>
+struct pointee
+  : mpl::eval_if<
+        detail::is_incrementable<P>
+      , detail::iterator_pointee<P>
+      , detail::smart_ptr_pointee<P>
+    >
+{
+};
+  
+} // namespace boost
+
+#endif // POINTEE_DWA200415_HPP
diff --git a/ext/boost/preprocessor/._comma_if.hpp b/ext/boost/preprocessor/._comma_if.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/._comma_if.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/._empty.hpp b/ext/boost/preprocessor/._empty.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/._empty.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/._enum.hpp b/ext/boost/preprocessor/._enum.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/._enum.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/._enum_params.hpp b/ext/boost/preprocessor/._enum_params.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/._enum_params.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/._identity.hpp b/ext/boost/preprocessor/._identity.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/._identity.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/._inc.hpp b/ext/boost/preprocessor/._inc.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/._inc.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/._iterate.hpp b/ext/boost/preprocessor/._iterate.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/._iterate.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/._repeat.hpp b/ext/boost/preprocessor/._repeat.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/._repeat.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/._stringize.hpp b/ext/boost/preprocessor/._stringize.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/._stringize.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/arithmetic/._add.hpp b/ext/boost/preprocessor/arithmetic/._add.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/arithmetic/._add.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/arithmetic/._dec.hpp b/ext/boost/preprocessor/arithmetic/._dec.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/arithmetic/._dec.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/arithmetic/._inc.hpp b/ext/boost/preprocessor/arithmetic/._inc.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/arithmetic/._inc.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/arithmetic/._mod.hpp b/ext/boost/preprocessor/arithmetic/._mod.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/arithmetic/._mod.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/arithmetic/._sub.hpp b/ext/boost/preprocessor/arithmetic/._sub.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/arithmetic/._sub.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/arithmetic/detail/._div_base.hpp b/ext/boost/preprocessor/arithmetic/detail/._div_base.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/arithmetic/detail/._div_base.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/arithmetic/detail/div_base.hpp b/ext/boost/preprocessor/arithmetic/detail/div_base.hpp
deleted file mode 100644
index 106632a..0000000
--- a/ext/boost/preprocessor/arithmetic/detail/div_base.hpp
+++ /dev/null
@@ -1,61 +0,0 @@
-# /* Copyright (C) 2001
-#  * Housemarque Oy
-#  * http://www.housemarque.com
-#  *
-#  * Distributed under the Boost Software License, Version 1.0. (See
-#  * accompanying file LICENSE_1_0.txt or copy at
-#  * http://www.boost.org/LICENSE_1_0.txt)
-#  */
-#
-# /* Revised by Paul Mensonides (2002) */
-#
-# /* See http://www.boost.org for most recent version. */
-#
-# ifndef BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_DIV_BASE_HPP
-# define BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_DIV_BASE_HPP
-#
-# include <boost/preprocessor/arithmetic/inc.hpp>
-# include <boost/preprocessor/arithmetic/sub.hpp>
-# include <boost/preprocessor/comparison/less_equal.hpp>
-# include <boost/preprocessor/config/config.hpp>
-# include <boost/preprocessor/control/while.hpp>
-# include <boost/preprocessor/tuple/elem.hpp>
-# include <boost/preprocessor/tuple/rem.hpp>
-#
-# /* BOOST_PP_DIV_BASE */
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_DIV_BASE(x, y) BOOST_PP_WHILE(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y))
-# else
-#    define BOOST_PP_DIV_BASE(x, y) BOOST_PP_DIV_BASE_I(x, y)
-#    define BOOST_PP_DIV_BASE_I(x, y) BOOST_PP_WHILE(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y))
-# endif
-#
-# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
-#    define BOOST_PP_DIV_BASE_P(d, rxy) BOOST_PP_DIV_BASE_P_IM(d, BOOST_PP_TUPLE_REM_3 rxy)
-#    define BOOST_PP_DIV_BASE_P_IM(d, im) BOOST_PP_DIV_BASE_P_I(d, im)
-# else
-#    define BOOST_PP_DIV_BASE_P(d, rxy) BOOST_PP_DIV_BASE_P_I(d, BOOST_PP_TUPLE_ELEM(3, 0, rxy), BOOST_PP_TUPLE_ELEM(3, 1, rxy), BOOST_PP_TUPLE_ELEM(3, 2, rxy))
-# endif
-#
-# define BOOST_PP_DIV_BASE_P_I(d, r, x, y) BOOST_PP_LESS_EQUAL_D(d, y, x)
-#
-# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
-#    define BOOST_PP_DIV_BASE_O(d, rxy) BOOST_PP_DIV_BASE_O_IM(d, BOOST_PP_TUPLE_REM_3 rxy)
-#    define BOOST_PP_DIV_BASE_O_IM(d, im) BOOST_PP_DIV_BASE_O_I(d, im)
-# else
-#    define BOOST_PP_DIV_BASE_O(d, rxy) BOOST_PP_DIV_BASE_O_I(d, BOOST_PP_TUPLE_ELEM(3, 0, rxy), BOOST_PP_TUPLE_ELEM(3, 1, rxy), BOOST_PP_TUPLE_ELEM(3, 2, rxy))
-# endif
-#
-# define BOOST_PP_DIV_BASE_O_I(d, r, x, y) (BOOST_PP_INC(r), BOOST_PP_SUB_D(d, x, y), y)
-#
-# /* BOOST_PP_DIV_BASE_D */
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_DIV_BASE_D(d, x, y) BOOST_PP_WHILE_ ## d(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y))
-# else
-#    define BOOST_PP_DIV_BASE_D(d, x, y) BOOST_PP_DIV_BASE_D_I(d, x, y)
-#    define BOOST_PP_DIV_BASE_D_I(d, x, y) BOOST_PP_WHILE_ ## d(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y))
-# endif
-#
-# endif
diff --git a/ext/boost/preprocessor/arithmetic/mod.hpp b/ext/boost/preprocessor/arithmetic/mod.hpp
deleted file mode 100644
index 62489d1..0000000
--- a/ext/boost/preprocessor/arithmetic/mod.hpp
+++ /dev/null
@@ -1,39 +0,0 @@
-# /* Copyright (C) 2001
-#  * Housemarque Oy
-#  * http://www.housemarque.com
-#  *
-#  * Distributed under the Boost Software License, Version 1.0. (See
-#  * accompanying file LICENSE_1_0.txt or copy at
-#  * http://www.boost.org/LICENSE_1_0.txt)
-#  */
-#
-# /* Revised by Paul Mensonides (2002) */
-#
-# /* See http://www.boost.org for most recent version. */
-#
-# ifndef BOOST_PREPROCESSOR_ARITHMETIC_MOD_HPP
-# define BOOST_PREPROCESSOR_ARITHMETIC_MOD_HPP
-#
-# include <boost/preprocessor/arithmetic/detail/div_base.hpp>
-# include <boost/preprocessor/config/config.hpp>
-# include <boost/preprocessor/tuple/elem.hpp>
-#
-# /* BOOST_PP_MOD */
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_MOD(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y))
-# else
-#    define BOOST_PP_MOD(x, y) BOOST_PP_MOD_I(x, y)
-#    define BOOST_PP_MOD_I(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y))
-# endif
-#
-# /* BOOST_PP_MOD_D */
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_MOD_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y))
-# else
-#    define BOOST_PP_MOD_D(d, x, y) BOOST_PP_MOD_D_I(d, x, y)
-#    define BOOST_PP_MOD_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y))
-# endif
-#
-# endif
diff --git a/ext/boost/preprocessor/array/._data.hpp b/ext/boost/preprocessor/array/._data.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/array/._data.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/array/._elem.hpp b/ext/boost/preprocessor/array/._elem.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/array/._elem.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/array/._size.hpp b/ext/boost/preprocessor/array/._size.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/array/._size.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/cat.hpp b/ext/boost/preprocessor/cat.hpp
index b2a82c0..5e52850 100644
--- a/ext/boost/preprocessor/cat.hpp
+++ b/ext/boost/preprocessor/cat.hpp
@@ -28,8 +28,8 @@
 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
 #    define BOOST_PP_CAT_I(a, b) a ## b
 # else
-#    define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(a ## b)
-#    define BOOST_PP_CAT_II(res) res
+#    define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b)
+#    define BOOST_PP_CAT_II(p, res) res
 # endif
 #
 # endif
diff --git a/ext/boost/preprocessor/comparison/._less_equal.hpp b/ext/boost/preprocessor/comparison/._less_equal.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/comparison/._less_equal.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/comparison/less_equal.hpp b/ext/boost/preprocessor/comparison/less_equal.hpp
deleted file mode 100644
index 1302d54..0000000
--- a/ext/boost/preprocessor/comparison/less_equal.hpp
+++ /dev/null
@@ -1,39 +0,0 @@
-# /* Copyright (C) 2001
-#  * Housemarque Oy
-#  * http://www.housemarque.com
-#  *
-#  * Distributed under the Boost Software License, Version 1.0. (See
-#  * accompanying file LICENSE_1_0.txt or copy at
-#  * http://www.boost.org/LICENSE_1_0.txt)
-#  */
-#
-# /* Revised by Paul Mensonides (2002) */
-#
-# /* See http://www.boost.org for most recent version. */
-#
-# ifndef BOOST_PREPROCESSOR_COMPARISON_LESS_EQUAL_HPP
-# define BOOST_PREPROCESSOR_COMPARISON_LESS_EQUAL_HPP
-#
-# include <boost/preprocessor/arithmetic/sub.hpp>
-# include <boost/preprocessor/config/config.hpp>
-# include <boost/preprocessor/logical/not.hpp>
-#
-# /* BOOST_PP_LESS_EQUAL */
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_LESS_EQUAL(x, y) BOOST_PP_NOT(BOOST_PP_SUB(x, y))
-# else
-#    define BOOST_PP_LESS_EQUAL(x, y) BOOST_PP_LESS_EQUAL_I(x, y)
-#    define BOOST_PP_LESS_EQUAL_I(x, y) BOOST_PP_NOT(BOOST_PP_SUB(x, y))
-# endif
-#
-# /* BOOST_PP_LESS_EQUAL_D */
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_LESS_EQUAL_D(d, x, y) BOOST_PP_NOT(BOOST_PP_SUB_D(d, x, y))
-# else
-#    define BOOST_PP_LESS_EQUAL_D(d, x, y) BOOST_PP_LESS_EQUAL_D_I(d, x, y)
-#    define BOOST_PP_LESS_EQUAL_D_I(d, x, y) BOOST_PP_NOT(BOOST_PP_SUB_D(d, x, y))
-# endif
-#
-# endif
diff --git a/ext/boost/preprocessor/config/config.hpp b/ext/boost/preprocessor/config/config.hpp
index dd0f713..d02eb58 100644
--- a/ext/boost/preprocessor/config/config.hpp
+++ b/ext/boost/preprocessor/config/config.hpp
@@ -1,9 +1,10 @@
 # /* **************************************************************************
 #  *                                                                          *
-#  *     (C) Copyright Paul Mensonides 2002.
-#  *     Distributed under the Boost Software License, Version 1.0. (See
-#  *     accompanying file LICENSE_1_0.txt or copy at
-#  *     http://www.boost.org/LICENSE_1_0.txt)
+#  *     (C) Copyright Paul Mensonides 2002-2011.                             *
+#  *     (C) Copyright Edward Diener 2011.                                    *
+#  *     Distributed under the Boost Software License, Version 1.0. (See      *
+#  *     accompanying file LICENSE_1_0.txt or copy at                         *
+#  *     http://www.boost.org/LICENSE_1_0.txt)                                *
 #  *                                                                          *
 #  ************************************************************************** */
 #
@@ -67,4 +68,38 @@
 #    endif
 # endif
 #
+# /* BOOST_PP_VARIADICS */
+#
+# if !defined BOOST_PP_VARIADICS
+#    /* variadic support explicitly disabled for all untested compilers */
+#    if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI
+#        define BOOST_PP_VARIADICS 0
+#    /* VC++ (C/C++) */
+#    elif defined _MSC_VER && _MSC_VER >= 1400 && !defined __EDG__
+#        if _MSC_VER >= 1400
+#            define BOOST_PP_VARIADICS 1
+#            define BOOST_PP_VARIADICS_MSVC 1
+#        else
+#            define BOOST_PP_VARIADICS 0
+#        endif
+#    /* Wave (C/C++), GCC (C++) */
+#    elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && __GXX_EXPERIMENTAL_CXX0X__
+#        define BOOST_PP_VARIADICS 1
+#    /* EDG-based (C/C++), GCC (C), and unknown (C/C++) */
+#    elif !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L
+#        define BOOST_PP_VARIADICS 1
+#    else
+#        define BOOST_PP_VARIADICS 0
+#    endif
+# elif !BOOST_PP_VARIADICS + 1 < 2
+#    undef BOOST_PP_VARIADICS
+#    define BOOST_PP_VARIADICS 1
+#    if defined _MSC_VER && _MSC_VER >= 1400 && !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)
+#        define BOOST_PP_VARIADICS_MSVC 1
+#    endif
+# else
+#    undef BOOST_PP_VARIADICS
+#    define BOOST_PP_VARIADICS 0
+# endif
+#
 # endif
diff --git a/ext/boost/preprocessor/control/._deduce_d.hpp b/ext/boost/preprocessor/control/._deduce_d.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/control/._deduce_d.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/control/._expr_iif.hpp b/ext/boost/preprocessor/control/._expr_iif.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/control/._expr_iif.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/control/._if.hpp b/ext/boost/preprocessor/control/._if.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/control/._if.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/control/._iif.hpp b/ext/boost/preprocessor/control/._iif.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/control/._iif.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/control/._while.hpp b/ext/boost/preprocessor/control/._while.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/control/._while.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/control/deduce_d.hpp b/ext/boost/preprocessor/control/deduce_d.hpp
deleted file mode 100644
index a0276b0..0000000
--- a/ext/boost/preprocessor/control/deduce_d.hpp
+++ /dev/null
@@ -1,22 +0,0 @@
-# /* **************************************************************************
-#  *                                                                          *
-#  *     (C) Copyright Paul Mensonides 2002.
-#  *     Distributed under the Boost Software License, Version 1.0. (See
-#  *     accompanying file LICENSE_1_0.txt or copy at
-#  *     http://www.boost.org/LICENSE_1_0.txt)
-#  *                                                                          *
-#  ************************************************************************** */
-#
-# /* See http://www.boost.org for most recent version. */
-#
-# ifndef BOOST_PREPROCESSOR_CONTROL_DEDUCE_D_HPP
-# define BOOST_PREPROCESSOR_CONTROL_DEDUCE_D_HPP
-#
-# include <boost/preprocessor/control/while.hpp>
-# include <boost/preprocessor/detail/auto_rec.hpp>
-#
-# /* BOOST_PP_DEDUCE_D */
-#
-# define BOOST_PP_DEDUCE_D() BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)
-#
-# endif
diff --git a/ext/boost/preprocessor/control/detail/._while.hpp b/ext/boost/preprocessor/control/detail/._while.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/control/detail/._while.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/debug/._error.hpp b/ext/boost/preprocessor/debug/._error.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/debug/._error.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/dec.hpp b/ext/boost/preprocessor/dec.hpp
new file mode 100644
index 0000000..d572064
--- /dev/null
+++ b/ext/boost/preprocessor/dec.hpp
@@ -0,0 +1,17 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Paul Mensonides 2002.
+#  *     Distributed under the Boost Software License, Version 1.0. (See
+#  *     accompanying file LICENSE_1_0.txt or copy at
+#  *     http://www.boost.org/LICENSE_1_0.txt)
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_DEC_HPP
+# define BOOST_PREPROCESSOR_DEC_HPP
+#
+# include <boost/preprocessor/arithmetic/dec.hpp>
+#
+# endif
diff --git a/ext/boost/preprocessor/detail/._auto_rec.hpp b/ext/boost/preprocessor/detail/._auto_rec.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/detail/._auto_rec.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/detail/._check.hpp b/ext/boost/preprocessor/detail/._check.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/detail/._check.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/detail/._is_binary.hpp b/ext/boost/preprocessor/detail/._is_binary.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/detail/._is_binary.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/enum_params_with_a_default.hpp b/ext/boost/preprocessor/enum_params_with_a_default.hpp
new file mode 100644
index 0000000..fd1ad4c
--- /dev/null
+++ b/ext/boost/preprocessor/enum_params_with_a_default.hpp
@@ -0,0 +1,17 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Paul Mensonides 2002.
+#  *     Distributed under the Boost Software License, Version 1.0. (See
+#  *     accompanying file LICENSE_1_0.txt or copy at
+#  *     http://www.boost.org/LICENSE_1_0.txt)
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_A_DEFAULT_HPP
+# define BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_A_DEFAULT_HPP
+#
+# include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+#
+# endif
diff --git a/ext/boost/preprocessor/enum_shifted_params.hpp b/ext/boost/preprocessor/enum_shifted_params.hpp
new file mode 100644
index 0000000..462c642
--- /dev/null
+++ b/ext/boost/preprocessor/enum_shifted_params.hpp
@@ -0,0 +1,17 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Paul Mensonides 2002.
+#  *     Distributed under the Boost Software License, Version 1.0. (See
+#  *     accompanying file LICENSE_1_0.txt or copy at
+#  *     http://www.boost.org/LICENSE_1_0.txt)
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS_HPP
+# define BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS_HPP
+#
+# include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+#
+# endif
diff --git a/ext/boost/preprocessor/facilities/._empty.hpp b/ext/boost/preprocessor/facilities/._empty.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/facilities/._empty.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/facilities/._identity.hpp b/ext/boost/preprocessor/facilities/._identity.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/facilities/._identity.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/facilities/intercept.hpp b/ext/boost/preprocessor/facilities/intercept.hpp
new file mode 100644
index 0000000..41dcc6a
--- /dev/null
+++ b/ext/boost/preprocessor/facilities/intercept.hpp
@@ -0,0 +1,277 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Paul Mensonides 2002.
+#  *     Distributed under the Boost Software License, Version 1.0. (See
+#  *     accompanying file LICENSE_1_0.txt or copy at
+#  *     http://www.boost.org/LICENSE_1_0.txt)
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_FACILITIES_INTERCEPT_HPP
+# define BOOST_PREPROCESSOR_FACILITIES_INTERCEPT_HPP
+#
+# /* BOOST_PP_INTERCEPT */
+#
+# define BOOST_PP_INTERCEPT BOOST_PP_INTERCEPT_
+#
+# define BOOST_PP_INTERCEPT_0
+# define BOOST_PP_INTERCEPT_1
+# define BOOST_PP_INTERCEPT_2
+# define BOOST_PP_INTERCEPT_3
+# define BOOST_PP_INTERCEPT_4
+# define BOOST_PP_INTERCEPT_5
+# define BOOST_PP_INTERCEPT_6
+# define BOOST_PP_INTERCEPT_7
+# define BOOST_PP_INTERCEPT_8
+# define BOOST_PP_INTERCEPT_9
+# define BOOST_PP_INTERCEPT_10
+# define BOOST_PP_INTERCEPT_11
+# define BOOST_PP_INTERCEPT_12
+# define BOOST_PP_INTERCEPT_13
+# define BOOST_PP_INTERCEPT_14
+# define BOOST_PP_INTERCEPT_15
+# define BOOST_PP_INTERCEPT_16
+# define BOOST_PP_INTERCEPT_17
+# define BOOST_PP_INTERCEPT_18
+# define BOOST_PP_INTERCEPT_19
+# define BOOST_PP_INTERCEPT_20
+# define BOOST_PP_INTERCEPT_21
+# define BOOST_PP_INTERCEPT_22
+# define BOOST_PP_INTERCEPT_23
+# define BOOST_PP_INTERCEPT_24
+# define BOOST_PP_INTERCEPT_25
+# define BOOST_PP_INTERCEPT_26
+# define BOOST_PP_INTERCEPT_27
+# define BOOST_PP_INTERCEPT_28
+# define BOOST_PP_INTERCEPT_29
+# define BOOST_PP_INTERCEPT_30
+# define BOOST_PP_INTERCEPT_31
+# define BOOST_PP_INTERCEPT_32
+# define BOOST_PP_INTERCEPT_33
+# define BOOST_PP_INTERCEPT_34
+# define BOOST_PP_INTERCEPT_35
+# define BOOST_PP_INTERCEPT_36
+# define BOOST_PP_INTERCEPT_37
+# define BOOST_PP_INTERCEPT_38
+# define BOOST_PP_INTERCEPT_39
+# define BOOST_PP_INTERCEPT_40
+# define BOOST_PP_INTERCEPT_41
+# define BOOST_PP_INTERCEPT_42
+# define BOOST_PP_INTERCEPT_43
+# define BOOST_PP_INTERCEPT_44
+# define BOOST_PP_INTERCEPT_45
+# define BOOST_PP_INTERCEPT_46
+# define BOOST_PP_INTERCEPT_47
+# define BOOST_PP_INTERCEPT_48
+# define BOOST_PP_INTERCEPT_49
+# define BOOST_PP_INTERCEPT_50
+# define BOOST_PP_INTERCEPT_51
+# define BOOST_PP_INTERCEPT_52
+# define BOOST_PP_INTERCEPT_53
+# define BOOST_PP_INTERCEPT_54
+# define BOOST_PP_INTERCEPT_55
+# define BOOST_PP_INTERCEPT_56
+# define BOOST_PP_INTERCEPT_57
+# define BOOST_PP_INTERCEPT_58
+# define BOOST_PP_INTERCEPT_59
+# define BOOST_PP_INTERCEPT_60
+# define BOOST_PP_INTERCEPT_61
+# define BOOST_PP_INTERCEPT_62
+# define BOOST_PP_INTERCEPT_63
+# define BOOST_PP_INTERCEPT_64
+# define BOOST_PP_INTERCEPT_65
+# define BOOST_PP_INTERCEPT_66
+# define BOOST_PP_INTERCEPT_67
+# define BOOST_PP_INTERCEPT_68
+# define BOOST_PP_INTERCEPT_69
+# define BOOST_PP_INTERCEPT_70
+# define BOOST_PP_INTERCEPT_71
+# define BOOST_PP_INTERCEPT_72
+# define BOOST_PP_INTERCEPT_73
+# define BOOST_PP_INTERCEPT_74
+# define BOOST_PP_INTERCEPT_75
+# define BOOST_PP_INTERCEPT_76
+# define BOOST_PP_INTERCEPT_77
+# define BOOST_PP_INTERCEPT_78
+# define BOOST_PP_INTERCEPT_79
+# define BOOST_PP_INTERCEPT_80
+# define BOOST_PP_INTERCEPT_81
+# define BOOST_PP_INTERCEPT_82
+# define BOOST_PP_INTERCEPT_83
+# define BOOST_PP_INTERCEPT_84
+# define BOOST_PP_INTERCEPT_85
+# define BOOST_PP_INTERCEPT_86
+# define BOOST_PP_INTERCEPT_87
+# define BOOST_PP_INTERCEPT_88
+# define BOOST_PP_INTERCEPT_89
+# define BOOST_PP_INTERCEPT_90
+# define BOOST_PP_INTERCEPT_91
+# define BOOST_PP_INTERCEPT_92
+# define BOOST_PP_INTERCEPT_93
+# define BOOST_PP_INTERCEPT_94
+# define BOOST_PP_INTERCEPT_95
+# define BOOST_PP_INTERCEPT_96
+# define BOOST_PP_INTERCEPT_97
+# define BOOST_PP_INTERCEPT_98
+# define BOOST_PP_INTERCEPT_99
+# define BOOST_PP_INTERCEPT_100
+# define BOOST_PP_INTERCEPT_101
+# define BOOST_PP_INTERCEPT_102
+# define BOOST_PP_INTERCEPT_103
+# define BOOST_PP_INTERCEPT_104
+# define BOOST_PP_INTERCEPT_105
+# define BOOST_PP_INTERCEPT_106
+# define BOOST_PP_INTERCEPT_107
+# define BOOST_PP_INTERCEPT_108
+# define BOOST_PP_INTERCEPT_109
+# define BOOST_PP_INTERCEPT_110
+# define BOOST_PP_INTERCEPT_111
+# define BOOST_PP_INTERCEPT_112
+# define BOOST_PP_INTERCEPT_113
+# define BOOST_PP_INTERCEPT_114
+# define BOOST_PP_INTERCEPT_115
+# define BOOST_PP_INTERCEPT_116
+# define BOOST_PP_INTERCEPT_117
+# define BOOST_PP_INTERCEPT_118
+# define BOOST_PP_INTERCEPT_119
+# define BOOST_PP_INTERCEPT_120
+# define BOOST_PP_INTERCEPT_121
+# define BOOST_PP_INTERCEPT_122
+# define BOOST_PP_INTERCEPT_123
+# define BOOST_PP_INTERCEPT_124
+# define BOOST_PP_INTERCEPT_125
+# define BOOST_PP_INTERCEPT_126
+# define BOOST_PP_INTERCEPT_127
+# define BOOST_PP_INTERCEPT_128
+# define BOOST_PP_INTERCEPT_129
+# define BOOST_PP_INTERCEPT_130
+# define BOOST_PP_INTERCEPT_131
+# define BOOST_PP_INTERCEPT_132
+# define BOOST_PP_INTERCEPT_133
+# define BOOST_PP_INTERCEPT_134
+# define BOOST_PP_INTERCEPT_135
+# define BOOST_PP_INTERCEPT_136
+# define BOOST_PP_INTERCEPT_137
+# define BOOST_PP_INTERCEPT_138
+# define BOOST_PP_INTERCEPT_139
+# define BOOST_PP_INTERCEPT_140
+# define BOOST_PP_INTERCEPT_141
+# define BOOST_PP_INTERCEPT_142
+# define BOOST_PP_INTERCEPT_143
+# define BOOST_PP_INTERCEPT_144
+# define BOOST_PP_INTERCEPT_145
+# define BOOST_PP_INTERCEPT_146
+# define BOOST_PP_INTERCEPT_147
+# define BOOST_PP_INTERCEPT_148
+# define BOOST_PP_INTERCEPT_149
+# define BOOST_PP_INTERCEPT_150
+# define BOOST_PP_INTERCEPT_151
+# define BOOST_PP_INTERCEPT_152
+# define BOOST_PP_INTERCEPT_153
+# define BOOST_PP_INTERCEPT_154
+# define BOOST_PP_INTERCEPT_155
+# define BOOST_PP_INTERCEPT_156
+# define BOOST_PP_INTERCEPT_157
+# define BOOST_PP_INTERCEPT_158
+# define BOOST_PP_INTERCEPT_159
+# define BOOST_PP_INTERCEPT_160
+# define BOOST_PP_INTERCEPT_161
+# define BOOST_PP_INTERCEPT_162
+# define BOOST_PP_INTERCEPT_163
+# define BOOST_PP_INTERCEPT_164
+# define BOOST_PP_INTERCEPT_165
+# define BOOST_PP_INTERCEPT_166
+# define BOOST_PP_INTERCEPT_167
+# define BOOST_PP_INTERCEPT_168
+# define BOOST_PP_INTERCEPT_169
+# define BOOST_PP_INTERCEPT_170
+# define BOOST_PP_INTERCEPT_171
+# define BOOST_PP_INTERCEPT_172
+# define BOOST_PP_INTERCEPT_173
+# define BOOST_PP_INTERCEPT_174
+# define BOOST_PP_INTERCEPT_175
+# define BOOST_PP_INTERCEPT_176
+# define BOOST_PP_INTERCEPT_177
+# define BOOST_PP_INTERCEPT_178
+# define BOOST_PP_INTERCEPT_179
+# define BOOST_PP_INTERCEPT_180
+# define BOOST_PP_INTERCEPT_181
+# define BOOST_PP_INTERCEPT_182
+# define BOOST_PP_INTERCEPT_183
+# define BOOST_PP_INTERCEPT_184
+# define BOOST_PP_INTERCEPT_185
+# define BOOST_PP_INTERCEPT_186
+# define BOOST_PP_INTERCEPT_187
+# define BOOST_PP_INTERCEPT_188
+# define BOOST_PP_INTERCEPT_189
+# define BOOST_PP_INTERCEPT_190
+# define BOOST_PP_INTERCEPT_191
+# define BOOST_PP_INTERCEPT_192
+# define BOOST_PP_INTERCEPT_193
+# define BOOST_PP_INTERCEPT_194
+# define BOOST_PP_INTERCEPT_195
+# define BOOST_PP_INTERCEPT_196
+# define BOOST_PP_INTERCEPT_197
+# define BOOST_PP_INTERCEPT_198
+# define BOOST_PP_INTERCEPT_199
+# define BOOST_PP_INTERCEPT_200
+# define BOOST_PP_INTERCEPT_201
+# define BOOST_PP_INTERCEPT_202
+# define BOOST_PP_INTERCEPT_203
+# define BOOST_PP_INTERCEPT_204
+# define BOOST_PP_INTERCEPT_205
+# define BOOST_PP_INTERCEPT_206
+# define BOOST_PP_INTERCEPT_207
+# define BOOST_PP_INTERCEPT_208
+# define BOOST_PP_INTERCEPT_209
+# define BOOST_PP_INTERCEPT_210
+# define BOOST_PP_INTERCEPT_211
+# define BOOST_PP_INTERCEPT_212
+# define BOOST_PP_INTERCEPT_213
+# define BOOST_PP_INTERCEPT_214
+# define BOOST_PP_INTERCEPT_215
+# define BOOST_PP_INTERCEPT_216
+# define BOOST_PP_INTERCEPT_217
+# define BOOST_PP_INTERCEPT_218
+# define BOOST_PP_INTERCEPT_219
+# define BOOST_PP_INTERCEPT_220
+# define BOOST_PP_INTERCEPT_221
+# define BOOST_PP_INTERCEPT_222
+# define BOOST_PP_INTERCEPT_223
+# define BOOST_PP_INTERCEPT_224
+# define BOOST_PP_INTERCEPT_225
+# define BOOST_PP_INTERCEPT_226
+# define BOOST_PP_INTERCEPT_227
+# define BOOST_PP_INTERCEPT_228
+# define BOOST_PP_INTERCEPT_229
+# define BOOST_PP_INTERCEPT_230
+# define BOOST_PP_INTERCEPT_231
+# define BOOST_PP_INTERCEPT_232
+# define BOOST_PP_INTERCEPT_233
+# define BOOST_PP_INTERCEPT_234
+# define BOOST_PP_INTERCEPT_235
+# define BOOST_PP_INTERCEPT_236
+# define BOOST_PP_INTERCEPT_237
+# define BOOST_PP_INTERCEPT_238
+# define BOOST_PP_INTERCEPT_239
+# define BOOST_PP_INTERCEPT_240
+# define BOOST_PP_INTERCEPT_241
+# define BOOST_PP_INTERCEPT_242
+# define BOOST_PP_INTERCEPT_243
+# define BOOST_PP_INTERCEPT_244
+# define BOOST_PP_INTERCEPT_245
+# define BOOST_PP_INTERCEPT_246
+# define BOOST_PP_INTERCEPT_247
+# define BOOST_PP_INTERCEPT_248
+# define BOOST_PP_INTERCEPT_249
+# define BOOST_PP_INTERCEPT_250
+# define BOOST_PP_INTERCEPT_251
+# define BOOST_PP_INTERCEPT_252
+# define BOOST_PP_INTERCEPT_253
+# define BOOST_PP_INTERCEPT_254
+# define BOOST_PP_INTERCEPT_255
+# define BOOST_PP_INTERCEPT_256
+#
+# endif
diff --git a/ext/boost/preprocessor/facilities/overload.hpp b/ext/boost/preprocessor/facilities/overload.hpp
new file mode 100644
index 0000000..1576316
--- /dev/null
+++ b/ext/boost/preprocessor/facilities/overload.hpp
@@ -0,0 +1,25 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Paul Mensonides 2011.                                  *
+#  *     (C) Copyright Edward Diener 2011.                                    *
+#  *     Distributed under the Boost Software License, Version 1.0. (See      *
+#  *     accompanying file LICENSE_1_0.txt or copy at                         *
+#  *     http://www.boost.org/LICENSE_1_0.txt)                                *
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_FACILITIES_OVERLOAD_HPP
+# define BOOST_PREPROCESSOR_FACILITIES_OVERLOAD_HPP
+#
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/variadic/size.hpp>
+#
+# /* BOOST_PP_OVERLOAD */
+#
+# if BOOST_PP_VARIADICS
+#    define BOOST_PP_OVERLOAD(prefix, ...) BOOST_PP_CAT(prefix, BOOST_PP_VARIADIC_SIZE(__VA_ARGS__))
+# endif
+#
+# endif
diff --git a/ext/boost/preprocessor/iteration/detail/bounds/._lower1.hpp b/ext/boost/preprocessor/iteration/detail/bounds/._lower1.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/iteration/detail/bounds/._lower1.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/iteration/detail/bounds/._upper1.hpp b/ext/boost/preprocessor/iteration/detail/bounds/._upper1.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/iteration/detail/bounds/._upper1.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/iteration/detail/bounds/lower2.hpp b/ext/boost/preprocessor/iteration/detail/bounds/lower2.hpp
new file mode 100644
index 0000000..ece21fc
--- /dev/null
+++ b/ext/boost/preprocessor/iteration/detail/bounds/lower2.hpp
@@ -0,0 +1,99 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Paul Mensonides 2002.
+#  *     Distributed under the Boost Software License, Version 1.0. (See
+#  *     accompanying file LICENSE_1_0.txt or copy at
+#  *     http://www.boost.org/LICENSE_1_0.txt)
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# include <boost/preprocessor/slot/detail/shared.hpp>
+#
+# undef BOOST_PP_ITERATION_START_2
+#
+# undef BOOST_PP_ITERATION_START_2_DIGIT_1
+# undef BOOST_PP_ITERATION_START_2_DIGIT_2
+# undef BOOST_PP_ITERATION_START_2_DIGIT_3
+# undef BOOST_PP_ITERATION_START_2_DIGIT_4
+# undef BOOST_PP_ITERATION_START_2_DIGIT_5
+# undef BOOST_PP_ITERATION_START_2_DIGIT_6
+# undef BOOST_PP_ITERATION_START_2_DIGIT_7
+# undef BOOST_PP_ITERATION_START_2_DIGIT_8
+# undef BOOST_PP_ITERATION_START_2_DIGIT_9
+# undef BOOST_PP_ITERATION_START_2_DIGIT_10
+#
+# if BOOST_PP_SLOT_TEMP_3 == 0
+#    define BOOST_PP_ITERATION_START_2_DIGIT_3 0
+# elif BOOST_PP_SLOT_TEMP_3 == 1
+#    define BOOST_PP_ITERATION_START_2_DIGIT_3 1
+# elif BOOST_PP_SLOT_TEMP_3 == 2
+#    define BOOST_PP_ITERATION_START_2_DIGIT_3 2
+# elif BOOST_PP_SLOT_TEMP_3 == 3
+#    define BOOST_PP_ITERATION_START_2_DIGIT_3 3
+# elif BOOST_PP_SLOT_TEMP_3 == 4
+#    define BOOST_PP_ITERATION_START_2_DIGIT_3 4
+# elif BOOST_PP_SLOT_TEMP_3 == 5
+#    define BOOST_PP_ITERATION_START_2_DIGIT_3 5
+# elif BOOST_PP_SLOT_TEMP_3 == 6
+#    define BOOST_PP_ITERATION_START_2_DIGIT_3 6
+# elif BOOST_PP_SLOT_TEMP_3 == 7
+#    define BOOST_PP_ITERATION_START_2_DIGIT_3 7
+# elif BOOST_PP_SLOT_TEMP_3 == 8
+#    define BOOST_PP_ITERATION_START_2_DIGIT_3 8
+# elif BOOST_PP_SLOT_TEMP_3 == 9
+#    define BOOST_PP_ITERATION_START_2_DIGIT_3 9
+# endif
+#
+# if BOOST_PP_SLOT_TEMP_2 == 0
+#    define BOOST_PP_ITERATION_START_2_DIGIT_2 0
+# elif BOOST_PP_SLOT_TEMP_2 == 1
+#    define BOOST_PP_ITERATION_START_2_DIGIT_2 1
+# elif BOOST_PP_SLOT_TEMP_2 == 2
+#    define BOOST_PP_ITERATION_START_2_DIGIT_2 2
+# elif BOOST_PP_SLOT_TEMP_2 == 3
+#    define BOOST_PP_ITERATION_START_2_DIGIT_2 3
+# elif BOOST_PP_SLOT_TEMP_2 == 4
+#    define BOOST_PP_ITERATION_START_2_DIGIT_2 4
+# elif BOOST_PP_SLOT_TEMP_2 == 5
+#    define BOOST_PP_ITERATION_START_2_DIGIT_2 5
+# elif BOOST_PP_SLOT_TEMP_2 == 6
+#    define BOOST_PP_ITERATION_START_2_DIGIT_2 6
+# elif BOOST_PP_SLOT_TEMP_2 == 7
+#    define BOOST_PP_ITERATION_START_2_DIGIT_2 7
+# elif BOOST_PP_SLOT_TEMP_2 == 8
+#    define BOOST_PP_ITERATION_START_2_DIGIT_2 8
+# elif BOOST_PP_SLOT_TEMP_2 == 9
+#    define BOOST_PP_ITERATION_START_2_DIGIT_2 9
+# endif
+#
+# if BOOST_PP_SLOT_TEMP_1 == 0
+#    define BOOST_PP_ITERATION_START_2_DIGIT_1 0
+# elif BOOST_PP_SLOT_TEMP_1 == 1
+#    define BOOST_PP_ITERATION_START_2_DIGIT_1 1
+# elif BOOST_PP_SLOT_TEMP_1 == 2
+#    define BOOST_PP_ITERATION_START_2_DIGIT_1 2
+# elif BOOST_PP_SLOT_TEMP_1 == 3
+#    define BOOST_PP_ITERATION_START_2_DIGIT_1 3
+# elif BOOST_PP_SLOT_TEMP_1 == 4
+#    define BOOST_PP_ITERATION_START_2_DIGIT_1 4
+# elif BOOST_PP_SLOT_TEMP_1 == 5
+#    define BOOST_PP_ITERATION_START_2_DIGIT_1 5
+# elif BOOST_PP_SLOT_TEMP_1 == 6
+#    define BOOST_PP_ITERATION_START_2_DIGIT_1 6
+# elif BOOST_PP_SLOT_TEMP_1 == 7
+#    define BOOST_PP_ITERATION_START_2_DIGIT_1 7
+# elif BOOST_PP_SLOT_TEMP_1 == 8
+#    define BOOST_PP_ITERATION_START_2_DIGIT_1 8
+# elif BOOST_PP_SLOT_TEMP_1 == 9
+#    define BOOST_PP_ITERATION_START_2_DIGIT_1 9
+# endif
+#
+# if BOOST_PP_ITERATION_START_2_DIGIT_3
+#    define BOOST_PP_ITERATION_START_2 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_2_DIGIT_3, BOOST_PP_ITERATION_START_2_DIGIT_2, BOOST_PP_ITERATION_START_2_DIGIT_1)
+# elif BOOST_PP_ITERATION_START_2_DIGIT_2
+#    define BOOST_PP_ITERATION_START_2 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_2_DIGIT_2, BOOST_PP_ITERATION_START_2_DIGIT_1)
+# else
+#    define BOOST_PP_ITERATION_START_2 BOOST_PP_ITERATION_START_2_DIGIT_1
+# endif
diff --git a/ext/boost/preprocessor/iteration/detail/bounds/upper2.hpp b/ext/boost/preprocessor/iteration/detail/bounds/upper2.hpp
new file mode 100644
index 0000000..faef6f4
--- /dev/null
+++ b/ext/boost/preprocessor/iteration/detail/bounds/upper2.hpp
@@ -0,0 +1,99 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Paul Mensonides 2002.
+#  *     Distributed under the Boost Software License, Version 1.0. (See
+#  *     accompanying file LICENSE_1_0.txt or copy at
+#  *     http://www.boost.org/LICENSE_1_0.txt)
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# include <boost/preprocessor/slot/detail/shared.hpp>
+#
+# undef BOOST_PP_ITERATION_FINISH_2
+#
+# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_1
+# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_2
+# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_3
+# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_4
+# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_5
+# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_6
+# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_7
+# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_8
+# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_9
+# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_10
+#
+# if BOOST_PP_SLOT_TEMP_3 == 0
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 0
+# elif BOOST_PP_SLOT_TEMP_3 == 1
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 1
+# elif BOOST_PP_SLOT_TEMP_3 == 2
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 2
+# elif BOOST_PP_SLOT_TEMP_3 == 3
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 3
+# elif BOOST_PP_SLOT_TEMP_3 == 4
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 4
+# elif BOOST_PP_SLOT_TEMP_3 == 5
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 5
+# elif BOOST_PP_SLOT_TEMP_3 == 6
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 6
+# elif BOOST_PP_SLOT_TEMP_3 == 7
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 7
+# elif BOOST_PP_SLOT_TEMP_3 == 8
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 8
+# elif BOOST_PP_SLOT_TEMP_3 == 9
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 9
+# endif
+#
+# if BOOST_PP_SLOT_TEMP_2 == 0
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 0
+# elif BOOST_PP_SLOT_TEMP_2 == 1
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 1
+# elif BOOST_PP_SLOT_TEMP_2 == 2
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 2
+# elif BOOST_PP_SLOT_TEMP_2 == 3
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 3
+# elif BOOST_PP_SLOT_TEMP_2 == 4
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 4
+# elif BOOST_PP_SLOT_TEMP_2 == 5
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 5
+# elif BOOST_PP_SLOT_TEMP_2 == 6
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 6
+# elif BOOST_PP_SLOT_TEMP_2 == 7
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 7
+# elif BOOST_PP_SLOT_TEMP_2 == 8
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 8
+# elif BOOST_PP_SLOT_TEMP_2 == 9
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 9
+# endif
+#
+# if BOOST_PP_SLOT_TEMP_1 == 0
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 0
+# elif BOOST_PP_SLOT_TEMP_1 == 1
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 1
+# elif BOOST_PP_SLOT_TEMP_1 == 2
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 2
+# elif BOOST_PP_SLOT_TEMP_1 == 3
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 3
+# elif BOOST_PP_SLOT_TEMP_1 == 4
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 4
+# elif BOOST_PP_SLOT_TEMP_1 == 5
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 5
+# elif BOOST_PP_SLOT_TEMP_1 == 6
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 6
+# elif BOOST_PP_SLOT_TEMP_1 == 7
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 7
+# elif BOOST_PP_SLOT_TEMP_1 == 8
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 8
+# elif BOOST_PP_SLOT_TEMP_1 == 9
+#    define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 9
+# endif
+#
+# if BOOST_PP_ITERATION_FINISH_2_DIGIT_3
+#    define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_2_DIGIT_3, BOOST_PP_ITERATION_FINISH_2_DIGIT_2, BOOST_PP_ITERATION_FINISH_2_DIGIT_1)
+# elif BOOST_PP_ITERATION_FINISH_2_DIGIT_2
+#    define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_2_DIGIT_2, BOOST_PP_ITERATION_FINISH_2_DIGIT_1)
+# else
+#    define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_ITERATION_FINISH_2_DIGIT_1
+# endif
diff --git a/ext/boost/preprocessor/iteration/detail/iter/forward1.hpp b/ext/boost/preprocessor/iteration/detail/iter/forward1.hpp
index 3f41ba1..3c6a458 100644
--- a/ext/boost/preprocessor/iteration/detail/iter/forward1.hpp
+++ b/ext/boost/preprocessor/iteration/detail/iter/forward1.hpp
@@ -17,7 +17,7 @@
 #    include <boost/preprocessor/iteration/detail/bounds/lower1.hpp>
 #    define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS)
 #    include <boost/preprocessor/iteration/detail/bounds/upper1.hpp>
-#    define BOOST_PP_ITERATION_FLAGS_1 0
+#    define BOOST_PP_ITERATION_FLAGS_1() 0
 #    undef BOOST_PP_ITERATION_LIMITS
 # elif defined(BOOST_PP_ITERATION_PARAMS_1)
 #    define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_1)
@@ -26,9 +26,9 @@
 #    include <boost/preprocessor/iteration/detail/bounds/upper1.hpp>
 #    define BOOST_PP_FILENAME_1 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_1)
 #    if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_1) >= 4
-#        define BOOST_PP_ITERATION_FLAGS_1 BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_1)
+#        define BOOST_PP_ITERATION_FLAGS_1() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_1)
 #    else
-#        define BOOST_PP_ITERATION_FLAGS_1 0
+#        define BOOST_PP_ITERATION_FLAGS_1() 0
 #    endif
 # else
 #    error BOOST_PP_ERROR:  depth #1 iteration boundaries or filename not defined
diff --git a/ext/boost/preprocessor/iteration/detail/iter/forward2.hpp b/ext/boost/preprocessor/iteration/detail/iter/forward2.hpp
new file mode 100644
index 0000000..e61a329
--- /dev/null
+++ b/ext/boost/preprocessor/iteration/detail/iter/forward2.hpp
@@ -0,0 +1,1338 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Paul Mensonides 2002.
+#  *     Distributed under the Boost Software License, Version 1.0. (See
+#  *     accompanying file LICENSE_1_0.txt or copy at
+#  *     http://www.boost.org/LICENSE_1_0.txt)
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# if defined(BOOST_PP_ITERATION_LIMITS)
+#    if !defined(BOOST_PP_FILENAME_2)
+#        error BOOST_PP_ERROR:  depth #2 filename is not defined
+#    endif
+#    define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS)
+#    include <boost/preprocessor/iteration/detail/bounds/lower2.hpp>
+#    define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS)
+#    include <boost/preprocessor/iteration/detail/bounds/upper2.hpp>
+#    define BOOST_PP_ITERATION_FLAGS_2() 0
+#    undef BOOST_PP_ITERATION_LIMITS
+# elif defined(BOOST_PP_ITERATION_PARAMS_2)
+#    define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_2)
+#    include <boost/preprocessor/iteration/detail/bounds/lower2.hpp>
+#    define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_2)
+#    include <boost/preprocessor/iteration/detail/bounds/upper2.hpp>
+#    define BOOST_PP_FILENAME_2 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_2)
+#    if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_2) >= 4
+#        define BOOST_PP_ITERATION_FLAGS_2() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_2)
+#    else
+#        define BOOST_PP_ITERATION_FLAGS_2() 0
+#    endif
+# else
+#    error BOOST_PP_ERROR:  depth #2 iteration boundaries or filename not defined
+# endif
+#
+# undef BOOST_PP_ITERATION_DEPTH
+# define BOOST_PP_ITERATION_DEPTH() 2
+#
+# if (BOOST_PP_ITERATION_START_2) > (BOOST_PP_ITERATION_FINISH_2)
+#    include <boost/preprocessor/iteration/detail/iter/reverse2.hpp>
+# else
+#    if BOOST_PP_ITERATION_START_2 <= 0 && BOOST_PP_ITERATION_FINISH_2 >= 0
+#        define BOOST_PP_ITERATION_2 0
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 1 && BOOST_PP_ITERATION_FINISH_2 >= 1
+#        define BOOST_PP_ITERATION_2 1
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 2 && BOOST_PP_ITERATION_FINISH_2 >= 2
+#        define BOOST_PP_ITERATION_2 2
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 3 && BOOST_PP_ITERATION_FINISH_2 >= 3
+#        define BOOST_PP_ITERATION_2 3
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 4 && BOOST_PP_ITERATION_FINISH_2 >= 4
+#        define BOOST_PP_ITERATION_2 4
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 5 && BOOST_PP_ITERATION_FINISH_2 >= 5
+#        define BOOST_PP_ITERATION_2 5
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 6 && BOOST_PP_ITERATION_FINISH_2 >= 6
+#        define BOOST_PP_ITERATION_2 6
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 7 && BOOST_PP_ITERATION_FINISH_2 >= 7
+#        define BOOST_PP_ITERATION_2 7
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 8 && BOOST_PP_ITERATION_FINISH_2 >= 8
+#        define BOOST_PP_ITERATION_2 8
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 9 && BOOST_PP_ITERATION_FINISH_2 >= 9
+#        define BOOST_PP_ITERATION_2 9
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 10 && BOOST_PP_ITERATION_FINISH_2 >= 10
+#        define BOOST_PP_ITERATION_2 10
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 11 && BOOST_PP_ITERATION_FINISH_2 >= 11
+#        define BOOST_PP_ITERATION_2 11
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 12 && BOOST_PP_ITERATION_FINISH_2 >= 12
+#        define BOOST_PP_ITERATION_2 12
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 13 && BOOST_PP_ITERATION_FINISH_2 >= 13
+#        define BOOST_PP_ITERATION_2 13
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 14 && BOOST_PP_ITERATION_FINISH_2 >= 14
+#        define BOOST_PP_ITERATION_2 14
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 15 && BOOST_PP_ITERATION_FINISH_2 >= 15
+#        define BOOST_PP_ITERATION_2 15
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 16 && BOOST_PP_ITERATION_FINISH_2 >= 16
+#        define BOOST_PP_ITERATION_2 16
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 17 && BOOST_PP_ITERATION_FINISH_2 >= 17
+#        define BOOST_PP_ITERATION_2 17
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 18 && BOOST_PP_ITERATION_FINISH_2 >= 18
+#        define BOOST_PP_ITERATION_2 18
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 19 && BOOST_PP_ITERATION_FINISH_2 >= 19
+#        define BOOST_PP_ITERATION_2 19
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 20 && BOOST_PP_ITERATION_FINISH_2 >= 20
+#        define BOOST_PP_ITERATION_2 20
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 21 && BOOST_PP_ITERATION_FINISH_2 >= 21
+#        define BOOST_PP_ITERATION_2 21
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 22 && BOOST_PP_ITERATION_FINISH_2 >= 22
+#        define BOOST_PP_ITERATION_2 22
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 23 && BOOST_PP_ITERATION_FINISH_2 >= 23
+#        define BOOST_PP_ITERATION_2 23
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 24 && BOOST_PP_ITERATION_FINISH_2 >= 24
+#        define BOOST_PP_ITERATION_2 24
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 25 && BOOST_PP_ITERATION_FINISH_2 >= 25
+#        define BOOST_PP_ITERATION_2 25
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 26 && BOOST_PP_ITERATION_FINISH_2 >= 26
+#        define BOOST_PP_ITERATION_2 26
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 27 && BOOST_PP_ITERATION_FINISH_2 >= 27
+#        define BOOST_PP_ITERATION_2 27
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 28 && BOOST_PP_ITERATION_FINISH_2 >= 28
+#        define BOOST_PP_ITERATION_2 28
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 29 && BOOST_PP_ITERATION_FINISH_2 >= 29
+#        define BOOST_PP_ITERATION_2 29
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 30 && BOOST_PP_ITERATION_FINISH_2 >= 30
+#        define BOOST_PP_ITERATION_2 30
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 31 && BOOST_PP_ITERATION_FINISH_2 >= 31
+#        define BOOST_PP_ITERATION_2 31
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 32 && BOOST_PP_ITERATION_FINISH_2 >= 32
+#        define BOOST_PP_ITERATION_2 32
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 33 && BOOST_PP_ITERATION_FINISH_2 >= 33
+#        define BOOST_PP_ITERATION_2 33
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 34 && BOOST_PP_ITERATION_FINISH_2 >= 34
+#        define BOOST_PP_ITERATION_2 34
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 35 && BOOST_PP_ITERATION_FINISH_2 >= 35
+#        define BOOST_PP_ITERATION_2 35
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 36 && BOOST_PP_ITERATION_FINISH_2 >= 36
+#        define BOOST_PP_ITERATION_2 36
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 37 && BOOST_PP_ITERATION_FINISH_2 >= 37
+#        define BOOST_PP_ITERATION_2 37
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 38 && BOOST_PP_ITERATION_FINISH_2 >= 38
+#        define BOOST_PP_ITERATION_2 38
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 39 && BOOST_PP_ITERATION_FINISH_2 >= 39
+#        define BOOST_PP_ITERATION_2 39
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 40 && BOOST_PP_ITERATION_FINISH_2 >= 40
+#        define BOOST_PP_ITERATION_2 40
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 41 && BOOST_PP_ITERATION_FINISH_2 >= 41
+#        define BOOST_PP_ITERATION_2 41
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 42 && BOOST_PP_ITERATION_FINISH_2 >= 42
+#        define BOOST_PP_ITERATION_2 42
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 43 && BOOST_PP_ITERATION_FINISH_2 >= 43
+#        define BOOST_PP_ITERATION_2 43
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 44 && BOOST_PP_ITERATION_FINISH_2 >= 44
+#        define BOOST_PP_ITERATION_2 44
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 45 && BOOST_PP_ITERATION_FINISH_2 >= 45
+#        define BOOST_PP_ITERATION_2 45
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 46 && BOOST_PP_ITERATION_FINISH_2 >= 46
+#        define BOOST_PP_ITERATION_2 46
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 47 && BOOST_PP_ITERATION_FINISH_2 >= 47
+#        define BOOST_PP_ITERATION_2 47
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 48 && BOOST_PP_ITERATION_FINISH_2 >= 48
+#        define BOOST_PP_ITERATION_2 48
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 49 && BOOST_PP_ITERATION_FINISH_2 >= 49
+#        define BOOST_PP_ITERATION_2 49
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 50 && BOOST_PP_ITERATION_FINISH_2 >= 50
+#        define BOOST_PP_ITERATION_2 50
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 51 && BOOST_PP_ITERATION_FINISH_2 >= 51
+#        define BOOST_PP_ITERATION_2 51
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 52 && BOOST_PP_ITERATION_FINISH_2 >= 52
+#        define BOOST_PP_ITERATION_2 52
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 53 && BOOST_PP_ITERATION_FINISH_2 >= 53
+#        define BOOST_PP_ITERATION_2 53
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 54 && BOOST_PP_ITERATION_FINISH_2 >= 54
+#        define BOOST_PP_ITERATION_2 54
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 55 && BOOST_PP_ITERATION_FINISH_2 >= 55
+#        define BOOST_PP_ITERATION_2 55
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 56 && BOOST_PP_ITERATION_FINISH_2 >= 56
+#        define BOOST_PP_ITERATION_2 56
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 57 && BOOST_PP_ITERATION_FINISH_2 >= 57
+#        define BOOST_PP_ITERATION_2 57
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 58 && BOOST_PP_ITERATION_FINISH_2 >= 58
+#        define BOOST_PP_ITERATION_2 58
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 59 && BOOST_PP_ITERATION_FINISH_2 >= 59
+#        define BOOST_PP_ITERATION_2 59
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 60 && BOOST_PP_ITERATION_FINISH_2 >= 60
+#        define BOOST_PP_ITERATION_2 60
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 61 && BOOST_PP_ITERATION_FINISH_2 >= 61
+#        define BOOST_PP_ITERATION_2 61
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 62 && BOOST_PP_ITERATION_FINISH_2 >= 62
+#        define BOOST_PP_ITERATION_2 62
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 63 && BOOST_PP_ITERATION_FINISH_2 >= 63
+#        define BOOST_PP_ITERATION_2 63
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 64 && BOOST_PP_ITERATION_FINISH_2 >= 64
+#        define BOOST_PP_ITERATION_2 64
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 65 && BOOST_PP_ITERATION_FINISH_2 >= 65
+#        define BOOST_PP_ITERATION_2 65
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 66 && BOOST_PP_ITERATION_FINISH_2 >= 66
+#        define BOOST_PP_ITERATION_2 66
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 67 && BOOST_PP_ITERATION_FINISH_2 >= 67
+#        define BOOST_PP_ITERATION_2 67
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 68 && BOOST_PP_ITERATION_FINISH_2 >= 68
+#        define BOOST_PP_ITERATION_2 68
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 69 && BOOST_PP_ITERATION_FINISH_2 >= 69
+#        define BOOST_PP_ITERATION_2 69
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 70 && BOOST_PP_ITERATION_FINISH_2 >= 70
+#        define BOOST_PP_ITERATION_2 70
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 71 && BOOST_PP_ITERATION_FINISH_2 >= 71
+#        define BOOST_PP_ITERATION_2 71
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 72 && BOOST_PP_ITERATION_FINISH_2 >= 72
+#        define BOOST_PP_ITERATION_2 72
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 73 && BOOST_PP_ITERATION_FINISH_2 >= 73
+#        define BOOST_PP_ITERATION_2 73
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 74 && BOOST_PP_ITERATION_FINISH_2 >= 74
+#        define BOOST_PP_ITERATION_2 74
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 75 && BOOST_PP_ITERATION_FINISH_2 >= 75
+#        define BOOST_PP_ITERATION_2 75
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 76 && BOOST_PP_ITERATION_FINISH_2 >= 76
+#        define BOOST_PP_ITERATION_2 76
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 77 && BOOST_PP_ITERATION_FINISH_2 >= 77
+#        define BOOST_PP_ITERATION_2 77
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 78 && BOOST_PP_ITERATION_FINISH_2 >= 78
+#        define BOOST_PP_ITERATION_2 78
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 79 && BOOST_PP_ITERATION_FINISH_2 >= 79
+#        define BOOST_PP_ITERATION_2 79
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 80 && BOOST_PP_ITERATION_FINISH_2 >= 80
+#        define BOOST_PP_ITERATION_2 80
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 81 && BOOST_PP_ITERATION_FINISH_2 >= 81
+#        define BOOST_PP_ITERATION_2 81
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 82 && BOOST_PP_ITERATION_FINISH_2 >= 82
+#        define BOOST_PP_ITERATION_2 82
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 83 && BOOST_PP_ITERATION_FINISH_2 >= 83
+#        define BOOST_PP_ITERATION_2 83
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 84 && BOOST_PP_ITERATION_FINISH_2 >= 84
+#        define BOOST_PP_ITERATION_2 84
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 85 && BOOST_PP_ITERATION_FINISH_2 >= 85
+#        define BOOST_PP_ITERATION_2 85
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 86 && BOOST_PP_ITERATION_FINISH_2 >= 86
+#        define BOOST_PP_ITERATION_2 86
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 87 && BOOST_PP_ITERATION_FINISH_2 >= 87
+#        define BOOST_PP_ITERATION_2 87
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 88 && BOOST_PP_ITERATION_FINISH_2 >= 88
+#        define BOOST_PP_ITERATION_2 88
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 89 && BOOST_PP_ITERATION_FINISH_2 >= 89
+#        define BOOST_PP_ITERATION_2 89
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 90 && BOOST_PP_ITERATION_FINISH_2 >= 90
+#        define BOOST_PP_ITERATION_2 90
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 91 && BOOST_PP_ITERATION_FINISH_2 >= 91
+#        define BOOST_PP_ITERATION_2 91
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 92 && BOOST_PP_ITERATION_FINISH_2 >= 92
+#        define BOOST_PP_ITERATION_2 92
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 93 && BOOST_PP_ITERATION_FINISH_2 >= 93
+#        define BOOST_PP_ITERATION_2 93
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 94 && BOOST_PP_ITERATION_FINISH_2 >= 94
+#        define BOOST_PP_ITERATION_2 94
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 95 && BOOST_PP_ITERATION_FINISH_2 >= 95
+#        define BOOST_PP_ITERATION_2 95
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 96 && BOOST_PP_ITERATION_FINISH_2 >= 96
+#        define BOOST_PP_ITERATION_2 96
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 97 && BOOST_PP_ITERATION_FINISH_2 >= 97
+#        define BOOST_PP_ITERATION_2 97
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 98 && BOOST_PP_ITERATION_FINISH_2 >= 98
+#        define BOOST_PP_ITERATION_2 98
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 99 && BOOST_PP_ITERATION_FINISH_2 >= 99
+#        define BOOST_PP_ITERATION_2 99
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 100 && BOOST_PP_ITERATION_FINISH_2 >= 100
+#        define BOOST_PP_ITERATION_2 100
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 101 && BOOST_PP_ITERATION_FINISH_2 >= 101
+#        define BOOST_PP_ITERATION_2 101
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 102 && BOOST_PP_ITERATION_FINISH_2 >= 102
+#        define BOOST_PP_ITERATION_2 102
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 103 && BOOST_PP_ITERATION_FINISH_2 >= 103
+#        define BOOST_PP_ITERATION_2 103
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 104 && BOOST_PP_ITERATION_FINISH_2 >= 104
+#        define BOOST_PP_ITERATION_2 104
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 105 && BOOST_PP_ITERATION_FINISH_2 >= 105
+#        define BOOST_PP_ITERATION_2 105
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 106 && BOOST_PP_ITERATION_FINISH_2 >= 106
+#        define BOOST_PP_ITERATION_2 106
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 107 && BOOST_PP_ITERATION_FINISH_2 >= 107
+#        define BOOST_PP_ITERATION_2 107
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 108 && BOOST_PP_ITERATION_FINISH_2 >= 108
+#        define BOOST_PP_ITERATION_2 108
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 109 && BOOST_PP_ITERATION_FINISH_2 >= 109
+#        define BOOST_PP_ITERATION_2 109
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 110 && BOOST_PP_ITERATION_FINISH_2 >= 110
+#        define BOOST_PP_ITERATION_2 110
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 111 && BOOST_PP_ITERATION_FINISH_2 >= 111
+#        define BOOST_PP_ITERATION_2 111
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 112 && BOOST_PP_ITERATION_FINISH_2 >= 112
+#        define BOOST_PP_ITERATION_2 112
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 113 && BOOST_PP_ITERATION_FINISH_2 >= 113
+#        define BOOST_PP_ITERATION_2 113
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 114 && BOOST_PP_ITERATION_FINISH_2 >= 114
+#        define BOOST_PP_ITERATION_2 114
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 115 && BOOST_PP_ITERATION_FINISH_2 >= 115
+#        define BOOST_PP_ITERATION_2 115
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 116 && BOOST_PP_ITERATION_FINISH_2 >= 116
+#        define BOOST_PP_ITERATION_2 116
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 117 && BOOST_PP_ITERATION_FINISH_2 >= 117
+#        define BOOST_PP_ITERATION_2 117
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 118 && BOOST_PP_ITERATION_FINISH_2 >= 118
+#        define BOOST_PP_ITERATION_2 118
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 119 && BOOST_PP_ITERATION_FINISH_2 >= 119
+#        define BOOST_PP_ITERATION_2 119
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 120 && BOOST_PP_ITERATION_FINISH_2 >= 120
+#        define BOOST_PP_ITERATION_2 120
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 121 && BOOST_PP_ITERATION_FINISH_2 >= 121
+#        define BOOST_PP_ITERATION_2 121
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 122 && BOOST_PP_ITERATION_FINISH_2 >= 122
+#        define BOOST_PP_ITERATION_2 122
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 123 && BOOST_PP_ITERATION_FINISH_2 >= 123
+#        define BOOST_PP_ITERATION_2 123
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 124 && BOOST_PP_ITERATION_FINISH_2 >= 124
+#        define BOOST_PP_ITERATION_2 124
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 125 && BOOST_PP_ITERATION_FINISH_2 >= 125
+#        define BOOST_PP_ITERATION_2 125
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 126 && BOOST_PP_ITERATION_FINISH_2 >= 126
+#        define BOOST_PP_ITERATION_2 126
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 127 && BOOST_PP_ITERATION_FINISH_2 >= 127
+#        define BOOST_PP_ITERATION_2 127
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 128 && BOOST_PP_ITERATION_FINISH_2 >= 128
+#        define BOOST_PP_ITERATION_2 128
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 129 && BOOST_PP_ITERATION_FINISH_2 >= 129
+#        define BOOST_PP_ITERATION_2 129
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 130 && BOOST_PP_ITERATION_FINISH_2 >= 130
+#        define BOOST_PP_ITERATION_2 130
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 131 && BOOST_PP_ITERATION_FINISH_2 >= 131
+#        define BOOST_PP_ITERATION_2 131
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 132 && BOOST_PP_ITERATION_FINISH_2 >= 132
+#        define BOOST_PP_ITERATION_2 132
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 133 && BOOST_PP_ITERATION_FINISH_2 >= 133
+#        define BOOST_PP_ITERATION_2 133
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 134 && BOOST_PP_ITERATION_FINISH_2 >= 134
+#        define BOOST_PP_ITERATION_2 134
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 135 && BOOST_PP_ITERATION_FINISH_2 >= 135
+#        define BOOST_PP_ITERATION_2 135
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 136 && BOOST_PP_ITERATION_FINISH_2 >= 136
+#        define BOOST_PP_ITERATION_2 136
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 137 && BOOST_PP_ITERATION_FINISH_2 >= 137
+#        define BOOST_PP_ITERATION_2 137
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 138 && BOOST_PP_ITERATION_FINISH_2 >= 138
+#        define BOOST_PP_ITERATION_2 138
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 139 && BOOST_PP_ITERATION_FINISH_2 >= 139
+#        define BOOST_PP_ITERATION_2 139
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 140 && BOOST_PP_ITERATION_FINISH_2 >= 140
+#        define BOOST_PP_ITERATION_2 140
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 141 && BOOST_PP_ITERATION_FINISH_2 >= 141
+#        define BOOST_PP_ITERATION_2 141
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 142 && BOOST_PP_ITERATION_FINISH_2 >= 142
+#        define BOOST_PP_ITERATION_2 142
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 143 && BOOST_PP_ITERATION_FINISH_2 >= 143
+#        define BOOST_PP_ITERATION_2 143
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 144 && BOOST_PP_ITERATION_FINISH_2 >= 144
+#        define BOOST_PP_ITERATION_2 144
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 145 && BOOST_PP_ITERATION_FINISH_2 >= 145
+#        define BOOST_PP_ITERATION_2 145
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 146 && BOOST_PP_ITERATION_FINISH_2 >= 146
+#        define BOOST_PP_ITERATION_2 146
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 147 && BOOST_PP_ITERATION_FINISH_2 >= 147
+#        define BOOST_PP_ITERATION_2 147
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 148 && BOOST_PP_ITERATION_FINISH_2 >= 148
+#        define BOOST_PP_ITERATION_2 148
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 149 && BOOST_PP_ITERATION_FINISH_2 >= 149
+#        define BOOST_PP_ITERATION_2 149
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 150 && BOOST_PP_ITERATION_FINISH_2 >= 150
+#        define BOOST_PP_ITERATION_2 150
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 151 && BOOST_PP_ITERATION_FINISH_2 >= 151
+#        define BOOST_PP_ITERATION_2 151
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 152 && BOOST_PP_ITERATION_FINISH_2 >= 152
+#        define BOOST_PP_ITERATION_2 152
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 153 && BOOST_PP_ITERATION_FINISH_2 >= 153
+#        define BOOST_PP_ITERATION_2 153
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 154 && BOOST_PP_ITERATION_FINISH_2 >= 154
+#        define BOOST_PP_ITERATION_2 154
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 155 && BOOST_PP_ITERATION_FINISH_2 >= 155
+#        define BOOST_PP_ITERATION_2 155
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 156 && BOOST_PP_ITERATION_FINISH_2 >= 156
+#        define BOOST_PP_ITERATION_2 156
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 157 && BOOST_PP_ITERATION_FINISH_2 >= 157
+#        define BOOST_PP_ITERATION_2 157
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 158 && BOOST_PP_ITERATION_FINISH_2 >= 158
+#        define BOOST_PP_ITERATION_2 158
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 159 && BOOST_PP_ITERATION_FINISH_2 >= 159
+#        define BOOST_PP_ITERATION_2 159
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 160 && BOOST_PP_ITERATION_FINISH_2 >= 160
+#        define BOOST_PP_ITERATION_2 160
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 161 && BOOST_PP_ITERATION_FINISH_2 >= 161
+#        define BOOST_PP_ITERATION_2 161
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 162 && BOOST_PP_ITERATION_FINISH_2 >= 162
+#        define BOOST_PP_ITERATION_2 162
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 163 && BOOST_PP_ITERATION_FINISH_2 >= 163
+#        define BOOST_PP_ITERATION_2 163
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 164 && BOOST_PP_ITERATION_FINISH_2 >= 164
+#        define BOOST_PP_ITERATION_2 164
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 165 && BOOST_PP_ITERATION_FINISH_2 >= 165
+#        define BOOST_PP_ITERATION_2 165
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 166 && BOOST_PP_ITERATION_FINISH_2 >= 166
+#        define BOOST_PP_ITERATION_2 166
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 167 && BOOST_PP_ITERATION_FINISH_2 >= 167
+#        define BOOST_PP_ITERATION_2 167
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 168 && BOOST_PP_ITERATION_FINISH_2 >= 168
+#        define BOOST_PP_ITERATION_2 168
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 169 && BOOST_PP_ITERATION_FINISH_2 >= 169
+#        define BOOST_PP_ITERATION_2 169
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 170 && BOOST_PP_ITERATION_FINISH_2 >= 170
+#        define BOOST_PP_ITERATION_2 170
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 171 && BOOST_PP_ITERATION_FINISH_2 >= 171
+#        define BOOST_PP_ITERATION_2 171
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 172 && BOOST_PP_ITERATION_FINISH_2 >= 172
+#        define BOOST_PP_ITERATION_2 172
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 173 && BOOST_PP_ITERATION_FINISH_2 >= 173
+#        define BOOST_PP_ITERATION_2 173
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 174 && BOOST_PP_ITERATION_FINISH_2 >= 174
+#        define BOOST_PP_ITERATION_2 174
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 175 && BOOST_PP_ITERATION_FINISH_2 >= 175
+#        define BOOST_PP_ITERATION_2 175
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 176 && BOOST_PP_ITERATION_FINISH_2 >= 176
+#        define BOOST_PP_ITERATION_2 176
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 177 && BOOST_PP_ITERATION_FINISH_2 >= 177
+#        define BOOST_PP_ITERATION_2 177
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 178 && BOOST_PP_ITERATION_FINISH_2 >= 178
+#        define BOOST_PP_ITERATION_2 178
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 179 && BOOST_PP_ITERATION_FINISH_2 >= 179
+#        define BOOST_PP_ITERATION_2 179
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 180 && BOOST_PP_ITERATION_FINISH_2 >= 180
+#        define BOOST_PP_ITERATION_2 180
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 181 && BOOST_PP_ITERATION_FINISH_2 >= 181
+#        define BOOST_PP_ITERATION_2 181
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 182 && BOOST_PP_ITERATION_FINISH_2 >= 182
+#        define BOOST_PP_ITERATION_2 182
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 183 && BOOST_PP_ITERATION_FINISH_2 >= 183
+#        define BOOST_PP_ITERATION_2 183
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 184 && BOOST_PP_ITERATION_FINISH_2 >= 184
+#        define BOOST_PP_ITERATION_2 184
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 185 && BOOST_PP_ITERATION_FINISH_2 >= 185
+#        define BOOST_PP_ITERATION_2 185
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 186 && BOOST_PP_ITERATION_FINISH_2 >= 186
+#        define BOOST_PP_ITERATION_2 186
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 187 && BOOST_PP_ITERATION_FINISH_2 >= 187
+#        define BOOST_PP_ITERATION_2 187
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 188 && BOOST_PP_ITERATION_FINISH_2 >= 188
+#        define BOOST_PP_ITERATION_2 188
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 189 && BOOST_PP_ITERATION_FINISH_2 >= 189
+#        define BOOST_PP_ITERATION_2 189
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 190 && BOOST_PP_ITERATION_FINISH_2 >= 190
+#        define BOOST_PP_ITERATION_2 190
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 191 && BOOST_PP_ITERATION_FINISH_2 >= 191
+#        define BOOST_PP_ITERATION_2 191
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 192 && BOOST_PP_ITERATION_FINISH_2 >= 192
+#        define BOOST_PP_ITERATION_2 192
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 193 && BOOST_PP_ITERATION_FINISH_2 >= 193
+#        define BOOST_PP_ITERATION_2 193
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 194 && BOOST_PP_ITERATION_FINISH_2 >= 194
+#        define BOOST_PP_ITERATION_2 194
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 195 && BOOST_PP_ITERATION_FINISH_2 >= 195
+#        define BOOST_PP_ITERATION_2 195
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 196 && BOOST_PP_ITERATION_FINISH_2 >= 196
+#        define BOOST_PP_ITERATION_2 196
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 197 && BOOST_PP_ITERATION_FINISH_2 >= 197
+#        define BOOST_PP_ITERATION_2 197
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 198 && BOOST_PP_ITERATION_FINISH_2 >= 198
+#        define BOOST_PP_ITERATION_2 198
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 199 && BOOST_PP_ITERATION_FINISH_2 >= 199
+#        define BOOST_PP_ITERATION_2 199
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 200 && BOOST_PP_ITERATION_FINISH_2 >= 200
+#        define BOOST_PP_ITERATION_2 200
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 201 && BOOST_PP_ITERATION_FINISH_2 >= 201
+#        define BOOST_PP_ITERATION_2 201
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 202 && BOOST_PP_ITERATION_FINISH_2 >= 202
+#        define BOOST_PP_ITERATION_2 202
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 203 && BOOST_PP_ITERATION_FINISH_2 >= 203
+#        define BOOST_PP_ITERATION_2 203
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 204 && BOOST_PP_ITERATION_FINISH_2 >= 204
+#        define BOOST_PP_ITERATION_2 204
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 205 && BOOST_PP_ITERATION_FINISH_2 >= 205
+#        define BOOST_PP_ITERATION_2 205
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 206 && BOOST_PP_ITERATION_FINISH_2 >= 206
+#        define BOOST_PP_ITERATION_2 206
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 207 && BOOST_PP_ITERATION_FINISH_2 >= 207
+#        define BOOST_PP_ITERATION_2 207
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 208 && BOOST_PP_ITERATION_FINISH_2 >= 208
+#        define BOOST_PP_ITERATION_2 208
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 209 && BOOST_PP_ITERATION_FINISH_2 >= 209
+#        define BOOST_PP_ITERATION_2 209
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 210 && BOOST_PP_ITERATION_FINISH_2 >= 210
+#        define BOOST_PP_ITERATION_2 210
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 211 && BOOST_PP_ITERATION_FINISH_2 >= 211
+#        define BOOST_PP_ITERATION_2 211
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 212 && BOOST_PP_ITERATION_FINISH_2 >= 212
+#        define BOOST_PP_ITERATION_2 212
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 213 && BOOST_PP_ITERATION_FINISH_2 >= 213
+#        define BOOST_PP_ITERATION_2 213
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 214 && BOOST_PP_ITERATION_FINISH_2 >= 214
+#        define BOOST_PP_ITERATION_2 214
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 215 && BOOST_PP_ITERATION_FINISH_2 >= 215
+#        define BOOST_PP_ITERATION_2 215
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 216 && BOOST_PP_ITERATION_FINISH_2 >= 216
+#        define BOOST_PP_ITERATION_2 216
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 217 && BOOST_PP_ITERATION_FINISH_2 >= 217
+#        define BOOST_PP_ITERATION_2 217
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 218 && BOOST_PP_ITERATION_FINISH_2 >= 218
+#        define BOOST_PP_ITERATION_2 218
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 219 && BOOST_PP_ITERATION_FINISH_2 >= 219
+#        define BOOST_PP_ITERATION_2 219
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 220 && BOOST_PP_ITERATION_FINISH_2 >= 220
+#        define BOOST_PP_ITERATION_2 220
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 221 && BOOST_PP_ITERATION_FINISH_2 >= 221
+#        define BOOST_PP_ITERATION_2 221
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 222 && BOOST_PP_ITERATION_FINISH_2 >= 222
+#        define BOOST_PP_ITERATION_2 222
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 223 && BOOST_PP_ITERATION_FINISH_2 >= 223
+#        define BOOST_PP_ITERATION_2 223
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 224 && BOOST_PP_ITERATION_FINISH_2 >= 224
+#        define BOOST_PP_ITERATION_2 224
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 225 && BOOST_PP_ITERATION_FINISH_2 >= 225
+#        define BOOST_PP_ITERATION_2 225
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 226 && BOOST_PP_ITERATION_FINISH_2 >= 226
+#        define BOOST_PP_ITERATION_2 226
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 227 && BOOST_PP_ITERATION_FINISH_2 >= 227
+#        define BOOST_PP_ITERATION_2 227
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 228 && BOOST_PP_ITERATION_FINISH_2 >= 228
+#        define BOOST_PP_ITERATION_2 228
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 229 && BOOST_PP_ITERATION_FINISH_2 >= 229
+#        define BOOST_PP_ITERATION_2 229
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 230 && BOOST_PP_ITERATION_FINISH_2 >= 230
+#        define BOOST_PP_ITERATION_2 230
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 231 && BOOST_PP_ITERATION_FINISH_2 >= 231
+#        define BOOST_PP_ITERATION_2 231
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 232 && BOOST_PP_ITERATION_FINISH_2 >= 232
+#        define BOOST_PP_ITERATION_2 232
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 233 && BOOST_PP_ITERATION_FINISH_2 >= 233
+#        define BOOST_PP_ITERATION_2 233
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 234 && BOOST_PP_ITERATION_FINISH_2 >= 234
+#        define BOOST_PP_ITERATION_2 234
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 235 && BOOST_PP_ITERATION_FINISH_2 >= 235
+#        define BOOST_PP_ITERATION_2 235
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 236 && BOOST_PP_ITERATION_FINISH_2 >= 236
+#        define BOOST_PP_ITERATION_2 236
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 237 && BOOST_PP_ITERATION_FINISH_2 >= 237
+#        define BOOST_PP_ITERATION_2 237
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 238 && BOOST_PP_ITERATION_FINISH_2 >= 238
+#        define BOOST_PP_ITERATION_2 238
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 239 && BOOST_PP_ITERATION_FINISH_2 >= 239
+#        define BOOST_PP_ITERATION_2 239
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 240 && BOOST_PP_ITERATION_FINISH_2 >= 240
+#        define BOOST_PP_ITERATION_2 240
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 241 && BOOST_PP_ITERATION_FINISH_2 >= 241
+#        define BOOST_PP_ITERATION_2 241
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 242 && BOOST_PP_ITERATION_FINISH_2 >= 242
+#        define BOOST_PP_ITERATION_2 242
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 243 && BOOST_PP_ITERATION_FINISH_2 >= 243
+#        define BOOST_PP_ITERATION_2 243
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 244 && BOOST_PP_ITERATION_FINISH_2 >= 244
+#        define BOOST_PP_ITERATION_2 244
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 245 && BOOST_PP_ITERATION_FINISH_2 >= 245
+#        define BOOST_PP_ITERATION_2 245
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 246 && BOOST_PP_ITERATION_FINISH_2 >= 246
+#        define BOOST_PP_ITERATION_2 246
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 247 && BOOST_PP_ITERATION_FINISH_2 >= 247
+#        define BOOST_PP_ITERATION_2 247
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 248 && BOOST_PP_ITERATION_FINISH_2 >= 248
+#        define BOOST_PP_ITERATION_2 248
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 249 && BOOST_PP_ITERATION_FINISH_2 >= 249
+#        define BOOST_PP_ITERATION_2 249
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 250 && BOOST_PP_ITERATION_FINISH_2 >= 250
+#        define BOOST_PP_ITERATION_2 250
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 251 && BOOST_PP_ITERATION_FINISH_2 >= 251
+#        define BOOST_PP_ITERATION_2 251
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 252 && BOOST_PP_ITERATION_FINISH_2 >= 252
+#        define BOOST_PP_ITERATION_2 252
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 253 && BOOST_PP_ITERATION_FINISH_2 >= 253
+#        define BOOST_PP_ITERATION_2 253
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 254 && BOOST_PP_ITERATION_FINISH_2 >= 254
+#        define BOOST_PP_ITERATION_2 254
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 255 && BOOST_PP_ITERATION_FINISH_2 >= 255
+#        define BOOST_PP_ITERATION_2 255
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+#    if BOOST_PP_ITERATION_START_2 <= 256 && BOOST_PP_ITERATION_FINISH_2 >= 256
+#        define BOOST_PP_ITERATION_2 256
+#        include BOOST_PP_FILENAME_2
+#        undef BOOST_PP_ITERATION_2
+#    endif
+# endif
+#
+# undef BOOST_PP_ITERATION_DEPTH
+# define BOOST_PP_ITERATION_DEPTH() 1
+#
+# undef BOOST_PP_ITERATION_START_2
+# undef BOOST_PP_ITERATION_FINISH_2
+# undef BOOST_PP_FILENAME_2
+#
+# undef BOOST_PP_ITERATION_FLAGS_2
+# undef BOOST_PP_ITERATION_PARAMS_2
diff --git a/ext/boost/preprocessor/iteration/detail/iter/reverse1.hpp b/ext/boost/preprocessor/iteration/detail/iter/reverse1.hpp
new file mode 100644
index 0000000..bf88d2f
--- /dev/null
+++ b/ext/boost/preprocessor/iteration/detail/iter/reverse1.hpp
@@ -0,0 +1,1296 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Paul Mensonides 2002.
+#  *     Distributed under the Boost Software License, Version 1.0. (See
+#  *     accompanying file LICENSE_1_0.txt or copy at
+#  *     http://www.boost.org/LICENSE_1_0.txt)
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# if BOOST_PP_ITERATION_FINISH_1 <= 256 && BOOST_PP_ITERATION_START_1 >= 256
+#    define BOOST_PP_ITERATION_1 256
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 255 && BOOST_PP_ITERATION_START_1 >= 255
+#    define BOOST_PP_ITERATION_1 255
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 254 && BOOST_PP_ITERATION_START_1 >= 254
+#    define BOOST_PP_ITERATION_1 254
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 253 && BOOST_PP_ITERATION_START_1 >= 253
+#    define BOOST_PP_ITERATION_1 253
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 252 && BOOST_PP_ITERATION_START_1 >= 252
+#    define BOOST_PP_ITERATION_1 252
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 251 && BOOST_PP_ITERATION_START_1 >= 251
+#    define BOOST_PP_ITERATION_1 251
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 250 && BOOST_PP_ITERATION_START_1 >= 250
+#    define BOOST_PP_ITERATION_1 250
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 249 && BOOST_PP_ITERATION_START_1 >= 249
+#    define BOOST_PP_ITERATION_1 249
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 248 && BOOST_PP_ITERATION_START_1 >= 248
+#    define BOOST_PP_ITERATION_1 248
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 247 && BOOST_PP_ITERATION_START_1 >= 247
+#    define BOOST_PP_ITERATION_1 247
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 246 && BOOST_PP_ITERATION_START_1 >= 246
+#    define BOOST_PP_ITERATION_1 246
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 245 && BOOST_PP_ITERATION_START_1 >= 245
+#    define BOOST_PP_ITERATION_1 245
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 244 && BOOST_PP_ITERATION_START_1 >= 244
+#    define BOOST_PP_ITERATION_1 244
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 243 && BOOST_PP_ITERATION_START_1 >= 243
+#    define BOOST_PP_ITERATION_1 243
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 242 && BOOST_PP_ITERATION_START_1 >= 242
+#    define BOOST_PP_ITERATION_1 242
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 241 && BOOST_PP_ITERATION_START_1 >= 241
+#    define BOOST_PP_ITERATION_1 241
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 240 && BOOST_PP_ITERATION_START_1 >= 240
+#    define BOOST_PP_ITERATION_1 240
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 239 && BOOST_PP_ITERATION_START_1 >= 239
+#    define BOOST_PP_ITERATION_1 239
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 238 && BOOST_PP_ITERATION_START_1 >= 238
+#    define BOOST_PP_ITERATION_1 238
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 237 && BOOST_PP_ITERATION_START_1 >= 237
+#    define BOOST_PP_ITERATION_1 237
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 236 && BOOST_PP_ITERATION_START_1 >= 236
+#    define BOOST_PP_ITERATION_1 236
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 235 && BOOST_PP_ITERATION_START_1 >= 235
+#    define BOOST_PP_ITERATION_1 235
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 234 && BOOST_PP_ITERATION_START_1 >= 234
+#    define BOOST_PP_ITERATION_1 234
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 233 && BOOST_PP_ITERATION_START_1 >= 233
+#    define BOOST_PP_ITERATION_1 233
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 232 && BOOST_PP_ITERATION_START_1 >= 232
+#    define BOOST_PP_ITERATION_1 232
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 231 && BOOST_PP_ITERATION_START_1 >= 231
+#    define BOOST_PP_ITERATION_1 231
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 230 && BOOST_PP_ITERATION_START_1 >= 230
+#    define BOOST_PP_ITERATION_1 230
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 229 && BOOST_PP_ITERATION_START_1 >= 229
+#    define BOOST_PP_ITERATION_1 229
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 228 && BOOST_PP_ITERATION_START_1 >= 228
+#    define BOOST_PP_ITERATION_1 228
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 227 && BOOST_PP_ITERATION_START_1 >= 227
+#    define BOOST_PP_ITERATION_1 227
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 226 && BOOST_PP_ITERATION_START_1 >= 226
+#    define BOOST_PP_ITERATION_1 226
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 225 && BOOST_PP_ITERATION_START_1 >= 225
+#    define BOOST_PP_ITERATION_1 225
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 224 && BOOST_PP_ITERATION_START_1 >= 224
+#    define BOOST_PP_ITERATION_1 224
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 223 && BOOST_PP_ITERATION_START_1 >= 223
+#    define BOOST_PP_ITERATION_1 223
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 222 && BOOST_PP_ITERATION_START_1 >= 222
+#    define BOOST_PP_ITERATION_1 222
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 221 && BOOST_PP_ITERATION_START_1 >= 221
+#    define BOOST_PP_ITERATION_1 221
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 220 && BOOST_PP_ITERATION_START_1 >= 220
+#    define BOOST_PP_ITERATION_1 220
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 219 && BOOST_PP_ITERATION_START_1 >= 219
+#    define BOOST_PP_ITERATION_1 219
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 218 && BOOST_PP_ITERATION_START_1 >= 218
+#    define BOOST_PP_ITERATION_1 218
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 217 && BOOST_PP_ITERATION_START_1 >= 217
+#    define BOOST_PP_ITERATION_1 217
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 216 && BOOST_PP_ITERATION_START_1 >= 216
+#    define BOOST_PP_ITERATION_1 216
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 215 && BOOST_PP_ITERATION_START_1 >= 215
+#    define BOOST_PP_ITERATION_1 215
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 214 && BOOST_PP_ITERATION_START_1 >= 214
+#    define BOOST_PP_ITERATION_1 214
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 213 && BOOST_PP_ITERATION_START_1 >= 213
+#    define BOOST_PP_ITERATION_1 213
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 212 && BOOST_PP_ITERATION_START_1 >= 212
+#    define BOOST_PP_ITERATION_1 212
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 211 && BOOST_PP_ITERATION_START_1 >= 211
+#    define BOOST_PP_ITERATION_1 211
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 210 && BOOST_PP_ITERATION_START_1 >= 210
+#    define BOOST_PP_ITERATION_1 210
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 209 && BOOST_PP_ITERATION_START_1 >= 209
+#    define BOOST_PP_ITERATION_1 209
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 208 && BOOST_PP_ITERATION_START_1 >= 208
+#    define BOOST_PP_ITERATION_1 208
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 207 && BOOST_PP_ITERATION_START_1 >= 207
+#    define BOOST_PP_ITERATION_1 207
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 206 && BOOST_PP_ITERATION_START_1 >= 206
+#    define BOOST_PP_ITERATION_1 206
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 205 && BOOST_PP_ITERATION_START_1 >= 205
+#    define BOOST_PP_ITERATION_1 205
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 204 && BOOST_PP_ITERATION_START_1 >= 204
+#    define BOOST_PP_ITERATION_1 204
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 203 && BOOST_PP_ITERATION_START_1 >= 203
+#    define BOOST_PP_ITERATION_1 203
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 202 && BOOST_PP_ITERATION_START_1 >= 202
+#    define BOOST_PP_ITERATION_1 202
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 201 && BOOST_PP_ITERATION_START_1 >= 201
+#    define BOOST_PP_ITERATION_1 201
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 200 && BOOST_PP_ITERATION_START_1 >= 200
+#    define BOOST_PP_ITERATION_1 200
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 199 && BOOST_PP_ITERATION_START_1 >= 199
+#    define BOOST_PP_ITERATION_1 199
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 198 && BOOST_PP_ITERATION_START_1 >= 198
+#    define BOOST_PP_ITERATION_1 198
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 197 && BOOST_PP_ITERATION_START_1 >= 197
+#    define BOOST_PP_ITERATION_1 197
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 196 && BOOST_PP_ITERATION_START_1 >= 196
+#    define BOOST_PP_ITERATION_1 196
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 195 && BOOST_PP_ITERATION_START_1 >= 195
+#    define BOOST_PP_ITERATION_1 195
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 194 && BOOST_PP_ITERATION_START_1 >= 194
+#    define BOOST_PP_ITERATION_1 194
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 193 && BOOST_PP_ITERATION_START_1 >= 193
+#    define BOOST_PP_ITERATION_1 193
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 192 && BOOST_PP_ITERATION_START_1 >= 192
+#    define BOOST_PP_ITERATION_1 192
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 191 && BOOST_PP_ITERATION_START_1 >= 191
+#    define BOOST_PP_ITERATION_1 191
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 190 && BOOST_PP_ITERATION_START_1 >= 190
+#    define BOOST_PP_ITERATION_1 190
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 189 && BOOST_PP_ITERATION_START_1 >= 189
+#    define BOOST_PP_ITERATION_1 189
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 188 && BOOST_PP_ITERATION_START_1 >= 188
+#    define BOOST_PP_ITERATION_1 188
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 187 && BOOST_PP_ITERATION_START_1 >= 187
+#    define BOOST_PP_ITERATION_1 187
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 186 && BOOST_PP_ITERATION_START_1 >= 186
+#    define BOOST_PP_ITERATION_1 186
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 185 && BOOST_PP_ITERATION_START_1 >= 185
+#    define BOOST_PP_ITERATION_1 185
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 184 && BOOST_PP_ITERATION_START_1 >= 184
+#    define BOOST_PP_ITERATION_1 184
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 183 && BOOST_PP_ITERATION_START_1 >= 183
+#    define BOOST_PP_ITERATION_1 183
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 182 && BOOST_PP_ITERATION_START_1 >= 182
+#    define BOOST_PP_ITERATION_1 182
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 181 && BOOST_PP_ITERATION_START_1 >= 181
+#    define BOOST_PP_ITERATION_1 181
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 180 && BOOST_PP_ITERATION_START_1 >= 180
+#    define BOOST_PP_ITERATION_1 180
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 179 && BOOST_PP_ITERATION_START_1 >= 179
+#    define BOOST_PP_ITERATION_1 179
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 178 && BOOST_PP_ITERATION_START_1 >= 178
+#    define BOOST_PP_ITERATION_1 178
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 177 && BOOST_PP_ITERATION_START_1 >= 177
+#    define BOOST_PP_ITERATION_1 177
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 176 && BOOST_PP_ITERATION_START_1 >= 176
+#    define BOOST_PP_ITERATION_1 176
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 175 && BOOST_PP_ITERATION_START_1 >= 175
+#    define BOOST_PP_ITERATION_1 175
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 174 && BOOST_PP_ITERATION_START_1 >= 174
+#    define BOOST_PP_ITERATION_1 174
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 173 && BOOST_PP_ITERATION_START_1 >= 173
+#    define BOOST_PP_ITERATION_1 173
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 172 && BOOST_PP_ITERATION_START_1 >= 172
+#    define BOOST_PP_ITERATION_1 172
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 171 && BOOST_PP_ITERATION_START_1 >= 171
+#    define BOOST_PP_ITERATION_1 171
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 170 && BOOST_PP_ITERATION_START_1 >= 170
+#    define BOOST_PP_ITERATION_1 170
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 169 && BOOST_PP_ITERATION_START_1 >= 169
+#    define BOOST_PP_ITERATION_1 169
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 168 && BOOST_PP_ITERATION_START_1 >= 168
+#    define BOOST_PP_ITERATION_1 168
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 167 && BOOST_PP_ITERATION_START_1 >= 167
+#    define BOOST_PP_ITERATION_1 167
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 166 && BOOST_PP_ITERATION_START_1 >= 166
+#    define BOOST_PP_ITERATION_1 166
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 165 && BOOST_PP_ITERATION_START_1 >= 165
+#    define BOOST_PP_ITERATION_1 165
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 164 && BOOST_PP_ITERATION_START_1 >= 164
+#    define BOOST_PP_ITERATION_1 164
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 163 && BOOST_PP_ITERATION_START_1 >= 163
+#    define BOOST_PP_ITERATION_1 163
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 162 && BOOST_PP_ITERATION_START_1 >= 162
+#    define BOOST_PP_ITERATION_1 162
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 161 && BOOST_PP_ITERATION_START_1 >= 161
+#    define BOOST_PP_ITERATION_1 161
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 160 && BOOST_PP_ITERATION_START_1 >= 160
+#    define BOOST_PP_ITERATION_1 160
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 159 && BOOST_PP_ITERATION_START_1 >= 159
+#    define BOOST_PP_ITERATION_1 159
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 158 && BOOST_PP_ITERATION_START_1 >= 158
+#    define BOOST_PP_ITERATION_1 158
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 157 && BOOST_PP_ITERATION_START_1 >= 157
+#    define BOOST_PP_ITERATION_1 157
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 156 && BOOST_PP_ITERATION_START_1 >= 156
+#    define BOOST_PP_ITERATION_1 156
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 155 && BOOST_PP_ITERATION_START_1 >= 155
+#    define BOOST_PP_ITERATION_1 155
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 154 && BOOST_PP_ITERATION_START_1 >= 154
+#    define BOOST_PP_ITERATION_1 154
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 153 && BOOST_PP_ITERATION_START_1 >= 153
+#    define BOOST_PP_ITERATION_1 153
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 152 && BOOST_PP_ITERATION_START_1 >= 152
+#    define BOOST_PP_ITERATION_1 152
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 151 && BOOST_PP_ITERATION_START_1 >= 151
+#    define BOOST_PP_ITERATION_1 151
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 150 && BOOST_PP_ITERATION_START_1 >= 150
+#    define BOOST_PP_ITERATION_1 150
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 149 && BOOST_PP_ITERATION_START_1 >= 149
+#    define BOOST_PP_ITERATION_1 149
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 148 && BOOST_PP_ITERATION_START_1 >= 148
+#    define BOOST_PP_ITERATION_1 148
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 147 && BOOST_PP_ITERATION_START_1 >= 147
+#    define BOOST_PP_ITERATION_1 147
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 146 && BOOST_PP_ITERATION_START_1 >= 146
+#    define BOOST_PP_ITERATION_1 146
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 145 && BOOST_PP_ITERATION_START_1 >= 145
+#    define BOOST_PP_ITERATION_1 145
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 144 && BOOST_PP_ITERATION_START_1 >= 144
+#    define BOOST_PP_ITERATION_1 144
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 143 && BOOST_PP_ITERATION_START_1 >= 143
+#    define BOOST_PP_ITERATION_1 143
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 142 && BOOST_PP_ITERATION_START_1 >= 142
+#    define BOOST_PP_ITERATION_1 142
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 141 && BOOST_PP_ITERATION_START_1 >= 141
+#    define BOOST_PP_ITERATION_1 141
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 140 && BOOST_PP_ITERATION_START_1 >= 140
+#    define BOOST_PP_ITERATION_1 140
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 139 && BOOST_PP_ITERATION_START_1 >= 139
+#    define BOOST_PP_ITERATION_1 139
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 138 && BOOST_PP_ITERATION_START_1 >= 138
+#    define BOOST_PP_ITERATION_1 138
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 137 && BOOST_PP_ITERATION_START_1 >= 137
+#    define BOOST_PP_ITERATION_1 137
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 136 && BOOST_PP_ITERATION_START_1 >= 136
+#    define BOOST_PP_ITERATION_1 136
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 135 && BOOST_PP_ITERATION_START_1 >= 135
+#    define BOOST_PP_ITERATION_1 135
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 134 && BOOST_PP_ITERATION_START_1 >= 134
+#    define BOOST_PP_ITERATION_1 134
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 133 && BOOST_PP_ITERATION_START_1 >= 133
+#    define BOOST_PP_ITERATION_1 133
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 132 && BOOST_PP_ITERATION_START_1 >= 132
+#    define BOOST_PP_ITERATION_1 132
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 131 && BOOST_PP_ITERATION_START_1 >= 131
+#    define BOOST_PP_ITERATION_1 131
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 130 && BOOST_PP_ITERATION_START_1 >= 130
+#    define BOOST_PP_ITERATION_1 130
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 129 && BOOST_PP_ITERATION_START_1 >= 129
+#    define BOOST_PP_ITERATION_1 129
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 128 && BOOST_PP_ITERATION_START_1 >= 128
+#    define BOOST_PP_ITERATION_1 128
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 127 && BOOST_PP_ITERATION_START_1 >= 127
+#    define BOOST_PP_ITERATION_1 127
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 126 && BOOST_PP_ITERATION_START_1 >= 126
+#    define BOOST_PP_ITERATION_1 126
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 125 && BOOST_PP_ITERATION_START_1 >= 125
+#    define BOOST_PP_ITERATION_1 125
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 124 && BOOST_PP_ITERATION_START_1 >= 124
+#    define BOOST_PP_ITERATION_1 124
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 123 && BOOST_PP_ITERATION_START_1 >= 123
+#    define BOOST_PP_ITERATION_1 123
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 122 && BOOST_PP_ITERATION_START_1 >= 122
+#    define BOOST_PP_ITERATION_1 122
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 121 && BOOST_PP_ITERATION_START_1 >= 121
+#    define BOOST_PP_ITERATION_1 121
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 120 && BOOST_PP_ITERATION_START_1 >= 120
+#    define BOOST_PP_ITERATION_1 120
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 119 && BOOST_PP_ITERATION_START_1 >= 119
+#    define BOOST_PP_ITERATION_1 119
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 118 && BOOST_PP_ITERATION_START_1 >= 118
+#    define BOOST_PP_ITERATION_1 118
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 117 && BOOST_PP_ITERATION_START_1 >= 117
+#    define BOOST_PP_ITERATION_1 117
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 116 && BOOST_PP_ITERATION_START_1 >= 116
+#    define BOOST_PP_ITERATION_1 116
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 115 && BOOST_PP_ITERATION_START_1 >= 115
+#    define BOOST_PP_ITERATION_1 115
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 114 && BOOST_PP_ITERATION_START_1 >= 114
+#    define BOOST_PP_ITERATION_1 114
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 113 && BOOST_PP_ITERATION_START_1 >= 113
+#    define BOOST_PP_ITERATION_1 113
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 112 && BOOST_PP_ITERATION_START_1 >= 112
+#    define BOOST_PP_ITERATION_1 112
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 111 && BOOST_PP_ITERATION_START_1 >= 111
+#    define BOOST_PP_ITERATION_1 111
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 110 && BOOST_PP_ITERATION_START_1 >= 110
+#    define BOOST_PP_ITERATION_1 110
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 109 && BOOST_PP_ITERATION_START_1 >= 109
+#    define BOOST_PP_ITERATION_1 109
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 108 && BOOST_PP_ITERATION_START_1 >= 108
+#    define BOOST_PP_ITERATION_1 108
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 107 && BOOST_PP_ITERATION_START_1 >= 107
+#    define BOOST_PP_ITERATION_1 107
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 106 && BOOST_PP_ITERATION_START_1 >= 106
+#    define BOOST_PP_ITERATION_1 106
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 105 && BOOST_PP_ITERATION_START_1 >= 105
+#    define BOOST_PP_ITERATION_1 105
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 104 && BOOST_PP_ITERATION_START_1 >= 104
+#    define BOOST_PP_ITERATION_1 104
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 103 && BOOST_PP_ITERATION_START_1 >= 103
+#    define BOOST_PP_ITERATION_1 103
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 102 && BOOST_PP_ITERATION_START_1 >= 102
+#    define BOOST_PP_ITERATION_1 102
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 101 && BOOST_PP_ITERATION_START_1 >= 101
+#    define BOOST_PP_ITERATION_1 101
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 100 && BOOST_PP_ITERATION_START_1 >= 100
+#    define BOOST_PP_ITERATION_1 100
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 99 && BOOST_PP_ITERATION_START_1 >= 99
+#    define BOOST_PP_ITERATION_1 99
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 98 && BOOST_PP_ITERATION_START_1 >= 98
+#    define BOOST_PP_ITERATION_1 98
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 97 && BOOST_PP_ITERATION_START_1 >= 97
+#    define BOOST_PP_ITERATION_1 97
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 96 && BOOST_PP_ITERATION_START_1 >= 96
+#    define BOOST_PP_ITERATION_1 96
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 95 && BOOST_PP_ITERATION_START_1 >= 95
+#    define BOOST_PP_ITERATION_1 95
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 94 && BOOST_PP_ITERATION_START_1 >= 94
+#    define BOOST_PP_ITERATION_1 94
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 93 && BOOST_PP_ITERATION_START_1 >= 93
+#    define BOOST_PP_ITERATION_1 93
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 92 && BOOST_PP_ITERATION_START_1 >= 92
+#    define BOOST_PP_ITERATION_1 92
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 91 && BOOST_PP_ITERATION_START_1 >= 91
+#    define BOOST_PP_ITERATION_1 91
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 90 && BOOST_PP_ITERATION_START_1 >= 90
+#    define BOOST_PP_ITERATION_1 90
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 89 && BOOST_PP_ITERATION_START_1 >= 89
+#    define BOOST_PP_ITERATION_1 89
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 88 && BOOST_PP_ITERATION_START_1 >= 88
+#    define BOOST_PP_ITERATION_1 88
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 87 && BOOST_PP_ITERATION_START_1 >= 87
+#    define BOOST_PP_ITERATION_1 87
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 86 && BOOST_PP_ITERATION_START_1 >= 86
+#    define BOOST_PP_ITERATION_1 86
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 85 && BOOST_PP_ITERATION_START_1 >= 85
+#    define BOOST_PP_ITERATION_1 85
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 84 && BOOST_PP_ITERATION_START_1 >= 84
+#    define BOOST_PP_ITERATION_1 84
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 83 && BOOST_PP_ITERATION_START_1 >= 83
+#    define BOOST_PP_ITERATION_1 83
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 82 && BOOST_PP_ITERATION_START_1 >= 82
+#    define BOOST_PP_ITERATION_1 82
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 81 && BOOST_PP_ITERATION_START_1 >= 81
+#    define BOOST_PP_ITERATION_1 81
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 80 && BOOST_PP_ITERATION_START_1 >= 80
+#    define BOOST_PP_ITERATION_1 80
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 79 && BOOST_PP_ITERATION_START_1 >= 79
+#    define BOOST_PP_ITERATION_1 79
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 78 && BOOST_PP_ITERATION_START_1 >= 78
+#    define BOOST_PP_ITERATION_1 78
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 77 && BOOST_PP_ITERATION_START_1 >= 77
+#    define BOOST_PP_ITERATION_1 77
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 76 && BOOST_PP_ITERATION_START_1 >= 76
+#    define BOOST_PP_ITERATION_1 76
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 75 && BOOST_PP_ITERATION_START_1 >= 75
+#    define BOOST_PP_ITERATION_1 75
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 74 && BOOST_PP_ITERATION_START_1 >= 74
+#    define BOOST_PP_ITERATION_1 74
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 73 && BOOST_PP_ITERATION_START_1 >= 73
+#    define BOOST_PP_ITERATION_1 73
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 72 && BOOST_PP_ITERATION_START_1 >= 72
+#    define BOOST_PP_ITERATION_1 72
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 71 && BOOST_PP_ITERATION_START_1 >= 71
+#    define BOOST_PP_ITERATION_1 71
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 70 && BOOST_PP_ITERATION_START_1 >= 70
+#    define BOOST_PP_ITERATION_1 70
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 69 && BOOST_PP_ITERATION_START_1 >= 69
+#    define BOOST_PP_ITERATION_1 69
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 68 && BOOST_PP_ITERATION_START_1 >= 68
+#    define BOOST_PP_ITERATION_1 68
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 67 && BOOST_PP_ITERATION_START_1 >= 67
+#    define BOOST_PP_ITERATION_1 67
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 66 && BOOST_PP_ITERATION_START_1 >= 66
+#    define BOOST_PP_ITERATION_1 66
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 65 && BOOST_PP_ITERATION_START_1 >= 65
+#    define BOOST_PP_ITERATION_1 65
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 64 && BOOST_PP_ITERATION_START_1 >= 64
+#    define BOOST_PP_ITERATION_1 64
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 63 && BOOST_PP_ITERATION_START_1 >= 63
+#    define BOOST_PP_ITERATION_1 63
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 62 && BOOST_PP_ITERATION_START_1 >= 62
+#    define BOOST_PP_ITERATION_1 62
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 61 && BOOST_PP_ITERATION_START_1 >= 61
+#    define BOOST_PP_ITERATION_1 61
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 60 && BOOST_PP_ITERATION_START_1 >= 60
+#    define BOOST_PP_ITERATION_1 60
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 59 && BOOST_PP_ITERATION_START_1 >= 59
+#    define BOOST_PP_ITERATION_1 59
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 58 && BOOST_PP_ITERATION_START_1 >= 58
+#    define BOOST_PP_ITERATION_1 58
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 57 && BOOST_PP_ITERATION_START_1 >= 57
+#    define BOOST_PP_ITERATION_1 57
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 56 && BOOST_PP_ITERATION_START_1 >= 56
+#    define BOOST_PP_ITERATION_1 56
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 55 && BOOST_PP_ITERATION_START_1 >= 55
+#    define BOOST_PP_ITERATION_1 55
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 54 && BOOST_PP_ITERATION_START_1 >= 54
+#    define BOOST_PP_ITERATION_1 54
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 53 && BOOST_PP_ITERATION_START_1 >= 53
+#    define BOOST_PP_ITERATION_1 53
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 52 && BOOST_PP_ITERATION_START_1 >= 52
+#    define BOOST_PP_ITERATION_1 52
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 51 && BOOST_PP_ITERATION_START_1 >= 51
+#    define BOOST_PP_ITERATION_1 51
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 50 && BOOST_PP_ITERATION_START_1 >= 50
+#    define BOOST_PP_ITERATION_1 50
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 49 && BOOST_PP_ITERATION_START_1 >= 49
+#    define BOOST_PP_ITERATION_1 49
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 48 && BOOST_PP_ITERATION_START_1 >= 48
+#    define BOOST_PP_ITERATION_1 48
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 47 && BOOST_PP_ITERATION_START_1 >= 47
+#    define BOOST_PP_ITERATION_1 47
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 46 && BOOST_PP_ITERATION_START_1 >= 46
+#    define BOOST_PP_ITERATION_1 46
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 45 && BOOST_PP_ITERATION_START_1 >= 45
+#    define BOOST_PP_ITERATION_1 45
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 44 && BOOST_PP_ITERATION_START_1 >= 44
+#    define BOOST_PP_ITERATION_1 44
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 43 && BOOST_PP_ITERATION_START_1 >= 43
+#    define BOOST_PP_ITERATION_1 43
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 42 && BOOST_PP_ITERATION_START_1 >= 42
+#    define BOOST_PP_ITERATION_1 42
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 41 && BOOST_PP_ITERATION_START_1 >= 41
+#    define BOOST_PP_ITERATION_1 41
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 40 && BOOST_PP_ITERATION_START_1 >= 40
+#    define BOOST_PP_ITERATION_1 40
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 39 && BOOST_PP_ITERATION_START_1 >= 39
+#    define BOOST_PP_ITERATION_1 39
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 38 && BOOST_PP_ITERATION_START_1 >= 38
+#    define BOOST_PP_ITERATION_1 38
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 37 && BOOST_PP_ITERATION_START_1 >= 37
+#    define BOOST_PP_ITERATION_1 37
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 36 && BOOST_PP_ITERATION_START_1 >= 36
+#    define BOOST_PP_ITERATION_1 36
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 35 && BOOST_PP_ITERATION_START_1 >= 35
+#    define BOOST_PP_ITERATION_1 35
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 34 && BOOST_PP_ITERATION_START_1 >= 34
+#    define BOOST_PP_ITERATION_1 34
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 33 && BOOST_PP_ITERATION_START_1 >= 33
+#    define BOOST_PP_ITERATION_1 33
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 32 && BOOST_PP_ITERATION_START_1 >= 32
+#    define BOOST_PP_ITERATION_1 32
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 31 && BOOST_PP_ITERATION_START_1 >= 31
+#    define BOOST_PP_ITERATION_1 31
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 30 && BOOST_PP_ITERATION_START_1 >= 30
+#    define BOOST_PP_ITERATION_1 30
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 29 && BOOST_PP_ITERATION_START_1 >= 29
+#    define BOOST_PP_ITERATION_1 29
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 28 && BOOST_PP_ITERATION_START_1 >= 28
+#    define BOOST_PP_ITERATION_1 28
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 27 && BOOST_PP_ITERATION_START_1 >= 27
+#    define BOOST_PP_ITERATION_1 27
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 26 && BOOST_PP_ITERATION_START_1 >= 26
+#    define BOOST_PP_ITERATION_1 26
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 25 && BOOST_PP_ITERATION_START_1 >= 25
+#    define BOOST_PP_ITERATION_1 25
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 24 && BOOST_PP_ITERATION_START_1 >= 24
+#    define BOOST_PP_ITERATION_1 24
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 23 && BOOST_PP_ITERATION_START_1 >= 23
+#    define BOOST_PP_ITERATION_1 23
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 22 && BOOST_PP_ITERATION_START_1 >= 22
+#    define BOOST_PP_ITERATION_1 22
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 21 && BOOST_PP_ITERATION_START_1 >= 21
+#    define BOOST_PP_ITERATION_1 21
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 20 && BOOST_PP_ITERATION_START_1 >= 20
+#    define BOOST_PP_ITERATION_1 20
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 19 && BOOST_PP_ITERATION_START_1 >= 19
+#    define BOOST_PP_ITERATION_1 19
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 18 && BOOST_PP_ITERATION_START_1 >= 18
+#    define BOOST_PP_ITERATION_1 18
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 17 && BOOST_PP_ITERATION_START_1 >= 17
+#    define BOOST_PP_ITERATION_1 17
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 16 && BOOST_PP_ITERATION_START_1 >= 16
+#    define BOOST_PP_ITERATION_1 16
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 15 && BOOST_PP_ITERATION_START_1 >= 15
+#    define BOOST_PP_ITERATION_1 15
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 14 && BOOST_PP_ITERATION_START_1 >= 14
+#    define BOOST_PP_ITERATION_1 14
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 13 && BOOST_PP_ITERATION_START_1 >= 13
+#    define BOOST_PP_ITERATION_1 13
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 12 && BOOST_PP_ITERATION_START_1 >= 12
+#    define BOOST_PP_ITERATION_1 12
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 11 && BOOST_PP_ITERATION_START_1 >= 11
+#    define BOOST_PP_ITERATION_1 11
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 10 && BOOST_PP_ITERATION_START_1 >= 10
+#    define BOOST_PP_ITERATION_1 10
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 9 && BOOST_PP_ITERATION_START_1 >= 9
+#    define BOOST_PP_ITERATION_1 9
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 8 && BOOST_PP_ITERATION_START_1 >= 8
+#    define BOOST_PP_ITERATION_1 8
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 7 && BOOST_PP_ITERATION_START_1 >= 7
+#    define BOOST_PP_ITERATION_1 7
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 6 && BOOST_PP_ITERATION_START_1 >= 6
+#    define BOOST_PP_ITERATION_1 6
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 5 && BOOST_PP_ITERATION_START_1 >= 5
+#    define BOOST_PP_ITERATION_1 5
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 4 && BOOST_PP_ITERATION_START_1 >= 4
+#    define BOOST_PP_ITERATION_1 4
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 3 && BOOST_PP_ITERATION_START_1 >= 3
+#    define BOOST_PP_ITERATION_1 3
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 2 && BOOST_PP_ITERATION_START_1 >= 2
+#    define BOOST_PP_ITERATION_1 2
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 1 && BOOST_PP_ITERATION_START_1 >= 1
+#    define BOOST_PP_ITERATION_1 1
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_FINISH_1 <= 0 && BOOST_PP_ITERATION_START_1 >= 0
+#    define BOOST_PP_ITERATION_1 0
+#    include BOOST_PP_FILENAME_1
+#    undef BOOST_PP_ITERATION_1
+# endif
diff --git a/ext/boost/preprocessor/iteration/iterate.hpp b/ext/boost/preprocessor/iteration/iterate.hpp
index aa0af67..8f861e7 100644
--- a/ext/boost/preprocessor/iteration/iterate.hpp
+++ b/ext/boost/preprocessor/iteration/iterate.hpp
@@ -35,7 +35,7 @@
 #
 # /* BOOST_PP_ITERATION_FLAGS */
 #
-# define BOOST_PP_ITERATION_FLAGS() (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, BOOST_PP_ITERATION_DEPTH()))
+# define BOOST_PP_ITERATION_FLAGS() (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, BOOST_PP_ITERATION_DEPTH())())
 #
 # /* BOOST_PP_FRAME_ITERATION */
 #
@@ -48,7 +48,7 @@
 #
 # /* BOOST_PP_FRAME_FLAGS */
 #
-# define BOOST_PP_FRAME_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, i))
+# define BOOST_PP_FRAME_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, i)())
 #
 # /* BOOST_PP_RELATIVE_ITERATION */
 #
@@ -67,7 +67,7 @@
 #
 # /* BOOST_PP_RELATIVE_FLAGS */
 #
-# define BOOST_PP_RELATIVE_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FLAGS_))
+# define BOOST_PP_RELATIVE_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FLAGS_)())
 #
 # /* BOOST_PP_ITERATE */
 #
diff --git a/ext/boost/preprocessor/list/._adt.hpp b/ext/boost/preprocessor/list/._adt.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/list/._adt.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/list/._append.hpp b/ext/boost/preprocessor/list/._append.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/list/._append.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/list/._fold_left.hpp b/ext/boost/preprocessor/list/._fold_left.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/list/._fold_left.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/list/._fold_right.hpp b/ext/boost/preprocessor/list/._fold_right.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/list/._fold_right.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/list/._for_each_i.hpp b/ext/boost/preprocessor/list/._for_each_i.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/list/._for_each_i.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/list/._reverse.hpp b/ext/boost/preprocessor/list/._reverse.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/list/._reverse.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/list/._transform.hpp b/ext/boost/preprocessor/list/._transform.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/list/._transform.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/list/detail/._fold_left.hpp b/ext/boost/preprocessor/list/detail/._fold_left.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/list/detail/._fold_left.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/list/detail/._fold_right.hpp b/ext/boost/preprocessor/list/detail/._fold_right.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/list/detail/._fold_right.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/logical/._and.hpp b/ext/boost/preprocessor/logical/._and.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/logical/._and.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/logical/._bitand.hpp b/ext/boost/preprocessor/logical/._bitand.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/logical/._bitand.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/logical/._bool.hpp b/ext/boost/preprocessor/logical/._bool.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/logical/._bool.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/logical/._compl.hpp b/ext/boost/preprocessor/logical/._compl.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/logical/._compl.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/logical/._not.hpp b/ext/boost/preprocessor/logical/._not.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/logical/._not.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/logical/not.hpp b/ext/boost/preprocessor/logical/not.hpp
deleted file mode 100644
index b509d3f..0000000
--- a/ext/boost/preprocessor/logical/not.hpp
+++ /dev/null
@@ -1,30 +0,0 @@
-# /* Copyright (C) 2001
-#  * Housemarque Oy
-#  * http://www.housemarque.com
-#  *
-#  * Distributed under the Boost Software License, Version 1.0. (See
-#  * accompanying file LICENSE_1_0.txt or copy at
-#  * http://www.boost.org/LICENSE_1_0.txt)
-#  */
-#
-# /* Revised by Paul Mensonides (2002) */
-#
-# /* See http://www.boost.org for most recent version. */
-#
-# ifndef BOOST_PREPROCESSOR_LOGICAL_NOT_HPP
-# define BOOST_PREPROCESSOR_LOGICAL_NOT_HPP
-#
-# include <boost/preprocessor/config/config.hpp>
-# include <boost/preprocessor/logical/bool.hpp>
-# include <boost/preprocessor/logical/compl.hpp>
-#
-# /* BOOST_PP_NOT */
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_NOT(x) BOOST_PP_COMPL(BOOST_PP_BOOL(x))
-# else
-#    define BOOST_PP_NOT(x) BOOST_PP_NOT_I(x)
-#    define BOOST_PP_NOT_I(x) BOOST_PP_COMPL(BOOST_PP_BOOL(x))
-# endif
-#
-# endif
diff --git a/ext/boost/preprocessor/punctuation/._comma.hpp b/ext/boost/preprocessor/punctuation/._comma.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/punctuation/._comma.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/punctuation/._comma_if.hpp b/ext/boost/preprocessor/punctuation/._comma_if.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/punctuation/._comma_if.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/punctuation/paren.hpp b/ext/boost/preprocessor/punctuation/paren.hpp
new file mode 100644
index 0000000..28c18cb
--- /dev/null
+++ b/ext/boost/preprocessor/punctuation/paren.hpp
@@ -0,0 +1,23 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Paul Mensonides 2002.
+#  *     Distributed under the Boost Software License, Version 1.0. (See
+#  *     accompanying file LICENSE_1_0.txt or copy at
+#  *     http://www.boost.org/LICENSE_1_0.txt)
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_PUNCTUATION_PAREN_HPP
+# define BOOST_PREPROCESSOR_PUNCTUATION_PAREN_HPP
+#
+# /* BOOST_PP_LPAREN */
+#
+# define BOOST_PP_LPAREN() (
+#
+# /* BOOST_PP_RPAREN */
+#
+# define BOOST_PP_RPAREN() )
+#
+# endif
diff --git a/ext/boost/preprocessor/repeat_2nd.hpp b/ext/boost/preprocessor/repeat_2nd.hpp
new file mode 100644
index 0000000..030c432
--- /dev/null
+++ b/ext/boost/preprocessor/repeat_2nd.hpp
@@ -0,0 +1,17 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Paul Mensonides 2002.
+#  *     Distributed under the Boost Software License, Version 1.0. (See
+#  *     accompanying file LICENSE_1_0.txt or copy at
+#  *     http://www.boost.org/LICENSE_1_0.txt)
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_REPEAT_2ND_HPP
+# define BOOST_PREPROCESSOR_REPEAT_2ND_HPP
+#
+# include <boost/preprocessor/repetition/repeat.hpp>
+#
+# endif
diff --git a/ext/boost/preprocessor/repetition/._enum.hpp b/ext/boost/preprocessor/repetition/._enum.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/repetition/._enum.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/repetition/._enum_binary_params.hpp b/ext/boost/preprocessor/repetition/._enum_binary_params.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/repetition/._enum_binary_params.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/repetition/._enum_params.hpp b/ext/boost/preprocessor/repetition/._enum_params.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/repetition/._enum_params.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/repetition/._enum_trailing_params.hpp b/ext/boost/preprocessor/repetition/._enum_trailing_params.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/repetition/._enum_trailing_params.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/repetition/._for.hpp b/ext/boost/preprocessor/repetition/._for.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/repetition/._for.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/repetition/._repeat.hpp b/ext/boost/preprocessor/repetition/._repeat.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/repetition/._repeat.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/repetition/._repeat_from_to.hpp b/ext/boost/preprocessor/repetition/._repeat_from_to.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/repetition/._repeat_from_to.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/repetition/detail/._for.hpp b/ext/boost/preprocessor/repetition/detail/._for.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/repetition/detail/._for.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/repetition/enum_params_with_a_default.hpp b/ext/boost/preprocessor/repetition/enum_params_with_a_default.hpp
new file mode 100644
index 0000000..7496df6
--- /dev/null
+++ b/ext/boost/preprocessor/repetition/enum_params_with_a_default.hpp
@@ -0,0 +1,25 @@
+# /* Copyright (C) 2001
+#  * Housemarque Oy
+#  * http://www.housemarque.com
+#  *
+#  * Distributed under the Boost Software License, Version 1.0. (See
+#  * accompanying file LICENSE_1_0.txt or copy at
+#  * http://www.boost.org/LICENSE_1_0.txt)
+#  */
+#
+# /* Revised by Paul Mensonides (2002) */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_WITH_A_DEFAULT_HPP
+# define BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_WITH_A_DEFAULT_HPP
+#
+# include <boost/preprocessor/config/config.hpp>
+# include <boost/preprocessor/facilities/intercept.hpp>
+# include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#
+# /* BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT */
+#
+# define BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(count, param, def) BOOST_PP_ENUM_BINARY_PARAMS(count, param, = def BOOST_PP_INTERCEPT)
+#
+# endif
diff --git a/ext/boost/preprocessor/repetition/enum_shifted_params.hpp b/ext/boost/preprocessor/repetition/enum_shifted_params.hpp
new file mode 100644
index 0000000..88b2bf4
--- /dev/null
+++ b/ext/boost/preprocessor/repetition/enum_shifted_params.hpp
@@ -0,0 +1,44 @@
+# /* Copyright (C) 2001
+#  * Housemarque Oy
+#  * http://www.housemarque.com
+#  *
+#  * Distributed under the Boost Software License, Version 1.0. (See
+#  * accompanying file LICENSE_1_0.txt or copy at
+#  * http://www.boost.org/LICENSE_1_0.txt)
+#  */
+#
+# /* Revised by Paul Mensonides (2002) */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP
+# define BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP
+#
+# include <boost/preprocessor/arithmetic/dec.hpp>
+# include <boost/preprocessor/arithmetic/inc.hpp>
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/config/config.hpp>
+# include <boost/preprocessor/punctuation/comma_if.hpp>
+# include <boost/preprocessor/repetition/repeat.hpp>
+#
+# /* BOOST_PP_ENUM_SHIFTED_PARAMS */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+#    define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param)
+# else
+#    define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param)
+#    define BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param)
+# endif
+#
+# define BOOST_PP_ENUM_SHIFTED_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(param, BOOST_PP_INC(n))
+#
+# /* BOOST_PP_ENUM_SHIFTED_PARAMS_Z */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+#    define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param)
+# else
+#    define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param)
+#    define BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param)
+# endif
+#
+# endif
diff --git a/ext/boost/preprocessor/seq/._elem.hpp b/ext/boost/preprocessor/seq/._elem.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/seq/._elem.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/seq/._enum.hpp b/ext/boost/preprocessor/seq/._enum.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/seq/._enum.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/seq/._fold_left.hpp b/ext/boost/preprocessor/seq/._fold_left.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/seq/._fold_left.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/seq/._for_each_i.hpp b/ext/boost/preprocessor/seq/._for_each_i.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/seq/._for_each_i.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/seq/._seq.hpp b/ext/boost/preprocessor/seq/._seq.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/seq/._seq.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/seq/._transform.hpp b/ext/boost/preprocessor/seq/._transform.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/seq/._transform.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/seq/cat.hpp b/ext/boost/preprocessor/seq/cat.hpp
deleted file mode 100644
index 0efd8e5..0000000
--- a/ext/boost/preprocessor/seq/cat.hpp
+++ /dev/null
@@ -1,48 +0,0 @@
-# /* **************************************************************************
-#  *                                                                          *
-#  *     (C) Copyright Paul Mensonides 2002.
-#  *     Distributed under the Boost Software License, Version 1.0. (See
-#  *     accompanying file LICENSE_1_0.txt or copy at
-#  *     http://www.boost.org/LICENSE_1_0.txt)
-#  *                                                                          *
-#  ************************************************************************** */
-#
-# /* See http://www.boost.org for most recent version. */
-#
-# ifndef BOOST_PREPROCESSOR_SEQ_CAT_HPP
-# define BOOST_PREPROCESSOR_SEQ_CAT_HPP
-#
-# include <boost/preprocessor/arithmetic/dec.hpp>
-# include <boost/preprocessor/config/config.hpp>
-# include <boost/preprocessor/control/if.hpp>
-# include <boost/preprocessor/seq/fold_left.hpp>
-# include <boost/preprocessor/seq/seq.hpp>
-# include <boost/preprocessor/seq/size.hpp>
-# include <boost/preprocessor/tuple/eat.hpp>
-#
-# /* BOOST_PP_SEQ_CAT */
-#
-# define BOOST_PP_SEQ_CAT(seq) \
-    BOOST_PP_IF( \
-        BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \
-        BOOST_PP_SEQ_CAT_I, \
-        BOOST_PP_SEQ_HEAD(seq) BOOST_PP_TUPLE_EAT_1 \
-    )(seq) \
-    /**/
-# define BOOST_PP_SEQ_CAT_I(seq) BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq))
-#
-# define BOOST_PP_SEQ_CAT_O(s, st, elem) BOOST_PP_SEQ_CAT_O_I(st, elem)
-# define BOOST_PP_SEQ_CAT_O_I(a, b) a ## b
-#
-# /* BOOST_PP_SEQ_CAT_S */
-#
-# define BOOST_PP_SEQ_CAT_S(s, seq) \
-    BOOST_PP_IF( \
-        BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \
-        BOOST_PP_SEQ_CAT_S_I, \
-        BOOST_PP_SEQ_HEAD(seq) BOOST_PP_TUPLE_EAT_2 \
-    )(s, seq) \
-    /**/
-# define BOOST_PP_SEQ_CAT_S_I(s, seq) BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq))
-#
-# endif
diff --git a/ext/boost/preprocessor/seq/fold_left.hpp b/ext/boost/preprocessor/seq/fold_left.hpp
deleted file mode 100644
index ab051b6..0000000
--- a/ext/boost/preprocessor/seq/fold_left.hpp
+++ /dev/null
@@ -1,1070 +0,0 @@
-# /* **************************************************************************
-#  *                                                                          *
-#  *     (C) Copyright Paul Mensonides 2002.
-#  *     Distributed under the Boost Software License, Version 1.0. (See
-#  *     accompanying file LICENSE_1_0.txt or copy at
-#  *     http://www.boost.org/LICENSE_1_0.txt)
-#  *                                                                          *
-#  ************************************************************************** */
-#
-# /* See http://www.boost.org for most recent version. */
-#
-# ifndef BOOST_PREPROCESSOR_SEQ_FOLD_LEFT_HPP
-# define BOOST_PREPROCESSOR_SEQ_FOLD_LEFT_HPP
-#
-# include <boost/preprocessor/arithmetic/dec.hpp>
-# include <boost/preprocessor/cat.hpp>
-# include <boost/preprocessor/control/if.hpp>
-# include <boost/preprocessor/debug/error.hpp>
-# include <boost/preprocessor/detail/auto_rec.hpp>
-# include <boost/preprocessor/seq/seq.hpp>
-# include <boost/preprocessor/seq/size.hpp>
-#
-# /* BOOST_PP_SEQ_FOLD_LEFT */
-#
-# if 0
-#    define BOOST_PP_SEQ_FOLD_LEFT(op, state, seq) ...
-# endif
-#
-# define BOOST_PP_SEQ_FOLD_LEFT BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_LEFT_, BOOST_PP_AUTO_REC(BOOST_PP_SEQ_FOLD_LEFT_P, 256))
-# define BOOST_PP_SEQ_FOLD_LEFT_P(n) BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_LEFT_CHECK_, BOOST_PP_SEQ_FOLD_LEFT_I_ ## n(BOOST_PP_SEQ_FOLD_LEFT_O, BOOST_PP_NIL, (nil), 1))
-# define BOOST_PP_SEQ_FOLD_LEFT_O(s, st, _) st
-#
-# define BOOST_PP_SEQ_FOLD_LEFT_257(op, st, ss) BOOST_PP_ERROR(0x0005)
-# define BOOST_PP_SEQ_FOLD_LEFT_I_257(op, st, ss, sz) BOOST_PP_ERROR(0x0005)
-#
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_NIL 1
-#
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) 0
-# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) 0
-#
-# define BOOST_PP_SEQ_FOLD_LEFT_F(op, st, ss, sz) st
-#
-# define BOOST_PP_SEQ_FOLD_LEFT_1(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_2(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_3(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_4(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_5(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_6(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_7(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_8(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_9(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_10(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_11(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_12(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_13(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_14(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_15(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_16(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_17(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_18(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_19(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_20(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_21(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_22(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_23(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_24(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_25(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_26(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_27(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_28(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_29(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_30(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_31(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_32(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_33(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_34(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_35(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_36(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_37(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_38(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_39(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_40(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_41(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_42(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_43(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_44(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_45(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_46(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_47(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_48(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_49(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_50(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_51(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_52(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_53(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_54(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_55(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_56(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_57(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_58(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_59(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_60(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_61(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_62(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_63(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_64(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_65(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_66(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_67(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_68(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_69(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_70(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_71(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_72(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_73(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_74(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_75(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_76(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_77(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_78(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_79(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_80(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_81(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_82(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_83(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_84(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_85(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_86(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_87(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_88(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_89(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_90(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_91(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_92(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_93(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_94(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_95(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_96(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_97(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_98(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_99(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_100(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_101(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_102(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_103(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_104(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_105(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_106(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_107(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_108(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_109(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_110(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_111(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_112(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_113(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_114(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_115(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_116(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_117(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_118(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_119(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_120(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_121(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_122(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_123(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_124(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_125(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_126(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_127(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_128(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_129(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_130(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_131(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_132(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_133(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_134(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_135(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_136(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_137(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_138(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_139(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_140(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_141(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_142(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_143(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_144(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_145(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_146(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_147(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_148(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_149(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_150(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_151(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_152(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_153(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_154(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_155(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_156(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_157(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_158(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_159(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_160(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_161(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_162(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_163(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_164(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_165(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_166(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_167(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_168(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_169(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_170(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_171(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_172(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_173(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_174(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_175(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_176(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_177(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_178(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_179(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_180(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_181(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_182(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_183(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_184(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_185(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_186(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_187(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_188(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_189(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_190(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_191(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_192(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_193(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_194(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_195(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_196(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_197(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_198(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_199(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_200(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_201(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_202(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_203(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_204(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_205(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_206(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_207(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_208(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_209(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_210(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_211(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_212(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_213(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_214(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_215(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_216(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_217(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_218(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_219(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_220(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_221(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_222(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_223(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_224(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_225(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_226(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_227(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_228(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_229(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_230(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_231(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_232(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_233(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_234(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_235(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_236(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_237(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_238(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_239(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_240(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_241(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_242(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_243(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_244(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_245(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_246(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_247(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_248(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_249(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_250(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_251(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_252(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_253(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_254(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_255(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-# define BOOST_PP_SEQ_FOLD_LEFT_256(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, BOOST_PP_SEQ_SIZE(ss))
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC()
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_2, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(2, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_3, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(3, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_4, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(4, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_5, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(5, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_6, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(6, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_7, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(7, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_8, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(8, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_9, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(9, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_10, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(10, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_11, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(11, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_12, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(12, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_13, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(13, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_14, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(14, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_15, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(15, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_16, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(16, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_17, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(17, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_18, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(18, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_19, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(19, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_20, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(20, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_21, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(21, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_22, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(22, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_23, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(23, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_24, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(24, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_25, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(25, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_26, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(26, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_27, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(27, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_28, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(28, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_29, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(29, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_30, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(30, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_31, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(31, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_32, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(32, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_33, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(33, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_34, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(34, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_35, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(35, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_36, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(36, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_37, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(37, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_38, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(38, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_39, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(39, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_40, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(40, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_41, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(41, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_42, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(42, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_43, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(43, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_44, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(44, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_45, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(45, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_46, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(46, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_47, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(47, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_48, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(48, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_49, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(49, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_50, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(50, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_51, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(51, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_52, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(52, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_53, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(53, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_54, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(54, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_55, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(55, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_56, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(56, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_57, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(57, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_58, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(58, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_59, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(59, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_60, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(60, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_61, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(61, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_62, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(62, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_63, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(63, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_64, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(64, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_65, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(65, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_66, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(66, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_67, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(67, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_68, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(68, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_69, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(69, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_70, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(70, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_71, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(71, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_72, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(72, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_73, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(73, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_74, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(74, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_75, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(75, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_76, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(76, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_77, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(77, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_78, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(78, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_79, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(79, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_80, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(80, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_81, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(81, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_82, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(82, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_83, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(83, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_84, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(84, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_85, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(85, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_86, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(86, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_87, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(87, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_88, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(88, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_89, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(89, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_90, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(90, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_91, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(91, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_92, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(92, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_93, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(93, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_94, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(94, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_95, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(95, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_96, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(96, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_97, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(97, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_98, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(98, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_99, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(99, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_100, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(100, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_101, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(101, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_102, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(102, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_103, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(103, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_104, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(104, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_105, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(105, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_106, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(106, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_107, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(107, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_108, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(108, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_109, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(109, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_110, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(110, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_111, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(111, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_112, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(112, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_113, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(113, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_114, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(114, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_115, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(115, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_116, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(116, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_117, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(117, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_118, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(118, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_119, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(119, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_120, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(120, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_121, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(121, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_122, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(122, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_123, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(123, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_124, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(124, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_125, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(125, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_126, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(126, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_127, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(127, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_128, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(128, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_129, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(129, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_130, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(130, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_131, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(131, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_132, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(132, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_133, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(133, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_134, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(134, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_135, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(135, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_136, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(136, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_137, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(137, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_138, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(138, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_139, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(139, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_140, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(140, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_141, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(141, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_142, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(142, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_143, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(143, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_144, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(144, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_145, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(145, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_146, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(146, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_147, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(147, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_148, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(148, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_149, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(149, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_150, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(150, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_151, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(151, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_152, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(152, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_153, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(153, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_154, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(154, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_155, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(155, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_156, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(156, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_157, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(157, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_158, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(158, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_159, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(159, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_160, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(160, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_161, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(161, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_162, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(162, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_163, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(163, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_164, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(164, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_165, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(165, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_166, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(166, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_167, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(167, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_168, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(168, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_169, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(169, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_170, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(170, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_171, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(171, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_172, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(172, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_173, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(173, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_174, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(174, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_175, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(175, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_176, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(176, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_177, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(177, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_178, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(178, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_179, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(179, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_180, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(180, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_181, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(181, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_182, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(182, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_183, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(183, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_184, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(184, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_185, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(185, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_186, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(186, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_187, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(187, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_188, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(188, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_189, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(189, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_190, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(190, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_191, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(191, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_192, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(192, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_193, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(193, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_194, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(194, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_195, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(195, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_196, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(196, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_197, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(197, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_198, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(198, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_199, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(199, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_200, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(200, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_201, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(201, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_202, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(202, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_203, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(203, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_204, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(204, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_205, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(205, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_206, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(206, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_207, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(207, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_208, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(208, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_209, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(209, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_210, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(210, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_211, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(211, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_212, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(212, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_213, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(213, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_214, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(214, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_215, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(215, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_216, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(216, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_217, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(217, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_218, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(218, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_219, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(219, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_220, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(220, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_221, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(221, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_222, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(222, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_223, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(223, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_224, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(224, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_225, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(225, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_226, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(226, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_227, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(227, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_228, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(228, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_229, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(229, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_230, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(230, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_231, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(231, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_232, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(232, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_233, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(233, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_234, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(234, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_235, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(235, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_236, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(236, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_237, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(237, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_238, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(238, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_239, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(239, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_240, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(240, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_241, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(241, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_242, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(242, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_243, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(243, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_244, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(244, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_245, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(245, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_246, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(246, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_247, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(247, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_248, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(248, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_249, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(249, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_250, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(250, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_251, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(251, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_252, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(252, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_253, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(253, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_254, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(254, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_255, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(255, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_256, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(256, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_257, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(257, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-# else
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_2, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(2, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_3, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(3, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_4, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(4, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_5, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(5, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_6, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(6, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_7, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(7, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_8, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(8, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_9, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(9, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_10, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(10, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_11, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(11, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_12, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(12, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_13, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(13, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_14, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(14, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_15, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(15, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_16, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(16, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_17, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(17, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_18, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(18, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_19, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(19, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_20, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(20, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_21, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(21, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_22, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(22, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_23, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(23, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_24, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(24, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_25, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(25, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_26, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(26, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_27, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(27, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_28, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(28, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_29, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(29, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_30, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(30, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_31, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(31, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_32, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(32, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_33, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(33, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_34, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(34, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_35, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(35, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_36, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(36, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_37, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(37, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_38, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(38, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_39, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(39, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_40, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(40, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_41, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(41, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_42, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(42, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_43, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(43, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_44, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(44, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_45, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(45, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_46, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(46, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_47, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(47, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_48, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(48, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_49, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(49, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_50, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(50, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_51, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(51, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_52, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(52, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_53, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(53, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_54, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(54, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_55, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(55, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_56, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(56, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_57, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(57, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_58, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(58, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_59, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(59, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_60, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(60, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_61, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(61, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_62, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(62, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_63, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(63, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_64, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(64, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_65, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(65, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_66, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(66, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_67, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(67, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_68, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(68, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_69, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(69, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_70, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(70, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_71, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(71, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_72, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(72, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_73, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(73, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_74, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(74, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_75, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(75, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_76, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(76, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_77, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(77, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_78, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(78, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_79, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(79, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_80, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(80, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_81, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(81, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_82, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(82, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_83, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(83, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_84, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(84, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_85, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(85, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_86, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(86, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_87, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(87, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_88, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(88, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_89, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(89, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_90, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(90, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_91, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(91, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_92, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(92, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_93, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(93, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_94, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(94, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_95, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(95, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_96, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(96, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_97, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(97, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_98, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(98, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_99, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(99, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_100, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(100, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_101, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(101, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_102, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(102, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_103, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(103, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_104, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(104, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_105, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(105, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_106, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(106, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_107, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(107, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_108, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(108, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_109, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(109, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_110, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(110, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_111, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(111, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_112, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(112, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_113, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(113, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_114, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(114, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_115, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(115, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_116, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(116, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_117, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(117, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_118, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(118, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_119, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(119, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_120, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(120, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_121, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(121, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_122, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(122, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_123, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(123, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_124, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(124, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_125, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(125, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_126, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(126, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_127, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(127, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_128, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(128, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_129, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(129, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_130, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(130, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_131, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(131, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_132, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(132, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_133, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(133, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_134, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(134, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_135, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(135, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_136, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(136, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_137, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(137, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_138, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(138, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_139, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(139, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_140, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(140, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_141, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(141, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_142, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(142, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_143, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(143, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_144, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(144, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_145, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(145, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_146, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(146, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_147, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(147, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_148, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(148, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_149, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(149, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_150, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(150, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_151, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(151, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_152, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(152, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_153, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(153, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_154, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(154, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_155, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(155, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_156, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(156, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_157, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(157, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_158, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(158, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_159, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(159, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_160, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(160, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_161, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(161, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_162, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(162, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_163, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(163, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_164, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(164, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_165, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(165, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_166, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(166, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_167, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(167, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_168, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(168, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_169, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(169, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_170, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(170, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_171, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(171, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_172, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(172, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_173, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(173, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_174, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(174, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_175, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(175, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_176, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(176, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_177, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(177, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_178, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(178, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_179, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(179, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_180, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(180, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_181, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(181, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_182, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(182, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_183, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(183, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_184, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(184, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_185, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(185, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_186, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(186, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_187, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(187, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_188, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(188, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_189, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(189, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_190, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(190, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_191, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(191, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_192, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(192, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_193, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(193, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_194, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(194, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_195, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(195, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_196, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(196, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_197, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(197, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_198, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(198, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_199, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(199, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_200, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(200, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_201, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(201, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_202, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(202, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_203, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(203, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_204, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(204, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_205, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(205, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_206, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(206, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_207, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(207, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_208, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(208, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_209, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(209, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_210, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(210, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_211, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(211, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_212, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(212, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_213, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(213, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_214, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(214, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_215, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(215, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_216, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(216, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_217, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(217, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_218, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(218, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_219, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(219, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_220, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(220, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_221, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(221, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_222, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(222, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_223, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(223, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_224, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(224, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_225, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(225, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_226, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(226, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_227, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(227, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_228, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(228, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_229, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(229, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_230, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(230, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_231, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(231, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_232, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(232, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_233, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(233, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_234, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(234, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_235, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(235, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_236, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(236, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_237, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(237, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_238, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(238, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_239, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(239, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_240, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(240, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_241, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(241, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_242, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(242, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_243, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(243, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_244, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(244, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_245, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(245, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_246, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(246, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_247, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(247, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_248, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(248, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_249, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(249, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_250, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(250, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_251, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(251, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_252, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(252, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_253, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(253, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_254, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(254, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_255, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(255, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_256, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(256, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-#    define BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_257, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(257, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz))
-# endif
-#
-# endif
diff --git a/ext/boost/preprocessor/seq/size.hpp b/ext/boost/preprocessor/seq/size.hpp
index 2f7b70e..385c00a 100644
--- a/ext/boost/preprocessor/seq/size.hpp
+++ b/ext/boost/preprocessor/seq/size.hpp
@@ -14,7 +14,6 @@
 #
 # include <boost/preprocessor/cat.hpp>
 # include <boost/preprocessor/config/config.hpp>
-# include <boost/preprocessor/tuple/eat.hpp>
 #
 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
 #    define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_SEQ_SIZE_I((seq))
diff --git a/ext/boost/preprocessor/seq/transform.hpp b/ext/boost/preprocessor/seq/transform.hpp
deleted file mode 100644
index 79d8108..0000000
--- a/ext/boost/preprocessor/seq/transform.hpp
+++ /dev/null
@@ -1,48 +0,0 @@
-# /* **************************************************************************
-#  *                                                                          *
-#  *     (C) Copyright Paul Mensonides 2002.
-#  *     Distributed under the Boost Software License, Version 1.0. (See
-#  *     accompanying file LICENSE_1_0.txt or copy at
-#  *     http://www.boost.org/LICENSE_1_0.txt)
-#  *                                                                          *
-#  ************************************************************************** */
-#
-# /* See http://www.boost.org for most recent version. */
-#
-# ifndef BOOST_PREPROCESSOR_SEQ_TRANSFORM_HPP
-# define BOOST_PREPROCESSOR_SEQ_TRANSFORM_HPP
-#
-# include <boost/preprocessor/config/config.hpp>
-# include <boost/preprocessor/seq/fold_left.hpp>
-# include <boost/preprocessor/seq/seq.hpp>
-# include <boost/preprocessor/tuple/elem.hpp>
-# include <boost/preprocessor/tuple/rem.hpp>
-#
-# /* BOOST_PP_SEQ_TRANSFORM */
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_SEQ_TRANSFORM(op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq)))
-# else
-#    define BOOST_PP_SEQ_TRANSFORM(op, data, seq) BOOST_PP_SEQ_TRANSFORM_I(op, data, seq)
-#    define BOOST_PP_SEQ_TRANSFORM_I(op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq)))
-# endif
-#
-# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
-#    define BOOST_PP_SEQ_TRANSFORM_O(s, state, elem) BOOST_PP_SEQ_TRANSFORM_O_IM(s, BOOST_PP_TUPLE_REM_3 state, elem)
-#    define BOOST_PP_SEQ_TRANSFORM_O_IM(s, im, elem) BOOST_PP_SEQ_TRANSFORM_O_I(s, im, elem)
-# else
-#    define BOOST_PP_SEQ_TRANSFORM_O(s, state, elem) BOOST_PP_SEQ_TRANSFORM_O_I(s, BOOST_PP_TUPLE_ELEM(3, 0, state), BOOST_PP_TUPLE_ELEM(3, 1, state), BOOST_PP_TUPLE_ELEM(3, 2, state), elem)
-# endif
-#
-# define BOOST_PP_SEQ_TRANSFORM_O_I(s, op, data, res, elem) (op, data, res (op(s, data, elem)))
-#
-# /* BOOST_PP_SEQ_TRANSFORM_S */
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_SEQ_TRANSFORM_S(s, op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq)))
-# else
-#    define BOOST_PP_SEQ_TRANSFORM_S(s, op, data, seq) BOOST_PP_SEQ_TRANSFORM_S_I(s, op, data, seq)
-#    define BOOST_PP_SEQ_TRANSFORM_S_I(s, op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq)))
-# endif
-#
-# endif
diff --git a/ext/boost/preprocessor/slot/._slot.hpp b/ext/boost/preprocessor/slot/._slot.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/slot/._slot.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/slot/detail/._def.hpp b/ext/boost/preprocessor/slot/detail/._def.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/slot/detail/._def.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/slot/detail/._shared.hpp b/ext/boost/preprocessor/slot/detail/._shared.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/preprocessor/slot/detail/._shared.hpp and /dev/null differ
diff --git a/ext/boost/preprocessor/tuple/eat.hpp b/ext/boost/preprocessor/tuple/eat.hpp
index 82e8ffc..708015e 100644
--- a/ext/boost/preprocessor/tuple/eat.hpp
+++ b/ext/boost/preprocessor/tuple/eat.hpp
@@ -7,7 +7,8 @@
 #  * http://www.boost.org/LICENSE_1_0.txt)
 #  */
 #
-# /* Revised by Paul Mensonides (2002) */
+# /* Revised by Paul Mensonides (2002-2011) */
+# /* Revised by Edward Diener (2011) */
 #
 # /* See http://www.boost.org for most recent version. */
 #
@@ -16,42 +17,90 @@
 #
 # include <boost/preprocessor/config/config.hpp>
 #
-# /* BOOST_PP_TUPLE_EAT */
+# /* BOOST_PP_EAT */
 #
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
-#    define BOOST_PP_TUPLE_EAT(size) BOOST_PP_TUPLE_EAT_I(size)
+# if BOOST_PP_VARIADICS
+#    define BOOST_PP_EAT(...)
 # else
-#    define BOOST_PP_TUPLE_EAT(size) BOOST_PP_TUPLE_EAT_OO((size))
-#    define BOOST_PP_TUPLE_EAT_OO(par) BOOST_PP_TUPLE_EAT_I ## par
+#    define BOOST_PP_EAT(x)
 # endif
 #
-# define BOOST_PP_TUPLE_EAT_I(size) BOOST_PP_TUPLE_EAT_ ## size
-#
-# define BOOST_PP_TUPLE_EAT_0()
-# define BOOST_PP_TUPLE_EAT_1(a)
-# define BOOST_PP_TUPLE_EAT_2(a, b)
-# define BOOST_PP_TUPLE_EAT_3(a, b, c)
-# define BOOST_PP_TUPLE_EAT_4(a, b, c, d)
-# define BOOST_PP_TUPLE_EAT_5(a, b, c, d, e)
-# define BOOST_PP_TUPLE_EAT_6(a, b, c, d, e, f)
-# define BOOST_PP_TUPLE_EAT_7(a, b, c, d, e, f, g)
-# define BOOST_PP_TUPLE_EAT_8(a, b, c, d, e, f, g, h)
-# define BOOST_PP_TUPLE_EAT_9(a, b, c, d, e, f, g, h, i)
-# define BOOST_PP_TUPLE_EAT_10(a, b, c, d, e, f, g, h, i, j)
-# define BOOST_PP_TUPLE_EAT_11(a, b, c, d, e, f, g, h, i, j, k)
-# define BOOST_PP_TUPLE_EAT_12(a, b, c, d, e, f, g, h, i, j, k, l)
-# define BOOST_PP_TUPLE_EAT_13(a, b, c, d, e, f, g, h, i, j, k, l, m)
-# define BOOST_PP_TUPLE_EAT_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n)
-# define BOOST_PP_TUPLE_EAT_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)
-# define BOOST_PP_TUPLE_EAT_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
-# define BOOST_PP_TUPLE_EAT_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q)
-# define BOOST_PP_TUPLE_EAT_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r)
-# define BOOST_PP_TUPLE_EAT_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s)
-# define BOOST_PP_TUPLE_EAT_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
-# define BOOST_PP_TUPLE_EAT_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u)
-# define BOOST_PP_TUPLE_EAT_22(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v)
-# define BOOST_PP_TUPLE_EAT_23(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w)
-# define BOOST_PP_TUPLE_EAT_24(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x)
-# define BOOST_PP_TUPLE_EAT_25(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y)
+# /* BOOST_PP_TUPLE_EAT */
+#
+# if BOOST_PP_VARIADICS
+#    define BOOST_PP_TUPLE_EAT(size) BOOST_PP_EAT
+# else
+#    if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
+#        define BOOST_PP_TUPLE_EAT(size) BOOST_PP_TUPLE_EAT_I(size)
+#    else
+#        define BOOST_PP_TUPLE_EAT(size) BOOST_PP_TUPLE_EAT_OO((size))
+#        define BOOST_PP_TUPLE_EAT_OO(par) BOOST_PP_TUPLE_EAT_I ## par
+#    endif
+#    define BOOST_PP_TUPLE_EAT_I(size) BOOST_PP_TUPLE_EAT_ ## size
+# endif
+# define BOOST_PP_TUPLE_EAT_1(e0)
+# define BOOST_PP_TUPLE_EAT_2(e0, e1)
+# define BOOST_PP_TUPLE_EAT_3(e0, e1, e2)
+# define BOOST_PP_TUPLE_EAT_4(e0, e1, e2, e3)
+# define BOOST_PP_TUPLE_EAT_5(e0, e1, e2, e3, e4)
+# define BOOST_PP_TUPLE_EAT_6(e0, e1, e2, e3, e4, e5)
+# define BOOST_PP_TUPLE_EAT_7(e0, e1, e2, e3, e4, e5, e6)
+# define BOOST_PP_TUPLE_EAT_8(e0, e1, e2, e3, e4, e5, e6, e7)
+# define BOOST_PP_TUPLE_EAT_9(e0, e1, e2, e3, e4, e5, e6, e7, e8)
+# define BOOST_PP_TUPLE_EAT_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9)
+# define BOOST_PP_TUPLE_EAT_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10)
+# define BOOST_PP_TUPLE_EAT_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11)
+# define BOOST_PP_TUPLE_EAT_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12)
+# define BOOST_PP_TUPLE_EAT_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13)
+# define BOOST_PP_TUPLE_EAT_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14)
+# define BOOST_PP_TUPLE_EAT_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15)
+# define BOOST_PP_TUPLE_EAT_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16)
+# define BOOST_PP_TUPLE_EAT_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17)
+# define BOOST_PP_TUPLE_EAT_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18)
+# define BOOST_PP_TUPLE_EAT_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19)
+# define BOOST_PP_TUPLE_EAT_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20)
+# define BOOST_PP_TUPLE_EAT_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21)
+# define BOOST_PP_TUPLE_EAT_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22)
+# define BOOST_PP_TUPLE_EAT_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23)
+# define BOOST_PP_TUPLE_EAT_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24)
+# define BOOST_PP_TUPLE_EAT_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25)
+# define BOOST_PP_TUPLE_EAT_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26)
+# define BOOST_PP_TUPLE_EAT_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27)
+# define BOOST_PP_TUPLE_EAT_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28)
+# define BOOST_PP_TUPLE_EAT_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29)
+# define BOOST_PP_TUPLE_EAT_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30)
+# define BOOST_PP_TUPLE_EAT_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31)
+# define BOOST_PP_TUPLE_EAT_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32)
+# define BOOST_PP_TUPLE_EAT_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33)
+# define BOOST_PP_TUPLE_EAT_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34)
+# define BOOST_PP_TUPLE_EAT_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35)
+# define BOOST_PP_TUPLE_EAT_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36)
+# define BOOST_PP_TUPLE_EAT_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37)
+# define BOOST_PP_TUPLE_EAT_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38)
+# define BOOST_PP_TUPLE_EAT_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39)
+# define BOOST_PP_TUPLE_EAT_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40)
+# define BOOST_PP_TUPLE_EAT_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41)
+# define BOOST_PP_TUPLE_EAT_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42)
+# define BOOST_PP_TUPLE_EAT_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43)
+# define BOOST_PP_TUPLE_EAT_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44)
+# define BOOST_PP_TUPLE_EAT_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45)
+# define BOOST_PP_TUPLE_EAT_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46)
+# define BOOST_PP_TUPLE_EAT_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47)
+# define BOOST_PP_TUPLE_EAT_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48)
+# define BOOST_PP_TUPLE_EAT_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49)
+# define BOOST_PP_TUPLE_EAT_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50)
+# define BOOST_PP_TUPLE_EAT_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51)
+# define BOOST_PP_TUPLE_EAT_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52)
+# define BOOST_PP_TUPLE_EAT_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53)
+# define BOOST_PP_TUPLE_EAT_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54)
+# define BOOST_PP_TUPLE_EAT_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55)
+# define BOOST_PP_TUPLE_EAT_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56)
+# define BOOST_PP_TUPLE_EAT_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57)
+# define BOOST_PP_TUPLE_EAT_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58)
+# define BOOST_PP_TUPLE_EAT_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59)
+# define BOOST_PP_TUPLE_EAT_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60)
+# define BOOST_PP_TUPLE_EAT_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61)
+# define BOOST_PP_TUPLE_EAT_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62)
+# define BOOST_PP_TUPLE_EAT_64(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63)
 #
 # endif
diff --git a/ext/boost/preprocessor/tuple/elem.hpp b/ext/boost/preprocessor/tuple/elem.hpp
index 2e225ae..3eba1c5 100644
--- a/ext/boost/preprocessor/tuple/elem.hpp
+++ b/ext/boost/preprocessor/tuple/elem.hpp
@@ -7,30 +7,177 @@
 #  * http://www.boost.org/LICENSE_1_0.txt)
 #  */
 #
-# /* Revised by Paul Mensonides (2002) */
+# /* Revised by Paul Mensonides (2002-2011) */
+# /* Revised by Edward Diener (2011) */
 #
 # /* See http://www.boost.org for most recent version. */
 #
 # ifndef BOOST_PREPROCESSOR_TUPLE_ELEM_HPP
 # define BOOST_PREPROCESSOR_TUPLE_ELEM_HPP
 #
+# include <boost/preprocessor/cat.hpp>
 # include <boost/preprocessor/config/config.hpp>
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
-#    define BOOST_PP_TUPLE_ELEM(size, index, tuple) BOOST_PP_TUPLE_ELEM_I(size, index, tuple)
+# include <boost/preprocessor/facilities/overload.hpp>
+# include <boost/preprocessor/tuple/rem.hpp>
+# include <boost/preprocessor/variadic/elem.hpp>
+#
+# if BOOST_PP_VARIADICS
+#    if BOOST_PP_VARIADICS_MSVC
+#        define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__), (__VA_ARGS__))
+#        define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args)
+#        define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,)
+#    else
+#        define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__)(__VA_ARGS__)
+#    endif
+#    define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_REM tuple)
+#    define BOOST_PP_TUPLE_ELEM_O_3(size, n, tuple) BOOST_PP_TUPLE_ELEM_O_2(n, tuple)
 # else
-#    define BOOST_PP_TUPLE_ELEM(size, index, tuple) BOOST_PP_TUPLE_ELEM_OO((size, index, tuple))
-#    define BOOST_PP_TUPLE_ELEM_OO(par) BOOST_PP_TUPLE_ELEM_I ## par
+#    if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
+#        define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_, n), BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_E_, size), tuple))
+#        define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args)
+#        define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,)
+#    elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
+#        define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I_OO((size, n, tuple))
+#        define BOOST_PP_TUPLE_ELEM_I_OO(par) BOOST_PP_TUPLE_ELEM_I ## par
+#        define BOOST_PP_TUPLE_ELEM_I(size, n, tuple) BOOST_PP_TUPLE_ELEM_II((n, BOOST_PP_TUPLE_ELEM_E_ ## size ## tuple))
+#        define BOOST_PP_TUPLE_ELEM_II(par) BOOST_PP_TUPLE_ELEM_III_OO(par)
+#        define BOOST_PP_TUPLE_ELEM_III_OO(par) BOOST_PP_TUPLE_ELEM_III ## par
+#        define BOOST_PP_TUPLE_ELEM_III(n, etuple) BOOST_PP_TUPLE_ELEM_ ## n ## etuple
+#    else
+#        define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_, n) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_E_, size) tuple)
+#        define BOOST_PP_TUPLE_ELEM_I(x) x
+#    endif
+#    define BOOST_PP_TUPLE_ELEM_E_1(e0) (e0, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_2(e0, e1) (e0, e1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_3(e0, e1, e2) (e0, e1, e2, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_4(e0, e1, e2, e3) (e0, e1, e2, e3, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_5(e0, e1, e2, e3, e4) (e0, e1, e2, e3, e4, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_6(e0, e1, e2, e3, e4, e5) (e0, e1, e2, e3, e4, e5, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_7(e0, e1, e2, e3, e4, e5, e6) (e0, e1, e2, e3, e4, e5, e6, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_8(e0, e1, e2, e3, e4, e5, e6, e7) (e0, e1, e2, e3, e4, e5, e6, e7, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) (e0, e1, e2, e3, e4, e5, e6, e7, e8, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+#    define BOOST_PP_TUPLE_ELEM_E_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,  [...]
+#    define BOOST_PP_TUPLE_ELEM_E_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? [...]
+#    define BOOST_PP_TUPLE_ELEM_E_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, ?, ?, ?, ?, ?, ?, ?, ?,  [...]
+#    define BOOST_PP_TUPLE_ELEM_E_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, ?, ?, ?, ?, ?, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, ?, ? [...]
+#    define BOOST_PP_TUPLE_ELEM_E_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, [...]
+#    define BOOST_PP_TUPLE_ELEM_E_64
+#    define BOOST_PP_TUPLE_ELEM_0(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e0
+#    define BOOST_PP_TUPLE_ELEM_1(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e1
+#    define BOOST_PP_TUPLE_ELEM_2(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e2
+#    define BOOST_PP_TUPLE_ELEM_3(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e3
+#    define BOOST_PP_TUPLE_ELEM_4(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e4
+#    define BOOST_PP_TUPLE_ELEM_5(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e5
+#    define BOOST_PP_TUPLE_ELEM_6(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e6
+#    define BOOST_PP_TUPLE_ELEM_7(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e7
+#    define BOOST_PP_TUPLE_ELEM_8(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e8
+#    define BOOST_PP_TUPLE_ELEM_9(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e9
+#    define BOOST_PP_TUPLE_ELEM_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e10
+#    define BOOST_PP_TUPLE_ELEM_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e11
+#    define BOOST_PP_TUPLE_ELEM_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e12
+#    define BOOST_PP_TUPLE_ELEM_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e13
+#    define BOOST_PP_TUPLE_ELEM_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e14
+#    define BOOST_PP_TUPLE_ELEM_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e15
+#    define BOOST_PP_TUPLE_ELEM_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e16
+#    define BOOST_PP_TUPLE_ELEM_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e17
+#    define BOOST_PP_TUPLE_ELEM_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e18
+#    define BOOST_PP_TUPLE_ELEM_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e19
+#    define BOOST_PP_TUPLE_ELEM_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e20
+#    define BOOST_PP_TUPLE_ELEM_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e21
+#    define BOOST_PP_TUPLE_ELEM_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e22
+#    define BOOST_PP_TUPLE_ELEM_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e23
+#    define BOOST_PP_TUPLE_ELEM_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e24
+#    define BOOST_PP_TUPLE_ELEM_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e25
+#    define BOOST_PP_TUPLE_ELEM_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e26
+#    define BOOST_PP_TUPLE_ELEM_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e27
+#    define BOOST_PP_TUPLE_ELEM_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e28
+#    define BOOST_PP_TUPLE_ELEM_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e29
+#    define BOOST_PP_TUPLE_ELEM_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e30
+#    define BOOST_PP_TUPLE_ELEM_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e31
+#    define BOOST_PP_TUPLE_ELEM_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e32
+#    define BOOST_PP_TUPLE_ELEM_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e33
+#    define BOOST_PP_TUPLE_ELEM_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e34
+#    define BOOST_PP_TUPLE_ELEM_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e35
+#    define BOOST_PP_TUPLE_ELEM_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e36
+#    define BOOST_PP_TUPLE_ELEM_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e37
+#    define BOOST_PP_TUPLE_ELEM_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e38
+#    define BOOST_PP_TUPLE_ELEM_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e39
+#    define BOOST_PP_TUPLE_ELEM_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e40
+#    define BOOST_PP_TUPLE_ELEM_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e41
+#    define BOOST_PP_TUPLE_ELEM_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e42
+#    define BOOST_PP_TUPLE_ELEM_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e43
+#    define BOOST_PP_TUPLE_ELEM_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e44
+#    define BOOST_PP_TUPLE_ELEM_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e45
+#    define BOOST_PP_TUPLE_ELEM_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e46
+#    define BOOST_PP_TUPLE_ELEM_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e47
+#    define BOOST_PP_TUPLE_ELEM_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e48
+#    define BOOST_PP_TUPLE_ELEM_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e49
+#    define BOOST_PP_TUPLE_ELEM_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e50
+#    define BOOST_PP_TUPLE_ELEM_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e51
+#    define BOOST_PP_TUPLE_ELEM_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e52
+#    define BOOST_PP_TUPLE_ELEM_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e53
+#    define BOOST_PP_TUPLE_ELEM_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e54
+#    define BOOST_PP_TUPLE_ELEM_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e55
+#    define BOOST_PP_TUPLE_ELEM_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e56
+#    define BOOST_PP_TUPLE_ELEM_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e57
+#    define BOOST_PP_TUPLE_ELEM_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e58
+#    define BOOST_PP_TUPLE_ELEM_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e59
+#    define BOOST_PP_TUPLE_ELEM_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e60
+#    define BOOST_PP_TUPLE_ELEM_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e61
+#    define BOOST_PP_TUPLE_ELEM_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e62
+#    define BOOST_PP_TUPLE_ELEM_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e63
 # endif
 #
-# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
-#    define BOOST_PP_TUPLE_ELEM_I(s, i, t) BOOST_PP_TUPLE_ELEM_ ## s ## _ ## i ## t
-# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
-#    define BOOST_PP_TUPLE_ELEM_I(s, i, t) BOOST_PP_TUPLE_ELEM_II(BOOST_PP_TUPLE_ELEM_ ## s ## _ ## i t)
-#    define BOOST_PP_TUPLE_ELEM_II(res) res
-# else
-#    define BOOST_PP_TUPLE_ELEM_I(s, i, t) BOOST_PP_TUPLE_ELEM_ ## s ## _ ## i t
-# endif
+# /* directly used elsewhere in Boost... */
 #
 # define BOOST_PP_TUPLE_ELEM_1_0(a) a
 #
@@ -41,345 +188,4 @@
 # define BOOST_PP_TUPLE_ELEM_3_1(a, b, c) b
 # define BOOST_PP_TUPLE_ELEM_3_2(a, b, c) c
 #
-# define BOOST_PP_TUPLE_ELEM_4_0(a, b, c, d) a
-# define BOOST_PP_TUPLE_ELEM_4_1(a, b, c, d) b
-# define BOOST_PP_TUPLE_ELEM_4_2(a, b, c, d) c
-# define BOOST_PP_TUPLE_ELEM_4_3(a, b, c, d) d
-#
-# define BOOST_PP_TUPLE_ELEM_5_0(a, b, c, d, e) a
-# define BOOST_PP_TUPLE_ELEM_5_1(a, b, c, d, e) b
-# define BOOST_PP_TUPLE_ELEM_5_2(a, b, c, d, e) c
-# define BOOST_PP_TUPLE_ELEM_5_3(a, b, c, d, e) d
-# define BOOST_PP_TUPLE_ELEM_5_4(a, b, c, d, e) e
-#
-# define BOOST_PP_TUPLE_ELEM_6_0(a, b, c, d, e, f) a
-# define BOOST_PP_TUPLE_ELEM_6_1(a, b, c, d, e, f) b
-# define BOOST_PP_TUPLE_ELEM_6_2(a, b, c, d, e, f) c
-# define BOOST_PP_TUPLE_ELEM_6_3(a, b, c, d, e, f) d
-# define BOOST_PP_TUPLE_ELEM_6_4(a, b, c, d, e, f) e
-# define BOOST_PP_TUPLE_ELEM_6_5(a, b, c, d, e, f) f
-#
-# define BOOST_PP_TUPLE_ELEM_7_0(a, b, c, d, e, f, g) a
-# define BOOST_PP_TUPLE_ELEM_7_1(a, b, c, d, e, f, g) b
-# define BOOST_PP_TUPLE_ELEM_7_2(a, b, c, d, e, f, g) c
-# define BOOST_PP_TUPLE_ELEM_7_3(a, b, c, d, e, f, g) d
-# define BOOST_PP_TUPLE_ELEM_7_4(a, b, c, d, e, f, g) e
-# define BOOST_PP_TUPLE_ELEM_7_5(a, b, c, d, e, f, g) f
-# define BOOST_PP_TUPLE_ELEM_7_6(a, b, c, d, e, f, g) g
-#
-# define BOOST_PP_TUPLE_ELEM_8_0(a, b, c, d, e, f, g, h) a
-# define BOOST_PP_TUPLE_ELEM_8_1(a, b, c, d, e, f, g, h) b
-# define BOOST_PP_TUPLE_ELEM_8_2(a, b, c, d, e, f, g, h) c
-# define BOOST_PP_TUPLE_ELEM_8_3(a, b, c, d, e, f, g, h) d
-# define BOOST_PP_TUPLE_ELEM_8_4(a, b, c, d, e, f, g, h) e
-# define BOOST_PP_TUPLE_ELEM_8_5(a, b, c, d, e, f, g, h) f
-# define BOOST_PP_TUPLE_ELEM_8_6(a, b, c, d, e, f, g, h) g
-# define BOOST_PP_TUPLE_ELEM_8_7(a, b, c, d, e, f, g, h) h
-#
-# define BOOST_PP_TUPLE_ELEM_9_0(a, b, c, d, e, f, g, h, i) a
-# define BOOST_PP_TUPLE_ELEM_9_1(a, b, c, d, e, f, g, h, i) b
-# define BOOST_PP_TUPLE_ELEM_9_2(a, b, c, d, e, f, g, h, i) c
-# define BOOST_PP_TUPLE_ELEM_9_3(a, b, c, d, e, f, g, h, i) d
-# define BOOST_PP_TUPLE_ELEM_9_4(a, b, c, d, e, f, g, h, i) e
-# define BOOST_PP_TUPLE_ELEM_9_5(a, b, c, d, e, f, g, h, i) f
-# define BOOST_PP_TUPLE_ELEM_9_6(a, b, c, d, e, f, g, h, i) g
-# define BOOST_PP_TUPLE_ELEM_9_7(a, b, c, d, e, f, g, h, i) h
-# define BOOST_PP_TUPLE_ELEM_9_8(a, b, c, d, e, f, g, h, i) i
-#
-# define BOOST_PP_TUPLE_ELEM_10_0(a, b, c, d, e, f, g, h, i, j) a
-# define BOOST_PP_TUPLE_ELEM_10_1(a, b, c, d, e, f, g, h, i, j) b
-# define BOOST_PP_TUPLE_ELEM_10_2(a, b, c, d, e, f, g, h, i, j) c
-# define BOOST_PP_TUPLE_ELEM_10_3(a, b, c, d, e, f, g, h, i, j) d
-# define BOOST_PP_TUPLE_ELEM_10_4(a, b, c, d, e, f, g, h, i, j) e
-# define BOOST_PP_TUPLE_ELEM_10_5(a, b, c, d, e, f, g, h, i, j) f
-# define BOOST_PP_TUPLE_ELEM_10_6(a, b, c, d, e, f, g, h, i, j) g
-# define BOOST_PP_TUPLE_ELEM_10_7(a, b, c, d, e, f, g, h, i, j) h
-# define BOOST_PP_TUPLE_ELEM_10_8(a, b, c, d, e, f, g, h, i, j) i
-# define BOOST_PP_TUPLE_ELEM_10_9(a, b, c, d, e, f, g, h, i, j) j
-#
-# define BOOST_PP_TUPLE_ELEM_11_0(a, b, c, d, e, f, g, h, i, j, k) a
-# define BOOST_PP_TUPLE_ELEM_11_1(a, b, c, d, e, f, g, h, i, j, k) b
-# define BOOST_PP_TUPLE_ELEM_11_2(a, b, c, d, e, f, g, h, i, j, k) c
-# define BOOST_PP_TUPLE_ELEM_11_3(a, b, c, d, e, f, g, h, i, j, k) d
-# define BOOST_PP_TUPLE_ELEM_11_4(a, b, c, d, e, f, g, h, i, j, k) e
-# define BOOST_PP_TUPLE_ELEM_11_5(a, b, c, d, e, f, g, h, i, j, k) f
-# define BOOST_PP_TUPLE_ELEM_11_6(a, b, c, d, e, f, g, h, i, j, k) g
-# define BOOST_PP_TUPLE_ELEM_11_7(a, b, c, d, e, f, g, h, i, j, k) h
-# define BOOST_PP_TUPLE_ELEM_11_8(a, b, c, d, e, f, g, h, i, j, k) i
-# define BOOST_PP_TUPLE_ELEM_11_9(a, b, c, d, e, f, g, h, i, j, k) j
-# define BOOST_PP_TUPLE_ELEM_11_10(a, b, c, d, e, f, g, h, i, j, k) k
-#
-# define BOOST_PP_TUPLE_ELEM_12_0(a, b, c, d, e, f, g, h, i, j, k, l) a
-# define BOOST_PP_TUPLE_ELEM_12_1(a, b, c, d, e, f, g, h, i, j, k, l) b
-# define BOOST_PP_TUPLE_ELEM_12_2(a, b, c, d, e, f, g, h, i, j, k, l) c
-# define BOOST_PP_TUPLE_ELEM_12_3(a, b, c, d, e, f, g, h, i, j, k, l) d
-# define BOOST_PP_TUPLE_ELEM_12_4(a, b, c, d, e, f, g, h, i, j, k, l) e
-# define BOOST_PP_TUPLE_ELEM_12_5(a, b, c, d, e, f, g, h, i, j, k, l) f
-# define BOOST_PP_TUPLE_ELEM_12_6(a, b, c, d, e, f, g, h, i, j, k, l) g
-# define BOOST_PP_TUPLE_ELEM_12_7(a, b, c, d, e, f, g, h, i, j, k, l) h
-# define BOOST_PP_TUPLE_ELEM_12_8(a, b, c, d, e, f, g, h, i, j, k, l) i
-# define BOOST_PP_TUPLE_ELEM_12_9(a, b, c, d, e, f, g, h, i, j, k, l) j
-# define BOOST_PP_TUPLE_ELEM_12_10(a, b, c, d, e, f, g, h, i, j, k, l) k
-# define BOOST_PP_TUPLE_ELEM_12_11(a, b, c, d, e, f, g, h, i, j, k, l) l
-#
-# define BOOST_PP_TUPLE_ELEM_13_0(a, b, c, d, e, f, g, h, i, j, k, l, m) a
-# define BOOST_PP_TUPLE_ELEM_13_1(a, b, c, d, e, f, g, h, i, j, k, l, m) b
-# define BOOST_PP_TUPLE_ELEM_13_2(a, b, c, d, e, f, g, h, i, j, k, l, m) c
-# define BOOST_PP_TUPLE_ELEM_13_3(a, b, c, d, e, f, g, h, i, j, k, l, m) d
-# define BOOST_PP_TUPLE_ELEM_13_4(a, b, c, d, e, f, g, h, i, j, k, l, m) e
-# define BOOST_PP_TUPLE_ELEM_13_5(a, b, c, d, e, f, g, h, i, j, k, l, m) f
-# define BOOST_PP_TUPLE_ELEM_13_6(a, b, c, d, e, f, g, h, i, j, k, l, m) g
-# define BOOST_PP_TUPLE_ELEM_13_7(a, b, c, d, e, f, g, h, i, j, k, l, m) h
-# define BOOST_PP_TUPLE_ELEM_13_8(a, b, c, d, e, f, g, h, i, j, k, l, m) i
-# define BOOST_PP_TUPLE_ELEM_13_9(a, b, c, d, e, f, g, h, i, j, k, l, m) j
-# define BOOST_PP_TUPLE_ELEM_13_10(a, b, c, d, e, f, g, h, i, j, k, l, m) k
-# define BOOST_PP_TUPLE_ELEM_13_11(a, b, c, d, e, f, g, h, i, j, k, l, m) l
-# define BOOST_PP_TUPLE_ELEM_13_12(a, b, c, d, e, f, g, h, i, j, k, l, m) m
-#
-# define BOOST_PP_TUPLE_ELEM_14_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n) a
-# define BOOST_PP_TUPLE_ELEM_14_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n) b
-# define BOOST_PP_TUPLE_ELEM_14_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n) c
-# define BOOST_PP_TUPLE_ELEM_14_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n) d
-# define BOOST_PP_TUPLE_ELEM_14_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n) e
-# define BOOST_PP_TUPLE_ELEM_14_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n) f
-# define BOOST_PP_TUPLE_ELEM_14_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n) g
-# define BOOST_PP_TUPLE_ELEM_14_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n) h
-# define BOOST_PP_TUPLE_ELEM_14_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n) i
-# define BOOST_PP_TUPLE_ELEM_14_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n) j
-# define BOOST_PP_TUPLE_ELEM_14_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n) k
-# define BOOST_PP_TUPLE_ELEM_14_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n) l
-# define BOOST_PP_TUPLE_ELEM_14_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n) m
-# define BOOST_PP_TUPLE_ELEM_14_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n) n
-#
-# define BOOST_PP_TUPLE_ELEM_15_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) a
-# define BOOST_PP_TUPLE_ELEM_15_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) b
-# define BOOST_PP_TUPLE_ELEM_15_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) c
-# define BOOST_PP_TUPLE_ELEM_15_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) d
-# define BOOST_PP_TUPLE_ELEM_15_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) e
-# define BOOST_PP_TUPLE_ELEM_15_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) f
-# define BOOST_PP_TUPLE_ELEM_15_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) g
-# define BOOST_PP_TUPLE_ELEM_15_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) h
-# define BOOST_PP_TUPLE_ELEM_15_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) i
-# define BOOST_PP_TUPLE_ELEM_15_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) j
-# define BOOST_PP_TUPLE_ELEM_15_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) k
-# define BOOST_PP_TUPLE_ELEM_15_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) l
-# define BOOST_PP_TUPLE_ELEM_15_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) m
-# define BOOST_PP_TUPLE_ELEM_15_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) n
-# define BOOST_PP_TUPLE_ELEM_15_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) o
-#
-# define BOOST_PP_TUPLE_ELEM_16_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) a
-# define BOOST_PP_TUPLE_ELEM_16_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) b
-# define BOOST_PP_TUPLE_ELEM_16_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) c
-# define BOOST_PP_TUPLE_ELEM_16_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) d
-# define BOOST_PP_TUPLE_ELEM_16_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) e
-# define BOOST_PP_TUPLE_ELEM_16_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) f
-# define BOOST_PP_TUPLE_ELEM_16_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) g
-# define BOOST_PP_TUPLE_ELEM_16_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) h
-# define BOOST_PP_TUPLE_ELEM_16_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) i
-# define BOOST_PP_TUPLE_ELEM_16_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) j
-# define BOOST_PP_TUPLE_ELEM_16_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) k
-# define BOOST_PP_TUPLE_ELEM_16_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) l
-# define BOOST_PP_TUPLE_ELEM_16_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) m
-# define BOOST_PP_TUPLE_ELEM_16_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) n
-# define BOOST_PP_TUPLE_ELEM_16_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) o
-# define BOOST_PP_TUPLE_ELEM_16_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) p
-#
-# define BOOST_PP_TUPLE_ELEM_17_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) a
-# define BOOST_PP_TUPLE_ELEM_17_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) b
-# define BOOST_PP_TUPLE_ELEM_17_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) c
-# define BOOST_PP_TUPLE_ELEM_17_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) d
-# define BOOST_PP_TUPLE_ELEM_17_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) e
-# define BOOST_PP_TUPLE_ELEM_17_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) f
-# define BOOST_PP_TUPLE_ELEM_17_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) g
-# define BOOST_PP_TUPLE_ELEM_17_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) h
-# define BOOST_PP_TUPLE_ELEM_17_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) i
-# define BOOST_PP_TUPLE_ELEM_17_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) j
-# define BOOST_PP_TUPLE_ELEM_17_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) k
-# define BOOST_PP_TUPLE_ELEM_17_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) l
-# define BOOST_PP_TUPLE_ELEM_17_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) m
-# define BOOST_PP_TUPLE_ELEM_17_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) n
-# define BOOST_PP_TUPLE_ELEM_17_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) o
-# define BOOST_PP_TUPLE_ELEM_17_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) p
-# define BOOST_PP_TUPLE_ELEM_17_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) q
-#
-# define BOOST_PP_TUPLE_ELEM_18_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) a
-# define BOOST_PP_TUPLE_ELEM_18_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) b
-# define BOOST_PP_TUPLE_ELEM_18_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) c
-# define BOOST_PP_TUPLE_ELEM_18_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) d
-# define BOOST_PP_TUPLE_ELEM_18_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) e
-# define BOOST_PP_TUPLE_ELEM_18_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) f
-# define BOOST_PP_TUPLE_ELEM_18_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) g
-# define BOOST_PP_TUPLE_ELEM_18_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) h
-# define BOOST_PP_TUPLE_ELEM_18_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) i
-# define BOOST_PP_TUPLE_ELEM_18_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) j
-# define BOOST_PP_TUPLE_ELEM_18_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) k
-# define BOOST_PP_TUPLE_ELEM_18_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) l
-# define BOOST_PP_TUPLE_ELEM_18_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) m
-# define BOOST_PP_TUPLE_ELEM_18_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) n
-# define BOOST_PP_TUPLE_ELEM_18_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) o
-# define BOOST_PP_TUPLE_ELEM_18_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) p
-# define BOOST_PP_TUPLE_ELEM_18_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) q
-# define BOOST_PP_TUPLE_ELEM_18_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) r
-#
-# define BOOST_PP_TUPLE_ELEM_19_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) a
-# define BOOST_PP_TUPLE_ELEM_19_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) b
-# define BOOST_PP_TUPLE_ELEM_19_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) c
-# define BOOST_PP_TUPLE_ELEM_19_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) d
-# define BOOST_PP_TUPLE_ELEM_19_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) e
-# define BOOST_PP_TUPLE_ELEM_19_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) f
-# define BOOST_PP_TUPLE_ELEM_19_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) g
-# define BOOST_PP_TUPLE_ELEM_19_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) h
-# define BOOST_PP_TUPLE_ELEM_19_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) i
-# define BOOST_PP_TUPLE_ELEM_19_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) j
-# define BOOST_PP_TUPLE_ELEM_19_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) k
-# define BOOST_PP_TUPLE_ELEM_19_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) l
-# define BOOST_PP_TUPLE_ELEM_19_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) m
-# define BOOST_PP_TUPLE_ELEM_19_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) n
-# define BOOST_PP_TUPLE_ELEM_19_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) o
-# define BOOST_PP_TUPLE_ELEM_19_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) p
-# define BOOST_PP_TUPLE_ELEM_19_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) q
-# define BOOST_PP_TUPLE_ELEM_19_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) r
-# define BOOST_PP_TUPLE_ELEM_19_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) s
-#
-# define BOOST_PP_TUPLE_ELEM_20_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) a
-# define BOOST_PP_TUPLE_ELEM_20_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) b
-# define BOOST_PP_TUPLE_ELEM_20_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) c
-# define BOOST_PP_TUPLE_ELEM_20_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) d
-# define BOOST_PP_TUPLE_ELEM_20_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) e
-# define BOOST_PP_TUPLE_ELEM_20_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) f
-# define BOOST_PP_TUPLE_ELEM_20_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) g
-# define BOOST_PP_TUPLE_ELEM_20_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) h
-# define BOOST_PP_TUPLE_ELEM_20_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) i
-# define BOOST_PP_TUPLE_ELEM_20_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) j
-# define BOOST_PP_TUPLE_ELEM_20_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) k
-# define BOOST_PP_TUPLE_ELEM_20_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) l
-# define BOOST_PP_TUPLE_ELEM_20_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) m
-# define BOOST_PP_TUPLE_ELEM_20_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) n
-# define BOOST_PP_TUPLE_ELEM_20_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) o
-# define BOOST_PP_TUPLE_ELEM_20_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) p
-# define BOOST_PP_TUPLE_ELEM_20_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) q
-# define BOOST_PP_TUPLE_ELEM_20_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) r
-# define BOOST_PP_TUPLE_ELEM_20_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) s
-# define BOOST_PP_TUPLE_ELEM_20_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) t
-#
-# define BOOST_PP_TUPLE_ELEM_21_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) a
-# define BOOST_PP_TUPLE_ELEM_21_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) b
-# define BOOST_PP_TUPLE_ELEM_21_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) c
-# define BOOST_PP_TUPLE_ELEM_21_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) d
-# define BOOST_PP_TUPLE_ELEM_21_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) e
-# define BOOST_PP_TUPLE_ELEM_21_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) f
-# define BOOST_PP_TUPLE_ELEM_21_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) g
-# define BOOST_PP_TUPLE_ELEM_21_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) h
-# define BOOST_PP_TUPLE_ELEM_21_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) i
-# define BOOST_PP_TUPLE_ELEM_21_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) j
-# define BOOST_PP_TUPLE_ELEM_21_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) k
-# define BOOST_PP_TUPLE_ELEM_21_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) l
-# define BOOST_PP_TUPLE_ELEM_21_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) m
-# define BOOST_PP_TUPLE_ELEM_21_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) n
-# define BOOST_PP_TUPLE_ELEM_21_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) o
-# define BOOST_PP_TUPLE_ELEM_21_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) p
-# define BOOST_PP_TUPLE_ELEM_21_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) q
-# define BOOST_PP_TUPLE_ELEM_21_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) r
-# define BOOST_PP_TUPLE_ELEM_21_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) s
-# define BOOST_PP_TUPLE_ELEM_21_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) t
-# define BOOST_PP_TUPLE_ELEM_21_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) u
-#
-# define BOOST_PP_TUPLE_ELEM_22_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) a
-# define BOOST_PP_TUPLE_ELEM_22_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) b
-# define BOOST_PP_TUPLE_ELEM_22_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) c
-# define BOOST_PP_TUPLE_ELEM_22_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) d
-# define BOOST_PP_TUPLE_ELEM_22_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) e
-# define BOOST_PP_TUPLE_ELEM_22_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) f
-# define BOOST_PP_TUPLE_ELEM_22_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) g
-# define BOOST_PP_TUPLE_ELEM_22_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) h
-# define BOOST_PP_TUPLE_ELEM_22_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) i
-# define BOOST_PP_TUPLE_ELEM_22_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) j
-# define BOOST_PP_TUPLE_ELEM_22_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) k
-# define BOOST_PP_TUPLE_ELEM_22_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) l
-# define BOOST_PP_TUPLE_ELEM_22_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) m
-# define BOOST_PP_TUPLE_ELEM_22_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) n
-# define BOOST_PP_TUPLE_ELEM_22_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) o
-# define BOOST_PP_TUPLE_ELEM_22_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) p
-# define BOOST_PP_TUPLE_ELEM_22_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) q
-# define BOOST_PP_TUPLE_ELEM_22_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) r
-# define BOOST_PP_TUPLE_ELEM_22_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) s
-# define BOOST_PP_TUPLE_ELEM_22_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) t
-# define BOOST_PP_TUPLE_ELEM_22_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) u
-# define BOOST_PP_TUPLE_ELEM_22_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) v
-#
-# define BOOST_PP_TUPLE_ELEM_23_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) a
-# define BOOST_PP_TUPLE_ELEM_23_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) b
-# define BOOST_PP_TUPLE_ELEM_23_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) c
-# define BOOST_PP_TUPLE_ELEM_23_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) d
-# define BOOST_PP_TUPLE_ELEM_23_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) e
-# define BOOST_PP_TUPLE_ELEM_23_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) f
-# define BOOST_PP_TUPLE_ELEM_23_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) g
-# define BOOST_PP_TUPLE_ELEM_23_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) h
-# define BOOST_PP_TUPLE_ELEM_23_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) i
-# define BOOST_PP_TUPLE_ELEM_23_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) j
-# define BOOST_PP_TUPLE_ELEM_23_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) k
-# define BOOST_PP_TUPLE_ELEM_23_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) l
-# define BOOST_PP_TUPLE_ELEM_23_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) m
-# define BOOST_PP_TUPLE_ELEM_23_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) n
-# define BOOST_PP_TUPLE_ELEM_23_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) o
-# define BOOST_PP_TUPLE_ELEM_23_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) p
-# define BOOST_PP_TUPLE_ELEM_23_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) q
-# define BOOST_PP_TUPLE_ELEM_23_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) r
-# define BOOST_PP_TUPLE_ELEM_23_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) s
-# define BOOST_PP_TUPLE_ELEM_23_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) t
-# define BOOST_PP_TUPLE_ELEM_23_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) u
-# define BOOST_PP_TUPLE_ELEM_23_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) v
-# define BOOST_PP_TUPLE_ELEM_23_22(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) w
-#
-# define BOOST_PP_TUPLE_ELEM_24_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) a
-# define BOOST_PP_TUPLE_ELEM_24_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) b
-# define BOOST_PP_TUPLE_ELEM_24_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) c
-# define BOOST_PP_TUPLE_ELEM_24_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) d
-# define BOOST_PP_TUPLE_ELEM_24_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) e
-# define BOOST_PP_TUPLE_ELEM_24_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) f
-# define BOOST_PP_TUPLE_ELEM_24_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) g
-# define BOOST_PP_TUPLE_ELEM_24_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) h
-# define BOOST_PP_TUPLE_ELEM_24_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) i
-# define BOOST_PP_TUPLE_ELEM_24_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) j
-# define BOOST_PP_TUPLE_ELEM_24_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) k
-# define BOOST_PP_TUPLE_ELEM_24_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) l
-# define BOOST_PP_TUPLE_ELEM_24_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) m
-# define BOOST_PP_TUPLE_ELEM_24_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) n
-# define BOOST_PP_TUPLE_ELEM_24_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) o
-# define BOOST_PP_TUPLE_ELEM_24_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) p
-# define BOOST_PP_TUPLE_ELEM_24_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) q
-# define BOOST_PP_TUPLE_ELEM_24_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) r
-# define BOOST_PP_TUPLE_ELEM_24_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) s
-# define BOOST_PP_TUPLE_ELEM_24_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) t
-# define BOOST_PP_TUPLE_ELEM_24_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) u
-# define BOOST_PP_TUPLE_ELEM_24_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) v
-# define BOOST_PP_TUPLE_ELEM_24_22(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) w
-# define BOOST_PP_TUPLE_ELEM_24_23(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) x
-#
-# define BOOST_PP_TUPLE_ELEM_25_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) a
-# define BOOST_PP_TUPLE_ELEM_25_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) b
-# define BOOST_PP_TUPLE_ELEM_25_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) c
-# define BOOST_PP_TUPLE_ELEM_25_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) d
-# define BOOST_PP_TUPLE_ELEM_25_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) e
-# define BOOST_PP_TUPLE_ELEM_25_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) f
-# define BOOST_PP_TUPLE_ELEM_25_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) g
-# define BOOST_PP_TUPLE_ELEM_25_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) h
-# define BOOST_PP_TUPLE_ELEM_25_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) i
-# define BOOST_PP_TUPLE_ELEM_25_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) j
-# define BOOST_PP_TUPLE_ELEM_25_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) k
-# define BOOST_PP_TUPLE_ELEM_25_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) l
-# define BOOST_PP_TUPLE_ELEM_25_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) m
-# define BOOST_PP_TUPLE_ELEM_25_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) n
-# define BOOST_PP_TUPLE_ELEM_25_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) o
-# define BOOST_PP_TUPLE_ELEM_25_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) p
-# define BOOST_PP_TUPLE_ELEM_25_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) q
-# define BOOST_PP_TUPLE_ELEM_25_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) r
-# define BOOST_PP_TUPLE_ELEM_25_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) s
-# define BOOST_PP_TUPLE_ELEM_25_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) t
-# define BOOST_PP_TUPLE_ELEM_25_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) u
-# define BOOST_PP_TUPLE_ELEM_25_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) v
-# define BOOST_PP_TUPLE_ELEM_25_22(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) w
-# define BOOST_PP_TUPLE_ELEM_25_23(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) x
-# define BOOST_PP_TUPLE_ELEM_25_24(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) y
-#
 # endif
diff --git a/ext/boost/preprocessor/tuple/rem.hpp b/ext/boost/preprocessor/tuple/rem.hpp
index 9b76df9..4e3362c 100644
--- a/ext/boost/preprocessor/tuple/rem.hpp
+++ b/ext/boost/preprocessor/tuple/rem.hpp
@@ -1,9 +1,10 @@
 # /* **************************************************************************
 #  *                                                                          *
-#  *     (C) Copyright Paul Mensonides 2002.
-#  *     Distributed under the Boost Software License, Version 1.0. (See
-#  *     accompanying file LICENSE_1_0.txt or copy at
-#  *     http://www.boost.org/LICENSE_1_0.txt)
+#  *     (C) Copyright Paul Mensonides 2002-2011.                             *
+#  *     (C) Copyright Edward Diener 2011.                                    *
+#  *     Distributed under the Boost Software License, Version 1.0. (See      *
+#  *     accompanying file LICENSE_1_0.txt or copy at                         *
+#  *     http://www.boost.org/LICENSE_1_0.txt)                                *
 #  *                                                                          *
 #  ************************************************************************** */
 #
@@ -12,61 +13,122 @@
 # ifndef BOOST_PREPROCESSOR_TUPLE_REM_HPP
 # define BOOST_PREPROCESSOR_TUPLE_REM_HPP
 #
+# include <boost/preprocessor/cat.hpp>
 # include <boost/preprocessor/config/config.hpp>
+# include <boost/preprocessor/facilities/overload.hpp>
 #
-# /* BOOST_PP_TUPLE_REM */
+# /* BOOST_PP_REM */
 #
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
-#    define BOOST_PP_TUPLE_REM(size) BOOST_PP_TUPLE_REM_I(size)
+# if BOOST_PP_VARIADICS
+#    define BOOST_PP_REM(...) __VA_ARGS__
 # else
-#    define BOOST_PP_TUPLE_REM(size) BOOST_PP_TUPLE_REM_OO((size))
-#    define BOOST_PP_TUPLE_REM_OO(par) BOOST_PP_TUPLE_REM_I ## par
+#    define BOOST_PP_REM(x) x
 # endif
 #
-# define BOOST_PP_TUPLE_REM_I(size) BOOST_PP_TUPLE_REM_ ## size
-#
-# define BOOST_PP_TUPLE_REM_0()
-# define BOOST_PP_TUPLE_REM_1(a) a
-# define BOOST_PP_TUPLE_REM_2(a, b) a, b
-# define BOOST_PP_TUPLE_REM_3(a, b, c) a, b, c
-# define BOOST_PP_TUPLE_REM_4(a, b, c, d) a, b, c, d
-# define BOOST_PP_TUPLE_REM_5(a, b, c, d, e) a, b, c, d, e
-# define BOOST_PP_TUPLE_REM_6(a, b, c, d, e, f) a, b, c, d, e, f
-# define BOOST_PP_TUPLE_REM_7(a, b, c, d, e, f, g) a, b, c, d, e, f, g
-# define BOOST_PP_TUPLE_REM_8(a, b, c, d, e, f, g, h) a, b, c, d, e, f, g, h
-# define BOOST_PP_TUPLE_REM_9(a, b, c, d, e, f, g, h, i) a, b, c, d, e, f, g, h, i
-# define BOOST_PP_TUPLE_REM_10(a, b, c, d, e, f, g, h, i, j) a, b, c, d, e, f, g, h, i, j
-# define BOOST_PP_TUPLE_REM_11(a, b, c, d, e, f, g, h, i, j, k) a, b, c, d, e, f, g, h, i, j, k
-# define BOOST_PP_TUPLE_REM_12(a, b, c, d, e, f, g, h, i, j, k, l) a, b, c, d, e, f, g, h, i, j, k, l
-# define BOOST_PP_TUPLE_REM_13(a, b, c, d, e, f, g, h, i, j, k, l, m) a, b, c, d, e, f, g, h, i, j, k, l, m
-# define BOOST_PP_TUPLE_REM_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n) a, b, c, d, e, f, g, h, i, j, k, l, m, n
-# define BOOST_PP_TUPLE_REM_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) a, b, c, d, e, f, g, h, i, j, k, l, m, n, o
-# define BOOST_PP_TUPLE_REM_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p
-# define BOOST_PP_TUPLE_REM_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q
-# define BOOST_PP_TUPLE_REM_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r
-# define BOOST_PP_TUPLE_REM_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s
-# define BOOST_PP_TUPLE_REM_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t
-# define BOOST_PP_TUPLE_REM_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u
-# define BOOST_PP_TUPLE_REM_22(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v
-# define BOOST_PP_TUPLE_REM_23(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w
-# define BOOST_PP_TUPLE_REM_24(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x
-# define BOOST_PP_TUPLE_REM_25(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y
-#
-# /* BOOST_PP_TUPLE_REM_CTOR */
+# /* BOOST_PP_TUPLE_REM */
 #
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_TUPLE_REM_CTOR(size, tuple) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_TUPLE_REM(size), tuple)
+# if BOOST_PP_VARIADICS
+#    define BOOST_PP_TUPLE_REM(size) BOOST_PP_REM
 # else
-#    define BOOST_PP_TUPLE_REM_CTOR(size, tuple) BOOST_PP_TUPLE_REM_CTOR_D(size, tuple)
-#    define BOOST_PP_TUPLE_REM_CTOR_D(size, tuple) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_TUPLE_REM(size), tuple)
+#    if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
+#        define BOOST_PP_TUPLE_REM(size) BOOST_PP_TUPLE_REM_I(size)
+#    else
+#        define BOOST_PP_TUPLE_REM(size) BOOST_PP_TUPLE_REM_OO((size))
+#        define BOOST_PP_TUPLE_REM_OO(par) BOOST_PP_TUPLE_REM_I ## par
+#    endif
+#    define BOOST_PP_TUPLE_REM_I(size) BOOST_PP_TUPLE_REM_ ## size
 # endif
+# define BOOST_PP_TUPLE_REM_1(e0) e0
+# define BOOST_PP_TUPLE_REM_2(e0, e1) e0, e1
+# define BOOST_PP_TUPLE_REM_3(e0, e1, e2) e0, e1, e2
+# define BOOST_PP_TUPLE_REM_4(e0, e1, e2, e3) e0, e1, e2, e3
+# define BOOST_PP_TUPLE_REM_5(e0, e1, e2, e3, e4) e0, e1, e2, e3, e4
+# define BOOST_PP_TUPLE_REM_6(e0, e1, e2, e3, e4, e5) e0, e1, e2, e3, e4, e5
+# define BOOST_PP_TUPLE_REM_7(e0, e1, e2, e3, e4, e5, e6) e0, e1, e2, e3, e4, e5, e6
+# define BOOST_PP_TUPLE_REM_8(e0, e1, e2, e3, e4, e5, e6, e7) e0, e1, e2, e3, e4, e5, e6, e7
+# define BOOST_PP_TUPLE_REM_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) e0, e1, e2, e3, e4, e5, e6, e7, e8
+# define BOOST_PP_TUPLE_REM_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9
+# define BOOST_PP_TUPLE_REM_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10
+# define BOOST_PP_TUPLE_REM_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11
+# define BOOST_PP_TUPLE_REM_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12
+# define BOOST_PP_TUPLE_REM_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13
+# define BOOST_PP_TUPLE_REM_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14
+# define BOOST_PP_TUPLE_REM_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15
+# define BOOST_PP_TUPLE_REM_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16
+# define BOOST_PP_TUPLE_REM_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17
+# define BOOST_PP_TUPLE_REM_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18
+# define BOOST_PP_TUPLE_REM_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19
+# define BOOST_PP_TUPLE_REM_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20
+# define BOOST_PP_TUPLE_REM_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21
+# define BOOST_PP_TUPLE_REM_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22
+# define BOOST_PP_TUPLE_REM_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23
+# define BOOST_PP_TUPLE_REM_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24
+# define BOOST_PP_TUPLE_REM_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25
+# define BOOST_PP_TUPLE_REM_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26
+# define BOOST_PP_TUPLE_REM_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27
+# define BOOST_PP_TUPLE_REM_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28
+# define BOOST_PP_TUPLE_REM_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29
+# define BOOST_PP_TUPLE_REM_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30
+# define BOOST_PP_TUPLE_REM_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31
+# define BOOST_PP_TUPLE_REM_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32
+# define BOOST_PP_TUPLE_REM_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33
+# define BOOST_PP_TUPLE_REM_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34
+# define BOOST_PP_TUPLE_REM_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35
+# define BOOST_PP_TUPLE_REM_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36
+# define BOOST_PP_TUPLE_REM_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37
+# define BOOST_PP_TUPLE_REM_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38
+# define BOOST_PP_TUPLE_REM_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39
+# define BOOST_PP_TUPLE_REM_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40
+# define BOOST_PP_TUPLE_REM_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41
+# define BOOST_PP_TUPLE_REM_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42
+# define BOOST_PP_TUPLE_REM_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43
+# define BOOST_PP_TUPLE_REM_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44
+# define BOOST_PP_TUPLE_REM_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45
+# define BOOST_PP_TUPLE_REM_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46
+# define BOOST_PP_TUPLE_REM_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47
+# define BOOST_PP_TUPLE_REM_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48
+# define BOOST_PP_TUPLE_REM_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e [...]
+# define BOOST_PP_TUPLE_REM_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e [...]
+# define BOOST_PP_TUPLE_REM_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e [...]
+# define BOOST_PP_TUPLE_REM_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e [...]
+# define BOOST_PP_TUPLE_REM_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e [...]
+# define BOOST_PP_TUPLE_REM_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e [...]
+# define BOOST_PP_TUPLE_REM_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e [...]
+# define BOOST_PP_TUPLE_REM_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e [...]
+# define BOOST_PP_TUPLE_REM_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e [...]
+# define BOOST_PP_TUPLE_REM_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e [...]
+# define BOOST_PP_TUPLE_REM_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e [...]
+# define BOOST_PP_TUPLE_REM_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e [...]
+# define BOOST_PP_TUPLE_REM_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e [...]
+# define BOOST_PP_TUPLE_REM_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e [...]
+# define BOOST_PP_TUPLE_REM_64(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e [...]
+#
+# /* BOOST_PP_TUPLE_REM_CTOR */
 #
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
-#    define BOOST_PP_TUPLE_REM_CTOR_I(ext, tuple) ext tuple
+# if BOOST_PP_VARIADICS
+#    if BOOST_PP_VARIADICS_MSVC
+#        define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__), (__VA_ARGS__))
+#        define BOOST_PP_TUPLE_REM_CTOR_I(m, args) BOOST_PP_TUPLE_REM_CTOR_II(m, args)
+#        define BOOST_PP_TUPLE_REM_CTOR_II(m, args) BOOST_PP_CAT(m ## args,)
+#    else
+#        define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__)(__VA_ARGS__)
+#    endif
+#    define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_REM tuple
+#    define BOOST_PP_TUPLE_REM_CTOR_O_2(size, tuple) BOOST_PP_TUPLE_REM_CTOR_O_1(tuple)
 # else
-#    define BOOST_PP_TUPLE_REM_CTOR_I(ext, tuple) BOOST_PP_TUPLE_REM_CTOR_OO((ext, tuple))
-#    define BOOST_PP_TUPLE_REM_CTOR_OO(par) BOOST_PP_TUPLE_REM_CTOR_II ## par
-#    define BOOST_PP_TUPLE_REM_CTOR_II(ext, tuple) ext ## tuple
+#    if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+#        define BOOST_PP_TUPLE_REM_CTOR(size, tuple) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_TUPLE_REM(size), tuple)
+#    else
+#        define BOOST_PP_TUPLE_REM_CTOR(size, tuple) BOOST_PP_TUPLE_REM_CTOR_D(size, tuple)
+#        define BOOST_PP_TUPLE_REM_CTOR_D(size, tuple) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_TUPLE_REM(size), tuple)
+#    endif
+#    if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
+#        define BOOST_PP_TUPLE_REM_CTOR_I(ext, tuple) ext tuple
+#    else
+#        define BOOST_PP_TUPLE_REM_CTOR_I(ext, tuple) BOOST_PP_TUPLE_REM_CTOR_OO((ext, tuple))
+#        define BOOST_PP_TUPLE_REM_CTOR_OO(par) BOOST_PP_TUPLE_REM_CTOR_II ## par
+#        define BOOST_PP_TUPLE_REM_CTOR_II(ext, tuple) ext ## tuple
+#    endif
 # endif
 #
 # endif
diff --git a/ext/boost/preprocessor/tuple/to_list.hpp b/ext/boost/preprocessor/tuple/to_list.hpp
index e8af8dd..2a9d6fe 100644
--- a/ext/boost/preprocessor/tuple/to_list.hpp
+++ b/ext/boost/preprocessor/tuple/to_list.hpp
@@ -7,56 +7,110 @@
 #  * http://www.boost.org/LICENSE_1_0.txt)
 #  */
 #
-# /* Revised by Paul Mensonides (2002) */
+# /* Revised by Paul Mensonides (2002-2011) */
+# /* Revised by Edward Diener (2011) */
 #
 # /* See http://www.boost.org for most recent version. */
 #
 # ifndef BOOST_PREPROCESSOR_TUPLE_TO_LIST_HPP
 # define BOOST_PREPROCESSOR_TUPLE_TO_LIST_HPP
 #
+# include <boost/preprocessor/cat.hpp>
 # include <boost/preprocessor/config/config.hpp>
+# include <boost/preprocessor/facilities/overload.hpp>
+# include <boost/preprocessor/variadic/size.hpp>
 #
 # /* BOOST_PP_TUPLE_TO_LIST */
 #
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
-#    define BOOST_PP_TUPLE_TO_LIST(size, tuple) BOOST_PP_TUPLE_TO_LIST_I(size, tuple)
-#    if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
-#        define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_ ## s t
+# if BOOST_PP_VARIADICS
+#    if BOOST_PP_VARIADICS_MSVC
+#        define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_TUPLE_TO_LIST_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__), (__VA_ARGS__))
+#        define BOOST_PP_TUPLE_TO_LIST_I(m, args) BOOST_PP_TUPLE_TO_LIST_II(m, args)
+#        define BOOST_PP_TUPLE_TO_LIST_II(m, args) BOOST_PP_CAT(m ## args,)
 #    else
-#        define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_II(BOOST_PP_TUPLE_TO_LIST_ ## s t)
-#        define BOOST_PP_TUPLE_TO_LIST_II(res) res
+#        define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__)(__VA_ARGS__)
 #    endif
+#    define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_VARIADIC_SIZE tuple) tuple
+#    define BOOST_PP_TUPLE_TO_LIST_O_2(size, tuple) BOOST_PP_TUPLE_TO_LIST_O_1(tuple)
 # else
-#    define BOOST_PP_TUPLE_TO_LIST(size, tuple) BOOST_PP_TUPLE_TO_LIST_OO((size, tuple))
-#    define BOOST_PP_TUPLE_TO_LIST_OO(par) BOOST_PP_TUPLE_TO_LIST_I ## par
-#    define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_ ## s ## t
+#    if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
+#        define BOOST_PP_TUPLE_TO_LIST(size, tuple) BOOST_PP_TUPLE_TO_LIST_I(size, tuple)
+#        if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
+#            define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_ ## s t
+#        else
+#            define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_II(BOOST_PP_TUPLE_TO_LIST_ ## s t)
+#            define BOOST_PP_TUPLE_TO_LIST_II(res) res
+#        endif
+#    else
+#        define BOOST_PP_TUPLE_TO_LIST(size, tuple) BOOST_PP_TUPLE_TO_LIST_OO((size, tuple))
+#        define BOOST_PP_TUPLE_TO_LIST_OO(par) BOOST_PP_TUPLE_TO_LIST_I ## par
+#        define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_ ## s ## t
+#    endif
 # endif
 #
-# define BOOST_PP_TUPLE_TO_LIST_0() BOOST_PP_NIL
-# define BOOST_PP_TUPLE_TO_LIST_1(a) (a, BOOST_PP_NIL)
-# define BOOST_PP_TUPLE_TO_LIST_2(a, b) (a, (b, BOOST_PP_NIL))
-# define BOOST_PP_TUPLE_TO_LIST_3(a, b, c) (a, (b, (c, BOOST_PP_NIL)))
-# define BOOST_PP_TUPLE_TO_LIST_4(a, b, c, d) (a, (b, (c, (d, BOOST_PP_NIL))))
-# define BOOST_PP_TUPLE_TO_LIST_5(a, b, c, d, e) (a, (b, (c, (d, (e, BOOST_PP_NIL)))))
-# define BOOST_PP_TUPLE_TO_LIST_6(a, b, c, d, e, f) (a, (b, (c, (d, (e, (f, BOOST_PP_NIL))))))
-# define BOOST_PP_TUPLE_TO_LIST_7(a, b, c, d, e, f, g) (a, (b, (c, (d, (e, (f, (g, BOOST_PP_NIL)))))))
-# define BOOST_PP_TUPLE_TO_LIST_8(a, b, c, d, e, f, g, h) (a, (b, (c, (d, (e, (f, (g, (h, BOOST_PP_NIL))))))))
-# define BOOST_PP_TUPLE_TO_LIST_9(a, b, c, d, e, f, g, h, i) (a, (b, (c, (d, (e, (f, (g, (h, (i, BOOST_PP_NIL)))))))))
-# define BOOST_PP_TUPLE_TO_LIST_10(a, b, c, d, e, f, g, h, i, j) (a, (b, (c, (d, (e, (f, (g, (h, (i, (j, BOOST_PP_NIL))))))))))
-# define BOOST_PP_TUPLE_TO_LIST_11(a, b, c, d, e, f, g, h, i, j, k) (a, (b, (c, (d, (e, (f, (g, (h, (i, (j, (k, BOOST_PP_NIL)))))))))))
-# define BOOST_PP_TUPLE_TO_LIST_12(a, b, c, d, e, f, g, h, i, j, k, l) (a, (b, (c, (d, (e, (f, (g, (h, (i, (j, (k, (l, BOOST_PP_NIL))))))))))))
-# define BOOST_PP_TUPLE_TO_LIST_13(a, b, c, d, e, f, g, h, i, j, k, l, m) (a, (b, (c, (d, (e, (f, (g, (h, (i, (j, (k, (l, (m, BOOST_PP_NIL)))))))))))))
-# define BOOST_PP_TUPLE_TO_LIST_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n) (a, (b, (c, (d, (e, (f, (g, (h, (i, (j, (k, (l, (m, (n, BOOST_PP_NIL))))))))))))))
-# define BOOST_PP_TUPLE_TO_LIST_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) (a, (b, (c, (d, (e, (f, (g, (h, (i, (j, (k, (l, (m, (n, (o, BOOST_PP_NIL)))))))))))))))
-# define BOOST_PP_TUPLE_TO_LIST_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) (a, (b, (c, (d, (e, (f, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, BOOST_PP_NIL))))))))))))))))
-# define BOOST_PP_TUPLE_TO_LIST_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) (a, (b, (c, (d, (e, (f, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, BOOST_PP_NIL)))))))))))))))))
-# define BOOST_PP_TUPLE_TO_LIST_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) (a, (b, (c, (d, (e, (f, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, BOOST_PP_NIL))))))))))))))))))
-# define BOOST_PP_TUPLE_TO_LIST_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) (a, (b, (c, (d, (e, (f, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, BOOST_PP_NIL)))))))))))))))))))
-# define BOOST_PP_TUPLE_TO_LIST_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) (a, (b, (c, (d, (e, (f, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, (t, BOOST_PP_NIL))))))))))))))))))))
-# define BOOST_PP_TUPLE_TO_LIST_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) (a, (b, (c, (d, (e, (f, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, (t, (u, BOOST_PP_NIL)))))))))))))))))))))
-# define BOOST_PP_TUPLE_TO_LIST_22(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) (a, (b, (c, (d, (e, (f, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, (t, (u, (v, BOOST_PP_NIL))))))))))))))))))))))
-# define BOOST_PP_TUPLE_TO_LIST_23(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) (a, (b, (c, (d, (e, (f, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, (t, (u, (v, (w, BOOST_PP_NIL)))))))))))))))))))))))
-# define BOOST_PP_TUPLE_TO_LIST_24(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) (a, (b, (c, (d, (e, (f, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, (t, (u, (v, (w, (x, BOOST_PP_NIL))))))))))))))))))))))))
-# define BOOST_PP_TUPLE_TO_LIST_25(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) (a, (b, (c, (d, (e, (f, (g, (h, (i, (j, (k, (l, (m, (n, (o, (p, (q, (r, (s, (t, (u, (v, (w, (x, (y, BOOST_PP_NIL)))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_1(e0) (e0, BOOST_PP_NIL)
+# define BOOST_PP_TUPLE_TO_LIST_2(e0, e1) (e0, (e1, BOOST_PP_NIL))
+# define BOOST_PP_TUPLE_TO_LIST_3(e0, e1, e2) (e0, (e1, (e2, BOOST_PP_NIL)))
+# define BOOST_PP_TUPLE_TO_LIST_4(e0, e1, e2, e3) (e0, (e1, (e2, (e3, BOOST_PP_NIL))))
+# define BOOST_PP_TUPLE_TO_LIST_5(e0, e1, e2, e3, e4) (e0, (e1, (e2, (e3, (e4, BOOST_PP_NIL)))))
+# define BOOST_PP_TUPLE_TO_LIST_6(e0, e1, e2, e3, e4, e5) (e0, (e1, (e2, (e3, (e4, (e5, BOOST_PP_NIL))))))
+# define BOOST_PP_TUPLE_TO_LIST_7(e0, e1, e2, e3, e4, e5, e6) (e0, (e1, (e2, (e3, (e4, (e5, (e6, BOOST_PP_NIL)))))))
+# define BOOST_PP_TUPLE_TO_LIST_8(e0, e1, e2, e3, e4, e5, e6, e7) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, BOOST_PP_NIL))))))))
+# define BOOST_PP_TUPLE_TO_LIST_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, BOOST_PP_NIL)))))))))
+# define BOOST_PP_TUPLE_TO_LIST_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, BOOST_PP_NIL))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, BOOST_PP_NIL)))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, BOOST_PP_NIL))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, BOOST_PP_NIL)))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, BOOST_PP_NIL))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, BOOST_PP_NIL)))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, BOOST_PP_NIL))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, BOOST_PP_NIL)))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, BOOST_PP_NIL))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, BOOST_PP_NIL)))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, BOOST_PP_NIL))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, BOOST_PP_NIL)))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, BOOST_PP_NIL))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, BOOST_PP_NIL)))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, BOOST_PP_NIL))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, BOOST_PP_NIL)))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, BOOST_PP_NIL))))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, BOOST_PP_NIL)))))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, BOOST_PP_NIL))))))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, BOOST_PP_NIL)))))))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, BOOST_PP_NIL))))))))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, BOOST_PP_NIL)))))))))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, BOOST_PP_NIL))))))))))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, BOOST_PP_NIL)))))))))))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, BOOST_PP_NIL))))))))))))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))
+# define BOOST_PP_TUPLE_TO_LIST_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, BOOST_PP_NIL))))))))))))))))))))))))) [...]
+# define BOOST_PP_TUPLE_TO_LIST_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, BOOST_PP_NIL)))))))))))))) [...]
+# define BOOST_PP_TUPLE_TO_LIST_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, BOOST_PP_NIL))) [...]
+# define BOOST_PP_TUPLE_TO_LIST_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, BOOS [...]
+# define BOOST_PP_TUPLE_TO_LIST_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, [...]
+# define BOOST_PP_TUPLE_TO_LIST_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41,  [...]
+# define BOOST_PP_TUPLE_TO_LIST_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, ( [...]
+# define BOOST_PP_TUPLE_TO_LIST_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e [...]
+# define BOOST_PP_TUPLE_TO_LIST_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e3 [...]
+# define BOOST_PP_TUPLE_TO_LIST_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38 [...]
+# define BOOST_PP_TUPLE_TO_LIST_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, [...]
+# define BOOST_PP_TUPLE_TO_LIST_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36,  [...]
+# define BOOST_PP_TUPLE_TO_LIST_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, ( [...]
+# define BOOST_PP_TUPLE_TO_LIST_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e [...]
+# define BOOST_PP_TUPLE_TO_LIST_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e3 [...]
+# define BOOST_PP_TUPLE_TO_LIST_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33 [...]
+# define BOOST_PP_TUPLE_TO_LIST_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, [...]
+# define BOOST_PP_TUPLE_TO_LIST_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31,  [...]
+# define BOOST_PP_TUPLE_TO_LIST_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, ( [...]
+# define BOOST_PP_TUPLE_TO_LIST_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e [...]
+# define BOOST_PP_TUPLE_TO_LIST_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e2 [...]
+# define BOOST_PP_TUPLE_TO_LIST_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28 [...]
+# define BOOST_PP_TUPLE_TO_LIST_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, [...]
+# define BOOST_PP_TUPLE_TO_LIST_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26,  [...]
+# define BOOST_PP_TUPLE_TO_LIST_64(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, ( [...]
 #
 # endif
diff --git a/ext/boost/preprocessor/variadic/elem.hpp b/ext/boost/preprocessor/variadic/elem.hpp
new file mode 100644
index 0000000..be38a94
--- /dev/null
+++ b/ext/boost/preprocessor/variadic/elem.hpp
@@ -0,0 +1,94 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Edward Diener 2011.                                    *
+#  *     (C) Copyright Paul Mensonides 2011.                                  *
+#  *     Distributed under the Boost Software License, Version 1.0. (See      *
+#  *     accompanying file LICENSE_1_0.txt or copy at                         *
+#  *     http://www.boost.org/LICENSE_1_0.txt)                                *
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_VARIADIC_ELEM_HPP
+# define BOOST_PREPROCESSOR_VARIADIC_ELEM_HPP
+#
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/config/config.hpp>
+#
+# /* BOOST_PP_VARIADIC_ELEM */
+#
+# if BOOST_PP_VARIADICS
+#    if BOOST_PP_VARIADICS_MSVC
+#        define BOOST_PP_VARIADIC_ELEM(n, ...) BOOST_PP_VARIADIC_ELEM_I(n,__VA_ARGS__)
+#        define BOOST_PP_VARIADIC_ELEM_I(n, ...) BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_VARIADIC_ELEM_, n)(__VA_ARGS__,),)
+#    else
+#        define BOOST_PP_VARIADIC_ELEM(n, ...) BOOST_PP_CAT(BOOST_PP_VARIADIC_ELEM_, n)(__VA_ARGS__,)
+#    endif
+#    define BOOST_PP_VARIADIC_ELEM_0(e0, ...) e0
+#    define BOOST_PP_VARIADIC_ELEM_1(e0, e1, ...) e1
+#    define BOOST_PP_VARIADIC_ELEM_2(e0, e1, e2, ...) e2
+#    define BOOST_PP_VARIADIC_ELEM_3(e0, e1, e2, e3, ...) e3
+#    define BOOST_PP_VARIADIC_ELEM_4(e0, e1, e2, e3, e4, ...) e4
+#    define BOOST_PP_VARIADIC_ELEM_5(e0, e1, e2, e3, e4, e5, ...) e5
+#    define BOOST_PP_VARIADIC_ELEM_6(e0, e1, e2, e3, e4, e5, e6, ...) e6
+#    define BOOST_PP_VARIADIC_ELEM_7(e0, e1, e2, e3, e4, e5, e6, e7, ...) e7
+#    define BOOST_PP_VARIADIC_ELEM_8(e0, e1, e2, e3, e4, e5, e6, e7, e8, ...) e8
+#    define BOOST_PP_VARIADIC_ELEM_9(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, ...) e9
+#    define BOOST_PP_VARIADIC_ELEM_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, ...) e10
+#    define BOOST_PP_VARIADIC_ELEM_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, ...) e11
+#    define BOOST_PP_VARIADIC_ELEM_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, ...) e12
+#    define BOOST_PP_VARIADIC_ELEM_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, ...) e13
+#    define BOOST_PP_VARIADIC_ELEM_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, ...) e14
+#    define BOOST_PP_VARIADIC_ELEM_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, ...) e15
+#    define BOOST_PP_VARIADIC_ELEM_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, ...) e16
+#    define BOOST_PP_VARIADIC_ELEM_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, ...) e17
+#    define BOOST_PP_VARIADIC_ELEM_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, ...) e18
+#    define BOOST_PP_VARIADIC_ELEM_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, ...) e19
+#    define BOOST_PP_VARIADIC_ELEM_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, ...) e20
+#    define BOOST_PP_VARIADIC_ELEM_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, ...) e21
+#    define BOOST_PP_VARIADIC_ELEM_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, ...) e22
+#    define BOOST_PP_VARIADIC_ELEM_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, ...) e23
+#    define BOOST_PP_VARIADIC_ELEM_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, ...) e24
+#    define BOOST_PP_VARIADIC_ELEM_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, ...) e25
+#    define BOOST_PP_VARIADIC_ELEM_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, ...) e26
+#    define BOOST_PP_VARIADIC_ELEM_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, ...) e27
+#    define BOOST_PP_VARIADIC_ELEM_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, ...) e28
+#    define BOOST_PP_VARIADIC_ELEM_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, ...) e29
+#    define BOOST_PP_VARIADIC_ELEM_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, ...) e30
+#    define BOOST_PP_VARIADIC_ELEM_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, ...) e31
+#    define BOOST_PP_VARIADIC_ELEM_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, ...) e32
+#    define BOOST_PP_VARIADIC_ELEM_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, ...) e33
+#    define BOOST_PP_VARIADIC_ELEM_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, ...) e34
+#    define BOOST_PP_VARIADIC_ELEM_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, ...) e35
+#    define BOOST_PP_VARIADIC_ELEM_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, ...) e36
+#    define BOOST_PP_VARIADIC_ELEM_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, ...) e37
+#    define BOOST_PP_VARIADIC_ELEM_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, ...) e38
+#    define BOOST_PP_VARIADIC_ELEM_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, ...) e39
+#    define BOOST_PP_VARIADIC_ELEM_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, ...) e40
+#    define BOOST_PP_VARIADIC_ELEM_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, ...) e41
+#    define BOOST_PP_VARIADIC_ELEM_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, ...) e42
+#    define BOOST_PP_VARIADIC_ELEM_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, ...) e43
+#    define BOOST_PP_VARIADIC_ELEM_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, ...) e44
+#    define BOOST_PP_VARIADIC_ELEM_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, ...) e45
+#    define BOOST_PP_VARIADIC_ELEM_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, ...) e46
+#    define BOOST_PP_VARIADIC_ELEM_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, ...) e47
+#    define BOOST_PP_VARIADIC_ELEM_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, ...) e48
+#    define BOOST_PP_VARIADIC_ELEM_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, ...) e49
+#    define BOOST_PP_VARIADIC_ELEM_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, ...) e50
+#    define BOOST_PP_VARIADIC_ELEM_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, ...) e51
+#    define BOOST_PP_VARIADIC_ELEM_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, ...) e52
+#    define BOOST_PP_VARIADIC_ELEM_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, ...) e53
+#    define BOOST_PP_VARIADIC_ELEM_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, ...) e54
+#    define BOOST_PP_VARIADIC_ELEM_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, ...) e55
+#    define BOOST_PP_VARIADIC_ELEM_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, ...) e56
+#    define BOOST_PP_VARIADIC_ELEM_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, ...) e57
+#    define BOOST_PP_VARIADIC_ELEM_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, ...) e58
+#    define BOOST_PP_VARIADIC_ELEM_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, ...) e59
+#    define BOOST_PP_VARIADIC_ELEM_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, ...) e60
+#    define BOOST_PP_VARIADIC_ELEM_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, ...) e61
+#    define BOOST_PP_VARIADIC_ELEM_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, ...) e62
+#    define BOOST_PP_VARIADIC_ELEM_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, ...) e63
+# endif
+#
+# endif
diff --git a/ext/boost/preprocessor/variadic/size.hpp b/ext/boost/preprocessor/variadic/size.hpp
new file mode 100644
index 0000000..b92a5ff
--- /dev/null
+++ b/ext/boost/preprocessor/variadic/size.hpp
@@ -0,0 +1,30 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Edward Diener 2011.                                    *
+#  *     (C) Copyright Paul Mensonides 2011.                                  *
+#  *     Distributed under the Boost Software License, Version 1.0. (See      *
+#  *     accompanying file LICENSE_1_0.txt or copy at                         *
+#  *     http://www.boost.org/LICENSE_1_0.txt)                                *
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_VARIADIC_SIZE_HPP
+# define BOOST_PREPROCESSOR_VARIADIC_SIZE_HPP
+#
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/config/config.hpp>
+#
+# /* BOOST_PP_VARIADIC_SIZE */
+#
+# if BOOST_PP_VARIADICS
+#    if BOOST_PP_VARIADICS_MSVC
+#        define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,),)
+#    else
+#        define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,)
+#    endif
+#    define BOOST_PP_VARIADIC_SIZE_I(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, size, ...) size
+# endif
+#
+# endif
diff --git a/ext/boost/range/._as_literal.hpp b/ext/boost/range/._as_literal.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/._as_literal.hpp and /dev/null differ
diff --git a/ext/boost/range/._config.hpp b/ext/boost/range/._config.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/._config.hpp and /dev/null differ
diff --git a/ext/boost/range/._const_iterator.hpp b/ext/boost/range/._const_iterator.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/._const_iterator.hpp and /dev/null differ
diff --git a/ext/boost/range/._difference_type.hpp b/ext/boost/range/._difference_type.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/._difference_type.hpp and /dev/null differ
diff --git a/ext/boost/range/._distance.hpp b/ext/boost/range/._distance.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/._distance.hpp and /dev/null differ
diff --git a/ext/boost/range/._empty.hpp b/ext/boost/range/._empty.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/._empty.hpp and /dev/null differ
diff --git a/ext/boost/range/._functions.hpp b/ext/boost/range/._functions.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/._functions.hpp and /dev/null differ
diff --git a/ext/boost/range/._iterator.hpp b/ext/boost/range/._iterator.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/._iterator.hpp and /dev/null differ
diff --git a/ext/boost/range/._iterator_range.hpp b/ext/boost/range/._iterator_range.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/._iterator_range.hpp and /dev/null differ
diff --git a/ext/boost/range/._iterator_range_io.hpp b/ext/boost/range/._iterator_range_io.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/._iterator_range_io.hpp and /dev/null differ
diff --git a/ext/boost/range/._mutable_iterator.hpp b/ext/boost/range/._mutable_iterator.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/._mutable_iterator.hpp and /dev/null differ
diff --git a/ext/boost/range/._rbegin.hpp b/ext/boost/range/._rbegin.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/._rbegin.hpp and /dev/null differ
diff --git a/ext/boost/range/._rend.hpp b/ext/boost/range/._rend.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/._rend.hpp and /dev/null differ
diff --git a/ext/boost/range/._reverse_iterator.hpp b/ext/boost/range/._reverse_iterator.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/._reverse_iterator.hpp and /dev/null differ
diff --git a/ext/boost/range/._size_type.hpp b/ext/boost/range/._size_type.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/._size_type.hpp and /dev/null differ
diff --git a/ext/boost/range/._value_type.hpp b/ext/boost/range/._value_type.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/._value_type.hpp and /dev/null differ
diff --git a/ext/boost/range/algorithm/._equal.hpp b/ext/boost/range/algorithm/._equal.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/algorithm/._equal.hpp and /dev/null differ
diff --git a/ext/boost/range/algorithm/equal.hpp b/ext/boost/range/algorithm/equal.hpp
index a3ebc29..4472bb1 100644
--- a/ext/boost/range/algorithm/equal.hpp
+++ b/ext/boost/range/algorithm/equal.hpp
@@ -31,7 +31,7 @@ namespace boost
                                 IteratorCategoryTag1,
                                 IteratorCategoryTag2 )
         {
-            do
+            while (true)
             {
                 // If we have reached the end of the left range then this is
                 // the end of the loop. They are equal if and only if we have
@@ -46,7 +46,12 @@ namespace boost
                     return false;
 
                 // continue looping if and only if the values are equal
-            } while(*first1++ == *first2++);
+                if (*first1 != *first2)
+                    break;
+
+                ++first1;
+                ++first2;
+            }
 
             // Reaching this line in the algorithm indicates that a value
             // inequality has been detected.
@@ -66,7 +71,7 @@ namespace boost
                                 IteratorCategoryTag1,
                                 IteratorCategoryTag2 )
         {
-            do
+            while (true)
             {
                 // If we have reached the end of the left range then this is
                 // the end of the loop. They are equal if and only if we have
@@ -81,7 +86,12 @@ namespace boost
                     return false;
 
                 // continue looping if and only if the values are equal
-            } while(pred(*first1++, *first2++));
+                if (!pred(*first1, *first2))
+                    break;
+
+                ++first1;
+                ++first2;
+            }
 
             // Reaching this line in the algorithm indicates that a value
             // inequality has been detected.
@@ -182,7 +192,7 @@ namespace boost
         }
 
     } // namespace range
-    using range::equal;
+    using ::boost::range::equal;
 } // namespace boost
 
 #endif // include guard
diff --git a/ext/boost/range/as_literal.hpp b/ext/boost/range/as_literal.hpp
index f67ead7..9ea144d 100644
--- a/ext/boost/range/as_literal.hpp
+++ b/ext/boost/range/as_literal.hpp
@@ -74,7 +74,7 @@ namespace boost
 #endif
 
         template< class T >
-        inline long is_char_ptr( T /* r */ )
+        inline long is_char_ptr( const T& /* r */ )
         {
             return 0L;
         }
diff --git a/ext/boost/range/begin.hpp b/ext/boost/range/begin.hpp
index a4a5e10..c668488 100644
--- a/ext/boost/range/begin.hpp
+++ b/ext/boost/range/begin.hpp
@@ -91,6 +91,11 @@ namespace range_detail
 } // namespace 'range_detail'
 #endif
 
+// Use a ADL namespace barrier to avoid ambiguity with other unqualified
+// calls. This is particularly important with C++0x encouraging
+// unqualified calls to begin/end.
+namespace range_adl_barrier
+{
 
 template< class T >
 inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type begin( T& r )
@@ -114,19 +119,25 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type begin( const T& r )
     return range_begin( r );
 }
 
+    } // namespace range_adl_barrier
 } // namespace boost
 
 #endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
 
 namespace boost
 {
-    template< class T >
-    inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type
-    const_begin( const T& r )
+    namespace range_adl_barrier
     {
-        return boost::begin( r );
-    }
-}
+        template< class T >
+        inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type
+        const_begin( const T& r )
+        {
+            return boost::range_adl_barrier::begin( r );
+        }
+    } // namespace range_adl_barrier
+
+    using namespace range_adl_barrier;
+} // namespace boost
 
 #endif
 
diff --git a/ext/boost/range/concepts.hpp b/ext/boost/range/concepts.hpp
index 8e4d2cf..5965293 100644
--- a/ext/boost/range/concepts.hpp
+++ b/ext/boost/range/concepts.hpp
@@ -98,8 +98,9 @@ namespace boost {
         // classes:
         //
         // The Range algorithms often do not require that the iterators are
-        // Assignable, but the correct standard conformant iterators
-        // do require the iterators to be a model of the Assignable concept.
+        // Assignable or default constructable, but the correct standard
+        // conformant iterators do require the iterators to be a model of the
+        // Assignable concept.
         // Iterators that contains a functor that is not assignable therefore
         // are not correct models of the standard iterator concepts,
         // despite being adequate for most algorithms. An example of this
@@ -141,6 +142,26 @@ namespace boost {
                     BOOST_DEDUCED_TYPENAME SinglePassIteratorConcept::traversal_category,
                     single_pass_traversal_tag
                 >));
+
+            BOOST_CONCEPT_USAGE(SinglePassIteratorConcept)
+            {
+                Iterator i2(++i);
+                boost::ignore_unused_variable_warning(i2);
+
+                // deliberately we are loose with the postfix version for the single pass
+                // iterator due to the commonly poor adherence to the specification means that
+                // many algorithms would be unusable, whereas actually without the check they
+                // work
+                (void)(i++);
+
+                BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::reference r1(*i);
+                boost::ignore_unused_variable_warning(r1);
+
+                BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::reference r2(*(++i));
+                boost::ignore_unused_variable_warning(r2);
+            }
+        private:
+            Iterator i;
 #endif
         };
 
@@ -160,6 +181,20 @@ namespace boost {
                     BOOST_DEDUCED_TYPENAME ForwardIteratorConcept::traversal_category,
                     forward_traversal_tag
                 >));
+
+            BOOST_CONCEPT_USAGE(ForwardIteratorConcept)
+            {
+                // See the above note in the SinglePassIteratorConcept about the handling of the
+                // postfix increment. Since with forward and better iterators there is no need
+                // for a proxy, we can sensibly require that the dereference result
+                // is convertible to reference.
+                Iterator i2(i++);
+                boost::ignore_unused_variable_warning(i2);
+                BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::reference r(*(i++));
+                boost::ignore_unused_variable_warning(r);
+            }
+        private:
+            Iterator i;
 #endif
          };
 
diff --git a/ext/boost/range/detail/._common.hpp b/ext/boost/range/detail/._common.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/detail/._common.hpp and /dev/null differ
diff --git a/ext/boost/range/detail/._extract_optional_type.hpp b/ext/boost/range/detail/._extract_optional_type.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/detail/._extract_optional_type.hpp and /dev/null differ
diff --git a/ext/boost/range/detail/._implementation_help.hpp b/ext/boost/range/detail/._implementation_help.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/detail/._implementation_help.hpp and /dev/null differ
diff --git a/ext/boost/range/detail/._misc_concept.hpp b/ext/boost/range/detail/._misc_concept.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/detail/._misc_concept.hpp and /dev/null differ
diff --git a/ext/boost/range/detail/._sfinae.hpp b/ext/boost/range/detail/._sfinae.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/detail/._sfinae.hpp and /dev/null differ
diff --git a/ext/boost/range/detail/._str_types.hpp b/ext/boost/range/detail/._str_types.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/range/detail/._str_types.hpp and /dev/null differ
diff --git a/ext/boost/range/detail/safe_bool.hpp b/ext/boost/range/detail/safe_bool.hpp
new file mode 100644
index 0000000..182e510
--- /dev/null
+++ b/ext/boost/range/detail/safe_bool.hpp
@@ -0,0 +1,72 @@
+//  This header intentionally has no include guards.
+//
+//  Copyright (c) 2010 Neil Groves
+//  Distributed under the Boost Software License, Version 1.0.
+//  See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt
+//
+// This code utilises the experience gained during the evolution of
+// <boost/smart_ptr/operator_bool.hpp>
+#ifndef BOOST_RANGE_SAFE_BOOL_INCLUDED_HPP
+#define BOOST_RANGE_SAFE_BOOL_INCLUDED_HPP
+
+#include <boost/config.hpp>
+#include <boost/range/config.hpp>
+
+namespace boost
+{
+    namespace range_detail
+    {
+
+template<class DataMemberPtr>
+class safe_bool
+{
+public:
+    typedef safe_bool this_type;
+
+#if (defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570)) || defined(__CINT_)
+    typedef bool unspecified_bool_type;
+    static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr)
+    {
+        return x;
+    }
+#elif defined(_MANAGED)
+    static void unspecified_bool(this_type***)
+    {
+    }
+    typedef void(*unspecified_bool_type)(this_type***);
+    static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr)
+    {
+        return x ? unspecified_bool : 0;
+    }
+#elif \
+    ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \
+    ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \
+    ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) )
+
+    typedef bool (this_type::*unspecified_bool_type)() const;
+
+    static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr)
+    {
+        return x ? &this_type::detail_safe_bool_member_fn : 0;
+    }
+private:
+    bool detail_safe_bool_member_fn() const { return false; }
+#else
+    typedef DataMemberPtr unspecified_bool_type;
+    static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr p)
+    {
+        return x ? p : 0;
+    }
+#endif
+private:
+    safe_bool();
+    safe_bool(const safe_bool&);
+    void operator=(const safe_bool&);
+    ~safe_bool();
+};
+
+    } // namespace range_detail
+} // namespace boost
+
+#endif // include guard
diff --git a/ext/boost/range/end.hpp b/ext/boost/range/end.hpp
index 3063c02..d5e6526 100644
--- a/ext/boost/range/end.hpp
+++ b/ext/boost/range/end.hpp
@@ -88,6 +88,9 @@ namespace range_detail
 } // namespace 'range_detail'
 #endif
 
+namespace range_adl_barrier
+{
+
 template< class T >
 inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type end( T& r )
 {
@@ -110,22 +113,24 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type end( const T& r )
     return range_end( r );
 }
 
+    } // namespace range_adl_barrier
 } // namespace 'boost'
 
-
-
 #endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
 
-
 namespace boost
 {
-    template< class T >
-    inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type
-    const_end( const T& r )
+    namespace range_adl_barrier
     {
-        return boost::end( r );
-    }
-}
+        template< class T >
+        inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type
+        const_end( const T& r )
+        {
+            return boost::range_adl_barrier::end( r );
+        }
+    } // namespace range_adl_barrier
+    using namespace range_adl_barrier;
+} // namespace boost
 
 #endif
 
diff --git a/ext/boost/range/iterator_range_core.hpp b/ext/boost/range/iterator_range_core.hpp
index 497b1e3..60c7670 100644
--- a/ext/boost/range/iterator_range_core.hpp
+++ b/ext/boost/range/iterator_range_core.hpp
@@ -27,6 +27,7 @@
 #include <boost/range/iterator.hpp>
 #include <boost/range/difference_type.hpp>
 #include <boost/range/algorithm/equal.hpp>
+#include <boost/range/detail/safe_bool.hpp>
 #include <boost/utility/enable_if.hpp>
 #include <iterator>
 #include <algorithm>
@@ -52,13 +53,13 @@ namespace boost
             template< class ForwardRange >
             static IteratorT adl_begin( ForwardRange& r )
             {
-                return IteratorT( boost::begin( r ) );
+                return static_cast<IteratorT>( boost::begin( r ) );
             }
 
             template< class ForwardRange >
             static IteratorT adl_end( ForwardRange& r )
             {
-                return IteratorT( boost::end( r ) );
+                return static_cast<IteratorT>( boost::end( r ) );
             }
         };
 
@@ -70,6 +71,24 @@ namespace boost
                                                  boost::begin(r),
                                                  boost::end(r) );
         }
+        
+        template< class Left, class Right >
+        inline bool greater_than( const Left& l, const Right& r )
+        {
+            return less_than(r,l);
+        }
+        
+        template< class Left, class Right >
+        inline bool less_or_equal_than( const Left& l, const Right& r )
+        {
+            return !iterator_range_detail::less_than(r,l);
+        }
+        
+        template< class Left, class Right >
+        inline bool greater_or_equal_than( const Left& l, const Right& r )
+        {
+            return !iterator_range_detail::less_than(l,r);
+        }
 
         // This version is maintained since it is used in other boost libraries
         // such as Boost.Assign
@@ -81,7 +100,6 @@ namespace boost
 
         struct range_tag { };
         struct const_range_tag { };
-
     }
 
 //  iterator range template class -----------------------------------------//
@@ -106,13 +124,14 @@ namespace boost
         template<class IteratorT>
         class iterator_range
         {
+            typedef range_detail::safe_bool< IteratorT iterator_range<IteratorT>::* > safe_bool_t;
         protected: // Used by sub_range
             //! implementation class
             typedef iterator_range_detail::iterator_range_impl<IteratorT> impl;
         public:
-
             //! this type
             typedef iterator_range<IteratorT> type;
+            typedef BOOST_DEDUCED_TYPENAME safe_bool_t::unspecified_bool_type unspecified_bool_type;
             //BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type);
 
             //! Encapsulated value type
@@ -238,18 +257,15 @@ namespace boost
                 return m_Begin == m_End;
             }
 
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-            operator bool() const
+            operator unspecified_bool_type() const
             {
-                return !empty();
+                return safe_bool_t::to_unspecified_bool(m_Begin != m_End, &iterator_range::m_Begin);
             }
-#else
-            typedef iterator (iterator_range::*unspecified_bool_type) () const;
-            operator unspecified_bool_type() const
+
+            bool operator!() const
             {
-                return empty() ? 0: &iterator_range::end;
+                return empty();
             }
-#endif
 
             bool equal( const iterator_range& r ) const
             {
@@ -273,6 +289,21 @@ namespace boost
            {
                return iterator_range_detail::less_than( *this, r );
            }
+           
+           bool operator>( const iterator_range& r ) const
+           {
+               return iterator_range_detail::greater_than( *this, r );
+           }
+           
+           bool operator<=( const iterator_range& r ) const
+           {
+               return iterator_range_detail::less_or_equal_than( *this, r );
+           }
+           
+           bool operator>=( const iterator_range& r ) const
+           {
+               return iterator_range_detail::greater_or_equal_than( *this, r );
+           }
 
 #endif
 
@@ -290,6 +321,20 @@ namespace boost
                return *--last;
            }
 
+           // pop_front() - added to model the SinglePassRangePrimitiveConcept
+           void pop_front()
+           {
+               BOOST_ASSERT( !empty() );
+               ++m_Begin;
+           }
+
+           // pop_back() - added to model the BidirectionalRangePrimitiveConcept
+           void pop_back()
+           {
+               BOOST_ASSERT( !empty() );
+               --m_End;
+           }
+
            reference operator[]( difference_type at ) const
            {
                BOOST_ASSERT( at >= 0 && at < size() );
@@ -358,6 +403,27 @@ namespace boost
         {
             return iterator_range_detail::less_than( l, r );
         }
+        
+        template< class IteratorT, class ForwardRange >
+        inline bool operator<=( const ForwardRange& l,
+                                const iterator_range<IteratorT>& r )
+        {
+            return iterator_range_detail::less_or_equal_than( l, r );
+        }
+        
+        template< class IteratorT, class ForwardRange >
+        inline bool operator>( const ForwardRange& l,
+                               const iterator_range<IteratorT>& r )
+        {
+            return iterator_range_detail::greater_than( l, r );
+        }
+        
+        template< class IteratorT, class ForwardRange >
+        inline bool operator>=( const ForwardRange& l,
+                                const iterator_range<IteratorT>& r )
+        {
+            return iterator_range_detail::greater_or_equal_than( l, r );
+        }
 
 #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
 #else
@@ -404,6 +470,48 @@ namespace boost
         {
             return iterator_range_detail::less_than( l, r );
         }
+        
+        template< class Iterator1T, class Iterator2T >
+        inline bool operator<=( const iterator_range<Iterator1T>& l,
+                                const iterator_range<Iterator2T>& r )
+        {
+            return iterator_range_detail::less_or_equal_than( l, r );
+        }
+        
+        template< class IteratorT, class ForwardRange >
+        inline bool operator<=( const iterator_range<IteratorT>& l,
+                                const ForwardRange& r )
+        {
+            return iterator_range_detail::less_or_equal_than( l, r );
+        }
+        
+        template< class Iterator1T, class Iterator2T >
+        inline bool operator>( const iterator_range<Iterator1T>& l,
+                               const iterator_range<Iterator2T>& r )
+        {
+            return iterator_range_detail::greater_than( l, r );
+        }
+        
+        template< class IteratorT, class ForwardRange >
+        inline bool operator>( const iterator_range<IteratorT>& l,
+                               const ForwardRange& r )
+        {
+            return iterator_range_detail::greater_than( l, r );
+        }
+        
+        template< class Iterator1T, class Iterator2T >
+        inline bool operator>=( const iterator_range<Iterator1T>& l,
+                                const iterator_range<Iterator2T>& r )
+        {
+            return iterator_range_detail::greater_or_equal_than( l, r );
+        }
+        
+        template< class IteratorT, class ForwardRange >
+        inline bool operator>=( const iterator_range<IteratorT>& l,
+                                const ForwardRange& r )
+        {
+            return iterator_range_detail::greater_or_equal_than( l, r );
+        }
 
 #endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
 
diff --git a/ext/boost/range/size.hpp b/ext/boost/range/size.hpp
index 2b572d4..6ae74d1 100644
--- a/ext/boost/range/size.hpp
+++ b/ext/boost/range/size.hpp
@@ -15,20 +15,36 @@
 # pragma once
 #endif
 
+#include <boost/range/config.hpp>
 #include <boost/range/begin.hpp>
 #include <boost/range/end.hpp>
-#include <boost/range/difference_type.hpp>
+#include <boost/range/size_type.hpp>
 #include <boost/assert.hpp>
 
 namespace boost
 {
+    namespace range_detail
+    {
+        template<class SinglePassRange>
+        inline BOOST_DEDUCED_TYPENAME range_size<const SinglePassRange>::type
+        range_calculate_size(const SinglePassRange& rng)
+        {
+            BOOST_ASSERT( (boost::end(rng) - boost::begin(rng)) >= 0 &&
+                          "reachability invariant broken!" );
+            return boost::end(rng) - boost::begin(rng);
+        }
+    }
 
-    template< class T >
-    inline BOOST_DEDUCED_TYPENAME range_difference<T>::type size( const T& r )
+    template<class SinglePassRange>
+    inline BOOST_DEDUCED_TYPENAME range_size<const SinglePassRange>::type
+    size(const SinglePassRange& rng)
     {
-        BOOST_ASSERT( (boost::end( r ) - boost::begin( r )) >= 0 &&
-                      "reachability invariant broken!" );
-        return boost::end( r ) - boost::begin( r );
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+    !BOOST_WORKAROUND(__GNUC__, < 3) \
+    /**/
+        using namespace range_detail;
+#endif
+        return range_calculate_size(rng);
     }
 
 } // namespace 'boost'
diff --git a/ext/boost/range/size_type.hpp b/ext/boost/range/size_type.hpp
index 8c184f8..c6fb54b 100644
--- a/ext/boost/range/size_type.hpp
+++ b/ext/boost/range/size_type.hpp
@@ -16,11 +16,13 @@
 #endif
 
 #include <boost/range/config.hpp>
-
+#include <boost/range/difference_type.hpp>
 #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 #include <boost/range/detail/size_type.hpp>
 #else
 
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/make_unsigned.hpp>
 #include <boost/type_traits/remove_const.hpp>
 #include <cstddef>
 #include <utility>
@@ -33,36 +35,44 @@ namespace boost
         //////////////////////////////////////////////////////////////////////////
         // default
         //////////////////////////////////////////////////////////////////////////
-    
-        template< typename C >
-        struct range_size
+
+        template<typename T>
+        class has_size_type
         {
-            typedef BOOST_DEDUCED_TYPENAME C::size_type type;
+            typedef char no_type;
+            struct yes_type { char dummy[2]; };
+
+            template<typename C>
+            static yes_type test(BOOST_DEDUCED_TYPENAME C::size_type x);
+
+            template<typename C, typename Arg>
+            static no_type test(Arg x);
+
+        public:
+            static const bool value = sizeof(test<T>(0)) == sizeof(yes_type);
         };
-    
-        //////////////////////////////////////////////////////////////////////////
-        // pair
-        //////////////////////////////////////////////////////////////////////////
-    
-        template< typename Iterator >
-        struct range_size< std::pair<Iterator,Iterator> >
+
+        template<typename C, typename Enabler=void>
+        struct range_size
         {
-            typedef std::size_t type;
+            typedef BOOST_DEDUCED_TYPENAME make_unsigned<
+                BOOST_DEDUCED_TYPENAME range_difference<C>::type
+            >::type type;
         };
-    
-        //////////////////////////////////////////////////////////////////////////
-        // array
-        //////////////////////////////////////////////////////////////////////////
-    
-        template< typename T, std::size_t sz >
-        struct range_size< T[sz] >
+
+        template<typename C>
+        struct range_size<
+            C,
+            BOOST_DEDUCED_TYPENAME enable_if<has_size_type<C>, void>::type
+        >
         {
-            typedef std::size_t type;
+            typedef BOOST_DEDUCED_TYPENAME C::size_type type;
         };
+
     }
 
     template< class T >
-    struct range_size : 
+    struct range_size :
         detail::range_size<T>
     { };
 
@@ -70,7 +80,7 @@ namespace boost
     struct range_size<const T >
         : detail::range_size<T>
     { };
-    
+
 } // namespace boost
 
 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
diff --git a/ext/boost/ratio/config.hpp b/ext/boost/ratio/config.hpp
new file mode 100644
index 0000000..67a60fc
--- /dev/null
+++ b/ext/boost/ratio/config.hpp
@@ -0,0 +1,86 @@
+//  config.hpp  ---------------------------------------------------------------//
+
+//  Copyright 2012 Vicente J. Botet Escriba
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+
+#ifndef BOOST_RATIO_CONFIG_HPP
+#define BOOST_RATIO_CONFIG_HPP
+
+#include <boost/config.hpp>
+#include <boost/cstdint.hpp>
+
+
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+#  if ! defined BOOST_NO_CXX11_U16STRING
+#    define BOOST_NO_CXX11_U16STRING
+#  endif
+#  if ! defined BOOST_NO_CXX11_U32STRING
+#    define BOOST_NO_CXX11_U32STRING
+#  endif
+#endif
+
+
+#if !defined BOOST_RATIO_VERSION
+#define BOOST_RATIO_VERSION 1
+#else
+#if BOOST_RATIO_VERSION!=1  && BOOST_RATIO_VERSION!=2
+#error "BOOST_RATIO_VERSION must be 1 or 2"
+#endif
+#endif
+
+#if BOOST_RATIO_VERSION==1
+#if ! defined BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0
+#define BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
+#endif
+#endif
+
+#if BOOST_RATIO_VERSION==2
+#if ! defined BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
+#define BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0
+#endif
+#endif
+
+#ifdef INTMAX_C
+#define BOOST_RATIO_INTMAX_C(a) INTMAX_C(a)
+#else
+#define BOOST_RATIO_INTMAX_C(a) a##LL
+#endif
+
+#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFELL)
+
+
+#ifndef BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
+#elif defined(BOOST_RATIO_USES_STATIC_ASSERT)
+#include <boost/static_assert.hpp>
+#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
+#elif defined(BOOST_RATIO_USES_MPL_ASSERT)
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/bool.hpp>
+#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES)                                 \
+    BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
+#else
+//~ #elif defined(BOOST_RATIO_USES_ARRAY_ASSERT)
+#define BOOST_RATIO_CONCAT(A,B) A##B
+#define BOOST_RATIO_NAME(A,B) BOOST_RATIO_CONCAT(A,B)
+#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_RATIO_NAME(__boost_ratio_test_,__LINE__)[(CND)?1:-1]
+//~ #define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES)
+#endif
+
+#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) || !defined(BOOST_RATIO_USES_MPL_ASSERT)
+#define BOOST_RATIO_OVERFLOW_IN_ADD "overflow in ratio add"
+#define BOOST_RATIO_OVERFLOW_IN_SUB "overflow in ratio sub"
+#define BOOST_RATIO_OVERFLOW_IN_MUL "overflow in ratio mul"
+#define BOOST_RATIO_OVERFLOW_IN_DIV "overflow in ratio div"
+#define BOOST_RATIO_NUMERATOR_IS_OUT_OF_RANGE "ratio numerator is out of range"
+#define BOOST_RATIO_DIVIDE_BY_0 "ratio divide by 0"
+#define BOOST_RATIO_DENOMINATOR_IS_OUT_OF_RANGE "ratio denominator is out of range"
+#endif
+
+
+//#define BOOST_RATIO_EXTENSIONS
+
+#endif  // header
diff --git a/ext/boost/ratio/detail/mpl/abs.hpp b/ext/boost/ratio/detail/mpl/abs.hpp
new file mode 100644
index 0000000..4be1274
--- /dev/null
+++ b/ext/boost/ratio/detail/mpl/abs.hpp
@@ -0,0 +1,89 @@
+////////////////////////////////////////////////////////////////////
+//
+// Copyright Vicente J. Botet Escriba 2010
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+//
+////////////////////////////////////////////////////////////////////
+#ifndef BOOST_MPL_ABS_HPP_INCLUDED
+#define BOOST_MPL_ABS_HPP_INCLUDED
+
+#include <boost/mpl/integral_c.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/config/eti.hpp>
+#include <boost/mpl/aux_/config/integral.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+
+#if    !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE) \
+    && ( defined(BOOST_MSVC) \
+        || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \
+        )
+
+#   define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2
+
+#endif
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct abs_impl;
+
+template< typename T > struct abs_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N)
+    >
+struct abs
+    : abs_impl<
+          typename abs_tag<N>::type
+        >::template apply<N>::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1, abs, (N))
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, abs)
+
+template<
+      typename T
+    , T n1
+    >
+struct abs_c
+    : abs<integral_c<T,n1> >
+{
+};
+
+#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2)
+namespace aux {
+template< typename T, T n > struct abs_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value = (n < 0 ? -n : n));
+    typedef integral_c<T,value> type;
+};
+}
+#endif
+
+template<>
+struct abs_impl<integral_c_tag>
+{
+#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2)
+    template< typename N > struct apply
+        : aux::abs_wknd< typename N::value_type, N::value >
+#else
+    template< typename N > struct apply
+        : integral_c< typename N::value_type, ((N::value < 0) ? (-N::value) : N::value ) >
+#endif    
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_ABS_HPP_INCLUDED
diff --git a/ext/boost/ratio/detail/mpl/gcd.hpp b/ext/boost/ratio/detail/mpl/gcd.hpp
new file mode 100644
index 0000000..c8258cf
--- /dev/null
+++ b/ext/boost/ratio/detail/mpl/gcd.hpp
@@ -0,0 +1,124 @@
+////////////////////////////////////////////////////////////////////
+//
+// Copyright Vicente J. Botet Escriba 2010
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+//
+////////////////////////////////////////////////////////////////////
+#ifndef BOOST_MPL_GCD_HPP_INCLUDED
+#define BOOST_MPL_GCD_HPP_INCLUDED
+
+#include <boost/mpl/integral_c.hpp>
+#include <boost/ratio/detail/mpl/abs.hpp>
+#include <boost/mpl/aux_/largest_int.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/config/eti.hpp>
+#include <boost/mpl/aux_/config/integral.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+#include <boost/mpl/aux_/config/dependent_nttp.hpp>
+#include <boost/cstdint.hpp>
+
+#if    !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE) \
+    && ( defined(BOOST_MSVC) \
+        || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \
+        )
+
+#   define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2
+
+#endif
+
+namespace boost { namespace mpl {
+
+template< typename Tag1, typename Tag2 > struct gcd_impl;
+
+template< typename T > struct gcd_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct gcd
+    : gcd_impl<
+          typename gcd_tag<N1>::type
+        , typename gcd_tag<N2>::type
+        >::template apply<N1, N2>::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, gcd, (N1, N2))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, gcd)
+
+template<
+      typename T
+    , T n1
+    , T n2
+    >
+struct gcd_c
+    : gcd<integral_c<T,n1>,integral_c<T,n2> >
+{
+};
+
+namespace aux {
+
+  // Workaround for error: the type of partial specialization template parameter constant "n2"
+    // depends on another template parameter
+    // Note: this solution could be wrong for n1 or n2 = [2**63 .. 2**64-1]
+#if defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC)
+
+  template< typename T1, boost::intmax_t n1, bool n1_is_0
+                  , typename T2, boost::intmax_t n2, bool n2_is_0 >
+      struct gcd_aux
+          : gcd_aux<T2, n2, n2==0, T1, (n1 % n2), (n1 % n2)==0>
+      {};
+
+      template <typename T1, boost::intmax_t n1, typename T2, boost::intmax_t n2>
+      struct gcd_aux<T1, n1, false, T2, n2, true> : integral_c<T1, n1>
+      {};
+
+      template <typename T1, boost::intmax_t n1, typename T2, boost::intmax_t n2, bool C>
+      struct gcd_aux<T1, n1, true, T2, n2, C> : integral_c<T2, n2>
+      {};
+
+#else // defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC)
+
+    template< typename T1, T1 n1, bool n1_is_0, typename T2, T2 n2, bool n2_is_0 >
+    struct gcd_aux
+
+        : gcd_aux<T2, n2, n2==0,
+                    typename aux::largest_int<T1, T2>::type,
+                    //~ T1,
+                    (n1 % n2), (n1 % n2)==0>
+    {};
+
+    template <typename T1, T1 n1, typename T2, T2 n2>
+    struct gcd_aux<T1, n1, false, T2, n2, true> : integral_c<T1, n1>
+    {};
+
+    template <typename T1, T1 n1, typename T2, T2 n2, bool C>
+    struct gcd_aux<T1, n1, true, T2, n2, C> : integral_c<T2, n2>
+    {};
+#endif // defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC)
+}
+
+template<>
+struct gcd_impl<integral_c_tag, integral_c_tag>
+{
+    template< typename N1, typename N2 > struct apply
+        : abs<aux::gcd_aux< typename N1::value_type, N1::value, N1::value==0,
+                        typename N2::value_type, N2::value, N2::value==0  > >
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_GCD_HPP_INCLUDED
diff --git a/ext/boost/ratio/detail/mpl/lcm.hpp b/ext/boost/ratio/detail/mpl/lcm.hpp
new file mode 100644
index 0000000..546d0e1
--- /dev/null
+++ b/ext/boost/ratio/detail/mpl/lcm.hpp
@@ -0,0 +1,126 @@
+////////////////////////////////////////////////////////////////////
+//
+// Copyright Vicente J. Botet Escriba 2010
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+//
+////////////////////////////////////////////////////////////////////
+#ifndef BOOST_MPL_LCM_HPP_INCLUDED
+#define BOOST_MPL_LCM_HPP_INCLUDED
+
+#include <boost/mpl/integral_c.hpp>
+#include <boost/ratio/detail/mpl/abs.hpp>
+#include <boost/mpl/aux_/largest_int.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/config/eti.hpp>
+#include <boost/mpl/aux_/config/integral.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+#include <boost/mpl/aux_/config/dependent_nttp.hpp>
+#include <boost/cstdint.hpp>
+
+#if    !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE) \
+    && ( defined(BOOST_MSVC) \
+        || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \
+        )
+
+#   define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2
+
+#endif
+
+namespace boost { namespace mpl {
+
+template< typename Tag1, typename Tag2 > struct lcm_impl;
+
+template< typename T > struct lcm_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N1)
+    , typename BOOST_MPL_AUX_NA_PARAM(N2)
+    >
+struct lcm
+    : lcm_impl<
+          typename lcm_tag<N1>::type
+        , typename lcm_tag<N2>::type
+        >::template apply<N1, N2>::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, lcm, (N1, N2))
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, lcm)
+
+template<
+      typename T
+    , T n1
+    , T n2
+    >
+struct lcm_c
+    : lcm<integral_c<T,n1>,integral_c<T,n2> >
+{
+};
+
+
+namespace aux {
+  // Workaround for error: the type of partial specialization template parameter constant "n2"
+  // depends on another template parameter
+  // Note: this solution could be wrong for n1 or n2 = [2**63 .. 2**64-1]
+  #if defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC)
+  template< typename T1, boost::intmax_t n1, bool n1_is_0
+                          , typename T2, boost::intmax_t n2, bool n2_is_0 >
+      struct lcm_aux
+          : abs<integral_c< typename aux::largest_int<T1, T2>::type,
+              ( n1 / gcd<integral_c<T1,n1>, integral_c<T2,n2> >::value * n2 )
+          > >
+      {};
+
+      template <typename T1, boost::intmax_t n1, typename T2, boost::intmax_t n2>
+      struct lcm_aux<T1, n1, false, T2, n2, true> : integral_c<T2, 0>
+      {};
+
+      template <typename T1, boost::intmax_t n1, typename T2, boost::intmax_t n2, bool C>
+      struct lcm_aux<T1, n1, true, T2, n2, C> : integral_c<T1, 0>
+      {};
+
+
+#else // defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC)
+
+
+    template< typename T1, T1 n1, bool n1_is_0, typename T2, T2 n2, bool n2_is_0 >
+    struct lcm_aux
+
+        : abs<integral_c< typename aux::largest_int<T1, T2>::type,
+            ( n1 / gcd<integral_c<T1,n1>, integral_c<T2,n2> >::value * n2 )
+        > >
+    {};
+
+    template <typename T1, T1 n1, typename T2, T2 n2>
+    struct lcm_aux<T1, n1, false, T2, n2, true> : integral_c<T2, 0>
+    {};
+
+    template <typename T1, T1 n1, typename T2, T2 n2, bool C>
+    struct lcm_aux<T1, n1, true, T2, n2, C> : integral_c<T1, 0>
+    {};
+#endif // defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC)
+}
+
+template<>
+struct lcm_impl<integral_c_tag, integral_c_tag>
+{
+    template< typename N1, typename N2 > struct apply
+        : abs<aux::lcm_aux< typename N1::value_type, N1::value, N1::value==0,
+                        typename N2::value_type, N2::value, N2::value==0  > >
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LCM_HPP_INCLUDED
diff --git a/ext/boost/ratio/detail/mpl/sign.hpp b/ext/boost/ratio/detail/mpl/sign.hpp
new file mode 100644
index 0000000..af201eb
--- /dev/null
+++ b/ext/boost/ratio/detail/mpl/sign.hpp
@@ -0,0 +1,89 @@
+////////////////////////////////////////////////////////////////////
+//
+// Copyright Vicente J. Botet Escriba 2010
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+//
+////////////////////////////////////////////////////////////////////
+#ifndef BOOST_MPL_SIGN_HPP_INCLUDED
+#define BOOST_MPL_SIGN_HPP_INCLUDED
+
+#include <boost/mpl/integral_c.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/mpl/aux_/config/eti.hpp>
+#include <boost/mpl/aux_/config/integral.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+
+#if    !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE) \
+    && ( defined(BOOST_MSVC) \
+        || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \
+        )
+
+#   define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2
+
+#endif
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct sign_impl;
+
+template< typename T > struct sign_tag
+{
+    typedef typename T::tag type;
+};
+
+template<
+      typename BOOST_MPL_AUX_NA_PARAM(N)
+    >
+struct sign
+    : sign_impl<
+          typename sign_tag<N>::type
+        >::template apply<N>::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1, sign, (N))
+};
+
+BOOST_MPL_AUX_NA_SPEC(1, sign)
+
+template<
+      typename T
+    , T n1
+    >
+struct sign_c
+    : sign<integral_c<T,n1> >
+{
+};
+
+#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2)
+namespace aux {
+template< typename T, T n > struct sign_wknd
+{
+    BOOST_STATIC_CONSTANT(T, value = (n == 0 ? 0 : (n < 0 ? -1 : 1)));
+    typedef integral_c<T,value> type;
+};
+}
+#endif
+
+template<>
+struct sign_impl<integral_c_tag>
+{
+#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2)
+    template< typename N > struct apply
+        : aux::sign_wknd< typename N::value_type, N::value >
+#else
+    template< typename N > struct apply
+        : integral_c< typename N::value_type, (N::value == 0 ? 0 : (N::value < 0 ? -1 : 1)) >
+#endif    
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_SIGN_HPP_INCLUDED
diff --git a/ext/boost/ratio/detail/overflow_helpers.hpp b/ext/boost/ratio/detail/overflow_helpers.hpp
new file mode 100644
index 0000000..0e292fa
--- /dev/null
+++ b/ext/boost/ratio/detail/overflow_helpers.hpp
@@ -0,0 +1,367 @@
+//  ratio.hpp  ---------------------------------------------------------------//
+
+//  Copyright 2008 Howard Hinnant
+//  Copyright 2008 Beman Dawes
+//  Copyright 2009 Vicente J. Botet Escriba
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+/*
+
+This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
+Many thanks to Howard for making his code available under the Boost license.
+The original code was modified to conform to Boost conventions and to section
+20.4 Compile-time rational arithmetic [ratio], of the C++ committee working
+paper N2798.
+See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
+
+time2_demo contained this comment:
+
+    Much thanks to Andrei Alexandrescu,
+                   Walter Brown,
+                   Peter Dimov,
+                   Jeff Garland,
+                   Terry Golubiewski,
+                   Daniel Krugler,
+                   Anthony Williams.
+*/
+
+// The way overflow is managed for ratio_less is taken from llvm/libcxx/include/ratio
+
+#ifndef BOOST_RATIO_DETAIL_RATIO_OPERATIONS_HPP
+#define BOOST_RATIO_DETAIL_RATIO_OPERATIONS_HPP
+
+#include <boost/ratio/config.hpp>
+#include <boost/ratio/detail/mpl/abs.hpp>
+#include <boost/ratio/detail/mpl/sign.hpp>
+#include <cstdlib>
+#include <climits>
+#include <limits>
+#include <boost/cstdint.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/integer_traits.hpp>
+
+//
+// We simply cannot include this header on gcc without getting copious warnings of the kind:
+//
+// boost/integer.hpp:77:30: warning: use of C99 long long integer constant
+//
+// And yet there is no other reasonable implementation, so we declare this a system header
+// to suppress these warnings.
+//
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+#pragma GCC system_header
+#endif
+
+namespace boost
+{
+
+//----------------------------------------------------------------------------//
+//                                 helpers                                    //
+//----------------------------------------------------------------------------//
+
+namespace ratio_detail
+{
+
+  template <boost::intmax_t X, boost::intmax_t Y, boost::intmax_t = mpl::sign_c<boost::intmax_t, Y>::value>
+  class br_add;
+
+  template <boost::intmax_t X, boost::intmax_t Y>
+  class br_add<X, Y, 1>
+  {
+      static const boost::intmax_t min = boost::integer_traits<boost::intmax_t>::const_min;
+      static const boost::intmax_t max = boost::integer_traits<boost::intmax_t>::const_max;
+
+      BOOST_RATIO_STATIC_ASSERT(X <= max - Y , BOOST_RATIO_OVERFLOW_IN_ADD, ());
+  public:
+      static const boost::intmax_t value = X + Y;
+  };
+
+  template <boost::intmax_t X, boost::intmax_t Y>
+  class br_add<X, Y, 0>
+  {
+  public:
+      static const boost::intmax_t value = X;
+  };
+
+  template <boost::intmax_t X, boost::intmax_t Y>
+  class br_add<X, Y, -1>
+  {
+      static const boost::intmax_t min = boost::integer_traits<boost::intmax_t>::const_min;
+      static const boost::intmax_t max = boost::integer_traits<boost::intmax_t>::const_max;
+
+      BOOST_RATIO_STATIC_ASSERT(min - Y <= X, BOOST_RATIO_OVERFLOW_IN_ADD, ());
+  public:
+      static const boost::intmax_t value = X + Y;
+  };
+
+  template <boost::intmax_t X, boost::intmax_t Y, boost::intmax_t = mpl::sign_c<boost::intmax_t, Y>::value>
+  class br_sub;
+
+  template <boost::intmax_t X, boost::intmax_t Y>
+  class br_sub<X, Y, 1>
+  {
+      static const boost::intmax_t min = boost::integer_traits<boost::intmax_t>::const_min;
+      static const boost::intmax_t max = boost::integer_traits<boost::intmax_t>::const_max;
+
+      BOOST_RATIO_STATIC_ASSERT(min + Y <= X, BOOST_RATIO_OVERFLOW_IN_SUB, ());
+  public:
+      static const boost::intmax_t value = X - Y;
+  };
+
+  template <boost::intmax_t X, boost::intmax_t Y>
+  class br_sub<X, Y, 0>
+  {
+  public:
+      static const boost::intmax_t value = X;
+  };
+
+  template <boost::intmax_t X, boost::intmax_t Y>
+  class br_sub<X, Y, -1>
+  {
+      static const boost::intmax_t min = boost::integer_traits<boost::intmax_t>::const_min;
+      static const boost::intmax_t max = boost::integer_traits<boost::intmax_t>::const_max;
+
+      BOOST_RATIO_STATIC_ASSERT(X <= max + Y, BOOST_RATIO_OVERFLOW_IN_SUB, ());
+  public:
+      static const boost::intmax_t value = X - Y;
+  };
+
+  template <boost::intmax_t X, boost::intmax_t Y>
+  class br_mul
+  {
+      static const boost::intmax_t nan =
+        (BOOST_RATIO_INTMAX_C(1) << (sizeof(boost::intmax_t) * CHAR_BIT - 1));
+      static const boost::intmax_t min = boost::integer_traits<boost::intmax_t>::const_min;
+      static const boost::intmax_t max = boost::integer_traits<boost::intmax_t>::const_max;
+
+      static const boost::intmax_t a_x = mpl::abs_c<boost::intmax_t, X>::value;
+      static const boost::intmax_t a_y = mpl::abs_c<boost::intmax_t, Y>::value;
+
+      BOOST_RATIO_STATIC_ASSERT(X != nan, BOOST_RATIO_OVERFLOW_IN_MUL, ());
+      BOOST_RATIO_STATIC_ASSERT(Y != nan, BOOST_RATIO_OVERFLOW_IN_MUL, ());
+      BOOST_RATIO_STATIC_ASSERT(a_x <= max / a_y, BOOST_RATIO_OVERFLOW_IN_MUL, ());
+  public:
+      static const boost::intmax_t value = X * Y;
+  };
+
+  template <boost::intmax_t Y>
+  class br_mul<0, Y>
+  {
+  public:
+      static const boost::intmax_t value = 0;
+  };
+
+  template <boost::intmax_t X>
+  class br_mul<X, 0>
+  {
+  public:
+      static const boost::intmax_t value = 0;
+  };
+
+  template <>
+  class br_mul<0, 0>
+  {
+  public:
+      static const boost::intmax_t value = 0;
+  };
+
+  // Not actually used but left here in case needed in future maintenance
+  template <boost::intmax_t X, boost::intmax_t Y>
+  class br_div
+  {
+      static const boost::intmax_t nan = (1LL << (sizeof(boost::intmax_t) * CHAR_BIT - 1));
+      static const boost::intmax_t min = boost::integer_traits<boost::intmax_t>::const_min;
+      static const boost::intmax_t max = boost::integer_traits<boost::intmax_t>::const_max;
+
+      BOOST_RATIO_STATIC_ASSERT(X != nan, BOOST_RATIO_OVERFLOW_IN_DIV, ());
+      BOOST_RATIO_STATIC_ASSERT(Y != nan, BOOST_RATIO_OVERFLOW_IN_DIV, ());
+      BOOST_RATIO_STATIC_ASSERT(Y != 0, BOOST_RATIO_DIVIDE_BY_0, ());
+  public:
+      static const boost::intmax_t value = X / Y;
+  };
+
+  // ratio arithmetic
+  template <class R1, class R2> struct ratio_add;
+  template <class R1, class R2> struct ratio_subtract;
+  template <class R1, class R2> struct ratio_multiply;
+  template <class R1, class R2> struct ratio_divide;
+
+  template <class R1, class R2>
+  struct ratio_add
+  {
+      //The nested typedef type shall be a synonym for ratio<T1, T2>::type where T1 has the value R1::num *
+      //R2::den + R2::num * R1::den and T2 has the value R1::den * R2::den.
+      // As the preceding doesn't works because of overflow on boost::intmax_t we need something more elaborated.
+  private:
+      static const boost::intmax_t gcd_n1_n2 = mpl::gcd_c<boost::intmax_t, R1::num, R2::num>::value;
+      static const boost::intmax_t gcd_d1_d2 = mpl::gcd_c<boost::intmax_t, R1::den, R2::den>::value;
+  public:
+      // No need to normalize as ratio_multiply is already normalized
+      typedef typename ratio_multiply
+         <
+             ratio<gcd_n1_n2, R1::den / gcd_d1_d2>,
+             ratio
+             <
+                 boost::ratio_detail::br_add
+                 <
+                     boost::ratio_detail::br_mul<R1::num / gcd_n1_n2, R2::den / gcd_d1_d2>::value,
+                     boost::ratio_detail::br_mul<R2::num / gcd_n1_n2, R1::den / gcd_d1_d2>::value
+                 >::value,
+                 R2::den
+             >
+         >::type type;
+  };
+  template <class R, boost::intmax_t D>
+  struct ratio_add<R, ratio<0,D> >
+  {
+    typedef R type;
+  };
+
+  template <class R1, class R2>
+  struct ratio_subtract
+  {
+      //The nested typedef type shall be a synonym for ratio<T1, T2>::type where T1 has the value
+      // R1::num *R2::den - R2::num * R1::den and T2 has the value R1::den * R2::den.
+      // As the preceding doesn't works because of overflow on boost::intmax_t we need something more elaborated.
+  private:
+      static const boost::intmax_t gcd_n1_n2 = mpl::gcd_c<boost::intmax_t, R1::num, R2::num>::value;
+      static const boost::intmax_t gcd_d1_d2 = mpl::gcd_c<boost::intmax_t, R1::den, R2::den>::value;
+  public:
+      // No need to normalize as ratio_multiply is already normalized
+      typedef typename ratio_multiply
+         <
+             ratio<gcd_n1_n2, R1::den / gcd_d1_d2>,
+             ratio
+             <
+                 boost::ratio_detail::br_sub
+                 <
+                     boost::ratio_detail::br_mul<R1::num / gcd_n1_n2, R2::den / gcd_d1_d2>::value,
+                     boost::ratio_detail::br_mul<R2::num / gcd_n1_n2, R1::den / gcd_d1_d2>::value
+                 >::value,
+                 R2::den
+             >
+         >::type type;
+  };
+
+  template <class R, boost::intmax_t D>
+  struct ratio_subtract<R, ratio<0,D> >
+  {
+    typedef R type;
+  };
+
+  template <class R1, class R2>
+  struct ratio_multiply
+  {
+      // The nested typedef type  shall be a synonym for ratio<R1::num * R2::den - R2::num * R1::den, R1::den * R2::den>::type.
+      // As the preceding doesn't works because of overflow on boost::intmax_t we need something more elaborated.
+  private:
+     static const boost::intmax_t gcd_n1_d2 = mpl::gcd_c<boost::intmax_t, R1::num, R2::den>::value;
+     static const boost::intmax_t gcd_d1_n2 = mpl::gcd_c<boost::intmax_t, R1::den, R2::num>::value;
+  public:
+      typedef typename ratio
+         <
+             boost::ratio_detail::br_mul<R1::num / gcd_n1_d2, R2::num / gcd_d1_n2>::value,
+             boost::ratio_detail::br_mul<R2::den / gcd_n1_d2, R1::den / gcd_d1_n2>::value
+         >::type type;
+  };
+
+  template <class R1, class R2>
+  struct ratio_divide
+  {
+      // The nested typedef type  shall be a synonym for ratio<R1::num * R2::den, R2::num * R1::den>::type.
+      // As the preceding doesn't works because of overflow on boost::intmax_t we need something more elaborated.
+  private:
+      static const boost::intmax_t gcd_n1_n2 = mpl::gcd_c<boost::intmax_t, R1::num, R2::num>::value;
+      static const boost::intmax_t gcd_d1_d2 = mpl::gcd_c<boost::intmax_t, R1::den, R2::den>::value;
+  public:
+      typedef typename ratio
+         <
+             boost::ratio_detail::br_mul<R1::num / gcd_n1_n2, R2::den / gcd_d1_d2>::value,
+             boost::ratio_detail::br_mul<R2::num / gcd_n1_n2, R1::den / gcd_d1_d2>::value
+         >::type type;
+  };
+  template <class R1, class R2>
+  struct is_evenly_divisible_by
+  {
+  private:
+      static const boost::intmax_t gcd_n1_n2 = mpl::gcd_c<boost::intmax_t, R1::num, R2::num>::value;
+      static const boost::intmax_t gcd_d1_d2 = mpl::gcd_c<boost::intmax_t, R1::den, R2::den>::value;
+  public:
+      typedef integral_constant<bool,
+             ((R2::num / gcd_n1_n2 ==1) && (R1::den / gcd_d1_d2)==1)
+      > type;
+  };
+
+  template <class T>
+  struct is_ratio : public boost::false_type
+  {};
+  template <boost::intmax_t N, boost::intmax_t D>
+  struct is_ratio<ratio<N, D> > : public boost::true_type
+  {};
+
+  template <class R1, class R2,
+            boost::intmax_t Q1 = R1::num / R1::den, boost::intmax_t M1 = R1::num % R1::den,
+            boost::intmax_t Q2 = R2::num / R2::den, boost::intmax_t M2 = R2::num % R2::den>
+  struct ratio_less1
+  {
+    static const bool value = Q1 < Q2;
+  };
+
+  template <class R1, class R2, boost::intmax_t Q>
+  struct ratio_less1<R1, R2, Q, 0, Q, 0>
+  {
+    static const bool value = false;
+  };
+
+  template <class R1, class R2, boost::intmax_t Q, boost::intmax_t M2>
+  struct ratio_less1<R1, R2, Q, 0, Q, M2>
+  {
+    static const bool value = true;
+  };
+
+  template <class R1, class R2, boost::intmax_t Q, boost::intmax_t M1>
+  struct ratio_less1<R1, R2, Q, M1, Q, 0>
+  {
+    static const bool value = false;
+  };
+
+  template <class R1, class R2, boost::intmax_t Q, boost::intmax_t M1, boost::intmax_t M2>
+  struct ratio_less1<R1, R2, Q, M1, Q, M2>
+  {
+    static const bool value = ratio_less1<ratio<R2::den, M2>, ratio<R1::den, M1>
+                                            >::value;
+  };
+
+  template <
+      class R1,
+      class R2,
+      boost::intmax_t S1 = mpl::sign_c<boost::intmax_t, R1::num>::value,
+    boost::intmax_t S2 = mpl::sign_c<boost::intmax_t, R2::num>::value
+>
+  struct ratio_less
+  {
+      static const bool value = S1 < S2;
+  };
+
+  template <class R1, class R2>
+  struct ratio_less<R1, R2, 1LL, 1LL>
+  {
+      static const bool value = ratio_less1<R1, R2>::value;
+  };
+
+  template <class R1, class R2>
+  struct ratio_less<R1, R2, -1LL, -1LL>
+  {
+      static const bool value = ratio_less1<ratio<-R2::num, R2::den>,
+                                            ratio<-R1::num, R1::den> >::value;
+  };
+
+
+}  // namespace ratio_detail
+
+}  // namespace boost
+
+#endif  // BOOST_RATIO_HPP
diff --git a/ext/boost/ratio/ratio.hpp b/ext/boost/ratio/ratio.hpp
new file mode 100644
index 0000000..546e8f0
--- /dev/null
+++ b/ext/boost/ratio/ratio.hpp
@@ -0,0 +1,233 @@
+//  ratio.hpp  ---------------------------------------------------------------//
+
+//  Copyright 2008 Howard Hinnant
+//  Copyright 2008 Beman Dawes
+//  Copyright 2009 Vicente J. Botet Escriba
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+/*
+
+This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
+Many thanks to Howard for making his code available under the Boost license.
+The original code was modified to conform to Boost conventions and to section
+20.4 Compile-time rational arithmetic [ratio], of the C++ committee working
+paper N2798.
+See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
+
+time2_demo contained this comment:
+
+    Much thanks to Andrei Alexandrescu,
+                   Walter Brown,
+                   Peter Dimov,
+                   Jeff Garland,
+                   Terry Golubiewski,
+                   Daniel Krugler,
+                   Anthony Williams.
+*/
+
+// The way overflow is managed for ratio_less is taken from llvm/libcxx/include/ratio
+
+#ifndef BOOST_RATIO_RATIO_HPP
+#define BOOST_RATIO_RATIO_HPP
+
+#include <boost/ratio/config.hpp>
+#include <boost/ratio/detail/mpl/abs.hpp>
+#include <boost/ratio/detail/mpl/sign.hpp>
+#include <boost/ratio/detail/mpl/gcd.hpp>
+#include <boost/ratio/detail/mpl/lcm.hpp>
+#include <cstdlib>
+#include <climits>
+#include <limits>
+#include <boost/cstdint.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/integer_traits.hpp>
+#include <boost/ratio/ratio_fwd.hpp>
+#include <boost/ratio/detail/overflow_helpers.hpp>
+#ifdef BOOST_RATIO_EXTENSIONS
+#include <boost/rational.hpp>
+#include <boost/ratio/mpl/rational_c_tag.hpp>
+#endif
+
+//
+// We simply cannot include this header on gcc without getting copious warnings of the kind:
+//
+// boost/integer.hpp:77:30: warning: use of C99 long long integer constant
+//
+// And yet there is no other reasonable implementation, so we declare this a system header
+// to suppress these warnings.
+//
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+#pragma GCC system_header
+#endif
+
+namespace boost
+{
+
+
+//----------------------------------------------------------------------------//
+//                                                                            //
+//                20.6.1 Class template ratio [ratio.ratio]                   //
+//                                                                            //
+//----------------------------------------------------------------------------//
+
+template <boost::intmax_t N, boost::intmax_t D>
+class ratio
+{
+    static const boost::intmax_t ABS_N = mpl::abs_c<boost::intmax_t, N>::value;
+    static const boost::intmax_t ABS_D = mpl::abs_c<boost::intmax_t, D>::value;
+    BOOST_RATIO_STATIC_ASSERT(ABS_N >= 0, BOOST_RATIO_NUMERATOR_IS_OUT_OF_RANGE, ());
+    BOOST_RATIO_STATIC_ASSERT(ABS_D > 0, BOOST_RATIO_DENOMINATOR_IS_OUT_OF_RANGE, ());
+    BOOST_RATIO_STATIC_ASSERT(D != 0, BOOST_RATIO_DIVIDE_BY_0 , ());
+    static const boost::intmax_t SIGN_N = mpl::sign_c<boost::intmax_t,N>::value
+      * mpl::sign_c<boost::intmax_t,D>::value;
+    static const boost::intmax_t GCD = mpl::gcd_c<boost::intmax_t, ABS_N, ABS_D>::value;
+public:
+    BOOST_STATIC_CONSTEXPR boost::intmax_t num = SIGN_N * ABS_N / GCD;
+    BOOST_STATIC_CONSTEXPR boost::intmax_t den = ABS_D / GCD;
+
+#ifdef BOOST_RATIO_EXTENSIONS
+    typedef mpl::rational_c_tag tag;
+    typedef boost::rational<boost::intmax_t> value_type;
+    typedef boost::intmax_t num_type;
+    typedef boost::intmax_t den_type;
+    ratio()
+    {}
+    template <boost::intmax_t _N2, boost::intmax_t _D2>
+    ratio(const ratio<_N2, _D2>&,
+        typename enable_if_c
+            <
+                (ratio<_N2, _D2>::num == num &&
+                ratio<_N2, _D2>::den == den)
+            >::type* = 0)
+    {}
+
+    template <boost::intmax_t _N2, boost::intmax_t _D2>
+        typename enable_if_c
+        <
+            (ratio<_N2, _D2>::num == num &&
+            ratio<_N2, _D2>::den == den),
+            ratio&
+        >::type
+    operator=(const ratio<_N2, _D2>&) {return *this;}
+
+    static value_type value() {return value_type(num,den);}
+    value_type operator()() const {return value();}
+#endif
+    typedef ratio<num, den> type;
+};
+
+#if defined(BOOST_NO_CXX11_CONSTEXPR)
+template <boost::intmax_t N, boost::intmax_t D>
+const    boost::intmax_t ratio<N, D>::num;
+template <boost::intmax_t N, boost::intmax_t D>
+const    boost::intmax_t ratio<N, D>::den;
+#endif
+
+//----------------------------------------------------------------------------//
+//                                                                            //
+//                20.6.2 Arithmetic on ratio types [ratio.arithmetic]                   //
+//                                                                            //
+//----------------------------------------------------------------------------//
+
+template <class R1, class R2>
+struct ratio_add
+: boost::ratio_detail::ratio_add<R1, R2>::type
+{
+};
+
+template <class R1, class R2>
+struct ratio_subtract
+: boost::ratio_detail::ratio_subtract<R1, R2>::type
+{
+};
+
+template <class R1, class R2>
+struct ratio_multiply
+: boost::ratio_detail::ratio_multiply<R1, R2>::type
+{
+};
+
+template <class R1, class R2>
+struct ratio_divide
+: boost::ratio_detail::ratio_divide<R1, R2>::type
+{
+};
+
+//----------------------------------------------------------------------------//
+//                                                                            //
+//                20.6.3 Comparasion of ratio types [ratio.comparison]                   //
+//                                                                            //
+//----------------------------------------------------------------------------//
+
+// ratio_equal
+
+template <class R1, class R2>
+struct ratio_equal
+    : public boost::integral_constant<bool,
+                               (R1::num == R2::num && R1::den == R2::den)>
+{};
+
+template <class R1, class R2>
+struct ratio_not_equal
+    : public boost::integral_constant<bool, !ratio_equal<R1, R2>::value>
+{};
+
+// ratio_less
+
+template <class R1, class R2>
+struct ratio_less
+    : boost::integral_constant<bool, boost::ratio_detail::ratio_less<R1, R2>::value>
+{};
+
+template <class R1, class R2>
+struct ratio_less_equal
+    : boost::integral_constant<bool, !ratio_less<R2, R1>::value>
+{};
+
+template <class R1, class R2>
+struct ratio_greater
+    : boost::integral_constant<bool, ratio_less<R2, R1>::value>
+{};
+
+template <class R1, class R2>
+struct ratio_greater_equal
+    : boost::integral_constant<bool, !ratio_less<R1, R2>::value>
+{};
+
+template <class R1, class R2>
+struct ratio_gcd :
+    ratio<mpl::gcd_c<boost::intmax_t, R1::num, R2::num>::value,
+        mpl::lcm_c<boost::intmax_t, R1::den, R2::den>::value>::type
+{
+};
+
+#ifdef BOOST_RATIO_EXTENSIONS
+template <class R>
+struct ratio_negate
+    : ratio<-R::num, R::den>::type
+{
+};
+template <class R>
+struct ratio_abs
+    : ratio<mpl::abs_c<boost::intmax_t, R::num>::value, R::den>::type
+{
+};
+template <class R>
+struct ratio_sign
+    : mpl::sign_c<boost::intmax_t, R::num>
+{
+};
+template <class R1, class R2>
+struct ratio_lcm :
+    ratio<mpl::lcm_c<boost::intmax_t, R1::num, R2::num>::value,
+        mpl::gcd_c<boost::intmax_t, R1::den, R2::den>::value>::type
+{
+};
+#endif
+}  // namespace boost
+
+
+#endif  // BOOST_RATIO_RATIO_HPP
diff --git a/ext/boost/ratio/ratio_fwd.hpp b/ext/boost/ratio/ratio_fwd.hpp
new file mode 100644
index 0000000..0882e0b
--- /dev/null
+++ b/ext/boost/ratio/ratio_fwd.hpp
@@ -0,0 +1,84 @@
+//  ratio_fwd.hpp  ---------------------------------------------------------------//
+
+//  Copyright 2008 Howard Hinnant
+//  Copyright 2008 Beman Dawes
+//  Copyright 2009 Vicente J. Botet Escriba
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+/*
+
+This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
+Many thanks to Howard for making his code available under the Boost license.
+The original code was modified to conform to Boost conventions and to section
+20.4 Compile-time rational arithmetic [ratio], of the C++ committee working
+paper N2798.
+See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
+
+time2_demo contained this comment:
+
+    Much thanks to Andrei Alexandrescu,
+                   Walter Brown,
+                   Peter Dimov,
+                   Jeff Garland,
+                   Terry Golubiewski,
+                   Daniel Krugler,
+                   Anthony Williams.
+*/
+
+// The way overflow is managed for ratio_less is taken from llvm/libcxx/include/ratio
+
+#ifndef BOOST_RATIO_RATIO_FWD_HPP
+#define BOOST_RATIO_RATIO_FWD_HPP
+
+#include <boost/ratio/config.hpp>
+
+namespace boost
+{
+
+//----------------------------------------------------------------------------//
+//                                                                            //
+//              20.6 Compile-time rational arithmetic [ratio]                 //
+//                                                                            //
+//----------------------------------------------------------------------------//
+
+// ratio
+template <boost::intmax_t N, boost::intmax_t D = 1> class ratio;
+
+// ratio arithmetic
+template <class R1, class R2> struct ratio_add;
+template <class R1, class R2> struct ratio_subtract;
+template <class R1, class R2> struct ratio_multiply;
+template <class R1, class R2> struct ratio_divide;
+
+// ratio comparison
+template <class R1, class R2> struct ratio_equal;
+template <class R1, class R2> struct ratio_not_equal;
+template <class R1, class R2> struct ratio_less;
+template <class R1, class R2> struct ratio_less_equal;
+template <class R1, class R2> struct ratio_greater;
+template <class R1, class R2> struct ratio_greater_equal;
+
+// convenience SI typedefs
+typedef ratio<BOOST_RATIO_INTMAX_C(1), BOOST_RATIO_INTMAX_C(1000000000000000000)> atto;
+typedef ratio<BOOST_RATIO_INTMAX_C(1),    BOOST_RATIO_INTMAX_C(1000000000000000)> femto;
+typedef ratio<BOOST_RATIO_INTMAX_C(1),       BOOST_RATIO_INTMAX_C(1000000000000)> pico;
+typedef ratio<BOOST_RATIO_INTMAX_C(1),          BOOST_RATIO_INTMAX_C(1000000000)> nano;
+typedef ratio<BOOST_RATIO_INTMAX_C(1),             BOOST_RATIO_INTMAX_C(1000000)> micro;
+typedef ratio<BOOST_RATIO_INTMAX_C(1),                BOOST_RATIO_INTMAX_C(1000)> milli;
+typedef ratio<BOOST_RATIO_INTMAX_C(1),                 BOOST_RATIO_INTMAX_C(100)> centi;
+typedef ratio<BOOST_RATIO_INTMAX_C(1),                  BOOST_RATIO_INTMAX_C(10)> deci;
+typedef ratio<                 BOOST_RATIO_INTMAX_C(10), BOOST_RATIO_INTMAX_C(1)> deca;
+typedef ratio<                BOOST_RATIO_INTMAX_C(100), BOOST_RATIO_INTMAX_C(1)> hecto;
+typedef ratio<               BOOST_RATIO_INTMAX_C(1000), BOOST_RATIO_INTMAX_C(1)> kilo;
+typedef ratio<            BOOST_RATIO_INTMAX_C(1000000), BOOST_RATIO_INTMAX_C(1)> mega;
+typedef ratio<         BOOST_RATIO_INTMAX_C(1000000000), BOOST_RATIO_INTMAX_C(1)> giga;
+typedef ratio<      BOOST_RATIO_INTMAX_C(1000000000000), BOOST_RATIO_INTMAX_C(1)> tera;
+typedef ratio<   BOOST_RATIO_INTMAX_C(1000000000000000), BOOST_RATIO_INTMAX_C(1)> peta;
+typedef ratio<BOOST_RATIO_INTMAX_C(1000000000000000000), BOOST_RATIO_INTMAX_C(1)> exa;
+
+}  // namespace boost
+
+
+#endif  // BOOST_RATIO_HPP
diff --git a/ext/boost/smart_ptr/._bad_weak_ptr.hpp b/ext/boost/smart_ptr/._bad_weak_ptr.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/._bad_weak_ptr.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/._enable_shared_from_this.hpp b/ext/boost/smart_ptr/._enable_shared_from_this.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/._enable_shared_from_this.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/._scoped_array.hpp b/ext/boost/smart_ptr/._scoped_array.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/._scoped_array.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/._scoped_ptr.hpp b/ext/boost/smart_ptr/._scoped_ptr.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/._scoped_ptr.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._atomic_count.hpp b/ext/boost/smart_ptr/detail/._atomic_count.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._atomic_count.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._atomic_count_gcc.hpp b/ext/boost/smart_ptr/detail/._atomic_count_gcc.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._atomic_count_gcc.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._atomic_count_gcc_x86.hpp b/ext/boost/smart_ptr/detail/._atomic_count_gcc_x86.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._atomic_count_gcc_x86.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._atomic_count_pthreads.hpp b/ext/boost/smart_ptr/detail/._atomic_count_pthreads.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._atomic_count_pthreads.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._atomic_count_solaris.hpp b/ext/boost/smart_ptr/detail/._atomic_count_solaris.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._atomic_count_solaris.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._atomic_count_sync.hpp b/ext/boost/smart_ptr/detail/._atomic_count_sync.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._atomic_count_sync.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._atomic_count_win32.hpp b/ext/boost/smart_ptr/detail/._atomic_count_win32.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._atomic_count_win32.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._operator_bool.hpp b/ext/boost/smart_ptr/detail/._operator_bool.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._operator_bool.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._sp_convertible.hpp b/ext/boost/smart_ptr/detail/._sp_convertible.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._sp_convertible.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._sp_counted_base_acc_ia64.hpp b/ext/boost/smart_ptr/detail/._sp_counted_base_acc_ia64.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._sp_counted_base_acc_ia64.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._sp_counted_base_cw_ppc.hpp b/ext/boost/smart_ptr/detail/._sp_counted_base_cw_ppc.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._sp_counted_base_cw_ppc.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._sp_counted_base_cw_x86.hpp b/ext/boost/smart_ptr/detail/._sp_counted_base_cw_x86.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._sp_counted_base_cw_x86.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._sp_counted_base_gcc_ia64.hpp b/ext/boost/smart_ptr/detail/._sp_counted_base_gcc_ia64.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._sp_counted_base_gcc_ia64.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._sp_counted_base_gcc_ppc.hpp b/ext/boost/smart_ptr/detail/._sp_counted_base_gcc_ppc.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._sp_counted_base_gcc_ppc.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._sp_counted_base_gcc_sparc.hpp b/ext/boost/smart_ptr/detail/._sp_counted_base_gcc_sparc.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._sp_counted_base_gcc_sparc.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._sp_counted_base_gcc_x86.hpp b/ext/boost/smart_ptr/detail/._sp_counted_base_gcc_x86.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._sp_counted_base_gcc_x86.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._sp_counted_base_nt.hpp b/ext/boost/smart_ptr/detail/._sp_counted_base_nt.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._sp_counted_base_nt.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._sp_counted_base_pt.hpp b/ext/boost/smart_ptr/detail/._sp_counted_base_pt.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._sp_counted_base_pt.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._sp_counted_base_solaris.hpp b/ext/boost/smart_ptr/detail/._sp_counted_base_solaris.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._sp_counted_base_solaris.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._sp_counted_base_spin.hpp b/ext/boost/smart_ptr/detail/._sp_counted_base_spin.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._sp_counted_base_spin.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._sp_counted_base_sync.hpp b/ext/boost/smart_ptr/detail/._sp_counted_base_sync.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._sp_counted_base_sync.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._sp_counted_base_w32.hpp b/ext/boost/smart_ptr/detail/._sp_counted_base_w32.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._sp_counted_base_w32.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._spinlock_nt.hpp b/ext/boost/smart_ptr/detail/._spinlock_nt.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._spinlock_nt.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._spinlock_pt.hpp b/ext/boost/smart_ptr/detail/._spinlock_pt.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._spinlock_pt.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._spinlock_sync.hpp b/ext/boost/smart_ptr/detail/._spinlock_sync.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._spinlock_sync.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/._yield_k.hpp b/ext/boost/smart_ptr/detail/._yield_k.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/smart_ptr/detail/._yield_k.hpp and /dev/null differ
diff --git a/ext/boost/smart_ptr/detail/atomic_count_win32.hpp b/ext/boost/smart_ptr/detail/atomic_count_win32.hpp
deleted file mode 100644
index 60a0569..0000000
--- a/ext/boost/smart_ptr/detail/atomic_count_win32.hpp
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-//  boost/detail/atomic_count_win32.hpp
-//
-//  Copyright (c) 2001-2005 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#include <boost/detail/interlocked.hpp>
-
-namespace boost
-{
-
-namespace detail
-{
-
-class atomic_count
-{
-public:
-
-    explicit atomic_count( long v ): value_( v )
-    {
-    }
-
-    long operator++()
-    {
-        return BOOST_INTERLOCKED_INCREMENT( &value_ );
-    }
-
-    long operator--()
-    {
-        return BOOST_INTERLOCKED_DECREMENT( &value_ );
-    }
-
-    operator long() const
-    {
-        return static_cast<long const volatile &>( value_ );
-    }
-
-private:
-
-    atomic_count( atomic_count const & );
-    atomic_count & operator=( atomic_count const & );
-
-    long value_;
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED
diff --git a/ext/boost/smart_ptr/detail/shared_count.hpp b/ext/boost/smart_ptr/detail/shared_count.hpp
index 4943e37..f96a220 100644
--- a/ext/boost/smart_ptr/detail/shared_count.hpp
+++ b/ext/boost/smart_ptr/detail/shared_count.hpp
@@ -52,6 +52,10 @@ int const   weak_count_id = 0x298C38A4;
 
 struct sp_nothrow_tag {};
 
+template< class D > struct sp_inplace_tag
+{
+};
+
 class weak_count;
 
 class shared_count
@@ -142,6 +146,40 @@ public:
 #endif
     }
 
+#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )
+
+    template< class P, class D > shared_count( P p, sp_inplace_tag<D> ): pi_( 0 )
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+        , id_(shared_count_id)
+#endif
+    {
+#ifndef BOOST_NO_EXCEPTIONS
+
+        try
+        {
+            pi_ = new sp_counted_impl_pd< P, D >( p );
+        }
+        catch( ... )
+        {
+            D()( p ); // delete p
+            throw;
+        }
+
+#else
+
+        pi_ = new sp_counted_impl_pd< P, D >( p );
+
+        if( pi_ == 0 )
+        {
+            D()( p ); // delete p
+            boost::throw_exception( std::bad_alloc() );
+        }
+
+#endif // #ifndef BOOST_NO_EXCEPTIONS
+    }
+
+#endif // !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )
+
     template<class P, class D, class A> shared_count( P p, D d, A a ): pi_( 0 )
 #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
         , id_(shared_count_id)
@@ -188,6 +226,56 @@ public:
 #endif
     }
 
+#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )
+
+    template< class P, class D, class A > shared_count( P p, sp_inplace_tag< D >, A a ): pi_( 0 )
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+        , id_(shared_count_id)
+#endif
+    {
+        typedef sp_counted_impl_pda< P, D, A > impl_type;
+        typedef typename A::template rebind< impl_type >::other A2;
+
+        A2 a2( a );
+
+#ifndef BOOST_NO_EXCEPTIONS
+
+        try
+        {
+            pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) );
+            new( static_cast< void* >( pi_ ) ) impl_type( p, a );
+        }
+        catch(...)
+        {
+            D()( p );
+
+            if( pi_ != 0 )
+            {
+                a2.deallocate( static_cast< impl_type* >( pi_ ), 1 );
+            }
+
+            throw;
+        }
+
+#else
+
+        pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) );
+
+        if( pi_ != 0 )
+        {
+            new( static_cast< void* >( pi_ ) ) impl_type( p, a );
+        }
+        else
+        {
+            D()( p );
+            boost::throw_exception( std::bad_alloc() );
+        }
+
+#endif // #ifndef BOOST_NO_EXCEPTIONS
+    }
+
+#endif // !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )
+
 #ifndef BOOST_NO_AUTO_PTR
 
     // auto_ptr<Y> is special cased to provide the strong guarantee
diff --git a/ext/boost/smart_ptr/detail/sp_counted_base.hpp b/ext/boost/smart_ptr/detail/sp_counted_base.hpp
index cab45cc..24adfcc 100644
--- a/ext/boost/smart_ptr/detail/sp_counted_base.hpp
+++ b/ext/boost/smart_ptr/detail/sp_counted_base.hpp
@@ -41,6 +41,9 @@
 #elif defined(__HP_aCC) && defined(__ia64)
 # include <boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp>
 
+#elif defined( __IBMCPP__ ) && defined( __powerpc )
+# include <boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp>
+
 #elif defined( __MWERKS__ ) && defined( __POWERPC__ )
 # include <boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp>
 
diff --git a/ext/boost/smart_ptr/detail/sp_counted_base_aix.hpp b/ext/boost/smart_ptr/detail/sp_counted_base_aix.hpp
new file mode 100644
index 0000000..0208678
--- /dev/null
+++ b/ext/boost/smart_ptr/detail/sp_counted_base_aix.hpp
@@ -0,0 +1,142 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED
+
+//
+//  detail/sp_counted_base_aix.hpp
+//   based on: detail/sp_counted_base_w32.hpp
+//
+//  Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+//  Copyright 2004-2005 Peter Dimov
+//  Copyright 2006 Michael van der Westhuizen
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+//  Lock-free algorithm by Alexander Terekhov
+//
+//  Thanks to Ben Hitchings for the #weak + (#shared != 0)
+//  formulation
+//
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <builtins.h>
+#include <sys/atomic_op.h>
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline void atomic_increment( int32_t* pw )
+{
+    // ++*pw;
+
+    fetch_and_add( pw, 1 );
+}
+
+inline int32_t atomic_decrement( int32_t * pw )
+{
+    // return --*pw;
+
+    int32_t originalValue;
+
+    __lwsync();
+    originalValue = fetch_and_add( pw, -1 );
+    __isync();
+
+    return (originalValue - 1);
+}
+
+inline int32_t atomic_conditional_increment( int32_t * pw )
+{
+    // if( *pw != 0 ) ++*pw;
+    // return *pw;
+
+    int32_t tmp = fetch_and_add( pw, 0 );
+    for( ;; )
+    {
+        if( tmp == 0 ) return 0;
+        if( compare_and_swap( pw, &tmp, tmp + 1 ) ) return (tmp + 1);
+    }
+}
+
+class sp_counted_base
+{
+private:
+
+    sp_counted_base( sp_counted_base const & );
+    sp_counted_base & operator= ( sp_counted_base const & );
+
+    int32_t use_count_;        // #shared
+    int32_t weak_count_;       // #weak + (#shared != 0)
+
+public:
+
+    sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+    {
+    }
+
+    virtual ~sp_counted_base() // nothrow
+    {
+    }
+
+    // dispose() is called when use_count_ drops to zero, to release
+    // the resources managed by *this.
+
+    virtual void dispose() = 0; // nothrow
+
+    // destroy() is called when weak_count_ drops to zero.
+
+    virtual void destroy() // nothrow
+    {
+        delete this;
+    }
+
+    virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+
+    void add_ref_copy()
+    {
+        atomic_increment( &use_count_ );
+    }
+
+    bool add_ref_lock() // true on success
+    {
+        return atomic_conditional_increment( &use_count_ ) != 0;
+    }
+
+    void release() // nothrow
+    {
+        if( atomic_decrement( &use_count_ ) == 0 )
+        {
+            dispose();
+            weak_release();
+        }
+    }
+
+    void weak_add_ref() // nothrow
+    {
+        atomic_increment( &weak_count_ );
+    }
+
+    void weak_release() // nothrow
+    {
+        if( atomic_decrement( &weak_count_ ) == 0 )
+        {
+            destroy();
+        }
+    }
+
+    long use_count() const // nothrow
+    {
+        return fetch_and_add( const_cast<int32_t*>(&use_count_), 0 );
+    }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif  // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED
diff --git a/ext/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp b/ext/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
index 0c69b0b..3f1f449 100644
--- a/ext/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
+++ b/ext/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
@@ -37,9 +37,12 @@ inline void atomic_increment( int * pw )
     __asm__ __volatile__
     (
         "0:\n\t"
+        ".set push\n\t"
+        ".set mips2\n\t"
         "ll %0, %1\n\t"
         "addiu %0, 1\n\t"
         "sc %0, %1\n\t"
+        ".set pop\n\t"
         "beqz %0, 0b":
         "=&r"( tmp ), "=m"( *pw ):
         "m"( *pw )
@@ -55,9 +58,12 @@ inline int atomic_decrement( int * pw )
     __asm__ __volatile__
     (
         "0:\n\t"
+        ".set push\n\t"
+        ".set mips2\n\t"
         "ll %1, %2\n\t"
         "addiu %0, %1, -1\n\t"
         "sc %0, %2\n\t"
+        ".set pop\n\t"
         "beqz %0, 0b\n\t"
         "addiu %0, %1, -1":
         "=&r"( rv ), "=&r"( tmp ), "=m"( *pw ):
@@ -78,10 +84,13 @@ inline int atomic_conditional_increment( int * pw )
     __asm__ __volatile__
     (
         "0:\n\t"
+        ".set push\n\t"
+        ".set mips2\n\t"
         "ll %0, %2\n\t"
         "beqz %0, 1f\n\t"
         "addiu %1, %0, 1\n\t"
         "sc %1, %2\n\t"
+        ".set pop\n\t"
         "beqz %1, 0b\n\t"
         "addiu %0, %0, 1\n\t"
         "1:":
diff --git a/ext/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp b/ext/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp
new file mode 100644
index 0000000..842f58f
--- /dev/null
+++ b/ext/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp
@@ -0,0 +1,150 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED
+
+//
+//  detail/sp_counted_base_vacpp_ppc.hpp - xlC(vacpp) on POWER
+//   based on: detail/sp_counted_base_w32.hpp
+//
+//  Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+//  Copyright 2004-2005 Peter Dimov
+//  Copyright 2006 Michael van der Westhuizen
+//  Copyright 2012 IBM Corp.
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+//  Lock-free algorithm by Alexander Terekhov
+//
+//  Thanks to Ben Hitchings for the #weak + (#shared != 0)
+//  formulation
+//
+
+#include <boost/detail/sp_typeinfo.hpp>
+
+extern "builtin" void __lwsync(void);
+extern "builtin" void __isync(void);
+extern "builtin" int __fetch_and_add(volatile int* addr, int val);
+extern "builtin" int __compare_and_swap(volatile int*, int*, int);
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline void atomic_increment( int *pw )
+{
+   // ++*pw;
+   __lwsync();
+   __fetch_and_add(pw, 1);
+   __isync();
+} 
+
+inline int atomic_decrement( int *pw )
+{
+   // return --*pw;
+   __lwsync();
+   int originalValue = __fetch_and_add(pw, -1);
+   __isync();
+
+   return (originalValue - 1);
+}
+
+inline int atomic_conditional_increment( int *pw )
+{
+   // if( *pw != 0 ) ++*pw;
+   // return *pw;
+
+   __lwsync();
+   int v = *const_cast<volatile int*>(pw);
+   for (;;)
+   // loop until state is known
+   {
+      if (v == 0) return 0;
+      if (__compare_and_swap(pw, &v, v + 1))
+      {
+         __isync(); return (v + 1);
+      }
+   }
+}
+
+class sp_counted_base
+{
+private:
+
+    sp_counted_base( sp_counted_base const & );
+    sp_counted_base & operator= ( sp_counted_base const & );
+
+    int use_count_;        // #shared
+    int weak_count_;       // #weak + (#shared != 0)
+    char pad[64] __attribute__((__aligned__(64)));
+            // pad to prevent false sharing
+public:
+
+    sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+    {
+    }
+
+    virtual ~sp_counted_base() // nothrow
+    {
+    }
+
+    // dispose() is called when use_count_ drops to zero, to release
+    // the resources managed by *this.
+
+    virtual void dispose() = 0; // nothrow
+
+    // destroy() is called when weak_count_ drops to zero.
+
+    virtual void destroy() // nothrow
+    {
+        delete this;
+    }
+
+    virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+
+    void add_ref_copy()
+    {
+        atomic_increment( &use_count_ );
+    }
+
+    bool add_ref_lock() // true on success
+    {
+        return atomic_conditional_increment( &use_count_ ) != 0;
+    }
+
+    void release() // nothrow
+    {
+        if( atomic_decrement( &use_count_ ) == 0 )
+        {
+            dispose();
+            weak_release();
+        }
+    }
+
+    void weak_add_ref() // nothrow
+    {
+        atomic_increment( &weak_count_ );
+    }
+
+    void weak_release() // nothrow
+    {
+        if( atomic_decrement( &weak_count_ ) == 0 )
+        {
+            destroy();
+        }
+    }
+
+    long use_count() const // nothrow
+    {
+        return *const_cast<volatile int*>(&use_count_); 
+    }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif  // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED
diff --git a/ext/boost/smart_ptr/detail/sp_counted_base_w32.hpp b/ext/boost/smart_ptr/detail/sp_counted_base_w32.hpp
deleted file mode 100644
index 06aa456..0000000
--- a/ext/boost/smart_ptr/detail/sp_counted_base_w32.hpp
+++ /dev/null
@@ -1,130 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-//  detail/sp_counted_base_w32.hpp
-//
-//  Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
-//  Copyright 2004-2005 Peter Dimov
-//
-//  Distributed under the Boost Software License, Version 1.0. (See
-//  accompanying file LICENSE_1_0.txt or copy at
-//  http://www.boost.org/LICENSE_1_0.txt)
-//
-//
-//  Lock-free algorithm by Alexander Terekhov
-//
-//  Thanks to Ben Hitchings for the #weak + (#shared != 0)
-//  formulation
-//
-
-#include <boost/detail/interlocked.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/detail/sp_typeinfo.hpp>
-
-namespace boost
-{
-
-namespace detail
-{
-
-class sp_counted_base
-{
-private:
-
-    sp_counted_base( sp_counted_base const & );
-    sp_counted_base & operator= ( sp_counted_base const & );
-
-    long use_count_;        // #shared
-    long weak_count_;       // #weak + (#shared != 0)
-
-public:
-
-    sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
-    {
-    }
-
-    virtual ~sp_counted_base() // nothrow
-    {
-    }
-
-    // dispose() is called when use_count_ drops to zero, to release
-    // the resources managed by *this.
-
-    virtual void dispose() = 0; // nothrow
-
-    // destroy() is called when weak_count_ drops to zero.
-
-    virtual void destroy() // nothrow
-    {
-        delete this;
-    }
-
-    virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
-
-    void add_ref_copy()
-    {
-        BOOST_INTERLOCKED_INCREMENT( &use_count_ );
-    }
-
-    bool add_ref_lock() // true on success
-    {
-        for( ;; )
-        {
-            long tmp = static_cast< long const volatile& >( use_count_ );
-            if( tmp == 0 ) return false;
-
-#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1200 )
-
-            // work around a code generation bug
-
-            long tmp2 = tmp + 1;
-            if( BOOST_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp2, tmp ) == tmp2 - 1 ) return true;
-
-#else
-
-            if( BOOST_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp + 1, tmp ) == tmp ) return true;
-
-#endif
-        }
-    }
-
-    void release() // nothrow
-    {
-        if( BOOST_INTERLOCKED_DECREMENT( &use_count_ ) == 0 )
-        {
-            dispose();
-            weak_release();
-        }
-    }
-
-    void weak_add_ref() // nothrow
-    {
-        BOOST_INTERLOCKED_INCREMENT( &weak_count_ );
-    }
-
-    void weak_release() // nothrow
-    {
-        if( BOOST_INTERLOCKED_DECREMENT( &weak_count_ ) == 0 )
-        {
-            destroy();
-        }
-    }
-
-    long use_count() const // nothrow
-    {
-        return static_cast<long const volatile &>( use_count_ );
-    }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif  // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED
diff --git a/ext/boost/smart_ptr/detail/sp_counted_impl.hpp b/ext/boost/smart_ptr/detail/sp_counted_impl.hpp
index 397421a..aab39bd 100644
--- a/ext/boost/smart_ptr/detail/sp_counted_impl.hpp
+++ b/ext/boost/smart_ptr/detail/sp_counted_impl.hpp
@@ -135,7 +135,11 @@ public:
 
     // pre: d(p) must not throw
 
-    sp_counted_impl_pd( P p, D d ): ptr(p), del(d)
+    sp_counted_impl_pd( P p, D & d ): ptr( p ), del( d )
+    {
+    }
+
+    sp_counted_impl_pd( P p ): ptr( p ), del()
     {
     }
 
@@ -195,7 +199,11 @@ public:
 
     // pre: d( p ) must not throw
 
-    sp_counted_impl_pda( P p, D d, A a ): p_( p ), d_( d ), a_( a )
+    sp_counted_impl_pda( P p, D & d, A a ): p_( p ), d_( d ), a_( a )
+    {
+    }
+
+    sp_counted_impl_pda( P p, A a ): p_( p ), d_(), a_( a )
     {
     }
 
diff --git a/ext/boost/smart_ptr/detail/sp_has_sync.hpp b/ext/boost/smart_ptr/detail/sp_has_sync.hpp
index 7fcd09e..12acea8 100644
--- a/ext/boost/smart_ptr/detail/sp_has_sync.hpp
+++ b/ext/boost/smart_ptr/detail/sp_has_sync.hpp
@@ -20,7 +20,7 @@
 //  are available.
 //
 
-#if defined(__GNUC__) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 )
+#if defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) && !defined( BOOST_SP_NO_SYNC )
 
 #define BOOST_SP_HAS_SYNC
 
@@ -36,6 +36,10 @@
 #undef BOOST_SP_HAS_SYNC
 #endif
 
+#if defined( __sh__ )
+#undef BOOST_SP_HAS_SYNC
+#endif
+
 #if defined( __sparc__ )
 #undef BOOST_SP_HAS_SYNC
 #endif
diff --git a/ext/boost/smart_ptr/detail/spinlock.hpp b/ext/boost/smart_ptr/detail/spinlock.hpp
index 1640a38..88d7ad6 100644
--- a/ext/boost/smart_ptr/detail/spinlock.hpp
+++ b/ext/boost/smart_ptr/detail/spinlock.hpp
@@ -31,7 +31,10 @@
 #include <boost/config.hpp>
 #include <boost/smart_ptr/detail/sp_has_sync.hpp>
 
-#if defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ )
+#if defined( BOOST_SP_USE_PTHREADS )
+#  include <boost/smart_ptr/detail/spinlock_pt.hpp>
+
+#elif defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ )
 #  include <boost/smart_ptr/detail/spinlock_gcc_arm.hpp>
 
 #elif defined( BOOST_SP_HAS_SYNC )
diff --git a/ext/boost/smart_ptr/detail/spinlock_gcc_arm.hpp b/ext/boost/smart_ptr/detail/spinlock_gcc_arm.hpp
index ba6c511..f1bbaf6 100644
--- a/ext/boost/smart_ptr/detail/spinlock_gcc_arm.hpp
+++ b/ext/boost/smart_ptr/detail/spinlock_gcc_arm.hpp
@@ -2,7 +2,7 @@
 #define BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED
 
 //
-//  Copyright (c) 2008 Peter Dimov
+//  Copyright (c) 2008, 2011 Peter Dimov
 //
 //  Distributed under the Boost Software License, Version 1.0.
 //  See accompanying file LICENSE_1_0.txt or copy at
@@ -11,6 +11,20 @@
 
 #include <boost/smart_ptr/detail/yield_k.hpp>
 
+#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
+
+# define BOOST_SP_ARM_BARRIER "dmb"
+
+#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__)
+
+# define BOOST_SP_ARM_BARRIER "mcr p15, 0, r0, c7, c10, 5"
+
+#else
+
+# define BOOST_SP_ARM_BARRIER ""
+
+#endif
+
 namespace boost
 {
 
@@ -29,12 +43,38 @@ public:
     {
         int r;
 
+#if defined(__ARM_ARCH_6__) \
+    || defined(__ARM_ARCH_6J__) \
+    || defined(__ARM_ARCH_6K__) \
+    || defined(__ARM_ARCH_6Z__) \
+    || defined(__ARM_ARCH_6ZK__) \
+    || defined(__ARM_ARCH_6T2__) \
+    || defined(__ARM_ARCH_7__) \
+    || defined(__ARM_ARCH_7A__) \
+    || defined(__ARM_ARCH_7R__) \
+    || defined(__ARM_ARCH_7M__) \
+    || defined(__ARM_ARCH_7EM__)
+
         __asm__ __volatile__(
-            "swp %0, %1, [%2]":
+            "ldrex %0, [%2]; \n"
+            "cmp %0, %1; \n"
+            "strexne %0, %1, [%2]; \n"
+            BOOST_SP_ARM_BARRIER :
             "=&r"( r ): // outputs
             "r"( 1 ), "r"( &v_ ): // inputs
             "memory", "cc" );
 
+#else
+
+        __asm__ __volatile__(
+            "swp %0, %1, [%2];\n"
+            BOOST_SP_ARM_BARRIER :
+            "=&r"( r ): // outputs
+            "r"( 1 ), "r"( &v_ ): // inputs
+            "memory", "cc" );
+
+#endif
+
         return r == 0;
     }
 
@@ -48,7 +88,7 @@ public:
 
     void unlock()
     {
-        __asm__ __volatile__( "" ::: "memory" );
+        __asm__ __volatile__( BOOST_SP_ARM_BARRIER ::: "memory" );
         *const_cast< int volatile* >( &v_ ) = 0;
     }
 
@@ -82,4 +122,6 @@ public:
 
 #define BOOST_DETAIL_SPINLOCK_INIT {0}
 
+#undef BOOST_SP_ARM_BARRIER
+
 #endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED
diff --git a/ext/boost/smart_ptr/detail/spinlock_pool.hpp b/ext/boost/smart_ptr/detail/spinlock_pool.hpp
index 0e2e08a..f09d5c6 100644
--- a/ext/boost/smart_ptr/detail/spinlock_pool.hpp
+++ b/ext/boost/smart_ptr/detail/spinlock_pool.hpp
@@ -41,7 +41,11 @@ public:
 
     static spinlock & spinlock_for( void const * pv )
     {
+#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64  
+        std::size_t i = reinterpret_cast< unsigned long long >( pv ) % 41;
+#else  
         std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41;
+#endif  
         return pool_[ i ];
     }
 
diff --git a/ext/boost/smart_ptr/make_shared.hpp b/ext/boost/smart_ptr/make_shared.hpp
index c4ed28a..51df682 100644
--- a/ext/boost/smart_ptr/make_shared.hpp
+++ b/ext/boost/smart_ptr/make_shared.hpp
@@ -49,7 +49,18 @@ private:
     {
         if( initialized_ )
         {
+#if defined( __GNUC__ )
+
+            // fixes incorrect aliasing warning
+            T * p = reinterpret_cast< T* >( storage_.data_ );
+            p->~T();
+
+#else
+
             reinterpret_cast< T* >( storage_.data_ )->~T();
+
+#endif
+
             initialized_ = false;
         }
     }
@@ -97,13 +108,19 @@ template< class T > T&& sp_forward( T & t )
 
 } // namespace detail
 
+#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )
+# define BOOST_SP_MSD( T ) boost::detail::sp_inplace_tag< boost::detail::sp_ms_deleter< T > >()
+#else
+# define BOOST_SP_MSD( T ) boost::detail::sp_ms_deleter< T >()
+#endif
+
 // Zero-argument versions
 //
 // Used even when variadic templates are available because of the new T() vs new T issue
 
 template< class T > boost::shared_ptr< T > make_shared()
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -120,7 +137,7 @@ template< class T > boost::shared_ptr< T > make_shared()
 
 template< class T, class A > boost::shared_ptr< T > allocate_shared( A const & a )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -141,7 +158,7 @@ template< class T, class A > boost::shared_ptr< T > allocate_shared( A const & a
 
 template< class T, class Arg1, class... Args > boost::shared_ptr< T > make_shared( Arg1 && arg1, Args && ... args )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -158,7 +175,7 @@ template< class T, class Arg1, class... Args > boost::shared_ptr< T > make_share
 
 template< class T, class A, class Arg1, class... Args > boost::shared_ptr< T > allocate_shared( A const & a, Arg1 && arg1, Args && ... args )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -173,6 +190,520 @@ template< class T, class A, class Arg1, class... Args > boost::shared_ptr< T > a
     return boost::shared_ptr< T >( pt, pt2 );
 }
 
+#elif defined( BOOST_HAS_RVALUE_REFS )
+
+// For example MSVC 10.0
+
+template< class T, class A1 >
+boost::shared_ptr< T > make_shared( A1 && a1 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T(
+        boost::detail::sp_forward<A1>( a1 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1 >
+boost::shared_ptr< T > allocate_shared( A const & a, A1 && a1 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T( 
+        boost::detail::sp_forward<A1>( a1 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2 >
+boost::shared_ptr< T > make_shared( A1 && a1, A2 && a2 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T(
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2 >
+boost::shared_ptr< T > allocate_shared( A const & a, A1 && a1, A2 && a2 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T( 
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3 >
+boost::shared_ptr< T > make_shared( A1 && a1, A2 && a2, A3 && a3 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T(
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 ), 
+        boost::detail::sp_forward<A3>( a3 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3 >
+boost::shared_ptr< T > allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T( 
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 ), 
+        boost::detail::sp_forward<A3>( a3 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4 >
+boost::shared_ptr< T > make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T(
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 ), 
+        boost::detail::sp_forward<A3>( a3 ), 
+        boost::detail::sp_forward<A4>( a4 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4 >
+boost::shared_ptr< T > allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T( 
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 ), 
+        boost::detail::sp_forward<A3>( a3 ), 
+        boost::detail::sp_forward<A4>( a4 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4, class A5 >
+boost::shared_ptr< T > make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T(
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 ), 
+        boost::detail::sp_forward<A3>( a3 ), 
+        boost::detail::sp_forward<A4>( a4 ), 
+        boost::detail::sp_forward<A5>( a5 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5 >
+boost::shared_ptr< T > allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T( 
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 ), 
+        boost::detail::sp_forward<A3>( a3 ), 
+        boost::detail::sp_forward<A4>( a4 ), 
+        boost::detail::sp_forward<A5>( a5 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4, class A5, class A6 >
+boost::shared_ptr< T > make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T(
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 ), 
+        boost::detail::sp_forward<A3>( a3 ), 
+        boost::detail::sp_forward<A4>( a4 ), 
+        boost::detail::sp_forward<A5>( a5 ), 
+        boost::detail::sp_forward<A6>( a6 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6 >
+boost::shared_ptr< T > allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T( 
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 ), 
+        boost::detail::sp_forward<A3>( a3 ), 
+        boost::detail::sp_forward<A4>( a4 ), 
+        boost::detail::sp_forward<A5>( a5 ), 
+        boost::detail::sp_forward<A6>( a6 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 >
+boost::shared_ptr< T > make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T(
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 ), 
+        boost::detail::sp_forward<A3>( a3 ), 
+        boost::detail::sp_forward<A4>( a4 ), 
+        boost::detail::sp_forward<A5>( a5 ), 
+        boost::detail::sp_forward<A6>( a6 ), 
+        boost::detail::sp_forward<A7>( a7 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7 >
+boost::shared_ptr< T > allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T( 
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 ), 
+        boost::detail::sp_forward<A3>( a3 ), 
+        boost::detail::sp_forward<A4>( a4 ), 
+        boost::detail::sp_forward<A5>( a5 ), 
+        boost::detail::sp_forward<A6>( a6 ), 
+        boost::detail::sp_forward<A7>( a7 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 >
+boost::shared_ptr< T > make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T(
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 ), 
+        boost::detail::sp_forward<A3>( a3 ), 
+        boost::detail::sp_forward<A4>( a4 ), 
+        boost::detail::sp_forward<A5>( a5 ), 
+        boost::detail::sp_forward<A6>( a6 ), 
+        boost::detail::sp_forward<A7>( a7 ), 
+        boost::detail::sp_forward<A8>( a8 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 >
+boost::shared_ptr< T > allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T( 
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 ), 
+        boost::detail::sp_forward<A3>( a3 ), 
+        boost::detail::sp_forward<A4>( a4 ), 
+        boost::detail::sp_forward<A5>( a5 ), 
+        boost::detail::sp_forward<A6>( a6 ), 
+        boost::detail::sp_forward<A7>( a7 ), 
+        boost::detail::sp_forward<A8>( a8 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 >
+boost::shared_ptr< T > make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T(
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 ), 
+        boost::detail::sp_forward<A3>( a3 ), 
+        boost::detail::sp_forward<A4>( a4 ), 
+        boost::detail::sp_forward<A5>( a5 ), 
+        boost::detail::sp_forward<A6>( a6 ), 
+        boost::detail::sp_forward<A7>( a7 ), 
+        boost::detail::sp_forward<A8>( a8 ), 
+        boost::detail::sp_forward<A9>( a9 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 >
+boost::shared_ptr< T > allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T( 
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 ), 
+        boost::detail::sp_forward<A3>( a3 ), 
+        boost::detail::sp_forward<A4>( a4 ), 
+        boost::detail::sp_forward<A5>( a5 ), 
+        boost::detail::sp_forward<A6>( a6 ), 
+        boost::detail::sp_forward<A7>( a7 ), 
+        boost::detail::sp_forward<A8>( a8 ), 
+        boost::detail::sp_forward<A9>( a9 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10 >
+boost::shared_ptr< T > make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9, A10 && a10 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T(
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 ), 
+        boost::detail::sp_forward<A3>( a3 ), 
+        boost::detail::sp_forward<A4>( a4 ), 
+        boost::detail::sp_forward<A5>( a5 ), 
+        boost::detail::sp_forward<A6>( a6 ), 
+        boost::detail::sp_forward<A7>( a7 ), 
+        boost::detail::sp_forward<A8>( a8 ), 
+        boost::detail::sp_forward<A9>( a9 ),
+        boost::detail::sp_forward<A9>( a10 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10 >
+boost::shared_ptr< T > allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9, A10 && a10 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T( 
+        boost::detail::sp_forward<A1>( a1 ), 
+        boost::detail::sp_forward<A2>( a2 ), 
+        boost::detail::sp_forward<A3>( a3 ), 
+        boost::detail::sp_forward<A4>( a4 ), 
+        boost::detail::sp_forward<A5>( a5 ), 
+        boost::detail::sp_forward<A6>( a6 ), 
+        boost::detail::sp_forward<A7>( a7 ), 
+        boost::detail::sp_forward<A8>( a8 ), 
+        boost::detail::sp_forward<A9>( a9 ), 
+        boost::detail::sp_forward<A9>( a10 )
+        );
+
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
 #else
 
 // C++03 version
@@ -180,7 +711,7 @@ template< class T, class A, class Arg1, class... Args > boost::shared_ptr< T > a
 template< class T, class A1 >
 boost::shared_ptr< T > make_shared( A1 const & a1 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -198,7 +729,7 @@ boost::shared_ptr< T > make_shared( A1 const & a1 )
 template< class T, class A, class A1 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -216,7 +747,7 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1 )
 template< class T, class A1, class A2 >
 boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -234,7 +765,7 @@ boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2 )
 template< class T, class A, class A1, class A2 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -252,7 +783,7 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a
 template< class T, class A1, class A2, class A3 >
 boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -270,7 +801,7 @@ boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3
 template< class T, class A, class A1, class A2, class A3 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -288,7 +819,7 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a
 template< class T, class A1, class A2, class A3, class A4 >
 boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -306,7 +837,7 @@ boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3,
 template< class T, class A, class A1, class A2, class A3, class A4 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -324,7 +855,7 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a
 template< class T, class A1, class A2, class A3, class A4, class A5 >
 boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -342,7 +873,7 @@ boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3,
 template< class T, class A, class A1, class A2, class A3, class A4, class A5 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -360,7 +891,7 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a
 template< class T, class A1, class A2, class A3, class A4, class A5, class A6 >
 boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -378,7 +909,7 @@ boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3,
 template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -396,7 +927,7 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a
 template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 >
 boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -414,7 +945,7 @@ boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3,
 template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -432,7 +963,7 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a
 template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 >
 boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -450,7 +981,7 @@ boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3,
 template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -468,7 +999,7 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a
 template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 >
 boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -486,7 +1017,7 @@ boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3,
 template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
 
     boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
@@ -501,8 +1032,46 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a
     return boost::shared_ptr< T >( pt, pt2 );
 }
 
+template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10 >
+boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9, A10 const &a10 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 );
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10 >
+boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9, A10 const & a10 )
+{
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
+
+    void * pv = pd->address();
+
+    ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 );
+    pd->set_initialized();
+
+    T * pt2 = static_cast< T* >( pv );
+
+    boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+    return boost::shared_ptr< T >( pt, pt2 );
+}
+
 #endif
 
+#undef BOOST_SP_MSD
+
 } // namespace boost
 
 #endif // #ifndef BOOST_SMART_PTR_MAKE_SHARED_HPP_INCLUDED
diff --git a/ext/boost/smart_ptr/shared_array.hpp b/ext/boost/smart_ptr/shared_array.hpp
index 1f50403..36799e6 100644
--- a/ext/boost/smart_ptr/shared_array.hpp
+++ b/ext/boost/smart_ptr/shared_array.hpp
@@ -69,7 +69,25 @@ public:
     {
     }
 
-//  generated copy constructor, assignment, destructor are fine
+//  generated copy constructor, destructor are fine...
+
+#if defined( BOOST_HAS_RVALUE_REFS )
+
+// ... except in C++0x, move disables the implicit copy
+
+    shared_array( shared_array const & r ): px( r.px ), pn( r.pn ) // never throws
+    {
+    }
+
+#endif
+
+    // assignment
+
+    shared_array & operator=( shared_array const & r ) // never throws
+    {
+        this_type( r ).swap( *this );
+        return *this;
+    }
 
     void reset(T * p = 0)
     {
@@ -113,6 +131,11 @@ public:
         pn.swap(other.pn);
     }
 
+    void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const
+    {
+        return pn.get_deleter( ti );
+    }
+
 private:
 
     T * px;                     // contained pointer
@@ -140,6 +163,11 @@ template<class T> void swap(shared_array<T> & a, shared_array<T> & b) // never t
     a.swap(b);
 }
 
+template< class D, class T > D * get_deleter( shared_array<T> const & p )
+{
+    return static_cast< D * >( p._internal_get_deleter( BOOST_SP_TYPEID(D) ) );
+}
+
 } // namespace boost
 
 #endif  // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
diff --git a/ext/boost/smart_ptr/shared_ptr.hpp b/ext/boost/smart_ptr/shared_ptr.hpp
index 609cce9..1bfb75c 100644
--- a/ext/boost/smart_ptr/shared_ptr.hpp
+++ b/ext/boost/smart_ptr/shared_ptr.hpp
@@ -41,6 +41,7 @@
 #include <algorithm>            // for std::swap
 #include <functional>           // for std::less
 #include <typeinfo>             // for std::bad_cast
+#include <cstddef>              // for std::size_t
 
 #if !defined(BOOST_NO_IOSTREAM)
 #if !defined(BOOST_NO_IOSFWD)
@@ -50,11 +51,6 @@
 #endif
 #endif
 
-#ifdef BOOST_MSVC  // moved here to work around VC++ compiler crash
-# pragma warning(push)
-# pragma warning(disable:4284) // odd return type for operator->
-#endif
-
 namespace boost
 {
 
@@ -207,7 +203,17 @@ public:
         boost::detail::sp_enable_shared_from_this( this, p, p );
     }
 
-//  generated copy constructor, destructor are fine
+//  generated copy constructor, destructor are fine...
+
+#if defined( BOOST_HAS_RVALUE_REFS )
+
+// ... except in C++0x, move disables the implicit copy
+
+    shared_ptr( shared_ptr const & r ): px( r.px ), pn( r.pn ) // never throws
+    {
+    }
+
+#endif
 
     template<class Y>
     explicit shared_ptr(weak_ptr<Y> const & r): pn(r.pn) // may throw
@@ -443,7 +449,12 @@ public:
         pn.swap(other.pn);
     }
 
-    template<class Y> bool _internal_less(shared_ptr<Y> const & rhs) const
+    template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const
+    {
+        return pn < rhs.pn;
+    }
+
+    template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const
     {
         return pn < rhs.pn;
     }
@@ -499,7 +510,7 @@ template<class T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T>
 
 template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b)
 {
-    return a._internal_less(b);
+    return a.owner_before( b );
 }
 
 template<class T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b)
@@ -688,13 +699,18 @@ template<class T> inline bool atomic_compare_exchange_explicit( shared_ptr<T> *
     return atomic_compare_exchange( p, v, w ); // std::move( w )
 }
 
-#endif
+#endif // !defined(BOOST_SP_NO_ATOMIC_ACCESS)
 
-} // namespace boost
+// hash_value
 
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
+template< class T > struct hash;
+
+template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p )
+{
+    return boost::hash< T* >()( p.get() );
+}
+
+} // namespace boost
 
 #endif  // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
 
diff --git a/ext/boost/smart_ptr/weak_ptr.hpp b/ext/boost/smart_ptr/weak_ptr.hpp
index d314b0d..2e35583 100644
--- a/ext/boost/smart_ptr/weak_ptr.hpp
+++ b/ext/boost/smart_ptr/weak_ptr.hpp
@@ -17,11 +17,6 @@
 #include <boost/smart_ptr/detail/shared_count.hpp>
 #include <boost/smart_ptr/shared_ptr.hpp>
 
-#ifdef BOOST_MSVC  // moved here to work around VC++ compiler crash
-# pragma warning(push)
-# pragma warning(disable:4284) // odd return type for operator->
-#endif
-
 namespace boost
 {
 
@@ -40,8 +35,24 @@ public:
     {
     }
 
-//  generated copy constructor, assignment, destructor are fine
+//  generated copy constructor, assignment, destructor are fine...
+
+#if defined( BOOST_HAS_RVALUE_REFS )
+
+// ... except in C++0x, move disables the implicit copy
+
+    weak_ptr( weak_ptr const & r ): px( r.px ), pn( r.pn ) // never throws
+    {
+    }
+
+    weak_ptr & operator=( weak_ptr const & r ) // never throws
+    {
+        px = r.px;
+        pn = r.pn;
+        return *this;
+    }
 
+#endif
 
 //
 //  The "obvious" converting constructor implementation:
@@ -189,7 +200,12 @@ public:
         pn = pn2;
     }
 
-    template<class Y> bool _internal_less(weak_ptr<Y> const & rhs) const
+    template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const
+    {
+        return pn < rhs.pn;
+    }
+
+    template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const
     {
         return pn < rhs.pn;
     }
@@ -213,7 +229,7 @@ private:
 
 template<class T, class U> inline bool operator<(weak_ptr<T> const & a, weak_ptr<U> const & b)
 {
-    return a._internal_less(b);
+    return a.owner_before( b );
 }
 
 template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b)
@@ -223,8 +239,4 @@ template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b)
 
 } // namespace boost
 
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif    
-
 #endif  // #ifndef BOOST_SMART_PTR_WEAK_PTR_HPP_INCLUDED
diff --git a/ext/boost/src/pthread/once.cpp b/ext/boost/src/pthread/once.cpp
deleted file mode 100644
index 6e3722a..0000000
--- a/ext/boost/src/pthread/once.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (C) 2007 Anthony Williams
-//
-//  Distributed under the Boost Software License, Version 1.0. (See accompanying 
-//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#define __STDC_CONSTANT_MACROS
-#include <boost/thread/once.hpp>
-#include <boost/assert.hpp>
-#include <pthread.h>
-#include <stdlib.h>
-
-namespace boost
-{
-    namespace detail
-    {
-        BOOST_THREAD_DECL boost::uintmax_t once_global_epoch=UINTMAX_C(~0);
-        BOOST_THREAD_DECL pthread_mutex_t once_epoch_mutex=PTHREAD_MUTEX_INITIALIZER;
-        BOOST_THREAD_DECL pthread_cond_t once_epoch_cv = PTHREAD_COND_INITIALIZER;
-
-        namespace
-        {
-            pthread_key_t epoch_tss_key;
-            pthread_once_t epoch_tss_key_flag=PTHREAD_ONCE_INIT;
-            
-            extern "C" void delete_epoch_tss_data(void* data)
-            {
-                free(data);
-            }
-
-            extern "C" void create_epoch_tss_key()
-            {
-                BOOST_VERIFY(!pthread_key_create(&epoch_tss_key,delete_epoch_tss_data));
-            }
-            
-        }
-        
-        boost::uintmax_t& get_once_per_thread_epoch()
-        {
-            BOOST_VERIFY(!pthread_once(&epoch_tss_key_flag,create_epoch_tss_key));
-            void* data=pthread_getspecific(epoch_tss_key);
-            if(!data)
-            {
-                data=malloc(sizeof(boost::uintmax_t));
-                BOOST_VERIFY(!pthread_setspecific(epoch_tss_key,data));
-                *static_cast<boost::uintmax_t*>(data)=UINTMAX_C(~0);
-            }
-            return *static_cast<boost::uintmax_t*>(data);
-        }
-    }
-    
-}
diff --git a/ext/boost/src/pthread/thread.cpp b/ext/boost/src/pthread/thread.cpp
deleted file mode 100644
index b5a0572..0000000
--- a/ext/boost/src/pthread/thread.cpp
+++ /dev/null
@@ -1,616 +0,0 @@
-// Copyright (C) 2001-2003
-// William E. Kempf
-// Copyright (C) 2007-8 Anthony Williams
-//
-//  Distributed under the Boost Software License, Version 1.0. (See accompanying 
-//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/thread/detail/config.hpp>
-
-#include <boost/thread/thread.hpp>
-#include <boost/thread/xtime.hpp>
-#include <boost/thread/condition.hpp>
-#include <boost/thread/locks.hpp>
-#include <boost/thread/once.hpp>
-#include <boost/thread/tss.hpp>
-#include <boost/throw_exception.hpp>
-#ifdef __linux__
-#include <sys/sysinfo.h>
-#elif defined(__APPLE__) || defined(__FreeBSD__)
-#include <sys/types.h>
-#include <sys/sysctl.h>
-#elif defined BOOST_HAS_UNISTD_H
-#include <unistd.h>
-#endif
-#include <cassert>
-
-#include "timeconv.inl"
-
-namespace boost
-{
-    namespace detail
-    {
-        thread_data_base::~thread_data_base()
-        {}
-
-        struct thread_exit_callback_node
-        {
-            boost::detail::thread_exit_function_base* func;
-            thread_exit_callback_node* next;
-
-            thread_exit_callback_node(boost::detail::thread_exit_function_base* func_,
-                                      thread_exit_callback_node* next_):
-                func(func_),next(next_)
-            {}
-        };
-
-        namespace
-        {
-            boost::once_flag current_thread_tls_init_flag=BOOST_ONCE_INIT;
-            pthread_key_t current_thread_tls_key;
-
-            extern "C"
-            {
-                void tls_destructor(void* data)
-                {
-                    boost::detail::thread_data_base* thread_info=static_cast<boost::detail::thread_data_base*>(data);
-                    if(thread_info)
-                    {
-                        while(!thread_info->tss_data.empty() || thread_info->thread_exit_callbacks)
-                        {
-                            while(thread_info->thread_exit_callbacks)
-                            {
-                                detail::thread_exit_callback_node* const current_node=thread_info->thread_exit_callbacks;
-                                thread_info->thread_exit_callbacks=current_node->next;
-                                if(current_node->func)
-                                {
-                                    (*current_node->func)();
-                                    delete current_node->func;
-                                }
-                                delete current_node;
-                            }
-                            for(std::map<void const*,tss_data_node>::iterator next=thread_info->tss_data.begin(),
-                                    current,
-                                    end=thread_info->tss_data.end();
-                                next!=end;)
-                            {
-                                current=next;
-                                ++next;
-                                if(current->second.func && (current->second.value!=0))
-                                {
-                                    (*current->second.func)(current->second.value);
-                                }
-                                thread_info->tss_data.erase(current);
-                            }
-                        }
-                        thread_info->self.reset();
-                    }
-                }
-            }
-    
-
-            void create_current_thread_tls_key()
-            {
-                BOOST_VERIFY(!pthread_key_create(&current_thread_tls_key,&tls_destructor));
-            }
-        }
-        
-        boost::detail::thread_data_base* get_current_thread_data()
-        {
-            boost::call_once(current_thread_tls_init_flag,create_current_thread_tls_key);
-            return (boost::detail::thread_data_base*)pthread_getspecific(current_thread_tls_key);
-        }
-
-        void set_current_thread_data(detail::thread_data_base* new_data)
-        {
-            boost::call_once(current_thread_tls_init_flag,create_current_thread_tls_key);
-            BOOST_VERIFY(!pthread_setspecific(current_thread_tls_key,new_data));
-        }
-    }
-    
-    namespace
-    {
-        extern "C"
-        {
-            void* thread_proxy(void* param)
-            {
-                boost::detail::thread_data_ptr thread_info = static_cast<boost::detail::thread_data_base*>(param)->self;
-                thread_info->self.reset();
-                detail::set_current_thread_data(thread_info.get());
-                try
-                {
-                    thread_info->run();
-                }
-                catch(thread_interrupted const&)
-                {
-                }
-// Removed as it stops the debugger identifying the cause of the exception
-// Unhandled exceptions still cause the application to terminate
-//                 catch(...)
-//                 {
-//                     std::terminate();
-//                 }
-
-                detail::tls_destructor(thread_info.get());
-                detail::set_current_thread_data(0);
-                boost::lock_guard<boost::mutex> lock(thread_info->data_mutex);
-                thread_info->done=true;
-                thread_info->done_condition.notify_all();
-                return 0;
-            }
-        }
-
-        struct externally_launched_thread:
-            detail::thread_data_base
-        {
-            externally_launched_thread()
-            {
-                interrupt_enabled=false;
-            }
-            
-            void run()
-            {}
-
-        private:
-            externally_launched_thread(externally_launched_thread&);
-            void operator=(externally_launched_thread&);
-        };
-
-        detail::thread_data_base* make_external_thread_data()
-        {
-            detail::thread_data_base* const me(new externally_launched_thread());
-            me->self.reset(me);
-            set_current_thread_data(me);
-            return me;
-        }
-
-
-        detail::thread_data_base* get_or_make_current_thread_data()
-        {
-            detail::thread_data_base* current_thread_data(detail::get_current_thread_data());
-            if(!current_thread_data)
-            {
-                current_thread_data=make_external_thread_data();
-            }
-            return current_thread_data;
-        }
-
-    }
-
-
-    thread::thread()
-    {}
-
-    void thread::start_thread(unsigned int stack_size)
-    {
-        thread_info->self=thread_info;
-        pthread_attr_t attr;
-        int res = pthread_attr_init(&attr);
-        if (res != 0) {
-            throw thread_resource_error("Cannot initialize thread attributes", res);
-        }
-        if (stack_size > 0) {
-            res = pthread_attr_setstacksize(&attr, stack_size);
-            if (res != 0) {
-                pthread_attr_destroy(&attr);
-                throw thread_resource_error("Cannot set thread stack size attribute", res);
-            }
-        }
-        
-        res = pthread_create(&thread_info->thread_handle, &attr, &thread_proxy, thread_info.get());
-        pthread_attr_destroy(&attr);
-        if (res != 0)
-        {
-            thread_info->self.reset();
-            boost::throw_exception(thread_resource_error("Cannot create a thread", res));
-        }
-    }
-
-    thread::~thread()
-    {
-        detach();
-    }
-
-    detail::thread_data_ptr thread::get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const
-    {
-        return thread_info;
-    }
-
-    void thread::join()
-    {
-        detail::thread_data_ptr const local_thread_info=(get_thread_info)();
-        if(local_thread_info)
-        {
-            bool do_join=false;
-            
-            {
-                unique_lock<mutex> lock(local_thread_info->data_mutex);
-                while(!local_thread_info->done)
-                {
-                    local_thread_info->done_condition.wait(lock);
-                }
-                do_join=!local_thread_info->join_started;
-                
-                if(do_join)
-                {
-                    local_thread_info->join_started=true;
-                }
-                else
-                {
-                    while(!local_thread_info->joined)
-                    {
-                        local_thread_info->done_condition.wait(lock);
-                    }
-                }
-            }
-            if(do_join)
-            {
-                void* result=0;
-                BOOST_VERIFY(!pthread_join(local_thread_info->thread_handle,&result));
-                lock_guard<mutex> lock(local_thread_info->data_mutex);
-                local_thread_info->joined=true;
-                local_thread_info->done_condition.notify_all();
-            }
-            
-            if(thread_info==local_thread_info)
-            {
-                thread_info.reset();
-            }
-        }
-    }
-
-    bool thread::timed_join(system_time const& wait_until)
-    {
-        detail::thread_data_ptr const local_thread_info=(get_thread_info)();
-        if(local_thread_info)
-        {
-            bool do_join=false;
-            
-            {
-                unique_lock<mutex> lock(local_thread_info->data_mutex);
-                while(!local_thread_info->done)
-                {
-                    if(!local_thread_info->done_condition.timed_wait(lock,wait_until))
-                    {
-                        return false;
-                    }
-                }
-                do_join=!local_thread_info->join_started;
-                
-                if(do_join)
-                {
-                    local_thread_info->join_started=true;
-                }
-                else
-                {
-                    while(!local_thread_info->joined)
-                    {
-                        local_thread_info->done_condition.wait(lock);
-                    }
-                }
-            }
-            if(do_join)
-            {
-                void* result=0;
-                BOOST_VERIFY(!pthread_join(local_thread_info->thread_handle,&result));
-                lock_guard<mutex> lock(local_thread_info->data_mutex);
-                local_thread_info->joined=true;
-                local_thread_info->done_condition.notify_all();
-            }
-            
-            if(thread_info==local_thread_info)
-            {
-                thread_info.reset();
-            }
-        }
-        return true;
-    }
-
-    bool thread::joinable() const
-    {
-        return (get_thread_info)();
-    }
-
-
-    void thread::detach()
-    {
-        detail::thread_data_ptr local_thread_info;
-        thread_info.swap(local_thread_info);
-        
-        if(local_thread_info)
-        {
-            lock_guard<mutex> lock(local_thread_info->data_mutex);
-            if(!local_thread_info->join_started)
-            {
-                BOOST_VERIFY(!pthread_detach(local_thread_info->thread_handle));
-                local_thread_info->join_started=true;
-                local_thread_info->joined=true;
-            }
-        }
-    }
-
-    namespace this_thread
-    {
-        
-        void sleep(const system_time& st)
-        {
-            detail::thread_data_base* const thread_info=detail::get_current_thread_data();
-        
-            if(thread_info)
-            {
-                unique_lock<mutex> lk(thread_info->sleep_mutex);
-                while(thread_info->sleep_condition.timed_wait(lk,st)) {};
-            }
-            else
-            {
-                xtime const xt=get_xtime(st);
-            
-                for (int foo=0; foo < 5; ++foo)
-                {
-#   if defined(BOOST_HAS_PTHREAD_DELAY_NP)
-                    timespec ts;
-                    to_timespec_duration(xt, ts);
-                    BOOST_VERIFY(!pthread_delay_np(&ts));
-#   elif defined(BOOST_HAS_NANOSLEEP)
-                    timespec ts;
-                    to_timespec_duration(xt, ts);
-                
-                    //  nanosleep takes a timespec that is an offset, not
-                    //  an absolute time.
-                    nanosleep(&ts, 0);
-#   else
-                    mutex mx;
-                    mutex::scoped_lock lock(mx);
-                    condition cond;
-                    cond.timed_wait(lock, xt);
-#   endif
-                    xtime cur;
-                    xtime_get(&cur, TIME_UTC);
-                    if (xtime_cmp(xt, cur) <= 0)
-                        return;
-                }
-            }
-        }
-
-        void yield()
-        {
-#   if defined(BOOST_HAS_SCHED_YIELD)
-            BOOST_VERIFY(!sched_yield());
-#   elif defined(BOOST_HAS_PTHREAD_YIELD)
-            BOOST_VERIFY(!pthread_yield());
-#   else
-            xtime xt;
-            xtime_get(&xt, TIME_UTC);
-            sleep(xt);
-#   endif
-        }
-    }
-
-    unsigned thread::hardware_concurrency()
-    {
-#if defined(PTW32_VERSION) || defined(__hpux)
-        return pthread_num_processors_np();
-#elif defined(__APPLE__) || defined(__FreeBSD__)
-        int count;
-        size_t size=sizeof(count);
-        return sysctlbyname("hw.ncpu",&count,&size,NULL,0)?0:count;
-#elif defined(BOOST_HAS_UNISTD_H) && defined(_SC_NPROCESSORS_ONLN)
-        int const count=sysconf(_SC_NPROCESSORS_ONLN);
-        return (count>0)?count:0;
-#elif defined(_GNU_SOURCE)
-        return get_nprocs();
-#else
-        return 0;
-#endif
-    }
-
-    thread::id thread::get_id() const
-    {
-        detail::thread_data_ptr const local_thread_info=(get_thread_info)();
-        if(local_thread_info)
-        {
-            return id(local_thread_info);
-        }
-        else
-        {
-            return id();
-        }
-    }
-
-    void thread::interrupt()
-    {
-        detail::thread_data_ptr const local_thread_info=(get_thread_info)();
-        if(local_thread_info)
-        {
-            lock_guard<mutex> lk(local_thread_info->data_mutex);
-            local_thread_info->interrupt_requested=true;
-            if(local_thread_info->current_cond)
-            {
-                BOOST_VERIFY(!pthread_cond_broadcast(local_thread_info->current_cond));
-            }
-        }
-    }
-
-    bool thread::interruption_requested() const
-    {
-        detail::thread_data_ptr const local_thread_info=(get_thread_info)();
-        if(local_thread_info)
-        {
-            lock_guard<mutex> lk(local_thread_info->data_mutex);
-            return local_thread_info->interrupt_requested;
-        }
-        else
-        {
-            return false;
-        }
-    }
-
-    thread::native_handle_type thread::native_handle()
-    {
-        detail::thread_data_ptr const local_thread_info=(get_thread_info)();
-        if(local_thread_info)
-        {
-            lock_guard<mutex> lk(local_thread_info->data_mutex);
-            return local_thread_info->thread_handle;
-        }
-        else
-        {
-            return pthread_t();
-        }
-    }
-    
-    
-
-    namespace this_thread
-    {
-        thread::id get_id()
-        {
-            boost::detail::thread_data_base* const thread_info=get_or_make_current_thread_data();
-            return thread::id(thread_info?thread_info->shared_from_this():detail::thread_data_ptr());
-        }
-
-        void interruption_point()
-        {
-            boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data();
-            if(thread_info && thread_info->interrupt_enabled)
-            {
-                lock_guard<mutex> lg(thread_info->data_mutex);
-                if(thread_info->interrupt_requested)
-                {
-                    thread_info->interrupt_requested=false;
-                    throw thread_interrupted();
-                }
-            }
-        }
-        
-        bool interruption_enabled()
-        {
-            boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data();
-            return thread_info && thread_info->interrupt_enabled;
-        }
-        
-        bool interruption_requested()
-        {
-            boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data();
-            if(!thread_info)
-            {
-                return false;
-            }
-            else
-            {
-                lock_guard<mutex> lg(thread_info->data_mutex);
-                return thread_info->interrupt_requested;
-            }
-        }
-
-        disable_interruption::disable_interruption():
-            interruption_was_enabled(interruption_enabled())
-        {
-            if(interruption_was_enabled)
-            {
-                detail::get_current_thread_data()->interrupt_enabled=false;
-            }
-        }
-        
-        disable_interruption::~disable_interruption()
-        {
-            if(detail::get_current_thread_data())
-            {
-                detail::get_current_thread_data()->interrupt_enabled=interruption_was_enabled;
-            }
-        }
-
-        restore_interruption::restore_interruption(disable_interruption& d)
-        {
-            if(d.interruption_was_enabled)
-            {
-                detail::get_current_thread_data()->interrupt_enabled=true;
-            }
-        }
-        
-        restore_interruption::~restore_interruption()
-        {
-            if(detail::get_current_thread_data())
-            {
-                detail::get_current_thread_data()->interrupt_enabled=false;
-            }
-        }
-    }
-
-    namespace detail
-    {
-        void add_thread_exit_function(thread_exit_function_base* func)
-        {
-            detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
-            thread_exit_callback_node* const new_node=
-                new thread_exit_callback_node(func,current_thread_data->thread_exit_callbacks);
-            current_thread_data->thread_exit_callbacks=new_node;
-        }
-
-        tss_data_node* find_tss_data(void const* key)
-        {
-            detail::thread_data_base* const current_thread_data(get_current_thread_data());
-            if(current_thread_data)
-            {
-                std::map<void const*,tss_data_node>::iterator current_node=
-                    current_thread_data->tss_data.find(key);
-                if(current_node!=current_thread_data->tss_data.end())
-                {
-                    return &current_node->second;
-                }
-            }
-            return NULL;
-        }
-
-        void* get_tss_data(void const* key)
-        {
-            if(tss_data_node* const current_node=find_tss_data(key))
-            {
-                return current_node->value;
-            }
-            return NULL;
-        }
-
-        void add_new_tss_node(void const* key,
-                              boost::shared_ptr<tss_cleanup_function> func,
-                              void* tss_data)
-        {
-            detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
-            current_thread_data->tss_data.insert(std::make_pair(key,tss_data_node(func,tss_data)));
-        }
-
-        void erase_tss_node(void const* key)
-        {
-            detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
-            current_thread_data->tss_data.erase(key);
-        }
-        
-        void set_tss_data(void const* key,
-                          boost::shared_ptr<tss_cleanup_function> func,
-                          void* tss_data,bool cleanup_existing)
-        {
-            if(tss_data_node* const current_node=find_tss_data(key))
-            {
-                if(cleanup_existing && current_node->func && (current_node->value!=0))
-                {
-                    (*current_node->func)(current_node->value);
-                }
-                if(func || (tss_data!=0))
-                {
-                    current_node->func=func;
-                    current_node->value=tss_data;
-                }
-                else
-                {
-                    erase_tss_node(key);
-                }
-            }
-            else
-            {
-                add_new_tss_node(key,func,tss_data);
-            }
-        }
-    }
-
-
-}
diff --git a/ext/boost/src/pthread/timeconv.inl b/ext/boost/src/pthread/timeconv.inl
deleted file mode 100644
index b75a135..0000000
--- a/ext/boost/src/pthread/timeconv.inl
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright (C) 2001-2003
-// William E. Kempf
-// Copyright (C) 2009 Anthony Williams
-//
-//  Distributed under the Boost Software License, Version 1.0. (See accompanying 
-//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// boostinspect:nounnamed
-
-#include <boost/assert.hpp>
-
-namespace {
-const int MILLISECONDS_PER_SECOND = 1000;
-const int NANOSECONDS_PER_SECOND = 1000000000;
-const int NANOSECONDS_PER_MILLISECOND = 1000000;
-
-const int MICROSECONDS_PER_SECOND = 1000000;
-const int NANOSECONDS_PER_MICROSECOND = 1000;
-
-inline void to_time(int milliseconds, boost::xtime& xt)
-{
-    int res = 0;
-    res = boost::xtime_get(&xt, boost::TIME_UTC);
-    BOOST_ASSERT(res == boost::TIME_UTC);
-
-    xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
-    xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
-        NANOSECONDS_PER_MILLISECOND);
-
-    if (xt.nsec >= NANOSECONDS_PER_SECOND)
-    {
-        ++xt.sec;
-        xt.nsec -= NANOSECONDS_PER_SECOND;
-    }
-}
-
-#if defined(BOOST_HAS_PTHREADS)
-inline void to_timespec(const boost::xtime& xt, timespec& ts)
-{
-    ts.tv_sec = static_cast<int>(xt.sec);
-    ts.tv_nsec = static_cast<int>(xt.nsec);
-    if(ts.tv_nsec >= NANOSECONDS_PER_SECOND)
-    {
-        ts.tv_sec += ts.tv_nsec / NANOSECONDS_PER_SECOND;
-        ts.tv_nsec %= NANOSECONDS_PER_SECOND;
-    }
-}
-
-inline void to_time(int milliseconds, timespec& ts)
-{
-    boost::xtime xt;
-    to_time(milliseconds, xt);
-    to_timespec(xt, ts);
-}
-
-inline void to_timespec_duration(const boost::xtime& xt, timespec& ts)
-{
-    boost::xtime cur;
-    int res = 0;
-    res = boost::xtime_get(&cur, boost::TIME_UTC);
-    BOOST_ASSERT(res == boost::TIME_UTC);
-
-    if (boost::xtime_cmp(xt, cur) <= 0)
-    {
-        ts.tv_sec = 0;
-        ts.tv_nsec = 0;
-    }
-    else
-    {
-        ts.tv_sec = xt.sec - cur.sec;
-        ts.tv_nsec = xt.nsec - cur.nsec;
-
-        if( ts.tv_nsec < 0 )
-        {
-            ts.tv_sec -= 1;
-            ts.tv_nsec += NANOSECONDS_PER_SECOND;
-        }
-        if(ts.tv_nsec >= NANOSECONDS_PER_SECOND)
-        {
-            ts.tv_sec += ts.tv_nsec / NANOSECONDS_PER_SECOND;
-            ts.tv_nsec %= NANOSECONDS_PER_SECOND;
-        }
-    }
-}
-#endif
-
-inline void to_duration(boost::xtime xt, int& milliseconds)
-{
-    boost::xtime cur;
-    int res = 0;
-    res = boost::xtime_get(&cur, boost::TIME_UTC);
-    BOOST_ASSERT(res == boost::TIME_UTC);
-
-    if (boost::xtime_cmp(xt, cur) <= 0)
-        milliseconds = 0;
-    else
-    {
-        if (cur.nsec > xt.nsec)
-        {
-            xt.nsec += NANOSECONDS_PER_SECOND;
-            --xt.sec;
-        }
-        milliseconds = (int)((xt.sec - cur.sec) * MILLISECONDS_PER_SECOND) +
-            (((xt.nsec - cur.nsec) + (NANOSECONDS_PER_MILLISECOND/2)) /
-                NANOSECONDS_PER_MILLISECOND);
-    }
-}
-
-inline void to_microduration(boost::xtime xt, int& microseconds)
-{
-    boost::xtime cur;
-    int res = 0;
-    res = boost::xtime_get(&cur, boost::TIME_UTC);
-    BOOST_ASSERT(res == boost::TIME_UTC);
-
-    if (boost::xtime_cmp(xt, cur) <= 0)
-        microseconds = 0;
-    else
-    {
-        if (cur.nsec > xt.nsec)
-        {
-            xt.nsec += NANOSECONDS_PER_SECOND;
-            --xt.sec;
-        }
-        microseconds = (int)((xt.sec - cur.sec) * MICROSECONDS_PER_SECOND) +
-            (((xt.nsec - cur.nsec) + (NANOSECONDS_PER_MICROSECOND/2)) /
-                NANOSECONDS_PER_MICROSECOND);
-    }
-}
-}
-
-// Change Log:
-//    1 Jun 01  Initial creation.
diff --git a/ext/boost/src/tss_null.cpp b/ext/boost/src/tss_null.cpp
deleted file mode 100644
index ff13b30..0000000
--- a/ext/boost/src/tss_null.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-// (C) Copyright Michael Glassford 2004.
-// (C) Copyright 2007 Anthony Williams
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/thread/detail/config.hpp>
-
-#if defined(BOOST_HAS_WINTHREADS) && (defined(BOOST_THREAD_BUILD_LIB) || defined(BOOST_THREAD_TEST) || defined(UNDER_CE)) && (!defined(_MSC_VER) || defined(UNDER_CE))
-
-    /*
-    This file is a "null" implementation of tss cleanup; it's
-    purpose is to to eliminate link errors in cases
-    where it is known that tss cleanup is not needed.
-    */
-
-    extern "C" void tss_cleanup_implemented(void)
-    {
-        /*
-        This function's sole purpose is to cause a link error in cases where
-        automatic tss cleanup is not implemented by Boost.Threads as a
-        reminder that user code is responsible for calling the necessary
-        functions at the appropriate times (and for implementing an a
-        tss_cleanup_implemented() function to eliminate the linker's
-        missing symbol error).
-
-        If Boost.Threads later implements automatic tss cleanup in cases
-        where it currently doesn't (which is the plan), the duplicate
-        symbol error will warn the user that their custom solution is no
-        longer needed and can be removed.
-        */
-    }
-
-#endif //defined(BOOST_HAS_WINTHREADS) && defined(BOOST_THREAD_BUILD_LIB) && !defined(_MSC_VER)
diff --git a/ext/boost/static_assert.hpp b/ext/boost/static_assert.hpp
index 5bded5e..9fe9bc0 100644
--- a/ext/boost/static_assert.hpp
+++ b/ext/boost/static_assert.hpp
@@ -17,6 +17,12 @@
 #include <boost/config.hpp>
 #include <boost/detail/workaround.hpp>
 
+#ifndef BOOST_NO_STATIC_ASSERT
+#  define BOOST_STATIC_ASSERT_MSG( B, Msg ) static_assert(B, Msg)
+#else
+#  define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B )
+#endif
+
 #ifdef __BORLANDC__
 //
 // workaround for buggy integral-constant expression support:
@@ -38,7 +44,7 @@
 #  define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x)
 #endif
 
-#ifdef BOOST_HAS_STATIC_ASSERT
+#ifndef BOOST_NO_STATIC_ASSERT
 #  define BOOST_STATIC_ASSERT( B ) static_assert(B, #B)
 #else
 
@@ -125,7 +131,7 @@ template<int x> struct static_assert_test{};
    enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \
       = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) }
 #endif
-#endif // ndef BOOST_HAS_STATIC_ASSERT
+#endif // defined(BOOST_NO_STATIC_ASSERT)
 
 #endif // BOOST_STATIC_ASSERT_HPP
 
diff --git a/ext/boost/swap.hpp b/ext/boost/swap.hpp
new file mode 100644
index 0000000..dfc11f0
--- /dev/null
+++ b/ext/boost/swap.hpp
@@ -0,0 +1,12 @@
+// Copyright (C) 2007 Joseph Gauterin
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_SWAP_HPP
+#define BOOST_SWAP_HPP
+
+#include "boost/utility/swap.hpp"
+
+#endif
diff --git a/ext/boost/system/api_config.hpp b/ext/boost/system/api_config.hpp
new file mode 100644
index 0000000..28b8bec
--- /dev/null
+++ b/ext/boost/system/api_config.hpp
@@ -0,0 +1,42 @@
+//  boost/system/api_config.hpp  -------------------------------------------------------//
+
+//  Copyright Beman Dawes 2003, 2006, 2010
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+//  See http://www.boost.org/libs/system for documentation.
+
+//--------------------------------------------------------------------------------------//
+
+//  Boost.System calls operating system API functions to implement system error category
+//  functions. Usually there is no question as to which API is to be used.
+//
+//  In the case of MinGW or Cygwin/MinGW, however, both POSIX and Windows API's are
+//  available. Chaos ensues if other code thinks one is in use when Boost.System was
+//  actually built with the other. This header centralizes the API choice and prevents
+//  user definition of API macros, thus elminating the possibility of mismatches and the
+//  need to test configurations with little or no practical value.
+//
+
+//--------------------------------------------------------------------------------------//
+
+#ifndef BOOST_SYSTEM_API_CONFIG_HPP                  
+#define BOOST_SYSTEM_API_CONFIG_HPP
+
+# if defined(BOOST_POSIX_API) || defined(BOOST_WINDOWS_API)
+#   error user defined BOOST_POSIX_API or BOOST_WINDOWS_API not supported
+# endif
+
+//  BOOST_POSIX_API or BOOST_WINDOWS_API specify which API to use
+//    Cygwin/MinGW does not predefine _WIN32.
+//    Standalone MinGW and all other known Windows compilers do predefine _WIN32
+//    Compilers that predefine _WIN32 or __MINGW32__ do so for Windows 64-bit builds too.
+
+# if defined(_WIN32) || defined(__CYGWIN__) // Windows default, including MinGW and Cygwin
+#   define BOOST_WINDOWS_API
+# else
+#   define BOOST_POSIX_API 
+# endif
+                                     
+#endif  // BOOST_SYSTEM_API_CONFIG_HPP 
diff --git a/ext/boost/system/config.hpp b/ext/boost/system/config.hpp
new file mode 100644
index 0000000..b128717
--- /dev/null
+++ b/ext/boost/system/config.hpp
@@ -0,0 +1,69 @@
+//  boost/system/config.hpp  -----------------------------------------------------------//
+
+//  Copyright Beman Dawes 2003, 2006
+
+//  Distributed under the Boost Software License, Version 1.0. (See accompanying
+//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/system for documentation.
+
+#ifndef BOOST_SYSTEM_CONFIG_HPP                  
+#define BOOST_SYSTEM_CONFIG_HPP
+
+#include <boost/config.hpp>
+#include <boost/system/api_config.hpp>  // for BOOST_POSIX_API or BOOST_WINDOWS_API
+
+// This header implements separate compilation features as described in
+// http://www.boost.org/more/separate_compilation.html
+
+//  normalize macros  ------------------------------------------------------------------//
+
+#if !defined(BOOST_SYSTEM_DYN_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK) \
+  && !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK)
+# define BOOST_SYSTEM_STATIC_LINK
+#endif
+
+#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_SYSTEM_DYN_LINK)
+# define BOOST_SYSTEM_DYN_LINK 
+#elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK)
+# define BOOST_SYSTEM_STATIC_LINK 
+#endif
+
+#if defined(BOOST_SYSTEM_DYN_LINK) && defined(BOOST_SYSTEM_STATIC_LINK)
+# error Must not define both BOOST_SYSTEM_DYN_LINK and BOOST_SYSTEM_STATIC_LINK
+#endif
+
+//  enable dynamic or static linking as requested --------------------------------------//
+
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
+# if defined(BOOST_SYSTEM_SOURCE)
+#   define BOOST_SYSTEM_DECL BOOST_SYMBOL_EXPORT
+# else 
+#   define BOOST_SYSTEM_DECL BOOST_SYMBOL_IMPORT
+# endif
+#else
+# define BOOST_SYSTEM_DECL
+#endif
+
+//  enable automatic library variant selection  ----------------------------------------// 
+
+#if !defined(BOOST_SYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SYSTEM_NO_LIB)
+//
+// Set the name of our library, this will get undef'ed by auto_link.hpp
+// once it's done with it:
+//
+#define BOOST_LIB_NAME boost_system
+//
+// If we're importing code from a dll, then tell auto_link.hpp about it:
+//
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
+#  define BOOST_DYN_LINK
+#endif
+//
+// And include the header that does the work:
+//
+#include <boost/config/auto_link.hpp>
+#endif  // auto-linking disabled
+
+#endif // BOOST_SYSTEM_CONFIG_HPP
+
diff --git a/ext/boost/system/error_code.hpp b/ext/boost/system/error_code.hpp
new file mode 100644
index 0000000..b22775f
--- /dev/null
+++ b/ext/boost/system/error_code.hpp
@@ -0,0 +1,513 @@
+//  boost/system/error_code.hpp  ---------------------------------------------//
+
+//  Copyright Beman Dawes 2006, 2007
+//  Copyright Christoper Kohlhoff 2007
+
+//  Distributed under the Boost Software License, Version 1.0. (See accompanying
+//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/system
+
+#ifndef BOOST_ERROR_CODE_HPP
+#define BOOST_ERROR_CODE_HPP
+
+#include <boost/system/config.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/assert.hpp>
+#include <boost/operators.hpp>
+#include <boost/noncopyable.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <ostream>
+#include <string>
+#include <stdexcept>
+#include <functional>
+
+// TODO: undef these macros if not already defined
+#include <boost/cerrno.hpp> 
+
+#if !defined(BOOST_POSIX_API) && !defined(BOOST_WINDOWS_API)
+#  error BOOST_POSIX_API or BOOST_WINDOWS_API must be defined
+#endif
+
+#include <boost/config/abi_prefix.hpp> // must be the last #include
+
+namespace boost
+{
+  namespace system
+  {
+
+    class error_code;
+    class error_condition;
+
+    //  "Concept" helpers  ---------------------------------------------------//
+
+    template< class T >
+    struct is_error_code_enum { static const bool value = false; };
+
+    template< class T >
+    struct is_error_condition_enum { static const bool value = false; };
+
+    //  generic error_conditions  --------------------------------------------//
+
+    namespace errc
+    {
+      enum errc_t
+      {
+        success = 0,
+        address_family_not_supported = EAFNOSUPPORT,
+        address_in_use = EADDRINUSE,
+        address_not_available = EADDRNOTAVAIL,
+        already_connected = EISCONN,
+        argument_list_too_long = E2BIG,
+        argument_out_of_domain = EDOM,
+        bad_address = EFAULT,
+        bad_file_descriptor = EBADF,
+        bad_message = EBADMSG,
+        broken_pipe = EPIPE,
+        connection_aborted = ECONNABORTED,
+        connection_already_in_progress = EALREADY,
+        connection_refused = ECONNREFUSED,
+        connection_reset = ECONNRESET,
+        cross_device_link = EXDEV,
+        destination_address_required = EDESTADDRREQ,
+        device_or_resource_busy = EBUSY,
+        directory_not_empty = ENOTEMPTY,
+        executable_format_error = ENOEXEC,
+        file_exists = EEXIST,
+        file_too_large = EFBIG,
+        filename_too_long = ENAMETOOLONG,
+        function_not_supported = ENOSYS,
+        host_unreachable = EHOSTUNREACH,
+        identifier_removed = EIDRM,
+        illegal_byte_sequence = EILSEQ,
+        inappropriate_io_control_operation = ENOTTY,
+        interrupted = EINTR,
+        invalid_argument = EINVAL,
+        invalid_seek = ESPIPE,
+        io_error = EIO,
+        is_a_directory = EISDIR,
+        message_size = EMSGSIZE,
+        network_down = ENETDOWN,
+        network_reset = ENETRESET,
+        network_unreachable = ENETUNREACH,
+        no_buffer_space = ENOBUFS,
+        no_child_process = ECHILD,
+        no_link = ENOLINK,
+        no_lock_available = ENOLCK,
+        no_message_available = ENODATA,
+        no_message = ENOMSG,
+        no_protocol_option = ENOPROTOOPT,
+        no_space_on_device = ENOSPC,
+        no_stream_resources = ENOSR,
+        no_such_device_or_address = ENXIO,
+        no_such_device = ENODEV,
+        no_such_file_or_directory = ENOENT,
+        no_such_process = ESRCH,
+        not_a_directory = ENOTDIR,
+        not_a_socket = ENOTSOCK,
+        not_a_stream = ENOSTR,
+        not_connected = ENOTCONN,
+        not_enough_memory = ENOMEM,
+        not_supported = ENOTSUP,
+        operation_canceled = ECANCELED,
+        operation_in_progress = EINPROGRESS,
+        operation_not_permitted = EPERM,
+        operation_not_supported = EOPNOTSUPP,
+        operation_would_block = EWOULDBLOCK,
+        owner_dead = EOWNERDEAD,
+        permission_denied = EACCES,
+        protocol_error = EPROTO,
+        protocol_not_supported = EPROTONOSUPPORT,
+        read_only_file_system = EROFS,
+        resource_deadlock_would_occur = EDEADLK,
+        resource_unavailable_try_again = EAGAIN,
+        result_out_of_range = ERANGE,
+        state_not_recoverable = ENOTRECOVERABLE,
+        stream_timeout = ETIME,
+        text_file_busy = ETXTBSY,
+        timed_out = ETIMEDOUT,
+        too_many_files_open_in_system = ENFILE,
+        too_many_files_open = EMFILE,
+        too_many_links = EMLINK,
+        too_many_symbolic_link_levels = ELOOP,
+        value_too_large = EOVERFLOW,
+        wrong_protocol_type = EPROTOTYPE
+      };
+
+    } // namespace errc
+
+# ifndef BOOST_SYSTEM_NO_DEPRECATED
+    namespace posix = errc;
+    namespace posix_error = errc;
+# endif
+
+    template<> struct is_error_condition_enum<errc::errc_t>
+      { static const bool value = true; };
+
+
+    //  ----------------------------------------------------------------------//
+
+    //  Operating system specific interfaces  --------------------------------//
+
+
+    //  The interface is divided into general and system-specific portions to
+    //  meet these requirements:
+    //
+    //  * Code calling an operating system API can create an error_code with
+    //    a single category (system_category), even for POSIX-like operating
+    //    systems that return some POSIX errno values and some native errno
+    //    values. This code should not have to pay the cost of distinguishing
+    //    between categories, since it is not yet known if that is needed.
+    //
+    //  * Users wishing to write system-specific code should be given enums for
+    //    at least the common error cases.
+    //
+    //  * System specific code should fail at compile time if moved to another
+    //    operating system.
+
+    //  The system specific portions of the interface are located in headers
+    //  with names reflecting the operating system. For example,
+    //
+    //       <boost/system/cygwin_error.hpp>
+    //       <boost/system/linux_error.hpp>
+    //       <boost/system/windows_error.hpp>
+    //
+    //  These headers are effectively empty for compiles on operating systems
+    //  where they are not applicable.
+
+    //  ----------------------------------------------------------------------//
+
+    //  class error_category  ------------------------------------------------//
+
+    class error_category : public noncopyable
+    {
+    public:
+      virtual ~error_category(){}
+
+      virtual const char *     name() const = 0;
+      virtual std::string      message( int ev ) const = 0;
+      virtual error_condition  default_error_condition( int ev ) const;
+      virtual bool             equivalent( int code, 
+                                           const error_condition & condition ) const;
+      virtual bool             equivalent( const error_code & code,
+                                           int condition ) const;
+
+      bool operator==(const error_category & rhs) const { return this == &rhs; }
+      bool operator!=(const error_category & rhs) const { return this != &rhs; }
+      bool operator<( const error_category & rhs ) const
+      {
+        return std::less<const error_category*>()( this, &rhs );
+      }
+    };
+
+    //  predefined error categories  -----------------------------------------//
+
+    BOOST_SYSTEM_DECL const error_category &  system_category();
+    BOOST_SYSTEM_DECL const error_category &  generic_category();
+
+    //  deprecated synonyms --------------------------------------------------//
+
+# ifndef BOOST_SYSTEM_NO_DEPRECATED
+    inline const error_category &  get_system_category() { return system_category(); }
+    inline const error_category &  get_generic_category() { return generic_category(); }
+    inline const error_category &  get_posix_category() { return generic_category(); }
+    static const error_category &  posix_category = generic_category();
+    static const error_category &  errno_ecat     = generic_category();
+    static const error_category &  native_ecat    = system_category();
+# endif
+
+    //  class error_condition  -----------------------------------------------//
+
+    //  error_conditions are portable, error_codes are system or library specific
+
+    class error_condition
+    {
+    public:
+
+      // constructors:
+      error_condition() : m_val(0), m_cat(&generic_category()) {}
+      error_condition( int val, const error_category & cat ) : m_val(val), m_cat(&cat) {}
+
+      template <class ErrorConditionEnum>
+        error_condition(ErrorConditionEnum e,
+          typename boost::enable_if<is_error_condition_enum<ErrorConditionEnum> >::type* = 0)
+      {
+        *this = make_error_condition(e);
+      }
+
+      // modifiers:
+
+      void assign( int val, const error_category & cat )
+      { 
+        m_val = val;
+        m_cat = &cat;
+      }
+                                             
+      template<typename ErrorConditionEnum>
+        typename boost::enable_if<is_error_condition_enum<ErrorConditionEnum>, error_condition>::type &
+          operator=( ErrorConditionEnum val )
+      { 
+        *this = make_error_condition(val);
+        return *this;
+      }
+
+      void clear()
+      {
+        m_val = 0;
+        m_cat = &generic_category();
+      }
+
+      // observers:
+      int                     value() const    { return m_val; }
+      const error_category &  category() const { return *m_cat; }
+      std::string             message() const  { return m_cat->message(value()); }
+
+      typedef void (*unspecified_bool_type)();
+      static void unspecified_bool_true() {}
+
+      operator unspecified_bool_type() const  // true if error
+      { 
+        return m_val == 0 ? 0 : unspecified_bool_true;
+      }
+
+      bool operator!() const  // true if no error
+      {
+        return m_val == 0;
+      }
+
+      // relationals:
+      //  the more symmetrical non-member syntax allows enum
+      //  conversions work for both rhs and lhs.
+      inline friend bool operator==( const error_condition & lhs,
+                                     const error_condition & rhs )
+      {
+        return lhs.m_cat == rhs.m_cat && lhs.m_val == rhs.m_val;
+      }                  
+
+      inline friend bool operator<( const error_condition & lhs,
+                                    const error_condition & rhs )
+        //  the more symmetrical non-member syntax allows enum
+        //  conversions work for both rhs and lhs.
+      {
+        return lhs.m_cat < rhs.m_cat
+          || (lhs.m_cat == rhs.m_cat && lhs.m_val < rhs.m_val);
+      }
+
+    private:
+      int                     m_val;
+      const error_category *  m_cat;
+
+    };
+
+    //  class error_code  ----------------------------------------------------//
+
+    //  We want error_code to be a value type that can be copied without slicing
+    //  and without requiring heap allocation, but we also want it to have
+    //  polymorphic behavior based on the error category. This is achieved by
+    //  abstract base class error_category supplying the polymorphic behavior,
+    //  and error_code containing a pointer to an object of a type derived
+    //  from error_category.
+    class error_code
+    {
+    public:
+
+      // constructors:
+      error_code() : m_val(0), m_cat(&system_category()) {}
+      error_code( int val, const error_category & cat ) : m_val(val), m_cat(&cat) {}
+
+      template <class ErrorCodeEnum>
+        error_code(ErrorCodeEnum e,
+          typename boost::enable_if<is_error_code_enum<ErrorCodeEnum> >::type* = 0)
+      {
+        *this = make_error_code(e);
+      }
+
+      // modifiers:
+      void assign( int val, const error_category & cat )
+      { 
+        m_val = val;
+        m_cat = &cat;
+      }
+                                             
+      template<typename ErrorCodeEnum>
+        typename boost::enable_if<is_error_code_enum<ErrorCodeEnum>, error_code>::type &
+          operator=( ErrorCodeEnum val )
+      { 
+        *this = make_error_code(val);
+        return *this;
+      }
+
+      void clear()
+      {
+        m_val = 0;
+        m_cat = &system_category();
+      }
+
+      // observers:
+      int                     value() const    { return m_val; }
+      const error_category &  category() const { return *m_cat; }
+      error_condition         default_error_condition() const  { return m_cat->default_error_condition(value()); }
+      std::string             message() const  { return m_cat->message(value()); }
+
+      typedef void (*unspecified_bool_type)();
+      static void unspecified_bool_true() {}
+
+      operator unspecified_bool_type() const  // true if error
+      { 
+        return m_val == 0 ? 0 : unspecified_bool_true;
+      }
+
+      bool operator!() const  // true if no error
+      {
+        return m_val == 0;
+      }
+
+      // relationals:
+      inline friend bool operator==( const error_code & lhs,
+                                     const error_code & rhs )
+        //  the more symmetrical non-member syntax allows enum
+        //  conversions work for both rhs and lhs.
+      {
+        return lhs.m_cat == rhs.m_cat && lhs.m_val == rhs.m_val;
+      }
+
+      inline friend bool operator<( const error_code & lhs,
+                                    const error_code & rhs )
+        //  the more symmetrical non-member syntax allows enum
+        //  conversions work for both rhs and lhs.
+      {
+        return lhs.m_cat < rhs.m_cat
+          || (lhs.m_cat == rhs.m_cat && lhs.m_val < rhs.m_val);
+      }
+                  
+      private:
+      int                     m_val;
+      const error_category *  m_cat;
+
+    };
+
+    //  predefined error_code object used as "throw on error" tag
+# ifndef BOOST_SYSTEM_NO_DEPRECATED
+    BOOST_SYSTEM_DECL extern error_code throws;
+# endif
+
+    //  Moving from a "throws" object to a "throws" function without breaking
+    //  existing code is a bit of a problem. The workaround is to place the
+    //  "throws" function in namespace boost rather than namespace boost::system.
+
+  }  // namespace system
+
+  namespace detail { inline system::error_code * throws() { return 0; } }
+    //  Misuse of the error_code object is turned into a noisy failure by
+    //  poisoning the reference. This particular implementation doesn't
+    //  produce warnings or errors from popular compilers, is very efficient
+    //  (as determined by inspecting generated code), and does not suffer
+    //  from order of initialization problems. In practice, it also seems
+    //  cause user function error handling implementation errors to be detected
+    //  very early in the development cycle.
+
+  inline system::error_code & throws()
+    { return *detail::throws(); }
+
+  namespace system
+  {
+    //  non-member functions  ------------------------------------------------//
+
+    inline bool operator!=( const error_code & lhs,
+                            const error_code & rhs )
+    {
+      return !(lhs == rhs);
+    }
+
+    inline bool operator!=( const error_condition & lhs,
+                            const error_condition & rhs )
+    {
+      return !(lhs == rhs);
+    }
+
+    inline bool operator==( const error_code & code,
+                            const error_condition & condition )
+    {
+      return code.category().equivalent( code.value(), condition )
+        || condition.category().equivalent( code, condition.value() );
+    }
+                
+    inline bool operator!=( const error_code & lhs,
+                            const error_condition & rhs )
+    {
+      return !(lhs == rhs);
+    }
+                
+    inline bool operator==( const error_condition & condition,
+                            const error_code & code )
+    {
+      return condition.category().equivalent( code, condition.value() )
+        || code.category().equivalent( code.value(), condition );
+    }
+                
+    inline bool operator!=( const error_condition & lhs,
+                            const error_code & rhs )
+    {
+      return !(lhs == rhs);
+    }
+                  
+    // TODO: both of these may move elsewhere, but the LWG hasn't spoken yet.
+
+    template <class charT, class traits>
+    inline std::basic_ostream<charT,traits>&
+      operator<< (std::basic_ostream<charT,traits>& os, error_code ec)
+    {
+      os << ec.category().name() << ':' << ec.value();
+      return os;
+    }
+
+    inline std::size_t hash_value( const error_code & ec )
+    {
+      return static_cast<std::size_t>(ec.value())
+        + reinterpret_cast<std::size_t>(&ec.category());
+    }
+
+    //  make_* functions for errc::errc_t  -----------------------------//
+
+    namespace errc
+    {
+      //  explicit conversion:
+      inline error_code make_error_code( errc_t e )
+        { return error_code( e, generic_category() ); }
+
+      //  implicit conversion:
+      inline error_condition make_error_condition( errc_t e )
+        { return error_condition( e, generic_category() ); }
+    }
+
+    //  error_category default implementation  -------------------------------//
+
+    inline error_condition error_category::default_error_condition( int ev ) const
+    { 
+      return error_condition( ev, *this );
+    }
+
+    inline bool error_category::equivalent( int code,
+      const error_condition & condition ) const
+    {
+      return default_error_condition( code ) == condition;
+    }
+
+    inline bool error_category::equivalent( const error_code & code,
+      int condition ) const
+    {
+      return *this == code.category() && code.value() == condition;
+    }
+
+  } // namespace system
+} // namespace boost
+
+#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
+
+# ifdef BOOST_ERROR_CODE_HEADER_ONLY
+#   include <boost/../libs/system/src/error_code.cpp>
+# endif
+
+#endif // BOOST_ERROR_CODE_HPP
+
+
diff --git a/ext/boost/system/system_error.hpp b/ext/boost/system/system_error.hpp
new file mode 100644
index 0000000..065d365
--- /dev/null
+++ b/ext/boost/system/system_error.hpp
@@ -0,0 +1,80 @@
+//  Boost system_error.hpp  --------------------------------------------------//
+
+//  Copyright Beman Dawes 2006
+
+//  Distributed under the Boost Software License, Version 1.0. (See accompanying
+//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_SYSTEM_ERROR_HPP
+#define BOOST_SYSTEM_ERROR_HPP
+
+#include <string>
+#include <stdexcept>
+#include <cassert>
+#include <boost/system/error_code.hpp>
+
+namespace boost
+{
+  namespace system
+  {
+    //  class system_error  ------------------------------------------------------------//
+
+    class BOOST_SYMBOL_VISIBLE system_error : public std::runtime_error
+    // BOOST_SYMBOL_VISIBLE is needed by GCC to ensure system_error thrown from a shared
+    // library can be caught. See svn.boost.org/trac/boost/ticket/3697 
+    {
+    public:
+      system_error( error_code ec )
+          : std::runtime_error(""), m_error_code(ec) {}
+
+      system_error( error_code ec, const std::string & what_arg )
+          : std::runtime_error(what_arg), m_error_code(ec) {}
+
+      system_error( error_code ec, const char* what_arg )
+          : std::runtime_error(what_arg), m_error_code(ec) {}
+
+      system_error( int ev, const error_category & ecat )
+          : std::runtime_error(""), m_error_code(ev,ecat) {}
+
+      system_error( int ev, const error_category & ecat,
+        const std::string & what_arg )
+          : std::runtime_error(what_arg), m_error_code(ev,ecat) {}
+
+      system_error( int ev, const error_category & ecat,
+        const char * what_arg )
+          : std::runtime_error(what_arg), m_error_code(ev,ecat) {}
+
+      virtual ~system_error() throw() {}
+
+      const error_code &  code() const throw() { return m_error_code; }
+      const char *        what() const throw();
+
+    private:
+      error_code           m_error_code;
+      mutable std::string  m_what;
+    };
+
+    //  implementation  ------------------------------------------------------//
+
+    inline const char * system_error::what() const throw()
+    // see http://www.boost.org/more/error_handling.html for lazy build rationale
+    {
+      if ( m_what.empty() )
+      {
+        try
+        {
+          m_what = this->std::runtime_error::what();
+          if ( !m_what.empty() ) m_what += ": ";
+          m_what += m_error_code.message();
+        }
+        catch (...) { return std::runtime_error::what(); }
+      }
+      return m_what.c_str();
+    }
+
+  } // namespace system
+} // namespace boost
+
+#endif // BOOST_SYSTEM_ERROR_HPP
+
+
diff --git a/ext/boost/thread/._barrier.hpp b/ext/boost/thread/._barrier.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/._barrier.hpp and /dev/null differ
diff --git a/ext/boost/thread/._condition.hpp b/ext/boost/thread/._condition.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/._condition.hpp and /dev/null differ
diff --git a/ext/boost/thread/._condition_variable.hpp b/ext/boost/thread/._condition_variable.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/._condition_variable.hpp and /dev/null differ
diff --git a/ext/boost/thread/._mutex.hpp b/ext/boost/thread/._mutex.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/._mutex.hpp and /dev/null differ
diff --git a/ext/boost/thread/._once.hpp b/ext/boost/thread/._once.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/._once.hpp and /dev/null differ
diff --git a/ext/boost/thread/._recursive_mutex.hpp b/ext/boost/thread/._recursive_mutex.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/._recursive_mutex.hpp and /dev/null differ
diff --git a/ext/boost/thread/._shared_mutex.hpp b/ext/boost/thread/._shared_mutex.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/._shared_mutex.hpp and /dev/null differ
diff --git a/ext/boost/thread/._thread.hpp b/ext/boost/thread/._thread.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/._thread.hpp and /dev/null differ
diff --git a/ext/boost/thread/._tss.hpp b/ext/boost/thread/._tss.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/._tss.hpp and /dev/null differ
diff --git a/ext/boost/thread/._xtime.hpp b/ext/boost/thread/._xtime.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/._xtime.hpp and /dev/null differ
diff --git a/ext/boost/thread/barrier.hpp b/ext/boost/thread/barrier.hpp
index 4ca30cb..4fd8988 100644
--- a/ext/boost/thread/barrier.hpp
+++ b/ext/boost/thread/barrier.hpp
@@ -2,7 +2,7 @@
 // David Moore, William E. Kempf
 // Copyright (C) 2007-8 Anthony Williams
 //
-//  Distributed under the Boost Software License, Version 1.0. (See accompanying 
+//  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #ifndef BOOST_BARRIER_JDM030602_HPP
@@ -28,14 +28,14 @@ namespace boost
             : m_threshold(count), m_count(count), m_generation(0)
         {
             if (count == 0)
-                boost::throw_exception(std::invalid_argument("count cannot be zero."));
+                boost::throw_exception(thread_exception(system::errc::invalid_argument, "barrier constructor: count cannot be zero."));
         }
-    
+
         bool wait()
         {
             boost::mutex::scoped_lock lock(m_mutex);
             unsigned int gen = m_generation;
-        
+
             if (--m_count == 0)
             {
                 m_generation++;
diff --git a/ext/boost/thread/cv_status.hpp b/ext/boost/thread/cv_status.hpp
new file mode 100644
index 0000000..99b3c0c
--- /dev/null
+++ b/ext/boost/thread/cv_status.hpp
@@ -0,0 +1,26 @@
+//  cv_status.hpp
+//
+// Copyright (C) 2011 Vicente J. Botet Escriba
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_THREAD_CV_STATUS_HPP
+#define BOOST_THREAD_CV_STATUS_HPP
+
+#include <boost/detail/scoped_enum_emulation.hpp>
+
+namespace boost
+{
+
+  // enum class cv_status;
+  BOOST_SCOPED_ENUM_DECLARE_BEGIN(cv_status)
+  {
+    no_timeout,
+    timeout
+  }
+  BOOST_SCOPED_ENUM_DECLARE_END(cv_status)
+}
+
+#endif // header
diff --git a/ext/boost/thread/detail/._force_cast.hpp b/ext/boost/thread/detail/._force_cast.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/detail/._force_cast.hpp and /dev/null differ
diff --git a/ext/boost/thread/detail/._platform.hpp b/ext/boost/thread/detail/._platform.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/detail/._platform.hpp and /dev/null differ
diff --git a/ext/boost/thread/detail/._singleton.hpp b/ext/boost/thread/detail/._singleton.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/detail/._singleton.hpp and /dev/null differ
diff --git a/ext/boost/thread/detail/._thread_group.hpp b/ext/boost/thread/detail/._thread_group.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/detail/._thread_group.hpp and /dev/null differ
diff --git a/ext/boost/thread/detail/._thread_heap_alloc.hpp b/ext/boost/thread/detail/._thread_heap_alloc.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/detail/._thread_heap_alloc.hpp and /dev/null differ
diff --git a/ext/boost/thread/detail/._thread_interruption.hpp b/ext/boost/thread/detail/._thread_interruption.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/detail/._thread_interruption.hpp and /dev/null differ
diff --git a/ext/boost/thread/detail/._tss_hooks.hpp b/ext/boost/thread/detail/._tss_hooks.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/detail/._tss_hooks.hpp and /dev/null differ
diff --git a/ext/boost/thread/detail/config.hpp b/ext/boost/thread/detail/config.hpp
index 4015a6c..87bad34 100644
--- a/ext/boost/thread/detail/config.hpp
+++ b/ext/boost/thread/detail/config.hpp
@@ -1,15 +1,138 @@
 // Copyright (C) 2001-2003
 // William E. Kempf
+// Copyright (C) 2011-2012 Vicente J. Botet Escriba
 //
-//  Distributed under the Boost Software License, Version 1.0. (See accompanying 
+//  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #ifndef BOOST_THREAD_CONFIG_WEK01032003_HPP
 #define BOOST_THREAD_CONFIG_WEK01032003_HPP
 
+// Force SIG_ATOMIC_MAX to be defined
+//#ifndef __STDC_LIMIT_MACROS
+//#define __STDC_LIMIT_MACROS
+//#endif
+
 #include <boost/config.hpp>
 #include <boost/detail/workaround.hpp>
 
+#ifdef BOOST_NO_NOEXCEPT
+#  define BOOST_THREAD_NOEXCEPT_OR_THROW throw()
+#else
+#  define BOOST_THREAD_NOEXCEPT_OR_THROW noexcept
+#endif
+
+// This compiler doesn't support Boost.Chrono
+#if defined __IBMCPP__ && (__IBMCPP__ < 1100) && ! defined BOOST_THREAD_DONT_USE_CHRONO
+#define BOOST_THREAD_DONT_USE_CHRONO
+#endif
+
+// This compiler doesn't support Boost.Move
+#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100) && ! defined BOOST_THREAD_DONT_USE_MOVE
+#define BOOST_THREAD_DONT_USE_MOVE
+#endif
+
+// This compiler doesn't support Boost.Container Allocators files
+#if defined __SUNPRO_CC && ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS
+#define BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS
+#endif
+
+#if defined _WIN32_WCE && _WIN32_WCE==0x501 && ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS
+#define BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS
+#endif
+
+#if ! defined BOOST_THREAD_DONT_PROVIDE_BASIC_THREAD_ID && ! defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+#define BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+#endif
+
+// Default version is 2
+#if !defined BOOST_THREAD_VERSION
+#define BOOST_THREAD_VERSION 2
+#else
+#if BOOST_THREAD_VERSION!=2  && BOOST_THREAD_VERSION!=3
+#error "BOOST_THREAD_VERSION must be 2 or 3"
+#endif
+#endif
+
+// Uses Boost.Chrono by default if not stated the opposite defining BOOST_THREAD_DONT_USE_CHRONO
+#if ! defined BOOST_THREAD_DONT_USE_CHRONO && ! defined BOOST_THREAD_USES_CHRONO
+#define BOOST_THREAD_USES_CHRONO
+#endif
+
+// Don't provided by default in version 1.
+#if defined BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
+#define BOOST_THREAD_EXPLICIT_LOCK_CONVERSION explicit
+#else
+#define BOOST_THREAD_EXPLICIT_LOCK_CONVERSION
+#endif
+
+
+#if BOOST_THREAD_VERSION==2
+#if ! defined BOOST_THREAD_DONT_PROVIDE_PROMISE_LAZY && ! defined BOOST_THREAD_PROMISE_LAZY
+#define BOOST_THREAD_PROMISE_LAZY
+#endif
+#if ! defined BOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V3_0_0
+#define BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0
+#endif
+#endif
+
+#if BOOST_THREAD_VERSION==3
+#if ! defined BOOST_THREAD_DONT_PROVIDE_ONCE_CXX11 \
+ && ! defined BOOST_THREAD_PROVIDES_ONCE_CXX11
+#define BOOST_THREAD_PROVIDES_ONCE_CXX11
+#endif
+#if ! defined BOOST_THREAD_DONT_PROVIDE_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE \
+ && ! defined BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
+#define BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
+#endif
+#if ! defined BOOST_THREAD_DONT_PROVIDE_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE \
+ && ! defined BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
+#define BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
+#endif
+#if ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE \
+ && ! defined BOOST_THREAD_PROVIDES_FUTURE
+#define BOOST_THREAD_PROVIDES_FUTURE
+#endif
+#if ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS \
+ && ! defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+#define BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+#endif
+#if ! defined BOOST_THREAD_DONT_PROVIDE_SHARED_MUTEX_UPWARDS_CONVERSIONS \
+ && ! defined BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+#define BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+#endif
+#if ! defined BOOST_THREAD_DONT_PROVIDE_EXPLICIT_LOCK_CONVERSION \
+ && ! defined BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
+#define BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
+#endif
+#if ! defined BOOST_THREAD_DONT_PROVIDE_GENERIC_SHARED_MUTEX_ON_WIN \
+ && ! defined BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
+#endif
+#if ! defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0 \
+ && ! defined BOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V3_0_
+#define BOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V3_0_0
+#endif
+#if ! defined BOOST_THREAD_DONT_USE_MOVE \
+ && ! defined BOOST_THREAD_USES_MOVE
+#define BOOST_THREAD_USES_MOVE
+#endif
+
+#endif
+
+// BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN is defined if BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+#if defined BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS \
+&& ! defined BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
+#endif
+
+// BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0 defined by default up to Boost 1.52
+// BOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V3_0_0 defined by default up to Boost 1.55
+#if ! defined BOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V3_0_0 \
+&& ! defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0
+#define BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0
+#endif
+
 #if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
 #  pragma warn -8008 // Condition always true/false
 #  pragma warn -8080 // Identifier declared but never used
@@ -17,11 +140,11 @@
 #  pragma warn -8066 // Unreachable code
 #endif
 
-#include "platform.hpp"
+#include <boost/thread/detail/platform.hpp>
 
 // provided for backwards compatibility, since this
 // macro was used for several releases by mistake.
-#if defined(BOOST_THREAD_DYN_DLL)
+#if defined(BOOST_THREAD_DYN_DLL) && ! defined BOOST_THREAD_DYN_LINK
 # define BOOST_THREAD_DYN_LINK
 #endif
 
@@ -53,12 +176,18 @@
 
 #if defined(BOOST_HAS_DECLSPEC)
 #   if defined(BOOST_THREAD_BUILD_DLL) //Build dll
-#       define BOOST_THREAD_DECL __declspec(dllexport)
+#       define BOOST_THREAD_DECL BOOST_SYMBOL_EXPORT
+//#       define BOOST_THREAD_DECL __declspec(dllexport)
+
 #   elif defined(BOOST_THREAD_USE_DLL) //Use dll
-#       define BOOST_THREAD_DECL __declspec(dllimport)
+#       define BOOST_THREAD_DECL BOOST_SYMBOL_IMPORT
+//#       define BOOST_THREAD_DECL __declspec(dllimport)
 #   else
 #       define BOOST_THREAD_DECL
 #   endif
+#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+#  define BOOST_THREAD_DECL BOOST_SYMBOL_VISIBLE
+
 #else
 #   define BOOST_THREAD_DECL
 #endif // BOOST_HAS_DECLSPEC
@@ -69,7 +198,7 @@
 #if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_THREAD_NO_LIB) && !defined(BOOST_THREAD_BUILD_DLL) && !defined(BOOST_THREAD_BUILD_LIB)
 //
 // Tell the autolink to link dynamically, this will get undef'ed by auto_link.hpp
-// once it's done with it: 
+// once it's done with it:
 //
 #if defined(BOOST_THREAD_USE_DLL)
 #   define BOOST_DYN_LINK
diff --git a/ext/boost/thread/detail/delete.hpp b/ext/boost/thread/detail/delete.hpp
new file mode 100644
index 0000000..30e7c93
--- /dev/null
+++ b/ext/boost/thread/detail/delete.hpp
@@ -0,0 +1,45 @@
+// Copyright (C) 2012 Vicente J. Botet Escriba
+//
+//  Distributed under the Boost Software License, Version 1.0. (See accompanying
+//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_THREAD_DETAIL_DELETE_HPP
+#define BOOST_THREAD_DETAIL_DELETE_HPP
+
+#include <boost/config.hpp>
+
+/**
+ * BOOST_THREAD_DELETE_COPY_CTOR deletes the copy constructor when the compiler supports it or
+ * makes it private.
+ *
+ * BOOST_THREAD_DELETE_COPY_ASSIGN deletes the copy assignment when the compiler supports it or
+ * makes it private.
+ */
+#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \
+      CLASS(CLASS const&) = delete; \
+
+#define BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS) \
+      CLASS& operator=(CLASS const&) = delete;
+
+#else // BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \
+    private: \
+      CLASS(CLASS&); \
+    public:
+
+#define BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS) \
+    private: \
+      CLASS& operator=(CLASS&); \
+    public:
+#endif // BOOST_NO_CXX11_DELETED_FUNCTIONS
+
+/**
+ * BOOST_THREAD_NO_COPYABLE deletes the copy constructor and assignment when the compiler supports it or
+ * makes them private.
+ */
+#define BOOST_THREAD_NO_COPYABLE(CLASS) \
+    BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \
+    BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS)
+
+#endif // BOOST_THREAD_DETAIL_DELETE_HPP
diff --git a/ext/boost/thread/detail/memory.hpp b/ext/boost/thread/detail/memory.hpp
new file mode 100644
index 0000000..3c1692d
--- /dev/null
+++ b/ext/boost/thread/detail/memory.hpp
@@ -0,0 +1,156 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/thread for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_THREAD_DETAIL_MEMORY_HPP
+#define BOOST_THREAD_DETAIL_MEMORY_HPP
+
+#include <boost/config.hpp>
+#include <boost/container/allocator_traits.hpp>
+#include <boost/container/scoped_allocator.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_scalar.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/static_assert.hpp>
+
+namespace boost
+{
+  namespace thread_detail
+  {
+    template <class _Alloc>
+    class allocator_destructor
+    {
+      typedef container::allocator_traits<_Alloc> alloc_traits;
+    public:
+      typedef typename alloc_traits::pointer pointer;
+      typedef typename alloc_traits::size_type size_type;
+    private:
+      _Alloc alloc_;
+      size_type s_;
+    public:
+      allocator_destructor(_Alloc& a, size_type s)BOOST_NOEXCEPT
+      : alloc_(a), s_(s)
+      {}
+      void operator()(pointer p)BOOST_NOEXCEPT
+      {
+        alloc_traits::destroy(alloc_, p);
+        alloc_traits::deallocate(alloc_, p, s_);
+      }
+    };
+  } //namespace thread_detail
+
+  typedef container::allocator_arg_t allocator_arg_t;
+  BOOST_CONSTEXPR_OR_CONST allocator_arg_t allocator_arg = {};
+
+  template <class T, class Alloc>
+  struct uses_allocator: public container::uses_allocator<T, Alloc>
+  {
+  };
+
+  template <class Ptr>
+  struct pointer_traits
+  {
+      typedef Ptr pointer;
+//      typedef <details> element_type;
+//      typedef <details> difference_type;
+
+//      template <class U> using rebind = <details>;
+//
+//      static pointer pointer_to(<details>);
+  };
+
+  template <class T>
+  struct pointer_traits<T*>
+  {
+      typedef T* pointer;
+      typedef T element_type;
+      typedef ptrdiff_t difference_type;
+
+//      template <class U> using rebind = U*;
+//
+//      static pointer pointer_to(<details>) noexcept;
+  };
+
+
+  namespace thread_detail {
+    template <class _Ptr1, class _Ptr2,
+              bool = is_same<typename remove_cv<typename pointer_traits<_Ptr1>::element_type>::type,
+                             typename remove_cv<typename pointer_traits<_Ptr2>::element_type>::type
+                            >::value
+             >
+    struct same_or_less_cv_qualified_imp
+        : is_convertible<_Ptr1, _Ptr2> {};
+
+    template <class _Ptr1, class _Ptr2>
+    struct same_or_less_cv_qualified_imp<_Ptr1, _Ptr2, false>
+        : false_type {};
+
+    template <class _Ptr1, class _Ptr2, bool = is_scalar<_Ptr1>::value &&
+                                             !is_pointer<_Ptr1>::value>
+    struct same_or_less_cv_qualified
+        : same_or_less_cv_qualified_imp<_Ptr1, _Ptr2> {};
+
+    template <class _Ptr1, class _Ptr2>
+    struct same_or_less_cv_qualified<_Ptr1, _Ptr2, true>
+        : false_type {};
+
+  }
+  template <class T>
+  struct BOOST_SYMBOL_VISIBLE default_delete
+  {
+  #ifndef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+    BOOST_SYMBOL_VISIBLE
+    BOOST_CONSTEXPR default_delete() = default;
+  #else
+    BOOST_SYMBOL_VISIBLE
+    BOOST_CONSTEXPR default_delete() BOOST_NOEXCEPT {}
+  #endif
+    template <class U>
+    BOOST_SYMBOL_VISIBLE
+    default_delete(const default_delete<U>&,
+                  typename enable_if<is_convertible<U*, T*> >::type* = 0) BOOST_NOEXCEPT {}
+    BOOST_SYMBOL_VISIBLE
+    void operator() (T* ptr) const BOOST_NOEXCEPT
+    {
+      BOOST_STATIC_ASSERT_MSG(sizeof(T) > 0, "default_delete can not delete incomplete type");
+      delete ptr;
+    }
+  };
+
+  template <class T>
+  struct BOOST_SYMBOL_VISIBLE default_delete<T[]>
+  {
+  public:
+  #ifndef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+    BOOST_SYMBOL_VISIBLE
+    BOOST_CONSTEXPR default_delete() = default;
+  #else
+    BOOST_SYMBOL_VISIBLE
+    BOOST_CONSTEXPR default_delete() BOOST_NOEXCEPT {}
+  #endif
+    template <class U>
+    BOOST_SYMBOL_VISIBLE
+    default_delete(const default_delete<U[]>&,
+                   typename enable_if<thread_detail::same_or_less_cv_qualified<U*, T*> >::type* = 0) BOOST_NOEXCEPT {}
+    template <class U>
+    BOOST_SYMBOL_VISIBLE
+    void operator() (U* ptr,
+                     typename enable_if<thread_detail::same_or_less_cv_qualified<U*, T*> >::type* = 0) const BOOST_NOEXCEPT
+    {
+      BOOST_STATIC_ASSERT_MSG(sizeof(T) > 0, "default_delete can not delete incomplete type");
+      delete [] ptr;
+    }
+  };
+
+} // namespace boost
+
+
+#endif //  BOOST_THREAD_DETAIL_MEMORY_HPP
diff --git a/ext/boost/thread/detail/move.hpp b/ext/boost/thread/detail/move.hpp
index eb21107..f2665e6 100644
--- a/ext/boost/thread/detail/move.hpp
+++ b/ext/boost/thread/detail/move.hpp
@@ -2,21 +2,31 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 // (C) Copyright 2007-8 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
 
 #ifndef BOOST_THREAD_MOVE_HPP
 #define BOOST_THREAD_MOVE_HPP
 
+#include <boost/thread/detail/config.hpp>
 #ifndef BOOST_NO_SFINAE
 #include <boost/utility/enable_if.hpp>
 #include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/decay.hpp>
 #endif
 
+#include <boost/thread/detail/delete.hpp>
+#include <boost/move/move.hpp>
 #include <boost/config/abi_prefix.hpp>
 
 namespace boost
 {
+
     namespace detail
     {
+      template <typename T>
+      struct has_move_emulation_enabled_aux_dummy_specialization;
         template<typename T>
         struct thread_move_t
         {
@@ -39,22 +49,198 @@ namespace boost
         };
     }
 
+
 #ifndef BOOST_NO_SFINAE
     template<typename T>
-    typename enable_if<boost::is_convertible<T&,detail::thread_move_t<T> >, detail::thread_move_t<T> >::type move(T& t)
+    typename enable_if<boost::is_convertible<T&,boost::detail::thread_move_t<T> >, boost::detail::thread_move_t<T> >::type move(T& t)
     {
-        return detail::thread_move_t<T>(t);
+        return boost::detail::thread_move_t<T>(t);
     }
 #endif
-    
+
     template<typename T>
-    detail::thread_move_t<T> move(detail::thread_move_t<T> t)
+    boost::detail::thread_move_t<T> move(boost::detail::thread_move_t<T> t)
     {
         return t;
     }
-    
 }
 
+#if ! defined  BOOST_NO_CXX11_RVALUE_REFERENCES
+
+#define BOOST_THREAD_RV_REF(TYPE) BOOST_RV_REF(TYPE)
+#define BOOST_THREAD_RV_REF_BEG BOOST_RV_REF_BEG
+#define BOOST_THREAD_RV_REF_END BOOST_RV_REF_END
+#define BOOST_THREAD_RV(V) V
+#define BOOST_THREAD_MAKE_RV_REF(RVALUE) RVALUE
+#define BOOST_THREAD_FWD_REF(TYPE) BOOST_FWD_REF(TYPE)
+#define BOOST_THREAD_DCL_MOVABLE(TYPE)
+#define BOOST_THREAD_DCL_MOVABLE_BEG(T) \
+  namespace detail { \
+    template <typename T> \
+    struct has_move_emulation_enabled_aux_dummy_specialization<
+
+#define BOOST_THREAD_DCL_MOVABLE_END > \
+      : integral_constant<bool, true> \
+      {}; \
+    }
+
+#elif ! defined  BOOST_NO_CXX11_RVALUE_REFERENCES && defined  BOOST_MSVC
+
+#define BOOST_THREAD_RV_REF(TYPE) BOOST_RV_REF(TYPE)
+#define BOOST_THREAD_RV_REF_BEG BOOST_RV_REF_BEG
+#define BOOST_THREAD_RV_REF_END BOOST_RV_REF_END
+#define BOOST_THREAD_RV(V) V
+#define BOOST_THREAD_MAKE_RV_REF(RVALUE) RVALUE
+#define BOOST_THREAD_FWD_REF(TYPE) BOOST_FWD_REF(TYPE)
+#define BOOST_THREAD_DCL_MOVABLE(TYPE)
+#define BOOST_THREAD_DCL_MOVABLE_BEG(T) \
+  namespace detail { \
+    template <typename T> \
+    struct has_move_emulation_enabled_aux_dummy_specialization<
+
+#define BOOST_THREAD_DCL_MOVABLE_END > \
+      : integral_constant<bool, true> \
+      {}; \
+    }
+
+#else
+
+#if defined BOOST_THREAD_USES_MOVE
+#define BOOST_THREAD_RV_REF(TYPE) BOOST_RV_REF(TYPE)
+#define BOOST_THREAD_RV_REF_BEG BOOST_RV_REF_BEG
+#define BOOST_THREAD_RV_REF_END BOOST_RV_REF_END
+#define BOOST_THREAD_RV(V) V
+#define BOOST_THREAD_FWD_REF(TYPE) BOOST_FWD_REF(TYPE)
+#define BOOST_THREAD_DCL_MOVABLE(TYPE)
+#define BOOST_THREAD_DCL_MOVABLE_BEG(T) \
+  namespace detail { \
+    template <typename T> \
+    struct has_move_emulation_enabled_aux_dummy_specialization<
+
+#define BOOST_THREAD_DCL_MOVABLE_END > \
+      : integral_constant<bool, true> \
+      {}; \
+    }
+
+#else
+
+#define BOOST_THREAD_RV_REF(TYPE) boost::detail::thread_move_t< TYPE >
+#define BOOST_THREAD_RV_REF_BEG boost::detail::thread_move_t<
+#define BOOST_THREAD_RV_REF_END >
+#define BOOST_THREAD_RV(V) (*V)
+#define BOOST_THREAD_FWD_REF(TYPE) BOOST_FWD_REF(TYPE)
+
+#define BOOST_THREAD_DCL_MOVABLE(TYPE) \
+template <> \
+struct has_move_emulation_enabled_aux< TYPE > \
+  : BOOST_MOVE_BOOST_NS::integral_constant<bool, true> \
+{};
+
+#define BOOST_THREAD_DCL_MOVABLE_BEG(T) \
+template <typename T> \
+struct has_move_emulation_enabled_aux<
+
+#define BOOST_THREAD_DCL_MOVABLE_END > \
+  : BOOST_MOVE_BOOST_NS::integral_constant<bool, true> \
+{};
+
+#endif
+
+namespace boost
+{
+namespace detail
+{
+  template <typename T>
+  BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type)
+  make_rv_ref(T v)  BOOST_NOEXCEPT
+  {
+    return (BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type))(v);
+  }
+//  template <typename T>
+//  BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type)
+//  make_rv_ref(T &v)  BOOST_NOEXCEPT
+//  {
+//    return (BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type))(v);
+//  }
+//  template <typename T>
+//  const BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type)
+//  make_rv_ref(T const&v)  BOOST_NOEXCEPT
+//  {
+//    return (const BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type))(v);
+//  }
+}
+}
+
+#define BOOST_THREAD_MAKE_RV_REF(RVALUE) RVALUE.move()
+//#define BOOST_THREAD_MAKE_RV_REF(RVALUE) boost::detail::make_rv_ref(RVALUE)
+#endif
+
+
+#if ! defined  BOOST_NO_CXX11_RVALUE_REFERENCES
+
+#define BOOST_THREAD_MOVABLE(TYPE)
+
+#else
+
+#if defined BOOST_THREAD_USES_MOVE
+
+#define BOOST_THREAD_MOVABLE(TYPE) \
+    ::boost::rv<TYPE>& move()  BOOST_NOEXCEPT \
+    { \
+      return *static_cast< ::boost::rv<TYPE>* >(this); \
+    } \
+    const ::boost::rv<TYPE>& move() const BOOST_NOEXCEPT \
+    { \
+      return *static_cast<const ::boost::rv<TYPE>* >(this); \
+    } \
+    operator ::boost::rv<TYPE>&() \
+    { \
+      return *static_cast< ::boost::rv<TYPE>* >(this); \
+    } \
+    operator const ::boost::rv<TYPE>&() const \
+    { \
+      return *static_cast<const ::boost::rv<TYPE>* >(this); \
+    }\
+
+#else
+
+#define BOOST_THREAD_MOVABLE(TYPE) \
+    operator ::boost::detail::thread_move_t<TYPE>() BOOST_NOEXCEPT \
+    { \
+        return move(); \
+    } \
+    ::boost::detail::thread_move_t<TYPE> move() BOOST_NOEXCEPT \
+    { \
+      ::boost::detail::thread_move_t<TYPE> x(*this); \
+        return x; \
+    } \
+
+#endif
+#endif
+
+#define BOOST_THREAD_MOVABLE_ONLY(TYPE) \
+  BOOST_THREAD_NO_COPYABLE(TYPE) \
+  BOOST_THREAD_MOVABLE(TYPE) \
+
+#define BOOST_THREAD_COPYABLE_AND_MOVABLE(TYPE) \
+  BOOST_THREAD_MOVABLE(TYPE) \
+
+
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+namespace boost
+{  namespace thread_detail
+  {
+      template <class T>
+      typename decay<T>::type
+      decay_copy(T&& t)
+      {
+          return boost::forward<T>(t);
+      }
+  }
+}
+#endif
+
 #include <boost/config/abi_suffix.hpp>
 
 #endif
diff --git a/ext/boost/thread/detail/platform.hpp b/ext/boost/thread/detail/platform.hpp
index 58601b0..1f33b1a 100644
--- a/ext/boost/thread/detail/platform.hpp
+++ b/ext/boost/thread/detail/platform.hpp
@@ -19,6 +19,7 @@
 // choose platform
 #if defined(linux) || defined(__linux) || defined(__linux__)
 #  define BOOST_THREAD_LINUX
+//#  define BOOST_THREAD_WAIT_BUG boost::posix_time::microseconds(100000)
 #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
 #  define BOOST_THREAD_BSD
 #elif defined(sun) || defined(__sun)
@@ -35,6 +36,7 @@
 #  define BOOST_THREAD_BEOS
 #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
 #  define BOOST_THREAD_MACOS
+//#  define BOOST_THREAD_WAIT_BUG boost::posix_time::microseconds(1000)
 #elif defined(__IBMCPP__) || defined(_AIX)
 #  define BOOST_THREAD_AIX
 #elif defined(__amigaos__)
@@ -55,7 +57,7 @@
 // dispatcher table. If there is no entry for a platform but pthreads is
 // available on the platform, pthread is choosen as default. If nothing is
 // available the preprocessor will fail with a diagnostic message.
- 
+
 #if defined(BOOST_THREAD_POSIX)
 #  define BOOST_THREAD_PLATFORM_PTHREAD
 #else
diff --git a/ext/boost/thread/detail/thread.hpp b/ext/boost/thread/detail/thread.hpp
index 3db4b88..7bd47e0 100644
--- a/ext/boost/thread/detail/thread.hpp
+++ b/ext/boost/thread/detail/thread.hpp
@@ -4,7 +4,9 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 // (C) Copyright 2007-10 Anthony Williams
- 
+// (C) Copyright 20011-12 Vicente J. Botet Escriba
+
+#include <boost/thread/detail/config.hpp>
 #include <boost/thread/exceptions.hpp>
 #ifndef BOOST_NO_IOSTREAM
 #include <ostream>
@@ -13,7 +15,6 @@
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/xtime.hpp>
 #include <boost/thread/detail/thread_heap_alloc.hpp>
-#include <boost/utility.hpp>
 #include <boost/assert.hpp>
 #include <list>
 #include <algorithm>
@@ -22,8 +23,18 @@
 #include <boost/bind.hpp>
 #include <stdlib.h>
 #include <memory>
+//#include <vector>
+//#include <utility>
 #include <boost/utility/enable_if.hpp>
 #include <boost/type_traits/remove_reference.hpp>
+#include <boost/io/ios_state.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/decay.hpp>
+#include <boost/functional/hash.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
 
 #include <boost/config/abi_prefix.hpp>
 
@@ -34,6 +45,7 @@
 
 namespace boost
 {
+
     namespace detail
     {
         template<typename F>
@@ -41,30 +53,33 @@ namespace boost
             public detail::thread_data_base
         {
         public:
-#ifndef BOOST_NO_RVALUE_REFERENCES
-            thread_data(F&& f_):
-                f(static_cast<F&&>(f_))
-            {}
-            thread_data(F& f_):
-                f(f_)
-            {}
+            BOOST_THREAD_NO_COPYABLE(thread_data)
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+              thread_data(BOOST_THREAD_RV_REF(F) f_):
+                f(boost::forward<F>(f_))
+              {}
+// This overloading must be removed if we want the packaged_task's tests to pass.
+//            thread_data(F& f_):
+//                f(f_)
+//            {}
 #else
-            thread_data(F f_):
-                f(f_)
+
+            thread_data(BOOST_THREAD_RV_REF(F) f_):
+              f(f_)
             {}
-            thread_data(detail::thread_move_t<F> f_):
+            thread_data(F f_):
                 f(f_)
             {}
-#endif            
+#endif
+            //thread_data() {}
+
             void run()
             {
                 f();
             }
+
         private:
             F f;
-
-            void operator=(thread_data&);
-            thread_data(thread_data&);
         };
 
         template<typename F>
@@ -73,14 +88,11 @@ namespace boost
         {
         private:
             F& f;
-
-            void operator=(thread_data&);
-            thread_data(thread_data&);
         public:
+            BOOST_THREAD_NO_COPYABLE(thread_data)
             thread_data(boost::reference_wrapper<F> f_):
                 f(f_)
             {}
-            
             void run()
             {
                 f();
@@ -93,43 +105,48 @@ namespace boost
         {
         private:
             F& f;
-            void operator=(thread_data&);
-            thread_data(thread_data&);
         public:
+            BOOST_THREAD_NO_COPYABLE(thread_data)
             thread_data(const boost::reference_wrapper<F> f_):
                 f(f_)
             {}
-            
             void run()
             {
                 f();
             }
         };
     }
-    
+
     class BOOST_THREAD_DECL thread
     {
-    private:
-        thread(thread&);
-        thread& operator=(thread&);
+    public:
+      typedef thread_attributes attributes;
+
+      BOOST_THREAD_MOVABLE_ONLY(thread)
+    protected:
 
         void release_handle();
-        
+
         detail::thread_data_ptr thread_info;
 
+        void start_thread();
+        void start_thread(const attributes& attr);
+
         explicit thread(detail::thread_data_ptr data);
 
         detail::thread_data_ptr get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const;
 
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
         template<typename F>
-        static inline detail::thread_data_ptr make_thread_info(F&& f)
+        static inline detail::thread_data_ptr make_thread_info(BOOST_THREAD_RV_REF(F) f)
         {
-            return detail::thread_data_ptr(detail::heap_new<detail::thread_data<typename boost::remove_reference<F>::type> >(static_cast<F&&>(f)));
+            return detail::thread_data_ptr(detail::heap_new<detail::thread_data<typename boost::remove_reference<F>::type> >(
+                boost::forward<F>(f)));
         }
         static inline detail::thread_data_ptr make_thread_info(void (*f)())
         {
-            return detail::thread_data_ptr(detail::heap_new<detail::thread_data<void(*)()> >(static_cast<void(*&&)()>(f)));
+            return detail::thread_data_ptr(detail::heap_new<detail::thread_data<void(*)()> >(
+                boost::forward<void(*)()>(f)));
         }
 #else
         template<typename F>
@@ -138,217 +155,281 @@ namespace boost
             return detail::thread_data_ptr(detail::heap_new<detail::thread_data<F> >(f));
         }
         template<typename F>
-        static inline detail::thread_data_ptr make_thread_info(boost::detail::thread_move_t<F> f)
+        static inline detail::thread_data_ptr make_thread_info(BOOST_THREAD_RV_REF(F) f)
         {
             return detail::thread_data_ptr(detail::heap_new<detail::thread_data<F> >(f));
         }
 
 #endif
         struct dummy;
-        
-    protected:
-        template <class F>
-        void set_thread_main_function(F f)
-        {
-            thread_info = make_thread_info(f);
-        }
-        
-        void start_thread(unsigned int stack_size = 0);
-        
     public:
+#if 0 // This should not be needed anymore. Use instead BOOST_THREAD_MAKE_RV_REF.
 #if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
-        thread(const volatile thread&); 
-#endif 
-        thread();
-        virtual ~thread();
-
-#ifndef BOOST_NO_RVALUE_REFERENCES
-#ifdef BOOST_MSVC
-        template <class F>
-        explicit thread(F f,typename disable_if<boost::is_convertible<F&,detail::thread_move_t<F> >, dummy* >::type=0):
-            thread_info(make_thread_info(static_cast<F&&>(f)))
+        thread(const volatile thread&);
+#endif
+#endif
+        thread() BOOST_NOEXCEPT;
+        ~thread()
+        {
+    #if defined BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
+          if (joinable()) {
+            std::terminate();
+          }
+    #else
+            detach();
+    #endif
+        }
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+        template <
+          class F
+        >
+        explicit thread(BOOST_THREAD_RV_REF(F) f
+        , typename disable_if<is_same<typename decay<F>::type, thread>, dummy* >::type=0
+        ):
+          thread_info(make_thread_info(thread_detail::decay_copy(boost::forward<F>(f))))
         {
             start_thread();
         }
-#else
-        template <class F>
-        thread(F&& f, unsigned int stack_size = 0):
-            thread_info(make_thread_info(static_cast<F&&>(f)))
+        template <
+          class F
+        >
+        thread(attributes& attrs, BOOST_THREAD_RV_REF(F) f):
+          thread_info(make_thread_info(thread_detail::decay_copy(boost::forward<F>(f))))
         {
-            start_thread(stack_size);
+            start_thread(attrs);
         }
-#endif
 
-        thread(thread&& other)
-        {
-            thread_info.swap(other.thread_info);
-        }
-        
-        thread& operator=(thread&& other)
+#else
+#ifdef BOOST_NO_SFINAE
+        template <class F>
+        explicit thread(F f):
+            thread_info(make_thread_info(f))
         {
-            thread_info=other.thread_info;
-            other.thread_info.reset();
-            return *this;
+            start_thread();
         }
-
-        thread&& move()
+        template <class F>
+        thread(attributes& attrs, F f):
+            thread_info(make_thread_info(f))
         {
-            return static_cast<thread&&>(*this);
+            start_thread(attrs);
         }
-        
 #else
-#ifdef BOOST_NO_SFINAE
         template <class F>
-        explicit thread(F f, unsigned int stack_size = 0):
+        explicit thread(F f
+            // todo Disable also if Or is_same<typename decay<F>::type, thread>
+        , typename disable_if<boost::is_convertible<F&,BOOST_THREAD_RV_REF(F) >, dummy* >::type=0):
             thread_info(make_thread_info(f))
         {
-            start_thread(stack_size);
+            start_thread();
         }
-#else
         template <class F>
-        explicit thread(F f,typename disable_if<boost::is_convertible<F&,detail::thread_move_t<F> >, dummy* >::type=0, unsigned int stack_size = 0):
+        thread(attributes& attrs, F f
+        , typename disable_if<boost::is_convertible<F&,BOOST_THREAD_RV_REF(F) >, dummy* >::type=0):
             thread_info(make_thread_info(f))
         {
-            start_thread(stack_size);
+            start_thread(attrs);
         }
 #endif
-        
         template <class F>
-        explicit thread(detail::thread_move_t<F> f, unsigned int stack_size = 0):
+        explicit thread(BOOST_THREAD_RV_REF(F) f
+        , typename disable_if<is_same<typename decay<F>::type, thread>, dummy* >::type=0
+        ):
             thread_info(make_thread_info(f))
         {
-            start_thread(stack_size);
+            start_thread();
         }
 
-        thread(detail::thread_move_t<thread> x)
+        template <class F>
+        thread(attributes& attrs, BOOST_THREAD_RV_REF(F) f):
+            thread_info(make_thread_info(f))
         {
-            thread_info=x->thread_info;
-            x->thread_info.reset();
+            start_thread(attrs);
         }
-       
-#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
-        thread& operator=(thread x) 
-        { 
-            swap(x); 
-            return *this; 
-        } 
-#else
-        thread& operator=(detail::thread_move_t<thread> x)
+#endif
+        thread(BOOST_THREAD_RV_REF(thread) x)
         {
-            thread new_thread(x);
-            swap(new_thread);
-            return *this;
+            thread_info=BOOST_THREAD_RV(x).thread_info;
+            BOOST_THREAD_RV(x).thread_info.reset();
         }
-#endif   
-        operator detail::thread_move_t<thread>()
+#if 0 // This should not be needed anymore. Use instead BOOST_THREAD_MAKE_RV_REF.
+#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
+        thread& operator=(thread x)
         {
-            return move();
+            swap(x);
+            return *this;
         }
-        
-        detail::thread_move_t<thread> move()
+#endif
+#endif
+
+        thread& operator=(BOOST_THREAD_RV_REF(thread) other) BOOST_NOEXCEPT
         {
-            detail::thread_move_t<thread> x(*this);
-            return x;
-        }
 
+#if defined BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
+            if (joinable()) std::terminate();
 #endif
+            thread_info=BOOST_THREAD_RV(other).thread_info;
+            BOOST_THREAD_RV(other).thread_info.reset();
+            return *this;
+        }
 
         template <class F,class A1>
-        thread(F f,A1 a1, unsigned int stack_size = 0):
+        thread(F f,A1 a1,typename disable_if<boost::is_convertible<F&,thread_attributes >, dummy* >::type=0):
             thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1)))
         {
-            start_thread(stack_size);
+            start_thread();
         }
         template <class F,class A1,class A2>
-        thread(F f,A1 a1,A2 a2, unsigned int stack_size = 0):
+        thread(F f,A1 a1,A2 a2):
             thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2)))
         {
-            start_thread(stack_size);
+            start_thread();
         }
 
         template <class F,class A1,class A2,class A3>
-        thread(F f,A1 a1,A2 a2,A3 a3, unsigned int stack_size = 0):
+        thread(F f,A1 a1,A2 a2,A3 a3):
             thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3)))
         {
-            start_thread(stack_size);
+            start_thread();
         }
 
         template <class F,class A1,class A2,class A3,class A4>
-        thread(F f,A1 a1,A2 a2,A3 a3,A4 a4, unsigned int stack_size = 0):
+        thread(F f,A1 a1,A2 a2,A3 a3,A4 a4):
             thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4)))
         {
-            start_thread(stack_size);
+            start_thread();
         }
 
         template <class F,class A1,class A2,class A3,class A4,class A5>
-        thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5, unsigned int stack_size = 0):
+        thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5):
             thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4,a5)))
         {
-            start_thread(stack_size);
+            start_thread();
         }
 
         template <class F,class A1,class A2,class A3,class A4,class A5,class A6>
-        thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6, unsigned int stack_size = 0):
+        thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6):
             thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4,a5,a6)))
         {
-            start_thread(stack_size);
+            start_thread();
         }
 
         template <class F,class A1,class A2,class A3,class A4,class A5,class A6,class A7>
-        thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7, unsigned int stack_size = 0):
+        thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7):
             thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4,a5,a6,a7)))
         {
-            start_thread(stack_size);
+            start_thread();
         }
 
         template <class F,class A1,class A2,class A3,class A4,class A5,class A6,class A7,class A8>
-        thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7,A8 a8, unsigned int stack_size = 0):
+        thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7,A8 a8):
             thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4,a5,a6,a7,a8)))
         {
-            start_thread(stack_size);
+            start_thread();
         }
 
         template <class F,class A1,class A2,class A3,class A4,class A5,class A6,class A7,class A8,class A9>
-        thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7,A8 a8,A9 a9, unsigned int stack_size = 0):
+        thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7,A8 a8,A9 a9):
             thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4,a5,a6,a7,a8,a9)))
         {
-            start_thread(stack_size);
+            start_thread();
         }
 
-        void swap(thread& x)
+        void swap(thread& x) BOOST_NOEXCEPT
         {
             thread_info.swap(x.thread_info);
         }
 
-        class id;
-        id get_id() const;
+        class BOOST_SYMBOL_VISIBLE id;
+        id get_id() const BOOST_NOEXCEPT;
 
 
-        bool joinable() const;
+        bool joinable() const BOOST_NOEXCEPT;
         void join();
-        bool timed_join(const system_time& wait_until);
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Rep, class Period>
+        bool try_join_for(const chrono::duration<Rep, Period>& rel_time)
+        {
+          return try_join_until(chrono::steady_clock::now() + rel_time);
+        }
+        template <class Clock, class Duration>
+        bool try_join_until(const chrono::time_point<Clock, Duration>& t)
+        {
+          using namespace chrono;
+          system_clock::time_point     s_now = system_clock::now();
+          typename Clock::time_point  c_now = Clock::now();
+          return try_join_until(s_now + ceil<nanoseconds>(t - c_now));
+        }
+        template <class Duration>
+        bool try_join_until(const chrono::time_point<chrono::system_clock, Duration>& t)
+        {
+          using namespace chrono;
+          typedef time_point<system_clock, nanoseconds> nano_sys_tmpt;
+          return try_join_until(nano_sys_tmpt(ceil<nanoseconds>(t.time_since_epoch())));
+        }
+#endif
+#if defined(BOOST_THREAD_PLATFORM_WIN32)
+        bool timed_join(const system_time& abs_time);
+    private:
+        bool do_try_join_until(uintmax_t milli);
+    public:
+#ifdef BOOST_THREAD_USES_CHRONO
+        bool try_join_until(const chrono::time_point<chrono::system_clock, chrono::nanoseconds>& tp)
+        {
+          chrono::milliseconds rel_time= chrono::ceil<chrono::milliseconds>(tp-chrono::system_clock::now());
+          return do_try_join_until(rel_time.count());
+        }
+#endif
+
+
+#else
+        bool timed_join(const system_time& abs_time)
+        {
+          struct timespec const ts=detail::get_timespec(abs_time);
+          return do_try_join_until(ts);
+        }
+#ifdef BOOST_THREAD_USES_CHRONO
+        bool try_join_until(const chrono::time_point<chrono::system_clock, chrono::nanoseconds>& tp)
+        {
+          using namespace chrono;
+          nanoseconds d = tp.time_since_epoch();
+          timespec ts;
+          seconds s = duration_cast<seconds>(d);
+          ts.tv_sec = static_cast<long>(s.count());
+          ts.tv_nsec = static_cast<long>((d - s).count());
+          return do_try_join_until(ts);
+        }
+#endif
+      private:
+        bool do_try_join_until(struct timespec const &timeout);
+      public:
+
+#endif
 
         template<typename TimeDuration>
         inline bool timed_join(TimeDuration const& rel_time)
         {
             return timed_join(get_system_time()+rel_time);
         }
+
         void detach();
 
-        static unsigned hardware_concurrency();
+        static unsigned hardware_concurrency() BOOST_NOEXCEPT;
 
+#define BOOST_THREAD_DEFINES_THREAD_NATIVE_HANDLE
         typedef detail::thread_data_base::native_handle_type native_handle_type;
         native_handle_type native_handle();
 
+#if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0
+        // Use thread::id when comparisions are needed
         // backwards compatibility
         bool operator==(const thread& other) const;
         bool operator!=(const thread& other) const;
-
-        static inline void yield()
+#endif
+        static inline void yield() BOOST_NOEXCEPT
         {
             this_thread::yield();
         }
-        
+
         static inline void sleep(const system_time& xt)
         {
             this_thread::sleep(xt);
@@ -356,85 +437,110 @@ namespace boost
 
         // extensions
         void interrupt();
-        bool interruption_requested() const;
+        bool interruption_requested() const BOOST_NOEXCEPT;
     };
 
-    inline void swap(thread& lhs,thread& rhs)
+    inline void swap(thread& lhs,thread& rhs) BOOST_NOEXCEPT
     {
         return lhs.swap(rhs);
     }
-    
-#ifndef BOOST_NO_RVALUE_REFERENCES
-    inline thread&& move(thread& t)
-    {
-        return static_cast<thread&&>(t);
-    }
-    inline thread&& move(thread&& t)
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+    inline thread&& move(thread& t) BOOST_NOEXCEPT
     {
         return static_cast<thread&&>(t);
     }
-#else
-    inline detail::thread_move_t<thread> move(detail::thread_move_t<thread> t)
-    {
-        return t;
-    }
 #endif
 
+    BOOST_THREAD_DCL_MOVABLE(thread)
+
     namespace this_thread
     {
-        thread::id BOOST_THREAD_DECL get_id();
+        thread::id BOOST_THREAD_DECL get_id() BOOST_NOEXCEPT;
 
         void BOOST_THREAD_DECL interruption_point();
-        bool BOOST_THREAD_DECL interruption_enabled();
-        bool BOOST_THREAD_DECL interruption_requested();
+        bool BOOST_THREAD_DECL interruption_enabled() BOOST_NOEXCEPT;
+        bool BOOST_THREAD_DECL interruption_requested() BOOST_NOEXCEPT;
 
-        inline void sleep(xtime const& abs_time)
+        inline BOOST_SYMBOL_VISIBLE void sleep(xtime const& abs_time)
         {
             sleep(system_time(abs_time));
         }
     }
 
-    class thread::id
+    class BOOST_SYMBOL_VISIBLE thread::id
     {
     private:
-        detail::thread_data_ptr thread_data;
-            
-        id(detail::thread_data_ptr thread_data_):
+        friend inline
+        std::size_t
+        hash_value(const thread::id &v)
+        {
+#if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+          return hash_value(v.thread_data);
+#else
+          return hash_value(v.thread_data.get());
+#endif
+        }
+
+#if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+#if defined(BOOST_THREAD_PLATFORM_WIN32)
+        typedef unsigned int data;
+#else
+        typedef thread::native_handle_type data;
+#endif
+#else
+        typedef detail::thread_data_ptr data;
+#endif
+        data thread_data;
+
+        id(data thread_data_):
             thread_data(thread_data_)
         {}
         friend class thread;
-        friend id BOOST_THREAD_DECL this_thread::get_id();
+        friend id BOOST_THREAD_DECL this_thread::get_id() BOOST_NOEXCEPT;
     public:
-        id():
-            thread_data()
+        id() BOOST_NOEXCEPT:
+#if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+#if defined(BOOST_THREAD_PLATFORM_WIN32)
+        thread_data(0)
+#else
+        thread_data(0)
+#endif
+#else
+        thread_data()
+#endif
+        {}
+
+        id(const id& other) BOOST_NOEXCEPT :
+            thread_data(other.thread_data)
         {}
-            
-        bool operator==(const id& y) const
+
+        bool operator==(const id& y) const BOOST_NOEXCEPT
         {
             return thread_data==y.thread_data;
         }
-        
-        bool operator!=(const id& y) const
+
+        bool operator!=(const id& y) const BOOST_NOEXCEPT
         {
             return thread_data!=y.thread_data;
         }
-        
-        bool operator<(const id& y) const
+
+        bool operator<(const id& y) const BOOST_NOEXCEPT
         {
             return thread_data<y.thread_data;
         }
-        
-        bool operator>(const id& y) const
+
+        bool operator>(const id& y) const BOOST_NOEXCEPT
         {
             return y.thread_data<thread_data;
         }
-        
-        bool operator<=(const id& y) const
+
+        bool operator<=(const id& y) const BOOST_NOEXCEPT
         {
             return !(y.thread_data<thread_data);
         }
-        
-        bool operator>=(const id& y) const
+
+        bool operator>=(const id& y) const BOOST_NOEXCEPT
         {
             return !(thread_data<y.thread_data);
         }
@@ -442,12 +548,14 @@ namespace boost
 #ifndef BOOST_NO_IOSTREAM
 #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
         template<class charT, class traits>
-        friend std::basic_ostream<charT, traits>& 
+        friend BOOST_SYMBOL_VISIBLE
+  std::basic_ostream<charT, traits>&
         operator<<(std::basic_ostream<charT, traits>& os, const id& x)
         {
             if(x.thread_data)
             {
-                return os<<x.thread_data;
+                io::ios_flags_saver  ifs( os );
+                return os<< std::hex << x.thread_data;
             }
             else
             {
@@ -456,12 +564,14 @@ namespace boost
         }
 #else
         template<class charT, class traits>
-        std::basic_ostream<charT, traits>& 
-        print(std::basic_ostream<charT, traits>& os)
+        BOOST_SYMBOL_VISIBLE
+  std::basic_ostream<charT, traits>&
+        print(std::basic_ostream<charT, traits>& os) const
         {
             if(thread_data)
             {
-                return os<<thread_data;
+              io::ios_flags_saver  ifs( os );
+              return os<< std::hex << thread_data;
             }
             else
             {
@@ -475,23 +585,26 @@ namespace boost
 
 #if !defined(BOOST_NO_IOSTREAM) && defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
     template<class charT, class traits>
-    std::basic_ostream<charT, traits>& 
+    BOOST_SYMBOL_VISIBLE
+    std::basic_ostream<charT, traits>&
     operator<<(std::basic_ostream<charT, traits>& os, const thread::id& x)
     {
         return x.print(os);
     }
 #endif
 
+#if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0
     inline bool thread::operator==(const thread& other) const
     {
         return get_id()==other.get_id();
     }
-    
+
     inline bool thread::operator!=(const thread& other) const
     {
         return get_id()!=other.get_id();
     }
-        
+#endif
+
     namespace detail
     {
         struct thread_exit_function_base
@@ -500,26 +613,26 @@ namespace boost
             {}
             virtual void operator()()=0;
         };
-        
+
         template<typename F>
         struct thread_exit_function:
             thread_exit_function_base
         {
             F f;
-            
+
             thread_exit_function(F f_):
                 f(f_)
             {}
-            
+
             void operator()()
             {
                 f();
             }
         };
-        
+
         void BOOST_THREAD_DECL add_thread_exit_function(thread_exit_function_base*);
     }
-    
+
     namespace this_thread
     {
         template<typename F>
diff --git a/ext/boost/thread/detail/thread_interruption.hpp b/ext/boost/thread/detail/thread_interruption.hpp
index 60c0e65..f1a165c 100644
--- a/ext/boost/thread/detail/thread_interruption.hpp
+++ b/ext/boost/thread/detail/thread_interruption.hpp
@@ -4,6 +4,10 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 // (C) Copyright 2007-9 Anthony Williams
+// (C) Copyright 2012 Vicente J. Botet Escriba
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/thread/detail/delete.hpp>
 
 namespace boost
 {
@@ -11,23 +15,20 @@ namespace boost
     {
         class BOOST_THREAD_DECL disable_interruption
         {
-            disable_interruption(const disable_interruption&);
-            disable_interruption& operator=(const disable_interruption&);
-            
-            bool interruption_was_enabled;
-            friend class restore_interruption;
+          bool interruption_was_enabled;
+          friend class restore_interruption;
         public:
-            disable_interruption();
-            ~disable_interruption();
+            BOOST_THREAD_NO_COPYABLE(disable_interruption)
+            disable_interruption() BOOST_NOEXCEPT;
+            ~disable_interruption() BOOST_NOEXCEPT;
         };
 
         class BOOST_THREAD_DECL restore_interruption
         {
-            restore_interruption(const restore_interruption&);
-            restore_interruption& operator=(const restore_interruption&);
         public:
-            explicit restore_interruption(disable_interruption& d);
-            ~restore_interruption();
+            BOOST_THREAD_NO_COPYABLE(restore_interruption)
+            explicit restore_interruption(disable_interruption& d) BOOST_NOEXCEPT;
+            ~restore_interruption() BOOST_NOEXCEPT;
         };
     }
 }
diff --git a/ext/boost/thread/exceptions.hpp b/ext/boost/thread/exceptions.hpp
index 6b5df9b..e2afc91 100644
--- a/ext/boost/thread/exceptions.hpp
+++ b/ext/boost/thread/exceptions.hpp
@@ -1,15 +1,15 @@
 // Copyright (C) 2001-2003
 // William E. Kempf
 // Copyright (C) 2007-9 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
 //
-//  Distributed under the Boost Software License, Version 1.0. (See accompanying 
+//  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #ifndef BOOST_THREAD_EXCEPTIONS_PDM070801_H
 #define BOOST_THREAD_EXCEPTIONS_PDM070801_H
 
 #include <boost/thread/detail/config.hpp>
-#include <oxt/tracable_exception.hpp>
 
 //  pdm: Sorry, but this class is used all over the place & I end up
 //       with recursive headers if I don't separate it
@@ -19,214 +19,203 @@
 
 #include <string>
 #include <stdexcept>
-#include <sstream>
-#include <cstring>
+#include <boost/system/system_error.hpp>
+#include <boost/system/error_code.hpp>
+#include <oxt/tracable_exception.hpp>
+
 
 #include <boost/config/abi_prefix.hpp>
 
 namespace boost
 {
 
-    class thread_interrupted:
-        public oxt::tracable_exception
+    class BOOST_SYMBOL_VISIBLE thread_interrupted
+      : public oxt::tracable_exception
     {};
 
-    class thread_exception:
-        public oxt::tracable_exception
+    class BOOST_SYMBOL_VISIBLE thread_exception:
+        public system::system_error
+        //public std::exception
     {
-    protected:
-        std::string message;
-        
-        thread_exception():
-            m_sys_err(-1)
+          typedef system::system_error base_type;
+    public:
+        thread_exception()
+          : base_type(0,system::system_category())
+        {}
+
+        thread_exception(int sys_error_code)
+          : base_type(sys_error_code, system::system_category())
         {}
-    
-        thread_exception(const std::string &description, int sys_err_code):
-            m_sys_err(sys_err_code)
+
+        thread_exception( int ev, const char * what_arg )
+        : base_type(system::error_code(ev, system::system_category()), what_arg)
         {
-            std::ostringstream s;
-            s << description << ": ";
-            s << strerror(sys_err_code) << " (" << sys_err_code << ")";
-            message.assign(s.str());
         }
-    
-        thread_exception(int sys_err_code):
-            m_sys_err(sys_err_code)
+        thread_exception( int ev, const std::string & what_arg )
+        : base_type(system::error_code(ev, system::system_category()), what_arg)
         {
-            std::ostringstream s;
-            s << strerror(sys_err_code) << " (" << sys_err_code << ")";
-            message.assign(s.str());
         }
-    
 
-    public:
         ~thread_exception() throw()
         {}
-    
+
 
         int native_error() const
         {
-            return m_sys_err;
+            return code().value();
         }
-        
-        virtual const char *what() const throw()
-        {
-            if(message.empty())
-            {
-                return std::exception::what();
-            }
-            else
-            {
-                return message.c_str();
-            }
-        }
-    
-    private:
-        int m_sys_err;
+
     };
 
-    class condition_error:
-        public std::exception
+    class BOOST_SYMBOL_VISIBLE condition_error:
+        public system::system_error
+        //public std::exception
     {
+          typedef system::system_error base_type;
     public:
-        const char* what() const throw()
-        {
-            return "Condition error";
-        }
+          condition_error()
+          : base_type(system::error_code(0, system::system_category()), "Condition error")
+          {}
+          condition_error( int ev )
+          : base_type(system::error_code(ev, system::system_category()), "Condition error")
+          {
+          }
+          condition_error( int ev, const char * what_arg )
+          : base_type(system::error_code(ev, system::system_category()), what_arg)
+          {
+          }
+          condition_error( int ev, const std::string & what_arg )
+          : base_type(system::error_code(ev, system::system_category()), what_arg)
+          {
+          }
     };
-    
 
-    class lock_error:
+
+    class BOOST_SYMBOL_VISIBLE lock_error:
         public thread_exception
     {
+          typedef thread_exception base_type;
     public:
         lock_error()
+        : base_type(0, "boost::lock_error")
         {}
-    
-        lock_error(int sys_err_code):
-            thread_exception(sys_err_code)
-        {}
-    
-        lock_error(const std::string &message)
+
+        lock_error( int ev )
+        : base_type(ev, "boost::lock_error")
+        {
+        }
+        lock_error( int ev, const char * what_arg )
+        : base_type(ev, what_arg)
+        {
+        }
+        lock_error( int ev, const std::string & what_arg )
+        : base_type(ev, what_arg)
         {
-            this->message = "boost::lock_error: ";
-            this->message.append(message);
         }
-    
+
         ~lock_error() throw()
         {}
-    
 
-        virtual const char* what() const throw()
-        {
-            if(message.empty())
-            {
-                return "boost::lock_error";
-            }
-            else
-            {
-                return message.c_str();
-            }
-        }
     };
 
-    class thread_resource_error:
+    class BOOST_SYMBOL_VISIBLE thread_resource_error:
         public thread_exception
     {
+          typedef thread_exception base_type;
     public:
-        thread_resource_error()
-        {}
-    
-        thread_resource_error(int sys_err_code):
-            thread_exception(sys_err_code)
-        {}
-    
-        thread_resource_error(const std::string &description, int sys_err_code):
-            thread_exception(description, sys_err_code)
-        {}
-    
+          thread_resource_error()
+          : base_type(system::errc::resource_unavailable_try_again, "boost::thread_resource_error")
+          {}
+
+          thread_resource_error( int ev )
+          : base_type(ev, "boost::thread_resource_error")
+          {
+          }
+          thread_resource_error( int ev, const char * what_arg )
+          : base_type(ev, what_arg)
+          {
+          }
+          thread_resource_error( int ev, const std::string & what_arg )
+          : base_type(ev, what_arg)
+          {
+          }
+
+
         ~thread_resource_error() throw()
         {}
-    
 
-        virtual const char* what() const throw()
-        {
-            if(message.empty())
-            {
-                return "boost::thread_resource_error";
-            }
-            else
-            {
-                return message.c_str();
-            }
-        }
-    
     };
 
-    class unsupported_thread_option:
+    class BOOST_SYMBOL_VISIBLE unsupported_thread_option:
         public thread_exception
     {
+          typedef thread_exception base_type;
     public:
-        unsupported_thread_option()
-        {}
-    
-        unsupported_thread_option(int sys_err_code):
-            thread_exception(sys_err_code)
-        {}
-    
-        ~unsupported_thread_option() throw()
-        {}
-    
+          unsupported_thread_option()
+          : base_type(system::errc::invalid_argument, "boost::unsupported_thread_option")
+          {}
+
+          unsupported_thread_option( int ev )
+          : base_type(ev, "boost::unsupported_thread_option")
+          {
+          }
+          unsupported_thread_option( int ev, const char * what_arg )
+          : base_type(ev, what_arg)
+          {
+          }
+          unsupported_thread_option( int ev, const std::string & what_arg )
+          : base_type(ev, what_arg)
+          {
+          }
 
-        virtual const char* what() const throw()
-        {
-            return "boost::unsupported_thread_option";
-        }
-    
     };
 
-    class invalid_thread_argument:
+    class BOOST_SYMBOL_VISIBLE invalid_thread_argument:
         public thread_exception
     {
+          typedef thread_exception base_type;
     public:
         invalid_thread_argument()
+        : base_type(system::errc::invalid_argument, "boost::invalid_thread_argument")
         {}
-    
-        invalid_thread_argument(int sys_err_code):
-            thread_exception(sys_err_code)
-        {}
-    
-        ~invalid_thread_argument() throw()
-        {}
-    
 
-        virtual const char* what() const throw()
+        invalid_thread_argument( int ev )
+        : base_type(ev, "boost::invalid_thread_argument")
+        {
+        }
+        invalid_thread_argument( int ev, const char * what_arg )
+        : base_type(ev, what_arg)
+        {
+        }
+        invalid_thread_argument( int ev, const std::string & what_arg )
+        : base_type(ev, what_arg)
         {
-            return "boost::invalid_thread_argument";
         }
-    
+
     };
 
-    class thread_permission_error:
+    class BOOST_SYMBOL_VISIBLE thread_permission_error:
         public thread_exception
     {
+          typedef thread_exception base_type;
     public:
-        thread_permission_error()
-        {}
-    
-        thread_permission_error(int sys_err_code):
-            thread_exception(sys_err_code)
-        {}
-    
-        ~thread_permission_error() throw()
-        {}
-    
+          thread_permission_error()
+          : base_type(system::errc::permission_denied, "boost::thread_permission_error")
+          {}
+
+          thread_permission_error( int ev )
+          : base_type(ev, "boost::thread_permission_error")
+          {
+          }
+          thread_permission_error( int ev, const char * what_arg )
+          : base_type(ev, what_arg)
+          {
+          }
+          thread_permission_error( int ev, const std::string & what_arg )
+          : base_type(ev, what_arg)
+          {
+          }
 
-        virtual const char* what() const throw()
-        {
-            return "boost::thread_permission_error";
-        }
-    
     };
 
 } // namespace boost
diff --git a/ext/boost/thread/future.hpp b/ext/boost/thread/future.hpp
index cb413ab..6bf5cf6 100644
--- a/ext/boost/thread/future.hpp
+++ b/ext/boost/thread/future.hpp
@@ -1,4 +1,5 @@
-//  (C) Copyright 2008-10 Anthony Williams 
+//  (C) Copyright 2008-10 Anthony Williams
+//  (C) Copyright 2011-2012 Vicente J. Botet Escriba
 //
 //  Distributed under the Boost Software License, Version 1.0. (See
 //  accompanying file LICENSE_1_0.txt or copy at
@@ -6,6 +7,15 @@
 
 #ifndef BOOST_THREAD_FUTURE_HPP
 #define BOOST_THREAD_FUTURE_HPP
+
+#include <boost/thread/detail/config.hpp>
+
+// boost::thread::future requires exception handling
+// due to boost::exception::exception_ptr dependency
+
+#ifndef BOOST_NO_EXCEPTIONS
+
+#include <boost/detail/scoped_enum_emulation.hpp>
 #include <stdexcept>
 #include <boost/thread/detail/move.hpp>
 #include <boost/thread/thread_time.hpp>
@@ -16,6 +26,8 @@
 #include <boost/scoped_ptr.hpp>
 #include <boost/type_traits/is_fundamental.hpp>
 #include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_cv.hpp>
 #include <boost/mpl/if.hpp>
 #include <boost/config.hpp>
 #include <boost/throw_exception.hpp>
@@ -28,59 +40,168 @@
 #include <list>
 #include <boost/next_prior.hpp>
 #include <vector>
+#include <boost/system/error_code.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#endif
+
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+#include <boost/thread/detail/memory.hpp>
+#endif
+
+#include <boost/utility/result_of.hpp>
+#include <boost/thread/thread.hpp>
+
+#if defined BOOST_THREAD_PROVIDES_FUTURE
+#define BOOST_THREAD_FUTURE future
+#else
+#define BOOST_THREAD_FUTURE unique_future
+#endif
+
 
 namespace boost
 {
-    class future_uninitialized:
-        public std::logic_error
+
+  //enum class future_errc
+  BOOST_SCOPED_ENUM_DECLARE_BEGIN(future_errc)
+  {
+      broken_promise,
+      future_already_retrieved,
+      promise_already_satisfied,
+      no_state
+  }
+  BOOST_SCOPED_ENUM_DECLARE_END(future_errc)
+
+  namespace system
+  {
+    template <>
+    struct BOOST_SYMBOL_VISIBLE is_error_code_enum<future_errc> : public true_type {};
+
+    #ifdef BOOST_NO_CXX11_SCOPED_ENUMS
+    template <>
+    struct BOOST_SYMBOL_VISIBLE is_error_code_enum<future_errc::enum_type> : public true_type { };
+    #endif
+  }
+
+  //enum class launch
+  BOOST_SCOPED_ENUM_DECLARE_BEGIN(launch)
+  {
+      async = 1,
+      deferred = 2,
+      any = async | deferred
+  }
+  BOOST_SCOPED_ENUM_DECLARE_END(launch)
+
+  //enum class future_status
+  BOOST_SCOPED_ENUM_DECLARE_BEGIN(future_status)
+  {
+      ready,
+      timeout,
+      deferred
+  }
+  BOOST_SCOPED_ENUM_DECLARE_END(future_status)
+
+  BOOST_THREAD_DECL
+  const system::error_category& future_category() BOOST_NOEXCEPT;
+
+  namespace system
+  {
+    inline
+    error_code
+    make_error_code(future_errc e) //BOOST_NOEXCEPT
+    {
+        return error_code(underlying_cast<int>(e), boost::future_category());
+    }
+
+    inline
+    error_condition
+    make_error_condition(future_errc e) //BOOST_NOEXCEPT
+    {
+        return error_condition(underlying_cast<int>(e), future_category());
+    }
+  }
+
+  class BOOST_SYMBOL_VISIBLE future_error
+      : public std::logic_error
+  {
+      system::error_code ec_;
+  public:
+      future_error(system::error_code ec)
+      : logic_error(ec.message()),
+        ec_(ec)
+      {
+      }
+
+      const system::error_code& code() const BOOST_NOEXCEPT
+      {
+        return ec_;
+      }
+      const char* what() const BOOST_THREAD_NOEXCEPT_OR_THROW
+      {
+        return code().message().c_str();
+      }
+
+  };
+
+    class BOOST_SYMBOL_VISIBLE future_uninitialized:
+        public future_error
     {
     public:
-        future_uninitialized():
-            std::logic_error("Future Uninitialized")
+        future_uninitialized() :
+          future_error(system::make_error_code(future_errc::no_state))
         {}
     };
-    class broken_promise:
-        public std::logic_error
+    class BOOST_SYMBOL_VISIBLE broken_promise:
+        public future_error
     {
     public:
         broken_promise():
-            std::logic_error("Broken promise")
+          future_error(system::make_error_code(future_errc::broken_promise))
         {}
     };
-    class future_already_retrieved:
-        public std::logic_error
+    class BOOST_SYMBOL_VISIBLE future_already_retrieved:
+        public future_error
     {
     public:
         future_already_retrieved():
-            std::logic_error("Future already retrieved")
+          future_error(system::make_error_code(future_errc::future_already_retrieved))
         {}
     };
-    class promise_already_satisfied:
-        public std::logic_error
+    class BOOST_SYMBOL_VISIBLE promise_already_satisfied:
+        public future_error
     {
     public:
         promise_already_satisfied():
-            std::logic_error("Promise already satisfied")
+          future_error(system::make_error_code(future_errc::promise_already_satisfied))
         {}
     };
 
-    class task_already_started:
-        public std::logic_error
+    class BOOST_SYMBOL_VISIBLE task_already_started:
+        public future_error
     {
     public:
         task_already_started():
-            std::logic_error("Task already started")
+        future_error(system::make_error_code(future_errc::promise_already_satisfied))
         {}
     };
 
-    class task_moved:
-        public std::logic_error
-    {
-    public:
-        task_moved():
-            std::logic_error("Task moved")
-        {}
-    };
+        class BOOST_SYMBOL_VISIBLE task_moved:
+            public future_error
+        {
+        public:
+            task_moved():
+              future_error(system::make_error_code(future_errc::no_state))
+            {}
+        };
+
+            class promise_moved:
+                public future_error
+            {
+            public:
+                  promise_moved():
+                  future_error(system::make_error_code(future_errc::no_state))
+                {}
+            };
 
     namespace future_state
     {
@@ -93,6 +214,7 @@ namespace boost
         {
             boost::exception_ptr exception;
             bool done;
+            bool thread_was_interrupted;
             boost::mutex mutex;
             boost::condition_variable waiters;
             typedef std::list<boost::condition_variable_any*> waiter_list;
@@ -100,7 +222,8 @@ namespace boost
             boost::function<void()> callback;
 
             future_object_base():
-                done(false)
+                done(false),
+                thread_was_interrupted(false)
             {}
             virtual ~future_object_base()
             {}
@@ -111,7 +234,7 @@ namespace boost
                 do_callback(lock);
                 return external_waiters.insert(external_waiters.end(),&cv);
             }
-            
+
             void remove_external_waiter(waiter_list::iterator it)
             {
                 boost::lock_guard<boost::mutex> lock(mutex);
@@ -132,7 +255,7 @@ namespace boost
             struct relocker
             {
                 boost::unique_lock<boost::mutex>& lock;
-                
+
                 relocker(boost::unique_lock<boost::mutex>& lock_):
                     lock(lock_)
                 {
@@ -155,7 +278,7 @@ namespace boost
                     local_callback();
                 }
             }
-            
+
 
             void wait(bool rethrow=true)
             {
@@ -165,6 +288,10 @@ namespace boost
                 {
                     waiters.wait(lock);
                 }
+                if(rethrow && thread_was_interrupted)
+                {
+                    throw boost::thread_interrupted();
+                }
                 if(rethrow && exception)
                 {
                     boost::rethrow_exception(exception);
@@ -185,7 +312,26 @@ namespace boost
                 }
                 return true;
             }
-            
+
+#ifdef BOOST_THREAD_USES_CHRONO
+
+            template <class Clock, class Duration>
+            future_status
+            wait_until(const chrono::time_point<Clock, Duration>& abs_time)
+            {
+              boost::unique_lock<boost::mutex> lock(mutex);
+              do_callback(lock);
+              while(!done)
+              {
+                  cv_status const st=waiters.wait_until(lock,abs_time);
+                  if(st==cv_status::timeout && !done)
+                  {
+                    return future_status::timeout;
+                  }
+              }
+              return future_status::ready;
+            }
+#endif
             void mark_exceptional_finish_internal(boost::exception_ptr const& e)
             {
                 exception=e;
@@ -196,16 +342,21 @@ namespace boost
                 boost::lock_guard<boost::mutex> lock(mutex);
                 mark_exceptional_finish_internal(boost::current_exception());
             }
-
+            void mark_interrupted_finish()
+            {
+                boost::lock_guard<boost::mutex> lock(mutex);
+                thread_was_interrupted=true;
+                mark_finished_internal();
+            }
             bool has_value()
             {
                 boost::lock_guard<boost::mutex> lock(mutex);
-                return done && !exception;
+                return done && !(exception || thread_was_interrupted);
             }
             bool has_exception()
             {
                 boost::lock_guard<boost::mutex> lock(mutex);
-                return done && exception;
+                return done && (exception || thread_was_interrupted);
             }
 
             template<typename F,typename U>
@@ -213,7 +364,7 @@ namespace boost
             {
                 callback=boost::bind(f,boost::ref(*u));
             }
-            
+
         private:
             future_object_base(future_object_base const&);
             future_object_base& operator=(future_object_base const&);
@@ -223,25 +374,31 @@ namespace boost
         struct future_traits
         {
             typedef boost::scoped_ptr<T> storage_type;
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
             typedef T const& source_reference_type;
             struct dummy;
-            typedef typename boost::mpl::if_<boost::is_fundamental<T>,dummy&,T&&>::type rvalue_source_type;
-            typedef typename boost::mpl::if_<boost::is_fundamental<T>,T,T&&>::type move_dest_type;
+            typedef typename boost::mpl::if_<boost::is_fundamental<T>,dummy&,BOOST_THREAD_RV_REF(T)>::type rvalue_source_type;
+            typedef typename boost::mpl::if_<boost::is_fundamental<T>,T,BOOST_THREAD_RV_REF(T)>::type move_dest_type;
+#elif defined BOOST_THREAD_USES_MOVE
+            typedef T& source_reference_type;
+            typedef typename boost::mpl::if_<boost::has_move_emulation_enabled<T>,BOOST_THREAD_RV_REF(T),T const&>::type rvalue_source_type;
+            typedef typename boost::mpl::if_<boost::has_move_emulation_enabled<T>,BOOST_THREAD_RV_REF(T),T>::type move_dest_type;
 #else
             typedef T& source_reference_type;
-            typedef typename boost::mpl::if_<boost::is_convertible<T&,boost::detail::thread_move_t<T> >,boost::detail::thread_move_t<T>,T const&>::type rvalue_source_type;
-            typedef typename boost::mpl::if_<boost::is_convertible<T&,boost::detail::thread_move_t<T> >,boost::detail::thread_move_t<T>,T>::type move_dest_type;
+            typedef typename boost::mpl::if_<boost::is_convertible<T&,BOOST_THREAD_RV_REF(T) >,BOOST_THREAD_RV_REF(T),T const&>::type rvalue_source_type;
+            typedef typename boost::mpl::if_<boost::is_convertible<T&,BOOST_THREAD_RV_REF(T) >,BOOST_THREAD_RV_REF(T),T>::type move_dest_type;
 #endif
 
+            typedef const T& shared_future_get_result_type;
+
             static void init(storage_type& storage,source_reference_type t)
             {
                 storage.reset(new T(t));
             }
-            
+
             static void init(storage_type& storage,rvalue_source_type t)
             {
-                storage.reset(new T(static_cast<rvalue_source_type>(t)));
+              storage.reset(new T(static_cast<rvalue_source_type>(t)));
             }
 
             static void cleanup(storage_type& storage)
@@ -249,7 +406,7 @@ namespace boost
                 storage.reset();
             }
         };
-        
+
         template<typename T>
         struct future_traits<T&>
         {
@@ -258,6 +415,7 @@ namespace boost
             struct rvalue_source_type
             {};
             typedef T& move_dest_type;
+            typedef T& shared_future_get_result_type;
 
             static void init(storage_type& storage,T& t)
             {
@@ -275,6 +433,7 @@ namespace boost
         {
             typedef bool storage_type;
             typedef void move_dest_type;
+            typedef void shared_future_get_result_type;
 
             static void init(storage_type& storage)
             {
@@ -296,7 +455,8 @@ namespace boost
             typedef typename future_traits<T>::source_reference_type source_reference_type;
             typedef typename future_traits<T>::rvalue_source_type rvalue_source_type;
             typedef typename future_traits<T>::move_dest_type move_dest_type;
-            
+            typedef typename future_traits<T>::shared_future_get_result_type shared_future_get_result_type;
+
             storage_type result;
 
             future_object():
@@ -308,6 +468,7 @@ namespace boost
                 future_traits<T>::init(result,result_);
                 mark_finished_internal();
             }
+
             void mark_finished_with_result_internal(rvalue_source_type result_)
             {
                 future_traits<T>::init(result,static_cast<rvalue_source_type>(result_));
@@ -319,10 +480,11 @@ namespace boost
                 boost::lock_guard<boost::mutex> lock(mutex);
                 mark_finished_with_result_internal(result_);
             }
+
             void mark_finished_with_result(rvalue_source_type result_)
             {
                 boost::lock_guard<boost::mutex> lock(mutex);
-                mark_finished_with_result_internal(result_);
+                mark_finished_with_result_internal(static_cast<rvalue_source_type>(result_));
             }
 
             move_dest_type get()
@@ -331,6 +493,12 @@ namespace boost
                 return static_cast<move_dest_type>(*result);
             }
 
+            shared_future_get_result_type get_sh()
+            {
+                wait();
+                return static_cast<shared_future_get_result_type>(*result);
+            }
+
             future_state::state get_state()
             {
                 boost::lock_guard<boost::mutex> guard(mutex);
@@ -353,6 +521,8 @@ namespace boost
         struct future_object<void>:
             detail::future_object_base
         {
+          typedef void shared_future_get_result_type;
+
             future_object()
             {}
 
@@ -371,7 +541,10 @@ namespace boost
             {
                 wait();
             }
-            
+            void get_sh()
+            {
+                wait();
+            }
             future_state::state get_state()
             {
                 boost::lock_guard<boost::mutex> guard(mutex);
@@ -384,74 +557,93 @@ namespace boost
                     return future_state::ready;
                 }
             }
-
         private:
             future_object(future_object const&);
             future_object& operator=(future_object const&);
         };
 
+//        template<typename T, typename Allocator>
+//        struct future_object_alloc: public future_object<T>
+//        {
+//          typedef future_object<T> base;
+//          Allocator alloc_;
+//
+//        public:
+//          explicit future_object_alloc(const Allocator& a)
+//              : alloc_(a) {}
+//
+//        };
         class future_waiter
         {
             struct registered_waiter;
-            typedef std::vector<registered_waiter>::size_type count_type;
-            
+            typedef std::vector<int>::size_type count_type;
+
             struct registered_waiter
             {
-                boost::shared_ptr<detail::future_object_base> future;
+                boost::shared_ptr<detail::future_object_base> future_;
                 detail::future_object_base::waiter_list::iterator wait_iterator;
                 count_type index;
 
-                registered_waiter(boost::shared_ptr<detail::future_object_base> const& future_,
+                registered_waiter(boost::shared_ptr<detail::future_object_base> const& a_future,
                                   detail::future_object_base::waiter_list::iterator wait_iterator_,
                                   count_type index_):
-                    future(future_),wait_iterator(wait_iterator_),index(index_)
+                    future_(a_future),wait_iterator(wait_iterator_),index(index_)
                 {}
 
             };
-            
+
             struct all_futures_lock
             {
-                count_type count;
+#ifdef _MANAGED
+                typedef std::ptrdiff_t count_type_portable;
+#else
+                typedef count_type count_type_portable;
+#endif
+                count_type_portable count;
                 boost::scoped_array<boost::unique_lock<boost::mutex> > locks;
-                
+
                 all_futures_lock(std::vector<registered_waiter>& futures):
                     count(futures.size()),locks(new boost::unique_lock<boost::mutex>[count])
                 {
-                    for(count_type i=0;i<count;++i)
+                    for(count_type_portable i=0;i<count;++i)
                     {
-                        locks[i]=boost::unique_lock<boost::mutex>(futures[i].future->mutex);
+#if defined __DECCXX || defined __SUNPRO_CC || defined __hpux
+                        locks[i]=boost::unique_lock<boost::mutex>(futures[i].future_->mutex).move();
+#else
+                        locks[i]=boost::unique_lock<boost::mutex>(futures[i].future_->mutex);
+#endif
                     }
                 }
-                
+
                 void lock()
                 {
                     boost::lock(locks.get(),locks.get()+count);
                 }
-                
+
                 void unlock()
                 {
-                    for(count_type i=0;i<count;++i)
+                    for(count_type_portable i=0;i<count;++i)
                     {
                         locks[i].unlock();
                     }
                 }
             };
-            
+
             boost::condition_variable_any cv;
             std::vector<registered_waiter> futures;
             count_type future_count;
-            
+
         public:
             future_waiter():
                 future_count(0)
             {}
-            
+
             template<typename F>
             void add(F& f)
             {
-                if(f.future)
+                if(f.future_)
                 {
-                    futures.push_back(registered_waiter(f.future,f.future->register_external_waiter(cv),future_count));
+                    futures.push_back(registered_waiter(f.future_,f.future_->register_external_waiter(cv),future_count));
                 }
                 ++future_count;
             }
@@ -463,7 +655,7 @@ namespace boost
                 {
                     for(count_type i=0;i<futures.size();++i)
                     {
-                        if(futures[i].future->done)
+                        if(futures[i].future_->done)
                         {
                             return futures[i].index;
                         }
@@ -471,21 +663,21 @@ namespace boost
                     cv.wait(lk);
                 }
             }
-            
+
             ~future_waiter()
             {
                 for(count_type i=0;i<futures.size();++i)
                 {
-                    futures[i].future->remove_external_waiter(futures[i].wait_iterator);
+                    futures[i].future_->remove_external_waiter(futures[i].wait_iterator);
                 }
             }
-            
+
         };
-        
+
     }
 
     template <typename R>
-    class unique_future;
+    class BOOST_THREAD_FUTURE;
 
     template <typename R>
     class shared_future;
@@ -495,13 +687,13 @@ namespace boost
     {
         BOOST_STATIC_CONSTANT(bool, value=false);
     };
-    
+
     template<typename T>
-    struct is_future_type<unique_future<T> >
+    struct is_future_type<BOOST_THREAD_FUTURE<T> >
     {
         BOOST_STATIC_CONSTANT(bool, value=true);
     };
-    
+
     template<typename T>
     struct is_future_type<shared_future<T> >
     {
@@ -531,7 +723,7 @@ namespace boost
         f2.wait();
         f3.wait();
     }
-    
+
     template<typename F1,typename F2,typename F3,typename F4>
     void wait_for_all(F1& f1,F2& f2,F3& f3,F4& f4)
     {
@@ -556,7 +748,7 @@ namespace boost
     {
         if(begin==end)
             return end;
-        
+
         detail::future_waiter waiter;
         for(Iterator current=begin;current!=end;++current)
         {
@@ -583,7 +775,7 @@ namespace boost
         waiter.add(f3);
         return waiter.wait();
     }
-    
+
     template<typename F1,typename F2,typename F3,typename F4>
     unsigned wait_for_any(F1& f1,F2& f2,F3& f3,F4& f4)
     {
@@ -606,7 +798,7 @@ namespace boost
         waiter.add(f5);
         return waiter.wait();
     }
-    
+
     template <typename R>
     class promise;
 
@@ -614,14 +806,13 @@ namespace boost
     class packaged_task;
 
     template <typename R>
-    class unique_future
+    class BOOST_THREAD_FUTURE
     {
-        unique_future(unique_future & rhs);// = delete;
-        unique_future& operator=(unique_future& rhs);// = delete;
+    private:
 
         typedef boost::shared_ptr<detail::future_object<R> > future_ptr;
-        
-        future_ptr future;
+
+        future_ptr future_;
 
         friend class shared_future<R>;
         friend class promise<R>;
@@ -630,139 +821,151 @@ namespace boost
 
         typedef typename detail::future_traits<R>::move_dest_type move_dest_type;
 
-        unique_future(future_ptr future_):
-            future(future_)
+        BOOST_THREAD_FUTURE(future_ptr a_future):
+            future_(a_future)
         {}
 
     public:
+        BOOST_THREAD_MOVABLE_ONLY(BOOST_THREAD_FUTURE)
         typedef future_state::state state;
 
-        unique_future()
+        BOOST_THREAD_FUTURE()
         {}
-       
-        ~unique_future()
+
+        ~BOOST_THREAD_FUTURE()
         {}
 
-#ifndef BOOST_NO_RVALUE_REFERENCES
-        unique_future(unique_future && other)
-        {
-            future.swap(other.future);
-        }
-        unique_future& operator=(unique_future && other)
-        {
-            future=other.future;
-            other.future.reset();
-            return *this;
-        }
-#else
-        unique_future(boost::detail::thread_move_t<unique_future> other):
-            future(other->future)
+        BOOST_THREAD_FUTURE(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE) other) BOOST_NOEXCEPT:
+            future_(BOOST_THREAD_RV(other).future_)
         {
-            other->future.reset();
+            BOOST_THREAD_RV(other).future_.reset();
         }
 
-        unique_future& operator=(boost::detail::thread_move_t<unique_future> other)
+        BOOST_THREAD_FUTURE& operator=(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE) other) BOOST_NOEXCEPT
         {
-            future=other->future;
-            other->future.reset();
+            future_=BOOST_THREAD_RV(other).future_;
+            BOOST_THREAD_RV(other).future_.reset();
             return *this;
         }
 
-        operator boost::detail::thread_move_t<unique_future>()
+        shared_future<R> share()
         {
-            return boost::detail::thread_move_t<unique_future>(*this);
+          return shared_future<R>(::boost::move(*this));
         }
-#endif
 
-        void swap(unique_future& other)
+        void swap(BOOST_THREAD_FUTURE& other)
         {
-            future.swap(other.future);
+            future_.swap(other.future_);
         }
 
         // retrieving the value
         move_dest_type get()
         {
-            if(!future)
+            if(!future_)
             {
                 boost::throw_exception(future_uninitialized());
             }
 
-            return future->get();
+            return future_->get();
         }
-        
+
         // functions to check state, and wait for ready
-        state get_state() const
+        state get_state() const BOOST_NOEXCEPT
         {
-            if(!future)
+            if(!future_)
             {
                 return future_state::uninitialized;
             }
-            return future->get_state();
+            return future_->get_state();
         }
-        
 
-        bool is_ready() const
+        bool is_ready() const BOOST_NOEXCEPT
         {
             return get_state()==future_state::ready;
         }
-        
-        bool has_exception() const
+
+        bool has_exception() const BOOST_NOEXCEPT
         {
-            return future && future->has_exception();
+            return future_ && future_->has_exception();
         }
-        
-        bool has_value() const
+
+        bool has_value() const BOOST_NOEXCEPT
         {
-            return future && future->has_value();
+            return future_ && future_->has_value();
         }
-        
+
+        bool valid() const BOOST_NOEXCEPT
+        {
+            return future_ != 0;
+        }
+
+
         void wait() const
         {
-            if(!future)
+            if(!future_)
             {
                 boost::throw_exception(future_uninitialized());
             }
-            future->wait(false);
+            future_->wait(false);
         }
-        
+
         template<typename Duration>
         bool timed_wait(Duration const& rel_time) const
         {
             return timed_wait_until(boost::get_system_time()+rel_time);
         }
-        
+
         bool timed_wait_until(boost::system_time const& abs_time) const
         {
-            if(!future)
+            if(!future_)
             {
                 boost::throw_exception(future_uninitialized());
             }
-            return future->timed_wait_until(abs_time);
+            return future_->timed_wait_until(abs_time);
         }
-        
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Rep, class Period>
+        future_status
+        wait_for(const chrono::duration<Rep, Period>& rel_time) const
+        {
+          return wait_until(chrono::steady_clock::now() + rel_time);
+
+        }
+        template <class Clock, class Duration>
+        future_status
+        wait_until(const chrono::time_point<Clock, Duration>& abs_time) const
+        {
+          if(!future_)
+          {
+              boost::throw_exception(future_uninitialized());
+          }
+          return future_->wait_until(abs_time);
+        }
+#endif
     };
 
+    BOOST_THREAD_DCL_MOVABLE_BEG(T) BOOST_THREAD_FUTURE<T> BOOST_THREAD_DCL_MOVABLE_END
+
     template <typename R>
     class shared_future
     {
         typedef boost::shared_ptr<detail::future_object<R> > future_ptr;
-        
-        future_ptr future;
 
-//         shared_future(const unique_future<R>& other);
-//         shared_future& operator=(const unique_future<R>& other);
+        future_ptr future_;
 
         friend class detail::future_waiter;
         friend class promise<R>;
         friend class packaged_task<R>;
-        
-        shared_future(future_ptr future_):
-            future(future_)
+
+        shared_future(future_ptr a_future):
+            future_(a_future)
         {}
 
     public:
+        BOOST_THREAD_MOVABLE(shared_future)
+
         shared_future(shared_future const& other):
-            future(other.future)
+            future_(other.future_)
         {}
 
         typedef future_state::state state;
@@ -775,388 +978,405 @@ namespace boost
 
         shared_future& operator=(shared_future const& other)
         {
-            future=other.future;
+            future_=other.future_;
             return *this;
         }
-#ifndef BOOST_NO_RVALUE_REFERENCES
-        shared_future(shared_future && other)
+        shared_future(BOOST_THREAD_RV_REF(shared_future) other) BOOST_NOEXCEPT :
+            future_(BOOST_THREAD_RV(other).future_)
         {
-            future.swap(other.future);
+            BOOST_THREAD_RV(other).future_.reset();
         }
-        shared_future(unique_future<R> && other)
+        shared_future(BOOST_THREAD_RV_REF_BEG BOOST_THREAD_FUTURE<R> BOOST_THREAD_RV_REF_END other) BOOST_NOEXCEPT :
+            future_(BOOST_THREAD_RV(other).future_)
         {
-            future.swap(other.future);
+            BOOST_THREAD_RV(other).future_.reset();
         }
-        shared_future& operator=(shared_future && other)
+        shared_future& operator=(BOOST_THREAD_RV_REF(shared_future) other) BOOST_NOEXCEPT
         {
-            future.swap(other.future);
-            other.future.reset();
+            future_.swap(BOOST_THREAD_RV(other).future_);
+            BOOST_THREAD_RV(other).future_.reset();
             return *this;
         }
-        shared_future& operator=(unique_future<R> && other)
+        shared_future& operator=(BOOST_THREAD_RV_REF_BEG BOOST_THREAD_FUTURE<R> BOOST_THREAD_RV_REF_END other) BOOST_NOEXCEPT
         {
-            future.swap(other.future);
-            other.future.reset();
+            future_.swap(BOOST_THREAD_RV(other).future_);
+            BOOST_THREAD_RV(other).future_.reset();
             return *this;
         }
-#else            
-        shared_future(boost::detail::thread_move_t<shared_future> other):
-            future(other->future)
-        {
-            other->future.reset();
-        }
-//         shared_future(const unique_future<R> &) = delete;
-        shared_future(boost::detail::thread_move_t<unique_future<R> > other):
-            future(other->future)
-        {
-            other->future.reset();
-        }
-        shared_future& operator=(boost::detail::thread_move_t<shared_future> other)
-        {
-            future.swap(other->future);
-            other->future.reset();
-            return *this;
-        }
-        shared_future& operator=(boost::detail::thread_move_t<unique_future<R> > other)
-        {
-            future.swap(other->future);
-            other->future.reset();
-            return *this;
-        }
-
-        operator boost::detail::thread_move_t<shared_future>()
-        {
-            return boost::detail::thread_move_t<shared_future>(*this);
-        }
-
-#endif
 
-        void swap(shared_future& other)
+        void swap(shared_future& other) BOOST_NOEXCEPT
         {
-            future.swap(other.future);
+            future_.swap(other.future_);
         }
 
         // retrieving the value
-        R get()
+        typename detail::future_object<R>::shared_future_get_result_type get()
         {
-            if(!future)
+            if(!future_)
             {
                 boost::throw_exception(future_uninitialized());
             }
 
-            return future->get();
+            return future_->get_sh();
         }
-        
+
         // functions to check state, and wait for ready
-        state get_state() const
+        state get_state() const  BOOST_NOEXCEPT
         {
-            if(!future)
+            if(!future_)
             {
                 return future_state::uninitialized;
             }
-            return future->get_state();
+            return future_->get_state();
         }
-        
 
-        bool is_ready() const
+        bool valid() const  BOOST_NOEXCEPT
+        {
+            return future_ != 0;
+        }
+
+        bool is_ready() const  BOOST_NOEXCEPT
         {
             return get_state()==future_state::ready;
         }
-        
-        bool has_exception() const
+
+        bool has_exception() const BOOST_NOEXCEPT
         {
-            return future && future->has_exception();
+            return future_ && future_->has_exception();
         }
-        
-        bool has_value() const
+
+        bool has_value() const BOOST_NOEXCEPT
         {
-            return future && future->has_value();
+            return future_ && future_->has_value();
         }
 
         void wait() const
         {
-            if(!future)
+            if(!future_)
             {
                 boost::throw_exception(future_uninitialized());
             }
-            future->wait(false);
+            future_->wait(false);
         }
-        
+
         template<typename Duration>
         bool timed_wait(Duration const& rel_time) const
         {
             return timed_wait_until(boost::get_system_time()+rel_time);
         }
-        
+
         bool timed_wait_until(boost::system_time const& abs_time) const
         {
-            if(!future)
+            if(!future_)
             {
                 boost::throw_exception(future_uninitialized());
             }
-            return future->timed_wait_until(abs_time);
+            return future_->timed_wait_until(abs_time);
         }
-        
+#ifdef BOOST_THREAD_USES_CHRONO
+
+        template <class Rep, class Period>
+        future_status
+        wait_for(const chrono::duration<Rep, Period>& rel_time) const
+        {
+          return wait_until(chrono::steady_clock::now() + rel_time);
+
+        }
+        template <class Clock, class Duration>
+        future_status
+        wait_until(const chrono::time_point<Clock, Duration>& abs_time) const
+        {
+          if(!future_)
+          {
+              boost::throw_exception(future_uninitialized());
+          }
+          return future_->wait_until(abs_time);
+        }
+#endif
     };
 
+    BOOST_THREAD_DCL_MOVABLE_BEG(T) shared_future<T> BOOST_THREAD_DCL_MOVABLE_END
+
     template <typename R>
     class promise
     {
         typedef boost::shared_ptr<detail::future_object<R> > future_ptr;
-        
-        future_ptr future;
+
+        future_ptr future_;
         bool future_obtained;
-        
-        promise(promise & rhs);// = delete;
-        promise & operator=(promise & rhs);// = delete;
 
         void lazy_init()
         {
-            if(!future)
+#if defined BOOST_THREAD_PROMISE_LAZY
+            if(!atomic_load(&future_))
             {
-                future_obtained=false;
-                future.reset(new detail::future_object<R>);
+                future_ptr blank;
+                atomic_compare_exchange(&future_,&blank,future_ptr(new detail::future_object<R>));
             }
+#endif
         }
-        
+
     public:
-//         template <class Allocator> explicit promise(Allocator a);
+        BOOST_THREAD_MOVABLE_ONLY(promise)
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+        template <class Allocator>
+        promise(boost::allocator_arg_t, Allocator a)
+        {
+          typedef typename Allocator::template rebind<detail::future_object<R> >::other A2;
+          A2 a2(a);
+          typedef thread_detail::allocator_destructor<A2> D;
 
+          future_ = future_ptr(::new(a2.allocate(1)) detail::future_object<R>(), D(a2, 1) );
+          future_obtained = false;
+        }
+#endif
         promise():
-            future(),future_obtained(false)
+#if defined BOOST_THREAD_PROMISE_LAZY
+            future_(),
+#else
+            future_(new detail::future_object<R>()),
+#endif
+            future_obtained(false)
         {}
-        
+
         ~promise()
         {
-            if(future)
+            if(future_)
             {
-                boost::lock_guard<boost::mutex> lock(future->mutex);
+                boost::lock_guard<boost::mutex> lock(future_->mutex);
 
-                if(!future->done)
+                if(!future_->done)
                 {
-                    future->mark_exceptional_finish_internal(boost::copy_exception(broken_promise()));
+                    future_->mark_exceptional_finish_internal(boost::copy_exception(broken_promise()));
                 }
             }
         }
 
         // Assignment
-#ifndef BOOST_NO_RVALUE_REFERENCES
-        promise(promise && rhs):
-            future_obtained(rhs.future_obtained)
+        promise(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT :
+            future_(BOOST_THREAD_RV(rhs).future_),future_obtained(BOOST_THREAD_RV(rhs).future_obtained)
         {
-            future.swap(rhs.future);
+            BOOST_THREAD_RV(rhs).future_.reset();
+            BOOST_THREAD_RV(rhs).future_obtained=false;
         }
-        promise & operator=(promise&& rhs)
+        promise & operator=(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT
         {
-            future.swap(rhs.future);
-            future_obtained=rhs.future_obtained;
-            rhs.future.reset();
-            return *this;
-        }
-#else
-        promise(boost::detail::thread_move_t<promise> rhs):
-            future(rhs->future),future_obtained(rhs->future_obtained)
-        {
-            rhs->future.reset();
-        }
-        promise & operator=(boost::detail::thread_move_t<promise> rhs)
-        {
-            future=rhs->future;
-            future_obtained=rhs->future_obtained;
-            rhs->future.reset();
+            future_=BOOST_THREAD_RV(rhs).future_;
+            future_obtained=BOOST_THREAD_RV(rhs).future_obtained;
+            BOOST_THREAD_RV(rhs).future_.reset();
+            BOOST_THREAD_RV(rhs).future_obtained=false;
             return *this;
         }
 
-        operator boost::detail::thread_move_t<promise>()
-        {
-            return boost::detail::thread_move_t<promise>(*this);
-        }
-#endif   
-        
         void swap(promise& other)
         {
-            future.swap(other.future);
+            future_.swap(other.future_);
             std::swap(future_obtained,other.future_obtained);
         }
 
         // Result retrieval
-        unique_future<R> get_future()
+        BOOST_THREAD_FUTURE<R> get_future()
         {
             lazy_init();
-            if(future_obtained)
+            if (future_.get()==0)
+            {
+                boost::throw_exception(promise_moved());
+            }
+            if (future_obtained)
             {
                 boost::throw_exception(future_already_retrieved());
             }
             future_obtained=true;
-            return unique_future<R>(future);
+            return BOOST_THREAD_FUTURE<R>(future_);
         }
 
         void set_value(typename detail::future_traits<R>::source_reference_type r)
         {
             lazy_init();
-            boost::lock_guard<boost::mutex> lock(future->mutex);
-            if(future->done)
+            boost::lock_guard<boost::mutex> lock(future_->mutex);
+            if(future_->done)
             {
                 boost::throw_exception(promise_already_satisfied());
             }
-            future->mark_finished_with_result_internal(r);
+            future_->mark_finished_with_result_internal(r);
         }
 
 //         void set_value(R && r);
         void set_value(typename detail::future_traits<R>::rvalue_source_type r)
         {
             lazy_init();
-            boost::lock_guard<boost::mutex> lock(future->mutex);
-            if(future->done)
+            boost::lock_guard<boost::mutex> lock(future_->mutex);
+            if(future_->done)
             {
                 boost::throw_exception(promise_already_satisfied());
             }
-            future->mark_finished_with_result_internal(static_cast<typename detail::future_traits<R>::rvalue_source_type>(r));
+            future_->mark_finished_with_result_internal(static_cast<typename detail::future_traits<R>::rvalue_source_type>(r));
         }
 
         void set_exception(boost::exception_ptr p)
         {
             lazy_init();
-            boost::lock_guard<boost::mutex> lock(future->mutex);
-            if(future->done)
+            boost::lock_guard<boost::mutex> lock(future_->mutex);
+            if(future_->done)
             {
                 boost::throw_exception(promise_already_satisfied());
             }
-            future->mark_exceptional_finish_internal(p);
+            future_->mark_exceptional_finish_internal(p);
         }
 
+        // setting the result with deferred notification
+        //void set_value_at_thread_exit(const R& r); // NOT YET IMPLEMENTED
+        //void set_value_at_thread_exit(see below); // NOT YET IMPLEMENTED
+        //void set_exception_at_thread_exit(exception_ptr p); // NOT YET IMPLEMENTED
+
         template<typename F>
         void set_wait_callback(F f)
         {
             lazy_init();
-            future->set_wait_callback(f,this);
+            future_->set_wait_callback(f,this);
         }
-        
+
     };
 
     template <>
     class promise<void>
     {
         typedef boost::shared_ptr<detail::future_object<void> > future_ptr;
-        
-        future_ptr future;
+
+        future_ptr future_;
         bool future_obtained;
-        
-        promise(promise & rhs);// = delete;
-        promise & operator=(promise & rhs);// = delete;
 
         void lazy_init()
         {
-            if(!future)
+#if defined BOOST_THREAD_PROMISE_LAZY
+            if(!atomic_load(&future_))
             {
-                future_obtained=false;
-                future.reset(new detail::future_object<void>);
+                future_ptr blank;
+                atomic_compare_exchange(&future_,&blank,future_ptr(new detail::future_object<void>));
             }
+#endif
         }
     public:
-//         template <class Allocator> explicit promise(Allocator a);
+        BOOST_THREAD_MOVABLE_ONLY(promise)
+
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+        template <class Allocator>
+        promise(boost::allocator_arg_t, Allocator a)
+        {
+          typedef typename Allocator::template rebind<detail::future_object<void> >::other A2;
+          A2 a2(a);
+          typedef thread_detail::allocator_destructor<A2> D;
 
+          future_ = future_ptr(::new(a2.allocate(1)) detail::future_object<void>(), D(a2, 1) );
+          future_obtained = false;
+        }
+#endif
         promise():
-            future(),future_obtained(false)
+#if defined BOOST_THREAD_PROMISE_LAZY
+            future_(),
+#else
+            future_(new detail::future_object<void>),
+#endif
+            future_obtained(false)
         {}
-        
+
         ~promise()
         {
-            if(future)
+            if(future_)
             {
-                boost::lock_guard<boost::mutex> lock(future->mutex);
+                boost::lock_guard<boost::mutex> lock(future_->mutex);
 
-                if(!future->done)
+                if(!future_->done)
                 {
-                    future->mark_exceptional_finish_internal(boost::copy_exception(broken_promise()));
+                    future_->mark_exceptional_finish_internal(boost::copy_exception(broken_promise()));
                 }
             }
         }
 
         // Assignment
-#ifndef BOOST_NO_RVALUE_REFERENCES
-        promise(promise && rhs):
-            future_obtained(rhs.future_obtained)
-        {
-            future.swap(rhs.future);
-        }
-        promise & operator=(promise&& rhs)
+        promise(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT :
+            future_(BOOST_THREAD_RV(rhs).future_),future_obtained(BOOST_THREAD_RV(rhs).future_obtained)
         {
-            future.swap(rhs.future);
-            future_obtained=rhs.future_obtained;
-            rhs.future.reset();
-            return *this;
-        }
-#else
-        promise(boost::detail::thread_move_t<promise> rhs):
-            future(rhs->future),future_obtained(rhs->future_obtained)
-        {
-            rhs->future.reset();
+          // we need to release the future as shared_ptr doesn't implements move semantics
+            BOOST_THREAD_RV(rhs).future_.reset();
+            BOOST_THREAD_RV(rhs).future_obtained=false;
         }
-        promise & operator=(boost::detail::thread_move_t<promise> rhs)
+
+        promise & operator=(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT
         {
-            future=rhs->future;
-            future_obtained=rhs->future_obtained;
-            rhs->future.reset();
+            future_=BOOST_THREAD_RV(rhs).future_;
+            future_obtained=BOOST_THREAD_RV(rhs).future_obtained;
+            BOOST_THREAD_RV(rhs).future_.reset();
+            BOOST_THREAD_RV(rhs).future_obtained=false;
             return *this;
         }
 
-        operator boost::detail::thread_move_t<promise>()
-        {
-            return boost::detail::thread_move_t<promise>(*this);
-        }
-#endif
-        
         void swap(promise& other)
         {
-            future.swap(other.future);
+            future_.swap(other.future_);
             std::swap(future_obtained,other.future_obtained);
         }
 
         // Result retrieval
-        unique_future<void> get_future()
+        BOOST_THREAD_FUTURE<void> get_future()
         {
             lazy_init();
-            
+
+            if (future_.get()==0)
+            {
+                boost::throw_exception(promise_moved());
+            }
             if(future_obtained)
             {
                 boost::throw_exception(future_already_retrieved());
             }
             future_obtained=true;
-            return unique_future<void>(future);
+            return BOOST_THREAD_FUTURE<void>(future_);
         }
 
         void set_value()
         {
             lazy_init();
-            boost::lock_guard<boost::mutex> lock(future->mutex);
-            if(future->done)
+            boost::lock_guard<boost::mutex> lock(future_->mutex);
+            if(future_->done)
             {
                 boost::throw_exception(promise_already_satisfied());
             }
-            future->mark_finished_with_result_internal();
+            future_->mark_finished_with_result_internal();
         }
 
         void set_exception(boost::exception_ptr p)
         {
             lazy_init();
-            boost::lock_guard<boost::mutex> lock(future->mutex);
-            if(future->done)
+            boost::lock_guard<boost::mutex> lock(future_->mutex);
+            if(future_->done)
             {
                 boost::throw_exception(promise_already_satisfied());
             }
-            future->mark_exceptional_finish_internal(p);
+            future_->mark_exceptional_finish_internal(p);
         }
 
         template<typename F>
         void set_wait_callback(F f)
         {
             lazy_init();
-            future->set_wait_callback(f,this);
+            future_->set_wait_callback(f,this);
         }
-        
+
     };
 
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+    namespace container
+    {
+      template <class R, class Alloc>
+      struct uses_allocator<promise<R> , Alloc> : true_type
+      {
+      };
+    }
+#endif
+
+    BOOST_THREAD_DCL_MOVABLE_BEG(T) promise<T> BOOST_THREAD_DCL_MOVABLE_END
+
     namespace detail
     {
         template<typename R>
@@ -1169,6 +1389,10 @@ namespace boost
                 started(false)
             {}
 
+            void reset()
+            {
+              started=false;
+            }
             void run()
             {
                 {
@@ -1191,30 +1415,44 @@ namespace boost
                     this->mark_exceptional_finish_internal(boost::copy_exception(boost::broken_promise()));
                 }
             }
-            
-            
+
+
             virtual void do_run()=0;
         };
-        
-        
+
+
+
+
         template<typename R,typename F>
         struct task_object:
             task_base<R>
         {
+        private:
+          task_object(task_object&);
+        public:
             F f;
             task_object(F const& f_):
                 f(f_)
             {}
-            task_object(boost::detail::thread_move_t<F> f_):
-                f(f_)
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+            task_object(BOOST_THREAD_RV_REF(F) f_):
+              f(boost::forward<F>(f_))
+            {}
+#else
+            task_object(BOOST_THREAD_RV_REF(F) f_):
+                f(boost::move(f_))
             {}
-            
+#endif
             void do_run()
             {
                 try
                 {
                     this->mark_finished_with_result(f());
                 }
+                catch(thread_interrupted& )
+                {
+                    this->mark_interrupted_finish();
+                }
                 catch(...)
                 {
                     this->mark_exceptional_finish();
@@ -1222,18 +1460,55 @@ namespace boost
             }
         };
 
+            template<typename R>
+            struct task_object<R,R (*)()>:
+                task_base<R>
+            {
+            private:
+              task_object(task_object&);
+            public:
+                R (*f)();
+                task_object(R (*f_)()):
+                    f(f_)
+                {}
+                void do_run()
+                {
+                    try
+                    {
+                        this->mark_finished_with_result(f());
+                    }
+                    catch(thread_interrupted& )
+                    {
+                        this->mark_interrupted_finish();
+                    }
+                    catch(...)
+                    {
+                        this->mark_exceptional_finish();
+                    }
+                }
+            };
+
         template<typename F>
         struct task_object<void,F>:
             task_base<void>
         {
+        private:
+          task_object(task_object&);
+        public:
             F f;
             task_object(F const& f_):
                 f(f_)
             {}
-            task_object(boost::detail::thread_move_t<F> f_):
-                f(f_)
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+            task_object(BOOST_THREAD_RV_REF(F) f_):
+              f(boost::forward<F>(f_))
             {}
-            
+#else
+            task_object(BOOST_THREAD_RV_REF(F) f_):
+                f(boost::move(f_))
+            {}
+#endif
+
             void do_run()
             {
                 try
@@ -1241,6 +1516,39 @@ namespace boost
                     f();
                     this->mark_finished_with_result();
                 }
+                catch(thread_interrupted& )
+                {
+                    this->mark_interrupted_finish();
+                }
+                catch(...)
+                {
+                    this->mark_exceptional_finish();
+                }
+            }
+        };
+
+        template<>
+        struct task_object<void,void (*)()>:
+            task_base<void>
+        {
+        private:
+          task_object(task_object&);
+        public:
+            void (*f)();
+            task_object(void (*f_)()):
+                f(f_)
+            {}
+            void do_run()
+            {
+                try
+                {
+                  f();
+                  this->mark_finished_with_result();
+                }
+                catch(thread_interrupted& )
+                {
+                    this->mark_interrupted_finish();
+                }
                 catch(...)
                 {
                     this->mark_exceptional_finish();
@@ -1249,41 +1557,92 @@ namespace boost
         };
 
     }
-    
 
     template<typename R>
     class packaged_task
     {
+        typedef boost::shared_ptr<detail::task_base<R> > task_ptr;
         boost::shared_ptr<detail::task_base<R> > task;
         bool future_obtained;
 
-        packaged_task(packaged_task&);// = delete;
-        packaged_task& operator=(packaged_task&);// = delete;
-        
     public:
+        typedef R result_type;
+        BOOST_THREAD_MOVABLE_ONLY(packaged_task)
+
         packaged_task():
             future_obtained(false)
         {}
-        
+
         // construction and destruction
-        template <class F>
-        explicit packaged_task(F const& f):
-            task(new detail::task_object<R,F>(f)),future_obtained(false)
-        {}
+
         explicit packaged_task(R(*f)()):
             task(new detail::task_object<R,R(*)()>(f)),future_obtained(false)
         {}
-        
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+        template <class F>
+        explicit packaged_task(BOOST_THREAD_RV_REF(F) f):
+            task(new detail::task_object<R,
+                typename remove_cv<typename remove_reference<F>::type>::type
+                >(boost::forward<F>(f))),future_obtained(false)
+        {}
+#else
         template <class F>
-        explicit packaged_task(boost::detail::thread_move_t<F> f):
+        explicit packaged_task(F const& f):
             task(new detail::task_object<R,F>(f)),future_obtained(false)
         {}
+        template <class F>
+        explicit packaged_task(BOOST_THREAD_RV_REF(F) f):
+            task(new detail::task_object<R,F>(boost::move(f))),future_obtained(false)
+        {}
+#endif
 
-//         template <class F, class Allocator>
-//         explicit packaged_task(F const& f, Allocator a);
-//         template <class F, class Allocator>
-//         explicit packaged_task(F&& f, Allocator a);
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+        template <class Allocator>
+        packaged_task(boost::allocator_arg_t, Allocator a, R(*f)())
+        {
+          typedef R(*FR)();
+          typedef typename Allocator::template rebind<detail::task_object<R,FR> >::other A2;
+          A2 a2(a);
+          typedef thread_detail::allocator_destructor<A2> D;
 
+          task = task_ptr(::new(a2.allocate(1)) detail::task_object<R,FR>(f), D(a2, 1) );
+          future_obtained = false;
+        }
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+        template <class F, class Allocator>
+        packaged_task(boost::allocator_arg_t, Allocator a, BOOST_THREAD_RV_REF(F) f)
+        {
+          typedef typename remove_cv<typename remove_reference<F>::type>::type FR;
+          typedef typename Allocator::template rebind<detail::task_object<R,FR> >::other A2;
+          A2 a2(a);
+          typedef thread_detail::allocator_destructor<A2> D;
+
+          task = task_ptr(::new(a2.allocate(1)) detail::task_object<R,FR>(boost::forward<F>(f)), D(a2, 1) );
+          future_obtained = false;
+        }
+#else
+        template <class F, class Allocator>
+        packaged_task(boost::allocator_arg_t, Allocator a, const F& f)
+        {
+          typedef typename Allocator::template rebind<detail::task_object<R,F> >::other A2;
+          A2 a2(a);
+          typedef thread_detail::allocator_destructor<A2> D;
+
+          task = task_ptr(::new(a2.allocate(1)) detail::task_object<R,F>(f), D(a2, 1) );
+          future_obtained = false;
+        }
+        template <class F, class Allocator>
+        packaged_task(boost::allocator_arg_t, Allocator a, BOOST_THREAD_RV_REF(F) f)
+        {
+          typedef typename Allocator::template rebind<detail::task_object<R,F> >::other A2;
+          A2 a2(a);
+          typedef thread_detail::allocator_destructor<A2> D;
+
+          task = task_ptr(::new(a2.allocate(1)) detail::task_object<R,F>(boost::move(f)), D(a2, 1) );
+          future_obtained = false;
+        }
+#endif //BOOST_NO_CXX11_RVALUE_REFERENCES
+#endif // BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
 
         ~packaged_task()
         {
@@ -1294,46 +1653,39 @@ namespace boost
         }
 
         // assignment
-#ifndef BOOST_NO_RVALUE_REFERENCES
-        packaged_task(packaged_task&& other):
-            future_obtained(other.future_obtained)
+        packaged_task(BOOST_THREAD_RV_REF(packaged_task) other) BOOST_NOEXCEPT :
+            future_obtained(BOOST_THREAD_RV(other).future_obtained)
         {
-            task.swap(other.task);
-            other.future_obtained=false;
+            task.swap(BOOST_THREAD_RV(other).task);
+            BOOST_THREAD_RV(other).future_obtained=false;
         }
-        packaged_task& operator=(packaged_task&& other)
+        packaged_task& operator=(BOOST_THREAD_RV_REF(packaged_task) other) BOOST_NOEXCEPT
         {
-            packaged_task temp(static_cast<packaged_task&&>(other));
+            packaged_task temp(static_cast<BOOST_THREAD_RV_REF(packaged_task)>(other));
             swap(temp);
             return *this;
         }
-#else
-        packaged_task(boost::detail::thread_move_t<packaged_task> other):
-            future_obtained(other->future_obtained)
-        {
-            task.swap(other->task);
-            other->future_obtained=false;
-        }
-        packaged_task& operator=(boost::detail::thread_move_t<packaged_task> other)
-        {
-            packaged_task temp(other);
-            swap(temp);
-            return *this;
-        }
-        operator boost::detail::thread_move_t<packaged_task>()
+
+        void reset()
         {
-            return boost::detail::thread_move_t<packaged_task>(*this);
+            if (!valid())
+                throw future_error(system::make_error_code(future_errc::no_state));
+            task->reset();
+            future_obtained=false;
         }
-#endif
 
-        void swap(packaged_task& other)
+        void swap(packaged_task& other) BOOST_NOEXCEPT
         {
             task.swap(other.task);
             std::swap(future_obtained,other.future_obtained);
         }
+        bool valid() const BOOST_NOEXCEPT
+        {
+          return task.get()!=0;
+        }
 
         // result retrieval
-        unique_future<R> get_future()
+        BOOST_THREAD_FUTURE<R> get_future()
         {
             if(!task)
             {
@@ -1342,14 +1694,16 @@ namespace boost
             else if(!future_obtained)
             {
                 future_obtained=true;
-                return unique_future<R>(task);
+                return BOOST_THREAD_FUTURE<R>(task);
             }
             else
             {
                 boost::throw_exception(future_already_retrieved());
             }
+            return BOOST_THREAD_FUTURE<R>();
+
         }
-        
+
 
         // execution
         void operator()()
@@ -1366,10 +1720,149 @@ namespace boost
         {
             task->set_wait_callback(f,this);
         }
-        
+
     };
 
-}
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+    namespace container
+    {
+      template <class R, class Alloc>
+      struct uses_allocator<packaged_task<R>, Alloc>
+        : public true_type {};
+    }
+#endif
+
+    BOOST_THREAD_DCL_MOVABLE_BEG(T) packaged_task<T> BOOST_THREAD_DCL_MOVABLE_END
+
+
+        template <class R>
+        BOOST_THREAD_FUTURE<R>
+        async(launch policy, R(*f)())
+        {
+            if (int(policy) & int(launch::async))
+            {
+              packaged_task<R> pt( f );
+
+              BOOST_THREAD_FUTURE<R> ret = pt.get_future();
+              boost::thread( boost::move(pt) ).detach();
+              return ::boost::move(ret);
+            }
+            else if (int(policy) & int(launch::deferred))
+            {
+              packaged_task<R> pt( f );
 
+              BOOST_THREAD_FUTURE<R> ret = pt.get_future();
+              return ::boost::move(ret);
+            } else {
+              BOOST_THREAD_FUTURE<R> ret;
+              return ::boost::move(ret);
+            }
+        }
+
+        template <class R>
+        BOOST_THREAD_FUTURE<R>
+        async(R(*f)())
+        {
+            return async(launch::any, f);
+        }
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+    template <class F>
+    BOOST_THREAD_FUTURE<typename boost::result_of<typename decay<F>::type()>::type>
+    async(launch policy, BOOST_THREAD_FWD_REF(F)  f)
+    {
+        typedef typename boost::result_of<typename decay<F>::type()>::type R;
+        if (int(policy) & int(launch::async))
+        {
+          packaged_task<R> pt( boost::forward<F>(f) );
+
+          BOOST_THREAD_FUTURE<R> ret = pt.get_future();
+          boost::thread( boost::move(pt) ).detach();
+          return ::boost::move(ret);
+        }
+        else if (int(policy) & int(launch::deferred))
+        {
+          packaged_task<R> pt( boost::forward<F>(f) );
+
+          BOOST_THREAD_FUTURE<R> ret = pt.get_future();
+          return ::boost::move(ret);
+        } else {
+          BOOST_THREAD_FUTURE<R> ret;
+          return ::boost::move(ret);
+        }
+    }
+    template <class F>
+    BOOST_THREAD_FUTURE<typename boost::result_of<F()>::type>
+    async(BOOST_THREAD_RV_REF(F) f)
+    {
+        return async(launch::any, boost::forward<F>(f));
+    }
+#else
+
+//    template <class F>
+//    BOOST_THREAD_FUTURE<typename boost::result_of<typename decay<F>::type()>::type>
+//    async(launch policy, F const& f)
+//    {
+//        typedef typename boost::result_of<typename decay<F>::type()>::type R;
+//        if (int(policy) & int(launch::async))
+//        {
+//          packaged_task<R> pt( f );
+//
+//          BOOST_THREAD_FUTURE<R> ret = pt.get_future();
+//          boost::thread( boost::move(pt) ).detach();
+//          return ::boost::move(ret);
+//        }
+//        else if (int(policy) & int(launch::deferred))
+//        {
+//          packaged_task<R> pt( f );
+//
+//          BOOST_THREAD_FUTURE<R> ret = pt.get_future();
+//          return ::boost::move(ret);
+//        } else {
+//          BOOST_THREAD_FUTURE<R> ret;
+//          return ::boost::move(ret);
+//        }
+//    }
+//    template <class F>
+//    BOOST_THREAD_FUTURE<typename boost::result_of<F()>::type>
+//    async(F const& f)
+//    {
+//        return async(launch::any, f);
+//    }
+
+    template <class F>
+    BOOST_THREAD_FUTURE<typename boost::result_of<typename decay<F>::type()>::type>
+    async(launch policy, BOOST_THREAD_FWD_REF(F)  f)
+    {
+        typedef typename boost::result_of<typename decay<F>::type()>::type R;
+        if (int(policy) & int(launch::async))
+        {
+          packaged_task<R> pt( boost::forward<F>(f) );
+
+          BOOST_THREAD_FUTURE<R> ret = pt.get_future();
+          boost::thread( boost::move(pt) ).detach();
+          return ::boost::move(ret);
+        }
+        else if (int(policy) & int(launch::deferred))
+        {
+          packaged_task<R> pt( boost::forward<F>(f) );
+
+          BOOST_THREAD_FUTURE<R> ret = pt.get_future();
+          return ::boost::move(ret);
+        } else {
+          BOOST_THREAD_FUTURE<R> ret;
+          return ::boost::move(ret);
+        }
+    }
+    template <class F>
+    BOOST_THREAD_FUTURE<typename boost::result_of<F()>::type>
+    async(BOOST_THREAD_FWD_REF(F) f)
+    {
+        return async(launch::any, boost::forward<F>(f));
+    }
 
 #endif
+
+}
+
+#endif // BOOST_NO_EXCEPTION
+#endif // header
diff --git a/ext/boost/thread/locks.hpp b/ext/boost/thread/locks.hpp
index dd66a67..c11c2bd 100644
--- a/ext/boost/thread/locks.hpp
+++ b/ext/boost/thread/locks.hpp
@@ -2,6 +2,8 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 // (C) Copyright 2007 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+
 #ifndef BOOST_THREAD_LOCKS_HPP
 #define BOOST_THREAD_LOCKS_HPP
 #include <boost/thread/detail/config.hpp>
@@ -12,6 +14,10 @@
 #include <boost/thread/thread_time.hpp>
 #include <boost/detail/workaround.hpp>
 #include <boost/type_traits/is_class.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/time_point.hpp>
+#include <boost/chrono/duration.hpp>
+#endif
 
 #include <boost/config/abi_prefix.hpp>
 
@@ -71,7 +77,7 @@ namespace boost
         {
             BOOST_STATIC_CONSTANT(bool, value=false);
         };
-        
+
         template<typename T>
         struct has_member_lock<T,true>
         {
@@ -80,22 +86,22 @@ namespace boost
             {
                 true_type dummy[2];
             };
-            
+
             template<typename U,typename V>
             static true_type has_member(V (U::*)());
             template<typename U>
             static false_type has_member(U);
-            
+
             BOOST_STATIC_CONSTANT(
                 bool,value=sizeof(has_member_lock<T>::has_member(&T::lock))==sizeof(true_type));
         };
-        
+
         template<typename T,bool=has_member_called_unlock<T>::value >
         struct has_member_unlock
         {
             BOOST_STATIC_CONSTANT(bool, value=false);
         };
-        
+
         template<typename T>
         struct has_member_unlock<T,true>
         {
@@ -104,22 +110,22 @@ namespace boost
             {
                 true_type dummy[2];
             };
-            
+
             template<typename U,typename V>
             static true_type has_member(V (U::*)());
             template<typename U>
             static false_type has_member(U);
-            
+
             BOOST_STATIC_CONSTANT(
                 bool,value=sizeof(has_member_unlock<T>::has_member(&T::unlock))==sizeof(true_type));
         };
-        
+
         template<typename T,bool=has_member_called_try_lock<T>::value >
         struct has_member_try_lock
         {
             BOOST_STATIC_CONSTANT(bool, value=false);
         };
-        
+
         template<typename T>
         struct has_member_try_lock<T,true>
         {
@@ -128,18 +134,18 @@ namespace boost
             {
                 true_type dummy[2];
             };
-            
+
             template<typename U>
             static true_type has_member(bool (U::*)());
             template<typename U>
             static false_type has_member(U);
-            
+
             BOOST_STATIC_CONSTANT(
                 bool,value=sizeof(has_member_try_lock<T>::has_member(&T::try_lock))==sizeof(true_type));
         };
 
     }
-    
+
 
     template<typename T>
     struct is_mutex_type
@@ -147,7 +153,7 @@ namespace boost
         BOOST_STATIC_CONSTANT(bool, value = detail::has_member_lock<T>::value &&
                               detail::has_member_unlock<T>::value &&
                               detail::has_member_try_lock<T>::value);
-        
+
     };
 #else
     template<typename T>
@@ -155,7 +161,7 @@ namespace boost
     {
         BOOST_STATIC_CONSTANT(bool, value = false);
     };
-#endif    
+#endif
 
     struct defer_lock_t
     {};
@@ -163,10 +169,10 @@ namespace boost
     {};
     struct adopt_lock_t
     {};
-    
-    const defer_lock_t defer_lock={};
-    const try_to_lock_t try_to_lock={};
-    const adopt_lock_t adopt_lock={};
+
+    BOOST_CONSTEXPR_OR_CONST defer_lock_t defer_lock={};
+    BOOST_CONSTEXPR_OR_CONST try_to_lock_t try_to_lock={};
+    BOOST_CONSTEXPR_OR_CONST adopt_lock_t adopt_lock={};
 
     template<typename Mutex>
     class shared_lock;
@@ -182,7 +188,7 @@ namespace boost
         template<typename Mutex>
         class try_lock_wrapper;
     }
-    
+
 #ifdef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES
     template<typename T>
     struct is_mutex_type<unique_lock<T> >
@@ -201,7 +207,7 @@ namespace boost
     {
         BOOST_STATIC_CONSTANT(bool, value = true);
     };
-    
+
     template<typename T>
     struct is_mutex_type<detail::try_lock_wrapper<T> >
     {
@@ -213,7 +219,7 @@ namespace boost
     class recursive_mutex;
     class recursive_timed_mutex;
     class shared_mutex;
-    
+
     template<>
     struct is_mutex_type<mutex>
     {
@@ -248,9 +254,10 @@ namespace boost
     private:
         Mutex& m;
 
-        explicit lock_guard(lock_guard&);
-        lock_guard& operator=(lock_guard&);
     public:
+        typedef Mutex mutex_type;
+        BOOST_THREAD_NO_COPYABLE(lock_guard)
+
         explicit lock_guard(Mutex& m_):
             m(m_)
         {
@@ -265,25 +272,29 @@ namespace boost
         }
     };
 
-
     template<typename Mutex>
     class unique_lock
     {
     private:
         Mutex* m;
         bool is_locked;
-        unique_lock(unique_lock&);
+
+    private:
         explicit unique_lock(upgrade_lock<Mutex>&);
-        unique_lock& operator=(unique_lock&);
         unique_lock& operator=(upgrade_lock<Mutex>& other);
     public:
-#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100) 
-        unique_lock(const volatile unique_lock&); 
+        typedef Mutex mutex_type;
+        BOOST_THREAD_MOVABLE_ONLY(unique_lock)
+
+#if 0 // This should not be needed anymore. Use instead BOOST_THREAD_MAKE_RV_REF.
+#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
+        unique_lock(const volatile unique_lock&);
 #endif
-        unique_lock():
+#endif
+        unique_lock() BOOST_NOEXCEPT :
             m(0),is_locked(false)
         {}
-        
+
         explicit unique_lock(Mutex& m_):
             m(&m_),is_locked(false)
         {
@@ -292,7 +303,7 @@ namespace boost
         unique_lock(Mutex& m_,adopt_lock_t):
             m(&m_),is_locked(true)
         {}
-        unique_lock(Mutex& m_,defer_lock_t):
+        unique_lock(Mutex& m_,defer_lock_t) BOOST_NOEXCEPT:
             m(&m_),is_locked(false)
         {}
         unique_lock(Mutex& m_,try_to_lock_t):
@@ -311,91 +322,172 @@ namespace boost
         {
             timed_lock(target_time);
         }
-#ifndef BOOST_NO_RVALUE_REFERENCES
-        unique_lock(unique_lock&& other):
-            m(other.m),is_locked(other.is_locked)
+
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Clock, class Duration>
+        unique_lock(Mutex& mtx, const chrono::time_point<Clock, Duration>& t)
+                : m(&mtx), is_locked(mtx.try_lock_until(t))
         {
-            other.is_locked=false;
-            other.m=0;
         }
-        explicit unique_lock(upgrade_lock<Mutex>&& other);
-
-        unique_lock<Mutex>&& move()
+        template <class Rep, class Period>
+        unique_lock(Mutex& mtx, const chrono::duration<Rep, Period>& d)
+                : m(&mtx), is_locked(mtx.try_lock_for(d))
         {
-            return static_cast<unique_lock<Mutex>&&>(*this);
         }
+#endif
 
+        unique_lock(BOOST_THREAD_RV_REF(unique_lock) other) BOOST_NOEXCEPT:
+            m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
+        {
+          BOOST_THREAD_RV(other).is_locked=false;
+          BOOST_THREAD_RV(other).m=0;
+        }
+        BOOST_THREAD_EXPLICIT_LOCK_CONVERSION unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock<Mutex> BOOST_THREAD_RV_REF_END other);
 
-        unique_lock& operator=(unique_lock&& other)
+#ifndef BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
+        unique_lock& operator=(BOOST_THREAD_RV_REF_BEG upgrade_lock<Mutex> BOOST_THREAD_RV_REF_END other)  BOOST_NOEXCEPT
         {
-            unique_lock temp(other.move());
+            unique_lock temp(::boost::move(other));
             swap(temp);
             return *this;
         }
+#endif
 
-        unique_lock& operator=(upgrade_lock<Mutex>&& other)
+        unique_lock& operator=(BOOST_THREAD_RV_REF(unique_lock) other)  BOOST_NOEXCEPT
         {
-            unique_lock temp(other.move());
+            unique_lock temp(::boost::move(other));
             swap(temp);
             return *this;
         }
-        void swap(unique_lock&& other)
-        {
-            std::swap(m,other.m);
-            std::swap(is_locked,other.is_locked);
-        }
-#else
-        unique_lock(detail::thread_move_t<unique_lock<Mutex> > other):
-            m(other->m),is_locked(other->is_locked)
+#if 0 // This should not be needed anymore. Use instead BOOST_THREAD_MAKE_RV_REF.
+#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
+        unique_lock& operator=(unique_lock<Mutex> other)
         {
-            other->is_locked=false;
-            other->m=0;
+            swap(other);
+            return *this;
         }
-        unique_lock(detail::thread_move_t<upgrade_lock<Mutex> > other);
+#endif // BOOST_WORKAROUND
+#endif
 
-        operator detail::thread_move_t<unique_lock<Mutex> >()
+        // Conversion from upgrade locking
+        unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock<mutex_type> BOOST_THREAD_RV_REF_END ul, try_to_lock_t)
+        : m(0),is_locked(false)
         {
-            return move();
+            if (BOOST_THREAD_RV(ul).owns_lock()) {
+              if (BOOST_THREAD_RV(ul).mutex()->try_unlock_upgrade_and_lock())
+              {
+                  m = BOOST_THREAD_RV(ul).release();
+                  is_locked = true;
+              }
+            }
+            else
+            {
+              m = BOOST_THREAD_RV(ul).release();
+            }
         }
 
-        detail::thread_move_t<unique_lock<Mutex> > move()
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Clock, class Duration>
+        unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock<mutex_type> BOOST_THREAD_RV_REF_END ul,
+                    const chrono::time_point<Clock, Duration>& abs_time)
+        : m(0),is_locked(false)
         {
-            return detail::thread_move_t<unique_lock<Mutex> >(*this);
+            if (BOOST_THREAD_RV(ul).owns_lock()) {
+              if (BOOST_THREAD_RV(ul).mutex()->try_unlock_upgrade_and_lock_until(abs_time))
+              {
+                  m = BOOST_THREAD_RV(ul).release();
+                  is_locked = true;
+              }
+            }
+            else
+            {
+              m = BOOST_THREAD_RV(ul).release();
+            }
         }
 
-#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100) 
-        unique_lock& operator=(unique_lock<Mutex> other) 
-        { 
-            swap(other); 
-            return *this; 
-        } 
-#else
-        unique_lock& operator=(detail::thread_move_t<unique_lock<Mutex> > other)
+        template <class Rep, class Period>
+        unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock<mutex_type> BOOST_THREAD_RV_REF_END ul,
+                    const chrono::duration<Rep, Period>& rel_time)
+        : m(0),is_locked(false)
         {
-            unique_lock temp(other);
-            swap(temp);
-            return *this;
+          if (BOOST_THREAD_RV(ul).owns_lock()) {
+            if (BOOST_THREAD_RV(ul).mutex()->try_unlock_upgrade_and_lock_for(rel_time))
+            {
+              m = BOOST_THREAD_RV(ul).release();
+              is_locked = true;
+            }
+          }
+          else
+          {
+            m = BOOST_THREAD_RV(ul).release();
+          }
         }
 #endif
 
-        unique_lock& operator=(detail::thread_move_t<upgrade_lock<Mutex> > other)
+#ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+        // Conversion from shared locking
+        unique_lock(BOOST_THREAD_RV_REF_BEG shared_lock<mutex_type> BOOST_THREAD_RV_REF_END sl, try_to_lock_t)
+        : m(0),is_locked(false)
         {
-            unique_lock temp(other);
-            swap(temp);
-            return *this;
+          if (BOOST_THREAD_RV(sl).owns_lock()) {
+            if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock())
+            {
+                m = BOOST_THREAD_RV(sl).release();
+                is_locked = true;
+            }
+          }
+          else
+          {
+            m = BOOST_THREAD_RV(sl).release();
+          }
+        }
+
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Clock, class Duration>
+        unique_lock(BOOST_THREAD_RV_REF_BEG shared_lock<mutex_type> BOOST_THREAD_RV_REF_END sl,
+                    const chrono::time_point<Clock, Duration>& abs_time)
+        : m(0),is_locked(false)
+        {
+            if (BOOST_THREAD_RV(sl).owns_lock()) {
+              if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_until(abs_time))
+              {
+                  m = BOOST_THREAD_RV(sl).release();
+                  is_locked = true;
+              }
+            }
+            else
+            {
+              m = BOOST_THREAD_RV(sl).release();
+            }
         }
-        void swap(detail::thread_move_t<unique_lock<Mutex> > other)
+
+        template <class Rep, class Period>
+        unique_lock(BOOST_THREAD_RV_REF_BEG shared_lock<mutex_type> BOOST_THREAD_RV_REF_END sl,
+                    const chrono::duration<Rep, Period>& rel_time)
+        : m(0),is_locked(false)
         {
-            std::swap(m,other->m);
-            std::swap(is_locked,other->is_locked);
+              if (BOOST_THREAD_RV(sl).owns_lock()) {
+                if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_for(rel_time))
+                {
+                    m = BOOST_THREAD_RV(sl).release();
+                    is_locked = true;
+                }
+              }
+              else
+              {
+                m = BOOST_THREAD_RV(sl).release();
+              }
         }
-#endif
-        void swap(unique_lock& other)
+#endif // BOOST_THREAD_USES_CHRONO
+#endif // BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+
+
+        void swap(unique_lock& other) BOOST_NOEXCEPT
         {
             std::swap(m,other.m);
             std::swap(is_locked,other.is_locked);
         }
-        
+
         ~unique_lock()
         {
             if(owns_lock())
@@ -405,18 +497,26 @@ namespace boost
         }
         void lock()
         {
+            if(m==0)
+            {
+                boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock has no mutex"));
+            }
             if(owns_lock())
             {
-                boost::throw_exception(boost::lock_error("lock already owned"));
+                boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost unique_lock owns already the mutex"));
             }
             m->lock();
             is_locked=true;
         }
         bool try_lock()
         {
+            if(m==0)
+            {
+                boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock has no mutex"));
+            }
             if(owns_lock())
             {
-                boost::throw_exception(boost::lock_error("lock already owned"));
+                boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost unique_lock owns already the mutex"));
             }
             is_locked=m->try_lock();
             return is_locked;
@@ -424,50 +524,118 @@ namespace boost
         template<typename TimeDuration>
         bool timed_lock(TimeDuration const& relative_time)
         {
+          if(m==0)
+          {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock has no mutex"));
+          }
+          if(owns_lock())
+          {
+              boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost unique_lock owns already the mutex"));
+          }
             is_locked=m->timed_lock(relative_time);
             return is_locked;
         }
-        
+
         bool timed_lock(::boost::system_time const& absolute_time)
         {
+          if(m==0)
+          {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock has no mutex"));
+          }
+          if(owns_lock())
+          {
+              boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost unique_lock owns already the mutex"));
+          }
             is_locked=m->timed_lock(absolute_time);
             return is_locked;
         }
         bool timed_lock(::boost::xtime const& absolute_time)
         {
+          if(m==0)
+          {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock has no mutex"));
+          }
+          if(owns_lock())
+          {
+              boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost unique_lock owns already the mutex"));
+          }
             is_locked=m->timed_lock(absolute_time);
             return is_locked;
         }
+
+#ifdef BOOST_THREAD_USES_CHRONO
+
+        template <class Rep, class Period>
+        bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
+        {
+          if(m==0)
+          {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock has no mutex"));
+          }
+          if(owns_lock())
+          {
+              boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost unique_lock owns already the mutex"));
+          }
+          is_locked=m->try_lock_for(rel_time);
+          return is_locked;
+        }
+        template <class Clock, class Duration>
+        bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time)
+        {
+          if(m==0)
+          {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock has no mutex"));
+          }
+          if(owns_lock())
+          {
+              boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost unique_lock owns already the mutex"));
+          }
+          is_locked=m->try_lock_until(abs_time);
+          return is_locked;
+        }
+#endif
+
         void unlock()
         {
+          if(m==0)
+          {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock has no mutex"));
+          }
             if(!owns_lock())
             {
-                boost::throw_exception(boost::lock_error("lock not owned"));
+                boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock doesn't own the mutex"));
             }
             m->unlock();
             is_locked=false;
         }
-            
+
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
         typedef void (unique_lock::*bool_type)();
-        operator bool_type() const
+        operator bool_type() const BOOST_NOEXCEPT
         {
             return is_locked?&unique_lock::lock:0;
         }
-        bool operator!() const
+        bool operator!() const BOOST_NOEXCEPT
         {
             return !owns_lock();
         }
-        bool owns_lock() const
+#else
+        explicit operator bool() const BOOST_NOEXCEPT
+        {
+            return owns_lock();
+        }
+#endif
+        bool owns_lock() const BOOST_NOEXCEPT
         {
             return is_locked;
         }
 
-        Mutex* mutex() const
+        Mutex* mutex() const BOOST_NOEXCEPT
         {
             return m;
         }
 
-        Mutex* release()
+        Mutex* release() BOOST_NOEXCEPT
         {
             Mutex* const res=m;
             m=0;
@@ -479,44 +647,13 @@ namespace boost
         friend class upgrade_lock<Mutex>;
     };
 
-#ifndef BOOST_NO_RVALUE_REFERENCES
-    template<typename Mutex>
-    void swap(unique_lock<Mutex>&& lhs,unique_lock<Mutex>&& rhs)
-    {
-        lhs.swap(rhs);
-    }
-
-    template<typename Mutex>
-    inline upgrade_lock<Mutex>&& move(upgrade_lock<Mutex>&& ul)
-    {
-        return static_cast<upgrade_lock<Mutex>&&>(ul);
-    }
-
-    template<typename Mutex>
-    inline upgrade_lock<Mutex>&& move(upgrade_lock<Mutex>& ul)
-    {
-        return static_cast<upgrade_lock<Mutex>&&>(ul);
-    }
-#endif
     template<typename Mutex>
-    void swap(unique_lock<Mutex>& lhs,unique_lock<Mutex>& rhs)
+    void swap(unique_lock<Mutex>& lhs,unique_lock<Mutex>& rhs) BOOST_NOEXCEPT
     {
         lhs.swap(rhs);
     }
 
-#ifndef BOOST_NO_RVALUE_REFERENCES
-    template<typename Mutex>
-    inline unique_lock<Mutex>&& move(unique_lock<Mutex>&& ul)
-    {
-        return static_cast<unique_lock<Mutex>&&>(ul);
-    }
-
-    template<typename Mutex>
-    inline unique_lock<Mutex>&& move(unique_lock<Mutex>& ul)
-    {
-        return static_cast<unique_lock<Mutex>&&>(ul);
-    }
-#endif
+    BOOST_THREAD_DCL_MOVABLE_BEG(Mutex) unique_lock<Mutex> BOOST_THREAD_DCL_MOVABLE_END
 
     template<typename Mutex>
     class shared_lock
@@ -524,14 +661,15 @@ namespace boost
     protected:
         Mutex* m;
         bool is_locked;
-    private:
-        explicit shared_lock(shared_lock&);
-        shared_lock& operator=(shared_lock&);
+
     public:
-        shared_lock():
+        typedef Mutex mutex_type;
+        BOOST_THREAD_MOVABLE_ONLY(shared_lock)
+
+        shared_lock() BOOST_NOEXCEPT:
             m(0),is_locked(false)
         {}
-        
+
         explicit shared_lock(Mutex& m_):
             m(&m_),is_locked(false)
         {
@@ -540,7 +678,7 @@ namespace boost
         shared_lock(Mutex& m_,adopt_lock_t):
             m(&m_),is_locked(true)
         {}
-        shared_lock(Mutex& m_,defer_lock_t):
+        shared_lock(Mutex& m_,defer_lock_t) BOOST_NOEXCEPT:
             m(&m_),is_locked(false)
         {}
         shared_lock(Mutex& m_,try_to_lock_t):
@@ -554,91 +692,90 @@ namespace boost
             timed_lock(target_time);
         }
 
-        shared_lock(detail::thread_move_t<shared_lock<Mutex> > other):
-            m(other->m),is_locked(other->is_locked)
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Clock, class Duration>
+        shared_lock(Mutex& mtx, const chrono::time_point<Clock, Duration>& t)
+                : m(&mtx), is_locked(mtx.try_lock_shared_until(t))
+        {
+        }
+        template <class Rep, class Period>
+        shared_lock(Mutex& mtx, const chrono::duration<Rep, Period>& d)
+                : m(&mtx), is_locked(mtx.try_lock_shared_for(d))
+        {
+        }
+#endif
+
+        shared_lock(BOOST_THREAD_RV_REF_BEG shared_lock<Mutex> BOOST_THREAD_RV_REF_END other) BOOST_NOEXCEPT:
+            m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
         {
-            other->is_locked=false;
-            other->m=0;
+            BOOST_THREAD_RV(other).is_locked=false;
+            BOOST_THREAD_RV(other).m=0;
         }
 
-        shared_lock(detail::thread_move_t<unique_lock<Mutex> > other):
-            m(other->m),is_locked(other->is_locked)
+        BOOST_THREAD_EXPLICIT_LOCK_CONVERSION shared_lock(BOOST_THREAD_RV_REF_BEG unique_lock<Mutex> BOOST_THREAD_RV_REF_END other):
+            m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
         {
             if(is_locked)
             {
                 m->unlock_and_lock_shared();
             }
-            other->is_locked=false;
-            other->m=0;
+            BOOST_THREAD_RV(other).is_locked=false;
+            BOOST_THREAD_RV(other).m=0;
         }
 
-        shared_lock(detail::thread_move_t<upgrade_lock<Mutex> > other):
-            m(other->m),is_locked(other->is_locked)
+        BOOST_THREAD_EXPLICIT_LOCK_CONVERSION shared_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock<Mutex> BOOST_THREAD_RV_REF_END other):
+            m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
         {
             if(is_locked)
             {
                 m->unlock_upgrade_and_lock_shared();
             }
-            other->is_locked=false;
-            other->m=0;
+            BOOST_THREAD_RV(other).is_locked=false;
+            BOOST_THREAD_RV(other).m=0;
         }
 
-        operator detail::thread_move_t<shared_lock<Mutex> >()
-        {
-            return move();
-        }
 
-        detail::thread_move_t<shared_lock<Mutex> > move()
+        shared_lock& operator=(BOOST_THREAD_RV_REF_BEG shared_lock<Mutex> BOOST_THREAD_RV_REF_END other) BOOST_NOEXCEPT
         {
-            return detail::thread_move_t<shared_lock<Mutex> >(*this);
-        }
-
-
-        shared_lock& operator=(detail::thread_move_t<shared_lock<Mutex> > other)
-        {
-            shared_lock temp(other);
+            shared_lock temp(::boost::move(other));
             swap(temp);
             return *this;
         }
-
-        shared_lock& operator=(detail::thread_move_t<unique_lock<Mutex> > other)
+#ifndef BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
+        shared_lock& operator=(BOOST_THREAD_RV_REF_BEG unique_lock<Mutex> BOOST_THREAD_RV_REF_END other)
         {
-            shared_lock temp(other);
+            shared_lock temp(::boost::move(other));
             swap(temp);
             return *this;
         }
 
-        shared_lock& operator=(detail::thread_move_t<upgrade_lock<Mutex> > other)
+        shared_lock& operator=(BOOST_THREAD_RV_REF_BEG upgrade_lock<Mutex> BOOST_THREAD_RV_REF_END other)
         {
-            shared_lock temp(other);
+            shared_lock temp(::boost::move(other));
             swap(temp);
             return *this;
         }
+#endif
 
-#ifndef BOOST_NO_RVALUE_REFERENCES
-        void swap(shared_lock&& other)
+        void swap(shared_lock& other) BOOST_NOEXCEPT
         {
             std::swap(m,other.m);
             std::swap(is_locked,other.is_locked);
         }
-#else
-        void swap(boost::detail::thread_move_t<shared_lock<Mutex> > other)
-        {
-            std::swap(m,other->m);
-            std::swap(is_locked,other->is_locked);
-        }
-#endif
-        void swap(shared_lock& other)
+
+        Mutex* mutex() const BOOST_NOEXCEPT
         {
-            std::swap(m,other.m);
-            std::swap(is_locked,other.is_locked);
+            return m;
         }
 
-        Mutex* mutex() const
+        Mutex* release() BOOST_NOEXCEPT
         {
-            return m;
+            Mutex* const res=m;
+            m=0;
+            is_locked=false;
+            return res;
         }
-        
+
         ~shared_lock()
         {
             if(owns_lock())
@@ -648,27 +785,39 @@ namespace boost
         }
         void lock()
         {
+            if(m==0)
+            {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex"));
+            }
             if(owns_lock())
             {
-                boost::throw_exception(boost::lock_error("lock already owned"));
+              boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost shared_lock owns already the mutex"));
             }
             m->lock_shared();
             is_locked=true;
         }
         bool try_lock()
         {
+            if(m==0)
+            {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex"));
+            }
             if(owns_lock())
             {
-                boost::throw_exception(boost::lock_error("lock already owned"));
+              boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost shared_lock owns already the mutex"));
             }
             is_locked=m->try_lock_shared();
             return is_locked;
         }
         bool timed_lock(boost::system_time const& target_time)
         {
+            if(m==0)
+            {
+                boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex"));
+            }
             if(owns_lock())
             {
-                boost::throw_exception(boost::lock_error("lock already owned"));
+              boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost shared_lock owns already the mutex"));
             }
             is_locked=m->timed_lock_shared(target_time);
             return is_locked;
@@ -676,52 +825,91 @@ namespace boost
         template<typename Duration>
         bool timed_lock(Duration const& target_time)
         {
+            if(m==0)
+            {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex"));
+            }
             if(owns_lock())
             {
-                boost::throw_exception(boost::lock_error("lock already owned"));
+              boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost shared_lock owns already the mutex"));
             }
             is_locked=m->timed_lock_shared(target_time);
             return is_locked;
         }
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Rep, class Period>
+        bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
+        {
+          if(m==0)
+          {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex"));
+          }
+          if(owns_lock())
+          {
+              boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost shared_lock owns already the mutex"));
+          }
+          is_locked=m->try_lock_shared_for(rel_time);
+          return is_locked;
+        }
+        template <class Clock, class Duration>
+        bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time)
+        {
+          if(m==0)
+          {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex"));
+          }
+          if(owns_lock())
+          {
+              boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost shared_lock owns already the mutex"));
+          }
+          is_locked=m->try_lock_shared_until(abs_time);
+          return is_locked;
+        }
+#endif
         void unlock()
         {
+            if(m==0)
+            {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex"));
+            }
             if(!owns_lock())
             {
-                boost::throw_exception(boost::lock_error("lock not owned"));
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock doesn't own the mutex"));
             }
             m->unlock_shared();
             is_locked=false;
         }
-            
+
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
         typedef void (shared_lock<Mutex>::*bool_type)();
-        operator bool_type() const
+        operator bool_type() const BOOST_NOEXCEPT
         {
             return is_locked?&shared_lock::lock:0;
         }
-        bool operator!() const
+        bool operator!() const BOOST_NOEXCEPT
         {
             return !owns_lock();
         }
-        bool owns_lock() const
+#else
+        explicit operator bool() const BOOST_NOEXCEPT
+        {
+            return owns_lock();
+        }
+#endif
+        bool owns_lock() const BOOST_NOEXCEPT
         {
             return is_locked;
         }
 
     };
 
-#ifndef BOOST_NO_RVALUE_REFERENCES
-    template<typename Mutex>
-    void swap(shared_lock<Mutex>&& lhs,shared_lock<Mutex>&& rhs)
-    {
-        lhs.swap(rhs);
-    }
-#else
+    BOOST_THREAD_DCL_MOVABLE_BEG(Mutex) shared_lock<Mutex> BOOST_THREAD_DCL_MOVABLE_END
+
     template<typename Mutex>
-    void swap(shared_lock<Mutex>& lhs,shared_lock<Mutex>& rhs)
+    void swap(shared_lock<Mutex>& lhs,shared_lock<Mutex>& rhs) BOOST_NOEXCEPT
     {
         lhs.swap(rhs);
     }
-#endif
 
     template<typename Mutex>
     class upgrade_lock
@@ -729,14 +917,15 @@ namespace boost
     protected:
         Mutex* m;
         bool is_locked;
-    private:
-        explicit upgrade_lock(upgrade_lock&);
-        upgrade_lock& operator=(upgrade_lock&);
+
     public:
-        upgrade_lock():
+        typedef Mutex mutex_type;
+        BOOST_THREAD_MOVABLE_ONLY(upgrade_lock)
+
+        upgrade_lock() BOOST_NOEXCEPT:
             m(0),is_locked(false)
         {}
-        
+
         explicit upgrade_lock(Mutex& m_):
             m(&m_),is_locked(false)
         {
@@ -745,7 +934,7 @@ namespace boost
         upgrade_lock(Mutex& m_,adopt_lock_t):
             m(&m_),is_locked(true)
         {}
-        upgrade_lock(Mutex& m_,defer_lock_t):
+        upgrade_lock(Mutex& m_,defer_lock_t) BOOST_NOEXCEPT:
             m(&m_),is_locked(false)
         {}
         upgrade_lock(Mutex& m_,try_to_lock_t):
@@ -753,89 +942,128 @@ namespace boost
         {
             try_lock();
         }
-#ifdef BOOST_HAS_RVALUE_REFS
-        upgrade_lock(upgrade_lock<Mutex>&& other):
-            m(other.m),is_locked(other.is_locked)
+
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Clock, class Duration>
+        upgrade_lock(Mutex& mtx, const chrono::time_point<Clock, Duration>& t)
+                : m(&mtx), is_locked(mtx.try_lock_upgrade_until(t))
+        {
+        }
+        template <class Rep, class Period>
+        upgrade_lock(Mutex& mtx, const chrono::duration<Rep, Period>& d)
+                : m(&mtx), is_locked(mtx.try_lock_upgrade_for(d))
+        {
+        }
+#endif
+
+        upgrade_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock<Mutex> BOOST_THREAD_RV_REF_END other) BOOST_NOEXCEPT:
+            m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
         {
-            other.is_locked=false;
-            other.m=0;
+            BOOST_THREAD_RV(other).is_locked=false;
+            BOOST_THREAD_RV(other).m=0;
         }
 
-        upgrade_lock(unique_lock<Mutex>&& other):
-            m(other.m),is_locked(other.is_locked)
+        BOOST_THREAD_EXPLICIT_LOCK_CONVERSION upgrade_lock(BOOST_THREAD_RV_REF_BEG unique_lock<Mutex> BOOST_THREAD_RV_REF_END other):
+            m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
         {
             if(is_locked)
             {
                 m->unlock_and_lock_upgrade();
             }
-            other.is_locked=false;
-            other.m=0;
+            BOOST_THREAD_RV(other).is_locked=false;
+            BOOST_THREAD_RV(other).m=0;
         }
 
-        upgrade_lock& operator=(upgrade_lock<Mutex>&& other)
+        upgrade_lock& operator=(BOOST_THREAD_RV_REF_BEG upgrade_lock<Mutex> BOOST_THREAD_RV_REF_END other) BOOST_NOEXCEPT
         {
-            upgrade_lock temp(static_cast<upgrade_lock<Mutex>&&>(other));
+            upgrade_lock temp(::boost::move(other));
             swap(temp);
             return *this;
         }
 
-        upgrade_lock& operator=(unique_lock<Mutex>&& other)
+#ifndef BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
+        upgrade_lock& operator=(BOOST_THREAD_RV_REF_BEG unique_lock<Mutex> BOOST_THREAD_RV_REF_END other)
         {
-            upgrade_lock temp(static_cast<unique_lock<Mutex>&&>(other));
+            upgrade_lock temp(::boost::move(other));
             swap(temp);
             return *this;
         }
-#else
-        upgrade_lock(detail::thread_move_t<upgrade_lock<Mutex> > other):
-            m(other->m),is_locked(other->is_locked)
-        {
-            other->is_locked=false;
-            other->m=0;
-        }
+#endif
 
-        upgrade_lock(detail::thread_move_t<unique_lock<Mutex> > other):
-            m(other->m),is_locked(other->is_locked)
+#ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+        // Conversion from shared locking
+        upgrade_lock(BOOST_THREAD_RV_REF_BEG shared_lock<mutex_type> BOOST_THREAD_RV_REF_END sl, try_to_lock_t)
+        : m(0),is_locked(false)
         {
-            if(is_locked)
+          if (BOOST_THREAD_RV(sl).owns_lock()) {
+            if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_upgrade())
             {
-                m->unlock_and_lock_upgrade();
+                m = BOOST_THREAD_RV(sl).release();
+                is_locked = true;
             }
-            other->is_locked=false;
-            other->m=0;
+          }
+          else
+          {
+            m = BOOST_THREAD_RV(sl).release();
+          }
         }
 
-        operator detail::thread_move_t<upgrade_lock<Mutex> >()
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Clock, class Duration>
+            upgrade_lock(BOOST_THREAD_RV_REF_BEG shared_lock<mutex_type> BOOST_THREAD_RV_REF_END sl,
+                         const chrono::time_point<Clock, Duration>& abs_time)
+        : m(0),is_locked(false)
         {
-            return move();
+          if (BOOST_THREAD_RV(sl).owns_lock()) {
+            if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_upgrade_until(abs_time))
+            {
+                m = BOOST_THREAD_RV(sl).release();
+                is_locked = true;
+            }
+          }
+          else
+          {
+            m = BOOST_THREAD_RV(sl).release();
+          }
         }
 
-        detail::thread_move_t<upgrade_lock<Mutex> > move()
+        template <class Rep, class Period>
+            upgrade_lock(BOOST_THREAD_RV_REF_BEG shared_lock<mutex_type> BOOST_THREAD_RV_REF_END sl,
+                         const chrono::duration<Rep, Period>& rel_time)
+        : m(0),is_locked(false)
         {
-            return detail::thread_move_t<upgrade_lock<Mutex> >(*this);
+          if (BOOST_THREAD_RV(sl).owns_lock()) {
+            if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_upgrade_for(rel_time))
+            {
+                m = BOOST_THREAD_RV(sl).release();
+                is_locked = true;
+            }
+          }
+          else
+          {
+            m = BOOST_THREAD_RV(sl).release();
+          }
         }
+#endif // BOOST_THREAD_USES_CHRONO
+#endif // BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
 
-
-        upgrade_lock& operator=(detail::thread_move_t<upgrade_lock<Mutex> > other)
+        void swap(upgrade_lock& other) BOOST_NOEXCEPT
         {
-            upgrade_lock temp(other);
-            swap(temp);
-            return *this;
+            std::swap(m,other.m);
+            std::swap(is_locked,other.is_locked);
         }
-
-        upgrade_lock& operator=(detail::thread_move_t<unique_lock<Mutex> > other)
+        Mutex* mutex() const BOOST_NOEXCEPT
         {
-            upgrade_lock temp(other);
-            swap(temp);
-            return *this;
+            return m;
         }
-#endif
 
-        void swap(upgrade_lock& other)
+        Mutex* release() BOOST_NOEXCEPT
         {
-            std::swap(m,other.m);
-            std::swap(is_locked,other.is_locked);
+            Mutex* const res=m;
+            m=0;
+            is_locked=false;
+            return res;
         }
-        
         ~upgrade_lock()
         {
             if(owns_lock())
@@ -845,42 +1073,90 @@ namespace boost
         }
         void lock()
         {
+          if(m==0)
+          {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex"));
+          }
             if(owns_lock())
             {
-                boost::throw_exception(boost::lock_error("lock already owned"));
+              boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost upgrade_lock owns already the mutex"));
             }
             m->lock_upgrade();
             is_locked=true;
         }
         bool try_lock()
         {
+          if(m==0)
+          {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex"));
+          }
             if(owns_lock())
             {
-                boost::throw_exception(boost::lock_error("lock already owned"));
+              boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost upgrade_lock owns already the mutex"));
             }
             is_locked=m->try_lock_upgrade();
             return is_locked;
         }
         void unlock()
         {
+          if(m==0)
+          {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex"));
+          }
             if(!owns_lock())
             {
-                boost::throw_exception(boost::lock_error("lock not owned"));
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost upgrade_lock doesn't own the mutex"));
             }
             m->unlock_upgrade();
             is_locked=false;
         }
-            
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Rep, class Period>
+        bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
+        {
+          if(m==0)
+          {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex"));
+          }
+          if(owns_lock())
+          {
+              boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost shared_lock owns already the mutex"));
+          }
+          is_locked=m->try_lock_upgrade_for(rel_time);
+          return is_locked;
+        }
+        template <class Clock, class Duration>
+        bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time)
+        {
+          if(m==0)
+          {
+              boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex"));
+          }
+          if(owns_lock())
+          {
+              boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost shared_lock owns already the mutex"));
+          }
+          is_locked=m->try_lock_upgrade_until(abs_time);
+          return is_locked;
+        }
+#endif
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
         typedef void (upgrade_lock::*bool_type)();
-        operator bool_type() const
+        operator bool_type() const BOOST_NOEXCEPT
         {
             return is_locked?&upgrade_lock::lock:0;
         }
-        bool operator!() const
+        bool operator!() const BOOST_NOEXCEPT
         {
             return !owns_lock();
         }
-        bool owns_lock() const
+#else
+        explicit operator bool() const BOOST_NOEXCEPT
+        {
+            return owns_lock();
+        }
+#endif
+        bool owns_lock() const BOOST_NOEXCEPT
         {
             return is_locked;
         }
@@ -888,30 +1164,25 @@ namespace boost
         friend class unique_lock<Mutex>;
     };
 
-
-#ifndef BOOST_NO_RVALUE_REFERENCES
     template<typename Mutex>
-    unique_lock<Mutex>::unique_lock(upgrade_lock<Mutex>&& other):
-        m(other.m),is_locked(other.is_locked)
+    void swap(upgrade_lock<Mutex>& lhs,upgrade_lock<Mutex>& rhs) BOOST_NOEXCEPT
     {
-        other.is_locked=false;
-        if(is_locked)
-        {
-            m->unlock_upgrade_and_lock();
-        }
+        lhs.swap(rhs);
     }
-#else
+
+    BOOST_THREAD_DCL_MOVABLE_BEG(Mutex) upgrade_lock<Mutex> BOOST_THREAD_DCL_MOVABLE_END
+
     template<typename Mutex>
-    unique_lock<Mutex>::unique_lock(detail::thread_move_t<upgrade_lock<Mutex> > other):
-        m(other->m),is_locked(other->is_locked)
+    unique_lock<Mutex>::unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock<Mutex> BOOST_THREAD_RV_REF_END other):
+        m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
     {
-        other->is_locked=false;
         if(is_locked)
         {
             m->unlock_upgrade_and_lock();
         }
+        BOOST_THREAD_RV(other).release();
     }
-#endif
+
     template <class Mutex>
     class upgrade_to_unique_lock
     {
@@ -919,67 +1190,65 @@ namespace boost
         upgrade_lock<Mutex>* source;
         unique_lock<Mutex> exclusive;
 
-        explicit upgrade_to_unique_lock(upgrade_to_unique_lock&);
-        upgrade_to_unique_lock& operator=(upgrade_to_unique_lock&);
     public:
+        typedef Mutex mutex_type;
+        BOOST_THREAD_MOVABLE_ONLY(upgrade_to_unique_lock)
+
         explicit upgrade_to_unique_lock(upgrade_lock<Mutex>& m_):
-            source(&m_),exclusive(move(*source))
+            source(&m_),exclusive(::boost::move(*source))
         {}
         ~upgrade_to_unique_lock()
         {
             if(source)
             {
-                *source=move(exclusive);
+                *source=BOOST_THREAD_MAKE_RV_REF(upgrade_lock<Mutex>(::boost::move(exclusive)));
             }
         }
 
-#ifdef BOOST_HAS_RVALUE_REFS
-        upgrade_to_unique_lock(upgrade_to_unique_lock<Mutex>&& other):
-            source(other.source),exclusive(move(other.exclusive))
-        {
-            other.source=0;
-        }
-        
-        upgrade_to_unique_lock& operator=(upgrade_to_unique_lock<Mutex>&& other)
-        {
-            upgrade_to_unique_lock temp(other);
-            swap(temp);
-            return *this;
-        }
-#else
-        upgrade_to_unique_lock(detail::thread_move_t<upgrade_to_unique_lock<Mutex> > other):
-            source(other->source),exclusive(move(other->exclusive))
+        upgrade_to_unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_to_unique_lock<Mutex> BOOST_THREAD_RV_REF_END other) BOOST_NOEXCEPT:
+            source(BOOST_THREAD_RV(other).source),exclusive(::boost::move(BOOST_THREAD_RV(other).exclusive))
         {
-            other->source=0;
+            BOOST_THREAD_RV(other).source=0;
         }
-        
-        upgrade_to_unique_lock& operator=(detail::thread_move_t<upgrade_to_unique_lock<Mutex> > other)
+
+        upgrade_to_unique_lock& operator=(BOOST_THREAD_RV_REF_BEG upgrade_to_unique_lock<Mutex> BOOST_THREAD_RV_REF_END other) BOOST_NOEXCEPT
         {
             upgrade_to_unique_lock temp(other);
             swap(temp);
             return *this;
         }
-#endif
-        void swap(upgrade_to_unique_lock& other)
+
+        void swap(upgrade_to_unique_lock& other) BOOST_NOEXCEPT
         {
             std::swap(source,other.source);
             exclusive.swap(other.exclusive);
         }
+
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
         typedef void (upgrade_to_unique_lock::*bool_type)(upgrade_to_unique_lock&);
-        operator bool_type() const
+        operator bool_type() const BOOST_NOEXCEPT
         {
             return exclusive.owns_lock()?&upgrade_to_unique_lock::swap:0;
         }
-        bool operator!() const
+        bool operator!() const BOOST_NOEXCEPT
         {
             return !owns_lock();
         }
-        bool owns_lock() const
+#else
+        explicit operator bool() const BOOST_NOEXCEPT
+        {
+            return owns_lock();
+        }
+#endif
+
+        bool owns_lock() const BOOST_NOEXCEPT
         {
             return exclusive.owns_lock();
         }
     };
 
+    BOOST_THREAD_DCL_MOVABLE_BEG(Mutex) upgrade_to_unique_lock<Mutex> BOOST_THREAD_DCL_MOVABLE_END
+
     namespace detail
     {
         template<typename Mutex>
@@ -988,9 +1257,11 @@ namespace boost
         {
             typedef unique_lock<Mutex> base;
         public:
+            BOOST_THREAD_MOVABLE_ONLY(try_lock_wrapper)
+
             try_lock_wrapper()
             {}
-            
+
             explicit try_lock_wrapper(Mutex& m):
                 base(m,try_to_lock)
             {}
@@ -1004,54 +1275,27 @@ namespace boost
             try_lock_wrapper(Mutex& m_,try_to_lock_t):
                 base(m_,try_to_lock)
             {}
-#ifndef BOOST_NO_RVALUE_REFERENCES
-            try_lock_wrapper(try_lock_wrapper&& other):
-                base(other.move())
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+            try_lock_wrapper(BOOST_THREAD_RV_REF(try_lock_wrapper) other):
+                base(::boost::move(other))
             {}
 
-            try_lock_wrapper&& move()
-            {
-                return static_cast<try_lock_wrapper&&>(*this);
-            }
-
-            try_lock_wrapper& operator=(try_lock_wrapper<Mutex>&& other)
-            {
-                try_lock_wrapper temp(other.move());
-                swap(temp);
-                return *this;
-            }
+#elif defined BOOST_THREAD_USES_MOVE
+            try_lock_wrapper(BOOST_THREAD_RV_REF(try_lock_wrapper) other):
+                base(::boost::move(static_cast<base&>(other)))
+            {}
 
-            void swap(try_lock_wrapper&& other)
-            {
-                base::swap(other);
-            }
 #else
-            try_lock_wrapper(detail::thread_move_t<try_lock_wrapper<Mutex> > other):
-                base(detail::thread_move_t<base>(*other))
+            try_lock_wrapper(BOOST_THREAD_RV_REF(try_lock_wrapper) other):
+                base(BOOST_THREAD_RV_REF(base)(*other))
             {}
-
-            operator detail::thread_move_t<try_lock_wrapper<Mutex> >()
-            {
-                return move();
-            }
-
-            detail::thread_move_t<try_lock_wrapper<Mutex> > move()
-            {
-                return detail::thread_move_t<try_lock_wrapper<Mutex> >(*this);
-            }
-
-            try_lock_wrapper& operator=(detail::thread_move_t<try_lock_wrapper<Mutex> > other)
+#endif
+            try_lock_wrapper& operator=(BOOST_THREAD_RV_REF_BEG try_lock_wrapper<Mutex> BOOST_THREAD_RV_REF_END other)
             {
                 try_lock_wrapper temp(other);
                 swap(temp);
                 return *this;
             }
-
-            void swap(detail::thread_move_t<try_lock_wrapper<Mutex> > other)
-            {
-                base::swap(*other);
-            }
-#endif
             void swap(try_lock_wrapper& other)
             {
                 base::swap(other);
@@ -1080,32 +1324,31 @@ namespace boost
             {
                 return base::release();
             }
-            bool operator!() const
-            {
-                return !this->owns_lock();
-            }
 
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
             typedef typename base::bool_type bool_type;
             operator bool_type() const
             {
                 return base::operator bool_type();
             }
+            bool operator!() const
+            {
+                return !this->owns_lock();
+            }
+#else
+            explicit operator bool() const
+            {
+                return owns_lock();
+            }
+#endif
         };
 
-#ifndef BOOST_NO_RVALUE_REFERENCES
-        template<typename Mutex>
-        void swap(try_lock_wrapper<Mutex>&& lhs,try_lock_wrapper<Mutex>&& rhs)
-        {
-            lhs.swap(rhs);
-        }
-#else
         template<typename Mutex>
         void swap(try_lock_wrapper<Mutex>& lhs,try_lock_wrapper<Mutex>& rhs)
         {
             lhs.swap(rhs);
         }
-#endif
-        
+
         template<typename MutexType1,typename MutexType2>
         unsigned try_lock_internal(MutexType1& m1,MutexType2& m2)
         {
@@ -1234,7 +1477,7 @@ namespace boost
         template<bool x>
         struct is_mutex_type_wrapper
         {};
-        
+
         template<typename MutexType1,typename MutexType2>
         void lock_impl(MutexType1& m1,MutexType2& m2,is_mutex_type_wrapper<true>)
         {
@@ -1262,7 +1505,7 @@ namespace boost
         template<typename Iterator>
         void lock_impl(Iterator begin,Iterator end,is_mutex_type_wrapper<false>);
     }
-    
+
 
     template<typename MutexType1,typename MutexType2>
     void lock(MutexType1& m1,MutexType2& m2)
@@ -1407,7 +1650,7 @@ namespace boost
         {
             typedef int type;
         };
-        
+
         template<typename Iterator>
         struct try_lock_impl_return<Iterator,false>
         {
@@ -1423,7 +1666,7 @@ namespace boost
         template<typename Iterator>
         Iterator try_lock_impl(Iterator begin,Iterator end,is_mutex_type_wrapper<false>);
     }
-    
+
     template<typename MutexType1,typename MutexType2>
     typename detail::try_lock_impl_return<MutexType1>::type try_lock(MutexType1& m1,MutexType2& m2)
     {
@@ -1465,7 +1708,7 @@ namespace boost
     {
         return ((int)detail::try_lock_internal(m1,m2,m3,m4,m5))-1;
     }
-    
+
 
     namespace detail
     {
@@ -1474,13 +1717,13 @@ namespace boost
         {
             Iterator begin;
             Iterator end;
-            
+
             range_lock_guard(Iterator begin_,Iterator end_):
                 begin(begin_),end(end_)
             {
-                lock(begin,end);
+                boost::lock(begin,end);
             }
-            
+
             void release()
             {
                 begin=end;
@@ -1505,21 +1748,21 @@ namespace boost
             }
             typedef typename std::iterator_traits<Iterator>::value_type lock_type;
             unique_lock<lock_type> guard(*begin,try_to_lock);
-            
+
             if(!guard.owns_lock())
             {
                 return begin;
             }
-            Iterator const failed=try_lock(++begin,end);
+            Iterator const failed=boost::try_lock(++begin,end);
             if(failed==end)
             {
                 guard.release();
             }
-            
+
             return failed;
         }
     }
-    
+
 
     namespace detail
     {
@@ -1527,7 +1770,7 @@ namespace boost
         void lock_impl(Iterator begin,Iterator end,is_mutex_type_wrapper<false>)
         {
             typedef typename std::iterator_traits<Iterator>::value_type lock_type;
-        
+
             if(begin==end)
             {
                 return;
@@ -1536,14 +1779,14 @@ namespace boost
             Iterator second=begin;
             ++second;
             Iterator next=second;
-        
+
             for(;;)
             {
                 unique_lock<lock_type> begin_lock(*begin,defer_lock);
                 if(start_with_begin)
                 {
                     begin_lock.lock();
-                    Iterator const failed_lock=try_lock(next,end);
+                    Iterator const failed_lock=boost::try_lock(next,end);
                     if(failed_lock==end)
                     {
                         begin_lock.release();
@@ -1557,7 +1800,7 @@ namespace boost
                     detail::range_lock_guard<Iterator> guard(next,end);
                     if(begin_lock.try_lock())
                     {
-                        Iterator const failed_lock=try_lock(second,next);
+                        Iterator const failed_lock=boost::try_lock(second,next);
                         if(failed_lock==next)
                         {
                             begin_lock.release();
@@ -1575,11 +1818,10 @@ namespace boost
                 }
             }
         }
-        
+
     }
-    
-}
 
+}
 #include <boost/config/abi_suffix.hpp>
 
 #endif
diff --git a/ext/boost/thread/once.hpp b/ext/boost/thread/once.hpp
index 975304e..acd216e 100644
--- a/ext/boost/thread/once.hpp
+++ b/ext/boost/thread/once.hpp
@@ -3,7 +3,7 @@
 
 //  once.hpp
 //
-//  (C) Copyright 2006-7 Anthony Williams 
+//  (C) Copyright 2006-7 Anthony Williams
 //
 //  Distributed under the Boost Software License, Version 1.0. (See
 //  accompanying file LICENSE_1_0.txt or copy at
@@ -22,6 +22,8 @@
 
 namespace boost
 {
+  // template<class Callable, class ...Args> void
+  // call_once(once_flag& flag, Callable&& func, Args&&... args);
     inline void call_once(void (*func)(),once_flag& flag)
     {
         call_once(flag,func);
diff --git a/ext/boost/thread/pthread/._thread_heap_alloc.hpp b/ext/boost/thread/pthread/._thread_heap_alloc.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/pthread/._thread_heap_alloc.hpp and /dev/null differ
diff --git a/ext/boost/thread/pthread/._timespec.hpp b/ext/boost/thread/pthread/._timespec.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/thread/pthread/._timespec.hpp and /dev/null differ
diff --git a/ext/boost/thread/pthread/condition_variable.hpp b/ext/boost/thread/pthread/condition_variable.hpp
index 3a69267..aa71007 100644
--- a/ext/boost/thread/pthread/condition_variable.hpp
+++ b/ext/boost/thread/pthread/condition_variable.hpp
@@ -4,69 +4,128 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 // (C) Copyright 2007-10 Anthony Williams
+// (C) Copyright 2011 Vicente J. Botet Escriba
 
-#include "timespec.hpp"
-#include "pthread_mutex_scoped_lock.hpp"
-#include "thread_data.hpp"
-#include "condition_variable_fwd.hpp"
+#include <boost/thread/pthread/timespec.hpp>
+#include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
+#include <boost/thread/pthread/thread_data.hpp>
+#include <boost/thread/pthread/condition_variable_fwd.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
+#include <boost/thread/detail/delete.hpp>
 
 #include <boost/config/abi_prefix.hpp>
 
 namespace boost
 {
+    namespace this_thread
+    {
+        void BOOST_THREAD_DECL interruption_point();
+    }
+
+    namespace thread_cv_detail
+    {
+        template<typename MutexType>
+        struct lock_on_exit
+        {
+            MutexType* m;
+
+            lock_on_exit():
+                m(0)
+            {}
+
+            void activate(MutexType& m_)
+            {
+                m_.unlock();
+                m=&m_;
+            }
+            ~lock_on_exit()
+            {
+                if(m)
+                {
+                    m->lock();
+                }
+           }
+        };
+    }
+
     inline void condition_variable::wait(unique_lock<mutex>& m)
     {
-        detail::interruption_checker check_for_interruption(&cond);
-        int ret;
-        do {
-            ret = pthread_cond_wait(&cond,m.mutex()->native_handle());
-        } while (ret == EINTR);
+        int res=0;
+        {
+            thread_cv_detail::lock_on_exit<unique_lock<mutex> > guard;
+            detail::interruption_checker check_for_interruption(&internal_mutex,&cond);
+            guard.activate(m);
+            do {
+              res = pthread_cond_wait(&cond,&internal_mutex);
+            } while (res == EINTR);
+        }
+        this_thread::interruption_point();
+        if(res)
+        {
+            boost::throw_exception(condition_error(res, "boost:: condition_variable constructor failed in pthread_cond_wait"));
+        }
     }
 
-    inline bool condition_variable::timed_wait(unique_lock<mutex>& m,boost::system_time const& wait_until)
+    inline bool condition_variable::do_timed_wait(
+                unique_lock<mutex>& m,
+                struct timespec const &timeout)
     {
-        detail::interruption_checker check_for_interruption(&cond);
-        struct timespec const timeout=detail::get_timespec(wait_until);
-        int const cond_res=pthread_cond_timedwait(&cond,m.mutex()->native_handle(),&timeout);
+        if (!m.owns_lock())
+            boost::throw_exception(condition_error(EPERM, "condition_variable do_timed_wait: mutex not locked"));
+
+        thread_cv_detail::lock_on_exit<unique_lock<mutex> > guard;
+        int cond_res;
+        {
+            detail::interruption_checker check_for_interruption(&internal_mutex,&cond);
+            guard.activate(m);
+            cond_res=pthread_cond_timedwait(&cond,&internal_mutex,&timeout);
+        }
+        this_thread::interruption_point();
         if(cond_res==ETIMEDOUT)
         {
             return false;
         }
-        BOOST_ASSERT(!cond_res);
+        if(cond_res)
+        {
+            boost::throw_exception(condition_error(cond_res, "condition_variable failed in pthread_cond_timedwait"));
+        }
         return true;
     }
 
-    inline void condition_variable::notify_one()
+    inline void condition_variable::notify_one() BOOST_NOEXCEPT
     {
+        boost::pthread::pthread_mutex_scoped_lock internal_lock(&internal_mutex);
         BOOST_VERIFY(!pthread_cond_signal(&cond));
     }
-        
-    inline void condition_variable::notify_all()
+
+    inline void condition_variable::notify_all() BOOST_NOEXCEPT
     {
+        boost::pthread::pthread_mutex_scoped_lock internal_lock(&internal_mutex);
         BOOST_VERIFY(!pthread_cond_broadcast(&cond));
     }
-    
+
     class condition_variable_any
     {
         pthread_mutex_t internal_mutex;
         pthread_cond_t cond;
 
-        condition_variable_any(condition_variable_any&);
-        condition_variable_any& operator=(condition_variable_any&);
-
     public:
+        BOOST_THREAD_NO_COPYABLE(condition_variable_any)
         condition_variable_any()
         {
             int const res=pthread_mutex_init(&internal_mutex,NULL);
             if(res)
             {
-                boost::throw_exception(thread_resource_error("Cannot initialize a mutex", res));
+                boost::throw_exception(thread_resource_error(res, "condition_variable_any failed in pthread_mutex_init"));
             }
             int const res2=pthread_cond_init(&cond,NULL);
             if(res2)
             {
                 BOOST_VERIFY(!pthread_mutex_destroy(&internal_mutex));
-                boost::throw_exception(thread_resource_error("Cannot initialize a condition variable", res2));
+                boost::throw_exception(thread_resource_error(res, "condition_variable_any failed in pthread_cond_init"));
             }
         }
         ~condition_variable_any()
@@ -74,23 +133,21 @@ namespace boost
             BOOST_VERIFY(!pthread_mutex_destroy(&internal_mutex));
             BOOST_VERIFY(!pthread_cond_destroy(&cond));
         }
-        
+
         template<typename lock_type>
         void wait(lock_type& m)
         {
             int res=0;
             {
-                detail::interruption_checker check_for_interruption(&cond);
-                {
-                    boost::pthread::pthread_mutex_scoped_lock internal_lock(&internal_mutex);
-                    m.unlock();
-                    res=pthread_cond_wait(&cond,&internal_mutex);
-                }
-                m.lock();
+                thread_cv_detail::lock_on_exit<lock_type> guard;
+                detail::interruption_checker check_for_interruption(&internal_mutex,&cond);
+                guard.activate(m);
+                res=pthread_cond_wait(&cond,&internal_mutex);
             }
+            this_thread::interruption_point();
             if(res)
             {
-                boost::throw_exception(condition_error());
+                boost::throw_exception(condition_error(res, "condition_variable_any failed in pthread_cond_wait"));
             }
         }
 
@@ -99,30 +156,12 @@ namespace boost
         {
             while(!pred()) wait(m);
         }
-        
+
         template<typename lock_type>
         bool timed_wait(lock_type& m,boost::system_time const& wait_until)
         {
             struct timespec const timeout=detail::get_timespec(wait_until);
-            int res=0;
-            {
-                detail::interruption_checker check_for_interruption(&cond);
-                {
-                    boost::pthread::pthread_mutex_scoped_lock internal_lock(&internal_mutex);
-                    m.unlock();
-                    res=pthread_cond_timedwait(&cond,&internal_mutex,&timeout);
-                }
-                m.lock();
-            }
-            if(res==ETIMEDOUT)
-            {
-                return false;
-            }
-            if(res)
-            {
-                boost::throw_exception(condition_error());
-            }
-            return true;
+            return do_timed_wait(m, timeout);
         }
         template<typename lock_type>
         bool timed_wait(lock_type& m,xtime const& wait_until)
@@ -159,17 +198,134 @@ namespace boost
             return timed_wait(m,get_system_time()+wait_duration,pred);
         }
 
-        void notify_one()
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class lock_type,class Duration>
+        cv_status
+        wait_until(
+                lock_type& lock,
+                const chrono::time_point<chrono::system_clock, Duration>& t)
+        {
+          using namespace chrono;
+          typedef time_point<system_clock, nanoseconds> nano_sys_tmpt;
+          wait_until(lock,
+                        nano_sys_tmpt(ceil<nanoseconds>(t.time_since_epoch())));
+          return system_clock::now() < t ? cv_status::no_timeout :
+                                             cv_status::timeout;
+        }
+
+        template <class lock_type, class Clock, class Duration>
+        cv_status
+        wait_until(
+                lock_type& lock,
+                const chrono::time_point<Clock, Duration>& t)
+        {
+          using namespace chrono;
+          system_clock::time_point     s_now = system_clock::now();
+          typename Clock::time_point  c_now = Clock::now();
+          wait_until(lock, s_now + ceil<nanoseconds>(t - c_now));
+          return Clock::now() < t ? cv_status::no_timeout : cv_status::timeout;
+        }
+
+        template <class lock_type, class Clock, class Duration, class Predicate>
+        bool
+        wait_until(
+                lock_type& lock,
+                const chrono::time_point<Clock, Duration>& t,
+                Predicate pred)
+        {
+            while (!pred())
+            {
+                if (wait_until(lock, t) == cv_status::timeout)
+                    return pred();
+            }
+            return true;
+        }
+
+
+        template <class lock_type, class Rep, class Period>
+        cv_status
+        wait_for(
+                lock_type& lock,
+                const chrono::duration<Rep, Period>& d)
+        {
+          using namespace chrono;
+          system_clock::time_point s_now = system_clock::now();
+          steady_clock::time_point c_now = steady_clock::now();
+          wait_until(lock, s_now + ceil<nanoseconds>(d));
+          return steady_clock::now() - c_now < d ? cv_status::no_timeout :
+                                                   cv_status::timeout;
+
+        }
+
+
+        template <class lock_type, class Rep, class Period, class Predicate>
+        bool
+        wait_for(
+                lock_type& lock,
+                const chrono::duration<Rep, Period>& d,
+                Predicate pred)
+        {
+          while (!pred())
+          {
+              if (wait_for(lock, d) == cv_status::timeout)
+                  return pred();
+          }
+          return true;
+        }
+
+        template <class lock_type>
+        inline void wait_until(
+            lock_type& lk,
+            chrono::time_point<chrono::system_clock, chrono::nanoseconds> tp)
+        {
+            using namespace chrono;
+            nanoseconds d = tp.time_since_epoch();
+            timespec ts;
+            seconds s = duration_cast<seconds>(d);
+            ts.tv_sec = static_cast<long>(s.count());
+            ts.tv_nsec = static_cast<long>((d - s).count());
+            do_timed_wait(lk, ts);
+        }
+#endif
+
+        void notify_one() BOOST_NOEXCEPT
         {
             boost::pthread::pthread_mutex_scoped_lock internal_lock(&internal_mutex);
             BOOST_VERIFY(!pthread_cond_signal(&cond));
         }
-        
-        void notify_all()
+
+        void notify_all() BOOST_NOEXCEPT
         {
             boost::pthread::pthread_mutex_scoped_lock internal_lock(&internal_mutex);
             BOOST_VERIFY(!pthread_cond_broadcast(&cond));
         }
+    private: // used by boost::thread::try_join_until
+
+        template <class lock_type>
+        inline bool do_timed_wait(
+          lock_type& m,
+          struct timespec const &timeout)
+        {
+          int res=0;
+          {
+              thread_cv_detail::lock_on_exit<lock_type> guard;
+              detail::interruption_checker check_for_interruption(&internal_mutex,&cond);
+              guard.activate(m);
+              res=pthread_cond_timedwait(&cond,&internal_mutex,&timeout);
+          }
+          this_thread::interruption_point();
+          if(res==ETIMEDOUT)
+          {
+              return false;
+          }
+          if(res)
+          {
+              boost::throw_exception(condition_error(res, "condition_variable_any failed in pthread_cond_timedwait"));
+          }
+          return true;
+        }
+
+
     };
 
 }
diff --git a/ext/boost/thread/pthread/condition_variable_fwd.hpp b/ext/boost/thread/pthread/condition_variable_fwd.hpp
index 99e3711..dbb3892 100644
--- a/ext/boost/thread/pthread/condition_variable_fwd.hpp
+++ b/ext/boost/thread/pthread/condition_variable_fwd.hpp
@@ -4,42 +4,57 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 // (C) Copyright 2007-8 Anthony Williams
+// (C) Copyright 2011 Vicente J. Botet Escriba
 
 #include <boost/assert.hpp>
 #include <boost/throw_exception.hpp>
 #include <pthread.h>
+#include <boost/thread/cv_status.hpp>
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/locks.hpp>
 #include <boost/thread/thread_time.hpp>
 #include <boost/thread/xtime.hpp>
-
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
+#include <boost/thread/detail/delete.hpp>
+#include <boost/date_time/posix_time/posix_time_duration.hpp>
 #include <boost/config/abi_prefix.hpp>
 
 namespace boost
 {
+
     class condition_variable
     {
     private:
+        pthread_mutex_t internal_mutex;
         pthread_cond_t cond;
-        
-        condition_variable(condition_variable&);
-        condition_variable& operator=(condition_variable&);
 
     public:
+      BOOST_THREAD_NO_COPYABLE(condition_variable)
         condition_variable()
         {
-            int const res=pthread_cond_init(&cond,NULL);
+            int const res=pthread_mutex_init(&internal_mutex,NULL);
             if(res)
             {
-                boost::throw_exception(thread_resource_error("Cannot initialize a condition variable", res));
+                boost::throw_exception(thread_resource_error(res, "boost:: condition_variable constructor failed in pthread_mutex_init"));
+            }
+            int const res2=pthread_cond_init(&cond,NULL);
+            if(res2)
+            {
+                BOOST_VERIFY(!pthread_mutex_destroy(&internal_mutex));
+                boost::throw_exception(thread_resource_error(res2, "boost:: condition_variable constructor failed in pthread_cond_init"));
             }
         }
         ~condition_variable()
         {
+            BOOST_VERIFY(!pthread_mutex_destroy(&internal_mutex));
             int ret;
             do {
-                ret = pthread_cond_destroy(&cond);
+              ret = pthread_cond_destroy(&cond);
             } while (ret == EINTR);
+            BOOST_VERIFY(!ret);
         }
 
         void wait(unique_lock<mutex>& m);
@@ -50,21 +65,38 @@ namespace boost
             while(!pred()) wait(m);
         }
 
-        inline bool timed_wait(unique_lock<mutex>& m,
-                               boost::system_time const& wait_until);
-        bool timed_wait(unique_lock<mutex>& m,xtime const& wait_until)
+
+        inline bool timed_wait(
+            unique_lock<mutex>& m,
+            boost::system_time const& wait_until)
+        {
+#if defined BOOST_THREAD_WAIT_BUG
+            struct timespec const timeout=detail::get_timespec(wait_until + BOOST_THREAD_WAIT_BUG);
+            return do_timed_wait(m, timeout);
+#else
+            struct timespec const timeout=detail::get_timespec(wait_until);
+            return do_timed_wait(m, timeout);
+#endif
+        }
+        bool timed_wait(
+            unique_lock<mutex>& m,
+            xtime const& wait_until)
         {
             return timed_wait(m,system_time(wait_until));
         }
 
         template<typename duration_type>
-        bool timed_wait(unique_lock<mutex>& m,duration_type const& wait_duration)
+        bool timed_wait(
+            unique_lock<mutex>& m,
+            duration_type const& wait_duration)
         {
             return timed_wait(m,get_system_time()+wait_duration);
         }
 
         template<typename predicate_type>
-        bool timed_wait(unique_lock<mutex>& m,boost::system_time const& wait_until,predicate_type pred)
+        bool timed_wait(
+            unique_lock<mutex>& m,
+            boost::system_time const& wait_until,predicate_type pred)
         {
             while (!pred())
             {
@@ -75,28 +107,133 @@ namespace boost
         }
 
         template<typename predicate_type>
-        bool timed_wait(unique_lock<mutex>& m,xtime const& wait_until,predicate_type pred)
+        bool timed_wait(
+            unique_lock<mutex>& m,
+            xtime const& wait_until,predicate_type pred)
         {
             return timed_wait(m,system_time(wait_until),pred);
         }
 
         template<typename duration_type,typename predicate_type>
-        bool timed_wait(unique_lock<mutex>& m,duration_type const& wait_duration,predicate_type pred)
+        bool timed_wait(
+            unique_lock<mutex>& m,
+            duration_type const& wait_duration,predicate_type pred)
         {
             return timed_wait(m,get_system_time()+wait_duration,pred);
         }
 
+#ifdef BOOST_THREAD_USES_CHRONO
+
+        template <class Duration>
+        cv_status
+        wait_until(
+                unique_lock<mutex>& lock,
+                const chrono::time_point<chrono::system_clock, Duration>& t)
+        {
+          using namespace chrono;
+          typedef time_point<system_clock, nanoseconds> nano_sys_tmpt;
+          wait_until(lock,
+                        nano_sys_tmpt(ceil<nanoseconds>(t.time_since_epoch())));
+          return system_clock::now() < t ? cv_status::no_timeout :
+                                             cv_status::timeout;
+        }
+
+        template <class Clock, class Duration>
+        cv_status
+        wait_until(
+                unique_lock<mutex>& lock,
+                const chrono::time_point<Clock, Duration>& t)
+        {
+          using namespace chrono;
+          system_clock::time_point     s_now = system_clock::now();
+          typename Clock::time_point  c_now = Clock::now();
+          wait_until(lock, s_now + ceil<nanoseconds>(t - c_now));
+          return Clock::now() < t ? cv_status::no_timeout : cv_status::timeout;
+        }
+
+        template <class Clock, class Duration, class Predicate>
+        bool
+        wait_until(
+                unique_lock<mutex>& lock,
+                const chrono::time_point<Clock, Duration>& t,
+                Predicate pred)
+        {
+            while (!pred())
+            {
+                if (wait_until(lock, t) == cv_status::timeout)
+                    return pred();
+            }
+            return true;
+        }
+
+
+        template <class Rep, class Period>
+        cv_status
+        wait_for(
+                unique_lock<mutex>& lock,
+                const chrono::duration<Rep, Period>& d)
+        {
+          using namespace chrono;
+          system_clock::time_point s_now = system_clock::now();
+          steady_clock::time_point c_now = steady_clock::now();
+          wait_until(lock, s_now + ceil<nanoseconds>(d));
+          return steady_clock::now() - c_now < d ? cv_status::no_timeout :
+                                                   cv_status::timeout;
+
+        }
+
+
+        template <class Rep, class Period, class Predicate>
+        bool
+        wait_for(
+                unique_lock<mutex>& lock,
+                const chrono::duration<Rep, Period>& d,
+                Predicate pred)
+        {
+          while (!pred())
+          {
+              if (wait_for(lock, d) == cv_status::timeout)
+                  return pred();
+          }
+          return true;
+        }
+#endif
+
+#define BOOST_THREAD_DEFINES_CONDITION_VARIABLE_NATIVE_HANDLE
         typedef pthread_cond_t* native_handle_type;
         native_handle_type native_handle()
         {
             return &cond;
         }
 
-        void notify_one();
-        void notify_all();
+        void notify_one() BOOST_NOEXCEPT;
+        void notify_all() BOOST_NOEXCEPT;
+
+#ifdef BOOST_THREAD_USES_CHRONO
+        inline void wait_until(
+            unique_lock<mutex>& lk,
+            chrono::time_point<chrono::system_clock, chrono::nanoseconds> tp)
+        {
+            using namespace chrono;
+            nanoseconds d = tp.time_since_epoch();
+            timespec ts;
+            seconds s = duration_cast<seconds>(d);
+            ts.tv_sec = static_cast<long>(s.count());
+            ts.tv_nsec = static_cast<long>((d - s).count());
+            do_timed_wait(lk, ts);
+        }
+#endif
+        //private: // used by boost::thread::try_join_until
+
+        inline bool do_timed_wait(
+            unique_lock<mutex>& lock,
+            struct timespec const &timeout);
     };
+
+    BOOST_THREAD_DECL void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
 }
 
+
 #include <boost/config/abi_suffix.hpp>
 
 #endif
diff --git a/ext/boost/thread/pthread/mutex.hpp b/ext/boost/thread/pthread/mutex.hpp
index 9bcd229..2c5af92 100644
--- a/ext/boost/thread/pthread/mutex.hpp
+++ b/ext/boost/thread/pthread/mutex.hpp
@@ -1,12 +1,12 @@
 #ifndef BOOST_THREAD_PTHREAD_MUTEX_HPP
 #define BOOST_THREAD_PTHREAD_MUTEX_HPP
 // (C) Copyright 2007-8 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
 #include <pthread.h>
-#include <boost/utility.hpp>
 #include <boost/throw_exception.hpp>
 #include <boost/thread/exceptions.hpp>
 #include <boost/thread/locks.hpp>
@@ -14,11 +14,16 @@
 #include <boost/thread/xtime.hpp>
 #include <boost/assert.hpp>
 #include <errno.h>
-#include "timespec.hpp"
-#include "pthread_mutex_scoped_lock.hpp"
+#include <boost/thread/pthread/timespec.hpp>
+#include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
+#include <boost/thread/detail/delete.hpp>
 
 #ifdef _POSIX_TIMEOUTS
-#if _POSIX_TIMEOUTS >= 0
+#if _POSIX_TIMEOUTS >= 0 && _POSIX_C_SOURCE>=200112L
 #define BOOST_PTHREAD_HAS_TIMEDLOCK
 #endif
 #endif
@@ -30,16 +35,16 @@ namespace boost
     class mutex
     {
     private:
-        mutex(mutex const&);
-        mutex& operator=(mutex const&);        
         pthread_mutex_t m;
     public:
+        BOOST_THREAD_NO_COPYABLE(mutex)
+
         mutex()
         {
             int const res=pthread_mutex_init(&m,NULL);
             if(res)
             {
-                boost::throw_exception(thread_resource_error("Cannot initialize a mutex", res));
+                boost::throw_exception(thread_resource_error(res, "boost:: mutex constructor failed in pthread_mutex_init"));
             }
         }
         ~mutex()
@@ -48,18 +53,19 @@ namespace boost
             do
             {
                 ret = pthread_mutex_destroy(&m);
-            } while(ret==EINTR);
+            } while (ret == EINTR);
         }
-        
+
         void lock()
         {
             int res;
             do
             {
                 res = pthread_mutex_lock(&m);
-            } while (res==EINTR);
-            if(res) {
-                boost::throw_exception(lock_error(res));
+            } while (res == EINTR);
+            if (res)
+            {
+                boost::throw_exception(lock_error(res,"boost: mutex lock failed in pthread_mutex_lock"));
             }
         }
 
@@ -69,23 +75,30 @@ namespace boost
             do
             {
                 ret = pthread_mutex_unlock(&m);
-            } while (ret==EINTR);
+            } while (ret == EINTR);
             BOOST_VERIFY(!ret);
         }
-        
+
         bool try_lock()
         {
             int res;
-            do {
+            do
+            {
                 res = pthread_mutex_trylock(&m);
             } while (res == EINTR);
             if(res && (res!=EBUSY))
             {
-                boost::throw_exception(lock_error(res));
+                // The following throw_exception has been replaced by an assertion and just return false,
+                // as this is an internal error and the user can do nothing with the exception.
+                //boost::throw_exception(lock_error(res,"boost: mutex try_lock failed in pthread_mutex_trylock"));
+                BOOST_ASSERT_MSG(false ,"boost: mutex try_lock failed in pthread_mutex_trylock");
+                return false;
             }
+
             return !res;
         }
 
+#define BOOST_THREAD_DEFINES_MUTEX_NATIVE_HANDLE
         typedef pthread_mutex_t* native_handle_type;
         native_handle_type native_handle()
         {
@@ -101,28 +114,26 @@ namespace boost
     class timed_mutex
     {
     private:
-        timed_mutex(timed_mutex const&);
-        timed_mutex& operator=(timed_mutex const&);        
-    private:
         pthread_mutex_t m;
 #ifndef BOOST_PTHREAD_HAS_TIMEDLOCK
         pthread_cond_t cond;
         bool is_locked;
 #endif
     public:
+        BOOST_THREAD_NO_COPYABLE(timed_mutex)
         timed_mutex()
         {
             int const res=pthread_mutex_init(&m,NULL);
             if(res)
             {
-                boost::throw_exception(thread_resource_error("Cannot initialize a mutex", res));
+                boost::throw_exception(thread_resource_error(res, "boost:: timed_mutex constructor failed in pthread_mutex_init"));
             }
 #ifndef BOOST_PTHREAD_HAS_TIMEDLOCK
             int const res2=pthread_cond_init(&cond,NULL);
             if(res2)
             {
                 BOOST_VERIFY(!pthread_mutex_destroy(&m));
-                boost::throw_exception(thread_resource_error("Cannot initialize a condition variable", res2));
+                boost::throw_exception(thread_resource_error(res2, "boost:: timed_mutex constructor failed in pthread_cond_init"));
             }
             is_locked=false;
 #endif
@@ -155,26 +166,23 @@ namespace boost
         {
             BOOST_VERIFY(!pthread_mutex_unlock(&m));
         }
-        
+
         bool try_lock()
         {
             int const res=pthread_mutex_trylock(&m);
             BOOST_ASSERT(!res || res==EBUSY);
             return !res;
         }
-        bool timed_lock(system_time const & abs_time)
-        {
-            struct timespec const timeout=detail::get_timespec(abs_time);
-            int const res=pthread_mutex_timedlock(&m,&timeout);
-            BOOST_ASSERT(!res || res==ETIMEDOUT);
-            return !res;
-        }
 
-        typedef pthread_mutex_t* native_handle_type;
-        native_handle_type native_handle()
+
+    private:
+        bool do_try_lock_until(struct timespec const &timeout)
         {
-            return &m;
+          int const res=pthread_mutex_timedlock(&m,&timeout);
+          BOOST_ASSERT(!res || res==ETIMEDOUT);
+          return !res;
         }
+    public:
 
 #else
         void lock()
@@ -193,7 +201,7 @@ namespace boost
             is_locked=false;
             BOOST_VERIFY(!pthread_cond_signal(&cond));
         }
-        
+
         bool try_lock()
         {
             boost::pthread::pthread_mutex_scoped_lock const local_lock(&m);
@@ -205,9 +213,9 @@ namespace boost
             return true;
         }
 
-        bool timed_lock(system_time const & abs_time)
+    private:
+        bool do_try_lock_until(struct timespec const &timeout)
         {
-            struct timespec const timeout=detail::get_timespec(abs_time);
             boost::pthread::pthread_mutex_scoped_lock const local_lock(&m);
             while(is_locked)
             {
@@ -221,8 +229,55 @@ namespace boost
             is_locked=true;
             return true;
         }
+    public:
 #endif
 
+        bool timed_lock(system_time const & abs_time)
+        {
+            struct timespec const ts=detail::get_timespec(abs_time);
+            return do_try_lock_until(ts);
+        }
+
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Rep, class Period>
+        bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
+        {
+          return try_lock_until(chrono::steady_clock::now() + rel_time);
+        }
+        template <class Clock, class Duration>
+        bool try_lock_until(const chrono::time_point<Clock, Duration>& t)
+        {
+          using namespace chrono;
+          system_clock::time_point     s_now = system_clock::now();
+          typename Clock::time_point  c_now = Clock::now();
+          return try_lock_until(s_now + ceil<nanoseconds>(t - c_now));
+        }
+        template <class Duration>
+        bool try_lock_until(const chrono::time_point<chrono::system_clock, Duration>& t)
+        {
+          using namespace chrono;
+          typedef time_point<system_clock, nanoseconds> nano_sys_tmpt;
+          return try_lock_until(nano_sys_tmpt(ceil<nanoseconds>(t.time_since_epoch())));
+        }
+        bool try_lock_until(const chrono::time_point<chrono::system_clock, chrono::nanoseconds>& tp)
+        {
+          using namespace chrono;
+          nanoseconds d = tp.time_since_epoch();
+          timespec ts;
+          seconds s = duration_cast<seconds>(d);
+          ts.tv_sec = static_cast<long>(s.count());
+          ts.tv_nsec = static_cast<long>((d - s).count());
+          return do_try_lock_until(ts);
+        }
+#endif
+
+#define BOOST_THREAD_DEFINES_TIMED_MUTEX_NATIVE_HANDLE
+        typedef pthread_mutex_t* native_handle_type;
+        native_handle_type native_handle()
+        {
+            return &m;
+        }
+
         typedef unique_lock<timed_mutex> scoped_timed_lock;
         typedef detail::try_lock_wrapper<timed_mutex> scoped_try_lock;
         typedef scoped_timed_lock scoped_lock;
diff --git a/ext/boost/thread/pthread/once.hpp b/ext/boost/thread/pthread/once.hpp
index 6321aa2..02c2732 100644
--- a/ext/boost/thread/pthread/once.hpp
+++ b/ext/boost/thread/pthread/once.hpp
@@ -3,53 +3,86 @@
 
 //  once.hpp
 //
-//  (C) Copyright 2007-8 Anthony Williams 
+//  (C) Copyright 2007-8 Anthony Williams
+//  (C) Copyright 2011-2012 Vicente J. Botet Escriba
 //
 //  Distributed under the Boost Software License, Version 1.0. (See
 //  accompanying file LICENSE_1_0.txt or copy at
 //  http://www.boost.org/LICENSE_1_0.txt)
 
 #include <boost/thread/detail/config.hpp>
-#include <boost/config.hpp>
 
-#include <pthread.h>
-#include <boost/assert.hpp>
-#include "pthread_mutex_scoped_lock.hpp"
 #include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
-#include <boost/cstdint.hpp>
+#include <boost/thread/detail/delete.hpp>
+#include <boost/detail/no_exceptions_support.hpp>
 
+#include <boost/assert.hpp>
 #include <boost/config/abi_prefix.hpp>
 
+#include <boost/cstdint.hpp>
+#include <pthread.h>
+#include <csignal>
+
 namespace boost
 {
 
+#define BOOST_ONCE_INITIAL_FLAG_VALUE 0
+
+  namespace thread_detail
+  {
+//#ifdef SIG_ATOMIC_MAX
+//    typedef sig_atomic_t  uintmax_atomic_t;
+//    #define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C SIG_ATOMIC_MAX
+//#else
+    typedef unsigned long  uintmax_atomic_t;
+    #define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_C2(value) value##ul
+    #define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_C2(~0)
+//#endif
+  }
+
+#ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11
+
+  struct once_flag
+  {
+      BOOST_THREAD_NO_COPYABLE(once_flag)
+      BOOST_CONSTEXPR once_flag() BOOST_NOEXCEPT
+        : epoch(BOOST_ONCE_INITIAL_FLAG_VALUE)
+      {}
+  private:
+      volatile thread_detail::uintmax_atomic_t epoch;
+      template<typename Function>
+      friend
+      void call_once(once_flag& flag,Function f);
+  };
+
+#else // BOOST_THREAD_PROVIDES_ONCE_CXX11
+
     struct once_flag
     {
-        boost::uintmax_t epoch;
+      volatile thread_detail::uintmax_atomic_t epoch;
     };
 
+#define BOOST_ONCE_INIT {BOOST_ONCE_INITIAL_FLAG_VALUE}
+#endif // BOOST_THREAD_PROVIDES_ONCE_CXX11
+
     namespace detail
     {
-        BOOST_THREAD_DECL boost::uintmax_t& get_once_per_thread_epoch();
-        BOOST_THREAD_DECL extern boost::uintmax_t once_global_epoch;
+        BOOST_THREAD_DECL thread_detail::uintmax_atomic_t& get_once_per_thread_epoch();
+        BOOST_THREAD_DECL extern thread_detail::uintmax_atomic_t once_global_epoch;
         BOOST_THREAD_DECL extern pthread_mutex_t once_epoch_mutex;
         BOOST_THREAD_DECL extern pthread_cond_t once_epoch_cv;
     }
-    
-#define BOOST_ONCE_INITIAL_FLAG_VALUE 0
-#define BOOST_ONCE_INIT {BOOST_ONCE_INITIAL_FLAG_VALUE}
-
 
     // Based on Mike Burrows fast_pthread_once algorithm as described in
     // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2444.html
     template<typename Function>
     void call_once(once_flag& flag,Function f)
     {
-        static boost::uintmax_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
-        static boost::uintmax_t const being_initialized=uninitialized_flag+1;
-        boost::uintmax_t const epoch=flag.epoch;
-        boost::uintmax_t& this_thread_epoch=detail::get_once_per_thread_epoch();
-        
+        static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
+        static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
+        thread_detail::uintmax_atomic_t const epoch=flag.epoch;
+        thread_detail::uintmax_atomic_t& this_thread_epoch=detail::get_once_per_thread_epoch();
+
         if(epoch<this_thread_epoch)
         {
             pthread::pthread_mutex_scoped_lock lk(&detail::once_epoch_mutex);
@@ -59,21 +92,18 @@ namespace boost
                 if(flag.epoch==uninitialized_flag)
                 {
                     flag.epoch=being_initialized;
-#ifndef BOOST_NO_EXCEPTIONS
-                    try
+                    BOOST_TRY
                     {
-#endif
                         pthread::pthread_mutex_scoped_unlock relocker(&detail::once_epoch_mutex);
                         f();
-#ifndef BOOST_NO_EXCEPTIONS
                     }
-                    catch(...)
+                    BOOST_CATCH (...)
                     {
                         flag.epoch=uninitialized_flag;
                         BOOST_VERIFY(!pthread_cond_broadcast(&detail::once_epoch_cv));
-                        throw;
+                        BOOST_RETHROW
                     }
-#endif
+                    BOOST_CATCH_END
                     flag.epoch=--detail::once_global_epoch;
                     BOOST_VERIFY(!pthread_cond_broadcast(&detail::once_epoch_cv));
                 }
diff --git a/ext/boost/thread/pthread/pthread_mutex_scoped_lock.hpp b/ext/boost/thread/pthread/pthread_mutex_scoped_lock.hpp
index 2407f91..cdbf8c6 100644
--- a/ext/boost/thread/pthread/pthread_mutex_scoped_lock.hpp
+++ b/ext/boost/thread/pthread/pthread_mutex_scoped_lock.hpp
@@ -18,15 +18,25 @@ namespace boost
         class pthread_mutex_scoped_lock
         {
             pthread_mutex_t* m;
+            bool locked;
         public:
             explicit pthread_mutex_scoped_lock(pthread_mutex_t* m_):
-                m(m_)
+                m(m_),locked(true)
             {
                 BOOST_VERIFY(!pthread_mutex_lock(m));
             }
-            ~pthread_mutex_scoped_lock()
+            void unlock()
             {
                 BOOST_VERIFY(!pthread_mutex_unlock(m));
+                locked=false;
+            }
+            
+            ~pthread_mutex_scoped_lock()
+            {
+                if(locked)
+                {
+                    unlock();
+                }
             }
             
         };
diff --git a/ext/boost/thread/pthread/recursive_mutex.hpp b/ext/boost/thread/pthread/recursive_mutex.hpp
index 4158a57..2a6bc7d 100644
--- a/ext/boost/thread/pthread/recursive_mutex.hpp
+++ b/ext/boost/thread/pthread/recursive_mutex.hpp
@@ -1,12 +1,12 @@
 #ifndef BOOST_THREAD_PTHREAD_RECURSIVE_MUTEX_HPP
 #define BOOST_THREAD_PTHREAD_RECURSIVE_MUTEX_HPP
 // (C) Copyright 2007-8 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
 #include <pthread.h>
-#include <boost/utility.hpp>
 #include <boost/throw_exception.hpp>
 #include <boost/thread/exceptions.hpp>
 #include <boost/thread/locks.hpp>
@@ -17,8 +17,13 @@
 #endif
 #include <boost/date_time/posix_time/conversion.hpp>
 #include <errno.h>
-#include "timespec.hpp"
-#include "pthread_mutex_scoped_lock.hpp"
+#include <boost/thread/pthread/timespec.hpp>
+#include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
+#include <boost/thread/detail/delete.hpp>
 
 #ifdef _POSIX_TIMEOUTS
 #if _POSIX_TIMEOUTS >= 0
@@ -26,7 +31,7 @@
 #endif
 #endif
 
-#if defined(BOOST_PTHREAD_HAS_MUTEXATTR_SETTYPE) && defined(BOOST_PTHREAD_HAS_TIMEDLOCK)
+#if defined(BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE) && defined(BOOST_PTHREAD_HAS_TIMEDLOCK)
 #define BOOST_USE_PTHREAD_RECURSIVE_TIMEDLOCK
 #endif
 
@@ -37,51 +42,50 @@ namespace boost
     class recursive_mutex
     {
     private:
-        recursive_mutex(recursive_mutex const&);
-        recursive_mutex& operator=(recursive_mutex const&);        
         pthread_mutex_t m;
-#ifndef BOOST_PTHREAD_HAS_MUTEXATTR_SETTYPE
+#ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
         pthread_cond_t cond;
         bool is_locked;
         pthread_t owner;
         unsigned count;
 #endif
     public:
+        BOOST_THREAD_NO_COPYABLE(recursive_mutex)
         recursive_mutex()
         {
-#ifdef BOOST_PTHREAD_HAS_MUTEXATTR_SETTYPE
+#ifdef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
             pthread_mutexattr_t attr;
-            
+
             int const init_attr_res=pthread_mutexattr_init(&attr);
             if(init_attr_res)
             {
-                boost::throw_exception(thread_resource_error());
+                boost::throw_exception(thread_resource_error(init_attr_res, "boost:: recursive_mutex constructor failed in pthread_mutexattr_init"));
             }
             int const set_attr_res=pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE);
             if(set_attr_res)
             {
                 BOOST_VERIFY(!pthread_mutexattr_destroy(&attr));
-                boost::throw_exception(thread_resource_error());
+                boost::throw_exception(thread_resource_error(set_attr_res, "boost:: recursive_mutex constructor failed in pthread_mutexattr_settype"));
             }
-            
+
             int const res=pthread_mutex_init(&m,&attr);
             if(res)
             {
                 BOOST_VERIFY(!pthread_mutexattr_destroy(&attr));
-                boost::throw_exception(thread_resource_error());
+                boost::throw_exception(thread_resource_error(res, "boost:: recursive_mutex constructor failed in pthread_mutex_init"));
             }
             BOOST_VERIFY(!pthread_mutexattr_destroy(&attr));
 #else
             int const res=pthread_mutex_init(&m,NULL);
             if(res)
             {
-                boost::throw_exception(thread_resource_error());
+                boost::throw_exception(thread_resource_error(res, "boost:: recursive_mutex constructor failed in pthread_mutex_init"));
             }
             int const res2=pthread_cond_init(&cond,NULL);
             if(res2)
             {
                 BOOST_VERIFY(!pthread_mutex_destroy(&m));
-                boost::throw_exception(thread_resource_error());
+                boost::throw_exception(thread_resource_error(res2, "boost:: recursive_mutex constructor failed in pthread_cond_init"));
             }
             is_locked=false;
             count=0;
@@ -90,12 +94,12 @@ namespace boost
         ~recursive_mutex()
         {
             BOOST_VERIFY(!pthread_mutex_destroy(&m));
-#ifndef BOOST_PTHREAD_HAS_MUTEXATTR_SETTYPE
+#ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
             BOOST_VERIFY(!pthread_cond_destroy(&cond));
 #endif
         }
 
-#ifdef BOOST_PTHREAD_HAS_MUTEXATTR_SETTYPE
+#ifdef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
         void lock()
         {
             BOOST_VERIFY(!pthread_mutex_lock(&m));
@@ -105,13 +109,14 @@ namespace boost
         {
             BOOST_VERIFY(!pthread_mutex_unlock(&m));
         }
-        
-        bool try_lock()
+
+        bool try_lock() BOOST_NOEXCEPT
         {
             int const res=pthread_mutex_trylock(&m);
             BOOST_ASSERT(!res || res==EBUSY);
             return !res;
         }
+#define BOOST_THREAD_DEFINES_RECURSIVE_MUTEX_NATIVE_HANDLE
         typedef pthread_mutex_t* native_handle_type;
         native_handle_type native_handle()
         {
@@ -127,7 +132,7 @@ namespace boost
                 ++count;
                 return;
             }
-            
+
             while(is_locked)
             {
                 BOOST_VERIFY(!pthread_cond_wait(&cond,&m));
@@ -146,7 +151,7 @@ namespace boost
             }
             BOOST_VERIFY(!pthread_cond_signal(&cond));
         }
-        
+
         bool try_lock()
         {
             boost::pthread::pthread_mutex_scoped_lock const local_lock(&m);
@@ -171,9 +176,6 @@ namespace boost
     class recursive_timed_mutex
     {
     private:
-        recursive_timed_mutex(recursive_timed_mutex const&);
-        recursive_timed_mutex& operator=(recursive_timed_mutex const&);        
-    private:
         pthread_mutex_t m;
 #ifndef BOOST_USE_PTHREAD_RECURSIVE_TIMEDLOCK
         pthread_cond_t cond;
@@ -182,40 +184,41 @@ namespace boost
         unsigned count;
 #endif
     public:
+        BOOST_THREAD_NO_COPYABLE(recursive_timed_mutex)
         recursive_timed_mutex()
         {
 #ifdef BOOST_USE_PTHREAD_RECURSIVE_TIMEDLOCK
             pthread_mutexattr_t attr;
-            
+
             int const init_attr_res=pthread_mutexattr_init(&attr);
             if(init_attr_res)
             {
-                boost::throw_exception(thread_resource_error());
+                boost::throw_exception(thread_resource_error(init_attr_res, "boost:: recursive_timed_mutex constructor failed in pthread_mutexattr_init"));
             }
             int const set_attr_res=pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE);
             if(set_attr_res)
             {
-                boost::throw_exception(thread_resource_error());
+                boost::throw_exception(thread_resource_error(set_attr_res, "boost:: recursive_timed_mutex constructor failed in pthread_mutexattr_settype"));
             }
-            
+
             int const res=pthread_mutex_init(&m,&attr);
             if(res)
             {
                 BOOST_VERIFY(!pthread_mutexattr_destroy(&attr));
-                boost::throw_exception(thread_resource_error());
+                boost::throw_exception(thread_resource_error(res, "boost:: recursive_timed_mutex constructor failed in pthread_mutex_init"));
             }
             BOOST_VERIFY(!pthread_mutexattr_destroy(&attr));
 #else
             int const res=pthread_mutex_init(&m,NULL);
             if(res)
             {
-                boost::throw_exception(thread_resource_error());
+                boost::throw_exception(thread_resource_error(res, "boost:: recursive_timed_mutex constructor failed in pthread_mutex_init"));
             }
             int const res2=pthread_cond_init(&cond,NULL);
             if(res2)
             {
                 BOOST_VERIFY(!pthread_mutex_destroy(&m));
-                boost::throw_exception(thread_resource_error());
+                boost::throw_exception(thread_resource_error(res2, "boost:: recursive_timed_mutex constructor failed in pthread_cond_init"));
             }
             is_locked=false;
             count=0;
@@ -245,26 +248,22 @@ namespace boost
         {
             BOOST_VERIFY(!pthread_mutex_unlock(&m));
         }
-        
+
         bool try_lock()
         {
             int const res=pthread_mutex_trylock(&m);
             BOOST_ASSERT(!res || res==EBUSY);
             return !res;
         }
-        bool timed_lock(system_time const & abs_time)
+    private:
+        bool do_try_lock_until(struct timespec const &timeout)
         {
-            struct timespec const timeout=detail::get_timespec(abs_time);
             int const res=pthread_mutex_timedlock(&m,&timeout);
             BOOST_ASSERT(!res || res==ETIMEDOUT);
             return !res;
         }
 
-        typedef pthread_mutex_t* native_handle_type;
-        native_handle_type native_handle()
-        {
-            return &m;
-        }
+    public:
 
 #else
         void lock()
@@ -275,7 +274,7 @@ namespace boost
                 ++count;
                 return;
             }
-            
+
             while(is_locked)
             {
                 BOOST_VERIFY(!pthread_cond_wait(&cond,&m));
@@ -294,8 +293,8 @@ namespace boost
             }
             BOOST_VERIFY(!pthread_cond_signal(&cond));
         }
-        
-        bool try_lock()
+
+        bool try_lock() BOOST_NOEXCEPT
         {
             boost::pthread::pthread_mutex_scoped_lock const local_lock(&m);
             if(is_locked && !pthread_equal(owner,pthread_self()))
@@ -308,9 +307,9 @@ namespace boost
             return true;
         }
 
-        bool timed_lock(system_time const & abs_time)
+    private:
+        bool do_try_lock_until(struct timespec const &timeout)
         {
-            struct timespec const timeout=detail::get_timespec(abs_time);
             boost::pthread::pthread_mutex_scoped_lock const local_lock(&m);
             if(is_locked && pthread_equal(owner,pthread_self()))
             {
@@ -331,8 +330,56 @@ namespace boost
             owner=pthread_self();
             return true;
         }
+    public:
+
 #endif
 
+        bool timed_lock(system_time const & abs_time)
+        {
+            struct timespec const ts=detail::get_timespec(abs_time);
+            return do_try_lock_until(ts);
+        }
+
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Rep, class Period>
+        bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
+        {
+          return try_lock_until(chrono::steady_clock::now() + rel_time);
+        }
+        template <class Clock, class Duration>
+        bool try_lock_until(const chrono::time_point<Clock, Duration>& t)
+        {
+          using namespace chrono;
+          system_clock::time_point     s_now = system_clock::now();
+          typename Clock::time_point  c_now = Clock::now();
+          return try_lock_until(s_now + ceil<nanoseconds>(t - c_now));
+        }
+        template <class Duration>
+        bool try_lock_until(const chrono::time_point<chrono::system_clock, Duration>& t)
+        {
+          using namespace chrono;
+          typedef time_point<system_clock, nanoseconds> nano_sys_tmpt;
+          return try_lock_until(nano_sys_tmpt(ceil<nanoseconds>(t.time_since_epoch())));
+        }
+        bool try_lock_until(const chrono::time_point<chrono::system_clock, chrono::nanoseconds>& tp)
+        {
+          using namespace chrono;
+          nanoseconds d = tp.time_since_epoch();
+          timespec ts;
+          seconds s = duration_cast<seconds>(d);
+          ts.tv_sec = static_cast<long>(s.count());
+          ts.tv_nsec = static_cast<long>((d - s).count());
+          return do_try_lock_until(ts);
+        }
+#endif
+
+#define BOOST_THREAD_DEFINES_RECURSIVE_TIMED_MUTEX_NATIVE_HANDLE
+        typedef pthread_mutex_t* native_handle_type;
+        native_handle_type native_handle()
+        {
+            return &m;
+        }
+
         typedef unique_lock<recursive_timed_mutex> scoped_timed_lock;
         typedef detail::try_lock_wrapper<recursive_timed_mutex> scoped_try_lock;
         typedef scoped_timed_lock scoped_lock;
diff --git a/ext/boost/thread/pthread/shared_mutex.hpp b/ext/boost/thread/pthread/shared_mutex.hpp
index bc26282..cf45188 100644
--- a/ext/boost/thread/pthread/shared_mutex.hpp
+++ b/ext/boost/thread/pthread/shared_mutex.hpp
@@ -2,6 +2,7 @@
 #define BOOST_THREAD_PTHREAD_SHARED_MUTEX_HPP
 
 //  (C) Copyright 2006-8 Anthony Williams
+//  (C) Copyright 2012 Vicente J. Botet Escriba
 //
 //  Distributed under the Boost Software License, Version 1.0. (See
 //  accompanying file LICENSE_1_0.txt or copy at
@@ -12,6 +13,11 @@
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/condition_variable.hpp>
 #include <boost/thread/detail/thread_interruption.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
+#include <boost/thread/detail/delete.hpp>
 
 #include <boost/config/abi_prefix.hpp>
 
@@ -27,7 +33,7 @@ namespace boost
             bool upgrade;
             bool exclusive_waiting_blocked;
         };
-        
+
 
 
         state_data state;
@@ -41,9 +47,10 @@ namespace boost
             exclusive_cond.notify_one();
             shared_cond.notify_all();
         }
-        
 
     public:
+        BOOST_THREAD_NO_COPYABLE(shared_mutex)
+
         shared_mutex()
         {
             state_data state_={0,0,0,0};
@@ -58,7 +65,7 @@ namespace boost
         {
             boost::this_thread::disable_interruption do_not_disturb;
             boost::mutex::scoped_lock lk(state_change);
-                
+
             while(state.exclusive || state.exclusive_waiting_blocked)
             {
                 shared_cond.wait(lk);
@@ -69,7 +76,7 @@ namespace boost
         bool try_lock_shared()
         {
             boost::mutex::scoped_lock lk(state_change);
-                
+
             if(state.exclusive || state.exclusive_waiting_blocked)
             {
                 return false;
@@ -85,7 +92,7 @@ namespace boost
         {
             boost::this_thread::disable_interruption do_not_disturb;
             boost::mutex::scoped_lock lk(state_change);
-                
+
             while(state.exclusive || state.exclusive_waiting_blocked)
             {
                 if(!shared_cond.timed_wait(lk,timeout))
@@ -102,12 +109,34 @@ namespace boost
         {
             return timed_lock_shared(get_system_time()+relative_time);
         }
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Rep, class Period>
+        bool try_lock_shared_for(const chrono::duration<Rep, Period>& rel_time)
+        {
+          return try_lock_shared_until(chrono::steady_clock::now() + rel_time);
+        }
+        template <class Clock, class Duration>
+        bool try_lock_shared_until(const chrono::time_point<Clock, Duration>& abs_time)
+        {
+          boost::this_thread::disable_interruption do_not_disturb;
+          boost::mutex::scoped_lock lk(state_change);
 
+          while(state.exclusive || state.exclusive_waiting_blocked)
+          {
+              if(cv_status::timeout==shared_cond.wait_until(lk,abs_time))
+              {
+                  return false;
+              }
+          }
+          ++state.shared_count;
+          return true;
+        }
+#endif
         void unlock_shared()
         {
             boost::mutex::scoped_lock lk(state_change);
             bool const last_reader=!--state.shared_count;
-                
+
             if(last_reader)
             {
                 if(state.upgrade)
@@ -128,7 +157,7 @@ namespace boost
         {
             boost::this_thread::disable_interruption do_not_disturb;
             boost::mutex::scoped_lock lk(state_change);
-                
+
             while(state.shared_count || state.exclusive)
             {
                 state.exclusive_waiting_blocked=true;
@@ -150,7 +179,7 @@ namespace boost
                     if(state.shared_count || state.exclusive)
                     {
                         state.exclusive_waiting_blocked=false;
-                        exclusive_cond.notify_one();
+                        release_waiters();
                         return false;
                     }
                     break;
@@ -166,10 +195,41 @@ namespace boost
             return timed_lock(get_system_time()+relative_time);
         }
 
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Rep, class Period>
+        bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
+        {
+          return try_lock_until(chrono::steady_clock::now() + rel_time);
+        }
+        template <class Clock, class Duration>
+        bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time)
+        {
+          boost::this_thread::disable_interruption do_not_disturb;
+          boost::mutex::scoped_lock lk(state_change);
+
+          while(state.shared_count || state.exclusive)
+          {
+              state.exclusive_waiting_blocked=true;
+              if(cv_status::timeout == exclusive_cond.wait_until(lk,abs_time))
+              {
+                  if(state.shared_count || state.exclusive)
+                  {
+                      state.exclusive_waiting_blocked=false;
+                      release_waiters();
+                      return false;
+                  }
+                  break;
+              }
+          }
+          state.exclusive=true;
+          return true;
+        }
+#endif
+
         bool try_lock()
         {
             boost::mutex::scoped_lock lk(state_change);
-                
+
             if(state.shared_count || state.exclusive)
             {
                 return false;
@@ -179,7 +239,7 @@ namespace boost
                 state.exclusive=true;
                 return true;
             }
-                
+
         }
 
         void unlock()
@@ -228,6 +288,33 @@ namespace boost
             return timed_lock_upgrade(get_system_time()+relative_time);
         }
 
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Rep, class Period>
+        bool try_lock_upgrade_for(const chrono::duration<Rep, Period>& rel_time)
+        {
+          return try_lock_upgrade_until(chrono::steady_clock::now() + rel_time);
+        }
+        template <class Clock, class Duration>
+        bool try_lock_upgrade_until(const chrono::time_point<Clock, Duration>& abs_time)
+        {
+          boost::this_thread::disable_interruption do_not_disturb;
+          boost::mutex::scoped_lock lk(state_change);
+          while(state.exclusive || state.exclusive_waiting_blocked || state.upgrade)
+          {
+              if(cv_status::timeout == shared_cond.wait_until(lk,abs_time))
+              {
+                  if(state.exclusive || state.exclusive_waiting_blocked || state.upgrade)
+                  {
+                      return false;
+                  }
+                  break;
+              }
+          }
+          ++state.shared_count;
+          state.upgrade=true;
+          return true;
+        }
+#endif
         bool try_lock_upgrade()
         {
             boost::mutex::scoped_lock lk(state_change);
@@ -248,14 +335,17 @@ namespace boost
             boost::mutex::scoped_lock lk(state_change);
             state.upgrade=false;
             bool const last_reader=!--state.shared_count;
-                
+
             if(last_reader)
             {
                 state.exclusive_waiting_blocked=false;
                 release_waiters();
+            } else {
+              shared_cond.notify_all();
             }
         }
 
+        // Upgrade <-> Exclusive
         void unlock_upgrade_and_lock()
         {
             boost::this_thread::disable_interruption do_not_disturb;
@@ -278,7 +368,58 @@ namespace boost
             state.exclusive_waiting_blocked=false;
             release_waiters();
         }
-        
+
+        bool try_unlock_upgrade_and_lock()
+        {
+          boost::mutex::scoped_lock lk(state_change);
+          if(    !state.exclusive
+              && !state.exclusive_waiting_blocked
+              && state.upgrade
+              && state.shared_count==1)
+          {
+            state.shared_count=0;
+            state.exclusive=true;
+            state.upgrade=false;
+            return true;
+          }
+          return false;
+        }
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Rep, class Period>
+        bool
+        try_unlock_upgrade_and_lock_for(
+                                const chrono::duration<Rep, Period>& rel_time)
+        {
+          return try_unlock_upgrade_and_lock_until(
+                                 chrono::steady_clock::now() + rel_time);
+        }
+        template <class Clock, class Duration>
+        bool
+        try_unlock_upgrade_and_lock_until(
+                          const chrono::time_point<Clock, Duration>& abs_time)
+        {
+          boost::this_thread::disable_interruption do_not_disturb;
+          boost::mutex::scoped_lock lk(state_change);
+          if (state.shared_count != 1)
+          {
+              for (;;)
+              {
+                cv_status status = shared_cond.wait_until(lk,abs_time);
+                if (state.shared_count == 1)
+                  break;
+                if(status == cv_status::timeout)
+                  return false;
+              }
+          }
+          state.upgrade=false;
+          state.exclusive=true;
+          state.exclusive_waiting_blocked=false;
+          state.shared_count=0;
+          return true;
+        }
+#endif
+
+        // Shared <-> Exclusive
         void unlock_and_lock_shared()
         {
             boost::mutex::scoped_lock lk(state_change);
@@ -287,7 +428,59 @@ namespace boost
             state.exclusive_waiting_blocked=false;
             release_waiters();
         }
-        
+
+#ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+        bool try_unlock_shared_and_lock()
+        {
+          boost::mutex::scoped_lock lk(state_change);
+          if(    !state.exclusive
+              && !state.exclusive_waiting_blocked
+              && !state.upgrade
+              && state.shared_count==1)
+          {
+            state.shared_count=0;
+            state.exclusive=true;
+            return true;
+          }
+          return false;
+        }
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Rep, class Period>
+            bool
+            try_unlock_shared_and_lock_for(
+                                const chrono::duration<Rep, Period>& rel_time)
+        {
+          return try_unlock_shared_and_lock_until(
+                                 chrono::steady_clock::now() + rel_time);
+        }
+        template <class Clock, class Duration>
+            bool
+            try_unlock_shared_and_lock_until(
+                          const chrono::time_point<Clock, Duration>& abs_time)
+        {
+          boost::this_thread::disable_interruption do_not_disturb;
+          boost::mutex::scoped_lock lk(state_change);
+          if (state.shared_count != 1)
+          {
+              for (;;)
+              {
+                cv_status status = shared_cond.wait_until(lk,abs_time);
+                if (state.shared_count == 1)
+                  break;
+                if(status == cv_status::timeout)
+                  return false;
+              }
+          }
+          state.upgrade=false;
+          state.exclusive=true;
+          state.exclusive_waiting_blocked=false;
+          state.shared_count=0;
+          return true;
+        }
+#endif
+#endif
+
+        // Shared <-> Upgrade
         void unlock_upgrade_and_lock_shared()
         {
             boost::mutex::scoped_lock lk(state_change);
@@ -295,7 +488,62 @@ namespace boost
             state.exclusive_waiting_blocked=false;
             release_waiters();
         }
+
+#ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+        bool try_unlock_shared_and_lock_upgrade()
+        {
+          boost::mutex::scoped_lock lk(state_change);
+          if(    !state.exclusive
+              && !state.exclusive_waiting_blocked
+              && !state.upgrade
+              )
+          {
+            state.upgrade=true;
+            return true;
+          }
+          return false;
+        }
+#ifdef BOOST_THREAD_USES_CHRONO
+        template <class Rep, class Period>
+            bool
+            try_unlock_shared_and_lock_upgrade_for(
+                                const chrono::duration<Rep, Period>& rel_time)
+        {
+          return try_unlock_shared_and_lock_upgrade_until(
+                                 chrono::steady_clock::now() + rel_time);
+        }
+        template <class Clock, class Duration>
+            bool
+            try_unlock_shared_and_lock_upgrade_until(
+                          const chrono::time_point<Clock, Duration>& abs_time)
+        {
+          boost::this_thread::disable_interruption do_not_disturb;
+          boost::mutex::scoped_lock lk(state_change);
+          if(    state.exclusive
+              || state.exclusive_waiting_blocked
+              || state.upgrade
+              )
+          {
+              for (;;)
+              {
+                cv_status status = exclusive_cond.wait_until(lk,abs_time);
+                if(    ! state.exclusive
+                    && ! state.exclusive_waiting_blocked
+                    && ! state.upgrade
+                    )
+                  break;
+                if(status == cv_status::timeout)
+                  return false;
+              }
+          }
+          state.upgrade=true;
+          return true;
+        }
+#endif
+#endif
     };
+
+    typedef shared_mutex upgrade_mutex;
 }
 
 #include <boost/config/abi_suffix.hpp>
diff --git a/ext/boost/thread/pthread/thread_data.hpp b/ext/boost/thread/pthread/thread_data.hpp
index 730c77c..db4e09f 100644
--- a/ext/boost/thread/pthread/thread_data.hpp
+++ b/ext/boost/thread/pthread/thread_data.hpp
@@ -4,23 +4,77 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 // (C) Copyright 2007 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
 
 #include <boost/thread/detail/config.hpp>
 #include <boost/thread/exceptions.hpp>
+#include <boost/thread/locks.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/pthread/condition_variable_fwd.hpp>
+
 #include <boost/shared_ptr.hpp>
 #include <boost/enable_shared_from_this.hpp>
-#include <boost/thread/mutex.hpp>
 #include <boost/optional.hpp>
-#include <pthread.h>
-#include "condition_variable_fwd.hpp"
+#include <boost/assert.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#endif
+
 #include <map>
+#include <vector>
+#include <utility>
+
+#include <pthread.h>
+#include <unistd.h>
 
 #include <boost/config/abi_prefix.hpp>
 
 namespace boost
 {
+    class thread_attributes {
+    public:
+        thread_attributes() BOOST_NOEXCEPT {
+            int res = pthread_attr_init(&val_);
+            BOOST_VERIFY(!res && "pthread_attr_init failed");
+        }
+        ~thread_attributes() {
+          int res = pthread_attr_destroy(&val_);
+          BOOST_VERIFY(!res && "pthread_attr_destroy failed");
+        }
+        // stack
+        void set_stack_size(std::size_t size) BOOST_NOEXCEPT {
+          if (size==0) return;
+          std::size_t page_size = getpagesize();
+#ifdef PTHREAD_STACK_MIN
+          if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
+#endif
+          size = ((size+page_size-1)/page_size)*page_size;
+          int res = pthread_attr_setstacksize(&val_, size);
+          BOOST_VERIFY(!res && "pthread_attr_setstacksize failed");
+        }
+
+        std::size_t get_stack_size() const BOOST_NOEXCEPT {
+            std::size_t size;
+            int res = pthread_attr_getstacksize(&val_, &size);
+            BOOST_VERIFY(!res && "pthread_attr_getstacksize failed");
+            return size;
+        }
+#define BOOST_THREAD_DEFINES_THREAD_ATTRIBUTES_NATIVE_HANDLE
+
+        typedef pthread_attr_t native_handle_type;
+        native_handle_type* native_handle() BOOST_NOEXCEPT {
+          return &val_;
+        }
+        const native_handle_type* native_handle() const BOOST_NOEXCEPT {
+          return &val_;
+        }
+
+    private:
+        pthread_attr_t val_;
+    };
+
     class thread;
-    
+
     namespace detail
     {
         struct tss_cleanup_function;
@@ -38,7 +92,7 @@ namespace boost
 
         struct thread_data_base;
         typedef boost::shared_ptr<thread_data_base> thread_data_ptr;
-        
+
         struct BOOST_THREAD_DECL thread_data_base:
             enable_shared_from_this<thread_data_base>
         {
@@ -55,20 +109,30 @@ namespace boost
             std::map<void const*,boost::detail::tss_data_node> tss_data;
             bool interrupt_enabled;
             bool interrupt_requested;
+            pthread_mutex_t* cond_mutex;
             pthread_cond_t* current_cond;
+            typedef std::vector<std::pair<condition_variable*, mutex*>
+            //, hidden_allocator<std::pair<condition_variable*, mutex*> >
+            > notify_list_t;
+            notify_list_t notify;
 
             thread_data_base():
                 done(false),join_started(false),joined(false),
                 thread_exit_callbacks(0),
                 interrupt_enabled(true),
                 interrupt_requested(false),
-                current_cond(0)
+                current_cond(0),
+                notify()
             {}
             virtual ~thread_data_base();
 
             typedef pthread_t native_handle_type;
 
             virtual void run()=0;
+            void notify_all_at_thread_exit(condition_variable* cv, mutex* m)
+            {
+              notify.push_back(std::pair<condition_variable*, mutex*>(cv, m));
+            }
         };
 
         BOOST_THREAD_DECL thread_data_base* get_current_thread_data();
@@ -76,35 +140,51 @@ namespace boost
         class interruption_checker
         {
             thread_data_base* const thread_info;
+            pthread_mutex_t* m;
+            bool set;
 
             void check_for_interruption()
             {
+#ifndef BOOST_NO_EXCEPTIONS
                 if(thread_info->interrupt_requested)
                 {
                     thread_info->interrupt_requested=false;
-                    throw thread_interrupted();
+                    throw thread_interrupted(); // BOOST_NO_EXCEPTIONS protected
                 }
+#endif
             }
-            
+
             void operator=(interruption_checker&);
         public:
-            explicit interruption_checker(pthread_cond_t* cond):
-                thread_info(detail::get_current_thread_data())
+            explicit interruption_checker(pthread_mutex_t* cond_mutex,pthread_cond_t* cond):
+                thread_info(detail::get_current_thread_data()),m(cond_mutex),
+                set(thread_info && thread_info->interrupt_enabled)
             {
-                if(thread_info && thread_info->interrupt_enabled)
+                if(set)
                 {
                     lock_guard<mutex> guard(thread_info->data_mutex);
                     check_for_interruption();
+                    thread_info->cond_mutex=cond_mutex;
                     thread_info->current_cond=cond;
+                    BOOST_VERIFY(!pthread_mutex_lock(m));
+                }
+                else
+                {
+                    BOOST_VERIFY(!pthread_mutex_lock(m));
                 }
             }
             ~interruption_checker()
             {
-                if(thread_info && thread_info->interrupt_enabled)
+                if(set)
                 {
+                    BOOST_VERIFY(!pthread_mutex_unlock(m));
                     lock_guard<mutex> guard(thread_info->data_mutex);
+                    thread_info->cond_mutex=NULL;
                     thread_info->current_cond=NULL;
-                    check_for_interruption();
+                }
+                else
+                {
+                    BOOST_VERIFY(!pthread_mutex_unlock(m));
                 }
             }
         };
@@ -112,15 +192,66 @@ namespace boost
 
     namespace this_thread
     {
-        void BOOST_THREAD_DECL yield();
-        
-        void BOOST_THREAD_DECL sleep(system_time const& abs_time);
-        
+#ifdef BOOST_THREAD_USES_CHRONO
+        inline
+        void BOOST_SYMBOL_VISIBLE sleep_for(const chrono::nanoseconds& ns)
+        {
+            using namespace chrono;
+            boost::detail::thread_data_base* const thread_info=boost::detail::get_current_thread_data();
+
+            if(thread_info)
+            {
+              unique_lock<mutex> lk(thread_info->sleep_mutex);
+              while(cv_status::no_timeout==thread_info->sleep_condition.wait_for(lk,ns)) {}
+            }
+            else
+            {
+              if (ns >= nanoseconds::zero())
+              {
+
+  #   if defined(BOOST_HAS_PTHREAD_DELAY_NP)
+                timespec ts;
+                ts.tv_sec = static_cast<long>(duration_cast<seconds>(ns).count());
+                ts.tv_nsec = static_cast<long>((ns - seconds(ts.tv_sec)).count());
+                BOOST_VERIFY(!pthread_delay_np(&ts));
+  #   elif defined(BOOST_HAS_NANOSLEEP)
+                timespec ts;
+                ts.tv_sec = static_cast<long>(duration_cast<seconds>(ns).count());
+                ts.tv_nsec = static_cast<long>((ns - seconds(ts.tv_sec)).count());
+                //  nanosleep takes a timespec that is an offset, not
+                //  an absolute time.
+                nanosleep(&ts, 0);
+  #   else
+                mutex mx;
+                mutex::scoped_lock lock(mx);
+                condition_variable cond;
+                cond.wait_for(lock, ns);
+  #   endif
+              }
+            }
+        }
+#endif
+        void BOOST_THREAD_DECL yield() BOOST_NOEXCEPT;
+
+#ifdef __DECXXX
+        /// Workaround of DECCXX issue of incorrect template substitution
         template<typename TimeDuration>
         inline void sleep(TimeDuration const& rel_time)
         {
             this_thread::sleep(get_system_time()+rel_time);
         }
+
+        template<>
+        void BOOST_THREAD_DECL sleep(system_time const& abs_time);
+#else
+        void BOOST_THREAD_DECL sleep(system_time const& abs_time);
+
+        template<typename TimeDuration>
+        inline BOOST_SYMBOL_VISIBLE void sleep(TimeDuration const& rel_time)
+        {
+            this_thread::sleep(get_system_time()+rel_time);
+        }
+#endif
     }
 }
 
diff --git a/ext/boost/thread/pthread/thread_heap_alloc.hpp b/ext/boost/thread/pthread/thread_heap_alloc.hpp
index 737c298..7828318 100644
--- a/ext/boost/thread/pthread/thread_heap_alloc.hpp
+++ b/ext/boost/thread/pthread/thread_heap_alloc.hpp
@@ -17,7 +17,7 @@ namespace boost
             return new T();
         }
 
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
         template<typename T,typename A1>
         inline T* heap_new(A1&& a1)
         {
@@ -72,7 +72,7 @@ namespace boost
         {
             return heap_new_impl<T,A1&>(a1);
         }
-        
+
         template<typename T,typename A1,typename A2>
         inline T* heap_new(A1 const& a1,A2 const& a2)
         {
@@ -218,8 +218,8 @@ namespace boost
         {
             return heap_new_impl<T,A1&,A2&,A3&,A4&>(a1,a2,a3,a4);
         }
-        
-#endif        
+
+#endif
         template<typename T>
         inline void heap_delete(T* data)
         {
diff --git a/ext/boost/thread/reverse_lock.hpp b/ext/boost/thread/reverse_lock.hpp
new file mode 100644
index 0000000..c196cde
--- /dev/null
+++ b/ext/boost/thread/reverse_lock.hpp
@@ -0,0 +1,58 @@
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2012 Vicente J. Botet Escriba
+
+#ifndef BOOST_THREAD_REVERSE_LOCK_HPP
+#define BOOST_THREAD_REVERSE_LOCK_HPP
+#include <boost/thread/detail/config.hpp>
+#include <boost/thread/locks.hpp>
+#include <boost/thread/detail/delete.hpp>
+
+namespace boost
+{
+
+    template<typename Lock>
+    class reverse_lock
+    {
+
+    public:
+        typedef typename Lock::mutex_type mutex_type;
+        BOOST_THREAD_NO_COPYABLE(reverse_lock)
+
+        explicit reverse_lock(Lock& m_)
+        : m(m_), mtx(0)
+        {
+            if (m.owns_lock())
+            {
+              m.unlock();
+            }
+            mtx=m.release();
+        }
+        ~reverse_lock()
+        {
+          if (mtx) {
+            mtx->lock();
+            m = BOOST_THREAD_MAKE_RV_REF(Lock(*mtx, adopt_lock));
+          }
+        }
+
+    private:
+      Lock& m;
+      mutex_type* mtx;
+    };
+
+
+#ifdef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES
+    template<typename T>
+    struct is_mutex_type<reverse_lock<T> >
+    {
+        BOOST_STATIC_CONSTANT(bool, value = true);
+    };
+
+#endif
+
+
+}
+
+#endif // header
diff --git a/ext/boost/thread/shared_lock_guard.hpp b/ext/boost/thread/shared_lock_guard.hpp
new file mode 100644
index 0000000..8a2f2c5
--- /dev/null
+++ b/ext/boost/thread/shared_lock_guard.hpp
@@ -0,0 +1,52 @@
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2012 Vicente J. Botet Escriba
+
+#ifndef BOOST_THREAD_SHARED_LOCK_GUARD_HPP
+#define BOOST_THREAD_SHARED_LOCK_GUARD_HPP
+#include <boost/thread/detail/config.hpp>
+#include <boost/thread/locks.hpp>
+#include <boost/thread/detail/delete.hpp>
+
+namespace boost
+{
+
+    template<typename SharedMutex>
+    class shared_lock_guard
+    {
+    private:
+        SharedMutex& m;
+
+    public:
+        typedef SharedMutex mutex_type;
+        BOOST_THREAD_NO_COPYABLE(shared_lock_guard)
+        explicit shared_lock_guard(SharedMutex& m_):
+            m(m_)
+        {
+            m.lock_shared();
+        }
+        shared_lock_guard(SharedMutex& m_,adopt_lock_t):
+            m(m_)
+        {}
+        ~shared_lock_guard()
+        {
+            m.unlock_shared();
+        }
+    };
+
+#ifdef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES
+
+    template<typename T>
+    struct is_mutex_type<shared_lock_guard<T> >
+    {
+        BOOST_STATIC_CONSTANT(bool, value = true);
+    };
+
+
+#endif
+
+
+}
+
+#endif // header
diff --git a/ext/boost/thread/shared_mutex.hpp b/ext/boost/thread/shared_mutex.hpp
index 51eda0d..e85e269 100644
--- a/ext/boost/thread/shared_mutex.hpp
+++ b/ext/boost/thread/shared_mutex.hpp
@@ -3,15 +3,20 @@
 
 //  shared_mutex.hpp
 //
-//  (C) Copyright 2007 Anthony Williams 
+//  (C) Copyright 2007 Anthony Williams
+//  (C) Copyright 2011-2012 Vicente J. Botet Escriba
 //
 //  Distributed under the Boost Software License, Version 1.0. (See
 //  accompanying file LICENSE_1_0.txt or copy at
 //  http://www.boost.org/LICENSE_1_0.txt)
 
-#include <boost/thread/detail/platform.hpp>
+#include <boost/thread/detail/config.hpp>
 #if defined(BOOST_THREAD_PLATFORM_WIN32)
+#if defined(BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN)
+#include <boost/thread/pthread/shared_mutex.hpp>
+#else
 #include <boost/thread/win32/shared_mutex.hpp>
+#endif
 #elif defined(BOOST_THREAD_PLATFORM_PTHREAD)
 #include <boost/thread/pthread/shared_mutex.hpp>
 #else
diff --git a/ext/boost/thread/thread.hpp b/ext/boost/thread/thread.hpp
index fdfdadc..ee15c6e 100644
--- a/ext/boost/thread/thread.hpp
+++ b/ext/boost/thread/thread.hpp
@@ -3,7 +3,7 @@
 
 //  thread.hpp
 //
-//  (C) Copyright 2007-8 Anthony Williams 
+//  (C) Copyright 2007-8 Anthony Williams
 //
 //  Distributed under the Boost Software License, Version 1.0. (See
 //  accompanying file LICENSE_1_0.txt or copy at
@@ -22,6 +22,7 @@
 #include <boost/thread/detail/thread.hpp>
 #include <boost/thread/detail/thread_interruption.hpp>
 #include <boost/thread/detail/thread_group.hpp>
+#include <boost/thread/v2/thread.hpp>
 
 
 #endif
diff --git a/ext/boost/thread/thread_time.hpp b/ext/boost/thread/thread_time.hpp
index 8b557d5..ffdcf85 100644
--- a/ext/boost/thread/thread_time.hpp
+++ b/ext/boost/thread/thread_time.hpp
@@ -6,6 +6,7 @@
 //  accompanying file LICENSE_1_0.txt or copy at
 //  http://www.boost.org/LICENSE_1_0.txt)
 
+#include <boost/date_time/time_clock.hpp>
 #include <boost/date_time/microsec_time_clock.hpp>
 #include <boost/date_time/posix_time/posix_time_types.hpp>
 
@@ -17,7 +18,11 @@ namespace boost
     
     inline system_time get_system_time()
     {
+#if defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
         return boost::date_time::microsec_clock<system_time>::universal_time();
+#else // defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
+        return boost::date_time::second_clock<system_time>::universal_time();
+#endif // defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
     }
 
     namespace detail
diff --git a/ext/boost/thread/v2/thread.hpp b/ext/boost/thread/v2/thread.hpp
new file mode 100644
index 0000000..d686c5f
--- /dev/null
+++ b/ext/boost/thread/v2/thread.hpp
@@ -0,0 +1,56 @@
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2011 Vicente J. Botet Escriba
+
+#ifndef BOOST_THREAD_V2_THREAD_HPP
+#define BOOST_THREAD_V2_THREAD_HPP
+
+#include <boost/thread/detail/config.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#endif
+#include <boost/thread/condition_variable.hpp>
+#include <boost/thread/locks.hpp>
+
+namespace boost
+{
+  namespace this_thread
+  {
+
+#ifdef BOOST_THREAD_USES_CHRONO
+
+    template <class Rep, class Period>
+    void sleep_for(const chrono::duration<Rep, Period>& d)
+    {
+      using namespace chrono;
+      nanoseconds ns = duration_cast<nanoseconds> (d);
+      if (ns < d) ++ns;
+      sleep_for(ns);
+    }
+
+    template <class Clock, class Duration>
+    void sleep_until(const chrono::time_point<Clock, Duration>& t)
+    {
+      using namespace chrono;
+      mutex mut;
+      condition_variable cv;
+      unique_lock<mutex> lk(mut);
+      while (Clock::now() < t)
+        cv.wait_until(lk, t);
+    }
+
+    template <class Duration>
+    inline BOOST_SYMBOL_VISIBLE
+    void sleep_until(const chrono::time_point<chrono::steady_clock, Duration>& t)
+    {
+      using namespace chrono;
+      sleep_for(t - steady_clock::now());
+    }
+
+#endif
+  }
+}
+
+
+#endif
diff --git a/ext/boost/thread/xtime.hpp b/ext/boost/thread/xtime.hpp
index 7cc6272..1ca996f 100644
--- a/ext/boost/thread/xtime.hpp
+++ b/ext/boost/thread/xtime.hpp
@@ -2,7 +2,7 @@
 // William E. Kempf
 // Copyright (C) 2007-8 Anthony Williams
 //
-//  Distributed under the Boost Software License, Version 1.0. (See accompanying 
+//  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #ifndef BOOST_XTIME_WEK070601_HPP
@@ -20,7 +20,7 @@ namespace boost {
 
 enum xtime_clock_types
 {
-    TIME_UTC=1
+    TIME_UTC_=1
 //    TIME_TAI,
 //    TIME_MONOTONIC,
 //    TIME_PROCESS,
@@ -53,14 +53,14 @@ struct xtime
         boost::posix_time::microseconds((nsec+500)/1000);
 #endif
     }
-    
+
 };
 
 inline xtime get_xtime(boost::system_time const& abs_time)
 {
     xtime res;
     boost::posix_time::time_duration const time_since_epoch=abs_time-boost::posix_time::from_time_t(0);
-            
+
     res.sec=static_cast<xtime::xtime_sec_t>(time_since_epoch.total_seconds());
     res.nsec=static_cast<xtime::xtime_nsec_t>(time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second()));
     return res;
@@ -68,7 +68,7 @@ inline xtime get_xtime(boost::system_time const& abs_time)
 
 inline int xtime_get(struct xtime* xtp, int clock_type)
 {
-    if (clock_type == TIME_UTC)
+    if (clock_type == TIME_UTC_)
     {
         *xtp=get_xtime(get_system_time());
         return clock_type;
@@ -81,7 +81,7 @@ inline int xtime_cmp(const xtime& xt1, const xtime& xt2)
 {
     if (xt1.sec == xt2.sec)
         return (int)(xt1.nsec - xt2.nsec);
-    else 
+    else
         return (xt1.sec > xt2.sec) ? 1 : -1;
 }
 
diff --git a/ext/boost/throw_exception.hpp b/ext/boost/throw_exception.hpp
index a384054..c1bff43 100644
--- a/ext/boost/throw_exception.hpp
+++ b/ext/boost/throw_exception.hpp
@@ -1,5 +1,11 @@
-#ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED
-#define BOOST_THROW_EXCEPTION_HPP_INCLUDED
+#ifndef UUID_AA15E74A856F11E08B8D93F24824019B
+#define UUID_AA15E74A856F11E08B8D93F24824019B
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
 
 // MS compatible compilers support #pragma once
 
@@ -88,4 +94,7 @@ template<class E> BOOST_ATTRIBUTE_NORETURN inline void throw_exception( E const
 #endif
 } // namespace boost
 
-#endif // #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
+#endif
diff --git a/ext/boost/token_functions.hpp b/ext/boost/token_functions.hpp
index 57d2954..4d1a1df 100644
--- a/ext/boost/token_functions.hpp
+++ b/ext/boost/token_functions.hpp
@@ -209,6 +209,36 @@ namespace boost{
   // Assuming that the conditional will always get optimized out in the function
   // implementations, argument types are not a problem since both forms of character classifiers
   // expect an int.
+   
+#if !defined(BOOST_NO_CWCTYPE)
+  template<typename traits, int N>
+  struct traits_extension_details : public traits {
+    typedef typename traits::char_type char_type;
+    static bool isspace(char_type c)
+    {
+       return std::iswspace(c) != 0;
+    }
+    static bool ispunct(char_type c)
+    {
+       return std::iswpunct(c) != 0;
+    }
+  };
+
+  template<typename traits>
+  struct traits_extension_details<traits, 1> : public traits {
+    typedef typename traits::char_type char_type;
+    static bool isspace(char_type c)
+    {
+       return std::isspace(c) != 0;
+    }
+    static bool ispunct(char_type c)
+    {
+       return std::ispunct(c) != 0;
+    }
+  };
+#endif
+
+    
   // In case there is no cwctype header, we implement the checks manually.
   // We make use of the fact that the tested categories should fit in ASCII.
   template<typename traits>
@@ -217,10 +247,7 @@ namespace boost{
     static bool isspace(char_type c)
     {
 #if !defined(BOOST_NO_CWCTYPE)
-      if (sizeof(char_type) == 1)
-        return std::isspace(c) != 0;
-      else
-        return std::iswspace(c) != 0;
+      return traits_extension_details<traits, sizeof(char_type)>::isspace(c);
 #else
       return static_cast< unsigned >(c) <= 255 && std::isspace(c) != 0;
 #endif
@@ -229,10 +256,7 @@ namespace boost{
     static bool ispunct(char_type c)
     {
 #if !defined(BOOST_NO_CWCTYPE)
-      if (sizeof(char_type) == 1)
-        return std::ispunct(c) != 0;
-      else
-        return std::iswpunct(c) != 0;
+      return traits_extension_details<traits, sizeof(char_type)>::ispunct(c);
 #else
       return static_cast< unsigned >(c) <= 255 && std::ispunct(c) != 0;
 #endif
@@ -418,7 +442,7 @@ namespace boost{
   class char_separator
   {
     typedef tokenizer_detail::traits_extension<Tr> Traits;
-    typedef std::basic_string<Char,Traits> string_type;
+    typedef std::basic_string<Char,Tr> string_type;
   public:
     explicit 
     char_separator(const Char* dropped_delims,
@@ -561,7 +585,7 @@ namespace boost{
   private:
 
     typedef tokenizer_detail::traits_extension<Tr> Traits;
-    typedef std::basic_string<Char,Traits> string_type;
+    typedef std::basic_string<Char,Tr> string_type;
     string_type returnable_;
     string_type nonreturnable_;
     bool return_delims_;
diff --git a/ext/boost/tuple/detail/tuple_basic.hpp b/ext/boost/tuple/detail/tuple_basic.hpp
new file mode 100644
index 0000000..88f0d90
--- /dev/null
+++ b/ext/boost/tuple/detail/tuple_basic.hpp
@@ -0,0 +1,980 @@
+//  tuple_basic.hpp -----------------------------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://www.boost.org
+
+// Outside help:
+// This and that, Gary Powell.
+// Fixed return types for get_head/get_tail
+// ( and other bugs ) per suggestion of Jens Maurer
+// simplified element type accessors + bug fix  (Jeremy Siek)
+// Several changes/additions according to suggestions by Douglas Gregor,
+// William Kempf, Vesa Karvonen, John Max Skaller, Ed Brey, Beman Dawes,
+// David Abrahams.
+
+// Revision history:
+// 2002 05 01 Hugo Duncan: Fix for Borland after Jaakko's previous changes
+// 2002 04 18 Jaakko: tuple element types can be void or plain function
+//                    types, as long as no object is created.
+//                    Tuple objects can no hold even noncopyable types
+//                    such as arrays.
+// 2001 10 22 John Maddock
+//      Fixes for Borland C++
+// 2001 08 30 David Abrahams
+//      Added default constructor for cons<>.
+// -----------------------------------------------------------------
+
+#ifndef BOOST_TUPLE_BASIC_HPP
+#define BOOST_TUPLE_BASIC_HPP
+
+
+#include <utility> // needed for the assignment from pair to tuple
+
+#include "boost/type_traits/cv_traits.hpp"
+#include "boost/type_traits/function_traits.hpp"
+#include "boost/utility/swap.hpp"
+
+#include "boost/detail/workaround.hpp" // needed for BOOST_WORKAROUND
+
+namespace boost {
+namespace tuples {
+
+// -- null_type --------------------------------------------------------
+struct null_type {};
+
+// a helper function to provide a const null_type type temporary
+namespace detail {
+  inline const null_type cnull() { return null_type(); }
+
+
+// -- if construct ------------------------------------------------
+// Proposed by Krzysztof Czarnecki and Ulrich Eisenecker
+
+template <bool If, class Then, class Else> struct IF { typedef Then RET; };
+
+template <class Then, class Else> struct IF<false, Then, Else> {
+  typedef Else RET;
+};
+
+} // end detail
+
+// - cons forward declaration -----------------------------------------------
+template <class HT, class TT> struct cons;
+
+
+// - tuple forward declaration -----------------------------------------------
+template <
+  class T0 = null_type, class T1 = null_type, class T2 = null_type,
+  class T3 = null_type, class T4 = null_type, class T5 = null_type,
+  class T6 = null_type, class T7 = null_type, class T8 = null_type,
+  class T9 = null_type>
+class tuple;
+
+// tuple_length forward declaration
+template<class T> struct length;
+
+
+
+namespace detail {
+
+// -- generate error template, referencing to non-existing members of this
+// template is used to produce compilation errors intentionally
+template<class T>
+class generate_error;
+
+template<int N>
+struct drop_front {
+    template<class Tuple>
+    struct apply {
+        typedef BOOST_DEDUCED_TYPENAME drop_front<N-1>::BOOST_NESTED_TEMPLATE
+            apply<Tuple> next;
+        typedef BOOST_DEDUCED_TYPENAME next::type::tail_type type;
+        static const type& call(const Tuple& tup) {
+            return next::call(tup).tail;
+        }
+    };
+};
+
+template<>
+struct drop_front<0> {
+    template<class Tuple>
+    struct apply {
+        typedef Tuple type;
+        static const type& call(const Tuple& tup) {
+            return tup;
+        }
+    };
+};
+
+} // end of namespace detail
+
+
+// -cons type accessors ----------------------------------------
+// typename tuples::element<N,T>::type gets the type of the
+// Nth element ot T, first element is at index 0
+// -------------------------------------------------------
+
+#ifndef BOOST_NO_CV_SPECIALIZATIONS
+
+template<int N, class T>
+struct element
+{
+  typedef BOOST_DEDUCED_TYPENAME detail::drop_front<N>::BOOST_NESTED_TEMPLATE
+      apply<T>::type::head_type type;
+};
+
+template<int N, class T>
+struct element<N, const T>
+{
+private:
+  typedef BOOST_DEDUCED_TYPENAME detail::drop_front<N>::BOOST_NESTED_TEMPLATE
+      apply<T>::type::head_type unqualified_type;
+public:
+#if BOOST_WORKAROUND(__BORLANDC__,<0x600)
+  typedef const unqualified_type type;
+#else
+  typedef BOOST_DEDUCED_TYPENAME boost::add_const<unqualified_type>::type type;
+#endif
+};
+#else // def BOOST_NO_CV_SPECIALIZATIONS
+
+namespace detail {
+
+template<int N, class T, bool IsConst>
+struct element_impl
+{
+  typedef BOOST_DEDUCED_TYPENAME detail::drop_front<N>::BOOST_NESTED_TEMPLATE
+      apply<T>::type::head_type type;
+};
+
+template<int N, class T>
+struct element_impl<N, T, true /* IsConst */>
+{
+  typedef BOOST_DEDUCED_TYPENAME detail::drop_front<N>::BOOST_NESTED_TEMPLATE
+      apply<T>::type::head_type unqualified_type;
+  typedef const unqualified_type type;
+};
+
+} // end of namespace detail
+
+
+template<int N, class T>
+struct element:
+  public detail::element_impl<N, T, ::boost::is_const<T>::value>
+{
+};
+
+#endif
+
+
+// -get function templates -----------------------------------------------
+// Usage: get<N>(aTuple)
+
+// -- some traits classes for get functions
+
+// access traits lifted from detail namespace to be part of the interface,
+// (Joel de Guzman's suggestion). Rationale: get functions are part of the
+// interface, so should the way to express their return types be.
+
+template <class T> struct access_traits {
+  typedef const T& const_type;
+  typedef T& non_const_type;
+
+  typedef const typename boost::remove_cv<T>::type& parameter_type;
+
+// used as the tuple constructors parameter types
+// Rationale: non-reference tuple element types can be cv-qualified.
+// It should be possible to initialize such types with temporaries,
+// and when binding temporaries to references, the reference must
+// be non-volatile and const. 8.5.3. (5)
+};
+
+template <class T> struct access_traits<T&> {
+
+  typedef T& const_type;
+  typedef T& non_const_type;
+
+  typedef T& parameter_type;
+};
+
+// get function for non-const cons-lists, returns a reference to the element
+
+template<int N, class HT, class TT>
+inline typename access_traits<
+                  typename element<N, cons<HT, TT> >::type
+                >::non_const_type
+get(cons<HT, TT>& c BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) {
+  typedef BOOST_DEDUCED_TYPENAME detail::drop_front<N>::BOOST_NESTED_TEMPLATE
+      apply<cons<HT, TT> > impl;
+  typedef BOOST_DEDUCED_TYPENAME impl::type cons_element;
+  return const_cast<cons_element&>(impl::call(c)).head;
+}
+
+// get function for const cons-lists, returns a const reference to
+// the element. If the element is a reference, returns the reference
+// as such (that is, can return a non-const reference)
+template<int N, class HT, class TT>
+inline typename access_traits<
+                  typename element<N, cons<HT, TT> >::type
+                >::const_type
+get(const cons<HT, TT>& c BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) {
+  typedef BOOST_DEDUCED_TYPENAME detail::drop_front<N>::BOOST_NESTED_TEMPLATE
+      apply<cons<HT, TT> > impl;
+  typedef BOOST_DEDUCED_TYPENAME impl::type cons_element;
+  return impl::call(c).head;
+}
+
+// -- the cons template  --------------------------------------------------
+namespace detail {
+
+//  These helper templates wrap void types and plain function types.
+//  The reationale is to allow one to write tuple types with those types
+//  as elements, even though it is not possible to instantiate such object.
+//  E.g: typedef tuple<void> some_type; // ok
+//  but: some_type x; // fails
+
+template <class T> class non_storeable_type {
+  non_storeable_type();
+};
+
+template <class T> struct wrap_non_storeable_type {
+  typedef typename IF<
+    ::boost::is_function<T>::value, non_storeable_type<T>, T
+  >::RET type;
+};
+template <> struct wrap_non_storeable_type<void> {
+  typedef non_storeable_type<void> type;
+};
+
+} // detail
+
+template <class HT, class TT>
+struct cons {
+
+  typedef HT head_type;
+  typedef TT tail_type;
+
+  typedef typename
+    detail::wrap_non_storeable_type<head_type>::type stored_head_type;
+
+  stored_head_type head;
+  tail_type tail;
+
+  typename access_traits<stored_head_type>::non_const_type
+  get_head() { return head; }
+
+  typename access_traits<tail_type>::non_const_type
+  get_tail() { return tail; }
+
+  typename access_traits<stored_head_type>::const_type
+  get_head() const { return head; }
+
+  typename access_traits<tail_type>::const_type
+  get_tail() const { return tail; }
+
+  cons() : head(), tail() {}
+  //  cons() : head(detail::default_arg<HT>::f()), tail() {}
+
+  // the argument for head is not strictly needed, but it prevents
+  // array type elements. This is good, since array type elements
+  // cannot be supported properly in any case (no assignment,
+  // copy works only if the tails are exactly the same type, ...)
+
+  cons(typename access_traits<stored_head_type>::parameter_type h,
+       const tail_type& t)
+    : head (h), tail(t) {}
+
+  template <class T1, class T2, class T3, class T4, class T5,
+            class T6, class T7, class T8, class T9, class T10>
+  cons( T1& t1, T2& t2, T3& t3, T4& t4, T5& t5,
+        T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 )
+    : head (t1),
+      tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull())
+      {}
+
+  template <class T2, class T3, class T4, class T5,
+            class T6, class T7, class T8, class T9, class T10>
+  cons( const null_type& /*t1*/, T2& t2, T3& t3, T4& t4, T5& t5,
+        T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 )
+    : head (),
+      tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull())
+      {}
+
+
+  template <class HT2, class TT2>
+  cons( const cons<HT2, TT2>& u ) : head(u.head), tail(u.tail) {}
+
+  template <class HT2, class TT2>
+  cons& operator=( const cons<HT2, TT2>& u ) {
+    head=u.head; tail=u.tail; return *this;
+  }
+
+  // must define assignment operator explicitly, implicit version is
+  // illformed if HT is a reference (12.8. (12))
+  cons& operator=(const cons& u) {
+    head = u.head; tail = u.tail;  return *this;
+  }
+
+  template <class T1, class T2>
+  cons& operator=( const std::pair<T1, T2>& u ) {
+    BOOST_STATIC_ASSERT(length<cons>::value == 2); // check length = 2
+    head = u.first; tail.head = u.second; return *this;
+  }
+
+  // get member functions (non-const and const)
+  template <int N>
+  typename access_traits<
+             typename element<N, cons<HT, TT> >::type
+           >::non_const_type
+  get() {
+    return boost::tuples::get<N>(*this); // delegate to non-member get
+  }
+
+  template <int N>
+  typename access_traits<
+             typename element<N, cons<HT, TT> >::type
+           >::const_type
+  get() const {
+    return boost::tuples::get<N>(*this); // delegate to non-member get
+  }
+};
+
+template <class HT>
+struct cons<HT, null_type> {
+
+  typedef HT head_type;
+  typedef null_type tail_type;
+  typedef cons<HT, null_type> self_type;
+
+  typedef typename
+    detail::wrap_non_storeable_type<head_type>::type stored_head_type;
+  stored_head_type head;
+
+  typename access_traits<stored_head_type>::non_const_type
+  get_head() { return head; }
+
+  null_type get_tail() { return null_type(); }
+
+  typename access_traits<stored_head_type>::const_type
+  get_head() const { return head; }
+
+  const null_type get_tail() const { return null_type(); }
+
+  //  cons() : head(detail::default_arg<HT>::f()) {}
+  cons() : head() {}
+
+  cons(typename access_traits<stored_head_type>::parameter_type h,
+       const null_type& = null_type())
+    : head (h) {}
+
+  template<class T1>
+  cons(T1& t1, const null_type&, const null_type&, const null_type&,
+       const null_type&, const null_type&, const null_type&,
+       const null_type&, const null_type&, const null_type&)
+  : head (t1) {}
+
+  cons(const null_type&,
+       const null_type&, const null_type&, const null_type&,
+       const null_type&, const null_type&, const null_type&,
+       const null_type&, const null_type&, const null_type&)
+  : head () {}
+
+  template <class HT2>
+  cons( const cons<HT2, null_type>& u ) : head(u.head) {}
+
+  template <class HT2>
+  cons& operator=(const cons<HT2, null_type>& u )
+  { head = u.head; return *this; }
+
+  // must define assignment operator explicitely, implicit version
+  // is illformed if HT is a reference
+  cons& operator=(const cons& u) { head = u.head; return *this; }
+
+  template <int N>
+  typename access_traits<
+             typename element<N, self_type>::type
+            >::non_const_type
+  get(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) {
+    return boost::tuples::get<N>(*this);
+  }
+
+  template <int N>
+  typename access_traits<
+             typename element<N, self_type>::type
+           >::const_type
+  get(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) const {
+    return boost::tuples::get<N>(*this);
+  }
+
+};
+
+// templates for finding out the length of the tuple -------------------
+
+template<class T>
+struct length  {
+  BOOST_STATIC_CONSTANT(int, value = 1 + length<typename T::tail_type>::value);
+};
+
+template<>
+struct length<tuple<> > {
+  BOOST_STATIC_CONSTANT(int, value = 0);
+};
+
+template<>
+struct length<tuple<> const> {
+  BOOST_STATIC_CONSTANT(int, value = 0);
+};
+
+template<>
+struct length<null_type> {
+  BOOST_STATIC_CONSTANT(int, value = 0);
+};
+
+template<>
+struct length<null_type const> {
+  BOOST_STATIC_CONSTANT(int, value = 0);
+};
+
+namespace detail {
+
+// Tuple to cons mapper --------------------------------------------------
+template <class T0, class T1, class T2, class T3, class T4,
+          class T5, class T6, class T7, class T8, class T9>
+struct map_tuple_to_cons
+{
+  typedef cons<T0,
+               typename map_tuple_to_cons<T1, T2, T3, T4, T5,
+                                          T6, T7, T8, T9, null_type>::type
+              > type;
+};
+
+// The empty tuple is a null_type
+template <>
+struct map_tuple_to_cons<null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type>
+{
+  typedef null_type type;
+};
+
+} // end detail
+
+// -------------------------------------------------------------------
+// -- tuple ------------------------------------------------------
+template <class T0, class T1, class T2, class T3, class T4,
+          class T5, class T6, class T7, class T8, class T9>
+
+class tuple :
+  public detail::map_tuple_to_cons<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type
+{
+public:
+  typedef typename
+    detail::map_tuple_to_cons<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type inherited;
+  typedef typename inherited::head_type head_type;
+  typedef typename inherited::tail_type tail_type;
+
+
+// access_traits<T>::parameter_type takes non-reference types as const T&
+  tuple() {}
+
+  tuple(typename access_traits<T0>::parameter_type t0)
+    : inherited(t0, detail::cnull(), detail::cnull(), detail::cnull(),
+                detail::cnull(), detail::cnull(), detail::cnull(),
+                detail::cnull(), detail::cnull(), detail::cnull()) {}
+
+  tuple(typename access_traits<T0>::parameter_type t0,
+        typename access_traits<T1>::parameter_type t1)
+    : inherited(t0, t1, detail::cnull(), detail::cnull(),
+                detail::cnull(), detail::cnull(), detail::cnull(),
+                detail::cnull(), detail::cnull(), detail::cnull()) {}
+
+  tuple(typename access_traits<T0>::parameter_type t0,
+        typename access_traits<T1>::parameter_type t1,
+        typename access_traits<T2>::parameter_type t2)
+    : inherited(t0, t1, t2, detail::cnull(), detail::cnull(),
+                detail::cnull(), detail::cnull(), detail::cnull(),
+                detail::cnull(), detail::cnull()) {}
+
+  tuple(typename access_traits<T0>::parameter_type t0,
+        typename access_traits<T1>::parameter_type t1,
+        typename access_traits<T2>::parameter_type t2,
+        typename access_traits<T3>::parameter_type t3)
+    : inherited(t0, t1, t2, t3, detail::cnull(), detail::cnull(),
+                detail::cnull(), detail::cnull(), detail::cnull(),
+                detail::cnull()) {}
+
+  tuple(typename access_traits<T0>::parameter_type t0,
+        typename access_traits<T1>::parameter_type t1,
+        typename access_traits<T2>::parameter_type t2,
+        typename access_traits<T3>::parameter_type t3,
+        typename access_traits<T4>::parameter_type t4)
+    : inherited(t0, t1, t2, t3, t4, detail::cnull(), detail::cnull(),
+                detail::cnull(), detail::cnull(), detail::cnull()) {}
+
+  tuple(typename access_traits<T0>::parameter_type t0,
+        typename access_traits<T1>::parameter_type t1,
+        typename access_traits<T2>::parameter_type t2,
+        typename access_traits<T3>::parameter_type t3,
+        typename access_traits<T4>::parameter_type t4,
+        typename access_traits<T5>::parameter_type t5)
+    : inherited(t0, t1, t2, t3, t4, t5, detail::cnull(), detail::cnull(),
+                detail::cnull(), detail::cnull()) {}
+
+  tuple(typename access_traits<T0>::parameter_type t0,
+        typename access_traits<T1>::parameter_type t1,
+        typename access_traits<T2>::parameter_type t2,
+        typename access_traits<T3>::parameter_type t3,
+        typename access_traits<T4>::parameter_type t4,
+        typename access_traits<T5>::parameter_type t5,
+        typename access_traits<T6>::parameter_type t6)
+    : inherited(t0, t1, t2, t3, t4, t5, t6, detail::cnull(),
+                detail::cnull(), detail::cnull()) {}
+
+  tuple(typename access_traits<T0>::parameter_type t0,
+        typename access_traits<T1>::parameter_type t1,
+        typename access_traits<T2>::parameter_type t2,
+        typename access_traits<T3>::parameter_type t3,
+        typename access_traits<T4>::parameter_type t4,
+        typename access_traits<T5>::parameter_type t5,
+        typename access_traits<T6>::parameter_type t6,
+        typename access_traits<T7>::parameter_type t7)
+    : inherited(t0, t1, t2, t3, t4, t5, t6, t7, detail::cnull(),
+                detail::cnull()) {}
+
+  tuple(typename access_traits<T0>::parameter_type t0,
+        typename access_traits<T1>::parameter_type t1,
+        typename access_traits<T2>::parameter_type t2,
+        typename access_traits<T3>::parameter_type t3,
+        typename access_traits<T4>::parameter_type t4,
+        typename access_traits<T5>::parameter_type t5,
+        typename access_traits<T6>::parameter_type t6,
+        typename access_traits<T7>::parameter_type t7,
+        typename access_traits<T8>::parameter_type t8)
+    : inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, detail::cnull()) {}
+
+  tuple(typename access_traits<T0>::parameter_type t0,
+        typename access_traits<T1>::parameter_type t1,
+        typename access_traits<T2>::parameter_type t2,
+        typename access_traits<T3>::parameter_type t3,
+        typename access_traits<T4>::parameter_type t4,
+        typename access_traits<T5>::parameter_type t5,
+        typename access_traits<T6>::parameter_type t6,
+        typename access_traits<T7>::parameter_type t7,
+        typename access_traits<T8>::parameter_type t8,
+        typename access_traits<T9>::parameter_type t9)
+    : inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) {}
+
+
+  template<class U1, class U2>
+  tuple(const cons<U1, U2>& p) : inherited(p) {}
+
+  template <class U1, class U2>
+  tuple& operator=(const cons<U1, U2>& k) {
+    inherited::operator=(k);
+    return *this;
+  }
+
+  template <class U1, class U2>
+  tuple& operator=(const std::pair<U1, U2>& k) {
+    BOOST_STATIC_ASSERT(length<tuple>::value == 2);// check_length = 2
+    this->head = k.first;
+    this->tail.head = k.second;
+    return *this;
+  }
+
+};
+
+// The empty tuple
+template <>
+class tuple<null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type>  :
+  public null_type
+{
+public:
+  typedef null_type inherited;
+};
+
+
+// Swallows any assignment   (by Doug Gregor)
+namespace detail {
+
+struct swallow_assign;
+typedef void (detail::swallow_assign::*ignore_t)();
+struct swallow_assign {
+  swallow_assign(ignore_t(*)(ignore_t)) {}
+  template<typename T>
+  swallow_assign const& operator=(const T&) const {
+    return *this;
+  }
+};
+
+
+} // namespace detail
+
+// "ignore" allows tuple positions to be ignored when using "tie".
+inline detail::ignore_t ignore(detail::ignore_t) { return 0; }
+
+// ---------------------------------------------------------------------------
+// The call_traits for make_tuple
+// Honours the reference_wrapper class.
+
+// Must be instantiated with plain or const plain types (not with references)
+
+// from template<class T> foo(const T& t) : make_tuple_traits<const T>::type
+// from template<class T> foo(T& t) : make_tuple_traits<T>::type
+
+// Conversions:
+// T -> T,
+// references -> compile_time_error
+// reference_wrapper<T> -> T&
+// const reference_wrapper<T> -> T&
+// array -> const ref array
+
+
+template<class T>
+struct make_tuple_traits {
+  typedef T type;
+
+  // commented away, see below  (JJ)
+  //  typedef typename IF<
+  //  boost::is_function<T>::value,
+  //  T&,
+  //  T>::RET type;
+
+};
+
+// The is_function test was there originally for plain function types,
+// which can't be stored as such (we must either store them as references or
+// pointers). Such a type could be formed if make_tuple was called with a
+// reference to a function.
+// But this would mean that a const qualified function type was formed in
+// the make_tuple function and hence make_tuple can't take a function
+// reference as a parameter, and thus T can't be a function type.
+// So is_function test was removed.
+// (14.8.3. says that type deduction fails if a cv-qualified function type
+// is created. (It only applies for the case of explicitly specifying template
+// args, though?)) (JJ)
+
+template<class T>
+struct make_tuple_traits<T&> {
+  typedef typename
+     detail::generate_error<T&>::
+       do_not_use_with_reference_type error;
+};
+
+// Arrays can't be stored as plain types; convert them to references.
+// All arrays are converted to const. This is because make_tuple takes its
+// parameters as const T& and thus the knowledge of the potential
+// non-constness of actual argument is lost.
+template<class T, int n>  struct make_tuple_traits <T[n]> {
+  typedef const T (&type)[n];
+};
+
+template<class T, int n>
+struct make_tuple_traits<const T[n]> {
+  typedef const T (&type)[n];
+};
+
+template<class T, int n>  struct make_tuple_traits<volatile T[n]> {
+  typedef const volatile T (&type)[n];
+};
+
+template<class T, int n>
+struct make_tuple_traits<const volatile T[n]> {
+  typedef const volatile T (&type)[n];
+};
+
+template<class T>
+struct make_tuple_traits<reference_wrapper<T> >{
+  typedef T& type;
+};
+
+template<class T>
+struct make_tuple_traits<const reference_wrapper<T> >{
+  typedef T& type;
+};
+
+template<>
+struct make_tuple_traits<detail::ignore_t(detail::ignore_t)> {
+  typedef detail::swallow_assign type;
+};
+
+
+
+namespace detail {
+
+// a helper traits to make the make_tuple functions shorter (Vesa Karvonen's
+// suggestion)
+template <
+  class T0 = null_type, class T1 = null_type, class T2 = null_type,
+  class T3 = null_type, class T4 = null_type, class T5 = null_type,
+  class T6 = null_type, class T7 = null_type, class T8 = null_type,
+  class T9 = null_type
+>
+struct make_tuple_mapper {
+  typedef
+    tuple<typename make_tuple_traits<T0>::type,
+          typename make_tuple_traits<T1>::type,
+          typename make_tuple_traits<T2>::type,
+          typename make_tuple_traits<T3>::type,
+          typename make_tuple_traits<T4>::type,
+          typename make_tuple_traits<T5>::type,
+          typename make_tuple_traits<T6>::type,
+          typename make_tuple_traits<T7>::type,
+          typename make_tuple_traits<T8>::type,
+          typename make_tuple_traits<T9>::type> type;
+};
+
+} // end detail
+
+// -make_tuple function templates -----------------------------------
+inline tuple<> make_tuple() {
+  return tuple<>();
+}
+
+template<class T0>
+inline typename detail::make_tuple_mapper<T0>::type
+make_tuple(const T0& t0) {
+  typedef typename detail::make_tuple_mapper<T0>::type t;
+  return t(t0);
+}
+
+template<class T0, class T1>
+inline typename detail::make_tuple_mapper<T0, T1>::type
+make_tuple(const T0& t0, const T1& t1) {
+  typedef typename detail::make_tuple_mapper<T0, T1>::type t;
+  return t(t0, t1);
+}
+
+template<class T0, class T1, class T2>
+inline typename detail::make_tuple_mapper<T0, T1, T2>::type
+make_tuple(const T0& t0, const T1& t1, const T2& t2) {
+  typedef typename detail::make_tuple_mapper<T0, T1, T2>::type t;
+  return t(t0, t1, t2);
+}
+
+template<class T0, class T1, class T2, class T3>
+inline typename detail::make_tuple_mapper<T0, T1, T2, T3>::type
+make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3) {
+  typedef typename detail::make_tuple_mapper<T0, T1, T2, T3>::type t;
+  return t(t0, t1, t2, t3);
+}
+
+template<class T0, class T1, class T2, class T3, class T4>
+inline typename detail::make_tuple_mapper<T0, T1, T2, T3, T4>::type
+make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
+                  const T4& t4) {
+  typedef typename detail::make_tuple_mapper<T0, T1, T2, T3, T4>::type t;
+  return t(t0, t1, t2, t3, t4);
+}
+
+template<class T0, class T1, class T2, class T3, class T4, class T5>
+inline typename detail::make_tuple_mapper<T0, T1, T2, T3, T4, T5>::type
+make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
+                  const T4& t4, const T5& t5) {
+  typedef typename detail::make_tuple_mapper<T0, T1, T2, T3, T4, T5>::type t;
+  return t(t0, t1, t2, t3, t4, t5);
+}
+
+template<class T0, class T1, class T2, class T3, class T4, class T5, class T6>
+inline typename detail::make_tuple_mapper<T0, T1, T2, T3, T4, T5, T6>::type
+make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
+                  const T4& t4, const T5& t5, const T6& t6) {
+  typedef typename detail::make_tuple_mapper
+           <T0, T1, T2, T3, T4, T5, T6>::type t;
+  return t(t0, t1, t2, t3, t4, t5, t6);
+}
+
+template<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
+         class T7>
+inline typename detail::make_tuple_mapper<T0, T1, T2, T3, T4, T5, T6, T7>::type
+make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
+                  const T4& t4, const T5& t5, const T6& t6, const T7& t7) {
+  typedef typename detail::make_tuple_mapper
+           <T0, T1, T2, T3, T4, T5, T6, T7>::type t;
+  return t(t0, t1, t2, t3, t4, t5, t6, t7);
+}
+
+template<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
+         class T7, class T8>
+inline typename detail::make_tuple_mapper
+  <T0, T1, T2, T3, T4, T5, T6, T7, T8>::type
+make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
+                  const T4& t4, const T5& t5, const T6& t6, const T7& t7,
+                  const T8& t8) {
+  typedef typename detail::make_tuple_mapper
+           <T0, T1, T2, T3, T4, T5, T6, T7, T8>::type t;
+  return t(t0, t1, t2, t3, t4, t5, t6, t7, t8);
+}
+
+template<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
+         class T7, class T8, class T9>
+inline typename detail::make_tuple_mapper
+  <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type
+make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
+                  const T4& t4, const T5& t5, const T6& t6, const T7& t7,
+                  const T8& t8, const T9& t9) {
+  typedef typename detail::make_tuple_mapper
+           <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type t;
+  return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9);
+}
+
+namespace detail {
+
+template<class T>
+struct tie_traits {
+  typedef T& type;
+};
+
+template<>
+struct tie_traits<ignore_t(ignore_t)> {
+  typedef swallow_assign type;
+};
+
+template<>
+struct tie_traits<void> {
+  typedef null_type type;
+};
+
+template <
+  class T0 = void, class T1 = void, class T2 = void,
+  class T3 = void, class T4 = void, class T5 = void,
+  class T6 = void, class T7 = void, class T8 = void,
+  class T9 = void
+>
+struct tie_mapper {
+  typedef
+    tuple<typename tie_traits<T0>::type,
+          typename tie_traits<T1>::type,
+          typename tie_traits<T2>::type,
+          typename tie_traits<T3>::type,
+          typename tie_traits<T4>::type,
+          typename tie_traits<T5>::type,
+          typename tie_traits<T6>::type,
+          typename tie_traits<T7>::type,
+          typename tie_traits<T8>::type,
+          typename tie_traits<T9>::type> type;
+};
+
+}
+
+// Tie function templates -------------------------------------------------
+template<class T0>
+inline typename detail::tie_mapper<T0>::type
+tie(T0& t0) {
+  typedef typename detail::tie_mapper<T0>::type t;
+  return t(t0);
+}
+
+template<class T0, class T1>
+inline typename detail::tie_mapper<T0, T1>::type
+tie(T0& t0, T1& t1) {
+  typedef typename detail::tie_mapper<T0, T1>::type t;
+  return t(t0, t1);
+}
+
+template<class T0, class T1, class T2>
+inline typename detail::tie_mapper<T0, T1, T2>::type
+tie(T0& t0, T1& t1, T2& t2) {
+  typedef typename detail::tie_mapper<T0, T1, T2>::type t;
+  return t(t0, t1, t2);
+}
+
+template<class T0, class T1, class T2, class T3>
+inline typename detail::tie_mapper<T0, T1, T2, T3>::type
+tie(T0& t0, T1& t1, T2& t2, T3& t3) {
+  typedef typename detail::tie_mapper<T0, T1, T2, T3>::type t;
+  return t(t0, t1, t2, t3);
+}
+
+template<class T0, class T1, class T2, class T3, class T4>
+inline typename detail::tie_mapper<T0, T1, T2, T3, T4>::type
+tie(T0& t0, T1& t1, T2& t2, T3& t3,
+                  T4& t4) {
+  typedef typename detail::tie_mapper<T0, T1, T2, T3, T4>::type t;
+  return t(t0, t1, t2, t3, t4);
+}
+
+template<class T0, class T1, class T2, class T3, class T4, class T5>
+inline typename detail::tie_mapper<T0, T1, T2, T3, T4, T5>::type
+tie(T0& t0, T1& t1, T2& t2, T3& t3,
+                  T4& t4, T5& t5) {
+  typedef typename detail::tie_mapper<T0, T1, T2, T3, T4, T5>::type t;
+  return t(t0, t1, t2, t3, t4, t5);
+}
+
+template<class T0, class T1, class T2, class T3, class T4, class T5, class T6>
+inline typename detail::tie_mapper<T0, T1, T2, T3, T4, T5, T6>::type
+tie(T0& t0, T1& t1, T2& t2, T3& t3,
+                  T4& t4, T5& t5, T6& t6) {
+  typedef typename detail::tie_mapper
+           <T0, T1, T2, T3, T4, T5, T6>::type t;
+  return t(t0, t1, t2, t3, t4, t5, t6);
+}
+
+template<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
+         class T7>
+inline typename detail::tie_mapper<T0, T1, T2, T3, T4, T5, T6, T7>::type
+tie(T0& t0, T1& t1, T2& t2, T3& t3,
+                  T4& t4, T5& t5, T6& t6, T7& t7) {
+  typedef typename detail::tie_mapper
+           <T0, T1, T2, T3, T4, T5, T6, T7>::type t;
+  return t(t0, t1, t2, t3, t4, t5, t6, t7);
+}
+
+template<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
+         class T7, class T8>
+inline typename detail::tie_mapper
+  <T0, T1, T2, T3, T4, T5, T6, T7, T8>::type
+tie(T0& t0, T1& t1, T2& t2, T3& t3,
+                  T4& t4, T5& t5, T6& t6, T7& t7,
+                  T8& t8) {
+  typedef typename detail::tie_mapper
+           <T0, T1, T2, T3, T4, T5, T6, T7, T8>::type t;
+  return t(t0, t1, t2, t3, t4, t5, t6, t7, t8);
+}
+
+template<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
+         class T7, class T8, class T9>
+inline typename detail::tie_mapper
+  <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type
+tie(T0& t0, T1& t1, T2& t2, T3& t3,
+                  T4& t4, T5& t5, T6& t6, T7& t7,
+                  T8& t8, T9& t9) {
+  typedef typename detail::tie_mapper
+           <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type t;
+  return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9);
+}
+
+template <class T0, class T1, class T2, class T3, class T4,
+          class T5, class T6, class T7, class T8, class T9>
+void swap(tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>& lhs,
+          tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>& rhs);
+inline void swap(null_type&, null_type&) {}
+template<class HH>
+inline void swap(cons<HH, null_type>& lhs, cons<HH, null_type>& rhs) {
+  ::boost::swap(lhs.head, rhs.head);
+}
+template<class HH, class TT>
+inline void swap(cons<HH, TT>& lhs, cons<HH, TT>& rhs) {
+  ::boost::swap(lhs.head, rhs.head);
+  ::boost::tuples::swap(lhs.tail, rhs.tail);
+}
+template <class T0, class T1, class T2, class T3, class T4,
+          class T5, class T6, class T7, class T8, class T9>
+inline void swap(tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>& lhs,
+          tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>& rhs) {
+  typedef tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> tuple_type;
+  typedef typename tuple_type::inherited base;
+  ::boost::tuples::swap(static_cast<base&>(lhs), static_cast<base&>(rhs));
+}
+
+} // end of namespace tuples
+} // end of namespace boost
+
+
+#endif // BOOST_TUPLE_BASIC_HPP
+
+
diff --git a/ext/boost/tuple/tuple.hpp b/ext/boost/tuple/tuple.hpp
new file mode 100644
index 0000000..7703597
--- /dev/null
+++ b/ext/boost/tuple/tuple.hpp
@@ -0,0 +1,90 @@
+//  tuple.hpp - Boost Tuple Library --------------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi at cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://www.boost.org
+
+// ----------------------------------------------------------------- 
+
+#ifndef BOOST_TUPLE_HPP
+#define BOOST_TUPLE_HPP
+
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730
+// Work around a compiler bug.
+// boost::python::tuple has to be seen by the compiler before the
+// boost::tuple class template.
+namespace boost { namespace python { class tuple; }}
+#endif
+
+#include "boost/config.hpp"
+#include "boost/static_assert.hpp"
+
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+// The MSVC version
+#include "boost/tuple/detail/tuple_basic_no_partial_spec.hpp"
+
+#else
+// other compilers
+#include "boost/ref.hpp"
+#include "boost/tuple/detail/tuple_basic.hpp"
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+namespace boost {    
+
+using tuples::tuple;
+using tuples::make_tuple;
+using tuples::tie;
+#if !defined(BOOST_NO_USING_TEMPLATE)
+using tuples::get;
+#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+//
+// The "using tuples::get" statement causes the
+// Borland compiler to ICE, use forwarding
+// functions instead:
+//
+template<int N, class HT, class TT>
+inline typename tuples::access_traits<
+                  typename tuples::element<N, tuples::cons<HT, TT> >::type
+                >::non_const_type
+get(tuples::cons<HT, TT>& c) {
+  return tuples::get<N,HT,TT>(c);
+} 
+// get function for const cons-lists, returns a const reference to
+// the element. If the element is a reference, returns the reference
+// as such (that is, can return a non-const reference)
+template<int N, class HT, class TT>
+inline typename tuples::access_traits<
+                  typename tuples::element<N, tuples::cons<HT, TT> >::type
+                >::const_type
+get(const tuples::cons<HT, TT>& c) {
+  return tuples::get<N,HT,TT>(c);
+}
+#else  // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+//
+// MSVC, using declarations don't mix with templates well,
+// so use forwarding functions instead:
+//
+template<int N, typename Head, typename Tail>
+typename tuples::detail::element_ref<N, tuples::cons<Head, Tail> >::RET
+get(tuples::cons<Head, Tail>& t, tuples::detail::workaround_holder<N>* = 0)
+{
+   return tuples::detail::get_class<N>::get(t);
+}
+
+template<int N, typename Head, typename Tail>
+typename tuples::detail::element_const_ref<N, tuples::cons<Head, Tail> >::RET
+get(const tuples::cons<Head, Tail>& t, tuples::detail::workaround_holder<N>* = 0)
+{
+   return tuples::detail::get_class<N>::get(t);
+}
+#endif // BOOST_NO_USING_TEMPLATE
+   
+} // end namespace boost
+
+
+#endif // BOOST_TUPLE_HPP
diff --git a/ext/boost/type_traits/._add_const.hpp b/ext/boost/type_traits/._add_const.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._add_const.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._add_pointer.hpp b/ext/boost/type_traits/._add_pointer.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._add_pointer.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._add_reference.hpp b/ext/boost/type_traits/._add_reference.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._add_reference.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._add_volatile.hpp b/ext/boost/type_traits/._add_volatile.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._add_volatile.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._broken_compiler_spec.hpp b/ext/boost/type_traits/._broken_compiler_spec.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._broken_compiler_spec.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._composite_traits.hpp b/ext/boost/type_traits/._composite_traits.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._composite_traits.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._config.hpp b/ext/boost/type_traits/._config.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._config.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._conversion_traits.hpp b/ext/boost/type_traits/._conversion_traits.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._conversion_traits.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._ice.hpp b/ext/boost/type_traits/._ice.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._ice.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._integral_constant.hpp b/ext/boost/type_traits/._integral_constant.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._integral_constant.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._is_abstract.hpp b/ext/boost/type_traits/._is_abstract.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._is_abstract.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._is_arithmetic.hpp b/ext/boost/type_traits/._is_arithmetic.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._is_arithmetic.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._is_array.hpp b/ext/boost/type_traits/._is_array.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._is_array.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._is_base_and_derived.hpp b/ext/boost/type_traits/._is_base_and_derived.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._is_base_and_derived.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._is_base_of.hpp b/ext/boost/type_traits/._is_base_of.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._is_base_of.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._is_class.hpp b/ext/boost/type_traits/._is_class.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._is_class.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._is_float.hpp b/ext/boost/type_traits/._is_float.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._is_float.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._is_integral.hpp b/ext/boost/type_traits/._is_integral.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._is_integral.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._is_lvalue_reference.hpp b/ext/boost/type_traits/._is_lvalue_reference.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._is_lvalue_reference.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._is_reference.hpp b/ext/boost/type_traits/._is_reference.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._is_reference.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._is_rvalue_reference.hpp b/ext/boost/type_traits/._is_rvalue_reference.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._is_rvalue_reference.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._is_same.hpp b/ext/boost/type_traits/._is_same.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._is_same.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._is_scalar.hpp b/ext/boost/type_traits/._is_scalar.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._is_scalar.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._is_void.hpp b/ext/boost/type_traits/._is_void.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._is_void.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._make_unsigned.hpp b/ext/boost/type_traits/._make_unsigned.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._make_unsigned.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/._remove_const.hpp b/ext/boost/type_traits/._remove_const.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/._remove_const.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/add_cv.hpp b/ext/boost/type_traits/add_cv.hpp
new file mode 100644
index 0000000..bfde76a
--- /dev/null
+++ b/ext/boost/type_traits/add_cv.hpp
@@ -0,0 +1,48 @@
+
+//  (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+//  Hinnant & John Maddock 2000.  
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+
+#ifndef BOOST_TT_ADD_CV_HPP_INCLUDED
+#define BOOST_TT_ADD_CV_HPP_INCLUDED
+
+#include <boost/config.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/type_trait_def.hpp>
+
+namespace boost {
+
+// * convert a type T to a const volatile type - add_cv<T>
+// this is not required since the result is always
+// the same as "T const volatile", but it does suppress warnings
+// from some compilers:
+
+#if defined(BOOST_MSVC)
+// This bogus warning will appear when add_volatile is applied to a
+// const volatile reference because we can't detect const volatile
+// references with MSVC6.
+#   pragma warning(push)
+#   pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored
+#endif 
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_cv,T,T const volatile)
+
+#if defined(BOOST_MSVC)
+#   pragma warning(pop)
+#endif 
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_cv,T&,T&)
+#endif
+
+} // namespace boost
+
+#include <boost/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_TT_ADD_CV_HPP_INCLUDED
diff --git a/ext/boost/type_traits/add_rvalue_reference.hpp b/ext/boost/type_traits/add_rvalue_reference.hpp
new file mode 100644
index 0000000..f0e9925
--- /dev/null
+++ b/ext/boost/type_traits/add_rvalue_reference.hpp
@@ -0,0 +1,66 @@
+//  add_rvalue_reference.hpp  ---------------------------------------------------------//
+
+//  Copyright 2010 Vicente J. Botet Escriba
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+#ifndef BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP
+#define BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP
+
+#include <boost/config.hpp>
+
+//----------------------------------------------------------------------------//
+
+#include <boost/type_traits/is_void.hpp>
+#include <boost/type_traits/is_reference.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/type_trait_def.hpp>
+
+//----------------------------------------------------------------------------//
+//                                                                            //
+//                           C++03 implementation of                          //
+//             20.7.6.2 Reference modifications [meta.trans.ref]              //
+//                          Written by Vicente J. Botet Escriba               //
+//                                                                            //
+// If T names an object or function type then the member typedef type
+// shall name T&&; otherwise, type shall name T. [ Note: This rule reflects
+// the semantics of reference collapsing. For example, when a type T names
+// a type T1&, the type add_rvalue_reference<T>::type is not an rvalue
+// reference. -end note ]
+//----------------------------------------------------------------------------//
+
+namespace boost {
+
+namespace type_traits_detail {
+
+    template <typename T, bool b>
+    struct add_rvalue_reference_helper
+    { typedef T   type; };
+
+#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+    template <typename T>
+    struct add_rvalue_reference_helper<T, true>
+    {
+        typedef T&&   type;
+    };
+#endif
+
+    template <typename T>
+    struct add_rvalue_reference_imp
+    { 
+       typedef typename boost::type_traits_detail::add_rvalue_reference_helper
+                  <T, (!is_void<T>::value && !is_reference<T>::value) >::type type; 
+    };
+
+}
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_rvalue_reference,T,typename boost::type_traits_detail::add_rvalue_reference_imp<T>::type)
+
+}  // namespace boost
+
+#include <boost/type_traits/detail/type_trait_undef.hpp>
+
+#endif  // BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP
+
diff --git a/ext/boost/type_traits/alignment_of.hpp b/ext/boost/type_traits/alignment_of.hpp
index 51357ce..e1735dc 100644
--- a/ext/boost/type_traits/alignment_of.hpp
+++ b/ext/boost/type_traits/alignment_of.hpp
@@ -93,7 +93,7 @@ BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(alignment_of,T,::boost::detail::alignment_of_impl
 #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 template <typename T>
 struct alignment_of<T&>
-    : alignment_of<T*>
+    : public alignment_of<T*>
 {
 };
 #endif
diff --git a/ext/boost/type_traits/common_type.hpp b/ext/boost/type_traits/common_type.hpp
new file mode 100644
index 0000000..2739688
--- /dev/null
+++ b/ext/boost/type_traits/common_type.hpp
@@ -0,0 +1,158 @@
+//  common_type.hpp  ---------------------------------------------------------//
+
+//  Copyright 2008 Howard Hinnant
+//  Copyright 2008 Beman Dawes
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+#ifndef BOOST_TYPE_TRAITS_COMMON_TYPE_HPP
+#define BOOST_TYPE_TRAITS_COMMON_TYPE_HPP
+
+#include <boost/config.hpp>
+
+#if defined(__SUNPRO_CC) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF)
+#  define BOOST_COMMON_TYPE_DONT_USE_TYPEOF
+#endif
+#if defined(__IBMCPP__) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF)
+#  define BOOST_COMMON_TYPE_DONT_USE_TYPEOF
+#endif
+
+//----------------------------------------------------------------------------//
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) && !defined(BOOST_COMMON_TYPE_ARITY)
+#define BOOST_COMMON_TYPE_ARITY 3
+#endif
+
+//----------------------------------------------------------------------------//
+#if defined(BOOST_NO_DECLTYPE) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) && !defined(BOOST_TYPEOF_SILENT)
+#define BOOST_TYPEOF_SILENT
+#include <boost/typeof/typeof.hpp>   // boost wonders never cease!
+#endif
+
+//----------------------------------------------------------------------------//
+#ifndef BOOST_NO_STATIC_ASSERT
+#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
+#elif defined(BOOST_COMMON_TYPE_USES_MPL_ASSERT)
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/bool.hpp>
+#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES)                                 \
+    BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
+#else
+#include <boost/static_assert.hpp>
+#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
+#endif
+
+#if !defined(BOOST_NO_STATIC_ASSERT) || !defined(BOOST_COMMON_TYPE_USES_MPL_ASSERT)
+#define BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE "must be complete type"
+#endif
+
+#if defined(BOOST_NO_DECLTYPE) && defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF)
+#include <boost/type_traits/detail/common_type_imp.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#endif
+#include <boost/mpl/if.hpp>
+#include <boost/utility/declval.hpp>
+#include <boost/type_traits/add_rvalue_reference.hpp>
+
+//----------------------------------------------------------------------------//
+//                                                                            //
+//                           C++03 implementation of                          //
+//             20.6.7 Other transformations [meta.trans.other]                //
+//                          Written by Howard Hinnant                         //
+//      Adapted for Boost by Beman Dawes, Vicente Botet and  Jeffrey Hellrung //
+//                                                                            //
+//----------------------------------------------------------------------------//
+
+namespace boost {
+
+// prototype
+#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
+    template<typename... T>
+    struct common_type;
+#else // or no specialization
+    template <class T, class U = void, class V = void>
+    struct common_type
+    {
+    public:
+        typedef typename common_type<typename common_type<T, U>::type, V>::type type;
+    };
+#endif
+
+
+// 1 arg
+    template<typename T>
+#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
+    struct common_type<T>
+#else
+    struct common_type<T, void, void>
+
+#endif
+    {
+        BOOST_COMMON_TYPE_STATIC_ASSERT(sizeof(T) > 0, BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE, (T));
+    public:
+        typedef T type;
+    };
+
+// 2 args
+namespace type_traits_detail {
+
+    template <class T, class U>
+    struct common_type_2
+    {
+    private:
+        BOOST_COMMON_TYPE_STATIC_ASSERT(sizeof(T) > 0, BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE, (T));
+        BOOST_COMMON_TYPE_STATIC_ASSERT(sizeof(U) > 0, BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE, (U));
+        static bool declval_bool();  // workaround gcc bug; not required by std
+        static typename add_rvalue_reference<T>::type declval_T();  // workaround gcc bug; not required by std
+        static typename add_rvalue_reference<U>::type declval_U();  // workaround gcc bug; not required by std
+        static typename add_rvalue_reference<bool>::type declval_b();  
+
+#if !defined(BOOST_NO_DECLTYPE)
+    public:
+        typedef decltype(declval<bool>() ? declval<T>() : declval<U>()) type;
+#elif defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF)
+    public:
+    typedef typename detail_type_traits_common_type::common_type_impl<
+          typename remove_cv<T>::type,
+          typename remove_cv<U>::type
+      >::type type;
+#else
+    public:
+        typedef BOOST_TYPEOF_TPL(declval_b() ? declval_T() : declval_U()) type;
+#endif
+
+#if defined(__GNUC__) && __GNUC__ == 3 && (__GNUC_MINOR__ == 2 || __GNUC_MINOR__ == 3)
+    public:
+        void public_dummy_function_just_to_silence_warning();
+#endif
+    };
+
+    template <class T>
+    struct common_type_2<T, T>
+    {
+        typedef T type;
+    };
+    }
+
+#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
+    template <class T, class U>
+    struct common_type<T, U>
+#else
+    template <class T, class U>
+    struct common_type<T, U, void>
+#endif
+    : public type_traits_detail::common_type_2<T,U>
+    { };
+
+
+// 3 or more args
+#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
+    template<typename T, typename U, typename... V>
+    struct common_type<T, U, V...> {
+    public:
+        typedef typename common_type<typename common_type<T, U>::type, V...>::type type;
+    };
+#endif
+}  // namespace boost
+
+#endif  // BOOST_TYPE_TRAITS_COMMON_TYPE_HPP
diff --git a/ext/boost/type_traits/cv_traits.hpp b/ext/boost/type_traits/cv_traits.hpp
new file mode 100644
index 0000000..5bd6c4f
--- /dev/null
+++ b/ext/boost/type_traits/cv_traits.hpp
@@ -0,0 +1,24 @@
+//  (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+//  Hinnant & John Maddock 2000.  
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+//
+//  defines traits classes for cv-qualified types:
+//  is_const, is_volatile, remove_const, remove_volatile, remove_cv.
+
+#ifndef BOOST_TT_CV_TRAITS_HPP_INCLUDED
+#define BOOST_TT_CV_TRAITS_HPP_INCLUDED
+
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_volatile.hpp>
+#include <boost/type_traits/add_cv.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/type_traits/remove_volatile.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+
+#endif // BOOST_TT_CV_TRAITS_HPP_INCLUDED
diff --git a/ext/boost/type_traits/decay.hpp b/ext/boost/type_traits/decay.hpp
new file mode 100644
index 0000000..c23a9b0
--- /dev/null
+++ b/ext/boost/type_traits/decay.hpp
@@ -0,0 +1,44 @@
+//  (C) Copyright John Maddock & Thorsten Ottosen 2005.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+
+#ifndef BOOST_TT_DECAY_HPP_INCLUDED
+#define BOOST_TT_DECAY_HPP_INCLUDED
+
+#include <boost/type_traits/config.hpp>
+#include <boost/type_traits/is_array.hpp>
+#include <boost/type_traits/is_function.hpp>
+#include <boost/type_traits/remove_bounds.hpp>
+#include <boost/type_traits/add_pointer.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+
+namespace boost 
+{
+
+    template< class T >
+    struct decay
+    {
+    private:
+        typedef BOOST_DEDUCED_TYPENAME remove_reference<T>::type Ty;
+    public:
+        typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< 
+            is_array<Ty>,
+            mpl::identity<BOOST_DEDUCED_TYPENAME remove_bounds<Ty>::type*>,
+            BOOST_DEDUCED_TYPENAME mpl::eval_if< 
+                is_function<Ty>,
+                add_pointer<Ty>,
+                mpl::identity<Ty>
+            >
+        >::type type;
+    };
+    
+} // namespace boost
+
+
+#endif // BOOST_TT_DECAY_HPP_INCLUDED
diff --git a/ext/boost/type_traits/detail/._false_result.hpp b/ext/boost/type_traits/detail/._false_result.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/detail/._false_result.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/detail/._ice_and.hpp b/ext/boost/type_traits/detail/._ice_and.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/detail/._ice_and.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/detail/._ice_eq.hpp b/ext/boost/type_traits/detail/._ice_eq.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/detail/._ice_eq.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/detail/._ice_not.hpp b/ext/boost/type_traits/detail/._ice_not.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/detail/._ice_not.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/detail/._ice_or.hpp b/ext/boost/type_traits/detail/._ice_or.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/detail/._ice_or.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/detail/._is_function_ptr_helper.hpp b/ext/boost/type_traits/detail/._is_function_ptr_helper.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/detail/._is_function_ptr_helper.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/detail/._is_mem_fun_pointer_impl.hpp b/ext/boost/type_traits/detail/._is_mem_fun_pointer_impl.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/detail/._is_mem_fun_pointer_impl.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/detail/._size_t_trait_undef.hpp b/ext/boost/type_traits/detail/._size_t_trait_undef.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/detail/._size_t_trait_undef.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/detail/._template_arity_spec.hpp b/ext/boost/type_traits/detail/._template_arity_spec.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/detail/._template_arity_spec.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/detail/._type_trait_undef.hpp b/ext/boost/type_traits/detail/._type_trait_undef.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/detail/._type_trait_undef.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/detail/._yes_no_type.hpp b/ext/boost/type_traits/detail/._yes_no_type.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/type_traits/detail/._yes_no_type.hpp and /dev/null differ
diff --git a/ext/boost/type_traits/detail/bool_trait_def.hpp b/ext/boost/type_traits/detail/bool_trait_def.hpp
index 19bb18c..e3c7774 100644
--- a/ext/boost/type_traits/detail/bool_trait_def.hpp
+++ b/ext/boost/type_traits/detail/bool_trait_def.hpp
@@ -8,8 +8,8 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 
 // $Source$
-// $Date: 2006-07-12 07:10:22 -0400 (Wed, 12 Jul 2006) $
-// $Revision: 34511 $
+// $Date: 2011-10-09 15:28:33 -0700 (Sun, 09 Oct 2011) $
+// $Revision: 74865 $
 
 #include <boost/type_traits/detail/template_arity_spec.hpp>
 #include <boost/type_traits/integral_constant.hpp>
@@ -60,7 +60,7 @@
 #endif
 
 #ifndef BOOST_TT_AUX_BOOL_C_BASE
-#   define BOOST_TT_AUX_BOOL_C_BASE(C) : ::boost::integral_constant<bool,C>
+#   define BOOST_TT_AUX_BOOL_C_BASE(C) : public ::boost::integral_constant<bool,C>
 #endif 
 
 
@@ -68,6 +68,7 @@
 template< typename T > struct trait \
     BOOST_TT_AUX_BOOL_C_BASE(C) \
 { \
+public:\
     BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
     BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
 }; \
@@ -80,6 +81,7 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \
 template< typename T1, typename T2 > struct trait \
     BOOST_TT_AUX_BOOL_C_BASE(C) \
 { \
+public:\
     BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
     BOOST_MPL_AUX_LAMBDA_SUPPORT(2,trait,(T1,T2)) \
 }; \
@@ -87,10 +89,23 @@ template< typename T1, typename T2 > struct trait \
 BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,trait) \
 /**/
 
+#define BOOST_TT_AUX_BOOL_TRAIT_DEF3(trait,T1,T2,T3,C) \
+template< typename T1, typename T2, typename T3 > struct trait \
+    BOOST_TT_AUX_BOOL_C_BASE(C) \
+{ \
+public:\
+    BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3,trait,(T1,T2,T3)) \
+}; \
+\
+BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(3,trait) \
+/**/
+
 #define BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,C) \
 template<> struct trait< sp > \
     BOOST_TT_AUX_BOOL_C_BASE(C) \
 { \
+public:\
     BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
     BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(sp)) \
 }; \
@@ -100,6 +115,7 @@ template<> struct trait< sp > \
 template<> struct trait< sp1,sp2 > \
     BOOST_TT_AUX_BOOL_C_BASE(C) \
 { \
+public:\
     BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
     BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,trait,(sp1,sp2)) \
 }; \
@@ -108,6 +124,7 @@ template<> struct trait< sp1,sp2 > \
 #define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(trait,sp,C) \
 template<> struct trait##_impl< sp > \
 { \
+public:\
     BOOST_STATIC_CONSTANT(bool, value = (C)); \
 }; \
 /**/
@@ -115,6 +132,7 @@ template<> struct trait##_impl< sp > \
 #define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,sp1,sp2,C) \
 template<> struct trait##_impl< sp1,sp2 > \
 { \
+public:\
     BOOST_STATIC_CONSTANT(bool, value = (C)); \
 }; \
 /**/
@@ -123,6 +141,7 @@ template<> struct trait##_impl< sp1,sp2 > \
 template< param > struct trait< sp > \
     BOOST_TT_AUX_BOOL_C_BASE(C) \
 { \
+public:\
     BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
 }; \
 /**/
@@ -131,6 +150,7 @@ template< param > struct trait< sp > \
 template< param1, param2 > struct trait< sp > \
     BOOST_TT_AUX_BOOL_C_BASE(C) \
 { \
+public:\
     BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
 }; \
 /**/
@@ -139,6 +159,7 @@ template< param1, param2 > struct trait< sp > \
 template< param > struct trait< sp1,sp2 > \
     BOOST_TT_AUX_BOOL_C_BASE(C) \
 { \
+public:\
     BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
     BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,trait,(sp1,sp2)) \
 }; \
@@ -148,6 +169,7 @@ template< param > struct trait< sp1,sp2 > \
 template< param1, param2 > struct trait< sp1,sp2 > \
     BOOST_TT_AUX_BOOL_C_BASE(C) \
 { \
+public:\
     BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
 }; \
 /**/
@@ -155,6 +177,7 @@ template< param1, param2 > struct trait< sp1,sp2 > \
 #define BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(param,trait,sp1,sp2,C) \
 template< param > struct trait##_impl< sp1,sp2 > \
 { \
+public:\
     BOOST_STATIC_CONSTANT(bool, value = (C)); \
 }; \
 /**/
diff --git a/ext/boost/type_traits/detail/bool_trait_undef.hpp b/ext/boost/type_traits/detail/bool_trait_undef.hpp
index 2259c64..008febe 100644
--- a/ext/boost/type_traits/detail/bool_trait_undef.hpp
+++ b/ext/boost/type_traits/detail/bool_trait_undef.hpp
@@ -8,13 +8,14 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 
 // $Source$
-// $Date: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $
-// $Revision: 24874 $
+// $Date: 2011-10-09 15:28:33 -0700 (Sun, 09 Oct 2011) $
+// $Revision: 74865 $
 
 #undef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL
 #undef BOOST_TT_AUX_BOOL_C_BASE
 #undef BOOST_TT_AUX_BOOL_TRAIT_DEF1
 #undef BOOST_TT_AUX_BOOL_TRAIT_DEF2
+#undef BOOST_TT_AUX_BOOL_TRAIT_DEF3
 #undef BOOST_TT_AUX_BOOL_TRAIT_SPEC1
 #undef BOOST_TT_AUX_BOOL_TRAIT_SPEC2
 #undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1
diff --git a/ext/boost/type_traits/detail/cv_traits_impl.hpp b/ext/boost/type_traits/detail/cv_traits_impl.hpp
index b3fa595..ed20c9d 100644
--- a/ext/boost/type_traits/detail/cv_traits_impl.hpp
+++ b/ext/boost/type_traits/detail/cv_traits_impl.hpp
@@ -77,7 +77,7 @@ namespace detail {
 // Use the implementation above for non function pointers
 template <typename T, unsigned Select 
   = (unsigned)sizeof(::boost::type_traits::gcc8503::mini_funcptr_tester((T)0)) >
-struct cv_traits_imp : ::boost::type_traits::gcc8503::cv_traits_imp<T> { };
+struct cv_traits_imp : public ::boost::type_traits::gcc8503::cv_traits_imp<T> { };
 
 // Functions are never cv-qualified
 template <typename T> struct cv_traits_imp<T*,1>
diff --git a/ext/boost/type_traits/detail/size_t_trait_def.hpp b/ext/boost/type_traits/detail/size_t_trait_def.hpp
index 472c6ac..3be4f70 100644
--- a/ext/boost/type_traits/detail/size_t_trait_def.hpp
+++ b/ext/boost/type_traits/detail/size_t_trait_def.hpp
@@ -8,8 +8,8 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 
 // $Source$
-// $Date: 2005-08-25 12:27:28 -0400 (Thu, 25 Aug 2005) $
-// $Revision: 30670 $
+// $Date: 2011-04-25 05:26:48 -0700 (Mon, 25 Apr 2011) $
+// $Revision: 71481 $
 
 #include <boost/type_traits/detail/template_arity_spec.hpp>
 #include <boost/type_traits/integral_constant.hpp>
@@ -19,10 +19,10 @@
 #include <cstddef>
 
 #if !defined(BOOST_MSVC) || BOOST_MSVC >= 1300
-#   define BOOST_TT_AUX_SIZE_T_BASE(C) ::boost::integral_constant<std::size_t,C>
+#   define BOOST_TT_AUX_SIZE_T_BASE(C) public ::boost::integral_constant<std::size_t,C>
 #   define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) /**/
 #else
-#   define BOOST_TT_AUX_SIZE_T_BASE(C) ::boost::mpl::size_t<C>
+#   define BOOST_TT_AUX_SIZE_T_BASE(C) public ::boost::mpl::size_t<C>
 #   define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \
     typedef ::boost::mpl::size_t<C> base_; \
     using base_::value; \
@@ -34,6 +34,7 @@
 template< typename T > struct trait \
     : BOOST_TT_AUX_SIZE_T_BASE(C) \
 { \
+public:\
     BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \
     BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
 }; \
@@ -45,6 +46,7 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \
 template<> struct trait<spec> \
     : BOOST_TT_AUX_SIZE_T_BASE(C) \
 { \
+public:\
     BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \
     BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \
 }; \
diff --git a/ext/boost/type_traits/detail/size_t_trait_undef.hpp b/ext/boost/type_traits/detail/size_t_trait_undef.hpp
index 06a176d..967fd91 100644
--- a/ext/boost/type_traits/detail/size_t_trait_undef.hpp
+++ b/ext/boost/type_traits/detail/size_t_trait_undef.hpp
@@ -8,7 +8,7 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 
 // $Source$
-// $Date: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $
+// $Date: 2004-09-02 08:41:37 -0700 (Thu, 02 Sep 2004) $
 // $Revision: 24874 $
 
 #undef BOOST_TT_AUX_SIZE_T_TRAIT_DEF1
diff --git a/ext/boost/type_traits/detail/type_trait_def.hpp b/ext/boost/type_traits/detail/type_trait_def.hpp
index 644c7ac..224f848 100644
--- a/ext/boost/type_traits/detail/type_trait_def.hpp
+++ b/ext/boost/type_traits/detail/type_trait_def.hpp
@@ -8,8 +8,8 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 
 // $Source$
-// $Date: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $
-// $Revision: 24874 $
+// $Date: 2011-04-25 05:26:48 -0700 (Mon, 25 Apr 2011) $
+// $Revision: 71481 $
 
 #include <boost/type_traits/detail/template_arity_spec.hpp>
 #include <boost/mpl/aux_/lambda_support.hpp>
@@ -17,6 +17,7 @@
 #define BOOST_TT_AUX_TYPE_TRAIT_DEF1(trait,T,result) \
 template< typename T > struct trait \
 { \
+public:\
     typedef result type; \
     BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
 }; \
@@ -27,6 +28,7 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \
 #define BOOST_TT_AUX_TYPE_TRAIT_SPEC1(trait,spec,result) \
 template<> struct trait<spec> \
 { \
+public:\
     typedef result type; \
     BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \
 }; \
@@ -35,6 +37,7 @@ template<> struct trait<spec> \
 #define BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(trait,spec,result) \
 template<> struct trait##_impl<spec> \
 { \
+public:\
     typedef result type; \
 }; \
 /**/
@@ -42,6 +45,7 @@ template<> struct trait##_impl<spec> \
 #define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,result) \
 template< param > struct trait<spec> \
 { \
+public:\
     typedef result type; \
 }; \
 /**/
@@ -49,6 +53,7 @@ template< param > struct trait<spec> \
 #define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,spec,result) \
 template< param1, param2 > struct trait<spec> \
 { \
+public:\
     typedef result; \
 }; \
 /**/
@@ -56,6 +61,7 @@ template< param1, param2 > struct trait<spec> \
 #define BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(param,trait,spec,result) \
 template< param > struct trait##_impl<spec> \
 { \
+public:\
     typedef result type; \
 }; \
 /**/
diff --git a/ext/boost/type_traits/detail/type_trait_undef.hpp b/ext/boost/type_traits/detail/type_trait_undef.hpp
index 9403b9b..c4f14ff 100644
--- a/ext/boost/type_traits/detail/type_trait_undef.hpp
+++ b/ext/boost/type_traits/detail/type_trait_undef.hpp
@@ -8,7 +8,7 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 
 // $Source$
-// $Date: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $
+// $Date: 2004-09-02 08:41:37 -0700 (Thu, 02 Sep 2004) $
 // $Revision: 24874 $
 
 #undef BOOST_TT_AUX_TYPE_TRAIT_DEF1
diff --git a/ext/boost/type_traits/function_traits.hpp b/ext/boost/type_traits/function_traits.hpp
index 6d708cd..d715345 100644
--- a/ext/boost/type_traits/function_traits.hpp
+++ b/ext/boost/type_traits/function_traits.hpp
@@ -166,7 +166,7 @@ struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>
 
 template<typename Function>
 struct function_traits : 
-	public boost::detail::function_traits_helper<typename boost::add_pointer<Function>::type>
+  public boost::detail::function_traits_helper<typename boost::add_pointer<Function>::type>
 {
 };
 
diff --git a/ext/boost/type_traits/has_nothrow_assign.hpp b/ext/boost/type_traits/has_nothrow_assign.hpp
new file mode 100644
index 0000000..83e5968
--- /dev/null
+++ b/ext/boost/type_traits/has_nothrow_assign.hpp
@@ -0,0 +1,44 @@
+
+//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED
+
+#include <boost/type_traits/has_trivial_assign.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail{
+
+template <class T>
+struct has_nothrow_assign_imp{
+#ifndef BOOST_HAS_NOTHROW_ASSIGN
+   BOOST_STATIC_CONSTANT(bool, value = ::boost::has_trivial_assign<T>::value);
+#else
+   BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_NOTHROW_ASSIGN(T));
+#endif
+};
+
+}
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_assign,T,::boost::detail::has_nothrow_assign_imp<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_assign,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_assign,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_assign,void const volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_assign,void volatile,false)
+#endif
+
+} // namespace boost
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED
diff --git a/ext/boost/type_traits/has_nothrow_constructor.hpp b/ext/boost/type_traits/has_nothrow_constructor.hpp
new file mode 100644
index 0000000..3bc4f80
--- /dev/null
+++ b/ext/boost/type_traits/has_nothrow_constructor.hpp
@@ -0,0 +1,53 @@
+
+//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED
+#define BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED
+
+#include <boost/type_traits/has_trivial_constructor.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail{
+
+template <class T>
+struct has_nothrow_constructor_imp{
+#ifdef BOOST_HAS_NOTHROW_CONSTRUCTOR
+   BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_NOTHROW_CONSTRUCTOR(T));
+#else
+   BOOST_STATIC_CONSTANT(bool, value = ::boost::has_trivial_constructor<T>::value);
+#endif
+};
+
+}
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_constructor,T,::boost::detail::has_nothrow_constructor_imp<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_default_constructor,T,::boost::detail::has_nothrow_constructor_imp<T>::value)
+
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_constructor,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_constructor,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_constructor,void const volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_constructor,void volatile,false)
+#endif
+
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_default_constructor,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_default_constructor,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_default_constructor,void const volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_default_constructor,void volatile,false)
+#endif
+
+} // namespace boost
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED
diff --git a/ext/boost/type_traits/has_nothrow_copy.hpp b/ext/boost/type_traits/has_nothrow_copy.hpp
index c06b4a3..9c3c903 100644
--- a/ext/boost/type_traits/has_nothrow_copy.hpp
+++ b/ext/boost/type_traits/has_nothrow_copy.hpp
@@ -20,11 +20,11 @@ namespace detail{
 
 template <class T>
 struct has_nothrow_copy_imp{
-   BOOST_STATIC_CONSTANT(bool, value = 
-      (::boost::type_traits::ice_or<
-         ::boost::has_trivial_copy<T>::value,
-         BOOST_HAS_NOTHROW_COPY(T)
-      >::value));
+#ifdef BOOST_HAS_NOTHROW_COPY
+   BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_NOTHROW_COPY(T));
+#else
+   BOOST_STATIC_CONSTANT(bool, value = ::boost::has_trivial_copy<T>::value);
+#endif
 };
 
 }
@@ -32,6 +32,20 @@ struct has_nothrow_copy_imp{
 BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_copy,T,::boost::detail::has_nothrow_copy_imp<T>::value)
 BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_copy_constructor,T,::boost::detail::has_nothrow_copy_imp<T>::value)
 
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void const volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void volatile,false)
+#endif
+
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void const volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void volatile,false)
+#endif
+
 } // namespace boost
 
 #include <boost/type_traits/detail/bool_trait_undef.hpp>
diff --git a/ext/boost/type_traits/has_trivial_assign.hpp b/ext/boost/type_traits/has_trivial_assign.hpp
new file mode 100644
index 0000000..404b62c
--- /dev/null
+++ b/ext/boost/type_traits/has_trivial_assign.hpp
@@ -0,0 +1,57 @@
+
+//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED
+
+#include <boost/type_traits/config.hpp>
+#include <boost/type_traits/intrinsics.hpp>
+#include <boost/type_traits/is_pod.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+#include <boost/type_traits/detail/ice_and.hpp>
+#include <boost/type_traits/detail/ice_or.hpp>
+#include <boost/type_traits/detail/ice_not.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+struct has_trivial_assign_impl
+{
+#ifdef BOOST_HAS_TRIVIAL_ASSIGN
+   BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_ASSIGN(T));
+#else
+   BOOST_STATIC_CONSTANT(bool, value =
+      (::boost::type_traits::ice_and<
+        ::boost::is_pod<T>::value,
+        ::boost::type_traits::ice_not< ::boost::is_const<T>::value >::value,
+      ::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value
+      >::value));
+#endif
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_assign,T,::boost::detail::has_trivial_assign_impl<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_assign,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_assign,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_assign,void const volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_assign,void volatile,false)
+#endif
+
+} // namespace boost
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED
diff --git a/ext/boost/type_traits/has_trivial_constructor.hpp b/ext/boost/type_traits/has_trivial_constructor.hpp
new file mode 100644
index 0000000..30dbdd8
--- /dev/null
+++ b/ext/boost/type_traits/has_trivial_constructor.hpp
@@ -0,0 +1,51 @@
+
+//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED
+#define BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED
+
+#include <boost/type_traits/config.hpp>
+#include <boost/type_traits/intrinsics.hpp>
+#include <boost/type_traits/is_pod.hpp>
+#include <boost/type_traits/detail/ice_or.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+struct has_trivial_ctor_impl
+{
+#ifdef BOOST_HAS_TRIVIAL_CONSTRUCTOR
+   BOOST_STATIC_CONSTANT(bool, value =
+      (::boost::type_traits::ice_or<
+         ::boost::is_pod<T>::value,
+         BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
+      >::value));
+#else
+   BOOST_STATIC_CONSTANT(bool, value =
+      (::boost::type_traits::ice_or<
+         ::boost::is_pod<T>::value,
+         false
+      >::value));
+#endif
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_constructor,T,::boost::detail::has_trivial_ctor_impl<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_default_constructor,T,::boost::detail::has_trivial_ctor_impl<T>::value)
+
+} // namespace boost
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED
diff --git a/ext/boost/type_traits/has_trivial_copy.hpp b/ext/boost/type_traits/has_trivial_copy.hpp
index 8c75361..ba4d884 100644
--- a/ext/boost/type_traits/has_trivial_copy.hpp
+++ b/ext/boost/type_traits/has_trivial_copy.hpp
@@ -27,14 +27,15 @@ namespace detail {
 template <typename T>
 struct has_trivial_copy_impl
 {
+#ifdef BOOST_HAS_TRIVIAL_COPY
+   BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_COPY(T));
+#else
    BOOST_STATIC_CONSTANT(bool, value =
       (::boost::type_traits::ice_and<
-         ::boost::type_traits::ice_or<
-            ::boost::is_pod<T>::value,
-            BOOST_HAS_TRIVIAL_COPY(T)
-         >::value,
-      ::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value
+         ::boost::is_pod<T>::value,
+         ::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value
       >::value));
+#endif
 };
 
 } // namespace detail
@@ -42,6 +43,20 @@ struct has_trivial_copy_impl
 BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_copy,T,::boost::detail::has_trivial_copy_impl<T>::value)
 BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_copy_constructor,T,::boost::detail::has_trivial_copy_impl<T>::value)
 
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy,void const volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy,void volatile,false)
+#endif
+
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy_constructor,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy_constructor,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy_constructor,void const volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy_constructor,void volatile,false)
+#endif
+
 } // namespace boost
 
 #include <boost/type_traits/detail/bool_trait_undef.hpp>
diff --git a/ext/boost/type_traits/has_trivial_destructor.hpp b/ext/boost/type_traits/has_trivial_destructor.hpp
index f2a8ce6..79d7522 100644
--- a/ext/boost/type_traits/has_trivial_destructor.hpp
+++ b/ext/boost/type_traits/has_trivial_destructor.hpp
@@ -24,17 +24,24 @@ namespace detail {
 template <typename T>
 struct has_trivial_dtor_impl
 {
-   BOOST_STATIC_CONSTANT(bool, value =
-      (::boost::type_traits::ice_or<
-         ::boost::is_pod<T>::value,
-         BOOST_HAS_TRIVIAL_DESTRUCTOR(T)
-      >::value));
+#ifdef BOOST_HAS_TRIVIAL_DESTRUCTOR
+   BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_DESTRUCTOR(T));
+#else
+   BOOST_STATIC_CONSTANT(bool, value = ::boost::is_pod<T>::value);
+#endif
 };
 
 } // namespace detail
 
 BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_destructor,T,::boost::detail::has_trivial_dtor_impl<T>::value)
 
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void const volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void volatile,false)
+#endif
+
 } // namespace boost
 
 #include <boost/type_traits/detail/bool_trait_undef.hpp>
diff --git a/ext/boost/type_traits/intrinsics.hpp b/ext/boost/type_traits/intrinsics.hpp
index 8f88036..8408ec3 100644
--- a/ext/boost/type_traits/intrinsics.hpp
+++ b/ext/boost/type_traits/intrinsics.hpp
@@ -1,4 +1,3 @@
-
 //  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
 //  Use, modification and distribution are subject to the Boost Software License,
 //  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -22,7 +21,7 @@
 // (these should largely ignore cv-qualifiers)
 // BOOST_IS_UNION(T) should evaluate to true if T is a union type
 // BOOST_IS_POD(T) should evaluate to true if T is a POD type
-// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty struct or union
+// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty class type (and not a union)
 // BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
 // BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
 // BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
@@ -33,12 +32,10 @@
 // BOOST_HAS_VIRTUAL_DESTRUCTOR(T) should evaluate to true T has a virtual destructor
 //
 // The following can also be defined: when detected our implementation is greatly simplified.
-// Note that unlike the macros above these do not have default definitions, so we can use
-// #ifdef MACRONAME to detect when these are available.
 //
 // BOOST_IS_ABSTRACT(T) true if T is an abstract type
 // BOOST_IS_BASE_OF(T,U) true if T is a base class of U
-// BOOST_IS_CLASS(T) true if T is a class type
+// BOOST_IS_CLASS(T) true if T is a class type (and not a union)
 // BOOST_IS_CONVERTIBLE(T,U) true if T is convertible to U
 // BOOST_IS_ENUM(T) true is T is an enum
 // BOOST_IS_POLYMORPHIC(T) true if T is a polymorphic type
@@ -89,19 +86,18 @@
 #   define BOOST_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T))
 #   define BOOST_IS_EMPTY(T) __is_empty(T)
 #   define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
-#   define BOOST_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T)
-#   define BOOST_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T)
-#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
-#   define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T)
-#   define BOOST_HAS_NOTHROW_COPY(T) __has_nothrow_copy(T)
-#   define BOOST_HAS_NOTHROW_ASSIGN(T) __has_nothrow_assign(T)
+#   define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T)|| ( ::boost::is_pod<T>::value && !::boost::is_volatile<T>::value))
+#   define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) || ( ::boost::is_pod<T>::value && ! ::boost::is_const<T>::value && !::boost::is_volatile<T>::value))
+#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || ::boost::is_pod<T>::value)
+#   define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) || ::boost::has_trivial_constructor<T>::value)
+#   define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) || ::boost::has_trivial_copy<T>::value)
+#   define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) || ::boost::has_trivial_assign<T>::value)
 #   define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
 
 #   define BOOST_IS_ABSTRACT(T) __is_abstract(T)
 #   define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same<T,U>::value)
 #   define BOOST_IS_CLASS(T) __is_class(T)
-//  This one doesn't quite always do the right thing:
-//  #   define BOOST_IS_CONVERTIBLE(T,U) __is_convertible_to(T,U)
+#   define BOOST_IS_CONVERTIBLE(T,U) ((__is_convertible_to(T,U) || is_same<T,U>::value) && !__is_abstract(U))
 #   define BOOST_IS_ENUM(T) __is_enum(T)
 //  This one doesn't quite always do the right thing:
 //  #   define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
@@ -127,21 +123,90 @@
 #   define BOOST_HAS_TYPE_TRAITS_INTRINSICS
 #endif
 
-#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__)))
+#if defined(BOOST_CLANG) && defined(__has_feature)
+#   include <cstddef>
+#   include <boost/type_traits/is_same.hpp>
+#   include <boost/type_traits/is_reference.hpp>
+#   include <boost/type_traits/is_volatile.hpp>
+
+#   if __has_feature(is_union)
+#     define BOOST_IS_UNION(T) __is_union(T)
+#   endif
+#   if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_pod)
+#     define BOOST_IS_POD(T) __is_pod(T)
+#   endif
+#   if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty)
+#     define BOOST_IS_EMPTY(T) __is_empty(T)
+#   endif
+#   if __has_feature(has_trivial_constructor)
+#     define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
+#   endif
+#   if __has_feature(has_trivial_copy)
+#     define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference<T>::value && !is_volatile<T>::value)
+#   endif
+#   if __has_feature(has_trivial_assign)
+#     define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile<T>::value)
+#   endif
+#   if __has_feature(has_trivial_destructor)
+#     define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
+#   endif
+#   if __has_feature(has_nothrow_constructor)
+#     define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T)
+#   endif
+#   if __has_feature(has_nothrow_copy)
+#     define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile<T>::value && !is_reference<T>::value)
+#   endif
+#   if __has_feature(has_nothrow_assign)
+#     define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile<T>::value)
+#   endif
+#   if __has_feature(has_virtual_destructor)
+#     define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
+#   endif
+#   if __has_feature(is_abstract)
+#     define BOOST_IS_ABSTRACT(T) __is_abstract(T)
+#   endif
+#   if __has_feature(is_base_of)
+#     define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same<T,U>::value)
+#   endif
+#   if __has_feature(is_class)
+#     define BOOST_IS_CLASS(T) __is_class(T)
+#   endif
+#   if __has_feature(is_convertible_to)
+#     include <boost/type_traits/is_abstract.hpp>
+#     define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible_to(T,U) && !::boost::is_abstract<U>::value)
+#   endif
+#   if __has_feature(is_enum)
+#     define BOOST_IS_ENUM(T) __is_enum(T)
+#   endif
+#   if __has_feature(is_polymorphic)
+#     define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
+#   endif
+#   define BOOST_ALIGNMENT_OF(T) __alignof(T)
+
+#   define BOOST_HAS_TYPE_TRAITS_INTRINSICS
+#endif
+
+#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) && !defined(BOOST_CLANG)
 #   include <boost/type_traits/is_same.hpp>
 #   include <boost/type_traits/is_reference.hpp>
 #   include <boost/type_traits/is_volatile.hpp>
 
+#ifdef BOOST_INTEL
+#  define BOOST_INTEL_TT_OPTS || is_pod<T>::value
+#else
+#  define BOOST_INTEL_TT_OPTS
+#endif
+
 #   define BOOST_IS_UNION(T) __is_union(T)
 #   define BOOST_IS_POD(T) __is_pod(T)
 #   define BOOST_IS_EMPTY(T) __is_empty(T)
-#   define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
-#   define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference<T>::value)
-#   define BOOST_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T)
-#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
-#   define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T)
-#   define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile<T>::value && !is_reference<T>::value)
-#   define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile<T>::value)
+#   define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ((__has_trivial_constructor(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile<T>::value)
+#   define BOOST_HAS_TRIVIAL_COPY(T) ((__has_trivial_copy(T) BOOST_INTEL_TT_OPTS) && !is_reference<T>::value && ! ::boost::is_volatile<T>::value)
+#   define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile<T>::value && ! ::boost::is_const<T>::value)
+#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_INTEL_TT_OPTS)
+#   define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) BOOST_INTEL_TT_OPTS)
+#   define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_INTEL_TT_OPTS) && !is_volatile<T>::value && !is_reference<T>::value)
+#   define BOOST_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_INTEL_TT_OPTS) && !is_volatile<T>::value && !is_const<T>::value)
 #   define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
 
 #   define BOOST_IS_ABSTRACT(T) __is_abstract(T)
@@ -159,77 +224,60 @@
 #   define BOOST_HAS_TYPE_TRAITS_INTRINSICS
 #endif
 
-# if defined(__CODEGEARC__)
+#if defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600)
 #   include <boost/type_traits/is_same.hpp>
 #   include <boost/type_traits/is_reference.hpp>
 #   include <boost/type_traits/is_volatile.hpp>
-#   include <boost/type_traits/is_void.hpp>
 
 #   define BOOST_IS_UNION(T) __is_union(T)
 #   define BOOST_IS_POD(T) __is_pod(T)
 #   define BOOST_IS_EMPTY(T) __is_empty(T)
-#   define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T) || is_void<T>::value)
-#   define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T) && !is_volatile<T>::value && !is_reference<T>::value || is_void<T>::value)
-#   define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile<T>::value || is_void<T>::value)
-#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || is_void<T>::value)
-#   define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T) || is_void<T>::value)
-#   define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T) && !is_volatile<T>::value && !is_reference<T>::value || is_void<T>::value)
-#   define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile<T>::value || is_void<T>::value)
+#   define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
+#   define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference<T>::value && !is_volatile<T>::value)
+#   define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile<T>::value)
+#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
+#   define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T)
+#   define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile<T>::value && !is_reference<T>::value)
+#   define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile<T>::value)
 #   define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
 
 #   define BOOST_IS_ABSTRACT(T) __is_abstract(T)
-#   define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_void<T>::value && !is_void<U>::value)
+#   define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same<T,U>::value)
 #   define BOOST_IS_CLASS(T) __is_class(T)
-#   define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible(T,U) || is_void<U>::value)
 #   define BOOST_IS_ENUM(T) __is_enum(T)
 #   define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
-#   define BOOST_ALIGNMENT_OF(T) alignof(T)
+#   define BOOST_ALIGNMENT_OF(T) __alignof__(T)
 
 #   define BOOST_HAS_TYPE_TRAITS_INTRINSICS
 #endif
 
-#ifndef BOOST_IS_UNION
-#   define BOOST_IS_UNION(T) false
-#endif
-
-#ifndef BOOST_IS_POD
-#   define BOOST_IS_POD(T) false
-#endif
-
-#ifndef BOOST_IS_EMPTY
-#   define BOOST_IS_EMPTY(T) false
-#endif
-
-#ifndef BOOST_HAS_TRIVIAL_CONSTRUCTOR
-#   define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) false
-#endif
-
-#ifndef BOOST_HAS_TRIVIAL_COPY
-#   define BOOST_HAS_TRIVIAL_COPY(T) false
-#endif
-
-#ifndef BOOST_HAS_TRIVIAL_ASSIGN
-#   define BOOST_HAS_TRIVIAL_ASSIGN(T) false
-#endif
-
-#ifndef BOOST_HAS_TRIVIAL_DESTRUCTOR
-#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) false
-#endif
-
-#ifndef BOOST_HAS_NOTHROW_CONSTRUCTOR
-#   define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) false
-#endif
+# if defined(__CODEGEARC__)
+#   include <boost/type_traits/is_same.hpp>
+#   include <boost/type_traits/is_reference.hpp>
+#   include <boost/type_traits/is_volatile.hpp>
+#   include <boost/type_traits/is_void.hpp>
 
-#ifndef BOOST_HAS_NOTHROW_COPY
-#   define BOOST_HAS_NOTHROW_COPY(T) false
-#endif
+#   define BOOST_IS_UNION(T) __is_union(T)
+#   define BOOST_IS_POD(T) __is_pod(T)
+#   define BOOST_IS_EMPTY(T) __is_empty(T)
+#   define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T))
+#   define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T) && !is_volatile<T>::value && !is_reference<T>::value)
+#   define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile<T>::value)
+#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T))
+#   define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T))
+#   define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T) && !is_volatile<T>::value && !is_reference<T>::value)
+#   define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile<T>::value)
+#   define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
 
-#ifndef BOOST_HAS_NOTHROW_ASSIGN
-#   define BOOST_HAS_NOTHROW_ASSIGN(T) false
-#endif
+#   define BOOST_IS_ABSTRACT(T) __is_abstract(T)
+#   define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_void<T>::value && !is_void<U>::value)
+#   define BOOST_IS_CLASS(T) __is_class(T)
+#   define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible(T,U) || is_void<U>::value)
+#   define BOOST_IS_ENUM(T) __is_enum(T)
+#   define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
+#   define BOOST_ALIGNMENT_OF(T) alignof(T)
 
-#ifndef BOOST_HAS_VIRTUAL_DESTRUCTOR
-#   define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) false
+#   define BOOST_HAS_TYPE_TRAITS_INTRINSICS
 #endif
 
 #endif // BOOST_TT_INTRINSICS_HPP_INCLUDED
@@ -238,3 +286,4 @@
 
 
 
+
diff --git a/ext/boost/type_traits/is_compound.hpp b/ext/boost/type_traits/is_compound.hpp
new file mode 100644
index 0000000..bbaaa42
--- /dev/null
+++ b/ext/boost/type_traits/is_compound.hpp
@@ -0,0 +1,46 @@
+
+//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_COMPOUND_HPP_INCLUDED
+#define BOOST_TT_IS_COMPOUND_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/type_traits/is_fundamental.hpp>
+#include <boost/type_traits/detail/ice_not.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+#if !defined( __CODEGEARC__ )
+namespace detail {
+
+template <typename T>
+struct is_compound_impl
+{
+   BOOST_STATIC_CONSTANT(bool, value =
+      (::boost::type_traits::ice_not<
+         ::boost::is_fundamental<T>::value
+       >::value));
+};
+
+} // namespace detail
+#endif // !defined( __CODEGEARC__ )
+
+#if defined( __CODEGEARC__ )
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_compound,T,__is_compound(T))
+#else
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_compound,T,::boost::detail::is_compound_impl<T>::value)
+#endif
+
+} // namespace boost
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_COMPOUND_HPP_INCLUDED
diff --git a/ext/boost/type_traits/is_const.hpp b/ext/boost/type_traits/is_const.hpp
index 812ed15..f24b71a 100644
--- a/ext/boost/type_traits/is_const.hpp
+++ b/ext/boost/type_traits/is_const.hpp
@@ -59,16 +59,16 @@ template <class T>
 struct is_const_rvalue_filter
 {
 #if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
-	BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<typename boost::remove_bounds<T>::type*>::is_const);
+   BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<typename boost::remove_bounds<T>::type*>::is_const);
 #else
-	BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<T*>::is_const);
+   BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<T*>::is_const);
 #endif
 };
 #ifndef BOOST_NO_RVALUE_REFERENCES
 template <class T>
 struct is_const_rvalue_filter<T&&>
 {
-	BOOST_STATIC_CONSTANT(bool, value = false);
+   BOOST_STATIC_CONSTANT(bool, value = false);
 };
 #endif
 }
@@ -106,7 +106,7 @@ no_type is_const_tester(volatile void *);
 
 template <bool is_ref, bool array>
 struct is_const_helper
-    : ::boost::type_traits::false_result
+    : public ::boost::type_traits::false_result
 {
 };
 
@@ -136,7 +136,7 @@ struct is_const_helper<false,true>
 
 template <typename T>
 struct is_const_impl
-    : is_const_helper<
+    : public is_const_helper<
           is_reference<T>::value
         , is_array<T>::value
         >::template result_<T>
diff --git a/ext/boost/type_traits/is_convertible.hpp b/ext/boost/type_traits/is_convertible.hpp
index c05c297..0d42c46 100644
--- a/ext/boost/type_traits/is_convertible.hpp
+++ b/ext/boost/type_traits/is_convertible.hpp
@@ -24,6 +24,7 @@
 #ifndef BOOST_NO_IS_ABSTRACT
 #include <boost/type_traits/is_abstract.hpp>
 #endif
+#include <boost/type_traits/add_rvalue_reference.hpp>
 
 #if defined(__MWERKS__)
 #include <boost/type_traits/is_function.hpp>
@@ -68,7 +69,7 @@ struct does_conversion_exist
     {
         static no_type BOOST_TT_DECL _m_check(...);
         static yes_type BOOST_TT_DECL _m_check(To);
-        static From _m_from;
+        static typename add_rvalue_reference<From>::type  _m_from;
         enum { value = sizeof( _m_check(_m_from) ) == sizeof(yes_type) };
     };
 };
@@ -84,7 +85,7 @@ struct does_conversion_exist<void>
 
 template <typename From, typename To>
 struct is_convertible_basic_impl
-    : does_conversion_exist<From>::template result_<To>
+    : public does_conversion_exist<From>::template result_<To>
 {
 };
 
@@ -106,7 +107,7 @@ struct is_convertible_impl
         static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(T);
     };
 
-    static From _m_from;
+    static typename add_rvalue_reference<From>::type  _m_from;
     static bool const value = sizeof( checker<To>::_m_check(_m_from) )
         == sizeof(::boost::type_traits::yes_type);
 #pragma option pop
@@ -131,7 +132,7 @@ template <typename T> struct checker
 template <typename From, typename To>
 struct is_convertible_basic_impl
 {
-    static From _m_from;
+    static typename add_rvalue_reference<From>::type  _m_from;
     static bool const value = sizeof( boost::detail::checker<To>::_m_check(_m_from, 0) )
         == sizeof(::boost::type_traits::yes_type);
 };
@@ -161,7 +162,7 @@ struct is_convertible_basic_impl
 {
     static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...);
     static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int);
-       static From _m_from;
+    static typename add_rvalue_reference<From>::type  _m_from;
 
     BOOST_STATIC_CONSTANT(bool, value =
         sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type)
@@ -185,7 +186,7 @@ struct is_convertible_basic_impl
     template <class T>
     static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion,  float, T);
     static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int, int);
-    static From _m_from;
+    static typename add_rvalue_reference<From>::type  _m_from;
 
     // Static constants sometime cause the conversion of _m_from to To to be
     // called. This doesn't happen with an enum.
@@ -215,7 +216,7 @@ struct is_convertible_basic_impl_aux<From,To,false /*FromIsFunctionRef*/>
 {
     static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...);
     static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int);
-    static From _m_from;
+    static typename add_rvalue_reference<From>::type  _m_from;
 
     BOOST_STATIC_CONSTANT(bool, value =
         sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type)
@@ -227,7 +228,7 @@ struct is_convertible_basic_impl_aux<From,To,true /*FromIsFunctionRef*/>
 {
     static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...);
     static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To);
-    static From _m_from;
+    static typename add_rvalue_reference<From>::type  _m_from;
     BOOST_STATIC_CONSTANT(bool, value =
         sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type)
         );
@@ -252,7 +253,7 @@ struct is_convertible_basic_impl
 {
     static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...);
     static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To);
-    static From _m_from;
+    static typename add_rvalue_reference<From>::type  _m_from;
 #ifdef BOOST_MSVC
 #pragma warning(push)
 #pragma warning(disable:4244)
@@ -402,14 +403,14 @@ struct is_convertible_impl_dispatch
 
 #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void,To,false)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void,false)
 #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
 BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const,To,false)
 BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void volatile,To,false)
 BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const volatile,To,false)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const,true)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void volatile,true)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const volatile,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const volatile,false)
 #endif
 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 
diff --git a/ext/boost/type_traits/is_empty.hpp b/ext/boost/type_traits/is_empty.hpp
new file mode 100644
index 0000000..8a2c5b8
--- /dev/null
+++ b/ext/boost/type_traits/is_empty.hpp
@@ -0,0 +1,229 @@
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_EMPTY_HPP_INCLUDED
+#define BOOST_TT_IS_EMPTY_HPP_INCLUDED
+
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/detail/ice_or.hpp>
+#include <boost/type_traits/config.hpp>
+#include <boost/type_traits/intrinsics.hpp>
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#   include <boost/type_traits/remove_cv.hpp>
+#   include <boost/type_traits/is_class.hpp>
+#   include <boost/type_traits/add_reference.hpp>
+#else
+#   include <boost/type_traits/is_reference.hpp>
+#   include <boost/type_traits/is_pointer.hpp>
+#   include <boost/type_traits/is_member_pointer.hpp>
+#   include <boost/type_traits/is_array.hpp>
+#   include <boost/type_traits/is_void.hpp>
+#   include <boost/type_traits/detail/ice_and.hpp>
+#   include <boost/type_traits/detail/ice_not.hpp>
+#endif
+
+// should be always the last #include directive
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+#ifndef BOOST_INTERNAL_IS_EMPTY
+#define BOOST_INTERNAL_IS_EMPTY(T) false
+#else
+#define BOOST_INTERNAL_IS_EMPTY(T) BOOST_IS_EMPTY(T)
+#endif
+
+namespace boost {
+
+namespace detail {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4624) // destructor could not be generated
+#endif
+
+template <typename T>
+struct empty_helper_t1 : public T
+{
+    empty_helper_t1();  // hh compiler bug workaround
+    int i[256];
+private:
+   // suppress compiler warnings:
+   empty_helper_t1(const empty_helper_t1&);
+   empty_helper_t1& operator=(const empty_helper_t1&);
+};
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+struct empty_helper_t2 { int i[256]; };
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600)
+
+template <typename T, bool is_a_class = false>
+struct empty_helper
+{
+    BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template <typename T>
+struct empty_helper<T, true>
+{
+    BOOST_STATIC_CONSTANT(
+        bool, value = (sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2))
+        );
+};
+
+template <typename T>
+struct is_empty_impl
+{
+    typedef typename remove_cv<T>::type cvt;
+    BOOST_STATIC_CONSTANT(
+        bool, value = (
+            ::boost::type_traits::ice_or<
+              ::boost::detail::empty_helper<cvt,::boost::is_class<T>::value>::value
+              , BOOST_INTERNAL_IS_EMPTY(cvt)
+            >::value
+            ));
+};
+
+#else // __BORLANDC__
+
+template <typename T, bool is_a_class, bool convertible_to_int>
+struct empty_helper
+{
+    BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template <typename T>
+struct empty_helper<T, true, false>
+{
+    BOOST_STATIC_CONSTANT(bool, value = (
+        sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2)
+        ));
+};
+
+template <typename T>
+struct is_empty_impl
+{
+   typedef typename remove_cv<T>::type cvt;
+   typedef typename add_reference<T>::type r_type;
+
+   BOOST_STATIC_CONSTANT(
+       bool, value = (
+           ::boost::type_traits::ice_or<
+              ::boost::detail::empty_helper<
+                  cvt
+                , ::boost::is_class<T>::value
+                , ::boost::is_convertible< r_type,int>::value
+              >::value
+              , BOOST_INTERNAL_IS_EMPTY(cvt)
+           >::value));
+};
+
+#endif // __BORLANDC__
+
+#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#ifdef BOOST_MSVC6_MEMBER_TEMPLATES
+
+template <typename T>
+struct empty_helper_t1 : public T
+{
+   empty_helper_t1();
+   int i[256];
+};
+
+struct empty_helper_t2 { int i[256]; };
+
+template <typename T>
+struct empty_helper_base
+{
+   enum { value = (sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2)) };
+};
+
+template <typename T>
+struct empty_helper_nonbase
+{
+   enum { value = false };
+};
+
+template <bool base>
+struct empty_helper_chooser
+{
+   template <typename T> struct result_
+   {
+      typedef empty_helper_nonbase<T> type;
+   };
+};
+
+template <>
+struct empty_helper_chooser<true>
+{
+   template <typename T> struct result_
+   {
+      typedef empty_helper_base<T> type;
+   };
+};
+
+template <typename T>
+struct is_empty_impl
+{
+   typedef ::boost::detail::empty_helper_chooser<
+      ::boost::type_traits::ice_and<
+         ::boost::type_traits::ice_not< ::boost::is_reference<T>::value >::value,
+         ::boost::type_traits::ice_not< ::boost::is_convertible<T,double>::value >::value,
+         ::boost::type_traits::ice_not< ::boost::is_pointer<T>::value >::value,
+         ::boost::type_traits::ice_not< ::boost::is_member_pointer<T>::value >::value,
+         ::boost::type_traits::ice_not< ::boost::is_array<T>::value >::value,
+         ::boost::type_traits::ice_not< ::boost::is_void<T>::value >::value,
+         ::boost::type_traits::ice_not<
+            ::boost::is_convertible<T,void const volatile*>::value
+            >::value
+      >::value > chooser;
+
+   typedef typename chooser::template result_<T> result;
+   typedef typename result::type eh_type;
+
+   BOOST_STATIC_CONSTANT(bool, value =
+      (::boost::type_traits::ice_or<eh_type::value, BOOST_INTERNAL_IS_EMPTY(T)>::value));
+};
+
+#else
+
+template <typename T> struct is_empty_impl
+{
+    BOOST_STATIC_CONSTANT(bool, value = BOOST_INTERNAL_IS_EMPTY(T));
+};
+
+#endif  // BOOST_MSVC6_MEMBER_TEMPLATES
+
+#endif  // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+// these help when the compiler has no partial specialization support:
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void const volatile,false)
+#endif
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_empty,T,::boost::detail::is_empty_impl<T>::value)
+
+} // namespace boost
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#undef BOOST_INTERNAL_IS_EMPTY
+
+#endif // BOOST_TT_IS_EMPTY_HPP_INCLUDED
+
diff --git a/ext/boost/type_traits/is_enum.hpp b/ext/boost/type_traits/is_enum.hpp
index 86fa66d..e35548c 100644
--- a/ext/boost/type_traits/is_enum.hpp
+++ b/ext/boost/type_traits/is_enum.hpp
@@ -95,7 +95,7 @@ template <>
 struct is_enum_helper<false>
 {
     template <typename T> struct type
-       : ::boost::is_convertible<typename boost::add_reference<T>::type,::boost::detail::int_convertible>
+       : public ::boost::is_convertible<typename boost::add_reference<T>::type,::boost::detail::int_convertible>
     {
     };
 };
diff --git a/ext/boost/type_traits/is_floating_point.hpp b/ext/boost/type_traits/is_floating_point.hpp
new file mode 100644
index 0000000..2224453
--- /dev/null
+++ b/ext/boost/type_traits/is_floating_point.hpp
@@ -0,0 +1,27 @@
+
+//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000-2005.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED
+#define BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+//* is a type T a floating-point type described in the standard (3.9.1p8)
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_floating_point,T,false)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_floating_point,float,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_floating_point,double,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_floating_point,long double,true)
+
+} // namespace boost
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED
diff --git a/ext/boost/type_traits/is_function.hpp b/ext/boost/type_traits/is_function.hpp
index 55c05c1..2cb1bb9 100644
--- a/ext/boost/type_traits/is_function.hpp
+++ b/ext/boost/type_traits/is_function.hpp
@@ -40,7 +40,7 @@ namespace detail {
 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
 template<bool is_ref = true>
 struct is_function_chooser
-    : ::boost::type_traits::false_result
+    : public ::boost::type_traits::false_result
 {
 };
 
@@ -48,14 +48,14 @@ template <>
 struct is_function_chooser<false>
 {
     template< typename T > struct result_
-        : ::boost::type_traits::is_function_ptr_helper<T*>
+        : public ::boost::type_traits::is_function_ptr_helper<T*>
     {
     };
 };
 
 template <typename T>
 struct is_function_impl
-    : is_function_chooser< ::boost::is_reference<T>::value >
+    : public is_function_chooser< ::boost::is_reference<T>::value >
         ::BOOST_NESTED_TEMPLATE result_<T>
 {
 };
diff --git a/ext/boost/type_traits/is_fundamental.hpp b/ext/boost/type_traits/is_fundamental.hpp
index 6aff7dd..138e296 100644
--- a/ext/boost/type_traits/is_fundamental.hpp
+++ b/ext/boost/type_traits/is_fundamental.hpp
@@ -22,7 +22,7 @@ namespace detail {
 
 template <typename T> 
 struct is_fundamental_impl
-    : ::boost::type_traits::ice_or< 
+    : public ::boost::type_traits::ice_or< 
           ::boost::is_arithmetic<T>::value
         , ::boost::is_void<T>::value
         >
diff --git a/ext/boost/type_traits/is_member_function_pointer.hpp b/ext/boost/type_traits/is_member_function_pointer.hpp
index 81f1eac..38babf4 100644
--- a/ext/boost/type_traits/is_member_function_pointer.hpp
+++ b/ext/boost/type_traits/is_member_function_pointer.hpp
@@ -55,7 +55,7 @@ namespace detail {
 
 template <bool>
 struct is_mem_fun_pointer_select
-    : ::boost::type_traits::false_result
+    : public ::boost::type_traits::false_result
 {
 };
 
@@ -83,7 +83,7 @@ struct is_mem_fun_pointer_select<false>
 
 template <typename T>
 struct is_member_function_pointer_impl
-    : is_mem_fun_pointer_select<
+    : public is_mem_fun_pointer_select<
           ::boost::type_traits::ice_or<
               ::boost::is_reference<T>::value
             , ::boost::is_array<T>::value
diff --git a/ext/boost/type_traits/is_member_pointer.hpp b/ext/boost/type_traits/is_member_pointer.hpp
index ba02b89..a4a6d25 100644
--- a/ext/boost/type_traits/is_member_pointer.hpp
+++ b/ext/boost/type_traits/is_member_pointer.hpp
@@ -66,7 +66,7 @@ template <typename R, typename T>
 
 template <bool>
 struct is_member_pointer_select
-    : ::boost::type_traits::false_result
+    : public ::boost::type_traits::false_result
 {
 };
 
@@ -87,7 +87,7 @@ struct is_member_pointer_select<false>
 
 template <typename T>
 struct is_member_pointer_impl
-    : is_member_pointer_select<
+    : public is_member_pointer_select<
           ::boost::type_traits::ice_or<
               ::boost::is_reference<T>::value
             , ::boost::is_array<T>::value
diff --git a/ext/boost/type_traits/is_object.hpp b/ext/boost/type_traits/is_object.hpp
new file mode 100644
index 0000000..3decbf8
--- /dev/null
+++ b/ext/boost/type_traits/is_object.hpp
@@ -0,0 +1,53 @@
+
+//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_OBJECT_HPP_INCLUDED
+#define BOOST_TT_IS_OBJECT_HPP_INCLUDED
+
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/type_traits/is_function.hpp>
+#include <boost/type_traits/detail/ice_and.hpp>
+#include <boost/type_traits/detail/ice_not.hpp>
+#include <boost/config.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+struct is_object_impl
+{
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+   BOOST_STATIC_CONSTANT(bool, value =
+      (::boost::type_traits::ice_and<
+         ::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value,
+         ::boost::type_traits::ice_not< ::boost::is_void<T>::value>::value,
+         ::boost::type_traits::ice_not< ::boost::is_function<T>::value>::value
+      >::value));
+#else
+   BOOST_STATIC_CONSTANT(bool, value =
+      (::boost::type_traits::ice_and<
+         ::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value,
+         ::boost::type_traits::ice_not< ::boost::is_void<T>::value>::value
+      >::value));
+#endif
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_object,T,::boost::detail::is_object_impl<T>::value)
+
+} // namespace boost
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_OBJECT_HPP_INCLUDED
diff --git a/ext/boost/type_traits/is_pod.hpp b/ext/boost/type_traits/is_pod.hpp
index af2c3c4..4691e66 100644
--- a/ext/boost/type_traits/is_pod.hpp
+++ b/ext/boost/type_traits/is_pod.hpp
@@ -20,6 +20,12 @@
 // should be the last #include
 #include <boost/type_traits/detail/bool_trait_def.hpp>
 
+#ifndef BOOST_IS_POD
+#define BOOST_INTERNAL_IS_POD(T) false
+#else
+#define BOOST_INTERNAL_IS_POD(T) BOOST_IS_POD(T)
+#endif
+
 namespace boost {
 
 // forward declaration, needed by 'is_pod_array_helper' template below
@@ -36,14 +42,14 @@ template <typename T> struct is_pod_impl
         (::boost::type_traits::ice_or<
             ::boost::is_scalar<T>::value,
             ::boost::is_void<T>::value,
-            BOOST_IS_POD(T)
+            BOOST_INTERNAL_IS_POD(T)
          >::value));
 };
 
 #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
 template <typename T, std::size_t sz>
 struct is_pod_impl<T[sz]>
-    : is_pod_impl<T>
+    : public is_pod_impl<T>
 {
 };
 #endif
@@ -60,7 +66,7 @@ struct is_pod_helper
             (::boost::type_traits::ice_or<
                 ::boost::is_scalar<T>::value,
                 ::boost::is_void<T>::value,
-                BOOST_IS_POD(T)
+                BOOST_INTERNAL_IS_POD(T)
             >::value));
     };
 };
@@ -132,4 +138,6 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pod,T,::boost::detail::is_pod_impl<T>::value)
 
 #include <boost/type_traits/detail/bool_trait_undef.hpp>
 
+#undef BOOST_INTERNAL_IS_POD
+
 #endif // BOOST_TT_IS_POD_HPP_INCLUDED
diff --git a/ext/boost/type_traits/is_pointer.hpp b/ext/boost/type_traits/is_pointer.hpp
index f6ecf33..4e29bb3 100644
--- a/ext/boost/type_traits/is_pointer.hpp
+++ b/ext/boost/type_traits/is_pointer.hpp
@@ -113,7 +113,7 @@ no_type BOOST_TT_DECL is_pointer_tester(...);
 
 template <bool>
 struct is_pointer_select
-    : ::boost::type_traits::false_result
+    : public ::boost::type_traits::false_result
 {
 };
 
@@ -133,7 +133,7 @@ struct is_pointer_select<false>
 
 template <typename T>
 struct is_pointer_impl
-    : is_pointer_select<
+    : public is_pointer_select<
           ::boost::type_traits::ice_or<
               ::boost::is_reference<T>::value
             , ::boost::is_array<T>::value
diff --git a/ext/boost/type_traits/is_signed.hpp b/ext/boost/type_traits/is_signed.hpp
index bf7bbfd..ba7d6e9 100644
--- a/ext/boost/type_traits/is_signed.hpp
+++ b/ext/boost/type_traits/is_signed.hpp
@@ -24,14 +24,19 @@ namespace boost {
 
 namespace detail{
 
-#if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238)
+#if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) && !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
 
 template <class T>
 struct is_signed_values
 {
+   //
+   // Note that we cannot use BOOST_STATIC_CONSTANT here, using enum's
+   // rather than "real" static constants simply doesn't work or give
+   // the correct answer.
+   //
    typedef typename remove_cv<T>::type no_cv_t;
-   BOOST_STATIC_CONSTANT(no_cv_t, minus_one = (static_cast<no_cv_t>(-1)));
-   BOOST_STATIC_CONSTANT(no_cv_t, zero = (static_cast<no_cv_t>(0)));
+   static const no_cv_t minus_one = (static_cast<no_cv_t>(-1));
+   static const no_cv_t zero = (static_cast<no_cv_t>(0));
 };
 
 template <class T>
diff --git a/ext/boost/type_traits/is_stateless.hpp b/ext/boost/type_traits/is_stateless.hpp
new file mode 100644
index 0000000..d8d4063
--- /dev/null
+++ b/ext/boost/type_traits/is_stateless.hpp
@@ -0,0 +1,48 @@
+
+//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_STATELESS_HPP_INCLUDED
+#define BOOST_TT_IS_STATELESS_HPP_INCLUDED
+
+#include <boost/type_traits/has_trivial_constructor.hpp>
+#include <boost/type_traits/has_trivial_copy.hpp>
+#include <boost/type_traits/has_trivial_destructor.hpp>
+#include <boost/type_traits/is_class.hpp>
+#include <boost/type_traits/is_empty.hpp>
+#include <boost/type_traits/detail/ice_and.hpp>
+#include <boost/config.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+struct is_stateless_impl
+{
+  BOOST_STATIC_CONSTANT(bool, value = 
+    (::boost::type_traits::ice_and<
+       ::boost::has_trivial_constructor<T>::value,
+       ::boost::has_trivial_copy<T>::value,
+       ::boost::has_trivial_destructor<T>::value,
+       ::boost::is_class<T>::value,
+       ::boost::is_empty<T>::value
+     >::value));
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_stateless,T,::boost::detail::is_stateless_impl<T>::value)
+
+} // namespace boost
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_STATELESS_HPP_INCLUDED
diff --git a/ext/boost/type_traits/is_union.hpp b/ext/boost/type_traits/is_union.hpp
index 25bddcc..610f162 100644
--- a/ext/boost/type_traits/is_union.hpp
+++ b/ext/boost/type_traits/is_union.hpp
@@ -25,7 +25,11 @@ namespace detail {
 template <typename T> struct is_union_impl
 {
    typedef typename remove_cv<T>::type cvt;
+#ifdef BOOST_IS_UNION
    BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(cvt));
+#else
+   BOOST_STATIC_CONSTANT(bool, value = false);
+#endif
 };
 #else
 //
@@ -35,7 +39,11 @@ template <typename T> struct is_union_impl
 //
 template <typename T> struct is_union_impl
 {
+#ifdef BOOST_IS_UNION
    BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(T));
+#else
+   BOOST_STATIC_CONSTANT(bool, value = false);
+#endif
 };
 #endif
 } // namespace detail
diff --git a/ext/boost/type_traits/is_unsigned.hpp b/ext/boost/type_traits/is_unsigned.hpp
index 98baf4e..0602838 100644
--- a/ext/boost/type_traits/is_unsigned.hpp
+++ b/ext/boost/type_traits/is_unsigned.hpp
@@ -24,14 +24,19 @@ namespace boost {
 
 namespace detail{
 
-#if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238)
+#if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) && !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
 
 template <class T>
 struct is_unsigned_values
 {
+   //
+   // Note that we cannot use BOOST_STATIC_CONSTANT here, using enum's
+   // rather than "real" static constants simply doesn't work or give
+   // the correct answer.
+   //
    typedef typename remove_cv<T>::type no_cv_t;
-   BOOST_STATIC_CONSTANT(no_cv_t, minus_one = (static_cast<no_cv_t>(-1)));
-   BOOST_STATIC_CONSTANT(no_cv_t, zero = (static_cast<no_cv_t>(0)));
+   static const no_cv_t minus_one = (static_cast<no_cv_t>(-1));
+   static const no_cv_t zero = (static_cast<no_cv_t>(0));
 };
 
 template <class T>
@@ -104,7 +109,7 @@ template <> struct is_unsigned_imp<const char> : public true_type{};
 template <> struct is_unsigned_imp<volatile char> : public true_type{};
 template <> struct is_unsigned_imp<const volatile char> : public true_type{};
 #endif
-#if defined(WCHAR_MIN) && (WCHAR_MIN == 0)
+#if defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
 template <> struct is_unsigned_imp<wchar_t> : public true_type{};
 template <> struct is_unsigned_imp<const wchar_t> : public true_type{};
 template <> struct is_unsigned_imp<volatile wchar_t> : public true_type{};
diff --git a/ext/boost/type_traits/is_volatile.hpp b/ext/boost/type_traits/is_volatile.hpp
index e531263..863747d 100644
--- a/ext/boost/type_traits/is_volatile.hpp
+++ b/ext/boost/type_traits/is_volatile.hpp
@@ -46,9 +46,9 @@ template <class T>
 struct is_volatile_rval_filter
 {
 #if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
-	BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<typename boost::remove_bounds<T>::type*>::is_volatile);
+   BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<typename boost::remove_bounds<T>::type*>::is_volatile);
 #else
-	BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<T*>::is_volatile);
+   BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<T*>::is_volatile);
 #endif
 };
 #ifndef BOOST_NO_RVALUE_REFERENCES
@@ -59,7 +59,7 @@ struct is_volatile_rval_filter
 template <class T>
 struct is_volatile_rval_filter<T&&>
 {
-	BOOST_STATIC_CONSTANT(bool, value = false);
+   BOOST_STATIC_CONSTANT(bool, value = false);
 };
 #endif
 }
@@ -94,7 +94,7 @@ no_type is_volatile_tester(void const*);
 
 template <bool is_ref, bool array>
 struct is_volatile_helper
-    : ::boost::type_traits::false_result
+    : public ::boost::type_traits::false_result
 {
 };
 
@@ -124,7 +124,7 @@ struct is_volatile_helper<false,true>
 
 template <typename T>
 struct is_volatile_impl
-    : is_volatile_helper<
+    : public is_volatile_helper<
           is_reference<T>::value
         , is_array<T>::value
         >::template result_<T>
diff --git a/ext/boost/type_traits/object_traits.hpp b/ext/boost/type_traits/object_traits.hpp
new file mode 100644
index 0000000..c812a62
--- /dev/null
+++ b/ext/boost/type_traits/object_traits.hpp
@@ -0,0 +1,33 @@
+//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+//
+//  defines object traits classes:
+//  is_object, is_scalar, is_class, is_compound, is_pod, 
+//  has_trivial_constructor, has_trivial_copy, has_trivial_assign, 
+//  has_trivial_destructor, is_empty.
+//
+
+#ifndef BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED
+#define BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED
+
+#include <boost/type_traits/has_trivial_assign.hpp>
+#include <boost/type_traits/has_trivial_constructor.hpp>
+#include <boost/type_traits/has_trivial_copy.hpp>
+#include <boost/type_traits/has_trivial_destructor.hpp>
+#include <boost/type_traits/has_nothrow_constructor.hpp>
+#include <boost/type_traits/has_nothrow_copy.hpp>
+#include <boost/type_traits/has_nothrow_assign.hpp>
+#include <boost/type_traits/is_base_and_derived.hpp>
+#include <boost/type_traits/is_class.hpp>
+#include <boost/type_traits/is_compound.hpp>
+#include <boost/type_traits/is_empty.hpp>
+#include <boost/type_traits/is_object.hpp>
+#include <boost/type_traits/is_pod.hpp>
+#include <boost/type_traits/is_scalar.hpp>
+#include <boost/type_traits/is_stateless.hpp>
+
+#endif // BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED
diff --git a/ext/boost/type_traits/remove_bounds.hpp b/ext/boost/type_traits/remove_bounds.hpp
new file mode 100644
index 0000000..ce12978
--- /dev/null
+++ b/ext/boost/type_traits/remove_bounds.hpp
@@ -0,0 +1,48 @@
+
+//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED
+#define BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <cstddef>
+#include <boost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC,<=1300)
+#include <boost/type_traits/msvc/remove_bounds.hpp>
+#endif
+
+// should be the last #include
+#include <boost/type_traits/detail/type_trait_def.hpp>
+
+#if !BOOST_WORKAROUND(BOOST_MSVC,<=1300)
+
+namespace boost {
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_bounds,T,T)
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T[N],T type)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T const[N],T const type)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T volatile[N],T volatile type)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T const volatile[N],T const volatile type)
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) && !defined(__IBMCPP__) &&  !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T[],T)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T const[],T const)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T volatile[],T volatile)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T const volatile[],T const volatile)
+#endif
+#endif
+
+} // namespace boost
+
+#endif
+
+#include <boost/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED
diff --git a/ext/boost/type_traits/remove_cv.hpp b/ext/boost/type_traits/remove_cv.hpp
index 668e755..ee6d8f9 100644
--- a/ext/boost/type_traits/remove_cv.hpp
+++ b/ext/boost/type_traits/remove_cv.hpp
@@ -27,12 +27,14 @@
 
 namespace boost {
 
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
 namespace detail{
 
 template <class T>
 struct rvalue_ref_filter_rem_cv
 {
-	typedef typename boost::detail::cv_traits_imp<T*>::unqualified_type type;
+   typedef typename boost::detail::cv_traits_imp<T*>::unqualified_type type;
 };
 
 #ifndef BOOST_NO_RVALUE_REFERENCES
@@ -43,13 +45,12 @@ struct rvalue_ref_filter_rem_cv
 template <class T>
 struct rvalue_ref_filter_rem_cv<T&&>
 {
-	typedef T&& type;
+   typedef T&& type;
 };
 #endif
 
 }
 
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 
 //  convert a type T to a non-cv-qualified type - remove_cv<T>
 BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename boost::detail::rvalue_ref_filter_rem_cv<T>::type)
diff --git a/ext/boost/type_traits/remove_pointer.hpp b/ext/boost/type_traits/remove_pointer.hpp
index 5359992..01253db 100644
--- a/ext/boost/type_traits/remove_pointer.hpp
+++ b/ext/boost/type_traits/remove_pointer.hpp
@@ -9,12 +9,17 @@
 #ifndef BOOST_TT_REMOVE_POINTER_HPP_INCLUDED
 #define BOOST_TT_REMOVE_POINTER_HPP_INCLUDED
 
-#include <boost/type_traits/broken_compiler_spec.hpp>
 #include <boost/config.hpp>
 #include <boost/detail/workaround.hpp>
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#include <boost/type_traits/broken_compiler_spec.hpp>
+#endif
 
 #if BOOST_WORKAROUND(BOOST_MSVC,<=1300)
 #include <boost/type_traits/msvc/remove_pointer.hpp>
+#elif defined(BOOST_MSVC)
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_pointer.hpp>
 #endif
 
 // should be the last #include
@@ -22,7 +27,51 @@
 
 namespace boost {
 
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#ifdef BOOST_MSVC
+
+namespace detail{
+
+   //
+   // We need all this crazy indirection because a type such as:
+   //
+   // T (*const)(U)
+   //
+   // Does not bind to a <T*> or <T*const> partial specialization with VC10 and earlier
+   //
+   template <class T> 
+   struct remove_pointer_imp
+   {
+      typedef T type;
+   };
+
+   template <class T> 
+   struct remove_pointer_imp<T*>
+   {
+      typedef T type;
+   };
+
+   template <class T, bool b> 
+   struct remove_pointer_imp3
+   {
+      typedef typename remove_pointer_imp<typename boost::remove_cv<T>::type>::type type;
+   };
+
+   template <class T> 
+   struct remove_pointer_imp3<T, false>
+   {
+      typedef T type;
+   };
+
+   template <class T> 
+   struct remove_pointer_imp2
+   {
+      typedef typename remove_pointer_imp3<T, ::boost::is_pointer<T>::value>::type type;
+   };
+}
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_imp2<T>::type)
+
+#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 
 BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,T)
 BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T*,T)
diff --git a/ext/boost/type_traits/remove_reference.hpp b/ext/boost/type_traits/remove_reference.hpp
index a87db33..f453086 100644
--- a/ext/boost/type_traits/remove_reference.hpp
+++ b/ext/boost/type_traits/remove_reference.hpp
@@ -32,13 +32,13 @@ namespace detail{
 template <class T>
 struct remove_rvalue_ref
 {
-	typedef T type;
+   typedef T type;
 };
 #ifndef BOOST_NO_RVALUE_REFERENCES
 template <class T>
 struct remove_rvalue_ref<T&&>
 {
-	typedef T type;
+   typedef T type;
 };
 #endif
 
diff --git a/ext/boost/type_traits/remove_volatile.hpp b/ext/boost/type_traits/remove_volatile.hpp
new file mode 100644
index 0000000..073a2a3
--- /dev/null
+++ b/ext/boost/type_traits/remove_volatile.hpp
@@ -0,0 +1,88 @@
+
+//  (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+//  Hinnant & John Maddock 2000.  
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+
+#ifndef BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED
+#define BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED
+
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/broken_compiler_spec.hpp>
+#include <boost/type_traits/detail/cv_traits_impl.hpp>
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+#include <cstddef>
+
+#if BOOST_WORKAROUND(BOOST_MSVC,<=1300)
+#include <boost/type_traits/msvc/remove_volatile.hpp>
+#endif
+
+// should be the last #include
+#include <boost/type_traits/detail/type_trait_def.hpp>
+
+namespace boost {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+namespace detail {
+
+template <typename T, bool is_const>
+struct remove_volatile_helper
+{
+    typedef T type;
+};
+
+template <typename T>
+struct remove_volatile_helper<T,true>
+{
+    typedef T const type;
+};
+
+template <typename T>
+struct remove_volatile_impl
+{
+    typedef typename remove_volatile_helper<
+          typename cv_traits_imp<T*>::unqualified_type
+        , ::boost::is_const<T>::value
+        >::type type;
+};
+
+//
+// We can't filter out rvalue_references at the same level as
+// references or we get ambiguities from msvc:
+//
+#ifndef BOOST_NO_RVALUE_REFERENCES
+template <typename T>
+struct remove_volatile_impl<T&&>
+{
+    typedef T&& type;
+};
+#endif
+} // namespace detail
+
+// * convert a type T to a non-volatile type - remove_volatile<T>
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,typename boost::detail::remove_volatile_impl<T>::type)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_volatile,T&,T&)
+#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile,T volatile[N],T type[N])
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile,T const volatile[N],T const type[N])
+#endif
+
+#elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300)
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,typename boost::detail::remove_volatile_impl<T>::type)
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace boost
+
+#include <boost/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED
diff --git a/ext/boost/type_traits/same_traits.hpp b/ext/boost/type_traits/same_traits.hpp
new file mode 100644
index 0000000..dab7dac
--- /dev/null
+++ b/ext/boost/type_traits/same_traits.hpp
@@ -0,0 +1,15 @@
+//  (C) Copyright Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+//
+//  defines is_same:
+
+#ifndef BOOST_TT_SAME_TRAITS_HPP_INCLUDED
+#define BOOST_TT_SAME_TRAITS_HPP_INCLUDED
+
+#include <boost/type_traits/is_same.hpp>
+
+#endif  // BOOST_TT_SAME_TRAITS_HPP_INCLUDED
diff --git a/ext/boost/type_traits/transform_traits.hpp b/ext/boost/type_traits/transform_traits.hpp
new file mode 100644
index 0000000..7a82f1c
--- /dev/null
+++ b/ext/boost/type_traits/transform_traits.hpp
@@ -0,0 +1,21 @@
+//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+//
+//  defines traits classes for transforming one type to another:
+//  remove_reference, add_reference, remove_bounds, remove_pointer.
+//
+
+#ifndef BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED
+#define BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED
+
+#include <boost/type_traits/add_pointer.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/remove_bounds.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+#endif // BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED
diff --git a/ext/boost/type_traits/type_with_alignment.hpp b/ext/boost/type_traits/type_with_alignment.hpp
index ac31055..a86137f 100644
--- a/ext/boost/type_traits/type_with_alignment.hpp
+++ b/ext/boost/type_traits/type_with_alignment.hpp
@@ -86,7 +86,7 @@ struct lower_alignment_helper_impl<false>
 {
     template <std::size_t target, class TestType>
     struct apply
-      : mpl::if_c<(alignment_of<TestType>::value == target), TestType, char>
+      : public mpl::if_c<(alignment_of<TestType>::value == target), TestType, char>
     {
         enum { value = (alignment_of<TestType>::value == target) };
     };
@@ -94,7 +94,7 @@ struct lower_alignment_helper_impl<false>
 
 template <bool found, std::size_t target, class TestType>
 struct lower_alignment_helper
-  : lower_alignment_helper_impl<found>::template apply<target,TestType>
+  : public lower_alignment_helper_impl<found>::template apply<target,TestType>
 {
 };
 #else
@@ -225,6 +225,8 @@ struct __attribute__((__aligned__(4))) a4 {};
 struct __attribute__((__aligned__(8))) a8 {};
 struct __attribute__((__aligned__(16))) a16 {};
 struct __attribute__((__aligned__(32))) a32 {};
+struct __attribute__((__aligned__(64))) a64 {};
+struct __attribute__((__aligned__(128))) a128 {};
 }
 
 template<> class type_with_alignment<1>  { public: typedef char type; };
@@ -233,6 +235,8 @@ template<> class type_with_alignment<4>  { public: typedef align::a4 type; };
 template<> class type_with_alignment<8>  { public: typedef align::a8 type; };
 template<> class type_with_alignment<16> { public: typedef align::a16 type; };
 template<> class type_with_alignment<32> { public: typedef align::a32 type; };
+template<> class type_with_alignment<64> { public: typedef align::a64 type; };
+template<> class type_with_alignment<128> { public: typedef align::a128 type; };
 
 namespace detail {
 BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a2,true)
@@ -240,6 +244,8 @@ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a4,true)
 BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a8,true)
 BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a16,true)
 BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a32,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a64,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a128,true)
 }
 #endif
 #if (defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && _MSC_VER >= 1300
diff --git a/ext/boost/typeof/message.hpp b/ext/boost/typeof/message.hpp
new file mode 100644
index 0000000..cabbb82
--- /dev/null
+++ b/ext/boost/typeof/message.hpp
@@ -0,0 +1,8 @@
+// Copyright (C) 2005 Arkadiy Vertleyb
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
+
+#if defined(_MSC_VER) && defined BOOST_TYPEOF_MESSAGES
+#    pragma message(BOOST_TYPEOF_TEXT)
+#endif
+#undef BOOST_TYPEOF_TEXT
diff --git a/ext/boost/typeof/native.hpp b/ext/boost/typeof/native.hpp
new file mode 100644
index 0000000..8197e28
--- /dev/null
+++ b/ext/boost/typeof/native.hpp
@@ -0,0 +1,60 @@
+// Copyright (C) 2006 Arkadiy Vertleyb
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TYPEOF_NATIVE_HPP_INCLUDED
+#define BOOST_TYPEOF_NATIVE_HPP_INCLUDED
+
+#ifndef MSVC_TYPEOF_HACK
+
+#ifdef BOOST_NO_SFINAE
+
+namespace boost { namespace type_of {
+
+    template<class T> 
+        T& ensure_obj(const T&);
+
+}}
+
+#else
+
+#include <boost/type_traits/is_function.hpp> 
+#include <boost/utility/enable_if.hpp>
+
+namespace boost { namespace type_of {
+# ifdef BOOST_NO_SFINAE
+    template<class T> 
+    T& ensure_obj(const T&);
+# else
+    template<typename T>
+        typename enable_if<is_function<T>, T&>::type
+        ensure_obj(T&);
+
+    template<typename T>
+        typename disable_if<is_function<T>, T&>::type
+        ensure_obj(const T&);
+# endif
+}}
+
+#endif//BOOST_NO_SFINAE
+
+#define BOOST_TYPEOF(expr) BOOST_TYPEOF_KEYWORD(boost::type_of::ensure_obj(expr))
+#define BOOST_TYPEOF_TPL BOOST_TYPEOF
+
+#define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
+    struct name {\
+        typedef BOOST_TYPEOF_TPL(expr) type;\
+    };
+
+#define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
+    struct name {\
+        typedef BOOST_TYPEOF(expr) type;\
+    };
+
+#endif//MSVC_TYPEOF_HACK
+
+#define BOOST_TYPEOF_REGISTER_TYPE(x)
+#define BOOST_TYPEOF_REGISTER_TEMPLATE(x, params)
+
+#endif//BOOST_TYPEOF_NATIVE_HPP_INCLUDED
+
diff --git a/ext/boost/typeof/typeof.hpp b/ext/boost/typeof/typeof.hpp
new file mode 100644
index 0000000..4d56964
--- /dev/null
+++ b/ext/boost/typeof/typeof.hpp
@@ -0,0 +1,218 @@
+// Copyright (C) 2004 Arkadiy Vertleyb
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TYPEOF_TYPEOF_HPP_INCLUDED
+#define BOOST_TYPEOF_TYPEOF_HPP_INCLUDED
+
+#if defined(BOOST_TYPEOF_COMPLIANT)
+#   define BOOST_TYPEOF_EMULATION
+#endif
+
+#if defined(BOOST_TYPEOF_EMULATION) && defined(BOOST_TYPEOF_NATIVE)
+#   error both typeof emulation and native mode requested
+#endif
+
+#if defined(__COMO__)
+#   ifdef __GNUG__
+#       ifndef BOOST_TYPEOF_EMULATION
+#           ifndef BOOST_TYPEOF_NATIVE
+#               define BOOST_TYPEOF_NATIVE
+#           endif
+#           define BOOST_TYPEOF_KEYWORD typeof
+#       endif
+#   else
+#       ifndef BOOST_TYPEOF_NATIVE
+#           ifndef BOOST_TYPEOF_EMULATION
+#               define BOOST_TYPEOF_EMULATION
+#           endif
+#       else
+#           error native typeof is not supported
+#       endif
+#   endif
+
+#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
+#   ifdef __GNUC__
+#       ifndef BOOST_TYPEOF_EMULATION
+#           ifndef BOOST_TYPEOF_NATIVE
+#               define BOOST_TYPEOF_NATIVE
+#           endif
+#           define BOOST_TYPEOF_KEYWORD __typeof__
+#       endif
+#   else
+#       ifndef BOOST_TYPEOF_NATIVE
+#           ifndef BOOST_TYPEOF_EMULATION
+#               define BOOST_TYPEOF_EMULATION
+#           endif
+#       else
+#           error native typeof is not supported
+#       endif
+#   endif
+
+#elif defined(__GNUC__)
+#   ifndef BOOST_TYPEOF_EMULATION
+#       ifndef BOOST_TYPEOF_NATIVE
+#           define BOOST_TYPEOF_NATIVE
+#       endif
+#       define BOOST_TYPEOF_KEYWORD __typeof__
+#   endif
+
+#elif defined(__MWERKS__)
+#   if(__MWERKS__ <= 0x3003)  // 8.x
+#       ifndef BOOST_TYPEOF_EMULATION
+#           ifndef BOOST_TYPEOF_NATIVE
+#               define BOOST_TYPEOF_NATIVE
+#           endif
+#           define BOOST_TYPEOF_KEYWORD __typeof__
+#       else
+#           define BOOST_TYPEOF_EMULATION_UNSUPPORTED
+#       endif
+#   else // 9.x
+#       ifndef BOOST_TYPEOF_EMULATION
+#           ifndef BOOST_TYPEOF_NATIVE
+#               define BOOST_TYPEOF_NATIVE
+#           endif
+#           define BOOST_TYPEOF_KEYWORD __typeof__
+#       endif
+#   endif
+#elif defined __CODEGEARC__
+#   ifndef BOOST_TYPEOF_EMULATION
+#       ifndef BOOST_TYPEOF_NATIVE
+#           define BOOST_TYPEOF_EMULATION_UNSUPPORTED
+#       endif
+#   else
+#       define BOOST_TYPEOF_EMULATION_UNSUPPORTED
+#   endif
+#elif defined __BORLANDC__
+#   ifndef BOOST_TYPEOF_EMULATION
+#       ifndef BOOST_TYPEOF_NATIVE
+#           define BOOST_TYPEOF_EMULATION_UNSUPPORTED
+#       endif
+#   else
+#       define BOOST_TYPEOF_EMULATION_UNSUPPORTED
+#   endif
+#elif defined __DMC__
+#   ifndef BOOST_TYPEOF_EMULATION
+#       ifndef BOOST_TYPEOF_NATIVE
+#           define BOOST_TYPEOF_NATIVE
+#       endif
+#       include <boost/typeof/dmc/typeof_impl.hpp>
+#       define MSVC_TYPEOF_HACK
+#   endif
+#elif defined(_MSC_VER)
+#   if (_MSC_VER <= 1300)  // 6.5, 7.0
+#       ifndef BOOST_TYPEOF_EMULATION
+#           ifndef BOOST_TYPEOF_NATIVE
+#               define BOOST_TYPEOF_NATIVE
+#           endif
+#           include <boost/typeof/msvc/typeof_impl.hpp>
+#           define MSVC_TYPEOF_HACK
+#       else
+#           error typeof emulation is not supported
+#       endif
+#   elif (_MSC_VER >= 1310)  // 7.1 ->
+#       ifndef BOOST_TYPEOF_EMULATION
+#           ifndef BOOST_TYPEOF_NATIVE
+#               ifndef _MSC_EXTENSIONS
+#                   define BOOST_TYPEOF_EMULATION
+#               else
+#                   define BOOST_TYPEOF_NATIVE
+#               endif
+#           endif
+#       endif
+#       ifdef BOOST_TYPEOF_NATIVE
+#           include <boost/typeof/msvc/typeof_impl.hpp>
+#           define MSVC_TYPEOF_HACK
+#       endif
+#   endif
+#elif defined(__HP_aCC)
+#   ifndef BOOST_TYPEOF_NATIVE
+#       ifndef BOOST_TYPEOF_EMULATION
+#           define BOOST_TYPEOF_EMULATION
+#       endif
+#   else
+#       error native typeof is not supported
+#   endif
+
+#elif defined(__DECCXX)
+#   ifndef BOOST_TYPEOF_NATIVE
+#       ifndef BOOST_TYPEOF_EMULATION
+#           define BOOST_TYPEOF_EMULATION
+#       endif
+#   else
+#       error native typeof is not supported
+#   endif
+
+#elif defined(__BORLANDC__)
+#   if (__BORLANDC__ < 0x590)
+#       define BOOST_TYPEOF_NO_FUNCTION_TYPES
+#       define BOOST_TYPEOF_NO_MEMBER_FUNCTION_TYPES
+#   endif
+#   ifndef BOOST_TYPEOF_NATIVE
+#       ifndef BOOST_TYPEOF_EMULATION
+#           define BOOST_TYPEOF_EMULATION
+#       endif
+#   else
+#       error native typeof is not supported
+#   endif
+#elif defined(__SUNPRO_CC)
+#   if (__SUNPRO_CC < 0x590 )
+#     ifdef BOOST_TYPEOF_NATIVE
+#         error native typeof is not supported
+#     endif
+#     ifndef BOOST_TYPEOF_EMULATION
+#         define BOOST_TYPEOF_EMULATION
+#     endif
+#   else
+#     ifndef BOOST_TYPEOF_EMULATION
+#         ifndef BOOST_TYPEOF_NATIVE
+#             define BOOST_TYPEOF_NATIVE
+#         endif
+#         define BOOST_TYPEOF_KEYWORD __typeof__
+#     endif
+#   endif
+#else //unknown compiler
+#   ifndef BOOST_TYPEOF_NATIVE
+#       ifndef BOOST_TYPEOF_EMULATION
+#           define BOOST_TYPEOF_EMULATION
+#       endif
+#   else
+#       ifndef BOOST_TYPEOF_KEYWORD
+#           define BOOST_TYPEOF_KEYWORD typeof
+#       endif
+#   endif
+
+#endif
+
+#define BOOST_TYPEOF_UNIQUE_ID()\
+     BOOST_TYPEOF_REGISTRATION_GROUP * 0x10000 + __LINE__
+
+#define BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()\
+     <boost/typeof/incr_registration_group.hpp>
+
+#ifdef BOOST_TYPEOF_EMULATION_UNSUPPORTED
+#   include <boost/typeof/unsupported.hpp>
+#elif defined BOOST_TYPEOF_EMULATION
+#   define BOOST_TYPEOF_TEXT "using typeof emulation"
+#   include <boost/typeof/message.hpp>
+#   include <boost/typeof/typeof_impl.hpp>
+#   include <boost/typeof/type_encoding.hpp>
+#   include <boost/typeof/template_encoding.hpp>
+#   include <boost/typeof/modifiers.hpp>
+#   include <boost/typeof/pointers_data_members.hpp>
+#   include <boost/typeof/register_functions.hpp>
+#   include <boost/typeof/register_fundamental.hpp>
+
+#elif defined(BOOST_TYPEOF_NATIVE)
+#   define BOOST_TYPEOF_TEXT "using native typeof"
+#   include <boost/typeof/message.hpp>
+#   include <boost/typeof/native.hpp>
+#else
+#   error typeof configuration error
+#endif
+
+// auto
+#define BOOST_AUTO(Var, Expr) BOOST_TYPEOF(Expr) Var = Expr
+#define BOOST_AUTO_TPL(Var, Expr) BOOST_TYPEOF_TPL(Expr) Var = Expr
+
+#endif//BOOST_TYPEOF_TYPEOF_HPP_INCLUDED
diff --git a/ext/boost/units/detail/._utility.hpp b/ext/boost/units/detail/._utility.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/units/detail/._utility.hpp and /dev/null differ
diff --git a/ext/boost/utility.hpp b/ext/boost/utility.hpp
deleted file mode 100644
index b909f29..0000000
--- a/ext/boost/utility.hpp
+++ /dev/null
@@ -1,20 +0,0 @@
-//  Boost utility.hpp header file  -------------------------------------------//
-
-//  Copyright 1999-2003 Aleksey Gurtovoy.  Use, modification, and distribution are
-//  subject to the Boost Software License, Version 1.0.  (See accompanying file
-//  LICENSE_1_0.txt or a copy at <http://www.boost.org/LICENSE_1_0.txt>.)
-
-//  See <http://www.boost.org/libs/utility/> for the library's home page.
-
-#ifndef BOOST_UTILITY_HPP
-#define BOOST_UTILITY_HPP
-
-#include <boost/utility/addressof.hpp>
-#include <boost/utility/base_from_member.hpp>
-#include <boost/utility/binary.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/checked_delete.hpp>
-#include <boost/next_prior.hpp>
-#include <boost/noncopyable.hpp>
-
-#endif  // BOOST_UTILITY_HPP
diff --git a/ext/boost/utility/._addressof.hpp b/ext/boost/utility/._addressof.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/utility/._addressof.hpp and /dev/null differ
diff --git a/ext/boost/utility/._base_from_member.hpp b/ext/boost/utility/._base_from_member.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/utility/._base_from_member.hpp and /dev/null differ
diff --git a/ext/boost/utility/._binary.hpp b/ext/boost/utility/._binary.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/utility/._binary.hpp and /dev/null differ
diff --git a/ext/boost/utility/._compare_pointees.hpp b/ext/boost/utility/._compare_pointees.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/utility/._compare_pointees.hpp and /dev/null differ
diff --git a/ext/boost/utility/._enable_if.hpp b/ext/boost/utility/._enable_if.hpp
deleted file mode 100644
index c285a1e..0000000
Binary files a/ext/boost/utility/._enable_if.hpp and /dev/null differ
diff --git a/ext/boost/utility/base_from_member.hpp b/ext/boost/utility/base_from_member.hpp
deleted file mode 100644
index 04aabb5..0000000
--- a/ext/boost/utility/base_from_member.hpp
+++ /dev/null
@@ -1,87 +0,0 @@
-//  boost utility/base_from_member.hpp header file  --------------------------//
-
-//  Copyright 2001, 2003, 2004 Daryle Walker.  Use, modification, and
-//  distribution are subject to the Boost Software License, Version 1.0.  (See
-//  accompanying file LICENSE_1_0.txt or a copy at
-//  <http://www.boost.org/LICENSE_1_0.txt>.)
-
-//  See <http://www.boost.org/libs/utility/> for the library's home page.
-
-#ifndef BOOST_UTILITY_BASE_FROM_MEMBER_HPP
-#define BOOST_UTILITY_BASE_FROM_MEMBER_HPP
-
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/repetition/enum_binary_params.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/repetition/repeat_from_to.hpp>
-
-
-//  Base-from-member arity configuration macro  ------------------------------//
-
-// The following macro determines how many arguments will be in the largest
-// constructor template of base_from_member.  Constructor templates will be
-// generated from one argument to this maximum.  Code from other files can read
-// this number if they need to always match the exact maximum base_from_member
-// uses.  The maximum constructor length can be changed by overriding the
-// #defined constant.  Make sure to apply the override, if any, for all source
-// files during project compiling for consistency.
-
-// Contributed by Jonathan Turkanis
-
-#ifndef BOOST_BASE_FROM_MEMBER_MAX_ARITY
-#define BOOST_BASE_FROM_MEMBER_MAX_ARITY  10
-#endif
-
-
-//  An iteration of a constructor template for base_from_member  -------------//
-
-// A macro that should expand to:
-//     template < typename T1, ..., typename Tn >
-//     base_from_member( T1 x1, ..., Tn xn )
-//         : member( x1, ..., xn )
-//         {}
-// This macro should only persist within this file.
-
-#define BOOST_PRIVATE_CTR_DEF( z, n, data )                            \
-    template < BOOST_PP_ENUM_PARAMS(n, typename T) >                   \
-    explicit base_from_member( BOOST_PP_ENUM_BINARY_PARAMS(n, T, x) )  \
-        : member( BOOST_PP_ENUM_PARAMS(n, x) )                         \
-        {}                                                             \
-    /**/
-
-
-namespace boost
-{
-
-//  Base-from-member class template  -----------------------------------------//
-
-// Helper to initialize a base object so a derived class can use this
-// object in the initialization of another base class.  Used by
-// Dietmar Kuehl from ideas by Ron Klatcho to solve the problem of a
-// base class needing to be initialized by a member.
-
-// Contributed by Daryle Walker
-
-template < typename MemberType, int UniqueID = 0 >
-class base_from_member
-{
-protected:
-    MemberType  member;
-
-    base_from_member()
-        : member()
-        {}
-
-    BOOST_PP_REPEAT_FROM_TO( 1, BOOST_PP_INC(BOOST_BASE_FROM_MEMBER_MAX_ARITY),
-     BOOST_PRIVATE_CTR_DEF, _ )
-
-};  // boost::base_from_member
-
-}  // namespace boost
-
-
-// Undo any private macros
-#undef BOOST_PRIVATE_CTR_DEF
-
-
-#endif  // BOOST_UTILITY_BASE_FROM_MEMBER_HPP
diff --git a/ext/boost/utility/binary.hpp b/ext/boost/utility/binary.hpp
deleted file mode 100644
index 8cef146..0000000
--- a/ext/boost/utility/binary.hpp
+++ /dev/null
@@ -1,708 +0,0 @@
-/*=============================================================================
-    Copyright (c) 2005 Matthew Calabrese
-
-    Use, modification and distribution is subject to the Boost Software
-    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-    http://www.boost.org/LICENSE_1_0.txt)
-==============================================================================*/
-
-#ifndef BOOST_UTILITY_BINARY_HPP
-#define BOOST_UTILITY_BINARY_HPP
-
-/*=============================================================================
-
-    Binary Literal Utility
-    ______________________
-
-
-    The following code works by converting the input bit pattern into a
-    Boost.Preprocessor sequence, then converting groupings of 3 bits each into
-    the corresponding octal digit, and finally concatenating all of the digits
-    together along with a leading zero. This yields a standard octal literal
-    with the desired value as specified in bits.
-
-==============================================================================*/
-
-#include <boost/preprocessor/control/deduce_d.hpp>
-#include <boost/preprocessor/facilities/identity.hpp>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/seq/cat.hpp>
-#include <boost/preprocessor/seq/transform.hpp>
-#include <boost/preprocessor/arithmetic/mod.hpp>
-#include <boost/preprocessor/seq/size.hpp>
-#include <boost/preprocessor/facilities/empty.hpp>
-#include <boost/preprocessor/control/while.hpp>
-
-#define BOOST_BINARY( bit_groupings )                                          \
-  BOOST_BINARY_LITERAL_D( BOOST_PP_DEDUCE_D(), bit_groupings ) 
-
-#define BOOST_BINARY_U( bit_groupings )                                        \
-  BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, U ) 
-
-#define BOOST_BINARY_L( bit_groupings )                                        \
-  BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, L ) 
-
-#define BOOST_BINARY_UL( bit_groupings )                                       \
-  BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, UL ) 
-
-#define BOOST_BINARY_LU( bit_groupings )                                       \
-  BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, LU ) 
-
-#define BOOST_BINARY_LL( bit_groupings )                                       \
-  BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, LL ) 
-
-#define BOOST_BINARY_ULL( bit_groupings )                                      \
-  BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, ULL ) 
-
-#define BOOST_BINARY_LLU( bit_groupings )                                      \
-  BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, LLU ) 
-
-#define BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, suffix )                 \
-  BOOST_SUFFIXED_BINARY_LITERAL_D( BOOST_PP_DEDUCE_D(), bit_groupings, suffix ) 
-
-#define BOOST_SUFFIXED_BINARY_LITERAL_D( d, bit_groupings, suffix )            \
-  BOOST_PP_CAT( BOOST_BINARY_LITERAL_D( d, bit_groupings ), suffix ) 
-
-#define BOOST_BINARY_LITERAL_D( d, bit_groupings )                             \
-  BOOST_PP_SEQ_CAT                                                             \
-  ( (0) BOOST_DETAIL_CREATE_BINARY_LITERAL_OCTAL_SEQUENCE( d, bit_groupings )  \
-  ) 
-
-#define BOOST_DETAIL_CREATE_BINARY_LITERAL_OCTAL_SEQUENCE( d, bit_groupings )  \
-  BOOST_PP_SEQ_TRANSFORM                                                       \
-  ( BOOST_DETAIL_TRIPLE_TO_OCTAL_OPERATION                                     \
-  , BOOST_PP_NIL                                                               \
-  , BOOST_PP_IDENTITY( BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_TRIPLE_SEQUENCE )()\
-    ( BOOST_DETAIL_COMPLETE_TRIPLE_SEQUENCE                                    \
-      (                                                                        \
-        d                                                                      \
-      , BOOST_DETAIL_CREATE_BINARY_LITERAL_BIT_SEQUENCE( d, bit_groupings )    \
-      )                                                                        \
-    )                                                                          \
-  ) 
-
-#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_TRIPLE_SEQUENCE( bit_sequence )   \
-  BOOST_PP_CAT                                                                 \
-  ( BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_1 bit_sequence      \
-  , END_BIT                                                                    \
-  ) 
-
-#define BOOST_DETAIL_BITS_PER_OCTIT 3
-
-#define BOOST_DETAIL_COMPLETE_TRIPLE_SEQUENCE( d, incomplete_nibble_sequence ) \
-  BOOST_PP_CAT                                                                 \
-  ( BOOST_DETAIL_CREATE_TRIPLE_COMPLETION_SEQUENCE_                            \
-  , BOOST_PP_MOD_D( d                                                          \
-                  , BOOST_PP_SEQ_SIZE( incomplete_nibble_sequence )            \
-                  , BOOST_DETAIL_BITS_PER_OCTIT                                \
-                  )                                                            \
-  )                                                                            \
-  incomplete_nibble_sequence 
-
-#define BOOST_DETAIL_FIXED_COMPL( bit )                                        \
-  BOOST_PP_CAT( BOOST_DETAIL_FIXED_COMPL_, bit )
-
-#define BOOST_DETAIL_FIXED_COMPL_0 1 
-
-#define BOOST_DETAIL_FIXED_COMPL_1 0 
-
-#define BOOST_DETAIL_CREATE_BINARY_LITERAL_BIT_SEQUENCE( d, bit_groupings )    \
-  BOOST_PP_EMPTY                                                               \
-  BOOST_PP_CAT( BOOST_PP_WHILE_, d )                                           \
-  ( BOOST_DETAIL_BINARY_LITERAL_PREDICATE                                      \
-  , BOOST_DETAIL_BINARY_LITERAL_OPERATION                                      \
-  , bit_groupings ()                                                           \
-  ) 
-
-#define BOOST_DETAIL_BINARY_LITERAL_PREDICATE( d, state )                      \
-  BOOST_DETAIL_FIXED_COMPL( BOOST_DETAIL_IS_NULLARY_ARGS( state ) ) 
-
-#define BOOST_DETAIL_BINARY_LITERAL_OPERATION( d, state )                      \
-  BOOST_DETAIL_SPLIT_AND_SWAP                                                  \
-  ( BOOST_PP_CAT( BOOST_DETAIL_BINARY_LITERAL_ELEMENT_, state ) ) 
-
-#define BOOST_DETAIL_TRIPLE_TO_OCTAL_OPERATION( s, dummy_param, tuple )        \
-  BOOST_DETAIL_TERNARY_TRIPLE_TO_OCTAL tuple 
-
-#define BOOST_DETAIL_TERNARY_TRIPLE_TO_OCTAL( bit2, bit1, bit0 )               \
-  BOOST_DETAIL_TRIPLE_TO_OCTAL_ ## bit2 ## bit1 ## bit0 
-
-#define BOOST_DETAIL_CREATE_TRIPLE_COMPLETION_SEQUENCE_1 (0)(0)
-#define BOOST_DETAIL_CREATE_TRIPLE_COMPLETION_SEQUENCE_2 (0)
-#define BOOST_DETAIL_CREATE_TRIPLE_COMPLETION_SEQUENCE_0  
-
-#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_1END_BIT  
-
-#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_1( bit )        \
-  ( ( bit, BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_2 
-
-#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_2( bit )        \
-  bit, BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_3 
-
-#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_3( bit )        \
-  bit ) ) BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_1 
-
-#define BOOST_DETAIL_SPLIT_AND_SWAP( params )                                  \
-  BOOST_PP_IDENTITY( BOOST_DETAIL_SPLIT_AND_SWAP_PARAMS )()( params )
-
-#define BOOST_DETAIL_SPLIT_AND_SWAP_PARAMS( first_param, second_param )        \
-  second_param first_param 
-
-#define BOOST_DETAIL_LEFT_OF_COMMA( params )                                   \
-  BOOST_PP_IDENTITY( BOOST_DETAIL_FIRST_MACRO_PARAM )()( params ) 
-
-#define BOOST_DETAIL_FIRST_MACRO_PARAM( first_param, second_param )            \
-  first_param 
-
-/* Begin derived concepts from Chaos by Paul Mensonides */
-
-#define BOOST_DETAIL_IS_NULLARY_ARGS( param )                                  \
-  BOOST_DETAIL_LEFT_OF_COMMA                                                   \
-  ( BOOST_PP_CAT( BOOST_DETAIL_IS_NULLARY_ARGS_R_                              \
-                , BOOST_DETAIL_IS_NULLARY_ARGS_C param                         \
-                )                                                              \
-  ) 
-
-#define BOOST_DETAIL_IS_NULLARY_ARGS_C()                                       \
-  1 
-
-#define BOOST_DETAIL_IS_NULLARY_ARGS_R_1                                       \
-  1, BOOST_PP_NIL 
-
-#define BOOST_DETAIL_IS_NULLARY_ARGS_R_BOOST_DETAIL_IS_NULLARY_ARGS_C          \
-  0, BOOST_PP_NIL 
-
-/* End derived concepts from Chaos by Paul Mensonides */
-
-#define BOOST_DETAIL_TRIPLE_TO_OCTAL_000 0 
-#define BOOST_DETAIL_TRIPLE_TO_OCTAL_001 1 
-#define BOOST_DETAIL_TRIPLE_TO_OCTAL_010 2 
-#define BOOST_DETAIL_TRIPLE_TO_OCTAL_011 3 
-#define BOOST_DETAIL_TRIPLE_TO_OCTAL_100 4 
-#define BOOST_DETAIL_TRIPLE_TO_OCTAL_101 5 
-#define BOOST_DETAIL_TRIPLE_TO_OCTAL_110 6 
-#define BOOST_DETAIL_TRIPLE_TO_OCTAL_111 7 
-
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0 (0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1 (1), 
-
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00 (0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01 (0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10 (1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11 (1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00 (0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01 (0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10 (1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11 (1)(1), 
-
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000 (0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001 (0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010 (0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011 (0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100 (1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101 (1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110 (1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111 (1)(1)(1), 
-
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000 (0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001 (0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010 (0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011 (0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100 (0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101 (0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110 (0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111 (0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000 (1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001 (1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010 (1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011 (1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100 (1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101 (1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110 (1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111 (1)(1)(1)(1), 
-
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000 (0)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001 (0)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010 (0)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011 (0)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100 (0)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101 (0)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110 (0)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111 (0)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000 (0)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001 (0)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010 (0)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011 (0)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100 (0)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101 (0)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110 (0)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111 (0)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000 (1)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001 (1)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010 (1)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011 (1)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100 (1)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101 (1)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110 (1)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111 (1)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000 (1)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001 (1)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010 (1)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011 (1)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100 (1)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101 (1)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110 (1)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111 (1)(1)(1)(1)(1), 
-
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000000 (0)(0)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000001 (0)(0)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000010 (0)(0)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000011 (0)(0)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000100 (0)(0)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000101 (0)(0)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000110 (0)(0)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000111 (0)(0)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001000 (0)(0)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001001 (0)(0)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001010 (0)(0)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001011 (0)(0)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001100 (0)(0)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001101 (0)(0)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001110 (0)(0)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001111 (0)(0)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010000 (0)(1)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010001 (0)(1)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010010 (0)(1)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010011 (0)(1)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010100 (0)(1)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010101 (0)(1)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010110 (0)(1)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010111 (0)(1)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011000 (0)(1)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011001 (0)(1)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011010 (0)(1)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011011 (0)(1)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011100 (0)(1)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011101 (0)(1)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011110 (0)(1)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011111 (0)(1)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100000 (1)(0)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100001 (1)(0)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100010 (1)(0)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100011 (1)(0)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100100 (1)(0)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100101 (1)(0)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100110 (1)(0)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100111 (1)(0)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101000 (1)(0)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101001 (1)(0)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101010 (1)(0)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101011 (1)(0)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101100 (1)(0)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101101 (1)(0)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101110 (1)(0)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101111 (1)(0)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110000 (1)(1)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110001 (1)(1)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110010 (1)(1)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110011 (1)(1)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110100 (1)(1)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110101 (1)(1)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110110 (1)(1)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110111 (1)(1)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111000 (1)(1)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111001 (1)(1)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111010 (1)(1)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111011 (1)(1)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111100 (1)(1)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111101 (1)(1)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111110 (1)(1)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111111 (1)(1)(1)(1)(1)(1), 
-
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000000 (0)(0)(0)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000001 (0)(0)(0)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000010 (0)(0)(0)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000011 (0)(0)(0)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000100 (0)(0)(0)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000101 (0)(0)(0)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000110 (0)(0)(0)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000111 (0)(0)(0)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001000 (0)(0)(0)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001001 (0)(0)(0)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001010 (0)(0)(0)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001011 (0)(0)(0)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001100 (0)(0)(0)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001101 (0)(0)(0)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001110 (0)(0)(0)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001111 (0)(0)(0)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010000 (0)(0)(1)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010001 (0)(0)(1)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010010 (0)(0)(1)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010011 (0)(0)(1)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010100 (0)(0)(1)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010101 (0)(0)(1)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010110 (0)(0)(1)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010111 (0)(0)(1)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011000 (0)(0)(1)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011001 (0)(0)(1)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011010 (0)(0)(1)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011011 (0)(0)(1)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011100 (0)(0)(1)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011101 (0)(0)(1)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011110 (0)(0)(1)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011111 (0)(0)(1)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100000 (0)(1)(0)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100001 (0)(1)(0)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100010 (0)(1)(0)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100011 (0)(1)(0)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100100 (0)(1)(0)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100101 (0)(1)(0)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100110 (0)(1)(0)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100111 (0)(1)(0)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101000 (0)(1)(0)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101001 (0)(1)(0)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101010 (0)(1)(0)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101011 (0)(1)(0)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101100 (0)(1)(0)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101101 (0)(1)(0)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101110 (0)(1)(0)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101111 (0)(1)(0)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110000 (0)(1)(1)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110001 (0)(1)(1)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110010 (0)(1)(1)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110011 (0)(1)(1)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110100 (0)(1)(1)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110101 (0)(1)(1)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110110 (0)(1)(1)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110111 (0)(1)(1)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111000 (0)(1)(1)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111001 (0)(1)(1)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111010 (0)(1)(1)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111011 (0)(1)(1)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111100 (0)(1)(1)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111101 (0)(1)(1)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111110 (0)(1)(1)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111111 (0)(1)(1)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000000 (1)(0)(0)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000001 (1)(0)(0)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000010 (1)(0)(0)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000011 (1)(0)(0)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000100 (1)(0)(0)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000101 (1)(0)(0)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000110 (1)(0)(0)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000111 (1)(0)(0)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001000 (1)(0)(0)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001001 (1)(0)(0)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001010 (1)(0)(0)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001011 (1)(0)(0)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001100 (1)(0)(0)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001101 (1)(0)(0)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001110 (1)(0)(0)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001111 (1)(0)(0)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010000 (1)(0)(1)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010001 (1)(0)(1)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010010 (1)(0)(1)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010011 (1)(0)(1)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010100 (1)(0)(1)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010101 (1)(0)(1)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010110 (1)(0)(1)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010111 (1)(0)(1)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011000 (1)(0)(1)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011001 (1)(0)(1)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011010 (1)(0)(1)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011011 (1)(0)(1)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011100 (1)(0)(1)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011101 (1)(0)(1)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011110 (1)(0)(1)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011111 (1)(0)(1)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100000 (1)(1)(0)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100001 (1)(1)(0)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100010 (1)(1)(0)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100011 (1)(1)(0)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100100 (1)(1)(0)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100101 (1)(1)(0)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100110 (1)(1)(0)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100111 (1)(1)(0)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101000 (1)(1)(0)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101001 (1)(1)(0)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101010 (1)(1)(0)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101011 (1)(1)(0)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101100 (1)(1)(0)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101101 (1)(1)(0)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101110 (1)(1)(0)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101111 (1)(1)(0)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110000 (1)(1)(1)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110001 (1)(1)(1)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110010 (1)(1)(1)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110011 (1)(1)(1)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110100 (1)(1)(1)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110101 (1)(1)(1)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110110 (1)(1)(1)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110111 (1)(1)(1)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111000 (1)(1)(1)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111001 (1)(1)(1)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111010 (1)(1)(1)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111011 (1)(1)(1)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111100 (1)(1)(1)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111101 (1)(1)(1)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111110 (1)(1)(1)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111111 (1)(1)(1)(1)(1)(1)(1), 
-
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000000 (0)(0)(0)(0)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000001 (0)(0)(0)(0)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000010 (0)(0)(0)(0)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000011 (0)(0)(0)(0)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000100 (0)(0)(0)(0)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000101 (0)(0)(0)(0)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000110 (0)(0)(0)(0)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000111 (0)(0)(0)(0)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001000 (0)(0)(0)(0)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001001 (0)(0)(0)(0)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001010 (0)(0)(0)(0)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001011 (0)(0)(0)(0)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001100 (0)(0)(0)(0)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001101 (0)(0)(0)(0)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001110 (0)(0)(0)(0)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001111 (0)(0)(0)(0)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010000 (0)(0)(0)(1)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010001 (0)(0)(0)(1)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010010 (0)(0)(0)(1)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010011 (0)(0)(0)(1)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010100 (0)(0)(0)(1)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010101 (0)(0)(0)(1)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010110 (0)(0)(0)(1)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010111 (0)(0)(0)(1)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011000 (0)(0)(0)(1)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011001 (0)(0)(0)(1)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011010 (0)(0)(0)(1)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011011 (0)(0)(0)(1)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011100 (0)(0)(0)(1)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011101 (0)(0)(0)(1)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011110 (0)(0)(0)(1)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011111 (0)(0)(0)(1)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100000 (0)(0)(1)(0)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100001 (0)(0)(1)(0)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100010 (0)(0)(1)(0)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100011 (0)(0)(1)(0)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100100 (0)(0)(1)(0)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100101 (0)(0)(1)(0)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100110 (0)(0)(1)(0)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100111 (0)(0)(1)(0)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101000 (0)(0)(1)(0)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101001 (0)(0)(1)(0)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101010 (0)(0)(1)(0)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101011 (0)(0)(1)(0)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101100 (0)(0)(1)(0)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101101 (0)(0)(1)(0)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101110 (0)(0)(1)(0)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101111 (0)(0)(1)(0)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110000 (0)(0)(1)(1)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110001 (0)(0)(1)(1)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110010 (0)(0)(1)(1)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110011 (0)(0)(1)(1)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110100 (0)(0)(1)(1)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110101 (0)(0)(1)(1)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110110 (0)(0)(1)(1)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110111 (0)(0)(1)(1)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111000 (0)(0)(1)(1)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111001 (0)(0)(1)(1)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111010 (0)(0)(1)(1)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111011 (0)(0)(1)(1)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111100 (0)(0)(1)(1)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111101 (0)(0)(1)(1)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111110 (0)(0)(1)(1)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111111 (0)(0)(1)(1)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000000 (0)(1)(0)(0)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000001 (0)(1)(0)(0)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000010 (0)(1)(0)(0)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000011 (0)(1)(0)(0)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000100 (0)(1)(0)(0)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000101 (0)(1)(0)(0)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000110 (0)(1)(0)(0)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000111 (0)(1)(0)(0)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001000 (0)(1)(0)(0)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001001 (0)(1)(0)(0)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001010 (0)(1)(0)(0)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001011 (0)(1)(0)(0)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001100 (0)(1)(0)(0)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001101 (0)(1)(0)(0)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001110 (0)(1)(0)(0)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001111 (0)(1)(0)(0)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010000 (0)(1)(0)(1)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010001 (0)(1)(0)(1)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010010 (0)(1)(0)(1)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010011 (0)(1)(0)(1)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010100 (0)(1)(0)(1)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010101 (0)(1)(0)(1)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010110 (0)(1)(0)(1)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010111 (0)(1)(0)(1)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011000 (0)(1)(0)(1)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011001 (0)(1)(0)(1)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011010 (0)(1)(0)(1)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011011 (0)(1)(0)(1)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011100 (0)(1)(0)(1)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011101 (0)(1)(0)(1)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011110 (0)(1)(0)(1)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011111 (0)(1)(0)(1)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100000 (0)(1)(1)(0)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100001 (0)(1)(1)(0)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100010 (0)(1)(1)(0)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100011 (0)(1)(1)(0)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100100 (0)(1)(1)(0)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100101 (0)(1)(1)(0)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100110 (0)(1)(1)(0)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100111 (0)(1)(1)(0)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101000 (0)(1)(1)(0)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101001 (0)(1)(1)(0)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101010 (0)(1)(1)(0)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101011 (0)(1)(1)(0)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101100 (0)(1)(1)(0)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101101 (0)(1)(1)(0)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101110 (0)(1)(1)(0)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101111 (0)(1)(1)(0)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110000 (0)(1)(1)(1)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110001 (0)(1)(1)(1)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110010 (0)(1)(1)(1)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110011 (0)(1)(1)(1)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110100 (0)(1)(1)(1)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110101 (0)(1)(1)(1)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110110 (0)(1)(1)(1)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110111 (0)(1)(1)(1)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111000 (0)(1)(1)(1)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111001 (0)(1)(1)(1)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111010 (0)(1)(1)(1)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111011 (0)(1)(1)(1)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111100 (0)(1)(1)(1)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111101 (0)(1)(1)(1)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111110 (0)(1)(1)(1)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111111 (0)(1)(1)(1)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000000 (1)(0)(0)(0)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000001 (1)(0)(0)(0)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000010 (1)(0)(0)(0)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000011 (1)(0)(0)(0)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000100 (1)(0)(0)(0)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000101 (1)(0)(0)(0)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000110 (1)(0)(0)(0)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000111 (1)(0)(0)(0)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001000 (1)(0)(0)(0)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001001 (1)(0)(0)(0)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001010 (1)(0)(0)(0)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001011 (1)(0)(0)(0)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001100 (1)(0)(0)(0)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001101 (1)(0)(0)(0)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001110 (1)(0)(0)(0)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001111 (1)(0)(0)(0)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010000 (1)(0)(0)(1)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010001 (1)(0)(0)(1)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010010 (1)(0)(0)(1)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010011 (1)(0)(0)(1)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010100 (1)(0)(0)(1)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010101 (1)(0)(0)(1)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010110 (1)(0)(0)(1)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010111 (1)(0)(0)(1)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011000 (1)(0)(0)(1)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011001 (1)(0)(0)(1)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011010 (1)(0)(0)(1)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011011 (1)(0)(0)(1)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011100 (1)(0)(0)(1)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011101 (1)(0)(0)(1)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011110 (1)(0)(0)(1)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011111 (1)(0)(0)(1)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100000 (1)(0)(1)(0)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100001 (1)(0)(1)(0)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100010 (1)(0)(1)(0)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100011 (1)(0)(1)(0)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100100 (1)(0)(1)(0)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100101 (1)(0)(1)(0)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100110 (1)(0)(1)(0)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100111 (1)(0)(1)(0)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101000 (1)(0)(1)(0)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101001 (1)(0)(1)(0)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101010 (1)(0)(1)(0)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101011 (1)(0)(1)(0)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101100 (1)(0)(1)(0)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101101 (1)(0)(1)(0)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101110 (1)(0)(1)(0)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101111 (1)(0)(1)(0)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110000 (1)(0)(1)(1)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110001 (1)(0)(1)(1)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110010 (1)(0)(1)(1)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110011 (1)(0)(1)(1)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110100 (1)(0)(1)(1)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110101 (1)(0)(1)(1)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110110 (1)(0)(1)(1)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110111 (1)(0)(1)(1)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111000 (1)(0)(1)(1)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111001 (1)(0)(1)(1)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111010 (1)(0)(1)(1)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111011 (1)(0)(1)(1)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111100 (1)(0)(1)(1)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111101 (1)(0)(1)(1)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111110 (1)(0)(1)(1)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111111 (1)(0)(1)(1)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000000 (1)(1)(0)(0)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000001 (1)(1)(0)(0)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000010 (1)(1)(0)(0)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000011 (1)(1)(0)(0)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000100 (1)(1)(0)(0)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000101 (1)(1)(0)(0)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000110 (1)(1)(0)(0)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000111 (1)(1)(0)(0)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001000 (1)(1)(0)(0)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001001 (1)(1)(0)(0)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001010 (1)(1)(0)(0)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001011 (1)(1)(0)(0)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001100 (1)(1)(0)(0)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001101 (1)(1)(0)(0)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001110 (1)(1)(0)(0)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001111 (1)(1)(0)(0)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010000 (1)(1)(0)(1)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010001 (1)(1)(0)(1)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010010 (1)(1)(0)(1)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010011 (1)(1)(0)(1)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010100 (1)(1)(0)(1)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010101 (1)(1)(0)(1)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010110 (1)(1)(0)(1)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010111 (1)(1)(0)(1)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011000 (1)(1)(0)(1)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011001 (1)(1)(0)(1)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011010 (1)(1)(0)(1)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011011 (1)(1)(0)(1)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011100 (1)(1)(0)(1)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011101 (1)(1)(0)(1)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011110 (1)(1)(0)(1)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011111 (1)(1)(0)(1)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100000 (1)(1)(1)(0)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100001 (1)(1)(1)(0)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100010 (1)(1)(1)(0)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100011 (1)(1)(1)(0)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100100 (1)(1)(1)(0)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100101 (1)(1)(1)(0)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100110 (1)(1)(1)(0)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100111 (1)(1)(1)(0)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101000 (1)(1)(1)(0)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101001 (1)(1)(1)(0)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101010 (1)(1)(1)(0)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101011 (1)(1)(1)(0)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101100 (1)(1)(1)(0)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101101 (1)(1)(1)(0)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101110 (1)(1)(1)(0)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101111 (1)(1)(1)(0)(1)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110000 (1)(1)(1)(1)(0)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110001 (1)(1)(1)(1)(0)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110010 (1)(1)(1)(1)(0)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110011 (1)(1)(1)(1)(0)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110100 (1)(1)(1)(1)(0)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110101 (1)(1)(1)(1)(0)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110110 (1)(1)(1)(1)(0)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110111 (1)(1)(1)(1)(0)(1)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111000 (1)(1)(1)(1)(1)(0)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111001 (1)(1)(1)(1)(1)(0)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111010 (1)(1)(1)(1)(1)(0)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111011 (1)(1)(1)(1)(1)(0)(1)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111100 (1)(1)(1)(1)(1)(1)(0)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111101 (1)(1)(1)(1)(1)(1)(0)(1), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111110 (1)(1)(1)(1)(1)(1)(1)(0), 
-#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111111 (1)(1)(1)(1)(1)(1)(1)(1), 
-
-#endif
diff --git a/ext/boost/utility/declval.hpp b/ext/boost/utility/declval.hpp
new file mode 100644
index 0000000..d74610c
--- /dev/null
+++ b/ext/boost/utility/declval.hpp
@@ -0,0 +1,49 @@
+//  common_type.hpp  ---------------------------------------------------------//
+
+//  Copyright 2010 Vicente J. Botet Escriba
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+#ifndef BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP
+#define BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP
+
+#include <boost/config.hpp>
+
+//----------------------------------------------------------------------------//
+
+#include <boost/type_traits/add_rvalue_reference.hpp>
+//#include <boost/type_traits/add_lvalue_reference.hpp>
+
+//----------------------------------------------------------------------------//
+//                                                                            //
+//                           C++03 implementation of                          //
+//                          Written by Vicente J. Botet Escriba               //
+//~ 20.3.4 Function template declval [declval]
+//~ 1 The library provides the function template declval to simplify the definition of expressions which occur as
+//~ unevaluated operands.
+//~ 2 Remarks: If this function is used, the program is ill-formed.
+//~ 3 Remarks: The template parameter T of declval may be an incomplete type.
+//~ [ Example:
+
+//~ template <class To, class From>
+//~ decltype(static_cast<To>(declval<From>())) convert(From&&);
+
+//~ declares a function template convert which only participats in overloading if the type From can be
+//~ explicitly converted to type To. For another example see class template common_type (20.7.6.6). �end
+//~ example ]
+//                                                                            //
+//----------------------------------------------------------------------------//
+
+namespace boost {
+
+//#if !defined(BOOST_NO_RVALUE_REFERENCES)
+    template <typename T>
+    typename add_rvalue_reference<T>::type declval() BOOST_NOEXCEPT; // as unevaluated operand
+//#else
+//    template <typename T>
+//    typename add_lvalue_reference<T>::type declval() BOOST_NOEXCEPT; // as unevaluated operand
+//#endif
+}  // namespace boost
+
+#endif  // BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP
diff --git a/ext/boost/utility/detail/in_place_factory_prefix.hpp b/ext/boost/utility/detail/in_place_factory_prefix.hpp
new file mode 100644
index 0000000..afd76b5
--- /dev/null
+++ b/ext/boost/utility/detail/in_place_factory_prefix.hpp
@@ -0,0 +1,36 @@
+// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
+// Copyright (C) 2007, Tobias Schwinger.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  fernando_cacciola at hotmail.com
+//
+#ifndef BOOST_UTILITY_DETAIL_INPLACE_FACTORY_PREFIX_04APR2007_HPP
+#define BOOST_UTILITY_DETAIL_INPLACE_FACTORY_PREFIX_04APR2007_HPP
+
+#include <new>
+#include <cstddef>
+#include <boost/config.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/punctuation/paren.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+
+#define BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_INIT(z,n,_) BOOST_PP_CAT(m_a,n) BOOST_PP_LPAREN() BOOST_PP_CAT(a,n) BOOST_PP_RPAREN()
+#define BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_DECL(z,n,_) BOOST_PP_CAT(A,n) const& BOOST_PP_CAT(m_a,n);
+
+#define BOOST_MAX_INPLACE_FACTORY_ARITY 10
+
+#undef BOOST_UTILITY_DETAIL_INPLACE_FACTORY_SUFFIX_04APR2007_HPP
+
+#endif
+
diff --git a/ext/boost/utility/detail/in_place_factory_suffix.hpp b/ext/boost/utility/detail/in_place_factory_suffix.hpp
new file mode 100644
index 0000000..58f48c7
--- /dev/null
+++ b/ext/boost/utility/detail/in_place_factory_suffix.hpp
@@ -0,0 +1,23 @@
+// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
+// Copyright (C) 2007, Tobias Schwinger.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  fernando_cacciola at hotmail.com
+//
+#ifndef BOOST_UTILITY_DETAIL_INPLACE_FACTORY_SUFFIX_04APR2007_HPP
+#define BOOST_UTILITY_DETAIL_INPLACE_FACTORY_SUFFIX_04APR2007_HPP
+
+#undef BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_INIT
+#undef BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_DECL
+#undef BOOST_MAX_INPLACE_FACTORY_ARITY
+
+#undef BOOST_UTILITY_DETAIL_INPLACE_FACTORY_PREFIX_04APR2007_HPP
+
+#endif
+
diff --git a/ext/boost/utility/detail/result_of_iterate.hpp b/ext/boost/utility/detail/result_of_iterate.hpp
new file mode 100644
index 0000000..17fd4d5
--- /dev/null
+++ b/ext/boost/utility/detail/result_of_iterate.hpp
@@ -0,0 +1,208 @@
+// Boost result_of library
+
+//  Copyright Douglas Gregor 2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  Copyright Daniel Walker, Eric Niebler, Michel Morin 2008-2012.
+//  Use, modification and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or
+//  copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://www.boost.org/libs/utility
+#if !defined(BOOST_PP_IS_ITERATING)
+# error Boost result_of - do not include this file!
+#endif
+
+// CWPro8 requires an argument in a function type specialization
+#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3002)) && BOOST_PP_ITERATION() == 0
+# define BOOST_RESULT_OF_ARGS void
+#else
+# define BOOST_RESULT_OF_ARGS BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)
+#endif
+
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
+template<typename F BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(),typename T)>
+struct tr1_result_of<F(BOOST_RESULT_OF_ARGS)>
+    : mpl::if_<
+          mpl::or_< is_pointer<F>, is_member_function_pointer<F> >
+        , boost::detail::tr1_result_of_impl<
+            typename remove_cv<F>::type,
+            typename remove_cv<F>::type(BOOST_RESULT_OF_ARGS),
+            (boost::detail::has_result_type<F>::value)>
+        , boost::detail::tr1_result_of_impl<
+            F,
+            F(BOOST_RESULT_OF_ARGS),
+            (boost::detail::has_result_type<F>::value)> >::type { };
+#endif
+
+#ifdef BOOST_RESULT_OF_USE_DECLTYPE
+
+// Uses declval following N3225 20.7.7.6 when F is not a pointer.
+template<typename F BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(),typename T)>
+struct result_of<F(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T))>
+    : mpl::if_<
+          is_member_function_pointer<F>
+        , detail::tr1_result_of_impl<
+            typename remove_cv<F>::type,
+            typename remove_cv<F>::type(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), false
+          >
+        , detail::cpp0x_result_of_impl<
+              F(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T))
+          >
+      >::type
+{};
+
+namespace detail {
+
+#ifdef BOOST_NO_SFINAE_EXPR
+
+template<typename F>
+struct BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION());
+
+template<typename R BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), typename T)>
+struct BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION())<R(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), T))> {
+    R operator()(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), T)) const;
+    typedef result_of_private_type const &(*pfn_t)(...);
+    operator pfn_t() const volatile;
+};
+
+template<typename F>
+struct BOOST_PP_CAT(result_of_callable_fun_, BOOST_PP_ITERATION());
+
+template<typename F>
+struct BOOST_PP_CAT(result_of_callable_fun_, BOOST_PP_ITERATION())<F *>
+  : BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION())<F>
+{};
+
+template<typename F>
+struct BOOST_PP_CAT(result_of_callable_fun_, BOOST_PP_ITERATION())<F &>
+  : BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION())<F>
+{};
+
+template<typename F>
+struct BOOST_PP_CAT(result_of_select_call_wrapper_type_, BOOST_PP_ITERATION())
+  : mpl::eval_if<
+        is_class<typename remove_reference<F>::type>,
+        result_of_wrap_callable_class<F>,
+        mpl::identity<BOOST_PP_CAT(result_of_callable_fun_, BOOST_PP_ITERATION())<typename remove_cv<F>::type> >
+    >
+{};
+
+template<typename F BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), typename T)>
+struct BOOST_PP_CAT(result_of_is_callable_, BOOST_PP_ITERATION()) {
+    typedef typename BOOST_PP_CAT(result_of_select_call_wrapper_type_, BOOST_PP_ITERATION())<F>::type wrapper_t;
+    static const bool value = (
+        sizeof(result_of_no_type) == sizeof(detail::result_of_is_private_type(
+            (boost::declval<wrapper_t>()(BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), boost::declval<T, >() BOOST_PP_INTERCEPT)), result_of_weird_type())
+        ))
+    );
+    typedef mpl::bool_<value> type;
+};
+
+template<typename F BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(),typename T)>
+struct cpp0x_result_of_impl<F(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), true>
+    : lazy_enable_if<
+          BOOST_PP_CAT(result_of_is_callable_, BOOST_PP_ITERATION())<F BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), T)>
+        , cpp0x_result_of_impl<F(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), false>
+      >
+{};
+
+template<typename F BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(),typename T)>
+struct cpp0x_result_of_impl<F(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), false>
+{
+  typedef decltype(
+    boost::declval<F>()(
+      BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), boost::declval<T, >() BOOST_PP_INTERCEPT)
+    )
+  ) type;
+};
+
+#else // BOOST_NO_SFINAE_EXPR
+
+template<typename F BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(),typename T)>
+struct cpp0x_result_of_impl<F(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)),
+                            typename result_of_always_void<decltype(
+                                boost::declval<F>()(
+                                    BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), boost::declval<T, >() BOOST_PP_INTERCEPT)
+                                )
+                            )>::type> {
+  typedef decltype(
+    boost::declval<F>()(
+      BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), boost::declval<T, >() BOOST_PP_INTERCEPT)
+    )
+  ) type;
+};
+
+#endif // BOOST_NO_SFINAE_EXPR
+
+} // namespace detail
+
+#else // defined(BOOST_RESULT_OF_USE_DECLTYPE)
+
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
+template<typename F BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(),typename T)>
+struct result_of<F(BOOST_RESULT_OF_ARGS)>
+    : tr1_result_of<F(BOOST_RESULT_OF_ARGS)> { };
+#endif
+
+#endif // defined(BOOST_RESULT_OF_USE_DECLTYPE)
+
+#undef BOOST_RESULT_OF_ARGS
+
+#if BOOST_PP_ITERATION() >= 1
+
+namespace detail {
+
+template<typename R,  typename FArgs BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(),typename T)>
+struct tr1_result_of_impl<R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), FArgs, false>
+{
+  typedef R type;
+};
+
+template<typename R,  typename FArgs BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(),typename T)>
+struct tr1_result_of_impl<R (&)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), FArgs, false>
+{
+  typedef R type;
+};
+
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
+template<typename R, typename FArgs BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(),typename T)>
+struct tr1_result_of_impl<R (T0::*)
+                     (BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_ITERATION(),T)),
+                 FArgs, false>
+{
+  typedef R type;
+};
+
+template<typename R, typename FArgs BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(),typename T)>
+struct tr1_result_of_impl<R (T0::*)
+                     (BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_ITERATION(),T))
+                     const,
+                 FArgs, false>
+{
+  typedef R type;
+};
+
+template<typename R, typename FArgs BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(),typename T)>
+struct tr1_result_of_impl<R (T0::*)
+                     (BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_ITERATION(),T))
+                     volatile,
+                 FArgs, false>
+{
+  typedef R type;
+};
+
+template<typename R, typename FArgs BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(),typename T)>
+struct tr1_result_of_impl<R (T0::*)
+                     (BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_ITERATION(),T))
+                     const volatile,
+                 FArgs, false>
+{
+  typedef R type;
+};
+#endif
+
+}
+#endif
diff --git a/ext/boost/utility/in_place_factory.hpp b/ext/boost/utility/in_place_factory.hpp
new file mode 100644
index 0000000..f84b003
--- /dev/null
+++ b/ext/boost/utility/in_place_factory.hpp
@@ -0,0 +1,88 @@
+// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
+// Copyright (C) 2007, Tobias Schwinger.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  fernando_cacciola at hotmail.com
+//
+#ifndef BOOST_UTILITY_INPLACE_FACTORY_04APR2007_HPP
+#ifndef BOOST_PP_IS_ITERATING
+
+#include <boost/utility/detail/in_place_factory_prefix.hpp>
+
+namespace boost {
+
+class in_place_factory_base {} ;
+
+#define  BOOST_PP_ITERATION_LIMITS (0, BOOST_MAX_INPLACE_FACTORY_ARITY)
+#define  BOOST_PP_FILENAME_1 <boost/utility/in_place_factory.hpp>
+#include BOOST_PP_ITERATE()
+
+} // namespace boost
+
+#include <boost/utility/detail/in_place_factory_suffix.hpp>
+
+#define BOOST_UTILITY_INPLACE_FACTORY_04APR2007_HPP
+#else
+#define N BOOST_PP_ITERATION()
+
+#if N
+template< BOOST_PP_ENUM_PARAMS(N, class A) >
+#endif
+class BOOST_PP_CAT(in_place_factory,N)
+  : 
+  public in_place_factory_base
+{
+public:
+
+  explicit BOOST_PP_CAT(in_place_factory,N)
+      ( BOOST_PP_ENUM_BINARY_PARAMS(N,A,const& a) )
+#if N > 0
+    : BOOST_PP_ENUM(N, BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_INIT, _)
+#endif
+  {}
+
+  template<class T>
+  void* apply(void* address
+      BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) const
+  {
+    return new(address) T( BOOST_PP_ENUM_PARAMS(N, m_a) );
+  }
+
+  template<class T>
+  void* apply(void* address, std::size_t n
+      BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) const
+  {
+    for(char* next = address = this->BOOST_NESTED_TEMPLATE apply<T>(address);
+        !! --n;)
+      this->BOOST_NESTED_TEMPLATE apply<T>(next = next+sizeof(T));
+    return address; 
+  }
+
+  BOOST_PP_REPEAT(N, BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_DECL, _)
+};
+
+#if N > 0
+template< BOOST_PP_ENUM_PARAMS(N, class A) >
+inline BOOST_PP_CAT(in_place_factory,N)< BOOST_PP_ENUM_PARAMS(N, A) >
+in_place( BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& a) )
+{
+  return BOOST_PP_CAT(in_place_factory,N)< BOOST_PP_ENUM_PARAMS(N, A) >
+      ( BOOST_PP_ENUM_PARAMS(N, a) );
+}
+#else
+inline in_place_factory0 in_place()
+{
+  return in_place_factory0();
+}
+#endif
+
+#undef N
+#endif
+#endif
+
diff --git a/ext/boost/utility/result_of.hpp b/ext/boost/utility/result_of.hpp
new file mode 100644
index 0000000..f0e084a
--- /dev/null
+++ b/ext/boost/utility/result_of.hpp
@@ -0,0 +1,187 @@
+// Boost result_of library
+
+//  Copyright Douglas Gregor 2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://www.boost.org/libs/utility
+#ifndef BOOST_RESULT_OF_HPP
+#define BOOST_RESULT_OF_HPP
+
+#include <boost/config.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+#include <boost/preprocessor/facilities/intercept.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/type_traits/is_class.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_member_function_pointer.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/utility/declval.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#ifndef BOOST_RESULT_OF_NUM_ARGS
+#  define BOOST_RESULT_OF_NUM_ARGS 16
+#endif
+
+// Use the decltype-based version of result_of by default if the compiler
+// supports N3276 <http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2011/n3276.pdf>.
+// The user can force the choice by defining either BOOST_RESULT_OF_USE_DECLTYPE or
+// BOOST_RESULT_OF_USE_TR1, but not both!
+#if defined(BOOST_RESULT_OF_USE_DECLTYPE) && defined(BOOST_RESULT_OF_USE_TR1)
+#  error Both BOOST_RESULT_OF_USE_DECLTYPE and BOOST_RESULT_OF_USE_TR1 cannot be defined at the same time.
+#endif
+
+#ifndef BOOST_RESULT_OF_USE_TR1
+#  ifndef BOOST_RESULT_OF_USE_DECLTYPE
+#    ifndef BOOST_NO_DECLTYPE_N3276 // this implies !defined(BOOST_NO_DECLTYPE)
+#      define BOOST_RESULT_OF_USE_DECLTYPE
+#    else
+#      define BOOST_RESULT_OF_USE_TR1
+#    endif
+#  endif
+#endif
+
+namespace boost {
+
+template<typename F> struct result_of;
+template<typename F> struct tr1_result_of; // a TR1-style implementation of result_of
+
+#if !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+namespace detail {
+
+BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type)
+
+template<typename F, typename FArgs, bool HasResultType> struct tr1_result_of_impl;
+
+#ifdef BOOST_NO_SFINAE_EXPR
+
+struct result_of_private_type {};
+
+struct result_of_weird_type {
+  friend result_of_private_type operator,(result_of_private_type, result_of_weird_type);
+};
+
+typedef char result_of_yes_type;      // sizeof(result_of_yes_type) == 1
+typedef char (&result_of_no_type)[2]; // sizeof(result_of_no_type)  == 2
+
+template<typename T>
+result_of_no_type result_of_is_private_type(T const &);
+result_of_yes_type result_of_is_private_type(result_of_private_type);
+
+template<typename C>
+struct result_of_callable_class : C {
+    result_of_callable_class();
+    typedef result_of_private_type const &(*pfn_t)(...);
+    operator pfn_t() const volatile;
+};
+
+template<typename C>
+struct result_of_wrap_callable_class {
+  typedef result_of_callable_class<C> type;
+};
+
+template<typename C>
+struct result_of_wrap_callable_class<C const> {
+  typedef result_of_callable_class<C> const type;
+};
+
+template<typename C>
+struct result_of_wrap_callable_class<C volatile> {
+  typedef result_of_callable_class<C> volatile type;
+};
+
+template<typename C>
+struct result_of_wrap_callable_class<C const volatile> {
+  typedef result_of_callable_class<C> const volatile type;
+};
+
+template<typename C>
+struct result_of_wrap_callable_class<C &> {
+  typedef typename result_of_wrap_callable_class<C>::type &type;
+};
+
+template<typename F, bool TestCallability = true> struct cpp0x_result_of_impl;
+
+#else // BOOST_NO_SFINAE_EXPR
+
+template<typename T>
+struct result_of_always_void
+{
+  typedef void type;
+};
+
+template<typename F, typename Enable = void> struct cpp0x_result_of_impl {};
+
+#endif // BOOST_NO_SFINAE_EXPR
+
+template<typename F>
+struct result_of_void_impl
+{
+  typedef void type;
+};
+
+template<typename R>
+struct result_of_void_impl<R (*)(void)>
+{
+  typedef R type;
+};
+
+template<typename R>
+struct result_of_void_impl<R (&)(void)>
+{
+  typedef R type;
+};
+
+// Determine the return type of a function pointer or pointer to member.
+template<typename F, typename FArgs>
+struct result_of_pointer
+  : tr1_result_of_impl<typename remove_cv<F>::type, FArgs, false> { };
+
+template<typename F, typename FArgs>
+struct tr1_result_of_impl<F, FArgs, true>
+{
+  typedef typename F::result_type type;
+};
+
+template<typename FArgs>
+struct is_function_with_no_args : mpl::false_ {};
+
+template<typename F>
+struct is_function_with_no_args<F(void)> : mpl::true_ {};
+
+template<typename F, typename FArgs>
+struct result_of_nested_result : F::template result<FArgs>
+{};
+
+template<typename F, typename FArgs>
+struct tr1_result_of_impl<F, FArgs, false>
+  : mpl::if_<is_function_with_no_args<FArgs>,
+             result_of_void_impl<F>,
+             result_of_nested_result<F, FArgs> >::type
+{};
+
+} // end namespace detail
+
+#define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_RESULT_OF_NUM_ARGS,<boost/utility/detail/result_of_iterate.hpp>))
+#include BOOST_PP_ITERATE()
+
+#else
+#  define BOOST_NO_RESULT_OF 1
+#endif
+
+}
+
+#endif // BOOST_RESULT_OF_HPP
diff --git a/ext/boost/utility/swap.hpp b/ext/boost/utility/swap.hpp
new file mode 100644
index 0000000..6845e79
--- /dev/null
+++ b/ext/boost/utility/swap.hpp
@@ -0,0 +1,55 @@
+// Copyright (C) 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// For more information, see http://www.boost.org
+
+
+#ifndef BOOST_UTILITY_SWAP_HPP
+#define BOOST_UTILITY_SWAP_HPP
+
+// Note: the implementation of this utility contains various workarounds:
+// - swap_impl is put outside the boost namespace, to avoid infinite
+// recursion (causing stack overflow) when swapping objects of a primitive
+// type.
+// - swap_impl has a using-directive, rather than a using-declaration,
+// because some compilers (including MSVC 7.1, Borland 5.9.3, and
+// Intel 8.1) don't do argument-dependent lookup when it has a
+// using-declaration instead.
+// - boost::swap has two template arguments, instead of one, to
+// avoid ambiguity when swapping objects of a Boost type that does
+// not have its own boost::swap overload.
+
+#include <algorithm> //for std::swap
+#include <cstddef> //for std::size_t
+
+namespace boost_swap_impl
+{
+  template<class T>
+  void swap_impl(T& left, T& right)
+  {
+    using namespace std;//use std::swap if argument dependent lookup fails
+    swap(left,right);
+  }
+
+  template<class T, std::size_t N>
+  void swap_impl(T (& left)[N], T (& right)[N])
+  {
+    for (std::size_t i = 0; i < N; ++i)
+    {
+      ::boost_swap_impl::swap_impl(left[i], right[i]);
+    }
+  }
+}
+
+namespace boost
+{
+  template<class T1, class T2>
+  void swap(T1& left, T2& right)
+  {
+    ::boost_swap_impl::swap_impl(left, right);
+  }
+}
+
+#endif
diff --git a/ext/boost/version.hpp b/ext/boost/version.hpp
new file mode 100644
index 0000000..00d6ab8
--- /dev/null
+++ b/ext/boost/version.hpp
@@ -0,0 +1,32 @@
+//  Boost version.hpp configuration header file  ------------------------------//
+
+//  (C) Copyright John maddock 1999. Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/config for documentation
+
+#ifndef BOOST_VERSION_HPP
+#define BOOST_VERSION_HPP
+
+//
+//  Caution, this is the only boost header that is guarenteed
+//  to change with every boost release, including this header
+//  will cause a recompile every time a new boost version is
+//  released.
+//
+//  BOOST_VERSION % 100 is the patch level
+//  BOOST_VERSION / 100 % 1000 is the minor version
+//  BOOST_VERSION / 100000 is the major version
+
+#define BOOST_VERSION 105200
+
+//
+//  BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
+//  but as a *string* in the form "x_y[_z]" where x is the major version
+//  number, y is the minor version number, and z is the patch level if not 0.
+//  This is used by <config/auto_link.hpp> to select which library version to link to.
+
+#define BOOST_LIB_VERSION "1_52"
+
+#endif
diff --git a/ext/common/AbstractSpawnManager.h b/ext/common/AbstractSpawnManager.h
deleted file mode 100644
index 605d209..0000000
--- a/ext/common/AbstractSpawnManager.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_ABSTRACT_SPAWN_MANAGER_H_
-#define _PASSENGER_ABSTRACT_SPAWN_MANAGER_H_
-
-#include <string>
-
-#include <boost/shared_ptr.hpp>
-
-#include <unistd.h>
-
-#include "Process.h"
-#include "PoolOptions.h"
-
-namespace Passenger {
-
-using namespace std;
-using namespace boost;
-
-/**
- * @brief Spawning of application processes.
- *
- * An AbstractSpawnManager is responsible for spawning new application processes.
- * Use the spawn() method to do so. AbstractSpawnManager is guaranteed to be thread-safe.
- *
- * AbstractSpawnManager is just an interface. There are two concrete implementations,
- * namely SpawnManager and StubSpawnManager. The former is the one that's usually used,
- * while the latter exists for unit testing purposes.
- *
- * @ingroup Support
- */
-class AbstractSpawnManager {
-public:
-	virtual ~AbstractSpawnManager() { }
-	
-	/**
-	 * Spawn a new application process. Spawning details are to be passed
-	 * via the <tt>options</tt> argument.
-	 *
-	 * If the spawn server died during the spawning process, then the server
-	 * will be automatically restarted, and another spawn attempt will be made.
-	 * If restarting the server fails, or if the second spawn attempt fails,
-	 * then an exception will be thrown.
-	 *
-	 * @param options An object containing the details for this spawn operation,
-	 *                such as which application to spawn. See PoolOptions for details.
-	 * @return A smart pointer to a Process object, which represents the application
-	 *         process that has been spawned. Use this object to communicate with the
-	 *         spawned process.
-	 * @throws SpawnException Something went wrong.
-	 * @throws boost::thread_interrupted
-	 * @throws Anything thrown by options.environmentVariables->getItems().
-	 */
-	virtual ProcessPtr spawn(const PoolOptions &options) = 0;
-	
-	/**
-	 * Shutdown the ApplicationSpawner server that's running at the given
-	 * application root. This method should be called when it's time to reload
-	 * an application.
-	 *
-	 * @throws SystemException Unable to communicate with the spawn server,
-	 *         even after a restart.
-	 * @throws SpawnException The spawn server died unexpectedly, and a
-	 *         restart was attempted, but it failed.
-	 */
-	virtual void reload(const string &appRoot) = 0;
-	
-	/**
-	 * Forcefully kill the spawn server. This AbstractSpawnManager's state will
-	 * not be modified, so that it won't know that the spawn server is killed
-	 * until next time it sends a command to it.
-	 *
-	 * Used within unit tests.
-	 */
-	virtual void killSpawnServer() const = 0;
-	
-	/**
-	 * Returns the spawn server's PID. Used within unit tests.
-	 */
-	virtual pid_t getServerPid() const = 0;
-};
-
-/** Convenient alias for AbstractSpawnManager smart pointer. */
-typedef shared_ptr<AbstractSpawnManager> AbstractSpawnManagerPtr;
-
-} // namespace Passenger
-
-#endif /* _PASSENGER_ABSTRACT_SPAWN_MANAGER_H_ */
diff --git a/ext/common/Account.h b/ext/common/Account.h
index 8b5409f..e289f7b 100644
--- a/ext/common/Account.h
+++ b/ext/common/Account.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -62,19 +62,16 @@ public:
 		ALL                       = ~0,
 		NONE                      = 0,
 		
-		// ApplicationPool::Server rights.
-		GET                       = 1 << 0,
-		CLEAR                     = 1 << 1,
-		DETACH                    = 1 << 2,
-		GET_PARAMETERS            = 1 << 3,
-		SET_PARAMETERS            = 1 << 4,
-		INSPECT_BASIC_INFO        = 1 << 5,
-		INSPECT_SENSITIVE_INFO    = 1 << 6,
-		//INSPECT_BACKEND_ADDRESSES = 1 << 6,
-		//INSPECT_DETACH_KEYS       = 1 << 7,
+		// HelperAgent ApplicationPool rights.
+		CLEAR                     = 1 << 0,
+		DETACH                    = 1 << 1,
+		SET_PARAMETERS            = 1 << 2,
+		INSPECT_BASIC_INFO        = 1 << 3,
+		INSPECT_SENSITIVE_INFO    = 1 << 4,
 		
-		// BacktracesServer rights.
-		INSPECT_BACKTRACES        = 1 << 8,
+		// HelperAgent admin rights.
+		INSPECT_REQUESTS          = 1 << 8,
+		INSPECT_BACKTRACES        = 1 << 9,
 		
 		// Other rights.
 		EXIT                      = 1 << 31
@@ -102,14 +99,10 @@ public:
 			} else if (*it == "none") {
 				result = NONE;
 			
-			} else if (*it == "get") {
-				result |= GET;
 			} else if (*it == "clear") {
 				result |= CLEAR;
 			} else if (*it == "detach") {
 				result |= DETACH;
-			} else if (*it == "get_parameters") {
-				result |= GET_PARAMETERS;
 			} else if (*it == "set_parameters") {
 				result |= SET_PARAMETERS;
 			} else if (*it == "inspect_basic_info") {
@@ -117,6 +110,8 @@ public:
 			} else if (*it == "inspect_sensitive_info") {
 				result |= INSPECT_SENSITIVE_INFO;
 			
+			} else if (*it == "inspect_requests") {
+				result |= INSPECT_REQUESTS;
 			} else if (*it == "inspect_backtraces") {
 				result |= INSPECT_BACKTRACES;
 				
diff --git a/ext/common/AccountsDatabase.cpp b/ext/common/AccountsDatabase.cpp
deleted file mode 100644
index 7e8bdf8..0000000
--- a/ext/common/AccountsDatabase.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <grp.h>
-#include "AccountsDatabase.h"
-#include "RandomGenerator.h"
-#include "Exceptions.h"
-#include "Constants.h"
-#include "Utils.h"
-
-namespace Passenger {
-
-AccountsDatabasePtr
-AccountsDatabase::createDefault(const ServerInstanceDir::GenerationPtr &generation,
-                                bool userSwitching, const string &defaultUser,
-                                const string &defaultGroup)
-{
-	AccountsDatabasePtr database(new AccountsDatabase());
-	struct passwd *defaultUserEntry;
-	struct group  *defaultGroupEntry;
-	uid_t defaultUid;
-	gid_t defaultGid;
-	RandomGenerator random;
-	string passengerStatusPassword = random.generateByteString(MESSAGE_SERVER_MAX_PASSWORD_SIZE);
-	
-	defaultUserEntry = getpwnam(defaultUser.c_str());
-	if (defaultUserEntry == NULL) {
-		throw NonExistentUserException("Default user '" + defaultUser +
-			"' does not exist.");
-	}
-	defaultUid = defaultUserEntry->pw_uid;
-	defaultGroupEntry = getgrnam(defaultGroup.c_str());
-	if (defaultGroupEntry == NULL) {
-		throw NonExistentGroupException("Default group '" + defaultGroup +
-			"' does not exist.");
-	}
-	defaultGid = defaultGroupEntry->gr_gid;
-	
-	// An account for the 'passenger-status' command. Its password is only readable by
-	// root, or (if user switching is turned off) only by the web server's user.
-	database->add("_passenger-status", passengerStatusPassword, false,
-		Account::INSPECT_BASIC_INFO | Account::INSPECT_SENSITIVE_INFO |
-		Account::INSPECT_BACKTRACES);
-	if (geteuid() == 0 && !userSwitching) {
-		createFile(generation->getPath() + "/passenger-status-password.txt",
-			passengerStatusPassword, S_IRUSR, defaultUid, defaultGid);
-	} else {
-		createFile(generation->getPath() + "/passenger-status-password.txt",
-			passengerStatusPassword, S_IRUSR | S_IWUSR);
-	}
-	
-	return database;
-}
-
-} // namespace Passenger
diff --git a/ext/common/AccountsDatabase.h b/ext/common/AccountsDatabase.h
index 8bb64b1..177fe19 100644
--- a/ext/common/AccountsDatabase.h
+++ b/ext/common/AccountsDatabase.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -51,16 +51,12 @@ private:
 	unsigned int uniqueNumber;
 	
 public:
-	static AccountsDatabasePtr createDefault(const ServerInstanceDir::GenerationPtr &generation,
-	                                         bool userSwitching, const string &defaultUser,
-	                                         const string &defaultGroup);
-	
 	AccountsDatabase() {
 		uniqueNumber = 0;
 	}
 	
 	unsigned int size() const {
-		lock_guard<boost::mutex> l(lock);
+		boost::lock_guard<boost::mutex> l(lock);
 		return (unsigned int) accounts.size();
 	}
 	
@@ -76,13 +72,13 @@ public:
 	
 	AccountPtr add(const string &username, const string &passwordOrHash, bool hashGiven, int rights = Account::ALL) {
 		AccountPtr account(new Account(username, passwordOrHash, hashGiven, rights));
-		lock_guard<boost::mutex> l(lock);
+		boost::lock_guard<boost::mutex> l(lock);
 		accounts[username] = account;
 		return account;
 	}
 	
 	const AccountPtr get(const string &username) const {
-		lock_guard<boost::mutex> l(lock);
+		boost::lock_guard<boost::mutex> l(lock);
 		map<string, AccountPtr>::const_iterator it = accounts.find(username);
 		if (it == accounts.end()) {
 			return AccountPtr();
@@ -92,7 +88,7 @@ public:
 	}
 	
 	AccountPtr authenticate(const string &username, const StaticString &userSuppliedPassword) const {
-		lock_guard<boost::mutex> l(lock);
+		boost::lock_guard<boost::mutex> l(lock);
 		map<string, AccountPtr>::const_iterator it = accounts.find(username);
 		if (it == accounts.end()) {
 			return AccountPtr();
@@ -107,7 +103,7 @@ public:
 	}
 	
 	bool remove(const string &username) {
-		lock_guard<boost::mutex> l(lock);
+		boost::lock_guard<boost::mutex> l(lock);
 		map<string, AccountPtr>::iterator it = accounts.find(username);
 		if (it == accounts.end()) {
 			return false;
@@ -118,7 +114,7 @@ public:
 	}
 	
 	unsigned int getUniqueNumber() {
-		lock_guard<boost::mutex> l(lock);
+		boost::lock_guard<boost::mutex> l(lock);
 		unsigned int result = uniqueNumber;
 		uniqueNumber++;
 		return result;
diff --git a/ext/common/AgentBase.cpp b/ext/common/AgentBase.cpp
deleted file mode 100644
index 0b4c079..0000000
--- a/ext/common/AgentBase.cpp
+++ /dev/null
@@ -1,432 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#include <oxt/system_calls.hpp>
-#include <oxt/backtrace.hpp>
-#include <sys/types.h>
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <cerrno>
-#include <fcntl.h>
-#include <unistd.h>
-#include <signal.h>
-
-#if defined(__APPLE__) || defined(__linux__)
-	#define LIBC_HAS_BACKTRACE_FUNC
-#endif
-#ifdef LIBC_HAS_BACKTRACE_FUNC
-	#include <execinfo.h>
-#endif
-
-#include "Constants.h"
-#include "AgentBase.h"
-#include "Exceptions.h"
-#include "Logging.h"
-
-namespace Passenger {
-
-static bool _feedbackFdAvailable = false;
-static const char digits[] = {
-	'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'
-};
-
-// Pre-allocate an alternative stack for use in signal handlers in case
-// the normal stack isn't usable.
-static char *alternativeStack;
-static unsigned int alternativeStackSize;
-
-static void
-ignoreSigpipe() {
-	struct sigaction action;
-	action.sa_handler = SIG_IGN;
-	action.sa_flags   = 0;
-	sigemptyset(&action.sa_mask);
-	sigaction(SIGPIPE, &action, NULL);
-}
-
-static bool
-hasEnvOption(const char *name, bool defaultValue = false) {
-	const char *value = getenv(name);
-	if (value != NULL) {
-		if (*value != '\0') {
-			return strcmp(value, "yes") == 0
-				|| strcmp(value, "y") == 0
-				|| strcmp(value, "1") == 0
-				|| strcmp(value, "on") == 0
-				|| strcmp(value, "true") == 0;
-		} else {
-			return defaultValue;
-		}
-	} else {
-		return defaultValue;
-	}
-}
-
-// No idea whether strlen() is async signal safe, but let's not risk it
-// and write our own version instead that's guaranteed to be safe.
-static size_t
-safeStrlen(const char *str) {
-	size_t size = 0;
-	while (*str != '\0') {
-		str++;
-		size++;
-	}
-	return size;
-}
-
-// Must be async signal safe.
-static char *
-appendText(char *buf, const char *text) {
-	size_t len = safeStrlen(text);
-	strcpy(buf, text);
-	return buf + len;
-}
-
-// Must be async signal safe.
-static void
-reverse(char *str, size_t len) {
-	char *p1, *p2;
-	if (*str == '\0') {
-		return;
-	}
-	for (p1 = str, p2 = str + len - 1; p2 > p1; ++p1, --p2) {
-		*p1 ^= *p2;
-		*p2 ^= *p1;
-		*p1 ^= *p2;
-	}
-}
-
-// Must be async signal safe.
-static char *
-appendULL(char *buf, unsigned long long value) {
-	unsigned long long remainder = value;
-	unsigned int size = 0;
-
-	do {
-		buf[size] = digits[remainder % 10];
-		remainder = remainder / 10;
-		size++;
-	} while (remainder != 0);
-	
-	reverse(buf, size);
-	return buf + size;
-}
-
-static char *
-appendSignalName(char *buf, int signo) {
-	switch (signo) {
-	case SIGABRT:
-		buf = appendText(buf, "SIGABRT");
-		break;
-	case SIGSEGV:
-		buf = appendText(buf, "SIGSEGV");
-		break;
-	case SIGBUS:
-		buf = appendText(buf, "SIGBUS");
-		break;
-	default:
-		return appendULL(buf, (unsigned long long) signo);
-	}
-	buf = appendText(buf, "(");
-	buf = appendULL(buf, (unsigned long long) signo);
-	buf = appendText(buf, ")");
-	return buf;
-}
-
-#define SI_CODE_HANDLER(name) \
-	case name: \
-		buf = appendText(buf, #name); \
-		break
-
-// Must be async signal safe.
-static char *
-appendSignalReason(char *buf, siginfo_t *info) {
-	bool handled = true;
-	
-	switch (info->si_code) {
-	SI_CODE_HANDLER(SI_USER);
-	#ifdef SI_KERNEL
-		SI_CODE_HANDLER(SI_KERNEL);
-	#endif
-	SI_CODE_HANDLER(SI_QUEUE);
-	SI_CODE_HANDLER(SI_TIMER);
-	#ifdef SI_ASYNCIO
-		SI_CODE_HANDLER(SI_ASYNCIO);
-	#endif
-	#ifdef SI_MESGQ
-		SI_CODE_HANDLER(SI_MESGQ);
-	#endif
-	#ifdef SI_SIGIO
-		SI_CODE_HANDLER(SI_SIGIO);
-	#endif
-	#ifdef SI_TKILL
-		SI_CODE_HANDLER(SI_TKILL);
-	#endif
-	default:
-		switch (info->si_signo) {
-		case SIGSEGV:
-			switch (info->si_code) {
-			#ifdef SEGV_MAPERR
-				SI_CODE_HANDLER(SEGV_MAPERR);
-			#endif
-			#ifdef SEGV_ACCERR
-				SI_CODE_HANDLER(SEGV_ACCERR);
-			#endif
-			default:
-				handled = false;
-				break;
-			}
-			break;
-		case SIGBUS:
-			switch (info->si_code) {
-			#ifdef BUS_ADRALN
-				SI_CODE_HANDLER(BUS_ADRALN);
-			#endif
-			#ifdef BUS_ADRERR
-				SI_CODE_HANDLER(BUS_ADRERR);
-			#endif
-			#ifdef BUS_OBJERR
-				SI_CODE_HANDLER(BUS_OBJERR);
-			#endif
-			default:
-				handled = false;
-				break;
-			}
-			break;
-		};
-		if (!handled) {
-			buf = appendText(buf, "#");
-			buf = appendULL(buf, (unsigned long long) info->si_code);
-		}
-		break;
-	}
-	
-	if (info->si_code <= 0) {
-		buf = appendText(buf, ", signal sent by PID ");
-		buf = appendULL(buf, (unsigned long long) info->si_pid);
-		buf = appendText(buf, " with UID ");
-		buf = appendULL(buf, (unsigned long long) info->si_uid);
-	}
-	
-	return buf;
-}
-
-static void
-abortHandler(int signo, siginfo_t *info, void *ctx) {
-	pid_t pid = getpid();
-	char messageBuf[1024];
-	#ifdef LIBC_HAS_BACKTRACE_FUNC
-		void *backtraceStore[512];
-		backtraceStore[0] = '\0'; // Don't let gdb print uninitialized contents.
-	#endif
-	
-	char *end = messageBuf;
-	end = appendText(end, "[ pid=");
-	end = appendULL(end, (unsigned long long) pid);
-	end = appendText(end, ", timestamp=");
-	end = appendULL(end, (unsigned long long) time(NULL));
-	end = appendText(end, " ] Process aborted! signo=");
-	end = appendSignalName(end, signo);
-	end = appendText(end, ", reason=");
-	end = appendSignalReason(end, info);
-	
-	// It is important that writing the message and the backtrace are two
-	// seperate operations because it's not entirely clear whether the
-	// latter is async signal safe and thus can crash.
-	#ifdef LIBC_HAS_BACKTRACE_FUNC
-		end = appendText(end, ", backtrace available.\n");
-	#else
-		end = appendText(end, "\n");
-	#endif
-	write(STDERR_FILENO, messageBuf, end - messageBuf);
-	
-	#ifdef LIBC_HAS_BACKTRACE_FUNC
-		/* For some reason, it would appear that fatal signal
-		 * handlers have a deadline on some systems: the process will
-		 * be killed if the signal handler doesn't finish in time.
-		 * This killing appears to be triggered at some system calls,
-		 * including but not limited to nanosleep().
-		 * backtrace() might be slow and running crash-watch is
-		 * definitely slow, so we do our work in a child process
-		 * in order not to be affected by the deadline. But preferably
-		 * we don't fork because forking will cause us to lose
-		 * thread information.
-		 */
-		#ifdef __linux__
-			bool hasDeadline = false;
-		#else
-			// Mac OS X has a deadline. Not sure about other systems.
-			bool hasDeadline = true;
-		#endif
-		if (!hasDeadline || fork() == 0) {
-			int frames = backtrace(backtraceStore, sizeof(backtraceStore) / sizeof(void *));
-			end = messageBuf;
-			end = appendText(end, "--------------------------------------\n");
-			end = appendText(end, "[ pid=");
-			end = appendULL(end, (unsigned long long) pid);
-			end = appendText(end, " ] Backtrace with ");
-			end = appendULL(end, (unsigned long long) frames);
-			end = appendText(end, " frames:\n");
-			write(STDERR_FILENO, messageBuf, end - messageBuf);
-			backtrace_symbols_fd(backtraceStore, frames, STDERR_FILENO);
-			
-			end = messageBuf;
-			end = appendText(end, "--------------------------------------\n");
-			end = appendText(end, "[ pid=");
-			end = appendULL(end, (unsigned long long) pid);
-			end = appendText(end, " ] Dumping a more detailed backtrace with crash-watch "
-				"('gem install crash-watch' if you don't have it)...\n");
-			write(STDERR_FILENO, messageBuf, end - messageBuf);
-			
-			end = messageBuf;
-			end = appendText(end, "crash-watch --dump ");
-			end = appendULL(end, (unsigned long long) getpid());
-			*end = '\0';
-			system(messageBuf);
-			_exit(1);
-		}
-	#endif
-	
-	// Run default signal handler.
-	kill(getpid(), signo);
-}
-
-static void
-installAbortHandler() {
-	alternativeStackSize = MINSIGSTKSZ + 64 * 1024;
-	alternativeStack = (char *) malloc(alternativeStackSize);
-	if (alternativeStack == NULL) {
-		fprintf(stderr, "Cannot allocate an alternative with a size of %u bytes!\n",
-			alternativeStackSize);
-		fflush(stderr);
-		abort();
-	}
-	
-	stack_t stack;
-	stack.ss_sp = alternativeStack;
-	stack.ss_size = alternativeStackSize;
-	stack.ss_flags = 0;
-	if (sigaltstack(&stack, NULL) != 0) {
-		int e = errno;
-		fprintf(stderr, "Cannot install an alternative stack for use in signal handlers: %s (%d)\n",
-			strerror(e), e);
-		fflush(stderr);
-		abort();
-	}
-	
-	struct sigaction action;
-	action.sa_sigaction = abortHandler;
-	action.sa_flags = SA_RESETHAND | SA_SIGINFO;
-	sigemptyset(&action.sa_mask);
-	sigaction(SIGABRT, &action, NULL);
-	sigaction(SIGSEGV, &action, NULL);
-	sigaction(SIGBUS, &action, NULL);
-}
-
-bool
-feedbackFdAvailable() {
-	return _feedbackFdAvailable;
-}
-
-VariantMap
-initializeAgent(int argc, char *argv[], const char *processName) {
-	TRACE_POINT();
-	VariantMap options;
-	
-	ignoreSigpipe();
-	if (hasEnvOption("PASSENGER_ABORT_HANDLER", true)) {
-		installAbortHandler();
-	}
-	setup_syscall_interruption_support();
-	setvbuf(stdout, NULL, _IONBF, 0);
-	setvbuf(stderr, NULL, _IONBF, 0);
-	
-	try {
-		if (argc == 1) {
-			int ret = fcntl(FEEDBACK_FD, F_GETFL);
-			if (ret == -1) {
-				if (errno == EBADF) {
-					fprintf(stderr,
-						"You're not supposed to start this program from the command line. "
-						"It's used internally by Phusion Passenger.\n");
-					exit(1);
-				} else {
-					int e = errno;
-					fprintf(stderr,
-						"Encountered an error in feedback file descriptor 3: %s (%d)\n",
-							strerror(e), e);
-					exit(1);
-				}
-			} else {
-				_feedbackFdAvailable = true;
-				options.readFrom(FEEDBACK_FD);
-				if (options.getBool("fire_and_forget", false)) {
-					_feedbackFdAvailable = false;
-					close(FEEDBACK_FD);
-				}
-			}
-		} else {
-			options.readFrom((const char **) argv + 1, argc - 1);
-		}
-		
-		setLogLevel(options.getInt("log_level", false, 0));
-		if (!options.get("debug_log_file", false).empty()) {
-			if (strcmp(processName, "PassengerWatchdog") == 0) {
-				/* Have the watchdog set STDOUT and STDERR to the debug
-				 * log file so that system abort() calls that stuff
-				 * are properly logged.
-				 */
-				string filename = options.get("debug_log_file");
-				options.erase("debug_log_file");
-				
-				int fd = open(filename.c_str(), O_CREAT | O_WRONLY | O_APPEND, 0644);
-				if (fd == -1) {
-					int e = errno;
-					throw FileSystemException("Cannot open debug log file " +
-						filename, e, filename);
-				}
-				
-				dup2(fd, STDOUT_FILENO);
-				dup2(fd, STDERR_FILENO);
-				close(fd);
-			} else {
-				setDebugFile(options.get("debug_log_file").c_str());
-			}
-		}
-	} catch (const tracable_exception &e) {
-		P_ERROR("*** ERROR: " << e.what() << "\n" << e.backtrace());
-		exit(1);
-	}
-	
-	// Change process title.
-	strncpy(argv[0], processName, strlen(argv[0]));
-	for (int i = 1; i < argc; i++) {
-		memset(argv[i], '\0', strlen(argv[i]));
-	}
-	
-	return options;
-}
-
-} // namespace Passenger
diff --git a/ext/common/AgentBase.h b/ext/common/AgentBase.h
deleted file mode 100644
index fc77ee8..0000000
--- a/ext/common/AgentBase.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_AGENT_BASE_H_
-#define _PASSENGER_AGENT_BASE_H_
-
-/** Common code for all agents. */
-
-#include "Utils/VariantMap.h"
-
-namespace Passenger {
-
-bool feedbackFdAvailable();
-VariantMap initializeAgent(int argc, char *argv[], const char *processName);
-
-}
-
-#endif /* _PASSENGER_AGENT_BASE_H_ */
diff --git a/ext/common/AgentsStarter.cpp b/ext/common/AgentsStarter.cpp
index c326779..4ffb0f8 100644
--- a/ext/common/AgentsStarter.cpp
+++ b/ext/common/AgentsStarter.cpp
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -23,79 +23,104 @@
  *  THE SOFTWARE.
  */
 #include <oxt/thread.hpp>
-#include "AgentsStarter.h"
-#include "AgentsStarter.hpp"
+#include <set>
 #include <cerrno>
 #include <cstring>
+#include <AgentsStarter.h>
 
 using namespace std;
 using namespace boost;
 using namespace oxt;
 
 
-AgentsStarter *
-agents_starter_new(AgentsStarterType type, char **error_message) {
-	Passenger::AgentsStarter::Type theType;
-	if (type == AS_APACHE) {
-		theType = Passenger::AgentsStarter::APACHE;
-	} else {
-		theType = Passenger::AgentsStarter::NGINX;
+PP_VariantMap *
+pp_variant_map_new() {
+	return (PP_VariantMap *) new Passenger::VariantMap();
+}
+
+void
+pp_variant_map_set(PP_VariantMap *m,
+	const char *name,
+	const char *value,
+	unsigned int value_len)
+{
+	Passenger::VariantMap *vm = (Passenger::VariantMap *) m;
+	vm->set(name, string(value, value_len));
+}
+
+void
+pp_variant_map_set2(PP_VariantMap *m,
+	const char *name,
+	unsigned int name_len,
+	const char *value,
+	unsigned int value_len)
+{
+	Passenger::VariantMap *vm = (Passenger::VariantMap *) m;
+	vm->set(string(name, name_len), string(value, value_len));
+}
+
+void
+pp_variant_map_set_int(PP_VariantMap *m,
+	const char *name,
+	int value)
+{
+	Passenger::VariantMap *vm = (Passenger::VariantMap *) m;
+	vm->setInt(name, value);
+}
+
+void
+pp_variant_map_set_bool(PP_VariantMap *m,
+	const char *name,
+	int value)
+{
+	Passenger::VariantMap *vm = (Passenger::VariantMap *) m;
+	vm->setBool(name, value);
+}
+
+void
+pp_variant_map_set_strset(PP_VariantMap *m,
+	const char *name,
+	const char **strs,
+	unsigned int count)
+{
+	Passenger::VariantMap *vm = (Passenger::VariantMap *) m;
+	std::set<string> the_set;
+	
+	for (unsigned int i = 0; i < count; i++) {
+		the_set.insert(strs[i]);
 	}
-	return (AgentsStarter *) new Passenger::AgentsStarter(theType);
+	vm->setStrSet(name, the_set);
+}
+
+void
+pp_variant_map_free(PP_VariantMap *m) {
+	delete (Passenger::VariantMap *) m;
+}
+
+
+PP_AgentsStarter *
+pp_agents_starter_new(PP_AgentsStarterType type, char **error_message) {
+	return (PP_AgentsStarter *) new Passenger::AgentsStarter(type);
 }
 
 int
-agents_starter_start(AgentsStarter *as,
-                     int logLevel, const char *debugLogFile,
-                     pid_t webServerPid,
-                     const char *tempDir, int userSwitching,
-                     const char *defaultUser, const char *defaultGroup,
-                     uid_t webServerWorkerUid, gid_t webServerWorkerGid,
-                     const char *passengerRoot,
-                     const char *rubyCommand, unsigned int maxPoolSize,
-                     unsigned int maxInstancesPerApp,
-                     unsigned int poolIdleTime,
-                     const char *analyticsServer,
-                     const char *analyticsLogDir, const char *analyticsLogUser,
-                     const char *analyticsLogGroup, const char *analyticsLogPermissions,
-                     const char *unionStationGatewayAddress,
-                     unsigned short unionStationGatewayPort,
-                     const char *unionStationGatewayCert,
-                     const char *unionStationProxyAddress,
-                     const char *unionStationProxyType,
-                     const char **prestartURLs, unsigned int prestartURLsCount,
-                     const AfterForkCallback afterFork,
-                     void *callbackArgument,
-                     char **errorMessage)
+pp_agents_starter_start(PP_AgentsStarter *as,
+	const char *passengerRoot,
+	PP_VariantMap *extraParams,
+	const PP_AfterForkCallback afterFork,
+	void *callbackArgument,
+	char **errorMessage)
 {
 	Passenger::AgentsStarter *agentsStarter = (Passenger::AgentsStarter *) as;
 	this_thread::disable_syscall_interruption dsi;
 	try {
 		function<void ()> afterForkFunctionObject;
-		set<string> setOfprestartURLs;
-		unsigned int i;
 		
 		if (afterFork != NULL) {
 			afterForkFunctionObject = boost::bind(afterFork, callbackArgument);
 		}
-		for (i = 0; i < prestartURLsCount; i++) {
-			setOfprestartURLs.insert(prestartURLs[i]);
-		}
-		agentsStarter->start(logLevel, debugLogFile,
-			webServerPid, tempDir, userSwitching,
-			defaultUser, defaultGroup,
-			webServerWorkerUid, webServerWorkerGid,
-			passengerRoot, rubyCommand,
-			maxPoolSize, maxInstancesPerApp, poolIdleTime,
-			analyticsServer,
-			analyticsLogDir, analyticsLogUser,
-			analyticsLogGroup, analyticsLogPermissions,
-			unionStationGatewayAddress,
-			unionStationGatewayPort,
-			unionStationGatewayCert,
-			unionStationProxyAddress,
-			unionStationProxyType,
-			setOfprestartURLs,
+		agentsStarter->start(passengerRoot,
+			*((Passenger::VariantMap *) extraParams),
 			afterForkFunctionObject);
 		return 1;
 	} catch (const Passenger::SystemException &e) {
@@ -110,7 +135,7 @@ agents_starter_start(AgentsStarter *as,
 }
 
 const char *
-agents_starter_get_request_socket_filename(AgentsStarter *as, unsigned int *size) {
+pp_agents_starter_get_request_socket_filename(PP_AgentsStarter *as, unsigned int *size) {
 	Passenger::AgentsStarter *agentsStarter = (Passenger::AgentsStarter *) as;
 	if (size != NULL) {
 		*size = agentsStarter->getRequestSocketFilename().size();
@@ -119,7 +144,7 @@ agents_starter_get_request_socket_filename(AgentsStarter *as, unsigned int *size
 }
 
 const char *
-agents_starter_get_request_socket_password(AgentsStarter *as, unsigned int *size) {
+pp_agents_starter_get_request_socket_password(PP_AgentsStarter *as, unsigned int *size) {
 	Passenger::AgentsStarter *agentsStarter = (Passenger::AgentsStarter *) as;
 	if (size != NULL) {
 		*size = agentsStarter->getRequestSocketPassword().size();
@@ -128,31 +153,31 @@ agents_starter_get_request_socket_password(AgentsStarter *as, unsigned int *size
 }
 
 const char *
-agents_starter_get_server_instance_dir(AgentsStarter *as) {
+pp_agents_starter_get_server_instance_dir(PP_AgentsStarter *as) {
 	Passenger::AgentsStarter *agentsStarter = (Passenger::AgentsStarter *) as;
 	return agentsStarter->getServerInstanceDir()->getPath().c_str();
 }
 
 const char *
-agents_starter_get_generation_dir(AgentsStarter *as) {
+pp_agents_starter_get_generation_dir(PP_AgentsStarter *as) {
 	Passenger::AgentsStarter *agentsStarter = (Passenger::AgentsStarter *) as;
 	return agentsStarter->getGeneration()->getPath().c_str();
 }
 
 pid_t
-agents_starter_get_pid(AgentsStarter *as) {
+pp_agents_starter_get_pid(PP_AgentsStarter *as) {
 	Passenger::AgentsStarter *agentsStarter = (Passenger::AgentsStarter *) as;
 	return agentsStarter->getPid();
 }
 
 void
-agents_starter_detach(AgentsStarter *as) {
+pp_agents_starter_detach(PP_AgentsStarter *as) {
 	Passenger::AgentsStarter *agentsStarter = (Passenger::AgentsStarter *) as;
 	agentsStarter->detach();
 }
 
 void
-agents_starter_free(AgentsStarter *as) {
+pp_agents_starter_free(PP_AgentsStarter *as) {
 	Passenger::AgentsStarter *agentsStarter = (Passenger::AgentsStarter *) as;
 	delete agentsStarter;
 }
diff --git a/ext/common/AgentsStarter.h b/ext/common/AgentsStarter.h
index 7dd2d97..b75b658 100644
--- a/ext/common/AgentsStarter.h
+++ b/ext/common/AgentsStarter.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -22,10 +22,9 @@
  *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  *  THE SOFTWARE.
  */
+#ifndef _PASSENGER_AGENTS_STARTER_HPP_
+#define _PASSENGER_AGENTS_STARTER_HPP_
 
-/* C wrappers for Passenger::AgentsStarter. */
-#ifndef _PASSENGER_AGENTS_STARTER_H_
-#define _PASSENGER_AGENTS_STARTER_H_
 
 #include <sys/types.h>
 #include <unistd.h>
@@ -34,50 +33,566 @@
 	extern "C" {
 #endif
 
-
-typedef void AgentsStarter;
-
 typedef enum {
 	AS_APACHE,
 	AS_NGINX
-} AgentsStarterType;
-
-typedef void (*AfterForkCallback)(void *);
-
-AgentsStarter *agents_starter_new(AgentsStarterType type, char **error_message);
-int  agents_starter_start(AgentsStarter *as,
-                          int logLevel, const char *debugLogFile,
-                          pid_t webServerPid,
-                          const char *tempDir, int userSwitching,
-                          const char *defaultUser, const char *defaultGroup,
-                          uid_t webServerWorkerUid, gid_t webServerWorkerGid,
-                          const char *passengerRoot,
-                          const char *rubyCommand, unsigned int maxPoolSize,
-                          unsigned int maxInstancesPerApp,
-                          unsigned int poolIdleTime,
-                          const char *analyticsServer,
-                          const char *analyticsLogDir, const char *analyticsLogUser,
-                          const char *analyticsLogGroup, const char *analyticsLogPermissions,
-                          const char *unionStationGatewayAddress,
-                          unsigned short unionStationGatewayPort,
-                          const char *unionStationGatewayCert,
-                          const char *unionStationProxyAddress,
-                          const char *unionStationProxyType,
-                          const char **prestartURLs, unsigned int prestartURLsCount,
-                          const AfterForkCallback afterFork,
-                          void *callbackArgument,
-                          char **errorMessage);
-const char *agents_starter_get_request_socket_filename(AgentsStarter *as, unsigned int *size);
-const char *agents_starter_get_request_socket_password(AgentsStarter *as, unsigned int *size);
-const char *agents_starter_get_server_instance_dir(AgentsStarter *as);
-const char *agents_starter_get_generation_dir(AgentsStarter *as);
-pid_t       agents_starter_get_pid(AgentsStarter *as);
-void        agents_starter_detach(AgentsStarter *as);
-void        agents_starter_free(AgentsStarter *as);
+} PP_AgentsStarterType;
+
+typedef void PP_AgentsStarter;
+typedef void PP_VariantMap;
+typedef void (*PP_AfterForkCallback)(void *);
 
+PP_VariantMap *pp_variant_map_new();
+void pp_variant_map_set(PP_VariantMap *m,
+	const char *name,
+	const char *value,
+	unsigned int value_len);
+void pp_variant_map_set2(PP_VariantMap *m,
+	const char *name,
+	unsigned int name_len,
+	const char *value,
+	unsigned int value_len);
+void pp_variant_map_set_int(PP_VariantMap *m,
+	const char *name,
+	int value);
+void pp_variant_map_set_bool(PP_VariantMap *m,
+	const char *name,
+	int value);
+void pp_variant_map_set_strset(PP_VariantMap *m,
+	const char *name,
+	const char **strs,
+	unsigned int count);
+void pp_variant_map_free(PP_VariantMap *m);
+
+PP_AgentsStarter *pp_agents_starter_new(PP_AgentsStarterType type,
+	char **error_message);
+int pp_agents_starter_start(PP_AgentsStarter *as,
+	const char *passengerRoot,
+	PP_VariantMap *params,
+	const PP_AfterForkCallback afterFork,
+	void *callbackArgument,
+	char **errorMessage);
+const char *pp_agents_starter_get_request_socket_filename(PP_AgentsStarter *as, unsigned int *size);
+const char *pp_agents_starter_get_request_socket_password(PP_AgentsStarter *as, unsigned int *size);
+const char *pp_agents_starter_get_server_instance_dir(PP_AgentsStarter *as);
+const char *pp_agents_starter_get_generation_dir(PP_AgentsStarter *as);
+pid_t       pp_agents_starter_get_pid(PP_AgentsStarter *as);
+void        pp_agents_starter_detach(PP_AgentsStarter *as);
+void        pp_agents_starter_free(PP_AgentsStarter *as);
 
 #ifdef __cplusplus
-	}
+	} /* extern "C" */
 #endif
 
-#endif /* _PASSENGER_AGENTS_STARTER_H_ */
+
+#ifdef __cplusplus
+
+#include <boost/function.hpp>
+#include <oxt/system_calls.hpp>
+#include <oxt/backtrace.hpp>
+#include <string>
+#include <vector>
+#include <set>
+
+#include <signal.h>
+
+#include <Constants.h>
+#include <FileDescriptor.h>
+#include <MessageClient.h>
+#include <ServerInstanceDir.h>
+#include <Exceptions.h>
+#include <ResourceLocator.h>
+#include <Logging.h>
+#include <Utils.h>
+#include <Utils/IOUtils.h>
+#include <Utils/MessageIO.h>
+#include <Utils/Timer.h>
+#include <Utils/ScopeGuard.h>
+#include <Utils/VariantMap.h>
+
+namespace Passenger {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+/**
+ * Utility class for starting various Phusion Passenger agents through the watchdog.
+ */
+class AgentsStarter {
+private:
+	PP_AgentsStarterType type;
+
+	/** The watchdog's PID. Equals 0 if the watchdog hasn't been started yet
+	 * or if detach() is called. */
+	pid_t pid;
+
+	/******* Information about the started services. Only valid when pid != 0. *******/
+	
+	 /** The watchdog's feedback file descriptor. */
+	FileDescriptor feedbackFd;
+	
+	/** The helper agent's request socket filename and its password. This socket
+	 * is for serving SCGI requests. */
+	string requestSocketFilename;
+	string requestSocketPassword;
+	
+	/** The socket on which the helper agent listens for administration commands,
+	 * and the corresponding password for the "web_server" account, which has the
+	 * authorization to shutdown the helper agent.
+	 */
+	string helperAgentAdminSocketAddress;
+	string helperAgentExitPassword;
+
+	/** The logging agent's socket address and its password. */
+	string loggingSocketAddress;
+	string loggingSocketPassword;
+	
+	/** The server instance dir and generation dir of the agents. */
+	ServerInstanceDirPtr serverInstanceDir;
+	/** The generation dir of the agents. */
+	ServerInstanceDir::GenerationPtr generation;
+	
+	/**
+	 * Safely dup2() the given file descriptor to 3 (FEEDBACK_FD).
+	 */
+	void installFeedbackFd(const FileDescriptor &fd) {
+		if (fd != FEEDBACK_FD && syscalls::dup2(fd, FEEDBACK_FD) == -1) {
+			int e = errno;
+			try {
+				writeArrayMessage(fd,
+					"system error",
+					"dup2() failed",
+					toString(e).c_str(),
+					NULL);
+				_exit(1);
+			} catch (...) {
+				fprintf(stderr, "Passenger AgentsStarter: dup2() failed: %s (%d)\n",
+					strerror(e), e);
+				fflush(stderr);
+				_exit(1);
+			}
+		}
+	}
+	
+	/**
+	 * Call this if the watchdog seems to have crashed. This function will try
+	 * to determine whether the watchdog is still running, whether it crashed
+	 * with a signal, etc. If it has detected that the watchdog is no longer running
+	 * then it will set `pid` to -1.
+	 */
+	void inspectWatchdogCrashReason(pid_t &pid) {
+		this_thread::disable_interruption di;
+		this_thread::disable_syscall_interruption dsi;
+		int ret, status;
+		
+		/* Upon noticing that something went wrong, the watchdog
+		 * or its subprocesses might still be writing out an error
+		 * report, so we wait a while before killing the watchdog.
+		 */
+		ret = timedWaitPid(pid, &status, 5000);
+		if (ret == 0) {
+			/* Looks like the watchdog didn't crash and is still running. */
+			throw RuntimeException(
+				"Unable to start the Phusion Passenger watchdog: "
+				"it froze during startup and reported an unknown error");
+		} else if (ret != -1 && WIFSIGNALED(status)) {
+			/* Looks like a crash which caused a signal. */
+			pid = -1;
+			throw RuntimeException(
+				"Unable to start the Phusion Passenger watchdog: "
+				"it seems to have been killed with signal " +
+				getSignalName(WTERMSIG(status)) + " during startup");
+		} else if (ret == -1) {
+			/* Looks like it exited for a different reason and has no exit code. */
+			pid = -1;
+			throw RuntimeException(
+				"Unable to start the Phusion Passenger watchdog: "
+				"it seems to have crashed during startup for an unknown reason");
+		} else {
+			/* Looks like it exited for a different reason, but has an exit code. */
+			pid = -1;
+			throw RuntimeException(
+				"Unable to start the Phusion Passenger watchdog: "
+				"it seems to have crashed during startup for an unknown reason, "
+				"with exit code " + toString(WEXITSTATUS(status)));
+		}
+	}
+	
+	static void killProcessGroupAndWait(pid_t *pid, unsigned long long timeout = 0) {
+		if (*pid != -1 && (timeout == 0 || timedWaitPid(*pid, NULL, timeout) <= 0)) {
+			this_thread::disable_syscall_interruption dsi;
+			syscalls::killpg(*pid, SIGKILL);
+			syscalls::waitpid(*pid, NULL, 0);
+			*pid = -1;
+		}
+	}
+	
+	/**
+	 * Behaves like `waitpid(pid, status, WNOHANG)`, but waits at most
+	 * `timeout` miliseconds for the process to exit.
+	 */
+	static int timedWaitPid(pid_t pid, int *status, unsigned long long timeout) {
+		Timer timer;
+		int ret;
+		
+		do {
+			ret = syscalls::waitpid(pid, status, WNOHANG);
+			if (ret > 0 || ret == -1) {
+				return ret;
+			} else {
+				syscalls::usleep(10000);
+			}
+		} while (timer.elapsed() < timeout);
+		return 0; // timed out
+	}
+	
+	/**
+	 * Gracefully shutdown an agent process by sending an exit command to its socket.
+	 * Returns whether the agent has successfully processed the exit command.
+	 * Any exceptions are caught and will cause false to be returned.
+	 */
+	bool gracefullyShutdownAgent(const string &address, const string &username,
+		const string &password)
+	{
+		try {
+			MessageClient client;
+			vector<string> args;
+			
+			client.connect(address, username, password);
+			client.write("exit", NULL);
+			return client.read(args) && args[0] == "Passed security" &&
+			       client.read(args) && args[0] == "exit command received";
+		} catch (const SystemException &) {
+		} catch (const IOException &) {
+		} catch (const SecurityException &) {
+		}
+		return false;
+	}
+	
+public:
+	/**
+	 * Construct a AgentsStarter object. The watchdog and the agents
+	 * aren't started yet until you call start().
+	 *
+	 * @param type Whether one wants to start the Apache or the Nginx helper agent.
+	 */
+	AgentsStarter(PP_AgentsStarterType type) {
+		this->type = type;
+		pid = 0;
+	}
+	
+	~AgentsStarter() {
+		if (pid != 0) {
+			this_thread::disable_syscall_interruption dsi;
+			bool cleanShutdown = gracefullyShutdownAgent(helperAgentAdminSocketAddress,
+				"_web_server", helperAgentExitPassword);
+			cleanShutdown = cleanShutdown &&
+				gracefullyShutdownAgent(loggingSocketAddress,
+					"logging", loggingSocketPassword);
+			
+			/* Send a message down the feedback fd to tell the watchdog
+			 * Whether this is a clean shutdown. Closing the fd without
+			 * sending anything also indicates an unclean shutdown,
+			 * but we send a byte anyway in case there are other processes
+			 * who have the fd open.
+			 */
+			if (cleanShutdown) {
+				syscalls::write(feedbackFd, "c", 1);
+			} else {
+				syscalls::write(feedbackFd, "u", 1);
+			}
+			
+			/* If we failed to send an exit command to one of the agents then we have
+			 * to forcefully kill all agents now because otherwise one of them might
+			 * never exit. We do this by closing the feedback fd without sending a
+			 * random byte, to indicate that this is an abnormal shutdown. The watchdog
+			 * will then kill all agents.
+			 */
+			
+			feedbackFd.close();
+			syscalls::waitpid(pid, NULL, 0);
+		}
+	}
+	
+	/**
+	 * Returns the type as was passed to the constructor.
+	 */
+	PP_AgentsStarterType getType() const {
+		return type;
+	}
+	
+	/**
+	 * Returns the watchdog's PID. Equals 0 if the watchdog hasn't been started yet
+	 * or if detach() is called.
+	 */
+	pid_t getPid() const {
+		return pid;
+	}
+	
+	// The 'const string &' here is on purpose. The C getter functions
+	// return the string pointer directly.
+	const string &getRequestSocketFilename() const {
+		return requestSocketFilename;
+	}
+	
+	const string &getRequestSocketPassword() const {
+		return requestSocketPassword;
+	}
+	
+	string getHelperAgentAdminSocketFilename() const {
+		return parseUnixSocketAddress(helperAgentAdminSocketAddress);
+	}
+	
+	string getHelperAgentExitPassword() const {
+		return helperAgentExitPassword;
+	}
+	
+	string getLoggingSocketAddress() const {
+		return loggingSocketAddress;
+	}
+	
+	string getLoggingSocketPassword() const {
+		return loggingSocketPassword;
+	}
+	
+	ServerInstanceDirPtr getServerInstanceDir() const {
+		return serverInstanceDir;
+	}
+	
+	ServerInstanceDir::GenerationPtr getGeneration() const {
+		return generation;
+	}
+	
+	/**
+	 * Start the agents through the watchdog.
+	 *
+	 * @throws SystemException Something went wrong.
+	 * @throws IOException Something went wrong while communicating with one
+	 *                     of the agents during its initialization phase.
+	 * @throws RuntimeException Something went wrong.
+	 */
+	void start(const string &passengerRoot,
+		const VariantMap &extraParams = VariantMap(),
+		const function<void ()> &afterFork = function<void ()>())
+	{
+		TRACE_POINT();
+		this_thread::disable_interruption di;
+		this_thread::disable_syscall_interruption dsi;
+		ResourceLocator locator(passengerRoot);
+		string watchdogFilename = locator.getAgentsDir() + "/PassengerWatchdog";
+		SocketPair fds;
+		int e;
+		pid_t pid;
+
+		VariantMap params;
+		params
+			.set    ("web_server_type", type == AS_APACHE ? "apache" : "nginx")
+			.setPid ("web_server_pid",  getpid())
+			.set    ("passenger_root",  passengerRoot)
+			.setInt ("log_level",       getLogLevel())
+			.set    ("temp_dir",        getSystemTempDir());
+		extraParams.addTo(params);
+
+		// .setUid ("web_server_worker_uid", webServerWorkerUid)
+		// .setGid ("web_server_worker_gid", webServerWorkerGid)
+		// .set    ("debug_log_file",  debugLogFile)
+		// .set    ("temp_dir",        tempDir.empty() ? getSystemTempDir() : tempDir)
+		// .setBool("user_switching",  userSwitching)
+		// .set    ("default_user",    defaultUser)
+		// .set    ("default_group",   defaultGroup)
+		// .set    ("default_ruby",    defaultRubyCommand)
+		// .setInt ("max_pool_size",   maxPoolSize)
+		// .setInt ("max_instances_per_app",     maxInstancesPerApp)
+		/*
+			.setInt ("pool_idle_time",            poolIdleTime)
+			.set    ("analytics_server",          analyticsServer)
+			.set    ("analytics_log_user",        analyticsLogUser)
+			.set    ("analytics_log_group",       analyticsLogGroup)
+			.set    ("union_station_gateway_address",  unionStationGatewayAddress)
+			.setInt ("union_station_gateway_port", unionStationGatewayPort)
+			.set    ("union_station_gateway_cert", realUnionStationGatewayCert)
+			.set    ("union_station_proxy_address", unionStationProxyAddress)
+			.set    ("prestart_urls",   serializePrestartURLs(prestartURLs));
+		*/
+		
+		fds = createUnixSocketPair();
+		pid = syscalls::fork();
+		if (pid == 0) {
+			// Child
+			
+			/* Become the session leader so that Apache can't kill the
+			 * watchdog with killpg() during shutdown, so that a
+			 * Ctrl-C only affects the web server, and so that
+			 * we can kill all of our subprocesses in a single killpg().
+			 */
+			setsid();
+			
+			// Make sure the feedback fd is 3 and close all file descriptors
+			// except stdin, stdout, stderr and 3.
+			syscalls::close(fds[0]);
+			installFeedbackFd(fds[1]);
+			closeAllFileDescriptors(FEEDBACK_FD);
+			
+			/* We don't know how the web server or the environment affect
+			 * signal handlers and the signal mask, so reset this stuff
+			 * just in case.
+			 */
+			resetSignalHandlersAndMask();
+			
+			if (afterFork) {
+				afterFork();
+			}
+			
+			execl(watchdogFilename.c_str(), "PassengerWatchdog", (char *) 0);
+			e = errno;
+			try {
+				writeArrayMessage(FEEDBACK_FD,
+					"exec error",
+					toString(e).c_str(),
+					NULL);
+				_exit(1);
+			} catch (...) {
+				fprintf(stderr, "Passenger AgentsStarter: could not execute %s: %s (%d)\n",
+					watchdogFilename.c_str(), strerror(e), e);
+				fflush(stderr);
+				_exit(1);
+			}
+		} else if (pid == -1) {
+			// Error
+			e = errno;
+			throw SystemException("Cannot fork a new process", e);
+		} else {
+			// Parent
+			UPDATE_TRACE_POINT();
+			FileDescriptor feedbackFd = fds[0];
+			vector<string> args;
+			bool result;
+			
+			ScopeGuard guard(boost::bind(&AgentsStarter::killProcessGroupAndWait, &pid, 0));
+			fds[1].close();
+			
+			
+			/****** Send arguments to watchdog through the feedback channel ******/
+			
+			UPDATE_TRACE_POINT();
+			/* Here we don't care about EPIPE and ECONNRESET errors. The watchdog
+			 * could have sent an error message over the feedback fd without
+			 * reading the arguments. We'll notice that later.
+			 */
+			try {
+				params.writeToFd(feedbackFd);
+			} catch (const SystemException &e) {
+				if (e.code() != EPIPE && e.code() != ECONNRESET) {
+					inspectWatchdogCrashReason(pid);
+				}
+			}
+			
+			
+			/****** Read agents information report ******/
+			
+			this_thread::restore_interruption ri(di);
+			this_thread::restore_syscall_interruption rsi(dsi);
+			UPDATE_TRACE_POINT();
+			
+			try {
+				result = readArrayMessage(feedbackFd, args);
+			} catch (const SystemException &ex) {
+				if (ex.code() == ECONNRESET) {
+					inspectWatchdogCrashReason(pid);
+				} else {
+					killProcessGroupAndWait(&pid, 5000);
+					guard.clear();
+					throw SystemException("Unable to start the Phusion Passenger watchdog: "
+						"unable to read its startup information report",
+						ex.code());
+				}
+			}
+			if (!result) {
+				UPDATE_TRACE_POINT();
+				inspectWatchdogCrashReason(pid);
+			}
+			
+			if (args[0] == "Agents information") {
+				if ((args.size() - 1) % 2 != 0) {
+					throw RuntimeException("Unable to start the Phusion Passenger watchdog "
+						"because it sent an invalid startup information report (the number "
+						"of items is not an even number)");
+				}
+
+				VariantMap info;
+				for (unsigned i = 1; i < args.size(); i += 2) {
+					const string &key = args[i];
+					const string &value = args[i + 1];
+					info.set(key, value);
+				}
+
+				this->pid        = pid;
+				this->feedbackFd = feedbackFd;
+				requestSocketFilename   = info.get("request_socket_filename");
+				requestSocketPassword   = info.get("request_socket_password");
+				helperAgentAdminSocketAddress = info.get("helper_agent_admin_socket_address");
+				helperAgentExitPassword       = info.get("helper_agent_exit_password");
+				serverInstanceDir = make_shared<ServerInstanceDir>(info.get("server_instance_dir"), false);
+				generation        = serverInstanceDir->getGeneration(info.getInt("generation"));
+				loggingSocketAddress  = info.get("logging_socket_address");
+				loggingSocketPassword = info.get("logging_socket_password");
+				guard.clear();
+			} else if (args[0] == "Watchdog startup error") {
+				killProcessGroupAndWait(&pid, 5000);
+				guard.clear();
+				throw RuntimeException("Unable to start the Phusion Passenger watchdog "
+					"because it encountered the following error during startup: " +
+					args[1]);
+			} else if (args[0] == "system error") {
+				killProcessGroupAndWait(&pid, 5000);
+				guard.clear();
+				throw SystemException(args[1], atoi(args[2]));
+			} else if (args[0] == "exec error") {
+				e = atoi(args[1]);
+				killProcessGroupAndWait(&pid, 5000);
+				guard.clear();
+				if (e == ENOENT) {
+					string passengerRootConfig;
+					if (type == AS_APACHE) {
+						passengerRootConfig = "PassengerRoot";
+					} else {
+						passengerRootConfig = "passenger_root";
+					}
+					throw RuntimeException("Unable to start the Phusion Passenger watchdog "
+						"because its executable (" + watchdogFilename + ") does "
+						"not exist. This probably means that your Phusion Passenger "
+						"installation is broken or incomplete, or that your '" +
+						passengerRootConfig + "' directive is set to the wrong value. "
+						"Please reinstall Phusion Passenger or fix your '" +
+						passengerRootConfig + "' directive, whichever is applicable.");
+				} else {
+					throw SystemException("Unable to start the Phusion Passenger watchdog (" +
+						watchdogFilename + ")", e);
+				}
+			} else {
+				UPDATE_TRACE_POINT();
+				killProcessGroupAndWait(&pid, 5000);
+				guard.clear();
+				throw RuntimeException("The Phusion Passenger watchdog sent an unknown feedback message '" + args[0] + "'");
+			}
+		}
+	}
+	
+	/**
+	 * Close any file descriptors that this object has, and make it so that the destructor
+	 * doesn't try to shut down the agents.
+	 *
+	 * @post getPid() == 0
+	 */
+	void detach() {
+		feedbackFd.close();
+		pid = 0;
+	}
+};
+
+} // namespace Passenger
+
+#endif /* __cplusplus */
+
+#endif /* _PASSENGER_AGENTS_STARTER_HPP_ */
diff --git a/ext/common/AgentsStarter.hpp b/ext/common/AgentsStarter.hpp
deleted file mode 100644
index 4abd066..0000000
--- a/ext/common/AgentsStarter.hpp
+++ /dev/null
@@ -1,659 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_AGENTS_STARTER_HPP_
-#define _PASSENGER_AGENTS_STARTER_HPP_
-
-#include <boost/function.hpp>
-#include <oxt/system_calls.hpp>
-#include <oxt/backtrace.hpp>
-#include <string>
-#include <vector>
-#include <set>
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <signal.h>
-
-#include <Constants.h>
-#include <FileDescriptor.h>
-#include <MessageClient.h>
-#include <ServerInstanceDir.h>
-#include <Exceptions.h>
-#include <ResourceLocator.h>
-#include <Utils.h>
-#include <Utils/IOUtils.h>
-#include <Utils/MessageIO.h>
-#include <Utils/Base64.h>
-#include <Utils/Timer.h>
-#include <Utils/ScopeGuard.h>
-#include <Utils/VariantMap.h>
-
-namespace Passenger {
-
-using namespace std;
-using namespace boost;
-using namespace oxt;
-
-/**
- * Utility class for starting various Phusion Passenger agents through the watchdog.
- */
-class AgentsStarter {
-public:
-	enum Type {
-		APACHE,
-		NGINX
-	};
-	
-private:
-	/** The watchdog's PID. Equals 0 if the watchdog hasn't been started yet
-	 * or if detach() is called. */
-	pid_t pid;
-	
-	Type type;
-	
-	/** The watchdog's feedback file descriptor. Only valid if pid != 0. */
-	FileDescriptor feedbackFd;
-	
-	/**
-	 * The helper agent's request socket filename. This socket only exists
-	 * for the Nginx helper agent, and it's for serving SCGI requests.
-	 *
-	 * Only valid if pid != 0.
-	 */
-	string requestSocketFilename;
-	
-	/**
-	 * A password for connecting to the request socket. Only valid if pid != 0.
-	 */
-	string requestSocketPassword;
-	
-	/**
-	 * The helper agent's message server socket filename, on which e.g. the
-	 * application pool server is listening. Only valid if pid != 0.
-	 *
-	 * The application pool server is available through the account "_web_server".
-	 */
-	string messageSocketFilename;
-	
-	/**
-	 * A password for the message server socket. The associated username is "_web_server".
-	 *
-	 * Only valid if pid != 0.
-	 */
-	string messageSocketPassword;
-	
-	bool loggingAgentRunningLocally;
-	string loggingSocketAddress;
-	string loggingSocketPassword;
-	
-	/**
-	 * The server instance dir of the agents. Only valid if pid != 0.
-	 */
-	ServerInstanceDirPtr serverInstanceDir;
-	
-	/**
-	 * The generation dir of the agents. Only valid if pid != 0.
-	 */
-	ServerInstanceDir::GenerationPtr generation;
-	
-	/**
-	 * Safely dup2() the given file descriptor to 3 (FEEDBACK_FD).
-	 */
-	void installFeedbackFd(const FileDescriptor &fd) {
-		if (fd != FEEDBACK_FD && syscalls::dup2(fd, FEEDBACK_FD) == -1) {
-			int e = errno;
-			try {
-				writeArrayMessage(fd,
-					"system error",
-					"dup2() failed",
-					toString(e).c_str(),
-					NULL);
-				_exit(1);
-			} catch (...) {
-				fprintf(stderr, "Passenger AgentsStarter: dup2() failed: %s (%d)\n",
-					strerror(e), e);
-				fflush(stderr);
-				_exit(1);
-			}
-		}
-	}
-	
-	/**
-	 * Call this if the watchdog seems to have crashed. This function will try
-	 * to determine whether the watchdog is still running, whether it crashed
-	 * with a signal, etc. If it has detected that the watchdog is no longer running
-	 * then it will set <em>pid</em> to -1.
-	 */
-	void inspectWatchdogCrashReason(pid_t &pid) {
-		this_thread::disable_interruption di;
-		this_thread::disable_syscall_interruption dsi;
-		int ret, status;
-		
-		/* Upon noticing that something went wrong, the watchdog
-		 * or its subprocesses might still be writing out an error
-		 * report, so we wait a while before killing the watchdog.
-		 */
-		ret = timedWaitPid(pid, &status, 5000);
-		if (ret == 0) {
-			/* Looks like the watchdog didn't crash and is still running. */
-			throw RuntimeException(
-				"Unable to start the Phusion Passenger watchdog: "
-				"it froze during startup and reported an unknown error");
-		} else if (ret != -1 && WIFSIGNALED(status)) {
-			/* Looks like a crash which caused a signal. */
-			pid = -1;
-			throw RuntimeException(
-				"Unable to start the Phusion Passenger watchdog: "
-				"it seems to have been killed with signal " +
-				getSignalName(WTERMSIG(status)) + " during startup");
-		} else if (ret == -1) {
-			/* Looks like it exited for a different reason and has no exit code. */
-			pid = -1;
-			throw RuntimeException(
-				"Unable to start the Phusion Passenger watchdog: "
-				"it seems to have crashed during startup for an unknown reason");
-		} else {
-			/* Looks like it exited for a different reason, but has an exit code. */
-			pid = -1;
-			throw RuntimeException(
-				"Unable to start the Phusion Passenger watchdog: "
-				"it seems to have crashed during startup for an unknown reason, "
-				"with exit code " + toString(WEXITSTATUS(status)));
-		}
-	}
-	
-	static void killProcessGroupAndWait(pid_t *pid, unsigned long long timeout = 0) {
-		if (*pid != -1 && (timeout == 0 || timedWaitPid(*pid, NULL, timeout) <= 0)) {
-			this_thread::disable_syscall_interruption dsi;
-			syscalls::killpg(*pid, SIGKILL);
-			syscalls::waitpid(*pid, NULL, 0);
-			*pid = -1;
-		}
-	}
-	
-	/**
-	 * Behaves like <tt>waitpid(pid, status, WNOHANG)</tt>, but waits at most
-	 * <em>timeout</em> miliseconds for the process to exit.
-	 */
-	static int timedWaitPid(pid_t pid, int *status, unsigned long long timeout) {
-		Timer timer;
-		int ret;
-		
-		do {
-			ret = syscalls::waitpid(pid, status, WNOHANG);
-			if (ret > 0 || ret == -1) {
-				return ret;
-			} else {
-				syscalls::usleep(10000);
-			}
-		} while (timer.elapsed() < timeout);
-		return 0; // timed out
-	}
-	
-	/**
-	 * Gracefully shutdown an agent process by sending an exit command to its socket.
-	 * Returns whether the agent has successfully processed the exit command.
-	 * Any exceptions are caught and will cause false to be returned.
-	 */
-	bool gracefullyShutdownAgent(const string &socketFilename, const string &username,
-	                             const string &password
-	) {
-		try {
-			MessageClient client;
-			vector<string> args;
-			
-			client.connect("unix:" + socketFilename, username, password);
-			client.write("exit", NULL);
-			return client.read(args) && args[0] == "Passed security" &&
-			       client.read(args) && args[0] == "exit command received";
-		} catch (const SystemException &) {
-		} catch (const IOException &) {
-		} catch (const SecurityException &) {
-		}
-		return false;
-	}
-	
-	string serializePrestartURLs(const set<string> &prestartURLs) const {
-		set<string>::const_iterator it;
-		string result;
-		
-		for (it = prestartURLs.begin(); it != prestartURLs.end(); it++) {
-			result.append(*it);
-			result.append(1, '\0');
-		}
-		return Base64::encode(result);
-	}
-	
-public:
-	/**
-	 * Construct a AgentsStarter object. The watchdog and the agents
-	 * aren't started yet until you call start().
-	 *
-	 * @param type Whether one wants to start the Apache or the Nginx helper agent.
-	 */
-	AgentsStarter(Type type) {
-		pid = 0;
-		loggingAgentRunningLocally = false;
-		this->type = type;
-	}
-	
-	~AgentsStarter() {
-		if (pid != 0) {
-			this_thread::disable_syscall_interruption dsi;
-			bool cleanShutdown = gracefullyShutdownAgent(messageSocketFilename,
-				"_web_server", messageSocketPassword);
-			if (loggingAgentRunningLocally) {
-				string filename = parseUnixSocketAddress(loggingSocketAddress);
-				cleanShutdown = cleanShutdown &&
-					gracefullyShutdownAgent(filename,
-						"logging", loggingSocketPassword);
-			}
-			
-			/* Send a message down the feedback fd to tell the watchdog
-			 * Whether this is a clean shutdown. Closing the fd without
-			 * sending anything also indicates an unclean shutdown,
-			 * but we send a byte anyway in case there are other processes
-			 * who have the fd open.
-			 */
-			if (cleanShutdown) {
-				syscalls::write(feedbackFd, "c", 1);
-			} else {
-				syscalls::write(feedbackFd, "u", 1);
-			}
-			
-			/* If we failed to send an exit command to one of the agents then we have
-			 * to forcefully kill all agents now because otherwise one of them might
-			 * never exit. We do this by closing the feedback fd without sending a
-			 * random byte, to indicate that this is an abnormal shutdown. The watchdog
-			 * will then kill all agents.
-			 */
-			
-			feedbackFd.close();
-			syscalls::waitpid(pid, NULL, 0);
-		}
-	}
-	
-	/**
-	 * Returns the type as was passed to the constructor.
-	 */
-	Type getType() const {
-		return type;
-	}
-	
-	/**
-	 * Returns the watchdog's PID. Equals 0 if the watchdog hasn't been started yet
-	 * or if detach() is called.
-	 */
-	pid_t getPid() const {
-		return pid;
-	}
-	
-	/**
-	 * The helper agent's request socket filename, on which it's listening
-	 * for SCGI requests.
-	 *
-	 * @pre getPid() != 0 && getType() == NGINX
-	 */
-	string getRequestSocketFilename() const {
-		return requestSocketFilename;
-	}
-	
-	/**
-	 * Returns the password for connecting to the request socket.
-	 *
-	 * @pre getPid() != 0 && getType() == NGINX
-	 */
-	string getRequestSocketPassword() const {
-		return requestSocketPassword;
-	}
-	
-	string getMessageSocketFilename() const {
-		return messageSocketFilename;
-	}
-	
-	string getMessageSocketPassword() const {
-		return messageSocketPassword;
-	}
-	
-	string getLoggingSocketAddress() const {
-		return loggingSocketAddress;
-	}
-	
-	string getLoggingSocketPassword() const {
-		return loggingSocketPassword;
-	}
-	
-	/**
-	 * Returns the server instance dir of the agents.
-	 *
-	 * @pre getPid() != 0
-	 */
-	ServerInstanceDirPtr getServerInstanceDir() const {
-		return serverInstanceDir;
-	}
-	
-	/**
-	 * Returns the generation dir of the agents.
-	 *
-	 * @pre getPid() != 0
-	 */
-	ServerInstanceDir::GenerationPtr getGeneration() const {
-		return generation;
-	}
-	
-	/**
-	 * Start the agents through the watchdog, with the given parameters.
-	 *
-	 * @throws SystemException Something went wrong.
-	 * @throws IOException Something went wrong while communicating with one
-	 *                     of the agents during its initialization phase.
-	 * @throws RuntimeException Something went wrong.
-	 */
-	void start(int logLevel, const string &debugLogFile,
-	           pid_t webServerPid, const string &tempDir,
-	           bool userSwitching, const string &defaultUser, const string &defaultGroup,
-	           uid_t webServerWorkerUid, gid_t webServerWorkerGid,
-	           const string &passengerRoot, const string &rubyCommand,
-	           unsigned int maxPoolSize, unsigned int maxInstancesPerApp,
-	           unsigned int poolIdleTime,
-	           const string &analyticsServer,
-	           const string &analyticsLogDir, const string &analyticsLogUser,
-	           const string &analyticsLogGroup, const string &analyticsLogPermissions,
-	           const string &unionStationGatewayAddress,
-	           unsigned short unionStationGatewayPort,
-	           const string &unionStationGatewayCert,
-	           const string &unionStationProxyAddress,
-	           const string &unionStationProxyType,
-	           const set<string> &prestartURLs,
-	           const function<void ()> &afterFork = function<void ()>())
-	{
-		TRACE_POINT();
-		this_thread::disable_interruption di;
-		this_thread::disable_syscall_interruption dsi;
-		ResourceLocator locator(passengerRoot);
-		
-		string realUnionStationGatewayCert;
-		if (unionStationGatewayCert.empty()) {
-			realUnionStationGatewayCert = locator.getResourcesDir() + "/union_station_gateway.crt";
-		} else if (unionStationGatewayCert != "-") {
-			realUnionStationGatewayCert = unionStationGatewayCert;
-		}
-		string watchdogFilename = locator.getAgentsDir() + "/PassengerWatchdog";
-		
-		VariantMap watchdogArgs;
-		watchdogArgs
-			.set    ("web_server_type", type == APACHE ? "apache" : "nginx")
-			.setInt ("log_level",       logLevel)
-			.set    ("debug_log_file",  debugLogFile)
-			.setPid ("web_server_pid",  webServerPid)
-			.set    ("temp_dir",        tempDir.empty() ? getSystemTempDir() : tempDir)
-			.setBool("user_switching",  userSwitching)
-			.set    ("default_user",    defaultUser)
-			.set    ("default_group",   defaultGroup)
-			.setUid ("web_server_worker_uid", webServerWorkerUid)
-			.setGid ("web_server_worker_gid", webServerWorkerGid)
-			.set    ("passenger_root",  passengerRoot)
-			.set    ("ruby",            rubyCommand)
-			.setInt ("max_pool_size",   maxPoolSize)
-			.setInt ("max_instances_per_app",     maxInstancesPerApp)
-			.setInt ("pool_idle_time",            poolIdleTime)
-			.set    ("analytics_server",          analyticsServer)
-			.set    ("analytics_log_dir",         analyticsLogDir)
-			.set    ("analytics_log_user",        analyticsLogUser)
-			.set    ("analytics_log_group",       analyticsLogGroup)
-			.set    ("analytics_log_permissions", analyticsLogPermissions)
-			.set    ("union_station_gateway_address",  unionStationGatewayAddress)
-			.setInt ("union_station_gateway_port", unionStationGatewayPort)
-			.set    ("union_station_gateway_cert", realUnionStationGatewayCert)
-			.set    ("union_station_proxy_address", unionStationProxyAddress)
-			.set    ("union_station_proxy_type",   unionStationProxyType)
-			.set    ("prestart_urls",   serializePrestartURLs(prestartURLs));
-		
-		SocketPair fds;
-		int e;
-		pid_t pid;
-		
-		fds = createUnixSocketPair();
-		pid = syscalls::fork();
-		if (pid == 0) {
-			// Child
-			
-			/* Become the session leader so that Apache can't kill the
-			 * watchdog with killpg() during shutdown, so that a
-			 * Ctrl-C only affects the web server, and so that
-			 * we can kill all of our subprocesses in a single killpg().
-			 */
-			setsid();
-			
-			// Make sure the feedback fd is 3 and close all file descriptors
-			// except stdin, stdout, stderr and 3.
-			syscalls::close(fds[0]);
-			installFeedbackFd(fds[1]);
-			closeAllFileDescriptors(FEEDBACK_FD);
-			
-			/* We don't know how the web server or the environment affect
-			 * signal handlers and the signal mask, so reset this stuff
-			 * just in case.
-			 */
-			resetSignalHandlersAndMask();
-			
-			if (afterFork) {
-				afterFork();
-			}
-			
-			execl(watchdogFilename.c_str(), "PassengerWatchdog", (char *) 0);
-			e = errno;
-			try {
-				writeArrayMessage(FEEDBACK_FD,
-					"exec error",
-					toString(e).c_str(),
-					NULL);
-				_exit(1);
-			} catch (...) {
-				fprintf(stderr, "Passenger AgentsStarter: could not execute %s: %s (%d)\n",
-					watchdogFilename.c_str(), strerror(e), e);
-				fflush(stderr);
-				_exit(1);
-			}
-		} else if (pid == -1) {
-			// Error
-			e = errno;
-			throw SystemException("Cannot fork a new process", e);
-		} else {
-			// Parent
-			UPDATE_TRACE_POINT();
-			FileDescriptor feedbackFd = fds[0];
-			vector<string> args;
-			bool result, allAgentsStarted;
-			
-			ServerInstanceDirPtr serverInstanceDir;
-			ServerInstanceDir::GenerationPtr generation;
-			ScopeGuard guard(boost::bind(&AgentsStarter::killProcessGroupAndWait, &pid, 0));
-			fds[1].close();
-			
-			
-			/****** Send arguments to watchdog through the feedback channel ******/
-			
-			UPDATE_TRACE_POINT();
-			/* Here we don't care about EPIPE and ECONNRESET errors. The watchdog
-			 * could have sent an error message over the feedback fd without
-			 * reading the arguments. We'll notice that later.
-			 */
-			try {
-				watchdogArgs.writeToFd(feedbackFd);
-			} catch (const SystemException &e) {
-				if (e.code() != EPIPE && e.code() != ECONNRESET) {
-					inspectWatchdogCrashReason(pid);
-				}
-			}
-			
-			
-			/****** Read basic startup information ******/
-			
-			this_thread::restore_interruption ri(di);
-			this_thread::restore_syscall_interruption rsi(dsi);
-			UPDATE_TRACE_POINT();
-			
-			try {
-				result = readArrayMessage(feedbackFd, args);
-			} catch (const SystemException &ex) {
-				if (ex.code() == ECONNRESET) {
-					inspectWatchdogCrashReason(pid);
-				} else {
-					killProcessGroupAndWait(&pid, 5000);
-					guard.clear();
-					throw SystemException("Unable to start the Phusion Passenger watchdog: "
-						"unable to read its startup information",
-						ex.code());
-				}
-			}
-			if (!result) {
-				UPDATE_TRACE_POINT();
-				inspectWatchdogCrashReason(pid);
-			}
-			
-			UPDATE_TRACE_POINT();
-			if (args[0] == "Basic startup info") {
-				if (args.size() == 3) {
-					serverInstanceDir.reset(new ServerInstanceDir(args[1], false));
-					generation = serverInstanceDir->getGeneration(atoi(args[2]));
-				} else {
-					throw IOException("Unable to start the Phusion Passenger watchdog: "
-						"it returned an invalid basic startup information message");
-				}
-			} else if (args[0] == "Watchdog startup error") {
-				killProcessGroupAndWait(&pid, 5000);
-				guard.clear();
-				throw RuntimeException("Unable to start the Phusion Passenger watchdog "
-					"because it encountered the following error during startup: " +
-					args[1]);
-			} else if (args[0] == "system error") {
-				killProcessGroupAndWait(&pid, 5000);
-				guard.clear();
-				throw SystemException(args[1], atoi(args[2]));
-			} else if (args[0] == "exec error") {
-				e = atoi(args[1]);
-				killProcessGroupAndWait(&pid, 5000);
-				guard.clear();
-				if (e == ENOENT) {
-					string passengerRootConfig;
-					if (type == APACHE) {
-						passengerRootConfig = "PassengerRoot";
-					} else {
-						passengerRootConfig = "passenger_root";
-					}
-					throw RuntimeException("Unable to start the Phusion Passenger watchdog "
-						"because its executable (" + watchdogFilename + ") does "
-						"not exist. This probably means that your Phusion Passenger "
-						"installation is broken or incomplete, or that your '" +
-						passengerRootConfig + "' directive is set to the wrong value. "
-						"Please reinstall Phusion Passenger or fix your '" +
-						passengerRootConfig + "' directive, whichever is applicable.");
-				} else {
-					throw SystemException("Unable to start the Phusion Passenger watchdog (" +
-						watchdogFilename + ")", e);
-				}
-			}
-			
-			
-			/****** Read agents startup information ******/
-			
-			UPDATE_TRACE_POINT();
-			allAgentsStarted = false;
-			
-			while (!allAgentsStarted) {
-				try {
-					UPDATE_TRACE_POINT();
-					result = readArrayMessage(feedbackFd, args);
-				} catch (const SystemException &ex) {
-					killProcessGroupAndWait(&pid, 5000);
-					guard.clear();
-					throw SystemException("Unable to start the Phusion Passenger watchdog: "
-						"unable to read all agent startup information",
-						ex.code());
-				}
-				if (!result) {
-					UPDATE_TRACE_POINT();
-					inspectWatchdogCrashReason(pid);
-				}
-				
-				if (args[0] == "HelperAgent info") {
-					UPDATE_TRACE_POINT();
-					if (args.size() == 5) {
-						this->pid = pid;
-						this->feedbackFd = feedbackFd;
-						requestSocketFilename   = args[1];
-						requestSocketPassword   = Base64::decode(args[2]);
-						messageSocketFilename   = args[3];
-						messageSocketPassword   = Base64::decode(args[4]);
-						this->serverInstanceDir = serverInstanceDir;
-						this->generation        = generation;
-					} else {
-						killProcessGroupAndWait(&pid, 5000);
-						guard.clear();
-						throw IOException("Unable to start the Phusion Passenger watchdog: "
-							"it returned an invalid initialization feedback message");
-					}
-				} else if (args[0] == "LoggingServer info") {
-					UPDATE_TRACE_POINT();
-					if (args.size() == 3) {
-						loggingAgentRunningLocally = true;
-						loggingSocketAddress  = args[1];
-						loggingSocketPassword = args[2];
-					} else {
-						killProcessGroupAndWait(&pid, 5000);
-						guard.clear();
-						throw IOException("Unable to start the Phusion Passenger watchdog: "
-							"it returned an invalid initialization feedback message");
-					}
-				} else if (args[0] == "All agents started") {
-					allAgentsStarted = true;
-				} else {
-					UPDATE_TRACE_POINT();
-					killProcessGroupAndWait(&pid, 5000);
-					guard.clear();
-					throw RuntimeException("One of the Passenger agents sent an unknown feedback message '" + args[0] + "'");
-				}
-			}
-			
-			guard.clear();
-		}
-	}
-	
-	/**
-	 * Close any file descriptors that this object has, and make it so that the destructor
-	 * doesn't try to shut down the agents.
-	 *
-	 * @post getPid() == 0
-	 */
-	void detach() {
-		feedbackFd.close();
-		pid = 0;
-	}
-};
-
-} // namespace Passenger
-
-#endif /* _PASSENGER_AGENTS_STARTER_HPP_ */
diff --git a/ext/common/ApplicationPool/Client.h b/ext/common/ApplicationPool/Client.h
deleted file mode 100644
index 1f81803..0000000
--- a/ext/common/ApplicationPool/Client.h
+++ /dev/null
@@ -1,788 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_APPLICATION_POOL_CLIENT_H_
-#define _PASSENGER_APPLICATION_POOL_CLIENT_H_
-
-#include <string>
-#include <vector>
-
-#include <boost/shared_ptr.hpp>
-#include <boost/thread.hpp>
-#include <oxt/system_calls.hpp>
-
-#include "Interface.h"
-#include "Pool.h"
-#include "../Exceptions.h"
-#include "../MessageChannel.h"
-#include "../Utils.h"
-
-namespace Passenger {
-namespace ApplicationPool {
-
-using namespace std;
-using namespace oxt;
-using namespace boost;
-
-// TODO: use MessageClient
-
-/* This source file follows the security guidelines written in Account.h. */
-
-/**
- * Allows one to access an ApplicationPool exposed through a socket by
- * ApplicationPool::Server.
- *
- * ApplicationPool::Client connects to an ApplicationPool server, and behaves
- * just as specified by ApplicationPool::Interface. It is *not* thread-safe;
- * each thread should create a seperate ApplicationPool::Client object instead.
- *
- * A single ApplicationPool::Client should not be shared among multiple threads,
- * not even with synchronization, because it can result in deadlocks. The server
- * handles each client connection with one server thread. Consider the following
- * scenario:
- * - Clients A and B share the same ApplicationPool::Client object, with
- *   synchronization.
- * - The pool size is 1.
- * - Client A calls get() and obtains a session.
- * - Client B calls get() with a different application root, and blocks, waiting
- *   until A is done. The server thread is also blocked on the same get() command.
- * - A is done and closes the session. This sends a 'session close' command to the
- *   server. The server thread is however blocked on B's get() and cannot respond
- *   to this session close command.
- * - As a result, the system is deadlocked.
- */
-class Client: public ApplicationPool::Interface {
-protected:
-	/**
-	 * Contains data shared between RemoteSession and ApplicationPool::Client.
-	 * Since RemoteSession and ApplicationPool::Client have different life times,
-	 * i.e. one may be destroyed before the other, they both use a smart pointer
-	 * that points to a SharedData. This way, the SharedData object is only
-	 * destroyed when both the RemoteSession and the ApplicationPool::Client object
-	 * have been destroyed.
-	 */
-	struct SharedData {
-		/**
-		 * The socket connection to the ApplicationPool server.
-		 */
-		FileDescriptor fd;
-		MessageChannel channel;
-		
-		SharedData(FileDescriptor _fd): fd(_fd), channel(fd) { }
-		
-		~SharedData() {
-			TRACE_POINT();
-			disconnect();
-		}
-		
-		bool connected() const {
-			return fd != -1;
-		}
-		
-		/**
-		 * Disconnect from the ApplicationPool server.
-		 */
-		void disconnect() {
-			TRACE_POINT();
-			this_thread::disable_syscall_interruption dsi;
-			fd = FileDescriptor();
-			channel = MessageChannel();
-		}
-	};
-	
-	typedef shared_ptr<SharedData> SharedDataPtr;
-	
-	/**
-	 * A communication stub for the Session object on the ApplicationPool server.
-	 * This class is not guaranteed to be thread-safe.
-	 */
-	class RemoteSession: public Session {
-	private:
-		SharedDataPtr data;
-		pid_t pid;
-		string socketType;
-		string socketName;
-		int id;
-		
-		/** The session's socket connection to the process. */
-		int fd;
-		bool isInitiated;
-		
-	public:
-		RemoteSession(SharedDataPtr data, pid_t pid, const string &socketType,
-		              const string &socketName, const string &detachKey,
-		              const string &connectPassword, const string &gupid,
-		              int id)
-		{
-			this->data = data;
-			this->pid = pid;
-			this->socketType = socketType;
-			this->socketName = socketName;
-			this->detachKey  = detachKey;
-			this->connectPassword = connectPassword;
-			this->gupid      = gupid;
-			this->id = id;
-			fd = -1;
-			isInitiated = false;
-		}
-		
-		virtual ~RemoteSession() {
-			closeStream();
-			if (data->connected()) {
-				data->channel.write("close", toString(id).c_str(), NULL);
-			}
-		}
-		
-		virtual void initiate() {
-			TRACE_POINT();
-			if (socketType == "unix") {
-				fd = connectToUnixServer(socketName.c_str());
-			} else {
-				vector<string> args;
-				
-				split(socketName, ':', args);
-				if (args.size() != 2 || atoi(args[1]) == 0) {
-					throw IOException("Invalid TCP/IP address '" + socketName + "'");
-				}
-				fd = connectToTcpServer(args[0].c_str(), atoi(args[1]));
-			}
-			isInitiated = true;
-		}
-		
-		virtual bool initiated() const {
-			return isInitiated;
-		}
-		
-		virtual string getSocketType() const {
-			return socketType;
-		}
-
-		virtual string getSocketName() const {
-			return socketName;
-		}
-		
-		virtual int getStream() const {
-			return fd;
-		}
-		
-		virtual void shutdownReader() {
-			if (fd != -1) {
-				int ret = syscalls::shutdown(fd, SHUT_RD);
-				if (ret == -1) {
-					throw SystemException("Cannot shutdown the reader stream",
-						errno);
-				}
-			}
-		}
-		
-		virtual void shutdownWriter() {
-			if (fd != -1) {
-				int ret = syscalls::shutdown(fd, SHUT_WR);
-				if (ret == -1) {
-					throw SystemException("Cannot shutdown the writer stream",
-						errno);
-				}
-			}
-		}
-		
-		virtual void closeStream() {
-			if (fd != -1) {
-				int ret = syscalls::close(fd);
-				fd = -1;
-				if (ret == -1) {
-					if (errno == EIO) {
-						throw SystemException("A write operation on the session stream failed",
-							errno);
-					} else {
-						throw SystemException("Cannot close the session stream",
-							errno);
-					}
-				}
-			}
-		}
-		
-		virtual void discardStream() {
-			fd = -1;
-		}
-		
-		virtual pid_t getPid() const {
-			return pid;
-		}
-	};
-	
-	/** @invariant data != NULL */
-	SharedDataPtr data;
-	
-	/* sendUsername() and sendPassword() exist and are virtual in order to facilitate unit testing. */
-	
-	virtual void sendUsername(MessageChannel &channel, const string &username) {
-		TRACE_POINT();
-		channel.writeScalar(username);
-	}
-	
-	virtual void sendPassword(MessageChannel &channel, const StaticString &userSuppliedPassword) {
-		TRACE_POINT();
-		channel.writeScalar(userSuppliedPassword.c_str(), userSuppliedPassword.size());
-	}
-	
-	/**
-	 * Authenticate to the server with the given username and password.
-	 *
-	 * @throws SystemException An error occurred while reading data from or sending data to the server.
-	 * @throws IOException An error occurred while reading data from or sending data to the server.
-	 * @throws SecurityException The server denied authentication.
-	 * @throws boost::thread_interrupted
-	 */
-	void authenticate(const string &username, const StaticString &userSuppliedPassword) {
-		TRACE_POINT();
-		MessageChannel &channel(data->channel);
-		vector<string> args;
-		
-		sendUsername(channel, username);
-		sendPassword(channel, userSuppliedPassword);
-		
-		UPDATE_TRACE_POINT();
-		if (!channel.read(args)) {
-			throw IOException("The ApplicationPool server did not send an authentication response.");
-		} else if (args.size() != 1) {
-			throw IOException("The authentication response that the ApplicationPool server sent is not valid.");
-		} else if (args[0] != "ok") {
-			throw SecurityException("The ApplicationPool server denied authentication: " + args[0]);
-		}
-	}
-	
-	void checkConnection() const {
-		if (data == NULL) {
-			throw RuntimeException("connect() hasn't been called on this ApplicationPool::Client instance.");
-		} else if (!data->connected()) {
-			throw IOException("The connection to the ApplicationPool server is closed.");
-		}
-	}
-	
-	bool checkSecurityResponse() const {
-		vector<string> args;
-		
-		if (data->channel.read(args)) {
-			if (args[0] == "SecurityException") {
-				throw SecurityException(args[1]);
-			} else if (args[0] != "Passed security") {
-				throw IOException("Invalid security response '" + args[0] + "'");
-			} else {
-				return true;
-			}
-		} else {
-			return false;
-		}
-	}
-	
-	void sendGetCommand(const PoolOptions &options, vector<string> &reply) {
-		TRACE_POINT();
-		MessageChannel &channel(data->channel);
-		bool result;
-		bool serverMightNeedEnvironmentVariables = true;
-		
-		/* Send a 'get' request to the ApplicationPool server.
-		 * For efficiency reasons, we do not send the data for
-		 * options.environmentVariables over the wire yet until
-		 * it's necessary.
-		 */
-		try {
-			vector<string> args;
-			
-			args.push_back("get");
-			options.toVector(args, false);
-			channel.write(args);
-		} catch (SystemException &e) {
-			this_thread::disable_syscall_interruption dsi;
-			UPDATE_TRACE_POINT();
-			data->disconnect();
-			
-			e.setBriefMessage("Could not send the 'get' command to the ApplicationPool server: " +
-				e.brief());
-			throw;
-		} catch (...) {
-			this_thread::disable_syscall_interruption dsi;
-			UPDATE_TRACE_POINT();
-			data->disconnect();
-			throw;
-		}
-		
-		/* Now check the security response... */
-		UPDATE_TRACE_POINT();
-		try {
-			checkSecurityResponse();
-		} catch (SystemException &e) {
-			this_thread::disable_syscall_interruption dsi;
-			UPDATE_TRACE_POINT();
-			data->disconnect();
-			
-			e.setBriefMessage("Could not read security response for the 'get' command from the ApplicationPool server: " +
-				e.brief());
-			throw;
-		} catch (const SecurityException &) {
-			// Don't disconnect.
-			throw;
-		} catch (...) {
-			this_thread::disable_syscall_interruption dsi;
-			UPDATE_TRACE_POINT();
-			data->disconnect();
-			throw;
-		}
-		
-		/* After the security response, the first few replies from the server might
-		 * be for requesting environment variables in the pool options object, so
-		 * keep handling these requests until we receive a different reply.
-		 */
-		while (serverMightNeedEnvironmentVariables) {
-			try {
-				result = channel.read(reply);
-			} catch (const SystemException &e) {
-				this_thread::disable_syscall_interruption dsi;
-				UPDATE_TRACE_POINT();
-				data->disconnect();
-				throw SystemException("Could not read a response from "
-					"the ApplicationPool server for the 'get' command", e.code());
-			} catch (...) {
-				this_thread::disable_syscall_interruption dsi;
-				UPDATE_TRACE_POINT();
-				data->disconnect();
-				throw;
-			}
-			if (!result) {
-				this_thread::disable_syscall_interruption dsi;
-				UPDATE_TRACE_POINT();
-				data->disconnect();
-				throw IOException("The ApplicationPool server unexpectedly "
-					"closed the connection while we're reading a response "
-					"for the 'get' command.");
-			}
-			
-			if (reply[0] == "getEnvironmentVariables") {
-				try {
-					if (options.environmentVariables) {
-						UPDATE_TRACE_POINT();
-						channel.writeScalar(options.serializeEnvironmentVariables());
-					} else {
-						UPDATE_TRACE_POINT();
-						channel.writeScalar("");
-					}
-				} catch (SystemException &e) {
-					this_thread::disable_syscall_interruption dsi;
-					data->disconnect();
-					e.setBriefMessage("Could not send a response "
-						"for the 'getEnvironmentVariables' request "
-						"to the ApplicationPool server");
-					throw;
-				} catch (...) {
-					UPDATE_TRACE_POINT();
-					this_thread::disable_syscall_interruption dsi;
-					data->disconnect();
-					throw;
-				}
-			} else {
-				serverMightNeedEnvironmentVariables = false;
-			}
-		}
-	}
-	
-public:
-	/**
-	 * Create a new ApplicationPool::Client object. It doesn't actually connect to the server until
-	 * you call connect().
-	 */
-	Client() {
-		/* The reason why we don't connect right away is because we want to make
-		 * certain methods virtual for unit testing purposes. We can't call
-		 * virtual methods in the constructor. :-(
-		 */
-	}
-	
-	/**
-	 * Connect to the given ApplicationPool server. You may only call this method once per
-	 * instance.
-	 *
-	 * @param socketFilename The filename of the server socket to connect to.
-	 * @param username The username to use for authenticating with the server.
-	 * @param userSuppliedPassword The password to use for authenticating with the server.
-	 * @return this
-	 * @throws SystemException Something went wrong while connecting to the server.
-	 * @throws IOException Something went wrong while connecting to the server.
-	 * @throws RuntimeException Something went wrong.
-	 * @throws SecurityException Unable to authenticate to the server with the given username and password.
-	 *                           You may call connect() again with a different username/password.
-	 * @throws boost::thread_interrupted
-	 * @post connected()
-	 */
-	Client *connect(const string &socketFilename, const string &username, const StaticString &userSuppliedPassword) {
-		TRACE_POINT();
-		FileDescriptor fd = connectToUnixServer(socketFilename.c_str());
-		UPDATE_TRACE_POINT();
-		data = ptr(new SharedData(fd));
-		
-		UPDATE_TRACE_POINT();
-		vector<string> args;
-		if (!data->channel.read(args)) {
-			throw IOException("The ApplicationPool server closed the connection before sending a version identifier.");
-		}
-		if (args.size() != 2 || args[0] != "version") {
-			throw IOException("The ApplicationPool server didn't sent a valid version identifier.");
-		}
-		if (args[1] != "1") {
-			string message = string("Unsupported message server protocol version ") +
-				args[1] + ".";
-			throw IOException(message);
-		}
-		
-		UPDATE_TRACE_POINT();
-		authenticate(username, userSuppliedPassword);
-		return this;
-	}
-	
-	virtual bool connected() const {
-		if (data == NULL) {
-			throw RuntimeException("connect() hasn't been called on this ApplicationPool::Client instance.");
-		}
-		return data->connected();
-	}
-	
-	virtual bool detach(const string &detachKey) {
-		TRACE_POINT();
-		checkConnection();
-		MessageChannel &channel(data->channel);
-		vector<string> args;
-		
-		try {
-			channel.write("detach", detachKey.c_str(), NULL);
-			checkSecurityResponse();
-			if (!channel.read(args)) {
-				throw IOException("Could not read a response from the ApplicationPool server "
-					"for the 'detach' command: the connection was closed unexpectedly");
-			}
-			return args[0] == "true";
-		} catch (const SecurityException &) {
-			// Don't disconnect.
-			throw;
-		} catch (...) {
-			this_thread::disable_syscall_interruption dsi;
-			data->disconnect();
-			throw;
-		}
-	}
-	
-	virtual void clear() {
-		TRACE_POINT();
-		checkConnection();
-		MessageChannel &channel(data->channel);
-		try {
-			channel.write("clear", NULL);
-			checkSecurityResponse();
-		} catch (const SecurityException &) {
-			// Don't disconnect.
-			throw;
-		} catch (...) {
-			this_thread::disable_syscall_interruption dsi;
-			data->disconnect();
-			throw;
-		}
-	}
-	
-	virtual void setMaxIdleTime(unsigned int seconds) {
-		TRACE_POINT();
-		checkConnection();
-		MessageChannel &channel(data->channel);
-		try {
-			channel.write("setMaxIdleTime", toString(seconds).c_str(), NULL);
-			checkSecurityResponse();
-		} catch (const SecurityException &) {
-			// Don't disconnect.
-			throw;
-		} catch (...) {
-			this_thread::disable_syscall_interruption dsi;
-			data->disconnect();
-			throw;
-		}
-	}
-	
-	virtual void setMax(unsigned int max) {
-		TRACE_POINT();
-		checkConnection();
-		MessageChannel &channel(data->channel);
-		try {
-			channel.write("setMax", toString(max).c_str(), NULL);
-			checkSecurityResponse();
-		} catch (const SecurityException &) {
-			// Don't disconnect.
-			throw;
-		} catch (...) {
-			this_thread::disable_syscall_interruption dsi;
-			data->disconnect();
-			throw;
-		}
-	}
-	
-	virtual unsigned int getActive() const {
-		TRACE_POINT();
-		checkConnection();
-		MessageChannel &channel(data->channel);
-		vector<string> args;
-		
-		try {
-			channel.write("getActive", NULL);
-			checkSecurityResponse();
-			channel.read(args);
-			return atoi(args[0].c_str());
-		} catch (const SecurityException &) {
-			// Don't disconnect.
-			throw;
-		} catch (...) {
-			this_thread::disable_syscall_interruption dsi;
-			data->disconnect();
-			throw;
-		}
-	}
-	
-	virtual unsigned int getCount() const {
-		TRACE_POINT();
-		checkConnection();
-		MessageChannel &channel(data->channel);
-		vector<string> args;
-		
-		try {
-			channel.write("getCount", NULL);
-			checkSecurityResponse();
-			channel.read(args);
-			return atoi(args[0].c_str());
-		} catch (const SecurityException &) {
-			// Don't disconnect.
-			throw;
-		} catch (...) {
-			this_thread::disable_syscall_interruption dsi;
-			data->disconnect();
-			throw;
-		}
-	}
-	
-	virtual unsigned int getGlobalQueueSize() const {
-		TRACE_POINT();
-		checkConnection();
-		MessageChannel &channel(data->channel);
-		vector<string> args;
-		
-		try {
-			channel.write("getGlobalQueueSize", NULL);
-			checkSecurityResponse();
-			channel.read(args);
-			return atoi(args[0].c_str());
-		} catch (const SecurityException &) {
-			// Don't disconnect.
-			throw;
-		} catch (...) {
-			this_thread::disable_syscall_interruption dsi;
-			data->disconnect();
-			throw;
-		}
-	}
-	
-	virtual void setMaxPerApp(unsigned int max) {
-		TRACE_POINT();
-		checkConnection();
-		MessageChannel &channel(data->channel);
-		
-		try {
-			channel.write("setMaxPerApp", toString(max).c_str(), NULL);
-			checkSecurityResponse();
-		} catch (const SecurityException &) {
-			// Don't disconnect.
-			throw;
-		} catch (...) {
-			this_thread::disable_syscall_interruption dsi;
-			data->disconnect();
-			throw;
-		}
-	}
-	
-	virtual pid_t getSpawnServerPid() const {
-		TRACE_POINT();
-		checkConnection();
-		MessageChannel &channel(data->channel);
-		vector<string> args;
-		
-		try {
-			channel.write("getSpawnServerPid", NULL);
-			checkSecurityResponse();
-			channel.read(args);
-			return atoi(args[0].c_str());
-		} catch (const SecurityException &) {
-			// Don't disconnect.
-			throw;
-		} catch (...) {
-			this_thread::disable_syscall_interruption dsi;
-			data->disconnect();
-			throw;
-		}
-	}
-	
-	virtual string inspect() const {
-		TRACE_POINT();
-		checkConnection();
-		MessageChannel &channel(data->channel);
-		string result;
-		
-		try {
-			channel.write("inspect", NULL);
-			checkSecurityResponse();
-			// TODO: in many of these methods we do not check for EOF
-			// out of laziness. Should probably be fixed in the future?
-			channel.readScalar(result);
-			return result;
-		} catch (const SecurityException &) {
-			// Don't disconnect.
-			throw;
-		} catch (...) {
-			this_thread::disable_syscall_interruption dsi;
-			data->disconnect();
-			throw;
-		}
-	}
-	
-	virtual string toXml(bool includeSensitiveInformation = true) const {
-		TRACE_POINT();
-		checkConnection();
-		MessageChannel &channel(data->channel);
-		string result;
-		
-		try {
-			channel.write("toXml", includeSensitiveInformation ? "true" : "false", NULL);
-			checkSecurityResponse();
-			channel.readScalar(result);
-			return result;
-		} catch (const SecurityException &) {
-			// Don't disconnect.
-			throw;
-		} catch (...) {
-			this_thread::disable_syscall_interruption dsi;
-			data->disconnect();
-			throw;
-		}
-	}
-	
-	virtual SessionPtr get(const PoolOptions &options) {
-		TRACE_POINT();
-		MessageChannel &channel(data->channel);
-		checkConnection();
-		vector<string> reply;
-		bool result;
-		unsigned int attempts = 0;
-		
-		while (true) {
-			attempts++;
-			sendGetCommand(options, reply);
-			
-			if (reply[0] == "ok") {
-				UPDATE_TRACE_POINT();
-				pid_t pid = (pid_t) atol(reply[1]);
-				string socketType = reply[2];
-				string socketName = reply[3];
-				string detachKey = reply[4];
-				string connectPassword = reply[5];
-				string gupid = reply[6];
-				int sessionID = atoi(reply[7]);
-				
-				SessionPtr session(new RemoteSession(data, pid, socketType, socketName,
-					detachKey, connectPassword, gupid, sessionID));
-				if (options.initiateSession) {
-					try {
-						session->initiate();
-						return session;
-					} catch (SystemException &e) {
-						P_TRACE(2, "Exception occurred while connecting to checked out "
-							"process " << pid << ": " << e.what());
-						detach(detachKey);
-						if (attempts == Pool::MAX_GET_ATTEMPTS) {
-							e.setBriefMessage(
-								"Cannot initiate a session with process " +
-								toString(pid) + ": " + e.brief());
-							throw;
-						} // else retry
-					} catch (const thread_interrupted &) {
-						throw;
-					} catch (const std::exception &e) {
-						P_TRACE(2, "Exception occurred while connecting to checked out "
-							"process " << pid << ": " << e.what());
-						detach(detachKey);
-						if (attempts == Pool::MAX_GET_ATTEMPTS) {
-							throw;
-						} // else retry
-					}
-				} else {
-					return session;
-				}
-			} else if (reply[0] == "SpawnException") {
-				UPDATE_TRACE_POINT();
-				if (reply[2] == "true") {
-					string errorPage;
-
-					try {
-						result = channel.readScalar(errorPage);
-					} catch (...) {
-						this_thread::disable_syscall_interruption dsi;
-						data->disconnect();
-						throw;
-					}
-					if (!result) {
-						throw IOException("The ApplicationPool server "
-							"unexpectedly closed the connection while "
-							"we're reading the error page data.");
-					} else {
-						throw SpawnException(reply[1], errorPage);
-					}
-				} else {
-					throw SpawnException(reply[1]);
-				}
-			} else if (reply[0] == "BusyException") {
-				UPDATE_TRACE_POINT();
-				throw BusyException(reply[1]);
-			} else if (reply[0] == "IOException") {
-				this_thread::disable_syscall_interruption dsi;
-				UPDATE_TRACE_POINT();
-				data->disconnect();
-				throw IOException(reply[1]);
-			} else {
-				this_thread::disable_syscall_interruption dsi;
-				UPDATE_TRACE_POINT();
-				data->disconnect();
-				throw IOException("The ApplicationPool server returned "
-					"an unknown message: " + toString(reply));
-			}
-		}
-	}
-};
-
-typedef shared_ptr<Client> ClientPtr;
-
-
-} // namespace ApplicationPool
-} // namespace Passenger
-
-#endif /* _PASSENGER_APPLICATION_POOL_CLIENT_H_ */
diff --git a/ext/common/ApplicationPool/Interface.h b/ext/common/ApplicationPool/Interface.h
deleted file mode 100644
index 70d8576..0000000
--- a/ext/common/ApplicationPool/Interface.h
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_APPLICATION_POOL_INTERFACE_H_
-#define _PASSENGER_APPLICATION_POOL_INTERFACE_H_
-
-#include <boost/shared_ptr.hpp>
-#include <sys/types.h>
-
-#include "../Session.h"
-#include "../PoolOptions.h"
-
-namespace Passenger {
-namespace ApplicationPool {
-
-using namespace std;
-using namespace boost;
-
-/**
- * A persistent pool of Applications.
- *
- * Spawning application instances, especially Ruby on Rails ones, is a very expensive operation.
- * Despite best efforts to make the operation less expensive (see SpawnManager),
- * it remains expensive compared to the cost of processing an HTTP request/response.
- * So, in order to solve this, some sort of caching/pooling mechanism will be required.
- * ApplicationPool provides this.
- *
- * Normally, one would use SpawnManager to spawn a new RoR/Rack application instance,
- * then use Application::connect() to create a new session with that application
- * instance, and then use the returned Session object to send the request and
- * to read the HTTP response. ApplicationPool replaces the first step with
- * a call to Application::get(). For example:
- * @code
- *   ApplicationPool pool = some_function_which_creates_an_application_pool();
- *   
- *   // Connect to the application and get the newly opened session.
- *   Application::SessionPtr session(pool->get("/home/webapps/foo"));
- *   
- *   // Send the request headers and request body data.
- *   session->sendHeaders(...);
- *   session->sendBodyBlock(...);
- *   // Done sending data, so we shutdown the writer stream.
- *   session->shutdownWriter();
- *
- *   // Now read the HTTP response.
- *   string responseData = readAllDataFromSocket(session->getStream());
- *   // Done reading data, so we shutdown the reader stream.
- *   session->shutdownReader();
- *
- *   // This session has now finished, so we close the session by resetting
- *   // the smart pointer to NULL (thereby destroying the Session object).
- *   session.reset();
- *
- *   // We can connect to an Application multiple times. Just make sure
- *   // the previous session is closed.
- *   session = app->connect("/home/webapps/bar");
- * @endcode
- *
- * Internally, ApplicationPool::get() will keep spawned applications instances in
- * memory, and reuse them if possible. It will try to keep spawning to a minimum.
- * Furthermore, if an application instance hasn't been used for a while, it
- * will be automatically shutdown in order to save memory. Restart requests are
- * honored: if an application has the file 'restart.txt' in its 'tmp' folder,
- * then get() will shutdown existing instances of that application and spawn
- * a new instance (this is useful when a new version of an application has been
- * deployed). And finally, one can set a hard limit on the maximum number of
- * applications instances that may be spawned (see ApplicationPool::setMax()).
- *
- * Note that ApplicationPool is just an interface (i.e. a pure virtual class).
- * For concrete classes, see StandardApplicationPool and ApplicationPoolServer.
- * The exact pooling algorithm depends on the implementation class.
- *
- * ApplicationPool is *not* guaranteed to be thread-safe. See the documentation
- * for concrete implementations to find out whether that particular implementation
- * is thread-safe.
- *
- * @ingroup Support
- */
-class Interface {
-public:
-	virtual ~Interface() {};
-	
-	/**
-	 * Checks whether this ApplicationPool object is still connected to the
-	 * ApplicationPool server.
-	 *
-	 * If that's not the case, then one should reconnect to the ApplicationPool server.
-	 *
-	 * This method is only meaningful for instances of type ApplicationPoolServer::Client.
-	 * The default implementation always returns true.
-	 */
-	virtual bool connected() const {
-		return true;
-	}
-	
-	/**
-	 * Open a new session with the application specified by <tt>PoolOptions.appRoot</tt>.
-	 * See the class description for ApplicationPool, as well as Application::connect(),
-	 * on how to use the returned session object.
-	 *
-	 * Internally, this method may either spawn a new application instance, or use
-	 * an existing one.
-	 *
-	 * @param options An object containing information on which application to open
-	 *             a session with, as well as spawning details. Spawning details will be used
-	 *             if the pool decides that spawning a new application instance is necessary.
-	 *             See SpawnManager and PoolOptions for details.
-	 * @return A session object.
-	 * @throws SpawnException An attempt was made to spawn a new application instance, but that attempt failed.
-	 * @throws BusyException The application pool is too busy right now, and cannot
-	 *       satisfy the request. One should either abort, or try again later.
-	 * @throws SystemException Something else went wrong.
-	 * @throws IOException Something else went wrong.
-	 * @throws boost::thread_interrupted
-	 * @throws Anything thrown by options.environmentVariables->getItems().
-	 * @note Applications are uniquely identified with the application root
-	 *       string. So although <tt>appRoot</tt> does not have to be absolute, it
-	 *       should be. If one calls <tt>get("/home/foo")</tt> and
-	 *       <tt>get("/home/../home/foo")</tt>, then ApplicationPool will think
-	 *       they're 2 different applications, and thus will spawn 2 application instances.
-	 */
-	virtual SessionPtr get(const PoolOptions &options) = 0;
-	
-	/**
-	 * Convenience shortcut for calling get() with default spawn options.
-	 *
-	 * @throws SpawnException
-	 * @throws IOException
-	 * @throws SystemException
-	 * @throws boost::thread_interrupted
-	 * @throws Anything thrown by options.environmentVariables->getItems().
-	 */
-	virtual SessionPtr get(const string &appRoot) {
-		return get(PoolOptions(appRoot));
-	}
-	
-	/**
-	 * Detach the process with the given identifier from this pool.
-	 *
-	 * The identifier can be obtained from a session through the
-	 * getPoolIdentifier() method.
-	 *
-	 * @param identifier The identifier.
-	 * @returns Whether there was a process in the pool with the given identifier.
-	 * @throws IOException
-	 * @throws SystemException
-	 * @throws boost::thread_interrupted
-	 */
-	virtual bool detach(const string &identifier) = 0;
-	
-	/**
-	 * Clear all application instances that are currently in the pool.
-	 *
-	 * This method is used by unit tests to verify that the implementation is correct,
-	 * and thus should not be called directly.
-	 *
-	 * @throws IOException
-	 * @throws SystemException
-	 * @throws boost::thread_interrupted
-	 */
-	virtual void clear() = 0;
-	
-	/**
-	 * Set the maximum idle time for application instances. Application instances
-	 * that haven't received any requests in <tt>seconds</tt> seconds will be shut
-	 * down.
-	 *
-	 * A value of 0 means that the application instances will not idle timeout.
-	 *
-	 * @throws IOException
-	 * @throws SystemException
-	 * @throws boost::thread_interrupted
-	 */
-	virtual void setMaxIdleTime(unsigned int seconds) = 0;
-	
-	/**
-	 * Set a hard limit on the number of application instances that this ApplicationPool
-	 * may spawn. The exact behavior depends on the used algorithm, and is not specified by
-	 * these API docs.
-	 *
-	 * It is allowed to set a limit lower than the current number of spawned applications.
-	 *
-	 * @throws IOException
-	 * @throws SystemException
-	 * @throws boost::thread_interrupted
-	 */
-	virtual void setMax(unsigned int max) = 0;
-	
-	/**
-	 * Get the number of active applications in the pool.
-	 *
-	 * This method exposes an implementation detail of the underlying pooling algorithm.
-	 * It is used by unit tests to verify that the implementation is correct,
-	 * and thus should not be called directly.
-	 *
-	 * @throws IOException
-	 * @throws SystemException
-	 * @throws boost::thread_interrupted
-	 */
-	virtual unsigned int getActive() const = 0;
-	
-	/**
-	 * Get the number of active applications in the pool.
-	 *
-	 * This method exposes an implementation detail of the underlying pooling algorithm.
-	 * It is used by unit tests to verify that the implementation is correct,
-	 * and thus should not be called directly.
-	 *
-	 * @throws IOException
-	 * @throws SystemException
-	 * @throws boost::thread_interrupted
-	 */
-	virtual unsigned int getCount() const = 0;
-	
-	/**
-	 * Returns the number of clients waiting on the global queue.
-	 *
-	 * This method exposes an implementation detail of the underlying pooling algorithm.
-	 * It is used by unit tests to verify that the implementation is correct,
-	 * and thus should not be called directly.
-	 *
-	 * @throws IOException
-	 * @throws SystemException
-	 * @throws boost::thread_interrupted
-	 */
-	virtual unsigned int getGlobalQueueSize() const = 0;
-	
-	/**
-	 * Set a hard limit on the number of application instances that a single application
-	 * may spawn in this ApplicationPool. The exact behavior depends on the used algorithm, 
-	 * and is not specified by these API docs.
-	 *
-	 * It is allowed to set a limit lower than the current number of spawned applications.
-	 *
-	 * @throws IOException
-	 * @throws SystemException
-	 * @throws boost::thread_interrupted
-	 */
-	virtual void setMaxPerApp(unsigned int max) = 0;
-	
-	/**
-	 * Get the process ID of the spawn server that is used.
-	 *
-	 * This method exposes an implementation detail. It is used by unit tests to verify
-	 * that the implementation is correct, and thus should not be used directly.
-	 *
-	 * @throws IOException
-	 * @throws SystemException
-	 * @throws boost::thread_interrupted
-	 */
-	virtual pid_t getSpawnServerPid() const = 0;
-	
-	/**
-	 * Returns a human-readable description of the internal state
-	 * of the application pool.
-	 */
-	virtual string inspect() const = 0;
-	
-	/**
-	 * Returns an XML description of the internal state of the
-	 * application pool.
-	 *
-	 * @param includeSensitiveInformation Whether potentially sensitive
-	 *     information may be included in the result.
-	 */
-	virtual string toXml(bool includeSensitiveInformation = true) const = 0;
-};
-
-typedef shared_ptr<Interface> Ptr;
-
-} // namespace ApplicationPool
-} // namespace Passenger
-
-#endif /* _PASSENGER_APPLICATION_POOL_INTERFACE_H_ */
diff --git a/ext/common/ApplicationPool/Pool.h b/ext/common/ApplicationPool/Pool.h
deleted file mode 100644
index 8c87ad5..0000000
--- a/ext/common/ApplicationPool/Pool.h
+++ /dev/null
@@ -1,1327 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_APPLICATION_POOL_POOL_H_
-#define _PASSENGER_APPLICATION_POOL_POOL_H_
-
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-#include <boost/thread.hpp>
-#include <boost/bind.hpp>
-#include <boost/date_time/microsec_time_clock.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
-
-#include <oxt/system_calls.hpp>
-#include <oxt/backtrace.hpp>
-#include <oxt/thread.hpp>
-
-#include <string>
-#include <sstream>
-#include <map>
-#include <list>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <ctime>
-#include <cerrno>
-#include <cassert>
-#ifdef TESTING_APPLICATION_POOL
-	#include <cstdlib>
-#endif
-
-#include "Interface.h"
-#include "../Logging.h"
-#include "../SpawnManager.h"
-#include "../Constants.h"
-#include "../Utils/SystemTime.h"
-#include "../Utils/FileChangeChecker.h"
-#include "../Utils/CachedFileStat.hpp"
-#include "../Utils/ProcessMetricsCollector.h"
-
-namespace Passenger {
-namespace ApplicationPool {
-
-using namespace std;
-using namespace boost;
-using namespace oxt;
-
-// Forward declaration for ApplicationPool::Server.
-class Server;
-
-/****************************************************************
- *
- *  See "doc/ApplicationPool algorithm.txt" for a more readable
- *  and detailed description of the algorithm implemented here.
- *
- ****************************************************************/
-
-/**
- * A standard implementation of ApplicationPool::Interface for single-process environments.
- *
- * The environment may or may not be multithreaded - ApplicationPool::Pool is completely
- * thread-safe. Apache with the threading MPM is an example of a multithreaded single-process
- * environment.
- *
- * This class is unusable in multi-process environments such as Apache with the prefork MPM.
- * The reasons are as follows:
- *  - ApplicationPool::Pool uses threads internally. Because threads disappear after a fork(),
- *    an ApplicationPool::Pool object will become unusable after a fork().
- *  - ApplicationPool::Pool stores its internal cache on the heap. Different processes
- *    cannot share their heaps, so they will not be able to access each others' pool cache.
- *  - ApplicationPool::Pool has a connection to the spawn server. If there are multiple
- *    processes, and they all use the spawn servers's connection at the same time without
- *    some sort of synchronization, then bad things will happen.
- *
- * (Of course, ApplicationPool::Pool <em>is</em> usable if each process creates its own
- * ApplicationPool::Pool object, but that would defeat the point of having a shared pool.)
- *
- * For multi-process environments, one should use ApplicationPool::Server +
- * ApplicationPool::Client instead.
- *
- * ApplicationPool::Pool is fully thread-safe.
- *
- * @ingroup Support
- */
-class Pool: public ApplicationPool::Interface {
-public:
-	static const int CLEANER_THREAD_STACK_SIZE = 1024 * 64;
-	static const int SPAWNER_THREAD_STACK_SIZE = 1024 * 64;
-	static const int ANALYTICS_COLLECTION_THREAD_STACK_SIZE = 1024 * 64;
-	static const unsigned int MAX_GET_ATTEMPTS = 10;
-
-private:
-	struct Group;
-	struct ProcessInfo;
-	
-	typedef shared_ptr<Group> GroupPtr;
-	typedef shared_ptr<ProcessInfo> ProcessInfoPtr;
-	typedef list<ProcessInfoPtr> ProcessInfoList;
-	typedef map<string, GroupPtr> GroupMap;
-	
-	struct Group {
-		string name;
-		string appRoot;
-		ProcessInfoList processes;
-		unsigned int size;
-		bool detached;
-		unsigned long maxRequests;
-		unsigned long minProcesses;
-		bool spawning;
-		shared_ptr<oxt::thread> spawnerThread;
-		string environment;
-		bool analytics;
-		string unionStationKey;
-		
-		/*****************/
-		/*****************/
-		
-		Group() {
-			size         = 0;
-			detached     = false;
-			maxRequests  = 0;
-			minProcesses = 0;
-			spawning     = false;
-			analytics    = false;
-			/*****************/
-		}
-	};
-	
-	struct ProcessInfo {
-		ProcessPtr process;
-		string groupName;
-		unsigned long long startTime;
-		time_t lastUsed;
-		unsigned int sessions;
-		unsigned int processed;
-		ProcessInfoList::iterator iterator;
-		ProcessInfoList::iterator ia_iterator;
-		bool detached;
-		ProcessMetrics metrics;
-		
-		/****************/
-		/****************/
-		
-		ProcessInfo() {
-			startTime  = SystemTime::getMsec();
-			lastUsed   = 0;
-			sessions   = 0;
-			processed  = 0;
-			detached   = false;
-			/*****************/
-		}
-		
-		/**
-		 * Returns the uptime of this process so far, as a string.
-		 */
-		string uptime() const {
-			unsigned long long seconds = (unsigned long long) time(NULL) - startTime / 1000;
-			stringstream result;
-			
-			if (seconds >= 60) {
-				unsigned long long minutes = seconds / 60;
-				if (minutes >= 60) {
-					unsigned long long hours = minutes / 60;
-					minutes = minutes % 60;
-					result << hours << "h ";
-				}
-				
-				seconds = seconds % 60;
-				result << minutes << "m ";
-			}
-			result << seconds << "s";
-			return result.str();
-		}
-	};
-	
-	/**
-	 * A data structure which contains data that's shared between an
-	 * ApplicationPool::Pool and a SessionCloseCallback object.
-	 * This is because the ApplicationPool::Pool's life time could be
-	 * different from a SessionCloseCallback's.
-	 */
-	struct SharedData {
-		boost::timed_mutex lock;
-		condition_variable_any newAppGroupCreatable;
-		condition_variable_any globalQueuePositionBecameAvailable;
-		
-		GroupMap groups;
-		unsigned int max;
-		unsigned int count;
-		unsigned int active;
-		unsigned int maxPerApp;
-		ProcessInfoList inactiveApps;
-	};
-	
-	typedef shared_ptr<SharedData> SharedDataPtr;
-	
-	/**
-	 * Function object which will be called when a session has been closed.
-	 */
-	struct SessionCloseCallback {
-		SharedDataPtr data;
-		weak_ptr<ProcessInfo> processInfo;
-		
-		SessionCloseCallback(const SharedDataPtr &data,
-		                     const weak_ptr<ProcessInfo> &processInfo) {
-			this->data = data;
-			this->processInfo = processInfo;
-		}
-		
-		void operator()(const StandardSession *session) {
-			ProcessInfoPtr processInfo = this->processInfo.lock();
-			if (processInfo == NULL || processInfo->detached) {
-				return;
-			}
-			
-			boost::timed_mutex::scoped_lock l(data->lock);
-			if (processInfo->detached) {
-				return;
-			}
-			
-			GroupMap::iterator it;
-			it = data->groups.find(processInfo->groupName);
-			GroupPtr group = it->second;
-			ProcessInfoList *processes = &group->processes;
-			
-			processInfo->processed++;
-			
-			if (group->maxRequests > 0 && processInfo->processed >= group->maxRequests) {
-				P_DEBUG("MaxRequests for process " << processInfo->process->getPid() << " reached");
-				processInfo->detached = true;
-				processes->erase(processInfo->iterator);
-				group->size--;
-				if (processes->empty()) {
-					Pool::detachGroupWithoutLock(data, group);
-				}
-				mutateCount(data, data->count - 1);
-				if (processInfo->sessions == 0) {
-					data->inactiveApps.erase(processInfo->ia_iterator);
-				} else {
-					mutateActive(data, data->active - 1);
-				}
-			} else {
-				processInfo->lastUsed = time(NULL);
-				processInfo->sessions--;
-				if (processInfo->sessions == 0) {
-					processes->erase(processInfo->iterator);
-					processes->push_front(processInfo);
-					processInfo->iterator = processes->begin();
-					data->inactiveApps.push_back(processInfo);
-					processInfo->ia_iterator = data->inactiveApps.end();
-					processInfo->ia_iterator--;
-					mutateActive(data, data->active - 1);
-				}
-			}
-		}
-	};
-	
-	AbstractSpawnManagerPtr spawnManager;
-	AnalyticsLoggerPtr analyticsLogger;
-	SharedDataPtr data;
-	oxt::thread *cleanerThread;
-	oxt::thread *analyticsCollectionThread;
-	bool destroying;
-	unsigned int maxIdleTime;
-	unsigned int waitingOnGlobalQueue;
-	condition_variable_any cleanerThreadSleeper;
-	CachedFileStat cstat;
-	FileChangeChecker fileChangeChecker;
-	ProcessMetricsCollector processMetricsCollector;
-	
-	// Shortcuts for instance variables in SharedData. Saves typing in get()
-	// and other methods.
-	boost::timed_mutex &lock;
-	condition_variable_any &newAppGroupCreatable;
-	condition_variable_any &globalQueuePositionBecameAvailable;
-	GroupMap &groups;
-	unsigned int &max;
-	unsigned int &count;
-	unsigned int &active;
-	unsigned int &maxPerApp;
-	ProcessInfoList &inactiveApps;
-	
-	/**
-	 * Verify that all the invariants are correct.
-	 */
-	bool inline verifyState() {
-	#if PASSENGER_DEBUG
-		// Invariants for _groups_.
-		GroupMap::const_iterator it;
-		unsigned int totalSize = 0;
-		unsigned int expectedActive = 0;
-		
-		for (it = groups.begin(); it != groups.end(); it++) {
-			const string &appRoot = it->first;
-			Group *group = it->second.get();
-			ProcessInfoList *processes = &group->processes;
-			
-			// Invariants for Group.
-			
-			P_ASSERT(group->size <= count, false,
-				"groups['" << appRoot << "'].size (" << group->size <<
-				") <= count (" << count << ")");
-			totalSize += group->size;
-			P_ASSERT(!processes->empty(), false,
-				"groups['" << appRoot << "'].processes is nonempty.");
-			P_ASSERT(!group->detached, false,
-				"groups['" << appRoot << "'].detached is true");
-			
-			
-			ProcessInfoList::const_iterator lit = processes->begin();
-			for (; lit != processes->end(); lit++) {
-				const ProcessInfoPtr &processInfo = *lit;
-				
-				// Invariants for ProcessInfo.
-				P_ASSERT(processInfo->groupName == group->name, false,
-					"groups['" << appRoot << "'].processes[x].groupName "
-					"equals groups['" << appRoot << "'].name");
-				P_ASSERT(!processInfo->detached, false,
-					"groups['" << appRoot << "'].processes[x].detached is false");
-				if (processInfo->sessions > 0) {
-					expectedActive++;
-				}
-			}
-			
-			ProcessInfoList::const_iterator prev_lit;
-			prev_lit = processes->begin();
-			lit = prev_lit;
-			lit++;
-			for (; lit != processes->end(); lit++) {
-				const ProcessInfoPtr &processInfo = *lit;
-				
-				// Invariants for ProcessInfo that depend on the previous item.
-				if ((*prev_lit)->sessions > 0) {
-					P_ASSERT(processInfo->sessions > 0, false,
-						"groups['" << appRoot << "'].processes "
-						"is sorted from nonactive to active");
-				}
-			}
-		}
-		P_ASSERT(totalSize == count, false, "(sum of all d.size in groups) == count");
-		
-		P_ASSERT(active == expectedActive, false,
-			"active (" << active << ") == " << expectedActive);
-		P_ASSERT(active <= count, false,
-			"active (" << active << ") < count (" << count << ")");
-		P_ASSERT(inactiveApps.size() == count - active, false,
-			"inactive_apps.size() == count - active");
-	#endif
-		return true;
-	}
-	
-	string inspectWithoutLock() const {
-		stringstream result;
-		
-		result << "----------- General information -----------" << endl;
-		result << "max      = " << max << endl;
-		result << "count    = " << count << endl;
-		result << "active   = " << active << endl;
-		result << "inactive = " << inactiveApps.size() << endl;
-		result << "Waiting on global queue: " << waitingOnGlobalQueue << endl;
-		result << endl;
-		
-		result << "----------- Groups -----------" << endl;
-		GroupMap::const_iterator it;
-		for (it = groups.begin(); it != groups.end(); it++) {
-			Group *group = it->second.get();
-			ProcessInfoList *processes = &group->processes;
-			ProcessInfoList::const_iterator lit;
-			
-			result << it->first << ": " << endl;
-			for (lit = processes->begin(); lit != processes->end(); lit++) {
-				const ProcessInfo *processInfo = lit->get();
-				char buf[128];
-				
-				snprintf(buf, sizeof(buf),
-						"PID: %-5lu   Sessions: %-2u   Processed: %-5u   Uptime: %s",
-						(unsigned long) processInfo->process->getPid(),
-						processInfo->sessions,
-						processInfo->processed,
-						processInfo->uptime().c_str());
-				result << "  " << buf << endl;
-			}
-			result << endl;
-		}
-		return result.str();
-	}
-	
-	static void mutateActive(const SharedDataPtr &data, unsigned int value) {
-		if (value < data->active) {
-			data->newAppGroupCreatable.notify_all();
-			data->globalQueuePositionBecameAvailable.notify_all();
-		}
-		data->active = value;
-	}
-	
-	static void mutateCount(const SharedDataPtr &data, unsigned int value) {
-		data->globalQueuePositionBecameAvailable.notify_all();
-		data->count = value;
-	}
-	
-	static void mutateMax(const SharedDataPtr &data, unsigned int value) {
-		if (value > data->max) {
-			data->newAppGroupCreatable.notify_all();
-			data->globalQueuePositionBecameAvailable.notify_all();
-		}
-		data->max = value;
-	}
-	
-	void mutateActive(unsigned int value) {
-		Pool::mutateActive(data, value);
-	}
-	
-	void mutateCount(unsigned int value) {
-		Pool::mutateCount(data, value);
-	}
-	
-	void mutateMax(unsigned int value) {
-		Pool::mutateMax(data, value);
-	}
-	
-	/**
-	 * Checks whether the given application group needs to be restarted.
-	 *
-	 * @throws TimeRetrievalException Something went wrong while retrieving the system time.
-	 * @throws boost::thread_interrupted
-	 */
-	bool needsRestart(const string &appRoot, const PoolOptions &options) {
-		string restartDir;
-		if (options.restartDir.empty()) {
-			restartDir = appRoot + "/tmp";
-		} else if (options.restartDir[0] == '/') {
-			restartDir = options.restartDir;
-		} else {
-			restartDir = appRoot + "/" + options.restartDir;
-		}
-		
-		string alwaysRestartFile = restartDir + "/always_restart.txt";
-		string restartFile = restartDir + "/restart.txt";
-		struct stat buf;
-		return cstat.stat(alwaysRestartFile, &buf, options.statThrottleRate) == 0 ||
-		       fileChangeChecker.changed(restartFile, options.statThrottleRate);
-	}
-	
-	bool spawningAllowed(const GroupPtr &group, const PoolOptions &options) const {
-		return ( count < max ) &&
-			( (maxPerApp == 0) || (group->size < maxPerApp) );
-	}
-	
-	void dumpProcessInfoAsXml(const ProcessInfo *processInfo, bool includeSensitiveInformation,
-	                          stringstream &result) const
-	{
-		result << "<process>";
-		result << "<pid>" << processInfo->process->getPid() << "</pid>";
-		result << "<gupid>" << processInfo->process->getGupid() << "</gupid>";
-		result << "<sessions>" << processInfo->sessions << "</sessions>";
-		result << "<processed>" << processInfo->processed << "</processed>";
-		result << "<uptime>" << processInfo->uptime() << "</uptime>";
-		if (processInfo->metrics.isValid()) {
-			const ProcessMetrics &metrics = processInfo->metrics;
-			result << "<has_metrics>true</has_metrics>";
-			result << "<cpu>" << (int) metrics.cpu << "</cpu>";
-			result << "<rss>" << metrics.rss << "</rss>";
-			if (metrics.pss != -1) {
-				result << "<pss>" << metrics.pss << "</pss>";
-			}
-			if (metrics.privateDirty != -1) {
-				result << "<private_dirty>" << metrics.privateDirty << "</private_dirty>";
-			}
-			if (metrics.swap != -1) {
-				result << "<swap>" << metrics.swap << "</swap>";
-			}
-			result << "<real_memory>" << metrics.realMemory() << "</real_memory>";
-			result << "<vmsize>" << metrics.vmsize << "</vmsize>";
-			result << "<process_group_id>" << metrics.processGroupId << "</process_group_id>";
-			result << "<command>" << escapeForXml(metrics.command) << "</command>";
-		}
-		if (includeSensitiveInformation) {
-			const ProcessPtr &process = processInfo->process;
-			const Process::SocketInfoMap *serverSockets;
-			Process::SocketInfoMap::const_iterator sit;
-			
-			result << "<connect_password>" << process->getConnectPassword() << "</connect_password>";
-			result << "<server_sockets>";
-			serverSockets = process->getServerSockets();
-			for (sit = serverSockets->begin(); sit != serverSockets->end(); sit++) {
-				const string &name = sit->first;
-				const Process::SocketInfo &info = sit->second;
-				result << "<server_socket>";
-				result << "<name>" << escapeForXml(name) << "</name>";
-				result << "<address>" << escapeForXml(info.address) << "</address>";
-				result << "<type>" << escapeForXml(info.type) << "</type>";
-				result << "</server_socket>";
-			}
-			result << "</server_sockets>";
-		}
-		result << "</process>";
-	}
-	
-	static void detachGroupWithoutLock(const SharedDataPtr &data, const GroupPtr &group) {
-		TRACE_POINT();
-		assert(!group->detached);
-		
-		ProcessInfoList *processes = &group->processes;
-		ProcessInfoList::iterator list_it;
-		
-		for (list_it = processes->begin(); list_it != processes->end(); list_it++) {
-			ProcessInfoPtr processInfo = *list_it;
-			
-			if (processInfo->sessions == 0) {
-				data->inactiveApps.erase(processInfo->ia_iterator);
-			} else {
-				mutateActive(data, data->active - 1);
-			}
-			list_it--;
-			processes->erase(processInfo->iterator);
-			processInfo->detached = true;
-			mutateCount(data, data->count - 1);
-		}
-		
-		if (group->spawning) {
-			UPDATE_TRACE_POINT();
-			group->spawnerThread->interrupt_and_join();
-			group->spawnerThread.reset();
-			group->spawning = false;
-		}
-		
-		group->detached = true;
-		data->groups.erase(group->name);
-	}
-	
-	void detachGroupWithoutLock(const GroupPtr &group) {
-		Pool::detachGroupWithoutLock(data, group);
-	}
-	
-	ProcessInfoPtr selectProcess(ProcessInfoList *processes, const PoolOptions &options,
-		unique_lock<boost::timed_mutex> &l,
-		this_thread::disable_interruption &di,
-		this_thread::disable_syscall_interruption &dsi)
-	{
-		if (options.useGlobalQueue) {
-			TRACE_POINT();
-			waitingOnGlobalQueue++;
-			this_thread::restore_interruption ri(di);
-			this_thread::restore_syscall_interruption rsi(dsi);
-			globalQueuePositionBecameAvailable.wait(l);
-			waitingOnGlobalQueue--;
-			return ProcessInfoPtr();
-		} else {
-			ProcessInfoList::iterator it = processes->begin();
-			ProcessInfoList::iterator end = processes->end();
-			ProcessInfoList::iterator smallest = processes->begin();
-			ProcessInfoPtr processInfo;
-			
-			it++;
-			for (; it != end; it++) {
-				if ((*it)->sessions < (*smallest)->sessions) {
-					smallest = it;
-				}
-			}
-			processInfo = *smallest;
-			processes->erase(smallest);
-			processes->push_back(processInfo);
-			processInfo->iterator = processes->end();
-			processInfo->iterator--;
-			return processInfo;
-		}
-	}
-	
-	void spawnInBackground(const GroupPtr &group, const PoolOptions &options) {
-		assert(!group->detached);
-		assert(!group->spawning);
-		group->spawning = true;
-		group->spawnerThread = ptr(new oxt::thread(
-			boost::bind(&Pool::spawnerThreadCallback, this, group, options.own()),
-			"ApplicationPool background spawner",
-			SPAWNER_THREAD_STACK_SIZE
-		));
-	}
-	
-	void spawnerThreadCallback(GroupPtr group, PoolOptions options) {
-		TRACE_POINT();
-		
-		while (true) {
-			ProcessPtr process;
-			
-			try {
-				UPDATE_TRACE_POINT();
-				P_DEBUG("Background spawning a process for " << options.appRoot);
-				process = spawnManager->spawn(options);
-			} catch (const thread_interrupted &) {
-				UPDATE_TRACE_POINT();
-				interruptable_lock_guard<boost::timed_mutex> l(lock);
-				this_thread::disable_interruption di;
-				this_thread::disable_syscall_interruption dsi;
-				group->spawning = false;
-				group->spawnerThread.reset();
-				return;
-			} catch (const std::exception &e) {
-				UPDATE_TRACE_POINT();
-				P_DEBUG("Background spawning of " << options.appRoot <<
-					" failed; removing entire group." <<
-					" Error: " << e.what());
-				interruptable_lock_guard<boost::timed_mutex> l(lock);
-				this_thread::disable_interruption di;
-				this_thread::disable_syscall_interruption dsi;
-				if (!group->detached) {
-					group->spawning = false;
-					group->spawnerThread.reset();
-					detachGroupWithoutLock(group);
-				}
-				return;
-			}
-			
-			UPDATE_TRACE_POINT();
-			interruptable_lock_guard<boost::timed_mutex> l(lock);
-			this_thread::disable_interruption di;
-			this_thread::disable_syscall_interruption dsi;
-			ProcessInfoPtr processInfo;
-			
-			processInfo = ptr(new ProcessInfo());
-			processInfo->process = process;
-			processInfo->groupName = options.getAppGroupName();
-			
-			group->processes.push_front(processInfo);
-			processInfo->iterator = group->processes.begin();
-			
-			inactiveApps.push_back(processInfo);
-			processInfo->ia_iterator = inactiveApps.end();
-			processInfo->ia_iterator--;
-			
-			group->size++;
-			mutateCount(count + 1);
-			
-			P_ASSERT_WITH_VOID_RETURN(verifyState(),
-				"Background spawning: ApplicationPool state is valid:\n" <<
-				inspectWithoutLock());
-			
-			if (group->size >= options.minProcesses
-			 || !spawningAllowed(group, options)) {
-				group->spawning = false;
-				group->spawnerThread.reset();
-				return;
-			}
-		}
-	}
-	
-	bool detachWithoutLock(const string &detachKey) {
-		TRACE_POINT();
-		GroupMap::iterator group_it;
-		GroupMap::iterator group_it_end = groups.end();
-		
-		for (group_it = groups.begin(); group_it != group_it_end; group_it++) {
-			GroupPtr group = group_it->second;
-			ProcessInfoList &processes = group->processes;
-			ProcessInfoList::iterator process_info_it = processes.begin();
-			ProcessInfoList::iterator process_info_it_end = processes.end();
-			
-			for (; process_info_it != process_info_it_end; process_info_it++) {
-				ProcessInfoPtr processInfo = *process_info_it;
-				if (processInfo->process->getDetachKey() == detachKey) {
-					// Found a matching process.
-					P_DEBUG("Detaching process " << processInfo->process->getPid());
-					processInfo->detached = true;
-					processes.erase(processInfo->iterator);
-					group->size--;
-					if (processes.empty()) {
-						detachGroupWithoutLock(group);
-					}
-					if (processInfo->sessions == 0) {
-						inactiveApps.erase(processInfo->ia_iterator);
-					} else {
-						mutateActive(active - 1);
-					}
-					mutateCount(count - 1);
-					return true;
-				}
-			}
-		}
-		return false;
-	}
-	
-	void cleanerThreadMainLoop() {
-		this_thread::disable_syscall_interruption dsi;
-		unique_lock<boost::timed_mutex> l(lock);
-		try {
-			while (!destroying && !this_thread::interruption_requested()) {
-				if (maxIdleTime == 0) {
-					cleanerThreadSleeper.wait(l);
-					if (destroying) {
-						// ApplicationPool::Pool is being destroyed.
-						break;
-					} else {
-						// maxIdleTime changed.
-						continue;
-					}
-				} else {
-					xtime xt;
-					xtime_get(&xt, TIME_UTC);
-					xt.sec += maxIdleTime + 1;
-					if (cleanerThreadSleeper.timed_wait(l, xt)) {
-						// Condition was woken up.
-						if (destroying) {
-							// ApplicationPool::Pool is being destroyed.
-							break;
-						} else {
-							// maxIdleTime changed.
-							continue;
-						}
-					}
-					// Timeout: maxIdleTime + 1 seconds passed.
-				}
-				
-				time_t now = syscalls::time(NULL);
-				ProcessInfoList::iterator it = inactiveApps.begin();
-				ProcessInfoList::iterator end_it = inactiveApps.end();
-				for (; it != end_it; it++) {
-					ProcessInfoPtr processInfo = *it;
-					
-					if (now - processInfo->lastUsed > (time_t) maxIdleTime) {
-						ProcessPtr process = processInfo->process;
-						GroupPtr   group   = groups[processInfo->groupName];
-						
-						if (group->size > group->minProcesses) {
-							ProcessInfoList *processes = &group->processes;
-							
-							P_DEBUG("Cleaning idle process " << process->getAppRoot() <<
-								" (PID " << process->getPid() << ")");
-							P_TRACE(2, "Group size = " << group->size << ", "
-								"min processes = " << group->minProcesses);
-							processes->erase(processInfo->iterator);
-							processInfo->detached = true;
-							
-							ProcessInfoList::iterator prev = it;
-							prev--;
-							inactiveApps.erase(it);
-							it = prev;
-							
-							group->size--;
-							mutateCount(count - 1);
-							
-							if (processes->empty()) {
-								detachGroupWithoutLock(group);
-							}
-						}
-					}
-				}
-			}
-		} catch (const std::exception &e) {
-			P_ERROR("Uncaught exception: " << e.what());
-		}
-	}
-	
-	void analyticsCollectionThreadMainLoop() {
-		/* Invariant inside this thread:
-		 * analyticsLogger != NULL
-		 */
-		TRACE_POINT();
-		try {
-			syscalls::sleep(3);
-			while (!this_thread::interruption_requested()) {
-				this_thread::disable_interruption di;
-				this_thread::disable_syscall_interruption dsi;
-				vector<pid_t> pids;
-				
-				// Collect all the PIDs.
-				{
-					UPDATE_TRACE_POINT();
-					lock_guard<boost::timed_mutex> l(lock);
-					GroupMap::const_iterator group_it;
-					GroupMap::const_iterator group_it_end = groups.end();
-					
-					UPDATE_TRACE_POINT();
-					pids.reserve(count);
-					for (group_it = groups.begin(); group_it != group_it_end; group_it++) {
-						const GroupPtr &group = group_it->second;
-						const ProcessInfoList &processes = group->processes;
-						ProcessInfoList::const_iterator process_info_it = processes.begin();
-						ProcessInfoList::const_iterator process_info_it_end = processes.end();
-						
-						for (; process_info_it != process_info_it_end; process_info_it++) {
-							const ProcessInfoPtr &processInfo = *process_info_it;
-							pids.push_back(processInfo->process->getPid());
-						}
-					}
-				}
-				
-				try {
-					// Now collect the process metrics and store them in the
-					// data structures, and log the state into the analytics logs.
-					UPDATE_TRACE_POINT();
-					ProcessMetricMap allMetrics =
-						processMetricsCollector.collect(pids);
-					
-					UPDATE_TRACE_POINT();
-					lock_guard<boost::timed_mutex> l(lock);
-					GroupMap::iterator group_it;
-					GroupMap::iterator group_it_end = groups.end();
-					
-					UPDATE_TRACE_POINT();
-					for (group_it = groups.begin(); group_it != group_it_end; group_it++) {
-						GroupPtr &group = group_it->second;
-						ProcessInfoList &processes = group->processes;
-						ProcessInfoList::iterator process_info_it = processes.begin();
-						ProcessInfoList::iterator process_info_it_end = processes.end();
-						AnalyticsLogPtr log;
-						stringstream xml;
-						
-						if (group->analytics && analyticsLogger != NULL) {
-							ssize_t shared;
-							log = analyticsLogger->newTransaction(group->name,
-								"processes", group->unionStationKey);
-							xml << "Processes: <processes>";
-							xml << "<total_memory>" << allMetrics.totalMemory(shared) << "</total_memory>";
-							if (shared != -1) {
-								xml << "<total_shared_memory>" << shared << "</total_shared_memory>";
-							}
-						}
-						for (; process_info_it != process_info_it_end; process_info_it++) {
-							ProcessInfoPtr &processInfo = *process_info_it;
-							ProcessMetricMap::const_iterator metrics_it =
-								allMetrics.find(processInfo->process->getPid());
-							if (metrics_it != allMetrics.end()) {
-								processInfo->metrics = metrics_it->second;
-							}
-							if (log != NULL) {
-								dumpProcessInfoAsXml(processInfo.get(),
-									false, xml);
-							}
-						}
-						if (log != NULL) {
-							xml << "</processes>";
-							log->message(xml.str());
-						}
-					}
-				} catch (const ProcessMetricsCollector::ParseException &) {
-					P_WARN("Unable to collect process metrics: cannot parse 'ps' output.");
-				} catch (const thread_interrupted &) {
-					throw;
-				} catch (const std::exception &e) {
-					P_WARN("Error while collecting process metrics: " << e.what());
-				}
-				
-				pids.resize(0);
-				
-				// Sleep for about 4 seconds, aligned to seconds boundary
-				// for saving power on laptops.
-				UPDATE_TRACE_POINT();
-				unsigned long long currentTime = SystemTime::getUsec();
-				unsigned long long deadline =
-					roundUp<unsigned long long>(currentTime, 1000000) + 4000000;
-				syscalls::usleep(deadline - currentTime);
-			}
-		} catch (const thread_interrupted &) {
-		} catch (const std::exception &e) {
-			P_ERROR("Uncaught exception: " << e.what());
-		}
-	}
-	
-	/**
-	 * @throws boost::thread_interrupted
-	 * @throws SpawnException
-	 * @throws SystemException
-	 * @throws TimeRetrievalException Something went wrong while retrieving the system time.
-	 * @throws Anything thrown by options.environmentVariables->getItems().
-	 */
-	pair<ProcessInfoPtr, GroupPtr>
-	checkoutWithoutLock(unique_lock<boost::timed_mutex> &l, const PoolOptions &options) {
-		beginning_of_function:
-		
-		TRACE_POINT();
-		this_thread::disable_interruption di;
-		this_thread::disable_syscall_interruption dsi;
-		const string &appRoot = options.appRoot;
-		const string appGroupName = options.getAppGroupName();
-		ProcessInfoPtr processInfo;
-		GroupPtr group;
-		ProcessInfoList *processes;
-		
-		try {
-			GroupMap::iterator group_it = groups.find(appGroupName);
-			
-			if (needsRestart(appRoot, options)) {
-				P_DEBUG("Restarting " << appGroupName);
-				spawnManager->reload(appGroupName);
-				if (group_it != groups.end()) {
-					detachGroupWithoutLock(group_it->second);
-					group_it = groups.end();
-				}
-			}
-			
-			if (group_it != groups.end()) {
-				group = group_it->second;
-				processes = &group->processes;
-				
-				if (processes->front()->sessions == 0) {
-					processInfo = processes->front();
-					processes->pop_front();
-					processes->push_back(processInfo);
-					processInfo->iterator = processes->end();
-					processInfo->iterator--;
-					inactiveApps.erase(processInfo->ia_iterator);
-					mutateActive(active + 1);
-				} else {
-					if (!group->spawning && spawningAllowed(group, options)) {
-						P_DEBUG("Spawning another process for " << appRoot <<
-							" in the background in order to handle the load");
-						spawnInBackground(group, options);
-					}
-					processInfo = selectProcess(processes, options, l, di, dsi);
-					if (processInfo == NULL) {
-						goto beginning_of_function;
-					}
-				}
-			} else {
-				P_DEBUG("Spawning a process for " << appRoot <<
-					" because there are none for this app group");
-				if (active >= max) {
-					UPDATE_TRACE_POINT();
-					this_thread::restore_interruption ri(di);
-					this_thread::restore_syscall_interruption rsi(dsi);
-					newAppGroupCreatable.wait(l);
-					goto beginning_of_function;
-				} else if (count >= max) {
-					processInfo = inactiveApps.front();
-					P_DEBUG("Killing process " << processInfo->process->getPid() <<
-						" because an extra slot is necessary for spawning");
-					inactiveApps.pop_front();
-					processInfo->detached = true;
-					group = groups[processInfo->groupName];
-					processes = &group->processes;
-					processes->erase(processInfo->iterator);
-					if (processes->empty()) {
-						detachGroupWithoutLock(group);
-					} else {
-						group->size--;
-					}
-					mutateCount(count - 1);
-				}
-				
-				UPDATE_TRACE_POINT();
-				processInfo = ptr(new ProcessInfo());
-				{
-					this_thread::restore_interruption ri(di);
-					this_thread::restore_syscall_interruption rsi(dsi);
-					processInfo->process = spawnManager->spawn(options);
-				}
-				processInfo->groupName = appGroupName;
-				processInfo->sessions = 0;
-				group = ptr(new Group());
-				group->name = appGroupName;
-				group->appRoot = appRoot;
-				group->size = 1;
-				groups[appGroupName] = group;
-				processes = &group->processes;
-				processes->push_back(processInfo);
-				processInfo->iterator = processes->end();
-				processInfo->iterator--;
-				mutateCount(count + 1);
-				mutateActive(active + 1);
-				if (options.minProcesses > 1 && spawningAllowed(group, options)) {
-					spawnInBackground(group, options);
-				}
-			}
-		} catch (const SpawnException &e) {
-			string message("Cannot spawn application '");
-			message.append(appGroupName);
-			message.append("': ");
-			message.append(e.what());
-			if (e.hasErrorPage()) {
-				throw SpawnException(message, e.getErrorPage());
-			} else {
-				throw SpawnException(message);
-			}
-		} catch (const thread_interrupted &) {
-			throw;
-		} catch (const std::exception &e) {
-			string message("Cannot spawn application '");
-			message.append(appGroupName);
-			message.append("': ");
-			message.append(e.what());
-			throw SpawnException(message);
-		}
-		
-		group->maxRequests  = options.maxRequests;
-		group->minProcesses = options.minProcesses;
-		group->environment  = options.environment;
-		group->analytics    = options.log != NULL;
-		if (group->analytics) {
-			group->unionStationKey = options.log->getUnionStationKey();
-		}
-		
-		processInfo->lastUsed = time(NULL);
-		processInfo->sessions++;
-		
-		return make_pair(processInfo, group);
-	}
-	
-	/** @throws boost::thread_resource_error */
-	void initialize(const AnalyticsLoggerPtr &analyticsLogger)
-	{
-		destroying = false;
-		max = DEFAULT_MAX_POOL_SIZE;
-		count = 0;
-		active = 0;
-		waitingOnGlobalQueue = 0;
-		maxPerApp = DEFAULT_MAX_INSTANCES_PER_APP;
-		maxIdleTime = DEFAULT_POOL_IDLE_TIME;
-		cleanerThread = new oxt::thread(
-			bind(&Pool::cleanerThreadMainLoop, this),
-			"ApplicationPool cleaner",
-			CLEANER_THREAD_STACK_SIZE
-		);
-		
-		if (analyticsLogger != NULL) {
-			this->analyticsLogger = analyticsLogger;
-			analyticsCollectionThread = new oxt::thread(
-				bind(&Pool::analyticsCollectionThreadMainLoop, this),
-				"ApplicationPool analytics collector",
-				ANALYTICS_COLLECTION_THREAD_STACK_SIZE
-			);
-		} else {
-			analyticsCollectionThread = NULL;
-		}
-	}
-	
-public:
-	/**
-	 * Create a new ApplicationPool::Pool object, and initialize it with a
-	 * SpawnManager. The arguments here are all passed to the SpawnManager
-	 * constructor.
-	 *
-	 * @throws SystemException An error occured while trying to setup the spawn server.
-	 * @throws IOException The specified log file could not be opened.
-	 * @throws boost::thread_resource_error Cannot spawn a new thread.
-	 */
-	Pool(const string &spawnServerCommand,
-	     const ServerInstanceDir::GenerationPtr &generation,
-	     const AccountsDatabasePtr &accountsDatabase = AccountsDatabasePtr(),
-	     const string &rubyCommand = "ruby",
-	     const AnalyticsLoggerPtr &analyticsLogger = AnalyticsLoggerPtr(),
-	     int logLevel = 0,
-	     const string &debugLogFile = ""
-	) : data(new SharedData()),
-		cstat(DEFAULT_MAX_POOL_SIZE),
-		lock(data->lock),
-		newAppGroupCreatable(data->newAppGroupCreatable),
-		globalQueuePositionBecameAvailable(data->globalQueuePositionBecameAvailable),
-		groups(data->groups),
-		max(data->max),
-		count(data->count),
-		active(data->active),
-		maxPerApp(data->maxPerApp),
-		inactiveApps(data->inactiveApps)
-	{
-		TRACE_POINT();
-		
-		this->spawnManager = ptr(new SpawnManager(spawnServerCommand, generation,
-			accountsDatabase, rubyCommand, analyticsLogger, logLevel,
-			debugLogFile));
-		initialize(analyticsLogger);
-	}
-	
-	/**
-	 * Create a new ApplicationPool::Pool object and initialize it with
-	 * the given spawn manager.
-	 *
-	 * @throws boost::thread_resource_error Cannot spawn a new thread.
-	 */
-	Pool(AbstractSpawnManagerPtr spawnManager,
-	     const AnalyticsLoggerPtr &analyticsLogger = AnalyticsLoggerPtr()
-	) : data(new SharedData()),
-	     cstat(DEFAULT_MAX_POOL_SIZE),
-	     lock(data->lock),
-	     newAppGroupCreatable(data->newAppGroupCreatable),
-	     globalQueuePositionBecameAvailable(data->globalQueuePositionBecameAvailable),
-	     groups(data->groups),
-	     max(data->max),
-	     count(data->count),
-	     active(data->active),
-	     maxPerApp(data->maxPerApp),
-	     inactiveApps(data->inactiveApps)
-	{
-		TRACE_POINT();
-		this->spawnManager = spawnManager;
-		initialize(analyticsLogger);
-	}
-	
-	virtual ~Pool() {
-		TRACE_POINT();
-		this_thread::disable_interruption di;
-		{
-			lock_guard<boost::timed_mutex> l(lock);
-			destroying = true;
-			cleanerThreadSleeper.notify_one();
-			while (!groups.empty()) {
-				detachGroupWithoutLock(groups.begin()->second);
-			}
-		}
-		cleanerThread->join();
-		delete cleanerThread;
-		
-		if (analyticsCollectionThread != NULL) {
-			analyticsCollectionThread->interrupt_and_join();
-			delete analyticsCollectionThread;
-		}
-	}
-	
-	virtual SessionPtr get(const string &appRoot) {
-		return ApplicationPool::Interface::get(appRoot);
-	}
-	
-	virtual SessionPtr get(const PoolOptions &options) {
-		TRACE_POINT();
-		unsigned int attempt = 0;
-		
-		while (true) {
-			attempt++;
-			
-			pair<ProcessInfoPtr, GroupPtr> p;
-			{
-				unique_lock<boost::timed_mutex> l(lock);
-				p = checkoutWithoutLock(l, options);
-				P_ASSERT(verifyState(), SessionPtr(),
-					"get(): ApplicationPool state is valid:\n" << inspectWithoutLock());
-			}
-			ProcessInfoPtr &processInfo = p.first;
-			
-			try {
-				UPDATE_TRACE_POINT();
-				SessionPtr session = processInfo->process->newSession(
-					SessionCloseCallback(data, processInfo),
-					options.initiateSession
-				);
-				return session;
-				
-			} catch (SystemException &e) {
-				P_TRACE(2, "Exception occurred while connecting to checked out "
-					"process " << processInfo->process->getPid() << ": " <<
-					e.what());
-				{
-					unique_lock<boost::timed_mutex> l(lock);
-					detachWithoutLock(processInfo->process->getDetachKey());
-					processInfo->sessions--;
-					P_ASSERT(verifyState(), SessionPtr(),
-						"get(): ApplicationPool state is valid:\n" << inspectWithoutLock());
-				}
-				if (e.code() == EMFILE || attempt == MAX_GET_ATTEMPTS) {
-					/* A "too many open files" (EMFILE) error is probably unrecoverable,
-					 * so propagate that immediately.
-					 */
-					e.setBriefMessage("Cannot connect to an existing "
-						"application instance for '" +
-						options.appRoot +
-						"'");
-					throw;
-				} // else retry
-			
-			} catch (const thread_interrupted &) {
-				throw;
-			
-			} catch (std::exception &e) {
-				P_TRACE(2, "Exception occurred while connecting to checked out "
-					"process " << processInfo->process->getPid() << ": " <<
-					e.what());
-				{
-					unique_lock<boost::timed_mutex> l(lock);
-					detachWithoutLock(processInfo->process->getDetachKey());
-					processInfo->sessions--;
-					P_ASSERT(verifyState(), SessionPtr(),
-						"get(): ApplicationPool state is valid:\n" << inspectWithoutLock());
-				}
-				if (attempt == MAX_GET_ATTEMPTS) {
-					string message("Cannot connect to an existing "
-						"application instance for '");
-					message.append(options.appRoot);
-					message.append("': ");
-					message.append(e.what());
-					throw IOException(message);
-				} // else retry
-			}
-		}
-		// Never reached; shut up compiler warning
-		return SessionPtr();
-	}
-	
-	virtual bool detach(const string &detachKey) {
-		TRACE_POINT();
-		unique_lock<boost::timed_mutex> l(lock);
-		return detachWithoutLock(detachKey);
-	}
-	
-	virtual void clear() {
-		lock_guard<boost::timed_mutex> l(lock);
-		P_DEBUG("Clearing pool");
-		
-		while (!groups.empty()) {
-			detachGroupWithoutLock(groups.begin()->second);
-		}
-		newAppGroupCreatable.notify_all();
-		globalQueuePositionBecameAvailable.notify_all();
-		
-		P_ASSERT_WITH_VOID_RETURN(groups.size() == 0,
-			"groups.size() == 0\n" << inspectWithoutLock());
-		P_ASSERT_WITH_VOID_RETURN(inactiveApps.size() == 0,
-			"inactiveApps.size() == 0\n" << inspectWithoutLock());
-		P_ASSERT_WITH_VOID_RETURN(count == 0,
-			"count == 0\n" << inspectWithoutLock());
-		P_ASSERT_WITH_VOID_RETURN(active == 0,
-			"active == 0\n" << inspectWithoutLock());
-		P_ASSERT_WITH_VOID_RETURN(verifyState(),
-			"ApplicationPool state is valid:\n" << inspectWithoutLock());
-		
-		// TODO: clear cstat and fileChangeChecker, and reload all spawner servers.
-	}
-	
-	virtual void setMaxIdleTime(unsigned int seconds) {
-		lock_guard<boost::timed_mutex> l(lock);
-		maxIdleTime = seconds;
-		cleanerThreadSleeper.notify_one();
-	}
-	
-	virtual void setMax(unsigned int max) {
-		lock_guard<boost::timed_mutex> l(lock);
-		mutateMax(max);
-	}
-	
-	virtual unsigned int getActive() const {
-		lock_guard<boost::timed_mutex> l(lock);
-		return active;
-	}
-	
-	virtual unsigned int getCount() const {
-		lock_guard<boost::timed_mutex> l(lock);
-		return count;
-	}
-	
-	virtual unsigned int getGlobalQueueSize() const {
-		lock_guard<boost::timed_mutex> l(lock);
-		return waitingOnGlobalQueue;
-	}
-	
-	virtual void setMaxPerApp(unsigned int maxPerApp) {
-		lock_guard<boost::timed_mutex> l(lock);
-		this->maxPerApp = maxPerApp;
-		newAppGroupCreatable.notify_all();
-		globalQueuePositionBecameAvailable.notify_all();
-	}
-	
-	virtual pid_t getSpawnServerPid() const {
-		return spawnManager->getServerPid();
-	}
-	
-	virtual string inspect() const {
-		lock_guard<boost::timed_mutex> l(lock);
-		return inspectWithoutLock();
-	}
-	
-	virtual string toXml(bool includeSensitiveInformation = true) const {
-		lock_guard<boost::timed_mutex> l(lock);
-		stringstream result;
-		GroupMap::const_iterator it;
-		
-		result << "<?xml version=\"1.0\" encoding=\"iso8859-1\" ?>\n";
-		result << "<info>";
-		
-		result << "<active>" << toString(active) << "</active>";
-		result << "<count>" << toString(count) << "</count>";
-		result << "<max>" << toString(max) << "</max>";
-		result << "<global_queue_size>" << toString(waitingOnGlobalQueue) << "</global_queue_size>";
-		
-		result << "<groups>";
-		for (it = groups.begin(); it != groups.end(); it++) {
-			Group *group = it->second.get();
-			ProcessInfoList *processes = &group->processes;
-			ProcessInfoList::const_iterator lit;
-			
-			result << "<group>";
-			result << "<app_root>" << escapeForXml(group->appRoot) << "</app_root>";
-			result << "<name>" << escapeForXml(group->name) << "</name>";
-			result << "<environment>" << escapeForXml(group->environment) << "</environment>";
-			
-			result << "<processes>";
-			for (lit = processes->begin(); lit != processes->end(); lit++) {
-				ProcessInfo *processInfo = lit->get();
-				dumpProcessInfoAsXml(processInfo, includeSensitiveInformation, result);
-			}
-			result << "</processes>";
-			
-			result << "</group>";
-		}
-		result << "</groups>";
-		
-		result << "</info>";
-		return result.str();
-	}
-};
-
-typedef shared_ptr<Pool> PoolPtr;
-
-} // namespace ApplicationPool
-} // namespace Passenger
-
-#endif /* _PASSENGER_APPLICATION_POOL_POOL_H_ */
-
diff --git a/ext/common/ApplicationPool/Server.h b/ext/common/ApplicationPool/Server.h
deleted file mode 100644
index 0bec335..0000000
--- a/ext/common/ApplicationPool/Server.h
+++ /dev/null
@@ -1,479 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_APPLICATION_POOL_SERVER_H_
-#define _PASSENGER_APPLICATION_POOL_SERVER_H_
-
-#include <string>
-#include <vector>
-
-#include <boost/shared_ptr.hpp>
-#include <boost/thread.hpp>
-#include <oxt/system_calls.hpp>
-#include <oxt/dynamic_thread_group.hpp>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <cerrno>
-#include <cassert>
-
-#include "Pool.h"
-#include "../MessageServer.h"
-#include "../FileDescriptor.h"
-#include "../Exceptions.h"
-#include "../Utils.h"
-#include "../Utils/MessageIO.h"
-
-namespace Passenger {
-namespace ApplicationPool {
-
-using namespace std;
-using namespace boost;
-using namespace oxt;
-
-
-/**
- * ApplicationPool::Server exposes an application pool to external processes through
- * a MessageServer. This allows one to use an application pool in a multi-process
- * environment. ApplicationPool::Client can be used to access a pool that's exposed
- * via ApplicationPool::Server.
- *
- * <h2>Usage</h2>
- * Construct a MessageServer and register an ApplicationPool::Server object as handler,
- * then start the MessageServer by calling mainLoop() on it.
- *
- * <h2>Concurrency model</h2>
- * Each client is handled by a seperate thread. This is necessary because the current
- * algorithm for ApplicationPool::Pool::get() can block (in the case that the spawning
- * limit has been exceeded or when global queuing is used and all application processes
- * are busy). While it is possible to get around this problem without using threads, a
- * thread-based implementation is easier to write.
- *
- * This concurrency model is implemented in MessageServer.
- *
- * <h2>Authorization support</h2>
- * The account with which the client authenticated with dictates the actions that the
- * client may invoke on the underlying application pool object. See Account::Rights.
- *
- * @ingroup Support
- */
-class Server: public MessageServer::Handler {
-private:
-	/**
-	 * This exception indicates that something went wrong while comunicating with the client.
-	 * Only used within EnvironmentVariablesFetcher.
-	 */
-	class ClientCommunicationError: public oxt::tracable_exception {
-	private:
-		string briefMessage;
-		string systemMessage;
-		string fullMessage;
-		int m_code;
-	public:
-		/**
-		 * Create a new ClientCommunicationError.
-		 *
-		 * @param briefMessage A brief message describing the error.
-		 * @param errorCode An optional error code, i.e. the value of errno right after the error occured, if applicable.
-		 * @note A system description of the error will be appended to the given message.
-		 *    For example, if <tt>errorCode</tt> is <tt>EBADF</tt>, and <tt>briefMessage</tt>
-		 *    is <em>"Something happened"</em>, then what() will return <em>"Something happened: Bad
-		 *    file descriptor (10)"</em> (if 10 is the number for EBADF).
-		 * @post code() == errorCode
-		 * @post brief() == briefMessage
-		 */
-		ClientCommunicationError(const string &briefMessage, int errorCode = -1) {
-			if (errorCode != -1) {
-				stringstream str;
-				
-				str << strerror(errorCode) << " (" << errorCode << ")";
-				systemMessage = str.str();
-			}
-			setBriefMessage(briefMessage);
-			m_code = errorCode;
-		}
-
-		virtual ~ClientCommunicationError() throw() {}
-
-		virtual const char *what() const throw() {
-			return fullMessage.c_str();
-		}
-
-		void setBriefMessage(const string &message) {
-			briefMessage = message;
-			if (systemMessage.empty()) {
-				fullMessage = briefMessage;
-			} else {
-				fullMessage = briefMessage + ": " + systemMessage;
-			}
-		}
-
-		/**
-		 * The value of <tt>errno</tt> at the time the error occured.
-		 */
-		int code() const throw() {
-			return m_code;
-		}
-
-		/**
-		 * Returns a brief version of the exception message. This message does
-		 * not include the system error description, and is equivalent to the
-		 * value of the <tt>message</tt> parameter as passed to the constructor.
-		 */
-		string brief() const throw() {
-			return briefMessage;
-		}
-
-		/**
-		 * Returns the system's error message. This message contains both the
-		 * content of <tt>strerror(errno)</tt> and the errno number itself.
-		 *
-		 * @post if code() == -1: result.empty()
-		 */
-		string sys() const throw() {
-			return systemMessage;
-		}
-	};
-	
-	/**
-	 * A StringListCreator which fetches its items from the client.
-	 * Used as an optimization for ApplicationPool::Server::processGet():
-	 * environment variables are only serialized by the client process
-	 * if a new backend process is being spawned.
-	 */
-	class EnvironmentVariablesFetcher: public StringListCreator {
-	private:
-		int fd;
-		PoolOptions &options;
-		mutable StringListPtr result;
-	public:
-		EnvironmentVariablesFetcher(int theFd, PoolOptions &theOptions)
-			: fd(theFd), options(theOptions)
-		{ }
-		
-		/**
-		 * @throws ClientCommunicationError
-		 */
-		virtual const StringListPtr getItems() const {
-			if (result) {
-				return result;
-			}
-			
-			string data;
-			
-			/* If an I/O error occurred while communicating with the client,
-			 * then throw a ClientCommunicationException, which will bubble
-			 * all the way up to the MessageServer client thread main loop,
-			 * where the connection with the client will be broken.
-			 */
-			try {
-				writeArrayMessage(fd, "getEnvironmentVariables", NULL);
-			} catch (const SystemException &e) {
-				throw ClientCommunicationError(
-					"Unable to send a 'getEnvironmentVariables' request to the client",
-					e.code());
-			}
-			try {
-				if (!readScalarMessage(fd, data)) {
-					throw ClientCommunicationError("Unable to read a reply from the client for the 'getEnvironmentVariables' request.");
-				}
-			} catch (const SystemException &e) {
-				throw ClientCommunicationError(
-					"Unable to read a reply from the client for the 'getEnvironmentVariables' request",
-					e.code());
-			}
-			
-			if (!data.empty()) {
-				SimpleStringListCreator list(data);
-				result = list.getItems();
-			} else {
-				result.reset(new StringList());
-			}
-			return result;
-		}
-	};
-	
-	struct SpecificContext: public MessageServer::ClientContext {
-		/**
-		 * Maps session ID to sessions created by ApplicationPool::get(). Session IDs
-		 * are sent back to the ApplicationPool client. This allows the ApplicationPool
-		 * client to tell us which of the multiple sessions it wants to close, later on.
-		 */
-		map<int, SessionPtr> sessions;
-		
-		/** Last used session ID. */
-		int lastSessionID;
-		
-		SpecificContext() {
-			lastSessionID = 0;
-		}
-	};
-	
-	typedef MessageServer::CommonClientContext CommonClientContext;
-	
-	
-	/** The application pool that's being exposed through the socket. */
-	ApplicationPool::Ptr pool;
-	
-	AnalyticsLoggerPtr analyticsLogger;
-	
-	
-	/*********************************************
-	 * Message handler methods
-	 *********************************************/
-	
-	void processGet(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) {
-		/* Historical note:
-		 *
-		 * There seems to be a bug in MacOS X Leopard w.r.t. Unix server
-		 * sockets file descriptors that are passed to another process.
-		 * Usually Unix server sockets work fine, but when they're passed
-		 * to another process, then clients that connect to the socket
-		 * can incorrectly determine that the client socket is closed,
-		 * even though that's not actually the case. More specifically:
-		 * recv()/read() calls on these client sockets can return 0 even
-		 * when we know EOF is not reached.
-		 *
-		 * The ApplicationPool infrastructure used to connect to a backend
-		 * process's Unix socket in the helper server process, and then
-		 * pass the connection file descriptor to the web server, which
-		 * triggers this kernel bug. We used to work around this by using
-		 * TCP sockets instead of Unix sockets; TCP sockets can still fail
-		 * with this fake-EOF bug once in a while, but not nearly as often
-		 * as with Unix sockets.
-		 *
-		 * This problem no longer applies today. The client socket is now
-		 * created directly in the web server (implemented by the code below),
-		 * and the bug is no longer triggered.
-		 */
-		
-		TRACE_POINT();
-		SessionPtr session;
-		bool failed = false;
-		
-		commonContext.requireRights(Account::GET);
-		
-		try {
-			PoolOptions options(args, 1, analyticsLogger);
-			options.environmentVariables = ptr(new EnvironmentVariablesFetcher(
-				commonContext.fd, options));
-			options.initiateSession = false;
-			session = pool->get(options);
-			specificContext->sessions[specificContext->lastSessionID] = session;
-			specificContext->lastSessionID++;
-		} catch (const SpawnException &e) {
-			UPDATE_TRACE_POINT();
-			this_thread::disable_syscall_interruption dsi;
-			
-			if (e.hasErrorPage()) {
-				P_TRACE(3, "Client " << commonContext.name() << ": SpawnException "
-					"occured (with error page)");
-				writeArrayMessage(commonContext.fd, "SpawnException", e.what(), "true", NULL);
-				writeScalarMessage(commonContext.fd, e.getErrorPage());
-			} else {
-				P_TRACE(3, "Client " << commonContext.name() << ": SpawnException "
-					"occured (no error page)");
-				writeArrayMessage(commonContext.fd, "SpawnException", e.what(), "false", NULL);
-			}
-			failed = true;
-		} catch (const BusyException &e) {
-			UPDATE_TRACE_POINT();
-			this_thread::disable_syscall_interruption dsi;
-			writeArrayMessage(commonContext.fd, "BusyException", e.what(), NULL);
-			failed = true;
-		} catch (const IOException &e) {
-			UPDATE_TRACE_POINT();
-			this_thread::disable_syscall_interruption dsi;
-			writeArrayMessage(commonContext.fd, "IOException", e.what(), NULL);
-			failed = true;
-		}
-		UPDATE_TRACE_POINT();
-		if (!failed) {
-			this_thread::disable_syscall_interruption dsi;
-			try {
-				UPDATE_TRACE_POINT();
-				writeArrayMessage(commonContext.fd,
-					"ok",
-					toString(session->getPid()).c_str(),
-					session->getSocketType().c_str(),
-					session->getSocketName().c_str(),
-					session->getDetachKey().c_str(),
-					session->getConnectPassword().c_str(),
-					session->getGupid().c_str(),
-					toString(specificContext->lastSessionID - 1).c_str(),
-					NULL);
-				UPDATE_TRACE_POINT();
-				session->closeStream();
-			} catch (const std::exception &e) {
-				P_TRACE(3, "Client " << commonContext.name() << ": could not send "
-					"'ok' back to the ApplicationPool client: " <<
-					e.what());
-				specificContext->sessions.erase(specificContext->lastSessionID - 1);
-				throw;
-			}
-		}
-	}
-	
-	void processClose(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) {
-		TRACE_POINT();
-		specificContext->sessions.erase(atoi(args[1]));
-	}
-	
-	void processDetach(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) {
-		TRACE_POINT();
-		commonContext.requireRights(Account::DETACH);
-		if (pool->detach(args[1])) {
-			writeArrayMessage(commonContext.fd, "true", NULL);
-		} else {
-			writeArrayMessage(commonContext.fd, "false", NULL);
-		}
-	}
-	
-	void processClear(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) {
-		TRACE_POINT();
-		commonContext.requireRights(Account::CLEAR);
-		pool->clear();
-	}
-	
-	void processSetMaxIdleTime(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) {
-		TRACE_POINT();
-		commonContext.requireRights(Account::SET_PARAMETERS);
-		pool->setMaxIdleTime(atoi(args[1]));
-	}
-	
-	void processSetMax(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) {
-		TRACE_POINT();
-		commonContext.requireRights(Account::SET_PARAMETERS);
-		pool->setMax(atoi(args[1]));
-	}
-	
-	void processGetActive(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) {
-		TRACE_POINT();
-		commonContext.requireRights(Account::GET_PARAMETERS);
-		writeArrayMessage(commonContext.fd, toString(pool->getActive()).c_str(), NULL);
-	}
-	
-	void processGetCount(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) {
-		TRACE_POINT();
-		commonContext.requireRights(Account::GET_PARAMETERS);
-		writeArrayMessage(commonContext.fd, toString(pool->getCount()).c_str(), NULL);
-	}
-	
-	void processGetGlobalQueueSize(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) {
-		TRACE_POINT();
-		commonContext.requireRights(Account::GET_PARAMETERS);
-		writeArrayMessage(commonContext.fd, toString(pool->getGlobalQueueSize()).c_str(), NULL);
-	}
-	
-	void processSetMaxPerApp(CommonClientContext &commonContext, SpecificContext *specificContext, unsigned int maxPerApp) {
-		TRACE_POINT();
-		commonContext.requireRights(Account::SET_PARAMETERS);
-		pool->setMaxPerApp(maxPerApp);
-	}
-	
-	void processGetSpawnServerPid(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) {
-		TRACE_POINT();
-		commonContext.requireRights(Account::GET_PARAMETERS);
-		writeArrayMessage(commonContext.fd, toString(pool->getSpawnServerPid()).c_str(), NULL);
-	}
-	
-	void processInspect(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) {
-		TRACE_POINT();
-		commonContext.requireRights(Account::INSPECT_BASIC_INFO);
-		writeScalarMessage(commonContext.fd, pool->inspect());
-	}
-	
-	void processToXml(CommonClientContext &commonContext, SpecificContext *specificContext, const vector<string> &args) {
-		TRACE_POINT();
-		commonContext.requireRights(Account::INSPECT_BASIC_INFO);
-		bool includeSensitiveInfo =
-			commonContext.account->hasRights(Account::INSPECT_SENSITIVE_INFO) &&
-			args[1] == "true";
-		writeScalarMessage(commonContext.fd, pool->toXml(includeSensitiveInfo));
-	}
-	
-public:
-	/**
-	 * Creates a new ApplicationPool::Server object.
-	 *
-	 * @param pool The pool to expose.
-	 */
-	Server(const ApplicationPool::Ptr &pool, const AnalyticsLoggerPtr &analyticsLogger = AnalyticsLoggerPtr()) {
-		this->pool = pool;
-		this->analyticsLogger = analyticsLogger;
-	}
-	
-	virtual MessageServer::ClientContextPtr newClient(CommonClientContext &commonContext) {
-		return ptr(new SpecificContext());
-	}
-	
-	virtual bool processMessage(CommonClientContext &commonContext,
-	                            MessageServer::ClientContextPtr &_specificContext,
-	                            const vector<string> &args)
-	{
-		SpecificContext *specificContext = (SpecificContext *) _specificContext.get();
-		try {
-			if (args[0] == "get") {
-				processGet(commonContext, specificContext, args);
-			} else if (args[0] == "close" && args.size() == 2) {
-				processClose(commonContext, specificContext, args);
-			} else if (args[0] == "detach" && args.size() == 2) {
-				processDetach(commonContext, specificContext, args);
-			} else if (args[0] == "clear" && args.size() == 1) {
-				processClear(commonContext, specificContext, args);
-			} else if (args[0] == "setMaxIdleTime" && args.size() == 2) {
-				processSetMaxIdleTime(commonContext, specificContext, args);
-			} else if (args[0] == "setMax" && args.size() == 2) {
-				processSetMax(commonContext, specificContext, args);
-			} else if (args[0] == "getActive" && args.size() == 1) {
-				processGetActive(commonContext, specificContext, args);
-			} else if (args[0] == "getCount" && args.size() == 1) {
-				processGetCount(commonContext, specificContext, args);
-			} else if (args[0] == "getGlobalQueueSize" && args.size() == 1) {
-				processGetGlobalQueueSize(commonContext, specificContext, args);
-			} else if (args[0] == "setMaxPerApp" && args.size() == 2) {
-				processSetMaxPerApp(commonContext, specificContext, atoi(args[1]));
-			} else if (args[0] == "getSpawnServerPid" && args.size() == 1) {
-				processGetSpawnServerPid(commonContext, specificContext, args);
-			} else if (args[0] == "inspect" && args.size() == 1) {
-				processInspect(commonContext, specificContext, args);
-			} else if (args[0] == "toXml" && args.size() == 2) {
-				processToXml(commonContext, specificContext, args);
-			} else {
-				return false;
-			}
-		} catch (const SecurityException &) {
-			/* Client does not have enough rights to perform a certain action.
-			 * It has already been notified of this; ignore exception and move on.
-			 */
-		}
-		return true;
-	}
-};
-
-} // namespace ApplicationPool
-} // namespace Passenger
-
-#endif /* _PASSENGER_APPLICATION_POOL_SERVER_H_ */
diff --git a/ext/common/ApplicationPool2/AppTypes.cpp b/ext/common/ApplicationPool2/AppTypes.cpp
new file mode 100644
index 0000000..45d4a0c
--- /dev/null
+++ b/ext/common/ApplicationPool2/AppTypes.cpp
@@ -0,0 +1,74 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#include <ApplicationPool2/AppTypes.h>
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+// Don't forget to update ApplicationPool2::Options::getStartCommand() too.
+const AppTypeDefinition appTypeDefinitions[] = {
+	{ PAT_RACK, "rack", "config.ru", "Passenger RackApp" },
+	{ PAT_WSGI, "wsgi", "passenger_wsgi.py", "Passenger WsgiApp" },
+	{ PAT_CLASSIC_RAILS, "classic-rails", "config/environment.rb", "Passenger ClassicRailsApp" },
+	{ PAT_NONE, NULL, NULL, NULL }
+};
+
+} // namespace ApplicationPool2
+} // namespace Passenger
+
+
+using namespace Passenger;
+using namespace Passenger::ApplicationPool2;
+
+PP_AppTypeDetector *
+pp_app_type_detector_new() {
+	return new AppTypeDetector();
+}
+
+void
+pp_app_type_detector_free(PP_AppTypeDetector *detector) {
+	delete (AppTypeDetector *) detector;
+}
+
+PassengerAppType
+pp_app_type_detector_check_document_root(PP_AppTypeDetector *_detector,
+	const char *documentRoot, unsigned int len, int resolveFirstSymlink)
+{
+	AppTypeDetector *detector = (AppTypeDetector *) _detector;
+	return detector->checkDocumentRoot(StaticString(documentRoot, len), resolveFirstSymlink);
+}
+
+PassengerAppType
+pp_app_type_detector_check_app_root(PP_AppTypeDetector *_detector,
+	const char *appRoot, unsigned int len)
+{
+	AppTypeDetector *detector = (AppTypeDetector *) _detector;
+	return detector->checkAppRoot(StaticString(appRoot, len));
+}
+
+const char *
+pp_get_app_type_name(PassengerAppType type) {
+	return getAppTypeName(type);
+}
diff --git a/ext/common/ApplicationPool2/AppTypes.h b/ext/common/ApplicationPool2/AppTypes.h
new file mode 100644
index 0000000..106c6ff
--- /dev/null
+++ b/ext/common/ApplicationPool2/AppTypes.h
@@ -0,0 +1,254 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_APPLICATION_POOL2_APP_TYPES_H_
+#define _PASSENGER_APPLICATION_POOL2_APP_TYPES_H_
+
+/**
+ * Application type registry
+ *
+ * All supported application types (e.g. Rack, classic Rails, WSGI, etc)
+ * are registered here. The AppTypeDetector is responsible for checking
+ * what kind of application lives under the given directory.
+ */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+typedef enum {
+	PAT_RACK,
+	PAT_WSGI,
+	PAT_CLASSIC_RAILS,
+	PAT_NONE
+} PassengerAppType;
+
+typedef void PP_AppTypeDetector;
+
+PP_AppTypeDetector *pp_app_type_detector_new();
+void pp_app_type_detector_free(PP_AppTypeDetector *detector);
+PassengerAppType pp_app_type_detector_check_document_root(PP_AppTypeDetector *detector,
+	const char *documentRoot, unsigned int len, int resolveFirstSymlink);
+PassengerAppType pp_app_type_detector_check_app_root(PP_AppTypeDetector *detector,
+	const char *appRoot, unsigned int len);
+
+const char *pp_get_app_type_name(PassengerAppType type);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
+#ifdef __cplusplus
+#include <oxt/macros.hpp>
+#include <oxt/backtrace.hpp>
+#include <cstdlib>
+#include <string>
+#include <Logging.h>
+#include <StaticString.h>
+#include <Utils.h>
+#include <Utils/StrIntUtils.h>
+#include <Utils/CachedFileStat.hpp>
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace std;
+
+
+struct AppTypeDefinition {
+	const PassengerAppType type;
+	const char * const name;
+	const char * const startupFile;
+	const char * const processTitle;
+};
+
+extern const AppTypeDefinition appTypeDefinitions[];
+
+
+class AppTypeDetector {
+private:
+	CachedFileStat *cstat;
+	unsigned int throttleRate;
+	bool ownsCstat;
+
+	bool check(char *buf, const char *end, const StaticString &appRoot, const char *name) {
+		char *pos = buf;
+		pos = appendData(pos, end, appRoot);
+		pos = appendData(pos, end, "/");
+		pos = appendData(pos, end, name);
+		if (OXT_UNLIKELY(pos == end)) {
+			TRACE_POINT();
+			P_CRITICAL("BUG: buffer overflow");
+			abort();
+		}
+		return fileExists(StaticString(buf, pos - buf), cstat, throttleRate);
+	}
+
+public:
+	AppTypeDetector() {
+		cstat = new CachedFileStat();
+		ownsCstat = true;
+		throttleRate = 1;
+	}
+
+	AppTypeDetector(CachedFileStat *_cstat, unsigned int _throttleRate) {
+		cstat = _cstat;
+		ownsCstat = false;
+		throttleRate = _throttleRate;
+	}
+
+	~AppTypeDetector() {
+		if (ownsCstat) {
+			delete cstat;
+		}
+	}
+
+	/**
+	 * Given a web server document root (that is, some subdirectory under the
+	 * application root, e.g. "/webapps/foobar/public"), returns the type of
+	 * application that lives there. Returns PAT_NONE if it wasn't able to detect
+	 * a supported application type.
+	 *
+	 * If `resolveFirstSymlink` is given, and `documentRoot` is a symlink, then
+	 * this function will check the parent directory
+	 * of the directory that the symlink points to (i.e. `resolve(documentRoot) + "/.."`),
+	 * instead of checking the directory that the symlink is located in (i.e.
+	 * `dirname(documentRoot)`).
+	 *
+	 * If `appRoot` is non-NULL, then the inferred application root will be stored here.
+	 *
+	 * @throws FileSystemException Unable to check because of a filesystem error.
+	 * @throws TimeRetrievalException
+	 * @throws boost::thread_interrupted
+	 */
+	PassengerAppType checkDocumentRoot(const StaticString &documentRoot,
+		bool resolveFirstSymlink = false,
+		string *appRoot = NULL)
+	{
+		if (!resolveFirstSymlink) {
+			if (appRoot != NULL) {
+				*appRoot = extractDirNameStatic(documentRoot);
+				return checkAppRoot(*appRoot);
+			} else {
+				return checkAppRoot(extractDirNameStatic(documentRoot));
+			}
+		} else {
+			char ntDocRoot[documentRoot.size() + 1];
+			memcpy(ntDocRoot, documentRoot.data(), documentRoot.size());
+			ntDocRoot[documentRoot.size()] = '\0';
+			string resolvedDocumentRoot = resolveSymlink(ntDocRoot);
+			if (appRoot != NULL) {
+				*appRoot = extractDirNameStatic(resolvedDocumentRoot);
+				return checkAppRoot(*appRoot);
+			} else {
+				return checkAppRoot(extractDirNameStatic(resolvedDocumentRoot));
+			}
+		}
+	}
+
+	/**
+	 * Returns the type of application that lives under the application
+	 * directory `appRoot`. Returns PAT_NONE if it wasn't able to detect
+	 * a supported application type.
+	 *
+	 * @throws FileSystemException Unable to check because of a filesystem error.
+	 * @throws TimeRetrievalException
+	 * @throws boost::thread_interrupted
+	 */
+	PassengerAppType checkAppRoot(const StaticString &appRoot) {
+		char buf[appRoot.size() + 32];
+		const char *end = buf + appRoot.size() + 32;
+		const AppTypeDefinition *definition = &appTypeDefinitions[0];
+
+		while (definition->type != PAT_NONE) {
+			if (check(buf, end, appRoot, definition->startupFile)) {
+				return definition->type;
+			}
+			definition++;
+		}
+		return PAT_NONE;
+	}
+};
+
+
+inline const char *
+getAppTypeName(PassengerAppType type) {
+	const AppTypeDefinition *definition = &appTypeDefinitions[0];
+
+	while (definition->type != PAT_NONE) {
+		if (definition->type == type) {
+			return definition->name;
+		}
+		definition++;
+	}
+	return NULL;
+}
+
+inline PassengerAppType
+getAppType(const StaticString &name) {
+	const AppTypeDefinition *definition = &appTypeDefinitions[0];
+
+	while (definition->type != PAT_NONE) {
+		if (name == definition->name) {
+			return definition->type;
+		}
+		definition++;
+	}
+	return PAT_NONE;
+}
+
+inline const char *
+getAppTypeStartupFile(PassengerAppType type) {
+	const AppTypeDefinition *definition = &appTypeDefinitions[0];
+
+	while (definition->type != PAT_NONE) {
+		if (definition->type == type) {
+			return definition->startupFile;
+		}
+		definition++;
+	}
+	return NULL;
+}
+
+inline const char *
+getAppTypeProcessTitle(PassengerAppType type) {
+	const AppTypeDefinition *definition = &appTypeDefinitions[0];
+
+	while (definition->type != PAT_NONE) {
+		if (definition->type == type) {
+			return definition->processTitle;
+		}
+		definition++;
+	}
+	return NULL;
+}
+
+
+} // namespace ApplicationPool2
+} // namespace Passenger
+#endif /* __cplusplus */
+
+#endif /* _PASSENGER_APPLICATION_POOL2_APP_TYPES_H_ */
diff --git a/ext/common/ApplicationPool2/Common.h b/ext/common/ApplicationPool2/Common.h
new file mode 100644
index 0000000..cf2147f
--- /dev/null
+++ b/ext/common/ApplicationPool2/Common.h
@@ -0,0 +1,149 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_APPLICATION_POOL2_COMMON_H_
+#define _PASSENGER_APPLICATION_POOL2_COMMON_H_
+
+#include <boost/thread.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/function.hpp>
+#include <oxt/tracable_exception.hpp>
+#include <ApplicationPool2/Options.h>
+#include <Utils/StringMap.h>
+
+namespace tut {
+	struct ApplicationPool2_PoolTest;
+}
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+class Pool;
+class SuperGroup;
+class Group;
+class Process;
+class Session;
+
+/**
+ * The result of a Pool::disableProcess/Group::disable() call. Some values are only
+ * returned by the functions, some values are only passed to the Group::disable()
+ * callback, some values appear in all cases.
+ */
+enum DisableResult {
+	// The process has been successfully disabled.
+	// Returned by functions and passed to the callback.
+	DR_SUCCESS,
+	
+	// The disabling of the process was canceled before completion.
+	// The process still exists.
+	// Only passed to the callback.
+	DR_CANCELED,
+	
+	// Nothing happened: the requested process does not exist (anymore)
+	// or was already disabled.
+	// Returned by functions and passed to the callback.
+	DR_NOOP,
+	
+	// The disabling of the process failed: an error occurred.
+	// Only passed to the callback.
+	DR_ERROR,
+
+	// Indicates that the process cannot be disabled immediately
+	// and that the callback will be called later.
+	// Only returned by functions.
+	DR_DEFERRED
+};
+
+typedef shared_ptr<Pool> PoolPtr;
+typedef shared_ptr<SuperGroup> SuperGroupPtr;
+typedef shared_ptr<Group> GroupPtr;
+typedef shared_ptr<Process> ProcessPtr;
+typedef shared_ptr<Session> SessionPtr;
+typedef shared_ptr<tracable_exception> ExceptionPtr;
+typedef StringMap<SuperGroupPtr> SuperGroupMap;
+typedef function<void (const SessionPtr &session, const ExceptionPtr &e)> GetCallback;
+typedef function<void (const ProcessPtr &process, DisableResult result)> DisableCallback;
+typedef function<void ()> Callback;
+
+struct GetWaiter {
+	Options options;
+	GetCallback callback;
+	
+	GetWaiter(const Options &o, const GetCallback &cb)
+		: options(o),
+		  callback(cb)
+	{
+		options.persist(o);
+	}
+};
+
+struct Ticket {
+	boost::mutex syncher;
+	condition_variable cond;
+	SessionPtr session;
+	ExceptionPtr exception;
+};
+
+struct SpawnerConfig {
+	// Used by SmartSpawner and DirectSpawner.
+	/** Whether to print the preloader's and application's stdout. */
+	bool forwardStdout;
+	/** Whether to print the preloader's and application's stderr. */
+	bool forwardStderr;
+	/** A random generator to use. */
+	RandomGeneratorPtr randomGenerator;
+
+	// Used by DummySpawner and SpawnerFactory.
+	unsigned int concurrency;
+	unsigned int spawnerCreationSleepTime;
+	unsigned int spawnTime;
+
+	SpawnerConfig(const RandomGeneratorPtr &randomGenerator = RandomGeneratorPtr())
+		: forwardStdout(true),
+		  forwardStderr(true),
+		  concurrency(1),
+		  spawnerCreationSleepTime(0),
+		  spawnTime(0)
+	{
+		if (randomGenerator != NULL) {
+			this->randomGenerator = randomGenerator;
+		} else {
+			this->randomGenerator = make_shared<RandomGenerator>();
+		}
+	}
+};
+
+typedef shared_ptr<SpawnerConfig> SpawnerConfigPtr;
+
+ExceptionPtr copyException(const tracable_exception &e);
+void rethrowException(const ExceptionPtr &e);
+
+} // namespace ApplicationPool2
+} // namespace Passenger
+
+#endif /* _PASSENGER_APPLICATION_POOL2_COMMON_H_ */
diff --git a/ext/common/ApplicationPool2/ComponentInfo.h b/ext/common/ApplicationPool2/ComponentInfo.h
new file mode 100644
index 0000000..c72dbd1
--- /dev/null
+++ b/ext/common/ApplicationPool2/ComponentInfo.h
@@ -0,0 +1,53 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011, 2012 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_APPLICATION_POOL2_COMPONENT_INFO_H_
+#define _PASSENGER_APPLICATION_POOL2_COMPONENT_INFO_H_
+
+#include <string>
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace std;
+
+
+struct ComponentInfo {
+	string name;
+	bool   isDefault;
+	
+	/****************/
+	/****************/
+	
+	ComponentInfo() {
+		isDefault = false;
+		/******************/
+	}
+};
+
+
+} // namespace ApplicationPool2
+} // namespace Passenger
+
+#endif /* _PASSENGER_APPLICATION_POOL2_COMPONENT_INFO_H_ */
diff --git a/ext/common/ApplicationPool2/DirectSpawner.h b/ext/common/ApplicationPool2/DirectSpawner.h
new file mode 100644
index 0000000..7af54b6
--- /dev/null
+++ b/ext/common/ApplicationPool2/DirectSpawner.h
@@ -0,0 +1,255 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_APPLICATION_POOL2_DIRECT_SPAWNER_H_
+#define _PASSENGER_APPLICATION_POOL2_DIRECT_SPAWNER_H_
+
+#include <ApplicationPool2/Spawner.h>
+#include <limits.h>  // for PTHREAD_STACK_MIN
+#include <pthread.h>
+
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+
+class DirectSpawner: public Spawner {
+private:
+	SafeLibevPtr libev;
+	
+	static int startBackgroundThread(void *(*mainFunction)(void *), void *arg) {
+		// Using raw pthread API because we don't want to register such
+		// trivial threads on the oxt::thread list.
+		pthread_t thr;
+		pthread_attr_t attr;
+		size_t stack_size = 96 * 1024;
+		
+		unsigned long min_stack_size;
+		bool stack_min_size_defined;
+		bool round_stack_size;
+		int ret;
+		
+		#ifdef PTHREAD_STACK_MIN
+			// PTHREAD_STACK_MIN may not be a constant macro so we need
+			// to evaluate it dynamically.
+			min_stack_size = PTHREAD_STACK_MIN;
+			stack_min_size_defined = true;
+		#else
+			// Assume minimum stack size is 128 KB.
+			min_stack_size = 128 * 1024;
+			stack_min_size_defined = false;
+		#endif
+		if (stack_size != 0 && stack_size < min_stack_size) {
+			stack_size = min_stack_size;
+			round_stack_size = !stack_min_size_defined;
+		} else {
+			round_stack_size = true;
+		}
+		
+		if (round_stack_size) {
+			// Round stack size up to page boundary.
+			long page_size;
+			#if defined(_SC_PAGESIZE)
+				page_size = sysconf(_SC_PAGESIZE);
+			#elif defined(_SC_PAGE_SIZE)
+				page_size = sysconf(_SC_PAGE_SIZE);
+			#elif defined(PAGESIZE)
+				page_size = sysconf(PAGESIZE);
+			#elif defined(PAGE_SIZE)
+				page_size = sysconf(PAGE_SIZE);
+			#else
+				page_size = getpagesize();
+			#endif
+			if (stack_size % page_size != 0) {
+				stack_size = stack_size - (stack_size % page_size) + page_size;
+			}
+		}
+		
+		pthread_attr_init(&attr);
+		pthread_attr_setdetachstate(&attr, 1);
+		pthread_attr_setstacksize(&attr, stack_size);
+		ret = pthread_create(&thr, &attr, mainFunction, arg);
+		pthread_attr_destroy(&attr);
+		return ret;
+	}
+	
+	static void *detachProcessMain(void *arg) {
+		this_thread::disable_syscall_interruption dsi;
+		pid_t pid = (pid_t) (long) arg;
+		syscalls::waitpid(pid, NULL, 0);
+		return NULL;
+	}
+	
+	void detachProcess(pid_t pid) {
+		startBackgroundThread(detachProcessMain, (void *) (long) pid);
+	}
+	
+	vector<string> createCommand(const Options &options, const SpawnPreparationInfo &preparation,
+		shared_array<const char *> &args) const
+	{
+		vector<string> startCommandArgs;
+		string agentsDir = resourceLocator.getAgentsDir();
+		vector<string> command;
+		
+		split(options.getStartCommand(resourceLocator), '\t', startCommandArgs);
+		if (startCommandArgs.empty()) {
+			throw RuntimeException("No startCommand given");
+		}
+
+		if (shouldLoadShellEnvvars(options, preparation)) {
+			command.push_back(preparation.shell);
+			command.push_back(preparation.shell);
+			command.push_back("-lc");
+			command.push_back("exec \"$@\"");
+			command.push_back("SpawnPreparerShell");
+		} else {
+			command.push_back(agentsDir + "/SpawnPreparer");
+		}
+		command.push_back(agentsDir + "/SpawnPreparer");
+		command.push_back(preparation.appRoot);
+		command.push_back(serializeEnvvarsFromPoolOptions(options));
+		command.push_back(startCommandArgs[0]);
+		// Note: do not try to set a process title here.
+		// https://code.google.com/p/phusion-passenger/issues/detail?id=855
+		command.push_back(startCommandArgs[0]);
+		for (unsigned int i = 1; i < startCommandArgs.size(); i++) {
+			command.push_back(startCommandArgs[i]);
+		}
+		
+		createCommandArgs(command, args);
+		return command;
+	}
+	
+public:
+	DirectSpawner(const SafeLibevPtr &_libev,
+		const ResourceLocator &_resourceLocator,
+		const ServerInstanceDir::GenerationPtr &_generation,
+		const SpawnerConfigPtr &_config = SpawnerConfigPtr())
+		: Spawner(_resourceLocator),
+		  libev(_libev)
+	{
+		generation = _generation;
+		if (_config == NULL) {
+			config = make_shared<SpawnerConfig>();
+		} else {
+			config = _config;
+		}
+	}
+	
+	virtual ProcessPtr spawn(const Options &options) {
+		TRACE_POINT();
+		this_thread::disable_interruption di;
+		this_thread::disable_syscall_interruption dsi;
+		P_DEBUG("Spawning new process: appRoot=" << options.appRoot);
+		possiblyRaiseInternalError(options);
+
+		shared_array<const char *> args;
+		SpawnPreparationInfo preparation = prepareSpawn(options);
+		vector<string> command = createCommand(options, preparation, args);
+		SocketPair adminSocket = createUnixSocketPair();
+		Pipe errorPipe = createPipe();
+		DebugDirPtr debugDir = make_shared<DebugDir>(preparation.uid, preparation.gid);
+		pid_t pid;
+		
+		pid = syscalls::fork();
+		if (pid == 0) {
+			setenv("PASSENGER_DEBUG_DIR", debugDir->getPath().c_str(), 1);
+			purgeStdio(stdout);
+			purgeStdio(stderr);
+			resetSignalHandlersAndMask();
+			disableMallocDebugging();
+			int adminSocketCopy = dup2(adminSocket.first, 3);
+			int errorPipeCopy = dup2(errorPipe.second, 4);
+			dup2(adminSocketCopy, 0);
+			dup2(adminSocketCopy, 1);
+			dup2(errorPipeCopy, 2);
+			closeAllFileDescriptors(2);
+			setChroot(preparation);
+			switchUser(preparation);
+			setWorkingDirectory(preparation);
+			execvp(args[0], (char * const *) args.get());
+			
+			int e = errno;
+			printf("!> Error\n");
+			printf("!> \n");
+			printf("Cannot execute \"%s\": %s (errno=%d)\n", command[0].c_str(),
+				strerror(e), e);
+			fprintf(stderr, "Cannot execute \"%s\": %s (errno=%d)\n",
+				command[0].c_str(), strerror(e), e);
+			fflush(stdout);
+			fflush(stderr);
+			_exit(1);
+			
+		} else if (pid == -1) {
+			int e = errno;
+			throw SystemException("Cannot fork a new process", e);
+			
+		} else {
+			UPDATE_TRACE_POINT();
+			ScopeGuard guard(boost::bind(nonInterruptableKillAndWaitpid, pid));
+			P_DEBUG("Process forked for appRoot=" << options.appRoot << ": PID " << pid);
+			adminSocket.first.close();
+			errorPipe.second.close();
+			
+			NegotiationDetails details;
+			details.preparation = &preparation;
+			details.libev = libev;
+			details.stderrCapturer =
+				make_shared<BackgroundIOCapturer>(
+					errorPipe.first,
+					string("[App ") + toString(pid) + " stderr] ",
+					config->forwardStderr);
+			details.stderrCapturer->start();
+			details.pid = pid;
+			details.adminSocket = adminSocket.second;
+			details.io = BufferedIO(adminSocket.second);
+			details.errorPipe = errorPipe.first;
+			details.options = &options;
+			details.forwardStderr = config->forwardStderr;
+			details.debugDir = debugDir;
+			
+			ProcessPtr process;
+			{
+				this_thread::restore_interruption ri(di);
+				this_thread::restore_syscall_interruption rsi(dsi);
+				process = negotiateSpawn(details);
+			}
+			detachProcess(process->pid);
+			guard.clear();
+			P_DEBUG("Process spawning done: appRoot=" << options.appRoot <<
+				", pid=" << process->pid);
+			return process;
+		}
+	}
+};
+
+
+} // namespace ApplicationPool2
+} // namespace Passenger
+
+#endif /* _PASSENGER_APPLICATION_POOL2_DIRECT_SPAWNER_H_ */
diff --git a/ext/common/ApplicationPool2/DummySpawner.h b/ext/common/ApplicationPool2/DummySpawner.h
new file mode 100644
index 0000000..274d47e
--- /dev/null
+++ b/ext/common/ApplicationPool2/DummySpawner.h
@@ -0,0 +1,90 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_APPLICATION_POOL2_DUMMY_SPAWNER_H_
+#define _PASSENGER_APPLICATION_POOL2_DUMMY_SPAWNER_H_
+
+#include <ApplicationPool2/Spawner.h>
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+
+class DummySpawner: public Spawner {
+private:
+	SpawnerConfigPtr config;
+	boost::mutex lock;
+	unsigned int count;
+	
+public:
+	unsigned int cleanCount;
+	
+	DummySpawner(const ResourceLocator &resourceLocator, const SpawnerConfigPtr &_config)
+		: Spawner(resourceLocator),
+		  config(_config)
+	{
+		count = 0;
+		cleanCount = 0;
+	}
+	
+	virtual ProcessPtr spawn(const Options &options) {
+		TRACE_POINT();
+		possiblyRaiseInternalError(options);
+
+		SocketPair adminSocket = createUnixSocketPair();
+		SocketListPtr sockets = make_shared<SocketList>();
+		sockets->add("main", "tcp://127.0.0.1:1234", "session", config->concurrency);
+		syscalls::usleep(config->spawnTime);
+		
+		boost::lock_guard<boost::mutex> l(lock);
+		count++;
+		ProcessPtr process = make_shared<Process>(SafeLibevPtr(),
+			(pid_t) count, "gupid-" + toString(count),
+			toString(count),
+			adminSocket.second, FileDescriptor(), sockets,
+			SystemTime::getUsec(), SystemTime::getUsec());
+		process->dummy = true;
+		return process;
+	}
+
+	virtual bool cleanable() const {
+		return true;
+	}
+
+	virtual void cleanup() {
+		cleanCount++;
+	}
+};
+
+typedef shared_ptr<DummySpawner> DummySpawnerPtr;
+
+
+} // namespace ApplicationPool2
+} // namespace Passenger
+
+#endif /* _PASSENGER_APPLICATION_POOL2_DUMMY_SPAWNER_H_ */
diff --git a/ext/common/ApplicationPool2/Group.h b/ext/common/ApplicationPool2/Group.h
new file mode 100644
index 0000000..082eda1
--- /dev/null
+++ b/ext/common/ApplicationPool2/Group.h
@@ -0,0 +1,1119 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_APPLICATION_POOL2_GROUP_H_
+#define _PASSENGER_APPLICATION_POOL2_GROUP_H_
+
+#include <string>
+#include <map>
+#include <queue>
+#include <deque>
+#include <boost/thread.hpp>
+#include <boost/bind.hpp>
+#include <boost/foreach.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/make_shared.hpp>
+#include <oxt/macros.hpp>
+#include <oxt/thread.hpp>
+#include <oxt/dynamic_thread_group.hpp>
+#include <cassert>
+#include <ApplicationPool2/Common.h>
+#include <ApplicationPool2/ComponentInfo.h>
+#include <ApplicationPool2/SpawnerFactory.h>
+#include <ApplicationPool2/Process.h>
+#include <ApplicationPool2/Options.h>
+#include <Utils.h>
+#include <Utils/CachedFileStat.hpp>
+#include <Utils/FileChangeChecker.h>
+#include <Utils/SmallVector.h>
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+
+/**
+ * Except for otherwise documented parts, this class is not thread-safe,
+ * so only access within ApplicationPool lock.
+ */
+class Group: public enable_shared_from_this<Group> {
+private:
+	friend class Pool;
+	friend class SuperGroup;
+	
+	struct GetAction {
+		GetCallback callback;
+		SessionPtr session;
+	};
+	
+	struct DisableWaiter {
+		ProcessPtr process;
+		DisableCallback callback;
+		
+		DisableWaiter(const ProcessPtr &_process, const DisableCallback &_callback)
+			: process(_process),
+			  callback(_callback)
+			{ }
+	};
+	
+	/**
+	 * Protects `m_shuttingDown`.
+	 */
+	mutable boost::mutex lifetimeSyncher;
+	/**
+	 * A back reference to the containing SuperGroup. Should never
+	 * be NULL because a SuperGroup should outlive all its containing
+	 * Groups.
+	 * Read-only; only set during initialization.
+	 */
+	weak_ptr<SuperGroup> superGroup;
+	CachedFileStat cstat;
+	FileChangeChecker fileChangeChecker;
+	string restartFile;
+	string alwaysRestartFile;
+
+	/** Number of times a restart has been initiated so far. This is incremented immediately
+	 * in Group::restart(), and is used to abort the restarter thread that was active at the
+	 * time the restart was initiated. It's safe for the value to wrap around.
+	 */
+	unsigned int restartsInitiated;
+	/**
+	 * Whether process(es) are being spawned right now.
+	 */
+	bool m_spawning;
+	/** Whether a non-rolling restart is in progress (i.e. whether spawnThreadRealMain()
+	 * is at work). While it is in progress, it is not possible to signal the desire to
+	 * spawn new process. If spawning was already in progress when the restart was initiated,
+	 * then the spawning will abort as soon as possible.
+	 *
+	 * When rolling restarting is in progress, this flag is false.
+	 *
+	 * Invariant:
+	 *    if m_restarting: !m_spawning
+	 */
+	bool m_restarting;
+	/**
+	 * Do not access directly, always use `isAlive()`/`getLifeStatus()` or
+	 * through `lifetimeSyncher`.
+	 * 
+	 * Invariant:
+	 *    if lifeStatus != ALIVE:
+	 *       enabledCount == 0
+	 *       disablingCount == 0
+	 *       disabledCount == 0
+	 */
+	enum LifeStatus {
+		/** Up and operational. */
+		ALIVE,
+		/** Being shut down. The containing SuperGroup has issued the shutdown()
+		 * command, and this Group is now waiting for all detached processes to
+		 * exit. You cannot call `get()`, `restart()` and other mutating methods
+		 * anymore, and all threads created by this Group will exit as soon
+		 * as possible.
+		 */
+		SHUTTING_DOWN,
+		/**
+		 * Shut down. Object no longer usable. No Processes are referenced from
+		 * this Group anymore.
+		 */
+		SHUT_DOWN
+	} lifeStatus;
+
+	/** Contains the spawn loop thread and the restarter thread. */
+	dynamic_thread_group interruptableThreads;
+
+	/** This timer scans `detachedProcesses` periodically to see
+	 * whether any of the Processes can be shut down.
+	 */
+	bool detachedProcessesCheckerActive;
+	condition_variable detachedProcessesCheckerCond;
+	Callback shutdownCallback;
+	GroupPtr selfPointer;
+	
+	
+	static void _onSessionInitiateFailure(Session *session) {
+		ProcessPtr process = session->getProcess();
+		assert(process != NULL);
+		process->getGroup()->onSessionInitiateFailure(process, session);
+	}
+
+	static void _onSessionClose(Session *session) {
+		ProcessPtr process = session->getProcess();
+		assert(process != NULL);
+		process->getGroup()->onSessionClose(process, session);
+	}
+	
+	static string generateSecret(const SuperGroupPtr &superGroup);
+	void onSessionInitiateFailure(const ProcessPtr &process, Session *session);
+	void onSessionClose(const ProcessPtr &process, Session *session);
+	void lockAndAsyncOOBWRequestIfNeeded(const ProcessPtr &process, DisableResult result, GroupPtr self);
+	void asyncOOBWRequestIfNeeded(const ProcessPtr &process);
+	void spawnThreadOOBWRequest(GroupPtr self, ProcessPtr process);
+	void spawnThreadMain(GroupPtr self, SpawnerPtr spawner, Options options,
+		unsigned int restartsInitiated);
+	void spawnThreadRealMain(const SpawnerPtr &spawner, const Options &options,
+		unsigned int restartsInitiated);
+	void finalizeRestart(GroupPtr self, Options options, SpawnerFactoryPtr spawnerFactory,
+		vector<Callback> postLockActions);
+	void startCheckingDetachedProcesses(bool immediately);
+	void detachedProcessesCheckerMain(GroupPtr self);
+	void wakeUpGarbageCollector();
+	bool poolAtFullCapacity() const;
+	bool anotherGroupIsWaitingForCapacity() const;
+	const ResourceLocator &getResourceLocator() const;
+
+	void verifyInvariants() const {
+		// !a || b: logical equivalent of a IMPLIES b.
+		
+		assert(enabledCount >= 0);
+		assert(disablingCount >= 0);
+		assert(disabledCount >= 0);
+		assert(enabledProcesses.empty() == (pqueue.top() == NULL));
+		assert(!( enabledCount == 0 && disablingCount > 0 ) || spawning());
+		assert(!( !spawning() ) || ( enabledCount > 0 || disablingCount == 0 ));
+
+		assert((lifeStatus == ALIVE) == (spawner != NULL));
+
+		// Verify getWaitlist invariants.
+		assert(!( !getWaitlist.empty() ) || ( enabledProcesses.empty() || pqueue.top()->atFullUtilization() ));
+		assert(!( !enabledProcesses.empty() && !pqueue.top()->atFullUtilization() ) || ( getWaitlist.empty() ));
+		assert(!( enabledProcesses.empty() && !spawning() && !restarting() && !poolAtFullCapacity() ) || ( getWaitlist.empty() ));
+		assert(!( !getWaitlist.empty() ) || ( !enabledProcesses.empty() || spawning() || restarting() || poolAtFullCapacity() ));
+		
+		// Verify disableWaitlist invariants.
+		assert((int) disableWaitlist.size() >= disablingCount);
+
+		// Verify m_spawning and m_restarting.
+		assert(!( m_restarting ) || !m_spawning);
+
+		// Verify lifeStatus.
+		LifeStatus lifeStatus = getLifeStatus();
+		assert(!( lifeStatus != ALIVE ) || ( enabledCount == 0 ));
+		assert(!( lifeStatus != ALIVE ) || ( disablingCount == 0 ));
+		assert(!( lifeStatus != ALIVE ) || ( disabledCount == 0 ));
+	}
+
+	void verifyExpensiveInvariants() const {
+		#ifndef NDEBUG
+		// !a || b: logical equivalent of a IMPLIES b.
+
+		assert((int) enabledProcesses.size() == enabledCount);
+		assert((int) disablingProcesses.size() == disablingCount);
+		assert((int) disabledProcesses.size() == disabledCount);
+
+		ProcessList::const_iterator it, end;
+
+		end = enabledProcesses.end();
+		for (it = enabledProcesses.begin(); it != end; it++) {
+			const ProcessPtr &process = *it;
+			assert(process->enabled == Process::ENABLED);
+			assert(process->pqHandle != NULL);
+			assert(process->isAlive());
+		}
+
+		end = disablingProcesses.end();
+		for (it = disablingProcesses.begin(); it != end; it++) {
+			const ProcessPtr &process = *it;
+			assert(process->enabled == Process::DISABLING);
+			assert(process->pqHandle == NULL);
+			assert(process->isAlive());
+		}
+
+		end = disabledProcesses.end();
+		for (it = disabledProcesses.begin(); it != end; it++) {
+			const ProcessPtr &process = *it;
+			assert(process->enabled == Process::DISABLED);
+			assert(process->pqHandle == NULL);
+			assert(process->isAlive());
+		}
+
+		foreach (const ProcessPtr &process, detachedProcesses) {
+			assert(process->enabled == Process::DETACHED);
+			assert(process->pqHandle == NULL);
+		}
+		#endif
+	}
+	
+	/**
+	 * Sets options for this Group. Called at creation time and at restart time.
+	 */
+	void resetOptions(const Options &newOptions) {
+		options = newOptions;
+		options.persist(newOptions);
+		options.clearPerRequestFields();
+		options.groupSecret = secret;
+	}
+	
+	/**
+	 * Merges some of the new options from the latest get() request into this Group.
+	 */
+	void mergeOptions(const Options &other) {
+		options.maxRequests      = other.maxRequests;
+		options.minProcesses     = other.minProcesses;
+		options.statThrottleRate = other.statThrottleRate;
+		options.maxPreloaderIdleTime = other.maxPreloaderIdleTime;
+	}
+	
+	static void runAllActions(const vector<Callback> &actions) {
+		vector<Callback>::const_iterator it, end = actions.end();
+		for (it = actions.begin(); it != end; it++) {
+			(*it)();
+		}
+	}
+
+	static void doCleanupSpawner(SpawnerPtr spawner) {
+		spawner->cleanup();
+	}
+	
+	SessionPtr newSession(Process *process = NULL) {
+		if (process == NULL) {
+			assert(enabledCount > 0);
+			process = pqueue.top();
+		}
+		SessionPtr session = process->newSession();
+		session->onInitiateFailure = _onSessionInitiateFailure;
+		session->onClose   = _onSessionClose;
+		if (process->enabled == Process::ENABLED) {
+			assert(process == pqueue.top());
+			pqueue.pop();
+			process->pqHandle = pqueue.push(process, process->utilization());
+		}
+		return session;
+	}
+
+	Process *findProcessWithLowestUtilization(const ProcessList &processes) const {
+		Process *result = NULL;
+		ProcessList::const_iterator it, end = processes.end();
+		for (it = processes.begin(); it != end; it++) {
+			Process *process = it->get();
+			if (result == NULL || process->utilization() < result->utilization()) {
+				result = process;
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * Removes a process to the given list (enabledProcess, disablingProcesses, disabledProcesses).
+	 * This function does not fix getWaitlist invariants or other stuff.
+	 */
+	void removeProcessFromList(const ProcessPtr &process, ProcessList &source) {
+		ProcessPtr p = process; // Keep an extra reference count just in case.
+		source.erase(process->it);
+		switch (process->enabled) {
+		case Process::ENABLED:
+			assert(&source == &enabledProcesses);
+			enabledCount--;
+			pqueue.erase(process->pqHandle);
+			process->pqHandle = NULL;
+			break;
+		case Process::DISABLING:
+			assert(&source == &disablingProcesses);
+			disablingCount--;
+			break;
+		case Process::DISABLED:
+			assert(&source == &disabledProcesses);
+			disabledCount--;
+			break;
+		case Process::DETACHED:
+			assert(&source == &detachedProcesses);
+			break;
+		default:
+			P_BUG("Unknown 'enabled' state " << (int) process->enabled);
+		}
+	}
+
+	/**
+	 * Adds a process to the given list (enabledProcess, disablingProcesses, disabledProcesses)
+	 * and sets the process->enabled flag accordingly.
+	 * The process must currently not be in any list. This function does not fix
+	 * getWaitlist invariants or other stuff.
+	 */
+	void addProcessToList(const ProcessPtr &process, ProcessList &destination) {
+		destination.push_back(process);
+		process->it = destination.last_iterator();
+		if (&destination == &enabledProcesses) {
+			process->enabled = Process::ENABLED;
+			process->pqHandle = pqueue.push(process.get(), process->utilization());
+			enabledCount++;
+		} else if (&destination == &disablingProcesses) {
+			process->enabled = Process::DISABLING;
+			disablingCount++;
+		} else if (&destination == &disabledProcesses) {
+			assert(process->sessions == 0);
+			process->enabled = Process::DISABLED;
+			disabledCount++;
+		} else if (&destination == &detachedProcesses) {
+			assert(process->isAlive());
+			process->enabled = Process::DETACHED;
+		} else {
+			P_BUG("Unknown destination list");
+		}
+	}
+	
+	template<typename Lock>
+	void assignSessionsToGetWaitersQuickly(Lock &lock) {
+		SmallVector<GetAction, 50> actions;
+		actions.reserve(getWaitlist.size());
+		
+		// Checkout sessions from enabled processes, or if there are none,
+		// from disabling processes.
+		if (enabledCount > 0) {
+			while (!getWaitlist.empty() && pqueue.top() != NULL && !pqueue.top()->atFullUtilization()) {
+				GetAction action;
+				action.callback = getWaitlist.front().callback;
+				action.session  = newSession();
+				getWaitlist.pop();
+				actions.push_back(action);
+			}
+		} else if (disablingCount > 0) {
+			bool done = false;
+			while (!getWaitlist.empty() && !done) {
+				Process *process = findProcessWithLowestUtilization(
+					disablingProcesses);
+				assert(process != NULL);
+				if (process->atFullUtilization()) {
+					done = true;
+				} else {
+					GetAction action;
+					action.callback = getWaitlist.front().callback;
+					action.session  = newSession(process);
+					getWaitlist.pop();
+					actions.push_back(action);
+				}
+			}
+		}
+		
+		verifyInvariants();
+		lock.unlock();
+		SmallVector<GetAction, 50>::const_iterator it, end = actions.end();
+		for (it = actions.begin(); it != end; it++) {
+			it->callback(it->session, ExceptionPtr());
+		}
+	}
+	
+	void assignSessionsToGetWaiters(vector<Callback> &postLockActions) {
+		if (enabledCount > 0) {
+			while (!getWaitlist.empty() && pqueue.top() != NULL && !pqueue.top()->atFullUtilization()) {
+				postLockActions.push_back(boost::bind(
+					getWaitlist.front().callback, newSession(),
+					ExceptionPtr()));
+				getWaitlist.pop();
+			}
+		} else if (disablingCount > 0) {
+			bool done = false;
+			while (!getWaitlist.empty() && !done) {
+				Process *process = findProcessWithLowestUtilization(
+					disablingProcesses);
+				assert(process != NULL);
+				if (process->atFullUtilization()) {
+					done = true;
+				} else {
+					postLockActions.push_back(boost::bind(
+						getWaitlist.front().callback, newSession(process),
+						ExceptionPtr()));
+					getWaitlist.pop();
+				}
+			}
+		}
+	}
+
+	void enableAllDisablingProcesses(vector<Callback> &postLockActions) {
+		P_DEBUG("Enabling all DISABLING processes with result DR_ERROR");
+		deque<DisableWaiter>::iterator it, end = disableWaitlist.end();
+		for (it = disableWaitlist.begin(); it != end; it++) {
+			const DisableWaiter &waiter = *it;
+			const ProcessPtr process = waiter.process;
+			// A process can appear multiple times in disableWaitlist.
+			assert(process->enabled == Process::DISABLING
+				|| process->enabled == Process::ENABLED);
+			if (process->enabled == Process::DISABLING) {
+				removeProcessFromList(process, disablingProcesses);
+				addProcessToList(process, enabledProcesses);
+				P_DEBUG("Enabled process " << process->inspect());
+			}
+		}
+		clearDisableWaitlist(DR_ERROR, postLockActions);
+	}
+	
+	void removeFromDisableWaitlist(const ProcessPtr &p, DisableResult result,
+		vector<Callback> &postLockActions)
+	{
+		deque<DisableWaiter>::const_iterator it, end = disableWaitlist.end();
+		deque<DisableWaiter> newList;
+		for (it = disableWaitlist.begin(); it != end; it++) {
+			const DisableWaiter &waiter = *it;
+			const ProcessPtr process = waiter.process;
+			if (process == p) {
+				postLockActions.push_back(boost::bind(waiter.callback, p, result));
+			} else {
+				newList.push_back(waiter);
+			}
+		}
+		disableWaitlist = newList;
+	}
+
+	void clearDisableWaitlist(DisableResult result, vector<Callback> &postLockActions) {
+		// This function may be called after processes in the disableWaitlist
+		// have been disabled or enabled, so do not assume any value for
+		// waiter.process->enabled in this function.
+		postLockActions.reserve(postLockActions.size() + disableWaitlist.size());
+		while (!disableWaitlist.empty()) {
+			const DisableWaiter &waiter = disableWaitlist.front();
+			postLockActions.push_back(boost::bind(waiter.callback, waiter.process, result));
+			disableWaitlist.pop_front();
+		}
+	}
+
+	bool shutdownCanFinish() const {
+		return getLifeStatus() == SHUTTING_DOWN
+			&& enabledCount == 0
+			&& disablingCount == 0
+	 		&& disabledCount == 0
+	 		&& detachedProcesses.empty();
+	}
+
+	static void interruptAndJoinAllThreads(GroupPtr self) {
+		self->interruptableThreads.interrupt_and_join_all();
+	}
+
+	/** One of the post lock actions can potentially perform a long-running
+	 * operation, so running them in a thread is advised.
+	 */
+	void finishShutdown(vector<Callback> &postLockActions) {
+		TRACE_POINT();
+		assert(getLifeStatus() == SHUTTING_DOWN);
+		P_DEBUG("Finishing shutdown of group " << name);
+		if (shutdownCallback) {
+			postLockActions.push_back(shutdownCallback);
+			shutdownCallback = Callback();
+		}
+		postLockActions.push_back(boost::bind(interruptAndJoinAllThreads,
+			shared_from_this()));
+		{
+			boost::lock_guard<boost::mutex> l(lifetimeSyncher);
+			lifeStatus = SHUT_DOWN;
+		}
+		selfPointer.reset();
+	}
+	
+public:
+	Options options;
+	/** This name uniquely identifies this Group within its Pool. It can also be used as the display name. */
+	const string name;
+	/** A secret token that may be known among all processes in this Group. Used for securing
+	 * intra-group process communication.
+	 */
+	const string secret;
+	ComponentInfo componentInfo;
+	
+	/**
+	 * Processes are categorized as enabled, disabling or disabled.
+	 *
+	 * - get() requests should go to enabled processes.
+	 * - Disabling processes are allowed to finish their current requests,
+	 *   but they generally will not receive any new requests. The only
+	 *   exception is when there are no enabled processes. In this case,
+	 *   a new process will be spawned while in the mean time all requests
+	 *   go to one of the disabling processes. Disabling processes become
+	 *   disabled as soon as they finish all their requests and there are
+	 *   enabled processes.
+	 * - Disabled processes never handle requests.
+	 *
+	 * 'enabledProcesses', 'disablingProcesses' and 'disabledProcesses' contain
+	 * all enabled, disabling and disabling processes in this group, respectively.
+	 * 'enabledCount', 'disablingCount' and 'disabledCount' are used to maintain
+	 * their numbers.
+	 * These lists do not intersect. A process is in exactly 1 list.
+	 *
+	 * 'pqueue' orders all enabled processes according to utilization() values,
+	 * from small to large.
+	 *
+	 * Invariants:
+	 *    enabledCount >= 0
+	 *    disablingCount >= 0
+	 *    disabledCount >= 0
+	 *    enabledProcesses.size() == enabledCount
+	 *    disablingProcesses.size() == disabingCount
+	 *    disabledProcesses.size() == disabledCount
+     *
+	 *    enabledProcesses.empty() == (pqueue.top() == NULL)
+	 *
+	 *    if (enabledCount == 0):
+	 *       spawning() || restarting() || poolAtFullCapacity()
+	 *    if (enabledCount == 0) and (disablingCount > 0):
+	 *       spawning()
+	 *    if !spawning():
+	 *       (enabledCount > 0) or (disablingCount == 0)
+	 *
+	 *    if pqueue.top().atFullUtilization():
+	 *       All enabled processes are at full utilization.
+	 *
+	 *    for all process in enabledProcesses:
+	 *       process.enabled == Process::ENABLED
+	 *       process.pqHandle != NULL
+	 *       process.isAlive()
+	 *    for all processes in disablingProcesses:
+	 *       process.enabled == Process::DISABLING
+	 *       process.pqHandle == NULL
+	 *       process.isAlive()
+	 *    for all process in disabledProcesses:
+	 *       process.enabled == Process::DISABLED
+	 *       process.pqHandle == NULL
+	 *       process.isAlive()
+	 */
+	int enabledCount;
+	int disablingCount;
+	int disabledCount;
+	PriorityQueue<Process> pqueue;
+	ProcessList enabledProcesses;
+	ProcessList disablingProcesses;
+	ProcessList disabledProcesses;
+
+	/**
+	 * When a process is detached, it is stored here until we've confirmed
+	 * that the OS process has exited.
+	 *
+	 * for all process in detachedProcesses:
+	 *    process.enabled == Process::DETACHED
+	 *    process.pqHandle == NULL
+	 */
+	ProcessList detachedProcesses;
+	
+	/**
+	 * get() requests for this group that cannot be immediately satisfied are
+	 * put on this wait list, which must be processed as soon as the necessary
+	 * resources have become free.
+	 * 
+	 * 'std::' is required because Solaris in its infinite wisdom has a C
+	 * struct in its system headers called 'queue'.
+	 * http://code.google.com/p/phusion-passenger/issues/detail?id=840
+	 *
+	 * Invariant 1:
+	 *    if getWaitlist is non-empty:
+	 *       enabledProcesses.empty() || (all enabled processes are at full capacity)
+	 * Equivalently:
+	 *    if !enabledProcesses.empty() && (an enabled process is not at full capacity):
+	 *        getWaitlist is empty.
+	 *
+	 * Invariant 2:
+	 *    if enabledProcesses.empty() && !spawning() && !restarting() && !poolAtFullCapacity():
+	 *       getWaitlist is empty
+	 * Equivalently:
+	 *    if getWaitlist is non-empty:
+	 *       !enabledProcesses.empty() || spawning() || restarting() || poolAtFullCapacity()
+	 */
+	std::queue<GetWaiter> getWaitlist;
+	/**
+	 * Disable() commands that couldn't finish immediately will put their callbacks
+	 * in this queue. Note that there may be multiple DisableWaiters pointing to the
+	 * same Process.
+	 *
+	 * Invariant:
+	 *    disableWaitlist.size() >= disablingCount
+	 */
+	deque<DisableWaiter> disableWaitlist;
+	
+	/**
+	 * Invariant:
+	 *    (lifeStatus == ALIVE) == (spawner != NULL)
+	 */
+	SpawnerPtr spawner;
+	
+	Group(const SuperGroupPtr &superGroup, const Options &options, const ComponentInfo &info);
+	~Group();
+
+	/**
+	 * Must be called before destroying a Group. You can optionally provide a
+	 * callback so that you are notified when shutdown has finished.
+	 *
+	 * The caller is responsible for migrating waiters on the getWaitlist.
+	 *
+	 * One of the post lock actions can potentially perform a long-running
+	 * operation, so running them in a thread is advised.
+	 */
+	void shutdown(const Callback &callback, vector<Callback> &postLockActions) {
+		assert(isAlive());
+
+		P_DEBUG("Begin shutting down group " << name);
+		shutdownCallback = callback;
+		detachAll(postLockActions);
+		startCheckingDetachedProcesses(true);
+		interruptableThreads.interrupt_all();
+		postLockActions.push_back(boost::bind(doCleanupSpawner, spawner));
+		spawner.reset();
+		selfPointer = shared_from_this();
+		assert(disableWaitlist.empty());
+		{
+			boost::lock_guard<boost::mutex> l(lifetimeSyncher);
+			lifeStatus = SHUTTING_DOWN;
+		}
+	}
+
+	SessionPtr get(const Options &newOptions, const GetCallback &callback) {
+		assert(isAlive());
+
+		if (OXT_LIKELY(!restarting())) {
+			if (OXT_UNLIKELY(needsRestart(newOptions))) {
+				restart(newOptions);
+			} else {
+				mergeOptions(newOptions);
+			}
+			if (OXT_UNLIKELY(!newOptions.noop && shouldSpawnForGetAction())) {
+				spawn();
+			}
+		}
+		
+		if (OXT_UNLIKELY(newOptions.noop)) {
+			ProcessPtr process = make_shared<Process>(SafeLibevPtr(),
+				0, string(), string(),
+				FileDescriptor(), FileDescriptor(),
+				SocketListPtr(), 0, 0);
+			process->dummy = true;
+			process->requiresShutdown = false;
+			process->setGroup(shared_from_this());
+			return make_shared<Session>(process, (Socket *) NULL);
+		}
+		
+		if (OXT_UNLIKELY(enabledCount == 0)) {
+			/* We don't have any processes yet, but they're on the way.
+			 *
+			 * We have some choices here. If there are disabling processes
+			 * then we generally want to use them, except:
+			 * - When non-rolling restarting because those disabling processes
+			 *   are from the old version.
+			 * - When all disabling processes are at full utilization.
+			 *
+			 * Whenever a disabling process cannot be used, call the callback
+			 * after a process has been spawned or has failed to spawn, or
+			 * when a disabling process becomes available.
+			 */
+			assert(spawning() || restarting() || poolAtFullCapacity());
+
+			if (disablingCount > 0 && !restarting()) {
+				Process *process = findProcessWithLowestUtilization(
+					disablingProcesses);
+				assert(process != NULL);
+				if (!process->atFullUtilization()) {
+					return newSession(process);
+				}
+			}
+
+			getWaitlist.push(GetWaiter(newOptions.copyAndPersist().clearLogger(), callback));
+			P_DEBUG("No session checked out yet: group is spawning or restarting");
+			return SessionPtr();
+		} else {
+			Process *process = pqueue.top();
+			assert(process != NULL);
+			if (process->atFullUtilization()) {
+				/* Looks like all processes are at full utilization.
+				 * Wait until a new one has been spawned or until
+				 * resources have become free.
+				 */
+				getWaitlist.push(GetWaiter(newOptions.copyAndPersist().clearLogger(), callback));
+				P_DEBUG("No session checked out yet: all processes are at full capacity");
+				return SessionPtr();
+			} else {
+				P_DEBUG("Session checked out from process " << process->inspect());
+				return newSession();
+			}
+		}
+	}
+	
+	/**
+	 * Thread-safe.
+	 * @pre getLifeState() != SHUT_DOWN
+	 * @post result != NULL
+	 */
+	SuperGroupPtr getSuperGroup() const {
+		return superGroup.lock();
+	}
+	
+	void setSuperGroup(const SuperGroupPtr &superGroup) {
+		assert(this->superGroup.lock() == NULL);
+		this->superGroup = superGroup;
+	}
+	
+	/**
+	 * Thread-safe.
+	 * @pre getLifeState() != SHUT_DOWN
+	 * @post result != NULL
+	 */
+	PoolPtr getPool() const;
+	
+	// Thread-safe.
+	bool isAlive() const {
+		boost::lock_guard<boost::mutex> lock(lifetimeSyncher);
+		return lifeStatus == ALIVE;
+	}
+
+	// Thread-safe.
+	LifeStatus getLifeStatus() const {
+		boost::lock_guard<boost::mutex> lock(lifetimeSyncher);
+		return lifeStatus;
+	}
+	
+	// Thread-safe, but only call outside the pool lock!
+	void requestOOBW(const ProcessPtr &process);
+	
+	/**
+	 * Attaches the given process to this Group and mark it as enabled. This
+	 * function doesn't touch getWaitlist so be sure to fix its invariants
+	 * afterwards if necessary.
+	 */
+	void attach(const ProcessPtr &process, vector<Callback> &postLockActions) {
+		assert(process->getGroup() == NULL || process->getGroup().get() == this);
+		assert(process->isAlive());
+		assert(isAlive());
+
+		process->setGroup(shared_from_this());
+		P_DEBUG("Attaching process " << process->inspect());
+		addProcessToList(process, enabledProcesses);
+
+		/* Now that there are enough resources, relevant processes in
+		 * 'disableWaitlist' can be disabled.
+		 */
+		deque<DisableWaiter>::const_iterator it, end = disableWaitlist.end();
+		deque<DisableWaiter> newDisableWaitlist;
+		for (it = disableWaitlist.begin(); it != end; it++) {
+			const DisableWaiter &waiter = *it;
+			const ProcessPtr process2 = waiter.process;
+			// The same process can appear multiple times in disableWaitlist.
+			assert(process2->enabled == Process::DISABLING
+				|| process2->enabled == Process::DISABLED);
+			if (process2->sessions == 0) {
+				if (process2->enabled == Process::DISABLING) {
+					P_DEBUG("Disabling DISABLING process " << process2->inspect() <<
+						"; disable command succeeded immediately");
+					removeProcessFromList(process2, disablingProcesses);
+					addProcessToList(process2, disabledProcesses);
+				} else {
+					P_DEBUG("Disabling (already disabled) DISABLING process " <<
+						process2->inspect() << "; disable command succeeded immediately");
+				}
+				postLockActions.push_back(boost::bind(waiter.callback, process2, DR_SUCCESS));
+			} else {
+				newDisableWaitlist.push_back(waiter);
+			}
+		}
+		disableWaitlist = newDisableWaitlist;
+
+		// Update GC sleep timer.
+		wakeUpGarbageCollector();
+	}
+
+	/**
+	 * Detaches the given process from this Group. This function doesn't touch
+	 * getWaitlist so be sure to fix its invariants afterwards if necessary.
+	 * `pool->detachProcessUnlocked()` does that so you should usually use
+	 * that method over this one.
+	 */
+	void detach(const ProcessPtr &process, vector<Callback> &postLockActions) {
+		assert(process->getGroup().get() == this);
+		assert(process->isAlive());
+		assert(isAlive());
+
+		const ProcessPtr p = process; // Keep an extra reference just in case.
+		P_DEBUG("Detaching process " << process->inspect());
+
+		if (process->enabled == Process::ENABLED || process->enabled == Process::DISABLING) {
+			assert(enabledCount > 0 || disablingCount > 0);
+			if (process->enabled == Process::ENABLED) {
+				removeProcessFromList(process, enabledProcesses);
+			} else {
+				removeProcessFromList(process, disablingProcesses);
+				removeFromDisableWaitlist(process, DR_NOOP, postLockActions);
+			}
+		} else {
+			assert(!disabledProcesses.empty());
+			removeProcessFromList(process, disabledProcesses);
+		}
+
+		addProcessToList(process, detachedProcesses);
+		startCheckingDetachedProcesses(false);
+	}
+	
+	/**
+	 * Detaches all processes from this Group. This function doesn't touch
+	 * getWaitlist so be sure to fix its invariants afterwards if necessary.
+	 */
+	void detachAll(vector<Callback> &postLockActions) {
+		assert(isAlive());
+		P_DEBUG("Detaching all processes in group " << name);
+
+		foreach (ProcessPtr process, enabledProcesses) {
+			addProcessToList(process, detachedProcesses);
+			process->pqHandle = NULL;
+		}
+		foreach (ProcessPtr process, disablingProcesses) {
+			addProcessToList(process, detachedProcesses);
+		}
+		foreach (ProcessPtr process, disabledProcesses) {
+			addProcessToList(process, detachedProcesses);
+		}
+		
+		enabledProcesses.clear();
+		disablingProcesses.clear();
+		disabledProcesses.clear();
+		pqueue.clear();
+		enabledCount = 0;
+		disablingCount = 0;
+		disabledCount = 0;
+		clearDisableWaitlist(DR_NOOP, postLockActions);
+		startCheckingDetachedProcesses(false);
+	}
+	
+	/**
+	 * Marks the given process as enabled. This function doesn't touch getWaitlist
+	 * so be sure to fix its invariants afterwards if necessary.
+	 */
+	void enable(const ProcessPtr &process, vector<Callback> &postLockActions) {
+		assert(process->getGroup().get() == this);
+		assert(process->isAlive());
+		assert(isAlive());
+
+		if (process->enabled == Process::DISABLING) {
+			P_DEBUG("Enabling DISABLING process " << process->inspect());
+			removeProcessFromList(process, disablingProcesses);
+			addProcessToList(process, enabledProcesses);
+			removeFromDisableWaitlist(process, DR_CANCELED, postLockActions);
+		} else if (process->enabled == Process::DISABLED) {
+			P_DEBUG("Enabling DISABLED process " << process->inspect());
+			removeProcessFromList(process, disabledProcesses);
+			addProcessToList(process, enabledProcesses);
+		} else {
+			P_DEBUG("Enabling ENABLED process " << process->inspect());
+		}
+	}
+	
+	/**
+	 * Marks the given process as disabled. Returns DR_SUCCESS, DR_DEFERRED
+	 * or DR_NOOP. If the result is DR_DEFERRED, then the callback will be
+	 * called later with the result of this action.
+	 */
+	DisableResult disable(const ProcessPtr &process, const DisableCallback &callback) {
+		assert(process->getGroup().get() == this);
+		assert(process->isAlive());
+		assert(isAlive());
+
+		if (process->enabled == Process::ENABLED) {
+			P_DEBUG("Disabling ENABLED process " << process->inspect() <<
+				"; enabledCount=" << enabledCount << ", process.sessions=" << process->sessions);
+			assert(enabledCount >= 0);
+			if (enabledCount <= 1 || process->sessions > 0) {
+				removeProcessFromList(process, enabledProcesses);
+				addProcessToList(process, disablingProcesses);
+				disableWaitlist.push_back(DisableWaiter(process, callback));
+				if (enabledCount == 0) {
+					/* All processes are going to be disabled, so in order
+					 * to avoid blocking requests we first spawn a new process
+					 * and disable this process after the other one is done
+					 * spawning. We do this irregardless of resource limits
+					 * because this is an exceptional situation.
+					 */
+					P_DEBUG("Spawning a new process to avoid the disable action from blocking requests");
+					spawn();
+				}
+				P_DEBUG("Deferring disable command completion");
+				return DR_DEFERRED;
+			} else {
+				removeProcessFromList(process, enabledProcesses);
+				addProcessToList(process, disabledProcesses);
+				P_DEBUG("Disable command succeeded immediately");
+				return DR_SUCCESS;
+			}
+		} else if (process->enabled == Process::DISABLING) {
+			assert(disablingCount > 0);
+			disableWaitlist.push_back(DisableWaiter(process, callback));
+			P_DEBUG("Disabling DISABLING process " << process->inspect() <<
+				name << "; command queued, deferring disable command completion");
+			return DR_DEFERRED;
+		} else {
+			assert(disabledCount > 0);
+			P_DEBUG("Disabling DISABLED process " << process->inspect() <<
+				name << "; disable command succeeded immediately");
+			return DR_NOOP;
+		}
+	}
+
+	void cleanupSpawner(vector<Callback> &postLockActions) {
+		assert(isAlive());
+		postLockActions.push_back(boost::bind(doCleanupSpawner, spawner));
+	}
+
+	unsigned int utilization() const {
+		int result = enabledCount;
+		if (spawning()) {
+			result++;
+		}
+		return result;
+	}
+	
+	bool garbageCollectable(unsigned long long now = 0) const {
+		/* if (now == 0) {
+			now = SystemTime::getUsec();
+		}
+		return utilization() == 0
+			&& getWaitlist.empty()
+			&& disabledProcesses.empty()
+			&& options.getMaxPreloaderIdleTime() != 0
+			&& now - spawner->lastUsed() >
+				(unsigned long long) options.getMaxPreloaderIdleTime() * 1000000; */
+		return false;
+	}
+	
+	/** Whether a new process should be spawned for this group. */
+	bool shouldSpawn() const;
+	/** Whether a new process should be spawned for this group in the
+	 * specific case that another get action is to be performed.
+	 */
+	bool shouldSpawnForGetAction() const;
+	
+	/** Start spawning a new process in the background, in case this
+	 * isn't already happening and the group isn't being restarted.
+	 * Will ensure that at least options.minProcesses processes are spawned.
+	 */
+	void spawn() {
+		assert(isAlive());
+		if (!spawning() && !restarting()) {
+			P_DEBUG("Requested spawning of new process for group " << name);
+			interruptableThreads.create_thread(
+				boost::bind(&Group::spawnThreadMain,
+					this, shared_from_this(), spawner,
+					options.copyAndPersist().clearPerRequestFields(),
+					restartsInitiated),
+				"Group process spawner: " + name,
+				POOL_HELPER_THREAD_STACK_SIZE);
+			m_spawning = true;
+		}
+	}
+	
+	bool needsRestart(const Options &options) {
+		if (m_restarting) {
+			return false;
+		} else {
+			struct stat buf;
+			return cstat.stat(alwaysRestartFile, &buf, options.statThrottleRate) == 0 ||
+			       fileChangeChecker.changed(restartFile, options.statThrottleRate);
+		}
+	}
+	
+	void restart(const Options &options);
+	
+	bool spawning() const {
+		return m_spawning;
+	}
+
+	bool restarting() const {
+		return m_restarting;
+	}
+
+	/**
+	 * Checks whether this group is waiting for capacity on the pool to
+	 * become available before it can continue processing requests.
+	 */
+	bool isWaitingForCapacity() const {
+		return enabledProcesses.empty()
+			&& !m_spawning
+			&& !m_restarting
+			&& !getWaitlist.empty();
+	}
+
+	template<typename Stream>
+	void inspectXml(Stream &stream, bool includeSecrets = true) const {
+		ProcessList::const_iterator it;
+
+		stream << "<name>" << escapeForXml(name) << "</name>";
+		stream << "<component_name>" << escapeForXml(componentInfo.name) << "</component_name>";
+		stream << "<app_root>" << escapeForXml(options.appRoot) << "</app_root>";
+		stream << "<app_type>" << escapeForXml(options.appType) << "</app_type>";
+		stream << "<environment>" << escapeForXml(options.environment) << "</environment>";
+		stream << "<enabled_process_count>" << enabledCount << "</enabled_process_count>";
+		stream << "<disabling_process_count>" << disablingCount << "</disabling_process_count>";
+		stream << "<disabled_process_count>" << disabledCount << "</disabled_process_count>";
+		stream << "<utilization>" << utilization() << "</utilization>";
+		stream << "<get_wait_list_size>" << getWaitlist.size() << "</get_wait_list_size>";
+		stream << "<disable_wait_list_size>" << disableWaitlist.size() << "</disable_wait_list_size>";
+		if (spawning()) {
+			stream << "<spawning/>";
+		}
+		if (restarting()) {
+			stream << "<restarting/>";
+		}
+		if (includeSecrets) {
+			stream << "<secret>" << escapeForXml(secret) << "</secret>";
+		}
+		switch (lifeStatus) {
+		case ALIVE:
+			stream << "<life_status>ALIVE</life_status>";
+			break;
+		case SHUTTING_DOWN:
+			stream << "<life_status>SHUTTING_DOWN</life_status>";
+			break;
+		case SHUT_DOWN:
+			stream << "<life_status>SHUT_DOWN</life_status>";
+			break;
+		default:
+			P_BUG("Unknown 'lifeStatus' state " << (int) lifeStatus);
+		}
+
+		stream << "<options>";
+		options.toXml(stream, getResourceLocator());
+		stream << "</options>";
+
+		stream << "<processes>";
+		
+		for (it = enabledProcesses.begin(); it != enabledProcesses.end(); it++) {
+			stream << "<process>";
+			(*it)->inspectXml(stream, includeSecrets);
+			stream << "</process>";
+		}
+		for (it = disablingProcesses.begin(); it != disablingProcesses.end(); it++) {
+			stream << "<process>";
+			(*it)->inspectXml(stream, includeSecrets);
+			stream << "</process>";
+		}
+		for (it = disabledProcesses.begin(); it != disabledProcesses.end(); it++) {
+			stream << "<process>";
+			(*it)->inspectXml(stream, includeSecrets);
+			stream << "</process>";
+		}
+		for (it = detachedProcesses.begin(); it != detachedProcesses.end(); it++) {
+			stream << "<process>";
+			(*it)->inspectXml(stream, includeSecrets);
+			stream << "</process>";
+		}
+
+		stream << "</processes>";
+	}
+};
+
+
+} // namespace ApplicationPool2
+} // namespace Passenger
+
+#endif /* _PASSENGER_APPLICATION_POOL2_GROUP_H_ */
diff --git a/ext/common/ApplicationPool2/Implementation.cpp b/ext/common/ApplicationPool2/Implementation.cpp
new file mode 100644
index 0000000..33b9cd8
--- /dev/null
+++ b/ext/common/ApplicationPool2/Implementation.cpp
@@ -0,0 +1,1194 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#include <typeinfo>
+#include <algorithm>
+#include <boost/make_shared.hpp>
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+#include <oxt/backtrace.hpp>
+#include <ApplicationPool2/Pool.h>
+#include <ApplicationPool2/SuperGroup.h>
+#include <ApplicationPool2/Group.h>
+#include <ApplicationPool2/PipeWatcher.h>
+#include <Exceptions.h>
+#include <MessageReadersWriters.h>
+#include <Utils/ScopeGuard.h>
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+
+template<typename T>
+static bool
+exceptionIsInstanceOf(const tracable_exception &e) {
+	try {
+		(void) dynamic_cast<T>(e);
+		return true;
+	} catch (const bad_cast &) {
+		return false;
+	}
+}
+
+#define TRY_COPY_EXCEPTION(klass) \
+	do { \
+		if (exceptionIsInstanceOf<const klass &>(e)) { \
+			return make_shared<klass>( (const klass &) e ); \
+		} \
+	} while (false)
+
+ExceptionPtr
+copyException(const tracable_exception &e) {
+	TRY_COPY_EXCEPTION(FileSystemException);
+	TRY_COPY_EXCEPTION(TimeRetrievalException);
+	TRY_COPY_EXCEPTION(SystemException);
+	
+	TRY_COPY_EXCEPTION(FileNotFoundException);
+	TRY_COPY_EXCEPTION(EOFException);
+	TRY_COPY_EXCEPTION(IOException);
+	
+	TRY_COPY_EXCEPTION(ConfigurationException);
+	
+	TRY_COPY_EXCEPTION(SpawnException);
+	TRY_COPY_EXCEPTION(GetAbortedException);
+	
+	TRY_COPY_EXCEPTION(InvalidModeStringException);
+	TRY_COPY_EXCEPTION(ArgumentException);
+	
+	TRY_COPY_EXCEPTION(RuntimeException);
+	
+	TRY_COPY_EXCEPTION(TimeoutException);
+	
+	TRY_COPY_EXCEPTION(NonExistentUserException);
+	TRY_COPY_EXCEPTION(NonExistentGroupException);
+	TRY_COPY_EXCEPTION(SecurityException);
+	
+	TRY_COPY_EXCEPTION(SyntaxError);
+
+	TRY_COPY_EXCEPTION(boost::thread_interrupted);
+
+	return make_shared<tracable_exception>(e);
+}
+
+#define TRY_RETHROW_EXCEPTION(klass) \
+	do { \
+		if (exceptionIsInstanceOf<const klass &>(*e)) { \
+			throw klass((const klass &) *e); \
+		} \
+	} while (false)
+
+void
+rethrowException(const ExceptionPtr &e) {
+	TRY_RETHROW_EXCEPTION(FileSystemException);
+	TRY_RETHROW_EXCEPTION(TimeRetrievalException);
+	TRY_RETHROW_EXCEPTION(SystemException);
+	
+	TRY_RETHROW_EXCEPTION(FileNotFoundException);
+	TRY_RETHROW_EXCEPTION(EOFException);
+	TRY_RETHROW_EXCEPTION(IOException);
+	
+	TRY_RETHROW_EXCEPTION(ConfigurationException);
+	
+	TRY_RETHROW_EXCEPTION(SpawnException);
+	TRY_RETHROW_EXCEPTION(GetAbortedException);
+	
+	TRY_RETHROW_EXCEPTION(InvalidModeStringException);
+	TRY_RETHROW_EXCEPTION(ArgumentException);
+	
+	TRY_RETHROW_EXCEPTION(RuntimeException);
+	
+	TRY_RETHROW_EXCEPTION(TimeoutException);
+	
+	TRY_RETHROW_EXCEPTION(NonExistentUserException);
+	TRY_RETHROW_EXCEPTION(NonExistentGroupException);
+	TRY_RETHROW_EXCEPTION(SecurityException);
+	
+	TRY_RETHROW_EXCEPTION(SyntaxError);
+
+	TRY_RETHROW_EXCEPTION(boost::lock_error);
+	TRY_RETHROW_EXCEPTION(boost::thread_resource_error);
+	TRY_RETHROW_EXCEPTION(boost::unsupported_thread_option);
+	TRY_RETHROW_EXCEPTION(boost::invalid_thread_argument);
+	TRY_RETHROW_EXCEPTION(boost::thread_permission_error);
+
+	TRY_RETHROW_EXCEPTION(boost::thread_interrupted);
+	TRY_RETHROW_EXCEPTION(boost::thread_exception);
+	TRY_RETHROW_EXCEPTION(boost::condition_error);
+	
+	throw tracable_exception(*e);
+}
+
+
+const SuperGroupPtr
+Pool::getSuperGroup(const char *name) {
+	return superGroups.get(name);
+}
+
+
+boost::mutex &
+SuperGroup::getPoolSyncher(const PoolPtr &pool) {
+	return pool->syncher;
+}
+
+void
+SuperGroup::runAllActions(const vector<Callback> &actions) {
+	Pool::runAllActions(actions);
+}
+
+string
+SuperGroup::generateSecret() const {
+	return getPool()->randomGenerator->generateAsciiString(43);
+}
+
+void
+SuperGroup::createInterruptableThread(const function<void ()> &func, const string &name,
+	unsigned int stackSize)
+{
+	getPool()->interruptableThreads.create_thread(func, name, stackSize);
+}
+
+void
+SuperGroup::realDoInitialize(const Options &options, unsigned int generation) {
+	vector<ComponentInfo> componentInfos;
+	vector<ComponentInfo>::const_iterator it;
+	ExceptionPtr exception;
+	
+	P_TRACE(2, "Initializing SuperGroup " << inspect() << " in the background...");
+	try {
+		componentInfos = loadComponentInfos(options);
+	} catch (const tracable_exception &e) {
+		exception = copyException(e);
+	}
+	if (componentInfos.empty() && exception == NULL) {
+		string message = "The directory " +
+			options.appRoot +
+			" does not seem to contain a web application.";
+		exception = make_shared<SpawnException>(
+			message, message, false);
+	}
+	
+	PoolPtr pool = getPool();
+	Pool::DebugSupportPtr debug = pool->debugSupport;
+	
+	vector<Callback> actions;
+	{
+		if (debug != NULL && debug->superGroup) {
+			debug->debugger->send("About to finish SuperGroup initialization");
+			debug->messages->recv("Proceed with initializing SuperGroup");
+		}
+
+		unique_lock<boost::mutex> lock(getPoolSyncher(pool));
+		this_thread::disable_interruption di;
+		this_thread::disable_syscall_interruption dsi;
+		NOT_EXPECTING_EXCEPTIONS();
+		if (OXT_UNLIKELY(getPool() == NULL || generation != this->generation)) {
+			return;
+		}
+		P_TRACE(2, "Initialization of SuperGroup " << inspect() << " almost done; grabbed lock");
+		assert(state == INITIALIZING);
+		verifyInvariants();
+		
+		if (componentInfos.empty()) {
+			/* Somehow initialization failed. Maybe something has deleted
+			 * the supergroup files while we're working.
+			 */
+			assert(exception != NULL);
+			setState(DESTROYED);
+			
+			actions.reserve(getWaitlist.size());
+			while (!getWaitlist.empty()) {
+				const GetWaiter &waiter = getWaitlist.front();
+				actions.push_back(boost::bind(waiter.callback,
+					SessionPtr(), exception));
+				getWaitlist.pop();
+			}
+		} else {
+			for (it = componentInfos.begin(); it != componentInfos.end(); it++) {
+				const ComponentInfo &info = *it;
+				GroupPtr group = make_shared<Group>(shared_from_this(),
+					options, info);
+				groups.push_back(group);
+				if (info.isDefault) {
+					defaultGroup = group.get();
+				}
+			}
+
+			setState(READY);
+			assignGetWaitlistToGroups(actions);
+		}
+		
+		verifyInvariants();
+		P_TRACE(2, "Done initializing SuperGroup " << inspect());
+	}
+	this_thread::disable_interruption di;
+	this_thread::disable_syscall_interruption dsi;
+	runAllActions(actions);
+}
+
+void
+SuperGroup::realDoRestart(const Options &options, unsigned int generation) {
+	TRACE_POINT();
+	vector<ComponentInfo> componentInfos = loadComponentInfos(options);
+	vector<ComponentInfo>::const_iterator it;
+	
+	PoolPtr pool = getPool();
+	Pool::DebugSupportPtr debug = pool->debugSupport;
+	if (debug != NULL && debug->superGroup) {
+		debug->debugger->send("About to finish SuperGroup restart");
+		debug->messages->recv("Proceed with restarting SuperGroup");
+	}
+	
+	unique_lock<boost::mutex> lock(getPoolSyncher(pool));
+	if (OXT_UNLIKELY(this->generation != generation)) {
+		return;
+	}
+
+	assert(state == RESTARTING);
+	verifyInvariants();
+	
+	vector<GroupPtr> allGroups;
+	vector<GroupPtr> updatedGroups;
+	vector<GroupPtr> newGroups;
+	vector<GroupPtr>::const_iterator g_it;
+	vector<Callback> actions;
+	this->options = options;
+	
+	// Update the component information for existing groups.
+	UPDATE_TRACE_POINT();
+	for (it = componentInfos.begin(); it != componentInfos.end(); it++) {
+		const ComponentInfo &info = *it;
+		pair<GroupPtr, unsigned int> result =
+			findGroupCorrespondingToComponent(groups, info);
+		GroupPtr group = result.first;
+		if (group != NULL) {
+			unsigned int index = result.second;
+			group->componentInfo = info;
+			updatedGroups.push_back(group);
+			groups[index].reset();
+		} else {
+			// This is not an existing group but a new one,
+			// so create it.
+			group = make_shared<Group>(shared_from_this(),
+				options, info);
+			newGroups.push_back(group);
+		}
+		// allGroups must be in the same order as componentInfos.
+		allGroups.push_back(group);
+	}
+	
+	// Some components might have been deleted, so delete the
+	// corresponding groups.
+	detachAllGroups(groups, actions);
+	
+	// Tell all previous existing groups to restart.
+	for (g_it = updatedGroups.begin(); g_it != updatedGroups.end(); g_it++) {
+		GroupPtr group = *g_it;
+		group->restart(options);
+	}
+	
+	groups = allGroups;
+	defaultGroup = findDefaultGroup(allGroups);
+	setState(READY);
+	assignGetWaitlistToGroups(actions);
+	
+	UPDATE_TRACE_POINT();
+	verifyInvariants();
+	lock.unlock();
+	runAllActions(actions);
+}
+
+
+Group::Group(const SuperGroupPtr &_superGroup, const Options &options, const ComponentInfo &info)
+	: superGroup(_superGroup),
+	  name(_superGroup->name + "#" + info.name),
+	  secret(generateSecret(_superGroup)),
+	  componentInfo(info)
+{
+	enabledCount   = 0;
+	disablingCount = 0;
+	disabledCount  = 0;
+	spawner        = getPool()->spawnerFactory->create(options);
+	restartsInitiated = 0;
+	m_spawning     = false;
+	m_restarting   = false;
+	lifeStatus     = ALIVE;
+	if (options.restartDir.empty()) {
+		restartFile = options.appRoot + "/tmp/restart.txt";
+		alwaysRestartFile = options.appRoot + "/always_restart.txt";
+	} else if (options.restartDir[0] == '/') {
+		restartFile = options.restartDir + "/restart.txt";
+		alwaysRestartFile = options.restartDir + "/always_restart.txt";
+	} else {
+		restartFile = options.appRoot + "/" + options.restartDir + "/restart.txt";
+		alwaysRestartFile = options.appRoot + "/" + options.restartDir + "/always_restart.txt";
+	}
+	resetOptions(options);
+
+	detachedProcessesCheckerActive = false;
+}
+
+Group::~Group() {
+	LifeStatus lifeStatus = getLifeStatus();
+	if (OXT_UNLIKELY(lifeStatus == ALIVE)) {
+		P_BUG("You must call Group::shutdown() before destroying a Group.");
+	}
+	assert(lifeStatus == SHUT_DOWN);
+	assert(!detachedProcessesCheckerActive);
+}
+
+PoolPtr
+Group::getPool() const {
+	return getSuperGroup()->getPool();
+}
+
+void
+Group::onSessionInitiateFailure(const ProcessPtr &process, Session *session) {
+	vector<Callback> actions;
+
+	TRACE_POINT();
+	// Standard resource management boilerplate stuff...
+	PoolPtr pool = getPool();
+	unique_lock<boost::mutex> lock(pool->syncher);
+	assert(process->isAlive());
+	assert(isAlive() || getLifeStatus() == SHUTTING_DOWN);
+
+	UPDATE_TRACE_POINT();
+	P_DEBUG("Could not initiate a session with process " <<
+		process->inspect() << ", detaching from pool if possible");
+	if (!pool->detachProcessUnlocked(process, actions)) {
+		P_DEBUG("Process was already detached");
+	}
+	pool->fullVerifyInvariants();
+	lock.unlock();
+	runAllActions(actions);
+}
+
+void
+Group::onSessionClose(const ProcessPtr &process, Session *session) {
+	TRACE_POINT();
+	// Standard resource management boilerplate stuff...
+	PoolPtr pool = getPool();
+	unique_lock<boost::mutex> lock(pool->syncher);
+	assert(process->isAlive());
+	assert(isAlive() || getLifeStatus() == SHUTTING_DOWN);
+
+	P_TRACE(2, "Session closed for process " << process->inspect());
+	verifyInvariants();
+	UPDATE_TRACE_POINT();
+	
+	/* Update statistics. */
+	process->sessionClosed(session);
+	assert(process->getLifeStatus() == Process::ALIVE);
+	assert(process->enabled == Process::ENABLED
+		|| process->enabled == Process::DISABLING
+		|| process->enabled == Process::DETACHED);
+	if (process->enabled == Process::ENABLED) {
+		pqueue.decrease(process->pqHandle, process->utilization());
+	}
+
+	/* This group now has a process that's guaranteed to be not at
+	 * full utilization.
+	 */
+	assert(!process->atFullUtilization());
+
+	bool detachingBecauseOfMaxRequests = false;
+	bool detachingBecauseCapacityNeeded = false;
+	bool shouldDetach =
+		( detachingBecauseOfMaxRequests = (
+			options.maxRequests > 0
+			&& process->processed >= options.maxRequests
+		)) || (
+			detachingBecauseCapacityNeeded = (
+				process->sessions == 0
+				&& getWaitlist.empty()
+				&& (
+					!pool->getWaitlist.empty()
+					|| anotherGroupIsWaitingForCapacity()
+				)
+			)
+		);
+	bool shouldDisable =
+		process->enabled == Process::DISABLING
+		&& process->sessions == 0
+		&& enabledCount > 0;
+
+	if (shouldDetach || shouldDisable) {
+		vector<Callback> actions;
+
+		if (shouldDetach) {
+			if (detachingBecauseCapacityNeeded) {
+				/* Someone might be trying to get() a session for a different
+				 * group that couldn't be spawned because of lack of pool capacity.
+				 * If this group isn't under sufficiently load (as apparent by the
+				 * checked conditions) then now's a good time to detach
+				 * this process or group in order to free capacity.
+				 */
+				P_DEBUG("Process " << process->inspect() << " is no longer at "
+					"full utilization; detaching it in order to make room in the pool");
+			} else {
+				/* This process has processed its maximum number of requests,
+				 * so we detach it.
+				 */
+				P_DEBUG("Process " << process->inspect() <<
+					" has reached its maximum number of requests (" <<
+					options.maxRequests << "); detaching it");
+			}
+			pool->detachProcessUnlocked(process, actions);
+		} else {
+			removeProcessFromList(process, disablingProcesses);
+			addProcessToList(process, disabledProcesses);
+			removeFromDisableWaitlist(process, DR_SUCCESS, actions);
+			asyncOOBWRequestIfNeeded(process);
+		}
+		
+		pool->fullVerifyInvariants();
+		lock.unlock();
+		runAllActions(actions);
+
+	} else {
+		// This could change process->enabled.
+		asyncOOBWRequestIfNeeded(process);
+
+		if (!getWaitlist.empty() && process->enabled == Process::ENABLED) {
+			/* If there are clients on this group waiting for a process to
+			 * become available then call them now.
+			 */
+			UPDATE_TRACE_POINT();
+			// Already calls verifyInvariants().
+			assignSessionsToGetWaitersQuickly(lock);
+		}
+	}
+}
+
+void
+Group::requestOOBW(const ProcessPtr &process) {
+	// Standard resource management boilerplate stuff...
+	PoolPtr pool = getPool();
+	unique_lock<boost::mutex> lock(pool->syncher);
+	if (isAlive() && process->isAlive() && process->oobwStatus == Process::OOBW_NOT_ACTIVE) {
+		process->oobwStatus = Process::OOBW_REQUESTED;
+	}
+}
+
+// The 'self' parameter is for keeping the current Group object alive
+void
+Group::lockAndAsyncOOBWRequestIfNeeded(const ProcessPtr &process, DisableResult result, GroupPtr self) {
+	TRACE_POINT();
+	
+	if (result != DR_SUCCESS && result != DR_CANCELED) {
+		return;
+	}
+	
+	// Standard resource management boilerplate stuff...
+	PoolPtr pool = getPool();
+	unique_lock<boost::mutex> lock(pool->syncher);
+	if (OXT_UNLIKELY(!process->isAlive() || !isAlive())) {
+		return;
+	}
+	
+	P_DEBUG("Process " << process->inspect() << " disabled; proceeding with OOBW");
+	asyncOOBWRequestIfNeeded(process);
+}
+
+void
+Group::asyncOOBWRequestIfNeeded(const ProcessPtr &process) {
+	if (process->oobwStatus != Process::OOBW_REQUESTED
+		|| process->enabled == Process::DETACHED
+		|| !process->isAlive())
+	{
+		return;
+	}
+	if (process->enabled == Process::ENABLED) {
+		// We want the process to be disabled. However, disabling a process is potentially
+		// asynchronous, so we pass a callback which will re-aquire the lock and call this
+		// method again.
+		P_DEBUG("Disabling process " << process->inspect() << " in preparation for OOBW");
+		DisableResult result = disable(process,
+			boost::bind(&Group::lockAndAsyncOOBWRequestIfNeeded, this,
+				_1, _2, shared_from_this()));
+		if (result == DR_DEFERRED) {
+			return;
+		}
+	} else if (process->enabled == Process::DISABLING) {
+		return;
+	}
+	
+	assert(process->enabled == Process::DISABLED);
+	assert(process->sessions == 0);
+	
+	P_DEBUG("Initiating OOBW request for process " << process->inspect());
+	interruptableThreads.create_thread(
+		boost::bind(&Group::spawnThreadOOBWRequest, this, shared_from_this(), process),
+		"OOB request thread for process " + process->inspect(),
+		POOL_HELPER_THREAD_STACK_SIZE);
+}
+
+// The 'self' parameter is for keeping the current Group object alive while this thread is running.
+void
+Group::spawnThreadOOBWRequest(GroupPtr self, ProcessPtr process) {
+	TRACE_POINT();
+	this_thread::disable_interruption di;
+	this_thread::disable_syscall_interruption dsi;
+
+	Socket *socket;
+	Connection connection;
+	PoolPtr pool = getPool();
+	Pool::DebugSupportPtr debug = pool->debugSupport;
+
+	UPDATE_TRACE_POINT();
+	P_DEBUG("Performing OOBW request for process " << process->inspect());
+	if (debug != NULL && debug->oobw) {
+		debug->debugger->send("OOBW request about to start");
+		debug->messages->recv("Proceed with OOBW request");
+	}
+	
+	UPDATE_TRACE_POINT();
+	{
+		// Standard resource management boilerplate stuff...
+		unique_lock<boost::mutex> lock(pool->syncher);
+		if (OXT_UNLIKELY(!process->isAlive()
+			|| process->enabled == Process::DETACHED
+			|| !isAlive()))
+		{
+			return;
+		}
+
+		if (process->enabled != Process::DISABLED) {
+			UPDATE_TRACE_POINT();
+			P_INFO("Out-of-Band Work canceled: process " << process->inspect() <<
+				" was concurrently re-enabled.");
+			if (debug != NULL && debug->oobw) {
+				debug->debugger->send("OOBW request canceled");
+			}
+			return;
+		}
+		
+		assert(process->oobwStatus = Process::OOBW_IN_PROGRESS);
+		assert(process->sessions == 0);
+		socket = process->sessionSockets.top();
+		assert(socket != NULL);
+	}
+	
+	UPDATE_TRACE_POINT();
+	unsigned long long timeout = 1000 * 1000 * 60; // 1 min
+	try {
+		this_thread::restore_interruption ri(di);
+		this_thread::restore_syscall_interruption rsi(dsi);
+
+		// Grab a connection. The connection is marked as fail in order to
+		// ensure it is closed / recycled after this request (otherwise we'd
+		// need to completely read the response).
+		connection = socket->checkoutConnection();
+		connection.fail = true;
+		ScopeGuard guard(boost::bind(&Socket::checkinConnection, socket, connection));
+		
+		// This is copied from RequestHandler when it is sending data using the
+		// "session" protocol.
+		char sizeField[sizeof(uint32_t)];
+		SmallVector<StaticString, 10> data;
+
+		data.push_back(StaticString(sizeField, sizeof(uint32_t)));
+		data.push_back(makeStaticStringWithNull("REQUEST_METHOD"));
+		data.push_back(makeStaticStringWithNull("OOBW"));
+
+		data.push_back(makeStaticStringWithNull("PASSENGER_CONNECT_PASSWORD"));
+		data.push_back(makeStaticStringWithNull(process->connectPassword));
+
+		uint32_t dataSize = 0;
+		for (unsigned int i = 1; i < data.size(); i++) {
+			dataSize += (uint32_t) data[i].size();
+		}
+		Uint32Message::generate(sizeField, dataSize);
+
+		gatheredWrite(connection.fd, &data[0], data.size(), &timeout);
+
+		// We do not care what the actual response is ... just wait for it.
+		UPDATE_TRACE_POINT();
+		waitUntilReadable(connection.fd, &timeout);
+	} catch (const SystemException &e) {
+		P_ERROR("*** ERROR: " << e.what() << "\n" << e.backtrace());
+	} catch (const TimeoutException &e) {
+		P_ERROR("*** ERROR: " << e.what() << "\n" << e.backtrace());
+	}
+	
+	UPDATE_TRACE_POINT();
+	vector<Callback> actions;
+	{
+		// Standard resource management boilerplate stuff...
+		PoolPtr pool = getPool();
+		unique_lock<boost::mutex> lock(pool->syncher);
+		if (OXT_UNLIKELY(!process->isAlive() || !isAlive())) {
+			return;
+		}
+		
+		process->oobwStatus = Process::OOBW_NOT_ACTIVE;
+		if (process->enabled == Process::DISABLED) {
+			enable(process, actions);
+			assignSessionsToGetWaiters(actions);
+		}
+		
+		pool->fullVerifyInvariants();
+	}
+	UPDATE_TRACE_POINT();
+	runAllActions(actions);
+	actions.clear();
+
+	UPDATE_TRACE_POINT();
+	P_DEBUG("Finished OOBW request for process " << process->inspect());
+	if (debug != NULL && debug->oobw) {
+		debug->debugger->send("OOBW request finished");
+	}
+}
+
+// The 'self' parameter is for keeping the current Group object alive while this thread is running.
+void
+Group::spawnThreadMain(GroupPtr self, SpawnerPtr spawner, Options options, unsigned int restartsInitiated) {
+	spawnThreadRealMain(spawner, options, restartsInitiated);
+}
+
+void
+Group::spawnThreadRealMain(const SpawnerPtr &spawner, const Options &options, unsigned int restartsInitiated) {
+	TRACE_POINT();
+	this_thread::disable_interruption di;
+	this_thread::disable_syscall_interruption dsi;
+
+	PoolPtr pool = getPool();
+	Pool::DebugSupportPtr debug = pool->debugSupport;
+	
+	bool done = false;
+	while (!done) {
+		bool shouldFail = false;
+		if (debug != NULL && debug->spawning) {
+			UPDATE_TRACE_POINT();
+			this_thread::restore_interruption ri(di);
+			this_thread::restore_syscall_interruption rsi(dsi);
+			this_thread::interruption_point();
+			string iteration;
+			{
+				LockGuard g(debug->syncher);
+				debug->spawnLoopIteration++;
+				iteration = toString(debug->spawnLoopIteration);
+			}
+			P_DEBUG("Begin spawn loop iteration " << iteration);
+			debug->debugger->send("Begin spawn loop iteration " +
+				iteration);
+			
+			vector<string> cases;
+			cases.push_back("Proceed with spawn loop iteration " + iteration);
+			cases.push_back("Fail spawn loop iteration " + iteration);
+			MessagePtr message = debug->messages->recvAny(cases);
+			shouldFail = message->name == "Fail spawn loop iteration " + iteration;
+		}
+
+		ProcessPtr process;
+		ExceptionPtr exception;
+		try {
+			UPDATE_TRACE_POINT();
+			this_thread::restore_interruption ri(di);
+			this_thread::restore_syscall_interruption rsi(dsi);
+			if (shouldFail) {
+				throw SpawnException("Simulated failure");
+			} else {
+				process = spawner->spawn(options);
+				process->setGroup(shared_from_this());
+			}
+		} catch (const thread_interrupted &) {
+			break;
+		} catch (const tracable_exception &e) {
+			exception = copyException(e);
+			// Let other (unexpected) exceptions crash the program so
+			// gdb can generate a backtrace.
+		}
+
+		UPDATE_TRACE_POINT();
+		ScopeGuard guard(boost::bind(Process::forceTriggerShutdownAndCleanup, process));
+		unique_lock<boost::mutex> lock(pool->syncher);
+
+		if (!isAlive()) {
+			if (process != NULL) {
+				P_DEBUG("Group is being shut down so dropping process " <<
+					process->inspect() << " which we just spawned and exiting spawn loop");
+			} else {
+				P_DEBUG("The group is being shut down. A process failed "
+					"to be spawned anyway, so ignoring this error and exiting "
+					"spawn loop");
+			}
+			// We stop immediately because any previously assumed invariants
+			// may have been violated.
+			break;
+		} else if (restartsInitiated != this->restartsInitiated) {
+			if (process != NULL) {
+				P_DEBUG("A restart was issued for the group, so dropping process " <<
+					process->inspect() << " which we just spawned and exiting spawn loop");
+			} else {
+				P_DEBUG("A restart was issued for the group. A process failed "
+					"to be spawned anyway, so ignoring this error and exiting "
+					"spawn loop");
+			}
+			// We stop immediately because any previously assumed invariants
+			// may have been violated.
+			break;
+		}
+
+		verifyInvariants();
+		assert(m_spawning);
+
+		UPDATE_TRACE_POINT();
+		vector<Callback> actions;
+		if (process != NULL) {
+			attach(process, actions);
+			guard.clear();
+			if (getWaitlist.empty()) {
+				pool->assignSessionsToGetWaiters(actions);
+			} else {
+				assignSessionsToGetWaiters(actions);
+			}
+			P_DEBUG("New process count = " << enabledCount <<
+				", remaining get waiters = " << getWaitlist.size());
+		} else {
+			// TODO: sure this is the best thing? if there are
+			// processes currently alive we should just use them.
+			P_ERROR("Could not spawn process for group " << name <<
+				": " << exception->what() << "\n" <<
+				exception->backtrace());
+			if (enabledCount == 0) {
+				enableAllDisablingProcesses(actions);
+			}
+			Pool::assignExceptionToGetWaiters(getWaitlist, exception, actions);
+			pool->assignSessionsToGetWaiters(actions);
+			done = true;
+		}
+
+		// Temporarily mark this Group as 'not spawning' so
+		// that pool->utilization() doesn't take this thread's spawning
+		// state into account.
+		m_spawning = false;
+		
+		done = done
+			|| ((unsigned long) enabledCount >= options.minProcesses && getWaitlist.empty())
+			|| pool->atFullCapacity(false);
+		m_spawning = !done;
+		if (done) {
+			P_DEBUG("Spawn loop done");
+		} else {
+			P_DEBUG("Continue spawning");
+		}
+		
+		UPDATE_TRACE_POINT();
+		pool->fullVerifyInvariants();
+		lock.unlock();
+		UPDATE_TRACE_POINT();
+		runAllActions(actions);
+		UPDATE_TRACE_POINT();
+	}
+
+	if (debug != NULL && debug->spawning) {
+		debug->debugger->send("Spawn loop done");
+	}
+}
+
+bool
+Group::shouldSpawn() const {
+	return !m_spawning
+		&& (
+			(unsigned long) enabledCount < options.minProcesses
+			|| (enabledCount > 0 && pqueue.top()->atFullCapacity())
+		)
+		&& isAlive()
+		&& !poolAtFullCapacity();
+}
+
+bool
+Group::shouldSpawnForGetAction() const {
+	return enabledCount == 0 || shouldSpawn();
+}
+
+void
+Group::restart(const Options &options) {
+	vector<Callback> actions;
+
+	assert(isAlive());
+	assert(!m_restarting);
+	P_DEBUG("Restarting group " << name);
+	// Tell the restarter thread to exit as soon as possible.
+	restartsInitiated++;
+	m_spawning = false;
+	m_restarting = true;
+	detachAll(actions);
+	getPool()->interruptableThreads.create_thread(
+		boost::bind(&Group::finalizeRestart, this, shared_from_this(),
+			options.copyAndPersist().clearPerRequestFields(),
+			getPool()->spawnerFactory, actions),
+		"Group restarter: " + name,
+		POOL_HELPER_THREAD_STACK_SIZE
+	);
+}
+
+// The 'self' parameter is for keeping the current Group object alive while this thread is running.
+void
+Group::finalizeRestart(GroupPtr self, Options options, SpawnerFactoryPtr spawnerFactory,
+	vector<Callback> postLockActions)
+{
+	TRACE_POINT();
+
+	Pool::runAllActions(postLockActions);
+	postLockActions.clear();
+
+	this_thread::disable_interruption di;
+	this_thread::disable_syscall_interruption dsi;
+
+	// Create a new spawner.
+	SpawnerPtr newSpawner = spawnerFactory->create(options);
+	SpawnerPtr oldSpawner;
+
+	UPDATE_TRACE_POINT();
+	PoolPtr pool = getPool();
+
+	Pool::DebugSupportPtr debug = pool->debugSupport;
+	if (debug != NULL && debug->restarting) {
+		this_thread::restore_interruption ri(di);
+		this_thread::restore_syscall_interruption rsi(dsi);
+		this_thread::interruption_point();
+		debug->debugger->send("About to end restarting");
+		debug->messages->recv("Finish restarting");
+	}
+
+	ScopedLock l(pool->syncher);
+	if (!isAlive()) {
+		P_DEBUG("Group " << name << " is shutting down, so aborting restart");
+		return;
+	}
+
+	// Run some sanity checks.
+	pool->fullVerifyInvariants();
+	assert(m_restarting);
+	UPDATE_TRACE_POINT();
+	
+	// Atomically swap the new spawner with the old one.
+	resetOptions(options);
+	oldSpawner = spawner;
+	spawner    = newSpawner;
+
+	m_restarting = false;
+	if (!getWaitlist.empty()) {
+		spawn();
+	}
+	verifyInvariants();
+
+	l.unlock();
+	oldSpawner.reset();
+	P_DEBUG("Restart of group " << name << " done");
+	if (debug != NULL && debug->restarting) {
+		debug->debugger->send("Restarting done");
+	}
+}
+
+/**
+ * The `immediately` parameter only has effect if the detached processes checker
+ * thread is active. It means that, if the thread is currently sleeping, it should
+ * wake up immediately and perform work.
+ */
+void
+Group::startCheckingDetachedProcesses(bool immediately) {
+	if (!detachedProcessesCheckerActive) {
+		P_DEBUG("Starting detached processes checker");
+		getPool()->nonInterruptableThreads.create_thread(
+			boost::bind(&Group::detachedProcessesCheckerMain, this, shared_from_this()),
+			"Detached processes checker: " + name,
+			POOL_HELPER_THREAD_STACK_SIZE
+		);
+		detachedProcessesCheckerActive = true;
+	} else if (detachedProcessesCheckerActive && immediately) {
+		detachedProcessesCheckerCond.notify_all();
+	}
+}
+
+void
+Group::detachedProcessesCheckerMain(GroupPtr self) {
+	TRACE_POINT();
+	PoolPtr pool = getPool();
+	unique_lock<boost::mutex> lock(pool->syncher);
+
+	while (true) {
+		assert(detachedProcessesCheckerActive);
+
+		if (getLifeStatus() == SHUT_DOWN || this_thread::interruption_requested()) {
+			UPDATE_TRACE_POINT();
+			P_DEBUG("Stopping detached processes checker");
+			detachedProcessesCheckerActive = false;
+			break;
+		}
+
+		UPDATE_TRACE_POINT();
+		if (!detachedProcesses.empty()) {
+			P_TRACE(2, "Checking whether any of the " << detachedProcesses.size() <<
+				" detached processes have exited...");
+			ProcessList::iterator it = detachedProcesses.begin();
+			ProcessList::iterator end = detachedProcesses.end();
+			while (it != end) {
+				const ProcessPtr process = *it;
+				switch (process->getLifeStatus()) {
+				case Process::ALIVE:
+					if (process->canTriggerShutdown()) {
+						P_DEBUG("Detached process " << process->inspect() <<
+							" has 0 active sessions now. Triggering shutdown.");
+						process->triggerShutdown();
+						assert(process->getLifeStatus() == Process::SHUTDOWN_TRIGGERED);
+					}
+					it++;
+					break;
+				case Process::SHUTDOWN_TRIGGERED:
+					if (process->canCleanup()) {
+						P_DEBUG("Detached process " << process->inspect() << " has shut down. Cleaning up associated resources.");
+						process->cleanup();
+						assert(process->getLifeStatus() == Process::DEAD);
+						it++;
+						removeProcessFromList(process, detachedProcesses);
+					} else if (process->shutdownTimeoutExpired()) {
+						P_WARN("Detached process " << process->inspect() <<
+							" didn't shut down within " PROCESS_SHUTDOWN_TIMEOUT_DISPLAY
+							". Forcefully killing it with SIGKILL.");
+						kill(process->pid, SIGKILL);
+						it++;
+					} else {
+						it++;
+					}
+					break;
+				default:
+					P_BUG("Unknown 'lifeStatus' state " << (int) process->getLifeStatus());
+				}
+			}
+		}
+
+		UPDATE_TRACE_POINT();
+		if (detachedProcesses.empty()) {
+			UPDATE_TRACE_POINT();
+			P_DEBUG("Stopping detached processes checker");
+			detachedProcessesCheckerActive = false;
+
+			vector<Callback> actions;
+			if (shutdownCanFinish()) {
+				UPDATE_TRACE_POINT();
+				finishShutdown(actions);
+			}
+
+			verifyInvariants();
+			verifyExpensiveInvariants();
+			lock.unlock();
+			UPDATE_TRACE_POINT();
+			runAllActions(actions);
+			break;
+		} else {
+			UPDATE_TRACE_POINT();
+			verifyInvariants();
+			verifyExpensiveInvariants();
+		}
+
+		// Not all processes can be shut down yet. Sleep for a while unless
+		// someone wakes us up.
+		UPDATE_TRACE_POINT();
+		detachedProcessesCheckerCond.timed_wait(lock,
+			posix_time::milliseconds(100));
+	}
+}
+
+void
+Group::wakeUpGarbageCollector() {
+	getPool()->garbageCollectionCond.notify_all();
+}
+
+bool
+Group::poolAtFullCapacity() const {
+	return getPool()->atFullCapacity(false);
+}
+
+bool
+Group::anotherGroupIsWaitingForCapacity() const {
+	PoolPtr pool = getPool();
+	StringMap<SuperGroupPtr>::const_iterator sg_it, sg_end = pool->superGroups.end();
+	for (sg_it = pool->superGroups.begin(); sg_it != sg_end; sg_it++) {
+		pair<StaticString, SuperGroupPtr> p = *sg_it;
+		foreach (GroupPtr group, p.second->groups) {
+			if (group.get() != this
+			 && group->enabledProcesses.empty()
+			 && !group->spawning()
+			 && !group->getWaitlist.empty())
+			{
+				return true;
+			}
+		}
+	}
+	return false;
+}
+
+const ResourceLocator &
+Group::getResourceLocator() const {
+	return getPool()->spawnerFactory->getResourceLocator();
+}
+
+string
+Group::generateSecret(const SuperGroupPtr &superGroup) {
+	return superGroup->getPool()->randomGenerator->generateAsciiString(43);
+}
+
+
+SuperGroupPtr
+Process::getSuperGroup() const {
+	assert(getLifeStatus() != DEAD);
+	return getGroup()->getSuperGroup();
+}
+
+string
+Process::inspect() const {
+	assert(getLifeStatus() != DEAD);
+	stringstream result;
+	result << "(pid=" << pid;
+	GroupPtr group = getGroup();
+	if (group != NULL) {
+		// This Process hasn't been attached to a Group yet.
+		result << ", group=" << group->name;
+	}
+	result << ")";
+	return result.str();
+}
+
+
+const string &
+Session::getConnectPassword() const {
+	return getProcess()->connectPassword;
+}
+
+pid_t
+Session::getPid() const {
+	return getProcess()->pid;
+}
+
+const string &
+Session::getGupid() const {
+	return getProcess()->gupid;
+}
+
+const GroupPtr
+Session::getGroup() const {
+	return getProcess()->getGroup();
+}
+
+void
+Session::requestOOBW() {
+	ProcessPtr process = getProcess();
+	assert(process->isAlive());
+	process->getGroup()->requestOOBW(process);
+}
+
+
+PipeWatcher::DataCallback PipeWatcher::onData;
+
+PipeWatcher::PipeWatcher(const FileDescriptor &_fd, const char *_name, pid_t _pid, bool _print)
+	: fd(_fd),
+	  name(_name),
+	  pid(_pid),
+	  print(_print)
+{
+	started = false;
+}
+
+void
+PipeWatcher::initialize() {
+	oxt::thread(boost::bind(threadMain, shared_from_this()),
+		"PipeWatcher: PID " + toString(pid) + " " + name + ", fd " + toString(fd),
+		POOL_HELPER_THREAD_STACK_SIZE);
+}
+
+void
+PipeWatcher::start() {
+	boost::lock_guard<boost::mutex> lock(startSyncher);
+	started = true;
+	startCond.notify_all();
+}
+
+void
+PipeWatcher::threadMain(shared_ptr<PipeWatcher> self) {
+	TRACE_POINT();
+	self->threadMain();
+}
+
+void
+PipeWatcher::threadMain() {
+	TRACE_POINT();
+	{
+		unique_lock<boost::mutex> lock(startSyncher);
+		while (!started) {
+			startCond.wait(lock);
+		}
+	}
+
+	UPDATE_TRACE_POINT();
+	while (!this_thread::interruption_requested()) {
+		char buf[1024 * 8];
+		ssize_t ret;
+		
+		UPDATE_TRACE_POINT();
+		ret = syscalls::read(fd, buf, sizeof(buf));
+		if (ret == 0) {
+			break;
+		} else if (ret == -1) {
+			UPDATE_TRACE_POINT();
+			if (errno == ECONNRESET) {
+				break;
+			} else if (errno != EAGAIN) {
+				int e = errno;
+				P_WARN("Cannot read from process " << pid << " " << name <<
+					": " << strerror(e) << " (errno=" << e << ")");
+				break;
+			}
+		} else if (ret == 1 && buf[0] == '\n') {
+			UPDATE_TRACE_POINT();
+			P_LOG(print ? LVL_INFO : LVL_DEBUG,
+				"[App " << pid << " " << name << "] ");
+		} else {
+			UPDATE_TRACE_POINT();
+			vector<StaticString> lines;
+			ssize_t ret2 = ret;
+			if (ret2 > 0 && buf[ret2 - 1] == '\n') {
+				ret2--;
+			}
+			split(StaticString(buf, ret2), '\n', lines);
+			foreach (const StaticString line, lines) {
+				P_LOG(print ? LVL_INFO : LVL_DEBUG,
+					"[App " << pid << " " << name << "] " << line);
+			}
+		}
+
+		if (onData != NULL) {
+			onData(buf, ret);
+		}
+	}
+}
+
+
+} // namespace ApplicationPool2
+} // namespace Passenger
diff --git a/ext/common/ApplicationPool2/Options.h b/ext/common/ApplicationPool2/Options.h
new file mode 100644
index 0000000..624eae7
--- /dev/null
+++ b/ext/common/ApplicationPool2/Options.h
@@ -0,0 +1,606 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_APPLICATION_POOL2_OPTIONS_H_
+#define _PASSENGER_APPLICATION_POOL2_OPTIONS_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <boost/shared_array.hpp>
+#include <ApplicationPool2/AppTypes.h>
+#include <Account.h>
+#include <UnionStation.h>
+#include <Constants.h>
+#include <ResourceLocator.h>
+#include <StaticString.h>
+#include <Utils.h>
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace std;
+using namespace boost;
+
+/**
+ * This struct encapsulates information for ApplicationPool::get() and for
+ * SpawnManager::spawn(), such as which application is to be spawned.
+ *
+ * <h2>Privilege lowering support</h2>
+ *
+ * If <em>user</em> is given and isn't the empty string, then the application process
+ * will run as the given username. Otherwise, the owner of the application's startup
+ * file (e.g. config.ru or config/environment.rb) will be used.
+ *
+ * If <em>group</em> is given and isn't the empty string, then the application process
+ * will run as the given group name. If it's set to the special value
+ * "!STARTUP_FILE!", then the startup file's group will be used. Otherwise,
+ * the primary group of the user that the application process will run as,
+ * will be used as group.
+ * 
+ * If the user or group that the application process attempts to switch to
+ * doesn't exist, then <em>defaultUser</em> and <em>defaultGroup</em>, respectively,
+ * will be used.
+ * 
+ * Phusion Passenger will attempt to avoid running the application process as
+ * root: if <em>user</em> or <em>group</em> is set to the root user or the root group,
+ * or if the startup file is owned by root, then <em>defaultUser</em> and
+ * <em>defaultGroup</em> will be used instead.
+ * 
+ * All this only happen if Phusion Passenger has root privileges. If not, then
+ * these options have no effect.
+ */
+class Options {
+private:
+	shared_array<char> storage;
+	
+	vector<const StaticString *> getStringFields() const {
+		vector<const StaticString *> result;
+		result.reserve(20);
+		
+		result.push_back(&appRoot);
+		result.push_back(&appGroupName);
+		result.push_back(&appType);
+		result.push_back(&startCommand);
+		result.push_back(&startupFile);
+		result.push_back(&processTitle);
+		
+		result.push_back(&environment);
+		result.push_back(&baseURI);
+		result.push_back(&spawnMethod);
+		
+		result.push_back(&user);
+		result.push_back(&group);
+		result.push_back(&defaultUser);
+		result.push_back(&defaultGroup);
+		result.push_back(&restartDir);
+		
+		result.push_back(&preexecChroot);
+		result.push_back(&postexecChroot);
+		
+		result.push_back(&ruby);
+		result.push_back(&python);
+		result.push_back(&loggingAgentAddress);
+		result.push_back(&loggingAgentUsername);
+		result.push_back(&loggingAgentPassword);
+		result.push_back(&groupSecret);
+		result.push_back(&hostName);
+		result.push_back(&uri);
+		result.push_back(&unionStationKey);
+		
+		return result;
+	}
+	
+	static inline void
+	appendKeyValue(vector<string> &vec, const char *key, const StaticString &value) {
+		if (!value.empty()) {
+			vec.push_back(key);
+			vec.push_back(value.toString());
+		}
+	}
+	
+	static inline void
+	appendKeyValue(vector<string> &vec, const char *key, const char *value) {
+		vec.push_back(key);
+		vec.push_back(value);
+	}
+	
+	static inline void
+	appendKeyValue2(vector<string> &vec, const char *key, long value) {
+		vec.push_back(key);
+		vec.push_back(toString(value));
+	}
+	
+	static inline void
+	appendKeyValue3(vector<string> &vec, const char *key, unsigned long value) {
+		vec.push_back(key);
+		vec.push_back(toString(value));
+	}
+	
+	static inline void
+	appendKeyValue4(vector<string> &vec, const char *key, bool value) {
+		vec.push_back(key);
+		vec.push_back(value ? "true" : "false");
+	}
+	
+public:
+	/*********** Spawn options that should be set manually ***********/
+	
+	/**
+	 * The root directory of the application to spawn. In case of a Ruby on Rails
+	 * application, this is the folder that contains 'app/', 'public/', 'config/',
+	 * etc. This must be a valid directory, but the path does not have to be absolute.
+	 */
+	StaticString appRoot;
+	
+	/**
+	 * A name used by ApplicationPool to uniquely identify an application.
+	 * If one tries to get() from the application pool with name "A", then get()
+	 * again with name "B", then the latter will spawn a new application process,
+	 * even if both get() requests have the same app root.
+	 *
+	 * If left empty, then the app root is used as the app group name.
+	 */
+	StaticString appGroupName;
+	
+	/** The application's type, used for determining the command to invoke to
+	 * spawn an application process as well as determining the startup file's
+	 * filename. It can be one of the app type names in AppType.cpp, or the
+	 * empty string (default). In case of the latter, 'startCommand' and
+	 * 'startupFile' (which MUST be set) will dictate the startup command
+	 * and the startup file's filename. */
+	StaticString appType;
+	
+	/** The command for spawning the application process. This is a list of
+	 * arguments, separated by '\t', e.g. "ruby\tfoo.rb". Only used
+	 * during spawning and only if appType.empty(). */
+	StaticString startCommand;
+	
+	/** Filename of the application's startup file. Only actually used for
+	 * determining user switching info. Only used during spawning and only
+	 * if appType.empty(). */
+	StaticString startupFile;
+	
+	/** The process title to assign to the application process. Only used
+	 * during spawning. May be empty in which case no particular process
+	 * title is assigned. Only used during spawning and only if
+	 * appType.empty(). */
+	StaticString processTitle;
+
+	/**
+	 * Defaults to DEFAULT_LOG_LEVEL.
+	 */
+	int logLevel;
+	
+	/** The maximum amount of time, in milliseconds, that may be spent
+	 * on spawning the process or the preloader. */
+	unsigned int startTimeout;
+	
+	/**
+	 * The RAILS_ENV/RACK_ENV environment that should be used. May not be an
+	 * empty string.
+	 */
+	StaticString environment;
+	
+	/**
+	 * The base URI on which the application runs. If the application is
+	 * running on the root URI, then this value must be "/".
+	 *
+	 * @invariant baseURI != ""
+	 */
+	StaticString baseURI;
+	
+	/**
+	 * Spawning method, either "smart" or "direct".
+	 */
+	StaticString spawnMethod;
+	
+	/** See overview. */
+	StaticString user;
+	/** See class overview. */
+	StaticString group;
+	/** See class overview. Defaults to "nobody". */
+	StaticString defaultUser;
+	/** See class overview. Defaults to the defaultUser's primary group. */
+	StaticString defaultGroup;
+	
+	/**
+	 * The directory which contains restart.txt and always_restart.txt.
+	 * An empty string means that the default directory should be used.
+	 */
+	StaticString restartDir;
+	
+	StaticString preexecChroot;
+	StaticString postexecChroot;
+	
+	/**
+	 * Path to the Ruby interpreter to use, in case the application to spawn
+	 * is a Ruby app.
+	 */
+	StaticString ruby;
+
+	/**
+	 * Path to the Python interpreter to use, in case the application to spawn
+	 * is a Python app.
+	 */
+	StaticString python;
+	
+	/**
+	 * Any rights that the spawned application process may have. The SpawnManager
+	 * will create a new account for each spawned app, and that account will be
+	 * assigned these rights.
+	 */
+	Account::Rights rights;
+	
+	/**
+	 * Environment variables which should be passed to the spawned application
+	 * process.
+	 */
+	vector< pair<StaticString, StaticString> > environmentVariables;
+	
+	/** Whether debugger support should be enabled. */
+	bool debugger;
+	
+	/** Whether to load environment variables set in shell startup
+	 * files (e.g. ~/.bashrc) during spawning.
+	 */
+	bool loadShellEnvvars;
+	
+	/** Whether Union Station logging should be enabled. This option only affects
+	 * whether the application enables Union Station support; whether a request
+	 * actually results in data being logged to Union Station depends on whether
+	 * the 'logger' member is set.
+	 *
+	 * If this is set to true, then 'loggingAgentAddress', 'loggingAgentUsername'
+	 * and 'loggingAgentPassword' must be non-empty.
+	 */
+	bool analytics;
+	StaticString loggingAgentAddress;
+	StaticString loggingAgentUsername;
+	StaticString loggingAgentPassword;
+
+	/**
+	 * Whether Spawner should raise an internal error when spawning. Used
+	 * during unit tests.
+	 */
+	bool raiseInternalError;
+	
+	
+	/*********** Per-group pool options that should be set manually ***********/
+	
+	/**
+	 * The minimum number of processes for the current group that the application
+	 * pool's cleaner thread should keep around.
+	 */
+	unsigned long minProcesses;
+	
+	/** The number of seconds that preloader processes may stay alive idling. */
+	long maxPreloaderIdleTime;
+	
+	
+	/*********** Per-request options that should be set manually and that only matter to Pool ***********/
+	
+	/** Current request host name. */
+	StaticString hostName;
+	
+	/** Current request URI. */
+	StaticString uri;
+	
+	/**
+	 * A Union Station logger object to log things to. May be the null pointer,
+	 * in which case Union Station logging is disabled for this request.
+	 */
+	UnionStation::LoggerPtr logger;
+
+	/**
+	 * The Union Station key to use in case analytics logging is enabled.
+	 */
+	StaticString unionStationKey;
+	
+	/**
+	 * A throttling rate for file stats. When set to a non-zero value N,
+	 * restart.txt and other files which are usually stat()ted on every
+	 * ApplicationPool::get() call will be stat()ed at most every N seconds.
+	 */
+	unsigned long statThrottleRate;
+
+	/**
+	 * The maximum number of requests that the spawned application may process
+	 * before exiting. A value of 0 means unlimited.
+	 */
+	unsigned long maxRequests;
+
+	/** When true, Pool::get() and Pool::asyncGet() will create the necessary
+	 * SuperGroup and Group structures just as normally, and will even handle
+	 * restarting logic, but will not actually spawn any processes and will not
+	 * open a session with an existing process. Instead, a fake Session object
+	 * is returned which points to a Process object that isn't stored anywhere
+	 * in the Pool structures and isn't mapped to any real OS process. It does
+	 * however point to the real Group structure. Useful for unit tests.
+	 * False by default.
+	 */
+	bool noop;
+
+	/** Specifies whether, if the pool is already full, the pool is allowed to
+	 * trash a non-idle process in order to free capacity. True by default.
+	 */
+	bool allowTrashingNonIdleProcesses;
+
+	/*-----------------*/
+	/*-----------------*/
+	
+	
+	/*********** Spawn options automatically set by Pool ***********/
+	
+	/** The secret key of the pool group that the spawned process is to belong to. */
+	StaticString groupSecret;
+	
+	
+	/*********************************/
+	
+	/**
+	 * Creates a new Options object with the default values filled in.
+	 * One must still set appRoot manually, after having used this constructor.
+	 */
+	Options() {
+		logLevel                = DEFAULT_LOG_LEVEL;
+		startTimeout            = 90 * 1000;
+		environment             = "production";
+		baseURI                 = "/";
+		spawnMethod             = "smart";
+		defaultUser             = "nobody";
+		ruby                    = "ruby";
+		python                  = "python";
+		rights                  = DEFAULT_BACKEND_ACCOUNT_RIGHTS;
+		debugger                = false;
+		loadShellEnvvars        = true;
+		analytics               = false;
+		raiseInternalError      = false;
+		
+		minProcesses            = 1;
+		maxPreloaderIdleTime    = -1;
+		
+		statThrottleRate        = 0;
+		maxRequests             = 0;
+		noop                    = false;
+		allowTrashingNonIdleProcesses = true;
+		
+		/*********************************/
+	}
+	
+	Options copy() const {
+		return *this;
+	}
+	
+	Options copyAndPersist() const {
+		Options cpy(*this);
+		cpy.persist(*this);
+		return cpy;
+	}
+	
+	/**
+	 * Assign <em>other</em>'s string fields' values into this Option
+	 * object, and store the data in this Option object's internal storage
+	 * area.
+	 */
+	Options &persist(const Options &other) {
+		const vector<const StaticString *> strings = getStringFields();
+		const vector<const StaticString *> otherStrings = other.getStringFields();
+		unsigned int i;
+		size_t otherLen = 0;
+		char *end;
+		
+		assert(strings.size() == otherStrings.size());
+		
+		// Calculate the desired length of the internal storage area.
+		// All strings are NULL-terminated.
+		for (i = 0; i < otherStrings.size(); i++) {
+			otherLen += otherStrings[i]->size() + 1;
+		}
+		for (i = 0; i < other.environmentVariables.size(); i++) {
+			otherLen += environmentVariables[i].first.size() + 1;
+			otherLen += environmentVariables[i].second.size() + 1;
+		}
+		
+		shared_array<char> data(new char[otherLen]);
+		end = data.get();
+		
+		// Copy string fields into the internal storage area.
+		for (i = 0; i < otherStrings.size(); i++) {
+			const StaticString *str = strings[i];
+			const StaticString *otherStr = otherStrings[i];
+			
+			// Point current object's field to the data in the
+			// internal storage area.
+			*const_cast<StaticString *>(str) = StaticString(end, otherStr->size());
+			
+			// Copy over the string data.
+			memcpy(end, otherStr->c_str(), otherStr->size());
+			end += otherStr->size();
+			*end = '\0';
+			end++;
+		}
+		
+		// Copy environmentVariables names and values into the internal storage area.
+		for (i = 0; i < other.environmentVariables.size(); i++) {
+			const pair<StaticString, StaticString> &p = other.environmentVariables[i];
+			
+			environmentVariables[i] = make_pair(
+				StaticString(end, p.first.size()),
+				StaticString(end + p.first.size() + 1, p.second.size())
+			);
+			
+			// Copy over string data.
+			memcpy(end, p.first.data(), p.first.size());
+			end += p.first.size();
+			*end = '\0';
+			end++;
+			
+			// Copy over value data.
+			memcpy(end, p.second.data(), p.second.size());
+			end += p.second.size();
+			*end = '\0';
+			end++;
+		}
+		
+		storage = data;
+		
+		return *this;
+	}
+	
+	Options &clearPerRequestFields() {
+		hostName = string();
+		uri      = string();
+		noop     = false;
+		return clearLogger();
+	}
+
+	Options &clearLogger() {
+		logger.reset();
+		return *this;
+	}
+
+	enum FieldSet {
+		SPAWN_OPTIONS = 1 << 0,
+		PER_GROUP_POOL_OPTIONS = 1 << 1,
+		ALL_OPTIONS = ~0
+	};
+	
+	/**
+	 * Append information in this Options object to the given string vector, except
+	 * for environmentVariables. You can customize what information you want through
+	 * the `elements` argument.
+	 */
+	void toVector(vector<string> &vec, const ResourceLocator &resourceLocator,
+		int fields = ALL_OPTIONS) const
+	{
+		if (fields & SPAWN_OPTIONS) {
+			appendKeyValue (vec, "app_root",           appRoot);
+			appendKeyValue (vec, "app_group_name",     getAppGroupName());
+			appendKeyValue (vec, "app_type",           appType);
+			appendKeyValue (vec, "start_command",      getStartCommand(resourceLocator));
+			appendKeyValue (vec, "startup_file",       getStartupFile());
+			appendKeyValue (vec, "process_title",      getProcessTitle());
+			appendKeyValue2(vec, "log_level",          logLevel);
+			appendKeyValue3(vec, "start_timeout",      startTimeout);
+			appendKeyValue (vec, "environment",        environment);
+			appendKeyValue (vec, "base_uri",           baseURI);
+			appendKeyValue (vec, "spawn_method",       spawnMethod);
+			appendKeyValue (vec, "user",               user);
+			appendKeyValue (vec, "group",              group);
+			appendKeyValue (vec, "default_user",       defaultUser);
+			appendKeyValue (vec, "default_group",      defaultGroup);
+			appendKeyValue (vec, "restart_dir",        restartDir);
+			appendKeyValue (vec, "preexec_chroot",     preexecChroot);
+			appendKeyValue (vec, "postexec_chroot",    postexecChroot);
+			appendKeyValue (vec, "ruby",               ruby);
+			appendKeyValue (vec, "python",             python);
+			appendKeyValue (vec, "logging_agent_address",  loggingAgentAddress);
+			appendKeyValue (vec, "logging_agent_username", loggingAgentUsername);
+			appendKeyValue (vec, "logging_agent_password", loggingAgentPassword);
+			appendKeyValue4(vec, "debugger",           debugger);
+			appendKeyValue4(vec, "analytics",          analytics);
+			appendKeyValue (vec, "union_station_key",  unionStationKey);
+
+			appendKeyValue (vec, "group_secret",       groupSecret);
+		}
+		if (fields & PER_GROUP_POOL_OPTIONS) {
+			appendKeyValue3(vec, "min_processes",       minProcesses);
+			appendKeyValue2(vec, "max_preloader_idle_time", maxPreloaderIdleTime);
+		}
+		
+		/*********************************/
+	}
+
+	template<typename Stream>
+	void toXml(Stream &stream, const ResourceLocator &resourceLocator,
+		int fields = ALL_OPTIONS) const
+	{
+		vector<string> args;
+		unsigned int i;
+		
+		toVector(args, resourceLocator, fields);
+		for (i = 0; i < args.size(); i += 2) {
+			stream << "<" << args[i] << ">";
+			stream << escapeForXml(args[i + 1]);
+			stream << "</" << args[i] << ">";
+		}
+	}
+	
+	/**
+	 * Returns the app group name. If there is no explicitly set app group name
+	 * then the app root is considered to be the app group name.
+	 */
+	StaticString getAppGroupName() const {
+		if (appGroupName.empty()) {
+			return appRoot;
+		} else {
+			return appGroupName;
+		}
+	}
+	
+	string getStartCommand(const ResourceLocator &resourceLocator) const {
+		if (appType == "classic-rails") {
+			return ruby + "\t" + resourceLocator.getHelperScriptsDir() + "/classic-rails-loader.rb";
+		} else if (appType == "rack") {
+			return ruby + "\t" + resourceLocator.getHelperScriptsDir() + "/rack-loader.rb";
+		} else if (appType == "wsgi") {
+			return python + "\t" + resourceLocator.getHelperScriptsDir() + "/wsgi-loader.py";
+		} else {
+			return startCommand;
+		}
+	}
+	
+	StaticString getStartupFile() const {
+		const char *result = getAppTypeStartupFile(getAppType(appType));
+		if (result == NULL) {
+			return startupFile;
+		} else {
+			return result;
+		}
+	}
+	
+	StaticString getProcessTitle() const {
+		const char *result = getAppTypeProcessTitle(getAppType(appType));
+		if (result == NULL) {
+			return processTitle;
+		} else {
+			return result;
+		}
+	}
+	
+	unsigned long getMaxPreloaderIdleTime() const {
+		if (maxPreloaderIdleTime == -1) {
+			return 5 * 60;
+		} else {
+			return maxPreloaderIdleTime;
+		}
+	}
+};
+
+} // namespace ApplicationPool2
+} // namespace Passenger
+
+#endif /* _PASSENGER_APPLICATION_POOL2_OPTIONS_H_ */
+
diff --git a/ext/common/ApplicationPool2/PipeWatcher.h b/ext/common/ApplicationPool2/PipeWatcher.h
new file mode 100644
index 0000000..d2dea22
--- /dev/null
+++ b/ext/common/ApplicationPool2/PipeWatcher.h
@@ -0,0 +1,68 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2012-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_APPLICATION_POOL_PIPE_WATCHER_H_
+#define _PASSENGER_APPLICATION_POOL_PIPE_WATCHER_H_
+
+#include <boost/shared_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <boost/thread.hpp>
+#include <boost/function.hpp>
+#include <sys/types.h>
+#include <FileDescriptor.h>
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace boost;
+
+
+/** A PipeWatcher lives until the file descriptor is closed. */
+struct PipeWatcher: public enable_shared_from_this<PipeWatcher> {
+	// For unit tests.
+	typedef function<void (const char *data, unsigned int size)> DataCallback;
+	static DataCallback onData;
+
+	FileDescriptor fd;
+	const char *name;
+	pid_t pid;
+	bool print;
+	bool started;
+	boost::mutex startSyncher;
+	condition_variable startCond;
+
+	PipeWatcher(const FileDescriptor &_fd, const char *name, pid_t pid, bool _print);
+	void initialize();
+	void start();
+	static void threadMain(shared_ptr<PipeWatcher> self);
+	void threadMain();
+};
+
+typedef shared_ptr<PipeWatcher> PipeWatcherPtr;
+
+
+} // namespace ApplicationPool2
+} // namespace Passenger
+
+#endif /* _PASSENGER_APPLICATION_POOL_PIPE_WATCHER_H_ */
diff --git a/ext/common/ApplicationPool2/Pool.h b/ext/common/ApplicationPool2/Pool.h
new file mode 100644
index 0000000..118c00c
--- /dev/null
+++ b/ext/common/ApplicationPool2/Pool.h
@@ -0,0 +1,1518 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_APPLICATION_POOL2_POOL_H_
+#define _PASSENGER_APPLICATION_POOL2_POOL_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <sstream>
+#include <iomanip>
+#include <boost/thread.hpp>
+#include <boost/bind.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/make_shared.hpp>
+#include <boost/function.hpp>
+#include <boost/foreach.hpp>
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+#include <oxt/dynamic_thread_group.hpp>
+#include <oxt/backtrace.hpp>
+#include <ApplicationPool2/Common.h>
+#include <ApplicationPool2/Process.h>
+#include <ApplicationPool2/Group.h>
+#include <ApplicationPool2/SuperGroup.h>
+#include <ApplicationPool2/Session.h>
+#include <ApplicationPool2/SpawnerFactory.h>
+#include <ApplicationPool2/Options.h>
+#include <UnionStation.h>
+#include <Logging.h>
+#include <SafeLibev.h>
+#include <Exceptions.h>
+#include <RandomGenerator.h>
+#include <Utils/Lock.h>
+#include <Utils/AnsiColorConstants.h>
+#include <Utils/SystemTime.h>
+#include <Utils/MessagePassing.h>
+#include <Utils/VariantMap.h>
+#include <Utils/ProcessMetricsCollector.h>
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+
+class Pool: public enable_shared_from_this<Pool> {
+public:
+	struct InspectOptions {
+		bool colorize;
+		bool verbose;
+
+		InspectOptions()
+			: colorize(false),
+			  verbose(false)
+			{ }
+
+		InspectOptions(const VariantMap &options)
+			: colorize(options.getBool("colorize", false, false)),
+			  verbose(options.getBool("verbose", false, false))
+			{ }
+	};
+
+// Actually private, but marked public so that unit tests can access the fields.
+public:
+	friend class SuperGroup;
+	friend class Group;
+	typedef UnionStation::LoggerFactory LoggerFactory;
+	typedef UnionStation::LoggerFactoryPtr LoggerFactoryPtr;
+	typedef UnionStation::LoggerPtr LoggerPtr;
+
+	struct DebugSupport {
+		MessageBoxPtr debugger;
+		MessageBoxPtr messages;
+
+		// Choose aspects to debug.
+		bool restarting;
+		bool spawning;
+		bool superGroup;
+		bool oobw;
+
+		// The following fields may only be accessed by Pool.
+		boost::mutex syncher;
+		unsigned int spawnLoopIteration;
+
+		DebugSupport() {
+			debugger = make_shared<MessageBox>();
+			messages = make_shared<MessageBox>();
+			restarting = true;
+			spawning   = true;
+			superGroup = false;
+			oobw       = false;
+			spawnLoopIteration = 0;
+		}
+	};
+
+	typedef shared_ptr<DebugSupport> DebugSupportPtr;
+
+	SpawnerFactoryPtr spawnerFactory;
+	LoggerFactoryPtr loggerFactory;
+	RandomGeneratorPtr randomGenerator;
+
+	mutable boost::mutex syncher;
+	SafeLibev *libev;
+	unsigned int max;
+	unsigned long long maxIdleTime;
+	
+	condition_variable garbageCollectionCond;
+	
+	/**
+	 * Code can register background threads in one of these dynamic thread groups
+	 * to ensure that threads are interrupted and/or joined properly upon Pool
+	 * destruction.
+	 * All threads in 'interruptableThreads' will be interrupted and joined upon
+	 * Pool destruction.
+	 * All threads in 'nonInterruptableThreads' will be joined, but not interrupted,
+	 * upon Pool destruction.
+	 */
+	dynamic_thread_group interruptableThreads;
+	dynamic_thread_group nonInterruptableThreads;
+
+	enum LifeStatus {
+		ALIVE,
+		SHUTTING_DOWN,
+		SHUT_DOWN
+	} lifeStatus;
+	
+	SuperGroupMap superGroups;
+	
+	/**
+	 * get() requests that...
+	 * - cannot be immediately satisfied because the pool is at full
+	 *   capacity and no existing processes can be killed,
+	 * - and for which the super group isn't in the pool,
+	 * ...are put on this wait list.
+	 *
+	 * This wait list is processed when one of the following things happen:
+	 *
+	 * - A process has been spawned but its associated group has
+	 *   no get waiters. This process can be killed and the resulting
+	 *   free capacity will be used to use spawn a process for this
+	 *   get request.
+	 * - A process (that has apparently been spawned after getWaitlist
+	 *   was populated) is done processing a request. This process can
+	 *   then be killed to free capacity.
+	 * - A process has failed to spawn, resulting in capacity to
+	 *   become free.
+	 * - A SuperGroup failed to initialize, resulting in free capacity.
+	 * - Someone commanded Pool to detach a process, resulting in free
+	 *   capacity.
+	 * - Someone commanded Pool to detach a SuperGroup, resulting in
+	 *   free capacity.
+	 * - The 'max' option has been increased, resulting in free capacity.
+	 *
+	 * Invariant 1:
+	 *    for all options in getWaitlist:
+	 *       options.getAppGroupName() is not in 'superGroups'.
+	 *
+	 * Invariant 2:
+	 *    if getWaitlist is non-empty:
+	 *       atFullCapacity()
+	 * Equivalently:
+	 *    if !atFullCapacity():
+	 *       getWaitlist is empty.
+	 */
+	vector<GetWaiter> getWaitlist;
+
+	DebugSupportPtr debugSupport;
+	
+	static void runAllActions(const vector<Callback> &actions) {
+		vector<Callback>::const_iterator it, end = actions.end();
+		for (it = actions.begin(); it != end; it++) {
+			(*it)();
+		}
+	}
+	
+	static void runAllActionsWithCopy(vector<Callback> actions) {
+		runAllActions(actions);
+	}
+
+	static const char *maybeColorize(const InspectOptions &options, const char *color) {
+		if (options.colorize) {
+			return color;
+		} else {
+			return "";
+		}
+	}
+	
+	void verifyInvariants() const {
+		// !a || b: logical equivalent of a IMPLIES b.
+		assert(!( !getWaitlist.empty() ) || ( atFullCapacity(false) ));
+		assert(!( !atFullCapacity(false) ) || ( getWaitlist.empty() ));
+	}
+	
+	void verifyExpensiveInvariants() const {
+		#ifndef NDEBUG
+		vector<GetWaiter>::const_iterator it, end = getWaitlist.end();
+		for (it = getWaitlist.begin(); it != end; it++) {
+			const GetWaiter &waiter = *it;
+			assert(superGroups.get(waiter.options.getAppGroupName()) == NULL);
+		}
+		#endif
+	}
+
+	void fullVerifyInvariants() const {
+		TRACE_POINT();
+		verifyInvariants();
+		UPDATE_TRACE_POINT();
+		verifyExpensiveInvariants();
+		UPDATE_TRACE_POINT();
+		StringMap<SuperGroupPtr>::const_iterator sg_it, sg_end = superGroups.end();
+		for (sg_it = superGroups.begin(); sg_it != sg_end; sg_it++) {
+			pair<StaticString, SuperGroupPtr> p = *sg_it;
+			p.second->verifyInvariants();
+			foreach (GroupPtr group, p.second->groups) {
+				group->verifyInvariants();
+				group->verifyExpensiveInvariants();
+			}
+		}
+	}
+	
+	ProcessPtr findOldestIdleProcess() const {
+		ProcessPtr oldestIdleProcess;
+		
+		SuperGroupMap::const_iterator it, end = superGroups.end();
+		for (it = superGroups.begin(); it != end; it++) {
+			const SuperGroupPtr &superGroup = it->second;
+			const vector<GroupPtr> &groups = superGroup->groups;
+			vector<GroupPtr>::const_iterator g_it, g_end = groups.end();
+			for (g_it = groups.begin(); g_it != g_end; g_it++) {
+				const GroupPtr &group = *g_it;
+				const ProcessList &processes = group->enabledProcesses;
+				ProcessList::const_iterator p_it, p_end = processes.end();
+				for (p_it = processes.begin(); p_it != p_end; p_it++) {
+					const ProcessPtr process = *p_it;
+					if (process->utilization() == 0
+					     && (oldestIdleProcess == NULL
+					         || process->lastUsed < oldestIdleProcess->lastUsed)
+					) {
+						oldestIdleProcess = process;
+					}
+				}
+			}
+		}
+		
+		return oldestIdleProcess;
+	}
+	
+	ProcessPtr findBestProcessToTrash() const {
+		ProcessPtr oldestProcess;
+		
+		SuperGroupMap::const_iterator it, end = superGroups.end();
+		for (it = superGroups.begin(); it != end; it++) {
+			const SuperGroupPtr &superGroup = it->second;
+			const vector<GroupPtr> &groups = superGroup->groups;
+			vector<GroupPtr>::const_iterator g_it, g_end = groups.end();
+			for (g_it = groups.begin(); g_it != g_end; g_it++) {
+				const GroupPtr &group = *g_it;
+				const ProcessList &processes = group->enabledProcesses;
+				ProcessList::const_iterator p_it, p_end = processes.end();
+				for (p_it = processes.begin(); p_it != p_end; p_it++) {
+					const ProcessPtr process = *p_it;
+					if (oldestProcess == NULL
+					 || process->lastUsed < oldestProcess->lastUsed) {
+						oldestProcess = process;
+					}
+				}
+			}
+		}
+		
+		return oldestProcess;
+	}
+	
+	/** Process all waiters on the getWaitlist. Call when capacity has become free.
+	 * This function assigns sessions to them by calling get() on the corresponding
+	 * SuperGroups, or by creating more SuperGroups, in so far the new capacity allows.
+	 */
+	void assignSessionsToGetWaiters(vector<Callback> &postLockActions) {
+		bool done = false;
+		vector<GetWaiter>::iterator it, end = getWaitlist.end();
+		vector<GetWaiter> newWaitlist;
+		
+		for (it = getWaitlist.begin(); it != end && !done; it++) {
+			GetWaiter &waiter = *it;
+			
+			SuperGroup *superGroup = findMatchingSuperGroup(waiter.options);
+			if (superGroup != NULL) {
+				SessionPtr session = superGroup->get(waiter.options, waiter.callback);
+				if (session != NULL) {
+					postLockActions.push_back(boost::bind(
+						waiter.callback, session, ExceptionPtr()));
+				}
+				/* else: the callback has now been put in
+				 *       the group's get wait list.
+				 */
+			} else if (!atFullCapacity(false)) {
+				createSuperGroupAndAsyncGetFromIt(waiter.options, waiter.callback);
+			} else {
+				/* Still cannot satisfy this get request. Keep it on the get
+				 * wait list and try again later.
+				 */
+				newWaitlist.push_back(waiter);
+			}
+		}
+		
+		getWaitlist = newWaitlist;
+	}
+
+	template<typename Queue>
+	static void assignExceptionToGetWaiters(Queue &getWaitlist,
+		const ExceptionPtr &exception,
+		vector<Callback> &postLockActions)
+	{
+		while (!getWaitlist.empty()) {
+			postLockActions.push_back(boost::bind(
+				getWaitlist.front().callback, SessionPtr(),
+				exception));
+			getWaitlist.pop();
+		}
+	}
+	
+	void possiblySpawnMoreProcessesForExistingGroups() {
+		StringMap<SuperGroupPtr>::const_iterator sg_it, sg_end = superGroups.end();
+		/* Looks for Groups that are waiting for capacity to become available,
+		 * and spawn processes in those groups.
+		 */
+		for (sg_it = superGroups.begin(); sg_it != sg_end; sg_it++) {
+			pair<StaticString, SuperGroupPtr> p = *sg_it;
+			foreach (GroupPtr group, p.second->groups) {
+				if (group->isWaitingForCapacity()) {
+					P_DEBUG("Group " << group->name << " is waiting for capacity");
+					group->spawn();
+					if (atFullCapacity(false)) {
+						return;
+					}
+				}
+			}
+		}
+		/* Now look for Groups that haven't maximized their allowed capacity
+		 * yet, and spawn processes in those groups.
+		 */
+		for (sg_it = superGroups.begin(); sg_it != sg_end; sg_it++) {
+			pair<StaticString, SuperGroupPtr> p = *sg_it;
+			foreach (GroupPtr group, p.second->groups) {
+				if (group->shouldSpawn()) {
+					P_DEBUG("Group " << group->name << " requests more processes to be spawned");
+					group->spawn();
+					if (atFullCapacity(false)) {
+						return;
+					}
+				}
+			}
+		}
+	}
+	
+	void migrateSuperGroupGetWaitlistToPool(const SuperGroupPtr &superGroup) {
+		getWaitlist.reserve(getWaitlist.size() + superGroup->getWaitlist.size());
+		while (!superGroup->getWaitlist.empty()) {
+			getWaitlist.push_back(superGroup->getWaitlist.front());
+			superGroup->getWaitlist.pop();
+		}
+	}
+	
+	/**
+	 * Forcefully destroys and detaches the given SuperGroup. After detaching
+	 * the SuperGroup may have a non-empty getWaitlist so be sure to do
+	 * something with it.
+	 *
+	 * Also, one of the post lock actions can potentially perform a long-running
+	 * operation, so running them in a thread is advised.
+	 */
+	void forceDetachSuperGroup(const SuperGroupPtr &superGroup,
+		vector<Callback> &postLockActions,
+		const SuperGroup::ShutdownCallback &callback)
+	{
+		const SuperGroupPtr sp = superGroup; // Prevent premature destruction.
+		bool removed = superGroups.remove(superGroup->name);
+		assert(removed);
+		(void) removed; // Shut up compiler warning.
+		superGroup->destroy(false, postLockActions, callback);
+	}
+
+	bool detachProcessUnlocked(const ProcessPtr &process, vector<Callback> &postLockActions) {
+		if (OXT_LIKELY(process->isAlive())) {
+			verifyInvariants();
+			
+			const GroupPtr group = process->getGroup();
+			const SuperGroupPtr superGroup = group->getSuperGroup();
+			assert(superGroup->state != SuperGroup::INITIALIZING);
+			assert(superGroup->getWaitlist.empty());
+			
+			group->detach(process, postLockActions);
+			// 'process' may now be a stale pointer so don't use it anymore.
+			assignSessionsToGetWaiters(postLockActions);
+			possiblySpawnMoreProcessesForExistingGroups();
+
+			group->verifyInvariants();
+			superGroup->verifyInvariants();
+			verifyInvariants();
+			verifyExpensiveInvariants();
+			
+			return true;
+		} else {
+			return false;
+		}
+	}
+	
+	void inspectProcessList(const InspectOptions &options, stringstream &result,
+		const Group *group, const ProcessList &processes) const
+	{
+		ProcessList::const_iterator p_it;
+		for (p_it = processes.begin(); p_it != processes.end(); p_it++) {
+			const ProcessPtr &process = *p_it;
+			char buf[128];
+			char cpubuf[10];
+			char membuf[10];
+			
+			snprintf(cpubuf, sizeof(cpubuf), "%d%%", (int) process->metrics.cpu);
+			snprintf(membuf, sizeof(membuf), "%ldM",
+				(unsigned long) (process->metrics.realMemory() / 1024));
+			snprintf(buf, sizeof(buf),
+					"  * PID: %-5lu   Sessions: %-2u      Processed: %-5u   Uptime: %s\n"
+					"    CPU: %-5s   Memory  : %-5s   Last used: %s ago",
+					(unsigned long) process->pid,
+					process->sessions,
+					process->processed,
+					process->uptime().c_str(),
+					cpubuf,
+					membuf,
+					distanceOfTimeInWords(process->lastUsed / 1000000).c_str());
+			result << buf << endl;
+
+			if (process->enabled == Process::DISABLING) {
+				result << "    Disabling..." << endl;
+			} else if (process->enabled == Process::DISABLED) {
+				result << "    DISABLED" << endl;
+			} else if (process->enabled == Process::DETACHED) {
+				result << "    Shutting down..." << endl;
+			}
+
+			const Socket *socket;
+			if (options.verbose && (socket = process->sockets->findSocketWithName("http")) != NULL) {
+				result << "    URL     : http://" << replaceString(socket->address, "tcp://", "") << endl;
+				result << "    Password: " << process->connectPassword << endl;
+			}
+		}
+	}
+
+	struct DetachSuperGroupWaitTicket {
+		boost::mutex syncher;
+		condition_variable cond;
+		SuperGroup::ShutdownResult result;
+		bool done;
+
+		DetachSuperGroupWaitTicket() {
+			done = false;
+		}
+	};
+
+	struct DisableWaitTicket {
+		boost::mutex syncher;
+		condition_variable cond;
+		DisableResult result;
+		bool done;
+
+		DisableWaitTicket() {
+			done = false;
+		}
+	};
+
+	static void syncDetachSuperGroupCallback(SuperGroup::ShutdownResult result,
+		shared_ptr<DetachSuperGroupWaitTicket> ticket)
+	{
+		LockGuard l(ticket->syncher);
+		ticket->done = true;
+		ticket->result = result;
+		ticket->cond.notify_one();
+	}
+
+	static void waitDetachSuperGroupCallback(shared_ptr<DetachSuperGroupWaitTicket> ticket) {
+		ScopedLock l(ticket->syncher);
+		while (!ticket->done) {
+			ticket->cond.wait(l);
+		}
+	}
+
+	static void syncDisableProcessCallback(const ProcessPtr &process, DisableResult result,
+		shared_ptr<DisableWaitTicket> ticket)
+	{
+		LockGuard l(ticket->syncher);
+		ticket->done = true;
+		ticket->result = result;
+		ticket->cond.notify_one();
+	}
+
+	static void syncGetCallback(Ticket *ticket, const SessionPtr &session, const ExceptionPtr &e) {
+		ScopedLock lock(ticket->syncher);
+		if (OXT_LIKELY(session != NULL)) {
+			ticket->session = session;
+		} else {
+			ticket->exception = e;
+		}
+		ticket->cond.notify_one();
+	}
+	
+	SuperGroup *findMatchingSuperGroup(const Options &options) {
+		return superGroups.get(options.getAppGroupName()).get();
+	}
+
+	struct GarbageCollectorState {
+		unsigned long long now;
+		unsigned long long nextGcRunTime;
+		vector<Callback> actions;
+	};
+
+	static void garbageCollect(PoolPtr self) {
+		TRACE_POINT();
+		{
+			ScopedLock lock(self->syncher);
+			self->garbageCollectionCond.timed_wait(lock,
+				posix_time::seconds(5));
+		}
+		while (!this_thread::interruption_requested()) {
+			try {
+				UPDATE_TRACE_POINT();
+				unsigned long long sleepTime = self->realGarbageCollect();
+				ScopedLock lock(self->syncher);
+				self->garbageCollectionCond.timed_wait(lock,
+					posix_time::microseconds(sleepTime));
+			} catch (const thread_interrupted &) {
+				break;
+			} catch (const tracable_exception &e) {
+				P_WARN("ERROR: " << e.what() << "\n  Backtrace:\n" << e.backtrace());
+			}
+		}
+	}
+
+	void maybeUpdateNextGcRuntime(GarbageCollectorState &state, unsigned long candidate) {
+		if (state.nextGcRunTime == 0 || candidate < state.nextGcRunTime) {
+			state.nextGcRunTime = candidate;
+		}
+	}
+
+	void maybeDetachIdleProcess(GarbageCollectorState &state, const GroupPtr &group,
+		const ProcessPtr &process, ProcessList::iterator &p_it)
+	{
+		assert(maxIdleTime > 0);
+		unsigned long long processGcTime =
+			process->lastUsed + maxIdleTime;
+		if (process->sessions == 0
+		 && state.now >= processGcTime
+		 && (unsigned long) group->enabledCount > group->options.minProcesses) {
+			ProcessList::iterator prev = p_it;
+			prev--;
+			P_DEBUG("Garbage collect idle process: " << process->inspect() <<
+				", group=" << group->name);
+			group->detach(process, state.actions);
+			p_it = prev;
+		} else {
+			maybeUpdateNextGcRuntime(state, processGcTime);
+		}
+	}
+
+	void maybeCleanPreloader(GarbageCollectorState &state, const GroupPtr &group) {
+		if (group->spawner->cleanable() && group->options.getMaxPreloaderIdleTime() != 0) {
+			unsigned long long spawnerGcTime =
+				group->spawner->lastUsed() +
+				group->options.getMaxPreloaderIdleTime() * 1000000;
+			if (state.now >= spawnerGcTime) {
+				P_DEBUG("Garbage collect idle spawner: group=" << group->name);
+				group->cleanupSpawner(state.actions);
+			} else {
+				maybeUpdateNextGcRuntime(state, spawnerGcTime);
+			}
+		}
+	}
+
+	unsigned long long realGarbageCollect() {
+		TRACE_POINT();
+		ScopedLock lock(syncher);
+		SuperGroupMap::iterator it, end = superGroups.end();
+		GarbageCollectorState state;
+		state.now = SystemTime::getUsec();
+		state.nextGcRunTime = 0;
+		
+		P_DEBUG("Garbage collection time...");
+		verifyInvariants();
+		
+		// For all supergroups and groups...
+		for (it = superGroups.begin(); it != end; it++) {
+			SuperGroupPtr superGroup = it->second;
+			vector<GroupPtr> &groups = superGroup->groups;
+			vector<GroupPtr>::iterator g_it, g_end = groups.end();
+			
+			superGroup->verifyInvariants();
+			
+			for (g_it = groups.begin(); g_it != g_end; g_it++) {
+				GroupPtr group = *g_it;
+
+				if (maxIdleTime > 0) {
+					ProcessList &processes = group->enabledProcesses;
+					ProcessList::iterator p_it, p_end = processes.end();
+
+					for (p_it = processes.begin(); p_it != p_end; p_it++) {
+						ProcessPtr process = *p_it;
+						// ...detach processes that have been idle for more than maxIdleTime.
+						maybeDetachIdleProcess(state, group, process, p_it);
+					}
+				}
+				
+				group->verifyInvariants();
+			
+				// ...cleanup the spawner if it's been idle for more than preloaderIdleTime.
+				maybeCleanPreloader(state, group);
+			}
+			
+			superGroup->verifyInvariants();
+		}
+		
+		verifyInvariants();
+		lock.unlock();
+
+		// Schedule next garbage collection run.
+		unsigned long long sleepTime;
+		if (state.nextGcRunTime == 0 || state.nextGcRunTime <= state.now) {
+			if (maxIdleTime == 0) {
+				sleepTime = 10 * 60 * 1000000;
+			} else {
+				sleepTime = maxIdleTime;
+			}
+		} else {
+			sleepTime = state.nextGcRunTime - state.now;
+		}
+		P_DEBUG("Garbage collection done; next garbage collect in " <<
+			std::fixed << std::setprecision(3) << (sleepTime / 1000000.0) << " sec");
+
+		UPDATE_TRACE_POINT();
+		runAllActions(state.actions);
+		UPDATE_TRACE_POINT();
+		state.actions.clear();
+		return sleepTime;
+	}
+
+	struct ProcessAnalyticsLogEntry {
+		string groupName;
+		string key;
+		stringstream data;
+	};
+
+	typedef shared_ptr<ProcessAnalyticsLogEntry> ProcessAnalyticsLogEntryPtr;
+
+	static void collectAnalytics(PoolPtr self) {
+		TRACE_POINT();
+		syscalls::usleep(3000000);
+		while (!this_thread::interruption_requested()) {
+			try {
+				UPDATE_TRACE_POINT();
+				unsigned long long sleepTime = self->realCollectAnalytics();
+				syscalls::usleep(sleepTime);
+			} catch (const thread_interrupted &) {
+				break;
+			} catch (const tracable_exception &e) {
+				P_WARN("ERROR: " << e.what() << "\n  Backtrace:\n" << e.backtrace());
+			}
+		}
+	}
+
+	static void collectPids(const ProcessList &processes, vector<pid_t> &pids) {
+		foreach (const ProcessPtr &process, processes) {
+			pids.push_back(process->pid);
+		}
+	}
+
+	static void updateProcessMetrics(const ProcessList &processes,
+		const ProcessMetricMap &allMetrics,
+		vector<ProcessPtr> &processesToDetach)
+	{
+		foreach (const ProcessPtr &process, processes) {
+			ProcessMetricMap::const_iterator metrics_it =
+				allMetrics.find(process->pid);
+			if (metrics_it != allMetrics.end()) {
+				process->metrics = metrics_it->second;
+			// If the process is missing from 'allMetrics' then either 'ps'
+			// failed or the process really is gone. We double check by sending
+			// it a signal.
+			} else if (!process->dummy && !process->osProcessExists()) {
+				P_WARN("Process " << process->inspect() << " no longer exists! "
+					"Detaching it from the pool.");
+				processesToDetach.push_back(process);
+			}
+		}
+	}
+
+	unsigned long long realCollectAnalytics() {
+		TRACE_POINT();
+		this_thread::disable_interruption di;
+		this_thread::disable_syscall_interruption dsi;
+		vector<pid_t> pids;
+		unsigned int max;
+		
+		P_DEBUG("Analytics collection time...");
+		// Collect all the PIDs.
+		{
+			UPDATE_TRACE_POINT();
+			LockGuard l(syncher);
+			max = this->max;
+		}
+		pids.reserve(max);
+		{
+			UPDATE_TRACE_POINT();
+			LockGuard l(syncher);
+			SuperGroupMap::const_iterator sg_it, sg_end = superGroups.end();
+			
+			for (sg_it = superGroups.begin(); sg_it != sg_end; sg_it++) {
+				const SuperGroupPtr &superGroup = sg_it->second;
+				vector<GroupPtr>::const_iterator g_it, g_end = superGroup->groups.end();
+
+				for (g_it = superGroup->groups.begin(); g_it != g_end; g_it++) {
+					const GroupPtr &group = *g_it;
+					collectPids(group->enabledProcesses, pids);
+					collectPids(group->disablingProcesses, pids);
+					collectPids(group->disabledProcesses, pids);
+				}
+			}
+		}
+		
+		ProcessMetricMap allMetrics;
+		try {
+			// Now collect the process metrics and store them in the
+			// data structures, and log the state into the analytics logs.
+			UPDATE_TRACE_POINT();
+			allMetrics = ProcessMetricsCollector().collect(pids);
+		} catch (const ProcessMetricsCollector::ParseException &) {
+			P_WARN("Unable to collect process metrics: cannot parse 'ps' output.");
+			goto end;
+		}
+
+		{
+			UPDATE_TRACE_POINT();
+			vector<ProcessAnalyticsLogEntryPtr> logEntries;
+			vector<ProcessPtr> processesToDetach;
+			vector<Callback> actions;
+			ScopedLock l(syncher);
+			SuperGroupMap::iterator sg_it, sg_end = superGroups.end();
+			
+			UPDATE_TRACE_POINT();
+			for (sg_it = superGroups.begin(); sg_it != sg_end; sg_it++) {
+				const SuperGroupPtr &superGroup = sg_it->second;
+				vector<GroupPtr>::iterator g_it, g_end = superGroup->groups.end();
+
+				for (g_it = superGroup->groups.begin(); g_it != g_end; g_it++) {
+					const GroupPtr &group = *g_it;
+
+					updateProcessMetrics(group->enabledProcesses, allMetrics, processesToDetach);
+					updateProcessMetrics(group->disablingProcesses, allMetrics, processesToDetach);
+					updateProcessMetrics(group->disabledProcesses, allMetrics, processesToDetach);
+
+					// Log to Union Station.
+					if (group->options.analytics && loggerFactory != NULL) {
+						ProcessAnalyticsLogEntryPtr entry = make_shared<ProcessAnalyticsLogEntry>();
+						stringstream &xml = entry->data;
+
+						entry->groupName = group->name;
+						entry->key = group->options.unionStationKey;
+						xml << "Group: <group>";
+						group->inspectXml(xml, false);
+						xml << "</group>";
+						logEntries.push_back(entry);
+					}
+				}
+			}
+
+			UPDATE_TRACE_POINT();
+			foreach (const ProcessPtr process, processesToDetach) {
+				detachProcessUnlocked(process, actions);
+			}
+			UPDATE_TRACE_POINT();
+			processesToDetach.clear();
+
+			l.unlock();
+			UPDATE_TRACE_POINT();
+			while (!logEntries.empty()) {
+				ProcessAnalyticsLogEntryPtr entry = logEntries.back();
+				logEntries.pop_back();
+				LoggerPtr logger = loggerFactory->newTransaction(entry->groupName,
+					"processes", entry->key);
+				logger->message(entry->data.str());
+			}
+
+			UPDATE_TRACE_POINT();
+			runAllActions(actions);
+			UPDATE_TRACE_POINT();
+			// Run destructors with updated trace point.
+			actions.clear();
+		}
+		
+		end:
+		// Sleep for about 4 seconds, aligned to seconds boundary
+		// for saving power on laptops.
+		unsigned long long currentTime = SystemTime::getUsec();
+		unsigned long long deadline =
+			roundUp<unsigned long long>(currentTime, 1000000) + 4000000;
+		P_DEBUG("Analytics collection done; next analytics collection in " <<
+			std::fixed << std::setprecision(3) << ((deadline - currentTime) / 1000000.0) <<
+			" sec");
+		return deadline - currentTime;
+	}
+	
+	SuperGroupPtr createSuperGroup(const Options &options) {
+		SuperGroupPtr superGroup = make_shared<SuperGroup>(shared_from_this(),
+			options);
+		superGroup->initialize();
+		superGroups.set(options.getAppGroupName(), superGroup);
+		garbageCollectionCond.notify_all();
+		return superGroup;
+	}
+	
+	SuperGroupPtr createSuperGroupAndAsyncGetFromIt(const Options &options,
+		const GetCallback &callback)
+	{
+		SuperGroupPtr superGroup = createSuperGroup(options);
+		SessionPtr session = superGroup->get(options, callback);
+		/* Callback should now have been put on the wait list,
+		 * unless something has changed and we forgot to update
+		 * some code here...
+		 */
+		assert(session == NULL);
+		return superGroup;
+	}
+
+	// Debugging helper function, implemented in .cpp file so that GDB can access it.
+	const SuperGroupPtr getSuperGroup(const char *name);
+	
+public:
+	Pool(SafeLibev *libev, const SpawnerFactoryPtr &spawnerFactory,
+		const LoggerFactoryPtr &loggerFactory = LoggerFactoryPtr(),
+		const RandomGeneratorPtr &randomGenerator = RandomGeneratorPtr())
+	{
+		this->libev = libev;
+		this->spawnerFactory = spawnerFactory;
+		this->loggerFactory = loggerFactory;
+		if (randomGenerator != NULL) {
+			this->randomGenerator = randomGenerator;
+		} else {
+			this->randomGenerator = make_shared<RandomGenerator>();
+		}
+		
+		lifeStatus  = ALIVE;
+		max         = 6;
+		maxIdleTime = 60 * 1000000;
+		
+		// The following code only serve to instantiate certain inline methods
+		// so that they can be invoked from gdb.
+		(void) SuperGroupPtr().get();
+		(void) GroupPtr().get();
+		(void) ProcessPtr().get();
+		(void) SessionPtr().get();
+	}
+	
+	~Pool() {
+		if (lifeStatus != SHUT_DOWN) {
+			P_BUG("You must call Pool::destroy() before actually destroying the Pool object!");
+		}
+	}
+
+	void initialize() {
+		LockGuard l(syncher);
+		interruptableThreads.create_thread(
+			boost::bind(collectAnalytics, shared_from_this()),
+			"Pool analytics collector",
+			POOL_HELPER_THREAD_STACK_SIZE
+		);
+		interruptableThreads.create_thread(
+			boost::bind(garbageCollect, shared_from_this()),
+			"Pool garbage collector",
+			POOL_HELPER_THREAD_STACK_SIZE
+		);
+	}
+
+	void initDebugging() {
+		LockGuard l(syncher);
+		debugSupport = make_shared<DebugSupport>();
+	}
+
+	void destroy() {
+		TRACE_POINT();
+		ScopedLock lock(syncher);
+		assert(lifeStatus == ALIVE);
+
+		lifeStatus = SHUTTING_DOWN;
+
+		while (!superGroups.empty()) {
+			string name = superGroups.begin()->second->name;
+			lock.unlock();
+			detachSuperGroupByName(name);
+			lock.lock();
+		}
+
+		UPDATE_TRACE_POINT();
+		lock.unlock();
+		interruptableThreads.interrupt_and_join_all();
+		nonInterruptableThreads.join_all();
+		lock.lock();
+
+		lifeStatus = SHUT_DOWN;
+
+		UPDATE_TRACE_POINT();
+		verifyInvariants();
+		verifyExpensiveInvariants();
+	}
+
+	// 'lockNow == false' may only be used during unit tests. Normally we
+	// should never call the callback while holding the lock.
+	void asyncGet(const Options &options, const GetCallback &callback, bool lockNow = true) {
+		DynamicScopedLock lock(syncher, lockNow);
+		
+		assert(lifeStatus == ALIVE);
+		verifyInvariants();
+		P_TRACE(2, "asyncGet(appRoot=" << options.appRoot << ")");
+		
+		SuperGroup *existingSuperGroup = findMatchingSuperGroup(options);
+		if (OXT_LIKELY(existingSuperGroup != NULL)) {
+			/* Best case: the app super group is already in the pool. Let's use it. */
+			P_TRACE(2, "Found existing SuperGroup");
+			existingSuperGroup->verifyInvariants();
+			SessionPtr session = existingSuperGroup->get(options, callback);
+			existingSuperGroup->verifyInvariants();
+			verifyInvariants();
+			P_TRACE(2, "asyncGet() finished");
+			if (lockNow) {
+				lock.unlock();
+			}
+			if (session != NULL) {
+				callback(session, ExceptionPtr());
+			}
+		
+		} else if (!atFullCapacity(false)) {
+			/* The app super group isn't in the pool and we have enough free
+			 * resources to make a new one.
+			 */
+			P_DEBUG("Spawning new SuperGroup");
+			SuperGroupPtr superGroup = createSuperGroupAndAsyncGetFromIt(options, callback);
+			superGroup->verifyInvariants();
+			verifyInvariants();
+			P_DEBUG("asyncGet() finished");
+			
+		} else {
+			vector<Callback> actions;
+			
+			/* Uh oh, the app super group isn't in the pool but we don't
+			 * have the resources to make a new one. The sysadmin should
+			 * configure the system to let something like this happen
+			 * as least as possible, but let's try to handle it as well
+			 * as we can.
+			 *
+			 * First, try to trash an idle process that's the oldest.
+			 */
+			P_DEBUG("Pool is at full capacity; trying to free a process...");
+			ProcessPtr process = findOldestIdleProcess();
+			if (process == NULL) {
+				/* All processes are doing something. We have no choice
+				 * but to trash a non-idle process.
+				 */
+				if (options.allowTrashingNonIdleProcesses) {
+					process = findBestProcessToTrash();
+				}
+			} else {
+				// Check invariant.
+				assert(process->getGroup()->getWaitlist.empty());
+			}
+			if (process == NULL) {
+				/* No process is eligible for killing. This could happen if, for example,
+				 * all (super)groups are currently initializing/restarting/spawning/etc.
+				 * We have no choice but to satisfy this get() action later when resources
+				 * become available.
+				 */
+				P_DEBUG("Could not free a process; putting request to top-level getWaitlist");
+				getWaitlist.push_back(GetWaiter(
+					options.copyAndPersist().clearLogger(),
+					callback));
+			} else {
+				GroupPtr group;
+				SuperGroupPtr superGroup;
+				
+				P_DEBUG("Freeing process " << process->inspect());
+				group = process->getGroup();
+				assert(group != NULL);
+				superGroup = group->getSuperGroup();
+				assert(superGroup != NULL);
+				
+				group->detach(process, actions);
+				
+				/* Now that a process has been trashed we can create
+				 * the missing SuperGroup.
+				 */
+				P_DEBUG("Creating new SuperGroup");
+				superGroup = make_shared<SuperGroup>(shared_from_this(), options);
+				superGroup->initialize();
+				superGroups.set(options.getAppGroupName(), superGroup);
+				garbageCollectionCond.notify_all();
+				SessionPtr session = superGroup->get(options, callback);
+				/* The SuperGroup is still initializing so the callback
+				 * should now have been put on the wait list,
+				 * unless something has changed and we forgot to update
+				 * some code here...
+				 */
+				assert(session == NULL);
+				group->verifyInvariants();
+				superGroup->verifyInvariants();
+			}
+			
+			assert(atFullCapacity(false));
+			verifyInvariants();
+			verifyExpensiveInvariants();
+			P_TRACE(2, "asyncGet() finished");
+			
+			if (!actions.empty()) {
+				if (lockNow) {
+					lock.unlock();
+					runAllActions(actions);
+				} else {
+					// This state is not allowed. If we reach
+					// here then it probably indicates a bug in
+					// the test suite.
+					abort();
+				}
+			}
+		}
+	}
+	
+	// TODO: 'ticket' should be a shared_ptr for interruption-safety.
+	SessionPtr get(const Options &options, Ticket *ticket) {
+		ticket->session.reset();
+		ticket->exception.reset();
+		
+		asyncGet(options, boost::bind(syncGetCallback, ticket, _1, _2));
+		
+		ScopedLock lock(ticket->syncher);
+		while (ticket->session == NULL && ticket->exception == NULL) {
+			ticket->cond.wait(lock);
+		}
+		lock.unlock();
+		
+		if (OXT_LIKELY(ticket->session != NULL)) {
+			SessionPtr session = ticket->session;
+			ticket->session.reset();
+			return session;
+		} else {
+			rethrowException(ticket->exception);
+			return SessionPtr(); // Shut up compiler warning.
+		}
+	}
+	
+	GroupPtr findOrCreateGroup(const Options &options) {
+		Options options2 = options;
+		options2.noop = true;
+		
+		Ticket ticket;
+		{
+			LockGuard l(syncher);
+			if (superGroups.get(options.getAppGroupName()) == NULL) {
+				// Forcefully create SuperGroup, don't care whether resource limits
+				// actually allow it.
+				createSuperGroup(options);
+			}
+		}
+		return get(options2, &ticket)->getGroup();
+	}
+	
+	void setMax(unsigned int max) {
+		ScopedLock l(syncher);
+		assert(max > 0);
+		fullVerifyInvariants();
+		bool bigger = max > this->max;
+		this->max = max;
+		if (bigger) {
+			/* If there are clients waiting for resources
+			 * to become free, spawn more processes now that
+			 * we have the capacity.
+			 *
+			 * We favor waiters on the pool over waiters on the
+			 * the groups because the latter already have the
+			 * resources to eventually complete. Favoring waiters
+			 * on the pool should be fairer.
+			 */
+			vector<Callback> actions;
+			assignSessionsToGetWaiters(actions);
+			possiblySpawnMoreProcessesForExistingGroups();
+			
+			fullVerifyInvariants();
+			l.unlock();
+			runAllActions(actions);
+		} else {
+			fullVerifyInvariants();
+		}
+	}
+
+	void setMaxIdleTime(unsigned long long value) {
+		LockGuard l(syncher);
+		maxIdleTime = value;
+		garbageCollectionCond.notify_all();
+	}
+	
+	unsigned int utilization(bool lock = true) const {
+		DynamicScopedLock l(syncher, lock);
+		SuperGroupMap::const_iterator it, end = superGroups.end();
+		int result = 0;
+		for (it = superGroups.begin(); it != end; it++) {
+			const SuperGroupPtr &superGroup = it->second;
+			result += superGroup->utilization();
+		}
+		return result;
+	}
+	
+	bool atFullCapacity(bool lock = true) const {
+		DynamicScopedLock l(syncher, lock);
+		return utilization(false) >= max;
+	}
+
+	vector<ProcessPtr> getProcesses(bool lock = true) const {
+		DynamicScopedLock l(syncher, lock);
+		vector<ProcessPtr> result;
+		SuperGroupMap::const_iterator it, end = superGroups.end();
+		for (it = superGroups.begin(); OXT_LIKELY(it != end); it++) {
+			const SuperGroupPtr &superGroup = it->second;
+			vector<GroupPtr> &groups = superGroup->groups;
+			vector<GroupPtr>::const_iterator g_it, g_end = groups.end();
+			for (g_it = groups.begin(); g_it != g_end; g_it++) {
+				const GroupPtr &group = *g_it;
+				ProcessList::const_iterator p_it;
+
+				for (p_it = group->enabledProcesses.begin(); p_it != group->enabledProcesses.end(); p_it++) {
+					result.push_back(*p_it);
+				}
+				for (p_it = group->disablingProcesses.begin(); p_it != group->disablingProcesses.end(); p_it++) {
+					result.push_back(*p_it);
+				}
+				for (p_it = group->disabledProcesses.begin(); p_it != group->disabledProcesses.end(); p_it++) {
+					result.push_back(*p_it);
+				}
+			}
+		}
+		return result;
+	}
+	
+	unsigned int getProcessCount(bool lock = true) const {
+		DynamicScopedLock l(syncher, lock);
+		unsigned int result = 0;
+		SuperGroupMap::const_iterator it, end = superGroups.end();
+		for (it = superGroups.begin(); OXT_LIKELY(it != end); it++) {
+			const SuperGroupPtr &superGroup = it->second;
+			result += superGroup->getProcessCount();
+		}
+		return result;
+	}
+
+	unsigned int getSuperGroupCount() const {
+		LockGuard l(syncher);
+		return superGroups.size();
+	}
+	
+	SuperGroupPtr findSuperGroupBySecret(const string &secret, bool lock = true) const {
+		DynamicScopedLock l(syncher, lock);
+		SuperGroupMap::const_iterator it, end = superGroups.end();
+		for (it = superGroups.begin(); OXT_LIKELY(it != end); it++) {
+			const SuperGroupPtr &superGroup = it->second;
+			if (superGroup->secret == secret) {
+				return superGroup;
+			}
+		}
+		return SuperGroupPtr();
+	}
+	
+	ProcessPtr findProcessByGupid(const string &gupid, bool lock = true) const {
+		vector<ProcessPtr> processes = getProcesses(lock);
+		vector<ProcessPtr>::const_iterator it, end = processes.end();
+		for (it = processes.begin(); it != end; it++) {
+			const ProcessPtr &process = *it;
+			if (process->gupid == gupid) {
+				return process;
+			}
+		}
+		return ProcessPtr();
+	}
+
+	ProcessPtr findProcessByPid(pid_t pid, bool lock = true) const {
+		vector<ProcessPtr> processes = getProcesses(lock);
+		vector<ProcessPtr>::const_iterator it, end = processes.end();
+		for (it = processes.begin(); it != end; it++) {
+			const ProcessPtr &process = *it;
+			if (process->pid == pid) {
+				return process;
+			}
+		}
+		return ProcessPtr();
+	}
+
+	bool detachSuperGroupByName(const string &name) {
+		TRACE_POINT();
+		ScopedLock l(syncher);
+		
+		SuperGroupPtr superGroup = superGroups.get(name);
+		if (OXT_LIKELY(superGroup != NULL)) {
+			if (OXT_LIKELY(superGroups.get(superGroup->name) != NULL)) {
+				UPDATE_TRACE_POINT();
+				verifyInvariants();
+				verifyExpensiveInvariants();
+				
+				vector<Callback> actions;
+				shared_ptr<DetachSuperGroupWaitTicket> ticket =
+					make_shared<DetachSuperGroupWaitTicket>();
+				ExceptionPtr exception = copyException(
+					GetAbortedException("The containg SuperGroup was detached."));
+
+				forceDetachSuperGroup(superGroup, actions,
+					boost::bind(syncDetachSuperGroupCallback, _1, ticket));
+				assignExceptionToGetWaiters(superGroup->getWaitlist,
+					exception, actions);
+				#if 0
+				/* If this SuperGroup had get waiters, either
+				 * on itself or in one of its groups, then we must
+				 * reprocess them immediately. Detaching such a
+				 * SuperGroup is essentially the same as restarting it.
+				 */
+				migrateSuperGroupGetWaitlistToPool(superGroup);
+				
+				UPDATE_TRACE_POINT();
+				assignSessionsToGetWaiters(actions);
+				#endif
+				possiblySpawnMoreProcessesForExistingGroups();
+				
+				verifyInvariants();
+				verifyExpensiveInvariants();
+				
+				l.unlock();
+				UPDATE_TRACE_POINT();
+				runAllActions(actions);
+				actions.clear();
+
+				UPDATE_TRACE_POINT();
+				ScopedLock l2(ticket->syncher);
+				while (!ticket->done) {
+					ticket->cond.wait(l2);
+				}
+				return ticket->result == SuperGroup::SUCCESS;
+			} else {
+				return false;
+			}
+		} else {
+			return false;
+		}
+	}
+	
+	bool detachSuperGroupBySecret(const string &superGroupSecret) {
+		ScopedLock l(syncher);
+		SuperGroupPtr superGroup = findSuperGroupBySecret(superGroupSecret, false);
+		if (superGroup != NULL) {
+			string name = superGroup->name;
+			superGroup.reset();
+			l.unlock();
+			return detachSuperGroupByName(name);
+		} else {
+			return false;
+		}
+	}
+	
+	bool detachProcess(const ProcessPtr &process) {
+		ScopedLock l(syncher);
+		vector<Callback> actions;
+		bool result = detachProcessUnlocked(process, actions);
+		fullVerifyInvariants();
+		l.unlock();
+		runAllActions(actions);
+		return result;
+	}
+
+	bool detachProcess(pid_t pid) {
+		ScopedLock l(syncher);
+		ProcessPtr process = findProcessByPid(pid, false);
+		if (process != NULL) {
+			vector<Callback> actions;
+			bool result = detachProcessUnlocked(process, actions);
+			fullVerifyInvariants();
+			l.unlock();
+			runAllActions(actions);
+			return result;
+		} else {
+			return false;
+		}
+	}
+
+	bool detachProcess(const string &gupid) {
+		ScopedLock l(syncher);
+		ProcessPtr process = findProcessByGupid(gupid, false);
+		if (process != NULL) {
+			vector<Callback> actions;
+			bool result = detachProcessUnlocked(process, actions);
+			fullVerifyInvariants();
+			l.unlock();
+			runAllActions(actions);
+			return result;
+		} else {
+			return false;
+		}
+	}
+
+	DisableResult disableProcess(const string &gupid) {
+		ScopedLock l(syncher);
+		ProcessPtr process = findProcessByGupid(gupid, false);
+		if (process != NULL) {
+			GroupPtr group = process->getGroup();
+			// Must be a shared_ptr to be interruption-safe.
+			shared_ptr<DisableWaitTicket> ticket = make_shared<DisableWaitTicket>();
+			DisableResult result = group->disable(process,
+				boost::bind(syncDisableProcessCallback, _1, _2, ticket));
+			group->verifyInvariants();
+			group->verifyExpensiveInvariants();
+			if (result == DR_DEFERRED) {
+				l.unlock();
+				ScopedLock l2(ticket->syncher);
+				while (!ticket->done) {
+					ticket->cond.wait(l2);
+				}
+				return ticket->result;
+			} else {
+				return result;
+			}
+		} else {
+			return DR_NOOP;
+		}
+	}
+
+	unsigned int restartGroupsByAppRoot(const string &appRoot) {
+		ScopedLock l(syncher);
+		SuperGroupMap::iterator sg_it, sg_end = superGroups.end();
+		unsigned int result = 0;
+
+		for (sg_it = superGroups.begin(); sg_it != sg_end; sg_it++) {
+			const SuperGroupPtr &superGroup = sg_it->second;
+			foreach (const GroupPtr &group, superGroup->groups) {
+				if (group->options.appRoot == appRoot) {
+					result++;
+					if (!group->restarting()) {
+						group->restart(group->options);
+					}
+				}
+			}
+		}
+
+		return result;
+	}
+
+	unsigned int restartSuperGroupsByAppRoot(const string &appRoot) {
+		ScopedLock l(syncher);
+		SuperGroupMap::iterator sg_it, sg_end = superGroups.end();
+		unsigned int result = 0;
+
+		for (sg_it = superGroups.begin(); sg_it != sg_end; sg_it++) {
+			const SuperGroupPtr &superGroup = sg_it->second;
+			if (superGroup->options.appRoot == appRoot) {
+				result++;
+				superGroup->restart(superGroup->options);
+			}
+		}
+
+		return result;
+	}
+
+	/**
+	 * Checks whether at least one process is being spawned.
+	 */
+	bool isSpawning(bool lock = true) const {
+		DynamicScopedLock l(syncher, lock);
+		SuperGroupMap::const_iterator it, end = superGroups.end();
+		for (it = superGroups.begin(); it != end; it++) {
+			foreach (GroupPtr group, it->second->groups) {
+				if (group->spawning()) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+
+	string inspect(const InspectOptions &options = InspectOptions(), bool lock = true) const {
+		DynamicScopedLock l(syncher, lock);
+		stringstream result;
+		const char *headerColor = maybeColorize(options, ANSI_COLOR_YELLOW ANSI_COLOR_BLUE_BG ANSI_COLOR_BOLD);
+		const char *resetColor  = maybeColorize(options, ANSI_COLOR_RESET);
+		
+		result << headerColor << "----------- General information -----------" << resetColor << endl;
+		result << "Max pool size : " << max << endl;
+		result << "Processes     : " << getProcessCount(false) << endl;
+		result << "Requests in top-level queue : " << getWaitlist.size() << endl;
+		if (options.verbose) {
+			unsigned int i = 0;
+			foreach (const GetWaiter &waiter, getWaitlist) {
+				result << "  " << i << ": " << waiter.options.getAppGroupName() << endl;
+				i++;
+			}
+		}
+		result << endl;
+		
+		result << headerColor << "----------- Application groups -----------" << resetColor << endl;
+		SuperGroupMap::const_iterator sg_it, sg_end = superGroups.end();
+		for (sg_it = superGroups.begin(); sg_it != sg_end; sg_it++) {
+			const SuperGroupPtr &superGroup = sg_it->second;
+			const Group *group = superGroup->defaultGroup;
+			ProcessList::const_iterator p_it;
+			
+			if (group != NULL) {
+				result << group->name << ":" << endl;
+				result << "  App root: " << group->options.appRoot << endl;
+				if (group->restarting()) {
+					result << "  (restarting...)" << endl;
+				}
+				if (group->spawning()) {
+					result << "  (spawning new process...)" << endl;
+				}
+				result << "  Requests in queue: " << group->getWaitlist.size() << endl;
+				inspectProcessList(options, result, group, group->enabledProcesses);
+				inspectProcessList(options, result, group, group->disablingProcesses);
+				inspectProcessList(options, result, group, group->disabledProcesses);
+				inspectProcessList(options, result, group, group->detachedProcesses);
+				result << endl;
+			}
+		}
+		return result.str();
+	}
+
+	string toXml(bool includeSecrets = true, bool lock = true) const {
+		DynamicScopedLock l(syncher, lock);
+		stringstream result;
+		SuperGroupMap::const_iterator sg_it;
+		vector<GroupPtr>::const_iterator g_it;
+		ProcessList::const_iterator p_it;
+
+		result << "<?xml version=\"1.0\" encoding=\"iso8859-1\" ?>\n";
+		result << "<info version=\"2\">";
+		
+		result << "<process_count>" << getProcessCount(false) << "</process_count>";
+		result << "<max>" << max << "</max>";
+		result << "<utilization>" << utilization(false) << "</utilization>";
+		result << "<get_wait_list_size>" << getWaitlist.size() << "</get_wait_list_size>";
+
+		if (includeSecrets) {
+			vector<GetWaiter>::const_iterator w_it, w_end = getWaitlist.end();
+
+			result << "<get_wait_list>";
+			for (w_it = getWaitlist.begin(); w_it != w_end; w_it++) {
+				const GetWaiter &waiter = *w_it;
+				result << "<item>";
+				result << "<app_group_name>" << escapeForXml(waiter.options.getAppGroupName()) << "</app_group_name>";
+				result << "</item>";
+			}
+			result << "</get_wait_list>";
+		}
+		
+		result << "<supergroups>";
+		for (sg_it = superGroups.begin(); sg_it != superGroups.end(); sg_it++) {
+			const SuperGroupPtr &superGroup = sg_it->second;
+
+			result << "<supergroup>";
+			result << "<name>" << escapeForXml(superGroup->name) << "</name>";
+			result << "<state>" << superGroup->getStateName() << "</state>";
+			result << "<get_wait_list_size>" << superGroup->getWaitlist.size() << "</get_wait_list_size>";
+			result << "<utilization>" << superGroup->utilization() << "</utilization>";
+			if (includeSecrets) {
+				result << "<secret>" << escapeForXml(superGroup->secret) << "</secret>";
+			}
+
+			for (g_it = superGroup->groups.begin(); g_it != superGroup->groups.end(); g_it++) {
+				const GroupPtr &group = *g_it;
+
+				if (group->componentInfo.isDefault) {
+					result << "<group default=\"true\">";
+				} else {
+					result << "<group>";
+				}
+				group->inspectXml(result, includeSecrets);
+				result << "</group>";
+			}
+			result << "</supergroup>";
+		}
+		result << "</supergroups>";
+
+		result << "</info>";
+		return result.str();
+	}
+};
+
+
+} // namespace ApplicationPool2
+} // namespace Passenger
+
+#endif /* _PASSENGER_APPLICATION_POOL2_POOL_H_ */
diff --git a/ext/common/ApplicationPool2/Process.h b/ext/common/ApplicationPool2/Process.h
new file mode 100644
index 0000000..6e6148b
--- /dev/null
+++ b/ext/common/ApplicationPool2/Process.h
@@ -0,0 +1,621 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_APPLICATION_POOL_PROCESS_H_
+#define _PASSENGER_APPLICATION_POOL_PROCESS_H_
+
+#include <string>
+#include <list>
+#include <boost/shared_ptr.hpp>
+#include <boost/make_shared.hpp>
+#include <oxt/system_calls.hpp>
+#include <oxt/macros.hpp>
+#include <sys/types.h>
+#include <cstdio>
+#include <climits>
+#include <cassert>
+#include <ApplicationPool2/Common.h>
+#include <ApplicationPool2/Socket.h>
+#include <ApplicationPool2/Session.h>
+#include <ApplicationPool2/PipeWatcher.h>
+#include <Constants.h>
+#include <FileDescriptor.h>
+#include <SafeLibev.h>
+#include <Logging.h>
+#include <Utils/PriorityQueue.h>
+#include <Utils/SystemTime.h>
+#include <Utils/StrIntUtils.h>
+#include <Utils/ProcessMetricsCollector.h>
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace std;
+using namespace boost;
+
+
+class ProcessList: public list<ProcessPtr> {
+public:
+	ProcessPtr &get(unsigned int index) {
+		iterator it = begin(), end = this->end();
+		unsigned int i = 0;
+		while (i != index && it != end) {
+			i++;
+			it++;
+		}
+		if (it == end) {
+			throw RuntimeException("Index out of bounds");
+		} else {
+			return *it;
+		}
+	}
+	
+	ProcessPtr &operator[](unsigned int index) {
+		return get(index);
+	}
+	
+	iterator last_iterator() {
+		if (empty()) {
+			return end();
+		} else {
+			iterator last = end();
+			last--;
+			return last;
+		}
+	}
+};
+
+/**
+ * Represents an application process, as spawned by a Spawner. Every Process has
+ * a PID, an admin socket and a list of sockets on which it listens for
+ * connections. A Process is usually contained inside a Group.
+ *
+ * The admin socket, an anonymous Unix domain socket, is mapped to the process's
+ * STDIN and STDOUT and has two functions.
+ *
+ *  1. It acts as the main communication channel with the process. Commands are
+ *     sent to and responses are received from it.
+ *  2. It's used for garbage collection: closing the STDIN part causes the process
+ *     to gracefully terminate itself.
+ *
+ * Except for the otherwise documented parts, this class is not thread-safe,
+ * so only use within the Pool lock.
+ *
+ * ## Normal usage
+ *
+ *  1. Create a session with newSession().
+ *  2. Initiate the session by calling initiate() on it.
+ *  3. Perform I/O through session->fd().
+ *  4. When done, close the session by calling close() on it.
+ *  5. Call process.sessionClosed().
+ *
+ * ## Life time
+ *
+ * A Process object lives until the containing Group calls `detach(process)`,
+ * which indicates that it wants this Process to should down. This causes
+ * the Process to enter the `detached() == true` state. Processes in this
+ * state are stored in the `detachedProcesses` collection in the Group and
+ * are no longer eligible for receiving requests. They will be removed from
+ * the Group and destroyed when all of the following applies:
+ * 
+ *  1. the OS process is gone.
+ *  2. `sessions == 0`
+ *
+ * This means that a Group outlives all its Processes, a Process outlives all
+ * its Sessions, and a Process also outlives the OS process.
+ */
+class Process: public enable_shared_from_this<Process> {
+private:
+	friend class Group;
+	
+	/** A mutex to protect access to `lifeStatus`. */
+	mutable boost::mutex lifetimeSyncher;
+
+	/** Group inside the Pool that this Process belongs to.
+	 * Should never be NULL because a Group should outlive all of its Processes.
+	 * Read-only; only set once during initialization.
+	 */
+	weak_ptr<Group> group;
+	
+	/** A subset of 'sockets': all sockets that speak the
+	 * "session" protocol, sorted by socket.utilization(). */
+	PriorityQueue<Socket> sessionSockets;
+	
+	/** The iterator inside the associated Group's process list. */
+	ProcessList::iterator it;
+	/** The handle inside the associated Group's process priority queue. */
+	PriorityQueue<Process>::Handle pqHandle;
+
+	void indexSessionSockets() {
+		SocketList::iterator it;
+		concurrency = 0;
+		for (it = sockets->begin(); it != sockets->end(); it++) {
+			Socket *socket = &(*it);
+			if (socket->protocol == "session" || socket->protocol == "http_session") {
+				socket->pqHandle = sessionSockets.push(socket, socket->utilization());
+				if (concurrency != -1) {
+					if (socket->concurrency == 0) {
+						// If one of the sockets has a concurrency of
+						// 0 (unlimited) then we mark this entire Process
+						// as having a concurrency of 0.
+						concurrency = -1;
+					} else {
+						concurrency += socket->concurrency;
+					}
+				}
+			}
+		}
+		if (concurrency == -1) {
+			concurrency = 0;
+		}
+	}
+	
+public:
+	/*************************************************************
+	 * Read-only fields, set once during initialization and never
+	 * written to again. Reading is thread-safe.
+	 *************************************************************/
+	
+	/** The libev event loop to use. */
+	SafeLibev * const libev;
+	/** Process PID. */
+	pid_t pid;
+	/** UUID for this process, randomly generated and will never appear again. */
+	string gupid;
+	string connectPassword;
+	/** Admin socket, see class description. */
+	FileDescriptor adminSocket;
+	/** The sockets that this Process listens on for connections. */
+	SocketListPtr sockets;
+	/** Time at which the Spawner that created this process was created.
+	 * Microseconds resolution. */
+	unsigned long long spawnerCreationTime;
+	/** Time at which we started spawning this process. Microseconds resolution. */
+	unsigned long long spawnStartTime;
+	/** The maximum amount of concurrent sessions this process can handle.
+	 * 0 means unlimited. */
+	int concurrency;
+	/** If true, then indicates that this Process does not refer to a real OS
+	 * process. The sockets in the socket list are fake and need not be deleted,
+	 * the admin socket need not be closed, etc.
+	 */
+	bool dummy;
+	/** Whether it is required that triggerShutdown() and cleanup() must be called
+	 * before destroying this Process. Normally true, except for dummy Process
+	 * objects created by Pool::asyncGet() with options.noop == true, because those
+	 * processes are never added to Group.enabledProcesses.
+	 */
+	bool requiresShutdown;
+	
+	/*************************************************************
+	 * Information used by Pool. Do not write to these from
+	 * outside the Pool. If you read these make sure the Pool
+	 * isn't concurrently modifying.
+	 *************************************************************/
+	
+	/** Time at which we finished spawning this process, i.e. when this
+	 * process was finished initializing. Microseconds resolution.
+	 */
+	unsigned long long spawnEndTime;
+	/** Last time when a session was opened for this Process. */
+	unsigned long long lastUsed;
+	/** Number of sessions currently open.
+	 * @invariant session >= 0
+	 */
+	int sessions;
+	/** Number of sessions opened so far. */
+	unsigned int processed;
+	/** Do not access directly, always use `isAlive()`/`isDead()`/`getLifeStatus()` or
+	 * through `lifetimeSyncher`. */
+	enum LifeStatus {
+		/** Up and operational. */
+		ALIVE,
+		/** This process has been detached, and the detached processes checker has
+		 * verified that there are no active sessions left and has told the process
+		 * to shut down. In this state we're supposed to wait until the process
+		 * has actually shutdown, after which cleanup() must be called. */
+		SHUTDOWN_TRIGGERED,
+		/**
+		 * The process has exited and cleanup() has been called. In this state,
+		 * this object is no longer usable.
+		 */
+		DEAD
+	} lifeStatus;
+	enum EnabledStatus {
+		/** Up and operational. */
+		ENABLED,
+		/** Process is being disabled. The containing Group is waiting for
+		 * all sessions on this Process to finish. It may in some corner
+		 * cases still be selected for processing requests.
+		 */
+		DISABLING,
+		/** Process is fully disabled and should not be handling any
+		 * requests. It *may* still handle some requests, e.g. by
+		 * the Out-of-Band-Work trigger.
+		 */
+		DISABLED,
+		/**
+		 * Process has been detached. It will be removed from the Group
+		 * as soon we have detected that the OS process has exited. Detached
+		 * processes are allowed to finish their requests, but are not
+		 * eligible for new requests.
+		 */
+		DETACHED
+	} enabled;
+	enum OobwStatus {
+		/** Process is not using out-of-band work. */
+		OOBW_NOT_ACTIVE,
+		/** The process has requested out-of-band work. At some point, the code
+		 * will see this and set the status to OOBW_IN_PROGRESS. */
+		OOBW_REQUESTED,
+		/** An out-of-band work is in progress. We need to wait until all
+		 * sessions have ended and the process has been disabled before the
+		 * out-of-band work can be performed. */
+		OOBW_IN_PROGRESS,
+	} oobwStatus;
+	/** Caches whether or not the OS process still exists. */
+	mutable bool m_osProcessExists;
+	/** Time at which shutdown began. */
+	time_t shutdownStartTime;
+	/** Collected by Pool::collectAnalytics(). */
+	ProcessMetrics metrics;
+	
+	Process(const SafeLibevPtr _libev,
+		pid_t _pid,
+		const string &_gupid,
+		const string &_connectPassword,
+		const FileDescriptor &_adminSocket,
+		/** Pipe on which this process outputs errors. Mapped to the process's STDERR.
+		 * Only Processes spawned by DirectSpawner have this set.
+		 * SmartSpawner-spawned Processes use the same STDERR as their parent preloader processes.
+		 */
+		const FileDescriptor &_errorPipe,
+		const SocketListPtr &_sockets,
+		unsigned long long _spawnerCreationTime,
+		unsigned long long _spawnStartTime,
+		const SpawnerConfigPtr &_config = SpawnerConfigPtr())
+		: pqHandle(NULL),
+		  libev(_libev.get()),
+		  pid(_pid),
+		  gupid(_gupid),
+		  connectPassword(_connectPassword),
+		  adminSocket(_adminSocket),
+		  sockets(_sockets),
+		  spawnerCreationTime(_spawnerCreationTime),
+		  spawnStartTime(_spawnStartTime),
+		  concurrency(0),
+		  dummy(false),
+		  requiresShutdown(true),
+		  sessions(0),
+		  processed(0),
+		  lifeStatus(ALIVE),
+		  enabled(ENABLED),
+		  oobwStatus(OOBW_NOT_ACTIVE),
+		  m_osProcessExists(true),
+		  shutdownStartTime(0)
+	{
+		SpawnerConfigPtr config;
+		if (_config == NULL) {
+			config = make_shared<SpawnerConfig>();
+		} else {
+			config = _config;
+		}
+
+		if (_adminSocket != -1) {
+			PipeWatcherPtr watcher = make_shared<PipeWatcher>(_adminSocket,
+				"stdout", pid, config->forwardStdout);
+			watcher->initialize();
+			watcher->start();
+		}
+		if (_errorPipe != -1) {
+			PipeWatcherPtr watcher = make_shared<PipeWatcher>(_errorPipe,
+				"stderr", pid, config->forwardStderr);
+			watcher->initialize();
+			watcher->start();
+		}
+		
+		if (OXT_LIKELY(sockets != NULL)) {
+			indexSessionSockets();
+		}
+		
+		lastUsed      = SystemTime::getUsec();
+		spawnEndTime  = lastUsed;
+	}
+	
+	~Process() {
+		if (OXT_UNLIKELY(!isDead() && requiresShutdown)) {
+			P_BUG("You must call Process::triggerShutdown() and Process::cleanup() before actually "
+				"destroying the Process object.");
+		}
+	}
+
+	static void forceTriggerShutdownAndCleanup(ProcessPtr process) {
+		if (process != NULL) {
+			process->triggerShutdown();
+			// Pretend like the OS process has exited so
+			// that the canCleanup() precondition is true.
+			process->m_osProcessExists = false;
+			process->cleanup();
+		}
+	}
+
+	/**
+	 * Thread-safe.
+	 * @pre getLifeState() != SHUT_DOWN
+	 * @post result != NULL
+	 */
+	const GroupPtr getGroup() const {
+		assert(!isDead());
+		return group.lock();
+	}
+	
+	void setGroup(const GroupPtr &group) {
+		assert(this->group.lock() == NULL || this->group.lock() == group);
+		this->group = group;
+	}
+
+	/**
+	 * Thread-safe.
+	 * @pre getLifeState() != DEAD
+	 * @post result != NULL
+	 */
+	SuperGroupPtr getSuperGroup() const;
+
+	// Thread-safe.
+	bool isAlive() const {
+		boost::lock_guard<boost::mutex> lock(lifetimeSyncher);
+		return lifeStatus == ALIVE;
+	}
+
+	// Thread-safe.
+	bool hasTriggeredShutdown() const {
+		boost::lock_guard<boost::mutex> lock(lifetimeSyncher);
+		return lifeStatus == SHUTDOWN_TRIGGERED;
+	}
+
+	// Thread-safe.
+	bool isDead() const {
+		boost::lock_guard<boost::mutex> lock(lifetimeSyncher);
+		return lifeStatus == DEAD;
+	}
+
+	// Thread-safe.
+	LifeStatus getLifeStatus() const {
+		boost::lock_guard<boost::mutex> lock(lifetimeSyncher);
+		return lifeStatus;
+	}
+
+	bool canTriggerShutdown() const {
+		return getLifeStatus() == ALIVE && sessions == 0;
+	}
+
+	void triggerShutdown() {
+		assert(canTriggerShutdown());
+		{
+			boost::lock_guard<boost::mutex> lock(lifetimeSyncher);
+			assert(lifeStatus == ALIVE);
+			lifeStatus = SHUTDOWN_TRIGGERED;
+			shutdownStartTime = SystemTime::get();
+		}
+		if (!dummy) {
+			syscalls::shutdown(adminSocket, SHUT_WR);
+		}
+	}
+
+	bool shutdownTimeoutExpired() const {
+		return SystemTime::get() >= shutdownStartTime + PROCESS_SHUTDOWN_TIMEOUT;
+	}
+
+	bool canCleanup() const {
+		return getLifeStatus() == SHUTDOWN_TRIGGERED && !osProcessExists();
+	}
+
+	void cleanup() {
+		assert(canCleanup());
+
+		P_TRACE(2, "Cleaning up process " << inspect());
+		if (!dummy) {
+			if (OXT_LIKELY(sockets != NULL)) {
+				SocketList::const_iterator it, end = sockets->end();
+				for (it = sockets->begin(); it != end; it++) {
+					if (getSocketAddressType(it->address) == SAT_UNIX) {
+						string filename = parseUnixSocketAddress(it->address);
+						syscalls::unlink(filename.c_str());
+					}
+				}
+			}
+		}
+
+		boost::lock_guard<boost::mutex> lock(lifetimeSyncher);
+		lifeStatus = DEAD;
+	}
+
+	/** Checks whether the OS process exists.
+	 * Once it has been detected that it doesn't, that event is remembered
+	 * so that we don't accidentally ping any new processes that have the
+	 * same PID.
+	 */
+	bool osProcessExists() const {
+		if (!dummy && m_osProcessExists) {
+			// Once we detect that a process is gone.
+			m_osProcessExists = syscalls::kill(pid, 0) == 0 || errno != ESRCH;
+			return m_osProcessExists;
+		} else {
+			return false;
+		}
+	}
+	
+	int utilization() const {
+		/* Different processes within a Group may have different
+		 * 'concurrency' values. We want:
+		 * - Group.pqueue to sort the processes from least used to most used.
+		 * - to give processes with concurrency == 0 more priority over processes
+		 *   with concurrency > 0.
+		 * Therefore, we describe our utilization as a percentage of 'concurrency', with
+		 * the percentage value in [0..INT_MAX] instead of [0..1].
+		 */
+		if (concurrency == 0) {
+			// Allows Group.pqueue to give idle sockets more priority.
+			if (sessions == 0) {
+				return 0;
+			} else {
+				return 1;
+			}
+		} else {
+			return (int) (((long long) sessions * INT_MAX) / (double) concurrency);
+		}
+	}
+	
+	// TODO: remove this
+	bool atFullCapacity() const {
+		return atFullUtilization();
+	}
+
+	bool atFullUtilization() const {
+		return concurrency != 0 && sessions >= concurrency;
+	}
+	
+	/**
+	 * Create a new communication session with this process. This will connect to one
+	 * of the session sockets or reuse an existing connection. See Session for
+	 * more information about sessions.
+	 *
+	 * One SHOULD call sessionClosed() when one's done with the session.
+	 * Failure to do so will mess up internal statistics but will otherwise
+	 * not result in any harmful behavior.
+	 */
+	SessionPtr newSession() {
+		Socket *socket = sessionSockets.pop();
+		if (socket->atFullCapacity()) {
+			return SessionPtr();
+		} else {
+			socket->sessions++;
+			this->sessions++;
+			processed++;
+			socket->pqHandle = sessionSockets.push(socket, socket->utilization());
+			lastUsed = SystemTime::getUsec();
+			return make_shared<Session>(shared_from_this(), socket);
+		}
+	}
+	
+	void sessionClosed(Session *session) {
+		Socket *socket = session->getSocket();
+		
+		assert(socket->sessions > 0);
+		assert(sessions > 0);
+		
+		socket->sessions--;
+		this->sessions--;
+		sessionSockets.decrease(socket->pqHandle, socket->utilization());
+		assert(!atFullUtilization());
+	}
+
+	/**
+	 * Returns the uptime of this process so far, as a string.
+	 */
+	string uptime() const {
+		return distanceOfTimeInWords(spawnEndTime / 1000000);
+	}
+
+	string inspect() const;
+
+	template<typename Stream>
+	void inspectXml(Stream &stream, bool includeSockets = true) const {
+		stream << "<pid>" << pid << "</pid>";
+		stream << "<gupid>" << gupid << "</gupid>";
+		stream << "<connect_password>" << connectPassword << "</connect_password>";
+		stream << "<concurrency>" << concurrency << "</concurrency>";
+		stream << "<sessions>" << sessions << "</sessions>";
+		stream << "<utilization>" << utilization() << "</utilization>";
+		stream << "<processed>" << processed << "</processed>";
+		stream << "<spawner_creation_time>" << spawnerCreationTime << "</spawner_creation_time>";
+		stream << "<spawn_start_time>" << spawnStartTime << "</spawn_start_time>";
+		stream << "<spawn_end_time>" << spawnEndTime << "</spawn_end_time>";
+		stream << "<last_used>" << lastUsed << "</last_used>";
+		stream << "<uptime>" << uptime() << "</uptime>";
+		switch (lifeStatus) {
+		case ALIVE:
+			stream << "<life_status>ALIVE</life_status>";
+			break;
+		case SHUTDOWN_TRIGGERED:
+			stream << "<life_status>SHUTDOWN_TRIGGERED</life_status>";
+			break;
+		case DEAD:
+			stream << "<life_status>DEAD</life_status>";
+			break;
+		default:
+			P_BUG("Unknown 'lifeStatus' state " << (int) lifeStatus);
+		}
+		switch (enabled) {
+		case ENABLED:
+			stream << "<enabled>ENABLED</enabled>";
+			break;
+		case DISABLING:
+			stream << "<enabled>DISABLING</enabled>";
+			break;
+		case DISABLED:
+			stream << "<enabled>DISABLED</enabled>";
+			break;
+		case DETACHED:
+			stream << "<enabled>DETACHED</enabled>";
+			break;
+		default:
+			P_BUG("Unknown 'enabled' state " << (int) enabled);
+		}
+		if (metrics.isValid()) {
+			stream << "<has_metrics>true</has_metrics>";
+			stream << "<cpu>" << (int) metrics.cpu << "</cpu>";
+			stream << "<rss>" << metrics.rss << "</rss>";
+			stream << "<pss>" << metrics.pss << "</pss>";
+			stream << "<private_dirty>" << metrics.privateDirty << "</private_dirty>";
+			stream << "<swap>" << metrics.swap << "</swap>";
+			stream << "<real_memory>" << metrics.realMemory() << "</real_memory>";
+			stream << "<vmsize>" << metrics.vmsize << "</vmsize>";
+			stream << "<process_group_id>" << metrics.processGroupId << "</process_group_id>";
+			stream << "<command>" << escapeForXml(metrics.command) << "</command>";
+		}
+		if (includeSockets) {
+			SocketList::const_iterator it;
+
+			stream << "<sockets>";
+			for (it = sockets->begin(); it != sockets->end(); it++) {
+				const Socket &socket = *it;
+				stream << "<socket>";
+				stream << "<name>" << escapeForXml(socket.name) << "</name>";
+				stream << "<address>" << escapeForXml(socket.address) << "</address>";
+				stream << "<protocol>" << escapeForXml(socket.protocol) << "</protocol>";
+				stream << "<concurrency>" << socket.concurrency << "</concurrency>";
+				stream << "<sessions>" << socket.sessions << "</sessions>";
+				stream << "</socket>";
+			}
+			stream << "</sockets>";
+		}
+	}
+};
+
+
+} // namespace ApplicationPool2
+} // namespace Passenger
+
+#endif /* _PASSENGER_APPLICATION_POOL2_PROCESS_H_ */
diff --git a/ext/common/ApplicationPool2/README.md b/ext/common/ApplicationPool2/README.md
new file mode 100644
index 0000000..c5eaf77
--- /dev/null
+++ b/ext/common/ApplicationPool2/README.md
@@ -0,0 +1,96 @@
+# Overview
+
+ApplicationPool2 is a subsystem in Phusion Passenger that takes care of
+dynamically calculating how many processes are needed, spawning application
+processes, shutting down processes, restarting processes, forwarding requests to
+the right process, etc. Pretty much all important application process management
+is encapculated in this subsystem.
+
+It does not handle the actual request/response I/O with the application
+processes: that's left to the caller of the ApplicationPool2 subsystem.
+
+Here's a quick rundown of the available classes:
+
+ * Pool
+   This is the core of the subsystem. It contains high-level process management
+   logic but not the low-level details of spawning processes. The code is
+   further divided into the following classes, each of which contain the core
+   code managing its respective domain:
+   * SuperGroup
+     A logical collection of different applications. Can contain one or more
+     Groups. In the current version of Phusion Passenger, a SuperGroup only
+     contains exactly 1 Group.
+   * Group
+     Represents an application and can contains multiple processes, all
+     belonging to the same application.
+   * Process
+     Represents an OS process; an instance of a certain application. A process
+     may have multiple server sockets on which it listens. This is represented
+     by the `Socket` class:
+     * Socket
+
+ * Spawner
+   Encapsulates all low-level process spawning logic. Pool calls Spawner
+   whenever it needs to spawn another application process.
+
+   Spawner is an interface. There are multiple implementations that all
+   spawn processes in a different way. These are:
+   * DirectSpawner
+   * SmartSpawner
+   * DummySpawner
+
+   The spawn method is user-configurable. To avoid convoluting the Pool code
+   with spawner implementation selection logic, we have:
+   * SpawnerFactory
+
+ * Session
+   A session represents a single interaction with an application process, e.g.
+   a single request/response session.
+
+ * Options
+   A configuration object for the Pool::get() method.
+
+The `Pool` class's `get` method is the main interface into the ApplicationPool2
+subsystem. When an HTTP request comes in, call `Pool::get()` with the
+appropriate arguments, and it will automatically spawn a process for you when
+needed, open a session with that process and give you the session object.
+
+
+## Threading notes
+
+ApplicationPool2 depends on an event loop for handling timers and I/O. The I/O
+that it handles is not the request/response I/O with application processes, but
+things like forwarding the processes' stderr output to our stderr. In order not
+to block the event loop with long-running operations, it uses a lot of
+background threads. ApplicationPool2 is designed to be entirely thread-safe.
+That said, if one's not careful, one may cause deadlocks, so read this section
+carefully.
+
+* Many Spawner methods are blocking because they wait for a subprocess to do
+  something (initializing, shutting down, etc). The process may output I/O
+  which is supposed to be handled by the main loop. If the event loop is blocked
+  on waiting for the process, and the process is blocked on a write() to the I/O
+  channel, then we have a deadlock. Therefore Spawner methods (including the
+  Spawner destructor) must always be called outside the event loop thread, and
+  the event loop must be available while the Spawner is doing its work. The only
+  exceptions are Spawner methods which are explicitly documented as not
+  depending on the event loop.
+
+  Pool must only call Spawner methods from background threads. There's still a
+  caveat though: Pool's destructor waits for all background threads to finish.
+  Therefore one must not destroy Pool from the event loop. Instead, I recommend
+  running the event loop in a separate thread, destroy Pool from the main
+  thread, and stop the event loop after Pool is destroyed.
+
+  Calling other Pool methods from the event loop is ok. Calling SpawnerFactory
+  from the event loop is ok.
+
+* Many classes contain libev watchers and unregisters them in their destructor.
+  In order for this unregistration to succeed, one of the following conditions
+  must hold:
+  1. The destructor is called from the event loop.
+  2. The destructor is not called from the event loop, but the event loop is
+     still running.
+
+  Therefore I recommend that you destroy all ApplicationPool2-related objects
+  before stopping the event loop thread.
diff --git a/ext/common/ApplicationPool2/Session.h b/ext/common/ApplicationPool2/Session.h
new file mode 100644
index 0000000..ef35e95
--- /dev/null
+++ b/ext/common/ApplicationPool2/Session.h
@@ -0,0 +1,171 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_APPLICATION_POOL_SESSION_H_
+#define _PASSENGER_APPLICATION_POOL_SESSION_H_
+
+#include <sys/types.h>
+#include <boost/shared_ptr.hpp>
+#include <oxt/macros.hpp>
+#include <oxt/system_calls.hpp>
+#include <oxt/backtrace.hpp>
+#include <ApplicationPool2/Common.h>
+#include <ApplicationPool2/Socket.h>
+#include <FileDescriptor.h>
+#include <Utils/ScopeGuard.h>
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace oxt;
+
+
+/**
+ * Represents a communication session with a process. A communication session
+ * within Phusion Passenger is usually a single request + response but the API
+ * allows arbitrary I/O. See Process's class overview for normal usage of Session.
+ *
+ * Not thread-safe, but Pool's and Process's API encourage that
+ * a Session is only used by 1 thread and then thrown away.
+ */
+class Session {
+public:
+	typedef void (*Callback)(Session *session);
+
+private:
+	ProcessPtr process;
+	/** Socket to use for this session. Guaranteed to be alive thanks to the 'process' reference. */
+	Socket *socket;
+	
+	Connection connection;
+	FileDescriptor theFd;
+	bool closed;
+	
+	void deinitiate(bool success) {
+		connection.fail = !success;
+		socket->checkinConnection(connection);
+		connection.fd = -1;
+		theFd = FileDescriptor();
+	}
+
+	void callOnInitiateFailure() {
+		if (OXT_LIKELY(onInitiateFailure != NULL)) {
+			onInitiateFailure(this);
+		}
+	}
+	
+	void callOnClose() {
+		if (OXT_LIKELY(onClose != NULL)) {
+			onClose(this);
+		}
+		closed = true;
+	}
+
+public:
+	Callback onInitiateFailure;
+	Callback onClose;
+	
+	Session(const ProcessPtr &_process, Socket *_socket)
+		: process(_process),
+		  socket(_socket),
+		  closed(false),
+		  onInitiateFailure(NULL),
+		  onClose(NULL)
+		{ }
+	
+	~Session() {
+		TRACE_POINT();
+		// If user doesn't close() explicitly, we penalize performance.
+		if (OXT_LIKELY(initiated())) {
+			deinitiate(false);
+		}
+		if (OXT_LIKELY(!closed)) {
+			callOnClose();
+		}
+	}
+
+	const string &getConnectPassword() const;
+	pid_t getPid() const;
+	const string &getGupid() const;
+	const GroupPtr getGroup() const;
+	void requestOOBW();
+	
+	bool isClosed() const {
+		return closed;
+	}
+
+	/**
+	 * @pre !isClosed()
+	 * @post result != NULL
+	 */
+	const ProcessPtr &getProcess() const {
+		assert(!closed);
+		return process;
+	}
+	
+	Socket *getSocket() const {
+		return socket;
+	}
+
+	const string &getProtocol() const {
+		return socket->protocol;
+	}
+	
+	void initiate() {
+		assert(!closed);
+		ScopeGuard g(boost::bind(&Session::callOnInitiateFailure, this));
+		connection = socket->checkoutConnection();
+		connection.fail = true;
+		theFd = FileDescriptor(connection.fd, false);
+		g.clear();
+	}
+	
+	bool initiated() const {
+		return connection.fd != -1;
+	}
+	
+	const FileDescriptor &fd() const {
+		return theFd;
+	}
+	
+	/**
+	 * This Session object becomes fully unsable after closing.
+	 */
+	void close(bool success) {
+		if (OXT_LIKELY(initiated())) {
+			deinitiate(success);
+		}
+		if (OXT_LIKELY(!closed)) {
+			callOnClose();
+		}
+	}
+};
+
+typedef shared_ptr<Session> SessionPtr;
+
+
+} // namespace ApplicationPool2
+} // namespace Passenger
+
+#endif /* _PASSENGER_APPLICATION_POOL2_SESSION_H_ */
diff --git a/ext/common/ApplicationPool2/SmartSpawner.h b/ext/common/ApplicationPool2/SmartSpawner.h
new file mode 100644
index 0000000..86e4ac3
--- /dev/null
+++ b/ext/common/ApplicationPool2/SmartSpawner.h
@@ -0,0 +1,804 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_APPLICATION_POOL2_SMART_SPAWNER_H_
+#define _PASSENGER_APPLICATION_POOL2_SMART_SPAWNER_H_
+
+#include <ApplicationPool2/Spawner.h>
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+
+class SmartSpawner: public Spawner, public enable_shared_from_this<SmartSpawner> {
+private:
+	/**
+	 * Structure containing arguments and working state for negotiating
+	 * the preloader startup protocol.
+	 */
+	struct StartupDetails {
+		/****** Arguments ******/
+		pid_t pid;
+		FileDescriptor adminSocket;
+		BufferedIO io;
+		BackgroundIOCapturerPtr stderrCapturer;
+		DebugDirPtr debugDir;
+		const Options *options;
+		bool forwardStderr;
+		int forwardStderrTo;
+
+		/****** Working state ******/
+		unsigned long long timeout;
+
+		StartupDetails() {
+			options = NULL;
+			forwardStderr = false;
+			forwardStderrTo = STDERR_FILENO;
+			timeout = 0;
+		}
+	};
+
+	struct SpawnResult {
+		pid_t pid;
+		FileDescriptor adminSocket;
+		BufferedIO io;
+	};
+
+	/** The event loop that created Process objects should use, and that I/O forwarding
+	 * functions should use. For example data on the error pipe is forwarded using this event loop.
+	 */
+	SafeLibevPtr libev;
+	const vector<string> preloaderCommand;
+	map<string, string> preloaderAnnotations;
+	Options options;
+	
+	// Protects m_lastUsed and pid.
+	mutable boost::mutex simpleFieldSyncher;
+	// Protects everything else.
+	mutable boost::mutex syncher;
+
+	// Preloader information.
+	pid_t pid;
+	FileDescriptor adminSocket;
+	string socketAddress;
+	unsigned long long m_lastUsed;
+	// Upon starting the preloader, its preparation info is stored here
+	// for future reference.
+	SpawnPreparationInfo preparation;
+	
+	string getPreloaderCommandString() const {
+		string result;
+		unsigned int i;
+		
+		for (i = 0; i < preloaderCommand.size(); i++) {
+			if (i != 0) {
+				result.append(1, '\0');
+			}
+			result.append(preloaderCommand[i]);
+		}
+		return result;
+	}
+	
+	vector<string> createRealPreloaderCommand(const Options &options,
+		shared_array<const char *> &args)
+	{
+		string agentsDir = resourceLocator.getAgentsDir();
+		vector<string> command;
+		
+		if (shouldLoadShellEnvvars(options, preparation)) {
+			command.push_back(preparation.shell);
+			command.push_back(preparation.shell);
+			command.push_back("-lc");
+			command.push_back("exec \"$@\"");
+			command.push_back("SpawnPreparerShell");
+		} else {
+			command.push_back(agentsDir + "/SpawnPreparer");
+		}
+		command.push_back(agentsDir + "/SpawnPreparer");
+		command.push_back(preparation.appRoot);
+		command.push_back(serializeEnvvarsFromPoolOptions(options));
+		command.push_back(preloaderCommand[0]);
+		// Note: do not try to set a process title here.
+		// https://code.google.com/p/phusion-passenger/issues/detail?id=855
+		command.push_back(preloaderCommand[0]);
+		for (unsigned int i = 1; i < preloaderCommand.size(); i++) {
+			command.push_back(preloaderCommand[i]);
+		}
+		
+		createCommandArgs(command, args);
+		return command;
+	}
+	
+	void throwPreloaderSpawnException(const string &msg,
+		SpawnException::ErrorKind errorKind,
+		StartupDetails &details)
+	{
+		throwPreloaderSpawnException(msg, errorKind, details.stderrCapturer,
+			details.debugDir);
+	}
+
+	void throwPreloaderSpawnException(const string &msg,
+		SpawnException::ErrorKind errorKind,
+		BackgroundIOCapturerPtr &stderrCapturer,
+		const DebugDirPtr &debugDir)
+	{
+		TRACE_POINT();
+		// Stop the stderr capturing thread and get the captured stderr
+		// output so far.
+		string stderrOutput;
+		if (stderrCapturer != NULL) {
+			stderrOutput = stderrCapturer->stop();
+		}
+		
+		// If the exception wasn't due to a timeout, try to capture the
+		// remaining stderr output for at most 2 seconds.
+		if (errorKind != SpawnException::PRELOADER_STARTUP_TIMEOUT
+		 && errorKind != SpawnException::APP_STARTUP_TIMEOUT
+		 && stderrCapturer != NULL) {
+			bool done = false;
+			unsigned long long timeout = 2000;
+			while (!done) {
+				char buf[1024 * 32];
+				unsigned int ret;
+				
+				try {
+					ret = readExact(stderrCapturer->getFd(), buf,
+						sizeof(buf), &timeout);
+					if (ret == 0) {
+						done = true;
+					} else {
+						stderrOutput.append(buf, ret);
+					}
+				} catch (const SystemException &e) {
+					P_WARN("Stderr I/O capture error: " << e.what());
+					done = true;
+				} catch (const TimeoutException &) {
+					done = true;
+				}
+			}
+		}
+		stderrCapturer.reset();
+		
+		// Now throw SpawnException with the captured stderr output
+		// as error response.
+		SpawnException e(msg, stderrOutput, false, errorKind);
+		e.setPreloaderCommand(getPreloaderCommandString());
+		annotatePreloaderException(e, debugDir);
+		throw e;
+	}
+
+	void annotatePreloaderException(SpawnException &e, const DebugDirPtr &debugDir) {
+		if (debugDir != NULL) {
+			e.addAnnotations(debugDir->readAll());
+		}
+	}
+
+	bool preloaderStarted() const {
+		return pid != -1;
+	}
+
+	void startPreloader() {
+		TRACE_POINT();
+		this_thread::disable_interruption di;
+		this_thread::disable_syscall_interruption dsi;
+		assert(!preloaderStarted());
+		P_DEBUG("Spawning new preloader: appRoot=" << options.appRoot);
+		checkChrootDirectories(options);
+		
+		shared_array<const char *> args;
+		preparation = prepareSpawn(options);
+		vector<string> command = createRealPreloaderCommand(options, args);
+		SocketPair adminSocket = createUnixSocketPair();
+		Pipe errorPipe = createPipe();
+		DebugDirPtr debugDir = make_shared<DebugDir>(preparation.uid, preparation.gid);
+		pid_t pid;
+		
+		pid = syscalls::fork();
+		if (pid == 0) {
+			setenv("PASSENGER_DEBUG_DIR", debugDir->getPath().c_str(), 1);
+			purgeStdio(stdout);
+			purgeStdio(stderr);
+			resetSignalHandlersAndMask();
+			disableMallocDebugging();
+			int adminSocketCopy = dup2(adminSocket.first, 3);
+			int errorPipeCopy = dup2(errorPipe.second, 4);
+			dup2(adminSocketCopy, 0);
+			dup2(adminSocketCopy, 1);
+			dup2(errorPipeCopy, 2);
+			closeAllFileDescriptors(2);
+			setChroot(preparation);
+			switchUser(preparation);
+			setWorkingDirectory(preparation);
+			execvp(command[0].c_str(), (char * const *) args.get());
+			
+			int e = errno;
+			printf("!> Error\n");
+			printf("!> \n");
+			printf("Cannot execute \"%s\": %s (errno=%d)\n", command[0].c_str(),
+				strerror(e), e);
+			fprintf(stderr, "Cannot execute \"%s\": %s (errno=%d)\n",
+				command[0].c_str(), strerror(e), e);
+			fflush(stdout);
+			fflush(stderr);
+			_exit(1);
+			
+		} else if (pid == -1) {
+			int e = errno;
+			throw SystemException("Cannot fork a new process", e);
+			
+		} else {
+			ScopeGuard guard(boost::bind(nonInterruptableKillAndWaitpid, pid));
+			P_DEBUG("Preloader process forked for appRoot=" << options.appRoot << ": PID " << pid);
+			adminSocket.first.close();
+			errorPipe.second.close();
+			
+			StartupDetails details;
+			details.pid = pid;
+			details.adminSocket = adminSocket.second;
+			details.io = BufferedIO(adminSocket.second);
+			details.stderrCapturer =
+				make_shared<BackgroundIOCapturer>(
+					errorPipe.first,
+					string("[App ") + toString(pid) + " stderr] ",
+					config->forwardStderr);
+			details.stderrCapturer->start();
+			details.debugDir = debugDir;
+			details.options = &options;
+			details.timeout = options.startTimeout * 1000;
+			details.forwardStderr = config->forwardStderr;
+			
+			{
+				this_thread::restore_interruption ri(di);
+				this_thread::restore_syscall_interruption rsi(dsi);
+				socketAddress = negotiatePreloaderStartup(details);
+			}
+			this->adminSocket = adminSocket.second;
+			{
+				boost::lock_guard<boost::mutex> l(simpleFieldSyncher);
+				this->pid = pid;
+			}
+			
+			PipeWatcherPtr watcher;
+
+			watcher = make_shared<PipeWatcher>(adminSocket.second,
+				"stdout", pid, config->forwardStdout);
+			watcher->initialize();
+			watcher->start();
+
+			watcher = make_shared<PipeWatcher>(errorPipe.first,
+				"stderr", pid, config->forwardStderr);
+			watcher->initialize();
+			watcher->start();
+			
+			preloaderAnnotations = debugDir->readAll();
+			P_INFO("Preloader for " << options.appRoot <<
+				" started on PID " << pid <<
+				", listening on " << socketAddress);
+			guard.clear();
+		}
+	}
+	
+	void stopPreloader() {
+		TRACE_POINT();
+		this_thread::disable_interruption di;
+		this_thread::disable_syscall_interruption dsi;
+		
+		if (!preloaderStarted()) {
+			return;
+		}
+		syscalls::shutdown(adminSocket, SHUT_WR);
+		if (timedWaitpid(pid, NULL, 5000) == 0) {
+			P_TRACE(2, "Spawn server did not exit in time, killing it...");
+			syscalls::kill(pid, SIGKILL);
+			syscalls::waitpid(pid, NULL, 0);
+		}
+		// Delete socket after the process has exited so that it
+		// doesn't crash upon deleting a nonexistant file.
+		if (getSocketAddressType(socketAddress) == SAT_UNIX) {
+			string filename = parseUnixSocketAddress(socketAddress);
+			syscalls::unlink(filename.c_str());
+		}
+		{
+			boost::lock_guard<boost::mutex> l(simpleFieldSyncher);
+			pid = -1;
+		}
+		socketAddress.clear();
+		preparation = SpawnPreparationInfo();
+	}
+	
+	void sendStartupRequest(StartupDetails &details) {
+		TRACE_POINT();
+		try {
+			string data = "You have control 1.0\n"
+				"passenger_root: " + resourceLocator.getRoot() + "\n"
+				"ruby_libdir: " + resourceLocator.getRubyLibDir() + "\n"
+				"passenger_version: " PASSENGER_VERSION "\n"
+				"generation_dir: " + generation->getPath() + "\n";
+
+			vector<string> args;
+			vector<string>::const_iterator it, end;
+			details.options->toVector(args, resourceLocator, Options::SPAWN_OPTIONS);
+			for (it = args.begin(); it != args.end(); it++) {
+				const string &key = *it;
+				it++;
+				const string &value = *it;
+				data.append(key + ": " + value + "\n");
+			}
+
+			vector<StaticString> lines;
+			split(data, '\n', lines);
+			foreach (const StaticString line, lines) {
+				P_DEBUG("[App " << details.pid << " stdin >>] " << line);
+			}
+			writeExact(details.adminSocket, data, &details.timeout);
+			writeExact(details.adminSocket, "\n", &details.timeout);
+		} catch (const SystemException &e) {
+			if (e.code() == EPIPE) {
+				/* Ignore this. Process might have written an
+				 * error response before reading the arguments,
+				 * in which case we'll want to show that instead.
+				 */
+			} else {
+				throwPreloaderSpawnException("An error occurred while starting up "
+					"the preloader. There was an I/O error while "
+					"sending the startup request message to it: " +
+					e.sys(),
+					SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR,
+					details);
+			}
+		} catch (const TimeoutException &) {
+			throwPreloaderSpawnException("An error occurred while starting up the "
+				"preloader: it did not read the startup request message in time.",
+				SpawnException::PRELOADER_STARTUP_TIMEOUT,
+				details);
+		}
+	}
+	
+	string handleStartupResponse(StartupDetails &details) {
+		TRACE_POINT();
+		string socketAddress;
+		
+		while (true) {
+			string line;
+			
+			try {
+				line = readMessageLine(details);
+			} catch (const SystemException &e) {
+				throwPreloaderSpawnException("An error occurred while starting up "
+					"the preloader. There was an I/O error while reading its "
+					"startup response: " + e.sys(),
+					SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR,
+					details);
+			} catch (const TimeoutException &) {
+				throwPreloaderSpawnException("An error occurred while starting up "
+					"the preloader: it did not write a startup response in time.",
+					SpawnException::PRELOADER_STARTUP_TIMEOUT,
+					details);
+			}
+			
+			if (line.empty()) {
+				throwPreloaderSpawnException("An error occurred while starting up "
+					"the preloader. It unexpected closed the connection while "
+					"sending its startup response.",
+					SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR,
+					details);
+			} else if (line[line.size() - 1] != '\n') {
+				throwPreloaderSpawnException("An error occurred while starting up "
+					"the preloader. It sent a line without a newline character "
+					"in its startup response.",
+					SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR,
+					details);
+			} else if (line == "\n") {
+				break;
+			}
+			
+			string::size_type pos = line.find(": ");
+			if (pos == string::npos) {
+				throwPreloaderSpawnException("An error occurred while starting up "
+					"the preloader. It sent a startup response line without "
+					"separator.",
+					SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR,
+					details);
+			}
+			
+			string key = line.substr(0, pos);
+			string value = line.substr(pos + 2, line.size() - pos - 3);
+			if (key == "socket") {
+				// TODO: validate socket address here
+				socketAddress = fixupSocketAddress(options, value);
+			} else {
+				throwPreloaderSpawnException("An error occurred while starting up "
+					"the preloader. It sent an unknown startup response line "
+					"called '" + key + "'.",
+					SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR,
+					details);
+			}
+		}
+		
+		if (socketAddress.empty()) {
+			throwPreloaderSpawnException("An error occurred while starting up "
+				"the preloader. It did not report a socket address in its "
+				"startup response.",
+				SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR,
+				details);
+		}
+		
+		return socketAddress;
+	}
+	
+	void handleErrorResponse(StartupDetails &details) {
+		TRACE_POINT();
+		map<string, string> attributes;
+		
+		while (true) {
+			string line;
+			
+			try {
+				line = readMessageLine(details);
+			} catch (const SystemException &e) {
+				throwPreloaderSpawnException("An error occurred while starting up "
+					"the preloader. There was an I/O error while reading its "
+					"startup response: " + e.sys(),
+					SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR,
+					details);
+			} catch (const TimeoutException &) {
+				throwPreloaderSpawnException("An error occurred while starting up "
+					"the preloader: it did not write a startup response in time.",
+					SpawnException::PRELOADER_STARTUP_TIMEOUT,
+					details);
+			}
+			
+			if (line.empty()) {
+				throwPreloaderSpawnException("An error occurred while starting up "
+					"the preloader. It unexpected closed the connection while "
+					"sending its startup response.",
+					SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR,
+					details);
+			} else if (line[line.size() - 1] != '\n') {
+				throwPreloaderSpawnException("An error occurred while starting up "
+					"the preloader. It sent a line without a newline character "
+					"in its startup response.",
+					SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR,
+					details);
+			} else if (line == "\n") {
+				break;
+			}
+			
+			string::size_type pos = line.find(": ");
+			if (pos == string::npos) {
+				throwPreloaderSpawnException("An error occurred while starting up "
+					"the preloader. It sent a startup response line without "
+					"separator.",
+					SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR,
+					details);
+			}
+			
+			string key = line.substr(0, pos);
+			string value = line.substr(pos + 2, line.size() - pos - 3);
+			attributes[key] = value;
+		}
+		
+		try {
+			string message = details.io.readAll(&details.timeout);
+			SpawnException e("An error occured while starting up the preloader.",
+				message,
+				attributes["html"] == "true",
+				SpawnException::PRELOADER_STARTUP_EXPLAINABLE_ERROR);
+			e.setPreloaderCommand(getPreloaderCommandString());
+			annotatePreloaderException(e, details.debugDir);
+			throw e;
+		} catch (const SystemException &e) {
+			throwPreloaderSpawnException("An error occurred while starting up "
+				"the preloader. It tried to report an error message, but "
+				"an I/O error occurred while reading this error message: " +
+				e.sys(),
+				SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR,
+				details);
+		} catch (const TimeoutException &) {
+			throwPreloaderSpawnException("An error occurred while starting up "
+				"the preloader. It tried to report an error message, but "
+				"it took too much time doing that.",
+				SpawnException::PRELOADER_STARTUP_TIMEOUT,
+				details);
+		}
+	}
+	
+	void handleInvalidResponseType(StartupDetails &details, const string &line) {
+		throwPreloaderSpawnException("An error occurred while starting up "
+			"the preloader. It sent an unknown response type \"" +
+			cEscapeString(line) + "\".",
+			SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR,
+			details);
+	}
+	
+	string negotiatePreloaderStartup(StartupDetails &details) {
+		TRACE_POINT();
+		string result;
+		try {
+			result = readMessageLine(details);
+		} catch (const SystemException &e) {
+			throwPreloaderSpawnException("An error occurred while starting up "
+				"the preloader. There was an I/O error while reading its "
+				"handshake message: " + e.sys(),
+				SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR,
+				details);
+		} catch (const TimeoutException &) {
+			throwPreloaderSpawnException("An error occurred while starting up "
+				"the preloader: it did not write a handshake message in time.",
+				SpawnException::PRELOADER_STARTUP_TIMEOUT,
+				details);
+		}
+		
+		if (result == "I have control 1.0\n") {
+			UPDATE_TRACE_POINT();
+			sendStartupRequest(details);
+			try {
+				result = readMessageLine(details);
+			} catch (const SystemException &e) {
+				throwPreloaderSpawnException("An error occurred while starting up "
+					"the preloader. There was an I/O error while reading its "
+					"startup response: " + e.sys(),
+					SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR,
+					details);
+			} catch (const TimeoutException &) {
+				throwPreloaderSpawnException("An error occurred while starting up "
+					"the preloader: it did not write a startup response in time.",
+					SpawnException::PRELOADER_STARTUP_TIMEOUT,
+					details);
+			}
+			if (result == "Ready\n") {
+				return handleStartupResponse(details);
+			} else if (result == "Error\n") {
+				handleErrorResponse(details);
+			} else {
+				handleInvalidResponseType(details, result);
+			}
+		} else {
+			UPDATE_TRACE_POINT();
+			if (result == "Error\n") {
+				handleErrorResponse(details);
+			} else {
+				handleInvalidResponseType(details, result);
+			}
+		}
+		
+		// Never reached, shut up compiler warning.
+		abort();
+		return "";
+	}
+	
+	SpawnResult sendSpawnCommand(const Options &options) {
+		TRACE_POINT();
+		FileDescriptor fd;
+		try {
+			fd = connectToServer(socketAddress);
+		} catch (const SystemException &e) {
+			BackgroundIOCapturerPtr stderrCapturer;
+			throwPreloaderSpawnException("An error occurred while starting "
+				"the application. Unable to connect to the preloader's "
+				"socket: " + string(e.what()),
+				SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+				stderrCapturer,
+				DebugDirPtr());
+		}
+		
+		UPDATE_TRACE_POINT();
+		BufferedIO io(fd);
+		unsigned long long timeout = options.startTimeout * 1000;
+		string result;
+		vector<string> args;
+		vector<string>::const_iterator it;
+		
+		writeExact(fd, "spawn\n", &timeout);
+		options.toVector(args, resourceLocator, Options::SPAWN_OPTIONS);
+		for (it = args.begin(); it != args.end(); it++) {
+			const string &key = *it;
+			it++;
+			const string &value = *it;
+			writeExact(fd, key + ": " + value + "\n", &timeout);
+		}
+		writeExact(fd, "\n", &timeout);
+		
+		result = io.readLine(1024, &timeout);
+		if (result == "OK\n") {
+			UPDATE_TRACE_POINT();
+			pid_t spawnedPid;
+			
+			spawnedPid = atoi(io.readLine(1024, &timeout).c_str());
+			if (spawnedPid <= 0) {
+				BackgroundIOCapturerPtr stderrCapturer;
+				throwPreloaderSpawnException("An error occurred while starting "
+					"the web application. Its preloader responded to the "
+					"'spawn' command with an invalid PID: '" +
+					toString(spawnedPid) + "'",
+					SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+					stderrCapturer,
+					DebugDirPtr());
+			}
+			// TODO: we really should be checking UID.
+			// FIXME: for Passenger 4 we *must* check the UID otherwise this is a gaping security hole.
+			if (getsid(spawnedPid) != getsid(pid)) {
+				BackgroundIOCapturerPtr stderrCapturer;
+				throwPreloaderSpawnException("An error occurred while starting "
+					"the web application. Its preloader responded to the "
+					"'spawn' command with a PID that doesn't belong to "
+					"the same session: '" + toString(spawnedPid) + "'",
+					SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+					stderrCapturer,
+					DebugDirPtr());
+			}
+			
+			SpawnResult result;
+			result.pid = spawnedPid;
+			result.adminSocket = fd;
+			result.io = io;
+			return result;
+			
+		} else if (result == "Error\n") {
+			UPDATE_TRACE_POINT();
+			NegotiationDetails details;
+			details.io = io;
+			details.timeout = timeout;
+			handleSpawnErrorResponse(details);
+			
+		} else {
+			UPDATE_TRACE_POINT();
+			NegotiationDetails details;
+			handleInvalidSpawnResponseType(result, details);
+		}
+		
+		return SpawnResult(); // Never reached.
+	}
+	
+	template<typename Exception>
+	SpawnResult sendSpawnCommandAgain(const Exception &e, const Options &options) {
+		TRACE_POINT();
+		P_WARN("An error occurred while spawning a process: " << e.what());
+		P_WARN("The application preloader seems to have crashed, restarting it and trying again...");
+		stopPreloader();
+		startPreloader();
+		ScopeGuard guard(boost::bind(&SmartSpawner::stopPreloader, this));
+		SpawnResult result = sendSpawnCommand(options);
+		guard.clear();
+		return result;
+	}
+	
+protected:
+	virtual void annotateAppSpawnException(SpawnException &e, NegotiationDetails &details) {
+		Spawner::annotateAppSpawnException(e, details);
+		e.addAnnotations(preloaderAnnotations);
+	}
+
+public:
+	SmartSpawner(const SafeLibevPtr &_libev,
+		const ResourceLocator &_resourceLocator,
+		const ServerInstanceDir::GenerationPtr &_generation,
+		const vector<string> &_preloaderCommand,
+		const Options &_options,
+		const SpawnerConfigPtr &_config = SpawnerConfigPtr())
+		: Spawner(_resourceLocator),
+		  libev(_libev),
+		  preloaderCommand(_preloaderCommand)
+	{
+		if (preloaderCommand.size() < 2) {
+			throw ArgumentException("preloaderCommand must have at least 2 elements");
+		}
+		
+		generation = _generation;
+		options    = _options.copyAndPersist().clearLogger();
+		pid        = -1;
+		m_lastUsed = SystemTime::getUsec();
+
+		if (_config == NULL) {
+			config = make_shared<SpawnerConfig>();
+		} else {
+			config = _config;
+		}
+	}
+	
+	virtual ~SmartSpawner() {
+		boost::lock_guard<boost::mutex> l(syncher);
+		stopPreloader();
+	}
+	
+	virtual ProcessPtr spawn(const Options &options) {
+		TRACE_POINT();
+		assert(options.appType == this->options.appType);
+		assert(options.appRoot == this->options.appRoot);
+		
+		P_DEBUG("Spawning new process: appRoot=" << options.appRoot);
+		possiblyRaiseInternalError(options);
+
+		{
+			boost::lock_guard<boost::mutex> l(simpleFieldSyncher);
+			m_lastUsed = SystemTime::getUsec();
+		}
+		UPDATE_TRACE_POINT();
+		boost::lock_guard<boost::mutex> l(syncher);
+		if (!preloaderStarted()) {
+			UPDATE_TRACE_POINT();
+			startPreloader();
+		}
+		
+		UPDATE_TRACE_POINT();
+		SpawnResult result;
+		try {
+			result = sendSpawnCommand(options);
+		} catch (const SystemException &e) {
+			result = sendSpawnCommandAgain(e, options);
+		} catch (const IOException &e) {
+			result = sendSpawnCommandAgain(e, options);
+		} catch (const SpawnException &e) {
+			result = sendSpawnCommandAgain(e, options);
+		}
+		
+		UPDATE_TRACE_POINT();
+		NegotiationDetails details;
+		details.preparation = &preparation;
+		details.libev = libev;
+		details.pid = result.pid;
+		details.adminSocket = result.adminSocket;
+		details.io = result.io;
+		details.options = &options;
+		details.forwardStderr = config->forwardStderr;
+		ProcessPtr process = negotiateSpawn(details);
+		P_DEBUG("Process spawning done: appRoot=" << options.appRoot <<
+			", pid=" << process->pid);
+		return process;
+	}
+
+	virtual bool cleanable() const {
+		return true;
+	}
+	
+	virtual void cleanup() {
+		TRACE_POINT();
+		{
+			boost::lock_guard<boost::mutex> l(simpleFieldSyncher);
+			m_lastUsed = SystemTime::getUsec();
+		}
+		boost::lock_guard<boost::mutex> lock(syncher);
+		stopPreloader();
+	}
+
+	virtual unsigned long long lastUsed() const {
+		boost::lock_guard<boost::mutex> lock(simpleFieldSyncher);
+		return m_lastUsed;
+	}
+	
+	pid_t getPreloaderPid() const {
+		boost::lock_guard<boost::mutex> lock(simpleFieldSyncher);
+		return pid;
+	}
+};
+
+
+} // namespace ApplicationPool2
+} // namespace Passenger
+
+#endif /* _PASSENGER_APPLICATION_POOL2_SMART_SPAWNER_H_ */
diff --git a/ext/common/ApplicationPool2/Socket.h b/ext/common/ApplicationPool2/Socket.h
new file mode 100644
index 0000000..ad94284
--- /dev/null
+++ b/ext/common/ApplicationPool2/Socket.h
@@ -0,0 +1,246 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_APPLICATION_POOL_SOCKET_H_
+#define _PASSENGER_APPLICATION_POOL_SOCKET_H_
+
+#include <string>
+#include <vector>
+#include <boost/thread.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+#include <climits>
+#include <cassert>
+#include <Logging.h>
+#include <Utils/PriorityQueue.h>
+#include <Utils/IOUtils.h>
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace std;
+using namespace boost;
+
+
+class Process;
+
+struct Connection {
+	int fd;
+	bool persistent: 1;
+	bool fail: 1;
+	
+	Connection() {
+		fd = -1;
+		persistent = false;
+		fail = false;
+	}
+	
+	void close() {
+		if (fd != -1) {
+			int fd2 = fd;
+			fd = -1;
+			persistent = false;
+			safelyClose(fd2);
+		}
+	}
+};
+
+/**
+ * Not thread-safe except for the connection pooling methods, so only use
+ * within the ApplicationPool lock.
+ */
+class Socket {
+private:
+	boost::mutex connectionPoolLock;
+	int totalConnections;
+	vector<Connection> idleConnections;
+	
+	int connectionPoolLimit() const {
+		return concurrency;
+	}
+	
+	Connection connect() const {
+		Connection connection;
+		P_TRACE(3, "Connecting to " << address);
+		connection.fd = connectToServer(address);
+		return connection;
+	}
+	
+public:
+	// Read-only.
+	string name;
+	string address;
+	string protocol;
+	int concurrency;
+	
+	/** The handle inside the associated Process's 'sessionSockets' priority queue.
+	 * Guaranteed to be valid as long as the Process is alive.
+	 */
+	PriorityQueue<Socket>::Handle pqHandle;
+	
+	/** Invariant: sessions >= 0 */
+	int sessions;
+	
+	Socket()
+		: concurrency(0)
+		{ }
+	
+	Socket(const string &_name, const string &_address, const string &_protocol, int _concurrency)
+		: totalConnections(0),
+		  name(_name),
+		  address(_address),
+		  protocol(_protocol),
+		  concurrency(_concurrency),
+		  sessions(0)
+		{ }
+	
+	Socket(const Socket &other)
+		: totalConnections(other.totalConnections),
+		  idleConnections(other.idleConnections),
+		  name(other.name),
+		  address(other.address),
+		  protocol(other.protocol),
+		  concurrency(other.concurrency),
+		  pqHandle(other.pqHandle),
+		  sessions(other.sessions)
+		{ }
+	
+	Socket &operator=(const Socket &other) {
+		totalConnections = other.totalConnections;
+		idleConnections = other.idleConnections;
+		name = other.name;
+		address = other.address;
+		protocol = other.protocol;
+		concurrency = other.concurrency;
+		pqHandle = other.pqHandle;
+		sessions = other.sessions;
+		return *this;
+	}
+	
+	/**
+	 * Connect to this socket or reuse an existing connection.
+	 *
+	 * One MUST call checkinConnection() when one's done using the Connection.
+	 * Failure to do so will result in a resource leak.
+	 */
+	Connection checkoutConnection() {
+		boost::lock_guard<boost::mutex> l(connectionPoolLock);
+		
+		if (!idleConnections.empty()) {
+			Connection connection = idleConnections.back();
+			idleConnections.pop_back();
+			return connection;
+		} else if (totalConnections < connectionPoolLimit()) {
+			Connection connection = connect();
+			connection.persistent = true;
+			totalConnections++;
+			return connection;
+		} else {
+			return connect();
+		}
+	}
+	
+	void checkinConnection(Connection connection) {
+		unique_lock<boost::mutex> l(connectionPoolLock);
+		
+		if (connection.persistent) {
+			if (connection.fail) {
+				totalConnections--;
+				l.unlock();
+				connection.close();
+			} else {
+				idleConnections.push_back(connection);
+			}
+		} else {
+			l.unlock();
+			connection.close();
+		}
+	}
+	
+	
+	bool idle() const {
+		return sessions == 0;
+	}
+	
+	int utilization() const {
+		/* Different sockets within a Process may have different
+		 * 'concurrency' values. We want:
+		 * - Process.sessionSockets to sort the sockets from least used to most used.
+		 * - to give sockets with concurrency == 0 more priority over sockets
+		 *   with concurrency > 0.
+		 * Therefore, we describe our utilization as a percentage of 'concurrency', with
+		 * the percentage value in [0..INT_MAX] instead of [0..1].
+		 */
+		if (concurrency == 0) {
+			// Allows Process.sessionSockets to give
+			// idle sockets more priority.
+			if (sessions == 0) {
+				return 0;
+			} else {
+				return 1;
+			}
+		} else {
+			return (int) (((long long) sessions * INT_MAX) / (double) concurrency);
+		}
+	}
+	
+	bool atFullCapacity() const {
+		return concurrency != 0 && sessions >= concurrency;
+	}
+};
+
+class SocketList: public vector<Socket> {
+public:
+	void add(const string &name, const string &address, const string &protocol, int concurrency) {
+		push_back(Socket(name, address, protocol, concurrency));
+	}
+
+	const Socket *findSocketWithName(const StaticString &name) const {
+		const_iterator it, end = this->end();
+		for (it = begin(); it != end; it++) {
+			if (it->name == name) {
+				return &(*it);
+			}
+		}
+		return NULL;
+	}
+
+	bool hasSessionSockets() const {
+		const_iterator it;
+		for (it = begin(); it != end(); it++) {
+			if (it->protocol == "session" || it->protocol == "http_session") {
+				return true;
+			}
+		}
+		return false;
+	}
+};
+
+typedef shared_ptr<SocketList> SocketListPtr;
+
+
+} // namespace ApplicationPool2
+} // namespace Pasenger
+
+#endif /* _PASSENGER_APPLICATION_POOL2_SOCKET_H_ */
diff --git a/ext/common/ApplicationPool2/Spawner.h b/ext/common/ApplicationPool2/Spawner.h
new file mode 100644
index 0000000..f938543
--- /dev/null
+++ b/ext/common/ApplicationPool2/Spawner.h
@@ -0,0 +1,1273 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_APPLICATION_POOL_SPAWNER_H_
+#define _PASSENGER_APPLICATION_POOL_SPAWNER_H_
+
+/*
+ * This file implements application spawning support. Several classes
+ * are provided which all implement the Spawner interface. The spawn()
+ * method spawns an application process based on the given options
+ * and returns a Process object which contains information about the
+ * spawned process.
+ *
+ * The DirectSpawner class spawns application processes directly.
+ *
+ * The SmartSpawner class spawns application processes through a
+ * preloader process. The preloader process loads the application
+ * code into its address space and then listens on a socket for spawn
+ * commands. Upon receiving a spawn command, it will fork() itself.
+ * This makes spawning multiple application processes much faster.
+ * Note that a single SmartSpawner instance is only usable for a
+ * single application.
+ *
+ * DummySpawner doesn't do anything. It returns dummy Process objects.
+ *
+ * DirectSpawner, SmartSpawner and DummySpawner all implement the Spawner interface.
+ *
+ * SpawnerFactory is a convenience class which takes an Options objects
+ * and figures out, based on options.spawnMethod, whether to create
+ * a DirectSpawner or a SmartSpawner. In case of the smart spawning
+ * method, SpawnerFactory also automatically figures out which preloader
+ * to use based on options.appType.
+ */
+
+#include <string>
+#include <map>
+#include <vector>
+#include <utility>
+#include <boost/make_shared.hpp>
+#include <boost/shared_array.hpp>
+#include <boost/bind.hpp>
+#include <boost/foreach.hpp>
+#include <oxt/system_calls.hpp>
+#include <oxt/backtrace.hpp>
+#include <sys/types.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cerrno>
+#include <cassert>
+#include <unistd.h>
+#include <pwd.h>
+#include <grp.h>
+#include <dirent.h>
+#include <ApplicationPool2/Process.h>
+#include <ApplicationPool2/Options.h>
+#include <ApplicationPool2/PipeWatcher.h>
+#include <FileDescriptor.h>
+#include <SafeLibev.h>
+#include <Exceptions.h>
+#include <ResourceLocator.h>
+#include <StaticString.h>
+#include <ServerInstanceDir.h>
+#include <Utils.h>
+#include <Utils/BufferedIO.h>
+#include <Utils/ScopeGuard.h>
+#include <Utils/Timer.h>
+#include <Utils/IOUtils.h>
+#include <Utils/StrIntUtils.h>
+#include <Utils/Base64.h>
+
+namespace tut {
+	struct ApplicationPool2_DirectSpawnerTest;
+	struct ApplicationPool2_SmartSpawnerTest;
+}
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+
+class Spawner {
+protected:
+	friend struct tut::ApplicationPool2_DirectSpawnerTest;
+	friend struct tut::ApplicationPool2_SmartSpawnerTest;
+	
+	/**
+	 * Given a file descriptor, captures its output in a background thread
+	 * and also forwards it immediately to a target file descriptor.
+	 * Call stop() to stop the background thread and to obtain the captured
+	 * output so far.
+	 */
+	class BackgroundIOCapturer {
+	private:
+		FileDescriptor fd;
+		string prefix;
+		bool print;
+		boost::mutex dataSyncher;
+		string data;
+		oxt::thread *thr;
+		
+		void capture() {
+			TRACE_POINT();
+			while (!this_thread::interruption_requested()) {
+				char buf[1024 * 8];
+				ssize_t ret;
+				
+				UPDATE_TRACE_POINT();
+				ret = syscalls::read(fd, buf, sizeof(buf));
+				int e = errno;
+				this_thread::disable_syscall_interruption dsi;
+				if (ret == 0) {
+					break;
+				} else if (ret == -1) {
+					if (e != EAGAIN && e != EWOULDBLOCK) {
+						P_WARN("Background I/O capturer error: " <<
+							strerror(e) << " (errno=" << e << ")");
+						break;
+					}
+				} else {
+					{
+						boost::lock_guard<boost::mutex> l(dataSyncher);
+						data.append(buf, ret);
+					}
+					UPDATE_TRACE_POINT();
+					if (print && ret == 1 && buf[0] == '\n') {
+						P_INFO(prefix);
+					} else if (print) {
+						vector<StaticString> lines;
+						if (ret > 0 && buf[ret - 1] == '\n') {
+							ret--;
+						}
+						split(StaticString(buf, ret), '\n', lines);
+						foreach (const StaticString line, lines) {
+							P_INFO(prefix << line);
+						}
+					}
+				}
+			}
+		}
+		
+	public:
+		BackgroundIOCapturer(const FileDescriptor &_fd, const string &_prefix, bool _print)
+			: fd(_fd),
+			  prefix(_prefix),
+			  print(_print),
+			  thr(NULL)
+			{ }
+		
+		~BackgroundIOCapturer() {
+			TRACE_POINT();
+			if (thr != NULL) {
+				this_thread::disable_interruption di;
+				this_thread::disable_syscall_interruption dsi;
+				thr->interrupt_and_join();
+				delete thr;
+				thr = NULL;
+			}
+		}
+		
+		const FileDescriptor &getFd() const {
+			return fd;
+		}
+		
+		void start() {
+			assert(thr == NULL);
+			thr = new oxt::thread(boost::bind(&BackgroundIOCapturer::capture, this),
+				"Background I/O capturer", 64 * 1024);
+		}
+		
+		string stop() {
+			TRACE_POINT();
+			assert(thr != NULL);
+			this_thread::disable_interruption di;
+			this_thread::disable_syscall_interruption dsi;
+			thr->interrupt_and_join();
+			delete thr;
+			thr = NULL;
+			boost::lock_guard<boost::mutex> l(dataSyncher);
+			return data;
+		}
+
+		void appendToBuffer(const StaticString &dataToAdd) {
+			TRACE_POINT();
+			boost::lock_guard<boost::mutex> l(dataSyncher);
+			data.append(dataToAdd.data(), dataToAdd.size());
+		}
+	};
+	
+	typedef shared_ptr<BackgroundIOCapturer> BackgroundIOCapturerPtr;
+	
+	/**
+	 * A temporary directory for spawned child processes to write
+	 * debugging information to. It is removed after spawning has
+	 * determined to be successful or failed.
+	 */
+	struct DebugDir {
+		string path;
+
+		DebugDir(uid_t uid, gid_t gid) {
+			char buf[PATH_MAX] = "/tmp/passenger.spawn-debug.XXXXXXXXXX";
+			const char *result = mkdtemp(buf);
+			if (result == NULL) {
+				int e = errno;
+				throw SystemException("Cannot create a temporary directory "
+					"in the format of '/tmp/passenger-spawn-debug.XXX'", e);
+			} else {
+				path = result;
+				this_thread::disable_interruption di;
+				this_thread::disable_syscall_interruption dsi;
+				syscalls::chown(result, uid, gid);
+			}
+		}
+
+		~DebugDir() {
+			removeDirTree(path);
+		}
+
+		const string &getPath() const {
+			return path;
+		}
+
+		map<string, string> readAll() {
+			map<string, string> result;
+			DIR *dir = opendir(path.c_str());
+			ScopeGuard guard(boost::bind(closedir, dir));
+			struct dirent *ent;
+
+			while ((ent = readdir(dir)) != NULL) {
+				if (ent->d_name[0] != '.') {
+					try {
+						result.insert(make_pair<string, string>(
+							ent->d_name,
+							Passenger::readAll(path + "/" + ent->d_name)));
+					} catch (const SystemException &) {
+						// Do nothing.
+					}
+				}
+			}
+			return result;
+		}
+	};
+
+	typedef shared_ptr<DebugDir> DebugDirPtr;
+
+	/**
+	 * Contains information that will be used after fork()ing but before exec()ing,
+	 * such as the intended app root, the UID it should switch to, the
+	 * groups it should assume, etc. This structure is allocated before forking
+	 * because after forking and before exec() it may not be safe to allocate memory.
+	 */
+	struct SpawnPreparationInfo {
+		// General
+
+		/** Absolute application root path. */
+		string appRoot;
+		/** Absolute pre-exec chroot path. If no chroot is configured, then this is "/". */
+		string chrootDir;
+		/** Absolute application root path inside the chroot. If no chroot is
+		 * configured then this is is equal to appRoot. */
+		string appRootInsideChroot;
+		/** A list of all parent directories of the appRoot, as well as appRoot itself.
+		 * The pre-exec chroot directory is included, and this list goes no futher than that.
+		 * For example if appRoot is /var/jail/foo/bar/baz and the chroot is /var/jail,
+		 * then this list contains:
+		 *   /var/jail/foo
+		 *   /var/jail/foo/bar
+		 *   /var/jail/foo/bar/baz
+		 */
+		vector<string> appRootPaths;
+		/** Same as appRootPaths, but without the chroot component. For example if
+		 * appRoot is /var/jail/foo/bar/baz and the chroot is /var/jail, then this list
+		 * contains:
+		 *   /foo
+		 *   /foo/bar
+		 *   /foo/bar/baz
+		 */
+		vector<string> appRootPathsInsideChroot;
+
+		// User switching
+		bool switchUser;
+		string username;
+		string groupname;
+		string home;
+		string shell;
+		uid_t uid;
+		gid_t gid;
+		int ngroups;
+		shared_array<gid_t> gidset;
+	};
+
+	/**
+	 * Structure containing arguments and working state for negotiating
+	 * the spawning protocol.
+	 */
+	struct NegotiationDetails {
+		/****** Arguments ******/
+
+		/** The preparation info of the process we're negotiating with. It's used
+		 * by security validators to check whether the information sent back by the
+		 * process make any sense. */
+		SpawnPreparationInfo *preparation;
+		/** The SafeLibev that the returned Process should be initialized with. */
+		SafeLibevPtr libev;
+		/** This object captures the process's stderr while negotiation is in progress.
+		 * (Recall that negotiation is performed over the process's stdout while stderr
+		 * is used purely for outputting messages.)
+		 * If the negotiation protocol fails, then any output captured by this object
+		 * will be stored into the resulting SpawnException's error page. */
+		BackgroundIOCapturerPtr stderrCapturer;
+		/** The PID of the process we're negotiating with. */
+		pid_t pid;
+		FileDescriptor adminSocket;
+		FileDescriptor errorPipe;
+		const Options *options;
+		bool forwardStderr;
+		int forwardStderrTo;
+		DebugDirPtr debugDir;
+		
+		/****** Working state ******/
+		BufferedIO io;
+		string gupid;
+		string connectPassword;
+		unsigned long long spawnStartTime;
+		unsigned long long timeout;
+		
+		NegotiationDetails() {
+			preparation = NULL;
+			pid = 0;
+			options = NULL;
+			forwardStderr = false;
+			forwardStderrTo = STDERR_FILENO;
+			spawnStartTime = 0;
+			timeout = 0;
+		}
+	};
+	
+	
+private:
+	/**
+	 * Appends key + "\0" + value + "\0" to 'output'.
+	 */
+	static void appendNullTerminatedKeyValue(string &output, const StaticString &key,
+		const StaticString &value)
+	{
+		unsigned int minCapacity = key.size() + value.size() + 2;
+		if (output.capacity() < minCapacity) {
+			output.reserve(minCapacity + 1024);
+		}
+		output.append(key.data(), key.size());
+		output.append(1, '\0');
+		output.append(value.data(), value.size());
+		output.append(1, '\0');
+	}
+
+	void sendSpawnRequest(NegotiationDetails &details) {
+		TRACE_POINT();
+		try {
+			string data = "You have control 1.0\n"
+				"passenger_root: " + resourceLocator.getRoot() + "\n"
+				"passenger_version: " PASSENGER_VERSION "\n"
+				"ruby_libdir: " + resourceLocator.getRubyLibDir() + "\n"
+				"generation_dir: " + generation->getPath() + "\n"
+				"gupid: " + details.gupid + "\n"
+				"connect_password: " + details.connectPassword + "\n";
+
+			vector<string> args;
+			vector<string>::const_iterator it, end;
+			details.options->toVector(args, resourceLocator, Options::SPAWN_OPTIONS);
+			for (it = args.begin(); it != args.end(); it++) {
+				const string &key = *it;
+				it++;
+				const string &value = *it;
+				data.append(key + ": " + value + "\n");
+			}
+
+			vector<StaticString> lines;
+			split(data, '\n', lines);
+			foreach (const StaticString line, lines) {
+				P_DEBUG("[App " << details.pid << " stdin >>] " << line);
+			}
+			writeExact(details.adminSocket, data, &details.timeout);
+			writeExact(details.adminSocket, "\n", &details.timeout);
+		} catch (const SystemException &e) {
+			if (e.code() == EPIPE) {
+				/* Ignore this. Process might have written an
+				 * error response before reading the arguments,
+				 * in which case we'll want to show that instead.
+				 */
+			} else {
+				throw;
+			}
+		}
+	}
+
+	ProcessPtr handleSpawnResponse(NegotiationDetails &details) {
+		TRACE_POINT();
+		SocketListPtr sockets = make_shared<SocketList>();
+		while (true) {
+			string line;
+			
+			try {
+				line = readMessageLine(details);
+			} catch (const SystemException &e) {
+				throwAppSpawnException("An error occurred while starting the "
+					"web application. There was an I/O error while reading its "
+					"startup response: " + e.sys(),
+					SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+					details);
+			} catch (const TimeoutException &) {
+				throwAppSpawnException("An error occurred while starting the "
+					"web application: it did not write a startup response in time.",
+					SpawnException::APP_STARTUP_TIMEOUT,
+					details);
+			}
+			
+			if (line.empty()) {
+				throwAppSpawnException("An error occurred while starting the "
+					"web application. It unexpected closed the connection while "
+					"sending its startup response.",
+					SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+					details);
+			} else if (line[line.size() - 1] != '\n') {
+				throwAppSpawnException("An error occurred while starting the "
+					"web application. It sent a line without a newline character "
+					"in its startup response.",
+					SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+					details);
+			} else if (line == "\n") {
+				break;
+			}
+			
+			string::size_type pos = line.find(": ");
+			if (pos == string::npos) {
+				throwAppSpawnException("An error occurred while starting the "
+					"web application. It sent a startup response line without "
+					"separator.",
+					SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+					details);
+			}
+			
+			string key = line.substr(0, pos);
+			string value = line.substr(pos + 2, line.size() - pos - 3);
+			if (key == "socket") {
+				// socket: <name>;<address>;<protocol>;<concurrency>
+				// TODO: in case of TCP sockets, check whether it points to localhost
+				// TODO: in case of unix sockets, check whether filename is absolute
+				// and whether owner is correct
+				vector<string> args;
+				split(value, ';', args);
+				if (args.size() == 4) {
+					string error = validateSocketAddress(details, args[1]);
+					if (!error.empty()) {
+						throwAppSpawnException(
+							"An error occurred while starting the web application. " + error,
+							SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+							details);
+					}
+					sockets->add(args[0],
+						fixupSocketAddress(*details.options, args[1]),
+						args[2],
+						atoi(args[3]));
+				} else {
+					throwAppSpawnException("An error occurred while starting the "
+						"web application. It reported a wrongly formatted 'socket'"
+						"response value: '" + value + "'",
+						SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+						details);
+				}
+			} else {
+				throwAppSpawnException("An error occurred while starting the "
+					"web application. It sent an unknown startup response line "
+					"called '" + key + "'.",
+					SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+					details);
+			}
+		}
+
+		if (sockets->hasSessionSockets() == 0) {
+			throwAppSpawnException("An error occured while starting the web "
+				"application. It did not advertise any session sockets.",
+				SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+				details);
+		}
+		
+		return make_shared<Process>(details.libev, details.pid,
+			details.gupid, details.connectPassword,
+			details.adminSocket, details.errorPipe,
+			sockets, creationTime, details.spawnStartTime,
+			config);
+	}
+	
+protected:
+	ResourceLocator resourceLocator;
+	ServerInstanceDir::GenerationPtr generation;
+	SpawnerConfigPtr config;
+	
+	static void nonInterruptableKillAndWaitpid(pid_t pid) {
+		this_thread::disable_syscall_interruption dsi;
+		syscalls::kill(pid, SIGKILL);
+		syscalls::waitpid(pid, NULL, 0);
+	}
+	
+	/**
+	 * Behaves like <tt>waitpid(pid, status, WNOHANG)</tt>, but waits at most
+	 * <em>timeout</em> miliseconds for the process to exit.
+	 */
+	static int timedWaitpid(pid_t pid, int *status, unsigned long long timeout) {
+		Timer timer;
+		int ret;
+		
+		do {
+			ret = syscalls::waitpid(pid, status, WNOHANG);
+			if (ret > 0 || ret == -1) {
+				return ret;
+			} else {
+				syscalls::usleep(10000);
+			}
+		} while (timer.elapsed() < timeout);
+		return 0; // timed out
+	}
+	
+	static string fixupSocketAddress(const Options &options, const string &address) {
+		TRACE_POINT();
+		if (!options.preexecChroot.empty() && !options.postexecChroot.empty()) {
+			ServerAddressType type = getSocketAddressType(address);
+			if (type == SAT_UNIX) {
+				string filename = parseUnixSocketAddress(address);
+				string fixedAddress = "unix:";
+				if (!options.preexecChroot.empty()) {
+					fixedAddress.append(options.preexecChroot.data(),
+						options.preexecChroot.size());
+				}
+				if (!options.postexecChroot.empty()) {
+					fixedAddress.append(options.postexecChroot.data(),
+						options.postexecChroot.size());
+				}
+				fixedAddress.append(filename);
+				return fixedAddress;
+			} else {
+				return address;
+			}
+		} else {
+			return address;
+		}
+	}
+
+	bool isAbsolutePath(const StaticString &path) const {
+		if (path.empty() || path[0] != '/') {
+			return false;
+		} else {
+			vector<string> components;
+			string component;
+
+			split(path, '/', components);
+			components.erase(components.begin());
+			foreach (component, components) {
+				if (component.empty() || component == "." || component == "..") {
+					return false;
+				}
+			}
+			return true;
+		}
+	}
+
+	/**
+	 * Given a 'socket:' information string obtained from the spawned process,
+	 * validates whether it is correct.
+	 */
+	string validateSocketAddress(NegotiationDetails &details, const string &_address) const {
+		string address = _address;
+		stringstream error;
+
+		switch (getSocketAddressType(address)) {
+		case SAT_UNIX: {
+			address = fixupSocketAddress(*details.options, address);
+			string filename = parseUnixSocketAddress(address);
+
+			// Verify that the socket filename is absolute.
+			if (!isAbsolutePath(filename)) {
+				error << "It reported a non-absolute socket filename: \"" <<
+					cEscapeString(filename) << "\"";
+				break;
+			}
+
+			// Verify that the process owns the socket.
+			struct stat buf;
+			if (lstat(filename.c_str(), &buf) == -1) {
+				int e = errno;
+				error << "It reported an inaccessible socket filename: \"" <<
+					cEscapeString(filename) << "\" (lstat() failed with errno " <<
+					e << ": " << strerror(e) << ")";
+				break;
+			}
+			if (buf.st_uid != details.preparation->uid) {
+				error << "It advertised a Unix domain socket that has a different " <<
+					"owner than expected (should be UID " << details.preparation->uid <<
+					", but actual UID was " << buf.st_uid << ")";
+				break;
+			}
+			break;
+		}
+		case SAT_TCP:
+			// TODO: validate that the socket is localhost.
+			break;
+		default:
+			error << "It reported an unsupported socket address type: \"" <<
+				cEscapeString(address) << "\"";
+			break;
+		}
+
+		return error.str();
+	}
+
+	static void checkChrootDirectories(const Options &options) {
+		if (!options.preexecChroot.empty()) {
+			// TODO: check whether appRoot is a child directory of preexecChroot
+			// and whether postexecChroot is a child directory of appRoot.
+		}
+	}
+	
+	static void createCommandArgs(const vector<string> &command,
+		shared_array<const char *> &args)
+	{
+		args.reset(new const char *[command.size()]);
+		for (unsigned int i = 1; i < command.size(); i++) {
+			args[i - 1] = command[i].c_str();
+		}
+		args[command.size() - 1] = NULL;
+	}
+
+	void possiblyRaiseInternalError(const Options &options) {
+		if (options.raiseInternalError) {
+			throw RuntimeException("An internal error!");
+		}
+	}
+	
+	void throwAppSpawnException(const string &msg,
+		SpawnException::ErrorKind errorKind,
+		NegotiationDetails &details)
+	{
+		TRACE_POINT();
+		// Stop the stderr capturing thread and get the captured stderr
+		// output so far.
+		string stderrOutput;
+		if (details.stderrCapturer != NULL) {
+			stderrOutput = details.stderrCapturer->stop();
+		}
+		
+		// If the exception wasn't due to a timeout, try to capture the
+		// remaining stderr output for at most 2 seconds.
+		if (errorKind != SpawnException::PRELOADER_STARTUP_TIMEOUT
+		 && errorKind != SpawnException::APP_STARTUP_TIMEOUT
+		 && details.stderrCapturer != NULL) {
+			bool done = false;
+			unsigned long long timeout = 2000;
+			while (!done) {
+				char buf[1024 * 32];
+				unsigned int ret;
+				
+				try {
+					ret = readExact(details.stderrCapturer->getFd(), buf,
+						sizeof(buf), &timeout);
+					if (ret == 0) {
+						done = true;
+					} else {
+						stderrOutput.append(buf, ret);
+					}
+				} catch (const SystemException &e) {
+					P_WARN("Stderr I/O capture error: " << e.what());
+					done = true;
+				} catch (const TimeoutException &) {
+					done = true;
+				}
+			}
+		}
+		details.stderrCapturer.reset();
+		
+		// Now throw SpawnException with the captured stderr output
+		// as error response.
+		SpawnException e(msg, stderrOutput, false, errorKind);
+		annotateAppSpawnException(e, details);
+		throw e;
+	}
+
+	virtual void annotateAppSpawnException(SpawnException &e, NegotiationDetails &details) {
+		if (details.debugDir != NULL) {
+			e.addAnnotations(details.debugDir->readAll());
+		}
+	}
+
+	template<typename Details>
+	string readMessageLine(Details &details) {
+		TRACE_POINT();
+		while (true) {
+			string result = details.io.readLine(1024 * 4, &details.timeout);
+			string line = result;
+			if (!line.empty() && line[line.size() - 1] == '\n') {
+				line.erase(line.size() - 1, 1);
+			}
+			
+			if (result.empty()) {
+				// EOF
+				return result;
+			} else if (startsWith(result, "!> ")) {
+				P_DEBUG("[App " << details.pid << " stdout] " << line);
+				result.erase(0, sizeof("!> ") - 1);
+				return result;
+			} else {
+				if (details.stderrCapturer != NULL) {
+					details.stderrCapturer->appendToBuffer(result);
+				}
+				P_LOG(config->forwardStdout ? LVL_INFO : LVL_DEBUG,
+					"[App " << details.pid << " stdout] " << line);
+			}
+		}
+	}
+
+	SpawnPreparationInfo prepareSpawn(const Options &options) const {
+		TRACE_POINT();
+		SpawnPreparationInfo info;
+		prepareChroot(info, options);
+		prepareUserSwitching(info, options);
+		prepareSwitchingWorkingDirectory(info, options);
+		return info;
+	}
+
+	void prepareChroot(SpawnPreparationInfo &info, const Options &options) const {
+		TRACE_POINT();
+		info.appRoot = absolutizePath(options.appRoot);
+		if (options.preexecChroot.empty()) {
+			info.chrootDir = "/";
+		} else {
+			info.chrootDir = absolutizePath(options.preexecChroot);
+		}
+		if (info.appRoot != info.chrootDir && startsWith(info.appRoot, info.chrootDir + "/")) {
+			throw SpawnException("Invalid configuration: '" + info.chrootDir +
+				"' has been configured as the chroot jail, but the application " +
+				"root directory '" + info.appRoot + "' is not a subdirectory of the " +
+				"chroot directory, which it must be.");
+		}
+		if (info.appRoot == info.chrootDir) {
+			info.appRootInsideChroot = "/";
+		} else if (info.chrootDir == "/") {
+			info.appRootInsideChroot = info.appRoot;
+		} else {
+			info.appRootInsideChroot = info.appRoot.substr(info.chrootDir.size());
+		}
+	}
+
+	void prepareUserSwitching(SpawnPreparationInfo &info, const Options &options) const {
+		TRACE_POINT();
+		if (geteuid() != 0) {
+			struct passwd *userInfo = getpwuid(geteuid());
+			if (userInfo == NULL) {
+				throw RuntimeException("Cannot get user database entry for user " +
+					getProcessUsername() + "; it looks like your system's " +
+					"user database is broken, please fix it.");
+			}
+			struct group *groupInfo = getgrgid(userInfo->pw_gid);
+			if (groupInfo == NULL) {
+				throw RuntimeException(string("Cannot get group database entry for ") +
+					"the default group belonging to username '" +
+					getProcessUsername() + "'; it looks like your system's " +
+					"user database is broken, please fix it.");
+			}
+			
+			info.switchUser = false;
+			info.username = userInfo->pw_name;
+			info.groupname = groupInfo->gr_name;
+			info.home = userInfo->pw_dir;
+			info.shell = userInfo->pw_shell;
+			info.uid = geteuid();
+			info.gid = getegid();
+			info.ngroups = 0;
+			return;
+		}
+		
+		UPDATE_TRACE_POINT();
+		string defaultGroup;
+		string startupFile = absolutizePath(options.getStartupFile(), info.appRoot);
+		struct passwd *userInfo = NULL;
+		struct group *groupInfo = NULL;
+		
+		if (options.defaultGroup.empty()) {
+			struct passwd *info = getpwnam(options.defaultUser.c_str());
+			if (info == NULL) {
+				throw RuntimeException("Cannot get user database entry for username '" +
+					options.defaultUser + "'");
+			}
+			struct group *group = getgrgid(info->pw_gid);
+			if (group == NULL) {
+				throw RuntimeException(string("Cannot get group database entry for ") +
+					"the default group belonging to username '" +
+					options.defaultUser + "'");
+			}
+			defaultGroup = group->gr_name;
+		} else {
+			defaultGroup = options.defaultGroup;
+		}
+		
+		UPDATE_TRACE_POINT();
+		if (!options.user.empty()) {
+			userInfo = getpwnam(options.user.c_str());
+		} else {
+			struct stat buf;
+			if (syscalls::lstat(startupFile.c_str(), &buf) == -1) {
+				int e = errno;
+				throw SystemException("Cannot lstat(\"" + startupFile +
+					"\")", e);
+			}
+			userInfo = getpwuid(buf.st_uid);
+		}
+		if (userInfo == NULL || userInfo->pw_uid == 0) {
+			userInfo = getpwnam(options.defaultUser.c_str());
+		}
+		
+		UPDATE_TRACE_POINT();
+		if (!options.group.empty()) {
+			if (options.group == "!STARTUP_FILE!") {
+				struct stat buf;
+				if (syscalls::lstat(startupFile.c_str(), &buf) == -1) {
+					int e = errno;
+					throw SystemException("Cannot lstat(\"" +
+						startupFile + "\")", e);
+				}
+				groupInfo = getgrgid(buf.st_gid);
+			} else {
+				groupInfo = getgrnam(options.group.c_str());
+			}
+		} else if (userInfo != NULL) {
+			groupInfo = getgrgid(userInfo->pw_gid);
+		}
+		if (groupInfo == NULL || groupInfo->gr_gid == 0) {
+			groupInfo = getgrnam(defaultGroup.c_str());
+		}
+		
+		UPDATE_TRACE_POINT();
+		if (userInfo == NULL) {
+			throw RuntimeException("Cannot determine a user to lower privilege to");
+		}
+		if (groupInfo == NULL) {
+			throw RuntimeException("Cannot determine a group to lower privilege to");
+		}
+		
+		UPDATE_TRACE_POINT();
+		#ifdef __APPLE__
+			int groups[1024];
+			info.ngroups = sizeof(groups) / sizeof(int);
+		#else
+			gid_t groups[1024];
+			info.ngroups = sizeof(groups) / sizeof(gid_t);
+		#endif
+		info.switchUser = true;
+		info.username = userInfo->pw_name;
+		info.groupname = groupInfo->gr_name;
+		info.home = userInfo->pw_dir;
+		info.shell = userInfo->pw_shell;
+		info.uid = userInfo->pw_uid;
+		info.gid = groupInfo->gr_gid;
+		#if !defined(HAVE_GETGROUPLIST) && (defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__))
+			#define HAVE_GETGROUPLIST
+		#endif
+		#ifdef HAVE_GETGROUPLIST
+			int ret = getgrouplist(userInfo->pw_name, groupInfo->gr_gid,
+				groups, &info.ngroups);
+			if (ret == -1) {
+				int e = errno;
+				throw SystemException("getgrouplist() failed", e);
+			}
+			info.gidset = shared_array<gid_t>(new gid_t[info.ngroups]);
+			for (int i = 0; i < info.ngroups; i++) {
+				info.gidset[i] = groups[i];
+			}
+		#endif
+	}
+
+	void prepareSwitchingWorkingDirectory(SpawnPreparationInfo &info, const Options &options) const {
+		vector<string> components;
+		split(info.appRootInsideChroot, '/', components);
+		assert(components.front() == "");
+		components.erase(components.begin());
+
+		for (unsigned int i = 0; i < components.size(); i++) {
+			string path;
+			for (unsigned int j = 0; j <= i; j++) {
+				path.append("/");
+				path.append(components[j]);
+			}
+			if (path.empty()) {
+				path = "/";
+			}
+			if (info.chrootDir == "/") {
+				info.appRootPaths.push_back(path);
+			} else {
+				info.appRootPaths.push_back(info.chrootDir + path);
+			}
+			info.appRootPathsInsideChroot.push_back(path);
+		}
+
+		assert(info.appRootPathsInsideChroot.back() == info.appRootInsideChroot);
+	}
+
+	bool shouldLoadShellEnvvars(const Options &options, const SpawnPreparationInfo &preparation) const {
+		if (options.loadShellEnvvars) {
+			string shellName = extractBaseName(preparation.shell);
+			return shellName == "bash" || shellName == "zsh" || shellName == "ksh";
+		} else {
+			return false;
+		}
+	}
+	
+	string serializeEnvvarsFromPoolOptions(const Options &options) const {
+		vector< pair<StaticString, StaticString> >::const_iterator it, end;
+		string result;
+		
+		appendNullTerminatedKeyValue(result, "IN_PASSENGER", "1");
+		appendNullTerminatedKeyValue(result, "PYTHONUNBUFFERED", "1");
+		appendNullTerminatedKeyValue(result, "RAILS_ENV", options.environment);
+		appendNullTerminatedKeyValue(result, "RACK_ENV", options.environment);
+		appendNullTerminatedKeyValue(result, "WSGI_ENV", options.environment);
+		appendNullTerminatedKeyValue(result, "PASSENGER_ENV", options.environment);
+		if (!options.baseURI.empty() && options.baseURI != "/") {
+			appendNullTerminatedKeyValue(result,
+				"RAILS_RELATIVE_URL_ROOT",
+				options.baseURI);
+			appendNullTerminatedKeyValue(result,
+				"RACK_BASE_URI",
+				options.baseURI);
+			appendNullTerminatedKeyValue(result,
+				"PASSENGER_BASE_URI",
+				options.baseURI);
+		}
+		
+		it  = options.environmentVariables.begin();
+		end = options.environmentVariables.end();
+		while (it != end) {
+			appendNullTerminatedKeyValue(result, it->first, it->second);
+			it++;
+		}
+		
+		return Base64::encode(result);
+	}
+
+	void switchUser(const SpawnPreparationInfo &info) {
+		if (info.switchUser) {
+			bool setgroupsCalled = false;
+			#ifdef HAVE_GETGROUPLIST
+				if (info.ngroups <= NGROUPS_MAX) {
+					setgroupsCalled = true;
+					if (setgroups(info.ngroups, info.gidset.get()) == -1) {
+						int e = errno;
+						printf("!> Error\n");
+						printf("!> \n");
+						printf("setgroups(%d, ...) failed: %s (errno=%d)\n",
+							info.ngroups, strerror(e), e);
+						fflush(stdout);
+						_exit(1);
+					}
+				}
+			#endif
+			if (!setgroupsCalled && initgroups(info.username.c_str(), info.gid) == -1) {
+				int e = errno;
+				printf("!> Error\n");
+				printf("!> \n");
+				printf("initgroups() failed: %s (errno=%d)\n",
+					strerror(e), e);
+				fflush(stdout);
+				_exit(1);
+			}
+			if (setgid(info.gid) == -1) {
+				int e = errno;
+				printf("!> Error\n");
+				printf("!> \n");
+				printf("setgid() failed: %s (errno=%d)\n",
+					strerror(e), e);
+				fflush(stdout);
+				_exit(1);
+			}
+			if (setuid(info.uid) == -1) {
+				int e = errno;
+				printf("!> Error\n");
+				printf("!> \n");
+				printf("setuid() failed: %s (errno=%d)\n",
+					strerror(e), e);
+				fflush(stdout);
+				_exit(1);
+			}
+			
+			// We set these environment variables here instead of
+			// in the SpawnPreparer because SpawnPreparer might
+			// be executed by bash, but these environment variables
+			// must be set before bash.
+			setenv("USER", info.username.c_str(), 1);
+			setenv("LOGNAME", info.username.c_str(), 1);
+			setenv("SHELL", info.shell.c_str(), 1);
+			setenv("HOME", info.home.c_str(), 1);
+		}
+	}
+	
+	void setChroot(const SpawnPreparationInfo &info) {
+		if (info.chrootDir != "/") {
+			int ret = chroot(info.chrootDir.c_str());
+			if (ret == -1) {
+				int e = errno;
+				fprintf(stderr, "Cannot chroot() to '%s': %s (errno=%d)\n",
+					info.chrootDir.c_str(),
+					strerror(e),
+					e);
+				fflush(stderr);
+				_exit(1);
+			}
+		}
+	}
+	
+	void setWorkingDirectory(const SpawnPreparationInfo &info) {
+		vector<string>::const_iterator it, end = info.appRootPathsInsideChroot.end();
+		int ret;
+
+		for (it = info.appRootPathsInsideChroot.begin(); it != end; it++) {
+			struct stat buf;
+			ret = stat(it->c_str(), &buf);
+			if (ret == -1 && errno == EACCES) {
+				char parent[PATH_MAX];
+				const char *end = strrchr(it->c_str(), '/');
+				memcpy(parent, it->c_str(), end - it->c_str());
+				parent[end - it->c_str()] = '\0';
+
+				printf("!> Error\n");
+				printf("!> \n");
+				printf("This web application process is being run as user '%s' and group '%s' "
+					"and must be able to access its application root directory '%s'. "
+					"However, the parent directory '%s' has wrong permissions, thereby "
+					"preventing this process from accessing its application root directory. "
+					"Please fix the permissions of the directory '%s' first.\n",
+					info.username.c_str(),
+					info.groupname.c_str(),
+					info.appRootPaths.back().c_str(),
+					parent,
+					parent);
+				fflush(stdout);
+				_exit(1);
+			} else if (ret == -1) {
+				int e = errno;
+				printf("!> Error\n");
+				printf("!> \n");
+				printf("Unable to stat() directory '%s': %s (errno=%d)\n",
+					it->c_str(), strerror(e), e);
+				fflush(stdout);
+				_exit(1);
+			}
+		}
+
+		ret = chdir(info.appRootPathsInsideChroot.back().c_str());
+		if (ret == 0) {
+			setenv("PWD", info.appRootPathsInsideChroot.back().c_str(), 1);
+		} else if (ret == -1 && errno == EACCES) {
+			printf("!> Error\n");
+			printf("!> \n");
+			printf("This web application process is being run as user '%s' and group '%s' "
+				"and must be able to access its application root directory '%s'. "
+				"However this directory is not accessible because it has wrong permissions. "
+				"Please fix these permissions first.\n",
+				info.username.c_str(),
+				info.groupname.c_str(),
+				info.appRootPaths.back().c_str());
+			fflush(stdout);
+			_exit(1);
+		} else {
+			int e = errno;
+			printf("!> Error\n");
+			printf("!> \n");
+			printf("Unable to change working directory to '%s': %s (errno=%d)\n",
+				info.appRootPathsInsideChroot.back().c_str(), strerror(e), e);
+			fflush(stdout);
+			_exit(1);
+		}
+	}
+	
+	/**
+	 * Execute the process spawning negotiation protocol.
+	 */
+	ProcessPtr negotiateSpawn(NegotiationDetails &details) {
+		TRACE_POINT();
+		details.spawnStartTime = SystemTime::getUsec();
+		details.gupid = integerToHex(SystemTime::get() / 60) + "-" +
+			config->randomGenerator->generateAsciiString(11);
+		details.connectPassword = config->randomGenerator->generateAsciiString(43);
+		details.timeout = details.options->startTimeout * 1000;
+		
+		string result;
+		try {
+			result = readMessageLine(details);
+		} catch (const SystemException &e) {
+			throwAppSpawnException("An error occurred while starting the "
+				"web application. There was an I/O error while reading its "
+				"handshake message: " + e.sys(),
+				SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+				details);
+		} catch (const TimeoutException &) {
+			throwAppSpawnException("An error occurred while starting the "
+				"web application: it did not write a handshake message in time.",
+				SpawnException::APP_STARTUP_TIMEOUT,
+				details);
+		}
+		
+		protocol_begin:
+		if (result == "I have control 1.0\n") {
+			UPDATE_TRACE_POINT();
+			sendSpawnRequest(details);
+			try {
+				result = readMessageLine(details);
+			} catch (const SystemException &e) {
+				throwAppSpawnException("An error occurred while starting the "
+					"web application. There was an I/O error while reading its "
+					"startup response: " + e.sys(),
+					SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+					details);
+			} catch (const TimeoutException &) {
+				throwAppSpawnException("An error occurred while starting the "
+					"web application: it did not write a startup response in time.",
+					SpawnException::APP_STARTUP_TIMEOUT,
+					details);
+			}
+			if (result == "Ready\n") {
+				return handleSpawnResponse(details);
+			} else if (result == "Error\n") {
+				handleSpawnErrorResponse(details);
+			} else if (result == "I have control 1.0\n") {
+				goto protocol_begin;
+			} else {
+				handleInvalidSpawnResponseType(result, details);
+			}
+		} else {
+			UPDATE_TRACE_POINT();
+			if (result == "Error\n") {
+				handleSpawnErrorResponse(details);
+			} else {
+				handleInvalidSpawnResponseType(result, details);
+			}
+		}
+		return ProcessPtr(); // Never reached.
+	}
+	
+	void handleSpawnErrorResponse(NegotiationDetails &details) {
+		TRACE_POINT();
+		map<string, string> attributes;
+		
+		while (true) {
+			string line = readMessageLine(details);
+			if (line.empty()) {
+				throwAppSpawnException("An error occurred while starting the "
+					"web application. It unexpected closed the connection while "
+					"sending its startup response.",
+					SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+					details);
+			} else if (line[line.size() - 1] != '\n') {
+				throwAppSpawnException("An error occurred while starting the "
+					"web application. It sent a line without a newline character "
+					"in its startup response.",
+					SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+					details);
+			} else if (line == "\n") {
+				break;
+			}
+			
+			string::size_type pos = line.find(": ");
+			if (pos == string::npos) {
+				throwAppSpawnException("An error occurred while starting the "
+					"web application. It sent a startup response line without "
+					"separator.",
+					SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+					details);
+			}
+			
+			string key = line.substr(0, pos);
+			string value = line.substr(pos + 2, line.size() - pos - 3);
+			attributes[key] = value;
+		}
+		
+		try {
+			string message = details.io.readAll(&details.timeout);
+			SpawnException e("An error occured while starting the web application.",
+				message,
+				attributes["html"] == "true",
+				SpawnException::APP_STARTUP_EXPLAINABLE_ERROR);
+			annotateAppSpawnException(e, details);
+			throw e;
+		} catch (const SystemException &e) {
+			throwAppSpawnException("An error occurred while starting the "
+				"web application. It tried to report an error message, but "
+				"an I/O error occurred while reading this error message: " +
+				e.sys(),
+				SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+				details);
+		} catch (const TimeoutException &) {
+			throwAppSpawnException("An error occurred while starting the "
+				"web application. It tried to report an error message, but "
+				"it took too much time doing that.",
+				SpawnException::APP_STARTUP_TIMEOUT,
+				details);
+		}
+	}
+	
+	void handleInvalidSpawnResponseType(const string &line, NegotiationDetails &details) {
+		throwAppSpawnException("An error occurred while starting "
+			"the web application. It sent an unknown response type \"" +
+			cEscapeString(line) + "\".",
+			SpawnException::APP_STARTUP_PROTOCOL_ERROR,
+			details);
+	}
+	
+public:
+	/**
+	 * Timestamp at which this Spawner was created. Microseconds resolution.
+	 */
+	const unsigned long long creationTime;
+
+	Spawner(const ResourceLocator &_resourceLocator)
+		: resourceLocator(_resourceLocator),
+		  creationTime(SystemTime::getUsec())
+		{ }
+	
+	virtual ~Spawner() { }
+	virtual ProcessPtr spawn(const Options &options) = 0;
+	
+	/** Does not depend on the event loop. */
+	virtual bool cleanable() const {
+		return false;
+	}
+
+	virtual void cleanup() { }
+
+	/** Does not depend on the event loop. */
+	virtual unsigned long long lastUsed() const {
+		return 0;
+	}
+
+	SpawnerConfigPtr getConfig() const {
+		return config;
+	}
+};
+typedef shared_ptr<Spawner> SpawnerPtr;
+
+
+} // namespace ApplicationPool2
+} // namespace Passenger
+
+#endif /* _PASSENGER_APPLICATION_POOL2_SPAWNER_H_ */
diff --git a/ext/common/ApplicationPool2/SpawnerFactory.h b/ext/common/ApplicationPool2/SpawnerFactory.h
new file mode 100644
index 0000000..2f9a388
--- /dev/null
+++ b/ext/common/ApplicationPool2/SpawnerFactory.h
@@ -0,0 +1,140 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_APPLICATION_POOL2_SPAWNER_FACTORY_H_
+#define _PASSENGER_APPLICATION_POOL2_SPAWNER_FACTORY_H_
+
+#include <ApplicationPool2/Spawner.h>
+#include <ApplicationPool2/SmartSpawner.h>
+#include <ApplicationPool2/DirectSpawner.h>
+#include <ApplicationPool2/DummySpawner.h>
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+
+class SpawnerFactory {
+private:
+	SafeLibevPtr libev;
+	ResourceLocator resourceLocator;
+	ServerInstanceDir::GenerationPtr generation;
+	RandomGeneratorPtr randomGenerator;
+	boost::mutex syncher;
+	SpawnerConfigPtr config;
+	DummySpawnerPtr dummySpawner;
+	
+	SpawnerPtr tryCreateSmartSpawner(const Options &options) {
+		string dir = resourceLocator.getHelperScriptsDir();
+		vector<string> preloaderCommand;
+		if (options.appType == "classic-rails") {
+			preloaderCommand.push_back(options.ruby);
+			preloaderCommand.push_back(dir + "/classic-rails-preloader.rb");
+		} else if (options.appType == "rack") {
+			preloaderCommand.push_back(options.ruby);
+			preloaderCommand.push_back(dir + "/rack-preloader.rb");
+		} else {
+			return SpawnerPtr();
+		}
+		return make_shared<SmartSpawner>(libev, resourceLocator,
+			generation, preloaderCommand, options, config);
+	}
+	
+public:
+	SpawnerFactory(const SafeLibevPtr &_libev,
+		const ResourceLocator &_resourceLocator,
+		const ServerInstanceDir::GenerationPtr &_generation,
+		const SpawnerConfigPtr &_config = SpawnerConfigPtr())
+		: libev(_libev),
+		  resourceLocator(_resourceLocator),
+		  generation(_generation)
+	{
+		if (_config == NULL) {
+			config = make_shared<SpawnerConfig>();
+		} else {
+			config = _config;
+		}
+	}
+	
+	virtual ~SpawnerFactory() { }
+	
+	virtual SpawnerPtr create(const Options &options) {
+		if (options.spawnMethod == "smart" || options.spawnMethod == "smart-lv2") {
+			SpawnerPtr spawner = tryCreateSmartSpawner(options);
+			if (spawner == NULL) {
+				spawner = make_shared<DirectSpawner>(libev,
+					resourceLocator, generation, config);
+			}
+			return spawner;
+		} else if (options.spawnMethod == "direct" || options.spawnMethod == "conservative") {
+			shared_ptr<DirectSpawner> spawner = make_shared<DirectSpawner>(libev,
+				resourceLocator, generation, config);
+			return spawner;
+		} else if (options.spawnMethod == "dummy") {
+			syscalls::usleep(config->spawnerCreationSleepTime);
+			return getDummySpawner();
+		} else {
+			throw ArgumentException("Unknown spawn method '" + options.spawnMethod + "'");
+		}
+	}
+
+	/**
+	 * SpawnerFactory always returns the same DummyFactory object upon
+	 * creating a dummy spawner. This allows unit tests to easily
+	 * set debugging options on the spawner.
+	 */
+	DummySpawnerPtr getDummySpawner() {
+		boost::lock_guard<boost::mutex> l(syncher);
+		if (dummySpawner == NULL) {
+			dummySpawner = make_shared<DummySpawner>(resourceLocator, config);
+		}
+		return dummySpawner;
+	}
+
+	/**
+	 * All created Spawner objects share the same SpawnerConfig object.
+	 */
+	SpawnerConfigPtr getConfig() const {
+		return config;
+	}
+
+	RandomGeneratorPtr getRandomGenerator() const {
+		return randomGenerator;
+	}
+
+	const ResourceLocator &getResourceLocator() const {
+		return resourceLocator;
+	}
+};
+
+typedef shared_ptr<SpawnerFactory> SpawnerFactoryPtr;
+
+
+} // namespace ApplicationPool2
+} // namespace Passenger
+
+#endif /* _PASSENGER_APPLICATION_POOL2_SPAWNER_FACTORY_H_ */
diff --git a/ext/common/ApplicationPool2/SuperGroup.h b/ext/common/ApplicationPool2/SuperGroup.h
new file mode 100644
index 0000000..36a72bd
--- /dev/null
+++ b/ext/common/ApplicationPool2/SuperGroup.h
@@ -0,0 +1,673 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_APPLICATION_POOL2_SUPER_GROUP_H_
+#define _PASSENGER_APPLICATION_POOL2_SUPER_GROUP_H_
+
+#include <boost/function.hpp>
+#include <boost/bind.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/make_shared.hpp>
+#include <oxt/thread.hpp>
+#include <vector>
+#include <utility>
+#include <Logging.h>
+#include <ApplicationPool2/Common.h>
+#include <ApplicationPool2/ComponentInfo.h>
+#include <ApplicationPool2/Group.h>
+#include <ApplicationPool2/Options.h>
+
+namespace Passenger {
+namespace ApplicationPool2 {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+
+/**
+ * An abstract container for multiple Groups (applications). It is a support
+ * structure for supporting application sets, multiple applications that can
+ * closely work with each other as if they were a single entity. There's no
+ * support for application sets yet in Phusion Passenger 4, but this class
+ * lays the foundation to make it possible.
+ *
+ * An application set is backed by a directory that contains:
+ *
+ * - The files for the individual applications.
+ * - An application set manifest file that:
+ *   * Describes the containing applications.
+ *   * Describes the application set itself.
+ *   * Describes instructions that must be first
+ *     followed before the application set is usable.
+ *   * Describes instructions that must be followed when the
+ *     application set is to be cleaned up.
+ *
+ * SuperGroup is designed to assume to that loading the manifest file
+ * and following the instructions in them may be a blocking operation
+ * that can take a while. Thus it makes use of background threads to
+ * do most of initialization and destruction work (see `doInitialize()`
+ * and `doDestroy()`). The `state` variable keeps track of things.
+ *
+ * A SuperGroup starts off in the `INITIALIZING` state. When it's done
+ * initializing, it becomes `READY`. If a restart is necessary it will
+ * transition to `RESTARTING` and then eventually back to `READY`.
+ * At any time the SuperGroup may be instructed to destroy itself, in
+ * which case it will first transition to `DESTROYING` and eventually
+ * to `DESTROYED`. Once destroyed, the SuperGroup is reusable so it
+ * can go back to `INITIALIZING` when needed.
+ *
+ *
+ * ## Life time
+ *
+ * A SuperGroup, once created and added to the Pool, is normally not
+ * supposed to be destroyed and removed from the Pool automatically.
+ * This is because a SuperGroup may contain important spawning
+ * parameters such as SuperGroup-specific environment variables.
+ * However the system does not disallow the administrator from
+ * manually removing a SuperGroup from the pool.
+ *
+ *
+ * ## Multiple instances and initialization/destruction
+ *
+ * It is allowed to create multiple SuperGroups backed by the same
+ * application set directory, e.g. to increase concurrency. The system
+ * may destroy a SuperGroup in the background while creating a new
+ * one while that is in progress. This could even happen across processes,
+ * e.g. one process is busy destroying a SuperGroup while another
+ * one is initializing it.
+ *
+ * Furthermore, it is possible for a SuperGroup to receive a get()
+ * command during destruction.
+ *
+ * It is therefore important that `doInitialize()` and `doDestroy()`
+ * do not interfere with other instances of the same code, and can
+ * commit their work atomically.
+ *
+ *
+ * ## Thread-safety
+ *
+ * Except for otherwise documented parts, this class is not thread-safe,
+ * so only access it within the ApplicationPool lock.
+ */
+class SuperGroup: public enable_shared_from_this<SuperGroup> {
+public:
+	enum State {
+		/** This SuperGroup is being initialized. `groups` is empty and
+		 * `get()` actions cannot be immediately satisfied, so they
+		 * are placed in `getWaitlist`. Once the SuperGroup is done
+		 * loading the state it will transition to `READY`. Calling `destroy()`
+		 * will make it transition to `DESTROYING`. If initialization
+		 * failed it will transition to `DESTROYED`.
+		 */
+		INITIALIZING,
+		
+		/** This SuperGroup is loaded and is ready for action. From
+		 * here the state can transition to `RESTARTING` or `DESTROYING`.
+		 */
+		READY,
+		
+		/** This SuperGroup is being restarted. The SuperGroup
+		 * information is being reloaded from the data source
+		 * and processes are being restarted. In this state
+		 * `get()` actions can still be statisfied, and the data
+		 * structures still contain the old information. Once reloading
+		 * is done the data structures will be atomically swapped
+		 * with the newly reloaded ones. The old structures will be
+		 * destroyed in the background.
+		 * Once the restart is completed, the state will transition
+		 * to `READY`.
+		 * Re-restarting won't have any effect in this state.
+		 * `destroy()` will cause the restart to be aborted and will
+		 * cause a transition to `DESTROYING`.
+		 */
+		RESTARTING,
+		
+		/** This SuperGroup is being destroyed. Processes are being shut
+		 * down and other resources are being cleaned up. In this state,
+		 * `groups` is empty.
+		 * Restarting won't have any effect, but `get()` will cause a
+		 * transition to `INITIALIZING`.
+		 */
+		DESTROYING,
+		
+		/** This SuperGroup has been destroyed and all resources have been
+		 * freed. Restarting won't have any effect but calling `get()` will
+		 * make it transition to `INITIALIZING`.
+		 */
+		DESTROYED
+	};
+
+	enum ShutdownResult {
+		/** The SuperGroup has been successfully destroyed. */
+		SUCCESS,
+		/** The SuperGroup was not destroyed because a get or restart
+		 * request came in while destroying.
+		 */
+		CANCELED
+	};
+
+	typedef function<void (ShutdownResult result)> ShutdownCallback;
+	
+private:
+	friend class Pool;
+	friend class Group;
+	
+	Options options;
+	/** A number for concurrency control, incremented every time the state changes.
+	 * Every background thread that SuperGroup spawns knows the generation number
+	 * from when the thread was spawned. A thread generally does some work outside
+	 * the lock, then grabs the lock and updates the information in this SuperGroup
+	 * with the results of the work. But before updating happens it first checks
+	 * whether the generation number is as expected, so increasing this generation
+	 * number will prevent old threads from updating the information with possibly
+	 * now-stale information. It is a good way to prevent A-B-A concurrency
+	 * problems.
+	 */
+	unsigned int generation;
+	
+	
+	// Thread-safe.
+	static boost::mutex &getPoolSyncher(const PoolPtr &pool);
+	static void runAllActions(const vector<Callback> &actions);
+	string generateSecret() const;
+	
+	void createInterruptableThread(const function<void ()> &func, const string &name,
+		unsigned int stackSize);
+	
+	void verifyInvariants() const {
+		// !a || b: logical equivalent of a IMPLIES b.
+		
+		assert(groups.empty() ==
+			(state == INITIALIZING || state == DESTROYING || state == DESTROYED));
+		assert((defaultGroup == NULL) ==
+			(state == INITIALIZING || state == DESTROYING || state == DESTROYED));
+		assert(!( state == READY || state == RESTARTING || state == DESTROYING || state == DESTROYED ) ||
+			( getWaitlist.empty() ));
+		assert(!( state == DESTROYED ) || ( detachedGroups.empty() ));
+	}
+	
+	void setState(State newState) {
+		state = newState;
+		generation++;
+	}
+
+	vector<ComponentInfo> loadComponentInfos(const Options &options) const {
+		vector<ComponentInfo> infos;
+		ComponentInfo info;
+		info.name = "default";
+		info.isDefault = true;
+		infos.push_back(info);
+		return infos;
+	}
+	
+	Group *findDefaultGroup(const vector<GroupPtr> &groups) const {
+		vector<GroupPtr>::const_iterator it;
+		
+		for (it = groups.begin(); it != groups.end(); it++) {
+			const GroupPtr &group = *it;
+			if (group->componentInfo.isDefault) {
+				return group.get();
+			}
+		}
+		return NULL;
+	}
+	
+	pair<GroupPtr, unsigned int> findGroupCorrespondingToComponent(
+		const vector<GroupPtr> &groups, const ComponentInfo &info) const
+	{
+		unsigned int i;
+		for (i = 0; i < groups.size(); i++) {
+			const GroupPtr &group = groups[i];
+			if (group->componentInfo.name == info.name) {
+				return make_pair(const_cast<GroupPtr &>(group), i);
+			}
+		}
+		return make_pair(GroupPtr(), 0);
+	}
+	
+	static void oneGroupHasBeenShutDown(SuperGroupPtr self, GroupPtr group) {
+		// This function is either called from the pool event loop or directly from
+		// the detachAllGroups post lock actions. In both cases getPool() is never NULL.
+		PoolPtr pool = self->getPool();
+		boost::lock_guard<boost::mutex> lock(self->getPoolSyncher(pool));
+
+		vector<GroupPtr>::iterator it, end = self->detachedGroups.end();
+		for (it = self->detachedGroups.begin(); it != end; it++) {
+			if (*it == group) {
+				self->detachedGroups.erase(it);
+				break;
+			}
+		}
+	}
+	
+	/** One of the post lock actions can potentially perform a long-running
+	 * operation, so running them in a thread is advised.
+	 */
+	void detachAllGroups(vector<GroupPtr> &groups, vector<Callback> &postLockActions) {
+		foreach (const GroupPtr &group, groups) {
+			// doRestart() may temporarily nullify elements in 'groups'.
+			if (group == NULL) {
+				continue;
+			}
+			
+			while (!group->getWaitlist.empty()) {
+				getWaitlist.push(group->getWaitlist.front());
+				group->getWaitlist.pop();
+			}
+			detachedGroups.push_back(group);
+			group->shutdown(
+				boost::bind(oneGroupHasBeenShutDown,
+					shared_from_this(),
+					group),
+				postLockActions
+			);
+		}
+
+		groups.clear();
+	}
+	
+	void assignGetWaitlistToGroups(vector<Callback> &postLockActions) {
+		while (!getWaitlist.empty()) {
+			GetWaiter &waiter = getWaitlist.front();
+			Group *group = route(waiter.options);
+			Options adjustedOptions = waiter.options;
+			adjustOptions(adjustedOptions, group);
+			SessionPtr session = group->get(adjustedOptions, waiter.callback);
+			if (session != NULL) {
+				postLockActions.push_back(boost::bind(
+					waiter.callback, session, ExceptionPtr()));
+			}
+			getWaitlist.pop();
+		}
+	}
+	
+	void adjustOptions(Options &options, const Group *group) const {
+		// No-op.
+	}
+
+	static void doInitialize(SuperGroupPtr self, Options options, unsigned int generation) {
+		self->realDoInitialize(options, generation);
+	}
+
+	static void doRestart(SuperGroupPtr self, Options options, unsigned int generation) {
+		self->realDoRestart(options, generation);
+	}
+
+	void realDoInitialize(const Options &options, unsigned int generation);
+	void realDoRestart(const Options &options, unsigned int generation);
+	
+	void doDestroy(SuperGroupPtr self, unsigned int generation, ShutdownCallback callback) {
+		TRACE_POINT();
+		
+		// In the future we can run more destruction code here,
+		// without holding the lock. Note that any destruction
+		// code may not interfere with doInitialize().
+		
+		// Wait until 'detachedGroups' is empty.
+		UPDATE_TRACE_POINT();
+		PoolPtr pool = getPool();
+		unique_lock<boost::mutex> lock(getPoolSyncher(pool));
+		verifyInvariants();
+		while (true) {
+			if (OXT_UNLIKELY(this->generation != generation)) {
+				UPDATE_TRACE_POINT();
+				lock.unlock();
+				if (callback) {
+					callback(CANCELED);
+				}
+				return;
+			} else if (detachedGroups.empty()) {
+				break;
+			} else {
+				UPDATE_TRACE_POINT();
+				lock.unlock();
+				syscalls::usleep(10000);
+				lock.lock();
+				verifyInvariants();
+			}
+		}
+		
+		UPDATE_TRACE_POINT();
+		assert(state == DESTROYING);
+		state = DESTROYED;
+		verifyInvariants();
+
+		lock.unlock();
+		if (callback) {
+			callback(SUCCESS);
+		}
+	}
+	
+	/*********************/
+	
+	/*********************/
+	
+public:
+	mutable boost::mutex backrefSyncher;
+	const weak_ptr<Pool> pool;
+	
+	State state;
+	string name;
+	string secret;
+	
+	/** Invariant:
+	 * groups.empty() == (state == INITIALIZING || state == DESTROYING || state == DESTROYED)
+	 */
+	vector<GroupPtr> groups;
+	
+	/** Invariant:
+	 * (defaultGroup == NULL) == (state == INITIALIZING || state == DESTROYING || state == DESTROYED)
+	 */
+	Group *defaultGroup;
+	
+	/**
+	 * get() requests for this super group that cannot be immediately satisfied
+	 * are put on this wait list, which must be processed as soon as the
+	 * necessary resources have become free. Requests must wait when a SuperGroup
+	 * is initializing.
+	 *
+	 * Invariant:
+	 *    if state == READY || state == RESTARTING || state == DESTROYING || state == DESTROYED:
+	 *       getWaitlist.empty()
+	 * Equivalently:
+	 *    if state != INITIALIZING:
+	 *       getWaitlist.empty()
+	 * Equivalently:
+	 *    if !getWaitlist.empty():
+	 *       state == INITIALIZING
+	 */
+	std::queue<GetWaiter> getWaitlist;
+
+	/**
+	 * Groups which are being shut down right now. These Groups contain a
+	 * reference to the containg SuperGroup so that the SuperGroup is not
+	 * actually destroyed until all Groups in this collection are done
+	 * shutting down.
+	 *
+	 * Invariant:
+	 *    if state == DESTROYED:
+	 *       detachedGroups.empty()
+	 */
+	vector<GroupPtr> detachedGroups;
+	
+	/** One MUST call initialize() after construction because shared_from_this()
+	 * is not available in the constructor.
+	 */
+	SuperGroup(const PoolPtr &_pool, const Options &options)
+		: pool(_pool)
+	{
+		this->options = options.copyAndPersist().clearLogger();
+		this->name = options.getAppGroupName();
+		secret = generateSecret();
+		state = INITIALIZING;
+		defaultGroup = NULL;
+		generation = 0;
+	}
+
+	~SuperGroup() {
+		if (OXT_UNLIKELY(state != DESTROYED)) {
+			P_BUG("You must call Group::destroy(..., false) before "
+				"actually destroying the SuperGroup.");
+		}
+		verifyInvariants();
+	}
+
+	void initialize() {
+		createInterruptableThread(
+			boost::bind(
+				doInitialize,
+				shared_from_this(),
+				options.copyAndPersist(),
+				generation),
+			"SuperGroup initializer: " + name,
+			POOL_HELPER_THREAD_STACK_SIZE);
+	}
+	
+	/**
+	 * Thread-safe.
+	 *
+	 * As long as 'state' != DESTROYED, result != NULL.
+	 * But in thread callbacks in this file, getPool() is never NULL
+	 * because Pool::destroy() joins all threads, so Pool can never
+	 * be destroyed before all thread callbacks have finished.
+	 */
+	PoolPtr getPool() const {
+		return pool.lock();
+	}
+
+	bool isAlive() const {
+		return state != DESTROYING && state != DESTROYED;
+	}
+	
+	const char *getStateName() const {
+		switch (state) {
+		case INITIALIZING:
+			return "INITIALIZING";
+		case READY:
+			return "READY";
+		case RESTARTING:
+			return "RESTARTING";
+		case DESTROYING:
+			return "DESTROYING";
+		case DESTROYED:
+			return "DESTROYED";
+		default:
+			P_BUG("Unknown SuperGroup state " << (int) state);
+			return NULL; // Shut up compiler warning.
+		}
+	}
+
+	/**
+	 * If `allowReinitialization` is true then destroying a SuperGroup that
+	 * has get waiters will make it reinitialize. Otherwise this SuperGroup
+	 * will be forcefully set to the `DESTROYING` state and `getWaitlist` will be
+	 * left untouched; in this case it is up to the caller to empty
+	 * the `getWaitlist` and do something with it, otherwise the invariant
+	 * will be broken.
+	 *
+	 * One of the post lock actions can potentially perform a long-running
+	 * operation, so running them in a thread is advised.
+	 */
+	void destroy(bool allowReinitialization, vector<Callback> &postLockActions,
+		const ShutdownCallback &callback)
+	{
+		verifyInvariants();
+		switch (state) {
+		case INITIALIZING:
+		case READY:
+		case RESTARTING:
+			detachAllGroups(groups, postLockActions);
+			defaultGroup = NULL;
+			if (getWaitlist.empty() || !allowReinitialization) {
+				setState(DESTROYING);
+				createInterruptableThread(
+					boost::bind(
+						&SuperGroup::doDestroy,
+						this,
+						// Keep reference to self to prevent destruction.
+						shared_from_this(),
+						generation,
+						callback),
+					"SuperGroup destroyer: " + name,
+					POOL_HELPER_THREAD_STACK_SIZE + 1024 * 256);
+			} else {
+				// Spawning this thread before setState() so that
+				// it doesn't change the state when done.
+				createInterruptableThread(
+					boost::bind(
+						&SuperGroup::doDestroy,
+						this,
+						// Keep reference to self to prevent destruction.
+						shared_from_this(),
+						generation,
+						ShutdownCallback()),
+					"SuperGroup destroyer: " + name,
+					POOL_HELPER_THREAD_STACK_SIZE + 1024 * 256);
+				setState(INITIALIZING);
+				createInterruptableThread(
+					boost::bind(
+						doInitialize,
+						shared_from_this(),
+						options.copyAndPersist(),
+						generation),
+					"SuperGroup initializer: " + name,
+					POOL_HELPER_THREAD_STACK_SIZE + 1024 * 256);
+				if (callback) {
+					postLockActions.push_back(boost::bind(callback, CANCELED));
+				}
+			}
+			break;
+		case DESTROYING:
+		case DESTROYED:
+			break;
+		default:
+			P_BUG("Unknown SuperGroup state " << (int) state);
+		}
+		if (allowReinitialization) {
+			verifyInvariants();
+		}
+	}
+	
+	/**
+	 * @post
+	 *    if result:
+	 *       getWaitlist.empty()
+	 */
+	bool garbageCollectable(unsigned long long now = 0) const {
+		/* if (state == READY) {
+			vector<GroupPtr>::const_iterator it, end = groups.end();
+			bool result = true;
+			
+			for (it = groups.begin(); result && it != end; it++) {
+				result = result && (*it)->garbageCollectable(now);
+			}
+			assert(!result || getWaitlist.empty());
+			return result;
+		} else {
+			assert(!(state == DESTROYED) || getWaitlist.empty());
+			return state == DESTROYED;
+		} */
+		return false;
+	}
+	
+	SessionPtr get(const Options &newOptions, const GetCallback &callback) {
+		switch (state) {
+		case INITIALIZING:
+			getWaitlist.push(GetWaiter(newOptions, callback));
+			verifyInvariants();
+			return SessionPtr();
+		case READY:
+		case RESTARTING:
+			if (needsRestart()) {
+				restart(newOptions);
+			}
+			if (groups.size() > 1) {
+				Group *group = route(newOptions);
+				Options adjustedOptions = newOptions;
+				adjustOptions(adjustedOptions, group);
+				verifyInvariants();
+				return group->get(adjustedOptions, callback);
+			} else {
+				verifyInvariants();
+				return defaultGroup->get(newOptions, callback);
+			}
+		case DESTROYING:
+		case DESTROYED:
+			getWaitlist.push(GetWaiter(newOptions, callback));
+			setState(INITIALIZING);
+			createInterruptableThread(
+				boost::bind(
+					doInitialize,
+					shared_from_this(),
+					newOptions.copyAndPersist().clearLogger(),
+					generation),
+				"SuperGroup initializer: " + name,
+				POOL_HELPER_THREAD_STACK_SIZE);
+			verifyInvariants();
+			return SessionPtr();
+		default:
+			P_BUG("Unknown SuperGroup state " << (int) state);
+			return SessionPtr(); // Shut up compiler warning.
+		};
+	}
+	
+	Group *route(const Options &options) const {
+		return defaultGroup;
+	}
+	
+	unsigned int utilization() const {
+		vector<GroupPtr>::const_iterator it, end = groups.end();
+		unsigned int result = 0;
+		
+		for (it = groups.begin(); it != end; it++) {
+			result += (*it)->utilization();
+		}
+		if (state == INITIALIZING || state == RESTARTING) {
+			result++;
+		}
+		return result;
+	}
+	
+	bool needsRestart() const {
+		return false;
+	}
+	
+	void restart(const Options &options) {
+		verifyInvariants();
+		if (state == READY) {
+			createInterruptableThread(
+				boost::bind(
+					doRestart,
+					// Keep reference to self to prevent destruction.
+					shared_from_this(),
+					options.copyAndPersist().clearLogger(),
+					generation),
+				"SuperGroup restarter: " + name,
+				POOL_HELPER_THREAD_STACK_SIZE);
+			state = RESTARTING;
+		}
+		verifyInvariants();
+	}
+
+	unsigned int getProcessCount() const {
+		unsigned int result = 0;
+		vector<GroupPtr>::const_iterator g_it, g_end = groups.end();
+		for (g_it = groups.begin(); g_it != g_end; g_it++) {
+			const GroupPtr &group = *g_it;
+			result += group->enabledCount + group->disablingCount + group->disabledCount;
+		}
+		return result;
+	}
+
+	string inspect() const {
+		return name;
+	}
+};
+
+
+} // namespace ApplicationPool2
+} // namespace Passenger
+
+#endif /* _PASSENGER_APPLICATION_POOL2_SUPER_GROUP_H_ */
diff --git a/ext/common/BackgroundEventLoop.cpp b/ext/common/BackgroundEventLoop.cpp
new file mode 100644
index 0000000..bb434f9
--- /dev/null
+++ b/ext/common/BackgroundEventLoop.cpp
@@ -0,0 +1,123 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011, 2012 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#include <cstdlib>
+#include <boost/bind.hpp>
+#include <boost/make_shared.hpp>
+#include <oxt/thread.hpp>
+#include <ev++.h>
+#include <BackgroundEventLoop.h>
+#include <Exceptions.h>
+#include <SafeLibev.h>
+
+namespace Passenger {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+
+struct BackgroundEventLoopPrivate {
+	oxt::thread *thr;
+	boost::mutex lock;
+	condition_variable cond;
+	bool started;
+};
+
+static void
+signalBackgroundEventLoopExit(struct ev_loop *loop, ev_async *async, int revents) {
+	BackgroundEventLoop *bg = (BackgroundEventLoop *) async->data;
+	ev_break(bg->loop, EVBREAK_ALL);
+}
+
+static void
+startBackgroundLoop(BackgroundEventLoop *bg) {
+	unique_lock<boost::mutex> l(bg->priv->lock);
+	bg->safe->setCurrentThread();
+	bg->priv->started = true;
+	bg->priv->cond.notify_all();
+	l.unlock();
+	ev_run(bg->loop, 0);
+}
+
+BackgroundEventLoop::BackgroundEventLoop(bool scalable) {
+	TRACE_POINT();
+	
+	if (scalable) {
+		loop = ev_loop_new(EVBACKEND_KQUEUE);
+		if (loop == NULL) {
+			loop = ev_loop_new(EVBACKEND_EPOLL);
+		}
+		if (loop == NULL) {
+			loop = ev_loop_new(EVFLAG_AUTO);
+		}
+	} else {
+		loop = ev_loop_new(EVBACKEND_POLL);
+	}
+	if (loop == NULL) {
+		throw RuntimeException("Cannot create an event loop");
+	}
+
+	async = (ev_async *) malloc(sizeof(ev_async));
+	async->data = this;
+	ev_async_init(async, signalBackgroundEventLoopExit);
+	ev_async_start(loop, async);
+	safe = make_shared<SafeLibev>(loop);
+	priv = new BackgroundEventLoopPrivate();
+	priv->thr = NULL;
+	priv->started = false;
+}
+
+BackgroundEventLoop::~BackgroundEventLoop() {
+	stop();
+	ev_async_stop(loop, async);
+	delete priv;
+	free(async);
+}
+
+void
+BackgroundEventLoop::start(const string &threadName, unsigned int stackSize) {
+	assert(priv->thr == NULL);
+	unique_lock<boost::mutex> l(priv->lock);
+	priv->thr = new oxt::thread(
+		boost::bind(startBackgroundLoop, this),
+		threadName,
+		stackSize
+	);
+	while (!priv->started) {
+		priv->cond.wait(l);
+	}
+}
+
+void
+BackgroundEventLoop::stop() {
+	if (priv->thr != NULL) {
+		ev_async_send(loop, async);
+		priv->thr->join();
+		priv->thr = NULL;
+	}
+}
+
+
+} // namespace Passenger
diff --git a/ext/common/BackgroundEventLoop.h b/ext/common/BackgroundEventLoop.h
new file mode 100644
index 0000000..28d6eb0
--- /dev/null
+++ b/ext/common/BackgroundEventLoop.h
@@ -0,0 +1,61 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011, 2012 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _BACKGROUND_EVENT_LOOP_H_
+#define _BACKGROUND_EVENT_LOOP_H_
+
+#include <boost/shared_ptr.hpp>
+#include <string>
+
+extern "C" {
+	struct ev_loop;
+	struct ev_async;
+}
+
+namespace Passenger {
+	using namespace std;
+	using namespace boost;
+
+	class SafeLibev;
+	struct BackgroundEventLoopPrivate;
+
+	/**
+	 * Implements a libev event loop that runs in a background thread.
+	 */
+	struct BackgroundEventLoop {
+		struct ev_loop *loop;
+		ev_async *async;
+		shared_ptr<SafeLibev> safe;
+		BackgroundEventLoopPrivate *priv;
+		
+		BackgroundEventLoop(bool scalable = false);
+		~BackgroundEventLoop();
+		
+		void start(const string &threadName = "", unsigned int stackSize = 1024 * 1024);
+		void stop();
+	};
+
+}
+
+#endif /* _BACKGROUND_EVENT_LOOP_H_ */
diff --git a/ext/common/Constants.h b/ext/common/Constants.h
index 3f4e74a..042076e 100644
--- a/ext/common/Constants.h
+++ b/ext/common/Constants.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010, 2011, 2012 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -25,24 +25,62 @@
 #ifndef _PASSENGER_CONSTANTS_H_
 #define _PASSENGER_CONSTANTS_H_
 
-/* Don't forget to update lib/phusion_passenger.rb too. */
-#define PASSENGER_VERSION "3.0.13"
+/* Constants.h is automatically generated from Constants.h.erb by the build system.
+ * Most constants are derived from lib/phusion_passenger/constants.rb.
+ *
+ * To force regenerating this file:
+ *   rm -f ext/common/Constants.h
+ *   rake ext/common/Constants.h
+ */
 
-#define FEEDBACK_FD 3
+#define DEFAULT_BACKEND_ACCOUNT_RIGHTS Account::DETACH
 
-#define DEFAULT_LOG_LEVEL 0
-#define DEFAULT_MAX_POOL_SIZE 6
-#define DEFAULT_POOL_IDLE_TIME 300
-#define DEFAULT_MAX_INSTANCES_PER_APP 0
-#define DEFAULT_WEB_APP_USER "nobody"
-#define DEFAULT_ANALYTICS_LOG_USER DEFAULT_WEB_APP_USER
-#define DEFAULT_ANALYTICS_LOG_GROUP ""
-#define DEFAULT_ANALYTICS_LOG_PERMISSIONS "u=rwx,g=rx,o=rx"
-#define DEFAULT_UNION_STATION_GATEWAY_ADDRESS "gateway.unionstationapp.com"
-#define DEFAULT_UNION_STATION_GATEWAY_PORT 443
 
-#define MESSAGE_SERVER_MAX_USERNAME_SIZE 100
-#define MESSAGE_SERVER_MAX_PASSWORD_SIZE 100
-#define DEFAULT_BACKEND_ACCOUNT_RIGHTS Account::DETACH
+	#define DEFAULT_LOG_LEVEL 0
+
+	#define DEFAULT_RUBY "ruby"
+
+	#define DEFAULT_PYTHON "python"
+
+	#define DEFAULT_MAX_POOL_SIZE 6
+
+	#define DEFAULT_POOL_IDLE_TIME 300
+
+	#define DEFAULT_MAX_INSTANCES_PER_APP 0
+
+	#define DEFAULT_WEB_APP_USER "nobody"
+
+	#define DEFAULT_ANALYTICS_LOG_USER "nobody"
+
+	#define DEFAULT_ANALYTICS_LOG_GROUP ""
+
+	#define DEFAULT_ANALYTICS_LOG_PERMISSIONS "u=rwx,g=rx,o=rx"
+
+	#define DEFAULT_UNION_STATION_GATEWAY_ADDRESS "gateway.unionstationapp.com"
+
+	#define DEFAULT_UNION_STATION_GATEWAY_PORT 443
+
+	#define MESSAGE_SERVER_MAX_USERNAME_SIZE 100
+
+	#define MESSAGE_SERVER_MAX_PASSWORD_SIZE 100
+
+	#define POOL_HELPER_THREAD_STACK_SIZE 262144
+
+	#define PROCESS_SHUTDOWN_TIMEOUT 60
+
+	#define PROCESS_SHUTDOWN_TIMEOUT_DISPLAY "1 minute"
+
+	#define PASSENGER_VERSION "4.0.10"
+
+	#define SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION 1
+
+	#define SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION 0
+
+	#define SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION 2
+
+	#define SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION 0
+
+	#define FEEDBACK_FD 3
+
 
 #endif /* _PASSENGER_CONSTANTS_H */
diff --git a/ext/common/Constants.h.erb b/ext/common/Constants.h.erb
new file mode 100644
index 0000000..f82a6a6
--- /dev/null
+++ b/ext/common/Constants.h.erb
@@ -0,0 +1,42 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_CONSTANTS_H_
+#define _PASSENGER_CONSTANTS_H_
+
+/* Constants.h is automatically generated from Constants.h.erb by the build system.
+ * Most constants are derived from lib/phusion_passenger/constants.rb.
+ *
+ * To force regenerating this file:
+ *   rm -f ext/common/Constants.h
+ *   rake ext/common/Constants.h
+ */
+
+#define DEFAULT_BACKEND_ACCOUNT_RIGHTS Account::DETACH
+
+<% for constant_name in PhusionPassenger::SharedConstants.constants %>
+	#define <%= constant_name %> <%=PhusionPassenger::SharedConstants.const_get(constant_name).inspect %>
+<% end %>
+
+#endif /* _PASSENGER_CONSTANTS_H */
diff --git a/ext/common/EventedBufferedInput.h b/ext/common/EventedBufferedInput.h
new file mode 100644
index 0000000..e0a5920
--- /dev/null
+++ b/ext/common/EventedBufferedInput.h
@@ -0,0 +1,458 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011, 2012 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _EVENTED_BUFFERED_INPUT_H_
+#define _EVENTED_BUFFERED_INPUT_H_
+
+#include <cstdio>
+#include <cstddef>
+#include <cassert>
+
+#include <sstream>
+#include <string>
+
+#include <boost/bind.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <oxt/system_calls.hpp>
+#include <ev++.h>
+
+#include <SafeLibev.h>
+#include <FileDescriptor.h>
+#include <StaticString.h>
+#include <Logging.h>
+#include <Utils/StrIntUtils.h>
+
+namespace Passenger {
+
+using namespace boost;
+using namespace oxt;
+
+#define EBI_TRACE(expr) P_TRACE(3, "[EventedBufferedInput " << this << " " << inspect() << "] " << expr)
+
+/**
+ * Provides input buffering services for non-blocking sockets in evented I/O systems.
+ *
+ * Wrap an EventedBufferedInput around a socket and provide a data handler callback.
+ * The handler is called every time there is incoming socket data. The handler must return
+ * the number of bytes that it has actually consumed. If not everything has been
+ * consumed, then the handler will be called with the remaining data in the next
+ * tick.
+ */
+template<size_t bufferSize = 1024 * 8>
+class EventedBufferedInput: public enable_shared_from_this< EventedBufferedInput<bufferSize> > {
+private:
+	enum State {
+		LIVE,
+		/**
+		 * @invariant
+		 *    paused
+		 *    socketPaused
+		 */
+		END_OF_STREAM,
+		/**
+		 * @invariant
+		 *    paused
+		 *    socketPaused
+		 */
+		READ_ERROR,
+		CLOSED
+	};
+
+	SafeLibev *libev;
+	FileDescriptor fd;
+	ev::io watcher;
+	StaticString buffer;
+
+	State state: 2;
+	/**
+	 * Whether this EventedBufferedInput is paused (not started). If it's
+	 * paused it should not emit data events.
+	 * 
+	 * @invariant
+	 *    if paused:
+	 *       socketPaused
+	 */
+	bool paused: 1;
+	/**
+	 * Whether the underlying socket is also paused. This does not
+	 * necessarily mean the EventedBufferedInput is also paused because
+	 * it may be emitting data events from its internal buffer.
+	 */
+	bool socketPaused: 1;
+	/**
+	 * Whether the code is inside a processingBuffer() call.
+	 */
+	bool processingBuffer: 1;
+	/**
+	 * Whether processBuffer() is scheduled to be called in the next
+	 * event loop iteration.
+	 */
+	bool nextTickInstalled: 1;
+	/**
+	 * Increment this number to ensure that previously scheduled
+	 * processBuffer() calls will do nothing, effectively canceling
+	 * its scheduled calls.
+	 */
+	unsigned int generation;
+	int error;
+
+	char bufferData[bufferSize];
+
+	void verifyInvariants() {
+		// !a || b: logical equivalent of a IMPLIES b.
+		
+		assert(!( state == END_OF_STREAM ) || ( paused ));
+		assert(!( state == END_OF_STREAM ) || ( socketPaused ));
+		
+		assert(!( state == READ_ERROR ) || ( paused ));
+		assert(!( state == READ_ERROR ) || ( socketPaused ));
+		
+		assert(!( paused ) || ( socketPaused ));
+	}
+
+	void resetCallbackFields() {
+		onData = NULL;
+		onError = NULL;
+		userData = NULL;
+	}
+
+	void onReadable(ev::io &watcher, int revents) {
+		// Keep 'this' alive until function exit.
+		shared_ptr< EventedBufferedInput<bufferSize> > self = EventedBufferedInput<bufferSize>::shared_from_this();
+
+		EBI_TRACE("onReadable");
+		verifyInvariants();
+		assert(!nextTickInstalled);
+
+		ssize_t ret = readSocket(bufferData, bufferSize);
+		if (ret == -1) {
+			if (errno != EAGAIN) {
+				error = errno;
+				EBI_TRACE("read error " << error << " (" << strerror(error) << ")");
+				assert(state == LIVE);
+				assert(!socketPaused);
+				assert(buffer.empty());
+				assert(!paused);
+
+				watcher.stop();
+				state = READ_ERROR;
+				paused = true;
+				socketPaused = true;
+				verifyInvariants();
+				if (onError != NULL) {
+					onError(self, "Cannot read from socket", error);
+					verifyInvariants();
+				}
+			}
+
+		} else if (ret == 0) {
+			EBI_TRACE("end of stream");
+			assert(state == LIVE);
+			assert(!socketPaused);
+			assert(buffer.empty());
+			assert(!paused);
+
+			watcher.stop();
+			state = END_OF_STREAM;
+			paused = true;
+			socketPaused = true;
+			verifyInvariants();
+			onData(self, StaticString());
+			verifyInvariants();
+
+		} else {
+			EBI_TRACE("read " << ret << " bytes");
+			assert(state == LIVE);
+			assert(!socketPaused);
+			assert(buffer.empty());
+			assert(!paused);
+
+			buffer = StaticString(bufferData, ret);
+			processBuffer();
+			verifyInvariants();
+		}
+	}
+
+	void processBufferInNextTick() {
+		if (!nextTickInstalled) {
+			nextTickInstalled = true;
+			libev->runLater(boost::bind(
+				realProcessBufferInNextTick,
+				weak_ptr< EventedBufferedInput<bufferSize> >(this->shared_from_this()),
+				generation
+			));
+		}
+	}
+
+	static void realProcessBufferInNextTick(weak_ptr< EventedBufferedInput<bufferSize> > wself,
+		unsigned int generation)
+	{
+		shared_ptr< EventedBufferedInput<bufferSize> > self = wself.lock();
+		if (self != NULL && generation == self->generation) {
+			self->verifyInvariants();
+			self->nextTickInstalled = false;
+			self->processBuffer();
+			self->verifyInvariants();
+		}
+	}
+
+	struct SetProcessingBufferToFalse {
+		EventedBufferedInput<bufferSize> *self;
+
+		SetProcessingBufferToFalse(EventedBufferedInput<bufferSize> *_self) {
+			self = _self;
+		}
+
+		~SetProcessingBufferToFalse() {
+			self->processingBuffer = false;
+		}
+	};
+
+	void processBuffer() {
+		EBI_TRACE("processBuffer");
+		assert(!processingBuffer);
+		processingBuffer = true;
+		SetProcessingBufferToFalse flagGuard(this);
+
+		if (state == CLOSED) {
+			return;
+		}
+		assert(state == LIVE);
+		if (paused || buffer.empty() || fd == -1) {
+			return;
+		}
+
+		assert(buffer.size() > 0);
+		size_t consumed = onData(EventedBufferedInput<bufferSize>::shared_from_this(),
+			buffer);
+		EBI_TRACE("Consumed " << consumed << " bytes");
+		if (state == CLOSED) {
+			return;
+		}
+		if (consumed == buffer.size()) {
+			buffer = StaticString();
+			if (!paused && socketPaused) {
+				socketPaused = false;
+				watcher.start();
+			}
+			cancelScheduledProcessBufferCall();
+		} else {
+			buffer = buffer.substr(consumed);
+			if (!socketPaused) {
+				socketPaused = true;
+				watcher.stop();
+			}
+			if (!paused) {
+				// Consume rest of the data in the next tick.
+				EBI_TRACE("Consume rest in next tick");
+				processBufferInNextTick();
+			} else {
+				cancelScheduledProcessBufferCall();
+			}
+		}
+
+		afterProcessingBuffer();
+	}
+
+	void cancelScheduledProcessBufferCall() {
+		if (nextTickInstalled) {
+			nextTickInstalled = false;
+			generation++;
+		}
+	}
+
+	void _reset(SafeLibev *libev, const FileDescriptor &fd, bool firstTime = false) {
+		if (firstTime) {
+			generation = 0;
+		} else {
+			verifyInvariants();
+		}
+		this->libev = libev;
+		this->fd = fd;
+		buffer = StaticString();
+		state = LIVE;
+		paused = true;
+		socketPaused = true;
+		processingBuffer = false;
+		nextTickInstalled = false;
+		generation++;
+		error = 0;
+		if (watcher.is_active()) {
+			watcher.stop();
+		}
+		if (libev != NULL) {
+			watcher.set(libev->getLoop());
+		}
+		if (fd != -1) {
+			watcher.set(fd, ev::READ);
+		}
+		verifyInvariants();
+	}
+
+protected:
+	virtual ssize_t readSocket(void *buf, size_t n) {
+		return syscalls::read(fd, buf, n);
+	}
+
+	virtual void afterProcessingBuffer() {
+		// Do nothing. To be overridden in unit tests.
+	}
+
+public:
+	typedef size_t (*DataCallback)(const shared_ptr< EventedBufferedInput<bufferSize> > &source, const StaticString &data);
+	typedef void (*ErrorCallback)(const shared_ptr< EventedBufferedInput<bufferSize> > &source, const char *message, int errnoCode);
+
+	DataCallback onData;
+	ErrorCallback onError;
+	void *userData;
+
+	EventedBufferedInput() {
+		resetCallbackFields();
+		_reset(NULL, FileDescriptor(), true);
+		watcher.set<EventedBufferedInput<bufferSize>,
+			&EventedBufferedInput<bufferSize>::onReadable>(this);
+		EBI_TRACE("created");
+		verifyInvariants();
+	}
+
+	EventedBufferedInput(SafeLibev *libev, const FileDescriptor &fd) {
+		resetCallbackFields();
+		_reset(libev, fd, true);
+		watcher.set<EventedBufferedInput<bufferSize>,
+			&EventedBufferedInput<bufferSize>::onReadable>(this);
+		EBI_TRACE("created");
+		verifyInvariants();
+	}
+
+	virtual ~EventedBufferedInput() {
+		cancelScheduledProcessBufferCall();
+		watcher.stop();
+		EBI_TRACE("destroyed");
+	}
+
+	bool resetable() const {
+		return !nextTickInstalled;
+	}
+
+	void reset(SafeLibev *libev, const FileDescriptor &fd) {
+		EBI_TRACE("reset()");
+		_reset(libev, fd);
+	}
+
+	void stop() {
+		if (state == LIVE && !paused) {
+			EBI_TRACE("stop()");
+			verifyInvariants();
+			paused = true;
+			if (!socketPaused) {
+				socketPaused = true;
+				watcher.stop();
+			}
+			cancelScheduledProcessBufferCall();
+			verifyInvariants();
+		}
+	}
+
+	void start() {
+		if (state == LIVE && paused) {
+			EBI_TRACE("start()");
+			verifyInvariants();
+			assert(socketPaused);
+			
+			paused = false;
+			if (!buffer.empty()) {
+				processBufferInNextTick();
+			} else {
+				socketPaused = false;
+				watcher.start();
+				cancelScheduledProcessBufferCall();
+			}
+			verifyInvariants();
+		}
+	}
+
+	bool isStarted() const {
+		return !paused;
+	}
+
+	bool isSocketStarted() const {
+		return !socketPaused;
+	}
+
+	bool endReached() const {
+		return state == END_OF_STREAM;
+	}
+
+	void readNow() {
+		assert(!nextTickInstalled);
+		onReadable(watcher, 0);
+	}
+
+	const FileDescriptor &getFd() const {
+		return fd;
+	}
+
+	string inspect() const {
+		stringstream result;
+		const char *stateStr;
+
+		result << "fd=" << fd;
+
+		switch (state) {
+		case LIVE:
+			stateStr = "LIVE";
+			break;
+		case END_OF_STREAM:
+			stateStr = "END_OF_STREAM";
+			break;
+		case READ_ERROR:
+			stateStr = "READ_ERROR";
+			break;
+		case CLOSED:
+			stateStr = "CLOSED";
+			break;
+		default:
+			stateStr = "UNKNOWN";
+			break;
+		}
+		result << ", state=" << stateStr;
+
+		result << ", buffer(" << buffer.size() << ")=\"" << cEscapeString(buffer) << "\"";
+		result << ", paused=" << paused;
+		result << ", socketPaused=" << socketPaused;
+		result << ", nextTickInstalled=" << nextTickInstalled;
+		result << ", generation=" << generation;
+		result << ", error=" << error;
+
+		return result.str();
+	}
+};
+
+typedef shared_ptr< EventedBufferedInput<> > EventedBufferedInputPtr;
+
+} // namespace Passenger
+
+#endif /* _EVENTED_BUFFERED_INPUT_H_ */
diff --git a/ext/common/EventedClient.h b/ext/common/EventedClient.h
index f8ee527..bcad79d 100644
--- a/ext/common/EventedClient.h
+++ b/ext/common/EventedClient.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/ext/common/EventedMessageServer.h b/ext/common/EventedMessageServer.h
index e7d9205..c8d998d 100644
--- a/ext/common/EventedMessageServer.h
+++ b/ext/common/EventedMessageServer.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010, 2011 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010, 2011, 2012 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -29,14 +29,12 @@
 #include <ev++.h>
 #include <cstdarg>
 #include <cstdlib>
-#ifdef HAS_ALLOCA_H
-	#include <alloca.h>
-#endif
-#include "EventedServer.h"
-#include "MessageReadersWriters.h"
-#include "AccountsDatabase.h"
-#include "Constants.h"
-#include "Utils.h"
+#include <EventedServer.h>
+#include <MessageReadersWriters.h>
+#include <AccountsDatabase.h>
+#include <Constants.h>
+#include <Utils.h>
+#include <Utils/SmallVector.h>
 
 namespace Passenger {
 
@@ -83,42 +81,27 @@ public:
 	
 	void writeArrayMessage(const char *name, ...) {
 		va_list ap;
-		unsigned int count = 0;
+		SmallVector<StaticString, 10> args;
+		const char *arg;
 		
+		args.push_back(name);
 		va_start(ap, name);
-		while (va_arg(ap, const char *) != NULL) {
-			count++;
+		while ((arg = va_arg(ap, const char *)) != NULL) {
+			args.push_back(arg);
 		}
 		va_end(ap);
 		
-		StaticString *args = (StaticString *)
-			alloca((count + 1) * sizeof(StaticString));
-		unsigned int i = 1;
-		
-		args[0] = name;
-		va_start(ap, name);
-		while (true) {
-			const char *arg = va_arg(ap, const char *);
-			if (arg != NULL) {
-				args[i] = arg;
-				i++;
-			} else {
-				break;
-			}
-		}
-		va_end(ap);
-		
-		writeArrayMessage(args, count + 1);
+		writeArrayMessage(&args[0], args.size());
 	}
 	
 	void writeArrayMessage(StaticString args[], unsigned int count) {
 		char headerBuf[sizeof(uint16_t)];
 		unsigned int outSize = ArrayMessage::outputSize(count);
-		StaticString *out = (StaticString *)
-			alloca(outSize * sizeof(StaticString));
+		SmallVector<StaticString, 10> out;
+		out.reserve(outSize);
 		
-		ArrayMessage::generate(args, count, headerBuf, out, outSize);
-		write(out, outSize);
+		ArrayMessage::generate(args, count, headerBuf, &out[0], outSize);
+		write(&out[0], outSize);
 	}
 };
 
diff --git a/ext/common/EventedServer.h b/ext/common/EventedServer.h
index c397526..d77c84e 100644
--- a/ext/common/EventedServer.h
+++ b/ext/common/EventedServer.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -144,7 +144,7 @@ private:
 		ClientSet::iterator it;
 		ClientSet::iterator end = clients.end();
 		
-		for (it = clients.begin(); it != clients.end(); it++) {
+		for (it = clients.begin(); it != end; it++) {
 			(*it)->unref();
 		}
 		clients.clear();
@@ -221,7 +221,7 @@ private:
 				}
 				done = true;
 			} else {
-				FileDescriptor clientfdGuard = clientfd;
+				FileDescriptor clientfdGuard(clientfd);
 				int optval = 1;
 				
 				setNonBlocking(clientfdGuard);
diff --git a/ext/common/Exceptions.h b/ext/common/Exceptions.h
index 7268c43..84b6982 100644
--- a/ext/common/Exceptions.h
+++ b/ext/common/Exceptions.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -27,8 +27,10 @@
 
 #include <oxt/tracable_exception.hpp>
 #include <string>
+#include <map>
 #include <sstream>
 #include <cstring>
+#include <cassert>
 
 /**
  * @defgroup Exceptions Exceptions
@@ -68,7 +70,7 @@ public:
 	SystemException(const string &briefMessage, int errorCode) {
 		stringstream str;
 		
-		str << strerror(errorCode) << " (" << errorCode << ")";
+		str << strerror(errorCode) << " (errno=" << errorCode << ")";
 		systemMessage = str.str();
 		
 		setBriefMessage(briefMessage);
@@ -201,52 +203,124 @@ public:
  * HTML page with details about the error.
  */
 class SpawnException: public oxt::tracable_exception {
+public:
+	enum ErrorKind {
+		UNDEFINED_ERROR,
+		PRELOADER_STARTUP_PROTOCOL_ERROR,
+		PRELOADER_STARTUP_TIMEOUT,
+		PRELOADER_STARTUP_EXPLAINABLE_ERROR,
+		APP_STARTUP_PROTOCOL_ERROR,
+		APP_STARTUP_TIMEOUT,
+		APP_STARTUP_EXPLAINABLE_ERROR
+	};
+	
 private:
+	ErrorKind errorKind;
 	string msg;
 	bool m_hasErrorPage;
 	bool m_isHTML;
 	string m_errorPage;
+	string preloaderCommand;
+	map<string, string> annotations;
+	
 public:
-	SpawnException(const string &message)
-		: msg(message) {
+	SpawnException(const string &message, ErrorKind errorKind = UNDEFINED_ERROR)
+		: msg(message)
+	{
+		this->errorKind = errorKind;
 		m_hasErrorPage = false;
 		m_isHTML = false;
 	}
 	
-	SpawnException(const string &message, const string &errorPage, bool isHTML = true)
+	SpawnException(const string &message, const string &errorPage,
+		bool isHTML = true, ErrorKind errorKind = UNDEFINED_ERROR)
 		: msg(message), m_errorPage(errorPage)
 	{
+		assert(!isHTML
+			|| errorKind == UNDEFINED_ERROR
+			|| errorKind == PRELOADER_STARTUP_EXPLAINABLE_ERROR
+			|| errorKind == APP_STARTUP_EXPLAINABLE_ERROR);
+		this->errorKind = errorKind;
 		m_hasErrorPage = true;
 		m_isHTML = isHTML;
 	}
 	
 	virtual ~SpawnException() throw() {}
-	virtual const char *what() const throw() { return msg.c_str(); }
 	
-	/**
-	 * Check whether an error page is available.
-	 */
+	virtual const char *what() const throw() {
+		return msg.c_str();
+	}
+	
 	bool hasErrorPage() const {
 		return m_hasErrorPage;
 	}
 	
-	/**
-	 * Return the error page content.
-	 *
-	 * @pre hasErrorPage()
-	 */
-	const string getErrorPage() const {
+	const string &getErrorPage() const {
 		return m_errorPage;
 	}
 	
-	/**
-	 * Whether the error page content is HTML.
-	 *
-	 * @pre hasErrorPage()
-	 */
 	bool isHTML() const {
 		return m_isHTML;
 	}
+	
+	ErrorKind getErrorKind() const {
+		return errorKind;
+	}
+	
+	SpawnException &setPreloaderCommand(const string &filename) {
+		preloaderCommand = filename;
+		return *this;
+	}
+	
+	const string &getPreloaderCommand() const {
+		return preloaderCommand;
+	}
+
+	void addAnnotations(const map<string, string> &annotations) {
+		map<string, string>::const_iterator it, end = annotations.end();
+		for (it = annotations.begin(); it != end; it++) {
+			this->annotations[it->first] = it->second;
+		}
+	}
+
+	const map<string, string> &getAnnotations() const {
+		return annotations;
+	}
+
+	string operator[](const string &name) const {
+		return get(name);
+	}
+
+	string get(const string &name) const {
+		map<string, string>::const_iterator it = annotations.find(name);
+		if (it == annotations.end()) {
+			return string();
+		} else {
+			return it->second;
+		}
+	}
+};
+
+/**
+ * Indicates that a Pool::get() or Pool::asyncGet() request was denied.
+ * The request never reached a process. This could be because, before the
+ * request could reach a process, the administrator detached the containing
+ * SuperGroup. Or maybe the request sat in the queue for too long.
+ */
+class GetAbortedException: public oxt::tracable_exception {
+private:
+	string msg;
+
+public:
+	GetAbortedException(const string &message)
+		: msg(message)
+		{ }
+	
+	virtual ~GetAbortedException() throw() {}
+	
+	virtual const char *what() const throw() {
+		return msg.c_str();
+	}
 };
 
 /**
diff --git a/ext/common/FileDescriptor.h b/ext/common/FileDescriptor.h
index c44ad55..cd41b24 100644
--- a/ext/common/FileDescriptor.h
+++ b/ext/common/FileDescriptor.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010, 2011, 2012 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -67,13 +67,15 @@ class FileDescriptor {
 private:
 	struct SharedData {
 		int fd;
+		bool autoClose;
 		
-		SharedData(int fd) {
+		SharedData(int fd, bool autoClose) {
 			this->fd = fd;
+			this->autoClose = autoClose;
 		}
 		
 		~SharedData() {
-			if (fd >= 0) {
+			if (fd >= 0 && autoClose) {
 				this_thread::disable_syscall_interruption dsi;
 				syscalls::close(fd);
 			}
@@ -110,7 +112,7 @@ public:
 	 *
 	 * @post *this == fd
 	 */
-	FileDescriptor(int fd) {
+	explicit FileDescriptor(int fd, bool autoClose = true) {
 		if (fd >= 0) {
 			/* Make sure that the 'new' operator doesn't overwrite
 			 * errno so that we can write code like this:
@@ -121,7 +123,7 @@ public:
 			 *    }
 			 */
 			int e = errno;
-			data = make_shared<SharedData>(fd);
+			data = make_shared<SharedData>(fd, autoClose);
 			errno = e;
 		}
 	}
@@ -191,7 +193,7 @@ public:
 		 */
 		int e = errno;
 		if (fd >= 0) {
-			data = make_shared<SharedData>(fd);
+			data = make_shared<SharedData>(fd, true);
 		} else {
 			data.reset();
 		}
diff --git a/ext/common/HelperAgent/BacktracesServer.h b/ext/common/HelperAgent/BacktracesServer.h
deleted file mode 100644
index fb8ad01..0000000
--- a/ext/common/HelperAgent/BacktracesServer.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_BACKTRACES_SERVER_H_
-#define _PASSENGER_BACKTRACES_SERVER_H_
-
-#include <oxt/thread.hpp>
-#include <oxt/backtrace.hpp>
-#include "MessageServer.h"
-
-namespace Passenger {
-
-using namespace std;
-
-/**
- * A MessageServer handler for reporting the backtraces of all running oxt::threads.
- */
-class BacktracesServer: public MessageServer::Handler {
-public:
-	virtual bool processMessage(MessageServer::CommonClientContext &commonContext,
-	                            MessageServer::ClientContextPtr &handlerSpecificContext,
-	                            const vector<string> &args)
-	{
-		TRACE_POINT();
-		if (args[0] == "backtraces") {
-			UPDATE_TRACE_POINT();
-			commonContext.requireRights(Account::INSPECT_BACKTRACES);
-			commonContext.channel.writeScalar(oxt::thread::all_backtraces());
-			return true;
-		} else {
-			return false;
-		}
-	}
-};
-
-} // namespace Passenger
-
-#endif /* _PASSENGER_BACKTRACES_SERVER_H_ */
diff --git a/ext/common/IniFile.h b/ext/common/IniFile.h
deleted file mode 100644
index d274b9c..0000000
--- a/ext/common/IniFile.h
+++ /dev/null
@@ -1,496 +0,0 @@
-#ifndef _PASSENGER_INI_FILE_H_
-#define _PASSENGER_INI_FILE_H_
-
-#include <utility>
-#include <string>
-#include <map>
-#include <fstream>
-#include <iostream>
-#include <cstdio>
-#include <cstring>
-#include <cassert>
-#include <cctype>
-#include <boost/shared_ptr.hpp>
-#include <boost/make_shared.hpp>
-#include <Exceptions.h>
-
-namespace Passenger {
-
-using namespace std;
-using namespace boost;
-
-
-class IniFileSection {
-protected:
-	typedef map<string, string> ValueMap;
-	string sectionName;
-	ValueMap values;
-
-public:
-	IniFileSection(const string &sectionName) {
-		this->sectionName = sectionName;
-	}
-
-	bool hasKey(const string &keyName) const {
-		return values.find(keyName) != values.end();
-	}
-
-	string get(const string &keyName) const {
-		ValueMap::const_iterator it = values.find(keyName);
-		if (it != values.end()) {
-			return it->second;
-		} else {
-			return string();
-		}
-	}
-	
-	string operator[](const string &keyName) const {
-		return get(keyName);
-	}
-
-	void set(const string &keyName, const string &value) {
-		values[keyName] = value;
-	}
-
-	string getSectionName() const {
-		return sectionName;
-	}
-
-	void inspect() const {
-		ValueMap::const_iterator it = values.begin();
-		while (it != values.end()) {
-			cout << it->first << " = " << it->second << endl;
-			it++;
-		}
-	}
-};
-
-class IniFileLexer {
-public:
-	class Token {
-	public:
-		enum Kind {
-			UNKNOWN = 0,
-			NEWLINE,
-			SECTION_NAME,
-			IDENTIFIER,
-			ASSIGNMENT,
-			TEXT,
-			END_OF_FILE
-		};
-
-		const Kind kind;
-		const string value;
-		const int line;
-		const int column;
-
-		// String representations of the Kind enum.
-		const static char *identityByKind(Kind kind) {
-			const static char* KIND_IDENTITY_TABLE[] = {
-				"<T_UNKNOWN>",
-				"<T_NEWLINE>",
-				"<T_SECTION_NAME>",
-				"<T_IDENTIFIER>",
-				"<T_ASSIGNMENT>",
-				"<T_TEXT>",
-				"<T_EOF>"
-			};
-			
-			return KIND_IDENTITY_TABLE[kind];
-		}
-
-		Token(const Kind kind, const string &value, const int line, const int column)
-			: kind(kind), value(value), line(line), column(column) {
-			
-		}
-		
-		class ExpectanceException : public std::exception {
-		private:
-			char message[255];
-
-		public:
-			ExpectanceException(char expected, char got, int line, int column) {
-				int messageSize = sizeof(message);
-				memset(message, 0, messageSize);
-				snprintf(message, messageSize,
-					"On line %i, column %i: Expected '%c', got '%c' instead.",
-					line, column, expected, got);
-			}
-
-			ExpectanceException(Token::Kind expected, Token got) {
-				const char *expectedKindString = Token::identityByKind(expected);
-				int messageSize = sizeof(message);
-				memset(message, 0, messageSize);
-				snprintf(message, messageSize,
-					"On line %i, column %i: Expected '%s', got '%s' instead.",
-					got.line, got.column, expectedKindString, got.value.c_str());
-			}
-
-			ExpectanceException(char expected, Token::Kind got, int line, int column) {
-				const char *gotKindString = Token::identityByKind(got);
-				int messageSize = sizeof(message);
-				memset(message, 0, messageSize);
-				snprintf(message, messageSize,
-					"On line %i, column %i: Expected '%c', got '%s' instead.",
-					line, column, expected, gotKindString);
-			}
-
-			virtual const char* what() const throw() {
-				return message;
-			}
-		};
-	};
-
-	typedef shared_ptr<IniFileLexer::Token> TokenPtr;
-
-	
-
-protected:
-	ifstream iniFileStream;
-
-	char lastAcceptedChar;
-	char upcomingChar;
-	bool upcomingTokenPtrIsStale;
-
-	int currentLine;
-	int currentColumn;
-
-	TokenPtr upcomingTokenPtr;
-
-	void expect(char ch) {
-		char upcomingChar = (char)iniFileStream.peek();
-	
-		if (ch != upcomingChar) {
-			switch(upcomingChar) {
-				case EOF:
-					throw Token::ExpectanceException(ch, Token::END_OF_FILE,
-						currentLine, currentColumn + 1);
-				case '\n':
-					throw Token::ExpectanceException(ch, upcomingChar,
-						currentLine + 1, 0);
-				default:
-					throw Token::ExpectanceException(ch, upcomingChar,
-						currentLine, currentColumn + 1);
-			}
-		}
-	}
-
-	void accept() {
-		if ((int) upcomingChar == EOF) return;
-	
-		lastAcceptedChar = (char)iniFileStream.get();
-		upcomingChar     = (char)iniFileStream.peek();
-		currentColumn++;
-	
-		if (lastAcceptedChar == '\n') {
-			currentLine++;
-			currentColumn = 1;
-		}
-	}
-
-	void ignore() {
-		if ((int) upcomingChar == EOF) return;
-	
-		upcomingChar = (char)iniFileStream.peek();
-		currentColumn++;
-	
-		if ((char)iniFileStream.get() == '\n') {
-			currentLine++;
-			currentColumn = 1;
-		}
-	}
-
-	void expectAndAccept(char ch) {
-		expect(ch);
-		accept();
-	}
-
-	void acceptWhileNewLine() {
-		while (iniFileStream.good() && upcomingChar == '\n') {
-			accept();
-		}
-	}
-
-	void ignoreWhileNotNewLine() {
-		while (iniFileStream.good() && upcomingChar != '\n') {
-			ignore();
-		}
-	}
-
-	Token tokenizeIdentifier() {
-		int line   = currentLine;
-		int column = currentColumn;
-		string result;
-	
-		while (isalnum(upcomingChar) || upcomingChar == '_' || upcomingChar == '-') {
-			result.append(1, upcomingChar);
-			accept();
-		}
-			
-		return Token(Token::IDENTIFIER, result, line, column);
-	}
-
-	Token tokenizeSection() {
-		expectAndAccept('[');
-		Token sectionName = tokenizeSectionName();
-		expectAndAccept(']');
-		return sectionName;
-	}
-
-	Token tokenizeSectionName() {
-		int line   = currentLine;
-		int column = currentColumn;
-		string result;
-	
-		//while (upcomingChar != ']' && upcomingChar != '[' && upcomingChar != '\n' && upcomingChar != EOF) {
-		while (isalnum(upcomingChar) || upcomingChar == '_' || upcomingChar == '-') {
-			result.append(1, upcomingChar);
-			accept();
-		}
-	
-		return Token(Token::SECTION_NAME, result, line, column);
-	}
-
-	Token tokenizeAssignment() {
-		expectAndAccept('=');
-		return Token(Token::ASSIGNMENT, "=", currentLine, currentColumn);
-	}
-
-	Token tokenizeText() {
-		int line   = currentLine;
-		int column = currentColumn;
-		string result;
-	
-		while (upcomingChar != '\n' && (int) upcomingChar != EOF) {
-			result.append(1, upcomingChar);
-			accept();
-		}
-	
-		return Token(Token::TEXT, result, line, column);
-	}
-
-	Token tokenizeKey() {
-		return tokenizeIdentifier();
-	}
-
-	Token tokenizeValue() {
-		return tokenizeText();
-	}
-
-	Token tokenizeUnknown() {
-		int line   = currentLine;
-		int column = currentColumn;
-		string result;
-	
-		while ((int) upcomingChar != EOF) {
-			result.append(1, upcomingChar);
-			accept();
-		}
-	
-		return Token(Token::UNKNOWN, result, line, column);
-	}
-
-public:
-	IniFileLexer(const string &fileName) {
-		currentLine   = 1;
-		currentColumn = 1;
-		upcomingTokenPtrIsStale = true;
-		iniFileStream.open(fileName.c_str());
-		if (iniFileStream.fail()) {
-			int e = errno;
-			throw FileSystemException("Cannot open file '" + fileName + "' for reading",
-				e, fileName);
-		}
-	}
-
-	~IniFileLexer() {
-		iniFileStream.close();
-	}
-
-	int getCurrentLine() {
-		return currentLine;
-	}
-
-	int getCurrentColumn() {
-		return currentColumn;
-	}
-
-	TokenPtr peekToken() {
-		if (upcomingTokenPtrIsStale) {
-			Token upcomingToken = getToken();
-			upcomingTokenPtr = make_shared<Token>(upcomingToken);
-			upcomingTokenPtrIsStale = false;
-		}
-	
-		return upcomingTokenPtr;
-	}
-
-	Token getToken() {
-		if (!upcomingTokenPtrIsStale) {
-			upcomingTokenPtrIsStale = true;
-			return *upcomingTokenPtr;
-		}
-	
-		while (iniFileStream.good()) {
-			upcomingChar = (char)iniFileStream.peek();
-			switch(upcomingChar) {
-				case '[':
-					return tokenizeSection();
-				case '\n':
-					if (lastAcceptedChar != '\n') {
-						accept();
-						return Token(Token::NEWLINE, "\n", currentLine, currentColumn);
-					} else {
-						ignore();
-						break;
-					}
-				case ';':
-					// Comment encountered: accept all characters until newline (exclusive).
-					ignoreWhileNotNewLine();
-					break;
-				case '=':
-					return tokenizeAssignment();
-				case EOF:
-					return Token(Token::END_OF_FILE, "<END_OF_FILE>", currentLine, currentColumn);
-				default:
-					if (isblank(upcomingChar)) {
-						ignore();
-					} else {
-						switch(lastAcceptedChar) {
-							case '\n':
-								return tokenizeKey();
-							case '=':
-								return tokenizeValue();
-							default:
-								return tokenizeUnknown();
-						}
-					}
-			}
-		}
-	
-		return Token(Token::END_OF_FILE, "<END_OF_FILE>", currentLine, currentColumn);
-	}
-};
-
-typedef shared_ptr<IniFileSection> IniFileSectionPtr;
-
-
-class IniFile {
-protected:
-	typedef map<string, IniFileSectionPtr> SectionMap;
-	string name;
-	SectionMap sections;
-	
-	class IniFileParser {
-	typedef IniFileLexer::Token Token;
-
-	protected:
-		IniFileLexer lexer;
-		IniFile *iniFile;
-
-		// The Start Symbol.
-		void parseSections() {		
-			while ((lexer.peekToken())->kind == Token::SECTION_NAME) {
-				parseSection();
-			}
-		}
-
-		void parseSection() {
-			Token token = acceptAndReturnif(Token::SECTION_NAME);
-			acceptIfEOL();
-
-			string sectionName = token.value;
-			IniFileSection *section = new IniFileSection(sectionName);
-			iniFile->addSection(section);
-
-			parseSectionBody(section);
-		}
-
-		void parseSectionBody(IniFileSection *currentSection) {
-			while ((lexer.peekToken())->kind == Token::IDENTIFIER) {
-				parseKeyValue(currentSection);
-			}
-		}
-
-		void parseKeyValue(IniFileSection *currentSection) {
-			Token identifierToken = acceptAndReturnif (Token::IDENTIFIER);
-			acceptif (Token::ASSIGNMENT);
-			Token valueToken = acceptAndReturnif (Token::TEXT);
-			acceptIfEOL();
-			currentSection->set(identifierToken.value, valueToken.value);
-		}
-
-		void acceptif (Token::Kind expectedKind) {
-			Token token = lexer.getToken();
-
-			if (token.kind != expectedKind) {
-				throw Token::ExpectanceException(expectedKind, token);
-			}
-		}
-
-		void acceptIfEOL() {
-			Token token = lexer.getToken();
-
-			if (token.kind != Token::NEWLINE && token.kind != Token::END_OF_FILE) {
-				throw Token::ExpectanceException(Token::NEWLINE, token);
-			}
-		}
-
-		Token acceptAndReturnif (Token::Kind expectedKind) {
-			Token token = lexer.getToken();
-
-			if (token.kind != expectedKind) {
-				throw Token::ExpectanceException(expectedKind, token);
-			}
-
-			return token;
-		}
-
-	public:
-		IniFileParser(IniFile *iniFile) : lexer(iniFile->getName()), iniFile(iniFile) {
-			parseSections();
-		}
-	};
-	
-public:
-	IniFile(const string &iniFileName)
-		: name(iniFileName)
-	{
-		IniFileParser parser(this);
-	}
-
-	void addSection(IniFileSection *section) {
-		sections.insert(make_pair(section->getSectionName(), IniFileSectionPtr(section)));
-	}
-
-	IniFileSectionPtr section(const string &sectionName) {
-		SectionMap::iterator it = sections.find(sectionName);
-		if (it != sections.end()) {
-			return it->second;
-		} else {
-			return IniFileSectionPtr();
-		}
-	}
-
-	bool hasSection(const string &sectionName) const {
-		return sections.find(sectionName) != sections.end();
-	}
-
-	string getName() const {
-		return name;
-	}
-
-	void inspect() const {
-		SectionMap::const_iterator it = sections.begin();
-		while (it != sections.end()) {
-			cout << "[" << (it->first) << "]" << endl;
-			it->second->inspect();
-
-			it++;
-		}
-	}
-};
-
-} // namespace Passenger
-
-#endif /* _PASSENGER_INI_FILE_H_ */
diff --git a/ext/common/Logging.cpp b/ext/common/Logging.cpp
index 9b0b494..b2cc878 100644
--- a/ext/common/Logging.cpp
+++ b/ext/common/Logging.cpp
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -22,14 +22,18 @@
  *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  *  THE SOFTWARE.
  */
-#include <iostream>
-#include <fstream>
-#include "Logging.h"
+#include <iomanip>
+#include <cstdlib>
+#include <fcntl.h>
+#include <unistd.h>
+#include <Logging.h>
+#include <Utils/StrIntUtils.h>
+#include <Utils/IOUtils.h>
 
 namespace Passenger {
 
 int _logLevel = 0;
-ostream *_logStream = &cerr;
+int _logOutput = STDERR_FILENO;
 
 int
 getLogLevel() {
@@ -41,23 +45,60 @@ setLogLevel(int value) {
 	_logLevel = value;
 }
 
-void
+bool
 setDebugFile(const char *logFile) {
-	#ifdef PASSENGER_DEBUG
-		if (logFile != NULL) {
-			ostream *stream = new ofstream(logFile, ios_base::out | ios_base::app);
-			if (stream->fail()) {
-				delete stream;
-			} else {
-				if (_logStream != NULL && _logStream != &cerr) {
-					delete _logStream;
-				}
-				_logStream = stream;
+	int fd = open(logFile, O_WRONLY | O_CREAT | O_APPEND, 0644);
+	if (fd != -1) {
+		_logOutput = fd;
+		return true;
+	} else {
+		return false;
+	}
+}
+
+void
+_prepareLogEntry(std::stringstream &sstream, const char *file, unsigned int line) {
+	time_t the_time;
+	struct tm the_tm;
+	char datetime_buf[60];
+	struct timeval tv;
+
+	if (startsWith(file, "ext/")) {
+		file += sizeof("ext/") - 1;
+		if (startsWith(file, "common/")) {
+			file += sizeof("common/") - 1;
+			if (startsWith(file, "ApplicationPool2/")) {
+				file += sizeof("Application") - 1;
 			}
-		} else {
-			_logStream = &cerr;
 		}
-	#endif
+	}
+	
+	the_time = time(NULL);
+	localtime_r(&the_time, &the_tm);
+	strftime(datetime_buf, sizeof(datetime_buf) - 1, "%F %H:%M:%S", &the_tm);
+	gettimeofday(&tv, NULL);
+	sstream <<
+		"[ " << datetime_buf << "." << std::setfill('0') << std::setw(4) <<
+			(unsigned long) (tv.tv_usec / 100) <<
+		" " << std::dec << getpid() << "/" <<
+			std::hex << pthread_self() << std::dec <<
+		" " << file << ":" << line <<
+		" ]: ";
+}
+
+void
+_writeLogEntry(const std::string &str) {
+	try {
+		writeExact(_logOutput, str.data(), str.size());
+	} catch (const SystemException &) {
+		/* The most likely reason why this fails is when the user has setup
+		 * Apache to log to a pipe (e.g. to a log rotation script). Upon
+		 * restarting the web server, the process that reads from the pipe
+		 * shuts down, so we can't write to it anymore. That's why we
+		 * just ignore write errors. It doesn't make sense to abort for
+		 * something like this.
+		 */
+	}
 }
 
 } // namespace Passenger
diff --git a/ext/common/Logging.h b/ext/common/Logging.h
index d9c9c42..6644fe0 100644
--- a/ext/common/Logging.h
+++ b/ext/common/Logging.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -25,11 +25,9 @@
 #ifndef _PASSENGER_LOGGING_H_
 #define _PASSENGER_LOGGING_H_
 
-#include <boost/shared_ptr.hpp>
-#include <boost/noncopyable.hpp>
 #include <oxt/thread.hpp>
 #include <oxt/system_calls.hpp>
-#include <oxt/backtrace.hpp>
+#include <oxt/macros.hpp>
 
 #include <sys/types.h>
 #include <sys/time.h>
@@ -39,25 +37,15 @@
 #include <fcntl.h>
 #include <pthread.h>
 #include <string>
-#include <map>
+#include <exception>
 #include <stdexcept>
+#include <ios>
 #include <ostream>
 #include <sstream>
 #include <cstdio>
 #include <ctime>
 #include <cerrno>
 
-#include <RandomGenerator.h>
-#include <FileDescriptor.h>
-#include <StaticString.h>
-#include <Exceptions.h>
-#include <Utils.h>
-#include <Utils/ScopeGuard.h>
-#include <Utils/MessageIO.h>
-#include <Utils/StrIntUtils.h>
-#include <Utils/MD5.h>
-#include <Utils/SystemTime.h>
-
 
 namespace Passenger {
 
@@ -69,918 +57,124 @@ using namespace oxt;
 /********** Debug logging facilities **********/
 
 extern int _logLevel;
-extern ostream *_logStream;
+extern int _logOutput;
 
 int getLogLevel();
 void setLogLevel(int value);
-void setDebugFile(const char *logFile = NULL);
+bool setDebugFile(const char *logFile = NULL);
+void _prepareLogEntry(std::stringstream &sstream, const char *file, unsigned int line);
+void _writeLogEntry(const std::string &str);
+
+
+enum PassengerLogLevel {
+	LVL_CRIT   = -2,
+	LVL_ERROR  = -1,
+	LVL_INFO   = 0,
+	LVL_WARN   = 0,
+	LVL_DEBUG  = 1,
+	LVL_DEBUG2 = 2
+};
 
 /**
- * Write the given expression to the given stream.
- *
- * @param expr The expression to write.
- * @param stream A pointer to an object that accepts the '<<' operator.
+ * Write the given expression to the log stream.
  */
-#define P_LOG_TO(level, expr, stream) \
+#define P_LOG(level, expr) \
 	do { \
-		if (stream != 0 && Passenger::_logLevel >= level) { \
-			time_t the_time;			\
-			struct tm the_tm;			\
-			char datetime_buf[60];			\
-			struct timeval tv;			\
-			std::stringstream sstream;              \
-								\
-			the_time = time(NULL);			\
-			localtime_r(&the_time, &the_tm);	\
-			strftime(datetime_buf, sizeof(datetime_buf), "%F %H:%M:%S", &the_tm); \
-			gettimeofday(&tv, NULL); \
-			sstream << \
-				"[ pid=" << ((unsigned long) getpid()) <<  \
-				" thr=" << pthread_self() << \
-				" file=" << __FILE__ << ":" << (unsigned long) __LINE__ << \
-				" time=" << datetime_buf << "." << (unsigned long) (tv.tv_usec / 1000) << \
-				" ]: " << \
-				expr << std::endl;	\
-			*stream << sstream.str();		\
-			stream->flush();			\
+		if (Passenger::_logLevel >= (level)) { \
+			std::stringstream sstream; \
+			Passenger::_prepareLogEntry(sstream, __FILE__, __LINE__); \
+			sstream << expr << "\n"; \
+			Passenger::_writeLogEntry(sstream.str()); \
 		} \
 	} while (false)
 
 /**
- * Write the given expression to the log stream.
+ * Write the given expression, which represents a warning,
+ * to the log stream.
  */
-#define P_LOG(level, expr) P_LOG_TO(level, expr, Passenger::_logStream)
+#define P_WARN(expr) P_LOG(LVL_WARN, expr)
 
 /**
  * Write the given expression, which represents a warning,
  * to the log stream.
  */
-#define P_WARN(expr) P_LOG(0, expr)
+#define P_INFO(expr) P_LOG(LVL_INFO, expr)
 
 /**
  * Write the given expression, which represents an error,
  * to the log stream.
  */
-#define P_ERROR(expr) P_LOG(-1, expr)
+#define P_ERROR(expr) P_LOG(LVL_ERROR, expr)
+
+/**
+ * Write the given expression, which represents a critical non-recoverable error,
+ * to the log stream.
+ */
+#define P_CRITICAL(expr) P_LOG(LVL_CRIT, expr)
 
 /**
  * Write the given expression, which represents a debugging message,
  * to the log stream.
  */
-#define P_DEBUG(expr) P_TRACE(1, expr)
+#define P_DEBUG(expr) P_TRACE(LVL_DEBUG, expr)
 
 #ifdef PASSENGER_DEBUG
-	#define P_TRACE(level, expr) P_LOG_TO(level, expr, Passenger::_logStream)
-	
-	#define P_ASSERT(expr, result_if_failed, message) \
-		do { \
-			if (!(expr)) { \
-				P_ERROR("Assertion failed: " << message); \
-				return result_if_failed; \
-			} \
-		} while (false)
-	#define P_ASSERT_WITH_VOID_RETURN(expr, message) \
-		do { \
-			if (!(expr)) { \
-				P_ERROR("Assertion failed: " << message); \
-				return; \
-			} \
-		} while (false)
+	#define P_TRACE(level, expr) P_LOG(level, expr)
 #else
 	#define P_TRACE(level, expr) do { /* nothing */ } while (false)
-	
-	#define P_ASSERT(expr, result_if_failed, message) do { /* nothing */ } while (false)
-	#define P_ASSERT_WITH_VOID_RETURN(expr, message) do { /* nothing */ } while (false)
 #endif
 
 
-/********** Analytics logging facilities *********/
-
-// All access to the file descriptor must be synchronized through the lock.
-struct AnalyticsLoggerConnection {
-	mutable boost::mutex lock;
-	FileDescriptor fd;
-	
-	AnalyticsLoggerConnection(FileDescriptor _fd)
-		: fd(_fd)
-		{ }
-	
-	bool connected() const {
-		return fd != -1;
-	}
-	
-	bool disconnect(string &errorResponse) {
-		if (!connected()) {
-			return false;
-		}
-		
-		// The server might send an "error" array message
-		// just before disconnecting. Try to read it.
-		TRACE_POINT();
-		vector<string> response;
-		try {
-			while (true) {
-				unsigned long long timeout = 10000;
-				response = readArrayMessage(fd, &timeout);
-			}
-		} catch (const TimeoutException &) {
-			// This means that the last message isn't an array
-			// message or that the server didn't send it quickly
-			// enough. In any case, discard whatever previous
-			// array messages we were able to read because they're
-			// guaranteed not to be the error message we're expecting.
-			response.clear();
-		} catch (const SystemException &e) {
-			// We treat ECONNRESET the same as EOFException.
-			// Other errors are treated as TimeoutException.
-			if (e.code() != ECONNRESET) {
-				response.clear();
-			}
-		} catch (const EOFException &) {
-			// Do nothing. We've successfully read the last array message.
-		}
-		
-		this_thread::disable_interruption di;
-		this_thread::disable_syscall_interruption dsi;
-		UPDATE_TRACE_POINT();
-		fd.close();
-		
-		if (response.size() == 2 && response[0] == "error") {
-			errorResponse = response[1];
-			return true;
-		} else {
-			return false;
-		}
-	}
-	
-	void disconnect() {
-		fd.close();
-	}
-};
-
-typedef shared_ptr<AnalyticsLoggerConnection> AnalyticsLoggerConnectionPtr;
-
+#define P_BUG(expr) \
+	do { \
+		TRACE_POINT(); \
+		P_CRITICAL("[BUG] " << expr); \
+		abort(); \
+	} while (false)
 
-enum ExceptionHandlingMode {
-	PRINT,
-	THROW,
-	IGNORE
-};
+#define P_BUG_UTP(expr) \
+	do { \
+		UPDATE_TRACE_POINT(); \
+		P_CRITICAL("[BUG] " << expr); \
+		abort(); \
+	} while (false)
 
 
-class AnalyticsLog {
+class NotExpectingExceptions {
 private:
-	static const int INT64_STR_BUFSIZE = 22; // Long enough for a 64-bit number.
-	static const unsigned long long IO_TIMEOUT = 5000000; // In microseconds.
-	
-	const AnalyticsLoggerConnectionPtr connection;
-	const string txnId;
-	const string groupName;
-	const string category;
-	const string unionStationKey;
-	const ExceptionHandlingMode exceptionHandlingMode;
-	bool shouldFlushToDiskAfterClose;
-	
-	/**
-	 * Buffer must be at least txnId.size() + 1 + INT64_STR_BUFSIZE + 1 bytes.
-	 */
-	char *insertTxnIdAndTimestamp(char *buffer) {
-		int size;
-		
-		// "txn-id-here"
-		memcpy(buffer, txnId.c_str(), txnId.size());
-		buffer += txnId.size();
-		
-		// "txn-id-here "
-		*buffer = ' ';
-		buffer++;
-		
-		// "txn-id-here 123456"
-		size = snprintf(buffer, INT64_STR_BUFSIZE, "%llu", SystemTime::getUsec());
-		if (size >= INT64_STR_BUFSIZE) {
-			// The buffer is too small.
-			throw IOException("Cannot format a new transaction log message timestamp.");
-		}
-		buffer += size;
-		
-		// "txn-id-here 123456 "
-		*buffer = ' ';
-		
-		return buffer + 1;
-	}
-	
-	template<typename ExceptionType>
-	void handleException(const ExceptionType &e) {
-		switch (exceptionHandlingMode) {
-		case THROW:
-			throw e;
-		case PRINT:
-			try {
-				const tracable_exception &te =
-					dynamic_cast<const tracable_exception &>(e);
-				P_WARN(te.what() << "\n" << te.backtrace());
-			} catch (const bad_cast &) {
-				P_WARN(e.what());
-			}
-			break;
-		default:
-			break;
-		}
-	}
-	
-public:
-	AnalyticsLog()
-		: exceptionHandlingMode(PRINT)
-		{ }
-	
-	AnalyticsLog(const AnalyticsLoggerConnectionPtr &_connection,
-		const string &_txnId,
-		const string &_groupName,
-		const string &_category,
-		const string &_unionStationKey,
-		ExceptionHandlingMode _exceptionHandlingMode = PRINT)
-		: connection(_connection),
-		  txnId(_txnId),
-		  groupName(_groupName),
-		  category(_category),
-		  unionStationKey(_unionStationKey),
-		  exceptionHandlingMode(_exceptionHandlingMode),
-		  shouldFlushToDiskAfterClose(false)
-		{ }
-	
-	~AnalyticsLog() {
-		TRACE_POINT();
-		if (connection == NULL) {
-			return;
-		}
-		lock_guard<boost::mutex> l(connection->lock);
-		if (!connection->connected()) {
-			return;
-		}
-		
-		char timestamp[2 * sizeof(unsigned long long) + 1];
-		integerToHexatri<unsigned long long>(SystemTime::getUsec(),
-			timestamp);
-		
-		UPDATE_TRACE_POINT();
-		ScopeGuard guard(boost::bind(&AnalyticsLoggerConnection::disconnect,
-			connection.get()));
-		try {
-			unsigned long long timeout = IO_TIMEOUT;
-			writeArrayMessage(connection->fd, &timeout,
-				"closeTransaction",
-				txnId.c_str(),
-				timestamp,
-				NULL);
-			
-			if (shouldFlushToDiskAfterClose) {
-				UPDATE_TRACE_POINT();
-				timeout = IO_TIMEOUT;
-				writeArrayMessage(connection->fd, &timeout,
-					"flush", NULL);
-				readArrayMessage(connection->fd, &timeout);
-			}
-			guard.clear();
-		} catch (const SystemException &e) {
-			string errorResponse;
-			
-			UPDATE_TRACE_POINT();
-			guard.clear();
-			if (connection->disconnect(errorResponse)) {
-				handleException(IOException(
-					string("Logging agent disconnected with error: ") +
-					e.what()));
-			} else {
-				handleException(e);
-			}
-		}
-	}
-	
-	void message(const StaticString &text) {
-		TRACE_POINT();
-		if (connection == NULL) {
-			return;
-		}
-		lock_guard<boost::mutex> l(connection->lock);
-		if (!connection->connected()) {
-			return;
-		}
-		
-		char timestamp[2 * sizeof(unsigned long long) + 1];
-		integerToHexatri<unsigned long long>(SystemTime::getUsec(), timestamp);
-		
-		UPDATE_TRACE_POINT();
-		ScopeGuard guard(boost::bind(&AnalyticsLoggerConnection::disconnect,
-			connection.get()));
-		try {
-			unsigned long long timeout = IO_TIMEOUT;
-			writeArrayMessage(connection->fd, &timeout,
-				"log",
-				txnId.c_str(),
-				timestamp,
-				NULL);
-			writeScalarMessage(connection->fd, text, &timeout);
-			guard.clear();
-		} catch (const std::exception &e) {
-			string errorResponse;
-			
-			UPDATE_TRACE_POINT();
-			guard.clear();
-			if (connection->disconnect(errorResponse)) {
-				handleException(IOException(
-					string("Logging agent disconnected with error: ") +
-					e.what()));
-			} else {
-				handleException(e);
-			}
-		}
-	}
-	
-	void abort(const StaticString &text) {
-		message("ABORT");
-	}
-	
-	void flushToDiskAfterClose(bool value) {
-		shouldFlushToDiskAfterClose = value;
-	}
-	
-	bool isNull() const {
-		return connection == NULL;
-	}
-	
-	string getTxnId() const {
-		return txnId;
-	}
-	
-	string getGroupName() const {
-		return groupName;
-	}
-	
-	string getCategory() const {
-		return category;
-	}
-	
-	string getUnionStationKey() const {
-		return unionStationKey;
-	}
-};
-
-typedef shared_ptr<AnalyticsLog> AnalyticsLogPtr;
+	this_thread::disable_interruption di;
+	this_thread::disable_syscall_interruption dsi;
+	const char *filename;
+	const char *function;
+	unsigned int line;
 
-
-class AnalyticsScopeLog: public boost::noncopyable {
-private:
-	AnalyticsLog * const log;
-	enum {
-		NAME,
-		GRANULAR
-	} type;
-	union {
-		const char *name;
-		struct {
-			const char *endMessage;
-			const char *abortMessage;	
-		} granular;
-	} data;
-	bool ok;
-	
-	static string timevalToString(struct timeval &tv) {
-		unsigned long long i = (unsigned long long) tv.tv_sec * 1000000 + tv.tv_usec;
-		return usecToString(i);
-	}
-	
-	static string usecToString(unsigned long long usec) {
-		char timestamp[2 * sizeof(unsigned long long) + 1];
-		integerToHexatri<unsigned long long>(usec, timestamp);
-		return timestamp;
-	}
-	
 public:
-	AnalyticsScopeLog(const AnalyticsLogPtr &_log, const char *name)
-		: log(_log.get())
-	{
-		type = NAME;
-		data.name = name;
-		ok = false;
-		if (log != NULL && !log->isNull()) {
-			string message;
-			struct rusage usage;
-			
-			message.reserve(150);
-			message.append("BEGIN: ");
-			message.append(name);
-			message.append(" (");
-			message.append(usecToString(SystemTime::getUsec()));
-			message.append(",");
-			if (getrusage(RUSAGE_SELF, &usage) == -1) {
-				int e = errno;
-				throw SystemException("getrusage() failed", e);
-			}
-			message.append(timevalToString(usage.ru_utime));
-			message.append(",");
-			message.append(timevalToString(usage.ru_stime));
-			message.append(") ");
-			log->message(message);
-		}
-	}
-	
-	AnalyticsScopeLog(const AnalyticsLogPtr &_log,
-		const char *beginMessage,
-		const char *endMessage,
-		const char *abortMessage = NULL)
-		: log(_log.get())
-	{
-		if (_log != NULL) {
-			type = GRANULAR;
-			data.granular.endMessage = endMessage;
-			data.granular.abortMessage = abortMessage;
-			ok = abortMessage == NULL;
-			_log->message(beginMessage);
-		}
-	}
-	
-	~AnalyticsScopeLog() {
-		if (log == NULL) {
-			return;
-		}
-		if (type == NAME) {
-			if (!log->isNull()) {
-				string message;
-				struct rusage usage;
-				
-				message.reserve(150);
-				if (ok) {
-					message.append("END: ");
-				} else {
-					message.append("FAIL: ");
-				}
-				message.append(data.name);
-				message.append(" (");
-				message.append(usecToString(SystemTime::getUsec()));
-				message.append(",");
-				if (getrusage(RUSAGE_SELF, &usage) == -1) {
-					int e = errno;
-					throw SystemException("getrusage() failed", e);
-				}
-				message.append(timevalToString(usage.ru_utime));
-				message.append(",");
-				message.append(timevalToString(usage.ru_stime));
-				message.append(")");
-				log->message(message);
-			}
-		} else {
-			if (ok) {
-				log->message(data.granular.endMessage);
-			} else {
-				log->message(data.granular.abortMessage);
-			}
-		}
+	NotExpectingExceptions(const char *_filename, unsigned int _line, const char *_function) {
+		filename = _filename;
+		line = _line;
+		function = _function;
 	}
-	
-	void success() {
-		ok = true;
-	}
-};
-
 
-class AnalyticsLogger {
-private:
-	/** A special lock type for AnalyticsLoggerConnection that also
-	 * keeps a smart pointer to the data structure so that the mutex
-	 * is not destroyed prematurely.
-	 */
-	struct ConnectionLock {
-		AnalyticsLoggerConnectionPtr connection;
-		bool locked;
-		
-		ConnectionLock(const AnalyticsLoggerConnectionPtr &c)
-			: connection(c)
-		{
-			c->lock.lock();
-			locked = true;
-		}
-		
-		~ConnectionLock() {
-			if (locked) {
-				connection->lock.unlock();
-			}
-		}
-		
-		void reset(const AnalyticsLoggerConnectionPtr &c, bool lockNow = true) {
-			if (locked) {
-				connection->lock.unlock();
-			}
-			connection = c;
-			if (lockNow) {
-				connection->lock.lock();
-				locked = true;
-			} else {
-				locked = false;
-			}
+	~NotExpectingExceptions() {
+		if (std::uncaught_exception()) {
+			P_ERROR("Unexpected exception detected at " << filename <<
+				":" << line << ", function '" << function << "'!");
 		}
-		
-		void lock() {
-			assert(!locked);
-			connection->lock.lock();
-			locked = true;
-		}
-	};
-	
-	const string serverAddress;
-	const string username;
-	const string password;
-	const string nodeName;
-	RandomGenerator randomGenerator;
-	
-	/** Lock protecting the fields that follow, but not the
-	 * contents of the connection object.
-	 */
-	mutable boost::mutex lock;
-	
-	unsigned int maxConnectTries;
-	unsigned long long reconnectTimeout;
-	unsigned long long nextReconnectTime;
-	/** Normally never NULL, except when constructed with the default constructor
-	 * or if serverName is empty. In those cases the AnalyticsLogger object is
-	 * considered unusable.
-	 */
-	AnalyticsLoggerConnectionPtr connection;
-	
-	static string determineNodeName(const string &givenNodeName) {
-		if (givenNodeName.empty()) {
-			return getHostName();
-		} else {
-			return givenNodeName;
-		}
-	}
-	
-	static bool isNetworkError(int code) {
-		return code == EPIPE || code == ECONNREFUSED || code == ECONNRESET
-			|| code == EHOSTUNREACH || code == ENETDOWN || code == ENETUNREACH
-			|| code == ETIMEDOUT;
-	}
-	
-	bool connected() const {
-		return connection->connected();
-	}
-	
-	void connect() {
-		TRACE_POINT();
-		FileDescriptor fd;
-		vector<string> args;
-		unsigned long long timeout = 15000000;
-		
-		fd = connectToServer(serverAddress);
-		if (!readArrayMessage(fd, args, &timeout)) {
-			throw IOException("The logging agent closed the connection before sending a version identifier.");
-		}
-		if (args.size() != 2 || args[0] != "version") {
-			throw IOException("The logging agent server didn't sent a valid version identifier.");
-		}
-		if (args[1] != "1") {
-			string message = string("Unsupported logging agent protocol version ") +
-				args[1] + ".";
-			throw IOException(message);
-		}
-		
-		UPDATE_TRACE_POINT();
-		writeScalarMessage(fd, username, &timeout);
-		writeScalarMessage(fd, password, &timeout);
-		
-		UPDATE_TRACE_POINT();
-		if (!readArrayMessage(fd, args, &timeout)) {
-			throw IOException("The logging agent did not send an authentication response.");
-		} else if (args.size() != 1) {
-			throw IOException("The authentication response that the logging agent sent is not valid.");
-		} else if (args[0] != "ok") {
-			throw SecurityException("The logging agent server denied authentication: " + args[0]);
-		}
-		
-		UPDATE_TRACE_POINT();
-		writeArrayMessage(fd, &timeout, "init", nodeName.c_str(), NULL);
-		if (!readArrayMessage(fd, args, &timeout)) {
-			throw SystemException("Cannot connect to logging server", ECONNREFUSED);
-		} else if (args.size() != 1) {
-			throw IOException("Logging server returned an invalid reply for the 'init' command");
-		} else if (args[0] == "server shutting down") {
-			throw SystemException("Cannot connect to server", ECONNREFUSED);
-		} else if (args[0] != "ok") {
-			throw IOException("Logging server returned an invalid reply for the 'init' command");
-		}
-		
-		connection = make_shared<AnalyticsLoggerConnection>(fd);
-	}
-	
-public:
-	AnalyticsLogger() { }
-	
-	AnalyticsLogger(const string &_serverAddress, const string &_username,
-	                const string &_password, const string &_nodeName = "")
-		: serverAddress(_serverAddress),
-		  username(_username),
-		  password(_password),
-		  nodeName(determineNodeName(_nodeName))
-	{
-		if (!serverAddress.empty()) {
-			connection = make_shared<AnalyticsLoggerConnection>(FileDescriptor());
-		}
-		if (isLocalSocketAddress(serverAddress)) {
-			maxConnectTries = 10;
-		} else {
-			maxConnectTries = 1;
-		}
-		reconnectTimeout  = 1000000;
-		nextReconnectTime = 0;
-	}
-	
-	template<typename T>
-	static bool instanceof(const std::exception &e) {
-		try {
-			(void) dynamic_cast<const T &>(e);
-			return true;
-		} catch (const bad_cast &) {
-			return false;
-		}
-	}
-	
-	AnalyticsLogPtr newTransaction(const string &groupName,
-		const string &category = "requests",
-		const string &unionStationKey = string(),
-		const string &filters = string())
-	{
-		if (serverAddress.empty()) {
-			return make_shared<AnalyticsLog>();
-		}
-		
-		unsigned long long timestamp = SystemTime::getUsec();
-		char txnId[
-			2 * sizeof(unsigned int) +    // max hex timestamp size
-			11 +                          // space for a random identifier
-			1                             // null terminator
-		];
-		char *end;
-		unsigned int timestampSize;
-		char timestampStr[2 * sizeof(unsigned long long) + 1];
-		
-		// "[timestamp]"
-		// Our timestamp is like a Unix timestamp but with minutes
-		// resolution instead of seconds. 32 bits will last us for
-		// about 8000 years.
-		timestampSize = integerToHexatri<unsigned int>(timestamp / 1000000 / 60,
-			txnId);
-		end = txnId + timestampSize;
-		
-		// "[timestamp]-"
-		*end = '-';
-		end++;
-		
-		// "[timestamp]-[random id]"
-		randomGenerator.generateAsciiString(end, 11);
-		end += 11;
-		*end = '\0';
-		
-		integerToHexatri<unsigned long long>(timestamp, timestampStr);
-		
-		unique_lock<boost::mutex> l(lock);
-		if (SystemTime::getUsec() < nextReconnectTime) {
-			return make_shared<AnalyticsLog>();
-		}
-		ConnectionLock cl(connection);
-		
-		if (!connected()) {
-			TRACE_POINT();
-			try {
-				connect();
-				cl.reset(connection);
-			} catch (const TimeoutException &) {
-				P_WARN("Timeout trying to connect to the logging agent at " << serverAddress << "; " <<
-					"will reconnect in " << reconnectTimeout / 1000000 << " second(s).");
-				nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
-				return make_shared<AnalyticsLog>();
-			} catch (const tracable_exception &e) {
-				nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
-				if (instanceof<IOException>(e) || instanceof<SystemException>(e)) {
-					P_WARN("Cannot connect to the logging agent at " << serverAddress <<
-						" (" << e.what() << "); will reconnect in " <<
-						reconnectTimeout / 1000000 << " second(s).");
-					return make_shared<AnalyticsLog>();
-				} else {
-					throw;
-				}
-			}
-		}
-		
-		ScopeGuard guard(boost::bind(
-			&AnalyticsLoggerConnection::disconnect,
-			connection.get()));
-		try {
-			unsigned long long timeout = 15000000;
-			
-			writeArrayMessage(connection->fd, &timeout,
-				"openTransaction",
-				txnId,
-				groupName.c_str(),
-				"",
-				category.c_str(),
-				timestampStr,
-				unionStationKey.c_str(),
-				"true",
-				"true",
-				filters.c_str(),
-				NULL);
-			
-			vector<string> args;
-			if (!readArrayMessage(connection->fd, args, &timeout)) {
-				P_WARN("The logging agent at " << serverAddress <<
-					" closed the connection (no error message given);" <<
-					" will reconnect in " << reconnectTimeout / 1000000 <<
-					" second(s).");
-				nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
-				return make_shared<AnalyticsLog>();
-			} else if (args.size() == 2 && args[0] == "error") {
-				P_WARN("The logging agent at " << serverAddress <<
-					" closed the connection (error message: " << args[1] <<
-					"); will reconnect in " << reconnectTimeout / 1000000 <<
-					" second(s).");
-				nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
-				return make_shared<AnalyticsLog>();
-			} else if (args.empty() || args[0] != "ok") {
-				P_WARN("The logging agent at " << serverAddress <<
-					" sent an unexpected reply;" <<
-					" will reconnect in " << reconnectTimeout / 1000000 <<
-					" second(s).");
-				nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
-				return make_shared<AnalyticsLog>();
-			}
-			
-			guard.clear();
-			return make_shared<AnalyticsLog>(connection,
-				string(txnId, end - txnId),
-				groupName, category,
-				unionStationKey);
-			
-		} catch (const TimeoutException &) {
-			P_WARN("Timeout trying to communicate with the logging agent at " << serverAddress << "; " <<
-				"will reconnect in " << reconnectTimeout / 1000000 << " second(s).");
-			nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
-			return make_shared<AnalyticsLog>();
-			
-		} catch (const SystemException &e) {
-			if (e.code() == ENOENT || isNetworkError(e.code())) {
-				string errorResponse;
-				
-				guard.clear();
-				if (connection->disconnect(errorResponse)) {
-					P_WARN("The logging agent at " << serverAddress <<
-						" closed the connection (error message: " << errorResponse <<
-						"); will reconnect in " << reconnectTimeout / 1000000 <<
-						" second(s).");
-				} else {
-					P_WARN("The logging agent at " << serverAddress <<
-						" closed the connection (no error message given);" <<
-						" will reconnect in " << reconnectTimeout / 1000000 <<
-						" second(s).");
-				}
-				nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
-				return make_shared<AnalyticsLog>();
-			} else {
-				throw;
-			}
-		}
-	}
-	
-	AnalyticsLogPtr continueTransaction(const string &txnId, const string &groupName,
-		const string &category = "requests", const string &unionStationKey = string())
-	{
-		if (serverAddress.empty() || txnId.empty()) {
-			return make_shared<AnalyticsLog>();
-		}
-		
-		char timestampStr[2 * sizeof(unsigned long long) + 1];
-		integerToHexatri<unsigned long long>(SystemTime::getUsec(), timestampStr);
-		
-		unique_lock<boost::mutex> l(lock);
-		if (SystemTime::getUsec() < nextReconnectTime) {
-			return make_shared<AnalyticsLog>();
-		}
-		ConnectionLock cl(connection);
-		
-		if (!connected()) {
-			TRACE_POINT();
-			try {
-				connect();
-				cl.reset(connection);
-			} catch (const TimeoutException &) {
-				P_WARN("Timeout trying to connect to the logging agent at " << serverAddress << "; " <<
-					"will reconnect in " << reconnectTimeout / 1000000 << " second(s).");
-				nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
-				return make_shared<AnalyticsLog>();
-			} catch (const tracable_exception &e) {
-				nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
-				if (instanceof<IOException>(e) || instanceof<SystemException>(e)) {
-					P_WARN("Cannot connect to the logging agent at " << serverAddress <<
-						" (" << e.what() << "); will reconnect in " <<
-						reconnectTimeout / 1000000 << " second(s).");
-					return make_shared<AnalyticsLog>();
-				} else {
-					throw;
-				}
-			}
-		}
-		
-		ScopeGuard guard(boost::bind(
-			&AnalyticsLoggerConnection::disconnect,
-			connection.get()));
-		try {
-			unsigned long long timeout = 15000000;
-			writeArrayMessage(connection->fd, &timeout,
-				"openTransaction",
-				txnId.c_str(),
-				groupName.c_str(),
-				"",
-				category.c_str(),
-				timestampStr,
-				unionStationKey.c_str(),
-				"true",
-				NULL);
-			guard.clear();
-			return make_shared<AnalyticsLog>(connection,
-				txnId, groupName, category,
-				unionStationKey);
-			
-		} catch (const TimeoutException &) {
-			P_WARN("Timeout trying to communicate with the logging agent at " << serverAddress << "; " <<
-				"will reconnect in " << reconnectTimeout / 1000000 << " second(s).");
-			nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
-			return make_shared<AnalyticsLog>();
-			
-		} catch (const SystemException &e) {
-			if (e.code() == ENOENT || isNetworkError(e.code())) {
-				string errorResponse;
-				
-				guard.clear();
-				if (connection->disconnect(errorResponse)) {
-					P_WARN("The logging agent at " << serverAddress <<
-						" closed the connection (error message: " << errorResponse <<
-						"); will reconnect in " << reconnectTimeout / 1000000 <<
-						" second(s).");
-				} else {
-					P_WARN("The logging agent at " << serverAddress <<
-						" closed the connection (no error message given);" <<
-						" will reconnect in " << reconnectTimeout / 1000000 <<
-						" second(s).");
-				}
-				nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
-				return make_shared<AnalyticsLog>();
-			} else {
-				throw;
-			}
-		}
-	}
-	
-	void setMaxConnectTries(unsigned int value) {
-		lock_guard<boost::mutex> l(lock);
-		maxConnectTries = value;
-	}
-	
-	void setReconnectTimeout(unsigned long long usec) {
-		lock_guard<boost::mutex> l(lock);
-		reconnectTimeout = usec;
-	}
-	
-	bool isNull() const {
-		return serverAddress.empty();
-	}
-	
-	string getAddress() const {
-		return serverAddress;
-	}
-	
-	string getUsername() const {
-		return username;
-	}
-	
-	string getPassword() const {
-		return password;
-	}
-	
-	FileDescriptor getConnection() const {
-		lock_guard<boost::mutex> l(lock);
-		lock_guard<boost::mutex> l2(connection->lock);
-		return connection->fd;
-	}
-	
-	/**
-	 * @post !result.empty()
-	 */
-	string getNodeName() const {
-		return nodeName;
 	}
 };
 
-typedef shared_ptr<AnalyticsLogger> AnalyticsLoggerPtr;
+/**
+ * Put this in code sections where you don't expect *any* exceptions to be thrown.
+ * This macro will automatically disables interruptions in the current scope,
+ * and will print an error message whenever the scope exits with an exception.
+ *
+ * When inside critical sections, you should put this macro right after the lock
+ * object so that the error message is displayed before unlocking the lock;
+ * otherwise other threads may run before the error message is displayed, and
+ * those threads may see an inconsistant state and crash.
+ */
+#define NOT_EXPECTING_EXCEPTIONS() NotExpectingExceptions __nee(__FILE__, __LINE__, __PRETTY_FUNCTION__)
 
 } // namespace Passenger
 
 #endif /* _PASSENGER_LOGGING_H_ */
-
diff --git a/ext/common/LoggingAgent/DataStoreId.h b/ext/common/LoggingAgent/DataStoreId.h
deleted file mode 100644
index 2f18803..0000000
--- a/ext/common/LoggingAgent/DataStoreId.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_DATA_STORE_ID_H_
-#define _PASSENGER_DATA_STORE_ID_H_
-
-#include <cstring>
-#include <climits>
-#include <cassert>
-#include "StaticString.h"
-
-namespace Passenger {
-
-
-/**
- * Efficient representation for a (groupName, nodeName, category) tuple.
- */
-class DataStoreId {
-private:
-	char *id;
-	unsigned short groupNameSize;
-	unsigned short nodeNameSize;
-	unsigned short categorySize;
-	
-	size_t totalSize() const {
-		return groupNameSize + nodeNameSize + categorySize + 3;
-	}
-	
-	StaticString toStaticString() const {
-		if (id == NULL) {
-			return StaticString();
-		} else {
-			return StaticString(id, totalSize());
-		}
-	}
-	
-public:
-	DataStoreId(const StaticString &groupName, const StaticString &nodeName,
-		const StaticString &category)
-	{
-		assert(groupName.size() <= USHRT_MAX);
-		assert(nodeName.size() <= USHRT_MAX);
-		assert(category.size() <= USHRT_MAX);
-		
-		char *end;
-		
-		id = new char[groupName.size() + nodeName.size() +
-			category.size() + 3];
-		end = id;
-		
-		memcpy(end, groupName.c_str(), groupName.size());
-		groupNameSize = groupName.size();
-		end += groupName.size();
-		*end = '\0';
-		end++;
-		
-		memcpy(end, nodeName.c_str(), nodeName.size());
-		nodeNameSize = nodeName.size();
-		end += nodeName.size();
-		*end = '\0';
-		end++;
-		
-		memcpy(end, category.c_str(), category.size());
-		categorySize = category.size();
-		end += category.size();
-		*end = '\0';
-	}
-	
-	DataStoreId() {
-		id = NULL;
-	}
-	
-	DataStoreId(const DataStoreId &other) {
-		if (other.id == NULL) {
-			id = NULL;
-		} else {
-			id = new char[other.totalSize()];
-			memcpy(id, other.id, other.totalSize());
-			groupNameSize = other.groupNameSize;
-			nodeNameSize = other.nodeNameSize;
-			categorySize = other.categorySize;
-		}
-	}
-	
-	~DataStoreId() {
-		delete id;
-	}
-	
-	DataStoreId &operator=(const DataStoreId &other) {
-		if (other.id == NULL) {
-			delete id;
-			id = NULL;
-			return *this;
-		} else {
-			if (totalSize() != other.totalSize()) {
-				delete id;
-				id = NULL;
-			}
-			if (id == NULL) {
-				id = new char[other.totalSize()];
-			}
-			memcpy(id, other.id, other.totalSize());
-			groupNameSize = other.groupNameSize;
-			nodeNameSize = other.nodeNameSize;
-			categorySize = other.categorySize;
-			return *this;
-		}
-	}
-	
-	bool operator<(const DataStoreId &other) const {
-		return toStaticString() < other.toStaticString();
-	}
-	
-	bool operator==(const DataStoreId &other) const {
-		if (id == NULL) {
-			return other.id == NULL;
-		} else {
-			if (other.id == NULL) {
-				return false;
-			} else {
-				return toStaticString() == other.toStaticString();
-			}
-		}
-	}
-	
-	StaticString getGroupName() const {
-		if (id != NULL) {
-			return StaticString(id, groupNameSize);
-		} else {
-			return StaticString();
-		}
-	}
-	
-	StaticString getNodeName() const {
-		if (id != NULL) {
-			return StaticString(id + groupNameSize + 1,
-				nodeNameSize);
-		} else {
-			return StaticString();
-		}
-	}
-	
-	StaticString getCategory() const {
-		if (id != NULL) {
-			return StaticString(id + groupNameSize + 1 + nodeNameSize + 1,
-				categorySize);
-		} else {
-			return StaticString();
-		}
-	}
-};
-
-
-} // namespace Passenger
-
-#endif /* _PASSENGER_DATA_STORE_ID_H_ */
diff --git a/ext/common/LoggingAgent/FilterSupport.cpp b/ext/common/LoggingAgent/FilterSupport.cpp
deleted file mode 100644
index b8bbde8..0000000
--- a/ext/common/LoggingAgent/FilterSupport.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2011 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#include "FilterSupport.h"
-#include <cstring>
-#include <cstdlib>
-
-using namespace Passenger;
-
-extern "C" {
-
-PassengerFilter *
-passenger_filter_create(const char *source, int size, char **error) {
-	if (size == -1) {
-		size = strlen(source);
-	}
-	try {
-		return (PassengerFilter *) new FilterSupport::Filter(StaticString(source, size));
-	} catch (const SyntaxError &e) {
-		if (error != NULL) {
-			*error = strdup(e.what());
-		}
-		return NULL;
-	}
-}
-
-void
-passenger_filter_free(PassengerFilter *filter) {
-	delete (FilterSupport::Filter *) filter;
-}
-
-char *
-passenger_filter_validate(const char *source, int size) {
-	if (size == -1) {
-		size = strlen(source);
-	}
-	try {
-		FilterSupport::Filter(StaticString(source, size));
-		return NULL;
-	} catch (const SyntaxError &e) {
-		return strdup(e.what());
-	}
-}
-
-} // extern "C"
diff --git a/ext/common/LoggingAgent/FilterSupport.h b/ext/common/LoggingAgent/FilterSupport.h
deleted file mode 100644
index f506ccb..0000000
--- a/ext/common/LoggingAgent/FilterSupport.h
+++ /dev/null
@@ -1,1611 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2011 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_FILTER_SUPPORT_H_
-#define _PASSENGER_FILTER_SUPPORT_H_
-
-#ifdef __cplusplus
-
-#include <boost/shared_ptr.hpp>
-#include <boost/make_shared.hpp>
-#include <oxt/tracable_exception.hpp>
-
-#include <string>
-#include <set>
-#ifndef _PCREPOSIX_H
-	#include <regex.h>
-#endif
-#include <cstdio>
-#include <cstring>
-
-#include <StaticString.h>
-#include <Exceptions.h>
-#include <Utils/StrIntUtils.h>
-
-namespace Passenger {
-namespace FilterSupport {
-
-using namespace std;
-using namespace boost;
-using namespace oxt;
-
-
-class Tokenizer {
-public:
-	enum TokenType {
-		NONE,
-		NOT,
-		AND,
-		OR,
-		MATCHES,
-		NOT_MATCHES,
-		EQUALS,
-		NOT_EQUALS,
-		GREATER_THAN,
-		GREATER_THAN_OR_EQUALS,
-		LESS_THAN,
-		LESS_THAN_OR_EQUALS,
-		LPARENTHESIS,
-		RPARENTHESIS,
-		COMMA,
-		REGEXP,
-		STRING,
-		INTEGER,
-		TRUE_LIT,
-		FALSE_LIT,
-		IDENTIFIER,
-		END_OF_DATA
-	};
-	
-	enum TokenOptions {
-		NO_OPTIONS = 0,
-		REGEXP_OPTION_CASE_INSENSITIVE = 1
-	};
-	
-	struct Token {
-		TokenType type;
-		int options;
-		unsigned int pos;
-		unsigned int size;
-		StaticString rawValue;
-		
-		Token() {
-			type = NONE;
-		}
-		
-		Token(TokenType _type, unsigned int _pos, unsigned int _size, const StaticString &_rawValue)
-			: type(_type),
-			  options(NO_OPTIONS),
-			  pos(_pos),
-			  size(_size),
-			  rawValue(_rawValue)
-			{ }
-		
-		string toString() const {
-			return Tokenizer::typeToString(type);
-		}
-	};
-
-private:
-	StaticString data;
-	bool debug;
-	unsigned int pos;
-	
-	static bool isWhitespace(char ch) {
-		return ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n';
-	}
-	
-	void skipWhitespaces() {
-		while (pos < data.size() && isWhitespace(data[pos])) {
-			pos++;
-		}
-	}
-	
-	unsigned int available() const {
-		return data.size() - pos;
-	}
-	
-	char current() const {
-		return data[pos];
-	}
-	
-	char next() const {
-		return data[pos + 1];
-	}
-	
-	static bool isIdentifierChar(char ch) {
-		return (ch >= 'a' && ch <= 'z')
-			|| (ch >= 'A' && ch <= 'Z')
-			|| (ch >= '0' && ch <= '9')
-			|| ch == '_';
-	}
-	
-	static bool isDigit(char ch) {
-		return ch >= '0' && ch <= '9';
-	}
-	
-	Token logToken(const Token &token) const {
-		if (debug) {
-			printf("# Token: %s\n", token.toString().c_str());
-		}
-		return token;
-	}
-	
-	void raiseSyntaxError(const string &message = "") {
-		string msg = "Syntax error at character " + toString(pos + 1);
-		if (!message.empty()) {
-			msg.append(": ");
-			msg.append(message);
-		}
-		throw SyntaxError(msg);
-	}
-	
-	void expectingAtLeast(unsigned int size) {
-		if (available() < size) {
-			raiseSyntaxError("at least " + toString(size) +
-				" more characters expected");
-		}
-	}
-	
-	void expectingNextChar(char ch) {
-		expectingAtLeast(2);
-		if (next() != ch) {
-			raiseSyntaxError("expected '" + toString(ch) +
-				"', but found '" + toString(next()) +
-				"'");
-		}
-	}
-	
-	Token matchToken(TokenType type, unsigned int size = 0) {
-		unsigned int oldPos = pos;
-		pos += size;
-		return Token(type, oldPos, size, data.substr(oldPos, size));
-	}
-	
-	Token matchTokensStartingWithNegation() {
-		expectingAtLeast(2);
-		switch (next()) {
-		case '~':
-			return matchToken(NOT_MATCHES, 2);
-		case '=':
-			return matchToken(NOT_EQUALS, 2);
-		default:
-			raiseSyntaxError("unrecognized operator '" + data.substr(pos, 2) + "'");
-			return Token(); // Shut up compiler warning.
-		};
-	}
-	
-	Token matchAnd() {
-		expectingNextChar('&');
-		return matchToken(AND, 2);
-	}
-	
-	Token matchOr() {
-		expectingNextChar('|');
-		return matchToken(OR, 2);
-	}
-	
-	Token matchTokensStartingWithEquals() {
-		expectingAtLeast(2);
-		switch (next()) {
-		case '~':
-			return matchToken(MATCHES, 2);
-		case '=':
-			return matchToken(EQUALS, 2);
-		default:
-			raiseSyntaxError("unrecognized operator '" + data.substr(pos, 2) + "'");
-			return Token(); // Shut up compiler warning.
-		}
-	}
-	
-	Token matchTokensStartingWithGreaterThan() {
-		if (available() == 0 || next() != '=') {
-			return matchToken(GREATER_THAN, 1);
-		} else {
-			return matchToken(GREATER_THAN_OR_EQUALS, 2);
-		}
-	}
-	
-	Token matchTokensStartingWithLessThan() {
-		if (available() == 0 || next() != '=') {
-			return matchToken(LESS_THAN, 1);
-		} else {
-			return matchToken(LESS_THAN_OR_EQUALS, 2);
-		}
-	}
-	
-	Token matchRegexp(char terminator) {
-		unsigned int start = pos;
-		bool endFound = false;
-		
-		// Match initial quote slash.
-		pos++;
-		
-		// Match rest of regexp including terminating slash.
-		while (pos < data.size() && !endFound) {
-			char ch = current();
-			if (ch == '\\') {
-				pos++;
-				if (pos >= data.size()) {
-					raiseSyntaxError("unterminated regular expression");
-				} else {
-					pos++;
-				}
-			} else if (ch == terminator) {
-				pos++;
-				endFound = true;
-			} else {
-				pos++;
-			}
-		}
-		
-		if (endFound) {
-			Token t(REGEXP, start, pos - start, data.substr(start, pos - start));
-			
-			// Match regexp options.
-			endFound = false;
-			while (pos < data.size() && !endFound) {
-				char ch = current();
-				if (ch == 'i') {
-					t.options |= Tokenizer::REGEXP_OPTION_CASE_INSENSITIVE;
-				} else if (isWhitespace(ch)) {
-					endFound = true;
-				}
-				pos++;
-			}
-			
-			return t;
-		} else {
-			raiseSyntaxError("unterminated regular expression");
-			return Token(); // Shut up compiler warning.
-		}
-	}
-	
-	Token matchString(char terminator) {
-		unsigned int start = pos;
-		bool endFound = false;
-		
-		// Match initial quote character.
-		pos++;
-		
-		// Match rest of string including terminating quote.
-		while (pos < data.size() && !endFound) {
-			char ch = current();
-			if (ch == '\\') {
-				pos++;
-				if (pos >= data.size()) {
-					raiseSyntaxError("unterminated string");
-				} else {
-					pos++;
-				}
-			} else if (ch == terminator) {
-				pos++;
-				endFound = true;
-			} else {
-				pos++;
-			}
-		}
-		
-		if (endFound) {
-			return Token(STRING, start, pos - start, data.substr(start, pos - start));
-		} else {
-			raiseSyntaxError("unterminated string");
-			return Token(); // Shut up compiler warning.
-		}
-	}
-	
-	Token matchInteger() {
-		unsigned int start = pos;
-		
-		// Accept initial minus or digit.
-		pos++;
-		
-		while (pos < data.size() && isDigit(data[pos])) {
-			pos++;
-		}
-		
-		return Token(INTEGER, start, pos - start, data.substr(start, pos - start));
-	}
-	
-	Token matchIdentifier() {
-		char ch = current();
-		if ((ch >= 'a' && ch <= 'z') ||
-		    (ch >= 'A' && ch <= 'Z') ||
-		    ch == '_') {
-			unsigned int start = pos;
-			pos++;
-			while (pos < data.size() && isIdentifierChar(current())) {
-				pos++;
-			}
-			
-			StaticString val = data.substr(start, pos - start);
-			if (val == "true") {
-				return Token(TRUE_LIT, start, pos - start, val);
-			} else if (val == "false") {
-				return Token(FALSE_LIT, start, pos - start, val);
-			} else {
-				return Token(IDENTIFIER, start, pos - start, val);
-			}
-		} else {
-			raiseSyntaxError("Identifier expected, but got an unknown token");
-			return Token(); // Shut up compiler warning.
-		}
-	}
-
-public:
-	Tokenizer(const StaticString &data, bool debug = false) {
-		this->data = data;
-		this->debug = debug;
-		pos = 0;
-	}
-	
-	Token getNext() {
-		skipWhitespaces();
-		if (pos >= data.size()) {
-			return logToken(Token(END_OF_DATA, data.size(), 0, ""));
-		}
-		
-		switch (current()) {
-		case '!':
-			return logToken(matchTokensStartingWithNegation());
-		case '&':
-			return logToken(matchAnd());
-		case '|':
-			return logToken(matchOr());
-		case '=':
-			return logToken(matchTokensStartingWithEquals());
-		case '>':
-			return logToken(matchTokensStartingWithGreaterThan());
-		case '<':
-			return logToken(matchTokensStartingWithLessThan());
-		case '(':
-			return logToken(matchToken(LPARENTHESIS, 1));
-		case ')':
-			return logToken(matchToken(RPARENTHESIS, 1));
-		case ',':
-			return logToken(matchToken(COMMA, 1));
-		case '/':
-			return logToken(matchRegexp('/'));
-		case '%':
-			expectingAtLeast(3);
-			if (memcmp(data.data() + pos, "%r{", 3) != 0) {
-				raiseSyntaxError("expected '%r{', but found '" +
-					data.substr(pos, 3) + "'");
-			}
-			pos += 2;
-			return logToken(matchRegexp('}'));
-		case '"':
-			return logToken(matchString('"'));
-		case '\'':
-			return logToken(matchString('\''));
-		case '-':
-			return logToken(matchInteger());
-		default:
-			if (isDigit(current())) {
-				return logToken(matchInteger());
-			} else {
-				return logToken(matchIdentifier());
-			}
-		}
-	}
-	
-	static string typeToString(TokenType type) {
-		switch (type) {
-		case NONE:
-			return "NONE";
-		case NOT:
-			return "NOT";
-		case AND:
-			return "AND";
-		case OR:
-			return "OR";
-		case MATCHES:
-			return "MATCHES";
-		case NOT_MATCHES:
-			return "NOT_MATCHES";
-		case EQUALS:
-			return "EQUALS";
-		case NOT_EQUALS:
-			return "NOT_EQUALS";
-		case GREATER_THAN:
-			return "GREATER_THAN";
-		case GREATER_THAN_OR_EQUALS:
-			return "GREATER_THAN_OR_EQUALS";
-		case LESS_THAN:
-			return "LESS_THAN";
-		case LESS_THAN_OR_EQUALS:
-			return "LESS_THAN_OR_EQUALS";
-		case LPARENTHESIS:
-			return "LPARENTHESIS";
-		case RPARENTHESIS:
-			return "RPARENTHESIS";
-		case COMMA:
-			return "COMMA";
-		case REGEXP:
-			return "REGEXP";
-		case STRING:
-			return "STRING";
-		case INTEGER:
-			return "INTEGER";
-		case TRUE_LIT:
-			return "TRUE";
-		case FALSE_LIT:
-			return "FALSE";
-		case IDENTIFIER:
-			return "IDENTIFIER";
-		case END_OF_DATA:
-			return "END_OF_DATA";
-		default:
-			return "(unknown)";
-		}
-	}
-};
-
-
-enum ValueType {
-	REGEXP_TYPE,
-	STRING_TYPE,
-	INTEGER_TYPE,
-	BOOLEAN_TYPE,
-	UNKNOWN_TYPE
-};
-
-
-class Context {
-public:
-	enum FieldIdentifier {
-		URI,
-		CONTROLLER,
-		RESPONSE_TIME,
-		RESPONSE_TIME_WITHOUT_GC,
-		STATUS,
-		STATUS_CODE,
-		GC_TIME
-	};
-	
-	virtual ~Context() { }
-	
-	virtual string getURI() const = 0;
-	virtual string getController() const = 0;
-	virtual int getResponseTime() const = 0;
-	virtual string getStatus() const = 0;
-	virtual int getStatusCode() const = 0;
-	virtual int getGcTime() const = 0;
-	virtual bool hasHint(const string &name) const = 0;
-	
-	int getResponseTimeWithoutGc() const {
-		return getResponseTime() - getGcTime();
-	}
-	
-	string queryStringField(FieldIdentifier id) const {
-		switch (id) {
-		case URI:
-			return getURI();
-		case CONTROLLER:
-			return getController();
-		case RESPONSE_TIME:
-			return toString(getResponseTime());
-		case RESPONSE_TIME_WITHOUT_GC:
-			return toString(getResponseTimeWithoutGc());
-		case STATUS:
-			return getStatus();
-		case STATUS_CODE:
-			return toString(getStatusCode());
-		case GC_TIME:
-			return toString(getGcTime());
-		default:
-			return "";
-		}
-	}
-	
-	int queryIntField(FieldIdentifier id) const {
-		switch (id) {
-		case RESPONSE_TIME:
-			return getResponseTime();
-		case RESPONSE_TIME_WITHOUT_GC:
-			return getResponseTimeWithoutGc();
-		case STATUS_CODE:
-			return getStatusCode();
-		case GC_TIME:
-			return getGcTime();
-		default:
-			return 0;
-		}
-	}
-	
-	bool queryBoolField(FieldIdentifier id) const {
-		switch (id) {
-		case URI:
-			return !getURI().empty();
-		case CONTROLLER:
-			return !getController().empty();
-		case RESPONSE_TIME:
-			return getResponseTime() > 0;
-		case RESPONSE_TIME_WITHOUT_GC:
-			return getResponseTimeWithoutGc() > 0;
-		case STATUS:
-			return !getStatus().empty();
-		case STATUS_CODE:
-			return getStatusCode() > 0;
-		case GC_TIME:
-			return getGcTime() > 0;
-		default:
-			return false;
-		}
-	}
-	
-	static ValueType getFieldType(FieldIdentifier id) {
-		switch (id) {
-		case URI:
-		case CONTROLLER:
-		case STATUS:
-			return STRING_TYPE;
-		case RESPONSE_TIME:
-		case RESPONSE_TIME_WITHOUT_GC:
-		case STATUS_CODE:
-		case GC_TIME:
-			return INTEGER_TYPE;
-		default:
-			return UNKNOWN_TYPE;
-		}
-	}
-};
-
-class SimpleContext: public Context {
-public:
-	string uri;
-	string controller;
-	string status;
-	int responseTime;
-	int statusCode;
-	int gcTime;
-	set<string> hints;
-	
-	SimpleContext() {
-		responseTime = 0;
-		statusCode = 0;
-		gcTime = 0;
-	}
-	
-	virtual string getURI() const {
-		return uri;
-	}
-	
-	virtual string getController() const {
-		return controller;
-	}
-	
-	virtual int getResponseTime() const {
-		return responseTime;
-	}
-	
-	virtual string getStatus() const {
-		return status;
-	}
-	
-	virtual int getStatusCode() const {
-		return statusCode;
-	}
-	
-	virtual int getGcTime() const {
-		return gcTime;
-	}
-	
-	virtual bool hasHint(const string &name) const {
-		return hints.find(name) != hints.end();
-	}
-};
-
-class ContextFromLog: public Context {
-private:
-	StaticString logData;
-	mutable SimpleContext *parsedData;
-	
-	struct ParseState {
-		unsigned long long requestProcessingStart;
-		unsigned long long requestProcessingEnd;
-		unsigned long long smallestTimestamp;
-		unsigned long long largestTimestamp;
-		unsigned long long gcTimeStart;
-		unsigned long long gcTimeEnd;
-	};
-	
-	static void parseLine(const StaticString &txnId, unsigned long long timestamp,
-		const StaticString &data, SimpleContext &ctx, ParseState &state)
-	{
-		if (startsWith(data, "BEGIN: request processing")) {
-			state.requestProcessingStart = extractEventTimestamp(data);
-		} else if (startsWith(data, "END: request processing")
-		        || startsWith(data, "FAIL: request processing")) {
-			state.requestProcessingEnd = extractEventTimestamp(data);
-		} else if (startsWith(data, "URI: ")) {
-			ctx.uri = data.substr(data.find(':') + 2);
-		} else if (startsWith(data, "Controller action: ")) {
-			StaticString value = data.substr(data.find(':') + 2);
-			size_t pos = value.find('#');
-			if (pos != string::npos) {
-				ctx.controller = value.substr(0, pos);
-			}
-		} else if (startsWith(data, "Status: ")) {
-			StaticString value = data.substr(data.find(':') + 2);
-			ctx.status = value;
-			ctx.statusCode = stringToInt(value);
-		} else if (startsWith(data, "Initial GC time: ")) {
-			StaticString value = data.substr(data.find(':') + 2);
-			state.gcTimeStart = stringToULL(value);
-		} else if (startsWith(data, "Final GC time: ")) {
-			StaticString value = data.substr(data.find(':') + 2);
-			state.gcTimeEnd = stringToULL(value);
-		}
-		
-		if (state.smallestTimestamp == 0 || timestamp < state.smallestTimestamp) {
-			state.smallestTimestamp = timestamp;
-		}
-		if (timestamp > state.largestTimestamp) {
-			state.largestTimestamp = timestamp;
-		}
-	}
-	
-	static void reallyParse(const StaticString &data, SimpleContext &ctx) {
-		const char *current = data.data();
-		const char *end     = data.data() + data.size();
-		
-		ParseState state;
-		memset(&state, 0, sizeof(state));
-		
-		while (current < end) {
-			current = skipNewlines(current, end);
-			if (current < end) {
-				const char *endOfLine = findEndOfLine(current, end);
-				StaticString line(current, endOfLine - current);
-				if (!line.empty()) {
-					StaticString txnId;
-					unsigned long long timestamp;
-					unsigned int writeCount;
-					StaticString lineData;
-					
-					// If we want to do more complicated analysis we should sort
-					// the lines but for the purposes of ContextFromLog
-					// analyzing the data without sorting is good enough.
-					if (splitLine(line, txnId, timestamp, writeCount, lineData)) {
-						parseLine(txnId, timestamp, lineData, ctx,
-						state);
-					}
-				}
-				current = endOfLine;
-			}
-		}
-		
-		if (state.requestProcessingEnd != 0) {
-			ctx.responseTime = int(state.requestProcessingEnd -
-				state.requestProcessingStart);
-		} else if (state.smallestTimestamp != 0) {
-			ctx.responseTime = state.largestTimestamp - state.smallestTimestamp;
-		}
-		
-		if (state.gcTimeEnd != 0) {
-			ctx.gcTime = state.gcTimeEnd - state.gcTimeStart;
-		}
-	}
-	
-	static bool splitLine(const StaticString &line, StaticString &txnId,
-		unsigned long long &timestamp, unsigned int &writeCount,
-		StaticString &data)
-	{
-		size_t firstDelim = line.find(' ');
-		if (firstDelim == string::npos) {
-			return false;
-		}
-		
-		size_t secondDelim = line.find(' ', firstDelim + 1);
-		if (secondDelim == string::npos) {
-			return false;
-		}
-		
-		size_t thirdDelim = line.find(' ', secondDelim + 1);
-		if (thirdDelim == string::npos) {
-			return false;
-		}
-		
-		txnId = line.substr(0, firstDelim);
-		timestamp = hexatriToULL(line.substr(firstDelim + 1, secondDelim - firstDelim - 1));
-		writeCount = (unsigned int) hexatriToULL(line.substr(secondDelim + 1,
-			thirdDelim - secondDelim - 1));
-		data = line.substr(thirdDelim + 1);
-		return true;
-	}
-	
-	static unsigned long long extractEventTimestamp(const StaticString &data) {
-		size_t pos = data.find('(');
-		if (pos == string::npos) {
-			return 0;
-		} else {
-			pos++;
-			size_t start = pos;
-			while (pos < data.size() && isDigit(data[pos])) {
-				pos++;
-			}
-			if (pos >= data.size()) {
-				return 0;
-			} else {
-				return hexatriToULL(data.substr(start, pos - start));
-			}
-		}
-	}
-	
-	static bool isNewline(char ch) {
-		return ch == '\n' || ch == '\r';
-	}
-	
-	static bool isDigit(char ch) {
-		return ch >= '0' && ch <= '9';
-	}
-	
-	static const char *skipNewlines(const char *current, const char *end) {
-		while (current < end && isNewline(*current)) {
-			current++;
-		}
-		return current;
-	}
-	
-	static const char *findEndOfLine(const char *current, const char *end) {
-		while (current < end && !isNewline(*current)) {
-			current++;
-		}
-		return current;
-	}
-	
-	SimpleContext *parse() const {
-		if (parsedData == NULL) {
-			auto_ptr<SimpleContext> ctx(new SimpleContext());
-			reallyParse(logData, *ctx.get());
-			parsedData = ctx.release();
-		}
-		return parsedData;
-	}
-	
-public:
-	ContextFromLog(const StaticString &logData) {
-		this->logData = logData;
-		parsedData = NULL;
-	}
-	
-	~ContextFromLog() {
-		delete parsedData;
-	}
-	
-	virtual string getURI() const {
-		return parse()->uri;
-	}
-	
-	virtual string getController() const {
-		return parse()->getController();
-	}
-	
-	virtual int getResponseTime() const {
-		return parse()->getResponseTime();
-	}
-	
-	virtual string getStatus() const {
-		return parse()->getStatus();
-	}
-	
-	virtual int getStatusCode() const {
-		return parse()->getStatusCode();
-	}
-	
-	virtual int getGcTime() const {
-		return parse()->getGcTime();
-	}
-	
-	virtual bool hasHint(const string &name) const {
-		return parse()->hasHint(name);
-	}
-};
-
-
-class Filter {
-private:
-	typedef Tokenizer::Token Token;
-	typedef Tokenizer::TokenType TokenType;
-	
-	struct BooleanComponent;
-	struct MultiExpression;
-	struct Comparison;
-	struct FunctionCall;
-	typedef shared_ptr<BooleanComponent> BooleanComponentPtr;
-	typedef shared_ptr<MultiExpression> MultiExpressionPtr;
-	typedef shared_ptr<Comparison> ComparisonPtr;
-	typedef shared_ptr<FunctionCall> FunctionCallPtr;
-	
-	struct BooleanComponent {
-		virtual ~BooleanComponent() { }
-		virtual bool evaluate(const Context &ctx) = 0;
-	};
-	
-	enum LogicalOperator {
-		AND,
-		OR
-	};
-	
-	enum Comparator {
-		MATCHES,
-		NOT_MATCHES,
-		EQUALS,
-		NOT_EQUALS,
-		GREATER_THAN,
-		GREATER_THAN_OR_EQUALS,
-		LESS_THAN,
-		LESS_THAN_OR_EQUALS,
-		UNKNOWN_COMPARATOR
-	};
-	
-	struct MultiExpression: public BooleanComponent {
-		struct Part {
-			LogicalOperator theOperator;
-			BooleanComponentPtr expression;
-		};
-		
-		BooleanComponentPtr firstExpression;
-		vector<Part> rest;
-		
-		virtual bool evaluate(const Context &ctx) {
-			bool result = firstExpression->evaluate(ctx);
-			unsigned int i = 0;
-			bool done = i == rest.size();
-			
-			while (!done) {
-				Part &nextPart = rest[i];
-				if (nextPart.theOperator == AND) {
-					result = result && nextPart.expression->evaluate(ctx);
-					done = !result;
-				} else {
-					result = result || nextPart.expression->evaluate(ctx);
-				}
-				i++;
-				done = done || i == rest.size();
-			}
-			
-			return result;
-		}
-	};
-	
-	struct Negation: public BooleanComponent {
-		BooleanComponentPtr expr;
-		
-		Negation(const BooleanComponentPtr &e)
-			: expr(e)
-			{ }
-		
-		virtual bool evaluate(const Context &ctx) {
-			return !expr->evaluate(ctx);
-		}
-	};
-	
-	struct Value {
-		enum Source {
-			REGEXP_LITERAL,
-			STRING_LITERAL,
-			INTEGER_LITERAL,
-			BOOLEAN_LITERAL,
-			CONTEXT_FIELD_IDENTIFIER
-		};
-		
-		Source source;
-		union {
-			struct {
-				char stringStorage[sizeof(string)];
-				struct {
-					regex_t regexp;
-					int options;
-				} regexp;
-			} stringOrRegexpValue;
-			int intValue;
-			bool boolValue;
-			Context::FieldIdentifier contextFieldIdentifier;
-		} u;
-		
-		Value() {
-			source = INTEGER_LITERAL;
-			u.intValue = 0;
-		}
-		
-		Value(const Value &other) {
-			initializeFrom(other);
-		}
-		
-		Value(bool regexp, const StaticString &value, bool caseInsensitive = false) {
-			if (regexp) {
-				source = REGEXP_LITERAL;
-			} else {
-				source = STRING_LITERAL;
-			}
-			new (u.stringOrRegexpValue.stringStorage) string(value.data(), value.size());
-			if (regexp) {
-				int options = REG_EXTENDED;
-				u.stringOrRegexpValue.regexp.options = 0;
-				if (caseInsensitive) {
-					options |= REG_ICASE;
-					u.stringOrRegexpValue.regexp.options |=
-						Tokenizer::REGEXP_OPTION_CASE_INSENSITIVE;
-				}
-				regcomp(&u.stringOrRegexpValue.regexp.regexp,
-					value.toString().c_str(),
-					options);
-			}
-		}
-		
-		Value(int val) {
-			source = INTEGER_LITERAL;
-			u.intValue = val;
-		}
-		
-		Value(bool val) {
-			source = BOOLEAN_LITERAL;
-			u.boolValue = val;
-		}
-		
-		Value(Context::FieldIdentifier identifier) {
-			source = CONTEXT_FIELD_IDENTIFIER;
-			u.contextFieldIdentifier = identifier;
-		}
-		
-		~Value() {
-			freeStorage();
-		}
-		
-		Value &operator=(const Value &other) {
-			freeStorage();
-			initializeFrom(other);
-			return *this;
-		}
-		
-		regex_t *getRegexpValue(const Context &ctx) const {
-			if (source == REGEXP_LITERAL) {
-				return &storedRegexp();
-			} else {
-				return NULL;
-			}
-		}
-		
-		string getStringValue(const Context &ctx) const {
-			switch (source) {
-			case REGEXP_LITERAL:
-			case STRING_LITERAL:
-				return storedString();
-			case INTEGER_LITERAL:
-				return toString(u.intValue);
-			case BOOLEAN_LITERAL:
-				if (u.boolValue) {
-					return "true";
-				} else {
-					return "false";
-				}
-			case CONTEXT_FIELD_IDENTIFIER:
-				return ctx.queryStringField(u.contextFieldIdentifier);
-			default:
-				return "";
-			}
-		}
-		
-		int getIntegerValue(const Context &ctx) const {
-			switch (source) {
-			case REGEXP_LITERAL:
-				return 0;
-			case STRING_LITERAL:
-				return atoi(storedString());
-			case INTEGER_LITERAL:
-				return u.intValue;
-			case BOOLEAN_LITERAL:
-				return (int) u.boolValue;
-			case CONTEXT_FIELD_IDENTIFIER:
-				return ctx.queryIntField(u.contextFieldIdentifier);
-			default:
-				return 0;
-			}
-		}
-		
-		bool getBooleanValue(const Context &ctx) const {
-			switch (source) {
-			case REGEXP_LITERAL:
-				return true;
-			case STRING_LITERAL:
-				return !storedString().empty();
-			case INTEGER_LITERAL:
-				return (bool) u.intValue;
-			case BOOLEAN_LITERAL:
-				return u.boolValue;
-			case CONTEXT_FIELD_IDENTIFIER:
-				return ctx.queryBoolField(u.contextFieldIdentifier);
-			default:
-				return 0;
-			}
-		}
-		
-		ValueType getType() const {
-			switch (source) {
-			case REGEXP_LITERAL:
-				return REGEXP_TYPE;
-			case STRING_LITERAL:
-				return STRING_TYPE;
-			case INTEGER_LITERAL:
-				return INTEGER_TYPE;
-			case BOOLEAN_LITERAL:
-				return BOOLEAN_TYPE;
-			case CONTEXT_FIELD_IDENTIFIER:
-				return Context::getFieldType(u.contextFieldIdentifier);
-			default:
-				return UNKNOWN_TYPE;
-			}
-		}
-	
-	private:
-		const string &storedString() const {
-			return *((string *) u.stringOrRegexpValue.stringStorage);
-		}
-		
-		regex_t &storedRegexp() const {
-			return (regex_t &) u.stringOrRegexpValue.regexp.regexp;
-		}
-		
-		void freeStorage() {
-			if (source == REGEXP_LITERAL || source == STRING_LITERAL) {
-				storedString().~string();
-				if (source == REGEXP_LITERAL) {
-					regfree(&storedRegexp());
-				}
-			}
-		}
-		
-		void initializeFrom(const Value &other) {
-			int options;
-			source = other.source;
-			switch (source) {
-			case REGEXP_LITERAL:
-				new (u.stringOrRegexpValue.stringStorage) string(other.storedString());
-				options = REG_EXTENDED;
-				if (other.u.stringOrRegexpValue.regexp.options & Tokenizer::REGEXP_OPTION_CASE_INSENSITIVE) {
-					options |= REG_ICASE;
-				}
-				regcomp(&u.stringOrRegexpValue.regexp.regexp,
-					storedString().c_str(),
-					options);
-				u.stringOrRegexpValue.regexp.options = other.u.stringOrRegexpValue.regexp.options;
-				break;
-			case STRING_LITERAL:
-				new (u.stringOrRegexpValue.stringStorage) string(other.storedString());
-				break;
-			case INTEGER_LITERAL:
-				u.intValue = other.u.intValue;
-				break;
-			case BOOLEAN_LITERAL:
-				u.boolValue = other.u.boolValue;
-				break;
-			case CONTEXT_FIELD_IDENTIFIER:
-				u.contextFieldIdentifier = other.u.contextFieldIdentifier;
-				break;
-			}
-		}
-	};
-	
-	struct SingleValueComponent: public BooleanComponent {
-		Value val;
-		
-		SingleValueComponent(const Value &v)
-			: val(v)
-			{ }
-		
-		virtual bool evaluate(const Context &ctx) {
-			return val.getBooleanValue(ctx);
-		}
-	};
-	
-	struct Comparison: public BooleanComponent {
-		Value subject;
-		Comparator comparator;
-		Value object;
-		
-		virtual bool evaluate(const Context &ctx) {
-			switch (subject.getType()) {
-			case STRING_TYPE:
-				return compareStringOrRegexp(subject.getStringValue(ctx), ctx);
-			case INTEGER_TYPE:
-				return compareInteger(subject.getIntegerValue(ctx), ctx);
-			case BOOLEAN_TYPE:
-				return compareBoolean(subject.getBooleanValue(ctx), ctx);
-			default:
-				// error
-				return false;
-			}
-		}
-	
-	private:
-		bool compareStringOrRegexp(const string &str, const Context &ctx) {
-			switch (comparator) {
-			case MATCHES:
-				return regexec(object.getRegexpValue(ctx), str.c_str(), 0, NULL, 0) == 0;
-			case NOT_MATCHES:
-				return regexec(object.getRegexpValue(ctx), str.c_str(), 0, NULL, 0) != 0;
-			case EQUALS:
-				return str == object.getStringValue(ctx);
-			case NOT_EQUALS:
-				return str != object.getStringValue(ctx);
-			default:
-				// error
-				return false;
-			}
-		}
-		
-		bool compareInteger(int value, const Context &ctx) {
-			int value2 = object.getIntegerValue(ctx);
-			switch (comparator) {
-			case EQUALS:
-				return value == value2;
-			case NOT_EQUALS:
-				return value != value2;
-			case GREATER_THAN:
-				return value > value2;
-			case GREATER_THAN_OR_EQUALS:
-				return value >= value2;
-			case LESS_THAN:
-				return value < value2;
-			case LESS_THAN_OR_EQUALS:
-				return value <= value2;
-			default:
-				// error
-				return false;
-			}
-		}
-		
-		bool compareBoolean(bool value, const Context &ctx) {
-			bool value2 = object.getBooleanValue(ctx);
-			switch (comparator) {
-			case EQUALS:
-				return value == value2;
-			case NOT_EQUALS:
-				return value != value2;
-			default:
-				// error
-				return false;
-			}
-		}
-	};
-	
-	struct FunctionCall: public BooleanComponent {
-		vector<Value> arguments;
-		
-		virtual void checkArguments() const = 0;
-	};
-	
-	struct StartsWithFunctionCall: public FunctionCall {
-		virtual bool evaluate(const Context &ctx) {
-			return startsWith(arguments[0].getStringValue(ctx),
-				arguments[1].getStringValue(ctx));
-		}
-		
-		virtual void checkArguments() const {
-			if (arguments.size() != 2) {
-				throw SyntaxError("you passed " + toString(arguments.size()) + 
-					" argument(s) to starts_with(), but it accepts exactly 2 arguments");
-			}
-		}
-	};
-	
-	struct HasHintFunctionCall: public FunctionCall {
-		virtual bool evaluate(const Context &ctx) {
-			return ctx.hasHint(arguments[0].getStringValue(ctx));
-		}
-		
-		virtual void checkArguments() const {
-			if (arguments.size() != 1) {
-				throw SyntaxError("you passed " + toString(arguments.size()) + 
-					" argument(s) to has_hint(), but it accepts exactly 1 argument");
-			}
-		}
-	};
-	
-	Tokenizer tokenizer;
-	BooleanComponentPtr root;
-	Token lookahead;
-	bool debug;
-	
-	static bool isLiteralToken(const Token &token) {
-		return token.type == Tokenizer::REGEXP
-			|| token.type == Tokenizer::STRING
-			|| token.type == Tokenizer::INTEGER
-			|| token.type == Tokenizer::TRUE_LIT
-			|| token.type == Tokenizer::FALSE_LIT;
-	}
-	
-	static bool isValueToken(const Token &token) {
-		return isLiteralToken(token) || token.type == Tokenizer::IDENTIFIER;
-	}
-	
-	static bool isLogicalOperatorToken(const Token &token) {
-		return token.type == Tokenizer::AND
-			|| token.type == Tokenizer::OR;
-	}
-	
-	static Comparator determineComparator(Tokenizer::TokenType type) {
-		switch (type) {
-		case Tokenizer::MATCHES:
-			return MATCHES;
-		case Tokenizer::NOT_MATCHES:
-			return NOT_MATCHES;
-		case Tokenizer::EQUALS:
-			return EQUALS;
-		case Tokenizer::NOT_EQUALS:
-			return NOT_EQUALS;
-		case Tokenizer::GREATER_THAN:
-			return GREATER_THAN;
-		case Tokenizer::GREATER_THAN_OR_EQUALS:
-			return GREATER_THAN_OR_EQUALS;
-		case Tokenizer::LESS_THAN:
-			return LESS_THAN;
-		case Tokenizer::LESS_THAN_OR_EQUALS:
-			return LESS_THAN_OR_EQUALS;
-		default:
-			return UNKNOWN_COMPARATOR;
-		}
-	}
-	
-	static bool comparatorAcceptsValueTypes(Comparator cmp, ValueType subjectType, ValueType objectType) {
-		switch (cmp) {
-		case MATCHES:
-		case NOT_MATCHES:
-			return subjectType == STRING_TYPE && objectType == REGEXP_TYPE;
-		case EQUALS:
-		case NOT_EQUALS:
-			return (subjectType == STRING_TYPE || subjectType == INTEGER_TYPE || subjectType == BOOLEAN_TYPE)
-				&& subjectType == objectType;
-		case GREATER_THAN:
-		case GREATER_THAN_OR_EQUALS:
-		case LESS_THAN:
-		case LESS_THAN_OR_EQUALS:
-			return subjectType == INTEGER_TYPE && objectType == INTEGER_TYPE;
-		default:
-			abort();
-			return false; // Shut up compiler warning.
-		}
-	}
-	
-	static string unescapeCString(const StaticString &data) {
-		string result;
-		result.reserve(data.size());
-		
-		const char *current = data.data();
-		const char *end     = data.data() + data.size();
-		while (current < end) {
-			char ch = *current;
-			if (ch == '\\') {
-				current++;
-				if (current < end) {
-					ch = *current;
-					switch (ch) {
-					case 'r':
-						result.append(1, '\r');
-						break;
-					case 'n':
-						result.append(1, '\n');
-						break;
-					case 't':
-						result.append(1, '\t');
-						break;
-					default:
-						result.append(1, ch);
-						break;
-					}
-					current++;
-				}
-			} else {
-				result.append(1, ch);
-				current++;
-			}
-		}
-		
-		return result;
-	}
-	
-	void logMatch(int level, const char *name) const {
-		if (level > 100) {
-			// If level is too deep then it's probably a bug.
-			abort();
-		}
-		if (debug) {
-			for (int i = 0; i < level; i++) {
-				printf("   ");
-			}
-			printf("Matching: %s\n", name);
-		}
-	}
-	
-	Token peek() const {
-		return lookahead;
-	}
-	
-	bool peek(Tokenizer::TokenType type) const {
-		return lookahead.type == type;
-	}
-	
-	Token match(TokenType type) {
-		if (lookahead.type == type) {
-			return match();
-		} else {
-			raiseSyntaxError("Expected a " + Tokenizer::typeToString(type) +
-				" token, but got " + lookahead.toString(),
-				lookahead);
-			return Token(); // Shut up compiler warning.
-		}
-	}
-	
-	Token match() {
-		Token old = lookahead;
-		lookahead = tokenizer.getNext();
-		return old;
-	}
-	
-	void raiseSyntaxError(const string &msg = "", const Token &token = Token()) {
-		if (token.type != Tokenizer::NONE) {
-			string message = "at character " + toString(token.pos + 1);
-			if (!msg.empty()) {
-				message.append(": ");
-				message.append(msg);
-			}
-			throw SyntaxError(message);
-		} else {
-			throw SyntaxError(msg);
-		}
-	}
-	
-	BooleanComponentPtr matchMultiExpression(int level) {
-		logMatch(level, "matchMultiExpression()");
-		MultiExpressionPtr result = make_shared<MultiExpression>();
-		
-		result->firstExpression = matchExpression(level + 1);
-		while (isLogicalOperatorToken(peek())) {
-			MultiExpression::Part part;
-			part.theOperator = matchOperator(level + 1);
-			part.expression  = matchExpression(level + 1);
-			result->rest.push_back(part);
-		}
-		
-		return result;
-	}
-	
-	BooleanComponentPtr matchExpression(int level) {
-		logMatch(level, "matchExpression()");
-		bool negate = false;
-		
-		if (peek(Tokenizer::NOT)) {
-			match();
-			negate = true;
-		}
-		
-		Token next = peek();
-		if (next.type == Tokenizer::LPARENTHESIS) {
-			match();
-			BooleanComponentPtr expression = matchMultiExpression(level + 1);
-			match(Tokenizer::RPARENTHESIS);
-			if (negate) {
-				return make_shared<Negation>(expression);
-			} else {
-				return expression;
-			}
-		} else if (isValueToken(next)) {
-			BooleanComponentPtr component;
-			Token &current = next;
-			match();
-			
-			if (peek(Tokenizer::LPARENTHESIS)) {
-				component = matchFunctionCall(level + 1, current);
-			} else if (determineComparator(peek().type) != UNKNOWN_COMPARATOR) {
-				component = matchComparison(level + 1, current);
-			} else if (current.type == Tokenizer::TRUE_LIT || current.type == Tokenizer::FALSE_LIT) {
-				component = matchSingleValueComponent(level + 1, current);
-			} else {
-				raiseSyntaxError("expected a function call, comparison or boolean literal", current);
-			}
-			
-			if (negate) {
-				return make_shared<Negation>(component);
-			} else {
-				return component;
-			}
-		} else {
-			raiseSyntaxError("expected a left parenthesis or an identifier", next);
-			return BooleanComponentPtr(); // Shut up compiler warning.
-		}
-	}
-	
-	BooleanComponentPtr matchSingleValueComponent(int level, const Token &token) {
-		logMatch(level, "matchSingleValueComponent()");
-		return make_shared<SingleValueComponent>(matchLiteral(level + 1, token));
-	}
-	
-	ComparisonPtr matchComparison(int level, const Token &subjectToken) {
-		logMatch(level, "matchComparison()");
-		ComparisonPtr comparison = make_shared<Comparison>();
-		comparison->subject    = matchValue(level + 1, subjectToken);
-		comparison->comparator = matchComparator(level + 1);
-		comparison->object     = matchValue(level + 1, match());
-		if (!comparatorAcceptsValueTypes(comparison->comparator, comparison->subject.getType(), comparison->object.getType())) {
-			raiseSyntaxError("the comparator cannot operate on the given combination of types", subjectToken);
-		}
-		return comparison;
-	}
-	
-	FunctionCallPtr matchFunctionCall(int level, const Token &id) {
-		logMatch(level, "matchFunctionCall()");
-		FunctionCallPtr function;
-		
-		if (id.rawValue == "starts_with") {
-			function = make_shared<StartsWithFunctionCall>();
-		} else if (id.rawValue == "has_hint") {
-			function = make_shared<HasHintFunctionCall>();
-		} else {
-			raiseSyntaxError("unknown function '" + id.rawValue + "'", id);
-		}
-		
-		match(Tokenizer::LPARENTHESIS);
-		if (isValueToken(peek())) {
-			function->arguments.push_back(matchValue(level + 1, match()));
-			while (peek(Tokenizer::COMMA)) {
-				match();
-				function->arguments.push_back(matchValue(level + 1, match()));
-			}
-		}
-		match(Tokenizer::RPARENTHESIS);
-		function->checkArguments();
-		return function;
-	}
-	
-	Value matchValue(int level, const Token &token) {
-		logMatch(level, "matchValue()");
-		if (isLiteralToken(token)) {
-			return matchLiteral(level + 1, token);
-		} else if (token.type == Tokenizer::IDENTIFIER) {
-			return matchContextFieldIdentifier(level + 1, token);
-		} else {
-			raiseSyntaxError("Unrecognized value token " +
-				Tokenizer::typeToString(token.type), token);
-			return Value(); // Shut up compiler warning.
-		}
-	}
-	
-	LogicalOperator matchOperator(int level) {
-		logMatch(level, "matchOperator()");
-		if (peek(Tokenizer::AND)) {
-			logMatch(level + 1, "AND");
-			match();
-			return AND;
-		} else if (peek(Tokenizer::OR)) {
-			logMatch(level + 1, "OR");
-			match();
-			return OR;
-		} else {
-			raiseSyntaxError("", peek());
-			return AND; // Shut up compiler warning.
-		}
-	}
-	
-	Comparator matchComparator(int level) {
-		logMatch(level, "matchComparator()");
-		Comparator comparator = determineComparator(peek().type);
-		if (comparator == UNKNOWN_COMPARATOR) {
-			raiseSyntaxError("", peek());
-			return MATCHES; // Shut up compiler warning.
-		} else {
-			logMatch(level + 1, Tokenizer::typeToString(peek().type).c_str());
-			match();
-			return comparator;
-		}
-	}
-	
-	Value matchLiteral(int level, const Token &token) {
-		logMatch(level, "matchLiteral()");
-		if (token.type == Tokenizer::REGEXP) {
-			logMatch(level + 1, "regexp");
-			return Value(true, unescapeCString(token.rawValue.substr(1, token.rawValue.size() - 2)),
-				token.options & Tokenizer::REGEXP_OPTION_CASE_INSENSITIVE);
-		} else if (token.type == Tokenizer::STRING) {
-			logMatch(level + 1, "string");
-			return Value(false, unescapeCString(token.rawValue.substr(1, token.rawValue.size() - 2)));
-		} else if (token.type == Tokenizer::INTEGER) {
-			logMatch(level + 1, "integer");
-			return Value(atoi(token.rawValue.toString()));
-		} else if (token.type == Tokenizer::TRUE_LIT) {
-			logMatch(level + 1, "true");
-			return Value(true);
-		} else if (token.type == Tokenizer::FALSE_LIT) {
-			logMatch(level + 1, "false");
-			return Value(false);
-		} else {
-			raiseSyntaxError("regular expression, string, integer or boolean expected", token);
-			return Value(); // Shut up compiler warning.
-		}
-	}
-	
-	Value matchContextFieldIdentifier(int level, const Token &token) {
-		logMatch(level, "matchContextFieldIdentifier()");
-		if (token.rawValue == "uri") {
-			return Value(Context::URI);
-		} else if (token.rawValue == "controller") {
-			return Value(Context::CONTROLLER);
-		} else if (token.rawValue == "response_time") {
-			return Value(Context::RESPONSE_TIME);
-		} else if (token.rawValue == "response_time_without_gc") {
-			return Value(Context::RESPONSE_TIME_WITHOUT_GC);
-		} else if (token.rawValue == "status") {
-			return Value(Context::STATUS);
-		} else if (token.rawValue == "status_code") {
-			return Value(Context::STATUS_CODE);
-		} else if (token.rawValue == "gc_time") {
-			return Value(Context::GC_TIME);
-		} else {
-			raiseSyntaxError("unknown field '" + token.rawValue + "'", token);
-			return Value(); // Shut up compiler warning.
-		}
-	}
-	
-public:
-	Filter(const StaticString &source, bool debug = false)
-		: tokenizer(source, debug)
-	{
-		this->debug = debug;
-		lookahead = tokenizer.getNext();
-		root = matchMultiExpression(0);
-		logMatch(0, "end of data");
-		match(Tokenizer::END_OF_DATA);
-	}
-	
-	bool run(const Context &ctx) {
-		return root->evaluate(ctx);
-	}
-};
-
-
-} // namespace FilterSupport
-} // namespace Passenger
-
-#endif /* __cplusplus */
-
-
-/********* C bindings *********/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void *PassengerFilter;
-
-PassengerFilter *passenger_filter_create(const char *source, int size, char **error);
-void passenger_filter_free(PassengerFilter *filter);
-char *passenger_filter_validate(const char *source, int size);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _PASSENGER_FILTER_SUPPORT_H_ */
diff --git a/ext/common/LoggingAgent/LoggingServer.h b/ext/common/LoggingAgent/LoggingServer.h
deleted file mode 100644
index b6f171f..0000000
--- a/ext/common/LoggingAgent/LoggingServer.h
+++ /dev/null
@@ -1,1285 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_LOGGING_SERVER_H_
-#define _PASSENGER_LOGGING_SERVER_H_
-
-#include <oxt/system_calls.hpp>
-#include <oxt/macros.hpp>
-#include <boost/shared_ptr.hpp>
-#include <string>
-#include <ostream>
-#include <sstream>
-#include <map>
-#include <ev++.h>
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-#include <grp.h>
-#include <cstring>
-#include <ctime>
-#include <cassert>
-
-#include "DataStoreId.h"
-#include "RemoteSender.h"
-#include "FilterSupport.h"
-#include "../EventedMessageServer.h"
-#include "../MessageReadersWriters.h"
-#include "../StaticString.h"
-#include "../Exceptions.h"
-#include "../Constants.h"
-#include "../Utils.h"
-#include "../Utils/MD5.h"
-#include "../Utils/IOUtils.h"
-#include "../Utils/MessageIO.h"
-#include "../Utils/StrIntUtils.h"
-#include "../Utils/StringMap.h"
-
-
-namespace Passenger {
-
-using namespace std;
-using namespace boost;
-using namespace oxt;
-
-
-class LoggingServer: public EventedMessageServer {
-private:
-	static const int MAX_LOG_SINK_CACHE_SIZE = 512;
-	static const int GARBAGE_COLLECTION_TIMEOUT = 4500;  // 1 hour 15 minutes
-	
-	struct LogSink;
-	typedef shared_ptr<LogSink> LogSinkPtr;
-	typedef map<string, LogSinkPtr> LogSinkCache;
-	
-	struct LogSink {
-		LoggingServer *server;
-		
-		/**
-		 * Marks how many times this LogSink is currently opened, i.e. the
-		 * number of Transaction objects currently referencing this LogSink.
-		 * @invariant
-		 *    (opened == 0) == (this LogSink is in LoggingServer.inactiveLogSinks)
-		 */
-		int opened;
-		
-		/** Last time this LogSink hit an open count of 0. */
-		ev_tstamp lastUsed;
-		
-		/** Last time data was actually written to the underlying storage device. */
-		ev_tstamp lastFlushed;
-		
-		/**
-		 * This LogSink's iterator inside LoggingServer.logSinkCache.
-		 */
-		LogSinkCache::iterator cacheIterator;
-		
-		/**
-		 * This LogSink's iterator inside LoggingServer.inactiveLogSinks.
-		 * Only valid when opened == 0.
-		 */
-		list<LogSinkPtr>::iterator inactiveLogSinksIterator;
-		
-		LogSink(LoggingServer *_server) {
-			server = _server;
-			opened = 0;
-			lastUsed = ev_now(server->getLoop());
-			lastFlushed = 0;
-		}
-		
-		virtual ~LogSink() {
-			// We really want to flush() here but can't call virtual
-			// functions in destructor. :(
-		}
-		
-		virtual bool isRemote() const {
-			return false;
-		}
-		
-		virtual void append(const DataStoreId &dataStoreId,
-			const StaticString &data) = 0;
-		virtual bool flush() { return true; }
-		virtual void dump(ostream &stream) const { }
-	};
-	
-	struct LogFile: public LogSink {
-		static const unsigned int BUFFER_CAPACITY = 8 * 1024;
-		
-		string filename;
-		FileDescriptor fd;
-		char buffer[BUFFER_CAPACITY];
-		unsigned int bufferSize;
-		
-		LogFile(LoggingServer *server, const string &filename, mode_t filePermissions)
-			: LogSink(server)
-		{
-			int ret;
-			
-			bufferSize = 0;
-			
-			this->filename = filename;
-			fd = syscalls::open(filename.c_str(),
-				O_CREAT | O_WRONLY | O_APPEND,
-				filePermissions);
-			if (fd == -1) {
-				int e = errno;
-				throw FileSystemException("Cannnot open file", e, filename);
-			}
-			do {
-				ret = fchmod(fd, filePermissions);
-			} while (ret == -1 && errno == EINTR);
-		}
-		
-		virtual ~LogFile() {
-			flush();
-		}
-		
-		virtual void append(const DataStoreId &dataStoreId, const StaticString &data) {
-			if (bufferSize + data.size() > BUFFER_CAPACITY) {
-				StaticString data2[2];
-				data2[0] = StaticString(buffer, bufferSize);
-				data2[1] = data;
-				
-				gatheredWrite(fd, data2, 2);
-				lastFlushed = ev_now(server->getLoop());
-				bufferSize = 0;
-			} else {
-				memcpy(buffer + bufferSize, data.data(), data.size());
-				bufferSize += data.size();
-			}
-		}
-		
-		virtual bool flush() {
-			if (bufferSize > 0) {
-				lastFlushed = ev_now(server->getLoop());
-				writeExact(fd, buffer, bufferSize);
-				bufferSize = 0;
-				return true;
-			} else {
-				return false;
-			}
-		}
-		
-		virtual void dump(ostream &stream) const {
-			stream << "   Log file: file=" << filename << ", "
-				"opened=" << opened << ", "
-				"lastUsed=" << long(ev_now(server->getLoop()) - lastUsed) << "s ago, "
-				"lastFlushed=" << long(ev_now(server->getLoop()) - lastFlushed) << "s ago\n";
-		}
-	};
-	
-	typedef shared_ptr<LogFile> LogFilePtr;
-	
-	struct RemoteSink: public LogSink {
-		/* RemoteSender compresses the data with zlib before sending it
-		 * to the server. Even including Base64 and URL encoding overhead,
-		 * this compresses the data to about 25% of its original size.
-		 * Therefore we set a buffer capacity of a little less than 4 times
-		 * the TCP maximum segment size so that we can send as much
-		 * data as possible to the server in a single TCP segment.
-		 * With the "little less" we take into account:
-		 * - HTTPS overhead. This can be as high as 2 KB.
-		 * - The fact that RemoteSink.append() might try to flush the
-		 *   current buffer the current data. Empirical evidence has
-		 *   shown that the data for a request transaction is usually
-		 *   less than 5 KB.
-		 */
-		static const unsigned int BUFFER_CAPACITY =
-			4 * 64 * 1024 -
-			16 * 1024;
-		
-		string unionStationKey;
-		string nodeName;
-		string category;
-		char buffer[BUFFER_CAPACITY];
-		unsigned int bufferSize;
-		
-		RemoteSink(LoggingServer *server, const string &unionStationKey,
-			const string &nodeName, const string &category)
-			: LogSink(server)
-		{
-			this->unionStationKey = unionStationKey;
-			this->nodeName = nodeName;
-			this->category = category;
-			this->bufferSize = 0;
-		}
-		
-		virtual ~RemoteSink() {
-			flush();
-		}
-		
-		virtual bool isRemote() const {
-			return true;
-		}
-		
-		virtual void append(const DataStoreId &dataStoreId, const StaticString &data) {
-			if (bufferSize + data.size() > BUFFER_CAPACITY) {
-				StaticString data2[2];
-				data2[0] = StaticString(buffer, bufferSize);
-				data2[1] = data;
-				
-				server->remoteSender.schedule(unionStationKey, nodeName,
-					category, data2, 2);
-				lastFlushed = ev_now(server->getLoop());
-				bufferSize = 0;
-			} else {
-				memcpy(buffer + bufferSize, data.data(), data.size());
-				bufferSize += data.size();
-			}
-		}
-		
-		virtual bool flush() {
-			if (bufferSize > 0) {
-				lastFlushed = ev_now(server->getLoop());
-				StaticString data(buffer, bufferSize);
-				server->remoteSender.schedule(unionStationKey, nodeName,
-					category, &data, 1);
-				bufferSize = 0;
-				return true;
-			} else {
-				return false;
-			}
-		}
-		
-		virtual void dump(ostream &stream) const {
-			stream << "   Remote sink: "
-				"key=" << unionStationKey << ", "
-				"node=" << nodeName << ", "
-				"category=" << category << ", "
-				"opened=" << opened << ", "
-				"lastUsed=" << long(ev_now(server->getLoop()) - lastUsed) << "s ago, "
-				"lastFlushed=" << long(ev_now(server->getLoop()) - lastFlushed) << "s ago, "
-				"bufferSize=" << bufferSize <<
-				"\n";
-		}
-	};
-	
-	struct Transaction {
-		LoggingServer *server;
-		LogSinkPtr logSink;
-		string txnId;
-		DataStoreId dataStoreId;
-		unsigned int writeCount;
-		int refcount;
-		bool crashProtect, discarded;
-		string data;
-		string filters;
-		
-		Transaction(LoggingServer *server) {
-			this->server = server;
-			data.reserve(8 * 1024);
-		}
-		
-		~Transaction() {
-			if (logSink != NULL) {
-				if (!discarded && passesFilter()) {
-					logSink->append(dataStoreId, data);
-				}
-				server->closeLogSink(logSink);
-			}
-		}
-		
-		StaticString getGroupName() const {
-			return dataStoreId.getGroupName();
-		}
-		
-		StaticString getNodeName() const {
-			return dataStoreId.getNodeName();
-		}
-		
-		StaticString getCategory() const {
-			return dataStoreId.getCategory();
-		}
-		
-		void discard() {
-			data.clear();
-			discarded = true;
-		}
-		
-		void dump(ostream &stream) const {
-			stream << "   Transaction " << txnId << ":\n";
-			stream << "      Group   : " << getGroupName() << "\n";
-			stream << "      Node    : " << getNodeName() << "\n";
-			stream << "      Category: " << getCategory() << "\n";
-			stream << "      Refcount: " << refcount << "\n";
-		}
-	
-	private:
-		bool passesFilter() {
-			if (filters.empty()) {
-				return true;
-			}
-			
-			const char *current = filters.data();
-			const char *end     = filters.data() + filters.size();
-			bool result         = true;
-			FilterSupport::ContextFromLog ctx(data);
-			
-			// 'filters' may contain multiple filter sources, separated
-			// by '\1' characters. Process each.
-			while (current < end && result) {
-				StaticString tmp(current, end - current);
-				size_t pos = tmp.find('\1');
-				if (pos == string::npos) {
-					pos = tmp.size();
-				}
-				
-				StaticString source(current, pos);
-				FilterSupport::Filter &filter = server->compileFilter(source);
-				result = filter.run(ctx);
-				
-				current = tmp.data() + pos + 1;
-			}
-			return result;
-		}
-	};
-	
-	typedef shared_ptr<Transaction> TransactionPtr;
-	
-	enum ClientType {
-		UNINITIALIZED,
-		LOGGER
-	};
-	
-	struct Client: public EventedMessageClient {
-		string nodeName;
-		ClientType type;
-		char nodeId[MD5_HEX_SIZE];
-		/**
-		 * Set of transaction IDs opened by this client.
-		 * @invariant This is a subset of the transaction IDs in the 'transactions' member.
-		 */
-		set<string> openTransactions;
-		ScalarMessage dataReader;
-		TransactionPtr currentTransaction;
-		string currentTimestamp;
-		
-		Client(struct ev_loop *loop, const FileDescriptor &fd)
-			: EventedMessageClient(loop, fd)
-		{
-			type = UNINITIALIZED;
-			dataReader.setMaxSize(1024 * 128);
-		}
-	};
-	
-	typedef shared_ptr<Client> ClientPtr;
-	typedef map<string, TransactionPtr> TransactionMap;
-	
-	typedef shared_ptr<FilterSupport::Filter> FilterPtr;
-	
-	string dir;
-	gid_t gid;
-	string dirPermissions;
-	mode_t filePermissions;
-	RemoteSender remoteSender;
-	ev::timer garbageCollectionTimer;
-	ev::timer sinkFlushingTimer;
-	ev::timer exitTimer;
-	TransactionMap transactions;
-	LogSinkCache logSinkCache;
-	/**
-	 * @invariant
-	 *    inactiveLogSinks is sorted from oldest to youngest (by lastTime member).
-	 *    for all s in inactiveLogSinks:
-	 *       s.opened == 0
-	 *    inactiveLogSinks.size() == inactiveLogSinksCount
-	 */
-	list<LogSinkPtr> inactiveLogSinks;
-	int inactiveLogSinksCount;
-	StringMap<FilterPtr> filters;
-	RandomGenerator randomGenerator;
-	bool refuseNewConnections;
-	bool exitRequested;
-	unsigned long long exitBeginTime;
-	
-	void sendErrorToClient(Client *client, const string &message) {
-		client->writeArrayMessage("error", message.c_str(), NULL);
-		logError(client, message);
-	}
-	
-	bool expectingArgumentsCount(Client *client, const vector<StaticString> &args, unsigned int size) {
-		if (args.size() == size) {
-			return true;
-		} else {
-			sendErrorToClient(client, "Invalid number of arguments");
-			client->disconnect();
-			return false;
-		}
-	}
-	
-	bool expectingMinArgumentsCount(Client *client, const vector<StaticString> &args, unsigned int size) {
-		if (args.size() >= size) {
-			return true;
-		} else {
-			sendErrorToClient(client, "Invalid number of arguments");
-			client->disconnect();
-			return false;
-		}
-	}
-	
-	bool expectingLoggerType(Client *client) {
-		if (client->type == LOGGER) {
-			return true;
-		} else {
-			sendErrorToClient(client, "Client not initialized as logger");
-			client->disconnect();
-			return false;
-		}
-	}
-	
-	bool checkWhetherConnectionAreAcceptable(Client *client) {
-		if (refuseNewConnections) {
-			client->writeArrayMessage("server shutting down", NULL);
-			client->disconnect();
-			return false;
-		} else {
-			return true;
-		}
-	}
-	
-	static bool getBool(const vector<StaticString> &args, unsigned int index,
-		bool defaultValue = false)
-	{
-		if (index < args.size()) {
-			return args[index] == "true";
-		} else {
-			return defaultValue;
-		}
-	}
-	
-	static StaticString getStaticString(const vector<StaticString> &args,
-		unsigned int index, const StaticString &defaultValue = "")
-	{
-		if (index < args.size()) {
-			return args[index];
-		} else {
-			return defaultValue;
-		}
-	}
-	
-	bool validTxnId(const StaticString &txnId) const {
-		// must contain timestamp
-		// must contain separator
-		// must contain random id
-		// must not be too large
-		return !txnId.empty();
-	}
-	
-	bool validUnionStationKey(const StaticString &key) const {
-		// must be hexadecimal
-		// must not be too large
-		return !key.empty();
-	}
-	
-	bool validLogContent(const StaticString &data) const {
-		const char *current = data.c_str();
-		const char *end = current + data.size();
-		while (current < end) {
-			char c = *current;
-			if ((c < 1 && c > 126) || c == '\n' || c == '\r') {
-				return false;
-			}
-			current++;
-		}
-		return true;
-	}
-	
-	bool validTimestamp(const StaticString &timestamp) const {
-		// must be hexadecimal
-		// must not be too large
-		return true;
-	}
-	
-	bool supportedCategory(const StaticString &category) const {
-		return category == "requests" || category == "processes" || category == "exceptions";
-	}
-	
-	time_t extractTimestamp(const StaticString &txnId) const {
-		const char *timestampEnd = (const char *) memchr(txnId.c_str(), '-', txnId.size());
-		if (timestampEnd == NULL) {
-			return 0;
-		} else {
-			time_t timestamp = hexatriToULL(
-				StaticString(txnId.c_str(), timestampEnd - txnId.c_str())
-			);
-			return timestamp * 60;
-		}
-	}
-	
-	void appendVersionAndGroupId(string &output, const StaticString &groupName) const {
-		md5_state_t state;
-		md5_byte_t  digest[MD5_SIZE];
-		char        checksum[MD5_HEX_SIZE];
-		
-		output.append("/1/", 3);
-		
-		md5_init(&state);
-		md5_append(&state, (const md5_byte_t *) groupName.data(), groupName.size());
-		md5_finish(&state, digest);
-		toHex(StaticString((const char *) digest, MD5_SIZE), checksum);
-		output.append(checksum, MD5_HEX_SIZE);
-	}
-	
-	string determineFilename(const StaticString &groupName, const char *nodeId,
-		const StaticString &category, const StaticString &txnId = "") const
-	{
-		time_t timestamp;
-		struct tm tm;
-		char time_str[14];
-		
-		if (!txnId.empty()) {
-			timestamp = extractTimestamp(txnId);
-			gmtime_r(&timestamp, &tm);
-			strftime(time_str, sizeof(time_str), "%Y/%m/%d/%H", &tm);
-		}
-		
-		string filename;
-		filename.reserve(dir.size()
-			+ (3 + MD5_HEX_SIZE) // version and group ID
-			+ 1                  // "/"
-			+ MD5_HEX_SIZE       // node ID
-			+ 1                  // "/"
-			+ category.size()
-			+ 1                  // "/"
-			+ sizeof(time_str)   // including null terminator, which we use as space for "/"
-			+ sizeof("log.txt")
-		);
-		filename.append(dir);
-		appendVersionAndGroupId(filename, groupName);
-		filename.append(1, '/');
-		filename.append(nodeId, MD5_HEX_SIZE);
-		filename.append(1, '/');
-		filename.append(category.c_str(), category.size());
-		if (!txnId.empty()) {
-			filename.append(1, '/');
-			filename.append(time_str);
-			filename.append("/log.txt");
-		}
-		return filename;
-	}
-	
-	void setupGroupAndNodeDir(const StaticString &groupName, const StaticString &nodeName,
-		const char *nodeId)
-	{
-		string filename, groupDir, nodeDir;
-		
-		filename.append(dir);
-		appendVersionAndGroupId(filename, groupName);
-		groupDir = filename;
-		
-		filename.append("/");
-		filename.append(nodeId, MD5_HEX_SIZE);
-		nodeDir = filename;
-		
-		createFile(groupDir + "/group_name.txt", groupName,
-			filePermissions, USER_NOT_GIVEN, GROUP_NOT_GIVEN,
-			false);
-		if (getFileType(groupDir + "/uuid.txt") == FT_NONEXISTANT) {
-			createFile(groupDir + "/uuid.txt",
-				randomGenerator.generateAsciiString(24),
-				filePermissions, USER_NOT_GIVEN, GROUP_NOT_GIVEN,
-				false);
-		}
-		
-		createFile(nodeDir + "/node_name.txt", nodeName,
-			filePermissions, USER_NOT_GIVEN, GROUP_NOT_GIVEN,
-			false);
-		if (getFileType(nodeDir + "/uuid.txt") == FT_NONEXISTANT) {
-			createFile(nodeDir + "/uuid.txt",
-				randomGenerator.generateAsciiString(24),
-				filePermissions, USER_NOT_GIVEN, GROUP_NOT_GIVEN,
-				false);
-		}
-	}
-	
-	bool openLogFileWithCache(const string &filename, LogSinkPtr &theLogSink) {
-		string cacheKey = "file:" + filename;
-		LogSinkCache::iterator it = logSinkCache.find(cacheKey);
-		if (it == logSinkCache.end()) {
-			trimLogSinkCache(MAX_LOG_SINK_CACHE_SIZE - 1);
-			makeDirTree(extractDirName(filename), dirPermissions,
-				USER_NOT_GIVEN, gid);
-			theLogSink.reset(new LogFile(this, filename, filePermissions));
-			pair<LogSinkCache::iterator, bool> p =
-				logSinkCache.insert(make_pair(cacheKey, theLogSink));
-			theLogSink->cacheIterator = p.first;
-			theLogSink->opened = 1;
-			return false;
-		} else {
-			theLogSink = it->second;
-			theLogSink->opened++;
-			if (theLogSink->opened == 1) {
-				inactiveLogSinks.erase(theLogSink->inactiveLogSinksIterator);
-				inactiveLogSinksCount--;
-			}
-			return true;
-		}
-	}
-	
-	void openRemoteSink(const StaticString &unionStationKey, const string &nodeName,
-		const string &category, LogSinkPtr &theLogSink)
-	{
-		string cacheKey = "remote:";
-		cacheKey.append(unionStationKey.c_str(), unionStationKey.size());
-		cacheKey.append(1, '\0');
-		cacheKey.append(nodeName);
-		cacheKey.append(1, '\0');
-		cacheKey.append(category);
-		
-		LogSinkCache::iterator it = logSinkCache.find(cacheKey);
-		if (it == logSinkCache.end()) {
-			trimLogSinkCache(MAX_LOG_SINK_CACHE_SIZE - 1);
-			theLogSink.reset(new RemoteSink(this, unionStationKey,
-				nodeName, category));
-			pair<LogSinkCache::iterator, bool> p =
-				logSinkCache.insert(make_pair(cacheKey, theLogSink));
-			theLogSink->cacheIterator = p.first;
-			theLogSink->opened = 1;
-		} else {
-			theLogSink = it->second;
-			theLogSink->opened++;
-			if (theLogSink->opened == 1) {
-				inactiveLogSinks.erase(theLogSink->inactiveLogSinksIterator);
-				inactiveLogSinksCount--;
-			}
-		}
-	}
-	
-	/**
-	 * 'Closes' the given log sink. It's not actually deleted from memory;
-	 * instead it's marked as inactive and cached for later use. May be
-	 * deleted later when resources are low.
-	 *
-	 * No need to call this manually. Automatically called by Transaction's
-	 * destructor.
-	 */
-	void closeLogSink(const LogSinkPtr &logSink) {
-		logSink->opened--;
-		assert(logSink->opened >= 0);
-		logSink->lastUsed = ev_now(getLoop());
-		if (logSink->opened == 0) {
-			inactiveLogSinks.push_back(logSink);
-			logSink->inactiveLogSinksIterator = inactiveLogSinks.end();
-			logSink->inactiveLogSinksIterator--;
-			inactiveLogSinksCount++;
-			trimLogSinkCache(MAX_LOG_SINK_CACHE_SIZE);
-		}
-	}
-	
-	/** Try to reduce the log sink cache size to the given size. */
-	void trimLogSinkCache(unsigned int size) {
-		while (!inactiveLogSinks.empty() && logSinkCache.size() > size) {
-			const LogSinkPtr logSink = inactiveLogSinks.front();
-			inactiveLogSinks.pop_front();
-			inactiveLogSinksCount--;
-			logSinkCache.erase(logSink->cacheIterator);
-		}
-	}
-	
-	FilterSupport::Filter &compileFilter(const StaticString &source) {
-		// TODO: garbage collect filters based on time
-		FilterPtr filter = filters.get(source);
-		if (filter == NULL) {
-			filter = make_shared<FilterSupport::Filter>(source);
-			filters.set(source, filter);
-		}
-		return *filter;
-	}
-	
-	bool writeLogEntry(Client *client, const TransactionPtr &transaction,
-		const StaticString &timestamp, const StaticString &data)
-	{
-		if (transaction->discarded) {
-			return true;
-		}
-		if (OXT_UNLIKELY( !validLogContent(data) )) {
-			if (client != NULL) {
-				sendErrorToClient(client, "Log entry data contains an invalid character.");
-				client->disconnect();
-			}
-			return false;
-		}
-		if (OXT_UNLIKELY( !validTimestamp(timestamp) )) {
-			if (client != NULL) {
-				sendErrorToClient(client, "Log entry timestamp is invalid.");
-				client->disconnect();
-			}
-			return false;
-		}
-		
-		char writeCountStr[sizeof(unsigned int) * 2 + 1];
-		integerToHexatri(transaction->writeCount, writeCountStr);
-		transaction->writeCount++;
-		transaction->data.reserve(transaction->data.size() +
-			transaction->txnId.size() +
-			1 +
-			timestamp.size() +
-			1 +
-			strlen(writeCountStr) +
-			1 +
-			data.size() +
-			1);
-		transaction->data.append(transaction->txnId);
-		transaction->data.append(" ");
-		transaction->data.append(timestamp);
-		transaction->data.append(" ");
-		transaction->data.append(writeCountStr);
-		transaction->data.append(" ");
-		transaction->data.append(data);
-		transaction->data.append("\n");
-		return true;
-	}
-	
-	void writeDetachEntry(Client *client, const TransactionPtr &transaction) {
-		char timestamp[2 * sizeof(unsigned long long) + 1];
-		// Must use System::getUsec() here instead of ev_now() because the
-		// precision of the time is very important.
-		integerToHexatri<unsigned long long>(SystemTime::getUsec(), timestamp);
-		writeDetachEntry(client, transaction, timestamp);
-	}
-	
-	void writeDetachEntry(Client *client, const TransactionPtr &transaction,
-		const StaticString &timestamp)
-	{
-		writeLogEntry(client, transaction, timestamp, "DETACH");
-	}
-	
-	bool requireRights(Client *client, Account::Rights rights) {
-		if (client->messageServer.account->hasRights(rights)) {
-			return true;
-		} else {
-			P_TRACE(2, "Security error: insufficient rights to execute this command.");
-			client->writeArrayMessage("SecurityException",
-				"Insufficient rights to execute this command.",
-				NULL);
-			client->disconnect();
-			return false;
-		}
-	}
-	
-	bool isDirectory(const string &dir, struct dirent *entry) const {
-		#ifdef __sun__
-			string path = dir;
-			path.append("/");
-			path.append(entry->d_name);
-			return getFileType(path) == FT_DIRECTORY;
-		#else
-			return entry->d_type == DT_DIR;
-		#endif
-	}
-	
-	bool looksLikeNumber(const char *str) const {
-		const char *current = str;
-		while (*current != '\0') {
-			char c = *current;
-			if (!(c >= '0' && c <= '9')) {
-				return false;
-			}
-			current++;
-		}
-		return true;
-	}
-	
-	/* Release all inactive log sinks that have been inactive for more than
-	 * GARBAGE_COLLECTION_TIMEOUT seconds.
-	 */
-	void releaseInactiveLogSinks(ev_tstamp now) {
-		bool done = false;
-		
-		while (!done && !inactiveLogSinks.empty()) {
-			const LogSinkPtr logSink = inactiveLogSinks.front();
-			if (now - logSink->lastUsed >= GARBAGE_COLLECTION_TIMEOUT) {
-				inactiveLogSinks.pop_front();
-				inactiveLogSinksCount--;
-				logSinkCache.erase(logSink->cacheIterator);
-			} else {
-				done = true;
-			}
-		}
-	}
-	
-	void garbageCollect(ev::timer &timer, int revents) {
-		P_DEBUG("Garbage collection time");
-		releaseInactiveLogSinks(ev_now(getLoop()));
-	}
-	
-	void sinkFlushTimeout(ev::timer &timer, int revents) {
-		P_TRACE(2, "Flushing all sinks (periodic action)");
-		LogSinkCache::iterator it;
-		LogSinkCache::iterator end = logSinkCache.end();
-		ev_tstamp now = ev_now(getLoop());
-		
-		for (it = logSinkCache.begin(); it != end; it++) {
-			LogSink *sink = it->second.get();
-			
-			// Flush log file sinks every 15 seconds,
-			// remote sinks every 60 seconds.
-			if (sink->isRemote()) {
-				if (now - sink->lastFlushed >= 60) {
-					sink->flush();
-				}
-			} else {
-				sink->flush();
-			}
-		}
-	}
-	
-	void flushAllSinks() {
-		P_TRACE(2, "Flushing all sinks");
-		LogSinkCache::iterator it;
-		LogSinkCache::iterator end = logSinkCache.end();
-		
-		for (it = logSinkCache.begin(); it != end; it++) {
-			LogSink *sink = it->second.get();
-			sink->flush();
-		}
-	}
-	
-	void exitTimerTimeout(ev::timer &timer, int revents) {
-		if (SystemTime::getMsec() >= exitBeginTime + 5000) {
-			exitTimer.stop();
-			exitRequested = false;
-			refuseNewConnections = false;
-			ev_unloop(getLoop(), EVUNLOOP_ONE);
-		}
-	}
-	
-protected:
-	virtual EventedClient *createClient(const FileDescriptor &fd) {
-		return new Client(getLoop(), fd);
-	}
-	
-	virtual bool onMessageReceived(EventedMessageClient *_client, const vector<StaticString> &args) {
-		Client *client = (Client *) _client;
-		
-		if (args[0] == "log") {
-			if (OXT_UNLIKELY( !expectingArgumentsCount(client, args, 3)
-			               || !expectingLoggerType(client) )) {
-				return true;
-			}
-			
-			string txnId     = args[1];
-			string timestamp = args[2];
-			
-			TransactionMap::iterator it = transactions.find(txnId);
-			if (OXT_UNLIKELY( it == transactions.end() )) {
-				sendErrorToClient(client, "Cannot log data: transaction does not exist");
-				client->disconnect();
-			} else {
-				set<string>::iterator sit = client->openTransactions.find(txnId);
-				if (OXT_UNLIKELY( sit == client->openTransactions.end() )) {
-					sendErrorToClient(client,
-						"Cannot log data: transaction not opened in this connection");
-					client->disconnect();
-					return true;
-				}
-				// Expecting the log data in a scalar message.
-				client->currentTransaction = it->second;
-				client->currentTimestamp = timestamp;
-				return false;
-			}
-			
-		} else if (args[0] == "openTransaction") {
-			if (OXT_UNLIKELY( !expectingMinArgumentsCount(client, args, 7)
-			               || !expectingLoggerType(client) )) {
-				return true;
-			}
-			
-			string       txnId     = args[1];
-			StaticString groupName = args[2];
-			StaticString nodeName  = args[3];
-			StaticString category  = args[4];
-			StaticString timestamp = args[5];
-			StaticString unionStationKey = args[6];
-			bool         crashProtect    = getBool(args, 7, true);
-			bool         ack             = getBool(args, 8, false);
-			StaticString filters         = getStaticString(args, 9);
-			
-			if (OXT_UNLIKELY( !validTxnId(txnId) )) {
-				sendErrorToClient(client, "Invalid transaction ID format");
-				client->disconnect();
-				return true;
-			}
-			if (!unionStationKey.empty()
-			 && OXT_UNLIKELY( !validUnionStationKey(unionStationKey) )) {
-				sendErrorToClient(client, "Invalid Union Station key format");
-				client->disconnect();
-				return true;
-			}
-			if (OXT_UNLIKELY( client->openTransactions.find(txnId) !=
-				client->openTransactions.end() ))
-			{
-				sendErrorToClient(client, "Cannot open transaction: transaction already opened in this connection");
-				client->disconnect();
-				return true;
-			}
-			
-			const char *nodeId;
-			
-			if (nodeName.empty()) {
-				nodeName = client->nodeName;
-				nodeId = client->nodeId;
-			} else {
-				nodeId = NULL;
-			}
-			
-			TransactionMap::iterator it = transactions.find(txnId);
-			TransactionPtr transaction;
-			if (it == transactions.end()) {
-				if (OXT_UNLIKELY( !supportedCategory(category) )) {
-					sendErrorToClient(client, "Unsupported category");
-					client->disconnect();
-					return true;
-				}
-				
-				transaction.reset(new Transaction(this));
-				if (unionStationKey.empty()) {
-					char tempNodeId[MD5_HEX_SIZE];
-					
-					if (nodeId == NULL) {
-						md5_state_t state;
-						md5_byte_t  digest[MD5_SIZE];
-
-						md5_init(&state);
-						md5_append(&state,
-							(const md5_byte_t *) nodeName.data(),
-							nodeName.size());
-						md5_finish(&state, digest);
-						toHex(StaticString((const char *) digest, MD5_SIZE),
-							tempNodeId);
-						nodeId = tempNodeId;
-					}
-					
-					string filename = determineFilename(groupName, nodeId,
-						category, txnId);
-					if (!openLogFileWithCache(filename, transaction->logSink)) {
-						setupGroupAndNodeDir(groupName, nodeName, nodeId);
-					}
-				} else {
-					openRemoteSink(unionStationKey, client->nodeName,
-						category, transaction->logSink);
-				}
-				transaction->txnId        = txnId;
-				transaction->dataStoreId  = DataStoreId(groupName,
-					nodeName, category);
-				transaction->writeCount   = 0;
-				transaction->refcount     = 0;
-				transaction->crashProtect = crashProtect;
-				if (!filters.empty()) {
-					transaction->filters = filters;
-				}
-				transaction->discarded    = false;
-				transactions.insert(make_pair(txnId, transaction));
-			} else {
-				transaction = it->second;
-				if (OXT_UNLIKELY( transaction->getGroupName() != groupName )) {
-					sendErrorToClient(client,
-						"Cannot open transaction: transaction already opened with a different group name");
-					client->disconnect();
-					return true;
-				}
-				if (OXT_UNLIKELY( transaction->getNodeName() != nodeName )) {
-					sendErrorToClient(client,
-						"Cannot open transaction: transaction already opened with a different node name");
-					client->disconnect();
-					return true;
-				}
-				if (OXT_UNLIKELY( transaction->getCategory() != category )) {
-					sendErrorToClient(client,
-						"Cannot open transaction: transaction already opened with a different category name");
-					client->disconnect();
-					return true;
-				}
-			}
-			
-			client->openTransactions.insert(txnId);
-			transaction->refcount++;
-			writeLogEntry(client, transaction, timestamp, "ATTACH");
-			
-			if (ack) {
-				client->writeArrayMessage("ok", NULL);
-			}
-			
-		} else if (args[0] == "closeTransaction") {
-			if (OXT_UNLIKELY( !expectingMinArgumentsCount(client, args, 3)
-			               || !expectingLoggerType(client) )) {
-				return true;
-			}
-			
-			string txnId = args[1];
-			StaticString timestamp = args[2];
-			bool         ack       = getBool(args, 3, false);
-			
-			TransactionMap::iterator it = transactions.find(txnId);
-			if (OXT_UNLIKELY( it == transactions.end() )) {
-				sendErrorToClient(client,
-					"Cannot close transaction " + txnId +
-					": transaction does not exist");
-				client->disconnect();
-			} else {
-				TransactionPtr &transaction = it->second;
-				
-				set<string>::const_iterator sit = client->openTransactions.find(txnId);
-				if (OXT_UNLIKELY( sit == client->openTransactions.end() )) {
-					sendErrorToClient(client,
-						"Cannot close transaction " + txnId +
-						": transaction not opened in this connection");
-					client->disconnect();
-					return true;
-				} else {
-					client->openTransactions.erase(sit);
-				}
-				
-				writeDetachEntry(client, transaction, timestamp);
-				transaction->refcount--;
-				assert(transaction->refcount >= 0);
-				if (transaction->refcount == 0) {
-					transactions.erase(it);
-				}
-			}
-			
-			if (ack) {
-				client->writeArrayMessage("ok", NULL);
-			}
-		
-		} else if (args[0] == "init") {
-			if (OXT_UNLIKELY( client->type != UNINITIALIZED )) {
-				sendErrorToClient(client, "Already initialized");
-				client->disconnect();
-				return true;
-			}
-			if (OXT_UNLIKELY( !expectingArgumentsCount(client, args, 2) )) {
-				return true;
-			}
-			if (OXT_UNLIKELY( !checkWhetherConnectionAreAcceptable(client) )) {
-				return true;
-			}
-			
-			StaticString nodeName = args[1];
-			client->nodeName = nodeName;
-			
-			md5_state_t state;
-			md5_byte_t  digest[MD5_SIZE];
-			md5_init(&state);
-			md5_append(&state, (const md5_byte_t *) nodeName.data(), nodeName.size());
-			md5_finish(&state, digest);
-			toHex(StaticString((const char *) digest, MD5_SIZE), client->nodeId);
-			
-			client->type = LOGGER;
-			client->writeArrayMessage("ok", NULL);
-			
-		} else if (args[0] == "flush") {
-			flushAllSinks();
-			client->writeArrayMessage("ok", NULL);
-			
-		} else if (args[0] == "info") {
-			stringstream stream;
-			dump(stream);
-			client->writeArrayMessage("info", stream.str().c_str(), NULL);
-		
-		} else if (args[0] == "ping") {
-			client->writeArrayMessage("pong", NULL);
-		
-		} else if (args[0] == "exit") {
-			if (!requireRights(client, Account::EXIT)) {
-				client->disconnect();
-				return true;
-			}
-			if (args.size() == 2 && args[1] == "immediately") {
-				// Immediate exit.
-				ev_unloop(getLoop(), EVUNLOOP_ONE);
-			} else if (args.size() == 2 && args[1] == "semi-gracefully") {
-				// Semi-graceful exit: refuse new connections, shut down
-				// a few seconds after the last client has disconnected.
-				refuseNewConnections = true;
-				exitRequested = true;
-			} else {
-				// Graceful exit: shut down a few seconds after the
-				// last client has disconnected.
-				client->writeArrayMessage("Passed security", NULL);
-				client->writeArrayMessage("exit command received", NULL);
-				exitRequested = true;
-			}
-			client->disconnect();
-			
-		} else {
-			sendErrorToClient(client, "Unknown command '" + args[0] + "'");
-			client->disconnect();
-		}
-		
-		return true;
-	}
-	
-	virtual pair<size_t, bool> onOtherDataReceived(EventedMessageClient *_client,
-		const char *data, size_t size)
-	{
-		// In here we read the scalar message that's expected to come
-		// after the "log" command.
-		Client *client = (Client *) _client;
-		size_t consumed = client->dataReader.feed(data, size);
-		if (client->dataReader.done()) {
-			writeLogEntry(client,
-				client->currentTransaction,
-				client->currentTimestamp,
-				client->dataReader.value());
-			client->currentTransaction.reset();
-			client->dataReader.reset();
-			return make_pair(consumed, true);
-		} else {
-			return make_pair(consumed, false);
-		}
-	}
-	
-	virtual void onNewClient(EventedClient *client) {
-		if (exitRequested && exitTimer.is_active()) {
-			exitTimer.stop();
-		}
-		EventedMessageServer::onNewClient(client);
-	}
-	
-	virtual void onClientDisconnected(EventedClient *_client) {
-		EventedMessageServer::onClientDisconnected(_client);
-		Client *client = (Client *) _client;
-		set<string>::const_iterator sit;
-		set<string>::const_iterator send = client->openTransactions.end();
-		
-		// Close any transactions that this client had opened.
-		for (sit = client->openTransactions.begin(); sit != send; sit++) {
-			const string &txnId = *sit;
-			TransactionMap::iterator it = transactions.find(txnId);
-			if (OXT_UNLIKELY( it == transactions.end() )) {
-				P_ERROR("Bug: client->openTransactions is not a subset of this->transactions!");
-				abort();
-			}
-			
-			TransactionPtr &transaction = it->second;
-			if (transaction->crashProtect) {
-				writeDetachEntry(client, transaction);
-			} else {
-				transaction->discard();
-			}
-			transaction->refcount--;
-			assert(transaction->refcount >= 0);
-			if (transaction->refcount == 0) {
-				transactions.erase(it);
-			}
-		}
-		client->openTransactions.clear();
-		
-		// Possibly start exit timer.
-		if (exitRequested && getClients().empty()) {
-			exitTimer.start();
-			/* Using SystemTime here instead of setting a correct
-			 * timeout directly on the timer, so that we can
-			 * manipulate the clock in LoggingServer unit tests.
-			 */
-			exitBeginTime = SystemTime::getMsec();
-		}
-	}
-
-public:
-	LoggingServer(struct ev_loop *loop,
-		FileDescriptor fd,
-		const AccountsDatabasePtr &accountsDatabase,
-		const string &dir,
-		const string &permissions = DEFAULT_ANALYTICS_LOG_PERMISSIONS,
-		gid_t gid = GROUP_NOT_GIVEN,
-		const string &unionStationGatewayAddress = DEFAULT_UNION_STATION_GATEWAY_ADDRESS,
-		unsigned short unionStationGatewayPort = DEFAULT_UNION_STATION_GATEWAY_PORT,
-		const string &unionStationGatewayCert = "",
-		const string &unionStationProxyAddress = "",
-		const string &unionStationProxyPort = "")
-		: EventedMessageServer(loop, fd, accountsDatabase),
-		  remoteSender(unionStationGatewayAddress,
-		               unionStationGatewayPort,
-		               unionStationGatewayCert,
-		               unionStationProxyAddress,
-		               unionStationProxyPort),
-		  garbageCollectionTimer(loop),
-		  sinkFlushingTimer(loop),
-		  exitTimer(loop)
-	{
-		this->dir = dir;
-		this->gid = gid;
-		dirPermissions = permissions;
-		filePermissions = parseModeString(permissions) & ~(S_IXUSR | S_IXGRP | S_IXOTH);
-		garbageCollectionTimer.set<LoggingServer, &LoggingServer::garbageCollect>(this);
-		garbageCollectionTimer.start(GARBAGE_COLLECTION_TIMEOUT, GARBAGE_COLLECTION_TIMEOUT);
-		sinkFlushingTimer.set<LoggingServer, &LoggingServer::sinkFlushTimeout>(this);
-		sinkFlushingTimer.start(15, 15);
-		exitTimer.set<LoggingServer, &LoggingServer::exitTimerTimeout>(this);
-		exitTimer.set(0.05, 0.05);
-		refuseNewConnections = false;
-		exitRequested = false;
-		inactiveLogSinksCount = 0;
-	}
-	
-	~LoggingServer() {
-		TransactionMap::iterator it, end = transactions.end();
-		for (it = transactions.begin(); it != end; it++) {
-			TransactionPtr &transaction = it->second;
-			if (transaction->crashProtect) {
-				writeDetachEntry(NULL, transaction);
-			} else {
-				transaction->discard();
-			}
-		}
-		
-		// Invoke destructors, causing all transactions and log sinks to
-		// be flushed before RemoteSender is being destroyed.
-		transactions.clear();
-		logSinkCache.clear();
-		inactiveLogSinks.clear();
-	}
-	
-	void dump(ostream &stream) const {
-		TransactionMap::const_iterator it;
-		TransactionMap::const_iterator end = transactions.end();
-		
-		stream << "Number of clients : " << getClients().size() << "\n";
-		stream << "RemoteSender queue: " << remoteSender.queued() << " items\n";
-		stream << "Open transactions: " << transactions.size() << "\n";
-		for (it = transactions.begin(); it != end; it++) {
-			const TransactionPtr &transaction = it->second;
-			transaction->dump(stream);
-		}
-		
-		LogSinkCache::const_iterator sit;
-		LogSinkCache::const_iterator send = logSinkCache.end();
-		stream << "Log sinks: " << logSinkCache.size() <<
-			" (" << inactiveLogSinksCount << " inactive)\n";
-		for (sit = logSinkCache.begin(); sit != send; sit++) {
-			const LogSinkPtr &logSink = sit->second;
-			logSink->dump(stream);
-		}
-	}
-};
-
-typedef shared_ptr<LoggingServer> LoggingServerPtr;
-
-
-} // namespace Passenger
-
-#endif /* _PASSENGER_LOGGING_SERVER_H_ */
diff --git a/ext/common/LoggingAgent/Main.cpp b/ext/common/LoggingAgent/Main.cpp
deleted file mode 100644
index 63ffffb..0000000
--- a/ext/common/LoggingAgent/Main.cpp
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#include <oxt/system_calls.hpp>
-#include <oxt/backtrace.hpp>
-#include <oxt/thread.hpp>
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <grp.h>
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <cerrno>
-#include <signal.h>
-
-#include "../AgentBase.h"
-#include "../AccountsDatabase.h"
-#include "../Account.h"
-#include "../ServerInstanceDir.h"
-#include "LoggingServer.h"
-#include "../Exceptions.h"
-#include "../Utils.h"
-#include "../Utils/IOUtils.h"
-#include "../Utils/MessageIO.h"
-#include "../Utils/Base64.h"
-#include "../Utils/VariantMap.h"
-
-using namespace oxt;
-using namespace Passenger;
-
-
-static struct ev_loop *eventLoop;
-static LoggingServer *loggingServer;
-static int exitCode = 0;
-
-static struct ev_loop *
-createEventLoop() {
-	struct ev_loop *loop;
-	
-	// libev doesn't like choosing epoll and kqueue because the author thinks they're broken,
-	// so let's try to force it.
-	loop = ev_default_loop(EVBACKEND_EPOLL);
-	if (loop == NULL) {
-		loop = ev_default_loop(EVBACKEND_KQUEUE);
-	}
-	if (loop == NULL) {
-		loop = ev_default_loop(0);
-	}
-	if (loop == NULL) {
-		throw RuntimeException("Cannot create an event loop");
-	} else {
-		return loop;
-	}
-}
-
-static void
-lowerPrivilege(const string &username, const struct passwd *user, const struct group *group) {
-	int e;
-	
-	if (initgroups(username.c_str(), group->gr_gid) != 0) {
-		e = errno;
-		P_WARN("WARNING: Unable to set supplementary groups for " <<
-			"PassengerLoggingAgent: " << strerror(e) << " (" << e << ")");
-	}
-	if (setgid(group->gr_gid) != 0) {
-		e = errno;
-		P_WARN("WARNING: Unable to lower PassengerLoggingAgent's "
-			"privilege to that of user '" << username <<
-			"': cannot set group ID to " << group->gr_gid <<
-			": " << strerror(e) <<
-			" (" << e << ")");
-	}
-	if (setuid(user->pw_uid) != 0) {
-		e = errno;
-		P_WARN("WARNING: Unable to lower PassengerLoggingAgent's "
-			"privilege to that of user '" << username <<
-			"': cannot set user ID: " << strerror(e) <<
-			" (" << e << ")");
-	}
-}
-
-void
-feedbackFdBecameReadable(ev::io &watcher, int revents) {
-	/* This event indicates that the watchdog has been killed.
-	 * In this case we'll kill all descendant
-	 * processes and exit. There's no point in keeping this agent
-	 * running because we can't detect when the web server exits,
-	 * and because this agent doesn't own the server instance
-	 * directory. As soon as passenger-status is run, the server
-	 * instance directory will be cleaned up, making this agent's
-	 * services inaccessible.
-	 */
-	syscalls::killpg(getpgrp(), SIGKILL);
-	_exit(2); // In case killpg() fails.
-}
-
-void
-caughtExitSignal(ev::sig &watcher, int revents) {
-	P_DEBUG("Caught signal, exiting...");
-	ev_unloop(eventLoop, EVUNLOOP_ONE);
-	/* We only consider the "exit" command to be a graceful way to shut down
-	 * the logging agent, so upon receiving an exit signal we want to return
-	 * a non-zero exit code. This is because we want the watchdog to restart
-	 * the logging agent when it's killed by SIGTERM.
-	 */
-	exitCode = 1;
-}
-
-void
-printInfo(ev::sig &watcher, int revents) {
-	loggingServer->dump(cout);
-	cout.flush();
-}
-
-static string
-myself() {
-	struct passwd *entry = getpwuid(geteuid());
-	if (entry != NULL) {
-		return entry->pw_name;
-	} else {
-		throw NonExistentUserException(string("The current user, UID ") +
-			toString(geteuid()) + ", doesn't have a corresponding " +
-			"entry in the system's user database. Please fix your " +
-			"system's user database first.");
-	}
-}
-
-int
-main(int argc, char *argv[]) {
-	VariantMap options        = initializeAgent(argc, argv, "PassengerLoggingAgent");
-	string socketAddress      = options.get("logging_agent_address");
-	string loggingDir         = options.get("analytics_log_dir");
-	string password           = options.get("logging_agent_password");
-	string username           = options.get("analytics_log_user",
-		false, myself());
-	string groupname          = options.get("analytics_log_group", false);
-	string permissions        = options.get("analytics_log_permissions",
-		false, DEFAULT_ANALYTICS_LOG_PERMISSIONS);
-	string unionStationGatewayAddress = options.get("union_station_gateway_address",
-		false, DEFAULT_UNION_STATION_GATEWAY_ADDRESS);
-	int    unionStationGatewayPort = options.getInt("union_station_gateway_port",
-		false, DEFAULT_UNION_STATION_GATEWAY_PORT);
-	string unionStationGatewayCert  = options.get("union_station_gateway_cert", false);
-	string unionStationProxyAddress = options.get("union_station_proxy_address", false);
-	string unionStationProxyType    = options.get("union_station_proxy_type", false);
-	
-	curl_global_init(CURL_GLOBAL_ALL);
-	
-	try {
-		/********** Now begins the real initialization **********/
-		
-		/* Create all the necessary objects and sockets... */
-		AccountsDatabasePtr  accountsDatabase;
-		FileDescriptor       serverSocketFd;
-		struct passwd       *user;
-		struct group        *group;
-		int                  ret;
-		
-		eventLoop = createEventLoop();
-		accountsDatabase = ptr(new AccountsDatabase());
-		serverSocketFd = createServer(socketAddress.c_str());
-		if (getSocketAddressType(socketAddress) == SAT_UNIX) {
-			do {
-				ret = chmod(parseUnixSocketAddress(socketAddress).c_str(),
-					S_ISVTX |
-					S_IRUSR | S_IWUSR | S_IXUSR |
-					S_IRGRP | S_IWGRP | S_IXGRP |
-					S_IROTH | S_IWOTH | S_IXOTH);
-			} while (ret == -1 && errno == EINTR);
-		}
-		
-		/* Sanity check user accounts. */
-		
-		user = getpwnam(username.c_str());
-		if (user == NULL) {
-			throw NonExistentUserException(string("The configuration option ") +
-				"'PassengerAnalyticsLogUser' (Apache) or " +
-				"'passenger_analytics_log_user' (Nginx) was set to '" +
-				username + "', but this user doesn't exist. Please fix " +
-				"the configuration option.");
-		}
-		
-		if (groupname.empty()) {
-			group = getgrgid(user->pw_gid);
-			if (group == NULL) {
-				throw NonExistentGroupException(string("The configuration option ") +
-					"'PassengerAnalyticsLogGroup' (Apache) or " +
-					"'passenger_analytics_log_group' (Nginx) wasn't set, " +
-					"so PassengerLoggingAgent tried to use the default group " +
-					"for user '" + username + "' - which is GID #" +
-					toString(user->pw_gid) + " - as the group for the analytics " +
-					"log dir, but this GID doesn't exist. " +
-					"You can solve this problem by explicitly " +
-					"setting PassengerAnalyticsLogGroup (Apache) or " +
-					"passenger_analytics_log_group (Nginx) to a group that " +
-					"does exist. In any case, it looks like your system's user " +
-					"database is broken; Phusion Passenger can work fine even " +
-					"with this broken user database, but you should still fix it.");
-			} else {
-				groupname = group->gr_name;
-			}
-		} else {
-			group = getgrnam(groupname.c_str());
-			if (group == NULL) {
-				throw NonExistentGroupException(string("The configuration option ") +
-					"'PassengerAnalyticsLogGroup' (Apache) or " +
-					"'passenger_analytics_log_group' (Nginx) was set to '" +
-					groupname + "', but this group doesn't exist. Please fix " +
-					"the configuration option.");
-			}
-		}
-		
-		/* Create the logging directory if necessary. */
-		if (getFileType(loggingDir) == FT_NONEXISTANT) {
-			if (geteuid() == 0) {
-				makeDirTree(loggingDir, permissions, user->pw_uid, group->gr_gid);
-			} else {
-				makeDirTree(loggingDir, permissions);
-			}
-		}
-		
-		/* Now's a good time to lower the privilege. */
-		if (geteuid() == 0) {
-			lowerPrivilege(username, user, group);
-		}
-		
-		/* Now setup the actual logging server. */
-		accountsDatabase->add("logging", password, false);
-		LoggingServer server(eventLoop, serverSocketFd,
-			accountsDatabase, loggingDir,
-			"u=rwx,g=rx,o=rx", GROUP_NOT_GIVEN,
-			unionStationGatewayAddress,
-			unionStationGatewayPort,
-			unionStationGatewayCert,
-			unionStationProxyAddress,
-			unionStationProxyType);
-		loggingServer = &server;
-		
-		
-		ev::io feedbackFdWatcher(eventLoop);
-		ev::sig sigintWatcher(eventLoop);
-		ev::sig sigtermWatcher(eventLoop);
-		ev::sig sigquitWatcher(eventLoop);
-		
-		if (feedbackFdAvailable()) {
-			feedbackFdWatcher.set<&feedbackFdBecameReadable>();
-			feedbackFdWatcher.start(FEEDBACK_FD, ev::READ);
-			writeArrayMessage(FEEDBACK_FD, "initialized", NULL);
-		}
-		sigintWatcher.set<&caughtExitSignal>();
-		sigintWatcher.start(SIGINT);
-		sigtermWatcher.set<&caughtExitSignal>();
-		sigtermWatcher.start(SIGTERM);
-		sigquitWatcher.set<&printInfo>();
-		sigquitWatcher.start(SIGQUIT);
-		
-		
-		/********** Initialized! Enter main loop... **********/
-		
-		P_DEBUG("Logging agent online, listening at " << socketAddress);
-		ev_loop(eventLoop, 0);
-		return exitCode;
-	} catch (const tracable_exception &e) {
-		P_ERROR("*** ERROR: " << e.what() << "\n" << e.backtrace());
-		return 1;
-	}
-}
diff --git a/ext/common/LoggingAgent/RemoteSender.h b/ext/common/LoggingAgent/RemoteSender.h
deleted file mode 100644
index 364901d..0000000
--- a/ext/common/LoggingAgent/RemoteSender.h
+++ /dev/null
@@ -1,507 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_REMOTE_SENDER_H_
-#define _PASSENGER_REMOTE_SENDER_H_
-
-#include <sys/types.h>
-#include <ctime>
-#include <cassert>
-#include <curl/curl.h>
-#include <zlib.h>
-
-#include <boost/shared_ptr.hpp>
-#include <boost/bind.hpp>
-#include <oxt/thread.hpp>
-#include <string>
-#include <list>
-
-#include "../Logging.h"
-#include "../StaticString.h"
-#include "../Utils/BlockingQueue.h"
-#include "../Utils/SystemTime.h"
-#include "../Utils/ScopeGuard.h"
-#include "../Utils/Base64.h"
-
-namespace Passenger {
-
-using namespace std;
-using namespace boost;
-using namespace oxt;
-
-
-class RemoteSender {
-private:
-	struct Item {
-		bool exit;
-		bool compressed;
-		string unionStationKey;
-		string nodeName;
-		string category;
-		string data;
-		
-		Item() {
-			exit = false;
-			compressed = false;
-		}
-	};
-	
-	class Server {
-	private:
-		string ip;
-		unsigned short port;
-		string certificate;
-		string proxyAddress;
-		string proxyType;
-		
-		CURL *curl;
-		struct curl_slist *headers;
-		char lastErrorMessage[CURL_ERROR_SIZE];
-		string hostHeader;
-		string responseBody;
-		
-		string pingURL;
-		string sinkURL;
-		
-		void resetConnection() {
-			if (curl != NULL) {
-				#ifdef HAS_CURL_EASY_RESET
-					curl_easy_reset(curl);
-				#else
-					curl_easy_cleanup(curl);
-					curl = NULL;
-				#endif
-			}
-			if (curl == NULL) {
-				curl = curl_easy_init();
-				if (curl == NULL) {
-					throw IOException("Unable to create a CURL handle");
-				}
-			}
-			curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
-			curl_easy_setopt(curl, CURLOPT_TIMEOUT, 180);
-			curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, lastErrorMessage);
-			curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
-			curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curlDataReceived);
-			curl_easy_setopt(curl, CURLOPT_WRITEDATA, this);
-			if (!proxyAddress.empty()) {
-				curl_easy_setopt(curl, CURLOPT_PROXY, proxyAddress.c_str());
-				if (proxyType.empty() || proxyType == "http") {
-					curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
-				} else if (proxyType == "socks5") {
-					curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
-				} else {
-					throw RuntimeException("Only 'http' and 'socks5' proxies are supported.");
-				}
-			}
-			if (certificate.empty()) {
-				curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
-			} else {
-				curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1);
-				curl_easy_setopt(curl, CURLOPT_CAINFO, certificate.c_str());
-			}
-			/* No host name verification because Curl thinks the
-			 * host name is the IP address. But if we have the
-			 * certificate then it doesn't matter.
-			 */
-			curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
-			responseBody.clear();
-		}
-		
-		void prepareRequest(const string &url) {
-			curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
-			responseBody.clear();
-		}
-		
-		static size_t curlDataReceived(void *buffer, size_t size, size_t nmemb, void *userData) {
-			Server *self = (Server *) userData;
-			self->responseBody.append((const char *) buffer, size * nmemb);
-			return size * nmemb;
-		}
-		
-	public:
-		Server(const string &ip, const string &hostName, unsigned short port, const string &cert,
-			const string &proxyAddress, const string &proxyType)
-		{
-			this->ip = ip;
-			this->port = port;
-			certificate = cert;
-			this->proxyAddress = proxyAddress;
-			this->proxyType = proxyType;
-			
-			hostHeader = "Host: " + hostName;
-			headers = NULL;
-			headers = curl_slist_append(headers, hostHeader.c_str());
-			if (headers == NULL) {
-				throw IOException("Unable to create a CURL linked list");
-			}
-			
-			// Older libcurl versions didn't strdup() any option 
-			// strings so we need to keep these in memory.
-			pingURL = string("https://") + ip + ":" + toString(port) +
-				"/ping";
-			sinkURL = string("https://") + ip + ":" + toString(port) +
-				"/sink";
-			
-			curl = NULL;
-			resetConnection();
-		}
-		
-		~Server() {
-			if (curl != NULL) {
-				curl_easy_cleanup(curl);
-			}
-			curl_slist_free_all(headers);
-		}
-		
-		bool ping() {
-			P_DEBUG("Pinging Union Station gateway " << ip << ":" << port);
-			ScopeGuard guard(boost::bind(&Server::resetConnection, this));
-			prepareRequest(pingURL);
-			
-			curl_easy_setopt(curl, CURLOPT_HTTPGET, 1);
-			if (curl_easy_perform(curl) != 0) {
-				P_DEBUG("Could not ping Union Station gateway server " << ip
-					<< ": " << lastErrorMessage);
-				return false;
-			}
-			if (responseBody == "pong") {
-				guard.clear();
-				return true;
-			} else {
-				P_DEBUG("Union Station gateway server " << ip <<
-					" returned an unexpected ping message: " <<
-					responseBody);
-				return false;
-			}
-		}
-		
-		bool send(const Item &item) {
-			ScopeGuard guard(boost::bind(&Server::resetConnection, this));
-			prepareRequest(sinkURL);
-			
-			struct curl_httppost *post = NULL;
-			struct curl_httppost *last = NULL;
-			string base64_data;
-			
-			curl_formadd(&post, &last,
-				CURLFORM_PTRNAME, "key",
-				CURLFORM_PTRCONTENTS, item.unionStationKey.c_str(),
-				CURLFORM_CONTENTSLENGTH, (long) item.unionStationKey.size(),
-				CURLFORM_END);
-			curl_formadd(&post, &last,
-				CURLFORM_PTRNAME, "node_name",
-				CURLFORM_PTRCONTENTS, item.nodeName.c_str(),
-				CURLFORM_CONTENTSLENGTH, (long) item.nodeName.size(),
-				CURLFORM_END);
-			curl_formadd(&post, &last,
-				CURLFORM_PTRNAME, "category",
-				CURLFORM_PTRCONTENTS, item.category.c_str(),
-				CURLFORM_CONTENTSLENGTH, (long) item.category.size(),
-				CURLFORM_END);
-			if (item.compressed) {
-				base64_data = Base64::encode(item.data);
-				curl_formadd(&post, &last,
-					CURLFORM_PTRNAME, "data",
-					CURLFORM_PTRCONTENTS, base64_data.c_str(),
-					CURLFORM_CONTENTSLENGTH, (long) base64_data.size(),
-					CURLFORM_END);
-				curl_formadd(&post, &last,
-					CURLFORM_PTRNAME, "compressed",
-					CURLFORM_PTRCONTENTS, "1",
-					CURLFORM_END);
-			} else {
-				curl_formadd(&post, &last,
-					CURLFORM_PTRNAME, "data",
-					CURLFORM_PTRCONTENTS, item.data.c_str(),
-					CURLFORM_CONTENTSLENGTH, (long) item.data.size(),
-					CURLFORM_END);
-			}
-			
-			curl_easy_setopt(curl, CURLOPT_HTTPGET, 0);
-			curl_easy_setopt(curl, CURLOPT_HTTPPOST, post);
-			CURLcode code = curl_easy_perform(curl);
-			curl_formfree(post);
-			
-			if (code == 0) {
-				guard.clear();
-				// TODO: check response
-				return true;
-			} else {
-				P_DEBUG("Could not send data to Union Station gateway server " << ip
-					<< ": " << lastErrorMessage);
-				return false;
-			}
-		}
-	};
-	
-	typedef shared_ptr<Server> ServerPtr;
-	
-	string gatewayAddress;
-	unsigned short gatewayPort;
-	string certificate;
-	string proxyAddress;
-	string proxyType;
-	BlockingQueue<Item> queue;
-	oxt::thread *thr;
-	
-	list<ServerPtr> servers;
-	time_t nextCheckupTime;
-	
-	void threadMain() {
-		ScopeGuard guard(boost::bind(&RemoteSender::freeThreadData, this));
-		nextCheckupTime = 0;
-		
-		while (true) {
-			Item item;
-			bool hasItem;
-			
-			if (firstStarted()) {
-				item = queue.get();
-				hasItem = true;
-			} else {
-				hasItem = queue.timedGet(item, msecUntilNextCheckup());
-			}
-			
-			if (hasItem) {
-				if (item.exit) {
-					return;
-				} else {
-					if (timeForCheckup()) {
-						recheckServers();
-					}
-					sendOut(item);
-				}
-			} else if (timeForCheckup()) {
-				recheckServers();
-			}
-		}
-	}
-	
-	bool firstStarted() const {
-		return nextCheckupTime == 0;
-	}
-	
-	void recheckServers() {
-		P_DEBUG("Rechecking Union Station gateway servers (" << gatewayAddress << ")...");
-		
-		vector<string> ips;
-		vector<string>::const_iterator it;
-		string hostName;
-		bool someServersAreDown = false;
-		
-		ips = resolveHostname(gatewayAddress, gatewayPort);
-		P_DEBUG(ips.size() << " Union Station gateway servers found");
-		
-		servers.clear();
-		for (it = ips.begin(); it != ips.end(); it++) {
-			ServerPtr server = make_shared<Server>(*it, gatewayAddress, gatewayPort,
-				certificate, proxyAddress, proxyType);
-			if (server->ping()) {
-				servers.push_back(server);
-			} else {
-				someServersAreDown = true;
-			}
-		}
-		P_DEBUG(servers.size() << " Union Station gateway servers are up");
-		
-		if (servers.empty()) {
-			scheduleNextCheckup(5 * 60);
-		} else if (someServersAreDown) {
-			scheduleNextCheckup(60 * 60);
-		} else {
-			scheduleNextCheckup(3 * 60 * 60);
-		}
-	}
-	
-	void freeThreadData() {
-		servers.clear(); // Invoke destructors inside this thread.
-	}
-	
-	/**
-	 * Schedules the next checkup to be run after the given number
-	 * of seconds, unless there's already a checkup scheduled for
-	 * earlier.
-	 */
-	void scheduleNextCheckup(unsigned int seconds) {
-		time_t now = SystemTime::get();
-		if (now >= nextCheckupTime || (time_t) (now + seconds) < nextCheckupTime) {
-			nextCheckupTime = now + seconds;
-			P_DEBUG("Next checkup time in about " << seconds << " seconds");
-		}
-	}
-	
-	unsigned int msecUntilNextCheckup() const {
-		time_t now = SystemTime::get();
-		if (now >= nextCheckupTime) {
-			return 0;
-		} else {
-			return (nextCheckupTime - now) * 1000;
-		}
-	}
-	
-	bool timeForCheckup() const {
-		return SystemTime::get() >= nextCheckupTime;
-	}
-	
-	void sendOut(const Item &item) {
-		bool sent = false;
-		bool someServersWentDown = false;
-		
-		while (!sent && !servers.empty()) {
-			// Pick first available server and put it on the back of the list
-			// for round-robin load balancing.
-			ServerPtr server = servers.front();
-			servers.pop_front();
-			if (server->send(item)) {
-				servers.push_back(server);
-				sent = true;
-			} else {
-				someServersWentDown = true;
-			}
-		}
-		
-		if (someServersWentDown) {
-			if (servers.empty()) {
-				scheduleNextCheckup(5 * 60);
-			} else {
-				scheduleNextCheckup(60 * 60);
-			}
-		}
-		
-		/* If all servers went down then all items in the queue will be
-		 * effectively dropped until after the next checkup has detected
-		 * servers that are up.
-		 */
-	}
-	
-	bool compress(const StaticString data[], unsigned int count, string &output) {
-		if (count == 0) {
-			StaticString newdata;
-			return compress(&newdata, 1, output);
-		}
-		
-		unsigned char out[128 * 1024];
-		z_stream strm;
-		int ret, flush;
-		unsigned int i, have;
-		
-		strm.zalloc = Z_NULL;
-		strm.zfree  = Z_NULL;
-		strm.opaque = Z_NULL;
-		ret = deflateInit(&strm, Z_DEFAULT_COMPRESSION);
-		if (ret != Z_OK) {
-			return false;
-		}
-		
-		for (i = 0; i < count; i++) {
-			strm.avail_in = data[i].size();
-			strm.next_in  = (unsigned char *) data[i].c_str();
-			flush = (i == count - 1) ? Z_FINISH : Z_NO_FLUSH;
-			
-			do {
-				strm.avail_out = sizeof(out);
-				strm.next_out  = out;
-				ret = deflate(&strm, flush);
-				assert(ret != Z_STREAM_ERROR);
-				have = sizeof(out) - strm.avail_out;
-				output.append((const char *) out, have);
-			} while (strm.avail_out == 0);
-			assert(strm.avail_in == 0);
-		}
-		assert(ret == Z_STREAM_END);
-		
-		deflateEnd(&strm);
-		return true;
-	}
-	
-public:
-	RemoteSender(const string &gatewayAddress, unsigned short gatewayPort, const string &certificate,
-		const string &proxyAddress, const string &proxyType)
-		: queue(1024)
-	{
-		this->gatewayAddress = gatewayAddress;
-		this->gatewayPort = gatewayPort;
-		this->certificate = certificate;
-		this->proxyAddress = proxyAddress;
-		this->proxyType = proxyType;
-		thr = new oxt::thread(
-			boost::bind(&RemoteSender::threadMain, this),
-			"RemoteSender thread",
-			1024 * 64
-		);
-	}
-	
-	~RemoteSender() {
-		Item item;
-		item.exit = true;
-		queue.add(item);
-		/* Wait until the thread sends out all queued items.
-		 * If this cannot be done within a short amount of time,
-		 * e.g. because all servers are down, then we'll get killed
-		 * by the watchdog anyway.
-		 */
-		thr->join();
-		delete thr;
-	}
-	
-	void schedule(const string &unionStationKey, const StaticString &nodeName,
-		const StaticString &category, const StaticString data[],
-		unsigned int count)
-	{
-		Item item;
-		
-		item.unionStationKey = unionStationKey;
-		item.nodeName = nodeName;
-		item.category = category;
-		
-		if (compress(data, count, item.data)) {
-			item.compressed = true;
-		} else {
-			size_t size = 0;
-			unsigned int i;
-			
-			for (i = 0; i < count; i++) {
-				size += data[i].size();
-			}
-			item.data.reserve(size);
-			for (i = 0; i < count; i++) {
-				item.data.append(data[i].c_str(), data[i].size());
-			}
-		}
-		
-		if (!queue.tryAdd(item)) {
-			P_WARN("The Union Station gateway isn't responding quickly enough; dropping packet.");
-		}
-	}
-	
-	unsigned int queued() const {
-		return queue.size();
-	}
-};
-
-
-} // namespace Passenger
-
-#endif /* _PASSENGER_REMOTE_SENDER_H_ */
diff --git a/ext/common/MessageChannel.h b/ext/common/MessageChannel.h
deleted file mode 100644
index acd6ca6..0000000
--- a/ext/common/MessageChannel.h
+++ /dev/null
@@ -1,494 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_MESSAGE_CHANNEL_H_
-#define _PASSENGER_MESSAGE_CHANNEL_H_
-
-#include <oxt/system_calls.hpp>
-#include <oxt/macros.hpp>
-
-#include <algorithm>
-#include <string>
-#include <list>
-#include <vector>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/uio.h>
-#include <arpa/inet.h>
-#include <errno.h>
-#include <unistd.h>
-#include <cstdarg>
-#include <cmath>
-#if !APR_HAVE_IOVEC
-	// We don't want apr_want.h to redefine 'struct iovec'.
-	// http://groups.google.com/group/phusion-passenger/browse_thread/thread/7e162f60df212e9c
-	#undef APR_HAVE_IOVEC
-	#define APR_HAVE_IOVEC 1
-#endif
-
-#include "StaticString.h"
-#include "Exceptions.h"
-#include "Utils/Timer.h"
-#include "Utils/MemZeroGuard.h"
-#include "Utils/IOUtils.h"
-#include "Utils/MessageIO.h"
-
-namespace Passenger {
-
-using namespace std;
-using namespace oxt;
-
-
-/**
- * Convenience wrapper class for MessageIO operations on file descriptors.
- */
-class MessageChannel {
-private:
-	int fd;
-	
-	#ifdef __OpenBSD__
-		typedef u_int32_t uint32_t;
-		typedef u_int16_t uint16_t;
-	#endif
-
-public:
-	/**
-	 * Construct a new MessageChannel with no underlying file descriptor.
-	 * Thus the resulting MessageChannel object will not be usable.
-	 * This constructor exists to allow one to declare an "empty"
-	 * MessageChannel variable which is to be initialized later.
-	 */
-	MessageChannel() {
-		this->fd = -1;
-	}
-
-	/**
-	 * Construct a new MessageChannel with the given file descriptor.
-	 */
-	MessageChannel(int fd) {
-		this->fd = fd;
-	}
-	
-	/**
-	 * Returns the underlying file descriptor. -1 if it has already been closed.
-	 */
-	int filenum() const {
-		return fd;
-	}
-	
-	/**
-	 * Returns whether close() has been called.
-	 */
-	bool connected() const {
-		return fd != -1;
-	}
-	
-	/**
-	 * Close the underlying file descriptor. If this method is called multiple
-	 * times, the file descriptor will only be closed the first time.
-	 *
-	 * @throw SystemException
-	 * @throw boost::thread_interrupted
-	 * @post filenum() == -1
-	 * @post !connected()
-	 */
-	void close() {
-		if (fd != -1) {
-			int ret = syscalls::close(fd);
-			fd = -1;
-			if (ret == -1) {
-				throw SystemException("Cannot close file descriptor", errno);
-			}
-		}
-	}
-
-	/**
-	 * Send an array message, which consists of the given elements, over the underlying
-	 * file descriptor.
-	 *
-	 * @param args An object which contains the message elements. This object must
-	 *             support STL-style iteration, and each iterator must have an
-	 *             std::string as value. Use the StringArrayType and
-	 *             StringArrayConstIteratorType template parameters to specify the exact type names.
-	 * @throws SystemException An error occured while writing the data to the file descriptor.
-	 * @throws boost::thread_interrupted
-	 * @pre None of the message elements may contain a NUL character (<tt>'\\0'</tt>).
-	 * @see read(), write(const char *, ...)
-	 */
-	template<typename StringArrayType>
-	void writeEx(const StringArrayType &args) {
-		writeArrayMessage(fd, args);
-	}
-	
-	void write(const vector<StaticString> &args) {
-		writeArrayMessageEx(fd, args);
-	}
-	
-	void write(const vector<string> &args) {
-		writeArrayMessageEx(fd, args);
-	}
-	
-	void write(const list<StaticString> &args) {
-		writeArrayMessageEx(fd, args);
-	}
-	
-	void write(const list<string> &args) {
-		writeArrayMessageEx(fd, args);
-	}
-	
-	/**
-	 * Send an array message, which consists of the given strings, over the underlying
-	 * file descriptor. Like <tt>write(const char *name, ...)</tt> but takes a va_list
-	 * instead.
-	 *
-	 * @throws SystemException An error occured while writing the data to the file descriptor.
-	 * @throws boost::thread_interrupted
-	 * @pre None of the message elements may contain a NUL character (<tt>'\\0'</tt>).
-	 */
-	void write(const char *name, va_list &ap) {
-		writeArrayMessage(fd, name, ap);
-	}
-	
-	/**
-	 * Send an array message, which consists of the given strings, over the underlying
-	 * file descriptor.
-	 *
-	 * @param name The first element of the message to send.
-	 * @param ... Other elements of the message. These *must* be strings, i.e. of type char*.
-	 *            It is also required to terminate this list with a NULL.
-	 * @throws SystemException An error occured while writing the data to the file descriptor.
-	 * @throws boost::thread_interrupted
-	 * @pre None of the message elements may contain a NUL character (<tt>'\\0'</tt>).
-	 * @see read(), write(const list<string> &)
-	 */
-	void write(const char *name, ...) {
-		va_list ap;
-		va_start(ap, name);
-		try {
-			write(name, ap);
-			va_end(ap);
-		} catch (...) {
-			va_end(ap);
-			throw;
-		}
-	}
-	
-	/**
-	 * Write a 32-bit big-endian unsigned integer to the underlying file descriptor.
-	 *
-	 * @throws SystemException An error occurred while writing the data to the file descriptor.
-	 * @throws boost::thread_interrupted
-	 */
-	void writeUint32(unsigned int value) {
-		Passenger::writeUint32(fd, value);
-	}
-	
-	/**
-	 * Write a scalar message to the underlying file descriptor.
-	 *
-	 * @note Security guarantee: this method will not copy the data in memory,
-	 *       so it's safe to use this method to write passwords to the underlying
-	 *       file descriptor.
-	 *
-	 * @param str The scalar message's content.
-	 * @throws SystemException An error occured while writing the data to the file descriptor.
-	 * @throws boost::thread_interrupted
-	 * @see readScalar(), writeScalar(const char *, unsigned int)
-	 */
-	void writeScalar(const string &str) {
-		writeScalarMessage(fd, str);
-	}
-	
-	/**
-	 * Write a scalar message to the underlying file descriptor.
-	 *
-	 * @note Security guarantee: this method will not copy the data in memory,
-	 *       so it's safe to use this method to write passwords to the underlying
-	 *       file descriptor.
-	 *
-	 * @param data The scalar message's content.
-	 * @param size The number of bytes in <tt>data</tt>.
-	 * @pre <tt>data != NULL</tt>
-	 * @throws SystemException An error occured while writing the data to the file descriptor.
-	 * @throws boost::thread_interrupted
-	 * @see readScalar(), writeScalar(const string &)
-	 */
-	void writeScalar(const char *data, unsigned int size) {
-		writeScalarMessage(fd, data, size);
-	}
-	
-	/**
-	 * Pass a file descriptor. This only works if the underlying file
-	 * descriptor is a Unix socket.
-	 *
-	 * @param fileDescriptor The file descriptor to pass.
-	 * @param negotiate See Ruby's MessageChannel#send_io method's comments.
-	 * @throws SystemException Something went wrong during file descriptor passing.
-	 * @throws boost::thread_interrupted
-	 * @pre <tt>fileDescriptor >= 0</tt>
-	 * @see readFileDescriptor()
-	 */
-	void writeFileDescriptor(int fileDescriptor, bool negotiate = true) {
-		if (negotiate) {
-			Passenger::writeFileDescriptorWithNegotiation(fd, fileDescriptor);
-		} else {
-			Passenger::writeFileDescriptor(fd, fileDescriptor);
-		}
-	}
-	
-	/**
-	 * Read an array message from the underlying file descriptor.
-	 *
-	 * @param args The message will be put in this variable.
-	 * @return Whether end-of-file has been reached. If so, then the contents
-	 *         of <tt>args</tt> will be undefined.
-	 * @throws SystemException If an error occured while receiving the message.
-	 * @throws boost::thread_interrupted
-	 * @see write()
-	 */
-	bool read(vector<string> &args) {
-		try {
-			args = readArrayMessage(fd);
-			return true;
-		} catch (const EOFException &) {
-			return false;
-		}
-	}
-	
-	/**
-	 * Read a 32-bit big-endian unsigned integer from the underlying file descriptor.
-	 *
-	 * @param value Upon success, the read value will be stored in here.
-	 * @param timeout A pointer to an integer, representing the maximum number of
-	 *                milliseconds to spend on reading the entire integer.
-	 *                A TimeoutException will be thrown if the timeout expires.
-	 *                If no exception is thrown, the the amount of time spent on waiting
-	 *                will be deducted from <tt>*timeout</tt>.
-	 *                Pass NULL if you do not want to enforce any time limits.
-	 * @return True if a value was read, false if EOF was reached before all data can be
-	 *         read.
-	 * @throws SystemException An error occurred while reading data from the file descriptor.
-	 * @throws boost::thread_interrupted
-	 */
-	bool readUint32(unsigned int &value, unsigned long long *timeout = NULL) {
-		uint32_t temp;
-		
-		if (!readRaw(&temp, sizeof(uint32_t), timeout)) {
-			return false;
-		} else {
-			value = ntohl(temp);
-			return true;
-		}
-	}
-	
-	/**
-	 * Read a scalar message from the underlying file descriptor.
-	 *
-	 * @param output The message will be put in here.
-	 * @param maxSize The maximum number of bytes that may be read. If the
-	 *                scalar to read is larger than this, then a SecurityException
-	 *                will be thrown. Set to 0 for no size limit.
-	 * @param timeout A pointer to an integer, representing the maximum number of
-	 *                milliseconds to spend on reading the entire scalar.
-	 *                A TimeoutException will be thrown if unable to read the entire
-	 *                scalar within this time period.
-	 *                If no exception is thrown, the the amount of time spent on waiting
-	 *                will be deducted from <tt>*timeout</tt>.
-	 *                Pass NULL if you do not want to enforce any time limits.
-	 * @returns Whether end-of-file was reached during reading.
-	 * @throws SystemException An error occured while reading data from the file descriptor.
-	 * @throws SecurityException There is more data to read than allowed by maxSize.
-	 * @throws TimeoutException Unable to read the entire scalar within <tt>timeout</tt>
-	 *                          milliseconds.
-	 * @throws boost::thread_interrupted
-	 * @see writeScalar()
-	 */
-	bool readScalar(string &output, unsigned int maxSize = 0, unsigned long long *timeout = NULL) {
-		unsigned int size;
-		unsigned int remaining;
-		
-		if (!readUint32(size, timeout)) {
-			return false;
-		}
-		
-		if (maxSize != 0 && size > maxSize) {
-			throw SecurityException("There is more data available than is allowed by the size limit.");
-		}
-		
-		output.clear();
-		output.reserve(size);
-		remaining = size;
-		if (OXT_LIKELY(remaining > 0)) {
-			char buf[1024 * 32];
-			// Wipe the buffer when we're done; it might contain sensitive data.
-			MemZeroGuard g(buf, sizeof(buf));
-			
-			while (remaining > 0) {
-				unsigned int blockSize = min((unsigned int) sizeof(buf), remaining);
-				
-				if (!readRaw(buf, blockSize, timeout)) {
-					return false;
-				}
-				output.append(buf, blockSize);
-				remaining -= blockSize;
-			}
-		}
-		return true;
-	}
-	
-	/**
-	 * Read exactly <tt>size</tt> bytes of data from the underlying file descriptor,
-	 * and put the result in <tt>buf</tt>. If end-of-file has been reached, or if
-	 * end-of-file was encountered before <tt>size</tt> bytes have been read, then
-	 * <tt>false</tt> will be returned. Otherwise (i.e. if the read was successful),
-	 * <tt>true</tt> will be returned.
-	 *
-	 * @param buf The buffer to place the read data in. This buffer must be at least
-	 *            <tt>size</tt> bytes long.
-	 * @param size The number of bytes to read.
-	 * @param timeout A pointer to an integer, which specifies the maximum number of
-	 *                milliseconds that may be spent on reading the <tt>size</tt> bytes
-	 *                of data. If the timeout expired then TimeoutException will be
-	 *                thrown.
-	 *                If this function returns without throwing an exception, then the
-	 *                total number of milliseconds spent on reading will be deducted
-	 *                from <tt>timeout</tt>.
-	 *                Pass NULL if you do not want to enforce a timeout.
-	 * @return Whether reading was successful or whether EOF was reached.
-	 * @pre buf != NULL
-	 * @throws SystemException Something went wrong during reading.
-	 * @throws TimeoutException Unable to read <tt>size</tt> bytes of data within
-	 *                          <tt>timeout</tt> milliseconds.
-	 * @throws boost::thread_interrupted
-	 */
-	bool readRaw(void *buf, unsigned int size, unsigned long long *timeout = NULL) {
-		if (timeout != NULL) {
-			unsigned long long t = *timeout * 1000;
-			unsigned int ret;
-			try {
-				ret = Passenger::readExact(fd, buf, size, &t);
-				#if defined(__NetBSD__) || defined(__OpenBSD__)
-					*timeout = llround((double) t / 1000);
-				#else
-					*timeout = llroundl((long double) t / 1000);
-				#endif
-				return ret == size;
-			} catch (...) {
-				#if defined(__NetBSD__) || defined(__OpenBSD__)
-					*timeout = llround((double) t / 1000);
-				#else
-					*timeout = llroundl((long double) t / 1000);
-				#endif
-				throw;
-			}
-		} else {
-			return Passenger::readExact(fd, buf, size) == size;
-		}
-	}
-	
-	/**
-	 * Receive a file descriptor, which had been passed over the underlying
-	 * file descriptor.
-	 *
-	 * @param negotiate See Ruby's MessageChannel#send_io method's comments.
-	 * @return The passed file descriptor.
-	 * @throws SystemException If something went wrong during the
-	 *            receiving of a file descriptor. Perhaps the underlying
-	 *            file descriptor isn't a Unix socket.
-	 * @throws IOException Whatever was received doesn't seem to be a
-	 *            file descriptor.
-	 * @throws boost::thread_interrupted
-	 */
-	int readFileDescriptor(bool negotiate = true) {
-		if (negotiate) {
-			return Passenger::readFileDescriptorWithNegotiation(fd);
-		} else {
-			return Passenger::readFileDescriptor(fd);
-		}
-	}
-	
-	/**
-	 * Set the timeout value for reading data from this channel.
-	 * If no data can be read within the timeout period, then a
-	 * SystemException will be thrown by one of the read methods,
-	 * with error code EAGAIN or EWOULDBLOCK.
-	 *
-	 * @param msec The timeout, in milliseconds. If 0 is given,
-	 *             there will be no timeout.
-	 * @throws SystemException Cannot set the timeout.
-	 */
-	void setReadTimeout(unsigned int msec) {
-		// See the comment for setWriteTimeout().
-		struct timeval tv;
-		int ret;
-		
-		tv.tv_sec = msec / 1000;
-		tv.tv_usec = msec % 1000 * 1000;
-		ret = syscalls::setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO,
-			&tv, sizeof(tv));
-		#ifndef __SOLARIS__
-			// SO_RCVTIMEO is unimplemented and returns an error on Solaris
-			// 9 and 10 SPARC.  Seems to work okay without it.
-			if (ret == -1) {
-				throw SystemException("Cannot set read timeout for socket", errno);
-			}
-		#endif
-	}
-	
-	/**
-	 * Set the timeout value for writing data to this channel.
-	 * If no data can be written within the timeout period, then a
-	 * SystemException will be thrown, with error code EAGAIN or
-	 * EWOULDBLOCK.
-	 *
-	 * @param msec The timeout, in milliseconds. If 0 is given,
-	 *             there will be no timeout.
-	 * @throws SystemException Cannot set the timeout.
-	 */
-	void setWriteTimeout(unsigned int msec) {
-		// People say that SO_RCVTIMEO/SO_SNDTIMEO are unreliable and
-		// not well-implemented on all platforms.
-		// http://www.developerweb.net/forum/archive/index.php/t-3439.html
-		// That's why we use APR's timeout facilities as well (see Hooks.cpp).
-		struct timeval tv;
-		int ret;
-		
-		tv.tv_sec = msec / 1000;
-		tv.tv_usec = msec % 1000 * 1000;
-		ret = syscalls::setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO,
-			&tv, sizeof(tv));
-		#ifndef __SOLARIS__
-			// SO_SNDTIMEO is unimplemented and returns an error on Solaris
-			// 9 and 10 SPARC.  Seems to work okay without it.
-			if (ret == -1) {
-				throw SystemException("Cannot set read timeout for socket", errno);
-			}
-		#endif
-	}
-};
-
-} // namespace Passenger
-
-#endif /* _PASSENGER_MESSAGE_CHANNEL_H_ */
diff --git a/ext/common/MessageClient.h b/ext/common/MessageClient.h
index 6372805..7ec1b79 100644
--- a/ext/common/MessageClient.h
+++ b/ext/common/MessageClient.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/ext/common/MessageReadersWriters.h b/ext/common/MessageReadersWriters.h
index adbba19..a948afc 100644
--- a/ext/common/MessageReadersWriters.h
+++ b/ext/common/MessageReadersWriters.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -501,6 +501,25 @@ public:
 		output[0] = StaticString(headerBuf, sizeof(uint32_t));
 		output[1] = data;
 	}
+
+	// output must be at least count + 1 in length
+	static void generate(const StaticString data[], unsigned int count,
+		char headerBuf[sizeof(uint32_t)], StaticString *output)
+	{
+		unsigned int i;
+		uint32_t totalSize = 0;
+
+		for (i = 0; i < count; i++) {
+			if (OXT_UNLIKELY(data[i].size() > 0xFFFFFFFF)) {
+				throw ArgumentException("Data size exceeds maximum size for scalar messages.");
+			}
+			totalSize += data[i].size();
+			output[i + 1] = data[i];
+		}
+
+		Uint32Message::generate(headerBuf, totalSize);
+		output[0] = StaticString(headerBuf, sizeof(uint32_t));
+	}
 };
 
 } // namespace Passenger
diff --git a/ext/common/MessageServer.h b/ext/common/MessageServer.h
index c0c7b58..70809e4 100644
--- a/ext/common/MessageServer.h
+++ b/ext/common/MessageServer.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010, 2011, 2012 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -40,15 +40,15 @@
 #include <cerrno>
 #include <cassert>
 
-#include "Account.h"
-#include "AccountsDatabase.h"
-#include "Constants.h"
-#include "FileDescriptor.h"
-#include "MessageChannel.h"
-#include "Logging.h"
-#include "Exceptions.h"
-#include "Utils/StrIntUtils.h"
-#include "Utils/IOUtils.h"
+#include <Account.h>
+#include <AccountsDatabase.h>
+#include <Constants.h>
+#include <FileDescriptor.h>
+#include <Logging.h>
+#include <Exceptions.h>
+#include <Utils/StrIntUtils.h>
+#include <Utils/IOUtils.h>
+#include <Utils/MessageIO.h>
 
 namespace Passenger {
 
@@ -127,7 +127,7 @@ using namespace oxt;
  *       };
  *       
  *       MessageServer::ClientContextPtr newClient(MessageServer::CommonClientContext &commonContext) {
- *           return MessageServer::ClientContextPtr(new MyContext());
+ *           return make_shared<MyContext>();
  *       }
  *       
  *       bool processMessage(MessageServer::CommonClientContext &commonContext,
@@ -157,13 +157,7 @@ using namespace oxt;
  */
 class MessageServer {
 public:
-	static const unsigned int CLIENT_THREAD_STACK_SIZE =
-		#ifdef __FreeBSD__
-			// localtime() on FreeBSD needs some more stack space.
-			1024 * 96;
-		#else
-			1024 * 64;
-		#endif
+	static const unsigned int CLIENT_THREAD_STACK_SIZE = 1024 * 128;
 	
 	/** Interface for client context objects. */
 	class ClientContext {
@@ -182,16 +176,14 @@ public:
 		/** The client's socket file descriptor. */
 		FileDescriptor fd;
 		
-		/** The channel that's associated with the client's socket. */
-		MessageChannel channel;
-		
 		/** The account with which the client authenticated. */
 		AccountPtr account;
 		
 		
-		CommonClientContext(FileDescriptor &theFd, AccountPtr &theAccount)
-			: fd(theFd), channel(theFd), account(theAccount)
-		{ }
+		CommonClientContext(FileDescriptor &_fd, AccountPtr &_account)
+			: fd(_fd),
+			  account(_account)
+			{ }
 		
 		/** Returns a string representation for this client context. */
 		string name() {
@@ -199,7 +191,7 @@ public:
 		}
 		
 		/**
-		 * Checks whether this client has all of the rights in <tt>rights</tt>. The
+		 * Checks whether this client has all of the rights in `rights`. The
 		 * client will be notified about the result of this check, by sending it a
 		 * message.
 		 *
@@ -213,9 +205,18 @@ public:
 				writeArrayMessage(fd, "SecurityException", "Insufficient rights to execute this command.", NULL);
 				throw SecurityException("Insufficient rights to execute this command.");
 			} else {
-				writeArrayMessage(fd, "Passed security", NULL);
+				passSecurity();
 			}
 		}
+
+		/** Announce to the client that it has passed the security checks.
+		 *
+		 * @throws SystemException Something went wrong while communicating with the client.
+		 * @throws boost::thread_interrupted
+		 */
+		void passSecurity() {
+			writeArrayMessage(fd, "Passed security", NULL);
+		}
 	};
 	
 	/**
@@ -226,6 +227,26 @@ public:
 	 * client is closed.
 	 */
 	class Handler {
+	protected:
+		/** Utility function for checking whether the command name equals `command`,
+		 * and whether it has exactly `nargs` arguments (excluding command name).
+		 */
+		bool isCommand(const vector<string> &args, const string &command,
+			unsigned int nargs = 0) const
+		{
+			return args.size() == nargs + 1 && args[0] == command;
+		}
+
+		/** Utility function for checking whether the command name equals `command`,
+		 * and whether it has at least `minargs` and at most `maxargs` arguments
+		 * (excluding command name), inclusive.
+		 */
+		bool isCommand(const vector<string> &args, const string &command,
+			unsigned int minargs, unsigned int maxargs) const
+		{
+			return args.size() >= minargs + 1 && args.size() <= maxargs + 1 && args[0] == command;
+		}
+
 	public:
 		virtual ~Handler() { }
 		
diff --git a/ext/common/MultiLibeio.cpp b/ext/common/MultiLibeio.cpp
new file mode 100644
index 0000000..f53c05f
--- /dev/null
+++ b/ext/common/MultiLibeio.cpp
@@ -0,0 +1,200 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#include <MultiLibeio.h>
+#include <oxt/thread.hpp>
+#include <oxt/system_calls.hpp>
+#include <cassert>
+
+#ifndef PREAD_AND_PWRITE_ARE_NOT_THREADSAFE
+	#ifdef __APPLE__
+		#define PREAD_AND_PWRITE_ARE_NOT_THREADSAFE 1
+	#else
+		#define PREAD_AND_PWRITE_ARE_NOT_THREADSAFE 0
+	#endif
+#endif
+
+
+namespace Passenger {
+
+using namespace oxt;
+
+static boost::mutex syncher;
+static condition_variable cond;
+static bool shouldPoll = false;
+static oxt::thread *thr = NULL;
+static bool quit = false;
+
+
+struct Data {
+	SafeLibevPtr libev;
+	MultiLibeio::Callback callback;
+
+	Data(const SafeLibevPtr &_libev, const MultiLibeio::Callback &_callback)
+		: libev(_libev),
+		  callback(_callback)
+	{
+		assert(_libev != NULL);
+	}
+};
+
+struct CustomData: public Data {
+	MultiLibeio::ExecuteCallback execute;
+
+	CustomData(const SafeLibevPtr &_libev,
+		const MultiLibeio::Callback &_callback,
+		const MultiLibeio::ExecuteCallback &_execute)
+		: Data(_libev, _callback),
+		  execute(_execute)
+		{ }
+};
+
+
+static void
+threadMain() {
+	unique_lock<boost::mutex> l(syncher);
+	while (!quit) {
+		while (!shouldPoll && !quit) {
+			cond.wait(l);
+		}
+		if (!quit) {
+			shouldPoll = false;
+			l.unlock();
+			eio_poll();
+			l.lock();
+		}
+	}
+}
+
+static void
+wantPoll() {
+	boost::lock_guard<boost::mutex> l(syncher);
+	shouldPoll = true;
+	cond.notify_one();
+}
+
+static int
+dispatch(eio_req *req) {
+	auto_ptr<Data> data((Data *) req->data);
+	assert(data->libev != NULL);
+	data->libev->runLater(boost::bind(data->callback, *req));
+	return 0;
+}
+
+static void
+executeWrapper(eio_req *req) {
+	CustomData *data = (CustomData *) req->data;
+	data->execute(req);
+}
+
+#if PREAD_AND_PWRITE_ARE_NOT_THREADSAFE
+	static boost::mutex preadWriteLock;
+
+	static void
+	lockedPread(int fd, void *buf, size_t length, off_t offset, eio_req *req) {
+		boost::lock_guard<boost::mutex> l(preadWriteLock);
+		req->result = pread(fd, buf, length, offset);
+	}
+
+	static void
+	lockedPwrite(int fd, void *buf, size_t length, off_t offset, eio_req *req) {
+		boost::lock_guard<boost::mutex> l(preadWriteLock);
+		req->result = pwrite(fd, buf, length, offset);
+	}
+#endif
+
+void
+MultiLibeio::init() {
+	eio_init(wantPoll, NULL);
+	thr = new oxt::thread(threadMain, "MultiLibeio dispatcher", 1024 * 64);
+}
+
+void
+MultiLibeio::shutdown() {
+	unique_lock<boost::mutex> l(syncher);
+	quit = true;
+	cond.notify_one();
+	l.unlock();
+	thr->join();
+	delete thr;
+	thr = NULL;
+	quit = false;
+}
+
+#define MAKE_REQUEST(code) \
+	eio_req *result; \
+	Data *data = new Data(libev, callback); \
+	code \
+	if (result == NULL) { \
+		delete data; \
+		return NULL; \
+	} else { \
+		return result; \
+	}
+
+eio_req *
+MultiLibeio::open(const char *path, int flags, mode_t mode, int pri, const Callback &callback) {
+	MAKE_REQUEST(
+		result = eio_open(path, flags, mode, pri, dispatch, data);
+	);
+}
+
+eio_req *
+MultiLibeio::read(int fd, void *buf, size_t length, off_t offset, int pri, const Callback &callback) {
+	#if PREAD_AND_PWRITE_ARE_NOT_THREADSAFE
+		return custom(boost::bind(lockedPread, fd, buf, length, offset, _1),
+			pri, callback);
+	#else
+		MAKE_REQUEST(
+			result = eio_read(fd, buf, length, offset, pri, dispatch, data);
+		);
+	#endif
+}
+
+eio_req *
+MultiLibeio::write(int fd, void *buf, size_t length, off_t offset, int pri, const Callback &callback) {
+	#if PREAD_AND_PWRITE_ARE_NOT_THREADSAFE
+		return custom(boost::bind(lockedPwrite, fd, buf, length, offset, _1),
+			pri, callback);
+	#else
+		MAKE_REQUEST(
+			result = eio_write(fd, buf, length, offset, pri, dispatch, data);
+		);
+	#endif
+}
+
+eio_req *
+MultiLibeio::custom(const ExecuteCallback &execute, int pri, const Callback &callback) {
+	CustomData *data = new CustomData(libev, callback, execute);
+	eio_req *result = eio_custom(executeWrapper, pri, dispatch, data);
+	if (result == NULL) {
+		delete data;
+		return NULL;
+	} else {
+		return result;
+	}
+}
+
+
+} // namespace Passenger
diff --git a/ext/common/MultiLibeio.h b/ext/common/MultiLibeio.h
new file mode 100644
index 0000000..8428d11
--- /dev/null
+++ b/ext/common/MultiLibeio.h
@@ -0,0 +1,67 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_MULTI_LIBEIO_H_
+#define _PASSENGER_MULTI_LIBEIO_H_
+
+#include <boost/function.hpp>
+#include <eio.h>
+#include <SafeLibev.h>
+
+namespace Passenger {
+
+using namespace boost;
+
+
+class MultiLibeio {
+private:
+	SafeLibevPtr libev;
+
+public:
+	typedef function<void (eio_req *req)> ExecuteCallback;
+	typedef function<void (eio_req req)> Callback;
+
+	static void init();
+	static void shutdown();
+
+	MultiLibeio() { }
+
+	MultiLibeio(const SafeLibevPtr &_libev)
+		: libev(_libev)
+		{ }
+
+	const SafeLibevPtr &getLibev() const {
+		return libev;
+	}
+
+	eio_req *open(const char *path, int flags, mode_t mode, int pri, const Callback &callback);
+	eio_req *read(int fd, void *buf, size_t length, off_t offset, int pri, const Callback &callback);
+	eio_req *write(int fd, void *buf, size_t length, off_t offset, int pri, const Callback &callback);
+	eio_req *custom(const ExecuteCallback &execute, int pri, const Callback &callback);
+};
+
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_MULTI_LIBEIO_H_ */
diff --git a/ext/common/PoolOptions.h b/ext/common/PoolOptions.h
deleted file mode 100644
index 4e319e7..0000000
--- a/ext/common/PoolOptions.h
+++ /dev/null
@@ -1,518 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_SPAWN_OPTIONS_H_
-#define _PASSENGER_SPAWN_OPTIONS_H_
-
-#include <string>
-#include <vector>
-#include "Account.h"
-#include "Logging.h"
-#include "Constants.h"
-#include "StringListCreator.h"
-
-namespace Passenger {
-
-using namespace std;
-
-/**
- * This struct encapsulates information for ApplicationPool::get() and for
- * SpawnManager::spawn(), such as which application is to be spawned.
- *
- * <h2>Privilege lowering support</h2>
- *
- * If <em>user</em> is given and isn't the empty string, then the application process
- * will run as the given username. Otherwise, the owner of the application's startup
- * file (e.g. config/environment.rb or config.ru) will be used.
- *
- * If <em>group</em> is given and isn't the empty string, then the application process
- * will run as the given group name. If it's set to the special value
- * "!STARTUP_FILE!", then the startup file's group will be used. Otherwise,
- * the primary group of the user that the application process will run as,
- * will be used as group.
- * 
- * If the user or group that the application process attempts to switch to
- * doesn't exist, then <em>default_user</em> and <em>default_group</em>, respectively,
- * will be used.
- * 
- * Phusion Passenger will attempt to avoid running the application process as
- * root: if <em>user</em> or <em>group</em> is set to the root user or the root group,
- * or if the startup file is owned by root, then <em>default_user</em> and
- * <em>default_group</em> will be used instead.
- * 
- * All this only happen if Phusion Passenger has root privileges. If not, then
- * these options have no effect.
- */
-struct PoolOptions {
-	/**
-	 * The root directory of the application to spawn. In case of a Ruby on Rails
-	 * application, this is the folder that contains 'app/', 'public/', 'config/',
-	 * etc. This must be a valid directory, but the path does not have to be absolute.
-	 */
-	string appRoot;
-	
-	/**
-	 * A name used by ApplicationPool to uniquely identify an application.
-	 * If one tries to get() from the application pool with name "A", then get()
-	 * again with name "B", then the latter will spawn a new application process,
-	 * even if both get() requests have the same app root.
-	 *
-	 * If left empty (the default), then the app root is used as the app group
-	 * name.
-	 */
-	string appGroupName;
-	
-	/** The application type. Either "rails" (default), "rack" or "wsgi". */
-	string appType;
-	
-	/**
-	 * The RAILS_ENV/RACK_ENV environment that should be used. May not be an
-	 * empty string. The default is "production".
-	 */
-	string environment;
-	
-	/**
-	 * Method with which application processes should be spawned. Different methods
-	 * have different performance and compatibility properties. Available methods are
-	 * "smart-lv2" (default), "smart" and "conservative". The different spawning methods
-	 * are explained in the "Spawning methods explained" section of the users guide.
-	 */
-	string spawnMethod;
-	
-	/** See overview. */
-	string user;
-	/** See class overview. */
-	string group;
-	/** See class overview. Defaults to "nobody". */
-	string defaultUser;
-	/** See class overview. Defaults to the defaultUser's primary group. */
-	string defaultGroup;
-	
-	/**
-	 * The idle timeout, in seconds, of framework spawners. See the "Spawning methods
-	 * explained" section of the users guide for information about framework spawners.
-	 *
-	 * A timeout of 0 means that the framework spawner should never idle timeout. A timeout
-	 * of -1 means that the default timeout value should be used.
-	 */
-	long frameworkSpawnerTimeout;
-	
-	/**
-	 * The idle timeout, in seconds, of application spawners. See the "Spawning methods
-	 * explained" section of the users guide for information about application spawners.
-	 *
-	 * A timeout of 0 means that the application spawner should never idle timeout. A timeout
-	 * of -1 means that the default timeout value should be used.
-	 */
-	long appSpawnerTimeout;
-	
-	/**
-	 * Environment variables which should be passed to the spawned application
-	 * process.
-	 *
-	 * If a new application process is started, then the getItems() method
-	 * on this object will be called, which is to return environment
-	 * variables that should be passed to the newly spawned backend process.
-	 * Odd indices in the resulting array contain keys, even indices contain
-	 * the value for the key in the previous index.
-	 *
-	 * May be set to NULL.
-	 *
-	 * @invariant environmentVariables.size() is an even number.
-	 */
-	StringListCreatorPtr environmentVariables;
-	
-	/**
-	 * The base URI on which the application runs. If the application is
-	 * running on the root URI, then this value must be "/".
-	 *
-	 * @invariant baseURI != ""
-	 */
-	string baseURI;
-	
-	/**
-	 * The maximum number of requests that the spawned application may process
-	 * before exiting. A value of 0 means unlimited.
-	 */
-	unsigned long maxRequests;
-	
-	/**
-	 * The minimum number of processes for the current group that the application
-	 * pool's cleaner thread should keep around.
-	 */
-	unsigned long minProcesses;
-	
-	/**
-	 * Whether to use a global queue instead of a per-backend process
-	 * queue. This option is only used by ApplicationPool::get().
-	 *
-	 * If enabled, when all backend processes are active, get() will
-	 * wait until there's at least one backend process that's idle, instead
-	 * of queuing the request into a random process's private queue.
-	 * This is especially useful if a website has one or more long-running
-	 * requests.
-	 */
-	bool useGlobalQueue;
-	
-	/**
-	 * Whether to show the Phusion Passenger version number in the
-	 * X-Powered-By header.
-	 */
-	bool showVersionInHeader;
-	
-	/**
-	 * A throttling rate for file stats. When set to a non-zero value N,
-	 * restart.txt and other files which are usually stat()ted on every
-	 * ApplicationPool::get() call will be stat()ed at most every N seconds.
-	 */
-	unsigned long statThrottleRate;
-	
-	/**
-	 * The directory which contains restart.txt and always_restart.txt.
-	 * An empty string means that the default directory should be used.
-	 */
-	string restartDir;
-	
-	/**
-	 * Any rights that the spawned application process may have. The SpawnManager
-	 * will create a new account for each spawned app, and that account will be
-	 * assigned these rights.
-	 */
-	Account::Rights rights;
-	
-	/** Whether debugger support should be enabled. */
-	bool debugger;
-	
-	/** In case an app process needs to be spawned, whether analytics logging
-	 * should be enabled.
-	 */
-	bool analytics;
-	
-	/**
-	 * An analytics log object to log things to. May be the null pointer,
-	 * in which case analytics logging is disabled for this request.
-	 */
-	AnalyticsLogPtr log;
-	
-	/**
-	 * Whether the session returned by ApplicationPool::Interface::get()
-	 * should be automatically initiated. Defaults to true.
-	 */
-	bool initiateSession;
-	
-	/**
-	 * Whether application processes should print exceptions that occurred during
-	 * application initialization. Defaults to true.
-	 */
-	bool printExceptions;
-	
-	/*********************************/
-	
-	/**
-	 * Creates a new PoolOptions object with the default values filled in.
-	 * One must still set appRoot manually, after having used this constructor.
-	 */
-	PoolOptions() {
-		appType                 = "rails";
-		environment             = "production";
-		spawnMethod             = "smart-lv2";
-		frameworkSpawnerTimeout = -1;
-		appSpawnerTimeout       = -1;
-		baseURI                 = "/";
-		maxRequests             = 0;
-		minProcesses            = 0;
-		useGlobalQueue          = false;
-		showVersionInHeader     = true;
-		statThrottleRate        = 0;
-		rights                  = DEFAULT_BACKEND_ACCOUNT_RIGHTS;
-		debugger                = false;
-		analytics               = false;
-		initiateSession         = true;
-		printExceptions         = true;
-		
-		/*********************************/
-	}
-	
-	/**
-	 * Creates a new PoolOptions object with the given values.
-	 */
-	PoolOptions(const string &appRoot,
-		string appGroupName          = "",
-		const string &appType        = "rails",
-		const string &environment    = "production",
-		const string &spawnMethod    = "smart-lv2",
-		const string &user           = "",
-		const string &group          = "",
-		const string &defaultUser    = "",
-		const string &defaultGroup   = "",
-		long frameworkSpawnerTimeout = -1,
-		long appSpawnerTimeout       = -1,
-		const string &baseURI        = "/",
-		unsigned long maxRequests    = 0,
-		unsigned long minProcesses   = 0,
-		bool useGlobalQueue          = false,
-		bool showVersionInHeader     = true,
-		unsigned long statThrottleRate = 0,
-		const string &restartDir     = "",
-		Account::Rights rights       = DEFAULT_BACKEND_ACCOUNT_RIGHTS,
-		bool debugger                = false,
-		bool analytics               = false,
-		const AnalyticsLogPtr &log   = AnalyticsLogPtr()
-	) {
-		this->appRoot                 = appRoot;
-		this->appGroupName            = appGroupName;
-		this->appType                 = appType;
-		this->environment             = environment;
-		this->spawnMethod             = spawnMethod;
-		this->user                    = user;
-		this->group                   = group;
-		this->defaultUser             = defaultUser;
-		this->defaultGroup            = defaultGroup;
-		this->frameworkSpawnerTimeout = frameworkSpawnerTimeout;
-		this->appSpawnerTimeout       = appSpawnerTimeout;
-		this->baseURI                 = baseURI;
-		this->maxRequests             = maxRequests;
-		this->minProcesses            = minProcesses;
-		this->useGlobalQueue          = useGlobalQueue;
-		this->showVersionInHeader     = showVersionInHeader;
-		this->statThrottleRate        = statThrottleRate;
-		this->restartDir              = restartDir;
-		this->rights                  = rights;
-		this->debugger                = debugger;
-		this->analytics               = analytics;
-		this->log                     = log;
-		this->initiateSession         = true;
-		this->printExceptions         = true;
-		
-		/*********************************/
-	}
-	
-	/**
-	 * Creates a new PoolOptions object from the given string vector.
-	 * This vector contains information that's written to by toVector().
-	 *
-	 * For example:
-	 * @code
-	 *   PoolOptions options(...);
-	 *   vector<string> vec;
-	 *
-	 *   vec.push_back("my");
-	 *   vec.push_back("data");
-	 *   options.toVector(vec);  // PoolOptions information will start at index 2.
-	 *
-	 *   PoolOptions copy(vec, 2);
-	 * @endcode
-	 *
-	 * @param vec The vector containing spawn options information.
-	 * @param startIndex The index in vec at which the information starts.
-	 * @param analyticsLogger If given, and the vector contains logging information,
-	 *                        then the 'log' member will be constructed using this logger.
-	 */
-	PoolOptions(const vector<string> &vec, unsigned int startIndex = 0,
-	            AnalyticsLoggerPtr analyticsLogger = AnalyticsLoggerPtr()
-	) {
-		int offset = 1;
-		bool hasEnvVars;
-		
-		appRoot          = vec[startIndex + offset];                 offset += 2;
-		appGroupName     = vec[startIndex + offset];                 offset += 2;
-		appType          = vec[startIndex + offset];                 offset += 2;
-		environment      = vec[startIndex + offset];                 offset += 2;
-		spawnMethod      = vec[startIndex + offset];                 offset += 2;
-		user             = vec[startIndex + offset];                 offset += 2;
-		group            = vec[startIndex + offset];                 offset += 2;
-		defaultUser      = vec[startIndex + offset];                 offset += 2;
-		defaultGroup     = vec[startIndex + offset];                 offset += 2;
-		frameworkSpawnerTimeout = atol(vec[startIndex + offset]);    offset += 2;
-		appSpawnerTimeout       = atol(vec[startIndex + offset]);    offset += 2;
-		baseURI          = vec[startIndex + offset];                 offset += 2;
-		maxRequests      = atol(vec[startIndex + offset]);           offset += 2;
-		minProcesses     = atol(vec[startIndex + offset]);           offset += 2;
-		useGlobalQueue   = vec[startIndex + offset] == "true";       offset += 2;
-		showVersionInHeader = vec[startIndex + offset] == "true";    offset += 2;
-		statThrottleRate = atol(vec[startIndex + offset]);           offset += 2;
-		restartDir       = vec[startIndex + offset];                 offset += 2;
-		rights           = (Account::Rights) atol(vec[startIndex + offset]);
-		                                                             offset += 2;
-		debugger         = vec[startIndex + offset] == "true";       offset += 2;
-		analytics        = vec[startIndex + offset] == "true";       offset += 2;
-		if (vec[startIndex + offset - 1] == "analytics_log_txn_id") {
-			if (analyticsLogger != NULL) {
-				string txnId     = vec[startIndex + offset];
-				string groupName = vec[startIndex + offset + 2];
-				string category  = vec[startIndex + offset + 4];
-				string unionStationKey = vec[startIndex + offset + 6];
-				log = analyticsLogger->continueTransaction(txnId,
-					groupName, category, unionStationKey);
-			}
-			offset += 8;
-		}
-		initiateSession  = vec[startIndex + offset] == "true";       offset += 2;
-		printExceptions  = vec[startIndex + offset] == "true";       offset += 2;
-		hasEnvVars       = vec[startIndex + offset] == "true";       offset += 2;
-		if (hasEnvVars) {
-			environmentVariables = ptr(new SimpleStringListCreator(vec[startIndex + offset]));
-		}
-		offset += 2;
-		
-		/*********************************/
-	}
-	
-	/**
-	 * Append the information in this PoolOptions object to the given
-	 * string vector. The resulting array could, for example, be used
-	 * as a message to be sent to the spawn server.
-	 *
-	 * @param vec The vector to store the information in.
-	 * @param storeEnvVars Whether to store environment variable information into vec as well.
-	 * @throws Anything thrown by environmentVariables->getItems().
-	 */
-	void toVector(vector<string> &vec, bool storeEnvVars = true) const {
-		if (vec.capacity() < vec.size() + 40) {
-			vec.reserve(vec.size() + 40);
-		}
-		appendKeyValue (vec, "app_root",           appRoot);
-		appendKeyValue (vec, "app_group_name",     getAppGroupName());
-		appendKeyValue (vec, "app_type",           appType);
-		appendKeyValue (vec, "environment",        environment);
-		appendKeyValue (vec, "spawn_method",       spawnMethod);
-		appendKeyValue (vec, "user",               user);
-		appendKeyValue (vec, "group",              group);
-		appendKeyValue (vec, "default_user",       defaultUser);
-		appendKeyValue (vec, "default_group",      defaultGroup);
-		appendKeyValue2(vec, "framework_spawner_timeout", frameworkSpawnerTimeout);
-		appendKeyValue2(vec, "app_spawner_timeout",       appSpawnerTimeout);
-		appendKeyValue (vec, "base_uri",           baseURI);
-		appendKeyValue3(vec, "max_requests",       maxRequests);
-		appendKeyValue3(vec, "min_processes",      minProcesses);
-		appendKeyValue4(vec, "use_global_queue",   useGlobalQueue);
-		appendKeyValue4(vec, "show_version_in_header", showVersionInHeader);
-		appendKeyValue3(vec, "stat_throttle_rate", statThrottleRate);
-		appendKeyValue (vec, "restart_dir",        restartDir);
-		appendKeyValue3(vec, "rights",             rights);
-		appendKeyValue4(vec, "debugger",           debugger);
-		appendKeyValue4(vec, "analytics",          analytics);
-		if (log) {
-			appendKeyValue(vec, "analytics_log_txn_id", log->getTxnId());
-			appendKeyValue(vec, "analytics_log_group_name", log->getGroupName());
-			appendKeyValue(vec, "analytics_log_category", log->getCategory());
-			appendKeyValue(vec, "union_station_key", log->getUnionStationKey());
-		}
-		appendKeyValue4(vec, "initiate_session",   initiateSession);
-		appendKeyValue4(vec, "print_exceptions",   printExceptions);
-		if (storeEnvVars) {
-			appendKeyValue(vec, "has_environment_variables", "true");
-			appendKeyValue(vec, "environment_variables", serializeEnvironmentVariables());
-		} else {
-			appendKeyValue(vec, "has_environment_variables", "false");
-			appendKeyValue(vec, "environment_variables", "");
-		}
-		
-		/*********************************/
-	}
-	
-	PoolOptions own() const {
-		PoolOptions copy = *this;
-		if (copy.environmentVariables != NULL) {
-			copy.environmentVariables->getItems(); // Prefetch items now while we still can.
-		}
-		copy.log.reset();
-		return copy;
-	}
-	
-	/**
-	 * Returns the app group name. If there is no explicitly set app group name
-	 * then the app root is considered to be the app group name.
-	 */
-	string getAppGroupName() const {
-		if (appGroupName.empty()) {
-			return appRoot;
-		} else {
-			return appGroupName;
-		}
-	}
-	
-	/**
-	 * Serializes the items in environmentVariables into a string, which
-	 * can be used to create a SimpleStringListCreator object.
-	 *
-	 * @throws Anything thrown by environmentVariables->getItems().
-	 */
-	string serializeEnvironmentVariables() const {
-		vector<string>::const_iterator it, end;
-		string result;
-		
-		if (environmentVariables) {
-			result.reserve(1024);
-			
-			StringListPtr items = environmentVariables->getItems();
-			end = items->end();
-			
-			for (it = items->begin(); it != end; it++) {
-				result.append(*it);
-				result.append(1, '\0');
-				it++;
-				result.append(*it);
-				result.append(1, '\0');
-			}
-		}
-		return Base64::encode(result);
-	}
-
-private:
-	static inline void
-	appendKeyValue(vector<string> &vec, const char *key, const string &value) {
-		vec.push_back(key);
-		vec.push_back(const_cast<string &>(value));
-	}
-	
-	static inline void
-	appendKeyValue(vector<string> &vec, const char *key, const char *value) {
-		vec.push_back(key);
-		vec.push_back(value);
-	}
-	
-	static inline void
-	appendKeyValue2(vector<string> &vec, const char *key, long value) {
-		vec.push_back(key);
-		vec.push_back(toString(value));
-	}
-	
-	static inline void
-	appendKeyValue3(vector<string> &vec, const char *key, unsigned long value) {
-		vec.push_back(key);
-		vec.push_back(toString(value));
-	}
-	
-	static inline void
-	appendKeyValue4(vector<string> &vec, const char *key, bool value) {
-		vec.push_back(key);
-		vec.push_back(value ? "true" : "false");
-	}
-};
-
-} // namespace Passenger
-
-#endif /* _PASSENGER_SPAWN_OPTIONS_H_ */
-
diff --git a/ext/common/Process.h b/ext/common/Process.h
deleted file mode 100644
index eceb996..0000000
--- a/ext/common/Process.h
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_PROCESS_H_
-#define _PASSENGER_PROCESS_H_
-
-#include <boost/shared_ptr.hpp>
-#include <boost/function.hpp>
-#include <oxt/system_calls.hpp>
-#include <oxt/backtrace.hpp>
-#include <string>
-#include <map>
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include <Session.h>
-#include <Exceptions.h>
-#include <Logging.h>
-#include <Utils.h>
-#include <Utils/IOUtils.h>
-
-namespace Passenger {
-
-using namespace std;
-using namespace boost;
-
-/**
- * Represents a single application process, as spawned by SpawnManager
- * or by ApplicationPool::Interface::get().
- *
- * @ingroup Support
- */
-class Process {
-public:
-	struct SocketInfo {
-		string address;
-		string type;
-		
-		SocketInfo() {}
-		
-		SocketInfo(const string &address, const string &type) {
-			this->address = address;
-			this->type    = type;
-		}
-	};
-	
-	typedef map<string, SocketInfo> SocketInfoMap;
-	
-private:
-	string appRoot;
-	pid_t pid;
-	int ownerPipe;
-	string detachKey;
-	string connectPassword;
-	string gupid;
-	SocketInfoMap serverSockets;
-	SocketInfo *mainServerSocket;
-	function<void ()> destructionCallback;
-	
-public:
-	/**
-	 * Construct a new Process object.
-	 *
-	 * @param appRoot The application root of an application.
-	 *             This must be a valid directory, but the path does not have to be absolute.
-	 * @param pid The process ID of this application process.
-	 * @param ownerPipe The owner pipe of this application process.
-	 * @param serverSockets All the server sockets that this process listens on.
-	 *                      There must a server socket with the name 'main'.
-	 * @param detachKey A detach key. Used by the ApplicationPool algorithm.
-	 * @param connectPassword The password to use when connecting to this process.
-	 *                        Must be valid ASCII.
-	 * @param gupid A string which uniquely identifies this process.
-	 * @param destructionCallback A callback to be called when this Process is destroyed.
-	 * @throws ArgumentException If serverSockets has no socket named 'main'.
-	 */
-	Process(const string &appRoot, pid_t pid, int ownerPipe, const SocketInfoMap &serverSockets,
-	        const string &detachKey, const string &connectPassword, const string &gupid,
-	        const function<void ()> &destructionCallback = function<void ()>())
-	{
-		this->appRoot         = appRoot;
-		this->pid             = pid;
-		this->ownerPipe       = ownerPipe;
-		this->serverSockets   = serverSockets;
-		this->detachKey       = detachKey;
-		this->connectPassword = connectPassword;
-		this->gupid           = gupid;
-		this->destructionCallback = destructionCallback;
-		if (serverSockets.find("main") == serverSockets.end()) {
-			TRACE_POINT();
-			throw ArgumentException("There must be a server socket named 'main'.");
-		}
-		mainServerSocket = &this->serverSockets["main"];
-		P_TRACE(3, "Application process " << pid << " (" << this << "): created.");
-	}
-	
-	virtual ~Process() {
-		TRACE_POINT();
-		SocketInfoMap::const_iterator it;
-		int ret;
-		
-		if (ownerPipe != -1) {
-			safelyClose(ownerPipe, true);
-		}
-		for (it = serverSockets.begin(); it != serverSockets.end(); it++) {
-			const SocketInfo &info = it->second;
-			if (info.type == "unix") {
-				do {
-					ret = unlink(info.address.c_str());
-				} while (ret == -1 && errno == EINTR);
-			}
-		}
-		P_TRACE(3, "Application process " << pid << " (" << this << "): destroyed.");
-		
-		if (destructionCallback) {
-			destructionCallback();
-		}
-	}
-	
-	/**
-	 * Returns the application root for this application process. See
-	 * the constructor for information about the application root.
-	 */
-	string getAppRoot() const {
-		return appRoot;
-	}
-	
-	/**
-	 * Returns the process ID of this application process.
-	 */
-	pid_t getPid() const {
-		return pid;
-	}
-	
-	/**
-	 * Returns this process's detach key.
-	 */
-	string getDetachKey() const {
-		return detachKey;
-	}
-	
-	/**
-	 * Returns this process's connect password. This password is
-	 * guaranteed to be valid ASCII.
-	 */
-	string getConnectPassword() const {
-		return connectPassword;
-	}
-	
-	/**
-	 * Returns this process's gupid. This is like a PID, but does not rotate
-	 * and is even unique over multiple servers.
-	 */
-	string getGupid() const {
-		return gupid;
-	}
-	
-	/**
-	 * Returns a map containing all server sockets that this process
-	 * listens on.
-	 */
-	const SocketInfoMap *getServerSockets() const {
-		return &serverSockets;
-	}
-	
-	/**
-	 * Request a new session from this application process by connecting to its
-	 * main server socket. This session represents the life time of a single
-	 * request/response pair, and can be used to send the request data to the
-	 * application process, as well as receiving the response data.
-	 *
-	 * The use of connect() is demonstrated in the following example.
-	 * @code
-	 *   // Request a new session from the process.
-	 *   SessionPtr session = process->newSession(...);
-	 *   
-	 *   // Send the request headers and request body data.
-	 *   session->sendHeaders(...);
-	 *   session->sendBodyBlock(...);
-	 *   // Done sending data, so we close the writer channel.
-	 *   session->shutdownWriter();
-	 *
-	 *   // Now read the HTTP response.
-	 *   string responseData = readAllDataFromSocket(session->getReader());
-	 *   // Done reading data, so we close the reader channel.
-	 *   session->shutdownReader();
-	 *
-	 *   // This session has now finished, so we close the session by resetting
-	 *   // the smart pointer to NULL (thereby destroying the Session object).
-	 *   session.reset();
-	 *
-	 *   // We can connect to a Process multiple times. Just make sure
-	 *   // the previous session is closed.
-	 *   session = process->newSession(...);
-	 * @endcode
-	 *
-	 * You <b>must</b> close a session when you no longer need it. If you
-	 * call connect() without having properly closed a previous session,
-	 * you might cause a deadlock because the application process may be
-	 * waiting for you to close the previous session.
-	 *
-	 * @param closeCallback A function which will be called when the session has been closed.
-	 * @param initiateNow Whether the session should be initiated immediately.
-	 *                    If set to false then you must call <tt>initiate()</tt> on
-	 *                    the session before it's usable.
-	 * @return A smart pointer to a Session object, which represents the created session.
-	 * @post result->initiated() == initiateNow
-	 * @throws SystemException Something went wrong during session initiation.
-	 * @throws IOException Something went wrong during session initiation.
-	 * @throws boost::thread_interrupted
-	 */
-	SessionPtr newSession(const StandardSession::CloseCallback &closeCallback = StandardSession::CloseCallback(),
-	                      bool initiateNow = true)
-	{
-		SessionPtr session(new StandardSession(pid, closeCallback,
-			mainServerSocket->type, mainServerSocket->address,
-			detachKey, connectPassword, gupid));
-		if (initiateNow) {
-			session->initiate();
-		}
-		return session;
-	}
-};
-
-/** Convenient alias for Process smart pointer. */
-typedef shared_ptr<Process> ProcessPtr;
-
-} // namespace Passenger
-
-#endif /* _PASSENGER_PROCESS_H_ */
diff --git a/ext/common/RandomGenerator.h b/ext/common/RandomGenerator.h
index 4a72a5e..34eeb2b 100644
--- a/ext/common/RandomGenerator.h
+++ b/ext/common/RandomGenerator.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/ext/common/ResourceLocator.h b/ext/common/ResourceLocator.h
index ae75261..054510d 100644
--- a/ext/common/ResourceLocator.h
+++ b/ext/common/ResourceLocator.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010, 2011, 2012 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -25,76 +25,69 @@
 #ifndef _PASSENGER_RESOURCE_LOCATOR_H_
 #define _PASSENGER_RESOURCE_LOCATOR_H_
 
+#include <boost/shared_ptr.hpp>
 #include <string>
-#include <IniFile.h>
 #include <Exceptions.h>
 #include <Utils.h>
+#include <Utils/IniFile.h>
 
 namespace Passenger {
 
+using namespace std;
 using namespace boost;
 
 
 /**
- * Locates various Phusion Passenger resources on the filesystem.
+ * Locates various Phusion Passenger resources on the filesystem. All Phusion Passenger
+ * files are located through this class. There's similar code in lib/phusion_passenger.rb.
+ * See doc/Packaging.txt.md for an introduction about where Phusion Passenger expects its
+ * files to be located.
  */
 class ResourceLocator {
 private:
+	string root;
+	string binDir;
 	string agentsDir;
 	string helperScriptsDir;
 	string resourcesDir;
 	string docDir;
 	string rubyLibDir;
-	string compilableSourceDir;
-	string apache2Module;
 	
-	string getOption(const string &file, const IniFileSectionPtr &section, const string &key) const {
+	static string getOption(const string &file, const IniFileSectionPtr &section, const string &key) {
 		if (section->hasKey(key)) {
 			return section->get(key);
 		} else {
-			throw RuntimeException("Option '" + key + "' missing in file " + file);
+			throw RuntimeException("Option '" + key + "' missing in file '" + file + "'");
 		}
 	}
 	
 public:
 	ResourceLocator(const string &rootOrFile) {
-		FileType rootOrFileType = getFileType(rootOrFile);
-		if (rootOrFileType == FT_DIRECTORY || rootOrFileType == FT_NONEXISTANT) {
-			string root = rootOrFile;
-			bool nativelyPackaged = !fileExists(root + "/Rakefile") ||
-				!fileExists(root + "/DEVELOPERS.TXT");
-			
-			if (nativelyPackaged) {
-				agentsDir           = "/usr/lib/phusion-passenger/agents";
-				helperScriptsDir    = "/usr/share/phusion-passenger/helper-scripts";
-				resourcesDir        = "/usr/share/phusion-passenger";
-				docDir              = "/usr/share/doc/phusion-passenger";
-				rubyLibDir          = "";
-				compilableSourceDir = "/usr/share/phusion-passenger/compilable-source";
-				apache2Module       = "/usr/lib/apache2/modules/mod_passenger.so";
-			} else {
-				agentsDir           = root + "/agents";
-				helperScriptsDir    = root + "/helper-scripts";
-				resourcesDir        = root + "/resources";
-				docDir              = root + "/doc";
-				rubyLibDir          = root + "/lib";
-				compilableSourceDir = root;
-				apache2Module       = root + "ext/apache2/mod_passenger.so";
-			}
-			
-		} else {
+		root = rootOrFile;
+		if (getFileType(rootOrFile) == FT_REGULAR) {
 			string file = rootOrFile;
 			IniFileSectionPtr options = IniFile(file).section("locations");
+			binDir              = getOption(file, options, "bin");
 			agentsDir           = getOption(file, options, "agents");
 			helperScriptsDir    = getOption(file, options, "helper_scripts");
 			resourcesDir        = getOption(file, options, "resources");
 			docDir              = getOption(file, options, "doc");
-			rubyLibDir          = getOption(file, options, "rubylib");
-			compilableSourceDir = getOption(file, options, "compilable_source");
-			apache2Module       = getOption(file, options, "apache2_module");
+			rubyLibDir          = getOption(file, options, "rubylibdir");
+		} else {
+			string root = rootOrFile;
+			binDir              = root + "/bin";
+			agentsDir           = root + "/buildout/agents";
+			helperScriptsDir    = root + "/helper-scripts";
+			resourcesDir        = root + "/resources";
+			docDir              = root + "/doc";
+			rubyLibDir          = root + "/lib";
 		}
 	}
 	
+	string getRoot() const {
+		return root;
+	}
+	
 	string getAgentsDir() const {
 		return agentsDir;
 	}
@@ -103,10 +96,6 @@ public:
 		return helperScriptsDir;
 	}
 	
-	string getSpawnServerFilename() const {
-		return getHelperScriptsDir() + "/passenger-spawn-server";
-	}
-	
 	string getResourcesDir() const {
 		return resourcesDir;
 	}
@@ -119,16 +108,10 @@ public:
 	string getRubyLibDir() const {
 		return rubyLibDir;
 	}
-	
-	string getCompilableSourceDir() const {
-		return compilableSourceDir;
-	}
-	
-	string getApache2ModuleFilename() const {
-		return apache2Module;
-	}
 };
 
+typedef shared_ptr<ResourceLocator> ResourceLocatorPtr;
+
 
 }
 
diff --git a/ext/common/SafeLibev.h b/ext/common/SafeLibev.h
index 4a630ac..19efb33 100644
--- a/ext/common/SafeLibev.h
+++ b/ext/common/SafeLibev.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010, 2011, 2012 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -27,7 +27,11 @@
 
 #include <ev++.h>
 #include <vector>
+#include <list>
+#include <memory>
+#include <climits>
 #include <boost/thread.hpp>
+#include <boost/shared_ptr.hpp>
 #include <boost/function.hpp>
 #include <boost/bind.hpp>
 
@@ -43,25 +47,45 @@ using namespace boost;
 class SafeLibev {
 private:
 	typedef function<void ()> Callback;
-	
+
+	struct Command {
+		int id;
+		Callback callback;
+
+		Command(unsigned int _id, const Callback &_callback)
+			: id(_id),
+			  callback(_callback)
+			{ }
+	};
+
 	struct ev_loop *loop;
 	pthread_t loopThread;
 	ev_async async;
 	
 	boost::mutex syncher;
 	condition_variable cond;
-	vector<Callback> commands;
+	vector<Command> commands;
+	unsigned int nextCommandId;
 	
 	static void asyncHandler(EV_P_ ev_async *w, int revents) {
 		SafeLibev *self = (SafeLibev *) w->data;
-		unique_lock<boost::mutex> l(self->syncher);
-		vector<Callback> commands = self->commands;
-		self->commands.clear();
+		self->runCommands();
+	}
+
+	static void timeoutHandler(int revents, void *arg) {
+		auto_ptr<Callback> callback((Callback *) arg);
+		(*callback)();
+	}
+
+	void runCommands() {
+		unique_lock<boost::mutex> l(syncher);
+		vector<Command> commands = this->commands;
+		this->commands.clear();
 		l.unlock();
 		
-		vector<Callback>::const_iterator it, end = commands.end();
-		for (it = commands.begin(); it != commands.end(); it++) {
-			(*it)();
+		vector<Command>::const_iterator it, end = commands.end();
+		for (it = commands.begin(); it != end; it++) {
+			it->callback();
 		}
 	}
 	
@@ -82,16 +106,40 @@ private:
 		cond.notify_all();
 	}
 	
+	void runAndNotify(const Callback *callback, bool *done) {
+		(*callback)();
+		unique_lock<boost::mutex> l(syncher);
+		*done = true;
+		cond.notify_all();
+	}
+
+	void incNextCommandId() {
+		if (nextCommandId == INT_MAX) {
+			nextCommandId = 0;
+		} else {
+			nextCommandId++;
+		}
+	}
+	
 public:
+	/** SafeLibev takes over ownership of the loop object. */
 	SafeLibev(struct ev_loop *loop) {
 		this->loop = loop;
 		loopThread = pthread_self();
+		nextCommandId = 0;
+		
 		ev_async_init(&async, asyncHandler);
+		ev_set_priority(&async, EV_MAXPRI);
 		async.data = this;
 		ev_async_start(loop, &async);
 	}
 	
 	~SafeLibev() {
+		destroy();
+		ev_loop_destroy(loop);
+	}
+
+	void destroy() {
 		ev_async_stop(loop, &async);
 	}
 	
@@ -99,6 +147,14 @@ public:
 		return loop;
 	}
 	
+	void setCurrentThread() {
+		loopThread = pthread_self();
+	}
+
+	pthread_t getCurrentThread() const {
+		return loopThread;
+	}
+	
 	template<typename Watcher>
 	void start(Watcher &watcher) {
 		if (pthread_equal(pthread_self(), loopThread)) {
@@ -107,8 +163,10 @@ public:
 		} else {
 			unique_lock<boost::mutex> l(syncher);
 			bool done = false;
-			commands.push_back(boost::bind(&SafeLibev::startWatcherAndNotify<Watcher>,
-				this, &watcher, &done));
+			commands.push_back(Command(nextCommandId,
+				boost::bind(&SafeLibev::startWatcherAndNotify<Watcher>,
+					this, &watcher, &done)));
+			incNextCommandId();
 			ev_async_send(loop, &async);
 			while (!done) {
 				cond.wait(l);
@@ -123,8 +181,10 @@ public:
 		} else {
 			unique_lock<boost::mutex> l(syncher);
 			bool done = false;
-			commands.push_back(boost::bind(&SafeLibev::stopWatcherAndNotify<Watcher>,
-				this, &watcher, &done));
+			commands.push_back(Command(nextCommandId,
+				boost::bind(&SafeLibev::stopWatcherAndNotify<Watcher>,
+					this, &watcher, &done)));
+			incNextCommandId();
 			ev_async_send(loop, &async);
 			while (!done) {
 				cond.wait(l);
@@ -133,16 +193,81 @@ public:
 	}
 	
 	void run(const Callback &callback) {
+		assert(callback != NULL);
 		if (pthread_equal(pthread_self(), loopThread)) {
 			callback();
 		} else {
+			runSync(callback);
+		}
+	}
+
+	void runSync(const Callback &callback) {
+		assert(callback != NULL);
+		unique_lock<boost::mutex> l(syncher);
+		bool done = false;
+		commands.push_back(Command(nextCommandId,
+			boost::bind(&SafeLibev::runAndNotify, this,
+				&callback, &done)));
+		incNextCommandId();
+		ev_async_send(loop, &async);
+		while (!done) {
+			cond.wait(l);
+		}
+	}
+
+	/** Run a callback after a certain timeout. */
+	void runAfter(unsigned int timeout, const Callback &callback) {
+		assert(callback != NULL);
+		ev_once(loop, -1, 0, timeout / 1000.0, timeoutHandler, new Callback(callback));
+	}
+
+	/** Thread-safe version of runAfter(). */
+	void runAfterTS(unsigned int timeout, const Callback &callback) {
+		assert(callback != NULL);
+		if (pthread_equal(pthread_self(), loopThread)) {
+			runAfter(timeout, callback);
+		} else {
+			runLater(boost::bind(&SafeLibev::runAfter, this, timeout, callback));
+		}
+	}
+
+	unsigned int runLater(const Callback &callback) {
+		assert(callback != NULL);
+		unsigned int result;
+		{
 			unique_lock<boost::mutex> l(syncher);
-			commands.push_back(callback);
-			ev_async_send(loop, &async);
+			commands.push_back(Command(nextCommandId, callback));
+			result = nextCommandId;
+			incNextCommandId();
 		}
+		ev_async_send(loop, &async);
+		return result;
+	}
+
+	/**
+	 * Cancels a callback that was scheduled to be run by runLater().
+	 * Returns whether the command has been successfully cancelled or not.
+	 * That is, a return value of true guarantees that the callback will not be called
+	 * in the future, while a return value of false means that the callback has already
+	 * been called or is currently being called.
+	 */
+	bool cancelCommand(int id) {
+		unique_lock<boost::mutex> l(syncher);
+		// TODO: we can do a binary search because the command ID
+		// is monotically increasing except on overflow.
+		vector<Command>::iterator it, end = commands.end();
+		for (it = commands.begin(); it != end; it++) {
+			if (it->id == id) {
+				commands.erase(it);
+				return true;
+			}
+		}
+		return false;
 	}
 };
 
+typedef shared_ptr<SafeLibev> SafeLibevPtr;
+
 
 } // namespace Passenger
 
diff --git a/ext/common/ServerInstanceDir.h b/ext/common/ServerInstanceDir.h
index 64a17a8..1c63cd2 100644
--- a/ext/common/ServerInstanceDir.h
+++ b/ext/common/ServerInstanceDir.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -30,6 +30,7 @@
 #include <oxt/backtrace.hpp>
 
 #include <sys/types.h>
+#include <sys/stat.h>
 #include <dirent.h>
 #include <unistd.h>
 #include <pwd.h>
@@ -38,23 +39,28 @@
 #include <cstring>
 #include <string>
 
-#include "Exceptions.h"
-#include "Utils.h"
-#include "Utils/StrIntUtils.h"
+#include <Constants.h>
+#include <Logging.h>
+#include <Exceptions.h>
+#include <Utils.h>
+#include <Utils/StrIntUtils.h>
 
 namespace Passenger {
 
 using namespace std;
 using namespace boost;
 
+/* TODO: I think we should move away from generation dirs in the future.
+ * That way we can become immune to existing-directory-in-tmp denial of
+ * service attacks. To achieve the same functionality as we do now, each
+ * server instance directory is tagged with the control process's PID
+ * and a creation timestamp. passenger-status should treat the server instance
+ * directory with the most recent creation timestamp as the one to query.
+ * For now, the current code does not lead to an exploit.
+ */
+
 class ServerInstanceDir: public noncopyable {
 public:
-	// Don't forget to update lib/phusion_passenger/admin_tools/server_instance.rb too.
-	static const int DIR_STRUCTURE_MAJOR_VERSION = 1;
-	static const int DIR_STRUCTURE_MINOR_VERSION = 0;
-	static const int GENERATION_STRUCTURE_MAJOR_VERSION = 1;
-	static const int GENERATION_STRUCTURE_MINOR_VERSION = 0;
-	
 	class Generation: public noncopyable {
 	private:
 		friend class ServerInstanceDir;
@@ -97,13 +103,13 @@ public:
 			 * anybody except the owner. The individual files and subdirectories
 			 * decide for themselves whether they're readable by anybody.
 			 */
-			makeDirTree(path, "u=rwxs,g=x,o=x");
+			makeDirTree(path, "u=rwx,g=x,o=x");
 			
 			/* Write structure version file. */
 			string structureVersionFile = path + "/structure_version.txt";
 			createFile(structureVersionFile,
-				toString(GENERATION_STRUCTURE_MAJOR_VERSION) + "." +
-				toString(GENERATION_STRUCTURE_MINOR_VERSION),
+				toString(SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION) + "." +
+				toString(SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION),
 				S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 			
 			
@@ -112,10 +118,10 @@ public:
 			 * directory.
 			 */
 			if (runningAsRoot) {
-				makeDirTree(path + "/buffered_uploads", "u=rwxs,g=,o=",
+				makeDirTree(path + "/buffered_uploads", "u=rwx,g=,o=",
 					webServerWorkerUid, webServerWorkerGid);
 			} else {
-				makeDirTree(path + "/buffered_uploads", "u=rwxs,g=,o=");
+				makeDirTree(path + "/buffered_uploads", "u=rwx,g=,o=");
 			}
 			
 			/* The web server must be able to directly connect to a backend. */
@@ -126,7 +132,7 @@ public:
 					 * However we don't want everybody to be able to know the
 					 * sockets' filenames, so the directory is not readable.
 					 */
-					makeDirTree(path + "/backends", "u=rwxs,g=wx,o=wx");
+					makeDirTree(path + "/backends", "u=rwx,g=wx,o=wx,+t");
 				} else {
 					/* All backend processes are running as defaultUser/defaultGroup,
 					 * so make defaultUser/defaultGroup the owner and group of the
@@ -136,13 +142,13 @@ public:
 					 * nobody should be able to know the sockets' filenames without
 					 * having access to the application pool.
 					 */
-					makeDirTree(path + "/backends", "u=rwxs,g=x,o=x", defaultUid, defaultGid);
+					makeDirTree(path + "/backends", "u=rwx,g=x,o=x", defaultUid, defaultGid);
 				}
 			} else {
 				/* All backend processes are running as the same user as the web server,
 				 * so only allow access for this user.
 				 */
-				makeDirTree(path + "/backends", "u=rwxs,g=,o=");
+				makeDirTree(path + "/backends", "u=rwx,g=,o=");
 			}
 			
 			/* The helper server (containing the application pool) must be able to access
@@ -153,16 +159,16 @@ public:
 					/* Both the helper server and the spawn server are
 					 * running as root.
 					 */
-					makeDirTree(path + "/spawn-server", "u=rwxs,g=,o=");
+					makeDirTree(path + "/spawn-server", "u=rwx,g=,o=");
 				} else {
 					/* Both the helper server and the spawn server are
 					 * running as defaultUser/defaultGroup.
 					 */
-					makeDirTree(path + "/spawn-server", "u=rwxs,g=,o=",
+					makeDirTree(path + "/spawn-server", "u=rwx,g=,o=",
 						defaultUid, defaultGid);
 				}
 			} else {
-				makeDirTree(path + "/spawn-server", "u=rwxs,g=,o=");
+				makeDirTree(path + "/spawn-server", "u=rwx,g=,o=");
 			}
 			
 			owner = true;
@@ -179,7 +185,9 @@ public:
 			return number;
 		}
 		
-		string getPath() const {
+		// The 'const strng &' here is on purpose. The AgentsStarter C
+		// functions return the string pointer directly.
+		const string &getPath() const {
 			return path;
 		}
 		
@@ -217,7 +225,69 @@ private:
 		 * rights though, because we want admin tools to be able to list the available
 		 * generations no matter what user they're running as.
 		 */
-		makeDirTree(path, "u=rwxs,g=rx,o=rx");
+		if (owner) {
+			switch (getFileType(path)) {
+			case FT_NONEXISTANT:
+				createDirectory(path);
+				break;
+			case FT_DIRECTORY:
+				verifyDirectoryPermissions(path);
+				break;
+			default:
+				throw RuntimeException("'" + path + "' already exists, and is not a directory");
+			}
+		} else if (getFileType(path) != FT_DIRECTORY) {
+			throw RuntimeException("Server instance directory '" + path +
+				"' does not exist");
+		}
+	}
+
+	void createDirectory(const string &path) const {
+		// We do not use makeDirTree() here. If an attacker creates a directory
+		// just before we do, then we want to abort because we want the directory
+		// to have specific permissions.
+		if (mkdir(path.c_str(), parseModeString("u=rwx,g=rx,o=rx")) == -1) {
+			int e = errno;
+			throw FileSystemException("Cannot create server instance directory '" +
+				path + "'", e, path);
+		}
+		// verifyDirectoryPermissions() checks for the owner/group so we must make
+		// sure the server instance directory has that owner/group, even when the
+		// parent directory has setgid on.
+		if (chown(path.c_str(), geteuid(), getegid()) == -1) {
+			int e = errno;
+			throw FileSystemException("Cannot change the permissions of the server "
+				"instance directory '" + path + "'", e, path);
+		}
+	}
+
+	/**
+	 * When reusing an existing server instance directory, check permissions
+	 * so that an attacker cannot pre-create a directory with too liberal
+	 * permissions.
+	 */
+	void verifyDirectoryPermissions(const string &path) {
+		TRACE_POINT();
+		struct stat buf;
+
+		if (stat(path.c_str(), &buf) == -1) {
+			int e = errno;
+			throw FileSystemException("Cannot stat() " + path, e, path);
+		} else if (buf.st_mode != (S_IFDIR | parseModeString("u=rwx,g=rx,o=rx"))) {
+			throw RuntimeException("Tried to reuse existing server instance directory " +
+				path + ", but it has wrong permissions");
+		} else if (buf.st_uid != geteuid() || buf.st_gid != getegid()) {
+			/* The server instance directory is always created by the Watchdog. Its UID/GID never
+			 * changes because:
+			 * 1. Disabling user switching only lowers the privilege of the HelperAgent.
+			 * 2. For the UID/GID to change, the web server must be completely restarted
+			 *    (not just graceful reload) so that the control process can change its UID/GID.
+			 *    This causes the PID to change, so that an entirely new server instance
+			 *    directory is created.
+			 */
+			throw RuntimeException("Tried to reuse existing server instance directory " +
+				path + ", but it has wrong owner and group");
+		}
 	}
 	
 	bool isDirectory(const string &dir, struct dirent *entry) const {
@@ -236,28 +306,6 @@ private:
 	}
 	
 public:
-	ServerInstanceDir(pid_t webServerPid, const string &parentDir = "", bool owner = true) {
-		string theParentDir;
-		
-		if (parentDir.empty()) {
-			theParentDir = getSystemTempDir();
-		} else {
-			theParentDir = parentDir;
-		}
-		
-		/* We embed the super structure version in the server instance directory name
-		 * because it's possible to upgrade Phusion Passenger without changing the
-		 * web server's PID. This way each incompatible upgrade will use its own
-		 * server instance directory.
-		 */
-		initialize(theParentDir + "/passenger." +
-			toString(DIR_STRUCTURE_MAJOR_VERSION) + "." +
-			toString(DIR_STRUCTURE_MINOR_VERSION) + "." +
-			toString<unsigned long long>(webServerPid),
-			owner);
-		
-	}
-	
 	ServerInstanceDir(const string &path, bool owner = true) {
 		initialize(path, owner);
 	}
@@ -280,7 +328,9 @@ public:
 		}
 	}
 	
-	string getPath() const {
+	// The 'const strng &' here is on purpose. The AgentsStarter C
+	// functions return the string pointer directly.
+	const string &getPath() const {
 		return path;
 	}
 	
@@ -307,6 +357,8 @@ public:
 	}
 	
 	GenerationPtr getGeneration(unsigned int number) const {
+		// Must not used make_shared() here because Watchdog.cpp
+		// deletes the raw pointer in cleanupAgentsInBackground().
 		return ptr(new Generation(path, number));
 	}
 	
diff --git a/ext/common/Session.h b/ext/common/Session.h
deleted file mode 100644
index cb82070..0000000
--- a/ext/common/Session.h
+++ /dev/null
@@ -1,436 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_SESSION_H_
-#define _PASSENGER_SESSION_H_
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <unistd.h>
-#include <netdb.h>
-#include <cerrno>
-#include <cstring>
-
-#include <string>
-#include <vector>
-
-#include <boost/shared_ptr.hpp>
-#include <boost/function.hpp>
-#include <oxt/backtrace.hpp>
-#include <oxt/system_calls.hpp>
-
-#include <StaticString.h>
-#include <Exceptions.h>
-#include <Utils/StrIntUtils.h>
-#include <Utils/IOUtils.h>
-#include <Utils/MessageIO.h>
-
-namespace Passenger {
-
-using namespace boost;
-using namespace oxt;
-using namespace std;
-
-
-/**
- * Represents a single request/response pair of an application process.
- *
- * Session is used to forward a single HTTP request to an application
- * process, and to read back the HTTP response. A Session object is to
- * be used in the following manner:
- *
- *  -# Serialize the HTTP request headers into a format as expected by
- *     sendHeaders(), then send that string by calling sendHeaders().
- *  -# In case of a POST of PUT request, send the HTTP request body by
- *     calling sendBodyBlock(), possibly multiple times.
- *  -# Shutdown the writer end of the session channel (shutdownWriter())
- *     since you're now done sending data.
- *  -# The HTTP response can now be read through the session channel (getStream()).
- *  -# When the HTTP response has been read, the session must be closed.
- *     This is done by destroying the Session object.
- *
- * A usage example is shown in Process::newSession().
- *
- * Session is an abstract base class. Concrete implementations can be found in
- * StandardSession and ApplicationPool::Client::RemoteSession.
- *
- * Session is not guaranteed to be thread-safe.
- */
-class Session {
-protected:
-	string detachKey;
-	string connectPassword;
-	string gupid;
-	
-public:
-	/**
-	 * Concrete classes might throw arbitrary exceptions.
-	 */
-	virtual ~Session() {}
-	
-	/**
-	 * Initiate the session by connecting to the associated process.
-	 * A Session is not usable until it's initiated.
-	 *
-	 * @throws SystemException Something went wrong.
-	 * @throws IOException Something went wrong.
-	 * @throws boost::thread_interrupted
-	 */
-	virtual void initiate() = 0;
-	
-	/**
-	 * Returns whether this session has been initiated (that is, whether
-	 * initiate() had been called in the past).
-	 */
-	virtual bool initiated() const = 0;
-	
-	/**
-	 * Returns the type of the socket that this session is served from,
-	 * e.g. "unix" indicating a Unix socket.
-	 *
-	 * @post !result.empty()
-	 */
-	virtual string getSocketType() const = 0;
-	
-	/**
-	 * Returns the address of the socket that this session is served
-	 * from. This can be a Unix socket filename or a TCP host:port string
-	 * like "127.0.0.1:1234".
-	 *
-	 * @post !result.empty()
-	 */
-	virtual string getSocketName() const = 0;
-	
-	/**
-	 * Send HTTP request headers to the application. The HTTP headers must be
-	 * converted into CGI headers, and then encoded into a string that matches this grammar:
-	 *
-	   @verbatim
-	   headers ::= header*
-	   header ::= name NUL value NUL
-	   name ::= notnull+
-	   value ::= notnull+
-	   notnull ::= "\x01" | "\x02" | "\x02" | ... | "\xFF"
-	   NUL = "\x00"
-	   @endverbatim
-	 *
-	 * There must be a header with the name "PASSWORD_CONNECT_PASSWORD", and it must
-	 * have the same value as the string returned by getConnectPassword().
-	 *
-	 * This method should be the first one to be called during the lifetime of a Session
-	 * object, otherwise strange things may happen.
-	 *
-	 * @param headers The HTTP request headers, converted into CGI headers and encoded as
-	 *                a string, according to the description.
-	 * @param size The size, in bytes, of <tt>headers</tt>.
-	 * @pre headers != NULL
-	 * @pre initiated()
-	 * @throws IOException The I/O channel has already been closed or discarded.
-	 * @throws SystemException Something went wrong during writing.
-	 * @throws boost::thread_interrupted
-	 */
-	virtual void sendHeaders(const char *headers, unsigned int size) {
-		TRACE_POINT();
-		int stream = getStream();
-		if (stream == -1) {
-			throw IOException("Cannot write headers to the request handler "
-				"because the I/O stream has already been closed or discarded.");
-		}
-		try {
-			writeScalarMessage(stream, headers, size);
-		} catch (SystemException &e) {
-			e.setBriefMessage("An error occured while writing headers "
-				"to the request handler");
-			throw;
-		}
-	}
-	
-	/**
-	 * Convenience shortcut for sendHeaders(const char *, unsigned int)
-	 * @param headers The headers
-	 * @pre initiated()
-	 * @throws IOException The I/O channel has already been closed or discarded.
-	 * @throws SystemException Something went wrong during writing.
-	 * @throws boost::thread_interrupted
-	 */
-	virtual void sendHeaders(const StaticString &headers) {
-		sendHeaders(headers.c_str(), (unsigned int) headers.size());
-	}
-	
-	/**
-	 * Send a chunk of HTTP request body data to the application.
-	 * You can call this method as many times as is required to transfer
-	 * the entire HTTP request body.
-	 *
-	 * This method must only be called after a sendHeaders(), otherwise
-	 * strange things may happen.
-	 *
-	 * @param block A block of HTTP request body data to send.
-	 * @param size The size, in bytes, of <tt>block</tt>.
-	 * @pre initiated()
-	 * @throws IOException The I/O channel has already been closed or discarded.
-	 * @throws SystemException Something went wrong during writing.
-	 * @throws boost::thread_interrupted
-	 */
-	virtual void sendBodyBlock(const char *block, unsigned int size) {
-		TRACE_POINT();
-		int stream = getStream();
-		if (stream == -1) {
-			throw IOException("Cannot write request body block to the "
-				"request handler because the I/O channel has "
-				"already been closed or discarded.");
-		}
-		try {
-			writeExact(stream, block, size);
-		} catch (SystemException &e) {
-			e.setBriefMessage("An error occured while sending the "
-				"request body to the request handler");
-			throw;
-		}
-	}
-	
-	/**
-	 * Returns this session's channel's file descriptor. This stream is
-	 * full-duplex, and will be automatically closed upon Session's
-	 * destruction, unless discardStream() is called.
-	 *
-	 * @pre initiated()
-	 * @returns The file descriptor, or -1 if the I/O channel has already
-	 *          been closed or discarded.
-	 */
-	virtual int getStream() const = 0;
-	
-	/**
-	 * Indicate that we don't want to read data anymore from the I/O channel.
-	 * Calling this method after closeStream()/discardStream() is called will
-	 * have no effect.
-	 *
-	 * @pre initiated()
-	 * @throws SystemException Something went wrong.
-	 * @throws boost::thread_interrupted
-	 */
-	virtual void shutdownReader() = 0;
-	
-	/**
-	 * Indicate that we don't want to write data anymore to the I/O channel.
-	 * Calling this method after closeStream()/discardStream() is called will
-	 * have no effect.
-	 *
-	 * @pre initiated()
-	 * @throws SystemException Something went wrong.
-	 * @throws boost::thread_interrupted
-	 */
-	virtual void shutdownWriter() = 0;
-	
-	/**
-	 * Close the I/O stream.
-	 *
-	 * @throws SystemException Something went wrong.
-	 * @throws boost::thread_interrupted
-	 * @pre initiated()
-	 * @post getStream() == -1
-	 */
-	virtual void closeStream() = 0;
-	
-	/**
-	 * Discard the I/O channel's file descriptor, so that the destructor
-	 * won't automatically close it.
-	 *
-	 * @pre initiated()
-	 * @post getStream() == -1
-	 */
-	virtual void discardStream() = 0;
-	
-	/**
-	 * Get the process ID of the application process that this session
-	 * belongs to.
-	 */
-	virtual pid_t getPid() const = 0;
-	
-	const string getDetachKey() const {
-		return detachKey;
-	}
-	
-	/**
-	 * Returns this session's process's connect password. This password is
-	 * guaranteed to be valid ASCII.
-	 */
-	const string getConnectPassword() const {
-		return connectPassword;
-	}
-	
-	const string getGupid() const {
-		return gupid;
-	}
-};
-
-typedef shared_ptr<Session> SessionPtr;
-
-
-/**
- * A "standard" implementation of Session.
- */
-class StandardSession: public Session {
-public:
-	typedef function<void (const StandardSession *)> CloseCallback;
-	
-protected:
-	pid_t pid;
-	CloseCallback closeCallback;
-	string socketType;
-	string socketName;
-	
-	/** The session connection file descriptor. */
-	int fd;
-	bool isInitiated;
-	
-public:
-	StandardSession(pid_t pid,
-	                const CloseCallback &closeCallback,
-	                const string &socketType,
-	                const string &socketName,
-	                const string &detachKey,
-	                const string &connectPassword,
-	                const string &gupid)
-	{
-		TRACE_POINT();
-		if (socketType != "unix" && socketType != "tcp") {
-			throw IOException("Unsupported socket type '" + socketType + "'");
-		}
-		this->pid = pid;
-		this->closeCallback = closeCallback;
-		this->socketType    = socketType;
-		this->socketName    = socketName;
-		this->detachKey     = detachKey;
-		this->connectPassword = connectPassword;
-		this->gupid         = gupid;
-		fd = -1;
-		isInitiated = false;
-	}
-	
-	virtual ~StandardSession() {
-		TRACE_POINT();
-		closeStream();
-		if (closeCallback != NULL) {
-			closeCallback(this);
-		}
-	}
-	
-	virtual void initiate() {
-		TRACE_POINT();
-		if (socketType == "unix") {
-			fd = connectToUnixServer(socketName.c_str());
-		} else {
-			vector<string> args;
-			
-			split(socketName, ':', args);
-			if (args.size() != 2 || atoi(args[1]) == 0) {
-				UPDATE_TRACE_POINT();
-				throw IOException("Invalid TCP/IP address '" + socketName + "'");
-			}
-			fd = connectToTcpServer(args[0].c_str(), atoi(args[1]));
-		}
-		isInitiated = true;
-	}
-	
-	virtual bool initiated() const {
-		return isInitiated;
-	}
-	
-	virtual string getSocketType() const {
-		return socketType;
-	}
-	
-	virtual string getSocketName() const {
-		return socketName;
-	}
-	
-	virtual int getStream() const {
-		return fd;
-	}
-	
-	virtual void shutdownReader() {
-		TRACE_POINT();
-		if (fd != -1) {
-			int ret = syscalls::shutdown(fd, SHUT_RD);
-			if (ret == -1) {
-				int e = errno;
-				// ENOTCONN is harmless here.
-				if (e != ENOTCONN) {
-					throw SystemException("Cannot shutdown the reader stream",
-						e);
-				}
-			}
-		}
-	}
-	
-	virtual void shutdownWriter() {
-		TRACE_POINT();
-		if (fd != -1) {
-			int ret = syscalls::shutdown(fd, SHUT_WR);
-			if (ret == -1) {
-				int e = errno;
-				// ENOTCONN is harmless here.
-				if (e != ENOTCONN) {
-					throw SystemException("Cannot shutdown the writer stream",
-						e);
-				}
-			}
-		}
-	}
-	
-	virtual void closeStream() {
-		TRACE_POINT();
-		if (fd != -1) {
-			int ret = syscalls::close(fd);
-			fd = -1;
-			if (ret == -1) {
-				int e = errno;
-				if (errno == EIO) {
-					throw SystemException(
-						"A write operation on the session stream failed",
-						e);
-				} else {
-					throw SystemException(
-						"Cannot close the session stream",
-						e);
-				}
-			}
-		}
-	}
-	
-	virtual void discardStream() {
-		fd = -1;
-	}
-	
-	virtual pid_t getPid() const {
-		return pid;
-	}
-};
-
-
-} // namespace Passenger
-
-#endif /* _PASSENGER_SESSION_H_ */
diff --git a/ext/common/SpawnManager.h b/ext/common/SpawnManager.h
deleted file mode 100644
index cf3d4ba..0000000
--- a/ext/common/SpawnManager.h
+++ /dev/null
@@ -1,611 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_SPAWN_MANAGER_H_
-#define _PASSENGER_SPAWN_MANAGER_H_
-
-#include <string>
-#include <vector>
-#include <boost/shared_ptr.hpp>
-#include <boost/thread.hpp>
-#include <boost/function.hpp>
-#include <oxt/system_calls.hpp>
-#include <oxt/backtrace.hpp>
-
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <arpa/inet.h>
-#include <cstdio>
-#include <cstdarg>
-#include <unistd.h>
-#include <errno.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-
-#include <AbstractSpawnManager.h>
-#include <ServerInstanceDir.h>
-#include <FileDescriptor.h>
-#include <Constants.h>
-#include <AccountsDatabase.h>
-#include <RandomGenerator.h>
-#include <Exceptions.h>
-#include <Logging.h>
-#include <Utils/Base64.h>
-#include <Utils/SystemTime.h>
-#include <Utils/IOUtils.h>
-#include <Utils/MessageIO.h>
-
-namespace Passenger {
-
-using namespace std;
-using namespace boost;
-using namespace oxt;
-
-/**
- * An AbstractSpawnManager implementation.
- *
- * Internally, this class makes use of a spawn server, which is written in Ruby. This server
- * is automatically started when a SpawnManager instance is created, and automatically
- * shutdown when that instance is destroyed. The existance of the spawn server is almost
- * totally transparent to users of this class. Spawn requests are sent to the server,
- * and details about the spawned process is returned.
- *
- * If the spawn server dies during the middle of an operation, it will be restarted.
- * See spawn() for full details.
- *
- * The communication channel with the server is anonymous, i.e. no other processes
- * can access the communication channel, so communication is guaranteed to be safe
- * (unless, of course, if the spawn server itself is a trojan).
- *
- * The server will try to keep the spawning time as small as possible, by keeping
- * corresponding Ruby on Rails frameworks and application code in memory. So the second
- * time a process of the same application is spawned, the spawn time is significantly
- * lower than the first time. Nevertheless, spawning is a relatively expensive operation
- * (compared to the processing of a typical HTTP request/response), and so should be
- * avoided whenever possible.
- *
- * See the documentation of the spawn server for full implementation details.
- *
- * @ingroup Support
- */
-class SpawnManager: public AbstractSpawnManager {
-private:
-	static const int SERVER_SOCKET_FD = 3;
-	static const int OWNER_SOCKET_FD  = 4;
-	static const int HIGHEST_FD       = OWNER_SOCKET_FD;
-
-	string spawnServerCommand;
-	ServerInstanceDir::GenerationPtr generation;
-	AccountsDatabasePtr accountsDatabase;
-	string rubyCommand;
-	AnalyticsLoggerPtr analyticsLogger;
-	int logLevel;
-	string debugLogFile;
-	
-	boost::mutex lock;
-	RandomGenerator random;
-	
-	pid_t pid;
-	FileDescriptor ownerSocket;
-	string socketFilename;
-	string socketPassword;
-	bool serverNeedsRestart;
-	
-	static void deleteAccount(AccountsDatabasePtr accountsDatabase, const string &username) {
-		accountsDatabase->remove(username);
-	}
-	
-	/**
-	 * Restarts the spawn server.
-	 *
-	 * @pre System call interruption is disabled.
-	 * @throws RuntimeException An error occurred while creating a Unix server socket.
-	 * @throws SystemException An error occured while trying to setup the spawn server.
-	 * @throws IOException An error occurred while generating random data.
-	 */
-	void restartServer() {
-		TRACE_POINT();
-		if (pid != 0) {
-			UPDATE_TRACE_POINT();
-			ownerSocket.close();
-			
-			/* Wait at most 5 seconds for the spawn server to exit.
-			 * If that doesn't work, kill it, then wait at most 5 seconds
-			 * for it to exit.
-			 */
-			time_t begin = syscalls::time(NULL);
-			bool done = false;
-			while (!done && syscalls::time(NULL) - begin < 5) {
-				if (syscalls::waitpid(pid, NULL, WNOHANG) > 0) {
-					done = true;
-				} else {
-					syscalls::usleep(100000);
-				}
-			}
-			UPDATE_TRACE_POINT();
-			if (!done) {
-				UPDATE_TRACE_POINT();
-				P_TRACE(2, "Spawn server did not exit in time, killing it...");
-				syscalls::kill(pid, SIGTERM);
-				begin = syscalls::time(NULL);
-				while (syscalls::time(NULL) - begin < 5) {
-					if (syscalls::waitpid(pid, NULL, WNOHANG) > 0) {
-						break;
-					} else {
-						syscalls::usleep(100000);
-					}
-				}
-			}
-			pid = 0;
-		}
-		
-		FileDescriptor serverSocket;
-		string socketFilename;
-		string socketPassword;
-		int ret, fds[2];
-		
-		UPDATE_TRACE_POINT();
-		socketFilename = generation->getPath() + "/spawn-server/socket." +
-			toString(getpid()) + "." +
-			pointerToIntString(this);
-		socketPassword = Base64::encode(random.generateByteString(32));
-		serverSocket = createUnixServer(socketFilename.c_str());
-		do {
-			ret = chmod(socketFilename.c_str(), S_IRUSR | S_IWUSR | S_IXUSR);
-		} while (ret == -1 && errno == EINTR);
-		if (ret == -1) {
-			int e = errno;
-			syscalls::unlink(socketFilename.c_str());
-			throw FileSystemException("Cannot set permissions on '" + socketFilename + "'",
-				e, socketFilename);
-		}
-		
-		if (syscalls::socketpair(AF_UNIX, SOCK_STREAM, 0, fds) == -1) {
-			int e = errno;
-			syscalls::unlink(socketFilename.c_str());
-			throw SystemException("Cannot create a Unix socket", e);
-		}
-
-		UPDATE_TRACE_POINT();
-		pid = syscalls::fork();
-		if (pid == 0) {
-			dup2(serverSocket, HIGHEST_FD + 1);
-			dup2(fds[1], HIGHEST_FD + 2);
-			dup2(HIGHEST_FD + 1, SERVER_SOCKET_FD);
-			dup2(HIGHEST_FD + 2, OWNER_SOCKET_FD);
-			
-			// Close all unnecessary file descriptors
-			for (long i = sysconf(_SC_OPEN_MAX) - 1; i > HIGHEST_FD; i--) {
-				close(i);
-			}
-			
-			execlp(rubyCommand.c_str(),
-				rubyCommand.c_str(),
-				spawnServerCommand.c_str(),
-				/* The spawn server changes the process names of the subservers
-				 * that it starts, for better usability. However, the process name length
-				 * (as shown by ps) is limited. Here, we try to expand that limit by
-				 * deliberately passing a useless whitespace string to the spawn server.
-				 * This argument is ignored by the spawn server. This works on some
-				 * systems, such as Ubuntu Linux.
-				 */
-				"                                                             ",
-				(char *) NULL);
-			int e = errno;
-			fprintf(stderr, "*** Passenger ERROR (%s:%d):\n"
-				"Could not start the spawn server: %s: %s (%d)\n",
-				__FILE__, __LINE__,
-				rubyCommand.c_str(), strerror(e), e);
-			fflush(stderr);
-			_exit(1);
-		} else if (pid == -1) {
-			int e = errno;
-			syscalls::unlink(socketFilename.c_str());
-			syscalls::close(fds[0]);
-			syscalls::close(fds[1]);
-			pid = 0;
-			throw SystemException("Unable to fork a process", e);
-		} else {
-			FileDescriptor ownerSocket = fds[0];
-			syscalls::close(fds[1]);
-			serverSocket.close();
-			
-			// Pass arguments to spawn server.
-			writeExact(ownerSocket, socketFilename + "\n");
-			writeExact(ownerSocket, socketPassword + "\n");
-			writeExact(ownerSocket, generation->getPath() + "\n");
-			if (analyticsLogger != NULL) {
-				writeExact(ownerSocket, analyticsLogger->getAddress() + "\n");
-				writeExact(ownerSocket, analyticsLogger->getUsername() + "\n");
-				writeExact(ownerSocket, Base64::encode(analyticsLogger->getPassword()) + "\n");
-				writeExact(ownerSocket, analyticsLogger->getNodeName() + "\n");
-			} else {
-				writeExact(ownerSocket, "\n");
-				writeExact(ownerSocket, "\n");
-				writeExact(ownerSocket, "\n");
-				writeExact(ownerSocket, "\n");
-			}
-			writeExact(ownerSocket, toString(logLevel) + "\n");
-			writeExact(ownerSocket, debugLogFile + "\n");
-			
-			this->ownerSocket    = ownerSocket;
-			this->socketFilename = socketFilename;
-			this->socketPassword = socketPassword;
-			spawnServerStarted();
-		}
-	}
-	
-	/**
-	 * Connects to the spawn server and returns the connection.
-	 *
-	 * @throws RuntimeException
-	 * @throws SystemException
-	 * @throws boost::thread_interrupted
-	 */
-	FileDescriptor connect() const {
-		TRACE_POINT();
-		FileDescriptor fd = connectToUnixServer(socketFilename.c_str());
-		UPDATE_TRACE_POINT();
-		writeScalarMessage(fd, socketPassword);
-		return fd;
-	}
-	
-	/**
-	 * Send the spawn command to the spawn server.
-	 *
-	 * @param PoolOptions The spawn options to use.
-	 * @return A Process smart pointer, representing the spawned process.
-	 * @throws SpawnException Something went wrong.
-	 * @throws Anything thrown by options.environmentVariables->getItems().
-	 * @throws boost::thread_interrupted
-	 */
-	ProcessPtr sendSpawnCommand(const PoolOptions &options) {
-		TRACE_POINT();
-		FileDescriptor connection;
-		
-		P_DEBUG("Spawning a new application process for " << options.appRoot << "...");
-		
-		try {
-			connection = connect();
-		} catch (const SystemException &e) {
-			throw SpawnException(string("Could not connect to the spawn server: ") +
-				e.sys());
-		} catch (const std::exception &e) {
-			throw SpawnException(string("Could not connect to the spawn server: ") +
-				e.what());
-		}
-		
-		UPDATE_TRACE_POINT();
-		vector<string> args;
-		string appRoot;
-		pid_t appPid;
-		int i, nServerSockets, ownerPipe;
-		Process::SocketInfoMap serverSockets;
-		string detachKey = random.generateAsciiString(43);
-		// The connect password must be a URL-friendly string because users will
-		// insert it in HTTP headers.
-		string connectPassword = random.generateAsciiString(43);
-		string gupid = integerToHex(SystemTime::get() / 60) + "-" +
-			random.generateAsciiString(11);
-		AccountPtr account;
-		function<void ()> destructionCallback;
-		
-		try {
-			args.push_back("spawn_application");
-			options.toVector(args);
-			
-			args.push_back("detach_key");
-			args.push_back(detachKey);
-			args.push_back("connect_password");
-			args.push_back(connectPassword);
-			if (accountsDatabase != NULL) {
-				string username = "_backend-" + toString(accountsDatabase->getUniqueNumber());
-				string password = random.generateByteString(MESSAGE_SERVER_MAX_PASSWORD_SIZE);
-				account = accountsDatabase->add(username, password, false, options.rights);
-				destructionCallback = boost::bind(&SpawnManager::deleteAccount,
-					accountsDatabase, username);
-				
-				args.push_back("pool_account_username");
-				args.push_back(username);
-				args.push_back("pool_account_password_base64");
-				args.push_back(Base64::encode(password));
-			}
-			
-			writeArrayMessage(connection, args);
-		} catch (const SystemException &e) {
-			throw SpawnException(string("Could not write 'spawn_application' "
-				"command to the spawn server: ") + e.sys());
-		}
-		
-		try {
-			UPDATE_TRACE_POINT();
-			// Read status.
-			if (!readArrayMessage(connection, args)) {
-				throw SpawnException("The spawn server has exited unexpectedly.");
-			}
-			if (args.size() != 1) {
-				throw SpawnException("The spawn server sent an invalid message.");
-			}
-			if (args[0] == "error_page") {
-				UPDATE_TRACE_POINT();
-				string errorPage;
-				
-				if (!readScalarMessage(connection, errorPage)) {
-					throw SpawnException("The spawn server has exited unexpectedly.");
-				}
-				throw SpawnException("An error occured while spawning the application.",
-					errorPage);
-			} else if (args[0] != "ok") {
-				throw SpawnException("The spawn server sent an invalid message.");
-			}
-			
-			// Read application info.
-			UPDATE_TRACE_POINT();
-			if (!readArrayMessage(connection, args)) {
-				throw SpawnException("The spawn server has exited unexpectedly.");
-			}
-			if (args.size() != 3) {
-				throw SpawnException("The spawn server sent an invalid message.");
-			}
-			
-			appRoot = args[0];
-			appPid  = (pid_t) stringToULL(args[1]);
-			nServerSockets = atoi(args[2]);
-			
-			UPDATE_TRACE_POINT();
-			for (i = 0; i < nServerSockets; i++) {
-				if (!readArrayMessage(connection, args)) {
-					throw SpawnException("The spawn server has exited unexpectedly.");
-				}
-				if (args.size() != 3) {
-					throw SpawnException("The spawn server sent an invalid message.");
-				}
-				serverSockets[args[0]] = Process::SocketInfo(args[1], args[2]);
-			}
-			if (serverSockets.find("main") == serverSockets.end()) {
-				UPDATE_TRACE_POINT();
-				throw SpawnException("The spawn server sent an invalid message.");
-			}
-		} catch (const SystemException &e) {
-			throw SpawnException(string("Could not read from the spawn server: ") + e.sys());
-		}
-		
-		UPDATE_TRACE_POINT();
-		try {
-			ownerPipe = readFileDescriptorWithNegotiation(connection);
-		} catch (const SystemException &e) {
-			throw SpawnException(string("Could not receive the spawned "
-				"application's owner pipe from the spawn server: ") +
-				e.sys());
-		} catch (const IOException &e) {
-			throw SpawnException(string("Could not receive the spawned "
-				"application's owner pipe from the spawn server: ") +
-				e.what());
-		}
-		
-		UPDATE_TRACE_POINT();
-		P_DEBUG("Application process " << appPid << " spawned");
-		return ProcessPtr(new Process(appRoot, appPid, ownerPipe, serverSockets,
-			detachKey, connectPassword, gupid, destructionCallback));
-	}
-	
-	/**
-	 * @throws boost::thread_interrupted
-	 * @throws Anything thrown by options.environmentVariables->getItems().
-	 */
-	ProcessPtr
-	handleSpawnException(const SpawnException &e, const PoolOptions &options) {
-		TRACE_POINT();
-		bool restarted;
-		try {
-			P_DEBUG("Spawn server died. Attempting to restart it...");
-			this_thread::disable_syscall_interruption dsi;
-			restartServer();
-			P_DEBUG("Restart seems to be successful.");
-			restarted = true;
-		} catch (const IOException &e) {
-			P_DEBUG("Restart failed: " << e.what());
-			restarted = false;
-		} catch (const SystemException &e) {
-			P_DEBUG("Restart failed: " << e.what());
-			restarted = false;
-		}
-		if (restarted) {
-			return sendSpawnCommand(options);
-		} else {
-			throw SpawnException("The spawn server died unexpectedly, and restarting it failed.");
-		}
-	}
-	
-	/**
-	 * Send the reload command to the spawn server.
-	 *
-	 * @param appRoot The application root to reload.
-	 * @throws RuntimeException 
-	 * @throws SystemException
-	 * @throws boost::thread_interrupted
-	 */
-	void sendReloadCommand(const string &appRoot) {
-		TRACE_POINT();
-		FileDescriptor connection;
-		
-		try {
-			connection = connect();
-		} catch (SystemException &e) {
-			e.setBriefMessage("Could not connect to the spawn server");
-			throw;
-		} catch (const RuntimeException &e) {
-			throw RuntimeException(string("Could not connect to the spawn server: ") +
-				e.what());
-		}
-		
-		try {
-			writeArrayMessage(connection, "reload", appRoot.c_str(), NULL);
-		} catch (SystemException &e) {
-			e.setBriefMessage("Could not write 'reload' command to the spawn server");
-			throw;
-		}
-	}
-	
-	void handleReloadException(const SystemException &e, const string &appRoot) {
-		TRACE_POINT();
-		bool restarted;
-		try {
-			P_DEBUG("Spawn server died. Attempting to restart it...");
-			restartServer();
-			P_DEBUG("Restart seems to be successful.");
-			restarted = true;
-		} catch (const IOException &e) {
-			P_DEBUG("Restart failed: " << e.what());
-			restarted = false;
-		} catch (const SystemException &e) {
-			P_DEBUG("Restart failed: " << e.what());
-			restarted = false;
-		}
-		if (restarted) {
-			return sendReloadCommand(appRoot);
-		} else {
-			throw SpawnException("The spawn server died unexpectedly, and restarting it failed.");
-		}
-	}
-	
-	IOException prependMessageToException(const IOException &e, const string &message) {
-		return IOException(message + ": " + e.what());
-	}
-	
-	SystemException prependMessageToException(const SystemException &e, const string &message) {
-		return SystemException(message + ": " + e.brief(), e.code());
-	}
-
-protected:
-	/**
-	 * A method which is called after the spawn server has started.
-	 * It doesn't do anything by default and serves as a hook for unit tests.
-	 */
-	virtual void spawnServerStarted() { }
-	
-public:
-	/**
-	 * Construct a new SpawnManager.
-	 *
-	 * @param spawnServerCommand The filename of the spawn server to use.
-	 * @param generation The server instance dir generation in which
-	 *                   generation-specific are stored.
-	 * @param accountsDatabase An accounts database. SpawnManager will automatically
-	 *                         create a new account for each spawned process, assigning
-	 *                         it the rights as set in the PoolOptions object. This
-	 *                         account is also automatically deleted when no longer needed.
-	 *                         May be a null pointer.
-	 * @param rubyCommand The Ruby interpreter's command.
-	 * @throws RuntimeException An error occurred while creating a Unix server socket.
-	 * @throws SystemException An error occured while trying to setup the spawn server.
-	 * @throws IOException An error occurred while generating random data.
-	 */
-	SpawnManager(const string &spawnServerCommand,
-	             const ServerInstanceDir::GenerationPtr &generation,
-	             const AccountsDatabasePtr &accountsDatabase = AccountsDatabasePtr(),
-	             const string &rubyCommand = "ruby",
-	             const AnalyticsLoggerPtr &analyticsLogger = AnalyticsLoggerPtr(),
-	             int logLevel = 0,
-	             const string &debugLogFile = ""
-	) {
-		TRACE_POINT();
-		this->spawnServerCommand = spawnServerCommand;
-		this->generation  = generation;
-		this->accountsDatabase = accountsDatabase;
-		this->rubyCommand = rubyCommand;
-		this->analyticsLogger = analyticsLogger;
-		this->logLevel = logLevel;
-		this->debugLogFile = debugLogFile;
-		pid = 0;
-		this_thread::disable_interruption di;
-		this_thread::disable_syscall_interruption dsi;
-		try {
-			restartServer();
-		} catch (const IOException &e) {
-			throw prependMessageToException(e, "Could not start the spawn server");
-		} catch (const SystemException &e) {
-			throw prependMessageToException(e, "Could not start the spawn server");
-		}
-	}
-	
-	virtual ~SpawnManager() {
-		TRACE_POINT();
-		if (pid != 0) {
-			UPDATE_TRACE_POINT();
-			this_thread::disable_interruption di;
-			this_thread::disable_syscall_interruption dsi;
-			syscalls::unlink(socketFilename.c_str());
-			ownerSocket.close();
-			syscalls::waitpid(pid, NULL, 0);
-		}
-	}
-	
-	virtual ProcessPtr spawn(const PoolOptions &options) {
-		TRACE_POINT();
-		AnalyticsScopeLog scope(options.log, "spawn app process");
-		ProcessPtr result;
-		boost::mutex::scoped_lock l(lock);
-		
-		try {
-			result = sendSpawnCommand(options);
-		} catch (const SpawnException &e) {
-			if (e.hasErrorPage()) {
-				throw;
-			} else {
-				result = handleSpawnException(e, options);
-			}
-		}
-		scope.success();
-		return result;
-	}
-	
-	virtual void reload(const string &appRoot) {
-		TRACE_POINT();
-		this_thread::disable_interruption di;
-		this_thread::disable_syscall_interruption dsi;
-		try {
-			return sendReloadCommand(appRoot);
-		} catch (const SystemException &e) {
-			return handleReloadException(e, appRoot);
-		}
-	}
-	
-	virtual void killSpawnServer() const {
-		kill(pid, SIGKILL);
-	}
-	
-	virtual pid_t getServerPid() const {
-		return pid;
-	}
-};
-
-/** Convenient alias for SpawnManager smart pointer. */
-typedef shared_ptr<SpawnManager> SpawnManagerPtr;
-
-} // namespace Passenger
-
-#endif /* _PASSENGER_SPAWN_MANAGER_H_ */
diff --git a/ext/common/StaticString.h b/ext/common/StaticString.h
index 08bac82..b449b90 100644
--- a/ext/common/StaticString.h
+++ b/ext/common/StaticString.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010, 2011, 2012 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -82,10 +82,30 @@ public:
 	/** A hash function object for StaticString. */
 	struct Hash {
 		size_t operator()(const StaticString &str) const {
-			size_t result = 0;
 			const char *data = str.content;
-			const char *end  = data + str.len;
-			while (data != end) {
+			const char *end  = str.content + str.len;
+			size_t result    = 0;
+			
+			#if defined(__i386__) || defined(__x86_64__)
+				/* When on x86 or x86_64, process 4 or 8 bytes
+				 * per iteration by treating the data as an
+				 * array of longs. Luckily for us these
+				 * architectures can read longs even on unaligned
+				 * addresses.
+				 */
+				const char *last_long = str.content +
+					str.len / sizeof(unsigned long) *
+					sizeof(unsigned long);
+				
+				while (data < last_long) {
+					result = result * 33 + *((unsigned long *) data);
+					data += sizeof(unsigned long);
+				}
+				
+				/* Process leftover data byte-by-byte. */
+			#endif
+			
+			while (data < end) {
 				result = result * 33 + *data;
 				data++;
 			}
diff --git a/ext/common/StringListCreator.h b/ext/common/StringListCreator.h
deleted file mode 100644
index 1d55d4d..0000000
--- a/ext/common/StringListCreator.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#ifndef _PASSENGER_STRING_LIST_CREATOR_H_
-#define _PASSENGER_STRING_LIST_CREATOR_H_
-
-#include <string>
-#include <vector>
-#include <boost/shared_ptr.hpp>
-#include "Utils.h"
-#include "Utils/Base64.h"
-
-namespace Passenger {
-
-using namespace std;
-using namespace boost;
-
-typedef vector<string> StringList;
-typedef shared_ptr<StringList> StringListPtr;
-
-
-class StringListCreator {
-public:
-	virtual ~StringListCreator() {}
-	
-	/** May throw arbitrary exceptions. */
-	virtual const StringListPtr getItems() const = 0;
-};
-
-typedef shared_ptr<StringListCreator> StringListCreatorPtr;
-
-class SimpleStringListCreator: public StringListCreator {
-public:
-	StringListPtr items;
-	
-	SimpleStringListCreator() {
-		items = ptr(new StringList());
-	}
-	
-	SimpleStringListCreator(const StaticString &data) {
-		items = ptr(new StringList());
-		string buffer = Base64::decode(data);
-		if (!buffer.empty()) {
-			string::size_type start = 0, pos;
-			const string &const_buffer(buffer);
-			while ((pos = const_buffer.find('\0', start)) != string::npos) {
-				items->push_back(const_buffer.substr(start, pos - start));
-				start = pos + 1;
-			}
-		}
-	}
-	
-	virtual const StringListPtr getItems() const {
-		return items;
-	}
-};
-
-typedef shared_ptr<SimpleStringListCreator> SimpleStringListCreatorPtr;
-
-} // namespace Passenger
-
-#endif /* _PASSENGER_STRING_LIST_CREATOR_H_ */
diff --git a/ext/common/UnionStation.h b/ext/common/UnionStation.h
new file mode 100644
index 0000000..0d4fc9a
--- /dev/null
+++ b/ext/common/UnionStation.h
@@ -0,0 +1,972 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010, 2011, 2012 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_UNION_STATION_H_
+#define _PASSENGER_UNION_STATION_H_
+
+#include <boost/shared_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <boost/noncopyable.hpp>
+#include <oxt/thread.hpp>
+#include <oxt/system_calls.hpp>
+#include <oxt/backtrace.hpp>
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <pthread.h>
+#include <string>
+#include <map>
+#include <stdexcept>
+#include <cstdio>
+#include <ctime>
+#include <cerrno>
+#include <cassert>
+
+#include <RandomGenerator.h>
+#include <FileDescriptor.h>
+#include <StaticString.h>
+#include <Logging.h>
+#include <Exceptions.h>
+#include <Utils.h>
+#include <Utils/MessageIO.h>
+#include <Utils/StrIntUtils.h>
+#include <Utils/MD5.h>
+#include <Utils/SystemTime.h>
+
+
+namespace Passenger {
+namespace UnionStation {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+
+// All access to the file descriptor must be synchronized through the lock.
+struct Connection {
+	mutable boost::mutex syncher;
+	int fd;
+	
+	Connection(int _fd)
+		: fd(_fd)
+		{ }
+	
+	~Connection() {
+		disconnect();
+	}
+
+	bool connected() const {
+		return fd != -1;
+	}
+	
+	bool disconnect(string &errorResponse) {
+		if (!connected()) {
+			return false;
+		}
+		
+		/* The server might send an "error" array message
+		 * just before disconnecting. Try to read it.
+		 */
+		TRACE_POINT();
+		vector<string> response;
+		try {
+			unsigned long long timeout = 20000000;
+			while (true) {
+				response = readArrayMessage(fd, &timeout);
+			}
+		} catch (const TimeoutException &) {
+			/* This means that the last message isn't an array
+			 * message or that the server didn't send it quickly
+			 * enough. In any case, discard whatever previous
+			 * array messages we were able to read because they're
+			 * guaranteed not to be the error message we're expecting.
+			 */
+			response.clear();
+		} catch (const SystemException &e) {
+			/* We treat ECONNRESET the same as EOFException.
+			 * Other errors are treated as TimeoutException.
+			 */
+			if (e.code() != ECONNRESET) {
+				response.clear();
+			}
+		} catch (const EOFException &) {
+			/* Do nothing. We've successfully read the last array message. */
+		}
+		
+		UPDATE_TRACE_POINT();
+		disconnect();
+		
+		if (response.size() == 2 && response[0] == "error") {
+			errorResponse = response[1];
+			return true;
+		} else {
+			return false;
+		}
+	}
+	
+	void disconnect() {
+		if (fd != -1) {
+			this_thread::disable_interruption di;
+			this_thread::disable_syscall_interruption dsi;
+			safelyClose(fd);
+			fd = -1;
+		}
+	}
+};
+
+typedef shared_ptr<Connection> ConnectionPtr;
+
+
+/** A special lock type for Connection that also keeps a smart
+ * pointer to the data structure so that the mutex is not destroyed
+ * prematurely.
+ */
+struct ConnectionLock {
+	ConnectionPtr connection;
+	bool locked;
+	
+	ConnectionLock(const ConnectionPtr &c)
+		: connection(c)
+	{
+		c->syncher.lock();
+		locked = true;
+	}
+	
+	~ConnectionLock() {
+		if (locked) {
+			connection->syncher.unlock();
+		}
+	}
+	
+	void reset(const ConnectionPtr &c, bool lockNow = true) {
+		if (locked) {
+			connection->syncher.unlock();
+		}
+		connection = c;
+		if (lockNow) {
+			connection->syncher.lock();
+			locked = true;
+		} else {
+			locked = false;
+		}
+	}
+	
+	void lock() {
+		assert(!locked);
+		connection->syncher.lock();
+		locked = true;
+	}
+};
+
+
+/**
+ * A scope guard which closes the given Connection on destruction unless cleared.
+ */
+class ConnectionGuard {
+private:
+	ConnectionPtr connection;
+	bool cleared;
+
+public:
+	ConnectionGuard(const ConnectionPtr &_connection)
+		: connection(_connection),
+		  cleared(false)
+		{ }
+	
+	~ConnectionGuard() {
+		if (!cleared) {
+			connection->disconnect();
+		}
+	}
+
+	void clear() {
+		cleared = true;
+	}
+};
+
+
+enum ExceptionHandlingMode {
+	PRINT,
+	THROW,
+	IGNORE
+};
+
+
+class LoggerFactory;
+typedef shared_ptr<LoggerFactory> LoggerFactoryPtr;
+
+inline void _checkinConnection(const LoggerFactoryPtr &loggerFactory, const ConnectionPtr &connection);
+
+
+class Logger: public boost::noncopyable {
+private:
+	static const int INT64_STR_BUFSIZE = 22; // Long enough for a 64-bit number.
+	static const unsigned long long IO_TIMEOUT = 5000000; // In microseconds.
+	
+	const LoggerFactoryPtr loggerFactory;
+	const ConnectionPtr connection;
+	const string txnId;
+	const string groupName;
+	const string category;
+	const string unionStationKey;
+	const ExceptionHandlingMode exceptionHandlingMode;
+	bool shouldFlushToDiskAfterClose;
+	
+	/**
+	 * Buffer must be at least txnId.size() + 1 + INT64_STR_BUFSIZE + 1 bytes.
+	 */
+	char *insertTxnIdAndTimestamp(char *buffer, const char *end) {
+		assert(end - buffer >= int(txnId.size() + 1 + INT64_STR_BUFSIZE + 1));
+		int size;
+		
+		// "txn-id-here"
+		buffer = appendData(buffer, end, txnId);
+		
+		// "txn-id-here "
+		buffer = appendData(buffer, end, " ", 1);
+		
+		// "txn-id-here 123456"
+		assert(end - buffer >= INT64_STR_BUFSIZE);
+		size = snprintf(buffer, INT64_STR_BUFSIZE, "%llu", SystemTime::getUsec());
+		if (size >= INT64_STR_BUFSIZE) {
+			// The buffer is too small.
+			throw IOException("Cannot format a new transaction log message timestamp.");
+		}
+		buffer += size;
+		
+		// "txn-id-here 123456 "
+		buffer = appendData(buffer, end, " ", 1);
+		
+		return buffer;
+	}
+	
+	template<typename ExceptionType>
+	void handleException(const ExceptionType &e) {
+		switch (exceptionHandlingMode) {
+		case THROW:
+			throw e;
+		case PRINT:
+			try {
+				const tracable_exception &te =
+					dynamic_cast<const tracable_exception &>(e);
+				P_WARN(te.what() << "\n" << te.backtrace());
+			} catch (const bad_cast &) {
+				P_WARN(e.what());
+			}
+			break;
+		default:
+			break;
+		}
+	}
+	
+public:
+	Logger()
+		: exceptionHandlingMode(PRINT)
+		{ }
+	
+	Logger(const LoggerFactoryPtr &_loggerFactory,
+		const ConnectionPtr &_connection,
+		const string &_txnId,
+		const string &_groupName,
+		const string &_category,
+		const string &_unionStationKey,
+		ExceptionHandlingMode _exceptionHandlingMode = PRINT)
+		: loggerFactory(_loggerFactory),
+		  connection(_connection),
+		  txnId(_txnId),
+		  groupName(_groupName),
+		  category(_category),
+		  unionStationKey(_unionStationKey),
+		  exceptionHandlingMode(_exceptionHandlingMode),
+		  shouldFlushToDiskAfterClose(false)
+		{ }
+	
+	~Logger() {
+		TRACE_POINT();
+		if (connection == NULL) {
+			return;
+		}
+		ConnectionLock l(connection);
+		if (!connection->connected()) {
+			return;
+		}
+		
+		char timestamp[2 * sizeof(unsigned long long) + 1];
+		integerToHexatri<unsigned long long>(SystemTime::getUsec(),
+			timestamp);
+		
+		UPDATE_TRACE_POINT();
+		ConnectionGuard guard(connection);
+		try {
+			unsigned long long timeout = IO_TIMEOUT;
+			writeArrayMessage(connection->fd, &timeout,
+				"closeTransaction",
+				txnId.c_str(),
+				timestamp,
+				NULL);
+			
+			if (shouldFlushToDiskAfterClose) {
+				UPDATE_TRACE_POINT();
+				timeout = IO_TIMEOUT;
+				writeArrayMessage(connection->fd, &timeout,
+					"flush", NULL);
+				readArrayMessage(connection->fd, &timeout);
+			}
+
+			_checkinConnection(loggerFactory, connection);
+			guard.clear();
+		} catch (const SystemException &e) {
+			string errorResponse;
+			
+			UPDATE_TRACE_POINT();
+			guard.clear();
+			if (connection->disconnect(errorResponse)) {
+				handleException(IOException(
+					"Logging agent disconnected with error: " +
+					errorResponse));
+			} else {
+				handleException(e);
+			}
+		}
+	}
+	
+	void message(const StaticString &text) {
+		TRACE_POINT();
+		if (connection == NULL) {
+			P_TRACE(3, "[Union Station log to null] " << text);
+			return;
+		}
+		ConnectionLock l(connection);
+		if (!connection->connected()) {
+			P_TRACE(3, "[Union Station log to null] " << text);
+			return;
+		}
+		
+		char timestamp[2 * sizeof(unsigned long long) + 1];
+		integerToHexatri<unsigned long long>(SystemTime::getUsec(), timestamp);
+		
+		UPDATE_TRACE_POINT();
+		ConnectionGuard guard(connection);
+		try {
+			unsigned long long timeout = IO_TIMEOUT;
+			P_TRACE(3, "[Union Station log] " << txnId << " " << timestamp << " " << text);
+			writeArrayMessage(connection->fd, &timeout,
+				"log",
+				txnId.c_str(),
+				timestamp,
+				NULL);
+			writeScalarMessage(connection->fd, text, &timeout);
+			guard.clear();
+		} catch (const std::exception &e) {
+			string errorResponse;
+			
+			UPDATE_TRACE_POINT();
+			guard.clear();
+			if (connection->disconnect(errorResponse)) {
+				handleException(IOException(
+					"Logging agent disconnected with error: " +
+					errorResponse));
+			} else {
+				handleException(e);
+			}
+		}
+	}
+	
+	void abort(const StaticString &text) {
+		message("ABORT");
+	}
+	
+	void flushToDiskAfterClose(bool value) {
+		shouldFlushToDiskAfterClose = value;
+	}
+	
+	bool isNull() const {
+		return connection == NULL;
+	}
+	
+	const string &getTxnId() const {
+		return txnId;
+	}
+	
+	const string &getGroupName() const {
+		return groupName;
+	}
+	
+	const string &getCategory() const {
+		return category;
+	}
+	
+	const string &getUnionStationKey() const {
+		return unionStationKey;
+	}
+};
+
+typedef shared_ptr<Logger> LoggerPtr;
+
+
+class ScopeLog: public noncopyable {
+private:
+	Logger * const log;
+	enum {
+		NAME,
+		GRANULAR
+	} type;
+	union {
+		const char *name;
+		struct {
+			const char *endMessage;
+			const char *abortMessage;	
+		} granular;
+	} data;
+	bool ok;
+	
+	static string timevalToString(struct timeval &tv) {
+		unsigned long long i = (unsigned long long) tv.tv_sec * 1000000 + tv.tv_usec;
+		return usecToString(i);
+	}
+	
+	static string usecToString(unsigned long long usec) {
+		char timestamp[2 * sizeof(unsigned long long) + 1];
+		integerToHexatri<unsigned long long>(usec, timestamp);
+		return timestamp;
+	}
+	
+public:
+	ScopeLog()
+		: log(NULL)
+		{ }
+
+	ScopeLog(const LoggerPtr &_log, const char *name)
+		: log(_log.get())
+	{
+		type = NAME;
+		data.name = name;
+		ok = false;
+
+		char message[150];
+		char *pos = message;
+		const char *end = message + sizeof(message);
+		struct rusage usage;
+
+		pos = appendData(pos, end, "BEGIN: ");
+		pos = appendData(pos, end, name);
+		pos = appendData(pos, end, " (");
+		pos = appendData(pos, end, usecToString(SystemTime::getUsec()));
+		pos = appendData(pos, end, ",");
+		if (getrusage(RUSAGE_SELF, &usage) == -1) {
+			int e = errno;
+			throw SystemException("getrusage() failed", e);
+		}
+		pos = appendData(pos, end, timevalToString(usage.ru_utime));
+		pos = appendData(pos, end, ",");
+		pos = appendData(pos, end, timevalToString(usage.ru_stime));
+		pos = appendData(pos, end, ") ");
+
+		if (log != NULL) {
+			log->message(StaticString(message, pos - message));
+		}
+	}
+	
+	ScopeLog(const LoggerPtr &_log,
+		const char *beginMessage,
+		const char *endMessage,
+		const char *abortMessage = NULL)
+		: log(_log.get())
+	{
+		if (_log != NULL) {
+			type = GRANULAR;
+			data.granular.endMessage = endMessage;
+			data.granular.abortMessage = abortMessage;
+			ok = abortMessage == NULL;
+			_log->message(beginMessage);
+		}
+	}
+	
+	~ScopeLog() {
+		if (log == NULL) {
+			return;
+		}
+		if (type == NAME) {
+			char message[150];
+			char *pos = message;
+			const char *end = message + sizeof(message);
+			struct rusage usage;
+			
+			if (ok) {
+				pos = appendData(pos, end, "END: ");
+			} else {
+				pos = appendData(pos, end, "FAIL: ");
+			}
+			pos = appendData(pos, end, data.name);
+			pos = appendData(pos, end, " (");
+			pos = appendData(pos, end, usecToString(SystemTime::getUsec()));
+			pos = appendData(pos, end, ",");
+			if (getrusage(RUSAGE_SELF, &usage) == -1) {
+				int e = errno;
+				throw SystemException("getrusage() failed", e);
+			}
+			pos = appendData(pos, end, timevalToString(usage.ru_utime));
+			pos = appendData(pos, end, ",");
+			pos = appendData(pos, end, timevalToString(usage.ru_stime));
+			pos = appendData(pos, end, ")");
+
+			log->message(StaticString(message, pos - message));
+		} else {
+			if (ok) {
+				log->message(data.granular.endMessage);
+			} else {
+				log->message(data.granular.abortMessage);
+			}
+		}
+	}
+	
+	void success() {
+		ok = true;
+	}
+};
+
+
+class LoggerFactory: public enable_shared_from_this<LoggerFactory> {
+private:
+	static const unsigned int CONNECTION_POOL_MAX_SIZE = 10;
+
+	const string serverAddress;
+	const string username;
+	const string password;
+	const string nodeName;
+	RandomGenerator randomGenerator;
+
+	LoggerPtr nullLogger;
+	
+	/** Lock protecting the fields that follow, but not the
+	 * contents of the connection object.
+	 */
+	mutable boost::mutex syncher;
+	vector<ConnectionPtr> connectionPool;
+	unsigned int maxConnectTries;
+	unsigned long long reconnectTimeout;
+	unsigned long long nextReconnectTime;
+	
+	static string determineNodeName(const string &givenNodeName) {
+		if (givenNodeName.empty()) {
+			return getHostName();
+		} else {
+			return givenNodeName;
+		}
+	}
+	
+	static bool isNetworkError(int code) {
+		return code == EPIPE || code == ECONNREFUSED || code == ECONNRESET
+			|| code == EHOSTUNREACH || code == ENETDOWN || code == ENETUNREACH
+			|| code == ETIMEDOUT;
+	}
+
+	template<typename T>
+	static bool instanceof(const std::exception &e) {
+		try {
+			(void) dynamic_cast<const T &>(e);
+			return true;
+		} catch (const bad_cast &) {
+			return false;
+		}
+	}
+	
+	ConnectionPtr createNewConnection() {
+		TRACE_POINT();
+		int fd;
+		vector<string> args;
+		unsigned long long timeout = 15000000;
+		
+		fd = connectToServer(serverAddress);
+		FdGuard guard(fd, true);
+		if (!readArrayMessage(fd, args, &timeout)) {
+			throw IOException("The logging agent closed the connection before sending a version identifier.");
+		}
+		if (args.size() != 2 || args[0] != "version") {
+			throw IOException("The logging agent server didn't sent a valid version identifier.");
+		}
+		if (args[1] != "1") {
+			string message = "Unsupported logging agent protocol version " +
+				args[1] + ".";
+			throw IOException(message);
+		}
+		
+		UPDATE_TRACE_POINT();
+		writeScalarMessage(fd, username, &timeout);
+		writeScalarMessage(fd, password, &timeout);
+		
+		UPDATE_TRACE_POINT();
+		if (!readArrayMessage(fd, args, &timeout)) {
+			throw IOException("The logging agent did not send an authentication response.");
+		} else if (args.size() != 1) {
+			throw IOException("The authentication response that the logging agent sent is not valid.");
+		} else if (args[0] != "ok") {
+			throw SecurityException("The logging agent server denied authentication: " + args[0]);
+		}
+		
+		UPDATE_TRACE_POINT();
+		writeArrayMessage(fd, &timeout, "init", nodeName.c_str(), NULL);
+		if (!readArrayMessage(fd, args, &timeout)) {
+			throw SystemException("Cannot connect to logging server", ECONNREFUSED);
+		} else if (args.size() != 1) {
+			throw IOException("Logging server returned an invalid reply for the 'init' command");
+		} else if (args[0] == "server shutting down") {
+			throw SystemException("Cannot connect to server", ECONNREFUSED);
+		} else if (args[0] != "ok") {
+			throw IOException("Logging server returned an invalid reply for the 'init' command");
+		}
+		
+		guard.clear();
+		return make_shared<Connection>(fd);
+	}
+	
+public:
+	LoggerFactory() {
+		nullLogger = make_shared<Logger>();
+	}
+	
+	LoggerFactory(const string &_serverAddress, const string &_username,
+	              const string &_password, const string &_nodeName = string())
+		: serverAddress(_serverAddress),
+		  username(_username),
+		  password(_password),
+		  nodeName(determineNodeName(_nodeName))
+	{
+		nullLogger = make_shared<Logger>();
+		if (!_serverAddress.empty() && isLocalSocketAddress(_serverAddress)) {
+			maxConnectTries = 10;
+		} else {
+			maxConnectTries = 1;
+		}
+		reconnectTimeout  = 1000000;
+		nextReconnectTime = 0;
+	}
+
+	ConnectionPtr checkoutConnection() {
+		TRACE_POINT();
+		unique_lock<boost::mutex> l(syncher);
+		if (!connectionPool.empty()) {
+			P_TRACE(3, "Checked out existing connection");
+			ConnectionPtr connection = connectionPool.back();
+			connectionPool.pop_back();
+			return connection;
+
+		} else {
+			if (SystemTime::getUsec() < nextReconnectTime) {
+				P_TRACE(3, "Not yet time to reconnect; returning NULL connection");
+				return ConnectionPtr();
+			}
+
+			l.unlock();
+			P_TRACE(3, "Creating new connection with logging agent");
+			ConnectionPtr connection;
+			try {
+				connection = createNewConnection();
+			} catch (const TimeoutException &) {
+				l.lock();
+				P_WARN("Timeout trying to connect to the logging agent at " << serverAddress << "; " <<
+					"will reconnect in " << reconnectTimeout / 1000000 << " second(s).");
+				nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
+				return ConnectionPtr();
+			} catch (const tracable_exception &e) {
+				l.lock();
+				nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
+				if (instanceof<IOException>(e) || instanceof<SystemException>(e)) {
+					P_WARN("Cannot connect to the logging agent at " << serverAddress <<
+						" (" << e.what() << "); will reconnect in " <<
+						reconnectTimeout / 1000000 << " second(s).");
+					return ConnectionPtr();
+				} else {
+					throw;
+				}
+			}
+
+			return connection;
+		}
+	}
+
+	void checkinConnection(const ConnectionPtr &connection) {
+		boost::lock_guard<boost::mutex> l(syncher);
+		if (connectionPool.size() < CONNECTION_POOL_MAX_SIZE) {
+			connectionPool.push_back(connection);
+		} else {
+			connection->disconnect();
+		}
+	}
+
+	LoggerPtr createNullLogger() const {
+		return nullLogger;
+	}
+	
+	LoggerPtr newTransaction(const string &groupName,
+		const string &category = "requests",
+		const string &unionStationKey = string(),
+		const string &filters = string())
+	{
+		if (serverAddress.empty()) {
+			return createNullLogger();
+		}
+		
+		unsigned long long timestamp = SystemTime::getUsec();
+		char txnId[
+			2 * sizeof(unsigned int) +    // max hex timestamp size
+			11 +                          // space for a random identifier
+			1                             // null terminator
+		];
+		char *end;
+		unsigned int timestampSize;
+		char timestampStr[2 * sizeof(unsigned long long) + 1];
+		
+		// "[timestamp]"
+		// Our timestamp is like a Unix timestamp but with minutes
+		// resolution instead of seconds. 32 bits will last us for
+		// about 8000 years.
+		timestampSize = integerToHexatri<unsigned int>(timestamp / 1000000 / 60,
+			txnId);
+		end = txnId + timestampSize;
+		
+		// "[timestamp]-"
+		*end = '-';
+		end++;
+		
+		// "[timestamp]-[random id]"
+		randomGenerator.generateAsciiString(end, 11);
+		end += 11;
+		*end = '\0';
+		
+		integerToHexatri<unsigned long long>(timestamp, timestampStr);
+		
+		ConnectionPtr connection = checkoutConnection();
+		if (connection == NULL) {
+			return createNullLogger();
+		}
+
+		ConnectionLock cl(connection);
+		ConnectionGuard guard(connection);
+
+		try {
+			unsigned long long timeout = 15000000;
+			
+			writeArrayMessage(connection->fd, &timeout,
+				"openTransaction",
+				txnId,
+				groupName.c_str(),
+				"",
+				category.c_str(),
+				timestampStr,
+				unionStationKey.c_str(),
+				"true",
+				"true",
+				filters.c_str(),
+				NULL);
+			
+			vector<string> args;
+			if (!readArrayMessage(connection->fd, args, &timeout)) {
+				boost::lock_guard<boost::mutex> l(syncher);
+				P_WARN("The logging agent at " << serverAddress <<
+					" closed the connection (no error message given);" <<
+					" will reconnect in " << reconnectTimeout / 1000000 <<
+					" second(s).");
+				nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
+				return createNullLogger();
+			} else if (args.size() == 2 && args[0] == "error") {
+				boost::lock_guard<boost::mutex> l(syncher);
+				P_WARN("The logging agent at " << serverAddress <<
+					" closed the connection (error message: " << args[1] <<
+					"); will reconnect in " << reconnectTimeout / 1000000 <<
+					" second(s).");
+				nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
+				return createNullLogger();
+			} else if (args.empty() || args[0] != "ok") {
+				boost::lock_guard<boost::mutex> l(syncher);
+				P_WARN("The logging agent at " << serverAddress <<
+					" sent an unexpected reply;" <<
+					" will reconnect in " << reconnectTimeout / 1000000 <<
+					" second(s).");
+				nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
+				return createNullLogger();
+			}
+			
+			guard.clear();
+			return make_shared<Logger>(shared_from_this(),
+				connection,
+				string(txnId, end - txnId),
+				groupName, category,
+				unionStationKey);
+			
+		} catch (const TimeoutException &) {
+			boost::lock_guard<boost::mutex> l(syncher);
+			P_WARN("Timeout trying to communicate with the logging agent at " << serverAddress << "; " <<
+				"will reconnect in " << reconnectTimeout / 1000000 << " second(s).");
+			nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
+			return createNullLogger();
+			
+		} catch (const SystemException &e) {
+			if (e.code() == ENOENT || isNetworkError(e.code())) {
+				string errorResponse;
+				bool gotErrorResponse;
+				
+				guard.clear();
+				gotErrorResponse = connection->disconnect(errorResponse);
+				boost::lock_guard<boost::mutex> l(syncher);
+				if (gotErrorResponse) {
+					P_WARN("The logging agent at " << serverAddress <<
+						" closed the connection (error message: " << errorResponse <<
+						"); will reconnect in " << reconnectTimeout / 1000000 <<
+						" second(s).");
+				} else {
+					P_WARN("The logging agent at " << serverAddress <<
+						" closed the connection (no error message given);" <<
+						" will reconnect in " << reconnectTimeout / 1000000 <<
+						" second(s).");
+				}
+				nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
+				return createNullLogger();
+			} else {
+				throw;
+			}
+		}
+	}
+	
+	LoggerPtr continueTransaction(const string &txnId,
+		const string &groupName,
+		const string &category = "requests",
+		const string &unionStationKey = string())
+	{
+		if (serverAddress.empty() || txnId.empty()) {
+			return createNullLogger();
+		}
+		
+		char timestampStr[2 * sizeof(unsigned long long) + 1];
+		integerToHexatri<unsigned long long>(SystemTime::getUsec(), timestampStr);
+		
+		ConnectionPtr connection = checkoutConnection();
+		if (connection == NULL) {
+			return createNullLogger();
+		}
+
+		ConnectionLock cl(connection);
+		ConnectionGuard guard(connection);
+		
+		try {
+			unsigned long long timeout = 15000000;
+			writeArrayMessage(connection->fd, &timeout,
+				"openTransaction",
+				txnId.c_str(),
+				groupName.c_str(),
+				"",
+				category.c_str(),
+				timestampStr,
+				unionStationKey.c_str(),
+				"true",
+				NULL);
+			guard.clear();
+			return make_shared<Logger>(shared_from_this(),
+				connection,
+				txnId, groupName, category,
+				unionStationKey);
+			
+		} catch (const TimeoutException &) {
+			boost::lock_guard<boost::mutex> l(syncher);
+			P_WARN("Timeout trying to communicate with the logging agent at " << serverAddress << "; " <<
+				"will reconnect in " << reconnectTimeout / 1000000 << " second(s).");
+			nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
+			return createNullLogger();
+			
+		} catch (const SystemException &e) {
+			if (e.code() == ENOENT || isNetworkError(e.code())) {
+				string errorResponse;
+				bool gotErrorResponse;
+				
+				guard.clear();
+				gotErrorResponse = connection->disconnect(errorResponse);
+				boost::lock_guard<boost::mutex> l(syncher);
+				if (gotErrorResponse) {
+					P_WARN("The logging agent at " << serverAddress <<
+						" closed the connection (error message: " << errorResponse <<
+						"); will reconnect in " << reconnectTimeout / 1000000 <<
+						" second(s).");
+				} else {
+					P_WARN("The logging agent at " << serverAddress <<
+						" closed the connection (no error message given);" <<
+						" will reconnect in " << reconnectTimeout / 1000000 <<
+						" second(s).");
+				}
+				nextReconnectTime = SystemTime::getUsec() + reconnectTimeout;
+				return createNullLogger();
+			} else {
+				throw;
+			}
+		}
+	}
+	
+	void setMaxConnectTries(unsigned int value) {
+		boost::lock_guard<boost::mutex> l(syncher);
+		maxConnectTries = value;
+	}
+	
+	void setReconnectTimeout(unsigned long long usec) {
+		boost::lock_guard<boost::mutex> l(syncher);
+		reconnectTimeout = usec;
+	}
+	
+	bool isNull() const {
+		return serverAddress.empty();
+	}
+	
+	const string &getAddress() const {
+		return serverAddress;
+	}
+	
+	const string &getUsername() const {
+		return username;
+	}
+	
+	const string &getPassword() const {
+		return password;
+	}
+
+	/**
+	 * @post !result.empty()
+	 */
+	const string &getNodeName() const {
+		return nodeName;
+	}
+};
+
+
+inline void
+_checkinConnection(const LoggerFactoryPtr &loggerFactory, const ConnectionPtr &connection) {
+	loggerFactory->checkinConnection(connection);
+}
+
+
+} // namespace UnionStation
+} // namespace Passenger
+
+#endif /* _PASSENGER_UNION_STATION_H_ */
+
diff --git a/ext/common/Utils.cpp b/ext/common/Utils.cpp
index 235a941..88cad69 100644
--- a/ext/common/Utils.cpp
+++ b/ext/common/Utils.cpp
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010, 2011, 2012 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -41,6 +41,11 @@
 #include <limits.h>
 #include <unistd.h>
 #include <signal.h>
+#ifdef __linux__
+	#include <sys/syscall.h>
+	#include <features.h>
+#endif
+#include <vector>
 #include <FileDescriptor.h>
 #include <MessageServer.h>
 #include <ResourceLocator.h>
@@ -112,7 +117,7 @@ getFileType(const StaticString &filename, CachedFileStat *cstat, unsigned int th
 	int ret;
 	
 	if (cstat != NULL) {
-		ret = cstat->stat(filename.toString(), &buf, throttleRate);
+		ret = cstat->stat(filename, &buf, throttleRate);
 	} else {
 		ret = stat(filename.c_str(), &buf);
 	}
@@ -236,7 +241,7 @@ canonicalizePath(const string &path) {
 }
 
 string
-resolveSymlink(const string &path) {
+resolveSymlink(const StaticString &path) {
 	char buf[PATH_MAX];
 	ssize_t size;
 	
@@ -247,7 +252,7 @@ resolveSymlink(const string &path) {
 		} else {
 			int e = errno;
 			string message = "Cannot resolve possible symlink '";
-			message.append(path);
+			message.append(path.c_str(), path.size());
 			message.append("'");
 			throw FileSystemException(message, e, path);
 		}
@@ -255,7 +260,7 @@ resolveSymlink(const string &path) {
 		buf[size] = '\0';
 		if (buf[0] == '\0') {
 			string message = "The file '";
-			message.append(path);
+			message.append(path.c_str(), path.size());
 			message.append("' is a symlink, and it refers to an empty filename. This is not allowed.");
 			throw FileSystemException(message, ENOENT, path);
 		} else if (buf[0] == '/') {
@@ -276,6 +281,54 @@ extractDirName(const StaticString &path) {
 	return result_string;
 }
 
+StaticString
+extractDirNameStatic(const StaticString &path) {
+	breakpoint();
+	if (path.empty()) {
+		return StaticString(".", 1);
+	}
+
+	const char *data = path.data();
+	const char *end = path.data() + path.size();
+
+	// Ignore trailing '/' characters.
+	while (end > data && end[-1] == '/') {
+		end--;
+	}
+	if (end == data) {
+		// Apparently the entire path consists of slashes.
+		return StaticString("/", 1);
+	}
+
+	// Find last '/'.
+	end--;
+	while (end > data && *end != '/') {
+		end--;
+	}
+	if (end == data) {
+		if (*data == '/') {
+			// '/' found, but it's the first character in the path.
+			return StaticString("/", 1);
+		} else {
+			// No '/' found in path.
+			return StaticString(".", 1);
+		}
+	} else {
+		// '/' found and it's not the first character in path.
+		// 'end' points to that '/' character.
+		// Skip to first non-'/' character.
+		while (end >= data && *end == '/') {
+			end--;
+		}
+		if (end < data) {
+			// The entire path consists of '/' characters.
+			return StaticString("/", 1);
+		} else {
+			return StaticString(data, end - data + 1);
+		}
+	}
+}
+
 string
 extractBaseName(const StaticString &path) {
 	char *path_copy = strdup(path.c_str());
@@ -338,7 +391,7 @@ getProcessUsername() {
 		result = (struct passwd *) NULL;
 	}
 	
-	if (result == (struct passwd *) NULL) {
+	if (result == (struct passwd *) NULL || result->pw_name == NULL || result->pw_name[0] == '\0') {
 		snprintf(strings, sizeof(strings), "UID %lld", (long long) getuid());
 		strings[sizeof(strings) - 1] = '\0';
 		return strings;
@@ -359,7 +412,7 @@ parseModeString(const StaticString &mode) {
 		
 		if (clause.empty()) {
 			continue;
-		} else if (clause.size() < 2 || clause[1] != '=') {
+		} else if (clause.size() < 2 || (clause[0] != '+' && clause[1] != '=')) {
 			throw InvalidModeStringException("Invalid mode clause specification '" + clause + "'");
 		}
 		
@@ -430,6 +483,20 @@ parseModeString(const StaticString &mode) {
 				}
 			}
 			break;
+		case '+':
+			for (string::size_type i = 1; i < clause.size(); i++) {
+				switch (clause[i]) {
+				case 't':
+					modeBits |= S_ISVTX;
+					break;
+				default:
+					throw InvalidModeStringException("Invalid permission '" +
+						string(1, clause[i]) +
+						"' in mode clause specification '" +
+						clause + "'");
+				}
+			}
+			break;
 		default:
 			throw InvalidModeStringException("Invalid owner '" + string(1, clause[0]) +
 				"' in mode clause specification '" + clause + "'");
@@ -439,6 +506,63 @@ parseModeString(const StaticString &mode) {
 	return modeBits;
 }
 
+string
+absolutizePath(const StaticString &path, const StaticString &workingDir) {
+	vector<string> components;
+	if (!startsWith(path, "/")) {
+		if (workingDir.empty()) {
+			char buffer[PATH_MAX];
+			getcwd(buffer, sizeof(buffer));
+			split(buffer + 1, '/', components);
+		} else {
+			string absoluteWorkingDir = absolutizePath(workingDir);
+			split(StaticString(absoluteWorkingDir.data() + 1, absoluteWorkingDir.size() - 1),
+				'/', components);
+		}
+	}
+
+	const char *begin = path.data();
+	const char *end = path.data() + path.size();
+
+	// Skip leading slashes.
+	while (begin < end && *begin == '/') {
+		begin++;
+	}
+
+	while (begin < end) {
+		const char *next = (const char *) memchr(begin, '/', end - begin);
+		if (next == NULL) {
+			next = end;
+		}
+
+		StaticString component(begin, next - begin);
+		if (component == "..") {
+			if (!components.empty()) {
+				components.pop_back();
+			}
+		} else if (component != ".") {
+			components.push_back(component);
+		}
+
+		// Skip slashes until beginning of next path component.
+		begin = next + 1;
+		while (begin < end && *begin == '/') {
+			begin++;
+		}
+	}
+
+	string result;
+	vector<string>::const_iterator c_it, c_end = components.end();
+	for (c_it = components.begin(); c_it != c_end; c_it++) {
+		result.append("/");
+		result.append(*c_it);
+	}
+	if (result.empty()) {
+		result = "/";
+	}
+	return result;
+}
+
 const char *
 getSystemTempDir() {
 	const char *temp_dir = getenv("PASSENGER_TEMP_DIR");
@@ -528,27 +652,54 @@ makeDirTree(const string &path, const StaticString &mode, uid_t owner, gid_t gro
 
 void
 removeDirTree(const string &path) {
-	char command[PATH_MAX + 30];
-	int result;
-	
-	snprintf(command, sizeof(command), "chmod -R u+rwx \"%s\" 2>/dev/null", path.c_str());
-	command[sizeof(command) - 1] = '\0';
-	do {
-		result = system(command);
-	} while (result == -1 && errno == EINTR);
-	
-	snprintf(command, sizeof(command), "rm -rf \"%s\"", path.c_str());
-	command[sizeof(command) - 1] = '\0';
-	do {
-		result = system(command);
-	} while (result == -1 && errno == EINTR);
-	if (result == -1) {
-		char message[1024];
+	this_thread::disable_interruption di;
+	this_thread::disable_syscall_interruption dsi;
+	const char *c_path = path.c_str();
+	pid_t pid;
+
+	pid = syscalls::fork();
+	if (pid == 0) {
+		resetSignalHandlersAndMask();
+		disableMallocDebugging();
+		int devnull = open("/dev/null", O_RDONLY);
+		if (devnull != -1) {
+			dup2(devnull, 2);
+		}
+		closeAllFileDescriptors(2);
+		execlp("chmod", "chmod", "-R", "u+rwx", c_path, (char * const) 0);
+		perror("Cannot execute chmod");
+		_exit(1);
+
+	} else if (pid == -1) {
 		int e = errno;
-		
-		snprintf(message, sizeof(message) - 1, "Cannot remove directory '%s'", path.c_str());
-		message[sizeof(message) - 1] = '\0';
-		throw FileSystemException(message, e, path);
+		throw SystemException("Cannot fork a new process", e);
+
+	} else {
+		this_thread::restore_interruption ri(di);
+		this_thread::restore_syscall_interruption rsi(dsi);
+		syscalls::waitpid(pid, NULL, 0);
+	}
+
+	pid = syscalls::fork();
+	if (pid == 0) {
+		resetSignalHandlersAndMask();
+		disableMallocDebugging();
+		closeAllFileDescriptors(2);
+		execlp("rm", "rm", "-rf", c_path, (char * const) 0);
+		perror("Cannot execute rm");
+		_exit(1);
+
+	} else if (pid == -1) {
+		int e = errno;
+		throw SystemException("Cannot fork a new process", e);
+
+	} else {
+		this_thread::restore_interruption ri(di);
+		this_thread::restore_syscall_interruption rsi(dsi);
+		int status;
+		if (syscalls::waitpid(pid, &status, 0) == -1 || status != 0) {
+			throw RuntimeException("Cannot remove directory '" + path + "'");
+		}
 	}
 }
 
@@ -574,7 +725,9 @@ verifyWSGIDir(const string &dir, CachedFileStat *cstat, unsigned int throttleRat
 }
 
 void
-prestartWebApps(const ResourceLocator &locator, const string &serializedprestartURLs) {
+prestartWebApps(const ResourceLocator &locator, const string &ruby,
+	const vector<string> &prestartURLs)
+{
 	/* Apache calls the initialization routines twice during startup, and
 	 * as a result it starts two helper servers, where the first one exits
 	 * after a short idle period. We want any prespawning requests to reach
@@ -585,11 +738,9 @@ prestartWebApps(const ResourceLocator &locator, const string &serializedprestart
 	
 	this_thread::disable_interruption di;
 	this_thread::disable_syscall_interruption dsi;
-	vector<string> prestartURLs;
 	vector<string>::const_iterator it;
 	string prespawnScript = locator.getHelperScriptsDir() + "/prespawn";
 	
-	split(Base64::decode(serializedprestartURLs), '\0', prestartURLs);
 	it = prestartURLs.begin();
 	while (it != prestartURLs.end() && !this_thread::interruption_requested()) {
 		if (it->empty()) {
@@ -610,7 +761,8 @@ prestartWebApps(const ResourceLocator &locator, const string &serializedprestart
 				syscalls::close(i);
 			}
 			
-			execlp(prespawnScript.c_str(),
+			execlp(ruby.c_str(),
+				ruby.c_str(),
 				prespawnScript.c_str(),
 				it->c_str(),
 				(char *) 0);
@@ -765,6 +917,88 @@ resetSignalHandlersAndMask() {
 	sigaction(SIGUSR2, &action, NULL);
 }
 
+void
+disableMallocDebugging() {
+	unsetenv("MALLOC_FILL_SPACE");
+	unsetenv("MALLOC_PROTECT_BEFORE");
+	unsetenv("MallocGuardEdges");
+	unsetenv("MallocScribble");
+	unsetenv("MallocPreScribble");
+	unsetenv("MallocCheckHeapStart");
+	unsetenv("MallocCheckHeapEach");
+	unsetenv("MallocCheckHeapAbort");
+	unsetenv("MallocBadFreeAbort");
+	unsetenv("MALLOC_CHECK_");
+
+	const char *libs = getenv("DYLD_INSERT_LIBRARIES");
+	if (libs != NULL && strstr(libs, "/usr/lib/libgmalloc.dylib")) {
+		string newLibs = libs;
+		string::size_type pos = newLibs.find("/usr/lib/libgmalloc.dylib");
+		size_t len = strlen("/usr/lib/libgmalloc.dylib");
+
+		// Erase all leading ':' too.
+		while (pos > 0 && newLibs[pos - 1] == ':') {
+			pos--;
+			len++;
+		}
+		// Erase all trailing ':' too.
+		while (pos + len < newLibs.size() && newLibs[pos + len] == ':') {
+			len++;
+		}
+
+		newLibs.erase(pos, len);
+		if (newLibs.empty()) {
+			unsetenv("DYLD_INSERT_LIBRARIES");
+		} else {
+			setenv("DYLD_INSERT_LIBRARIES", newLibs.c_str(), 1);
+		}
+	}
+}
+
+int
+runShellCommand(const StaticString &command) {
+	pid_t pid = fork();
+	if (pid == 0) {
+		resetSignalHandlersAndMask();
+		disableMallocDebugging();
+		closeAllFileDescriptors(2);
+		execlp("/bin/sh", "/bin/sh", "-c", command.data(), (char * const) 0);
+		_exit(1);
+	} else if (pid == -1) {
+		return -1;
+	} else {
+		int status;
+		if (waitpid(pid, &status, 0) == -1) {
+			return -1;
+		} else {
+			return status;
+		}
+	}
+}
+
+#ifdef __APPLE__
+	// http://www.opensource.apple.com/source/Libc/Libc-825.26/sys/fork.c
+	// This bypasses atfork handlers.
+	extern "C" {
+		extern pid_t __fork(void);
+	}
+#endif
+
+pid_t
+asyncFork() {
+	#if defined(__linux__)
+		#if defined(SYS_fork)
+			return (pid_t) syscall(SYS_fork);
+		#else
+			return syscall(SYS_clone, SIGCHLD, 0, 0, 0, 0);
+		#endif
+	#elif defined(__APPLE__)
+		return __fork();
+	#else
+		return fork();
+	#endif
+}
+
 // Async-signal safe way to get the current process's hard file descriptor limit.
 static int
 getFileDescriptorLimit() {
@@ -844,7 +1078,7 @@ getHighestFileDescriptor() {
 	}
 	
 	do {
-		pid = fork();
+		pid = asyncFork();
 	} while (pid == -1 && errno == EINTR);
 	
 	if (pid == 0) {
@@ -1014,4 +1248,9 @@ closeAllFileDescriptors(int lastToKeepOpen) {
 	}
 }
 
+void
+breakpoint() {
+	// No-op.
+}
+
 } // namespace Passenger
diff --git a/ext/common/Utils.h b/ext/common/Utils.h
index a8a89a2..ed84db8 100644
--- a/ext/common/Utils.h
+++ b/ext/common/Utils.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -39,14 +39,18 @@
 #include <cstring>
 #include <errno.h>
 #include <unistd.h>
-#include "StaticString.h"
-#include "Exceptions.h"
+#include <StaticString.h>
+#include <Exceptions.h>
+#include <Utils/LargeFiles.h>
 
 namespace Passenger {
 
 using namespace std;
 using namespace boost;
 
+#define foreach         BOOST_FOREACH
+#define reverse_foreach BOOST_REVERSE_FOREACH
+
 static const uid_t USER_NOT_GIVEN = (uid_t) -1;
 static const gid_t GROUP_NOT_GIVEN = (gid_t) -1;
 
@@ -160,20 +164,32 @@ string canonicalizePath(const string &path);
  * If <em>path</em> doesn't refer to a symlink then this method will return
  * <em>path</em>.
  *
+ * <em>path</em> MUST be null-terminated!
+ *
  * @throws FileSystemException Something went wrong.
  * @ingroup Support
  */
-string resolveSymlink(const string &path);
+string resolveSymlink(const StaticString &path);
 
 /**
  * Given a path, extracts its directory name.
+ * <em>path</em> MUST be null-terminated!
  *
  * @ingroup Support
  */
 string extractDirName(const StaticString &path);
 
 /**
+ * Given a path, extracts its directory name. This version does not use
+ * any dynamically allocated storage and does not require `path` to be
+ * NULL-terminated. It returns a StaticString that points either to static
+ * storage, or to a substring of `path`.
+ */
+StaticString extractDirNameStatic(const StaticString &path);
+
+/**
  * Given a path, extracts its base name.
+ * <em>path</em> MUST be null-terminated!
  *
  * @ingroup Support
  */
@@ -217,6 +233,12 @@ string getProcessUsername();
 mode_t parseModeString(const StaticString &mode);
 
 /**
+ * Turns the given path into an absolute path. Unlike realpath(), this function does
+ * not resolve symlinks.
+ */
+string absolutizePath(const StaticString &path, const StaticString &workingDir = "");
+
+/**
  * Return the path name for the directory in which the system stores general
  * temporary files. This is usually "/tmp", but might be something else depending
  * on some environment variables.
@@ -297,7 +319,7 @@ void makeDirTree(const string &path, const StaticString &mode = "u=rwx,g=,o=",
  * Remove an entire directory tree recursively. If the directory doesn't exist then this
  * function does nothing.
  *
- * @throws FileSystemException Something went wrong.
+ * @throws RuntimeException Something went wrong.
  */
 void removeDirTree(const string &path);
 
@@ -343,7 +365,8 @@ bool verifyRackDir(const string &dir, CachedFileStat *cstat = 0,
 bool verifyWSGIDir(const string &dir, CachedFileStat *cstat = 0,
                    unsigned int throttleRate = 0);
 
-void prestartWebApps(const ResourceLocator &locator, const string &serializedprestartURLs);
+void prestartWebApps(const ResourceLocator &locator, const string &ruby,
+	const vector<string> &prestartURLs);
 
 /**
  * Runs the given function and catches any tracable_exceptions. Upon catching such an exception,
@@ -377,12 +400,42 @@ string getSignalName(int sig);
 void resetSignalHandlersAndMask();
 
 /**
+ * Disables malloc() debugging facilities on OS X.
+ */
+void disableMallocDebugging();
+
+/**
+ * Like system(), but properly resets the signal handler mask,
+ * disables malloc debugging and closes file descriptors > 2.
+ * _command_ must be null-terminated.
+ */
+int runShellCommand(const StaticString &command);
+
+/**
+ * Async-signal safe way to fork().
+ *
+ * On Linux, the fork() glibc wrapper grabs a ptmalloc lock, so
+ * if malloc causes a segfault then we can't fork.
+ * http://sourceware.org/bugzilla/show_bug.cgi?id=4737
+ *
+ * OS X apparently does something similar, except they use a
+ * spinlock so it results in 100% CPU. See _cthread_fork_prepare()
+ * at http://www.opensource.apple.com/source/Libc/Libc-166/threads.subproj/cthreads.c
+ */
+pid_t asyncFork();
+
+/**
  * Close all file descriptors that are higher than <em>lastToKeepOpen</em>.
  * This function is async-signal safe. But make sure there are no other
  * threads running that might open file descriptors!
  */
 void closeAllFileDescriptors(int lastToKeepOpen);
 
+/**
+ * A no-op, but usually set as a breakpoint in gdb. See CONTRIBUTING.md.
+ */
+void breakpoint();
+
 
 /**
  * Represents a buffered upload file.
@@ -405,7 +458,7 @@ public:
 		
 		snprintf(templ, sizeof(templ), "%s/%s.XXXXXX", dir.c_str(), identifier);
 		templ[sizeof(templ) - 1] = '\0';
-		fd = mkstemp(templ);
+		fd = lfs_mkstemp(templ);
 		if (fd == -1) {
 			char message[1024];
 			int e = errno;
diff --git a/ext/common/Utils/AnsiColorConstants.h b/ext/common/Utils/AnsiColorConstants.h
new file mode 100644
index 0000000..6fd24cb
--- /dev/null
+++ b/ext/common/Utils/AnsiColorConstants.h
@@ -0,0 +1,36 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2012 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_ANSI_COLOR_CONSTANTS_H_
+
+#define ANSI_COLOR_RESET    "\e[0m"
+#define ANSI_COLOR_BOLD     "\e[1m"
+#define ANSI_COLOR_RED      "\e[31m"
+#define ANSI_COLOR_GREEN    "\e[32m"
+#define ANSI_COLOR_YELLOW   "\e[33m"
+#define ANSI_COLOR_WHITE    "\e[37m"
+#define ANSI_COLOR_BLACK_BG "\e[40m"
+#define ANSI_COLOR_BLUE_BG  "\e[44m"
+
+#endif /* _PASSENGER_ANSI_COLOR_CONSTANTS_H_ */
diff --git a/ext/common/BCrypt.cpp b/ext/common/Utils/BCrypt.cpp
similarity index 100%
rename from ext/common/BCrypt.cpp
rename to ext/common/Utils/BCrypt.cpp
diff --git a/ext/common/BCrypt.h b/ext/common/Utils/BCrypt.h
similarity index 100%
rename from ext/common/BCrypt.h
rename to ext/common/Utils/BCrypt.h
diff --git a/ext/common/Utils/BlockingQueue.h b/ext/common/Utils/BlockingQueue.h
index c71ec00..f59fcf3 100644
--- a/ext/common/Utils/BlockingQueue.h
+++ b/ext/common/Utils/BlockingQueue.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -53,7 +53,7 @@ public:
 	}
 	
 	unsigned int size() const {
-		lock_guard<timed_mutex> l(lock);
+		boost::lock_guard<timed_mutex> l(lock);
 		return queue.size();
 	}
 	
@@ -70,7 +70,7 @@ public:
 	}
 	
 	bool tryAdd(const T &item) {
-		lock_guard<timed_mutex> l(lock);
+		boost::lock_guard<timed_mutex> l(lock);
 		if (!atMaxCapacity()) {
 			queue.push(item);
 			added.notify_one();
diff --git a/ext/common/Blowfish.c b/ext/common/Utils/Blowfish.c
similarity index 100%
rename from ext/common/Blowfish.c
rename to ext/common/Utils/Blowfish.c
diff --git a/ext/common/Blowfish.h b/ext/common/Utils/Blowfish.h
similarity index 100%
rename from ext/common/Blowfish.h
rename to ext/common/Utils/Blowfish.h
diff --git a/ext/common/Utils/CachedFileStat.cpp b/ext/common/Utils/CachedFileStat.cpp
index f6a619e..3a51542 100644
--- a/ext/common/Utils/CachedFileStat.cpp
+++ b/ext/common/Utils/CachedFileStat.cpp
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -27,21 +27,22 @@
 
 extern "C" {
 
-PassengerCachedFileStat *
-cached_file_stat_new(unsigned int max_size) {
-	return (PassengerCachedFileStat *) new Passenger::CachedFileStat(max_size);
+PP_CachedFileStat *
+pp_cached_file_stat_new(unsigned int max_size) {
+	return (PP_CachedFileStat *) new Passenger::CachedFileStat(max_size);
 }
 
 void
-cached_file_stat_free(PassengerCachedFileStat *cstat) {
+pp_cached_file_stat_free(PP_CachedFileStat *cstat) {
 	delete (Passenger::CachedFileStat *) cstat;
 }
 
 int
-cached_file_stat_perform(PassengerCachedFileStat *cstat,
-                         const char *filename,
-                         struct stat *buf,
-                         unsigned int throttle_rate) {
+pp_cached_file_stat_perform(PP_CachedFileStat *cstat,
+                            const char *filename,
+                            struct stat *buf,
+                            unsigned int throttle_rate)
+{
 	try {
 		return ((Passenger::CachedFileStat *) cstat)->stat(filename, buf, throttle_rate);
 	} catch (const Passenger::TimeRetrievalException &e) {
diff --git a/ext/common/Utils/CachedFileStat.h b/ext/common/Utils/CachedFileStat.h
index a25449b..a9699d8 100644
--- a/ext/common/Utils/CachedFileStat.h
+++ b/ext/common/Utils/CachedFileStat.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -34,14 +34,14 @@ extern "C" {
 
 /** C bindings for Passenger::CachedFileStat. */
 
-typedef void PassengerCachedFileStat;
+typedef void PP_CachedFileStat;
 
-PassengerCachedFileStat *cached_file_stat_new(unsigned int max_size);
-void cached_file_stat_free(PassengerCachedFileStat *cstat);
-int  cached_file_stat_perform(PassengerCachedFileStat *cstat,
-                              const char *filename,
-                              struct stat *buf,
-                              unsigned int throttle_rate);
+PP_CachedFileStat *pp_cached_file_stat_new(unsigned int max_size);
+void pp_cached_file_stat_free(PP_CachedFileStat *cstat);
+int  pp_cached_file_stat_perform(PP_CachedFileStat *cstat,
+                                 const char *filename,
+                                 struct stat *buf,
+                                 unsigned int throttle_rate);
 
 
 #ifdef __cplusplus
diff --git a/ext/common/Utils/CachedFileStat.hpp b/ext/common/Utils/CachedFileStat.hpp
index 576f8ae..a6be373 100644
--- a/ext/common/Utils/CachedFileStat.hpp
+++ b/ext/common/Utils/CachedFileStat.hpp
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -34,9 +34,12 @@
 #include <cassert>
 #include <string>
 #include <boost/shared_ptr.hpp>
+#include <boost/make_shared.hpp>
 #include <oxt/system_calls.hpp>
 
-#include "SystemTime.h"
+#include <StaticString.h>
+ #include <Utils/SystemTime.h>
+#include <Utils/StringMap.h>
 
 namespace Passenger {
 
@@ -70,13 +73,13 @@ public:
 		time_t last_time;
 		
 		/**
-		 * Checks whether <em>interval</em> seconds have elapsed since <em>begin</em>
-		 * The current time is returned via the <tt>currentTime</tt> argument,
+		 * Checks whether `interval` seconds have elapsed since `begin`.
+		 * The current time is returned via the `currentTime` argument,
 		 * so that the caller doesn't have to call time() again if it needs the current
 		 * time.
 		 *
 		 * @pre begin <= time(NULL)
-		 * @return Whether <tt>interval</tt> seconds have elapsed since <tt>begin</tt>.
+		 * @return Whether `interval` seconds have elapsed since `begin`.
 		 * @throws TimeRetrievalException Something went wrong while retrieving the time.
 		 * @throws boost::thread_interrupted
 		 */
@@ -98,9 +101,10 @@ public:
 		 *
 		 * @param filename The file to stat.
 		 */
-		Entry(const string &filename) {
+		Entry(const string &_filename)
+			: filename(_filename)
+		{
 			memset(&info, 0, sizeof(struct stat));
-			this->filename = filename;
 			last_result = -1;
 			last_errno = 0;
 			last_time = 0;
@@ -139,7 +143,7 @@ public:
 	
 	typedef shared_ptr<Entry> EntryPtr;
 	typedef list<EntryPtr> EntryList;
-	typedef map<string, EntryList::iterator> EntryMap;
+	typedef StringMap<EntryList::iterator> EntryMap;
 	
 	unsigned int maxSize;
 	EntryList entries;
@@ -156,7 +160,7 @@ public:
 	}
 	
 	/**
-	 * Stats the given file. If <tt>throttleRate</tt> seconds have passed since
+	 * Stats the given file. If `throttleRate` seconds have passed since
 	 * the last time stat() was called on this file, then the file will be
 	 * re-stat()ted, otherwise the cached stat information will be returned.
 	 *
@@ -173,36 +177,35 @@ public:
 	 *         SystemException being thrown.
 	 * @throws boost::thread_interrupted
 	 */
-	int stat(const string &filename, struct stat *buf, unsigned int throttleRate = 0) {
+	int stat(const StaticString &filename, struct stat *buf, unsigned int throttleRate = 0) {
 		boost::unique_lock<boost::mutex> l(lock);
-		EntryMap::iterator it(cache.find(filename));
+		EntryList::iterator it(cache.get(filename, entries.end()));
 		EntryPtr entry;
 		int ret;
 		
-		if (it == cache.end()) {
+		if (it == entries.end()) {
 			// Filename not in cache.
 			// If cache is full, remove the least recently used
 			// cache entry.
 			if (maxSize != 0 && cache.size() == maxSize) {
 				EntryList::iterator listEnd(entries.end());
 				listEnd--;
-				string filename((*listEnd)->filename);
+				string filename2((*listEnd)->filename);
 				entries.pop_back();
-				cache.erase(filename);
+				cache.remove(filename2);
 			}
 			
 			// Add to cache as most recently used.
-			entry = EntryPtr(new Entry(filename));
+			entry = make_shared<Entry>(filename);
 			entries.push_front(entry);
-			cache[filename] = entries.begin();
+			cache.set(filename, entries.begin());
 		} else {
 			// Cache hit.
-			entry = *it->second;
+			entry = *it;
 			
 			// Mark this cache item as most recently used.
-			entries.erase(it->second);
-			entries.push_front(entry);
-			cache[filename] = entries.begin();
+			entries.splice(entries.begin(), entries, it);
+			cache.set(filename, entries.begin());
 		}
 		ret = entry->refresh(throttleRate);
 		*buf = entry->info;
@@ -223,18 +226,18 @@ public:
 			for (int i = 0; i < toRemove; i++) {
 				string filename(entries.back()->filename);
 				entries.pop_back();
-				cache.erase(filename);
+				cache.remove(filename);
 			}
 		}
 		this->maxSize = maxSize;
 	}
 	
 	/**
-	 * Returns whether <tt>filename</tt> is in the cache.
+	 * Returns whether `filename` is in the cache.
 	 */
-	bool knows(const string &filename) const {
+	bool knows(const StaticString &filename) const {
 		boost::unique_lock<boost::mutex> l(lock);
-		return cache.find(filename) != cache.end();
+		return cache.get(filename) != EntryList::iterator();
 	}
 };
 
diff --git a/ext/common/Utils/Curl.h b/ext/common/Utils/Curl.h
new file mode 100644
index 0000000..fa52109
--- /dev/null
+++ b/ext/common/Utils/Curl.h
@@ -0,0 +1,184 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_UTILS_CURL_H_
+#define _PASSENGER_UTILS_CURL_H_
+
+/**
+ * Utilities for setting libcurl proxy information. Proxy information is contained
+ * in a user-supplied string in the form of:
+ *
+ *     protocol://[username:password@]host[:port][?option1,option2]
+ *
+ * The address may also be `none`, which indicates that proxy usage should be
+ * explicitly disabled even when environment variables such as "http_proxy" etc
+ * are set.
+ *
+ * You are supposed to prepare a CurlProxyInfo object with prepareCurlProxy().
+ * Keep this object alive as long as you're using the CURL handle.
+ * Then, call setCurlProxy() to set the proxy information on the CURL handle.
+ *
+ * prepareCurlProxy() throws ArgumentException upon encountering an invalid
+ * proxy address.
+ *
+ * If the address is an empty string, prepareCurlProxy() and setCurlProxy()
+ * don't do anything.
+ */
+
+#include <string>
+#include <cstring>
+#include <curl/curl.h>
+#include <boost/foreach.hpp>
+#include <Exceptions.h>
+#include <Utils.h>
+#include <Utils/StrIntUtils.h>
+
+namespace Passenger {
+
+using namespace std;
+using namespace boost;
+
+struct CurlProxyInfo {
+	string hostAndPort;
+	string credentials;
+	long type;
+	bool none;
+	bool httpTunnel;
+
+	CurlProxyInfo()
+		: type(0),
+		  none(false),
+		  httpTunnel(false)
+		{ }
+};
+
+inline const CurlProxyInfo
+prepareCurlProxy(const string &address) {
+	if (address.empty()) {
+		return CurlProxyInfo();
+	} else if (address == "none") {
+		CurlProxyInfo result;
+		result.none = true;
+		return result;
+	} else {
+		CurlProxyInfo result;
+		size_t protocolLen;
+		vector<string> options;
+		string::size_type pos;
+
+		if (startsWith(address, "http://")) {
+			protocolLen = strlen("http://");
+			result.type = CURLPROXY_HTTP;
+		} else if (startsWith(address, "socks5://")) {
+			protocolLen = strlen("socks5://");
+			result.type = CURLPROXY_SOCKS5;
+		} else if (startsWith(address, "socks4://")) {
+			protocolLen = strlen("socks4://");
+			#if LIBCURL_VERSION_NUM >= 0x070A00
+				result.type = CURLPROXY_SOCKS4;
+			#else
+				throw ArgumentException("Socks4 proxies are not supported because "
+					"libcurl doesn't support it. Please upgrade libcurl to version "
+					"7.10 or higher.");
+			#endif
+		} else if (startsWith(address, "socks4a://")) {
+			protocolLen = strlen("socks4a://");
+			#if LIBCURL_VERSION_NUM >= 0x071200
+				result.type = CURLPROXY_SOCKS4A;
+			#else
+				throw ArgumentException("Socks4A proxies are not supported because "
+					"libcurl doesn't support it. Please upgrade libcurl to version "
+					"7.18.0 or higher.");
+			#endif
+		} else if (startsWith(address, "socks5h://")) {
+			protocolLen = strlen("socks5h://");
+			#if LIBCURL_VERSION_NUM >= 0x071200
+				result.type = CURLPROXY_SOCKS5_HOSTNAME;
+			#else
+				throw ArgumentException("Socks5 proxies (with proxy DNS resolving) are "
+					"not supported because libcurl doesn't support it. Please upgrade "
+					"libcurl to version 7.18.0 or higher.");
+			#endif
+		} else if (address.find("://") == string::npos) {
+			throw ArgumentException("Invalid proxy address: no protocol specified.");
+		} else {
+			throw ArgumentException("Only 'http' and 'socks5' proxies are supported.");
+		}
+
+		result.hostAndPort = address.substr(protocolLen);
+
+		// Extract options.
+		pos = result.hostAndPort.find("?");
+		if (pos != string::npos) {
+			string optionsString = result.hostAndPort.substr(pos + 1);
+			result.hostAndPort.erase(pos);
+			split(optionsString, ',', options);
+		}
+
+		// Extract authentication credentials.
+		pos = result.hostAndPort.find("@");
+		if (pos != string::npos) {
+			result.credentials = result.hostAndPort.substr(0, pos);
+			result.hostAndPort.erase(0, pos + 1);
+		}
+
+		if (result.hostAndPort.empty()) {
+			throw ArgumentException("No proxy host name given.");
+		}
+
+		foreach (const string option, options) {
+			if (option == "tunnel") {
+				if (result.type == CURLPROXY_HTTP) {
+					result.httpTunnel = true;
+				} else {
+					throw ArgumentException("The 'tunnel' option is only supported for HTTP proxies.");
+				}
+			} else {
+				throw ArgumentException("Invalid proxy address option '" + option + "'.");
+			}
+		}
+
+		return result;
+	}
+}
+
+inline void
+setCurlProxy(CURL *curl, const CurlProxyInfo &proxyInfo) {
+	if (proxyInfo.hostAndPort.empty()) {
+		return;
+	} else if (proxyInfo.none) {
+		curl_easy_setopt(curl, CURLOPT_PROXY, "");
+	} else {
+		curl_easy_setopt(curl, CURLOPT_PROXY, proxyInfo.hostAndPort.c_str());
+		curl_easy_setopt(curl, CURLOPT_PROXYTYPE, proxyInfo.type);
+		curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, proxyInfo.credentials.c_str());
+		if (proxyInfo.httpTunnel) {
+			curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1);
+		}
+	}
+}
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_UTILS_CURL_H_ */
diff --git a/ext/common/Utils/FileChangeChecker.h b/ext/common/Utils/FileChangeChecker.h
index 116c1ac..b6b2e83 100644
--- a/ext/common/Utils/FileChangeChecker.h
+++ b/ext/common/Utils/FileChangeChecker.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -162,7 +162,7 @@ public:
 		} else {
 			// The file's information was already in the file list.
 			if (ret == -1 && errno == ENOENT) {
-				result = entry->lastMtime != 0 || entry->lastCtime != 0;
+				result = false;
 				entry->lastMtime = 0;
 				entry->lastCtime = 0;
 			} else if (ret == -1) {
@@ -175,7 +175,7 @@ public:
 			return result;
 		}
 	}
-	
+
 	/**
 	 * Change the maximum size of the internal file list.
 	 *
diff --git a/ext/common/Utils/HashMap.h b/ext/common/Utils/HashMap.h
new file mode 100644
index 0000000..fe71fae
--- /dev/null
+++ b/ext/common/Utils/HashMap.h
@@ -0,0 +1,50 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+
+#ifndef _PASSENGER_HASH_MAP_H_
+#define _PASSENGER_HASH_MAP_H_
+
+/*
+ * There are too many ways to include hash_map/unordered_map!
+ * This header autodetects the correct method.
+ */
+#if defined(HAS_TR1_UNORDERED_MAP)
+	#include <tr1/unordered_map>
+	#define HashMap std::tr1::unordered_map
+#elif defined(HASH_NAMESPACE) && defined(HASH_MAP_HEADER)
+	#include HASH_MAP_HEADER
+	#define HashMap HASH_NAMESPACE::hash_map
+#elif defined(__GNUC__)
+	#include <ext/hash_map>
+	#define HashMap __gnu_cxx::hash_map
+#elif defined(_MSC_VER)
+	#include <hash_map>
+	#define HashMap stdext::hash_map
+#else
+	#include <tr/unordered_map>
+	#define HashMap std::tr1::unordered_map;
+#endif
+
+#endif /* _PASSENGER_HASH_MAP_H_ */
diff --git a/ext/common/Utils/HttpConstants.h b/ext/common/Utils/HttpConstants.h
new file mode 100644
index 0000000..21b7cd3
--- /dev/null
+++ b/ext/common/Utils/HttpConstants.h
@@ -0,0 +1,170 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2012 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_HTTP_CONSTANTS_H_
+#define _PASSENGER_HTTP_CONSTANTS_H_
+
+namespace Passenger {
+
+inline const char *
+getStatusCodeAndReasonPhrase(int statusCode) {
+	// http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
+	switch (statusCode) {
+	case 100:
+		return "100 Continue";
+	case 101:
+		return "101 Switching Protocols";
+	case 102:
+		return "102 Processing";
+	case 200:
+		return "200 OK";
+	case 201:
+		return "201 Created";
+	case 202:
+		return "202 Accepted";
+	case 203:
+		return "203 Non-Authoritative Information";
+	case 204:
+		return "204 No Content";
+	case 205:
+		return "205 Reset Content";
+	case 206:
+		return "206 Partial Content";
+	case 207:
+		return "207 Multi-Status";
+	case 208:
+		return "208 Already Reported";
+	case 226:
+		return "226 IM Used";
+	case 300:
+		return "300 Multiple Choices";
+	case 301:
+		return "301 Moved Permanently";
+	case 302:
+		return "302 Found";
+	case 303:
+		return "303 See Other";
+	case 304:
+		return "304 Not Modified";
+	case 305:
+		return "305 Use Proxy";
+	case 306:
+		return "306 Switch Proxy";
+	case 307:
+		return "307 Temporary Redirect";
+	case 308:
+		// Google Gears: http://code.google.com/p/gears/wiki/ResumableHttpRequestsProposal
+		return "308 Resume Incomplete";
+	case 400:
+		return "400 Bad Request";
+	case 401:
+		return "401 Unauthorized";
+	case 402:
+		return "402 Payment Required";
+	case 403:
+		return "403 Forbidden";
+	case 404:
+		return "404 Not Found";
+	case 405:
+		return "405 Method Not Allowed";
+	case 406:
+		return "406 Not Acceptable";
+	case 407:
+		return "407 Proxy Authentication Required";
+	case 408:
+		return "408 Request Timeout";
+	case 409:
+		return "409 Conflict";
+	case 410:
+		return "410 Gone";
+	case 411:
+		return "411 Length Required";
+	case 412:
+		return "412 Precondition Failed";
+	case 413:
+		return "413 Request Entity Too Large";
+	case 414:
+		return "414 Request-URI Too Long";
+	case 415:
+		return "415 Unsupported Media Type";
+	case 416:
+		return "416 Requested Range Not Satisfiable";
+	case 417:
+		return "417 Expectation Failed";
+	case 418:
+		return "418 Not A Funny April Fools Joke";
+	case 420:
+		// https://dev.twitter.com/docs/error-codes-responses
+		return "420 Enhance Your Calm";
+	case 422:
+		return "422 Unprocessable Entity";
+	case 423:
+		return "423 Locked";
+	case 424:
+		return "424 Unordered Collection";
+	case 426:
+		return "426 Upgrade Required";
+	case 428:
+		return "428 Precondition Required";
+	case 429:
+		return "429 Too Many Requests";
+	case 431:
+		return "431 Request Header Fields Too Large";
+	case 444:
+		// Nginx specific, used for timeouts.
+		return "444 No Response";
+	case 449:
+		return "449 Retry With";
+	case 450:
+		return "450 Blocked";
+	case 500:
+		return "500 Internal Server Error";
+	case 501:
+		return "501 Not Implemented";
+	case 502:
+		return "502 Bad Gateway";
+	case 503:
+		return "503 Service Unavailable";
+	case 504:
+		return "504 Gateway Timeout";
+	case 505:
+		return "505 HTTP Version Not Supported";
+	case 506:
+		return "506 Variant Also Negotiates";
+	case 507:
+		return "507 Insufficient Storage";
+	case 509:
+		return "509 Bandwidth Limit Exceeded";
+	case 510:
+		return "510 Not Extended";
+	case 511:
+		return "511 Network Authentication Required";
+	default:
+		return (const char *) 0;
+	}
+}
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_HTTP_CONSTANTS_H_ */
diff --git a/ext/common/Utils/HttpHeaderBufferer.h b/ext/common/Utils/HttpHeaderBufferer.h
index 1d0085d..7ebea5e 100644
--- a/ext/common/Utils/HttpHeaderBufferer.h
+++ b/ext/common/Utils/HttpHeaderBufferer.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2011 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -80,7 +80,7 @@ private:
 public:
 	HttpHeaderBufferer() {
 		sbmh_init(&u.terminatorFinder,
-			&staticData.occ,
+			NULL,
 			(const unsigned char *) "\r\n\r\n",
 			4);
 		max = 1024 * 128;
diff --git a/ext/common/Utils/IOUtils.cpp b/ext/common/Utils/IOUtils.cpp
index 0ad258c..0091769 100644
--- a/ext/common/Utils/IOUtils.cpp
+++ b/ext/common/Utils/IOUtils.cpp
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2012 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -43,20 +43,31 @@
 #include <netdb.h>
 #include <unistd.h>
 #include <fcntl.h>
-#include <limits.h>
+#include <limits.h> // Also for __GLIBC__ macro.
+#include <cstdio>
 #include <cstdlib>
 #include <cstring>
 #include <cerrno>
 #include <cmath>
 
 #ifdef __linux__
+	// For accept4 macros
 	#include <sys/syscall.h>
+	#include <linux/net.h>
 #endif
 
-#include "Timer.h"
-#include "IOUtils.h"
-#include "StrIntUtils.h"
-#include "../Exceptions.h"
+#if defined(__APPLE__)
+	#define HAVE_FPURGE
+#elif defined(__GLIBC__)
+	#include <stdio_ext.h>
+	#define HAVE___FPURGE
+#endif
+
+#include <Exceptions.h>
+#include <Utils/Timer.h>
+#include <Utils/IOUtils.h>
+#include <Utils/StrIntUtils.h>
+#include <Utils/ScopeGuard.h>
 
 namespace Passenger {
 
@@ -74,6 +85,19 @@ using namespace oxt;
 static WritevFunction writevFunction = syscalls::writev;
 
 
+bool
+purgeStdio(FILE *f) {
+	#if defined(HAVE_FPURGE)
+		fpurge(f);
+		return true;
+	#elif defined(HAVE___FPURGE)
+		__fpurge(f);
+		return true;
+	#else
+		return false;
+	#endif
+}
+
 ServerAddressType
 getSocketAddressType(const StaticString &address) {
 	const char *data = address.c_str();
@@ -155,24 +179,17 @@ setNonBlocking(int fd) {
 }
 
 int
-tryAccept4(int sock, struct sockaddr *addr, socklen_t *addr_len, int options) {
-	#if defined(__linux__) && defined(__x86_64__)
-		int ret;
-		do {
-			ret = syscall(288, sock, addr, addr_len, options);
-		} while (ret == -1 && errno == EINTR);
-		return ret;
-	#elif defined(__linux__) && defined(__i386__)
+callAccept4(int sock, struct sockaddr *addr, socklen_t *addr_len, int options) {
+	#if defined(HAVE_ACCEPT4)
 		int ret;
 		do {
-			ret = syscall(__NR_socketcall, 18,
-				sock, addr, addr_len, options);
+			ret = ::accept4(sock, addr, addr_len, options);
 		} while (ret == -1 && errno == EINTR);
 		return ret;
-	#elif defined(SYS_ACCEPT4)
+	#elif defined(__linux__) && defined(__x86_64__)
 		int ret;
 		do {
-			ret = ::accept4(sock, addr, addr_len, options);
+			ret = syscall(288, sock, addr, addr_len, options);
 		} while (ret == -1 && errno == EINTR);
 		return ret;
 	#else
@@ -252,6 +269,7 @@ createUnixServer(const StaticString &filename, unsigned int backlogSize, bool au
 		throw SystemException("Cannot create a Unix socket file descriptor", e);
 	}
 	
+	FdGuard guard(fd, true);
 	addr.sun_family = AF_LOCAL;
 	strncpy(addr.sun_path, filename.c_str(), filename.size());
 	addr.sun_path[filename.size()] = '\0';
@@ -262,30 +280,19 @@ createUnixServer(const StaticString &filename, unsigned int backlogSize, bool au
 		} while (ret == -1 && errno == EINTR);
 	}
 	
-	try {
-		ret = syscalls::bind(fd, (const struct sockaddr *) &addr, sizeof(addr));
-	} catch (...) {
-		safelyClose(fd, true);
-		throw;
-	}
+	ret = syscalls::bind(fd, (const struct sockaddr *) &addr, sizeof(addr));
 	if (ret == -1) {
 		int e = errno;
 		string message = "Cannot bind Unix socket '";
 		message.append(filename.toString());
 		message.append("'");
-		safelyClose(fd, true);
 		throw SystemException(message, e);
 	}
 	
 	if (backlogSize == 0) {
 		backlogSize = 1024;
 	}
-	try {
-		ret = syscalls::listen(fd, backlogSize);
-	} catch (...) {
-		safelyClose(fd, true);
-		throw;
-	}
+	ret = syscalls::listen(fd, backlogSize);
 	if (ret == -1) {
 		int e = errno;
 		string message = "Cannot listen on Unix socket '";
@@ -295,6 +302,7 @@ createUnixServer(const StaticString &filename, unsigned int backlogSize, bool au
 		throw SystemException(message, e);
 	}
 	
+	guard.clear();
 	return fd;
 }
 
@@ -326,53 +334,40 @@ createTcpServer(const char *address, unsigned short port, unsigned int backlogSi
 		throw SystemException("Cannot create a TCP socket file descriptor", e);
 	}
 	
-	try {
-		ret = syscalls::bind(fd, (const struct sockaddr *) &addr, sizeof(addr));
-	} catch (...) {
-		safelyClose(fd, true);
-		throw;
-	}
+	FdGuard guard(fd, true);
+	ret = syscalls::bind(fd, (const struct sockaddr *) &addr, sizeof(addr));
 	if (ret == -1) {
 		int e = errno;
 		string message = "Cannot bind a TCP socket on address '";
 		message.append(address);
 		message.append("' port ");
 		message.append(toString(port));
-		safelyClose(fd, true);
 		throw SystemException(message, e);
 	}
 	
 	optval = 1;
-	try {
-		if (syscalls::setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
-			&optval, sizeof(optval)) == -1) {
-				printf("so_reuseaddr failed: %s\n", strerror(errno));
-			}
-	} catch (...) {
-		safelyClose(fd, true);
-		throw;
+	if (syscalls::setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
+		&optval, sizeof(optval)) == -1)
+	{
+		int e = errno;
+		fprintf(stderr, "so_reuseaddr failed: %s\n", strerror(e));
 	}
-	// Ignore SO_REUSEPORT error, it's not fatal.
+	// Ignore SO_REUSEADDR error, it's not fatal.
 	
 	if (backlogSize == 0) {
 		backlogSize = 1024;
 	}
-	try {
-		ret = syscalls::listen(fd, backlogSize);
-	} catch (...) {
-		safelyClose(fd, true);
-		throw;
-	}
+	ret = syscalls::listen(fd, backlogSize);
 	if (ret == -1) {
 		int e = errno;
 		string message = "Cannot listen on TCP socket '";
 		message.append(address);
 		message.append("' port ");
 		message.append(toString(port));
-		safelyClose(fd, true);
 		throw SystemException(message, e);
 	}
 	
+	guard.clear();
 	return fd;
 }
 
@@ -396,22 +391,23 @@ connectToServer(const StaticString &address) {
 
 int
 connectToUnixServer(const StaticString &filename) {
-	int fd, ret;
+	int fd = syscalls::socket(PF_UNIX, SOCK_STREAM, 0);
+	if (fd == -1) {
+		int e = errno;
+		throw SystemException("Cannot create a Unix socket file descriptor", e);
+	}
+
+	FdGuard guard(fd, true);
+	int ret;
 	struct sockaddr_un addr;
 	
 	if (filename.size() > sizeof(addr.sun_path) - 1) {
 		string message = "Cannot connect to Unix socket '";
-		message.append(filename.toString());
+		message.append(filename.data(), filename.size());
 		message.append("': filename is too long.");
 		throw RuntimeException(message);
 	}
 	
-	fd = syscalls::socket(PF_UNIX, SOCK_STREAM, 0);
-	if (fd == -1) {
-		int e = errno;
-		throw SystemException("Cannot create a Unix socket file descriptor", e);
-	}
-	
 	addr.sun_family = AF_UNIX;
 	memcpy(addr.sun_path, filename.c_str(), filename.size());
 	addr.sun_path[filename.size()] = '\0';
@@ -419,12 +415,7 @@ connectToUnixServer(const StaticString &filename) {
 	bool retry = true;
 	int counter = 0;
 	while (retry) {
-		try {
-			ret = syscalls::connect(fd, (const sockaddr *) &addr, sizeof(addr));
-		} catch (...) {
-			safelyClose(fd, true);
-			throw;
-		}
+		ret = syscalls::connect(fd, (const sockaddr *) &addr, sizeof(addr));
 		if (ret == -1) {
 			#if defined(sun) || defined(__sun)
 				/* Solaris has this nice kernel bug where connecting to
@@ -446,10 +437,10 @@ connectToUnixServer(const StaticString &filename) {
 				string message("Cannot connect to Unix socket '");
 				message.append(filename.toString());
 				message.append("'");
-				safelyClose(fd, true);
 				throw SystemException(message, e);
 			}
 		} else {
+			guard.clear();
 			return fd;
 		}
 	}
@@ -457,6 +448,51 @@ connectToUnixServer(const StaticString &filename) {
 	return -1; // Shut up compiler warning.
 }
 
+void
+setupNonBlockingUnixSocket(NUnix_State &state, const StaticString &filename) {
+	state.fd = syscalls::socket(PF_UNIX, SOCK_STREAM, 0);
+	if (state.fd == -1) {
+		int e = errno;
+		throw SystemException("Cannot create a Unix socket file descriptor", e);
+	}
+
+	state.filename = filename;
+	setNonBlocking(state.fd);
+}
+
+bool
+connectToUnixServer(NUnix_State &state) {
+	struct sockaddr_un addr;
+	int ret;
+	
+	if (state.filename.size() > sizeof(addr.sun_path) - 1) {
+		string message = "Cannot connect to Unix socket '";
+		message.append(state.filename.data(), state.filename.size());
+		message.append("': filename is too long.");
+		throw RuntimeException(message);
+	}
+
+	addr.sun_family = AF_UNIX;
+	memcpy(addr.sun_path, state.filename.data(), state.filename.size());
+	addr.sun_path[state.filename.size()] = '\0';
+
+	ret = syscalls::connect(state.fd, (const sockaddr *) &addr, sizeof(addr));
+	if (ret == -1) {
+		if (errno == EINPROGRESS || errno == EWOULDBLOCK) {
+			return false;
+		} else if (errno == EISCONN) {
+			return true;
+		} else {
+			int e = errno;
+			string message = "Cannot connect to Unix socket '";
+			message.append(state.filename.data(), state.filename.size());
+			throw SystemException(message, e);
+		}
+	} else {
+		return true;
+	}
+}
+
 int
 connectToTcpServer(const StaticString &hostname, unsigned int port) {
 	struct addrinfo hints, *res;
@@ -510,6 +546,97 @@ connectToTcpServer(const StaticString &hostname, unsigned int port) {
 	return fd;
 }
 
+void
+setupNonBlockingTcpSocket(NTCP_State &state, const StaticString &hostname, int port) {
+	int ret;
+
+	memset(&state.hints, 0, sizeof(state.hints));
+	state.hints.ai_family   = PF_UNSPEC;
+	state.hints.ai_socktype = SOCK_STREAM;
+	ret = getaddrinfo(hostname.toString().c_str(), toString(port).c_str(),
+		&state.hints, &state.res);
+	if (ret != 0) {
+		string message = "Cannot resolve IP address '";
+		message.append(hostname.data(), hostname.size());
+		message.append(":");
+		message.append(toString(port));
+		message.append("': ");
+		message.append(gai_strerror(ret));
+		throw IOException(message);
+	}
+
+	state.fd = syscalls::socket(PF_INET, SOCK_STREAM, 0);
+	if (state.fd == -1) {
+		int e = errno;
+		throw SystemException("Cannot create a TCP socket file descriptor", e);
+	}
+
+	state.hostname = hostname;
+	state.port = port;
+	setNonBlocking(state.fd);
+}
+
+bool
+connectToTcpServer(NTCP_State &state) {
+	int ret;
+
+	ret = syscalls::connect(state.fd, state.res->ai_addr, state.res->ai_addrlen);
+	if (ret == -1) {
+		if (errno == EINPROGRESS || errno == EWOULDBLOCK) {
+			return false;
+		} else if (errno == EISCONN) {
+			freeaddrinfo(state.res);
+			state.res = NULL;
+			return true;
+		} else {
+			int e = errno;
+			string message = "Cannot connect to TCP socket '";
+			message.append(state.hostname);
+			message.append(":");
+			message.append(toString(state.port));
+			message.append("'");
+			throw SystemException(message, e);
+		}
+	} else {
+		freeaddrinfo(state.res);
+		state.res = NULL;
+		return true;
+	}
+}
+
+void
+setupNonBlockingSocket(NConnect_State &state, const StaticString &address) {
+	TRACE_POINT();
+	state.type = getSocketAddressType(address);
+	switch (state.type) {
+	case SAT_UNIX:
+		setupNonBlockingUnixSocket(state.s_unix, parseUnixSocketAddress(address));
+		break;
+	case SAT_TCP: {
+		string host;
+		unsigned short port;
+		
+		parseTcpSocketAddress(address, host, port);
+		setupNonBlockingTcpSocket(state.s_tcp, host, port);
+		break;
+	}
+	default:
+		throw ArgumentException(string("Unknown address type for '") + address + "'");
+	}
+}
+
+bool
+connectToServer(NConnect_State &state) {
+	switch (state.type) {
+	case SAT_UNIX:
+		return connectToUnixServer(state.s_unix);
+	case SAT_TCP:
+		return connectToTcpServer(state.s_tcp);
+	default:
+		throw RuntimeException("Unknown address type");
+	}
+}
+
 SocketPair
 createUnixSocketPair() {
 	int fds[2];
@@ -617,7 +744,8 @@ writeExact(int fd, const void *data, unsigned int size, unsigned long long *time
 
 void
 writeExact(int fd, const StaticString &data, unsigned long long *timeout) {
-	writeExact(fd, data.c_str(), data.size(), timeout);
+	const char * restrict data_ptr = data.data();
+	writeExact(fd, data_ptr, data.size(), timeout);
 }
 
 /**
@@ -665,7 +793,7 @@ staticStringArrayToIoVec(const StaticString ary[], size_t count, struct iovec *v
  */
 static void
 findDataPositionIndexAndOffset(struct iovec data[], size_t count,
-	size_t position, size_t *index, size_t *offset)
+	size_t position, size_t * restrict index, size_t * restrict offset)
 {
 	size_t i;
 	size_t begin = 0;
@@ -690,7 +818,7 @@ findDataPositionIndexAndOffset(struct iovec data[], size_t count,
 }
 
 ssize_t
-gatheredWrite(int fd, const StaticString data[], unsigned int dataCount, string &restBuffer) {
+gatheredWrite(int fd, const StaticString *data, unsigned int dataCount, string &restBuffer) {
 	size_t totalSize, iovCount, i;
 	ssize_t ret;
 	
@@ -834,7 +962,7 @@ eraseBeginningOfIoVec(struct iovec *iov, size_t count, size_t index, size_t offs
 }
 
 void
-gatheredWrite(int fd, const StaticString data[], unsigned int count, unsigned long long *timeout) {
+gatheredWrite(int fd, const StaticString *data, unsigned int count, unsigned long long *timeout) {
 	struct iovec iov[count];
 	size_t total, iovCount;
 	size_t written = 0;
@@ -996,5 +1124,43 @@ safelyClose(int fd, bool ignoreErrors) {
 	}
 }
 
+string
+readAll(const string &filename) {
+	FILE *f = fopen(filename.c_str(), "rb");
+	if (f != NULL) {
+		StdioGuard guard(f);
+		return readAll(fileno(f));
+	} else {
+		int e = errno;
+		throw FileSystemException("Cannot open '" + filename + "' for reading",
+			e, filename);
+	}
+}
+
+string
+readAll(int fd) {
+	string result;
+	char buf[1024 * 32];
+	ssize_t ret;
+	while (true) {
+		do {
+			ret = read(fd, buf, sizeof(buf));
+		} while (ret == -1 && errno == EINTR);
+		if (ret == 0) {
+			break;
+		} else if (ret == -1) {
+			if (errno == ECONNRESET) {
+				break;
+			} else {
+				int e = errno;
+				throw SystemException("Cannot read from file descriptor", e);
+			}
+		} else {
+			result.append(buf, ret);
+		}
+	}
+	return result;
+}
+
 
 } // namespace Passenger
diff --git a/ext/common/Utils/IOUtils.h b/ext/common/Utils/IOUtils.h
index f4b4e5a..e4488a3 100644
--- a/ext/common/Utils/IOUtils.h
+++ b/ext/common/Utils/IOUtils.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -26,10 +26,15 @@
 #define _PASSENGER_IO_UTILS_H_
 
 #include <sys/types.h>
+#include <sys/socket.h>
 #include <sys/uio.h>
+#include <cstdio>
+#include <cstddef>
 #include <unistd.h>
+#include <netdb.h>
 #include <string>
 #include <vector>
+#include <oxt/macros.hpp>
 #include <StaticString.h>
 #include <FileDescriptor.h>
 
@@ -45,6 +50,8 @@ enum ServerAddressType {
 
 typedef ssize_t (*WritevFunction)(int fildes, const struct iovec *iov, int iovcnt);
 
+bool purgeStdio(FILE *f);
+
 /**
  * Accepts a server address in one of the following formats, and returns which one it is:
  *
@@ -75,7 +82,9 @@ string parseUnixSocketAddress(const StaticString &address);
  *
  * @throw ArgumentException <tt>address</tt> is not a valid TCP socket address.
  */
-void parseTcpSocketAddress(const StaticString &address, string &host, unsigned short &port);
+void parseTcpSocketAddress(const StaticString & restrict_ref address,
+	string & restrict_ref host,
+	unsigned short & restrict_ref port);
 
 /**
  * Returns whether the given socket address (as accepted by getSocketAddressType())
@@ -97,7 +106,10 @@ void setNonBlocking(int fd);
  * Try to call the Linux accept4() system call. If the system call is
  * not available, then -1 is returned and errno is set to ENOSYS.
  */
-int callAccept4(int sock, struct sockaddr *addr, socklen_t *addr_len, int options);
+int callAccept4(int sock,
+	struct sockaddr * restrict addr,
+	socklen_t * restrict addr_len,
+	int options);
 
 /**
  * Resolves the given host name and returns a list of IP addresses.
@@ -110,7 +122,9 @@ int callAccept4(int sock, struct sockaddr *addr, socklen_t *addr_len, int option
  * IP addresses, then these addresses will be shuffled before they are
  * returned in order to improve load balancing.
  */
-vector<string> resolveHostname(const string &hostname, unsigned int port = 0, bool shuffle = true);
+vector<string> resolveHostname(const string &hostname,
+	unsigned int port = 0,
+	bool shuffle = true);
 
 /**
  * Create a new Unix or TCP server socket, depending on the address type.
@@ -128,7 +142,9 @@ vector<string> resolveHostname(const string &hostname, unsigned int port = 0, bo
  * @throws boost::thread_interrupted A system call has been interrupted.
  * @ingroup Support
  */
-int createServer(const StaticString &address, unsigned int backlogSize = 0, bool autoDelete = true);
+int createServer(const StaticString &address,
+	unsigned int backlogSize = 0,
+	bool autoDelete = true);
 
 /**
  * Create a new Unix server socket which is bounded to <tt>filename</tt>.
@@ -143,7 +159,9 @@ int createServer(const StaticString &address, unsigned int backlogSize = 0, bool
  * @throws boost::thread_interrupted A system call has been interrupted.
  * @ingroup Support
  */
-int createUnixServer(const StaticString &filename, unsigned int backlogSize = 0, bool autoDelete = true);
+int createUnixServer(const StaticString &filename,
+	unsigned int backlogSize = 0,
+	bool autoDelete = true);
 
 /**
  * Create a new TCP server socket which is bounded to the given address and port.
@@ -160,13 +178,16 @@ int createUnixServer(const StaticString &filename, unsigned int backlogSize = 0,
  * @throws boost::thread_interrupted A system call has been interrupted.
  * @ingroup Support
  */
-int createTcpServer(const char *address = "0.0.0.0", unsigned short port = 0, unsigned int backlogSize = 0);
+int createTcpServer(const char *address = "0.0.0.0",
+	unsigned short port = 0,
+	unsigned int backlogSize = 0);
 
 /**
- * Connect to a server at the given address.
+ * Connect to a server at the given address in a blocking manner.
  *
  * @param address An address as accepted by getSocketAddressType().
  * @return The file descriptor of the connected client socket.
+ * @throws ArgumentException Unknown address type.
  * @throws RuntimeException Something went wrong.
  * @throws SystemException Something went wrong while connecting to the server.
  * @throws IOException Something went wrong while connecting to the server.
@@ -176,7 +197,7 @@ int createTcpServer(const char *address = "0.0.0.0", unsigned short port = 0, un
 int connectToServer(const StaticString &address);
 
 /**
- * Connect to a Unix server socket at <tt>filename</tt>.
+ * Connect to a Unix server socket at <tt>filename</tt> in a blocking manner.
  *
  * @param filename The filename of the socket to connect to.
  * @return The file descriptor of the connected client socket.
@@ -188,7 +209,7 @@ int connectToServer(const StaticString &address);
 int connectToUnixServer(const StaticString &filename);
 
 /**
- * Connect to a TCP server socket at the given host name and port.
+ * Connect to a TCP server socket at the given host name and port in a blocking manner.
  *
  * @param hostname The host name of the TCP server.
  * @param port The port number of the TCP server.
@@ -200,6 +221,120 @@ int connectToUnixServer(const StaticString &filename);
  */
 int connectToTcpServer(const StaticString &hostname, unsigned int port);
 
+/** State structure for non-blocking connectToUnixServer(). */
+struct NUnix_State {
+	FileDescriptor fd;
+	string filename;
+};
+
+/**
+ * Setup a Unix domain socket for non-blocking connecting. When done,
+ * the file descriptor can be accessed through <tt>state.fd</tt>.
+ *
+ * @param state A state structure.
+ * @param filename The filename of the socket to connect to.
+ * @throws SystemException Something went wrong.
+ * @throws boost::thread_interrupted A system call has been interrupted.
+ * @ingroup Support
+ */
+void setupNonBlockingUnixSocket(NUnix_State & restrict_ref state,
+	const StaticString & restrict_ref filename);
+
+/**
+ * Connect a Unix domain socket in non-blocking mode.
+ *
+ * @param state A state structure.
+ * @return True if the socket was successfully connected, false if the socket isn't
+ *         ready yet, in which case the caller should select() on the socket until it's writable.
+ * @throws RuntimeException Something went wrong.
+ * @throws SystemException Something went wrong while connecting to the Unix server.
+ * @throws boost::thread_interrupted A system call has been interrupted.
+ * @ingroup Support
+ */
+bool connectToUnixServer(NUnix_State &state);
+
+/** State structure for non-blocking connectToTcpServer(). */
+struct NTCP_State {
+	FileDescriptor fd;
+	struct addrinfo hints, *res;
+	string hostname;
+	int port;
+
+	NTCP_State() {
+		memset(&hints, 0, sizeof(hints));
+		res = NULL;
+		port = 0;
+	}
+
+	~NTCP_State() {
+		if (res != NULL) {
+			freeaddrinfo(res);
+		}
+	}
+};
+
+/**
+ * Setup a TCP socket for non-blocking connecting. When done,
+ * the file descriptor can be accessed through <tt>state.fd</tt>.
+ *
+ * @param state A state structure.
+ * @param hostname The host name of the TCP server.
+ * @param port The port number of the TCP server.
+ * @throws IOException Something went wrong.
+ * @throws SystemException Something went wrong.
+ * @throws boost::thread_interrupted A system call has been interrupted.
+ * @ingroup Support
+ */
+void setupNonBlockingTcpSocket(NTCP_State & restrict_ref state,
+	const StaticString & restrict_ref hostname,
+	int port);
+
+/**
+ * Connect a TCP socket in non-blocking mode.
+ *
+ * @param state A state structure.
+ * @return True if the socket was successfully connected, false if the socket isn't
+ *         ready yet, in which case the caller should select() on the socket until it's writable.
+ * @throws SystemException Something went wrong while connecting to the server.
+ * @throws boost::thread_interrupted A system call has been interrupted.
+ * @ingroup Support
+ */
+bool connectToTcpServer(NTCP_State &state);
+
+struct NConnect_State {
+	ServerAddressType type;
+	NUnix_State s_unix;
+	NTCP_State s_tcp;
+};
+
+/**
+ * Setup a socket for non-blocking connecting to the given address.
+ *
+ * @param A state structure.
+ * @param address An address as accepted by getSocketAddressType().
+ * @throws ArgumentException Unknown address type.
+ * @throws RuntimeException Something went wrong.
+ * @throws SystemException Something went wrong.
+ * @throws IOException Something went wrong.
+ * @throws boost::thread_interrupted A system call has been interrupted.
+ * @ingroup Support
+ */
+void setupNonBlockingSocket(NConnect_State & restrict_ref state,
+	const StaticString & restrict_ref address);
+
+/**
+ * Connect a socket in non-blocking mode.
+ *
+ * @param state A state structure.
+ * @return True if the socket was successfully connected, false if the socket isn't
+ *         ready yet, in which case the caller should select() on the socket until it's writable.
+ * @throws RuntimeException Something went wrong.
+ * @throws SystemException Something went wrong.
+ * @throws boost::thread_interrupted A system call has been interrupted.
+ * @ingroup Support
+ */
+bool connectToServer(NConnect_State &state);
+
 /**
  * Creates a Unix domain socket pair.
  *
@@ -270,7 +405,7 @@ bool waitUntilWritable(int fd, unsigned long long *timeout);
  *                          <tt>timeout</tt> microseconds.
  * @throws boost::thread_interrupted
  */
-unsigned int readExact(int fd, void *buf, unsigned int size, unsigned long long *timeout = NULL);
+unsigned int readExact(int fd, void * restrict buf, unsigned int size, unsigned long long * restrict timeout = NULL);
 
 /**
  * Writes a block of data to the given file descriptor and blocks until everything
@@ -298,8 +433,8 @@ unsigned int readExact(int fd, void *buf, unsigned int size, unsigned long long
  *                          <tt>timeout</tt> microseconds.
  * @throws boost::thread_interrupted
  */
-void writeExact(int fd, const void *data, unsigned int size, unsigned long long *timeout = NULL);
-void writeExact(int fd, const StaticString &data, unsigned long long *timeout = NULL);
+void writeExact(int fd, const void * restrict data, unsigned int size, unsigned long long * restrict timeout = NULL);
+void writeExact(int fd, const StaticString & restrict_ref data, unsigned long long * restrict timeout = NULL);
 
 /**
  * Writes a bunch of data to the given file descriptor using a gathering I/O interface.
@@ -329,7 +464,7 @@ void writeExact(int fd, const StaticString &data, unsigned long long *timeout =
  *         isn't related to non-blocking writes.
  * @throws boost::thread_interrupted
  */
-ssize_t gatheredWrite(int fd, const StaticString data[], unsigned int dataCount, string &restBuffer);
+ssize_t gatheredWrite(int fd, const StaticString * restrict data, unsigned int dataCount, string & restrict_ref restBuffer);
 
 /**
  * Writes a bunch of data to the given file descriptor using a gathering I/O interface.
@@ -357,7 +492,7 @@ ssize_t gatheredWrite(int fd, const StaticString data[], unsigned int dataCount,
  *                          <tt>timeout</tt> microseconds.
  * @throws boost::thread_interrupted
  */
-void    gatheredWrite(int fd, const StaticString data[], unsigned int dataCount, unsigned long long *timeout = NULL);
+void    gatheredWrite(int fd, const StaticString * restrict data, unsigned int dataCount, unsigned long long * restrict timeout = NULL);
 
 /**
  * Sets a writev-emulating function that gatheredWrite() should call instead of the real writev().
@@ -427,6 +562,20 @@ void writeFileDescriptor(int fd, int fdToSend, unsigned long long *timeout = NUL
 	void safelyClose(int fd, bool ignoreErrors = false);
 #endif
 
+/**
+ * Read all data from the given file until EOF.
+ *
+ * @throws SystemException
+ */
+string readAll(const string &filename);
+
+/**
+ * Read all data from the given file descriptor until EOF.
+ *
+ * @throws SystemException
+ */
+string readAll(int fd);
+
 } // namespace Passenger
 
 #endif /* _PASSENGER_IO_UTILS_H_ */
diff --git a/ext/common/Utils/IniFile.h b/ext/common/Utils/IniFile.h
new file mode 100644
index 0000000..1ce0c7c
--- /dev/null
+++ b/ext/common/Utils/IniFile.h
@@ -0,0 +1,520 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_INI_FILE_H_
+#define _PASSENGER_INI_FILE_H_
+
+#include <utility>
+#include <string>
+#include <map>
+#include <fstream>
+#include <iostream>
+#include <cstdio>
+#include <cstring>
+#include <cassert>
+#include <cctype>
+#include <boost/shared_ptr.hpp>
+#include <boost/make_shared.hpp>
+#include <Exceptions.h>
+
+namespace Passenger {
+
+using namespace std;
+using namespace boost;
+
+
+class IniFileSection {
+protected:
+	typedef map<string, string> ValueMap;
+	string sectionName;
+	ValueMap values;
+
+public:
+	IniFileSection(const string &sectionName) {
+		this->sectionName = sectionName;
+	}
+
+	bool hasKey(const string &keyName) const {
+		return values.find(keyName) != values.end();
+	}
+
+	string get(const string &keyName) const {
+		ValueMap::const_iterator it = values.find(keyName);
+		if (it != values.end()) {
+			return it->second;
+		} else {
+			return string();
+		}
+	}
+	
+	string operator[](const string &keyName) const {
+		return get(keyName);
+	}
+
+	void set(const string &keyName, const string &value) {
+		values[keyName] = value;
+	}
+
+	string getSectionName() const {
+		return sectionName;
+	}
+
+	void inspect() const {
+		ValueMap::const_iterator it = values.begin();
+		while (it != values.end()) {
+			cout << it->first << " = " << it->second << endl;
+			it++;
+		}
+	}
+};
+
+class IniFileLexer {
+public:
+	class Token {
+	public:
+		enum Kind {
+			UNKNOWN = 0,
+			NEWLINE,
+			SECTION_NAME,
+			IDENTIFIER,
+			ASSIGNMENT,
+			TEXT,
+			END_OF_FILE
+		};
+
+		const Kind kind;
+		const string value;
+		const int line;
+		const int column;
+
+		// String representations of the Kind enum.
+		const static char *identityByKind(Kind kind) {
+			const static char* KIND_IDENTITY_TABLE[] = {
+				"<T_UNKNOWN>",
+				"<T_NEWLINE>",
+				"<T_SECTION_NAME>",
+				"<T_IDENTIFIER>",
+				"<T_ASSIGNMENT>",
+				"<T_TEXT>",
+				"<T_EOF>"
+			};
+			
+			return KIND_IDENTITY_TABLE[kind];
+		}
+
+		Token(const Kind kind, const string &value, const int line, const int column)
+			: kind(kind), value(value), line(line), column(column) {
+			
+		}
+		
+		class ExpectanceException : public std::exception {
+		private:
+			char message[255];
+
+		public:
+			ExpectanceException(char expected, char got, int line, int column) {
+				int messageSize = sizeof(message);
+				memset(message, 0, messageSize);
+				snprintf(message, messageSize,
+					"On line %i, column %i: Expected '%c', got '%c' instead.",
+					line, column, expected, got);
+			}
+
+			ExpectanceException(Token::Kind expected, Token got) {
+				const char *expectedKindString = Token::identityByKind(expected);
+				int messageSize = sizeof(message);
+				memset(message, 0, messageSize);
+				snprintf(message, messageSize,
+					"On line %i, column %i: Expected '%s', got '%s' instead.",
+					got.line, got.column, expectedKindString, got.value.c_str());
+			}
+
+			ExpectanceException(char expected, Token::Kind got, int line, int column) {
+				const char *gotKindString = Token::identityByKind(got);
+				int messageSize = sizeof(message);
+				memset(message, 0, messageSize);
+				snprintf(message, messageSize,
+					"On line %i, column %i: Expected '%c', got '%s' instead.",
+					line, column, expected, gotKindString);
+			}
+
+			virtual const char* what() const throw() {
+				return message;
+			}
+		};
+	};
+
+	typedef shared_ptr<IniFileLexer::Token> TokenPtr;
+
+	
+
+protected:
+	ifstream iniFileStream;
+
+	char lastAcceptedChar;
+	int upcomingChar;
+	bool upcomingTokenPtrIsStale;
+
+	int currentLine;
+	int currentColumn;
+
+	TokenPtr upcomingTokenPtr;
+
+	void expect(char ch) {
+		int upcomingChar = iniFileStream.peek();
+	
+		if (ch != upcomingChar) {
+			switch(upcomingChar) {
+				case EOF:
+					throw Token::ExpectanceException(ch, Token::END_OF_FILE,
+						currentLine, currentColumn + 1);
+				case '\n':
+					throw Token::ExpectanceException(ch, upcomingChar,
+						currentLine + 1, 0);
+				default:
+					throw Token::ExpectanceException(ch, upcomingChar,
+						currentLine, currentColumn + 1);
+			}
+		}
+	}
+
+	void accept() {
+		if (upcomingChar == EOF) return;
+	
+		lastAcceptedChar = (char)iniFileStream.get();
+		upcomingChar     = iniFileStream.peek();
+		currentColumn++;
+	
+		if (lastAcceptedChar == '\n') {
+			currentLine++;
+			currentColumn = 1;
+		}
+	}
+
+	void ignore() {
+		if (upcomingChar == EOF) return;
+	
+		upcomingChar = iniFileStream.peek();
+		currentColumn++;
+	
+		if ((char)iniFileStream.get() == '\n') {
+			currentLine++;
+			currentColumn = 1;
+		}
+	}
+
+	void expectAndAccept(char ch) {
+		expect(ch);
+		accept();
+	}
+
+	void acceptWhileNewLine() {
+		while (iniFileStream.good() && upcomingChar == '\n') {
+			accept();
+		}
+	}
+
+	void ignoreWhileNotNewLine() {
+		while (iniFileStream.good() && upcomingChar != '\n') {
+			ignore();
+		}
+	}
+
+	Token tokenizeIdentifier() {
+		int line   = currentLine;
+		int column = currentColumn;
+		string result;
+	
+		while (isalnum(upcomingChar) || upcomingChar == '_' || upcomingChar == '-') {
+			result.append(1, upcomingChar);
+			accept();
+		}
+			
+		return Token(Token::IDENTIFIER, result, line, column);
+	}
+
+	Token tokenizeSection() {
+		expectAndAccept('[');
+		Token sectionName = tokenizeSectionName();
+		expectAndAccept(']');
+		return sectionName;
+	}
+
+	Token tokenizeSectionName() {
+		int line   = currentLine;
+		int column = currentColumn;
+		string result;
+	
+		//while (upcomingChar != ']' && upcomingChar != '[' && upcomingChar != '\n' && upcomingChar != EOF) {
+		while (isalnum(upcomingChar) || upcomingChar == '_' || upcomingChar == '-') {
+			result.append(1, upcomingChar);
+			accept();
+		}
+	
+		return Token(Token::SECTION_NAME, result, line, column);
+	}
+
+	Token tokenizeAssignment() {
+		expectAndAccept('=');
+		return Token(Token::ASSIGNMENT, "=", currentLine, currentColumn);
+	}
+
+	Token tokenizeText() {
+		int line   = currentLine;
+		int column = currentColumn;
+		string result;
+	
+		while (upcomingChar != '\n' && upcomingChar != EOF) {
+			result.append(1, upcomingChar);
+			accept();
+		}
+	
+		return Token(Token::TEXT, result, line, column);
+	}
+
+	Token tokenizeKey() {
+		return tokenizeIdentifier();
+	}
+
+	Token tokenizeValue() {
+		return tokenizeText();
+	}
+
+	Token tokenizeUnknown() {
+		int line   = currentLine;
+		int column = currentColumn;
+		string result;
+	
+		while (upcomingChar != EOF) {
+			result.append(1, upcomingChar);
+			accept();
+		}
+	
+		return Token(Token::UNKNOWN, result, line, column);
+	}
+
+public:
+	IniFileLexer(const string &fileName) {
+		currentLine   = 1;
+		currentColumn = 1;
+		upcomingTokenPtrIsStale = true;
+		iniFileStream.open(fileName.c_str());
+		if (iniFileStream.fail()) {
+			int e = errno;
+			throw FileSystemException("Cannot open file '" + fileName + "' for reading",
+				e, fileName);
+		}
+	}
+
+	~IniFileLexer() {
+		iniFileStream.close();
+	}
+
+	int getCurrentLine() {
+		return currentLine;
+	}
+
+	int getCurrentColumn() {
+		return currentColumn;
+	}
+
+	TokenPtr peekToken() {
+		if (upcomingTokenPtrIsStale) {
+			Token upcomingToken = getToken();
+			upcomingTokenPtr = make_shared<Token>(upcomingToken);
+			upcomingTokenPtrIsStale = false;
+		}
+	
+		return upcomingTokenPtr;
+	}
+
+	Token getToken() {
+		if (!upcomingTokenPtrIsStale) {
+			upcomingTokenPtrIsStale = true;
+			return *upcomingTokenPtr;
+		}
+	
+		while (iniFileStream.good()) {
+			upcomingChar = iniFileStream.peek();
+			switch(upcomingChar) {
+				case '[':
+					return tokenizeSection();
+				case '\n':
+					if (lastAcceptedChar != '\n') {
+						accept();
+						return Token(Token::NEWLINE, "\n", currentLine, currentColumn);
+					} else {
+						ignore();
+						break;
+					}
+				case ';':
+					// Comment encountered: accept all characters until newline (exclusive).
+					ignoreWhileNotNewLine();
+					break;
+				case '=':
+					return tokenizeAssignment();
+				case EOF:
+					return Token(Token::END_OF_FILE, "<END_OF_FILE>", currentLine, currentColumn);
+				default:
+					if (isblank(upcomingChar)) {
+						ignore();
+					} else {
+						switch(lastAcceptedChar) {
+							case '\n':
+								return tokenizeKey();
+							case '=':
+								return tokenizeValue();
+							default:
+								return tokenizeUnknown();
+						}
+					}
+			}
+		}
+	
+		return Token(Token::END_OF_FILE, "<END_OF_FILE>", currentLine, currentColumn);
+	}
+};
+
+typedef shared_ptr<IniFileSection> IniFileSectionPtr;
+
+
+class IniFile {
+protected:
+	typedef map<string, IniFileSectionPtr> SectionMap;
+	string name;
+	SectionMap sections;
+	
+	class IniFileParser {
+	typedef IniFileLexer::Token Token;
+
+	protected:
+		IniFileLexer lexer;
+		IniFile *iniFile;
+
+		// The Start Symbol.
+		void parseSections() {		
+			while ((lexer.peekToken())->kind == Token::SECTION_NAME) {
+				parseSection();
+			}
+		}
+
+		void parseSection() {
+			Token token = acceptAndReturnif(Token::SECTION_NAME);
+			acceptIfEOL();
+
+			string sectionName = token.value;
+			IniFileSection *section = new IniFileSection(sectionName);
+			iniFile->addSection(section);
+
+			parseSectionBody(section);
+		}
+
+		void parseSectionBody(IniFileSection *currentSection) {
+			while ((lexer.peekToken())->kind == Token::IDENTIFIER) {
+				parseKeyValue(currentSection);
+			}
+		}
+
+		void parseKeyValue(IniFileSection *currentSection) {
+			Token identifierToken = acceptAndReturnif (Token::IDENTIFIER);
+			acceptif (Token::ASSIGNMENT);
+			Token valueToken = acceptAndReturnif (Token::TEXT);
+			acceptIfEOL();
+			currentSection->set(identifierToken.value, valueToken.value);
+		}
+
+		void acceptif (Token::Kind expectedKind) {
+			Token token = lexer.getToken();
+
+			if (token.kind != expectedKind) {
+				throw Token::ExpectanceException(expectedKind, token);
+			}
+		}
+
+		void acceptIfEOL() {
+			Token token = lexer.getToken();
+
+			if (token.kind != Token::NEWLINE && token.kind != Token::END_OF_FILE) {
+				throw Token::ExpectanceException(Token::NEWLINE, token);
+			}
+		}
+
+		Token acceptAndReturnif (Token::Kind expectedKind) {
+			Token token = lexer.getToken();
+
+			if (token.kind != expectedKind) {
+				throw Token::ExpectanceException(expectedKind, token);
+			}
+
+			return token;
+		}
+
+	public:
+		IniFileParser(IniFile *iniFile) : lexer(iniFile->getName()), iniFile(iniFile) {
+			parseSections();
+		}
+	};
+	
+public:
+	IniFile(const string &iniFileName)
+		: name(iniFileName)
+	{
+		IniFileParser parser(this);
+	}
+
+	void addSection(IniFileSection *section) {
+		sections.insert(make_pair(section->getSectionName(), IniFileSectionPtr(section)));
+	}
+
+	IniFileSectionPtr section(const string &sectionName) {
+		SectionMap::iterator it = sections.find(sectionName);
+		if (it != sections.end()) {
+			return it->second;
+		} else {
+			return IniFileSectionPtr();
+		}
+	}
+
+	bool hasSection(const string &sectionName) const {
+		return sections.find(sectionName) != sections.end();
+	}
+
+	string getName() const {
+		return name;
+	}
+
+	void inspect() const {
+		SectionMap::const_iterator it = sections.begin();
+		while (it != sections.end()) {
+			cout << "[" << (it->first) << "]" << endl;
+			it->second->inspect();
+
+			it++;
+		}
+	}
+};
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_INI_FILE_H_ */
diff --git a/ext/common/Utils/LargeFiles.cpp b/ext/common/Utils/LargeFiles.cpp
new file mode 100644
index 0000000..2e7fe39
--- /dev/null
+++ b/ext/common/Utils/LargeFiles.cpp
@@ -0,0 +1,38 @@
+#ifndef _FILE_OFFSET_BITS
+	#define _FILE_OFFSET_BITS 64
+#endif
+#ifndef _LARGE_FILES
+	#define _LARGE_FILES 1
+#endif
+#ifndef _LARGEFILE_SOURCE
+	#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+	#define _LARGEFILE64_SOURCE
+#endif
+
+#include <Utils/LargeFiles.h>
+#include <stdlib.h>
+
+namespace Passenger {
+
+FILE *
+lfs_fopen(const char *filename, const char *mode) {
+	return fopen(filename, mode);
+}
+
+FILE *
+lfs_fdopen(int filedes, const char *mode) {
+	return fdopen(filedes, mode);
+}
+
+int
+lfs_mkstemp(char *templ) {
+	#ifdef __linux__
+		return mkstemp64(templ);
+	#else
+		return mkstemp(templ);
+	#endif
+}
+
+} // namespace Passenger
diff --git a/ext/common/Utils/LargeFiles.h b/ext/common/Utils/LargeFiles.h
new file mode 100644
index 0000000..e4791f9
--- /dev/null
+++ b/ext/common/Utils/LargeFiles.h
@@ -0,0 +1,40 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_UTILS_LARGE_FILES_H_
+#define _PASSENGER_UTILS_LARGE_FILES_H_
+
+#include <stdio.h>
+
+/* Allows access to Large File Support APIs, if the OS supports them. */
+
+namespace Passenger {
+
+FILE *lfs_fopen(const char *filename, const char *mode);
+FILE *lfs_fdopen(int filedes, const char *mode);
+int lfs_mkstemp(char *templ);
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_UTILS_LARGE_FILES_H_ */
diff --git a/ext/common/Utils/Lock.h b/ext/common/Utils/Lock.h
new file mode 100644
index 0000000..0542fda
--- /dev/null
+++ b/ext/common/Utils/Lock.h
@@ -0,0 +1,28 @@
+#ifndef _PASSENGER_LOCK_H_
+#define _PASSENGER_LOCK_H_
+
+#include <boost/thread.hpp>
+
+namespace Passenger {
+
+using namespace boost;
+
+/** Shortcut typedefs. */
+typedef boost::lock_guard<boost::mutex> LockGuard;
+typedef boost::unique_lock<boost::mutex> ScopedLock;
+
+/** Nicer syntax for conditionally locking the mutex during construction. */
+class DynamicScopedLock: public unique_lock<boost::mutex> {
+public:
+	DynamicScopedLock(boost::mutex &m, bool lockNow = true)
+		: unique_lock<boost::mutex>(m, defer_lock)
+	{
+		if (lockNow) {
+			lock();
+		}
+	}
+};
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_LOCK_H_ */
diff --git a/ext/common/Utils/MD5.cpp b/ext/common/Utils/MD5.cpp
index cb3bf70..57d0ae6 100644
--- a/ext/common/Utils/MD5.cpp
+++ b/ext/common/Utils/MD5.cpp
@@ -52,11 +52,12 @@
  */
 
 #include "MD5.h"
-#include <string.h>
-#include <boost/detail/endian.hpp>
-#include "StrIntUtils.h"
-
-namespace Passenger {
+#include "../../boost/detail/endian.hpp" /* File is C compatible. */
+#ifdef __cplusplus
+    #include <string.h>
+    #include "StrIntUtils.h"
+    namespace Passenger {
+#endif
 
 #if defined(BOOST_BIG_ENDIAN)
 #  define ARCH_IS_BIG_ENDIAN 1
@@ -390,17 +391,19 @@ md5_finish(md5_state_t *pms, md5_byte_t digest[16])
 	digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));
 }
 
-std::string
-md5_hex(const StaticString &input)
-{
-    md5_state_t pms;
-    md5_byte_t digest[16];
+#ifdef __cplusplus
+    std::string
+    md5_hex(const StaticString &input)
+    {
+        md5_state_t pms;
+        md5_byte_t digest[16];
 
-    md5_init(&pms);
-    md5_append(&pms, (const md5_byte_t *) input.data(), input.size());
-    md5_finish(&pms, digest);
+        md5_init(&pms);
+        md5_append(&pms, (const md5_byte_t *) input.data(), input.size());
+        md5_finish(&pms, digest);
 
-    return toHex(StaticString((const char *) digest, 16));
-}
+        return toHex(StaticString((const char *) digest, 16));
+    }
 
-} // namespace Passenger
+    } // namespace Passenger
+#endif
diff --git a/ext/common/Utils/MD5.h b/ext/common/Utils/MD5.h
index 30b3d88..7f0f967 100644
--- a/ext/common/Utils/MD5.h
+++ b/ext/common/Utils/MD5.h
@@ -50,9 +50,14 @@
 #ifndef _PASSENGER_MD5_H_
 #define _PASSENGER_MD5_H_
 
-#include <string>
-#include <boost/cstdint.hpp>
-#include "../StaticString.h"
+#ifdef __cplusplus
+    #include "../../boost/cstdint.hpp"
+    #include <string>
+    #include <StaticString.h>
+    namespace Passenger {
+#else
+    #include <stdint.h>
+#endif
 
 /*
  * This package supports both compile-time and run-time determination of CPU
@@ -64,8 +69,6 @@
  * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined.
  */
 
-namespace Passenger {
-
 typedef uint8_t md5_byte_t; /* 8-bit byte */
 typedef uint32_t md5_word_t; /* 32-bit word */
 
@@ -90,9 +93,11 @@ void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
 /* Finish the message and return the digest. */
 void md5_finish(md5_state_t *pms, md5_byte_t digest[MD5_SIZE]);
 
-/* Convenience method for directly converting data into a hexadecimal MD5 string. */
-std::string md5_hex(const StaticString &input);
+#ifdef __cplusplus
+  /* Convenience method for directly converting data into a hexadecimal MD5 string. */
+  std::string md5_hex(const StaticString &input);
 
-} // namespace Passenger
+  } // namespace Passenger
+#endif
 
 #endif /* _PASSENGER_MD5_H_ */
diff --git a/ext/common/Utils/MemZeroGuard.h b/ext/common/Utils/MemZeroGuard.h
index 5ccb232..73b951e 100644
--- a/ext/common/Utils/MemZeroGuard.h
+++ b/ext/common/Utils/MemZeroGuard.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/ext/common/Utils/MemoryBarrier.h b/ext/common/Utils/MemoryBarrier.h
new file mode 100644
index 0000000..d7d4bf1
--- /dev/null
+++ b/ext/common/Utils/MemoryBarrier.h
@@ -0,0 +1,52 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_MEMORY_BARRIER_H_
+#define _PASSENGER_MEMORY_BARRIER_H_
+
+// Memory barrier macros. Also act as compiler barriers.
+
+#if defined(__GNUC__) || defined(__INTEL_COMPILER)
+	#if defined(__i386__)
+		#if defined(HAS_SSE2) || (defined(HAS_LFENCE) && defined(HAS_SFENCE))
+			#define P_READ_BARRIER() \
+				do { __asm__ __volatile__ ("lfence" ::: "memory"); } while (false)
+			#define P_WRITE_BARRIER() \
+				do { __asm__ __volatile__ ("sfence" ::: "memory"); } while (false)
+		#else
+			#define P_READ_BARRIER() \
+				do { __asm__ __volatile__ ("" ::: "memory"); } while (false)
+			#define P_WRITE_BARRIER() \
+				do { __asm__ __volatile__ ("lock; addl $0,0(%%esp)" ::: "memory"); } while (false)
+		#endif
+		
+	#elif defined(__x86_64__)
+		#define P_READ_BARRIER() \
+			do { __asm__ __volatile__ ("lfence" ::: "memory"); } while (false)
+		#define P_WRITE_BARRIER() \
+			do { __asm__ __volatile__ ("sfence" ::: "memory"); } while (false)
+	#endif
+#endif
+
+#endif /* _PASSENGER_MEMORY_BARRIER_H_ */
diff --git a/ext/common/Utils/MessageIO.h b/ext/common/Utils/MessageIO.h
index 03cdb0c..7888fcb 100644
--- a/ext/common/Utils/MessageIO.h
+++ b/ext/common/Utils/MessageIO.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2011 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/ext/common/Utils/MessagePassing.h b/ext/common/Utils/MessagePassing.h
new file mode 100644
index 0000000..0f8f235
--- /dev/null
+++ b/ext/common/Utils/MessagePassing.h
@@ -0,0 +1,304 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2012 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_MESSAGE_PASSING_H_
+#define _PASSENGER_MESSAGE_PASSING_H_
+
+
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+#include <boost/make_shared.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <boost/thread.hpp>
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+#include <oxt/macros.hpp>
+#include <Exceptions.h>
+#include <Utils/SystemTime.h>
+#include <Utils/VariantMap.h>
+
+#include <list>
+
+
+namespace Passenger {
+
+using namespace std;
+using namespace boost;
+
+
+/**
+ * A simple in-process message passing library. Each message has a name, a bunch
+ * of named arguments and an arbitrary object. Recipients can wait for a certain
+ * message to arrive, possibly with a timeout. The receive function will return
+ * as soon as the mailbox contains at least one message with the given name,
+ * and removes that message from the mailbox, returning it.
+ *
+ * This library is designed for convenience and correctness, not speed. Messages
+ * are allocated on the heap and are never copied: only their smart pointers are
+ * passed around. This way you can pass arbitrary C++ objects.
+ *
+ * You must not modify Message objects after they've been sent. Likewise,
+ * do not modify Message objects returned by peek().
+ */
+class MessageBox;
+struct Message;
+typedef shared_ptr<MessageBox> MessageBoxPtr;
+typedef shared_ptr<Message> MessagePtr;
+
+inline void _sendToMessageBox(const MessageBoxPtr &messageBox, const MessagePtr &message);
+
+
+struct Message {
+	string name;
+	VariantMap args;
+	weak_ptr<MessageBox> from;
+	void *data;
+	void (*freeData)(void *p);
+
+	Message()
+		: data(0),
+		  freeData(0)
+		{ }
+
+	Message(const string &_name)
+		: name(_name),
+		  data(0),
+		  freeData(0)
+		{ }
+
+	Message(const MessageBoxPtr &from, const string &_name)
+		: name(_name),
+		  data(0),
+		  freeData(0)
+	{
+		setFrom(from);
+	}
+
+	~Message() {
+		if (data != NULL && freeData != NULL) {
+			freeData(data);
+		}
+	}
+
+	void setFrom(const MessageBoxPtr &messageBox) {
+		from = weak_ptr<MessageBox>(messageBox);
+	}
+
+	void sendReply(const MessagePtr &message) {
+		MessageBoxPtr messageBox = from.lock();
+		if (messageBox != NULL) {
+			_sendToMessageBox(messageBox, message);
+		}
+	}
+
+	void sendReply(const string &name) {
+		sendReply(make_shared<Message>(name));
+	}
+};
+
+
+class MessageBox: public enable_shared_from_this<MessageBox> {
+	typedef list<MessagePtr> MessageList;
+	typedef MessageList::iterator Iterator;
+	typedef MessageList::const_iterator ConstIterator;
+
+	mutable boost::mutex syncher;
+	condition_variable cond;
+	MessageList messages;
+
+	Iterator search(const string &name) {
+		Iterator it, end = messages.end();
+		for (it = messages.begin(); it != end; it++) {
+			const MessagePtr &message = *it;
+			if (message->name == name) {
+				return it;
+			}
+		}
+		return end;
+	}
+
+	ConstIterator search(const string &name) const {
+		ConstIterator it, end = messages.end();
+		for (it = messages.begin(); it != end; it++) {
+			const MessagePtr &message = *it;
+			if (message->name == name) {
+				return it;
+			}
+		}
+		return end;
+	}
+
+	template<typename StringCollection>
+	Iterator searchAny(const StringCollection &names) {
+		Iterator it, end = messages.end();
+		for (it = messages.begin(); it != end; it++) {
+			const MessagePtr &message = *it;
+			typename StringCollection::const_iterator n_it, n_end = names.end();
+			for (n_it = names.begin(); n_it != n_end; n_it++) {
+				if (message->name == *n_it) {
+					return it;
+				}
+			}
+		}
+		return end;
+	}
+
+	bool checkTimeout(unique_lock<boost::mutex> &l, unsigned long long *timeout,
+		unsigned long long beginTime, posix_time::ptime deadline)
+	{
+		posix_time::time_duration diff = deadline -
+			posix_time::microsec_clock::local_time();
+		bool timedOut;
+		if (diff.is_negative() < 0) {
+			timedOut = true;
+		} else {
+			timedOut = !cond.timed_wait(l,
+				posix_time::milliseconds(diff.total_milliseconds()));
+		}
+		if (timedOut) {
+			substractTimePassed(timeout, beginTime);
+		}
+		return timedOut;
+	}
+
+	void substractTimePassed(unsigned long long *timeout, unsigned long long beginTime) {
+		unsigned long long now = SystemTime::getMsec();
+		unsigned long long diff;
+		if (now > beginTime) {
+			diff = now - beginTime;
+		} else {
+			diff = 0;
+		}
+		if (*timeout > diff) {
+			*timeout -= diff;
+		} else {
+			*timeout = 0;
+		}
+	}
+
+public:
+	void send(const MessagePtr &message) {
+		boost::lock_guard<boost::mutex> l(syncher);
+		message->setFrom(shared_from_this());
+		messages.push_back(message);
+		cond.notify_all();
+	}
+
+	void send(const string &name) {
+		send(make_shared<Message>(name));
+	}
+
+	const MessagePtr peek(const string &name) const {
+		unique_lock<boost::mutex> l(syncher);
+		ConstIterator it = search(name);
+		if (it == messages.end()) {
+			return MessagePtr();
+		} else {
+			return *it;
+		}
+	}
+
+	MessagePtr recv(const string &name, unsigned long long *timeout = NULL) {
+		unique_lock<boost::mutex> l(syncher);
+		posix_time::ptime deadline;
+		unsigned long long beginTime = 0; // Shut up compiler warning.
+		if (timeout != NULL) {
+			beginTime = SystemTime::getUsec();
+			deadline = posix_time::microsec_clock::local_time() +
+				posix_time::microsec(*timeout);
+		}
+
+		Iterator it;
+		while ((it = search(name)) == messages.end()) {
+			if (timeout != NULL) {
+				if (checkTimeout(l, timeout, beginTime, deadline)) {
+					return MessagePtr();
+				}
+			} else {
+				cond.wait(l);
+			}
+		}
+		if (timeout != NULL) {
+			substractTimePassed(timeout, beginTime);
+		}
+
+		MessagePtr result = *it;
+		messages.erase(it);
+		return result;
+	}
+
+	MessagePtr recvTE(const string &name, unsigned long long *timeout = NULL) {
+		MessagePtr result = recv(name, timeout);
+		if (result != NULL) {
+			return result;
+		} else {
+			throw TimeoutException("Timeout receiving from message box");
+		}
+	}
+
+	template<typename StringCollection>
+	MessagePtr recvAny(const StringCollection &names, unsigned long long *timeout = NULL) {
+		unique_lock<boost::mutex> l(syncher);
+		posix_time::ptime deadline;
+		unsigned long long beginTime = 0; // Shut up compiler warning.
+		if (timeout != NULL) {
+			beginTime = SystemTime::getUsec();
+			deadline = posix_time::microsec_clock::local_time() +
+				posix_time::microsec(*timeout);
+		}
+
+		Iterator it;
+		while ((it = searchAny<StringCollection>(names)) == messages.end()) {
+			if (timeout != NULL) {
+				if (checkTimeout(l, timeout, beginTime, deadline)) {
+					return MessagePtr();
+				}
+			} else {
+				cond.wait(l);
+			}
+		}
+		if (timeout != NULL) {
+			substractTimePassed(timeout, beginTime);
+		}
+
+		MessagePtr result = *it;
+		messages.erase(it);
+		return result;
+	}
+
+	unsigned int size() const {
+		boost::lock_guard<boost::mutex> l(syncher);
+		return messages.size();
+	}
+};
+
+
+inline void
+_sendToMessageBox(const MessageBoxPtr &messageBox, const MessagePtr &message) {
+	messageBox->send(message);
+}
+
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_MESSAGE_PASSING_H_ */
diff --git a/ext/common/Utils/PriorityQueue.h b/ext/common/Utils/PriorityQueue.h
new file mode 100644
index 0000000..be45354
--- /dev/null
+++ b/ext/common/Utils/PriorityQueue.h
@@ -0,0 +1,54 @@
+#ifndef _PASSENGER_PRIORITY_QUEUE_H_
+#define _PASSENGER_PRIORITY_QUEUE_H_
+
+#include "fib.h"
+
+namespace Passenger {
+
+template<typename T>
+class PriorityQueue {
+private:
+	struct fibheap heap;
+	
+public:
+	typedef struct fibheap_el * Handle;
+	
+	PriorityQueue() {
+		fh_initheap(&heap);
+		heap.fh_keys = 1;
+	}
+	
+	~PriorityQueue() {
+		fh_destroyheap(&heap);
+	}
+	
+	Handle push(T *item, int priority) {
+		return fh_insertkey(&heap, priority, item);
+	}
+	
+	T *pop() {
+		return (T *) fh_extractmin(&heap);
+	}
+	
+	T *top() const {
+		return (T *) fh_min(const_cast<struct fibheap *>(&heap));
+	}
+	
+	void decrease(Handle handle, int priority) {
+		fh_replacekeydata(&heap, handle, priority, handle->fhe_data);
+	}
+	
+	void erase(Handle handle) {
+		fh_delete(&heap, handle);
+	}
+	
+	void clear() {
+		fh_destroyheap(&heap);
+		fh_initheap(&heap);
+		heap.fh_keys = 1;
+	}
+};
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_PRIORITY_QUEUE_H_ */
diff --git a/ext/common/Utils/ProcessMetricsCollector.h b/ext/common/Utils/ProcessMetricsCollector.h
index 540ec79..2e7f036 100644
--- a/ext/common/Utils/ProcessMetricsCollector.h
+++ b/ext/common/Utils/ProcessMetricsCollector.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -39,6 +39,12 @@
 	#include <mach/mach_vm.h>
 	#include <mach/mach_port.h>
 #endif
+#ifndef __NetBSD__
+	// NetBSD does not support -p with multiple PIDs.
+	// https://code.google.com/p/phusion-passenger/issues/detail?id=736
+	#define PS_SUPPORTS_MULTIPLE_PIDS
+	#include <set>
+#endif
 
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -54,6 +60,7 @@
 #include <Exceptions.h>
 #include <Utils.h>
 #include <Utils/ScopeGuard.h>
+#include <Utils/IOUtils.h>
 
 namespace Passenger {
 
@@ -67,9 +74,9 @@ struct ProcessMetrics {
 	pid_t   ppid;
 	uint8_t cpu;
 	/** Resident Set Size, amount of memory in RAM. Does not include swap.
-	 * 0 if completely swapped out.
+	 * -1 if not yet known, 0 if completely swapped out.
 	 */
-	size_t  rss;
+	ssize_t  rss;
 	/** Proportional Set Size, see measureRealMemory(). Does not include swap.
 	 * -1 if unknown, 0 if completely swapped out.
 	 */
@@ -89,9 +96,11 @@ struct ProcessMetrics {
 	
 	ProcessMetrics() {
 		pid = (pid_t) -1;
+		rss = -1;
 		pss = -1;
 		privateDirty = -1;
 		swap = -1;
+		vmsize = -1;
 	}
 	
 	bool isValid() const {
@@ -113,8 +122,10 @@ struct ProcessMetrics {
 		}
 		if (privateDirty != -1) {
 			return privateDirty + swap;
-		} else {
+		} else if (rss != -1) {
 			return rss + swap;
+		} else {
+			return 0;
 		}
 	}
 };
@@ -159,7 +170,6 @@ public:
 			for (it = begin(); it != end; it++) {
 				const ProcessMetrics &metric = it->second;
 				total += metric.realMemory();
-			
 			}
 			
 			shared = -1;
@@ -235,9 +245,10 @@ private:
 	
 	string runCommandAndCaptureOutput(const char **command) const {
 		pid_t pid;
-		int e, p[2];
+		int e;
+		Pipe p;
 		
-		syscalls::pipe(p);
+		p = createPipe();
 		
 		this_thread::disable_syscall_interruption dsi;
 		pid = syscalls::fork();
@@ -254,18 +265,17 @@ private:
 			dup2(p[1], 1);
 			close(p[0]);
 			close(p[1]);
+			closeAllFileDescriptors(2);
 			execvp(command[0], (char * const *) command);
 			_exit(1);
 		} else if (pid == -1) {
 			e = errno;
-			syscalls::close(p[0]);
-			syscalls::close(p[1]);
 			throw SystemException("Cannot fork() a new process", e);
 		} else {
 			bool done = false;
 			string result;
 			
-			syscalls::close(p[1]);
+			p[1].close();
 			while (!done) {
 				char buf[1024 * 4];
 				ssize_t ret;
@@ -274,14 +284,12 @@ private:
 					this_thread::restore_syscall_interruption rsi(dsi);
 					ret = syscalls::read(p[0], buf, sizeof(buf));
 				} catch (const thread_interrupted &) {
-					syscalls::close(p[0]);
 					syscalls::kill(SIGKILL, pid);
 					syscalls::waitpid(pid, NULL, 0);
 					throw;
 				}
 				if (ret == -1) {
 					e = errno;
-					syscalls::close(p[0]);
 					syscalls::kill(SIGKILL, pid);
 					syscalls::waitpid(pid, NULL, 0);
 					throw SystemException("Cannot read output from the 'ps' command", e);
@@ -289,7 +297,7 @@ private:
 				done = ret == 0;
 				result.append(buf, ret);
 			}
-			syscalls::close(p[0]);
+			p[0].close();
 			syscalls::waitpid(pid, NULL, 0);
 			
 			if (result.empty()) {
@@ -323,7 +331,8 @@ private:
 		return string(data, endOfLine - data);
 	}
 	
-	ProcessMetricMap parsePsOutput(const string &output) const {
+	template<typename Collection, typename ConstIterator>
+	ProcessMetricMap parsePsOutput(const string &output, const Collection &allowedPids) const {
 		ProcessMetricMap result;
 		// Ignore first line, it contains the column names.
 		const char *start = strchr(output.c_str(), '\n');
@@ -334,6 +343,14 @@ private:
 				start = NULL;
 			}
 		}
+
+		#ifndef PS_SUPPORTS_MULTIPLE_PIDS
+			set<pid_t> pids;
+			ConstIterator it, end = allowedPids.end();
+			for (it = allowedPids.begin(); it != allowedPids.end(); it++) {
+				pids.insert(*it);
+			}
+		#endif
 		
 		// Parse each line.
 		while (start != NULL) {
@@ -346,14 +363,24 @@ private:
 			metrics.vmsize  = (size_t) readNextWordAsLongLong(&start);
 			metrics.processGroupId = (pid_t) readNextWordAsLongLong(&start);
 			metrics.command = readRestOfLine(start);
-			result[metrics.pid] = metrics;
-			
-			start = strchr(start, '\n');
-			if (start != NULL) {
-				// Skip to beginning of next line.
-				start++;
-				if (*start == '\0') {
-					start = NULL;
+
+			bool pidAllowed;
+			#ifdef PS_SUPPORTS_MULTIPLE_PIDS
+				pidAllowed = true;
+			#else
+				pidAllowed = pids.find(metrics.pid) != pids.end();
+			#endif
+
+			if (pidAllowed) {
+				result[metrics.pid] = metrics;
+				
+				start = strchr(start, '\n');
+				if (start != NULL) {
+					// Skip to beginning of next line.
+					start++;
+					if (*start == '\0') {
+						start = NULL;
+					}
 				}
 			}
 		}
@@ -408,7 +435,10 @@ public:
 			#else
 				"pid,ppid,%cpu,rss,vsize,pgid,command",
 			#endif
-			"-p", pidsArg.c_str(), NULL
+			#ifdef PS_SUPPORTS_MULTIPLE_PIDS
+				"-p", pidsArg.c_str(),
+			#endif
+			NULL
 		};
 		
 		string psOutput = this->psOutput;
@@ -416,7 +446,7 @@ public:
 			psOutput = runCommandAndCaptureOutput(command);
 		}
 		pidsArg.resize(0);
-		ProcessMetricMap result = parsePsOutput(psOutput);
+		ProcessMetricMap result = parsePsOutput<Collection, ConstIterator>(psOutput, pids);
 		psOutput.resize(0);
 		if (canMeasureRealMemory) {
 			ProcessMetricMap::iterator it;
@@ -519,7 +549,7 @@ public:
 				return;
 			}
 			
-			ScopeGuard fileGuard(boost::bind(syscalls::fclose, f));
+			StdioGuard guard(f);
 			bool hasPss = false;
 			bool hasPrivateDirty = false;
 			bool hasSwap = false;
diff --git a/ext/common/Utils/ScopeGuard.h b/ext/common/Utils/ScopeGuard.h
index 1fd3d3b..7b6ec85 100644
--- a/ext/common/Utils/ScopeGuard.h
+++ b/ext/common/Utils/ScopeGuard.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010, 2011, 2012 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -27,10 +27,20 @@
 
 #include <boost/noncopyable.hpp>
 #include <boost/function.hpp>
+#include <boost/thread.hpp>
+#include <oxt/system_calls.hpp>
+#include <cstdio>
 
 namespace Passenger {
 
 using namespace boost;
+using namespace oxt;
+
+
+#ifndef _PASSENGER_SAFELY_CLOSE_DEFINED_
+	#define _PASSENGER_SAFELY_CLOSE_DEFINED_
+	void safelyClose(int fd, bool ignoreErrors = false);
+#endif
 
 
 /**
@@ -41,17 +51,25 @@ using namespace boost;
 class ScopeGuard: public noncopyable {
 private:
 	function<void ()> func;
+	bool interruptable;
 	
 public:
 	ScopeGuard() { }
 	
-	ScopeGuard(const function<void ()> &func) {
+	ScopeGuard(const function<void ()> &func, bool interruptable = false) {
 		this->func = func;
+		this->interruptable = interruptable;
 	}
 	
 	~ScopeGuard() {
 		if (func) {
-			func();
+			if (interruptable) {
+				func();
+			} else {
+				this_thread::disable_interruption di;
+				this_thread::disable_syscall_interruption dsi;
+				func();
+			}
 		}
 	}
 	
@@ -62,7 +80,55 @@ public:
 	void runNow() {
 		function<void ()> oldFunc = func;
 		func = function<void()>();
-		oldFunc();
+		if (interruptable) {
+			oldFunc();
+		} else {
+			this_thread::disable_interruption di;
+			this_thread::disable_syscall_interruption dsi;
+			oldFunc();
+		}
+	}
+};
+
+class StdioGuard: public noncopyable {
+private:
+	FILE *f;
+
+public:
+	StdioGuard()
+		: f(0)
+		{ }
+
+	StdioGuard(FILE *_f)
+		: f(_f)
+		{ }
+	
+	~StdioGuard() {
+		if (f != NULL) {
+			fclose(f);
+		}
+	}
+};
+
+class FdGuard: public noncopyable {
+private:
+	int fd;
+	bool ignoreErrors;
+
+public:
+	FdGuard(int _fd, bool _ignoreErrors = false)
+		: fd(_fd),
+		  ignoreErrors(_ignoreErrors)
+		{ }
+	
+	~FdGuard() {
+		if (fd != -1) {
+			safelyClose(fd, ignoreErrors);
+		}
+	}
+
+	void clear() {
+		fd = -1;
 	}
 };
 
diff --git a/ext/common/Utils/SmallVector.h b/ext/common/Utils/SmallVector.h
new file mode 100644
index 0000000..a92e5f1
--- /dev/null
+++ b/ext/common/Utils/SmallVector.h
@@ -0,0 +1,653 @@
+//===- llvm/ADT/SmallVector.h - 'Normally small' vectors --------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License.
+// ==============================================================================
+// LLVM Release License
+// ==============================================================================
+// University of Illinois/NCSA
+// Open Source License
+//
+// Copyright (c) 2003-2009 University of Illinois at Urbana-Champaign.
+// All rights reserved.
+//
+// Developed by:
+//
+//     LLVM Team
+//
+//     University of Illinois at Urbana-Champaign
+//
+//     http://llvm.org
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of
+// this software and associated documentation files (the "Software"), to deal with
+// 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:
+//
+//     * Redistributions of source code must retain the above copyright notice,
+//       this list of conditions and the following disclaimers.
+//
+//     * Redistributions in binary form must reproduce the above copyright notice,
+//       this list of conditions and the following disclaimers in the
+//       documentation and/or other materials provided with the distribution.
+//
+//     * Neither the names of the LLVM Team, University of Illinois at
+//       Urbana-Champaign, nor the names of its contributors may be used to
+//       endorse or promote products derived from this Software without specific
+//       prior written permission.
+//
+// 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
+// CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
+// SOFTWARE.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the SmallVector class. Slightly modified for use in
+// Phusion Passenger.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_ADT_SMALLVECTOR_H
+#define LLVM_ADT_SMALLVECTOR_H
+
+#include <iterator>
+#include <boost/type_traits/is_class.hpp>
+#include <algorithm>
+#include <cassert>
+#include <cstring>
+#include <memory>
+
+#ifdef _MSC_VER
+namespace std {
+#if _MSC_VER <= 1310
+  // Work around flawed VC++ implementation of std::uninitialized_copy.  Define
+  // additional overloads so that elements with pointer types are recognized as
+  // scalars and not objects, causing bizarre type conversion errors.
+  template<class T1, class T2>
+  inline _Scalar_ptr_iterator_tag _Ptr_cat(T1 **, T2 **) {
+    _Scalar_ptr_iterator_tag _Cat;
+    return _Cat;
+  }
+
+  template<class T1, class T2>
+  inline _Scalar_ptr_iterator_tag _Ptr_cat(T1* const *, T2 **) {
+    _Scalar_ptr_iterator_tag _Cat;
+    return _Cat;
+  }
+#else
+// FIXME: It is not clear if the problem is fixed in VS 2005.  What is clear
+// is that the above hack won't work if it wasn't fixed.
+#endif
+}
+#endif
+
+namespace Passenger {
+
+/// SmallVectorImpl - This class consists of common code factored out of the
+/// SmallVector class to reduce code duplication based on the SmallVector 'N'
+/// template parameter.
+template <typename T>
+class SmallVectorImpl {
+protected:
+  T *Begin, *End, *Capacity;
+
+  // Allocate raw space for N elements of type T.  If T has a ctor or dtor, we
+  // don't want it to be automatically run, so we need to represent the space as
+  // something else.  An array of char would work great, but might not be
+  // aligned sufficiently.  Instead, we either use GCC extensions, or some
+  // number of union instances for the space, which guarantee maximal alignment.
+protected:
+#ifdef __GNUC__
+  typedef char U;
+  U FirstEl __attribute__((aligned));
+#else
+  union U {
+    double D;
+    long double LD;
+    long long L;
+    void *P;
+  } FirstEl;
+#endif
+  // Space after 'FirstEl' is clobbered, do not add any instance vars after it.
+public:
+  // Default ctor - Initialize to empty.
+  explicit SmallVectorImpl(unsigned N)
+    : Begin(reinterpret_cast<T*>(&FirstEl)),
+      End(reinterpret_cast<T*>(&FirstEl)),
+      Capacity(reinterpret_cast<T*>(&FirstEl)+N) {
+  }
+
+  ~SmallVectorImpl() {
+    // Destroy the constructed elements in the vector.
+    destroy_range(Begin, End);
+
+    // If this wasn't grown from the inline copy, deallocate the old space.
+    if (!isSmall())
+      operator delete(Begin);
+  }
+
+  typedef size_t size_type;
+  typedef ptrdiff_t difference_type;
+  typedef T value_type;
+  typedef T* iterator;
+  typedef const T* const_iterator;
+
+  typedef std::reverse_iterator<const_iterator>  const_reverse_iterator;
+  typedef std::reverse_iterator<iterator>  reverse_iterator;
+
+  typedef T& reference;
+  typedef const T& const_reference;
+  typedef T* pointer;
+  typedef const T* const_pointer;
+
+  bool empty() const { return Begin == End; }
+  size_type size() const { return End-Begin; }
+  size_type max_size() const { return size_type(-1) / sizeof(T); }
+
+  // forward iterator creation methods.
+  iterator begin() { return Begin; }
+  const_iterator begin() const { return Begin; }
+  iterator end() { return End; }
+  const_iterator end() const { return End; }
+
+  // reverse iterator creation methods.
+  reverse_iterator rbegin()            { return reverse_iterator(end()); }
+  const_reverse_iterator rbegin() const{ return const_reverse_iterator(end()); }
+  reverse_iterator rend()              { return reverse_iterator(begin()); }
+  const_reverse_iterator rend() const { return const_reverse_iterator(begin());}
+
+
+  /* These asserts could be "Begin + idx < End", but there are lots of places
+     in llvm where we use &v[v.size()] instead of v.end(). */
+  reference operator[](unsigned idx) {
+    assert (Begin + idx <= End);
+    return Begin[idx];
+  }
+  const_reference operator[](unsigned idx) const {
+    assert (Begin + idx <= End);
+    return Begin[idx];
+  }
+
+  reference front() {
+    return begin()[0];
+  }
+  const_reference front() const {
+    return begin()[0];
+  }
+
+  reference back() {
+    return end()[-1];
+  }
+  const_reference back() const {
+    return end()[-1];
+  }
+
+  void push_back(const_reference Elt) {
+    if (End < Capacity) {
+  Retry:
+      new (End) T(Elt);
+      ++End;
+      return;
+    }
+    grow();
+    goto Retry;
+  }
+
+  void pop_back() {
+    --End;
+    End->~T();
+  }
+
+  T pop_back_val() {
+    T Result = back();
+    pop_back();
+    return Result;
+  }
+
+  void clear() {
+    destroy_range(Begin, End);
+    End = Begin;
+  }
+
+  void resize(unsigned N) {
+    if (N < size()) {
+      destroy_range(Begin+N, End);
+      End = Begin+N;
+    } else if (N > size()) {
+      if (unsigned(Capacity-Begin) < N)
+        grow(N);
+      construct_range(End, Begin+N, T());
+      End = Begin+N;
+    }
+  }
+
+  void resize(unsigned N, const T &NV) {
+    if (N < size()) {
+      destroy_range(Begin+N, End);
+      End = Begin+N;
+    } else if (N > size()) {
+      if (unsigned(Capacity-Begin) < N)
+        grow(N);
+      construct_range(End, Begin+N, NV);
+      End = Begin+N;
+    }
+  }
+
+  void reserve(unsigned N) {
+    if (unsigned(Capacity-Begin) < N)
+      grow(N);
+  }
+
+  void swap(SmallVectorImpl &RHS);
+
+  /// append - Add the specified range to the end of the SmallVector.
+  ///
+  template<typename in_iter>
+  void append(in_iter in_start, in_iter in_end) {
+    size_type NumInputs = std::distance(in_start, in_end);
+    // Grow allocated space if needed.
+    if (NumInputs > size_type(Capacity-End))
+      grow(size()+NumInputs);
+
+    // Copy the new elements over.
+    std::uninitialized_copy(in_start, in_end, End);
+    End += NumInputs;
+  }
+
+  /// append - Add the specified range to the end of the SmallVector.
+  ///
+  void append(size_type NumInputs, const T &Elt) {
+    // Grow allocated space if needed.
+    if (NumInputs > size_type(Capacity-End))
+      grow(size()+NumInputs);
+
+    // Copy the new elements over.
+    std::uninitialized_fill_n(End, NumInputs, Elt);
+    End += NumInputs;
+  }
+
+  void assign(unsigned NumElts, const T &Elt) {
+    clear();
+    if (unsigned(Capacity-Begin) < NumElts)
+      grow(NumElts);
+    End = Begin+NumElts;
+    construct_range(Begin, End, Elt);
+  }
+
+  iterator erase(iterator I) {
+    iterator N = I;
+    // Shift all elts down one.
+    std::copy(I+1, End, I);
+    // Drop the last elt.
+    pop_back();
+    return(N);
+  }
+
+  iterator erase(iterator S, iterator E) {
+    iterator N = S;
+    // Shift all elts down.
+    iterator I = std::copy(E, End, S);
+    // Drop the last elts.
+    destroy_range(I, End);
+    End = I;
+    return(N);
+  }
+
+  iterator insert(iterator I, const T &Elt) {
+    if (I == End) {  // Important special case for empty vector.
+      push_back(Elt);
+      return end()-1;
+    }
+
+    if (End < Capacity) {
+  Retry:
+      new (End) T(back());
+      ++End;
+      // Push everything else over.
+      std::copy_backward(I, End-1, End);
+      *I = Elt;
+      return I;
+    }
+    size_t EltNo = I-Begin;
+    grow();
+    I = Begin+EltNo;
+    goto Retry;
+  }
+
+  iterator insert(iterator I, size_type NumToInsert, const T &Elt) {
+    if (I == End) {  // Important special case for empty vector.
+      append(NumToInsert, Elt);
+      return end()-1;
+    }
+
+    // Convert iterator to elt# to avoid invalidating iterator when we reserve()
+    size_t InsertElt = I-begin();
+
+    // Ensure there is enough space.
+    reserve(static_cast<unsigned>(size() + NumToInsert));
+
+    // Uninvalidate the iterator.
+    I = begin()+InsertElt;
+
+    // If there are more elements between the insertion point and the end of the
+    // range than there are being inserted, we can use a simple approach to
+    // insertion.  Since we already reserved space, we know that this won't
+    // reallocate the vector.
+    if (size_t(end()-I) >= NumToInsert) {
+      T *OldEnd = End;
+      append(End-NumToInsert, End);
+
+      // Copy the existing elements that get replaced.
+      std::copy_backward(I, OldEnd-NumToInsert, OldEnd);
+
+      std::fill_n(I, NumToInsert, Elt);
+      return I;
+    }
+
+    // Otherwise, we're inserting more elements than exist already, and we're
+    // not inserting at the end.
+
+    // Copy over the elements that we're about to overwrite.
+    T *OldEnd = End;
+    End += NumToInsert;
+    size_t NumOverwritten = OldEnd-I;
+    std::uninitialized_copy(I, OldEnd, End-NumOverwritten);
+
+    // Replace the overwritten part.
+    std::fill_n(I, NumOverwritten, Elt);
+
+    // Insert the non-overwritten middle part.
+    std::uninitialized_fill_n(OldEnd, NumToInsert-NumOverwritten, Elt);
+    return I;
+  }
+
+  template<typename ItTy>
+  iterator insert(iterator I, ItTy From, ItTy To) {
+    if (I == End) {  // Important special case for empty vector.
+      append(From, To);
+      return end()-1;
+    }
+
+    size_t NumToInsert = std::distance(From, To);
+    // Convert iterator to elt# to avoid invalidating iterator when we reserve()
+    size_t InsertElt = I-begin();
+
+    // Ensure there is enough space.
+    reserve(static_cast<unsigned>(size() + NumToInsert));
+
+    // Uninvalidate the iterator.
+    I = begin()+InsertElt;
+
+    // If there are more elements between the insertion point and the end of the
+    // range than there are being inserted, we can use a simple approach to
+    // insertion.  Since we already reserved space, we know that this won't
+    // reallocate the vector.
+    if (size_t(end()-I) >= NumToInsert) {
+      T *OldEnd = End;
+      append(End-NumToInsert, End);
+
+      // Copy the existing elements that get replaced.
+      std::copy_backward(I, OldEnd-NumToInsert, OldEnd);
+
+      std::copy(From, To, I);
+      return I;
+    }
+
+    // Otherwise, we're inserting more elements than exist already, and we're
+    // not inserting at the end.
+
+    // Copy over the elements that we're about to overwrite.
+    T *OldEnd = End;
+    End += NumToInsert;
+    size_t NumOverwritten = OldEnd-I;
+    std::uninitialized_copy(I, OldEnd, End-NumOverwritten);
+
+    // Replace the overwritten part.
+    std::copy(From, From+NumOverwritten, I);
+
+    // Insert the non-overwritten middle part.
+    std::uninitialized_copy(From+NumOverwritten, To, OldEnd);
+    return I;
+  }
+
+  const SmallVectorImpl &operator=(const SmallVectorImpl &RHS);
+
+  bool operator==(const SmallVectorImpl &RHS) const {
+    if (size() != RHS.size()) return false;
+    for (T *This = Begin, *That = RHS.Begin, *E = Begin+size();
+         This != E; ++This, ++That)
+      if (*This != *That)
+        return false;
+    return true;
+  }
+  bool operator!=(const SmallVectorImpl &RHS) const { return !(*this == RHS); }
+
+  bool operator<(const SmallVectorImpl &RHS) const {
+    return std::lexicographical_compare(begin(), end(),
+                                        RHS.begin(), RHS.end());
+  }
+
+private:
+  /// isSmall - Return true if this is a smallvector which has not had dynamic
+  /// memory allocated for it.
+  bool isSmall() const {
+    return static_cast<const void*>(Begin) ==
+           static_cast<const void*>(&FirstEl);
+  }
+
+  /// grow - double the size of the allocated memory, guaranteeing space for at
+  /// least one more element or MinSize if specified.
+  void grow(size_type MinSize = 0);
+
+  void construct_range(T *S, T *E, const T &Elt) {
+    for (; S != E; ++S)
+      new (S) T(Elt);
+  }
+
+  void destroy_range(T *S, T *E) {
+    while (S != E) {
+      --E;
+      E->~T();
+    }
+  }
+};
+
+// Define this out-of-line to dissuade the C++ compiler from inlining it.
+template <typename T>
+void SmallVectorImpl<T>::grow(size_t MinSize) {
+  size_t CurCapacity = Capacity-Begin;
+  size_t CurSize = size();
+  size_t NewCapacity = 2*CurCapacity;
+  if (NewCapacity < MinSize)
+    NewCapacity = MinSize;
+  T *NewElts = static_cast<T*>(operator new(NewCapacity*sizeof(T)));
+
+  // Copy the elements over.
+  if (boost::is_class<T>::value)
+    std::uninitialized_copy(Begin, End, NewElts);
+  else
+    // Use memcpy for PODs (std::uninitialized_copy optimizes to memmove).
+    memcpy(NewElts, Begin, CurSize * sizeof(T));
+
+  // Destroy the original elements.
+  destroy_range(Begin, End);
+
+  // If this wasn't grown from the inline copy, deallocate the old space.
+  if (!isSmall())
+    operator delete(Begin);
+
+  Begin = NewElts;
+  End = NewElts+CurSize;
+  Capacity = Begin+NewCapacity;
+}
+
+template <typename T>
+void SmallVectorImpl<T>::swap(SmallVectorImpl<T> &RHS) {
+  if (this == &RHS) return;
+
+  // We can only avoid copying elements if neither vector is small.
+  if (!isSmall() && !RHS.isSmall()) {
+    std::swap(Begin, RHS.Begin);
+    std::swap(End, RHS.End);
+    std::swap(Capacity, RHS.Capacity);
+    return;
+  }
+  if (RHS.size() > size_type(Capacity-Begin))
+    grow(RHS.size());
+  if (size() > size_type(RHS.Capacity-RHS.begin()))
+    RHS.grow(size());
+
+  // Swap the shared elements.
+  size_t NumShared = size();
+  if (NumShared > RHS.size()) NumShared = RHS.size();
+  for (unsigned i = 0; i != static_cast<unsigned>(NumShared); ++i)
+    std::swap(Begin[i], RHS[i]);
+
+  // Copy over the extra elts.
+  if (size() > RHS.size()) {
+    size_t EltDiff = size() - RHS.size();
+    std::uninitialized_copy(Begin+NumShared, End, RHS.End);
+    RHS.End += EltDiff;
+    destroy_range(Begin+NumShared, End);
+    End = Begin+NumShared;
+  } else if (RHS.size() > size()) {
+    size_t EltDiff = RHS.size() - size();
+    std::uninitialized_copy(RHS.Begin+NumShared, RHS.End, End);
+    End += EltDiff;
+    destroy_range(RHS.Begin+NumShared, RHS.End);
+    RHS.End = RHS.Begin+NumShared;
+  }
+}
+
+template <typename T>
+const SmallVectorImpl<T> &
+SmallVectorImpl<T>::operator=(const SmallVectorImpl<T> &RHS) {
+  // Avoid self-assignment.
+  if (this == &RHS) return *this;
+
+  // If we already have sufficient space, assign the common elements, then
+  // destroy any excess.
+  unsigned RHSSize = unsigned(RHS.size());
+  unsigned CurSize = unsigned(size());
+  if (CurSize >= RHSSize) {
+    // Assign common elements.
+    iterator NewEnd;
+    if (RHSSize)
+      NewEnd = std::copy(RHS.Begin, RHS.Begin+RHSSize, Begin);
+    else
+      NewEnd = Begin;
+
+    // Destroy excess elements.
+    destroy_range(NewEnd, End);
+
+    // Trim.
+    End = NewEnd;
+    return *this;
+  }
+
+  // If we have to grow to have enough elements, destroy the current elements.
+  // This allows us to avoid copying them during the grow.
+  if (unsigned(Capacity-Begin) < RHSSize) {
+    // Destroy current elements.
+    destroy_range(Begin, End);
+    End = Begin;
+    CurSize = 0;
+    grow(RHSSize);
+  } else if (CurSize) {
+    // Otherwise, use assignment for the already-constructed elements.
+    std::copy(RHS.Begin, RHS.Begin+CurSize, Begin);
+  }
+
+  // Copy construct the new elements in place.
+  std::uninitialized_copy(RHS.Begin+CurSize, RHS.End, Begin+CurSize);
+
+  // Set end.
+  End = Begin+RHSSize;
+  return *this;
+}
+
+/// SmallVector - This is a 'vector' (really, a variable-sized array), optimized
+/// for the case when the array is small.  It contains some number of elements
+/// in-place, which allows it to avoid heap allocation when the actual number of
+/// elements is below that threshold.  This allows normal "small" cases to be
+/// fast without losing generality for large inputs.
+///
+/// Note that this does not attempt to be exception safe.
+///
+template <typename T, unsigned N>
+class SmallVector : public SmallVectorImpl<T> {
+  /// InlineElts - These are 'N-1' elements that are stored inline in the body
+  /// of the vector.  The extra '1' element is stored in SmallVectorImpl.
+  typedef typename SmallVectorImpl<T>::U U;
+  enum {
+    // MinUs - The number of U's require to cover N T's.
+    MinUs = (static_cast<unsigned int>(sizeof(T))*N +
+             static_cast<unsigned int>(sizeof(U)) - 1) /
+            static_cast<unsigned int>(sizeof(U)),
+
+    // NumInlineEltsElts - The number of elements actually in this array.  There
+    // is already one in the parent class, and we have to round up to avoid
+    // having a zero-element array.
+    NumInlineEltsElts = MinUs > 1 ? (MinUs - 1) : 1,
+
+    // NumTsAvailable - The number of T's we actually have space for, which may
+    // be more than N due to rounding.
+    NumTsAvailable = (NumInlineEltsElts+1)*static_cast<unsigned int>(sizeof(U))/
+                     static_cast<unsigned int>(sizeof(T))
+  };
+  U InlineElts[NumInlineEltsElts];
+public:
+  SmallVector() : SmallVectorImpl<T>(NumTsAvailable) {
+  }
+
+  explicit SmallVector(unsigned Size, const T &Value = T())
+    : SmallVectorImpl<T>(NumTsAvailable) {
+    this->reserve(Size);
+    while (Size--)
+      this->push_back(Value);
+  }
+
+  template<typename ItTy>
+  SmallVector(ItTy S, ItTy E) : SmallVectorImpl<T>(NumTsAvailable) {
+    this->append(S, E);
+  }
+
+  SmallVector(const SmallVector &RHS) : SmallVectorImpl<T>(NumTsAvailable) {
+    if (!RHS.empty())
+      SmallVectorImpl<T>::operator=(RHS);
+  }
+
+  const SmallVector &operator=(const SmallVector &RHS) {
+    SmallVectorImpl<T>::operator=(RHS);
+    return *this;
+  }
+
+};
+
+} // End Passenger namespace
+
+namespace std {
+  /// Implement std::swap in terms of SmallVector swap.
+  template<typename T>
+  inline void
+  swap(Passenger::SmallVectorImpl<T> &LHS, Passenger::SmallVectorImpl<T> &RHS) {
+    LHS.swap(RHS);
+  }
+
+  /// Implement std::swap in terms of SmallVector swap.
+  template<typename T, unsigned N>
+  inline void
+  swap(Passenger::SmallVector<T, N> &LHS, Passenger::SmallVector<T, N> &RHS) {
+    LHS.swap(RHS);
+  }
+}
+
+#endif
diff --git a/ext/common/Utils/StrIntUtils.cpp b/ext/common/Utils/StrIntUtils.cpp
index d6b9051..2e68392 100644
--- a/ext/common/Utils/StrIntUtils.cpp
+++ b/ext/common/Utils/StrIntUtils.cpp
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -27,8 +27,10 @@
 #include <cstdlib>
 #include <cctype>
 #include <cmath>
-#include <Utils/utf8.h>
+#include <algorithm>
 #include <Exceptions.h>
+#include <Utils/utf8.h>
+#include <Utils/SystemTime.h>
 #include <Utils/StrIntUtils.h>
 
 namespace Passenger {
@@ -57,16 +59,18 @@ startsWith(const StaticString &str, const StaticString &substr) {
 }
 
 template<typename OutputString>
-void
+static void
 _split(const StaticString &str, char sep, vector<OutputString> &output) {
-	string::size_type start, pos;
-	start = 0;
 	output.clear();
-	while ((pos = str.find(sep, start)) != string::npos) {
-		output.push_back(str.substr(start, pos - start));
-		start = pos + 1;
+	if (!str.empty()) {
+		string::size_type start, pos;
+		start = 0;
+		while ((pos = str.find(sep, start)) != string::npos) {
+			output.push_back(str.substr(start, pos - start));
+			start = pos + 1;
+		}
+		output.push_back(str.substr(start));
 	}
-	output.push_back(str.substr(start));
 }
 
 void
@@ -79,6 +83,66 @@ split(const StaticString &str, char sep, vector<StaticString> &output) {
 	_split(str, sep, output);
 }
 
+template<typename OutputString>
+static void
+_splitIncludeSep(const StaticString &str, char sep, vector<OutputString> &output) {
+	output.clear();
+	if (!str.empty()) {
+		string::size_type start, pos;
+		start = 0;
+		while ((pos = str.find(sep, start)) != string::npos) {
+			output.push_back(str.substr(start, pos - start + 1));
+			start = pos + 1;
+		}
+		if (start != str.size()) {
+			output.push_back(str.substr(start));
+		}
+	}
+}
+
+void
+splitIncludeSep(const StaticString &str, char sep, vector<string> &output) {
+	_splitIncludeSep(str, sep, output);
+}
+
+void
+splitIncludeSep(const StaticString &str, char sep, vector<StaticString> &output) {
+	_splitIncludeSep(str, sep, output);
+}
+
+string
+replaceString(const string &str, const string &toFind, const string &replaceWith) {
+	string::size_type pos = str.find(toFind);
+	if (pos == string::npos) {
+		return str;
+	} else {
+		string result(str);
+		return result.replace(pos, toFind.size(), replaceWith);
+	}
+}
+
+string
+replaceAll(const string &str, const string &toFind, const string &replaceWith) {
+	string result = str;
+	while (result.find(toFind) != string::npos) {
+		result = replaceString(result, toFind, replaceWith);
+	}
+	return result;
+}
+
+string
+strip(const StaticString &str) {
+	const char *data = str.data();
+	const char *end = str.data() + str.size();
+	while (data < end && (*data == ' ' || *data == '\n' || *data == '\t')) {
+		data++;
+	}
+	while (end > data && (end[-1] == ' ' || end[-1] == '\n' || end[-1] == '\t')) {
+		end--;
+	}
+	return string(data, end - data);
+}
+
 string
 toString(const vector<string> &vec) {
 	vector<StaticString> vec2;
@@ -320,6 +384,68 @@ atol(const string &s) {
 	return ::atol(s.c_str());
 }
 
+bool
+constantTimeCompare(const StaticString &a, const StaticString &b) {
+	// http://blog.jasonmooberry.com/2010/10/constant-time-string-comparison/
+	// See also ActiveSupport::MessageVerifier#secure_compare.
+	if (a.size() != b.size()) {
+		return false;
+	} else {
+		const char *x = a.data();
+		const char *y = b.data();
+		const char *end = a.data() + a.size();
+		int result = 0;
+
+		while (x < end) {
+			result |= *x ^ *y;
+			x++;
+			y++;
+		}
+
+		return result == 0;
+	}
+}
+
+string
+distanceOfTimeInWords(time_t fromTime, time_t toTime) {
+	time_t seconds;
+	stringstream result;
+	if (toTime == 0) {
+		toTime = SystemTime::get();
+	}
+	if (fromTime < toTime) {
+		seconds = toTime - fromTime;
+	} else {
+		seconds = fromTime - toTime;
+	}
+	
+	if (seconds >= 60) {
+		time_t minutes = seconds / 60;
+		if (minutes >= 60) {
+			time_t hours = minutes / 60;
+			minutes = minutes % 60;
+			result << hours << "h ";
+		}
+		
+		seconds = seconds % 60;
+		result << minutes << "m ";
+	}
+	result << seconds << "s";
+	return result.str();
+}
+
+char *
+appendData(char *pos, const char *end, const char *data, size_t size) {
+	size_t maxToCopy = std::min<size_t>(end - pos, size);
+	memcpy(pos, data, maxToCopy);
+	return pos + size;
+}
+
+char *
+appendData(char *pos, const char *end, const StaticString &data) {
+	return appendData(pos, end, data.data(), data.size());
+}
+
 string
 cEscapeString(const StaticString &input) {
 	string result;
@@ -408,4 +534,14 @@ escapeHTML(const StaticString &input) {
 	return result;
 }
 
+StaticString
+makeStaticStringWithNull(const char *data) {
+	return StaticString(data, strlen(data) + 1);
+}
+
+StaticString
+makeStaticStringWithNull(const string &data) {
+	return StaticString(data.c_str(), data.size() + 1);
+}
+
 } // namespace Passenger
diff --git a/ext/common/Utils/StrIntUtils.h b/ext/common/Utils/StrIntUtils.h
index 96e7921..7d8ce3c 100644
--- a/ext/common/Utils/StrIntUtils.h
+++ b/ext/common/Utils/StrIntUtils.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -28,12 +28,16 @@
 #include <string>
 #include <vector>
 #include <sstream>
-#include "StaticString.h"
+#include <cstddef>
+#include <ctime>
+#include <oxt/macros.hpp>
+#include <StaticString.h>
 
 namespace Passenger {
 
 using namespace std;
 
+
 /**
  * Given a prefix string, a middle string and a postfix string, try to build a string
  * that looks like <tt>prefix + middle + postfix</tt>, with as many characters from
@@ -64,14 +68,50 @@ string fillInMiddle(unsigned int max, const string &prefix, const string &middle
 bool startsWith(const StaticString &str, const StaticString &substr);
 
 /**
- * Split the given string using the given separator.
+ * Split the given string using the given separator. Excludes the
+ * separator from the output.
  *
  * @param str The string to split.
  * @param sep The separator to use.
  * @param output The vector to write the output to.
  */
-void split(const StaticString &str, char sep, vector<string> &output);
-void split(const StaticString &str, char sep, vector<StaticString> &output);
+void split(const StaticString & restrict_ref str,
+	char sep,
+	vector<string> & restrict_ref output);
+void split(const StaticString & restrict_ref str,
+	char sep,
+	vector<StaticString> & restrict_ref output);
+
+/**
+ * Split the given string using the given separator. Includes the
+ * separator in the output, at the end of an item.
+ *
+ * @param str The string to split.
+ * @param sep The separator to use.
+ * @param output The vector to write the output to.
+ */
+void splitIncludeSep(const StaticString & restrict_ref str,
+	char sep,
+	vector<string> & restrict_ref output);
+void splitIncludeSep(const StaticString & restrict_ref str,
+	char sep,
+	vector<StaticString> & restrict_ref output);
+
+/**
+ * Look for 'toFind' inside 'str', replace it with 'replaceWith' and return the result.
+ * Only the first occurence of 'toFind' is replaced.
+ */
+string replaceString(const string &str, const string &toFind, const string &replaceWith);
+
+/**
+ * Like replaceString(), but replace all occurrences of `toFind`.
+ */
+string replaceAll(const string &str, const string &toFind, const string &replaceWith);
+
+/**
+ * Strips leading and trailing whitespaces.
+ */
+string strip(const StaticString &str);
 
 /**
  * Convert anything to a string.
@@ -120,7 +160,7 @@ string toHex(const StaticString &data);
  * Convert the given binary data to hexadecimal. This form accepts an
  * output buffer which must be at least <tt>data.size() * 2</tt> bytes large.
  */
-void toHex(const StaticString &data, char *output, bool upperCase = false);
+void toHex(const StaticString & restrict_ref data, char * restrict output, bool upperCase = false);
 
 /**
  * Convert the given integer to some other radix, placing
@@ -217,6 +257,20 @@ roundUp(IntegerType number, IntegerType multiple) {
 }
 
 /**
+ * Compare two strings using a constant time algorithm to avoid timing attacks.
+ */
+bool constantTimeCompare(const StaticString &a, const StaticString &b);
+
+string distanceOfTimeInWords(time_t fromTime, time_t toTime = 0);
+
+/**
+ * Append the given data to the address at 'pos', but do not cross 'end'.
+ * Returns the end of the appended string.
+ */
+char *appendData(char *pos, const char *end, const char *data, size_t size);
+char *appendData(char *pos, const char *end, const StaticString &data);
+
+/**
  * Escape non-ASCII-printable characters in the given string with C-style escape sequences,
  * e.g. "foo\nbar\0" becomes "foo\\nbar\\0".
  */
@@ -230,6 +284,10 @@ string cEscapeString(const StaticString &input);
  */
 string escapeHTML(const StaticString &input);
 
+StaticString makeStaticStringWithNull(const char *data);
+
+StaticString makeStaticStringWithNull(const string &data);
+
 } // namespace Passenger
 
 #endif /* _PASSENGER_STR_INT_UTILS_H_ */
diff --git a/ext/common/Utils/StringMap.h b/ext/common/Utils/StringMap.h
index 2422153..f87ff4e 100644
--- a/ext/common/Utils/StringMap.h
+++ b/ext/common/Utils/StringMap.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2011 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -30,6 +30,7 @@
 #include <utility>
 
 #include <StaticString.h>
+#include <Utils/HashMap.h>
 
 namespace Passenger {
 
@@ -50,27 +51,128 @@ class StringMap {
 private:
 	struct Entry {
 		string key;
-		T value;
+		pair<StaticString, T> thePair;
 	};
 	
-	typedef map<StaticString, Entry> InternalMap;
-	typedef typename InternalMap::iterator Iterator;
-	typedef typename InternalMap::const_iterator ConstIterator;
+	typedef HashMap<StaticString, Entry, StaticString::Hash> InternalMap;
+	typedef typename InternalMap::iterator InternalIterator;
+	typedef typename InternalMap::const_iterator InternalConstIterator;
 	typedef typename InternalMap::value_type ValueType;
 	InternalMap store;
 	
 public:
+	class const_iterator {
+	private:
+		InternalConstIterator it;
+		
+	public:
+		const_iterator() { }
+		
+		const_iterator(const InternalConstIterator &_it)
+			: it(_it)
+			{ }
+		
+		const_iterator &operator=(const const_iterator &value) {
+			it = value.it;
+			return *this;
+		}
+		
+		const_iterator &operator++() {
+			it++;
+			return *this;
+		}
+		
+		const_iterator operator++(int) {
+			const_iterator copy(*this);
+			operator++();
+			return copy;
+		}
+		
+		bool operator==(const const_iterator &other) {
+			return it == other.it;
+		}
+		
+		bool operator!=(const const_iterator &other) {
+			return it != other.it;
+		}
+		
+		const pair<const StaticString, const T> &operator*() {
+			return (pair<const StaticString, const T> &) it->second.thePair;
+		}
+		
+		const pair<const StaticString, const T> *operator->() {
+			return &(**this);
+		}
+	};
+	
+	class iterator {
+	private:
+		InternalIterator it;
+		
+	public:
+		iterator() { }
+		
+		iterator(const InternalIterator &_it)
+			: it(_it)
+			{ }
+		
+		iterator &operator=(const iterator &value) {
+			it = value.it;
+			return *this;
+		}
+		
+		iterator &operator++() {
+			it++;
+			return *this;
+		}
+		
+		iterator operator++(int) {
+			iterator copy(*this);
+			operator++();
+			return copy;
+		}
+		
+		bool operator==(const iterator &other) {
+			return it == other.it;
+		}
+		
+		bool operator!=(const iterator &other) {
+			return it != other.it;
+		}
+		
+		pair<StaticString, T> &operator*() {
+			return it->second.thePair;
+		}
+		
+		pair<StaticString, T> *operator->() {
+			return &(**this);
+		}
+		
+		operator const_iterator() const {
+			return const_iterator(it);
+		}
+	};
+	
 	T get(const StaticString &key) const {
-		ConstIterator it = store.find(key);
+		InternalConstIterator it = store.find(key);
 		if (it == store.end()) {
 			return T();
 		} else {
-			return it->second.value;
+			return it->second.thePair.second;
+		}
+	}
+
+	T get(const StaticString &key, const T &defaultValue) const {
+		InternalConstIterator it = store.find(key);
+		if (it == store.end()) {
+			return defaultValue;
+		} else {
+			return it->second.thePair.second;
 		}
 	}
 	
 	bool set(const StaticString &key, const T &value) {
-		pair<Iterator, bool> result = store.insert(make_pair(key, Entry()));
+		pair<InternalIterator, bool> result = store.insert(make_pair(key, Entry()));
 		if (result.second) {
 			// Key has been inserted. Copy it internally and point key
 			// to the copy.
@@ -78,13 +180,14 @@ public:
 			StaticString &originalKey = const_cast<StaticString &>(node.first);
 			Entry &entry = node.second;
 			entry.key = key;
-			entry.value = value;
+			entry.thePair.first = entry.key;
+			entry.thePair.second = value;
 			originalKey = entry.key;
 			return true;
 		} else {
 			// Key already exists. Update value.
 			Entry &entry = result.first->second;
-			entry.value = value;
+			entry.thePair.second = value;
 			return false;
 		}
 	}
@@ -92,6 +195,30 @@ public:
 	bool remove(const StaticString &key) {
 		return store.erase(key) > 0;
 	}
+	
+	unsigned int size() const {
+		return store.size();
+	}
+	
+	bool empty() const {
+		return store.empty();
+	}
+	
+	iterator begin() {
+		return iterator(store.begin());
+	}
+	
+	const_iterator begin() const {
+		return const_iterator(store.begin());
+	}
+	
+	iterator end() {
+		return iterator(store.end());
+	}
+	
+	const_iterator end() const {
+		return const_iterator(store.end());
+	}
 };
 
 
diff --git a/ext/common/Utils/SystemTime.cpp b/ext/common/Utils/SystemTime.cpp
index df46c5b..f7f5e6c 100644
--- a/ext/common/Utils/SystemTime.cpp
+++ b/ext/common/Utils/SystemTime.cpp
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/ext/common/Utils/SystemTime.h b/ext/common/Utils/SystemTime.h
index ac4dfe3..4cc5854 100644
--- a/ext/common/Utils/SystemTime.h
+++ b/ext/common/Utils/SystemTime.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/ext/common/Utils/Template.h b/ext/common/Utils/Template.h
new file mode 100644
index 0000000..68e0123
--- /dev/null
+++ b/ext/common/Utils/Template.h
@@ -0,0 +1,212 @@
+#ifndef _PASSENGER_TEMPLATE_H_
+#define _PASSENGER_TEMPLATE_H_
+
+#include <string>
+#include <cstring>
+#include <cstdio>
+#include <StaticString.h>
+#include <Utils/StrIntUtils.h>
+#include <Utils/StringMap.h>
+
+namespace Passenger {
+
+using namespace std;
+
+
+/**
+ * Implements a simple HTML templating language.
+ */
+class Template {
+private:
+	typedef string::size_type size_type;
+
+	struct State {
+		string result;
+		const StringMap<StaticString> &substitutions;
+
+		State(const StaticString &content, const StringMap<StaticString> &_substitutions)
+			: result(content.data(), content.size()),
+			  substitutions(_substitutions)
+			{ }
+	};
+
+	struct Options {
+		bool raw;
+		string defaultValue;
+
+		Options() {
+			raw = false;
+		}
+	};
+
+	StaticString content;
+
+	static bool isNameCharacter(char ch) {
+		return (ch >= 'a' && ch <= 'z')
+			|| (ch >= 'A' && ch <= 'Z')
+			|| (ch >= '0' && ch <= '9')
+			|| ch == '_';
+	}
+
+	static StaticString readOptionName(const char **current) {
+		while (**current != '\0' && (**current == ',' || **current == ' ')) {
+			(*current)++;
+		}
+		const char *begin = *current;
+		while (**current != '\0' && isNameCharacter(**current)) {
+			(*current)++;
+		}
+		const char *end = *current;
+		return StaticString(begin, end - begin);
+	}
+
+	static StaticString readOptionValue(const char **current) {
+		while (**current != '\0' && **current == ' ') {
+			(*current)++;
+		}
+		if (**current == '=') {
+			(*current)++;
+			const char *begin = *current;
+			while (**current != '\0' && **current != ',') {
+				(*current)++;
+			}
+			const char *end = *current;
+			return StaticString(begin, end - begin);
+		} else {
+			return StaticString();
+		}
+	}
+
+	static Options parseOptions(const string &optionsString) {
+		Options options;
+
+		const char *current = optionsString.data();
+		while (*current != '\0') {
+			StaticString name = readOptionName(&current);
+			StaticString value = readOptionValue(&current);
+			if (name == "raw") {
+				options.raw = true;
+			} else if (name == "default") {
+				options.defaultValue = value;
+			} else {
+				fprintf(stderr, "Unknown template option '%s'\n", name.c_str());
+			}
+		}
+		return options;
+	}
+
+	static string &makeBreakable(string &html) {
+		string::size_type i = 0;
+		while (i < html.size()) {
+			char ch = html[i];
+			if (ch == '=' || ch == ',' || ch == ';' || ch == ':') {
+				html.insert(i + 1, "<wbr>");
+				i += sizeof("<wbr>");
+			} else if (ch == '&') {
+				// HTML escape character; skip to end.
+				do {
+					i++;
+				} while (i < html.size() && html[i] != ';');
+				if (i < html.size()) {
+					i++;
+				}
+			} else {
+				i++;
+			}
+		}
+		return html;
+	}
+
+	size_type processIf(State &state, size_type pos, size_type conditionEndPos, const string &name) {
+		const size_t prefixSize = sizeof("if ") - 1;
+		const size_t endIfSize  = sizeof("{{/if}}") - 1;
+		const string condition = name.substr(prefixSize, name.size() - prefixSize);
+		const string evalResult = state.substitutions.get(condition);
+
+		conditionEndPos += sizeof("}}") - 1;
+		size_type endIfPos = state.result.find("{{/if}}", conditionEndPos);
+		if (endIfPos == string::npos) {
+			return state.result.size();
+		}
+
+		if (!evalResult.empty() && evalResult != "false") {
+			const string subContent = state.result.substr(conditionEndPos, endIfPos - conditionEndPos);
+			State subState(subContent, state.substitutions);
+			apply(subState);
+			state.result.replace(pos, endIfPos + endIfSize - pos, subState.result);
+			return pos + subState.result.size();
+		} else {
+			state.result.erase(pos, endIfPos - pos + sizeof("{{/if}}") - 1);
+			return pos;
+		}
+	}
+
+	size_type processSubsitution(State &state, size_type pos, size_type endPos, string name) {
+		Options options;
+		size_type sep = name.find('|');
+		if (sep != string::npos) {
+			const string optionsString = name.substr(sep + 1);
+			name = name.substr(0, sep);
+			options = parseOptions(optionsString);
+		}
+
+		string value = state.substitutions.get(name);
+		if (value.empty()) {
+			value = options.defaultValue;
+		}
+		if (!options.raw) {
+			value = escapeHTML(value);
+			makeBreakable(value);
+		}
+
+		state.result.replace(pos, endPos - pos + (sizeof("}}") - 1), value);
+		return pos + value.size();
+	}
+
+	size_type processCommand(State &state, size_type pos) {
+		size_type endPos = state.result.find("}}", pos);
+		if (endPos == string::npos) {
+			return state.result.size();
+		}
+		
+		string name = state.result.substr(pos + 2, endPos - pos - 2);
+		if (startsWith(name, "if ")) {
+			return processIf(state, pos, endPos, name);
+		} else {
+			return processSubsitution(state, pos, endPos, name);
+		}
+	}
+
+	void apply(State &state) {
+		size_type searchStart = 0;
+
+		while (searchStart < state.result.size()) {
+			size_type pos = state.result.find("{{", searchStart);
+			if (pos == string::npos) {
+				searchStart = state.result.size();
+			} else {
+				searchStart = processCommand(state, pos);
+			}
+		}
+	}
+
+public:
+	Template(const StaticString &_content)
+		: content(_content)
+		{ }
+	
+	string apply(const StringMap<StaticString> &substitutions) {
+		State state(content, substitutions);
+		apply(state);
+		return state.result;
+	}
+
+	static string apply(const StaticString &content, const StringMap<StaticString> &substitutions) {
+		return Template(content).apply(substitutions);
+	}
+};
+
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_TEMPLATE_H_ */
diff --git a/ext/common/Utils/Timer.h b/ext/common/Utils/Timer.h
index 9fd273e..9994cf6 100644
--- a/ext/common/Utils/Timer.h
+++ b/ext/common/Utils/Timer.h
@@ -1,5 +1,5 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
+ *  Phusion Passenger - https://www.phusionpassenger.com/
  *  Copyright (c) 2010 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -74,7 +74,7 @@ public:
 		// TODO: We really use should clock_gettime() and the monotonic
 		// clock whenever possible, instead of gettimeofday()...
 		// On OS X we can use mach_absolute_time()
-		lock_guard<boost::mutex> l(lock);
+		boost::lock_guard<boost::mutex> l(lock);
 		int ret;
 		do {
 			ret = gettimeofday(&startTime, NULL);
@@ -87,7 +87,7 @@ public:
 	 * and sufficient amount of time has elapsed.
 	 */
 	void stop() {
-		lock_guard<boost::mutex> l(lock);
+		boost::lock_guard<boost::mutex> l(lock);
 		startTime.tv_sec = 0;
 		startTime.tv_usec = 0;
 	}
@@ -97,7 +97,7 @@ public:
 	 * in miliseconds. If the timer is currently stopped, then 0 is returned.
 	 */
 	unsigned long long elapsed() const {
-		lock_guard<boost::mutex> l(lock);
+		boost::lock_guard<boost::mutex> l(lock);
 		if (startTime.tv_sec == 0 && startTime.tv_usec == 0) {
 			return 0;
 		} else {
@@ -119,7 +119,7 @@ public:
 	 * in microseconds. If the timer is currently stopped, then 0 is returned.
 	 */
 	unsigned long long usecElapsed() const {
-		lock_guard<boost::mutex> l(lock);
+		boost::lock_guard<boost::mutex> l(lock);
 		if (startTime.tv_sec == 0 && startTime.tv_usec == 0) {
 			return 0;
 		} else {
diff --git a/ext/common/Utils/VariantMap.h b/ext/common/Utils/VariantMap.h
index f9c9630..3761b53 100644
--- a/ext/common/Utils/VariantMap.h
+++ b/ext/common/Utils/VariantMap.h
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -29,9 +29,12 @@
 #include <oxt/macros.hpp>
 #include <sys/types.h>
 #include <map>
+#include <set>
+#include <vector>
 #include <string>
 #include <Exceptions.h>
 #include <Utils/StrIntUtils.h>
+#include <Utils/Base64.h>
 #include <Utils/MessageIO.h>
 
 namespace Passenger {
@@ -124,19 +127,25 @@ public:
 		}
 		unsigned int i = 0;
 		while (i < argc) {
-			store[argv[i]] = argv[i + 1];
+			string name = argv[i];
+			if (startsWith(name, "--")) {
+				name.erase(0, 2);
+			}
+			name = replaceAll(name, "-", "_");
+
+			store[name] = replaceAll(argv[i + 1], "-", "_");
 			i += 2;
 		}
 	}
 	
 	/**
-	 * Populates a VariantMap from the data in <em>fd</em>. MessageIO
+	 * Populates a VariantMap from the data in `fd`. MessageIO
 	 * is used to read from the file descriptor.
 	 *
 	 * @throws SystemException
 	 * @throws IOException
 	 */
-	void readFrom(int fd) {
+	void readFrom(int fd, const StaticString &messageName = "VariantMap") {
 		TRACE_POINT();
 		vector<string> args;
 		
@@ -146,7 +155,7 @@ public:
 		if (args.size() == 0) {
 			throw IOException("Unexpected empty message received from channel");
 		}
-		if (args[0] != "VariantMap") {
+		if (args[0] != messageName) {
 			throw IOException("Unexpected message '" + args[0] + "' received from channel");
 		}
 		if (args.size() % 2 != 1) {
@@ -165,40 +174,108 @@ public:
 	}
 	
 	VariantMap &set(const string &name, const string &value) {
-		store[name] = value;
+		if (value.empty()) {
+			map<string, string>::iterator it = store.find(name);
+			if (it != store.end()) {
+				store.erase(it);
+			}
+		} else {
+			store[name] = value;
+		}
+		return *this;
+	}
+
+	VariantMap &setDefault(const string &name, const string &value) {
+		if (store.find(name) == store.end()) {
+			set(name, value);
+		}
 		return *this;
 	}
 	
 	VariantMap &setInt(const string &name, int value) {
-		store[name] = toString(value);
+		set(name, toString(value));
+		return *this;
+	}
+
+	VariantMap &setDefaultInt(const string &name, int value) {
+		if (store.find(name) == store.end()) {
+			store[name] = toString(value);
+		}
 		return *this;
 	}
 	
 	VariantMap &setULL(const string &name, unsigned long long value) {
-		store[name] = toString(value);
+		set(name, toString(value));
+		return *this;
+	}
+
+	VariantMap &setDefaultULL(const string &name, unsigned long long value) {
+		if (store.find(name) == store.end()) {
+			store[name] = toString(value);
+		}
 		return *this;
 	}
 	
 	VariantMap &setPid(const string &name, pid_t value) {
-		store[name] = toString((unsigned long long) value);
+		set(name, toString((unsigned long long) value));
+		return *this;
+	}
+
+	VariantMap &setDefaultPid(const string &name, pid_t value) {
+		if (store.find(name) == store.end()) {
+			store[name] = toString((unsigned long long) value);
+		}
 		return *this;
 	}
 	
 	VariantMap &setUid(const string &name, uid_t value) {
-		store[name] = toString((long long) value);
+		set(name, toString((long long) value));
+		return *this;
+	}
+
+	VariantMap &setDefaultUid(const string &name, uid_t value) {
+		if (store.find(name) == store.end()) {
+			store[name] = toString((unsigned long long) value);
+		}
 		return *this;
 	}
 	
 	VariantMap &setGid(const string &name, gid_t value) {
-		store[name] = toString((long long) value);
+		set(name, toString((long long) value));
+		return *this;
+	}
+
+	VariantMap &setDefaultGid(const string &name, gid_t value) {
+		if (store.find(name) == store.end()) {
+			store[name] = toString((unsigned long long) value);
+		}
 		return *this;
 	}
 	
 	VariantMap &setBool(const string &name, bool value) {
-		store[name] = value ? "true" : "false";
+		set(name, value ? "true" : "false");
 		return *this;
 	}
-	
+
+	VariantMap &setDefaultBool(const string &name, bool value) {
+		if (store.find(name) == store.end()) {
+			store[name] = value ? "true" : "false";
+		}
+		return *this;
+	}
+
+	VariantMap &setStrSet(const string &name, const std::set<string> &value) {
+		std::set<string>::const_iterator it;
+		string result;
+
+		for (it = value.begin(); it != value.end(); it++) {
+			result.append(*it);
+			result.append(1, '\0');
+		}
+		set(name, Base64::encode(result));
+		return *this;
+	}
+
 	const string &get(const string &name, bool required = true) const {
 		map<string, string>::const_iterator it = store.find(name);
 		if (it == store.end()) {
@@ -280,6 +357,18 @@ public:
 		}
 		return result;
 	}
+
+	vector<string> getStrSet(const string &name, bool required = true,
+		const vector<string> &defaultValue = vector<string>()) const
+	{
+		vector<string> result = defaultValue;
+		const string *str;
+		if (lookup(name, required, &str)) {
+			result.clear();
+			split(Base64::decode(*str), '\0', result);
+		}
+		return result;
+	}
 	
 	bool erase(const string &name) {
 		return store.erase(name) != 0;
@@ -294,6 +383,15 @@ public:
 	unsigned int size() const {
 		return store.size();
 	}
+
+	void addTo(VariantMap &other) const {
+		map<string, string>::const_iterator it;
+		map<string, string>::const_iterator end = store.end();
+
+		for (it = store.begin(); it != end; it++) {
+			other.set(it->first, it->second);
+		}
+	}
 	
 	/**
 	 * Writes a representation of the contents in this VariantMap to
@@ -302,13 +400,13 @@ public:
 	 *
 	 * @throws SystemException
 	 */
-	void writeToFd(int fd) const {
+	void writeToFd(int fd, const StaticString &messageName = "VariantMap") const {
 		map<string, string>::const_iterator it;
 		map<string, string>::const_iterator end = store.end();
 		vector<string> args;
 		
 		args.reserve(1 + 2 * store.size());
-		args.push_back("VariantMap");
+		args.push_back(messageName);
 		for (it = store.begin(); it != end; it++) {
 			args.push_back(it->first);
 			args.push_back(it->second);
diff --git a/ext/common/Utils/fib.c b/ext/common/Utils/fib.c
new file mode 100644
index 0000000..7260e53
--- /dev/null
+++ b/ext/common/Utils/fib.c
@@ -0,0 +1,699 @@
+/*-
+ * Copyright 1997-2003 John-Mark Gurney.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	$Id: fib.c,v 1.31 2003/01/14 10:11:30 jmg Exp $
+ *
+ */
+
+#include "fib.h"
+#include "fibpriv.h"
+
+#include <limits.h>
+#include <stdlib.h>
+
+#define swap(type, a, b)		\
+		do {			\
+			type c;		\
+			c = a;		\
+			a = b;		\
+			b = c;		\
+		} while (0)		\
+
+#define INT_BITS        (sizeof(int) * 8)
+static inline int
+ceillog2(unsigned int a)
+{
+	int oa;
+	int i;
+	int b;
+
+	oa = a;
+	b = INT_BITS / 2;
+	i = 0;
+	while (b) {
+		i = (i << 1);
+		if (a >= (unsigned int) (1 << b)) {
+			a /= (1 << b);
+			i = i | 1;
+		} else
+			a &= (1 << b) - 1;
+		b /= 2;
+	}
+	if ((1 << i) == oa)
+		return i;
+	else
+		return i + 1;
+}
+
+/*
+ * Private Heap Functions
+ */
+static void
+fh_deleteel(struct fibheap *h, struct fibheap_el *x)
+{
+	void *data;
+	int key;
+
+	data = x->fhe_data;
+	key = x->fhe_key;
+
+	if (!h->fh_keys)
+		fh_replacedata(h, x, h->fh_neginf);
+	else
+		fh_replacekey(h, x, INT_MIN);
+	if (fh_extractminel(h) != x) {
+		/*
+		 * XXX - This should never happen as fh_replace should set it
+		 * to min.
+		 */
+		abort();
+	}
+
+	x->fhe_data = data;
+	x->fhe_key = key;
+}
+
+void
+fh_initheap(struct fibheap *h)
+{
+	h->fh_cmp_fnct = NULL;
+	h->fh_neginf = NULL;
+	h->fh_n = 0;
+	h->fh_Dl = -1;
+	h->fh_cons = NULL;
+	h->fh_min = NULL;
+	h->fh_root = NULL;
+	h->fh_keys = 0;
+#ifdef FH_STATS
+	h->fh_maxn = 0;
+	h->fh_ninserts = 0;
+	h->fh_nextracts = 0;
+#endif
+}
+
+void
+fh_destroyheap(struct fibheap *h)
+{
+	h->fh_cmp_fnct = NULL;
+	h->fh_neginf = NULL;
+	if (h->fh_cons != NULL)
+		free(h->fh_cons);
+	h->fh_cons = NULL;
+}
+
+/*
+ * Public Heap Functions
+ */
+struct fibheap *
+fh_makekeyheap()
+{
+	struct fibheap *n;
+
+	if ((n = (struct fibheap *) malloc(sizeof *n)) == NULL)
+		return NULL;
+
+	fh_initheap(n);
+	n->fh_keys = 1;
+
+	return n;
+}
+
+struct fibheap *
+fh_makeheap()
+{
+	struct fibheap *n;
+
+	if ((n = (struct fibheap *) malloc(sizeof *n)) == NULL)
+		return NULL;
+
+	fh_initheap(n);
+
+	return n;
+}
+
+voidcmp
+fh_setcmp(struct fibheap *h, voidcmp fnct)
+{
+	voidcmp oldfnct;
+	
+	oldfnct = h->fh_cmp_fnct;
+	h->fh_cmp_fnct = fnct;
+
+	return oldfnct;
+}
+
+void *
+fh_setneginf(struct fibheap *h, void *data)
+{
+	void *old;
+
+	old = h->fh_neginf;
+	h->fh_neginf = data;
+
+	return old;
+}
+
+struct fibheap *
+fh_union(struct fibheap *ha, struct fibheap *hb)
+{
+	struct fibheap_el *x;
+
+	if (ha->fh_root == NULL || hb->fh_root == NULL) {
+		/* either one or both are empty */
+		if (ha->fh_root == NULL) {
+			fh_destroyheap(ha);
+			free(ha);
+			return hb;
+		} else {
+			fh_destroyheap(hb);
+			free(hb);
+			return ha;
+		}
+	}
+	ha->fh_root->fhe_left->fhe_right = hb->fh_root;
+	hb->fh_root->fhe_left->fhe_right = ha->fh_root;
+	x = ha->fh_root->fhe_left;
+	ha->fh_root->fhe_left = hb->fh_root->fhe_left;
+	hb->fh_root->fhe_left = x;
+	ha->fh_n += hb->fh_n;
+	/*
+	 * we probably should also keep stats on number of unions
+	 */
+
+	/* set fh_min if necessary */
+	if (fh_compare(ha, hb->fh_min, ha->fh_min) < 0)
+		ha->fh_min = hb->fh_min;
+
+	fh_destroyheap(hb);
+	free(hb);
+	return ha;
+}
+
+void
+fh_deleteheap(struct fibheap *h)
+{
+	/*
+	 * We could do this even faster by walking each binomial tree, but
+	 * this is simpler to code.
+	 */
+	while (h->fh_min != NULL)
+		fhe_destroy(fh_extractminel(h));
+
+	fh_destroyheap(h);
+	free(h);
+}
+
+/*
+ * Public Key Heap Functions
+ */
+struct fibheap_el *
+fh_insertkey(struct fibheap *h, int key, void *data)
+{
+	struct fibheap_el *x;
+
+	if ((x = fhe_newelem()) == NULL)
+		return NULL;
+
+	/* just insert on root list, and make sure it's not the new min */
+	x->fhe_data = data;
+	x->fhe_key = key;
+
+	fh_insertel(h, x);
+
+	return x;
+}
+
+int
+fh_minkey(struct fibheap *h)
+{
+	if (h->fh_min == NULL)
+		return INT_MIN;
+	return h->fh_min->fhe_key;
+}
+
+int
+fh_replacekey(struct fibheap *h, struct fibheap_el *x, int key)
+{
+	int ret;
+
+	ret = x->fhe_key;
+	(void)fh_replacekeydata(h, x, key, x->fhe_data);
+
+	return ret;
+}
+
+void *
+fh_replacekeydata(struct fibheap *h, struct fibheap_el *x, int key, void *data)
+{
+	void *odata;
+	int okey;
+	struct fibheap_el *y;
+	int r;
+
+	odata = x->fhe_data;
+	okey = x->fhe_key;
+
+	/*
+	 * we can increase a key by deleting and reinserting, that
+	 * requires O(lgn) time.
+	 */
+	if ((r = fh_comparedata(h, key, data, x)) > 0) {
+		/* XXX - bad code! */
+		abort();
+		fh_deleteel(h, x);
+
+		x->fhe_data = data;
+		x->fhe_key = key;
+
+		fh_insertel(h, x);
+
+		return odata;
+	}
+
+	x->fhe_data = data;
+	x->fhe_key = key;
+
+	/* because they are equal, we don't have to do anything */
+	if (r == 0)
+		return odata;
+
+	y = x->fhe_p;
+
+	if (h->fh_keys && okey == key)
+		return odata;
+
+	if (y != NULL && fh_compare(h, x, y) <= 0) {
+		fh_cut(h, x, y);
+		fh_cascading_cut(h, y);
+	}
+
+	/*
+	 * the = is so that the call from fh_delete will delete the proper
+	 * element.
+	 */
+	if (fh_compare(h, x, h->fh_min) <= 0)
+		h->fh_min = x;
+
+	return odata;
+}
+
+/*
+ * Public void * Heap Functions
+ */
+/*
+ * this will return these values:
+ *	NULL	failed for some reason
+ *	ptr	token to use for manipulation of data
+ */
+struct fibheap_el *
+fh_insert(struct fibheap *h, void *data)
+{
+	struct fibheap_el *x;
+
+	if ((x = fhe_newelem()) == NULL)
+		return NULL;
+
+	/* just insert on root list, and make sure it's not the new min */
+	x->fhe_data = data;
+
+	fh_insertel(h, x);
+
+	return x;
+}
+
+void *
+fh_min(struct fibheap *h)
+{
+	if (h->fh_min == NULL)
+		return NULL;
+	return h->fh_min->fhe_data;
+}
+
+void *
+fh_extractmin(struct fibheap *h)
+{
+	struct fibheap_el *z;
+	void *ret;
+
+	ret = NULL;
+
+	if (h->fh_min != NULL) {
+		z = fh_extractminel(h);
+		ret = z->fhe_data;
+#ifndef NO_FREE
+		fhe_destroy(z);
+#endif
+
+	}
+
+	return ret;
+}
+
+void *
+fh_replacedata(struct fibheap *h, struct fibheap_el *x, void *data)
+{
+	return fh_replacekeydata(h, x, x->fhe_key, data);
+}
+
+void *
+fh_delete(struct fibheap *h, struct fibheap_el *x)
+{
+	void *k;
+
+	k = x->fhe_data;
+	if (!h->fh_keys)
+		fh_replacedata(h, x, h->fh_neginf);
+	else
+		fh_replacekey(h, x, INT_MIN);
+	fh_extractmin(h);
+
+	return k;
+}
+
+/*
+ * Statistics Functions
+ */
+#ifdef FH_STATS
+int
+fh_maxn(struct fibheap *h)
+{
+	return h->fh_maxn;
+}
+
+int
+fh_ninserts(struct fibheap *h)
+{
+	return h->fh_ninserts;
+}
+
+int
+fh_nextracts(struct fibheap *h)
+{
+	return h->fh_nextracts;
+}
+#endif
+
+/*
+ * begin of private element fuctions
+ */
+static struct fibheap_el *
+fh_extractminel(struct fibheap *h)
+{
+	struct fibheap_el *ret;
+	struct fibheap_el *x, *y, *orig;
+
+	ret = h->fh_min;
+
+	orig = NULL;
+	/* put all the children on the root list */
+	/* for true consistancy, we should use fhe_remove */
+	for(x = ret->fhe_child; x != orig && x != NULL;) {
+		if (orig == NULL)
+			orig = x;
+		y = x->fhe_right;
+		x->fhe_p = NULL;
+		fh_insertrootlist(h, x);
+		x = y;
+	}
+	/* remove minimum from root list */
+	fh_removerootlist(h, ret);
+	h->fh_n--;
+
+	/* if we aren't empty, consolidate the heap */
+	if (h->fh_n == 0)
+		h->fh_min = NULL;
+	else {
+		h->fh_min = ret->fhe_right;
+		fh_consolidate(h);
+	}
+
+#ifdef FH_STATS
+	h->fh_nextracts++;
+#endif
+
+	return ret;
+}
+
+static void
+fh_insertrootlist(struct fibheap *h, struct fibheap_el *x)
+{
+	if (h->fh_root == NULL) {
+		h->fh_root = x;
+		x->fhe_left = x;
+		x->fhe_right = x;
+		return;
+	}
+
+	fhe_insertafter(h->fh_root, x);
+}
+
+static void
+fh_removerootlist(struct fibheap *h, struct fibheap_el *x)
+{
+	if (x->fhe_left == x)
+		h->fh_root = NULL;
+	else
+		h->fh_root = fhe_remove(x);
+}
+
+static void
+fh_consolidate(struct fibheap *h)
+{
+	struct fibheap_el **a;
+	struct fibheap_el *w;
+	struct fibheap_el *y;
+	struct fibheap_el *x;
+	int i;
+	int d;
+	int D;
+
+	fh_checkcons(h);
+
+	/* assign a the value of h->fh_cons so I don't have to rewrite code */
+	D = h->fh_Dl + 1;
+	a = h->fh_cons;
+
+	for (i = 0; i < D; i++)
+		a[i] = NULL;
+
+	while ((w = h->fh_root) != NULL) {
+		x = w;
+		fh_removerootlist(h, w);
+		d = x->fhe_degree;
+		/* XXX - assert that d < D */
+		while(a[d] != NULL) {
+			y = a[d];
+			if (fh_compare(h, x, y) > 0)
+				swap(struct fibheap_el *, x, y);
+			fh_heaplink(h, y, x);
+			a[d] = NULL;
+			d++;
+		}
+		a[d] = x;
+	}
+	h->fh_min = NULL;
+	for (i = 0; i < D; i++)
+		if (a[i] != NULL) {
+			fh_insertrootlist(h, a[i]);
+			if (h->fh_min == NULL || fh_compare(h, a[i],
+			    h->fh_min) < 0)
+				h->fh_min = a[i];
+		}
+}
+
+static void
+fh_heaplink(struct fibheap *h, struct fibheap_el *y, struct fibheap_el *x)
+{
+	/* make y a child of x */
+	if (x->fhe_child == NULL)
+		x->fhe_child = y;
+	else
+		fhe_insertbefore(x->fhe_child, y);
+	y->fhe_p = x;
+	x->fhe_degree++;
+	y->fhe_mark = 0;
+}
+
+static void
+fh_cut(struct fibheap *h, struct fibheap_el *x, struct fibheap_el *y)
+{
+	fhe_remove(x);
+	y->fhe_degree--;
+	fh_insertrootlist(h, x);
+	x->fhe_p = NULL;
+	x->fhe_mark = 0;
+}
+
+static void
+fh_cascading_cut(struct fibheap *h, struct fibheap_el *y)
+{
+	struct fibheap_el *z;
+
+	while ((z = y->fhe_p) != NULL) {
+		if (y->fhe_mark == 0) {
+			y->fhe_mark = 1;
+			return;
+		} else {
+			fh_cut(h, y, z);
+			y = z;
+		}
+	}
+}
+
+/*
+ * begining of handling elements of fibheap
+ */
+static struct fibheap_el *
+fhe_newelem()
+{
+	struct fibheap_el *e;
+
+	if ((e = (struct fibheap_el *) malloc(sizeof *e)) == NULL)
+		return NULL;
+
+	fhe_initelem(e);
+
+	return e;
+}
+
+static void
+fhe_initelem(struct fibheap_el *e)
+{
+	e->fhe_degree = 0;
+	e->fhe_mark = 0;
+	e->fhe_p = NULL;
+	e->fhe_child = NULL;
+	e->fhe_left = e;
+	e->fhe_right = e;
+	e->fhe_data = NULL;
+}
+
+static void
+fhe_insertafter(struct fibheap_el *a, struct fibheap_el *b)
+{
+	if (a == a->fhe_right) {
+		a->fhe_right = b;
+		a->fhe_left = b;
+		b->fhe_right = a;
+		b->fhe_left = a;
+	} else {
+		b->fhe_right = a->fhe_right;
+		a->fhe_right->fhe_left = b;
+		a->fhe_right = b;
+		b->fhe_left = a;
+	}
+}
+
+static inline void
+fhe_insertbefore(struct fibheap_el *a, struct fibheap_el *b)
+{
+	fhe_insertafter(a->fhe_left, b);
+}
+
+static struct fibheap_el *
+fhe_remove(struct fibheap_el *x)
+{
+	struct fibheap_el *ret;
+
+	if (x == x->fhe_left)
+		ret = NULL;
+	else
+		ret = x->fhe_left;
+
+	/* fix the parent pointer */
+	if (x->fhe_p != NULL && x->fhe_p->fhe_child == x)
+		x->fhe_p->fhe_child = ret;
+
+	x->fhe_right->fhe_left = x->fhe_left;
+	x->fhe_left->fhe_right = x->fhe_right;
+
+	/* clear out hanging pointers */
+	x->fhe_p = NULL;
+	x->fhe_left = x;
+	x->fhe_right = x;
+
+	return ret;
+}
+
+static void
+fh_checkcons(struct fibheap *h)
+{
+	int oDl;
+
+	/* make sure we have enough memory allocated to "reorganize" */
+	if (h->fh_Dl == -1 || h->fh_n > (1 << h->fh_Dl)) {
+		oDl = h->fh_Dl;
+		if ((h->fh_Dl = ceillog2(h->fh_n) + 1) < 8)
+			h->fh_Dl = 8;
+		if (oDl != h->fh_Dl)
+			h->fh_cons = (struct fibheap_el **)realloc(h->fh_cons,
+			    sizeof *h->fh_cons * (h->fh_Dl + 1));
+		if (h->fh_cons == NULL)
+			abort();
+	}
+}
+
+static int
+fh_compare(struct fibheap *h, struct fibheap_el *a, struct fibheap_el *b)
+{
+	if (h->fh_keys) {
+		if (a->fhe_key < b->fhe_key)
+			return -1;
+		if (a->fhe_key == b->fhe_key)
+			return 0;
+		return 1;
+	} else
+		return h->fh_cmp_fnct(a->fhe_data, b->fhe_data);
+}
+
+static int
+fh_comparedata(struct fibheap *h, int key, void *data, struct fibheap_el *b)
+{
+	struct fibheap_el a;
+
+	a.fhe_key = key;
+	a.fhe_data = data;
+
+	return fh_compare(h, &a, b);
+}
+
+static void
+fh_insertel(struct fibheap *h, struct fibheap_el *x)
+{
+	fh_insertrootlist(h, x);
+
+	if (h->fh_min == NULL || (h->fh_keys ? x->fhe_key < h->fh_min->fhe_key
+	    : h->fh_cmp_fnct(x->fhe_data, h->fh_min->fhe_data) < 0))
+		h->fh_min = x;
+
+	h->fh_n++;
+
+#ifdef FH_STATS
+	if (h->fh_n > h->fh_maxn)
+		h->fh_maxn = h->fh_n;
+	h->fh_ninserts++;
+#endif
+
+}
diff --git a/ext/common/Utils/fib.h b/ext/common/Utils/fib.h
new file mode 100644
index 0000000..458bc7f
--- /dev/null
+++ b/ext/common/Utils/fib.h
@@ -0,0 +1,101 @@
+/*-
+ * Copyright 1997, 1998-2003 John-Mark Gurney.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	$Id: fib.h,v 1.10 2003/01/14 10:11:30 jmg Exp $
+ *
+ */
+
+#ifndef _FIB_H_
+#define _FIB_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+struct fibheap_el;
+typedef int (*voidcmp)(void *, void *);
+
+struct fibheap {
+	int	(*fh_cmp_fnct)(void *, void *);
+	int	fh_n;
+	int	fh_Dl;
+	struct	fibheap_el **fh_cons;
+	struct	fibheap_el *fh_min;
+	struct	fibheap_el *fh_root;
+	void	*fh_neginf;
+	int	fh_keys		: 1;
+#ifdef FH_STATS
+	int	fh_maxn;
+	int	fh_ninserts;
+	int	fh_nextracts;
+#endif
+};
+
+struct fibheap_el {
+	int	fhe_degree;
+	int	fhe_mark;
+	struct	fibheap_el *fhe_p;
+	struct	fibheap_el *fhe_child;
+	struct	fibheap_el *fhe_left;
+	struct	fibheap_el *fhe_right;
+	int	fhe_key;
+	void	*fhe_data;
+};
+
+/* functions for key heaps */
+struct fibheap *fh_makekeyheap(void);
+void fh_initheap(struct fibheap *);
+struct fibheap_el *fh_insertkey(struct fibheap *, int, void *);
+int fh_minkey(struct fibheap *);
+int fh_replacekey(struct fibheap *, struct fibheap_el *, int);
+void *fh_replacekeydata(struct fibheap *, struct fibheap_el *, int, void *);
+
+/* functions for void * heaps */
+struct fibheap *fh_makeheap(void);
+voidcmp fh_setcmp(struct fibheap *, voidcmp);
+void *fh_setneginf(struct fibheap *, void *);
+struct fibheap_el *fh_insert(struct fibheap *, void *);
+
+/* shared functions */
+void *fh_extractmin(struct fibheap *);
+void *fh_min(struct fibheap *);
+void *fh_replacedata(struct fibheap *, struct fibheap_el *, void *);
+void *fh_delete(struct fibheap *, struct fibheap_el *);
+void fh_deleteheap(struct fibheap *);
+void fh_destroyheap(struct fibheap *h);
+/* this assumes both heaps are allocated on the heap */
+struct fibheap *fh_union(struct fibheap *, struct fibheap *);
+
+#ifdef FH_STATS
+int fh_maxn(struct fibheap *);
+int fh_ninserts(struct fibheap *);
+int fh_nextracts(struct fibheap *);
+#endif
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* _FIB_H_ */
diff --git a/ext/common/Utils/fibpriv.h b/ext/common/Utils/fibpriv.h
new file mode 100644
index 0000000..9ca2952
--- /dev/null
+++ b/ext/common/Utils/fibpriv.h
@@ -0,0 +1,67 @@
+/*-
+ * Copyright 1997, 1999-2003 John-Mark Gurney.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	$Id: fibpriv.h,v 1.12 2003/01/14 10:11:30 jmg Exp $
+ *
+ */
+
+#ifndef _FIBPRIV_H_
+#define _FIBPRIV_H_
+
+/*
+ * global heap operations
+ */
+static void fh_insertrootlist(struct fibheap *, struct fibheap_el *);
+static void fh_removerootlist(struct fibheap *, struct fibheap_el *);
+static void fh_consolidate(struct fibheap *);
+static void fh_heaplink(struct fibheap *h, struct fibheap_el *y,
+			struct fibheap_el *x);
+static void fh_cut(struct fibheap *, struct fibheap_el *, struct fibheap_el *);
+static void fh_cascading_cut(struct fibheap *, struct fibheap_el *);
+static struct fibheap_el *fh_extractminel(struct fibheap *);
+static void fh_checkcons(struct fibheap *h);
+static int fh_compare(struct fibheap *h, struct fibheap_el *a,
+			struct fibheap_el *b);
+static int fh_comparedata(struct fibheap *h, int key, void *data,
+			struct fibheap_el *b);
+static void fh_insertel(struct fibheap *h, struct fibheap_el *x);
+static void fh_deleteel(struct fibheap *h, struct fibheap_el *x);
+
+/*
+ * specific node operations
+ */
+static struct fibheap_el *fhe_newelem(void);
+static void fhe_initelem(struct fibheap_el *);
+static void fhe_insertafter(struct fibheap_el *a, struct fibheap_el *b);
+static inline void fhe_insertbefore(struct fibheap_el *a, struct fibheap_el *b);
+static struct fibheap_el *fhe_remove(struct fibheap_el *a);
+#define	fhe_destroy(x)	free((x))
+
+/*
+ * general functions
+ */
+static inline int ceillog2(unsigned int a);
+
+#endif /* _FIBPRIV_H_ */
diff --git a/ext/common/Utils/json-forwards.h b/ext/common/Utils/json-forwards.h
new file mode 100644
index 0000000..7bdab51
--- /dev/null
+++ b/ext/common/Utils/json-forwards.h
@@ -0,0 +1,249 @@
+/// Json-cpp amalgated forward header (http://jsoncpp.sourceforge.net/).
+/// It is intented to be used with #include <json/json-forwards.h>
+/// This header provides forward declaration for all JsonCpp types.
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: LICENSE
+// //////////////////////////////////////////////////////////////////////
+
+/*
+The JsonCpp library's source code, including accompanying documentation, 
+tests and demonstration applications, are licensed under the following
+conditions...
+
+The author (Baptiste Lepilleur) explicitly disclaims copyright in all 
+jurisdictions which recognize such a disclaimer. In such jurisdictions, 
+this software is released into the Public Domain.
+
+In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
+2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
+released under the terms of the MIT License (see below).
+
+In jurisdictions which recognize Public Domain property, the user of this 
+software may choose to accept it either as 1) Public Domain, 2) under the 
+conditions of the MIT License (see below), or 3) under the terms of dual 
+Public Domain/MIT License conditions described here, as they choose.
+
+The MIT License is about as close to Public Domain as a license can get, and is
+described in clear, concise terms at:
+
+   http://en.wikipedia.org/wiki/MIT_License
+   
+The full text of the MIT License follows:
+
+========================================================================
+Copyright (c) 2007-2010 Baptiste Lepilleur
+
+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 AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+========================================================================
+(END LICENSE TEXT)
+
+The MIT license is compatible with both the GPL and commercial
+software, affording one all of the rights of Public Domain with the
+minor nuisance of being required to keep the above copyright notice
+and license text in the source code. Note also that by accepting the
+Public Domain "license" you can re-license your copy using whatever
+license you like.
+
+*/
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: LICENSE
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+#ifndef JSON_FORWARD_AMALGATED_H_INCLUDED
+# define JSON_FORWARD_AMALGATED_H_INCLUDED
+/// If defined, indicates that the source file is amalgated
+/// to prevent private header inclusion.
+#define JSON_IS_AMALGATED
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/config.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_CONFIG_H_INCLUDED
+# define JSON_CONFIG_H_INCLUDED
+
+/// If defined, indicates that json library is embedded in CppTL library.
+//# define JSON_IN_CPPTL 1
+
+/// If defined, indicates that json may leverage CppTL library
+//#  define JSON_USE_CPPTL 1
+/// If defined, indicates that cpptl vector based map should be used instead of std::map
+/// as Value container.
+//#  define JSON_USE_CPPTL_SMALLMAP 1
+/// If defined, indicates that Json specific container should be used
+/// (hash table & simple deque container with customizable allocator).
+/// THIS FEATURE IS STILL EXPERIMENTAL! There is know bugs: See #3177332
+//#  define JSON_VALUE_USE_INTERNAL_MAP 1
+/// Force usage of standard new/malloc based allocator instead of memory pool based allocator.
+/// The memory pools allocator used optimization (initializing Value and ValueInternalLink
+/// as if it was a POD) that may cause some validation tool to report errors.
+/// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined.
+//#  define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
+
+/// If defined, indicates that Json use exception to report invalid type manipulation
+/// instead of C assert macro.
+# define JSON_USE_EXCEPTION 1
+
+/// If defined, indicates that the source file is amalgated
+/// to prevent private header inclusion.
+/// Remarks: it is automatically defined in the generated amalgated header.
+#define JSON_IS_AMALGAMATION
+
+
+# ifdef JSON_IN_CPPTL
+#  include <cpptl/config.h>
+#  ifndef JSON_USE_CPPTL
+#   define JSON_USE_CPPTL 1
+#  endif
+# endif
+
+# ifdef JSON_IN_CPPTL
+#  define JSON_API CPPTL_API
+# elif defined(JSON_DLL_BUILD)
+#  define JSON_API __declspec(dllexport)
+# elif defined(JSON_DLL)
+#  define JSON_API __declspec(dllimport)
+# else
+#  define JSON_API
+# endif
+
+// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for integer
+// Storages, and 64 bits integer support is disabled.
+// #define JSON_NO_INT64 1
+
+#if defined(_MSC_VER)  &&  _MSC_VER <= 1200 // MSVC 6
+// Microsoft Visual Studio 6 only support conversion from __int64 to double
+// (no conversion from unsigned __int64).
+#define JSON_USE_INT64_DOUBLE_CONVERSION 1
+#endif // if defined(_MSC_VER)  &&  _MSC_VER < 1200 // MSVC 6
+
+#if defined(_MSC_VER)  &&  _MSC_VER >= 1500 // MSVC 2008
+/// Indicates that the following function is deprecated.
+# define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
+#endif
+
+#if !defined(JSONCPP_DEPRECATED)
+# define JSONCPP_DEPRECATED(message)
+#endif // if !defined(JSONCPP_DEPRECATED)
+
+namespace Json {
+   typedef int Int;
+   typedef unsigned int UInt;
+# if defined(JSON_NO_INT64)
+   typedef int LargestInt;
+   typedef unsigned int LargestUInt;
+#  undef JSON_HAS_INT64
+# else // if defined(JSON_NO_INT64)
+   // For Microsoft Visual use specific types as long long is not supported
+#  if defined(_MSC_VER) // Microsoft Visual Studio
+   typedef __int64 Int64;
+   typedef unsigned __int64 UInt64;
+#  else // if defined(_MSC_VER) // Other platforms, use long long
+   typedef long long int Int64;
+   typedef unsigned long long int UInt64;
+#  endif // if defined(_MSC_VER)
+   typedef Int64 LargestInt;
+   typedef UInt64 LargestUInt;
+#  define JSON_HAS_INT64
+# endif // if defined(JSON_NO_INT64)
+} // end namespace Json
+
+
+#endif // JSON_CONFIG_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/config.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/forwards.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_FORWARDS_H_INCLUDED
+# define JSON_FORWARDS_H_INCLUDED
+
+#if !defined(JSON_IS_AMALGAMATION)
+# include "config.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+
+namespace Json {
+
+   // writer.h
+   class FastWriter;
+   class StyledWriter;
+
+   // reader.h
+   class Reader;
+
+   // features.h
+   class Features;
+
+   // value.h
+   typedef unsigned int ArrayIndex;
+   class StaticString;
+   class Path;
+   class PathArgument;
+   class Value;
+   class ValueIteratorBase;
+   class ValueIterator;
+   class ValueConstIterator;
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   class ValueMapAllocator;
+   class ValueInternalLink;
+   class ValueInternalArray;
+   class ValueInternalMap;
+#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
+
+} // namespace Json
+
+
+#endif // JSON_FORWARDS_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/forwards.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+#endif //ifndef JSON_FORWARD_AMALGATED_H_INCLUDED
diff --git a/ext/common/Utils/json.h b/ext/common/Utils/json.h
new file mode 100644
index 0000000..0058321
--- /dev/null
+++ b/ext/common/Utils/json.h
@@ -0,0 +1,1855 @@
+/// Json-cpp amalgated header (http://jsoncpp.sourceforge.net/).
+/// It is intented to be used with #include <json/json.h>
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: LICENSE
+// //////////////////////////////////////////////////////////////////////
+
+/*
+The JsonCpp library's source code, including accompanying documentation, 
+tests and demonstration applications, are licensed under the following
+conditions...
+
+The author (Baptiste Lepilleur) explicitly disclaims copyright in all 
+jurisdictions which recognize such a disclaimer. In such jurisdictions, 
+this software is released into the Public Domain.
+
+In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
+2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
+released under the terms of the MIT License (see below).
+
+In jurisdictions which recognize Public Domain property, the user of this 
+software may choose to accept it either as 1) Public Domain, 2) under the 
+conditions of the MIT License (see below), or 3) under the terms of dual 
+Public Domain/MIT License conditions described here, as they choose.
+
+The MIT License is about as close to Public Domain as a license can get, and is
+described in clear, concise terms at:
+
+   http://en.wikipedia.org/wiki/MIT_License
+   
+The full text of the MIT License follows:
+
+========================================================================
+Copyright (c) 2007-2010 Baptiste Lepilleur
+
+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 AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+========================================================================
+(END LICENSE TEXT)
+
+The MIT license is compatible with both the GPL and commercial
+software, affording one all of the rights of Public Domain with the
+minor nuisance of being required to keep the above copyright notice
+and license text in the source code. Note also that by accepting the
+Public Domain "license" you can re-license your copy using whatever
+license you like.
+
+*/
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: LICENSE
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+#ifndef JSON_AMALGATED_H_INCLUDED
+# define JSON_AMALGATED_H_INCLUDED
+/// If defined, indicates that the source file is amalgated
+/// to prevent private header inclusion.
+#define JSON_IS_AMALGATED
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/config.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_CONFIG_H_INCLUDED
+# define JSON_CONFIG_H_INCLUDED
+
+/// If defined, indicates that json library is embedded in CppTL library.
+//# define JSON_IN_CPPTL 1
+
+/// If defined, indicates that json may leverage CppTL library
+//#  define JSON_USE_CPPTL 1
+/// If defined, indicates that cpptl vector based map should be used instead of std::map
+/// as Value container.
+//#  define JSON_USE_CPPTL_SMALLMAP 1
+/// If defined, indicates that Json specific container should be used
+/// (hash table & simple deque container with customizable allocator).
+/// THIS FEATURE IS STILL EXPERIMENTAL! There is know bugs: See #3177332
+//#  define JSON_VALUE_USE_INTERNAL_MAP 1
+/// Force usage of standard new/malloc based allocator instead of memory pool based allocator.
+/// The memory pools allocator used optimization (initializing Value and ValueInternalLink
+/// as if it was a POD) that may cause some validation tool to report errors.
+/// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined.
+//#  define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
+
+/// If defined, indicates that Json use exception to report invalid type manipulation
+/// instead of C assert macro.
+# define JSON_USE_EXCEPTION 1
+
+/// If defined, indicates that the source file is amalgated
+/// to prevent private header inclusion.
+/// Remarks: it is automatically defined in the generated amalgated header.
+#define JSON_IS_AMALGAMATION
+
+
+# ifdef JSON_IN_CPPTL
+#  include <cpptl/config.h>
+#  ifndef JSON_USE_CPPTL
+#   define JSON_USE_CPPTL 1
+#  endif
+# endif
+
+# ifdef JSON_IN_CPPTL
+#  define JSON_API CPPTL_API
+# elif defined(JSON_DLL_BUILD)
+#  define JSON_API __declspec(dllexport)
+# elif defined(JSON_DLL)
+#  define JSON_API __declspec(dllimport)
+# else
+#  define JSON_API
+# endif
+
+// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for integer
+// Storages, and 64 bits integer support is disabled.
+// #define JSON_NO_INT64 1
+
+#if defined(_MSC_VER)  &&  _MSC_VER <= 1200 // MSVC 6
+// Microsoft Visual Studio 6 only support conversion from __int64 to double
+// (no conversion from unsigned __int64).
+#define JSON_USE_INT64_DOUBLE_CONVERSION 1
+#endif // if defined(_MSC_VER)  &&  _MSC_VER < 1200 // MSVC 6
+
+#if defined(_MSC_VER)  &&  _MSC_VER >= 1500 // MSVC 2008
+/// Indicates that the following function is deprecated.
+# define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
+#endif
+
+#if !defined(JSONCPP_DEPRECATED)
+# define JSONCPP_DEPRECATED(message)
+#endif // if !defined(JSONCPP_DEPRECATED)
+
+namespace Json {
+   typedef int Int;
+   typedef unsigned int UInt;
+# if defined(JSON_NO_INT64)
+   typedef int LargestInt;
+   typedef unsigned int LargestUInt;
+#  undef JSON_HAS_INT64
+# else // if defined(JSON_NO_INT64)
+   // For Microsoft Visual use specific types as long long is not supported
+#  if defined(_MSC_VER) // Microsoft Visual Studio
+   typedef __int64 Int64;
+   typedef unsigned __int64 UInt64;
+#  else // if defined(_MSC_VER) // Other platforms, use long long
+   typedef long long int Int64;
+   typedef unsigned long long int UInt64;
+#  endif // if defined(_MSC_VER)
+   typedef Int64 LargestInt;
+   typedef UInt64 LargestUInt;
+#  define JSON_HAS_INT64
+# endif // if defined(JSON_NO_INT64)
+} // end namespace Json
+
+
+#endif // JSON_CONFIG_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/config.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/forwards.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_FORWARDS_H_INCLUDED
+# define JSON_FORWARDS_H_INCLUDED
+
+#if !defined(JSON_IS_AMALGAMATION)
+# include "config.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+
+namespace Json {
+
+   // writer.h
+   class FastWriter;
+   class StyledWriter;
+
+   // reader.h
+   class Reader;
+
+   // features.h
+   class Features;
+
+   // value.h
+   typedef unsigned int ArrayIndex;
+   class StaticString;
+   class Path;
+   class PathArgument;
+   class Value;
+   class ValueIteratorBase;
+   class ValueIterator;
+   class ValueConstIterator;
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   class ValueMapAllocator;
+   class ValueInternalLink;
+   class ValueInternalArray;
+   class ValueInternalMap;
+#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
+
+} // namespace Json
+
+
+#endif // JSON_FORWARDS_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/forwards.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/features.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
+# define CPPTL_JSON_FEATURES_H_INCLUDED
+
+#if !defined(JSON_IS_AMALGAMATION)
+# include "forwards.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+
+namespace Json {
+
+   /** \brief Configuration passed to reader and writer.
+    * This configuration object can be used to force the Reader or Writer
+    * to behave in a standard conforming way.
+    */
+   class JSON_API Features
+   {
+   public:
+      /** \brief A configuration that allows all features and assumes all strings are UTF-8.
+       * - C & C++ comments are allowed
+       * - Root object can be any JSON value
+       * - Assumes Value strings are encoded in UTF-8
+       */
+      static Features all();
+
+      /** \brief A configuration that is strictly compatible with the JSON specification.
+       * - Comments are forbidden.
+       * - Root object must be either an array or an object value.
+       * - Assumes Value strings are encoded in UTF-8
+       */
+      static Features strictMode();
+
+      /** \brief Initialize the configuration like JsonConfig::allFeatures;
+       */
+      Features();
+
+      /// \c true if comments are allowed. Default: \c true.
+      bool allowComments_;
+
+      /// \c true if root must be either an array or an object value. Default: \c false.
+      bool strictRoot_;
+   };
+
+} // namespace Json
+
+#endif // CPPTL_JSON_FEATURES_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/features.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/value.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef CPPTL_JSON_H_INCLUDED
+# define CPPTL_JSON_H_INCLUDED
+
+#if !defined(JSON_IS_AMALGAMATION)
+# include "forwards.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+# include <string>
+# include <vector>
+
+# ifndef JSON_USE_CPPTL_SMALLMAP
+#  include <map>
+# else
+#  include <cpptl/smallmap.h>
+# endif
+# ifdef JSON_USE_CPPTL
+#  include <cpptl/forwards.h>
+# endif
+
+/** \brief JSON (JavaScript Object Notation).
+ */
+namespace Json {
+
+   /** \brief Type of the value held by a Value object.
+    */
+   enum ValueType
+   {
+      nullValue = 0, ///< 'null' value
+      intValue,      ///< signed integer value
+      uintValue,     ///< unsigned integer value
+      realValue,     ///< double value
+      stringValue,   ///< UTF-8 string value
+      booleanValue,  ///< bool value
+      arrayValue,    ///< array value (ordered list)
+      objectValue    ///< object value (collection of name/value pairs).
+   };
+
+   enum CommentPlacement
+   {
+      commentBefore = 0,        ///< a comment placed on the line before a value
+      commentAfterOnSameLine,   ///< a comment just after a value on the same line
+      commentAfter,             ///< a comment on the line after a value (only make sense for root value)
+      numberOfCommentPlacement
+   };
+
+//# ifdef JSON_USE_CPPTL
+//   typedef CppTL::AnyEnumerator<const char *> EnumMemberNames;
+//   typedef CppTL::AnyEnumerator<const Value &> EnumValues;
+//# endif
+
+   /** \brief Lightweight wrapper to tag static string.
+    *
+    * Value constructor and objectValue member assignement takes advantage of the
+    * StaticString and avoid the cost of string duplication when storing the
+    * string or the member name.
+    *
+    * Example of usage:
+    * \code
+    * Json::Value aValue( StaticString("some text") );
+    * Json::Value object;
+    * static const StaticString code("code");
+    * object[code] = 1234;
+    * \endcode
+    */
+   class JSON_API StaticString
+   {
+   public:
+      explicit StaticString( const char *czstring )
+         : str_( czstring )
+      {
+      }
+
+      operator const char *() const
+      {
+         return str_;
+      }
+
+      const char *c_str() const
+      {
+         return str_;
+      }
+
+   private:
+      const char *str_;
+   };
+
+   /** \brief Represents a <a HREF="http://www.json.org">JSON</a> value.
+    *
+    * This class is a discriminated union wrapper that can represents a:
+    * - signed integer [range: Value::minInt - Value::maxInt]
+    * - unsigned integer (range: 0 - Value::maxUInt)
+    * - double
+    * - UTF-8 string
+    * - boolean
+    * - 'null'
+    * - an ordered list of Value
+    * - collection of name/value pairs (javascript object)
+    *
+    * The type of the held value is represented by a #ValueType and 
+    * can be obtained using type().
+    *
+    * values of an #objectValue or #arrayValue can be accessed using operator[]() methods. 
+    * Non const methods will automatically create the a #nullValue element 
+    * if it does not exist. 
+    * The sequence of an #arrayValue will be automatically resize and initialized 
+    * with #nullValue. resize() can be used to enlarge or truncate an #arrayValue.
+    *
+    * The get() methods can be used to obtanis default value in the case the required element
+    * does not exist.
+    *
+    * It is possible to iterate over the list of a #objectValue values using 
+    * the getMemberNames() method.
+    */
+   class JSON_API Value 
+   {
+      friend class ValueIteratorBase;
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+      friend class ValueInternalLink;
+      friend class ValueInternalMap;
+# endif
+   public:
+      typedef std::vector<std::string> Members;
+      typedef ValueIterator iterator;
+      typedef ValueConstIterator const_iterator;
+      typedef Json::UInt UInt;
+      typedef Json::Int Int;
+# if defined(JSON_HAS_INT64)
+      typedef Json::UInt64 UInt64;
+      typedef Json::Int64 Int64;
+#endif // defined(JSON_HAS_INT64)
+      typedef Json::LargestInt LargestInt;
+      typedef Json::LargestUInt LargestUInt;
+      typedef Json::ArrayIndex ArrayIndex;
+
+      static const Value null;
+      /// Minimum signed integer value that can be stored in a Json::Value.
+      static const LargestInt minLargestInt;
+      /// Maximum signed integer value that can be stored in a Json::Value.
+      static const LargestInt maxLargestInt;
+      /// Maximum unsigned integer value that can be stored in a Json::Value.
+      static const LargestUInt maxLargestUInt;
+
+      /// Minimum signed int value that can be stored in a Json::Value.
+      static const Int minInt;
+      /// Maximum signed int value that can be stored in a Json::Value.
+      static const Int maxInt;
+      /// Maximum unsigned int value that can be stored in a Json::Value.
+      static const UInt maxUInt;
+
+      /// Minimum signed 64 bits int value that can be stored in a Json::Value.
+      static const Int64 minInt64;
+      /// Maximum signed 64 bits int value that can be stored in a Json::Value.
+      static const Int64 maxInt64;
+      /// Maximum unsigned 64 bits int value that can be stored in a Json::Value.
+      static const UInt64 maxUInt64;
+
+   private:
+#ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+# ifndef JSON_VALUE_USE_INTERNAL_MAP
+      class CZString 
+      {
+      public:
+         enum DuplicationPolicy 
+         {
+            noDuplication = 0,
+            duplicate,
+            duplicateOnCopy
+         };
+         CZString( ArrayIndex index );
+         CZString( const char *cstr, DuplicationPolicy allocate );
+         CZString( const CZString &other );
+         ~CZString();
+         CZString &operator =( const CZString &other );
+         bool operator<( const CZString &other ) const;
+         bool operator==( const CZString &other ) const;
+         ArrayIndex index() const;
+         const char *c_str() const;
+         bool isStaticString() const;
+      private:
+         void swap( CZString &other );
+         const char *cstr_;
+         ArrayIndex index_;
+      };
+
+   public:
+#  ifndef JSON_USE_CPPTL_SMALLMAP
+      typedef std::map<CZString, Value> ObjectValues;
+#  else
+      typedef CppTL::SmallMap<CZString, Value> ObjectValues;
+#  endif // ifndef JSON_USE_CPPTL_SMALLMAP
+# endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
+#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+
+   public:
+      /** \brief Create a default Value of the given type.
+
+        This is a very useful constructor.
+        To create an empty array, pass arrayValue.
+        To create an empty object, pass objectValue.
+        Another Value can then be set to this one by assignment.
+    This is useful since clear() and resize() will not alter types.
+
+        Examples:
+    \code
+    Json::Value null_value; // null
+    Json::Value arr_value(Json::arrayValue); // []
+    Json::Value obj_value(Json::objectValue); // {}
+    \endcode
+      */
+      Value( ValueType type = nullValue );
+      Value( Int value );
+      Value( UInt value );
+#if defined(JSON_HAS_INT64)
+      Value( Int64 value );
+      Value( UInt64 value );
+#endif // if defined(JSON_HAS_INT64)
+      Value( double value );
+      Value( const char *value );
+      Value( const char *beginValue, const char *endValue );
+      /** \brief Constructs a value from a static string.
+
+       * Like other value string constructor but do not duplicate the string for
+       * internal storage. The given string must remain alive after the call to this
+       * constructor.
+       * Example of usage:
+       * \code
+       * Json::Value aValue( StaticString("some text") );
+       * \endcode
+       */
+      Value( const StaticString &value );
+      Value( const std::string &value );
+# ifdef JSON_USE_CPPTL
+      Value( const CppTL::ConstString &value );
+# endif
+      Value( bool value );
+      Value( const Value &other );
+      ~Value();
+
+      Value &operator=( const Value &other );
+      /// Swap values.
+      /// \note Currently, comments are intentionally not swapped, for
+      /// both logic and efficiency.
+      void swap( Value &other );
+
+      ValueType type() const;
+
+      bool operator <( const Value &other ) const;
+      bool operator <=( const Value &other ) const;
+      bool operator >=( const Value &other ) const;
+      bool operator >( const Value &other ) const;
+
+      bool operator ==( const Value &other ) const;
+      bool operator !=( const Value &other ) const;
+
+      int compare( const Value &other ) const;
+
+      const char *asCString() const;
+      std::string asString() const;
+# ifdef JSON_USE_CPPTL
+      CppTL::ConstString asConstString() const;
+# endif
+      Int asInt() const;
+      UInt asUInt() const;
+      Int64 asInt64() const;
+      UInt64 asUInt64() const;
+      LargestInt asLargestInt() const;
+      LargestUInt asLargestUInt() const;
+      float asFloat() const;
+      double asDouble() const;
+      bool asBool() const;
+
+      bool isNull() const;
+      bool isBool() const;
+      bool isInt() const;
+      bool isUInt() const;
+      bool isIntegral() const;
+      bool isDouble() const;
+      bool isNumeric() const;
+      bool isString() const;
+      bool isArray() const;
+      bool isObject() const;
+
+      bool isConvertibleTo( ValueType other ) const;
+
+      /// Number of values in array or object
+      ArrayIndex size() const;
+
+      /// \brief Return true if empty array, empty object, or null;
+      /// otherwise, false.
+      bool empty() const;
+
+      /// Return isNull()
+      bool operator!() const;
+
+      /// Remove all object members and array elements.
+      /// \pre type() is arrayValue, objectValue, or nullValue
+      /// \post type() is unchanged
+      void clear();
+
+      /// Resize the array to size elements. 
+      /// New elements are initialized to null.
+      /// May only be called on nullValue or arrayValue.
+      /// \pre type() is arrayValue or nullValue
+      /// \post type() is arrayValue
+      void resize( ArrayIndex size );
+
+      /// Access an array element (zero based index ).
+      /// If the array contains less than index element, then null value are inserted
+      /// in the array so that its size is index+1.
+      /// (You may need to say 'value[0u]' to get your compiler to distinguish
+      ///  this from the operator[] which takes a string.)
+      Value &operator[]( ArrayIndex index );
+
+      /// Access an array element (zero based index ).
+      /// If the array contains less than index element, then null value are inserted
+      /// in the array so that its size is index+1.
+      /// (You may need to say 'value[0u]' to get your compiler to distinguish
+      ///  this from the operator[] which takes a string.)
+      Value &operator[]( int index );
+
+      /// Access an array element (zero based index )
+      /// (You may need to say 'value[0u]' to get your compiler to distinguish
+      ///  this from the operator[] which takes a string.)
+      const Value &operator[]( ArrayIndex index ) const;
+
+      /// Access an array element (zero based index )
+      /// (You may need to say 'value[0u]' to get your compiler to distinguish
+      ///  this from the operator[] which takes a string.)
+      const Value &operator[]( int index ) const;
+
+      /// If the array contains at least index+1 elements, returns the element value, 
+      /// otherwise returns defaultValue.
+      Value get( ArrayIndex index, 
+                 const Value &defaultValue ) const;
+      /// Return true if index < size().
+      bool isValidIndex( ArrayIndex index ) const;
+      /// \brief Append value to array at the end.
+      ///
+      /// Equivalent to jsonvalue[jsonvalue.size()] = value;
+      Value &append( const Value &value );
+
+      /// Access an object value by name, create a null member if it does not exist.
+      Value &operator[]( const char *key );
+      /// Access an object value by name, returns null if there is no member with that name.
+      const Value &operator[]( const char *key ) const;
+      /// Access an object value by name, create a null member if it does not exist.
+      Value &operator[]( const std::string &key );
+      /// Access an object value by name, returns null if there is no member with that name.
+      const Value &operator[]( const std::string &key ) const;
+      /** \brief Access an object value by name, create a null member if it does not exist.
+
+       * If the object as no entry for that name, then the member name used to store
+       * the new entry is not duplicated.
+       * Example of use:
+       * \code
+       * Json::Value object;
+       * static const StaticString code("code");
+       * object[code] = 1234;
+       * \endcode
+       */
+      Value &operator[]( const StaticString &key );
+# ifdef JSON_USE_CPPTL
+      /// Access an object value by name, create a null member if it does not exist.
+      Value &operator[]( const CppTL::ConstString &key );
+      /// Access an object value by name, returns null if there is no member with that name.
+      const Value &operator[]( const CppTL::ConstString &key ) const;
+# endif
+      /// Return the member named key if it exist, defaultValue otherwise.
+      Value get( const char *key, 
+                 const Value &defaultValue ) const;
+      /// Return the member named key if it exist, defaultValue otherwise.
+      Value get( const std::string &key,
+                 const Value &defaultValue ) const;
+# ifdef JSON_USE_CPPTL
+      /// Return the member named key if it exist, defaultValue otherwise.
+      Value get( const CppTL::ConstString &key,
+                 const Value &defaultValue ) const;
+# endif
+      /// \brief Remove and return the named member.  
+      ///
+      /// Do nothing if it did not exist.
+      /// \return the removed Value, or null.
+      /// \pre type() is objectValue or nullValue
+      /// \post type() is unchanged
+      Value removeMember( const char* key );
+      /// Same as removeMember(const char*)
+      Value removeMember( const std::string &key );
+
+      /// Return true if the object has a member named key.
+      bool isMember( const char *key ) const;
+      /// Return true if the object has a member named key.
+      bool isMember( const std::string &key ) const;
+# ifdef JSON_USE_CPPTL
+      /// Return true if the object has a member named key.
+      bool isMember( const CppTL::ConstString &key ) const;
+# endif
+
+      /// \brief Return a list of the member names.
+      ///
+      /// If null, return an empty list.
+      /// \pre type() is objectValue or nullValue
+      /// \post if type() was nullValue, it remains nullValue
+      Members getMemberNames() const;
+
+//# ifdef JSON_USE_CPPTL
+//      EnumMemberNames enumMemberNames() const;
+//      EnumValues enumValues() const;
+//# endif
+
+      /// Comments must be //... or /* ... */
+      void setComment( const char *comment,
+                       CommentPlacement placement );
+      /// Comments must be //... or /* ... */
+      void setComment( const std::string &comment,
+                       CommentPlacement placement );
+      bool hasComment( CommentPlacement placement ) const;
+      /// Include delimiters and embedded newlines.
+      std::string getComment( CommentPlacement placement ) const;
+
+      std::string toStyledString() const;
+
+      const_iterator begin() const;
+      const_iterator end() const;
+
+      iterator begin();
+      iterator end();
+
+   private:
+      Value &resolveReference( const char *key, 
+                               bool isStatic );
+
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+      inline bool isItemAvailable() const
+      {
+         return itemIsUsed_ == 0;
+      }
+
+      inline void setItemUsed( bool isUsed = true )
+      {
+         itemIsUsed_ = isUsed ? 1 : 0;
+      }
+
+      inline bool isMemberNameStatic() const
+      {
+         return memberNameIsStatic_ == 0;
+      }
+
+      inline void setMemberNameIsStatic( bool isStatic )
+      {
+         memberNameIsStatic_ = isStatic ? 1 : 0;
+      }
+# endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP
+
+   private:
+      struct CommentInfo
+      {
+         CommentInfo();
+         ~CommentInfo();
+
+         void setComment( const char *text );
+
+         char *comment_;
+      };
+
+      //struct MemberNamesTransform
+      //{
+      //   typedef const char *result_type;
+      //   const char *operator()( const CZString &name ) const
+      //   {
+      //      return name.c_str();
+      //   }
+      //};
+
+      union ValueHolder
+      {
+         LargestInt int_;
+         LargestUInt uint_;
+         double real_;
+         bool bool_;
+         char *string_;
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+         ValueInternalArray *array_;
+         ValueInternalMap *map_;
+#else
+         ObjectValues *map_;
+# endif
+      } value_;
+      ValueType type_ : 8;
+      int allocated_ : 1;     // Notes: if declared as bool, bitfield is useless.
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+      unsigned int itemIsUsed_ : 1;      // used by the ValueInternalMap container.
+      int memberNameIsStatic_ : 1;       // used by the ValueInternalMap container.
+# endif
+      CommentInfo *comments_;
+   };
+
+
+   /** \brief Experimental and untested: represents an element of the "path" to access a node.
+    */
+   class PathArgument
+   {
+   public:
+      friend class Path;
+
+      PathArgument();
+      PathArgument( ArrayIndex index );
+      PathArgument( const char *key );
+      PathArgument( const std::string &key );
+
+   private:
+      enum Kind
+      {
+         kindNone = 0,
+         kindIndex,
+         kindKey
+      };
+      std::string key_;
+      ArrayIndex index_;
+      Kind kind_;
+   };
+
+   /** \brief Experimental and untested: represents a "path" to access a node.
+    *
+    * Syntax:
+    * - "." => root node
+    * - ".[n]" => elements at index 'n' of root node (an array value)
+    * - ".name" => member named 'name' of root node (an object value)
+    * - ".name1.name2.name3"
+    * - ".[0][1][2].name1[3]"
+    * - ".%" => member name is provided as parameter
+    * - ".[%]" => index is provied as parameter
+    */
+   class Path
+   {
+   public:
+      Path( const std::string &path,
+            const PathArgument &a1 = PathArgument(),
+            const PathArgument &a2 = PathArgument(),
+            const PathArgument &a3 = PathArgument(),
+            const PathArgument &a4 = PathArgument(),
+            const PathArgument &a5 = PathArgument() );
+
+      const Value &resolve( const Value &root ) const;
+      Value resolve( const Value &root, 
+                     const Value &defaultValue ) const;
+      /// Creates the "path" to access the specified node and returns a reference on the node.
+      Value &make( Value &root ) const;
+
+   private:
+      typedef std::vector<const PathArgument *> InArgs;
+      typedef std::vector<PathArgument> Args;
+
+      void makePath( const std::string &path,
+                     const InArgs &in );
+      void addPathInArg( const std::string &path, 
+                         const InArgs &in, 
+                         InArgs::const_iterator &itInArg, 
+                         PathArgument::Kind kind );
+      void invalidPath( const std::string &path, 
+                        int location );
+
+      Args args_;
+   };
+
+
+
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   /** \brief Allocator to customize Value internal map.
+    * Below is an example of a simple implementation (default implementation actually
+    * use memory pool for speed).
+    * \code
+      class DefaultValueMapAllocator : public ValueMapAllocator
+      {
+      public: // overridden from ValueMapAllocator
+         virtual ValueInternalMap *newMap()
+         {
+            return new ValueInternalMap();
+         }
+
+         virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
+         {
+            return new ValueInternalMap( other );
+         }
+
+         virtual void destructMap( ValueInternalMap *map )
+         {
+            delete map;
+         }
+
+         virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
+         {
+            return new ValueInternalLink[size];
+         }
+
+         virtual void releaseMapBuckets( ValueInternalLink *links )
+         {
+            delete [] links;
+         }
+
+         virtual ValueInternalLink *allocateMapLink()
+         {
+            return new ValueInternalLink();
+         }
+
+         virtual void releaseMapLink( ValueInternalLink *link )
+         {
+            delete link;
+         }
+      };
+    * \endcode
+    */ 
+   class JSON_API ValueMapAllocator
+   {
+   public:
+      virtual ~ValueMapAllocator();
+      virtual ValueInternalMap *newMap() = 0;
+      virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other ) = 0;
+      virtual void destructMap( ValueInternalMap *map ) = 0;
+      virtual ValueInternalLink *allocateMapBuckets( unsigned int size ) = 0;
+      virtual void releaseMapBuckets( ValueInternalLink *links ) = 0;
+      virtual ValueInternalLink *allocateMapLink() = 0;
+      virtual void releaseMapLink( ValueInternalLink *link ) = 0;
+   };
+
+   /** \brief ValueInternalMap hash-map bucket chain link (for internal use only).
+    * \internal previous_ & next_ allows for bidirectional traversal.
+    */
+   class JSON_API ValueInternalLink
+   {
+   public:
+      enum { itemPerLink = 6 };  // sizeof(ValueInternalLink) = 128 on 32 bits architecture.
+      enum InternalFlags { 
+         flagAvailable = 0,
+         flagUsed = 1
+      };
+
+      ValueInternalLink();
+
+      ~ValueInternalLink();
+
+      Value items_[itemPerLink];
+      char *keys_[itemPerLink];
+      ValueInternalLink *previous_;
+      ValueInternalLink *next_;
+   };
+
+
+   /** \brief A linked page based hash-table implementation used internally by Value.
+    * \internal ValueInternalMap is a tradional bucket based hash-table, with a linked
+    * list in each bucket to handle collision. There is an addional twist in that
+    * each node of the collision linked list is a page containing a fixed amount of
+    * value. This provides a better compromise between memory usage and speed.
+    * 
+    * Each bucket is made up of a chained list of ValueInternalLink. The last
+    * link of a given bucket can be found in the 'previous_' field of the following bucket.
+    * The last link of the last bucket is stored in tailLink_ as it has no following bucket.
+    * Only the last link of a bucket may contains 'available' item. The last link always
+    * contains at least one element unless is it the bucket one very first link.
+    */
+   class JSON_API ValueInternalMap
+   {
+      friend class ValueIteratorBase;
+      friend class Value;
+   public:
+      typedef unsigned int HashKey;
+      typedef unsigned int BucketIndex;
+
+# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+      struct IteratorState
+      {
+         IteratorState() 
+            : map_(0)
+            , link_(0)
+            , itemIndex_(0)
+            , bucketIndex_(0) 
+         {
+         }
+         ValueInternalMap *map_;
+         ValueInternalLink *link_;
+         BucketIndex itemIndex_;
+         BucketIndex bucketIndex_;
+      };
+# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+
+      ValueInternalMap();
+      ValueInternalMap( const ValueInternalMap &other );
+      ValueInternalMap &operator =( const ValueInternalMap &other );
+      ~ValueInternalMap();
+
+      void swap( ValueInternalMap &other );
+
+      BucketIndex size() const;
+
+      void clear();
+
+      bool reserveDelta( BucketIndex growth );
+
+      bool reserve( BucketIndex newItemCount );
+
+      const Value *find( const char *key ) const;
+
+      Value *find( const char *key );
+
+      Value &resolveReference( const char *key, 
+                               bool isStatic );
+
+      void remove( const char *key );
+
+      void doActualRemove( ValueInternalLink *link, 
+                           BucketIndex index,
+                           BucketIndex bucketIndex );
+
+      ValueInternalLink *&getLastLinkInBucket( BucketIndex bucketIndex );
+
+      Value &setNewItem( const char *key, 
+                         bool isStatic, 
+                         ValueInternalLink *link, 
+                         BucketIndex index );
+
+      Value &unsafeAdd( const char *key, 
+                        bool isStatic, 
+                        HashKey hashedKey );
+
+      HashKey hash( const char *key ) const;
+
+      int compare( const ValueInternalMap &other ) const;
+
+   private:
+      void makeBeginIterator( IteratorState &it ) const;
+      void makeEndIterator( IteratorState &it ) const;
+      static bool equals( const IteratorState &x, const IteratorState &other );
+      static void increment( IteratorState &iterator );
+      static void incrementBucket( IteratorState &iterator );
+      static void decrement( IteratorState &iterator );
+      static const char *key( const IteratorState &iterator );
+      static const char *key( const IteratorState &iterator, bool &isStatic );
+      static Value &value( const IteratorState &iterator );
+      static int distance( const IteratorState &x, const IteratorState &y );
+
+   private:
+      ValueInternalLink *buckets_;
+      ValueInternalLink *tailLink_;
+      BucketIndex bucketsSize_;
+      BucketIndex itemCount_;
+   };
+
+   /** \brief A simplified deque implementation used internally by Value.
+   * \internal
+   * It is based on a list of fixed "page", each page contains a fixed number of items.
+   * Instead of using a linked-list, a array of pointer is used for fast item look-up.
+   * Look-up for an element is as follow:
+   * - compute page index: pageIndex = itemIndex / itemsPerPage
+   * - look-up item in page: pages_[pageIndex][itemIndex % itemsPerPage]
+   *
+   * Insertion is amortized constant time (only the array containing the index of pointers
+   * need to be reallocated when items are appended).
+   */
+   class JSON_API ValueInternalArray
+   {
+      friend class Value;
+      friend class ValueIteratorBase;
+   public:
+      enum { itemsPerPage = 8 };    // should be a power of 2 for fast divide and modulo.
+      typedef Value::ArrayIndex ArrayIndex;
+      typedef unsigned int PageIndex;
+
+# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+      struct IteratorState // Must be a POD
+      {
+         IteratorState() 
+            : array_(0)
+            , currentPageIndex_(0)
+            , currentItemIndex_(0) 
+         {
+         }
+         ValueInternalArray *array_;
+         Value **currentPageIndex_;
+         unsigned int currentItemIndex_;
+      };
+# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+
+      ValueInternalArray();
+      ValueInternalArray( const ValueInternalArray &other );
+      ValueInternalArray &operator =( const ValueInternalArray &other );
+      ~ValueInternalArray();
+      void swap( ValueInternalArray &other );
+
+      void clear();
+      void resize( ArrayIndex newSize );
+
+      Value &resolveReference( ArrayIndex index );
+
+      Value *find( ArrayIndex index ) const;
+
+      ArrayIndex size() const;
+
+      int compare( const ValueInternalArray &other ) const;
+
+   private:
+      static bool equals( const IteratorState &x, const IteratorState &other );
+      static void increment( IteratorState &iterator );
+      static void decrement( IteratorState &iterator );
+      static Value &dereference( const IteratorState &iterator );
+      static Value &unsafeDereference( const IteratorState &iterator );
+      static int distance( const IteratorState &x, const IteratorState &y );
+      static ArrayIndex indexOf( const IteratorState &iterator );
+      void makeBeginIterator( IteratorState &it ) const;
+      void makeEndIterator( IteratorState &it ) const;
+      void makeIterator( IteratorState &it, ArrayIndex index ) const;
+
+      void makeIndexValid( ArrayIndex index );
+
+      Value **pages_;
+      ArrayIndex size_;
+      PageIndex pageCount_;
+   };
+
+   /** \brief Experimental: do not use. Allocator to customize Value internal array.
+    * Below is an example of a simple implementation (actual implementation use
+    * memory pool).
+      \code
+class DefaultValueArrayAllocator : public ValueArrayAllocator
+{
+public: // overridden from ValueArrayAllocator
+   virtual ~DefaultValueArrayAllocator()
+   {
+   }
+
+   virtual ValueInternalArray *newArray()
+   {
+      return new ValueInternalArray();
+   }
+
+   virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
+   {
+      return new ValueInternalArray( other );
+   }
+
+   virtual void destruct( ValueInternalArray *array )
+   {
+      delete array;
+   }
+
+   virtual void reallocateArrayPageIndex( Value **&indexes, 
+                                          ValueInternalArray::PageIndex &indexCount,
+                                          ValueInternalArray::PageIndex minNewIndexCount )
+   {
+      ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
+      if ( minNewIndexCount > newIndexCount )
+         newIndexCount = minNewIndexCount;
+      void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
+      if ( !newIndexes )
+         throw std::bad_alloc();
+      indexCount = newIndexCount;
+      indexes = static_cast<Value **>( newIndexes );
+   }
+   virtual void releaseArrayPageIndex( Value **indexes, 
+                                       ValueInternalArray::PageIndex indexCount )
+   {
+      if ( indexes )
+         free( indexes );
+   }
+
+   virtual Value *allocateArrayPage()
+   {
+      return static_cast<Value *>( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) );
+   }
+
+   virtual void releaseArrayPage( Value *value )
+   {
+      if ( value )
+         free( value );
+   }
+};
+      \endcode
+    */ 
+   class JSON_API ValueArrayAllocator
+   {
+   public:
+      virtual ~ValueArrayAllocator();
+      virtual ValueInternalArray *newArray() = 0;
+      virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other ) = 0;
+      virtual void destructArray( ValueInternalArray *array ) = 0;
+      /** \brief Reallocate array page index.
+       * Reallocates an array of pointer on each page.
+       * \param indexes [input] pointer on the current index. May be \c NULL.
+       *                [output] pointer on the new index of at least 
+       *                         \a minNewIndexCount pages. 
+       * \param indexCount [input] current number of pages in the index.
+       *                   [output] number of page the reallocated index can handle.
+       *                            \b MUST be >= \a minNewIndexCount.
+       * \param minNewIndexCount Minimum number of page the new index must be able to
+       *                         handle.
+       */
+      virtual void reallocateArrayPageIndex( Value **&indexes, 
+                                             ValueInternalArray::PageIndex &indexCount,
+                                             ValueInternalArray::PageIndex minNewIndexCount ) = 0;
+      virtual void releaseArrayPageIndex( Value **indexes, 
+                                          ValueInternalArray::PageIndex indexCount ) = 0;
+      virtual Value *allocateArrayPage() = 0;
+      virtual void releaseArrayPage( Value *value ) = 0;
+   };
+#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
+
+
+   /** \brief base class for Value iterators.
+    *
+    */
+   class ValueIteratorBase
+   {
+   public:
+      typedef unsigned int size_t;
+      typedef int difference_type;
+      typedef ValueIteratorBase SelfType;
+
+      ValueIteratorBase();
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+      explicit ValueIteratorBase( const Value::ObjectValues::iterator &current );
+#else
+      ValueIteratorBase( const ValueInternalArray::IteratorState &state );
+      ValueIteratorBase( const ValueInternalMap::IteratorState &state );
+#endif
+
+      bool operator ==( const SelfType &other ) const
+      {
+         return isEqual( other );
+      }
+
+      bool operator !=( const SelfType &other ) const
+      {
+         return !isEqual( other );
+      }
+
+      difference_type operator -( const SelfType &other ) const
+      {
+         return computeDistance( other );
+      }
+
+      /// Return either the index or the member name of the referenced value as a Value.
+      Value key() const;
+
+      /// Return the index of the referenced Value. -1 if it is not an arrayValue.
+      UInt index() const;
+
+      /// Return the member name of the referenced Value. "" if it is not an objectValue.
+      const char *memberName() const;
+
+   protected:
+      Value &deref() const;
+
+      void increment();
+
+      void decrement();
+
+      difference_type computeDistance( const SelfType &other ) const;
+
+      bool isEqual( const SelfType &other ) const;
+
+      void copy( const SelfType &other );
+
+   private:
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+      Value::ObjectValues::iterator current_;
+      // Indicates that iterator is for a null value.
+      bool isNull_;
+#else
+      union
+      {
+         ValueInternalArray::IteratorState array_;
+         ValueInternalMap::IteratorState map_;
+      } iterator_;
+      bool isArray_;
+#endif
+   };
+
+   /** \brief const iterator for object and array value.
+    *
+    */
+   class ValueConstIterator : public ValueIteratorBase
+   {
+      friend class Value;
+   public:
+      typedef unsigned int size_t;
+      typedef int difference_type;
+      typedef const Value &reference;
+      typedef const Value *pointer;
+      typedef ValueConstIterator SelfType;
+
+      ValueConstIterator();
+   private:
+      /*! \internal Use by Value to create an iterator.
+       */
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+      explicit ValueConstIterator( const Value::ObjectValues::iterator &current );
+#else
+      ValueConstIterator( const ValueInternalArray::IteratorState &state );
+      ValueConstIterator( const ValueInternalMap::IteratorState &state );
+#endif
+   public:
+      SelfType &operator =( const ValueIteratorBase &other );
+
+      SelfType operator++( int )
+      {
+         SelfType temp( *this );
+         ++*this;
+         return temp;
+      }
+
+      SelfType operator--( int )
+      {
+         SelfType temp( *this );
+         --*this;
+         return temp;
+      }
+
+      SelfType &operator--()
+      {
+         decrement();
+         return *this;
+      }
+
+      SelfType &operator++()
+      {
+         increment();
+         return *this;
+      }
+
+      reference operator *() const
+      {
+         return deref();
+      }
+   };
+
+
+   /** \brief Iterator for object and array value.
+    */
+   class ValueIterator : public ValueIteratorBase
+   {
+      friend class Value;
+   public:
+      typedef unsigned int size_t;
+      typedef int difference_type;
+      typedef Value &reference;
+      typedef Value *pointer;
+      typedef ValueIterator SelfType;
+
+      ValueIterator();
+      ValueIterator( const ValueConstIterator &other );
+      ValueIterator( const ValueIterator &other );
+   private:
+      /*! \internal Use by Value to create an iterator.
+       */
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+      explicit ValueIterator( const Value::ObjectValues::iterator &current );
+#else
+      ValueIterator( const ValueInternalArray::IteratorState &state );
+      ValueIterator( const ValueInternalMap::IteratorState &state );
+#endif
+   public:
+
+      SelfType &operator =( const SelfType &other );
+
+      SelfType operator++( int )
+      {
+         SelfType temp( *this );
+         ++*this;
+         return temp;
+      }
+
+      SelfType operator--( int )
+      {
+         SelfType temp( *this );
+         --*this;
+         return temp;
+      }
+
+      SelfType &operator--()
+      {
+         decrement();
+         return *this;
+      }
+
+      SelfType &operator++()
+      {
+         increment();
+         return *this;
+      }
+
+      reference operator *() const
+      {
+         return deref();
+      }
+   };
+
+
+} // namespace Json
+
+
+#endif // CPPTL_JSON_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/value.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/reader.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef CPPTL_JSON_READER_H_INCLUDED
+# define CPPTL_JSON_READER_H_INCLUDED
+
+#if !defined(JSON_IS_AMALGAMATION)
+# include "features.h"
+# include "value.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+# include <deque>
+# include <stack>
+# include <string>
+# include <iostream>
+
+namespace Json {
+
+   /** \brief Unserialize a <a HREF="http://www.json.org">JSON</a> document into a Value.
+    *
+    */
+   class JSON_API Reader
+   {
+   public:
+      typedef char Char;
+      typedef const Char *Location;
+
+      /** \brief Constructs a Reader allowing all features
+       * for parsing.
+       */
+      Reader();
+
+      /** \brief Constructs a Reader allowing the specified feature set
+       * for parsing.
+       */
+      Reader( const Features &features );
+
+      /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document.
+       * \param document UTF-8 encoded string containing the document to read.
+       * \param root [out] Contains the root value of the document if it was
+       *             successfully parsed.
+       * \param collectComments \c true to collect comment and allow writing them back during
+       *                        serialization, \c false to discard comments.
+       *                        This parameter is ignored if Features::allowComments_
+       *                        is \c false.
+       * \return \c true if the document was successfully parsed, \c false if an error occurred.
+       */
+      bool parse( const std::string &document, 
+                  Value &root,
+                  bool collectComments = true );
+
+      /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document.
+       * \param beginDoc Pointer on the beginning of the UTF-8 encoded string of the document to read.
+       * \param endDoc Pointer on the end of the UTF-8 encoded string of the document to read. 
+       \               Must be >= beginDoc.
+       * \param root [out] Contains the root value of the document if it was
+       *             successfully parsed.
+       * \param collectComments \c true to collect comment and allow writing them back during
+       *                        serialization, \c false to discard comments.
+       *                        This parameter is ignored if Features::allowComments_
+       *                        is \c false.
+       * \return \c true if the document was successfully parsed, \c false if an error occurred.
+       */
+      bool parse( const char *beginDoc, const char *endDoc, 
+                  Value &root,
+                  bool collectComments = true );
+
+      /// \brief Parse from input stream.
+      /// \see Json::operator>>(std::istream&, Json::Value&).
+      bool parse( std::istream &is,
+                  Value &root,
+                  bool collectComments = true );
+
+      /** \brief Returns a user friendly string that list errors in the parsed document.
+       * \return Formatted error message with the list of errors with their location in 
+       *         the parsed document. An empty string is returned if no error occurred
+       *         during parsing.
+       * \deprecated Use getFormattedErrorMessages() instead (typo fix).
+       */
+      JSONCPP_DEPRECATED("Use getFormattedErrorMessages instead") 
+      std::string getFormatedErrorMessages() const;
+
+      /** \brief Returns a user friendly string that list errors in the parsed document.
+       * \return Formatted error message with the list of errors with their location in 
+       *         the parsed document. An empty string is returned if no error occurred
+       *         during parsing.
+       */
+      std::string getFormattedErrorMessages() const;
+
+   private:
+      enum TokenType
+      {
+         tokenEndOfStream = 0,
+         tokenObjectBegin,
+         tokenObjectEnd,
+         tokenArrayBegin,
+         tokenArrayEnd,
+         tokenString,
+         tokenNumber,
+         tokenTrue,
+         tokenFalse,
+         tokenNull,
+         tokenArraySeparator,
+         tokenMemberSeparator,
+         tokenComment,
+         tokenError
+      };
+
+      class Token
+      {
+      public:
+         TokenType type_;
+         Location start_;
+         Location end_;
+      };
+
+      class ErrorInfo
+      {
+      public:
+         Token token_;
+         std::string message_;
+         Location extra_;
+      };
+
+      typedef std::deque<ErrorInfo> Errors;
+
+      bool expectToken( TokenType type, Token &token, const char *message );
+      bool readToken( Token &token );
+      void skipSpaces();
+      bool match( Location pattern, 
+                  int patternLength );
+      bool readComment();
+      bool readCStyleComment();
+      bool readCppStyleComment();
+      bool readString();
+      void readNumber();
+      bool readValue();
+      bool readObject( Token &token );
+      bool readArray( Token &token );
+      bool decodeNumber( Token &token );
+      bool decodeString( Token &token );
+      bool decodeString( Token &token, std::string &decoded );
+      bool decodeDouble( Token &token );
+      bool decodeUnicodeCodePoint( Token &token, 
+                                   Location &current, 
+                                   Location end, 
+                                   unsigned int &unicode );
+      bool decodeUnicodeEscapeSequence( Token &token, 
+                                        Location &current, 
+                                        Location end, 
+                                        unsigned int &unicode );
+      bool addError( const std::string &message, 
+                     Token &token,
+                     Location extra = 0 );
+      bool recoverFromError( TokenType skipUntilToken );
+      bool addErrorAndRecover( const std::string &message, 
+                               Token &token,
+                               TokenType skipUntilToken );
+      void skipUntilSpace();
+      Value &currentValue();
+      Char getNextChar();
+      void getLocationLineAndColumn( Location location,
+                                     int &line,
+                                     int &column ) const;
+      std::string getLocationLineAndColumn( Location location ) const;
+      void addComment( Location begin, 
+                       Location end, 
+                       CommentPlacement placement );
+      void skipCommentTokens( Token &token );
+   
+      typedef std::stack<Value *> Nodes;
+      Nodes nodes_;
+      Errors errors_;
+      std::string document_;
+      Location begin_;
+      Location end_;
+      Location current_;
+      Location lastValueEnd_;
+      Value *lastValue_;
+      std::string commentsBefore_;
+      Features features_;
+      bool collectComments_;
+   };
+
+   /** \brief Read from 'sin' into 'root'.
+
+    Always keep comments from the input JSON.
+
+    This can be used to read a file into a particular sub-object.
+    For example:
+    \code
+    Json::Value root;
+    cin >> root["dir"]["file"];
+    cout << root;
+    \endcode
+    Result:
+    \verbatim
+    {
+    "dir": {
+        "file": {
+        // The input stream JSON would be nested here.
+        }
+    }
+    }
+    \endverbatim
+    \throw std::exception on parse error.
+    \see Json::operator<<()
+   */
+   std::istream& operator>>( std::istream&, Value& );
+
+} // namespace Json
+
+#endif // CPPTL_JSON_READER_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/reader.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: include/json/writer.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_WRITER_H_INCLUDED
+# define JSON_WRITER_H_INCLUDED
+
+#if !defined(JSON_IS_AMALGAMATION)
+# include "value.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+# include <vector>
+# include <string>
+# include <iostream>
+
+namespace Json {
+
+   class Value;
+
+   /** \brief Abstract class for writers.
+    */
+   class JSON_API Writer
+   {
+   public:
+      virtual ~Writer();
+
+      virtual std::string write( const Value &root ) = 0;
+   };
+
+   /** \brief Outputs a Value in <a HREF="http://www.json.org">JSON</a> format without formatting (not human friendly).
+    *
+    * The JSON document is written in a single line. It is not intended for 'human' consumption,
+    * but may be usefull to support feature such as RPC where bandwith is limited.
+    * \sa Reader, Value
+    */
+   class JSON_API FastWriter : public Writer
+   {
+   public:
+      FastWriter();
+      virtual ~FastWriter(){}
+
+      void enableYAMLCompatibility();
+
+   public: // overridden from Writer
+      virtual std::string write( const Value &root );
+
+   private:
+      void writeValue( const Value &value );
+
+      std::string document_;
+      bool yamlCompatiblityEnabled_;
+   };
+
+   /** \brief Writes a Value in <a HREF="http://www.json.org">JSON</a> format in a human friendly way.
+    *
+    * The rules for line break and indent are as follow:
+    * - Object value:
+    *     - if empty then print {} without indent and line break
+    *     - if not empty the print '{', line break & indent, print one value per line
+    *       and then unindent and line break and print '}'.
+    * - Array value:
+    *     - if empty then print [] without indent and line break
+    *     - if the array contains no object value, empty array or some other value types,
+    *       and all the values fit on one lines, then print the array on a single line.
+    *     - otherwise, it the values do not fit on one line, or the array contains
+    *       object or non empty array, then print one value per line.
+    *
+    * If the Value have comments then they are outputed according to their #CommentPlacement.
+    *
+    * \sa Reader, Value, Value::setComment()
+    */
+   class JSON_API StyledWriter: public Writer
+   {
+   public:
+      StyledWriter();
+      virtual ~StyledWriter(){}
+
+   public: // overridden from Writer
+      /** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
+       * \param root Value to serialize.
+       * \return String containing the JSON document that represents the root value.
+       */
+      virtual std::string write( const Value &root );
+
+   private:
+      void writeValue( const Value &value );
+      void writeArrayValue( const Value &value );
+      bool isMultineArray( const Value &value );
+      void pushValue( const std::string &value );
+      void writeIndent();
+      void writeWithIndent( const std::string &value );
+      void indent();
+      void unindent();
+      void writeCommentBeforeValue( const Value &root );
+      void writeCommentAfterValueOnSameLine( const Value &root );
+      bool hasCommentForValue( const Value &value );
+      static std::string normalizeEOL( const std::string &text );
+
+      typedef std::vector<std::string> ChildValues;
+
+      ChildValues childValues_;
+      std::string document_;
+      std::string indentString_;
+      int rightMargin_;
+      int indentSize_;
+      bool addChildValues_;
+   };
+
+   /** \brief Writes a Value in <a HREF="http://www.json.org">JSON</a> format in a human friendly way,
+        to a stream rather than to a string.
+    *
+    * The rules for line break and indent are as follow:
+    * - Object value:
+    *     - if empty then print {} without indent and line break
+    *     - if not empty the print '{', line break & indent, print one value per line
+    *       and then unindent and line break and print '}'.
+    * - Array value:
+    *     - if empty then print [] without indent and line break
+    *     - if the array contains no object value, empty array or some other value types,
+    *       and all the values fit on one lines, then print the array on a single line.
+    *     - otherwise, it the values do not fit on one line, or the array contains
+    *       object or non empty array, then print one value per line.
+    *
+    * If the Value have comments then they are outputed according to their #CommentPlacement.
+    *
+    * \param indentation Each level will be indented by this amount extra.
+    * \sa Reader, Value, Value::setComment()
+    */
+   class JSON_API StyledStreamWriter
+   {
+   public:
+      StyledStreamWriter( std::string indentation="\t" );
+      ~StyledStreamWriter(){}
+
+   public:
+      /** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
+       * \param out Stream to write to. (Can be ostringstream, e.g.)
+       * \param root Value to serialize.
+       * \note There is no point in deriving from Writer, since write() should not return a value.
+       */
+      void write( std::ostream &out, const Value &root );
+
+   private:
+      void writeValue( const Value &value );
+      void writeArrayValue( const Value &value );
+      bool isMultineArray( const Value &value );
+      void pushValue( const std::string &value );
+      void writeIndent();
+      void writeWithIndent( const std::string &value );
+      void indent();
+      void unindent();
+      void writeCommentBeforeValue( const Value &root );
+      void writeCommentAfterValueOnSameLine( const Value &root );
+      bool hasCommentForValue( const Value &value );
+      static std::string normalizeEOL( const std::string &text );
+
+      typedef std::vector<std::string> ChildValues;
+
+      ChildValues childValues_;
+      std::ostream* document_;
+      std::string indentString_;
+      int rightMargin_;
+      std::string indentation_;
+      bool addChildValues_;
+   };
+
+# if defined(JSON_HAS_INT64)
+   std::string JSON_API valueToString( Int value );
+   std::string JSON_API valueToString( UInt value );
+# endif // if defined(JSON_HAS_INT64)
+   std::string JSON_API valueToString( LargestInt value );
+   std::string JSON_API valueToString( LargestUInt value );
+   std::string JSON_API valueToString( double value );
+   std::string JSON_API valueToString( bool value );
+   std::string JSON_API valueToQuotedString( const char *value );
+
+   /// \brief Output using the StyledStreamWriter.
+   /// \see Json::operator>>()
+   std::ostream& operator<<( std::ostream&, const Value &root );
+
+} // namespace Json
+
+
+
+#endif // JSON_WRITER_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: include/json/writer.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+#endif //ifndef JSON_AMALGATED_H_INCLUDED
diff --git a/ext/common/Utils/jsoncpp.cpp b/ext/common/Utils/jsoncpp.cpp
new file mode 100644
index 0000000..31271a6
--- /dev/null
+++ b/ext/common/Utils/jsoncpp.cpp
@@ -0,0 +1,4230 @@
+/// Json-cpp amalgated source (http://jsoncpp.sourceforge.net/).
+/// It is intented to be used with #include <json/json.h>
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: LICENSE
+// //////////////////////////////////////////////////////////////////////
+
+/*
+The JsonCpp library's source code, including accompanying documentation, 
+tests and demonstration applications, are licensed under the following
+conditions...
+
+The author (Baptiste Lepilleur) explicitly disclaims copyright in all 
+jurisdictions which recognize such a disclaimer. In such jurisdictions, 
+this software is released into the Public Domain.
+
+In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
+2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
+released under the terms of the MIT License (see below).
+
+In jurisdictions which recognize Public Domain property, the user of this 
+software may choose to accept it either as 1) Public Domain, 2) under the 
+conditions of the MIT License (see below), or 3) under the terms of dual 
+Public Domain/MIT License conditions described here, as they choose.
+
+The MIT License is about as close to Public Domain as a license can get, and is
+described in clear, concise terms at:
+
+   http://en.wikipedia.org/wiki/MIT_License
+   
+The full text of the MIT License follows:
+
+========================================================================
+Copyright (c) 2007-2010 Baptiste Lepilleur
+
+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 AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+========================================================================
+(END LICENSE TEXT)
+
+The MIT license is compatible with both the GPL and commercial
+software, affording one all of the rights of Public Domain with the
+minor nuisance of being required to keep the above copyright notice
+and license text in the source code. Note also that by accepting the
+Public Domain "license" you can re-license your copy using whatever
+license you like.
+
+*/
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: LICENSE
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+#include <Utils/json.h>
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: src/lib_json/json_tool.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef LIB_JSONCPP_JSON_TOOL_H_INCLUDED
+# define LIB_JSONCPP_JSON_TOOL_H_INCLUDED
+
+/* This header provides common string manipulation support, such as UTF-8,
+ * portable conversion from/to string...
+ *
+ * It is an internal header that must not be exposed.
+ */
+
+namespace Json {
+
+/// Converts a unicode code-point to UTF-8.
+static inline std::string 
+codePointToUTF8(unsigned int cp)
+{
+   std::string result;
+   
+   // based on description from http://en.wikipedia.org/wiki/UTF-8
+
+   if (cp <= 0x7f) 
+   {
+      result.resize(1);
+      result[0] = static_cast<char>(cp);
+   } 
+   else if (cp <= 0x7FF) 
+   {
+      result.resize(2);
+      result[1] = static_cast<char>(0x80 | (0x3f & cp));
+      result[0] = static_cast<char>(0xC0 | (0x1f & (cp >> 6)));
+   } 
+   else if (cp <= 0xFFFF) 
+   {
+      result.resize(3);
+      result[2] = static_cast<char>(0x80 | (0x3f & cp));
+      result[1] = 0x80 | static_cast<char>((0x3f & (cp >> 6)));
+      result[0] = 0xE0 | static_cast<char>((0xf & (cp >> 12)));
+   }
+   else if (cp <= 0x10FFFF) 
+   {
+      result.resize(4);
+      result[3] = static_cast<char>(0x80 | (0x3f & cp));
+      result[2] = static_cast<char>(0x80 | (0x3f & (cp >> 6)));
+      result[1] = static_cast<char>(0x80 | (0x3f & (cp >> 12)));
+      result[0] = static_cast<char>(0xF0 | (0x7 & (cp >> 18)));
+   }
+
+   return result;
+}
+
+
+/// Returns true if ch is a control character (in range [0,32[).
+static inline bool 
+isControlCharacter(char ch)
+{
+   return ch > 0 && ch <= 0x1F;
+}
+
+
+enum { 
+   /// Constant that specify the size of the buffer that must be passed to uintToString.
+   uintToStringBufferSize = 3*sizeof(LargestUInt)+1 
+};
+
+// Defines a char buffer for use with uintToString().
+typedef char UIntToStringBuffer[uintToStringBufferSize];
+
+
+/** Converts an unsigned integer to string.
+ * @param value Unsigned interger to convert to string
+ * @param current Input/Output string buffer. 
+ *        Must have at least uintToStringBufferSize chars free.
+ */
+static inline void 
+uintToString( LargestUInt value, 
+              char *&current )
+{
+   *--current = 0;
+   do
+   {
+      *--current = char(value % 10) + '0';
+      value /= 10;
+   }
+   while ( value != 0 );
+}
+
+} // namespace Json {
+
+#endif // LIB_JSONCPP_JSON_TOOL_H_INCLUDED
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: src/lib_json/json_tool.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: src/lib_json/json_reader.cpp
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#if !defined(JSON_IS_AMALGAMATION)
+# include <json/reader.h>
+# include <json/value.h>
+# include "json_tool.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+#include <utility>
+#include <cstdio>
+#include <cassert>
+#include <cstring>
+#include <iostream>
+#include <stdexcept>
+
+#if _MSC_VER >= 1400 // VC++ 8.0
+#pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
+#endif
+
+namespace Json {
+
+// Implementation of class Features
+// ////////////////////////////////
+
+Features::Features()
+   : allowComments_( true )
+   , strictRoot_( false )
+{
+}
+
+
+Features 
+Features::all()
+{
+   return Features();
+}
+
+
+Features 
+Features::strictMode()
+{
+   Features features;
+   features.allowComments_ = false;
+   features.strictRoot_ = true;
+   return features;
+}
+
+// Implementation of class Reader
+// ////////////////////////////////
+
+
+static inline bool 
+in( Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4 )
+{
+   return c == c1  ||  c == c2  ||  c == c3  ||  c == c4;
+}
+
+static inline bool 
+in( Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4, Reader::Char c5 )
+{
+   return c == c1  ||  c == c2  ||  c == c3  ||  c == c4  ||  c == c5;
+}
+
+
+static bool 
+containsNewLine( Reader::Location begin, 
+                 Reader::Location end )
+{
+   for ( ;begin < end; ++begin )
+      if ( *begin == '\n'  ||  *begin == '\r' )
+         return true;
+   return false;
+}
+
+
+// Class Reader
+// //////////////////////////////////////////////////////////////////
+
+Reader::Reader()
+   : features_( Features::all() )
+{
+}
+
+
+Reader::Reader( const Features &features )
+   : features_( features )
+{
+}
+
+
+bool
+Reader::parse( const std::string &document, 
+               Value &root,
+               bool collectComments )
+{
+   document_ = document;
+   const char *begin = document_.c_str();
+   const char *end = begin + document_.length();
+   return parse( begin, end, root, collectComments );
+}
+
+
+bool
+Reader::parse( std::istream& sin,
+               Value &root,
+               bool collectComments )
+{
+   //std::istream_iterator<char> begin(sin);
+   //std::istream_iterator<char> end;
+   // Those would allow streamed input from a file, if parse() were a
+   // template function.
+
+   // Since std::string is reference-counted, this at least does not
+   // create an extra copy.
+   std::string doc;
+   std::getline(sin, doc, (char)EOF);
+   return parse( doc, root, collectComments );
+}
+
+bool 
+Reader::parse( const char *beginDoc, const char *endDoc, 
+               Value &root,
+               bool collectComments )
+{
+   if ( !features_.allowComments_ )
+   {
+      collectComments = false;
+   }
+
+   begin_ = beginDoc;
+   end_ = endDoc;
+   collectComments_ = collectComments;
+   current_ = begin_;
+   lastValueEnd_ = 0;
+   lastValue_ = 0;
+   commentsBefore_ = "";
+   errors_.clear();
+   while ( !nodes_.empty() )
+      nodes_.pop();
+   nodes_.push( &root );
+   
+   bool successful = readValue();
+   Token token;
+   skipCommentTokens( token );
+   if ( collectComments_  &&  !commentsBefore_.empty() )
+      root.setComment( commentsBefore_, commentAfter );
+   if ( features_.strictRoot_ )
+   {
+      if ( !root.isArray()  &&  !root.isObject() )
+      {
+         // Set error location to start of doc, ideally should be first token found in doc
+         token.type_ = tokenError;
+         token.start_ = beginDoc;
+         token.end_ = endDoc;
+         addError( "A valid JSON document must be either an array or an object value.",
+                   token );
+         return false;
+      }
+   }
+   return successful;
+}
+
+
+bool
+Reader::readValue()
+{
+   Token token;
+   skipCommentTokens( token );
+   bool successful = true;
+
+   if ( collectComments_  &&  !commentsBefore_.empty() )
+   {
+      currentValue().setComment( commentsBefore_, commentBefore );
+      commentsBefore_ = "";
+   }
+
+
+   switch ( token.type_ )
+   {
+   case tokenObjectBegin:
+      successful = readObject( token );
+      break;
+   case tokenArrayBegin:
+      successful = readArray( token );
+      break;
+   case tokenNumber:
+      successful = decodeNumber( token );
+      break;
+   case tokenString:
+      successful = decodeString( token );
+      break;
+   case tokenTrue:
+      currentValue() = true;
+      break;
+   case tokenFalse:
+      currentValue() = false;
+      break;
+   case tokenNull:
+      currentValue() = Value();
+      break;
+   default:
+      return addError( "Syntax error: value, object or array expected.", token );
+   }
+
+   if ( collectComments_ )
+   {
+      lastValueEnd_ = current_;
+      lastValue_ = &currentValue();
+   }
+
+   return successful;
+}
+
+
+void 
+Reader::skipCommentTokens( Token &token )
+{
+   if ( features_.allowComments_ )
+   {
+      do
+      {
+         readToken( token );
+      }
+      while ( token.type_ == tokenComment );
+   }
+   else
+   {
+      readToken( token );
+   }
+}
+
+
+bool 
+Reader::expectToken( TokenType type, Token &token, const char *message )
+{
+   readToken( token );
+   if ( token.type_ != type )
+      return addError( message, token );
+   return true;
+}
+
+
+bool 
+Reader::readToken( Token &token )
+{
+   skipSpaces();
+   token.start_ = current_;
+   Char c = getNextChar();
+   bool ok = true;
+   switch ( c )
+   {
+   case '{':
+      token.type_ = tokenObjectBegin;
+      break;
+   case '}':
+      token.type_ = tokenObjectEnd;
+      break;
+   case '[':
+      token.type_ = tokenArrayBegin;
+      break;
+   case ']':
+      token.type_ = tokenArrayEnd;
+      break;
+   case '"':
+      token.type_ = tokenString;
+      ok = readString();
+      break;
+   case '/':
+      token.type_ = tokenComment;
+      ok = readComment();
+      break;
+   case '0':
+   case '1':
+   case '2':
+   case '3':
+   case '4':
+   case '5':
+   case '6':
+   case '7':
+   case '8':
+   case '9':
+   case '-':
+      token.type_ = tokenNumber;
+      readNumber();
+      break;
+   case 't':
+      token.type_ = tokenTrue;
+      ok = match( "rue", 3 );
+      break;
+   case 'f':
+      token.type_ = tokenFalse;
+      ok = match( "alse", 4 );
+      break;
+   case 'n':
+      token.type_ = tokenNull;
+      ok = match( "ull", 3 );
+      break;
+   case ',':
+      token.type_ = tokenArraySeparator;
+      break;
+   case ':':
+      token.type_ = tokenMemberSeparator;
+      break;
+   case 0:
+      token.type_ = tokenEndOfStream;
+      break;
+   default:
+      ok = false;
+      break;
+   }
+   if ( !ok )
+      token.type_ = tokenError;
+   token.end_ = current_;
+   return true;
+}
+
+
+void 
+Reader::skipSpaces()
+{
+   while ( current_ != end_ )
+   {
+      Char c = *current_;
+      if ( c == ' '  ||  c == '\t'  ||  c == '\r'  ||  c == '\n' )
+         ++current_;
+      else
+         break;
+   }
+}
+
+
+bool 
+Reader::match( Location pattern, 
+               int patternLength )
+{
+   if ( end_ - current_ < patternLength )
+      return false;
+   int index = patternLength;
+   while ( index-- )
+      if ( current_[index] != pattern[index] )
+         return false;
+   current_ += patternLength;
+   return true;
+}
+
+
+bool
+Reader::readComment()
+{
+   Location commentBegin = current_ - 1;
+   Char c = getNextChar();
+   bool successful = false;
+   if ( c == '*' )
+      successful = readCStyleComment();
+   else if ( c == '/' )
+      successful = readCppStyleComment();
+   if ( !successful )
+      return false;
+
+   if ( collectComments_ )
+   {
+      CommentPlacement placement = commentBefore;
+      if ( lastValueEnd_  &&  !containsNewLine( lastValueEnd_, commentBegin ) )
+      {
+         if ( c != '*'  ||  !containsNewLine( commentBegin, current_ ) )
+            placement = commentAfterOnSameLine;
+      }
+
+      addComment( commentBegin, current_, placement );
+   }
+   return true;
+}
+
+
+void 
+Reader::addComment( Location begin, 
+                    Location end, 
+                    CommentPlacement placement )
+{
+   assert( collectComments_ );
+   if ( placement == commentAfterOnSameLine )
+   {
+      assert( lastValue_ != 0 );
+      lastValue_->setComment( std::string( begin, end ), placement );
+   }
+   else
+   {
+      if ( !commentsBefore_.empty() )
+         commentsBefore_ += "\n";
+      commentsBefore_ += std::string( begin, end );
+   }
+}
+
+
+bool 
+Reader::readCStyleComment()
+{
+   while ( current_ != end_ )
+   {
+      Char c = getNextChar();
+      if ( c == '*'  &&  *current_ == '/' )
+         break;
+   }
+   return getNextChar() == '/';
+}
+
+
+bool 
+Reader::readCppStyleComment()
+{
+   while ( current_ != end_ )
+   {
+      Char c = getNextChar();
+      if (  c == '\r'  ||  c == '\n' )
+         break;
+   }
+   return true;
+}
+
+
+void 
+Reader::readNumber()
+{
+   while ( current_ != end_ )
+   {
+      if ( !(*current_ >= '0'  &&  *current_ <= '9')  &&
+           !in( *current_, '.', 'e', 'E', '+', '-' ) )
+         break;
+      ++current_;
+   }
+}
+
+bool
+Reader::readString()
+{
+   Char c = 0;
+   while ( current_ != end_ )
+   {
+      c = getNextChar();
+      if ( c == '\\' )
+         getNextChar();
+      else if ( c == '"' )
+         break;
+   }
+   return c == '"';
+}
+
+
+bool 
+Reader::readObject( Token &/*tokenStart*/ )
+{
+   Token tokenName;
+   std::string name;
+   currentValue() = Value( objectValue );
+   while ( readToken( tokenName ) )
+   {
+      bool initialTokenOk = true;
+      while ( tokenName.type_ == tokenComment  &&  initialTokenOk )
+         initialTokenOk = readToken( tokenName );
+      if  ( !initialTokenOk )
+         break;
+      if ( tokenName.type_ == tokenObjectEnd  &&  name.empty() )  // empty object
+         return true;
+      if ( tokenName.type_ != tokenString )
+         break;
+      
+      name = "";
+      if ( !decodeString( tokenName, name ) )
+         return recoverFromError( tokenObjectEnd );
+
+      Token colon;
+      if ( !readToken( colon ) ||  colon.type_ != tokenMemberSeparator )
+      {
+         return addErrorAndRecover( "Missing ':' after object member name", 
+                                    colon, 
+                                    tokenObjectEnd );
+      }
+      Value &value = currentValue()[ name ];
+      nodes_.push( &value );
+      bool ok = readValue();
+      nodes_.pop();
+      if ( !ok ) // error already set
+         return recoverFromError( tokenObjectEnd );
+
+      Token comma;
+      if ( !readToken( comma )
+            ||  ( comma.type_ != tokenObjectEnd  &&  
+                  comma.type_ != tokenArraySeparator &&
+                  comma.type_ != tokenComment ) )
+      {
+         return addErrorAndRecover( "Missing ',' or '}' in object declaration", 
+                                    comma, 
+                                    tokenObjectEnd );
+      }
+      bool finalizeTokenOk = true;
+      while ( comma.type_ == tokenComment &&
+              finalizeTokenOk )
+         finalizeTokenOk = readToken( comma );
+      if ( comma.type_ == tokenObjectEnd )
+         return true;
+   }
+   return addErrorAndRecover( "Missing '}' or object member name", 
+                              tokenName, 
+                              tokenObjectEnd );
+}
+
+
+bool 
+Reader::readArray( Token &/*tokenStart*/ )
+{
+   currentValue() = Value( arrayValue );
+   skipSpaces();
+   if ( *current_ == ']' ) // empty array
+   {
+      Token endArray;
+      readToken( endArray );
+      return true;
+   }
+   int index = 0;
+   for (;;)
+   {
+      Value &value = currentValue()[ index++ ];
+      nodes_.push( &value );
+      bool ok = readValue();
+      nodes_.pop();
+      if ( !ok ) // error already set
+         return recoverFromError( tokenArrayEnd );
+
+      Token token;
+      // Accept Comment after last item in the array.
+      ok = readToken( token );
+      while ( token.type_ == tokenComment  &&  ok )
+      {
+         ok = readToken( token );
+      }
+      bool badTokenType = ( token.type_ != tokenArraySeparator  &&
+                            token.type_ != tokenArrayEnd );
+      if ( !ok  ||  badTokenType )
+      {
+         return addErrorAndRecover( "Missing ',' or ']' in array declaration", 
+                                    token, 
+                                    tokenArrayEnd );
+      }
+      if ( token.type_ == tokenArrayEnd )
+         break;
+   }
+   return true;
+}
+
+
+bool 
+Reader::decodeNumber( Token &token )
+{
+   bool isDouble = false;
+   for ( Location inspect = token.start_; inspect != token.end_; ++inspect )
+   {
+      isDouble = isDouble  
+                 ||  in( *inspect, '.', 'e', 'E', '+' )  
+                 ||  ( *inspect == '-'  &&  inspect != token.start_ );
+   }
+   if ( isDouble )
+      return decodeDouble( token );
+   // Attempts to parse the number as an integer. If the number is
+   // larger than the maximum supported value of an integer then
+   // we decode the number as a double.
+   Location current = token.start_;
+   bool isNegative = *current == '-';
+   if ( isNegative )
+      ++current;
+   Value::LargestUInt maxIntegerValue = isNegative ? Value::LargestUInt(-Value::minLargestInt) 
+                                                   : Value::maxLargestUInt;
+   Value::LargestUInt threshold = maxIntegerValue / 10;
+   Value::UInt lastDigitThreshold = Value::UInt( maxIntegerValue % 10 );
+   assert( lastDigitThreshold >=0  &&  lastDigitThreshold <= 9 );
+   Value::LargestUInt value = 0;
+   while ( current < token.end_ )
+   {
+      Char c = *current++;
+      if ( c < '0'  ||  c > '9' )
+         return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token );
+      Value::UInt digit(c - '0');
+      if ( value >= threshold )
+      {
+         // If the current digit is not the last one, or if it is
+         // greater than the last digit of the maximum integer value,
+         // the parse the number as a double.
+         if ( current != token.end_  ||  digit > lastDigitThreshold )
+         {
+            return decodeDouble( token );
+         }
+      }
+      value = value * 10 + digit;
+   }
+   if ( isNegative )
+      currentValue() = -Value::LargestInt( value );
+   else if ( value <= Value::LargestUInt(Value::maxInt) )
+      currentValue() = Value::LargestInt( value );
+   else
+      currentValue() = value;
+   return true;
+}
+
+
+bool 
+Reader::decodeDouble( Token &token )
+{
+   double value = 0;
+   const int bufferSize = 32;
+   int count;
+   int length = int(token.end_ - token.start_);
+   if ( length <= bufferSize )
+   {
+      Char buffer[bufferSize+1];
+      memcpy( buffer, token.start_, length );
+      buffer[length] = 0;
+      count = sscanf( buffer, "%lf", &value );
+   }
+   else
+   {
+      std::string buffer( token.start_, token.end_ );
+      count = sscanf( buffer.c_str(), "%lf", &value );
+   }
+
+   if ( count != 1 )
+      return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token );
+   currentValue() = value;
+   return true;
+}
+
+
+bool 
+Reader::decodeString( Token &token )
+{
+   std::string decoded;
+   if ( !decodeString( token, decoded ) )
+      return false;
+   currentValue() = decoded;
+   return true;
+}
+
+
+bool 
+Reader::decodeString( Token &token, std::string &decoded )
+{
+   decoded.reserve( token.end_ - token.start_ - 2 );
+   Location current = token.start_ + 1; // skip '"'
+   Location end = token.end_ - 1;      // do not include '"'
+   while ( current != end )
+   {
+      Char c = *current++;
+      if ( c == '"' )
+         break;
+      else if ( c == '\\' )
+      {
+         if ( current == end )
+            return addError( "Empty escape sequence in string", token, current );
+         Char escape = *current++;
+         switch ( escape )
+         {
+         case '"': decoded += '"'; break;
+         case '/': decoded += '/'; break;
+         case '\\': decoded += '\\'; break;
+         case 'b': decoded += '\b'; break;
+         case 'f': decoded += '\f'; break;
+         case 'n': decoded += '\n'; break;
+         case 'r': decoded += '\r'; break;
+         case 't': decoded += '\t'; break;
+         case 'u':
+            {
+               unsigned int unicode;
+               if ( !decodeUnicodeCodePoint( token, current, end, unicode ) )
+                  return false;
+               decoded += codePointToUTF8(unicode);
+            }
+            break;
+         default:
+            return addError( "Bad escape sequence in string", token, current );
+         }
+      }
+      else
+      {
+         decoded += c;
+      }
+   }
+   return true;
+}
+
+bool
+Reader::decodeUnicodeCodePoint( Token &token, 
+                                     Location &current, 
+                                     Location end, 
+                                     unsigned int &unicode )
+{
+
+   if ( !decodeUnicodeEscapeSequence( token, current, end, unicode ) )
+      return false;
+   if (unicode >= 0xD800 && unicode <= 0xDBFF)
+   {
+      // surrogate pairs
+      if (end - current < 6)
+         return addError( "additional six characters expected to parse unicode surrogate pair.", token, current );
+      unsigned int surrogatePair;
+      if (*(current++) == '\\' && *(current++)== 'u')
+      {
+         if (decodeUnicodeEscapeSequence( token, current, end, surrogatePair ))
+         {
+            unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF);
+         } 
+         else
+            return false;
+      } 
+      else
+         return addError( "expecting another \\u token to begin the second half of a unicode surrogate pair", token, current );
+   }
+   return true;
+}
+
+bool 
+Reader::decodeUnicodeEscapeSequence( Token &token, 
+                                     Location &current, 
+                                     Location end, 
+                                     unsigned int &unicode )
+{
+   if ( end - current < 4 )
+      return addError( "Bad unicode escape sequence in string: four digits expected.", token, current );
+   unicode = 0;
+   for ( int index =0; index < 4; ++index )
+   {
+      Char c = *current++;
+      unicode *= 16;
+      if ( c >= '0'  &&  c <= '9' )
+         unicode += c - '0';
+      else if ( c >= 'a'  &&  c <= 'f' )
+         unicode += c - 'a' + 10;
+      else if ( c >= 'A'  &&  c <= 'F' )
+         unicode += c - 'A' + 10;
+      else
+         return addError( "Bad unicode escape sequence in string: hexadecimal digit expected.", token, current );
+   }
+   return true;
+}
+
+
+bool 
+Reader::addError( const std::string &message, 
+                  Token &token,
+                  Location extra )
+{
+   ErrorInfo info;
+   info.token_ = token;
+   info.message_ = message;
+   info.extra_ = extra;
+   errors_.push_back( info );
+   return false;
+}
+
+
+bool 
+Reader::recoverFromError( TokenType skipUntilToken )
+{
+   int errorCount = int(errors_.size());
+   Token skip;
+   for (;;)
+   {
+      if ( !readToken(skip) )
+         errors_.resize( errorCount ); // discard errors caused by recovery
+      if ( skip.type_ == skipUntilToken  ||  skip.type_ == tokenEndOfStream )
+         break;
+   }
+   errors_.resize( errorCount );
+   return false;
+}
+
+
+bool 
+Reader::addErrorAndRecover( const std::string &message, 
+                            Token &token,
+                            TokenType skipUntilToken )
+{
+   addError( message, token );
+   return recoverFromError( skipUntilToken );
+}
+
+
+Value &
+Reader::currentValue()
+{
+   return *(nodes_.top());
+}
+
+
+Reader::Char 
+Reader::getNextChar()
+{
+   if ( current_ == end_ )
+      return 0;
+   return *current_++;
+}
+
+
+void 
+Reader::getLocationLineAndColumn( Location location,
+                                  int &line,
+                                  int &column ) const
+{
+   Location current = begin_;
+   Location lastLineStart = current;
+   line = 0;
+   while ( current < location  &&  current != end_ )
+   {
+      Char c = *current++;
+      if ( c == '\r' )
+      {
+         if ( *current == '\n' )
+            ++current;
+         lastLineStart = current;
+         ++line;
+      }
+      else if ( c == '\n' )
+      {
+         lastLineStart = current;
+         ++line;
+      }
+   }
+   // column & line start at 1
+   column = int(location - lastLineStart) + 1;
+   ++line;
+}
+
+
+std::string
+Reader::getLocationLineAndColumn( Location location ) const
+{
+   int line, column;
+   getLocationLineAndColumn( location, line, column );
+   char buffer[18+16+16+1];
+   sprintf( buffer, "Line %d, Column %d", line, column );
+   return buffer;
+}
+
+
+// Deprecated. Preserved for backward compatibility
+std::string 
+Reader::getFormatedErrorMessages() const
+{
+    return getFormattedErrorMessages();
+}
+
+
+std::string 
+Reader::getFormattedErrorMessages() const
+{
+   std::string formattedMessage;
+   for ( Errors::const_iterator itError = errors_.begin();
+         itError != errors_.end();
+         ++itError )
+   {
+      const ErrorInfo &error = *itError;
+      formattedMessage += "* " + getLocationLineAndColumn( error.token_.start_ ) + "\n";
+      formattedMessage += "  " + error.message_ + "\n";
+      if ( error.extra_ )
+         formattedMessage += "See " + getLocationLineAndColumn( error.extra_ ) + " for detail.\n";
+   }
+   return formattedMessage;
+}
+
+
+std::istream& operator>>( std::istream &sin, Value &root )
+{
+    Json::Reader reader;
+    bool ok = reader.parse(sin, root, true);
+    //JSON_ASSERT( ok );
+    if (!ok) throw std::runtime_error(reader.getFormattedErrorMessages());
+    return sin;
+}
+
+
+} // namespace Json
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: src/lib_json/json_reader.cpp
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: src/lib_json/json_batchallocator.h
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSONCPP_BATCHALLOCATOR_H_INCLUDED
+# define JSONCPP_BATCHALLOCATOR_H_INCLUDED
+
+# include <stdlib.h>
+# include <assert.h>
+
+# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+
+namespace Json {
+
+/* Fast memory allocator.
+ *
+ * This memory allocator allocates memory for a batch of object (specified by
+ * the page size, the number of object in each page).
+ *
+ * It does not allow the destruction of a single object. All the allocated objects
+ * can be destroyed at once. The memory can be either released or reused for future
+ * allocation.
+ * 
+ * The in-place new operator must be used to construct the object using the pointer
+ * returned by allocate.
+ */
+template<typename AllocatedType
+        ,const unsigned int objectPerAllocation>
+class BatchAllocator
+{
+public:
+   typedef AllocatedType Type;
+
+   BatchAllocator( unsigned int objectsPerPage = 255 )
+      : freeHead_( 0 )
+      , objectsPerPage_( objectsPerPage )
+   {
+//      printf( "Size: %d => %s\n", sizeof(AllocatedType), typeid(AllocatedType).name() );
+      assert( sizeof(AllocatedType) * objectPerAllocation >= sizeof(AllocatedType *) ); // We must be able to store a slist in the object free space.
+      assert( objectsPerPage >= 16 );
+      batches_ = allocateBatch( 0 );   // allocated a dummy page
+      currentBatch_ = batches_;
+   }
+
+   ~BatchAllocator()
+   {
+      for ( BatchInfo *batch = batches_; batch;  )
+      {
+         BatchInfo *nextBatch = batch->next_;
+         free( batch );
+         batch = nextBatch;
+      }
+   }
+
+   /// allocate space for an array of objectPerAllocation object.
+   /// @warning it is the responsability of the caller to call objects constructors.
+   AllocatedType *allocate()
+   {
+      if ( freeHead_ ) // returns node from free list.
+      {
+         AllocatedType *object = freeHead_;
+         freeHead_ = *(AllocatedType **)object;
+         return object;
+      }
+      if ( currentBatch_->used_ == currentBatch_->end_ )
+      {
+         currentBatch_ = currentBatch_->next_;
+         while ( currentBatch_  &&  currentBatch_->used_ == currentBatch_->end_ )
+            currentBatch_ = currentBatch_->next_;
+
+         if ( !currentBatch_  ) // no free batch found, allocate a new one
+         { 
+            currentBatch_ = allocateBatch( objectsPerPage_ );
+            currentBatch_->next_ = batches_; // insert at the head of the list
+            batches_ = currentBatch_;
+         }
+      }
+      AllocatedType *allocated = currentBatch_->used_;
+      currentBatch_->used_ += objectPerAllocation;
+      return allocated;
+   }
+
+   /// Release the object.
+   /// @warning it is the responsability of the caller to actually destruct the object.
+   void release( AllocatedType *object )
+   {
+      assert( object != 0 );
+      *(AllocatedType **)object = freeHead_;
+      freeHead_ = object;
+   }
+
+private:
+   struct BatchInfo
+   {
+      BatchInfo *next_;
+      AllocatedType *used_;
+      AllocatedType *end_;
+      AllocatedType buffer_[objectPerAllocation];
+   };
+
+   // disabled copy constructor and assignement operator.
+   BatchAllocator( const BatchAllocator & );
+   void operator =( const BatchAllocator &);
+
+   static BatchInfo *allocateBatch( unsigned int objectsPerPage )
+   {
+      const unsigned int mallocSize = sizeof(BatchInfo) - sizeof(AllocatedType)* objectPerAllocation
+                                + sizeof(AllocatedType) * objectPerAllocation * objectsPerPage;
+      BatchInfo *batch = static_cast<BatchInfo*>( malloc( mallocSize ) );
+      batch->next_ = 0;
+      batch->used_ = batch->buffer_;
+      batch->end_ = batch->buffer_ + objectsPerPage;
+      return batch;
+   }
+
+   BatchInfo *batches_;
+   BatchInfo *currentBatch_;
+   /// Head of a single linked list within the allocated space of freeed object
+   AllocatedType *freeHead_;
+   unsigned int objectsPerPage_;
+};
+
+
+} // namespace Json
+
+# endif // ifndef JSONCPP_DOC_INCLUDE_IMPLEMENTATION
+
+#endif // JSONCPP_BATCHALLOCATOR_H_INCLUDED
+
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: src/lib_json/json_batchallocator.h
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: src/lib_json/json_valueiterator.inl
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+// included by json_value.cpp
+
+namespace Json {
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class ValueIteratorBase
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+ValueIteratorBase::ValueIteratorBase()
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   : current_()
+   , isNull_( true )
+{
+}
+#else
+   : isArray_( true )
+   , isNull_( true )
+{
+   iterator_.array_ = ValueInternalArray::IteratorState();
+}
+#endif
+
+
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+ValueIteratorBase::ValueIteratorBase( const Value::ObjectValues::iterator &current )
+   : current_( current )
+   , isNull_( false )
+{
+}
+#else
+ValueIteratorBase::ValueIteratorBase( const ValueInternalArray::IteratorState &state )
+   : isArray_( true )
+{
+   iterator_.array_ = state;
+}
+
+
+ValueIteratorBase::ValueIteratorBase( const ValueInternalMap::IteratorState &state )
+   : isArray_( false )
+{
+   iterator_.map_ = state;
+}
+#endif
+
+Value &
+ValueIteratorBase::deref() const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   return current_->second;
+#else
+   if ( isArray_ )
+      return ValueInternalArray::dereference( iterator_.array_ );
+   return ValueInternalMap::value( iterator_.map_ );
+#endif
+}
+
+
+void 
+ValueIteratorBase::increment()
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   ++current_;
+#else
+   if ( isArray_ )
+      ValueInternalArray::increment( iterator_.array_ );
+   ValueInternalMap::increment( iterator_.map_ );
+#endif
+}
+
+
+void 
+ValueIteratorBase::decrement()
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   --current_;
+#else
+   if ( isArray_ )
+      ValueInternalArray::decrement( iterator_.array_ );
+   ValueInternalMap::decrement( iterator_.map_ );
+#endif
+}
+
+
+ValueIteratorBase::difference_type 
+ValueIteratorBase::computeDistance( const SelfType &other ) const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+# ifdef JSON_USE_CPPTL_SMALLMAP
+   return current_ - other.current_;
+# else
+   // Iterator for null value are initialized using the default
+   // constructor, which initialize current_ to the default
+   // std::map::iterator. As begin() and end() are two instance 
+   // of the default std::map::iterator, they can not be compared.
+   // To allow this, we handle this comparison specifically.
+   if ( isNull_  &&  other.isNull_ )
+   {
+      return 0;
+   }
+
+
+   // Usage of std::distance is not portable (does not compile with Sun Studio 12 RogueWave STL,
+   // which is the one used by default).
+   // Using a portable hand-made version for non random iterator instead:
+   //   return difference_type( std::distance( current_, other.current_ ) );
+   difference_type myDistance = 0;
+   for ( Value::ObjectValues::iterator it = current_; it != other.current_; ++it )
+   {
+      ++myDistance;
+   }
+   return myDistance;
+# endif
+#else
+   if ( isArray_ )
+      return ValueInternalArray::distance( iterator_.array_, other.iterator_.array_ );
+   return ValueInternalMap::distance( iterator_.map_, other.iterator_.map_ );
+#endif
+}
+
+
+bool 
+ValueIteratorBase::isEqual( const SelfType &other ) const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   if ( isNull_ )
+   {
+      return other.isNull_;
+   }
+   return current_ == other.current_;
+#else
+   if ( isArray_ )
+      return ValueInternalArray::equals( iterator_.array_, other.iterator_.array_ );
+   return ValueInternalMap::equals( iterator_.map_, other.iterator_.map_ );
+#endif
+}
+
+
+void 
+ValueIteratorBase::copy( const SelfType &other )
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   current_ = other.current_;
+#else
+   if ( isArray_ )
+      iterator_.array_ = other.iterator_.array_;
+   iterator_.map_ = other.iterator_.map_;
+#endif
+}
+
+
+Value 
+ValueIteratorBase::key() const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   const Value::CZString czstring = (*current_).first;
+   if ( czstring.c_str() )
+   {
+      if ( czstring.isStaticString() )
+         return Value( StaticString( czstring.c_str() ) );
+      return Value( czstring.c_str() );
+   }
+   return Value( czstring.index() );
+#else
+   if ( isArray_ )
+      return Value( ValueInternalArray::indexOf( iterator_.array_ ) );
+   bool isStatic;
+   const char *memberName = ValueInternalMap::key( iterator_.map_, isStatic );
+   if ( isStatic )
+      return Value( StaticString( memberName ) );
+   return Value( memberName );
+#endif
+}
+
+
+UInt 
+ValueIteratorBase::index() const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   const Value::CZString czstring = (*current_).first;
+   if ( !czstring.c_str() )
+      return czstring.index();
+   return Value::UInt( -1 );
+#else
+   if ( isArray_ )
+      return Value::UInt( ValueInternalArray::indexOf( iterator_.array_ ) );
+   return Value::UInt( -1 );
+#endif
+}
+
+
+const char *
+ValueIteratorBase::memberName() const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   const char *name = (*current_).first.c_str();
+   return name ? name : "";
+#else
+   if ( !isArray_ )
+      return ValueInternalMap::key( iterator_.map_ );
+   return "";
+#endif
+}
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class ValueConstIterator
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+ValueConstIterator::ValueConstIterator()
+{
+}
+
+
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+ValueConstIterator::ValueConstIterator( const Value::ObjectValues::iterator &current )
+   : ValueIteratorBase( current )
+{
+}
+#else
+ValueConstIterator::ValueConstIterator( const ValueInternalArray::IteratorState &state )
+   : ValueIteratorBase( state )
+{
+}
+
+ValueConstIterator::ValueConstIterator( const ValueInternalMap::IteratorState &state )
+   : ValueIteratorBase( state )
+{
+}
+#endif
+
+ValueConstIterator &
+ValueConstIterator::operator =( const ValueIteratorBase &other )
+{
+   copy( other );
+   return *this;
+}
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class ValueIterator
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+ValueIterator::ValueIterator()
+{
+}
+
+
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+ValueIterator::ValueIterator( const Value::ObjectValues::iterator &current )
+   : ValueIteratorBase( current )
+{
+}
+#else
+ValueIterator::ValueIterator( const ValueInternalArray::IteratorState &state )
+   : ValueIteratorBase( state )
+{
+}
+
+ValueIterator::ValueIterator( const ValueInternalMap::IteratorState &state )
+   : ValueIteratorBase( state )
+{
+}
+#endif
+
+ValueIterator::ValueIterator( const ValueConstIterator &other )
+   : ValueIteratorBase( other )
+{
+}
+
+ValueIterator::ValueIterator( const ValueIterator &other )
+   : ValueIteratorBase( other )
+{
+}
+
+ValueIterator &
+ValueIterator::operator =( const SelfType &other )
+{
+   copy( other );
+   return *this;
+}
+
+} // namespace Json
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: src/lib_json/json_valueiterator.inl
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: src/lib_json/json_value.cpp
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#if !defined(JSON_IS_AMALGAMATION)
+# include <json/value.h>
+# include <json/writer.h>
+# ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
+#  include "json_batchallocator.h"
+# endif // #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
+#endif // if !defined(JSON_IS_AMALGAMATION)
+#include <iostream>
+#include <utility>
+#include <stdexcept>
+#include <cstring>
+#include <cassert>
+#ifdef JSON_USE_CPPTL
+# include <cpptl/conststring.h>
+#endif
+#include <cstddef>    // size_t
+
+#define JSON_ASSERT_UNREACHABLE assert( false )
+#define JSON_ASSERT( condition ) assert( condition );  // @todo <= change this into an exception throw
+#define JSON_FAIL_MESSAGE( message ) throw std::runtime_error( message );
+#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) JSON_FAIL_MESSAGE( message )
+
+namespace Json {
+
+const Value Value::null;
+const Int Value::minInt = Int( ~(UInt(-1)/2) );
+const Int Value::maxInt = Int( UInt(-1)/2 );
+const UInt Value::maxUInt = UInt(-1);
+const Int64 Value::minInt64 = Int64( ~(UInt64(-1)/2) );
+const Int64 Value::maxInt64 = Int64( UInt64(-1)/2 );
+const UInt64 Value::maxUInt64 = UInt64(-1);
+const LargestInt Value::minLargestInt = LargestInt( ~(LargestUInt(-1)/2) );
+const LargestInt Value::maxLargestInt = LargestInt( LargestUInt(-1)/2 );
+const LargestUInt Value::maxLargestUInt = LargestUInt(-1);
+
+
+/// Unknown size marker
+static const unsigned int unknown = (unsigned)-1;
+
+
+/** Duplicates the specified string value.
+ * @param value Pointer to the string to duplicate. Must be zero-terminated if
+ *              length is "unknown".
+ * @param length Length of the value. if equals to unknown, then it will be
+ *               computed using strlen(value).
+ * @return Pointer on the duplicate instance of string.
+ */
+static inline char *
+duplicateStringValue( const char *value, 
+                      unsigned int length = unknown )
+{
+   if ( length == unknown )
+      length = (unsigned int)strlen(value);
+   char *newString = static_cast<char *>( malloc( length + 1 ) );
+   JSON_ASSERT_MESSAGE( newString != 0, "Failed to allocate string value buffer" );
+   memcpy( newString, value, length );
+   newString[length] = 0;
+   return newString;
+}
+
+
+/** Free the string duplicated by duplicateStringValue().
+ */
+static inline void 
+releaseStringValue( char *value )
+{
+   if ( value )
+      free( value );
+}
+
+} // namespace Json
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// ValueInternals...
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+#if !defined(JSON_IS_AMALGAMATION)
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+#  include "json_internalarray.inl"
+#  include "json_internalmap.inl"
+# endif // JSON_VALUE_USE_INTERNAL_MAP
+
+# include "json_valueiterator.inl"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+
+namespace Json {
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class Value::CommentInfo
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+
+Value::CommentInfo::CommentInfo()
+   : comment_( 0 )
+{
+}
+
+Value::CommentInfo::~CommentInfo()
+{
+   if ( comment_ )
+      releaseStringValue( comment_ );
+}
+
+
+void 
+Value::CommentInfo::setComment( const char *text )
+{
+   if ( comment_ )
+      releaseStringValue( comment_ );
+   JSON_ASSERT( text != 0 );
+   JSON_ASSERT_MESSAGE( text[0]=='\0' || text[0]=='/', "Comments must start with /");
+   // It seems that /**/ style comments are acceptable as well.
+   comment_ = duplicateStringValue( text );
+}
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class Value::CZString
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+# ifndef JSON_VALUE_USE_INTERNAL_MAP
+
+// Notes: index_ indicates if the string was allocated when
+// a string is stored.
+
+Value::CZString::CZString( ArrayIndex index )
+   : cstr_( 0 )
+   , index_( index )
+{
+}
+
+Value::CZString::CZString( const char *cstr, DuplicationPolicy allocate )
+   : cstr_( allocate == duplicate ? duplicateStringValue(cstr) 
+                                  : cstr )
+   , index_( allocate )
+{
+}
+
+Value::CZString::CZString( const CZString &other )
+: cstr_( other.index_ != noDuplication &&  other.cstr_ != 0
+                ?  duplicateStringValue( other.cstr_ )
+                : other.cstr_ )
+   , index_( other.cstr_ ? (other.index_ == noDuplication ? noDuplication : duplicate)
+                         : other.index_ )
+{
+}
+
+Value::CZString::~CZString()
+{
+   if ( cstr_  &&  index_ == duplicate )
+      releaseStringValue( const_cast<char *>( cstr_ ) );
+}
+
+void 
+Value::CZString::swap( CZString &other )
+{
+   std::swap( cstr_, other.cstr_ );
+   std::swap( index_, other.index_ );
+}
+
+Value::CZString &
+Value::CZString::operator =( const CZString &other )
+{
+   CZString temp( other );
+   swap( temp );
+   return *this;
+}
+
+bool 
+Value::CZString::operator<( const CZString &other ) const 
+{
+   if ( cstr_ )
+      return strcmp( cstr_, other.cstr_ ) < 0;
+   return index_ < other.index_;
+}
+
+bool 
+Value::CZString::operator==( const CZString &other ) const 
+{
+   if ( cstr_ )
+      return strcmp( cstr_, other.cstr_ ) == 0;
+   return index_ == other.index_;
+}
+
+
+ArrayIndex 
+Value::CZString::index() const
+{
+   return index_;
+}
+
+
+const char *
+Value::CZString::c_str() const
+{
+   return cstr_;
+}
+
+bool 
+Value::CZString::isStaticString() const
+{
+   return index_ == noDuplication;
+}
+
+#endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class Value::Value
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+/*! \internal Default constructor initialization must be equivalent to:
+ * memset( this, 0, sizeof(Value) )
+ * This optimization is used in ValueInternalMap fast allocator.
+ */
+Value::Value( ValueType type )
+   : type_( type )
+   , allocated_( 0 )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   switch ( type )
+   {
+   case nullValue:
+      break;
+   case intValue:
+   case uintValue:
+      value_.int_ = 0;
+      break;
+   case realValue:
+      value_.real_ = 0.0;
+      break;
+   case stringValue:
+      value_.string_ = 0;
+      break;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      value_.map_ = new ObjectValues();
+      break;
+#else
+   case arrayValue:
+      value_.array_ = arrayAllocator()->newArray();
+      break;
+   case objectValue:
+      value_.map_ = mapAllocator()->newMap();
+      break;
+#endif
+   case booleanValue:
+      value_.bool_ = false;
+      break;
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+}
+
+
+#if defined(JSON_HAS_INT64)
+Value::Value( UInt value )
+   : type_( uintValue )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.uint_ = value;
+}
+
+Value::Value( Int value )
+   : type_( intValue )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.int_ = value;
+}
+
+#endif // if defined(JSON_HAS_INT64)
+
+
+Value::Value( Int64 value )
+   : type_( intValue )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.int_ = value;
+}
+
+
+Value::Value( UInt64 value )
+   : type_( uintValue )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.uint_ = value;
+}
+
+Value::Value( double value )
+   : type_( realValue )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.real_ = value;
+}
+
+Value::Value( const char *value )
+   : type_( stringValue )
+   , allocated_( true )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.string_ = duplicateStringValue( value );
+}
+
+
+Value::Value( const char *beginValue, 
+              const char *endValue )
+   : type_( stringValue )
+   , allocated_( true )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.string_ = duplicateStringValue( beginValue, 
+                                          (unsigned int)(endValue - beginValue) );
+}
+
+
+Value::Value( const std::string &value )
+   : type_( stringValue )
+   , allocated_( true )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.string_ = duplicateStringValue( value.c_str(), 
+                                          (unsigned int)value.length() );
+
+}
+
+Value::Value( const StaticString &value )
+   : type_( stringValue )
+   , allocated_( false )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.string_ = const_cast<char *>( value.c_str() );
+}
+
+
+# ifdef JSON_USE_CPPTL
+Value::Value( const CppTL::ConstString &value )
+   : type_( stringValue )
+   , allocated_( true )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.string_ = duplicateStringValue( value, value.length() );
+}
+# endif
+
+Value::Value( bool value )
+   : type_( booleanValue )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.bool_ = value;
+}
+
+
+Value::Value( const Value &other )
+   : type_( other.type_ )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   switch ( type_ )
+   {
+   case nullValue:
+   case intValue:
+   case uintValue:
+   case realValue:
+   case booleanValue:
+      value_ = other.value_;
+      break;
+   case stringValue:
+      if ( other.value_.string_ )
+      {
+         value_.string_ = duplicateStringValue( other.value_.string_ );
+         allocated_ = true;
+      }
+      else
+         value_.string_ = 0;
+      break;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      value_.map_ = new ObjectValues( *other.value_.map_ );
+      break;
+#else
+   case arrayValue:
+      value_.array_ = arrayAllocator()->newArrayCopy( *other.value_.array_ );
+      break;
+   case objectValue:
+      value_.map_ = mapAllocator()->newMapCopy( *other.value_.map_ );
+      break;
+#endif
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   if ( other.comments_ )
+   {
+      comments_ = new CommentInfo[numberOfCommentPlacement];
+      for ( int comment =0; comment < numberOfCommentPlacement; ++comment )
+      {
+         const CommentInfo &otherComment = other.comments_[comment];
+         if ( otherComment.comment_ )
+            comments_[comment].setComment( otherComment.comment_ );
+      }
+   }
+}
+
+
+Value::~Value()
+{
+   switch ( type_ )
+   {
+   case nullValue:
+   case intValue:
+   case uintValue:
+   case realValue:
+   case booleanValue:
+      break;
+   case stringValue:
+      if ( allocated_ )
+         releaseStringValue( value_.string_ );
+      break;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      delete value_.map_;
+      break;
+#else
+   case arrayValue:
+      arrayAllocator()->destructArray( value_.array_ );
+      break;
+   case objectValue:
+      mapAllocator()->destructMap( value_.map_ );
+      break;
+#endif
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+
+   if ( comments_ )
+      delete[] comments_;
+}
+
+Value &
+Value::operator=( const Value &other )
+{
+   Value temp( other );
+   swap( temp );
+   return *this;
+}
+
+void 
+Value::swap( Value &other )
+{
+   ValueType temp = type_;
+   type_ = other.type_;
+   other.type_ = temp;
+   std::swap( value_, other.value_ );
+   int temp2 = allocated_;
+   allocated_ = other.allocated_;
+   other.allocated_ = temp2;
+}
+
+ValueType 
+Value::type() const
+{
+   return type_;
+}
+
+
+int 
+Value::compare( const Value &other ) const
+{
+   if ( *this < other )
+      return -1;
+   if ( *this > other )
+      return 1;
+   return 0;
+}
+
+
+bool 
+Value::operator <( const Value &other ) const
+{
+   int typeDelta = type_ - other.type_;
+   if ( typeDelta )
+      return typeDelta < 0 ? true : false;
+   switch ( type_ )
+   {
+   case nullValue:
+      return false;
+   case intValue:
+      return value_.int_ < other.value_.int_;
+   case uintValue:
+      return value_.uint_ < other.value_.uint_;
+   case realValue:
+      return value_.real_ < other.value_.real_;
+   case booleanValue:
+      return value_.bool_ < other.value_.bool_;
+   case stringValue:
+      return ( value_.string_ == 0  &&  other.value_.string_ )
+             || ( other.value_.string_  
+                  &&  value_.string_  
+                  && strcmp( value_.string_, other.value_.string_ ) < 0 );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      {
+         int delta = int( value_.map_->size() - other.value_.map_->size() );
+         if ( delta )
+            return delta < 0;
+         return (*value_.map_) < (*other.value_.map_);
+      }
+#else
+   case arrayValue:
+      return value_.array_->compare( *(other.value_.array_) ) < 0;
+   case objectValue:
+      return value_.map_->compare( *(other.value_.map_) ) < 0;
+#endif
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return false;  // unreachable
+}
+
+bool 
+Value::operator <=( const Value &other ) const
+{
+   return !(other < *this);
+}
+
+bool 
+Value::operator >=( const Value &other ) const
+{
+   return !(*this < other);
+}
+
+bool 
+Value::operator >( const Value &other ) const
+{
+   return other < *this;
+}
+
+bool 
+Value::operator ==( const Value &other ) const
+{
+   //if ( type_ != other.type_ )
+   // GCC 2.95.3 says:
+   // attempt to take address of bit-field structure member `Json::Value::type_'
+   // Beats me, but a temp solves the problem.
+   int temp = other.type_;
+   if ( type_ != temp )
+      return false;
+   switch ( type_ )
+   {
+   case nullValue:
+      return true;
+   case intValue:
+      return value_.int_ == other.value_.int_;
+   case uintValue:
+      return value_.uint_ == other.value_.uint_;
+   case realValue:
+      return value_.real_ == other.value_.real_;
+   case booleanValue:
+      return value_.bool_ == other.value_.bool_;
+   case stringValue:
+      return ( value_.string_ == other.value_.string_ )
+             || ( other.value_.string_  
+                  &&  value_.string_  
+                  && strcmp( value_.string_, other.value_.string_ ) == 0 );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      return value_.map_->size() == other.value_.map_->size()
+             && (*value_.map_) == (*other.value_.map_);
+#else
+   case arrayValue:
+      return value_.array_->compare( *(other.value_.array_) ) == 0;
+   case objectValue:
+      return value_.map_->compare( *(other.value_.map_) ) == 0;
+#endif
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return false;  // unreachable
+}
+
+bool 
+Value::operator !=( const Value &other ) const
+{
+   return !( *this == other );
+}
+
+const char *
+Value::asCString() const
+{
+   JSON_ASSERT( type_ == stringValue );
+   return value_.string_;
+}
+
+
+std::string 
+Value::asString() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return "";
+   case stringValue:
+      return value_.string_ ? value_.string_ : "";
+   case booleanValue:
+      return value_.bool_ ? "true" : "false";
+   case intValue:
+   case uintValue:
+   case realValue:
+   case arrayValue:
+   case objectValue:
+      JSON_FAIL_MESSAGE( "Type is not convertible to string" );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return ""; // unreachable
+}
+
+# ifdef JSON_USE_CPPTL
+CppTL::ConstString 
+Value::asConstString() const
+{
+   return CppTL::ConstString( asString().c_str() );
+}
+# endif
+
+
+Value::Int 
+Value::asInt() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return 0;
+   case intValue:
+      JSON_ASSERT_MESSAGE( value_.int_ >= minInt  &&  value_.int_ <= maxInt, "unsigned integer out of signed int range" );
+      return Int(value_.int_);
+   case uintValue:
+      JSON_ASSERT_MESSAGE( value_.uint_ <= UInt(maxInt), "unsigned integer out of signed int range" );
+      return Int(value_.uint_);
+   case realValue:
+      JSON_ASSERT_MESSAGE( value_.real_ >= minInt  &&  value_.real_ <= maxInt, "Real out of signed integer range" );
+      return Int( value_.real_ );
+   case booleanValue:
+      return value_.bool_ ? 1 : 0;
+   case stringValue:
+   case arrayValue:
+   case objectValue:
+      JSON_FAIL_MESSAGE( "Type is not convertible to int" );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0; // unreachable;
+}
+
+
+Value::UInt 
+Value::asUInt() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return 0;
+   case intValue:
+      JSON_ASSERT_MESSAGE( value_.int_ >= 0, "Negative integer can not be converted to unsigned integer" );
+      JSON_ASSERT_MESSAGE( value_.int_ <= maxUInt, "signed integer out of UInt range" );
+      return UInt(value_.int_);
+   case uintValue:
+      JSON_ASSERT_MESSAGE( value_.uint_ <= maxUInt, "unsigned integer out of UInt range" );
+      return UInt(value_.uint_);
+   case realValue:
+      JSON_ASSERT_MESSAGE( value_.real_ >= 0  &&  value_.real_ <= maxUInt,  "Real out of unsigned integer range" );
+      return UInt( value_.real_ );
+   case booleanValue:
+      return value_.bool_ ? 1 : 0;
+   case stringValue:
+   case arrayValue:
+   case objectValue:
+      JSON_FAIL_MESSAGE( "Type is not convertible to uint" );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0; // unreachable;
+}
+
+
+# if defined(JSON_HAS_INT64)
+
+Value::Int64
+Value::asInt64() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return 0;
+   case intValue:
+      return value_.int_;
+   case uintValue:
+      JSON_ASSERT_MESSAGE( value_.uint_ <= UInt64(maxInt64), "unsigned integer out of Int64 range" );
+      return value_.uint_;
+   case realValue:
+      JSON_ASSERT_MESSAGE( value_.real_ >= minInt64  &&  value_.real_ <= maxInt64, "Real out of Int64 range" );
+      return Int( value_.real_ );
+   case booleanValue:
+      return value_.bool_ ? 1 : 0;
+   case stringValue:
+   case arrayValue:
+   case objectValue:
+      JSON_FAIL_MESSAGE( "Type is not convertible to Int64" );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0; // unreachable;
+}
+
+
+Value::UInt64
+Value::asUInt64() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return 0;
+   case intValue:
+      JSON_ASSERT_MESSAGE( value_.int_ >= 0, "Negative integer can not be converted to UInt64" );
+      return value_.int_;
+   case uintValue:
+      return value_.uint_;
+   case realValue:
+      JSON_ASSERT_MESSAGE( value_.real_ >= 0  &&  value_.real_ <= maxUInt64,  "Real out of UInt64 range" );
+      return UInt( value_.real_ );
+   case booleanValue:
+      return value_.bool_ ? 1 : 0;
+   case stringValue:
+   case arrayValue:
+   case objectValue:
+      JSON_FAIL_MESSAGE( "Type is not convertible to UInt64" );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0; // unreachable;
+}
+# endif // if defined(JSON_HAS_INT64)
+
+
+LargestInt 
+Value::asLargestInt() const
+{
+#if defined(JSON_NO_INT64)
+    return asInt();
+#else
+    return asInt64();
+#endif
+}
+
+
+LargestUInt 
+Value::asLargestUInt() const
+{
+#if defined(JSON_NO_INT64)
+    return asUInt();
+#else
+    return asUInt64();
+#endif
+}
+
+
+double 
+Value::asDouble() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return 0.0;
+   case intValue:
+      return static_cast<double>( value_.int_ );
+   case uintValue:
+#if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
+      return static_cast<double>( value_.uint_ );
+#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
+      return static_cast<double>( Int(value_.uint_/2) ) * 2 + Int(value_.uint_ & 1);
+#endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
+   case realValue:
+      return value_.real_;
+   case booleanValue:
+      return value_.bool_ ? 1.0 : 0.0;
+   case stringValue:
+   case arrayValue:
+   case objectValue:
+      JSON_FAIL_MESSAGE( "Type is not convertible to double" );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0; // unreachable;
+}
+
+float
+Value::asFloat() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return 0.0f;
+   case intValue:
+      return static_cast<float>( value_.int_ );
+   case uintValue:
+#if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
+      return static_cast<float>( value_.uint_ );
+#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
+      return static_cast<float>( Int(value_.uint_/2) ) * 2 + Int(value_.uint_ & 1);
+#endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
+   case realValue:
+      return static_cast<float>( value_.real_ );
+   case booleanValue:
+      return value_.bool_ ? 1.0f : 0.0f;
+   case stringValue:
+   case arrayValue:
+   case objectValue:
+      JSON_FAIL_MESSAGE( "Type is not convertible to float" );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0.0f; // unreachable;
+}
+
+bool 
+Value::asBool() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return false;
+   case intValue:
+   case uintValue:
+      return value_.int_ != 0;
+   case realValue:
+      return value_.real_ != 0.0;
+   case booleanValue:
+      return value_.bool_;
+   case stringValue:
+      return value_.string_  &&  value_.string_[0] != 0;
+   case arrayValue:
+   case objectValue:
+      return value_.map_->size() != 0;
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return false; // unreachable;
+}
+
+
+bool 
+Value::isConvertibleTo( ValueType other ) const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return true;
+   case intValue:
+      return ( other == nullValue  &&  value_.int_ == 0 )
+             || other == intValue
+             || ( other == uintValue  && value_.int_ >= 0 )
+             || other == realValue
+             || other == stringValue
+             || other == booleanValue;
+   case uintValue:
+      return ( other == nullValue  &&  value_.uint_ == 0 )
+             || ( other == intValue  && value_.uint_ <= (unsigned)maxInt )
+             || other == uintValue
+             || other == realValue
+             || other == stringValue
+             || other == booleanValue;
+   case realValue:
+      return ( other == nullValue  &&  value_.real_ == 0.0 )
+             || ( other == intValue  &&  value_.real_ >= minInt  &&  value_.real_ <= maxInt )
+             || ( other == uintValue  &&  value_.real_ >= 0  &&  value_.real_ <= maxUInt )
+             || other == realValue
+             || other == stringValue
+             || other == booleanValue;
+   case booleanValue:
+      return ( other == nullValue  &&  value_.bool_ == false )
+             || other == intValue
+             || other == uintValue
+             || other == realValue
+             || other == stringValue
+             || other == booleanValue;
+   case stringValue:
+      return other == stringValue
+             || ( other == nullValue  &&  (!value_.string_  ||  value_.string_[0] == 0) );
+   case arrayValue:
+      return other == arrayValue
+             ||  ( other == nullValue  &&  value_.map_->size() == 0 );
+   case objectValue:
+      return other == objectValue
+             ||  ( other == nullValue  &&  value_.map_->size() == 0 );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return false; // unreachable;
+}
+
+
+/// Number of values in array or object
+ArrayIndex 
+Value::size() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+   case intValue:
+   case uintValue:
+   case realValue:
+   case booleanValue:
+   case stringValue:
+      return 0;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:  // size of the array is highest index + 1
+      if ( !value_.map_->empty() )
+      {
+         ObjectValues::const_iterator itLast = value_.map_->end();
+         --itLast;
+         return (*itLast).first.index()+1;
+      }
+      return 0;
+   case objectValue:
+      return ArrayIndex( value_.map_->size() );
+#else
+   case arrayValue:
+      return Int( value_.array_->size() );
+   case objectValue:
+      return Int( value_.map_->size() );
+#endif
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0; // unreachable;
+}
+
+
+bool 
+Value::empty() const
+{
+   if ( isNull() || isArray() || isObject() )
+      return size() == 0u;
+   else
+      return false;
+}
+
+
+bool
+Value::operator!() const
+{
+   return isNull();
+}
+
+
+void 
+Value::clear()
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue  || type_ == objectValue );
+
+   switch ( type_ )
+   {
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      value_.map_->clear();
+      break;
+#else
+   case arrayValue:
+      value_.array_->clear();
+      break;
+   case objectValue:
+      value_.map_->clear();
+      break;
+#endif
+   default:
+      break;
+   }
+}
+
+void 
+Value::resize( ArrayIndex newSize )
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
+   if ( type_ == nullValue )
+      *this = Value( arrayValue );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   ArrayIndex oldSize = size();
+   if ( newSize == 0 )
+      clear();
+   else if ( newSize > oldSize )
+      (*this)[ newSize - 1 ];
+   else
+   {
+      for ( ArrayIndex index = newSize; index < oldSize; ++index )
+      {
+         value_.map_->erase( index );
+      }
+      assert( size() == newSize );
+   }
+#else
+   value_.array_->resize( newSize );
+#endif
+}
+
+
+Value &
+Value::operator[]( ArrayIndex index )
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
+   if ( type_ == nullValue )
+      *this = Value( arrayValue );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   CZString key( index );
+   ObjectValues::iterator it = value_.map_->lower_bound( key );
+   if ( it != value_.map_->end()  &&  (*it).first == key )
+      return (*it).second;
+
+   ObjectValues::value_type defaultValue( key, null );
+   it = value_.map_->insert( it, defaultValue );
+   return (*it).second;
+#else
+   return value_.array_->resolveReference( index );
+#endif
+}
+
+
+Value &
+Value::operator[]( int index )
+{
+   JSON_ASSERT( index >= 0 );
+   return (*this)[ ArrayIndex(index) ];
+}
+
+
+const Value &
+Value::operator[]( ArrayIndex index ) const
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
+   if ( type_ == nullValue )
+      return null;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   CZString key( index );
+   ObjectValues::const_iterator it = value_.map_->find( key );
+   if ( it == value_.map_->end() )
+      return null;
+   return (*it).second;
+#else
+   Value *value = value_.array_->find( index );
+   return value ? *value : null;
+#endif
+}
+
+
+const Value &
+Value::operator[]( int index ) const
+{
+   JSON_ASSERT( index >= 0 );
+   return (*this)[ ArrayIndex(index) ];
+}
+
+
+Value &
+Value::operator[]( const char *key )
+{
+   return resolveReference( key, false );
+}
+
+
+Value &
+Value::resolveReference( const char *key, 
+                         bool isStatic )
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
+   if ( type_ == nullValue )
+      *this = Value( objectValue );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   CZString actualKey( key, isStatic ? CZString::noDuplication 
+                                     : CZString::duplicateOnCopy );
+   ObjectValues::iterator it = value_.map_->lower_bound( actualKey );
+   if ( it != value_.map_->end()  &&  (*it).first == actualKey )
+      return (*it).second;
+
+   ObjectValues::value_type defaultValue( actualKey, null );
+   it = value_.map_->insert( it, defaultValue );
+   Value &value = (*it).second;
+   return value;
+#else
+   return value_.map_->resolveReference( key, isStatic );
+#endif
+}
+
+
+Value 
+Value::get( ArrayIndex index, 
+            const Value &defaultValue ) const
+{
+   const Value *value = &((*this)[index]);
+   return value == &null ? defaultValue : *value;
+}
+
+
+bool 
+Value::isValidIndex( ArrayIndex index ) const
+{
+   return index < size();
+}
+
+
+
+const Value &
+Value::operator[]( const char *key ) const
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
+   if ( type_ == nullValue )
+      return null;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   CZString actualKey( key, CZString::noDuplication );
+   ObjectValues::const_iterator it = value_.map_->find( actualKey );
+   if ( it == value_.map_->end() )
+      return null;
+   return (*it).second;
+#else
+   const Value *value = value_.map_->find( key );
+   return value ? *value : null;
+#endif
+}
+
+
+Value &
+Value::operator[]( const std::string &key )
+{
+   return (*this)[ key.c_str() ];
+}
+
+
+const Value &
+Value::operator[]( const std::string &key ) const
+{
+   return (*this)[ key.c_str() ];
+}
+
+Value &
+Value::operator[]( const StaticString &key )
+{
+   return resolveReference( key, true );
+}
+
+
+# ifdef JSON_USE_CPPTL
+Value &
+Value::operator[]( const CppTL::ConstString &key )
+{
+   return (*this)[ key.c_str() ];
+}
+
+
+const Value &
+Value::operator[]( const CppTL::ConstString &key ) const
+{
+   return (*this)[ key.c_str() ];
+}
+# endif
+
+
+Value &
+Value::append( const Value &value )
+{
+   return (*this)[size()] = value;
+}
+
+
+Value 
+Value::get( const char *key, 
+            const Value &defaultValue ) const
+{
+   const Value *value = &((*this)[key]);
+   return value == &null ? defaultValue : *value;
+}
+
+
+Value 
+Value::get( const std::string &key,
+            const Value &defaultValue ) const
+{
+   return get( key.c_str(), defaultValue );
+}
+
+Value
+Value::removeMember( const char* key )
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
+   if ( type_ == nullValue )
+      return null;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   CZString actualKey( key, CZString::noDuplication );
+   ObjectValues::iterator it = value_.map_->find( actualKey );
+   if ( it == value_.map_->end() )
+      return null;
+   Value old(it->second);
+   value_.map_->erase(it);
+   return old;
+#else
+   Value *value = value_.map_->find( key );
+   if (value){
+      Value old(*value);
+      value_.map_.remove( key );
+      return old;
+   } else {
+      return null;
+   }
+#endif
+}
+
+Value
+Value::removeMember( const std::string &key )
+{
+   return removeMember( key.c_str() );
+}
+
+# ifdef JSON_USE_CPPTL
+Value 
+Value::get( const CppTL::ConstString &key,
+            const Value &defaultValue ) const
+{
+   return get( key.c_str(), defaultValue );
+}
+# endif
+
+bool 
+Value::isMember( const char *key ) const
+{
+   const Value *value = &((*this)[key]);
+   return value != &null;
+}
+
+
+bool 
+Value::isMember( const std::string &key ) const
+{
+   return isMember( key.c_str() );
+}
+
+
+# ifdef JSON_USE_CPPTL
+bool 
+Value::isMember( const CppTL::ConstString &key ) const
+{
+   return isMember( key.c_str() );
+}
+#endif
+
+Value::Members 
+Value::getMemberNames() const
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
+   if ( type_ == nullValue )
+       return Value::Members();
+   Members members;
+   members.reserve( value_.map_->size() );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   ObjectValues::const_iterator it = value_.map_->begin();
+   ObjectValues::const_iterator itEnd = value_.map_->end();
+   for ( ; it != itEnd; ++it )
+      members.push_back( std::string( (*it).first.c_str() ) );
+#else
+   ValueInternalMap::IteratorState it;
+   ValueInternalMap::IteratorState itEnd;
+   value_.map_->makeBeginIterator( it );
+   value_.map_->makeEndIterator( itEnd );
+   for ( ; !ValueInternalMap::equals( it, itEnd ); ValueInternalMap::increment(it) )
+      members.push_back( std::string( ValueInternalMap::key( it ) ) );
+#endif
+   return members;
+}
+//
+//# ifdef JSON_USE_CPPTL
+//EnumMemberNames
+//Value::enumMemberNames() const
+//{
+//   if ( type_ == objectValue )
+//   {
+//      return CppTL::Enum::any(  CppTL::Enum::transform(
+//         CppTL::Enum::keys( *(value_.map_), CppTL::Type<const CZString &>() ),
+//         MemberNamesTransform() ) );
+//   }
+//   return EnumMemberNames();
+//}
+//
+//
+//EnumValues 
+//Value::enumValues() const
+//{
+//   if ( type_ == objectValue  ||  type_ == arrayValue )
+//      return CppTL::Enum::anyValues( *(value_.map_), 
+//                                     CppTL::Type<const Value &>() );
+//   return EnumValues();
+//}
+//
+//# endif
+
+
+bool
+Value::isNull() const
+{
+   return type_ == nullValue;
+}
+
+
+bool 
+Value::isBool() const
+{
+   return type_ == booleanValue;
+}
+
+
+bool 
+Value::isInt() const
+{
+   return type_ == intValue;
+}
+
+
+bool 
+Value::isUInt() const
+{
+   return type_ == uintValue;
+}
+
+
+bool 
+Value::isIntegral() const
+{
+   return type_ == intValue  
+          ||  type_ == uintValue  
+          ||  type_ == booleanValue;
+}
+
+
+bool 
+Value::isDouble() const
+{
+   return type_ == realValue;
+}
+
+
+bool 
+Value::isNumeric() const
+{
+   return isIntegral() || isDouble();
+}
+
+
+bool 
+Value::isString() const
+{
+   return type_ == stringValue;
+}
+
+
+bool 
+Value::isArray() const
+{
+   return type_ == nullValue  ||  type_ == arrayValue;
+}
+
+
+bool 
+Value::isObject() const
+{
+   return type_ == nullValue  ||  type_ == objectValue;
+}
+
+
+void 
+Value::setComment( const char *comment,
+                   CommentPlacement placement )
+{
+   if ( !comments_ )
+      comments_ = new CommentInfo[numberOfCommentPlacement];
+   comments_[placement].setComment( comment );
+}
+
+
+void 
+Value::setComment( const std::string &comment,
+                   CommentPlacement placement )
+{
+   setComment( comment.c_str(), placement );
+}
+
+
+bool 
+Value::hasComment( CommentPlacement placement ) const
+{
+   return comments_ != 0  &&  comments_[placement].comment_ != 0;
+}
+
+std::string 
+Value::getComment( CommentPlacement placement ) const
+{
+   if ( hasComment(placement) )
+      return comments_[placement].comment_;
+   return "";
+}
+
+
+std::string 
+Value::toStyledString() const
+{
+   StyledWriter writer;
+   return writer.write( *this );
+}
+
+
+Value::const_iterator 
+Value::begin() const
+{
+   switch ( type_ )
+   {
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+      if ( value_.array_ )
+      {
+         ValueInternalArray::IteratorState it;
+         value_.array_->makeBeginIterator( it );
+         return const_iterator( it );
+      }
+      break;
+   case objectValue:
+      if ( value_.map_ )
+      {
+         ValueInternalMap::IteratorState it;
+         value_.map_->makeBeginIterator( it );
+         return const_iterator( it );
+      }
+      break;
+#else
+   case arrayValue:
+   case objectValue:
+      if ( value_.map_ )
+         return const_iterator( value_.map_->begin() );
+      break;
+#endif
+   default:
+      break;
+   }
+   return const_iterator();
+}
+
+Value::const_iterator 
+Value::end() const
+{
+   switch ( type_ )
+   {
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+      if ( value_.array_ )
+      {
+         ValueInternalArray::IteratorState it;
+         value_.array_->makeEndIterator( it );
+         return const_iterator( it );
+      }
+      break;
+   case objectValue:
+      if ( value_.map_ )
+      {
+         ValueInternalMap::IteratorState it;
+         value_.map_->makeEndIterator( it );
+         return const_iterator( it );
+      }
+      break;
+#else
+   case arrayValue:
+   case objectValue:
+      if ( value_.map_ )
+         return const_iterator( value_.map_->end() );
+      break;
+#endif
+   default:
+      break;
+   }
+   return const_iterator();
+}
+
+
+Value::iterator 
+Value::begin()
+{
+   switch ( type_ )
+   {
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+      if ( value_.array_ )
+      {
+         ValueInternalArray::IteratorState it;
+         value_.array_->makeBeginIterator( it );
+         return iterator( it );
+      }
+      break;
+   case objectValue:
+      if ( value_.map_ )
+      {
+         ValueInternalMap::IteratorState it;
+         value_.map_->makeBeginIterator( it );
+         return iterator( it );
+      }
+      break;
+#else
+   case arrayValue:
+   case objectValue:
+      if ( value_.map_ )
+         return iterator( value_.map_->begin() );
+      break;
+#endif
+   default:
+      break;
+   }
+   return iterator();
+}
+
+Value::iterator 
+Value::end()
+{
+   switch ( type_ )
+   {
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+      if ( value_.array_ )
+      {
+         ValueInternalArray::IteratorState it;
+         value_.array_->makeEndIterator( it );
+         return iterator( it );
+      }
+      break;
+   case objectValue:
+      if ( value_.map_ )
+      {
+         ValueInternalMap::IteratorState it;
+         value_.map_->makeEndIterator( it );
+         return iterator( it );
+      }
+      break;
+#else
+   case arrayValue:
+   case objectValue:
+      if ( value_.map_ )
+         return iterator( value_.map_->end() );
+      break;
+#endif
+   default:
+      break;
+   }
+   return iterator();
+}
+
+
+// class PathArgument
+// //////////////////////////////////////////////////////////////////
+
+PathArgument::PathArgument()
+   : kind_( kindNone )
+{
+}
+
+
+PathArgument::PathArgument( ArrayIndex index )
+   : index_( index )
+   , kind_( kindIndex )
+{
+}
+
+
+PathArgument::PathArgument( const char *key )
+   : key_( key )
+   , kind_( kindKey )
+{
+}
+
+
+PathArgument::PathArgument( const std::string &key )
+   : key_( key.c_str() )
+   , kind_( kindKey )
+{
+}
+
+// class Path
+// //////////////////////////////////////////////////////////////////
+
+Path::Path( const std::string &path,
+            const PathArgument &a1,
+            const PathArgument &a2,
+            const PathArgument &a3,
+            const PathArgument &a4,
+            const PathArgument &a5 )
+{
+   InArgs in;
+   in.push_back( &a1 );
+   in.push_back( &a2 );
+   in.push_back( &a3 );
+   in.push_back( &a4 );
+   in.push_back( &a5 );
+   makePath( path, in );
+}
+
+
+void 
+Path::makePath( const std::string &path,
+                const InArgs &in )
+{
+   const char *current = path.c_str();
+   const char *end = current + path.length();
+   InArgs::const_iterator itInArg = in.begin();
+   while ( current != end )
+   {
+      if ( *current == '[' )
+      {
+         ++current;
+         if ( *current == '%' )
+            addPathInArg( path, in, itInArg, PathArgument::kindIndex );
+         else
+         {
+            ArrayIndex index = 0;
+            for ( ; current != end && *current >= '0'  &&  *current <= '9'; ++current )
+               index = index * 10 + ArrayIndex(*current - '0');
+            args_.push_back( index );
+         }
+         if ( current == end  ||  *current++ != ']' )
+            invalidPath( path, int(current - path.c_str()) );
+      }
+      else if ( *current == '%' )
+      {
+         addPathInArg( path, in, itInArg, PathArgument::kindKey );
+         ++current;
+      }
+      else if ( *current == '.' )
+      {
+         ++current;
+      }
+      else
+      {
+         const char *beginName = current;
+         while ( current != end  &&  !strchr( "[.", *current ) )
+            ++current;
+         args_.push_back( std::string( beginName, current ) );
+      }
+   }
+}
+
+
+void 
+Path::addPathInArg( const std::string &path, 
+                    const InArgs &in, 
+                    InArgs::const_iterator &itInArg, 
+                    PathArgument::Kind kind )
+{
+   if ( itInArg == in.end() )
+   {
+      // Error: missing argument %d
+   }
+   else if ( (*itInArg)->kind_ != kind )
+   {
+      // Error: bad argument type
+   }
+   else
+   {
+      args_.push_back( **itInArg );
+   }
+}
+
+
+void 
+Path::invalidPath( const std::string &path, 
+                   int location )
+{
+   // Error: invalid path.
+}
+
+
+const Value &
+Path::resolve( const Value &root ) const
+{
+   const Value *node = &root;
+   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
+   {
+      const PathArgument &arg = *it;
+      if ( arg.kind_ == PathArgument::kindIndex )
+      {
+         if ( !node->isArray()  ||  node->isValidIndex( arg.index_ ) )
+         {
+            // Error: unable to resolve path (array value expected at position...
+         }
+         node = &((*node)[arg.index_]);
+      }
+      else if ( arg.kind_ == PathArgument::kindKey )
+      {
+         if ( !node->isObject() )
+         {
+            // Error: unable to resolve path (object value expected at position...)
+         }
+         node = &((*node)[arg.key_]);
+         if ( node == &Value::null )
+         {
+            // Error: unable to resolve path (object has no member named '' at position...)
+         }
+      }
+   }
+   return *node;
+}
+
+
+Value 
+Path::resolve( const Value &root, 
+               const Value &defaultValue ) const
+{
+   const Value *node = &root;
+   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
+   {
+      const PathArgument &arg = *it;
+      if ( arg.kind_ == PathArgument::kindIndex )
+      {
+         if ( !node->isArray()  ||  node->isValidIndex( arg.index_ ) )
+            return defaultValue;
+         node = &((*node)[arg.index_]);
+      }
+      else if ( arg.kind_ == PathArgument::kindKey )
+      {
+         if ( !node->isObject() )
+            return defaultValue;
+         node = &((*node)[arg.key_]);
+         if ( node == &Value::null )
+            return defaultValue;
+      }
+   }
+   return *node;
+}
+
+
+Value &
+Path::make( Value &root ) const
+{
+   Value *node = &root;
+   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
+   {
+      const PathArgument &arg = *it;
+      if ( arg.kind_ == PathArgument::kindIndex )
+      {
+         if ( !node->isArray() )
+         {
+            // Error: node is not an array at position ...
+         }
+         node = &((*node)[arg.index_]);
+      }
+      else if ( arg.kind_ == PathArgument::kindKey )
+      {
+         if ( !node->isObject() )
+         {
+            // Error: node is not an object at position...
+         }
+         node = &((*node)[arg.key_]);
+      }
+   }
+   return *node;
+}
+
+
+} // namespace Json
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: src/lib_json/json_value.cpp
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+// //////////////////////////////////////////////////////////////////////
+// Beginning of content of file: src/lib_json/json_writer.cpp
+// //////////////////////////////////////////////////////////////////////
+
+// Copyright 2007-2010 Baptiste Lepilleur
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#if !defined(JSON_IS_AMALGAMATION)
+# include <json/writer.h>
+# include "json_tool.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+#include <utility>
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+#include <iostream>
+#include <sstream>
+#include <iomanip>
+
+#if _MSC_VER >= 1400 // VC++ 8.0
+#pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
+#endif
+
+namespace Json {
+
+static bool containsControlCharacter( const char* str )
+{
+   while ( *str ) 
+   {
+      if ( isControlCharacter( *(str++) ) )
+         return true;
+   }
+   return false;
+}
+
+
+std::string valueToString( LargestInt value )
+{
+   UIntToStringBuffer buffer;
+   char *current = buffer + sizeof(buffer);
+   bool isNegative = value < 0;
+   if ( isNegative )
+      value = -value;
+   uintToString( LargestUInt(value), current );
+   if ( isNegative )
+      *--current = '-';
+   assert( current >= buffer );
+   return current;
+}
+
+
+std::string valueToString( LargestUInt value )
+{
+   UIntToStringBuffer buffer;
+   char *current = buffer + sizeof(buffer);
+   uintToString( value, current );
+   assert( current >= buffer );
+   return current;
+}
+
+#if defined(JSON_HAS_INT64)
+
+std::string valueToString( Int value )
+{
+   return valueToString( LargestInt(value) );
+}
+
+
+std::string valueToString( UInt value )
+{
+   return valueToString( LargestUInt(value) );
+}
+
+#endif // # if defined(JSON_HAS_INT64)
+
+
+std::string valueToString( double value )
+{
+   char buffer[32];
+#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with visual studio 2005 to avoid warning. 
+   sprintf_s(buffer, sizeof(buffer), "%#.16g", value); 
+#else	
+   snprintf(buffer, sizeof(buffer), "%#.16g", value);
+#endif
+   char* ch = buffer + strlen(buffer) - 1;
+   if (*ch != '0') return buffer; // nothing to truncate, so save time
+   while(ch > buffer && *ch == '0'){
+     --ch;
+   }
+   char* last_nonzero = ch;
+   while(ch >= buffer){
+     switch(*ch){
+     case '0':
+     case '1':
+     case '2':
+     case '3':
+     case '4':
+     case '5':
+     case '6':
+     case '7':
+     case '8':
+     case '9':
+       --ch;
+       continue;
+     case '.':
+       // Truncate zeroes to save bytes in output, but keep one.
+       *(last_nonzero+2) = '\0';
+       return buffer;
+     default:
+       return buffer;
+     }
+   }
+   return buffer;
+}
+
+
+std::string valueToString( bool value )
+{
+   return value ? "true" : "false";
+}
+
+std::string valueToQuotedString( const char *value )
+{
+   // Not sure how to handle unicode...
+   if (strpbrk(value, "\"\\\b\f\n\r\t") == NULL && !containsControlCharacter( value ))
+      return std::string("\"") + value + "\"";
+   // We have to walk value and escape any special characters.
+   // Appending to std::string is not efficient, but this should be rare.
+   // (Note: forward slashes are *not* rare, but I am not escaping them.)
+   std::string::size_type maxsize = strlen(value)*2 + 3; // allescaped+quotes+NULL
+   std::string result;
+   result.reserve(maxsize); // to avoid lots of mallocs
+   result += "\"";
+   for (const char* c=value; *c != 0; ++c)
+   {
+      switch(*c)
+      {
+         case '\"':
+            result += "\\\"";
+            break;
+         case '\\':
+            result += "\\\\";
+            break;
+         case '\b':
+            result += "\\b";
+            break;
+         case '\f':
+            result += "\\f";
+            break;
+         case '\n':
+            result += "\\n";
+            break;
+         case '\r':
+            result += "\\r";
+            break;
+         case '\t':
+            result += "\\t";
+            break;
+         //case '/':
+            // Even though \/ is considered a legal escape in JSON, a bare
+            // slash is also legal, so I see no reason to escape it.
+            // (I hope I am not misunderstanding something.
+            // blep notes: actually escaping \/ may be useful in javascript to avoid </ 
+            // sequence.
+            // Should add a flag to allow this compatibility mode and prevent this 
+            // sequence from occurring.
+         default:
+            if ( isControlCharacter( *c ) )
+            {
+               std::ostringstream oss;
+               oss << "\\u" << std::hex << std::uppercase << std::setfill('0') << std::setw(4) << static_cast<int>(*c);
+               result += oss.str();
+            }
+            else
+            {
+               result += *c;
+            }
+            break;
+      }
+   }
+   result += "\"";
+   return result;
+}
+
+// Class Writer
+// //////////////////////////////////////////////////////////////////
+Writer::~Writer()
+{
+}
+
+
+// Class FastWriter
+// //////////////////////////////////////////////////////////////////
+
+FastWriter::FastWriter()
+   : yamlCompatiblityEnabled_( false )
+{
+}
+
+
+void 
+FastWriter::enableYAMLCompatibility()
+{
+   yamlCompatiblityEnabled_ = true;
+}
+
+
+std::string 
+FastWriter::write( const Value &root )
+{
+   document_ = "";
+   writeValue( root );
+   document_ += "\n";
+   return document_;
+}
+
+
+void 
+FastWriter::writeValue( const Value &value )
+{
+   switch ( value.type() )
+   {
+   case nullValue:
+      document_ += "null";
+      break;
+   case intValue:
+      document_ += valueToString( value.asLargestInt() );
+      break;
+   case uintValue:
+      document_ += valueToString( value.asLargestUInt() );
+      break;
+   case realValue:
+      document_ += valueToString( value.asDouble() );
+      break;
+   case stringValue:
+      document_ += valueToQuotedString( value.asCString() );
+      break;
+   case booleanValue:
+      document_ += valueToString( value.asBool() );
+      break;
+   case arrayValue:
+      {
+         document_ += "[";
+         int size = value.size();
+         for ( int index =0; index < size; ++index )
+         {
+            if ( index > 0 )
+               document_ += ",";
+            writeValue( value[index] );
+         }
+         document_ += "]";
+      }
+      break;
+   case objectValue:
+      {
+         Value::Members members( value.getMemberNames() );
+         document_ += "{";
+         for ( Value::Members::iterator it = members.begin(); 
+               it != members.end(); 
+               ++it )
+         {
+            const std::string &name = *it;
+            if ( it != members.begin() )
+               document_ += ",";
+            document_ += valueToQuotedString( name.c_str() );
+            document_ += yamlCompatiblityEnabled_ ? ": " 
+                                                  : ":";
+            writeValue( value[name] );
+         }
+         document_ += "}";
+      }
+      break;
+   }
+}
+
+
+// Class StyledWriter
+// //////////////////////////////////////////////////////////////////
+
+StyledWriter::StyledWriter()
+   : rightMargin_( 74 )
+   , indentSize_( 3 )
+{
+}
+
+
+std::string 
+StyledWriter::write( const Value &root )
+{
+   document_ = "";
+   addChildValues_ = false;
+   indentString_ = "";
+   writeCommentBeforeValue( root );
+   writeValue( root );
+   writeCommentAfterValueOnSameLine( root );
+   document_ += "\n";
+   return document_;
+}
+
+
+void 
+StyledWriter::writeValue( const Value &value )
+{
+   switch ( value.type() )
+   {
+   case nullValue:
+      pushValue( "null" );
+      break;
+   case intValue:
+      pushValue( valueToString( value.asLargestInt() ) );
+      break;
+   case uintValue:
+      pushValue( valueToString( value.asLargestUInt() ) );
+      break;
+   case realValue:
+      pushValue( valueToString( value.asDouble() ) );
+      break;
+   case stringValue:
+      pushValue( valueToQuotedString( value.asCString() ) );
+      break;
+   case booleanValue:
+      pushValue( valueToString( value.asBool() ) );
+      break;
+   case arrayValue:
+      writeArrayValue( value);
+      break;
+   case objectValue:
+      {
+         Value::Members members( value.getMemberNames() );
+         if ( members.empty() )
+            pushValue( "{}" );
+         else
+         {
+            writeWithIndent( "{" );
+            indent();
+            Value::Members::iterator it = members.begin();
+            for (;;)
+            {
+               const std::string &name = *it;
+               const Value &childValue = value[name];
+               writeCommentBeforeValue( childValue );
+               writeWithIndent( valueToQuotedString( name.c_str() ) );
+               document_ += " : ";
+               writeValue( childValue );
+               if ( ++it == members.end() )
+               {
+                  writeCommentAfterValueOnSameLine( childValue );
+                  break;
+               }
+               document_ += ",";
+               writeCommentAfterValueOnSameLine( childValue );
+            }
+            unindent();
+            writeWithIndent( "}" );
+         }
+      }
+      break;
+   }
+}
+
+
+void 
+StyledWriter::writeArrayValue( const Value &value )
+{
+   unsigned size = value.size();
+   if ( size == 0 )
+      pushValue( "[]" );
+   else
+   {
+      bool isArrayMultiLine = isMultineArray( value );
+      if ( isArrayMultiLine )
+      {
+         writeWithIndent( "[" );
+         indent();
+         bool hasChildValue = !childValues_.empty();
+         unsigned index =0;
+         for (;;)
+         {
+            const Value &childValue = value[index];
+            writeCommentBeforeValue( childValue );
+            if ( hasChildValue )
+               writeWithIndent( childValues_[index] );
+            else
+            {
+               writeIndent();
+               writeValue( childValue );
+            }
+            if ( ++index == size )
+            {
+               writeCommentAfterValueOnSameLine( childValue );
+               break;
+            }
+            document_ += ",";
+            writeCommentAfterValueOnSameLine( childValue );
+         }
+         unindent();
+         writeWithIndent( "]" );
+      }
+      else // output on a single line
+      {
+         assert( childValues_.size() == size );
+         document_ += "[ ";
+         for ( unsigned index =0; index < size; ++index )
+         {
+            if ( index > 0 )
+               document_ += ", ";
+            document_ += childValues_[index];
+         }
+         document_ += " ]";
+      }
+   }
+}
+
+
+bool 
+StyledWriter::isMultineArray( const Value &value )
+{
+   int size = value.size();
+   bool isMultiLine = size*3 >= rightMargin_ ;
+   childValues_.clear();
+   for ( int index =0; index < size  &&  !isMultiLine; ++index )
+   {
+      const Value &childValue = value[index];
+      isMultiLine = isMultiLine  ||
+                     ( (childValue.isArray()  ||  childValue.isObject())  &&  
+                        childValue.size() > 0 );
+   }
+   if ( !isMultiLine ) // check if line length > max line length
+   {
+      childValues_.reserve( size );
+      addChildValues_ = true;
+      int lineLength = 4 + (size-1)*2; // '[ ' + ', '*n + ' ]'
+      for ( int index =0; index < size  &&  !isMultiLine; ++index )
+      {
+         writeValue( value[index] );
+         lineLength += int( childValues_[index].length() );
+         isMultiLine = isMultiLine  &&  hasCommentForValue( value[index] );
+      }
+      addChildValues_ = false;
+      isMultiLine = isMultiLine  ||  lineLength >= rightMargin_;
+   }
+   return isMultiLine;
+}
+
+
+void 
+StyledWriter::pushValue( const std::string &value )
+{
+   if ( addChildValues_ )
+      childValues_.push_back( value );
+   else
+      document_ += value;
+}
+
+
+void 
+StyledWriter::writeIndent()
+{
+   if ( !document_.empty() )
+   {
+      char last = document_[document_.length()-1];
+      if ( last == ' ' )     // already indented
+         return;
+      if ( last != '\n' )    // Comments may add new-line
+         document_ += '\n';
+   }
+   document_ += indentString_;
+}
+
+
+void 
+StyledWriter::writeWithIndent( const std::string &value )
+{
+   writeIndent();
+   document_ += value;
+}
+
+
+void 
+StyledWriter::indent()
+{
+   indentString_ += std::string( indentSize_, ' ' );
+}
+
+
+void 
+StyledWriter::unindent()
+{
+   assert( int(indentString_.size()) >= indentSize_ );
+   indentString_.resize( indentString_.size() - indentSize_ );
+}
+
+
+void 
+StyledWriter::writeCommentBeforeValue( const Value &root )
+{
+   if ( !root.hasComment( commentBefore ) )
+      return;
+   document_ += normalizeEOL( root.getComment( commentBefore ) );
+   document_ += "\n";
+}
+
+
+void 
+StyledWriter::writeCommentAfterValueOnSameLine( const Value &root )
+{
+   if ( root.hasComment( commentAfterOnSameLine ) )
+      document_ += " " + normalizeEOL( root.getComment( commentAfterOnSameLine ) );
+
+   if ( root.hasComment( commentAfter ) )
+   {
+      document_ += "\n";
+      document_ += normalizeEOL( root.getComment( commentAfter ) );
+      document_ += "\n";
+   }
+}
+
+
+bool 
+StyledWriter::hasCommentForValue( const Value &value )
+{
+   return value.hasComment( commentBefore )
+          ||  value.hasComment( commentAfterOnSameLine )
+          ||  value.hasComment( commentAfter );
+}
+
+
+std::string 
+StyledWriter::normalizeEOL( const std::string &text )
+{
+   std::string normalized;
+   normalized.reserve( text.length() );
+   const char *begin = text.c_str();
+   const char *end = begin + text.length();
+   const char *current = begin;
+   while ( current != end )
+   {
+      char c = *current++;
+      if ( c == '\r' ) // mac or dos EOL
+      {
+         if ( *current == '\n' ) // convert dos EOL
+            ++current;
+         normalized += '\n';
+      }
+      else // handle unix EOL & other char
+         normalized += c;
+   }
+   return normalized;
+}
+
+
+// Class StyledStreamWriter
+// //////////////////////////////////////////////////////////////////
+
+StyledStreamWriter::StyledStreamWriter( std::string indentation )
+   : document_(NULL)
+   , rightMargin_( 74 )
+   , indentation_( indentation )
+{
+}
+
+
+void
+StyledStreamWriter::write( std::ostream &out, const Value &root )
+{
+   document_ = &out;
+   addChildValues_ = false;
+   indentString_ = "";
+   writeCommentBeforeValue( root );
+   writeValue( root );
+   writeCommentAfterValueOnSameLine( root );
+   *document_ << "\n";
+   document_ = NULL; // Forget the stream, for safety.
+}
+
+
+void 
+StyledStreamWriter::writeValue( const Value &value )
+{
+   switch ( value.type() )
+   {
+   case nullValue:
+      pushValue( "null" );
+      break;
+   case intValue:
+      pushValue( valueToString( value.asLargestInt() ) );
+      break;
+   case uintValue:
+      pushValue( valueToString( value.asLargestUInt() ) );
+      break;
+   case realValue:
+      pushValue( valueToString( value.asDouble() ) );
+      break;
+   case stringValue:
+      pushValue( valueToQuotedString( value.asCString() ) );
+      break;
+   case booleanValue:
+      pushValue( valueToString( value.asBool() ) );
+      break;
+   case arrayValue:
+      writeArrayValue( value);
+      break;
+   case objectValue:
+      {
+         Value::Members members( value.getMemberNames() );
+         if ( members.empty() )
+            pushValue( "{}" );
+         else
+         {
+            writeWithIndent( "{" );
+            indent();
+            Value::Members::iterator it = members.begin();
+            for (;;)
+            {
+               const std::string &name = *it;
+               const Value &childValue = value[name];
+               writeCommentBeforeValue( childValue );
+               writeWithIndent( valueToQuotedString( name.c_str() ) );
+               *document_ << " : ";
+               writeValue( childValue );
+               if ( ++it == members.end() )
+               {
+                  writeCommentAfterValueOnSameLine( childValue );
+                  break;
+               }
+               *document_ << ",";
+               writeCommentAfterValueOnSameLine( childValue );
+            }
+            unindent();
+            writeWithIndent( "}" );
+         }
+      }
+      break;
+   }
+}
+
+
+void 
+StyledStreamWriter::writeArrayValue( const Value &value )
+{
+   unsigned size = value.size();
+   if ( size == 0 )
+      pushValue( "[]" );
+   else
+   {
+      bool isArrayMultiLine = isMultineArray( value );
+      if ( isArrayMultiLine )
+      {
+         writeWithIndent( "[" );
+         indent();
+         bool hasChildValue = !childValues_.empty();
+         unsigned index =0;
+         for (;;)
+         {
+            const Value &childValue = value[index];
+            writeCommentBeforeValue( childValue );
+            if ( hasChildValue )
+               writeWithIndent( childValues_[index] );
+            else
+            {
+               writeIndent();
+               writeValue( childValue );
+            }
+            if ( ++index == size )
+            {
+               writeCommentAfterValueOnSameLine( childValue );
+               break;
+            }
+            *document_ << ",";
+            writeCommentAfterValueOnSameLine( childValue );
+         }
+         unindent();
+         writeWithIndent( "]" );
+      }
+      else // output on a single line
+      {
+         assert( childValues_.size() == size );
+         *document_ << "[ ";
+         for ( unsigned index =0; index < size; ++index )
+         {
+            if ( index > 0 )
+               *document_ << ", ";
+            *document_ << childValues_[index];
+         }
+         *document_ << " ]";
+      }
+   }
+}
+
+
+bool 
+StyledStreamWriter::isMultineArray( const Value &value )
+{
+   int size = value.size();
+   bool isMultiLine = size*3 >= rightMargin_ ;
+   childValues_.clear();
+   for ( int index =0; index < size  &&  !isMultiLine; ++index )
+   {
+      const Value &childValue = value[index];
+      isMultiLine = isMultiLine  ||
+                     ( (childValue.isArray()  ||  childValue.isObject())  &&  
+                        childValue.size() > 0 );
+   }
+   if ( !isMultiLine ) // check if line length > max line length
+   {
+      childValues_.reserve( size );
+      addChildValues_ = true;
+      int lineLength = 4 + (size-1)*2; // '[ ' + ', '*n + ' ]'
+      for ( int index =0; index < size  &&  !isMultiLine; ++index )
+      {
+         writeValue( value[index] );
+         lineLength += int( childValues_[index].length() );
+         isMultiLine = isMultiLine  &&  hasCommentForValue( value[index] );
+      }
+      addChildValues_ = false;
+      isMultiLine = isMultiLine  ||  lineLength >= rightMargin_;
+   }
+   return isMultiLine;
+}
+
+
+void 
+StyledStreamWriter::pushValue( const std::string &value )
+{
+   if ( addChildValues_ )
+      childValues_.push_back( value );
+   else
+      *document_ << value;
+}
+
+
+void 
+StyledStreamWriter::writeIndent()
+{
+  /*
+    Some comments in this method would have been nice. ;-)
+
+   if ( !document_.empty() )
+   {
+      char last = document_[document_.length()-1];
+      if ( last == ' ' )     // already indented
+         return;
+      if ( last != '\n' )    // Comments may add new-line
+         *document_ << '\n';
+   }
+  */
+   *document_ << '\n' << indentString_;
+}
+
+
+void 
+StyledStreamWriter::writeWithIndent( const std::string &value )
+{
+   writeIndent();
+   *document_ << value;
+}
+
+
+void 
+StyledStreamWriter::indent()
+{
+   indentString_ += indentation_;
+}
+
+
+void 
+StyledStreamWriter::unindent()
+{
+   assert( indentString_.size() >= indentation_.size() );
+   indentString_.resize( indentString_.size() - indentation_.size() );
+}
+
+
+void 
+StyledStreamWriter::writeCommentBeforeValue( const Value &root )
+{
+   if ( !root.hasComment( commentBefore ) )
+      return;
+   *document_ << normalizeEOL( root.getComment( commentBefore ) );
+   *document_ << "\n";
+}
+
+
+void 
+StyledStreamWriter::writeCommentAfterValueOnSameLine( const Value &root )
+{
+   if ( root.hasComment( commentAfterOnSameLine ) )
+      *document_ << " " + normalizeEOL( root.getComment( commentAfterOnSameLine ) );
+
+   if ( root.hasComment( commentAfter ) )
+   {
+      *document_ << "\n";
+      *document_ << normalizeEOL( root.getComment( commentAfter ) );
+      *document_ << "\n";
+   }
+}
+
+
+bool 
+StyledStreamWriter::hasCommentForValue( const Value &value )
+{
+   return value.hasComment( commentBefore )
+          ||  value.hasComment( commentAfterOnSameLine )
+          ||  value.hasComment( commentAfter );
+}
+
+
+std::string 
+StyledStreamWriter::normalizeEOL( const std::string &text )
+{
+   std::string normalized;
+   normalized.reserve( text.length() );
+   const char *begin = text.c_str();
+   const char *end = begin + text.length();
+   const char *current = begin;
+   while ( current != end )
+   {
+      char c = *current++;
+      if ( c == '\r' ) // mac or dos EOL
+      {
+         if ( *current == '\n' ) // convert dos EOL
+            ++current;
+         normalized += '\n';
+      }
+      else // handle unix EOL & other char
+         normalized += c;
+   }
+   return normalized;
+}
+
+
+std::ostream& operator<<( std::ostream &sout, const Value &root )
+{
+   Json::StyledStreamWriter writer;
+   writer.write(sout, root);
+   return sout;
+}
+
+
+} // namespace Json
+
+// //////////////////////////////////////////////////////////////////////
+// End of content of file: src/lib_json/json_writer.cpp
+// //////////////////////////////////////////////////////////////////////
+
+
+
+
+
diff --git a/ext/common/Watchdog.cpp b/ext/common/Watchdog.cpp
deleted file mode 100644
index 4e681cd..0000000
--- a/ext/common/Watchdog.cpp
+++ /dev/null
@@ -1,1120 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-#include <oxt/thread.hpp>
-#include <oxt/system_calls.hpp>
-#include <boost/function.hpp>
-#include <boost/bind.hpp>
-#include <string>
-
-#include <sys/select.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <unistd.h>
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <cerrno>
-
-#include <Constants.h>
-#include <AgentBase.h>
-#include <ServerInstanceDir.h>
-#include <FileDescriptor.h>
-#include <Constants.h>
-#include <RandomGenerator.h>
-#include <Logging.h>
-#include <Exceptions.h>
-#include <StaticString.h>
-#include <ResourceLocator.h>
-#include <Utils.h>
-#include <Utils/Base64.h>
-#include <Utils/Timer.h>
-#include <Utils/ScopeGuard.h>
-#include <Utils/IOUtils.h>
-#include <Utils/MessageIO.h>
-#include <Utils/VariantMap.h>
-
-using namespace std;
-using namespace boost;
-using namespace oxt;
-using namespace Passenger;
-
-
-/** The options that were passed to AgentsStarter. */
-static VariantMap     agentsOptions;
-static string         webServerType;        // "apache" or "nginx"
-static unsigned int   logLevel;
-static pid_t   webServerPid;
-static string  tempDir;
-static bool    userSwitching;
-static string  defaultUser;
-static string  defaultGroup;
-static uid_t   webServerWorkerUid;
-static gid_t   webServerWorkerGid;
-static string  passengerRoot;
-static string  rubyCommand;
-static unsigned int maxPoolSize;
-static unsigned int maxInstancesPerApp;
-static unsigned int poolIdleTime;
-static string  serializedPrestartURLs;
-
-static string oldOomScore;
-static ServerInstanceDirPtr serverInstanceDir;
-static ServerInstanceDir::GenerationPtr generation;
-static string loggingAgentAddress;
-static string loggingAgentPassword;
-static RandomGenerator *randomGenerator;
-static EventFd *errorEvent;
-
-#define REQUEST_SOCKET_PASSWORD_SIZE     64
-
-static void setOomScore(const StaticString &score);
-
-
-/**
- * Abstract base class for watching agent processes.
- */
-class AgentWatcher {
-private:
-	/** The watcher thread. */
-	oxt::thread *thr;
-	
-	void threadMain() {
-		try {
-			pid_t pid, ret;
-			int status, e;
-			
-			while (!this_thread::interruption_requested()) {
-				{
-					lock_guard<boost::mutex> l(lock);
-					pid = this->pid;
-				}
-				
-				// Process can be started before the watcher thread is launched.
-				if (pid == 0) {
-					pid = start();
-				}
-				ret = syscalls::waitpid(pid, &status, 0);
-				if (ret == -1 && errno == ECHILD) {
-					/* If the agent is attached to gdb then waitpid()
-					 * here can return -1 with errno == ECHILD.
-					 * Fallback to kill() polling for checking
-					 * whether the agent is alive.
-					 */
-					ret = pid;
-					status = 0;
-					P_WARN("waitpid() on " << name() << " return -1 with " <<
-						"errno = ECHILD, falling back to kill polling");
-					waitpidUsingKillPolling(pid);
-					e = 0;
-				} else {
-					e = errno;
-				}
-				
-				{
-					lock_guard<boost::mutex> l(lock);
-					this->pid = 0;
-				}
-				
-				this_thread::disable_interruption di;
-				this_thread::disable_syscall_interruption dsi;
-				if (ret == -1) {
-					P_WARN(name() << " crashed or killed for "
-						"an unknown reason (errno = " <<
-						strerror(e) << "), restarting it...");
-				} else if (WIFEXITED(status)) {
-					if (WEXITSTATUS(status) == 0) {
-						/* When the web server is gracefully exiting, it will
-						 * tell one or more agents to gracefully exit with exit
-						 * status 0. If we see this then it means the watchdog
-						 * is gracefully shutting down too and we should stop
-						 * watching.
-						 */
-						return;
-					} else {
-						P_WARN(name() << " crashed with exit status " <<
-							WEXITSTATUS(status) << ", restarting it...");
-					}
-				} else {
-					P_WARN(name() << " crashed with signal " <<
-						getSignalName(WTERMSIG(status)) <<
-						", restarting it...");
-				}
-			}
-		} catch (const boost::thread_interrupted &) {
-		} catch (const tracable_exception &e) {
-			lock_guard<boost::mutex> l(lock);
-			threadExceptionMessage = e.what();
-			threadExceptionBacktrace = e.backtrace();
-			errorEvent->notify();
-		} catch (const std::exception &e) {
-			lock_guard<boost::mutex> l(lock);
-			threadExceptionMessage = e.what();
-			errorEvent->notify();
-		} catch (...) {
-			lock_guard<boost::mutex> l(lock);
-			threadExceptionMessage = "Unknown error";
-			errorEvent->notify();
-		}
-	}
-	
-protected:
-	/** PID of the process we're watching. 0 if no process is started at this time. */
-	pid_t pid;
-	
-	/** If the watcher thread threw an uncaught exception then its information will
-	 * be stored here so that the main thread can check whether a watcher encountered
-	 * an error. These are empty strings if everything is OK.
-	 */
-	string threadExceptionMessage;
-	string threadExceptionBacktrace;
-	
-	/** The agent process's feedback fd. */
-	FileDescriptor feedbackFd;
-	
-	/**
-	 * Lock for protecting the exchange of data between the main thread and
-	 * the watcher thread.
-	 */
-	mutable boost::mutex lock;
-	
-	/**
-	 * Returns the filename of the agent process's executable. This method may be
-	 * called in a forked child process and may therefore not allocate memory.
-	 */
-	virtual string getExeFilename() const = 0;
-	
-	/**
-	 * This method is to exec() the agent with the right arguments.
-	 * It is called from within a forked child process, so don't do any dynamic
-	 * memory allocations in here. It must also not throw any exceptions.
-	 * It must also preserve the value of errno after exec() is called.
-	 */
-	virtual void execProgram() const {
-		execl(getExeFilename().c_str(),
-			getExeFilename().c_str(),
-			"3",  // feedback fd
-			(char *) 0);
-	}
-	
-	/**
-	 * This method is to send startup arguments to the agent process through
-	 * the given file descriptor, which is the agent process's feedback fd.
-	 * May throw arbitrary exceptions.
-	 */
-	virtual void sendStartupArguments(pid_t pid, FileDescriptor &fd) = 0;
-	
-	/**
-	 * This method is to process the startup info that the agent process has
-	 * sent back. May throw arbitrary exceptions.
-	 */
-	virtual bool processStartupInfo(pid_t pid, FileDescriptor &fd, const vector<string> &args) = 0;
-	
-	/**
-	 * Kill a process with SIGKILL, and attempt to kill its children too. 
-	 * Then wait until it has quit.
-	 */
-	static void killAndWait(pid_t pid) {
-		this_thread::disable_interruption di;
-		this_thread::disable_syscall_interruption dsi;
-		// If the process is a process group leader then killing the
-		// group will likely kill all its child processes too.
-		if (syscalls::killpg(pid, SIGKILL) == -1) {
-			syscalls::kill(pid, SIGKILL);
-		}
-		syscalls::waitpid(pid, NULL, 0);
-	}
-	
-	/**
-	 * Behaves like <tt>waitpid(pid, status, WNOHANG)</tt>, but waits at most
-	 * <em>timeout</em> miliseconds for the process to exit.
-	 */
-	static int timedWaitPid(pid_t pid, int *status, unsigned long long timeout) {
-		Timer timer;
-		int ret;
-		
-		do {
-			ret = syscalls::waitpid(pid, status, WNOHANG);
-			if (ret > 0 || ret == -1) {
-				return ret;
-			} else {
-				syscalls::usleep(10000);
-			}
-		} while (timer.elapsed() < timeout);
-		return 0; // timed out
-	}
-	
-	static void waitpidUsingKillPolling(pid_t pid) {
-		bool done = false;
-		
-		while (!done) {
-			int ret = syscalls::kill(pid, 0);
-			done = ret == -1;
-			if (!done) {
-				syscalls::usleep(20000);
-			}
-		}
-	}
-	
-public:
-	AgentWatcher() {
-		thr = NULL;
-		pid = 0;
-	}
-	
-	virtual ~AgentWatcher() {
-		delete thr;
-	}
-	
-	/**
-	 * Send the started agent process's startup information over the given
-	 * file descriptor, to the starter process. May throw arbitrary exceptions.
-	 *
-	 * @pre start() has been called and succeeded.
-	 */
-	virtual void sendStartupInfo(int fd) = 0;
-	
-	/** Returns the name of the agent that this class is watching. */
-	virtual const char *name() const = 0;
-	
-	/**
-	 * Starts the agent process. May throw arbitrary exceptions.
-	 */
-	virtual pid_t start() {
-		this_thread::disable_interruption di;
-		this_thread::disable_syscall_interruption dsi;
-		string exeFilename = getExeFilename();
-		SocketPair fds;
-		int e, ret;
-		pid_t pid;
-		
-		/* Create feedback fd for this agent process. We'll send some startup
-		 * arguments to this agent process through this fd, and we'll receive
-		 * startup information through it as well.
-		 */
-		fds = createUnixSocketPair();
-		
-		pid = syscalls::fork();
-		if (pid == 0) {
-			// Child
-			
-			/* Make sure file descriptor FEEDBACK_FD refers to the newly created
-			 * feedback fd (fds[1]) and close all other file descriptors.
-			 * In this child process we don't care about the original FEEDBACK_FD
-			 * (which is the Watchdog's communication channel to the agents starter.)
-			 *
-			 * fds[1] is guaranteed to be != FEEDBACK_FD because the watchdog
-			 * is started with FEEDBACK_FD already assigned.
-			 */
-			syscalls::close(fds[0]);
-			
-			if (syscalls::dup2(fds[1], FEEDBACK_FD) == -1) {
-				/* Something went wrong, report error through feedback fd. */
-				e = errno;
-				try {
-					writeArrayMessage(fds[1],
-						"system error before exec",
-						"dup2() failed",
-						toString(e).c_str(),
-						NULL);
-					_exit(1);
-				} catch (...) {
-					fprintf(stderr, "Passenger Watchdog: dup2() failed: %s (%d)\n",
-						strerror(e), e);
-					fflush(stderr);
-					_exit(1);
-				}
-			}
-			
-			closeAllFileDescriptors(FEEDBACK_FD);
-			
-			/* Become the process group leader so that the watchdog can kill the
-			 * agent as well as all its descendant processes. */
-			setpgid(getpid(), getpid());
-			
-			setOomScore(oldOomScore);
-			
-			try {
-				execProgram();
-			} catch (...) {
-				fprintf(stderr, "PassengerWatchdog: execProgram() threw an exception\n");
-				fflush(stderr);
-				_exit(1);
-			}
-			e = errno;
-			try {
-				writeArrayMessage(FEEDBACK_FD,
-					"exec error",
-					toString(e).c_str(),
-					NULL);
-			} catch (...) {
-				fprintf(stderr, "Passenger Watchdog: could not execute %s: %s (%d)\n",
-					exeFilename.c_str(), strerror(e), e);
-				fflush(stderr);
-			}
-			_exit(1);
-		} else if (pid == -1) {
-			// Error
-			e = errno;
-			throw SystemException("Cannot fork a new process", e);
-		} else {
-			// Parent
-			FileDescriptor feedbackFd = fds[0];
-			vector<string> args;
-			
-			fds[1].close();
-			this_thread::restore_interruption ri(di);
-			this_thread::restore_syscall_interruption rsi(dsi);
-			ScopeGuard failGuard(boost::bind(killAndWait, pid));
-			
-			/* Send startup arguments. Ignore EPIPE and ECONNRESET here
-			 * because the child process might have sent an feedback message
-			 * without reading startup arguments.
-			 */
-			try {
-				sendStartupArguments(pid, feedbackFd);
-			} catch (const SystemException &ex) {
-				if (ex.code() != EPIPE && ex.code() != ECONNRESET) {
-					throw SystemException(string("Unable to start the ") + name() +
-						": an error occurred while sending startup arguments",
-						ex.code());
-				}
-			}
-			
-			// Now read its feedback.
-			try {
-				ret = readArrayMessage(feedbackFd, args);
-			} catch (const SystemException &e) {
-				if (e.code() == ECONNRESET) {
-					ret = false;
-				} else {
-					throw SystemException(string("Unable to start the ") + name() +
-						": unable to read its startup information",
-						e.code());
-				}
-			}
-			if (!ret) {
-				this_thread::disable_interruption di2;
-				this_thread::disable_syscall_interruption dsi2;
-				int status;
-				
-				/* The feedback fd was prematurely closed for an unknown reason.
-				 * Did the agent process crash?
-				 *
-				 * We use timedWaitPid() here because if the process crashed
-				 * because of an uncaught exception, the file descriptor
-				 * might be closed before the process has printed an error
-				 * message, so we give it some time to print the error
-				 * before we kill it.
-				 */
-				ret = timedWaitPid(pid, &status, 5000);
-				if (ret == 0) {
-					/* Doesn't look like it; it seems it's still running.
-					 * We can't do anything without proper feedback so kill
-					 * the agent process and throw an exception.
-					 */
-					failGuard.runNow();
-					throw RuntimeException(string("Unable to start the ") + name() +
-						": it froze and reported an unknown error during its startup");
-				} else if (ret != -1 && WIFSIGNALED(status)) {
-					/* Looks like a crash which caused a signal. */
-					throw RuntimeException(string("Unable to start the ") + name() +
-						": it seems to have been killed with signal " +
-						getSignalName(WTERMSIG(status)) + " during startup");
-				} else if (ret == -1) {
-					/* Looks like it exited after detecting an error. */
-					throw RuntimeException(string("Unable to start the ") + name() +
-						": it seems to have crashed during startup for an unknown reason");
-				} else {
-					/* Looks like it exited after detecting an error, but has an exit code. */
-					throw RuntimeException(string("Unable to start the ") + name() +
-						": it seems to have crashed during startup for an unknown reason, "
-						"with exit code " + toString(WEXITSTATUS(status)));
-				}
-			}
-			
-			if (args[0] == "system error before exec") {
-				throw SystemException(string("Unable to start the ") + name() +
-					": " + args[1], atoi(args[2]));
-			} else if (args[0] == "exec error") {
-				e = atoi(args[1]);
-				if (e == ENOENT) {
-					throw RuntimeException(string("Unable to start the ") + name() +
-						" because its executable (" + getExeFilename() + ") "
-						"doesn't exist. This probably means that your "
-						"Phusion Passenger installation is broken or "
-						"incomplete. Please reinstall Phusion Passenger");
-				} else {
-					throw SystemException(string("Unable to start the ") + name() +
-						" because exec(\"" + getExeFilename() + "\") failed",
-						atoi(args[1]));
-				}
-			} else if (!processStartupInfo(pid, feedbackFd, args)) {
-				throw RuntimeException(string("The ") + name() +
-					" sent an unknown startup info message '" +
-					args[0] + "'");
-			}
-			
-			lock_guard<boost::mutex> l(lock);
-			this->feedbackFd = feedbackFd;
-			this->pid = pid;
-			failGuard.clear();
-			return pid;
-		}
-	}
-	
-	/**
-	 * Start watching the agent process.
-	 *
-	 * @pre start() has been called and succeeded.
-	 * @pre This watcher isn't already watching.
-	 * @throws RuntimeException If a precondition failed.
-	 * @throws thread_interrupted
-	 * @throws thread_resource_error
-	 */
-	virtual void startWatching() {
-		lock_guard<boost::mutex> l(lock);
-		if (pid == 0) {
-			throw RuntimeException("start() hasn't been called yet");
-		}
-		if (thr != NULL) {
-			throw RuntimeException("Already started watching.");
-		}
-		
-		/* Don't make the stack any smaller, getpwnam() on OS
-		 * X needs a lot of stack space.
-		 */
-		thr = new oxt::thread(boost::bind(&AgentWatcher::threadMain, this),
-			name(), 64 * 1024);
-	}
-	
-	static void stopWatching(vector<AgentWatcher *> &watchers) {
-		vector<AgentWatcher *>::const_iterator it;
-		oxt::thread *threads[watchers.size()];
-		unsigned int i = 0;
-		
-		for (it = watchers.begin(); it != watchers.end(); it++, i++) {
-			threads[i] = (*it)->thr;
-		}
-		
-		oxt::thread::interrupt_and_join_multiple(threads, watchers.size());
-	}
-	
-	/**
-	 * Force the agent process to shut down. Returns true if it was shut down,
-	 * or false if it wasn't started.
-	 */
-	virtual bool forceShutdown() {
-		lock_guard<boost::mutex> l(lock);
-		if (pid == 0) {
-			return false;
-		} else {
-			killAndWait(pid);
-			this->pid = 0;
-			return true;
-		}
-	}
-	
-	/**
-	 * If the watcher thread has encountered an error, then the error message
-	 * will be stored here. If the error message is empty then it means
-	 * everything is still OK.
-	 */
-	string getErrorMessage() const {
-		lock_guard<boost::mutex> l(lock);
-		return threadExceptionMessage;
-	}
-	
-	/**
-	 * The error backtrace, if applicable.
-	 */
-	string getErrorBacktrace() const {
-		lock_guard<boost::mutex> l(lock);
-		return threadExceptionBacktrace;
-	}
-	
-	/**
-	 * Returns the agent process feedback fd, or -1 if the agent process
-	 * hasn't been started yet. Can be used to check whether this agent process
-	 * has exited without using waitpid().
-	 */
-	const FileDescriptor getFeedbackFd() const {
-		lock_guard<boost::mutex> l(lock);
-		return feedbackFd;
-	}
-};
-
-
-class HelperAgentWatcher: public AgentWatcher {
-protected:
-	string requestSocketFilename;
-	string messageSocketFilename;
-	string helperAgentFilename;
-	string requestSocketPassword;
-	string messageSocketPassword;
-	
-	virtual const char *name() const {
-		return "Phusion Passenger helper agent";
-	}
-	
-	virtual string getExeFilename() const {
-		return helperAgentFilename;
-	}
-	
-	virtual void execProgram() const {
-		execl(helperAgentFilename.c_str(), "PassengerHelperAgent", (char *) 0);
-	}
-	
-	virtual void sendStartupArguments(pid_t pid, FileDescriptor &fd) {
-		VariantMap options = agentsOptions;
-		options.set("request_socket_password", Base64::encode(requestSocketPassword)).
-			set("message_socket_password", Base64::encode(messageSocketPassword)).
-			set("logging_agent_address", loggingAgentAddress).
-			set("logging_agent_password", loggingAgentPassword);
-		options.writeToFd(fd);
-	}
-	
-	virtual bool processStartupInfo(pid_t pid, FileDescriptor &fd, const vector<string> &args) {
-		if (args[0] == "initialized") {
-			requestSocketFilename = args[1];
-			messageSocketFilename = args[2];
-			return true;
-		} else {
-			return false;
-		}
-	}
-	
-public:
-	HelperAgentWatcher(const ResourceLocator &resourceLocator) {
-		if (agentsOptions.get("web_server_type") == "apache") {
-			helperAgentFilename = resourceLocator.getAgentsDir() + "/apache2/PassengerHelperAgent";
-		} else {
-			helperAgentFilename = resourceLocator.getAgentsDir() + "/nginx/PassengerHelperAgent";
-		}
-		requestSocketPassword = randomGenerator->generateByteString(REQUEST_SOCKET_PASSWORD_SIZE);
-		messageSocketPassword = randomGenerator->generateByteString(MESSAGE_SERVER_MAX_PASSWORD_SIZE);
-	}
-	
-	virtual void sendStartupInfo(int fd) {
-		writeArrayMessage(fd,
-			"HelperAgent info",
-			requestSocketFilename.c_str(),
-			Base64::encode(requestSocketPassword).c_str(),
-			messageSocketFilename.c_str(),
-			Base64::encode(messageSocketPassword).c_str(),
-			NULL);
-	}
-};
-
-
-class LoggingAgentWatcher: public AgentWatcher {
-protected:
-	string agentFilename;
-	string socketAddress;
-	
-	virtual const char *name() const {
-		return "Phusion Passenger logging agent";
-	}
-	
-	virtual string getExeFilename() const {
-		return agentFilename;
-	}
-	
-	virtual void execProgram() const {
-		execl(agentFilename.c_str(), "PassengerLoggingAgent", (char *) 0);
-	}
-	
-	virtual void sendStartupArguments(pid_t pid, FileDescriptor &fd) {
-		VariantMap options = agentsOptions;
-		options.set("logging_agent_address", loggingAgentAddress);
-		options.set("logging_agent_password", loggingAgentPassword);
-		options.writeToFd(fd);
-	}
-	
-	virtual bool processStartupInfo(pid_t pid, FileDescriptor &fd, const vector<string> &args) {
-		if (args[0] == "initialized") {
-			return true;
-		} else {
-			return false;
-		}
-	}
-	
-public:
-	LoggingAgentWatcher(const ResourceLocator &resourceLocator) {
-		agentFilename = resourceLocator.getAgentsDir() + "/PassengerLoggingAgent";
-	}
-	
-	virtual void sendStartupInfo(int fd) {
-		writeArrayMessage(fd,
-			"LoggingServer info",
-			loggingAgentAddress.c_str(),
-			loggingAgentPassword.c_str(),
-			NULL);
-	}
-};
-
-
-/**
- * Touch all files in the server instance dir every 6 hours in order to prevent /tmp
- * cleaners from weaking havoc:
- * http://code.google.com/p/phusion-passenger/issues/detail?id=365
- */
-class ServerInstanceDirToucher {
-private:
-	oxt::thread *thr;
-	
-	static void
-	threadMain() {
-		while (!this_thread::interruption_requested()) {
-			syscalls::sleep(60 * 60 * 6);
-			
-			begin_touch:
-			
-			this_thread::disable_interruption di;
-			this_thread::disable_syscall_interruption dsi;
-			// Fork a process which touches everything in the server instance dir.
-			pid_t pid = syscalls::fork();
-			if (pid == 0) {
-				// Child
-				int prio, ret, e;
-				
-				closeAllFileDescriptors(2);
-				
-				// Make process nicer.
-				do {
-					prio = getpriority(PRIO_PROCESS, getpid());
-				} while (prio == -1 && errno == EINTR);
-				if (prio != -1) {
-					prio++;
-					if (prio > 20) {
-						prio = 20;
-					}
-					do {
-						ret = setpriority(PRIO_PROCESS, getpid(), prio);
-					} while (ret == -1 && errno == EINTR);
-				} else {
-					perror("getpriority");
-				}
-				
-				do {
-					ret = chdir(serverInstanceDir->getPath().c_str());
-				} while (ret == -1 && errno == EINTR);
-				if (ret == -1) {
-					e = errno;
-					fprintf(stderr, "chdir(\"%s\") failed: %s (%d)\n",
-						serverInstanceDir->getPath().c_str(),
-						strerror(e), e);
-					fflush(stderr);
-					_exit(1);
-				}
-				
-				setOomScore(oldOomScore);
-				
-				execlp("/bin/sh", "/bin/sh", "-c", "find . | xargs touch", (char *) 0);
-				e = errno;
-				fprintf(stderr, "Cannot execute 'find . | xargs touch': %s (%d)\n",
-					strerror(e), e);
-				fflush(stderr);
-				_exit(1);
-			} else if (pid == -1) {
-				// Error
-				P_WARN("Could not touch the server instance directory because "
-					"fork() failed. Retrying in 2 minutes...");
-				this_thread::restore_interruption si(di);
-				this_thread::restore_syscall_interruption rsi(dsi);
-				syscalls::sleep(60 * 2);
-				goto begin_touch;
-			} else {
-				syscalls::waitpid(pid, NULL, 0);
-			}
-		}
-	}
-
-public:
-	ServerInstanceDirToucher() {
-		thr = new oxt::thread(threadMain, "Server instance dir toucher", 96 * 1024);
-	}
-	
-	~ServerInstanceDirToucher() {
-		thr->interrupt_and_join();
-		delete thr;
-	}
-};
-
-
-enum OomFileType {
-	OOM_ADJ,
-	OOM_SCORE_ADJ
-};
-
-static FILE *
-openOomAdjFile(const char *mode, OomFileType &type) {
-	FILE *f = fopen("/proc/self/oom_score_adj", mode);
-	if (f == NULL) {
-		f = fopen("/proc/self/oom_adj", mode);
-		if (f == NULL) {
-			return NULL;
-		} else {
-			type = OOM_ADJ;
-			return f;
-		}
-	} else {
-		type = OOM_SCORE_ADJ;
-		return f;
-	}
-}
-
-/**
- * Linux-only way to change OOM killer configuration for
- * current process. Requires root privileges, which we
- * should have.
- */
-static void
-setOomScore(const StaticString &score) {
-	if (score.empty()) {
-		return;
-	}
-
-	FILE *f;
-	OomFileType type;
-	
-	f = openOomAdjFile("r", type);
-	if (f != NULL) {
-		fwrite(score.data(), 1, score.size(), f);
-		fclose(f);
-	}
-}
-
-static string
-setOomScoreNeverKill() {
-	string oldScore;
-	FILE *f;
-	OomFileType type;
-	
-	f = openOomAdjFile("r", type);
-	if (f == NULL) {
-		return "";
-	}
-	char buf[1024];
-	size_t bytesRead;
-	while (true) {
-		bytesRead = fread(buf, 1, sizeof(buf), f);
-		if (bytesRead == 0 && feof(f)) {
-			break;
-		} else if (bytesRead == 0 && ferror(f)) {
-			fclose(f);
-			return "";
-		} else {
-			oldScore.append(buf, bytesRead);
-		}
-	}
-	fclose(f);
-	
-	f = openOomAdjFile("w", type);
-	if (f == NULL) {
-		return "";
-	}
-	if (type == OOM_SCORE_ADJ) {
-		fprintf(f, "-1000\n");
-	} else {
-		assert(type == OOM_ADJ);
-		fprintf(f, "-17\n");
-	}
-	fclose(f);
-	
-	return oldScore;
-}
-
-/**
- * Wait until the starter process has exited or sent us an exit command,
- * or until one of the watcher threads encounter an error. If a thread
- * encountered an error then the error message will be printed.
- *
- * Returns whether this watchdog should exit gracefully, which is only the
- * case if the web server sent us an exit command and no thread encountered
- * an error.
- */
-static bool
-waitForStarterProcessOrWatchers(vector<AgentWatcher *> &watchers) {
-	fd_set fds;
-	int max, ret;
-	char x;
-	
-	FD_ZERO(&fds);
-	FD_SET(FEEDBACK_FD, &fds);
-	FD_SET(errorEvent->fd(), &fds);
-	
-	if (FEEDBACK_FD > errorEvent->fd()) {
-		max = FEEDBACK_FD;
-	} else {
-		max = errorEvent->fd();
-	}
-	
-	ret = syscalls::select(max + 1, &fds, NULL, NULL, NULL);
-	if (ret == -1) {
-		int e = errno;
-		P_ERROR("select() failed: " << strerror(e));
-		return false;
-	}
-	
-	if (FD_ISSET(errorEvent->fd(), &fds)) {
-		vector<AgentWatcher *>::const_iterator it;
-		string message, backtrace, watcherName;
-		
-		for (it = watchers.begin(); it != watchers.end() && message.empty(); it++) {
-			message   = (*it)->getErrorMessage();
-			backtrace = (*it)->getErrorBacktrace();
-			watcherName = (*it)->name();
-		}
-		
-		if (!message.empty() && backtrace.empty()) {
-			P_ERROR("Error in " << watcherName << " watcher:\n  " << message);
-		} else if (!message.empty() && !backtrace.empty()) {
-			P_ERROR("Error in " << watcherName << " watcher:\n  " <<
-				message << "\n" << backtrace);
-		}
-		return false;
-	} else {
-		ret = syscalls::read(FEEDBACK_FD, &x, 1);
-		return ret == 1 && x == 'c';
-	}
-}
-
-static void
-cleanupAgentsInBackground(vector<AgentWatcher *> &watchers) {
-	this_thread::disable_interruption di;
-	this_thread::disable_syscall_interruption dsi;
-	pid_t pid;
-	int e;
-	
-	pid = fork();
-	if (pid == 0) {
-		// Child
-		vector<AgentWatcher *>::const_iterator it;
-		Timer timer(false);
-		fd_set fds, fds2;
-		int max, agentProcessesDone;
-		unsigned long long deadline = 30000; // miliseconds
-		
-		// Wait until all agent processes have exited.
-		
-		max = 0;
-		FD_ZERO(&fds);
-		for (it = watchers.begin(); it != watchers.end(); it++) {
-			FD_SET((*it)->getFeedbackFd(), &fds);
-			if ((*it)->getFeedbackFd() > max) {
-				max = (*it)->getFeedbackFd();
-			}
-		}
-		
-		timer.start();
-		agentProcessesDone = 0;
-		while (agentProcessesDone != -1
-		    && agentProcessesDone < (int) watchers.size()
-		    && timer.elapsed() < deadline)
-		{
-			struct timeval timeout;
-			
-			#ifdef FD_COPY
-				FD_COPY(&fds, &fds2);
-			#else
-				FD_ZERO(&fds2);
-				for (it = watchers.begin(); it != watchers.end(); it++) {
-					FD_SET((*it)->getFeedbackFd(), &fds2);
-				}
-			#endif
-			
-			timeout.tv_sec = 0;
-			timeout.tv_usec = 10000;
-			agentProcessesDone = syscalls::select(max + 1, &fds2, NULL, NULL, &timeout);
-			if (agentProcessesDone > 0 && timer.elapsed() < deadline) {
-				usleep(10000);
-			}
-		}
-		
-		if (agentProcessesDone == -1 || timer.elapsed() >= deadline) {
-			// An error occurred or we've waited long enough. Kill all the
-			// processes.
-			P_WARN("Some Phusion Passenger agent processes did not exit " <<
-				"in time, forcefully shutting down all.");
-			for (it = watchers.begin(); it != watchers.end(); it++) {
-				(*it)->forceShutdown();
-			}
-		} else {
-			P_DEBUG("All Phusion Passenger agent processes have exited.");
-		}
-		
-		// Now clean up the server instance directory.
-		delete generation.get();
-		delete serverInstanceDir.get();
-		
-		_exit(0);
-		
-	} else if (pid == -1) {
-		// Error
-		e = errno;
-		throw SystemException("fork() failed", e);
-		
-	} else {
-		// Parent
-		
-		// Let child process handle cleanup.
-		serverInstanceDir->detach();
-		generation->detach();
-	}
-}
-
-static void
-forceAllAgentsShutdown(vector<AgentWatcher *> &watchers) {
-	vector<AgentWatcher *>::iterator it;
-	
-	for (it = watchers.begin(); it != watchers.end(); it++) {
-		(*it)->forceShutdown();
-	}
-}
-
-int
-main(int argc, char *argv[]) {
-	/*
-	 * Most operating systems overcommit memory. We *know* that this watchdog process
-	 * doesn't use much memory; on OS X it uses about 200 KB of private RSS. If the
-	 * watchdog is killed by the system Out-Of-Memory Killer or then it's all over:
-	 * the system administrator will have to restart the web server for Phusion
-	 * Passenger to be usable again. So here we disable Linux's OOM killer
-	 * for this watchdog. Note that the OOM score is inherited by child processes
-	 * so we need to restore it after each fork().
-	 */
-	oldOomScore = setOomScoreNeverKill();
-	
-	agentsOptions = initializeAgent(argc, argv, "PassengerWatchdog");
-	logLevel      = agentsOptions.getInt("log_level");
-	webServerPid  = agentsOptions.getPid("web_server_pid");
-	tempDir       = agentsOptions.get("temp_dir");
-	userSwitching = agentsOptions.getBool("user_switching");
-	defaultUser   = agentsOptions.get("default_user");
-	defaultGroup  = agentsOptions.get("default_group");
-	webServerWorkerUid = agentsOptions.getUid("web_server_worker_uid");
-	webServerWorkerGid = agentsOptions.getGid("web_server_worker_gid");
-	passengerRoot = agentsOptions.get("passenger_root");
-	rubyCommand   = agentsOptions.get("ruby");
-	maxPoolSize        = agentsOptions.getInt("max_pool_size");
-	maxInstancesPerApp = agentsOptions.getInt("max_instances_per_app");
-	poolIdleTime       = agentsOptions.getInt("pool_idle_time");
-	serializedPrestartURLs  = agentsOptions.get("prestart_urls");
-	
-	try {
-		randomGenerator = new RandomGenerator();
-		errorEvent = new EventFd();
-		
-		serverInstanceDir.reset(new ServerInstanceDir(webServerPid, tempDir));
-		generation = serverInstanceDir->newGeneration(userSwitching, defaultUser,
-			defaultGroup, webServerWorkerUid, webServerWorkerGid);
-		agentsOptions.set("server_instance_dir", serverInstanceDir->getPath());
-		agentsOptions.setInt("generation_number", generation->getNumber());
-		
-		ServerInstanceDirToucher serverInstanceDirToucher;
-		ResourceLocator resourceLocator(passengerRoot);
-		if (agentsOptions.get("analytics_server", false).empty()) {
-			// Using local, server instance specific logging agent.
-			loggingAgentAddress  = "unix:" + generation->getPath() + "/logging.socket";
-			loggingAgentPassword = randomGenerator->generateAsciiString(64);
-		} else {
-			// Using remote logging agent.
-			loggingAgentAddress = agentsOptions.get("analytics_server");
-		}
-		
-		HelperAgentWatcher helperAgentWatcher(resourceLocator);
-		LoggingAgentWatcher loggingAgentWatcher(resourceLocator);
-		
-		vector<AgentWatcher *> watchers;
-		vector<AgentWatcher *>::iterator it;
-		watchers.push_back(&helperAgentWatcher);
-		if (agentsOptions.get("analytics_server", false).empty()) {
-			watchers.push_back(&loggingAgentWatcher);
-		}
-		
-		for (it = watchers.begin(); it != watchers.end(); it++) {
-			try {
-				(*it)->start();
-			} catch (const std::exception &e) {
-				writeArrayMessage(FEEDBACK_FD,
-					"Watchdog startup error",
-					e.what(),
-					NULL);
-				forceAllAgentsShutdown(watchers);
-				return 1;
-			}
-			// Allow other exceptions to propagate and crash the watchdog.
-		}
-		for (it = watchers.begin(); it != watchers.end(); it++) {
-			try {
-				(*it)->startWatching();
-			} catch (const std::exception &e) {
-				writeArrayMessage(FEEDBACK_FD,
-					"Watchdog startup error",
-					e.what(),
-					NULL);
-				forceAllAgentsShutdown(watchers);
-				return 1;
-			}
-			// Allow other exceptions to propagate and crash the watchdog.
-		}
-		
-		writeArrayMessage(FEEDBACK_FD,
-			"Basic startup info",
-			serverInstanceDir->getPath().c_str(),
-			toString(generation->getNumber()).c_str(),
-			NULL);
-		
-		for (it = watchers.begin(); it != watchers.end(); it++) {
-			(*it)->sendStartupInfo(FEEDBACK_FD);
-		}
-		
-		writeArrayMessage(FEEDBACK_FD, "All agents started", NULL);
-		
-		this_thread::disable_interruption di;
-		this_thread::disable_syscall_interruption dsi;
-		bool exitGracefully = waitForStarterProcessOrWatchers(watchers);
-		AgentWatcher::stopWatching(watchers);
-		if (exitGracefully) {
-			/* Fork a child process which cleans up all the agent processes in
-			 * the background and exit this watchdog process so that we don't block
-			 * the web server.
-			 */
-			cleanupAgentsInBackground(watchers);
-			return 0;
-		} else {
-			P_DEBUG("Web server did not exit gracefully, forcing shutdown of all service processes...");
-			forceAllAgentsShutdown(watchers);
-			return 1;
-		}
-	} catch (const tracable_exception &e) {
-		P_ERROR(e.what() << "\n" << e.backtrace());
-		return 1;
-	} catch (const std::exception &e) {
-		P_ERROR(e.what());
-		return 1;
-	}
-}
diff --git a/ext/common/agents/Base.cpp b/ext/common/agents/Base.cpp
new file mode 100644
index 0000000..b448480
--- /dev/null
+++ b/ext/common/agents/Base.cpp
@@ -0,0 +1,1580 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _GNU_SOURCE
+	#define _GNU_SOURCE
+#endif
+
+#include <oxt/initialize.hpp>
+#include <oxt/system_calls.hpp>
+#include <oxt/backtrace.hpp>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/select.h>
+#ifdef __linux__
+	#include <sys/syscall.h>
+	#include <features.h>
+#endif
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cerrno>
+#include <cassert>
+#include <fcntl.h>
+#include <poll.h>
+#include <unistd.h>
+#include <signal.h>
+#include <libgen.h>
+
+#if defined(__APPLE__) || defined(__linux__)
+	#define LIBC_HAS_BACKTRACE_FUNC
+#endif
+#ifdef LIBC_HAS_BACKTRACE_FUNC
+	#include <execinfo.h>
+#endif
+
+#include <string>
+#include <vector>
+
+#include <agents/Base.h>
+#include <Constants.h>
+#include <Exceptions.h>
+#include <Logging.h>
+#include <ResourceLocator.h>
+#include <Utils.h>
+#include <Utils/StrIntUtils.h>
+#ifdef __linux__
+	#include <ResourceLocator.h>
+#endif
+
+namespace Passenger {
+
+
+using namespace std;
+
+
+struct AbortHandlerState {
+	pid_t pid;
+	int signo;
+	siginfo_t *info;
+	char messagePrefix[32];
+	char messageBuf[1024];
+};
+
+typedef void (*Callback)(AbortHandlerState &state, void *userData);
+
+
+static bool _feedbackFdAvailable = false;
+static const char digits[] = {
+	'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'
+};
+static const char hex_chars[] = "01234567890abcdef";
+
+static bool shouldDumpWithCrashWatch = true;
+static bool beepOnAbort = false;
+static bool stopOnAbort = false;
+
+// Pre-allocate an alternative stack for use in signal handlers in case
+// the normal stack isn't usable.
+static char *alternativeStack;
+static unsigned int alternativeStackSize;
+
+static volatile unsigned int abortHandlerCalled = 0;
+static unsigned int randomSeed = 0;
+static const char *argv0 = NULL;
+static const char *backtraceSanitizerCommand = NULL;
+static bool backtraceSanitizerPassProgramInfo = true;
+static DiagnosticsDumper customDiagnosticsDumper = NULL;
+static void *customDiagnosticsDumperUserData;
+
+// We preallocate a few pipes during startup which we will close in the
+// crash handler. This way we can be sure that when the crash handler
+// calls pipe() it won't fail with "Too many files".
+static int emergencyPipe1[2] = { -1, -1 };
+static int emergencyPipe2[2] = { -1, -1 };
+
+// If assert() failed, its information is stored here.
+static struct {
+	const char *filename;
+	const char *function; // May be NULL.
+	const char *expression;
+	unsigned int line;
+} lastAssertionFailure;
+
+
+static void
+ignoreSigpipe() {
+	struct sigaction action;
+	action.sa_handler = SIG_IGN;
+	action.sa_flags   = 0;
+	sigemptyset(&action.sa_mask);
+	sigaction(SIGPIPE, &action, NULL);
+}
+
+static bool
+hasEnvOption(const char *name, bool defaultValue = false) {
+	const char *value = getenv(name);
+	if (value != NULL) {
+		if (*value != '\0') {
+			return strcmp(value, "yes") == 0
+				|| strcmp(value, "y") == 0
+				|| strcmp(value, "1") == 0
+				|| strcmp(value, "on") == 0
+				|| strcmp(value, "true") == 0;
+		} else {
+			return defaultValue;
+		}
+	} else {
+		return defaultValue;
+	}
+}
+
+// No idea whether strlen() is async signal safe, but let's not risk it
+// and write our own version instead that's guaranteed to be safe.
+static size_t
+safeStrlen(const char *str) {
+	size_t size = 0;
+	while (*str != '\0') {
+		str++;
+		size++;
+	}
+	return size;
+}
+
+// Async-signal safe way to print to stderr.
+static void
+safePrintErr(const char *message) {
+	write(STDERR_FILENO, message, strlen(message));
+}
+
+// Must be async signal safe.
+static char *
+appendText(char *buf, const char *text) {
+	size_t len = safeStrlen(text);
+	strcpy(buf, text);
+	return buf + len;
+}
+
+// Must be async signal safe.
+static void
+reverse(char *str, size_t len) {
+	char *p1, *p2;
+	if (*str == '\0') {
+		return;
+	}
+	for (p1 = str, p2 = str + len - 1; p2 > p1; ++p1, --p2) {
+		*p1 ^= *p2;
+		*p2 ^= *p1;
+		*p1 ^= *p2;
+	}
+}
+
+// Must be async signal safe.
+static char *
+appendULL(char *buf, unsigned long long value) {
+	unsigned long long remainder = value;
+	unsigned int size = 0;
+
+	do {
+		buf[size] = digits[remainder % 10];
+		remainder = remainder / 10;
+		size++;
+	} while (remainder != 0);
+	
+	reverse(buf, size);
+	return buf + size;
+}
+
+// Must be async signal safe.
+template<typename IntegerType>
+static char *
+appendIntegerAsHex(char *buf, IntegerType value) {
+	IntegerType remainder = value;
+	unsigned int size = 0;
+	
+	do {
+		buf[size] = hex_chars[remainder % 16];
+		remainder = remainder / 16;
+		size++;
+	} while (remainder != 0);
+	
+	reverse(buf, size);
+	return buf + size;
+}
+
+// Must be async signal safe.
+static char *
+appendPointerAsString(char *buf, void *pointer) {
+	// Use wierd union construction to avoid compiler warnings.
+	if (sizeof(void *) == sizeof(unsigned int)) {
+		union {
+			void *pointer;
+			unsigned int value;
+		} u;
+		u.pointer = pointer;
+		return appendIntegerAsHex(appendText(buf, "0x"), u.value);
+	} else if (sizeof(void *) == sizeof(unsigned long long)) {
+		union {
+			void *pointer;
+			unsigned long long value;
+		} u;
+		u.pointer = pointer;
+		return appendIntegerAsHex(appendText(buf, "0x"), u.value);
+	} else {
+		return appendText(buf, "(pointer size unsupported)");
+	}
+}
+
+static char *
+appendSignalName(char *buf, int signo) {
+	switch (signo) {
+	case SIGABRT:
+		buf = appendText(buf, "SIGABRT");
+		break;
+	case SIGSEGV:
+		buf = appendText(buf, "SIGSEGV");
+		break;
+	case SIGBUS:
+		buf = appendText(buf, "SIGBUS");
+		break;
+	case SIGFPE:
+		buf = appendText(buf, "SIGFPE");
+		break;
+	case SIGILL:
+		buf = appendText(buf, "SIGILL");
+		break;
+	default:
+		return appendULL(buf, (unsigned long long) signo);
+	}
+	buf = appendText(buf, "(");
+	buf = appendULL(buf, (unsigned long long) signo);
+	buf = appendText(buf, ")");
+	return buf;
+}
+
+#define SI_CODE_HANDLER(name) \
+	case name: \
+		buf = appendText(buf, #name); \
+		break
+
+// Must be async signal safe.
+static char *
+appendSignalReason(char *buf, siginfo_t *info) {
+	bool handled = true;
+	
+	switch (info->si_code) {
+	SI_CODE_HANDLER(SI_USER);
+	#ifdef SI_KERNEL
+		SI_CODE_HANDLER(SI_KERNEL);
+	#endif
+	SI_CODE_HANDLER(SI_QUEUE);
+	SI_CODE_HANDLER(SI_TIMER);
+	#ifdef SI_ASYNCIO
+		SI_CODE_HANDLER(SI_ASYNCIO);
+	#endif
+	#ifdef SI_MESGQ
+		SI_CODE_HANDLER(SI_MESGQ);
+	#endif
+	#ifdef SI_SIGIO
+		SI_CODE_HANDLER(SI_SIGIO);
+	#endif
+	#ifdef SI_TKILL
+		SI_CODE_HANDLER(SI_TKILL);
+	#endif
+	default:
+		switch (info->si_signo) {
+		case SIGSEGV:
+			switch (info->si_code) {
+			#ifdef SEGV_MAPERR
+				SI_CODE_HANDLER(SEGV_MAPERR);
+			#endif
+			#ifdef SEGV_ACCERR
+				SI_CODE_HANDLER(SEGV_ACCERR);
+			#endif
+			default:
+				handled = false;
+				break;
+			}
+			break;
+		case SIGBUS:
+			switch (info->si_code) {
+			#ifdef BUS_ADRALN
+				SI_CODE_HANDLER(BUS_ADRALN);
+			#endif
+			#ifdef BUS_ADRERR
+				SI_CODE_HANDLER(BUS_ADRERR);
+			#endif
+			#ifdef BUS_OBJERR
+				SI_CODE_HANDLER(BUS_OBJERR);
+			#endif
+			default:
+				handled = false;
+				break;
+			}
+			break;
+		default:
+			handled = false;
+			break;
+		}
+		if (!handled) {
+			buf = appendText(buf, "#");
+			buf = appendULL(buf, (unsigned long long) info->si_code);
+		}
+		break;
+	}
+	
+	if (info->si_code <= 0) {
+		buf = appendText(buf, ", signal sent by PID ");
+		buf = appendULL(buf, (unsigned long long) info->si_pid);
+		buf = appendText(buf, " with UID ");
+		buf = appendULL(buf, (unsigned long long) info->si_uid);
+	}
+
+	buf = appendText(buf, ", si_addr=");
+	buf = appendPointerAsString(buf, info->si_addr);
+	
+	return buf;
+}
+
+static int
+runInSubprocessWithTimeLimit(AbortHandlerState &state, Callback callback, void *userData, int timeLimit) {
+	char *end;
+	pid_t child;
+	int p[2], e;
+
+	if (pipe(p) == -1) {
+		e = errno;
+		end = state.messageBuf;
+		end = appendText(end, "Could not create subprocess: pipe() failed with errno=");
+		end = appendULL(end, e);
+		end = appendText(end, "\n");
+		write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+		return -1;
+	}
+
+	child = asyncFork();
+	if (child == 0) {
+		close(p[0]);
+		callback(state, userData);
+		_exit(0);
+		return -1;
+
+	} else if (child == -1) {
+		e = errno;
+		close(p[0]);
+		close(p[1]);
+		end = state.messageBuf;
+		end = appendText(end, "Could not create subprocess: fork() failed with errno=");
+		end = appendULL(end, e);
+		end = appendText(end, "\n");
+		write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+		return -1;
+
+	} else {
+		int status;
+		close(p[1]);
+
+		// We give the child process a time limit. If it doesn't succeed in
+		// exiting within the time limit, we assume that it has frozen
+		// and we kill it.
+		struct pollfd fd;
+		fd.fd = p[0];
+		fd.events = POLLIN | POLLHUP | POLLERR;
+		if (poll(&fd, 1, timeLimit) <= 0) {
+			kill(child, SIGKILL);
+			safePrintErr("Could not run child process: it did not exit in time\n");
+		}
+		close(p[0]);
+		if (waitpid(child, &status, 0) == child) {
+			return status;
+		} else {
+			return -1;
+		}
+	}
+}
+
+static void
+dumpFileDescriptorInfoWithLsof(AbortHandlerState &state, void *userData) {
+	char *end;
+
+	end = state.messageBuf;
+	end = appendULL(end, state.pid);
+	*end = '\0';
+
+	closeAllFileDescriptors(2);
+
+	execlp("lsof", "lsof", "-p", state.messageBuf, "-nP", (const char * const) 0);
+
+	end = state.messageBuf;
+	end = appendText(end, "ERROR: cannot execute command 'lsof': errno=");
+	end = appendULL(end, errno);
+	end = appendText(end, "\n");
+	write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+	_exit(1);
+}
+
+static void
+dumpFileDescriptorInfoWithLs(AbortHandlerState &state, char *end) {
+	pid_t pid;
+	int status;
+
+	pid = asyncFork();
+	if (pid == 0) {
+		closeAllFileDescriptors(2);
+		// The '-v' is for natural sorting on Linux. On BSD -v means something else but it's harmless.
+		execlp("ls", "ls", "-lv", state.messageBuf, (const char * const) 0);
+		_exit(1);
+	} else if (pid == -1) {
+		safePrintErr("ERROR: Could not fork a process to dump file descriptor information!\n");
+	} else if (waitpid(pid, &status, 0) != pid || status != 0) {
+		safePrintErr("ERROR: Could not run 'ls' to dump file descriptor information!\n");
+	}
+}
+
+static void
+dumpFileDescriptorInfo(AbortHandlerState &state) {
+	char *messageBuf = state.messageBuf;
+	char *end;
+	struct stat buf;
+	int status;
+
+	end = messageBuf;
+	end = appendText(end, state.messagePrefix);
+	end = appendText(end, " ] Open files and file descriptors:\n");
+	write(STDERR_FILENO, messageBuf, end - messageBuf);
+
+	status = runInSubprocessWithTimeLimit(state, dumpFileDescriptorInfoWithLsof, NULL, 4000);
+
+	if (status != 0) {
+		safePrintErr("Falling back to another mechanism for dumping file descriptors.\n");
+
+		end = messageBuf;
+		end = appendText(end, "/proc/");
+		end = appendULL(end, state.pid);
+		end = appendText(end, "/fd");
+		*end = '\0';
+		if (stat(messageBuf, &buf) == 0) {
+			dumpFileDescriptorInfoWithLs(state, end + 1);
+		} else {
+			end = messageBuf;
+			end = appendText(end, "/dev/fd");
+			*end = '\0';
+			if (stat(messageBuf, &buf) == 0) {
+				dumpFileDescriptorInfoWithLs(state, end + 1);
+			} else {
+				end = messageBuf;
+				end = appendText(end, "ERROR: No other file descriptor dumping mechanism on current platform detected.\n");
+				write(STDERR_FILENO, messageBuf, end - messageBuf);
+			}
+		}
+	}
+}
+
+static void
+dumpWithCrashWatch(AbortHandlerState &state) {
+	char *messageBuf = state.messageBuf;
+	const char *pidStr = messageBuf;
+	char *end = messageBuf;
+	end = appendULL(end, (unsigned long long) state.pid);
+	*end = '\0';
+	
+	pid_t child = asyncFork();
+	if (child == 0) {
+		closeAllFileDescriptors(2);
+		execlp("crash-watch", "crash-watch", "--dump", pidStr, (char * const) 0);
+		if (errno == ENOENT) {
+			safePrintErr("Crash-watch is not installed. Please install it with 'gem install crash-watch' "
+				"or download it from https://github.com/FooBarWidget/crash-watch.\n");
+		} else {
+			int e = errno;
+			end = messageBuf;
+			end = appendText(end, "crash-watch is installed, but it could not be executed! ");
+			end = appendText(end, "(execlp() returned errno=");
+			end = appendULL(end, e);
+			end = appendText(end, ") Please check your file permissions or something.\n");
+			write(STDERR_FILENO, messageBuf, end - messageBuf);
+		}
+		_exit(1);
+
+	} else if (child == -1) {
+		int e = errno;
+		end = messageBuf;
+		end = appendText(end, "Could not execute crash-watch: fork() failed with errno=");
+		end = appendULL(end, e);
+		end = appendText(end, "\n");
+		write(STDERR_FILENO, messageBuf, end - messageBuf);
+
+	} else {
+		waitpid(child, NULL, 0);
+	}
+}
+
+#ifdef LIBC_HAS_BACKTRACE_FUNC
+	static void
+	dumpBacktrace(AbortHandlerState &state, void *userData) {
+		void *backtraceStore[512];
+		int frames = backtrace(backtraceStore, sizeof(backtraceStore) / sizeof(void *));
+		char *end = state.messageBuf;
+		end = appendText(end, "--------------------------------------\n");
+		end = appendText(end, "[ pid=");
+		end = appendULL(end, (unsigned long long) state.pid);
+		end = appendText(end, " ] Backtrace with ");
+		end = appendULL(end, (unsigned long long) frames);
+		end = appendText(end, " frames:\n");
+		write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+
+		if (backtraceSanitizerCommand != NULL) {
+			int p[2];
+			if (pipe(p) == -1) {
+				int e = errno;
+				end = state.messageBuf;
+				end = appendText(end, "Could not dump diagnostics through backtrace sanitizer: pipe() failed with errno=");
+				end = appendULL(end, e);
+				end = appendText(end, "\n");
+				end = appendText(end, "Falling back to writing to stderr directly...\n");
+				write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+				backtrace_symbols_fd(backtraceStore, frames, STDERR_FILENO);
+				return;
+			}
+
+			pid_t pid = asyncFork();
+			if (pid == 0) {
+				const char *pidStr = end = state.messageBuf;
+				end = appendULL(end, (unsigned long long) state.pid);
+				*end = '\0';
+				end++;
+
+				close(p[1]);
+				dup2(p[0], STDIN_FILENO);
+				closeAllFileDescriptors(2);
+				
+				char *command = end;
+				end = appendText(end, "exec ");
+				end = appendText(end, backtraceSanitizerCommand);
+				if (backtraceSanitizerPassProgramInfo) {
+					end = appendText(end, " \"");
+					end = appendText(end, argv0);
+					end = appendText(end, "\" ");
+					end = appendText(end, pidStr);
+				}
+				*end = '\0';
+				end++;
+				execlp("/bin/sh", "/bin/sh", "-c", command, (const char * const) 0);
+
+				end = state.messageBuf;
+				end = appendText(end, "ERROR: cannot execute '");
+				end = appendText(end, backtraceSanitizerCommand);
+				end = appendText(end, "' for sanitizing the backtrace, trying 'cat'...\n");
+				write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+				execlp("cat", "cat", (const char * const) 0);
+				execlp("/bin/cat", "cat", (const char * const) 0);
+				execlp("/usr/bin/cat", "cat", (const char * const) 0);
+				safePrintErr("ERROR: cannot execute 'cat'\n");
+				_exit(1);
+
+			} else if (pid == -1) {
+				close(p[0]);
+				close(p[1]);
+				int e = errno;
+				end = state.messageBuf;
+				end = appendText(end, "Could not dump diagnostics through backtrace sanitizer: fork() failed with errno=");
+				end = appendULL(end, e);
+				end = appendText(end, "\n");
+				end = appendText(end, "Falling back to writing to stderr directly...\n");
+				write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+				backtrace_symbols_fd(backtraceStore, frames, STDERR_FILENO);
+
+			} else {
+				int status = -1;
+
+				close(p[0]);
+				backtrace_symbols_fd(backtraceStore, frames, p[1]);
+				close(p[1]);
+				if (waitpid(pid, &status, 0) == -1 || status != 0) {
+					end = state.messageBuf;
+					end = appendText(end, "ERROR: cannot execute '");
+					end = appendText(end, backtraceSanitizerCommand);
+					end = appendText(end, "' for sanitizing the backtrace, writing to stderr directly...\n");
+					write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+					backtrace_symbols_fd(backtraceStore, frames, STDERR_FILENO);
+				}
+			}
+
+		} else {
+			backtrace_symbols_fd(backtraceStore, frames, STDERR_FILENO);
+		}
+	}
+#endif
+
+static void
+runCustomDiagnosticsDumper(AbortHandlerState &state, void *userData) {
+	customDiagnosticsDumper(customDiagnosticsDumperUserData);
+}
+
+// This function is performed in a child process.
+static void
+dumpDiagnostics(AbortHandlerState &state) {
+	char *messageBuf = state.messageBuf;
+	char *end;
+	pid_t pid;
+	int status;
+
+	end = messageBuf;
+	end = appendText(end, state.messagePrefix);
+	end = appendText(end, " ] Date, uname and ulimits:\n");
+	write(STDERR_FILENO, messageBuf, end - messageBuf);
+
+	// Dump human-readable time string and string.
+	pid = asyncFork();
+	if (pid == 0) {
+		closeAllFileDescriptors(2);
+		execlp("date", "date", (const char * const) 0);
+		_exit(1);
+	} else if (pid == -1) {
+		safePrintErr("ERROR: Could not fork a process to dump the time!\n");
+	} else if (waitpid(pid, &status, 0) != pid || status != 0) {
+		safePrintErr("ERROR: Could not run 'date'!\n");
+	}
+
+	// Dump system uname.
+	pid = asyncFork();
+	if (pid == 0) {
+		closeAllFileDescriptors(2);
+		execlp("uname", "uname", "-mprsv", (const char * const) 0);
+		_exit(1);
+	} else if (pid == -1) {
+		safePrintErr("ERROR: Could not fork a process to dump the uname!\n");
+	} else if (waitpid(pid, &status, 0) != pid || status != 0) {
+		safePrintErr("ERROR: Could not run 'uname -mprsv'!\n");
+	}
+
+	// Dump ulimit.
+	pid = asyncFork();
+	if (pid == 0) {
+		closeAllFileDescriptors(2);
+		execlp("ulimit", "ulimit", "-a", (const char * const) 0);
+		// On Linux 'ulimit' is a shell builtin, not a command.
+		execlp("/bin/sh", "/bin/sh", "-c", "ulimit -a", (const char * const) 0);
+		_exit(1);
+	} else if (pid == -1) {
+		safePrintErr("ERROR: Could not fork a process to dump the ulimit!\n");
+	} else if (waitpid(pid, &status, 0) != pid || status != 0) {
+		safePrintErr("ERROR: Could not run 'ulimit -a'!\n");
+	}
+
+	end = messageBuf;
+	end = appendText(end, state.messagePrefix);
+	end = appendText(end, " ] Phusion Passenger version: " PASSENGER_VERSION "\n");
+	write(STDERR_FILENO, messageBuf, end - messageBuf);
+
+	if (lastAssertionFailure.filename != NULL) {
+		end = messageBuf;
+		end = appendText(end, state.messagePrefix);
+		end = appendText(end, " ] Last assertion failure: (");
+		end = appendText(end, lastAssertionFailure.expression);
+		end = appendText(end, "), ");
+		if (lastAssertionFailure.function != NULL) {
+			end = appendText(end, "function ");
+			end = appendText(end, lastAssertionFailure.function);
+			end = appendText(end, ", ");
+		}
+		end = appendText(end, "file ");
+		end = appendText(end, lastAssertionFailure.filename);
+		end = appendText(end, ", line ");
+		end = appendULL(end, lastAssertionFailure.line);
+		end = appendText(end, ".\n");
+		write(STDERR_FILENO, messageBuf, end - messageBuf);
+	}
+
+	// It is important that writing the message and the backtrace are two
+	// seperate operations because it's not entirely clear whether the
+	// latter is async signal safe and thus can crash.
+	end = messageBuf;
+	end = appendText(end, state.messagePrefix);
+	#ifdef LIBC_HAS_BACKTRACE_FUNC
+		end = appendText(end, " ] libc backtrace available!\n");
+	#else
+		end = appendText(end, " ] libc backtrace not available.\n");
+	#endif
+	write(STDERR_FILENO, messageBuf, end - messageBuf);
+
+	#ifdef LIBC_HAS_BACKTRACE_FUNC
+		runInSubprocessWithTimeLimit(state, dumpBacktrace, NULL, 4000);
+	#endif
+
+	safePrintErr("--------------------------------------\n");
+
+	if (customDiagnosticsDumper != NULL) {
+		end = messageBuf;
+		end = appendText(end, state.messagePrefix);
+		end = appendText(end, " ] Dumping additional diagnostical information...\n");
+		write(STDERR_FILENO, messageBuf, end - messageBuf);
+		safePrintErr("--------------------------------------\n");
+		runInSubprocessWithTimeLimit(state, runCustomDiagnosticsDumper, NULL, 2000);
+		safePrintErr("--------------------------------------\n");
+	}
+
+	dumpFileDescriptorInfo(state);
+	safePrintErr("--------------------------------------\n");
+
+	if (shouldDumpWithCrashWatch) {
+		end = messageBuf;
+		end = appendText(end, state.messagePrefix);
+		#ifdef LIBC_HAS_BACKTRACE_FUNC
+			end = appendText(end, " ] Dumping a more detailed backtrace with crash-watch...\n");
+		#else
+			end = appendText(end, " ] Dumping a backtrace with crash-watch...\n");
+		#endif
+		write(STDERR_FILENO, messageBuf, end - messageBuf);
+		dumpWithCrashWatch(state);
+	} else {
+		write(STDERR_FILENO, "\n", 1);
+	}
+}
+
+static bool
+createCrashLogFile(char *filename, time_t t) {
+	char *end = filename;
+	end = appendText(end, "/var/tmp/passenger-crash-log.");
+	end = appendULL(end, (unsigned long long) t);
+	*end = '\0';
+
+	int fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600);
+	if (fd == -1) {
+		end = filename;
+		end = appendText(end, "/tmp/passenger-crash-log.");
+		end = appendULL(end, (unsigned long long) t);
+		*end = '\0';
+		fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600);
+	}
+	if (fd == -1) {
+		*filename = '\0';
+		return false;
+	} else {
+		close(fd);
+		return true;
+	}
+}
+
+static void
+forkAndRedirectToTee(char *filename) {
+	pid_t pid;
+	int p[2];
+
+	if (pipe(p) == -1) {
+		// Signal error condition.
+		*filename = '\0';
+		return;
+	}
+
+	pid = asyncFork();
+	if (pid == 0) {
+		close(p[1]);
+		dup2(p[0], STDIN_FILENO);
+		execlp("tee", "tee", filename, (const char * const) 0);
+		execlp("/usr/bin/tee", "tee", filename, (const char * const) 0);
+		execlp("cat", "cat", (const char * const) 0);
+		execlp("/bin/cat", "cat", (const char * const) 0);
+		execlp("/usr/bin/cat", "cat", (const char * const) 0);
+		safePrintErr("ERROR: cannot execute 'tee' or 'cat'; crash log will be lost!\n");
+		_exit(1);
+	} else if (pid == -1) {
+		safePrintErr("ERROR: cannot fork a process for executing 'tee'\n");
+		*filename = '\0';
+	} else {
+		close(p[0]);
+		dup2(p[1], STDOUT_FILENO);
+		dup2(p[1], STDERR_FILENO);
+	}
+}
+
+static void
+abortHandler(int signo, siginfo_t *info, void *ctx) {
+	AbortHandlerState state;
+	state.pid = getpid();
+	state.signo = signo;
+	state.info = info;
+	pid_t child;
+	time_t t = time(NULL);
+	char crashLogFile[256];
+
+	abortHandlerCalled++;
+	if (abortHandlerCalled > 1) {
+		// The abort handler itself crashed!
+		char *end = state.messageBuf;
+		end = appendText(end, "[ origpid=");
+		end = appendULL(end, (unsigned long long) state.pid);
+		end = appendText(end, ", pid=");
+		end = appendULL(end, (unsigned long long) getpid());
+		end = appendText(end, ", timestamp=");
+		end = appendULL(end, (unsigned long long) t);
+		if (abortHandlerCalled == 2) {
+			// This is the first time it crashed.
+			end = appendText(end, " ] Abort handler crashed! signo=");
+			end = appendSignalName(end, state.signo);
+			end = appendText(end, ", reason=");
+			end = appendSignalReason(end, state.info);
+			end = appendText(end, "\n");
+			write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+			// Run default signal handler.
+			raise(signo);
+		} else {
+			// This is the second time it crashed, meaning it failed to
+			// invoke the default signal handler to abort the process!
+			end = appendText(end, " ] Abort handler crashed again! Force exiting this time. signo=");
+			end = appendSignalName(end, state.signo);
+			end = appendText(end, ", reason=");
+			end = appendSignalReason(end, state.info);
+			end = appendText(end, "\n");
+			write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+			_exit(1);
+		}
+		return;
+	}
+
+	close(emergencyPipe1[0]);
+	close(emergencyPipe1[1]);
+	close(emergencyPipe2[0]);
+	close(emergencyPipe2[1]);
+	emergencyPipe1[0] = emergencyPipe1[1] = -1;
+	emergencyPipe2[0] = emergencyPipe2[1] = -1;
+
+	/* We want to dump the entire crash log to both stderr and a log file.
+	 * We use 'tee' for this.
+	 */
+	if (createCrashLogFile(crashLogFile, t)) {
+		forkAndRedirectToTee(crashLogFile);
+	}
+
+	char *end = state.messagePrefix;
+	end = appendText(end, "[ pid=");
+	end = appendULL(end, (unsigned long long) state.pid);
+	*end = '\0';
+
+	end = state.messageBuf;
+	end = appendText(end, state.messagePrefix);
+	end = appendText(end, ", timestamp=");
+	end = appendULL(end, (unsigned long long) t);
+	end = appendText(end, " ] Process aborted! signo=");
+	end = appendSignalName(end, state.signo);
+	end = appendText(end, ", reason=");
+	end = appendSignalReason(end, state.info);
+	end = appendText(end, ", randomSeed=");
+	end = appendULL(end, (unsigned long long) randomSeed);
+	end = appendText(end, "\n");
+	write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+
+	end = state.messageBuf;
+	if (*crashLogFile != '\0') {
+		end = appendText(end, state.messagePrefix);
+		end = appendText(end, " ] Crash log dumped to ");
+		end = appendText(end, crashLogFile);
+		end = appendText(end, "\n");
+	} else {
+		end = appendText(end, state.messagePrefix);
+		end = appendText(end, " ] Could not create crash log file, so dumping to stderr only.\n");
+	}
+	write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+
+	if (beepOnAbort) {
+		end = state.messageBuf;
+		end = appendText(end, state.messagePrefix);
+		end = appendText(end, " ] PASSENGER_BEEP_ON_ABORT on, executing beep...\n");
+		write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+
+		child = asyncFork();
+		if (child == 0) {
+			closeAllFileDescriptors(2);
+			#ifdef __APPLE__
+				execlp("osascript", "osascript", "-e", "beep 2", (const char * const) 0);
+				safePrintErr("Cannot execute 'osascript' command\n");
+			#else
+				execlp("beep", "beep", (const char * const) 0);
+				safePrintErr("Cannot execute 'beep' command\n");
+			#endif
+			_exit(1);
+
+		} else if (child == -1) {
+			int e = errno;
+			end = state.messageBuf;
+			end = appendText(end, state.messagePrefix);
+			end = appendText(end, " ] Could fork a child process for invoking a beep: fork() failed with errno=");
+			end = appendULL(end, e);
+			end = appendText(end, "\n");
+			write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+		}
+	}
+
+	if (stopOnAbort) {
+		end = state.messageBuf;
+		end = appendText(end, state.messagePrefix);
+		end = appendText(end, " ] PASSENGER_STOP_ON_ABORT on, so process stopped. Send SIGCONT when you want to continue.\n");
+		write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+		raise(SIGSTOP);
+	}
+
+	// It isn't safe to call any waiting functions in this signal handler,
+	// not even read() and waitpid() even though they're async signal safe.
+	// So we fork a child process and let it dump as much diagnostics as possible
+	// instead of doing it in this process.
+	child = asyncFork();
+	if (child == 0) {
+		// Sleep for a short while to allow the parent process to raise SIGSTOP.
+		// usleep() and nanosleep() aren't async signal safe so we use select()
+		// instead.
+		struct timeval tv;
+		tv.tv_sec = 0;
+		tv.tv_usec = 100000;
+		select(0, NULL, NULL, NULL, &tv);
+
+		resetSignalHandlersAndMask();
+
+		child = asyncFork();
+		if (child == 0) {
+			// OS X: for some reason the SIGPIPE handler may be reset to default after forking.
+			// Later in this program we're going to pipe backtrace_symbols_fd() into the backtrace
+			// sanitizer, which may fail, and we don't want the diagnostics process to crash
+			// with SIGPIPE as a result, so we ignore SIGPIPE again.
+			ignoreSigpipe();
+			dumpDiagnostics(state);
+			// The child process may or may or may not resume the original process.
+			// We do it ourselves just to be sure.
+			kill(state.pid, SIGCONT);
+			_exit(0);
+
+		} else if (child == -1) {
+			int e = errno;
+			end = state.messageBuf;
+			end = appendText(end, state.messagePrefix);
+			end = appendText(end, "] Could fork a child process for dumping diagnostics: fork() failed with errno=");
+			end = appendULL(end, e);
+			end = appendText(end, "\n");
+			write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+			_exit(1);
+
+		} else {
+			// Exit immediately so that child process is adopted by init process.
+			_exit(0);
+		}
+
+	} else if (child == -1) {
+		int e = errno;
+		end = state.messageBuf;
+		end = appendText(end, state.messagePrefix);
+		end = appendText(end, " ] Could fork a child process for dumping diagnostics: fork() failed with errno=");
+		end = appendULL(end, e);
+		end = appendText(end, "\n");
+		write(STDERR_FILENO, state.messageBuf, end - state.messageBuf);
+
+	} else {
+		raise(SIGSTOP);
+		// Will continue after the child process has done its job.
+	}
+
+	// Run default signal handler.
+	raise(signo);
+}
+
+/*
+ * Override assert() to add more features and to fix bugs. We save the information
+ * of the last assertion failure in a global variable so that we can print it
+ * to the crash diagnostics report.
+ */
+#if defined(__GLIBC__)
+	extern "C" __attribute__ ((__noreturn__))
+	void
+	__assert_fail(__const char *__assertion, __const char *__file,
+		unsigned int __line, __const char *__function)
+	{
+		lastAssertionFailure.filename = __file;
+		lastAssertionFailure.line = __line;
+		lastAssertionFailure.function = __function;
+		lastAssertionFailure.expression = __assertion;
+		fprintf(stderr, "Assertion failed! %s:%u: %s: %s\n", __file, __line, __function, __assertion);
+		fflush(stderr);
+		abort();
+	}
+
+#elif defined(__APPLE__)
+	/* On OS X, raise() and abort() unfortunately send SIGABRT to the main thread,
+	 * causing the original backtrace to be lost in the signal handler.
+	 * We work around this for anything in the same linkage unit by just definin
+	 * our own versions of the assert handler and abort.
+	 */
+	
+	#include <pthread.h>
+
+	extern "C" int
+	raise(int sig) {
+		return pthread_kill(pthread_self(), sig);
+	}
+
+	extern "C" void
+	__assert_rtn(const char *func, const char *file, int line, const char *expr) {
+		lastAssertionFailure.filename = file;
+		lastAssertionFailure.line = line;
+		lastAssertionFailure.function = func;
+		lastAssertionFailure.expression = expr;
+		if (func) {
+			fprintf(stderr, "Assertion failed: (%s), function %s, file %s, line %d.\n",
+				expr, func, file, line);
+		} else {
+			fprintf(stderr, "Assertion failed: (%s), file %s, line %d.\n",
+				expr, file, line);
+		}
+		fflush(stderr);
+		abort();
+	}
+
+	extern "C" void
+	abort() {
+		sigset_t set;
+		sigemptyset(&set);
+		sigaddset(&set, SIGABRT);
+		pthread_sigmask(SIG_UNBLOCK, &set, NULL);
+		raise(SIGABRT);
+		usleep(1000);
+		__builtin_trap();
+	}
+#endif /* __APPLE__ */
+
+void
+installAbortHandler() {
+	alternativeStackSize = MINSIGSTKSZ + 128 * 1024;
+	alternativeStack = (char *) malloc(alternativeStackSize);
+	if (alternativeStack == NULL) {
+		fprintf(stderr, "Cannot allocate an alternative with a size of %u bytes!\n",
+			alternativeStackSize);
+		fflush(stderr);
+		abort();
+	}
+	
+	stack_t stack;
+	stack.ss_sp = alternativeStack;
+	stack.ss_size = alternativeStackSize;
+	stack.ss_flags = 0;
+	if (sigaltstack(&stack, NULL) != 0) {
+		int e = errno;
+		fprintf(stderr, "Cannot install an alternative stack for use in signal handlers: %s (%d)\n",
+			strerror(e), e);
+		fflush(stderr);
+		abort();
+	}
+	
+	struct sigaction action;
+	action.sa_sigaction = abortHandler;
+	action.sa_flags = SA_RESETHAND | SA_SIGINFO;
+	sigemptyset(&action.sa_mask);
+	sigaction(SIGABRT, &action, NULL);
+	sigaction(SIGSEGV, &action, NULL);
+	sigaction(SIGBUS, &action, NULL);
+	sigaction(SIGFPE, &action, NULL);
+	sigaction(SIGILL, &action, NULL);
+}
+
+void
+installDiagnosticsDumper(DiagnosticsDumper func, void *userData) {
+	customDiagnosticsDumper = func;
+	customDiagnosticsDumperUserData = userData;
+}
+
+bool
+feedbackFdAvailable() {
+	return _feedbackFdAvailable;
+}
+
+static int
+lookupErrno(const char *name) {
+	struct Entry {
+		int errorCode;
+		const char * const name;
+	};
+	static const Entry entries[] = {
+		{ EPERM, "EPERM" },
+		{ ENOENT, "ENOENT" },
+		{ ESRCH, "ESRCH" },
+		{ EINTR, "EINTR" },
+		{ EBADF, "EBADF" },
+		{ ENOMEM, "ENOMEM" },
+		{ EACCES, "EACCES" },
+		{ EBUSY, "EBUSY" },
+		{ EEXIST, "EEXIST" },
+		{ ENOTDIR, "ENOTDIR" },
+		{ EISDIR, "EISDIR" },
+		{ EINVAL, "EINVAL" },
+		{ ENFILE, "ENFILE" },
+		{ EMFILE, "EMFILE" },
+		{ ENOTTY, "ENOTTY" },
+		{ ETXTBSY, "ETXTBSY" },
+		{ ENOSPC, "ENOSPC" },
+		{ ESPIPE, "ESPIPE" },
+		{ EMLINK, "EMLINK" },
+		{ EPIPE, "EPIPE" },
+		{ EAGAIN, "EAGAIN" },
+		{ EWOULDBLOCK, "EWOULDBLOCK" },
+		{ EINPROGRESS, "EINPROGRESS" },
+		{ EADDRINUSE, "EADDRINUSE" },
+		{ EADDRNOTAVAIL, "EADDRNOTAVAIL" },
+		{ ENETUNREACH, "ENETUNREACH" },
+		{ ECONNABORTED, "ECONNABORTED" },
+		{ ECONNRESET, "ECONNRESET" },
+		{ EISCONN, "EISCONN" },
+		{ ENOTCONN, "ENOTCONN" },
+		{ ETIMEDOUT, "ETIMEDOUT" },
+		{ ECONNREFUSED, "ECONNREFUSED" },
+		{ EHOSTDOWN, "EHOSTDOWN" },
+		{ EHOSTUNREACH, "EHOSTUNREACH" },
+		#ifdef EIO
+			{ EIO, "EIO" },
+		#endif
+		#ifdef ENXIO
+			{ ENXIO, "ENXIO" },
+		#endif
+		#ifdef E2BIG
+			{ E2BIG, "E2BIG" },
+		#endif
+		#ifdef ENOEXEC
+			{ ENOEXEC, "ENOEXEC" },
+		#endif
+		#ifdef ECHILD
+			{ ECHILD, "ECHILD" },
+		#endif
+		#ifdef EDEADLK
+			{ EDEADLK, "EDEADLK" },
+		#endif
+		#ifdef EFAULT
+			{ EFAULT, "EFAULT" },
+		#endif
+		#ifdef ENOTBLK
+			{ ENOTBLK, "ENOTBLK" },
+		#endif
+		#ifdef EXDEV
+			{ EXDEV, "EXDEV" },
+		#endif
+		#ifdef ENODEV
+			{ ENODEV, "ENODEV" },
+		#endif
+		#ifdef EFBIG
+			{ EFBIG, "EFBIG" },
+		#endif
+		#ifdef EROFS
+			{ EROFS, "EROFS" },
+		#endif
+		#ifdef EDOM
+			{ EDOM, "EDOM" },
+		#endif
+		#ifdef ERANGE
+			{ ERANGE, "ERANGE" },
+		#endif
+		#ifdef EALREADY
+			{ EALREADY, "EALREADY" },
+		#endif
+		#ifdef ENOTSOCK
+			{ ENOTSOCK, "ENOTSOCK" },
+		#endif
+		#ifdef EDESTADDRREQ
+			{ EDESTADDRREQ, "EDESTADDRREQ" },
+		#endif
+		#ifdef EMSGSIZE
+			{ EMSGSIZE, "EMSGSIZE" },
+		#endif
+		#ifdef EPROTOTYPE
+			{ EPROTOTYPE, "EPROTOTYPE" },
+		#endif
+		#ifdef ENOPROTOOPT
+			{ ENOPROTOOPT, "ENOPROTOOPT" },
+		#endif
+		#ifdef EPROTONOSUPPORT
+			{ EPROTONOSUPPORT, "EPROTONOSUPPORT" },
+		#endif
+		#ifdef ESOCKTNOSUPPORT
+			{ ESOCKTNOSUPPORT, "ESOCKTNOSUPPORT" },
+		#endif
+		#ifdef ENOTSUP
+			{ ENOTSUP, "ENOTSUP" },
+		#endif
+		#ifdef EOPNOTSUPP
+			{ EOPNOTSUPP, "EOPNOTSUPP" },
+		#endif
+		#ifdef EPFNOSUPPORT
+			{ EPFNOSUPPORT, "EPFNOSUPPORT" },
+		#endif
+		#ifdef EAFNOSUPPORT
+			{ EAFNOSUPPORT, "EAFNOSUPPORT" },
+		#endif
+		#ifdef ENETDOWN
+			{ ENETDOWN, "ENETDOWN" },
+		#endif
+		#ifdef ENETRESET
+			{ ENETRESET, "ENETRESET" },
+		#endif
+		#ifdef ENOBUFS
+			{ ENOBUFS, "ENOBUFS" },
+		#endif
+		#ifdef ESHUTDOWN
+			{ ESHUTDOWN, "ESHUTDOWN" },
+		#endif
+		#ifdef ETOOMANYREFS
+			{ ETOOMANYREFS, "ETOOMANYREFS" },
+		#endif
+		#ifdef ELOOP
+			{ ELOOP, "ELOOP" },
+		#endif
+		#ifdef ENAMETOOLONG
+			{ ENAMETOOLONG, "ENAMETOOLONG" },
+		#endif
+		#ifdef ENOTEMPTY
+			{ ENOTEMPTY, "ENOTEMPTY" },
+		#endif
+		#ifdef EPROCLIM
+			{ EPROCLIM, "EPROCLIM" },
+		#endif
+		#ifdef EUSERS
+			{ EUSERS, "EUSERS" },
+		#endif
+		#ifdef EDQUOT
+			{ EDQUOT, "EDQUOT" },
+		#endif
+		#ifdef ESTALE
+			{ ESTALE, "ESTALE" },
+		#endif
+		#ifdef EREMOTE
+			{ EREMOTE, "EREMOTE" },
+		#endif
+		#ifdef EBADRPC
+			{ EBADRPC, "EBADRPC" },
+		#endif
+		#ifdef ERPCMISMATCH
+			{ ERPCMISMATCH, "ERPCMISMATCH" },
+		#endif
+		#ifdef EPROGUNAVAIL
+			{ EPROGUNAVAIL, "EPROGUNAVAIL" },
+		#endif
+		#ifdef EPROGMISMATCH
+			{ EPROGMISMATCH, "EPROGMISMATCH" },
+		#endif
+		#ifdef EPROCUNAVAIL
+			{ EPROCUNAVAIL, "EPROCUNAVAIL" },
+		#endif
+		#ifdef ENOLCK
+			{ ENOLCK, "ENOLCK" },
+		#endif
+		#ifdef ENOSYS
+			{ ENOSYS, "ENOSYS" },
+		#endif
+		#ifdef EFTYPE
+			{ EFTYPE, "EFTYPE" },
+		#endif
+		#ifdef EAUTH
+			{ EAUTH, "EAUTH" },
+		#endif
+		#ifdef ENEEDAUTH
+			{ ENEEDAUTH, "ENEEDAUTH" },
+		#endif
+		#ifdef EPWROFF
+			{ EPWROFF, "EPWROFF" },
+		#endif
+		#ifdef EDEVERR
+			{ EDEVERR, "EDEVERR" },
+		#endif
+		#ifdef EOVERFLOW
+			{ EOVERFLOW, "EOVERFLOW" },
+		#endif
+		#ifdef EBADEXEC
+			{ EBADEXEC, "EBADEXEC" },
+		#endif
+		#ifdef EBADARCH
+			{ EBADARCH, "EBADARCH" },
+		#endif
+		#ifdef ESHLIBVERS
+			{ ESHLIBVERS, "ESHLIBVERS" },
+		#endif
+		#ifdef EBADMACHO
+			{ EBADMACHO, "EBADMACHO" },
+		#endif
+		#ifdef ECANCELED
+			{ ECANCELED, "ECANCELED" },
+		#endif
+		#ifdef EIDRM
+			{ EIDRM, "EIDRM" },
+		#endif
+		#ifdef ENOMSG
+			{ ENOMSG, "ENOMSG" },
+		#endif
+		#ifdef EILSEQ
+			{ EILSEQ, "EILSEQ" },
+		#endif
+		#ifdef ENOATTR
+			{ ENOATTR, "ENOATTR" },
+		#endif
+		#ifdef EBADMSG
+			{ EBADMSG, "EBADMSG" },
+		#endif
+		#ifdef EMULTIHOP
+			{ EMULTIHOP, "EMULTIHOP" },
+		#endif
+		#ifdef ENODATA
+			{ ENODATA, "ENODATA" },
+		#endif
+		#ifdef ENOLINK
+			{ ENOLINK, "ENOLINK" },
+		#endif
+		#ifdef ENOSR
+			{ ENOSR, "ENOSR" },
+		#endif
+		#ifdef ENOSTR
+			{ ENOSTR, "ENOSTR" },
+		#endif
+		#ifdef EPROTO
+			{ EPROTO, "EPROTO" },
+		#endif
+		#ifdef ETIME
+			{ ETIME, "ETIME" },
+		#endif
+		#ifdef EOPNOTSUPP
+			{ EOPNOTSUPP, "EOPNOTSUPP" },
+		#endif
+		#ifdef ENOPOLICY
+			{ ENOPOLICY, "ENOPOLICY" },
+		#endif
+		#ifdef ENOTRECOVERABLE
+			{ ENOTRECOVERABLE, "ENOTRECOVERABLE" },
+		#endif
+		#ifdef EOWNERDEAD
+			{ EOWNERDEAD, "EOWNERDEAD" },
+		#endif
+	};
+
+	for (unsigned int i = 0; i < sizeof(entries) / sizeof(Entry); i++) {
+		if (strcmp(entries[i].name, name) == 0) {
+			return entries[i].errorCode;
+		}
+	}
+	return -1;
+}
+
+static void
+initializeSyscallFailureSimulation(const char *processName) {
+	// Format:
+	// PassengerWatchdog=EMFILE:0.1,ECONNREFUSED:0.25;PassengerHelperAgent=ESPIPE=0.4
+	const char *spec = getenv("PASSENGER_SIMULATE_SYSCALL_FAILURES");
+	string prefix = string(processName) + "=";
+	vector<string> components;
+	unsigned int i;
+	
+	// Lookup this process in the specification string.
+	split(spec, ';', components);
+	for (i = 0; i < components.size(); i++) {
+		if (startsWith(components[i], prefix)) {
+			// Found!
+			string value = components[i].substr(prefix.size());
+			split(value, ',', components);
+			vector<string> keyAndValue;
+			vector<ErrorChance> chances;
+
+			// Process each errorCode:chance pair.
+			for (i = 0; i < components.size(); i++) {
+				split(components[i], ':', keyAndValue);
+				if (keyAndValue.size() != 2) {
+					fprintf(stderr, "%s: invalid syntax in PASSENGER_SIMULATE_SYSCALL_FAILURES: '%s'\n",
+						processName, components[i].c_str());
+					continue;
+				}
+
+				int e = lookupErrno(keyAndValue[0].c_str());
+				if (e == -1) {
+					fprintf(stderr, "%s: invalid error code in PASSENGER_SIMULATE_SYSCALL_FAILURES: '%s'\n",
+						processName, components[i].c_str());
+					continue;
+				}
+
+				ErrorChance chance;
+				chance.chance = atof(keyAndValue[1].c_str());
+				if (chance.chance < 0 || chance.chance > 1) {
+					fprintf(stderr, "%s: invalid chance PASSENGER_SIMULATE_SYSCALL_FAILURES: '%s' - chance must be between 0 and 1\n",
+						processName, components[i].c_str());
+					continue;
+				}
+				chance.errorCode = e;
+				chances.push_back(chance);
+			}
+
+			// Install the chances.
+			setup_random_failure_simulation(&chances[0], chances.size());
+			return;
+		}
+	}
+}
+
+enum FdIsSocketResult {
+	FISR_YES,
+	FISR_NO,
+	FISR_ERROR
+};
+
+static FdIsSocketResult fdIsSocket(int fd) {
+	int ret = fcntl(fd, F_GETFL);
+	if (ret == -1) {
+		if (errno == EBADF) {
+			return FISR_NO;
+		} else {
+			return FISR_ERROR;
+		}
+	} else {
+		struct stat buf;
+		ret = fstat(fd, &buf);
+		if (ret == -1) {
+			// I think some platforms return this for anonymous
+			// Unix socket pairs.
+			return FISR_YES;
+		} else {
+			if (buf.st_mode & S_IFSOCK) {
+				return FISR_YES;
+			} else {
+				return FISR_NO;
+			}
+		}
+	}
+}
+
+VariantMap
+initializeAgent(int argc, char *argv[], const char *processName) {
+	VariantMap options;
+	const char *seedStr;
+
+	seedStr = getenv("PASSENGER_RANDOM_SEED");
+	if (seedStr == NULL || *seedStr == '\0') {
+		randomSeed = (unsigned int) time(NULL);
+	} else {
+		randomSeed = (unsigned int) atoll(seedStr);
+	}
+	srand(randomSeed);
+	srandom(randomSeed);
+	
+	ignoreSigpipe();
+	if (hasEnvOption("PASSENGER_ABORT_HANDLER", true)) {
+		shouldDumpWithCrashWatch = hasEnvOption("PASSENGER_DUMP_WITH_CRASH_WATCH", true);
+		beepOnAbort  = hasEnvOption("PASSENGER_BEEP_ON_ABORT", false);
+		stopOnAbort = hasEnvOption("PASSENGER_STOP_ON_ABORT", false);
+		pipe(emergencyPipe1);
+		pipe(emergencyPipe2);
+		installAbortHandler();
+	}
+	oxt::initialize();
+	setup_syscall_interruption_support();
+	if (getenv("PASSENGER_SIMULATE_SYSCALL_FAILURES")) {
+		initializeSyscallFailureSimulation(processName);
+	}
+	setvbuf(stdout, NULL, _IONBF, 0);
+	setvbuf(stderr, NULL, _IONBF, 0);
+	
+	TRACE_POINT();
+	try {
+		if (argc == 1) {
+			int e;
+
+			switch (fdIsSocket(FEEDBACK_FD)) {
+			case FISR_YES:
+				_feedbackFdAvailable = true;
+				options.readFrom(FEEDBACK_FD);
+				if (options.getBool("fire_and_forget", false)) {
+					_feedbackFdAvailable = false;
+					close(FEEDBACK_FD);
+				}
+				break;
+			case FISR_NO:
+				fprintf(stderr,
+					"You're not supposed to start this program from the command line. "
+					"It's used internally by Phusion Passenger.\n");
+				exit(1);
+				break;
+			case FISR_ERROR:
+				e = errno;
+				fprintf(stderr,
+					"Encountered an error in feedback file descriptor 3: %s (%d)\n",
+						strerror(e), e);
+				exit(1);
+				break;
+			}
+		} else {
+			options.readFrom((const char **) argv + 1, argc - 1);
+		}
+		
+		#ifdef __linux__
+			if (options.has("passenger_root")) {
+				ResourceLocator locator(options.get("passenger_root", true));
+				string ruby = options.get("default_ruby", false, DEFAULT_RUBY);
+				string path = ruby + " \"" + locator.getHelperScriptsDir() +
+					"/backtrace-sanitizer.rb\"";
+				backtraceSanitizerCommand = strdup(path.c_str());
+			}
+		#endif
+		if (backtraceSanitizerCommand == NULL) {
+			backtraceSanitizerCommand = "c++filt -n";
+			backtraceSanitizerPassProgramInfo = false;
+		}
+
+		options.setDefaultInt("log_level", DEFAULT_LOG_LEVEL);
+		setLogLevel(options.getInt("log_level"));
+		if (!options.get("debug_log_file", false).empty()) {
+			if (strcmp(processName, "PassengerWatchdog") == 0) {
+				/* Have the watchdog set STDOUT and STDERR to the debug
+				 * log file so that system abort() calls that stuff
+				 * are properly logged.
+				 */
+				string filename = options.get("debug_log_file");
+				options.erase("debug_log_file");
+				
+				int fd = open(filename.c_str(), O_CREAT | O_WRONLY | O_APPEND, 0644);
+				if (fd == -1) {
+					int e = errno;
+					throw FileSystemException("Cannot open debug log file " +
+						filename, e, filename);
+				}
+				
+				dup2(fd, STDOUT_FILENO);
+				dup2(fd, STDERR_FILENO);
+				close(fd);
+			} else {
+				setDebugFile(options.get("debug_log_file").c_str());
+			}
+		}
+	} catch (const tracable_exception &e) {
+		P_ERROR("*** ERROR: " << e.what() << "\n" << e.backtrace());
+		exit(1);
+	}
+	
+	// Change process title.
+	argv0 = strdup(argv[0]);
+	strncpy(argv[0], processName, strlen(argv[0]));
+	for (int i = 1; i < argc; i++) {
+		memset(argv[i], '\0', strlen(argv[i]));
+	}
+
+	P_DEBUG("Random seed: " << randomSeed);
+	
+	return options;
+}
+
+} // namespace Passenger
diff --git a/ext/common/agents/Base.h b/ext/common/agents/Base.h
new file mode 100644
index 0000000..2130e94
--- /dev/null
+++ b/ext/common/agents/Base.h
@@ -0,0 +1,43 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010, 2011, 2012 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_AGENT_BASE_H_
+#define _PASSENGER_AGENT_BASE_H_
+
+/** Common code for all agents. */
+
+#include "Utils/VariantMap.h"
+
+namespace Passenger {
+
+typedef void (*DiagnosticsDumper)(void *userData);
+
+bool feedbackFdAvailable();
+VariantMap initializeAgent(int argc, char *argv[], const char *processName);
+void installAbortHandler();
+void installDiagnosticsDumper(DiagnosticsDumper func, void *userData);
+
+}
+
+#endif /* _PASSENGER_AGENT_BASE_H_ */
diff --git a/ext/common/agents/EnvPrinter.c b/ext/common/agents/EnvPrinter.c
new file mode 100644
index 0000000..6826d32
--- /dev/null
+++ b/ext/common/agents/EnvPrinter.c
@@ -0,0 +1,16 @@
+#include <sys/types.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+
+extern char **environ;
+
+int
+main(int argc, char *argv[]) {
+	int i = 0;
+	while (environ[i] != NULL) {
+		write(STDOUT_FILENO, environ[i], strlen(environ[i]) + 1);
+		i++;
+	}
+	return 0;
+}
diff --git a/ext/common/agents/HelperAgent/AgentOptions.h b/ext/common/agents/HelperAgent/AgentOptions.h
new file mode 100644
index 0000000..dd779e0
--- /dev/null
+++ b/ext/common/agents/HelperAgent/AgentOptions.h
@@ -0,0 +1,99 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_HELPER_AGENT_OPTIONS_H_
+#define _PASSENGER_HELPER_AGENT_OPTIONS_H_
+
+#include <sys/types.h>
+#include <string>
+#include <Utils/VariantMap.h>
+
+namespace Passenger {
+
+using namespace std;
+
+
+struct AgentOptions {
+	pid_t   webServerPid;
+	string  serverInstanceDir;
+	string  tempDir;
+	bool    userSwitching;
+	string  defaultUser;
+	string  defaultGroup;
+	string  passengerRoot;
+	string  defaultRubyCommand;
+	unsigned int generationNumber;
+	unsigned int maxPoolSize;
+	unsigned int maxInstancesPerApp;
+	unsigned int poolIdleTime;
+	string requestSocketFilename;
+	string requestSocketPassword;
+	string adminSocketAddress;
+	string exitPassword;
+	string loggingAgentAddress;
+	string loggingAgentPassword;
+	string adminToolStatusPassword;
+	vector<string> prestartUrls;
+
+	string requestSocketLink;
+
+	AgentOptions() { }
+
+	AgentOptions(const VariantMap &options) {
+		// Required options for which a default is already set by the Watchdog.
+		passengerRoot      = options.get("passenger_root");
+		tempDir            = options.get("temp_dir");
+		userSwitching      = options.getBool("user_switching");
+		defaultRubyCommand = options.get("default_ruby");
+		defaultUser        = options.get("default_user");
+		defaultGroup       = options.get("default_group");
+		maxPoolSize        = options.getInt("max_pool_size");
+		maxInstancesPerApp = options.getInt("max_instances_per_app");
+		poolIdleTime       = options.getInt("pool_idle_time");
+
+		// Required options only set by the Watchdog.
+		webServerPid          = options.getPid("web_server_pid");
+		serverInstanceDir     = options.get("server_instance_dir");
+		generationNumber      = options.getInt("generation_number");
+		requestSocketFilename = options.get("request_socket_filename");
+		requestSocketPassword = options.get("request_socket_password");
+		if (requestSocketPassword == "-") {
+			requestSocketPassword = "";
+		}
+		adminSocketAddress    = options.get("helper_agent_admin_socket_address");
+		exitPassword          = options.get("helper_agent_exit_password");
+		loggingAgentAddress   = options.get("logging_agent_address");
+		loggingAgentPassword  = options.get("logging_agent_password");
+		adminToolStatusPassword = options.get("admin_tool_status_password");
+		
+		// Optional options.
+		prestartUrls          = options.getStrSet("prestart_urls", false);
+		requestSocketLink     = options.get("request_socket_link", false);
+	}
+};
+
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_HELPER_AGENT_OPTIONS_H_ */
diff --git a/ext/common/agents/HelperAgent/FileBackedPipe.h b/ext/common/agents/HelperAgent/FileBackedPipe.h
new file mode 100644
index 0000000..2ad4337
--- /dev/null
+++ b/ext/common/agents/HelperAgent/FileBackedPipe.h
@@ -0,0 +1,732 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011, 2012 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_FILE_BACKED_PIPE_H_
+#define _PASSENGER_FILE_BACKED_PIPE_H_
+
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <boost/shared_array.hpp>
+#include <boost/function.hpp>
+#include <boost/bind.hpp>
+#include <string>
+#include <sstream>
+#include <memory>
+#include <cstdlib>
+#include <cassert>
+#include <cstring>
+#include <unistd.h>
+#include <pthread.h>
+
+#include <oxt/macros.hpp>
+#include <SafeLibev.h>
+#include <MultiLibeio.h>
+#include <StaticString.h>
+#include <Exceptions.h>
+#include <FileDescriptor.h>
+#include <Utils/StrIntUtils.h>
+
+namespace Passenger {
+
+using namespace std;
+using namespace boost;
+
+
+/**
+ * A pipe which buffers data in memory, or if the data becomes too large, to disk.
+ * If you write some data to the pipe then the pipe will push some data to the
+ * 'onData' callback. This callback is allowed to take an arbitrary amount of time
+ * to consume the data. The pipe guarantees that, while the callback is busy
+ * consuming data, any newly written data will be buffered, either to memory
+ * or to disk. Thus, one can write a virtually unlimited amount of data into
+ * the pipe without filling up the system's RAM, even when the data is slowly
+ * consumed. FileBackedPipe is highly optimized: in case the 'onData' callback
+ * is fast enough, FileBackedPipe operates in an entirely zero-copy manner and
+ * without any kinds of heap allocations.
+ *
+ * By default, FileBackedPipe is stopped, meaning that when you write to it,
+ * the data will be buffered and the 'onData' callback will not be called.
+ * You must start it by calling start().
+ *
+ * When you're done writing data to the pipe, call end() to signal end-of-stream.
+ * Once all buffered data has been consumed, the 'onEnd' callback will be called.
+ *
+ * FileBackedPipe assumes the usage of an event loop. It is *not* thread-safe!
+ * All FileBackedPipe methods may only be called from the event loop on which it
+ * is installed.
+ *
+ * FileBackedPipe *must* be dynamically allocated and assigned to a shared_ptr.
+ */
+class FileBackedPipe: public enable_shared_from_this<FileBackedPipe> {
+public:
+	class ConsumeCallback {
+	private:
+		mutable weak_ptr<FileBackedPipe> wself;
+		unsigned int generation;
+
+	public:
+		ConsumeCallback() { }
+
+		ConsumeCallback(const shared_ptr<FileBackedPipe> &self, unsigned int _generation)
+			: wself(self),
+			  generation(_generation)
+			{ }
+
+		void operator()(size_t consumed, bool done) const {
+			shared_ptr<FileBackedPipe> self = wself.lock();
+			if (self != NULL) {
+				wself.reset();
+				self->dataConsumed(consumed, done, generation);
+			}
+		}
+
+		function<void (size_t, bool)> toFunction() const {
+			shared_ptr<FileBackedPipe> self = wself.lock();
+			if (self != NULL) {
+				return boost::bind(&ConsumeCallback::operator(), this, _1, _2);
+			} else {
+				return function<void (size_t, bool)>();
+			}
+		}
+	};
+
+	typedef void (*DataCallback)(const shared_ptr<FileBackedPipe> &source, const char *data,
+		size_t size, const ConsumeCallback &consumed);
+	typedef void (*ErrorCallback)(const shared_ptr<FileBackedPipe> &source, int errorCode);
+	typedef void (*Callback)(const shared_ptr<FileBackedPipe> &source);
+
+	enum DataState {
+		IN_MEMORY,
+		OPENING_FILE,
+		IN_FILE
+	};
+
+private:
+	typedef function<void (int err, const char *data, size_t size)> EioReadCallback;
+
+	// We already have a shared_ptr reference to libev through MultiLibeio.
+	const string dir;
+	size_t threshold;
+
+	const char *currentData;
+	size_t currentDataSize;
+	MultiLibeio libeio;
+	unsigned int consumedCallCount;
+	unsigned int generation;
+
+	bool started;
+	bool ended;
+	bool endReached;
+	bool hasError;
+
+	enum {
+		/* No data event handler is currently being called. */
+		NOT_CALLING_EVENT,
+		/* The data event handler is currently being called and it hasn't returned yet. */
+		CALLING_EVENT_NOW,
+		/* The data event handler was called and it returned, but it hasn't called its finish callback yet. */
+		WAITING_FOR_EVENT_FINISH,
+		/* The data event handler finish callback has been called and is
+		 * fetching more buffered data so that it can call the data event
+		 * handler again.
+		 */
+		PREPARING_NEXT_EVENT_CALL
+	} dataEventState;
+
+	DataState dataState;
+
+	struct {
+		char *data;
+		size_t size;
+	} memory;
+	struct {
+		FileDescriptor fd;
+		/* Whether there's currently an operation in progress to write the contents
+		 * of the buffer to the file. */
+		bool writingToFile;
+		/* Number of bytes written to the file so far. This number is incremented
+		 * *after* the file write operation has finished, not before. */
+		off_t writtenSize;
+		/* Offset in the file at which data should be read. This can be
+		 * temporarily larger than 'writtenSize'. If this is the case then
+		 * the data with offset past 'writtenSize' should be obtained from
+		 * the writeBuffer.
+		 */
+		off_t readOffset;
+		/* Data buffered in memory, to be written to the file ASAP. Data is
+		 * removed from the buffer *after* the file write operation has
+		 * finished, not before.
+		 */
+		string writeBuffer;
+	} file;
+
+	bool callOnData(const char *data, size_t size, bool passDataToConsumedCallback) {
+		unsigned int oldConsumedCallCount = consumedCallCount;
+		dataEventState = CALLING_EVENT_NOW;
+
+		assert(currentData == NULL);
+		assert(currentDataSize == 0);
+		if (passDataToConsumedCallback) {
+			currentData = data;
+		}
+		currentDataSize = size;
+
+		if (OXT_LIKELY(onData != NULL)) {
+			onData(shared_from_this(), data, size, ConsumeCallback(shared_from_this(),
+				generation));
+		} else {
+			real_dataConsumed(0, true, generation);
+		}
+
+		if (consumedCallCount == oldConsumedCallCount) {
+			// 'consumed' callback not called.
+			dataEventState = WAITING_FOR_EVENT_FINISH;
+			return false;
+		} else {
+			// 'consumed' callback called.
+			assert(dataEventState == NOT_CALLING_EVENT
+				|| dataEventState == PREPARING_NEXT_EVENT_CALL);
+			return true;
+		}
+	}
+
+	void callOnEnd() {
+		assert(!endReached);
+		endReached = true;
+		if (onEnd != NULL) {
+			onEnd(shared_from_this());
+		}
+	}
+
+	void callOnCommit() {
+		if (onCommit != NULL) {
+			onCommit(shared_from_this());
+		}
+	}
+
+	void setError(int errorCode) {
+		hasError = true;
+		if (onError != NULL) {
+			onError(shared_from_this(), errorCode);
+		}
+	}
+
+	SafeLibev *getLibev() const {
+		return libeio.getLibev().get();
+	}
+
+	void addToBuffer(const char *data, size_t size) {
+		size_t bytesToCopy;
+
+		switch (dataState) {
+		case IN_MEMORY:
+			bytesToCopy = std::min(size, threshold - memory.size);
+			if (bytesToCopy == size) {
+				if (memory.data == NULL) {
+					assert(memory.size == 0);
+					memory.data = new char[threshold];
+				}
+				memcpy(memory.data + memory.size, data, bytesToCopy);
+				memory.size += size;
+			} else {
+				dataState = OPENING_FILE;
+				assert(file.fd == -1);
+				assert(file.writtenSize == 0);
+				assert(file.readOffset == 0);
+				file.writeBuffer.reserve(memory.size + size);
+				file.writeBuffer.append(memory.data, memory.size);
+				file.writeBuffer.append(data, size);
+				delete[] memory.data;
+				memory.data = NULL;
+				memory.size = 0;
+
+				stringstream filename;
+				filename << dir;
+				filename << "/buffer.";
+				filename << getpid();
+				filename << ".";
+				filename << pointerToIntString(this);
+				libeio.open(filename.str().c_str(), O_CREAT | O_RDWR | O_TRUNC, 0, 0,
+					boost::bind(&FileBackedPipe::openCallback, this,
+						_1, filename.str(), generation,
+						weak_ptr<FileBackedPipe>(shared_from_this())
+					)
+				);
+			}
+			break;
+		
+		case OPENING_FILE:
+			file.writeBuffer.append(data, size);
+			break;
+
+		case IN_FILE:
+			file.writeBuffer.append(data, size);
+			writeBufferToFile();
+			break;
+		
+		default:
+			abort();
+		}
+	}
+
+	void writeBufferToFile() {
+		assert(dataState == IN_FILE);
+		if (!file.writingToFile) {
+			shared_array<char> buffer(new char[file.writeBuffer.size()]);
+			memcpy(buffer.get(), file.writeBuffer.data(), file.writeBuffer.size());
+			file.writingToFile = true;
+			libeio.write(file.fd, buffer.get(), file.writeBuffer.size(),
+				file.writtenSize, 0, boost::bind(
+					&FileBackedPipe::writeBufferToFileCallback, this,
+					_1, file.fd, buffer, file.writeBuffer.size(),
+					generation,
+					weak_ptr<FileBackedPipe>(shared_from_this())
+				)
+			);
+		}
+	}
+
+	void writeBufferToFileCallback(eio_req req, FileDescriptor fd,
+		shared_array<char> buffer, size_t size,
+		unsigned int generation, weak_ptr<FileBackedPipe> wself)
+	{
+		shared_ptr<FileBackedPipe> self = wself.lock();
+		if (self == NULL || EIO_CANCELLED(&req) || generation != self->generation) {
+			return;
+		}
+
+		if (req.result < 0) {
+			setError(req.errorno);
+		} else {
+			assert(dataState == IN_FILE);
+			file.writeBuffer.erase(0, size);
+			file.writtenSize += size;
+			file.writingToFile = false;
+			if (file.writeBuffer.empty()) {
+				callOnCommit();
+			} else {
+				writeBufferToFile();
+			}
+		}
+	}
+
+	void openCallback(eio_req req, string filename, unsigned int generation,
+		weak_ptr<FileBackedPipe> &wself)
+	{
+		shared_ptr<FileBackedPipe> self = wself.lock();
+		if (self == NULL || EIO_CANCELLED(&req) || generation != self->generation) {
+			if (req.result != -1 || EIO_CANCELLED(&req)) {
+				eio_close(req.result, 0, successCallback, NULL);
+				eio_unlink(filename.c_str(), 0, successCallback, NULL);
+			}
+			return;
+		}
+
+		assert(dataState = OPENING_FILE);
+		if (req.result < 0) {
+			setError(req.errorno);
+		} else {
+			eio_unlink(filename.c_str(), 0, successCallback, NULL);
+			if (openTimeout == 0) {
+				finalizeOpenFile(FileDescriptor(req.result));
+			} else {
+				getLibev()->runAfter(openTimeout,
+					boost::bind(&FileBackedPipe::finalizeOpenFileAfterTimeout, this,
+						weak_ptr<FileBackedPipe>(shared_from_this()),
+						generation, FileDescriptor(req.result)));
+			}
+		}
+	}
+
+	void finalizeOpenFile(const FileDescriptor &fd) {
+		dataState = IN_FILE;
+		file.fd = fd;
+		writeBufferToFile();
+	}
+
+	void finalizeOpenFileAfterTimeout(weak_ptr<FileBackedPipe> wself,
+		unsigned int generation, FileDescriptor fd)
+	{
+		shared_ptr<FileBackedPipe> self = wself.lock();
+		if (self != NULL || generation != self->generation) {
+			self->finalizeOpenFile(fd);
+		}
+	}
+
+	static int successCallback(eio_req *req) {
+		return 0;
+	}
+
+	void readBlockFromFileOrWriteBuffer(const EioReadCallback &callback) {
+		if (file.readOffset >= file.writtenSize) {
+			StaticString data = StaticString(file.writeBuffer).substr(
+				file.readOffset - file.writtenSize, 1024 * 16);
+			callback(0, data.data(), data.size());
+		} else {
+			shared_array<char> buffer(new char[1024 * 16]);
+			eio_req *req = libeio.read(file.fd, buffer.get(), 1024 * 16, file.readOffset, 0,
+				boost::bind(
+					&FileBackedPipe::readCallback, this,
+					_1, file.fd, buffer, callback, generation,
+					weak_ptr<FileBackedPipe>(shared_from_this())
+				)
+			);
+			if (req == NULL) {
+				throw RuntimeException("eio_read() failed!");
+			}
+		}
+	}
+
+	void readCallback(eio_req req, FileDescriptor fd, shared_array<char> buffer,
+		EioReadCallback callback, unsigned int generation, weak_ptr<FileBackedPipe> wself)
+	{
+		shared_ptr<FileBackedPipe> self = wself.lock();
+		if (self == NULL || EIO_CANCELLED(&req) || generation != self->generation) {
+			return;
+		}
+
+		if (req.result < 0) {
+			callback(req.errorno, NULL, 0);
+		} else {
+			callback(0, buffer.get(), req.result);
+		}
+	}
+
+	void dataConsumed(size_t consumed, bool done, unsigned int oldGeneration) {
+		if (OXT_UNLIKELY(oldGeneration != generation)) {
+			throw RuntimeException("Don't call the consumed callback after you've reset the FileBackedPipe!");
+		}
+		
+		if (pthread_equal(pthread_self(), getLibev()->getCurrentThread())) {
+			real_dataConsumed(consumed, done, oldGeneration);
+		} else {
+			getLibev()->runLater(boost::bind(
+				&FileBackedPipe::real_dataConsumed, this,
+				consumed, done, oldGeneration));
+		}
+	}
+
+	void real_dataConsumed(size_t consumed, bool done, unsigned int oldGeneration) {
+		if (OXT_UNLIKELY(oldGeneration != generation)) {
+			throw RuntimeException("Don't call the consumed callback after you've reset the FileBackedPipe!");
+		}
+
+		const char *data = currentData;
+		size_t size = currentDataSize;
+		currentData = NULL;
+		currentDataSize = 0;
+
+		assert(consumed <= size);
+		consumedCallCount++;
+		if (done) {
+			started = false;
+		}
+
+		if (getBufferSize() == 0) {
+			// Data passed to write() was immediately consumed.
+			assert(dataEventState == CALLING_EVENT_NOW);
+			assert(data != NULL);
+			if (started) {
+				if (consumed < size) {
+					unsigned int oldGeneration = generation;
+					bool immediatelyConsumed = callOnData(
+						data + consumed,
+						size - consumed,
+						true);
+					if (generation == oldGeneration && !immediatelyConsumed) {
+						addToBuffer(data + consumed, size - consumed);
+					}
+				} else {
+					dataEventState = NOT_CALLING_EVENT;
+					if (ended) {
+						callOnEnd();
+					}
+				}
+			} else {
+				dataEventState = NOT_CALLING_EVENT;
+				addToBuffer(data + consumed, size - consumed);
+			}
+
+		} else {
+			/* Data passed to write() was either immediately consumed or was consumed later,
+			 * but we don't care which of those situations occurred: the consumed data is
+			 * in the buffer and we have to erase it.
+			 */
+			processBuffer(consumed);
+		}
+	}
+
+	void processBuffer(size_t consumed) {
+		assert(getBufferSize() > 0);
+
+		dataEventState = NOT_CALLING_EVENT;
+
+		switch (dataState) {
+		case IN_MEMORY:
+			memmove(memory.data, memory.data + consumed, memory.size - consumed);
+			memory.size -= consumed;
+			if (started) {
+				if (memory.size == 0) {
+					//callOnConsumed();
+					if (ended) {
+						callOnEnd();
+					}
+				} else {
+					callOnData(memory.data, memory.size, false);
+				}
+			}
+			break;
+
+		case OPENING_FILE:
+		case IN_FILE:
+			file.readOffset += consumed;
+			if (started) {
+				if (getBufferSize() == 0) {
+					//callOnConsumed();
+					if (ended) {
+						callOnEnd();
+					}
+				} else {
+					dataEventState = PREPARING_NEXT_EVENT_CALL;
+					readBlockFromFileOrWriteBuffer(boost::bind(
+						&FileBackedPipe::processBuffer_readCallback, this,
+						_1, _2, _3));
+				}
+			}
+			break;
+		
+		default:
+			abort();
+		}
+	}
+
+	void processBuffer_readCallback(int err, const char *data, size_t size) {
+		if (err != 0) {
+			setError(err);
+		} else {
+			callOnData(data, size, false);
+		}
+	}
+
+public:
+	DataCallback onData;
+	Callback onEnd;
+	ErrorCallback onError;
+	Callback onCommit;
+	void *userData;
+
+	// The amount of time, in milliseconds, that the open() operation
+	// should at least take before it finishes. For unit testing purposes.
+	unsigned int openTimeout;
+
+	FileBackedPipe(const string &_dir, size_t _threshold = 1024 * 8)
+		: dir(_dir),
+		  threshold(_threshold),
+		  openTimeout(0)
+	{
+		onData = NULL;
+		onEnd = NULL;
+		onError = NULL;
+		onCommit = NULL;
+
+		consumedCallCount = 0;
+		generation = 0;
+		currentData = NULL;
+		currentDataSize = 0;
+		started = false;
+		ended = false;
+		endReached = false;
+		hasError = false;
+		dataEventState = NOT_CALLING_EVENT;
+		dataState = IN_MEMORY;
+		memory.data = NULL;
+		memory.size = 0;
+		file.writingToFile = false;
+		file.readOffset = 0;
+		file.writtenSize = 0;
+	}
+
+	~FileBackedPipe() {
+		delete[] memory.data;
+	}
+	
+	bool resetable() const {
+		//return dataState == IN_MEMORY;
+		return true;
+	}
+
+	void reset(const SafeLibevPtr &libev = SafeLibevPtr()) {
+		generation++;
+		libeio = MultiLibeio(libev);
+		currentData = NULL;
+		currentDataSize = 0;
+		started = false;
+		ended = false;
+		endReached = false;
+		hasError = false;
+		dataEventState = NOT_CALLING_EVENT;
+		dataState = IN_MEMORY;
+		delete[] memory.data;
+		memory.data = NULL;
+		memory.size = 0;
+		file.fd = FileDescriptor();
+		file.writingToFile = false;
+		file.readOffset = 0;
+		file.writtenSize = 0;
+	}
+
+	void setThreshold(size_t value) {
+		threshold = value;
+	}
+
+	/**
+	 * Returns the amount of data that has been buffered, both in memory and on disk.
+	 */
+	size_t getBufferSize() const {
+		switch (dataState) {
+		case IN_MEMORY:
+			return memory.size;
+
+		case OPENING_FILE:
+		case IN_FILE:
+			return (ssize_t) file.writtenSize
+				- file.readOffset
+				+ file.writeBuffer.size();
+		
+		default:
+			abort();
+		}
+	}
+
+	DataState getDataState() const {
+		return dataState;
+	}
+
+	/**
+	 * Writes the given data to the pipe. Returns whether all data is immediately
+	 * consumed by the 'onData' callback or whether the data buffered into a memory buffer.
+	 * That is, if the data is not immediately consumed and it is queued to be written
+	 * to disk, then false is returned. In the latter case, the 'onCommit' callback is
+	 * called when all buffered data has been written to disk.
+	 *
+	 * Note that this method may invoke the 'onData' callback immediately.
+	 */
+	bool write(const char *data, size_t size) {
+		assert(!ended);
+		assert(!hasError);
+
+		if (OXT_UNLIKELY(dataEventState == CALLING_EVENT_NOW)) {
+			throw RuntimeException("This function may not be called within a FileBackedPipe event handler.");
+
+		} else if (!started || dataEventState != NOT_CALLING_EVENT) {
+			assert(!started || getBufferSize() > 0);
+			addToBuffer(data, size);
+			return dataState == IN_MEMORY;
+
+		} else {
+			assert(started);
+			assert(dataEventState == NOT_CALLING_EVENT);
+			assert(getBufferSize() == 0);
+
+			unsigned int oldGeneration = generation;
+			bool immediatelyConsumed = callOnData(data, size, true);
+			if (generation == oldGeneration) {
+				assert(dataEventState != CALLING_EVENT_NOW);
+				if (!immediatelyConsumed) {
+					addToBuffer(data, size);
+					return dataState == IN_MEMORY;
+				} else {
+					return true;
+				}
+			} else {
+				return true;
+			}
+		}
+	}
+
+	void end() {
+		assert(!ended);
+		assert(!hasError);
+
+		if (OXT_UNLIKELY(dataEventState == CALLING_EVENT_NOW)) {
+			throw RuntimeException("This function may not be called within a FileBackedPipe event handler.");
+
+		} else if (!started || dataEventState != NOT_CALLING_EVENT) {
+			assert(!started || getBufferSize() > 0);
+			ended = true;
+
+		} else {
+			assert(started);
+			assert(dataEventState == NOT_CALLING_EVENT);
+			assert(getBufferSize() == 0);
+
+			ended = true;
+			callOnEnd();
+		}
+	}
+
+	bool isStarted() const {
+		return started;
+	}
+
+	bool reachedEnd() const {
+		return endReached;
+	}
+
+	bool isCommittingToDisk() const {
+		return (dataState == OPENING_FILE || dataState == IN_FILE) && !file.writeBuffer.empty();
+	}
+
+	void start() {
+		assert(!hasError);
+		if (OXT_UNLIKELY(dataEventState == CALLING_EVENT_NOW)) {
+			throw RuntimeException("This function may not be called within a FileBackedPipe event handler.");
+		}
+		if (!started && !endReached) {
+			started = true;
+			if (dataEventState == NOT_CALLING_EVENT) {
+				if (getBufferSize() > 0) {
+					processBuffer(0);
+				} else if (ended) {
+					callOnEnd();
+				}
+			}
+		}
+	}
+
+	void stop() {
+		if (OXT_UNLIKELY(dataEventState == CALLING_EVENT_NOW)) {
+			throw RuntimeException("This function may not be called within a FileBackedPipe event handler.");
+		}
+		started = false;
+	}
+};
+
+typedef shared_ptr<FileBackedPipe> FileBackedPipePtr;
+
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_FILE_BACKED_PIPE_H_ */
diff --git a/ext/common/agents/HelperAgent/Main.cpp b/ext/common/agents/HelperAgent/Main.cpp
new file mode 100644
index 0000000..79f7263
--- /dev/null
+++ b/ext/common/agents/HelperAgent/Main.cpp
@@ -0,0 +1,609 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/un.h>
+#include <cstring>
+#include <cassert>
+#include <cerrno>
+#include <unistd.h>
+#include <limits.h>
+#include <pwd.h>
+#include <grp.h>
+
+#include <set>
+#include <vector>
+#include <string>
+#include <iostream>
+#include <sstream>
+
+#include <boost/thread.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/make_shared.hpp>
+#include <oxt/thread.hpp>
+#include <oxt/system_calls.hpp>
+
+#include <ev++.h>
+
+#include <agents/HelperAgent/RequestHandler.h>
+#include <agents/HelperAgent/RequestHandler.cpp>
+#include <agents/HelperAgent/AgentOptions.h>
+
+#include <agents/Base.h>
+#include <Constants.h>
+#include <ApplicationPool2/Pool.h>
+#include <MessageServer.h>
+#include <MessageReadersWriters.h>
+#include <FileDescriptor.h>
+#include <ResourceLocator.h>
+#include <BackgroundEventLoop.cpp>
+#include <ServerInstanceDir.h>
+#include <UnionStation.h>
+#include <Exceptions.h>
+#include <MultiLibeio.cpp>
+#include <Utils.h>
+#include <Utils/Timer.h>
+#include <Utils/IOUtils.h>
+#include <Utils/MessageIO.h>
+#include <Utils/VariantMap.h>
+
+using namespace boost;
+using namespace oxt;
+using namespace Passenger;
+using namespace Passenger::ApplicationPool2;
+
+
+class RemoteController: public MessageServer::Handler {
+private:
+	struct SpecificContext: public MessageServer::ClientContext {
+	};
+	
+	typedef MessageServer::CommonClientContext CommonClientContext;
+	
+	shared_ptr<RequestHandler> requestHandler;
+	PoolPtr pool;
+	
+	
+	/*********************************************
+	 * Message handler methods
+	 *********************************************/
+	
+	void processDetachProcess(CommonClientContext &commonContext, SpecificContext *specificContext,
+		const vector<string> &args)
+	{
+		TRACE_POINT();
+		commonContext.requireRights(Account::DETACH);
+		if (pool->detachProcess((pid_t) atoi(args[1]))) {
+			writeArrayMessage(commonContext.fd, "true", NULL);
+		} else {
+			writeArrayMessage(commonContext.fd, "false", NULL);
+		}
+	}
+
+	void processDetachProcessByKey(CommonClientContext &commonContext, SpecificContext *specificContext,
+		const vector<string> &args)
+	{
+		TRACE_POINT();
+		commonContext.requireRights(Account::DETACH);
+		// TODO: implement this
+		writeArrayMessage(commonContext.fd, "false", NULL);
+	}
+	
+	bool processInspect(CommonClientContext &commonContext, SpecificContext *specificContext,
+		const vector<string> &args)
+	{
+		TRACE_POINT();
+		commonContext.requireRights(Account::INSPECT_BASIC_INFO);
+		if ((args.size() - 1) % 2 != 0) {
+			return false;
+		}
+
+		VariantMap map;
+		vector<string>::const_iterator it = args.begin(), end = args.end();
+		it++;
+		while (it != end) {
+			const string &key = *it;
+			it++;
+			const string &value = *it;
+			map.set(key, value);
+			it++;
+		}
+		writeScalarMessage(commonContext.fd, pool->inspect(Pool::InspectOptions(map)));
+		return true;
+	}
+	
+	void processToXml(CommonClientContext &commonContext, SpecificContext *specificContext,
+		const vector<string> &args)
+	{
+		TRACE_POINT();
+		commonContext.requireRights(Account::INSPECT_BASIC_INFO);
+		bool includeSensitiveInfo =
+			commonContext.account->hasRights(Account::INSPECT_SENSITIVE_INFO) &&
+			args[1] == "true";
+		writeScalarMessage(commonContext.fd, pool->toXml(includeSensitiveInfo));
+	}
+
+	void processBacktraces(CommonClientContext &commonContext, SpecificContext *specificContext,
+		const vector<string> &args)
+	{
+		TRACE_POINT();
+		commonContext.requireRights(Account::INSPECT_BACKTRACES);
+		writeScalarMessage(commonContext.fd, oxt::thread::all_backtraces());
+	}
+
+	void processRequests(CommonClientContext &commonContext, SpecificContext *specificContext,
+		const vector<string> &args)
+	{
+		TRACE_POINT();
+		stringstream stream;
+		commonContext.requireRights(Account::INSPECT_REQUESTS);
+		requestHandler->inspect(stream);
+		writeScalarMessage(commonContext.fd, stream.str());
+	}
+	
+public:
+	RemoteController(const shared_ptr<RequestHandler> &requestHandler, const PoolPtr &pool) {
+		this->requestHandler = requestHandler;
+		this->pool = pool;
+	}
+	
+	virtual MessageServer::ClientContextPtr newClient(CommonClientContext &commonContext) {
+		return make_shared<SpecificContext>();
+	}
+	
+	virtual bool processMessage(CommonClientContext &commonContext,
+	                            MessageServer::ClientContextPtr &_specificContext,
+	                            const vector<string> &args)
+	{
+		SpecificContext *specificContext = (SpecificContext *) _specificContext.get();
+		try {
+			if (isCommand(args, "detach_process", 1)) {
+				processDetachProcess(commonContext, specificContext, args);
+			} else if (isCommand(args, "detach_process_by_key", 1)) {
+				processDetachProcessByKey(commonContext, specificContext, args);
+			} else if (args[0] == "inspect") {
+				return processInspect(commonContext, specificContext, args);
+			} else if (isCommand(args, "toXml", 1)) {
+				processToXml(commonContext, specificContext, args);
+			} else if (isCommand(args, "backtraces", 0)) {
+				processBacktraces(commonContext, specificContext, args);
+			} else if (isCommand(args, "requests", 0)) {
+				processRequests(commonContext, specificContext, args);
+			} else {
+				return false;
+			}
+		} catch (const SecurityException &) {
+			/* Client does not have enough rights to perform a certain action.
+			 * It has already been notified of this; ignore exception and move on.
+			 */
+		}
+		return true;
+	}
+};
+
+class ExitHandler: public MessageServer::Handler {
+private:
+	EventFd &exitEvent;
+	
+public:
+	ExitHandler(EventFd &_exitEvent)
+		: exitEvent(_exitEvent)
+	{ }
+	
+	virtual bool processMessage(MessageServer::CommonClientContext &commonContext,
+	                            MessageServer::ClientContextPtr &handlerSpecificContext,
+	                            const vector<string> &args)
+	{
+		if (args[0] == "exit") {
+			TRACE_POINT();
+			commonContext.requireRights(Account::EXIT);
+			UPDATE_TRACE_POINT();
+			exitEvent.notify();
+			UPDATE_TRACE_POINT();
+			writeArrayMessage(commonContext.fd, "exit command received", NULL);
+			return true;
+		} else {
+			return false;
+		}
+	}
+};
+
+/**
+ * A representation of the Server responsible for handling Client instances.
+ *
+ * @see Client
+ */
+class Server {
+private:
+	static const int MESSAGE_SERVER_THREAD_STACK_SIZE = 128 * 1024;
+	static const int EVENT_LOOP_THREAD_STACK_SIZE = 256 * 1024;
+	
+	FileDescriptor feedbackFd;
+	const AgentOptions &options;
+	
+	BackgroundEventLoop poolLoop;
+	BackgroundEventLoop requestLoop;
+
+	FileDescriptor requestSocket;
+	ServerInstanceDir serverInstanceDir;
+	ServerInstanceDir::GenerationPtr generation;
+	UnionStation::LoggerFactoryPtr loggerFactory;
+	RandomGeneratorPtr randomGenerator;
+	SpawnerFactoryPtr spawnerFactory;
+	PoolPtr pool;
+	ev::sig sigquitWatcher;
+	AccountsDatabasePtr accountsDatabase;
+	MessageServerPtr messageServer;
+	ResourceLocator resourceLocator;
+	shared_ptr<RequestHandler> requestHandler;
+	shared_ptr<oxt::thread> prestarterThread;
+	shared_ptr<oxt::thread> messageServerThread;
+	shared_ptr<oxt::thread> eventLoopThread;
+	EventFd exitEvent;
+	
+	/**
+	 * Starts listening for client connections on this server's request socket.
+	 *
+	 * @throws SystemException Something went wrong while trying to create and bind to the Unix socket.
+	 * @throws RuntimeException Something went wrong.
+	 */
+	void startListening() {
+		this_thread::disable_syscall_interruption dsi;
+		requestSocket = createUnixServer(getRequestSocketFilename().c_str());
+		
+		int ret, e;
+		do {
+			ret = chmod(getRequestSocketFilename().c_str(), S_ISVTX |
+				S_IRUSR | S_IWUSR | S_IXUSR |
+				S_IRGRP | S_IWGRP | S_IXGRP |
+				S_IROTH | S_IWOTH | S_IXOTH);
+		} while (ret == -1 && errno == EINTR);
+
+		setNonBlocking(requestSocket);
+
+		if (!options.requestSocketLink.empty()) {
+			struct stat buf;
+
+			// If this is a symlink then we'll want to check the file the symlink
+			// points to, so we use stat() instead of lstat().
+			ret = syscalls::stat(options.requestSocketLink.c_str(), &buf);
+			if (ret == 0 || (ret == -1 && errno == ENOENT)) {
+				if (ret == -1 || buf.st_mode & S_IFSOCK) {
+					if (syscalls::unlink(options.requestSocketLink.c_str()) == -1) {
+						e = errno;
+						throw FileSystemException("Cannot delete existing socket file '" +
+							options.requestSocketLink + "'", e, options.requestSocketLink);
+					}
+				} else {
+					throw RuntimeException("File '" + options.requestSocketLink +
+						"' already exists and is not a Unix domain socket");
+				}
+			} else if (ret == -1 && errno != ENOENT) {
+				e = errno;
+				throw FileSystemException("Cannot stat() file '" + options.requestSocketLink + "'",
+					e,
+					options.requestSocketLink);
+			}
+
+			do {
+				ret = symlink(getRequestSocketFilename().c_str(),
+					options.requestSocketLink.c_str());
+			} while (ret == -1 && errno == EINTR);
+			if (ret == -1) {
+				e = errno;
+				throw FileSystemException("Cannot create a symlink '" +
+					options.requestSocketLink +
+					"' to '" + getRequestSocketFilename() + "'",
+					e,
+					options.requestSocketLink);
+			}
+		}
+	}
+	
+	/**
+	 * Lowers this process's privilege to that of <em>username</em> and <em>groupname</em>.
+	 */
+	void lowerPrivilege(const string &username, const string &groupname) {
+		struct passwd *userEntry;
+		struct group  *groupEntry;
+		int            e;
+		
+		userEntry = getpwnam(username.c_str());
+		if (userEntry == NULL) {
+			throw NonExistentUserException(string("Unable to lower Passenger "
+				"HelperAgent's privilege to that of user '") + username +
+				"': user does not exist.");
+		}
+		groupEntry = getgrnam(groupname.c_str());
+		if (groupEntry == NULL) {
+			throw NonExistentGroupException(string("Unable to lower Passenger "
+				"HelperAgent's privilege to that of user '") + username +
+				"': user does not exist.");
+		}
+		
+		if (initgroups(username.c_str(), userEntry->pw_gid) != 0) {
+			e = errno;
+			throw SystemException(string("Unable to lower Passenger HelperAgent's "
+				"privilege to that of user '") + username +
+				"': cannot set supplementary groups for this user", e);
+		}
+		if (setgid(groupEntry->gr_gid) != 0) {
+			e = errno;
+			throw SystemException(string("Unable to lower Passenger HelperAgent's "
+				"privilege to that of user '") + username +
+				"': cannot set group ID", e);
+		}
+		if (setuid(userEntry->pw_uid) != 0) {
+			e = errno;
+			throw SystemException(string("Unable to lower Passenger HelperAgent's "
+				"privilege to that of user '") + username +
+				"': cannot set user ID", e);
+		}
+	}
+	
+	void onSigquit(ev::sig &signal, int revents) {
+		requestHandler->inspect(cerr);
+		cerr.flush();
+		cerr << "\n" << pool->inspect();
+		cerr.flush();
+		cerr << "\n" << oxt::thread::all_backtraces();
+		cerr.flush();
+	}
+
+	void installDiagnosticsDumper() {
+		::installDiagnosticsDumper(dumpDiagnosticsOnCrash, this);
+	}
+
+	void uninstallDiagnosticsDumper() {
+		::installDiagnosticsDumper(NULL, NULL);
+	}
+
+	static void dumpDiagnosticsOnCrash(void *userData) {
+		Server *self = (Server *) userData;
+
+		cerr << "### Request handler state\n";
+		self->requestHandler->inspect(cerr);
+		cerr << "\n";
+		cerr.flush();
+		
+		cerr << "### Pool state (simple)\n";
+		// Do not lock, the crash may occur within the pool.
+		Pool::InspectOptions options;
+		options.verbose = true;
+		cerr << self->pool->inspect(options, false);
+		cerr << "\n";
+		cerr.flush();
+
+		cerr << "### Pool state (XML)\n";
+		cerr << self->pool->toXml(true, false);
+		cerr << "\n\n";
+		cerr.flush();
+
+		cerr << "### Backtraces\n";
+		cerr << oxt::thread::all_backtraces();
+		cerr.flush();
+	}
+	
+public:
+	Server(FileDescriptor feedbackFd, const AgentOptions &_options)
+		: options(_options),
+		  requestLoop(true),
+		  serverInstanceDir(_options.serverInstanceDir, false),
+		  resourceLocator(options.passengerRoot)
+	{
+		TRACE_POINT();
+		this->feedbackFd = feedbackFd;
+		
+		UPDATE_TRACE_POINT();
+		generation = serverInstanceDir.getGeneration(options.generationNumber);
+		startListening();
+		accountsDatabase = make_shared<AccountsDatabase>();
+		accountsDatabase->add("_passenger-status", options.adminToolStatusPassword, false,
+			Account::INSPECT_BASIC_INFO | Account::INSPECT_SENSITIVE_INFO |
+			Account::INSPECT_BACKTRACES | Account::INSPECT_REQUESTS);
+		accountsDatabase->add("_web_server", options.exitPassword, false, Account::EXIT);
+		messageServer = make_shared<MessageServer>(
+			parseUnixSocketAddress(options.adminSocketAddress), accountsDatabase);
+		
+		createFile(generation->getPath() + "/helper_agent.pid",
+			toString(getpid()), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+		
+		if (geteuid() == 0 && !options.userSwitching) {
+			lowerPrivilege(options.defaultUser, options.defaultGroup);
+		}
+
+		UPDATE_TRACE_POINT();
+		randomGenerator = make_shared<RandomGenerator>();
+		// Check whether /dev/urandom is actually random.
+		// https://code.google.com/p/phusion-passenger/issues/detail?id=516
+		if (randomGenerator->generateByteString(16) == randomGenerator->generateByteString(16)) {
+			throw RuntimeException("Your random number device, /dev/urandom, appears to be broken. "
+				"It doesn't seem to be returning random data. Please fix this.");
+		}
+		
+		UPDATE_TRACE_POINT();
+		loggerFactory = make_shared<UnionStation::LoggerFactory>(options.loggingAgentAddress,
+			"logging", options.loggingAgentPassword);
+		spawnerFactory = make_shared<SpawnerFactory>(poolLoop.safe,
+			resourceLocator, generation, make_shared<SpawnerConfig>(randomGenerator));
+		pool = make_shared<Pool>(poolLoop.safe.get(), spawnerFactory, loggerFactory,
+			randomGenerator);
+		pool->initialize();
+		pool->setMax(options.maxPoolSize);
+		//pool->setMaxPerApp(maxInstancesPerApp);
+		pool->setMaxIdleTime(options.poolIdleTime * 1000000);
+		
+		requestHandler = make_shared<RequestHandler>(requestLoop.safe,
+			requestSocket, pool, options);
+
+		messageServer->addHandler(make_shared<RemoteController>(requestHandler, pool));
+		messageServer->addHandler(ptr(new ExitHandler(exitEvent)));
+
+		sigquitWatcher.set(requestLoop.loop);
+		sigquitWatcher.set(SIGQUIT);
+		sigquitWatcher.set<Server, &Server::onSigquit>(this);
+		sigquitWatcher.start();
+		
+		UPDATE_TRACE_POINT();
+		writeArrayMessage(feedbackFd,
+			"initialized",
+			getRequestSocketFilename().c_str(),
+			messageServer->getSocketFilename().c_str(),
+			NULL);
+		
+		function<void ()> func = boost::bind(prestartWebApps,
+			resourceLocator,
+			options.defaultRubyCommand,
+			options.prestartUrls
+		);
+		prestarterThread = ptr(new oxt::thread(
+			boost::bind(runAndPrintExceptions, func, true)
+		));
+	}
+	
+	~Server() {
+		TRACE_POINT();
+		this_thread::disable_syscall_interruption dsi;
+		this_thread::disable_interruption di;
+		
+		P_DEBUG("Shutting down helper agent...");
+		prestarterThread->interrupt_and_join();
+		if (messageServerThread != NULL) {
+			messageServerThread->interrupt_and_join();
+		}
+		
+		messageServer.reset();
+		P_DEBUG("Destroying application pool...");
+		pool->destroy();
+		uninstallDiagnosticsDumper();
+		pool.reset();
+		poolLoop.stop();
+		requestLoop.stop();
+		requestHandler.reset();
+
+		if (!options.requestSocketLink.empty()) {
+			syscalls::unlink(options.requestSocketLink.c_str());
+		}
+		
+		P_TRACE(2, "All threads have been shut down.");
+	}
+	
+	void mainLoop() {
+		TRACE_POINT();
+		function<void ()> func;
+
+		func = boost::bind(&MessageServer::mainLoop, messageServer.get());
+		messageServerThread = ptr(new oxt::thread(
+			boost::bind(runAndPrintExceptions, func, true),
+			"MessageServer thread", MESSAGE_SERVER_THREAD_STACK_SIZE
+		));
+		
+		poolLoop.start("Pool event loop", 0);
+		requestLoop.start("Request event loop", 0);
+
+		
+		/* Wait until the watchdog closes the feedback fd (meaning it
+		 * was killed) or until we receive an exit message.
+		 */
+		this_thread::disable_syscall_interruption dsi;
+		fd_set fds;
+		int largestFd;
+		
+		FD_ZERO(&fds);
+		FD_SET(feedbackFd, &fds);
+		FD_SET(exitEvent.fd(), &fds);
+		largestFd = (feedbackFd > exitEvent.fd()) ? (int) feedbackFd : exitEvent.fd();
+		UPDATE_TRACE_POINT();
+		installDiagnosticsDumper();
+		if (syscalls::select(largestFd + 1, &fds, NULL, NULL, NULL) == -1) {
+			int e = errno;
+			uninstallDiagnosticsDumper();
+			throw SystemException("select() failed", e);
+		}
+		
+		if (FD_ISSET(feedbackFd, &fds)) {
+			/* If the watchdog has been killed then we'll kill all descendant
+			 * processes and exit. There's no point in keeping this helper
+			 * server running because we can't detect when the web server exits,
+			 * and because this helper agent doesn't own the server instance
+			 * directory. As soon as passenger-status is run, the server
+			 * instance directory will be cleaned up, making this helper agent
+			 * inaccessible.
+			 */
+			P_DEBUG("Watchdog seems to be killed; forcing shutdown of all subprocesses");
+			syscalls::killpg(getpgrp(), SIGKILL);
+			_exit(2); // In case killpg() fails.
+		} else {
+			/* We received an exit command. We want to exit 5 seconds after
+			 * all clients have disconnected have become inactive.
+			 */
+			P_DEBUG("Received command to exit gracefully. "
+				"Waiting until 5 seconds after all clients have disconnected...");
+			while (requestHandler->inactivityTime() < 5000) {
+				syscalls::usleep(250000);
+			}
+			P_DEBUG("It's now 5 seconds after all clients have disconnected. "
+				"Proceeding with graceful exit.");
+		}
+	}
+
+	string getRequestSocketFilename() const {
+		return options.requestSocketFilename;
+	}
+};
+
+/**
+ * Initializes and starts the helper agent that is responsible for handling communication
+ * between Nginx and the backend Rails processes.
+ *
+ * @see Server
+ * @see Client
+ */
+int
+main(int argc, char *argv[]) {
+	TRACE_POINT();
+	AgentOptions options(initializeAgent(argc, argv, "PassengerHelperAgent"));
+	P_DEBUG("Starting PassengerHelperAgent...");
+	MultiLibeio::init();
+	
+	try {
+		UPDATE_TRACE_POINT();
+		Server server(FileDescriptor(FEEDBACK_FD), options);
+		P_WARN("PassengerHelperAgent online, listening at unix:" <<
+			server.getRequestSocketFilename());
+		
+		UPDATE_TRACE_POINT();
+		server.mainLoop();
+	} catch (const tracable_exception &e) {
+		P_ERROR("*** ERROR: " << e.what() << "\n" << e.backtrace());
+		return 1;
+	}
+	
+	MultiLibeio::shutdown();
+	P_TRACE(2, "Helper agent exiting with code 0.");
+	return 0;
+}
diff --git a/ext/common/agents/HelperAgent/RequestHandler.cpp b/ext/common/agents/HelperAgent/RequestHandler.cpp
new file mode 100644
index 0000000..392f146
--- /dev/null
+++ b/ext/common/agents/HelperAgent/RequestHandler.cpp
@@ -0,0 +1,283 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011, 2012 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+
+#include <agents/HelperAgent/RequestHandler.h>
+
+namespace Passenger {
+
+
+struct ev_loop *
+Client::getLoop() const {
+	return requestHandler->libev->getLoop();
+}
+
+const SafeLibevPtr &
+Client::getSafeLibev() const {
+	return requestHandler->libev;
+}
+
+unsigned int
+Client::getConnectPasswordTimeout(const RequestHandler *handler) const {
+	return handler->connectPasswordTimeout;
+}
+
+size_t
+Client::onClientInputData(const EventedBufferedInputPtr &source, const StaticString &data) {
+	Client *client = (Client *) source->userData;
+	if (client != NULL) {
+		return client->requestHandler->onClientInputData(client->shared_from_this(), data);
+	} else {
+		return 0;
+	}
+}
+
+void
+Client::onClientInputError(const EventedBufferedInputPtr &source, const char *message, int errnoCode) {
+	Client *client = (Client *) source->userData;
+	if (client != NULL) {
+		client->requestHandler->onClientInputError(client->shared_from_this(), message, errnoCode);
+	}
+}
+
+
+void
+Client::onClientBodyBufferData(const FileBackedPipePtr &source,
+	const char *data, size_t size,
+	const FileBackedPipe::ConsumeCallback &callback)
+{
+	Client *client = (Client *) source->userData;
+	if (client != NULL) {
+		client->requestHandler->onClientBodyBufferData(client->shared_from_this(),
+			data, size, callback);
+	}
+}
+
+void
+Client::onClientBodyBufferEnd(const FileBackedPipePtr &source) {
+	Client *client = (Client *) source->userData;
+	if (client != NULL) {
+		client->requestHandler->onClientBodyBufferEnd(client->shared_from_this());
+	}
+}
+
+void
+Client::onClientBodyBufferError(const FileBackedPipePtr &source, int errorCode) {
+	Client *client = (Client *) source->userData;
+	if (client != NULL) {
+		client->requestHandler->onClientBodyBufferError(client->shared_from_this(), errorCode);
+	}
+}
+
+void
+Client::onClientBodyBufferCommit(const FileBackedPipePtr &source) {
+	Client *client = (Client *) source->userData;
+	if (client != NULL) {
+		client->requestHandler->onClientBodyBufferCommit(client->shared_from_this());
+	}
+}
+
+
+void
+Client::onClientOutputPipeData(const FileBackedPipePtr &source,
+	const char *data, size_t size,
+	const FileBackedPipe::ConsumeCallback &callback)
+{
+	Client *client = (Client *) source->userData;
+	if (client != NULL) {
+		client->requestHandler->onClientOutputPipeData(client->shared_from_this(),
+			data, size, callback);
+	}
+}
+
+void
+Client::onClientOutputPipeEnd(const FileBackedPipePtr &source) {
+	Client *client = (Client *) source->userData;
+	if (client != NULL) {
+		client->requestHandler->onClientOutputPipeEnd(client->shared_from_this());
+	}
+}
+
+void
+Client::onClientOutputPipeError(const FileBackedPipePtr &source, int errorCode) {
+	Client *client = (Client *) source->userData;
+	if (client != NULL) {
+		client->requestHandler->onClientOutputPipeError(client->shared_from_this(), errorCode);
+	}
+}
+
+void
+Client::onClientOutputPipeCommit(const FileBackedPipePtr &source) {
+	Client *client = (Client *) source->userData;
+	if (client != NULL) {
+		client->requestHandler->onClientOutputPipeCommit(client->shared_from_this());
+	}
+}
+
+
+void
+Client::onClientOutputWritable(ev::io &io, int revents) {
+	assert(requestHandler != NULL);
+	requestHandler->onClientOutputWritable(shared_from_this());
+}
+
+
+size_t
+Client::onAppInputData(const EventedBufferedInputPtr &source, const StaticString &data) {
+	Client *client = (Client *) source->userData;
+	if (client != NULL) {
+		return client->requestHandler->onAppInputData(client->shared_from_this(), data);
+	} else {
+		return 0;
+	}
+}
+
+void
+Client::onAppInputChunk(const char *data, size_t size, void *userData) {
+	Client *client = (Client *) userData;
+	assert(client != NULL);
+	assert(client->requestHandler != NULL);
+	client->requestHandler->onAppInputChunk(client->shared_from_this(), StaticString(data, size));
+}
+
+void
+Client::onAppInputError(const EventedBufferedInputPtr &source, const char *message, int errnoCode) {
+	Client *client = (Client *) source->userData;
+	if (client != NULL) {
+		client->requestHandler->onAppInputError(client->shared_from_this(), message, errnoCode);
+	}
+}
+
+
+void
+Client::onAppOutputWritable(ev::io &io, int revents) {
+	assert(requestHandler != NULL);
+	requestHandler->onAppOutputWritable(shared_from_this());
+}
+
+
+void
+Client::onTimeout(ev::timer &timer, int revents) {
+	assert(requestHandler != NULL);
+	requestHandler->onTimeout(shared_from_this());
+}
+
+
+Client *
+RequestHandler::getClientPointer(const ClientPtr &client) {
+	return client.get();
+}
+
+
+} // namespace Passenger
+
+#ifdef STANDALONE
+#include <MultiLibeio.cpp>
+#include <iostream>
+#include <agents/Base.h>
+#include <oxt/initialize.hpp>
+
+using namespace std;
+using namespace Passenger;
+using namespace Passenger::ApplicationPool2;
+
+static SafeLibevPtr libev;
+static RequestHandler *handler;
+static struct ev_loop *loop;
+static PoolPtr pool;
+static struct ev_signal sigquitwatcher, sigintwatcher;
+
+static void
+sigquit_cb(struct ev_loop *loop, ev_signal *w, int revents) {
+	handler->inspect(cout);
+	cout.flush();
+}
+
+static void
+sigint_cb(struct ev_loop *loop, ev_signal *w, int revents) {
+	P_WARN("Exiting loop");
+	delete handler;
+	handler = NULL;
+	pool->destroy();
+	pool.reset();
+	ev_signal_stop(loop, &sigquitwatcher);
+	ev_signal_stop(loop, &sigintwatcher);
+	ev_break(loop, EVBREAK_ONE);
+}
+
+static void
+ignoreSigpipe() {
+	struct sigaction action;
+	action.sa_handler = SIG_IGN;
+	action.sa_flags   = 0;
+	sigemptyset(&action.sa_mask);
+	sigaction(SIGPIPE, &action, NULL);
+}
+
+int
+main() {
+	oxt::initialize();
+	setup_syscall_interruption_support();
+	ignoreSigpipe();
+	//installAbortHandler();
+	setLogLevel(3);
+	MultiLibeio::init();
+	loop = EV_DEFAULT;
+	libev = make_shared<SafeLibev>(loop);
+	AgentOptions options;
+	ServerInstanceDir serverInstanceDir(getpid());
+	char root[PATH_MAX];
+	getcwd(root, sizeof(root));
+	#ifdef __linux__
+		const char *nogroup = "nogroup";
+	#else
+		const char *nogroup = "nobody";
+	#endif
+	options.passengerRoot = root;
+	options.loggingAgentAddress = "unix:/tmp/agent";
+	options.loggingAgentPassword = "1234";
+
+	SpawnerFactoryPtr spawnerFactory = make_shared<SpawnerFactory>(libev,
+		ResourceLocator(root),
+		serverInstanceDir.newGeneration(true, "nobody", nogroup, getpid(), getgid()));
+	UnionStation::LoggerFactoryPtr loggerFactory = make_shared<UnionStation::LoggerFactory>(options.loggingAgentAddress,
+		"logging", options.loggingAgentPassword);
+	pool = make_shared<Pool>(libev.get(), spawnerFactory, loggerFactory);
+	FileDescriptor requestSocket(createTcpServer("127.0.0.1", 3000));
+	setNonBlocking(requestSocket);
+	handler = new RequestHandler(libev, requestSocket, pool, options);
+	
+	ev_signal_init(&sigquitwatcher, sigquit_cb, SIGQUIT);
+	ev_signal_start(loop, &sigquitwatcher);
+
+	ev_signal_init(&sigintwatcher, sigint_cb, SIGINT);
+	ev_signal_start(loop, &sigintwatcher);
+
+	P_DEBUG("Started");
+	ev_run(loop, 0);
+
+	MultiLibeio::shutdown();
+	return 0;
+}
+#endif
diff --git a/ext/common/agents/HelperAgent/RequestHandler.h b/ext/common/agents/HelperAgent/RequestHandler.h
new file mode 100644
index 0000000..fe6b9d0
--- /dev/null
+++ b/ext/common/agents/HelperAgent/RequestHandler.h
@@ -0,0 +1,2293 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+
+/*
+   STAGES
+   
+     Accept connect password
+              |
+             \|/
+          Read header
+              |
+             \|/
+       +------+------+
+       |             |
+       |             |
+      \|/            |
+     Buffer          |
+     request         |
+     body            |
+       |             |
+       |             |
+      \|/            |
+    Checkout <-------+
+    session
+       |
+       |
+      \|/
+  Send header
+    to app
+       |
+       |
+      \|/
+  Send request
+   body to app
+
+
+
+     OVERVIEW OF I/O CHANNELS, PIPES AND WATCHERS
+
+
+                             OPTIONAL:                                       appOutputWatcher
+                          clientBodyBuffer                                         (o)
+                                 |                                                  |
+    +----------+                 |             +-----------+                        |   +---------------+
+    |          |     ------ clientInput -----> |  Request  | ---------------->          |               |
+    |  Client  | fd                            |  Handler  |                    session |  Application  |
+    |          |     <--- clientOutputPipe --- |           | <--- appInput ---          |               |
+    +----------+ |                             +-----------+                            +---------------+
+                 |
+                (o)
+        clientOutputWatcher
+
+ */
+
+#ifndef _PASSENGER_REQUEST_HANDLER_H_
+#define _PASSENGER_REQUEST_HANDLER_H_
+
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+#include <boost/make_shared.hpp>
+#include <ev++.h>
+
+#if defined(__GLIBCXX__) || defined(__APPLE__)
+	#include <cxxabi.h>
+	#define CXX_ABI_API_AVAILABLE
+#endif
+
+#include <sys/types.h>
+#include <arpa/inet.h>
+#include <sys/un.h>
+#include <typeinfo>
+#include <cassert>
+#include <cctype>
+
+#include <Logging.h>
+#include <EventedBufferedInput.h>
+#include <MessageReadersWriters.h>
+#include <Constants.h>
+#include <UnionStation.h>
+#include <ApplicationPool2/Pool.h>
+#include <Utils/StrIntUtils.h>
+#include <Utils/IOUtils.h>
+#include <Utils/HttpHeaderBufferer.h>
+#include <Utils/HttpConstants.h>
+#include <Utils/Template.h>
+#include <Utils/Timer.h>
+#include <Utils/Dechunker.h>
+#include <agents/HelperAgent/AgentOptions.h>
+#include <agents/HelperAgent/FileBackedPipe.h>
+#include <agents/HelperAgent/ScgiRequestParser.h>
+
+namespace Passenger {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+using namespace ApplicationPool2;
+
+class RequestHandler;
+
+#define RH_WARN(client, x) P_WARN("[Client " << client->name() << "] " << x)
+#define RH_DEBUG(client, x) P_DEBUG("[Client " << client->name() << "] " << x)
+#define RH_TRACE(client, level, x) P_TRACE(level, "[Client " << client->name() << "] " << x)
+
+
+class Client: public enable_shared_from_this<Client> {
+private:
+	struct ev_loop *getLoop() const;
+	const SafeLibevPtr &getSafeLibev() const;
+	unsigned int getConnectPasswordTimeout(const RequestHandler *handler) const;
+
+	static size_t onClientInputData(const EventedBufferedInputPtr &source, const StaticString &data);
+	static void onClientInputError(const EventedBufferedInputPtr &source, const char *message, int errnoCode);
+
+	static void onClientBodyBufferData(const FileBackedPipePtr &source,
+		const char *data, size_t size,
+		const FileBackedPipe::ConsumeCallback &callback);
+	static void onClientBodyBufferEnd(const FileBackedPipePtr &source);
+	static void onClientBodyBufferError(const FileBackedPipePtr &source, int errorCode);
+	static void onClientBodyBufferCommit(const FileBackedPipePtr &source);
+	
+	static void onClientOutputPipeData(const FileBackedPipePtr &source,
+		const char *data, size_t size,
+		const FileBackedPipe::ConsumeCallback &callback);
+	static void onClientOutputPipeEnd(const FileBackedPipePtr &source);
+	static void onClientOutputPipeError(const FileBackedPipePtr &source, int errorCode);
+	static void onClientOutputPipeCommit(const FileBackedPipePtr &source);
+	
+	void onClientOutputWritable(ev::io &io, int revents);
+
+	static size_t onAppInputData(const EventedBufferedInputPtr &source, const StaticString &data);
+	static void onAppInputChunk(const char *data, size_t size, void *userData);
+	static void onAppInputError(const EventedBufferedInputPtr &source, const char *message, int errnoCode);
+	
+	void onAppOutputWritable(ev::io &io, int revents);
+
+	void onTimeout(ev::timer &timer, int revents);
+
+
+	static const char *boolStr(bool val) {
+		static const char *strs[] = { "false", "true" };
+		return strs[val];
+	}
+
+	void resetPrimitiveFields() {
+		requestHandler = NULL;
+		state = DISCONNECTED;
+		backgroundOperations = 0;
+		requestBodyIsBuffered = false;
+		freeBufferedConnectPassword();
+		connectedAt = 0;
+		contentLength = 0;
+		clientBodyAlreadyRead = 0;
+		checkoutSessionAfterCommit = false;
+		sessionCheckedOut = false;
+		sessionCheckoutTry = 0;
+		responseHeaderSeen = false;
+		chunkedResponse = false;
+		appRoot.clear();
+	}
+
+	void freeScopeLogs() {
+		endScopeLog(&scopeLogs.requestProxying, false);
+		endScopeLog(&scopeLogs.getFromPool, false);
+		endScopeLog(&scopeLogs.bufferingRequestBody, false);
+		endScopeLog(&scopeLogs.requestProcessing, false);
+	}
+
+public:
+	/** Back reference to the RequestHandler that this Client is associated with.
+	 * NULL when this Client is not in the pool or is disconnected. */
+	RequestHandler *requestHandler;
+	/** File descriptor of the client socket. Is empty when this Client is not
+	 * in the pool or is disconnected. */
+	FileDescriptor fd;
+	/** The last associated file descriptor number is stored here. It is not
+	 * cleared after disassociating. Its only purpose is to make logging calls
+	 * like RH_DEBUG() print the correct client name after disconnect() is called.
+	 * Do not use this value for anything else as it may not refer to a valid
+	 * file descriptor. */
+	int fdnum;
+
+
+	/***** Client <-> RequestHandler I/O channels, pipes and watchers *****/
+
+	/** Client input channel. */
+	EventedBufferedInputPtr clientInput;
+	/** If request body buffering is turned on, it will be buffered into this FileBackedPipe. */
+	FileBackedPipePtr clientBodyBuffer;
+	/** Client output pipe. */
+	FileBackedPipePtr clientOutputPipe;
+	/** Client output channel watcher. */
+	ev::io clientOutputWatcher;
+
+
+	/***** RequestHandler <-> Application I/O channels, pipes and watchers *****/
+
+	/** Application input channel. */
+	EventedBufferedInputPtr appInput;
+	string appOutputBuffer;
+	/** Application output channel watcher. */
+	ev::io appOutputWatcher;
+
+
+	/***** State variables *****/
+
+	enum {
+		BEGIN_READING_CONNECT_PASSWORD,
+		STILL_READING_CONNECT_PASSWORD,
+		READING_HEADER,
+		BUFFERING_REQUEST_BODY,
+		CHECKING_OUT_SESSION,
+		SENDING_HEADER_TO_APP,
+		FORWARDING_BODY_TO_APP,
+
+		// Special states
+		WRITING_SIMPLE_RESPONSE,
+		DISCONNECTED
+	} state;
+
+	/* How many background operations are currently in progress, e.g.
+	 * an asyncGet() or bodyBuffer.add(). If the client is disconnected
+	 * while this flag is true, then the Client object is not reassociateable
+	 * in order to give the completion callbacks a chance to cancel properly.
+	 */
+	unsigned int backgroundOperations;
+
+	struct {
+		char *data;
+		unsigned int alreadyRead;
+	} bufferedConnectPassword;
+
+	// Used for enforcing the connection timeout.
+	ev::timer timeoutTimer;
+
+	ev_tstamp connectedAt;
+	long long contentLength;
+	unsigned long long clientBodyAlreadyRead;
+	Options options;
+	ScgiRequestParser scgiParser;
+	SessionPtr session;
+	string appRoot;
+	struct {
+		UnionStation::ScopeLog
+			*requestProcessing,
+			*bufferingRequestBody,
+			*getFromPool,
+			*requestProxying;
+	} scopeLogs;
+	unsigned int sessionCheckoutTry;
+	bool requestBodyIsBuffered;
+	bool sessionCheckedOut;
+	bool checkoutSessionAfterCommit;
+
+	bool responseHeaderSeen;
+	bool chunkedResponse;
+	HttpHeaderBufferer responseHeaderBufferer;
+	Dechunker responseDechunker;
+
+
+	Client() {
+		fdnum = -1;
+
+		clientInput = make_shared< EventedBufferedInput<> >();
+		clientInput->onData   = onClientInputData;
+		clientInput->onError  = onClientInputError;
+		clientInput->userData = this;
+		
+		clientBodyBuffer = make_shared<FileBackedPipe>("/tmp");
+		clientBodyBuffer->userData  = this;
+		clientBodyBuffer->onData    = onClientBodyBufferData;
+		clientBodyBuffer->onEnd     = onClientBodyBufferEnd;
+		clientBodyBuffer->onError   = onClientBodyBufferError;
+		clientBodyBuffer->onCommit  = onClientBodyBufferCommit;
+
+		clientOutputPipe = make_shared<FileBackedPipe>("/tmp");
+		clientOutputPipe->userData  = this;
+		clientOutputPipe->onData    = onClientOutputPipeData;
+		clientOutputPipe->onEnd     = onClientOutputPipeEnd;
+		clientOutputPipe->onError   = onClientOutputPipeError;
+		clientOutputPipe->onCommit  = onClientOutputPipeCommit;
+
+		clientOutputWatcher.set<Client, &Client::onClientOutputWritable>(this);
+
+		
+		appInput = make_shared< EventedBufferedInput<> >();
+		appInput->onData   = onAppInputData;
+		appInput->onError  = onAppInputError;
+		appInput->userData = this;
+		
+		appOutputWatcher.set<Client, &Client::onAppOutputWritable>(this);
+
+
+		timeoutTimer.set<Client, &Client::onTimeout>(this);
+
+
+		responseDechunker.onData = onAppInputChunk;
+		responseDechunker.userData = this;
+		
+
+		bufferedConnectPassword.data = NULL;
+		bufferedConnectPassword.alreadyRead = 0;
+		memset(&scopeLogs, 0, sizeof(scopeLogs));
+		resetPrimitiveFields();
+	}
+
+	~Client() {
+		if (requestHandler != NULL) {
+			discard();
+		}
+		clientInput->userData      = NULL;
+		clientBodyBuffer->userData = NULL;
+		clientOutputPipe->userData = NULL;
+		appInput->userData         = NULL;
+		freeBufferedConnectPassword();
+		freeScopeLogs();
+	}
+
+	void associate(RequestHandler *handler, const FileDescriptor &_fd) {
+		assert(requestHandler == NULL);
+		requestHandler = handler;
+		fd = _fd;
+		fdnum = _fd;
+		state = BEGIN_READING_CONNECT_PASSWORD;
+		connectedAt = ev_time();
+
+		clientInput->reset(getSafeLibev().get(), _fd);
+		clientInput->start();
+		clientBodyBuffer->reset(getSafeLibev());
+		clientOutputPipe->reset(getSafeLibev());
+		clientOutputPipe->start();
+		clientOutputWatcher.set(getLoop());
+		clientOutputWatcher.set(_fd, ev::WRITE);
+
+		// appOutputWatcher is initialized in initiateSession.
+
+		timeoutTimer.set(getLoop());
+		timeoutTimer.start(getConnectPasswordTimeout(handler) / 1000.0, 0.0);
+	}
+
+	void disassociate() {
+		assert(requestHandler != NULL);
+		resetPrimitiveFields();
+		fd = FileDescriptor();
+
+		clientInput->reset(NULL, FileDescriptor());
+		clientBodyBuffer->reset();
+		clientOutputPipe->reset();
+		clientOutputWatcher.stop();
+
+		appInput->reset(NULL, FileDescriptor());
+		appOutputBuffer.resize(0);
+		appOutputWatcher.stop();
+		
+		timeoutTimer.stop();
+		scgiParser.reset();
+		session.reset();
+		responseHeaderBufferer.reset();
+		responseDechunker.reset();
+		freeScopeLogs();
+	}
+
+	void discard() {
+		assert(requestHandler != NULL);
+		resetPrimitiveFields();
+		fd = FileDescriptor();
+
+		clientInput->stop();
+		clientBodyBuffer->reset();
+		clientOutputPipe->reset();
+		clientOutputWatcher.stop();
+
+		appInput->stop();
+		appOutputWatcher.stop();
+
+		timeoutTimer.stop();
+
+		freeScopeLogs();
+
+		requestHandler = NULL;
+	}
+
+	bool reassociateable() const {
+		return requestHandler == NULL
+			&& backgroundOperations == 0
+			&& clientInput->resetable()
+			&& clientBodyBuffer->resetable()
+			&& clientOutputPipe->resetable()
+			&& appInput->resetable();
+	}
+
+	string name() const {
+		if (fdnum == -1) {
+			return "(null)";
+		} else {
+			return toString(fdnum);
+		}
+	}
+
+	bool connected() const {
+		return requestHandler != NULL;
+	}
+
+	const char *getStateName() const {
+		switch (state) {
+		case BEGIN_READING_CONNECT_PASSWORD:
+			return "BEGIN_READING_CONNECT_PASSWORD";
+		case STILL_READING_CONNECT_PASSWORD:
+			return "STILL_READING_CONNECT_PASSWORD";
+		case READING_HEADER:
+			return "READING_HEADER";
+		case BUFFERING_REQUEST_BODY:
+			return "BUFFERING_REQUEST_BODY";
+		case CHECKING_OUT_SESSION:
+			return "CHECKING_OUT_SESSION";
+		case SENDING_HEADER_TO_APP:
+			return "SENDING_HEADER_TO_APP";
+		case FORWARDING_BODY_TO_APP:
+			return "FORWARDING_BODY_TO_APP";
+		case WRITING_SIMPLE_RESPONSE:
+			return "WRITING_SIMPLE_RESPONSE";
+		case DISCONNECTED:
+			return "DISCONNECTED";
+		default:
+			return "UNKNOWN";
+		}
+	}
+
+	void freeBufferedConnectPassword() {
+		if (bufferedConnectPassword.data != NULL) {
+			free(bufferedConnectPassword.data);
+			bufferedConnectPassword.data = NULL;
+			bufferedConnectPassword.alreadyRead = 0;
+		}
+	}
+
+	bool shouldHalfCloseWrite() const {
+		return session->getProtocol() == "session";
+	}
+
+	bool useUnionStation() const {
+		return options.logger != NULL;
+	}
+
+	UnionStation::LoggerPtr getLogger() const {
+		return options.logger;
+	}
+
+	void beginScopeLog(UnionStation::ScopeLog **scopeLog, const char *name) {
+		if (options.logger != NULL) {
+			*scopeLog = new UnionStation::ScopeLog(options.logger, name);
+		}
+	}
+
+	void endScopeLog(UnionStation::ScopeLog **scopeLog, bool success = true) {
+		if (success && *scopeLog != NULL) {
+			(*scopeLog)->success();
+		}
+		delete *scopeLog;
+		*scopeLog = NULL;
+	}
+
+	void logMessage(const StaticString &message) {
+		options.logger->message(message);
+	}
+
+	void verifyInvariants() const {
+		assert((requestHandler == NULL) == (fd == -1));
+		assert((requestHandler == NULL) == (state == DISCONNECTED));
+	}
+
+	template<typename Stream>
+	void inspect(Stream &stream) const {
+		const char *indent = "    ";
+		time_t the_time;
+		struct tm the_tm;
+		char timestr[60];
+
+		the_time = (time_t) connectedAt;
+		localtime_r(&the_time, &the_tm);
+		strftime(timestr, sizeof(timestr) - 1, "%F %H:%M:%S", &the_tm);
+
+		stream << indent << "host                        = " << (scgiParser.getHeader("HTTP_HOST").empty() ? "(empty)" : scgiParser.getHeader("HTTP_HOST")) << "\n";
+		stream << indent << "uri                         = " << (scgiParser.getHeader("REQUEST_URI").empty() ? "(empty)" : scgiParser.getHeader("REQUEST_URI")) << "\n";
+		stream << indent << "connected at                = " << timestr << " (" << (unsigned long long) (ev_time() - connectedAt) << " sec ago)\n";
+		stream << indent << "state                       = " << getStateName() << "\n";
+		if (session == NULL) {
+			stream << indent << "session                     = NULL\n";
+		} else {
+			stream << indent << "session pid                 = " << session->getPid() << " (" <<
+				session->getGroup()->name << ")\n";
+			stream << indent << "session gupid               = " << session->getGupid() << "\n";
+			stream << indent << "session initiated           = " << boolStr(session->initiated()) << "\n";
+		}
+		stream
+			<< indent << "requestBodyIsBuffered       = " << boolStr(requestBodyIsBuffered) << "\n"
+			<< indent << "contentLength               = " << contentLength << "\n"
+			<< indent << "clientBodyAlreadyRead       = " << clientBodyAlreadyRead << "\n"
+			<< indent << "clientInput                 = " << clientInput.get() <<  " " << clientInput->inspect() << "\n"
+			<< indent << "clientInput started         = " << boolStr(clientInput->isStarted()) << "\n"
+			<< indent << "clientBodyBuffer started    = " << boolStr(clientBodyBuffer->isStarted()) << "\n"
+			<< indent << "clientBodyBuffer reachedEnd = " << boolStr(clientBodyBuffer->reachedEnd()) << "\n"
+			<< indent << "clientOutputPipe started    = " << boolStr(clientOutputPipe->isStarted()) << "\n"
+			<< indent << "clientOutputPipe reachedEnd = " << boolStr(clientOutputPipe->reachedEnd()) << "\n"
+			<< indent << "clientOutputWatcher active  = " << boolStr(clientOutputWatcher.is_active()) << "\n"
+			<< indent << "appInput                    = " << appInput.get() << " " << appInput->inspect() << "\n"
+			<< indent << "appInput started            = " << boolStr(appInput->isStarted()) << "\n"
+			<< indent << "appInput reachedEnd         = " << boolStr(appInput->endReached()) << "\n"
+			<< indent << "responseHeaderSeen          = " << boolStr(responseHeaderSeen) << "\n"
+			<< indent << "useUnionStation             = " << boolStr(useUnionStation()) << "\n"
+			;
+	}
+};
+
+typedef shared_ptr<Client> ClientPtr;
+
+
+class RequestHandler {
+public:
+	enum BenchmarkPoint {
+		BP_NONE,
+		BP_AFTER_ACCEPT,
+		BP_AFTER_CHECK_CONNECT_PASSWORD,
+		BP_AFTER_PARSING_HEADER,
+		BP_BEFORE_CHECKOUT_SESSION
+	};
+
+private:
+	friend class Client;
+	typedef UnionStation::LoggerFactory LoggerFactory;
+	typedef UnionStation::LoggerFactoryPtr LoggerFactoryPtr;
+	typedef UnionStation::LoggerPtr LoggerPtr;
+
+	const SafeLibevPtr libev;
+	FileDescriptor requestSocket;
+	PoolPtr pool;
+	const AgentOptions &options;
+	const ResourceLocator resourceLocator;
+	LoggerFactoryPtr loggerFactory;
+	ev::io requestSocketWatcher;
+	ev::timer resumeSocketWatcherTimer;
+	HashMap<int, ClientPtr> clients;
+	Timer inactivityTimer;
+	bool accept4Available;
+
+
+	void disconnect(const ClientPtr &client) {
+		// Prevent Client object from being destroyed until we're done.
+		ClientPtr reference = client;
+
+		clients.erase(client->fd);
+		client->discard();
+		client->verifyInvariants();
+		RH_DEBUG(client, "Disconnected; new client count = " << clients.size());
+
+		if (clients.empty()) {
+			inactivityTimer.start();
+		}
+	}
+
+	void disconnectWithError(const ClientPtr &client, const StaticString &message) {
+		RH_WARN(client, "Disconnecting with error: " << message);
+		if (client->useUnionStation()) {
+			client->logMessage("Disconnecting with error: " + message);
+		}
+		disconnect(client);
+	}
+
+	void disconnectWithClientSocketWriteError(const ClientPtr &client, int e) {
+		stringstream message;
+		message << "client socket write error: ";
+		message << strerror(e);
+		message << " (errno=" << e << ")";
+		disconnectWithError(client, message.str());
+	}
+
+	void disconnectWithAppSocketWriteError(const ClientPtr &client, int e) {
+		stringstream message;
+		message << "app socket write error: ";
+		message << strerror(e);
+		message << " (errno=" << e << ")";
+		disconnectWithError(client, message.str());
+	}
+
+	void disconnectWithWarning(const ClientPtr &client, const StaticString &message) {
+		P_DEBUG("Disconnected client " << client->name() << " with warning: " << message);
+		disconnect(client);
+	}
+
+	template<typename Number>
+	static Number clamp(Number n, Number min, Number max) {
+		if (n < min) {
+			return min;
+		} else if (n > max) {
+			return max;
+		} else {
+			return n;
+		}
+	}
+
+	// GDB helper function, implemented in .cpp file to prevent inlining.
+	Client *getClientPointer(const ClientPtr &client);
+
+	void getInactivityTime(unsigned long long *result) const {
+		*result = inactivityTimer.elapsed();
+	}
+
+	static bool getBoolOption(const ClientPtr &client, const StaticString &name, bool defaultValue = false) {
+		ScgiRequestParser::const_iterator it = client->scgiParser.getHeaderIterator(name);
+		if (it != client->scgiParser.end()) {
+			return it->second == "true";
+		} else {
+			return defaultValue;
+		}
+	}
+
+	static long long getULongLongOption(const ClientPtr &client, const StaticString &name, long long defaultValue = -1) {
+		ScgiRequestParser::const_iterator it = client->scgiParser.getHeaderIterator(name);
+		if (it != client->scgiParser.end()) {
+			long long result = stringToULL(it->second);
+			// The client may send a malicious integer, so check for this.
+			if (result < 0) {
+				return defaultValue;
+			} else {
+				return result;
+			}
+		} else {
+			return defaultValue;
+		}
+	}
+
+	void writeSimpleResponse(const ClientPtr &client, const StaticString &data) {
+		char header[256];
+		char *pos = header;
+		const char *end = header + sizeof(header) - 1;
+
+		if (getBoolOption(client, "PASSENGER_STATUS_LINE", true)) {
+			pos = appendData(pos, end, "HTTP/1.1 200 OK\r\n");
+		}
+		pos += snprintf(pos, end - pos,
+			"Status: 200 OK\r\n"
+			"Content-Length: %lu\r\n"
+			"Content-Type: text/html; charset=UTF-8\r\n"
+			"Cache-Control: no-cache, no-store, must-revalidate\r\n"
+			"\r\n",
+			(unsigned long) data.size());
+
+		client->clientOutputPipe->write(header, pos - header);
+		client->clientOutputPipe->write(data.data(), data.size());
+		client->clientOutputPipe->end();
+
+		if (client->useUnionStation()) {
+			client->logMessage("Status: 200 OK");
+		}
+	}
+
+	void writeErrorResponse(const ClientPtr &client, const StaticString &message, const SpawnException *e = NULL) {
+		assert(client->state < Client::FORWARDING_BODY_TO_APP);
+		client->state = Client::WRITING_SIMPLE_RESPONSE;
+
+		string templatesDir = resourceLocator.getResourcesDir() + "/templates";
+		string data;
+
+		if (getBoolOption(client, "PASSENGER_FRIENDLY_ERROR_PAGES", true)) {
+			try {
+				string cssFile = templatesDir + "/error_layout.css";
+				string errorLayoutFile = templatesDir + "/error_layout.html.template";
+				string generalErrorFile =
+					(e != NULL && e->isHTML())
+					? templatesDir + "/general_error_with_html.html.template"
+					: templatesDir + "/general_error.html.template";
+				string css = readAll(cssFile);
+				StringMap<StaticString> params;
+
+				params.set("CSS", css);
+				params.set("APP_ROOT", client->options.appRoot);
+				params.set("RUBY", client->options.ruby);
+				params.set("ENVIRONMENT", client->options.environment);
+				params.set("MESSAGE", message);
+				params.set("IS_RUBY_APP",
+					(client->options.appType == "classic-rails" || client->options.appType == "rack")
+					? "true" : "false");
+				if (e != NULL) {
+					params.set("TITLE", "Web application could not be started");
+					// Store all SpawnException annotations into 'params',
+					// but convert its name to uppercase.
+					const map<string, string> &annotations = e->getAnnotations();
+					map<string, string>::const_iterator it, end = annotations.end();
+					for (it = annotations.begin(); it != end; it++) {
+						string name = it->first;
+						for (string::size_type i = 0; i < name.size(); i++) {
+							name[i] = toupper(name[i]);
+						}
+						params.set(name, it->second);
+					}
+				} else {
+					params.set("TITLE", "Internal server error");
+				}
+				string content = Template::apply(readAll(generalErrorFile), params);
+				params.set("CONTENT", content);
+				data = Template::apply(readAll(errorLayoutFile), params);
+			} catch (const SystemException &e2) {
+				P_ERROR("Cannot render an error page: " << e2.what() << "\n" <<
+					e2.backtrace());
+				data = message;
+			}
+		} else {
+			try {
+				data = readAll(templatesDir + "/undisclosed_error.html.template");
+			} catch (const SystemException &e2) {
+				P_ERROR("Cannot render an error page: " << e2.what() << "\n" <<
+					e2.backtrace());
+				data = "Internal Server Error";
+			}
+		}
+
+		stringstream str;
+		if (getBoolOption(client, "PASSENGER_STATUS_LINE", true)) {
+			str << "HTTP/1.1 500 Internal Server Error\r\n";
+		}
+		str << "Status: 500 Internal Server Error\r\n";
+		str << "Content-Length: " << data.size() << "\r\n";
+		str << "Content-Type: text/html; charset=UTF-8\r\n";
+		str << "Cache-Control: no-cache, no-store, must-revalidate\r\n";
+		str << "\r\n";
+
+		const string header = str.str();
+		client->clientOutputPipe->write(header.data(), header.size());
+		client->clientOutputPipe->write(data.data(), data.size());
+		client->clientOutputPipe->end();
+
+		if (client->useUnionStation()) {
+			client->logMessage("Status: 500 Internal Server Error");
+			// TODO: record error message
+		}
+	}
+
+	static BenchmarkPoint getDefaultBenchmarkPoint() {
+		const char *val = getenv("PASSENGER_REQUEST_HANDLER_BENCHMARK_POINT");
+		if (val == NULL || *val == '\0') {
+			return BP_NONE;
+		} else if (strcmp(val, "after_accept") == 0) {
+			return BP_AFTER_ACCEPT;
+		} else if (strcmp(val, "after_check_connect_password") == 0) {
+			return BP_AFTER_CHECK_CONNECT_PASSWORD;
+		} else if (strcmp(val, "after_parsing_header") == 0) {
+			return BP_AFTER_PARSING_HEADER;
+		} else if (strcmp(val, "before_checkout_session") == 0) {
+			return BP_BEFORE_CHECKOUT_SESSION;
+		} else {
+			P_WARN("Invalid RequestHandler benchmark point requested: " << val);
+			return BP_NONE;
+		}
+	}
+
+
+	/*****************************************************
+	 * COMPONENT: appInput -> clientOutputPipe plumbing
+	 *
+	 * The following code receives data from appInput,
+	 * possibly modifies it, and forwards it to
+	 * clientOutputPipe.
+	 *****************************************************/
+	
+	struct Header {
+		StaticString key;
+		StaticString value;
+
+		Header() { }
+
+		Header(const StaticString &_key, const StaticString &_value)
+			: key(_key),
+			  value(_value)
+			{ }
+		
+		bool empty() const {
+			return key.empty();
+		}
+
+		const char *begin() const {
+			return key.data();
+		}
+
+		const char *end() const {
+			return value.data() + value.size() + sizeof("\r\n") - 1;
+		}
+
+		size_t size() const {
+			return end() - begin();
+		}
+	};
+
+	/** Given a substring containing the start of the header value,
+	 * extracts the substring that contains a single header value.
+	 *
+	 *   const char *data =
+	 *      "Status: 200 OK\r\n"
+	 *      "Foo: bar\r\n";
+	 *   extractHeaderValue(data + strlen("Status:"), strlen(data) - strlen("Status:"));
+	 *      // "200 OK"
+	 */
+	static StaticString extractHeaderValue(const char *data, size_t size) {
+		const char *start = data;
+		const char *end   = data + size;
+		const char *terminator;
+		
+		while (start < end && *start == ' ') {
+			start++;
+		}
+		
+		terminator = (const char *) memchr(start, '\r', end - start);
+		if (terminator == NULL) {
+			return StaticString();
+		} else {
+			return StaticString(start, terminator - start);
+		}
+	}
+
+	static Header lookupHeader(const StaticString &headerData, const StaticString &name) {
+		string::size_type searchStart = 0;
+		while (searchStart < headerData.size()) {
+			string::size_type pos = headerData.find(name, searchStart);
+			if (OXT_UNLIKELY(pos == string::npos)) {
+				return Header();
+			} else if ((pos == 0 || headerData[pos - 1] == '\n')
+				&& headerData.size() > pos + name.size()
+				&& headerData[pos + name.size()] == ':')
+			{
+				StaticString value = extractHeaderValue(
+					headerData.data() + pos + name.size() + 1,
+					headerData.size() - pos - name.size() - 1);
+				return Header(headerData.substr(pos, name.size()), value);
+			} else {
+				searchStart = pos + name.size() + 1;
+			}
+		}
+		return Header();
+	}
+
+	static Header lookupHeader(const StaticString &headerData, const StaticString &name,
+		const StaticString &name2)
+	{
+		Header header = lookupHeader(headerData, name);
+		if (header.empty()) {
+			header = lookupHeader(headerData, name2);
+		}
+		return header;
+	}
+
+	bool addStatusHeaderFromStatusLine(const ClientPtr &client, string &headerData) {
+		string::size_type begin, end;
+
+		begin = headerData.find(' ');
+		if (begin != string::npos) {
+			end = headerData.find("\r\n", begin + 1);
+		} else {
+			end = string::npos;
+		}
+		if (begin != string::npos && end != string::npos) {
+			StaticString statusValue(headerData.data() + begin + 1, end - begin);
+			char header[statusValue.size() + 20];
+			char *pos = header;
+			const char *end = header + statusValue.size() + 20;
+
+			pos = appendData(pos, end, "Status: ");
+			pos = appendData(pos, end, statusValue);
+			pos = appendData(pos, end, "\r\n");
+			headerData.append(StaticString(header, pos - header));
+			return true;
+		} else {
+			disconnectWithError(client, "application sent malformed response: the HTTP status line is invalid.");
+			return false;
+		}
+	}
+
+	static bool addReasonPhrase(string &headerData, const Header &status) {
+		if (status.value.find(' ') == string::npos) {
+			int statusCode = stringToInt(status.value);
+			const char *statusCodeAndReasonPhrase = getStatusCodeAndReasonPhrase(statusCode);
+			char newStatus[100];
+			char *pos = newStatus;
+			const char *end = newStatus + sizeof(newStatus);
+
+			pos = appendData(pos, end, "Status: ");
+			if (statusCodeAndReasonPhrase == NULL) {
+				pos = appendData(pos, end, toString(statusCode));
+				pos = appendData(pos, end, " Unknown Reason-Phrase\r\n");
+			} else {
+				pos = appendData(pos, end, statusCodeAndReasonPhrase);
+				pos = appendData(pos, end, "\r\n");
+			}
+
+			headerData.replace(status.begin() - headerData.data(), status.size(),
+				newStatus, pos - newStatus);
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	bool removeStatusLine(const ClientPtr &client, string &headerData) {
+		string::size_type end = headerData.find("\r\n");
+		if (end != string::npos) {
+			headerData.erase(0, end + 2);
+			return true;
+		} else {
+			disconnectWithError(client, "application sent malformed response: the HTTP status line is invalid.");
+			return false;
+		}
+	}
+
+	static void addStatusLineFromStatusHeader(string &headerData, const Header &status) {
+		char statusLine[100];
+		char *pos = statusLine;
+		const char *end = statusLine + sizeof(statusLine);
+
+		pos = appendData(pos, end, "HTTP/1.1 ");
+		pos = appendData(pos, end, status.value);
+		pos = appendData(pos, end, "\r\n");
+
+		headerData.insert(0, statusLine, pos - statusLine);
+	}
+
+	static void removeHeader(string &headerData, const Header &header) {
+		headerData.erase(header.begin() - headerData.data(), header.size());
+	}
+
+	/*
+	 * Given a full header, possibly modify the header and send it to the clientOutputPipe.
+	 */
+	bool processResponseHeader(const ClientPtr &client,
+		const StaticString &origHeaderData)
+	{
+		string headerData;
+		headerData.reserve(origHeaderData.size() + 150);
+		// Strip trailing CRLF.
+		headerData.append(origHeaderData.data(), origHeaderData.size() - 2);
+		
+		if (startsWith(headerData, "HTTP/1.")) {
+			Header status = lookupHeader(headerData, "Status", "status");
+			if (status.empty()) {
+				// Add status header if necessary.
+				if (!addStatusHeaderFromStatusLine(client, headerData)) {
+					return false;
+				}
+			} else {
+				// Add reason phrase to existing status header if necessary.
+				addReasonPhrase(headerData, status);
+			}
+			// Remove status line if necesary.
+			if (!getBoolOption(client, "PASSENGER_STATUS_LINE", true)) {
+				if (!removeStatusLine(client, headerData)) {
+					return false;
+				}
+			}
+		} else {
+			Header status = lookupHeader(headerData, "Status", "status");
+			if (!status.empty()) {
+				// Add reason phrase to status header if necessary.
+				if (addReasonPhrase(headerData, status)) {
+					status = lookupHeader(headerData, "Status", "status");
+				}
+				// Add status line if necessary.
+				if (getBoolOption(client, "PASSENGER_STATUS_LINE", true)) {
+					addStatusLineFromStatusHeader(headerData, status);
+				}
+			} else {
+				disconnectWithError(client, "application sent malformed response: it didn't send an HTTP status line or a Status header.");
+				return false;
+			}
+		}
+
+		if (client->useUnionStation()) {
+			Header status = lookupHeader(headerData, "Status", "status");
+			string message = "Status: ";
+			message.append(status.value);
+			client->logMessage(message);
+		}
+
+		// Process chunked transfer encoding.
+		Header transferEncoding = lookupHeader(headerData, "Transfer-Encoding", "transfer-encoding");
+		if (!transferEncoding.empty() && transferEncoding.value == "chunked") {
+			P_TRACE(3, "Response with chunked transfer encoding detected.");
+			client->chunkedResponse = true;
+			removeHeader(headerData, transferEncoding);
+		}
+
+		// Add X-Powered-By.
+		if (getBoolOption(client, "PASSENGER_SHOW_VERSION_IN_HEADER", true)) {
+			headerData.append("X-Powered-By: Phusion Passenger " PASSENGER_VERSION "\r\n");
+		} else {
+			headerData.append("X-Powered-By: Phusion Passenger\r\n");
+		}
+
+		// Add Date header. https://code.google.com/p/phusion-passenger/issues/detail?id=485
+		if (lookupHeader(headerData, "Date", "date").empty()) {
+			char dateStr[60];
+			char *pos = dateStr;
+			const char *end = dateStr + sizeof(dateStr) - 1;
+			time_t the_time = time(NULL);
+			struct tm the_tm;
+
+			pos = appendData(pos, end, "Date: ");
+			localtime_r(&the_time, &the_tm);
+			pos += strftime(pos, end - pos, "%a, %d %b %G %H:%M:%S %Z", &the_tm);
+			pos = appendData(pos, end, "\r\n");
+			headerData.append(dateStr, pos - dateStr);
+		}
+
+		// Detect out of band work request
+		Header oobw = lookupHeader(headerData, "X-Passenger-Request-OOB-Work", "x-passenger-request-oob-work");
+		if (!oobw.empty()) {
+			P_TRACE(3, "Response with oobw detected.");
+			if (client->session != NULL) {
+				client->session->requestOOBW();
+			}
+			removeHeader(headerData, oobw);
+		}
+
+		headerData.append("\r\n");
+		writeToClientOutputPipe(client, headerData);
+		return true;
+	}
+
+	void writeToClientOutputPipe(const ClientPtr &client, const StaticString &data) {
+		bool wasCommittingToDisk = client->clientOutputPipe->isCommittingToDisk();
+		bool nowCommittingToDisk = !client->clientOutputPipe->write(data.data(), data.size());
+		if (!wasCommittingToDisk && nowCommittingToDisk) {
+			RH_TRACE(client, 3, "Buffering response data to disk; temporarily stopping application socket.");
+			client->backgroundOperations++;
+			// If the data comes from writeErrorResponse(), then appInput is not available.
+			if (client->session != NULL && client->session->initiated()) {
+				client->appInput->stop();
+			}
+		}
+	}
+
+	size_t onAppInputData(const ClientPtr &client, const StaticString &data) {
+		if (!client->connected()) {
+			return 0;
+		}
+
+		if (!data.empty()) {
+			RH_TRACE(client, 3, "Application sent data: \"" << cEscapeString(data) << "\"");
+
+			// Buffer the application response until we've encountered the end of the header.
+			if (!client->responseHeaderSeen) {
+				size_t consumed = client->responseHeaderBufferer.feed(data.data(), data.size());
+				if (!client->responseHeaderBufferer.acceptingInput()) {
+					if (client->responseHeaderBufferer.hasError()) {
+						disconnectWithError(client, "application response format error (invalid header)");
+					} else {
+						// Now that we have a full header, do something with it.
+						client->responseHeaderSeen = true;
+						StaticString header = client->responseHeaderBufferer.getData();
+						if (processResponseHeader(client, header)) {
+							return consumed;
+						} else {
+							assert(!client->connected());
+						}
+					}
+				}
+			// The header has already been processed so forward it
+			// directly to clientOutputPipe, possibly through a
+			// dechunker first.
+			} else if (client->chunkedResponse) {
+				client->responseDechunker.feed(data.data(), data.size());
+			} else {
+				onAppInputChunk(client, data);
+			}
+			return data.size();
+
+		} else {
+			onAppInputEof(client);
+			return 0;
+		}
+	}
+
+	void onAppInputChunk(const ClientPtr &client, const StaticString &data) {
+		writeToClientOutputPipe(client, data);
+	}
+
+	void onAppInputEof(const ClientPtr &client) {
+		if (!client->connected()) {
+			return;
+		}
+
+		RH_DEBUG(client, "Application sent EOF");
+		client->endScopeLog(&client->scopeLogs.requestProxying);
+		client->clientOutputPipe->end();
+	}
+
+	void onAppInputError(const ClientPtr &client, const char *message, int errorCode) {
+		if (!client->connected()) {
+			return;
+		}
+
+		if (errorCode == ECONNRESET) {
+			// We might as well treat ECONNRESET like an EOF.
+			// http://stackoverflow.com/questions/2974021/what-does-econnreset-mean-in-the-context-of-an-af-local-socket
+			onAppInputEof(client);
+		} else {
+			stringstream message;
+			message << "application socket read error: ";
+			message << strerror(errorCode);
+			message << " (fd=" << client->appInput->getFd();
+			message << ", errno=" << errorCode << ")";
+			disconnectWithError(client, message.str());
+		}
+	}
+
+	void onClientOutputPipeCommit(const ClientPtr &client) {
+		if (!client->connected()) {
+			return;
+		}
+
+		RH_TRACE(client, 3, "Done buffering response data to disk; resuming application socket.");
+		client->backgroundOperations--;
+		// If the data comes from writeErrorResponse(), then appInput is not available.
+		if (client->session != NULL && client->session->initiated()) {
+			client->appInput->start();
+		}
+	}
+
+
+	/*****************************************************
+	 * COMPONENT: clientOutputPipe -> client fd plumbing
+	 *
+	 * The following code handles forwarding data from
+	 * clientOutputPipe to the client socket.
+	 *****************************************************/
+
+	void onClientOutputPipeData(const ClientPtr &client, const char *data,
+		size_t size, const FileBackedPipe::ConsumeCallback &consumed)
+	{
+		if (!client->connected()) {
+			return;
+		}
+
+		RH_TRACE(client, 3, "Forwarding " << size << " bytes of application data to client.");
+		ssize_t ret = syscalls::write(client->fd, data, size);
+		if (ret == -1) {
+			int e = errno;
+			RH_TRACE(client, 3, "Could not write to client socket: " << strerror(e) << " (errno=" << e << ")");
+			if (e == EAGAIN) {
+				RH_TRACE(client, 3, "Waiting until the client socket is writable again.");
+				client->clientOutputWatcher.start();
+				consumed(0, true);
+			} else if (e == EPIPE || e == ECONNRESET) {
+				// If the client closed the connection then disconnect quietly.
+				RH_TRACE(client, 3, "Client stopped reading prematurely");
+				if (client->useUnionStation()) {
+					client->logMessage("Disconnecting: client stopped reading prematurely");
+				}
+				disconnect(client);
+			} else {
+				disconnectWithClientSocketWriteError(client, e);
+			}
+		} else {
+			RH_TRACE(client, 3, "Managed to forward " << ret << " bytes.");
+			consumed(ret, false);
+		}
+	}
+
+	void onClientOutputPipeEnd(const ClientPtr &client) {
+		if (!client->connected()) {
+			return;
+		}
+
+		RH_TRACE(client, 2, "Client output pipe ended; disconnecting client");
+		client->endScopeLog(&client->scopeLogs.requestProcessing);
+		disconnect(client);
+	}
+
+	void onClientOutputPipeError(const ClientPtr &client, int errorCode) {
+		if (!client->connected()) {
+			return;
+		}
+
+		stringstream message;
+		message << "client output pipe error: ";
+		message << strerror(errorCode);
+		message << " (errno=" << errorCode << ")";
+		disconnectWithError(client, message.str());
+	}
+
+	void onClientOutputWritable(const ClientPtr &client) {
+		if (!client->connected()) {
+			return;
+		}
+
+		// Continue forwarding output data to the client.
+		RH_TRACE(client, 3, "Client socket became writable again.");
+		client->clientOutputWatcher.stop();
+		assert(!client->clientOutputPipe->isStarted());
+		client->clientOutputPipe->start();
+	}
+
+
+	/*****************************************************
+	 * COMPONENT: client acceptor
+	 *
+	 * The following code accepts new client connections
+	 * and forwards events to the appropriate functions
+	 * depending on the client state.
+	 *****************************************************/
+
+	FileDescriptor acceptNonBlockingSocket(int sock) {
+		union {
+			struct sockaddr_in inaddr;
+			struct sockaddr_un unaddr;
+		} u;
+		socklen_t addrlen = sizeof(u);
+
+		if (accept4Available) {
+			FileDescriptor fd(callAccept4(requestSocket,
+				(struct sockaddr *) &u, &addrlen, O_NONBLOCK));
+			if (fd == -1 && errno == ENOSYS) {
+				accept4Available = false;
+				return acceptNonBlockingSocket(sock);
+			} else {
+				return fd;
+			}
+		} else {
+			FileDescriptor fd(syscalls::accept(requestSocket,
+				(struct sockaddr *) &u, &addrlen));
+			if (fd != -1) {
+				int e = errno;
+				setNonBlocking(fd);
+				errno = e;
+			}
+			return fd;
+		}
+	}
+
+
+	void onResumeSocketWatcher(ev::timer &timer, int revents) {
+		P_INFO("Resuming listening on server socket.");
+		resumeSocketWatcherTimer.stop();
+		requestSocketWatcher.start();
+	}
+
+	void onAcceptable(ev::io &io, int revents) {
+		bool endReached = false;
+		unsigned int count = 0;
+		unsigned int maxAcceptTries = clamp<unsigned int>(clients.size(), 1, 10);
+		ClientPtr acceptedClients[10];
+
+		while (!endReached && count < maxAcceptTries) {
+			FileDescriptor fd = acceptNonBlockingSocket(requestSocket);
+			if (fd == -1) {
+				if (errno == EAGAIN || errno == EWOULDBLOCK) {
+					endReached = true;
+				} else {
+					int e = errno;
+					P_ERROR("Cannot accept client: " << strerror(e) <<
+						" (errno=" << e << "). " <<
+						"Pausing listening on server socket for 3 seconds. " <<
+						"Current client count: " << clients.size());
+					requestSocketWatcher.stop();
+					resumeSocketWatcherTimer.start();
+					endReached = true;
+				}
+			} else if (benchmarkPoint == BP_AFTER_ACCEPT) {
+				writeExact(fd,
+					"HTTP/1.1 200 OK\r\n"
+					"Status: 200 OK\r\n"
+					"Content-Type: text/html\r\n"
+					"Connection: close\r\n"
+					"\r\n"
+					"Benchmark point: after_accept\n");
+			} else {
+				ClientPtr client = make_shared<Client>();
+				client->associate(this, fd);
+				clients.insert(make_pair<int, ClientPtr>(fd, client));
+				acceptedClients[count] = client;
+				count++;
+				RH_DEBUG(client, "New client accepted; new client count = " << clients.size());
+			}
+		}
+
+		for (unsigned int i = 0; i < count; i++) {
+			acceptedClients[i]->clientInput->readNow();
+		}
+
+		if (OXT_LIKELY(!clients.empty())) {
+			inactivityTimer.stop();
+		}
+	}
+
+
+	size_t onClientInputData(const ClientPtr &client, const StaticString &data) {
+		RH_TRACE(client, 3, "Event: onClientInputData");
+		if (!client->connected()) {
+			return 0;
+		}
+
+		if (data.empty()) {
+			onClientEof(client);
+			return 0;
+		} else {
+			return onClientRealData(client, data.data(), data.size());
+		}
+	}
+
+	size_t onClientRealData(const ClientPtr &client, const char *buf, size_t size) {
+		size_t consumed = 0;
+
+		while (consumed < size && client->connected() && client->clientInput->isStarted()) {
+			const char *data = buf + consumed;
+			size_t len       = size - consumed;
+			size_t locallyConsumed;
+
+			RH_TRACE(client, 3, "Processing client data: \"" << cEscapeString(StaticString(data, len)) << "\"");
+			switch (client->state) {
+			case Client::BEGIN_READING_CONNECT_PASSWORD:
+				locallyConsumed = state_beginReadingConnectPassword_onClientData(client, data, len);
+				break;
+			case Client::STILL_READING_CONNECT_PASSWORD:
+				locallyConsumed = state_stillReadingConnectPassword_onClientData(client, data, len);
+				break;
+			case Client::READING_HEADER:
+				locallyConsumed = state_readingHeader_onClientData(client, data, len);
+				break;
+			case Client::BUFFERING_REQUEST_BODY:
+				locallyConsumed = state_bufferingRequestBody_onClientData(client, data, len);
+				break;
+			case Client::FORWARDING_BODY_TO_APP:
+				locallyConsumed = state_forwardingBodyToApp_onClientData(client, data, len);
+				break;
+			default:
+				abort();
+			}
+
+			consumed += locallyConsumed;
+			RH_TRACE(client, 3, "Processed client data: consumed " << locallyConsumed << " bytes");
+			assert(consumed <= size);
+		}
+
+		return consumed;
+	}
+
+	void onClientEof(const ClientPtr &client) {
+		RH_TRACE(client, 3, "Event: onClientEof; client sent EOF");
+		switch (client->state) {
+		case Client::BUFFERING_REQUEST_BODY:
+			state_bufferingRequestBody_onClientEof(client);
+			break;
+		case Client::FORWARDING_BODY_TO_APP:
+			state_forwardingBodyToApp_onClientEof(client);
+			break;
+		default:
+			disconnect(client);
+			break;
+		}
+	}
+
+	void onClientInputError(const ClientPtr &client, const char *message, int errnoCode) {
+		RH_TRACE(client, 3, "Event: onClientInputError");
+		if (!client->connected()) {
+			return;
+		}
+
+		if (errnoCode == ECONNRESET) {
+			// We might as well treat ECONNRESET like an EOF.
+			// http://stackoverflow.com/questions/2974021/what-does-econnreset-mean-in-the-context-of-an-af-local-socket
+			RH_TRACE(client, 3, "Client socket ECONNRESET error; treating it as EOF");
+			onClientEof(client);
+		} else {
+			stringstream message;
+			message << "client socket read error: ";
+			message << strerror(errnoCode);
+			message << " (errno=" << errnoCode << ")";
+			disconnectWithError(client, message.str());
+		}
+	}
+
+
+	void onClientBodyBufferData(const ClientPtr &client, const char *data, size_t size, const FileBackedPipe::ConsumeCallback &consumed) {
+		RH_TRACE(client, 3, "Event: onClientBodyBufferData");
+		if (!client->connected()) {
+			return;
+		}
+
+		switch (client->state) {
+		case Client::FORWARDING_BODY_TO_APP:
+			state_forwardingBodyToApp_onClientBodyBufferData(client, data, size, consumed);
+			break;
+		default:
+			abort();
+		}
+	}
+
+	void onClientBodyBufferError(const ClientPtr &client, int errorCode) {
+		RH_TRACE(client, 3, "Event: onClientBodyBufferError");
+		if (!client->connected()) {
+			return;
+		}
+
+		stringstream message;
+		message << "client body buffer error: ";
+		message << strerror(errorCode);
+		message << " (errno=" << errorCode << ")";
+		disconnectWithError(client, message.str());
+	}
+
+	void onClientBodyBufferEnd(const ClientPtr &client) {
+		RH_TRACE(client, 3, "Event: onClientBodyBufferEnd");
+		if (!client->connected()) {
+			return;
+		}
+
+		switch (client->state) {
+		case Client::FORWARDING_BODY_TO_APP:
+			state_forwardingBodyToApp_onClientBodyBufferEnd(client);
+			break;
+		default:
+			abort();
+		}
+	}
+
+	void onClientBodyBufferCommit(const ClientPtr &client) {
+		RH_TRACE(client, 3, "Event: onClientBodyBufferCommit");
+		if (!client->connected()) {
+			return;
+		}
+
+		switch (client->state) {
+		case Client::BUFFERING_REQUEST_BODY:
+			state_bufferingRequestBody_onClientBodyBufferCommit(client);
+			break;
+		default:
+			abort();
+		}
+	}
+
+	void onAppOutputWritable(const ClientPtr &client) {
+		RH_TRACE(client, 3, "Event: onAppOutputWritable");
+		if (!client->connected()) {
+			return;
+		}
+
+		switch (client->state) {
+		case Client::SENDING_HEADER_TO_APP:
+			state_sendingHeaderToApp_onAppOutputWritable(client);
+			break;
+		case Client::FORWARDING_BODY_TO_APP:
+			state_forwardingBodyToApp_onAppOutputWritable(client);
+			break;
+		default:
+			abort();
+		}
+	}
+
+
+	void onTimeout(const ClientPtr &client) {
+		RH_TRACE(client, 3, "Event: onTimeout");
+		if (!client->connected()) {
+			return;
+		}
+
+		switch (client->state) {
+		case Client::BEGIN_READING_CONNECT_PASSWORD:
+		case Client::STILL_READING_CONNECT_PASSWORD:
+			disconnectWithError(client, "no connect password received within timeout");
+			break;
+		default:
+			disconnectWithError(client, "timeout");
+			break;
+		}
+	}
+
+
+	/*****************************************************
+	 * COMPONENT: client -> application plumbing
+	 *
+	 * The following code implements forwarding data from
+	 * the client to the application. Code is seperated
+	 * by client state.
+	 *****************************************************/
+
+
+	/******* State: BEGIN_READING_CONNECT_PASSWORD *******/
+
+	void checkConnectPassword(const ClientPtr &client, const char *data, unsigned int len) {
+		RH_TRACE(client, 3, "Given connect password: \"" << cEscapeString(StaticString(data, len)) << "\"");
+		if (constantTimeCompare(StaticString(data, len), options.requestSocketPassword)) {
+			RH_TRACE(client, 3, "Connect password is correct; reading header");
+			client->state = Client::READING_HEADER;
+			client->freeBufferedConnectPassword();
+			client->timeoutTimer.stop();
+
+			if (benchmarkPoint == BP_AFTER_CHECK_CONNECT_PASSWORD) {
+				writeSimpleResponse(client, "Benchmark point: after_check_connect_password\n");
+			}
+		} else {
+			disconnectWithError(client, "wrong connect password");
+		}
+	}
+
+	size_t state_beginReadingConnectPassword_onClientData(const ClientPtr &client, const char *data, size_t size) {
+		if (size >= options.requestSocketPassword.size()) {
+			checkConnectPassword(client, data, options.requestSocketPassword.size());
+			return options.requestSocketPassword.size();
+		} else {
+			client->bufferedConnectPassword.data = (char *) malloc(options.requestSocketPassword.size());
+			client->bufferedConnectPassword.alreadyRead = size;
+			memcpy(client->bufferedConnectPassword.data, data, size);
+			client->state = Client::STILL_READING_CONNECT_PASSWORD;
+			return size;
+		}
+	}
+
+
+	/******* State: STILL_READING_CONNECT_PASSWORD *******/
+
+	size_t state_stillReadingConnectPassword_onClientData(const ClientPtr &client, const char *data, size_t size) {
+		size_t consumed = std::min<size_t>(size,
+			options.requestSocketPassword.size() -
+				client->bufferedConnectPassword.alreadyRead);
+		memcpy(client->bufferedConnectPassword.data + client->bufferedConnectPassword.alreadyRead,
+			data, consumed);
+		client->bufferedConnectPassword.alreadyRead += consumed;
+		if (client->bufferedConnectPassword.alreadyRead == options.requestSocketPassword.size()) {
+			checkConnectPassword(client, client->bufferedConnectPassword.data,
+				options.requestSocketPassword.size());
+		}
+		return consumed;
+	}
+
+
+	/******* State: READING_HEADER *******/
+
+	bool modifyClientHeaders(const ClientPtr &client) {
+		ScgiRequestParser &parser = client->scgiParser;
+		ScgiRequestParser::HeaderMap &map = parser.getMap();
+		ScgiRequestParser::iterator it, end = map.end();
+		bool modified = false;
+
+		/* The Rack spec specifies that HTTP_CONTENT_LENGTH and HTTP_CONTENT_TYPE must
+		 * not exist and that their respective non-HTTP_ versions should exist instead.
+		 */
+
+		if ((it = map.find("HTTP_CONTENT_LENGTH")) != end) {
+			if (map.find("CONTENT_LENGTH") == end) {
+				map["CONTENT_LENGTH"] = it->second;
+				map.erase("HTTP_CONTENT_LENGTH");
+			} else {
+				map.erase(it);
+			}
+			modified = true;
+		}
+
+		if ((it = map.find("HTTP_CONTENT_TYPE")) != end) {
+			if (map.find("CONTENT_TYPE") == end) {
+				map["CONTENT_TYPE"] = it->second;
+				map.erase("HTTP_CONTENT_TYPE");
+			} else {
+				map.erase(it);
+			}
+			modified = true;
+		}
+
+		return modified;
+	}
+
+	static void fillPoolOption(const ClientPtr &client, StaticString &field, const StaticString &name) {
+		ScgiRequestParser::const_iterator it = client->scgiParser.getHeaderIterator(name);
+		if (it != client->scgiParser.end()) {
+			field = it->second;
+		}
+	}
+
+	static void fillPoolOption(const ClientPtr &client, bool &field, const StaticString &name) {
+		ScgiRequestParser::const_iterator it = client->scgiParser.getHeaderIterator(name);
+		if (it != client->scgiParser.end()) {
+			field = it->second == "true";
+		}
+	}
+
+	static void fillPoolOption(const ClientPtr &client, unsigned long &field, const StaticString &name) {
+		ScgiRequestParser::const_iterator it = client->scgiParser.getHeaderIterator(name);
+		if (it != client->scgiParser.end()) {
+			field = stringToUint(it->second);
+		}
+	}
+
+	static void fillPoolOption(const ClientPtr &client, long &field, const StaticString &name) {
+		ScgiRequestParser::const_iterator it = client->scgiParser.getHeaderIterator(name);
+		if (it != client->scgiParser.end()) {
+			field = stringToInt(it->second);
+		}
+	}
+
+	void fillPoolOptions(const ClientPtr &client) {
+		Options &options = client->options;
+		ScgiRequestParser &parser = client->scgiParser;
+		ScgiRequestParser::const_iterator it, end = client->scgiParser.end();
+
+		options = Options();
+
+		StaticString scriptName = parser.getHeader("SCRIPT_NAME");
+		StaticString appRoot = parser.getHeader("PASSENGER_APP_ROOT");
+		if (scriptName.empty()) {
+			if (appRoot.empty()) {
+				StaticString documentRoot = parser.getHeader("DOCUMENT_ROOT");
+				if (documentRoot.empty()) {
+					disconnectWithError(client, "no PASSENGER_APP_ROOT or DOCUMENT_ROOT headers set.");
+					return;
+				}
+				client->appRoot = extractDirName(documentRoot);
+				options.appRoot = client->appRoot;
+			} else {
+				options.appRoot = appRoot;
+			}
+		} else {
+			if (appRoot.empty()) {
+				client->appRoot = extractDirName(resolveSymlink(parser.getHeader("DOCUMENT_ROOT")));
+				options.appRoot = client->appRoot;
+			} else {
+				options.appRoot = appRoot;
+			}
+			options.baseURI = scriptName;
+		}
+		
+		options.ruby = this->options.defaultRubyCommand;
+		options.logLevel = getLogLevel();
+		options.loggingAgentAddress = this->options.loggingAgentAddress;
+		options.loggingAgentUsername = "logging";
+		options.loggingAgentPassword = this->options.loggingAgentPassword;
+		options.defaultUser = this->options.defaultUser;
+		options.defaultGroup = this->options.defaultGroup;
+		fillPoolOption(client, options.appGroupName, "PASSENGER_APP_GROUP_NAME");
+		fillPoolOption(client, options.appType, "PASSENGER_APP_TYPE");
+		fillPoolOption(client, options.environment, "PASSENGER_ENV");
+		fillPoolOption(client, options.ruby, "PASSENGER_RUBY");
+		fillPoolOption(client, options.python, "PASSENGER_PYTHON");
+		fillPoolOption(client, options.user, "PASSENGER_USER");
+		fillPoolOption(client, options.group, "PASSENGER_GROUP");
+		fillPoolOption(client, options.minProcesses, "PASSENGER_MIN_INSTANCES");
+		fillPoolOption(client, options.maxRequests, "PASSENGER_MAX_REQUESTS");
+		fillPoolOption(client, options.spawnMethod, "PASSENGER_SPAWN_METHOD");
+		fillPoolOption(client, options.startCommand, "PASSENGER_START_COMMAND");
+		fillPoolOption(client, options.maxPreloaderIdleTime, "PASSENGER_MAX_PRELOADER_IDLE_TIME");
+		fillPoolOption(client, options.statThrottleRate, "PASSENGER_STAT_THROTTLE_RATE");
+		fillPoolOption(client, options.restartDir, "PASSENGER_RESTART_DIR");
+		fillPoolOption(client, options.loadShellEnvvars, "PASSENGER_LOAD_SHELL_ENVVARS");
+		fillPoolOption(client, options.debugger, "PASSENGER_DEBUGGER");
+		fillPoolOption(client, options.raiseInternalError, "PASSENGER_RAISE_INTERNAL_ERROR");
+		
+		for (it = client->scgiParser.begin(); it != end; it++) {
+			if (!startsWith(it->first, "PASSENGER_")
+			 && !startsWith(it->first, "HTTP_")
+			 && it->first != "PATH_INFO"
+			 && it->first != "SCRIPT_NAME"
+			 && it->first != "CONTENT_LENGTH"
+			 && it->first != "CONTENT_TYPE")
+			{
+				options.environmentVariables.push_back(*it);
+			}
+		}
+	}
+
+	void initializeUnionStation(const ClientPtr &client) {
+		if (getBoolOption(client, "UNION_STATION_SUPPORT", false)) {
+			Options &options = client->options;
+			ScgiRequestParser &parser = client->scgiParser;
+
+			StaticString key = parser.getHeader("UNION_STATION_KEY");
+			StaticString filters = parser.getHeader("UNION_STATION_FILTERS");
+			if (key.empty()) {
+				disconnectWithError(client, "header UNION_STATION_KEY must be set.");
+				return;
+			}
+
+			client->options.analytics = true;
+			client->options.unionStationKey = key;
+			client->options.logger = loggerFactory->newTransaction(
+				options.getAppGroupName(), "requests", key, filters);
+			
+			client->beginScopeLog(&client->scopeLogs.requestProcessing, "request processing");
+
+			StaticString staticRequestURI = parser.getHeader("REQUEST_URI");
+			if (!staticRequestURI.empty()) {
+				client->logMessage("URI: " + staticRequestURI);
+			} else {
+				string requestURI = parser.getHeader("SCRIPT_NAME");
+				requestURI.append(parser.getHeader("PATH_INFO"));
+				StaticString queryString = parser.getHeader("QUERY_STRING");
+				if (!queryString.empty()) {
+					requestURI.append("?");
+					requestURI.append(queryString);
+				}
+				client->logMessage("URI: " + requestURI);
+			}
+		}
+	}
+
+	size_t state_readingHeader_onClientData(const ClientPtr &client, const char *data, size_t size) {
+		ScgiRequestParser &parser = client->scgiParser;
+		size_t consumed = parser.feed(data, size);
+		if (!parser.acceptingInput()) {
+			if (parser.getState() == ScgiRequestParser::ERROR) {
+				if (parser.getErrorReason() == ScgiRequestParser::LIMIT_REACHED) {
+					disconnectWithError(client, "SCGI header too large");
+				} else {
+					disconnectWithError(client, "invalid SCGI header");
+				}
+				return consumed;
+			}
+
+			if (benchmarkPoint == BP_AFTER_PARSING_HEADER) {
+				writeSimpleResponse(client, "Benchmark point: after_parsing_header\n");
+				return consumed;
+			}
+
+			bool modified = modifyClientHeaders(client);
+			/* TODO: in case the headers are not modified, we only need to rebuild the header data
+			 * right now because the scgiParser buffer is invalidated as soon as onClientData exits.
+			 * We should figure out a way to not copy anything if we can do everything before
+			 * onClientData exits.
+			 */
+			parser.rebuildData(modified);
+			client->contentLength = getULongLongOption(client, "CONTENT_LENGTH");
+			fillPoolOptions(client);
+			if (!client->connected()) {
+				return consumed;
+			}
+			initializeUnionStation(client);
+			if (!client->connected()) {
+				return consumed;
+			}
+
+			if (getBoolOption(client, "PASSENGER_BUFFERING")) {
+				RH_TRACE(client, 3, "Valid SCGI header; buffering request body");
+				client->state = Client::BUFFERING_REQUEST_BODY;
+				client->requestBodyIsBuffered = true;
+				client->beginScopeLog(&client->scopeLogs.bufferingRequestBody, "buffering request body");
+				if (client->contentLength == 0) {
+					client->clientInput->stop();
+					state_bufferingRequestBody_onClientEof(client);
+					return 0;
+				}
+			} else {
+				RH_TRACE(client, 3, "Valid SCGI header; not buffering request body; checking out session");
+				client->clientInput->stop();
+				checkoutSession(client);
+			}
+		}
+		return consumed;
+	}
+
+
+	/******* State: BUFFERING_REQUEST_BODY *******/
+
+	void state_bufferingRequestBody_verifyInvariants(const ClientPtr &client) const {
+		assert(client->requestBodyIsBuffered);
+		assert(!client->clientBodyBuffer->isStarted());
+	}
+
+	size_t state_bufferingRequestBody_onClientData(const ClientPtr &client, const char *data, size_t size) {
+		state_bufferingRequestBody_verifyInvariants(client);
+		assert(!client->clientBodyBuffer->isCommittingToDisk());
+
+		if (client->contentLength >= 0) {
+			size = std::min<unsigned long long>(
+				size,
+				(unsigned long long) client->contentLength - client->clientBodyAlreadyRead
+			);
+		}
+
+		if (!client->clientBodyBuffer->write(data, size)) {
+			// The pipe cannot write the data to disk quickly enough, so
+			// suspend reading from the client until the pipe is done.
+			client->backgroundOperations++; // TODO: figure out whether this is necessary
+			client->clientInput->stop();
+		}
+		client->clientBodyAlreadyRead += size;
+
+		RH_TRACE(client, 3, "Buffered " << size << " bytes of client body data; total=" <<
+			client->clientBodyAlreadyRead << ", content-length=" << client->contentLength);
+		assert(client->contentLength == -1 || client->clientBodyAlreadyRead <= (unsigned long long) client->contentLength);
+
+		if (client->contentLength >= 0 && client->clientBodyAlreadyRead == (unsigned long long) client->contentLength) {
+			if (client->clientBodyBuffer->isCommittingToDisk()) {
+				RH_TRACE(client, 3, "Done buffering request body, but clientBodyBuffer not yet done committing data to disk; waiting until it's done");
+				client->checkoutSessionAfterCommit = true;
+			} else {
+				client->clientInput->stop();
+				state_bufferingRequestBody_onClientEof(client);
+			}
+		}
+
+		return size;
+	}
+
+	void state_bufferingRequestBody_onClientEof(const ClientPtr &client) {
+		state_bufferingRequestBody_verifyInvariants(client);
+
+		RH_TRACE(client, 3, "Done buffering request body; checking out session");
+		client->clientBodyBuffer->end();
+		client->endScopeLog(&client->scopeLogs.bufferingRequestBody);
+		checkoutSession(client);
+	}
+
+	void state_bufferingRequestBody_onClientBodyBufferCommit(const ClientPtr &client) {
+		// Now that the pipe has committed the data to disk
+		// resume reading from the client socket.
+		state_bufferingRequestBody_verifyInvariants(client);
+		assert(!client->clientInput->isStarted());
+		client->backgroundOperations--;
+		if (client->checkoutSessionAfterCommit) {
+			RH_TRACE(client, 3, "Done committing request body to disk");
+			state_bufferingRequestBody_onClientEof(client);
+		} else {
+			client->clientInput->start();
+		}
+	}
+
+
+	/******* State: CHECKING_OUT_SESSION *******/
+
+	void state_checkingOutSession_verifyInvariants(const ClientPtr &client) {
+		assert(!client->clientInput->isStarted());
+		assert(!client->clientBodyBuffer->isStarted());
+	}
+
+	void checkoutSession(const ClientPtr &client) {
+		if (benchmarkPoint != BP_BEFORE_CHECKOUT_SESSION) {
+			RH_TRACE(client, 2, "Checking out session: appRoot=" << client->options.appRoot);
+			client->state = Client::CHECKING_OUT_SESSION;
+			client->beginScopeLog(&client->scopeLogs.getFromPool, "get from pool");
+			pool->asyncGet(client->options, boost::bind(&RequestHandler::sessionCheckedOut,
+				this, client, _1, _2));
+			if (!client->sessionCheckedOut) {
+				client->backgroundOperations++;
+			}
+		} else {
+			writeSimpleResponse(client, "Benchmark point: before_checkout_session\n");
+		}
+	}
+
+	void sessionCheckedOut(ClientPtr client, const SessionPtr &session, const ExceptionPtr &e) {
+		if (!pthread_equal(pthread_self(), libev->getCurrentThread())) {
+			libev->runLater(boost::bind(&RequestHandler::sessionCheckedOut_real, this,
+				client, session, e));
+		} else {
+			sessionCheckedOut_real(client, session, e);
+		}
+	}
+
+	void sessionCheckedOut_real(ClientPtr client, const SessionPtr &session, const ExceptionPtr &e) {
+		if (!client->connected()) {
+			return;
+		}
+
+		state_checkingOutSession_verifyInvariants(client);
+		client->backgroundOperations--;
+		client->sessionCheckedOut = true;
+
+		if (e != NULL) {
+			client->endScopeLog(&client->scopeLogs.getFromPool, false);
+			shared_ptr<SpawnException> e2 = dynamic_pointer_cast<SpawnException>(e);
+			if (e2 != NULL) {
+				if (strip(e2->getErrorPage()).empty()) {
+					RH_WARN(client, "Cannot checkout session. " << e2->what());
+					writeErrorResponse(client, e2->what());
+				} else {
+					RH_WARN(client, "Cannot checkout session. " << e2->what() <<
+						"\nError page:\n" << e2->getErrorPage());
+					writeErrorResponse(client, e2->getErrorPage(), e2.get());
+				}
+			} else {
+				string typeName;
+				#ifdef CXX_ABI_API_AVAILABLE
+					int status;
+					char *tmp = abi::__cxa_demangle(typeid(*e).name(), 0, 0, &status);
+					if (tmp != NULL) {
+						typeName = tmp;
+						free(tmp);
+					} else {
+						typeName = typeid(*e).name();
+					}
+				#else
+					typeName = typeid(*e).name();
+				#endif
+
+				RH_WARN(client, "Cannot checkout session (exception type " <<
+					typeName << "): " << e->what());
+				
+				string response = "An internal error occurred while trying to spawn the application.\n";
+				response.append("Exception type: ");
+				response.append(typeName);
+				response.append("\nError message: ");
+				response.append(e->what());
+				shared_ptr<tracable_exception> e3 = dynamic_pointer_cast<tracable_exception>(e);
+				if (e3 != NULL) {
+					response.append("\nBacktrace:\n");
+					response.append(e3->backtrace());
+				}
+
+				writeErrorResponse(client, response);
+			}
+		} else {
+			RH_DEBUG(client, "Session checked out: pid=" << session->getPid() <<
+				", gupid=" << session->getGupid());
+			client->session = session;
+			initiateSession(client);
+		}
+	}
+
+	void initiateSession(const ClientPtr &client) {
+		assert(client->state == Client::CHECKING_OUT_SESSION);
+		client->sessionCheckoutTry++;
+		try {
+			client->session->initiate();
+		} catch (const SystemException &e2) {
+			if (client->sessionCheckoutTry < 10) {
+				RH_DEBUG(client, "Error checking out session (" << e2.what() <<
+					"); retrying (attempt " << client->sessionCheckoutTry << ")");
+				client->sessionCheckedOut = false;
+				pool->asyncGet(client->options,
+					boost::bind(&RequestHandler::sessionCheckedOut,
+						this, client, _1, _2));
+				if (!client->sessionCheckedOut) {
+					client->backgroundOperations++;
+				}
+			} else {
+				string message = "could not initiate a session (";
+				message.append(e2.what());
+				message.append(")");
+				disconnectWithError(client, message);
+			}
+			return;
+		}
+		
+		if (client->useUnionStation()) {
+			client->endScopeLog(&client->scopeLogs.getFromPool);
+			client->logMessage("Application PID: " +
+				toString(client->session->getPid()) +
+				" (GUPID: " + client->session->getGupid() + ")");
+			client->beginScopeLog(&client->scopeLogs.requestProxying, "request proxying");
+		}
+		
+		RH_DEBUG(client, "Session initiated: fd=" << client->session->fd());
+		setNonBlocking(client->session->fd());
+		client->appInput->reset(libev.get(), client->session->fd());
+		client->appInput->start();
+		client->appOutputWatcher.set(libev->getLoop());
+		client->appOutputWatcher.set(client->session->fd(), ev::WRITE);
+		sendHeaderToApp(client);
+	}
+
+
+	/******* State: SENDING_HEADER_TO_APP *******/
+
+	void state_sendingHeaderToApp_verifyInvariants(const ClientPtr &client) {
+		assert(!client->clientInput->isStarted());
+		assert(!client->clientBodyBuffer->isStarted());
+	}
+
+	void sendHeaderToApp(const ClientPtr &client) {
+		assert(!client->clientInput->isStarted());
+		assert(!client->clientBodyBuffer->isStarted());
+
+		RH_TRACE(client, 2, "Sending headers to application");
+
+		if (client->session->getProtocol() == "session") {
+			char sizeField[sizeof(uint32_t)];
+			SmallVector<StaticString, 10> data;
+
+			data.push_back(StaticString(sizeField, sizeof(uint32_t)));
+			data.push_back(client->scgiParser.getHeaderData());
+
+			data.push_back(makeStaticStringWithNull("PASSENGER_CONNECT_PASSWORD"));
+			data.push_back(makeStaticStringWithNull(client->session->getConnectPassword()));
+
+			if (client->options.analytics) {
+				data.push_back(makeStaticStringWithNull("PASSENGER_TXN_ID"));
+				data.push_back(makeStaticStringWithNull(client->options.logger->getTxnId()));
+			}
+
+			uint32_t dataSize = 0;
+			for (unsigned int i = 1; i < data.size(); i++) {
+				dataSize += (uint32_t) data[i].size();
+			}
+			Uint32Message::generate(sizeField, dataSize);
+
+			ssize_t ret = gatheredWrite(client->session->fd(), &data[0],
+				data.size(), client->appOutputBuffer);
+			if (ret == -1 && errno != EAGAIN) {
+				disconnectWithAppSocketWriteError(client, errno);
+			} else if (!client->appOutputBuffer.empty()) {
+				client->state = Client::SENDING_HEADER_TO_APP;
+				client->appOutputWatcher.start();
+			} else {
+				sendBodyToApp(client);
+			}
+		} else {
+			assert(client->session->getProtocol() == "http_session");
+			const ScgiRequestParser &parser = client->scgiParser;
+			ScgiRequestParser::const_iterator it, end = parser.end();
+			string data;
+
+			data.reserve(parser.getHeaderData().size() + 128);
+			data.append(parser.getHeader("REQUEST_METHOD"));
+			data.append(" ");
+			data.append(parser.getHeader("REQUEST_URI"));
+			data.append(" HTTP/1.1\r\n");
+			data.append("Connection: close\r\n");
+
+			for (it = parser.begin(); it != end; it++) {
+				if (startsWith(it->first, "HTTP_")) {
+					string subheader = it->first.substr(sizeof("HTTP_") - 1);
+					string::size_type i;
+					for (i = 0; i < subheader.size(); i++) {
+						if (subheader[i] == '_') {
+							subheader[i] = '-';
+						} else if (i > 0 && subheader[i - 1] != '-') {
+							subheader[i] = tolower(subheader[i]);
+						}
+					}
+
+					data.append(subheader);
+					data.append(": ");
+					data.append(it->second);
+					data.append("\r\n");
+				}
+			}
+
+			StaticString header = parser.getHeader("CONTENT_LENGTH");
+			if (!header.empty()) {
+				data.append("Content-Length: ");
+				data.append(header);
+				data.append("\r\n");
+			}
+
+			header = parser.getHeader("CONTENT_TYPE");
+			if (!header.empty()) {
+				data.append("Content-Type: ");
+				data.append(header);
+				data.append("\r\n");
+			}
+
+			if (client->options.analytics) {
+				data.append("Passenger-Txn-Id: ");
+				data.append(client->options.logger->getTxnId());
+				data.append("\r\n");
+			}
+
+			data.append("\r\n");
+
+			StaticString datas[] = { data };
+			ssize_t ret = gatheredWrite(client->session->fd(), datas,
+				1, client->appOutputBuffer);
+			if (ret == -1 && errno != EAGAIN) {
+				disconnectWithAppSocketWriteError(client, errno);
+				// TODO: what about other errors?
+			} else if (!client->appOutputBuffer.empty()) {
+				client->state = Client::SENDING_HEADER_TO_APP;
+				client->appOutputWatcher.start();
+			} else {
+				sendBodyToApp(client);
+			}
+		}
+	}
+
+	void state_sendingHeaderToApp_onAppOutputWritable(const ClientPtr &client) {
+		state_sendingHeaderToApp_verifyInvariants(client);
+
+		ssize_t ret = gatheredWrite(client->session->fd(), NULL, 0, client->appOutputBuffer);
+		if (ret == -1) {
+			if (errno != EAGAIN && errno != EPIPE && errno != ECONNRESET) {
+				disconnectWithAppSocketWriteError(client, errno);
+			}
+			// TODO: what about other errors?
+		} else if (client->appOutputBuffer.empty()) {
+			client->appOutputWatcher.stop();
+			sendBodyToApp(client);
+		}
+	}
+
+
+	/******* State: FORWARDING_BODY_TO_APP *******/
+
+	void state_forwardingBodyToApp_verifyInvariants(const ClientPtr &client) {
+		assert(client->state == Client::FORWARDING_BODY_TO_APP);
+	}
+
+	void sendBodyToApp(const ClientPtr &client) {
+		assert(client->appOutputBuffer.empty());
+		assert(!client->clientBodyBuffer->isStarted());
+		assert(!client->clientInput->isStarted());
+		assert(!client->appOutputWatcher.is_active());
+
+		RH_TRACE(client, 2, "Begin sending body to application");
+
+		client->state = Client::FORWARDING_BODY_TO_APP;
+		if (client->requestBodyIsBuffered) {
+			client->clientBodyBuffer->start();
+		} else if (client->contentLength == 0) {
+			state_forwardingBodyToApp_onClientEof(client);
+		} else {
+			client->clientInput->start();
+		}
+	}
+
+
+	size_t state_forwardingBodyToApp_onClientData(const ClientPtr &client,
+		const char *data, size_t size)
+	{
+		state_forwardingBodyToApp_verifyInvariants(client);
+		assert(!client->requestBodyIsBuffered);
+
+		if (client->contentLength >= 0) {
+			size = std::min<unsigned long long>(
+				size,
+				(unsigned long long) client->contentLength - client->clientBodyAlreadyRead
+			);
+		}
+
+		RH_TRACE(client, 3, "Forwarding " << size << " bytes of client body data to application.");
+		ssize_t ret = syscalls::write(client->session->fd(), data, size);
+		int e = errno;
+		if (ret == -1) {
+			RH_TRACE(client, 3, "Could not write to application socket: " << strerror(e) << " (errno=" << e << ")");
+			if (e == EAGAIN) {
+				RH_TRACE(client, 3, "Waiting until the application socket is writable again.");
+				client->clientInput->stop();
+				client->appOutputWatcher.start();
+			} else if (e == EPIPE || e == ECONNRESET) {
+				// Client will be disconnected after response forwarding is done.
+				client->clientInput->stop();
+				syscalls::shutdown(client->fd, SHUT_RD);
+			} else {
+				disconnectWithAppSocketWriteError(client, e);
+			}
+			return 0;
+		} else {
+			client->clientBodyAlreadyRead += ret;
+
+			RH_TRACE(client, 3, "Managed to forward " << ret << " bytes; total=" <<
+				client->clientBodyAlreadyRead << ", content-length=" << client->contentLength);
+			assert(client->contentLength == -1 || client->clientBodyAlreadyRead <= (unsigned long long) client->contentLength);
+			if (client->contentLength >= 0 && client->clientBodyAlreadyRead == (unsigned long long) client->contentLength) {
+				client->clientInput->stop();
+				state_forwardingBodyToApp_onClientEof(client);
+			}
+
+			return ret;
+		}
+	}
+
+	void state_forwardingBodyToApp_onClientEof(const ClientPtr &client) {
+		state_forwardingBodyToApp_verifyInvariants(client);
+		assert(!client->requestBodyIsBuffered);
+
+		RH_TRACE(client, 2, "End of (unbuffered) client body reached; done sending data to application");
+		client->clientInput->stop();
+		if (client->shouldHalfCloseWrite()) {
+			syscalls::shutdown(client->session->fd(), SHUT_WR);
+		}
+	}
+
+	void state_forwardingBodyToApp_onAppOutputWritable(const ClientPtr &client) {
+		state_forwardingBodyToApp_verifyInvariants(client);
+
+		RH_TRACE(client, 3, "Application socket became writable again.");
+		client->appOutputWatcher.stop();
+		if (client->requestBodyIsBuffered) {
+			assert(!client->clientBodyBuffer->isStarted());
+			client->clientBodyBuffer->start();
+		} else {
+			assert(!client->clientInput->isStarted());
+			client->clientInput->start();
+		}
+	}
+
+
+	void state_forwardingBodyToApp_onClientBodyBufferData(const ClientPtr &client,
+		const char *data, size_t size, const FileBackedPipe::ConsumeCallback &consumed)
+	{
+		state_forwardingBodyToApp_verifyInvariants(client);
+		assert(client->requestBodyIsBuffered);
+
+		RH_TRACE(client, 3, "Forwarding " << size << " bytes of buffered client body data to application.");
+		ssize_t ret = syscalls::write(client->session->fd(), data, size);
+		if (ret == -1) {
+			int e = errno;
+			RH_TRACE(client, 3, "Could not write to application socket: " << strerror(e) << " (errno=" << e << ")");
+			if (e == EAGAIN) {
+				RH_TRACE(client, 3, "Waiting until the application socket is writable again.");
+				client->appOutputWatcher.start();
+				consumed(0, true);
+			} else if (e == EPIPE || e == ECONNRESET) {
+				// Client will be disconnected after response forwarding is done.
+				syscalls::shutdown(client->fd, SHUT_RD);
+				consumed(0, true);
+			} else {
+				disconnectWithAppSocketWriteError(client, e);
+			}
+		} else {
+			RH_TRACE(client, 3, "Managed to forward " << ret << " bytes.");
+			consumed(ret, false);
+		}
+	}
+
+	void state_forwardingBodyToApp_onClientBodyBufferEnd(const ClientPtr &client) {
+		state_forwardingBodyToApp_verifyInvariants(client);
+		assert(client->requestBodyIsBuffered);
+
+		RH_TRACE(client, 2, "End of (buffered) client body reached; done sending data to application");
+		if (client->shouldHalfCloseWrite()) {
+			syscalls::shutdown(client->session->fd(), SHUT_WR);
+		}
+	}
+
+
+public:
+	// For unit testing purposes.
+	unsigned int connectPasswordTimeout; // milliseconds
+
+	BenchmarkPoint benchmarkPoint;
+
+	RequestHandler(const SafeLibevPtr &_libev,
+		const FileDescriptor &_requestSocket,
+		const PoolPtr &_pool,
+		const AgentOptions &_options)
+		: libev(_libev),
+		  requestSocket(_requestSocket),
+		  pool(_pool),
+		  options(_options),
+		  resourceLocator(_options.passengerRoot),
+		  benchmarkPoint(getDefaultBenchmarkPoint())
+	{
+		accept4Available = true;
+		connectPasswordTimeout = 15000;
+		loggerFactory = pool->loggerFactory;
+
+		requestSocketWatcher.set(_requestSocket, ev::READ);
+		requestSocketWatcher.set(_libev->getLoop());
+		requestSocketWatcher.set<RequestHandler, &RequestHandler::onAcceptable>(this);
+		requestSocketWatcher.start();
+
+		resumeSocketWatcherTimer.set<RequestHandler, &RequestHandler::onResumeSocketWatcher>(this);
+		resumeSocketWatcherTimer.set(_libev->getLoop());
+		resumeSocketWatcherTimer.set(3, 3);
+	}
+
+	template<typename Stream>
+	void inspect(Stream &stream) const {
+		stream << clients.size() << " clients:\n";
+		HashMap<int, ClientPtr>::const_iterator it;
+		for (it = clients.begin(); it != clients.end(); it++) {
+			const ClientPtr &client = it->second;
+			stream << "  Client " << client->fd << ":\n";
+			client->inspect(stream);
+		}
+	}
+
+	unsigned long long inactivityTime() const {
+		unsigned long long result;
+		libev->run(boost::bind(&RequestHandler::getInactivityTime, this, &result));
+		return result;
+	}
+};
+
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_REQUEST_HANDLER_H_ */
diff --git a/ext/common/agents/HelperAgent/ScgiRequestParser.h b/ext/common/agents/HelperAgent/ScgiRequestParser.h
new file mode 100644
index 0000000..5697691
--- /dev/null
+++ b/ext/common/agents/HelperAgent/ScgiRequestParser.h
@@ -0,0 +1,451 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_SCGI_REQUEST_PARSER_H_
+#define _PASSENGER_SCGI_REQUEST_PARSER_H_
+
+#include <string>
+#include <algorithm>
+#include <cstdlib>
+#include <cstddef>
+
+#include <oxt/macros.hpp>
+
+#include <StaticString.h>
+#include <Utils/HashMap.h>
+
+namespace Passenger {
+
+using namespace std;
+
+/**
+ * A highly efficient parser for SCGI requests. It parses the request header and
+ * ignores the body data. It supports size limiting for security reasons and it
+ * is zero-copy whenever possible.
+ *
+ * <h2>Usage</h2>
+ * Construct a parser object, then feed data to the parser until it no longer
+ * accepts input, meaning that it has either reached the final (accepting) state
+ * or the error state.
+ *
+ * Example:
+ * @code
+ *    ScgiRequestParser parser;
+ *    char buf[1024 * 16];
+ *    ssize_t size;
+ *    unsigned in bytesAccepted;
+ *    
+ *    do {
+ *        size = read(fd, buf, sizeof(buf));
+ *        bytesAccepted = parser.feed(buf, size);
+ *    } while (parser.acceptingInput());
+ *    
+ *    // Check whether a parse error occured.
+ *    if (parser.getState() == ScgiRequestParser::ERROR) {
+ *        bailOut();
+ *    } else {
+ *        // All good! Do something with the SCGI header that the parser parsed.
+ *        processHeader(parser.getHeaderData());
+ *        print(parser.getHeader("DOCUMENT_ROOT"));
+ *        
+ *        // If the last buffer passed to the parser also contains body data,
+ *        // then the body data starts at 'buf + bytesAccepted'.
+ *        if (bytesAccepted < size) {
+ *            processBody(buf + bytesAccepted, size - bytesAccepted);
+ *        }
+ *    }
+ * @endcode
+ *
+ * <h2>Parser properties</h2>
+ * - A parser object can only process a single SCGI request. You must discard
+ *   the existing parser object and create a new one if you want to process
+ *   another SCGI request.
+ * - It checks the header netstring for both syntax validity and content validity.
+ *   If the netstring value is too large (larger than the given limit) or equal
+ *   to 0 then the parser will enter an error state.
+ * - It also checks the body for syntax validity, i.e. whether the NULL bytes
+ *   are there, whether the closing comma exists, etc. However it does not check
+ *   the body contents, e.g. it doesn't check that "CONTENT_LENGTH" is the first
+ *   header, or that the "SCGI" header is present.
+ *
+ * <h2>Zero-copy notes</h2>
+ * If the first feed() call contains a full SCGI header, then the parser will enter
+ * zero-copy mode. The return value of getHeaderData() will then refer the passed
+ * data and the internal header map will also refer to that same data. No extra
+ * copy of anything is made. You must ensure that the first call's data is kept
+ * around.
+ *
+ * If the first feed() call does not contain a full SCGI header then the parser
+ * will enter buffering mode. All fed data, in so far they're recognized as SCGI
+ * headers, will be buffered into an internal string. getHeaderData() and the
+ * internal header map will then refer to this internal string. In this case
+ * you don't need to ensure that the original data is kept around.
+ */
+class ScgiRequestParser {
+public:
+	typedef HashMap< StaticString, StaticString, StaticString::Hash, equal_to<StaticString> > HeaderMap;
+	typedef HeaderMap::const_iterator const_iterator;
+	typedef HeaderMap::iterator iterator;
+
+	enum State {
+		READING_LENGTH_STRING,
+		READING_HEADER_DATA,
+		EXPECTING_COMMA,
+		DONE,
+		ERROR
+	};
+	
+	enum ErrorReason {
+		NONE,
+		
+		/** The header has a length of 0 bytes. */
+		EMPTY_HEADER,
+		
+		/** The length string is too large. */
+		LENGTH_STRING_TOO_LARGE,
+		
+		/** The header is larger than the maxSize value provided to the constructor. */
+		LIMIT_REACHED,
+		
+		/** The length string contains an invalid character. */
+		INVALID_LENGTH_STRING,
+		
+		/** A header terminator character (",") was expected, but some else
+		 * was encountered instead. */
+		HEADER_TERMINATOR_EXPECTED,
+		
+		/** The header data itself contains errors. */
+		INVALID_HEADER_DATA
+	};
+	
+private:
+	State state;
+	ErrorReason errorReason;
+	unsigned int lengthStringBufferSize;
+	size_t headerSize;
+	size_t maxSize;
+	
+	StaticString headerData;
+	string headerBuffer;
+	HeaderMap headers;
+	char lengthStringBuffer[sizeof("4294967296")];
+	
+	static inline bool isDigit(char byte) {
+		return byte >= '0' && byte <= '9';
+	}
+	
+	/**
+	 * Parse the given header data into key-value pairs, returns whether parsing succeeded.
+	 */
+	bool parseHeaderData(const StaticString &data, HeaderMap &output) {
+		const char *current = data.data();
+		const char *end     = data.data() + data.size();
+		
+		while (current < end) {
+			const char *keyEnd = (const char *) memchr(current, '\0', end - current);
+			if (OXT_UNLIKELY(
+			     OXT_UNLIKELY(keyEnd == NULL)
+			  || OXT_UNLIKELY(keyEnd == current))
+			) {
+				return false;
+			}
+			
+			StaticString key(current, keyEnd - current);
+			current = keyEnd + 1;
+			if (OXT_UNLIKELY(current >= end)) {
+				return false;
+			}
+			
+			const char *valueEnd = (const char *) memchr(current, '\0', end - current);
+			if (OXT_UNLIKELY(valueEnd == NULL)) {
+				return false;
+			}
+			
+			output[key] = StaticString(current, valueEnd - current);
+			current = valueEnd + 1;
+		}
+		return true;
+	}
+	
+public:
+	/**
+	 * Create a new ScgiRequestParser, ready to parse a request.
+	 *
+	 * @param maxSize The maximum size that the SCGI data is allowed to
+	 *                be, or 0 if no limit is desired.
+	 */
+	ScgiRequestParser(size_t maxSize = 0) {
+		this->maxSize = maxSize;
+		reset();
+	}
+	
+	void reset() {
+		state = READING_LENGTH_STRING;
+		errorReason = NONE;
+		lengthStringBufferSize = 0;
+		headerSize = 0;
+		headerBuffer.clear();
+		headers.clear();
+		headerData = StaticString();
+	}
+
+	/**
+	 * Feed SCGI request data to the parser.
+	 *
+	 * @param data The data to feed.
+	 * @param size The size of the data, in bytes.
+	 * @return The number of recognized SCGI header bytes. If this value
+	 *         equals 'size', then it means all data in 'data' is part of
+	 *         the SCGI header. If this value is less than size, then it
+	 *         means only some data in 'data' is part of the SCGI header,
+	 *         and the remaining 'size - result' bytes are part of the
+	 *         request body.
+	 * @pre size > 0
+	 * @post result <= size
+	 * @post if result <= size: getState() == DONE || getState() == ERROR
+	 */
+	size_t feed(const char *data, size_t size) {
+		size_t consumed = 0;
+		
+		while (acceptingInput() && consumed < size) {
+			switch (state) {
+			case READING_LENGTH_STRING:
+				while (consumed < size
+				    && lengthStringBufferSize < sizeof(lengthStringBuffer) - 1
+				    && isDigit(data[consumed])) {
+					lengthStringBuffer[lengthStringBufferSize] = data[consumed];
+					lengthStringBufferSize++;
+					consumed++;
+				}
+				if (consumed < size) {
+					if (data[consumed] == ':') {
+						consumed++;
+						lengthStringBuffer[lengthStringBufferSize] = '\0';
+						headerSize = atol(lengthStringBuffer);
+						if (maxSize > 0 && headerSize > maxSize) {
+							state = ERROR;
+							errorReason = LIMIT_REACHED;
+						} else if (headerSize == 0) {
+							state = ERROR;
+							errorReason = EMPTY_HEADER;
+						} else {
+							state = READING_HEADER_DATA;
+						}
+					} else if (lengthStringBufferSize >= sizeof(lengthStringBuffer) - 1) {
+						state = ERROR;
+						errorReason = LENGTH_STRING_TOO_LARGE;
+					} else {
+						state = ERROR;
+						errorReason = INVALID_LENGTH_STRING;
+					}
+				}
+				break;
+				
+			case READING_HEADER_DATA: {
+				const char *localData = data + consumed;
+				size_t localSize = std::min(
+					headerSize - headerBuffer.size(),
+					size - consumed);
+				if (localSize == headerSize) {
+					headerData = StaticString(localData, localSize);
+					state = EXPECTING_COMMA;
+				} else {
+					if (headerBuffer.capacity() < headerSize) {
+						headerBuffer.reserve(headerSize);
+					}
+					headerBuffer.append(localData, localSize);
+					if (headerBuffer.size() == headerSize) {
+						state = EXPECTING_COMMA;
+						headerData = headerBuffer;
+					}
+				}
+				consumed += localSize;
+				break;
+			}
+			
+			case EXPECTING_COMMA:
+				if (data[consumed] == ',') {
+					if (parseHeaderData(headerData, headers)) {
+						state = DONE;
+					} else {
+						state = ERROR;
+						errorReason = INVALID_HEADER_DATA;
+					}
+					consumed++;
+				} else {
+					state = ERROR;
+					errorReason = HEADER_TERMINATOR_EXPECTED;
+				}
+				break;
+			
+			default:
+				abort(); // Never reached.
+			}
+		}
+		
+		if (state == EXPECTING_COMMA && headerBuffer.empty()) {
+			/* We got all the header data in a single round, except
+			 * for the closing comma. The static header data isn't
+			 * guaranteed to be around when we do get the comma so
+			 * copy it into the buffer.
+			 */
+			headerBuffer.assign(headerData.c_str(), headerData.size());
+			headerData = headerBuffer;
+		}
+		
+		return consumed;
+	}
+	
+	/**
+	 * Get the raw header data that has been processed so far.
+	 * Please read the zero-copy notes in the class description for
+	 * important information about the life time of the data this
+	 * StaticString points to.
+	 */
+	StaticString getHeaderData() const {
+		return headerData;
+	}
+
+	const_iterator getHeaderIterator(const StaticString &name) const {
+		return headers.find(name);
+	}
+	
+	/**
+	 * Get the value of the header with the given name.
+	 * Lookup is case-sensitive.
+	 * Please read the zero-copy notes in the class description for
+	 * important information about the life time of the data this
+	 * StaticString points to.
+	 *
+	 * Returns the empty string if there is no such header.
+	 *
+	 * @pre getState() == DONE
+	 */
+	StaticString getHeader(const StaticString &name) const {
+		HeaderMap::const_iterator it(headers.find(name));
+		if (it == headers.end()) {
+			return "";
+		} else {
+			return it->second;
+		}
+	}
+	
+	/**
+	 * Checks whether there is a header with the given name.
+	 * Lookup is case-sensitive.
+	 *
+	 * @pre getState() == DONE
+	 */
+	bool hasHeader(const StaticString &name) const {
+		return headers.find(name) != headers.end();
+	}
+
+	HeaderMap &getMap() {
+		return headers;
+	}
+	
+	unsigned int size() const {
+		return headers.size();
+	}
+
+	const_iterator begin() const {
+		return headers.begin();
+	}
+
+	const_iterator end() const {
+		return headers.end();
+	}
+	
+	/**
+	 * Get the parser's current state.
+	 */
+	State getState() const {
+		return state;
+	}
+	
+	/**
+	 * Returns the reason why the parser entered the error state.
+	 *
+	 * @pre getState() == ERROR
+	 */
+	ErrorReason getErrorReason() const {
+		return errorReason;
+	}
+	
+	/**
+	 * Checks whether this parser is still capable of accepting input (that
+	 * is, that this parser is not in a final/error state).
+	 */
+	bool acceptingInput() const {
+		return state != DONE && state != ERROR;
+	}
+
+	/**
+	 * If one has modified the headers in this ScgiRequestParser, then getHeaderData()
+	 * still returns the original header data that doesn't contain any modifications.
+	 * Call rebuildData(true) to synchronize that data with the new header map state.
+	 *
+	 * Calling rebuildData(false) will internalize the header data, if it wasn't
+	 * already so.
+	 */
+	void rebuildData(bool modified) {
+		if (modified) {
+			string *newHeaderBuffer;
+			const_iterator it, end = headers.end();
+
+			if (headerData.data() == headerBuffer.data()) {
+				// headerBuffer already used; allocate new temporary storage.
+				newHeaderBuffer = new string();
+			} else {
+				// headerBuffer unused; use it directly.
+				newHeaderBuffer = &headerBuffer;
+			}
+			newHeaderBuffer->reserve(headerSize);
+			for (it = headers.begin(); it != end; it++) {
+				newHeaderBuffer->append(it->first);
+				newHeaderBuffer->append(1, '\0');
+				newHeaderBuffer->append(it->second);
+				newHeaderBuffer->append(1, '\0');
+			}
+
+			if (headerData.data() == headerBuffer.data()) {
+				headerBuffer = *newHeaderBuffer;
+				delete newHeaderBuffer;
+			}
+			headerData = headerBuffer;
+			headers.clear();
+			parseHeaderData(headerData, headers);
+
+		} else if (headerData.data() != headerBuffer.data()) {
+			headerBuffer.assign(headerData.data(), headerData.size());
+			headerData = headerBuffer;
+			headers.clear();
+			parseHeaderData(headerData, headers);
+		}
+	}
+};
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_SCGI_REQUEST_PARSER_H_ */
diff --git a/ext/common/agents/LoggingAgent/AdminController.h b/ext/common/agents/LoggingAgent/AdminController.h
new file mode 100644
index 0000000..6205e5f
--- /dev/null
+++ b/ext/common/agents/LoggingAgent/AdminController.h
@@ -0,0 +1,96 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_ADMIN_CONTROLLER_H_
+#define _PASSENGER_ADMIN_CONTROLLER_H_
+
+
+#include <agents/LoggingAgent/LoggingServer.h>
+#include <MessageServer.h>
+#include <sstream>
+
+namespace Passenger {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+
+class AdminController: public MessageServer::Handler {
+private:
+	struct SpecificContext: public MessageServer::ClientContext {
+	};
+	
+	typedef MessageServer::CommonClientContext CommonClientContext;
+	
+	LoggingServerPtr server;
+	
+	
+	/*********************************************
+	 * Message handler methods
+	 *********************************************/
+	
+	void processStatus(CommonClientContext &commonContext, SpecificContext *specificContext,
+		const vector<string> &args)
+	{
+		TRACE_POINT();
+		commonContext.passSecurity();
+		stringstream stream;
+		server->dump(stream);
+		writeScalarMessage(commonContext.fd, stream.str());
+	}
+	
+public:
+	AdminController(const LoggingServerPtr &server) {
+		this->server = server;
+	}
+	
+	virtual MessageServer::ClientContextPtr newClient(CommonClientContext &commonContext) {
+		return make_shared<SpecificContext>();
+	}
+	
+	virtual bool processMessage(CommonClientContext &commonContext,
+	                            MessageServer::ClientContextPtr &_specificContext,
+	                            const vector<string> &args)
+	{
+		SpecificContext *specificContext = (SpecificContext *) _specificContext.get();
+		try {
+			if (isCommand(args, "status", 0)) {
+				processStatus(commonContext, specificContext, args);
+			} else {
+				return false;
+			}
+		} catch (const SecurityException &) {
+			/* Client does not have enough rights to perform a certain action.
+			 * It has already been notified of this; ignore exception and move on.
+			 */
+		}
+		return true;
+	}
+};
+
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_ADMIN_CONTROLLER_H_ */
diff --git a/ext/common/agents/LoggingAgent/DataStoreId.h b/ext/common/agents/LoggingAgent/DataStoreId.h
new file mode 100644
index 0000000..dca6893
--- /dev/null
+++ b/ext/common/agents/LoggingAgent/DataStoreId.h
@@ -0,0 +1,177 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_DATA_STORE_ID_H_
+#define _PASSENGER_DATA_STORE_ID_H_
+
+#include <cstring>
+#include <climits>
+#include <cassert>
+#include <StaticString.h>
+
+namespace Passenger {
+
+
+/**
+ * Efficient representation for a (groupName, nodeName, category) tuple.
+ */
+class DataStoreId {
+private:
+	char *id;
+	unsigned short groupNameSize;
+	unsigned short nodeNameSize;
+	unsigned short categorySize;
+	
+	size_t totalSize() const {
+		return groupNameSize + nodeNameSize + categorySize + 3;
+	}
+	
+	StaticString toStaticString() const {
+		if (id == NULL) {
+			return StaticString();
+		} else {
+			return StaticString(id, totalSize());
+		}
+	}
+	
+public:
+	DataStoreId(const StaticString &groupName, const StaticString &nodeName,
+		const StaticString &category)
+	{
+		assert(groupName.size() <= USHRT_MAX);
+		assert(nodeName.size() <= USHRT_MAX);
+		assert(category.size() <= USHRT_MAX);
+		
+		char *end;
+		
+		id = new char[groupName.size() + nodeName.size() +
+			category.size() + 3];
+		end = id;
+		
+		memcpy(end, groupName.c_str(), groupName.size());
+		groupNameSize = groupName.size();
+		end += groupName.size();
+		*end = '\0';
+		end++;
+		
+		memcpy(end, nodeName.c_str(), nodeName.size());
+		nodeNameSize = nodeName.size();
+		end += nodeName.size();
+		*end = '\0';
+		end++;
+		
+		memcpy(end, category.c_str(), category.size());
+		categorySize = category.size();
+		end += category.size();
+		*end = '\0';
+	}
+	
+	DataStoreId() {
+		id = NULL;
+	}
+	
+	DataStoreId(const DataStoreId &other) {
+		if (other.id == NULL) {
+			id = NULL;
+		} else {
+			id = new char[other.totalSize()];
+			memcpy(id, other.id, other.totalSize());
+			groupNameSize = other.groupNameSize;
+			nodeNameSize = other.nodeNameSize;
+			categorySize = other.categorySize;
+		}
+	}
+	
+	~DataStoreId() {
+		delete id;
+	}
+	
+	DataStoreId &operator=(const DataStoreId &other) {
+		if (other.id == NULL) {
+			delete id;
+			id = NULL;
+			return *this;
+		} else {
+			if (totalSize() != other.totalSize()) {
+				delete id;
+				id = NULL;
+			}
+			if (id == NULL) {
+				id = new char[other.totalSize()];
+			}
+			memcpy(id, other.id, other.totalSize());
+			groupNameSize = other.groupNameSize;
+			nodeNameSize = other.nodeNameSize;
+			categorySize = other.categorySize;
+			return *this;
+		}
+	}
+	
+	bool operator<(const DataStoreId &other) const {
+		return toStaticString() < other.toStaticString();
+	}
+	
+	bool operator==(const DataStoreId &other) const {
+		if (id == NULL) {
+			return other.id == NULL;
+		} else {
+			if (other.id == NULL) {
+				return false;
+			} else {
+				return toStaticString() == other.toStaticString();
+			}
+		}
+	}
+	
+	StaticString getGroupName() const {
+		if (id != NULL) {
+			return StaticString(id, groupNameSize);
+		} else {
+			return StaticString();
+		}
+	}
+	
+	StaticString getNodeName() const {
+		if (id != NULL) {
+			return StaticString(id + groupNameSize + 1,
+				nodeNameSize);
+		} else {
+			return StaticString();
+		}
+	}
+	
+	StaticString getCategory() const {
+		if (id != NULL) {
+			return StaticString(id + groupNameSize + 1 + nodeNameSize + 1,
+				categorySize);
+		} else {
+			return StaticString();
+		}
+	}
+};
+
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_DATA_STORE_ID_H_ */
diff --git a/ext/common/agents/LoggingAgent/FilterSupport.cpp b/ext/common/agents/LoggingAgent/FilterSupport.cpp
new file mode 100644
index 0000000..724e82b
--- /dev/null
+++ b/ext/common/agents/LoggingAgent/FilterSupport.cpp
@@ -0,0 +1,66 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#include "FilterSupport.h"
+#include <cstring>
+#include <cstdlib>
+
+using namespace Passenger;
+
+extern "C" {
+
+PassengerFilter *
+passenger_filter_create(const char *source, int size, char **error) {
+	if (size == -1) {
+		size = strlen(source);
+	}
+	try {
+		return (PassengerFilter *) new FilterSupport::Filter(StaticString(source, size));
+	} catch (const SyntaxError &e) {
+		if (error != NULL) {
+			*error = strdup(e.what());
+		}
+		return NULL;
+	}
+}
+
+void
+passenger_filter_free(PassengerFilter *filter) {
+	delete (FilterSupport::Filter *) filter;
+}
+
+char *
+passenger_filter_validate(const char *source, int size) {
+	if (size == -1) {
+		size = strlen(source);
+	}
+	try {
+		(void) FilterSupport::Filter(StaticString(source, size));
+		return NULL;
+	} catch (const SyntaxError &e) {
+		return strdup(e.what());
+	}
+}
+
+} // extern "C"
diff --git a/ext/common/agents/LoggingAgent/FilterSupport.h b/ext/common/agents/LoggingAgent/FilterSupport.h
new file mode 100644
index 0000000..ef780b7
--- /dev/null
+++ b/ext/common/agents/LoggingAgent/FilterSupport.h
@@ -0,0 +1,1611 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2011 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_FILTER_SUPPORT_H_
+#define _PASSENGER_FILTER_SUPPORT_H_
+
+#ifdef __cplusplus
+
+#include <boost/shared_ptr.hpp>
+#include <boost/make_shared.hpp>
+#include <oxt/tracable_exception.hpp>
+
+#include <string>
+#include <set>
+#ifndef _PCREPOSIX_H
+	#include <regex.h>
+#endif
+#include <cstdio>
+#include <cstring>
+
+#include <StaticString.h>
+#include <Exceptions.h>
+#include <Utils/StrIntUtils.h>
+
+namespace Passenger {
+namespace FilterSupport {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+
+class Tokenizer {
+public:
+	enum TokenType {
+		NONE,
+		NOT,
+		AND,
+		OR,
+		MATCHES,
+		NOT_MATCHES,
+		EQUALS,
+		NOT_EQUALS,
+		GREATER_THAN,
+		GREATER_THAN_OR_EQUALS,
+		LESS_THAN,
+		LESS_THAN_OR_EQUALS,
+		LPARENTHESIS,
+		RPARENTHESIS,
+		COMMA,
+		REGEXP,
+		STRING,
+		INTEGER,
+		TRUE_LIT,
+		FALSE_LIT,
+		IDENTIFIER,
+		END_OF_DATA
+	};
+	
+	enum TokenOptions {
+		NO_OPTIONS = 0,
+		REGEXP_OPTION_CASE_INSENSITIVE = 1
+	};
+	
+	struct Token {
+		TokenType type;
+		int options;
+		unsigned int pos;
+		unsigned int size;
+		StaticString rawValue;
+		
+		Token() {
+			type = NONE;
+		}
+		
+		Token(TokenType _type, unsigned int _pos, unsigned int _size, const StaticString &_rawValue)
+			: type(_type),
+			  options(NO_OPTIONS),
+			  pos(_pos),
+			  size(_size),
+			  rawValue(_rawValue)
+			{ }
+		
+		string toString() const {
+			return Tokenizer::typeToString(type);
+		}
+	};
+
+private:
+	StaticString data;
+	bool debug;
+	unsigned int pos;
+	
+	static bool isWhitespace(char ch) {
+		return ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n';
+	}
+	
+	void skipWhitespaces() {
+		while (pos < data.size() && isWhitespace(data[pos])) {
+			pos++;
+		}
+	}
+	
+	unsigned int available() const {
+		return data.size() - pos;
+	}
+	
+	char current() const {
+		return data[pos];
+	}
+	
+	char next() const {
+		return data[pos + 1];
+	}
+	
+	static bool isIdentifierChar(char ch) {
+		return (ch >= 'a' && ch <= 'z')
+			|| (ch >= 'A' && ch <= 'Z')
+			|| (ch >= '0' && ch <= '9')
+			|| ch == '_';
+	}
+	
+	static bool isDigit(char ch) {
+		return ch >= '0' && ch <= '9';
+	}
+	
+	Token logToken(const Token &token) const {
+		if (debug) {
+			printf("# Token: %s\n", token.toString().c_str());
+		}
+		return token;
+	}
+	
+	void raiseSyntaxError(const string &message = "") {
+		string msg = "Syntax error at character " + toString(pos + 1);
+		if (!message.empty()) {
+			msg.append(": ");
+			msg.append(message);
+		}
+		throw SyntaxError(msg);
+	}
+	
+	void expectingAtLeast(unsigned int size) {
+		if (available() < size) {
+			raiseSyntaxError("at least " + toString(size) +
+				" more characters expected");
+		}
+	}
+	
+	void expectingNextChar(char ch) {
+		expectingAtLeast(2);
+		if (next() != ch) {
+			raiseSyntaxError("expected '" + toString(ch) +
+				"', but found '" + toString(next()) +
+				"'");
+		}
+	}
+	
+	Token matchToken(TokenType type, unsigned int size = 0) {
+		unsigned int oldPos = pos;
+		pos += size;
+		return Token(type, oldPos, size, data.substr(oldPos, size));
+	}
+	
+	Token matchTokensStartingWithNegation() {
+		expectingAtLeast(2);
+		switch (next()) {
+		case '~':
+			return matchToken(NOT_MATCHES, 2);
+		case '=':
+			return matchToken(NOT_EQUALS, 2);
+		default:
+			raiseSyntaxError("unrecognized operator '" + data.substr(pos, 2) + "'");
+			return Token(); // Shut up compiler warning.
+		};
+	}
+	
+	Token matchAnd() {
+		expectingNextChar('&');
+		return matchToken(AND, 2);
+	}
+	
+	Token matchOr() {
+		expectingNextChar('|');
+		return matchToken(OR, 2);
+	}
+	
+	Token matchTokensStartingWithEquals() {
+		expectingAtLeast(2);
+		switch (next()) {
+		case '~':
+			return matchToken(MATCHES, 2);
+		case '=':
+			return matchToken(EQUALS, 2);
+		default:
+			raiseSyntaxError("unrecognized operator '" + data.substr(pos, 2) + "'");
+			return Token(); // Shut up compiler warning.
+		}
+	}
+	
+	Token matchTokensStartingWithGreaterThan() {
+		if (available() == 0 || next() != '=') {
+			return matchToken(GREATER_THAN, 1);
+		} else {
+			return matchToken(GREATER_THAN_OR_EQUALS, 2);
+		}
+	}
+	
+	Token matchTokensStartingWithLessThan() {
+		if (available() == 0 || next() != '=') {
+			return matchToken(LESS_THAN, 1);
+		} else {
+			return matchToken(LESS_THAN_OR_EQUALS, 2);
+		}
+	}
+	
+	Token matchRegexp(char terminator) {
+		unsigned int start = pos;
+		bool endFound = false;
+		
+		// Match initial quote slash.
+		pos++;
+		
+		// Match rest of regexp including terminating slash.
+		while (pos < data.size() && !endFound) {
+			char ch = current();
+			if (ch == '\\') {
+				pos++;
+				if (pos >= data.size()) {
+					raiseSyntaxError("unterminated regular expression");
+				} else {
+					pos++;
+				}
+			} else if (ch == terminator) {
+				pos++;
+				endFound = true;
+			} else {
+				pos++;
+			}
+		}
+		
+		if (endFound) {
+			Token t(REGEXP, start, pos - start, data.substr(start, pos - start));
+			
+			// Match regexp options.
+			endFound = false;
+			while (pos < data.size() && !endFound) {
+				char ch = current();
+				if (ch == 'i') {
+					t.options |= Tokenizer::REGEXP_OPTION_CASE_INSENSITIVE;
+				} else if (isWhitespace(ch)) {
+					endFound = true;
+				}
+				pos++;
+			}
+			
+			return t;
+		} else {
+			raiseSyntaxError("unterminated regular expression");
+			return Token(); // Shut up compiler warning.
+		}
+	}
+	
+	Token matchString(char terminator) {
+		unsigned int start = pos;
+		bool endFound = false;
+		
+		// Match initial quote character.
+		pos++;
+		
+		// Match rest of string including terminating quote.
+		while (pos < data.size() && !endFound) {
+			char ch = current();
+			if (ch == '\\') {
+				pos++;
+				if (pos >= data.size()) {
+					raiseSyntaxError("unterminated string");
+				} else {
+					pos++;
+				}
+			} else if (ch == terminator) {
+				pos++;
+				endFound = true;
+			} else {
+				pos++;
+			}
+		}
+		
+		if (endFound) {
+			return Token(STRING, start, pos - start, data.substr(start, pos - start));
+		} else {
+			raiseSyntaxError("unterminated string");
+			return Token(); // Shut up compiler warning.
+		}
+	}
+	
+	Token matchInteger() {
+		unsigned int start = pos;
+		
+		// Accept initial minus or digit.
+		pos++;
+		
+		while (pos < data.size() && isDigit(data[pos])) {
+			pos++;
+		}
+		
+		return Token(INTEGER, start, pos - start, data.substr(start, pos - start));
+	}
+	
+	Token matchIdentifier() {
+		char ch = current();
+		if ((ch >= 'a' && ch <= 'z') ||
+		    (ch >= 'A' && ch <= 'Z') ||
+		    ch == '_') {
+			unsigned int start = pos;
+			pos++;
+			while (pos < data.size() && isIdentifierChar(current())) {
+				pos++;
+			}
+			
+			StaticString val = data.substr(start, pos - start);
+			if (val == "true") {
+				return Token(TRUE_LIT, start, pos - start, val);
+			} else if (val == "false") {
+				return Token(FALSE_LIT, start, pos - start, val);
+			} else {
+				return Token(IDENTIFIER, start, pos - start, val);
+			}
+		} else {
+			raiseSyntaxError("Identifier expected, but got an unknown token");
+			return Token(); // Shut up compiler warning.
+		}
+	}
+
+public:
+	Tokenizer(const StaticString &data, bool debug = false) {
+		this->data = data;
+		this->debug = debug;
+		pos = 0;
+	}
+	
+	Token getNext() {
+		skipWhitespaces();
+		if (pos >= data.size()) {
+			return logToken(Token(END_OF_DATA, data.size(), 0, ""));
+		}
+		
+		switch (current()) {
+		case '!':
+			return logToken(matchTokensStartingWithNegation());
+		case '&':
+			return logToken(matchAnd());
+		case '|':
+			return logToken(matchOr());
+		case '=':
+			return logToken(matchTokensStartingWithEquals());
+		case '>':
+			return logToken(matchTokensStartingWithGreaterThan());
+		case '<':
+			return logToken(matchTokensStartingWithLessThan());
+		case '(':
+			return logToken(matchToken(LPARENTHESIS, 1));
+		case ')':
+			return logToken(matchToken(RPARENTHESIS, 1));
+		case ',':
+			return logToken(matchToken(COMMA, 1));
+		case '/':
+			return logToken(matchRegexp('/'));
+		case '%':
+			expectingAtLeast(3);
+			if (memcmp(data.data() + pos, "%r{", 3) != 0) {
+				raiseSyntaxError("expected '%r{', but found '" +
+					data.substr(pos, 3) + "'");
+			}
+			pos += 2;
+			return logToken(matchRegexp('}'));
+		case '"':
+			return logToken(matchString('"'));
+		case '\'':
+			return logToken(matchString('\''));
+		case '-':
+			return logToken(matchInteger());
+		default:
+			if (isDigit(current())) {
+				return logToken(matchInteger());
+			} else {
+				return logToken(matchIdentifier());
+			}
+		}
+	}
+	
+	static string typeToString(TokenType type) {
+		switch (type) {
+		case NONE:
+			return "NONE";
+		case NOT:
+			return "NOT";
+		case AND:
+			return "AND";
+		case OR:
+			return "OR";
+		case MATCHES:
+			return "MATCHES";
+		case NOT_MATCHES:
+			return "NOT_MATCHES";
+		case EQUALS:
+			return "EQUALS";
+		case NOT_EQUALS:
+			return "NOT_EQUALS";
+		case GREATER_THAN:
+			return "GREATER_THAN";
+		case GREATER_THAN_OR_EQUALS:
+			return "GREATER_THAN_OR_EQUALS";
+		case LESS_THAN:
+			return "LESS_THAN";
+		case LESS_THAN_OR_EQUALS:
+			return "LESS_THAN_OR_EQUALS";
+		case LPARENTHESIS:
+			return "LPARENTHESIS";
+		case RPARENTHESIS:
+			return "RPARENTHESIS";
+		case COMMA:
+			return "COMMA";
+		case REGEXP:
+			return "REGEXP";
+		case STRING:
+			return "STRING";
+		case INTEGER:
+			return "INTEGER";
+		case TRUE_LIT:
+			return "TRUE";
+		case FALSE_LIT:
+			return "FALSE";
+		case IDENTIFIER:
+			return "IDENTIFIER";
+		case END_OF_DATA:
+			return "END_OF_DATA";
+		default:
+			return "(unknown)";
+		}
+	}
+};
+
+
+enum ValueType {
+	REGEXP_TYPE,
+	STRING_TYPE,
+	INTEGER_TYPE,
+	BOOLEAN_TYPE,
+	UNKNOWN_TYPE
+};
+
+
+class Context {
+public:
+	enum FieldIdentifier {
+		URI,
+		CONTROLLER,
+		RESPONSE_TIME,
+		RESPONSE_TIME_WITHOUT_GC,
+		STATUS,
+		STATUS_CODE,
+		GC_TIME
+	};
+	
+	virtual ~Context() { }
+	
+	virtual string getURI() const = 0;
+	virtual string getController() const = 0;
+	virtual int getResponseTime() const = 0;
+	virtual string getStatus() const = 0;
+	virtual int getStatusCode() const = 0;
+	virtual int getGcTime() const = 0;
+	virtual bool hasHint(const string &name) const = 0;
+	
+	int getResponseTimeWithoutGc() const {
+		return getResponseTime() - getGcTime();
+	}
+	
+	string queryStringField(FieldIdentifier id) const {
+		switch (id) {
+		case URI:
+			return getURI();
+		case CONTROLLER:
+			return getController();
+		case RESPONSE_TIME:
+			return toString(getResponseTime());
+		case RESPONSE_TIME_WITHOUT_GC:
+			return toString(getResponseTimeWithoutGc());
+		case STATUS:
+			return getStatus();
+		case STATUS_CODE:
+			return toString(getStatusCode());
+		case GC_TIME:
+			return toString(getGcTime());
+		default:
+			return "";
+		}
+	}
+	
+	int queryIntField(FieldIdentifier id) const {
+		switch (id) {
+		case RESPONSE_TIME:
+			return getResponseTime();
+		case RESPONSE_TIME_WITHOUT_GC:
+			return getResponseTimeWithoutGc();
+		case STATUS_CODE:
+			return getStatusCode();
+		case GC_TIME:
+			return getGcTime();
+		default:
+			return 0;
+		}
+	}
+	
+	bool queryBoolField(FieldIdentifier id) const {
+		switch (id) {
+		case URI:
+			return !getURI().empty();
+		case CONTROLLER:
+			return !getController().empty();
+		case RESPONSE_TIME:
+			return getResponseTime() > 0;
+		case RESPONSE_TIME_WITHOUT_GC:
+			return getResponseTimeWithoutGc() > 0;
+		case STATUS:
+			return !getStatus().empty();
+		case STATUS_CODE:
+			return getStatusCode() > 0;
+		case GC_TIME:
+			return getGcTime() > 0;
+		default:
+			return false;
+		}
+	}
+	
+	static ValueType getFieldType(FieldIdentifier id) {
+		switch (id) {
+		case URI:
+		case CONTROLLER:
+		case STATUS:
+			return STRING_TYPE;
+		case RESPONSE_TIME:
+		case RESPONSE_TIME_WITHOUT_GC:
+		case STATUS_CODE:
+		case GC_TIME:
+			return INTEGER_TYPE;
+		default:
+			return UNKNOWN_TYPE;
+		}
+	}
+};
+
+class SimpleContext: public Context {
+public:
+	string uri;
+	string controller;
+	string status;
+	int responseTime;
+	int statusCode;
+	int gcTime;
+	set<string> hints;
+	
+	SimpleContext() {
+		responseTime = 0;
+		statusCode = 0;
+		gcTime = 0;
+	}
+	
+	virtual string getURI() const {
+		return uri;
+	}
+	
+	virtual string getController() const {
+		return controller;
+	}
+	
+	virtual int getResponseTime() const {
+		return responseTime;
+	}
+	
+	virtual string getStatus() const {
+		return status;
+	}
+	
+	virtual int getStatusCode() const {
+		return statusCode;
+	}
+	
+	virtual int getGcTime() const {
+		return gcTime;
+	}
+	
+	virtual bool hasHint(const string &name) const {
+		return hints.find(name) != hints.end();
+	}
+};
+
+class ContextFromLog: public Context {
+private:
+	StaticString logData;
+	mutable SimpleContext *parsedData;
+	
+	struct ParseState {
+		unsigned long long requestProcessingStart;
+		unsigned long long requestProcessingEnd;
+		unsigned long long smallestTimestamp;
+		unsigned long long largestTimestamp;
+		unsigned long long gcTimeStart;
+		unsigned long long gcTimeEnd;
+	};
+	
+	static void parseLine(const StaticString &txnId, unsigned long long timestamp,
+		const StaticString &data, SimpleContext &ctx, ParseState &state)
+	{
+		if (startsWith(data, "BEGIN: request processing")) {
+			state.requestProcessingStart = extractEventTimestamp(data);
+		} else if (startsWith(data, "END: request processing")
+		        || startsWith(data, "FAIL: request processing")) {
+			state.requestProcessingEnd = extractEventTimestamp(data);
+		} else if (startsWith(data, "URI: ")) {
+			ctx.uri = data.substr(data.find(':') + 2);
+		} else if (startsWith(data, "Controller action: ")) {
+			StaticString value = data.substr(data.find(':') + 2);
+			size_t pos = value.find('#');
+			if (pos != string::npos) {
+				ctx.controller = value.substr(0, pos);
+			}
+		} else if (startsWith(data, "Status: ")) {
+			StaticString value = data.substr(data.find(':') + 2);
+			ctx.status = value;
+			ctx.statusCode = stringToInt(value);
+		} else if (startsWith(data, "Initial GC time: ")) {
+			StaticString value = data.substr(data.find(':') + 2);
+			state.gcTimeStart = stringToULL(value);
+		} else if (startsWith(data, "Final GC time: ")) {
+			StaticString value = data.substr(data.find(':') + 2);
+			state.gcTimeEnd = stringToULL(value);
+		}
+		
+		if (state.smallestTimestamp == 0 || timestamp < state.smallestTimestamp) {
+			state.smallestTimestamp = timestamp;
+		}
+		if (timestamp > state.largestTimestamp) {
+			state.largestTimestamp = timestamp;
+		}
+	}
+	
+	static void reallyParse(const StaticString &data, SimpleContext &ctx) {
+		const char *current = data.data();
+		const char *end     = data.data() + data.size();
+		
+		ParseState state;
+		memset(&state, 0, sizeof(state));
+		
+		while (current < end) {
+			current = skipNewlines(current, end);
+			if (current < end) {
+				const char *endOfLine = findEndOfLine(current, end);
+				StaticString line(current, endOfLine - current);
+				if (!line.empty()) {
+					StaticString txnId;
+					unsigned long long timestamp;
+					unsigned int writeCount;
+					StaticString lineData;
+					
+					// If we want to do more complicated analysis we should sort
+					// the lines but for the purposes of ContextFromLog
+					// analyzing the data without sorting is good enough.
+					if (splitLine(line, txnId, timestamp, writeCount, lineData)) {
+						parseLine(txnId, timestamp, lineData, ctx,
+						state);
+					}
+				}
+				current = endOfLine;
+			}
+		}
+		
+		if (state.requestProcessingEnd != 0) {
+			ctx.responseTime = int(state.requestProcessingEnd -
+				state.requestProcessingStart);
+		} else if (state.smallestTimestamp != 0) {
+			ctx.responseTime = state.largestTimestamp - state.smallestTimestamp;
+		}
+		
+		if (state.gcTimeEnd != 0) {
+			ctx.gcTime = state.gcTimeEnd - state.gcTimeStart;
+		}
+	}
+	
+	static bool splitLine(const StaticString &line, StaticString &txnId,
+		unsigned long long &timestamp, unsigned int &writeCount,
+		StaticString &data)
+	{
+		size_t firstDelim = line.find(' ');
+		if (firstDelim == string::npos) {
+			return false;
+		}
+		
+		size_t secondDelim = line.find(' ', firstDelim + 1);
+		if (secondDelim == string::npos) {
+			return false;
+		}
+		
+		size_t thirdDelim = line.find(' ', secondDelim + 1);
+		if (thirdDelim == string::npos) {
+			return false;
+		}
+		
+		txnId = line.substr(0, firstDelim);
+		timestamp = hexatriToULL(line.substr(firstDelim + 1, secondDelim - firstDelim - 1));
+		writeCount = (unsigned int) hexatriToULL(line.substr(secondDelim + 1,
+			thirdDelim - secondDelim - 1));
+		data = line.substr(thirdDelim + 1);
+		return true;
+	}
+	
+	static unsigned long long extractEventTimestamp(const StaticString &data) {
+		size_t pos = data.find('(');
+		if (pos == string::npos) {
+			return 0;
+		} else {
+			pos++;
+			size_t start = pos;
+			while (pos < data.size() && isDigit(data[pos])) {
+				pos++;
+			}
+			if (pos >= data.size()) {
+				return 0;
+			} else {
+				return hexatriToULL(data.substr(start, pos - start));
+			}
+		}
+	}
+	
+	static bool isNewline(char ch) {
+		return ch == '\n' || ch == '\r';
+	}
+	
+	static bool isDigit(char ch) {
+		return ch >= '0' && ch <= '9';
+	}
+	
+	static const char *skipNewlines(const char *current, const char *end) {
+		while (current < end && isNewline(*current)) {
+			current++;
+		}
+		return current;
+	}
+	
+	static const char *findEndOfLine(const char *current, const char *end) {
+		while (current < end && !isNewline(*current)) {
+			current++;
+		}
+		return current;
+	}
+	
+	SimpleContext *parse() const {
+		if (parsedData == NULL) {
+			auto_ptr<SimpleContext> ctx(new SimpleContext());
+			reallyParse(logData, *ctx.get());
+			parsedData = ctx.release();
+		}
+		return parsedData;
+	}
+	
+public:
+	ContextFromLog(const StaticString &logData) {
+		this->logData = logData;
+		parsedData = NULL;
+	}
+	
+	~ContextFromLog() {
+		delete parsedData;
+	}
+	
+	virtual string getURI() const {
+		return parse()->uri;
+	}
+	
+	virtual string getController() const {
+		return parse()->getController();
+	}
+	
+	virtual int getResponseTime() const {
+		return parse()->getResponseTime();
+	}
+	
+	virtual string getStatus() const {
+		return parse()->getStatus();
+	}
+	
+	virtual int getStatusCode() const {
+		return parse()->getStatusCode();
+	}
+	
+	virtual int getGcTime() const {
+		return parse()->getGcTime();
+	}
+	
+	virtual bool hasHint(const string &name) const {
+		return parse()->hasHint(name);
+	}
+};
+
+
+class Filter {
+private:
+	typedef Tokenizer::Token Token;
+	typedef Tokenizer::TokenType TokenType;
+	
+	struct BooleanComponent;
+	struct MultiExpression;
+	struct Comparison;
+	struct FunctionCall;
+	typedef shared_ptr<BooleanComponent> BooleanComponentPtr;
+	typedef shared_ptr<MultiExpression> MultiExpressionPtr;
+	typedef shared_ptr<Comparison> ComparisonPtr;
+	typedef shared_ptr<FunctionCall> FunctionCallPtr;
+	
+	struct BooleanComponent {
+		virtual ~BooleanComponent() { }
+		virtual bool evaluate(const Context &ctx) = 0;
+	};
+	
+	enum LogicalOperator {
+		AND,
+		OR
+	};
+	
+	enum Comparator {
+		MATCHES,
+		NOT_MATCHES,
+		EQUALS,
+		NOT_EQUALS,
+		GREATER_THAN,
+		GREATER_THAN_OR_EQUALS,
+		LESS_THAN,
+		LESS_THAN_OR_EQUALS,
+		UNKNOWN_COMPARATOR
+	};
+	
+	struct MultiExpression: public BooleanComponent {
+		struct Part {
+			LogicalOperator theOperator;
+			BooleanComponentPtr expression;
+		};
+		
+		BooleanComponentPtr firstExpression;
+		vector<Part> rest;
+		
+		virtual bool evaluate(const Context &ctx) {
+			bool result = firstExpression->evaluate(ctx);
+			unsigned int i = 0;
+			bool done = i == rest.size();
+			
+			while (!done) {
+				Part &nextPart = rest[i];
+				if (nextPart.theOperator == AND) {
+					result = result && nextPart.expression->evaluate(ctx);
+					done = !result;
+				} else {
+					result = result || nextPart.expression->evaluate(ctx);
+				}
+				i++;
+				done = done || i == rest.size();
+			}
+			
+			return result;
+		}
+	};
+	
+	struct Negation: public BooleanComponent {
+		BooleanComponentPtr expr;
+		
+		Negation(const BooleanComponentPtr &e)
+			: expr(e)
+			{ }
+		
+		virtual bool evaluate(const Context &ctx) {
+			return !expr->evaluate(ctx);
+		}
+	};
+	
+	struct Value {
+		enum Source {
+			REGEXP_LITERAL,
+			STRING_LITERAL,
+			INTEGER_LITERAL,
+			BOOLEAN_LITERAL,
+			CONTEXT_FIELD_IDENTIFIER
+		};
+		
+		Source source;
+		union {
+			struct {
+				char stringStorage[sizeof(string)];
+				struct {
+					regex_t regexp;
+					int options;
+				} regexp;
+			} stringOrRegexpValue;
+			int intValue;
+			bool boolValue;
+			Context::FieldIdentifier contextFieldIdentifier;
+		} u;
+		
+		Value() {
+			source = INTEGER_LITERAL;
+			u.intValue = 0;
+		}
+		
+		Value(const Value &other) {
+			initializeFrom(other);
+		}
+		
+		Value(bool regexp, const StaticString &value, bool caseInsensitive = false) {
+			if (regexp) {
+				source = REGEXP_LITERAL;
+			} else {
+				source = STRING_LITERAL;
+			}
+			new (u.stringOrRegexpValue.stringStorage) string(value.data(), value.size());
+			if (regexp) {
+				int options = REG_EXTENDED;
+				u.stringOrRegexpValue.regexp.options = 0;
+				if (caseInsensitive) {
+					options |= REG_ICASE;
+					u.stringOrRegexpValue.regexp.options |=
+						Tokenizer::REGEXP_OPTION_CASE_INSENSITIVE;
+				}
+				regcomp(&u.stringOrRegexpValue.regexp.regexp,
+					value.toString().c_str(),
+					options);
+			}
+		}
+		
+		Value(int val) {
+			source = INTEGER_LITERAL;
+			u.intValue = val;
+		}
+		
+		Value(bool val) {
+			source = BOOLEAN_LITERAL;
+			u.boolValue = val;
+		}
+		
+		Value(Context::FieldIdentifier identifier) {
+			source = CONTEXT_FIELD_IDENTIFIER;
+			u.contextFieldIdentifier = identifier;
+		}
+		
+		~Value() {
+			freeStorage();
+		}
+		
+		Value &operator=(const Value &other) {
+			freeStorage();
+			initializeFrom(other);
+			return *this;
+		}
+		
+		regex_t *getRegexpValue(const Context &ctx) const {
+			if (source == REGEXP_LITERAL) {
+				return &storedRegexp();
+			} else {
+				return NULL;
+			}
+		}
+		
+		string getStringValue(const Context &ctx) const {
+			switch (source) {
+			case REGEXP_LITERAL:
+			case STRING_LITERAL:
+				return storedString();
+			case INTEGER_LITERAL:
+				return toString(u.intValue);
+			case BOOLEAN_LITERAL:
+				if (u.boolValue) {
+					return "true";
+				} else {
+					return "false";
+				}
+			case CONTEXT_FIELD_IDENTIFIER:
+				return ctx.queryStringField(u.contextFieldIdentifier);
+			default:
+				return "";
+			}
+		}
+		
+		int getIntegerValue(const Context &ctx) const {
+			switch (source) {
+			case REGEXP_LITERAL:
+				return 0;
+			case STRING_LITERAL:
+				return atoi(storedString());
+			case INTEGER_LITERAL:
+				return u.intValue;
+			case BOOLEAN_LITERAL:
+				return (int) u.boolValue;
+			case CONTEXT_FIELD_IDENTIFIER:
+				return ctx.queryIntField(u.contextFieldIdentifier);
+			default:
+				return 0;
+			}
+		}
+		
+		bool getBooleanValue(const Context &ctx) const {
+			switch (source) {
+			case REGEXP_LITERAL:
+				return true;
+			case STRING_LITERAL:
+				return !storedString().empty();
+			case INTEGER_LITERAL:
+				return (bool) u.intValue;
+			case BOOLEAN_LITERAL:
+				return u.boolValue;
+			case CONTEXT_FIELD_IDENTIFIER:
+				return ctx.queryBoolField(u.contextFieldIdentifier);
+			default:
+				return 0;
+			}
+		}
+		
+		ValueType getType() const {
+			switch (source) {
+			case REGEXP_LITERAL:
+				return REGEXP_TYPE;
+			case STRING_LITERAL:
+				return STRING_TYPE;
+			case INTEGER_LITERAL:
+				return INTEGER_TYPE;
+			case BOOLEAN_LITERAL:
+				return BOOLEAN_TYPE;
+			case CONTEXT_FIELD_IDENTIFIER:
+				return Context::getFieldType(u.contextFieldIdentifier);
+			default:
+				return UNKNOWN_TYPE;
+			}
+		}
+	
+	private:
+		const string &storedString() const {
+			return *((string *) u.stringOrRegexpValue.stringStorage);
+		}
+		
+		regex_t &storedRegexp() const {
+			return (regex_t &) u.stringOrRegexpValue.regexp.regexp;
+		}
+		
+		void freeStorage() {
+			if (source == REGEXP_LITERAL || source == STRING_LITERAL) {
+				storedString().~string();
+				if (source == REGEXP_LITERAL) {
+					regfree(&storedRegexp());
+				}
+			}
+		}
+		
+		void initializeFrom(const Value &other) {
+			int options;
+			source = other.source;
+			switch (source) {
+			case REGEXP_LITERAL:
+				new (u.stringOrRegexpValue.stringStorage) string(other.storedString());
+				options = REG_EXTENDED;
+				if (other.u.stringOrRegexpValue.regexp.options & Tokenizer::REGEXP_OPTION_CASE_INSENSITIVE) {
+					options |= REG_ICASE;
+				}
+				regcomp(&u.stringOrRegexpValue.regexp.regexp,
+					storedString().c_str(),
+					options);
+				u.stringOrRegexpValue.regexp.options = other.u.stringOrRegexpValue.regexp.options;
+				break;
+			case STRING_LITERAL:
+				new (u.stringOrRegexpValue.stringStorage) string(other.storedString());
+				break;
+			case INTEGER_LITERAL:
+				u.intValue = other.u.intValue;
+				break;
+			case BOOLEAN_LITERAL:
+				u.boolValue = other.u.boolValue;
+				break;
+			case CONTEXT_FIELD_IDENTIFIER:
+				u.contextFieldIdentifier = other.u.contextFieldIdentifier;
+				break;
+			}
+		}
+	};
+	
+	struct SingleValueComponent: public BooleanComponent {
+		Value val;
+		
+		SingleValueComponent(const Value &v)
+			: val(v)
+			{ }
+		
+		virtual bool evaluate(const Context &ctx) {
+			return val.getBooleanValue(ctx);
+		}
+	};
+	
+	struct Comparison: public BooleanComponent {
+		Value subject;
+		Comparator comparator;
+		Value object;
+		
+		virtual bool evaluate(const Context &ctx) {
+			switch (subject.getType()) {
+			case STRING_TYPE:
+				return compareStringOrRegexp(subject.getStringValue(ctx), ctx);
+			case INTEGER_TYPE:
+				return compareInteger(subject.getIntegerValue(ctx), ctx);
+			case BOOLEAN_TYPE:
+				return compareBoolean(subject.getBooleanValue(ctx), ctx);
+			default:
+				// error
+				return false;
+			}
+		}
+	
+	private:
+		bool compareStringOrRegexp(const string &str, const Context &ctx) {
+			switch (comparator) {
+			case MATCHES:
+				return regexec(object.getRegexpValue(ctx), str.c_str(), 0, NULL, 0) == 0;
+			case NOT_MATCHES:
+				return regexec(object.getRegexpValue(ctx), str.c_str(), 0, NULL, 0) != 0;
+			case EQUALS:
+				return str == object.getStringValue(ctx);
+			case NOT_EQUALS:
+				return str != object.getStringValue(ctx);
+			default:
+				// error
+				return false;
+			}
+		}
+		
+		bool compareInteger(int value, const Context &ctx) {
+			int value2 = object.getIntegerValue(ctx);
+			switch (comparator) {
+			case EQUALS:
+				return value == value2;
+			case NOT_EQUALS:
+				return value != value2;
+			case GREATER_THAN:
+				return value > value2;
+			case GREATER_THAN_OR_EQUALS:
+				return value >= value2;
+			case LESS_THAN:
+				return value < value2;
+			case LESS_THAN_OR_EQUALS:
+				return value <= value2;
+			default:
+				// error
+				return false;
+			}
+		}
+		
+		bool compareBoolean(bool value, const Context &ctx) {
+			bool value2 = object.getBooleanValue(ctx);
+			switch (comparator) {
+			case EQUALS:
+				return value == value2;
+			case NOT_EQUALS:
+				return value != value2;
+			default:
+				// error
+				return false;
+			}
+		}
+	};
+	
+	struct FunctionCall: public BooleanComponent {
+		vector<Value> arguments;
+		
+		virtual void checkArguments() const = 0;
+	};
+	
+	struct StartsWithFunctionCall: public FunctionCall {
+		virtual bool evaluate(const Context &ctx) {
+			return startsWith(arguments[0].getStringValue(ctx),
+				arguments[1].getStringValue(ctx));
+		}
+		
+		virtual void checkArguments() const {
+			if (arguments.size() != 2) {
+				throw SyntaxError("you passed " + toString(arguments.size()) + 
+					" argument(s) to starts_with(), but it accepts exactly 2 arguments");
+			}
+		}
+	};
+	
+	struct HasHintFunctionCall: public FunctionCall {
+		virtual bool evaluate(const Context &ctx) {
+			return ctx.hasHint(arguments[0].getStringValue(ctx));
+		}
+		
+		virtual void checkArguments() const {
+			if (arguments.size() != 1) {
+				throw SyntaxError("you passed " + toString(arguments.size()) + 
+					" argument(s) to has_hint(), but it accepts exactly 1 argument");
+			}
+		}
+	};
+	
+	Tokenizer tokenizer;
+	BooleanComponentPtr root;
+	Token lookahead;
+	bool debug;
+	
+	static bool isLiteralToken(const Token &token) {
+		return token.type == Tokenizer::REGEXP
+			|| token.type == Tokenizer::STRING
+			|| token.type == Tokenizer::INTEGER
+			|| token.type == Tokenizer::TRUE_LIT
+			|| token.type == Tokenizer::FALSE_LIT;
+	}
+	
+	static bool isValueToken(const Token &token) {
+		return isLiteralToken(token) || token.type == Tokenizer::IDENTIFIER;
+	}
+	
+	static bool isLogicalOperatorToken(const Token &token) {
+		return token.type == Tokenizer::AND
+			|| token.type == Tokenizer::OR;
+	}
+	
+	static Comparator determineComparator(Tokenizer::TokenType type) {
+		switch (type) {
+		case Tokenizer::MATCHES:
+			return MATCHES;
+		case Tokenizer::NOT_MATCHES:
+			return NOT_MATCHES;
+		case Tokenizer::EQUALS:
+			return EQUALS;
+		case Tokenizer::NOT_EQUALS:
+			return NOT_EQUALS;
+		case Tokenizer::GREATER_THAN:
+			return GREATER_THAN;
+		case Tokenizer::GREATER_THAN_OR_EQUALS:
+			return GREATER_THAN_OR_EQUALS;
+		case Tokenizer::LESS_THAN:
+			return LESS_THAN;
+		case Tokenizer::LESS_THAN_OR_EQUALS:
+			return LESS_THAN_OR_EQUALS;
+		default:
+			return UNKNOWN_COMPARATOR;
+		}
+	}
+	
+	static bool comparatorAcceptsValueTypes(Comparator cmp, ValueType subjectType, ValueType objectType) {
+		switch (cmp) {
+		case MATCHES:
+		case NOT_MATCHES:
+			return subjectType == STRING_TYPE && objectType == REGEXP_TYPE;
+		case EQUALS:
+		case NOT_EQUALS:
+			return (subjectType == STRING_TYPE || subjectType == INTEGER_TYPE || subjectType == BOOLEAN_TYPE)
+				&& subjectType == objectType;
+		case GREATER_THAN:
+		case GREATER_THAN_OR_EQUALS:
+		case LESS_THAN:
+		case LESS_THAN_OR_EQUALS:
+			return subjectType == INTEGER_TYPE && objectType == INTEGER_TYPE;
+		default:
+			abort();
+			return false; // Shut up compiler warning.
+		}
+	}
+	
+	static string unescapeCString(const StaticString &data) {
+		string result;
+		result.reserve(data.size());
+		
+		const char *current = data.data();
+		const char *end     = data.data() + data.size();
+		while (current < end) {
+			char ch = *current;
+			if (ch == '\\') {
+				current++;
+				if (current < end) {
+					ch = *current;
+					switch (ch) {
+					case 'r':
+						result.append(1, '\r');
+						break;
+					case 'n':
+						result.append(1, '\n');
+						break;
+					case 't':
+						result.append(1, '\t');
+						break;
+					default:
+						result.append(1, ch);
+						break;
+					}
+					current++;
+				}
+			} else {
+				result.append(1, ch);
+				current++;
+			}
+		}
+		
+		return result;
+	}
+	
+	void logMatch(int level, const char *name) const {
+		if (level > 100) {
+			// If level is too deep then it's probably a bug.
+			abort();
+		}
+		if (debug) {
+			for (int i = 0; i < level; i++) {
+				printf("   ");
+			}
+			printf("Matching: %s\n", name);
+		}
+	}
+	
+	Token peek() const {
+		return lookahead;
+	}
+	
+	bool peek(Tokenizer::TokenType type) const {
+		return lookahead.type == type;
+	}
+	
+	Token match(TokenType type) {
+		if (lookahead.type == type) {
+			return match();
+		} else {
+			raiseSyntaxError("Expected a " + Tokenizer::typeToString(type) +
+				" token, but got " + lookahead.toString(),
+				lookahead);
+			return Token(); // Shut up compiler warning.
+		}
+	}
+	
+	Token match() {
+		Token old = lookahead;
+		lookahead = tokenizer.getNext();
+		return old;
+	}
+	
+	void raiseSyntaxError(const string &msg = "", const Token &token = Token()) {
+		if (token.type != Tokenizer::NONE) {
+			string message = "at character " + toString(token.pos + 1);
+			if (!msg.empty()) {
+				message.append(": ");
+				message.append(msg);
+			}
+			throw SyntaxError(message);
+		} else {
+			throw SyntaxError(msg);
+		}
+	}
+	
+	BooleanComponentPtr matchMultiExpression(int level) {
+		logMatch(level, "matchMultiExpression()");
+		MultiExpressionPtr result = make_shared<MultiExpression>();
+		
+		result->firstExpression = matchExpression(level + 1);
+		while (isLogicalOperatorToken(peek())) {
+			MultiExpression::Part part;
+			part.theOperator = matchOperator(level + 1);
+			part.expression  = matchExpression(level + 1);
+			result->rest.push_back(part);
+		}
+		
+		return result;
+	}
+	
+	BooleanComponentPtr matchExpression(int level) {
+		logMatch(level, "matchExpression()");
+		bool negate = false;
+		
+		if (peek(Tokenizer::NOT)) {
+			match();
+			negate = true;
+		}
+		
+		Token next = peek();
+		if (next.type == Tokenizer::LPARENTHESIS) {
+			match();
+			BooleanComponentPtr expression = matchMultiExpression(level + 1);
+			match(Tokenizer::RPARENTHESIS);
+			if (negate) {
+				return make_shared<Negation>(expression);
+			} else {
+				return expression;
+			}
+		} else if (isValueToken(next)) {
+			BooleanComponentPtr component;
+			Token &current = next;
+			match();
+			
+			if (peek(Tokenizer::LPARENTHESIS)) {
+				component = matchFunctionCall(level + 1, current);
+			} else if (determineComparator(peek().type) != UNKNOWN_COMPARATOR) {
+				component = matchComparison(level + 1, current);
+			} else if (current.type == Tokenizer::TRUE_LIT || current.type == Tokenizer::FALSE_LIT) {
+				component = matchSingleValueComponent(level + 1, current);
+			} else {
+				raiseSyntaxError("expected a function call, comparison or boolean literal", current);
+			}
+			
+			if (negate) {
+				return make_shared<Negation>(component);
+			} else {
+				return component;
+			}
+		} else {
+			raiseSyntaxError("expected a left parenthesis or an identifier", next);
+			return BooleanComponentPtr(); // Shut up compiler warning.
+		}
+	}
+	
+	BooleanComponentPtr matchSingleValueComponent(int level, const Token &token) {
+		logMatch(level, "matchSingleValueComponent()");
+		return make_shared<SingleValueComponent>(matchLiteral(level + 1, token));
+	}
+	
+	ComparisonPtr matchComparison(int level, const Token &subjectToken) {
+		logMatch(level, "matchComparison()");
+		ComparisonPtr comparison = make_shared<Comparison>();
+		comparison->subject    = matchValue(level + 1, subjectToken);
+		comparison->comparator = matchComparator(level + 1);
+		comparison->object     = matchValue(level + 1, match());
+		if (!comparatorAcceptsValueTypes(comparison->comparator, comparison->subject.getType(), comparison->object.getType())) {
+			raiseSyntaxError("the comparator cannot operate on the given combination of types", subjectToken);
+		}
+		return comparison;
+	}
+	
+	FunctionCallPtr matchFunctionCall(int level, const Token &id) {
+		logMatch(level, "matchFunctionCall()");
+		FunctionCallPtr function;
+		
+		if (id.rawValue == "starts_with") {
+			function = make_shared<StartsWithFunctionCall>();
+		} else if (id.rawValue == "has_hint") {
+			function = make_shared<HasHintFunctionCall>();
+		} else {
+			raiseSyntaxError("unknown function '" + id.rawValue + "'", id);
+		}
+		
+		match(Tokenizer::LPARENTHESIS);
+		if (isValueToken(peek())) {
+			function->arguments.push_back(matchValue(level + 1, match()));
+			while (peek(Tokenizer::COMMA)) {
+				match();
+				function->arguments.push_back(matchValue(level + 1, match()));
+			}
+		}
+		match(Tokenizer::RPARENTHESIS);
+		function->checkArguments();
+		return function;
+	}
+	
+	Value matchValue(int level, const Token &token) {
+		logMatch(level, "matchValue()");
+		if (isLiteralToken(token)) {
+			return matchLiteral(level + 1, token);
+		} else if (token.type == Tokenizer::IDENTIFIER) {
+			return matchContextFieldIdentifier(level + 1, token);
+		} else {
+			raiseSyntaxError("Unrecognized value token " +
+				Tokenizer::typeToString(token.type), token);
+			return Value(); // Shut up compiler warning.
+		}
+	}
+	
+	LogicalOperator matchOperator(int level) {
+		logMatch(level, "matchOperator()");
+		if (peek(Tokenizer::AND)) {
+			logMatch(level + 1, "AND");
+			match();
+			return AND;
+		} else if (peek(Tokenizer::OR)) {
+			logMatch(level + 1, "OR");
+			match();
+			return OR;
+		} else {
+			raiseSyntaxError("", peek());
+			return AND; // Shut up compiler warning.
+		}
+	}
+	
+	Comparator matchComparator(int level) {
+		logMatch(level, "matchComparator()");
+		Comparator comparator = determineComparator(peek().type);
+		if (comparator == UNKNOWN_COMPARATOR) {
+			raiseSyntaxError("", peek());
+			return MATCHES; // Shut up compiler warning.
+		} else {
+			logMatch(level + 1, Tokenizer::typeToString(peek().type).c_str());
+			match();
+			return comparator;
+		}
+	}
+	
+	Value matchLiteral(int level, const Token &token) {
+		logMatch(level, "matchLiteral()");
+		if (token.type == Tokenizer::REGEXP) {
+			logMatch(level + 1, "regexp");
+			return Value(true, unescapeCString(token.rawValue.substr(1, token.rawValue.size() - 2)),
+				token.options & Tokenizer::REGEXP_OPTION_CASE_INSENSITIVE);
+		} else if (token.type == Tokenizer::STRING) {
+			logMatch(level + 1, "string");
+			return Value(false, unescapeCString(token.rawValue.substr(1, token.rawValue.size() - 2)));
+		} else if (token.type == Tokenizer::INTEGER) {
+			logMatch(level + 1, "integer");
+			return Value(atoi(token.rawValue.toString()));
+		} else if (token.type == Tokenizer::TRUE_LIT) {
+			logMatch(level + 1, "true");
+			return Value(true);
+		} else if (token.type == Tokenizer::FALSE_LIT) {
+			logMatch(level + 1, "false");
+			return Value(false);
+		} else {
+			raiseSyntaxError("regular expression, string, integer or boolean expected", token);
+			return Value(); // Shut up compiler warning.
+		}
+	}
+	
+	Value matchContextFieldIdentifier(int level, const Token &token) {
+		logMatch(level, "matchContextFieldIdentifier()");
+		if (token.rawValue == "uri") {
+			return Value(Context::URI);
+		} else if (token.rawValue == "controller") {
+			return Value(Context::CONTROLLER);
+		} else if (token.rawValue == "response_time") {
+			return Value(Context::RESPONSE_TIME);
+		} else if (token.rawValue == "response_time_without_gc") {
+			return Value(Context::RESPONSE_TIME_WITHOUT_GC);
+		} else if (token.rawValue == "status") {
+			return Value(Context::STATUS);
+		} else if (token.rawValue == "status_code") {
+			return Value(Context::STATUS_CODE);
+		} else if (token.rawValue == "gc_time") {
+			return Value(Context::GC_TIME);
+		} else {
+			raiseSyntaxError("unknown field '" + token.rawValue + "'", token);
+			return Value(); // Shut up compiler warning.
+		}
+	}
+	
+public:
+	Filter(const StaticString &source, bool debug = false)
+		: tokenizer(source, debug)
+	{
+		this->debug = debug;
+		lookahead = tokenizer.getNext();
+		root = matchMultiExpression(0);
+		logMatch(0, "end of data");
+		match(Tokenizer::END_OF_DATA);
+	}
+	
+	bool run(const Context &ctx) {
+		return root->evaluate(ctx);
+	}
+};
+
+
+} // namespace FilterSupport
+} // namespace Passenger
+
+#endif /* __cplusplus */
+
+
+/********* C bindings *********/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *PassengerFilter;
+
+PassengerFilter *passenger_filter_create(const char *source, int size, char **error);
+void passenger_filter_free(PassengerFilter *filter);
+char *passenger_filter_validate(const char *source, int size);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _PASSENGER_FILTER_SUPPORT_H_ */
diff --git a/ext/common/agents/LoggingAgent/LoggingServer.h b/ext/common/agents/LoggingAgent/LoggingServer.h
new file mode 100644
index 0000000..8135bdc
--- /dev/null
+++ b/ext/common/agents/LoggingAgent/LoggingServer.h
@@ -0,0 +1,1191 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_LOGGING_SERVER_H_
+#define _PASSENGER_LOGGING_SERVER_H_
+
+#include <oxt/system_calls.hpp>
+#include <oxt/macros.hpp>
+#include <boost/shared_ptr.hpp>
+#include <string>
+#include <ostream>
+#include <sstream>
+#include <map>
+#include <ev++.h>
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/stat.h>
+#include <grp.h>
+#include <cstring>
+#include <ctime>
+#include <cassert>
+
+#include <agents/LoggingAgent/DataStoreId.h>
+#include <agents/LoggingAgent/RemoteSender.h>
+#include <agents/LoggingAgent/FilterSupport.h>
+
+#include <EventedMessageServer.h>
+#include <MessageReadersWriters.h>
+#include <RandomGenerator.h>
+#include <StaticString.h>
+#include <Exceptions.h>
+#include <Constants.h>
+#include <Utils.h>
+#include <Utils/MD5.h>
+#include <Utils/IOUtils.h>
+#include <Utils/MessageIO.h>
+#include <Utils/VariantMap.h>
+#include <Utils/StrIntUtils.h>
+#include <Utils/StringMap.h>
+
+
+namespace Passenger {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+
+class LoggingServer: public EventedMessageServer {
+private:
+	static const int MAX_LOG_SINK_CACHE_SIZE = 512;
+	static const int GARBAGE_COLLECTION_TIMEOUT = 4500;  // 1 hour 15 minutes
+	
+	struct LogSink;
+	typedef shared_ptr<LogSink> LogSinkPtr;
+	typedef map<string, LogSinkPtr> LogSinkCache;
+	
+	struct LogSink {
+		LoggingServer *server;
+		
+		/**
+		 * Marks how many times this LogSink is currently opened, i.e. the
+		 * number of Transaction objects currently referencing this LogSink.
+		 * @invariant
+		 *    (opened == 0) == (this LogSink is in LoggingServer.inactiveLogSinks)
+		 */
+		int opened;
+		
+		/** Last time this LogSink hit an open count of 0. */
+		ev_tstamp lastUsed;
+		
+		/** Last time data was actually written to the underlying storage device. */
+		ev_tstamp lastFlushed;
+
+		/** The amount of data that has been written to this sink so far. */
+		unsigned int writtenTo;
+		
+		/**
+		 * This LogSink's iterator inside LoggingServer.logSinkCache.
+		 */
+		LogSinkCache::iterator cacheIterator;
+		
+		/**
+		 * This LogSink's iterator inside LoggingServer.inactiveLogSinks.
+		 * Only valid when opened == 0.
+		 */
+		list<LogSinkPtr>::iterator inactiveLogSinksIterator;
+		
+		LogSink(LoggingServer *_server) {
+			server = _server;
+			opened = 0;
+			lastUsed = ev_now(server->getLoop());
+			lastFlushed = lastUsed;
+			writtenTo = 0;
+		}
+		
+		virtual ~LogSink() {
+			// We really want to flush() here but can't call virtual
+			// functions in destructor. :(
+		}
+		
+		virtual bool isRemote() const {
+			return false;
+		}
+
+		// Default interval at which this sink should be flushed.
+		virtual unsigned int defaultFlushInterval() const {
+			return 15;
+		}
+		
+		virtual void append(const DataStoreId &dataStoreId,
+			const StaticString &data)
+		{
+			writtenTo += data.size();
+		}
+		
+		virtual bool flush() {
+			lastFlushed = ev_now(server->getLoop());
+			return true;
+		}
+		
+		virtual void dump(ostream &stream) const { }
+	};
+	
+	struct LogFileSink: public LogSink {
+		string filename;
+		FileDescriptor fd;
+		
+		LogFileSink(LoggingServer *server, const string &filename)
+			: LogSink(server)
+		{
+			if (filename.empty()) {
+				this->filename = "/dev/null";
+			} else {
+				this->filename = filename;
+			}
+			fd = syscalls::open(filename.c_str(),
+				O_CREAT | O_WRONLY | O_APPEND,
+				0600);
+			if (fd == -1) {
+				int e = errno;
+				throw FileSystemException("Cannnot open file", e, filename);
+			}
+		}
+		
+		virtual ~LogFileSink() {
+			flush();
+		}
+		
+		virtual void append(const DataStoreId &dataStoreId, const StaticString &data) {
+			LogSink::append(dataStoreId, data);
+			syscalls::write(fd, data.data(), data.size());
+		}
+
+		virtual void dump(ostream &stream) const {
+			stream << "   * Log file: " << filename << "\n";
+			stream << "     Opened     : " << opened << "\n";
+			stream << "     LastUsed   : " << distanceOfTimeInWords((time_t) lastUsed) << " ago\n";
+			stream << "     LastFlushed: " << distanceOfTimeInWords((time_t) lastFlushed) << " ago\n";
+			stream << "     WrittenTo  : " << writtenTo << "\n";
+		}
+	};
+	
+	typedef shared_ptr<LogFileSink> LogFileSinkPtr;
+	
+	struct RemoteSink: public LogSink {
+		/* RemoteSender compresses the data with zlib before sending it
+		 * to the server. Even including Base64 and URL encoding overhead,
+		 * this compresses the data to about 25% of its original size.
+		 * Therefore we set a buffer capacity of a little less than 4 times
+		 * the TCP maximum segment size so that we can send as much
+		 * data as possible to the server in a single TCP segment.
+		 * With the "little less" we take into account:
+		 * - HTTPS overhead. This can be as high as 2 KB.
+		 * - The fact that RemoteSink.append() might try to flush the
+		 *   current buffer the current data. Empirical evidence has
+		 *   shown that the data for a request transaction is usually
+		 *   less than 5 KB.
+		 */
+		static const unsigned int BUFFER_CAPACITY =
+			4 * 64 * 1024 -
+			16 * 1024;
+		
+		string unionStationKey;
+		string nodeName;
+		string category;
+		char buffer[BUFFER_CAPACITY];
+		unsigned int bufferSize;
+		
+		RemoteSink(LoggingServer *server, const string &unionStationKey,
+			const string &nodeName, const string &category)
+			: LogSink(server)
+		{
+			this->unionStationKey = unionStationKey;
+			this->nodeName = nodeName;
+			this->category = category;
+			this->bufferSize = 0;
+		}
+		
+		virtual ~RemoteSink() {
+			flush();
+		}
+		
+		virtual bool isRemote() const {
+			return true;
+		}
+
+		virtual unsigned int defaultFlushInterval() const {
+			return 60;
+		}
+		
+		virtual void append(const DataStoreId &dataStoreId, const StaticString &data) {
+			LogSink::append(dataStoreId, data);
+			if (bufferSize + data.size() > BUFFER_CAPACITY) {
+				StaticString data2[2];
+				data2[0] = StaticString(buffer, bufferSize);
+				data2[1] = data;
+				
+				server->remoteSender.schedule(unionStationKey, nodeName,
+					category, data2, 2);
+				lastFlushed = ev_now(server->getLoop());
+				bufferSize = 0;
+			} else {
+				memcpy(buffer + bufferSize, data.data(), data.size());
+				bufferSize += data.size();
+			}
+		}
+		
+		virtual bool flush() {
+			if (bufferSize > 0) {
+				lastFlushed = ev_now(server->getLoop());
+				StaticString data(buffer, bufferSize);
+				server->remoteSender.schedule(unionStationKey, nodeName,
+					category, &data, 1);
+				bufferSize = 0;
+				P_DEBUG("Flushed remote sink " << inspect() << ": " << bufferSize << " bytes");
+				return true;
+			} else {
+				P_DEBUG("Flushed remote sink " << inspect() << ": 0 bytes");
+				return false;
+			}
+		}
+
+		string inspect() const {
+			return "(key=" + unionStationKey + ", node=" + nodeName + ", category=" + category + ")";
+		}
+		
+		virtual void dump(ostream &stream) const {
+			stream << "   * Remote sink\n";
+			stream << "     Key        : " << unionStationKey << "\n";
+			stream << "     Node       : " << nodeName << "\n";
+			stream << "     Category   : " << category << "\n";
+			stream << "     Opened     : " << opened << "\n";
+			stream << "     LastUsed   : " << distanceOfTimeInWords((time_t) lastUsed) << " ago\n";
+			stream << "     LastFlushed: " << distanceOfTimeInWords((time_t) lastFlushed) << " ago\n";
+			stream << "     WrittenTo  : " << writtenTo << "\n";
+			stream << "     BufferSize : " << bufferSize << "\n";
+		}
+	};
+	
+	struct Transaction {
+		LoggingServer *server;
+		LogSinkPtr logSink;
+		ev_tstamp createdAt;
+		string txnId;
+		DataStoreId dataStoreId;
+		unsigned int writeCount;
+		int refcount;
+		bool crashProtect, discarded;
+		string data;
+		string filters;
+		
+		Transaction(LoggingServer *server, ev_tstamp createdAt) {
+			this->server = server;
+			this->createdAt = createdAt;
+			data.reserve(8 * 1024);
+		}
+		
+		~Transaction() {
+			if (logSink != NULL) {
+				if (!discarded && passesFilter()) {
+					logSink->append(dataStoreId, data);
+				}
+				server->closeLogSink(logSink);
+			}
+		}
+		
+		StaticString getGroupName() const {
+			return dataStoreId.getGroupName();
+		}
+		
+		StaticString getNodeName() const {
+			return dataStoreId.getNodeName();
+		}
+		
+		StaticString getCategory() const {
+			return dataStoreId.getCategory();
+		}
+		
+		void discard() {
+			data.clear();
+			discarded = true;
+		}
+		
+		void dump(ostream &stream) const {
+			stream << "   * Transaction " << txnId << "\n";
+			stream << "     Created at: " << distanceOfTimeInWords((time_t) createdAt) << " ago\n";
+			stream << "     Group     : " << getGroupName() << "\n";
+			stream << "     Node      : " << getNodeName() << "\n";
+			stream << "     Category  : " << getCategory() << "\n";
+			stream << "     Refcount  : " << refcount << "\n";
+		}
+	
+	private:
+		bool passesFilter() {
+			if (filters.empty()) {
+				return true;
+			}
+			
+			const char *current = filters.data();
+			const char *end     = filters.data() + filters.size();
+			bool result         = true;
+			FilterSupport::ContextFromLog ctx(data);
+			
+			// 'filters' may contain multiple filter sources, separated
+			// by '\1' characters. Process each.
+			while (current < end && result) {
+				StaticString tmp(current, end - current);
+				size_t pos = tmp.find('\1');
+				if (pos == string::npos) {
+					pos = tmp.size();
+				}
+				
+				StaticString source(current, pos);
+				FilterSupport::Filter &filter = server->compileFilter(source);
+				result = filter.run(ctx);
+				
+				current = tmp.data() + pos + 1;
+			}
+			return result;
+		}
+	};
+	
+	typedef shared_ptr<Transaction> TransactionPtr;
+	
+	enum ClientType {
+		UNINITIALIZED,
+		LOGGER
+	};
+	
+	struct Client: public EventedMessageClient {
+		string nodeName;
+		ClientType type;
+		char nodeId[MD5_HEX_SIZE];
+		/**
+		 * Set of transaction IDs opened by this client.
+		 * @invariant This is a subset of the transaction IDs in the 'transactions' member.
+		 */
+		set<string> openTransactions;
+		ScalarMessage dataReader;
+		TransactionPtr currentTransaction;
+		string currentTimestamp;
+		
+		Client(struct ev_loop *loop, const FileDescriptor &fd)
+			: EventedMessageClient(loop, fd)
+		{
+			type = UNINITIALIZED;
+			dataReader.setMaxSize(1024 * 128);
+		}
+	};
+	
+	typedef shared_ptr<Client> ClientPtr;
+	typedef map<string, TransactionPtr> TransactionMap;
+	
+	typedef shared_ptr<FilterSupport::Filter> FilterPtr;
+	
+	RemoteSender remoteSender;
+	ev::timer garbageCollectionTimer;
+	ev::timer sinkFlushingTimer;
+	ev::timer exitTimer;
+	TransactionMap transactions;
+	LogSinkCache logSinkCache;
+	/**
+	 * @invariant
+	 *    inactiveLogSinks is sorted from oldest to youngest (by lastTime member).
+	 *    for all s in inactiveLogSinks:
+	 *       s.opened == 0
+	 *    inactiveLogSinks.size() == inactiveLogSinksCount
+	 */
+	list<LogSinkPtr> inactiveLogSinks;
+	int inactiveLogSinksCount;
+	StringMap<FilterPtr> filters;
+	RandomGenerator randomGenerator;
+	bool refuseNewConnections;
+	bool exitRequested;
+	unsigned long long exitBeginTime;
+	int sinkFlushInterval;
+	string dumpFile;
+	
+	void sendErrorToClient(Client *client, const string &message) {
+		client->writeArrayMessage("error", message.c_str(), NULL);
+		logError(client, message);
+	}
+	
+	bool expectingArgumentsCount(Client *client, const vector<StaticString> &args, unsigned int size) {
+		if (args.size() == size) {
+			return true;
+		} else {
+			sendErrorToClient(client, "Invalid number of arguments");
+			client->disconnect();
+			return false;
+		}
+	}
+	
+	bool expectingMinArgumentsCount(Client *client, const vector<StaticString> &args, unsigned int size) {
+		if (args.size() >= size) {
+			return true;
+		} else {
+			sendErrorToClient(client, "Invalid number of arguments");
+			client->disconnect();
+			return false;
+		}
+	}
+	
+	bool expectingLoggerType(Client *client) {
+		if (client->type == LOGGER) {
+			return true;
+		} else {
+			sendErrorToClient(client, "Client not initialized as logger");
+			client->disconnect();
+			return false;
+		}
+	}
+	
+	bool checkWhetherConnectionAreAcceptable(Client *client) {
+		if (refuseNewConnections) {
+			client->writeArrayMessage("server shutting down", NULL);
+			client->disconnect();
+			return false;
+		} else {
+			return true;
+		}
+	}
+	
+	static bool getBool(const vector<StaticString> &args, unsigned int index,
+		bool defaultValue = false)
+	{
+		if (index < args.size()) {
+			return args[index] == "true";
+		} else {
+			return defaultValue;
+		}
+	}
+	
+	static StaticString getStaticString(const vector<StaticString> &args,
+		unsigned int index, const StaticString &defaultValue = "")
+	{
+		if (index < args.size()) {
+			return args[index];
+		} else {
+			return defaultValue;
+		}
+	}
+	
+	bool validTxnId(const StaticString &txnId) const {
+		// must contain timestamp
+		// must contain separator
+		// must contain random id
+		// must not be too large
+		return !txnId.empty();
+	}
+	
+	bool validUnionStationKey(const StaticString &key) const {
+		// TODO: must be hexadecimal
+		// TODO: must not be too large
+		return !key.empty();
+	}
+	
+	bool validLogContent(const StaticString &data) const {
+		const char *current = data.c_str();
+		const char *end = current + data.size();
+		while (current < end) {
+			char c = *current;
+			if ((c < 1 && c > 126) || c == '\n' || c == '\r') {
+				return false;
+			}
+			current++;
+		}
+		return true;
+	}
+	
+	bool validTimestamp(const StaticString &timestamp) const {
+		// TODO: must be hexadecimal
+		// TODO: must not be too large
+		return true;
+	}
+	
+	bool supportedCategory(const StaticString &category) const {
+		return category == "requests" || category == "processes" || category == "exceptions";
+	}
+	
+	LogSinkPtr openLogFile() {
+		string cacheKey = "file:" + dumpFile;
+		LogSinkPtr result;
+		LogSinkCache::iterator it = logSinkCache.find(cacheKey);
+		if (it == logSinkCache.end()) {
+			trimLogSinkCache(MAX_LOG_SINK_CACHE_SIZE - 1);
+			result = make_shared<LogFileSink>(this, dumpFile);
+			pair<LogSinkCache::iterator, bool> p =
+				logSinkCache.insert(make_pair(cacheKey, result));
+			result->cacheIterator = p.first;
+			result->opened = 1;
+		} else {
+			result = it->second;
+			result->opened++;
+			if (result->opened == 1) {
+				inactiveLogSinks.erase(result->inactiveLogSinksIterator);
+				inactiveLogSinksCount--;
+			}
+		}
+		return result;
+	}
+	
+	LogSinkPtr openRemoteSink(const StaticString &unionStationKey, const string &nodeName,
+		const string &category)
+	{
+		string cacheKey = "remote:";
+		cacheKey.append(unionStationKey.c_str(), unionStationKey.size());
+		cacheKey.append(1, '\0');
+		cacheKey.append(nodeName);
+		cacheKey.append(1, '\0');
+		cacheKey.append(category);
+		
+		LogSinkPtr result;
+		LogSinkCache::iterator it = logSinkCache.find(cacheKey);
+		if (it == logSinkCache.end()) {
+			trimLogSinkCache(MAX_LOG_SINK_CACHE_SIZE - 1);
+			result = make_shared<RemoteSink>(this, unionStationKey,
+				nodeName, category);
+			pair<LogSinkCache::iterator, bool> p =
+				logSinkCache.insert(make_pair(cacheKey, result));
+			result->cacheIterator = p.first;
+			result->opened = 1;
+		} else {
+			result = it->second;
+			result->opened++;
+			if (result->opened == 1) {
+				inactiveLogSinks.erase(result->inactiveLogSinksIterator);
+				inactiveLogSinksCount--;
+			}
+		}
+		return result;
+	}
+	
+	/**
+	 * 'Closes' the given log sink. It's not actually deleted from memory;
+	 * instead it's marked as inactive and cached for later use. May be
+	 * deleted later when resources are low.
+	 *
+	 * No need to call this manually. Automatically called by Transaction's
+	 * destructor.
+	 */
+	void closeLogSink(const LogSinkPtr &logSink) {
+		logSink->opened--;
+		assert(logSink->opened >= 0);
+		logSink->lastUsed = ev_now(getLoop());
+		if (logSink->opened == 0) {
+			inactiveLogSinks.push_back(logSink);
+			logSink->inactiveLogSinksIterator = inactiveLogSinks.end();
+			logSink->inactiveLogSinksIterator--;
+			inactiveLogSinksCount++;
+			trimLogSinkCache(MAX_LOG_SINK_CACHE_SIZE);
+		}
+	}
+	
+	/** Try to reduce the log sink cache size to the given size. */
+	void trimLogSinkCache(unsigned int size) {
+		while (!inactiveLogSinks.empty() && logSinkCache.size() > size) {
+			const LogSinkPtr logSink = inactiveLogSinks.front();
+			inactiveLogSinks.pop_front();
+			inactiveLogSinksCount--;
+			logSinkCache.erase(logSink->cacheIterator);
+		}
+	}
+	
+	FilterSupport::Filter &compileFilter(const StaticString &source) {
+		// TODO: garbage collect filters based on time
+		FilterPtr filter = filters.get(source);
+		if (filter == NULL) {
+			filter = make_shared<FilterSupport::Filter>(source);
+			filters.set(source, filter);
+		}
+		return *filter;
+	}
+	
+	bool writeLogEntry(Client *client, const TransactionPtr &transaction,
+		const StaticString &timestamp, const StaticString &data)
+	{
+		if (transaction->discarded) {
+			return true;
+		}
+		if (OXT_UNLIKELY( !validLogContent(data) )) {
+			if (client != NULL) {
+				sendErrorToClient(client, "Log entry data contains an invalid character.");
+				client->disconnect();
+			}
+			return false;
+		}
+		if (OXT_UNLIKELY( !validTimestamp(timestamp) )) {
+			if (client != NULL) {
+				sendErrorToClient(client, "Log entry timestamp is invalid.");
+				client->disconnect();
+			}
+			return false;
+		}
+		
+		char writeCountStr[sizeof(unsigned int) * 2 + 1];
+		integerToHexatri(transaction->writeCount, writeCountStr);
+		transaction->writeCount++;
+		transaction->data.reserve(transaction->data.size() +
+			transaction->txnId.size() +
+			1 +
+			timestamp.size() +
+			1 +
+			strlen(writeCountStr) +
+			1 +
+			data.size() +
+			1);
+		transaction->data.append(transaction->txnId);
+		transaction->data.append(" ");
+		transaction->data.append(timestamp);
+		transaction->data.append(" ");
+		transaction->data.append(writeCountStr);
+		transaction->data.append(" ");
+		transaction->data.append(data);
+		transaction->data.append("\n");
+		return true;
+	}
+	
+	void writeDetachEntry(Client *client, const TransactionPtr &transaction) {
+		char timestamp[2 * sizeof(unsigned long long) + 1];
+		// Must use System::getUsec() here instead of ev_now() because the
+		// precision of the time is very important.
+		integerToHexatri<unsigned long long>(SystemTime::getUsec(), timestamp);
+		writeDetachEntry(client, transaction, timestamp);
+	}
+	
+	void writeDetachEntry(Client *client, const TransactionPtr &transaction,
+		const StaticString &timestamp)
+	{
+		writeLogEntry(client, transaction, timestamp, "DETACH");
+	}
+	
+	bool requireRights(Client *client, Account::Rights rights) {
+		if (client->messageServer.account->hasRights(rights)) {
+			return true;
+		} else {
+			P_TRACE(2, "Security error: insufficient rights to execute this command.");
+			client->writeArrayMessage("SecurityException",
+				"Insufficient rights to execute this command.",
+				NULL);
+			client->disconnect();
+			return false;
+		}
+	}
+	
+	bool isDirectory(const string &dir, struct dirent *entry) const {
+		#if defined(__sun__) || defined(_AIX)
+			string path = dir;
+			path.append("/");
+			path.append(entry->d_name);
+			return getFileType(path) == FT_DIRECTORY;
+		#else
+			return entry->d_type == DT_DIR;
+		#endif
+	}
+	
+	bool looksLikeNumber(const char *str) const {
+		const char *current = str;
+		while (*current != '\0') {
+			char c = *current;
+			if (!(c >= '0' && c <= '9')) {
+				return false;
+			}
+			current++;
+		}
+		return true;
+	}
+	
+	/* Release all inactive log sinks that have been inactive for more than
+	 * GARBAGE_COLLECTION_TIMEOUT seconds.
+	 */
+	void releaseInactiveLogSinks(ev_tstamp now) {
+		bool done = false;
+		
+		while (!done && !inactiveLogSinks.empty()) {
+			const LogSinkPtr logSink = inactiveLogSinks.front();
+			if (now - logSink->lastUsed >= GARBAGE_COLLECTION_TIMEOUT) {
+				inactiveLogSinks.pop_front();
+				inactiveLogSinksCount--;
+				logSinkCache.erase(logSink->cacheIterator);
+			} else {
+				done = true;
+			}
+		}
+	}
+	
+	void garbageCollect(ev::timer &timer, int revents) {
+		P_DEBUG("Garbage collection time");
+		releaseInactiveLogSinks(ev_now(getLoop()));
+	}
+
+	ev_tstamp getFlushInterval(const LogSink *sink) const {
+		if (sinkFlushInterval == 0) {
+			return sink->defaultFlushInterval();
+		} else {
+			return sinkFlushInterval;
+		}
+	}
+	
+	void sinkFlushTimeout(ev::timer &timer, int revents) {
+		P_DEBUG("Flushing all sinks");
+		LogSinkCache::iterator it;
+		LogSinkCache::iterator end = logSinkCache.end();
+		ev_tstamp now = ev_now(getLoop());
+		
+		for (it = logSinkCache.begin(); it != end; it++) {
+			LogSink *sink = it->second.get();
+			if (now - sink->lastFlushed >= getFlushInterval(sink)) {
+				sink->flush();
+			}
+		}
+	}
+	
+	void flushAllSinks() {
+		P_TRACE(2, "Flushing all sinks");
+		LogSinkCache::iterator it;
+		LogSinkCache::iterator end = logSinkCache.end();
+		
+		for (it = logSinkCache.begin(); it != end; it++) {
+			LogSink *sink = it->second.get();
+			sink->flush();
+		}
+	}
+	
+	void exitTimerTimeout(ev::timer &timer, int revents) {
+		if (SystemTime::getMsec() >= exitBeginTime + 5000) {
+			exitTimer.stop();
+			exitRequested = false;
+			refuseNewConnections = false;
+			ev_break(getLoop(), EVBREAK_ONE);
+		}
+	}
+	
+protected:
+	virtual EventedClient *createClient(const FileDescriptor &fd) {
+		return new Client(getLoop(), fd);
+	}
+	
+	virtual bool onMessageReceived(EventedMessageClient *_client, const vector<StaticString> &args) {
+		Client *client = (Client *) _client;
+		
+		if (args[0] == "log") {
+			if (OXT_UNLIKELY( !expectingArgumentsCount(client, args, 3)
+			               || !expectingLoggerType(client) )) {
+				return true;
+			}
+			
+			string txnId     = args[1];
+			string timestamp = args[2];
+			
+			TransactionMap::iterator it = transactions.find(txnId);
+			if (OXT_UNLIKELY( it == transactions.end() )) {
+				sendErrorToClient(client, "Cannot log data: transaction does not exist");
+				client->disconnect();
+			} else {
+				set<string>::iterator sit = client->openTransactions.find(txnId);
+				if (OXT_UNLIKELY( sit == client->openTransactions.end() )) {
+					sendErrorToClient(client,
+						"Cannot log data: transaction not opened in this connection");
+					client->disconnect();
+					return true;
+				}
+				// Expecting the log data in a scalar message.
+				client->currentTransaction = it->second;
+				client->currentTimestamp = timestamp;
+				return false;
+			}
+			
+		} else if (args[0] == "openTransaction") {
+			if (OXT_UNLIKELY( !expectingMinArgumentsCount(client, args, 7)
+			               || !expectingLoggerType(client) )) {
+				return true;
+			}
+			
+			string       txnId     = args[1];
+			StaticString groupName = args[2];
+			StaticString nodeName  = args[3];
+			StaticString category  = args[4];
+			StaticString timestamp = args[5];
+			StaticString unionStationKey = args[6];
+			bool         crashProtect    = getBool(args, 7, true);
+			bool         ack             = getBool(args, 8, false);
+			StaticString filters         = getStaticString(args, 9);
+			
+			if (OXT_UNLIKELY( !validTxnId(txnId) )) {
+				sendErrorToClient(client, "Invalid transaction ID format");
+				client->disconnect();
+				return true;
+			}
+			if (!unionStationKey.empty()
+			 && OXT_UNLIKELY( !validUnionStationKey(unionStationKey) )) {
+				sendErrorToClient(client, "Invalid Union Station key format");
+				client->disconnect();
+				return true;
+			}
+			if (OXT_UNLIKELY( client->openTransactions.find(txnId) !=
+				client->openTransactions.end() ))
+			{
+				sendErrorToClient(client, "Cannot open transaction: transaction already opened in this connection");
+				client->disconnect();
+				return true;
+			}
+			
+			const char *nodeId;
+			
+			if (nodeName.empty()) {
+				nodeName = client->nodeName;
+				nodeId = client->nodeId;
+			} else {
+				nodeId = NULL;
+			}
+			
+			TransactionMap::iterator it = transactions.find(txnId);
+			TransactionPtr transaction;
+			if (it == transactions.end()) {
+				if (OXT_UNLIKELY( !supportedCategory(category) )) {
+					sendErrorToClient(client, "Unsupported category");
+					client->disconnect();
+					return true;
+				}
+				
+				transaction = make_shared<Transaction>(this, ev_now(getLoop()));
+				if (unionStationKey.empty()) {
+					char tempNodeId[MD5_HEX_SIZE];
+					
+					if (nodeId == NULL) {
+						md5_state_t state;
+						md5_byte_t  digest[MD5_SIZE];
+
+						md5_init(&state);
+						md5_append(&state,
+							(const md5_byte_t *) nodeName.data(),
+							nodeName.size());
+						md5_finish(&state, digest);
+						toHex(StaticString((const char *) digest, MD5_SIZE),
+							tempNodeId);
+						nodeId = tempNodeId;
+					}
+					
+					transaction->logSink = openLogFile();
+				} else {
+					transaction->logSink = openRemoteSink(unionStationKey,
+						client->nodeName, category);
+				}
+				transaction->txnId        = txnId;
+				transaction->dataStoreId  = DataStoreId(groupName,
+					nodeName, category);
+				transaction->writeCount   = 0;
+				transaction->refcount     = 0;
+				transaction->crashProtect = crashProtect;
+				if (!filters.empty()) {
+					transaction->filters = filters;
+				}
+				transaction->discarded    = false;
+				transactions.insert(make_pair(txnId, transaction));
+			} else {
+				transaction = it->second;
+				if (OXT_UNLIKELY( transaction->getGroupName() != groupName )) {
+					sendErrorToClient(client,
+						"Cannot open transaction: transaction already opened with a "
+						"different group name ('" + transaction->getGroupName() +
+						"' vs '" + groupName + "')");
+					client->disconnect();
+					return true;
+				}
+				if (OXT_UNLIKELY( transaction->getNodeName() != nodeName )) {
+					sendErrorToClient(client,
+						"Cannot open transaction: transaction already opened with a different node name");
+					client->disconnect();
+					return true;
+				}
+				if (OXT_UNLIKELY( transaction->getCategory() != category )) {
+					sendErrorToClient(client,
+						"Cannot open transaction: transaction already opened with a different category name");
+					client->disconnect();
+					return true;
+				}
+			}
+			
+			client->openTransactions.insert(txnId);
+			transaction->refcount++;
+			writeLogEntry(client, transaction, timestamp, "ATTACH");
+			
+			if (ack) {
+				client->writeArrayMessage("ok", NULL);
+			}
+			
+		} else if (args[0] == "closeTransaction") {
+			if (OXT_UNLIKELY( !expectingMinArgumentsCount(client, args, 3)
+			               || !expectingLoggerType(client) )) {
+				return true;
+			}
+			
+			string txnId = args[1];
+			StaticString timestamp = args[2];
+			bool         ack       = getBool(args, 3, false);
+			
+			TransactionMap::iterator it = transactions.find(txnId);
+			if (OXT_UNLIKELY( it == transactions.end() )) {
+				sendErrorToClient(client,
+					"Cannot close transaction " + txnId +
+					": transaction does not exist");
+				client->disconnect();
+			} else {
+				TransactionPtr &transaction = it->second;
+				
+				set<string>::const_iterator sit = client->openTransactions.find(txnId);
+				if (OXT_UNLIKELY( sit == client->openTransactions.end() )) {
+					sendErrorToClient(client,
+						"Cannot close transaction " + txnId +
+						": transaction not opened in this connection");
+					client->disconnect();
+					return true;
+				} else {
+					client->openTransactions.erase(sit);
+				}
+				
+				writeDetachEntry(client, transaction, timestamp);
+				transaction->refcount--;
+				assert(transaction->refcount >= 0);
+				if (transaction->refcount == 0) {
+					transactions.erase(it);
+				}
+			}
+			
+			if (ack) {
+				client->writeArrayMessage("ok", NULL);
+			}
+		
+		} else if (args[0] == "init") {
+			if (OXT_UNLIKELY( client->type != UNINITIALIZED )) {
+				sendErrorToClient(client, "Already initialized");
+				client->disconnect();
+				return true;
+			}
+			if (OXT_UNLIKELY( !expectingArgumentsCount(client, args, 2) )) {
+				return true;
+			}
+			if (OXT_UNLIKELY( !checkWhetherConnectionAreAcceptable(client) )) {
+				return true;
+			}
+			
+			StaticString nodeName = args[1];
+			client->nodeName = nodeName;
+			
+			md5_state_t state;
+			md5_byte_t  digest[MD5_SIZE];
+			md5_init(&state);
+			md5_append(&state, (const md5_byte_t *) nodeName.data(), nodeName.size());
+			md5_finish(&state, digest);
+			toHex(StaticString((const char *) digest, MD5_SIZE), client->nodeId);
+			
+			client->type = LOGGER;
+			client->writeArrayMessage("ok", NULL);
+			
+		} else if (args[0] == "flush") {
+			flushAllSinks();
+			client->writeArrayMessage("ok", NULL);
+			
+		} else if (args[0] == "info") {
+			stringstream stream;
+			dump(stream);
+			client->writeArrayMessage("info", stream.str().c_str(), NULL);
+		
+		} else if (args[0] == "ping") {
+			client->writeArrayMessage("pong", NULL);
+		
+		} else if (args[0] == "exit") {
+			if (!requireRights(client, Account::EXIT)) {
+				client->disconnect();
+				return true;
+			}
+			if (args.size() == 2 && args[1] == "immediately") {
+				// Immediate exit.
+				ev_break(getLoop(), EVBREAK_ONE);
+			} else if (args.size() == 2 && args[1] == "semi-gracefully") {
+				// Semi-graceful exit: refuse new connections, shut down
+				// a few seconds after the last client has disconnected.
+				refuseNewConnections = true;
+				exitRequested = true;
+			} else {
+				// Graceful exit: shut down a few seconds after the
+				// last client has disconnected.
+				client->writeArrayMessage("Passed security", NULL);
+				client->writeArrayMessage("exit command received", NULL);
+				exitRequested = true;
+			}
+			client->disconnect();
+			
+		} else {
+			sendErrorToClient(client, "Unknown command '" + args[0] + "'");
+			client->disconnect();
+		}
+		
+		return true;
+	}
+	
+	virtual pair<size_t, bool> onOtherDataReceived(EventedMessageClient *_client,
+		const char *data, size_t size)
+	{
+		// In here we read the scalar message that's expected to come
+		// after the "log" command.
+		Client *client = (Client *) _client;
+		size_t consumed = client->dataReader.feed(data, size);
+		if (client->dataReader.done()) {
+			writeLogEntry(client,
+				client->currentTransaction,
+				client->currentTimestamp,
+				client->dataReader.value());
+			client->currentTransaction.reset();
+			client->dataReader.reset();
+			return make_pair(consumed, true);
+		} else {
+			return make_pair(consumed, false);
+		}
+	}
+	
+	virtual void onNewClient(EventedClient *client) {
+		if (exitRequested && exitTimer.is_active()) {
+			exitTimer.stop();
+		}
+		EventedMessageServer::onNewClient(client);
+	}
+	
+	virtual void onClientDisconnected(EventedClient *_client) {
+		EventedMessageServer::onClientDisconnected(_client);
+		Client *client = (Client *) _client;
+		set<string>::const_iterator sit;
+		set<string>::const_iterator send = client->openTransactions.end();
+		
+		// Close any transactions that this client had opened.
+		for (sit = client->openTransactions.begin(); sit != send; sit++) {
+			const string &txnId = *sit;
+			TransactionMap::iterator it = transactions.find(txnId);
+			if (OXT_UNLIKELY( it == transactions.end() )) {
+				P_ERROR("Bug: client->openTransactions is not a subset of this->transactions!");
+				abort();
+			}
+			
+			TransactionPtr &transaction = it->second;
+			if (transaction->crashProtect) {
+				writeDetachEntry(client, transaction);
+			} else {
+				transaction->discard();
+			}
+			transaction->refcount--;
+			assert(transaction->refcount >= 0);
+			if (transaction->refcount == 0) {
+				transactions.erase(it);
+			}
+		}
+		client->openTransactions.clear();
+		
+		// Possibly start exit timer.
+		if (exitRequested && getClients().empty()) {
+			exitTimer.start();
+			/* Using SystemTime here instead of setting a correct
+			 * timeout directly on the timer, so that we can
+			 * manipulate the clock in LoggingServer unit tests.
+			 */
+			exitBeginTime = SystemTime::getMsec();
+		}
+	}
+
+public:
+	LoggingServer(struct ev_loop *loop,
+		FileDescriptor fd,
+		const AccountsDatabasePtr &accountsDatabase,
+		const VariantMap &options = VariantMap())
+		: EventedMessageServer(loop, fd, accountsDatabase),
+		  remoteSender(
+		      options.get("union_station_gateway_address", false, DEFAULT_UNION_STATION_GATEWAY_ADDRESS),
+		      options.getInt("union_station_gateway_port", false, DEFAULT_UNION_STATION_GATEWAY_PORT),
+		      options.get("union_station_gateway_cert", false, ""),
+		      options.get("union_station_proxy_address", false)),
+		  garbageCollectionTimer(loop),
+		  sinkFlushingTimer(loop),
+		  exitTimer(loop),
+		  dumpFile(options.get("analytics_dump_file", false, "/dev/null"))
+	{
+		int sinkFlushTimerInterval = options.getInt("analytics_sink_flush_timer_interval", false, 15);
+		sinkFlushInterval = options.getInt("analytics_sink_flush_interval", false, 0);
+		garbageCollectionTimer.set<LoggingServer, &LoggingServer::garbageCollect>(this);
+		garbageCollectionTimer.start(GARBAGE_COLLECTION_TIMEOUT, GARBAGE_COLLECTION_TIMEOUT);
+		sinkFlushingTimer.set<LoggingServer, &LoggingServer::sinkFlushTimeout>(this);
+		sinkFlushingTimer.start(sinkFlushTimerInterval, sinkFlushTimerInterval);
+		exitTimer.set<LoggingServer, &LoggingServer::exitTimerTimeout>(this);
+		exitTimer.set(0.05, 0.05);
+		refuseNewConnections = false;
+		exitRequested = false;
+		inactiveLogSinksCount = 0;
+	}
+	
+	~LoggingServer() {
+		TransactionMap::iterator it, end = transactions.end();
+		for (it = transactions.begin(); it != end; it++) {
+			TransactionPtr &transaction = it->second;
+			if (transaction->crashProtect) {
+				writeDetachEntry(NULL, transaction);
+			} else {
+				transaction->discard();
+			}
+		}
+		
+		// Invoke destructors, causing all transactions and log sinks to
+		// be flushed before RemoteSender is being destroyed.
+		transactions.clear();
+		logSinkCache.clear();
+		inactiveLogSinks.clear();
+	}
+	
+	void dump(ostream &stream) const {
+		TransactionMap::const_iterator it;
+		TransactionMap::const_iterator end = transactions.end();
+		
+		stream << "Number of clients : " << getClients().size() << "\n";
+		stream << "\n";
+
+		stream << "RemoteSender:\n";
+		remoteSender.inspect(stream);
+		stream << "\n";
+
+		LogSinkCache::const_iterator sit;
+		LogSinkCache::const_iterator send = logSinkCache.end();
+		stream << "Open log sinks:\n";
+		stream << "   Count: " << logSinkCache.size() <<
+			" (of which " << inactiveLogSinksCount << " inactive)\n";
+		for (sit = logSinkCache.begin(); sit != send; sit++) {
+			const LogSinkPtr &logSink = sit->second;
+			logSink->dump(stream);
+		}
+		stream << "\n";
+
+		stream << "Open transactions:\n";
+		stream << "   Count: " << transactions.size() << "\n";
+		for (it = transactions.begin(); it != end; it++) {
+			const TransactionPtr &transaction = it->second;
+			transaction->dump(stream);
+		}
+	}
+};
+
+typedef shared_ptr<LoggingServer> LoggingServerPtr;
+
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_LOGGING_SERVER_H_ */
diff --git a/ext/common/agents/LoggingAgent/Main.cpp b/ext/common/agents/LoggingAgent/Main.cpp
new file mode 100644
index 0000000..d693450
--- /dev/null
+++ b/ext/common/agents/LoggingAgent/Main.cpp
@@ -0,0 +1,359 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#include <oxt/system_calls.hpp>
+#include <oxt/backtrace.hpp>
+#include <oxt/thread.hpp>
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <pwd.h>
+#include <grp.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cerrno>
+#include <signal.h>
+
+#include <agents/Base.h>
+#include <agents/LoggingAgent/LoggingServer.h>
+#include <agents/LoggingAgent/AdminController.h>
+
+#include <AccountsDatabase.h>
+#include <Account.h>
+#include <Exceptions.h>
+#include <ResourceLocator.h>
+#include <MessageServer.h>
+#include <Utils.h>
+#include <Utils/IOUtils.h>
+#include <Utils/MessageIO.h>
+#include <Utils/Base64.h>
+#include <Utils/VariantMap.h>
+
+using namespace oxt;
+using namespace Passenger;
+
+
+/***** Agent options *****/
+
+static VariantMap agentsOptions;
+static string passengerRoot;
+static string socketAddress;
+static string adminSocketAddress;
+static string password;
+static string username;
+static string groupname;
+static string adminToolStatusPassword;
+
+/***** Constants and working objects *****/
+
+static const int MESSAGE_SERVER_THREAD_STACK_SIZE = 128 * 1024;
+
+struct WorkingObjects {
+	ResourceLocatorPtr resourceLocator;
+	FileDescriptor serverSocketFd;
+	AccountsDatabasePtr adminAccountsDatabase;
+	MessageServerPtr adminServer;
+	shared_ptr<oxt::thread> adminServerThread;
+	AccountsDatabasePtr accountsDatabase;
+	LoggingServerPtr loggingServer;
+
+	~WorkingObjects() {
+		// Stop thread before destroying anything else.
+		if (adminServerThread != NULL) {
+			adminServerThread->interrupt_and_join();
+		}
+	}
+};
+
+static struct ev_loop *eventLoop = NULL;
+static LoggingServer *loggingServer = NULL;
+static int exitCode = 0;
+
+
+/***** Functions *****/
+
+void
+feedbackFdBecameReadable(ev::io &watcher, int revents) {
+	/* This event indicates that the watchdog has been killed.
+	 * In this case we'll kill all descendant
+	 * processes and exit. There's no point in keeping this agent
+	 * running because we can't detect when the web server exits,
+	 * and because this agent doesn't own the server instance
+	 * directory. As soon as passenger-status is run, the server
+	 * instance directory will be cleaned up, making this agent's
+	 * services inaccessible.
+	 */
+	syscalls::killpg(getpgrp(), SIGKILL);
+	_exit(2); // In case killpg() fails.
+}
+
+static string
+myself() {
+	struct passwd *entry = getpwuid(geteuid());
+	if (entry != NULL) {
+		return entry->pw_name;
+	} else {
+		throw NonExistentUserException(string("The current user, UID ") +
+			toString(geteuid()) + ", doesn't have a corresponding " +
+			"entry in the system's user database. Please fix your " +
+			"system's user database first.");
+	}
+}
+
+static void
+initializeBareEssentials(int argc, char *argv[]) {
+	agentsOptions = initializeAgent(argc, argv, "PassengerLoggingAgent");
+	curl_global_init(CURL_GLOBAL_ALL);
+}
+
+static string
+findUnionStationGatewayCert(const ResourceLocator &locator,
+	const string &cert)
+{
+	if (cert.empty()) {
+		return locator.getResourcesDir() + "/union_station_gateway.crt";
+	} else if (cert != "-") {
+		return cert;
+	} else {
+		return "";
+	}
+}
+
+static void
+initializeOptions(WorkingObjects &wo) {
+	passengerRoot      = agentsOptions.get("passenger_root");
+	socketAddress      = agentsOptions.get("logging_agent_address");
+	adminSocketAddress = agentsOptions.get("logging_agent_admin_address");
+	password           = agentsOptions.get("logging_agent_password");
+	username           = agentsOptions.get("analytics_log_user", false, myself());
+	groupname          = agentsOptions.get("analytics_log_group", false);
+	adminToolStatusPassword = agentsOptions.get("admin_tool_status_password");
+
+	wo.resourceLocator = make_shared<ResourceLocator>(passengerRoot);
+	agentsOptions.set("union_station_gateway_cert", findUnionStationGatewayCert(
+		*wo.resourceLocator, agentsOptions.get("union_station_gateway_cert", false)));
+}
+
+static void
+initializePrivilegedWorkingObjects(WorkingObjects &wo) {
+	wo.serverSocketFd = createServer(socketAddress.c_str());
+	if (getSocketAddressType(socketAddress) == SAT_UNIX) {
+		int ret;
+
+		do {
+			ret = chmod(parseUnixSocketAddress(socketAddress).c_str(),
+				S_ISVTX |
+				S_IRUSR | S_IWUSR | S_IXUSR |
+				S_IRGRP | S_IWGRP | S_IXGRP |
+				S_IROTH | S_IWOTH | S_IXOTH);
+		} while (ret == -1 && errno == EINTR);
+	}
+
+	wo.adminAccountsDatabase = make_shared<AccountsDatabase>();	
+	wo.adminAccountsDatabase->add("_passenger-status", adminToolStatusPassword, false);
+	wo.adminServer = make_shared<MessageServer>(parseUnixSocketAddress(adminSocketAddress),
+		wo.adminAccountsDatabase);
+}
+
+static void
+lowerPrivilege(const string &username, const struct passwd *user, const struct group *group) {
+	int e;
+	
+	if (initgroups(username.c_str(), group->gr_gid) != 0) {
+		e = errno;
+		P_WARN("WARNING: Unable to set supplementary groups for " <<
+			"PassengerLoggingAgent: " << strerror(e) << " (" << e << ")");
+	}
+	if (setgid(group->gr_gid) != 0) {
+		e = errno;
+		P_WARN("WARNING: Unable to lower PassengerLoggingAgent's "
+			"privilege to that of user '" << username <<
+			"': cannot set group ID to " << group->gr_gid <<
+			": " << strerror(e) <<
+			" (" << e << ")");
+	}
+	if (setuid(user->pw_uid) != 0) {
+		e = errno;
+		P_WARN("WARNING: Unable to lower PassengerLoggingAgent's "
+			"privilege to that of user '" << username <<
+			"': cannot set user ID: " << strerror(e) <<
+			" (" << e << ")");
+	}
+}
+
+static void
+maybeLowerPrivilege() {
+	struct passwd *user;
+	struct group  *group;
+
+	/* Sanity check user accounts. */
+		
+	user = getpwnam(username.c_str());
+	if (user == NULL) {
+		throw NonExistentUserException(string("The configuration option ") +
+			"'PassengerAnalyticsLogUser' (Apache) or " +
+			"'passenger_analytics_log_user' (Nginx) was set to '" +
+			username + "', but this user doesn't exist. Please fix " +
+			"the configuration option.");
+	}
+	
+	if (groupname.empty()) {
+		group = getgrgid(user->pw_gid);
+		if (group == NULL) {
+			throw NonExistentGroupException(string("The configuration option ") +
+				"'PassengerAnalyticsLogGroup' (Apache) or " +
+				"'passenger_analytics_log_group' (Nginx) wasn't set, " +
+				"so PassengerLoggingAgent tried to use the default group " +
+				"for user '" + username + "' - which is GID #" +
+				toString(user->pw_gid) + " - as the group for the analytics " +
+				"log dir, but this GID doesn't exist. " +
+				"You can solve this problem by explicitly " +
+				"setting PassengerAnalyticsLogGroup (Apache) or " +
+				"passenger_analytics_log_group (Nginx) to a group that " +
+				"does exist. In any case, it looks like your system's user " +
+				"database is broken; Phusion Passenger can work fine even " +
+				"with this broken user database, but you should still fix it.");
+		} else {
+			groupname = group->gr_name;
+		}
+	} else {
+		group = getgrnam(groupname.c_str());
+		if (group == NULL) {
+			throw NonExistentGroupException(string("The configuration option ") +
+				"'PassengerAnalyticsLogGroup' (Apache) or " +
+				"'passenger_analytics_log_group' (Nginx) was set to '" +
+				groupname + "', but this group doesn't exist. Please fix " +
+				"the configuration option.");
+		}
+	}
+
+	/* Now's a good time to lower the privilege. */
+	if (geteuid() == 0) {
+		lowerPrivilege(username, user, group);
+	}
+}
+
+static struct ev_loop *
+createEventLoop() {
+	struct ev_loop *loop;
+	
+	// libev doesn't like choosing epoll and kqueue because the author thinks they're broken,
+	// so let's try to force it.
+	loop = ev_default_loop(EVBACKEND_EPOLL);
+	if (loop == NULL) {
+		loop = ev_default_loop(EVBACKEND_KQUEUE);
+	}
+	if (loop == NULL) {
+		loop = ev_default_loop(0);
+	}
+	if (loop == NULL) {
+		throw RuntimeException("Cannot create an event loop");
+	} else {
+		return loop;
+	}
+}
+
+static void
+initializeUnprivilegedWorkingObjects(WorkingObjects &wo) {
+	eventLoop = createEventLoop();
+	wo.accountsDatabase = make_shared<AccountsDatabase>();
+	wo.accountsDatabase->add("logging", password, false);
+
+	wo.loggingServer = make_shared<LoggingServer>(eventLoop, wo.serverSocketFd,
+		wo.accountsDatabase, agentsOptions);
+	loggingServer = wo.loggingServer.get();
+
+	wo.adminServer->addHandler(make_shared<AdminController>(wo.loggingServer));
+	function<void ()> adminServerFunc = boost::bind(&MessageServer::mainLoop, wo.adminServer.get());
+	wo.adminServerThread = make_shared<oxt::thread>(
+		boost::bind(runAndPrintExceptions, adminServerFunc, true),
+		"AdminServer thread", MESSAGE_SERVER_THREAD_STACK_SIZE
+	);
+}
+
+void
+caughtExitSignal(ev::sig &watcher, int revents) {
+	P_INFO("Caught signal, exiting...");
+	ev_break(eventLoop, EVBREAK_ONE);
+	/* We only consider the "exit" command to be a graceful way to shut down
+	 * the logging agent, so upon receiving an exit signal we want to return
+	 * a non-zero exit code. This is because we want the watchdog to restart
+	 * the logging agent when it's killed by SIGTERM.
+	 */
+	exitCode = 1;
+}
+
+void
+printInfo(ev::sig &watcher, int revents) {
+	cerr << "---------- Begin LoggingAgent status ----------\n";
+	loggingServer->dump(cerr);
+	cerr.flush();
+	cerr << "---------- End LoggingAgent status   ----------\n";
+}
+
+static void
+runMainLoop(WorkingObjects &wo) {
+	ev::io feedbackFdWatcher(eventLoop);
+	ev::sig sigintWatcher(eventLoop);
+	ev::sig sigtermWatcher(eventLoop);
+	ev::sig sigquitWatcher(eventLoop);
+	
+	sigintWatcher.set<&caughtExitSignal>();
+	sigintWatcher.start(SIGINT);
+	sigtermWatcher.set<&caughtExitSignal>();
+	sigtermWatcher.start(SIGTERM);
+	sigquitWatcher.set<&printInfo>();
+	sigquitWatcher.start(SIGQUIT);
+	
+	P_WARN("PassengerLoggingAgent online, listening at " << socketAddress);
+	if (feedbackFdAvailable()) {
+		feedbackFdWatcher.set<&feedbackFdBecameReadable>();
+		feedbackFdWatcher.start(FEEDBACK_FD, ev::READ);
+		writeArrayMessage(FEEDBACK_FD, "initialized", NULL);
+	}
+	ev_run(eventLoop, 0);
+}
+
+int
+main(int argc, char *argv[]) {
+	initializeBareEssentials(argc, argv);
+	P_DEBUG("Starting PassengerLoggingAgent...");
+
+	try {
+		TRACE_POINT();
+		WorkingObjects wo;
+
+		initializeOptions(wo);
+		initializePrivilegedWorkingObjects(wo);
+		maybeLowerPrivilege();
+		initializeUnprivilegedWorkingObjects(wo);
+		runMainLoop(wo);
+		P_DEBUG("Logging agent exiting with code " << exitCode << ".");
+		return exitCode;
+	} catch (const tracable_exception &e) {
+		P_ERROR("*** ERROR: " << e.what() << "\n" << e.backtrace());
+		return 1;
+	}
+}
diff --git a/ext/common/agents/LoggingAgent/RemoteSender.h b/ext/common/agents/LoggingAgent/RemoteSender.h
new file mode 100644
index 0000000..9658a7b
--- /dev/null
+++ b/ext/common/agents/LoggingAgent/RemoteSender.h
@@ -0,0 +1,560 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#ifndef _PASSENGER_REMOTE_SENDER_H_
+#define _PASSENGER_REMOTE_SENDER_H_
+
+#include <sys/types.h>
+#include <ctime>
+#include <cassert>
+#include <curl/curl.h>
+#include <zlib.h>
+
+#include <boost/shared_ptr.hpp>
+#include <boost/bind.hpp>
+#include <boost/foreach.hpp>
+#include <oxt/thread.hpp>
+#include <string>
+#include <list>
+
+#include <Logging.h>
+#include <StaticString.h>
+#include <Utils.h>
+#include <Utils/BlockingQueue.h>
+#include <Utils/SystemTime.h>
+#include <Utils/ScopeGuard.h>
+#include <Utils/Base64.h>
+#include <Utils/Curl.h>
+
+namespace Passenger {
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+
+
+class RemoteSender {
+private:
+	struct Item {
+		bool exit;
+		bool compressed;
+		string unionStationKey;
+		string nodeName;
+		string category;
+		string data;
+		
+		Item() {
+			exit = false;
+			compressed = false;
+		}
+	};
+	
+	class Server {
+	private:
+		string ip;
+		unsigned short port;
+		string certificate;
+		const CurlProxyInfo *proxyInfo;
+		
+		CURL *curl;
+		struct curl_slist *headers;
+		char lastErrorMessage[CURL_ERROR_SIZE];
+		string hostHeader;
+		string responseBody;
+		
+		string pingURL;
+		string sinkURL;
+		
+		void resetConnection() {
+			if (curl != NULL) {
+				#ifdef HAS_CURL_EASY_RESET
+					curl_easy_reset(curl);
+				#else
+					curl_easy_cleanup(curl);
+					curl = NULL;
+				#endif
+			}
+			if (curl == NULL) {
+				curl = curl_easy_init();
+				if (curl == NULL) {
+					throw IOException("Unable to create a CURL handle");
+				}
+			}
+			curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
+			curl_easy_setopt(curl, CURLOPT_TIMEOUT, 180);
+			curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, lastErrorMessage);
+			curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
+			curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curlDataReceived);
+			curl_easy_setopt(curl, CURLOPT_WRITEDATA, this);
+			if (certificate.empty()) {
+				curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
+			} else {
+				curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1);
+				curl_easy_setopt(curl, CURLOPT_CAINFO, certificate.c_str());
+			}
+			/* No host name verification because Curl thinks the
+			 * host name is the IP address. But if we have the
+			 * certificate then it doesn't matter.
+			 */
+			curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
+			setCurlProxy(curl, *proxyInfo);
+			responseBody.clear();
+		}
+		
+		void prepareRequest(const string &url) {
+			curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
+			responseBody.clear();
+		}
+		
+		static size_t curlDataReceived(void *buffer, size_t size, size_t nmemb, void *userData) {
+			Server *self = (Server *) userData;
+			self->responseBody.append((const char *) buffer, size * nmemb);
+			return size * nmemb;
+		}
+		
+	public:
+		Server(const string &ip, const string &hostName, unsigned short port, const string &cert,
+			const CurlProxyInfo *proxyInfo)
+		{
+			this->ip = ip;
+			this->port = port;
+			certificate = cert;
+			this->proxyInfo = proxyInfo;
+			
+			hostHeader = "Host: " + hostName;
+			headers = NULL;
+			headers = curl_slist_append(headers, hostHeader.c_str());
+			if (headers == NULL) {
+				throw IOException("Unable to create a CURL linked list");
+			}
+			
+			// Older libcurl versions didn't strdup() any option 
+			// strings so we need to keep these in memory.
+			pingURL = string("https://") + ip + ":" + toString(port) +
+				"/ping";
+			sinkURL = string("https://") + ip + ":" + toString(port) +
+				"/sink";
+			
+			curl = NULL;
+			resetConnection();
+		}
+		
+		~Server() {
+			if (curl != NULL) {
+				curl_easy_cleanup(curl);
+			}
+			curl_slist_free_all(headers);
+		}
+
+		string name() const {
+			return ip + ":" + toString(port);
+		}
+		
+		bool ping() {
+			P_DEBUG("Pinging Union Station gateway " << ip << ":" << port);
+			ScopeGuard guard(boost::bind(&Server::resetConnection, this));
+			prepareRequest(pingURL);
+			
+			curl_easy_setopt(curl, CURLOPT_HTTPGET, 1);
+			if (curl_easy_perform(curl) != 0) {
+				P_DEBUG("Could not ping Union Station gateway server " << ip
+					<< ": " << lastErrorMessage);
+				return false;
+			}
+			if (responseBody == "pong") {
+				guard.clear();
+				return true;
+			} else {
+				P_DEBUG("Union Station gateway server " << ip <<
+					" returned an unexpected ping message: " <<
+					responseBody);
+				return false;
+			}
+		}
+		
+		bool send(const Item &item) {
+			ScopeGuard guard(boost::bind(&Server::resetConnection, this));
+			prepareRequest(sinkURL);
+			
+			struct curl_httppost *post = NULL;
+			struct curl_httppost *last = NULL;
+			string base64_data;
+			
+			curl_formadd(&post, &last,
+				CURLFORM_PTRNAME, "key",
+				CURLFORM_PTRCONTENTS, item.unionStationKey.c_str(),
+				CURLFORM_CONTENTSLENGTH, (long) item.unionStationKey.size(),
+				CURLFORM_END);
+			curl_formadd(&post, &last,
+				CURLFORM_PTRNAME, "node_name",
+				CURLFORM_PTRCONTENTS, item.nodeName.c_str(),
+				CURLFORM_CONTENTSLENGTH, (long) item.nodeName.size(),
+				CURLFORM_END);
+			curl_formadd(&post, &last,
+				CURLFORM_PTRNAME, "category",
+				CURLFORM_PTRCONTENTS, item.category.c_str(),
+				CURLFORM_CONTENTSLENGTH, (long) item.category.size(),
+				CURLFORM_END);
+			if (item.compressed) {
+				base64_data = Base64::encode(item.data);
+				curl_formadd(&post, &last,
+					CURLFORM_PTRNAME, "data",
+					CURLFORM_PTRCONTENTS, base64_data.c_str(),
+					CURLFORM_CONTENTSLENGTH, (long) base64_data.size(),
+					CURLFORM_END);
+				curl_formadd(&post, &last,
+					CURLFORM_PTRNAME, "compressed",
+					CURLFORM_PTRCONTENTS, "1",
+					CURLFORM_END);
+			} else {
+				curl_formadd(&post, &last,
+					CURLFORM_PTRNAME, "data",
+					CURLFORM_PTRCONTENTS, item.data.c_str(),
+					CURLFORM_CONTENTSLENGTH, (long) item.data.size(),
+					CURLFORM_END);
+			}
+			
+			curl_easy_setopt(curl, CURLOPT_HTTPGET, 0);
+			curl_easy_setopt(curl, CURLOPT_HTTPPOST, post);
+			P_DEBUG("Sending Union Station packet: key=" << item.unionStationKey <<
+				", node=" << item.nodeName << ", category=" << item.category <<
+				", compressedDataSize=" << item.data.size());
+			CURLcode code = curl_easy_perform(curl);
+			curl_formfree(post);
+			
+			if (code == CURLE_OK) {
+				guard.clear();
+				// TODO: check response
+				return true;
+			} else {
+				P_DEBUG("Could not send data to Union Station gateway server " << ip
+					<< ": " << lastErrorMessage);
+				return false;
+			}
+		}
+	};
+	
+	typedef shared_ptr<Server> ServerPtr;
+	
+	string gatewayAddress;
+	unsigned short gatewayPort;
+	string certificate;
+	CurlProxyInfo proxyInfo;
+	BlockingQueue<Item> queue;
+	oxt::thread *thr;
+	
+	mutable boost::mutex syncher;
+	list<ServerPtr> servers;
+	time_t nextCheckupTime;
+	unsigned int packetsSent, packetsDropped;
+	
+	void threadMain() {
+		ScopeGuard guard(boost::bind(&RemoteSender::freeThreadData, this));
+		
+		while (true) {
+			Item item;
+			bool hasItem;
+			
+			if (firstStarted()) {
+				item = queue.get();
+				hasItem = true;
+			} else {
+				hasItem = queue.timedGet(item, msecUntilNextCheckup());
+			}
+			
+			if (hasItem) {
+				if (item.exit) {
+					return;
+				} else {
+					if (timeForCheckup()) {
+						recheckServers();
+					}
+					sendOut(item);
+				}
+			} else if (timeForCheckup()) {
+				recheckServers();
+			}
+		}
+	}
+	
+	bool firstStarted() const {
+		boost::lock_guard<boost::mutex> l(syncher);
+		return nextCheckupTime == 0;
+	}
+	
+	void recheckServers() {
+		P_INFO("Rechecking Union Station gateway servers (" << gatewayAddress << ")...");
+		
+		vector<string> ips;
+		vector<string>::const_iterator it;
+		list<ServerPtr> servers;
+		string hostName;
+		bool someServersAreDown = false;
+		
+		ips = resolveHostname(gatewayAddress, gatewayPort);
+		P_INFO(ips.size() << " Union Station gateway servers found");
+		
+		for (it = ips.begin(); it != ips.end(); it++) {
+			ServerPtr server = make_shared<Server>(*it, gatewayAddress, gatewayPort,
+				certificate, &proxyInfo);
+			if (server->ping()) {
+				servers.push_back(server);
+			} else {
+				someServersAreDown = true;
+			}
+		}
+		P_INFO(servers.size() << " Union Station gateway servers are up");
+		
+		if (servers.empty()) {
+			scheduleNextCheckup(5 * 60);
+		} else if (someServersAreDown) {
+			scheduleNextCheckup(60 * 60);
+		} else {
+			scheduleNextCheckup(3 * 60 * 60);
+		}
+
+		boost::lock_guard<boost::mutex> l(syncher);
+		this->servers = servers;
+	}
+	
+	void freeThreadData() {
+		boost::lock_guard<boost::mutex> l(syncher);
+		servers.clear(); // Invoke destructors inside this thread.
+	}
+	
+	/**
+	 * Schedules the next checkup to be run after the given number
+	 * of seconds, unless there's already a checkup scheduled for
+	 * earlier.
+	 */
+	void scheduleNextCheckup(unsigned int seconds) {
+		time_t now = SystemTime::get();
+		if (now >= nextCheckupTime || (time_t) (now + seconds) < nextCheckupTime) {
+			nextCheckupTime = now + seconds;
+			P_DEBUG("Next checkup time in about " << seconds << " seconds");
+		}
+	}
+	
+	unsigned int msecUntilNextCheckup() const {
+		boost::lock_guard<boost::mutex> l(syncher);
+		time_t now = SystemTime::get();
+		if (now >= nextCheckupTime) {
+			return 0;
+		} else {
+			return (nextCheckupTime - now) * 1000;
+		}
+	}
+	
+	bool timeForCheckup() const {
+		boost::lock_guard<boost::mutex> l(syncher);
+		return SystemTime::get() >= nextCheckupTime;
+	}
+	
+	void sendOut(const Item &item) {
+		unique_lock<boost::mutex> l(syncher);
+		bool sent = false;
+		bool someServersWentDown = false;
+		
+		while (!sent && !servers.empty()) {
+			// Pick first available server and put it on the back of the list
+			// for round-robin load balancing.
+			ServerPtr server = servers.front();
+			l.unlock();
+			if (server->send(item)) {
+				l.lock();
+				servers.pop_front();
+				servers.push_back(server);
+				sent = true;
+				packetsSent++;
+			} else {
+				l.lock();
+				servers.pop_front();
+				someServersWentDown = true;
+				packetsDropped++;
+			}
+		}
+		
+		if (someServersWentDown) {
+			if (servers.empty()) {
+				scheduleNextCheckup(5 * 60);
+			} else {
+				scheduleNextCheckup(60 * 60);
+			}
+		}
+		
+		/* If all servers went down then all items in the queue will be
+		 * effectively dropped until after the next checkup has detected
+		 * servers that are up.
+		 */
+		if (!sent) {
+			P_WARN("Dropping Union Station packet because no servers are available: "
+				"key=" << item.unionStationKey <<
+				", node=" << item.nodeName <<
+				", category=" << item.category <<
+				", compressedDataSize=" << item.data.size());
+		}
+	}
+	
+	bool compress(const StaticString data[], unsigned int count, string &output) {
+		if (count == 0) {
+			StaticString newdata;
+			return compress(&newdata, 1, output);
+		}
+		
+		unsigned char out[128 * 1024];
+		z_stream strm;
+		int ret, flush;
+		unsigned int i, have;
+		
+		strm.zalloc = Z_NULL;
+		strm.zfree  = Z_NULL;
+		strm.opaque = Z_NULL;
+		ret = deflateInit(&strm, Z_DEFAULT_COMPRESSION);
+		if (ret != Z_OK) {
+			return false;
+		}
+		
+		for (i = 0; i < count; i++) {
+			strm.avail_in = data[i].size();
+			strm.next_in  = (unsigned char *) data[i].c_str();
+			flush = (i == count - 1) ? Z_FINISH : Z_NO_FLUSH;
+			
+			do {
+				strm.avail_out = sizeof(out);
+				strm.next_out  = out;
+				ret = deflate(&strm, flush);
+				assert(ret != Z_STREAM_ERROR);
+				have = sizeof(out) - strm.avail_out;
+				output.append((const char *) out, have);
+			} while (strm.avail_out == 0);
+			assert(strm.avail_in == 0);
+		}
+		assert(ret == Z_STREAM_END);
+		
+		deflateEnd(&strm);
+		return true;
+	}
+	
+public:
+	RemoteSender(const string &gatewayAddress, unsigned short gatewayPort, const string &certificate,
+		const string &proxyAddress)
+		: queue(1024)
+	{
+		TRACE_POINT();
+		this->gatewayAddress = gatewayAddress;
+		this->gatewayPort = gatewayPort;
+		this->certificate = certificate;
+		try {
+			this->proxyInfo = prepareCurlProxy(proxyAddress);
+		} catch (const ArgumentException &e) {
+			throw RuntimeException("Invalid Union Station proxy address \"" +
+				proxyAddress + "\": " + e.what());
+		}
+		nextCheckupTime = 0;
+		packetsSent = 0;
+		packetsDropped = 0;
+		thr = new oxt::thread(
+			boost::bind(&RemoteSender::threadMain, this),
+			"RemoteSender thread",
+			1024 * 512
+		);
+	}
+	
+	~RemoteSender() {
+		Item item;
+		item.exit = true;
+		queue.add(item);
+		/* Wait until the thread sends out all queued items.
+		 * If this cannot be done within a short amount of time,
+		 * e.g. because all servers are down, then we'll get killed
+		 * by the watchdog anyway.
+		 */
+		thr->join();
+		delete thr;
+	}
+	
+	void schedule(const string &unionStationKey, const StaticString &nodeName,
+		const StaticString &category, const StaticString data[],
+		unsigned int count)
+	{
+		Item item;
+
+		item.unionStationKey = unionStationKey;
+		item.nodeName = nodeName;
+		item.category = category;
+		
+		if (compress(data, count, item.data)) {
+			item.compressed = true;
+		} else {
+			size_t size = 0;
+			unsigned int i;
+			
+			for (i = 0; i < count; i++) {
+				size += data[i].size();
+			}
+			item.data.reserve(size);
+			for (i = 0; i < count; i++) {
+				item.data.append(data[i].c_str(), data[i].size());
+			}
+		}
+		
+		P_DEBUG("Scheduling Union Station packet: key=" << unionStationKey <<
+			", node=" << nodeName << ", category=" << category <<
+			", compressedDataSize=" << item.data.size());
+
+		if (!queue.tryAdd(item)) {
+			P_WARN("The Union Station gateway isn't responding quickly enough; dropping packet.");
+			boost::lock_guard<boost::mutex> l(syncher);
+			packetsDropped++;
+		}
+	}
+	
+	unsigned int queued() const {
+		return queue.size();
+	}
+
+	template<typename Stream>
+	void inspect(Stream &stream) const {
+		boost::lock_guard<boost::mutex> l(syncher);
+		stream << "  Available servers (" << servers.size() << "): ";
+		foreach (const ServerPtr server, servers) {
+			stream << server->name() << " ";
+		}
+		stream << "\n";
+		stream << "  Items in queue: " << queue.size() << "\n";
+		stream << "  Packets sent out so far: " << packetsSent << "\n";
+		stream << "  Packets dropped out so far: " << packetsDropped << "\n";
+		stream << "  Next server checkup time: ";
+		if (nextCheckupTime == 0) {
+			stream << "not yet scheduled, waiting for first packet\n";
+		} else {
+			stream << "in " << distanceOfTimeInWords(nextCheckupTime) << "\n";
+		}
+	}
+};
+
+
+} // namespace Passenger
+
+#endif /* _PASSENGER_REMOTE_SENDER_H_ */
diff --git a/ext/common/agents/SpawnPreparer.cpp b/ext/common/agents/SpawnPreparer.cpp
new file mode 100644
index 0000000..7f5a111
--- /dev/null
+++ b/ext/common/agents/SpawnPreparer.cpp
@@ -0,0 +1,192 @@
+/*
+ * Sets given environment variables, dumps the entire environment to
+ * a given file (for diagnostics purposes), then execs the given command.
+ *
+ * This is a separate executable because it does quite
+ * some non-async-signal-safe stuff that we can't do after
+ * fork()ing from the Spawner and before exec()ing.
+ */
+
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cerrno>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <string>
+#include <Utils/Base64.h>
+
+using namespace std;
+using namespace Passenger;
+
+extern "C" {
+	extern char **environ;
+}
+
+static void
+changeWorkingDir(const char *dir) {
+	int ret = chdir(dir);
+	if (ret == 0) {
+		setenv("PWD", dir, 1);
+	} else {
+		int e = errno;
+		printf("!> Error\n");
+		printf("!> \n");
+		printf("Unable to change working directory to '%s': %s (errno=%d)\n",
+			dir, strerror(e), e);
+		fflush(stdout);
+		exit(1);
+	}
+}
+
+static void
+setGivenEnvVars(const char *envvarsData) {
+	string envvars = Base64::decode(envvarsData);
+	const char *key = envvars.data();
+	const char *end = envvars.data() + envvars.size();
+	
+	while (key < end) {
+		const char *keyEnd = (const char *) memchr(key, '\0', end - key);
+		if (keyEnd != NULL) {
+			const char *value = keyEnd + 1;
+			if (value < end) {
+				const char *valueEnd = (const char *) memchr(value, '\0', end - value);
+				if (valueEnd != NULL) {
+					setenv(key, value, 1);
+					key = valueEnd + 1;
+				} else {
+					break;
+				}
+			} else {
+				break;
+			}
+		} else {
+			break;
+		}
+	}
+}
+
+static void
+dumpInformation() {
+	const char *c_dir;
+	if ((c_dir = getenv("PASSENGER_DEBUG_DIR")) == NULL) {
+		return;
+	}
+
+	FILE *f;
+	string dir = c_dir;
+
+	f = fopen((dir + "/envvars").c_str(), "w");
+	if (f != NULL) {
+		int i = 0;
+		while (environ[i] != NULL) {
+			fputs(environ[i], f);
+			putc('\n', f);
+			i++;
+		}
+		fclose(f);
+	}
+
+	f = fopen((dir + "/user_info").c_str(), "w");
+	if (f != NULL) {
+		pid_t pid = fork();
+		if (pid == 0) {
+			dup2(fileno(f), 1);
+			execlp("id", "id", (char *) 0);
+			_exit(1);
+		} else if (pid == -1) {
+			int e = errno;
+			fprintf(stderr, "Error: cannot fork a new process: %s (errno=%d)\n",
+				strerror(e), e);
+		} else {
+			waitpid(pid, NULL, 0);
+		}
+		fclose(f);
+	}
+
+	f = fopen((dir + "/ulimit").c_str(), "w");
+	if (f != NULL) {
+		pid_t pid = fork();
+		if (pid == 0) {
+			dup2(fileno(f), 1);
+			execlp("ulimit", "ulimit", "-a", (char *) 0);
+			_exit(1);
+		} else if (pid == -1) {
+			int e = errno;
+			fprintf(stderr, "Error: cannot fork a new process: %s (errno=%d)\n",
+				strerror(e), e);
+		} else {
+			waitpid(pid, NULL, 0);
+		}
+		fclose(f);
+	}
+
+	f = fopen((dir + "/ulimit").c_str(), "w");
+	if (f != NULL) {
+		pid_t pid = fork();
+		if (pid == 0) {
+			dup2(fileno(f), 1);
+			execlp("ulimit", "ulimit", "-a", (char *) 0);
+			_exit(1);
+		} else if (pid == -1) {
+			int e = errno;
+			fprintf(stderr, "Error: cannot fork a new process: %s (errno=%d)\n",
+				strerror(e), e);
+		} else {
+			waitpid(pid, NULL, 0);
+		}
+		fclose(f);
+	}
+
+	#ifdef __linux__
+		// TODO: call helper-scripts/system-memory-stats.py
+		f = fopen((dir + "/sysmemory").c_str(), "w");
+		if (f != NULL) {
+			pid_t pid = fork();
+			if (pid == 0) {
+				dup2(fileno(f), 1);
+				execlp("free", "free", "-m", (char *) 0);
+				_exit(1);
+			} else if (pid == -1) {
+				int e = errno;
+				fprintf(stderr, "Error: cannot fork a new process: %s (errno=%d)\n",
+					strerror(e), e);
+			} else {
+				waitpid(pid, NULL, 0);
+			}
+			fclose(f);
+		}
+	#endif
+}
+
+// Usage: SpawnPreparer <working directory> <envvars> <executable> <exec args...>
+int
+main(int argc, char *argv[]) {
+	if (argc < 5) {
+		fprintf(stderr, "Too few arguments.\n");
+		exit(1);
+	}
+	
+	const char *workingDir = argv[1];
+	const char *envvars = argv[2];
+	const char *executable = argv[3];
+	char **execArgs = &argv[4];
+	
+	changeWorkingDir(workingDir);
+	setGivenEnvVars(envvars);
+	dumpInformation();
+	
+	// Print a newline just in case whatever executed us printed data
+	// without a newline. Otherwise the next process's "!> I have control"
+	// command will not be properly recognized.
+	// https://code.google.com/p/phusion-passenger/issues/detail?id=842#c16
+	printf("\n");
+	fflush(stdout);
+
+	execvp(executable, (char * const *) execArgs);
+	int e = errno;
+	fprintf(stderr, "*** ERROR ***: Cannot execute %s: %s (%d)\n",
+		executable, strerror(e), e);
+	return 1;
+}
diff --git a/ext/common/agents/Watchdog/AgentWatcher.cpp b/ext/common/agents/Watchdog/AgentWatcher.cpp
new file mode 100644
index 0000000..f5c39b2
--- /dev/null
+++ b/ext/common/agents/Watchdog/AgentWatcher.cpp
@@ -0,0 +1,511 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+
+/**
+ * Abstract base class for watching agent processes.
+ */
+class AgentWatcher: public enable_shared_from_this<AgentWatcher> {
+private:
+	/** The watcher thread. */
+	oxt::thread *thr;
+	
+	void threadMain(shared_ptr<AgentWatcher> self) {
+		try {
+			pid_t pid, ret;
+			int status, e;
+			
+			while (!this_thread::interruption_requested()) {
+				{
+					boost::lock_guard<boost::mutex> l(lock);
+					pid = this->pid;
+				}
+				
+				// Process can be started before the watcher thread is launched.
+				if (pid == 0) {
+					pid = start();
+				}
+				ret = syscalls::waitpid(pid, &status, 0);
+				if (ret == -1 && errno == ECHILD) {
+					/* If the agent is attached to gdb then waitpid()
+					 * here can return -1 with errno == ECHILD.
+					 * Fallback to kill() polling for checking
+					 * whether the agent is alive.
+					 */
+					ret = pid;
+					status = 0;
+					P_WARN("waitpid() on " << name() << " (pid=" << pid <<
+						") returned -1 with " <<
+						"errno = ECHILD, falling back to kill polling");
+					waitpidUsingKillPolling(pid);
+					e = 0;
+				} else {
+					e = errno;
+				}
+				
+				{
+					boost::lock_guard<boost::mutex> l(lock);
+					this->pid = 0;
+				}
+				
+				this_thread::disable_interruption di;
+				this_thread::disable_syscall_interruption dsi;
+				if (ret == -1) {
+					P_WARN(name() << " (pid=" << pid << ") crashed or killed for "
+						"an unknown reason (errno = " <<
+						strerror(e) << "), restarting it...");
+				} else if (WIFEXITED(status)) {
+					if (WEXITSTATUS(status) == 0) {
+						/* When the web server is gracefully exiting, it will
+						 * tell one or more agents to gracefully exit with exit
+						 * status 0. If we see this then it means the watchdog
+						 * is gracefully shutting down too and we should stop
+						 * watching.
+						 */
+						return;
+					} else {
+						P_WARN(name() << " (pid=" << pid <<
+							") crashed with exit status " <<
+							WEXITSTATUS(status) << ", restarting it...");
+					}
+				} else {
+					P_WARN(name() << " (pid=" << pid <<
+						") crashed with signal " <<
+						getSignalName(WTERMSIG(status)) <<
+						", restarting it...");
+				}
+
+				const char *sleepTime;
+				if ((sleepTime = getenv("PASSENGER_AGENT_RESTART_SLEEP")) != NULL) {
+					sleep(atoi(sleepTime));
+				}
+			}
+		} catch (const boost::thread_interrupted &) {
+		} catch (const tracable_exception &e) {
+			boost::lock_guard<boost::mutex> l(lock);
+			threadExceptionMessage = e.what();
+			threadExceptionBacktrace = e.backtrace();
+			wo->errorEvent.notify();
+		} catch (const std::exception &e) {
+			boost::lock_guard<boost::mutex> l(lock);
+			threadExceptionMessage = e.what();
+			wo->errorEvent.notify();
+		} catch (...) {
+			boost::lock_guard<boost::mutex> l(lock);
+			threadExceptionMessage = "Unknown error";
+			wo->errorEvent.notify();
+		}
+	}
+	
+protected:
+	/** PID of the process we're watching. 0 if no process is started at this time. */
+	pid_t pid;
+	
+	/** If the watcher thread threw an uncaught exception then its information will
+	 * be stored here so that the main thread can check whether a watcher encountered
+	 * an error. These are empty strings if everything is OK.
+	 */
+	string threadExceptionMessage;
+	string threadExceptionBacktrace;
+	
+	/** The agent process's feedback fd. */
+	FileDescriptor feedbackFd;
+	
+	/**
+	 * Lock for protecting the exchange of data between the main thread and
+	 * the watcher thread.
+	 */
+	mutable boost::mutex lock;
+
+	WorkingObjectsPtr wo;
+	
+	/**
+	 * Returns the filename of the agent process's executable. This method may be
+	 * called in a forked child process and may therefore not allocate memory.
+	 */
+	virtual string getExeFilename() const = 0;
+	
+	/**
+	 * This method is to exec() the agent with the right arguments.
+	 * It is called from within a forked child process, so don't do any dynamic
+	 * memory allocations in here. It must also not throw any exceptions.
+	 * It must also preserve the value of errno after exec() is called.
+	 */
+	virtual void execProgram() const {
+		execl(getExeFilename().c_str(),
+			getExeFilename().c_str(),
+			"3",  // feedback fd
+			(char *) 0);
+	}
+	
+	/**
+	 * This method is to send startup arguments to the agent process through
+	 * the given file descriptor, which is the agent process's feedback fd.
+	 * May throw arbitrary exceptions.
+	 */
+	virtual void sendStartupArguments(pid_t pid, FileDescriptor &fd) = 0;
+	
+	/**
+	 * This method is to process the startup info that the agent process has
+	 * sent back. May throw arbitrary exceptions.
+	 */
+	virtual bool processStartupInfo(pid_t pid, FileDescriptor &fd, const vector<string> &args) = 0;
+	
+	/**
+	 * Kill a process with SIGKILL, and attempt to kill its children too. 
+	 * Then wait until it has quit.
+	 */
+	static void killAndWait(pid_t pid) {
+		this_thread::disable_interruption di;
+		this_thread::disable_syscall_interruption dsi;
+		// If the process is a process group leader then killing the
+		// group will likely kill all its child processes too.
+		if (syscalls::killpg(pid, SIGKILL) == -1) {
+			syscalls::kill(pid, SIGKILL);
+		}
+		syscalls::waitpid(pid, NULL, 0);
+	}
+	
+	/**
+	 * Behaves like <tt>waitpid(pid, status, WNOHANG)</tt>, but waits at most
+	 * <em>timeout</em> miliseconds for the process to exit.
+	 */
+	static int timedWaitPid(pid_t pid, int *status, unsigned long long timeout) {
+		Timer timer;
+		int ret;
+		
+		do {
+			ret = syscalls::waitpid(pid, status, WNOHANG);
+			if (ret > 0 || ret == -1) {
+				return ret;
+			} else {
+				syscalls::usleep(10000);
+			}
+		} while (timer.elapsed() < timeout);
+		return 0; // timed out
+	}
+	
+	static void waitpidUsingKillPolling(pid_t pid) {
+		bool done = false;
+		
+		while (!done) {
+			int ret = syscalls::kill(pid, 0);
+			done = ret == -1;
+			if (!done) {
+				syscalls::usleep(20000);
+			}
+		}
+	}
+	
+public:
+	AgentWatcher(const WorkingObjectsPtr &wo) {
+		thr = NULL;
+		pid = 0;
+		this->wo = wo;
+	}
+	
+	virtual ~AgentWatcher() {
+		delete thr;
+	}
+	
+	/**
+	 * Store information about the started agent process in the given report object.
+	 * May throw arbitrary exceptions.
+	 *
+	 * @pre start() has been called and succeeded.
+	 */
+	virtual void reportAgentsInformation(VariantMap &report) = 0;
+	
+	/** Returns the name of the agent that this class is watching. */
+	virtual const char *name() const = 0;
+	
+	/**
+	 * Starts the agent process. May throw arbitrary exceptions.
+	 */
+	virtual pid_t start() {
+		this_thread::disable_interruption di;
+		this_thread::disable_syscall_interruption dsi;
+		string exeFilename = getExeFilename();
+		SocketPair fds;
+		int e, ret;
+		pid_t pid;
+		
+		/* Create feedback fd for this agent process. We'll send some startup
+		 * arguments to this agent process through this fd, and we'll receive
+		 * startup information through it as well.
+		 */
+		fds = createUnixSocketPair();
+		
+		pid = syscalls::fork();
+		if (pid == 0) {
+			// Child
+			
+			/* Make sure file descriptor FEEDBACK_FD refers to the newly created
+			 * feedback fd (fds[1]) and close all other file descriptors.
+			 * In this child process we don't care about the original FEEDBACK_FD
+			 * (which is the Watchdog's communication channel to the agents starter.)
+			 *
+			 * fds[1] is guaranteed to be != FEEDBACK_FD because the watchdog
+			 * is started with FEEDBACK_FD already assigned.
+			 */
+			syscalls::close(fds[0]);
+			
+			if (syscalls::dup2(fds[1], FEEDBACK_FD) == -1) {
+				/* Something went wrong, report error through feedback fd. */
+				e = errno;
+				try {
+					writeArrayMessage(fds[1],
+						"system error before exec",
+						"dup2() failed",
+						toString(e).c_str(),
+						NULL);
+					_exit(1);
+				} catch (...) {
+					fprintf(stderr, "Passenger Watchdog: dup2() failed: %s (%d)\n",
+						strerror(e), e);
+					fflush(stderr);
+					_exit(1);
+				}
+			}
+			
+			closeAllFileDescriptors(FEEDBACK_FD);
+			
+			/* Become the process group leader so that the watchdog can kill the
+			 * agent as well as all its descendant processes. */
+			setpgid(getpid(), getpid());
+			
+			setOomScore(oldOomScore);
+			
+			try {
+				execProgram();
+			} catch (...) {
+				fprintf(stderr, "PassengerWatchdog: execProgram() threw an exception\n");
+				fflush(stderr);
+				_exit(1);
+			}
+			e = errno;
+			try {
+				writeArrayMessage(FEEDBACK_FD,
+					"exec error",
+					toString(e).c_str(),
+					NULL);
+			} catch (...) {
+				fprintf(stderr, "Passenger Watchdog: could not execute %s: %s (%d)\n",
+					exeFilename.c_str(), strerror(e), e);
+				fflush(stderr);
+			}
+			_exit(1);
+		} else if (pid == -1) {
+			// Error
+			e = errno;
+			throw SystemException("Cannot fork a new process", e);
+		} else {
+			// Parent
+			FileDescriptor feedbackFd = fds[0];
+			vector<string> args;
+			
+			fds[1].close();
+			this_thread::restore_interruption ri(di);
+			this_thread::restore_syscall_interruption rsi(dsi);
+			ScopeGuard failGuard(boost::bind(killAndWait, pid));
+			
+			/* Send startup arguments. Ignore EPIPE and ECONNRESET here
+			 * because the child process might have sent an feedback message
+			 * without reading startup arguments.
+			 */
+			try {
+				sendStartupArguments(pid, feedbackFd);
+			} catch (const SystemException &ex) {
+				if (ex.code() != EPIPE && ex.code() != ECONNRESET) {
+					throw SystemException(string("Unable to start the ") + name() +
+						": an error occurred while sending startup arguments",
+						ex.code());
+				}
+			}
+			
+			// Now read its feedback.
+			try {
+				ret = readArrayMessage(feedbackFd, args);
+			} catch (const SystemException &e) {
+				if (e.code() == ECONNRESET) {
+					ret = false;
+				} else {
+					throw SystemException(string("Unable to start the ") + name() +
+						": unable to read its startup information",
+						e.code());
+				}
+			}
+			if (!ret) {
+				this_thread::disable_interruption di2;
+				this_thread::disable_syscall_interruption dsi2;
+				int status;
+				
+				/* The feedback fd was prematurely closed for an unknown reason.
+				 * Did the agent process crash?
+				 *
+				 * We use timedWaitPid() here because if the process crashed
+				 * because of an uncaught exception, the file descriptor
+				 * might be closed before the process has printed an error
+				 * message, so we give it some time to print the error
+				 * before we kill it.
+				 */
+				ret = timedWaitPid(pid, &status, 5000);
+				if (ret == 0) {
+					/* Doesn't look like it; it seems it's still running.
+					 * We can't do anything without proper feedback so kill
+					 * the agent process and throw an exception.
+					 */
+					failGuard.runNow();
+					throw RuntimeException(string("Unable to start the ") + name() +
+						": it froze and reported an unknown error during its startup");
+				} else if (ret != -1 && WIFSIGNALED(status)) {
+					/* Looks like a crash which caused a signal. */
+					throw RuntimeException(string("Unable to start the ") + name() +
+						": it seems to have been killed with signal " +
+						getSignalName(WTERMSIG(status)) + " during startup");
+				} else if (ret == -1) {
+					/* Looks like it exited after detecting an error. */
+					throw RuntimeException(string("Unable to start the ") + name() +
+						": it seems to have crashed during startup for an unknown reason");
+				} else {
+					/* Looks like it exited after detecting an error, but has an exit code. */
+					throw RuntimeException(string("Unable to start the ") + name() +
+						": it seems to have crashed during startup for an unknown reason, "
+						"with exit code " + toString(WEXITSTATUS(status)));
+				}
+			}
+			
+			if (args[0] == "system error before exec") {
+				throw SystemException(string("Unable to start the ") + name() +
+					": " + args[1], atoi(args[2]));
+			} else if (args[0] == "exec error") {
+				e = atoi(args[1]);
+				if (e == ENOENT) {
+					throw RuntimeException(string("Unable to start the ") + name() +
+						" because its executable (" + getExeFilename() + ") "
+						"doesn't exist. This probably means that your "
+						"Phusion Passenger installation is broken or "
+						"incomplete. Please reinstall Phusion Passenger");
+				} else {
+					throw SystemException(string("Unable to start the ") + name() +
+						" because exec(\"" + getExeFilename() + "\") failed",
+						atoi(args[1]));
+				}
+			} else if (!processStartupInfo(pid, feedbackFd, args)) {
+				throw RuntimeException(string("The ") + name() +
+					" sent an unknown startup info message '" +
+					args[0] + "'");
+			}
+			
+			boost::lock_guard<boost::mutex> l(lock);
+			this->feedbackFd = feedbackFd;
+			this->pid = pid;
+			failGuard.clear();
+			return pid;
+		}
+	}
+	
+	/**
+	 * Begin watching the agent process.
+	 *
+	 * @pre start() has been called and succeeded.
+	 * @pre This watcher isn't already watching.
+	 * @throws RuntimeException If a precondition failed.
+	 * @throws thread_interrupted
+	 * @throws thread_resource_error
+	 */
+	virtual void beginWatching() {
+		boost::lock_guard<boost::mutex> l(lock);
+		if (pid == 0) {
+			throw RuntimeException("start() hasn't been called yet");
+		}
+		if (thr != NULL) {
+			throw RuntimeException("Already started watching.");
+		}
+		
+		thr = new oxt::thread(boost::bind(&AgentWatcher::threadMain, this, shared_from_this()),
+			name(), 256 * 1024);
+	}
+	
+	static void stopWatching(vector< shared_ptr<AgentWatcher> > &watchers) {
+		vector< shared_ptr<AgentWatcher> >::const_iterator it;
+		oxt::thread *threads[watchers.size()];
+		unsigned int i = 0;
+		
+		for (it = watchers.begin(); it != watchers.end(); it++, i++) {
+			threads[i] = (*it)->thr;
+		}
+		
+		oxt::thread::interrupt_and_join_multiple(threads, watchers.size());
+		for (it = watchers.begin(); it != watchers.end(); it++, i++) {
+			delete (*it)->thr;
+			(*it)->thr = NULL;
+		}
+	}
+	
+	/**
+	 * Force the agent process to shut down. Returns true if it was shut down,
+	 * or false if it wasn't started.
+	 */
+	virtual bool forceShutdown() {
+		boost::lock_guard<boost::mutex> l(lock);
+		if (pid == 0) {
+			return false;
+		} else {
+			killAndWait(pid);
+			this->pid = 0;
+			return true;
+		}
+	}
+	
+	/**
+	 * If the watcher thread has encountered an error, then the error message
+	 * will be stored here. If the error message is empty then it means
+	 * everything is still OK.
+	 */
+	string getErrorMessage() const {
+		boost::lock_guard<boost::mutex> l(lock);
+		return threadExceptionMessage;
+	}
+	
+	/**
+	 * The error backtrace, if applicable.
+	 */
+	string getErrorBacktrace() const {
+		boost::lock_guard<boost::mutex> l(lock);
+		return threadExceptionBacktrace;
+	}
+	
+	/**
+	 * Returns the agent process feedback fd, or -1 if the agent process
+	 * hasn't been started yet. Can be used to check whether this agent process
+	 * has exited without using waitpid().
+	 */
+	const FileDescriptor getFeedbackFd() const {
+		boost::lock_guard<boost::mutex> l(lock);
+		return feedbackFd;
+	}
+};
+
+typedef shared_ptr<AgentWatcher> AgentWatcherPtr;
diff --git a/ext/common/agents/Watchdog/HelperAgentWatcher.cpp b/ext/common/agents/Watchdog/HelperAgentWatcher.cpp
new file mode 100644
index 0000000..7e6c102
--- /dev/null
+++ b/ext/common/agents/Watchdog/HelperAgentWatcher.cpp
@@ -0,0 +1,95 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+
+class HelperAgentWatcher: public AgentWatcher {
+protected:
+	string helperAgentFilename;
+	VariantMap params, report;
+	string requestSocketFilename;
+	string messageSocketFilename;
+	
+	virtual const char *name() const {
+		return "Phusion Passenger helper agent";
+	}
+	
+	virtual string getExeFilename() const {
+		return helperAgentFilename;
+	}
+	
+	virtual void execProgram() const {
+		if (hasEnvOption("PASSENGER_RUN_HELPER_AGENT_IN_VALGRIND", false)) {
+			execlp("valgrind", "valgrind", "--dsymutil=yes",
+				helperAgentFilename.c_str(), (char *) 0);
+		} else {
+			execl(helperAgentFilename.c_str(), "PassengerHelperAgent", (char *) 0);
+		}
+	}
+	
+	virtual void sendStartupArguments(pid_t pid, FileDescriptor &fd) {
+		VariantMap options = agentsOptions;
+		params.addTo(options);
+		options.writeToFd(fd);
+	}
+	
+	virtual bool processStartupInfo(pid_t pid, FileDescriptor &fd, const vector<string> &args) {
+		if (args[0] == "initialized") {
+			requestSocketFilename = args[1];
+			messageSocketFilename = args[2];
+			return true;
+		} else {
+			return false;
+		}
+	}
+	
+public:
+	HelperAgentWatcher(const WorkingObjectsPtr &wo)
+		: AgentWatcher(wo)
+	{
+		helperAgentFilename = wo->resourceLocator->getAgentsDir() + "/PassengerHelperAgent";
+
+		report
+			.set("request_socket_filename",
+				agentsOptions.get("request_socket_filename", false,
+					wo->generation->getPath() + "/request"))
+			.set("request_socket_password",
+				agentsOptions.get("request_socket_password", false,
+					wo->randomGenerator.generateAsciiString(REQUEST_SOCKET_PASSWORD_SIZE)))
+			.set("helper_agent_admin_socket_address",
+				agentsOptions.get("helper_agent_admin_socket_address", false,
+					"unix:" + wo->generation->getPath() + "/helper_admin"))
+			.set("helper_agent_exit_password",
+				agentsOptions.get("helper_agent_exit_password", false,
+					wo->randomGenerator.generateAsciiString(MESSAGE_SERVER_MAX_PASSWORD_SIZE)));
+
+		params = report;
+		params
+			.set("logging_agent_address", wo->loggingAgentAddress)
+			.set("logging_agent_password", wo->loggingAgentPassword);
+	}
+	
+	virtual void reportAgentsInformation(VariantMap &report) {
+		this->report.addTo(report);
+	}
+};
diff --git a/ext/common/agents/Watchdog/LoggingAgentWatcher.cpp b/ext/common/agents/Watchdog/LoggingAgentWatcher.cpp
new file mode 100644
index 0000000..cde3d9d
--- /dev/null
+++ b/ext/common/agents/Watchdog/LoggingAgentWatcher.cpp
@@ -0,0 +1,72 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+
+class LoggingAgentWatcher: public AgentWatcher {
+protected:
+	string agentFilename;
+	string socketAddress;
+	
+	virtual const char *name() const {
+		return "Phusion Passenger logging agent";
+	}
+	
+	virtual string getExeFilename() const {
+		return agentFilename;
+	}
+	
+	virtual void execProgram() const {
+		execl(agentFilename.c_str(), "PassengerLoggingAgent", (char *) 0);
+	}
+	
+	virtual void sendStartupArguments(pid_t pid, FileDescriptor &fd) {
+		VariantMap options = agentsOptions;
+		options.set("logging_agent_address", wo->loggingAgentAddress);
+		options.set("logging_agent_password", wo->loggingAgentPassword);
+		options.set("logging_agent_admin_address", wo->loggingAgentAdminAddress);
+		options.writeToFd(fd);
+	}
+	
+	virtual bool processStartupInfo(pid_t pid, FileDescriptor &fd, const vector<string> &args) {
+		if (args[0] == "initialized") {
+			return true;
+		} else {
+			return false;
+		}
+	}
+	
+public:
+	LoggingAgentWatcher(const WorkingObjectsPtr &wo)
+		: AgentWatcher(wo)
+	{
+		agentFilename = wo->resourceLocator->getAgentsDir() + "/PassengerLoggingAgent";
+	}
+	
+	virtual void reportAgentsInformation(VariantMap &report) {
+		report
+			.set("logging_socket_address", wo->loggingAgentAddress)
+			.set("logging_socket_password", wo->loggingAgentPassword)
+			.set("logging_socket_admin_address", wo->loggingAgentAdminAddress);
+	}
+};
diff --git a/ext/common/agents/Watchdog/Main.cpp b/ext/common/agents/Watchdog/Main.cpp
new file mode 100644
index 0000000..9dc80a2
--- /dev/null
+++ b/ext/common/agents/Watchdog/Main.cpp
@@ -0,0 +1,665 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+#include <oxt/thread.hpp>
+#include <oxt/system_calls.hpp>
+#include <boost/function.hpp>
+#include <boost/bind.hpp>
+#include <boost/make_shared.hpp>
+#include <boost/foreach.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <string>
+
+#include <sys/select.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <unistd.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cerrno>
+
+#include <agents/Base.h>
+#include <Constants.h>
+#include <ServerInstanceDir.h>
+#include <FileDescriptor.h>
+#include <RandomGenerator.h>
+#include <Logging.h>
+#include <Exceptions.h>
+#include <StaticString.h>
+#include <ResourceLocator.h>
+#include <Utils.h>
+#include <Utils/Base64.h>
+#include <Utils/Timer.h>
+#include <Utils/ScopeGuard.h>
+#include <Utils/IOUtils.h>
+#include <Utils/MessageIO.h>
+#include <Utils/VariantMap.h>
+
+using namespace std;
+using namespace boost;
+using namespace oxt;
+using namespace Passenger;
+
+
+enum OomFileType {
+	OOM_ADJ,
+	OOM_SCORE_ADJ
+};
+
+#define REQUEST_SOCKET_PASSWORD_SIZE     64
+
+class ServerInstanceDirToucher;
+class AgentWatcher;
+static bool hasEnvOption(const char *name, bool defaultValue = false);
+static void setOomScore(const StaticString &score);
+
+
+/***** Agent options *****/
+
+static VariantMap agentsOptions;
+static string  tempDir;
+static bool    userSwitching;
+static string  defaultUser;
+static string  defaultGroup;
+static uid_t   webServerWorkerUid;
+static gid_t   webServerWorkerGid;
+
+/***** Working objects *****/
+
+struct WorkingObjects {
+	RandomGenerator randomGenerator;
+	EventFd errorEvent;
+	ResourceLocatorPtr resourceLocator;
+	ServerInstanceDirPtr serverInstanceDir;
+	ServerInstanceDir::GenerationPtr generation;
+	uid_t defaultUid;
+	gid_t defaultGid;
+	string loggingAgentAddress;
+	string loggingAgentPassword;
+	string loggingAgentAdminAddress;
+	string adminToolStatusPassword;
+	string adminToolManipulationPassword;
+};
+
+typedef shared_ptr<WorkingObjects> WorkingObjectsPtr;
+
+static string oldOomScore;
+
+#include "AgentWatcher.cpp"
+#include "ServerInstanceDirToucher.cpp"
+#include "HelperAgentWatcher.cpp"
+#include "LoggingAgentWatcher.cpp"
+
+
+/***** Functions *****/
+
+static bool
+hasEnvOption(const char *name, bool defaultValue) {
+	const char *value = getenv(name);
+	if (value != NULL) {
+		if (*value != '\0') {
+			return strcmp(value, "yes") == 0
+				|| strcmp(value, "y") == 0
+				|| strcmp(value, "1") == 0
+				|| strcmp(value, "on") == 0
+				|| strcmp(value, "true") == 0;
+		} else {
+			return defaultValue;
+		}
+	} else {
+		return defaultValue;
+	}
+}
+
+static FILE *
+openOomAdjFile(const char *mode, OomFileType &type) {
+	FILE *f = fopen("/proc/self/oom_score_adj", mode);
+	if (f == NULL) {
+		f = fopen("/proc/self/oom_adj", mode);
+		if (f == NULL) {
+			return NULL;
+		} else {
+			type = OOM_ADJ;
+			return f;
+		}
+	} else {
+		type = OOM_SCORE_ADJ;
+		return f;
+	}
+}
+
+/**
+ * Linux-only way to change OOM killer configuration for
+ * current process. Requires root privileges, which we
+ * should have.
+ */
+static void
+setOomScore(const StaticString &score) {
+	if (score.empty()) {
+		return;
+	}
+
+	FILE *f;
+	OomFileType type;
+	
+	f = openOomAdjFile("w", type);
+	if (f != NULL) {
+		fwrite(score.data(), 1, score.size(), f);
+		fclose(f);
+	}
+}
+
+/**
+ * Set the current process's OOM score to "never kill".
+ */
+static string
+setOomScoreNeverKill() {
+	string oldScore;
+	FILE *f;
+	OomFileType type;
+	
+	f = openOomAdjFile("r", type);
+	if (f == NULL) {
+		return "";
+	}
+	char buf[1024];
+	size_t bytesRead;
+	while (true) {
+		bytesRead = fread(buf, 1, sizeof(buf), f);
+		if (bytesRead == 0 && feof(f)) {
+			break;
+		} else if (bytesRead == 0 && ferror(f)) {
+			fclose(f);
+			return "";
+		} else {
+			oldScore.append(buf, bytesRead);
+		}
+	}
+	fclose(f);
+	
+	f = openOomAdjFile("w", type);
+	if (f == NULL) {
+		return "";
+	}
+	if (type == OOM_SCORE_ADJ) {
+		fprintf(f, "-1000\n");
+	} else {
+		assert(type == OOM_ADJ);
+		fprintf(f, "-17\n");
+	}
+	fclose(f);
+	
+	return oldScore;
+}
+
+/**
+ * Wait until the starter process has exited or sent us an exit command,
+ * or until one of the watcher threads encounter an error. If a thread
+ * encountered an error then the error message will be printed.
+ *
+ * Returns whether this watchdog should exit gracefully, which is only the
+ * case if the web server sent us an exit command and no thread encountered
+ * an error.
+ */
+static bool
+waitForStarterProcessOrWatchers(const WorkingObjectsPtr &wo, vector<AgentWatcherPtr> &watchers) {
+	fd_set fds;
+	int max, ret;
+	char x;
+	
+	FD_ZERO(&fds);
+	FD_SET(FEEDBACK_FD, &fds);
+	FD_SET(wo->errorEvent.fd(), &fds);
+	
+	if (FEEDBACK_FD > wo->errorEvent.fd()) {
+		max = FEEDBACK_FD;
+	} else {
+		max = wo->errorEvent.fd();
+	}
+	
+	ret = syscalls::select(max + 1, &fds, NULL, NULL, NULL);
+	if (ret == -1) {
+		int e = errno;
+		P_ERROR("select() failed: " << strerror(e));
+		return false;
+	}
+	
+	if (FD_ISSET(wo->errorEvent.fd(), &fds)) {
+		vector<AgentWatcherPtr>::const_iterator it;
+		string message, backtrace, watcherName;
+		
+		for (it = watchers.begin(); it != watchers.end() && message.empty(); it++) {
+			message   = (*it)->getErrorMessage();
+			backtrace = (*it)->getErrorBacktrace();
+			watcherName = (*it)->name();
+		}
+		
+		if (!message.empty() && backtrace.empty()) {
+			P_ERROR("Error in " << watcherName << " watcher:\n  " << message);
+		} else if (!message.empty() && !backtrace.empty()) {
+			P_ERROR("Error in " << watcherName << " watcher:\n  " <<
+				message << "\n" << backtrace);
+		}
+		return false;
+	} else {
+		ret = syscalls::read(FEEDBACK_FD, &x, 1);
+		return ret == 1 && x == 'c';
+	}
+}
+
+static void
+cleanupAgentsInBackground(const WorkingObjectsPtr &wo, vector<AgentWatcherPtr> &watchers, char *argv[]) {
+	this_thread::disable_interruption di;
+	this_thread::disable_syscall_interruption dsi;
+	pid_t pid;
+	int e;
+
+	pid = fork();
+	if (pid == 0) {
+		// Child
+		vector<AgentWatcherPtr>::const_iterator it;
+		Timer timer(false);
+		fd_set fds, fds2;
+		int max, agentProcessesDone;
+		unsigned long long deadline = 30000; // miliseconds
+
+		#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(sun)
+			// Change process title.
+			strcpy(argv[0], "PassengerWatchdog (cleaning up...)");
+		#endif
+		
+		// Wait until all agent processes have exited. The starter
+		// process is responsible for telling the individual agents
+		// to exit.
+		
+		max = 0;
+		FD_ZERO(&fds);
+		for (it = watchers.begin(); it != watchers.end(); it++) {
+			FD_SET((*it)->getFeedbackFd(), &fds);
+			if ((*it)->getFeedbackFd() > max) {
+				max = (*it)->getFeedbackFd();
+			}
+		}
+		
+		timer.start();
+		agentProcessesDone = 0;
+		while (agentProcessesDone != -1
+		    && agentProcessesDone < (int) watchers.size()
+		    && timer.elapsed() < deadline)
+		{
+			struct timeval timeout;
+			
+			#ifdef FD_COPY
+				FD_COPY(&fds, &fds2);
+			#else
+				FD_ZERO(&fds2);
+				for (it = watchers.begin(); it != watchers.end(); it++) {
+					FD_SET((*it)->getFeedbackFd(), &fds2);
+				}
+			#endif
+			
+			timeout.tv_sec = 0;
+			timeout.tv_usec = 10000;
+			agentProcessesDone = syscalls::select(max + 1, &fds2, NULL, NULL, &timeout);
+			if (agentProcessesDone > 0 && timer.elapsed() < deadline) {
+				usleep(10000);
+			}
+		}
+		
+		if (agentProcessesDone == -1 || timer.elapsed() >= deadline) {
+			// An error occurred or we've waited long enough. Kill all the
+			// processes.
+			P_WARN("Some Phusion Passenger agent processes did not exit " <<
+				"in time, forcefully shutting down all.");
+		} else {
+			P_DEBUG("All Phusion Passenger agent processes have exited. Forcing all subprocesses to shut down.");
+		}
+		for (it = watchers.begin(); it != watchers.end(); it++) {
+			(*it)->forceShutdown();
+		}
+		
+		// Now clean up the server instance directory.
+		delete wo->generation.get();
+		delete wo->serverInstanceDir.get();
+		
+		_exit(0);
+		
+	} else if (pid == -1) {
+		// Error
+		e = errno;
+		throw SystemException("fork() failed", e);
+		
+	} else {
+		// Parent
+		
+		// Let child process handle cleanup.
+		wo->serverInstanceDir->detach();
+		wo->generation->detach();
+	}
+}
+
+static void
+forceAllAgentsShutdown(vector<AgentWatcherPtr> &watchers) {
+	vector<AgentWatcherPtr>::iterator it;
+	
+	for (it = watchers.begin(); it != watchers.end(); it++) {
+		(*it)->forceShutdown();
+	}
+}
+
+static string
+inferDefaultGroup(const string &defaultUser) {
+	struct passwd *userEntry = getpwnam(defaultUser.c_str());
+	if (userEntry == NULL) {
+		throw ConfigurationException(
+			string("The user that PassengerDefaultUser refers to, '") +
+			defaultUser + "', does not exist.");
+	}
+	
+	struct group *groupEntry = getgrgid(userEntry->pw_gid);
+	if (groupEntry == NULL) {
+		throw ConfigurationException(
+			string("The option PassengerDefaultUser is set to '" +
+			defaultUser + "', but its primary group doesn't exist. "
+			"In other words, your system's user account database "
+			"is broken. Please fix it."));
+	}
+	
+	return groupEntry->gr_name;
+}
+
+static void
+initializeBareEssentials(int argc, char *argv[]) {
+	/*
+	 * Some Apache installations (like on OS X) redirect stdout to /dev/null,
+	 * so that only stderr is redirected to the log file. We therefore
+	 * forcefully redirect stdout to stderr so that everything ends up in the
+	 * same place.
+	 */
+	dup2(2, 1);
+
+	/*
+	 * Most operating systems overcommit memory. We *know* that this watchdog process
+	 * doesn't use much memory; on OS X it uses about 200 KB of private RSS. If the
+	 * watchdog is killed by the system Out-Of-Memory Killer or then it's all over:
+	 * the system administrator will have to restart the web server for Phusion
+	 * Passenger to be usable again. So here we disable Linux's OOM killer
+	 * for this watchdog. Note that the OOM score is inherited by child processes
+	 * so we need to restore it after each fork().
+	 */
+	oldOomScore = setOomScoreNeverKill();
+	
+	agentsOptions = initializeAgent(argc, argv, "PassengerWatchdog");
+}
+
+static void
+initializeOptions() {
+	TRACE_POINT();
+	agentsOptions
+		.setDefaultInt ("log_level", DEFAULT_LOG_LEVEL)
+		.setDefault    ("temp_dir", getSystemTempDir())
+
+		.setDefaultBool("user_switching", true)
+		.setDefault    ("default_user", DEFAULT_WEB_APP_USER)
+		.setDefaultUid ("web_server_worker_uid", getuid())
+		.setDefaultGid ("web_server_worker_gid", getgid())
+		.setDefault    ("default_ruby", DEFAULT_RUBY)
+		.setDefault    ("default_python", DEFAULT_PYTHON)
+		.setDefaultInt ("max_pool_size", DEFAULT_MAX_POOL_SIZE)
+		.setDefaultInt ("max_instances_per_app", DEFAULT_MAX_INSTANCES_PER_APP)
+		.setDefaultInt ("pool_idle_time", DEFAULT_POOL_IDLE_TIME);
+
+	// Check for required options
+	UPDATE_TRACE_POINT();
+	agentsOptions.get("passenger_root");
+	agentsOptions.getPid("web_server_pid");
+
+	// Fetch optional options
+	UPDATE_TRACE_POINT();
+	tempDir       = agentsOptions.get("temp_dir");
+	userSwitching = agentsOptions.getBool("user_switching");
+	defaultUser   = agentsOptions.get("default_user");
+	if (!agentsOptions.has("default_group")) {
+		agentsOptions.set("default_group", inferDefaultGroup(defaultUser));
+	}
+	defaultGroup       = agentsOptions.get("default_group");
+	webServerWorkerUid = agentsOptions.getUid("web_server_worker_uid");
+	webServerWorkerGid = agentsOptions.getGid("web_server_worker_gid");
+
+	P_INFO("Options: " << agentsOptions.inspect());
+}
+
+static void
+maybeSetsid() {
+	/* Become the session leader so that Apache can't kill the
+	 * watchdog with killpg() during shutdown, so that a
+	 * Ctrl-C only affects the web server, and so that
+	 * we can kill all of our subprocesses in a single killpg().
+	 *
+	 * AgentsStarter.h already calls setsid() before exec()ing
+	 * the Watchdog, but FlyingPassenger does not.
+	 */
+	if (agentsOptions.getBool("setsid", false)) {
+		setsid();
+	}
+}
+
+static void
+lookupDefaultUidGid(uid_t &uid, gid_t &gid) {
+	struct passwd *userEntry;
+	struct group  *groupEntry;
+	
+	userEntry = getpwnam(defaultUser.c_str());
+	if (userEntry == NULL) {
+		throw NonExistentUserException("Default user '" + defaultUser +
+			"' does not exist.");
+	}
+	uid = userEntry->pw_uid;
+
+	groupEntry = getgrnam(defaultGroup.c_str());
+	if (groupEntry == NULL) {
+		throw NonExistentGroupException("Default group '" + defaultGroup +
+			"' does not exist.");
+	}
+	gid = groupEntry->gr_gid;
+}
+
+static void
+initializeWorkingObjects(WorkingObjectsPtr &wo, ServerInstanceDirToucherPtr &serverInstanceDirToucher) {
+	TRACE_POINT();
+	wo = make_shared<WorkingObjects>();
+	wo->resourceLocator = make_shared<ResourceLocator>(agentsOptions.get("passenger_root"));
+
+	UPDATE_TRACE_POINT();
+	// Must not used make_shared() here because Watchdog.cpp
+	// deletes the raw pointer in cleanupAgentsInBackground().
+	if (agentsOptions.get("server_instance_dir", false).empty()) {
+		/* We embed the super structure version in the server instance directory name
+		 * because it's possible to upgrade Phusion Passenger without changing the
+		 * web server's PID. This way each incompatible upgrade will use its own
+		 * server instance directory.
+		 */
+		string path = tempDir +
+			"/passenger." +
+			toString(SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION) + "." +
+			toString(SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION) + "." +
+			toString<unsigned long long>(agentsOptions.getPid("web_server_pid"));
+		wo->serverInstanceDir.reset(new ServerInstanceDir(path));
+	} else {
+		wo->serverInstanceDir.reset(new ServerInstanceDir(agentsOptions.get("server_instance_dir")));
+		agentsOptions.set("server_instance_dir", wo->serverInstanceDir->getPath());
+	}
+	wo->generation = wo->serverInstanceDir->newGeneration(userSwitching, defaultUser,
+		defaultGroup, webServerWorkerUid, webServerWorkerGid);
+	agentsOptions.set("server_instance_dir", wo->serverInstanceDir->getPath());
+	agentsOptions.setInt("generation_number", wo->generation->getNumber());
+
+	UPDATE_TRACE_POINT();
+	serverInstanceDirToucher = make_shared<ServerInstanceDirToucher>(wo);
+
+	UPDATE_TRACE_POINT();
+	lookupDefaultUidGid(wo->defaultUid, wo->defaultGid);
+
+	UPDATE_TRACE_POINT();
+	wo->loggingAgentAddress  = "unix:" + wo->generation->getPath() + "/logging";
+	wo->loggingAgentPassword = wo->randomGenerator.generateAsciiString(64);
+	wo->loggingAgentAdminAddress  = "unix:" + wo->generation->getPath() + "/logging_admin";
+
+	UPDATE_TRACE_POINT();
+	wo->adminToolStatusPassword = wo->randomGenerator.generateAsciiString(MESSAGE_SERVER_MAX_PASSWORD_SIZE);
+	wo->adminToolManipulationPassword = wo->randomGenerator.generateAsciiString(MESSAGE_SERVER_MAX_PASSWORD_SIZE);
+	agentsOptions.set("admin_tool_status_password", wo->adminToolStatusPassword);
+	agentsOptions.set("admin_tool_manipulation_password", wo->adminToolManipulationPassword);
+	if (geteuid() == 0 && !userSwitching) {
+		createFile(wo->generation->getPath() + "/passenger-status-password.txt",
+			wo->adminToolStatusPassword, S_IRUSR, wo->defaultUid, wo->defaultGid);
+		createFile(wo->generation->getPath() + "/admin-manipulation-password.txt",
+			wo->adminToolManipulationPassword, S_IRUSR, wo->defaultUid, wo->defaultGid);
+	} else {
+		createFile(wo->generation->getPath() + "/passenger-status-password.txt",
+			wo->adminToolStatusPassword, S_IRUSR | S_IWUSR);
+		createFile(wo->generation->getPath() + "/admin-manipulation-password.txt",
+			wo->adminToolManipulationPassword, S_IRUSR | S_IWUSR);
+	}
+}
+
+static void
+initializeAgentWatchers(const WorkingObjectsPtr &wo, vector<AgentWatcherPtr> &watchers) {
+	TRACE_POINT();
+	watchers.push_back(make_shared<HelperAgentWatcher>(wo));
+	watchers.push_back(make_shared<LoggingAgentWatcher>(wo));
+}
+
+static void
+startAgents(const WorkingObjectsPtr &wo, vector<AgentWatcherPtr> &watchers) {
+	TRACE_POINT();
+	foreach (AgentWatcherPtr watcher, watchers) {
+		try {
+			watcher->start();
+		} catch (const std::exception &e) {
+			writeArrayMessage(FEEDBACK_FD,
+				"Watchdog startup error",
+				e.what(),
+				NULL);
+			forceAllAgentsShutdown(watchers);
+			exit(1);
+		}
+		// Allow other exceptions to propagate and crash the watchdog.
+	}
+}
+
+static void
+beginWatchingAgents(const WorkingObjectsPtr &wo, vector<AgentWatcherPtr> &watchers) {
+	foreach (AgentWatcherPtr watcher, watchers) {
+		try {
+			watcher->beginWatching();
+		} catch (const std::exception &e) {
+			writeArrayMessage(FEEDBACK_FD,
+				"Watchdog startup error",
+				e.what(),
+				NULL);
+			forceAllAgentsShutdown(watchers);
+			exit(1);
+		}
+		// Allow other exceptions to propagate and crash the watchdog.
+	}
+}
+
+static void
+reportAgentsInformation(const WorkingObjectsPtr &wo, const vector<AgentWatcherPtr> &watchers) {
+	TRACE_POINT();
+	VariantMap report;
+
+	report
+		.set("server_instance_dir", wo->serverInstanceDir->getPath())
+		.setInt("generation", wo->generation->getNumber());
+
+	foreach (AgentWatcherPtr watcher, watchers) {
+		watcher->reportAgentsInformation(report);
+	}
+
+	report.writeToFd(FEEDBACK_FD, "Agents information");
+}
+
+int
+main(int argc, char *argv[]) {
+	initializeBareEssentials(argc, argv);
+	P_DEBUG("Starting Watchdog...");
+	WorkingObjectsPtr wo;
+	ServerInstanceDirToucherPtr serverInstanceDirToucher;
+	vector<AgentWatcherPtr> watchers;
+	
+	try {
+		TRACE_POINT();
+		initializeOptions();
+		maybeSetsid();
+		initializeWorkingObjects(wo, serverInstanceDirToucher);
+		initializeAgentWatchers(wo, watchers);
+	} catch (const std::exception &e) {
+		writeArrayMessage(FEEDBACK_FD,
+			"Watchdog startup error",
+			e.what(),
+			NULL);
+		return 1;
+	}
+	// Allow other exceptions to propagate and crash the watchdog.
+
+	try {
+		TRACE_POINT();
+		startAgents(wo, watchers);
+		beginWatchingAgents(wo, watchers);
+		reportAgentsInformation(wo, watchers);
+		P_INFO("All Phusion Passenger agents started!");
+		
+		UPDATE_TRACE_POINT();
+		this_thread::disable_interruption di;
+		this_thread::disable_syscall_interruption dsi;
+		bool exitGracefully = waitForStarterProcessOrWatchers(wo, watchers);
+		if (exitGracefully) {
+			/* Fork a child process which cleans up all the agent processes in
+			 * the background and exit this watchdog process so that we don't block
+			 * the web server.
+			 */
+			P_DEBUG("Web server exited gracefully; gracefully shutting down all agents...");
+		} else {
+			P_DEBUG("Web server did not exit gracefully, forcing shutdown of all agents...");
+		}
+		UPDATE_TRACE_POINT();
+		AgentWatcher::stopWatching(watchers);
+		if (exitGracefully) {
+			UPDATE_TRACE_POINT();
+			cleanupAgentsInBackground(wo, watchers, argv);
+			return 0;
+		} else {
+			UPDATE_TRACE_POINT();
+			forceAllAgentsShutdown(watchers);
+			return 1;
+		}
+	} catch (const tracable_exception &e) {
+		P_ERROR(e.what() << "\n" << e.backtrace());
+		return 1;
+	}
+}
diff --git a/ext/common/agents/Watchdog/ServerInstanceDirToucher.cpp b/ext/common/agents/Watchdog/ServerInstanceDirToucher.cpp
new file mode 100644
index 0000000..cf28429
--- /dev/null
+++ b/ext/common/agents/Watchdog/ServerInstanceDirToucher.cpp
@@ -0,0 +1,116 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+
+/**
+ * Touch all files in the server instance dir every 6 hours in order to prevent /tmp
+ * cleaners from weaking havoc:
+ * http://code.google.com/p/phusion-passenger/issues/detail?id=365
+ */
+class ServerInstanceDirToucher {
+private:
+	WorkingObjectsPtr wo;
+	oxt::thread *thr;
+	
+	void
+	threadMain() {
+		while (!this_thread::interruption_requested()) {
+			syscalls::sleep(60 * 60 * 6);
+			
+			begin_touch:
+			
+			this_thread::disable_interruption di;
+			this_thread::disable_syscall_interruption dsi;
+			// Fork a process which touches everything in the server instance dir.
+			pid_t pid = syscalls::fork();
+			if (pid == 0) {
+				// Child
+				int prio, ret, e;
+				
+				closeAllFileDescriptors(2);
+				
+				// Make process nicer.
+				do {
+					prio = getpriority(PRIO_PROCESS, getpid());
+				} while (prio == -1 && errno == EINTR);
+				if (prio != -1) {
+					prio++;
+					if (prio > 20) {
+						prio = 20;
+					}
+					do {
+						ret = setpriority(PRIO_PROCESS, getpid(), prio);
+					} while (ret == -1 && errno == EINTR);
+				} else {
+					perror("getpriority");
+				}
+				
+				do {
+					ret = chdir(wo->serverInstanceDir->getPath().c_str());
+				} while (ret == -1 && errno == EINTR);
+				if (ret == -1) {
+					e = errno;
+					fprintf(stderr, "chdir(\"%s\") failed: %s (%d)\n",
+						wo->serverInstanceDir->getPath().c_str(),
+						strerror(e), e);
+					fflush(stderr);
+					_exit(1);
+				}
+				
+				setOomScore(oldOomScore);
+				
+				execlp("/bin/sh", "/bin/sh", "-c", "find . | xargs touch", (char *) 0);
+				e = errno;
+				fprintf(stderr, "Cannot execute 'find . | xargs touch': %s (%d)\n",
+					strerror(e), e);
+				fflush(stderr);
+				_exit(1);
+			} else if (pid == -1) {
+				// Error
+				P_WARN("Could not touch the server instance directory because "
+					"fork() failed. Retrying in 2 minutes...");
+				this_thread::restore_interruption si(di);
+				this_thread::restore_syscall_interruption rsi(dsi);
+				syscalls::sleep(60 * 2);
+				goto begin_touch;
+			} else {
+				syscalls::waitpid(pid, NULL, 0);
+			}
+		}
+	}
+
+public:
+	ServerInstanceDirToucher(const WorkingObjectsPtr &wo) {
+		this->wo = wo;
+		thr = new oxt::thread(boost::bind(&ServerInstanceDirToucher::threadMain, this),
+			"Server instance dir toucher", 256 * 1024);
+	}
+	
+	~ServerInstanceDirToucher() {
+		thr->interrupt_and_join();
+		delete thr;
+	}
+};
+
+typedef shared_ptr<ServerInstanceDirToucher> ServerInstanceDirToucherPtr;
diff --git a/ext/google/COPYING b/ext/google/COPYING
deleted file mode 100644
index e4956cf..0000000
--- a/ext/google/COPYING
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2005, Google Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-    * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-    * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/ext/google/ChangeLog b/ext/google/ChangeLog
deleted file mode 100644
index 3df9ab1..0000000
--- a/ext/google/ChangeLog
+++ /dev/null
@@ -1,167 +0,0 @@
-Tue May 12 14:16:38 2009  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 1.5.2 release
-	* Fix compile error: not initializing set_key in all constructors
-
-Fri May  8 15:23:44 2009  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 1.5.1 release
-	* Fix broken equal_range() for all the hash-classes (csilvers)
-
-Wed May  6 11:28:49 2009  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 1.5 release
-	* Support the tr1 unordered_map (and unordered_set) API (csilvers)
-	* Store only key for delkey; reduces need for 0-arg c-tor (csilvers)
-	* Prefer unordered_map to hash_map for the timing test (csilvers)
-	* PORTING: update the resource use for 64-bit machines (csilvers)
-	* PORTING: fix MIN/MAX collisions by un-#including windows.h (csilvers)
-	* Updated autoconf version to 2.61 and libtool version to 1.5.26
-
-Wed Jan 28 17:11:31 2009  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 1.4 release
-	* Allow hashtables to be <32 buckets (csilvers)
-	* Fix initial-sizing bug: was sizing tables too small (csilvers)
-	* Add asserts that clients don't abuse deleted/empty key (csilvers)
-	* Improve determination of 32/64 bit for C code (csilvers)
-	* Small fix for doc files in rpm (csilvers)
-
-Thu Nov  6 15:06:09 2008  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 1.3 release
-	* Add an interface to change the parameters for resizing (myl)
-	* Document another potentially good hash function (csilvers)
-
-Thu Sep 18 13:53:20 2008  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 1.2 release
-	* Augment documentation to better describe namespace issues (csilvers)
-	* BUG FIX: replace hash<> with SPARSEHASH_HASH, for windows (csilvers)
-	* Add timing test to unittest to test repeated add+delete (csilvers)
-	* Do better picking a new size when resizing (csilvers)
-	* Use ::google instead of google as a namespace (csilvers)
-	* Improve threading test at config time (csilvers)
-
-Mon Feb 11 16:30:11 2008  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 1.1 release
-	* Fix brown-paper-bag bug in some constructors (rafferty)
-	* Fix problem with variables shadowing member vars, add -Wshadow
-	
-Thu Nov 29 11:44:38 2007  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 1.0.2 release
-	* Fix a final reference to hash<> to use SPARSEHASH_HASH<> instead.
-	
-Wed Nov 14 08:47:48 2007  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 1.0.1 release :-(
-	* Remove an unnecessary (harmful) "#define hash" in windows' config.h
-	
-Tue Nov 13 15:15:46 2007  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 1.0 release!  We are now out of beta.
-	* Clean up Makefile awk script to be more readable (csilvers)
-	* Namespace fixes: use fewer #defines, move typedefs into namespace
-	
-Fri Oct 12 12:35:24 2007  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 0.9.1 release
-	* Fix Makefile awk script to work on more architectures (csilvers)
-	* Add test to test code in more 'real life' situations (csilvers)
-
-Tue Oct  9 14:15:21 2007  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 0.9 release
-	* More type-hygiene improvements, especially for 64-bit (csilvers)
-	* Some configure improvements to improve portability, utility (austern)
-	* Small bugfix for operator== for dense_hash_map (jeff)
-
-Tue Jul  3 12:55:04 2007  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 0.8 release
-	* Minor type-hygiene improvements: size_t for int, etc. (csilvers)
-	* Porting improvements: tests pass on OS X, FreeBSD, Solaris (csilvers)
-	* Full windows port!  VS solution provided for all unittests (csilvers)
-
-Mon Jun 11 11:33:41 2007  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 0.7 release
-	* Syntax fixes to better support gcc 4.3 and VC++ 7 (mec, csilvers)
-	* Improved windows/VC++ support (see README.windows) (csilvers)
-	* Config improvements: better tcmalloc support and config.h (csilvers)
-	* More robust with missing hash_map + nix 'trampoline' .h's (csilvers)
-	* Support for STLport's hash_map/hash_fun locations (csilvers)
-	* Add .m4 files to distribution; now all source is there (csilvers)
-	* Tiny modification of shrink-threshhold to allow never-shrinking (amc)
-	* Protect timing tests against aggressive optimizers (csilvers)
-	* Extend time_hash_map to test bigger objects (csilvers)
-	* Extend type-trait support to work with const objects (csilvers)
-	* USER VISIBLE: speed up all code by replacing memmove with memcpy
-	  (csilvers)
-
-Tue Mar 20 17:29:34 2007  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 0.6 release
-	* Some improvement to type-traits (jyasskin)
-	* Better timing results when google-perftools is installed (sanjay)
-	* Updates and fixes to html documentation and README (csilvers)
-	* A bit more careful about #includes (csilvers)
-	* Fix for typo that broken compilation on some systems (csilvers)
-	* USER VISIBLE: New clear_no_resize() method added to dense_hash_map
-          (uszkoreit)
-
-Sat Oct 21 13:47:47 2006  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 0.5 release
-	* Support uint16_t (SunOS) in addition to u_int16_t (BSD) (csilvers)
-	* Get rid of UNDERSTANDS_ITERATOR_TAGS; everyone understands (csilvers)
-	* Test that empty-key and deleted-key differ (rbayardo)
-	* Fix example docs: strcmp needs to test for NULL (csilvers)
-
-Sun Apr 23 22:42:35 2006  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 0.4 release
-	* Remove POD requirement for keys and values! (austern)
-	* Add tr1-compatible type-traits system to speed up POD ops. (austern)
-	* Fixed const-iterator bug where postfix ++ didn't compile. (csilvers)
-	* Fixed iterator comparison bugs where <= was incorrect. (csilvers)
-	* Clean up config.h to keep its #defines from conflicting. (csilvers)
-	* Big documentation sweep and cleanup. (csilvers)
-	* Update documentation to talk more about good hash fns. (csilvers)
-	* Fixes to compile on MSVC (working around some MSVC bugs). (rennie)
-	* Avoid resizing hashtable on operator[] lookups (austern)
-
-Thu Nov  3 20:12:31 2005  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 0.3 release
-	* Quiet compiler warnings on some compilers. (csilvers)
-	* Some documentation fixes: example code for dense_hash_map. (csilvers)
-	* Fix a bug where swap() wasn't swapping delete_key(). (csilvers)
-	* set_deleted_key() and set_empty_key() now take a key only,
-	  allowing hash-map values to be forward-declared. (csilvers)
-	* support for std::insert_iterator (and std::inserter). (csilvers)
-
-Mon May  2 07:04:46 2005  Google Inc. <opensource at google.com>
-
-	* sparsehash: version 0.2 release
-	* Preliminary support for msvc++ compilation. (csilvers)
-	* Documentation fixes -- some example code was incomplete! (csilvers)
-	* Minimize size of config.h to avoid other-package conflicts (csilvers)
-	* Contribute a C-based version of sparsehash that served as the
-	  inspiration for this code.  One day, I hope to clean it up and
-	  support it, but for now it's just in experimental/, for playing
-	  around with. (csilvers)
-	* Change default namespace from std to google. (csilvers)
-
-Fri Jan 14 16:53:32 2005  Google Inc. <opensource at google.com>
-
-	* sparsehash: initial release:
-	  The sparsehash package contains several hash-map implementations,
-	  similar in API to SGI's hash_map class, but with different
-	  performance characteristics.  sparse_hash_map uses very little
-	  space overhead: 1-2 bits per entry.  dense_hash_map is typically
-	  faster than the default SGI STL implementation.  This package
-	  also includes hash-set analogues of these classes.
-
diff --git a/ext/google/dense_hash_map b/ext/google/dense_hash_map
deleted file mode 100644
index 355709d..0000000
--- a/ext/google/dense_hash_map
+++ /dev/null
@@ -1,310 +0,0 @@
-// Copyright (c) 2005, Google Inc.
-// All rights reserved.
-// 
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-// 
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// ----
-// Author: Craig Silverstein
-//
-// This is just a very thin wrapper over densehashtable.h, just
-// like sgi stl's stl_hash_map is a very thin wrapper over
-// stl_hashtable.  The major thing we define is operator[], because
-// we have a concept of a data_type which stl_hashtable doesn't
-// (it only has a key and a value).
-//
-// NOTE: this is exactly like sparse_hash_map.h, with the word
-// "sparse" replaced by "dense", except for the addition of
-// set_empty_key().
-//
-//   YOU MUST CALL SET_EMPTY_KEY() IMMEDIATELY AFTER CONSTRUCTION.
-//
-// Otherwise your program will die in mysterious ways.
-//
-// In other respects, we adhere mostly to the STL semantics for
-// hash-map.  One important exception is that insert() invalidates
-// iterators entirely.  On the plus side, though, erase() doesn't
-// invalidate iterators at all, or even change the ordering of elements.
-//
-// Here are a few "power user" tips:
-//
-//    1) set_deleted_key():
-//         If you want to use erase() you *must* call set_deleted_key(),
-//         in addition to set_empty_key(), after construction.
-//         The deleted and empty keys must differ.
-//
-//    2) resize(0):
-//         When an item is deleted, its memory isn't freed right
-//         away.  This allows you to iterate over a hashtable,
-//         and call erase(), without invalidating the iterator.
-//         To force the memory to be freed, call resize(0).
-//         For tr1 compatibility, this can also be called as rehash(0).
-//
-//    3) min_load_factor(0.0)
-//         Setting the minimum load factor to 0.0 guarantees that
-//         the hash table will never shrink.
-//
-// Guide to what kind of hash_map to use:
-//   (1) dense_hash_map: fastest, uses the most memory
-//   (2) sparse_hash_map: slowest, uses the least memory
-//   (3) hash_map (STL): in the middle
-// Typically I use sparse_hash_map when I care about space and/or when
-// I need to save the hashtable on disk.  I use hash_map otherwise.  I
-// don't personally use dense_hash_set ever; some people use it for
-// small sets with lots of lookups.
-//
-// - dense_hash_map has, typically, a factor of 2 memory overhead (if your
-//   data takes up X bytes, the hash_map uses X more bytes in overhead).
-// - sparse_hash_map has about 2 bits overhead per entry.
-// - sparse_hash_map can be 3-7 times slower than the others for lookup and,
-//   especially, inserts.  See time_hash_map.cc for details.
-//
-// See /usr/(local/)?doc/sparsehash-*/dense_hash_map.html
-// for information about how to use this class.
-
-#ifndef _DENSE_HASH_MAP_H_
-#define _DENSE_HASH_MAP_H_
-
-#include <google/sparsehash/sparseconfig.h>
-#include <stdio.h>                   // for FILE * in read()/write()
-#include <algorithm>                 // for the default template args
-#include <functional>                // for equal_to
-#include <memory>                    // for alloc<>
-#include <utility>                   // for pair<>
-#include HASH_FUN_H                  // defined in config.h
-#include <google/sparsehash/densehashtable.h>
-
-
-_START_GOOGLE_NAMESPACE_
-
-using STL_NAMESPACE::pair;
-
-template <class Key, class T,
-          class HashFcn = SPARSEHASH_HASH<Key>,   // defined in sparseconfig.h
-          class EqualKey = STL_NAMESPACE::equal_to<Key>,
-          class Alloc = STL_NAMESPACE::allocator<T> >
-class dense_hash_map {
- private:
-  // Apparently select1st is not stl-standard, so we define our own
-  struct SelectKey {
-    const Key& operator()(const pair<const Key, T>& p) const {
-      return p.first;
-    }
-  };
-  struct SetKey {
-    void operator()(pair<const Key, T>* value, const Key& new_key) const {
-      *const_cast<Key*>(&value->first) = new_key;
-      // It would be nice to clear the rest of value here as well, in
-      // case it's taking up a lot of memory.  We do this by clearing
-      // the value.  This assumes T has a zero-arg constructor!
-      value->second = T();
-    }
-  };
-
-  // The actual data
-  typedef dense_hashtable<pair<const Key, T>, Key, HashFcn,
-                          SelectKey, SetKey, EqualKey, Alloc> ht;
-  ht rep;
-
- public:
-  typedef typename ht::key_type key_type;
-  typedef T data_type;
-  typedef T mapped_type;
-  typedef typename ht::value_type value_type;
-  typedef typename ht::hasher hasher;
-  typedef typename ht::key_equal key_equal;
-  typedef Alloc allocator_type;
-
-  typedef typename ht::size_type size_type;
-  typedef typename ht::difference_type difference_type;
-  typedef typename ht::pointer pointer;
-  typedef typename ht::const_pointer const_pointer;
-  typedef typename ht::reference reference;
-  typedef typename ht::const_reference const_reference;
-
-  typedef typename ht::iterator iterator;
-  typedef typename ht::const_iterator const_iterator;
-  typedef typename ht::local_iterator local_iterator;
-  typedef typename ht::const_local_iterator const_local_iterator;
-
-  // Iterator functions
-  iterator begin()                               { return rep.begin(); }
-  iterator end()                                 { return rep.end(); }
-  const_iterator begin() const                   { return rep.begin(); }
-  const_iterator end() const                     { return rep.end(); }
-
-
-  // These come from tr1's unordered_map. For us, a bucket has 0 or 1 elements.
-  local_iterator begin(size_type i)              { return rep.begin(i); }
-  local_iterator end(size_type i)                { return rep.end(i); }
-  const_local_iterator begin(size_type i) const  { return rep.begin(i); }
-  const_local_iterator end(size_type i) const    { return rep.end(i); }
-
-  // Accessor functions
-  // TODO(csilvers): implement Alloc get_allocator() const;
-  hasher hash_funct() const                      { return rep.hash_funct(); }
-  hasher hash_function() const                   { return hash_funct(); }
-  key_equal key_eq() const                       { return rep.key_eq(); }
-
-
-  // Constructors
-  explicit dense_hash_map(size_type expected_max_items_in_table = 0,
-                          const hasher& hf = hasher(),
-                          const key_equal& eql = key_equal())
-    : rep(expected_max_items_in_table, hf, eql) { }
-
-  template <class InputIterator>
-  dense_hash_map(InputIterator f, InputIterator l,
-                 size_type expected_max_items_in_table = 0,
-                 const hasher& hf = hasher(),
-                 const key_equal& eql = key_equal())
-    : rep(expected_max_items_in_table, hf, eql) {
-    rep.insert(f, l);
-  }
-  // We use the default copy constructor
-  // We use the default operator=()
-  // We use the default destructor
-
-  void clear()                        { rep.clear(); }
-  // This clears the hash map without resizing it down to the minimum
-  // bucket count, but rather keeps the number of buckets constant
-  void clear_no_resize()              { rep.clear_no_resize(); }
-  void swap(dense_hash_map& hs)       { rep.swap(hs.rep); }
-
-
-  // Functions concerning size
-  size_type size() const              { return rep.size(); }
-  size_type max_size() const          { return rep.max_size(); }
-  bool empty() const                  { return rep.empty(); }
-  size_type bucket_count() const      { return rep.bucket_count(); }
-  size_type max_bucket_count() const  { return rep.max_bucket_count(); }
-
-  // These are tr1 methods.  bucket() is the bucket the key is or would be in.
-  size_type bucket_size(size_type i) const    { return rep.bucket_size(i); }
-  size_type bucket(const key_type& key) const { return rep.bucket(key); }
-  float load_factor() const {
-    return size() * 1.0f / bucket_count();
-  }
-  float max_load_factor() const {
-    float shrink, grow;
-    rep.get_resizing_parameters(&shrink, &grow);
-    return grow;
-  }
-  void max_load_factor(float new_grow) {
-    float shrink, grow;
-    rep.get_resizing_parameters(&shrink, &grow);
-    rep.set_resizing_parameters(shrink, new_grow);
-  }
-  // These aren't tr1 methods but perhaps ought to be.
-  float min_load_factor() const {
-    float shrink, grow;
-    rep.get_resizing_parameters(&shrink, &grow);
-    return shrink;
-  }
-  void min_load_factor(float new_shrink) {
-    float shrink, grow;
-    rep.get_resizing_parameters(&shrink, &grow);
-    rep.set_resizing_parameters(new_shrink, grow);
-  }
-  // Deprecated; use min_load_factor() or max_load_factor() instead.
-  void set_resizing_parameters(float shrink, float grow) {
-    return rep.set_resizing_parameters(shrink, grow);
-  }
-
-  void resize(size_type hint)         { rep.resize(hint); }
-  void rehash(size_type hint)         { resize(hint); }      // the tr1 name
-
-  // Lookup routines
-  iterator find(const key_type& key)                 { return rep.find(key); }
-  const_iterator find(const key_type& key) const     { return rep.find(key); }
-
-  data_type& operator[](const key_type& key) {       // This is our value-add!
-    iterator it = find(key);
-    if (it != end()) {
-      return it->second;
-    } else {
-      return insert(value_type(key, data_type())).first->second;
-    }
-  }
-
-  size_type count(const key_type& key) const         { return rep.count(key); }
-
-  pair<iterator, iterator> equal_range(const key_type& key) {
-    return rep.equal_range(key);
-  }
-  pair<const_iterator, const_iterator> equal_range(const key_type& key) const {
-    return rep.equal_range(key);
-  }
-
-  // Insertion routines
-  pair<iterator, bool> insert(const value_type& obj) { return rep.insert(obj); }
-  template <class InputIterator>
-  void insert(InputIterator f, InputIterator l)      { rep.insert(f, l); }
-  void insert(const_iterator f, const_iterator l)    { rep.insert(f, l); }
-  // required for std::insert_iterator; the passed-in iterator is ignored
-  iterator insert(iterator, const value_type& obj)   { return insert(obj).first; }
-
-
-  // Deletion and empty routines
-  // THESE ARE NON-STANDARD!  I make you specify an "impossible" key
-  // value to identify deleted and empty buckets.  You can change the
-  // deleted key as time goes on, or get rid of it entirely to be insert-only.
-  void set_empty_key(const key_type& key)   {           // YOU MUST CALL THIS!
-    rep.set_empty_key(value_type(key, data_type()));    // rep wants a value
-  }
-  void set_deleted_key(const key_type& key)   {
-    rep.set_deleted_key(key);
-  }
-  void clear_deleted_key()                    { rep.clear_deleted_key(); }
-
-  // These are standard
-  size_type erase(const key_type& key)               { return rep.erase(key); }
-  void erase(iterator it)                            { rep.erase(it); }
-  void erase(iterator f, iterator l)                 { rep.erase(f, l); }
-
-
-  // Comparison
-  bool operator==(const dense_hash_map& hs) const    { return rep == hs.rep; }
-  bool operator!=(const dense_hash_map& hs) const    { return rep != hs.rep; }
-
-
-  // I/O -- this is an add-on for writing metainformation to disk
-  bool write_metadata(FILE *fp)       { return rep.write_metadata(fp); }
-  bool read_metadata(FILE *fp)        { return rep.read_metadata(fp); }
-  bool write_nopointer_data(FILE *fp) { return rep.write_nopointer_data(fp); }
-  bool read_nopointer_data(FILE *fp)  { return rep.read_nopointer_data(fp); }
-};
-
-// We need a global swap as well
-template <class Key, class T, class HashFcn, class EqualKey, class Alloc>
-inline void swap(dense_hash_map<Key, T, HashFcn, EqualKey, Alloc>& hm1,
-                 dense_hash_map<Key, T, HashFcn, EqualKey, Alloc>& hm2) {
-  hm1.swap(hm2);
-}
-
-_END_GOOGLE_NAMESPACE_
-
-#endif /* _DENSE_HASH_MAP_H_ */
diff --git a/ext/google/dense_hash_set b/ext/google/dense_hash_set
deleted file mode 100644
index 3b3e254..0000000
--- a/ext/google/dense_hash_set
+++ /dev/null
@@ -1,287 +0,0 @@
-// Copyright (c) 2005, Google Inc.
-// All rights reserved.
-// 
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-// 
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// ---
-// Author: Craig Silverstein
-//
-// This is just a very thin wrapper over densehashtable.h, just
-// like sgi stl's stl_hash_set is a very thin wrapper over
-// stl_hashtable.  The major thing we define is operator[], because
-// we have a concept of a data_type which stl_hashtable doesn't
-// (it only has a key and a value).
-//
-// This is more different from dense_hash_map than you might think,
-// because all iterators for sets are const (you obviously can't
-// change the key, and for sets there is no value).
-//
-// NOTE: this is exactly like sparse_hash_set.h, with the word
-// "sparse" replaced by "dense", except for the addition of
-// set_empty_key().
-//
-//   YOU MUST CALL SET_EMPTY_KEY() IMMEDIATELY AFTER CONSTRUCTION.
-//
-// Otherwise your program will die in mysterious ways.
-//
-// In other respects, we adhere mostly to the STL semantics for
-// hash-set.  One important exception is that insert() invalidates
-// iterators entirely.  On the plus side, though, erase() doesn't
-// invalidate iterators at all, or even change the ordering of elements.
-//
-// Here are a few "power user" tips:
-//
-//    1) set_deleted_key():
-//         If you want to use erase() you must call set_deleted_key(),
-//         in addition to set_empty_key(), after construction.
-//         The deleted and empty keys must differ.
-//
-//    2) resize(0):
-//         When an item is deleted, its memory isn't freed right
-//         away.  This allows you to iterate over a hashtable,
-//         and call erase(), without invalidating the iterator.
-//         To force the memory to be freed, call resize(0).
-//         For tr1 compatibility, this can also be called as rehash(0).
-//
-//    3) min_load_factor(0.0)
-//         Setting the minimum load factor to 0.0 guarantees that
-//         the hash table will never shrink.
-//
-// Guide to what kind of hash_set to use:
-//   (1) dense_hash_set: fastest, uses the most memory
-//   (2) sparse_hash_set: slowest, uses the least memory
-//   (3) hash_set (STL): in the middle
-// Typically I use sparse_hash_set when I care about space and/or when
-// I need to save the hashtable on disk.  I use hash_set otherwise.  I
-// don't personally use dense_hash_set ever; some people use it for
-// small sets with lots of lookups.
-//
-// - dense_hash_set has, typically, a factor of 2 memory overhead (if your
-//   data takes up X bytes, the hash_set uses X more bytes in overhead).
-// - sparse_hash_set has about 2 bits overhead per entry.
-// - sparse_hash_map can be 3-7 times slower than the others for lookup and,
-//   especially, inserts.  See time_hash_map.cc for details.
-//
-// See /usr/(local/)?doc/sparsehash-*/dense_hash_set.html
-// for information about how to use this class.
-
-#ifndef _DENSE_HASH_SET_H_
-#define _DENSE_HASH_SET_H_
-
-#include <google/sparsehash/sparseconfig.h>
-#include <stdio.h>                   // for FILE * in read()/write()
-#include <algorithm>                 // for the default template args
-#include <functional>                // for equal_to
-#include <memory>                    // for alloc<>
-#include <utility>                   // for pair<>
-#include HASH_FUN_H                  // defined in config.h
-#include <google/sparsehash/densehashtable.h>
-
-
-_START_GOOGLE_NAMESPACE_
-
-using STL_NAMESPACE::pair;
-
-template <class Value,
-          class HashFcn = SPARSEHASH_HASH<Value>,  // defined in sparseconfig.h
-          class EqualKey = STL_NAMESPACE::equal_to<Value>, 
-          class Alloc = STL_NAMESPACE::allocator<Value> >
-class dense_hash_set {
- private:
-  // Apparently identity is not stl-standard, so we define our own
-  struct Identity {
-    Value& operator()(Value& v) const { return v; }
-    const Value& operator()(const Value& v) const { return v; }
-  };
-  struct SetKey {
-    void operator()(Value* value, const Value& new_key) const {
-      *value = new_key;
-    }
-  };
-
-  // The actual data
-  typedef dense_hashtable<Value, Value, HashFcn,
-                          Identity, SetKey, EqualKey, Alloc> ht;
-  ht rep;
-
- public:
-  typedef typename ht::key_type key_type;
-  typedef typename ht::value_type value_type;
-  typedef typename ht::hasher hasher;
-  typedef typename ht::key_equal key_equal;
-  typedef Alloc allocator_type;
-
-  typedef typename ht::size_type size_type;
-  typedef typename ht::difference_type difference_type;
-  typedef typename ht::const_pointer pointer;
-  typedef typename ht::const_pointer const_pointer;
-  typedef typename ht::const_reference reference;
-  typedef typename ht::const_reference const_reference;
-
-  typedef typename ht::const_iterator iterator;
-  typedef typename ht::const_iterator const_iterator;
-  typedef typename ht::const_local_iterator local_iterator;
-  typedef typename ht::const_local_iterator const_local_iterator;
-
-
-  // Iterator functions -- recall all iterators are const
-  iterator begin() const                  { return rep.begin(); }
-  iterator end() const                    { return rep.end(); }
-
-  // These come from tr1's unordered_set. For us, a bucket has 0 or 1 elements.
-  local_iterator begin(size_type i) const { return rep.begin(i); }
-  local_iterator end(size_type i) const   { return rep.end(i); }
-
-
-  // Accessor functions
-  hasher hash_funct() const               { return rep.hash_funct(); }
-  key_equal key_eq() const                { return rep.key_eq(); }
-
-
-  // Constructors
-  explicit dense_hash_set(size_type expected_max_items_in_table = 0,
-                          const hasher& hf = hasher(),
-                          const key_equal& eql = key_equal())
-    : rep(expected_max_items_in_table, hf, eql) { }
-
-  template <class InputIterator>
-  dense_hash_set(InputIterator f, InputIterator l,
-                 size_type expected_max_items_in_table = 0,
-                 const hasher& hf = hasher(),
-                 const key_equal& eql = key_equal())
-      : rep(expected_max_items_in_table, hf, eql) {
-    rep.insert(f, l);
-  }
-  // We use the default copy constructor
-  // We use the default operator=()
-  // We use the default destructor
-
-  void clear()                        { rep.clear(); }
-  // This clears the hash set without resizing it down to the minimum
-  // bucket count, but rather keeps the number of buckets constant
-  void clear_no_resize()              { rep.clear_no_resize(); }
-  void swap(dense_hash_set& hs)       { rep.swap(hs.rep); }
-
-
-  // Functions concerning size
-  size_type size() const              { return rep.size(); }
-  size_type max_size() const          { return rep.max_size(); }
-  bool empty() const                  { return rep.empty(); }
-  size_type bucket_count() const      { return rep.bucket_count(); }
-  size_type max_bucket_count() const  { return rep.max_bucket_count(); }
-
-  // These are tr1 methods.  bucket() is the bucket the key is or would be in.
-  size_type bucket_size(size_type i) const    { return rep.bucket_size(i); }
-  size_type bucket(const key_type& key) const { return rep.bucket(key); }
-  float load_factor() const {
-    return size() * 1.0f / bucket_count();
-  }
-  float max_load_factor() const {
-    float shrink, grow;
-    rep.get_resizing_parameters(&shrink, &grow);
-    return grow;
-  }
-  void max_load_factor(float new_grow) {
-    float shrink, grow;
-    rep.get_resizing_parameters(&shrink, &grow);
-    rep.set_resizing_parameters(shrink, new_grow);
-  }
-  // These aren't tr1 methods but perhaps ought to be.
-  float min_load_factor() const {
-    float shrink, grow;
-    rep.get_resizing_parameters(&shrink, &grow);
-    return shrink;
-  }
-  void min_load_factor(float new_shrink) {
-    float shrink, grow;
-    rep.get_resizing_parameters(&shrink, &grow);
-    rep.set_resizing_parameters(new_shrink, grow);
-  }
-  // Deprecated; use min_load_factor() or max_load_factor() instead.
-  void set_resizing_parameters(float shrink, float grow) {
-    return rep.set_resizing_parameters(shrink, grow);
-  }
-
-  void resize(size_type hint)         { rep.resize(hint); }
-  void rehash(size_type hint)         { resize(hint); }     // the tr1 name
-
-  // Lookup routines
-  iterator find(const key_type& key) const           { return rep.find(key); }
-
-  size_type count(const key_type& key) const         { return rep.count(key); }
-
-  pair<iterator, iterator> equal_range(const key_type& key) const {
-    return rep.equal_range(key);
-  }
-
-  // Insertion routines
-  pair<iterator, bool> insert(const value_type& obj) {
-    pair<typename ht::iterator, bool> p = rep.insert(obj);
-    return pair<iterator, bool>(p.first, p.second);   // const to non-const
-  }
-  template <class InputIterator>
-  void insert(InputIterator f, InputIterator l)      { rep.insert(f, l); }
-  void insert(const_iterator f, const_iterator l)    { rep.insert(f, l); }
-  // required for std::insert_iterator; the passed-in iterator is ignored
-  iterator insert(iterator, const value_type& obj)   { return insert(obj).first; }
-
-
-  // Deletion and empty routines
-  // THESE ARE NON-STANDARD!  I make you specify an "impossible" key
-  // value to identify deleted and empty buckets.  You can change the
-  // deleted key as time goes on, or get rid of it entirely to be insert-only.
-  void set_empty_key(const key_type& key)     { rep.set_empty_key(key); }
-  void set_deleted_key(const key_type& key)   { rep.set_deleted_key(key); }
-  void clear_deleted_key()                    { rep.clear_deleted_key(); }
-
-  // These are standard
-  size_type erase(const key_type& key)               { return rep.erase(key); }
-  void erase(iterator it)                            { rep.erase(it); }
-  void erase(iterator f, iterator l)                 { rep.erase(f, l); }
-
-
-  // Comparison
-  bool operator==(const dense_hash_set& hs) const    { return rep == hs.rep; }
-  bool operator!=(const dense_hash_set& hs) const    { return rep != hs.rep; }
-
-
-  // I/O -- this is an add-on for writing metainformation to disk
-  bool write_metadata(FILE *fp)       { return rep.write_metadata(fp); }
-  bool read_metadata(FILE *fp)        { return rep.read_metadata(fp); }
-  bool write_nopointer_data(FILE *fp) { return rep.write_nopointer_data(fp); }
-  bool read_nopointer_data(FILE *fp)  { return rep.read_nopointer_data(fp); }
-};
-
-template <class Val, class HashFcn, class EqualKey, class Alloc>
-inline void swap(dense_hash_set<Val, HashFcn, EqualKey, Alloc>& hs1,
-                 dense_hash_set<Val, HashFcn, EqualKey, Alloc>& hs2) {
-  hs1.swap(hs2);
-}
-
-_END_GOOGLE_NAMESPACE_
-
-#endif /* _DENSE_HASH_SET_H_ */
diff --git a/ext/google/sparse_hash_map b/ext/google/sparse_hash_map
deleted file mode 100644
index 98d0c48..0000000
--- a/ext/google/sparse_hash_map
+++ /dev/null
@@ -1,294 +0,0 @@
-// Copyright (c) 2005, Google Inc.
-// All rights reserved.
-// 
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-// 
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// ---
-// Author: Craig Silverstein
-//
-// This is just a very thin wrapper over sparsehashtable.h, just
-// like sgi stl's stl_hash_map is a very thin wrapper over
-// stl_hashtable.  The major thing we define is operator[], because
-// we have a concept of a data_type which stl_hashtable doesn't
-// (it only has a key and a value).
-//
-// We adhere mostly to the STL semantics for hash-map.  One important
-// exception is that insert() invalidates iterators entirely.  On the
-// plus side, though, delete() doesn't invalidate iterators at all, or
-// even change the ordering of elements.
-//
-// Here are a few "power user" tips:
-//
-//    1) set_deleted_key():
-//         Unlike STL's hash_map, if you want to use erase() you
-//         *must* call set_deleted_key() after construction.
-//
-//    2) resize(0):
-//         When an item is deleted, its memory isn't freed right
-//         away.  This is what allows you to iterate over a hashtable
-//         and call erase() without invalidating the iterator.
-//         To force the memory to be freed, call resize(0).
-//         For tr1 compatibility, this can also be called as rehash(0).
-//
-//    3) min_load_factor(0.0)
-//         Setting the minimum load factor to 0.0 guarantees that
-//         the hash table will never shrink.
-//
-// Guide to what kind of hash_map to use:
-//   (1) dense_hash_map: fastest, uses the most memory
-//   (2) sparse_hash_map: slowest, uses the least memory
-//   (3) hash_map / unordered_map (STL): in the middle
-// Typically I use sparse_hash_map when I care about space and/or when
-// I need to save the hashtable on disk.  I use hash_map otherwise.  I
-// don't personally use dense_hash_map ever; some people use it for
-// small maps with lots of lookups.
-//
-// - dense_hash_map has, typically, a factor of 2 memory overhead (if your
-//   data takes up X bytes, the hash_map uses X more bytes in overhead).
-// - sparse_hash_map has about 2 bits overhead per entry.
-// - sparse_hash_map can be 3-7 times slower than the others for lookup and,
-//   especially, inserts.  See time_hash_map.cc for details.
-//
-// See /usr/(local/)?doc/sparsehash-*/sparse_hash_map.html
-// for information about how to use this class.
-
-#ifndef _SPARSE_HASH_MAP_H_
-#define _SPARSE_HASH_MAP_H_
-
-#include <google/sparsehash/sparseconfig.h>
-#include <stdio.h>                   // for FILE * in read()/write()
-#include <algorithm>                 // for the default template args
-#include <functional>                // for equal_to
-#include <memory>                    // for alloc<>
-#include <utility>                   // for pair<>
-#include HASH_FUN_H                  // defined in config.h
-#include <google/sparsehash/sparsehashtable.h>
-
-
-_START_GOOGLE_NAMESPACE_
-
-using STL_NAMESPACE::pair;
-
-template <class Key, class T,
-          class HashFcn = SPARSEHASH_HASH<Key>,   // defined in sparseconfig.h
-          class EqualKey = STL_NAMESPACE::equal_to<Key>,
-          class Alloc = STL_NAMESPACE::allocator<T> >
-class sparse_hash_map {
- private:
-  // Apparently select1st is not stl-standard, so we define our own
-  struct SelectKey {
-    const Key& operator()(const pair<const Key, T>& p) const {
-      return p.first;
-    }
-  };
-  struct SetKey {
-    void operator()(pair<const Key, T>* value, const Key& new_key) const {
-      *const_cast<Key*>(&value->first) = new_key;
-      // It would be nice to clear the rest of value here as well, in
-      // case it's taking up a lot of memory.  We do this by clearing
-      // the value.  This assumes T has a zero-arg constructor!
-      value->second = T();
-    }
-  };
-
-  // The actual data
-  typedef sparse_hashtable<pair<const Key, T>, Key, HashFcn,
-                           SelectKey, SetKey, EqualKey, Alloc> ht;
-  ht rep;
-
- public:
-  typedef typename ht::key_type key_type;
-  typedef T data_type;
-  typedef T mapped_type;
-  typedef typename ht::value_type value_type;
-  typedef typename ht::hasher hasher;
-  typedef typename ht::key_equal key_equal;
-  typedef Alloc allocator_type;
-
-  typedef typename ht::size_type size_type;
-  typedef typename ht::difference_type difference_type;
-  typedef typename ht::pointer pointer;
-  typedef typename ht::const_pointer const_pointer;
-  typedef typename ht::reference reference;
-  typedef typename ht::const_reference const_reference;
-
-  typedef typename ht::iterator iterator;
-  typedef typename ht::const_iterator const_iterator;
-  typedef typename ht::local_iterator local_iterator;
-  typedef typename ht::const_local_iterator const_local_iterator;
-
-  // Iterator functions
-  iterator begin()                               { return rep.begin(); }
-  iterator end()                                 { return rep.end(); }
-  const_iterator begin() const                   { return rep.begin(); }
-  const_iterator end() const                     { return rep.end(); }
-
-  // These come from tr1's unordered_map. For us, a bucket has 0 or 1 elements.
-  local_iterator begin(size_type i)              { return rep.begin(i); }
-  local_iterator end(size_type i)                { return rep.end(i); }
-  const_local_iterator begin(size_type i) const  { return rep.begin(i); }
-  const_local_iterator end(size_type i) const    { return rep.end(i); }
-
-  // Accessor functions
-  // TODO(csilvers): implement Alloc get_allocator() const;
-  hasher hash_funct() const                      { return rep.hash_funct(); }
-  hasher hash_function() const                   { return hash_funct(); }
-  key_equal key_eq() const                       { return rep.key_eq(); }
-
-
-  // Constructors
-  explicit sparse_hash_map(size_type expected_max_items_in_table = 0,
-                           const hasher& hf = hasher(),
-                           const key_equal& eql = key_equal())
-    : rep(expected_max_items_in_table, hf, eql) { }
-
-  template <class InputIterator>
-  sparse_hash_map(InputIterator f, InputIterator l,
-                  size_type expected_max_items_in_table = 0,
-                  const hasher& hf = hasher(),
-                  const key_equal& eql = key_equal())
-    : rep(expected_max_items_in_table, hf, eql) {
-    rep.insert(f, l);
-  }
-  // We use the default copy constructor
-  // We use the default operator=()
-  // We use the default destructor
-
-  void clear()                        { rep.clear(); }
-  void swap(sparse_hash_map& hs)      { rep.swap(hs.rep); }
-
-
-  // Functions concerning size
-  size_type size() const              { return rep.size(); }
-  size_type max_size() const          { return rep.max_size(); }
-  bool empty() const                  { return rep.empty(); }
-  size_type bucket_count() const      { return rep.bucket_count(); }
-  size_type max_bucket_count() const  { return rep.max_bucket_count(); }
-
-  // These are tr1 methods.  bucket() is the bucket the key is or would be in.
-  size_type bucket_size(size_type i) const    { return rep.bucket_size(i); }
-  size_type bucket(const key_type& key) const { return rep.bucket(key); }
-  float load_factor() const {
-    return size() * 1.0f / bucket_count();
-  }
-  float max_load_factor() const {
-    float shrink, grow;
-    rep.get_resizing_parameters(&shrink, &grow);
-    return grow;
-  }
-  void max_load_factor(float new_grow) {
-    float shrink, grow;
-    rep.get_resizing_parameters(&shrink, &grow);
-    rep.set_resizing_parameters(shrink, new_grow);
-  }
-  // These aren't tr1 methods but perhaps ought to be.
-  float min_load_factor() const {
-    float shrink, grow;
-    rep.get_resizing_parameters(&shrink, &grow);
-    return shrink;
-  }
-  void min_load_factor(float new_shrink) {
-    float shrink, grow;
-    rep.get_resizing_parameters(&shrink, &grow);
-    rep.set_resizing_parameters(new_shrink, grow);
-  }
-  // Deprecated; use min_load_factor() or max_load_factor() instead.
-  void set_resizing_parameters(float shrink, float grow) {
-    return rep.set_resizing_parameters(shrink, grow);
-  }
-
-  void resize(size_type hint)         { rep.resize(hint); }
-  void rehash(size_type hint)         { resize(hint); }      // the tr1 name
-
-  // Lookup routines
-  iterator find(const key_type& key)                 { return rep.find(key); }
-  const_iterator find(const key_type& key) const     { return rep.find(key); }
-
-  data_type& operator[](const key_type& key) {       // This is our value-add!
-    iterator it = find(key);
-    if (it != end()) {
-      return it->second;
-    } else {
-      return insert(value_type(key, data_type())).first->second;
-    }
-  }
-
-  size_type count(const key_type& key) const         { return rep.count(key); }
-
-  pair<iterator, iterator> equal_range(const key_type& key) {
-    return rep.equal_range(key);
-  }
-  pair<const_iterator, const_iterator> equal_range(const key_type& key) const {
-    return rep.equal_range(key);
-  }
-
-  // Insertion routines
-  pair<iterator, bool> insert(const value_type& obj) { return rep.insert(obj); }
-  template <class InputIterator>
-  void insert(InputIterator f, InputIterator l)      { rep.insert(f, l); }
-  void insert(const_iterator f, const_iterator l)    { rep.insert(f, l); }
-  // required for std::insert_iterator; the passed-in iterator is ignored
-  iterator insert(iterator, const value_type& obj)   { return insert(obj).first; }
-
-
-  // Deletion routines
-  // THESE ARE NON-STANDARD!  I make you specify an "impossible" key
-  // value to identify deleted buckets.  You can change the key as
-  // time goes on, or get rid of it entirely to be insert-only.
-  void set_deleted_key(const key_type& key)   {
-    rep.set_deleted_key(key);
-  }
-  void clear_deleted_key()                    { rep.clear_deleted_key(); }
-
-  // These are standard
-  size_type erase(const key_type& key)               { return rep.erase(key); }
-  void erase(iterator it)                            { rep.erase(it); }
-  void erase(iterator f, iterator l)                 { rep.erase(f, l); }
-
-
-  // Comparison
-  bool operator==(const sparse_hash_map& hs) const   { return rep == hs.rep; }
-  bool operator!=(const sparse_hash_map& hs) const   { return rep != hs.rep; }
-
-
-  // I/O -- this is an add-on for writing metainformation to disk
-  bool write_metadata(FILE *fp)       { return rep.write_metadata(fp); }
-  bool read_metadata(FILE *fp)        { return rep.read_metadata(fp); }
-  bool write_nopointer_data(FILE *fp) { return rep.write_nopointer_data(fp); }
-  bool read_nopointer_data(FILE *fp)  { return rep.read_nopointer_data(fp); }
-};
-
-// We need a global swap as well
-template <class Key, class T, class HashFcn, class EqualKey, class Alloc>
-inline void swap(sparse_hash_map<Key, T, HashFcn, EqualKey, Alloc>& hm1,
-                 sparse_hash_map<Key, T, HashFcn, EqualKey, Alloc>& hm2) {
-  hm1.swap(hm2);
-}
-
-_END_GOOGLE_NAMESPACE_
-
-#endif /* _SPARSE_HASH_MAP_H_ */
diff --git a/ext/google/sparse_hash_set b/ext/google/sparse_hash_set
deleted file mode 100644
index e6849f6..0000000
--- a/ext/google/sparse_hash_set
+++ /dev/null
@@ -1,275 +0,0 @@
-// Copyright (c) 2005, Google Inc.
-// All rights reserved.
-// 
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-// 
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// ---
-// Author: Craig Silverstein
-//
-// This is just a very thin wrapper over sparsehashtable.h, just
-// like sgi stl's stl_hash_set is a very thin wrapper over
-// stl_hashtable.  The major thing we define is operator[], because
-// we have a concept of a data_type which stl_hashtable doesn't
-// (it only has a key and a value).
-//
-// This is more different from sparse_hash_map than you might think,
-// because all iterators for sets are const (you obviously can't
-// change the key, and for sets there is no value).
-//
-// We adhere mostly to the STL semantics for hash-set.  One important
-// exception is that insert() invalidates iterators entirely.  On the
-// plus side, though, delete() doesn't invalidate iterators at all, or
-// even change the ordering of elements.
-//
-// Here are a few "power user" tips:
-//
-//    1) set_deleted_key():
-//         Unlike STL's hash_map, if you want to use erase() you
-//         *must* call set_deleted_key() after construction.
-//
-//    2) resize(0):
-//         When an item is deleted, its memory isn't freed right
-//         away.  This allows you to iterate over a hashtable,
-//         and call erase(), without invalidating the iterator.
-//         To force the memory to be freed, call resize(0).
-//         For tr1 compatibility, this can also be called as rehash(0).
-//
-//    3) min_load_factor(0.0)
-//         Setting the minimum load factor to 0.0 guarantees that
-//         the hash table will never shrink.
-//
-// Guide to what kind of hash_set to use:
-//   (1) dense_hash_set: fastest, uses the most memory
-//   (2) sparse_hash_set: slowest, uses the least memory
-//   (3) hash_set /unordered_set (STL): in the middle
-// Typically I use sparse_hash_set when I care about space and/or when
-// I need to save the hashtable on disk.  I use hash_set otherwise.  I
-// don't personally use dense_hash_set ever; some people use it for
-// small sets with lots of lookups.
-//
-// - dense_hash_set has, typically, a factor of 2 memory overhead (if your
-//   data takes up X bytes, the hash_set uses X more bytes in overhead).
-// - sparse_hash_set has about 2 bits overhead per entry.
-// - sparse_hash_map can be 3-7 times slower than the others for lookup and,
-//   especially, inserts.  See time_hash_map.cc for details.
-//
-// See /usr/(local/)?doc/sparsehash-*/sparse_hash_set.html
-// for information about how to use this class.
-
-#ifndef _SPARSE_HASH_SET_H_
-#define _SPARSE_HASH_SET_H_
-
-#include <google/sparsehash/sparseconfig.h>
-#include <stdio.h>                    // for FILE * in read()/write()
-#include <algorithm>                  // for the default template args
-#include <functional>                // for equal_to
-#include <memory>                    // for alloc<>
-#include <utility>                   // for pair<>
-#include HASH_FUN_H                  // defined in config.h
-#include <google/sparsehash/sparsehashtable.h>
-
-_START_GOOGLE_NAMESPACE_
-
-using STL_NAMESPACE::pair;
-
-template <class Value,
-          class HashFcn = SPARSEHASH_HASH<Value>,  // defined in sparseconfig.h
-          class EqualKey = STL_NAMESPACE::equal_to<Value>,
-          class Alloc = STL_NAMESPACE::allocator<Value> >
-class sparse_hash_set {
- private:
-  // Apparently identity is not stl-standard, so we define our own
-  struct Identity {
-    Value& operator()(Value& v) const { return v; }
-    const Value& operator()(const Value& v) const { return v; }
-  };
-  struct SetKey {
-    void operator()(Value* value, const Value& new_key) const {
-      *value = new_key;
-    }
-  };
-
-  // The actual data
-  typedef sparse_hashtable<Value, Value, HashFcn,
-                           Identity, SetKey, EqualKey, Alloc> ht;
-  ht rep;
-
- public:
-  typedef typename ht::key_type key_type;
-  typedef typename ht::value_type value_type;
-  typedef typename ht::hasher hasher;
-  typedef typename ht::key_equal key_equal;
-  typedef Alloc allocator_type;
-
-  typedef typename ht::size_type size_type;
-  typedef typename ht::difference_type difference_type;
-  typedef typename ht::const_pointer pointer;
-  typedef typename ht::const_pointer const_pointer;
-  typedef typename ht::const_reference reference;
-  typedef typename ht::const_reference const_reference;
-
-  typedef typename ht::const_iterator iterator;
-  typedef typename ht::const_iterator const_iterator;
-  typedef typename ht::const_local_iterator local_iterator;
-  typedef typename ht::const_local_iterator const_local_iterator;
-
-
-  // Iterator functions -- recall all iterators are const
-  iterator begin() const                  { return rep.begin(); }
-  iterator end() const                    { return rep.end(); }
-
-  // These come from tr1's unordered_set. For us, a bucket has 0 or 1 elements.
-  local_iterator begin(size_type i) const { return rep.begin(i); }
-  local_iterator end(size_type i) const   { return rep.end(i); }
-
-
-  // Accessor functions
-  // TODO(csilvers): implement Alloc get_allocator() const;
-  hasher hash_funct() const               { return rep.hash_funct(); }
-  hasher hash_function() const            { return hash_funct(); }  // tr1 name
-  key_equal key_eq() const                { return rep.key_eq(); }
-
-
-  // Constructors
-  explicit sparse_hash_set(size_type expected_max_items_in_table = 0,
-                           const hasher& hf = hasher(),
-                           const key_equal& eql = key_equal())
-    : rep(expected_max_items_in_table, hf, eql) { }
-
-  template <class InputIterator>
-  sparse_hash_set(InputIterator f, InputIterator l,
-                  size_type expected_max_items_in_table = 0,
-                  const hasher& hf = hasher(),
-                  const key_equal& eql = key_equal())
-      : rep(expected_max_items_in_table, hf, eql) {
-    rep.insert(f, l);
-  }
-  // We use the default copy constructor
-  // We use the default operator=()
-  // We use the default destructor
-
-  void clear()                        { rep.clear(); }
-  void swap(sparse_hash_set& hs)      { rep.swap(hs.rep); }
-
-
-  // Functions concerning size
-  size_type size() const              { return rep.size(); }
-  size_type max_size() const          { return rep.max_size(); }
-  bool empty() const                  { return rep.empty(); }
-  size_type bucket_count() const      { return rep.bucket_count(); }
-  size_type max_bucket_count() const  { return rep.max_bucket_count(); }
-
-  // These are tr1 methods.  bucket() is the bucket the key is or would be in.
-  size_type bucket_size(size_type i) const    { return rep.bucket_size(i); }
-  size_type bucket(const key_type& key) const { return rep.bucket(key); }
-  float load_factor() const {
-    return size() * 1.0f / bucket_count();
-  }
-  float max_load_factor() const {
-    float shrink, grow;
-    rep.get_resizing_parameters(&shrink, &grow);
-    return grow;
-  }
-  void max_load_factor(float new_grow) {
-    float shrink, grow;
-    rep.get_resizing_parameters(&shrink, &grow);
-    rep.set_resizing_parameters(shrink, new_grow);
-  }
-  // These aren't tr1 methods but perhaps ought to be.
-  float min_load_factor() const {
-    float shrink, grow;
-    rep.get_resizing_parameters(&shrink, &grow);
-    return shrink;
-  }
-  void min_load_factor(float new_shrink) {
-    float shrink, grow;
-    rep.get_resizing_parameters(&shrink, &grow);
-    rep.set_resizing_parameters(new_shrink, grow);
-  }
-  // Deprecated; use min_load_factor() or max_load_factor() instead.
-  void set_resizing_parameters(float shrink, float grow) {
-    return rep.set_resizing_parameters(shrink, grow);
-  }
-
-  void resize(size_type hint)         { rep.resize(hint); }
-  void rehash(size_type hint)         { resize(hint); }     // the tr1 name
-
-  // Lookup routines
-  iterator find(const key_type& key) const           { return rep.find(key); }
-
-  size_type count(const key_type& key) const         { return rep.count(key); }
-
-  pair<iterator, iterator> equal_range(const key_type& key) const {
-    return rep.equal_range(key);
-  }
-
-  // Insertion routines
-  pair<iterator, bool> insert(const value_type& obj) {
-    pair<typename ht::iterator, bool> p = rep.insert(obj);
-    return pair<iterator, bool>(p.first, p.second);   // const to non-const
-  }
-  template <class InputIterator>
-  void insert(InputIterator f, InputIterator l)      { rep.insert(f, l); }
-  void insert(const_iterator f, const_iterator l)    { rep.insert(f, l); }
-  // required for std::insert_iterator; the passed-in iterator is ignored
-  iterator insert(iterator, const value_type& obj)   { return insert(obj).first; }
-
-
-  // Deletion routines
-  // THESE ARE NON-STANDARD!  I make you specify an "impossible" key
-  // value to identify deleted buckets.  You can change the key as
-  // time goes on, or get rid of it entirely to be insert-only.
-  void set_deleted_key(const key_type& key)   { rep.set_deleted_key(key); }
-  void clear_deleted_key()                    { rep.clear_deleted_key(); }
-
-  // These are standard
-  size_type erase(const key_type& key)               { return rep.erase(key); }
-  void erase(iterator it)                            { rep.erase(it); }
-  void erase(iterator f, iterator l)                 { rep.erase(f, l); }
-
-
-  // Comparison
-  bool operator==(const sparse_hash_set& hs) const   { return rep == hs.rep; }
-  bool operator!=(const sparse_hash_set& hs) const   { return rep != hs.rep; }
-
-
-  // I/O -- this is an add-on for writing metainformation to disk
-  bool write_metadata(FILE *fp)       { return rep.write_metadata(fp); }
-  bool read_metadata(FILE *fp)        { return rep.read_metadata(fp); }
-  bool write_nopointer_data(FILE *fp) { return rep.write_nopointer_data(fp); }
-  bool read_nopointer_data(FILE *fp)  { return rep.read_nopointer_data(fp); }
-};
-
-template <class Val, class HashFcn, class EqualKey, class Alloc>
-inline void swap(sparse_hash_set<Val, HashFcn, EqualKey, Alloc>& hs1,
-                 sparse_hash_set<Val, HashFcn, EqualKey, Alloc>& hs2) {
-  hs1.swap(hs2);
-}
-
-_END_GOOGLE_NAMESPACE_
-
-#endif /* _SPARSE_HASH_SET_H_ */
diff --git a/ext/google/sparsehash/densehashtable.h b/ext/google/sparsehash/densehashtable.h
deleted file mode 100644
index 18ff7d6..0000000
--- a/ext/google/sparsehash/densehashtable.h
+++ /dev/null
@@ -1,1062 +0,0 @@
-// Copyright (c) 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// ---
-// Author: Craig Silverstein
-//
-// A dense hashtable is a particular implementation of
-// a hashtable: one that is meant to minimize memory allocation.
-// It does this by using an array to store all the data.  We
-// steal a value from the key space to indicate "empty" array
-// elements (ie indices where no item lives) and another to indicate
-// "deleted" elements.
-//
-// (Note it is possible to change the value of the delete key
-// on the fly; you can even remove it, though after that point
-// the hashtable is insert_only until you set it again.  The empty
-// value however can't be changed.)
-//
-// To minimize allocation and pointer overhead, we use internal
-// probing, in which the hashtable is a single table, and collisions
-// are resolved by trying to insert again in another bucket.  The
-// most cache-efficient internal probing schemes are linear probing
-// (which suffers, alas, from clumping) and quadratic probing, which
-// is what we implement by default.
-//
-// Type requirements: value_type is required to be Copy Constructible
-// and Default Constructible. It is not required to be (and commonly
-// isn't) Assignable.
-//
-// You probably shouldn't use this code directly.  Use
-// <google/dense_hash_map> or <google/dense_hash_set> instead.
-
-// You can change the following below:
-// HT_OCCUPANCY_FLT      -- how full before we double size
-// HT_EMPTY_FLT          -- how empty before we halve size
-// HT_MIN_BUCKETS        -- default smallest bucket size
-//
-// You can also change enlarge_resize_percent (which defaults to
-// HT_OCCUPANCY_FLT), and shrink_resize_percent (which defaults to
-// HT_EMPTY_FLT) with set_resizing_parameters().
-//
-// How to decide what values to use?
-// shrink_resize_percent's default of .4 * OCCUPANCY_FLT, is probably good.
-// HT_MIN_BUCKETS is probably unnecessary since you can specify
-// (indirectly) the starting number of buckets at construct-time.
-// For enlarge_resize_percent, you can use this chart to try to trade-off
-// expected lookup time to the space taken up.  By default, this
-// code uses quadratic probing, though you can change it to linear
-// via _JUMP below if you really want to.
-//
-// From http://www.augustana.ca/~mohrj/courses/1999.fall/csc210/lecture_notes/hashing.html
-// NUMBER OF PROBES / LOOKUP       Successful            Unsuccessful
-// Quadratic collision resolution   1 - ln(1-L) - L/2    1/(1-L) - L - ln(1-L)
-// Linear collision resolution     [1+1/(1-L)]/2         [1+1/(1-L)2]/2
-//
-// -- enlarge_resize_percent --         0.10  0.50  0.60  0.75  0.80  0.90  0.99
-// QUADRATIC COLLISION RES.
-//    probes/successful lookup    1.05  1.44  1.62  2.01  2.21  2.85  5.11
-//    probes/unsuccessful lookup  1.11  2.19  2.82  4.64  5.81  11.4  103.6
-// LINEAR COLLISION RES.
-//    probes/successful lookup    1.06  1.5   1.75  2.5   3.0   5.5   50.5
-//    probes/unsuccessful lookup  1.12  2.5   3.6   8.5   13.0  50.0  5000.0
-
-#ifndef _DENSEHASHTABLE_H_
-#define _DENSEHASHTABLE_H_
-
-// The probing method
-// Linear probing
-// #define JUMP_(key, num_probes)    ( 1 )
-// Quadratic-ish probing
-#define JUMP_(key, num_probes)    ( num_probes )
-
-
-#include <google/sparsehash/sparseconfig.h>
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>             // for abort()
-#include <algorithm>            // For swap(), eg
-#include <iostream>             // For cerr
-#include <memory>               // For uninitialized_fill, uninitialized_copy
-#include <utility>              // for pair<>
-#include <iterator>             // for facts about iterator tags
-#include <google/type_traits.h> // for true_type, integral_constant, etc.
-
-_START_GOOGLE_NAMESPACE_
-
-using STL_NAMESPACE::pair;
-
-// Hashtable class, used to implement the hashed associative containers
-// hash_set and hash_map.
-
-// Value: what is stored in the table (each bucket is a Value).
-// Key: something in a 1-to-1 correspondence to a Value, that can be used
-//      to search for a Value in the table (find() takes a Key).
-// HashFcn: Takes a Key and returns an integer, the more unique the better.
-// ExtractKey: given a Value, returns the unique Key associated with it.
-// SetKey: given a Value* and a Key, modifies the value such that
-//         ExtractKey(value) == key.  We guarantee this is only called
-//         with key == deleted_key or key == empty_key.
-// EqualKey: Given two Keys, says whether they are the same (that is,
-//           if they are both associated with the same Value).
-// Alloc: STL allocator to use to allocate memory.  Currently ignored.
-
-template <class Value, class Key, class HashFcn,
-          class ExtractKey, class SetKey, class EqualKey, class Alloc>
-class dense_hashtable;
-
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-struct dense_hashtable_iterator;
-
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-struct dense_hashtable_const_iterator;
-
-// We're just an array, but we need to skip over empty and deleted elements
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-struct dense_hashtable_iterator {
- public:
-  typedef dense_hashtable_iterator<V,K,HF,ExK,SetK,EqK,A>       iterator;
-  typedef dense_hashtable_const_iterator<V,K,HF,ExK,SetK,EqK,A> const_iterator;
-
-  typedef STL_NAMESPACE::forward_iterator_tag iterator_category;
-  typedef V value_type;
-  typedef ptrdiff_t difference_type;
-  typedef size_t size_type;
-  typedef V& reference;                // Value
-  typedef V* pointer;
-
-  // "Real" constructor and default constructor
-  dense_hashtable_iterator(const dense_hashtable<V,K,HF,ExK,SetK,EqK,A> *h,
-                           pointer it, pointer it_end, bool advance)
-    : ht(h), pos(it), end(it_end)   {
-    if (advance)  advance_past_empty_and_deleted();
-  }
-  dense_hashtable_iterator() { }
-  // The default destructor is fine; we don't define one
-  // The default operator= is fine; we don't define one
-
-  // Happy dereferencer
-  reference operator*() const { return *pos; }
-  pointer operator->() const { return &(operator*()); }
-
-  // Arithmetic.  The only hard part is making sure that
-  // we're not on an empty or marked-deleted array element
-  void advance_past_empty_and_deleted() {
-    while ( pos != end && (ht->test_empty(*this) || ht->test_deleted(*this)) )
-      ++pos;
-  }
-  iterator& operator++()   {
-    assert(pos != end); ++pos; advance_past_empty_and_deleted(); return *this;
-  }
-  iterator operator++(int) { iterator tmp(*this); ++*this; return tmp; }
-
-  // Comparison.
-  bool operator==(const iterator& it) const { return pos == it.pos; }
-  bool operator!=(const iterator& it) const { return pos != it.pos; }
-
-
-  // The actual data
-  const dense_hashtable<V,K,HF,ExK,SetK,EqK,A> *ht;
-  pointer pos, end;
-};
-
-
-// Now do it all again, but with const-ness!
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-struct dense_hashtable_const_iterator {
- public:
-  typedef dense_hashtable_iterator<V,K,HF,ExK,SetK,EqK,A>       iterator;
-  typedef dense_hashtable_const_iterator<V,K,HF,ExK,SetK,EqK,A> const_iterator;
-
-  typedef STL_NAMESPACE::forward_iterator_tag iterator_category;
-  typedef V value_type;
-  typedef ptrdiff_t difference_type;
-  typedef size_t size_type;
-  typedef const V& reference;                // Value
-  typedef const V* pointer;
-
-  // "Real" constructor and default constructor
-  dense_hashtable_const_iterator(
-      const dense_hashtable<V,K,HF,ExK,SetK,EqK,A> *h,
-      pointer it, pointer it_end, bool advance)
-    : ht(h), pos(it), end(it_end)   {
-    if (advance)  advance_past_empty_and_deleted();
-  }
-  dense_hashtable_const_iterator() { }
-  // This lets us convert regular iterators to const iterators
-  dense_hashtable_const_iterator(const iterator &it)
-    : ht(it.ht), pos(it.pos), end(it.end) { }
-  // The default destructor is fine; we don't define one
-  // The default operator= is fine; we don't define one
-
-  // Happy dereferencer
-  reference operator*() const { return *pos; }
-  pointer operator->() const { return &(operator*()); }
-
-  // Arithmetic.  The only hard part is making sure that
-  // we're not on an empty or marked-deleted array element
-  void advance_past_empty_and_deleted() {
-    while ( pos != end && (ht->test_empty(*this) || ht->test_deleted(*this)) )
-      ++pos;
-  }
-  const_iterator& operator++()   {
-    assert(pos != end); ++pos; advance_past_empty_and_deleted(); return *this;
-  }
-  const_iterator operator++(int) { const_iterator tmp(*this); ++*this; return tmp; }
-
-  // Comparison.
-  bool operator==(const const_iterator& it) const { return pos == it.pos; }
-  bool operator!=(const const_iterator& it) const { return pos != it.pos; }
-
-
-  // The actual data
-  const dense_hashtable<V,K,HF,ExK,SetK,EqK,A> *ht;
-  pointer pos, end;
-};
-
-template <class Value, class Key, class HashFcn,
-          class ExtractKey, class SetKey, class EqualKey, class Alloc>
-class dense_hashtable {
- public:
-  typedef Key key_type;
-  typedef Value value_type;
-  typedef HashFcn hasher;
-  typedef EqualKey key_equal;
-
-  typedef size_t            size_type;
-  typedef ptrdiff_t         difference_type;
-  typedef value_type*       pointer;
-  typedef const value_type* const_pointer;
-  typedef value_type&       reference;
-  typedef const value_type& const_reference;
-  typedef dense_hashtable_iterator<Value, Key, HashFcn,
-                                   ExtractKey, SetKey, EqualKey, Alloc>
-  iterator;
-
-  typedef dense_hashtable_const_iterator<Value, Key, HashFcn,
-                                         ExtractKey, SetKey, EqualKey, Alloc>
-  const_iterator;
-
-  // These come from tr1.  For us they're the same as regular iterators.
-  typedef iterator local_iterator;
-  typedef const_iterator const_local_iterator;
-
-  // How full we let the table get before we resize, by default.
-  // Knuth says .8 is good -- higher causes us to probe too much,
-  // though it saves memory.
-  static const float HT_OCCUPANCY_FLT; // = 0.5;
-
-  // How empty we let the table get before we resize lower, by default.
-  // (0.0 means never resize lower.)
-  // It should be less than OCCUPANCY_FLT / 2 or we thrash resizing
-  static const float HT_EMPTY_FLT; // = 0.4 * HT_OCCUPANCY_FLT
-
-  // Minimum size we're willing to let hashtables be.
-  // Must be a power of two, and at least 4.
-  // Note, however, that for a given hashtable, the initial size is a
-  // function of the first constructor arg, and may be >HT_MIN_BUCKETS.
-  static const size_t HT_MIN_BUCKETS = 4;
-
-  // By default, if you don't specify a hashtable size at
-  // construction-time, we use this size.  Must be a power of two, and
-  // at least HT_MIN_BUCKETS.
-  static const size_t HT_DEFAULT_STARTING_BUCKETS = 32;
-
-
-  // ITERATOR FUNCTIONS
-  iterator begin()             { return iterator(this, table,
-                                                 table + num_buckets, true); }
-  iterator end()               { return iterator(this, table + num_buckets,
-                                                 table + num_buckets, true); }
-  const_iterator begin() const { return const_iterator(this, table,
-                                                       table+num_buckets,true);}
-  const_iterator end() const   { return const_iterator(this, table + num_buckets,
-                                                       table+num_buckets,true);}
-
-  // These come from tr1 unordered_map.  They iterate over 'bucket' n.
-  // For sparsehashtable, we could consider each 'group' to be a bucket,
-  // I guess, but I don't really see the point.  We'll just consider
-  // bucket n to be the n-th element of the sparsetable, if it's occupied,
-  // or some empty element, otherwise.
-  local_iterator begin(size_type i) {
-    return local_iterator(this, table + i, table + i+1, false);
-  }
-  local_iterator end(size_type i) {
-    local_iterator it = begin(i);
-    if (!test_empty(i) && !test_deleted(i))
-      ++it;
-    return it;
-  }
-  const_local_iterator begin(size_type i) const {
-    return const_local_iterator(this, table + i, table + i+1, false);
-  }
-  const_local_iterator end(size_type i) const {
-    const_local_iterator it = begin(i);
-    if (!test_empty(i) && !test_deleted(i))
-      ++it;
-    return it;
-  }
-
-  // ACCESSOR FUNCTIONS for the things we templatize on, basically
-  hasher hash_funct() const { return hash; }
-  key_equal key_eq() const  { return equals; }
-
- private:
-  // Annoyingly, we can't copy values around, because they might have
-  // const components (they're probably pair<const X, Y>).  We use
-  // explicit destructor invocation and placement new to get around
-  // this.  Arg.
-  void set_value(value_type* dst, const value_type& src) {
-    dst->~value_type();
-    new(dst) value_type(src);
-  }
-
-  void destroy_buckets(size_type first, size_type last) {
-    for ( ; first != last; ++first)
-      table[first].~value_type();
-  }
-
-  // DELETE HELPER FUNCTIONS
-  // This lets the user describe a key that will indicate deleted
-  // table entries.  This key should be an "impossible" entry --
-  // if you try to insert it for real, you won't be able to retrieve it!
-  // (NB: while you pass in an entire value, only the key part is looked
-  // at.  This is just because I don't know how to assign just a key.)
- private:
-  void squash_deleted() {           // gets rid of any deleted entries we have
-    if ( num_deleted ) {            // get rid of deleted before writing
-      dense_hashtable tmp(*this);   // copying will get rid of deleted
-      swap(tmp);                    // now we are tmp
-    }
-    assert(num_deleted == 0);
-  }
-
- public:
-  void set_deleted_key(const key_type &key) {
-    // the empty indicator (if specified) and the deleted indicator
-    // must be different
-    assert(!use_empty || !equals(key, get_key(emptyval)));
-    // It's only safe to change what "deleted" means if we purge deleted guys
-    squash_deleted();
-    use_deleted = true;
-    delkey = key;
-  }
-  void clear_deleted_key() {
-    squash_deleted();
-    use_deleted = false;
-  }
-
-  // These are public so the iterators can use them
-  // True if the item at position bucknum is "deleted" marker
-  bool test_deleted(size_type bucknum) const {
-    // The num_deleted test is crucial for read(): after read(), the ht values
-    // are garbage, and we don't want to think some of them are deleted.
-    return (use_deleted && num_deleted > 0 &&
-            equals(delkey, get_key(table[bucknum])));
-  }
-  bool test_deleted(const iterator &it) const {
-    return (use_deleted && num_deleted > 0 &&
-            equals(delkey, get_key(*it)));
-  }
-  bool test_deleted(const const_iterator &it) const {
-    return (use_deleted && num_deleted > 0 &&
-            equals(delkey, get_key(*it)));
-  }
-  // Set it so test_deleted is true.  true if object didn't used to be deleted
-  // See below (at erase()) to explain why we allow const_iterators
-  bool set_deleted(const_iterator &it) {
-    assert(use_deleted);             // bad if set_deleted_key() wasn't called
-    bool retval = !test_deleted(it);
-    // &* converts from iterator to value-type
-    set_key(const_cast<value_type*>(&(*it)), delkey);
-    return retval;
-  }
-  // Set it so test_deleted is false.  true if object used to be deleted
-  bool clear_deleted(const_iterator &it) {
-    assert(use_deleted);             // bad if set_deleted_key() wasn't called
-    // happens automatically when we assign something else in its place
-    return test_deleted(it);
-  }
-
-  // EMPTY HELPER FUNCTIONS
-  // This lets the user describe a key that will indicate empty (unused)
-  // table entries.  This key should be an "impossible" entry --
-  // if you try to insert it for real, you won't be able to retrieve it!
-  // (NB: while you pass in an entire value, only the key part is looked
-  // at.  This is just because I don't know how to assign just a key.)
- public:
-  // These are public so the iterators can use them
-  // True if the item at position bucknum is "empty" marker
-  bool test_empty(size_type bucknum) const {
-    assert(use_empty);              // we always need to know what's empty!
-    return equals(get_key(emptyval), get_key(table[bucknum]));
-  }
-  bool test_empty(const iterator &it) const {
-    assert(use_empty);              // we always need to know what's empty!
-    return equals(get_key(emptyval), get_key(*it));
-  }
-  bool test_empty(const const_iterator &it) const {
-    assert(use_empty);              // we always need to know what's empty!
-    return equals(get_key(emptyval), get_key(*it));
-  }
-
- private:
-  // You can either set a range empty or an individual element
-  void set_empty(size_type bucknum) {
-    assert(use_empty);
-    set_value(&table[bucknum], emptyval);
-  }
-  void fill_range_with_empty(value_type* table_start, value_type* table_end) {
-    // Like set_empty(range), but doesn't destroy previous contents
-    STL_NAMESPACE::uninitialized_fill(table_start, table_end, emptyval);
-  }
-  void set_empty(size_type buckstart, size_type buckend) {
-    assert(use_empty);
-    destroy_buckets(buckstart, buckend);
-    fill_range_with_empty(table + buckstart, table + buckend);
-  }
-
- public:
-  // TODO(csilvers): change all callers of this to pass in a key instead,
-  //                 and take a const key_type instead of const value_type.
-  void set_empty_key(const value_type &val) {
-    // Once you set the empty key, you can't change it
-    assert(!use_empty);
-    // The deleted indicator (if specified) and the empty indicator
-    // must be different.
-    assert(!use_deleted || !equals(get_key(val), delkey));
-    use_empty = true;
-    set_value(&emptyval, val);
-
-    assert(!table);                  // must set before first use
-    // num_buckets was set in constructor even though table was NULL
-    table = (value_type *) malloc(num_buckets * sizeof(*table));
-    assert(table);
-    fill_range_with_empty(table, table + num_buckets);
-  }
-
-  // FUNCTIONS CONCERNING SIZE
- public:
-  size_type size() const      { return num_elements - num_deleted; }
-  // Buckets are always a power of 2
-  size_type max_size() const  { return (size_type(-1) >> 1U) + 1; }
-  bool empty() const          { return size() == 0; }
-  size_type bucket_count() const      { return num_buckets; }
-  size_type max_bucket_count() const  { return max_size(); }
-  size_type nonempty_bucket_count() const { return num_elements; }
-  // These are tr1 methods.  Their idea of 'bucket' doesn't map well to
-  // what we do.  We just say every bucket has 0 or 1 items in it.
-  size_type bucket_size(size_type i) const {
-    return begin(i) == end(i) ? 0 : 1;
-  }
-
-
-
- private:
-  // Because of the above, size_type(-1) is never legal; use it for errors
-  static const size_type ILLEGAL_BUCKET = size_type(-1);
-
- private:
-  // This is the smallest size a hashtable can be without being too crowded
-  // If you like, you can give a min #buckets as well as a min #elts
-  size_type min_size(size_type num_elts, size_type min_buckets_wanted) {
-    size_type sz = HT_MIN_BUCKETS;             // min buckets allowed
-    while ( sz < min_buckets_wanted || num_elts >= sz * enlarge_resize_percent )
-      sz *= 2;
-    return sz;
-  }
-
-  // Used after a string of deletes
-  void maybe_shrink() {
-    assert(num_elements >= num_deleted);
-    assert((bucket_count() & (bucket_count()-1)) == 0); // is a power of two
-    assert(bucket_count() >= HT_MIN_BUCKETS);
-
-    // If you construct a hashtable with < HT_DEFAULT_STARTING_BUCKETS,
-    // we'll never shrink until you get relatively big, and we'll never
-    // shrink below HT_DEFAULT_STARTING_BUCKETS.  Otherwise, something
-    // like "dense_hash_set<int> x; x.insert(4); x.erase(4);" will
-    // shrink us down to HT_MIN_BUCKETS buckets, which is too small.
-    if (shrink_threshold > 0 &&
-        (num_elements-num_deleted) < shrink_threshold &&
-        bucket_count() > HT_DEFAULT_STARTING_BUCKETS ) {
-      size_type sz = bucket_count() / 2;    // find how much we should shrink
-      while ( sz > HT_DEFAULT_STARTING_BUCKETS &&
-              (num_elements - num_deleted) < sz * shrink_resize_percent )
-        sz /= 2;                            // stay a power of 2
-      dense_hashtable tmp(*this, sz);       // Do the actual resizing
-      swap(tmp);                            // now we are tmp
-    }
-    consider_shrink = false;                // because we just considered it
-  }
-
-  // We'll let you resize a hashtable -- though this makes us copy all!
-  // When you resize, you say, "make it big enough for this many more elements"
-  void resize_delta(size_type delta) {
-    if ( consider_shrink )                   // see if lots of deletes happened
-      maybe_shrink();
-    if ( bucket_count() > HT_MIN_BUCKETS &&
-         (num_elements + delta) <= enlarge_threshold )
-      return;                                // we're ok as we are
-
-    // Sometimes, we need to resize just to get rid of all the
-    // "deleted" buckets that are clogging up the hashtable.  So when
-    // deciding whether to resize, count the deleted buckets (which
-    // are currently taking up room).  But later, when we decide what
-    // size to resize to, *don't* count deleted buckets, since they
-    // get discarded during the resize.
-    const size_type needed_size = min_size(num_elements + delta, 0);
-    if ( needed_size > bucket_count() ) {      // we don't have enough buckets
-      const size_type resize_to = min_size(num_elements - num_deleted + delta,
-                                           0);
-      dense_hashtable tmp(*this, resize_to);
-      swap(tmp);                             // now we are tmp
-    }
-  }
-
-  // Increase number of buckets, assuming value_type has trivial copy
-  // constructor and destructor.  (Really, we want it to have "trivial
-  // move", because that's what realloc does.  But there's no way to
-  // capture that using type_traits, so we pretend that move(x, y) is
-  // equivalent to "x.~T(); new(x) T(y);" which is pretty much
-  // correct, if a bit conservative.)
-  void expand_array(size_t resize_to, true_type) {
-    table = (value_type *) realloc(table, resize_to * sizeof(value_type));
-    assert(table);
-    fill_range_with_empty(table + num_buckets, table + resize_to);
-  }
-
-  // Increase number of buckets, without special assumptions about value_type.
-  // TODO(austern): make this exception safe. Handle exceptions from
-  // value_type's copy constructor.
-  void expand_array(size_t resize_to, false_type) {
-    value_type* new_table =
-      (value_type *) malloc(resize_to * sizeof(value_type));
-    assert(new_table);
-    STL_NAMESPACE::uninitialized_copy(table, table + num_buckets, new_table);
-    fill_range_with_empty(new_table + num_buckets, new_table + resize_to);
-    destroy_buckets(0, num_buckets);
-    free(table);
-    table = new_table;
-  }
-
-  // Used to actually do the rehashing when we grow/shrink a hashtable
-  void copy_from(const dense_hashtable &ht, size_type min_buckets_wanted) {
-    clear();            // clear table, set num_deleted to 0
-
-    // If we need to change the size of our table, do it now
-    const size_type resize_to = min_size(ht.size(), min_buckets_wanted);
-    if ( resize_to > bucket_count() ) { // we don't have enough buckets
-      typedef integral_constant<bool,
-          (has_trivial_copy<value_type>::value &&
-           has_trivial_destructor<value_type>::value)>
-          realloc_ok; // we pretend mv(x,y) == "x.~T(); new(x) T(y)"
-      expand_array(resize_to, realloc_ok());
-      num_buckets = resize_to;
-      reset_thresholds();
-    }
-
-    // We use a normal iterator to get non-deleted bcks from ht
-    // We could use insert() here, but since we know there are
-    // no duplicates and no deleted items, we can be more efficient
-    assert((bucket_count() & (bucket_count()-1)) == 0);      // a power of two
-    for ( const_iterator it = ht.begin(); it != ht.end(); ++it ) {
-      size_type num_probes = 0;              // how many times we've probed
-      size_type bucknum;
-      const size_type bucket_count_minus_one = bucket_count() - 1;
-      for (bucknum = hash(get_key(*it)) & bucket_count_minus_one;
-           !test_empty(bucknum);                               // not empty
-           bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one) {
-        ++num_probes;
-        assert(num_probes < bucket_count()); // or else the hashtable is full
-      }
-      set_value(&table[bucknum], *it);       // copies the value to here
-      num_elements++;
-    }
-  }
-
-  // Required by the spec for hashed associative container
- public:
-  // Though the docs say this should be num_buckets, I think it's much
-  // more useful as req_elements.  As a special feature, calling with
-  // req_elements==0 will cause us to shrink if we can, saving space.
-  void resize(size_type req_elements) {       // resize to this or larger
-    if ( consider_shrink || req_elements == 0 )
-      maybe_shrink();
-    if ( req_elements > num_elements )
-      return resize_delta(req_elements - num_elements);
-  }
-
-  // Get and change the value of shrink_resize_percent and
-  // enlarge_resize_percent.  The description at the beginning of this
-  // file explains how to choose the values.  Setting the shrink
-  // parameter to 0.0 ensures that the table never shrinks.
-  void get_resizing_parameters(float* shrink, float* grow) const {
-    *shrink = shrink_resize_percent;
-    *grow = enlarge_resize_percent;
-  }
-  void set_resizing_parameters(float shrink, float grow) {
-    assert(shrink >= 0.0);
-    assert(grow <= 1.0);
-    if (shrink > grow/2.0f)
-      shrink = grow / 2.0f;     // otherwise we thrash hashtable size
-    shrink_resize_percent = shrink;
-    enlarge_resize_percent = grow;
-    reset_thresholds();
-  }
-
-  // CONSTRUCTORS -- as required by the specs, we take a size,
-  // but also let you specify a hashfunction, key comparator,
-  // and key extractor.  We also define a copy constructor and =.
-  // DESTRUCTOR -- needs to free the table
-  explicit dense_hashtable(size_type expected_max_items_in_table = 0,
-                           const HashFcn& hf = HashFcn(),
-                           const EqualKey& eql = EqualKey(),
-                           const ExtractKey& ext = ExtractKey(),
-                           const SetKey& set = SetKey())
-    : hash(hf), equals(eql), get_key(ext), set_key(set), num_deleted(0),
-      use_deleted(false), use_empty(false),
-      delkey(), emptyval(), enlarge_resize_percent(HT_OCCUPANCY_FLT),
-      shrink_resize_percent(HT_EMPTY_FLT), table(NULL),
-      num_buckets(expected_max_items_in_table == 0
-                  ? HT_DEFAULT_STARTING_BUCKETS
-                  : min_size(expected_max_items_in_table, 0)),
-      num_elements(0) {
-    // table is NULL until emptyval is set.  However, we set num_buckets
-    // here so we know how much space to allocate once emptyval is set
-    reset_thresholds();
-  }
-
-  // As a convenience for resize(), we allow an optional second argument
-  // which lets you make this new hashtable a different size than ht
-  dense_hashtable(const dense_hashtable& ht,
-                  size_type min_buckets_wanted = HT_DEFAULT_STARTING_BUCKETS)
-    : hash(ht.hash), equals(ht.equals),
-      get_key(ht.get_key), set_key(ht.set_key), num_deleted(0),
-      use_deleted(ht.use_deleted), use_empty(ht.use_empty),
-      delkey(ht.delkey), emptyval(ht.emptyval),
-      enlarge_resize_percent(ht.enlarge_resize_percent),
-      shrink_resize_percent(ht.shrink_resize_percent), table(NULL),
-      num_buckets(0), num_elements(0) {
-    reset_thresholds();
-    copy_from(ht, min_buckets_wanted);   // copy_from() ignores deleted entries
-  }
-
-  dense_hashtable& operator= (const dense_hashtable& ht) {
-    if (&ht == this)  return *this;        // don't copy onto ourselves
-    clear();
-    hash = ht.hash;
-    equals = ht.equals;
-    get_key = ht.get_key;
-    set_key = ht.set_key;
-    use_deleted = ht.use_deleted;
-    use_empty = ht.use_empty;
-    delkey = ht.delkey;
-    set_value(&emptyval, ht.emptyval);
-    enlarge_resize_percent = ht.enlarge_resize_percent;
-    shrink_resize_percent = ht.shrink_resize_percent;
-    copy_from(ht, HT_MIN_BUCKETS);         // sets num_deleted to 0 too
-    return *this;
-  }
-
-  ~dense_hashtable() {
-    if (table) {
-      destroy_buckets(0, num_buckets);
-      free(table);
-    }
-  }
-
-  // Many STL algorithms use swap instead of copy constructors
-  void swap(dense_hashtable& ht) {
-    STL_NAMESPACE::swap(hash, ht.hash);
-    STL_NAMESPACE::swap(equals, ht.equals);
-    STL_NAMESPACE::swap(get_key, ht.get_key);
-    STL_NAMESPACE::swap(set_key, ht.set_key);
-    STL_NAMESPACE::swap(num_deleted, ht.num_deleted);
-    STL_NAMESPACE::swap(use_deleted, ht.use_deleted);
-    STL_NAMESPACE::swap(use_empty, ht.use_empty);
-    STL_NAMESPACE::swap(enlarge_resize_percent, ht.enlarge_resize_percent);
-    STL_NAMESPACE::swap(shrink_resize_percent, ht.shrink_resize_percent);
-    STL_NAMESPACE::swap(delkey, ht.delkey);
-    { value_type tmp;     // for annoying reasons, swap() doesn't work
-      set_value(&tmp, emptyval);
-      set_value(&emptyval, ht.emptyval);
-      set_value(&ht.emptyval, tmp);
-    }
-    STL_NAMESPACE::swap(table, ht.table);
-    STL_NAMESPACE::swap(num_buckets, ht.num_buckets);
-    STL_NAMESPACE::swap(num_elements, ht.num_elements);
-    reset_thresholds();
-    ht.reset_thresholds();
-  }
-
-  // It's always nice to be able to clear a table without deallocating it
-  void clear() {
-    if (table)
-      destroy_buckets(0, num_buckets);
-    num_buckets = min_size(0,0);          // our new size
-    reset_thresholds();
-    table = (value_type *) realloc(table, num_buckets * sizeof(*table));
-    assert(table);
-    fill_range_with_empty(table, table + num_buckets);
-    num_elements = 0;
-    num_deleted = 0;
-  }
-
-  // Clear the table without resizing it.
-  // Mimicks the stl_hashtable's behaviour when clear()-ing in that it
-  // does not modify the bucket count
-  void clear_no_resize() {
-    if (table) {
-      set_empty(0, num_buckets);
-    }
-    // don't consider to shrink before another erase()
-    reset_thresholds();
-    num_elements = 0;
-    num_deleted = 0;
-  }
-
-  // LOOKUP ROUTINES
- private:
-  // Returns a pair of positions: 1st where the object is, 2nd where
-  // it would go if you wanted to insert it.  1st is ILLEGAL_BUCKET
-  // if object is not found; 2nd is ILLEGAL_BUCKET if it is.
-  // Note: because of deletions where-to-insert is not trivial: it's the
-  // first deleted bucket we see, as long as we don't find the key later
-  pair<size_type, size_type> find_position(const key_type &key) const {
-    size_type num_probes = 0;              // how many times we've probed
-    const size_type bucket_count_minus_one = bucket_count() - 1;
-    size_type bucknum = hash(key) & bucket_count_minus_one;
-    size_type insert_pos = ILLEGAL_BUCKET; // where we would insert
-    while ( 1 ) {                          // probe until something happens
-      if ( test_empty(bucknum) ) {         // bucket is empty
-        if ( insert_pos == ILLEGAL_BUCKET )   // found no prior place to insert
-          return pair<size_type,size_type>(ILLEGAL_BUCKET, bucknum);
-        else
-          return pair<size_type,size_type>(ILLEGAL_BUCKET, insert_pos);
-
-      } else if ( test_deleted(bucknum) ) {// keep searching, but mark to insert
-        if ( insert_pos == ILLEGAL_BUCKET )
-          insert_pos = bucknum;
-
-      } else if ( equals(key, get_key(table[bucknum])) ) {
-        return pair<size_type,size_type>(bucknum, ILLEGAL_BUCKET);
-      }
-      ++num_probes;                        // we're doing another probe
-      bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one;
-      assert(num_probes < bucket_count()); // don't probe too many times!
-    }
-  }
-
- public:
-  iterator find(const key_type& key) {
-    if ( size() == 0 ) return end();
-    pair<size_type, size_type> pos = find_position(key);
-    if ( pos.first == ILLEGAL_BUCKET )     // alas, not there
-      return end();
-    else
-      return iterator(this, table + pos.first, table + num_buckets, false);
-  }
-
-  const_iterator find(const key_type& key) const {
-    if ( size() == 0 ) return end();
-    pair<size_type, size_type> pos = find_position(key);
-    if ( pos.first == ILLEGAL_BUCKET )     // alas, not there
-      return end();
-    else
-      return const_iterator(this, table + pos.first, table+num_buckets, false);
-  }
-
-  // This is a tr1 method: the bucket a given key is in, or what bucket
-  // it would be put in, if it were to be inserted.  Shrug.
-  size_type bucket(const key_type& key) const {
-    pair<size_type, size_type> pos = find_position(key);
-    return pos.first == ILLEGAL_BUCKET ? pos.second : pos.first;
-  }
-
-  // Counts how many elements have key key.  For maps, it's either 0 or 1.
-  size_type count(const key_type &key) const {
-    pair<size_type, size_type> pos = find_position(key);
-    return pos.first == ILLEGAL_BUCKET ? 0 : 1;
-  }
-
-  // Likewise, equal_range doesn't really make sense for us.  Oh well.
-  pair<iterator,iterator> equal_range(const key_type& key) {
-    iterator pos = find(key);      // either an iterator or end
-    if (pos == end()) {
-      return pair<iterator,iterator>(pos, pos);
-    } else {
-      const iterator startpos = pos++;
-      return pair<iterator,iterator>(startpos, pos);
-    }
-  }
-  pair<const_iterator,const_iterator> equal_range(const key_type& key) const {
-    const_iterator pos = find(key);      // either an iterator or end
-    if (pos == end()) {
-      return pair<const_iterator,const_iterator>(pos, pos);
-    } else {
-      const const_iterator startpos = pos++;
-      return pair<const_iterator,const_iterator>(startpos, pos);
-    }
-  }
-
-
-  // INSERTION ROUTINES
- private:
-  // If you know *this is big enough to hold obj, use this routine
-  pair<iterator, bool> insert_noresize(const value_type& obj) {
-    // First, double-check we're not inserting delkey or emptyval
-    assert(!use_empty || !equals(get_key(obj), get_key(emptyval)));
-    assert(!use_deleted || !equals(get_key(obj), delkey));
-    const pair<size_type,size_type> pos = find_position(get_key(obj));
-    if ( pos.first != ILLEGAL_BUCKET) {      // object was already there
-      return pair<iterator,bool>(iterator(this, table + pos.first,
-                                          table + num_buckets, false),
-                                 false);          // false: we didn't insert
-    } else {                                 // pos.second says where to put it
-      if ( test_deleted(pos.second) ) {      // just replace if it's been del.
-        const_iterator delpos(this, table + pos.second,              // shrug:
-                              table + num_buckets, false);// shouldn't need const
-        clear_deleted(delpos);
-        assert( num_deleted > 0);
-        --num_deleted;                       // used to be, now it isn't
-      } else {
-        ++num_elements;                      // replacing an empty bucket
-      }
-      set_value(&table[pos.second], obj);
-      return pair<iterator,bool>(iterator(this, table + pos.second,
-                                          table + num_buckets, false),
-                                 true);           // true: we did insert
-    }
-  }
-
- public:
-  // This is the normal insert routine, used by the outside world
-  pair<iterator, bool> insert(const value_type& obj) {
-    resize_delta(1);                      // adding an object, grow if need be
-    return insert_noresize(obj);
-  }
-
-  // When inserting a lot at a time, we specialize on the type of iterator
-  template <class InputIterator>
-  void insert(InputIterator f, InputIterator l) {
-    // specializes on iterator type
-    insert(f, l, typename STL_NAMESPACE::iterator_traits<InputIterator>::iterator_category());
-  }
-
-  // Iterator supports operator-, resize before inserting
-  template <class ForwardIterator>
-  void insert(ForwardIterator f, ForwardIterator l,
-              STL_NAMESPACE::forward_iterator_tag) {
-    size_type n = STL_NAMESPACE::distance(f, l);   // TODO(csilvers): standard?
-    resize_delta(n);
-    for ( ; n > 0; --n, ++f)
-      insert_noresize(*f);
-  }
-
-  // Arbitrary iterator, can't tell how much to resize
-  template <class InputIterator>
-  void insert(InputIterator f, InputIterator l,
-              STL_NAMESPACE::input_iterator_tag) {
-    for ( ; f != l; ++f)
-      insert(*f);
-  }
-
-
-  // DELETION ROUTINES
-  size_type erase(const key_type& key) {
-    // First, double-check we're not trying to erase delkey or emptyval
-    assert(!use_empty || !equals(key, get_key(emptyval)));
-    assert(!use_deleted || !equals(key, delkey));
-    const_iterator pos = find(key);   // shrug: shouldn't need to be const
-    if ( pos != end() ) {
-      assert(!test_deleted(pos));  // or find() shouldn't have returned it
-      set_deleted(pos);
-      ++num_deleted;
-      consider_shrink = true;      // will think about shrink after next insert
-      return 1;                    // because we deleted one thing
-    } else {
-      return 0;                    // because we deleted nothing
-    }
-  }
-
-  // This is really evil: really it should be iterator, not const_iterator.
-  // But...the only reason keys are const is to allow lookup.
-  // Since that's a moot issue for deleted keys, we allow const_iterators
-  void erase(const_iterator pos) {
-    if ( pos == end() ) return;    // sanity check
-    if ( set_deleted(pos) ) {      // true if object has been newly deleted
-      ++num_deleted;
-      consider_shrink = true;      // will think about shrink after next insert
-    }
-  }
-
-  void erase(const_iterator f, const_iterator l) {
-    for ( ; f != l; ++f) {
-      if ( set_deleted(f)  )       // should always be true
-        ++num_deleted;
-    }
-    consider_shrink = true;        // will think about shrink after next insert
-  }
-
-
-  // COMPARISON
-  bool operator==(const dense_hashtable& ht) const {
-    if (size() != ht.size()) {
-      return false;
-    } else if (this == &ht) {
-      return true;
-    } else {
-      // Iterate through the elements in "this" and see if the
-      // corresponding element is in ht
-      for ( const_iterator it = begin(); it != end(); ++it ) {
-        const_iterator it2 = ht.find(get_key(*it));
-        if ((it2 == ht.end()) || (*it != *it2)) {
-          return false;
-        }
-      }
-      return true;
-    }
-  }
-  bool operator!=(const dense_hashtable& ht) const {
-    return !(*this == ht);
-  }
-
-
-  // I/O
-  // We support reading and writing hashtables to disk.  Alas, since
-  // I don't know how to write a hasher or key_equal, you have to make
-  // sure everything but the table is the same.  We compact before writing
-  //
-  // NOTE: These functions are currently TODO.  They've not been implemented.
-  bool write_metadata(FILE *fp) {
-    squash_deleted();           // so we don't have to worry about delkey
-    return false;               // TODO
-  }
-
-  bool read_metadata(FILE *fp) {
-    num_deleted = 0;            // since we got rid before writing
-    assert(use_empty);          // have to set this before calling us
-    if (table)  free(table);    // we'll make our own
-    // TODO: read magic number
-    // TODO: read num_buckets
-    reset_thresholds();
-    table = (value_type *) malloc(num_buckets * sizeof(*table));
-    assert(table);
-    fill_range_with_empty(table, table + num_buckets);
-    // TODO: read num_elements
-    for ( size_type i = 0; i < num_elements; ++i ) {
-      // TODO: read bucket_num
-      // TODO: set with non-empty, non-deleted value
-    }
-    return false;               // TODO
-  }
-
-  // If your keys and values are simple enough, we can write them to
-  // disk for you.  "simple enough" means value_type is a POD type
-  // that contains no pointers.  However, we don't try to normalize
-  // endianness
-  bool write_nopointer_data(FILE *fp) const {
-    for ( const_iterator it = begin(); it != end(); ++it ) {
-      // TODO: skip empty/deleted values
-      if ( !fwrite(&*it, sizeof(*it), 1, fp) )  return false;
-    }
-    return false;
-  }
-
-  // When reading, we have to override the potential const-ness of *it
-  bool read_nopointer_data(FILE *fp) {
-    for ( iterator it = begin(); it != end(); ++it ) {
-      // TODO: skip empty/deleted values
-      if ( !fread(reinterpret_cast<void*>(&(*it)), sizeof(*it), 1, fp) )
-        return false;
-    }
-    return false;
-  }
-
- private:
-  // The actual data
-  hasher hash;                      // required by hashed_associative_container
-  key_equal equals;
-  ExtractKey get_key;
-  SetKey set_key;
-  size_type num_deleted;        // how many occupied buckets are marked deleted
-  bool use_deleted;                          // false until delkey has been set
-  bool use_empty;                          // you must do this before you start
-  // TODO(csilvers): make a pointer, and get rid of use_deleted (benchmark!)
-  key_type delkey;                           // which key marks deleted entries
-  value_type emptyval;                        // which key marks unused entries
-  float enlarge_resize_percent;                       // how full before resize
-  float shrink_resize_percent;                       // how empty before resize
-  size_type shrink_threshold;            // num_buckets * shrink_resize_percent
-  size_type enlarge_threshold;          // num_buckets * enlarge_resize_percent
-  value_type *table;
-  size_type num_buckets;
-  size_type num_elements;
-  bool consider_shrink;   // true if we should try to shrink before next insert
-
-  void reset_thresholds() {
-    enlarge_threshold = static_cast<size_type>(num_buckets
-                                               * enlarge_resize_percent);
-    shrink_threshold = static_cast<size_type>(num_buckets
-                                              * shrink_resize_percent);
-    consider_shrink = false;   // whatever caused us to reset already considered
-  }
-};
-
-// We need a global swap as well
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-inline void swap(dense_hashtable<V,K,HF,ExK,SetK,EqK,A> &x,
-                 dense_hashtable<V,K,HF,ExK,SetK,EqK,A> &y) {
-  x.swap(y);
-}
-
-#undef JUMP_
-
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-const typename dense_hashtable<V,K,HF,ExK,SetK,EqK,A>::size_type
-dense_hashtable<V,K,HF,ExK,SetK,EqK,A>::ILLEGAL_BUCKET;
-
-// How full we let the table get before we resize.  Knuth says .8 is
-// good -- higher causes us to probe too much, though saves memory.
-// However, we go with .5, getting better performance at the cost of
-// more space (a trade-off densehashtable explicitly chooses to make).
-// Feel free to play around with different values, though.
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-const float dense_hashtable<V,K,HF,ExK,SetK,EqK,A>::HT_OCCUPANCY_FLT = 0.5f;
-
-// How empty we let the table get before we resize lower.
-// It should be less than OCCUPANCY_FLT / 2 or we thrash resizing
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-const float dense_hashtable<V,K,HF,ExK,SetK,EqK,A>::HT_EMPTY_FLT
-    = 0.4f * dense_hashtable<V,K,HF,ExK,SetK,EqK,A>::HT_OCCUPANCY_FLT;
-
-_END_GOOGLE_NAMESPACE_
-
-#endif /* _DENSEHASHTABLE_H_ */
diff --git a/ext/google/sparsehash/sparseconfig.h b/ext/google/sparsehash/sparseconfig.h
deleted file mode 100644
index ceffabb..0000000
--- a/ext/google/sparsehash/sparseconfig.h
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef _GOOGLE_SPARSE_CONFIG_H_
-#define _GOOGLE_SPARSE_CONFIG_H_
-
-/* Namespace for Google classes */
-#define GOOGLE_NAMESPACE ::google
-
-/* HASH_FUN_H and HASH_NAMESPACE could be defined by platform_info.rb. */
-
-/* the location of the header defining hash functions */
-#ifndef HASH_FUN_H
-	#define HASH_FUN_H <ext/hash_fun.h>
-#endif
-
-/* the namespace of the hash<> function */
-#ifndef HASH_NAMESPACE
-	#define HASH_NAMESPACE __gnu_cxx
-#endif
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if the system has the type `long long'. */
-#define HAVE_LONG_LONG 1
-
-/* Define to 1 if you have the `memcpy' function. */
-#define HAVE_MEMCPY 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if the system has the type `uint16_t'. */
-#define HAVE_UINT16_T 1
-
-/* Define to 1 if the system has the type `u_int16_t'. */
-#define HAVE_U_INT16_T 1
-
-/* Define to 1 if the system has the type `__uint16'. */
-/* #undef HAVE___UINT16 */
-
-/* The system-provided hash function including the namespace. */
-#define SPARSEHASH_HASH HASH_NAMESPACE::hash
-
-/* the namespace where STL code like vector<> is defined */
-#define STL_NAMESPACE std
-
-/* Stops putting the code inside the Google namespace */
-#define _END_GOOGLE_NAMESPACE_ }
-
-/* Puts following code inside the Google namespace */
-#define _START_GOOGLE_NAMESPACE_ namespace google {
-
-#endif /* _GOOGLE_SPARSE_CONFIG_H_ */
diff --git a/ext/google/sparsehash/sparsehashtable.h b/ext/google/sparsehash/sparsehashtable.h
deleted file mode 100644
index c3724bd..0000000
--- a/ext/google/sparsehash/sparsehashtable.h
+++ /dev/null
@@ -1,1015 +0,0 @@
-// Copyright (c) 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// ---
-// Author: Craig Silverstein
-//
-// A sparse hashtable is a particular implementation of
-// a hashtable: one that is meant to minimize memory use.
-// It does this by using a *sparse table* (cf sparsetable.h),
-// which uses between 1 and 2 bits to store empty buckets
-// (we may need another bit for hashtables that support deletion).
-//
-// When empty buckets are so cheap, an appealing hashtable
-// implementation is internal probing, in which the hashtable
-// is a single table, and collisions are resolved by trying
-// to insert again in another bucket.  The most cache-efficient
-// internal probing schemes are linear probing (which suffers,
-// alas, from clumping) and quadratic probing, which is what
-// we implement by default.
-//
-// Deleted buckets are a bit of a pain.  We have to somehow mark
-// deleted buckets (the probing must distinguish them from empty
-// buckets).  The most principled way is to have another bitmap,
-// but that's annoying and takes up space.  Instead we let the
-// user specify an "impossible" key.  We set deleted buckets
-// to have the impossible key.
-//
-// Note it is possible to change the value of the delete key
-// on the fly; you can even remove it, though after that point
-// the hashtable is insert_only until you set it again.
-//
-// You probably shouldn't use this code directly.  Use
-// <google/sparse_hash_table> or <google/sparse_hash_set> instead.
-//
-// You can modify the following, below:
-// HT_OCCUPANCY_FLT            -- how full before we double size
-// HT_EMPTY_FLT                -- how empty before we halve size
-// HT_MIN_BUCKETS              -- smallest bucket size
-// HT_DEFAULT_STARTING_BUCKETS -- default bucket size at construct-time
-//
-// You can also change enlarge_resize_percent (which defaults to
-// HT_OCCUPANCY_FLT), and shrink_resize_percent (which defaults to
-// HT_EMPTY_FLT) with set_resizing_parameters().
-//
-// How to decide what values to use?
-// shrink_resize_percent's default of .4 * OCCUPANCY_FLT, is probably good.
-// HT_MIN_BUCKETS is probably unnecessary since you can specify
-// (indirectly) the starting number of buckets at construct-time.
-// For enlarge_resize_percent, you can use this chart to try to trade-off
-// expected lookup time to the space taken up.  By default, this
-// code uses quadratic probing, though you can change it to linear
-// via _JUMP below if you really want to.
-//
-// From http://www.augustana.ca/~mohrj/courses/1999.fall/csc210/lecture_notes/hashing.html
-// NUMBER OF PROBES / LOOKUP       Successful            Unsuccessful
-// Quadratic collision resolution   1 - ln(1-L) - L/2    1/(1-L) - L - ln(1-L)
-// Linear collision resolution     [1+1/(1-L)]/2         [1+1/(1-L)2]/2
-//
-// -- enlarge_resize_percent --         0.10  0.50  0.60  0.75  0.80  0.90  0.99
-// QUADRATIC COLLISION RES.
-//    probes/successful lookup    1.05  1.44  1.62  2.01  2.21  2.85  5.11
-//    probes/unsuccessful lookup  1.11  2.19  2.82  4.64  5.81  11.4  103.6
-// LINEAR COLLISION RES.
-//    probes/successful lookup    1.06  1.5   1.75  2.5   3.0   5.5   50.5
-//    probes/unsuccessful lookup  1.12  2.5   3.6   8.5   13.0  50.0  5000.0
-//
-// The value type is required to be copy constructible and default
-// constructible, but it need not be (and commonly isn't) assignable.
-
-#ifndef _SPARSEHASHTABLE_H_
-#define _SPARSEHASHTABLE_H_
-
-#ifndef SPARSEHASH_STAT_UPDATE
-#define SPARSEHASH_STAT_UPDATE(x) ((void) 0)
-#endif
-
-// The probing method
-// Linear probing
-// #define JUMP_(key, num_probes)    ( 1 )
-// Quadratic-ish probing
-#define JUMP_(key, num_probes)    ( num_probes )
-
-
-#include <google/sparsehash/sparseconfig.h>
-#include <assert.h>
-#include <algorithm>              // For swap(), eg
-#include <iterator>               // for facts about iterator tags
-#include <utility>                // for pair<>
-#include <google/sparsetable>     // Since that's basically what we are
-
-_START_GOOGLE_NAMESPACE_
-
-using STL_NAMESPACE::pair;
-
-// Hashtable class, used to implement the hashed associative containers
-// hash_set and hash_map.
-//
-// Value: what is stored in the table (each bucket is a Value).
-// Key: something in a 1-to-1 correspondence to a Value, that can be used
-//      to search for a Value in the table (find() takes a Key).
-// HashFcn: Takes a Key and returns an integer, the more unique the better.
-// ExtractKey: given a Value, returns the unique Key associated with it.
-// SetKey: given a Value* and a Key, modifies the value such that
-//         ExtractKey(value) == key.  We guarantee this is only called
-//         with key == deleted_key.
-// EqualKey: Given two Keys, says whether they are the same (that is,
-//           if they are both associated with the same Value).
-// Alloc: STL allocator to use to allocate memory.  Currently ignored.
-
-template <class Value, class Key, class HashFcn,
-          class ExtractKey, class SetKey, class EqualKey, class Alloc>
-class sparse_hashtable;
-
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-struct sparse_hashtable_iterator;
-
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-struct sparse_hashtable_const_iterator;
-
-// As far as iterating, we're basically just a sparsetable
-// that skips over deleted elements.
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-struct sparse_hashtable_iterator {
- public:
-  typedef sparse_hashtable_iterator<V,K,HF,ExK,SetK,EqK,A>       iterator;
-  typedef sparse_hashtable_const_iterator<V,K,HF,ExK,SetK,EqK,A> const_iterator;
-  typedef typename sparsetable<V>::nonempty_iterator        st_iterator;
-
-  typedef STL_NAMESPACE::forward_iterator_tag iterator_category;
-  typedef V value_type;
-  typedef ptrdiff_t difference_type;
-  typedef size_t size_type;
-  typedef V& reference;                // Value
-  typedef V* pointer;
-
-  // "Real" constructor and default constructor
-  sparse_hashtable_iterator(const sparse_hashtable<V,K,HF,ExK,SetK,EqK,A> *h,
-                            st_iterator it, st_iterator it_end)
-    : ht(h), pos(it), end(it_end)   { advance_past_deleted(); }
-  sparse_hashtable_iterator() { }      // not ever used internally
-  // The default destructor is fine; we don't define one
-  // The default operator= is fine; we don't define one
-
-  // Happy dereferencer
-  reference operator*() const { return *pos; }
-  pointer operator->() const { return &(operator*()); }
-
-  // Arithmetic.  The only hard part is making sure that
-  // we're not on a marked-deleted array element
-  void advance_past_deleted() {
-    while ( pos != end && ht->test_deleted(*this) )
-      ++pos;
-  }
-  iterator& operator++()   {
-    assert(pos != end); ++pos; advance_past_deleted(); return *this;
-  }
-  iterator operator++(int) { iterator tmp(*this); ++*this; return tmp; }
-
-  // Comparison.
-  bool operator==(const iterator& it) const { return pos == it.pos; }
-  bool operator!=(const iterator& it) const { return pos != it.pos; }
-
-
-  // The actual data
-  const sparse_hashtable<V,K,HF,ExK,SetK,EqK,A> *ht;
-  st_iterator pos, end;
-};
-
-// Now do it all again, but with const-ness!
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-struct sparse_hashtable_const_iterator {
- public:
-  typedef sparse_hashtable_iterator<V,K,HF,ExK,SetK,EqK,A>       iterator;
-  typedef sparse_hashtable_const_iterator<V,K,HF,ExK,SetK,EqK,A> const_iterator;
-  typedef typename sparsetable<V>::const_nonempty_iterator  st_iterator;
-
-  typedef STL_NAMESPACE::forward_iterator_tag iterator_category;
-  typedef V value_type;
-  typedef ptrdiff_t difference_type;
-  typedef size_t size_type;
-  typedef const V& reference;                // Value
-  typedef const V* pointer;
-
-  // "Real" constructor and default constructor
-  sparse_hashtable_const_iterator(const sparse_hashtable<V,K,HF,ExK,SetK,EqK,A> *h,
-                                  st_iterator it, st_iterator it_end)
-    : ht(h), pos(it), end(it_end)   { advance_past_deleted(); }
-  // This lets us convert regular iterators to const iterators
-  sparse_hashtable_const_iterator() { }      // never used internally
-  sparse_hashtable_const_iterator(const iterator &it)
-    : ht(it.ht), pos(it.pos), end(it.end) { }
-  // The default destructor is fine; we don't define one
-  // The default operator= is fine; we don't define one
-
-  // Happy dereferencer
-  reference operator*() const { return *pos; }
-  pointer operator->() const { return &(operator*()); }
-
-  // Arithmetic.  The only hard part is making sure that
-  // we're not on a marked-deleted array element
-  void advance_past_deleted() {
-    while ( pos != end && ht->test_deleted(*this) )
-      ++pos;
-  }
-  const_iterator& operator++() {
-    assert(pos != end); ++pos; advance_past_deleted(); return *this;
-  }
-  const_iterator operator++(int) { const_iterator tmp(*this); ++*this; return tmp; }
-
-  // Comparison.
-  bool operator==(const const_iterator& it) const { return pos == it.pos; }
-  bool operator!=(const const_iterator& it) const { return pos != it.pos; }
-
-
-  // The actual data
-  const sparse_hashtable<V,K,HF,ExK,SetK,EqK,A> *ht;
-  st_iterator pos, end;
-};
-
-// And once again, but this time freeing up memory as we iterate
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-struct sparse_hashtable_destructive_iterator {
- public:
-  typedef sparse_hashtable_destructive_iterator<V,K,HF,ExK,SetK,EqK,A> iterator;
-  typedef typename sparsetable<V>::destructive_iterator     st_iterator;
-
-  typedef STL_NAMESPACE::forward_iterator_tag iterator_category;
-  typedef V value_type;
-  typedef ptrdiff_t difference_type;
-  typedef size_t size_type;
-  typedef V& reference;                // Value
-  typedef V* pointer;
-
-  // "Real" constructor and default constructor
-  sparse_hashtable_destructive_iterator(const
-                                        sparse_hashtable<V,K,HF,ExK,SetK,EqK,A> *h,
-                                        st_iterator it, st_iterator it_end)
-    : ht(h), pos(it), end(it_end)   { advance_past_deleted(); }
-  sparse_hashtable_destructive_iterator() { }          // never used internally
-  // The default destructor is fine; we don't define one
-  // The default operator= is fine; we don't define one
-
-  // Happy dereferencer
-  reference operator*() const { return *pos; }
-  pointer operator->() const { return &(operator*()); }
-
-  // Arithmetic.  The only hard part is making sure that
-  // we're not on a marked-deleted array element
-  void advance_past_deleted() {
-    while ( pos != end && ht->test_deleted(*this) )
-      ++pos;
-  }
-  iterator& operator++()   {
-    assert(pos != end); ++pos; advance_past_deleted(); return *this;
-  }
-  iterator operator++(int) { iterator tmp(*this); ++*this; return tmp; }
-
-  // Comparison.
-  bool operator==(const iterator& it) const { return pos == it.pos; }
-  bool operator!=(const iterator& it) const { return pos != it.pos; }
-
-
-  // The actual data
-  const sparse_hashtable<V,K,HF,ExK,SetK,EqK,A> *ht;
-  st_iterator pos, end;
-};
-
-
-template <class Value, class Key, class HashFcn,
-          class ExtractKey, class SetKey, class EqualKey, class Alloc>
-class sparse_hashtable {
- public:
-  typedef Key key_type;
-  typedef Value value_type;
-  typedef HashFcn hasher;
-  typedef EqualKey key_equal;
-
-  typedef size_t            size_type;
-  typedef ptrdiff_t         difference_type;
-  typedef value_type*       pointer;
-  typedef const value_type* const_pointer;
-  typedef value_type&       reference;
-  typedef const value_type& const_reference;
-  typedef sparse_hashtable_iterator<Value, Key, HashFcn, ExtractKey,
-                                    SetKey, EqualKey, Alloc>
-  iterator;
-
-  typedef sparse_hashtable_const_iterator<Value, Key, HashFcn, ExtractKey,
-                                          SetKey, EqualKey, Alloc>
-  const_iterator;
-
-  typedef sparse_hashtable_destructive_iterator<Value, Key, HashFcn, ExtractKey,
-                                                SetKey, EqualKey, Alloc>
-  destructive_iterator;
-
-  // These come from tr1.  For us they're the same as regular iterators.
-  typedef iterator local_iterator;
-  typedef const_iterator const_local_iterator;
-
-  // How full we let the table get before we resize, by default.
-  // Knuth says .8 is good -- higher causes us to probe too much,
-  // though it saves memory.
-  static const float HT_OCCUPANCY_FLT; // = 0.8f;
-
-  // How empty we let the table get before we resize lower, by default.
-  // It should be less than OCCUPANCY_FLT / 2 or we thrash resizing
-  static const float HT_EMPTY_FLT; // = 0.4 * HT_OCCUPANCY_FLT;
-
-  // Minimum size we're willing to let hashtables be.
-  // Must be a power of two, and at least 4.
-  // Note, however, that for a given hashtable, the minimum size is
-  // determined by the first constructor arg, and may be >HT_MIN_BUCKETS.
-  static const size_t HT_MIN_BUCKETS = 4;
-
-  // By default, if you don't specify a hashtable size at
-  // construction-time, we use this size.  Must be a power of two, and
-  // at least HT_MIN_BUCKETS.
-  static const size_t HT_DEFAULT_STARTING_BUCKETS = 32;
-
-  // ITERATOR FUNCTIONS
-  iterator begin()             { return iterator(this, table.nonempty_begin(),
-                                                 table.nonempty_end()); }
-  iterator end()               { return iterator(this, table.nonempty_end(),
-                                                 table.nonempty_end()); }
-  const_iterator begin() const { return const_iterator(this,
-                                                       table.nonempty_begin(),
-                                                       table.nonempty_end()); }
-  const_iterator end() const   { return const_iterator(this,
-                                                       table.nonempty_end(),
-                                                       table.nonempty_end()); }
-
-  // These come from tr1 unordered_map.  They iterate over 'bucket' n.
-  // For sparsehashtable, we could consider each 'group' to be a bucket,
-  // I guess, but I don't really see the point.  We'll just consider
-  // bucket n to be the n-th element of the sparsetable, if it's occupied,
-  // or some empty element, otherwise.
-  local_iterator begin(size_type i) {
-    if (table.test(i))
-      return local_iterator(this, table.get_iter(i), table.nonempty_end());
-    else
-      return local_iterator(this, table.nonempty_end(), table.nonempty_end());
-  }
-  local_iterator end(size_type i) {
-    local_iterator it = begin(i);
-    if (table.test(i) && !test_deleted(i))
-      ++it;
-    return it;
-  }
-  const_local_iterator begin(size_type i) const {
-    if (table.test(i))
-      return const_local_iterator(this, table.get_iter(i),
-                                  table.nonempty_end());
-    else
-      return const_local_iterator(this, table.nonempty_end(),
-                                  table.nonempty_end());
-  }
-  const_local_iterator end(size_type i) const {
-    const_local_iterator it = begin(i);
-    if (table.test(i) && !test_deleted(i))
-      ++it;
-    return it;
-  }
-
-  // This is used when resizing
-  destructive_iterator destructive_begin() {
-    return destructive_iterator(this, table.destructive_begin(),
-                                table.destructive_end());
-  }
-  destructive_iterator destructive_end() {
-    return destructive_iterator(this, table.destructive_end(),
-                                table.destructive_end());
-  }
-
-
-  // ACCESSOR FUNCTIONS for the things we templatize on, basically
-  hasher hash_funct() const { return hash; }
-  key_equal key_eq() const  { return equals; }
-
- private:
-  // We need to copy values when we set the special marker for deleted
-  // elements, but, annoyingly, we can't just use the copy assignment
-  // operator because value_type might not be assignable (it's often
-  // pair<const X, Y>).  We use explicit destructor invocation and
-  // placement new to get around this.  Arg.
-  void set_value(value_type* dst, const value_type src) {
-    dst->~value_type();   // delete the old value, if any
-    new(dst) value_type(src);
-  }
-
-  // This is used as a tag for the copy constructor, saying to destroy its
-  // arg We have two ways of destructively copying: with potentially growing
-  // the hashtable as we copy, and without.  To make sure the outside world
-  // can't do a destructive copy, we make the typename private.
-  enum MoveDontCopyT {MoveDontCopy, MoveDontGrow};
-
-
-  // DELETE HELPER FUNCTIONS
-  // This lets the user describe a key that will indicate deleted
-  // table entries.  This key should be an "impossible" entry --
-  // if you try to insert it for real, you won't be able to retrieve it!
-  // (NB: while you pass in an entire value, only the key part is looked
-  // at.  This is just because I don't know how to assign just a key.)
- private:
-  void squash_deleted() {           // gets rid of any deleted entries we have
-    if ( num_deleted ) {            // get rid of deleted before writing
-      sparse_hashtable tmp(MoveDontGrow, *this);
-      swap(tmp);                    // now we are tmp
-    }
-    assert(num_deleted == 0);
-  }
-
- public:
-  void set_deleted_key(const key_type &key) {
-    // It's only safe to change what "deleted" means if we purge deleted guys
-    squash_deleted();
-    use_deleted = true;
-    delkey = key;
-  }
-  void clear_deleted_key() {
-    squash_deleted();
-    use_deleted = false;
-  }
-
-  // These are public so the iterators can use them
-  // True if the item at position bucknum is "deleted" marker
-  bool test_deleted(size_type bucknum) const {
-    // The num_deleted test is crucial for read(): after read(), the ht values
-    // are garbage, and we don't want to think some of them are deleted.
-    return (use_deleted && num_deleted > 0 && table.test(bucknum) &&
-            equals(delkey, get_key(table.unsafe_get(bucknum))));
-  }
-  bool test_deleted(const iterator &it) const {
-    return (use_deleted && num_deleted > 0 &&
-            equals(delkey, get_key(*it)));
-  }
-  bool test_deleted(const const_iterator &it) const {
-    return (use_deleted && num_deleted > 0 &&
-            equals(delkey, get_key(*it)));
-  }
-  bool test_deleted(const destructive_iterator &it) const {
-    return (use_deleted && num_deleted > 0 &&
-            equals(delkey, get_key(*it)));
-  }
-  // Set it so test_deleted is true.  true if object didn't used to be deleted
-  // See below (at erase()) to explain why we allow const_iterators
-  bool set_deleted(const_iterator &it) {
-    assert(use_deleted);             // bad if set_deleted_key() wasn't called
-    bool retval = !test_deleted(it);
-    // &* converts from iterator to value-type
-    set_key(const_cast<value_type*>(&(*it)), delkey);
-    return retval;
-  }
-  // Set it so test_deleted is false.  true if object used to be deleted
-  bool clear_deleted(const_iterator &it) {
-    assert(use_deleted);             // bad if set_deleted_key() wasn't called
-    // happens automatically when we assign something else in its place
-    return test_deleted(it);
-  }
-
-
-  // FUNCTIONS CONCERNING SIZE
-  size_type size() const      { return table.num_nonempty() - num_deleted; }
-  // Buckets are always a power of 2
-  size_type max_size() const          { return (size_type(-1) >> 1U) + 1; }
-  bool empty() const                  { return size() == 0; }
-  size_type bucket_count() const      { return table.size(); }
-  size_type max_bucket_count() const  { return max_size(); }
-  // These are tr1 methods.  Their idea of 'bucket' doesn't map well to
-  // what we do.  We just say every bucket has 0 or 1 items in it.
-  size_type bucket_size(size_type i) const {
-    return begin(i) == end(i) ? 0 : 1;
-  }
-
-
- private:
-  // Because of the above, size_type(-1) is never legal; use it for errors
-  static const size_type ILLEGAL_BUCKET = size_type(-1);
-
- private:
-  // This is the smallest size a hashtable can be without being too crowded
-  // If you like, you can give a min #buckets as well as a min #elts
-  size_type min_size(size_type num_elts, size_type min_buckets_wanted) {
-    size_type sz = HT_MIN_BUCKETS;
-    while ( sz < min_buckets_wanted || num_elts >= sz * enlarge_resize_percent )
-      sz *= 2;
-    return sz;
-  }
-
-  // Used after a string of deletes
-  void maybe_shrink() {
-    assert(table.num_nonempty() >= num_deleted);
-    assert((bucket_count() & (bucket_count()-1)) == 0); // is a power of two
-    assert(bucket_count() >= HT_MIN_BUCKETS);
-
-    // If you construct a hashtable with < HT_DEFAULT_STARTING_BUCKETS,
-    // we'll never shrink until you get relatively big, and we'll never
-    // shrink below HT_DEFAULT_STARTING_BUCKETS.  Otherwise, something
-    // like "dense_hash_set<int> x; x.insert(4); x.erase(4);" will
-    // shrink us down to HT_MIN_BUCKETS buckets, which is too small.
-    if (shrink_threshold > 0
-        && (table.num_nonempty()-num_deleted) < shrink_threshold &&
-        bucket_count() > HT_DEFAULT_STARTING_BUCKETS ) {
-      size_type sz = bucket_count() / 2;    // find how much we should shrink
-      while ( sz > HT_DEFAULT_STARTING_BUCKETS &&
-              (table.num_nonempty() - num_deleted) <= sz *
-              shrink_resize_percent )
-        sz /= 2;                            // stay a power of 2
-      sparse_hashtable tmp(MoveDontCopy, *this, sz);
-      swap(tmp);                            // now we are tmp
-    }
-    consider_shrink = false;                // because we just considered it
-  }
-
-  // We'll let you resize a hashtable -- though this makes us copy all!
-  // When you resize, you say, "make it big enough for this many more elements"
-  void resize_delta(size_type delta) {
-    if ( consider_shrink )                   // see if lots of deletes happened
-      maybe_shrink();
-    if ( bucket_count() >= HT_MIN_BUCKETS &&
-         (table.num_nonempty() + delta) <= enlarge_threshold )
-      return;                                // we're ok as we are
-
-    // Sometimes, we need to resize just to get rid of all the
-    // "deleted" buckets that are clogging up the hashtable.  So when
-    // deciding whether to resize, count the deleted buckets (which
-    // are currently taking up room).  But later, when we decide what
-    // size to resize to, *don't* count deleted buckets, since they
-    // get discarded during the resize.
-    const size_type needed_size = min_size(table.num_nonempty() + delta, 0);
-    if ( needed_size > bucket_count() ) {      // we don't have enough buckets
-      const size_type resize_to = min_size(table.num_nonempty() - num_deleted
-                                           + delta, 0);
-      sparse_hashtable tmp(MoveDontCopy, *this, resize_to);
-      swap(tmp);                             // now we are tmp
-    }
-  }
-
-  // Used to actually do the rehashing when we grow/shrink a hashtable
-  void copy_from(const sparse_hashtable &ht, size_type min_buckets_wanted) {
-    clear();            // clear table, set num_deleted to 0
-
-    // If we need to change the size of our table, do it now
-    const size_type resize_to = min_size(ht.size(), min_buckets_wanted);
-    if ( resize_to > bucket_count() ) {      // we don't have enough buckets
-      table.resize(resize_to);               // sets the number of buckets
-      reset_thresholds();
-    }
-
-    // We use a normal iterator to get non-deleted bcks from ht
-    // We could use insert() here, but since we know there are
-    // no duplicates and no deleted items, we can be more efficient
-    assert( (bucket_count() & (bucket_count()-1)) == 0);      // a power of two
-    for ( const_iterator it = ht.begin(); it != ht.end(); ++it ) {
-      size_type num_probes = 0;              // how many times we've probed
-      size_type bucknum;
-      const size_type bucket_count_minus_one = bucket_count() - 1;
-      for (bucknum = hash(get_key(*it)) & bucket_count_minus_one;
-           table.test(bucknum);                          // not empty
-           bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one) {
-        ++num_probes;
-        assert(num_probes < bucket_count()); // or else the hashtable is full
-      }
-      table.set(bucknum, *it);               // copies the value to here
-    }
-  }
-
-  // Implementation is like copy_from, but it destroys the table of the
-  // "from" guy by freeing sparsetable memory as we iterate.  This is
-  // useful in resizing, since we're throwing away the "from" guy anyway.
-  void move_from(MoveDontCopyT mover, sparse_hashtable &ht,
-                 size_type min_buckets_wanted) {
-    clear();            // clear table, set num_deleted to 0
-
-    // If we need to change the size of our table, do it now
-    size_t resize_to;
-    if ( mover == MoveDontGrow )
-      resize_to = ht.bucket_count();         // keep same size as old ht
-    else                                     // MoveDontCopy
-      resize_to = min_size(ht.size(), min_buckets_wanted);
-    if ( resize_to > bucket_count() ) {      // we don't have enough buckets
-      table.resize(resize_to);               // sets the number of buckets
-      reset_thresholds();
-    }
-
-    // We use a normal iterator to get non-deleted bcks from ht
-    // We could use insert() here, but since we know there are
-    // no duplicates and no deleted items, we can be more efficient
-    assert( (bucket_count() & (bucket_count()-1)) == 0);      // a power of two
-    // THIS IS THE MAJOR LINE THAT DIFFERS FROM COPY_FROM():
-    for ( destructive_iterator it = ht.destructive_begin();
-          it != ht.destructive_end(); ++it ) {
-      size_type num_probes = 0;              // how many times we've probed
-      size_type bucknum;
-      for ( bucknum = hash(get_key(*it)) & (bucket_count()-1);  // h % buck_cnt
-            table.test(bucknum);                          // not empty
-            bucknum = (bucknum + JUMP_(key, num_probes)) & (bucket_count()-1) ) {
-        ++num_probes;
-        assert(num_probes < bucket_count()); // or else the hashtable is full
-      }
-      table.set(bucknum, *it);               // copies the value to here
-    }
-  }
-
-
-  // Required by the spec for hashed associative container
- public:
-  // Though the docs say this should be num_buckets, I think it's much
-  // more useful as num_elements.  As a special feature, calling with
-  // req_elements==0 will cause us to shrink if we can, saving space.
-  void resize(size_type req_elements) {       // resize to this or larger
-    if ( consider_shrink || req_elements == 0 )
-      maybe_shrink();
-    if ( req_elements > table.num_nonempty() )    // we only grow
-      resize_delta(req_elements - table.num_nonempty());
-  }
-
-  // Get and change the value of shrink_resize_percent and
-  // enlarge_resize_percent.  The description at the beginning of this
-  // file explains how to choose the values.  Setting the shrink
-  // parameter to 0.0 ensures that the table never shrinks.
-  void get_resizing_parameters(float* shrink, float* grow) const {
-    *shrink = shrink_resize_percent;
-    *grow = enlarge_resize_percent;
-  }
-  void set_resizing_parameters(float shrink, float grow) {
-    assert(shrink >= 0.0);
-    assert(grow <= 1.0);
-    if (shrink > grow/2.0f)
-      shrink = grow / 2.0f;     // otherwise we thrash hashtable size
-    shrink_resize_percent = shrink;
-    enlarge_resize_percent = grow;
-    reset_thresholds();
-  }
-
-  // CONSTRUCTORS -- as required by the specs, we take a size,
-  // but also let you specify a hashfunction, key comparator,
-  // and key extractor.  We also define a copy constructor and =.
-  // DESTRUCTOR -- the default is fine, surprisingly.
-  explicit sparse_hashtable(size_type expected_max_items_in_table = 0,
-                            const HashFcn& hf = HashFcn(),
-                            const EqualKey& eql = EqualKey(),
-                            const SetKey& set = SetKey(),
-                            const ExtractKey& ext = ExtractKey())
-    : hash(hf), equals(eql), get_key(ext), set_key(set), num_deleted(0),
-      use_deleted(false), delkey(), enlarge_resize_percent(HT_OCCUPANCY_FLT),
-      shrink_resize_percent(HT_EMPTY_FLT),
-      table(expected_max_items_in_table == 0
-            ? HT_DEFAULT_STARTING_BUCKETS
-            : min_size(expected_max_items_in_table, 0)) {
-    reset_thresholds();
-  }
-
-  // As a convenience for resize(), we allow an optional second argument
-  // which lets you make this new hashtable a different size than ht.
-  // We also provide a mechanism of saying you want to "move" the ht argument
-  // into us instead of copying.
-  sparse_hashtable(const sparse_hashtable& ht,
-                   size_type min_buckets_wanted = HT_DEFAULT_STARTING_BUCKETS)
-    : hash(ht.hash), equals(ht.equals),
-      get_key(ht.get_key), set_key(ht.set_key), num_deleted(0),
-      use_deleted(ht.use_deleted), delkey(ht.delkey),
-      enlarge_resize_percent(ht.enlarge_resize_percent),
-      shrink_resize_percent(ht.shrink_resize_percent),
-      table() {
-    reset_thresholds();
-    copy_from(ht, min_buckets_wanted);   // copy_from() ignores deleted entries
-  }
-  sparse_hashtable(MoveDontCopyT mover, sparse_hashtable& ht,
-                   size_type min_buckets_wanted = HT_DEFAULT_STARTING_BUCKETS)
-    : hash(ht.hash), equals(ht.equals), get_key(ht.get_key),
-      num_deleted(0), use_deleted(ht.use_deleted), delkey(ht.delkey),
-      enlarge_resize_percent(ht.enlarge_resize_percent),
-      shrink_resize_percent(ht.shrink_resize_percent),
-      table() {
-    reset_thresholds();
-    move_from(mover, ht, min_buckets_wanted);  // ignores deleted entries
-  }
-
-  sparse_hashtable& operator= (const sparse_hashtable& ht) {
-    if (&ht == this)  return *this;        // don't copy onto ourselves
-    clear();
-    hash = ht.hash;
-    equals = ht.equals;
-    get_key = ht.get_key;
-    set_key = ht.set_key;
-    use_deleted = ht.use_deleted;
-    delkey = ht.delkey;
-    copy_from(ht, HT_MIN_BUCKETS);         // sets num_deleted to 0 too
-    return *this;
-  }
-
-  // Many STL algorithms use swap instead of copy constructors
-  void swap(sparse_hashtable& ht) {
-    STL_NAMESPACE::swap(hash, ht.hash);
-    STL_NAMESPACE::swap(equals, ht.equals);
-    STL_NAMESPACE::swap(get_key, ht.get_key);
-    STL_NAMESPACE::swap(set_key, ht.set_key);
-    STL_NAMESPACE::swap(num_deleted, ht.num_deleted);
-    STL_NAMESPACE::swap(use_deleted, ht.use_deleted);
-    STL_NAMESPACE::swap(enlarge_resize_percent, ht.enlarge_resize_percent);
-    STL_NAMESPACE::swap(shrink_resize_percent, ht.shrink_resize_percent);
-    STL_NAMESPACE::swap(delkey, ht.delkey);
-    table.swap(ht.table);
-    reset_thresholds();
-    ht.reset_thresholds();
-  }
-
-  // It's always nice to be able to clear a table without deallocating it
-  void clear() {
-    table.clear();
-    reset_thresholds();
-    num_deleted = 0;
-  }
-
-
-  // LOOKUP ROUTINES
- private:
-  // Returns a pair of positions: 1st where the object is, 2nd where
-  // it would go if you wanted to insert it.  1st is ILLEGAL_BUCKET
-  // if object is not found; 2nd is ILLEGAL_BUCKET if it is.
-  // Note: because of deletions where-to-insert is not trivial: it's the
-  // first deleted bucket we see, as long as we don't find the key later
-  pair<size_type, size_type> find_position(const key_type &key) const {
-    size_type num_probes = 0;              // how many times we've probed
-    const size_type bucket_count_minus_one = bucket_count() - 1;
-    size_type bucknum = hash(key) & bucket_count_minus_one;
-    size_type insert_pos = ILLEGAL_BUCKET; // where we would insert
-    SPARSEHASH_STAT_UPDATE(total_lookups += 1);
-    while ( 1 ) {                          // probe until something happens
-      if ( !table.test(bucknum) ) {        // bucket is empty
-        SPARSEHASH_STAT_UPDATE(total_probes += num_probes);
-        if ( insert_pos == ILLEGAL_BUCKET )  // found no prior place to insert
-          return pair<size_type,size_type>(ILLEGAL_BUCKET, bucknum);
-        else
-          return pair<size_type,size_type>(ILLEGAL_BUCKET, insert_pos);
-
-      } else if ( test_deleted(bucknum) ) {// keep searching, but mark to insert
-        if ( insert_pos == ILLEGAL_BUCKET )
-          insert_pos = bucknum;
-
-      } else if ( equals(key, get_key(table.unsafe_get(bucknum))) ) {
-        SPARSEHASH_STAT_UPDATE(total_probes += num_probes);
-        return pair<size_type,size_type>(bucknum, ILLEGAL_BUCKET);
-      }
-      ++num_probes;                        // we're doing another probe
-      bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one;
-      assert(num_probes < bucket_count()); // don't probe too many times!
-    }
-  }
-
- public:
-  iterator find(const key_type& key) {
-    if ( size() == 0 ) return end();
-    pair<size_type, size_type> pos = find_position(key);
-    if ( pos.first == ILLEGAL_BUCKET )     // alas, not there
-      return end();
-    else
-      return iterator(this, table.get_iter(pos.first), table.nonempty_end());
-  }
-
-  const_iterator find(const key_type& key) const {
-    if ( size() == 0 ) return end();
-    pair<size_type, size_type> pos = find_position(key);
-    if ( pos.first == ILLEGAL_BUCKET )     // alas, not there
-      return end();
-    else
-      return const_iterator(this,
-                            table.get_iter(pos.first), table.nonempty_end());
-  }
-
-  // This is a tr1 method: the bucket a given key is in, or what bucket
-  // it would be put in, if it were to be inserted.  Shrug.
-  size_type bucket(const key_type& key) const {
-    pair<size_type, size_type> pos = find_position(key);
-    return pos.first == ILLEGAL_BUCKET ? pos.second : pos.first;
-  }
-
-  // Counts how many elements have key key.  For maps, it's either 0 or 1.
-  size_type count(const key_type &key) const {
-    pair<size_type, size_type> pos = find_position(key);
-    return pos.first == ILLEGAL_BUCKET ? 0 : 1;
-  }
-
-  // Likewise, equal_range doesn't really make sense for us.  Oh well.
-  pair<iterator,iterator> equal_range(const key_type& key) {
-    iterator pos = find(key);      // either an iterator or end
-    if (pos == end()) {
-      return pair<iterator,iterator>(pos, pos);
-    } else {
-      const iterator startpos = pos++;
-      return pair<iterator,iterator>(startpos, pos);
-    }
-  }
-  pair<const_iterator,const_iterator> equal_range(const key_type& key) const {
-    const_iterator pos = find(key);      // either an iterator or end
-    if (pos == end()) {
-      return pair<const_iterator,const_iterator>(pos, pos);
-    } else {
-      const const_iterator startpos = pos++;
-      return pair<const_iterator,const_iterator>(startpos, pos);
-    }
-  }
-
-
-  // INSERTION ROUTINES
- private:
-  // If you know *this is big enough to hold obj, use this routine
-  pair<iterator, bool> insert_noresize(const value_type& obj) {
-    // First, double-check we're not inserting delkey
-    assert(!use_deleted || !equals(get_key(obj), delkey));
-    const pair<size_type,size_type> pos = find_position(get_key(obj));
-    if ( pos.first != ILLEGAL_BUCKET) {      // object was already there
-      return pair<iterator,bool>(iterator(this, table.get_iter(pos.first),
-                                          table.nonempty_end()),
-                                 false);          // false: we didn't insert
-    } else {                                 // pos.second says where to put it
-      if ( test_deleted(pos.second) ) {      // just replace if it's been del.
-        // The set() below will undelete this object.  We just worry about stats
-        assert(num_deleted > 0);
-        --num_deleted;                       // used to be, now it isn't
-      }
-      table.set(pos.second, obj);
-      return pair<iterator,bool>(iterator(this, table.get_iter(pos.second),
-                                          table.nonempty_end()),
-                                 true);           // true: we did insert
-    }
-  }
-
- public:
-  // This is the normal insert routine, used by the outside world
-  pair<iterator, bool> insert(const value_type& obj) {
-    resize_delta(1);  // adding an object, grow if need be
-    return insert_noresize(obj);
-  }
-
-  // When inserting a lot at a time, we specialize on the type of iterator
-  template <class InputIterator>
-  void insert(InputIterator f, InputIterator l) {
-    // specializes on iterator type
-    insert(f, l, typename STL_NAMESPACE::iterator_traits<InputIterator>::iterator_category());
-  }
-
-  // Iterator supports operator-, resize before inserting
-  template <class ForwardIterator>
-  void insert(ForwardIterator f, ForwardIterator l,
-              STL_NAMESPACE::forward_iterator_tag) {
-    size_type n = STL_NAMESPACE::distance(f, l);   // TODO(csilvers): standard?
-    resize_delta(n);
-    for ( ; n > 0; --n, ++f)
-      insert_noresize(*f);
-  }
-
-  // Arbitrary iterator, can't tell how much to resize
-  template <class InputIterator>
-  void insert(InputIterator f, InputIterator l,
-              STL_NAMESPACE::input_iterator_tag) {
-    for ( ; f != l; ++f)
-      insert(*f);
-  }
-
-
-  // DELETION ROUTINES
-  size_type erase(const key_type& key) {
-    // First, double-check we're not erasing delkey
-    assert(!use_deleted || !equals(key, delkey));
-    const_iterator pos = find(key);   // shrug: shouldn't need to be const
-    if ( pos != end() ) {
-      assert(!test_deleted(pos));  // or find() shouldn't have returned it
-      set_deleted(pos);
-      ++num_deleted;
-      consider_shrink = true;      // will think about shrink after next insert
-      return 1;                    // because we deleted one thing
-    } else {
-      return 0;                    // because we deleted nothing
-    }
-  }
-
-  // This is really evil: really it should be iterator, not const_iterator.
-  // But...the only reason keys are const is to allow lookup.
-  // Since that's a moot issue for deleted keys, we allow const_iterators
-  void erase(const_iterator pos) {
-    if ( pos == end() ) return;    // sanity check
-    if ( set_deleted(pos) ) {      // true if object has been newly deleted
-      ++num_deleted;
-      consider_shrink = true;      // will think about shrink after next insert
-    }
-  }
-
-  void erase(const_iterator f, const_iterator l) {
-    for ( ; f != l; ++f) {
-      if ( set_deleted(f)  )       // should always be true
-        ++num_deleted;
-    }
-    consider_shrink = true;        // will think about shrink after next insert
-  }
-
-
-  // COMPARISON
-  bool operator==(const sparse_hashtable& ht) const {
-    // We really want to check that the hash functions are the same
-    // but alas there's no way to do this.  We just hope.
-    return ( num_deleted == ht.num_deleted && table == ht.table );
-  }
-  bool operator!=(const sparse_hashtable& ht) const {
-    return !(*this == ht);
-  }
-
-
-  // I/O
-  // We support reading and writing hashtables to disk.  NOTE that
-  // this only stores the hashtable metadata, not the stuff you've
-  // actually put in the hashtable!  Alas, since I don't know how to
-  // write a hasher or key_equal, you have to make sure everything
-  // but the table is the same.  We compact before writing.
-  bool write_metadata(FILE *fp) {
-    squash_deleted();           // so we don't have to worry about delkey
-    return table.write_metadata(fp);
-  }
-
-  bool read_metadata(FILE *fp) {
-    num_deleted = 0;            // since we got rid before writing
-    bool result = table.read_metadata(fp);
-    reset_thresholds();
-    return result;
-  }
-
-  // Only meaningful if value_type is a POD.
-  bool write_nopointer_data(FILE *fp) {
-    return table.write_nopointer_data(fp);
-  }
-
-  // Only meaningful if value_type is a POD.
-  bool read_nopointer_data(FILE *fp) {
-    return table.read_nopointer_data(fp);
-  }
-
- private:
-  // The actual data
-  hasher hash;                      // required by hashed_associative_container
-  key_equal equals;
-  ExtractKey get_key;
-  SetKey set_key;
-  size_type num_deleted;        // how many occupied buckets are marked deleted
-  bool use_deleted;                          // false until delkey has been set
-  // TODO(csilvers): make a pointer, and get rid of use_deleted (benchmark!)
-  key_type delkey;                           // which key marks deleted entries
-  float enlarge_resize_percent;                       // how full before resize
-  float shrink_resize_percent;                       // how empty before resize
-  size_type shrink_threshold;           // table.size() * shrink_resize_percent
-  size_type enlarge_threshold;         // table.size() * enlarge_resize_percent
-  sparsetable<value_type> table;      // holds num_buckets and num_elements too
-  bool consider_shrink;   // true if we should try to shrink before next insert
-
-  void reset_thresholds() {
-    enlarge_threshold = static_cast<size_type>(table.size()
-                                               * enlarge_resize_percent);
-    shrink_threshold = static_cast<size_type>(table.size()
-                                              * shrink_resize_percent);
-    consider_shrink = false;   // whatever caused us to reset already considered
-  }
-};
-
-// We need a global swap as well
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-inline void swap(sparse_hashtable<V,K,HF,ExK,SetK,EqK,A> &x,
-                 sparse_hashtable<V,K,HF,ExK,SetK,EqK,A> &y) {
-  x.swap(y);
-}
-
-#undef JUMP_
-
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-const typename sparse_hashtable<V,K,HF,ExK,SetK,EqK,A>::size_type
-  sparse_hashtable<V,K,HF,ExK,SetK,EqK,A>::ILLEGAL_BUCKET;
-
-// How full we let the table get before we resize.  Knuth says .8 is
-// good -- higher causes us to probe too much, though saves memory
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-const float sparse_hashtable<V,K,HF,ExK,SetK,EqK,A>::HT_OCCUPANCY_FLT = 0.8f;
-
-// How empty we let the table get before we resize lower.
-// It should be less than OCCUPANCY_FLT / 2 or we thrash resizing
-template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
-const float sparse_hashtable<V,K,HF,ExK,SetK,EqK,A>::HT_EMPTY_FLT = 0.4f *
-sparse_hashtable<V,K,HF,ExK,SetK,EqK,A>::HT_OCCUPANCY_FLT;
-
-_END_GOOGLE_NAMESPACE_
-
-#endif /* _SPARSEHASHTABLE_H_ */
diff --git a/ext/google/sparsetable b/ext/google/sparsetable
deleted file mode 100644
index 0eeb22e..0000000
--- a/ext/google/sparsetable
+++ /dev/null
@@ -1,1468 +0,0 @@
-// Copyright (c) 2005, Google Inc.
-// All rights reserved.
-// 
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-// 
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// ---
-// Author: Craig Silverstein
-//
-// A sparsetable is a random container that implements a sparse array,
-// that is, an array that uses very little memory to store unassigned
-// indices (in this case, between 1-2 bits per unassigned index).  For
-// instance, if you allocate an array of size 5 and assign a[2] = <big
-// struct>, then a[2] will take up a lot of memory but a[0], a[1],
-// a[3], and a[4] will not.  Array elements that have a value are
-// called "assigned".  Array elements that have no value yet, or have
-// had their value cleared using erase() or clear(), are called
-// "unassigned".
-//
-// Unassigned values seem to have the default value of T (see below).
-// Nevertheless, there is a difference between an unassigned index and
-// one explicitly assigned the value of T().  The latter is considered
-// assigned.
-//
-// Access to an array element is constant time, as is insertion and
-// deletion.  Insertion and deletion may be fairly slow, however:
-// because of this container's memory economy, each insert and delete
-// causes a memory reallocation.
-//
-// See /usr/(local/)?doc/sparsehash-0.1/sparsetable.html
-// for information about how to use this class.
-
-#ifndef _SPARSETABLE_H_
-#define _SPARSETABLE_H_
-
-#include <google/sparsehash/sparseconfig.h>
-#include <stdlib.h>             // for malloc/free
-#include <stdio.h>              // to read/write tables
-#ifdef HAVE_STDINT_H
-#include <stdint.h>             // the normal place uint16_t is defined
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>          // the normal place u_int16_t is defined
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>           // a third place for uint16_t or u_int16_t
-#endif
-#include <assert.h>             // for bounds checking
-#include <iterator>             // to define reverse_iterator for me
-#include <algorithm>            // equal, lexicographical_compare, swap,...
-#include <memory>               // uninitialized_copy
-#include <vector>               // a sparsetable is a vector of groups
-#include <google/type_traits.h> // for true_type, integral_constant, etc.
-
-#if STDC_HEADERS
-#include <string.h>             // for memcpy
-#else
-#if !HAVE_MEMCPY
-#define memcpy(d, s, n)   bcopy ((s), (d), (n))
-#endif
-#endif
-
-_START_GOOGLE_NAMESPACE_
-
-#ifndef HAVE_U_INT16_T
-# if defined HAVE_UINT16_T
-    typedef uint16_t u_int16_t;    // true on solaris, possibly other C99 libc's
-# elif defined HAVE___UINT16
-    typedef __int16 int16_t;       // true on vc++7
-    typedef unsigned __int16 u_int16_t;
-# else
-    // Cannot find a 16-bit integer type.  Hoping for the best with "short"...
-    typedef short int int16_t;
-    typedef unsigned short int u_int16_t;
-# endif
-#endif
-
-using STL_NAMESPACE::vector;
-using STL_NAMESPACE::uninitialized_copy;
-
-// The smaller this is, the faster lookup is (because the group bitmap is
-// smaller) and the faster insert is, because there's less to move.
-// On the other hand, there are more groups.  Since group::size_type is
-// a short, this number should be of the form 32*x + 16 to avoid waste.
-static const u_int16_t DEFAULT_SPARSEGROUP_SIZE = 48;   // fits in 1.5 words
-
-
-// A NOTE ON ASSIGNING:
-// A sparse table does not actually allocate memory for entries
-// that are not filled.  Because of this, it becomes complicated
-// to have a non-const iterator: we don't know, if the iterator points
-// to a not-filled bucket, whether you plan to fill it with something
-// or whether you plan to read its value (in which case you'll get
-// the default bucket value).  Therefore, while we can define const
-// operations in a pretty 'normal' way, for non-const operations, we
-// define something that returns a helper object with operator= and
-// operator& that allocate a bucket lazily.  We use this for table[]
-// and also for regular table iterators.
-
-template <class tabletype>
-class table_element_adaptor {
- public:
-  typedef typename tabletype::value_type value_type;
-  typedef typename tabletype::size_type size_type;
-  typedef typename tabletype::reference reference;
-  typedef typename tabletype::pointer pointer;
-
-  table_element_adaptor(tabletype *tbl, size_type p)
-    : table(tbl), pos(p) { }
-  table_element_adaptor& operator= (const value_type &val) {
-    table->set(pos, val);
-    return *this;
-  }
-  operator value_type() { return table->get(pos); }   // we look like a value
-  pointer operator& () { return &table->mutating_get(pos); }
-
- private:
-  tabletype* table;
-  size_type pos;
-};
-
-// Our iterator as simple as iterators can be: basically it's just
-// the index into our table.  Dereference, the only complicated
-// thing, we punt to the table class.  This just goes to show how
-// much machinery STL requires to do even the most trivial tasks.
-//
-// By templatizing over tabletype, we have one iterator type which
-// we can use for both sparsetables and sparsebins.  In fact it
-// works on any class that allows size() and operator[] (eg vector),
-// as long as it does the standard STL typedefs too (eg value_type).
-
-template <class tabletype>
-class table_iterator {
- public:
-  typedef table_iterator iterator;
-
-  typedef STL_NAMESPACE::random_access_iterator_tag iterator_category;
-  typedef typename tabletype::value_type value_type;
-  typedef typename tabletype::difference_type difference_type;
-  typedef typename tabletype::size_type size_type;
-  typedef table_element_adaptor<tabletype> reference;
-  typedef table_element_adaptor<tabletype>* pointer;
-
-  // The "real" constructor
-  table_iterator(tabletype *tbl, size_type p)
-    : table(tbl), pos(p) { }
-  // The default constructor, used when I define vars of type table::iterator
-  table_iterator() : table(NULL), pos(0) { }
-  // The copy constructor, for when I say table::iterator foo = tbl.begin()
-  // The default destructor is fine; we don't define one
-  // The default operator= is fine; we don't define one
-
-  // The main thing our iterator does is dereference.  If the table entry
-  // we point to is empty, we return the default value type.
-  // This is the big different function from the const iterator.
-  reference operator*()              {
-    return table_element_adaptor<tabletype>(table, pos);
-  }
-  pointer operator->()               { return &(operator*()); }
-
-  // Helper function to assert things are ok; eg pos is still in range
-  void check() const {
-    assert(table);
-    assert(pos <= table->size());
-  }
-
-  // Arithmetic: we just do arithmetic on pos.  We don't even need to
-  // do bounds checking, since STL doesn't consider that it's job.  :-)
-  iterator& operator+=(size_type t) { pos += t; check(); return *this; }
-  iterator& operator-=(size_type t) { pos -= t; check(); return *this; }
-  iterator& operator++()            { ++pos; check(); return *this; }
-  iterator& operator--()            { --pos; check(); return *this; }
-  iterator operator++(int)          { iterator tmp(*this);     // for x++
-                                      ++pos; check(); return tmp; }
-  iterator operator--(int)          { iterator tmp(*this);     // for x--
-                                      --pos; check(); return tmp; }
-  iterator operator+(difference_type i) const  { iterator tmp(*this);
-                                                 tmp += i; return tmp; }
-  iterator operator-(difference_type i) const  { iterator tmp(*this);
-                                                 tmp -= i; return tmp; }
-  difference_type operator-(iterator it) const {      // for "x = it2 - it"
-    assert(table == it.table);
-    return pos - it.pos;
-  }
-  reference operator[](difference_type n) const {
-    return *(*this + n);            // simple though not totally efficient
-  }
-
-  // Comparisons.
-  bool operator==(const iterator& it) const {
-    return table == it.table && pos == it.pos;
-  }
-  bool operator<(const iterator& it) const {
-    assert(table == it.table);              // life is bad bad bad otherwise
-    return pos < it.pos;
-  }
-  bool operator!=(const iterator& it) const { return !(*this == it); }
-  bool operator<=(const iterator& it) const { return !(it < *this); }
-  bool operator>(const iterator& it) const { return it < *this; }
-  bool operator>=(const iterator& it) const { return !(*this < it); }
-
-  // Here's the info we actually need to be an iterator
-  tabletype *table;              // so we can dereference and bounds-check
-  size_type pos;                 // index into the table
-};
-
-// support for "3 + iterator" has to be defined outside the class, alas
-template<class T>
-table_iterator<T> operator+(typename table_iterator<T>::difference_type i,
-                            table_iterator<T> it) {
-  return it + i;               // so people can say it2 = 3 + it
-}
-
-template <class tabletype>
-class const_table_iterator {
- public:
-  typedef table_iterator<tabletype> iterator;
-  typedef const_table_iterator const_iterator;
-
-  typedef STL_NAMESPACE::random_access_iterator_tag iterator_category;
-  typedef typename tabletype::value_type value_type;
-  typedef typename tabletype::difference_type difference_type;
-  typedef typename tabletype::size_type size_type;
-  typedef typename tabletype::const_reference reference;  // we're const-only
-  typedef typename tabletype::const_pointer pointer;
-
-  // The "real" constructor
-  const_table_iterator(const tabletype *tbl, size_type p)
-    : table(tbl), pos(p) { }
-  // The default constructor, used when I define vars of type table::iterator
-  const_table_iterator() : table(NULL), pos(0) { }
-  // The copy constructor, for when I say table::iterator foo = tbl.begin()
-  // Also converts normal iterators to const iterators
-  const_table_iterator(const iterator &from)
-    : table(from.table), pos(from.pos) { }
-  // The default destructor is fine; we don't define one
-  // The default operator= is fine; we don't define one
-
-  // The main thing our iterator does is dereference.  If the table entry
-  // we point to is empty, we return the default value type.
-  reference operator*() const       { return (*table)[pos]; }
-  pointer operator->() const        { return &(operator*()); }
-
-  // Helper function to assert things are ok; eg pos is still in range
-  void check() const {
-    assert(table);
-    assert(pos <= table->size());
-  }
-
-  // Arithmetic: we just do arithmetic on pos.  We don't even need to
-  // do bounds checking, since STL doesn't consider that it's job.  :-)
-  const_iterator& operator+=(size_type t) { pos += t; check(); return *this; }
-  const_iterator& operator-=(size_type t) { pos -= t; check(); return *this; }
-  const_iterator& operator++()            { ++pos; check(); return *this; }
-  const_iterator& operator--()            { --pos; check(); return *this; }
-  const_iterator operator++(int)          { const_iterator tmp(*this); // for x++
-                                            ++pos; check(); return tmp; }
-  const_iterator operator--(int)          { const_iterator tmp(*this); // for x--
-                                            --pos; check(); return tmp; }
-  const_iterator operator+(difference_type i) const  { const_iterator tmp(*this);
-                                                       tmp += i; return tmp; }
-  const_iterator operator-(difference_type i) const  { const_iterator tmp(*this);
-                                                       tmp -= i; return tmp; }
-  difference_type operator-(const_iterator it) const {   // for "x = it2 - it"
-    assert(table == it.table);
-    return pos - it.pos;
-  }
-  reference operator[](difference_type n) const {
-    return *(*this + n);            // simple though not totally efficient
-  }
-
-  // Comparisons.
-  bool operator==(const const_iterator& it) const {
-    return table == it.table && pos == it.pos;
-  }
-  bool operator<(const const_iterator& it) const {
-    assert(table == it.table);              // life is bad bad bad otherwise
-    return pos < it.pos;
-  }
-  bool operator!=(const const_iterator& it) const { return !(*this == it); }
-  bool operator<=(const const_iterator& it) const { return !(it < *this); }
-  bool operator>(const const_iterator& it) const { return it < *this; }
-  bool operator>=(const const_iterator& it) const { return !(*this < it); }
-
-  // Here's the info we actually need to be an iterator
-  const tabletype *table;        // so we can dereference and bounds-check
-  size_type pos;                 // index into the table
-};
-
-// support for "3 + iterator" has to be defined outside the class, alas
-template<class T>
-const_table_iterator<T> operator+(typename
-                                  const_table_iterator<T>::difference_type i,
-                                  const_table_iterator<T> it) {
-  return it + i;               // so people can say it2 = 3 + it
-}
-
-
-// ---------------------------------------------------------------------------
-
-
-/*
-// This is a 2-D iterator.  You specify a begin and end over a list
-// of *containers*.  We iterate over each container by iterating over
-// it.  It's actually simple:
-// VECTOR.begin() VECTOR[0].begin()  --------> VECTOR[0].end() ---,
-//     |          ________________________________________________/
-//     |          \_> VECTOR[1].begin()  -------->  VECTOR[1].end() -,
-//     |          ___________________________________________________/
-//     v          \_> ......
-// VECTOR.end()
-//
-// It's impossible to do random access on one of these things in constant
-// time, so it's just a bidirectional iterator.
-//
-// Unfortunately, because we need to use this for a non-empty iterator,
-// we use nonempty_begin() and nonempty_end() instead of begin() and end()
-// (though only going across, not down).
-*/
-
-#define TWOD_BEGIN_      nonempty_begin
-#define TWOD_END_        nonempty_end
-#define TWOD_ITER_       nonempty_iterator
-#define TWOD_CONST_ITER_ const_nonempty_iterator
-
-template <class containertype>
-class two_d_iterator {
- public:
-  typedef two_d_iterator iterator;
-
-  typedef STL_NAMESPACE::bidirectional_iterator_tag iterator_category;
-  // apparently some versions of VC++ have trouble with two ::'s in a typename
-  typedef typename containertype::value_type _tmp_vt;
-  typedef typename _tmp_vt::value_type value_type;
-  typedef typename _tmp_vt::difference_type difference_type;
-  typedef typename _tmp_vt::reference reference;
-  typedef typename _tmp_vt::pointer pointer;
-
-  // The "real" constructor.  begin and end specify how many rows we have
-  // (in the diagram above); we always iterate over each row completely.
-  two_d_iterator(typename containertype::iterator begin,
-                 typename containertype::iterator end,
-                 typename containertype::iterator curr)
-    : row_begin(begin), row_end(end), row_current(curr), col_current() {
-    if ( row_current != row_end ) {
-      col_current = row_current->TWOD_BEGIN_();
-      advance_past_end();                 // in case cur->begin() == cur->end()
-    }
-  }
-  // If you want to start at an arbitrary place, you can, I guess
-  two_d_iterator(typename containertype::iterator begin,
-                 typename containertype::iterator end,
-                 typename containertype::iterator curr,
-                 typename containertype::value_type::TWOD_ITER_ col)
-    : row_begin(begin), row_end(end), row_current(curr), col_current(col) {
-    advance_past_end();                 // in case cur->begin() == cur->end()
-  }
-  // The default constructor, used when I define vars of type table::iterator
-  two_d_iterator() : row_begin(), row_end(), row_current(), col_current() { }
-  // The default destructor is fine; we don't define one
-  // The default operator= is fine; we don't define one
-
-  // Happy dereferencer
-  reference operator*() const    { return *col_current; }
-  pointer operator->() const     { return &(operator*()); }
-
-  // Arithmetic: we just do arithmetic on pos.  We don't even need to
-  // do bounds checking, since STL doesn't consider that it's job.  :-)
-  // NOTE: this is not amortized constant time!  What do we do about it?
-  void advance_past_end() {          // used when col_current points to end()
-    while ( col_current == row_current->TWOD_END_() ) {  // end of current row
-      ++row_current;                                // go to beginning of next
-      if ( row_current != row_end )                 // col is irrelevant at end
-        col_current = row_current->TWOD_BEGIN_();
-      else
-        break;                                      // don't go past row_end
-    }
-  }
-
-  iterator& operator++() {
-    assert(row_current != row_end);                 // how to ++ from there?
-    ++col_current;
-    advance_past_end();                 // in case col_current is at end()
-    return *this;
-  }
-  iterator& operator--() {
-    while ( row_current == row_end ||
-            col_current == row_current->TWOD_BEGIN_() ) {
-      assert(row_current != row_begin);
-      --row_current;
-      col_current = row_current->TWOD_END_();             // this is 1 too far
-    }
-    --col_current;
-    return *this;
-  }
-  iterator operator++(int)       { iterator tmp(*this); ++*this; return tmp; }
-  iterator operator--(int)       { iterator tmp(*this); --*this; return tmp; }
-
-
-  // Comparisons.
-  bool operator==(const iterator& it) const {
-    return ( row_begin == it.row_begin &&
-             row_end == it.row_end &&
-             row_current == it.row_current &&
-             (row_current == row_end || col_current == it.col_current) );
-  }
-  bool operator!=(const iterator& it) const { return !(*this == it); }
-
-
-  // Here's the info we actually need to be an iterator
-  // These need to be public so we convert from iterator to const_iterator
-  typename containertype::iterator row_begin, row_end, row_current;
-  typename containertype::value_type::TWOD_ITER_ col_current;
-};
-
-// The same thing again, but this time const.  :-(
-template <class containertype>
-class const_two_d_iterator {
- public:
-  typedef const_two_d_iterator iterator;
-
-  typedef STL_NAMESPACE::bidirectional_iterator_tag iterator_category;
-  // apparently some versions of VC++ have trouble with two ::'s in a typename
-  typedef typename containertype::value_type _tmp_vt;
-  typedef typename _tmp_vt::value_type value_type;
-  typedef typename _tmp_vt::difference_type difference_type;
-  typedef typename _tmp_vt::const_reference reference;
-  typedef typename _tmp_vt::const_pointer pointer;
-
-  const_two_d_iterator(typename containertype::const_iterator begin,
-                       typename containertype::const_iterator end,
-                       typename containertype::const_iterator curr)
-    : row_begin(begin), row_end(end), row_current(curr), col_current() {
-    if ( curr != end ) {
-      col_current = curr->TWOD_BEGIN_();
-      advance_past_end();                 // in case cur->begin() == cur->end()
-    }
-  }
-  const_two_d_iterator(typename containertype::const_iterator begin,
-                       typename containertype::const_iterator end,
-                       typename containertype::const_iterator curr,
-                       typename containertype::value_type::TWOD_CONST_ITER_ col)
-    : row_begin(begin), row_end(end), row_current(curr), col_current(col) {
-    advance_past_end();                 // in case cur->begin() == cur->end()
-  }
-  const_two_d_iterator()
-    : row_begin(), row_end(), row_current(), col_current() {
-  }
-  // Need this explicitly so we can convert normal iterators to const iterators
-  const_two_d_iterator(const two_d_iterator<containertype>& it) :
-    row_begin(it.row_begin), row_end(it.row_end), row_current(it.row_current),
-    col_current(it.col_current) { }
-
-  typename containertype::const_iterator row_begin, row_end, row_current;
-  typename containertype::value_type::TWOD_CONST_ITER_ col_current;
-
-
-  // EVERYTHING FROM HERE DOWN IS THE SAME AS THE NON-CONST ITERATOR
-  reference operator*() const    { return *col_current; }
-  pointer operator->() const     { return &(operator*()); }
-
-  void advance_past_end() {          // used when col_current points to end()
-    while ( col_current == row_current->TWOD_END_() ) {  // end of current row
-      ++row_current;                                // go to beginning of next
-      if ( row_current != row_end )                 // col is irrelevant at end
-        col_current = row_current->TWOD_BEGIN_();
-      else
-        break;                                      // don't go past row_end
-    }
-  }
-  iterator& operator++() {
-    assert(row_current != row_end);                 // how to ++ from there?
-    ++col_current;
-    advance_past_end();                 // in case col_current is at end()
-    return *this;
-  }
-  iterator& operator--() {
-    while ( row_current == row_end ||
-            col_current == row_current->TWOD_BEGIN_() ) {
-      assert(row_current != row_begin);
-      --row_current;
-      col_current = row_current->TWOD_END_();             // this is 1 too far
-    }
-    --col_current;
-    return *this;
-  }
-  iterator operator++(int)       { iterator tmp(*this); ++*this; return tmp; }
-  iterator operator--(int)       { iterator tmp(*this); --*this; return tmp; }
-
-  bool operator==(const iterator& it) const {
-    return ( row_begin == it.row_begin &&
-             row_end == it.row_end &&
-             row_current == it.row_current &&
-             (row_current == row_end || col_current == it.col_current) );
-  }
-  bool operator!=(const iterator& it) const { return !(*this == it); }
-};
-
-// We provide yet another version, to be as frugal with memory as
-// possible.  This one frees each block of memory as it finishes
-// iterating over it.  By the end, the entire table is freed.
-// For understandable reasons, you can only iterate over it once,
-// which is why it's an input iterator
-template <class containertype>
-class destructive_two_d_iterator {
- public:
-  typedef destructive_two_d_iterator iterator;
-
-  typedef STL_NAMESPACE::input_iterator_tag iterator_category;
-  // apparently some versions of VC++ have trouble with two ::'s in a typename
-  typedef typename containertype::value_type _tmp_vt;
-  typedef typename _tmp_vt::value_type value_type;
-  typedef typename _tmp_vt::difference_type difference_type;
-  typedef typename _tmp_vt::reference reference;
-  typedef typename _tmp_vt::pointer pointer;
-
-  destructive_two_d_iterator(typename containertype::iterator begin,
-                             typename containertype::iterator end,
-                             typename containertype::iterator curr)
-    : row_begin(begin), row_end(end), row_current(curr), col_current() {
-    if ( curr != end ) {
-      col_current = curr->TWOD_BEGIN_();
-      advance_past_end();                 // in case cur->begin() == cur->end()
-    }
-  }
-  destructive_two_d_iterator(typename containertype::iterator begin,
-                             typename containertype::iterator end,
-                             typename containertype::iterator curr,
-                             typename containertype::value_type::TWOD_ITER_ col)
-    : row_begin(begin), row_end(end), row_current(curr), col_current(col) {
-    advance_past_end();                 // in case cur->begin() == cur->end()
-  }
-  destructive_two_d_iterator()
-    : row_begin(), row_end(), row_current(), col_current() {
-  }
-
-  typename containertype::iterator row_begin, row_end, row_current;
-  typename containertype::value_type::TWOD_ITER_ col_current;
-
-  // This is the part that destroys
-  void advance_past_end() {          // used when col_current points to end()
-    while ( col_current == row_current->TWOD_END_() ) {  // end of current row
-      row_current->clear();                         // the destructive part
-      // It would be nice if we could decrement sparsetable->num_buckets here
-      ++row_current;                                // go to beginning of next
-      if ( row_current != row_end )                 // col is irrelevant at end
-        col_current = row_current->TWOD_BEGIN_();
-      else
-        break;                                      // don't go past row_end
-    }
-  }
-
-  // EVERYTHING FROM HERE DOWN IS THE SAME AS THE REGULAR ITERATOR
-  reference operator*() const    { return *col_current; }
-  pointer operator->() const     { return &(operator*()); }
-
-  iterator& operator++() {
-    assert(row_current != row_end);                 // how to ++ from there?
-    ++col_current;
-    advance_past_end();                 // in case col_current is at end()
-    return *this;
-  }
-  iterator operator++(int)       { iterator tmp(*this); ++*this; return tmp; }
-
-  bool operator==(const iterator& it) const {
-    return ( row_begin == it.row_begin &&
-             row_end == it.row_end &&
-             row_current == it.row_current &&
-             (row_current == row_end || col_current == it.col_current) );
-  }
-  bool operator!=(const iterator& it) const { return !(*this == it); }
-};
-
-#undef TWOD_BEGIN_
-#undef TWOD_END_
-#undef TWOD_ITER_
-#undef TWOD_CONST_ITER_
-
-
-

-
-// SPARSE-TABLE
-// ------------
-// The idea is that a table with (logically) t buckets is divided
-// into t/M *groups* of M buckets each.  (M is a constant set in
-// GROUP_SIZE for efficiency.)  Each group is stored sparsely.
-// Thus, inserting into the table causes some array to grow, which is
-// slow but still constant time.  Lookup involves doing a
-// logical-position-to-sparse-position lookup, which is also slow but
-// constant time.  The larger M is, the slower these operations are
-// but the less overhead (slightly).
-//
-// To store the sparse array, we store a bitmap B, where B[i] = 1 iff
-// bucket i is non-empty.  Then to look up bucket i we really look up
-// array[# of 1s before i in B].  This is constant time for fixed M.
-//
-// Terminology: the position of an item in the overall table (from
-// 1 .. t) is called its "location."  The logical position in a group
-// (from 1 .. M ) is called its "position."  The actual location in
-// the array (from 1 .. # of non-empty buckets in the group) is
-// called its "offset."
-
-// The weird mod in the offset is entirely to quiet compiler warnings
-// as is the cast to int after doing the "x mod 256"
-#define PUT_(take_from, offset)  do {                                          \
-  if (putc(static_cast<int>(((take_from) >> ((offset) % (sizeof(take_from)*8)))\
-                             % 256), fp)                                       \
-      == EOF)                                                                  \
-    return false;                                                              \
-} while (0)
-
-#define GET_(add_to, offset)  do {                                            \
-  if ((x=getc(fp)) == EOF)                                                    \
-    return false;                                                             \
-  else                                                                        \
-    add_to |= (static_cast<size_type>(x) << ((offset) % (sizeof(add_to)*8))); \
-} while (0)
-
-template <class T, u_int16_t GROUP_SIZE>
-class sparsegroup {
- public:
-  // Basic types
-  typedef T value_type;
-  typedef value_type* pointer;
-  typedef const value_type* const_pointer;
-  typedef table_iterator<sparsegroup<T, GROUP_SIZE> > iterator;
-  typedef const_table_iterator<sparsegroup<T, GROUP_SIZE> > const_iterator;
-  typedef table_element_adaptor<sparsegroup<T, GROUP_SIZE> > element_adaptor;
-  typedef value_type &reference;
-  typedef const value_type &const_reference;
-  typedef u_int16_t size_type;                  // max # of buckets
-  typedef int16_t difference_type;
-  typedef STL_NAMESPACE::reverse_iterator<const_iterator> const_reverse_iterator;
-  typedef STL_NAMESPACE::reverse_iterator<iterator> reverse_iterator;
-
-  // These are our special iterators, that go over non-empty buckets in a
-  // group.  These aren't const-only because you can change non-empty bcks.
-  typedef pointer nonempty_iterator;
-  typedef const_pointer const_nonempty_iterator;
-  typedef STL_NAMESPACE::reverse_iterator<nonempty_iterator> reverse_nonempty_iterator;
-  typedef STL_NAMESPACE::reverse_iterator<const_nonempty_iterator> const_reverse_nonempty_iterator;
-
-  // Iterator functions
-  iterator begin()                      { return iterator(this, 0); }
-  const_iterator begin() const          { return const_iterator(this, 0); }
-  iterator end()                        { return iterator(this, size()); }
-  const_iterator end() const            { return const_iterator(this, size()); }
-  reverse_iterator rbegin()             { return reverse_iterator(end()); }
-  const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
-  reverse_iterator rend()               { return reverse_iterator(begin()); }
-  const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
-
-  // We'll have versions for our special non-empty iterator too
-  nonempty_iterator nonempty_begin()             { return group; }
-  const_nonempty_iterator nonempty_begin() const { return group; }
-  nonempty_iterator nonempty_end()               { return group + num_buckets; }
-  const_nonempty_iterator nonempty_end() const   { return group + num_buckets; }
-  reverse_nonempty_iterator nonempty_rbegin() {
-    return reverse_nonempty_iterator(nonempty_end());
-  }
-  const_reverse_nonempty_iterator nonempty_rbegin() const {
-    return const_reverse_nonempty_iterator(nonempty_end());
-  }
-  reverse_nonempty_iterator nonempty_rend() {
-    return reverse_nonempty_iterator(nonempty_begin());
-  }
-  const_reverse_nonempty_iterator nonempty_rend() const {
-    return const_reverse_nonempty_iterator(nonempty_begin());
-  }
-
-
-  // This gives us the "default" value to return for an empty bucket.
-  // We just use the default constructor on T, the template type
-  const_reference default_value() const {
-    static value_type defaultval = value_type();
-    return defaultval;
-  }
-
-
- private:
-  // We need to do all this bit manipulation, of course.  ick
-  static size_type charbit(size_type i)  { return i >> 3; }
-  static size_type modbit(size_type i)   { return 1 << (i&7); }
-  int bmtest(size_type i) const    { return bitmap[charbit(i)] & modbit(i); }
-  void bmset(size_type i)          { bitmap[charbit(i)] |= modbit(i); }
-  void bmclear(size_type i)        { bitmap[charbit(i)] &= ~modbit(i); }
-
-  void* realloc_or_die(void* ptr, size_t num_bytes) {
-    void* retval = realloc(ptr, num_bytes);
-    if (retval == NULL) {
-      // We really should use PRIuS here, but I don't want to have to add
-      // a whole new configure option, with concomitant macro namespace
-      // pollution, just to print this (unlikely) error message.  So I cast.
-      fprintf(stderr, "FATAL ERROR: failed to allocate %lu bytes for ptr %p",
-              static_cast<unsigned long>(num_bytes), ptr);
-      exit(1);
-    }
-    return retval;
-  }
-
-  value_type* allocate_group(size_t n) {
-    return static_cast<value_type*>(realloc_or_die(NULL,
-                                                   n * sizeof(value_type)));
-  }
-
-  void free_group() {
-    // Valid even for empty group, because NULL+0 is defined to be NULL
-    value_type* end_it = group + num_buckets;
-    for (value_type* p = group; p != end_it; ++p)
-      p->~value_type();
-    free(group);
-    group = NULL;
-  }
-
- public:                         // get_iter() in sparsetable needs it
-  // We need a small function that tells us how many set bits there are
-  // in positions 0..i-1 of the bitmap.  It uses a big table.
-  // We make it static so templates don't allocate lots of these tables
-  static size_type pos_to_offset(const unsigned char *bm, size_type pos) {
-    // We could make these ints.  The tradeoff is size (eg does it overwhelm
-    // the cache?) vs efficiency in referencing sub-word-sized array elements
-    static const char bits_in[256] = {      // # of bits set in one char
-      0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
-      1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
-      1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
-      2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-      1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
-      2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-      2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-      3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
-      1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
-      2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-      2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-      3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
-      2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-      3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
-      3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
-      4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8,
-    };
-    size_type retval = 0;
-
-    // [Note: condition pos > 8 is an optimization; convince yourself we
-    // give exactly the same result as if we had pos >= 8 here instead.]
-    for ( ; pos > 8; pos -= 8 )                    // bm[0..pos/8-1]
-      retval += bits_in[*bm++];                    // chars we want *all* bits in
-    return retval + bits_in[*bm & ((1 << pos)-1)]; // the char that includes pos
-  }
-
-  size_type pos_to_offset(size_type pos) const {   // not static but still const
-    return pos_to_offset(bitmap, pos);
-  }
-
-
- public:
-  // Constructors -- default and copy -- and destructor
-  sparsegroup() : group(0), num_buckets(0) { memset(bitmap, 0, sizeof(bitmap)); }
-  sparsegroup(const sparsegroup& x) : group(0), num_buckets(x.num_buckets) {
-    if ( num_buckets ) {
-      group = allocate_group(x.num_buckets);
-      uninitialized_copy(x.group, x.group + x.num_buckets, group);
-    }
-    memcpy(bitmap, x.bitmap, sizeof(bitmap));
-  }
-  ~sparsegroup() { free_group(); }
-
-  // Operator= is just like the copy constructor, I guess
-  // TODO(austern): Make this exception safe. Handle exceptions in value_type's
-  // copy constructor.
-  sparsegroup &operator=(const sparsegroup& x) {
-    if ( &x == this ) return *this;                    // x = x
-    if ( x.num_buckets == 0 ) {
-      free_group();
-    } else {
-      value_type* p = allocate_group(x.num_buckets);
-      uninitialized_copy(x.group, x.group + x.num_buckets, p);
-      free_group();
-      group = p;
-    }
-    memcpy(bitmap, x.bitmap, sizeof(bitmap));
-    num_buckets = x.num_buckets;
-    return *this;
-  }
-
-  // Many STL algorithms use swap instead of copy constructors
-  void swap(sparsegroup& x) {
-    STL_NAMESPACE::swap(group, x.group);
-    for ( int i = 0; i < sizeof(bitmap) / sizeof(*bitmap); ++i )
-      STL_NAMESPACE::swap(bitmap[i], x.bitmap[i]);  // swap not defined on arrays
-    STL_NAMESPACE::swap(num_buckets, x.num_buckets);
-  }
-
-  // It's always nice to be able to clear a table without deallocating it
-  void clear() {
-    free_group();
-    memset(bitmap, 0, sizeof(bitmap));
-    num_buckets = 0;
-  }
-
-  // Functions that tell you about size.  Alas, these aren't so useful
-  // because our table is always fixed size.
-  size_type size() const           { return GROUP_SIZE; }
-  size_type max_size() const       { return GROUP_SIZE; }
-  bool empty() const               { return false; }
-  // We also may want to know how many *used* buckets there are
-  size_type num_nonempty() const   { return num_buckets; }
-
-
-  // get()/set() are explicitly const/non-const.  You can use [] if
-  // you want something that can be either (potentially more expensive).
-  const_reference get(size_type i) const {
-    if ( bmtest(i) )           // bucket i is occupied
-      return group[pos_to_offset(bitmap, i)];
-    else
-      return default_value();  // return the default reference
-  }
-
-  // TODO(csilvers): make protected + friend
-  // This is used by sparse_hashtable to get an element from the table
-  // when we know it exists.
-  const_reference unsafe_get(size_type i) const {
-    assert(bmtest(i));
-    return group[pos_to_offset(bitmap, i)];
-  }
-
-  // TODO(csilvers): make protected + friend
-  reference mutating_get(size_type i) {    // fills bucket i before getting
-    if ( !bmtest(i) )
-      set(i, default_value());
-    return group[pos_to_offset(bitmap, i)];
-  }
-
-  // Syntactic sugar.  It's easy to return a const reference.  To
-  // return a non-const reference, we need to use the assigner adaptor.
-  const_reference operator[](size_type i) const {
-    return get(i);
-  }
-
-  element_adaptor operator[](size_type i) {
-    return element_adaptor(this, i);
-  }
-
- private:
-  // Create space at group[offset], assuming value_type has trivial
-  // copy constructor and destructor.  (Really, we want it to have
-  // "trivial move", because that's what realloc and memmove both do.
-  // But there's no way to capture that using type_traits, so we
-  // pretend that move(x, y) is equivalent to "x.~T(); new(x) T(y);"
-  // which is pretty much correct, if a bit conservative.)
-  void set_aux(size_type offset, true_type) {
-    group = (value_type *)
-            realloc_or_die(group, sizeof(*group) * (num_buckets+1));
-    // This is equivalent to memmove(), but faster on my Intel P4,
-    // at least with gcc4.1 -O2 / glibc 2.3.6.
-    for (size_type i = num_buckets; i > offset; --i)
-      memcpy(group + i, group + i-1, sizeof(*group));
-  }
-
-  // Create space at group[offset], without special assumptions about value_type
-  void set_aux(size_type offset, false_type) {
-    // This is valid because 0 <= offset <= num_buckets
-    value_type* p = allocate_group(num_buckets + 1);
-    uninitialized_copy(group, group + offset, p);
-    uninitialized_copy(group + offset, group + num_buckets, p + offset + 1);
-    free_group();
-    group = p;
-  }
-
- public:
-  // This returns a reference to the inserted item (which is a copy of val).
-  // TODO(austern): Make this exception safe: handle exceptions from
-  // value_type's copy constructor.
-  reference set(size_type i, const_reference val) {
-    size_type offset = pos_to_offset(bitmap, i);  // where we'll find (or insert)
-    if ( bmtest(i) ) {
-      // Delete the old value, which we're replacing with the new one
-      group[offset].~value_type();
-    } else {
-      typedef integral_constant<bool,
-          (has_trivial_copy<value_type>::value &&
-           has_trivial_destructor<value_type>::value)>
-          realloc_and_memmove_ok; // we pretend mv(x,y) == "x.~T(); new(x) T(y)"
-      set_aux(offset, realloc_and_memmove_ok());
-      ++num_buckets;
-      bmset(i);
-    }
-    // This does the actual inserting.  Since we made the array using
-    // malloc, we use "placement new" to just call the constructor.
-    new(&group[offset]) value_type(val);
-    return group[offset];
-  }
-
-  // We let you see if a bucket is non-empty without retrieving it
-  bool test(size_type i) const {
-    return bmtest(i) ? true : false;   // cast an int to a bool
-  }
-  bool test(iterator pos) const {
-    return bmtest(pos.pos) ? true : false;
-  }
-
- private:
-  // Shrink the array, assuming value_type has trivial copy
-  // constructor and destructor.  (Really, we want it to have "trivial
-  // move", because that's what realloc and memmove both do.  But
-  // there's no way to capture that using type_traits, so we pretend
-  // that move(x, y) is equivalent to ""x.~T(); new(x) T(y);"
-  // which is pretty much correct, if a bit conservative.)
-  void erase_aux(size_type offset, true_type) {
-    // This isn't technically necessary, since we know we have a
-    // trivial destructor, but is a cheap way to get a bit more safety.
-    group[offset].~value_type();
-    // This is equivalent to memmove(), but faster on my Intel P4,
-    // at lesat with gcc4.1 -O2 / glibc 2.3.6.
-    assert(num_buckets > 0);
-    for (size_type i = offset; i < num_buckets-1; ++i)
-      memcpy(group + i, group + i+1, sizeof(*group));  // hopefully inlined!
-    group = (value_type *)
-            realloc_or_die(group, sizeof(*group) * (num_buckets-1));
-  }
-
-  // Shrink the array, without any special assumptions about value_type.
-  void erase_aux(size_type offset, false_type) {
-    // This is valid because 0 <= offset < num_buckets. Note the inequality.
-    value_type* p = allocate_group(num_buckets - 1);
-    uninitialized_copy(group, group + offset, p);
-    uninitialized_copy(group + offset + 1, group + num_buckets, p + offset);
-    free_group();
-    group = p;
-  }
-
- public:
-  // This takes the specified elements out of the group.  This is
-  // "undefining", rather than "clearing".
-  // TODO(austern): Make this exception safe: handle exceptions from
-  // value_type's copy constructor.
-  void erase(size_type i) {
-    if ( bmtest(i) ) {                           // trivial to erase empty bucket
-      size_type offset = pos_to_offset(bitmap,i); // where we'll find (or insert)
-      if ( num_buckets == 1 ) {
-        free_group();
-        group = NULL;
-      } else {
-        typedef integral_constant<bool,
-            (has_trivial_copy<value_type>::value &&
-             has_trivial_destructor<value_type>::value)>
-            realloc_and_memmove_ok; // pretend mv(x,y) == "x.~T(); new(x) T(y)"
-        erase_aux(offset, realloc_and_memmove_ok());
-      }
-      --num_buckets;
-      bmclear(i);
-    }
-  }
-
-  void erase(iterator pos) {
-    erase(pos.pos);
-  }
-
-  void erase(iterator start_it, iterator end_it) {
-    // This could be more efficient, but to do so we'd need to make
-    // bmclear() clear a range of indices.  Doesn't seem worth it.
-    for ( ; start_it != end_it; ++start_it )
-      erase(start_it);
-  }
-
-
-  // I/O
-  // We support reading and writing groups to disk.  We don't store
-  // the actual array contents (which we don't know how to store),
-  // just the bitmap and size.  Meant to be used with table I/O.
-  // Returns true if all was ok
-  bool write_metadata(FILE *fp) const {
-    assert(sizeof(num_buckets) == 2);     // we explicitly set to u_int16_t
-    PUT_(num_buckets, 8);
-    PUT_(num_buckets, 0);
-    if ( !fwrite(bitmap, sizeof(bitmap), 1, fp) )  return false;
-    return true;
-  }
-
-  // Reading destroys the old group contents!  Returns true if all was ok
-  bool read_metadata(FILE *fp) {
-    clear();
-
-    int x;          // the GET_ macro requires an 'int x' to be defined
-    GET_(num_buckets, 8);
-    GET_(num_buckets, 0);
-
-    if ( !fread(bitmap, sizeof(bitmap), 1, fp) )  return false;
-
-    // We'll allocate the space, but we won't fill it: it will be
-    // left as uninitialized raw memory.
-    group = allocate_group(num_buckets);
-    return true;
-  }
-
-  // If your keys and values are simple enough, we can write them
-  // to disk for you.  "simple enough" means POD and no pointers.
-  // However, we don't try to normalize endianness
-  bool write_nopointer_data(FILE *fp) const {
-    for ( const_nonempty_iterator it = nonempty_begin();
-          it != nonempty_end(); ++it ) {
-      if ( !fwrite(&*it, sizeof(*it), 1, fp) )  return false;
-    }
-    return true;
-  }
-
-  // When reading, we have to override the potential const-ness of *it.
-  // Again, only meaningful if value_type is a POD.
-  bool read_nopointer_data(FILE *fp) {
-    for ( nonempty_iterator it = nonempty_begin();
-          it != nonempty_end(); ++it ) {
-      if ( !fread(reinterpret_cast<void*>(&(*it)), sizeof(*it), 1, fp) )
-        return false;
-    }
-    return true;
-  }
-
-  // Comparisons.  Note the comparisons are pretty arbitrary: we
-  // compare values of the first index that isn't equal (using default
-  // value for empty buckets).
-  bool operator==(const sparsegroup& x) const {
-    return ( num_buckets == x.num_buckets &&
-             memcmp(bitmap, x.bitmap, sizeof(bitmap)) == 0 &&
-             STL_NAMESPACE::equal(begin(), end(), x.begin()) ); // from algorithm
-  }
-  bool operator<(const sparsegroup& x) const {      // also from algorithm
-    return STL_NAMESPACE::lexicographical_compare(begin(), end(), 
-                                                  x.begin(), x.end());
-  }
-  bool operator!=(const sparsegroup& x) const { return !(*this == x); }
-  bool operator<=(const sparsegroup& x) const { return !(x < *this); }
-  bool operator>(const sparsegroup& x) const { return x < *this; }
-  bool operator>=(const sparsegroup& x) const { return !(*this < x); }
-
- private:
-  // The actual data
-  value_type *group;                            // (small) array of T's
-  unsigned char bitmap[(GROUP_SIZE-1)/8 + 1];   // fancy math is so we round up
-  size_type num_buckets;                        // limits GROUP_SIZE to 64K
-};
-
-// We need a global swap as well
-template <class T, u_int16_t GROUP_SIZE>
-inline void swap(sparsegroup<T,GROUP_SIZE> &x, sparsegroup<T,GROUP_SIZE> &y) {
-  x.swap(y);
-}
-
-// ---------------------------------------------------------------------------
-
-
-template <class T, u_int16_t GROUP_SIZE = DEFAULT_SPARSEGROUP_SIZE>
-class sparsetable {
- public:
-  // Basic types
-  typedef T value_type;                        // stolen from stl_vector.h
-  typedef value_type* pointer;
-  typedef const value_type* const_pointer;
-  typedef table_iterator<sparsetable<T, GROUP_SIZE> > iterator;
-  typedef const_table_iterator<sparsetable<T, GROUP_SIZE> > const_iterator;
-  typedef table_element_adaptor<sparsetable<T, GROUP_SIZE> > element_adaptor;
-  typedef value_type &reference;
-  typedef const value_type &const_reference;
-  typedef size_t size_type;
-  typedef ptrdiff_t difference_type;
-  typedef STL_NAMESPACE::reverse_iterator<const_iterator> const_reverse_iterator;
-  typedef STL_NAMESPACE::reverse_iterator<iterator> reverse_iterator;
-
-  // These are our special iterators, that go over non-empty buckets in a
-  // table.  These aren't const only because you can change non-empty bcks.
-  typedef two_d_iterator< vector< sparsegroup<value_type, GROUP_SIZE> > >
-     nonempty_iterator;
-  typedef const_two_d_iterator< vector< sparsegroup<value_type, GROUP_SIZE> > >
-     const_nonempty_iterator;
-  typedef STL_NAMESPACE::reverse_iterator<nonempty_iterator> reverse_nonempty_iterator;
-  typedef STL_NAMESPACE::reverse_iterator<const_nonempty_iterator> const_reverse_nonempty_iterator;
-  // Another special iterator: it frees memory as it iterates (used to resize)
-  typedef destructive_two_d_iterator< vector< sparsegroup<value_type, GROUP_SIZE> > >
-     destructive_iterator;
-
-  // Iterator functions
-  iterator begin()                      { return iterator(this, 0); }
-  const_iterator begin() const          { return const_iterator(this, 0); }
-  iterator end()                        { return iterator(this, size()); }
-  const_iterator end() const            { return const_iterator(this, size()); }
-  reverse_iterator rbegin()             { return reverse_iterator(end()); }
-  const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
-  reverse_iterator rend()               { return reverse_iterator(begin()); }
-  const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
-
-  // Versions for our special non-empty iterator
-  nonempty_iterator nonempty_begin()             {
-    return nonempty_iterator(groups.begin(), groups.end(), groups.begin());
-  }
-  const_nonempty_iterator nonempty_begin() const {
-    return const_nonempty_iterator(groups.begin(),groups.end(), groups.begin());
-  }
-  nonempty_iterator nonempty_end() {
-    return nonempty_iterator(groups.begin(), groups.end(), groups.end());
-  }
-  const_nonempty_iterator nonempty_end() const {
-    return const_nonempty_iterator(groups.begin(), groups.end(), groups.end());
-  }
-  reverse_nonempty_iterator nonempty_rbegin() {
-    return reverse_nonempty_iterator(nonempty_end());
-  }
-  const_reverse_nonempty_iterator nonempty_rbegin() const {
-    return const_reverse_nonempty_iterator(nonempty_end());
-  }
-  reverse_nonempty_iterator nonempty_rend() {
-    return reverse_nonempty_iterator(nonempty_begin());
-  }
-  const_reverse_nonempty_iterator nonempty_rend() const {
-    return const_reverse_nonempty_iterator(nonempty_begin());
-  }
-  destructive_iterator destructive_begin() {
-    return destructive_iterator(groups.begin(), groups.end(), groups.begin());
-  }
-  destructive_iterator destructive_end() {
-    return destructive_iterator(groups.begin(), groups.end(), groups.end());
-  }
-
- private:
-  typedef typename vector< sparsegroup<value_type, GROUP_SIZE> >::reference
-    GroupsReference;
-  typedef typename
-    vector< sparsegroup<value_type, GROUP_SIZE> >::const_reference
-    GroupsConstReference;
-  typedef typename vector< sparsegroup<value_type, GROUP_SIZE> >::iterator
-    GroupsIterator;
-  typedef typename vector< sparsegroup<value_type, GROUP_SIZE> >::const_iterator
-    GroupsConstIterator;
-
-  // How to deal with the proper group
-  static size_type num_groups(size_type num) {   // how many to hold num buckets
-    return num == 0 ? 0 : ((num-1) / GROUP_SIZE) + 1;
-  }
-
-  u_int16_t pos_in_group(size_type i) const {
-    return static_cast<u_int16_t>(i % GROUP_SIZE);
-  }
-  size_type group_num(size_type i) const {
-    return i / GROUP_SIZE;
-  }
-  GroupsReference which_group(size_type i) {
-    return groups[group_num(i)];
-  }
-  GroupsConstReference which_group(size_type i) const {
-    return groups[group_num(i)];
-  }
-
- public:
-  // Constructors -- default, normal (when you specify size), and copy
-  sparsetable(size_type sz = 0)
-    : groups(num_groups(sz)), table_size(sz), num_buckets(0) { }
-  // We'll can get away with using the default copy constructor,
-  // and default destructor, and hence the default operator=.  Huzzah!
-
-  // Many STL algorithms use swap instead of copy constructors
-  void swap(sparsetable& x) {
-    STL_NAMESPACE::swap(groups, x.groups);
-    STL_NAMESPACE::swap(table_size, x.table_size);
-    STL_NAMESPACE::swap(num_buckets, x.num_buckets);
-  }
-
-  // It's always nice to be able to clear a table without deallocating it
-  void clear() {
-    GroupsIterator group;
-    for ( group = groups.begin(); group != groups.end(); ++group ) {
-      group->clear();
-    }
-    num_buckets = 0;
-  }
-
-  // Functions that tell you about size.
-  // NOTE: empty() is non-intuitive!  It does not tell you the number
-  // of not-empty buckets (use num_nonempty() for that).  Instead
-  // it says whether you've allocated any buckets or not.
-  size_type size() const           { return table_size; }
-  size_type max_size() const       { return size_type(-1); }
-  bool empty() const               { return table_size == 0; }
-  // We also may want to know how many *used* buckets there are
-  size_type num_nonempty() const   { return num_buckets; }
-
-  // OK, we'll let you resize one of these puppies
-  void resize(size_type new_size) {
-    groups.resize(num_groups(new_size));
-    if ( new_size < table_size) {   // lower num_buckets, clear last group
-      if ( pos_in_group(new_size) > 0 )     // need to clear inside last group
-        groups.back().erase(groups.back().begin() + pos_in_group(new_size),
-                            groups.back().end());
-      num_buckets = 0;                       // refigure # of used buckets
-      GroupsConstIterator group;
-      for ( group = groups.begin(); group != groups.end(); ++group )
-        num_buckets += group->num_nonempty();
-    }
-    table_size = new_size;
-  }
-
-
-  // We let you see if a bucket is non-empty without retrieving it
-  bool test(size_type i) const {
-    return which_group(i).test(pos_in_group(i));
-  }
-  bool test(iterator pos) const {
-    return which_group(pos.pos).test(pos_in_group(pos.pos));
-  }
-  bool test(const_iterator pos) const {
-    return which_group(pos.pos).test(pos_in_group(pos.pos));
-  }
-
-  // We only return const_references because it's really hard to
-  // return something settable for empty buckets.  Use set() instead.
-  const_reference get(size_type i) const {
-    assert(i < table_size);
-    return which_group(i).get(pos_in_group(i));
-  }
-
-  // TODO(csilvers): make protected + friend
-  // This is used by sparse_hashtable to get an element from the table
-  // when we know it exists (because the caller has called test(i)).
-  const_reference unsafe_get(size_type i) const {
-    assert(i < table_size);
-    assert(test(i));
-    return which_group(i).unsafe_get(pos_in_group(i));
-  }
-
-  // TODO(csilvers): make protected + friend element_adaptor
-  reference mutating_get(size_type i) {    // fills bucket i before getting
-    assert(i < table_size);
-    size_type old_numbuckets = which_group(i).num_nonempty();
-    reference retval = which_group(i).mutating_get(pos_in_group(i));
-    num_buckets += which_group(i).num_nonempty() - old_numbuckets;
-    return retval;
-  }
-
-  // Syntactic sugar.  As in sparsegroup, the non-const version is harder
-  const_reference operator[](size_type i) const {
-    return get(i);
-  }
-
-  element_adaptor operator[](size_type i) {
-    return element_adaptor(this, i);
-  }
-
-  // Needed for hashtables, gets as a nonempty_iterator.  Crashes for empty bcks
-  const_nonempty_iterator get_iter(size_type i) const {
-    assert(test(i));    // how can a nonempty_iterator point to an empty bucket?
-    return const_nonempty_iterator(
-      groups.begin(), groups.end(),
-      groups.begin() + group_num(i),
-      (groups[group_num(i)].nonempty_begin() +
-       groups[group_num(i)].pos_to_offset(pos_in_group(i))));
-  }
-  // For nonempty we can return a non-const version
-  nonempty_iterator get_iter(size_type i) {
-    assert(test(i));    // how can a nonempty_iterator point to an empty bucket?
-    return nonempty_iterator(
-      groups.begin(), groups.end(),
-      groups.begin() + group_num(i),
-      (groups[group_num(i)].nonempty_begin() +
-       groups[group_num(i)].pos_to_offset(pos_in_group(i))));
-  }
-
-
-  // This returns a reference to the inserted item (which is a copy of val)
-  // The trick is to figure out whether we're replacing or inserting anew
-  reference set(size_type i, const_reference val) {
-    assert(i < table_size);
-    size_type old_numbuckets = which_group(i).num_nonempty();
-    reference retval = which_group(i).set(pos_in_group(i), val);
-    num_buckets += which_group(i).num_nonempty() - old_numbuckets;
-    return retval;
-  }
-
-  // This takes the specified elements out of the table.  This is
-  // "undefining", rather than "clearing".
-  void erase(size_type i) {
-    assert(i < table_size);
-    size_type old_numbuckets = which_group(i).num_nonempty();
-    which_group(i).erase(pos_in_group(i));
-    num_buckets += which_group(i).num_nonempty() - old_numbuckets;
-  }
-
-  void erase(iterator pos) {
-    erase(pos.pos);
-  }
-
-  void erase(iterator start_it, iterator end_it) {
-    // This could be more efficient, but then we'd need to figure
-    // out if we spanned groups or not.  Doesn't seem worth it.
-    for ( ; start_it != end_it; ++start_it )
-      erase(start_it);
-  }
-
-
-  // We support reading and writing tables to disk.  We don't store
-  // the actual array contents (which we don't know how to store),
-  // just the groups and sizes.  Returns true if all went ok.
-
- private:
-  // Every time the disk format changes, this should probably change too
-  static const unsigned long MAGIC_NUMBER = 0x24687531;
-
-  // Old versions of this code write all data in 32 bits.  We need to
-  // support these files as well as having support for 64-bit systems.
-  // So we use the following encoding scheme: for values < 2^32-1, we
-  // store in 4 bytes in big-endian order.  For values > 2^32, we
-  // store 0xFFFFFFF followed by 8 bytes in big-endian order.  This
-  // causes us to mis-read old-version code that stores exactly
-  // 0xFFFFFFF, but I don't think that is likely to have happened for
-  // these particular values.
-  static bool write_32_or_64(FILE* fp, size_type value) {
-    if ( value < 0xFFFFFFFFULL ) {        // fits in 4 bytes
-      PUT_(value, 24);
-      PUT_(value, 16);
-      PUT_(value, 8);
-      PUT_(value, 0);
-    } else if ( value == 0xFFFFFFFFUL ) {   // special case in 32bit systems
-      PUT_(0xFF, 0); PUT_(0xFF, 0); PUT_(0xFF, 0); PUT_(0xFF, 0);  // marker
-      PUT_(0, 0); PUT_(0, 0); PUT_(0, 0); PUT_(0, 0);
-      PUT_(0xFF, 0); PUT_(0xFF, 0); PUT_(0xFF, 0); PUT_(0xFF, 0);
-    } else {
-      PUT_(0xFF, 0); PUT_(0xFF, 0); PUT_(0xFF, 0); PUT_(0xFF, 0);  // marker
-      PUT_(value, 56);
-      PUT_(value, 48);
-      PUT_(value, 40);
-      PUT_(value, 32);
-      PUT_(value, 24);
-      PUT_(value, 16);
-      PUT_(value, 8);
-      PUT_(value, 0);
-    }
-    return true;
-  }
-
-  static bool read_32_or_64(FILE* fp, size_type *value) {  // reads into value
-    size_type first4 = 0;
-    int x;
-    GET_(first4, 24);
-    GET_(first4, 16);
-    GET_(first4, 8);
-    GET_(first4, 0);
-    if ( first4 < 0xFFFFFFFFULL ) {
-      *value = first4;
-    } else {
-      GET_(*value, 56);
-      GET_(*value, 48);
-      GET_(*value, 40);
-      GET_(*value, 32);
-      GET_(*value, 24);
-      GET_(*value, 16);
-      GET_(*value, 8);
-      GET_(*value, 0);
-    }
-    return true;
-  }
-
- public:
-  bool write_metadata(FILE *fp) const {
-    if ( !write_32_or_64(fp, MAGIC_NUMBER) )  return false;
-    if ( !write_32_or_64(fp, table_size) )  return false;
-    if ( !write_32_or_64(fp, num_buckets) )  return false;
-
-    GroupsConstIterator group;
-    for ( group = groups.begin(); group != groups.end(); ++group )
-      if ( group->write_metadata(fp) == false )  return false;
-    return true;
-  }
-
-  // Reading destroys the old table contents!  Returns true if read ok.
-  bool read_metadata(FILE *fp) {
-    size_type magic_read = 0;
-    if ( !read_32_or_64(fp, &magic_read) )  return false;
-    if ( magic_read != MAGIC_NUMBER ) {
-      clear();                        // just to be consistent
-      return false;
-    }
-
-    if ( !read_32_or_64(fp, &table_size) )  return false;
-    if ( !read_32_or_64(fp, &num_buckets) )  return false;
-
-    resize(table_size);                            // so the vector's sized ok
-    GroupsIterator group;
-    for ( group = groups.begin(); group != groups.end(); ++group )
-      if ( group->read_metadata(fp) == false )  return false;
-    return true;
-  }
-
-  // This code is identical to that for SparseGroup
-  // If your keys and values are simple enough, we can write them
-  // to disk for you.  "simple enough" means no pointers.
-  // However, we don't try to normalize endianness
-  bool write_nopointer_data(FILE *fp) const {
-    for ( const_nonempty_iterator it = nonempty_begin();
-          it != nonempty_end(); ++it ) {
-      if ( !fwrite(&*it, sizeof(*it), 1, fp) )  return false;
-    }
-    return true;
-  }
-
-  // When reading, we have to override the potential const-ness of *it
-  bool read_nopointer_data(FILE *fp) {
-    for ( nonempty_iterator it = nonempty_begin();
-          it != nonempty_end(); ++it ) {
-      if ( !fread(reinterpret_cast<void*>(&(*it)), sizeof(*it), 1, fp) )
-        return false;
-    }
-    return true;
-  }
-
-  // Comparisons.  Note the comparisons are pretty arbitrary: we
-  // compare values of the first index that isn't equal (using default
-  // value for empty buckets).
-  bool operator==(const sparsetable& x) const {
-    return ( table_size == x.table_size &&
-             num_buckets == x.num_buckets &&
-             groups == x.groups );
-  }
-  bool operator<(const sparsetable& x) const {      // also from algobase.h
-    return STL_NAMESPACE::lexicographical_compare(begin(), end(), 
-                                                  x.begin(), x.end());
-  }
-  bool operator!=(const sparsetable& x) const { return !(*this == x); }
-  bool operator<=(const sparsetable& x) const { return !(x < *this); }
-  bool operator>(const sparsetable& x) const { return x < *this; }
-  bool operator>=(const sparsetable& x) const { return !(*this < x); }
-
-
- private:
-  // The actual data
-  vector< sparsegroup<value_type, GROUP_SIZE> > groups;  // our list of groups
-  size_type table_size;                         // how many buckets they want
-  size_type num_buckets;                        // number of non-empty buckets
-};
-
-// We need a global swap as well
-template <class T, u_int16_t GROUP_SIZE>
-inline void swap(sparsetable<T,GROUP_SIZE> &x, sparsetable<T,GROUP_SIZE> &y) {
-  x.swap(y);
-}
-
-#undef GET_
-#undef PUT_
-
-_END_GOOGLE_NAMESPACE_
-
-#endif
diff --git a/ext/google/type_traits.h b/ext/google/type_traits.h
deleted file mode 100644
index 5f88133..0000000
--- a/ext/google/type_traits.h
+++ /dev/null
@@ -1,250 +0,0 @@
-// Copyright (c) 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// ----
-// Author: Matt Austern
-//
-// Define a small subset of tr1 type traits. The traits we define are:
-//   is_integral
-//   is_floating_point
-//   is_pointer
-//   is_reference
-//   is_pod
-//   has_trivial_constructor
-//   has_trivial_copy
-//   has_trivial_assign
-//   has_trivial_destructor
-//   remove_const
-//   remove_volatile
-//   remove_cv
-//   remove_reference
-//   remove_pointer
-//   is_convertible
-// We can add more type traits as required.
-
-#ifndef BASE_TYPE_TRAITS_H_
-#define BASE_TYPE_TRAITS_H_
-
-#include <google/sparsehash/sparseconfig.h>
-#include <utility>                  // For pair
-
-_START_GOOGLE_NAMESPACE_
-
-// integral_constant, defined in tr1, is a wrapper for an integer
-// value. We don't really need this generality; we could get away
-// with hardcoding the integer type to bool. We use the fully
-// general integer_constant for compatibility with tr1.
-
-template<class T, T v>
-struct integral_constant {
-  static const T value = v;
-  typedef T value_type;
-  typedef integral_constant<T, v> type;
-};
-
-template <class T, T v> const T integral_constant<T, v>::value;
-
-// Abbreviations: true_type and false_type are structs that represent
-// boolean true and false values.
-typedef integral_constant<bool, true>  true_type;
-typedef integral_constant<bool, false> false_type;
-
-// Types small_ and big_ are guaranteed such that sizeof(small_) <
-// sizeof(big_)
-typedef char small_;
-
-struct big_ {
-  char dummy[2];
-};
-
-// is_integral is false except for the built-in integer types.
-template <class T> struct is_integral : false_type { };
-template<> struct is_integral<bool> : true_type { };
-template<> struct is_integral<char> : true_type { };
-template<> struct is_integral<unsigned char> : true_type { };
-template<> struct is_integral<signed char> : true_type { };
-#if defined(_MSC_VER)
-// wchar_t is not by default a distinct type from unsigned short in
-// Microsoft C.
-// See http://msdn2.microsoft.com/en-us/library/dh8che7s(VS.80).aspx
-template<> struct is_integral<__wchar_t> : true_type { };
-#else
-template<> struct is_integral<wchar_t> : true_type { };
-#endif
-template<> struct is_integral<short> : true_type { };
-template<> struct is_integral<unsigned short> : true_type { };
-template<> struct is_integral<int> : true_type { };
-template<> struct is_integral<unsigned int> : true_type { };
-template<> struct is_integral<long> : true_type { };
-template<> struct is_integral<unsigned long> : true_type { };
-#ifdef HAVE_LONG_LONG
-template<> struct is_integral<long long> : true_type { };
-template<> struct is_integral<unsigned long long> : true_type { };
-#endif
-
-
-// is_floating_point is false except for the built-in floating-point types.
-template <class T> struct is_floating_point : false_type { };
-template<> struct is_floating_point<float> : true_type { };
-template<> struct is_floating_point<double> : true_type { };
-template<> struct is_floating_point<long double> : true_type { };
-
-
-// is_pointer is false except for pointer types.
-template <class T> struct is_pointer : false_type { };
-template <class T> struct is_pointer<T*> : true_type { };
-
-
-// is_reference is false except for reference types.
-template<typename T> struct is_reference : false_type {};
-template<typename T> struct is_reference<T&> : true_type {};
-
-
-// We can't get is_pod right without compiler help, so fail conservatively.
-// We will assume it's false except for arithmetic types and pointers,
-// and const versions thereof. Note that std::pair is not a POD.
-template <class T> struct is_pod
- : integral_constant<bool, (is_integral<T>::value ||
-                            is_floating_point<T>::value ||
-                            is_pointer<T>::value)> { };
-template <class T> struct is_pod<const T> : is_pod<T> { };
-
-
-// We can't get has_trivial_constructor right without compiler help, so
-// fail conservatively. We will assume it's false except for: (1) types
-// for which is_pod is true. (2) std::pair of types with trivial
-// constructors. (3) array of a type with a trivial constructor.
-// (4) const versions thereof.
-template <class T> struct has_trivial_constructor : is_pod<T> { };
-template <class T, class U> struct has_trivial_constructor<std::pair<T, U> >
-  : integral_constant<bool,
-                      (has_trivial_constructor<T>::value &&
-                       has_trivial_constructor<U>::value)> { };
-template <class A, int N> struct has_trivial_constructor<A[N]>
-  : has_trivial_constructor<A> { };
-template <class T> struct has_trivial_constructor<const T>
-  : has_trivial_constructor<T> { };
-
-// We can't get has_trivial_copy right without compiler help, so fail
-// conservatively. We will assume it's false except for: (1) types
-// for which is_pod is true. (2) std::pair of types with trivial copy
-// constructors. (3) array of a type with a trivial copy constructor.
-// (4) const versions thereof.
-template <class T> struct has_trivial_copy : is_pod<T> { };
-template <class T, class U> struct has_trivial_copy<std::pair<T, U> >
-  : integral_constant<bool,
-                      (has_trivial_copy<T>::value &&
-                       has_trivial_copy<U>::value)> { };
-template <class A, int N> struct has_trivial_copy<A[N]>
-  : has_trivial_copy<A> { };
-template <class T> struct has_trivial_copy<const T> : has_trivial_copy<T> { };
-
-// We can't get has_trivial_assign right without compiler help, so fail
-// conservatively. We will assume it's false except for: (1) types
-// for which is_pod is true. (2) std::pair of types with trivial copy
-// constructors. (3) array of a type with a trivial assign constructor.
-template <class T> struct has_trivial_assign : is_pod<T> { };
-template <class T, class U> struct has_trivial_assign<std::pair<T, U> >
-  : integral_constant<bool,
-                      (has_trivial_assign<T>::value &&
-                       has_trivial_assign<U>::value)> { };
-template <class A, int N> struct has_trivial_assign<A[N]>
-  : has_trivial_assign<A> { };
-
-// We can't get has_trivial_destructor right without compiler help, so
-// fail conservatively. We will assume it's false except for: (1) types
-// for which is_pod is true. (2) std::pair of types with trivial
-// destructors. (3) array of a type with a trivial destructor.
-// (4) const versions thereof.
-template <class T> struct has_trivial_destructor : is_pod<T> { };
-template <class T, class U> struct has_trivial_destructor<std::pair<T, U> >
-  : integral_constant<bool,
-                      (has_trivial_destructor<T>::value &&
-                       has_trivial_destructor<U>::value)> { };
-template <class A, int N> struct has_trivial_destructor<A[N]>
-  : has_trivial_destructor<A> { };
-template <class T> struct has_trivial_destructor<const T>
-  : has_trivial_destructor<T> { };
-
-// Specified by TR1 [4.7.1]
-template<typename T> struct remove_const { typedef T type; };
-template<typename T> struct remove_const<T const> { typedef T type; };
-template<typename T> struct remove_volatile { typedef T type; };
-template<typename T> struct remove_volatile<T volatile> { typedef T type; };
-template<typename T> struct remove_cv {
-  typedef typename remove_const<typename remove_volatile<T>::type>::type type;
-};
-
-
-// Specified by TR1 [4.7.2]
-template<typename T> struct remove_reference { typedef T type; };
-template<typename T> struct remove_reference<T&> { typedef T type; };
-
-// Specified by TR1 [4.7.4] Pointer modifications.
-template<typename T> struct remove_pointer { typedef T type; };
-template<typename T> struct remove_pointer<T*> { typedef T type; };
-template<typename T> struct remove_pointer<T* const> { typedef T type; };
-template<typename T> struct remove_pointer<T* volatile> { typedef T type; };
-template<typename T> struct remove_pointer<T* const volatile> {
-  typedef T type; };
-
-// Specified by TR1 [4.6] Relationships between types
-#ifndef _MSC_VER
-namespace internal {
-
-// This class is an implementation detail for is_convertible, and you
-// don't need to know how it works to use is_convertible. For those
-// who care: we declare two different functions, one whose argument is
-// of type To and one with a variadic argument list. We give them
-// return types of different size, so we can use sizeof to trick the
-// compiler into telling us which function it would have chosen if we
-// had called it with an argument of type From.  See Alexandrescu's
-// _Modern C++ Design_ for more details on this sort of trick.
-
-template <typename From, typename To>
-struct ConvertHelper {
-  static small_ Test(To);
-  static big_ Test(...);
-  static From Create();
-};
-}  // namespace internal
-
-// Inherits from true_type if From is convertible to To, false_type otherwise.
-template <typename From, typename To>
-struct is_convertible
-    : integral_constant<bool,
-                        sizeof(internal::ConvertHelper<From, To>::Test(
-                                  internal::ConvertHelper<From, To>::Create()))
-                        == sizeof(small_)> {
-};
-#endif
-
-_END_GOOGLE_NAMESPACE_
-
-#endif  // BASE_TYPE_TRAITS_H_
diff --git a/ext/libeio/Changes b/ext/libeio/Changes
new file mode 100644
index 0000000..711baf5
--- /dev/null
+++ b/ext/libeio/Changes
@@ -0,0 +1,76 @@
+Revision history for libeio
+
+TODO: maybe add mincore support? available on at least darwin, solaris, linux, freebsd
+TODO: openbsd requires stdint.h for intptr_t - why posix?
+
+TODO: make mtouch/readdir maybe others cancellable in-request
+TODO: fadvise request
+TODO: fdopendir/utimensat
+TODO: maybe work around 3.996gb barrier in pread/pwrite as well, maybe readahead etc.?
+1.0
+	- fix a deadlock where a wakeup signal could be missed when
+          a timeout occured at the same time.
+	- use nonstandard but maybe-working-on-bsd fork technique.
+        - use fewer time() syscalls when waiting for new requests.
+        - fix a path-memory-leak in readdir when using the wrappers
+          (reported by Thomas L. Shinnick).
+	- support a max_idle value of 0.
+	- support setting of idle timeout value (eio_set_idle_timeout).
+        - readdir: correctly handle malloc failures.
+        - readdir: new flags argument, can return inode
+          and possibly filetype, can sort in various ways.
+        - readdir: stop immediately when cancelled, do
+          not continue reading the directory.
+        - fix return value of eio_sendfile_sync.
+        - include sys/mman.h for msync.
+	- added EIO_STACKSIZE.
+	- added msync, mtouch support (untested).
+        - added sync_file_range (untested).
+        - fixed custom support.
+        - use a more robust feed-add detection method.
+	- "outbundled" from IO::AIO.
+        - eio_set_max_polltime did not properly convert time to ticks.
+        - tentatively support darwin in sendfile.
+        - fix freebsd/darwin sendfile.
+        - also use sendfile emulation for ENOTSUP and EOPNOTSUPP
+          error codes.
+        - add OS-independent EIO_MT_* and EIO_MS_* flag enums.
+        - add eio_statvfs/eio_fstatvfs.
+        - add eio_mlock/eio_mlockall and OS-independent MCL_* flag enums.
+        - no longer set errno to 0 before making syscalls, this only lures
+          people into the trap of believing errno shows success or failure.
+        - "fix" demo.c so that it works as non-root.
+        - suppoert utimes seperately from futimes, as some systems have
+          utimes but not futimes.
+        - use _POSIX_MEMLOCK_RANGE for mlock.
+        - do not (errornously) overwrite CFLAGS in configure.ac.
+        - mknod used int3 for dev_t (§2 bit), not offs (64 bit).
+        - fix memory corruption in eio_readdirx for the flags
+          combination EIO_READDIR_STAT_ORDER | EIO_READDIR_DIRS_FIRST.
+        - port to openbsd (another blatantly broken non-UNIX/POSIX platform).
+        - fix eio_custom prototype.
+        - work around a Linux (and likely FreeBSD and other kernels) bug
+          where sendfile would not transfer all the requested bytes on
+          large transfers, using a heuristic.
+        - use libecb, and apply lots of minor space optimisations.
+        - disable sendfile on darwin, broken as everything else.
+        - add realpath request and implementation.
+	- cancelled requests will still invoke their request callbacks.
+        - add fallocate.
+        - do not acquire any locks when forking.
+        - incorporated some mingw32 changes by traviscline.
+        - added syncfs support, using direct syscall.
+        - set thread name on linux (ps -L/Hcx, top, gdb).
+        - remove useless use of volatile variables.
+        - fix memory leak when reaping threads.
+        - use utime now uses nanosecond resolution on posix 2008 systems.
+        - allow taking advantage of posix 2008 xxxat functions and fdopendir
+          by implementing a working directory abstraction.
+        - make readahead emulation behave more like actual readahead by never failing.
+        - added EIO_LSEEK (untested).
+        - added EIO_FALLOC_FL_PUNCH_HOLE.
+        - wtf. etp_proc returned 0, and no compiler ever complained.
+        - remove pread/pwrite emulation, as the only system that lacked them
+          (cygwin) provides them for a while now.
+        - provide pread/pwrite implementations for win32.
+
diff --git a/ext/libeio/LICENSE b/ext/libeio/LICENSE
new file mode 100644
index 0000000..1ed1324
--- /dev/null
+++ b/ext/libeio/LICENSE
@@ -0,0 +1,36 @@
+All files in libeio are Copyright (C)2007,2008 Marc Alexander Lehmann.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Alternatively, the contents of this package may be used under the terms
+of the GNU General Public License ("GPL") version 2 or any later version,
+in which case the provisions of the GPL are applicable instead of the
+above. If you wish to allow the use of your version of this package only
+under the terms of the GPL and not to allow others to use your version of
+this file under the BSD license, indicate your decision by deleting the
+provisions above and replace them with the notice and other provisions
+required by the GPL in this and the other files of this package. If you do
+not delete the provisions above, a recipient may use your version of this
+file under either the BSD or the GPL.
diff --git a/ext/libeio/Makefile.am b/ext/libeio/Makefile.am
new file mode 100644
index 0000000..e9866c0
--- /dev/null
+++ b/ext/libeio/Makefile.am
@@ -0,0 +1,15 @@
+AUTOMAKE_OPTIONS = foreign no-dependencies
+
+VERSION_INFO = 1:0
+
+EXTRA_DIST = LICENSE Changes autogen.sh
+
+#man_MANS = ev.3
+
+include_HEADERS = eio.h
+
+lib_LTLIBRARIES = libeio.la
+
+libeio_la_SOURCES = eio.c ecb.h xthread.h config.h
+libeio_la_LDFLAGS = -version-info $(VERSION_INFO)
+
diff --git a/ext/libeio/Makefile.in b/ext/libeio/Makefile.in
new file mode 100644
index 0000000..8f05cff
--- /dev/null
+++ b/ext/libeio/Makefile.in
@@ -0,0 +1,694 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+DIST_COMMON = $(am__configure_deps) $(include_HEADERS) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/config.h.in $(top_srcdir)/configure config.guess \
+	config.sub install-sh ltmain.sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/libeio.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libeio_la_LIBADD =
+am_libeio_la_OBJECTS = eio.lo
+libeio_la_OBJECTS = $(am_libeio_la_OBJECTS)
+libeio_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(libeio_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@
+depcomp =
+am__depfiles_maybe =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libeio_la_SOURCES)
+DIST_SOURCES = $(libeio_la_SOURCES)
+HEADERS = $(include_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = foreign no-dependencies
+VERSION_INFO = 1:0
+EXTRA_DIST = LICENSE Changes autogen.sh
+
+#man_MANS = ev.3
+include_HEADERS = eio.h
+lib_LTLIBRARIES = libeio.la
+libeio_la_SOURCES = eio.c ecb.h xthread.h config.h
+libeio_la_LDFLAGS = -version-info $(VERSION_INFO)
+all: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+am--refresh:
+	@:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f stamp-h1; \
+	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+	else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f config.h stamp-h1
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+	}
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libeio.la: $(libeio_la_OBJECTS) $(libeio_la_DEPENDENCIES) 
+	$(libeio_la_LINK) -rpath $(libdir) $(libeio_la_OBJECTS) $(libeio_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+.c.o:
+	$(COMPILE) -c $<
+
+.c.obj:
+	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool config.lt
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
+	done
+
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(includedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-lzma: distdir
+	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+	$(am__remove_distdir)
+
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lzma*) \
+	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@$(am__cd) '$(distuninstallcheck_dir)' \
+	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-hdr distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES
+
+.MAKE: all install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+	clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \
+	dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \
+	dist-xz dist-zip distcheck distclean distclean-compile \
+	distclean-generic distclean-hdr distclean-libtool \
+	distclean-tags distcleancheck distdir distuninstallcheck dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-includeHEADERS install-info install-info-am \
+	install-libLTLIBRARIES install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-includeHEADERS \
+	uninstall-libLTLIBRARIES
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/ext/libeio/aclocal.m4 b/ext/libeio/aclocal.m4
new file mode 100644
index 0000000..0625c69
--- /dev/null
+++ b/ext/libeio/aclocal.m4
@@ -0,0 +1,9418 @@
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+#                 Inc.
+#   Written by Gordon Matzigkeit, 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.
+
+m4_define([_LT_COPYING], [dnl
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+#                 Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool 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.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 57 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+       [m4_default([$3],
+		   [m4_fatal([Libtool version $1 or higher is required],
+		             63)])],
+       [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+  *\ * | *\	*)
+    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+m4_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 "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+
+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
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    _LT_PATH_MAGIC
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PREPARE_SED_QUOTE_VARS
+# --------------------------
+# Define a few sed substitution that help us do robust quoting.
+m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+[# Backslashify metacharacters that are still active within
+# double-quoted strings.
+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 delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+])
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME.  Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+	[m4_ifval([$1], [$1], [$2])])
+    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+    m4_ifval([$4],
+	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+    lt_dict_add_subkey([lt_decl_dict], [$2],
+	[tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+  [0], [m4_fatal([$0: too few arguments: $#])],
+  [1], [m4_fatal([$0: too few arguments: $#: $1])],
+  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+     m4_if([$2], [],
+	   m4_quote(lt_decl_varnames),
+	m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'.  VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly.  In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+#    # Some comment about what VAR is for.
+#    visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+					   [description])))[]dnl
+m4_pushdef([_libtool_name],
+    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+    [0], [_libtool_name=[$]$1],
+    [1], [_libtool_name=$lt_[]$1],
+    [2], [_libtool_name=$lt_[]$1],
+    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'.  Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+	dnl If the libtool generation code has been placed in $CONFIG_LT,
+	dnl instead of duplicating it all over again into config.status,
+	dnl then we will have config.status run $CONFIG_LT later, so it
+	dnl needs to know what name is stored there:
+        [AC_CONFIG_COMMANDS([libtool],
+            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+    dnl If the libtool generation code is destined for config.status,
+    dnl expand the accumulated commands and init code now:
+    [AC_CONFIG_COMMANDS([libtool],
+        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# 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
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$[]1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+# ------------------------------------
+# Generate a child script FILE with all initialization necessary to
+# reuse the environment learned by the parent script, and make the
+# file executable.  If COMMENT is supplied, it is inserted after the
+# `#!' sequence but before initialization text begins.  After this
+# macro, additional text can be appended to FILE to form the body of
+# the child script.  The macro ends with non-zero status if the
+# file could not be fully written (such as if the disk is full).
+m4_ifdef([AS_INIT_GENERATED],
+[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+[m4_defun([_LT_GENERATED_FILE_INIT],
+[m4_require([AS_PREPARE])]dnl
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[lt_write_fail=0
+cat >$1 <<_ASEOF || lt_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$1 <<\_ASEOF || lt_write_fail=1
+AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+_ASEOF
+test $lt_write_fail = 0 && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+  echo
+  AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+  -h, --help      print this help, then exit
+  -V, --version   print version number, then exit
+  -q, --quiet     do not print progress messages
+  -d, --debug     don't remove temporary files
+
+Report bugs to <bug-libtool at gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+  case $[1] in
+    --version | --v* | -V )
+      echo "$lt_cl_version"; exit 0 ;;
+    --help | --h* | -h )
+      echo "$lt_cl_help"; exit 0 ;;
+    --debug | --d* | -d )
+      debug=: ;;
+    --quiet | --q* | --silent | --s* | -q )
+      lt_cl_silent=: ;;
+
+    -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+    *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+  esac
+  shift
+done
+
+if $lt_cl_silent; then
+  exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure.  Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+lt_cl_success=:
+test "$silent" = yes &&
+  lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, 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 TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+  m4_if(_LT_TAG, [C], [
+    # 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
+
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
+
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+  case $host_os in
+  aix3*)
+    cat <<\_LT_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
+_LT_EOF
+    ;;
+  esac
+
+  _LT_PROG_LTMAIN
+
+  # 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)
+
+  _LT_PROG_REPLACE_SHELLFNS
+
+   mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+  [C],			[_LT_LANG(C)],
+  [C++],		[_LT_LANG(CXX)],
+  [Java],		[_LT_LANG(GCJ)],
+  [Fortran 77],		[_LT_LANG(F77)],
+  [Fortran],		[_LT_LANG(FC)],
+  [Windows Resource],	[_LT_LANG(RC)],
+  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+    [_LT_LANG($1)],
+    [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+  [LT_SUPPORTED_TAG([$1])dnl
+  m4_append([_LT_TAGS], [$1 ])dnl
+  m4_define([_LT_LANG_]$1[_enabled], [])dnl
+  _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+  [LT_LANG(CXX)],
+  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+  [LT_LANG(F77)],
+  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+  [LT_LANG(FC)],
+  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+  [LT_LANG(GCJ)],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+    [LT_LANG(GCJ)],
+    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+      [LT_LANG(GCJ)],
+      [m4_ifdef([AC_PROG_GCJ],
+	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([A][M_PROG_GCJ],
+	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([LT_PROG_GCJ],
+	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+  [LT_LANG(RC)],
+  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])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_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_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.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_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
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+  case $host_os in
+    rhapsody* | darwin*)
+    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+    AC_CHECK_TOOL([LIPO], [lipo], [:])
+    AC_CHECK_TOOL([OTOOL], [otool], [:])
+    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+    _LT_DECL([], [DSYMUTIL], [1],
+      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+    _LT_DECL([], [NMEDIT], [1],
+      [Tool to change global to local symbols on Mac OS X])
+    _LT_DECL([], [LIPO], [1],
+      [Tool to manipulate fat objects and archives on Mac OS X])
+    _LT_DECL([], [OTOOL], [1],
+      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+    _LT_DECL([], [OTOOL64], [1],
+      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+    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.
+	rm -rf libconftest.dylib*
+	echo "int foo(void){return 1;}" > conftest.c
+	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	  lt_cv_apple_cc_single_mod=yes
+	else
+	  cat conftest.err >&AS_MESSAGE_LOG_FD
+	fi
+	rm -rf libconftest.dylib*
+	rm -f conftest.*
+      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"
+    ])
+    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+      [lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+	lt_cv_ld_force_load=yes
+      else
+	cat conftest.err >&AS_MESSAGE_LOG_FD
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
+    ])
+    case $host_os in
+    rhapsody* | darwin1.[[012]])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*) # darwin 5.x on
+      # 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" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_automatic, $1)=yes
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+  else
+    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  fi
+  _LT_TAGVAR(link_all_deplibs, $1)=yes
+  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=func_echo_all
+    _LT_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_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    _LT_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_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}"
+    m4_if([$1], [CXX],
+[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      _LT_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_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
+  _LT_TAGVAR(ld_shlibs, $1)=no
+  fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
+# 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.
+# Store the results from the different compilers for each TAGNAME.
+# Allow to override them for all tags through lt_cv_aix_libpath.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+  lt_aix_libpath_sed='[
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }]'
+  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`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 "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi],[])
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
+  fi
+  ])
+  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
+
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Find how we can fake an echo command that does not interpret backslash.
+# In particular, with Autoconf 2.60 or later we add some code to the start
+# of the generated configure script which will find a shell with a builtin
+# printf (which we can use as an echo command).
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+AC_MSG_CHECKING([how to print strings])
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='printf %s\n'
+else
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*" 
+}
+
+case "$ECHO" in
+  printf*) AC_MSG_RESULT([printf]) ;;
+  print*) AC_MSG_RESULT([print -r]) ;;
+  *) AC_MSG_RESULT([cat]) ;;
+esac
+
+m4_ifdef([_AS_DETECT_SUGGESTED],
+[_AS_DETECT_SUGGESTED([
+  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test "X`printf %s $ECHO`" = "X$ECHO" \
+      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
+
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[  --with-sysroot[=DIR] Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted.  We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+   if test "$GCC" = yes; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   AC_MSG_RESULT([${with_sysroot}])
+   AC_MSG_ERROR([The sysroot must be an absolute path.])
+   ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and in which our libraries should be installed.])])
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+  [AS_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 '$LINENO' "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*|s390*-*tpf*|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*|s390*-*tpf*)
+	    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_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[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*
+  ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+  [lt_cv_ar_at_file=no
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+     [echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([lt_ar_try])
+      if test "$ac_status" -eq 0; then
+	# Ensure the archiver fails upon bogus file names.
+	rm -f conftest.$ac_objext libconftest.a
+	AC_TRY_EVAL([lt_ar_try])
+	if test "$ac_status" -ne 0; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+     ])
+  ])
+
+if test "x$lt_cv_ar_at_file" = xno; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+  [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[_LT_PROG_AR
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+    [Commands used to install an old-style archive])
+
+# 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
+
+case $host_os in
+  darwin*)
+    lock_old_archive_extraction=yes ;;
+  *)
+    lock_old_archive_extraction=no ;;
+esac
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+    [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+    [Whether to use a lock for old archive extraction])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   m4_if([$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:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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
+    m4_if([$5], , :, [$5])
+else
+    m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                  [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_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 "$_lt_linker_boilerplate" | $SED '/^$/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
+    m4_if([$4], , :, [$4])
+else
+    m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# 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* | cegcc*)
+    # 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;
+    ;;
+
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    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
+      # Make teststring a little bigger before we do anything with it.
+      # a 1K string should be a reasonable start.
+      for i in 1 2 3 4 5 6 7 8 ; do
+        teststring=$teststring$teststring
+      done
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      # If test is not a shell built-in, we'll probably end up computing a
+      # maximum length that is only half of the actual maximum length, but
+      # we can't tell.
+      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      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
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+    [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_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 <<_LT_EOF
+[#line $LINENO "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
+
+/* When -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 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;
+          else puts (dlerror ());
+	}
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}]
+_LT_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_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_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* | cegcc*)
+    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_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_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
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+	 [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+	 [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+	 [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_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:$LINENO: $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:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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_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 ..
+   $RM -r conftest
+   $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+	[Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_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
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_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
+_LT_DECL([], [objdir], [0],
+         [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+  [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$_LT_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_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; 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
+_LT_TAGDECL([], [hardcode_action], [0],
+    [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+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
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+	[], [
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  case $host_os in
+    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
+    *) lt_sed_strip_eq="s,=/,/,g" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+  case $lt_search_path_spec in
+  *\;*)
+    # 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 's/;/ /g'`
+    ;;
+  *)
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+    ;;
+  esac
+  # 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; }
+}'`
+  # AWK program above erroneously prepends '/' to C:/dos/paths
+  # for these hosts.
+  case $host_os in
+    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
+  esac
+  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+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"
+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*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    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=`func_echo_all "$lib" | $SED '\''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'
+    ;;
+  esac
+  ;;
+
+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* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
+    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~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    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}'
+m4_if([$1], [],[
+      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    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
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+    library_names_spec='${libname}.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec="$LIB"
+      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH.
+        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
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # 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'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
+    ;;
+
+  *)
+    # Assume MSVC wrapper
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
+    ;;
+  esac
+  # 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}${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
+  ;;
+
+haiku*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  dynamic_linker="$host_os runtime_loader"
+  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=LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+  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'
+  # or fails outright, so override atomically:
+  install_override_mode=555
+  ;;
+
+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 | kopensolaris*-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
+
+  # Some binutils ld are patched to set DT_RUNPATH
+  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+    [lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+	 [lt_cv_shlibpath_overrides_runpath=yes])])
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+    ])
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+  # 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;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=qnx
+  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=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+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
+      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
+  shlibpath_overrides_runpath=yes
+  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'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    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'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  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}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+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
+
+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
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+    [Variables whose values should be saved in libtool wrapper scripts and
+    restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+    [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+    [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+    [[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]])
+_LT_DECL([], [soname_spec], [1],
+    [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+    [Permission mode override for installation of shared libraries])
+_LT_DECL([], [postinstall_cmds], [2],
+    [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+    [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+    [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+    [[As "finish_cmds", except a single script fragment to be evaled but
+    not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+    [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+    [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+    [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_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="m4_if([$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 <<_LT_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
+
+_LT_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
+_LT_DECL([], [MAGIC_CMD], [0],
+	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_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
+    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
+
+AC_ARG_WITH([gnu-ld],
+    [AS_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])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])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[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
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[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
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
+  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
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+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.
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && 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
+    # Keep this pattern in sync with the one in func_win32_libid.
+    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+cegcc*)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+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
+  ;;
+
+haiku*)
+  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])(-bit)?( [LM]SB)? 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 | kopensolaris*-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=pass_all
+  ;;
+
+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
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  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
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
+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
+
+_LT_DECL([], [deplibs_check_method], [1],
+    [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+    [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+    [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (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
+  : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
+  AC_SUBST([DUMPBIN])
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+  [lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
+  cat conftest.out >&AS_MESSAGE_LOG_FD
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
+  fi
+  rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+  # two different shell functions defined in ltmain.sh
+  # decide which to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  ;;
+esac
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+    [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+  [lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*])
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+  MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-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_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+  case $cc_basename in
+  nvcc*)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+  esac
+
+  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+	[Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# 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]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  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
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \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\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+
+# 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
+
+# Try without a prefix underscore, 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.
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK ['"\
+"     {last_section=section; section=\$ 3};"\
+"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     \$ 0!~/External *\|/{next};"\
+"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+"     {if(hide[section]) next};"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     ' prfx=^$ac_symprfx]"
+  else
+    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  fi
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_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 <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT@&t at _DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT@&t at _DLSYM_CONST
+#else
+# define LT@&t at _DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+	  cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols.  */
+LT@&t at _DLSYM_CONST struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_globsym_save_LIBS=$LIBS
+	  lt_globsym_save_CFLAGS=$CFLAGS
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$_LT_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_globsym_save_LIBS
+	  CFLAGS=$lt_globsym_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
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+  nm_file_list_spec='@'
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+    [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+    [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+    [lt_cv_sys_global_symbol_to_c_name_address], [1],
+    [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+    [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([], [nm_file_list_spec], [1],
+    [Specify filename containing input files for $NM])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+m4_if([$1], [CXX], [
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_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_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # 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_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | os2* | pw32* | cegcc*)
+      # 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_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_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      _LT_TAGVAR(lt_prog_compiler_static, $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_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+    *)
+      _LT_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_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	else
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_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
+	;;
+      mingw* | cygwin* | os2* | pw32* | cegcc*)
+	# 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_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+	;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      _LT_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_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  ecpc* )
+	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  icpc* )
+	    # Intel C++, used to be incompatible with GCC.
+	    # ICC 10 doesn't accept -KPIC any more.
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  pgCC* | pgcpp*)
+	    # Portland Group C++ compiler
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	    _LT_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_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+	    # IBM XL 8.0, 9.0 on PPC and BlueGene
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+        ;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    _LT_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_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC* | sunCC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+	;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_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_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # 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_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # 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_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_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)=
+      ;;
+
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+
+    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_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # 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_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _LT_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_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+	;;
+      nagfor*)
+	# NAG Fortran compiler
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      ccc*)
+        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      xl* | bgxl* | bgf* | mpixl*)
+	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ F* | *Sun*Fortran*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+	  ;;
+	*Sun\ C*)
+	  # Sun C 5.9
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    newsos6)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    rdos*)
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    solaris*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    unicos*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
+    uts4*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *)
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+	[Additional compiler flags for building library objects])
+
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+	[How to pass a linker flag through the compiler])
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+  $lt_tmp_static_flag,
+  [],
+  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+	[Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+  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
+    # Also, AIX nm treats weak defined symbols like other global defined
+    # symbols, whereas GNU nm marks them as "W".
+    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_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_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+    ;;
+  cygwin* | mingw* | cegcc*)
+    case $cc_basename in
+    cl*) ;;
+    *)
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+      ;;
+    esac
+    ;;
+  *)
+    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+    ;;
+  esac
+], [
+  runpath_var=
+  _LT_TAGVAR(allow_undefined_flag, $1)=
+  _LT_TAGVAR(always_export_symbols, $1)=no
+  _LT_TAGVAR(archive_cmds, $1)=
+  _LT_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_TAGVAR(compiler_needs_object, $1)=no
+  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(hardcode_automatic, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_TAGVAR(inherit_rpath, $1)=no
+  _LT_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_TAGVAR(module_cmds, $1)=
+  _LT_TAGVAR(module_expsym_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  _LT_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_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=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # 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_TAGVAR(ld_shlibs, $1)=yes
+
+  # On some targets, GNU ld is compatible enough with the native linker
+  # that we're better off using the native interface for both.
+  lt_use_gnu_ld_interface=no
+  if test "$with_gnu_ld" = yes; then
+    case $host_os in
+      aix*)
+	# The AIX port of GNU ld has always aspired to compatibility
+	# with the native linker.  However, as the warning in the GNU ld
+	# block says, versions before 2.19.5* couldn't really create working
+	# shared libraries, regardless of the interface used.
+	case `$LD -v 2>&1` in
+	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+	  *)
+	    lt_use_gnu_ld_interface=yes
+	    ;;
+	esac
+	;;
+      *)
+	lt_use_gnu_ld_interface=yes
+	;;
+    esac
+  fi
+
+  if test "$lt_use_gnu_ld_interface" = 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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_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_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *GNU\ gold*) supports_anon_versioning=yes ;;
+      *\ [[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_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, 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 install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_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_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=no
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        _LT_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_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_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    haiku*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    interix[[3-9]]*)
+      _LT_TAGVAR(hardcode_direct, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      _LT_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_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_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* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+	case $cc_basename in
+	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
+	esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+	 && test "$tmp_diet" = no
+      then
+	tmp_addflag=' $pic_flag'
+	tmp_sharedflag='-shared'
+	case $cc_basename,$host_cpu in
+        pgcc*)				# Portland Group C compiler
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95* | pgfortran*)
+					# Portland Group f77 and f90 compilers
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$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' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+	  tmp_sharedflag='--shared' ;;
+	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+	  tmp_sharedflag='-qmkshrobj'
+	  tmp_addflag= ;;
+	nvcc*)	# Cuda Compiler Driver 2.2
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(compiler_needs_object, $1)=yes
+	  ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  _LT_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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(compiler_needs_object, $1)=yes
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	esac
+	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          _LT_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
+
+	case $cc_basename in
+	xlf* | bgf* | bgxlf* | mpixlf*)
+	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; then
+	    _LT_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~
+	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $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_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_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.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_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_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
+	;;
+	*)
+	  # 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.
+	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    _LT_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_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+
+    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_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_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=yes
+      _LT_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_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_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
+	# Also, AIX nm treats weak defined symbols like other global
+	# defined symbols, whereas GNU nm marks them as "W".
+	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	else
+	  _LT_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_TAGVAR(archive_cmds, $1)=''
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+      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_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_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_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
+
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_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_TAGVAR(allow_undefined_flag, $1)='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        _LT_SYS_MODULE_PATH_AIX([$1])
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+        _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+	if test "$host_cpu" = ia64; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	  _LT_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_SYS_MODULE_PATH_AIX([$1])
+	 _LT_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	  if test "$with_gnu_ld" = yes; then
+	    # We only use this code for GNU lds that support --whole-archive.
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	  else
+	    # Exported symbols can be pulled into shared objects from archives
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  fi
+	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  _LT_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*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[[45]]*)
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # 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.
+      case $cc_basename in
+      cl*)
+	# Native MSVC
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	_LT_TAGVAR(always_export_symbols, $1)=yes
+	_LT_TAGVAR(file_list_spec, $1)='@'
+	# 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_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	  else
+	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	  fi~
+	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	  linknames='
+	# The linker will not automatically build a static lib if we build a DLL.
+	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+	# Don't use ranlib
+	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+	  lt_tool_outputfile="@TOOL_OUTPUT@"~
+	  case $lt_outputfile in
+	    *.exe|*.EXE) ;;
+	    *)
+	      lt_outputfile="$lt_outputfile.exe"
+	      lt_tool_outputfile="$lt_tool_outputfile.exe"
+	      ;;
+	  esac~
+	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	    $RM "$lt_outputfile.manifest";
+	  fi'
+	;;
+      *)
+	# Assume MSVC wrapper
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	_LT_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_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+	# The linker will automatically build a .lib file if we build a DLL.
+	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	# FIXME: Should let the user specify the lib program.
+	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	;;
+      esac
+      ;;
+
+    darwin* | rhapsody*)
+      _LT_DARWIN_LINKER_FEATURES($1)
+      ;;
+
+    dgux*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    freebsd1*)
+      _LT_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_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${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_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
+	_LT_TAGVAR(hardcode_direct, $1)=yes
+	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	_LT_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_TAGVAR(hardcode_minus_L, $1)=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	m4_if($1, [], [
+	  # Older versions of the 11.00 compiler do not understand -b yet
+	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+	  _LT_LINKER_OPTION([if $CC understands -b],
+	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
+	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
+	  [_LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  _LT_TAGVAR(hardcode_direct, $1)=no
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  ;;
+	*)
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	  _LT_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_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	# Try to use the -exported_symbol ld option, if it does not
+	# work, assume that -exports_file does not work either and
+	# implicitly export all symbols.
+	# This should be the same for all languages, so no per-tag cache variable.
+	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+	  [lt_cv_irix_exported_symbol],
+	  [save_LDFLAGS="$LDFLAGS"
+	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+	   AC_LINK_IFELSE(
+	     [AC_LANG_SOURCE(
+	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+			      [C++], [[int foo (void) { return 0; }]],
+			      [Fortran 77], [[
+      subroutine foo
+      end]],
+			      [Fortran], [[
+      subroutine foo
+      end]])])],
+	      [lt_cv_irix_exported_symbol=yes],
+	      [lt_cv_irix_exported_symbol=no])
+           LDFLAGS="$save_LDFLAGS"])
+	if test "$lt_cv_irix_exported_symbol" = yes; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+	fi
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(inherit_rpath, $1)=yes
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    newsos6)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	_LT_TAGVAR(hardcode_direct, $1)=yes
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	     ;;
+	   *)
+	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    os2*)
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_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_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      else
+	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    solaris*)
+      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+      else
+	case `$CC -V 2>&1` in
+	*"Compilers 5.0"*)
+	  wlarc=''
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_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'
+	  ;;
+	*)
+	  wlarc='${wl}'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_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} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  ;;
+	esac
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_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_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      _LT_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_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+	  _LT_TAGVAR(hardcode_direct, $1)=no
+        ;;
+	motorola)
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	_LT_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_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_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+    [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_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_CACHE_CHECK([whether -lc should be explicitly linked in],
+	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+	[$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_TAGVAR(lt_prog_compiler_wl, $1)
+	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+	  _LT_TAGVAR(allow_undefined_flag, $1)=
+	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+	  then
+	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	  else
+	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  fi
+	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+	else
+	  cat conftest.err 1>&5
+	fi
+	$RM conftest*
+	])
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+    [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+    [enable_shared_with_static_runtimes], [0],
+    [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+    [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+    [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+    [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+    [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+    [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+    [Commands used to build a loadable module if different from building
+    a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+    [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+    [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+    [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+    [Flag to hardcode $libdir into a binary during linking.
+    This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [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]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+    [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary and the resulting library dependency is
+    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+    library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+    [Set to "yes" if building a shared library automatically hardcodes DIR
+    into the library and all subsequent libraries and executables linked
+    against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+    [Set to yes if linker adds runtime paths of dependent libraries
+    to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+    [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [always_export_symbols], [0],
+    [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+    [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+    [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+    [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+    [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+    [Commands necessary for finishing linking programs])
+_LT_TAGDECL([], [file_list_spec], [1],
+    [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl    [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined.  These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+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_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_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_SYS_DYNAMIC_LINKER($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+  LT_SYS_DLOPEN_SELF
+  _LT_CMD_STRIPLIB
+
+  # 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])
+
+  _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined.  These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+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
+else
+  _lt_caught_CXX_error=yes
+fi
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+  # 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_TAG_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_CFLAGS=$CFLAGS
+  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++"}
+  CFLAGS=$CXXFLAGS
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    # We don't want -fno-exception when compiling C++ code, so set the
+    # no_builtin_flag separately
+    if test "$GXX" = yes; then
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+    else
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+    fi
+
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
+
+      LT_PATH_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_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_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_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+        else
+          _LT_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_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 -v "^Configured with:" | $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_TAGVAR(ld_shlibs, $1)=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        _LT_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_TAGVAR(archive_cmds, $1)=''
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+        _LT_TAGVAR(link_all_deplibs, $1)=yes
+        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+        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_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_TAGVAR(hardcode_minus_L, $1)=yes
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	    _LT_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
+
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+        # It seems that -bexpall does not export symbols beginning with
+        # underscore (_), so it is better to generate a list of symbols to
+	# export.
+        _LT_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_TAGVAR(allow_undefined_flag, $1)='-berok'
+          # Determine the default libpath from the value encoded in an empty
+          # executable.
+          _LT_SYS_MODULE_PATH_AIX([$1])
+          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+          _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	    _LT_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_SYS_MODULE_PATH_AIX([$1])
+	    _LT_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	    if test "$with_gnu_ld" = yes; then
+	      # We only use this code for GNU lds that support --whole-archive.
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    else
+	      # Exported symbols can be pulled into shared objects from archives
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	    fi
+	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	    # This is similar to how AIX traditionally builds its shared
+	    # libraries.
+	    _LT_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_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_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	else
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+
+      chorus*)
+        case $cc_basename in
+          *)
+	  # FIXME: insert proper C++ library support
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	  ;;
+        esac
+        ;;
+
+      cygwin* | mingw* | pw32* | cegcc*)
+	case $GXX,$cc_basename in
+	,cl* | no,cl*)
+	  # Native MSVC
+	  # hardcode_libdir_flag_spec is actually meaningless, as there is
+	  # no search path for DLLs.
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	  _LT_TAGVAR(always_export_symbols, $1)=yes
+	  _LT_TAGVAR(file_list_spec, $1)='@'
+	  # 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_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	    else
+	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	    fi~
+	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	    linknames='
+	  # The linker will not automatically build a static lib if we build a DLL.
+	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	  # Don't use ranlib
+	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+	    lt_tool_outputfile="@TOOL_OUTPUT@"~
+	    case $lt_outputfile in
+	      *.exe|*.EXE) ;;
+	      *)
+		lt_outputfile="$lt_outputfile.exe"
+		lt_tool_outputfile="$lt_tool_outputfile.exe"
+		;;
+	    esac~
+	    func_to_tool_file "$lt_outputfile"~
+	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	      $RM "$lt_outputfile.manifest";
+	    fi'
+	  ;;
+	*)
+	  # g++
+	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+	  # as there is no search path for DLLs.
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	  _LT_TAGVAR(always_export_symbols, $1)=no
+	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+	    _LT_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_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_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	  ;;
+	esac
+	;;
+      darwin* | rhapsody*)
+        _LT_DARWIN_LINKER_FEATURES($1)
+	;;
+
+      dgux*)
+        case $cc_basename in
+          ec++*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          ghcx*)
+	    # Green Hills C++ Compiler
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      freebsd[[12]]*)
+        # C++ shared libraries reported to be fairly broken before
+	# switch to ELF
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      freebsd-elf*)
+        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+        ;;
+
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+        ;;
+
+      gnu*)
+        ;;
+
+      haiku*)
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(link_all_deplibs, $1)=yes
+        ;;
+
+      hpux9*)
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _LT_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_TAGVAR(ld_shlibs, $1)=no
+            ;;
+          aCC*)
+            _LT_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) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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_TAGVAR(ld_shlibs, $1)=no
+            fi
+            ;;
+        esac
+        ;;
+
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+          case $host_cpu in
+            hppa*64*|ia64*)
+              ;;
+            *)
+	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            _LT_TAGVAR(hardcode_direct, $1)=no
+            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+            ;;
+          *)
+            _LT_TAGVAR(hardcode_direct, $1)=yes
+            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+            _LT_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_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          aCC*)
+	    case $host_cpu in
+	      hppa*64*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      ia64*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      *)
+	        _LT_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; func_echo_all "$list"'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test $with_gnu_ld = no; then
+	        case $host_cpu in
+	          hppa*64*)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          ia64*)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          *)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${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_TAGVAR(ld_shlibs, $1)=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      interix[[3-9]]*)
+	_LT_TAGVAR(hardcode_direct, $1)=no
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_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_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_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_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-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_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_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	      else
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+	      fi
+	    fi
+	    _LT_TAGVAR(link_all_deplibs, $1)=yes
+	    ;;
+        esac
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+        _LT_TAGVAR(inherit_rpath, $1)=yes
+        ;;
+
+      linux* | k*bsd*-gnu | kopensolaris*-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_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_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; func_echo_all "$list"'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_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_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+	    ;;
+	  icpc* | ecpc* )
+	    # 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_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		_LT_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_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		_LT_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_TAGVAR(archive_cmds_need_lc, $1)=no
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+	    case `$CC -V` in
+	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
+	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+		$RANLIB $oldlib'
+	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    *) # Version 6 and above use weak symbols
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      _LT_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'
+	      ;;
+	    esac
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+            ;;
+	  cxx*)
+	    # Compaq C++
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	    _LT_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=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
+	    ;;
+	  xl* | mpixl* | bgxl*)
+	    # IBM XL 8.0 on PPC, with GNU ld
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    if test "x$supports_anon_versioning" = xyes; then
+	      _LT_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 -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	    fi
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	      _LT_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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	      _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+	      # Not sure whether something based on
+	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	      # would be better.
+	      output_verbose_link_cmd='func_echo_all'
+
+	      # 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_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+
+      lynxos*)
+        # FIXME: insert proper C++ library support
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      m88k*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      mvs*)
+        case $cc_basename in
+          cxx*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+	  *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+	esac
+	;;
+
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+	  wlarc=
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_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::"'
+	;;
+
+      *nto* | *qnx*)
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+	;;
+
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      openbsd*)
+	if test -f /usr/libexec/ld.so; then
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+	  _LT_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_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_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  fi
+	  output_verbose_link_cmd=func_echo_all
+	else
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+
+      osf3* | 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_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	    # Archives containing C++ object files must be created using
+	    # the KAI C++ compiler.
+	    case $host in
+	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+	    esac
+	    ;;
+          RCC*)
+	    # Rational C++ 2.4.1
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          cxx*)
+	    case $host in
+	      osf3*)
+	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+		;;
+	      *)
+	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+		;;
+	    esac
+
+	    _LT_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=`func_echo_all "$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; func_echo_all "$list"'
+	    ;;
+	  *)
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	      case $host in
+	        osf3*)
+	          _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	        *)
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	      esac
+
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	      _LT_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 -v "^Configured with:" | $GREP "\-L"'
+
+	    else
+	      # FIXME: insert proper C++ library support
+	      _LT_TAGVAR(ld_shlibs, $1)=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      psos*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      sunos4*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.x
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          lcc*)
+	    # Lucid
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      solaris*)
+        case $cc_basename in
+          CC* | sunCC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	    _LT_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_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	        ;;
+	    esac
+	    _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+	    output_verbose_link_cmd='func_echo_all'
+
+	    # 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_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	    ;;
+          gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_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_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -shared $pic_flag -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 -v "^Configured with:" | $GREP "\-L"'
+	      else
+	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	        # platform.
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_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 -v "^Configured with:" | $GREP "\-L"'
+	      fi
+
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	      case $host_os in
+		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+		*)
+		  _LT_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_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      case $cc_basename in
+        CC*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_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.
+	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+	_LT_TAGVAR(link_all_deplibs, $1)=yes
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+	runpath_var='LD_RUN_PATH'
+
+	case $cc_basename in
+          CC*)
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
+	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+	      '"$_LT_TAGVAR(reload_cmds, $1)"
+	    ;;
+	  *)
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$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_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      *)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+    esac
+
+    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+    _LT_TAGVAR(GCC, $1)="$GXX"
+    _LT_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...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+  LDCXX=$LD
+  LD=$lt_save_LD
+  GCC=$lt_save_GCC
+  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
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+  case ${2} in
+  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+  esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
+# _LT_SYS_HIDDEN_LIBDEPS([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.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+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...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+_LT_EOF
+])
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+esac
+
+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
+
+  for p in `eval "$output_verbose_link_cmd"`; do
+    case ${prev}${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
+       fi
+
+       # Expand the sysroot to ease extracting the directories later.
+       if test -z "$prev"; then
+         case $p in
+         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+         esac
+       fi
+       case $p in
+       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+       esac
+       if test "$pre_test_object_deps_done" = no; then
+	 case ${prev} 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_TAGVAR(compiler_lib_search_path, $1)"; then
+	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+	   else
+	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_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_TAGVAR(postdeps, $1)"; then
+	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+	 else
+	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+	 fi
+       fi
+       prev=
+       ;;
+
+    *.lto.$objext) ;; # Ignore GCC LTO objects
+    *.$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_TAGVAR(predep_objects, $1)"; then
+	   _LT_TAGVAR(predep_objects, $1)="$p"
+	 else
+	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+	 fi
+       else
+	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+	   _LT_TAGVAR(postdep_objects, $1)="$p"
+	 else
+	   _LT_TAGVAR(postdep_objects, $1)="$_LT_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
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+m4_if([$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_TAGVAR(predep_objects,$1)=
+  _LT_TAGVAR(postdep_objects,$1)=
+  _LT_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_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC* | sunCC*)
+    # 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_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+    [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+    [Dependencies to place before and after the objects being linked to
+    create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+    [The library search path used internally by the compiler when linking
+    a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test "X$F77" = "Xno"; then
+  _lt_disable_F77=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_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_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+  # 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_TAG_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_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
+  CC=${F77-"f77"}
+  CFLAGS=$FFLAGS
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+  GCC=$G77
+  if test -n "$compiler"; then
+    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_TAGVAR(GCC, $1)="$G77"
+    _LT_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...
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+  CFLAGS="$lt_save_CFLAGS"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test "X$FC" = "Xno"; then
+  _lt_disable_FC=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+  # 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_TAG_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_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
+  CC=${FC-"f95"}
+  CFLAGS=$FCFLAGS
+  compiler=$CC
+  GCC=$ac_cv_fc_compiler_gnu
+
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    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_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+    _LT_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...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_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_TAG_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_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+
+  _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_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_TAG_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_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+CFLAGS=
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+  :
+  _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+    [AC_CHECK_TOOL(GCJ, gcj,)
+      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+      AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+# _LT_DECL_DLLTOOL
+# ----------------
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+# 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.                               #
+
+m4_defun([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])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# 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
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
+m4_defun([_LT_PROG_FUNCTION_REPLACE],
+[dnl {
+sed -e '/^$1 ()$/,/^} # $1 /c\
+$1 ()\
+{\
+m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+])
+
+
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
+# Replace existing portable implementations of several shell functions with
+# equivalent extended shell implementations where those features are available..
+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
+[if test x"$xsi_shell" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac])
+
+  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
+    func_basename_result="${1##*/}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac
+    func_basename_result="${1##*/}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+    # positional parameters, so assign one to ordinary parameter first.
+    func_stripname_result=${3}
+    func_stripname_result=${func_stripname_result#"${1}"}
+    func_stripname_result=${func_stripname_result%"${2}"}])
+
+  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+    func_split_long_opt_name=${1%%=*}
+    func_split_long_opt_arg=${1#*=}])
+
+  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+    func_split_short_opt_arg=${1#??}
+    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
+
+  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+    case ${1} in
+      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+      *)    func_lo2o_result=${1} ;;
+    esac])
+
+  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
+
+  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
+
+  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
+fi
+
+if test x"$lt_shell_append" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
+    func_quote_for_eval "${2}"
+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
+
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+fi
+])
+
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine which file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
+    ;;
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
+    ;;
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+         [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
+])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+         [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
+
+# Helper functions for option handling.                    -*- Autoconf -*-
+#
+#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
+#   Inc.
+#   Written by Gary V. Vaughan, 2004
+#
+# 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 7 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+        _LT_MANGLE_DEFUN([$1], [$2]),
+    [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+		      [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME.  If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+    [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+  dnl
+  dnl Simply set some default values (i.e off) if boolean options were not
+  dnl specified:
+  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+  ])
+  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+  ])
+  dnl
+  dnl If no reference was made to various pairs of opposing options, then
+  dnl we run the default mode handler for the pair.  For example, if neither
+  dnl `shared' nor `disable-shared' was passed, we enable building of shared
+  dnl archives by default:
+  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+  		   [_LT_ENABLE_FAST_INSTALL])
+  ])
+])# _LT_SET_OPTIONS
+
+
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS],      [1], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+	[build shared libraries @<:@default=]_LT_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=]_LT_ENABLE_SHARED_DEFAULT)
+
+    _LT_DECL([build_libtool_libs], [enable_shared], [0],
+	[Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+	[build static libraries @<:@default=]_LT_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=]_LT_ENABLE_STATIC_DEFAULT)
+
+    _LT_DECL([build_old_libs], [enable_static], [0],
+	[Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]_LT_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=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+	 [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+    [AS_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=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+		 [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+		 [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+		 [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+		 [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+		 [m4_define([_LTDL_TYPE], [convenience])])
+
+# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+       [$#], [2], [[$2]],
+       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+       [$#], 1, [],
+       [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+	     [m4_foreach([_Lt_suffix],
+		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+		 [lt_append([$1], [$2], [$3])$4],
+		 [$5])],
+	  [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+	[$5],
+    [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+  [lt_join(m4_quote(m4_default([$4], [[, ]])),
+           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
+
+# ltversion.m4 -- version numbers			-*- Autoconf -*-
+#
+#   Copyright (C) 2004 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004
+#
+# 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.
+
+# @configure_input@
+
+# serial 3293 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.4])
+m4_define([LT_PACKAGE_REVISION], [1.3293])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.4'
+macro_revision='1.3293'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
+
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
+#
+#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 5 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else.  This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 10
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 16
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+		  [_AM_DEPENDENCIES(CC)],
+		  [define([AC_PROG_CC],
+			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+		  [_AM_DEPENDENCIES(CXX)],
+		  [define([AC_PROG_CXX],
+			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+		  [_AM_DEPENDENCIES(OBJC)],
+		  [define([AC_PROG_OBJC],
+			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t at _MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
+			  (and sometimes confusing) to the casual installer],
+      [USE_MAINTAINER_MODE=$enableval],
+      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/ext/libeio/autogen.sh b/ext/libeio/autogen.sh
new file mode 100755
index 0000000..8056ee7
--- /dev/null
+++ b/ext/libeio/autogen.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+autoreconf --install --symlink --force
diff --git a/ext/libeio/config.guess b/ext/libeio/config.guess
new file mode 100755
index 0000000..de8e6dd
--- /dev/null
+++ b/ext/libeio/config.guess
@@ -0,0 +1,1540 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
+
+timestamp='2012-02-10'
+
+# 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, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches at gnu.org> and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+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
+
+case "${UNAME_MACHINE}" in
+  i?86)
+     test -z "$VENDOR" && VENDOR=pc
+     ;;
+  *)
+     test -z "$VENDOR" && VENDOR=unknown
+     ;;
+esac
+test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse
+
+# 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 tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep -q __ELF__
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+		os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-${VENDOR}-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-${VENDOR}-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-mirbsd${UNAME_RELEASE}
+	exit ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-${VENDOR}-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-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-${VENDOR}-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	echo i386-pc-auroraux${UNAME_RELEASE}
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	eval $set_cc_for_build
+	SUN_ARCH="i386"
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH="x86_64"
+	    fi
+	fi
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+	echo m68k-${VENDOR}-mint${UNAME_RELEASE}
+	exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit ;;
+    AViiON:dgux:*:*)
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+	exit ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit ;;
+    *:AIX:*:[4567])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case "${sc_cpu_version}" in
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case "${sc_kernel_bits}" in
+			  32) HP_ARCH="hppa2.0n" ;;
+			  64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+			esac ;;
+		    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^		//' << EOF >$dummy.c
+
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
+
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
+
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	echo unknown-hitachi-hiuxwe2
+	exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-${VENDOR}-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-${VENDOR}-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-${VENDOR}-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:FreeBSD:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
+	    amd64)
+		echo x86_64-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_PROCESSOR}-${VENDOR}-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*:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
+    i*:windows32*:*)
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:*)
+	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    authenticamd | genuineintel | EM64T)
+		echo x86_64-${VENDOR}-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-${VENDOR}-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
+    8664:Windows_NT:*)
+	echo x86_64-pc-mks
+	exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-${VENDOR}-cygwin
+	exit ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-${VENDOR}-cygwin
+	exit ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-${VENDOR}-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-${VENDOR}-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-${VENDOR}-`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 ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-${VENDOR}-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 -q ld.so.1
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu${LIBC}
+	exit ;;
+    arm*:Linux:*:*)
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabi
+	    else
+		echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabihf
+	    fi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    cris:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-gnu
+	exit ;;
+    crisv32:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    i*86:Linux:*:*)
+	LIBC=gnu
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=${UNAME_MACHINE}el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=${UNAME_MACHINE}
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+	test x"${CPU}" != x && { echo "${CPU}-${VENDOR}-linux-gnu"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    padre:Linux:*:*)
+	echo sparc-${VENDOR}-linux-gnu
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-${VENDOR}-linux-gnu
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-${VENDOR}-linux-gnu ;;
+	  PA8*) echo hppa2.0-${VENDOR}-linux-gnu ;;
+	  *)    echo hppa-${VENDOR}-linux-gnu ;;
+	esac
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-${VENDOR}-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-${VENDOR}-linux-gnu
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit ;;
+    sh64*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-gnu
+	exit ;;
+    x86_64:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    xtensa*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+	# Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-${VENDOR}-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	echo i386-${VENODR}-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}-${VENDOR}-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
+	exit ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-${VENODR}-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-${VENDOR}-lynxos${UNAME_RELEASE}
+	exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-${VENDOR}-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-${VENDOR}-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	echo powerpc-${VENDOR}-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-${VENDOR}-sysv${UNAME_RELEASE}
+	fi
+	exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	exit ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    i386)
+		eval $set_cc_for_build
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		      grep IS_64BIT_ARCH >/dev/null
+		  then
+		      UNAME_PROCESSOR="x86_64"
+		  fi
+		fi ;;
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-${VENDOR}-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-${VENDOR}-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-${VENDOR}-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-${VENDOR}-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-${VENDOR}-its
+	exit ;;
+    SEI:*:*:SEIUX)
+	echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-esx
+	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/ext/libeio/config.h.in b/ext/libeio/config.h.in
new file mode 100644
index 0000000..b605062
--- /dev/null
+++ b/ext/libeio/config.h.in
@@ -0,0 +1,136 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* fallocate(2) is available */
+#undef HAVE_FALLOCATE
+
+/* fdatasync(2) is available */
+#undef HAVE_FDATASYNC
+
+/* futimes(2) is available */
+#undef HAVE_FUTIMES
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* posix_fadvise(2) is available */
+#undef HAVE_POSIX_FADVISE
+
+/* posix_madvise(2) is available */
+#undef HAVE_POSIX_MADVISE
+
+/* prctl(PR_SET_NAME) is available */
+#undef HAVE_PRCTL_SET_NAME
+
+/* pread(2) and pwrite(2) are available */
+#undef HAVE_PREADWRITE
+
+/* readahead(2) is available (linux) */
+#undef HAVE_READAHEAD
+
+/* sendfile(2) is available and supported */
+#undef HAVE_SENDFILE
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* sync_file_range(2) is available */
+#undef HAVE_SYNC_FILE_RANGE
+
+/* Define to 1 if you have the <sys/prctl.h> header file. */
+#undef HAVE_SYS_PRCTL_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* syscall(__NR_syncfs) is available */
+#undef HAVE_SYS_SYNCFS
+
+/* Define to 1 if you have the <sys/syscall.h> header file. */
+#undef HAVE_SYS_SYSCALL_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* utimes(2) is available */
+#undef HAVE_UTIMES
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
diff --git a/ext/libeio/config.sub b/ext/libeio/config.sub
new file mode 100755
index 0000000..59bb593
--- /dev/null
+++ b/ext/libeio/config.sub
@@ -0,0 +1,1779 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
+
+timestamp='2012-04-18'
+
+# 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, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray | -microblaze)
+		os=
+		basic_machine=$1
+		;;
+	-bluegene*)
+		os=-cnk
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+	-chorusrdb)
+		os=-chorusrdb
+		basic_machine=$1
+		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
+	-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 \
+	| aarch64 | aarch64_be \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+        | be32 | be64 \
+	| bfin \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| epiphany \
+	| fido | fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| le32 | le64 \
+	| lm32 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | mcore | mep | metag \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64octeon | mips64octeonel \
+	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
+	| mips64vr | mips64vrel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| moxie \
+	| mt \
+	| msp430 \
+	| nds32 | nds32le | nds32be \
+	| nios | nios2 \
+	| ns16k | ns32k \
+	| open8 \
+	| or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
+	| pyramid \
+	| rl78 | rx \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+	| ubicom32 \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+	| we32k \
+	| x86 | xc16x | xstormy16 | xtensa \
+	| z8k | z80)
+		basic_machine=$basic_machine-unknown
+		;;
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
+
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+	xgate)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| aarch64-* | aarch64_be-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* | avr32-* \
+	| be32-* | be64-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
+	| clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| le32-* | le64-* \
+	| lm32-* \
+	| m32c-* | m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64octeon-* | mips64octeonel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
+	| msp430-* \
+	| nds32-* | nds32le-* | nds32be-* \
+	| nios-* | nios2-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+	| pyramid-* \
+	| rl78-* | romp-* | rs6000-* | rx-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tile*-* \
+	| tron-* \
+	| ubicom32-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
+	| xstormy16-* | xtensa*-* \
+	| ymp-* \
+	| z8k-* | z80-*)
+		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	abacus)
+		basic_machine=abacus-unknown
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aros)
+		basic_machine=i386-pc
+		os=-aros
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	bluegene*)
+		basic_machine=powerpc-ibm
+		os=-cnk
+		;;
+	c54x-*)
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c55x-*)
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c6x-*)
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	cegcc)
+		basic_machine=arm-unknown
+		os=-cegcc
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16 | cr16-*)
+		basic_machine=cr16-unknown
+		os=-elf
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	microblaze)
+		basic_machine=microblaze-xilinx
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
+	msys)
+		basic_machine=i386-pc
+		os=-msys
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	openrisc | openrisc-*)
+		basic_machine=or32-unknown
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc | ppcbe)	basic_machine=powerpc-unknown
+		;;
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rdos)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tile*)
+		basic_machine=$basic_machine-unknown
+		os=-linux-gnu
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+	# First match some system type aliases
+	# that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-auroraux)
+		os=-auroraux
+		;;
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+	      | -sym* | -kopensolaris* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* | -aros* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -openbsd* | -solidbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-tpf*)
+		os=-tpf
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-dicos*)
+		os=-dicos
+		;;
+	-nacl*)
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	score-*)
+		os=-elf
+		;;
+	spu-*)
+		os=-elf
+		;;
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	tic54x-*)
+		os=-coff
+		;;
+	tic55x-*)
+		os=-coff
+		;;
+	tic6x-*)
+		os=-coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mep-*)
+		os=-elf
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-haiku)
+		os=-haiku
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-knuth)
+		os=-mmixware
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-cnk*|-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/ext/libeio/configure b/ext/libeio/configure
new file mode 100755
index 0000000..89ad2bd
--- /dev/null
+++ b/ext/libeio/configure
@@ -0,0 +1,14822 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1
+
+  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     # Try only shells that exist, to save several forks.
+	     as_shell=$as_dir/$as_base
+	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+	   done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  # We cannot yet assume a decent shell, so we have to provide a
+	# neutralization value for shells without unset; and this also
+	# works around shells that cannot unset nonexistent variables.
+	# Preserve -v and -x to the replacement shell.
+	BASH_ENV=/dev/null
+	ENV=/dev/null
+	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+	export CONFIG_SHELL
+	case $- in # ((((
+	  *v*x* | *x*v* ) as_opts=-vx ;;
+	  *v* ) as_opts=-v ;;
+	  *x* ) as_opts=-x ;;
+	  * ) as_opts= ;;
+	esac
+	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf at gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in #(
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+PACKAGE_URL=
+
+ac_unique_file="eio.h"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+RANLIB
+ac_ct_AR
+AR
+DLLTOOL
+OBJDUMP
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+SED
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+LIBTOOL
+EGREP
+GREP
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_maintainer_mode
+enable_dependency_tracking
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used" >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking ...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-maintainer-mode  enable make rules and dependencies not useful
+			  (and sometimes confusing) to the casual installer
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-shared[=PKGS]  build shared libraries [default=yes]
+  --enable-static[=PKGS]  build static libraries [default=yes]
+  --enable-fast-install[=PKGS]
+                          optimize for fast installation [default=yes]
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-pic              try to use only PIC/non-PIC objects [default=use
+                          both]
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-sysroot=DIR Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append ac_configure_args1 " '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	$as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+am__api_version='1.11'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+  ./ | .// | /[cC]/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+
+  done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if ${ac_cv_path_mkdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in mkdir gmkdir; do
+	 for ac_exec_ext in '' $ac_executable_extensions; do
+	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+	     'mkdir (GNU coreutils) '* | \
+	     'mkdir (coreutils) '* | \
+	     'mkdir (fileutils) '4.1*)
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+	       break 3;;
+	   esac
+	 done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE=libeio
+ VERSION=1.0
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+    # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=no
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+   if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
+  MINIX=yes
+else
+  MINIX=
+fi
+
+
+  if test "$MINIX" = yes; then
+
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#	  define __EXTENSIONS__ 1
+	  $ac_includes_default
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_safe_to_define___extensions__=yes
+else
+  ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+  test $ac_cv_safe_to_define___extensions__ = yes &&
+    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+
+
+case `pwd` in
+  *\ * | *\	*)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.4'
+macro_revision='1.3293'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+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 delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='printf %s\n'
+else
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO ""
+}
+
+case "$ECHO" in
+  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if ${ac_cv_path_FGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+   then ac_cv_path_FGREP="$GREP -F"
+   else
+     if test -z "$FGREP"; then
+  ac_path_FGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in fgrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+  # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'FGREP' >> "conftest.nl"
+    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_FGREP="$ac_path_FGREP"
+      ac_path_FGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_FGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_FGREP"; then
+    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_FGREP=$FGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${lt_cv_path_LD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${lt_cv_prog_gnu_ld+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  # 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
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if ${lt_cv_path_NM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in dumpbin "link -dump"
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DUMPBIN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DUMPBIN"; then
+  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$DUMPBIN" && break
+  done
+fi
+if test -z "$DUMPBIN"; then
+  ac_ct_DUMPBIN=$DUMPBIN
+  for ac_prog in dumpbin "link -dump"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DUMPBIN"; then
+  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_DUMPBIN" && break
+done
+
+  if test "x$ac_ct_DUMPBIN" = x; then
+    DUMPBIN=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DUMPBIN=$ac_ct_DUMPBIN
+  fi
+fi
+
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
+
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if ${lt_cv_nm_interface+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
+  cat conftest.out >&5
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
+  fi
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if ${lt_cv_sys_max_cmd_len+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+    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* | cegcc*)
+    # 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;
+    ;;
+
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    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
+      # Make teststring a little bigger before we do anything with it.
+      # a 1K string should be a reasonable start.
+      for i in 1 2 3 4 5 6 7 8 ; do
+        teststring=$teststring$teststring
+      done
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      # If test is not a shell built-in, we'll probably end up computing a
+      # maximum length that is only half of the actual maximum length, but
+      # we can't tell.
+      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      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
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+
+
+
+
+
+# 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
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
+    ;;
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
+    ;;
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if ${lt_cv_ld_reload_flag+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+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
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
+  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
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+  ac_ct_OBJDUMP=$OBJDUMP
+  # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OBJDUMP="objdump"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OBJDUMP=$ac_ct_OBJDUMP
+  fi
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if ${lt_cv_deplibs_check_method+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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.
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && 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
+    # Keep this pattern in sync with the one in func_win32_libid.
+    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+cegcc*)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+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
+  ;;
+
+haiku*)
+  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])(-bit)?( [LM]SB)? 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 | kopensolaris*-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=pass_all
+  ;;
+
+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
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  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
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DLLTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DLLTOOL"; then
+  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+  ac_ct_DLLTOOL=$DLLTOOL
+  # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DLLTOOL"; then
+  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DLLTOOL" = x; then
+    DLLTOOL="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DLLTOOL=$ac_ct_DLLTOOL
+  fi
+else
+  DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
+if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+  # two different shell functions defined in ltmain.sh
+  # decide which to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in ar
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$AR" && break
+  done
+fi
+if test -z "$AR"; then
+  ac_ct_AR=$AR
+  for ac_prog in ar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_AR="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_AR" && break
+done
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+fi
+
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ar_at_file=no
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+      if test "$ac_status" -eq 0; then
+	# Ensure the archiver fails upon bogus file names.
+	rm -f conftest.$ac_objext libconftest.a
+	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+	if test "$ac_status" -ne 0; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
+
+if test "x$lt_cv_ar_at_file" = xno; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# 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
+
+case $host_os in
+  darwin*)
+    lock_old_archive_extraction=yes ;;
+  *)
+    lock_old_archive_extraction=no ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# 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
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+# 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]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
+  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
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \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\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+
+# 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
+
+# Try without a prefix underscore, 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.
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK '"\
+"     {last_section=section; section=\$ 3};"\
+"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     \$ 0!~/External *\|/{next};"\
+"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+"     {if(hide[section]) next};"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     ' prfx=^$ac_symprfx"
+  else
+    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  fi
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && 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 <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+	  cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols.  */
+LT_DLSYM_CONST struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_globsym_save_LIBS=$LIBS
+	  lt_globsym_save_CFLAGS=$CFLAGS
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS=$lt_globsym_save_LIBS
+	  CFLAGS=$lt_globsym_save_CFLAGS
+	else
+	  echo "cannot find nm_test_func in $nlist" >&5
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    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
+
+fi
+
+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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
+  nm_file_list_spec='@'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test "${with_sysroot+set}" = set; then :
+  withval=$with_sysroot;
+else
+  with_sysroot=no
+fi
+
+
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+   if test "$GCC" = yes; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
+$as_echo "${with_sysroot}" >&6; }
+   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+   ;;
+esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+  enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && 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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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 '$LINENO' "configure"' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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*|s390*-*tpf*)
+	    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"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if ${lt_cv_cc_needs_belf+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_cc_needs_belf=yes
+else
+  lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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*
+  ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$MANIFEST_TOOL"; then
+  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+$as_echo "$MANIFEST_TOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+  # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_MANIFEST_TOOL"; then
+  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_MANIFEST_TOOL" = x; then
+    MANIFEST_TOOL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+  fi
+else
+  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if ${lt_cv_path_mainfest_tool+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&5
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+  MANIFEST_TOOL=:
+fi
+
+
+
+
+
+
+  case $host_os in
+    rhapsody* | darwin*)
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DSYMUTIL"; then
+  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+  ac_ct_DSYMUTIL=$DSYMUTIL
+  # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DSYMUTIL"; then
+  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DSYMUTIL" = x; then
+    DSYMUTIL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DSYMUTIL=$ac_ct_DSYMUTIL
+  fi
+else
+  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_NMEDIT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$NMEDIT"; then
+  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+  ac_ct_NMEDIT=$NMEDIT
+  # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_NMEDIT"; then
+  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_NMEDIT="nmedit"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_NMEDIT" = x; then
+    NMEDIT=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    NMEDIT=$ac_ct_NMEDIT
+  fi
+else
+  NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LIPO+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LIPO"; then
+  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+  ac_ct_LIPO=$LIPO
+  # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_LIPO"; then
+  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_LIPO="lipo"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_LIPO" = x; then
+    LIPO=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    LIPO=$ac_ct_LIPO
+  fi
+else
+  LIPO="$ac_cv_prog_LIPO"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL"; then
+  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+  ac_ct_OTOOL=$OTOOL
+  # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL"; then
+  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OTOOL="otool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OTOOL" = x; then
+    OTOOL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OTOOL=$ac_ct_OTOOL
+  fi
+else
+  OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL64"; then
+  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+  ac_ct_OTOOL64=$OTOOL64
+  # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL64"; then
+  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OTOOL64="otool64"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OTOOL64" = x; then
+    OTOOL64=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OTOOL64=$ac_ct_OTOOL64
+  fi
+else
+  OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if ${lt_cv_apple_cc_single_mod+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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.
+	rm -rf libconftest.dylib*
+	echo "int foo(void){return 1;}" > conftest.c
+	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	  lt_cv_apple_cc_single_mod=yes
+	else
+	  cat conftest.err >&5
+	fi
+	rm -rf libconftest.dylib*
+	rm -f conftest.*
+      fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_ld_exported_symbols_list=yes
+else
+  lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+	LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+$as_echo_n "checking for -force_load linker flag... " >&6; }
+if ${lt_cv_ld_force_load+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+      echo "$AR cru libconftest.a conftest.o" >&5
+      $AR cru libconftest.a conftest.o 2>&5
+      echo "$RANLIB libconftest.a" >&5
+      $RANLIB libconftest.a 2>&5
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+	lt_cv_ld_force_load=yes
+      else
+	cat conftest.err >&5
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+$as_echo "$lt_cv_ld_force_load" >&6; }
+    case $host_os in
+    rhapsody* | darwin1.[012])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*) # darwin 5.x on
+      # 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" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+
+for ac_header in dlfcn.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+# Set options
+
+
+
+        enable_dlopen=no
+
+
+  enable_win32_dll=no
+
+
+            # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      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
+else
+  enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+  # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+  enableval=$enable_static; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      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
+else
+  enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+  withval=$with_pic; pic_mode="$withval"
+else
+  pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+  # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+  enableval=$enable_fast_install; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      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
+else
+  enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if ${lt_cv_objdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+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
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      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 <<_LT_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
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      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 <<_LT_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
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$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);}'
+
+
+
+
+
+
+
+# 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
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+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*
+
+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*
+
+
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  case $cc_basename in
+  nvcc*)
+    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+  *)
+    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+  esac
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # 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:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   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 "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+
+
+
+
+
+  lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic='-fPIC'
+        ;;
+      m68k)
+            # 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_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # 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
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
+
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      lt_prog_compiler_static=
+      ;;
+
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='-fPIC'
+	;;
+      esac
+      ;;
+
+    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_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      lt_prog_compiler_pic='-fPIC'
+      ;;
+    esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      lt_prog_compiler_wl='-Xlinker '
+      lt_prog_compiler_pic='-Xcompiler -fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      else
+	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # 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).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-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_prog_compiler_pic='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-KPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='--shared'
+	lt_prog_compiler_static='--static'
+	;;
+      nagfor*)
+	# NAG Fortran compiler
+	lt_prog_compiler_wl='-Wl,-Wl,,'
+	lt_prog_compiler_pic='-PIC'
+	lt_prog_compiler_static='-Bstatic'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fpic'
+	lt_prog_compiler_static='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      xl* | bgxl* | bgf* | mpixl*)
+	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-qpic'
+	lt_prog_compiler_static='-qstaticlink'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ F* | *Sun*Fortran*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl=''
+	  ;;
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl='-Wl,'
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+	lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic='-Kconform_pic'
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
+
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   # 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:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   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 "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works=yes
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if ${lt_cv_prog_compiler_static_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   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>&5
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=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:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   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 "$_lt_compiler_boilerplate" | $SED '/^$/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_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $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 ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=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:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   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 "$_lt_compiler_boilerplate" | $SED '/^$/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_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $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 ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+  runpath_var=
+  allow_undefined_flag=
+  always_export_symbols=no
+  archive_cmds=
+  archive_expsym_cmds=
+  compiler_needs_object=no
+  enable_shared_with_static_runtimes=no
+  export_dynamic_flag_spec=
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  hardcode_automatic=no
+  hardcode_direct=no
+  hardcode_direct_absolute=no
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
+  hardcode_libdir_separator=
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  inherit_rpath=no
+  link_all_deplibs=unknown
+  module_cmds=
+  module_expsym_cmds=
+  old_archive_from_new_cmds=
+  old_archive_from_expsyms_cmds=
+  thread_safe_flag_spec=
+  whole_archive_flag_spec=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an 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'.
+  exclude_expsyms='_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.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # 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
+
+  ld_shlibs=yes
+
+  # On some targets, GNU ld is compatible enough with the native linker
+  # that we're better off using the native interface for both.
+  lt_use_gnu_ld_interface=no
+  if test "$with_gnu_ld" = yes; then
+    case $host_os in
+      aix*)
+	# The AIX port of GNU ld has always aspired to compatibility
+	# with the native linker.  However, as the warning in the GNU ld
+	# block says, versions before 2.19.5* couldn't really create working
+	# shared libraries, regardless of the interface used.
+	case `$LD -v 2>&1` in
+	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+	  *)
+	    lt_use_gnu_ld_interface=yes
+	    ;;
+	esac
+	;;
+      *)
+	lt_use_gnu_ld_interface=yes
+	;;
+    esac
+  fi
+
+  if test "$lt_use_gnu_ld_interface" = 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
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${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
+      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *GNU\ gold*) supports_anon_versioning=yes ;;
+      *\ [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
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, 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 install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$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)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      export_dynamic_flag_spec='${wl}--export-all-symbols'
+      allow_undefined_flag=unsupported
+      always_export_symbols=no
+      enable_shared_with_static_runtimes=yes
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        archive_cmds='$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...
+	archive_expsym_cmds='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
+	ld_shlibs=no
+      fi
+      ;;
+
+    haiku*)
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      link_all_deplibs=yes
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${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.
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='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* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+	case $cc_basename in
+	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
+	esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+	 && test "$tmp_diet" = no
+      then
+	tmp_addflag=' $pic_flag'
+	tmp_sharedflag='-shared'
+	case $cc_basename,$host_cpu in
+        pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95* | pgfortran*)
+					# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$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' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  whole_archive_flag_spec=
+	  tmp_sharedflag='--shared' ;;
+	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+	  tmp_sharedflag='-qmkshrobj'
+	  tmp_addflag= ;;
+	nvcc*)	# Cuda Compiler Driver 2.2
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  compiler_needs_object=yes
+	  ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  compiler_needs_object=yes
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	esac
+	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          archive_expsym_cmds='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
+
+	case $cc_basename in
+	xlf* | bgf* | bgxlf* | mpixlf*)
+	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+	  hardcode_libdir_flag_spec=
+	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
+	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; then
+	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	      echo "local: *; };" >> $output_objdir/$libname.ver~
+	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        ld_shlibs=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $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
+	ld_shlibs=no
+	cat <<_LT_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.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs=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
+	;;
+	*)
+	  # 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.
+	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  else
+	    ld_shlibs=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $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.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct=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
+	# Also, AIX nm treats weak defined symbols like other global
+	# defined symbols, whereas GNU nm marks them as "W".
+	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds='$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.
+
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_direct_absolute=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      file_list_spec='${wl}-f,'
+
+      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
+	  hardcode_direct=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L=yes
+	  hardcode_libdir_flag_spec='-L$libdir'
+	  hardcode_libdir_separator=
+	  fi
+	  ;;
+	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
+
+      export_dynamic_flag_spec='${wl}-bexpall'
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols=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.
+	allow_undefined_flag='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath_+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_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 "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_="/usr/lib:/lib"
+  fi
+
+fi
+
+  aix_libpath=$lt_cv_aix_libpath_
+fi
+
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag="-z nodefs"
+	  archive_expsym_cmds="\$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.
+	 if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath_+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_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 "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_="/usr/lib:/lib"
+  fi
+
+fi
+
+  aix_libpath=$lt_cv_aix_libpath_
+fi
+
+	 hardcode_libdir_flag_spec='${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.
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  if test "$with_gnu_ld" = yes; then
+	    # We only use this code for GNU lds that support --whole-archive.
+	    whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	  else
+	    # Exported symbols can be pulled into shared objects from archives
+	    whole_archive_flag_spec='$convenience'
+	  fi
+	  archive_cmds_need_lc=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds="\$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*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$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)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # 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.
+      case $cc_basename in
+      cl*)
+	# Native MSVC
+	hardcode_libdir_flag_spec=' '
+	allow_undefined_flag=unsupported
+	always_export_symbols=yes
+	file_list_spec='@'
+	# 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.
+	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	  else
+	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	  fi~
+	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	  linknames='
+	# The linker will not automatically build a static lib if we build a DLL.
+	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+	enable_shared_with_static_runtimes=yes
+	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+	# Don't use ranlib
+	old_postinstall_cmds='chmod 644 $oldlib'
+	postlink_cmds='lt_outputfile="@OUTPUT@"~
+	  lt_tool_outputfile="@TOOL_OUTPUT@"~
+	  case $lt_outputfile in
+	    *.exe|*.EXE) ;;
+	    *)
+	      lt_outputfile="$lt_outputfile.exe"
+	      lt_tool_outputfile="$lt_tool_outputfile.exe"
+	      ;;
+	  esac~
+	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	    $RM "$lt_outputfile.manifest";
+	  fi'
+	;;
+      *)
+	# Assume MSVC wrapper
+	hardcode_libdir_flag_spec=' '
+	allow_undefined_flag=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.
+	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+	# The linker will automatically build a .lib file if we build a DLL.
+	old_archive_from_new_cmds='true'
+	# FIXME: Should let the user specify the lib program.
+	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+	enable_shared_with_static_runtimes=yes
+	;;
+      esac
+      ;;
+
+    darwin* | rhapsody*)
+
+
+  archive_cmds_need_lc=no
+  hardcode_direct=no
+  hardcode_automatic=yes
+  hardcode_shlibpath_var=unsupported
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+  else
+    whole_archive_flag_spec=''
+  fi
+  link_all_deplibs=yes
+  allow_undefined_flag="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=func_echo_all
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds="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}"
+    module_expsym_cmds="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
+  ld_shlibs=no
+  fi
+
+      ;;
+
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds='$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
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+	archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_flag_spec_ld='+b $libdir'
+	hardcode_libdir_separator=:
+	hardcode_direct=yes
+	hardcode_direct_absolute=yes
+	export_dynamic_flag_spec='${wl}-E'
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+
+	  # Older versions of the 11.00 compiler do not understand -b yet
+	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+$as_echo_n "checking if $CC understands -b... " >&6; }
+if ${lt_cv_prog_compiler__b+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler__b=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS -b"
+   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>&5
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler__b=yes
+       fi
+     else
+       lt_cv_prog_compiler__b=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+$as_echo "$lt_cv_prog_compiler__b" >&6; }
+
+if test x"$lt_cv_prog_compiler__b" = xyes; then
+    archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+else
+    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+fi
+
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+	  ;;
+	*)
+	  hardcode_direct=yes
+	  hardcode_direct_absolute=yes
+	  export_dynamic_flag_spec='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	# Try to use the -exported_symbol ld option, if it does not
+	# work, assume that -exports_file does not work either and
+	# implicitly export all symbols.
+	# This should be the same for all languages, so no per-tag cache variable.
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_LDFLAGS="$LDFLAGS"
+	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int foo (void) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_irix_exported_symbol=yes
+else
+  lt_cv_irix_exported_symbol=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+           LDFLAGS="$save_LDFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+	if test "$lt_cv_irix_exported_symbol" = yes; then
+          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+	fi
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      inherit_rpath=yes
+      link_all_deplibs=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	hardcode_direct=yes
+	hardcode_shlibpath_var=no
+	hardcode_direct_absolute=yes
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$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'
+      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_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
+	hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_separator=:
+      ;;
+
+    solaris*)
+      no_undefined_flag=' -z defs'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+      else
+	case `$CC -V 2>&1` in
+	*"Compilers 5.0"*)
+	  wlarc=''
+	  archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+	  ;;
+	*)
+	  wlarc='${wl}'
+	  archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  ;;
+	esac
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=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
+	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs=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.
+	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds='$CC -r -o $output$reload_objs'
+	  hardcode_direct=no
+        ;;
+	motorola)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$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.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	export_dynamic_flag_spec='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds 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.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+if ${lt_cv_archive_cmds_need_lc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  $RM conftest*
+	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
+	  soname=conftest
+	  lib=conftest
+	  libobjs=conftest.$ac_objext
+	  deplibs=
+	  wl=$lt_prog_compiler_wl
+	  pic_flag=$lt_prog_compiler_pic
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$allow_undefined_flag
+	  allow_undefined_flag=
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+	  then
+	    lt_cv_archive_cmds_need_lc=no
+	  else
+	    lt_cv_archive_cmds_need_lc=yes
+	  fi
+	  allow_undefined_flag=$lt_save_allow_undefined_flag
+	else
+	  cat conftest.err 1>&5
+	fi
+	$RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  case $host_os in
+    mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
+    *) lt_sed_strip_eq="s,=/,/,g" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+  case $lt_search_path_spec in
+  *\;*)
+    # 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 's/;/ /g'`
+    ;;
+  *)
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+    ;;
+  esac
+  # 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; }
+}'`
+  # AWK program above erroneously prepends '/' to C:/dos/paths
+  # for these hosts.
+  case $host_os in
+    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+      $SED 's,/\([A-Za-z]:\),\1,g'` ;;
+  esac
+  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+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"
+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*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    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=`func_echo_all "$lib" | $SED '\''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'
+    ;;
+  esac
+  ;;
+
+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* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
+    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~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    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="$sys_lib_search_path_spec /usr/lib/w32api"
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    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
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+    library_names_spec='${libname}.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec="$LIB"
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH.
+        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
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # 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'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
+    ;;
+
+  *)
+    # Assume MSVC wrapper
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
+    ;;
+  esac
+  # 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}${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`'
+
+  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
+  ;;
+
+haiku*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  dynamic_linker="$host_os runtime_loader"
+  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=LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+  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'
+  # or fails outright, so override atomically:
+  install_override_mode=555
+  ;;
+
+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 | kopensolaris*-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
+
+  # Some binutils ld are patched to set DT_RUNPATH
+  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+  lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+
+fi
+
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+  # 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;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=qnx
+  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=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+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
+      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
+  shlibpath_overrides_runpath=yes
+  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'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    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'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  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}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+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
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+   test -n "$runpath_var" ||
+   test "X$hardcode_automatic" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+   test "$inherit_rpath" = yes; 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
+
+
+
+
+
+
+  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* | cegcc*)
+    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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+    ;;
+
+  *)
+    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = xyes; then :
+  lt_cv_dlopen="shl_load"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dld_shl_load=yes
+else
+  ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes; then :
+  lt_cv_dlopen="dlopen"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if ${ac_cv_lib_svld_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_svld_dlopen=yes
+else
+  ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if ${ac_cv_lib_dld_dld_link+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dld_dld_link=yes
+else
+  ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  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"
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "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
+
+/* When -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 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;
+          else puts (dlerror ());
+	}
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}
+_LT_EOF
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self_static+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "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
+
+/* When -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 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;
+          else puts (dlerror ());
+	}
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}
+_LT_EOF
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+    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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+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"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+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"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    fi
+    ;;
+  *)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    ;;
+  esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+  # Report which library types will actually be built
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+  test "$can_build_shared" = "no" && enable_shared=no
+
+  # On AIX, shared libraries and static libraries use the same namespace, and
+  # are all built from PIC.
+  case $host_os in
+  aix3*)
+    test "$enable_shared" = yes && enable_static=no
+    if test -n "$RANLIB"; then
+      archive_cmds="$archive_cmds~\$RANLIB \$lib"
+      postinstall_cmds='$RANLIB $lib'
+    fi
+    ;;
+
+  aix[4-9]*)
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
+    fi
+    ;;
+  esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+  # Make sure either enable_shared or enable_static is yes.
+  test "$enable_shared" = yes || enable_static=yes
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+        ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+
+if test "x$GCC" = xyes ; then
+  CFLAGS="-O3 $CFLAGS"
+fi
+
+for ac_header in stdint.h sys/syscall.h sys/prctl.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5
+$as_echo_n "checking for library containing pthread_create... " >&6; }
+if ${ac_cv_search_pthread_create+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' pthread pthreads pthreadVC2; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_pthread_create=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_pthread_create+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_pthread_create+:} false; then :
+
+else
+  ac_cv_search_pthread_create=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_create" >&5
+$as_echo "$ac_cv_search_pthread_create" >&6; }
+ac_res=$ac_cv_search_pthread_create
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+  as_fn_error $? "pthread functions not found" "$LINENO" 5
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimes" >&5
+$as_echo_n "checking for utimes... " >&6; }
+if ${ac_cv_utimes+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <utime.h>
+struct timeval tv[2];
+int res;
+int main (void)
+{
+   res = utimes ("/", tv);
+   return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_utimes=yes
+else
+  ac_cv_utimes=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_utimes" >&5
+$as_echo "$ac_cv_utimes" >&6; }
+test $ac_cv_utimes = yes &&
+$as_echo "#define HAVE_UTIMES 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for futimes" >&5
+$as_echo_n "checking for futimes... " >&6; }
+if ${ac_cv_futimes+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <utime.h>
+struct timeval tv[2];
+int res;
+int fd;
+int main (void)
+{
+   res = futimes (fd, tv);
+   return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_futimes=yes
+else
+  ac_cv_futimes=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_futimes" >&5
+$as_echo "$ac_cv_futimes" >&6; }
+test $ac_cv_futimes = yes &&
+$as_echo "#define HAVE_FUTIMES 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for readahead" >&5
+$as_echo_n "checking for readahead... " >&6; }
+if ${ac_cv_readahead+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <fcntl.h>
+int main (void)
+{
+   int fd = 0;
+   size_t count = 2;
+   ssize_t res;
+   res = readahead (fd, 0, count);
+   return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_readahead=yes
+else
+  ac_cv_readahead=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readahead" >&5
+$as_echo "$ac_cv_readahead" >&6; }
+test $ac_cv_readahead = yes &&
+$as_echo "#define HAVE_READAHEAD 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
+$as_echo_n "checking for fdatasync... " >&6; }
+if ${ac_cv_fdatasync+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <unistd.h>
+int main (void)
+{
+   int fd = 0;
+   fdatasync (fd);
+   return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_fdatasync=yes
+else
+  ac_cv_fdatasync=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fdatasync" >&5
+$as_echo "$ac_cv_fdatasync" >&6; }
+test $ac_cv_fdatasync = yes &&
+$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pread and pwrite" >&5
+$as_echo_n "checking for pread and pwrite... " >&6; }
+if ${ac_cv_preadwrite+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <unistd.h>
+int main (void)
+{
+   int fd = 0;
+   size_t count = 1;
+   char buf;
+   off_t offset = 1;
+   ssize_t res;
+   res = pread (fd, &buf, count, offset);
+   res = pwrite (fd, &buf, count, offset);
+   return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_preadwrite=yes
+else
+  ac_cv_preadwrite=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_preadwrite" >&5
+$as_echo "$ac_cv_preadwrite" >&6; }
+test $ac_cv_preadwrite = yes &&
+$as_echo "#define HAVE_PREADWRITE 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile" >&5
+$as_echo_n "checking for sendfile... " >&6; }
+if ${ac_cv_sendfile+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+# include <sys/types.h>
+#if __linux
+# include <sys/sendfile.h>
+#elif __FreeBSD__ || defined __APPLE__
+# include <sys/socket.h>
+# include <sys/uio.h>
+#elif __hpux
+# include <sys/socket.h>
+#else
+# error unsupported architecture
+#endif
+int main (void)
+{
+   int fd = 0;
+   off_t offset = 1;
+   size_t count = 2;
+   ssize_t res;
+#if __linux
+   res = sendfile (fd, fd, offset, count);
+#elif __FreeBSD__
+   res = sendfile (fd, fd, offset, count, 0, &offset, 0);
+#elif __hpux
+   res = sendfile (fd, fd, offset, count, 0, 0);
+#endif
+   return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_sendfile=yes
+else
+  ac_cv_sendfile=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sendfile" >&5
+$as_echo "$ac_cv_sendfile" >&6; }
+test $ac_cv_sendfile = yes &&
+$as_echo "#define HAVE_SENDFILE 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sync_file_range" >&5
+$as_echo_n "checking for sync_file_range... " >&6; }
+if ${ac_cv_sync_file_range+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <fcntl.h>
+int main (void)
+{
+   int fd = 0;
+   off64_t offset = 1;
+   off64_t nbytes = 1;
+   unsigned int flags = SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER;
+   ssize_t res;
+   res = sync_file_range (fd, offset, nbytes, flags);
+   return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_sync_file_range=yes
+else
+  ac_cv_sync_file_range=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sync_file_range" >&5
+$as_echo "$ac_cv_sync_file_range" >&6; }
+test $ac_cv_sync_file_range = yes &&
+$as_echo "#define HAVE_SYNC_FILE_RANGE 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fallocate" >&5
+$as_echo_n "checking for fallocate... " >&6; }
+if ${ac_cv_fallocate+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <fcntl.h>
+int main (void)
+{
+   int fd = 0;
+   int mode = 0;
+   off_t offset = 1;
+   off_t len = 1;
+   int res;
+   res = fallocate (fd, mode, offset, len);
+   return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_fallocate=yes
+else
+  ac_cv_fallocate=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fallocate" >&5
+$as_echo "$ac_cv_fallocate" >&6; }
+test $ac_cv_fallocate = yes &&
+$as_echo "#define HAVE_FALLOCATE 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_syncfs" >&5
+$as_echo_n "checking for sys_syncfs... " >&6; }
+if ${ac_cv_sys_syncfs+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <unistd.h>
+#include <sys/syscall.h>
+int main (void)
+{
+  int res = syscall (__NR_syncfs, (int)0);
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_sys_syncfs=yes
+else
+  ac_cv_sys_syncfs=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_syncfs" >&5
+$as_echo "$ac_cv_sys_syncfs" >&6; }
+test $ac_cv_sys_syncfs = yes &&
+$as_echo "#define HAVE_SYS_SYNCFS 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prctl_set_name" >&5
+$as_echo_n "checking for prctl_set_name... " >&6; }
+if ${ac_cv_prctl_set_name+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/prctl.h>
+int main (void)
+{
+  char name = "test123";
+  int res = prctl (PR_SET_NAME, (unsigned long)name, 0, 0, 0);
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_prctl_set_name=yes
+else
+  ac_cv_prctl_set_name=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prctl_set_name" >&5
+$as_echo "$ac_cv_prctl_set_name" >&6; }
+test $ac_cv_prctl_set_name = yes &&
+$as_echo "#define HAVE_PRCTL_SET_NAME 1" >>confdefs.h
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for posix_madvise" >&5
+$as_echo_n "checking for posix_madvise... " >&6; }
+if ${ac_cv_posix_madvise+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/mman.h>
+int main (void)
+{
+   int res = posix_madvise ((void *)0, (size_t)0, POSIX_MADV_NORMAL);
+   int a = POSIX_MADV_SEQUENTIAL;
+   int b = POSIX_MADV_RANDOM;
+   int c = POSIX_MADV_WILLNEED;
+   int d = POSIX_MADV_DONTNEED;
+   return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_posix_madvise=yes
+else
+  ac_cv_posix_madvise=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_madvise" >&5
+$as_echo "$ac_cv_posix_madvise" >&6; }
+test $ac_cv_posix_madvise = yes &&
+$as_echo "#define HAVE_POSIX_MADVISE 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for posix_fadvise" >&5
+$as_echo_n "checking for posix_fadvise... " >&6; }
+if ${ac_cv_posix_fadvise+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _XOPEN_SOURCE 600
+#include <fcntl.h>
+int main (void)
+{
+   int res = posix_fadvise ((int)0, (off_t)0, (off_t)0, POSIX_FADV_NORMAL);
+   int a = POSIX_FADV_SEQUENTIAL;
+   int b = POSIX_FADV_NOREUSE;
+   int c = POSIX_FADV_RANDOM;
+   int d = POSIX_FADV_WILLNEED;
+   int e = POSIX_FADV_DONTNEED;
+   return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_posix_fadvise=yes
+else
+  ac_cv_posix_fadvise=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_fadvise" >&5
+$as_echo "$ac_cv_posix_fadvise" >&6; }
+test $ac_cv_posix_fadvise = yes &&
+$as_echo "#define HAVE_POSIX_FADVISE 1" >>confdefs.h
+
+
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      fi
+    fi
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in #(
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.68,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=?*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# 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
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in SHELL \
+ECHO \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+OBJDUMP \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+DLLTOOL \
+sharedlib_from_linklib_cmd \
+AR \
+AR_FLAGS \
+archiver_list_spec \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+nm_file_list_spec \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_pic \
+lt_prog_compiler_wl \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+MANIFEST_TOOL \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+install_override_mode \
+finish_eval \
+old_striplib \
+striplib; do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postlink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'
+
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$ac_tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f "$ac_file"
+      mv "$ac_tmp/config.h" "$ac_file" \
+	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
+  fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+    "libtool":C)
+
+    # 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
+
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
+
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+#                 Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool 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.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
+# 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
+
+# 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//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# An object symbol dumper.
+OBJDUMP=$lt_OBJDUMP
+
+# 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
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive.
+AR_FLAGS=$lt_AR_FLAGS
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# 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
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and in which our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# 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
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# 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
+
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# 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
+
+# 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
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# 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_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# 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=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+  case $host_os in
+  aix3*)
+    cat <<\_LT_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
+_LT_EOF
+    ;;
+  esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+  # 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)
+
+  if test x"$xsi_shell" = xyes; then
+  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\    # positional parameters, so assign one to ordinary parameter first.\
+\    func_stripname_result=${3}\
+\    func_stripname_result=${func_stripname_result#"${1}"}\
+\    func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\    func_split_long_opt_name=${1%%=*}\
+\    func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\    func_split_short_opt_arg=${1#??}\
+\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\    case ${1} in\
+\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\      *)    func_lo2o_result=${1} ;;\
+\    esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+    func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+    func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+    func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+  sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+    eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\    func_quote_for_eval "${2}"\
+\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
+   mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+ ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/ext/libeio/configure.ac b/ext/libeio/configure.ac
new file mode 100644
index 0000000..9faffad
--- /dev/null
+++ b/ext/libeio/configure.ac
@@ -0,0 +1,22 @@
+AC_PREREQ(2.59)
+AC_INIT
+AC_CONFIG_SRCDIR([eio.h])
+AC_CONFIG_HEADERS([config.h])
+
+AM_INIT_AUTOMAKE(libeio,1.0)
+AM_MAINTAINER_MODE
+
+AC_GNU_SOURCE
+
+AC_PROG_LIBTOOL
+
+AC_PROG_CC
+
+if test "x$GCC" = xyes ; then
+  CFLAGS="-O3 $CFLAGS"
+fi
+
+m4_include([libeio.m4])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/ext/libeio/demo.c b/ext/libeio/demo.c
new file mode 100644
index 0000000..cbef595
--- /dev/null
+++ b/ext/libeio/demo.c
@@ -0,0 +1,194 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <poll.h>
+#include <string.h>
+#include <assert.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "eio.h"
+
+int respipe [2];
+
+void
+want_poll (void)
+{
+  char dummy;
+  printf ("want_poll ()\n");
+  write (respipe [1], &dummy, 1);
+}
+
+void
+done_poll (void)
+{
+  char dummy;
+  printf ("done_poll ()\n");
+  read (respipe [0], &dummy, 1);
+}
+
+void
+event_loop (void)
+{
+  // an event loop. yeah.
+  struct pollfd pfd;
+  pfd.fd     = respipe [0];
+  pfd.events = POLLIN;
+
+  printf ("\nentering event loop\n");
+  while (eio_nreqs ())
+    {
+      poll (&pfd, 1, -1);
+      printf ("eio_poll () = %d\n", eio_poll ());
+    }
+  printf ("leaving event loop\n");
+}
+
+int
+res_cb (eio_req *req)
+{
+  printf ("res_cb(%d|%s) = %d\n", req->type, req->data ? req->data : "?", EIO_RESULT (req));
+
+  if (req->result < 0)
+    abort ();
+
+  return 0;
+}
+
+int
+readdir_cb (eio_req *req)
+{
+  char *buf = (char *)EIO_BUF (req);
+
+  printf ("readdir_cb = %d\n", EIO_RESULT (req));
+
+  if (EIO_RESULT (req) < 0)
+    return 0;
+
+  while (EIO_RESULT (req)--)
+    {
+      printf ("readdir = <%s>\n", buf);
+      buf += strlen (buf) + 1;
+    }
+
+  return 0;
+}
+
+int
+stat_cb (eio_req *req)
+{
+  struct stat *buf = EIO_STAT_BUF (req);
+
+  if (req->type == EIO_FSTAT)
+    printf ("fstat_cb = %d\n", EIO_RESULT (req));
+  else
+    printf ("stat_cb(%s) = %d\n", EIO_PATH (req), EIO_RESULT (req));
+
+  if (!EIO_RESULT (req))
+    printf ("stat size %d perm 0%o\n", buf->st_size, buf->st_mode & 0777);
+
+  return 0;
+}
+
+int
+read_cb (eio_req *req)
+{
+  unsigned char *buf = (unsigned char *)EIO_BUF (req);
+
+  printf ("read_cb = %d (%02x%02x%02x%02x %02x%02x%02x%02x)\n",
+          EIO_RESULT (req),
+          buf [0], buf [1], buf [2], buf [3],
+          buf [4], buf [5], buf [6], buf [7]);
+
+  return 0;
+}
+
+int last_fd;
+
+int
+open_cb (eio_req *req)
+{
+  printf ("open_cb = %d\n", EIO_RESULT (req));
+
+  last_fd = EIO_RESULT (req);
+
+  return 0;
+}
+
+int
+main (void)
+{
+  printf ("pipe ()\n");
+  if (pipe (respipe)) abort ();
+
+  printf ("eio_init ()\n");
+  if (eio_init (want_poll, done_poll)) abort ();
+
+  do
+    {
+      /* avoid relative paths yourself(!) */
+      eio_mkdir ("eio-test-dir", 0777, 0, res_cb, "mkdir");
+      eio_nop (0, res_cb, "nop");
+      event_loop ();
+
+      eio_stat ("eio-test-dir", 0, stat_cb, "stat");
+      eio_lstat ("eio-test-dir", 0, stat_cb, "stat");
+      eio_open ("eio-test-dir/eio-test-file", O_RDWR | O_CREAT, 0777, 0, open_cb, "open");
+      eio_symlink ("test", "eio-test-dir/eio-symlink", 0, res_cb, "symlink");
+      eio_mknod ("eio-test-dir/eio-fifo", S_IFIFO, 0, 0, res_cb, "mknod");
+      event_loop ();
+
+      eio_utime ("eio-test-dir", 12345.678, 23456.789, 0, res_cb, "utime");
+      eio_futime (last_fd, 92345.678, 93456.789, 0, res_cb, "futime");
+      eio_chown ("eio-test-dir", getuid (), getgid (), 0, res_cb, "chown");
+      eio_fchown (last_fd, getuid (), getgid (), 0, res_cb, "fchown");
+      eio_fchmod (last_fd, 0723, 0, res_cb, "fchmod");
+      eio_readdir ("eio-test-dir", 0, 0, readdir_cb, "readdir");
+      eio_readdir ("/nonexistant", 0, 0, readdir_cb, "readdir");
+      eio_fstat (last_fd, 0, stat_cb, "stat");
+      eio_write (last_fd, "test\nfail\n", 10, 4, 0, res_cb, "write");
+      event_loop ();
+
+      eio_read (last_fd, 0, 8, 0, EIO_PRI_DEFAULT, read_cb, "read");
+      eio_readlink ("eio-test-dir/eio-symlink", 0, res_cb, "readlink");
+      event_loop ();
+
+      eio_dup2 (1, 2, EIO_PRI_DEFAULT, res_cb, "dup"); // dup stdout to stderr
+      eio_chmod ("eio-test-dir", 0765, 0, res_cb, "chmod");
+      eio_ftruncate (last_fd, 9, 0, res_cb, "ftruncate");
+      eio_fdatasync (last_fd, 0, res_cb, "fdatasync");
+      eio_fsync (last_fd, 0, res_cb, "fsync");
+      eio_sync (0, res_cb, "sync");
+      eio_busy (0.5, 0, res_cb, "busy");
+      event_loop ();
+
+      eio_sendfile (1, last_fd, 4, 5, 0, res_cb, "sendfile"); // write "test\n" to stdout
+      eio_fstat (last_fd, 0, stat_cb, "stat");
+      event_loop ();
+
+      eio_truncate ("eio-test-dir/eio-test-file", 6, 0, res_cb, "truncate");
+      eio_readahead (last_fd, 0, 64, 0, res_cb, "readahead");
+      event_loop ();
+
+      eio_close (last_fd, 0, res_cb, "close");
+      eio_link ("eio-test-dir/eio-test-file", "eio-test-dir/eio-test-file-2", 0, res_cb, "link");
+      event_loop ();
+
+      eio_rename ("eio-test-dir/eio-test-file", "eio-test-dir/eio-test-file-renamed", 0, res_cb, "rename");
+      event_loop ();
+
+      eio_unlink ("eio-test-dir/eio-fifo", 0, res_cb, "unlink");
+      eio_unlink ("eio-test-dir/eio-symlink", 0, res_cb, "unlink");
+      eio_unlink ("eio-test-dir/eio-test-file-2", 0, res_cb, "unlink");
+      eio_unlink ("eio-test-dir/eio-test-file-renamed", 0, res_cb, "unlink");
+      event_loop ();
+
+      eio_rmdir ("eio-test-dir", 0, res_cb, "rmdir");
+      event_loop ();
+    }
+  while (0);
+
+  return 0;
+}
+
diff --git a/ext/libeio/ecb.h b/ext/libeio/ecb.h
new file mode 100644
index 0000000..81879d7
--- /dev/null
+++ b/ext/libeio/ecb.h
@@ -0,0 +1,714 @@
+/*
+ * libecb - http://software.schmorp.de/pkg/libecb
+ *
+ * Copyright (©) 2009-2012 Marc Alexander Lehmann <libecb at schmorp.de>
+ * Copyright (©) 2011 Emanuele Giaquinta
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, are permitted provided that the following conditions are met:
+ *
+ *   1.  Redistributions of source code must retain the above copyright notice,
+ *       this list of conditions and the following disclaimer.
+ *
+ *   2.  Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
+ * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
+ * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
+ * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ECB_H
+#define ECB_H
+
+/* 16 bits major, 16 bits minor */
+#define ECB_VERSION 0x00010002
+
+#ifdef _WIN32
+  typedef   signed char   int8_t;
+  typedef unsigned char  uint8_t;
+  typedef   signed short  int16_t;
+  typedef unsigned short uint16_t;
+  typedef   signed int    int32_t;
+  typedef unsigned int   uint32_t;
+  #if __GNUC__
+    typedef   signed long long int64_t;
+    typedef unsigned long long uint64_t;
+  #else /* _MSC_VER || __BORLANDC__ */
+    typedef   signed __int64   int64_t;
+    typedef unsigned __int64   uint64_t;
+  #endif
+  #ifdef _WIN64
+    #define ECB_PTRSIZE 8
+    typedef uint64_t uintptr_t;
+    typedef  int64_t  intptr_t;
+  #else
+    #define ECB_PTRSIZE 4
+    typedef uint32_t uintptr_t;
+    typedef  int32_t  intptr_t;
+  #endif
+#else
+  #include <inttypes.h>
+  #if UINTMAX_MAX > 0xffffffffU
+    #define ECB_PTRSIZE 8
+  #else
+    #define ECB_PTRSIZE 4
+  #endif
+#endif
+
+/* many compilers define _GNUC_ to some versions but then only implement
+ * what their idiot authors think are the "more important" extensions,
+ * causing enormous grief in return for some better fake benchmark numbers.
+ * or so.
+ * we try to detect these and simply assume they are not gcc - if they have
+ * an issue with that they should have done it right in the first place.
+ */
+#ifndef ECB_GCC_VERSION
+  #if !defined __GNUC_MINOR__ || defined __INTEL_COMPILER || defined __SUNPRO_C || defined __SUNPRO_CC || defined __llvm__ || defined __clang__
+    #define ECB_GCC_VERSION(major,minor) 0
+  #else
+    #define ECB_GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
+  #endif
+#endif
+
+#define ECB_C     (__STDC__+0) /* this assumes that __STDC__ is either empty or a number */
+#define ECB_C99   (__STDC_VERSION__ >= 199901L)
+#define ECB_C11   (__STDC_VERSION__ >= 201112L)
+#define ECB_CPP   (__cplusplus+0)
+#define ECB_CPP11 (__cplusplus >= 201103L)
+
+#if ECB_CPP
+  #define ECB_EXTERN_C extern "C"
+  #define ECB_EXTERN_C_BEG ECB_EXTERN_C {
+  #define ECB_EXTERN_C_END }
+#else
+  #define ECB_EXTERN_C extern
+  #define ECB_EXTERN_C_BEG
+  #define ECB_EXTERN_C_END
+#endif
+
+/*****************************************************************************/
+
+/* ECB_NO_THREADS - ecb is not used by multiple threads, ever */
+/* ECB_NO_SMP     - ecb might be used in multiple threads, but only on a single cpu */
+
+#if ECB_NO_THREADS
+  #define ECB_NO_SMP 1
+#endif
+
+#if ECB_NO_SMP
+  #define ECB_MEMORY_FENCE do { } while (0)
+#endif
+
+#ifndef ECB_MEMORY_FENCE
+  #if ECB_GCC_VERSION(2,5) || defined __INTEL_COMPILER || (__llvm__ && __GNUC__) || __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110
+    #if __i386 || __i386__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("lock; orb $0, -1(%%esp)" : : : "memory")
+      #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ (""                        : : : "memory")
+      #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("")
+    #elif __amd64 || __amd64__ || __x86_64 || __x86_64__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("mfence"   : : : "memory")
+      #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ (""         : : : "memory")
+      #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("")
+    #elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("sync"     : : : "memory")
+    #elif defined __ARM_ARCH_6__  || defined __ARM_ARCH_6J__  \
+       || defined __ARM_ARCH_6K__ || defined __ARM_ARCH_6ZK__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("mcr p15,0,%0,c7,c10,5" : : "r" (0) : "memory")
+    #elif defined __ARM_ARCH_7__  || defined __ARM_ARCH_7A__  \
+       || defined __ARM_ARCH_7M__ || defined __ARM_ARCH_7R__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("dmb"      : : : "memory")
+    #elif __sparc || __sparc__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("membar #LoadStore | #LoadLoad | #StoreStore | #StoreLoad" : : : "memory")
+      #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad"                            : : : "memory")
+      #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("membar #LoadStore             | #StoreStore")
+    #elif defined __s390__ || defined __s390x__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("bcr 15,0" : : : "memory")
+    #elif defined __mips__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("sync"     : : : "memory")
+    #elif defined __alpha__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("mb"       : : : "memory")
+    #elif defined __hppa__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ (""         : : : "memory")
+      #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("")
+    #elif defined __ia64__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("mf"       : : : "memory")
+    #endif
+  #endif
+#endif
+
+#ifndef ECB_MEMORY_FENCE
+  #if ECB_GCC_VERSION(4,7)
+    /* see comment below (stdatomic.h) about the C11 memory model. */
+    #define ECB_MEMORY_FENCE         __atomic_thread_fence (__ATOMIC_SEQ_CST)
+
+  /* The __has_feature syntax from clang is so misdesigned that we cannot use it
+   * without risking compile time errors with other compilers. We *could*
+   * define our own ecb_clang_has_feature, but I just can't be bothered to work
+   * around this shit time and again.
+   * #elif defined __clang && __has_feature (cxx_atomic)
+   *   // see comment below (stdatomic.h) about the C11 memory model.
+   *   #define ECB_MEMORY_FENCE         __c11_atomic_thread_fence (__ATOMIC_SEQ_CST)
+   */
+
+  #elif ECB_GCC_VERSION(4,4) || defined __INTEL_COMPILER || defined __clang__
+    #define ECB_MEMORY_FENCE         __sync_synchronize ()
+  #elif _MSC_VER >= 1400 /* VC++ 2005 */
+    #pragma intrinsic(_ReadBarrier,_WriteBarrier,_ReadWriteBarrier)
+    #define ECB_MEMORY_FENCE         _ReadWriteBarrier ()
+    #define ECB_MEMORY_FENCE_ACQUIRE _ReadWriteBarrier () /* according to msdn, _ReadBarrier is not a load fence */
+    #define ECB_MEMORY_FENCE_RELEASE _WriteBarrier ()
+  #elif defined _WIN32
+    #include <WinNT.h>
+    #define ECB_MEMORY_FENCE         MemoryBarrier () /* actually just xchg on x86... scary */
+  #elif __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110
+    #include <mbarrier.h>
+    #define ECB_MEMORY_FENCE         __machine_rw_barrier ()
+    #define ECB_MEMORY_FENCE_ACQUIRE __machine_r_barrier  ()
+    #define ECB_MEMORY_FENCE_RELEASE __machine_w_barrier  ()
+  #elif __xlC__
+    #define ECB_MEMORY_FENCE         __sync ()
+  #endif
+#endif
+
+#ifndef ECB_MEMORY_FENCE
+  #if ECB_C11 && !defined __STDC_NO_ATOMICS__
+    /* we assume that these memory fences work on all variables/all memory accesses, */
+    /* not just C11 atomics and atomic accesses */
+    #include <stdatomic.h>
+    /* Unfortunately, neither gcc 4.7 nor clang 3.1 generate any instructions for */
+    /* any fence other than seq_cst, which isn't very efficient for us. */
+    /* Why that is, we don't know - either the C11 memory model is quite useless */
+    /* for most usages, or gcc and clang have a bug */
+    /* I *currently* lean towards the latter, and inefficiently implement */
+    /* all three of ecb's fences as a seq_cst fence */
+    #define ECB_MEMORY_FENCE         atomic_thread_fence (memory_order_seq_cst)
+  #endif
+#endif
+
+#ifndef ECB_MEMORY_FENCE
+  #if !ECB_AVOID_PTHREADS
+    /*
+     * if you get undefined symbol references to pthread_mutex_lock,
+     * or failure to find pthread.h, then you should implement
+     * the ECB_MEMORY_FENCE operations for your cpu/compiler
+     * OR provide pthread.h and link against the posix thread library
+     * of your system.
+     */
+    #include <pthread.h>
+    #define ECB_NEEDS_PTHREADS 1
+    #define ECB_MEMORY_FENCE_NEEDS_PTHREADS 1
+
+    static pthread_mutex_t ecb_mf_lock = PTHREAD_MUTEX_INITIALIZER;
+    #define ECB_MEMORY_FENCE do { pthread_mutex_lock (&ecb_mf_lock); pthread_mutex_unlock (&ecb_mf_lock); } while (0)
+  #endif
+#endif
+
+#if !defined ECB_MEMORY_FENCE_ACQUIRE && defined ECB_MEMORY_FENCE
+  #define ECB_MEMORY_FENCE_ACQUIRE ECB_MEMORY_FENCE
+#endif
+
+#if !defined ECB_MEMORY_FENCE_RELEASE && defined ECB_MEMORY_FENCE
+  #define ECB_MEMORY_FENCE_RELEASE ECB_MEMORY_FENCE
+#endif
+
+/*****************************************************************************/
+
+#if __cplusplus
+  #define ecb_inline static inline
+#elif ECB_GCC_VERSION(2,5)
+  #define ecb_inline static __inline__
+#elif ECB_C99
+  #define ecb_inline static inline
+#else
+  #define ecb_inline static
+#endif
+
+#if ECB_GCC_VERSION(3,3)
+  #define ecb_restrict __restrict__
+#elif ECB_C99
+  #define ecb_restrict restrict
+#else
+  #define ecb_restrict
+#endif
+
+typedef int ecb_bool;
+
+#define ECB_CONCAT_(a, b) a ## b
+#define ECB_CONCAT(a, b) ECB_CONCAT_(a, b)
+#define ECB_STRINGIFY_(a) # a
+#define ECB_STRINGIFY(a) ECB_STRINGIFY_(a)
+
+#define ecb_function_ ecb_inline
+
+#if ECB_GCC_VERSION(3,1)
+  #define ecb_attribute(attrlist)        __attribute__(attrlist)
+  #define ecb_is_constant(expr)          __builtin_constant_p (expr)
+  #define ecb_expect(expr,value)         __builtin_expect ((expr),(value))
+  #define ecb_prefetch(addr,rw,locality) __builtin_prefetch (addr, rw, locality)
+#else
+  #define ecb_attribute(attrlist)
+  #define ecb_is_constant(expr)          0
+  #define ecb_expect(expr,value)         (expr)
+  #define ecb_prefetch(addr,rw,locality)
+#endif
+
+/* no emulation for ecb_decltype */
+#if ECB_GCC_VERSION(4,5)
+  #define ecb_decltype(x) __decltype(x)
+#elif ECB_GCC_VERSION(3,0)
+  #define ecb_decltype(x) __typeof(x)
+#endif
+
+#define ecb_noinline   ecb_attribute ((__noinline__))
+#define ecb_unused     ecb_attribute ((__unused__))
+#define ecb_const      ecb_attribute ((__const__))
+#define ecb_pure       ecb_attribute ((__pure__))
+
+#if ECB_C11
+  #define ecb_noreturn   _Noreturn
+#else
+  #define ecb_noreturn   ecb_attribute ((__noreturn__))
+#endif
+
+#if ECB_GCC_VERSION(4,3)
+  #define ecb_artificial ecb_attribute ((__artificial__))
+  #define ecb_hot        ecb_attribute ((__hot__))
+  #define ecb_cold       ecb_attribute ((__cold__))
+#else
+  #define ecb_artificial
+  #define ecb_hot
+  #define ecb_cold
+#endif
+
+/* put around conditional expressions if you are very sure that the  */
+/* expression is mostly true or mostly false. note that these return */
+/* booleans, not the expression.                                     */
+#define ecb_expect_false(expr) ecb_expect (!!(expr), 0)
+#define ecb_expect_true(expr)  ecb_expect (!!(expr), 1)
+/* for compatibility to the rest of the world */
+#define ecb_likely(expr)   ecb_expect_true  (expr)
+#define ecb_unlikely(expr) ecb_expect_false (expr)
+
+/* count trailing zero bits and count # of one bits */
+#if ECB_GCC_VERSION(3,4)
+  /* we assume int == 32 bit, long == 32 or 64 bit and long long == 64 bit */
+  #define ecb_ld32(x)      (__builtin_clz      (x) ^ 31)
+  #define ecb_ld64(x)      (__builtin_clzll    (x) ^ 63)
+  #define ecb_ctz32(x)      __builtin_ctz      (x)
+  #define ecb_ctz64(x)      __builtin_ctzll    (x)
+  #define ecb_popcount32(x) __builtin_popcount (x)
+  /* no popcountll */
+#else
+  ecb_function_ int ecb_ctz32 (uint32_t x) ecb_const;
+  ecb_function_ int
+  ecb_ctz32 (uint32_t x)
+  {
+    int r = 0;
+
+    x &= ~x + 1; /* this isolates the lowest bit */
+
+#if ECB_branchless_on_i386
+    r += !!(x & 0xaaaaaaaa) << 0;
+    r += !!(x & 0xcccccccc) << 1;
+    r += !!(x & 0xf0f0f0f0) << 2;
+    r += !!(x & 0xff00ff00) << 3;
+    r += !!(x & 0xffff0000) << 4;
+#else
+    if (x & 0xaaaaaaaa) r +=  1;
+    if (x & 0xcccccccc) r +=  2;
+    if (x & 0xf0f0f0f0) r +=  4;
+    if (x & 0xff00ff00) r +=  8;
+    if (x & 0xffff0000) r += 16;
+#endif
+
+    return r;
+  }
+
+  ecb_function_ int ecb_ctz64 (uint64_t x) ecb_const;
+  ecb_function_ int
+  ecb_ctz64 (uint64_t x)
+  {
+    int shift = x & 0xffffffffU ? 0 : 32;
+    return ecb_ctz32 (x >> shift) + shift;
+  }
+
+  ecb_function_ int ecb_popcount32 (uint32_t x) ecb_const;
+  ecb_function_ int
+  ecb_popcount32 (uint32_t x)
+  {
+    x -=  (x >> 1) & 0x55555555;
+    x  = ((x >> 2) & 0x33333333) + (x & 0x33333333);
+    x  = ((x >> 4) + x) & 0x0f0f0f0f;
+    x *= 0x01010101;
+
+    return x >> 24;
+  }
+
+  ecb_function_ int ecb_ld32 (uint32_t x) ecb_const;
+  ecb_function_ int ecb_ld32 (uint32_t x)
+  {
+    int r = 0;
+
+    if (x >> 16) { x >>= 16; r += 16; }
+    if (x >>  8) { x >>=  8; r +=  8; }
+    if (x >>  4) { x >>=  4; r +=  4; }
+    if (x >>  2) { x >>=  2; r +=  2; }
+    if (x >>  1) {           r +=  1; }
+
+    return r;
+  }
+
+  ecb_function_ int ecb_ld64 (uint64_t x) ecb_const;
+  ecb_function_ int ecb_ld64 (uint64_t x)
+  {
+    int r = 0;
+
+    if (x >> 32) { x >>= 32; r += 32; }
+
+    return r + ecb_ld32 (x);
+  }
+#endif
+
+ecb_function_ ecb_bool ecb_is_pot32 (uint32_t x) ecb_const;
+ecb_function_ ecb_bool ecb_is_pot32 (uint32_t x) { return !(x & (x - 1)); }
+ecb_function_ ecb_bool ecb_is_pot64 (uint64_t x) ecb_const;
+ecb_function_ ecb_bool ecb_is_pot64 (uint64_t x) { return !(x & (x - 1)); }
+
+ecb_function_ uint8_t  ecb_bitrev8  (uint8_t  x) ecb_const;
+ecb_function_ uint8_t  ecb_bitrev8  (uint8_t  x)
+{
+  return (  (x * 0x0802U & 0x22110U)
+          | (x * 0x8020U & 0x88440U)) * 0x10101U >> 16; 
+}
+
+ecb_function_ uint16_t ecb_bitrev16 (uint16_t x) ecb_const;
+ecb_function_ uint16_t ecb_bitrev16 (uint16_t x)
+{
+  x = ((x >>  1) &     0x5555) | ((x &     0x5555) <<  1);
+  x = ((x >>  2) &     0x3333) | ((x &     0x3333) <<  2);
+  x = ((x >>  4) &     0x0f0f) | ((x &     0x0f0f) <<  4);
+  x = ( x >>  8              ) | ( x               <<  8);
+
+  return x;
+}
+
+ecb_function_ uint32_t ecb_bitrev32 (uint32_t x) ecb_const;
+ecb_function_ uint32_t ecb_bitrev32 (uint32_t x)
+{
+  x = ((x >>  1) & 0x55555555) | ((x & 0x55555555) <<  1);
+  x = ((x >>  2) & 0x33333333) | ((x & 0x33333333) <<  2);
+  x = ((x >>  4) & 0x0f0f0f0f) | ((x & 0x0f0f0f0f) <<  4);
+  x = ((x >>  8) & 0x00ff00ff) | ((x & 0x00ff00ff) <<  8);
+  x = ( x >> 16              ) | ( x               << 16);
+
+  return x;
+}
+
+/* popcount64 is only available on 64 bit cpus as gcc builtin */
+/* so for this version we are lazy */
+ecb_function_ int ecb_popcount64 (uint64_t x) ecb_const;
+ecb_function_ int
+ecb_popcount64 (uint64_t x)
+{
+  return ecb_popcount32 (x) + ecb_popcount32 (x >> 32);
+}
+
+ecb_inline uint8_t  ecb_rotl8  (uint8_t  x, unsigned int count) ecb_const;
+ecb_inline uint8_t  ecb_rotr8  (uint8_t  x, unsigned int count) ecb_const;
+ecb_inline uint16_t ecb_rotl16 (uint16_t x, unsigned int count) ecb_const;
+ecb_inline uint16_t ecb_rotr16 (uint16_t x, unsigned int count) ecb_const;
+ecb_inline uint32_t ecb_rotl32 (uint32_t x, unsigned int count) ecb_const;
+ecb_inline uint32_t ecb_rotr32 (uint32_t x, unsigned int count) ecb_const;
+ecb_inline uint64_t ecb_rotl64 (uint64_t x, unsigned int count) ecb_const;
+ecb_inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) ecb_const;
+
+ecb_inline uint8_t  ecb_rotl8  (uint8_t  x, unsigned int count) { return (x >> ( 8 - count)) | (x << count); }
+ecb_inline uint8_t  ecb_rotr8  (uint8_t  x, unsigned int count) { return (x << ( 8 - count)) | (x >> count); }
+ecb_inline uint16_t ecb_rotl16 (uint16_t x, unsigned int count) { return (x >> (16 - count)) | (x << count); }
+ecb_inline uint16_t ecb_rotr16 (uint16_t x, unsigned int count) { return (x << (16 - count)) | (x >> count); }
+ecb_inline uint32_t ecb_rotl32 (uint32_t x, unsigned int count) { return (x >> (32 - count)) | (x << count); }
+ecb_inline uint32_t ecb_rotr32 (uint32_t x, unsigned int count) { return (x << (32 - count)) | (x >> count); }
+ecb_inline uint64_t ecb_rotl64 (uint64_t x, unsigned int count) { return (x >> (64 - count)) | (x << count); }
+ecb_inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) { return (x << (64 - count)) | (x >> count); }
+
+#if ECB_GCC_VERSION(4,3)
+  #define ecb_bswap16(x) (__builtin_bswap32 (x) >> 16)
+  #define ecb_bswap32(x)  __builtin_bswap32 (x)
+  #define ecb_bswap64(x)  __builtin_bswap64 (x)
+#else
+  ecb_function_ uint16_t ecb_bswap16 (uint16_t x) ecb_const;
+  ecb_function_ uint16_t
+  ecb_bswap16 (uint16_t x)
+  {
+    return ecb_rotl16 (x, 8);
+  }
+
+  ecb_function_ uint32_t ecb_bswap32 (uint32_t x) ecb_const;
+  ecb_function_ uint32_t
+  ecb_bswap32 (uint32_t x)
+  {
+    return (((uint32_t)ecb_bswap16 (x)) << 16) | ecb_bswap16 (x >> 16);
+  }
+
+  ecb_function_ uint64_t ecb_bswap64 (uint64_t x) ecb_const;
+  ecb_function_ uint64_t
+  ecb_bswap64 (uint64_t x)
+  {
+    return (((uint64_t)ecb_bswap32 (x)) << 32) | ecb_bswap32 (x >> 32);
+  }
+#endif
+
+#if ECB_GCC_VERSION(4,5)
+  #define ecb_unreachable() __builtin_unreachable ()
+#else
+  /* this seems to work fine, but gcc always emits a warning for it :/ */
+  ecb_inline void ecb_unreachable (void) ecb_noreturn;
+  ecb_inline void ecb_unreachable (void) { }
+#endif
+
+/* try to tell the compiler that some condition is definitely true */
+#define ecb_assume(cond) if (!(cond)) ecb_unreachable (); else 0
+
+ecb_inline unsigned char ecb_byteorder_helper (void) ecb_const;
+ecb_inline unsigned char
+ecb_byteorder_helper (void)
+{
+  /* the union code still generates code under pressure in gcc, */
+  /* but less than using pointers, and always seems to */
+  /* successfully return a constant. */
+  /* the reason why we have this horrible preprocessor mess */
+  /* is to avoid it in all cases, at least on common architectures */
+  /* or when using a recent enough gcc version (>= 4.6) */
+#if __i386 || __i386__ || _M_X86 || __amd64 || __amd64__ || _M_X64
+  return 0x44;
+#elif __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+  return 0x44;
+#elif __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+  return 0x11;
+#else
+  union
+  {
+    uint32_t i;
+    uint8_t c;
+  } u = { 0x11223344 };
+  return u.c;
+#endif
+}
+
+ecb_inline ecb_bool ecb_big_endian    (void) ecb_const;
+ecb_inline ecb_bool ecb_big_endian    (void) { return ecb_byteorder_helper () == 0x11; }
+ecb_inline ecb_bool ecb_little_endian (void) ecb_const;
+ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () == 0x44; }
+
+#if ECB_GCC_VERSION(3,0) || ECB_C99
+  #define ecb_mod(m,n) ((m) % (n) + ((m) % (n) < 0 ? (n) : 0))
+#else
+  #define ecb_mod(m,n) ((m) < 0 ? ((n) - 1 - ((-1 - (m)) % (n))) : ((m) % (n)))
+#endif
+
+#if __cplusplus
+  template<typename T>
+  static inline T ecb_div_rd (T val, T div)
+  {
+    return val < 0 ? - ((-val + div - 1) / div) : (val          ) / div;
+  }
+  template<typename T>
+  static inline T ecb_div_ru (T val, T div)
+  {
+    return val < 0 ? - ((-val          ) / div) : (val + div - 1) / div;
+  }
+#else
+  #define ecb_div_rd(val,div) ((val) < 0 ? - ((-(val) + (div) - 1) / (div)) : ((val)            ) / (div))
+  #define ecb_div_ru(val,div) ((val) < 0 ? - ((-(val)            ) / (div)) : ((val) + (div) - 1) / (div))
+#endif
+
+#if ecb_cplusplus_does_not_suck
+  /* does not work for local types (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm) */
+  template<typename T, int N>
+  static inline int ecb_array_length (const T (&arr)[N])
+  {
+    return N;
+  }
+#else
+  #define ecb_array_length(name) (sizeof (name) / sizeof (name [0]))
+#endif
+
+/*******************************************************************************/
+/* floating point stuff, can be disabled by defining ECB_NO_LIBM */
+
+/* basically, everything uses "ieee pure-endian" floating point numbers */
+/* the only noteworthy exception is ancient armle, which uses order 43218765 */
+#if 0 \
+    || __i386 || __i386__ \
+    || __amd64 || __amd64__ || __x86_64 || __x86_64__ \
+    || __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \
+    || defined __arm__ && defined __ARM_EABI__ \
+    || defined __s390__ || defined __s390x__ \
+    || defined __mips__ \
+    || defined __alpha__ \
+    || defined __hppa__ \
+    || defined __ia64__ \
+    || defined _M_IX86 || defined _M_AMD64 || defined _M_IA64
+  #define ECB_STDFP 1
+  #include <string.h> /* for memcpy */
+#else
+  #define ECB_STDFP 0
+  #include <math.h> /* for frexp*, ldexp* */
+#endif
+
+#ifndef ECB_NO_LIBM
+
+  /* convert a float to ieee single/binary32 */
+  ecb_function_ uint32_t ecb_float_to_binary32 (float x) ecb_const;
+  ecb_function_ uint32_t
+  ecb_float_to_binary32 (float x)
+  {
+    uint32_t r;
+
+    #if ECB_STDFP
+      memcpy (&r, &x, 4);
+    #else
+      /* slow emulation, works for anything but -0 */
+      uint32_t m;
+      int e;
+
+      if (x == 0e0f                    ) return 0x00000000U;
+      if (x > +3.40282346638528860e+38f) return 0x7f800000U;
+      if (x < -3.40282346638528860e+38f) return 0xff800000U;
+      if (x != x                       ) return 0x7fbfffffU;
+
+      m = frexpf (x, &e) * 0x1000000U;
+
+      r = m & 0x80000000U;
+
+      if (r)
+        m = -m;
+
+      if (e <= -126)
+        {
+          m &= 0xffffffU;
+          m >>= (-125 - e);
+          e = -126;
+        }
+
+      r |= (e + 126) << 23;
+      r |= m & 0x7fffffU;
+    #endif
+
+    return r;
+  }
+
+  /* converts an ieee single/binary32 to a float */
+  ecb_function_ float ecb_binary32_to_float (uint32_t x) ecb_const;
+  ecb_function_ float
+  ecb_binary32_to_float (uint32_t x)
+  {
+    float r;
+
+    #if ECB_STDFP
+      memcpy (&r, &x, 4);
+    #else
+      /* emulation, only works for normals and subnormals and +0 */
+      int neg = x >> 31;
+      int e = (x >> 23) & 0xffU;
+
+      x &= 0x7fffffU;
+
+      if (e)
+        x |= 0x800000U;
+      else
+        e = 1;
+
+      /* we distrust ldexpf a bit and do the 2**-24 scaling by an extra multiply */
+      r = ldexpf (x * (0.5f / 0x800000U), e - 126);
+
+      r = neg ? -r : r;
+    #endif
+
+    return r;
+  }
+
+  /* convert a double to ieee double/binary64 */
+  ecb_function_ uint64_t ecb_double_to_binary64 (double x) ecb_const;
+  ecb_function_ uint64_t
+  ecb_double_to_binary64 (double x)
+  {
+    uint64_t r;
+
+    #if ECB_STDFP
+      memcpy (&r, &x, 8);
+    #else
+      /* slow emulation, works for anything but -0 */
+      uint64_t m;
+      int e;
+
+      if (x == 0e0                     ) return 0x0000000000000000U;
+      if (x > +1.79769313486231470e+308) return 0x7ff0000000000000U;
+      if (x < -1.79769313486231470e+308) return 0xfff0000000000000U;
+      if (x != x                       ) return 0X7ff7ffffffffffffU;
+
+      m = frexp (x, &e) * 0x20000000000000U;
+
+      r = m & 0x8000000000000000;;
+
+      if (r)
+        m = -m;
+
+      if (e <= -1022)
+        {
+          m &= 0x1fffffffffffffU;
+          m >>= (-1021 - e);
+          e = -1022;
+        }
+
+      r |= ((uint64_t)(e + 1022)) << 52;
+      r |= m & 0xfffffffffffffU;
+    #endif
+
+    return r;
+  }
+
+  /* converts an ieee double/binary64 to a double */
+  ecb_function_ double ecb_binary64_to_double (uint64_t x) ecb_const;
+  ecb_function_ double
+  ecb_binary64_to_double (uint64_t x)
+  {
+    double r;
+
+    #if ECB_STDFP
+      memcpy (&r, &x, 8);
+    #else
+      /* emulation, only works for normals and subnormals and +0 */
+      int neg = x >> 63;
+      int e = (x >> 52) & 0x7ffU;
+
+      x &= 0xfffffffffffffU;
+
+      if (e)
+        x |= 0x10000000000000U;
+      else
+        e = 1;
+
+      /* we distrust ldexp a bit and do the 2**-53 scaling by an extra multiply */
+      r = ldexp (x * (0.5 / 0x10000000000000U), e - 1022);
+
+      r = neg ? -r : r;
+    #endif
+
+    return r;
+  }
+
+#endif
+
+#endif
+
diff --git a/ext/libeio/eio.c b/ext/libeio/eio.c
new file mode 100644
index 0000000..f219c33
--- /dev/null
+++ b/ext/libeio/eio.c
@@ -0,0 +1,2801 @@
+/*
+ * libeio implementation
+ *
+ * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann <libeio at schmorp.de>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, are permitted provided that the following conditions are met:
+ * 
+ *   1.  Redistributions of source code must retain the above copyright notice,
+ *       this list of conditions and the following disclaimer.
+ * 
+ *   2.  Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
+ * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
+ * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
+ * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * the GNU General Public License ("GPL") version 2 or any later version,
+ * in which case the provisions of the GPL are applicable instead of
+ * the above. If you wish to allow the use of your version of this file
+ * only under the terms of the GPL and not to allow others to use your
+ * version of this file under the BSD license, indicate your decision
+ * by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL. If you do not delete the
+ * provisions above, a recipient may use your version of this file under
+ * either the BSD or the GPL.
+ */
+
+#ifndef _WIN32
+# include "config.h"
+#endif
+
+#include "eio.h"
+#include "ecb.h"
+
+#ifdef EIO_STACKSIZE
+# define X_STACKSIZE EIO_STACKSIZE
+#endif
+#include "xthread.h"
+
+#include <errno.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <limits.h>
+#include <fcntl.h>
+#include <assert.h>
+
+/* intptr_t comes from unistd.h, says POSIX/UNIX/tradition */
+/* intptr_t only comes from stdint.h, says idiot openbsd coder */
+#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#ifndef ECANCELED
+# define ECANCELED EDOM
+#endif
+#ifndef ELOOP
+# define ELOOP EDOM
+#endif
+
+#if !defined(ENOTSOCK) && defined(WSAENOTSOCK)
+# define ENOTSOCK WSAENOTSOCK
+#endif
+
+static void eio_destroy (eio_req *req);
+
+#ifndef EIO_FINISH
+# define EIO_FINISH(req)  ((req)->finish) && !EIO_CANCELLED (req) ? (req)->finish (req) : 0
+#endif
+
+#ifndef EIO_DESTROY
+# define EIO_DESTROY(req) do { if ((req)->destroy) (req)->destroy (req); } while (0)
+#endif
+
+#ifndef EIO_FEED
+# define EIO_FEED(req)    do { if ((req)->feed   ) (req)->feed    (req); } while (0)
+#endif
+
+#ifndef EIO_FD_TO_WIN32_HANDLE
+# define EIO_FD_TO_WIN32_HANDLE(fd) _get_osfhandle (fd)
+#endif
+#ifndef EIO_WIN32_HANDLE_TO_FD
+# define EIO_WIN32_HANDLE_TO_FD(handle) _open_osfhandle (handle, 0)
+#endif
+
+#define EIO_ERRNO(errval,retval) ((errno = errval), retval)
+
+#define EIO_ENOSYS() EIO_ERRNO (ENOSYS, -1)
+
+#ifdef _WIN32
+
+  #undef PAGESIZE
+  #define PAGESIZE 4096 /* GetSystemInfo? */
+
+  /* TODO: look at how perl does stat (non-sloppy), unlink (ro-files), utime, link */
+
+  #ifdef EIO_STRUCT_STATI64
+    /* look at perl's non-sloppy stat */
+    #define stat(path,buf)       _stati64 (path,buf)
+    #define fstat(fd,buf)        _fstati64 (fd,buf)
+  #endif
+  #define lstat(path,buf)      stat (path,buf)
+  #define fsync(fd)            (FlushFileBuffers ((HANDLE)EIO_FD_TO_WIN32_HANDLE (fd)) ? 0 : EIO_ERRNO (EBADF, -1))
+  #define mkdir(path,mode)     _mkdir (path)
+  #define link(old,neu)        (CreateHardLink (neu, old, 0) ? 0 : EIO_ERRNO (ENOENT, -1))
+
+  #define chmod(path,mode)     _chmod (path, mode)
+  #define dup(fd)              _dup (fd)
+  #define dup2(fd1,fd2)        _dup2 (fd1, fd2)
+
+  #define fchmod(fd,mode)      EIO_ENOSYS ()
+  #define chown(path,uid,gid)  EIO_ENOSYS ()
+  #define fchown(fd,uid,gid)   EIO_ENOSYS ()
+  #define truncate(path,offs)  EIO_ENOSYS () /* far-miss: SetEndOfFile */
+  #define ftruncate(fd,offs)   EIO_ENOSYS () /* near-miss: SetEndOfFile */
+  #define mknod(path,mode,dev) EIO_ENOSYS ()
+  #define sync()               EIO_ENOSYS ()
+  #define readlink(path,buf,s) EIO_ENOSYS ()
+  #define statvfs(path,buf)    EIO_ENOSYS ()
+  #define fstatvfs(fd,buf)     EIO_ENOSYS ()
+
+  #define pread(fd,buf,count,offset)  eio__pread  (fd, buf, count, offset)
+  #define pwrite(fd,buf,count,offset) eio__pwrite (fd, buf, count, offset)
+
+  #if __GNUC__
+    typedef long long eio_off_t; /* signed for compatibility to msvc */
+  #else
+    typedef __int64   eio_off_t; /* unsigned not supported by msvc */
+  #endif
+
+  static eio_ssize_t
+  eio__pread (int fd, void *buf, eio_ssize_t count, eio_off_t offset)
+  {
+    OVERLAPPED o = { 0 };
+    DWORD got;
+
+    o.Offset     = offset;
+    o.OffsetHigh = offset >> 32;
+
+    return ReadFile ((HANDLE)EIO_FD_TO_WIN32_HANDLE (fd), buf, count, &got, &o)
+         ? got : -1;
+  }
+
+  static eio_ssize_t
+  eio__pwrite (int fd, void *buf, eio_ssize_t count, eio_off_t offset)
+  {
+    OVERLAPPED o = { 0 };
+    DWORD got;
+
+    o.Offset     = offset;
+    o.OffsetHigh = offset >> 32;
+
+    return WriteFile ((HANDLE)EIO_FD_TO_WIN32_HANDLE (fd), buf, count, &got, &o)
+         ? got : -1;
+  }
+
+  /* rename() uses MoveFile, which fails to overwrite */
+  #define rename(old,neu)      eio__rename (old, neu)
+
+  static int
+  eio__rename (const char *old, const char *neu)
+  {
+    if (MoveFileEx (old, neu, MOVEFILE_REPLACE_EXISTING))
+      return 0;
+
+    /* should steal _dosmaperr */
+    switch (GetLastError ())
+      {
+        case ERROR_FILE_NOT_FOUND:
+        case ERROR_PATH_NOT_FOUND:
+        case ERROR_INVALID_DRIVE:
+        case ERROR_NO_MORE_FILES:
+        case ERROR_BAD_NETPATH:
+        case ERROR_BAD_NET_NAME:
+        case ERROR_BAD_PATHNAME:
+        case ERROR_FILENAME_EXCED_RANGE:
+          errno = ENOENT;
+          break;
+
+        default:
+          errno = EACCES;
+          break;
+      }
+
+    return -1;
+  }
+
+  /* we could even stat and see if it exists */
+  static int
+  symlink (const char *old, const char *neu)
+  {
+    #if WINVER >= 0x0600
+      if (CreateSymbolicLink (neu, old, 1))
+        return 0;
+
+      if (CreateSymbolicLink (neu, old, 0))
+        return 0;
+    #endif
+
+    return EIO_ERRNO (ENOENT, -1);
+  }
+
+  /* POSIX API only */
+  #define CreateHardLink(neu,old,flags) 0
+  #define CreateSymbolicLink(neu,old,flags) 0
+
+  struct statvfs
+  {
+    int dummy;
+  };
+
+  #define DT_DIR EIO_DT_DIR
+  #define DT_REG EIO_DT_REG
+  #define D_NAME(entp) entp.cFileName
+  #define D_TYPE(entp) (entp.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ? DT_DIR : DT_REG)
+
+#else
+
+  #include <sys/time.h>
+  #include <sys/select.h>
+  #include <sys/statvfs.h>
+  #include <unistd.h>
+  #include <signal.h>
+  #include <dirent.h>
+
+  #if _POSIX_MEMLOCK || _POSIX_MEMLOCK_RANGE || _POSIX_MAPPED_FILES
+    #include <sys/mman.h>
+  #endif
+
+  #define D_NAME(entp) entp->d_name
+
+  /* POSIX_SOURCE is useless on bsd's, and XOPEN_SOURCE is unreliable there, too */
+  #if __FreeBSD__ || __NetBSD__ || __OpenBSD__
+    #define _DIRENT_HAVE_D_TYPE /* sigh */
+    #define D_INO(de) (de)->d_fileno
+    #define D_NAMLEN(de) (de)->d_namlen
+  #elif __linux || defined d_ino || _XOPEN_SOURCE >= 600
+    #define D_INO(de) (de)->d_ino
+  #endif
+
+  #ifdef _D_EXACT_NAMLEN
+    #undef D_NAMLEN
+    #define D_NAMLEN(de) _D_EXACT_NAMLEN (de)
+  #endif
+
+  #ifdef _DIRENT_HAVE_D_TYPE
+    #define D_TYPE(de) (de)->d_type
+  #endif
+
+  #ifndef EIO_STRUCT_DIRENT
+    #define EIO_STRUCT_DIRENT struct dirent
+  #endif
+
+#endif
+
+#if HAVE_UTIMES
+# include <utime.h>
+#endif
+
+#if HAVE_SYS_SYSCALL_H
+# include <sys/syscall.h>
+#endif
+
+#if HAVE_SYS_PRCTL_H
+# include <sys/prctl.h>
+#endif
+
+#if HAVE_SENDFILE
+# if __linux
+#  include <sys/sendfile.h>
+# elif __FreeBSD__ || defined __APPLE__
+#  include <sys/socket.h>
+#  include <sys/uio.h>
+# elif __hpux
+#  include <sys/socket.h>
+# elif __solaris
+#  include <sys/sendfile.h>
+# else
+#  error sendfile support requested but not available
+# endif
+#endif
+
+#ifndef D_TYPE
+# define D_TYPE(de) 0
+#endif
+#ifndef D_INO
+# define D_INO(de) 0
+#endif
+#ifndef D_NAMLEN
+# define D_NAMLEN(entp) strlen (D_NAME (entp))
+#endif
+
+/* used for struct dirent, AIX doesn't provide it */
+#ifndef NAME_MAX
+# define NAME_MAX 4096
+#endif
+
+/* used for readlink etc. */
+#ifndef PATH_MAX
+# define PATH_MAX 4096
+#endif
+
+/* buffer size for various temporary buffers */
+#define EIO_BUFSIZE 65536
+
+#define dBUF	 				\
+  char *eio_buf = malloc (EIO_BUFSIZE);		\
+  errno = ENOMEM;				\
+  if (!eio_buf)					\
+    return -1
+
+#define FUBd					\
+  free (eio_buf)
+
+#define EIO_TICKS ((1000000 + 1023) >> 10)
+
+/*****************************************************************************/
+
+struct tmpbuf
+{
+  void *ptr;
+  int len;
+};
+
+static void *
+tmpbuf_get (struct tmpbuf *buf, int len)
+{
+  if (buf->len < len)
+    {
+      free (buf->ptr);
+      buf->ptr = malloc (buf->len = len);
+    }
+
+  return buf->ptr;
+}
+
+struct tmpbuf;
+
+#if _POSIX_VERSION >= 200809L
+  #define HAVE_AT 1
+  #define WD2FD(wd) ((wd) ? (wd)->fd : AT_FDCWD)
+  #ifndef O_SEARCH
+    #define O_SEARCH O_RDONLY
+  #endif
+#else
+  #define HAVE_AT 0
+  static const char *wd_expand (struct tmpbuf *tmpbuf, eio_wd wd, const char *path);
+#endif
+
+struct eio_pwd
+{
+#if HAVE_AT
+  int fd;
+#endif
+  int len;
+  char str[1]; /* actually, a 0-terminated canonical path */
+};
+
+/*****************************************************************************/
+
+#define ETP_PRI_MIN EIO_PRI_MIN
+#define ETP_PRI_MAX EIO_PRI_MAX
+
+struct etp_worker;
+
+#define ETP_REQ eio_req
+#define ETP_DESTROY(req) eio_destroy (req)
+static int eio_finish (eio_req *req);
+#define ETP_FINISH(req)  eio_finish (req)
+static void eio_execute (struct etp_worker *self, eio_req *req);
+#define ETP_EXECUTE(wrk,req) eio_execute (wrk,req)
+
+/*****************************************************************************/
+
+#define ETP_NUM_PRI (ETP_PRI_MAX - ETP_PRI_MIN + 1)
+
+/* calculate time difference in ~1/EIO_TICKS of a second */
+ecb_inline int
+tvdiff (struct timeval *tv1, struct timeval *tv2)
+{
+  return  (tv2->tv_sec  - tv1->tv_sec ) * EIO_TICKS
+       + ((tv2->tv_usec - tv1->tv_usec) >> 10);
+}
+
+static unsigned int started, idle, wanted = 4;
+
+static void (*want_poll_cb) (void);
+static void (*done_poll_cb) (void);
+ 
+static unsigned int max_poll_time;     /* reslock */
+static unsigned int max_poll_reqs;     /* reslock */
+
+static unsigned int nreqs;    /* reqlock */
+static unsigned int nready;   /* reqlock */
+static unsigned int npending; /* reqlock */
+static unsigned int max_idle = 4;      /* maximum number of threads that can idle indefinitely */
+static unsigned int idle_timeout = 10; /* number of seconds after which an idle threads exit */
+
+static xmutex_t wrklock;
+static xmutex_t reslock;
+static xmutex_t reqlock;
+static xcond_t  reqwait;
+
+typedef struct etp_worker
+{
+  struct tmpbuf tmpbuf;
+
+  /* locked by wrklock */
+  struct etp_worker *prev, *next;
+
+  xthread_t tid;
+
+#ifdef ETP_WORKER_COMMON
+  ETP_WORKER_COMMON
+#endif
+} etp_worker;
+
+static etp_worker wrk_first; /* NOT etp */
+
+#define ETP_WORKER_LOCK(wrk)   X_LOCK   (wrklock)
+#define ETP_WORKER_UNLOCK(wrk) X_UNLOCK (wrklock)
+
+/* worker threads management */
+
+static void
+etp_worker_clear (etp_worker *wrk)
+{
+}
+
+static void ecb_cold
+etp_worker_free (etp_worker *wrk)
+{
+  free (wrk->tmpbuf.ptr);
+
+  wrk->next->prev = wrk->prev;
+  wrk->prev->next = wrk->next;
+
+  free (wrk);
+}
+
+static unsigned int
+etp_nreqs (void)
+{
+  int retval;
+  if (WORDACCESS_UNSAFE) X_LOCK   (reqlock);
+  retval = nreqs;
+  if (WORDACCESS_UNSAFE) X_UNLOCK (reqlock);
+  return retval;
+}
+
+static unsigned int
+etp_nready (void)
+{
+  unsigned int retval;
+
+  if (WORDACCESS_UNSAFE) X_LOCK   (reqlock);
+  retval = nready;
+  if (WORDACCESS_UNSAFE) X_UNLOCK (reqlock);
+
+  return retval;
+}
+
+static unsigned int
+etp_npending (void)
+{
+  unsigned int retval;
+
+  if (WORDACCESS_UNSAFE) X_LOCK   (reqlock);
+  retval = npending;
+  if (WORDACCESS_UNSAFE) X_UNLOCK (reqlock);
+
+  return retval;
+}
+
+static unsigned int
+etp_nthreads (void)
+{
+  unsigned int retval;
+
+  if (WORDACCESS_UNSAFE) X_LOCK   (reqlock);
+  retval = started;
+  if (WORDACCESS_UNSAFE) X_UNLOCK (reqlock);
+
+  return retval;
+}
+
+/*
+ * a somewhat faster data structure might be nice, but
+ * with 8 priorities this actually needs <20 insns
+ * per shift, the most expensive operation.
+ */
+typedef struct {
+  ETP_REQ *qs[ETP_NUM_PRI], *qe[ETP_NUM_PRI]; /* qstart, qend */
+  int size;
+} etp_reqq;
+
+static etp_reqq req_queue;
+static etp_reqq res_queue;
+
+static void ecb_noinline ecb_cold
+reqq_init (etp_reqq *q)
+{
+  int pri;
+
+  for (pri = 0; pri < ETP_NUM_PRI; ++pri)
+    q->qs[pri] = q->qe[pri] = 0;
+
+  q->size = 0;
+}
+
+static int ecb_noinline
+reqq_push (etp_reqq *q, ETP_REQ *req)
+{
+  int pri = req->pri;
+  req->next = 0;
+
+  if (q->qe[pri])
+    {
+      q->qe[pri]->next = req;
+      q->qe[pri] = req;
+    }
+  else
+    q->qe[pri] = q->qs[pri] = req;
+
+  return q->size++;
+}
+
+static ETP_REQ * ecb_noinline
+reqq_shift (etp_reqq *q)
+{
+  int pri;
+
+  if (!q->size)
+    return 0;
+
+  --q->size;
+
+  for (pri = ETP_NUM_PRI; pri--; )
+    {
+      eio_req *req = q->qs[pri];
+
+      if (req)
+        {
+          if (!(q->qs[pri] = (eio_req *)req->next))
+            q->qe[pri] = 0;
+
+          return req;
+        }
+    }
+
+  abort ();
+}
+
+static int ecb_cold
+etp_init (void (*want_poll)(void), void (*done_poll)(void))
+{
+  X_MUTEX_CREATE (wrklock);
+  X_MUTEX_CREATE (reslock);
+  X_MUTEX_CREATE (reqlock);
+  X_COND_CREATE  (reqwait);
+
+  reqq_init (&req_queue);
+  reqq_init (&res_queue);
+
+  wrk_first.next =
+  wrk_first.prev = &wrk_first;
+
+  started  = 0;
+  idle     = 0;
+  nreqs    = 0;
+  nready   = 0;
+  npending = 0;
+
+  want_poll_cb = want_poll;
+  done_poll_cb = done_poll;
+
+  return 0;
+}
+
+X_THREAD_PROC (etp_proc);
+
+static void ecb_cold
+etp_start_thread (void)
+{
+  etp_worker *wrk = calloc (1, sizeof (etp_worker));
+
+  /*TODO*/
+  assert (("unable to allocate worker thread data", wrk));
+
+  X_LOCK (wrklock);
+
+  if (xthread_create (&wrk->tid, etp_proc, (void *)wrk))
+    {
+      wrk->prev = &wrk_first;
+      wrk->next = wrk_first.next;
+      wrk_first.next->prev = wrk;
+      wrk_first.next = wrk;
+      ++started;
+    }
+  else
+    free (wrk);
+
+  X_UNLOCK (wrklock);
+}
+
+static void
+etp_maybe_start_thread (void)
+{
+  if (ecb_expect_true (etp_nthreads () >= wanted))
+    return;
+  
+  /* todo: maybe use idle here, but might be less exact */
+  if (ecb_expect_true (0 <= (int)etp_nthreads () + (int)etp_npending () - (int)etp_nreqs ()))
+    return;
+
+  etp_start_thread ();
+}
+
+static void ecb_cold
+etp_end_thread (void)
+{
+  eio_req *req = calloc (1, sizeof (eio_req)); /* will be freed by worker */
+
+  req->type = -1;
+  req->pri  = ETP_PRI_MAX - ETP_PRI_MIN;
+
+  X_LOCK (reqlock);
+  reqq_push (&req_queue, req);
+  X_COND_SIGNAL (reqwait);
+  X_UNLOCK (reqlock);
+
+  X_LOCK (wrklock);
+  --started;
+  X_UNLOCK (wrklock);
+}
+
+static int
+etp_poll (void)
+{
+  unsigned int maxreqs;
+  unsigned int maxtime;
+  struct timeval tv_start, tv_now;
+
+  X_LOCK (reslock);
+  maxreqs = max_poll_reqs;
+  maxtime = max_poll_time;
+  X_UNLOCK (reslock);
+
+  if (maxtime)
+    gettimeofday (&tv_start, 0);
+
+  for (;;)
+    {
+      ETP_REQ *req;
+
+      etp_maybe_start_thread ();
+
+      X_LOCK (reslock);
+      req = reqq_shift (&res_queue);
+
+      if (req)
+        {
+          --npending;
+
+          if (!res_queue.size && done_poll_cb)
+            done_poll_cb ();
+        }
+
+      X_UNLOCK (reslock);
+
+      if (!req)
+        return 0;
+
+      X_LOCK (reqlock);
+      --nreqs;
+      X_UNLOCK (reqlock);
+
+      if (ecb_expect_false (req->type == EIO_GROUP && req->size))
+        {
+          req->int1 = 1; /* mark request as delayed */
+          continue;
+        }
+      else
+        {
+          int res = ETP_FINISH (req);
+          if (ecb_expect_false (res))
+            return res;
+        }
+
+      if (ecb_expect_false (maxreqs && !--maxreqs))
+        break;
+
+      if (maxtime)
+        {
+          gettimeofday (&tv_now, 0);
+
+          if (tvdiff (&tv_start, &tv_now) >= maxtime)
+            break;
+        }
+    }
+
+  errno = EAGAIN;
+  return -1;
+}
+
+static void
+etp_cancel (ETP_REQ *req)
+{
+  req->cancelled = 1;
+
+  eio_grp_cancel (req);
+}
+
+static void
+etp_submit (ETP_REQ *req)
+{
+  req->pri -= ETP_PRI_MIN;
+
+  if (ecb_expect_false (req->pri < ETP_PRI_MIN - ETP_PRI_MIN)) req->pri = ETP_PRI_MIN - ETP_PRI_MIN;
+  if (ecb_expect_false (req->pri > ETP_PRI_MAX - ETP_PRI_MIN)) req->pri = ETP_PRI_MAX - ETP_PRI_MIN;
+
+  if (ecb_expect_false (req->type == EIO_GROUP))
+    {
+      /* I hope this is worth it :/ */
+      X_LOCK (reqlock);
+      ++nreqs;
+      X_UNLOCK (reqlock);
+
+      X_LOCK (reslock);
+
+      ++npending;
+
+      if (!reqq_push (&res_queue, req) && want_poll_cb)
+        want_poll_cb ();
+
+      X_UNLOCK (reslock);
+    }
+  else
+    {
+      X_LOCK (reqlock);
+      ++nreqs;
+      ++nready;
+      reqq_push (&req_queue, req);
+      X_COND_SIGNAL (reqwait);
+      X_UNLOCK (reqlock);
+
+      etp_maybe_start_thread ();
+    }
+}
+
+static void ecb_cold
+etp_set_max_poll_time (double nseconds)
+{
+  if (WORDACCESS_UNSAFE) X_LOCK   (reslock);
+  max_poll_time = nseconds * EIO_TICKS;
+  if (WORDACCESS_UNSAFE) X_UNLOCK (reslock);
+}
+
+static void ecb_cold
+etp_set_max_poll_reqs (unsigned int maxreqs)
+{
+  if (WORDACCESS_UNSAFE) X_LOCK   (reslock);
+  max_poll_reqs = maxreqs;
+  if (WORDACCESS_UNSAFE) X_UNLOCK (reslock);
+}
+
+static void ecb_cold
+etp_set_max_idle (unsigned int nthreads)
+{
+  if (WORDACCESS_UNSAFE) X_LOCK   (reqlock);
+  max_idle = nthreads;
+  if (WORDACCESS_UNSAFE) X_UNLOCK (reqlock);
+}
+
+static void ecb_cold
+etp_set_idle_timeout (unsigned int seconds)
+{
+  if (WORDACCESS_UNSAFE) X_LOCK   (reqlock);
+  idle_timeout = seconds;
+  if (WORDACCESS_UNSAFE) X_UNLOCK (reqlock);
+}
+
+static void ecb_cold
+etp_set_min_parallel (unsigned int nthreads)
+{
+  if (wanted < nthreads)
+    wanted = nthreads;
+}
+
+static void ecb_cold
+etp_set_max_parallel (unsigned int nthreads)
+{
+  if (wanted > nthreads)
+    wanted = nthreads;
+
+  while (started > wanted)
+    etp_end_thread ();
+}
+
+/*****************************************************************************/
+
+static void
+grp_try_feed (eio_req *grp)
+{
+  while (grp->size < grp->int2 && !EIO_CANCELLED (grp))
+    {
+      grp->flags &= ~EIO_FLAG_GROUPADD;
+
+      EIO_FEED (grp);
+
+      /* stop if no progress has been made */
+      if (!(grp->flags & EIO_FLAG_GROUPADD))
+        {
+          grp->feed = 0;
+          break;
+        }
+    }
+}
+
+static int
+grp_dec (eio_req *grp)
+{
+  --grp->size;
+
+  /* call feeder, if applicable */
+  grp_try_feed (grp);
+
+  /* finish, if done */
+  if (!grp->size && grp->int1)
+    return eio_finish (grp);
+  else
+    return 0;
+}
+
+static void
+eio_destroy (eio_req *req)
+{
+  if ((req)->flags & EIO_FLAG_PTR1_FREE) free (req->ptr1);
+  if ((req)->flags & EIO_FLAG_PTR2_FREE) free (req->ptr2);
+
+  EIO_DESTROY (req);
+}
+
+static int
+eio_finish (eio_req *req)
+{
+  int res = EIO_FINISH (req);
+
+  if (req->grp)
+    {
+      int res2;
+      eio_req *grp = req->grp;
+
+      /* unlink request */
+      if (req->grp_next) req->grp_next->grp_prev = req->grp_prev;
+      if (req->grp_prev) req->grp_prev->grp_next = req->grp_next;
+
+      if (grp->grp_first == req)
+        grp->grp_first = req->grp_next;
+
+      res2 = grp_dec (grp);
+
+      if (!res)
+        res = res2;
+    }
+
+  eio_destroy (req);
+
+  return res;
+}
+
+void
+eio_grp_cancel (eio_req *grp)
+{
+  for (grp = grp->grp_first; grp; grp = grp->grp_next)
+    eio_cancel (grp);
+}
+
+void
+eio_cancel (eio_req *req)
+{
+  etp_cancel (req);
+}
+
+void
+eio_submit (eio_req *req)
+{
+  etp_submit (req);
+}
+
+unsigned int
+eio_nreqs (void)
+{
+  return etp_nreqs ();
+}
+
+unsigned int
+eio_nready (void)
+{
+  return etp_nready ();
+}
+
+unsigned int
+eio_npending (void)
+{
+  return etp_npending ();
+}
+
+unsigned int ecb_cold
+eio_nthreads (void)
+{
+  return etp_nthreads ();
+}
+
+void ecb_cold
+eio_set_max_poll_time (double nseconds)
+{
+  etp_set_max_poll_time (nseconds);
+}
+
+void ecb_cold
+eio_set_max_poll_reqs (unsigned int maxreqs)
+{
+  etp_set_max_poll_reqs (maxreqs);
+}
+
+void ecb_cold
+eio_set_max_idle (unsigned int nthreads)
+{
+  etp_set_max_idle (nthreads);
+}
+
+void ecb_cold
+eio_set_idle_timeout (unsigned int seconds)
+{
+  etp_set_idle_timeout (seconds);
+}
+
+void ecb_cold
+eio_set_min_parallel (unsigned int nthreads)
+{
+  etp_set_min_parallel (nthreads);
+}
+
+void ecb_cold
+eio_set_max_parallel (unsigned int nthreads)
+{
+  etp_set_max_parallel (nthreads);
+}
+
+int eio_poll (void)
+{
+  return etp_poll ();
+}
+
+/*****************************************************************************/
+/* work around various missing functions */
+
+#ifndef HAVE_UTIMES
+
+# undef utimes
+# define utimes(path,times)  eio__utimes (path, times)
+
+static int
+eio__utimes (const char *filename, const struct timeval times[2])
+{
+  if (times)
+    {
+      struct utimbuf buf;
+
+      buf.actime  = times[0].tv_sec;
+      buf.modtime = times[1].tv_sec;
+
+      return utime (filename, &buf);
+    }
+  else
+    return utime (filename, 0);
+}
+
+#endif
+
+#ifndef HAVE_FUTIMES
+
+# undef futimes
+# define futimes(fd,times) eio__futimes (fd, times)
+
+static int
+eio__futimes (int fd, const struct timeval tv[2])
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+#endif
+
+#if !HAVE_FDATASYNC
+# undef fdatasync
+# define fdatasync(fd) fsync (fd)
+#endif
+
+static int
+eio__syncfs (int fd)
+{
+  int res;
+
+#if HAVE_SYS_SYNCFS
+  res = (int)syscall (__NR_syncfs, (int)(fd));
+#else
+  res = EIO_ENOSYS ();
+#endif
+
+  if (res < 0 && errno == ENOSYS && fd >= 0)
+    sync ();
+
+  return res;
+}
+
+/* sync_file_range always needs emulation */
+static int
+eio__sync_file_range (int fd, off_t offset, size_t nbytes, unsigned int flags)
+{
+#if HAVE_SYNC_FILE_RANGE
+  int res;
+
+  if (EIO_SYNC_FILE_RANGE_WAIT_BEFORE   != SYNC_FILE_RANGE_WAIT_BEFORE
+      || EIO_SYNC_FILE_RANGE_WRITE      != SYNC_FILE_RANGE_WRITE
+      || EIO_SYNC_FILE_RANGE_WAIT_AFTER != SYNC_FILE_RANGE_WAIT_AFTER)
+    {
+      flags = 0
+         | (flags & EIO_SYNC_FILE_RANGE_WAIT_BEFORE ? SYNC_FILE_RANGE_WAIT_BEFORE : 0)
+         | (flags & EIO_SYNC_FILE_RANGE_WRITE       ? SYNC_FILE_RANGE_WRITE       : 0)
+         | (flags & EIO_SYNC_FILE_RANGE_WAIT_AFTER  ? SYNC_FILE_RANGE_WAIT_AFTER  : 0);
+    }
+
+  res = sync_file_range (fd, offset, nbytes, flags);
+
+  if (!res || errno != ENOSYS)
+    return res;
+#endif
+
+  /* even though we could play tricks with the flags, it's better to always
+   * call fdatasync, as that matches the expectation of its users best */
+  return fdatasync (fd);
+}
+
+static int
+eio__fallocate (int fd, int mode, off_t offset, size_t len)
+{
+#if HAVE_LINUX_FALLOCATE
+  return fallocate (fd, mode, offset, len);
+#else
+  return EIO_ENOSYS ();
+#endif
+}
+
+#if !HAVE_READAHEAD
+# undef readahead
+# define readahead(fd,offset,count) eio__readahead (fd, offset, count, self)
+
+static eio_ssize_t
+eio__readahead (int fd, off_t offset, size_t count, etp_worker *self)
+{
+  size_t todo = count;
+  dBUF;
+
+  while (todo > 0)
+    {
+      size_t len = todo < EIO_BUFSIZE ? todo : EIO_BUFSIZE;
+
+      pread (fd, eio_buf, len, offset);
+      offset += len;
+      todo   -= len;
+    }
+
+  FUBd;
+
+  /* linux's readahead basically only fails for EBADF or EINVAL (not mmappable) */
+  /* but not for e.g. EIO or eof, so we also never fail */
+  return 0;
+}
+
+#endif
+
+/* sendfile always needs emulation */
+static eio_ssize_t
+eio__sendfile (int ofd, int ifd, off_t offset, size_t count)
+{
+  eio_ssize_t written = 0;
+  eio_ssize_t res;
+
+  if (!count)
+    return 0;
+
+  for (;;)
+    {
+#ifdef __APPLE__
+# undef HAVE_SENDFILE /* broken, as everything on os x */
+#endif
+#if HAVE_SENDFILE
+# if __linux
+      off_t soffset = offset;
+      res = sendfile (ofd, ifd, &soffset, count);
+
+# elif __FreeBSD__
+      /*
+       * Of course, the freebsd sendfile is a dire hack with no thoughts
+       * wasted on making it similar to other I/O functions.
+       */
+      off_t sbytes;
+      res = sendfile (ifd, ofd, offset, count, 0, &sbytes, 0);
+
+      #if 0 /* according to the manpage, this is correct, but broken behaviour */
+      /* freebsd' sendfile will return 0 on success */
+      /* freebsd 8 documents it as only setting *sbytes on EINTR and EAGAIN, but */
+      /* not on e.g. EIO or EPIPE - sounds broken */
+      if ((res < 0 && (errno == EAGAIN || errno == EINTR) && sbytes) || res == 0)
+        res = sbytes;
+      #endif
+
+      /* according to source inspection, this is correct, and useful behaviour */
+      if (sbytes)
+        res = sbytes;
+
+# elif defined __APPLE__
+      off_t sbytes = count;
+      res = sendfile (ifd, ofd, offset, &sbytes, 0, 0);
+
+      /* according to the manpage, sbytes is always valid */
+      if (sbytes)
+        res = sbytes;
+
+# elif __hpux
+      res = sendfile (ofd, ifd, offset, count, 0, 0);
+
+# elif __solaris
+      struct sendfilevec vec;
+      size_t sbytes;
+
+      vec.sfv_fd   = ifd;
+      vec.sfv_flag = 0;
+      vec.sfv_off  = offset;
+      vec.sfv_len  = count;
+
+      res = sendfilev (ofd, &vec, 1, &sbytes);
+
+      if (res < 0 && sbytes)
+        res = sbytes;
+
+# endif
+
+#elif defined (_WIN32) && 0
+      /* does not work, just for documentation of what would need to be done */
+      /* actually, cannot be done like this, as TransmitFile changes the file offset, */
+      /* libeio guarantees that the file offset does not change, and windows */
+      /* has no way to get an independent handle to the same file description */
+      HANDLE h = TO_SOCKET (ifd);
+      SetFilePointer (h, offset, 0, FILE_BEGIN);
+      res = TransmitFile (TO_SOCKET (ofd), h, count, 0, 0, 0, 0);
+
+#else
+      res = EIO_ENOSYS ();
+#endif
+
+      /* we assume sendfile can copy at least 128mb in one go */
+      if (res <= 128 * 1024 * 1024)
+        {
+          if (res > 0)
+            written += res;
+
+          if (written)
+            return written;
+
+          break;
+        }
+      else
+        {
+          /* if we requested more, then probably the kernel was lazy */
+          written += res;
+          offset  += res;
+          count   -= res;
+
+          if (!count)
+            return written;
+        }
+    }
+
+  if (res < 0
+      && (errno == ENOSYS || errno == EINVAL || errno == ENOTSOCK
+          /* BSDs */
+#ifdef ENOTSUP /* sigh, if the steenking pile called openbsd would only try to at least compile posix code... */
+          || errno == ENOTSUP
+#endif
+#ifdef EOPNOTSUPP /* windows */
+          || errno == EOPNOTSUPP /* BSDs */
+#endif
+#if __solaris
+          || errno == EAFNOSUPPORT || errno == EPROTOTYPE
+#endif
+         )
+      )
+    {
+      /* emulate sendfile. this is a major pain in the ass */
+      dBUF;
+
+      res = 0;
+
+      while (count)
+        {
+          eio_ssize_t cnt;
+          
+          cnt = pread (ifd, eio_buf, count > EIO_BUFSIZE ? EIO_BUFSIZE : count, offset);
+
+          if (cnt <= 0)
+            {
+              if (cnt && !res) res = -1;
+              break;
+            }
+
+          cnt = write (ofd, eio_buf, cnt);
+
+          if (cnt <= 0)
+            {
+              if (cnt && !res) res = -1;
+              break;
+            }
+
+          offset += cnt;
+          res    += cnt;
+          count  -= cnt;
+        }
+
+      FUBd;
+    }
+
+  return res;
+}
+
+#ifdef PAGESIZE
+# define eio_pagesize() PAGESIZE
+#else
+static intptr_t
+eio_pagesize (void)
+{
+  static intptr_t page;
+
+  if (!page)
+    page = sysconf (_SC_PAGESIZE);
+
+  return page;
+}
+#endif
+
+static void
+eio_page_align (void **addr, size_t *length)
+{
+  intptr_t mask = eio_pagesize () - 1;
+
+  /* round down addr */
+  intptr_t adj = mask & (intptr_t)*addr;
+
+  *addr   = (void *)((intptr_t)*addr - adj);
+  *length += adj;
+
+  /* round up length */
+  *length = (*length + mask) & ~mask;
+}
+
+#if !_POSIX_MEMLOCK
+# define eio__mlockall(a) EIO_ENOSYS ()
+#else
+
+static int
+eio__mlockall (int flags)
+{
+  #if __GLIBC__ == 2 && __GLIBC_MINOR__ <= 7
+    extern int mallopt (int, int);
+    mallopt (-6, 238); /* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473812 */
+  #endif
+
+  if (EIO_MCL_CURRENT   != MCL_CURRENT
+      || EIO_MCL_FUTURE != MCL_FUTURE)
+    {
+      flags = 0
+         | (flags & EIO_MCL_CURRENT ? MCL_CURRENT : 0)
+         | (flags & EIO_MCL_FUTURE  ? MCL_FUTURE : 0);
+    }
+
+  return mlockall (flags);
+}
+#endif
+
+#if !_POSIX_MEMLOCK_RANGE
+# define eio__mlock(a,b) EIO_ENOSYS ()
+#else
+
+static int
+eio__mlock (void *addr, size_t length)
+{
+  eio_page_align (&addr, &length);
+
+  return mlock (addr, length);
+}
+
+#endif
+
+#if !(_POSIX_MAPPED_FILES && _POSIX_SYNCHRONIZED_IO)
+# define eio__msync(a,b,c) EIO_ENOSYS ()
+#else
+
+static int
+eio__msync (void *mem, size_t len, int flags)
+{
+  eio_page_align (&mem, &len);
+
+  if (EIO_MS_ASYNC         != MS_SYNC
+      || EIO_MS_INVALIDATE != MS_INVALIDATE
+      || EIO_MS_SYNC       != MS_SYNC)
+    {
+      flags = 0
+         | (flags & EIO_MS_ASYNC      ? MS_ASYNC : 0)
+         | (flags & EIO_MS_INVALIDATE ? MS_INVALIDATE : 0)
+         | (flags & EIO_MS_SYNC       ? MS_SYNC : 0);
+    }
+
+  return msync (mem, len, flags);
+}
+
+#endif
+
+static int
+eio__mtouch (eio_req *req)
+{
+  void *mem  = req->ptr2;
+  size_t len = req->size;
+  int flags  = req->int1;
+
+  eio_page_align (&mem, &len);
+
+  {
+    intptr_t addr = (intptr_t)mem;
+    intptr_t end = addr + len;
+    intptr_t page = eio_pagesize ();
+
+    if (addr < end)
+      if (flags & EIO_MT_MODIFY) /* modify */
+        do { *((volatile sig_atomic_t *)addr) |= 0; } while ((addr += page) < len && !EIO_CANCELLED (req));
+      else
+        do { *((volatile sig_atomic_t *)addr)     ; } while ((addr += page) < len && !EIO_CANCELLED (req));
+  }
+
+  return 0;
+}
+
+/*****************************************************************************/
+/* requests implemented outside eio_execute, because they are so large */
+
+static void
+eio__lseek (eio_req *req)
+{
+  /* this usually gets optimised away completely, or your compiler sucks, */
+  /* or the whence constants really are not 0, 1, 2 */
+  int whence = req->int2 == EIO_SEEK_SET ? SEEK_SET
+             : req->int2 == EIO_SEEK_CUR ? SEEK_CUR
+             : req->int2 == EIO_SEEK_END ? SEEK_END
+             : req->int2;
+
+  req->offs   = lseek (req->int1, req->offs, whence);
+  req->result = req->offs == (off_t)-1 ? -1 : 0;
+}
+
+/* result will always end up in tmpbuf, there is always space for adding a 0-byte */
+static int
+eio__realpath (struct tmpbuf *tmpbuf, eio_wd wd, const char *path)
+{
+  const char *rel = path;
+  char *res;
+  char *tmp1, *tmp2;
+#if SYMLOOP_MAX > 32
+  int symlinks = SYMLOOP_MAX;
+#else
+  int symlinks = 32;
+#endif
+
+  errno = EINVAL;
+  if (!rel)
+    return -1;
+
+  errno = ENOENT;
+  if (!*rel)
+    return -1;
+
+  res  = tmpbuf_get (tmpbuf, PATH_MAX * 3);
+  tmp1 = res  + PATH_MAX;
+  tmp2 = tmp1 + PATH_MAX;
+
+#if 0 /* disabled, the musl way to do things is just too racy */
+#if __linux && defined(O_NONBLOCK) && defined(O_NOATIME)
+  /* on linux we may be able to ask the kernel */
+  {
+    int fd = open (rel, O_RDONLY | O_NONBLOCK | O_NOCTTY | O_NOATIME);
+
+    if (fd >= 0)
+      {
+        sprintf (tmp1, "/proc/self/fd/%d", fd);
+        req->result = readlink (tmp1, res, PATH_MAX);
+        close (fd);
+
+        /* here we should probably stat the open file and the disk file, to make sure they still match */
+
+        if (req->result > 0)
+          goto done;
+      }
+    else if (errno == ELOOP || errno == ENAMETOOLONG || errno == ENOENT || errno == ENOTDIR || errno == EIO)
+      return;
+  }
+#endif
+#endif
+
+  if (*rel != '/')
+    {
+      int len;
+
+      errno = ENOENT;
+      if (wd == EIO_INVALID_WD)
+        return -1;
+      
+      if (wd == EIO_CWD)
+        {
+          if (!getcwd (res, PATH_MAX))
+            return -1;
+
+          len = strlen (res);
+        }
+      else
+        memcpy (res, wd->str, len = wd->len);
+
+      if (res [1]) /* only use if not / */
+        res += len;
+    }
+
+  while (*rel)
+    {
+      eio_ssize_t len, linklen;
+      const char *beg = rel;
+
+      while (*rel && *rel != '/')
+        ++rel;
+
+      len = rel - beg;
+
+      if (!len) /* skip slashes */
+        {
+          ++rel;
+          continue;
+        }
+
+      if (beg [0] == '.')
+        {
+          if (len == 1)
+            continue; /* . - nop */
+
+          if (beg [1] == '.' && len == 2)
+            {
+              /* .. - back up one component, if possible */
+
+              while (res != tmpbuf->ptr)
+                if (*--res == '/')
+                  break;
+
+              continue;
+            }
+        }
+
+        errno = ENAMETOOLONG;
+        if (res + 1 + len + 1 >= tmp1)
+          return -1;
+
+        /* copy one component */
+        *res = '/';
+        memcpy (res + 1, beg, len);
+
+        /* zero-terminate, for readlink */
+        res [len + 1] = 0;
+
+        /* now check if it's a symlink */
+        linklen = readlink (tmpbuf->ptr, tmp1, PATH_MAX);
+
+        if (linklen < 0)
+          {
+            if (errno != EINVAL)
+              return -1;
+
+            /* it's a normal directory. hopefully */
+            res += len + 1;
+          }
+        else
+          {
+            /* yay, it was a symlink - build new path in tmp2 */
+            int rellen = strlen (rel);
+
+            errno = ENAMETOOLONG;
+            if (linklen + 1 + rellen >= PATH_MAX)
+              return -1;
+
+            errno = ELOOP;
+            if (!--symlinks)
+              return -1;
+
+            if (*tmp1 == '/')
+              res = tmpbuf->ptr; /* symlink resolves to an absolute path */
+
+            /* we need to be careful, as rel might point into tmp2 already */
+            memmove (tmp2 + linklen + 1, rel, rellen + 1);
+            tmp2 [linklen] = '/';
+            memcpy (tmp2, tmp1, linklen);
+
+            rel = tmp2;
+          }
+    }
+
+  /* special case for the lone root path */
+  if (res == tmpbuf->ptr)
+    *res++ = '/';
+
+  return res - (char *)tmpbuf->ptr;
+}
+
+static signed char
+eio_dent_cmp (const eio_dirent *a, const eio_dirent *b)
+{
+  return a->score - b->score ? a->score - b->score /* works because our signed char is always 0..100 */
+       : a->inode < b->inode ? -1
+       : a->inode > b->inode ?  1
+       :                        0;
+}
+
+#define EIO_DENT_CMP(i,op,j) eio_dent_cmp (&i, &j) op 0
+
+#define EIO_SORT_CUTOFF 30 /* quite high, but performs well on many filesystems */
+#define EIO_SORT_FAST   60 /* when to only use insertion sort */
+
+static void
+eio_dent_radix_sort (eio_dirent *dents, int size, signed char score_bits, eio_ino_t inode_bits)
+{
+  unsigned char bits [9 + sizeof (eio_ino_t) * 8];
+  unsigned char *bit = bits;
+
+  assert (CHAR_BIT == 8);
+  assert (sizeof (eio_dirent) * 8 < 256);
+  assert (offsetof (eio_dirent, inode)); /* we use bit #0 as sentinel */
+  assert (offsetof (eio_dirent, score)); /* we use bit #0 as sentinel */
+
+  if (size <= EIO_SORT_FAST)
+    return;
+
+  /* first prepare an array of bits to test in our radix sort */
+  /* try to take endianness into account, as well as differences in eio_ino_t sizes */
+  /* inode_bits must contain all inodes ORed together */
+  /* which is used to skip bits that are 0 everywhere, which is very common */
+  {
+    eio_ino_t endianness;
+    int i, j;
+
+    /* we store the byte offset of byte n into byte n of "endianness" */
+    for (i = 0; i < sizeof (eio_ino_t); ++i)
+      ((unsigned char *)&endianness)[i] = i;
+
+    *bit++ = 0;
+
+    for (i = 0; i < sizeof (eio_ino_t); ++i)
+      {
+        /* shifting off the byte offsets out of "endianness" */
+        int offs = (offsetof (eio_dirent, inode) + (endianness & 0xff)) * 8;
+        endianness >>= 8;
+
+        for (j = 0; j < 8; ++j)
+          if (inode_bits & (((eio_ino_t)1) << (i * 8 + j)))
+            *bit++ = offs + j;
+      }
+
+    for (j = 0; j < 8; ++j)
+      if (score_bits & (1 << j))
+        *bit++ = offsetof (eio_dirent, score) * 8 + j;
+  }
+
+  /* now actually do the sorting (a variant of MSD radix sort) */
+  {
+    eio_dirent    *base_stk [9 + sizeof (eio_ino_t) * 8], *base;
+    eio_dirent    *end_stk  [9 + sizeof (eio_ino_t) * 8], *end;
+    unsigned char *bit_stk  [9 + sizeof (eio_ino_t) * 8];
+    int stk_idx = 0;
+
+    base_stk [stk_idx] = dents;
+    end_stk  [stk_idx] = dents + size;
+    bit_stk  [stk_idx] = bit - 1;
+
+    do
+      {
+        base = base_stk [stk_idx];
+        end  = end_stk  [stk_idx];
+        bit  = bit_stk  [stk_idx];
+
+        for (;;)
+          {
+            unsigned char O = *bit >> 3;
+            unsigned char M = 1 << (*bit & 7);
+
+            eio_dirent *a = base;
+            eio_dirent *b = end;
+
+            if (b - a < EIO_SORT_CUTOFF)
+              break;
+
+            /* now bit-partition the array on the bit */
+            /* this ugly asymmetric loop seems to perform much better than typical */
+            /* partition algos found in the literature */
+            do
+              if (!(((unsigned char *)a)[O] & M))
+                ++a;
+              else if (!(((unsigned char *)--b)[O] & M))
+                {
+                  eio_dirent tmp = *a; *a = *b; *b = tmp;
+                  ++a;
+                }
+            while (b > a);
+
+            /* next bit, or stop, if no bits left in this path */
+            if (!*--bit)
+              break;
+
+            base_stk [stk_idx] = a;
+            end_stk  [stk_idx] = end;
+            bit_stk  [stk_idx] = bit;
+            ++stk_idx;
+
+            end = a;
+          }
+      }
+    while (stk_idx--);
+  }
+}
+
+static void
+eio_dent_insertion_sort (eio_dirent *dents, int size)
+{
+  /* first move the smallest element to the front, to act as a sentinel */
+  {
+    int i;
+    eio_dirent *min = dents;
+    
+    /* the radix pre-pass ensures that the minimum element is in the first EIO_SORT_CUTOFF + 1 elements */
+    for (i = size > EIO_SORT_FAST ? EIO_SORT_CUTOFF + 1 : size; --i; )
+      if (EIO_DENT_CMP (dents [i], <, *min))
+        min = &dents [i];
+
+    /* swap elements 0 and j (minimum) */
+    {
+      eio_dirent tmp = *dents; *dents = *min; *min = tmp;
+    }
+  }
+
+  /* then do standard insertion sort, assuming that all elements are >= dents [0] */
+  {
+    eio_dirent *i, *j;
+
+    for (i = dents + 1; i < dents + size; ++i)
+      {
+        eio_dirent value = *i;
+
+        for (j = i - 1; EIO_DENT_CMP (*j, >, value); --j)
+          j [1] = j [0];
+
+        j [1] = value;
+      }
+  }
+}
+
+static void
+eio_dent_sort (eio_dirent *dents, int size, signed char score_bits, eio_ino_t inode_bits)
+{
+  if (size <= 1)
+    return; /* our insertion sort relies on size > 0 */
+
+  /* first we use a radix sort, but only for dirs >= EIO_SORT_FAST */
+  /* and stop sorting when the partitions are <= EIO_SORT_CUTOFF */
+  eio_dent_radix_sort (dents, size, score_bits, inode_bits);
+
+  /* use an insertion sort at the end, or for small arrays, */
+  /* as insertion sort is more efficient for small partitions */
+  eio_dent_insertion_sort (dents, size);
+}
+
+/* read a full directory */
+static void
+eio__scandir (eio_req *req, etp_worker *self)
+{
+  char *name, *names;
+  int namesalloc = 4096 - sizeof (void *) * 4;
+  int namesoffs = 0;
+  int flags = req->int1;
+  eio_dirent *dents = 0;
+  int dentalloc = 128;
+  int dentoffs = 0;
+  eio_ino_t inode_bits = 0;
+#ifdef _WIN32
+  HANDLE dirp;
+  WIN32_FIND_DATA entp;
+#else
+  DIR *dirp;
+  EIO_STRUCT_DIRENT *entp;
+#endif
+
+  req->result = -1;
+
+  if (!(flags & EIO_READDIR_DENTS))
+    flags &= ~(EIO_READDIR_DIRS_FIRST | EIO_READDIR_STAT_ORDER);
+
+#ifdef _WIN32
+  {
+    int len = strlen ((const char *)req->ptr1);
+    char *path = malloc (MAX_PATH);
+    const char *fmt;
+    const char *reqpath = wd_expand (&self->tmpbuf, req->wd, req->ptr1);
+
+    if (!len)
+      fmt = "./*";
+    else if (reqpath[len - 1] == '/' || reqpath[len - 1] == '\\')
+      fmt = "%s*";
+    else
+      fmt = "%s/*";
+
+    _snprintf (path, MAX_PATH, fmt, reqpath);
+    dirp = FindFirstFile (path, &entp);
+    free (path);
+
+    if (dirp == INVALID_HANDLE_VALUE)
+     {
+       /* should steal _dosmaperr */
+       switch (GetLastError ())
+         {
+           case ERROR_FILE_NOT_FOUND:
+             req->result = 0;
+             break;
+
+           case ERROR_INVALID_NAME:
+           case ERROR_PATH_NOT_FOUND:
+           case ERROR_NO_MORE_FILES:
+             errno = ENOENT;
+             break;
+
+           case ERROR_NOT_ENOUGH_MEMORY:
+             errno = ENOMEM;
+             break;
+
+           default:
+             errno = EINVAL;
+             break;
+         }
+
+       return;
+     }
+  }
+#else
+  #if HAVE_AT
+    if (req->wd)
+      {
+        int fd = openat (WD2FD (req->wd), req->ptr1, O_CLOEXEC | O_SEARCH | O_DIRECTORY);
+
+        if (fd < 0)
+          return;
+
+        dirp = fdopendir (fd);
+
+        if (!dirp)
+          close (fd);
+      }
+    else
+      dirp = opendir (req->ptr1);
+  #else
+    dirp = opendir (wd_expand (&self->tmpbuf, req->wd, req->ptr1));
+  #endif
+
+  if (!dirp)
+    return;
+#endif
+
+  if (req->flags & EIO_FLAG_PTR1_FREE)
+    free (req->ptr1);
+
+  req->flags |= EIO_FLAG_PTR1_FREE | EIO_FLAG_PTR2_FREE;
+  req->ptr1 = dents = flags ? malloc (dentalloc * sizeof (eio_dirent)) : 0;
+  req->ptr2 = names = malloc (namesalloc);
+
+  if (!names || (flags && !dents))
+    return;
+
+  for (;;)
+    {
+      int done;
+
+#ifdef _WIN32
+      done = !dirp;
+#else
+      errno = 0;
+      entp = readdir (dirp);
+      done = !entp;
+#endif
+
+      if (done)
+        {
+#ifndef _WIN32
+          int old_errno = errno;
+          closedir (dirp);
+          errno = old_errno;
+
+          if (errno)
+            break;
+#endif
+
+          /* sort etc. */
+          req->int1   = flags;
+          req->result = dentoffs;
+
+          if (flags & EIO_READDIR_STAT_ORDER)
+            eio_dent_sort (dents, dentoffs, flags & EIO_READDIR_DIRS_FIRST ? 7 : 0, inode_bits);
+          else if (flags & EIO_READDIR_DIRS_FIRST)
+            if (flags & EIO_READDIR_FOUND_UNKNOWN)
+              eio_dent_sort (dents, dentoffs, 7, inode_bits); /* sort by score and inode */
+            else
+              {
+                /* in this case, all is known, and we just put dirs first and sort them */
+                eio_dirent *oth = dents + dentoffs;
+                eio_dirent *dir = dents;
+
+                /* now partition dirs to the front, and non-dirs to the back */
+                /* by walking from both sides and swapping if necessary */
+                while (oth > dir)
+                  {
+                    if (dir->type == EIO_DT_DIR)
+                      ++dir;
+                    else if ((--oth)->type == EIO_DT_DIR)
+                      {
+                        eio_dirent tmp = *dir; *dir = *oth; *oth = tmp;
+
+                        ++dir;
+                      }
+                  }
+
+                /* now sort the dirs only (dirs all have the same score) */
+                eio_dent_sort (dents, dir - dents, 0, inode_bits);
+              }
+
+          break;
+        }
+
+      /* now add the entry to our list(s) */
+      name = D_NAME (entp);
+
+      /* skip . and .. entries */
+      if (name [0] != '.' || (name [1] && (name [1] != '.' || name [2])))
+        {
+          int len = D_NAMLEN (entp) + 1;
+
+          while (ecb_expect_false (namesoffs + len > namesalloc))
+            {
+              namesalloc *= 2;
+              req->ptr2 = names = realloc (names, namesalloc);
+
+              if (!names)
+                break;
+            }
+
+          memcpy (names + namesoffs, name, len);
+
+          if (dents)
+            {
+              struct eio_dirent *ent;
+
+              if (ecb_expect_false (dentoffs == dentalloc))
+                {
+                  dentalloc *= 2;
+                  req->ptr1 = dents = realloc (dents, dentalloc * sizeof (eio_dirent));
+
+                  if (!dents)
+                    break;
+                }
+
+              ent = dents + dentoffs;
+
+              ent->nameofs = namesoffs; /* rather dirtily we store the offset in the pointer */
+              ent->namelen = len - 1;
+              ent->inode   = D_INO (entp);
+
+              inode_bits |= ent->inode;
+
+              switch (D_TYPE (entp))
+                {
+                  default:
+                    ent->type = EIO_DT_UNKNOWN;
+                    flags |= EIO_READDIR_FOUND_UNKNOWN;
+                    break;
+
+                  #ifdef DT_FIFO
+                    case DT_FIFO: ent->type = EIO_DT_FIFO; break;
+                  #endif
+                  #ifdef DT_CHR
+                    case DT_CHR:  ent->type = EIO_DT_CHR;  break;
+                  #endif
+                  #ifdef DT_MPC
+                    case DT_MPC:  ent->type = EIO_DT_MPC;  break;
+                  #endif
+                  #ifdef DT_DIR
+                    case DT_DIR:  ent->type = EIO_DT_DIR;  break;
+                  #endif
+                  #ifdef DT_NAM
+                    case DT_NAM:  ent->type = EIO_DT_NAM;  break;
+                  #endif
+                  #ifdef DT_BLK
+                    case DT_BLK:  ent->type = EIO_DT_BLK;  break;
+                  #endif
+                  #ifdef DT_MPB
+                    case DT_MPB:  ent->type = EIO_DT_MPB;  break;
+                  #endif
+                  #ifdef DT_REG
+                    case DT_REG:  ent->type = EIO_DT_REG;  break;
+                  #endif
+                  #ifdef DT_NWK
+                    case DT_NWK:  ent->type = EIO_DT_NWK;  break;
+                  #endif
+                  #ifdef DT_CMP
+                    case DT_CMP:  ent->type = EIO_DT_CMP;  break;
+                  #endif
+                  #ifdef DT_LNK
+                    case DT_LNK:  ent->type = EIO_DT_LNK;  break;
+                  #endif
+                  #ifdef DT_SOCK
+                    case DT_SOCK: ent->type = EIO_DT_SOCK; break;
+                  #endif
+                  #ifdef DT_DOOR
+                    case DT_DOOR: ent->type = EIO_DT_DOOR; break;
+                  #endif
+                  #ifdef DT_WHT
+                    case DT_WHT:  ent->type = EIO_DT_WHT;  break;
+                  #endif
+                }
+
+              ent->score = 7;
+
+              if (flags & EIO_READDIR_DIRS_FIRST)
+                {
+                  if (ent->type == EIO_DT_UNKNOWN)
+                    {
+                      if (*name == '.') /* leading dots are likely directories, and, in any case, rare */
+                        ent->score = 1;
+                      else if (!strchr (name, '.')) /* absence of dots indicate likely dirs */
+                        ent->score = len <= 2 ? 4 - len : len <= 4 ? 4 : len <= 7 ? 5 : 6; /* shorter == more likely dir, but avoid too many classes */
+                    }
+                  else if (ent->type == EIO_DT_DIR)
+                    ent->score = 0;
+                }
+            }
+
+          namesoffs += len;
+          ++dentoffs;
+        }
+
+      if (EIO_CANCELLED (req))
+        {
+          errno = ECANCELED;
+          break;
+        }
+
+#ifdef _WIN32
+      if (!FindNextFile (dirp, &entp))
+        {
+          FindClose (dirp);
+          dirp = 0;
+        }
+#endif
+    }
+}
+
+/*****************************************************************************/
+/* working directory stuff */
+/* various deficiencies in the posix 2008 api force us to */
+/* keep the absolute path in string form at all times */
+/* fuck yeah. */
+
+#if !HAVE_AT
+
+/* a bit like realpath, but usually faster because it doesn'T have to return */
+/* an absolute or canonical path */
+static const char *
+wd_expand (struct tmpbuf *tmpbuf, eio_wd wd, const char *path)
+{
+  if (!wd || *path == '/')
+    return path;
+
+  if (path [0] == '.' && !path [1])
+    return wd->str;
+
+  {
+    int l1 = wd->len;
+    int l2 = strlen (path);
+
+    char *res = tmpbuf_get (tmpbuf, l1 + l2 + 2);
+
+    memcpy (res, wd->str, l1);
+    res [l1] = '/';
+    memcpy (res + l1 + 1, path, l2 + 1);
+
+    return res;
+  }
+}
+
+#endif
+
+static eio_wd
+eio__wd_open_sync (struct tmpbuf *tmpbuf, eio_wd wd, const char *path)
+{
+  int fd;
+  eio_wd res;
+  int len = eio__realpath (tmpbuf, wd, path);
+
+  if (len < 0)
+    return EIO_INVALID_WD;
+
+#if HAVE_AT
+  fd = openat (WD2FD (wd), path, O_CLOEXEC | O_SEARCH | O_DIRECTORY);
+
+  if (fd < 0)
+    return EIO_INVALID_WD;
+#endif
+
+  res = malloc (sizeof (*res) + len); /* one extra 0-byte */
+
+#if HAVE_AT
+  res->fd = fd;
+#endif
+
+  res->len = len;
+  memcpy (res->str, tmpbuf->ptr, len);
+  res->str [len] = 0;
+
+  return res;
+}
+
+eio_wd
+eio_wd_open_sync (eio_wd wd, const char *path)
+{
+  struct tmpbuf tmpbuf = { 0 };
+  wd = eio__wd_open_sync (&tmpbuf, wd, path);
+  free (tmpbuf.ptr);
+
+  return wd;
+}
+
+void
+eio_wd_close_sync (eio_wd wd)
+{
+  if (wd != EIO_INVALID_WD && wd != EIO_CWD)
+    {
+      #if HAVE_AT
+      close (wd->fd);
+      #endif
+      free (wd);
+    }
+}
+
+#if HAVE_AT
+
+/* they forgot these */
+
+static int
+eio__truncateat (int dirfd, const char *path, off_t length)
+{
+  int fd = openat (dirfd, path, O_WRONLY | O_CLOEXEC);
+  int res;
+
+  if (fd < 0)
+    return fd;
+
+  res = ftruncate (fd, length);
+  close (fd);
+  return res;
+}
+
+static int
+eio__statvfsat (int dirfd, const char *path, struct statvfs *buf)
+{
+  int fd = openat (dirfd, path, O_SEARCH | O_CLOEXEC);
+  int res;
+
+  if (fd < 0)
+    return fd;
+
+  res = fstatvfs (fd, buf);
+  close (fd);
+  return res;
+
+}
+
+#endif
+
+/*****************************************************************************/
+
+#define ALLOC(len)				\
+  if (!req->ptr2)				\
+    {						\
+      X_LOCK (wrklock);				\
+      req->flags |= EIO_FLAG_PTR2_FREE;		\
+      X_UNLOCK (wrklock);			\
+      req->ptr2 = malloc (len);			\
+      if (!req->ptr2)				\
+        {					\
+          errno       = ENOMEM;			\
+          req->result = -1;			\
+          break;				\
+        }					\
+    }
+
+static void ecb_noinline ecb_cold
+etp_proc_init (void)
+{
+#if HAVE_PRCTL_SET_NAME
+  /* provide a more sensible "thread name" */
+  char name[16 + 1];
+  const int namelen = sizeof (name) - 1;
+  int len;
+
+  prctl (PR_GET_NAME, (unsigned long)name, 0, 0, 0);
+  name [namelen] = 0;
+  len = strlen (name);
+  strcpy (name + (len <= namelen - 4 ? len : namelen - 4), "/eio");
+  prctl (PR_SET_NAME, (unsigned long)name, 0, 0, 0);
+#endif
+}
+
+X_THREAD_PROC (etp_proc)
+{
+  ETP_REQ *req;
+  struct timespec ts;
+  etp_worker *self = (etp_worker *)thr_arg;
+
+  etp_proc_init ();
+
+  /* try to distribute timeouts somewhat evenly */
+  ts.tv_nsec = ((unsigned long)self & 1023UL) * (1000000000UL / 1024UL);
+
+  for (;;)
+    {
+      ts.tv_sec = 0;
+
+      X_LOCK (reqlock);
+
+      for (;;)
+        {
+          req = reqq_shift (&req_queue);
+
+          if (req)
+            break;
+
+          if (ts.tv_sec == 1) /* no request, but timeout detected, let's quit */
+            {
+              X_UNLOCK (reqlock);
+              X_LOCK (wrklock);
+              --started;
+              X_UNLOCK (wrklock);
+              goto quit;
+            }
+
+          ++idle;
+
+          if (idle <= max_idle)
+            /* we are allowed to idle, so do so without any timeout */
+            X_COND_WAIT (reqwait, reqlock);
+          else
+            {
+              /* initialise timeout once */
+              if (!ts.tv_sec)
+                ts.tv_sec = time (0) + idle_timeout;
+
+              if (X_COND_TIMEDWAIT (reqwait, reqlock, ts) == ETIMEDOUT)
+                ts.tv_sec = 1; /* assuming this is not a value computed above.,.. */
+            }
+
+          --idle;
+        }
+
+      --nready;
+
+      X_UNLOCK (reqlock);
+     
+      if (req->type < 0)
+        goto quit;
+
+      ETP_EXECUTE (self, req);
+
+      X_LOCK (reslock);
+
+      ++npending;
+
+      if (!reqq_push (&res_queue, req) && want_poll_cb)
+        want_poll_cb ();
+
+      etp_worker_clear (self);
+
+      X_UNLOCK (reslock);
+    }
+
+quit:
+  free (req);
+
+  X_LOCK (wrklock);
+  etp_worker_free (self);
+  X_UNLOCK (wrklock);
+
+  return 0;
+}
+
+/*****************************************************************************/
+
+int ecb_cold
+eio_init (void (*want_poll)(void), void (*done_poll)(void))
+{
+  return etp_init (want_poll, done_poll);
+}
+
+ecb_inline void
+eio_api_destroy (eio_req *req)
+{
+  free (req);
+}
+
+#define REQ(rtype)						\
+  eio_req *req;                                                 \
+                                                                \
+  req = (eio_req *)calloc (1, sizeof *req);                     \
+  if (!req)                                                     \
+    return 0;                                                   \
+                                                                \
+  req->type    = rtype;                                         \
+  req->pri     = pri;						\
+  req->finish  = cb;						\
+  req->data    = data;						\
+  req->destroy = eio_api_destroy;
+
+#define SEND eio_submit (req); return req
+
+#define PATH							\
+  req->flags |= EIO_FLAG_PTR1_FREE;				\
+  req->ptr1 = strdup (path);					\
+  if (!req->ptr1)						\
+    {								\
+      eio_api_destroy (req);					\
+      return 0;							\
+    }
+
+static void
+eio_execute (etp_worker *self, eio_req *req)
+{
+#if HAVE_AT
+  int dirfd;
+#else
+  const char *path;
+#endif
+
+  if (ecb_expect_false (EIO_CANCELLED (req)))
+    {
+      req->result  = -1;
+      req->errorno = ECANCELED;
+      return;
+    }
+
+  if (ecb_expect_false (req->wd == EIO_INVALID_WD))
+    {
+      req->result  = -1;
+      req->errorno = ENOENT;
+      return;
+    }
+
+  if (req->type >= EIO_OPEN)
+    {
+      #if HAVE_AT
+        dirfd = WD2FD (req->wd);
+      #else
+        path = wd_expand (&self->tmpbuf, req->wd, req->ptr1);
+      #endif
+    }
+
+  switch (req->type)
+    {
+      case EIO_WD_OPEN:   req->wd = eio__wd_open_sync (&self->tmpbuf, req->wd, req->ptr1);
+                          req->result = req->wd == EIO_INVALID_WD ? -1 : 0;
+                          break;
+      case EIO_WD_CLOSE:  req->result = 0;
+                          eio_wd_close_sync (req->wd); break;
+
+      case EIO_SEEK:      eio__lseek (req); break;
+      case EIO_READ:      ALLOC (req->size);
+                          req->result = req->offs >= 0
+                                      ? pread     (req->int1, req->ptr2, req->size, req->offs)
+                                      : read      (req->int1, req->ptr2, req->size); break;
+      case EIO_WRITE:     req->result = req->offs >= 0
+                                      ? pwrite    (req->int1, req->ptr2, req->size, req->offs)
+                                      : write     (req->int1, req->ptr2, req->size); break;
+
+      case EIO_READAHEAD: req->result = readahead     (req->int1, req->offs, req->size); break;
+      case EIO_SENDFILE:  req->result = eio__sendfile (req->int1, req->int2, req->offs, req->size); break;
+
+#if HAVE_AT
+
+      case EIO_STAT:      ALLOC (sizeof (EIO_STRUCT_STAT));
+                          req->result = fstatat   (dirfd, req->ptr1, (EIO_STRUCT_STAT *)req->ptr2, 0); break;
+      case EIO_LSTAT:     ALLOC (sizeof (EIO_STRUCT_STAT));
+                          req->result = fstatat   (dirfd, req->ptr1, (EIO_STRUCT_STAT *)req->ptr2, AT_SYMLINK_NOFOLLOW); break;
+      case EIO_CHOWN:     req->result = fchownat  (dirfd, req->ptr1, req->int2, req->int3, 0); break;
+      case EIO_CHMOD:     req->result = fchmodat  (dirfd, req->ptr1, (mode_t)req->int2, 0); break;
+      case EIO_TRUNCATE:  req->result = eio__truncateat (dirfd, req->ptr1, req->offs); break;
+      case EIO_OPEN:      req->result = openat    (dirfd, req->ptr1, req->int1, (mode_t)req->int2); break;
+
+      case EIO_UNLINK:    req->result = unlinkat  (dirfd, req->ptr1, 0); break;
+      case EIO_RMDIR:     req->result = unlinkat  (dirfd, req->ptr1, AT_REMOVEDIR); break;
+      case EIO_MKDIR:     req->result = mkdirat   (dirfd, req->ptr1, (mode_t)req->int2); break;
+      case EIO_RENAME:    req->result = renameat  (dirfd, req->ptr1, WD2FD ((eio_wd)req->int3), req->ptr2); break;
+      case EIO_LINK:      req->result = linkat    (dirfd, req->ptr1, WD2FD ((eio_wd)req->int3), req->ptr2, 0); break;
+      case EIO_SYMLINK:   req->result = symlinkat (req->ptr1, dirfd, req->ptr2); break;
+      case EIO_MKNOD:     req->result = mknodat   (dirfd, req->ptr1, (mode_t)req->int2, (dev_t)req->offs); break;
+      case EIO_READLINK:  ALLOC (PATH_MAX);
+                          req->result = readlinkat (dirfd, req->ptr1, req->ptr2, PATH_MAX); break;
+      case EIO_STATVFS:   ALLOC (sizeof (EIO_STRUCT_STATVFS));
+                          req->result = eio__statvfsat (dirfd, req->ptr1, (EIO_STRUCT_STATVFS *)req->ptr2); break;
+      case EIO_UTIME:
+      case EIO_FUTIME:
+        {
+          struct timespec ts[2];
+          struct timespec *times;
+
+          if (req->nv1 != -1. || req->nv2 != -1.)
+            {
+              ts[0].tv_sec  = req->nv1;
+              ts[0].tv_nsec = (req->nv1 - ts[0].tv_sec) * 1e9;
+              ts[1].tv_sec  = req->nv2;
+              ts[1].tv_nsec = (req->nv2 - ts[1].tv_sec) * 1e9;
+
+              times = ts;
+            }
+          else
+            times = 0;
+
+          req->result = req->type == EIO_FUTIME
+                        ? futimens  (req->int1, times)
+                        : utimensat (dirfd, req->ptr1, times, 0);
+        }
+        break;
+
+#else
+
+      case EIO_STAT:      ALLOC (sizeof (EIO_STRUCT_STAT));
+                          req->result = stat      (path     , (EIO_STRUCT_STAT *)req->ptr2); break;
+      case EIO_LSTAT:     ALLOC (sizeof (EIO_STRUCT_STAT));
+                          req->result = lstat     (path     , (EIO_STRUCT_STAT *)req->ptr2); break;
+      case EIO_CHOWN:     req->result = chown     (path     , req->int2, req->int3); break;
+      case EIO_CHMOD:     req->result = chmod     (path     , (mode_t)req->int2); break;
+      case EIO_TRUNCATE:  req->result = truncate  (path     , req->offs); break;
+      case EIO_OPEN:      req->result = open      (path     , req->int1, (mode_t)req->int2); break;
+
+      case EIO_UNLINK:    req->result = unlink    (path     ); break;
+      case EIO_RMDIR:     req->result = rmdir     (path     ); break;
+      case EIO_MKDIR:     req->result = mkdir     (path     , (mode_t)req->int2); break;
+      case EIO_RENAME:    req->result = rename    (path     , req->ptr2); break;
+      case EIO_LINK:      req->result = link      (path     , req->ptr2); break;
+      case EIO_SYMLINK:   req->result = symlink   (path     , req->ptr2); break;
+      case EIO_MKNOD:     req->result = mknod     (path     , (mode_t)req->int2, (dev_t)req->offs); break;
+      case EIO_READLINK:  ALLOC (PATH_MAX);
+                          req->result = readlink  (path, req->ptr2, PATH_MAX); break;
+      case EIO_STATVFS:   ALLOC (sizeof (EIO_STRUCT_STATVFS));
+                          req->result = statvfs   (path     , (EIO_STRUCT_STATVFS *)req->ptr2); break;
+
+      case EIO_UTIME:
+      case EIO_FUTIME:
+        {
+          struct timeval tv[2];
+          struct timeval *times;
+
+          if (req->nv1 != -1. || req->nv2 != -1.)
+            {
+              tv[0].tv_sec  = req->nv1;
+              tv[0].tv_usec = (req->nv1 - tv[0].tv_sec) * 1e6;
+              tv[1].tv_sec  = req->nv2;
+              tv[1].tv_usec = (req->nv2 - tv[1].tv_sec) * 1e6;
+
+              times = tv;
+            }
+          else
+            times = 0;
+
+          req->result = req->type == EIO_FUTIME
+                        ? futimes (req->int1, times)
+                        : utimes  (req->ptr1, times);
+        }
+        break;
+
+#endif
+
+      case EIO_REALPATH:  if (0 <= (req->result = eio__realpath (&self->tmpbuf, req->wd, req->ptr1)))
+                            {
+                              ALLOC (req->result);
+                              memcpy (req->ptr2, self->tmpbuf.ptr, req->result);
+                            }
+                           break;
+
+      case EIO_FSTAT:     ALLOC (sizeof (EIO_STRUCT_STAT));
+                          req->result = fstat     (req->int1, (EIO_STRUCT_STAT *)req->ptr2); break;
+
+      case EIO_FSTATVFS:  ALLOC (sizeof (EIO_STRUCT_STATVFS));
+                          req->result = fstatvfs  (req->int1, (EIO_STRUCT_STATVFS *)req->ptr2); break;
+
+      case EIO_FCHOWN:    req->result = fchown    (req->int1, req->int2, req->int3); break;
+      case EIO_FCHMOD:    req->result = fchmod    (req->int1, (mode_t)req->int2); break;
+      case EIO_FTRUNCATE: req->result = ftruncate (req->int1, req->offs); break;
+
+      case EIO_CLOSE:     req->result = close     (req->int1); break;
+      case EIO_DUP2:      req->result = dup2      (req->int1, req->int2); break;
+      case EIO_SYNC:      req->result = 0; sync (); break;
+      case EIO_FSYNC:     req->result = fsync     (req->int1); break;
+      case EIO_FDATASYNC: req->result = fdatasync (req->int1); break;
+      case EIO_SYNCFS:    req->result = eio__syncfs (req->int1); break;
+      case EIO_SYNC_FILE_RANGE: req->result = eio__sync_file_range (req->int1, req->offs, req->size, req->int2); break;
+      case EIO_MSYNC:     req->result = eio__msync (req->ptr2, req->size, req->int1); break;
+      case EIO_MTOUCH:    req->result = eio__mtouch (req); break;
+      case EIO_MLOCK:     req->result = eio__mlock (req->ptr2, req->size); break;
+      case EIO_MLOCKALL:  req->result = eio__mlockall (req->int1); break;
+      case EIO_FALLOCATE: req->result = eio__fallocate (req->int1, req->int2, req->offs, req->size); break;
+
+      case EIO_READDIR:   eio__scandir (req, self); break;
+
+      case EIO_BUSY:
+#ifdef _WIN32
+	Sleep (req->nv1 * 1e3);
+#else
+        {
+          struct timeval tv;
+
+          tv.tv_sec  = req->nv1;
+          tv.tv_usec = (req->nv1 - tv.tv_sec) * 1e6;
+
+          req->result = select (0, 0, 0, 0, &tv);
+        }
+#endif
+        break;
+
+      case EIO_GROUP:
+        abort (); /* handled in eio_request */
+
+      case EIO_NOP:
+        req->result = 0;
+        break;
+
+      case EIO_CUSTOM:
+        req->feed (req);
+        break;
+
+      default:
+        req->result = EIO_ENOSYS ();
+        break;
+    }
+
+  req->errorno = errno;
+}
+
+#ifndef EIO_NO_WRAPPERS
+
+eio_req *eio_wd_open (const char *path, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_WD_OPEN); PATH; SEND;
+}
+
+eio_req *eio_wd_close (eio_wd wd, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_WD_CLOSE); req->wd = wd; SEND;
+}
+
+eio_req *eio_nop (int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_NOP); SEND;
+}
+
+eio_req *eio_busy (double delay, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_BUSY); req->nv1 = delay; SEND;
+}
+
+eio_req *eio_sync (int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_SYNC); SEND;
+}
+
+eio_req *eio_fsync (int fd, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_FSYNC); req->int1 = fd; SEND;
+}
+
+eio_req *eio_msync (void *addr, size_t length, int flags, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_MSYNC); req->ptr2 = addr; req->size = length; req->int1 = flags; SEND;
+}
+
+eio_req *eio_fdatasync (int fd, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_FDATASYNC); req->int1 = fd; SEND;
+}
+
+eio_req *eio_syncfs (int fd, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_SYNCFS); req->int1 = fd; SEND;
+}
+
+eio_req *eio_sync_file_range (int fd, off_t offset, size_t nbytes, unsigned int flags, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_SYNC_FILE_RANGE); req->int1 = fd; req->offs = offset; req->size = nbytes; req->int2 = flags; SEND;
+}
+
+eio_req *eio_mtouch (void *addr, size_t length, int flags, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_MTOUCH); req->ptr2 = addr; req->size = length; req->int1 = flags; SEND;
+}
+
+eio_req *eio_mlock (void *addr, size_t length, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_MLOCK); req->ptr2 = addr; req->size = length; SEND;
+}
+
+eio_req *eio_mlockall (int flags, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_MLOCKALL); req->int1 = flags; SEND;
+}
+
+eio_req *eio_fallocate (int fd, int mode, off_t offset, size_t len, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_FALLOCATE); req->int1 = fd; req->int2 = mode; req->offs = offset; req->size = len; SEND;
+}
+
+eio_req *eio_close (int fd, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_CLOSE); req->int1 = fd; SEND;
+}
+
+eio_req *eio_readahead (int fd, off_t offset, size_t length, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_READAHEAD); req->int1 = fd; req->offs = offset; req->size = length; SEND;
+}
+
+eio_req *eio_seek (int fd, off_t offset, int whence, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_SEEK); req->int1 = fd; req->offs = offset; req->int2 = whence; SEND;
+}
+
+eio_req *eio_read (int fd, void *buf, size_t length, off_t offset, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_READ); req->int1 = fd; req->offs = offset; req->size = length; req->ptr2 = buf; SEND;
+}
+
+eio_req *eio_write (int fd, void *buf, size_t length, off_t offset, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_WRITE); req->int1 = fd; req->offs = offset; req->size = length; req->ptr2 = buf; SEND;
+}
+
+eio_req *eio_fstat (int fd, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_FSTAT); req->int1 = fd; SEND;
+}
+
+eio_req *eio_fstatvfs (int fd, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_FSTATVFS); req->int1 = fd; SEND;
+}
+
+eio_req *eio_futime (int fd, double atime, double mtime, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_FUTIME); req->int1 = fd; req->nv1 = atime; req->nv2 = mtime; SEND;
+}
+
+eio_req *eio_ftruncate (int fd, off_t offset, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_FTRUNCATE); req->int1 = fd; req->offs = offset; SEND;
+}
+
+eio_req *eio_fchmod (int fd, mode_t mode, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_FCHMOD); req->int1 = fd; req->int2 = (long)mode; SEND;
+}
+
+eio_req *eio_fchown (int fd, eio_uid_t uid, eio_gid_t gid, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_FCHOWN); req->int1 = fd; req->int2 = (long)uid; req->int3 = (long)gid; SEND;
+}
+
+eio_req *eio_dup2 (int fd, int fd2, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_DUP2); req->int1 = fd; req->int2 = fd2; SEND;
+}
+
+eio_req *eio_sendfile (int out_fd, int in_fd, off_t in_offset, size_t length, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_SENDFILE); req->int1 = out_fd; req->int2 = in_fd; req->offs = in_offset; req->size = length; SEND;
+}
+
+eio_req *eio_open (const char *path, int flags, mode_t mode, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_OPEN); PATH; req->int1 = flags; req->int2 = (long)mode; SEND;
+}
+
+eio_req *eio_utime (const char *path, double atime, double mtime, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_UTIME); PATH; req->nv1 = atime; req->nv2 = mtime; SEND;
+}
+
+eio_req *eio_truncate (const char *path, off_t offset, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_TRUNCATE); PATH; req->offs = offset; SEND;
+}
+
+eio_req *eio_chown (const char *path, eio_uid_t uid, eio_gid_t gid, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_CHOWN); PATH; req->int2 = (long)uid; req->int3 = (long)gid; SEND;
+}
+
+eio_req *eio_chmod (const char *path, mode_t mode, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_CHMOD); PATH; req->int2 = (long)mode; SEND;
+}
+
+eio_req *eio_mkdir (const char *path, mode_t mode, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_MKDIR); PATH; req->int2 = (long)mode; SEND;
+}
+
+static eio_req *
+eio__1path (int type, const char *path, int pri, eio_cb cb, void *data)
+{
+  REQ (type); PATH; SEND;
+}
+
+eio_req *eio_readlink (const char *path, int pri, eio_cb cb, void *data)
+{
+  return eio__1path (EIO_READLINK, path, pri, cb, data);
+}
+
+eio_req *eio_realpath (const char *path, int pri, eio_cb cb, void *data)
+{
+  return eio__1path (EIO_REALPATH, path, pri, cb, data);
+}
+
+eio_req *eio_stat (const char *path, int pri, eio_cb cb, void *data)
+{
+  return eio__1path (EIO_STAT, path, pri, cb, data);
+}
+
+eio_req *eio_lstat (const char *path, int pri, eio_cb cb, void *data)
+{
+  return eio__1path (EIO_LSTAT, path, pri, cb, data);
+}
+
+eio_req *eio_statvfs (const char *path, int pri, eio_cb cb, void *data)
+{
+  return eio__1path (EIO_STATVFS, path, pri, cb, data);
+}
+
+eio_req *eio_unlink (const char *path, int pri, eio_cb cb, void *data)
+{
+  return eio__1path (EIO_UNLINK, path, pri, cb, data);
+}
+
+eio_req *eio_rmdir (const char *path, int pri, eio_cb cb, void *data)
+{
+  return eio__1path (EIO_RMDIR, path, pri, cb, data);
+}
+
+eio_req *eio_readdir (const char *path, int flags, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_READDIR); PATH; req->int1 = flags; SEND;
+}
+
+eio_req *eio_mknod (const char *path, mode_t mode, dev_t dev, int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_MKNOD); PATH; req->int2 = (long)mode; req->offs = (off_t)dev; SEND;
+}
+
+static eio_req *
+eio__2path (int type, const char *path, const char *new_path, int pri, eio_cb cb, void *data)
+{
+  REQ (type); PATH;
+
+  req->flags |= EIO_FLAG_PTR2_FREE;
+  req->ptr2 = strdup (new_path);
+  if (!req->ptr2)
+    {
+      eio_api_destroy (req);
+      return 0;
+    }
+
+  SEND;
+}
+
+eio_req *eio_link (const char *path, const char *new_path, int pri, eio_cb cb, void *data)
+{
+  return eio__2path (EIO_LINK, path, new_path, pri, cb, data);
+}
+
+eio_req *eio_symlink (const char *path, const char *new_path, int pri, eio_cb cb, void *data)
+{
+  return eio__2path (EIO_SYMLINK, path, new_path, pri, cb, data);
+}
+
+eio_req *eio_rename (const char *path, const char *new_path, int pri, eio_cb cb, void *data)
+{
+  return eio__2path (EIO_RENAME, path, new_path, pri, cb, data);
+}
+
+eio_req *eio_custom (void (*execute)(eio_req *), int pri, eio_cb cb, void *data)
+{
+  REQ (EIO_CUSTOM); req->feed = execute; SEND;
+}
+
+#endif
+
+eio_req *eio_grp (eio_cb cb, void *data)
+{
+  const int pri = EIO_PRI_MAX;
+
+  REQ (EIO_GROUP); SEND;
+}
+
+#undef REQ
+#undef PATH
+#undef SEND
+
+/*****************************************************************************/
+/* grp functions */
+
+void
+eio_grp_feed (eio_req *grp, void (*feed)(eio_req *req), int limit)
+{
+  grp->int2 = limit;
+  grp->feed = feed;
+
+  grp_try_feed (grp);
+}
+
+void
+eio_grp_limit (eio_req *grp, int limit)
+{
+  grp->int2 = limit;
+
+  grp_try_feed (grp);
+}
+
+void
+eio_grp_add (eio_req *grp, eio_req *req)
+{
+  assert (("cannot add requests to IO::AIO::GRP after the group finished", grp->int1 != 2));
+
+  grp->flags |= EIO_FLAG_GROUPADD;
+
+  ++grp->size;
+  req->grp = grp;
+
+  req->grp_prev = 0;
+  req->grp_next = grp->grp_first;
+
+  if (grp->grp_first)
+    grp->grp_first->grp_prev = req;
+
+  grp->grp_first = req;
+}
+
+/*****************************************************************************/
+/* misc garbage */
+
+eio_ssize_t
+eio_sendfile_sync (int ofd, int ifd, off_t offset, size_t count)
+{
+  return eio__sendfile (ofd, ifd, offset, count);
+}
+
diff --git a/ext/libeio/eio.h b/ext/libeio/eio.h
new file mode 100644
index 0000000..f97f48f
--- /dev/null
+++ b/ext/libeio/eio.h
@@ -0,0 +1,412 @@
+/*
+ * libeio API header
+ *
+ * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann <libeio at schmorp.de>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, are permitted provided that the following conditions are met:
+ *
+ *   1.  Redistributions of source code must retain the above copyright notice,
+ *       this list of conditions and the following disclaimer.
+ *
+ *   2.  Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
+ * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
+ * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
+ * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * the GNU General Public License ("GPL") version 2 or any later version,
+ * in which case the provisions of the GPL are applicable instead of
+ * the above. If you wish to allow the use of your version of this file
+ * only under the terms of the GPL and not to allow others to use your
+ * version of this file under the BSD license, indicate your decision
+ * by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL. If you do not delete the
+ * provisions above, a recipient may use your version of this file under
+ * either the BSD or the GPL.
+ */
+
+#ifndef EIO_H_
+#define EIO_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stddef.h>
+#include <signal.h>
+#include <sys/types.h>
+
+typedef struct eio_req    eio_req;
+typedef struct eio_dirent eio_dirent;
+
+typedef int (*eio_cb)(eio_req *req);
+
+#ifndef EIO_REQ_MEMBERS
+# define EIO_REQ_MEMBERS
+#endif
+
+#ifndef EIO_STRUCT_STAT
+# ifdef _WIN32
+#  define EIO_STRUCT_STAT struct _stati64
+#  define EIO_STRUCT_STATI64
+# else
+#  define EIO_STRUCT_STAT struct stat
+# endif
+#endif
+
+#ifdef _WIN32
+  typedef int      eio_uid_t;
+  typedef int      eio_gid_t;
+  #ifdef __MINGW32__ /* no intptr_t */
+    typedef ssize_t  eio_ssize_t;
+  #else
+    typedef intptr_t eio_ssize_t; /* or SSIZE_T */
+  #endif
+  #if __GNUC__
+    typedef long long eio_ino_t; /* signed for compatibility to msvc */
+  #else
+    typedef __int64   eio_ino_t; /* unsigned not supported by msvc */
+  #endif
+#else
+  typedef uid_t    eio_uid_t;
+  typedef gid_t    eio_gid_t;
+  typedef ssize_t  eio_ssize_t;
+  typedef ino_t    eio_ino_t;
+#endif
+
+#ifndef EIO_STRUCT_STATVFS
+# define EIO_STRUCT_STATVFS struct statvfs
+#endif
+
+/* managing working directories */
+
+typedef struct eio_pwd *eio_wd;
+
+#define EIO_CWD 0 /* the current working directory of the process, guaranteed to be a null pointer */
+#define EIO_INVALID_WD ((eio_wd)(int)-1) /* failure return for eio_wd_open */
+
+eio_wd eio_wd_open_sync (eio_wd wd, const char *path);
+void eio_wd_close_sync (eio_wd wd);
+
+/* for readdir */
+
+/* eio_readdir flags */
+enum
+{
+  EIO_READDIR_DENTS         = 0x01, /* ptr2 contains eio_dirents, not just the (unsorted) names */
+  EIO_READDIR_DIRS_FIRST    = 0x02, /* dirents gets sorted into a good stat() ing order to find directories first */
+  EIO_READDIR_STAT_ORDER    = 0x04, /* dirents gets sorted into a good stat() ing order to quickly stat all files */
+  EIO_READDIR_FOUND_UNKNOWN = 0x80, /* set by eio_readdir when *_ARRAY was set and any TYPE=UNKNOWN's were found */
+
+  EIO_READDIR_CUSTOM1       = 0x100, /* for use by apps */
+  EIO_READDIR_CUSTOM2       = 0x200  /* for use by apps */
+};
+
+/* using "typical" values in the hope that the compiler will do something sensible */
+enum eio_dtype
+{
+  EIO_DT_UNKNOWN =  0,
+  EIO_DT_FIFO    =  1,
+  EIO_DT_CHR     =  2,
+  EIO_DT_MPC     =  3, /* multiplexed char device (v7+coherent) */
+  EIO_DT_DIR     =  4,
+  EIO_DT_NAM     =  5, /* xenix special named file */
+  EIO_DT_BLK     =  6,
+  EIO_DT_MPB     =  7, /* multiplexed block device (v7+coherent) */
+  EIO_DT_REG     =  8,
+  EIO_DT_NWK     =  9, /* HP-UX network special */
+  EIO_DT_CMP     =  9, /* VxFS compressed */
+  EIO_DT_LNK     = 10,
+  /*  DT_SHAD    = 11,*/
+  EIO_DT_SOCK    = 12,
+  EIO_DT_DOOR    = 13, /* solaris door */
+  EIO_DT_WHT     = 14,
+  EIO_DT_MAX     = 15  /* highest DT_VALUE ever, hopefully */
+};
+
+struct eio_dirent
+{
+  int nameofs; /* offset of null-terminated name string in (char *)req->ptr2 */
+  unsigned short namelen; /* size of filename without trailing 0 */
+  unsigned char type; /* one of EIO_DT_* */
+  signed char score; /* internal use */
+  eio_ino_t inode; /* the inode number, if available, otherwise unspecified */
+};
+
+/* eio_msync flags */
+enum
+{
+  EIO_MS_ASYNC      = 1,
+  EIO_MS_INVALIDATE = 2,
+  EIO_MS_SYNC       = 4
+};
+
+/* eio_mtouch flags */
+enum
+{
+  EIO_MT_MODIFY     = 1
+};
+
+/* eio_sync_file_range flags */
+enum
+{
+  EIO_SYNC_FILE_RANGE_WAIT_BEFORE = 1,
+  EIO_SYNC_FILE_RANGE_WRITE       = 2,
+  EIO_SYNC_FILE_RANGE_WAIT_AFTER  = 4
+};
+
+/* eio_fallocate flags */
+enum
+{
+  /* these MUST match the value in linux/falloc.h */
+  EIO_FALLOC_FL_KEEP_SIZE  = 1,
+  EIO_FALLOC_FL_PUNCH_HOLE = 2
+};
+
+/* timestamps and differences - feel free to use double in your code directly */
+typedef double eio_tstamp;
+
+/* the eio request structure */
+enum
+{
+  EIO_CUSTOM,
+  EIO_WD_OPEN, EIO_WD_CLOSE,
+
+  EIO_CLOSE, EIO_DUP2,
+  EIO_SEEK, EIO_READ, EIO_WRITE,
+  EIO_READAHEAD, EIO_SENDFILE,
+  EIO_FSTAT, EIO_FSTATVFS,
+  EIO_FTRUNCATE, EIO_FUTIME, EIO_FCHMOD, EIO_FCHOWN,
+  EIO_SYNC, EIO_FSYNC, EIO_FDATASYNC, EIO_SYNCFS,
+  EIO_MSYNC, EIO_MTOUCH, EIO_SYNC_FILE_RANGE, EIO_FALLOCATE,
+  EIO_MLOCK, EIO_MLOCKALL,
+  EIO_GROUP, EIO_NOP,
+  EIO_BUSY,
+
+  /* these use wd + ptr1, but are emulated */
+  EIO_REALPATH,
+  EIO_READDIR,
+
+  /* all the following requests use wd + ptr1 as path in xxxat functions */
+  EIO_OPEN,
+  EIO_STAT, EIO_LSTAT, EIO_STATVFS,
+  EIO_TRUNCATE,
+  EIO_UTIME,
+  EIO_CHMOD,
+  EIO_CHOWN,
+  EIO_UNLINK, EIO_RMDIR, EIO_MKDIR, EIO_RENAME,
+  EIO_MKNOD,
+  EIO_LINK, EIO_SYMLINK, EIO_READLINK,
+
+  EIO_REQ_TYPE_NUM
+};
+
+/* seek whence modes */
+/* these are guaranteed to hasve the traditional 0, 1, 2 values, */
+/* so you might as wlel use those */
+enum
+{
+  EIO_SEEK_SET = 0,
+  EIO_SEEK_CUR = 1,
+  EIO_SEEK_END = 2
+};
+
+
+/* mlockall constants */
+enum
+{
+  EIO_MCL_CURRENT = 1,
+  EIO_MCL_FUTURE  = 2
+};
+
+/* request priorities */
+
+enum {
+  EIO_PRI_MIN     = -4,
+  EIO_PRI_MAX     =  4,
+  EIO_PRI_DEFAULT =  0
+};
+
+/* eio request structure */
+/* this structure is mostly read-only */
+/* when initialising it, all members must be zero-initialised */
+struct eio_req
+{
+  eio_req volatile *next; /* private ETP */
+
+  eio_wd wd;       /* all applicable requests: working directory of pathname, old name; wd_open: return wd */
+
+  eio_ssize_t result;  /* result of syscall, e.g. result = read (... */
+  off_t offs;      /* read, write, truncate, readahead, sync_file_range, fallocate: file offset, mknod: dev_t */
+  size_t size;     /* read, write, readahead, sendfile, msync, mlock, sync_file_range, fallocate: length */
+  void *ptr1;      /* all applicable requests: pathname, old name; readdir: optional eio_dirents */
+  void *ptr2;      /* all applicable requests: new name or memory buffer; readdir: name strings */
+  eio_tstamp nv1;  /* utime, futime: atime; busy: sleep time */
+  eio_tstamp nv2;  /* utime, futime: mtime */
+
+  int type;        /* EIO_xxx constant ETP */
+  int int1;        /* all applicable requests: file descriptor; sendfile: output fd; open, msync, mlockall, readdir: flags */
+  long int2;       /* chown, fchown: uid; sendfile: input fd; open, chmod, mkdir, mknod: file mode, seek: whence, sync_file_range, fallocate: flags */
+  long int3;       /* chown, fchown: gid; rename, link: working directory of new name */
+  int errorno;     /* errno value on syscall return */
+
+#if __i386 || __amd64
+  unsigned char cancelled;
+#else
+  sig_atomic_t cancelled;
+#endif
+
+  unsigned char flags; /* private */
+  signed char pri;     /* the priority */
+
+  void *data;
+  eio_cb finish;
+  void (*destroy)(eio_req *req); /* called when request no longer needed */
+  void (*feed)(eio_req *req);    /* only used for group requests */
+
+  EIO_REQ_MEMBERS
+
+  eio_req *grp, *grp_prev, *grp_next, *grp_first; /* private */
+};
+
+/* _private_ request flags */
+enum {
+  EIO_FLAG_PTR1_FREE = 0x01, /* need to free(ptr1) */
+  EIO_FLAG_PTR2_FREE = 0x02, /* need to free(ptr2) */
+  EIO_FLAG_GROUPADD  = 0x04  /* some request was added to the group */
+};
+
+/* undocumented/unsupported/private helper */
+/*void eio_page_align (void **addr, size_t *length);*/
+
+/* returns < 0 on error, errno set
+ * need_poll, if non-zero, will be called when results are available
+ * and eio_poll_cb needs to be invoked (it MUST NOT call eio_poll_cb itself).
+ * done_poll is called when the need to poll is gone.
+ */
+int eio_init (void (*want_poll)(void), void (*done_poll)(void));
+
+/* must be called regularly to handle pending requests */
+/* returns 0 if all requests were handled, -1 if not, or the value of EIO_FINISH if != 0 */
+int eio_poll (void);
+
+/* stop polling if poll took longer than duration seconds */
+void eio_set_max_poll_time (eio_tstamp nseconds);
+/* do not handle more then count requests in one call to eio_poll_cb */
+void eio_set_max_poll_reqs (unsigned int nreqs);
+
+/* set minimum required number
+ * maximum wanted number
+ * or maximum idle number of threads */
+void eio_set_min_parallel (unsigned int nthreads);
+void eio_set_max_parallel (unsigned int nthreads);
+void eio_set_max_idle     (unsigned int nthreads);
+void eio_set_idle_timeout (unsigned int seconds);
+
+unsigned int eio_nreqs    (void); /* number of requests in-flight */
+unsigned int eio_nready   (void); /* number of not-yet handled requests */
+unsigned int eio_npending (void); /* number of finished but unhandled requests */
+unsigned int eio_nthreads (void); /* number of worker threads in use currently */
+
+/*****************************************************************************/
+/* convenience wrappers */
+
+#ifndef EIO_NO_WRAPPERS
+eio_req *eio_wd_open   (const char *path, int pri, eio_cb cb, void *data); /* result=wd */
+eio_req *eio_wd_close  (eio_wd wd, int pri, eio_cb cb, void *data);
+eio_req *eio_nop       (int pri, eio_cb cb, void *data); /* does nothing except go through the whole process */
+eio_req *eio_busy      (eio_tstamp delay, int pri, eio_cb cb, void *data); /* ties a thread for this long, simulating busyness */
+eio_req *eio_sync      (int pri, eio_cb cb, void *data);
+eio_req *eio_fsync     (int fd, int pri, eio_cb cb, void *data);
+eio_req *eio_fdatasync (int fd, int pri, eio_cb cb, void *data);
+eio_req *eio_syncfs    (int fd, int pri, eio_cb cb, void *data);
+eio_req *eio_msync     (void *addr, size_t length, int flags, int pri, eio_cb cb, void *data);
+eio_req *eio_mtouch    (void *addr, size_t length, int flags, int pri, eio_cb cb, void *data);
+eio_req *eio_mlock     (void *addr, size_t length, int pri, eio_cb cb, void *data);
+eio_req *eio_mlockall  (int flags, int pri, eio_cb cb, void *data);
+eio_req *eio_sync_file_range (int fd, off_t offset, size_t nbytes, unsigned int flags, int pri, eio_cb cb, void *data);
+eio_req *eio_fallocate (int fd, int mode, off_t offset, size_t len, int pri, eio_cb cb, void *data);
+eio_req *eio_close     (int fd, int pri, eio_cb cb, void *data);
+eio_req *eio_readahead (int fd, off_t offset, size_t length, int pri, eio_cb cb, void *data);
+eio_req *eio_seek      (int fd, off_t offset, int whence, int pri, eio_cb cb, void *data);
+eio_req *eio_read      (int fd, void *buf, size_t length, off_t offset, int pri, eio_cb cb, void *data);
+eio_req *eio_write     (int fd, void *buf, size_t length, off_t offset, int pri, eio_cb cb, void *data);
+eio_req *eio_fstat     (int fd, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */
+eio_req *eio_fstatvfs  (int fd, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */
+eio_req *eio_futime    (int fd, eio_tstamp atime, eio_tstamp mtime, int pri, eio_cb cb, void *data);
+eio_req *eio_ftruncate (int fd, off_t offset, int pri, eio_cb cb, void *data);
+eio_req *eio_fchmod    (int fd, mode_t mode, int pri, eio_cb cb, void *data);
+eio_req *eio_fchown    (int fd, eio_uid_t uid, eio_gid_t gid, int pri, eio_cb cb, void *data);
+eio_req *eio_dup2      (int fd, int fd2, int pri, eio_cb cb, void *data);
+eio_req *eio_sendfile  (int out_fd, int in_fd, off_t in_offset, size_t length, int pri, eio_cb cb, void *data);
+eio_req *eio_open      (const char *path, int flags, mode_t mode, int pri, eio_cb cb, void *data);
+eio_req *eio_utime     (const char *path, eio_tstamp atime, eio_tstamp mtime, int pri, eio_cb cb, void *data);
+eio_req *eio_truncate  (const char *path, off_t offset, int pri, eio_cb cb, void *data);
+eio_req *eio_chown     (const char *path, eio_uid_t uid, eio_gid_t gid, int pri, eio_cb cb, void *data);
+eio_req *eio_chmod     (const char *path, mode_t mode, int pri, eio_cb cb, void *data);
+eio_req *eio_mkdir     (const char *path, mode_t mode, int pri, eio_cb cb, void *data);
+eio_req *eio_readdir   (const char *path, int flags, int pri, eio_cb cb, void *data); /* result=ptr2 allocated dynamically */
+eio_req *eio_rmdir     (const char *path, int pri, eio_cb cb, void *data);
+eio_req *eio_unlink    (const char *path, int pri, eio_cb cb, void *data);
+eio_req *eio_readlink  (const char *path, int pri, eio_cb cb, void *data); /* result=ptr2 allocated dynamically */
+eio_req *eio_realpath  (const char *path, int pri, eio_cb cb, void *data); /* result=ptr2 allocated dynamically */
+eio_req *eio_stat      (const char *path, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */
+eio_req *eio_lstat     (const char *path, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */
+eio_req *eio_statvfs   (const char *path, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */
+eio_req *eio_mknod     (const char *path, mode_t mode, dev_t dev, int pri, eio_cb cb, void *data);
+eio_req *eio_link      (const char *path, const char *new_path, int pri, eio_cb cb, void *data);
+eio_req *eio_symlink   (const char *path, const char *new_path, int pri, eio_cb cb, void *data);
+eio_req *eio_rename    (const char *path, const char *new_path, int pri, eio_cb cb, void *data);
+eio_req *eio_custom    (void (*execute)(eio_req *), int pri, eio_cb cb, void *data);
+#endif
+
+/*****************************************************************************/
+/* groups */
+
+eio_req *eio_grp       (eio_cb cb, void *data);
+void eio_grp_feed      (eio_req *grp, void (*feed)(eio_req *req), int limit);
+void eio_grp_limit     (eio_req *grp, int limit);
+void eio_grp_add       (eio_req *grp, eio_req *req);
+void eio_grp_cancel    (eio_req *grp); /* cancels all sub requests but not the group */
+
+/*****************************************************************************/
+/* request api */
+
+/* true if the request was cancelled, useful in the invoke callback */
+#define EIO_CANCELLED(req)   ((req)->cancelled)
+
+#define EIO_RESULT(req)      ((req)->result)
+/* returns a pointer to the result buffer allocated by eio */
+#define EIO_BUF(req)         ((req)->ptr2)
+#define EIO_STAT_BUF(req)    ((EIO_STRUCT_STAT    *)EIO_BUF(req))
+#define EIO_STATVFS_BUF(req) ((EIO_STRUCT_STATVFS *)EIO_BUF(req))
+#define EIO_PATH(req)        ((char *)(req)->ptr1)
+
+/* submit a request for execution */
+void eio_submit (eio_req *req);
+/* cancel a request as soon fast as possible, if possible */
+void eio_cancel (eio_req *req);
+
+/*****************************************************************************/
+/* convenience functions */
+
+eio_ssize_t eio_sendfile_sync (int ofd, int ifd, off_t offset, size_t count);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/ext/libeio/install-sh b/ext/libeio/install-sh
new file mode 100755
index 0000000..6781b98
--- /dev/null
+++ b/ext/libeio/install-sh
@@ -0,0 +1,520 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2009-04-28.21; # UTC
+
+# 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-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/ext/libeio/libeio.m4 b/ext/libeio/libeio.m4
new file mode 100644
index 0000000..0fbff02
--- /dev/null
+++ b/ext/libeio/libeio.m4
@@ -0,0 +1,195 @@
+dnl openbsd in it's neverending brokenness requires stdint.h for intptr_t,
+dnl but that header isn't very portable...
+AC_CHECK_HEADERS([stdint.h sys/syscall.h sys/prctl.h])
+
+AC_SEARCH_LIBS(
+   pthread_create,
+   [pthread pthreads pthreadVC2],
+   ,
+   [AC_MSG_ERROR(pthread functions not found)]
+)
+
+AC_CACHE_CHECK(for utimes, ac_cv_utimes, [AC_LINK_IFELSE([[
+#include <sys/types.h>
+#include <sys/time.h>
+#include <utime.h>
+struct timeval tv[2];
+int res;
+int main (void)
+{
+   res = utimes ("/", tv);
+   return 0;
+}
+]],ac_cv_utimes=yes,ac_cv_utimes=no)])
+test $ac_cv_utimes = yes && AC_DEFINE(HAVE_UTIMES, 1, utimes(2) is available)
+
+AC_CACHE_CHECK(for futimes, ac_cv_futimes, [AC_LINK_IFELSE([[
+#include <sys/types.h>
+#include <sys/time.h>
+#include <utime.h>
+struct timeval tv[2];
+int res;
+int fd;
+int main (void)
+{
+   res = futimes (fd, tv);
+   return 0;
+}
+]],ac_cv_futimes=yes,ac_cv_futimes=no)])
+test $ac_cv_futimes = yes && AC_DEFINE(HAVE_FUTIMES, 1, futimes(2) is available)
+
+AC_CACHE_CHECK(for readahead, ac_cv_readahead, [AC_LINK_IFELSE([
+#include <fcntl.h>
+int main (void)
+{
+   int fd = 0;
+   size_t count = 2;
+   ssize_t res;
+   res = readahead (fd, 0, count);
+   return 0;
+}
+],ac_cv_readahead=yes,ac_cv_readahead=no)])
+test $ac_cv_readahead = yes && AC_DEFINE(HAVE_READAHEAD, 1, readahead(2) is available (linux))
+
+AC_CACHE_CHECK(for fdatasync, ac_cv_fdatasync, [AC_LINK_IFELSE([
+#include <unistd.h>
+int main (void)
+{
+   int fd = 0;
+   fdatasync (fd);
+   return 0;
+}
+],ac_cv_fdatasync=yes,ac_cv_fdatasync=no)])
+test $ac_cv_fdatasync = yes && AC_DEFINE(HAVE_FDATASYNC, 1, fdatasync(2) is available)
+
+AC_CACHE_CHECK(for sendfile, ac_cv_sendfile, [AC_LINK_IFELSE([
+# include <sys/types.h>
+#if __linux
+# include <sys/sendfile.h>
+#elif __FreeBSD__ || defined __APPLE__
+# include <sys/socket.h>
+# include <sys/uio.h>
+#elif __hpux
+# include <sys/socket.h>
+#else
+# error unsupported architecture
+#endif
+int main (void)
+{
+   int fd = 0;
+   off_t offset = 1;
+   size_t count = 2;
+   ssize_t res;
+#if __linux
+   res = sendfile (fd, fd, offset, count);
+#elif __FreeBSD__
+   res = sendfile (fd, fd, offset, count, 0, &offset, 0);
+#elif __hpux
+   res = sendfile (fd, fd, offset, count, 0, 0);
+#endif
+   return 0;
+}
+],ac_cv_sendfile=yes,ac_cv_sendfile=no)])
+test $ac_cv_sendfile = yes && AC_DEFINE(HAVE_SENDFILE, 1, sendfile(2) is available and supported)
+
+AC_CACHE_CHECK(for sync_file_range, ac_cv_sync_file_range, [AC_LINK_IFELSE([
+#include <fcntl.h>
+int main (void)
+{
+   int fd = 0;
+   off64_t offset = 1;
+   off64_t nbytes = 1;
+   unsigned int flags = SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER;
+   ssize_t res;
+   res = sync_file_range (fd, offset, nbytes, flags);
+   return 0;
+}
+],ac_cv_sync_file_range=yes,ac_cv_sync_file_range=no)])
+test $ac_cv_sync_file_range = yes && AC_DEFINE(HAVE_SYNC_FILE_RANGE, 1, sync_file_range(2) is available)
+
+AC_CACHE_CHECK(for fallocate, ac_cv_linux_fallocate, [AC_LINK_IFELSE([
+#include <fcntl.h>
+int main (void)
+{
+   int fd = 0;
+   int mode = 0;
+   off_t offset = 1;
+   off_t len = 1;
+   int res;
+   res = fallocate (fd, mode, offset, len);
+   return 0;
+}
+],ac_cv_linux_fallocate=yes,ac_cv_linux_fallocate=no)])
+test $ac_cv_linux_fallocate = yes && AC_DEFINE(HAVE_LINUX_FALLOCATE, 1, fallocate(2) is available)
+
+AC_CACHE_CHECK(for sys_syncfs, ac_cv_sys_syncfs, [AC_LINK_IFELSE([
+#include <unistd.h>
+#include <sys/syscall.h>
+int main (void)
+{
+  int res = syscall (__NR_syncfs, (int)0);
+}
+],ac_cv_sys_syncfs=yes,ac_cv_sys_syncfs=no)])
+test $ac_cv_sys_syncfs = yes && AC_DEFINE(HAVE_SYS_SYNCFS, 1, syscall(__NR_syncfs) is available)
+
+AC_CACHE_CHECK(for prctl_set_name, ac_cv_prctl_set_name, [AC_LINK_IFELSE([
+#include <sys/prctl.h>
+int main (void)
+{
+  char name[] = "test123";
+  int res = prctl (PR_SET_NAME, (unsigned long)name, 0, 0, 0);
+}
+],ac_cv_prctl_set_name=yes,ac_cv_prctl_set_name=no)])
+test $ac_cv_prctl_set_name = yes && AC_DEFINE(HAVE_PRCTL_SET_NAME, 1, prctl(PR_SET_NAME) is available)
+
+dnl #############################################################################
+dnl # these checks exist for the benefit of IO::AIO
+
+dnl at least uclibc defines _POSIX_ADVISORY_INFO without *any* of the required
+dnl functionality actually being present. ugh.
+AC_CACHE_CHECK(for posix_madvise, ac_cv_posix_madvise, [AC_LINK_IFELSE([
+#include <sys/mman.h>
+int main (void)
+{
+   int res = posix_madvise ((void *)0, (size_t)0, POSIX_MADV_NORMAL);
+   int a = POSIX_MADV_SEQUENTIAL;
+   int b = POSIX_MADV_RANDOM;
+   int c = POSIX_MADV_WILLNEED;
+   int d = POSIX_MADV_DONTNEED;
+   return 0;
+}
+],ac_cv_posix_madvise=yes,ac_cv_posix_madvise=no)])
+test $ac_cv_posix_madvise = yes && AC_DEFINE(HAVE_POSIX_MADVISE, 1, posix_madvise(2) is available)
+
+AC_CACHE_CHECK(for posix_fadvise, ac_cv_posix_fadvise, [AC_LINK_IFELSE([
+#define _XOPEN_SOURCE 600
+#include <fcntl.h>
+int main (void)
+{
+   int res = posix_fadvise ((int)0, (off_t)0, (off_t)0, POSIX_FADV_NORMAL);
+   int a = POSIX_FADV_SEQUENTIAL;
+   int b = POSIX_FADV_NOREUSE;
+   int c = POSIX_FADV_RANDOM;
+   int d = POSIX_FADV_WILLNEED;
+   int e = POSIX_FADV_DONTNEED;
+   return 0;
+}
+],ac_cv_posix_fadvise=yes,ac_cv_posix_fadvise=no)])
+test $ac_cv_posix_fadvise = yes && AC_DEFINE(HAVE_POSIX_FADVISE, 1, posix_fadvise(2) is available)
+
+dnl lots of linux specifics
+AC_CHECK_HEADERS([linux/fs.h linux/fiemap.h])
+
+AC_CACHE_CHECK([for splice, vmsplice and tee], ac_cv_linux_splice, [AC_LINK_IFELSE([
+#include <fcntl.h>
+int main (void)
+{
+   ssize_t res;
+   res = splice ((int)0, (loff_t)0, (int)0, (loff_t *)0, (size_t)0, SPLICE_F_MOVE | SPLICE_F_NONBLOCK | SPLICE_F_MORE);
+   res = tee ((int)0, (int)0, (size_t)0, SPLICE_F_NONBLOCK);
+   res = vmsplice ((int)0, (struct iovec *)0, 0, SPLICE_F_NONBLOCK | SPLICE_F_GIFT);
+   return 0;
+}
+],ac_cv_linux_splice=yes,ac_cv_linux_splice=no)])
+test $ac_cv_linux_splice = yes && AC_DEFINE(HAVE_LINUX_SPLICE, 1, splice/vmsplice/tee(2) are available)
+
diff --git a/ext/libeio/ltmain.sh b/ext/libeio/ltmain.sh
new file mode 100755
index 0000000..3061e3c
--- /dev/null
+++ b/ext/libeio/ltmain.sh
@@ -0,0 +1,9636 @@
+
+# libtool (GNU libtool) 2.4
+# Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010 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.
+
+# GNU Libtool 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.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [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
+#       --mode=MODE          use operation mode MODE
+#       --preserve-dup-deps  don't remove duplicate dependency libraries
+#       --quiet, --silent    don't print informational messages
+#       --no-quiet, --no-silent
+#                            print informational messages (default)
+#       --tag=TAG            use configuration variables from tag TAG
+#   -v, --verbose            print more informational messages than default
+#       --no-verbose         don't print the extra informational messages
+#       --version            print version information
+#   -h, --help, --help-all   print short, long, or detailed help message
+#
+# 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.  When passed as first option,
+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+#         host-triplet:	$host
+#         shell:		$SHELL
+#         compiler:		$LTCC
+#         compiler flags:		$LTCFLAGS
+#         linker:		$LD (gnu? $with_gnu_ld)
+#         $progname:	(GNU libtool) 2.4
+#         automake:	$automake_version
+#         autoconf:	$autoconf_version
+#
+# Report bugs to <bug-libtool at gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION=2.4
+TIMESTAMP=""
+package_revision=1.3293
+
+# Be 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
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# NLS nuisances: We save the old values to restore during execute mode.
+lt_user_locale=
+lt_safe_locale=
+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_var=C
+	  export $lt_var
+	  lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+	  lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+	fi"
+done
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
+
+$lt_unset CDPATH
+
+
+# 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"
+
+
+
+: ${CP="cp -f"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
+: ${EGREP="grep -E"}
+: ${FGREP="grep -F"}
+: ${GREP="grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77	  # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" 	$lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+    func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+    if test "X$func_dirname_result" = "X${1}"; then
+      func_dirname_result="${3}"
+    else
+      func_dirname_result="$func_dirname_result${2}"
+    fi
+} # func_dirname may be replaced by extended shell implementation
+
+
+# func_basename file
+func_basename ()
+{
+    func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+} # func_basename may be replaced by extended shell implementation
+
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+    # Extract subdirectory from the argument.
+    func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
+    if test "X$func_dirname_result" = "X${1}"; then
+      func_dirname_result="${3}"
+    else
+      func_dirname_result="$func_dirname_result${2}"
+    fi
+    func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
+} # func_dirname_and_basename may be replaced by extended shell implementation
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+    case ${2} in
+      .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+      *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+    esac
+} # func_stripname may be replaced by extended shell implementation
+
+
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar='s,^/\([^/]*\).*$,\1,'
+pathcdr='s,^/[^/]*,,'
+removedotparts=':dotsl
+		s@/\./@/@g
+		t dotsl
+		s,/\.$,/,'
+collapseslashes='s@/\{1,\}@/@g'
+finalslash='s,/*$,/,'
+
+# func_normal_abspath PATH
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+#             value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+  # Start from root dir and reassemble the path.
+  func_normal_abspath_result=
+  func_normal_abspath_tpath=$1
+  func_normal_abspath_altnamespace=
+  case $func_normal_abspath_tpath in
+    "")
+      # Empty path, that just means $cwd.
+      func_stripname '' '/' "`pwd`"
+      func_normal_abspath_result=$func_stripname_result
+      return
+    ;;
+    # The next three entries are used to spot a run of precisely
+    # two leading slashes without using negated character classes;
+    # we take advantage of case's first-match behaviour.
+    ///*)
+      # Unusual form of absolute path, do nothing.
+    ;;
+    //*)
+      # Not necessarily an ordinary path; POSIX reserves leading '//'
+      # and for example Cygwin uses it to access remote file shares
+      # over CIFS/SMB, so we conserve a leading double slash if found.
+      func_normal_abspath_altnamespace=/
+    ;;
+    /*)
+      # Absolute path, do nothing.
+    ;;
+    *)
+      # Relative path, prepend $cwd.
+      func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+    ;;
+  esac
+  # Cancel out all the simple stuff to save iterations.  We also want
+  # the path to end with a slash for ease of parsing, so make sure
+  # there is one (and only one) here.
+  func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
+  while :; do
+    # Processed it all yet?
+    if test "$func_normal_abspath_tpath" = / ; then
+      # If we ascended to the root using ".." the result may be empty now.
+      if test -z "$func_normal_abspath_result" ; then
+        func_normal_abspath_result=/
+      fi
+      break
+    fi
+    func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$pathcar"`
+    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$pathcdr"`
+    # Figure out what to do with it
+    case $func_normal_abspath_tcomponent in
+      "")
+        # Trailing empty path component, ignore it.
+      ;;
+      ..)
+        # Parent dir; strip last assembled component from result.
+        func_dirname "$func_normal_abspath_result"
+        func_normal_abspath_result=$func_dirname_result
+      ;;
+      *)
+        # Actual path component, append it.
+        func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
+      ;;
+    esac
+  done
+  # Restore leading double-slash if one was found on entry.
+  func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+# func_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+#             value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+  func_relative_path_result=
+  func_normal_abspath "$1"
+  func_relative_path_tlibdir=$func_normal_abspath_result
+  func_normal_abspath "$2"
+  func_relative_path_tbindir=$func_normal_abspath_result
+
+  # Ascend the tree starting from libdir
+  while :; do
+    # check if we have found a prefix of bindir
+    case $func_relative_path_tbindir in
+      $func_relative_path_tlibdir)
+        # found an exact match
+        func_relative_path_tcancelled=
+        break
+        ;;
+      $func_relative_path_tlibdir*)
+        # found a matching prefix
+        func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+        func_relative_path_tcancelled=$func_stripname_result
+        if test -z "$func_relative_path_result"; then
+          func_relative_path_result=.
+        fi
+        break
+        ;;
+      *)
+        func_dirname $func_relative_path_tlibdir
+        func_relative_path_tlibdir=${func_dirname_result}
+        if test "x$func_relative_path_tlibdir" = x ; then
+          # Have to descend all the way to the root!
+          func_relative_path_result=../$func_relative_path_result
+          func_relative_path_tcancelled=$func_relative_path_tbindir
+          break
+        fi
+        func_relative_path_result=../$func_relative_path_result
+        ;;
+    esac
+  done
+
+  # Now calculate path; take care to avoid doubling-up slashes.
+  func_stripname '' '/' "$func_relative_path_result"
+  func_relative_path_result=$func_stripname_result
+  func_stripname '/' '/' "$func_relative_path_tcancelled"
+  if test "x$func_stripname_result" != x ; then
+    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+  fi
+
+  # Normalisation. If bindir is libdir, return empty string,
+  # else relative path ending with a slash; either way, target
+  # file name can be directly appended.
+  if test ! -z "$func_relative_path_result"; then
+    func_stripname './' '' "$func_relative_path_result/"
+    func_relative_path_result=$func_stripname_result
+  fi
+}
+
+# The name of this program:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+  [\\/]*|[A-Za-z]:\\*) ;;
+  *[\\/]*)
+     progdir=$func_dirname_result
+     progdir=`cd "$progdir" && pwd`
+     progpath="$progdir/$progname"
+     ;;
+  *)
+     save_IFS="$IFS"
+     IFS=:
+     for progdir in $PATH; do
+       IFS="$save_IFS"
+       test -x "$progdir/$progname" && break
+     done
+     IFS="$save_IFS"
+     test -n "$progdir" || progdir=`pwd`
+     progpath="$progdir/$progname"
+     ;;
+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 that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+
+# Sed substitution that converts a w32 file name or path
+# which contains forward slashes, into one that contains
+# (escaped) backslashes.  A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+  s/$bs4/&\\
+/g
+  s/^$bs2$dollar/$bs&/
+  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+  s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+    $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $opt_verbose && func_echo ${1+"$@"}
+
+    # A bug in bash halts the script if the last line of a function
+    # fails when set -e is in force, so we need another command to
+    # work around that:
+    :
+}
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*"
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+    $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
+
+    # bash bug again:
+    :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+    func_error ${1+"$@"}
+    func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information."  ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+    $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+    my_directory_path="$1"
+    my_dir_list=
+
+    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+      # Protect directory names starting with `-'
+      case $my_directory_path in
+        -*) my_directory_path="./$my_directory_path" ;;
+      esac
+
+      # While some portion of DIR does not yet exist...
+      while test ! -d "$my_directory_path"; do
+        # ...make a list in topmost first order.  Use a colon delimited
+	# list incase some portion of path contains whitespace.
+        my_dir_list="$my_directory_path:$my_dir_list"
+
+        # If the last portion added has no slash in it, the list is done
+        case $my_directory_path in */*) ;; *) break ;; esac
+
+        # ...otherwise throw away the child directory and loop
+        my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
+      done
+      my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
+
+      save_mkdir_p_IFS="$IFS"; IFS=':'
+      for my_dir in $my_dir_list; do
+	IFS="$save_mkdir_p_IFS"
+        # mkdir can fail with a `File exist' error if two processes
+        # try to create one of the directories concurrently.  Don't
+        # stop in that case!
+        $MKDIR "$my_dir" 2>/dev/null || :
+      done
+      IFS="$save_mkdir_p_IFS"
+
+      # Bail out if we (or some other process) failed to create a directory.
+      test -d "$my_directory_path" || \
+        func_fatal_error "Failed to create \`$1'"
+    fi
+}
+
+
+# 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 "$opt_dry_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" || \
+        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+    fi
+
+    $ECHO "$my_tmpdir"
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+    case $1 in
+      *[\\\`\"\$]*)
+	func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
+      *)
+        func_quote_for_eval_unquoted_result="$1" ;;
+    esac
+
+    case $func_quote_for_eval_unquoted_result in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting, command substitution and and variable
+      # expansion for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+        ;;
+      *)
+        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+    esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+    case $1 in
+      *[\\\`\"]*)
+	my_arg=`$ECHO "$1" | $SED \
+	    -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+      *)
+        my_arg="$1" ;;
+    esac
+
+    case $my_arg in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting and command substitution for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+        my_arg="\"$my_arg\""
+        ;;
+    esac
+
+    func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
+
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$my_cmd"
+      my_status=$?
+      if test "$my_status" -eq 0; then :; else
+	eval "(exit $my_status); $my_fail_exp"
+      fi
+    fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.  Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
+
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$lt_user_locale
+	    $my_cmd"
+      my_status=$?
+      eval "$lt_safe_locale"
+      if test "$my_status" -eq 0; then :; else
+	eval "(exit $my_status); $my_fail_exp"
+      fi
+    fi
+}
+
+# func_tr_sh
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result.  All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+  case $1 in
+  [0-9]* | *[!a-zA-Z0-9_]*)
+    func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+    ;;
+  * )
+    func_tr_sh_result=$1
+    ;;
+  esac
+}
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $opt_debug
+
+    $SED -n '/(C)/!b go
+	:more
+	/\./!{
+	  N
+	  s/\n# / /
+	  b more
+	}
+	:go
+	/^# '$PROGRAM' (GNU /,/# warranty; / {
+        s/^# //
+	s/^# *$//
+        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+        p
+     }' < "$progpath"
+     exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+    $opt_debug
+
+    $SED -n '/^# Usage:/,/^#  *.*--help/ {
+        s/^# //
+	s/^# *$//
+	s/\$progname/'$progname'/
+	p
+    }' < "$progpath"
+    echo
+    $ECHO "run \`$progname --help | more' for full usage"
+    exit $?
+}
+
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
+func_help ()
+{
+    $opt_debug
+
+    $SED -n '/^# Usage:/,/# Report bugs to/ {
+	:print
+        s/^# //
+	s/^# *$//
+	s*\$progname*'$progname'*
+	s*\$host*'"$host"'*
+	s*\$SHELL*'"$SHELL"'*
+	s*\$LTCC*'"$LTCC"'*
+	s*\$LTCFLAGS*'"$LTCFLAGS"'*
+	s*\$LD*'"$LD"'*
+	s/\$with_gnu_ld/'"$with_gnu_ld"'/
+	s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+	s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+	p
+	d
+     }
+     /^# .* home page:/b print
+     /^# General help using/b print
+     ' < "$progpath"
+    ret=$?
+    if test -z "$1"; then
+      exit $ret
+    fi
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+    $opt_debug
+
+    func_error "missing argument for $1."
+    exit_cmd=exit
+}
+
+
+# func_split_short_opt shortopt
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+func_split_short_opt ()
+{
+    my_sed_short_opt='1s/^\(..\).*$/\1/;q'
+    my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
+
+    func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
+    func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
+} # func_split_short_opt may be replaced by extended shell implementation
+
+
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
+{
+    my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+    my_sed_long_arg='1s/^--[^=]*=//'
+
+    func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
+    func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
+} # func_split_long_opt may be replaced by extended shell implementation
+
+exit_cmd=:
+
+
+
+
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+nonopt=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+# 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=
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+    eval "${1}=\$${1}\${2}"
+} # func_append may be replaced by extended shell implementation
+
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
+{
+    func_quote_for_eval "${2}"
+    eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
+} # func_append_quoted may be replaced by extended shell implementation
+
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+    func_arith_result=`expr "${@}"`
+} # func_arith may be replaced by extended shell implementation
+
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+    func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
+} # func_len may be replaced by extended shell implementation
+
+
+# func_lo2o object
+func_lo2o ()
+{
+    func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+} # func_lo2o may be replaced by extended shell implementation
+
+
+# func_xform libobj-or-source
+func_xform ()
+{
+    func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+} # func_xform may be replaced by extended shell implementation
+
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+    func_error ${1+"$@"}
+    func_error "See the $PACKAGE documentation for more information."
+    func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+    re_begincf='^# ### BEGIN LIBTOOL'
+    re_endcf='^# ### END LIBTOOL'
+
+    # Default configuration.
+    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+    done
+
+    exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_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 $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+  # Global variable:
+  tagname="$1"
+
+  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+  sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+  # Validate tagname.
+  case $tagname in
+    *[!-_A-Za-z0-9,/]*)
+      func_fatal_error "invalid tag name: $tagname"
+      ;;
+  esac
+
+  # Don't test for the "default" C tag, as we know it's
+  # there but not specially marked.
+  case $tagname in
+    CC) ;;
+    *)
+      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+	taglist="$taglist $tagname"
+
+	# Evaluate the configuration.  Be careful to quote the path
+	# and the sed script, to avoid splitting on whitespace, but
+	# also don't use non-portable quotes within backquotes within
+	# quotes we have to do it in 2 steps:
+	extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+	eval "$extractedcf"
+      else
+	func_error "ignoring unknown tag $tagname"
+      fi
+      ;;
+  esac
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+  if test "$package_revision" != "$macro_revision"; then
+    if test "$VERSION" != "$macro_version"; then
+      if test -z "$macro_version"; then
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      else
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      fi
+    else
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+    fi
+
+    exit $EXIT_MISMATCH
+  fi
+}
+
+
+# Shorthand for --mode=foo, only valid as the first argument
+case $1 in
+clean|clea|cle|cl)
+  shift; set dummy --mode clean ${1+"$@"}; shift
+  ;;
+compile|compil|compi|comp|com|co|c)
+  shift; set dummy --mode compile ${1+"$@"}; shift
+  ;;
+execute|execut|execu|exec|exe|ex|e)
+  shift; set dummy --mode execute ${1+"$@"}; shift
+  ;;
+finish|finis|fini|fin|fi|f)
+  shift; set dummy --mode finish ${1+"$@"}; shift
+  ;;
+install|instal|insta|inst|ins|in|i)
+  shift; set dummy --mode install ${1+"$@"}; shift
+  ;;
+link|lin|li|l)
+  shift; set dummy --mode link ${1+"$@"}; shift
+  ;;
+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+  shift; set dummy --mode uninstall ${1+"$@"}; shift
+  ;;
+esac
+
+
+
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
+
+
+# Parse options once, thoroughly.  This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
+{
+  # this just eases exit handling
+  while test $# -gt 0; do
+    opt="$1"
+    shift
+    case $opt in
+      --debug|-x)	opt_debug='set -x'
+			func_echo "enabling shell trace mode"
+			$opt_debug
+			;;
+      --dry-run|--dryrun|-n)
+			opt_dry_run=:
+			;;
+      --config)
+			opt_config=:
+func_config
+			;;
+      --dlopen|-dlopen)
+			optarg="$1"
+			opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
+			shift
+			;;
+      --preserve-dup-deps)
+			opt_preserve_dup_deps=:
+			;;
+      --features)
+			opt_features=:
+func_features
+			;;
+      --finish)
+			opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+			;;
+      --help)
+			opt_help=:
+			;;
+      --help-all)
+			opt_help_all=:
+opt_help=': help-all'
+			;;
+      --mode)
+			test $# = 0 && func_missing_arg $opt && break
+			optarg="$1"
+			opt_mode="$optarg"
+case $optarg in
+  # Valid mode arguments:
+  clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+  # Catch anything else as an error
+  *) func_error "invalid argument for $opt"
+     exit_cmd=exit
+     break
+     ;;
+esac
+			shift
+			;;
+      --no-silent|--no-quiet)
+			opt_silent=false
+func_append preserve_args " $opt"
+			;;
+      --no-verbose)
+			opt_verbose=false
+func_append preserve_args " $opt"
+			;;
+      --silent|--quiet)
+			opt_silent=:
+func_append preserve_args " $opt"
+        opt_verbose=false
+			;;
+      --verbose|-v)
+			opt_verbose=:
+func_append preserve_args " $opt"
+opt_silent=false
+			;;
+      --tag)
+			test $# = 0 && func_missing_arg $opt && break
+			optarg="$1"
+			opt_tag="$optarg"
+func_append preserve_args " $opt $optarg"
+func_enable_tag "$optarg"
+			shift
+			;;
+
+      -\?|-h)		func_usage				;;
+      --help)		func_help				;;
+      --version)	func_version				;;
+
+      # Separate optargs to long options:
+      --*=*)
+			func_split_long_opt "$opt"
+			set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
+			shift
+			;;
+
+      # Separate non-argument short options:
+      -\?*|-h*|-n*|-v*)
+			func_split_short_opt "$opt"
+			set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+			shift
+			;;
+
+      --)		break					;;
+      -*)		func_fatal_help "unrecognized option \`$opt'" ;;
+      *)		set dummy "$opt" ${1+"$@"};	shift; break  ;;
+    esac
+  done
+
+  # Validate options:
+
+  # save first non-option argument
+  if test "$#" -gt 0; then
+    nonopt="$opt"
+    shift
+  fi
+
+  # preserve --debug
+  test "$opt_debug" = : || func_append preserve_args " --debug"
+
+  case $host in
+    *cygwin* | *mingw* | *pw32* | *cegcc*)
+      # don't eliminate duplications in $postdeps and $predeps
+      opt_duplicate_compiler_generated_deps=:
+      ;;
+    *)
+      opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+      ;;
+  esac
+
+  $opt_help || {
+    # Sanity checks first:
+    func_check_version_match
+
+    if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+      func_fatal_configuration "not configured to build any kind of library"
+    fi
+
+    # Darwin sucks
+    eval std_shrext=\"$shrext_cmds\"
+
+    # Only execute mode is allowed to have -dlopen flags.
+    if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
+      func_error "unrecognized option \`-dlopen'"
+      $ECHO "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Change the help message to a mode-specific one.
+    generic_help="$help"
+    help="Try \`$progname --help --mode=$opt_mode' for more information."
+  }
+
+
+  # Bail if the options were screwed
+  $exit_cmd $EXIT_FAILURE
+}
+
+
+
+
+## ----------- ##
+##    Main.    ##
+## ----------- ##
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+    test -f "$1" &&
+      $SED -e 4q "$1" 2>/dev/null \
+        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs.  To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway.  Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+    lalib_p=no
+    if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+	for lalib_p_l in 1 2 3 4
+	do
+	    read lalib_p_line
+	    case "$lalib_p_line" in
+		\#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+	    esac
+	done
+	exec 0<&5 5<&-
+    fi
+    test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+    func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+    func_ltwrapper_exec_suffix=
+    case $1 in
+    *.exe) ;;
+    *) func_ltwrapper_exec_suffix=.exe ;;
+    esac
+    $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+    func_dirname_and_basename "$1" "" "."
+    func_stripname '' '.exe' "$func_basename_result"
+    func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+    func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+    $opt_debug
+    save_ifs=$IFS; IFS='~'
+    for cmd in $1; do
+      IFS=$save_ifs
+      eval cmd=\"$cmd\"
+      func_show_eval "$cmd" "${2-:}"
+    done
+    IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE 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.
+func_source ()
+{
+    $opt_debug
+    case $1 in
+    */* | *\\*)	. "$1" ;;
+    *)		. "./$1" ;;
+    esac
+}
+
+
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot.  Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+  func_resolve_sysroot_result=$1
+  case $func_resolve_sysroot_result in
+  =*)
+    func_stripname '=' '' "$func_resolve_sysroot_result"
+    func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+    ;;
+  esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+  case "$lt_sysroot:$1" in
+  ?*:"$lt_sysroot"*)
+    func_stripname "$lt_sysroot" '' "$1"
+    func_replace_sysroot_result="=$func_stripname_result"
+    ;;
+  *)
+    # Including no sysroot.
+    func_replace_sysroot_result=$1
+    ;;
+  esac
+}
+
+# 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 ()
+{
+    $opt_debug
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+	func_append_quoted CC_quoted "$arg"
+      done
+      CC_expanded=`func_echo_all $CC`
+      CC_quoted_expanded=`func_echo_all $CC_quoted`
+      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 "* | " $CC_expanded "* | "$CC_expanded "* | \
+      " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
+      # 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.
+	      func_append_quoted CC_quoted "$arg"
+	    done
+	    CC_expanded=`func_echo_all $CC`
+	    CC_quoted_expanded=`func_echo_all $CC_quoted`
+	    case "$@ " in
+	    " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+	    " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
+	      # 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
+	  func_echo "unable to infer tagged configuration"
+	  func_fatal_error "specify a tag with \`--tag'"
+#	else
+#	  func_verbose "using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+    write_libobj=${1}
+    if test "$build_libtool_libs" = yes; then
+      write_lobj=\'${2}\'
+    else
+      write_lobj=none
+    fi
+
+    if test "$build_old_libs" = yes; then
+      write_oldobj=\'${3}\'
+    else
+      write_oldobj=none
+    fi
+
+    $opt_dry_run || {
+      cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+      $MV "${write_libobj}T" "${write_libobj}"
+    }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+  $opt_debug
+  func_convert_core_file_wine_to_w32_result="$1"
+  if test -n "$1"; then
+    # Unfortunately, winepath does not exit with a non-zero error code, so we
+    # are forced to check the contents of stdout. On the other hand, if the
+    # command is not found, the shell will set an exit code of 127 and print
+    # *an error message* to stdout. So we must check for both error code of
+    # zero AND non-empty stdout, which explains the odd construction:
+    func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+    if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+      func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+        $SED -e "$lt_sed_naive_backslashify"`
+    else
+      func_convert_core_file_wine_to_w32_result=
+    fi
+  fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+  $opt_debug
+  # unfortunately, winepath doesn't convert paths, only file names
+  func_convert_core_path_wine_to_w32_result=""
+  if test -n "$1"; then
+    oldIFS=$IFS
+    IFS=:
+    for func_convert_core_path_wine_to_w32_f in $1; do
+      IFS=$oldIFS
+      func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+      if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+        if test -z "$func_convert_core_path_wine_to_w32_result"; then
+          func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+        else
+          func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+        fi
+      fi
+    done
+    IFS=$oldIFS
+  fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+  $opt_debug
+  if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+    func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+    if test "$?" -ne 0; then
+      # on failure, ensure result is empty
+      func_cygpath_result=
+    fi
+  else
+    func_cygpath_result=
+    func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+  fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format.  Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+  $opt_debug
+  # awkward: cmd appends spaces to result
+  func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+    $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+  $opt_debug
+  if test -z "$2" && test -n "$1" ; then
+    func_error "Could not determine host file name corresponding to"
+    func_error "  \`$1'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback:
+    func_to_host_file_result="$1"
+  fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+  $opt_debug
+  if test -z "$4" && test -n "$3"; then
+    func_error "Could not determine the host path corresponding to"
+    func_error "  \`$3'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback.  This is a deliberately simplistic "conversion" and
+    # should not be "improved".  See libtool.info.
+    if test "x$1" != "x$2"; then
+      lt_replace_pathsep_chars="s|$1|$2|g"
+      func_to_host_path_result=`echo "$3" |
+        $SED -e "$lt_replace_pathsep_chars"`
+    else
+      func_to_host_path_result="$3"
+    fi
+  fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+  $opt_debug
+  case $4 in
+  $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+    ;;
+  esac
+  case $4 in
+  $2 ) func_append func_to_host_path_result "$3"
+    ;;
+  esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via `$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+  $opt_debug
+  $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result.  If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+  $opt_debug
+  case ,$2, in
+    *,"$to_tool_file_cmd",*)
+      func_to_tool_file_result=$1
+      ;;
+    *)
+      $to_tool_file_cmd "$1"
+      func_to_tool_file_result=$func_to_host_file_result
+      ;;
+  esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+  func_to_host_file_result="$1"
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+    # LT_CYGPATH in this case.
+    func_to_host_file_result=`cygpath -m "$1"`
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format.  Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_file_wine_to_w32 "$1"
+    func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_msys_to_w32_result"
+    func_to_host_file_result="$func_cygpath_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format.  Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set.  Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+    func_convert_core_file_wine_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+    func_to_host_file_result="$func_cygpath_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via `$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format.  If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+#   file name conversion function    : func_convert_file_X_to_Y ()
+#   path conversion function         : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same.  If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+  $opt_debug
+  if test -z "$to_host_path_cmd"; then
+    func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+    to_host_path_cmd="func_convert_path_${func_stripname_result}"
+  fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+  $opt_debug
+  func_init_to_host_path_cmd
+  $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+  func_to_host_path_result="$1"
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from ARG.  MSYS
+    # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+    # and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format.  Requires a wine environment and
+# a working winepath.  Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+    func_to_host_path_result="$func_cygpath_result"
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format.  Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set.  Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from
+    # ARG. msys behavior is inconsistent here, cygpath turns them
+    # into '.;' and ';.', and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+    func_to_host_path_result="$func_cygpath_result"
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+    $opt_debug
+    # 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=
+    pie_flag=
+
+    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)
+	  test -n "$libobj" && \
+	    func_fatal_error "you cannot specify \`-o' more than once"
+	  arg_mode=target
+	  continue
+	  ;;
+
+	-pie | -fpie | -fPIE)
+          func_append pie_flag " $arg"
+	  continue
+	  ;;
+
+	-shared | -static | -prefer-pic | -prefer-non-pic)
+	  func_append 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,*)
+	  func_stripname '-Wc,' '' "$arg"
+	  args=$func_stripname_result
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+	  for arg in $args; do
+	    IFS="$save_ifs"
+	    func_append_quoted lastarg "$arg"
+	  done
+	  IFS="$save_ifs"
+	  func_stripname ' ' '' "$lastarg"
+	  lastarg=$func_stripname_result
+
+	  # Add the arguments to base_compile.
+	  func_append 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.
+      func_append_quoted base_compile "$lastarg"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      func_fatal_error "you must specify an argument for -Xcompile"
+      ;;
+    target)
+      func_fatal_error "you must specify a target with \`-o'"
+      ;;
+    *)
+      # Get the name of the library object.
+      test -z "$libobj" && {
+	func_basename "$srcfile"
+	libobj="$func_basename_result"
+      }
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    case $libobj in
+    *.[cCFSifmso] | \
+    *.ada | *.adb | *.ads | *.asm | \
+    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+    *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
+      func_xform "$libobj"
+      libobj=$func_xform_result
+      ;;
+    esac
+
+    case $libobj in
+    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+    *)
+      func_fatal_error "cannot determine name of library object from \`$libobj'"
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -shared)
+	test "$build_libtool_libs" != yes && \
+	  func_fatal_configuration "can not build a shared library"
+	build_old_libs=no
+	continue
+	;;
+
+      -static)
+	build_libtool_libs=no
+	build_old_libs=yes
+	continue
+	;;
+
+      -prefer-pic)
+	pic_mode=yes
+	continue
+	;;
+
+      -prefer-non-pic)
+	pic_mode=no
+	continue
+	;;
+      esac
+    done
+
+    func_quote_for_eval "$libobj"
+    test "X$libobj" != "X$func_quote_for_eval_result" \
+      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'	 &()|`$[]' \
+      && func_warning "libobj name \`$libobj' may not contain shell special characters."
+    func_dirname_and_basename "$obj" "/" ""
+    objname="$func_basename_result"
+    xdir="$func_dirname_result"
+    lobj=${xdir}$objdir/$objname
+
+    test -z "$base_compile" && \
+      func_fatal_help "you must specify a compilation command"
+
+    # 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
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2* | cegcc*)
+      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 "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+    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 $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+	func_echo "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."
+
+	$opt_dry_run || $RM $removelist
+	exit $EXIT_FAILURE
+      fi
+      func_append removelist " $output_obj"
+      $ECHO "$srcfile" > "$lockfile"
+    fi
+
+    $opt_dry_run || $RM $removelist
+    func_append removelist " $lockfile"
+    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+    func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+    srcfile=$func_to_tool_file_result
+    func_quote_for_eval "$srcfile"
+    qsrcfile=$func_quote_for_eval_result
+
+    # 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
+
+      func_mkdir_p "$xdir$objdir"
+
+      if test -z "$output_obj"; then
+	# Place PIC objects in $objdir
+	func_append command " -o $lobj"
+      fi
+
+      func_show_eval_locale "$command"	\
+          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+      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."
+
+	$opt_dry_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
+	func_show_eval '$MV "$output_obj" "$lobj"' \
+	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+	suppress_output=' >/dev/null 2>&1'
+      fi
+    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$pie_flag"
+      else
+	command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+	func_append command " -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      func_append command "$suppress_output"
+      func_show_eval_locale "$command" \
+        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+      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."
+
+	$opt_dry_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
+	func_show_eval '$MV "$output_obj" "$obj"' \
+	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+    fi
+
+    $opt_dry_run || {
+      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+      # Unlock the critical section if it was locked
+      if test "$need_locks" != no; then
+	removelist=$lockfile
+        $RM "$lockfile"
+      fi
+    }
+
+    exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+  test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+    # We need to display help for each of the modes.
+    case $opt_mode in
+      "")
+        # Generic help is extracted from the usage comments
+        # at the start of this file.
+        func_help
+        ;;
+
+      clean)
+        $ECHO \
+"Usage: $progname [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: $progname [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
+  -no-suppress      do not suppress compiler output for multiple passes
+  -prefer-pic       try to build PIC objects only
+  -prefer-non-pic   try to build non-PIC objects only
+  -shared           do not build a \`.o' file suitable for static linking
+  -static           only build a \`.o' file suitable for static linking
+  -Wc,FLAG          pass FLAG directly to the compiler
+
+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: $progname [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: $progname [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: $progname [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 following components of INSTALL-COMMAND are treated specially:
+
+  -inst-prefix-dir PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+        ;;
+
+      link)
+        $ECHO \
+"Usage: $progname [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
+  -bindir BINDIR    specify path to binaries directory (for systems where
+                    libraries must be found in the PATH setting at runtime)
+  -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
+  -shared           only do dynamic linking of libtool libraries
+  -shrext SUFFIX    override the standard shared library file extension
+  -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]
+  -weak LIBNAME     declare that the target provides the LIBNAME interface
+  -Wc,FLAG
+  -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
+  -Wl,FLAG
+  -Xlinker FLAG     pass linker-specific FLAG directly to the linker
+  -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
+
+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: $progname [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."
+        ;;
+
+      *)
+        func_fatal_help "invalid operation mode \`$opt_mode'"
+        ;;
+    esac
+
+    echo
+    $ECHO "Try \`$progname --help' for more information about other modes."
+}
+
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+  if test "$opt_help" = :; then
+    func_mode_help
+  else
+    {
+      func_help noexit
+      for opt_mode in compile link execute install finish uninstall clean; do
+	func_mode_help
+      done
+    } | sed -n '1p; 2,$s/^Usage:/  or: /p'
+    {
+      func_help noexit
+      for opt_mode in compile link execute install finish uninstall clean; do
+	echo
+	func_mode_help
+      done
+    } |
+    sed '1d
+      /^When reporting/,/^Report/{
+	H
+	d
+      }
+      $x
+      /information about other modes/d
+      /more detailed .*MODE/d
+      s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+  fi
+  exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+    $opt_debug
+    # The first argument is the command name.
+    cmd="$nonopt"
+    test -z "$cmd" && \
+      func_fatal_help "you must specify a COMMAND"
+
+    # Handle -dlopen flags immediately.
+    for file in $opt_dlopen; do
+      test -f "$file" \
+	|| func_fatal_help "\`$file' is not a file"
+
+      dir=
+      case $file in
+      *.la)
+	func_resolve_sysroot "$file"
+	file=$func_resolve_sysroot_result
+
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$file" \
+	  || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+	# Read the libtool library.
+	dlname=
+	library_names=
+	func_source "$file"
+
+	# Skip this library if it cannot be dlopened.
+	if test -z "$dlname"; then
+	  # Warn if it was a shared library.
+	  test -n "$library_names" && \
+	    func_warning "\`$file' was not linked with \`-export-dynamic'"
+	  continue
+	fi
+
+	func_dirname "$file" "" "."
+	dir="$func_dirname_result"
+
+	if test -f "$dir/$objdir/$dlname"; then
+	  func_append dir "/$objdir"
+	else
+	  if test ! -f "$dir/$dlname"; then
+	    func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+	  fi
+	fi
+	;;
+
+      *.lo)
+	# Just add the directory containing the .lo file.
+	func_dirname "$file" "" "."
+	dir="$func_dirname_result"
+	;;
+
+      *)
+	func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+	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
+      -* | *.la | *.lo ) ;;
+      *)
+	# Do a test to see if this is really a libtool program.
+	if func_ltwrapper_script_p "$file"; then
+	  func_source "$file"
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	elif func_ltwrapper_executable_p "$file"; then
+	  func_ltwrapper_scriptname "$file"
+	  func_source "$func_ltwrapper_scriptname_result"
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	fi
+	;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      func_append_quoted args "$file"
+    done
+
+    if test "X$opt_dry_run" = Xfalse; 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
+	      else
+		$lt_unset $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
+}
+
+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+    $opt_debug
+    libs=
+    libdirs=
+    admincmds=
+
+    for opt in "$nonopt" ${1+"$@"}
+    do
+      if test -d "$opt"; then
+	func_append libdirs " $opt"
+
+      elif test -f "$opt"; then
+	if func_lalib_unsafe_p "$opt"; then
+	  func_append libs " $opt"
+	else
+	  func_warning "\`$opt' is not a valid libtool archive"
+	fi
+
+      else
+	func_fatal_error "invalid argument \`$opt'"
+      fi
+    done
+
+    if test -n "$libs"; then
+      if test -n "$lt_sysroot"; then
+        sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+        sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+      else
+        sysroot_cmd=
+      fi
+
+      # Remove sysroot references
+      if $opt_dry_run; then
+        for lib in $libs; do
+          echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+        done
+      else
+        tmpdir=`func_mktempdir`
+        for lib in $libs; do
+	  sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+	    > $tmpdir/tmp-la
+	  mv -f $tmpdir/tmp-la $lib
+	done
+        ${RM}r "$tmpdir"
+      fi
+    fi
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $opt_dry_run || eval "$cmds" || func_append admincmds "
+       $cmds"
+	fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    $opt_silent && exit $EXIT_SUCCESS
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      echo "----------------------------------------------------------------------"
+      echo "Libraries have been installed in:"
+      for libdir in $libdirs; do
+	$ECHO "   $libdir"
+      done
+      echo
+      echo "If you ever happen to want to link against installed libraries"
+      echo "in a given directory, LIBDIR, you must either use libtool, and"
+      echo "specify the full pathname of the library, or use 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"
+      case $host in
+	solaris2.[6789]|solaris2.1[0-9])
+	  echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+	  echo "pages."
+	  ;;
+	*)
+	  echo "more information, such as the ld(1) and ld.so(8) manual pages."
+	  ;;
+      esac
+      echo "----------------------------------------------------------------------"
+    fi
+    exit $EXIT_SUCCESS
+}
+
+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+    $opt_debug
+    # 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.
+       case $nonopt in *shtool*) :;; *) false;; esac; then
+      # Aesthetically quote it.
+      func_quote_for_eval "$nonopt"
+      install_prog="$func_quote_for_eval_result "
+      arg=$1
+      shift
+    else
+      install_prog=
+      arg=$nonopt
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    func_quote_for_eval "$arg"
+    func_append install_prog "$func_quote_for_eval_result"
+    install_shared_prog=$install_prog
+    case " $install_prog " in
+      *[\\\ /]cp\ *) install_cp=: ;;
+      *) install_cp=false ;;
+    esac
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    no_mode=:
+    for arg
+    do
+      arg2=
+      if test -n "$dest"; then
+	func_append files " $dest"
+	dest=$arg
+	continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f)
+	if $install_cp; then :; else
+	  prev=$arg
+	fi
+	;;
+      -g | -m | -o)
+	prev=$arg
+	;;
+      -s)
+	stripme=" -s"
+	continue
+	;;
+      -*)
+	;;
+      *)
+	# If the previous option needed an argument, then skip it.
+	if test -n "$prev"; then
+	  if test "x$prev" = x-m && test -n "$install_override_mode"; then
+	    arg2=$install_override_mode
+	    no_mode=false
+	  fi
+	  prev=
+	else
+	  dest=$arg
+	  continue
+	fi
+	;;
+      esac
+
+      # Aesthetically quote the argument.
+      func_quote_for_eval "$arg"
+      func_append install_prog " $func_quote_for_eval_result"
+      if test -n "$arg2"; then
+	func_quote_for_eval "$arg2"
+      fi
+      func_append install_shared_prog " $func_quote_for_eval_result"
+    done
+
+    test -z "$install_prog" && \
+      func_fatal_help "you must specify an install program"
+
+    test -n "$prev" && \
+      func_fatal_help "the \`$prev' option requires an argument"
+
+    if test -n "$install_override_mode" && $no_mode; then
+      if $install_cp; then :; else
+	func_quote_for_eval "$install_override_mode"
+	func_append install_shared_prog " -m $func_quote_for_eval_result"
+      fi
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+	func_fatal_help "no file or destination specified"
+      else
+	func_fatal_help "you must specify a destination"
+      fi
+    fi
+
+    # Strip any trailing slash from the destination.
+    func_stripname '' '/' "$dest"
+    dest=$func_stripname_result
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      func_dirname_and_basename "$dest" "" "."
+      destdir="$func_dirname_result"
+      destname="$func_basename_result"
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files; shift
+      test "$#" -gt 1 && \
+	func_fatal_help "\`$dest' is not a directory"
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+	case $file in
+	*.lo) ;;
+	*)
+	  func_fatal_help "\`$destdir' must be an absolute directory name"
+	  ;;
+	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.
+	func_append staticlibs " $file"
+	;;
+
+      *.la)
+	func_resolve_sysroot "$file"
+	file=$func_resolve_sysroot_result
+
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$file" \
+	  || func_fatal_help "\`$file' is not a valid libtool archive"
+
+	library_names=
+	old_library=
+	relink_command=
+	func_source "$file"
+
+	# Add the libdir to current_libdirs if it is the destination.
+	if test "X$destdir" = "X$libdir"; then
+	  case "$current_libdirs " in
+	  *" $libdir "*) ;;
+	  *) func_append current_libdirs " $libdir" ;;
+	  esac
+	else
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) func_append future_libdirs " $libdir" ;;
+	  esac
+	fi
+
+	func_dirname "$file" "/" ""
+	dir="$func_dirname_result"
+	func_append 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 -e "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.
+	  test "$inst_prefix_dir" = "$destdir" && \
+	    func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+	  if test -n "$inst_prefix_dir"; then
+	    # Stick the inst_prefix_dir data into the link command.
+	    relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	  else
+	    relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+	  fi
+
+	  func_warning "relinking \`$file'"
+	  func_show_eval "$relink_command" \
+	    'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+	fi
+
+	# See the names of the shared library.
+	set dummy $library_names; shift
+	if test -n "$1"; then
+	  realname="$1"
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
+	      'exit $?'
+	  tstripme="$stripme"
+	  case $host_os in
+	  cygwin* | mingw* | pw32* | cegcc*)
+	    case $realname in
+	    *.dll.a)
+	      tstripme=""
+	      ;;
+	    esac
+	    ;;
+	  esac
+	  if test -n "$tstripme" && test -n "$striplib"; then
+	    func_show_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
+	      test "$linkname" != "$realname" \
+		&& func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  func_execute_cmds "$postinstall_cmds" 'exit $?'
+	fi
+
+	# Install the pseudo-library for information purposes.
+	func_basename "$file"
+	name="$func_basename_result"
+	instname="$dir/$name"i
+	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+	# Maybe install the static library, too.
+	test -n "$old_library" && func_append 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
+	  func_basename "$file"
+	  destfile="$func_basename_result"
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Deduce the name of the destination old-style object file.
+	case $destfile in
+	*.lo)
+	  func_lo2o "$destfile"
+	  staticdest=$func_lo2o_result
+	  ;;
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  func_fatal_help "cannot copy a libtool object to \`$destfile'"
+	  ;;
+	esac
+
+	# Install the libtool object if requested.
+	test -n "$destfile" && \
+	  func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+	# Install the old object if enabled.
+	if test "$build_old_libs" = yes; then
+	  # Deduce the name of the old-style object file.
+	  func_lo2o "$file"
+	  staticobj=$func_lo2o_result
+	  func_show_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
+	  func_basename "$file"
+	  destfile="$func_basename_result"
+	  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
+	      func_stripname '' '.exe' "$file"
+	      file=$func_stripname_result
+	      stripped_ext=".exe"
+	    fi
+	    ;;
+	esac
+
+	# Do a test to see if this is really a libtool program.
+	case $host in
+	*cygwin* | *mingw*)
+	    if func_ltwrapper_executable_p "$file"; then
+	      func_ltwrapper_scriptname "$file"
+	      wrapper=$func_ltwrapper_scriptname_result
+	    else
+	      func_stripname '' '.exe' "$file"
+	      wrapper=$func_stripname_result
+	    fi
+	    ;;
+	*)
+	    wrapper=$file
+	    ;;
+	esac
+	if func_ltwrapper_script_p "$wrapper"; then
+	  notinst_deplibs=
+	  relink_command=
+
+	  func_source "$wrapper"
+
+	  # Check the variables that should have been set.
+	  test -z "$generated_by_libtool_version" && \
+	    func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; do
+	    # Check to see that each library is installed.
+	    libdir=
+	    if test -f "$lib"; then
+	      func_source "$lib"
+	    fi
+	    libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      func_warning "\`$lib' has not been installed in \`$libdir'"
+	      finalize=no
+	    fi
+	  done
+
+	  relink_command=
+	  func_source "$wrapper"
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    $opt_dry_run || {
+	      if test "$finalize" = yes; then
+	        tmpdir=`func_mktempdir`
+		func_basename "$file$stripped_ext"
+		file="$func_basename_result"
+	        outputname="$tmpdir/$file"
+	        # Replace the output file specification.
+	        relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+	        $opt_silent || {
+	          func_quote_for_expand "$relink_command"
+		  eval "func_echo $func_quote_for_expand_result"
+	        }
+	        if eval "$relink_command"; then :
+	          else
+		  func_error "error: relink \`$file' with the above command before installing it"
+		  $opt_dry_run || ${RM}r "$tmpdir"
+		  continue
+	        fi
+	        file="$outputname"
+	      else
+	        func_warning "cannot relink \`$file'"
+	      fi
+	    }
+	  else
+	    # Install the binary that we compiled earlier.
+	    file=`$ECHO "$file$stripped_ext" | $SED "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)
+	    func_stripname '' '.exe' "$destfile"
+	    destfile=$func_stripname_result
+	    ;;
+	  esac
+	  ;;
+	esac
+	func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+	$opt_dry_run || if test -n "$outputname"; then
+	  ${RM}r "$tmpdir"
+	fi
+	;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      func_basename "$file"
+      name="$func_basename_result"
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+	func_show_eval "$old_striplib $oldlib" 'exit $?'
+      fi
+
+      # Do each command in the postinstall commands.
+      func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+    done
+
+    test -n "$future_libdirs" && \
+      func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      $opt_dry_run && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+}
+
+test "$opt_mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+    $opt_debug
+    my_outputname="$1"
+    my_originator="$2"
+    my_pic_p="${3-no}"
+    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+    my_dlsyms=
+
+    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+      if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	my_dlsyms="${my_outputname}S.c"
+      else
+	func_error "not configured to extract global symbols from dlpreopened files"
+      fi
+    fi
+
+    if test -n "$my_dlsyms"; then
+      case $my_dlsyms in
+      "") ;;
+      *.c)
+	# Discover the nlist of each of the dlfiles.
+	nlist="$output_objdir/${my_outputname}.nm"
+
+	func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+	# Parse the name list into a source file.
+	func_verbose "creating $output_objdir/$my_dlsyms"
+
+	$opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+	if test "$dlself" = yes; then
+	  func_verbose "generating symbol list for \`$output'"
+
+	  $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+	  # Add our own program objects to the symbol list.
+	  progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+	  for progfile in $progfiles; do
+	    func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+	    func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
+	    $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -n "$exclude_expsyms"; then
+	    $opt_dry_run || {
+	      eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	    }
+	  fi
+
+	  if test -n "$export_symbols_regex"; then
+	    $opt_dry_run || {
+	      eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	    }
+	  fi
+
+	  # Prepare the list of exported symbols
+	  if test -z "$export_symbols"; then
+	    export_symbols="$output_objdir/$outputname.exp"
+	    $opt_dry_run || {
+	      $RM $export_symbols
+	      eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	      case $host in
+	      *cygwin* | *mingw* | *cegcc* )
+                eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+	        ;;
+	      esac
+	    }
+	  else
+	    $opt_dry_run || {
+	      eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	      case $host in
+	        *cygwin* | *mingw* | *cegcc* )
+	          eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+	          eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+	          ;;
+	      esac
+	    }
+	  fi
+	fi
+
+	for dlprefile in $dlprefiles; do
+	  func_verbose "extracting global C symbols from \`$dlprefile'"
+	  func_basename "$dlprefile"
+	  name="$func_basename_result"
+          case $host in
+	    *cygwin* | *mingw* | *cegcc* )
+	      # if an import library, we need to obtain dlname
+	      if func_win32_import_lib_p "$dlprefile"; then
+	        func_tr_sh "$dlprefile"
+	        eval "curr_lafile=\$libfile_$func_tr_sh_result"
+	        dlprefile_dlbasename=""
+	        if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+	          # Use subshell, to avoid clobbering current variable values
+	          dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+	          if test -n "$dlprefile_dlname" ; then
+	            func_basename "$dlprefile_dlname"
+	            dlprefile_dlbasename="$func_basename_result"
+	          else
+	            # no lafile. user explicitly requested -dlpreopen <import library>.
+	            $sharedlib_from_linklib_cmd "$dlprefile"
+	            dlprefile_dlbasename=$sharedlib_from_linklib_result
+	          fi
+	        fi
+	        $opt_dry_run || {
+	          if test -n "$dlprefile_dlbasename" ; then
+	            eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+	          else
+	            func_warning "Could not compute DLL name from $name"
+	            eval '$ECHO ": $name " >> "$nlist"'
+	          fi
+	          func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+	          eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+	            $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+	        }
+	      else # not an import lib
+	        $opt_dry_run || {
+	          eval '$ECHO ": $name " >> "$nlist"'
+	          func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+	          eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+	        }
+	      fi
+	    ;;
+	    *)
+	      $opt_dry_run || {
+	        eval '$ECHO ": $name " >> "$nlist"'
+	        func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+	        eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+	      }
+	    ;;
+          esac
+	done
+
+	$opt_dry_run || {
+	  # 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/$my_dlsyms"'
+	  else
+	    echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+	  fi
+
+	  echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols.  */
+typedef struct {
+  const char *name;
+  void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+  { \"$my_originator\", (void *) 0 },"
+
+	  case $need_lib_prefix in
+	  no)
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+	    ;;
+	  *)
+	    eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+	    ;;
+	  esac
+	  echo >> "$output_objdir/$my_dlsyms" "\
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+	} # !$opt_dry_run
+
+	pic_flag_for_symtable=
+	case "$compile_command " in
+	*" -static "*) ;;
+	*)
+	  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*)
+	    pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+	  *-*-hpux*)
+	    pic_flag_for_symtable=" $pic_flag"  ;;
+	  *)
+	    if test "X$my_pic_p" != Xno; then
+	      pic_flag_for_symtable=" $pic_flag"
+	    fi
+	    ;;
+	  esac
+	  ;;
+	esac
+	symtab_cflags=
+	for arg in $LTCFLAGS; do
+	  case $arg in
+	  -pie | -fpie | -fPIE) ;;
+	  *) func_append symtab_cflags " $arg" ;;
+	  esac
+	done
+
+	# Now compile the dynamic symbol file.
+	func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+	# Clean up the generated files.
+	func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+	# Transform the symbol file into the correct name.
+	symfileobj="$output_objdir/${my_outputname}S.$objext"
+	case $host in
+	*cygwin* | *mingw* | *cegcc* )
+	  if test -f "$output_objdir/$my_outputname.def"; then
+	    compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+	    finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+	  else
+	    compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+	    finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+	  fi
+	  ;;
+	*)
+	  compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+	  finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+	  ;;
+	esac
+	;;
+      *)
+	func_fatal_error "unknown suffix for \`$my_dlsyms'"
+	;;
+      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 "$compile_command" | $SED "s% @SYMFILE@%%"`
+      finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+    fi
+}
+
+# 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.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+  $opt_debug
+  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
+    # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+       $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+      func_to_tool_file "$1" func_convert_file_msys_to_w32
+      win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+	$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_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+  $opt_debug
+  sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+  $opt_debug
+  match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+  $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+    $SED '/^Contents of section '"$match_literal"':/{
+      # Place marker at beginning of archive member dllname section
+      s/.*/====MARK====/
+      p
+      d
+    }
+    # These lines can sometimes be longer than 43 characters, but
+    # are always uninteresting
+    /:[	 ]*file format pe[i]\{,1\}-/d
+    /^In archive [^:]*:/d
+    # Ensure marker is printed
+    /^====MARK====/p
+    # Remove all lines with less than 43 characters
+    /^.\{43\}/!d
+    # From remaining lines, remove first 43 characters
+    s/^.\{43\}//' |
+    $SED -n '
+      # Join marker and all lines until next marker into a single line
+      /^====MARK====/ b para
+      H
+      $ b para
+      b
+      :para
+      x
+      s/\n//g
+      # Remove the marker
+      s/^====MARK====//
+      # Remove trailing dots and whitespace
+      s/[\. \t]*$//
+      # Print
+      /./p' |
+    # we now have a list, one entry per line, of the stringified
+    # contents of the appropriate section of all members of the
+    # archive which possess that section. Heuristic: eliminate
+    # all those which have a first or second character that is
+    # a '.' (that is, objdump's representation of an unprintable
+    # character.) This should work for all archives with less than
+    # 0x302f exports -- but will fail for DLLs whose name actually
+    # begins with a literal '.' or a single character followed by
+    # a '.'.
+    #
+    # Of those that remain, print the first one.
+    $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+  test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+  test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+  $opt_debug
+  if func_cygming_gnu_implib_p "$1" ; then
+    # binutils import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+  elif func_cygming_ms_implib_p "$1" ; then
+    # ms-generated import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+  else
+    # unknown
+    sharedlib_from_linklib_result=""
+  fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    $opt_debug
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+    if test "$lock_old_archive_extraction" = yes; then
+      lockfile=$f_ex_an_ar_oldlib.lock
+      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+	func_echo "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    fi
+    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+		   'stat=$?; rm -f "$lockfile"; exit $stat'
+    if test "$lock_old_archive_extraction" = yes; then
+      $opt_dry_run || rm -f "$lockfile"
+    fi
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+    fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    $opt_debug
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+
+    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
+      func_basename "$my_xlib"
+      my_xlib="$func_basename_result"
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+	*" $my_xlib_u "*)
+	  func_arith $extracted_serial + 1
+	  extracted_serial=$func_arith_result
+	  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"
+
+      func_mkdir_p "$my_xdir"
+
+      case $host in
+      *-darwin*)
+	func_verbose "Extracting $my_xabs"
+	# Do not bother doing anything if just a dry run
+	$opt_dry_run || {
+	  darwin_orig_dir=`pwd`
+	  cd $my_xdir || exit $?
+	  darwin_archive=$my_xabs
+	  darwin_curdir=`pwd`
+	  darwin_base_archive=`basename "$darwin_archive"`
+	  darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+	  if test -n "$darwin_arches"; then
+	    darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+	    darwin_arch=
+	    func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+	    for darwin_arch in  $darwin_arches ; do
+	      func_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've a bunch of thin objects, gotta fatten them up :)
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+	    darwin_file=
+	    darwin_files=
+	    for darwin_file in $darwin_filelist; do
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+	      $LIPO -create -output "$darwin_file" $darwin_files
+	    done # $darwin_filelist
+	    $RM -rf unfat-$$
+	    cd "$darwin_orig_dir"
+	  else
+	    cd $darwin_orig_dir
+	    func_extract_an_archive "$my_xdir" "$my_xabs"
+	  fi # $darwin_arches
+	} # !$opt_dry_run
+	;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+	;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+    done
+
+    func_extract_archives_result="$my_oldobjs"
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable.  Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take.  If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory.  This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+	func_emit_wrapper_arg1=${1-no}
+
+	$ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# 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.
+sed_quote_subst='$sed_quote_subst'
+
+# Be 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 variables:
+  generated_by_libtool_version='$macro_version'
+  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
+    file=\"\$0\""
+
+    qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+    $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+    ECHO=\"$qECHO\"
+  fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ which is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options which match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+  lt_script_arg0=\$0
+  shift
+  for lt_opt
+  do
+    case \"\$lt_opt\" in
+    --lt-debug) lt_option_debug=1 ;;
+    --lt-dump-script)
+        lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+        test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+        lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+        cat \"\$lt_dump_D/\$lt_dump_F\"
+        exit 0
+      ;;
+    --lt-*)
+        \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+        exit 1
+      ;;
+    esac
+  done
+
+  # Print the debug banner immediately:
+  if test -n \"\$lt_option_debug\"; then
+    echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
+  fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+  lt_dump_args_N=1;
+  for lt_arg
+  do
+    \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
+    lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+  done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+  case $host in
+  # Backslashes separate directories on plain windows
+  *-*-mingw | *-*-os2* | *-cegcc*)
+    $ECHO "\
+      if test -n \"\$lt_option_debug\"; then
+        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
+        func_lt_dump_args \${1+\"\$@\"} 1>&2
+      fi
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+    ;;
+
+  *)
+    $ECHO "\
+      if test -n \"\$lt_option_debug\"; then
+        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
+        func_lt_dump_args \${1+\"\$@\"} 1>&2
+      fi
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+    ;;
+  esac
+  $ECHO "\
+      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+      exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+  for lt_wr_arg
+  do
+    case \$lt_wr_arg in
+    --lt-*) ;;
+    *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+    esac
+    shift
+  done
+  func_exec_program_core \${1+\"\$@\"}
+}
+
+  # Parse options
+  func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$ECHO \"\$file\" | $SED '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 \"\$file\" | $SED '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 \"\$file\" | $SED 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+  done
+
+  # Usually 'no', except on cygwin/mingw when embedded into
+  # the cwrapper.
+  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+    # special case for '.'
+    if test \"\$thisdir\" = \".\"; then
+      thisdir=\`pwd\`
+    fi
+    # remove .libs from thisdir
+    case \"\$thisdir\" in
+    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+    $objdir )   thisdir=. ;;
+    esac
+  fi
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+	if test "$fast_install" = yes; then
+	  $ECHO "\
+  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 "\
+
+    # 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 1
+      fi
+    fi
+
+    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $RM \"\$progdir/\$program\";
+      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $RM \"\$progdir/\$file\"
+  fi"
+	else
+	  $ECHO "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+	fi
+
+	$ECHO "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+	# fixup the dll searchpath if we need to.
+	#
+	# Fix the DLL searchpath if we need to.  Do this before prepending
+	# to shlibpath, because on Windows, both are PATH and uninstalled
+	# libraries must come first.
+	if test -n "$dllsearchpath"; then
+	  $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $ECHO "\
+    # 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 \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+	fi
+
+	$ECHO "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+      func_exec_program \${1+\"\$@\"}
+    fi
+  else
+    # The program doesn't exist.
+    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+    \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+    \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit 1
+  fi
+fi\
+"
+}
+
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+	cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+   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.
+*/
+EOF
+	    cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+#  include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+/* declarations of non-ANSI functions */
+#if defined(__MINGW32__)
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined(__CYGWIN__)
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined (other platforms) ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined(_MSC_VER)
+# define setmode _setmode
+# define stat    _stat
+# define chmod   _chmod
+# define getcwd  _getcwd
+# define putenv  _putenv
+# define S_IXUSR _S_IEXEC
+# ifndef _INTPTR_T_DEFINED
+#  define _INTPTR_T_DEFINED
+#  define intptr_t int
+# endif
+#elif defined(__MINGW32__)
+# define setmode _setmode
+# define stat    _stat
+# define chmod   _chmod
+# define getcwd  _getcwd
+# define putenv  _putenv
+#elif defined(__CYGWIN__)
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined (other platforms) ... */
+#endif
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#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
+# define FOPEN_WB "wb"
+# 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 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#if defined(LT_DEBUGWRAPPER)
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+	    cat <<EOF
+volatile const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+	    if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+              func_to_host_path "$temp_rpath"
+	      cat <<EOF
+const char * LIB_PATH_VALUE   = "$func_to_host_path_result";
+EOF
+	    else
+	      cat <<"EOF"
+const char * LIB_PATH_VALUE   = "";
+EOF
+	    fi
+
+	    if test -n "$dllsearchpath"; then
+              func_to_host_path "$dllsearchpath:"
+	      cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE   = "$func_to_host_path_result";
+EOF
+	    else
+	      cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE   = "";
+EOF
+	    fi
+
+	    if test "$fast_install" = yes; then
+	      cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+	    else
+	      cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+	    fi
+
+
+	    cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX         "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt            = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int  newargc;
+  char *tmp_pathspec;
+  char *actual_cwrapper_path;
+  char *actual_cwrapper_name;
+  char *target_name;
+  char *lt_argv_zero;
+  intptr_t rval = 127;
+
+  int i;
+
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  newargz = XMALLOC (char *, argc + 1);
+
+  /* very simple arg parsing; don't want to rely on getopt
+   * also, copy all non cwrapper options to newargz, except
+   * argz[0], which is handled differently
+   */
+  newargc=0;
+  for (i = 1; i < argc; i++)
+    {
+      if (strcmp (argv[i], dumpscript_opt) == 0)
+	{
+EOF
+	    case "$host" in
+	      *mingw* | *cygwin* )
+		# make stdout use "unix" line endings
+		echo "          setmode(1,_O_BINARY);"
+		;;
+	      esac
+
+	    cat <<"EOF"
+	  lt_dump_script (stdout);
+	  return 0;
+	}
+      if (strcmp (argv[i], debug_opt) == 0)
+	{
+          lt_debug = 1;
+          continue;
+	}
+      if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+        {
+          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+             namespace, but it is not one of the ones we know about and
+             have already dealt with, above (inluding dump-script), then
+             report an error. Otherwise, targets might begin to believe
+             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+             namespace. The first time any user complains about this, we'll
+             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+             or a configure.ac-settable value.
+           */
+          lt_fatal (__FILE__, __LINE__,
+		    "unrecognized %s option: '%s'",
+                    ltwrapper_option_prefix, argv[i]);
+        }
+      /* otherwise ... */
+      newargz[++newargc] = xstrdup (argv[i]);
+    }
+  newargz[++newargc] = NULL;
+
+EOF
+	    cat <<EOF
+  /* The GNU banner must be the first non-error debug message */
+  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
+EOF
+	    cat <<"EOF"
+  lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+  lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+  tmp_pathspec = find_executable (argv[0]);
+  if (tmp_pathspec == NULL)
+    lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+  lt_debugprintf (__FILE__, __LINE__,
+                  "(main) found exe (before symlink chase) at: %s\n",
+		  tmp_pathspec);
+
+  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+  lt_debugprintf (__FILE__, __LINE__,
+                  "(main) found exe (after symlink chase) at: %s\n",
+		  actual_cwrapper_path);
+  XFREE (tmp_pathspec);
+
+  actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+  strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+  /* wrapper name transforms */
+  strendzap (actual_cwrapper_name, ".exe");
+  tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+  XFREE (actual_cwrapper_name);
+  actual_cwrapper_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  /* target_name transforms -- use actual target program name; might have lt- prefix */
+  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+  strendzap (target_name, ".exe");
+  tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+  XFREE (target_name);
+  target_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(main) libtool target name: %s\n",
+		  target_name);
+EOF
+
+	    cat <<EOF
+  newargz[0] =
+    XMALLOC (char, (strlen (actual_cwrapper_path) +
+		    strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+  strcpy (newargz[0], actual_cwrapper_path);
+  strcat (newargz[0], "$objdir");
+  strcat (newargz[0], "/");
+EOF
+
+	    cat <<"EOF"
+  /* stop here, and copy so we don't have to do this twice */
+  tmp_pathspec = xstrdup (newargz[0]);
+
+  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+  strcat (newargz[0], actual_cwrapper_name);
+
+  /* DO want the lt- prefix here if it exists, so use target_name */
+  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+  XFREE (tmp_pathspec);
+  tmp_pathspec = NULL;
+EOF
+
+	    case $host_os in
+	      mingw*)
+	    cat <<"EOF"
+  {
+    char* p;
+    while ((p = strchr (newargz[0], '\\')) != NULL)
+      {
+	*p = '/';
+      }
+    while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+      {
+	*p = '/';
+      }
+  }
+EOF
+	    ;;
+	    esac
+
+	    cat <<"EOF"
+  XFREE (target_name);
+  XFREE (actual_cwrapper_path);
+  XFREE (actual_cwrapper_name);
+
+  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
+  /* Update the DLL searchpath.  EXE_PATH_VALUE ($dllsearchpath) must
+     be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+     because on Windows, both *_VARNAMEs are PATH but uninstalled
+     libraries must come first. */
+  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+  lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+		  nonnull (lt_argv_zero));
+  for (i = 0; i < newargc; i++)
+    {
+      lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+		      i, nonnull (newargz[i]));
+    }
+
+EOF
+
+	    case $host_os in
+	      mingw*)
+		cat <<"EOF"
+  /* execv doesn't actually work on mingw as expected on unix */
+  newargz = prepare_spawn (newargz);
+  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+  if (rval == -1)
+    {
+      /* failed to start process */
+      lt_debugprintf (__FILE__, __LINE__,
+		      "(main) failed to launch target \"%s\": %s\n",
+		      lt_argv_zero, nonnull (strerror (errno)));
+      return 127;
+    }
+  return rval;
+EOF
+		;;
+	      *)
+		cat <<"EOF"
+  execv (lt_argv_zero, newargz);
+  return rval; /* =127, but avoids unused variable warning */
+EOF
+		;;
+	    esac
+
+	    cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void *p = (void *) malloc (num);
+  if (!p)
+    lt_fatal (__FILE__, __LINE__, "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;
+
+  lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+                  nonempty (path));
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 0)
+      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+    return 1;
+  else
+    return 0;
+}
+
+int
+make_executable (const char *path)
+{
+  int rval = 0;
+  struct stat st;
+
+  lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+                  nonempty (path));
+  if ((!path) || (!*path))
+    return 0;
+
+  if (stat (path, &st) >= 0)
+    {
+      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+    }
+  return rval;
+}
+
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise
+   Does not chase symlinks, even on platforms that support them.
+*/
+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;
+
+  lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+                  nonempty (wrapper));
+
+  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 (__FILE__, __LINE__, "getcwd failed: %s",
+                              nonnull (strerror (errno)));
+		  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 (__FILE__, __LINE__, "getcwd failed: %s",
+              nonnull (strerror (errno)));
+  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 *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+  return xstrdup (pathspec);
+#else
+  char buf[LT_PATHMAX];
+  struct stat s;
+  char *tmp_pathspec = xstrdup (pathspec);
+  char *p;
+  int has_symlinks = 0;
+  while (strlen (tmp_pathspec) && !has_symlinks)
+    {
+      lt_debugprintf (__FILE__, __LINE__,
+		      "checking path component for symlinks: %s\n",
+		      tmp_pathspec);
+      if (lstat (tmp_pathspec, &s) == 0)
+	{
+	  if (S_ISLNK (s.st_mode) != 0)
+	    {
+	      has_symlinks = 1;
+	      break;
+	    }
+
+	  /* search backwards for last DIR_SEPARATOR */
+	  p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+	  while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+	    p--;
+	  if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+	    {
+	      /* no more DIR_SEPARATORS left */
+	      break;
+	    }
+	  *p = '\0';
+	}
+      else
+	{
+	  lt_fatal (__FILE__, __LINE__,
+		    "error accessing file \"%s\": %s",
+		    tmp_pathspec, nonnull (strerror (errno)));
+	}
+    }
+  XFREE (tmp_pathspec);
+
+  if (!has_symlinks)
+    {
+      return xstrdup (pathspec);
+    }
+
+  tmp_pathspec = realpath (pathspec, buf);
+  if (tmp_pathspec == 0)
+    {
+      lt_fatal (__FILE__, __LINE__,
+		"could not follow symlinks for %s", pathspec);
+    }
+  return xstrdup (tmp_pathspec);
+#endif
+}
+
+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;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+  va_list args;
+  if (lt_debug)
+    {
+      (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+      va_start (args, fmt);
+      (void) vfprintf (stderr, fmt, args);
+      va_end (args);
+    }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+	       int line, const char *mode,
+	       const char *message, va_list ap)
+{
+  fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+  va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+  return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+  return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(lt_setenv) setting '%s' to '%s'\n",
+                  nonnull (name), nonnull (value));
+  {
+#ifdef HAVE_SETENV
+    /* always make a copy, for consistency with !HAVE_SETENV */
+    char *str = xstrdup (value);
+    setenv (name, str, 1);
+#else
+    int len = strlen (name) + 1 + strlen (value) + 1;
+    char *str = XMALLOC (char, len);
+    sprintf (str, "%s=%s", name, value);
+    if (putenv (str) != EXIT_SUCCESS)
+      {
+        XFREE (str);
+      }
+#endif
+  }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+  char *new_value;
+  if (orig_value && *orig_value)
+    {
+      int orig_value_len = strlen (orig_value);
+      int add_len = strlen (add);
+      new_value = XMALLOC (char, add_len + orig_value_len + 1);
+      if (to_end)
+        {
+          strcpy (new_value, orig_value);
+          strcpy (new_value + orig_value_len, add);
+        }
+      else
+        {
+          strcpy (new_value, add);
+          strcpy (new_value + add_len, orig_value);
+        }
+    }
+  else
+    {
+      new_value = xstrdup (add);
+    }
+  return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+                  nonnull (name), nonnull (value));
+
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      /* some systems can't cope with a ':'-terminated path #' */
+      int len = strlen (new_value);
+      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+        {
+          new_value[len-1] = '\0';
+        }
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+                  nonnull (name), nonnull (value));
+
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
+
+EOF
+	    case $host_os in
+	      mingw*)
+		cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+   Note that spawn() does not by itself call the command interpreter
+     (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+      ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+         GetVersionEx(&v);
+         v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+      }) ? "cmd.exe" : "command.com").
+   Instead it simply concatenates the arguments, separated by ' ', and calls
+   CreateProcess().  We must quote the arguments since Win32 CreateProcess()
+   interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+   special way:
+   - Space and tab are interpreted as delimiters. They are not treated as
+     delimiters if they are surrounded by double quotes: "...".
+   - Unescaped double quotes are removed from the input. Their only effect is
+     that within double quotes, space and tab are treated like normal
+     characters.
+   - Backslashes not followed by double quotes are not special.
+   - But 2*n+1 backslashes followed by a double quote become
+     n backslashes followed by a double quote (n >= 0):
+       \" -> "
+       \\\" -> \"
+       \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+  size_t argc;
+  char **new_argv;
+  size_t i;
+
+  /* Count number of arguments.  */
+  for (argc = 0; argv[argc] != NULL; argc++)
+    ;
+
+  /* Allocate new argument vector.  */
+  new_argv = XMALLOC (char *, argc + 1);
+
+  /* Put quoted arguments into the new argument vector.  */
+  for (i = 0; i < argc; i++)
+    {
+      const char *string = argv[i];
+
+      if (string[0] == '\0')
+	new_argv[i] = xstrdup ("\"\"");
+      else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+	{
+	  int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+	  size_t length;
+	  unsigned int backslashes;
+	  const char *s;
+	  char *quoted_string;
+	  char *p;
+
+	  length = 0;
+	  backslashes = 0;
+	  if (quote_around)
+	    length++;
+	  for (s = string; *s != '\0'; s++)
+	    {
+	      char c = *s;
+	      if (c == '"')
+		length += backslashes + 1;
+	      length++;
+	      if (c == '\\')
+		backslashes++;
+	      else
+		backslashes = 0;
+	    }
+	  if (quote_around)
+	    length += backslashes + 1;
+
+	  quoted_string = XMALLOC (char, length + 1);
+
+	  p = quoted_string;
+	  backslashes = 0;
+	  if (quote_around)
+	    *p++ = '"';
+	  for (s = string; *s != '\0'; s++)
+	    {
+	      char c = *s;
+	      if (c == '"')
+		{
+		  unsigned int j;
+		  for (j = backslashes + 1; j > 0; j--)
+		    *p++ = '\\';
+		}
+	      *p++ = c;
+	      if (c == '\\')
+		backslashes++;
+	      else
+		backslashes = 0;
+	    }
+	  if (quote_around)
+	    {
+	      unsigned int j;
+	      for (j = backslashes; j > 0; j--)
+		*p++ = '\\';
+	      *p++ = '"';
+	    }
+	  *p = '\0';
+
+	  new_argv[i] = quoted_string;
+	}
+      else
+	new_argv[i] = (char *) string;
+    }
+  new_argv[argc] = NULL;
+
+  return new_argv;
+}
+EOF
+		;;
+	    esac
+
+            cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+	    func_emit_wrapper yes |
+              $SED -e 's/\([\\"]\)/\\\1/g' \
+	           -e 's/^/  fputs ("/' -e 's/$/\\n", f);/'
+
+            cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+    $opt_debug
+    case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+    *import*) : ;;
+    *) false ;;
+    esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+    $opt_debug
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+      # 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=
+    new_inherited_linker_flags=
+
+    avoid_version=no
+    bindir=
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    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
+    weak_libs=
+    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
+      -shared)
+	test "$build_libtool_libs" != yes && \
+	  func_fatal_configuration "can not build a shared library"
+	build_old_libs=no
+	break
+	;;
+      -all-static | -static | -static-libtool-libs)
+	case $arg in
+	-all-static)
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	    func_warning "complete static linking is impossible in this configuration"
+	  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
+      func_quote_for_eval "$arg"
+      qarg=$func_quote_for_eval_unquoted_result
+      func_append libtool_args " $func_quote_for_eval_result"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+	case $prev in
+	output)
+	  func_append compile_command " @OUTPUT@"
+	  func_append finalize_command " @OUTPUT@"
+	  ;;
+	esac
+
+	case $prev in
+	bindir)
+	  bindir="$arg"
+	  prev=
+	  continue
+	  ;;
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    func_append compile_command " @SYMFILE@"
+	    func_append 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
+	      func_append dlfiles " $arg"
+	    else
+	      func_append dlprefiles " $arg"
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  test -f "$arg" \
+	    || func_fatal_error "symbol file \`$arg' does not exist"
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	framework)
+	  case $host in
+	    *-*-darwin*)
+	      case "$deplibs " in
+		*" $qarg.ltframework "*) ;;
+		*) func_append deplibs " $qarg.ltframework" # this is fixed later
+		   ;;
+	      esac
+	      ;;
+	  esac
+	  prev=
+	  continue
+	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$arg"
+	  prev=
+	  continue
+	  ;;
+	objectlist)
+	  if test -f "$arg"; then
+	    save_arg=$arg
+	    moreargs=
+	    for fil in `cat "$save_arg"`
+	    do
+#	      func_append moreargs " $fil"
+	      arg=$fil
+	      # A libtool-controlled object.
+
+	      # Check to see that this really is a libtool object.
+	      if func_lalib_unsafe_p "$arg"; then
+		pic_object=
+		non_pic_object=
+
+		# Read the .lo file
+		func_source "$arg"
+
+		if test -z "$pic_object" ||
+		   test -z "$non_pic_object" ||
+		   test "$pic_object" = none &&
+		   test "$non_pic_object" = none; then
+		  func_fatal_error "cannot find name of object for \`$arg'"
+		fi
+
+		# Extract subdirectory from the argument.
+		func_dirname "$arg" "/" ""
+		xdir="$func_dirname_result"
+
+		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
+		      func_append 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.
+		    func_append dlprefiles " $pic_object"
+		    prev=
+		  fi
+
+		  # A PIC object.
+		  func_append 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
+		  func_append 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"
+		  func_append non_pic_objects " $non_pic_object"
+		fi
+	      else
+		# Only an error if not doing a dry-run.
+		if $opt_dry_run; then
+		  # Extract subdirectory from the argument.
+		  func_dirname "$arg" "/" ""
+		  xdir="$func_dirname_result"
+
+		  func_lo2o "$arg"
+		  pic_object=$xdir$objdir/$func_lo2o_result
+		  non_pic_object=$xdir$func_lo2o_result
+		  func_append libobjs " $pic_object"
+		  func_append non_pic_objects " $non_pic_object"
+	        else
+		  func_fatal_error "\`$arg' is not a valid libtool object"
+		fi
+	      fi
+	    done
+	  else
+	    func_fatal_error "link input file \`$arg' does not exist"
+	  fi
+	  arg=$save_arg
+	  prev=
+	  continue
+	  ;;
+	precious_regex)
+	  precious_files_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case $arg in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    func_fatal_error "only absolute run-paths are allowed"
+	    ;;
+	  esac
+	  if test "$prev" = rpath; then
+	    case "$rpath " in
+	    *" $arg "*) ;;
+	    *) func_append rpath " $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) func_append xrpath " $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	shrext)
+	  shrext_cmds="$arg"
+	  prev=
+	  continue
+	  ;;
+	weak)
+	  func_append weak_libs " $arg"
+	  prev=
+	  continue
+	  ;;
+	xcclinker)
+	  func_append linker_flags " $qarg"
+	  func_append compiler_flags " $qarg"
+	  prev=
+	  func_append compile_command " $qarg"
+	  func_append finalize_command " $qarg"
+	  continue
+	  ;;
+	xcompiler)
+	  func_append compiler_flags " $qarg"
+	  prev=
+	  func_append compile_command " $qarg"
+	  func_append finalize_command " $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  func_append linker_flags " $qarg"
+	  func_append compiler_flags " $wl$qarg"
+	  prev=
+	  func_append compile_command " $wl$qarg"
+	  func_append finalize_command " $wl$qarg"
+	  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
+	  # See comment for -static flag below, for more details.
+	  func_append compile_command " $link_static_flag"
+	  func_append finalize_command " $link_static_flag"
+	fi
+	continue
+	;;
+
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+	;;
+
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
+
+      -bindir)
+	prev=bindir
+	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
+	  func_fatal_error "more than one -exported-symbols argument is not allowed"
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
+
+      -framework)
+	prev=framework
+	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*)
+	  func_append compile_command " $arg"
+	  func_append finalize_command " $arg"
+	  ;;
+	esac
+	continue
+	;;
+
+      -L*)
+	func_stripname "-L" '' "$arg"
+	if test -z "$func_stripname_result"; then
+	  if test "$#" -gt 0; then
+	    func_fatal_error "require no space between \`-L' and \`$1'"
+	  else
+	    func_fatal_error "need path for \`-L' option"
+	  fi
+	fi
+	func_resolve_sysroot "$func_stripname_result"
+	dir=$func_resolve_sysroot_result
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  absdir=`cd "$dir" && pwd`
+	  test -z "$absdir" && \
+	    func_fatal_error "cannot determine absolute directory name of \`$dir'"
+	  dir="$absdir"
+	  ;;
+	esac
+	case "$deplibs " in
+	*" -L$dir "* | *" $arg "*)
+	  # Will only happen for absolute or sysroot arguments
+	  ;;
+	*)
+	  # Preserve sysroot, but never include relative directories
+	  case $dir in
+	    [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+	    *) func_append deplibs " -L$dir" ;;
+	  esac
+	  func_append lib_search_path " $dir"
+	  ;;
+	esac
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+	  testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  ::) dllsearchpath=$dir;;
+	  *) func_append dllsearchpath ":$dir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  ::) dllsearchpath=$testbindir;;
+	  *) func_append 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* | *-cegcc* | *-*-haiku*)
+	    # 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
+	    func_append deplibs " System.ltframework"
+	    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
+	func_append deplibs " $arg"
+	continue
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      # Darwin uses the -arch flag to determine output architecture.
+      -model|-arch|-isysroot|--sysroot)
+	func_append compiler_flags " $arg"
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+	prev=xcompiler
+	continue
+	;;
+
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	func_append compiler_flags " $arg"
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+	case "$new_inherited_linker_flags " in
+	    *" $arg "*) ;;
+	    * ) func_append new_inherited_linker_flags " $arg" ;;
+	esac
+	continue
+	;;
+
+      -multi_module)
+	single_module="${wl}-multi_module"
+	continue
+	;;
+
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
+
+      -no-install)
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # and Darwin in order for the loader to find any dlls it needs.
+	  func_warning "\`-no-install' is ignored for $host"
+	  func_warning "assuming \`-no-fast-install' instead"
+	  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*)
+	func_stripname '-R' '' "$arg"
+	dir=$func_stripname_result
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	=*)
+	  func_stripname '=' '' "$dir"
+	  dir=$lt_sysroot$func_stripname_result
+	  ;;
+	*)
+	  func_fatal_error "only absolute run-paths are allowed"
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) func_append xrpath " $dir" ;;
+	esac
+	continue
+	;;
+
+      -shared)
+	# The effects of -shared are defined in a previous loop.
+	continue
+	;;
+
+      -shrext)
+	prev=shrext
+	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
+	;;
+
+      -weak)
+        prev=weak
+	continue
+	;;
+
+      -Wc,*)
+	func_stripname '-Wc,' '' "$arg"
+	args=$func_stripname_result
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+	  func_append arg " $func_quote_for_eval_result"
+	  func_append compiler_flags " $func_quote_for_eval_result"
+	done
+	IFS="$save_ifs"
+	func_stripname ' ' '' "$arg"
+	arg=$func_stripname_result
+	;;
+
+      -Wl,*)
+	func_stripname '-Wl,' '' "$arg"
+	args=$func_stripname_result
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+	  func_append arg " $wl$func_quote_for_eval_result"
+	  func_append compiler_flags " $wl$func_quote_for_eval_result"
+	  func_append linker_flags " $func_quote_for_eval_result"
+	done
+	IFS="$save_ifs"
+	func_stripname ' ' '' "$arg"
+	arg=$func_stripname_result
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
+
+      -XCClinker)
+	prev=xcclinker
+	continue
+	;;
+
+      # -msg_* for osf cc
+      -msg_*)
+	func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+
+      # Flags to be passed through unchanged, with rationale:
+      # -64, -mips[0-9]      enable 64-bit mode for the SGI compiler
+      # -r[0-9][0-9]*        specify processor for the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+      # +DA*, +DD*           enable 64-bit mode for the HP compiler
+      # -q*                  compiler args for the IBM compiler
+      # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+      # -F/path              path to uninstalled frameworks, gcc on darwin
+      # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
+      # @file                GCC response files
+      # -tp=*                Portland pgcc target processor selection
+      # --sysroot=*          for sysroot support
+      # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
+        func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+        func_append compile_command " $arg"
+        func_append finalize_command " $arg"
+        func_append compiler_flags " $arg"
+        continue
+        ;;
+
+      # Some other compiler flag.
+      -* | +*)
+        func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+
+      *.$objext)
+	# A standard object.
+	func_append objs " $arg"
+	;;
+
+      *.lo)
+	# A libtool-controlled object.
+
+	# Check to see that this really is a libtool object.
+	if func_lalib_unsafe_p "$arg"; then
+	  pic_object=
+	  non_pic_object=
+
+	  # Read the .lo file
+	  func_source "$arg"
+
+	  if test -z "$pic_object" ||
+	     test -z "$non_pic_object" ||
+	     test "$pic_object" = none &&
+	     test "$non_pic_object" = none; then
+	    func_fatal_error "cannot find name of object for \`$arg'"
+	  fi
+
+	  # Extract subdirectory from the argument.
+	  func_dirname "$arg" "/" ""
+	  xdir="$func_dirname_result"
+
+	  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
+		func_append 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.
+	      func_append dlprefiles " $pic_object"
+	      prev=
+	    fi
+
+	    # A PIC object.
+	    func_append 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
+	    func_append 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"
+	    func_append non_pic_objects " $non_pic_object"
+	  fi
+	else
+	  # Only an error if not doing a dry-run.
+	  if $opt_dry_run; then
+	    # Extract subdirectory from the argument.
+	    func_dirname "$arg" "/" ""
+	    xdir="$func_dirname_result"
+
+	    func_lo2o "$arg"
+	    pic_object=$xdir$objdir/$func_lo2o_result
+	    non_pic_object=$xdir$func_lo2o_result
+	    func_append libobjs " $pic_object"
+	    func_append non_pic_objects " $non_pic_object"
+	  else
+	    func_fatal_error "\`$arg' is not a valid libtool object"
+	  fi
+	fi
+	;;
+
+      *.$libext)
+	# An archive.
+	func_append deplibs " $arg"
+	func_append old_deplibs " $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	func_resolve_sysroot "$arg"
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  func_append dlfiles " $func_resolve_sysroot_result"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  func_append dlprefiles " $func_resolve_sysroot_result"
+	  prev=
+	else
+	  func_append deplibs " $func_resolve_sysroot_result"
+	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.
+	func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+      fi
+    done # argument parsing loop
+
+    test -n "$prev" && \
+      func_fatal_help "the \`$prevarg' option requires an argument"
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      func_append compile_command " $arg"
+      func_append finalize_command " $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    func_basename "$output"
+    outputname="$func_basename_result"
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'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\"
+
+    func_dirname "$output" "/" ""
+    output_objdir="$func_dirname_result$objdir"
+    func_to_tool_file "$output_objdir/"
+    tool_output_objdir=$func_to_tool_file_result
+    # Create the object directory.
+    func_mkdir_p "$output_objdir"
+
+    # Determine the type of output
+    case $output in
+    "")
+      func_fatal_help "you must specify an output file"
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    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 $opt_preserve_dup_deps ; then
+	case "$libs " in
+	*" $deplib "*) func_append specialdeplibs " $deplib" ;;
+	esac
+      fi
+      func_append 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 $opt_duplicate_compiler_generated_deps; then
+	for pre_post_dep in $predeps $postdeps; do
+	  case "$pre_post_deps " in
+	  *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
+	  esac
+	  func_append 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
+    notinst_path= # paths that contain not-installed libtool libraries
+
+    case $linkmode in
+    lib)
+	passes="conv dlpreopen link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+	    ;;
+	  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
+      # The preopen pass in lib mode reverses $deplibs; put it back here
+      # so that -L comes before libs that need it for instance...
+      if test "$linkmode,$pass" = "lib,link"; then
+	## FIXME: Find the place where the list is rebuilt in the wrong
+	##        order, and fix it there properly
+        tmp_deplibs=
+	for deplib in $deplibs; do
+	  tmp_deplibs="$deplib $tmp_deplibs"
+	done
+	deplibs="$tmp_deplibs"
+      fi
+
+      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 "$linkmode,$pass" = "lib,dlpreopen"; then
+	# Collect and forward deplibs of preopened libtool libs
+	for lib in $dlprefiles; do
+	  # Ignore non-libtool-libs
+	  dependency_libs=
+	  func_resolve_sysroot "$lib"
+	  case $lib in
+	  *.la)	func_source "$func_resolve_sysroot_result" ;;
+	  esac
+
+	  # Collect preopened libtool deplibs, except any this library
+	  # has declared as weak libs
+	  for deplib in $dependency_libs; do
+	    func_basename "$deplib"
+            deplib_base=$func_basename_result
+	    case " $weak_libs " in
+	    *" $deplib_base "*) ;;
+	    *) func_append deplibs " $deplib" ;;
+	    esac
+	  done
+	done
+	libs="$dlprefiles"
+      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
+	    func_append compiler_flags " $deplib"
+	    if test "$linkmode" = lib ; then
+		case "$new_inherited_linker_flags " in
+		    *" $deplib "*) ;;
+		    * ) func_append new_inherited_linker_flags " $deplib" ;;
+		esac
+	    fi
+	  fi
+	  continue
+	  ;;
+	-l*)
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    func_warning "\`-l' is ignored for archives/objects"
+	    continue
+	  fi
+	  func_stripname '-l' '' "$deplib"
+	  name=$func_stripname_result
+	  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 func_lalib_p "$lib"; then
+		  library_names=
+		  old_library=
+		  func_source "$lib"
+		  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
+		    func_dirname "$lib" "" "."
+		    ladir="$func_dirname_result"
+		    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
+	*.ltframework)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    deplibs="$deplib $deplibs"
+	    if test "$linkmode" = lib ; then
+		case "$new_inherited_linker_flags " in
+		    *" $deplib "*) ;;
+		    * ) func_append new_inherited_linker_flags " $deplib" ;;
+		esac
+	    fi
+	  fi
+	  continue
+	  ;;
+	-L*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test "$pass" = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    func_stripname '-L' '' "$deplib"
+	    func_resolve_sysroot "$func_stripname_result"
+	    func_append newlib_search_path " $func_resolve_sysroot_result"
+	    ;;
+	  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
+	    func_stripname '-L' '' "$deplib"
+	    func_resolve_sysroot "$func_stripname_result"
+	    func_append newlib_search_path " $func_resolve_sysroot_result"
+	    ;;
+	  *)
+	    func_warning "\`-L' is ignored for archives/objects"
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test "$pass" = link; then
+	    func_stripname '-R' '' "$deplib"
+	    func_resolve_sysroot "$func_stripname_result"
+	    dir=$func_resolve_sysroot_result
+	    # Make sure the xrpath contains only unique directories.
+	    case "$xrpath " in
+	    *" $dir "*) ;;
+	    *) func_append xrpath " $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la)
+	  func_resolve_sysroot "$deplib"
+	  lib=$func_resolve_sysroot_result
+	  ;;
+	*.$libext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  case $linkmode in
+	  lib)
+	    # Linking convenience modules into shared libraries is allowed,
+	    # but linking other static libraries is non-portable.
+	    case " $dlpreconveniencelibs " in
+	    *" $deplib "*) ;;
+	    *)
+	      valid_a_lib=no
+	      case $deplibs_check_method in
+		match_pattern*)
+		  set dummy $deplibs_check_method; shift
+		  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+		  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 use here."
+	      else
+		echo
+		$ECHO "*** Warning: Linking the shared library $output against the"
+		$ECHO "*** static library $deplib is not portable!"
+		deplibs="$deplib $deplibs"
+	      fi
+	      ;;
+	    esac
+	    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.
+	      func_append newdlprefiles " $deplib"
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      func_append newdlfiles " $deplib"
+	    fi
+	  fi
+	  continue
+	  ;;
+	%DEPLIBS%)
+	  alldeplibs=yes
+	  continue
+	  ;;
+	esac # case $deplib
+
+	if test "$found" = yes || test -f "$lib"; then :
+	else
+	  func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+	fi
+
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$lib" \
+	  || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+	func_dirname "$lib" "" "."
+	ladir="$func_dirname_result"
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	inherited_linker_flags=
+	# 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
+	func_source "$lib"
+
+	# Convert "-framework foo" to "foo.ltframework"
+	if test -n "$inherited_linker_flags"; then
+	  tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+	  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+	    case " $new_inherited_linker_flags " in
+	      *" $tmp_inherited_linker_flag "*) ;;
+	      *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
+	    esac
+	  done
+	fi
+	dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+	  test -n "$dlopen" && func_append dlfiles " $dlopen"
+	  test -n "$dlpreopen" && func_append 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
+	      func_fatal_error "cannot find name of link library for \`$lib'"
+	    fi
+	    # It is a libtool convenience library, so add in its objects.
+	    func_append convenience " $ladir/$objdir/$old_library"
+	    func_append old_convenience " $ladir/$objdir/$old_library"
+	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
+	    func_fatal_error "\`$lib' is not a convenience library"
+	  fi
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    deplibs="$deplib $deplibs"
+	    if $opt_preserve_dup_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+	      esac
+	    fi
+	    func_append tmp_libs " $deplib"
+	  done
+	  continue
+	fi # $pass = conv
+
+
+	# Get the name of the library we link against.
+	linklib=
+	if test -n "$old_library" &&
+	   { test "$prefer_static_libs" = yes ||
+	     test "$prefer_static_libs,$installed" = "built,no"; }; then
+	  linklib=$old_library
+	else
+	  for l in $old_library $library_names; do
+	    linklib="$l"
+	  done
+	fi
+	if test -z "$linklib"; then
+	  func_fatal_error "cannot find name of link library for \`$lib'"
+	fi
+
+	# This library was specified with -dlopen.
+	if test "$pass" = dlopen; then
+	  if test -z "$libdir"; then
+	    func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+	  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.
+	    func_append dlprefiles " $lib $dependency_libs"
+	  else
+	    func_append 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
+	    func_warning "cannot determine absolute directory name of \`$ladir'"
+	    func_warning "passing it literally to the linker, although it might fail"
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	func_basename "$lib"
+	laname="$func_basename_result"
+
+	# Find the relevant object directory and library name.
+	if test "X$installed" = Xyes; then
+	  if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    func_warning "library \`$lib' was moved."
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	  else
+	    dir="$lt_sysroot$libdir"
+	    absdir="$lt_sysroot$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
+	    func_append notinst_path " $abs_ladir"
+	  else
+	    dir="$ladir/$objdir"
+	    absdir="$abs_ladir/$objdir"
+	    # Remove this search path later
+	    func_append notinst_path " $abs_ladir"
+	  fi
+	fi # $installed = yes
+	func_stripname 'lib' '.la' "$laname"
+	name=$func_stripname_result
+
+	# This library was specified with -dlpreopen.
+	if test "$pass" = dlpreopen; then
+	  if test -z "$libdir" && test "$linkmode" = prog; then
+	    func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+	  fi
+	  case "$host" in
+	    # special handling for platforms with PE-DLLs.
+	    *cygwin* | *mingw* | *cegcc* )
+	      # Linker will automatically link against shared library if both
+	      # static and shared are present.  Therefore, ensure we extract
+	      # symbols from the import library if a shared library is present
+	      # (otherwise, the dlopen module name will be incorrect).  We do
+	      # this by putting the import library name into $newdlprefiles.
+	      # We recover the dlopen module name by 'saving' the la file
+	      # name in a special purpose variable, and (later) extracting the
+	      # dlname from the la file.
+	      if test -n "$dlname"; then
+	        func_tr_sh "$dir/$linklib"
+	        eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+	        func_append newdlprefiles " $dir/$linklib"
+	      else
+	        func_append newdlprefiles " $dir/$old_library"
+	        # Keep a list of preopened convenience libraries to check
+	        # that they are being used correctly in the link pass.
+	        test -z "$libdir" && \
+	          func_append dlpreconveniencelibs " $dir/$old_library"
+	      fi
+	    ;;
+	    * )
+	      # Prefer using a static library (so that no silly _DYNAMIC symbols
+	      # are required to link).
+	      if test -n "$old_library"; then
+	        func_append newdlprefiles " $dir/$old_library"
+	        # Keep a list of preopened convenience libraries to check
+	        # that they are being used correctly in the link pass.
+	        test -z "$libdir" && \
+	          func_append dlpreconveniencelibs " $dir/$old_library"
+	      # Otherwise, use the dlname, so that lt_dlopen finds it.
+	      elif test -n "$dlname"; then
+	        func_append newdlprefiles " $dir/$dlname"
+	      else
+	        func_append newdlprefiles " $dir/$linklib"
+	      fi
+	    ;;
+	  esac
+	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
+	  func_append 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*) func_stripname '-L' '' "$deplib"
+	         func_resolve_sysroot "$func_stripname_result"
+	         func_append newlib_search_path " $func_resolve_sysroot_result"
+		 ;;
+	    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 $opt_preserve_dup_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+	      esac
+	    fi
+	    func_append 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
+	      *"$absdir:"*) ;;
+	      *) func_append 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 "*) ;;
+	      *) func_append compile_rpath " $absdir" ;;
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) func_append 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
+	  case $host in
+	  *cygwin* | *mingw* | *cegcc*)
+	      # No point in relinking DLLs because paths are not encoded
+	      func_append notinst_deplibs " $lib"
+	      need_relink=no
+	    ;;
+	  *)
+	    if test "$installed" = no; then
+	      func_append notinst_deplibs " $lib"
+	      need_relink=yes
+	    fi
+	    ;;
+	  esac
+	  # This is a shared library
+
+	  # Warn about portability, can't link against -module's on some
+	  # systems (darwin).  Don't bleat about dlopened modules though!
+	  dlopenmodule=""
+	  for dlpremoduletest in $dlprefiles; do
+	    if test "X$dlpremoduletest" = "X$lib"; then
+	      dlopenmodule="$dlpremoduletest"
+	      break
+	    fi
+	  done
+	  if test -z "$dlopenmodule" && 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 "*) ;;
+	      *) func_append compile_rpath " $absdir" ;;
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) func_append finalize_rpath " $libdir" ;;
+	      esac
+	      ;;
+	    esac
+	  fi
+
+	  if test -n "$old_archive_from_expsyms_cmds"; then
+	    # figure out the soname
+	    set dummy $library_names
+	    shift
+	    realname="$1"
+	    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* | *cegcc*)
+	        func_arith $current - $age
+		major=$func_arith_result
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # Make a new name for the extract_expsyms_cmds to use
+	    soroot="$soname"
+	    func_basename "$soroot"
+	    soname="$func_basename_result"
+	    func_stripname 'lib' '.dll' "$soname"
+	    newlib=libimp-$func_stripname_result.a
+
+	    # If the library has no export list, then create one now
+	    if test -f "$output_objdir/$soname-def"; then :
+	    else
+	      func_verbose "extracting exported symbol list from \`$soname'"
+	      func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      func_verbose "generating import library for \`$soname'"
+	      func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+	    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 "$opt_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 (non-dlopened) module then we can not
+		    # link against it, someone is ignoring the earlier warnings
+		    if /usr/bin/file -L $add 2> /dev/null |
+			 $GREP ": [^:]* bundle" >/dev/null ; then
+		      if test "X$dlopenmodule" != "X$lib"; 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
+		      elif test -n "$old_library"; then
+			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 &&
+	         test "$hardcode_direct_absolute" = no; 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
+		    [\\/]*)
+		      func_append 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
+	      func_fatal_configuration "unsupported hardcode properties"
+	    fi
+
+	    if test -n "$add_shlibpath"; then
+	      case :$compile_shlibpath: in
+	      *":$add_shlibpath:"*) ;;
+	      *) func_append 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:"*) ;;
+		*) func_append finalize_shlibpath "$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test "$linkmode" = prog || test "$opt_mode" = relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    # Finalize command for both is simple: just hardcode it.
+	    if test "$hardcode_direct" = yes &&
+	       test "$hardcode_direct_absolute" = no; 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:"*) ;;
+	      *) func_append 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
+		  [\\/]*)
+		    func_append 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*) func_stripname '-R' '' "$libdir"
+	           temp_xrpath=$func_stripname_result
+		   case " $xrpath " in
+		   *" $temp_xrpath "*) ;;
+		   *) func_append xrpath " $temp_xrpath";;
+		   esac;;
+	      *) func_append temp_deplibs " $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  fi
+
+	  func_append 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"
+	    case $deplib in
+              -L*) func_stripname '-L' '' "$deplib"
+                   func_resolve_sysroot "$func_stripname_result";;
+              *) func_resolve_sysroot "$deplib" ;;
+            esac
+	    if $opt_preserve_dup_deps ; then
+	      case "$tmp_libs " in
+	      *" $func_resolve_sysroot_result "*)
+                func_append specialdeplibs " $func_resolve_sysroot_result" ;;
+	      esac
+	    fi
+	    func_append tmp_libs " $func_resolve_sysroot_result"
+	  done
+
+	  if test "$link_all_deplibs" != no; then
+	    # Add the search paths of all dependency libraries
+	    for deplib in $dependency_libs; do
+	      path=
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+	        func_resolve_sysroot "$deplib"
+	        deplib=$func_resolve_sysroot_result
+	        func_dirname "$deplib" "" "."
+		dir=$func_dirname_result
+		# We need an absolute path.
+		case $dir in
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		*)
+		  absdir=`cd "$dir" && pwd`
+		  if test -z "$absdir"; then
+		    func_warning "cannot determine absolute directory name of \`$dir'"
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		if $GREP "^installed=no" $deplib > /dev/null; then
+		case $host in
+		*-*-darwin*)
+		  depdepl=
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
+		      depdepl=$tmp
+		    done
+		    if test -f "$absdir/$objdir/$depdepl" ; then
+		      depdepl="$absdir/$objdir/$depdepl"
+		      darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+                      if test -z "$darwin_install_name"; then
+                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
+                      fi
+		      func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+		      func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
+		      path=
+		    fi
+		  fi
+		  ;;
+		*)
+		  path="-L$absdir/$objdir"
+		  ;;
+		esac
+		else
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  test -z "$libdir" && \
+		    func_fatal_error "\`$deplib' is not a valid libtool archive"
+		  test "$absdir" != "$libdir" && \
+		    func_warning "\`$deplib' seems to be moved"
+
+		  path="-L$absdir"
+		fi
+		;;
+	      esac
+	      case " $deplibs " in
+	      *" $path "*) ;;
+	      *) deplibs="$path $deplibs" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      if test "$pass" = link; then
+	if test "$linkmode" = "prog"; then
+	  compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+	  finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+	else
+	  compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	fi
+      fi
+      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 "*) ;;
+	    *) func_append 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 "*) ;;
+	      *) func_append tmp_libs " $deplib" ;;
+	      esac
+	      ;;
+	    *) func_append 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
+	  func_append tmp_libs " $i"
+	fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+    fi
+    if test "$linkmode" = prog || test "$linkmode" = lib; then
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	func_warning "\`-dlopen' is ignored for archives"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+	func_warning "\`-l' and \`-L' are ignored for archives" ;;
+      esac
+
+      test -n "$rpath" && \
+	func_warning "\`-rpath' is ignored for archives"
+
+      test -n "$xrpath" && \
+	func_warning "\`-R' is ignored for archives"
+
+      test -n "$vinfo" && \
+	func_warning "\`-version-info/-version-number' is ignored for archives"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for archives"
+
+      test -n "$export_symbols$export_symbols_regex" && \
+	func_warning "\`-export-symbols' is ignored for archives"
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      func_append objs "$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+	func_stripname 'lib' '.la' "$outputname"
+	name=$func_stripname_result
+	eval shared_ext=\"$shrext_cmds\"
+	eval libname=\"$libname_spec\"
+	;;
+      *)
+	test "$module" = no && \
+	  func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+	if test "$need_lib_prefix" != no; then
+	  # Add the "lib" prefix for modules if required
+	  func_stripname '' '.la' "$outputname"
+	  name=$func_stripname_result
+	  eval shared_ext=\"$shrext_cmds\"
+	  eval libname=\"$libname_spec\"
+	else
+	  func_stripname '' '.la' "$outputname"
+	  libname=$func_stripname_result
+	fi
+	;;
+      esac
+
+      if test -n "$objs"; then
+	if test "$deplibs_check_method" != pass_all; then
+	  func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+	else
+	  echo
+	  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+	  $ECHO "*** objects $objs is not portable!"
+	  func_append libobjs " $objs"
+	fi
+      fi
+
+      test "$dlself" != no && \
+	func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+      set dummy $rpath
+      shift
+      test "$#" -gt 1 && \
+	func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+      install_libdir="$1"
+
+      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
+
+	test -n "$vinfo" && \
+	  func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+	test -n "$release" && \
+	  func_warning "\`-release' is ignored for convenience libraries"
+      else
+
+	# Parse the version information argument.
+	save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	shift
+	IFS="$save_ifs"
+
+	test -n "$7" && \
+	  func_fatal_help "too many parameters to \`-version-info'"
+
+	# 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="$1"
+	  number_minor="$2"
+	  number_revision="$3"
+	  #
+	  # 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)
+	    func_arith $number_major + $number_minor
+	    current=$func_arith_result
+	    age="$number_minor"
+	    revision="$number_revision"
+	    ;;
+	  freebsd-aout|freebsd-elf|qnx|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
+	    ;;
+	  irix|nonstopux)
+	    func_arith $number_major + $number_minor
+	    current=$func_arith_result
+	    age="$number_minor"
+	    revision="$number_minor"
+	    lt_irix_increment=no
+	    ;;
+	  esac
+	  ;;
+	no)
+	  current="$1"
+	  revision="$2"
+	  age="$3"
+	  ;;
+	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]) ;;
+	*)
+	  func_error "CURRENT \`$current' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	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]) ;;
+	*)
+	  func_error "REVISION \`$revision' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	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]) ;;
+	*)
+	  func_error "AGE \`$age' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	esac
+
+	if test "$age" -gt "$current"; then
+	  func_error "AGE \`$age' is greater than the current interface number \`$current'"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	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
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix="$major.$age.$revision"
+	  # Darwin ld doesn't like 0 for these options...
+	  func_arith $current + 1
+	  minor_current=$func_arith_result
+	  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
+	    func_arith $current - $age
+	  else
+	    func_arith $current - $age + 1
+	  fi
+	  major=$func_arith_result
+
+	  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
+	    func_arith $revision - $loop
+	    iface=$func_arith_result
+	    func_arith $loop - 1
+	    loop=$func_arith_result
+	    verstring="$verstring_prefix$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	linux)
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  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
+	    func_arith $current - $loop
+	    iface=$func_arith_result
+	    func_arith $loop - 1
+	    loop=$func_arith_result
+	    verstring="$verstring:${iface}.0"
+	  done
+
+	  # Make executables depend on our current version.
+	  func_append verstring ":${current}.0"
+	  ;;
+
+	qnx)
+	  major=".$current"
+	  versuffix=".$current"
+	  ;;
+
+	sunos)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  func_arith $current - $age
+	  major=$func_arith_result
+	  versuffix="-$major"
+	  ;;
+
+	*)
+	  func_fatal_configuration "unknown library version type \`$version_type'"
+	  ;;
+	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
+	    func_warning "undefined symbols not allowed in $host shared libraries"
+	    build_libtool_libs=no
+	    build_old_libs=yes
+	  fi
+	else
+	  # Don't allow undefined symbols.
+	  allow_undefined_flag="$no_undefined_flag"
+	fi
+
+      fi
+
+      func_generate_dlsyms "$libname" "$libname" "yes"
+      func_append libobjs " $symfileobj"
+      test "X$libobjs" = "X " && libobjs=
+
+      if test "$opt_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 | *.gcno)
+	       ;;
+	    $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
+	       func_append removelist " $p"
+	       ;;
+	    *) ;;
+	  esac
+	done
+	test -n "$removelist" && \
+	  func_show_eval "${RM}r \$removelist"
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+	func_append oldlibs " $output_objdir/$libname.$libext"
+
+	# Transform .lo files to .o files.
+	oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      #for path in $notinst_path; do
+      #	lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+      #	deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+      #	dependency_libs=`$ECHO "$dependency_libs " | $SED "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
+	  func_replace_sysroot "$libdir"
+	  func_append temp_xrpath " -R$func_replace_sysroot_result"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) func_append 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 "*) ;;
+	*) func_append 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 "*) ;;
+	*) func_append dlprefiles " $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+	if test -n "$rpath"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+	    # these systems don't actually have a c library (as such)!
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C library is in the System framework
+	    func_append deplibs " System.ltframework"
+	    ;;
+	  *-*-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
+	      func_append 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.
+	  $opt_dry_run || $RM conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $opt_dry_run || $RM conftest
+	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      case $i in
+	      -l*)
+		func_stripname -l '' "$i"
+		name=$func_stripname_result
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  case " $predeps $postdeps " in
+		  *" $i "*)
+		    func_append 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; shift
+		  deplib_match=$1
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    func_append 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
+		;;
+	      *)
+		func_append newdeplibs " $i"
+		;;
+	      esac
+	    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
+	      case $i in
+	      -l*)
+		func_stripname -l '' "$i"
+		name=$func_stripname_result
+		$opt_dry_run || $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 "*)
+		      func_append 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; shift
+		    deplib_match=$1
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		      func_append 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
+		;;
+	      *)
+		func_append newdeplibs " $i"
+		;;
+	      esac
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method; shift
+	  file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    case $a_deplib in
+	    -l*)
+	      func_stripname -l '' "$a_deplib"
+	      name=$func_stripname_result
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  func_append newdeplibs " $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval "\\$ECHO \"$libname_spec\""`
+		if test -n "$file_magic_glob"; then
+		  libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+		else
+		  libnameglob=$libname
+		fi
+		test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  if test "$want_nocaseglob" = yes; then
+		    shopt -s nocaseglob
+		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+		    $nocaseglob
+		  else
+		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+		  fi
+		  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 "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
+			esac
+		      done
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+			 $SED -e 10q |
+			 $EGREP "$file_magic_regex" > /dev/null; then
+			func_append 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
+	      ;;
+	    *)
+	      # Add a -L argument.
+	      func_append newdeplibs " $a_deplib"
+	      ;;
+	    esac
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method; shift
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    case $a_deplib in
+	    -l*)
+	      func_stripname -l '' "$a_deplib"
+	      name=$func_stripname_result
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  func_append 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
+		      func_append 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
+	      ;;
+	    *)
+	      # Add a -L argument.
+	      func_append newdeplibs " $a_deplib"
+	      ;;
+	    esac
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; 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 " $tmp_deplibs" | $SED "s,$i,,"`
+	    done
+	  fi
+	  case $tmp_deplibs in
+	  *[!\	\ ]*)
+	    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
+	    ;;
+	  esac
+	  ;;
+	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 with the System framework
+	  newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
+	  ;;
+	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
+      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+      case $host in
+	*-*-darwin*)
+	  newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  ;;
+      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 " $deplibs " in
+	  *" -L$path/$objdir "*)
+	    func_append new_libs " -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) func_append new_libs " $deplib" ;;
+	  esac
+	  ;;
+	*) func_append 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 "$opt_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
+		func_replace_sysroot "$libdir"
+		libdir=$func_replace_sysroot_result
+		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"*)
+		    ;;
+		  *)
+		    func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+		    ;;
+		  esac
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		func_append dep_rpath " $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) func_apped 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
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+	    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
+	      func_append 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 "$opt_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
+	shift
+	realname="$1"
+	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
+	  func_append linknames " $link"
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+	test "X$libobjs" = "X " && libobjs=
+
+	delfiles=
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+	  export_symbols="$output_objdir/$libname.uexp"
+	  func_append delfiles " $export_symbols"
+	fi
+
+	orig_export_symbols=
+	case $host_os in
+	cygwin* | mingw* | cegcc*)
+	  if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+	    # exporting using user supplied symfile
+	    if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+	      # and it's NOT already a .def file. Must figure out
+	      # which of the given symbols are data symbols and tag
+	      # them as such. So, trigger use of export_symbols_cmds.
+	      # export_symbols gets reassigned inside the "prepare
+	      # the list of exported symbols" if statement, so the
+	      # include_expsyms logic still works.
+	      orig_export_symbols="$export_symbols"
+	      export_symbols=
+	      always_export_symbols=yes
+	    fi
+	  fi
+	  ;;
+	esac
+
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    func_verbose "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $opt_dry_run || $RM $export_symbols
+	    cmds=$export_symbols_cmds
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd1 in $cmds; do
+	      IFS="$save_ifs"
+	      # Take the normal branch if the nm_file_list_spec branch
+	      # doesn't work or if tool conversion is not needed.
+	      case $nm_file_list_spec~$to_tool_file_cmd in
+		*~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+		  try_normal_branch=yes
+		  eval cmd=\"$cmd1\"
+		  func_len " $cmd"
+		  len=$func_len_result
+		  ;;
+		*)
+		  try_normal_branch=no
+		  ;;
+	      esac
+	      if test "$try_normal_branch" = yes \
+		 && { test "$len" -lt "$max_cmd_len" \
+		      || test "$max_cmd_len" -le -1; }
+	      then
+		func_show_eval "$cmd" 'exit $?'
+		skipped_export=false
+	      elif test -n "$nm_file_list_spec"; then
+		func_basename "$output"
+		output_la=$func_basename_result
+		save_libobjs=$libobjs
+		save_output=$output
+		output=${output_objdir}/${output_la}.nm
+		func_to_tool_file "$output"
+		libobjs=$nm_file_list_spec$func_to_tool_file_result
+		func_append delfiles " $output"
+		func_verbose "creating $NM input file list: $output"
+		for obj in $save_libobjs; do
+		  func_to_tool_file "$obj"
+		  $ECHO "$func_to_tool_file_result"
+		done > "$output"
+		eval cmd=\"$cmd1\"
+		func_show_eval "$cmd" 'exit $?'
+		output=$save_output
+		libobjs=$save_libobjs
+		skipped_export=false
+	      else
+		# The command line is too long to execute in one step.
+		func_verbose "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" && test "X$skipped_export" != "X:"; then
+	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+	fi
+
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  tmp_export_symbols="$export_symbols"
+	  test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+	  $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+	fi
+
+	if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+	  # The given exports_symbols file has to be filtered, so filter it.
+	  func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+	  # FIXME: $output_objdir/$libname.filter potentially contains lots of
+	  # 's' commands which not all seds can handle. GNU sed should be fine
+	  # though. Also, the filter scales superlinearly with the number of
+	  # global variables. join(1) would be nice here, but unfortunately
+	  # isn't a blessed tool.
+	  $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+	  func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+	  export_symbols=$output_objdir/$libname.def
+	  $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+	fi
+
+	tmp_deplibs=
+	for test_deplib in $deplibs; do
+	  case " $convenience " in
+	  *" $test_deplib "*) ;;
+	  *)
+	    func_append tmp_deplibs " $test_deplib"
+	    ;;
+	  esac
+	done
+	deplibs="$tmp_deplibs"
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec" &&
+	    test "$compiler_needs_object" = yes &&
+	    test -z "$libobjs"; then
+	    # extract the archives, so we have objects to list.
+	    # TODO: could optimize this to just extract one archive.
+	    whole_archive_flag_spec=
+	  fi
+	  if test -n "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	    test "X$libobjs" = "X " && libobjs=
+	  else
+	    gentop="$output_objdir/${outputname}x"
+	    func_append generated " $gentop"
+
+	    func_extract_archives $gentop $convenience
+	    func_append libobjs " $func_extract_archives_result"
+	    test "X$libobjs" = "X " && libobjs=
+	  fi
+	fi
+
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  func_append linker_flags " $flag"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$opt_mode" = relink; then
+	  $opt_dry_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:" &&
+	   func_len " $test_cmds" &&
+	   len=$func_len_result &&
+	   test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  :
+	else
+	  # The command line is too long to link in one step, link piecewise
+	  # or, if using GNU ld and skipped_export is not :, use a linker
+	  # script.
+
+	  # 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
+	  func_basename "$output"
+	  output_la=$func_basename_result
+
+	  # Clear the reloadable object creation command queue and
+	  # initialize k to one.
+	  test_cmds=
+	  concat_cmds=
+	  objlist=
+	  last_robj=
+	  k=1
+
+	  if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+	    output=${output_objdir}/${output_la}.lnkscript
+	    func_verbose "creating GNU ld script: $output"
+	    echo 'INPUT (' > $output
+	    for obj in $save_libobjs
+	    do
+	      func_to_tool_file "$obj"
+	      $ECHO "$func_to_tool_file_result" >> $output
+	    done
+	    echo ')' >> $output
+	    func_append delfiles " $output"
+	    func_to_tool_file "$output"
+	    output=$func_to_tool_file_result
+	  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+	    output=${output_objdir}/${output_la}.lnk
+	    func_verbose "creating linker input file list: $output"
+	    : > $output
+	    set x $save_libobjs
+	    shift
+	    firstobj=
+	    if test "$compiler_needs_object" = yes; then
+	      firstobj="$1 "
+	      shift
+	    fi
+	    for obj
+	    do
+	      func_to_tool_file "$obj"
+	      $ECHO "$func_to_tool_file_result" >> $output
+	    done
+	    func_append delfiles " $output"
+	    func_to_tool_file "$output"
+	    output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+	  else
+	    if test -n "$save_libobjs"; then
+	      func_verbose "creating reloadable object files..."
+	      output=$output_objdir/$output_la-${k}.$objext
+	      eval test_cmds=\"$reload_cmds\"
+	      func_len " $test_cmds"
+	      len0=$func_len_result
+	      len=$len0
+
+	      # Loop over the list of objects to be linked.
+	      for obj in $save_libobjs
+	      do
+		func_len " $obj"
+		func_arith $len + $func_len_result
+		len=$func_arith_result
+		if test "X$objlist" = X ||
+		   test "$len" -lt "$max_cmd_len"; then
+		  func_append 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.
+		    reload_objs=$objlist
+		    eval concat_cmds=\"$reload_cmds\"
+		  else
+		    # All subsequent reloadable object files will link in
+		    # the last one created.
+		    reload_objs="$objlist $last_robj"
+		    eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+		  fi
+		  last_robj=$output_objdir/$output_la-${k}.$objext
+		  func_arith $k + 1
+		  k=$func_arith_result
+		  output=$output_objdir/$output_la-${k}.$objext
+		  objlist=" $obj"
+		  func_len " $last_robj"
+		  func_arith $len0 + $func_len_result
+		  len=$func_arith_result
+		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~
+	      reload_objs="$objlist $last_robj"
+	      eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
+	      if test -n "$last_robj"; then
+	        eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+	      fi
+	      func_append delfiles " $output"
+
+	    else
+	      output=
+	    fi
+
+	    if ${skipped_export-false}; then
+	      func_verbose "generating symbol list for \`$libname.la'"
+	      export_symbols="$output_objdir/$libname.exp"
+	      $opt_dry_run || $RM $export_symbols
+	      libobjs=$output
+	      # Append the command to create the export file.
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+	      if test -n "$last_robj"; then
+		eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+	      fi
+	    fi
+
+	    test -n "$save_libobjs" &&
+	      func_verbose "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"
+	      $opt_silent || {
+		  func_quote_for_expand "$cmd"
+		  eval "func_echo $func_quote_for_expand_result"
+	      }
+	      $opt_dry_run || eval "$cmd" || {
+		lt_exit=$?
+
+		# Restore the uninstalled library and exit
+		if test "$opt_mode" = relink; then
+		  ( cd "$output_objdir" && \
+		    $RM "${realname}T" && \
+		    $MV "${realname}U" "$realname" )
+		fi
+
+		exit $lt_exit
+	      }
+	    done
+	    IFS="$save_ifs"
+
+	    if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+
+          if ${skipped_export-false}; then
+	    if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	      tmp_export_symbols="$export_symbols"
+	      test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+	      $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+	    fi
+
+	    if test -n "$orig_export_symbols"; then
+	      # The given exports_symbols file has to be filtered, so filter it.
+	      func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+	      # FIXME: $output_objdir/$libname.filter potentially contains lots of
+	      # 's' commands which not all seds can handle. GNU sed should be fine
+	      # though. Also, the filter scales superlinearly with the number of
+	      # global variables. join(1) would be nice here, but unfortunately
+	      # isn't a blessed tool.
+	      $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+	      func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+	      export_symbols=$output_objdir/$libname.def
+	      $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+	    fi
+	  fi
+
+	  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\"
+	    test "X$libobjs" = "X " && libobjs=
+	  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
+	fi
+
+	if test -n "$delfiles"; then
+	  # Append the command to remove temporary files to $cmds.
+	  eval cmds=\"\$cmds~\$RM $delfiles\"
+	fi
+
+	# Add any objects from preloaded convenience libraries
+	if test -n "$dlprefiles"; then
+	  gentop="$output_objdir/${outputname}x"
+	  func_append generated " $gentop"
+
+	  func_extract_archives $gentop $dlprefiles
+	  func_append libobjs " $func_extract_archives_result"
+	  test "X$libobjs" = "X " && libobjs=
+	fi
+
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $opt_silent || {
+	    func_quote_for_expand "$cmd"
+	    eval "func_echo $func_quote_for_expand_result"
+	  }
+	  $opt_dry_run || eval "$cmd" || {
+	    lt_exit=$?
+
+	    # Restore the uninstalled library and exit
+	    if test "$opt_mode" = relink; then
+	      ( 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 "$opt_mode" = relink; then
+	  $opt_dry_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
+	      func_show_eval '${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
+	    func_show_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)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	func_warning "\`-dlopen' is ignored for objects"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+	func_warning "\`-l' and \`-L' are ignored for objects" ;;
+      esac
+
+      test -n "$rpath" && \
+	func_warning "\`-rpath' is ignored for objects"
+
+      test -n "$xrpath" && \
+	func_warning "\`-R' is ignored for objects"
+
+      test -n "$vinfo" && \
+	func_warning "\`-version-info' is ignored for objects"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for objects"
+
+      case $output in
+      *.lo)
+	test -n "$objs$old_deplibs" && \
+	  func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+	libobj=$output
+	func_lo2o "$libobj"
+	obj=$func_lo2o_result
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $opt_dry_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 "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+	else
+	  gentop="$output_objdir/${obj}x"
+	  func_append generated " $gentop"
+
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
+	fi
+      fi
+
+      # If we're not building shared, we need to use non_pic_objs
+      test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      func_execute_cmds "$reload_cmds" 'exit $?'
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  func_show_eval '${RM}r "$gentop"'
+	fi
+
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  func_show_eval '${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"
+	# $opt_dry_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"
+	func_execute_cmds "$reload_cmds" 'exit $?'
+      fi
+
+      if test -n "$gentop"; then
+	func_show_eval '${RM}r "$gentop"'
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+	*cygwin*) func_stripname '' '.exe' "$output"
+	          output=$func_stripname_result.exe;;
+      esac
+      test -n "$vinfo" && \
+	func_warning "\`-version-info' is ignored for programs"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for programs"
+
+      test "$preload" = yes \
+        && test "$dlopen_support" = unknown \
+	&& test "$dlopen_self" = unknown \
+	&& test "$dlopen_self_static" = unknown && \
+	  func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+	# On Rhapsody replace the C library is the System framework
+	compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+	finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
+	;;
+      esac
+
+      case $host in
+      *-*-darwin*)
+	# Don't allow lazy linking, it breaks C++ global constructors
+	# But is supposedly fixed on 10.4 or later (yay!).
+	if test "$tagname" = CXX ; then
+	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+	    10.[0123])
+	      func_append compile_command " ${wl}-bind_at_load"
+	      func_append finalize_command " ${wl}-bind_at_load"
+	    ;;
+	  esac
+	fi
+	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
+	compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	;;
+      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 "*)
+	    func_append new_libs " -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $compile_deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) func_append new_libs " $deplib" ;;
+	  esac
+	  ;;
+	*) func_append new_libs " $deplib" ;;
+	esac
+      done
+      compile_deplibs="$new_libs"
+
+
+      func_append compile_command " $compile_deplibs"
+      func_append 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 "*) ;;
+	  *) func_append 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"*)
+		;;
+	      *)
+		func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    func_append rpath " $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) func_append perm_rpath " $libdir" ;;
+	  esac
+	fi
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+	  testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  ::) dllsearchpath=$libdir;;
+	  *) func_append dllsearchpath ":$libdir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  ::) dllsearchpath=$testbindir;;
+	  *) func_append 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"*)
+		;;
+	      *)
+		func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    func_append rpath " $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) func_append 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 "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+	finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+      fi
+
+      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+      # template prelinking step
+      if test -n "$prelink_cmds"; then
+	func_execute_cmds "$prelink_cmds" 'exit $?'
+      fi
+
+      wrappers_required=yes
+      case $host in
+      *cegcc* | *mingw32ce*)
+        # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+        wrappers_required=no
+        ;;
+      *cygwin* | *mingw* )
+        if test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      *)
+        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      esac
+      if test "$wrappers_required" = no; then
+	# Replace the output file specification.
+	compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	exit_status=0
+	func_show_eval "$link_command" 'exit_status=$?'
+
+	if test -n "$postlink_cmds"; then
+	  func_to_tool_file "$output"
+	  postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	  func_execute_cmds "$postlink_cmds" 'exit $?'
+	fi
+
+	# Delete the generated files.
+	if test -f "$output_objdir/${outputname}S.${objext}"; then
+	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+	fi
+
+	exit $exit_status
+      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
+	    func_append 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
+	    func_append 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 "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$opt_dry_run || $RM $output
+	# Link the executable and exit
+	func_show_eval "$link_command" 'exit $?'
+
+	if test -n "$postlink_cmds"; then
+	  func_to_tool_file "$output"
+	  postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	  func_execute_cmds "$postlink_cmds" 'exit $?'
+	fi
+
+	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"
+
+	func_warning "this platform does not like uninstalled shared libraries"
+	func_warning "\`$output' will be relinked during installation"
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      func_show_eval "$link_command" 'exit $?'
+
+      if test -n "$postlink_cmds"; then
+	func_to_tool_file "$output_objdir/$outputname"
+	postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	func_execute_cmds "$postlink_cmds" 'exit $?'
+      fi
+
+      # Now create the wrapper script.
+      func_verbose "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}\" || $lt_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
+	    func_quote_for_eval "$var_value"
+	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+	  fi
+	done
+	relink_command="(cd `pwd`; $relink_command)"
+	relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if not in dry run mode.
+      $opt_dry_run || {
+	# win32 will think the script is a binary if it has
+	# a .exe suffix, so we strip it off here.
+	case $output in
+	  *.exe) func_stripname '' '.exe' "$output"
+	         output=$func_stripname_result ;;
+	esac
+	# test for cygwin because mv fails w/o .exe extensions
+	case $host in
+	  *cygwin*)
+	    exeext=.exe
+	    func_stripname '' '.exe' "$outputname"
+	    outputname=$func_stripname_result ;;
+	  *) exeext= ;;
+	esac
+	case $host in
+	  *cygwin* | *mingw* )
+	    func_dirname_and_basename "$output" "" "."
+	    output_name=$func_basename_result
+	    output_path=$func_dirname_result
+	    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
+
+	    func_emit_cwrapperexe_src > $cwrappersource
+
+	    # The wrapper executable is built using the $host compiler,
+	    # because it contains $host paths and files. If cross-
+	    # compiling, it, like the target executable, must be
+	    # executed on the $host or under an emulation environment.
+	    $opt_dry_run || {
+	      $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+	      $STRIP $cwrapper
+	    }
+
+	    # Now, create the wrapper script for func_source use:
+	    func_ltwrapper_scriptname $cwrapper
+	    $RM $func_ltwrapper_scriptname_result
+	    trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+	    $opt_dry_run || {
+	      # note: this script will not be executed, so do not chmod.
+	      if test "x$build" = "x$host" ; then
+		$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+	      else
+		func_emit_wrapper no > $func_ltwrapper_scriptname_result
+	      fi
+	    }
+	  ;;
+	  * )
+	    $RM $output
+	    trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+	    func_emit_wrapper no > $output
+	    chmod +x $output
+	  ;;
+	esac
+      }
+      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 $symfileobj"
+	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"
+	  if test "$preload" = yes && test -f "$symfileobj"; then
+	    func_append oldobjs " $symfileobj"
+	  fi
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	func_append generated " $gentop"
+
+	func_extract_archives $gentop $addlibs
+	func_append 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
+
+	# Add any objects from preloaded convenience libraries
+	if test -n "$dlprefiles"; then
+	  gentop="$output_objdir/${outputname}x"
+	  func_append generated " $gentop"
+
+	  func_extract_archives $gentop $dlprefiles
+	  func_append oldobjs " $func_extract_archives_result"
+	fi
+
+	# 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
+	      func_basename "$obj"
+	      $ECHO "$func_basename_result"
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	  :
+	else
+	  echo "copying selected object files to avoid basename conflicts..."
+	  gentop="$output_objdir/${outputname}x"
+	  func_append generated " $gentop"
+	  func_mkdir_p "$gentop"
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  counter=1
+	  for obj in $save_oldobjs
+	  do
+	    func_basename "$obj"
+	    objbase="$func_basename_result"
+	    case " $oldobjs " in
+	    " ") oldobjs=$obj ;;
+	    *[\ /]"$objbase "*)
+	      while :; do
+		# Make sure we don't pick an alternate name that also
+		# overlaps.
+		newobj=lt$counter-$objbase
+		func_arith $counter + 1
+		counter=$func_arith_result
+		case " $oldobjs " in
+		*[\ /]"$newobj "*) ;;
+		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
+		esac
+	      done
+	      func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+	      func_append oldobjs " $gentop/$newobj"
+	      ;;
+	    *) func_append oldobjs " $obj" ;;
+	    esac
+	  done
+	fi
+	eval cmds=\"$old_archive_cmds\"
+
+	func_len " $cmds"
+	len=$func_len_result
+	if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  cmds=$old_archive_cmds
+	elif test -n "$archiver_list_spec"; then
+	  func_verbose "using command file archive linking..."
+	  for obj in $oldobjs
+	  do
+	    func_to_tool_file "$obj"
+	    $ECHO "$func_to_tool_file_result"
+	  done > $output_objdir/$libname.libcmd
+	  func_to_tool_file "$output_objdir/$libname.libcmd"
+	  oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+	  cmds=$old_archive_cmds
+	else
+	  # the command line is too long to link in one step, link in parts
+	  func_verbose "using piecewise archive linking..."
+	  save_RANLIB=$RANLIB
+	  RANLIB=:
+	  objlist=
+	  concat_cmds=
+	  save_oldobjs=$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
+	  eval test_cmds=\"$old_archive_cmds\"
+	  func_len " $test_cmds"
+	  len0=$func_len_result
+	  len=$len0
+	  for obj in $save_oldobjs
+	  do
+	    func_len " $obj"
+	    func_arith $len + $func_len_result
+	    len=$func_arith_result
+	    func_append objlist " $obj"
+	    if test "$len" -lt "$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=
+	      len=$len0
+	    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
+      func_execute_cmds "$cmds" 'exit $?'
+    done
+
+    test -n "$generated" && \
+      func_show_eval "${RM}r$generated"
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      func_verbose "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}\" || $lt_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
+	  func_quote_for_eval "$var_value"
+	  relink_command="$var=$func_quote_for_eval_result; 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 "$relink_command" | $SED "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+	relink_command=
+      fi
+
+      # Only create the output if not a dry run.
+      $opt_dry_run || {
+	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)
+		func_basename "$deplib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$deplib' is not a valid libtool archive"
+		func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+		;;
+	      -L*)
+		func_stripname -L '' "$deplib"
+		func_replace_sysroot "$func_stripname_result"
+		func_append newdependency_libs " -L$func_replace_sysroot_result"
+		;;
+	      -R*)
+		func_stripname -R '' "$deplib"
+		func_replace_sysroot "$func_stripname_result"
+		func_append newdependency_libs " -R$func_replace_sysroot_result"
+		;;
+	      *) func_append newdependency_libs " $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
+
+	    for lib in $dlfiles; do
+	      case $lib in
+	      *.la)
+	        func_basename "$lib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$lib' is not a valid libtool archive"
+		func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+		;;
+	      *) func_append newdlfiles " $lib" ;;
+	      esac
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+	      *.la)
+		# Only pass preopened files to the pseudo-archive (for
+		# eventual linking with the app. that links it) if we
+		# didn't already link the preopened objects directly into
+		# the library:
+		func_basename "$lib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$lib' is not a valid libtool archive"
+		func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
+		;;
+	      esac
+	    done
+	    dlprefiles="$newdlprefiles"
+	  else
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      func_append newdlfiles " $abs"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      func_append newdlprefiles " $abs"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  fi
+	  $RM $output
+	  # place dlname in correct position for cygwin
+	  # In fact, it would be nice if we could use this code for all target
+	  # systems that can't hard-code library paths into their executables
+	  # and that have no shared library path variable independent of PATH,
+	  # but it turns out we can't easily determine that from inspecting
+	  # libtool variables, so we have to hard-code the OSs to which it
+	  # applies here; at the moment, that means platforms that use the PE
+	  # object format with DLL files.  See the long comment at the top of
+	  # tests/bindir.at for full details.
+	  tdlname=$dlname
+	  case $host,$output,$installed,$module,$dlname in
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+	      # If a -bindir argument was supplied, place the dll there.
+	      if test "x$bindir" != x ;
+	      then
+		func_relative_path "$install_libdir" "$bindir"
+		tdlname=$func_relative_path_result$dlname
+	      else
+		# Otherwise fall back on heuristic.
+		tdlname=../bin/$dlname
+	      fi
+	      ;;
+	  esac
+	  $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# 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'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_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
+      }
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+}
+
+{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
+    func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+    $opt_debug
+    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) func_append RM " $arg"; rmforce=yes ;;
+      -*) func_append RM " $arg" ;;
+      *) func_append files " $arg" ;;
+      esac
+    done
+
+    test -z "$RM" && \
+      func_fatal_help "you must specify an RM program"
+
+    rmdirs=
+
+    for file in $files; do
+      func_dirname "$file" "" "."
+      dir="$func_dirname_result"
+      if test "X$dir" = X.; then
+	odir="$objdir"
+      else
+	odir="$dir/$objdir"
+      fi
+      func_basename "$file"
+      name="$func_basename_result"
+      test "$opt_mode" = uninstall && odir="$dir"
+
+      # Remember odir for removal later, being careful to avoid duplicates
+      if test "$opt_mode" = clean; then
+	case " $rmdirs " in
+	  *" $odir "*) ;;
+	  *) func_append rmdirs " $odir" ;;
+	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 func_lalib_p "$file"; then
+	  func_source $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    func_append rmfiles " $odir/$n"
+	  done
+	  test -n "$old_library" && func_append rmfiles " $odir/$old_library"
+
+	  case "$opt_mode" in
+	  clean)
+	    case " $library_names " in
+	    *" $dlname "*) ;;
+	    *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
+	    esac
+	    test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
+	    ;;
+	  uninstall)
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+	    fi
+
+	    if test -n "$old_library"; then
+	      # Do each command in the old_postuninstall commands.
+	      func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+	    fi
+	    # FIXME: should reinstall the best remaining shared library.
+	    ;;
+	  esac
+	fi
+	;;
+
+      *.lo)
+	# Possibly a libtool object, so verify it.
+	if func_lalib_p "$file"; then
+
+	  # Read the .lo file
+	  func_source $dir/$name
+
+	  # Add PIC object to the list of files to remove.
+	  if test -n "$pic_object" &&
+	     test "$pic_object" != none; then
+	    func_append 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
+	    func_append rmfiles " $dir/$non_pic_object"
+	  fi
+	fi
+	;;
+
+      *)
+	if test "$opt_mode" = clean ; then
+	  noexename=$name
+	  case $file in
+	  *.exe)
+	    func_stripname '' '.exe' "$file"
+	    file=$func_stripname_result
+	    func_stripname '' '.exe' "$name"
+	    noexename=$func_stripname_result
+	    # $file with .exe has already been added to rmfiles,
+	    # add $file without .exe
+	    func_append rmfiles " $file"
+	    ;;
+	  esac
+	  # Do a test to see if this is a libtool program.
+	  if func_ltwrapper_p "$file"; then
+	    if func_ltwrapper_executable_p "$file"; then
+	      func_ltwrapper_scriptname "$file"
+	      relink_command=
+	      func_source $func_ltwrapper_scriptname_result
+	      func_append rmfiles " $func_ltwrapper_scriptname_result"
+	    else
+	      relink_command=
+	      func_source $dir/$noexename
+	    fi
+
+	    # note $name still contains .exe if it was in $file originally
+	    # as does the version of $file that was added into $rmfiles
+	    func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	      func_append rmfiles " $odir/lt-$name"
+	    fi
+	    if test "X$noexename" != "X$name" ; then
+	      func_append rmfiles " $odir/lt-${noexename}.c"
+	    fi
+	  fi
+	fi
+	;;
+      esac
+      func_show_eval "$RM $rmfiles" 'exit_status=1'
+    done
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+	func_show_eval "rmdir $dir >/dev/null 2>&1"
+      fi
+    done
+
+    exit $exit_status
+}
+
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
+    func_mode_uninstall ${1+"$@"}
+
+test -z "$opt_mode" && {
+  help="$generic_help"
+  func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+  func_fatal_help "invalid operation mode \`$opt_mode'"
+
+if test -n "$exec_cmd"; then
+  eval exec "$exec_cmd"
+  exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# 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
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/ext/libeio/missing b/ext/libeio/missing
new file mode 100755
index 0000000..28055d2
--- /dev/null
+++ b/ext/libeio/missing
@@ -0,0 +1,376 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 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, see <http://www.gnu.org/licenses/>.
+
+# 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]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+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
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
+# 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).  This is about non-GNU programs, so use $1 not
+# $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 $program 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 $?
+    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-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/ext/libeio/xthread.h b/ext/libeio/xthread.h
new file mode 100644
index 0000000..2a89f45
--- /dev/null
+++ b/ext/libeio/xthread.h
@@ -0,0 +1,166 @@
+#ifndef XTHREAD_H_
+#define XTHREAD_H_
+
+/* whether word reads are potentially non-atomic.
+ * this is conservative, likely most arches this runs
+ * on have atomic word read/writes.
+ */
+#ifndef WORDACCESS_UNSAFE
+# if __i386 || __x86_64
+#  define WORDACCESS_UNSAFE 0
+# else
+#  define WORDACCESS_UNSAFE 1
+# endif
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef _WIN32
+
+#define NTDDI_VERSION NTDDI_WIN2K // needed to get win2000 api calls
+#define _WIN32_WINNT 0x400
+#include <stdio.h>//D
+#include <fcntl.h>
+#include <io.h>
+#include <time.h>
+#include <winsock2.h>
+#include <process.h>
+#include <windows.h>
+#include <pthread.h>
+#define sigset_t int
+#define sigfillset(a)
+#define pthread_sigmask(a,b,c)
+#define sigaddset(a,b)
+#define sigemptyset(s)
+
+typedef pthread_mutex_t xmutex_t;
+#define X_MUTEX_INIT           PTHREAD_MUTEX_INITIALIZER
+#define X_MUTEX_CREATE(mutex)  pthread_mutex_init (&(mutex), 0)
+#define X_LOCK(mutex)          pthread_mutex_lock (&(mutex))
+#define X_UNLOCK(mutex)        pthread_mutex_unlock (&(mutex))
+
+typedef pthread_cond_t xcond_t;
+#define X_COND_INIT                     PTHREAD_COND_INITIALIZER
+#define X_COND_CREATE(cond)		pthread_cond_init (&(cond), 0)
+#define X_COND_SIGNAL(cond)             pthread_cond_signal (&(cond))
+#define X_COND_WAIT(cond,mutex)         pthread_cond_wait (&(cond), &(mutex))
+#define X_COND_TIMEDWAIT(cond,mutex,to) pthread_cond_timedwait (&(cond), &(mutex), &(to))
+
+typedef pthread_t xthread_t;
+#define X_THREAD_PROC(name) static void *name (void *thr_arg)
+#define X_THREAD_ATFORK(a,b,c)
+
+static int
+xthread_create (xthread_t *tid, void *(*proc)(void *), void *arg)
+{
+  int retval;
+  pthread_attr_t attr;
+
+  pthread_attr_init (&attr);
+  pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
+
+  retval = pthread_create (tid, &attr, proc, arg) == 0;
+
+  pthread_attr_destroy (&attr);
+
+  return retval;
+}
+
+#define respipe_read(a,b,c)  PerlSock_recv ((a), (b), (c), 0)
+#define respipe_write(a,b,c) send ((a), (b), (c), 0)
+#define respipe_close(a)     PerlSock_closesocket ((a))
+
+#else
+/////////////////////////////////////////////////////////////////////////////
+
+#if __linux && !defined(_GNU_SOURCE)
+# define _GNU_SOURCE
+#endif
+
+/* just in case */
+#define _REENTRANT 1
+
+#if __solaris
+# define _POSIX_PTHREAD_SEMANTICS 1
+/* try to bribe solaris headers into providing a current pthread API
+ * despite environment being configured for an older version.
+ */
+# define __EXTENSIONS__ 1
+#endif
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <limits.h>
+#include <pthread.h>
+
+typedef pthread_mutex_t xmutex_t;
+#if __linux && defined (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP)
+# define X_MUTEX_INIT		PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
+# define X_MUTEX_CREATE(mutex)						\
+  do {									\
+    pthread_mutexattr_t attr;						\
+    pthread_mutexattr_init (&attr);					\
+    pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_ADAPTIVE_NP);	\
+    pthread_mutex_init (&(mutex), &attr);				\
+  } while (0)
+#else
+# define X_MUTEX_INIT		PTHREAD_MUTEX_INITIALIZER
+# define X_MUTEX_CREATE(mutex)	pthread_mutex_init (&(mutex), 0)
+#endif
+#define X_LOCK(mutex)		pthread_mutex_lock   (&(mutex))
+#define X_UNLOCK(mutex)		pthread_mutex_unlock (&(mutex))
+
+typedef pthread_cond_t xcond_t;
+#define X_COND_INIT			PTHREAD_COND_INITIALIZER
+#define X_COND_CREATE(cond)		pthread_cond_init (&(cond), 0)
+#define X_COND_SIGNAL(cond)		pthread_cond_signal (&(cond))
+#define X_COND_WAIT(cond,mutex)		pthread_cond_wait (&(cond), &(mutex))
+#define X_COND_TIMEDWAIT(cond,mutex,to)	pthread_cond_timedwait (&(cond), &(mutex), &(to))
+
+typedef pthread_t xthread_t;
+#define X_THREAD_PROC(name) static void *name (void *thr_arg)
+#define X_THREAD_ATFORK(prepare,parent,child) pthread_atfork (prepare, parent, child)
+
+// the broken bsd's once more
+#ifndef PTHREAD_STACK_MIN
+# define PTHREAD_STACK_MIN 0
+#endif
+
+#ifndef X_STACKSIZE
+# define X_STACKSIZE sizeof (void *) * 4096
+#endif
+
+static int
+xthread_create (xthread_t *tid, void *(*proc)(void *), void *arg)
+{
+  int retval;
+  sigset_t fullsigset, oldsigset;
+  pthread_attr_t attr;
+
+  pthread_attr_init (&attr);
+  pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
+  pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN < X_STACKSIZE ? X_STACKSIZE : PTHREAD_STACK_MIN);
+#ifdef PTHREAD_SCOPE_PROCESS
+  pthread_attr_setscope (&attr, PTHREAD_SCOPE_PROCESS);
+#endif
+
+  sigfillset (&fullsigset);
+
+  pthread_sigmask (SIG_SETMASK, &fullsigset, &oldsigset);
+  retval = pthread_create (tid, &attr, proc, arg) == 0;
+  pthread_sigmask (SIG_SETMASK, &oldsigset, 0);
+
+  pthread_attr_destroy (&attr);
+
+  return retval;
+}
+
+#define respipe_read(a,b,c)  read  ((a), (b), (c))
+#define respipe_write(a,b,c) write ((a), (b), (c))
+#define respipe_close(a)     close ((a))
+
+#endif
+
+#endif
+
diff --git a/ext/libev/._LICENSE b/ext/libev/._LICENSE
deleted file mode 100644
index de399c9..0000000
Binary files a/ext/libev/._LICENSE and /dev/null differ
diff --git a/ext/libev/._README b/ext/libev/._README
deleted file mode 100644
index de399c9..0000000
Binary files a/ext/libev/._README and /dev/null differ
diff --git a/ext/libev/._config.guess b/ext/libev/._config.guess
deleted file mode 100755
index de399c9..0000000
Binary files a/ext/libev/._config.guess and /dev/null differ
diff --git a/ext/libev/._config.sub b/ext/libev/._config.sub
deleted file mode 100755
index de399c9..0000000
Binary files a/ext/libev/._config.sub and /dev/null differ
diff --git a/ext/libev/._install-sh b/ext/libev/._install-sh
deleted file mode 100755
index de399c9..0000000
Binary files a/ext/libev/._install-sh and /dev/null differ
diff --git a/ext/libev/._missing b/ext/libev/._missing
deleted file mode 100755
index de399c9..0000000
Binary files a/ext/libev/._missing and /dev/null differ
diff --git a/ext/libev/._mkinstalldirs b/ext/libev/._mkinstalldirs
deleted file mode 100755
index de399c9..0000000
Binary files a/ext/libev/._mkinstalldirs and /dev/null differ
diff --git a/ext/libev/Changes b/ext/libev/Changes
index a9e0ac4..c664503 100644
--- a/ext/libev/Changes
+++ b/ext/libev/Changes
@@ -1,5 +1,123 @@
 Revision history for libev, a high-performance and full-featured event loop.
 
+TODO: ev_loop_wakeup
+TODO: EV_STANDALONE == NO_HASSEL (do not use clock_gettime in ev_standalone)
+
+4.11 Sat Feb  4 19:52:39 CET 2012
+	- INCOMPATIBLE CHANGE: ev_timer_again now clears the pending status, as
+          was documented already, but not implemented in the repeating case.
+        - new compiletime symbols: EV_NO_SMP and EV_NO_THREADS.
+	- fix a race where the workaround against the epoll fork bugs
+          caused signals to not be handled anymore.
+	- correct backend_fudge for most backends, and implement a windows
+          specific workaround to avoid looping because we call both
+          select and Sleep, both with different time resolutions.
+        - document range and guarantees of ev_sleep.
+        - document reasonable ranges for periodics interval and offset.
+        - rename backend_fudge to backend_mintime to avoid future confusion :)
+	- change the default periodic reschedule function to hopefully be more
+          exact and correct even in corner cases or in the far future.
+        - do not rely on -lm anymore: use it when available but use our
+          own floor () if it is missing. This should make it easier to embed,
+          as no external libraries are required.
+        - strategically import macros from libecb and mark rarely-used functions
+          as cache-cold (saving almost 2k code size on typical amd64 setups).
+        - add Symbols.ev and Symbols.event files, that were missing.
+        - fix backend_mintime value for epoll (was 1/1024, is 1/1000 now).
+        - fix #3 "be smart about timeouts" to not "deadlock" when
+          timeout == now, also improve the section overall.
+        - avoid "AVOIDING FINISHING BEFORE RETURNING" idiom.
+        - support new EV_API_STATIC mode to make all libev symbols
+          static.
+        - supply default CFLAGS of -g -O3 with gcc when original CFLAGS
+          were empty.
+
+4.04 Wed Feb 16 09:01:51 CET 2011
+	- fix two problems in the native win32 backend, where reuse of fd's
+          with different underlying handles caused handles not to be removed
+          or added to the select set (analyzed and tested by Bert Belder).
+	- do no rely on ceil() in ev_e?poll.c.
+        - backport libev to HP-UX versions before 11 v3.
+        - configure did not detect nanosleep and clock_gettime properly when
+          they are available in the libc (as opposed to -lrt).
+
+4.03 Tue Jan 11 14:37:25 CET 2011
+	- officially support polling files with all backends.
+	- support files, /dev/zero etc. the same way as select in the epoll
+          backend, by generating events on our own.
+        - ports backend: work around solaris bug 6874410 and many related ones
+          (EINTR, maybe more), with no performance loss (note that the solaris
+          bug report is actually wrong, reality is far more bizarre and broken
+          than that).
+	- define EV_READ/EV_WRITE as macros in event.h, as some programs use
+          #ifdef to test for them.
+        - new (experimental) function: ev_feed_signal.
+        - new (to become default) EVFLAG_NOSIGMASK flag.
+        - new EVBACKEND_MASK symbol.
+        - updated COMMON IDIOMS SECTION.
+
+4.01 Fri Nov  5 21:51:29 CET 2010
+        - automake fucked it up, apparently, --add-missing -f is not quite enough
+          to make it update its files, so 4.00 didn't install ev++.h and
+          event.h on make install. grrr.
+        - ev_loop(count|depth) didn't return anything (Robin Haberkorn).
+        - change EV_UNDEF to 0xffffffff to silence some overzealous compilers.
+        - use "(libev) " prefix for all libev error messages now.
+
+4.00 Mon Oct 25 12:32:12 CEST 2010
+	- "PORTING FROM LIBEV 3.X TO 4.X" (in ev.pod) is recommended reading.
+	- ev_embed_stop did not correctly stop the watcher (very good
+          testcase by Vladimir Timofeev).
+        - ev_run will now always update the current loop time - it erroneously
+          didn't when idle watchers were active, causing timers not to fire.
+        - fix a bug where a timeout of zero caused the timer not to fire
+          in the libevent emulation (testcase by Péter Szabó).
+	- applied win32 fixes by Michael Lenaghan (also James Mansion).
+	- replace EV_MINIMAL by EV_FEATURES.
+        - prefer EPOLL_CTL_ADD over EPOLL_CTL_MOD in some more cases, as it
+          seems the former is *much* faster than the latter.
+        - linux kernel version detection (for inotify bug workarounds)
+          did not work properly.
+        - reduce the number of spurious wake-ups with the ports backend.
+        - remove dependency on sys/queue.h on freebsd (patch by Vanilla Hsu).
+        - do async init within ev_async_start, not ev_async_set, which avoids
+          an API quirk where the set function must be called in the C++ API
+          even when there is nothing to set.
+        - add (undocumented) EV_ENABLE when adding events with kqueue,
+          this might help with OS X, which seems to need it despite documenting
+          not to need it (helpfully pointed out by Tilghman Lesher).
+        - do not use poll by default on freebsd, it's broken (what isn't
+          on freebsd...).
+        - allow to embed epoll on kernels >= 2.6.32.
+        - configure now prepends -O3, not appends it, so one can still
+          override it.
+        - ev.pod: greatly expanded the portability section, added a porting
+          section, a description of watcher states and made lots of minor fixes.
+        - disable poll backend on AIX, the poll header spams the namespace
+          and it's not worth working around dead platforms (reported
+          and analyzed by Aivars Kalvans).
+        - improve header file compatibility of the standalone eventfd code
+          in an obscure case.
+        - implement EV_AVOID_STDIO option.
+        - do not use sscanf to parse linux version number (smaller, faster,
+          no sscanf dependency).
+        - new EV_CHILD_ENABLE and EV_SIGNAL_ENABLE configurable settings.
+        - update libev.m4 HAVE_CLOCK_SYSCALL test for newer glibcs.
+        - add section on accept() problems to the manpage.
+        - rename EV_TIMEOUT to EV_TIMER.
+        - rename ev_loop_count/depth/verify/loop/unloop.
+        - remove ev_default_destroy and ev_default_fork.
+        - switch to two-digit minor version.
+        - work around an apparent gentoo compiler bug.
+        - define _DARWIN_UNLIMITED_SELECT. just so.
+        - use enum instead of #define for most constants.
+        - improve compatibility to older C++ compilers.
+        - (experimental) ev_run/ev_default_loop/ev_break/ev_loop_new have now
+          default arguments when compiled as C++.
+        - enable automake dependency tracking.
+        - ev_loop_new no longer leaks memory when loop creation failed.
+        - new ev_cleanup watcher type.
+
 3.9  Thu Dec 31 07:59:59 CET 2009
 	- signalfd is no longer used by default and has to be requested
           explicitly - this means that easy to catch bugs become hard to
@@ -8,7 +126,7 @@ Revision history for libev, a high-performance and full-featured event loop.
           that this is a race condition regardless of EV_SIGNALFD.
 	- backport inotify code to C89.
         - inotify file descriptors could leak into child processes.
-        - ev_stat watchers could keep an errornous extra ref on the loop,
+        - ev_stat watchers could keep an erroneous extra ref on the loop,
           preventing exit when unregistering all watchers (testcases
           provided by ry at tinyclouds.org).
         - implement EV_WIN32_HANDLE_TO_FD and EV_WIN32_CLOSE_FD configuration
@@ -24,14 +142,14 @@ Revision history for libev, a high-performance and full-featured event loop.
         - add missing string.h include (Denis F. Latypoff).
         - only replace ev_stat.prev when we detect an actual difference,
           so prev is (almost) always different to attr. this might
-          have caused the probems with 04_stat.t.
+          have caused the problems with 04_stat.t.
         - add ev::timer->remaining () method to C++ API.
 
 3.8  Sun Aug  9 14:30:45 CEST 2009
 	- incompatible change: do not necessarily reset signal handler
           to SIG_DFL when a sighandler is stopped.
         - ev_default_destroy did not properly free or zero some members,
-          potentially causing crashes and memory corruption on repated
+          potentially causing crashes and memory corruption on repeated
           ev_default_destroy/ev_default_loop calls.
 	- take advantage of signalfd on GNU/Linux systems.
 	- document that the signal mask might be in an unspecified
@@ -76,7 +194,7 @@ Revision history for libev, a high-performance and full-featured event loop.
           Malek Hadj-Ali).
         - implement ev_suspend and ev_resume.
         - new EV_CUSTOM revents flag for use by applications.
-        - add documentation section about priorites.
+        - add documentation section about priorities.
         - add a glossary to the dcoumentation.
         - extend the ev_fork description slightly.
         - optimize a jump out of call_pending.
@@ -163,7 +281,7 @@ Revision history for libev, a high-performance and full-featured event loop.
 3.45 Tue Oct 21 21:59:26 CEST 2008
 	- disable inotify usage on linux <2.6.25, as it is broken
           (reported by Yoann Vandoorselaere).
-        - ev_stat errornously would try to add inotify watchers
+        - ev_stat erroneously would try to add inotify watchers
           even when inotify wasn't available (this should only
           have a performance impact).
 	- ev_once now passes both timeout and io to the callback if both
@@ -241,10 +359,10 @@ Revision history for libev, a high-performance and full-featured event loop.
           not clearing revents field in ev_poll (Brandon Black)
           (no such systems are known at this time).
         - work around a bug in realloc on openbsd and darwin,
-          also makes the errornous valgrind complaints
+          also makes the erroneous valgrind complaints
           go away (noted by various people).
         - fix ev_async_pending, add c++ wrapper for ev_async
-          (based on patch sent by Johannes Deisenhofer.
+          (based on patch sent by Johannes Deisenhofer).
         - add sensible set method to ev::embed.
         - made integer constants type int in ev.h.
 
diff --git a/ext/libev/Makefile.am b/ext/libev/Makefile.am
index 9a8239e..059305b 100644
--- a/ext/libev/Makefile.am
+++ b/ext/libev/Makefile.am
@@ -1,11 +1,11 @@
-AUTOMAKE_OPTIONS = foreign no-dependencies
+AUTOMAKE_OPTIONS = foreign
 
-VERSION_INFO = 3:0
+VERSION_INFO = 4:0:0
 
 EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \
 	     ev_vars.h ev_wrap.h \
 	     ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c \
-	     ev.3 ev.pod
+	     ev.3 ev.pod Symbols.ev Symbols.event
 
 man_MANS = ev.3
 
@@ -16,3 +16,5 @@ lib_LTLIBRARIES = libev.la
 libev_la_SOURCES = ev.c event.c
 libev_la_LDFLAGS = -version-info $(VERSION_INFO)
 
+ev.3: ev.pod
+	pod2man -n LIBEV -r "libev-$(VERSION)" -c "libev - high performance full featured event loop" -s3 <$< >$@
diff --git a/ext/libev/Makefile.in b/ext/libev/Makefile.in
index 84f63d0..1e15bd8 100644
--- a/ext/libev/Makefile.in
+++ b/ext/libev/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,8 +18,9 @@
 
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -37,7 +39,7 @@ subdir = .
 DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
 	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
 	$(srcdir)/config.h.in $(top_srcdir)/configure config.guess \
-	config.sub install-sh ltmain.sh missing mkinstalldirs
+	config.sub depcomp install-sh ltmain.sh missing mkinstalldirs
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/libev.m4 \
 	$(top_srcdir)/configure.ac
@@ -48,15 +50,30 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" \
 	"$(DESTDIR)$(includedir)"
-libLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(lib_LTLIBRARIES)
 libev_la_LIBADD =
 am_libev_la_OBJECTS = ev.lo event.lo
@@ -65,8 +82,9 @@ libev_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(libev_la_LDFLAGS) \
 	$(LDFLAGS) -o $@
 DEFAULT_INCLUDES = -I. at am__isrc@
-depcomp =
-am__depfiles_maybe =
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
@@ -81,7 +99,6 @@ DIST_SOURCES = $(libev_la_SOURCES)
 man3dir = $(mandir)/man3
 NROFF = nroff
 MANS = $(man_MANS)
-includeHEADERS_INSTALL = $(INSTALL_HEADER)
 HEADERS = $(include_HEADERS)
 ETAGS = etags
 CTAGS = ctags
@@ -89,9 +106,9 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
@@ -108,44 +125,46 @@ CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DSYMUTIL = @DSYMUTIL@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
 GREP = @GREP@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
+NM = @NM@
 NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
@@ -159,8 +178,7 @@ abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -191,6 +209,7 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -203,14 +222,15 @@ sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = foreign no-dependencies
-VERSION_INFO = 3:0
+AUTOMAKE_OPTIONS = foreign
+VERSION_INFO = 4:0:0
 EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \
 	     ev_vars.h ev_wrap.h \
 	     ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c \
-	     ev.3 ev.pod
+	     ev.3 ev.pod Symbols.ev Symbols.event
 
 man_MANS = ev.3
 include_HEADERS = ev.h ev++.h event.h
@@ -228,15 +248,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
-	      cd $(srcdir) && $(AUTOMAKE) --foreign  \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
 		&& exit 0; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -252,9 +272,10 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC
 	$(SHELL) ./config.status --recheck
 
 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-	cd $(srcdir) && $(AUTOCONF)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
 
 config.h: stamp-h1
 	@if test ! -f $@; then \
@@ -266,7 +287,7 @@ stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h1
 	cd $(top_builddir) && $(SHELL) ./config.status config.h
 $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
-	cd $(top_srcdir) && $(AUTOHEADER)
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
 	rm -f stamp-h1
 	touch $@
 
@@ -275,20 +296,24 @@ distclean-hdr:
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
 	@$(NORMAL_INSTALL)
 	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
-	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
 	  if test -f $$p; then \
-	    f=$(am__strip_dir) \
-	    echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-	    $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+	    list2="$$list2 $$p"; \
 	  else :; fi; \
-	done
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+	}
 
 uninstall-libLTLIBRARIES:
 	@$(NORMAL_UNINSTALL)
-	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-	  p=$(am__strip_dir) \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
 	done
 
 clean-libLTLIBRARIES:
@@ -308,14 +333,29 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ev.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/event.Plo at am__quote@
+
 .c.o:
-	$(COMPILE) -c $<
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
 
 .c.obj:
-	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
-	$(LTCOMPILE) -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -324,83 +364,79 @@ clean-libtool:
 	-rm -rf .libs _libs
 
 distclean-libtool:
-	-rm -f libtool
-install-man3: $(man3_MANS) $(man_MANS)
+	-rm -f libtool config.lt
+install-man3: $(man_MANS)
 	@$(NORMAL_INSTALL)
 	test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
-	@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
-	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-	for i in $$l2; do \
-	  case "$$i" in \
-	    *.3*) list="$$list $$i" ;; \
-	  esac; \
+	@list=''; test -n "$(man3dir)" || exit 0; \
+	{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.3[a-z]*$$/p'; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
+	  fi; \
 	done; \
-	for i in $$list; do \
-	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-	  else file=$$i; fi; \
-	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-	  case "$$ext" in \
-	    3*) ;; \
-	    *) ext='3' ;; \
-	  esac; \
-	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
-	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-	  echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
-	  $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
-	done
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
+	done; }
+
 uninstall-man3:
 	@$(NORMAL_UNINSTALL)
-	@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
-	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-	for i in $$l2; do \
-	  case "$$i" in \
-	    *.3*) list="$$list $$i" ;; \
-	  esac; \
-	done; \
-	for i in $$list; do \
-	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-	  case "$$ext" in \
-	    3*) ;; \
-	    *) ext='3' ;; \
-	  esac; \
-	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
-	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-	  echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \
-	  rm -f "$(DESTDIR)$(man3dir)/$$inst"; \
-	done
+	@list=''; test -n "$(man3dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.3[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	test -z "$$files" || { \
+	  echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \
+	  cd "$(DESTDIR)$(man3dir)" && rm -f $$files; }
 install-includeHEADERS: $(include_HEADERS)
 	@$(NORMAL_INSTALL)
 	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
-	@list='$(include_HEADERS)'; for p in $$list; do \
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  f=$(am__strip_dir) \
-	  echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
-	  $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
 	done
 
 uninstall-includeHEADERS:
 	@$(NORMAL_UNINSTALL)
-	@list='$(include_HEADERS)'; for p in $$list; do \
-	  f=$(am__strip_dir) \
-	  echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(includedir)/$$f"; \
-	done
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(includedir)" && rm -f $$files
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
@@ -408,36 +444,54 @@ TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 	  done | \
 	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
 	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
 	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
+	@list='$(MANS)'; if test -n "$$list"; then \
+	  list=`for p in $$list; do \
+	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+	  if test -n "$$list" && \
+	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    exit 1; \
+	  else :; fi; \
+	else :; fi
 	$(am__remove_distdir)
-	test -d $(distdir) || mkdir $(distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -453,21 +507,27 @@ distdir: $(DISTFILES)
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
 	  if test -d $$d/$$file; then \
 	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
-	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
 	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
 	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
 	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
-	|| chmod -R a+r $(distdir)
+	|| chmod -R a+r "$(distdir)"
 dist-gzip: distdir
 	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
 	$(am__remove_distdir)
@@ -480,6 +540,10 @@ dist-lzma: distdir
 	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
 	$(am__remove_distdir)
 
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+	$(am__remove_distdir)
+
 dist-tarZ: distdir
 	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
 	$(am__remove_distdir)
@@ -503,15 +567,17 @@ dist dist-all: distdir
 distcheck: dist
 	case '$(DIST_ARCHIVES)' in \
 	*.tar.gz*) \
-	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
-	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
 	*.tar.lzma*) \
-	  unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
 	*.tar.Z*) \
 	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
 	*.shar.gz*) \
-	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
@@ -519,9 +585,11 @@ distcheck: dist
 	mkdir $(distdir)/_build
 	mkdir $(distdir)/_inst
 	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
 	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
 	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-	  && cd $(distdir)/_build \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
 	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
 	  && $(MAKE) $(AM_MAKEFLAGS) \
@@ -543,13 +611,15 @@ distcheck: dist
 	  && rm -rf "$$dc_destdir" \
 	  && $(MAKE) $(AM_MAKEFLAGS) dist \
 	  && rm -rf $(DIST_ARCHIVES) \
-	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
 	$(am__remove_distdir)
 	@(echo "$(distdir) archives ready for distribution: "; \
 	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
 	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-	@cd $(distuninstallcheck_dir) \
+	@$(am__cd) '$(distuninstallcheck_dir)' \
 	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
 	   || { echo "ERROR: files left after uninstall:" ; \
 	        if test -n "$(DESTDIR)"; then \
@@ -593,6 +663,7 @@ clean-generic:
 
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -604,6 +675,7 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
 
 distclean: distclean-am
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-hdr distclean-libtool distclean-tags
@@ -614,6 +686,8 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
@@ -622,23 +696,34 @@ install-data-am: install-includeHEADERS install-man
 
 install-dvi: install-dvi-am
 
+install-dvi-am:
+
 install-exec-am: install-libLTLIBRARIES
 
 install-html: install-html-am
 
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man: install-man3
 
 install-pdf: install-pdf-am
 
+install-pdf-am:
+
 install-ps: install-ps-am
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
 	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -660,12 +745,12 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
 
 uninstall-man: uninstall-man3
 
-.MAKE: install-am install-strip
+.MAKE: all install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
 	clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \
 	dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \
-	dist-zip distcheck distclean distclean-compile \
+	dist-xz dist-zip distcheck distclean distclean-compile \
 	distclean-generic distclean-hdr distclean-libtool \
 	distclean-tags distcleancheck distdir distuninstallcheck dvi \
 	dvi-am html html-am info info-am install install-am \
@@ -680,6 +765,10 @@ uninstall-man: uninstall-man3
 	tags uninstall uninstall-am uninstall-includeHEADERS \
 	uninstall-libLTLIBRARIES uninstall-man uninstall-man3
 
+
+ev.3: ev.pod
+	pod2man -n LIBEV -r "libev-$(VERSION)" -c "libev - high performance full featured event loop" -s3 <$< >$@
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/ext/libev/aclocal.m4 b/ext/libev/aclocal.m4
index e9b0602..18abb73 100644
--- a/ext/libev/aclocal.m4
+++ b/ext/libev/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -13,108 +13,194 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(AC_AUTOCONF_VERSION, [2.61],,
-[m4_warning([this file was generated for autoconf 2.61.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
+[m4_warning([this file was generated for autoconf 2.67.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gordon Matzigkeit, 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.
+
+m4_define([_LT_COPYING], [dnl
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool 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.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
 
-# serial 52 Debian 1.5.26-4 AC_PROG_LIBTOOL
+# serial 56 LT_INIT
 
 
-# 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])])])
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+       [m4_default([$3],
+		   [m4_fatal([Libtool version $1 or higher is required],
+		             63)])],
+       [$2])])
 
 
-# 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
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+  *\ * | *\	*)
+    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
 
 # This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+LIBTOOL_DEPS="$ltmain"
 
 # Always use our own libtool.
 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 AC_SUBST(LIBTOOL)dnl
 
-# Prevent multiple expansion
-define([AC_PROG_LIBTOOL], [])
-])# _AC_PROG_LIBTOOL
+_LT_SETUP
 
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
 
-# 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
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+m4_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_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+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([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+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
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
 dnl
-AC_LIBTOOL_SYS_MAX_CMD_LEN
-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-AC_LIBTOOL_OBJDIR
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
 
-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-_LT_AC_PROG_ECHO_BACKSLASH
+m4_require([_LT_TAG_COMPILER])dnl
+_LT_PROG_ECHO_BACKSLASH
 
 case $host_os in
 aix3*)
@@ -130,116 +216,653 @@ 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']
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
 
 # Same as above, but do not quote variable references.
-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
+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 delay expansion of an escaped single quote.
+delay_single_quote_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
+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, :)
+with_gnu_ld="$lt_cv_prog_gnu_ld"
 
 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
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
 case $deplibs_check_method in
 file_magic*)
   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    AC_PATH_MAGIC
+    _LT_PATH_MAGIC
   fi
   ;;
 esac
 
-_LT_REQUIRED_DARWIN_CHECKS
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
 
-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
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
 
-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
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME.  Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+	[m4_ifval([$1], [$1], [$2])])
+    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+    m4_ifval([$4],
+	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+    lt_dict_add_subkey([lt_decl_dict], [$2],
+	[tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+  [0], [m4_fatal([$0: too few arguments: $#])],
+  [1], [m4_fatal([$0: too few arguments: $#: $1])],
+  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+     m4_if([$2], [],
+	   m4_quote(lt_decl_varnames),
+	m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'.  VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly.  In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
 
 
-# _LT_AC_SYS_COMPILER
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+#    # Some comment about what VAR is for.
+#    visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+					   [description])))[]dnl
+m4_pushdef([_libtool_name],
+    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+    [0], [_libtool_name=[$]$1],
+    [1], [_libtool_name=$lt_[]$1],
+    [2], [_libtool_name=$lt_[]$1],
+    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
 # -------------------
-AC_DEFUN([_LT_AC_SYS_COMPILER],
+# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'.  Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+	dnl If the libtool generation code has been placed in $CONFIG_LT,
+	dnl instead of duplicating it all over again into config.status,
+	dnl then we will have config.status run $CONFIG_LT later, so it
+	dnl needs to know what name is stored there:
+        [AC_CONFIG_COMMANDS([libtool],
+            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+    dnl If the libtool generation code is destined for config.status,
+    dnl expand the accumulated commands and init code now:
+    [AC_CONFIG_COMMANDS([libtool],
+        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# 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
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\[$]0 --fallback-echo"')dnl "
+  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+  ;;
+esac
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+cat >"$CONFIG_LT" <<_LTEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+
+lt_cl_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AS_SHELL_SANITIZE
+_AS_PREPARE
+
+exec AS_MESSAGE_FD>&1
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+  echo
+  AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+  -h, --help      print this help, then exit
+  -V, --version   print version number, then exit
+  -q, --quiet     do not print progress messages
+  -d, --debug     don't remove temporary files
+
+Report bugs to <bug-libtool at gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+  case $[1] in
+    --version | --v* | -V )
+      echo "$lt_cl_version"; exit 0 ;;
+    --help | --h* | -h )
+      echo "$lt_cl_help"; exit 0 ;;
+    --debug | --d* | -d )
+      debug=: ;;
+    --quiet | --q* | --silent | --s* | -q )
+      lt_cl_silent=: ;;
+
+    -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+    *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+  esac
+  shift
+done
+
+if $lt_cl_silent; then
+  exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure.  Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+if test "$no_create" != yes; then
+  lt_cl_success=:
+  test "$silent" = yes &&
+    lt_config_lt_args="$lt_config_lt_args --quiet"
+  exec AS_MESSAGE_LOG_FD>/dev/null
+  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+  exec AS_MESSAGE_LOG_FD>>config.log
+  $lt_cl_success || AS_EXIT(1)
+fi
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, 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 TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+  m4_if(_LT_TAG, [C], [
+    # 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
+
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
+
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+  case $host_os in
+  aix3*)
+    cat <<\_LT_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
+_LT_EOF
+    ;;
+  esac
+
+  _LT_PROG_LTMAIN
+
+  # 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  _LT_PROG_XSI_SHELLFNS
+
+  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+  [C],			[_LT_LANG(C)],
+  [C++],		[_LT_LANG(CXX)],
+  [Java],		[_LT_LANG(GCJ)],
+  [Fortran 77],		[_LT_LANG(F77)],
+  [Fortran],		[_LT_LANG(FC)],
+  [Windows Resource],	[_LT_LANG(RC)],
+  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+    [_LT_LANG($1)],
+    [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+  [LT_SUPPORTED_TAG([$1])dnl
+  m4_append([_LT_TAGS], [$1 ])dnl
+  m4_define([_LT_LANG_]$1[_enabled], [])dnl
+  _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+  [LT_LANG(CXX)],
+  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+  [LT_LANG(F77)],
+  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+  [LT_LANG(FC)],
+  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+  [LT_LANG(GCJ)],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+    [LT_LANG(GCJ)],
+    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+      [LT_LANG(GCJ)],
+      [m4_ifdef([AC_PROG_GCJ],
+	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([A][M_PROG_GCJ],
+	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([LT_PROG_GCJ],
+	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+  [LT_LANG(RC)],
+  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
 [AC_REQUIRE([AC_PROG_CC])dnl
 
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
 # If no C compiler was specified, use CC.
 LTCC=${LTCC-"$CC"}
 
@@ -248,36 +871,20 @@ 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_TAG_COMPILER
 
 
 # _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
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_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*
+$RM conftest*
 ])# _LT_COMPILER_BOILERPLATE
 
 
@@ -285,39 +892,57 @@ $rm conftest*
 # ----------------------
 # 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
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_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*
+$RM -r conftest*
 ])# _LT_LINKER_BOILERPLATE
 
 # _LT_REQUIRED_DARWIN_CHECKS
-# --------------------------
-# Check for some things on darwin
-AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
   case $host_os in
     rhapsody* | darwin*)
     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+    AC_CHECK_TOOL([LIPO], [lipo], [:])
+    AC_CHECK_TOOL([OTOOL], [otool], [:])
+    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+    _LT_DECL([], [DSYMUTIL], [1],
+      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+    _LT_DECL([], [NMEDIT], [1],
+      [Tool to change global to local symbols on Mac OS X])
+    _LT_DECL([], [LIPO], [1],
+      [Tool to manipulate fat objects and archives on Mac OS X])
+    _LT_DECL([], [OTOOL], [1],
+      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+    _LT_DECL([], [OTOOL64], [1],
+      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
 
     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
+	# 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.
+	rm -rf libconftest.dylib*
+	echo "int foo(void){return 1;}" > conftest.c
+	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	  lt_cv_apple_cc_single_mod=yes
+	else
+	  cat conftest.err >&AS_MESSAGE_LOG_FD
+	fi
+	rm -rf libconftest.dylib*
+	rm -f conftest.*
       fi])
     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
       [lt_cv_ld_exported_symbols_list],
@@ -326,26 +951,26 @@ AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
       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"
+	[lt_cv_ld_exported_symbols_list=yes],
+	[lt_cv_ld_exported_symbols_list=no])
+	LDFLAGS="$save_LDFLAGS"
     ])
     case $host_os in
-    rhapsody* | darwin1.[[0123]])
+    rhapsody* | darwin1.[[012]])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
     darwin1.*)
-     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*)
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*) # darwin 5.x on
       # 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' ;;
+	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
@@ -355,10 +980,10 @@ AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
     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}"
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
     fi
     if test "$DSYMUTIL" != ":"; then
-      _lt_dsymutil="~$DSYMUTIL \$lib || :"
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
     fi
@@ -366,16 +991,51 @@ AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
   esac
 ])
 
-# _LT_AC_SYS_LIBPATH_AIX
-# ----------------------
+
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_automatic, $1)=yes
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  _LT_TAGVAR(link_all_deplibs, $1)=yes
+  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    _LT_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_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    _LT_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_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}"
+    m4_if([$1], [CXX],
+[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      _LT_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_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
+  _LT_TAGVAR(ld_shlibs, $1)=no
+  fi
+])
+
+# _LT_SYS_MODULE_PATH_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
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 lt_aix_libpath_sed='
     /Import File Strings/,/^$/ {
@@ -390,45 +1050,45 @@ 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_SYS_MODULE_PATH_AIX
 
 
-# _LT_AC_SHELL_INIT(ARG)
-# ----------------------
-AC_DEFUN([_LT_AC_SHELL_INIT],
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_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_SHELL_INIT
 
 
-# _LT_AC_PROG_ECHO_BACKSLASH
-# --------------------------
+# _LT_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([
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[_LT_SHELL_INIT([
 # Check that we are running under the correct shell.
 SHELL=${CONFIG_SHELL-/bin/sh}
 
-case X$ECHO in
+case X$lt_ECHO in
 X*--fallback-echo)
   # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
   ;;
 esac
 
-echo=${ECHO-echo}
+ECHO=${lt_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!
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $ECHO works!
   :
 else
   # Restart under the correct shell.
@@ -438,9 +1098,9 @@ fi
 if test "X[$]1" = X--fallback-echo; then
   # used as fallback echo
   shift
-  cat <<EOF
+  cat <<_LT_EOF
 [$]*
-EOF
+_LT_EOF
   exit 0
 fi
 
@@ -448,124 +1108,127 @@ fi
 # 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 -z "$lt_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 &&
+	 { 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.
+  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
+    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 -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"
+    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
-	# maybe with a smaller string...
-	prev=:
+        # 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
+	  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
+	  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
-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"
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
 fi
 
-AC_SUBST(ECHO)
-])])# _LT_AC_PROG_ECHO_BACKSLASH
+AC_SUBST(lt_ECHO)
+])
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1],
+    [An echo program that does not interpret backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
 
 
-# _LT_AC_LOCK
-# -----------
-AC_DEFUN([_LT_AC_LOCK],
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
 [AC_ARG_ENABLE([libtool-lock],
-    [AC_HELP_STRING([--disable-libtool-lock],
-	[avoid locking (might break parallel builds)])])
+  [AS_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
@@ -576,12 +1239,12 @@ ia64-*-hpux*)
   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"
-      ;;
+      *ELF-32*)
+	HPUX_IA64_MODE="32"
+	;;
+      *ELF-64*)
+	HPUX_IA64_MODE="64"
+	;;
     esac
   fi
   rm -rf conftest*
@@ -590,79 +1253,79 @@ ia64-*-hpux*)
   # 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
+    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*)
+s390*-*linux*|s390*-*tpf*|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
-      ;;
+      *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*|s390*-*tpf*)
+	    LD="${LD-ld} -m elf64_s390"
+	    ;;
+	  sparc*-*linux*)
+	    LD="${LD-ld} -m elf64_sparc"
+	    ;;
+	esac
+	;;
     esac
   fi
   rm -rf conftest*
@@ -674,7 +1337,7 @@ s390*-*linux*|sparc*-*linux*)
   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_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[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
@@ -690,7 +1353,7 @@ sparc*-*solaris*)
       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
+	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
 	  LD="${LD-ld} -64"
 	fi
 	;;
@@ -700,30 +1363,63 @@ sparc*-*solaris*)
   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_ENABLE_LOCK
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[AC_CHECK_TOOL(AR, ar, false)
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1])
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+    [Commands used to install an old-style archive])
+
+# 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=
 
-])# _LT_AC_LOCK
+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_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+    [Commands used to build an old-style archive])
+])# _LT_CMD_OLD_ARCHIVE
 
 
-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# _LT_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_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
 AC_CACHE_CHECK([$1], [$2],
   [$2=no
-  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   m4_if([$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
@@ -743,29 +1439,35 @@ AC_CACHE_CHECK([$1], [$2],
    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
+     $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*
+   $RM conftest*
 ])
 
 if test x"[$]$2" = xyes; then
-    ifelse([$5], , :, [$5])
+    m4_if([$5], , :, [$5])
 else
-    ifelse([$6], , :, [$6])
+    m4_if([$6], , :, [$6])
 fi
-])# AC_LIBTOOL_COMPILER_OPTION
+])# _LT_COMPILER_OPTION
 
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([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
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                  [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
 AC_CACHE_CHECK([$1], [$2],
   [$2=no
    save_LDFLAGS="$LDFLAGS"
@@ -777,7 +1479,7 @@ AC_CACHE_CHECK([$1], [$2],
      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
+       $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
@@ -786,22 +1488,28 @@ AC_CACHE_CHECK([$1], [$2],
        $2=yes
      fi
    fi
-   $rm -r conftest*
+   $RM -r conftest*
    LDFLAGS="$save_LDFLAGS"
 ])
 
 if test x"[$]$2" = xyes; then
-    ifelse([$4], , :, [$4])
+    m4_if([$4], , :, [$4])
 else
-    ifelse([$5], , :, [$5])
+    m4_if([$5], , :, [$5])
 fi
-])# AC_LIBTOOL_LINKER_OPTION
+])# _LT_LINKER_OPTION
 
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([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
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# 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
@@ -823,7 +1531,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=-1;
     ;;
 
-  cygwin* | mingw*)
+  cygwin* | mingw* | cegcc*)
     # 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,
@@ -878,7 +1586,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
   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/.*[[ 	]]//'`
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
     else
       lt_cv_sys_max_cmd_len=32768
     fi
@@ -889,20 +1597,28 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
       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
+      # Make teststring a little bigger before we do anything with it.
+      # a 1K string should be a reasonable start.
+      for i in 1 2 3 4 5 6 7 8 ; do
+        teststring=$teststring$teststring
+      done
       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 &&
+      # If test is not a shell built-in, we'll probably end up computing a
+      # maximum length that is only half of the actual maximum length, but
+      # we can't tell.
+      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
 	      test $i != 17 # 1/2 MB should be enough
       do
         i=`expr $i + 1`
         teststring=$teststring$teststring
       done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
       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.
+      # 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
     ;;
@@ -913,27 +1629,35 @@ if test -n $lt_cv_sys_max_cmd_len ; then
 else
   AC_MSG_RESULT(none)
 fi
-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+    [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
 
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([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_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_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
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_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
+  cat > conftest.$ac_ext <<_LT_EOF
 [#line __oline__ "configure"
 #include "confdefs.h"
 
@@ -975,10 +1699,6 @@ else
 #  endif
 #endif
 
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
 void fnord() { int i=42;}
 int main ()
 {
@@ -994,9 +1714,9 @@ int main ()
   else
     puts (dlerror ());
 
-    exit (status);
+  return status;
 }]
-EOF
+_LT_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=$?
@@ -1011,13 +1731,13 @@ EOF
   fi
 fi
 rm -fr conftest*
-])# _LT_AC_TRY_DLOPEN_SELF
+])# _LT_TRY_DLOPEN_SELF
 
 
-# AC_LIBTOOL_DLOPEN_SELF
-# ----------------------
-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
 if test "x$enable_dlopen" != xyes; then
   enable_dlopen=unknown
   enable_dlopen_self=unknown
@@ -1033,15 +1753,15 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32*)
+  mingw* | pw32* | cegcc*)
     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
@@ -1051,7 +1771,7 @@ else
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ])
-   ;;
+    ;;
 
   *)
     AC_CHECK_FUNC([shl_load],
@@ -1093,7 +1813,7 @@ else
 
     AC_CACHE_CHECK([whether a program can dlopen itself],
 	  lt_cv_dlopen_self, [dnl
-	  _LT_AC_TRY_DLOPEN_SELF(
+	  _LT_TRY_DLOPEN_SELF(
 	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
 	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
     ])
@@ -1101,8 +1821,8 @@ else
     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, [dnl
+	  _LT_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)
       ])
@@ -1124,19 +1844,32 @@ else
   *) enable_dlopen_self_static=unknown ;;
   esac
 fi
-])# AC_LIBTOOL_DLOPEN_SELF
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+	 [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+	 [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+	 [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
 
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([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
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_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
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $RM -r conftest 2>/dev/null
    mkdir conftest
    cd conftest
    mkdir out
@@ -1160,37 +1893,41 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$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
+     $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
+       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
      fi
    fi
    chmod u+w . 2>&AS_MESSAGE_LOG_FD
-   $rm conftest*
+   $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
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
    cd ..
-   rmdir conftest
-   $rm conftest*
+   $RM -r conftest
+   $RM conftest*
 ])
-])# AC_LIBTOOL_PROG_CC_C_O
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+	[Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
 
 
-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
-# -----------------------------------------
+# _LT_COMPILER_FILE_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
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
 
 hard_links="nottested"
-if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+if test "$_LT_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*
+  $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
@@ -1203,12 +1940,13 @@ if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks"
 else
   need_locks=no
 fi
-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
 
 
-# AC_LIBTOOL_OBJDIR
-# -----------------
-AC_DEFUN([AC_LIBTOOL_OBJDIR],
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 [rm -f .libs 2>/dev/null
 mkdir .libs 2>/dev/null
@@ -1220,40 +1958,46 @@ else
 fi
 rmdir .libs 2>/dev/null])
 objdir=$lt_cv_objdir
-])# AC_LIBTOOL_OBJDIR
+_LT_DECL([], [objdir], [0],
+         [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+  [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
 
 
-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
-# ----------------------------------------------
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
 # Check hardcoding attributes.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+m4_defun([_LT_LINKER_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
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
 
-  # We can hardcode non-existant directories.
-  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+  # We can hardcode non-existent directories.
+  if test "$_LT_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
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
     # Linking always hardcodes the temporary library directory.
-    _LT_AC_TAGVAR(hardcode_action, $1)=relink
+    _LT_TAGVAR(hardcode_action, $1)=relink
   else
     # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+    _LT_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
+  _LT_TAGVAR(hardcode_action, $1)=unsupported
 fi
-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
 
-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
   # Fast installation is not supported
   enable_fast_install=no
 elif test "$shlibpath_overrides_runpath" = yes ||
@@ -1261,73 +2005,70 @@ elif test "$shlibpath_overrides_runpath" = yes ||
   # Fast installation is not necessary
   enable_fast_install=needless
 fi
-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+_LT_TAGDECL([], [hardcode_action], [0],
+    [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
 
 
-# AC_LIBTOOL_SYS_LIB_STRIP
-# ------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
-[striplib=
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+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
+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])
+  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
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
 
 
-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# _LT_SYS_DYNAMIC_LINKER([TAG])
 # -----------------------------
 # PORTME Fill in your ld.so characteristics
-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_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,[],[
+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 $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'`
+    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"`
+    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.
@@ -1341,7 +2082,7 @@ if test "$GCC" = yes; then
 	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 '
+  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
 BEGIN {RS=" "; FS="/|\n";} {
   lt_foo="";
   lt_count=0;
@@ -1361,10 +2102,23 @@ BEGIN {RS=" "; FS="/|\n";} {
   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`
+  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
 else
   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 fi])
+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"
 need_lib_prefix=unknown
 hardcode_into_libs=no
 
@@ -1401,7 +2155,7 @@ aix[[4-9]]*)
       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
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
 	:
       else
 	can_build_shared=no
@@ -1427,9 +2181,18 @@ aix[[4-9]]*)
   ;;
 
 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'
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    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'
+    ;;
+  esac
   ;;
 
 beos*)
@@ -1452,25 +2215,28 @@ bsdi[[45]]*)
   # libtool to hard-code these into programs
   ;;
 
-cygwin* | mingw* | pw32*)
+cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
   shrext_cmds=".dll"
   need_version=no
   need_lib_prefix=no
 
   case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
     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'\''`~
+      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'
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
       dlpath=$dir/\$dldll~
-       $rm \$dlpath'
+       $RM \$dlpath'
     shlibpath_overrides_runpath=yes
 
     case $host_os in
@@ -1479,20 +2245,20 @@ cygwin* | mingw* | pw32*)
       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* | cegcc*)
       # 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
+      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'`
+        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"`
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
       fi
       ;;
     pw32*)
@@ -1516,13 +2282,13 @@ darwin* | rhapsody*)
   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'
+  library_names_spec='${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"]) 
+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'
   ;;
 
@@ -1615,18 +2381,18 @@ hpux9* | hpux10* | hpux11*)
     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
-     ;;
-   *)
+  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
@@ -1694,7 +2460,7 @@ linux*oldld* | linux*aout* | linux*coff*)
   ;;
 
 # This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -1703,6 +2469,17 @@ linux* | k*bsd*-gnu)
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+       [shlibpath_overrides_runpath=yes])])
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
@@ -1710,7 +2487,7 @@ linux* | k*bsd*-gnu)
 
   # 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' ' '`
+    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
 
@@ -1739,7 +2516,7 @@ netbsd*)
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+  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'
@@ -1760,14 +2537,16 @@ newsos6)
   shlibpath_overrides_runpath=yes
   ;;
 
-nto-qnx*)
-  version_type=linux
+*nto* | *qnx*)
+  version_type=qnx
   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
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
   ;;
 
 openbsd*)
@@ -1776,13 +2555,13 @@ openbsd*)
   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  ;;
+    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
+  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
@@ -1854,7 +2633,6 @@ sysv4 | sysv4.3*)
     sni)
       shlibpath_overrides_runpath=no
       need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
       runpath_var=LD_RUN_PATH
       ;;
     siemens)
@@ -1885,13 +2663,12 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
   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
+  shlibpath_overrides_runpath=yes
   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"
@@ -1901,6 +2678,17 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
   sys_lib_dlsearch_path_spec='/usr/lib'
   ;;
 
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  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}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
 uts4*)
   version_type=linux
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -1915,288 +2703,58 @@ 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
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+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])
+_LT_DECL([], [variables_saved_for_relink], [1],
+    [Variables whose values should be saved in libtool wrapper scripts and
+    restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+    [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+    [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+    [[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]])
+_LT_DECL([], [soname_spec], [1],
+    [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [postinstall_cmds], [2],
+    [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+    [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+    [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+    [[As "finish_cmds", except a single script fragment to be evaled but
+    not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+    [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+    [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+    [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
 # --------------------------
-# 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_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
 AC_MSG_CHECKING([for $1])
 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 [case $MAGIC_CMD in
@@ -2209,7 +2767,7 @@ AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 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])"
+  ac_dummy="m4_if([$2], , $PATH, [$2])"
   for ac_dir in $ac_dummy; do
     IFS="$lt_save_ifs"
     test -z "$ac_dir" && ac_dir=.
@@ -2224,7 +2782,7 @@ dnl not every word.  This closes a longstanding sh security hole.
 	    $EGREP "$file_magic_regex" > /dev/null; then
 	    :
 	  else
-	    cat <<EOF 1>&2
+	    cat <<_LT_EOF 1>&2
 
 *** Warning: the command libtool uses to detect shared libraries,
 *** $file_magic_cmd, produces output that libtool cannot recognize.
@@ -2235,7 +2793,7 @@ dnl not every word.  This closes a longstanding sh security hole.
 *** may want to report the problem to your system manager and/or to
 *** bug-libtool at gnu.org
 
-EOF
+_LT_EOF
 	  fi ;;
 	esac
       fi
@@ -2252,37 +2810,47 @@ if test -n "$MAGIC_CMD"; then
 else
   AC_MSG_RESULT(no)
 fi
-])# AC_PATH_TOOL_PREFIX
+_LT_DECL([], [MAGIC_CMD], [0],
+	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
 
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
 
-# AC_PATH_MAGIC
-# -------------
+
+# _LT_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)
+m4_defun([_LT_PATH_MAGIC],
+[_LT_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)
+    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
   else
     MAGIC_CMD=:
   fi
 fi
-])# AC_PATH_MAGIC
+])# _LT_PATH_MAGIC
 
 
-# AC_PROG_LD
+# LT_PATH_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_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_ARG_WITH([gnu-ld],
+    [AS_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])dnl
+
 ac_prog=ld
 if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
@@ -2299,9 +2867,9 @@ if test "$GCC" = yes; then
     [[\\/]]* | ?:[[\\/]]*)
       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%/%"`
+      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"
       ;;
@@ -2351,15 +2919,24 @@ 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
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
 
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_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,
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[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'*)
@@ -2370,14 +2947,14 @@ case `$LD -v 2>&1 </dev/null` in
   ;;
 esac])
 with_gnu_ld=$lt_cv_prog_gnu_ld
-])# AC_PROG_LD_GNU
+])# _LT_PATH_LD_GNU
 
 
-# AC_PROG_LD_RELOAD_FLAG
-# ----------------------
+# _LT_CMD_RELOAD
+# --------------
 # find reload flag for linker
 #   -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+m4_defun([_LT_CMD_RELOAD],
 [AC_CACHE_CHECK([for $LD option to reload object files],
   lt_cv_ld_reload_flag,
   [lt_cv_ld_reload_flag='-r'])
@@ -2396,15 +2973,19 @@ case $host_os in
     fi
     ;;
 esac
-])# AC_PROG_LD_RELOAD_FLAG
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
 
 
-# AC_DEPLIBS_CHECK_METHOD
-# -----------------------
+# _LT_CHECK_MAGIC_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],
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+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=
@@ -2454,12 +3035,18 @@ mingw* | pw32*)
   fi
   ;;
 
+cegcc)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
 darwin* | rhapsody*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
 freebsd* | dragonfly*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+  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.
@@ -2512,12 +3099,12 @@ irix5* | irix6* | nonstopux*)
   ;;
 
 # This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
 netbsd* | netbsdelf*-gnu)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+  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)$'
@@ -2530,12 +3117,12 @@ newos6*)
   lt_cv_file_magic_test_file=/usr/lib/libnls.so
   ;;
 
-nto-qnx*)
-  lt_cv_deplibs_check_method=unknown
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
   ;;
 
 openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+  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)$'
@@ -2554,6 +3141,10 @@ solaris*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
 sysv4 | sysv4.3*)
   case $host_vendor in
   motorola)
@@ -2581,7 +3172,7 @@ sysv4 | sysv4.3*)
   esac
   ;;
 
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+tpf*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 esac
@@ -2589,14 +3180,20 @@ 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
+
+_LT_DECL([], [deplibs_check_method], [1],
+    [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+    [Command to use when deplibs_check_method == "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
 
 
-# AC_PROG_NM
+# LT_PATH_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,
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
 [if test -n "$NM"; then
   # Let the user override the test.
   lt_cv_path_NM="$NM"
@@ -2638,16 +3235,51 @@ else
     done
     IFS="$lt_save_ifs"
   done
-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+  : ${lt_cv_path_NM=no}
 fi])
-NM="$lt_cv_path_NM"
-])# AC_PROG_NM
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+  AC_SUBST([DUMPBIN])
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+  [lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+  cat conftest.out >&AS_MESSAGE_LOG_FD
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
+  fi
+  rm -f conftest*])
+])# LT_PATH_NM
 
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
 
-# AC_CHECK_LIBM
-# -------------
+
+# LT_LIB_M
+# --------
 # check for math library
-AC_DEFUN([AC_CHECK_LIBM],
+AC_DEFUN([LT_LIB_M],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 LIBM=
 case $host in
@@ -2662,4016 +3294,4698 @@ case $host in
   AC_CHECK_LIB(m, cos, LIBM="-lm")
   ;;
 esac
-])# AC_CHECK_LIBM
+AC_SUBST([LIBM])
+])# LT_LIB_M
 
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([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
 
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
 
-# 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
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
+if test "$GCC" = yes; then
+  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
-# AC_LIBTOOL_CXX
-# --------------
-# enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX],
-[AC_REQUIRE([_LT_AC_LANG_CXX])
-])# AC_LIBTOOL_CXX
+  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+	[Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
 
 
-# _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_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
 
-# _LT_AC_PROG_CXXCPP
-# ------------------
-AC_DEFUN([_LT_AC_PROG_CXXCPP],
+# 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],
 [
-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
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
-# AC_LIBTOOL_F77
-# --------------
-# enable support for Fortran 77 libraries
-AC_DEFUN([AC_LIBTOOL_F77],
-[AC_REQUIRE([_LT_AC_LANG_F77])
-])# AC_LIBTOOL_F77
+# 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]]*\)'
 
-# _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
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  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
 
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
 
-# AC_LIBTOOL_GCJ
-# --------------
-# enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],
-[AC_REQUIRE([_LT_AC_LANG_GCJ])
-])# AC_LIBTOOL_GCJ
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \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\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
 
-# _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
+# 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
 
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
 
-# 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)
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
-# Source file extension for C test sources.
-ac_ext=c
+  # Write the raw and C identifiers.
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK ['"\
+"     {last_section=section; section=\$ 3};"\
+"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     \$ 0!~/External *\|/{next};"\
+"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+"     {if(hide[section]) next};"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     ' prfx=^$ac_symprfx]"
+  else
+    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  fi
 
-# 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
-
-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
+  # Check to see that the pipe works correctly.
+  pipe_works=no
 
-# 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])
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
 
-# 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 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
 
-if test "$GXX" = yes; then
-  # Set up default GNU C++ configuration
+      # 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 <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
 
-  AC_PROG_LD
+_LT_EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
 
-  # 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'
+	  cat <<_LT_EOF >> conftest.$ac_ext
 
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+/* The mapping between symbol names and symbols.  */
+const struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
 
-    # 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}'
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
 
-    # 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'
+#ifdef __cplusplus
+}
+#endif
+_LT_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_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
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
     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'
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
   fi
+  rm -rf conftest* conftst*
 
-  # 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"'
-
+  # 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
-  GXX=no
-  with_gnu_ld=no
-  wlarc=
+  AC_MSG_RESULT(ok)
 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
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+    [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+    [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+    [lt_cv_sys_global_symbol_to_c_name_address], [1],
+    [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+    [Transform the output of nm in a C name address pair when lib prefix is needed])
+]) # _LT_CMD_GLOBAL_SYMBOLS
 
-    # 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
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
 
-    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
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+m4_if([$1], [CXX], [
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
-    # 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
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
       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'
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       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
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # 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_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
         ;;
+      esac
+      ;;
 
-  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
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | os2* | pw32* | cegcc*)
+      # 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_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_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_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_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
 	;;
       *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 	;;
-    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
+      esac
       ;;
-    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'
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
       ;;
     *)
-      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.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
     esac
-
-    case $cc_basename in
-      CC*)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+  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_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	else
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	fi
 	;;
-      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'
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_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
-	# 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
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 	    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'
+	    hppa*64*|ia64*)
+	      # +Z the default
 	      ;;
 	    *)
-	      _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'
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 	      ;;
 	    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'
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
 	;;
-      *)
-	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'
-	  ;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
 	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* | netbsdelf*-gnu)
-    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'
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  ecpc* )
+	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  icpc* )
+	    # Intel C++, used to be incompatible with GCC.
+	    # ICC 10 doesn't accept -KPIC any more.
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  pgCC* | pgcpp*)
+	    # Portland Group C++ compiler
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	    _LT_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_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  xlc* | xlC*)
+	    # IBM XL 8.0 on PPC
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
 	;;
-      RCC*)
-	# Rational C++ 2.4.1
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      lynxos*)
 	;;
-      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'
+      m88k*)
 	;;
-      *)
-	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
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
 	;;
-    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
+      netbsd* | netbsdelf*-gnu)
 	;;
-      lcc*)
-	# Lucid
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+        ;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    _LT_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_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
 	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      psos*)
 	;;
-    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]].*) ;;
+      solaris*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    ;;
 	  *)
-	    # 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]].*) ;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
 	  *)
-	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 	    ;;
-	  esac
-	fi
+	esac
 	;;
-    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'
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	esac
 	;;
-      *)
-	_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'
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
 	;;
-    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'
+      vxworks*)
 	;;
       *)
-	_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'
+	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 	;;
     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"
-
-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)
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
-AC_LIBTOOL_CONFIG($1)
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
 
-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.
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # 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_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
 
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
 
-  # 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"`
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # 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_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
 
-  for p in `eval $output_verbose_link_cmd`; do
-    case $p in
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
 
-    -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
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
 
-       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
-       ;;
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
 
-    *.$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
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
 
-       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
-       ;;
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
 
-    *) ;; # Ignore the rest.
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
 
+    *)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
     esac
-  done
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
 
-  # Clean up.
-  rm -f a.out a.exe
-else
-  echo "libtool.m4: error: problem compiling $1 test program"
-fi
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # 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_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
 
-$rm -f confest.$objext
+    hpux9* | hpux10* | hpux11*)
+      _LT_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_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
 
-_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
+    irix5* | irix6* | nonstopux*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
 
-# 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* | k*bsd*-gnu | kopensolaris*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+	_LT_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_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      ccc*)
+        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      xl*)
+	# IBM XL C 8.0/Fortran 10.1 on PPC
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
 
-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
+    newsos6)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       ;;
-    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
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
       ;;
-    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
+    osf3* | osf4* | osf5*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
 
-# 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
+    rdos*)
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="\
-      subroutine t
-      return
-      end
-"
+    solaris*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
+      ;;
 
-# Code to be used in simple link tests
-lt_simple_link_test_code="\
-      program t
-      end
-"
+    sunos4*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
 
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
 
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
 
-# 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])
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
 
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
+    unicos*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
 
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
+    uts4*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
 
-# 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
+    *)
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
   fi
-  ;;
+])
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+    ;;
 esac
-AC_MSG_RESULT([$enable_shared])
+AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+	[How to pass a linker flag through the compiler])
 
-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])
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+	[Additional compiler flags for building library objects])
 
-_LT_AC_TAGVAR(GCC, $1)="$G77"
-_LT_AC_TAGVAR(LD, $1)="$LD"
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+  $lt_tmp_static_flag,
+  [],
+  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+	[Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
 
-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)
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+  _LT_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_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_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_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+  ;;
+  cygwin* | mingw* | cegcc*)
+    _LT_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'
+  ;;
+  linux* | k*bsd*-gnu)
+    _LT_TAGVAR(link_all_deplibs, $1)=no
+  ;;
+  *)
+    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+], [
+  runpath_var=
+  _LT_TAGVAR(allow_undefined_flag, $1)=
+  _LT_TAGVAR(always_export_symbols, $1)=no
+  _LT_TAGVAR(archive_cmds, $1)=
+  _LT_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_TAGVAR(compiler_needs_object, $1)=no
+  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(hardcode_automatic, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_TAGVAR(inherit_rpath, $1)=no
+  _LT_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_TAGVAR(module_cmds, $1)=
+  _LT_TAGVAR(module_expsym_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  _LT_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_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=
 
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_F77_CONFIG
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # 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
+    ;;
+  linux* | k*bsd*-gnu)
+    _LT_TAGVAR(link_all_deplibs, $1)=no
+    ;;
+  esac
 
+  _LT_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}'
 
-# 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
+    # 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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_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_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *GNU\ gold*) supports_anon_versioning=yes ;;
+      *\ [[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
 
-# Source file extension for Java test sources.
-ac_ext=java
+    # 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_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
 
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
+*** 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.
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
+_LT_EOF
+      fi
+      ;;
 
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
 
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_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_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
 
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=no
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        _LT_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_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_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
 
-# 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])
+    interix[[3-9]]*)
+      _LT_TAGVAR(hardcode_direct, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      _LT_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_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_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'
+      ;;
 
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+	case $cc_basename in
+	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
+	esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+	 && test "$tmp_diet" = no
+      then
+	tmp_addflag=
+	tmp_sharedflag='-shared'
+	case $cc_basename,$host_cpu in
+        pgcc*)				# Portland Group C compiler
+	  _LT_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_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' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+	  tmp_sharedflag='--shared' ;;
+	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	  tmp_sharedflag='-qmkshrobj'
+	  tmp_addflag= ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  _LT_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'
+	  _LT_TAGVAR(compiler_needs_object, $1)=yes
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	esac
+	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+        if test "x$supports_anon_versioning" = xyes; then
+          _LT_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
 
-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)
+	case $cc_basename in
+	xlf*)
+	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; then
+	    _LT_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~
+	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
 
-AC_LIBTOOL_CONFIG($1)
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_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
+      ;;
 
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_GCJ_CONFIG
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_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.
 
-# 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
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_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_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
 
-AC_LIBTOOL_CONFIG($1)
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
 
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_RC_CONFIG
+*** 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
+	;;
+	*)
+	  # 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.
+	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    _LT_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_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	;;
+      esac
+      ;;
 
-# 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\"\`\\\""
+    sunos4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
+
     *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_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_TAGVAR(ld_shlibs, $1)=no
+      fi
       ;;
     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
+    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_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_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=yes
+      _LT_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_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_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
 
-ifelse([$1], [],
-  [cfgfile="${ofile}T"
-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
-  $rm -f "$cfgfile"
-  AC_MSG_NOTICE([creating $ofile])],
-  [cfgfile="$ofile"])
+    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_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_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
 
-  cat <<__EOF__ >> "$cfgfile"
-ifelse([$1], [],
-[#! $SHELL
+	# 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
 
-# `$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.
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
 
-# A sed program that does not truncate output.
-SED=$lt_SED
+      # 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.
 
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="$SED -e 1s/^X//"
+      _LT_TAGVAR(archive_cmds, $1)=''
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
 
-# 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 "$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_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_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+	_LT_TAGVAR(link_all_deplibs, $1)=no
+      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
 
-# The names of the tagged configurations supported by this script.
-available_tags=
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_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_TAGVAR(allow_undefined_flag, $1)='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        _LT_SYS_MODULE_PATH_AIX
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+        _LT_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 "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+	if test "$host_cpu" = ia64; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	  _LT_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_SYS_MODULE_PATH_AIX
+	 _LT_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  _LT_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
+      ;;
 
-# ### BEGIN LIBTOOL CONFIG],
-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
 
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+    bsdi[[45]]*)
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
 
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
+    cygwin* | mingw* | pw32* | cegcc*)
+      # 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_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+      _LT_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_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+      # FIXME: Should let the user specify the lib program.
+      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
 
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
+    darwin* | rhapsody*)
+      _LT_DARWIN_LINKER_FEATURES($1)
+      ;;
 
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
+    dgux*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
 
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
+    freebsd1*)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
 
-# 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)
+    # 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_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
 
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
 
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
 
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
+    hpux9*)
+      if test "$GCC" = yes; then
+	_LT_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_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_direct, $1)=yes
 
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
 
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
+	_LT_TAGVAR(hardcode_direct, $1)=yes
+	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	_LT_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_TAGVAR(hardcode_minus_L, $1)=yes
+      fi
+      ;;
 
-# A C compiler.
-LTCC=$lt_LTCC
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_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_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  _LT_TAGVAR(hardcode_direct, $1)=no
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  ;;
+	*)
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
-# A language-specific compiler.
-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	esac
+      fi
+      ;;
 
-# Is the compiler the GNU C compiler?
-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	# Try to use the -exported_symbol ld option, if it does not
+	# work, assume that -exports_file does not work either and
+	# implicitly export all symbols.
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+        AC_LINK_IFELSE(int foo(void) {},
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+        )
+        LDFLAGS="$save_LDFLAGS"
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(inherit_rpath, $1)=yes
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
 
-# 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
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
 
-# A symbol stripping program
-STRIP=$lt_STRIP
+    newsos6)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
 
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
+    *nto* | *qnx*)
+      ;;
 
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	_LT_TAGVAR(hardcode_direct, $1)=yes
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	     ;;
+	   *)
+	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
 
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
+    os2*)
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_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_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
 
-# Used on cygwin: assembler.
-AS="$AS"
+    osf3*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      else
+	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
+	# Both c and cxx compiler support -rpath directly
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
 
-# How to pass a linker flag through the compiler.
-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+    solaris*)
+      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_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}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+      else
+	case `$CC -V 2>&1` in
+	*"Compilers 5.0"*)
+	  wlarc=''
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_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'
+	  ;;
+	*)
+	  wlarc='${wl}'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_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} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  ;;
+	esac
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_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_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
 
-# Object file suffix (normally "o").
-objext="$ac_objext"
+    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_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
 
-# Old archive suffix (normally "a").
-libext="$libext"
+    sysv4)
+      case $host_vendor in
+	sni)
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+	  _LT_TAGVAR(hardcode_direct, $1)=no
+        ;;
+	motorola)
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
 
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
+    sysv4.3*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
 
-# Executable file suffix (normally "").
-exeext="$exeext"
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	_LT_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
 
-# Additional compiler flags for building library objects.
-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
-pic_mode=$pic_mode
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
 
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
 
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
+    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_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
 
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
 
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
+    uts4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
 
-# Do we need a version for libraries?
-need_version=$need_version
+    *)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
 
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
 
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+    [The commands to extract the exported symbol list from a shared archive])
 
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_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
 
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
+      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+        _LT_TAGVAR(allow_undefined_flag, $1)=
+        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+        then
+	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+        else
+	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+        fi
+        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $RM conftest*
+      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+      ;;
+    esac
+  fi
+  ;;
+esac
 
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+    [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+    [enable_shared_with_static_runtimes], [0],
+    [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+    [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+    [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+    [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+    [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+    [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+    [Commands used to build a loadable module if different from building
+    a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+    [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+    [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+    [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+    [Flag to hardcode $libdir into a binary during linking.
+    This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [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]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+    [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary and the resulting library dependency is
+    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+    library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+    [Set to "yes" if building a shared library automatically hardcodes DIR
+    into the library and all subsequent libraries and executables linked
+    against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+    [Set to yes if linker adds runtime paths of dependent libraries
+    to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+    [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [fix_srcfile_path], [1],
+    [Fix the shell variable $srcfile for the compiler])
+_LT_TAGDECL([], [always_export_symbols], [0],
+    [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+    [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+    [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+    [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+    [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [file_list_spec], [1],
+    [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl    [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined.  These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
 
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
+# Source file extension for C test sources.
+ac_ext=c
 
-# Library versioning type.
-version_type=$version_type
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
 
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
 
-# 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
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
 
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
 
-# 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
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
 
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_SYS_DYNAMIC_LINKER($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+  LT_SYS_DLOPEN_SELF
+  _LT_CMD_STRIPLIB
+
+  # 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
+    ;;
 
-# 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)
+  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])
 
-# 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
+  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])
 
-# 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)
+  _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
 
-# 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)
+# _LT_PROG_CXX
+# ------------
+# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
+# compiler, we have our own version here.
+m4_defun([_LT_PROG_CXX],
+[
+pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
+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
+else
+  _lt_caught_CXX_error=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_CXX
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_CXX], [])
 
-# 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)
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined.  These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[AC_REQUIRE([_LT_PROG_CXX])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
-# The directories searched by this compiler when creating a shared
-# library
-compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
+# Source file extension for C++ test sources.
+ac_ext=cpp
 
-# 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)
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+  # 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_TAG_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_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
 
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
+  if test -n "$compiler"; then
+    # We don't want -fno-exception when compiling C++ code, so set the
+    # no_builtin_flag separately
+    if test "$GXX" = yes; then
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+    else
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+    fi
 
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
 
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
+      LT_PATH_LD
 
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
+      # 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_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_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'
 
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
+        # 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}'
 
-# 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
+        # 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_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+        else
+          _LT_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_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      fi
 
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+      # 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"'
 
-# 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
+    else
+      GXX=no
+      with_gnu_ld=no
+      wlarc=
+    fi
 
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
+    # PORTME: fill in a description of your system's C++ link characteristics
+    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+    _LT_TAGVAR(ld_shlibs, $1)=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        _LT_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
 
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
+          exp_sym_flag='-bexport'
+          no_entry_flag='-bnoentry'
+        fi
 
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+        # 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_TAGVAR(archive_cmds, $1)=''
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+        _LT_TAGVAR(link_all_deplibs, $1)=yes
+        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+        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_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_TAGVAR(hardcode_minus_L, $1)=yes
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	    _LT_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
 
-# How to hardcode a shared library path into an executable.
-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+        # It seems that -bexpall does not export symbols beginning with
+        # underscore (_), so it is better to generate a list of symbols to
+	# export.
+        _LT_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_TAGVAR(allow_undefined_flag, $1)='-berok'
+          # Determine the default libpath from the value encoded in an empty
+          # executable.
+          _LT_SYS_MODULE_PATH_AIX
+          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+          _LT_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 "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	    _LT_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_SYS_MODULE_PATH_AIX
+	    _LT_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	    # Exported symbols can be pulled into shared objects from archives
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	    # This is similar to how AIX traditionally builds its shared
+	    # libraries.
+	    _LT_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
+        ;;
 
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
+      beos*)
+	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	  _LT_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_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	else
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
 
-# 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)
+      chorus*)
+        case $cc_basename in
+          *)
+	  # FIXME: insert proper C++ library support
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	  ;;
+        esac
+        ;;
 
-# 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)
+      cygwin* | mingw* | pw32* | cegcc*)
+        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+        # as there is no search path for DLLs.
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+        _LT_TAGVAR(always_export_symbols, $1)=no
+        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+          _LT_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_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_TAGVAR(ld_shlibs, $1)=no
+        fi
+        ;;
+      darwin* | rhapsody*)
+        _LT_DARWIN_LINKER_FEATURES($1)
+	;;
 
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
+      dgux*)
+        case $cc_basename in
+          ec++*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          ghcx*)
+	    # Green Hills C++ Compiler
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
 
-# 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)
+      freebsd[[12]]*)
+        # C++ shared libraries reported to be fairly broken before
+	# switch to ELF
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
 
-# 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)
+      freebsd-elf*)
+        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+        ;;
 
-# 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)
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+        ;;
 
-# 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)
+      gnu*)
+        ;;
 
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
+      hpux9*)
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _LT_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_TAGVAR(ld_shlibs, $1)=no
+            ;;
+          aCC*)
+            _LT_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) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              _LT_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_TAGVAR(ld_shlibs, $1)=no
+            fi
+            ;;
+        esac
+        ;;
 
-# 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)
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+          case $host_cpu in
+            hppa*64*|ia64*)
+              ;;
+            *)
+	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            _LT_TAGVAR(hardcode_direct, $1)=no
+            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+            ;;
+          *)
+            _LT_TAGVAR(hardcode_direct, $1)=yes
+            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+            _LT_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_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          aCC*)
+	    case $host_cpu in
+	      hppa*64*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      ia64*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      *)
+	        _LT_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 "X$list" | $Xsed'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test $with_gnu_ld = no; then
+	        case $host_cpu in
+	          hppa*64*)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          ia64*)
+	            _LT_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_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_TAGVAR(ld_shlibs, $1)=no
+	    fi
+	    ;;
+        esac
+        ;;
 
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
+      interix[[3-9]]*)
+	_LT_TAGVAR(hardcode_direct, $1)=no
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_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_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_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_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -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_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_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	      else
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+	      fi
+	    fi
+	    _LT_TAGVAR(link_all_deplibs, $1)=yes
+	    ;;
+        esac
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+        _LT_TAGVAR(inherit_rpath, $1)=yes
+        ;;
 
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
 
-# Symbols that must always be exported.
-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
+	    # 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_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_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 "X$list" | $Xsed'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_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_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+	    ;;
+	  icpc* | ecpc* )
+	    # 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_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		_LT_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_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		_LT_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_TAGVAR(archive_cmds_need_lc, $1)=no
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+	    case `$CC -V` in
+	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+		$RANLIB $oldlib'
+	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    *) # Version 6 will use weak symbols
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      _LT_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'
+	      ;;
+	    esac
 
-ifelse([$1],[],
-[# ### END LIBTOOL CONFIG],
-[# ### END LIBTOOL TAG CONFIG: $tagname])
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_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_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    _LT_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'
 
-__EOF__
+	    runpath_var=LD_RUN_PATH
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
-ifelse([$1],[], [
-  case $host_os in
-  aix3*)
-    cat <<\EOF >> "$cfgfile"
+	    # 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 "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
+	    ;;
+	  xl*)
+	    # IBM XL 8.0 on PPC, with GNU ld
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    if test "x$supports_anon_versioning" = xyes; then
+	      _LT_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 -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	    fi
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	      _LT_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'
+	      _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+	      # 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_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
 
-# 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
+      lynxos*)
+        # FIXME: insert proper C++ library support
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	;;
 
-  # 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)
+      m88k*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+	;;
 
-  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
+      mvs*)
+        case $cc_basename in
+          cxx*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+	  *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+	esac
+	;;
 
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+	  wlarc=
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_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::"'
+	;;
 
-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+      *nto* | *qnx*)
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+	;;
 
-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	;;
 
-if test "$GCC" = yes; then
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+      openbsd*)
+	if test -f /usr/libexec/ld.so; then
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+	  _LT_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_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_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  fi
+	  output_verbose_link_cmd=echo
+	else
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
 
-  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
+      osf3* | 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_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	    # Archives containing C++ object files must be created using
+	    # the KAI C++ compiler.
+	    case $host in
+	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+	    esac
+	    ;;
+          RCC*)
+	    # Rational C++ 2.4.1
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          cxx*)
+	    case $host in
+	      osf3*)
+	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+		;;
+	      *)
+	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $RM $lib.exp'
+	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+		;;
+	    esac
 
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
-# 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?!! ;)]
+	    # 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 "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
+	    ;;
+	  *)
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	      case $host in
+	        osf3*)
+	          _LT_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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	        *)
+	          _LT_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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	      esac
+
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	      _LT_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_TAGVAR(ld_shlibs, $1)=no
+	    fi
+	    ;;
+        esac
+        ;;
 
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
+      psos*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
 
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+      sunos4*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.x
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          lcc*)
+	    # Lucid
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
 
-# 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'"
+      solaris*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	    _LT_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_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	        ;;
+	    esac
+	    _LT_TAGVAR(link_all_deplibs, $1)=yes
 
-# 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'"
+	    output_verbose_link_cmd='echo'
 
-# 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
+	    # 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_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	    ;;
+          gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
-# 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
+	    # The C++ compiler must be used to create the archive.
+	    _LT_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_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_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	      case $host_os in
+		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+		*)
+		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+		  ;;
+	      esac
+	    fi
+	    ;;
+        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
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
 
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
+      case $cc_basename in
+        CC*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+      esac
+      ;;
 
-  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
-  symxfrm="\\1 $ac_symprfx\\2 \\2"
+      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_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+	_LT_TAGVAR(link_all_deplibs, $1)=yes
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+	runpath_var='LD_RUN_PATH'
 
-  # 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'"
+	case $cc_basename in
+          CC*)
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	  *)
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	esac
+      ;;
 
-  # Check to see that the pipe works correctly.
-  pipe_works=no
+      tandem*)
+        case $cc_basename in
+          NCC*)
+	    # NonStop-UX NCC 3.20
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
 
-  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
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
 
-  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
+      *)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+    esac
 
-      # 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
+    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+    _LT_TAGVAR(GCC, $1)="$GXX"
+    _LT_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...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  LDCXX=$LD
+  LD=$lt_save_LD
+  GCC=$lt_save_GCC
+  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
+fi # test "$_lt_caught_CXX_error" != yes
 
-EOF
-	  # Now generate the symbol file.
-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
 
-	  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}
-};
+# _LT_SYS_HIDDEN_LIBDEPS([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.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
 
-#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
+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...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+_LT_EOF
 ])
-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)
+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
+
+  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_TAGVAR(compiler_lib_search_path, $1)"; then
+	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+	   else
+	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_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_TAGVAR(postdeps, $1)"; then
+	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+	 else
+	   _LT_TAGVAR(postdeps, $1)="${_LT_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_TAGVAR(predep_objects, $1)"; then
+	   _LT_TAGVAR(predep_objects, $1)="$p"
+	 else
+	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+	 fi
+       else
+	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+	   _LT_TAGVAR(postdep_objects, $1)="$p"
+	 else
+	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
 else
-  AC_MSG_RESULT(ok)
+  echo "libtool.m4: error: problem compiling $1 test program"
 fi
-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
+$RM -f confest.$objext
 
-# 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)=
+# PORTME: override above test on systems where it is broken
+m4_if([$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_TAGVAR(predep_objects,$1)=
+  _LT_TAGVAR(postdep_objects,$1)=
+  _LT_TAGVAR(postdeps,$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'
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
 
-    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
+    # 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
       ;;
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+    esac
+
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_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
-  else
+
+    # 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_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+    [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+    [Dependencies to place before and after the objects being linked to
+    create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+    [The library search path used internally by the compiler when linking
+    a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_PROG_F77
+# ------------
+# Since AC_PROG_F77 is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_F77],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
+AC_PROG_F77
+if test -z "$F77" || test "X$F77" = "Xno"; then
+  _lt_disable_F77=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_F77
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_F77], [])
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_REQUIRE([_LT_PROG_F77])dnl
+AC_LANG_PUSH(Fortran 77)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_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_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+  # 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_TAG_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_GCC=$GCC
+  CC=${F77-"f77"}
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+  GCC=$G77
+  if test -n "$compiler"; then
+    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]]*)
-	# 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'
+	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+	  test "$enable_shared" = yes && enable_static=no
 	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* | netbsdelf*-gnu)
-	;;
-      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
-],
+    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_TAGVAR(GCC, $1)="$G77"
+    _LT_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...
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_PROG_FC
+# -----------
+# Since AC_PROG_FC is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_FC],
 [
-  if test "$GCC" = yes; then
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
+AC_PROG_FC
+if test -z "$FC" || test "X$FC" = "Xno"; then
+  _lt_disable_FC=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_FC
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_FC], [])
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_REQUIRE([_LT_PROG_FC])dnl
+AC_LANG_PUSH(Fortran)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+  # 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_TAG_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_GCC=$GCC
+  CC=${FC-"f95"}
+  compiler=$CC
+  GCC=$ac_cv_fc_compiler_gnu
+
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    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
-      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
-      ;;
+      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_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+    _LT_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...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_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_TAG_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_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
 
-    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'
-      ;;
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
-    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'])
-      ;;
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
 
-    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'
-      ;;
+  _LT_CONFIG($1)
+fi
 
-    interix[[3-9]]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
+AC_LANG_RESTORE
 
-    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
-      ;;
+GCC=$lt_save_GCC
+CC="$lt_save_CC"
+])# _LT_LANG_GCJ_CONFIG
 
-    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_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
 
-    *)
-      _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
-       ;;
+# Source file extension for RC test sources.
+ac_ext=rc
 
-    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'])
-      ;;
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
 
-    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'
-      ;;
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
 
-    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'
-      ;;
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
 
-    newsos6)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
 
-    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
-      ;;
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
 
-    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'
-      ;;
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
-    rdos*)
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
+if test -n "$compiler"; then
+  :
+  _LT_CONFIG($1)
+fi
 
-    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
-      ;;
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# _LT_LANG_RC_CONFIG
 
-    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'
-      ;;
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+    [AC_CHECK_TOOL(GCJ, gcj,)
+      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+      AC_SUBST(GCJFLAGS)])])[]dnl
+])
 
-    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
-      ;;
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
 
-    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
-      ;;
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
 
-    uts4*)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
 
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-    esac
-  fi
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
 ])
-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)=])
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
 ])
 
 
-# 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'
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+# 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.                               #
+
+m4_defun([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
-    ;;
-  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'
-  ;;
-  linux* | k*bsd*-gnu)
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
+  done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# 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
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
   ;;
-  *)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
   ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_XSI_SHELLFNS
+# ---------------------
+# Bourne and XSI compatible variants of some useful shell functions.
+m4_defun([_LT_PROG_XSI_SHELLFNS],
+[case $xsi_shell in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
   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
-    ;;
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
   esac
+  func_basename_result="${1##*/}"
+}
 
-  _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}'
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+  # positional parameters, so assign one to ordinary parameter first.
+  func_stripname_result=${3}
+  func_stripname_result=${func_stripname_result#"${1}"}
+  func_stripname_result=${func_stripname_result%"${2}"}
+}
 
-    # 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
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=${1%%=*}
+  func_opt_split_arg=${1#*=}
+}
 
-    # 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
+# func_lo2o object
+func_lo2o ()
+{
+  case ${1} in
+    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+    *)    func_lo2o_result=${1} ;;
+  esac
+}
 
-*** 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.
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=${1%.*}.lo
+}
 
-EOF
-      fi
-      ;;
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=$(( $[*] ))
+}
 
-    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
-      ;;
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=${#1}
+}
 
-    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
-      ;;
+_LT_EOF
+    ;;
+  *) # Bourne compatible functions.
+    cat << \_LT_EOF >> "$cfgfile"
 
-    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
-      ;;
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
+  else
+    func_dirname_result="$func_dirname_result${2}"
+  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'
-      ;;
+# func_basename file
+func_basename ()
+{
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
 
-    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'
+dnl func_dirname_and_basename
+dnl A portable version of this function is already defined in general.m4sh
+dnl so there is no need for it here.
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+  case ${2} in
+    .*) func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+    *)  func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+  esac
+}
 
-	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
-	_LT_AC_TAGVAR(link_all_deplibs, $1)=no
-      else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
+# sed scripts:
+my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[[^=]]*=//'
 
-    netbsd* | netbsdelf*-gnu)
-      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
-      ;;
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
 
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	cat <<EOF 1>&2
+# func_lo2o object
+func_lo2o ()
+{
+  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
 
-*** 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.
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
+}
 
-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
-      ;;
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=`expr "$[@]"`
+}
 
-    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
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
 
-*** 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
+esac
 
+case $lt_shell_append in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$[1]+=\$[2]"
+}
 _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
-      ;;
+    ;;
+  *)
+    cat << \_LT_EOF >> "$cfgfile"
 
-    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
-      ;;
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$[1]=\$$[1]\$[2]"
+}
 
-    *)
-      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
+_LT_EOF
+    ;;
+  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
-      ;;
+# Helper functions for option handling.                    -*- Autoconf -*-
+#
+#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gary V. Vaughan, 2004
+#
+# 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.
 
-    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
+# serial 6 ltoptions.m4
 
-	# 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
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
 
-	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_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+        _LT_MANGLE_DEFUN([$1], [$2]),
+    [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
 
-      _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
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+		      [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
 
-      # 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
-      ;;
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME.  If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+    [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+  dnl
+  dnl Simply set some default values (i.e off) if boolean options were not
+  dnl specified:
+  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+  ])
+  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+  ])
+  dnl
+  dnl If no reference was made to various pairs of opposing options, then
+  dnl we run the default mode handler for the pair.  For example, if neither
+  dnl `shared' nor `disable-shared' was passed, we enable building of shared
+  dnl archives by default:
+  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+  		   [_LT_ENABLE_FAST_INSTALL])
+  ])
+])# _LT_SET_OPTIONS
 
-    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
-      ;;
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
 
-    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
-      ;;
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
 
-    # 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
-      ;;
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
 
-    # 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
-      ;;
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
 
-    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
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
 
-      # 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)=:
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
 
-	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+esac
 
-	# 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
-      ;;
+test -z "$AS" && AS=as
+_LT_DECL([], [AS],      [0], [Assembler program])dnl
 
-    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)=:
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
 
-	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'
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
 
-	  # 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
-      ;;
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
 
-    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
-      ;;
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
 
-    netbsd* | netbsdelf*-gnu)
-      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
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+	[build shared libraries @<:@default=]_LT_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=]_LT_ENABLE_SHARED_DEFAULT)
 
-    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
-      ;;
+    _LT_DECL([build_libtool_libs], [enable_shared], [0],
+	[Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
 
-    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'
-      ;;
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
 
-    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)=:
-      ;;
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
 
-    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'
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
 
-	# 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)=:
-      ;;
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
 
-    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
-      ;;
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
 
-    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
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+	[build static libraries @<:@default=]_LT_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=]_LT_ENABLE_STATIC_DEFAULT)
 
-    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
-      ;;
+    _LT_DECL([build_old_libs], [enable_static], [0],
+	[Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
 
-    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'
-      ;;
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
 
-    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
-      ;;
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
 
-    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'
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
 
-      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
-      ;;
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
 
-    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'
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
 
-      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_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
     *)
-      _LT_AC_TAGVAR(ld_shlibs, $1)=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
-  fi
+    esac],
+    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+	 [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
 ])
-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
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
 
-  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
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 
-      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_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+    [AS_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=m4_default([$1], [default])
 
-# _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
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+		 [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+		 [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+		 [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+		 [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+		 [m4_define([_LTDL_TYPE], [convenience])])
+
+# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
 #
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
 #
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-#   __hDllInstance_base = hInst;
-#   return TRUE;
-# }
-# /* ltdll.c ends here */
-])# _LT_AC_FILE_LTDLL_C
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
 
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
 
-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
-# ---------------------------------
-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
 
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+       [$#], [2], [[$2]],
+       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+       [$#], 1, [],
+       [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+	     [m4_foreach([_Lt_suffix],
+		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+		 [lt_append([$1], [$2], [$3])$4],
+		 [$5])],
+	  [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
 
-# 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])
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
 
-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)
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+	[$5],
+    [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+  [lt_join(m4_quote(m4_default([$4], [[, ]])),
+           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
 ])
 
+# ltversion.m4 -- version numbers			-*- Autoconf -*-
+#
+#   Copyright (C) 2004 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004
+#
+# 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.
 
-# Cheap backport of AS_EXECUTABLE_P and required macros
-# from Autoconf 2.59; we should not use $as_executable_p directly.
+# Generated from ltversion.in.
 
-# _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
+# serial 3017 ltversion.m4
+# This file is part of GNU Libtool
 
-# 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
+m4_define([LT_PACKAGE_VERSION], [2.2.6b])
+m4_define([LT_PACKAGE_REVISION], [1.3017])
 
-# 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])
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.2.6b'
+macro_revision='1.3017'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
 ])
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
+#
+#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 4 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else.  This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -6683,10 +7997,10 @@ AC_MSG_RESULT([$SED])
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.10'
+[am__api_version='1.11'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.10.1], [],
+m4_if([$1], [1.11.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -6700,12 +8014,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # AM_SET_CURRENT_AUTOMAKE_VERSION
 # -------------------------------
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10.1])dnl
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
@@ -6762,14 +8076,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
+# serial 9
 
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
@@ -6782,6 +8096,7 @@ AC_SUBST([$1_TRUE])dnl
 AC_SUBST([$1_FALSE])dnl
 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
 if $2; then
   $1_TRUE=
   $1_FALSE='#'
@@ -6795,14 +8110,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 9
+# serial 10
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -6859,6 +8174,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
   fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -6876,7 +8201,17 @@ AC_CACHE_CHECK([dependency style of $depcc],
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -6886,19 +8221,23 @@ AC_CACHE_CHECK([dependency style of $depcc],
 	break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -6955,57 +8294,68 @@ _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 3
+#serial 5
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # Grep'ing the whole file is not good either: AIX grep has a line
-  # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
   done
-done
+}
 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
 
@@ -7025,13 +8375,13 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # Do all the work for Automake.                             -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008 Free Software Foundation, Inc.
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 13
+# serial 16
 
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
@@ -7048,7 +8398,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.60])dnl
+[AC_PREREQ([2.62])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -7099,8 +8449,8 @@ AM_MISSING_PROG(AUTOCONF, autoconf)
 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 AM_MISSING_PROG(AUTOHEADER, autoheader)
 AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
@@ -7108,24 +8458,37 @@ AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-	      		     [_AM_PROG_TAR([v7])])])
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+		  [_AM_DEPENDENCIES(CC)],
+		  [define([AC_PROG_CC],
+			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+		  [_AM_DEPENDENCIES(CXX)],
+		  [define([AC_PROG_CXX],
+			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-                  [_AM_DEPENDENCIES(OBJC)],
-                  [define([AC_PROG_OBJC],
-                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+		  [_AM_DEPENDENCIES(OBJC)],
+		  [define([AC_PROG_OBJC],
+			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 ])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 ])
 
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
 
 # When config.status generates a header, we must update the stamp-h file.
 # This file resides in the same directory as the config header
@@ -7148,7 +8511,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -7159,7 +8522,14 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
 AC_SUBST(install_sh)])
 
 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
@@ -7186,27 +8556,38 @@ AC_SUBST([am__leading_dot])])
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
 AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
-  dnl maintainer-mode is disabled by default
-  AC_ARG_ENABLE(maintainer-mode,
-[  --enable-maintainer-mode  enable make rules and dependencies not useful
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t at _MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
 			  (and sometimes confusing) to the casual installer],
-      USE_MAINTAINER_MODE=$enableval,
-      USE_MAINTAINER_MODE=no)
+      [USE_MAINTAINER_MODE=$enableval],
+      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
   MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST(MAINT)dnl
+  AC_SUBST([MAINT])dnl
 ]
 )
 
@@ -7214,13 +8595,13 @@ AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 4
 
 # AM_MAKE_INCLUDE()
 # -----------------
@@ -7229,7 +8610,7 @@ AC_DEFUN([AM_MAKE_INCLUDE],
 [am_make=${MAKE-make}
 cat > confinc << 'END'
 am__doit:
-	@echo done
+	@echo this is the am__doit target
 .PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
@@ -7239,24 +8620,24 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
 # Now try BSD make style include.
 if test "$am__include" = "#"; then
    echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
 AC_SUBST([am__include])
 AC_SUBST([am__quote])
@@ -7266,14 +8647,14 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
+# serial 6
 
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
@@ -7290,7 +8671,14 @@ AC_SUBST($1)])
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 AC_REQUIRE_AUX_FILE([missing])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
@@ -7328,13 +8716,13 @@ esac
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 4
 
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
@@ -7351,7 +8739,7 @@ AC_DEFUN([_AM_SET_OPTION],
 # ----------------------------------
 # OPTIONS is a space-separated list of Automake options.
 AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 # -------------------------------------------
@@ -7361,14 +8749,14 @@ AC_DEFUN([_AM_IF_OPTION],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 # AM_SANITY_CHECK
 # ---------------
@@ -7377,16 +8765,29 @@ AC_DEFUN([AM_SANITY_CHECK],
 # Just in case
 sleep 1
 echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$[*]" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$[*]" != "X $srcdir/configure conftest.file" \
@@ -7439,18 +8840,25 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 2
+
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 # This macro is traced by Automake.
 AC_DEFUN([_AM_SUBST_NOTMAKE])
 
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
 # Check how to create a tarball.                            -*- Autoconf -*-
 
 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
diff --git a/ext/libev/autogen.sh b/ext/libev/autogen.sh
index 371b4cd..8056ee7 100644
--- a/ext/libev/autogen.sh
+++ b/ext/libev/autogen.sh
@@ -1,6 +1,3 @@
 #!/bin/sh
 
-libtoolize --force
-automake --add-missing
-autoreconf
-
+autoreconf --install --symlink --force
diff --git a/ext/libev/config.guess b/ext/libev/config.guess
index f32079a..de8e6dd 100755
--- a/ext/libev/config.guess
+++ b/ext/libev/config.guess
@@ -1,10 +1,10 @@
 #! /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.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2008-01-23'
+timestamp='2012-02-10'
 
 # 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
@@ -17,9 +17,7 @@ timestamp='2008-01-23'
 # 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.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -27,16 +25,16 @@ timestamp='2008-01-23'
 # 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.
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches at gnu.org> and include a ChangeLog
+# entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -56,8 +54,9 @@ 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.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+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."
@@ -139,12 +138,22 @@ 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
 
+case "${UNAME_MACHINE}" in
+  i?86)
+     test -z "$VENDOR" && VENDOR=pc
+     ;;
+  *)
+     test -z "$VENDOR" && VENDOR=unknown
+     ;;
+esac
+test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse
+
 # 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*,
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
 	# switched to ELF, *-*-netbsd* would select the old
 	# object file format.  This provides both forward
@@ -170,7 +179,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 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
+			| grep -q __ELF__
 		then
 		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
 		    # Return netbsd for either.  FIX?
@@ -180,7 +189,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		fi
 		;;
 	    *)
-	        os=netbsd
+		os=netbsd
 		;;
 	esac
 	# The OS release
@@ -203,19 +212,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	exit ;;
     *:OpenBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	echo ${UNAME_MACHINE_ARCH}-${VENDOR}-openbsd${UNAME_RELEASE}
 	exit ;;
     *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	echo ${UNAME_MACHINE}-${VENDOR}-ekkobsd${UNAME_RELEASE}
 	exit ;;
     *:SolidBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	echo ${UNAME_MACHINE}-${VENDOR}-solidbsd${UNAME_RELEASE}
 	exit ;;
     macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	echo powerpc-${VENDOR}-mirbsd${UNAME_RELEASE}
 	exit ;;
     *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	echo ${UNAME_MACHINE}-${VENDOR}-mirbsd${UNAME_RELEASE}
 	exit ;;
     alpha:OSF1:*:*)
 	case $UNAME_RELEASE in
@@ -223,7 +232,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
 		;;
 	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
 		;;
 	esac
 	# According to Compaq, /usr/sbin/psrinfo has been available on
@@ -269,7 +278,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# 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 ;;
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
     Alpha\ *:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# Should we change UNAME_MACHINE based on the output of uname instead
@@ -280,13 +292,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	echo alpha-dec-winnt3.5
 	exit ;;
     Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-unknown-sysv4
+	echo m68k-${VENDOR}-sysv4
 	exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
+	echo ${UNAME_MACHINE}-${VENDOR}-amigaos
 	exit ;;
     *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
+	echo ${UNAME_MACHINE}-${VENDOR}-morphos
 	exit ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
@@ -295,13 +307,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	echo s390-ibm-zvmoe
 	exit ;;
     *:OS400:*:*)
-        echo powerpc-ibm-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
+	echo arm-${VENDOR}-riscos
 	exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
 	echo hppa1.1-hitachi-hiuxmpp
@@ -324,14 +336,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	case `/usr/bin/uname -p` in
 	    sparc) echo sparc-icl-nx7; exit ;;
 	esac ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
     sun4H:SunOS:5.*:*)
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	echo i386-pc-auroraux${UNAME_RELEASE}
+	exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	eval $set_cc_for_build
+	SUN_ARCH="i386"
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH="x86_64"
+	    fi
+	fi
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit ;;
     sun4*:SunOS:6*:*)
 	# According to config.sub, this is the proper way to canonicalize
@@ -375,23 +406,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # 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}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+	exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-${VENDOR}-mint${UNAME_RELEASE}
+	exit ;;
     m68k:machten:*:*)
 	echo m68k-apple-machten${UNAME_RELEASE}
 	exit ;;
@@ -461,8 +492,8 @@ EOF
 	echo m88k-motorola-sysv3
 	exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	# 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 ] || \
@@ -475,7 +506,7 @@ EOF
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit ;;
+	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
 	exit ;;
@@ -532,7 +563,7 @@ EOF
 		echo rs6000-ibm-aix3.2
 	fi
 	exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
@@ -575,52 +606,52 @@ EOF
 	    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" ;;
+		    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
+			esac ;;
+		    esac
 		fi
 		if [ "${HP_ARCH}" = "" ]; then
 		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
+		    sed 's/^		//' << EOF >$dummy.c
 
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
+		#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);
+		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);
-              }
+		    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
@@ -640,7 +671,7 @@ EOF
 	    # => hppa64-hp-hpux11.23
 
 	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep __LP64__ >/dev/null
+		grep -q __LP64__
 	    then
 		HP_ARCH="hppa2.0w"
 	    else
@@ -701,9 +732,9 @@ EOF
 	exit ;;
     i*86:OSF1:*:*)
 	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	    echo ${UNAME_MACHINE}-${VENDOR}-osf1mk
 	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
+	    echo ${UNAME_MACHINE}-${VENDOR}-osf1
 	fi
 	exit ;;
     parisc*:Lites*:*:*)
@@ -711,22 +742,22 @@ EOF
 	exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit ;;
+	exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit ;;
+	exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit ;;
+	exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit ;;
+	exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit ;;
+	exit ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
@@ -750,32 +781,31 @@ EOF
 	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 ;;
+	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}"
+	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}
+	echo sparc-${VENDOR}-bsdi${UNAME_RELEASE}
 	exit ;;
     *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	echo ${UNAME_MACHINE}-${VENDOR}-bsdi${UNAME_RELEASE}
 	exit ;;
     *:FreeBSD:*:*)
-	case ${UNAME_MACHINE} in
-	    pc98)
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
 	    amd64)
-		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+		echo x86_64-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 	    *)
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+		echo ${UNAME_PROCESSOR}-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 	esac
 	exit ;;
     i*:CYGWIN*:*)
@@ -784,28 +814,34 @@ EOF
     *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
+    i*:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
     i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
+	# 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
+    *:Interix*:*)
+	case ${UNAME_MACHINE} in
 	    x86)
 		echo i586-pc-interix${UNAME_RELEASE}
 		exit ;;
-	    EM64T | authenticamd)
-		echo x86_64-unknown-interix${UNAME_RELEASE}
+	    authenticamd | genuineintel | EM64T)
+		echo x86_64-${VENDOR}-interix${UNAME_RELEASE}
 		exit ;;
 	    IA64)
-		echo ia64-unknown-interix${UNAME_RELEASE}
+		echo ia64-${VENDOR}-interix${UNAME_RELEASE}
 		exit ;;
 	esac ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
 	echo i${UNAME_MACHINE}-pc-mks
 	exit ;;
+    8664:Windows_NT:*)
+	echo x86_64-pc-mks
+	exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -816,220 +852,163 @@ EOF
 	echo ${UNAME_MACHINE}-pc-uwin
 	exit ;;
     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-	echo x86_64-unknown-cygwin
+	echo x86_64-${VENDOR}-cygwin
 	exit ;;
     p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin
+	echo powerpcle-${VENDOR}-cygwin
 	exit ;;
     prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo powerpcle-${VENDOR}-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,/.*$,,'`
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-${VENDOR}-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
+	echo ${UNAME_MACHINE}-${VENDOR}-`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 ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-${VENDOR}-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 -q ld.so.1
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu${LIBC}
+	exit ;;
     arm*:Linux:*:*)
 	eval $set_cc_for_build
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
 	    | grep -q __ARM_EABI__
 	then
-	    echo ${UNAME_MACHINE}-unknown-linux-gnu
+	    echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
 	else
-	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabi
+	    else
+		echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabihf
+	    fi
 	fi
 	exit ;;
     avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
 	exit ;;
     cris:Linux:*:*)
-	echo cris-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-gnu
 	exit ;;
     crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-gnu
 	exit ;;
     frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    i*86:Linux:*:*)
+	LIBC=gnu
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
 	exit ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
 	exit ;;
     m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
 	exit ;;
     m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
 	exit ;;
-    mips:Linux:*:*)
+    mips:Linux:*:* | mips64:Linux:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
 	#undef CPU
-	#undef mips
-	#undef mipsel
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mipsel
+	CPU=${UNAME_MACHINE}el
 	#else
 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips
+	CPU=${UNAME_MACHINE}
 	#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; }
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+	test x"${CPU}" != x && { echo "${CPU}-${VENDOR}-linux-gnu"; exit; }
 	;;
     or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
 	exit ;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
+    padre:Linux:*:*)
+	echo sparc-${VENDOR}-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}
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-${VENDOR}-linux-gnu
 	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
+	  PA7*) echo hppa1.1-${VENDOR}-linux-gnu ;;
+	  PA8*) echo hppa2.0-${VENDOR}-linux-gnu ;;
+	  *)    echo hppa-${VENDOR}-linux-gnu ;;
 	esac
 	exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
+    ppc64:Linux:*:*)
+	echo powerpc64-${VENDOR}-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-${VENDOR}-linux-gnu
 	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux
 	exit ;;
     sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
 	exit ;;
     sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
 	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
+	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
 	exit ;;
     vax:Linux:*:*)
 	echo ${UNAME_MACHINE}-dec-linux-gnu
 	exit ;;
     x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
 	exit ;;
     xtensa*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-${VENDOR}-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
@@ -1037,11 +1016,11 @@ EOF
 	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,
+	# 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.
+	# Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
 	exit ;;
     i*86:OS/2:*:*)
@@ -1050,16 +1029,16 @@ EOF
 	echo ${UNAME_MACHINE}-pc-os2-emx
 	exit ;;
     i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
+	echo ${UNAME_MACHINE}-${VENDOR}-stop
 	exit ;;
     i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
+	echo ${UNAME_MACHINE}-${VENDOR}-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}
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	echo i386-${VENODR}-lynxos${UNAME_RELEASE}
 	exit ;;
     i*86:*DOS:*:*)
 	echo ${UNAME_MACHINE}-pc-msdosdjgpp
@@ -1073,13 +1052,13 @@ EOF
 	fi
 	exit ;;
     i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	# 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}
+	echo ${UNAME_MACHINE}-${VENDOR}-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
 	exit ;;
     i*86:*:3.2:*)
 	if test -f /usr/options/cb.name; then
@@ -1101,10 +1080,13 @@ EOF
 	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 ;;
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
+	exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
 	exit ;;
@@ -1115,7 +1097,7 @@ EOF
 	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
+	  echo i860-${VENODR}-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
 	fi
 	exit ;;
     mini*:CTIX:SYS*5:*)
@@ -1139,22 +1121,32 @@ EOF
 	/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; } ;;
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	echo m68k-${VENDOR}-lynxos${UNAME_RELEASE}
 	exit ;;
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
 	exit ;;
     TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	echo sparc-${VENDOR}-lynxos${UNAME_RELEASE}
 	exit ;;
     rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	echo rs6000-${VENDOR}-lynxos${UNAME_RELEASE}
 	exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	echo powerpc-${VENDOR}-lynxos${UNAME_RELEASE}
 	exit ;;
     SM[BE]S:UNIX_SV:*:*)
 	echo mips-dde-sysv${UNAME_RELEASE}
@@ -1173,10 +1165,10 @@ EOF
 		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 ;;
+    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
@@ -1202,11 +1194,11 @@ EOF
 	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
+		echo mips-nec-sysv${UNAME_RELEASE}
 	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
+		echo mips-${VENDOR}-sysv${UNAME_RELEASE}
 	fi
-        exit ;;
+	exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
 	exit ;;
@@ -1216,6 +1208,9 @@ EOF
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
 	echo i586-pc-beos
 	exit ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
 	exit ;;
@@ -1243,6 +1238,16 @@ EOF
     *:Darwin:*:*)
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
 	case $UNAME_PROCESSOR in
+	    i386)
+		eval $set_cc_for_build
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		      grep IS_64BIT_ARCH >/dev/null
+		  then
+		      UNAME_PROCESSOR="x86_64"
+		  fi
+		fi ;;
 	    unknown) UNAME_PROCESSOR=powerpc ;;
 	esac
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1258,6 +1263,9 @@ EOF
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
     NSE-?:NONSTOP_KERNEL:*:*)
 	echo nse-tandem-nsk${UNAME_RELEASE}
 	exit ;;
@@ -1282,13 +1290,13 @@ EOF
 	else
 	    UNAME_MACHINE="$cputype"
 	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
+	echo ${UNAME_MACHINE}-${VENDOR}-plan9
 	exit ;;
     *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
+	echo pdp10-${VENDOR}-tops10
 	exit ;;
     *:TENEX:*:*)
-	echo pdp10-unknown-tenex
+	echo pdp10-${VENDOR}-tenex
 	exit ;;
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
 	echo pdp10-dec-tops20
@@ -1297,19 +1305,19 @@ EOF
 	echo pdp10-xkl-tops20
 	exit ;;
     *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
+	echo pdp10-${VENDOR}-tops20
 	exit ;;
     *:ITS:*:*)
-	echo pdp10-unknown-its
+	echo pdp10-${VENDOR}-its
 	exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
+	echo mips-sei-seiux${UNAME_RELEASE}
 	exit ;;
     *:DragonFly:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	echo ${UNAME_MACHINE}-${VENDOR}-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit ;;
     *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
 	case "${UNAME_MACHINE}" in
 	    A*) echo alpha-dec-vms ; exit ;;
 	    I*) echo ia64-dec-vms ; exit ;;
@@ -1324,6 +1332,12 @@ EOF
     i*86:rdos:*:*)
 	echo ${UNAME_MACHINE}-pc-rdos
 	exit ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-esx
+	exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1346,11 +1360,11 @@ main ()
 #include <sys/param.h>
   printf ("m68k-sony-newsos%s\n",
 #ifdef NEWSOS4
-          "4"
+	"4"
 #else
-	  ""
+	""
 #endif
-         ); exit (0);
+	); exit (0);
 #endif
 #endif
 
diff --git a/ext/libev/config.h b/ext/libev/config.h
deleted file mode 100644
index 03e3b21..0000000
--- a/ext/libev/config.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* config.h.  Generated from config.h.in by configure.  */
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define to 1 if you have the `clock_gettime' function. */
-/* #undef HAVE_CLOCK_GETTIME */
-
-/* "use syscall interface for clock_gettime" */
-/* #undef HAVE_CLOCK_SYSCALL */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if you have the `epoll_ctl' function. */
-/* #undef HAVE_EPOLL_CTL */
-
-/* Define to 1 if you have the `eventfd' function. */
-/* #undef HAVE_EVENTFD */
-
-/* Define to 1 if you have the `inotify_init' function. */
-/* #undef HAVE_INOTIFY_INIT */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the `kqueue' function. */
-#define HAVE_KQUEUE 1
-
-/* Define to 1 if you have the `m' library (-lm). */
-#define HAVE_LIBM 1
-
-/* Define to 1 if you have the `rt' library (-lrt). */
-/* #undef HAVE_LIBRT */
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the `nanosleep' function. */
-/* #undef HAVE_NANOSLEEP */
-
-/* Define to 1 if you have the `poll' function. */
-#define HAVE_POLL 1
-
-/* Define to 1 if you have the <poll.h> header file. */
-#define HAVE_POLL_H 1
-
-/* Define to 1 if you have the `port_create' function. */
-/* #undef HAVE_PORT_CREATE */
-
-/* Define to 1 if you have the <port.h> header file. */
-/* #undef HAVE_PORT_H */
-
-/* Define to 1 if you have the `select' function. */
-#define HAVE_SELECT 1
-
-/* Define to 1 if you have the `signalfd' function. */
-/* #undef HAVE_SIGNALFD */
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/epoll.h> header file. */
-/* #undef HAVE_SYS_EPOLL_H */
-
-/* Define to 1 if you have the <sys/eventfd.h> header file. */
-/* #undef HAVE_SYS_EVENTFD_H */
-
-/* Define to 1 if you have the <sys/event.h> header file. */
-#define HAVE_SYS_EVENT_H 1
-
-/* Define to 1 if you have the <sys/inotify.h> header file. */
-/* #undef HAVE_SYS_INOTIFY_H */
-
-/* Define to 1 if you have the <sys/queue.h> header file. */
-#define HAVE_SYS_QUEUE_H 1
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-#define HAVE_SYS_SELECT_H 1
-
-/* Define to 1 if you have the <sys/signalfd.h> header file. */
-/* #undef HAVE_SYS_SIGNALFD_H */
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Name of package */
-#define PACKAGE "libev"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Version number of package */
-#define VERSION "3.9"
diff --git a/ext/libev/config.h.in b/ext/libev/config.h.in
index 68cc512..508542b 100644
--- a/ext/libev/config.h.in
+++ b/ext/libev/config.h.in
@@ -3,7 +3,7 @@
 /* Define to 1 if you have the `clock_gettime' function. */
 #undef HAVE_CLOCK_GETTIME
 
-/* "use syscall interface for clock_gettime" */
+/* Define to 1 to use the syscall interface for clock_gettime */
 #undef HAVE_CLOCK_SYSCALL
 
 /* Define to 1 if you have the <dlfcn.h> header file. */
@@ -15,6 +15,9 @@
 /* Define to 1 if you have the `eventfd' function. */
 #undef HAVE_EVENTFD
 
+/* Define to 1 if the floor function is available */
+#undef HAVE_FLOOR
+
 /* Define to 1 if you have the `inotify_init' function. */
 #undef HAVE_INOTIFY_INIT
 
@@ -24,9 +27,6 @@
 /* Define to 1 if you have the `kqueue' function. */
 #undef HAVE_KQUEUE
 
-/* Define to 1 if you have the `m' library (-lm). */
-#undef HAVE_LIBM
-
 /* Define to 1 if you have the `rt' library (-lrt). */
 #undef HAVE_LIBRT
 
@@ -78,9 +78,6 @@
 /* Define to 1 if you have the <sys/inotify.h> header file. */
 #undef HAVE_SYS_INOTIFY_H
 
-/* Define to 1 if you have the <sys/queue.h> header file. */
-#undef HAVE_SYS_QUEUE_H
-
 /* Define to 1 if you have the <sys/select.h> header file. */
 #undef HAVE_SYS_SELECT_H
 
@@ -96,6 +93,10 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
 /* Name of package */
 #undef PACKAGE
 
@@ -111,6 +112,9 @@
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
diff --git a/ext/libev/config.sub b/ext/libev/config.sub
index 6759825..59bb593 100755
--- a/ext/libev/config.sub
+++ b/ext/libev/config.sub
@@ -1,10 +1,10 @@
 #! /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.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2008-01-16'
+timestamp='2012-04-18'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -21,9 +21,7 @@ timestamp='2008-01-16'
 # 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.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -32,13 +30,16 @@ timestamp='2008-01-16'
 
 
 # Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
 # Otherwise, we print the canonical config type on stdout and succeed.
 
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
 # that are meaningful with *any* GNU software.
@@ -72,8 +73,9 @@ 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.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+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."
@@ -120,12 +122,18 @@ esac
 # 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* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
   *)
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
     if [ $basic_machine != $1 ]
@@ -148,10 +156,13 @@ case $os in
 	-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)
+	-apple | -axis | -knuth | -cray | -microblaze)
 		os=
 		basic_machine=$1
 		;;
+	-bluegene*)
+		os=-cnk
+		;;
 	-sim | -cisco | -oki | -wec | -winbond)
 		os=
 		basic_machine=$1
@@ -166,10 +177,10 @@ case $os in
 		os=-chorusos
 		basic_machine=$1
 		;;
- 	-chorusrdb)
- 		os=-chorusrdb
+	-chorusrdb)
+		os=-chorusrdb
 		basic_machine=$1
- 		;;
+		;;
 	-hiux*)
 		os=-hiuxwe2
 		;;
@@ -214,6 +225,12 @@ case $os in
 	-isc*)
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
 	-lynx*)
 		os=-lynxos
 		;;
@@ -238,24 +255,32 @@ case $basic_machine in
 	# Some are omitted here because they have special meanings below.
 	1750a | 580 \
 	| a29k \
+	| aarch64 | aarch64_be \
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 	| am33_2.0 \
 	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+        | be32 | be64 \
 	| bfin \
 	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
+	| epiphany \
 	| fido | fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
+	| le32 | le64 \
+	| lm32 \
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | mcore | mep \
+	| maxq | mb | microblaze | mcore | mep | metag \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
-	| mips64vr | mips64vrel \
+	| mips64octeon | mips64octeonel \
 	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
+	| mips64vr | mips64vrel \
 	| mips64vr4100 | mips64vr4100el \
 	| mips64vr4300 | mips64vr4300el \
 	| mips64vr5000 | mips64vr5000el \
@@ -268,29 +293,42 @@ case $basic_machine in
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
+	| moxie \
 	| mt \
 	| msp430 \
+	| nds32 | nds32le | nds32be \
 	| nios | nios2 \
 	| ns16k | ns32k \
+	| open8 \
 	| or32 \
 	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pyramid \
+	| rl78 | rx \
 	| score \
-	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu | strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
-	| v850 | v850e \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+	| ubicom32 \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
 	| we32k \
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-	| z8k)
+	| x86 | xc16x | xstormy16 | xtensa \
+	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
-	m6811 | m68hc11 | m6812 | m68hc12)
-		# Motorola 68HC11/12.
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
@@ -300,6 +338,21 @@ case $basic_machine in
 		basic_machine=mt-unknown
 		;;
 
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+	xgate)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
+		;;
+
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
 	# (2) the word "unknown" tends to confuse beginning users.
@@ -314,29 +367,36 @@ case $basic_machine in
 	# Recognize the basic CPU types with company name.
 	580-* \
 	| a29k-* \
+	| aarch64-* | aarch64_be-* \
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
+	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
 	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
+	| le32-* | le64-* \
+	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
-	| mips64vr-* | mips64vrel-* \
+	| mips64octeon-* | mips64octeonel-* \
 	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
+	| mips64vr-* | mips64vrel-* \
 	| mips64vr4100-* | mips64vr4100el-* \
 	| mips64vr4300-* | mips64vr4300el-* \
 	| mips64vr5000-* | mips64vr5000el-* \
@@ -351,27 +411,32 @@ case $basic_machine in
 	| mmix-* \
 	| mt-* \
 	| msp430-* \
+	| nds32-* | nds32le-* | nds32be-* \
 	| nios-* | nios2-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
 	| pyramid-* \
-	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+	| rl78-* | romp-* | rs6000-* | rx-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tile*-* \
 	| tron-* \
-	| v850-* | v850e-* | vax-* \
+	| ubicom32-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
 	| ymp-* \
-	| z8k-*)
+	| z8k-* | z80-*)
 		;;
 	# Recognize the basic CPU types without company name, with glob match.
 	xtensa*)
@@ -393,7 +458,7 @@ case $basic_machine in
 		basic_machine=a29k-amd
 		os=-udi
 		;;
-    	abacus)
+	abacus)
 		basic_machine=abacus-unknown
 		;;
 	adobe68k)
@@ -439,6 +504,10 @@ case $basic_machine in
 		basic_machine=m68k-apollo
 		os=-bsd
 		;;
+	aros)
+		basic_machine=i386-pc
+		os=-aros
+		;;
 	aux)
 		basic_machine=m68k-apple
 		os=-aux
@@ -455,10 +524,27 @@ case $basic_machine in
 		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
 		os=-linux
 		;;
+	bluegene*)
+		basic_machine=powerpc-ibm
+		os=-cnk
+		;;
+	c54x-*)
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c55x-*)
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c6x-*)
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	c90)
 		basic_machine=c90-cray
 		os=-unicos
 		;;
+	cegcc)
+		basic_machine=arm-unknown
+		os=-cegcc
+		;;
 	convex-c1)
 		basic_machine=c1-convex
 		os=-bsd
@@ -487,7 +573,7 @@ case $basic_machine in
 		basic_machine=craynv-cray
 		os=-unicosmp
 		;;
-	cr16)
+	cr16 | cr16-*)
 		basic_machine=cr16-unknown
 		os=-elf
 		;;
@@ -526,6 +612,10 @@ case $basic_machine in
 		basic_machine=m88k-motorola
 		os=-sysv3
 		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
 	djgpp)
 		basic_machine=i586-pc
 		os=-msdosdjgpp
@@ -641,7 +731,6 @@ case $basic_machine in
 	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
@@ -699,6 +788,9 @@ case $basic_machine in
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
+	microblaze)
+		basic_machine=microblaze-xilinx
+		;;
 	mingw32)
 		basic_machine=i386-pc
 		os=-mingw32
@@ -735,10 +827,18 @@ case $basic_machine in
 	ms1-*)
 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
 		;;
+	msys)
+		basic_machine=i386-pc
+		os=-msys
+		;;
 	mvs)
 		basic_machine=i370-ibm
 		os=-mvs
 		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
 	ncr3000)
 		basic_machine=i486-ncr
 		os=-sysv4
@@ -803,6 +903,12 @@ case $basic_machine in
 	np1)
 		basic_machine=np1-gould
 		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
@@ -885,9 +991,10 @@ case $basic_machine in
 		;;
 	power)	basic_machine=power-ibm
 		;;
-	ppc)	basic_machine=powerpc-unknown
+	ppc | ppcbe)	basic_machine=powerpc-unknown
 		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
@@ -981,6 +1088,9 @@ case $basic_machine in
 		basic_machine=i860-stratus
 		os=-sysv4
 		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	sun2)
 		basic_machine=m68000-sun
 		;;
@@ -1037,20 +1147,8 @@ case $basic_machine in
 		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
+		basic_machine=$basic_machine-unknown
 		os=-linux-gnu
 		;;
 	tx39)
@@ -1120,6 +1218,9 @@ case $basic_machine in
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
 	ymp)
 		basic_machine=ymp-cray
 		os=-unicos
@@ -1128,6 +1229,10 @@ case $basic_machine in
 		basic_machine=z8k-unknown
 		os=-sim
 		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
 	none)
 		basic_machine=none-none
 		os=-none
@@ -1166,7 +1271,7 @@ case $basic_machine in
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
 		basic_machine=sh-unknown
 		;;
 	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1213,9 +1318,12 @@ esac
 if [ x"$os" != x"" ]
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+	# First match some system type aliases
+	# that might get confused with valid system types.
 	# -solaris* is a basic system type, with this one exception.
+	-auroraux)
+		os=-auroraux
+		;;
 	-solaris1 | -solaris1.*)
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
 		;;
@@ -1236,10 +1344,11 @@ case $os in
 	# 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* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+	      | -sym* | -kopensolaris* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
+	      | -aos* | -aros* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1248,9 +1357,10 @@ case $os in
 	      | -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* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1258,7 +1368,7 @@ case $os in
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1297,7 +1407,7 @@ case $os in
 	-opened*)
 		os=-openedition
 		;;
-        -os400*)
+	-os400*)
 		os=-os400
 		;;
 	-wince*)
@@ -1346,7 +1456,7 @@ case $os in
 	-sinix*)
 		os=-sysv4
 		;;
-        -tpf*)
+	-tpf*)
 		os=-tpf
 		;;
 	-triton*)
@@ -1388,6 +1498,11 @@ case $os in
 	-zvmoe)
 		os=-zvmoe
 		;;
+	-dicos*)
+		os=-dicos
+		;;
+	-nacl*)
+		;;
 	-none)
 		;;
 	*)
@@ -1410,10 +1525,10 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
-        score-*)
+	score-*)
 		os=-elf
 		;;
-        spu-*)
+	spu-*)
 		os=-elf
 		;;
 	*-acorn)
@@ -1425,8 +1540,17 @@ case $basic_machine in
 	arm*-semi)
 		os=-aout
 		;;
-        c4x-* | tic4x-*)
-        	os=-coff
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	tic54x-*)
+		os=-coff
+		;;
+	tic55x-*)
+		os=-coff
+		;;
+	tic6x-*)
+		os=-coff
 		;;
 	# This must come before the *-dec entry.
 	pdp10-*)
@@ -1446,14 +1570,11 @@ case $basic_machine in
 		;;
 	m68000-sun)
 		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
 		;;
 	m68*-cisco)
 		os=-aout
 		;;
-        mep-*)
+	mep-*)
 		os=-elf
 		;;
 	mips*-cisco)
@@ -1480,7 +1601,7 @@ case $basic_machine in
 	*-ibm)
 		os=-aix
 		;;
-    	*-knuth)
+	*-knuth)
 		os=-mmixware
 		;;
 	*-wec)
@@ -1585,7 +1706,7 @@ case $basic_machine in
 			-sunos*)
 				vendor=sun
 				;;
-			-aix*)
+			-cnk*|-aix*)
 				vendor=ibm
 				;;
 			-beos*)
diff --git a/ext/libev/configure b/ext/libev/configure
index 6902bb2..0ed3011 100755
--- a/ext/libev/configure
+++ b/ext/libev/configure
@@ -1,60 +1,81 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61.
+# Generated by GNU Autoconf 2.69.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+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
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
 esac
-
 fi
 
 
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
   else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
 fi
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
 fi
 
 
@@ -63,20 +84,19 @@ fi
 # there to prevent editors from complaining about space-tab.
 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
 # splitting by setting IFS to empty value.)
-as_nl='
-'
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
+as_myself=
+case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
 IFS=$as_save_IFS
 
      ;;
@@ -87,32 +107,315 @@ if test "x$as_myself" = x; then
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
 fi
 
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 done
 PS1='$ '
 PS2='> '
 PS4='+ '
 
 # NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     # Try only shells that exist, to save several forks.
+	     as_shell=$as_dir/$as_base
+	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+	   done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
   else
-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+    $as_echo "$0: Please tell bug-autoconf at gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
   fi
-done
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
 
-# Required to use basename.
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -126,13 +429,17 @@ else
   as_basename=false
 fi
 
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
 
-# Name of the executable.
 as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
 	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
+$as_echo X/"$0" |
     sed '/^.*\/\([^/][^/]*\)\/*$/{
 	    s//\1/
 	    q
@@ -147,440 +454,138 @@ echo X/"$0" |
 	  }
 	  s/.*/./; q'`
 
-# CDPATH.
-$as_unset CDPATH
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
 
 
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-fi
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
-  if test $as_have_required = yes && 	 (eval ":
-(as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
 }
 
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
 
-if as_func_ret_success; then
-  :
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
 else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
 fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
 
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
 else
-  exitcode=1
-  echo positional parameters were not saved.
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
 fi
 
-test \$exitcode = 0) || { (exit 1); exit 1; }
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
-(
-  as_lineno_1=\$LINENO
-  as_lineno_2=\$LINENO
-  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
-  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
-  :
-else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  case $as_dir in
-	 /*)
-	   for as_base in sh bash ksh sh5; do
-	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-	   done;;
-       esac
-done
-IFS=$as_save_IFS
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
-      for as_shell in $as_candidate_shells $SHELL; do
-	 # Try only shells that exist, to save several forks.
-	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		{ ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # 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
 
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
 
-:
-_ASEOF
-}; then
-  CONFIG_SHELL=$as_shell
-	       as_have_required=yes
-	       if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # 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 ;;
+case X$lt_ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+  ;;
 esac
 
-fi
-
-
-:
-(as_func_return () {
-  (exit $1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
-  break
-fi
-
-fi
-
-      done
-
-      if test "x$CONFIG_SHELL" != x; then
-  for as_var in BASH_ENV ENV
-        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-        done
-        export CONFIG_SHELL
-        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
-    if test $as_have_required = no; then
-  echo This script requires a shell more modern than all the
-      echo shells that I found on your system.  Please install a
-      echo modern shell, or manually run the script under such a
-      echo shell if you do have one.
-      { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell autoconf at gnu.org about your system,
-  echo including any error possibly output before this
-  echo message
-}
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s='ln -s'
-  # ... but there are two gotchas:
-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-  # In both cases, we have to default to `cp -p'.
-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-	case $1 in
-        -*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-
-# 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+"$@"}
+ECHO=${lt_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
+  cat <<_LT_EOF
 $*
-EOF
+_LT_EOF
   exit 0
 fi
 
@@ -588,125 +593,121 @@ fi
 # 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 -z "$lt_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 &&
+	 { 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.
+  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
+    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 -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"
+    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
-	# maybe with a smaller string...
-	prev=:
+        # 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
+	  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
+	  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
-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"
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+   lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
 fi
 
 
 
 
-tagnames=${tagnames+${tagnames},}CXX
-
-tagnames=${tagnames+${tagnames},}F77
-
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
 
 # Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
@@ -721,7 +722,6 @@ cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
 PACKAGE_NAME=
@@ -729,6 +729,7 @@ PACKAGE_TARNAME=
 PACKAGE_VERSION=
 PACKAGE_STRING=
 PACKAGE_BUGREPORT=
+PACKAGE_URL=
 
 ac_unique_file="ev_epoll.c"
 # Factoring default headers for most tests.
@@ -767,116 +768,130 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL
-PATH_SEPARATOR
-PACKAGE_NAME
-PACKAGE_TARNAME
-PACKAGE_VERSION
-PACKAGE_STRING
-PACKAGE_BUGREPORT
-exec_prefix
-prefix
-program_transform_name
-bindir
-sbindir
-libexecdir
-datarootdir
-datadir
-sysconfdir
-sharedstatedir
-localstatedir
-includedir
-oldincludedir
-docdir
-infodir
-htmldir
-dvidir
-pdfdir
-psdir
-libdir
-localedir
-mandir
-DEFS
-ECHO_C
-ECHO_N
-ECHO_T
-LIBS
-build_alias
-host_alias
-target_alias
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-am__isrc
-CYGPATH_W
-PACKAGE
-VERSION
-ACLOCAL
-AUTOCONF
-AUTOMAKE
-AUTOHEADER
-MAKEINFO
-install_sh
-STRIP
-INSTALL_STRIP_PROGRAM
-mkdir_p
-AWK
-SET_MAKE
-am__leading_dot
-AMTAR
-am__tar
-am__untar
-MAINTAINER_MODE_TRUE
-MAINTAINER_MODE_FALSE
-MAINT
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-DEPDIR
-am__include
-am__quote
-AMDEP_TRUE
-AMDEP_FALSE
-AMDEPBACKSLASH
-CCDEPMODE
-am__fastdepCC_TRUE
-am__fastdepCC_FALSE
-SED
-GREP
-EGREP
-LN_S
-ECHO
-AR
-RANLIB
-DSYMUTIL
-NMEDIT
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
 CPP
-CXX
-CXXFLAGS
-ac_ct_CXX
-CXXDEPMODE
-am__fastdepCXX_TRUE
-am__fastdepCXX_FALSE
-CXXCPP
-F77
-FFLAGS
-ac_ct_F77
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+lt_ECHO
+RANLIB
+AR
+OBJDUMP
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
 LIBTOOL
-LIBOBJS
-LTLIBOBJS'
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
 ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_maintainer_mode
+enable_dependency_tracking
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+enable_libtool_lock
+'
       ac_precious_vars='build_alias
 host_alias
 target_alias
@@ -885,18 +900,14 @@ CFLAGS
 LDFLAGS
 LIBS
 CPPFLAGS
-CPP
-CXX
-CXXFLAGS
-CCC
-CXXCPP
-F77
-FFLAGS'
+CPP'
 
 
 # Initialize some variables set by options.
 ac_init_help=
 ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
 # The variables have the same names as the options, with
 # dashes changed to underlines.
 cache_file=/dev/null
@@ -952,8 +963,9 @@ do
   fi
 
   case $ac_option in
-  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)	ac_optarg=yes ;;
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -995,13 +1007,20 @@ do
     datarootdir=$ac_optarg ;;
 
   -disable-* | --disable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
-    eval enable_$ac_feature=no ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
 
   -docdir | --docdir | --docdi | --doc | --do)
     ac_prev=docdir ;;
@@ -1014,13 +1033,20 @@ do
     dvidir=$ac_optarg ;;
 
   -enable-* | --enable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
-    eval enable_$ac_feature=\$ac_optarg ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -1211,22 +1237,36 @@ do
     ac_init_version=: ;;
 
   -with-* | --with-*)
-    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
-    eval with_$ac_package=\$ac_optarg ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
 
   -without-* | --without-*)
-    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
-    eval with_$ac_package=no ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -1246,26 +1286,26 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; }
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
     ;;
 
   *=*)
     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
-   { (exit 1); exit 1; }; }
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
 
   *)
     # FIXME: should be removed in autoconf 3.0.
-    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1273,23 +1313,36 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
 fi
 
-# Be sure to have absolute directory names.
+# Check all directory arguments for consistency.
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
 		libdir localedir mandir
 do
   eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
   case $ac_val in
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -1303,8 +1356,6 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1319,23 +1370,21 @@ test "$silent" = yes && exec 6>/dev/null
 ac_pwd=`pwd` && test -n "$ac_pwd" &&
 ac_ls_di=`ls -di .` &&
 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  { echo "$as_me: error: Working directory cannot be determined" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "working directory cannot be determined"
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  { echo "$as_me: error: pwd does not report name of working directory" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
   # Try the directory containing this script, then the parent directory.
-  ac_confdir=`$as_dirname -- "$0" ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$0" : 'X\(//\)[^/]' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$0" |
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -1362,13 +1411,11 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
 fi
 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
 ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
-   { (exit 1); exit 1; }; }
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
 	pwd)`
 # When building in place, set srcdir=.
 if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1408,7 +1455,7 @@ Configuration:
       --help=short        display options specific to this package
       --help=recursive    display the short help of all the included packages
   -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
+  -q, --quiet, --silent   do not print \`checking ...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
   -C, --config-cache      alias for \`--cache-file=config.cache'
   -n, --no-create         do not create output files
@@ -1416,9 +1463,9 @@ Configuration:
 
 Installation directories:
   --prefix=PREFIX         install architecture-independent files in PREFIX
-			  [$ac_default_prefix]
+                          [$ac_default_prefix]
   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-			  [PREFIX]
+                          [PREFIX]
 
 By default, \`make install' will install all the files in
 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
@@ -1428,25 +1475,25 @@ for instance \`--prefix=\$HOME'.
 For better control, use the options below.
 
 Fine tuning of the installation directories:
-  --bindir=DIR           user executables [EPREFIX/bin]
-  --sbindir=DIR          system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR       program executables [EPREFIX/libexec]
-  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
-  --libdir=DIR           object code libraries [EPREFIX/lib]
-  --includedir=DIR       C header files [PREFIX/include]
-  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
-  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR          info documentation [DATAROOTDIR/info]
-  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR           man documentation [DATAROOTDIR/man]
-  --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
-  --htmldir=DIR          html documentation [DOCDIR]
-  --dvidir=DIR           dvi documentation [DOCDIR]
-  --pdfdir=DIR           pdf documentation [DOCDIR]
-  --psdir=DIR            ps documentation [DOCDIR]
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
 _ACEOF
 
   cat <<\_ACEOF
@@ -1467,25 +1514,25 @@ if test -n "$ac_init_help"; then
   cat <<\_ACEOF
 
 Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-maintainer-mode  enable make rules and dependencies not useful
 			  (and sometimes confusing) to the casual installer
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
   --enable-shared[=PKGS]  build shared libraries [default=yes]
   --enable-static[=PKGS]  build static libraries [default=yes]
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
-  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
   --disable-libtool-lock  avoid locking (might break parallel builds)
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
-  --with-tags[=TAGS]      include additional configurations [automatic]
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
 
 Some influential environment variables:
   CC          C compiler command
@@ -1493,18 +1540,14 @@ Some influential environment variables:
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
   LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
-  CXX         C++ compiler command
-  CXXFLAGS    C++ compiler flags
-  CXXCPP      C++ preprocessor
-  F77         Fortran 77 compiler command
-  FFLAGS      Fortran 77 compiler flags
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
+Report bugs to the package provider.
 _ACEOF
 ac_status=$?
 fi
@@ -1512,15 +1555,17 @@ fi
 if test "$ac_init_help" = "recursive"; then
   # If there are subdirs, report their specific --help.
   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" || continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
     ac_builddir=.
 
 case "$ac_dir" in
 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
 *)
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
   # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
   case $ac_top_builddir_sub in
   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1556,7 +1601,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
       echo &&
       $SHELL "$ac_srcdir/configure" --help=recursive
     else
-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
     fi || ac_status=$?
     cd "$ac_pwd" || { ac_status=$?; break; }
   done
@@ -1566,73 +1611,424 @@ test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 configure
-generated by GNU Autoconf 2.61
+generated by GNU Autoconf 2.69
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
   exit
 fi
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
 
-  $ $0 $@
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
 
-_ACEOF
-exec 5>>config.log
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
 {
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+	ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+} # ac_fn_c_try_compile
 
-_ASUNAME
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 test -x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
-} >&5
+} # ac_fn_c_try_link
 
-cat >&5 <<_ACEOF
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
+} # ac_fn_c_check_header_compile
 
-## ----------- ##
-## Core tests. ##
-## ----------- ##
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-_ACEOF
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
+} # ac_fn_c_try_cpp
 
-# Keep a trace of the command line.
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
 # Strip out --no-create and --no-recursion so they do not pile up.
 # Strip out --silent because we don't want to record it for future runs.
 # Also quote any args containing shell meta-characters.
@@ -1651,12 +2047,12 @@ do
     | -silent | --silent | --silen | --sile | --sil)
       continue ;;
     *\'*)
-      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
     case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
     2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      as_fn_append ac_configure_args1 " '$ac_arg'"
       if test $ac_must_keep_next = true; then
 	ac_must_keep_next=false # Got value, back to normal.
       else
@@ -1672,13 +2068,13 @@ do
 	  -* ) ac_must_keep_next=true ;;
 	esac
       fi
-      ac_configure_args="$ac_configure_args '$ac_arg'"
+      as_fn_append ac_configure_args " '$ac_arg'"
       ;;
     esac
   done
 done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
 
 # When interrupted or exit'd, cleanup temporary files, and complete
 # config.log.  We remove comments because anyway the quotes in there
@@ -1690,11 +2086,9 @@ trap 'exit_status=$?
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -1703,12 +2097,13 @@ _ASBOX
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       esac
       case $ac_var in #(
       _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
       esac ;;
     esac
   done
@@ -1727,128 +2122,136 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
 )
     echo
 
-    cat <<\_ASBOX
-## ----------------- ##
+    $as_echo "## ----------------- ##
 ## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
     echo
     for ac_var in $ac_subst_vars
     do
       eval ac_val=\$$ac_var
       case $ac_val in
-      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
       esac
-      echo "$ac_var='\''$ac_val'\''"
+      $as_echo "$ac_var='\''$ac_val'\''"
     done | sort
     echo
 
     if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
+      $as_echo "## ------------------- ##
 ## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
       echo
       for ac_var in $ac_subst_files
       do
 	eval ac_val=\$$ac_var
 	case $ac_val in
-	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
 	esac
-	echo "$ac_var='\''$ac_val'\''"
+	$as_echo "$ac_var='\''$ac_val'\''"
       done | sort
       echo
     fi
 
     if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
+      $as_echo "## ----------- ##
 ## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
       echo
       cat confdefs.h
       echo
     fi
     test "$ac_signal" != 0 &&
-      echo "$as_me: caught signal $ac_signal"
-    echo "$as_me: exit $exit_status"
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
   } >&5
   rm -f core *.core core.conftest.* &&
     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
     exit $exit_status
 ' 0
 for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
 done
 ac_signal=0
 
 # confdefs.h avoids OS command line length limits that DEFS can exceed.
 rm -f -r conftest* confdefs.h
 
+$as_echo "/* confdefs.h */" > confdefs.h
+
 # Predefined preprocessor variables.
 
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_NAME "$PACKAGE_NAME"
 _ACEOF
 
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
 _ACEOF
 
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_VERSION "$PACKAGE_VERSION"
 _ACEOF
 
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_STRING "$PACKAGE_STRING"
 _ACEOF
 
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
 _ACEOF
 
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
 
 # Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
 if test -n "$CONFIG_SITE"; then
-  set x "$CONFIG_SITE"
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
 elif test "x$prefix" != xNONE; then
-  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
 else
-  set x "$ac_default_prefix/share/config.site" \
-	"$ac_default_prefix/etc/config.site"
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
 fi
-shift
-for ac_site_file
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
 do
-  if test -r "$ac_site_file"; then
-    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
 if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
-    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
       [\\/]* | ?:[\\/]* ) . "$cache_file";;
       *)                      . "./$cache_file";;
     esac
   fi
 else
-  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
 
@@ -1862,60 +2265,56 @@ for ac_var in $ac_precious_vars; do
   eval ac_new_val=\$ac_env_${ac_var}_value
   case $ac_old_set,$ac_new_set in
     set,)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,set)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,);;
     *)
       if test "x$ac_old_val" != "x$ac_new_val"; then
-	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
-echo "$as_me:   former value:  $ac_old_val" >&2;}
-	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
-echo "$as_me:   current value: $ac_new_val" >&2;}
-	ac_cache_corrupted=:
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
       fi;;
   esac
   # Pass precious variables to config.status.
   if test "$ac_new_set" = set; then
     case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
     *) ac_arg=$ac_var=$ac_new_val ;;
     esac
     case " $ac_configure_args " in
       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
     esac
   fi
 done
 if $ac_cache_corrupted; then
-  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
 fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -1926,7 +2325,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-am__api_version='1.10'
+am__api_version='1.11'
 
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -1945,9 +2344,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
 fi
 
 # These three variables are undocumented and unsupported,
@@ -1972,22 +2369,23 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # OS/2's system install, which has a completely different semantic
 # ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
 if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if ${ac_cv_path_install+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
-  ./ | .// | /cC/* | \
+    # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+  ./ | .// | /[cC]/* | \
   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
   /usr/ucb/* ) ;;
   *)
     # OSF1 and SCO ODT 3.0 have their own names for install.
@@ -1995,7 +2393,7 @@ case $as_dir/ in
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
 	  if test $ac_prog = install &&
 	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
 	    # AIX install.  It has an incompatible calling convention.
@@ -2005,17 +2403,29 @@ case $as_dir/ in
 	    # program-specific install script used by HP pwplus--don't use.
 	    :
 	  else
-	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-	    break 3
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
 	  fi
 	fi
       done
     done
     ;;
 esac
-done
+
+  done
 IFS=$as_save_IFS
 
+rm -rf conftest.one conftest.two conftest.dir
 
 fi
   if test "${ac_cv_path_install+set}" = set; then
@@ -2028,8 +2438,8 @@ fi
     INSTALL=$ac_install_sh
   fi
 fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 # It thinks the first close brace ends the variable substitution.
@@ -2039,21 +2449,34 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
 # Just in case
 sleep 1
 echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$*" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$*" != "X $srcdir/configure conftest.file" \
@@ -2063,11 +2486,8 @@ if (
       # if, for instance, CONFIG_SHELL is bash and it inherits a
       # broken ls alias from the environment.  This has actually
       # happened.  Such a system could not be considered "sane".
-      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
    fi
 
    test "$2" = conftest.file
@@ -2076,142 +2496,253 @@ then
    # Ok.
    :
 else
-   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
 fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 test "$program_prefix" != NONE &&
   program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
 test "$program_suffix" != NONE &&
   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.  echo might interpret backslashes.
+# Double any \ or $.
 # By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm -f conftest.sed
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
 # expand $ac_aux_dir to an absolute path
 am_aux_dir=`cd $ac_aux_dir && pwd`
 
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
 else
   am_missing_run=
-  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
-echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
-if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in mkdir gmkdir; do
-	 for ac_exec_ext in '' $ac_executable_extensions; do
-	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
-	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
-	     'mkdir (GNU coreutils) '* | \
-	     'mkdir (coreutils) '* | \
-	     'mkdir (fileutils) '4.1*)
-	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
-	       break 3;;
-	   esac
-	 done
-       done
-done
-IFS=$as_save_IFS
-
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
 
-  if test "${ac_cv_path_mkdir+set}" = set; then
-    MKDIR_P="$ac_cv_path_mkdir -p"
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for MKDIR_P within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    test -d ./--version && rmdir ./--version
-    MKDIR_P="$ac_install_sh -d"
-  fi
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
 fi
-{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
-echo "${ECHO_T}$MKDIR_P" >&6; }
 
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
-  [\\/$]* | ?:[\\/]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6; }
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
-  test -n "$AWK" && break
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if ${ac_cv_path_mkdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in mkdir gmkdir; do
+	 for ac_exec_ext in '' $ac_executable_extensions; do
+	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
+	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+	     'mkdir (GNU coreutils) '* | \
+	     'mkdir (coreutils) '* | \
+	     'mkdir (fileutils) '4.1*)
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+	       break 3;;
+	   esac
+	 done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
 done
 
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
 SHELL = /bin/sh
 all:
 	@echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
 case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -2221,12 +2752,12 @@ esac
 rm -f conftest.make
 fi
 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
   SET_MAKE=
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
@@ -2245,9 +2776,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
   am__isrc=' -I$(srcdir)'
   # test to see if srcdir already configured
   if test -f $srcdir/config.status; then
-    { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
   fi
 fi
 
@@ -2263,7 +2792,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=libev
- VERSION=3.9
+ VERSION=4.11
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2291,1394 +2820,929 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
 
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+ ac_config_headers="$ac_config_headers config.h"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+    # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
 else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+  USE_MAINTAINER_MODE=no
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+   if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
 fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
+  if test "x$ac_ct_CC" = x; then
+    CC=""
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    STRIP=$ac_ct_STRIP
+    CC=$ac_ct_CC
   fi
 else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
+  CC="$ac_cv_prog_CC"
 fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
 
-
- ac_config_headers="$ac_config_headers config.h"
-
-{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; }
-    # Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
-  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  USE_MAINTAINER_MODE=no
-fi
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-  { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; }
-   if test $USE_MAINTAINER_MODE = yes; then
-  MAINTAINER_MODE_TRUE=
-  MAINTAINER_MODE_FALSE='#'
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  MAINTAINER_MODE_TRUE='#'
-  MAINTAINER_MODE_FALSE=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  MAINT=$MAINTAINER_MODE_TRUE
-
-
 
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
-  ./ | .// | /cC/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
-	  if test $ac_prog = install &&
-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  elif test $ac_prog = install &&
-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # program-specific install script used by HP pwplus--don't use.
-	    :
-	  else
-	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-	    break 3
-	  fi
-	fi
-      done
-    done
-    ;;
-esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
 done
+  done
 IFS=$as_save_IFS
 
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
   fi
 fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-# Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval=$enable_shared; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      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
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  enable_shared=yes
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
-# Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then
-  enableval=$enable_static; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      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
-else
-  enable_static=yes
 fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-
-# Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
-  enableval=$enable_fast_install; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      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
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  enable_fast_install=yes
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
-
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
-if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
-if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
 fi
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-	@echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
-fi
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
 
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
 
-{ echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6; }
-rm -f confinc confmf
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
-  enableval=$enable_dependency_tracking;
-fi
+int
+main ()
+{
 
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
- if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
 
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
+ac_rmfiles=
+for ac_file in $ac_files
 do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
 done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
 done
-IFS=$as_save_IFS
+test "$ac_cv_exeext" = no && ac_cv_exeext=
 
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  ac_file=''
 fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
 fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&2;}
-ac_tool_warned=yes ;;
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-    CC=$ac_ct_CC
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
   fi
-else
-  CC="$ac_cv_prog_CC"
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
 
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
 done
-IFS=$as_save_IFS
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
 fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
 
-  fi
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
 else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
+  ac_compiler_gnu=no
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
 fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  GCC=
 fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main ()
+{
 
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
   else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
   fi
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
 
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
-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_compiler --version >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
 
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
 
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
 int
 main ()
 {
-
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
   ;
   return 0;
 }
 _ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-#
-# List of possible output files, starting from the most likely.
-# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
-# only as a last resort.  b.out is created by i960 compilers.
-ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
-#
-# The IRIX 6 linker writes into existing files which may not be
-# executable, retaining their permissions.  Remove them first so a
-# subsequent execution test works.
-ac_rmfiles=
-for ac_file in $ac_files
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
-rm -f $ac_rmfiles
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
 
-if { (ac_try="$ac_link_default"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link_default") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
-	;;
-    [ab].out )
-	# We found the default executable, but exeext='' is most
-	# certainly right.
-	break;;
-    *.* )
-        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-	then :; else
-	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	fi
-	# We set ac_cv_exeext here because the later test for it is not
-	# safe: cross compilers may not add the suffix if given an `-o'
-	# argument, so we may need to know it at that point already.
-	# Even if this section looks crufty: it has the advantage of
-	# actually working.
-	break;;
-    * )
-	break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
+if test "x$ac_cv_prog_cc_c89" != xno; then :
 
-else
-  ac_file=''
 fi
 
-{ echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6; }
-if test -z "$ac_file"; then
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
 
-ac_exeext=$ac_cv_exeext
+ac_config_commands="$ac_config_commands depfiles"
 
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
-  if { ac_try='./$ac_file'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-	cross_compiling=yes
-    else
-	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-  fi
-fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
 
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6; }
-
-{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	  break;;
-    * ) break;;
-  esac
-done
-else
-  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
 
-rm -f conftest$ac_cv_exeext
-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6; }
 
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
-if test "${ac_cv_objext+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.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
 
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
 fi
 
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
-if test "${ac_cv_c_compiler_gnu+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.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "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_compiler_gnu=yes
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_compiler_gnu=no
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
+depcc="$CC"   am_compiler_list=
 
-  ;
-  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_prog_cc_g=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	CFLAGS=""
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
 
-int
-main ()
-{
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
 
-  ;
-  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
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "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_prog_cc_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "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_prog_cc_c89=$ac_arg
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6; } ;;
-  xno)
-    { echo "$as_me:$LINENO: result: unsupported" >&5
-echo "${ECHO_T}unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-depcc="$CC"   am_compiler_list=
-
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -3696,7 +3760,17 @@ else
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -3706,19 +3780,23 @@ else
 	break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -3742,8 +3820,8 @@ else
 fi
 
 fi
-{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
  if
@@ -3757,186 +3835,292 @@ else
 fi
 
 
-{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
-echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; }
-if test "${lt_cv_path_SED+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # 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 { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$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
 
+if test -z "$orig_CFLAGS"; then
+  if test x$GCC = xyes; then
+    CFLAGS="-g -O3"
+  fi
 fi
 
-SED=$lt_cv_path_SED
-
-{ echo "$as_me:$LINENO: result: $SED" >&5
-echo "${ECHO_T}$SED" >&6; }
 
-{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # Extract the first word of "grep ggrep" to use in msg output
-if test -z "$GREP"; then
-set dummy grep ggrep; ac_prog_name=$2
-if test "${ac_cv_path_GREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_path_GREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in grep ggrep; do
-  for ac_exec_ext in '' $ac_executable_extensions; do
-    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-    # Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+case `pwd` in
+  *\ * | *\	*)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
 esac
 
 
-    $ac_path_GREP_found && break 3
-  done
-done
 
-done
-IFS=$as_save_IFS
+macro_version='2.2.6b'
+macro_revision='1.3017'
 
 
-fi
 
-GREP="$ac_cv_path_GREP"
-if test -z "$GREP"; then
-  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-fi
 
-else
-  ac_cv_path_GREP=$GREP
-fi
 
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
 
 
-{ echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     # Extract the first word of "egrep" to use in msg output
-if test -z "$EGREP"; then
-set dummy egrep; ac_prog_name=$2
-if test "${ac_cv_path_EGREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_path_EGREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in egrep; do
-  for ac_exec_ext in '' $ac_executable_extensions; do
-    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-    # Check for GNU ac_path_EGREP and select it if it is found.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
 *GNU*)
   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
 *)
   ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  $as_echo_n 0123456789 >"conftest.in"
   while :
   do
     cat "conftest.in" "conftest.in" >"conftest.tmp"
     mv "conftest.tmp" "conftest.in"
     cp "conftest.in" "conftest.nl"
-    echo 'EGREP' >> "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
       # Best one so far, save it but keep looking for a better one
       ac_cv_path_EGREP="$ac_path_EGREP"
@@ -3948,39 +4132,114 @@ case `"$ac_path_EGREP" --version 2>&1` in
   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
 esac
 
-
-    $ac_path_EGREP_found && break 3
+      $ac_path_EGREP_found && break 3
+    done
+  done
   done
-done
-
-done
 IFS=$as_save_IFS
-
-
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
 fi
 
-EGREP="$ac_cv_path_EGREP"
-if test -z "$EGREP"; then
-  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
+   fi
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if ${ac_cv_path_FGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_cv_path_EGREP=$EGREP
-fi
+  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+   then ac_cv_path_FGREP="$GREP -F"
+   else
+     if test -z "$FGREP"; then
+  ac_path_FGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in fgrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_FGREP" || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+  # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'FGREP' >> "conftest.nl"
+    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_FGREP="$ac_path_FGREP"
+      ac_path_FGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
 
+      $ac_path_FGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_FGREP"; then
+    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_FGREP=$FGREP
+fi
 
    fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
 # Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
+if test "${with_gnu_ld+set}" = set; then :
   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
 else
   with_gnu_ld=no
@@ -3989,8 +4248,8 @@ fi
 ac_prog=ld
 if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
-  { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
   case $host in
   *-*-mingw*)
     # gcc leaves a trailing carriage return which upsets mingw
@@ -4003,9 +4262,9 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
     [\\/]* | ?:[\\/]*)
       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%/%"`
+      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"
       ;;
@@ -4019,14 +4278,14 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
     ;;
   esac
 elif test "$with_gnu_ld" = yes; then
-  { echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
 else
-  { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
 fi
-if test "${lt_cv_path_LD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if ${lt_cv_path_LD+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
@@ -4056,19 +4315,17 @@ fi
 
 LD="$lt_cv_path_LD"
 if test -n "$LD"; then
-  { echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
-{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${lt_cv_prog_gnu_ld+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU lds only accept -v.
 case `$LD -v 2>&1 </dev/null` in
@@ -4080,40 +4337,22 @@ case `$LD -v 2>&1 </dev/null` in
   ;;
 esac
 fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
 with_gnu_ld=$lt_cv_prog_gnu_ld
 
 
-{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; }
-if test "${lt_cv_ld_reload_flag+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_ld_reload_flag='-r'
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; }
-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
 
-{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; }
-if test "${lt_cv_path_NM+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if ${lt_cv_path_NM+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$NM"; then
   # Let the user override the test.
@@ -4156,2162 +4395,1070 @@ else
     done
     IFS="$lt_save_ifs"
   done
-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+  : ${lt_cv_path_NM=no}
 fi
 fi
-{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
-echo "${ECHO_T}$lt_cv_path_NM" >&6; }
-NM="$lt_cv_path_NM"
-
-{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
 else
-  { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6; }
-fi
-
-{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
-echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; }
-if test "${lt_cv_deplibs_check_method+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DUMPBIN+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  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.
+  if test -n "$DUMPBIN"; then
+  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-case $host_os in
-aix[4-9]*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-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
-  ;;
+    test -n "$DUMPBIN" && break
+  done
+fi
+if test -z "$DUMPBIN"; then
+  ac_ct_DUMPBIN=$DUMPBIN
+  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DUMPBIN"; then
+  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-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'
-  ;;
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-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'
+
+  test -n "$ac_ct_DUMPBIN" && break
+done
+
+  if test "x$ac_ct_DUMPBIN" = x; then
+    DUMPBIN=":"
   else
-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-    lt_cv_file_magic_cmd='$OBJDUMP -f'
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DUMPBIN=$ac_ct_DUMPBIN
   fi
-  ;;
+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
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
   fi
-  ;;
+fi
+test -z "$NM" && NM=nm
 
-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* | netbsdelf*-gnu)
-  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)$'
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if ${lt_cv_nm_interface+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:4526: $ac_compile\"" >&5)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:4529: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:4532: output\"" >&5)
+  cat conftest.out >&5
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
   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
-  ;;
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
 
-nto-qnx*)
-  lt_cv_deplibs_check_method=unknown
-  ;;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
 
-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
-  ;;
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if ${lt_cv_sys_max_cmd_len+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+    i=0
+  teststring="ABCD"
 
-osf3* | osf4* | osf5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+  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
+    ;;
 
-rdos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+  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;
+    ;;
 
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+  cygwin* | mingw* | cegcc*)
+    # 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;
+    ;;
 
-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*`
+  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;
     ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
+
+  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`
     ;;
-  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 )'
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
     ;;
-  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
+
+  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
     ;;
-  siemens)
-    lt_cv_deplibs_check_method=pass_all
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
     ;;
-  pc)
-    lt_cv_deplibs_check_method=pass_all
+  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
     ;;
-  esac
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-esac
+  *)
+    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
+      # Make teststring a little bigger before we do anything with it.
+      # a 1K string should be a reasonable start.
+      for i in 1 2 3 4 5 6 7 8 ; do
+        teststring=$teststring$teststring
+      done
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      # If test is not a shell built-in, we'll probably end up computing a
+      # maximum length that is only half of the actual maximum length, but
+      # we can't tell.
+      while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      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
 
 fi
-{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; }
-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
 
+if test -n $lt_cv_sys_max_cmd_len ; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
 
 
 
-# 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
 
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
 
-# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
-  enableval=$enable_libtool_lock;
-fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
 
-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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; 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 4413 "configure"' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; 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*
-  ;;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
 
-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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; 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"
-  { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
 else
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-     cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  lt_unset=false
+fi
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  lt_cv_cc_needs_belf=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-	lt_cv_cc_needs_belf=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-     ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; }
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
+# 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
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
   ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; 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*
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
   ;;
+esac
 
 
-esac
 
-need_locks="$enable_libtool_lock"
 
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if ${lt_cv_ld_reload_flag+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+  lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+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
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Broken: fails on valid input.
-continue
-fi
 
-rm -f conftest.err conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
 
-rm -f conftest.err conftest.$ac_ext
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
 
-    done
-    ac_cv_prog_CPP=$CPP
 
-fi
-  CPP=$ac_cv_prog_CPP
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_cv_prog_CPP=$CPP
-fi
-{ echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-  # Broken: fails on valid input.
-continue
 fi
-
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
 fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
 else
-  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
 
-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+  ac_ct_OBJDUMP=$OBJDUMP
+  # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "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_header_stdc=yes
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_header_stdc=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_OBJDUMP="objdump"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
 fi
-rm -f conftest*
-
 fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
 else
-  ac_cv_header_stdc=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-rm -f conftest*
 
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OBJDUMP=$ac_ct_OBJDUMP
+  fi
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
 fi
 
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
+test -z "$OBJDUMP" && OBJDUMP=objdump
 
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
 
 
-fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
 
-fi
 
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if ${lt_cv_deplibs_check_method+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  ;;
 
+cegcc)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
 
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+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.  */
-$ac_includes_default
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "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
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+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
+  ;;
 
-	eval "$as_ac_Header=no"
-fi
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+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
+  ;;
 
-fi
+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)$'
+  ;;
 
-done
+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 | kopensolaris*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
+netbsd* | netbsdelf*-gnu)
+  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
+  ;;
 
-for ac_header in dlfcn.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "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_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+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
+  ;;
 
-	ac_header_compiler=no
-fi
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+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
+  ;;
 
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-  ac_header_preproc=no
-fi
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  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
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
 
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+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
 
-fi
 
-done
 
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
-  if test -n "$CCC"; then
-    CXX=$CCC
-  else
-    if test -n "$ac_tool_prefix"; then
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$CXX"; then
-  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
-  { echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6; }
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
-    test -n "$CXX" && break
-  done
 fi
-if test -z "$CXX"; then
-  ac_ct_CXX=$CXX
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_CXX"; then
-  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CXX="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6; }
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-
-  test -n "$ac_ct_CXX" && break
-done
-
-  if test "x$ac_ct_CXX" = x; then
-    CXX="g++"
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    CXX=$ac_ct_CXX
+    AR=$ac_ct_AR
   fi
+else
+  AR="$ac_cv_prog_AR"
 fi
 
-  fi
-fi
-# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C++ compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
-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_compiler --version >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
 
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
-if test "${ac_cv_cxx_compiler_gnu+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.  */
 
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "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_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_compiler_gnu=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_compiler_gnu=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
-GXX=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
-   ac_cxx_werror_flag=yes
-   ac_cv_prog_cxx_g=no
-   CXXFLAGS="-g"
-   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "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_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cxx_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-	CXXFLAGS=""
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "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_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-	 CXXFLAGS="-g"
-	 cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-  ;
-  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_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cxx_g=yes
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
 fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
-  CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
-  if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
   else
-    CXXFLAGS="-g"
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
   fi
 else
-  if test "$GXX" = yes; then
-    CXXFLAGS="-O2"
-  else
-    CXXFLAGS=
-  fi
+  STRIP="$ac_cv_prog_STRIP"
 fi
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-depcc="$CXX"  am_compiler_list=
+test -z "$STRIP" && STRIP=:
 
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
 
-  am_cv_CXX_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-	continue
-      else
-	break
-      fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CXX_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
 
-  cd ..
-  rm -rf conftest.dir
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  am_cv_CXX_dependencies_compiler_type=none
-fi
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
 fi
-{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
-CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
-
- if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
-  am__fastdepCXX_TRUE=
-  am__fastdepCXX_FALSE='#'
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
 else
-  am__fastdepCXX_TRUE='#'
-  am__fastdepCXX_FALSE=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
-
-
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
-echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; }
-if test -z "$CXXCPP"; then
-  if test "${ac_cv_prog_CXXCPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-      # Double quotes because CXXCPP needs to be expanded
-    for CXXCPP in "$CXX -E" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-  # Broken: fails on valid input.
-continue
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
+    RANLIB=$ac_ct_RANLIB
+  fi
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
+  RANLIB="$ac_cv_prog_RANLIB"
 fi
 
-rm -f conftest.err conftest.$ac_ext
+test -z "$RANLIB" && RANLIB=:
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
 
-    done
-    ac_cv_prog_CXXCPP=$CXXCPP
 
-fi
-  CXXCPP=$ac_cv_prog_CXXCPP
-else
-  ac_cv_prog_CXXCPP=$CXXCPP
-fi
-{ echo "$as_me:$LINENO: result: $CXXCPP" >&5
-echo "${ECHO_T}$CXXCPP" >&6; }
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Broken: fails on valid input.
-continue
-fi
 
-rm -f conftest.err conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# 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=
 
-  # Passes both tests.
-ac_preproc_ok=:
-break
+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
 
-rm -f conftest.err conftest.$ac_ext
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
 
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-fi
 
 
-ac_ext=f
-ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
-ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_f77_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$F77"; then
-  ac_cv_prog_F77="$F77" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-fi
-fi
-F77=$ac_cv_prog_F77
-if test -n "$F77"; then
-  { echo "$as_me:$LINENO: result: $F77" >&5
-echo "${ECHO_T}$F77" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
 
 
-    test -n "$F77" && break
-  done
-fi
-if test -z "$F77"; then
-  ac_ct_F77=$F77
-  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_F77"; then
-  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_F77="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-fi
-fi
-ac_ct_F77=$ac_cv_prog_ac_ct_F77
-if test -n "$ac_ct_F77"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
-echo "${ECHO_T}$ac_ct_F77" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
 
 
-  test -n "$ac_ct_F77" && break
-done
 
-  if test "x$ac_ct_F77" = x; then
-    F77=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    F77=$ac_ct_F77
-  fi
-fi
 
 
-# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
-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_compiler --version >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-rm -f a.out
-
-# If we don't use `.F' as extension, the preprocessor is not run on the
-# input file.  (Note that this only needs to work for GNU compilers.)
-ac_save_ext=$ac_ext
-ac_ext=F
-{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; }
-if test "${ac_cv_f77_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-      program main
-#ifndef __GNUC__
-       choke me
-#endif
 
-      end
-_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_f77_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_compiler_gnu=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_compiler_gnu=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_f77_compiler_gnu=$ac_compiler_gnu
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; }
-ac_ext=$ac_save_ext
-ac_test_FFLAGS=${FFLAGS+set}
-ac_save_FFLAGS=$FFLAGS
-FFLAGS=
-{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
-echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_f77_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  FFLAGS=-g
-cat >conftest.$ac_ext <<_ACEOF
-      program main
 
-      end
-_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_f77_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_f77_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_prog_f77_g=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
-echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; }
-if test "$ac_test_FFLAGS" = set; then
-  FFLAGS=$ac_save_FFLAGS
-elif test $ac_cv_prog_f77_g = yes; then
-  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
-    FFLAGS="-g -O2"
-  else
-    FFLAGS="-g"
-  fi
-else
-  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
-    FFLAGS="-O2"
-  else
-    FFLAGS=
-  fi
-fi
 
-G77=`test $ac_compiler_gnu = yes && echo yes`
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-# find the maximum length of command line arguments
-{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; }
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-    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
 
-fi
 
-if test -n $lt_cv_sys_max_cmd_len ; then
-  { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; }
-else
-  { echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6; }
-fi
 
+# 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
 
 
 # Check for command to grab the raw symbol name followed by C symbol from nm.
-{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
-echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; }
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
 # These are sane defaults that work on at least a few old systems.
@@ -6323,33 +5470,18 @@ 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*)
+cygwin* | mingw* | pw32* | cegcc*)
   symcode='[ABCDGISTW]'
   ;;
-hpux*) # Its linker distinguishes data from code symbols
+hpux*)
   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]'
@@ -6374,57 +5506,85 @@ sysv4)
   ;;
 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
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \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\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+
 # 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
+  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.
+# Try without a prefix underscore, 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'"
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK '"\
+"     {last_section=section; section=\$ 3};"\
+"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     \$ 0!~/External *\|/{next};"\
+"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+"     {if(hide[section]) next};"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     ' prfx=^$ac_symprfx"
+  else
+    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  fi
 
   # Check to see that the pipe works correctly.
   pipe_works=no
 
   rm -f conftest*
-  cat > conftest.$ac_ext <<EOF
+  cat > conftest.$ac_ext <<_LT_EOF
 #ifdef __cplusplus
 extern "C" {
 #endif
 char nm_test_var;
-void nm_test_func(){}
+void nm_test_func(void);
+void nm_test_func(void){}
 #ifdef __cplusplus
 }
 #endif
 int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
+_LT_EOF
 
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s "$nlist"; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
 	mv -f "$nlist"T "$nlist"
@@ -6433,53 +5593,55 @@ EOF
       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
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<_LT_EOF > conftest.$ac_ext
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-EOF
+_LT_EOF
 	  # Now generate the symbol file.
-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+	  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
+	  cat <<_LT_EOF >> conftest.$ac_ext
 
-/* The mapping between symbol names and symbols. */
+/* The mapping between symbol names and symbols.  */
 const struct {
   const char *name;
-  lt_ptr_t address;
+  void       *address;
 }
-lt_preloaded_symbols[] =
+lt__PROGRAM__LTX_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}
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
 };
 
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
 #ifdef __cplusplus
 }
 #endif
-EOF
+_LT_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_prog_compiler_no_builtin_flag"
-	  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext}; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
 	    pipe_works=yes
 	  fi
 	  LIBS="$lt_save_LIBS"
@@ -6513,783 +5675,756 @@ 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
-  { echo "$as_me:$LINENO: result: failed" >&5
-echo "${ECHO_T}failed" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
 else
-  { echo "$as_me:$LINENO: result: ok" >&5
-echo "${ECHO_T}ok" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
 fi
 
-{ echo "$as_me:$LINENO: checking for objdir" >&5
-echo $ECHO_N "checking for objdir... $ECHO_C" >&6; }
-if test "${lt_cv_objdir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  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
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
-echo "${ECHO_T}$lt_cv_objdir" >&6; }
-objdir=$lt_cv_objdir
 
 
 
 
 
-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"
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  { echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
 
 
-fi
-if test -z "$ac_cv_prog_AR"; then
-  ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_AR="ar"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
 
-  if test "x$ac_ct_AR" = x; then
-    AR="false"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    AR=$ac_ct_AR
-  fi
-else
-  AR="$ac_cv_prog_AR"
-fi
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  { echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
 
 
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+  enableval=$enable_libtool_lock;
 fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+
+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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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 5738 "configure"' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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*|s390*-*tpf*)
+	    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"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if ${lt_cv_cc_needs_belf+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_cc_needs_belf=yes
+else
+  lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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*
+  ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+  case $host_os in
+    rhapsody* | darwin*)
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DSYMUTIL"; then
+  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+  ac_ct_DSYMUTIL=$DSYMUTIL
+  # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DSYMUTIL"; then
+  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
 done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
+  if test "x$ac_ct_DSYMUTIL" = x; then
+    DSYMUTIL=":"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    RANLIB=$ac_ct_RANLIB
+    DSYMUTIL=$ac_ct_DSYMUTIL
   fi
 else
-  RANLIB="$ac_cv_prog_RANLIB"
+  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
 fi
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_NMEDIT+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+  if test -n "$NMEDIT"; then
+  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
 fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$ac_cv_prog_NMEDIT"; then
+  ac_ct_NMEDIT=$NMEDIT
+  # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+  if test -n "$ac_ct_NMEDIT"; then
+  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_NMEDIT="nmedit"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
+  if test "x$ac_ct_NMEDIT" = x; then
+    NMEDIT=":"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    STRIP=$ac_ct_STRIP
+    NMEDIT=$ac_ct_NMEDIT
   fi
 else
-  STRIP="$ac_cv_prog_STRIP"
+  NMEDIT="$ac_cv_prog_NMEDIT"
 fi
 
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LIPO+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LIPO"; then
+  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-# 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
-
-for cc_temp in $compiler""; 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-%%"`
-
-
-# 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
-    { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$ac_cv_prog_LIPO"; then
+  ac_ct_LIPO=$LIPO
+  # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  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
-  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/${ac_tool_prefix}file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
-      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
+  if test -n "$ac_ct_LIPO"; then
+  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_LIPO="lipo"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
   done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac
-fi
+IFS=$as_save_IFS
 
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
 fi
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    { echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  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
-  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/file"
-      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
 fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6; }
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+  if test "x$ac_ct_LIPO" = x; then
+    LIPO=":"
   else
-    MAGIC_CMD=:
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    LIPO=$ac_ct_LIPO
   fi
+else
+  LIPO="$ac_cv_prog_LIPO"
 fi
 
-  fi
-  ;;
-esac
-
-
-  case $host_os in
-    rhapsody* | darwin*)
     if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_DSYMUTIL+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$DSYMUTIL"; then
-  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+  if test -n "$OTOOL"; then
+  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-DSYMUTIL=$ac_cv_prog_DSYMUTIL
-if test -n "$DSYMUTIL"; then
-  { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
-echo "${ECHO_T}$DSYMUTIL" >&6; }
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
 fi
-if test -z "$ac_cv_prog_DSYMUTIL"; then
-  ac_ct_DSYMUTIL=$DSYMUTIL
-  # Extract the first word of "dsymutil", so it can be a program name with args.
-set dummy dsymutil; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$ac_cv_prog_OTOOL"; then
+  ac_ct_OTOOL=$OTOOL
+  # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_DSYMUTIL"; then
-  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+  if test -n "$ac_ct_OTOOL"; then
+  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_OTOOL="otool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
-if test -n "$ac_ct_DSYMUTIL"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
-echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; }
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_DSYMUTIL" = x; then
-    DSYMUTIL=":"
+  if test "x$ac_ct_OTOOL" = x; then
+    OTOOL=":"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    DSYMUTIL=$ac_ct_DSYMUTIL
+    OTOOL=$ac_ct_OTOOL
   fi
 else
-  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+  OTOOL="$ac_cv_prog_OTOOL"
 fi
 
     if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
-set dummy ${ac_tool_prefix}nmedit; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_NMEDIT+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL64+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$NMEDIT"; then
-  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+  if test -n "$OTOOL64"; then
+  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-NMEDIT=$ac_cv_prog_NMEDIT
-if test -n "$NMEDIT"; then
-  { echo "$as_me:$LINENO: result: $NMEDIT" >&5
-echo "${ECHO_T}$NMEDIT" >&6; }
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
 fi
-if test -z "$ac_cv_prog_NMEDIT"; then
-  ac_ct_NMEDIT=$NMEDIT
-  # Extract the first word of "nmedit", so it can be a program name with args.
-set dummy nmedit; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$ac_cv_prog_OTOOL64"; then
+  ac_ct_OTOOL64=$OTOOL64
+  # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_NMEDIT"; then
-  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+  if test -n "$ac_ct_OTOOL64"; then
+  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_NMEDIT="nmedit"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_OTOOL64="otool64"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
-if test -n "$ac_ct_NMEDIT"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
-echo "${ECHO_T}$ac_ct_NMEDIT" >&6; }
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_NMEDIT" = x; then
-    NMEDIT=":"
+  if test "x$ac_ct_OTOOL64" = x; then
+    OTOOL64=":"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    NMEDIT=$ac_ct_NMEDIT
+    OTOOL64=$ac_ct_OTOOL64
   fi
 else
-  NMEDIT="$ac_cv_prog_NMEDIT"
+  OTOOL64="$ac_cv_prog_OTOOL64"
 fi
 
 
-    { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
-echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; }
-if test "${lt_cv_apple_cc_single_mod+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if ${lt_cv_apple_cc_single_mod+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   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
+	# 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.
+	rm -rf libconftest.dylib*
+	echo "int foo(void){return 1;}" > conftest.c
+	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	  lt_cv_apple_cc_single_mod=yes
+	else
+	  cat conftest.err >&5
+	fi
+	rm -rf libconftest.dylib*
+	rm -f conftest.*
       fi
 fi
-{ echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
-echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; }
-    { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
-echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; }
-if test "${lt_cv_ld_exported_symbols_list+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   lt_cv_ld_exported_symbols_list=no
       save_LDFLAGS=$LDFLAGS
       echo "_main" > conftest.sym
       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -7300,55 +6435,34 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+if ac_fn_c_try_link "$LINENO"; then :
   lt_cv_ld_exported_symbols_list=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	lt_cv_ld_exported_symbols_list=no
+  lt_cv_ld_exported_symbols_list=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-   LDFLAGS="$save_LDFLAGS"
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+	LDFLAGS="$save_LDFLAGS"
 
 fi
-{ echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
-echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
     case $host_os in
-    rhapsody* | darwin1.[0123])
+    rhapsody* | darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
     darwin1.*)
-     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*)
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*) # darwin 5.x on
       # 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' ;;
+	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
@@ -7358,40 +6472,147 @@ echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; }
     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}"
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
     fi
     if test "$DSYMUTIL" != ":"; then
-      _lt_dsymutil="~$DSYMUTIL \$lib || :"
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
     fi
     ;;
   esac
 
-
-enable_dlopen=no
-enable_win32_dll=no
-
-# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
-  enableval=$enable_libtool_lock;
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
 fi
+if test -z "$CPP"; then
+  if ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
 
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
 
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
 
-# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then
-  withval=$with_pic; pic_mode="$withval"
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
 else
-  pic_mode=default
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
 fi
+rm -f conftest.err conftest.i conftest.$ac_ext
 
-test -z "$pic_mode" && pic_mode=default
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
 
-# Use C for the default configuration in the libtool script
-tagname=
-lt_save_CC="$CC"
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -7399,9296 +6620,593 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-objext=$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);}'
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
 
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+int
+main ()
+{
 
-# Allow CC to be a program name with arguments.
-compiler=$CC
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
 
-# save warnings/boilerplate of simple test code
-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*
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
 
-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*
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
+fi
 
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
 
-lt_prog_compiler_no_builtin_flag=
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
 
-if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
+fi
 
-{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
 else
-  lt_cv_prog_compiler_rtti_exceptions=no
-  ac_outfile=conftest.$ac_objext
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="-fno-rtti -fno-exceptions"
-   # 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:7465: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:7469: \$? = $ac_status" >&5
-   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
-       lt_cv_prog_compiler_rtti_exceptions=yes
-     fi
-   fi
-   $rm conftest*
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
 
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
 
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
-    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
 else
-    :
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
 fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
 
-lt_prog_compiler_wl=
-lt_prog_compiler_pic=
-lt_prog_compiler_static=
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
 
-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+fi
 
-  if test "$GCC" = yes; then
-    lt_prog_compiler_wl='-Wl,'
-    lt_prog_compiler_static='-static'
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static='-Bstatic'
-      fi
-      ;;
+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_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
-      ;;
+done
 
-    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
-      lt_prog_compiler_pic='-DDLL_EXPORT'
-      ;;
+for ac_header in dlfcn.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
 
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic='-fno-common'
-      ;;
+fi
 
-    interix[3-9]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
+done
 
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      lt_prog_compiler_can_build_shared=no
-      enable_shared=no
-      ;;
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	lt_prog_compiler_pic=-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_prog_compiler_pic='-fPIC'
-	;;
-      esac
-      ;;
+# Set options
 
-    *)
-      lt_prog_compiler_pic='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      lt_prog_compiler_wl='-Wl,'
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static='-Bstatic'
-      else
-	lt_prog_compiler_static='-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_prog_compiler_pic='-qnocommon'
-         lt_prog_compiler_wl='-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).
-      lt_prog_compiler_pic='-DDLL_EXPORT'
-      ;;
 
-    hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl='-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_prog_compiler_pic='+Z'
-	;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static='${wl}-a ${wl}archive'
-      ;;
+        enable_dlopen=no
 
-    irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl='-Wl,'
-      # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static='-non_shared'
-      ;;
 
-    newsos6)
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
+  enable_win32_dll=no
 
-    linux* | k*bsd*-gnu)
-      case $cc_basename in
-      icc* | ecc*)
-	lt_prog_compiler_wl='-Wl,'
-	lt_prog_compiler_pic='-KPIC'
-	lt_prog_compiler_static='-static'
-        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-	# which looks to be a dead project)
-	lt_prog_compiler_wl='-Wl,'
-	lt_prog_compiler_pic='-fpic'
-	lt_prog_compiler_static='-Bstatic'
-        ;;
-      ccc*)
-        lt_prog_compiler_wl='-Wl,'
-        # All Alpha code is PIC.
-        lt_prog_compiler_static='-non_shared'
-        ;;
-      *)
-        case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ C*)
-	  # Sun C 5.9
-	  lt_prog_compiler_pic='-KPIC'
-	  lt_prog_compiler_static='-Bstatic'
-	  lt_prog_compiler_wl='-Wl,'
-	  ;;
-	*Sun\ F*)
-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
-	  lt_prog_compiler_pic='-KPIC'
-	  lt_prog_compiler_static='-Bstatic'
-	  lt_prog_compiler_wl=''
-	  ;;
-	esac
-	;;
-      esac
-      ;;
 
-    osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl='-Wl,'
-      # All OSF/1 code is PIC.
-      lt_prog_compiler_static='-non_shared'
+            # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      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
+else
+  enable_shared=yes
+fi
 
-    rdos*)
-      lt_prog_compiler_static='-non_shared'
-      ;;
 
-    solaris*)
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-	lt_prog_compiler_wl='-Qoption ld ';;
-      *)
-	lt_prog_compiler_wl='-Wl,';;
-      esac
-      ;;
 
-    sunos4*)
-      lt_prog_compiler_wl='-Qoption ld '
-      lt_prog_compiler_pic='-PIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
 
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
 
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-	lt_prog_compiler_pic='-Kconform_pic'
-	lt_prog_compiler_static='-Bstatic'
-      fi
-      ;;
 
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
 
-    unicos*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_can_build_shared=no
-      ;;
 
-    uts4*)
-      lt_prog_compiler_pic='-pic'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
 
+  # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+  enableval=$enable_static; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
     *)
-      lt_prog_compiler_can_build_shared=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
-  fi
+else
+  enable_static=yes
+fi
 
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic" >&6; }
 
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic"; then
 
-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_pic_works=no
-  ac_outfile=conftest.$ac_objext
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
-   # 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:7755: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:7759: \$? = $ac_status" >&5
-   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
-       lt_cv_prog_compiler_pic_works=yes
-     fi
-   fi
-   $rm conftest*
 
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6; }
 
-if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
-    case $lt_prog_compiler_pic in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
-     esac
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+  withval=$with_pic; pic_mode="$withval"
 else
-    lt_prog_compiler_pic=
-     lt_prog_compiler_can_build_shared=no
+  pic_mode=default
 fi
 
-fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic=
-    ;;
-  *)
-    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
-    ;;
-esac
 
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_static_works+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_static_works=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   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>&5
-       $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
-         lt_cv_prog_compiler_static_works=yes
-       fi
-     else
-       lt_cv_prog_compiler_static_works=yes
-     fi
-   fi
-   $rm -r conftest*
-   LDFLAGS="$save_LDFLAGS"
+test -z "$pic_mode" && pic_mode=default
 
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; }
 
-if test x"$lt_cv_prog_compiler_static_works" = xyes; then
-    :
+
+
+
+
+
+  # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+  enableval=$enable_fast_install; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      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
 else
-    lt_prog_compiler_static=
+  enable_fast_install=yes
 fi
 
 
-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_c_o=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:7859: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:7863: \$? = $ac_status" >&5
-   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_cv_prog_compiler_c_o=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $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*
 
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; }
 
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  { echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
 
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
 
-  runpath_var=
-  allow_undefined_flag=
-  enable_shared_with_static_runtimes=no
-  archive_cmds=
-  archive_expsym_cmds=
-  old_archive_From_new_cmds=
-  old_archive_from_expsyms_cmds=
-  export_dynamic_flag_spec=
-  whole_archive_flag_spec=
-  thread_safe_flag_spec=
-  hardcode_libdir_flag_spec=
-  hardcode_libdir_flag_spec_ld=
-  hardcode_libdir_separator=
-  hardcode_direct=no
-  hardcode_minus_L=no
-  hardcode_shlibpath_var=unsupported
-  link_all_deplibs=unknown
-  hardcode_automatic=no
-  module_cmds=
-  module_expsym_cmds=
-  always_export_symbols=no
-  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  include_expsyms=
-  # exclude_expsyms can be an 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'.
-  exclude_expsyms='_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.
-  extract_expsyms_cmds=
-  # Just being paranoid about ensuring that cc_basename is set.
-  for cc_temp in $compiler""; 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-%%"`
 
-  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
 
-  ld_shlibs=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
-    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec='${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
-	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-  	whole_archive_flag_spec=
-    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
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
 
-    # 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
-	ld_shlibs=no
-	cat <<EOF 1>&2
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
-*** 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*)
-      archive_cmds='$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)'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
 
-      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      ld_shlibs=no
-      ;;
 
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	allow_undefined_flag=unsupported
-	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
-	# support --undefined.  This deserves some investigation.  FIXME
-	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-	ld_shlibs=no
-      fi
-      ;;
 
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
-      # as there is no search path for DLLs.
-      hardcode_libdir_flag_spec='-L$libdir'
-      allow_undefined_flag=unsupported
-      always_export_symbols=no
-      enable_shared_with_static_runtimes=yes
-      export_symbols_cmds='$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
-        archive_cmds='$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...
-	archive_expsym_cmds='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
-	ld_shlibs=no
-      fi
-      ;;
 
-    interix[3-9]*)
-      hardcode_direct=no
-      hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec='${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.
-      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds='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
-	  whole_archive_flag_spec='${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
-	  whole_archive_flag_spec='${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
-	  whole_archive_flag_spec='${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
-	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
-	if test $supports_anon_versioning = yes; then
-	  archive_expsym_cmds='$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
-	link_all_deplibs=no
-      else
-	ld_shlibs=no
-      fi
-      ;;
 
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-	wlarc=
-      else
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$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
-	ld_shlibs=no
-	cat <<EOF 1>&2
 
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
 
-EOF
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	ld_shlibs=no
-      fi
-      ;;
 
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-	ld_shlibs=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
-	    hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
-	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
-	  else
-	    ld_shlibs=no
-	  fi
-	;;
-      esac
-      ;;
 
-    sunos4*)
-      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	ld_shlibs=no
-      fi
-      ;;
-    esac
 
-    if test "$ld_shlibs" = no; then
-      runpath_var=
-      hardcode_libdir_flag_spec=
-      export_dynamic_flag_spec=
-      whole_archive_flag_spec=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      allow_undefined_flag=unsupported
-      always_export_symbols=yes
-      archive_expsym_cmds='$LD -o $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.
-      hardcode_minus_L=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-	# Neither direct hardcoding nor static linking is supported with a
-	# broken collect2.
-	hardcode_direct=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
-	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-	else
-	  export_symbols_cmds='$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.
 
-      archive_cmds=''
-      hardcode_direct=yes
-      hardcode_libdir_separator=':'
-      link_all_deplibs=yes
+test -z "$LN_S" && LN_S="ln -s"
 
-      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
-  	  hardcode_direct=unsupported
-  	  # It fails to find uninstalled libraries when the uninstalled
-  	  # path is not listed in the libpath.  Setting hardcode_minus_L
-  	  # to unsupported forces relinking
-  	  hardcode_minus_L=yes
-  	  hardcode_libdir_flag_spec='-L$libdir'
-  	  hardcode_libdir_separator=
-	  fi
-	  ;;
-	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.
-      always_export_symbols=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.
-	allow_undefined_flag='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
 
-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
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-	archive_expsym_cmds="\$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
-	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
-	  allow_undefined_flag="-z nodefs"
-	  archive_expsym_cmds="\$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.
-	 cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
 
-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"`
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
 fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if ${lt_cv_objdir+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  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
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
 
 
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-	 hardcode_libdir_flag_spec='${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.
-	  no_undefined_flag=' ${wl}-bernotok'
-	  allow_undefined_flag=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  whole_archive_flag_spec='$convenience'
-	  archive_cmds_need_lc=yes
-	  # This is similar to how AIX traditionally builds its shared libraries.
-	  archive_expsym_cmds="\$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*)
-      archive_cmds='$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)'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      # see comment about different semantics on the GNU ld section
-      ld_shlibs=no
-      ;;
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
 
-    bsdi[45]*)
-      export_dynamic_flag_spec=-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.
-      hardcode_libdir_flag_spec=' '
-      allow_undefined_flag=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.
-      archive_cmds='$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.
-      old_archive_From_new_cmds='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes=yes
-      ;;
 
-    darwin* | rhapsody*)
-      case $host_os in
-        rhapsody* | darwin1.[012])
-         allow_undefined_flag='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[012])
-               allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-      esac
-      archive_cmds_need_lc=no
-      hardcode_direct=no
-      hardcode_automatic=yes
-      hardcode_shlibpath_var=unsupported
-      whole_archive_flag_spec=''
-      link_all_deplibs=yes
-    if test "$GCC" = yes ; then
-    	output_verbose_link_cmd='echo'
-        archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-        module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-        archive_expsym_cmds="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}"
-        module_expsym_cmds="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'
-         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
-         module_cmds='$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
-         archive_expsym_cmds='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}'
-          module_expsym_cmds='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}'
-          ;;
-       *)
-         ld_shlibs=no
-          ;;
-      esac
-    fi
-      ;;
 
-    dgux*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_shlibpath_var=no
-      ;;
 
-    freebsd1*)
-      ld_shlibs=no
-      ;;
 
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
-      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    hpux9*)
-      if test "$GCC" = yes; then
-	archive_cmds='$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
-	archive_cmds='$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
-      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_direct=yes
 
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L=yes
-      export_dynamic_flag_spec='${wl}-E'
-      ;;
 
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-	hardcode_libdir_separator=:
 
-	hardcode_direct=yes
-	export_dynamic_flag_spec='${wl}-E'
 
-	# hardcode_minus_L: Not really in the search PATH,
-	# but as the default location of the library.
-	hardcode_minus_L=yes
-      fi
-      ;;
 
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	case $host_cpu in
-	hppa*64*)
-	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  archive_cmds='$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*)
-	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  archive_cmds='$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
-	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-	hardcode_libdir_separator=:
 
-	case $host_cpu in
-	hppa*64*|ia64*)
-	  hardcode_libdir_flag_spec_ld='+b $libdir'
-	  hardcode_direct=no
-	  hardcode_shlibpath_var=no
-	  ;;
-	*)
-	  hardcode_direct=yes
-	  export_dynamic_flag_spec='${wl}-E'
 
-	  # hardcode_minus_L: Not really in the search PATH,
-	  # but as the default location of the library.
-	  hardcode_minus_L=yes
-	  ;;
-	esac
-      fi
-      ;;
 
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	archive_cmds='$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
-	archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	hardcode_libdir_flag_spec_ld='-rpath $libdir'
-      fi
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      link_all_deplibs=yes
-      ;;
+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
 
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
 
-    newsos6)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_shlibpath_var=no
-      ;;
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
 
-    openbsd*)
-      if test -f /usr/libexec/ld.so; then
-	hardcode_direct=yes
-	hardcode_shlibpath_var=no
-	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-	  export_dynamic_flag_spec='${wl}-E'
-	else
-	  case $host_os in
-	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	     hardcode_libdir_flag_spec='-R$libdir'
-	     ;;
-	   *)
-	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-	     ;;
-	  esac
-        fi
-      else
-	ld_shlibs=no
-      fi
-      ;;
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
-    os2*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      allow_undefined_flag=unsupported
-      archive_cmds='$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'
-      old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
 
-    osf3*)
-      if test "$GCC" = yes; then
-	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds='$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
-	allow_undefined_flag=' -expect_unresolved \*'
-	archive_cmds='$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
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
 
-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds='$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'
-	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      else
-	allow_undefined_flag=' -expect_unresolved \*'
-	archive_cmds='$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'
-	archive_expsym_cmds='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'
+# Global variables:
+ofile=libtool
+can_build_shared=yes
 
-	# Both c and cxx compiler support -rpath directly
-	hardcode_libdir_flag_spec='-rpath $libdir'
-      fi
-      hardcode_libdir_separator=:
-      ;;
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
 
-    solaris*)
-      no_undefined_flag=' -z text'
-      if test "$GCC" = yes; then
-	wlarc='${wl}'
-	archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$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=''
-	archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      fi
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_shlibpath_var=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
-	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-	else
-	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
-	fi
-	;;
-      esac
-      link_all_deplibs=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.
-	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      hardcode_shlibpath_var=no
-      ;;
+with_gnu_ld="$lt_cv_prog_gnu_ld"
 
-    sysv4)
-      case $host_vendor in
-	sni)
-	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  hardcode_direct=yes # is this really true???
-	;;
-	siemens)
-	  ## LD is ld it makes a PLAMLIB
-	  ## CC just makes a GrossModule.
-	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-	  reload_cmds='$CC -r -o $output$reload_objs'
-	  hardcode_direct=no
-        ;;
-	motorola)
-	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
-	;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      hardcode_shlibpath_var=no
-      ;;
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
 
-    sysv4.3*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var=no
-      export_dynamic_flag_spec='-Bexport'
-      ;;
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	hardcode_shlibpath_var=no
-	runpath_var=LD_RUN_PATH
-	hardcode_runpath_var=yes
-	ld_shlibs=yes
-      fi
-      ;;
+for cc_temp in $compiler""; 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-%%"`
 
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      no_undefined_flag='${wl}-z,text'
-      archive_cmds_need_lc=no
-      hardcode_shlibpath_var=no
-      runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      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 <<_LT_EOF 1>&2
 
-    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.
-      no_undefined_flag='${wl}-z,text'
-      allow_undefined_flag='${wl}-z,nodefs'
-      archive_cmds_need_lc=no
-      hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      hardcode_libdir_separator=':'
-      link_all_deplibs=yes
-      export_dynamic_flag_spec='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
+*** 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
 
-      if test "$GCC" = yes; then
-	archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+_LT_EOF
+	  fi ;;
+	esac
       fi
-      ;;
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
 
-    uts4*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_shlibpath_var=no
-      ;;
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-    *)
-      ld_shlibs=no
-      ;;
-    esac
-  fi
 
-{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5
-echo "${ECHO_T}$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
 
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds 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.
-      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
-      $rm conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl
-	pic_flag=$lt_prog_compiler_pic
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag
-        allow_undefined_flag=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-        then
-	  archive_cmds_need_lc=no
-        else
-	  archive_cmds_need_lc=yes
-        fi
-        allow_undefined_flag=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $rm conftest*
-      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
-echo "${ECHO_T}$archive_cmds_need_lc" >&6; }
-      ;;
-    esac
-  fi
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
   ;;
-esac
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      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 <<_LT_EOF 1>&2
 
-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
-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"
+*** 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
 
-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
+_LT_EOF
+	  fi ;;
+	esac
       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'
+      break
     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`'
-
-  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'
-  ;;
-
-netbsdelf*-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
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_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
-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
-fi
-
-sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
-fi
-
-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
-
-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" || \
-   test -n "$runpath_var" || \
-   test "X$hardcode_automatic" = "Xyes" ; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
-     test "$hardcode_minus_L" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action=unsupported
-fi
-{ echo "$as_me:$LINENO: result: $hardcode_action" >&5
-echo "${ECHO_T}$hardcode_action" >&6; }
-
-if test "$hardcode_action" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-
-striplib=
-old_striplib=
-{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; }
-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"
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-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"
-         { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-       ;;
-   *)
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-    ;;
-  esac
-fi
-
-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
-    { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_dl_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_dl_dlopen=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
-if test $ac_cv_lib_dl_dlopen = yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-
-    lt_cv_dlopen="dyld"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-
-fi
-
-   ;;
-
-  *)
-    { echo "$as_me:$LINENO: checking for shl_load" >&5
-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; }
-if test "${ac_cv_func_shl_load+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.  */
-/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define shl_load innocuous_shl_load
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char shl_load (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef shl_load
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_shl_load || defined __stub___shl_load
-choke me
-#endif
-
-int
-main ()
-{
-return shl_load ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_func_shl_load=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_shl_load=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-echo "${ECHO_T}$ac_cv_func_shl_load" >&6; }
-if test $ac_cv_func_shl_load = yes; then
-  lt_cv_dlopen="shl_load"
-else
-  { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
-int
-main ()
-{
-return shl_load ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_dld_shl_load=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_dld_shl_load=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
-if test $ac_cv_lib_dld_shl_load = yes; then
-  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
-else
-  { echo "$as_me:$LINENO: checking for dlopen" >&5
-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
-if test "${ac_cv_func_dlopen+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.  */
-/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define dlopen innocuous_dlopen
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dlopen (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef dlopen
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_dlopen || defined __stub___dlopen
-choke me
-#endif
-
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_func_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_dlopen=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
-if test $ac_cv_func_dlopen = yes; then
-  lt_cv_dlopen="dlopen"
-else
-  { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_dl_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_dl_dlopen=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
-if test $ac_cv_lib_dl_dlopen = yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-  { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; }
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_svld_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_svld_dlopen=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; }
-if test $ac_cv_lib_svld_dlopen = yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
-  { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
-echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dld_link ();
-int
-main ()
-{
-return dld_link ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_dld_dld_link=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_dld_dld_link=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; }
-if test $ac_cv_lib_dld_dld_link = yes; then
-  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-    ;;
-  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"
-
-    { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; }
-if test "${lt_cv_dlopen_self+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  	  if test "$cross_compiling" = yes; then :
-  lt_cv_dlopen_self=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-#line 10236 "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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&5 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
-    esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self=no
-  fi
-fi
-rm -fr conftest*
-
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self" >&6; }
-
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; }
-if test "${lt_cv_dlopen_self_static+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  	  if test "$cross_compiling" = yes; then :
-  lt_cv_dlopen_self_static=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-#line 10336 "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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&5 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
-    esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self_static=no
-  fi
-fi
-rm -fr conftest*
-
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; }
-    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
-
-
-# Report which library types will actually be built
-{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6; }
-
-{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-
-aix[4-9]*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-    ;;
-esac
-{ echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6; }
-
-{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-{ echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6; }
-
-# 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 \
-    compiler \
-    CC \
-    LD \
-    lt_prog_compiler_wl \
-    lt_prog_compiler_pic \
-    lt_prog_compiler_static \
-    lt_prog_compiler_no_builtin_flag \
-    export_dynamic_flag_spec \
-    thread_safe_flag_spec \
-    whole_archive_flag_spec \
-    enable_shared_with_static_runtimes \
-    old_archive_cmds \
-    old_archive_from_new_cmds \
-    predep_objects \
-    postdep_objects \
-    predeps \
-    postdeps \
-    compiler_lib_search_path \
-    compiler_lib_search_dirs \
-    archive_cmds \
-    archive_expsym_cmds \
-    postinstall_cmds \
-    postuninstall_cmds \
-    old_archive_from_expsyms_cmds \
-    allow_undefined_flag \
-    no_undefined_flag \
-    export_symbols_cmds \
-    hardcode_libdir_flag_spec \
-    hardcode_libdir_flag_spec_ld \
-    hardcode_libdir_separator \
-    hardcode_automatic \
-    module_cmds \
-    module_expsym_cmds \
-    lt_cv_prog_compiler_c_o \
-    fix_srcfile_path \
-    exclude_expsyms \
-    include_expsyms; do
-
-    case $var in
-    old_archive_cmds | \
-    old_archive_from_new_cmds | \
-    archive_cmds | \
-    archive_expsym_cmds | \
-    module_cmds | \
-    module_expsym_cmds | \
-    old_archive_from_expsyms_cmds | \
-    export_symbols_cmds | \
-    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
-
-cfgfile="${ofile}T"
-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
-  $rm -f "$cfgfile"
-  { echo "$as_me:$LINENO: creating $ofile" >&5
-echo "$as_me: creating $ofile" >&6;}
-
-  cat <<__EOF__ >> "$cfgfile"
-#! $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
-
-# 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=$archive_cmds_need_lc
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
-
-# 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_compiler
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_LD
-
-# 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_prog_compiler_wl
-
-# 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_prog_compiler_pic
-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_cv_prog_compiler_c_o
-
-# 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_prog_compiler_static
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec
-
-# 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_old_archive_cmds
-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_old_archive_from_new_cmds
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
-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_module_cmds
-module_expsym_cmds=$lt_module_expsym_cmds
-
-# 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_predep_objects
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps
-
-# The directories searched by this compiler when creating a shared
-# library
-compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path
-
-# 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_allow_undefined_flag
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
-
-# 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=$hardcode_action
-
-# 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_hardcode_libdir_flag_spec
-
-# 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_hardcode_libdir_flag_spec_ld
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
-
-# 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=$hardcode_automatic
-
-# 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=$link_all_deplibs
-
-# 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=$always_export_symbols
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
-
-# 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_exclude_expsyms
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
-
-# ### END LIBTOOL CONFIG
-
-__EOF__
-
-
-  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_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
-
-# Check whether --with-tags was given.
-if test "${with_tags+set}" = set; then
-  withval=$with_tags; tagnames="$withval"
-fi
-
-
-if test -f "$ltmain" && test -n "$tagnames"; then
-  if test ! -f "${ofile}"; then
-    { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
-echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
-  fi
-
-  if test -z "$LTCC"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
-    if test -z "$LTCC"; then
-      { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
-echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
-    else
-      { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
-echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
-    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
-    "") ;;
-    *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
-echo "$as_me: error: invalid tag name: $tagname" >&2;}
-   { (exit 1); exit 1; }; }
-	;;
-    esac
-
-    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
-    then
-      { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
-echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
-   { (exit 1); exit 1; }; }
-    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_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-
-archive_cmds_need_lc_CXX=no
-allow_undefined_flag_CXX=
-always_export_symbols_CXX=no
-archive_expsym_cmds_CXX=
-export_dynamic_flag_spec_CXX=
-hardcode_direct_CXX=no
-hardcode_libdir_flag_spec_CXX=
-hardcode_libdir_flag_spec_ld_CXX=
-hardcode_libdir_separator_CXX=
-hardcode_minus_L_CXX=no
-hardcode_shlibpath_var_CXX=unsupported
-hardcode_automatic_CXX=no
-module_cmds_CXX=
-module_expsym_cmds_CXX=
-link_all_deplibs_CXX=unknown
-old_archive_cmds_CXX=$old_archive_cmds
-no_undefined_flag_CXX=
-whole_archive_flag_spec_CXX=
-enable_shared_with_static_runtimes_CXX=no
-
-# Dependencies to place before and after the object being linked:
-predep_objects_CXX=
-postdep_objects_CXX=
-predeps_CXX=
-postdeps_CXX=
-compiler_lib_search_path_CXX=
-compiler_lib_search_dirs_CXX=
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-objext_CXX=$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.
-
-# 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
-
-
-# save warnings/boilerplate of simple test code
-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*
-
-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*
-
-
-# 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
-compiler_CXX=$CC
-for cc_temp in $compiler""; 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-%%"`
-
-
-# We don't want -fno-exception wen compiling C++ code, so set the
-# no_builtin_flag separately
-if test "$GXX" = yes; then
-  lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
-else
-  lt_prog_compiler_no_builtin_flag_CXX=
-fi
-
-if test "$GXX" = yes; then
-  # Set up default GNU C++ configuration
-
-
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
-  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
-  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
-  { echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
-else
-  { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
-fi
-if test "${lt_cv_path_LD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  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
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  { echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
-{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # 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
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$lt_cv_prog_gnu_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
-    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
-    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec_CXX='${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
-      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      whole_archive_flag_spec_CXX=
-    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.
-    archive_cmds_CXX='$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
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
-ld_shlibs_CXX=yes
-case $host_os in
-  aix3*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=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.
-
-    archive_cmds_CXX=''
-    hardcode_direct_CXX=yes
-    hardcode_libdir_separator_CXX=':'
-    link_all_deplibs_CXX=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
-	  hardcode_direct_CXX=unsupported
-	  # It fails to find uninstalled libraries when the uninstalled
-	  # path is not listed in the libpath.  Setting hardcode_minus_L
-	  # to unsupported forces relinking
-	  hardcode_minus_L_CXX=yes
-	  hardcode_libdir_flag_spec_CXX='-L$libdir'
-	  hardcode_libdir_separator_CXX=
-	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.
-    always_export_symbols_CXX=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.
-      allow_undefined_flag_CXX='-berok'
-      # Determine the default libpath from the value encoded in an empty executable.
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-
-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
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
-      hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
-
-      archive_expsym_cmds_CXX="\$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
-	hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
-	allow_undefined_flag_CXX="-z nodefs"
-	archive_expsym_cmds_CXX="\$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.
-	cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-
-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
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
-	hardcode_libdir_flag_spec_CXX='${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.
-	no_undefined_flag_CXX=' ${wl}-bernotok'
-	allow_undefined_flag_CXX=' ${wl}-berok'
-	# Exported symbols can be pulled into shared objects from archives
-	whole_archive_flag_spec_CXX='$convenience'
-	archive_cmds_need_lc_CXX=yes
-	# This is similar to how AIX traditionally builds its shared libraries.
-	archive_expsym_cmds_CXX="\$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
-      allow_undefined_flag_CXX=unsupported
-      # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
-      # support --undefined.  This deserves some investigation.  FIXME
-      archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    else
-      ld_shlibs_CXX=no
-    fi
-    ;;
-
-  chorus*)
-    case $cc_basename in
-      *)
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-    esac
-    ;;
-
-  cygwin* | mingw* | pw32*)
-    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
-    # as there is no search path for DLLs.
-    hardcode_libdir_flag_spec_CXX='-L$libdir'
-    allow_undefined_flag_CXX=unsupported
-    always_export_symbols_CXX=no
-    enable_shared_with_static_runtimes_CXX=yes
-
-    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-      archive_cmds_CXX='$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...
-      archive_expsym_cmds_CXX='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
-      ld_shlibs_CXX=no
-    fi
-  ;;
-      darwin* | rhapsody*)
-      archive_cmds_need_lc_CXX=no
-      hardcode_direct_CXX=no
-      hardcode_automatic_CXX=yes
-      hardcode_shlibpath_var_CXX=unsupported
-      whole_archive_flag_spec_CXX=''
-      link_all_deplibs_CXX=yes
-      allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
-      if test "$GXX" = yes ; then
-      output_verbose_link_cmd='echo'
-      archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-      module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-      archive_expsym_cmds_CXX="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}"
-      module_expsym_cmds_CXX="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
-        archive_cmds_CXX="\$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}"
-        archive_expsym_cmds_CXX="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'
-          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
-          module_cmds_CXX='$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
-          archive_expsym_cmds_CXX='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}'
-          module_expsym_cmds_CXX='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}'
-          ;;
-       *)
-         ld_shlibs_CXX=no
-          ;;
-      esac
-      fi
-        ;;
-
-  dgux*)
-    case $cc_basename in
-      ec++*)
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-      ghcx*)
-	# Green Hills C++ Compiler
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-    esac
-    ;;
-  freebsd[12]*)
-    # C++ shared libraries reported to be fairly broken before switch to ELF
-    ld_shlibs_CXX=no
-    ;;
-  freebsd-elf*)
-    archive_cmds_need_lc_CXX=no
-    ;;
-  freebsd* | dragonfly*)
-    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-    # conventions
-    ld_shlibs_CXX=yes
-    ;;
-  gnu*)
-    ;;
-  hpux9*)
-    hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
-    hardcode_libdir_separator_CXX=:
-    export_dynamic_flag_spec_CXX='${wl}-E'
-    hardcode_direct_CXX=yes
-    hardcode_minus_L_CXX=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
-      ld_shlibs_CXX=no
-      ;;
-    aCC*)
-      archive_cmds_CXX='$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
-        archive_cmds_CXX='$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
-        ld_shlibs_CXX=no
-      fi
-      ;;
-    esac
-    ;;
-  hpux10*|hpux11*)
-    if test $with_gnu_ld = no; then
-      hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator_CXX=:
-
-      case $host_cpu in
-      hppa*64*|ia64*) ;;
-      *)
-	export_dynamic_flag_spec_CXX='${wl}-E'
-        ;;
-      esac
-    fi
-    case $host_cpu in
-    hppa*64*|ia64*)
-      hardcode_direct_CXX=no
-      hardcode_shlibpath_var_CXX=no
-      ;;
-    *)
-      hardcode_direct_CXX=yes
-      hardcode_minus_L_CXX=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
-	ld_shlibs_CXX=no
-	;;
-      aCC*)
-	case $host_cpu in
-	hppa*64*)
-	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	  ;;
-	ia64*)
-	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	  ;;
-	*)
-	  archive_cmds_CXX='$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*)
-	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      ;;
-	    ia64*)
-	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      ;;
-	    *)
-	      archive_cmds_CXX='$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
-	  ld_shlibs_CXX=no
-	fi
-	;;
-    esac
-    ;;
-  interix[3-9]*)
-    hardcode_direct_CXX=no
-    hardcode_shlibpath_var_CXX=no
-    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-    export_dynamic_flag_spec_CXX='${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.
-    archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-    archive_expsym_cmds_CXX='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++
-	archive_cmds_CXX='$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.
-	old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
-	;;
-      *)
-	if test "$GXX" = yes; then
-	  if test "$with_gnu_ld" = no; then
-	    archive_cmds_CXX='$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
-	    archive_cmds_CXX='$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
-	link_all_deplibs_CXX=yes
-	;;
-    esac
-    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-    hardcode_libdir_separator_CXX=:
-    ;;
-  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.
-	archive_cmds_CXX='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'
-	archive_expsym_cmds_CXX='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'
-
-	hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
-	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
-	# Archives containing C++ object files must be created using
-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	old_archive_cmds_CXX='$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."*)
-  	  archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-  	  archive_expsym_cmds_CXX='$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
-  	  archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	  archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-	  ;;
-	esac
-	archive_cmds_need_lc_CXX=no
-	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-	whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-	;;
-      pgCC* | pgcpp*)
-        # Portland Group C++ compiler
-	archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-  	archive_expsym_cmds_CXX='$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'
-
-	hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
-	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-	whole_archive_flag_spec_CXX='${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++
-	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_CXX='$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
-	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
-	hardcode_libdir_separator_CXX=:
-
-	# 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
-	  no_undefined_flag_CXX=' -zdefs'
-	  archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	  archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
-	  hardcode_libdir_flag_spec_CXX='-R$libdir'
-	  whole_archive_flag_spec_CXX='${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.
-	  old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
-	  ;;
-	esac
-	;;
-    esac
-    ;;
-  lynxos*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  m88k*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  mvs*)
-    case $cc_basename in
-      cxx*)
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-    esac
-    ;;
-  netbsd* | netbsdelf*-gnu)
-    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-      archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
-      wlarc=
-      hardcode_libdir_flag_spec_CXX='-R$libdir'
-      hardcode_direct_CXX=yes
-      hardcode_shlibpath_var_CXX=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
-    ld_shlibs_CXX=no
-    ;;
-  openbsd*)
-    if test -f /usr/libexec/ld.so; then
-      hardcode_direct_CXX=yes
-      hardcode_shlibpath_var_CXX=no
-      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-      hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-	export_dynamic_flag_spec_CXX='${wl}-E'
-	whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      fi
-      output_verbose_link_cmd='echo'
-    else
-      ld_shlibs_CXX=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.
-	archive_cmds_CXX='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'
-
-	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-	hardcode_libdir_separator_CXX=:
-
-	# Archives containing C++ object files must be created using
-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
-
-	;;
-      RCC*)
-	# Rational C++ 2.4.1
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-      cxx*)
-	allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_CXX='$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'
-
-	hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-	hardcode_libdir_separator_CXX=:
-
-	# 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
-	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-	  archive_cmds_CXX='$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'
-
-	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-	  hardcode_libdir_separator_CXX=:
-
-	  # 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
-	  ld_shlibs_CXX=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.
-	archive_cmds_CXX='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'
-
-	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-	hardcode_libdir_separator_CXX=:
-
-	# Archives containing C++ object files must be created using
-	# the KAI C++ compiler.
-	old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
-	;;
-      RCC*)
-	# Rational C++ 2.4.1
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-      cxx*)
-	allow_undefined_flag_CXX=' -expect_unresolved \*'
-	archive_cmds_CXX='$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'
-	archive_expsym_cmds_CXX='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'
-
-	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
-	hardcode_libdir_separator_CXX=:
-
-	# 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
-	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-	 archive_cmds_CXX='$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'
-
-	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-	  hardcode_libdir_separator_CXX=:
-
-	  # 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
-	  ld_shlibs_CXX=no
-	fi
-	;;
-    esac
-    ;;
-  psos*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  sunos4*)
-    case $cc_basename in
-      CC*)
-	# Sun C++ 4.x
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-      lcc*)
-	# Lucid
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-    esac
-    ;;
-  solaris*)
-    case $cc_basename in
-      CC*)
-	# Sun C++ 4.2, 5.x and Centerline C++
-        archive_cmds_need_lc_CXX=yes
-	no_undefined_flag_CXX=' -zdefs'
-	archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	archive_expsym_cmds_CXX='$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'
-
-	hardcode_libdir_flag_spec_CXX='-R$libdir'
-	hardcode_shlibpath_var_CXX=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?)
-	    whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
-	    ;;
-	esac
-	link_all_deplibs_CXX=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.
-	old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
-	;;
-      gcx*)
-	# Green Hills C++ Compiler
-	archive_cmds_CXX='$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.
-	old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-	;;
-      *)
-	# GNU C++ compiler with Solaris linker
-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	  no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
-	  if $CC --version | grep -v '^2\.7' > /dev/null; then
-	    archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-	    archive_expsym_cmds_CXX='$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.
-	    archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-	    archive_expsym_cmds_CXX='$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
-
-	  hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
-	  case $host_os in
-	  solaris2.[0-5] | solaris2.[0-5].*) ;;
-	  *)
-	    whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-	    ;;
-	  esac
-	fi
-	;;
-    esac
-    ;;
-  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-    no_undefined_flag_CXX='${wl}-z,text'
-    archive_cmds_need_lc_CXX=no
-    hardcode_shlibpath_var_CXX=no
-    runpath_var='LD_RUN_PATH'
-
-    case $cc_basename in
-      CC*)
-	archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	;;
-      *)
-	archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_CXX='$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.
-    no_undefined_flag_CXX='${wl}-z,text'
-    allow_undefined_flag_CXX='${wl}-z,nodefs'
-    archive_cmds_need_lc_CXX=no
-    hardcode_shlibpath_var_CXX=no
-    hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-    hardcode_libdir_separator_CXX=':'
-    link_all_deplibs_CXX=yes
-    export_dynamic_flag_spec_CXX='${wl}-Bexport'
-    runpath_var='LD_RUN_PATH'
-
-    case $cc_basename in
-      CC*)
-	archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	;;
-      *)
-	archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_CXX='$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
-	ld_shlibs_CXX=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-    esac
-    ;;
-  vxworks*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  *)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-esac
-{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
-echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
-test "$ld_shlibs_CXX" = no && can_build_shared=no
-
-GCC_CXX="$GXX"
-LD_CXX="$LD"
-
-cat > conftest.$ac_ext <<EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-EOF
-
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; 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 "$compiler_lib_search_path_CXX"; then
-	     compiler_lib_search_path_CXX="${prev}${p}"
-	   else
-	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${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 "$postdeps_CXX"; then
-	   postdeps_CXX="${prev}${p}"
-	 else
-	   postdeps_CXX="${postdeps_CXX} ${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 "$predep_objects_CXX"; then
-	   predep_objects_CXX="$p"
-	 else
-	   predep_objects_CXX="$predep_objects_CXX $p"
-	 fi
-       else
-	 if test -z "$postdep_objects_CXX"; then
-	   postdep_objects_CXX="$p"
-	 else
-	   postdep_objects_CXX="$postdep_objects_CXX $p"
-	 fi
-       fi
-       ;;
-
-    *) ;; # Ignore the rest.
-
-    esac
-  done
-
-  # Clean up.
-  rm -f a.out a.exe
-else
-  echo "libtool.m4: error: problem compiling CXX test program"
-fi
-
-$rm -f confest.$objext
-
-compiler_lib_search_dirs_CXX=
-if test -n "$compiler_lib_search_path_CXX"; then
-  compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
-fi
-
-# PORTME: override above test on systems where it is broken
-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.
-  predep_objects_CXX=
-  postdep_objects_CXX=
-  postdeps_CXX=
-  ;;
-
-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
-      postdeps_CXX='-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
-      postdeps_CXX='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-esac
-
-case " $postdeps_CXX " in
-*" -lc "*) archive_cmds_need_lc_CXX=no ;;
-esac
-
-lt_prog_compiler_wl_CXX=
-lt_prog_compiler_pic_CXX=
-lt_prog_compiler_static_CXX=
-
-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
-
-  # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
-    lt_prog_compiler_wl_CXX='-Wl,'
-    lt_prog_compiler_static_CXX='-static'
-
-    case $host_os in
-    aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static_CXX='-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_prog_compiler_pic_CXX='-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
-      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic_CXX='-fno-common'
-      ;;
-    *djgpp*)
-      # DJGPP does not support shared libraries at all
-      lt_prog_compiler_pic_CXX=
-      ;;
-    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_prog_compiler_pic_CXX=-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_prog_compiler_pic_CXX='-fPIC'
-	;;
-      esac
-      ;;
-    *)
-      lt_prog_compiler_pic_CXX='-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_prog_compiler_static_CXX='-Bstatic'
-	else
-	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
-	fi
-	;;
-      chorus*)
-	case $cc_basename in
-	cxch68*)
-	  # Green Hills C++ Compiler
-	  # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--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_prog_compiler_pic_CXX='-qnocommon'
-           lt_prog_compiler_wl_CXX='-Wl,'
-           ;;
-         esac
-       ;;
-      dgux*)
-	case $cc_basename in
-	  ec++*)
-	    lt_prog_compiler_pic_CXX='-KPIC'
-	    ;;
-	  ghcx*)
-	    # Green Hills C++ Compiler
-	    lt_prog_compiler_pic_CXX='-pic'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      freebsd* | dragonfly*)
-	# FreeBSD uses GNU C++
-	;;
-      hpux9* | hpux10* | hpux11*)
-	case $cc_basename in
-	  CC*)
-	    lt_prog_compiler_wl_CXX='-Wl,'
-	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
-	    if test "$host_cpu" != ia64; then
-	      lt_prog_compiler_pic_CXX='+Z'
-	    fi
-	    ;;
-	  aCC*)
-	    lt_prog_compiler_wl_CXX='-Wl,'
-	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
-	    case $host_cpu in
-	    hppa*64*|ia64*)
-	      # +Z the default
-	      ;;
-	    *)
-	      lt_prog_compiler_pic_CXX='+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_prog_compiler_wl_CXX='-Wl,'
-	    lt_prog_compiler_static_CXX='-non_shared'
-	    # CC pic flag -KPIC is the default.
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      linux* | k*bsd*-gnu)
-	case $cc_basename in
-	  KCC*)
-	    # KAI C++ Compiler
-	    lt_prog_compiler_wl_CXX='--backend -Wl,'
-	    lt_prog_compiler_pic_CXX='-fPIC'
-	    ;;
-	  icpc* | ecpc*)
-	    # Intel C++
-	    lt_prog_compiler_wl_CXX='-Wl,'
-	    lt_prog_compiler_pic_CXX='-KPIC'
-	    lt_prog_compiler_static_CXX='-static'
-	    ;;
-	  pgCC* | pgcpp*)
-	    # Portland Group C++ compiler.
-	    lt_prog_compiler_wl_CXX='-Wl,'
-	    lt_prog_compiler_pic_CXX='-fpic'
-	    lt_prog_compiler_static_CXX='-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_prog_compiler_pic_CXX=
-	    lt_prog_compiler_static_CXX='-non_shared'
-	    ;;
-	  *)
-	    case `$CC -V 2>&1 | sed 5q` in
-	    *Sun\ C*)
-	      # Sun C++ 5.9
-	      lt_prog_compiler_pic_CXX='-KPIC'
-	      lt_prog_compiler_static_CXX='-Bstatic'
-	      lt_prog_compiler_wl_CXX='-Qoption ld '
-	      ;;
-	    esac
-	    ;;
-	esac
-	;;
-      lynxos*)
-	;;
-      m88k*)
-	;;
-      mvs*)
-	case $cc_basename in
-	  cxx*)
-	    lt_prog_compiler_pic_CXX='-W c,exportall'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      netbsd* | netbsdelf*-gnu)
-	;;
-      osf3* | osf4* | osf5*)
-	case $cc_basename in
-	  KCC*)
-	    lt_prog_compiler_wl_CXX='--backend -Wl,'
-	    ;;
-	  RCC*)
-	    # Rational C++ 2.4.1
-	    lt_prog_compiler_pic_CXX='-pic'
-	    ;;
-	  cxx*)
-	    # Digital/Compaq C++
-	    lt_prog_compiler_wl_CXX='-Wl,'
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    lt_prog_compiler_pic_CXX=
-	    lt_prog_compiler_static_CXX='-non_shared'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      psos*)
-	;;
-      solaris*)
-	case $cc_basename in
-	  CC*)
-	    # Sun C++ 4.2, 5.x and Centerline C++
-	    lt_prog_compiler_pic_CXX='-KPIC'
-	    lt_prog_compiler_static_CXX='-Bstatic'
-	    lt_prog_compiler_wl_CXX='-Qoption ld '
-	    ;;
-	  gcx*)
-	    # Green Hills C++ Compiler
-	    lt_prog_compiler_pic_CXX='-PIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      sunos4*)
-	case $cc_basename in
-	  CC*)
-	    # Sun C++ 4.x
-	    lt_prog_compiler_pic_CXX='-pic'
-	    lt_prog_compiler_static_CXX='-Bstatic'
-	    ;;
-	  lcc*)
-	    # Lucid
-	    lt_prog_compiler_pic_CXX='-pic'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      tandem*)
-	case $cc_basename in
-	  NCC*)
-	    # NonStop-UX NCC 3.20
-	    lt_prog_compiler_pic_CXX='-KPIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-	case $cc_basename in
-	  CC*)
-	    lt_prog_compiler_wl_CXX='-Wl,'
-	    lt_prog_compiler_pic_CXX='-KPIC'
-	    lt_prog_compiler_static_CXX='-Bstatic'
-	    ;;
-	esac
-	;;
-      vxworks*)
-	;;
-      *)
-	lt_prog_compiler_can_build_shared_CXX=no
-	;;
-    esac
-  fi
-
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; }
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic_CXX"; then
-
-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_pic_works_CXX=no
-  ac_outfile=conftest.$ac_objext
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
-   # 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:12737: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:12741: \$? = $ac_status" >&5
-   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
-       lt_cv_prog_compiler_pic_works_CXX=yes
-     fi
-   fi
-   $rm conftest*
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; }
-
-if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
-    case $lt_prog_compiler_pic_CXX in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
-     esac
-else
-    lt_prog_compiler_pic_CXX=
-     lt_prog_compiler_can_build_shared_CXX=no
-fi
-
-fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic_CXX=
-    ;;
-  *)
-    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
-    ;;
-esac
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_static_works_CXX=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   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>&5
-       $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
-         lt_cv_prog_compiler_static_works_CXX=yes
-       fi
-     else
-       lt_cv_prog_compiler_static_works_CXX=yes
-     fi
-   fi
-   $rm -r conftest*
-   LDFLAGS="$save_LDFLAGS"
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; }
-
-if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
-    :
-else
-    lt_prog_compiler_static_CXX=
-fi
-
-
-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_c_o_CXX=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:12841: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:12845: \$? = $ac_status" >&5
-   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_cv_prog_compiler_c_o_CXX=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $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*
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; }
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  { echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
-
-  export_symbols_cmds_CXX='$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
-      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-    else
-      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-    fi
-    ;;
-  pw32*)
-    export_symbols_cmds_CXX="$ltdll_cmds"
-  ;;
-  cygwin* | mingw*)
-    export_symbols_cmds_CXX='$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'
-  ;;
-  linux* | k*bsd*-gnu)
-    link_all_deplibs_CXX=no
-  ;;
-  *)
-    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  esac
-  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
-
-{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
-echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
-test "$ld_shlibs_CXX" = no && can_build_shared=no
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_CXX" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc_CXX=yes
-
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds_CXX 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.
-      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
-      $rm conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl_CXX
-	pic_flag=$lt_prog_compiler_pic_CXX
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
-        allow_undefined_flag_CXX=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-        then
-	  archive_cmds_need_lc_CXX=no
-        else
-	  archive_cmds_need_lc_CXX=yes
-        fi
-        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $rm conftest*
-      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; }
-      ;;
-    esac
-  fi
-  ;;
-esac
-
-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
-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"
-
-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`'
-
-  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'
-  ;;
-
-netbsdelf*-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
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_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
-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
-fi
-
-sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
-fi
-
-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
-
-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
-hardcode_action_CXX=
-if test -n "$hardcode_libdir_flag_spec_CXX" || \
-   test -n "$runpath_var_CXX" || \
-   test "X$hardcode_automatic_CXX" = "Xyes" ; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct_CXX" != 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, CXX)" != no &&
-     test "$hardcode_minus_L_CXX" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action_CXX=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action_CXX=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action_CXX=unsupported
-fi
-{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
-echo "${ECHO_T}$hardcode_action_CXX" >&6; }
-
-if test "$hardcode_action_CXX" = 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
-
-
-# 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 \
-    compiler_CXX \
-    CC_CXX \
-    LD_CXX \
-    lt_prog_compiler_wl_CXX \
-    lt_prog_compiler_pic_CXX \
-    lt_prog_compiler_static_CXX \
-    lt_prog_compiler_no_builtin_flag_CXX \
-    export_dynamic_flag_spec_CXX \
-    thread_safe_flag_spec_CXX \
-    whole_archive_flag_spec_CXX \
-    enable_shared_with_static_runtimes_CXX \
-    old_archive_cmds_CXX \
-    old_archive_from_new_cmds_CXX \
-    predep_objects_CXX \
-    postdep_objects_CXX \
-    predeps_CXX \
-    postdeps_CXX \
-    compiler_lib_search_path_CXX \
-    compiler_lib_search_dirs_CXX \
-    archive_cmds_CXX \
-    archive_expsym_cmds_CXX \
-    postinstall_cmds_CXX \
-    postuninstall_cmds_CXX \
-    old_archive_from_expsyms_cmds_CXX \
-    allow_undefined_flag_CXX \
-    no_undefined_flag_CXX \
-    export_symbols_cmds_CXX \
-    hardcode_libdir_flag_spec_CXX \
-    hardcode_libdir_flag_spec_ld_CXX \
-    hardcode_libdir_separator_CXX \
-    hardcode_automatic_CXX \
-    module_cmds_CXX \
-    module_expsym_cmds_CXX \
-    lt_cv_prog_compiler_c_o_CXX \
-    fix_srcfile_path_CXX \
-    exclude_expsyms_CXX \
-    include_expsyms_CXX; do
-
-    case $var in
-    old_archive_cmds_CXX | \
-    old_archive_from_new_cmds_CXX | \
-    archive_cmds_CXX | \
-    archive_expsym_cmds_CXX | \
-    module_cmds_CXX | \
-    module_expsym_cmds_CXX | \
-    old_archive_from_expsyms_cmds_CXX | \
-    export_symbols_cmds_CXX | \
-    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
-
-cfgfile="$ofile"
-
-  cat <<__EOF__ >> "$cfgfile"
-# ### 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=$archive_cmds_need_lc_CXX
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
-
-# 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_compiler_CXX
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_CXX
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_LD_CXX
-
-# 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_prog_compiler_wl_CXX
-
-# 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_prog_compiler_pic_CXX
-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_cv_prog_compiler_c_o_CXX
-
-# 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_prog_compiler_static_CXX
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
-
-# 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_old_archive_cmds_CXX
-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_old_archive_from_new_cmds_CXX
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_CXX
-archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
-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_module_cmds_CXX
-module_expsym_cmds=$lt_module_expsym_cmds_CXX
-
-# 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_predep_objects_CXX
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_CXX
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_CXX
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_CXX
-
-# The directories searched by this compiler when creating a shared
-# library
-compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
-
-# 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_allow_undefined_flag_CXX
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_CXX
-
-# 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=$hardcode_action_CXX
-
-# 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_hardcode_libdir_flag_spec_CXX
-
-# 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_hardcode_libdir_flag_spec_ld_CXX
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_CXX
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_CXX
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
-
-# 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=$hardcode_automatic_CXX
-
-# 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=$link_all_deplibs_CXX
-
-# 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=$always_export_symbols_CXX
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_CXX
-
-# 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_exclude_expsyms_CXX
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_CXX
-
-# ### END LIBTOOL TAG CONFIG: $tagname
-
-__EOF__
-
-
-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_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-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
-
-	else
-	  tagname=""
-	fi
-	;;
-
-      F77)
-	if test -n "$F77" && test "X$F77" != "Xno"; then
-
-ac_ext=f
-ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
-ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_f77_compiler_gnu
-
-
-archive_cmds_need_lc_F77=no
-allow_undefined_flag_F77=
-always_export_symbols_F77=no
-archive_expsym_cmds_F77=
-export_dynamic_flag_spec_F77=
-hardcode_direct_F77=no
-hardcode_libdir_flag_spec_F77=
-hardcode_libdir_flag_spec_ld_F77=
-hardcode_libdir_separator_F77=
-hardcode_minus_L_F77=no
-hardcode_automatic_F77=no
-module_cmds_F77=
-module_expsym_cmds_F77=
-link_all_deplibs_F77=unknown
-old_archive_cmds_F77=$old_archive_cmds
-no_undefined_flag_F77=
-whole_archive_flag_spec_F77=
-enable_shared_with_static_runtimes_F77=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-objext_F77=$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.
-
-# 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
-
-
-# save warnings/boilerplate of simple test code
-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*
-
-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*
-
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${F77-"f77"}
-compiler=$CC
-compiler_F77=$CC
-for cc_temp in $compiler""; 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-%%"`
-
-
-{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6; }
-
-{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-aix[4-9]*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-  ;;
-esac
-{ echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6; }
-
-{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-{ echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6; }
-
-GCC_F77="$G77"
-LD_F77="$LD"
-
-lt_prog_compiler_wl_F77=
-lt_prog_compiler_pic_F77=
-lt_prog_compiler_static_F77=
-
-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
-
-  if test "$GCC" = yes; then
-    lt_prog_compiler_wl_F77='-Wl,'
-    lt_prog_compiler_static_F77='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static_F77='-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_prog_compiler_pic_F77='-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
-      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic_F77='-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_prog_compiler_can_build_shared_F77=no
-      enable_shared=no
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	lt_prog_compiler_pic_F77=-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_prog_compiler_pic_F77='-fPIC'
-	;;
-      esac
-      ;;
-
-    *)
-      lt_prog_compiler_pic_F77='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static_F77='-Bstatic'
-      else
-	lt_prog_compiler_static_F77='-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_prog_compiler_pic_F77='-qnocommon'
-         lt_prog_compiler_wl_F77='-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).
-      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl_F77='-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_prog_compiler_pic_F77='+Z'
-	;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static_F77='-non_shared'
-      ;;
-
-    newsos6)
-      lt_prog_compiler_pic_F77='-KPIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
-
-    linux* | k*bsd*-gnu)
-      case $cc_basename in
-      icc* | ecc*)
-	lt_prog_compiler_wl_F77='-Wl,'
-	lt_prog_compiler_pic_F77='-KPIC'
-	lt_prog_compiler_static_F77='-static'
-        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-	# which looks to be a dead project)
-	lt_prog_compiler_wl_F77='-Wl,'
-	lt_prog_compiler_pic_F77='-fpic'
-	lt_prog_compiler_static_F77='-Bstatic'
-        ;;
-      ccc*)
-        lt_prog_compiler_wl_F77='-Wl,'
-        # All Alpha code is PIC.
-        lt_prog_compiler_static_F77='-non_shared'
-        ;;
-      *)
-        case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ C*)
-	  # Sun C 5.9
-	  lt_prog_compiler_pic_F77='-KPIC'
-	  lt_prog_compiler_static_F77='-Bstatic'
-	  lt_prog_compiler_wl_F77='-Wl,'
-	  ;;
-	*Sun\ F*)
-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
-	  lt_prog_compiler_pic_F77='-KPIC'
-	  lt_prog_compiler_static_F77='-Bstatic'
-	  lt_prog_compiler_wl_F77=''
-	  ;;
-	esac
-	;;
-      esac
-      ;;
-
-    osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      # All OSF/1 code is PIC.
-      lt_prog_compiler_static_F77='-non_shared'
-      ;;
-
-    rdos*)
-      lt_prog_compiler_static_F77='-non_shared'
-      ;;
-
-    solaris*)
-      lt_prog_compiler_pic_F77='-KPIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-	lt_prog_compiler_wl_F77='-Qoption ld ';;
-      *)
-	lt_prog_compiler_wl_F77='-Wl,';;
-      esac
-      ;;
-
-    sunos4*)
-      lt_prog_compiler_wl_F77='-Qoption ld '
-      lt_prog_compiler_pic_F77='-PIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      lt_prog_compiler_pic_F77='-KPIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-	lt_prog_compiler_pic_F77='-Kconform_pic'
-	lt_prog_compiler_static_F77='-Bstatic'
-      fi
-      ;;
-
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      lt_prog_compiler_pic_F77='-KPIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
-
-    unicos*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      lt_prog_compiler_can_build_shared_F77=no
-      ;;
-
-    uts4*)
-      lt_prog_compiler_pic_F77='-pic'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
-
-    *)
-      lt_prog_compiler_can_build_shared_F77=no
-      ;;
-    esac
-  fi
-
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; }
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic_F77"; then
-
-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_pic_works_F77=no
-  ac_outfile=conftest.$ac_objext
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_F77"
-   # 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:14439: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:14443: \$? = $ac_status" >&5
-   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
-       lt_cv_prog_compiler_pic_works_F77=yes
-     fi
-   fi
-   $rm conftest*
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_F77" >&6; }
-
-if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then
-    case $lt_prog_compiler_pic_F77 in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
-     esac
-else
-    lt_prog_compiler_pic_F77=
-     lt_prog_compiler_can_build_shared_F77=no
-fi
-
-fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic_F77=
-    ;;
-  *)
-    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
-    ;;
-esac
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_static_works_F77=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   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>&5
-       $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
-         lt_cv_prog_compiler_static_works_F77=yes
-       fi
-     else
-       lt_cv_prog_compiler_static_works_F77=yes
-     fi
-   fi
-   $rm -r conftest*
-   LDFLAGS="$save_LDFLAGS"
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_static_works_F77" >&6; }
-
-if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then
-    :
-else
-    lt_prog_compiler_static_F77=
-fi
-
-
-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_c_o_F77=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:14543: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:14547: \$? = $ac_status" >&5
-   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_cv_prog_compiler_c_o_F77=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $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*
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; }
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  { echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
-
-  runpath_var=
-  allow_undefined_flag_F77=
-  enable_shared_with_static_runtimes_F77=no
-  archive_cmds_F77=
-  archive_expsym_cmds_F77=
-  old_archive_From_new_cmds_F77=
-  old_archive_from_expsyms_cmds_F77=
-  export_dynamic_flag_spec_F77=
-  whole_archive_flag_spec_F77=
-  thread_safe_flag_spec_F77=
-  hardcode_libdir_flag_spec_F77=
-  hardcode_libdir_flag_spec_ld_F77=
-  hardcode_libdir_separator_F77=
-  hardcode_direct_F77=no
-  hardcode_minus_L_F77=no
-  hardcode_shlibpath_var_F77=unsupported
-  link_all_deplibs_F77=unknown
-  hardcode_automatic_F77=no
-  module_cmds_F77=
-  module_expsym_cmds_F77=
-  always_export_symbols_F77=no
-  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  include_expsyms_F77=
-  # 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'.
-  exclude_expsyms_F77='_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.
-  extract_expsyms_cmds=
-  # Just being paranoid about ensuring that cc_basename is set.
-  for cc_temp in $compiler""; 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-%%"`
-
-  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
-
-  ld_shlibs_F77=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
-    hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec_F77='${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
-	whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-  	whole_archive_flag_spec_F77=
-    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
-	ld_shlibs_F77=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*)
-      archive_cmds_F77='$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)'
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_minus_L_F77=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.
-      ld_shlibs_F77=no
-      ;;
-
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	allow_undefined_flag_F77=unsupported
-	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
-	# support --undefined.  This deserves some investigation.  FIXME
-	archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-	ld_shlibs_F77=no
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
-      # as there is no search path for DLLs.
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      allow_undefined_flag_F77=unsupported
-      always_export_symbols_F77=no
-      enable_shared_with_static_runtimes_F77=yes
-      export_symbols_cmds_F77='$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
-        archive_cmds_F77='$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...
-	archive_expsym_cmds_F77='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
-	ld_shlibs_F77=no
-      fi
-      ;;
-
-    interix[3-9]*)
-      hardcode_direct_F77=no
-      hardcode_shlibpath_var_F77=no
-      hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec_F77='${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.
-      archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds_F77='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
-	  whole_archive_flag_spec_F77='${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
-	  whole_archive_flag_spec_F77='${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
-	  whole_archive_flag_spec_F77='${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
-	archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
-	if test $supports_anon_versioning = yes; then
-	  archive_expsym_cmds_F77='$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
-	link_all_deplibs_F77=no
-      else
-	ld_shlibs_F77=no
-      fi
-      ;;
-
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-	wlarc=
-      else
-	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_F77='$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
-	ld_shlibs_F77=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
-	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	ld_shlibs_F77=no
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-	ld_shlibs_F77=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
-	    hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-	    archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
-	    archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
-	  else
-	    ld_shlibs_F77=no
-	  fi
-	;;
-      esac
-      ;;
-
-    sunos4*)
-      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	ld_shlibs_F77=no
-      fi
-      ;;
-    esac
-
-    if test "$ld_shlibs_F77" = no; then
-      runpath_var=
-      hardcode_libdir_flag_spec_F77=
-      export_dynamic_flag_spec_F77=
-      whole_archive_flag_spec_F77=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      allow_undefined_flag_F77=unsupported
-      always_export_symbols_F77=yes
-      archive_expsym_cmds_F77='$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.
-      hardcode_minus_L_F77=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-	# Neither direct hardcoding nor static linking is supported with a
-	# broken collect2.
-	hardcode_direct_F77=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
-	  export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-	else
-	  export_symbols_cmds_F77='$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.
-
-      archive_cmds_F77=''
-      hardcode_direct_F77=yes
-      hardcode_libdir_separator_F77=':'
-      link_all_deplibs_F77=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
-  	  hardcode_direct_F77=unsupported
-  	  # It fails to find uninstalled libraries when the uninstalled
-  	  # path is not listed in the libpath.  Setting hardcode_minus_L
-  	  # to unsupported forces relinking
-  	  hardcode_minus_L_F77=yes
-  	  hardcode_libdir_flag_spec_F77='-L$libdir'
-  	  hardcode_libdir_separator_F77=
-	  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.
-      always_export_symbols_F77=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.
-	allow_undefined_flag_F77='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       cat >conftest.$ac_ext <<_ACEOF
-      program main
-
-      end
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_f77_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-
-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
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
-       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
-	archive_expsym_cmds_F77="\$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
-	  hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
-	  allow_undefined_flag_F77="-z nodefs"
-	  archive_expsym_cmds_F77="\$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.
-	 cat >conftest.$ac_ext <<_ACEOF
-      program main
-
-      end
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_f77_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-
-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
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
-	 hardcode_libdir_flag_spec_F77='${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.
-	  no_undefined_flag_F77=' ${wl}-bernotok'
-	  allow_undefined_flag_F77=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  whole_archive_flag_spec_F77='$convenience'
-	  archive_cmds_need_lc_F77=yes
-	  # This is similar to how AIX traditionally builds its shared libraries.
-	  archive_expsym_cmds_F77="\$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*)
-      archive_cmds_F77='$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)'
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_minus_L_F77=yes
-      # see comment about different semantics on the GNU ld section
-      ld_shlibs_F77=no
-      ;;
-
-    bsdi[45]*)
-      export_dynamic_flag_spec_F77=-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.
-      hardcode_libdir_flag_spec_F77=' '
-      allow_undefined_flag_F77=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.
-      archive_cmds_F77='$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.
-      old_archive_From_new_cmds_F77='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes_F77=yes
-      ;;
-
-    darwin* | rhapsody*)
-      case $host_os in
-        rhapsody* | darwin1.[012])
-         allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[012])
-               allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-      esac
-      archive_cmds_need_lc_F77=no
-      hardcode_direct_F77=no
-      hardcode_automatic_F77=yes
-      hardcode_shlibpath_var_F77=unsupported
-      whole_archive_flag_spec_F77=''
-      link_all_deplibs_F77=yes
-    if test "$GCC" = yes ; then
-    	output_verbose_link_cmd='echo'
-        archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-        module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-        archive_expsym_cmds_F77="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}"
-        module_expsym_cmds_F77="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'
-         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
-         module_cmds_F77='$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
-         archive_expsym_cmds_F77='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}'
-          module_expsym_cmds_F77='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}'
-          ;;
-       *)
-         ld_shlibs_F77=no
-          ;;
-      esac
-    fi
-      ;;
-
-    dgux*)
-      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    freebsd1*)
-      ld_shlibs_F77=no
-      ;;
-
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_F77=yes
-      hardcode_minus_L_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
-      archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    hpux9*)
-      if test "$GCC" = yes; then
-	archive_cmds_F77='$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
-	archive_cmds_F77='$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
-      hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator_F77=:
-      hardcode_direct_F77=yes
-
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L_F77=yes
-      export_dynamic_flag_spec_F77='${wl}-E'
-      ;;
-
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
-	hardcode_libdir_separator_F77=:
-
-	hardcode_direct_F77=yes
-	export_dynamic_flag_spec_F77='${wl}-E'
-
-	# hardcode_minus_L: Not really in the search PATH,
-	# but as the default location of the library.
-	hardcode_minus_L_F77=yes
-      fi
-      ;;
-
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	case $host_cpu in
-	hppa*64*)
-	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  archive_cmds_F77='$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*)
-	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  archive_cmds_F77='$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
-	hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
-	hardcode_libdir_separator_F77=:
-
-	case $host_cpu in
-	hppa*64*|ia64*)
-	  hardcode_libdir_flag_spec_ld_F77='+b $libdir'
-	  hardcode_direct_F77=no
-	  hardcode_shlibpath_var_F77=no
-	  ;;
-	*)
-	  hardcode_direct_F77=yes
-	  export_dynamic_flag_spec_F77='${wl}-E'
-
-	  # hardcode_minus_L: Not really in the search PATH,
-	  # but as the default location of the library.
-	  hardcode_minus_L_F77=yes
-	  ;;
-	esac
-      fi
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	archive_cmds_F77='$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
-	archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
-      fi
-      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_F77=:
-      link_all_deplibs_F77=yes
-      ;;
-
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-	archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    newsos6)
-      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_F77=yes
-      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_F77=:
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    openbsd*)
-      if test -f /usr/libexec/ld.so; then
-	hardcode_direct_F77=yes
-	hardcode_shlibpath_var_F77=no
-	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	  archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	  archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	  hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-	  export_dynamic_flag_spec_F77='${wl}-E'
-	else
-	  case $host_os in
-	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-	     archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	     hardcode_libdir_flag_spec_F77='-R$libdir'
-	     ;;
-	   *)
-	     archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	     hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-	     ;;
-	  esac
-        fi
-      else
-	ld_shlibs_F77=no
-      fi
-      ;;
-
-    os2*)
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_minus_L_F77=yes
-      allow_undefined_flag_F77=unsupported
-      archive_cmds_F77='$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'
-      old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
-
-    osf3*)
-      if test "$GCC" = yes; then
-	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_F77='$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
-	allow_undefined_flag_F77=' -expect_unresolved \*'
-	archive_cmds_F77='$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
-      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_F77=:
-      ;;
-
-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_F77='$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'
-	hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-      else
-	allow_undefined_flag_F77=' -expect_unresolved \*'
-	archive_cmds_F77='$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'
-	archive_expsym_cmds_F77='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
-	hardcode_libdir_flag_spec_F77='-rpath $libdir'
-      fi
-      hardcode_libdir_separator_F77=:
-      ;;
-
-    solaris*)
-      no_undefined_flag_F77=' -z text'
-      if test "$GCC" = yes; then
-	wlarc='${wl}'
-	archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_F77='$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=''
-	archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	archive_expsym_cmds_F77='$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
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_shlibpath_var_F77=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
-	  whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-	else
-	  whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract'
-	fi
-	;;
-      esac
-      link_all_deplibs_F77=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.
-	archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_direct_F77=yes
-      hardcode_minus_L_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    sysv4)
-      case $host_vendor in
-	sni)
-	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  hardcode_direct_F77=yes # is this really true???
-	;;
-	siemens)
-	  ## LD is ld it makes a PLAMLIB
-	  ## CC just makes a GrossModule.
-	  archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-	  reload_cmds_F77='$CC -r -o $output$reload_objs'
-	  hardcode_direct_F77=no
-        ;;
-	motorola)
-	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
-	;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    sysv4.3*)
-      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var_F77=no
-      export_dynamic_flag_spec_F77='-Bexport'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	hardcode_shlibpath_var_F77=no
-	runpath_var=LD_RUN_PATH
-	hardcode_runpath_var=yes
-	ld_shlibs_F77=yes
-      fi
-      ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      no_undefined_flag_F77='${wl}-z,text'
-      archive_cmds_need_lc_F77=no
-      hardcode_shlibpath_var_F77=no
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-	archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_F77='$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.
-      no_undefined_flag_F77='${wl}-z,text'
-      allow_undefined_flag_F77='${wl}-z,nodefs'
-      archive_cmds_need_lc_F77=no
-      hardcode_shlibpath_var_F77=no
-      hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      hardcode_libdir_separator_F77=':'
-      link_all_deplibs_F77=yes
-      export_dynamic_flag_spec_F77='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-	archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    uts4*)
-      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    *)
-      ld_shlibs_F77=no
-      ;;
-    esac
-  fi
-
-{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
-echo "${ECHO_T}$ld_shlibs_F77" >&6; }
-test "$ld_shlibs_F77" = no && can_build_shared=no
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_F77" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc_F77=yes
-
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds_F77 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.
-      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
-      $rm conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl_F77
-	pic_flag=$lt_prog_compiler_pic_F77
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
-        allow_undefined_flag_F77=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-        then
-	  archive_cmds_need_lc_F77=no
-        else
-	  archive_cmds_need_lc_F77=yes
-        fi
-        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $rm conftest*
-      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; }
-      ;;
-    esac
-  fi
-  ;;
-esac
-
-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
-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"
-
-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`'
-
-  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'
-  ;;
-
-netbsdelf*-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
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_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
-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
-fi
-
-sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
-fi
-
-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
-
-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
-hardcode_action_F77=
-if test -n "$hardcode_libdir_flag_spec_F77" || \
-   test -n "$runpath_var_F77" || \
-   test "X$hardcode_automatic_F77" = "Xyes" ; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct_F77" != 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, F77)" != no &&
-     test "$hardcode_minus_L_F77" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action_F77=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action_F77=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action_F77=unsupported
-fi
-{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
-echo "${ECHO_T}$hardcode_action_F77" >&6; }
-
-if test "$hardcode_action_F77" = 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
-
-
-# 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 \
-    compiler_F77 \
-    CC_F77 \
-    LD_F77 \
-    lt_prog_compiler_wl_F77 \
-    lt_prog_compiler_pic_F77 \
-    lt_prog_compiler_static_F77 \
-    lt_prog_compiler_no_builtin_flag_F77 \
-    export_dynamic_flag_spec_F77 \
-    thread_safe_flag_spec_F77 \
-    whole_archive_flag_spec_F77 \
-    enable_shared_with_static_runtimes_F77 \
-    old_archive_cmds_F77 \
-    old_archive_from_new_cmds_F77 \
-    predep_objects_F77 \
-    postdep_objects_F77 \
-    predeps_F77 \
-    postdeps_F77 \
-    compiler_lib_search_path_F77 \
-    compiler_lib_search_dirs_F77 \
-    archive_cmds_F77 \
-    archive_expsym_cmds_F77 \
-    postinstall_cmds_F77 \
-    postuninstall_cmds_F77 \
-    old_archive_from_expsyms_cmds_F77 \
-    allow_undefined_flag_F77 \
-    no_undefined_flag_F77 \
-    export_symbols_cmds_F77 \
-    hardcode_libdir_flag_spec_F77 \
-    hardcode_libdir_flag_spec_ld_F77 \
-    hardcode_libdir_separator_F77 \
-    hardcode_automatic_F77 \
-    module_cmds_F77 \
-    module_expsym_cmds_F77 \
-    lt_cv_prog_compiler_c_o_F77 \
-    fix_srcfile_path_F77 \
-    exclude_expsyms_F77 \
-    include_expsyms_F77; do
-
-    case $var in
-    old_archive_cmds_F77 | \
-    old_archive_from_new_cmds_F77 | \
-    archive_cmds_F77 | \
-    archive_expsym_cmds_F77 | \
-    module_cmds_F77 | \
-    module_expsym_cmds_F77 | \
-    old_archive_from_expsyms_cmds_F77 | \
-    export_symbols_cmds_F77 | \
-    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
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
 
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
-
-cfgfile="$ofile"
-
-  cat <<__EOF__ >> "$cfgfile"
-# ### 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=$archive_cmds_need_lc_F77
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
-
-# 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_compiler_F77
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_F77
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_LD_F77
-
-# 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_prog_compiler_wl_F77
-
-# 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_prog_compiler_pic_F77
-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_cv_prog_compiler_c_o_F77
-
-# 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_prog_compiler_static_F77
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
-
-# 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_old_archive_cmds_F77
-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_old_archive_from_new_cmds_F77
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_F77
-archive_expsym_cmds=$lt_archive_expsym_cmds_F77
-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_module_cmds_F77
-module_expsym_cmds=$lt_module_expsym_cmds_F77
-
-# 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_predep_objects_F77
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_F77
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_F77
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_F77
-
-# The directories searched by this compiler when creating a shared
-# library
-compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_F77
-
-# 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_allow_undefined_flag_F77
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_F77
-
-# 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=$hardcode_action_F77
-
-# 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_hardcode_libdir_flag_spec_F77
-
-# 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_hardcode_libdir_flag_spec_ld_F77
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_F77
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_F77
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
-
-# 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=$hardcode_automatic_F77
-
-# 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=$link_all_deplibs_F77
-
-# 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=$always_export_symbols_F77
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_F77
-
-# 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_exclude_expsyms_F77
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_F77
-
-# ### END LIBTOOL TAG CONFIG: $tagname
-
-__EOF__
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
-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"
+  else
+    MAGIC_CMD=:
   fi
 fi
 
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
 
+lt_save_CC="$CC"
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-CC="$lt_save_CC"
-
-	else
-	  tagname=""
-	fi
-	;;
-
-      GCJ)
-	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
-
 
-# Source file extension for Java test sources.
-ac_ext=java
+# Source file extension for C test sources.
+ac_ext=c
 
-# Object file extension for compiled Java test sources.
+# Object file extension for compiled C test sources.
 objext=o
-objext_GCJ=$objext
+objext=$objext
 
 # Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
+lt_simple_compile_test_code="int some_variable = 0;"
 
 # Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
 
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
 # If no C compiler was specified, use CC.
 LTCC=${LTCC-"$CC"}
@@ -16699,56 +7217,38 @@ LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 # Allow CC to be a program name with arguments.
 compiler=$CC
 
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
 
 # save warnings/boilerplate of simple test code
 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*
+$RM conftest*
 
 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*
-
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-compiler=$CC
-compiler_GCJ=$CC
-for cc_temp in $compiler""; 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-%%"`
+$RM -r conftest*
 
 
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-archive_cmds_need_lc_GCJ=no
+if test -n "$compiler"; then
 
-old_archive_cmds_GCJ=$old_archive_cmds
-
-
-lt_prog_compiler_no_builtin_flag_GCJ=
+lt_prog_compiler_no_builtin_flag=
 
 if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
-
+  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
 
-{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_rtti_exceptions=no
-  ac_outfile=conftest.$ac_objext
+   ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
    lt_compiler_flag="-fno-rtti -fno-exceptions"
    # Insert the option either (1) after the last *FLAGS variable, or
@@ -16760,77 +7260,104 @@ else
    -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:16763: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7263: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16767: \$? = $ac_status" >&5
+   echo "$as_me:7267: \$? = $ac_status" >&5
    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
+     $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
        lt_cv_prog_compiler_rtti_exceptions=yes
      fi
    fi
-   $rm conftest*
+   $RM conftest*
 
 fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
 
 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
-    lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
 else
     :
 fi
 
 fi
 
-lt_prog_compiler_wl_GCJ=
-lt_prog_compiler_pic_GCJ=
-lt_prog_compiler_static_GCJ=
 
-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+
+
+
+
+  lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 
   if test "$GCC" = yes; then
-    lt_prog_compiler_wl_GCJ='-Wl,'
-    lt_prog_compiler_static_GCJ='-static'
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
 
     case $host_os in
       aix*)
       # All AIX code is PIC.
       if test "$host_cpu" = ia64; then
 	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static_GCJ='-Bstatic'
+	lt_prog_compiler_static='-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_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic='-fPIC'
+        ;;
+      m68k)
+            # 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_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
       ;;
 
     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
       # PIC is the default for these OSes.
       ;;
 
-    mingw* | cygwin* | pw32* | os2*)
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
       # 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
-
+      lt_prog_compiler_pic='-DDLL_EXPORT'
       ;;
 
     darwin* | rhapsody*)
       # PIC is the default on this platform
       # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic_GCJ='-fno-common'
+      lt_prog_compiler_pic='-fno-common'
+      ;;
+
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='-fPIC'
+	;;
+      esac
       ;;
 
     interix[3-9]*)
@@ -16841,64 +7368,47 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
     msdosdjgpp*)
       # Just because we use GCC doesn't mean we suddenly get shared libraries
       # on systems that don't support them.
-      lt_prog_compiler_can_build_shared_GCJ=no
+      lt_prog_compiler_can_build_shared=no
       enable_shared=no
       ;;
 
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
     sysv4*MP*)
       if test -d /usr/nec; then
-	lt_prog_compiler_pic_GCJ=-Kconform_pic
+	lt_prog_compiler_pic=-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_prog_compiler_pic_GCJ='-fPIC'
-	;;
-      esac
-      ;;
-
     *)
-      lt_prog_compiler_pic_GCJ='-fPIC'
+      lt_prog_compiler_pic='-fPIC'
       ;;
     esac
   else
     # PORTME Check for flag to pass linker flags through the system compiler.
     case $host_os in
     aix*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_wl='-Wl,'
       if test "$host_cpu" = ia64; then
 	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static_GCJ='-Bstatic'
+	lt_prog_compiler_static='-Bstatic'
       else
-	lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
+	lt_prog_compiler_static='-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_prog_compiler_pic_GCJ='-qnocommon'
-         lt_prog_compiler_wl_GCJ='-Wl,'
-         ;;
-       esac
-       ;;
 
-    mingw* | cygwin* | pw32* | os2*)
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
       # 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).
-
+      lt_prog_compiler_pic='-DDLL_EXPORT'
       ;;
 
     hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_wl='-Wl,'
       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
       # not for PA HP-UX.
       case $host_cpu in
@@ -16906,141 +7416,180 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
 	# +Z the default
 	;;
       *)
-	lt_prog_compiler_pic_GCJ='+Z'
+	lt_prog_compiler_pic='+Z'
 	;;
       esac
       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
       ;;
 
     irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_wl='-Wl,'
       # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static_GCJ='-non_shared'
-      ;;
-
-    newsos6)
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
+      lt_prog_compiler_static='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
       case $cc_basename in
-      icc* | ecc*)
-	lt_prog_compiler_wl_GCJ='-Wl,'
-	lt_prog_compiler_pic_GCJ='-KPIC'
-	lt_prog_compiler_static_GCJ='-static'
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-KPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fPIC'
+	lt_prog_compiler_static='-static'
         ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='--shared'
+	lt_prog_compiler_static='--static'
+	;;
       pgcc* | pgf77* | pgf90* | pgf95*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
 	# which looks to be a dead project)
-	lt_prog_compiler_wl_GCJ='-Wl,'
-	lt_prog_compiler_pic_GCJ='-fpic'
-	lt_prog_compiler_static_GCJ='-Bstatic'
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fpic'
+	lt_prog_compiler_static='-Bstatic'
         ;;
       ccc*)
-        lt_prog_compiler_wl_GCJ='-Wl,'
+        lt_prog_compiler_wl='-Wl,'
         # All Alpha code is PIC.
-        lt_prog_compiler_static_GCJ='-non_shared'
+        lt_prog_compiler_static='-non_shared'
         ;;
+      xl*)
+	# IBM XL C 8.0/Fortran 10.1 on PPC
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-qpic'
+	lt_prog_compiler_static='-qstaticlink'
+	;;
       *)
-        case `$CC -V 2>&1 | sed 5q` in
+	case `$CC -V 2>&1 | sed 5q` in
 	*Sun\ C*)
 	  # Sun C 5.9
-	  lt_prog_compiler_pic_GCJ='-KPIC'
-	  lt_prog_compiler_static_GCJ='-Bstatic'
-	  lt_prog_compiler_wl_GCJ='-Wl,'
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl='-Wl,'
 	  ;;
 	*Sun\ F*)
 	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
-	  lt_prog_compiler_pic_GCJ='-KPIC'
-	  lt_prog_compiler_static_GCJ='-Bstatic'
-	  lt_prog_compiler_wl_GCJ=''
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl=''
 	  ;;
 	esac
 	;;
       esac
       ;;
 
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
     osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_wl='-Wl,'
       # All OSF/1 code is PIC.
-      lt_prog_compiler_static_GCJ='-non_shared'
+      lt_prog_compiler_static='-non_shared'
       ;;
 
     rdos*)
-      lt_prog_compiler_static_GCJ='-non_shared'
+      lt_prog_compiler_static='-non_shared'
       ;;
 
     solaris*)
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
       case $cc_basename in
       f77* | f90* | f95*)
-	lt_prog_compiler_wl_GCJ='-Qoption ld ';;
+	lt_prog_compiler_wl='-Qoption ld ';;
       *)
-	lt_prog_compiler_wl_GCJ='-Wl,';;
+	lt_prog_compiler_wl='-Wl,';;
       esac
       ;;
 
     sunos4*)
-      lt_prog_compiler_wl_GCJ='-Qoption ld '
-      lt_prog_compiler_pic_GCJ='-PIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
       ;;
 
     sysv4 | sysv4.2uw2* | sysv4.3*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
       ;;
 
     sysv4*MP*)
       if test -d /usr/nec ;then
-	lt_prog_compiler_pic_GCJ='-Kconform_pic'
-	lt_prog_compiler_static_GCJ='-Bstatic'
+	lt_prog_compiler_pic='-Kconform_pic'
+	lt_prog_compiler_static='-Bstatic'
       fi
       ;;
 
     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
       ;;
 
     unicos*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      lt_prog_compiler_can_build_shared_GCJ=no
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
       ;;
 
     uts4*)
-      lt_prog_compiler_pic_GCJ='-pic'
-      lt_prog_compiler_static_GCJ='-Bstatic'
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
       ;;
 
     *)
-      lt_prog_compiler_can_build_shared_GCJ=no
+      lt_prog_compiler_can_build_shared=no
       ;;
     esac
   fi
 
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; }
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
+$as_echo "$lt_prog_compiler_pic" >&6; }
+
+
+
+
+
 
 #
 # Check to make sure the PIC flag actually works.
 #
-if test -n "$lt_prog_compiler_pic_GCJ"; then
-
-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -n "$lt_prog_compiler_pic"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  lt_cv_prog_compiler_pic_works_GCJ=no
-  ac_outfile=conftest.$ac_objext
+  lt_cv_prog_compiler_pic_works=no
+   ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
    # 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
@@ -17050,57 +7599,53 @@ else
    -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:17053: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7602: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17057: \$? = $ac_status" >&5
+   echo "$as_me:7606: \$? = $ac_status" >&5
    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
+     $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
-       lt_cv_prog_compiler_pic_works_GCJ=yes
+       lt_cv_prog_compiler_pic_works=yes
      fi
    fi
-   $rm conftest*
+   $RM conftest*
 
 fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_GCJ" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
 
-if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then
-    case $lt_prog_compiler_pic_GCJ in
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
      "" | " "*) ;;
-     *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
      esac
 else
-    lt_prog_compiler_pic_GCJ=
-     lt_prog_compiler_can_build_shared_GCJ=no
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
 fi
 
 fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic_GCJ=
-    ;;
-  *)
-    lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
-    ;;
-esac
+
+
+
+
+
 
 #
 # Check to make sure the static flag actually works.
 #
-wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if ${lt_cv_prog_compiler_static_works+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  lt_cv_prog_compiler_static_works_GCJ=no
+  lt_cv_prog_compiler_static_works=no
    save_LDFLAGS="$LDFLAGS"
    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
@@ -17110,36 +7655,96 @@ else
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&5
-       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $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
-         lt_cv_prog_compiler_static_works_GCJ=yes
+         lt_cv_prog_compiler_static_works=yes
        fi
      else
-       lt_cv_prog_compiler_static_works_GCJ=yes
+       lt_cv_prog_compiler_static_works=yes
      fi
    fi
-   $rm -r conftest*
+   $RM -r conftest*
    LDFLAGS="$save_LDFLAGS"
 
 fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_static_works_GCJ" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
 
-if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
     :
 else
-    lt_prog_compiler_static_GCJ=
+    lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=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:7707: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:7711: \$? = $ac_status" >&5
+   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_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $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 ..
+   $RM -r conftest
+   $RM conftest*
+
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
 
-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  lt_cv_prog_compiler_c_o_GCJ=no
-   $rm -r conftest 2>/dev/null
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
    mkdir conftest
    cd conftest
    mkdir out
@@ -17154,91 +7759,101 @@ else
    -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:17157: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7762: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17161: \$? = $ac_status" >&5
+   echo "$as_me:7766: \$? = $ac_status" >&5
    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
+     $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_cv_prog_compiler_c_o_GCJ=yes
+       lt_cv_prog_compiler_c_o=yes
      fi
    fi
    chmod u+w . 2>&5
-   $rm conftest*
+   $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
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
    cd ..
-   rmdir conftest
-   $rm conftest*
+   $RM -r conftest
+   $RM conftest*
 
 fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
 
 
 hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
   # do not overwrite the value of need_locks provided by the user
-  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
   hard_links=yes
-  $rm conftest*
+  $RM conftest*
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   touch conftest.a
   ln conftest.a conftest.b 2>&5 || hard_links=no
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  { echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
   if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
     need_locks=warn
   fi
 else
   need_locks=no
 fi
 
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
 
   runpath_var=
-  allow_undefined_flag_GCJ=
-  enable_shared_with_static_runtimes_GCJ=no
-  archive_cmds_GCJ=
-  archive_expsym_cmds_GCJ=
-  old_archive_From_new_cmds_GCJ=
-  old_archive_from_expsyms_cmds_GCJ=
-  export_dynamic_flag_spec_GCJ=
-  whole_archive_flag_spec_GCJ=
-  thread_safe_flag_spec_GCJ=
-  hardcode_libdir_flag_spec_GCJ=
-  hardcode_libdir_flag_spec_ld_GCJ=
-  hardcode_libdir_separator_GCJ=
-  hardcode_direct_GCJ=no
-  hardcode_minus_L_GCJ=no
-  hardcode_shlibpath_var_GCJ=unsupported
-  link_all_deplibs_GCJ=unknown
-  hardcode_automatic_GCJ=no
-  module_cmds_GCJ=
-  module_expsym_cmds_GCJ=
-  always_export_symbols_GCJ=no
-  export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  allow_undefined_flag=
+  always_export_symbols=no
+  archive_cmds=
+  archive_expsym_cmds=
+  compiler_needs_object=no
+  enable_shared_with_static_runtimes=no
+  export_dynamic_flag_spec=
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  hardcode_automatic=no
+  hardcode_direct=no
+  hardcode_direct_absolute=no
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
+  hardcode_libdir_separator=
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  inherit_rpath=no
+  link_all_deplibs=unknown
+  module_cmds=
+  module_expsym_cmds=
+  old_archive_from_new_cmds=
+  old_archive_from_expsyms_cmds=
+  thread_safe_flag_spec=
+  whole_archive_flag_spec=
   # include_expsyms should be a list of space-separated symbols to be *always*
   # included in the symbol list
-  include_expsyms_GCJ=
+  include_expsyms=
   # 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'.
-  exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+  exclude_expsyms='_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
@@ -17246,19 +7861,9 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
   # preloaded symbol tables.
   # Exclude shared library initialization/finalization symbols.
   extract_expsyms_cmds=
-  # Just being paranoid about ensuring that cc_basename is set.
-  for cc_temp in $compiler""; 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-%%"`
 
   case $host_os in
-  cygwin* | mingw* | pw32*)
+  cygwin* | mingw* | pw32* | cegcc*)
     # 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++.
@@ -17273,9 +7878,12 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
   openbsd*)
     with_gnu_ld=no
     ;;
+  linux* | k*bsd*-gnu)
+    link_all_deplibs=no
+    ;;
   esac
 
-  ld_shlibs_GCJ=yes
+  ld_shlibs=yes
   if test "$with_gnu_ld" = yes; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
     wlarc='${wl}'
@@ -17284,16 +7892,17 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
     # are reset later if shared libraries are not supported. Putting them
     # here allows them to be overridden if necessary.
     runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${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
-	whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-  	whole_archive_flag_spec_GCJ=
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec=
     fi
     supports_anon_versioning=no
-    case `$LD -v 2>/dev/null` in
+    case `$LD -v 2>&1` in
+      *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [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 ...
@@ -17306,8 +7915,8 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
     aix[3-9]*)
       # On AIX/PPC, the GNU linker is very broken
       if test "$host_cpu" != ia64; then
-	ld_shlibs_GCJ=no
-	cat <<EOF 1>&2
+	ld_shlibs=no
+	cat <<_LT_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.
@@ -17315,49 +7924,50 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 *** really care for shared libraries, you may want to modify your PATH
 *** so that a non-GNU linker is found, and then restart.
 
-EOF
+_LT_EOF
       fi
       ;;
 
     amigaos*)
-      archive_cmds_GCJ='$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)'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_minus_L_GCJ=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.
-      ld_shlibs_GCJ=no
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$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)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
       ;;
 
     beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	allow_undefined_flag_GCJ=unsupported
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag=unsupported
 	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
 	# support --undefined.  This deserves some investigation.  FIXME
-	archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
       else
-	ld_shlibs_GCJ=no
+	ld_shlibs=no
       fi
       ;;
 
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
       # as there is no search path for DLLs.
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      allow_undefined_flag_GCJ=unsupported
-      always_export_symbols_GCJ=no
-      enable_shared_with_static_runtimes_GCJ=yes
-      export_symbols_cmds_GCJ='$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
-        archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      hardcode_libdir_flag_spec='-L$libdir'
+      allow_undefined_flag=unsupported
+      always_export_symbols=no
+      enable_shared_with_static_runtimes=yes
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        archive_cmds='$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...
-	archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 	  cp $export_symbols $output_objdir/$soname.def;
 	else
 	  echo EXPORTS > $output_objdir/$soname.def;
@@ -17365,80 +7975,109 @@ EOF
 	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
-	ld_shlibs_GCJ=no
+	ld_shlibs=no
       fi
       ;;
 
     interix[3-9]*)
-      hardcode_direct_GCJ=no
-      hardcode_shlibpath_var_GCJ=no
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec_GCJ='${wl}-E'
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${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.
-      archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds_GCJ='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'
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='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
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+	case $cc_basename in
+	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
+	esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+	 && test "$tmp_diet" = no
+      then
 	tmp_addflag=
+	tmp_sharedflag='-shared'
 	case $cc_basename,$host_cpu in
-	pgcc*)				# Portland Group C compiler
-	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+        pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec='${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
-	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  whole_archive_flag_spec='${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
+	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' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  whole_archive_flag_spec=
+	  tmp_sharedflag='--shared' ;;
+	xl[cC]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	  tmp_sharedflag='-qmkshrobj'
+	  tmp_addflag= ;;
 	esac
 	case `$CC -V 2>&1 | sed 5q` in
 	*Sun\ C*)			# Sun C 5.9
-	  whole_archive_flag_spec_GCJ='${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'
+	  whole_archive_flag_spec='${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'
+	  compiler_needs_object=yes
 	  tmp_sharedflag='-G' ;;
 	*Sun\ F*)			# Sun Fortran 8.3
 	  tmp_sharedflag='-G' ;;
-	*)
-	  tmp_sharedflag='-shared' ;;
 	esac
-	archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
-	if test $supports_anon_versioning = yes; then
-	  archive_expsym_cmds_GCJ='$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
-	link_all_deplibs_GCJ=no
+        if test "x$supports_anon_versioning" = xyes; then
+          archive_expsym_cmds='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
+
+	case $cc_basename in
+	xlf*)
+	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+	  hardcode_libdir_flag_spec=
+	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
+	  archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; then
+	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	      echo "local: *; };" >> $output_objdir/$libname.ver~
+	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
       else
-	ld_shlibs_GCJ=no
+        ld_shlibs=no
       fi
       ;;
 
     netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$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
-	ld_shlibs_GCJ=no
-	cat <<EOF 1>&2
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
 
 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
 *** create shared libraries on Solaris systems.  Therefore, libtool
@@ -17447,19 +8086,19 @@ EOF
 *** 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
-	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
-	ld_shlibs_GCJ=no
+	ld_shlibs=no
       fi
       ;;
 
     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
       case `$LD -v 2>&1` in
         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-	ld_shlibs_GCJ=no
+	ld_shlibs=no
 	cat <<_LT_EOF 1>&2
 
 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
@@ -17472,54 +8111,58 @@ EOF
 _LT_EOF
 	;;
 	*)
-	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	    hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-	    archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
-	    archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  # 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.
+	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 	  else
-	    ld_shlibs_GCJ=no
+	    ld_shlibs=no
 	  fi
 	;;
       esac
       ;;
 
     sunos4*)
-      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       wlarc=
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
       ;;
 
     *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
-	ld_shlibs_GCJ=no
+	ld_shlibs=no
       fi
       ;;
     esac
 
-    if test "$ld_shlibs_GCJ" = no; then
+    if test "$ld_shlibs" = no; then
       runpath_var=
-      hardcode_libdir_flag_spec_GCJ=
-      export_dynamic_flag_spec_GCJ=
-      whole_archive_flag_spec_GCJ=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
     fi
   else
     # PORTME fill in a description of your system's linker (not GNU ld)
     case $host_os in
     aix3*)
-      allow_undefined_flag_GCJ=unsupported
-      always_export_symbols_GCJ=yes
-      archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$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.
-      hardcode_minus_L_GCJ=yes
+      hardcode_minus_L=yes
       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
 	# Neither direct hardcoding nor static linking is supported with a
 	# broken collect2.
-	hardcode_direct_GCJ=unsupported
+	hardcode_direct=unsupported
       fi
       ;;
 
@@ -17533,10 +8176,10 @@ _LT_EOF
       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
-	  export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	else
-	  export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds='$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
 
@@ -17545,10 +8188,10 @@ _LT_EOF
 	# 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
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
 	  done
 	  ;;
 	esac
@@ -17563,30 +8206,32 @@ _LT_EOF
       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
-      archive_cmds_GCJ=''
-      hardcode_direct_GCJ=yes
-      hardcode_libdir_separator_GCJ=':'
-      link_all_deplibs_GCJ=yes
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_direct_absolute=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      file_list_spec='${wl}-f,'
 
       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
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 	  then
-  	  # We have reworked collect2
-  	  :
+	  # We have reworked collect2
+	  :
 	  else
-  	  # We have old collect2
-  	  hardcode_direct_GCJ=unsupported
-  	  # It fails to find uninstalled libraries when the uninstalled
-  	  # path is not listed in the libpath.  Setting hardcode_minus_L
-  	  # to unsupported forces relinking
-  	  hardcode_minus_L_GCJ=yes
-  	  hardcode_libdir_flag_spec_GCJ='-L$libdir'
-  	  hardcode_libdir_separator_GCJ=
+	  # We have old collect2
+	  hardcode_direct=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L=yes
+	  hardcode_libdir_flag_spec='-L$libdir'
+	  hardcode_libdir_separator=
 	  fi
 	  ;;
 	esac
@@ -17594,11 +8239,12 @@ _LT_EOF
 	if test "$aix_use_runtimelinking" = yes; then
 	  shared_flag="$shared_flag "'${wl}-G'
 	fi
+	link_all_deplibs=no
       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:
+	# 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
@@ -17609,19 +8255,17 @@ _LT_EOF
 	fi
       fi
 
+      export_dynamic_flag_spec='${wl}-bexpall'
       # It seems that -bexpall does not export symbols beginning with
       # underscore (_), so it is better to generate a list of symbols to export.
-      always_export_symbols_GCJ=yes
+      always_export_symbols=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.
-	allow_undefined_flag_GCJ='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+	allow_undefined_flag='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -17632,24 +8276,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+if ac_fn_c_try_link "$LINENO"; then :
 
 lt_aix_libpath_sed='
     /Import File Strings/,/^$/ {
@@ -17663,31 +8290,22 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpat
 if test -z "$aix_libpath"; then
   aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
-	archive_expsym_cmds_GCJ="\$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
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
 	if test "$host_cpu" = ia64; then
-	  hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
-	  allow_undefined_flag_GCJ="-z nodefs"
-	  archive_expsym_cmds_GCJ="\$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"
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag="-z nodefs"
+	  archive_expsym_cmds="\$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.
-	 cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -17698,24 +8316,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+if ac_fn_c_try_link "$LINENO"; then :
 
 lt_aix_libpath_sed='
     /Import File Strings/,/^$/ {
@@ -17729,121 +8330,100 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpat
 if test -z "$aix_libpath"; then
   aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-	 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+	 hardcode_libdir_flag_spec='${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.
-	  no_undefined_flag_GCJ=' ${wl}-bernotok'
-	  allow_undefined_flag_GCJ=' ${wl}-berok'
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
 	  # Exported symbols can be pulled into shared objects from archives
-	  whole_archive_flag_spec_GCJ='$convenience'
-	  archive_cmds_need_lc_GCJ=yes
+	  whole_archive_flag_spec='$convenience'
+	  archive_cmds_need_lc=yes
 	  # This is similar to how AIX traditionally builds its shared libraries.
-	  archive_expsym_cmds_GCJ="\$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'
+	  archive_expsym_cmds="\$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*)
-      archive_cmds_GCJ='$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)'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_minus_L_GCJ=yes
-      # see comment about different semantics on the GNU ld section
-      ld_shlibs_GCJ=no
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$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)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
       ;;
 
     bsdi[45]*)
-      export_dynamic_flag_spec_GCJ=-rdynamic
+      export_dynamic_flag_spec=-rdynamic
       ;;
 
-    cygwin* | mingw* | pw32*)
+    cygwin* | mingw* | pw32* | cegcc*)
       # When not using gcc, we currently assume that we are using
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
-      hardcode_libdir_flag_spec_GCJ=' '
-      allow_undefined_flag_GCJ=unsupported
+      hardcode_libdir_flag_spec=' '
+      allow_undefined_flag=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.
-      archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
       # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_From_new_cmds_GCJ='true'
+      old_archive_from_new_cmds='true'
       # FIXME: Should let the user specify the lib program.
-      old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes_GCJ=yes
+      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes=yes
       ;;
 
     darwin* | rhapsody*)
-      case $host_os in
-        rhapsody* | darwin1.[012])
-         allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[012])
-               allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-      esac
-      archive_cmds_need_lc_GCJ=no
-      hardcode_direct_GCJ=no
-      hardcode_automatic_GCJ=yes
-      hardcode_shlibpath_var_GCJ=unsupported
-      whole_archive_flag_spec_GCJ=''
-      link_all_deplibs_GCJ=yes
-    if test "$GCC" = yes ; then
-    	output_verbose_link_cmd='echo'
-        archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-        module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-        archive_expsym_cmds_GCJ="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}"
-        module_expsym_cmds_GCJ="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'
-         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
-         module_cmds_GCJ='$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
-         archive_expsym_cmds_GCJ='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}'
-          module_expsym_cmds_GCJ='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}'
-          ;;
-       *)
-         ld_shlibs_GCJ=no
-          ;;
-      esac
-    fi
+
+
+  archive_cmds_need_lc=no
+  hardcode_direct=no
+  hardcode_automatic=yes
+  hardcode_shlibpath_var=unsupported
+  whole_archive_flag_spec=''
+  link_all_deplibs=yes
+  allow_undefined_flag="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds="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}"
+    module_expsym_cmds="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
+  ld_shlibs=no
+  fi
+
       ;;
 
     dgux*)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_shlibpath_var_GCJ=no
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
       ;;
 
     freebsd1*)
-      ld_shlibs_GCJ=no
+      ld_shlibs=no
       ;;
 
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
@@ -17851,60 +8431,60 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
     # does not break anything, and helps significantly (at the cost of a little
     # extra space).
     freebsd2.2*)
-      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
     freebsd2*)
-      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_GCJ=yes
-      hardcode_minus_L_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
     freebsd* | dragonfly*)
-      archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
+      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
       ;;
 
     hpux9*)
       if test "$GCC" = yes; then
-	archive_cmds_GCJ='$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'
+	archive_cmds='$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
-	archive_cmds_GCJ='$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'
+	archive_cmds='$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
-      hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      hardcode_direct_GCJ=yes
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
 
       # hardcode_minus_L: Not really in the search PATH,
       # but as the default location of the library.
-      hardcode_minus_L_GCJ=yes
-      export_dynamic_flag_spec_GCJ='${wl}-E'
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
       ;;
 
     hpux10*)
       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
-	archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
       if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
-	hardcode_libdir_separator_GCJ=:
-
-	hardcode_direct_GCJ=yes
-	export_dynamic_flag_spec_GCJ='${wl}-E'
-
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_flag_spec_ld='+b $libdir'
+	hardcode_libdir_separator=:
+	hardcode_direct=yes
+	hardcode_direct_absolute=yes
+	export_dynamic_flag_spec='${wl}-E'
 	# hardcode_minus_L: Not really in the search PATH,
 	# but as the default location of the library.
-	hardcode_minus_L_GCJ=yes
+	hardcode_minus_L=yes
       fi
       ;;
 
@@ -17912,45 +8492,45 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 	case $host_cpu in
 	hppa*64*)
-	  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$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*)
-	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$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
-	hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
-	hardcode_libdir_separator_GCJ=:
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator=:
 
 	case $host_cpu in
 	hppa*64*|ia64*)
-	  hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
-	  hardcode_direct_GCJ=no
-	  hardcode_shlibpath_var_GCJ=no
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
 	  ;;
 	*)
-	  hardcode_direct_GCJ=yes
-	  export_dynamic_flag_spec_GCJ='${wl}-E'
+	  hardcode_direct=yes
+	  hardcode_direct_absolute=yes
+	  export_dynamic_flag_spec='${wl}-E'
 
 	  # hardcode_minus_L: Not really in the search PATH,
 	  # but as the default location of the library.
-	  hardcode_minus_L_GCJ=yes
+	  hardcode_minus_L=yes
 	  ;;
 	esac
       fi
@@ -17958,194 +8538,228 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     irix5* | irix6* | nonstopux*)
       if test "$GCC" = yes; then
-	archive_cmds_GCJ='$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'
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	# Try to use the -exported_symbol ld option, if it does not
+	# work, assume that -exports_file does not work either and
+	# implicitly export all symbols.
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int foo(void) {}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        LDFLAGS="$save_LDFLAGS"
       else
-	archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
       fi
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      link_all_deplibs_GCJ=yes
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      inherit_rpath=yes
+      link_all_deplibs=yes
       ;;
 
     netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
       else
-	archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
       fi
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
       ;;
 
     newsos6)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_GCJ=yes
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      hardcode_shlibpath_var_GCJ=no
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    *nto* | *qnx*)
       ;;
 
     openbsd*)
       if test -f /usr/libexec/ld.so; then
-	hardcode_direct_GCJ=yes
-	hardcode_shlibpath_var_GCJ=no
-	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	  archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	  archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	  hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
-	  export_dynamic_flag_spec_GCJ='${wl}-E'
+	hardcode_direct=yes
+	hardcode_shlibpath_var=no
+	hardcode_direct_absolute=yes
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec='${wl}-E'
 	else
 	  case $host_os in
 	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-	     archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	     hardcode_libdir_flag_spec_GCJ='-R$libdir'
+	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec='-R$libdir'
 	     ;;
 	   *)
-	     archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	     hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
 	     ;;
 	  esac
-        fi
+	fi
       else
-	ld_shlibs_GCJ=no
+	ld_shlibs=no
       fi
       ;;
 
     os2*)
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_minus_L_GCJ=yes
-      allow_undefined_flag_GCJ=unsupported
-      archive_cmds_GCJ='$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'
-      old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$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'
+      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
       ;;
 
     osf3*)
       if test "$GCC" = yes; then
-	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_GCJ='$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'
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
       else
-	allow_undefined_flag_GCJ=' -expect_unresolved \*'
-	archive_cmds_GCJ='$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'
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
       fi
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
       ;;
 
     osf4* | osf5*)	# as osf3* with the addition of -msym flag
       if test "$GCC" = yes; then
-	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_GCJ='$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'
-	hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
       else
-	allow_undefined_flag_GCJ=' -expect_unresolved \*'
-	archive_cmds_GCJ='$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'
-	archive_expsym_cmds_GCJ='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'
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
-	hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
+	hardcode_libdir_flag_spec='-rpath $libdir'
       fi
-      hardcode_libdir_separator_GCJ=:
+      archive_cmds_need_lc='no'
+      hardcode_libdir_separator=:
       ;;
 
     solaris*)
-      no_undefined_flag_GCJ=' -z text'
+      no_undefined_flag=' -z defs'
       if test "$GCC" = yes; then
 	wlarc='${wl}'
-	archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_GCJ='$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'
+	archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
-	wlarc=''
-	archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	archive_expsym_cmds_GCJ='$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'
+	case `$CC -V 2>&1` in
+	*"Compilers 5.0"*)
+	  wlarc=''
+	  archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+	  ;;
+	*)
+	  wlarc='${wl}'
+	  archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  ;;
+	esac
       fi
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=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?)
+	# Supported since Solaris 2.6 (maybe 2.5.1?)
 	if test "$GCC" = yes; then
-	  whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 	else
-	  whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract'
+	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
 	fi
 	;;
       esac
-      link_all_deplibs_GCJ=yes
+      link_all_deplibs=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.
-	archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
       fi
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_minus_L_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
       ;;
 
     sysv4)
       case $host_vendor in
 	sni)
-	  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  hardcode_direct_GCJ=yes # is this really true???
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=yes # is this really true???
 	;;
 	siemens)
 	  ## LD is ld it makes a PLAMLIB
 	  ## CC just makes a GrossModule.
-	  archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-	  reload_cmds_GCJ='$CC -r -o $output$reload_objs'
-	  hardcode_direct_GCJ=no
+	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds='$CC -r -o $output$reload_objs'
+	  hardcode_direct=no
         ;;
 	motorola)
-	  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
 	;;
       esac
       runpath_var='LD_RUN_PATH'
-      hardcode_shlibpath_var_GCJ=no
+      hardcode_shlibpath_var=no
       ;;
 
     sysv4.3*)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var_GCJ=no
-      export_dynamic_flag_spec_GCJ='-Bexport'
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
       ;;
 
     sysv4*MP*)
       if test -d /usr/nec; then
-	archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	hardcode_shlibpath_var_GCJ=no
+	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var=no
 	runpath_var=LD_RUN_PATH
 	hardcode_runpath_var=yes
-	ld_shlibs_GCJ=yes
+	ld_shlibs=yes
       fi
       ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      no_undefined_flag_GCJ='${wl}-z,text'
-      archive_cmds_need_lc_GCJ=no
-      hardcode_shlibpath_var_GCJ=no
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
       runpath_var='LD_RUN_PATH'
 
       if test "$GCC" = yes; then
-	archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
@@ -18156,51 +8770,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       # 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.
-      no_undefined_flag_GCJ='${wl}-z,text'
-      allow_undefined_flag_GCJ='${wl}-z,nodefs'
-      archive_cmds_need_lc_GCJ=no
-      hardcode_shlibpath_var_GCJ=no
-      hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      hardcode_libdir_separator_GCJ=':'
-      link_all_deplibs_GCJ=yes
-      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
       runpath_var='LD_RUN_PATH'
 
       if test "$GCC" = yes; then
-	archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
     uts4*)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_shlibpath_var_GCJ=no
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
       ;;
 
     *)
-      ld_shlibs_GCJ=no
+      ld_shlibs=no
       ;;
     esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	export_dynamic_flag_spec='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
   fi
 
-{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
-echo "${ECHO_T}$ld_shlibs_GCJ" >&6; }
-test "$ld_shlibs_GCJ" = no && can_build_shared=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 #
 # Do we need to explicitly link libc?
 #
-case "x$archive_cmds_need_lc_GCJ" in
+case "x$archive_cmds_need_lc" in
 x|xyes)
   # Assume -lc should be added
-  archive_cmds_need_lc_GCJ=yes
+  archive_cmds_need_lc=yes
 
   if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds_GCJ in
+    case $archive_cmds in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
       ;;
@@ -18208,54 +8846,262 @@ x|xyes)
       # 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.
-      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
-      $rm conftest*
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+      $RM conftest*
       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
         soname=conftest
         lib=conftest
         libobjs=conftest.$ac_objext
         deplibs=
-        wl=$lt_prog_compiler_wl_GCJ
-	pic_flag=$lt_prog_compiler_pic_GCJ
+        wl=$lt_prog_compiler_wl
+	pic_flag=$lt_prog_compiler_pic
         compiler_flags=-v
         linker_flags=-v
         verstring=
         output_objdir=.
         libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
-        allow_undefined_flag_GCJ=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+        lt_save_allow_undefined_flag=$allow_undefined_flag
+        allow_undefined_flag=
+        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
         then
-	  archive_cmds_need_lc_GCJ=no
+	  archive_cmds_need_lc=no
         else
-	  archive_cmds_need_lc_GCJ=yes
+	  archive_cmds_need_lc=yes
         fi
-        allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
+        allow_undefined_flag=$lt_save_allow_undefined_flag
       else
         cat conftest.err 1>&5
       fi
-      $rm conftest*
-      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; }
+      $RM conftest*
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
+$as_echo "$archive_cmds_need_lc" >&6; }
       ;;
     esac
   fi
   ;;
 esac
 
-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+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
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
@@ -18269,7 +9115,6 @@ shlibpath_overrides_runpath=unknown
 version_type=none
 dynamic_linker="$host_os ld.so"
 sys_lib_dlsearch_path_spec="/lib /usr/lib"
-
 need_lib_prefix=unknown
 hardcode_into_libs=no
 
@@ -18306,7 +9151,7 @@ aix[4-9]*)
       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
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
 	:
       else
 	can_build_shared=no
@@ -18332,9 +9177,18 @@ aix[4-9]*)
   ;;
 
 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'
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    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'
+    ;;
+  esac
   ;;
 
 beos*)
@@ -18357,25 +9211,28 @@ bsdi[45]*)
   # libtool to hard-code these into programs
   ;;
 
-cygwin* | mingw* | pw32*)
+cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
   shrext_cmds=".dll"
   need_version=no
   need_lib_prefix=no
 
   case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
     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'\''`~
+      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'
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
       dlpath=$dir/\$dldll~
-       $rm \$dlpath'
+       $RM \$dlpath'
     shlibpath_overrides_runpath=yes
 
     case $host_os in
@@ -18384,20 +9241,20 @@ cygwin* | mingw* | pw32*)
       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* | cegcc*)
       # 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
+      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'`
+        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"`
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
       fi
       ;;
     pw32*)
@@ -18421,12 +9278,13 @@ darwin* | rhapsody*)
   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'
+  library_names_spec='${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`'
 
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
   ;;
 
@@ -18519,18 +9377,18 @@ hpux9* | hpux10* | hpux11*)
     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
-     ;;
-   *)
+  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
@@ -18598,7 +9456,7 @@ linux*oldld* | linux*aout* | linux*coff*)
   ;;
 
 # This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -18607,6 +9465,32 @@ linux* | k*bsd*-gnu)
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+  shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
@@ -18614,7 +9498,7 @@ linux* | k*bsd*-gnu)
 
   # 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' ' '`
+    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
 
@@ -18643,7 +9527,7 @@ netbsd*)
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+  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'
@@ -18664,14 +9548,16 @@ newsos6)
   shlibpath_overrides_runpath=yes
   ;;
 
-nto-qnx*)
-  version_type=linux
+*nto* | *qnx*)
+  version_type=qnx
   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
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
   ;;
 
 openbsd*)
@@ -18680,13 +9566,13 @@ openbsd*)
   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  ;;
+    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
+  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
@@ -18758,7 +9644,6 @@ sysv4 | sysv4.3*)
     sni)
       shlibpath_overrides_runpath=no
       need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
       runpath_var=LD_RUN_PATH
       ;;
     siemens)
@@ -18789,13 +9674,12 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
   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
+  shlibpath_overrides_runpath=yes
   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"
@@ -18805,6 +9689,17 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
   sys_lib_dlsearch_path_spec='/usr/lib'
   ;;
 
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  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}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
 uts4*)
   version_type=linux
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -18816,3322 +9711,3351 @@ uts4*)
   dynamic_linker=no
   ;;
 esac
-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
 test "$dynamic_linker" = no && can_build_shared=no
 
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_sys_lib_search_path_spec="$sys_lib_search_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
 
-sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
 fi
 
-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
 
-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
-hardcode_action_GCJ=
-if test -n "$hardcode_libdir_flag_spec_GCJ" || \
-   test -n "$runpath_var_GCJ" || \
-   test "X$hardcode_automatic_GCJ" = "Xyes" ; then
 
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct_GCJ" != 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, GCJ)" != no &&
-     test "$hardcode_minus_L_GCJ" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action_GCJ=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action_GCJ=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action_GCJ=unsupported
-fi
-{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
-echo "${ECHO_T}$hardcode_action_GCJ" >&6; }
 
-if test "$hardcode_action_GCJ" = 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
 
 
-# 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 \
-    compiler_GCJ \
-    CC_GCJ \
-    LD_GCJ \
-    lt_prog_compiler_wl_GCJ \
-    lt_prog_compiler_pic_GCJ \
-    lt_prog_compiler_static_GCJ \
-    lt_prog_compiler_no_builtin_flag_GCJ \
-    export_dynamic_flag_spec_GCJ \
-    thread_safe_flag_spec_GCJ \
-    whole_archive_flag_spec_GCJ \
-    enable_shared_with_static_runtimes_GCJ \
-    old_archive_cmds_GCJ \
-    old_archive_from_new_cmds_GCJ \
-    predep_objects_GCJ \
-    postdep_objects_GCJ \
-    predeps_GCJ \
-    postdeps_GCJ \
-    compiler_lib_search_path_GCJ \
-    compiler_lib_search_dirs_GCJ \
-    archive_cmds_GCJ \
-    archive_expsym_cmds_GCJ \
-    postinstall_cmds_GCJ \
-    postuninstall_cmds_GCJ \
-    old_archive_from_expsyms_cmds_GCJ \
-    allow_undefined_flag_GCJ \
-    no_undefined_flag_GCJ \
-    export_symbols_cmds_GCJ \
-    hardcode_libdir_flag_spec_GCJ \
-    hardcode_libdir_flag_spec_ld_GCJ \
-    hardcode_libdir_separator_GCJ \
-    hardcode_automatic_GCJ \
-    module_cmds_GCJ \
-    module_expsym_cmds_GCJ \
-    lt_cv_prog_compiler_c_o_GCJ \
-    fix_srcfile_path_GCJ \
-    exclude_expsyms_GCJ \
-    include_expsyms_GCJ; do
-
-    case $var in
-    old_archive_cmds_GCJ | \
-    old_archive_from_new_cmds_GCJ | \
-    archive_cmds_GCJ | \
-    archive_expsym_cmds_GCJ | \
-    module_cmds_GCJ | \
-    module_expsym_cmds_GCJ | \
-    old_archive_from_expsyms_cmds_GCJ | \
-    export_symbols_cmds_GCJ | \
-    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
 
-cfgfile="$ofile"
 
-  cat <<__EOF__ >> "$cfgfile"
-# ### 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=$archive_cmds_need_lc_GCJ
 
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
 
-# 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_compiler_GCJ
 
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_GCJ
 
-# An ERE matcher.
-EGREP=$lt_EGREP
 
-# The linker used to build libraries.
-LD=$lt_LD_GCJ
 
-# 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_prog_compiler_wl_GCJ
 
-# 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_prog_compiler_pic_GCJ
-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_cv_prog_compiler_c_o_GCJ
 
-# 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_prog_compiler_static_GCJ
 
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
 
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
 
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
 
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
 
-# 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_old_archive_cmds_GCJ
-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_old_archive_from_new_cmds_GCJ
 
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
 
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_GCJ
-archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
-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_module_cmds_GCJ
-module_expsym_cmds=$lt_module_expsym_cmds_GCJ
 
-# 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_predep_objects_GCJ
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_GCJ
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_GCJ
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_GCJ
 
-# The directories searched by this compiler when creating a shared
-# library
-compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ
 
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
 
-# 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_allow_undefined_flag_GCJ
 
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_GCJ
 
-# 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=$hardcode_action_GCJ
 
-# 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_hardcode_libdir_flag_spec_GCJ
 
-# 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_hardcode_libdir_flag_spec_ld_GCJ
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+   test -n "$runpath_var" ||
+   test "X$hardcode_automatic" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+   test "$inherit_rpath" = yes; 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
+
+
+
+
+
+
+  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* | cegcc*)
+    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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+    ;;
+
+  *)
+    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = xyes; then :
+  lt_cv_dlopen="shl_load"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dld_shl_load=yes
+else
+  ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes; then :
+  lt_cv_dlopen="dlopen"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if ${ac_cv_lib_svld_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_svld_dlopen=yes
+else
+  ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if ${ac_cv_lib_dld_dld_link+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dld_dld_link=yes
+else
+  ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
 
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
 
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_GCJ
+fi
 
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_GCJ
 
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
+fi
 
-# 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=$hardcode_automatic_GCJ
 
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
+fi
 
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_GCJ
+    ;;
+  esac
 
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
 
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_GCJ
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
 
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_GCJ
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line 10146 "configure"
+#include "confdefs.h"
 
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
 
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_GCJ
+#include <stdio.h>
 
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_GCJ
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
 
-# ### END LIBTOOL TAG CONFIG: $tagname
+/* 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
 
-__EOF__
+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 ());
 
-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"
+  return status;
+}
+_LT_EOF
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
   fi
 fi
+rm -fr conftest*
 
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
-	else
-	  tagname=""
-	fi
-	;;
-
-      RC)
-
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-objext_RC=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
 
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self_static+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line 10242 "configure"
+#include "confdefs.h"
 
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
 
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
+#include <stdio.h>
 
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
 
-# Allow CC to be a program name with arguments.
-compiler=$CC
+/* 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
 
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
 
-# save warnings/boilerplate of simple test code
-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*
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
 
-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*
+  return status;
+}
+_LT_EOF
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
 
 
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${RC-"windres"}
-compiler=$CC
-compiler_RC=$CC
-for cc_temp in $compiler""; 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_cv_prog_compiler_c_o_RC=yes
-
-# 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 \
-    compiler_RC \
-    CC_RC \
-    LD_RC \
-    lt_prog_compiler_wl_RC \
-    lt_prog_compiler_pic_RC \
-    lt_prog_compiler_static_RC \
-    lt_prog_compiler_no_builtin_flag_RC \
-    export_dynamic_flag_spec_RC \
-    thread_safe_flag_spec_RC \
-    whole_archive_flag_spec_RC \
-    enable_shared_with_static_runtimes_RC \
-    old_archive_cmds_RC \
-    old_archive_from_new_cmds_RC \
-    predep_objects_RC \
-    postdep_objects_RC \
-    predeps_RC \
-    postdeps_RC \
-    compiler_lib_search_path_RC \
-    compiler_lib_search_dirs_RC \
-    archive_cmds_RC \
-    archive_expsym_cmds_RC \
-    postinstall_cmds_RC \
-    postuninstall_cmds_RC \
-    old_archive_from_expsyms_cmds_RC \
-    allow_undefined_flag_RC \
-    no_undefined_flag_RC \
-    export_symbols_cmds_RC \
-    hardcode_libdir_flag_spec_RC \
-    hardcode_libdir_flag_spec_ld_RC \
-    hardcode_libdir_separator_RC \
-    hardcode_automatic_RC \
-    module_cmds_RC \
-    module_expsym_cmds_RC \
-    lt_cv_prog_compiler_c_o_RC \
-    fix_srcfile_path_RC \
-    exclude_expsyms_RC \
-    include_expsyms_RC; do
-
-    case $var in
-    old_archive_cmds_RC | \
-    old_archive_from_new_cmds_RC | \
-    archive_cmds_RC | \
-    archive_expsym_cmds_RC | \
-    module_cmds_RC | \
-    module_expsym_cmds_RC | \
-    old_archive_from_expsyms_cmds_RC | \
-    export_symbols_cmds_RC | \
-    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
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+    fi
 
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
     ;;
   esac
 
-cfgfile="$ofile"
-
-  cat <<__EOF__ >> "$cfgfile"
-# ### 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=$archive_cmds_need_lc_RC
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
 
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
+  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
 
-# 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_compiler_RC
 
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_RC
 
-# An ERE matcher.
-EGREP=$lt_EGREP
 
-# The linker used to build libraries.
-LD=$lt_LD_RC
 
-# 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"
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+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"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+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"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    fi
+    ;;
+  *)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    ;;
+  esac
+fi
 
-# 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_prog_compiler_wl_RC
 
-# 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_prog_compiler_pic_RC
-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_cv_prog_compiler_c_o_RC
 
-# 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
+  # Report which library types will actually be built
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
 
-# Do we need a version for libraries?
-need_version=$need_version
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+  test "$can_build_shared" = "no" && enable_shared=no
 
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
+  # 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
+    ;;
 
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
+  aix[4-9]*)
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
+    fi
+    ;;
+  esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
 
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+  # Make sure either enable_shared or enable_static is yes.
+  test "$enable_shared" = yes || enable_static=yes
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
 
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_RC
 
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
 
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
 
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
+CC="$lt_save_CC"
 
-# 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_old_archive_cmds_RC
-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_old_archive_from_new_cmds_RC
 
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
 
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_RC
-archive_expsym_cmds=$lt_archive_expsym_cmds_RC
-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_module_cmds_RC
-module_expsym_cmds=$lt_module_expsym_cmds_RC
 
-# 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_predep_objects_RC
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_RC
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_RC
+        ac_config_commands="$ac_config_commands libtool"
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_RC
 
-# The directories searched by this compiler when creating a shared
-# library
-compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC
 
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_RC
 
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
+# Only expand once:
 
-# 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_allow_undefined_flag_RC
 
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_RC
 
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
+for ac_header in sys/inotify.h sys/epoll.h sys/event.h port.h poll.h sys/select.h sys/eventfd.h sys/signalfd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
+fi
 
-# 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
+done
 
-# 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
+for ac_func in inotify_init epoll_ctl kqueue port_create poll select eventfd signalfd
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
+fi
+done
 
-# 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
+for ac_func in clock_gettime
+do :
+  ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
+if test "x$ac_cv_func_clock_gettime" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_CLOCK_GETTIME 1
+_ACEOF
 
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_RC
+else
 
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
+      if test $(uname) = Linux; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime syscall" >&5
+$as_echo_n "checking for clock_gettime syscall... " >&6; }
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+                       #include <sys/syscall.h>
+                       #include <time.h>
+int
+main ()
+{
+struct timespec ts; int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_have_clock_syscall=1
 
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
+$as_echo "#define HAVE_CLOCK_SYSCALL 1" >>confdefs.h
+
+                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+   fi
+   if test -z "$LIBEV_M4_AVOID_LIBRT" && test -z "$ac_have_clock_syscall"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
+$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
+if ${ac_cv_lib_rt_clock_gettime+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-# 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_hardcode_libdir_flag_spec_ld_RC
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
+int
+main ()
+{
+return clock_gettime ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_rt_clock_gettime=yes
+else
+  ac_cv_lib_rt_clock_gettime=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
+$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
+if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRT 1
+_ACEOF
 
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
+  LIBS="-lrt $LIBS"
 
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_RC
+fi
 
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_RC
+      unset ac_cv_func_clock_gettime
+      for ac_func in clock_gettime
+do :
+  ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
+if test "x$ac_cv_func_clock_gettime" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_CLOCK_GETTIME 1
+_ACEOF
 
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+fi
+done
 
-# 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=$hardcode_automatic_RC
+   fi
 
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
+fi
+done
 
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_RC
 
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+for ac_func in nanosleep
+do :
+  ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
+if test "x$ac_cv_func_nanosleep" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_NANOSLEEP 1
+_ACEOF
 
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+else
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
+   if test -z "$LIBEV_M4_AVOID_LIBRT"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5
+$as_echo_n "checking for nanosleep in -lrt... " >&6; }
+if ${ac_cv_lib_rt_nanosleep+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_RC
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char nanosleep ();
+int
+main ()
+{
+return nanosleep ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_rt_nanosleep=yes
+else
+  ac_cv_lib_rt_nanosleep=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5
+$as_echo "$ac_cv_lib_rt_nanosleep" >&6; }
+if test "x$ac_cv_lib_rt_nanosleep" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRT 1
+_ACEOF
 
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_RC
+  LIBS="-lrt $LIBS"
 
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
+fi
 
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_RC
+      unset ac_cv_func_nanosleep
+      for ac_func in nanosleep
+do :
+  ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
+if test "x$ac_cv_func_nanosleep" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_NANOSLEEP 1
+_ACEOF
 
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_RC
+fi
+done
 
-# ### END LIBTOOL TAG CONFIG: $tagname
+   fi
 
-__EOF__
+fi
+done
 
 
+if test -z "$LIBEV_M4_AVOID_LIBM"; then
+   LIBM=m
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing floor" >&5
+$as_echo_n "checking for library containing floor... " >&6; }
+if ${ac_cv_search_floor+:} false; then :
+  $as_echo_n "(cached) " >&6
 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"
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char floor ();
+int
+main ()
+{
+return floor ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' $LIBM; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_floor=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_floor+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_floor+:} false; then :
+
+else
+  ac_cv_search_floor=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_floor" >&5
+$as_echo "$ac_cv_search_floor" >&6; }
+ac_res=$ac_cv_search_floor
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
+$as_echo "#define HAVE_FLOOR 1" >>confdefs.h
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+fi
 
-CC="$lt_save_CC"
 
-	;;
 
-      *)
-	{ { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
-echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
-   { (exit 1); exit 1; }; }
-	;;
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
 
-      # Append the new tag name to the list of available tags.
-      if test -n "$tagname" ; then
-      available_tags="$available_tags $tagname"
-    fi
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      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"
-    { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
-echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
-   { (exit 1); exit 1; }; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
   fi
 fi
+rm -f confcache
 
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
+DEFS=-DHAVE_CONFIG_H
 
-# 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'
-
-# Prevent multiple expansion
-
-
-
-
-
-
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
 
+LTLIBOBJS=$ac_ltlibobjs
 
 
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
 
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
 
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
 
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
 
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
 
 
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
 
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
 
 
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
 
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
 
-if test "x$GCC" = xyes ; then
-  CFLAGS="$CFLAGS -O3"
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
 fi
 
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
 
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
 
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
 
 
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
 
-
-
-
-for ac_header in sys/inotify.h sys/epoll.h sys/event.h sys/queue.h port.h poll.h sys/select.h sys/eventfd.h sys/signalfd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
 else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "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_header_compiler=yes
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
 
-	ac_header_compiler=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
 
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  as_basename=false
+fi
 
-  ac_header_preproc=no
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
 fi
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-    ;;
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
 esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
 else
-  eval "$as_ac_Header=\$ac_header_preproc"
+  as_ln_s='cp -pR'
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
 fi
 
-done
-
 
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
 
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
 
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
 
-for ac_func in inotify_init epoll_ctl kqueue port_create poll select eventfd signalfd
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+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.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
 
-#undef $ac_func
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-	eval "$as_ac_var=no"
-fi
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+Usage: $0 [OPTION]... [TAG]...
 
-fi
-done
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
 
+Configuration files:
+$config_files
 
-{ echo "$as_me:$LINENO: checking for clock_gettime" >&5
-echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6; }
-if test "${ac_cv_func_clock_gettime+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.  */
-/* Define clock_gettime to an innocuous variant, in case <limits.h> declares clock_gettime.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define clock_gettime innocuous_clock_gettime
+Configuration headers:
+$config_headers
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char clock_gettime (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+Configuration commands:
+$config_commands
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+Report bugs to the package provider."
 
-#undef clock_gettime
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char clock_gettime ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_clock_gettime || defined __stub___clock_gettime
-choke me
-#endif
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
 
-int
-main ()
-{
-return clock_gettime ();
-  ;
-  return 0;
-}
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_func_clock_gettime=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_func_clock_gettime=no
-fi
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=?*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_clock_gettime" >&5
-echo "${ECHO_T}$ac_cv_func_clock_gettime" >&6; }
-if test $ac_cv_func_clock_gettime = yes; then
-  :
-else
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
 
-      if test $(uname) = Linux; then
-      { echo "$as_me:$LINENO: checking for clock_gettime syscall" >&5
-echo $ECHO_N "checking for clock_gettime syscall... $ECHO_C" >&6; }
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <syscall.h>
-                       #include <time.h>
-int
-main ()
-{
-struct timespec ts; int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts)
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_have_clock_syscall=1
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CLOCK_SYSCALL 1
-_ACEOF
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
 
-                      { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  esac
+  shift
+done
 
-	{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
+ac_configure_extra_args=
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-   fi
-   if test -z "$LIBEV_M4_AVOID_LIBRT" && test -z "$ac_have_clock_syscall"; then
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
 
-{ echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5
-echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6; }
-if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char clock_gettime ();
-int
-main ()
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
 {
-return clock_gettime ();
-  ;
-  return 0;
-}
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_rt_clock_gettime=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
 
-	ac_cv_lib_rt_clock_gettime=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5
-echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6; }
-if test $ac_cv_lib_rt_clock_gettime = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRT 1
-_ACEOF
+# 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
 
-  LIBS="-lrt $LIBS"
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
+LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+OBJDUMP \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib; do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
 
-fi
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
 
-      unset ac_cv_func_clock_gettime
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"')  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+  ;;
+esac
 
-for ac_func in clock_gettime
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+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.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef $ac_func
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-	eval "$as_ac_var=no"
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
-fi
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
 done
 
-   fi
 
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
 fi
 
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
 
-{ echo "$as_me:$LINENO: checking for nanosleep" >&5
-echo $ECHO_N "checking for nanosleep... $ECHO_C" >&6; }
-if test "${ac_cv_func_nanosleep+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define nanosleep to an innocuous variant, in case <limits.h> declares nanosleep.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define nanosleep innocuous_nanosleep
+  ac_cs_awk_cr=$ac_cr
+fi
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char nanosleep (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef nanosleep
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char nanosleep ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_nanosleep || defined __stub___nanosleep
-choke me
-#endif
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
 
-int
-main ()
+}
 {
-return nanosleep ();
-  ;
-  return 0;
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
 }
+
+_ACAWK
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_func_nanosleep=yes
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_nanosleep=no
-fi
+  cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}'
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_nanosleep" >&5
-echo "${ECHO_T}$ac_cv_func_nanosleep" >&6; }
-if test $ac_cv_func_nanosleep = yes; then
-  :
-else
 
-   if test -z "$LIBEV_M4_AVOID_LIBRT"; then
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
 
-{ echo "$as_me:$LINENO: checking for nanosleep in -lrt" >&5
-echo $ECHO_N "checking for nanosleep in -lrt... $ECHO_C" >&6; }
-if test "${ac_cv_lib_rt_nanosleep+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char nanosleep ();
-int
-main ()
-{
-return nanosleep ();
-  ;
-  return 0;
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
 }
+{ print }
+_ACAWK
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_rt_nanosleep=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
 
-	ac_cv_lib_rt_nanosleep=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_rt_nanosleep" >&5
-echo "${ECHO_T}$ac_cv_lib_rt_nanosleep" >&6; }
-if test $ac_cv_lib_rt_nanosleep = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRT 1
-_ACEOF
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$ac_tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
 
-  LIBS="-lrt $LIBS"
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
 
-fi
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
 
-      unset ac_cv_func_nanosleep
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
 
-for ac_func in nanosleep
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+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.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef $ac_func
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
 }
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_var=no"
-fi
+_ACEOF
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
 _ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
-fi
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f "$ac_file"
+      mv "$ac_tmp/config.h" "$ac_file" \
+	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
+  fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
 done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
 
-   fi
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
 
-fi
 
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+    "libtool":C)
 
+    # 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
 
-{ echo "$as_me:$LINENO: checking for ceil in -lm" >&5
-echo $ECHO_N "checking for ceil in -lm... $ECHO_C" >&6; }
-if test "${ac_cv_lib_m_ceil+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ceil ();
-int
-main ()
-{
-return ceil ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_m_ceil=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
 
-	ac_cv_lib_m_ceil=no
-fi
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool 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.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_ceil" >&5
-echo "${ECHO_T}$ac_cv_lib_m_ceil" >&6; }
-if test $ac_cv_lib_m_ceil = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBM 1
-_ACEOF
 
-  LIBS="-lm $LIBS"
+# The names of the tagged configurations supported by this script.
+available_tags=""
 
-fi
+# ### BEGIN LIBTOOL CONFIG
 
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
 
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
 
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
 
-ac_config_files="$ac_config_files Makefile"
+# What type of objects to build.
+pic_mode=$pic_mode
 
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
 
-_ACEOF
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
 
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
 
-  (set) 2>&1 |
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes (double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \).
-      sed -n \
-	"s/'/'\\\\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-  if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
-      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
-echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
-  else
-    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
+# A sed program that does not truncate output.
+SED=$lt_SED
 
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
 
-DEFS=-DHAVE_CONFIG_H
+# A grep program that handles long lines.
+GREP=$lt_GREP
 
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`echo "$ac_i" | sed "$ac_script"`
-  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
-  #    will be set to the directory where LIBOBJS objects are built.
-  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
+# An ERE matcher.
+EGREP=$lt_EGREP
 
-LTLIBOBJS=$ac_ltlibobjs
+# A literal string matcher.
+FGREP=$lt_FGREP
 
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
 
-if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
 
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
 
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
+# Object file suffix (normally "o").
+objext=$ac_objext
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+# Executable file suffix (normally "").
+exeext=$exeext
 
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # 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
+# whether the shell understands "unset".
+lt_unset=$lt_unset
 
-fi
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
 
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
 
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
 
+# An object symbol dumper.
+OBJDUMP=$lt_OBJDUMP
 
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
 
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
 
+# A symbol stripping program.
+STRIP=$lt_STRIP
 
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-as_nl='
-'
-IFS=" ""	$as_nl"
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
+# A C compiler.
+LTCC=$lt_CC
 
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
-fi
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
 
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
+# 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
 
-# NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-  fi
-done
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
+# 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
 
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
 
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
 
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
 
-# CDPATH.
-$as_unset CDPATH
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
 
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
 
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
 
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
 
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
 
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
 
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
 
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
 
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
+# Old archive suffix (normally "a").
+libext=$libext
 
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
 
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s='ln -s'
-  # ... but there are two gotchas:
-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-  # In both cases, we have to default to `cp -p'.
-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-	case $1 in
-        -*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
 
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+# Do we need a version for libraries?
+need_version=$need_version
 
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+# Library versioning type.
+version_type=$version_type
 
+# Shared library runtime path variable.
+runpath_var=$runpath_var
 
-exec 6>&1
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
 
-# Save the log message, to keep $[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
 
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
+# 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
 
-_ACEOF
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
 
-cat >>$CONFIG_STATUS <<_ACEOF
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
 
-_ACEOF
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
 
-Usage: $0 [OPTIONS] [FILE]...
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
 
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-  -q, --quiet      do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-  --file=FILE[:TEMPLATE]
-		   instantiate the configuration file FILE
-  --header=FILE[:TEMPLATE]
-		   instantiate the configuration header FILE
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
 
-Configuration files:
-$config_files
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
-Configuration headers:
-$config_headers
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
-Configuration commands:
-$config_commands
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
 
-Report bugs to <bug-autoconf at gnu.org>."
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
 
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.61,
-  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
 
-Copyright (C) 2006 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
 
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-MKDIR_P='$MKDIR_P'
-_ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value.  By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=*)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  *)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
+# The linker used to build libraries.
+LD=$lt_LD
 
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    echo "$ac_cs_version"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
-    ac_need_defaults=false;;
-  --he | --h)
-    # Conflict between --help and --header
-    { echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    echo "$ac_cs_usage"; exit ;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
 
-  # This is an error.
-  -*) { echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; } ;;
+# A language specific compiler.
+CC=$lt_compiler
 
-  *) ac_config_targets="$ac_config_targets $1"
-     ac_need_defaults=false ;;
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
 
-  esac
-  shift
-done
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
 
-ac_configure_extra_args=
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
 
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
 
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
-  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
-  CONFIG_SHELL=$SHELL
-  export CONFIG_SHELL
-  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
 
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  echo "$ac_log"
-} >&5
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
 
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
 
-_ACEOF
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
 
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
-    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
 
-  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
-  esac
-done
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
 
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
 
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
 
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp=
-  trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
 
-{
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
-} ||
-{
-   echo "$me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
 
-#
-# Set up the sed scripts for CONFIG_FILES section.
-#
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
 
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "$CONFIG_FILES"; then
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
 
-_ACEOF
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
 
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
+# 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_hardcode_libdir_flag_spec_ld
 
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  cat >conf$$subs.sed <<_ACEOF
-SHELL!$SHELL$ac_delim
-PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
-PACKAGE_NAME!$PACKAGE_NAME$ac_delim
-PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
-PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
-PACKAGE_STRING!$PACKAGE_STRING$ac_delim
-PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
-exec_prefix!$exec_prefix$ac_delim
-prefix!$prefix$ac_delim
-program_transform_name!$program_transform_name$ac_delim
-bindir!$bindir$ac_delim
-sbindir!$sbindir$ac_delim
-libexecdir!$libexecdir$ac_delim
-datarootdir!$datarootdir$ac_delim
-datadir!$datadir$ac_delim
-sysconfdir!$sysconfdir$ac_delim
-sharedstatedir!$sharedstatedir$ac_delim
-localstatedir!$localstatedir$ac_delim
-includedir!$includedir$ac_delim
-oldincludedir!$oldincludedir$ac_delim
-docdir!$docdir$ac_delim
-infodir!$infodir$ac_delim
-htmldir!$htmldir$ac_delim
-dvidir!$dvidir$ac_delim
-pdfdir!$pdfdir$ac_delim
-psdir!$psdir$ac_delim
-libdir!$libdir$ac_delim
-localedir!$localedir$ac_delim
-mandir!$mandir$ac_delim
-DEFS!$DEFS$ac_delim
-ECHO_C!$ECHO_C$ac_delim
-ECHO_N!$ECHO_N$ac_delim
-ECHO_T!$ECHO_T$ac_delim
-LIBS!$LIBS$ac_delim
-build_alias!$build_alias$ac_delim
-host_alias!$host_alias$ac_delim
-target_alias!$target_alias$ac_delim
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-am__isrc!$am__isrc$ac_delim
-CYGPATH_W!$CYGPATH_W$ac_delim
-PACKAGE!$PACKAGE$ac_delim
-VERSION!$VERSION$ac_delim
-ACLOCAL!$ACLOCAL$ac_delim
-AUTOCONF!$AUTOCONF$ac_delim
-AUTOMAKE!$AUTOMAKE$ac_delim
-AUTOHEADER!$AUTOHEADER$ac_delim
-MAKEINFO!$MAKEINFO$ac_delim
-install_sh!$install_sh$ac_delim
-STRIP!$STRIP$ac_delim
-INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
-mkdir_p!$mkdir_p$ac_delim
-AWK!$AWK$ac_delim
-SET_MAKE!$SET_MAKE$ac_delim
-am__leading_dot!$am__leading_dot$ac_delim
-AMTAR!$AMTAR$ac_delim
-am__tar!$am__tar$ac_delim
-am__untar!$am__untar$ac_delim
-MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim
-MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim
-MAINT!$MAINT$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-host_os!$host_os$ac_delim
-CC!$CC$ac_delim
-CFLAGS!$CFLAGS$ac_delim
-LDFLAGS!$LDFLAGS$ac_delim
-CPPFLAGS!$CPPFLAGS$ac_delim
-ac_ct_CC!$ac_ct_CC$ac_delim
-EXEEXT!$EXEEXT$ac_delim
-OBJEXT!$OBJEXT$ac_delim
-DEPDIR!$DEPDIR$ac_delim
-am__include!$am__include$ac_delim
-am__quote!$am__quote$ac_delim
-AMDEP_TRUE!$AMDEP_TRUE$ac_delim
-AMDEP_FALSE!$AMDEP_FALSE$ac_delim
-AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
-CCDEPMODE!$CCDEPMODE$ac_delim
-am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
-am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
-SED!$SED$ac_delim
-GREP!$GREP$ac_delim
-EGREP!$EGREP$ac_delim
-LN_S!$LN_S$ac_delim
-ECHO!$ECHO$ac_delim
-AR!$AR$ac_delim
-RANLIB!$RANLIB$ac_delim
-DSYMUTIL!$DSYMUTIL$ac_delim
-NMEDIT!$NMEDIT$ac_delim
-CPP!$CPP$ac_delim
-CXX!$CXX$ac_delim
-_ACEOF
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
-    break
-  elif $ac_last_try; then
-    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
 
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
-  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
-  ac_eof=`expr $ac_eof + 1`
-fi
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
 
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-CEOF$ac_eof
-_ACEOF
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
 
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
 
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  cat >conf$$subs.sed <<_ACEOF
-CXXFLAGS!$CXXFLAGS$ac_delim
-ac_ct_CXX!$ac_ct_CXX$ac_delim
-CXXDEPMODE!$CXXDEPMODE$ac_delim
-am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
-am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
-CXXCPP!$CXXCPP$ac_delim
-F77!$F77$ac_delim
-FFLAGS!$FFLAGS$ac_delim
-ac_ct_F77!$ac_ct_F77$ac_delim
-LIBTOOL!$LIBTOOL$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-LTLIBOBJS!$LTLIBOBJS$ac_delim
-_ACEOF
+# 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=$hardcode_automatic
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 12; then
-    break
-  elif $ac_last_try; then
-    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
 
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
-  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
-  ac_eof=`expr $ac_eof + 1`
-fi
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
 
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
-_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
-_ACEOF
+# 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=$always_export_symbols
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[	 ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[	 ]*$//
-}'
-fi
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-fi # test -n "$CONFIG_FILES"
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
 
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
 
-for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
-do
-  case $ac_tag in
-  :[FHLC]) ac_mode=$ac_tag; continue;;
-  esac
-  case $ac_mode$ac_tag in
-  :[FHL]*:*);;
-  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-echo "$as_me: error: Invalid tag $ac_tag." >&2;}
-   { (exit 1); exit 1; }; };;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
 
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$tmp/stdin";;
-      *) # Look for the file first in the build tree, then in the source tree
-	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
-	 # because $ac_f cannot contain `:'.
-	 test -f "$ac_f" ||
-	   case $ac_f in
-	   [\\/$]*) false;;
-	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-	   esac ||
-	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-echo "$as_me: error: cannot find input file: $ac_f" >&2;}
-   { (exit 1); exit 1; }; };;
-      esac
-      ac_file_inputs="$ac_file_inputs $ac_f"
-    done
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
 
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
-    # use $as_me), people would be surprised to read:
-    #    /* config.h.  Generated by config.status.  */
-    configure_input="Generated from "`IFS=:
-	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-    fi
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
 
-    case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin";;
-    esac
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+  case $host_os in
+  aix3*)
+    cat <<\_LT_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
+_LT_EOF
     ;;
   esac
 
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_file" : 'X\(//\)[^/]' \| \
-	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  { as_dir="$ac_dir"
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-  ac_builddir=.
 
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
+ltmain="$ac_aux_dir/ltmain.sh"
 
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
 
+  # 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
 
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
+  case $xsi_shell in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
 
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
-  esac
-  ac_MKDIR_P=$MKDIR_P
-  case $MKDIR_P in
-  [\\/$]* | ?:[\\/]* ) ;;
-  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
   esac
-_ACEOF
+}
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
+# func_basename file
+func_basename ()
+{
+  func_basename_result="${1##*/}"
+}
 
-case `sed -n '/datarootdir/ {
-  p
-  q
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+  func_basename_result="${1##*/}"
 }
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-' $ac_file_inputs` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-  ac_datarootdir_hack='
-  s&@datadir@&$datadir&g
-  s&@docdir@&$docdir&g
-  s&@infodir@&$infodir&g
-  s&@localedir@&$localedir&g
-  s&@mandir@&$mandir&g
-    s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
 
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF
-  sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-s&@MKDIR_P@&$ac_MKDIR_P&;t t
-$ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+  # positional parameters, so assign one to ordinary parameter first.
+  func_stripname_result=${3}
+  func_stripname_result=${func_stripname_result#"${1}"}
+  func_stripname_result=${func_stripname_result%"${2}"}
+}
 
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
-echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
-
-  rm -f "$tmp/stdin"
-  case $ac_file in
-  -) cat "$tmp/out"; rm -f "$tmp/out";;
-  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=${1%%=*}
+  func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  case ${1} in
+    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+    *)    func_lo2o_result=${1} ;;
   esac
- ;;
-  :H)
-  #
-  # CONFIG_HEADER
-  #
-_ACEOF
+}
 
-# Transform confdefs.h into a sed script `conftest.defines', that
-# substitutes the proper values into config.h.in to produce config.h.
-rm -f conftest.defines conftest.tail
-# First, append a space to every undef/define line, to ease matching.
-echo 's/$/ /' >conftest.defines
-# Then, protect against being on the right side of a sed subst, or in
-# an unquoted here document, in config.status.  If some macros were
-# called several times there might be several #defines for the same
-# symbol, which is useless.  But do not sort them, since the last
-# AC_DEFINE must be honored.
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
-# NAME is the cpp macro being defined, VALUE is the value it is being given.
-# PARAMS is the parameter list in the macro definition--in most cases, it's
-# just an empty string.
-ac_dA='s,^\\([	 #]*\\)[^	 ]*\\([	 ]*'
-ac_dB='\\)[	 (].*,\\1define\\2'
-ac_dC=' '
-ac_dD=' ,'
-
-uniq confdefs.h |
-  sed -n '
-	t rset
-	:rset
-	s/^[	 ]*#[	 ]*define[	 ][	 ]*//
-	t ok
-	d
-	:ok
-	s/[\\&,]/\\&/g
-	s/^\('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
-	s/^\('"$ac_word_re"'\)[	 ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
-  ' >>conftest.defines
-
-# Remove the space that was appended to ease matching.
-# Then replace #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-# (The regexp can be short, since the line contains either #define or #undef.)
-echo 's/ $//
-s,^[	 #]*u.*,/* & */,' >>conftest.defines
-
-# Break up conftest.defines:
-ac_max_sed_lines=50
-
-# First sed command is:	 sed -f defines.sed $ac_file_inputs >"$tmp/out1"
-# Second one is:	 sed -f defines.sed "$tmp/out1" >"$tmp/out2"
-# Third one will be:	 sed -f defines.sed "$tmp/out2" >"$tmp/out1"
-# et cetera.
-ac_in='$ac_file_inputs'
-ac_out='"$tmp/out1"'
-ac_nxt='"$tmp/out2"'
-
-while :
-do
-  # Write a here document:
-    cat >>$CONFIG_STATUS <<_ACEOF
-    # First, check the format of the line:
-    cat >"\$tmp/defines.sed" <<\\CEOF
-/^[	 ]*#[	 ]*undef[	 ][	 ]*$ac_word_re[	 ]*\$/b def
-/^[	 ]*#[	 ]*define[	 ][	 ]*$ac_word_re[(	 ]/b def
-b
-:def
-_ACEOF
-  sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
-  echo 'CEOF
-    sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
-  ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
-  sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
-  grep . conftest.tail >/dev/null || break
-  rm -f conftest.defines
-  mv conftest.tail conftest.defines
-done
-rm -f conftest.defines conftest.tail
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=${1%.*}.lo
+}
 
-echo "ac_result=$ac_in" >>$CONFIG_STATUS
-cat >>$CONFIG_STATUS <<\_ACEOF
-  if test x"$ac_file" != x-; then
-    echo "/* $configure_input  */" >"$tmp/config.h"
-    cat "$ac_result" >>"$tmp/config.h"
-    if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
-      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      rm -f $ac_file
-      mv "$tmp/config.h" $ac_file
-    fi
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=$(( $* ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=${#1}
+}
+
+_LT_EOF
+    ;;
+  *) # Bourne compatible functions.
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
   else
-    echo "/* $configure_input  */"
-    cat "$ac_result"
+    func_dirname_result="$func_dirname_result${2}"
   fi
-  rm -f "$tmp/out12"
-# Compute $ac_file's index in $config_headers.
-_am_arg=$ac_file
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
-$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$_am_arg" : 'X\(//\)[^/]' \| \
-	 X"$_am_arg" : 'X\(//\)$' \| \
-	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$_am_arg" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`/stamp-h$_am_stamp_count
- ;;
+}
 
-  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
- ;;
+# func_basename file
+func_basename ()
+{
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+  case ${2} in
+    .*) func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+    *)  func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
   esac
+}
 
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
 
-  case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # Grep'ing the whole file is not good either: AIX grep has a line
-  # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-    dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$mf" : 'X\(//\)[^/]' \| \
-	 X"$mf" : 'X\(//\)$' \| \
-	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$mf" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$file" : 'X\(//\)[^/]' \| \
-	 X"$file" : 'X\(//\)$' \| \
-	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-    { as_dir=$dirpart/$fdir
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=`expr "$@"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$1+=\$2"
+}
+_LT_EOF
+    ;;
+  *)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$1=\$$1\$2"
+}
+
+_LT_EOF
+    ;;
   esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
+
+
+  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
  ;;
 
   esac
 done # for ac_tag
 
 
-{ (exit 0); exit 0; }
+as_fn_exit 0
 _ACEOF
-chmod +x $CONFIG_STATUS
 ac_clean_files=$ac_clean_files_save
 
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
 
 # configure is writing to config.log, and then calls config.status.
 # config.status does its own redirection, appending to config.log.
@@ -22151,6 +13075,10 @@ if test "$no_create" != yes; then
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || { (exit 1); exit 1; }
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
diff --git a/ext/libev/configure.ac b/ext/libev/configure.ac
index 8bb910d..31d0a25 100644
--- a/ext/libev/configure.ac
+++ b/ext/libev/configure.ac
@@ -1,17 +1,24 @@
+orig_CFLAGS="$CFLAGS"
+
 AC_INIT
 AC_CONFIG_SRCDIR([ev_epoll.c])
 
-AM_INIT_AUTOMAKE(libev,3.9) dnl also update ev.h!
+AM_INIT_AUTOMAKE(libev,4.11) dnl also update ev.h!
 AC_CONFIG_HEADERS([config.h])
 AM_MAINTAINER_MODE
 
-AC_PROG_INSTALL
-AC_PROG_LIBTOOL
+AC_PROG_CC
 
-if test "x$GCC" = xyes ; then
-  CFLAGS="$CFLAGS -O3"
+dnl Supply default CFLAGS, if not specified
+if test -z "$orig_CFLAGS"; then
+  if test x$GCC = xyes; then
+    CFLAGS="-g -O3"
+  fi
 fi
 
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+
 m4_include([libev.m4])
 
 AC_CONFIG_FILES([Makefile])
diff --git a/ext/libev/depcomp b/ext/libev/depcomp
new file mode 100755
index 0000000..df8eea7
--- /dev/null
+++ b/ext/libev/depcomp
@@ -0,0 +1,630 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+   # This is just like msvisualcpp but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u="sed s,\\\\\\\\,/,g"
+   depmode=msvisualcpp
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> "$depfile"
+    echo >> "$depfile"
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
+    "$@" -Wc,-M
+  else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
+    "$@" -M
+  fi
+  stat=$?
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${
+	       s/^ *//
+	       s/ \\*$//
+	       s/$/:/
+	       p
+	     }' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mechanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no eat=no
+  for arg
+  do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    if test $eat = yes; then
+      eat=no
+      continue
+    fi
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -arch)
+      eat=yes ;;
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix=`echo "$object" | sed 's/^.*\././'`
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E 2>/dev/null |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvcmsys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/ext/libev/ev++.h b/ext/libev/ev++.h
index 73bcf32..c5a0896 100644
--- a/ext/libev/ev++.h
+++ b/ext/libev/ev++.h
@@ -1,19 +1,19 @@
 /*
  * libev simple C++ wrapper classes
  *
- * Copyright (c) 2007,2008 Marc Alexander Lehmann <libev at schmorp.de>
+ * Copyright (c) 2007,2008,2010 Marc Alexander Lehmann <libev at schmorp.de>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without modifica-
  * tion, are permitted provided that the following conditions are met:
- * 
+ *
  *   1.  Redistributions of source code must retain the above copyright notice,
  *       this list of conditions and the following disclaimer.
- * 
+ *
  *   2.  Redistributions in binary form must reproduce the above copyright
  *       notice, this list of conditions and the following disclaimer in the
  *       documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
  * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
@@ -58,13 +58,15 @@ namespace ev {
 
   typedef ev_tstamp tstamp;
 
-  enum
-  {
+  enum {
     UNDEF    = EV_UNDEF,
     NONE     = EV_NONE,
     READ     = EV_READ,
     WRITE    = EV_WRITE,
+#if EV_COMPAT3
     TIMEOUT  = EV_TIMEOUT,
+#endif
+    TIMER    = EV_TIMER,
     PERIODIC = EV_PERIODIC,
     SIGNAL   = EV_SIGNAL,
     CHILD    = EV_CHILD,
@@ -76,7 +78,7 @@ namespace ev {
     ASYNC    = EV_ASYNC,
     EMBED    = EV_EMBED,
 #   undef ERROR // some systems stupidly #define ERROR
-    ERROR    = EV_ERROR,
+    ERROR    = EV_ERROR
   };
 
   enum
@@ -95,14 +97,18 @@ namespace ev {
 
   enum
   {
+#if EV_COMPAT3
     NONBLOCK = EVLOOP_NONBLOCK,
-    ONESHOT  = EVLOOP_ONESHOT
+    ONESHOT  = EVLOOP_ONESHOT,
+#endif
+    NOWAIT   = EVRUN_NOWAIT,
+    ONCE     = EVRUN_ONCE
   };
 
   enum how_t
   {
-    ONE = EVUNLOOP_ONE,
-    ALL = EVUNLOOP_ALL
+    ONE = EVBREAK_ONE,
+    ALL = EVBREAK_ALL
   };
 
   struct bad_loop
@@ -188,23 +194,31 @@ namespace ev {
     }
 #endif
 
+#if EV_COMPAT3
     void loop (int flags = 0)
     {
-      ev_loop (EV_AX_ flags);
+      ev_run (EV_AX_ flags);
     }
 
     void unloop (how_t how = ONE) throw ()
     {
-      ev_unloop (EV_AX_ how);
+      ev_break (EV_AX_ how);
+    }
+#endif
+
+    void run (int flags = 0)
+    {
+      ev_run (EV_AX_ flags);
+    }
+
+    void break_loop (how_t how = ONE) throw ()
+    {
+      ev_break (EV_AX_ how);
     }
 
     void post_fork () throw ()
     {
-#if EV_MULTIPLICITY
       ev_loop_fork (EV_AX);
-#else
-      ev_default_fork ();
-#endif
     }
 
     unsigned int backend () const throw ()
@@ -227,15 +241,15 @@ namespace ev {
       ev_unref (EV_AX);
     }
 
-#if EV_MINIMAL < 2
-    unsigned int count () const throw ()
+#if EV_FEATURE_API
+    unsigned int iteration () const throw ()
     {
-      return ev_loop_count (EV_AX);
+      return ev_iteration (EV_AX);
     }
 
     unsigned int depth () const throw ()
     {
-      return ev_loop_depth (EV_AX);
+      return ev_depth (EV_AX);
     }
 
     void set_io_collect_interval (tstamp interval) throw ()
@@ -377,11 +391,6 @@ namespace ev {
         throw bad_loop ();
     }
 
-    ~default_loop () throw ()
-    {
-      ev_default_destroy ();
-    }
-
   private:
     default_loop (const default_loop &);
     default_loop &operator = (const default_loop &);
@@ -415,6 +424,7 @@ namespace ev {
     #if EV_MULTIPLICITY
       EV_PX;
 
+      // loop set
       void set (EV_P) throw ()
       {
         this->EV_A = EV_A;
@@ -480,7 +490,7 @@ namespace ev {
     template<class K, void (K::*method)()>
     static void method_noargs_thunk (EV_P_ ev_watcher *w, int revents)
     {
-      static_cast<K *>(w->data)->*method
+      (static_cast<K *>(w->data)->*method)
         ();
     }
 
@@ -507,9 +517,9 @@ namespace ev {
     }
   };
 
-  inline tstamp now () throw ()
+  inline tstamp now (EV_P) throw ()
   {
-    return ev_time ();
+    return ev_now (EV_A);
   }
 
   inline void delay (tstamp interval) throw ()
@@ -674,6 +684,7 @@ namespace ev {
   EV_END_WATCHER (periodic, periodic)
   #endif
 
+  #if EV_SIGNAL_ENABLE
   EV_BEGIN_WATCHER (sig, signal)
     void set (int signum) throw ()
     {
@@ -689,7 +700,9 @@ namespace ev {
       start ();
     }
   EV_END_WATCHER (sig, signal)
+  #endif
 
+  #if EV_CHILD_ENABLE
   EV_BEGIN_WATCHER (child, child)
     void set (int pid, int trace = 0) throw ()
     {
@@ -705,6 +718,7 @@ namespace ev {
       start ();
     }
   EV_END_WATCHER (child, child)
+  #endif
 
   #if EV_STAT_ENABLE
   EV_BEGIN_WATCHER (stat, stat)
@@ -730,19 +744,23 @@ namespace ev {
   EV_END_WATCHER (stat, stat)
   #endif
 
-#if EV_IDLE_ENABLE
+  #if EV_IDLE_ENABLE
   EV_BEGIN_WATCHER (idle, idle)
     void set () throw () { }
   EV_END_WATCHER (idle, idle)
-#endif
+  #endif
 
+  #if EV_PREPARE_ENABLE
   EV_BEGIN_WATCHER (prepare, prepare)
     void set () throw () { }
   EV_END_WATCHER (prepare, prepare)
+  #endif
 
+  #if EV_CHECK_ENABLE
   EV_BEGIN_WATCHER (check, check)
     void set () throw () { }
   EV_END_WATCHER (check, check)
+  #endif
 
   #if EV_EMBED_ENABLE
   EV_BEGIN_WATCHER (embed, embed)
@@ -775,8 +793,6 @@ namespace ev {
 
   #if EV_ASYNC_ENABLE
   EV_BEGIN_WATCHER (async, async)
-    void set () throw () { }
-
     void send () throw ()
     {
       ev_async_send (EV_A_ static_cast<ev_async *>(this));
diff --git a/ext/libev/ev.c b/ext/libev/ev.c
index ccd202b..fe1b6ac 100644
--- a/ext/libev/ev.c
+++ b/ext/libev/ev.c
@@ -1,19 +1,19 @@
 /*
  * libev event processing core, watcher management
  *
- * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann <libev at schmorp.de>
+ * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev at schmorp.de>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without modifica-
  * tion, are permitted provided that the following conditions are met:
- * 
+ *
  *   1.  Redistributions of source code must retain the above copyright notice,
  *       this list of conditions and the following disclaimer.
- * 
+ *
  *   2.  Redistributions in binary form must reproduce the above copyright
  *       notice, this list of conditions and the following disclaimer in the
  *       documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
  * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
@@ -37,10 +37,6 @@
  * either the BSD or the GPL.
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* this big block deduces configuration from config.h */
 #ifndef EV_STANDALONE
 # ifdef EV_CONFIG_H
@@ -49,6 +45,12 @@ extern "C" {
 #  include "config.h"
 # endif
 
+#if HAVE_FLOOR
+# ifndef EV_USE_FLOOR
+#  define EV_USE_FLOOR 1
+# endif
+#endif
+
 # if HAVE_CLOCK_SYSCALL
 #  ifndef EV_USE_CLOCK_SYSCALL
 #   define EV_USE_CLOCK_SYSCALL 1
@@ -79,81 +81,89 @@ extern "C" {
 #  endif
 # endif
 
-# ifndef EV_USE_NANOSLEEP
-#  if HAVE_NANOSLEEP
-#   define EV_USE_NANOSLEEP 1
-#  else
-#   define EV_USE_NANOSLEEP 0
+# if HAVE_NANOSLEEP
+#  ifndef EV_USE_NANOSLEEP
+#    define EV_USE_NANOSLEEP EV_FEATURE_OS
 #  endif
+# else
+#   undef EV_USE_NANOSLEEP
+#   define EV_USE_NANOSLEEP 0
 # endif
 
-# ifndef EV_USE_SELECT
-#  if HAVE_SELECT && HAVE_SYS_SELECT_H
-#   define EV_USE_SELECT 1
-#  else
-#   define EV_USE_SELECT 0
+# if HAVE_SELECT && HAVE_SYS_SELECT_H
+#  ifndef EV_USE_SELECT
+#   define EV_USE_SELECT EV_FEATURE_BACKENDS
 #  endif
+# else
+#  undef EV_USE_SELECT
+#  define EV_USE_SELECT 0
 # endif
 
-# ifndef EV_USE_POLL
-#  if HAVE_POLL && HAVE_POLL_H
-#   define EV_USE_POLL 1
-#  else
-#   define EV_USE_POLL 0
+# if HAVE_POLL && HAVE_POLL_H
+#  ifndef EV_USE_POLL
+#   define EV_USE_POLL EV_FEATURE_BACKENDS
 #  endif
+# else
+#  undef EV_USE_POLL
+#  define EV_USE_POLL 0
 # endif
    
-# ifndef EV_USE_EPOLL
-#  if HAVE_EPOLL_CTL && HAVE_SYS_EPOLL_H
-#   define EV_USE_EPOLL 1
-#  else
-#   define EV_USE_EPOLL 0
+# if HAVE_EPOLL_CTL && HAVE_SYS_EPOLL_H
+#  ifndef EV_USE_EPOLL
+#   define EV_USE_EPOLL EV_FEATURE_BACKENDS
 #  endif
+# else
+#  undef EV_USE_EPOLL
+#  define EV_USE_EPOLL 0
 # endif
    
-# ifndef EV_USE_KQUEUE
-#  if HAVE_KQUEUE && HAVE_SYS_EVENT_H && HAVE_SYS_QUEUE_H
-#   define EV_USE_KQUEUE 1
-#  else
-#   define EV_USE_KQUEUE 0
+# if HAVE_KQUEUE && HAVE_SYS_EVENT_H
+#  ifndef EV_USE_KQUEUE
+#   define EV_USE_KQUEUE EV_FEATURE_BACKENDS
 #  endif
+# else
+#  undef EV_USE_KQUEUE
+#  define EV_USE_KQUEUE 0
 # endif
    
-# ifndef EV_USE_PORT
-#  if HAVE_PORT_H && HAVE_PORT_CREATE
-#   define EV_USE_PORT 1
-#  else
-#   define EV_USE_PORT 0
+# if HAVE_PORT_H && HAVE_PORT_CREATE
+#  ifndef EV_USE_PORT
+#   define EV_USE_PORT EV_FEATURE_BACKENDS
 #  endif
+# else
+#  undef EV_USE_PORT
+#  define EV_USE_PORT 0
 # endif
 
-# ifndef EV_USE_INOTIFY
-#  if HAVE_INOTIFY_INIT && HAVE_SYS_INOTIFY_H
-#   define EV_USE_INOTIFY 1
-#  else
-#   define EV_USE_INOTIFY 0
+# if HAVE_INOTIFY_INIT && HAVE_SYS_INOTIFY_H
+#  ifndef EV_USE_INOTIFY
+#   define EV_USE_INOTIFY EV_FEATURE_OS
 #  endif
+# else
+#  undef EV_USE_INOTIFY
+#  define EV_USE_INOTIFY 0
 # endif
 
-# ifndef EV_USE_SIGNALFD
-#  if HAVE_SIGNALFD && HAVE_SYS_SIGNALFD_H
-#   define EV_USE_SIGNALFD 1
-#  else
-#   define EV_USE_SIGNALFD 0
+# if HAVE_SIGNALFD && HAVE_SYS_SIGNALFD_H
+#  ifndef EV_USE_SIGNALFD
+#   define EV_USE_SIGNALFD EV_FEATURE_OS
 #  endif
+# else
+#  undef EV_USE_SIGNALFD
+#  define EV_USE_SIGNALFD 0
 # endif
 
-# ifndef EV_USE_EVENTFD
-#  if HAVE_EVENTFD
-#   define EV_USE_EVENTFD 1
-#  else
-#   define EV_USE_EVENTFD 0
+# if HAVE_EVENTFD
+#  ifndef EV_USE_EVENTFD
+#   define EV_USE_EVENTFD EV_FEATURE_OS
 #  endif
+# else
+#  undef EV_USE_EVENTFD
+#  define EV_USE_EVENTFD 0
 # endif
  
 #endif
 
-#include <math.h>
 #include <stdlib.h>
 #include <string.h>
 #include <fcntl.h>
@@ -165,6 +175,7 @@ extern "C" {
 #include <errno.h>
 #include <sys/types.h>
 #include <time.h>
+#include <limits.h>
 
 #include <signal.h>
 
@@ -174,6 +185,17 @@ extern "C" {
 # include "ev.h"
 #endif
 
+#if EV_NO_THREADS
+# undef EV_NO_SMP
+# define EV_NO_SMP 1
+# undef ECB_NO_THREADS
+# define ECB_NO_THREADS 1
+#endif
+#if EV_NO_SMP
+# undef EV_NO_SMP
+# define ECB_NO_SMP 1
+#endif
+
 #ifndef _WIN32
 # include <sys/time.h>
 # include <sys/wait.h>
@@ -185,8 +207,17 @@ extern "C" {
 # ifndef EV_SELECT_IS_WINSOCKET
 #  define EV_SELECT_IS_WINSOCKET 1
 # endif
+# undef EV_AVOID_STDIO
 #endif
 
+/* OS X, in its infinite idiocy, actually HARDCODES
+ * a limit of 1024 into their select. Where people have brains,
+ * OS X engineers apparently have a vacuum. Or maybe they were
+ * ordered to have a vacuum, or they do anything for money.
+ * This might help. Or not.
+ */
+#define _DARWIN_UNLIMITED_SELECT 1
+
 /* this block tries to deduce configuration from header-defined symbols and defaults */
 
 /* try to deduce the maximum number of signals on this platform */
@@ -207,18 +238,23 @@ extern "C" {
 #elif defined (MAX_SIG)
 # define EV_NSIG (MAX_SIG+1)
 #elif defined (SIGARRAYSIZE)
-# define EV_NSIG SIGARRAYSIZE /* Assume ary[SIGARRAYSIZE] */
+# define EV_NSIG (SIGARRAYSIZE) /* Assume ary[SIGARRAYSIZE] */
 #elif defined (_sys_nsig)
 # define EV_NSIG (_sys_nsig) /* Solaris 2.5 */
 #else
 # error "unable to find value for NSIG, please report"
-/* to make it compile regardless, just remove the above line */
+/* to make it compile regardless, just remove the above line, */
+/* but consider reporting it, too! :) */
 # define EV_NSIG 65
 #endif
 
+#ifndef EV_USE_FLOOR
+# define EV_USE_FLOOR 0
+#endif
+
 #ifndef EV_USE_CLOCK_SYSCALL
 # if __linux && __GLIBC__ >= 2
-#  define EV_USE_CLOCK_SYSCALL 1
+#  define EV_USE_CLOCK_SYSCALL EV_FEATURE_OS
 # else
 #  define EV_USE_CLOCK_SYSCALL 0
 # endif
@@ -226,7 +262,7 @@ extern "C" {
 
 #ifndef EV_USE_MONOTONIC
 # if defined (_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0
-#  define EV_USE_MONOTONIC 1
+#  define EV_USE_MONOTONIC EV_FEATURE_OS
 # else
 #  define EV_USE_MONOTONIC 0
 # endif
@@ -238,27 +274,27 @@ extern "C" {
 
 #ifndef EV_USE_NANOSLEEP
 # if _POSIX_C_SOURCE >= 199309L
-#  define EV_USE_NANOSLEEP 1
+#  define EV_USE_NANOSLEEP EV_FEATURE_OS
 # else
 #  define EV_USE_NANOSLEEP 0
 # endif
 #endif
 
 #ifndef EV_USE_SELECT
-# define EV_USE_SELECT 1
+# define EV_USE_SELECT EV_FEATURE_BACKENDS
 #endif
 
 #ifndef EV_USE_POLL
 # ifdef _WIN32
 #  define EV_USE_POLL 0
 # else
-#  define EV_USE_POLL 1
+#  define EV_USE_POLL EV_FEATURE_BACKENDS
 # endif
 #endif
 
 #ifndef EV_USE_EPOLL
 # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 4))
-#  define EV_USE_EPOLL 1
+#  define EV_USE_EPOLL EV_FEATURE_BACKENDS
 # else
 #  define EV_USE_EPOLL 0
 # endif
@@ -274,31 +310,23 @@ extern "C" {
 
 #ifndef EV_USE_INOTIFY
 # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 4))
-#  define EV_USE_INOTIFY 1
+#  define EV_USE_INOTIFY EV_FEATURE_OS
 # else
 #  define EV_USE_INOTIFY 0
 # endif
 #endif
 
 #ifndef EV_PID_HASHSIZE
-# if EV_MINIMAL
-#  define EV_PID_HASHSIZE 1
-# else
-#  define EV_PID_HASHSIZE 16
-# endif
+# define EV_PID_HASHSIZE EV_FEATURE_DATA ? 16 : 1
 #endif
 
 #ifndef EV_INOTIFY_HASHSIZE
-# if EV_MINIMAL
-#  define EV_INOTIFY_HASHSIZE 1
-# else
-#  define EV_INOTIFY_HASHSIZE 16
-# endif
+# define EV_INOTIFY_HASHSIZE EV_FEATURE_DATA ? 16 : 1
 #endif
 
 #ifndef EV_USE_EVENTFD
 # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))
-#  define EV_USE_EVENTFD 1
+#  define EV_USE_EVENTFD EV_FEATURE_OS
 # else
 #  define EV_USE_EVENTFD 0
 # endif
@@ -306,7 +334,7 @@ extern "C" {
 
 #ifndef EV_USE_SIGNALFD
 # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))
-#  define EV_USE_SIGNALFD 1
+#  define EV_USE_SIGNALFD EV_FEATURE_OS
 # else
 #  define EV_USE_SIGNALFD 0
 # endif
@@ -319,15 +347,15 @@ extern "C" {
 #endif
 
 #ifndef EV_VERIFY
-# define EV_VERIFY !EV_MINIMAL
+# define EV_VERIFY (EV_FEATURE_API ? 1 : 0)
 #endif
 
 #ifndef EV_USE_4HEAP
-# define EV_USE_4HEAP !EV_MINIMAL
+# define EV_USE_4HEAP EV_FEATURE_DATA
 #endif
 
 #ifndef EV_HEAP_CACHE_AT
-# define EV_HEAP_CACHE_AT !EV_MINIMAL
+# define EV_HEAP_CACHE_AT EV_FEATURE_DATA
 #endif
 
 /* on linux, we can use a (slow) syscall to avoid a dependency on pthread, */
@@ -346,6 +374,12 @@ extern "C" {
 
 /* this block fixes any misconfiguration where we know we run into trouble otherwise */
 
+#ifdef _AIX
+/* AIX has a completely broken poll.h header */
+# undef EV_USE_POLL
+# define EV_USE_POLL 0
+#endif
+
 #ifndef CLOCK_MONOTONIC
 # undef EV_USE_MONOTONIC
 # define EV_USE_MONOTONIC 0
@@ -362,13 +396,13 @@ extern "C" {
 #endif
 
 #if !EV_USE_NANOSLEEP
-# ifndef _WIN32
+/* hp-ux has it in sys/time.h, which we unconditionally include above */
+# if !defined(_WIN32) && !defined(__hpux)
 #  include <sys/select.h>
 # endif
 #endif
 
 #if EV_USE_INOTIFY
-# include <sys/utsname.h>
 # include <sys/statfs.h>
 # include <sys/inotify.h>
 /* some very old inotify.h headers don't have IN_DONT_FOLLOW */
@@ -395,13 +429,7 @@ extern "C" {
 #   define EFD_CLOEXEC 02000000
 #  endif
 # endif
-# ifdef __cplusplus
-extern "C" {
-# endif
-int eventfd (unsigned int initval, int flags);
-# ifdef __cplusplus
-}
-# endif
+EV_CPP(extern "C") int (eventfd) (unsigned int initval, int flags);
 #endif
 
 #if EV_USE_SIGNALFD
@@ -417,62 +445,518 @@ int eventfd (unsigned int initval, int flags);
 #   define SFD_CLOEXEC 02000000
 #  endif
 # endif
-# ifdef __cplusplus
-extern "C" {
-# endif
-int signalfd (int fd, const sigset_t *mask, int flags);
+EV_CPP (extern "C") int signalfd (int fd, const sigset_t *mask, int flags);
 
 struct signalfd_siginfo
 {
   uint32_t ssi_signo;
   char pad[128 - sizeof (uint32_t)];
 };
-# ifdef __cplusplus
-}
-# endif
 #endif
 
-
 /**/
 
 #if EV_VERIFY >= 3
-# define EV_FREQUENT_CHECK ev_loop_verify (EV_A)
+# define EV_FREQUENT_CHECK ev_verify (EV_A)
 #else
 # define EV_FREQUENT_CHECK do { } while (0)
 #endif
 
 /*
- * This is used to avoid floating point rounding problems.
- * It is added to ev_rt_now when scheduling periodics
- * to ensure progress, time-wise, even when rounding
- * errors are against us.
+ * This is used to work around floating point rounding problems.
  * This value is good at least till the year 4000.
- * Better solutions welcome.
  */
-#define TIME_EPSILON  0.0001220703125 /* 1/8192 */
+#define MIN_INTERVAL  0.0001220703125 /* 1/2**13, good till 4000 */
+/*#define MIN_INTERVAL  0.00000095367431640625 /* 1/2**20, good till 2200 */
 
 #define MIN_TIMEJUMP  1. /* minimum timejump that gets detected (if monotonic clock available) */
 #define MAX_BLOCKTIME 59.743 /* never wait longer than this time (to detect time jumps) */
 
-#if __GNUC__ >= 4
-# define expect(expr,value)         __builtin_expect ((expr),(value))
-# define noinline                   __attribute__ ((noinline))
+#define EV_TV_SET(tv,t) do { tv.tv_sec = (long)t; tv.tv_usec = (long)((t - tv.tv_sec) * 1e6); } while (0)
+#define EV_TS_SET(ts,t) do { ts.tv_sec = (long)t; ts.tv_nsec = (long)((t - ts.tv_sec) * 1e9); } while (0)
+
+/* the following is ecb.h embedded into libev - use update_ev_c to update from an external copy */
+/* ECB.H BEGIN */
+/*
+ * libecb - http://software.schmorp.de/pkg/libecb
+ *
+ * Copyright (©) 2009-2012 Marc Alexander Lehmann <libecb at schmorp.de>
+ * Copyright (©) 2011 Emanuele Giaquinta
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, are permitted provided that the following conditions are met:
+ *
+ *   1.  Redistributions of source code must retain the above copyright notice,
+ *       this list of conditions and the following disclaimer.
+ *
+ *   2.  Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
+ * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
+ * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
+ * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ECB_H
+#define ECB_H
+
+#ifdef _WIN32
+  typedef   signed char   int8_t;
+  typedef unsigned char  uint8_t;
+  typedef   signed short  int16_t;
+  typedef unsigned short uint16_t;
+  typedef   signed int    int32_t;
+  typedef unsigned int   uint32_t;
+  #if __GNUC__
+    typedef   signed long long int64_t;
+    typedef unsigned long long uint64_t;
+  #else /* _MSC_VER || __BORLANDC__ */
+    typedef   signed __int64   int64_t;
+    typedef unsigned __int64   uint64_t;
+  #endif
 #else
-# define expect(expr,value)         (expr)
-# define noinline
-# if __STDC_VERSION__ < 199901L && __GNUC__ < 2
-#  define inline
-# endif
+  #include <inttypes.h>
 #endif
 
-#define expect_false(expr) expect ((expr) != 0, 0)
-#define expect_true(expr)  expect ((expr) != 0, 1)
-#define inline_size        static inline
+/* many compilers define _GNUC_ to some versions but then only implement
+ * what their idiot authors think are the "more important" extensions,
+ * causing enormous grief in return for some better fake benchmark numbers.
+ * or so.
+ * we try to detect these and simply assume they are not gcc - if they have
+ * an issue with that they should have done it right in the first place.
+ */
+#ifndef ECB_GCC_VERSION
+  #if !defined(__GNUC_MINOR__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(__llvm__) || defined(__clang__)
+    #define ECB_GCC_VERSION(major,minor) 0
+  #else
+    #define ECB_GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
+  #endif
+#endif
 
-#if EV_MINIMAL
-# define inline_speed      static noinline
+/*****************************************************************************/
+
+/* ECB_NO_THREADS - ecb is not used by multiple threads, ever */
+/* ECB_NO_SMP     - ecb might be used in multiple threads, but only on a single cpu */
+
+#if ECB_NO_THREADS
+# define ECB_NO_SMP 1
+#endif
+
+#if ECB_NO_THREADS || ECB_NO_SMP
+  #define ECB_MEMORY_FENCE do { } while (0)
+#endif
+
+#ifndef ECB_MEMORY_FENCE
+  #if ECB_GCC_VERSION(2,5) || defined(__INTEL_COMPILER) || (__llvm__ && __GNUC__) || __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110
+    #if __i386 || __i386__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("lock; orb $0, -1(%%esp)" : : : "memory")
+      #define ECB_MEMORY_FENCE_ACQUIRE ECB_MEMORY_FENCE /* non-lock xchg might be enough */
+      #define ECB_MEMORY_FENCE_RELEASE do { } while (0) /* unlikely to change in future cpus */
+    #elif __amd64 || __amd64__ || __x86_64 || __x86_64__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("mfence" : : : "memory")
+      #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("lfence" : : : "memory")
+      #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("sfence") /* play safe - not needed in any current cpu */
+    #elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("sync" : : : "memory")
+    #elif defined(__ARM_ARCH_6__ ) || defined(__ARM_ARCH_6J__ ) \
+       || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6ZK__)
+      #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mcr p15,0,%0,c7,c10,5" : : "r" (0) : "memory")
+    #elif defined(__ARM_ARCH_7__ ) || defined(__ARM_ARCH_7A__ ) \
+       || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7R__ )
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("dmb" : : : "memory")
+    #elif __sparc || __sparc__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("membar #LoadStore | #LoadLoad | #StoreStore | #StoreLoad | " : : : "memory")
+      #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad"                               : : : "memory")
+      #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("membar #LoadStore |             #StoreStore")
+    #elif defined(__s390__) || defined(__s390x__)
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("bcr 15,0" : : : "memory")
+    #endif
+  #endif
+#endif
+
+#ifndef ECB_MEMORY_FENCE
+  #if ECB_GCC_VERSION(4,4) || defined(__INTEL_COMPILER) || defined(__clang__)
+    #define ECB_MEMORY_FENCE         __sync_synchronize ()
+    /*#define ECB_MEMORY_FENCE_ACQUIRE ({ char dummy = 0; __sync_lock_test_and_set (&dummy, 1); }) */
+    /*#define ECB_MEMORY_FENCE_RELEASE ({ char dummy = 1; __sync_lock_release      (&dummy   ); }) */
+  #elif _MSC_VER >= 1400 /* VC++ 2005 */
+    #pragma intrinsic(_ReadBarrier,_WriteBarrier,_ReadWriteBarrier)
+    #define ECB_MEMORY_FENCE         _ReadWriteBarrier ()
+    #define ECB_MEMORY_FENCE_ACQUIRE _ReadWriteBarrier () /* according to msdn, _ReadBarrier is not a load fence */
+    #define ECB_MEMORY_FENCE_RELEASE _WriteBarrier ()
+  #elif defined(_WIN32)
+    #include <WinNT.h>
+    #define ECB_MEMORY_FENCE         MemoryBarrier () /* actually just xchg on x86... scary */
+  #elif __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110
+    #include <mbarrier.h>
+    #define ECB_MEMORY_FENCE         __machine_rw_barrier ()
+    #define ECB_MEMORY_FENCE_ACQUIRE __machine_r_barrier  ()
+    #define ECB_MEMORY_FENCE_RELEASE __machine_w_barrier  ()
+  #endif
+#endif
+
+#ifndef ECB_MEMORY_FENCE
+  #if !ECB_AVOID_PTHREADS
+    /*
+     * if you get undefined symbol references to pthread_mutex_lock,
+     * or failure to find pthread.h, then you should implement
+     * the ECB_MEMORY_FENCE operations for your cpu/compiler
+     * OR provide pthread.h and link against the posix thread library
+     * of your system.
+     */
+    #include <pthread.h>
+    #define ECB_NEEDS_PTHREADS 1
+    #define ECB_MEMORY_FENCE_NEEDS_PTHREADS 1
+
+    static pthread_mutex_t ecb_mf_lock = PTHREAD_MUTEX_INITIALIZER;
+    #define ECB_MEMORY_FENCE do { pthread_mutex_lock (&ecb_mf_lock); pthread_mutex_unlock (&ecb_mf_lock); } while (0)
+  #endif
+#endif
+
+#if !defined(ECB_MEMORY_FENCE_ACQUIRE) && defined(ECB_MEMORY_FENCE)
+  #define ECB_MEMORY_FENCE_ACQUIRE ECB_MEMORY_FENCE
+#endif
+
+#if !defined(ECB_MEMORY_FENCE_RELEASE) && defined(ECB_MEMORY_FENCE)
+  #define ECB_MEMORY_FENCE_RELEASE ECB_MEMORY_FENCE
+#endif
+
+/*****************************************************************************/
+
+#define ECB_C99 (__STDC_VERSION__ >= 199901L)
+
+#if __cplusplus
+  #define ecb_inline static inline
+#elif ECB_GCC_VERSION(2,5)
+  #define ecb_inline static __inline__
+#elif ECB_C99
+  #define ecb_inline static inline
+#else
+  #define ecb_inline static
+#endif
+
+#if ECB_GCC_VERSION(3,3)
+  #define ecb_restrict __restrict__
+#elif ECB_C99
+  #define ecb_restrict restrict
+#else
+  #define ecb_restrict
+#endif
+
+typedef int ecb_bool;
+
+#define ECB_CONCAT_(a, b) a ## b
+#define ECB_CONCAT(a, b) ECB_CONCAT_(a, b)
+#define ECB_STRINGIFY_(a) # a
+#define ECB_STRINGIFY(a) ECB_STRINGIFY_(a)
+
+#define ecb_function_ ecb_inline
+
+#if ECB_GCC_VERSION(3,1)
+  #define ecb_attribute(attrlist)        __attribute__(attrlist)
+  #define ecb_is_constant(expr)          __builtin_constant_p (expr)
+  #define ecb_expect(expr,value)         __builtin_expect ((expr),(value))
+  #define ecb_prefetch(addr,rw,locality) __builtin_prefetch (addr, rw, locality)
+#else
+  #define ecb_attribute(attrlist)
+  #define ecb_is_constant(expr)          0
+  #define ecb_expect(expr,value)         (expr)
+  #define ecb_prefetch(addr,rw,locality)
+#endif
+
+/* no emulation for ecb_decltype */
+#if ECB_GCC_VERSION(4,5)
+  #define ecb_decltype(x) __decltype(x)
+#elif ECB_GCC_VERSION(3,0)
+  #define ecb_decltype(x) __typeof(x)
+#endif
+
+#define ecb_noinline   ecb_attribute ((__noinline__))
+#define ecb_noreturn   ecb_attribute ((__noreturn__))
+#define ecb_unused     ecb_attribute ((__unused__))
+#define ecb_const      ecb_attribute ((__const__))
+#define ecb_pure       ecb_attribute ((__pure__))
+
+#if ECB_GCC_VERSION(4,3)
+  #define ecb_artificial ecb_attribute ((__artificial__))
+  #define ecb_hot        ecb_attribute ((__hot__))
+  #define ecb_cold       ecb_attribute ((__cold__))
+#else
+  #define ecb_artificial
+  #define ecb_hot
+  #define ecb_cold
+#endif
+
+/* put around conditional expressions if you are very sure that the  */
+/* expression is mostly true or mostly false. note that these return */
+/* booleans, not the expression.                                     */
+#define ecb_expect_false(expr) ecb_expect (!!(expr), 0)
+#define ecb_expect_true(expr)  ecb_expect (!!(expr), 1)
+/* for compatibility to the rest of the world */
+#define ecb_likely(expr)   ecb_expect_true  (expr)
+#define ecb_unlikely(expr) ecb_expect_false (expr)
+
+/* count trailing zero bits and count # of one bits */
+#if ECB_GCC_VERSION(3,4)
+  /* we assume int == 32 bit, long == 32 or 64 bit and long long == 64 bit */
+  #define ecb_ld32(x)      (__builtin_clz      (x) ^ 31)
+  #define ecb_ld64(x)      (__builtin_clzll    (x) ^ 63)
+  #define ecb_ctz32(x)      __builtin_ctz      (x)
+  #define ecb_ctz64(x)      __builtin_ctzll    (x)
+  #define ecb_popcount32(x) __builtin_popcount (x)
+  /* no popcountll */
+#else
+  ecb_function_ int ecb_ctz32 (uint32_t x) ecb_const;
+  ecb_function_ int
+  ecb_ctz32 (uint32_t x)
+  {
+    int r = 0;
+
+    x &= ~x + 1; /* this isolates the lowest bit */
+
+#if ECB_branchless_on_i386
+    r += !!(x & 0xaaaaaaaa) << 0;
+    r += !!(x & 0xcccccccc) << 1;
+    r += !!(x & 0xf0f0f0f0) << 2;
+    r += !!(x & 0xff00ff00) << 3;
+    r += !!(x & 0xffff0000) << 4;
+#else
+    if (x & 0xaaaaaaaa) r +=  1;
+    if (x & 0xcccccccc) r +=  2;
+    if (x & 0xf0f0f0f0) r +=  4;
+    if (x & 0xff00ff00) r +=  8;
+    if (x & 0xffff0000) r += 16;
+#endif
+
+    return r;
+  }
+
+  ecb_function_ int ecb_ctz64 (uint64_t x) ecb_const;
+  ecb_function_ int
+  ecb_ctz64 (uint64_t x)
+  {
+    int shift = x & 0xffffffffU ? 0 : 32;
+    return ecb_ctz32 (x >> shift) + shift;
+  }
+
+  ecb_function_ int ecb_popcount32 (uint32_t x) ecb_const;
+  ecb_function_ int
+  ecb_popcount32 (uint32_t x)
+  {
+    x -=  (x >> 1) & 0x55555555;
+    x  = ((x >> 2) & 0x33333333) + (x & 0x33333333);
+    x  = ((x >> 4) + x) & 0x0f0f0f0f;
+    x *= 0x01010101;
+
+    return x >> 24;
+  }
+
+  ecb_function_ int ecb_ld32 (uint32_t x) ecb_const;
+  ecb_function_ int ecb_ld32 (uint32_t x)
+  {
+    int r = 0;
+
+    if (x >> 16) { x >>= 16; r += 16; }
+    if (x >>  8) { x >>=  8; r +=  8; }
+    if (x >>  4) { x >>=  4; r +=  4; }
+    if (x >>  2) { x >>=  2; r +=  2; }
+    if (x >>  1) {           r +=  1; }
+
+    return r;
+  }
+
+  ecb_function_ int ecb_ld64 (uint64_t x) ecb_const;
+  ecb_function_ int ecb_ld64 (uint64_t x)
+  {
+    int r = 0;
+
+    if (x >> 32) { x >>= 32; r += 32; }
+
+    return r + ecb_ld32 (x);
+  }
+#endif
+
+ecb_function_ uint8_t  ecb_bitrev8  (uint8_t  x) ecb_const;
+ecb_function_ uint8_t  ecb_bitrev8  (uint8_t  x)
+{
+  return (  (x * 0x0802U & 0x22110U)
+          | (x * 0x8020U & 0x88440U)) * 0x10101U >> 16; 
+}
+
+ecb_function_ uint16_t ecb_bitrev16 (uint16_t x) ecb_const;
+ecb_function_ uint16_t ecb_bitrev16 (uint16_t x)
+{
+  x = ((x >>  1) &     0x5555) | ((x &     0x5555) <<  1);
+  x = ((x >>  2) &     0x3333) | ((x &     0x3333) <<  2);
+  x = ((x >>  4) &     0x0f0f) | ((x &     0x0f0f) <<  4);
+  x = ( x >>  8              ) | ( x               <<  8);
+
+  return x;
+}
+
+ecb_function_ uint32_t ecb_bitrev32 (uint32_t x) ecb_const;
+ecb_function_ uint32_t ecb_bitrev32 (uint32_t x)
+{
+  x = ((x >>  1) & 0x55555555) | ((x & 0x55555555) <<  1);
+  x = ((x >>  2) & 0x33333333) | ((x & 0x33333333) <<  2);
+  x = ((x >>  4) & 0x0f0f0f0f) | ((x & 0x0f0f0f0f) <<  4);
+  x = ((x >>  8) & 0x00ff00ff) | ((x & 0x00ff00ff) <<  8);
+  x = ( x >> 16              ) | ( x               << 16);
+
+  return x;
+}
+
+/* popcount64 is only available on 64 bit cpus as gcc builtin */
+/* so for this version we are lazy */
+ecb_function_ int ecb_popcount64 (uint64_t x) ecb_const;
+ecb_function_ int
+ecb_popcount64 (uint64_t x)
+{
+  return ecb_popcount32 (x) + ecb_popcount32 (x >> 32);
+}
+
+ecb_inline uint8_t  ecb_rotl8  (uint8_t  x, unsigned int count) ecb_const;
+ecb_inline uint8_t  ecb_rotr8  (uint8_t  x, unsigned int count) ecb_const;
+ecb_inline uint16_t ecb_rotl16 (uint16_t x, unsigned int count) ecb_const;
+ecb_inline uint16_t ecb_rotr16 (uint16_t x, unsigned int count) ecb_const;
+ecb_inline uint32_t ecb_rotl32 (uint32_t x, unsigned int count) ecb_const;
+ecb_inline uint32_t ecb_rotr32 (uint32_t x, unsigned int count) ecb_const;
+ecb_inline uint64_t ecb_rotl64 (uint64_t x, unsigned int count) ecb_const;
+ecb_inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) ecb_const;
+
+ecb_inline uint8_t  ecb_rotl8  (uint8_t  x, unsigned int count) { return (x >> ( 8 - count)) | (x << count); }
+ecb_inline uint8_t  ecb_rotr8  (uint8_t  x, unsigned int count) { return (x << ( 8 - count)) | (x >> count); }
+ecb_inline uint16_t ecb_rotl16 (uint16_t x, unsigned int count) { return (x >> (16 - count)) | (x << count); }
+ecb_inline uint16_t ecb_rotr16 (uint16_t x, unsigned int count) { return (x << (16 - count)) | (x >> count); }
+ecb_inline uint32_t ecb_rotl32 (uint32_t x, unsigned int count) { return (x >> (32 - count)) | (x << count); }
+ecb_inline uint32_t ecb_rotr32 (uint32_t x, unsigned int count) { return (x << (32 - count)) | (x >> count); }
+ecb_inline uint64_t ecb_rotl64 (uint64_t x, unsigned int count) { return (x >> (64 - count)) | (x << count); }
+ecb_inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) { return (x << (64 - count)) | (x >> count); }
+
+#if ECB_GCC_VERSION(4,3)
+  #define ecb_bswap16(x) (__builtin_bswap32 (x) >> 16)
+  #define ecb_bswap32(x)  __builtin_bswap32 (x)
+  #define ecb_bswap64(x)  __builtin_bswap64 (x)
+#else
+  ecb_function_ uint16_t ecb_bswap16 (uint16_t x) ecb_const;
+  ecb_function_ uint16_t
+  ecb_bswap16 (uint16_t x)
+  {
+    return ecb_rotl16 (x, 8);
+  }
+
+  ecb_function_ uint32_t ecb_bswap32 (uint32_t x) ecb_const;
+  ecb_function_ uint32_t
+  ecb_bswap32 (uint32_t x)
+  {
+    return (((uint32_t)ecb_bswap16 (x)) << 16) | ecb_bswap16 (x >> 16);
+  }
+
+  ecb_function_ uint64_t ecb_bswap64 (uint64_t x) ecb_const;
+  ecb_function_ uint64_t
+  ecb_bswap64 (uint64_t x)
+  {
+    return (((uint64_t)ecb_bswap32 (x)) << 32) | ecb_bswap32 (x >> 32);
+  }
+#endif
+
+#if ECB_GCC_VERSION(4,5)
+  #define ecb_unreachable() __builtin_unreachable ()
+#else
+  /* this seems to work fine, but gcc always emits a warning for it :/ */
+  ecb_inline void ecb_unreachable (void) ecb_noreturn;
+  ecb_inline void ecb_unreachable (void) { }
+#endif
+
+/* try to tell the compiler that some condition is definitely true */
+#define ecb_assume(cond) do { if (!(cond)) ecb_unreachable (); } while (0)
+
+ecb_inline unsigned char ecb_byteorder_helper (void) ecb_const;
+ecb_inline unsigned char
+ecb_byteorder_helper (void)
+{
+  const uint32_t u = 0x11223344;
+  return *(unsigned char *)&u;
+}
+
+ecb_inline ecb_bool ecb_big_endian    (void) ecb_const;
+ecb_inline ecb_bool ecb_big_endian    (void) { return ecb_byteorder_helper () == 0x11; }
+ecb_inline ecb_bool ecb_little_endian (void) ecb_const;
+ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () == 0x44; }
+
+#if ECB_GCC_VERSION(3,0) || ECB_C99
+  #define ecb_mod(m,n) ((m) % (n) + ((m) % (n) < 0 ? (n) : 0))
+#else
+  #define ecb_mod(m,n) ((m) < 0 ? ((n) - 1 - ((-1 - (m)) % (n))) : ((m) % (n)))
+#endif
+
+#if __cplusplus
+  template<typename T>
+  static inline T ecb_div_rd (T val, T div)
+  {
+    return val < 0 ? - ((-val + div - 1) / div) : (val          ) / div;
+  }
+  template<typename T>
+  static inline T ecb_div_ru (T val, T div)
+  {
+    return val < 0 ? - ((-val          ) / div) : (val + div - 1) / div;
+  }
+#else
+  #define ecb_div_rd(val,div) ((val) < 0 ? - ((-(val) + (div) - 1) / (div)) : ((val)            ) / (div))
+  #define ecb_div_ru(val,div) ((val) < 0 ? - ((-(val)            ) / (div)) : ((val) + (div) - 1) / (div))
+#endif
+
+#if ecb_cplusplus_does_not_suck
+  /* does not work for local types (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm) */
+  template<typename T, int N>
+  static inline int ecb_array_length (const T (&arr)[N])
+  {
+    return N;
+  }
+#else
+  #define ecb_array_length(name) (sizeof (name) / sizeof (name [0]))
+#endif
+
+#endif
+
+/* ECB.H END */
+
+#if ECB_MEMORY_FENCE_NEEDS_PTHREADS
+/* if your architecture doesn't need memory fences, e.g. because it is
+ * single-cpu/core, or if you use libev in a project that doesn't use libev
+ * from multiple threads, then you can define ECB_AVOID_PTHREADS when compiling
+ * libev, in which cases the memory fences become nops.
+ * alternatively, you can remove this #error and link against libpthread,
+ * which will then provide the memory fences.
+ */
+# error "memory fences not defined for your architecture, please report"
+#endif
+
+#ifndef ECB_MEMORY_FENCE
+# define ECB_MEMORY_FENCE do { } while (0)
+# define ECB_MEMORY_FENCE_ACQUIRE ECB_MEMORY_FENCE
+# define ECB_MEMORY_FENCE_RELEASE ECB_MEMORY_FENCE
+#endif
+
+#define expect_false(cond) ecb_expect_false (cond)
+#define expect_true(cond)  ecb_expect_true  (cond)
+#define noinline           ecb_noinline
+
+#define inline_size        ecb_inline
+
+#if EV_FEATURE_CODE
+# define inline_speed      ecb_inline
 #else
-# define inline_speed      static inline
+# define inline_speed      static noinline
 #endif
 
 #define NUMPRI (EV_MAXPRI - EV_MINPRI + 1)
@@ -495,7 +979,7 @@ typedef ev_watcher_time *WT;
 
 #if EV_USE_REALTIME
 /* sig_atomic_t is used to avoid per-thread variables or locking but still */
-/* giving it a reasonably high chance of working on typical architetcures */
+/* giving it a reasonably high chance of working on typical architectures */
 static EV_ATOMIC_T have_realtime; /* did clock_gettime (CLOCK_REALTIME) work? */
 #endif
 
@@ -507,7 +991,7 @@ static EV_ATOMIC_T have_monotonic; /* did clock_gettime (CLOCK_MONOTONIC) work?
 # define EV_FD_TO_WIN32_HANDLE(fd) _get_osfhandle (fd)
 #endif
 #ifndef EV_WIN32_HANDLE_TO_FD
-# define EV_WIN32_HANDLE_TO_FD(handle) _open_osfhandle (fd, 0)
+# define EV_WIN32_HANDLE_TO_FD(handle) _open_osfhandle (handle, 0)
 #endif
 #ifndef EV_WIN32_CLOSE_FD
 # define EV_WIN32_CLOSE_FD(fd) close (fd)
@@ -519,15 +1003,113 @@ static EV_ATOMIC_T have_monotonic; /* did clock_gettime (CLOCK_MONOTONIC) work?
 
 /*****************************************************************************/
 
+/* define a suitable floor function (only used by periodics atm) */
+
+#if EV_USE_FLOOR
+# include <math.h>
+# define ev_floor(v) floor (v)
+#else
+
+#include <float.h>
+
+/* a floor() replacement function, should be independent of ev_tstamp type */
+static ev_tstamp noinline
+ev_floor (ev_tstamp v)
+{
+  /* the choice of shift factor is not terribly important */
+#if FLT_RADIX != 2 /* assume FLT_RADIX == 10 */
+  const ev_tstamp shift = sizeof (unsigned long) >= 8 ? 10000000000000000000. : 1000000000.;
+#else
+  const ev_tstamp shift = sizeof (unsigned long) >= 8 ? 18446744073709551616. : 4294967296.;
+#endif
+
+  /* argument too large for an unsigned long? */
+  if (expect_false (v >= shift))
+    {
+      ev_tstamp f;
+
+      if (v == v - 1.)
+        return v; /* very large number */
+
+      f = shift * ev_floor (v * (1. / shift));
+      return f + ev_floor (v - f);
+    }
+
+  /* special treatment for negative args? */
+  if (expect_false (v < 0.))
+    {
+      ev_tstamp f = -ev_floor (-v);
+
+      return f - (f == v ? 0 : 1);
+    }
+
+  /* fits into an unsigned long */
+  return (unsigned long)v;
+}
+
+#endif
+
+/*****************************************************************************/
+
+#ifdef __linux
+# include <sys/utsname.h>
+#endif
+
+static unsigned int noinline ecb_cold
+ev_linux_version (void)
+{
+#ifdef __linux
+  unsigned int v = 0;
+  struct utsname buf;
+  int i;
+  char *p = buf.release;
+
+  if (uname (&buf))
+    return 0;
+
+  for (i = 3+1; --i; )
+    {
+      unsigned int c = 0;
+
+      for (;;)
+        {
+          if (*p >= '0' && *p <= '9')
+            c = c * 10 + *p++ - '0';
+          else
+            {
+              p += *p == '.';
+              break;
+            }
+        }
+
+      v = (v << 8) | c;
+    }
+
+  return v;
+#else
+  return 0;
+#endif
+}
+
+/*****************************************************************************/
+
+#if EV_AVOID_STDIO
+static void noinline ecb_cold
+ev_printerr (const char *msg)
+{
+  write (STDERR_FILENO, msg, strlen (msg));
+}
+#endif
+
 static void (*syserr_cb)(const char *msg);
 
-void
+void ecb_cold
 ev_set_syserr_cb (void (*cb)(const char *msg))
 {
   syserr_cb = cb;
 }
 
-static void noinline
+static void noinline ecb_cold
 ev_syserr (const char *msg)
 {
   if (!msg)
@@ -537,7 +1119,14 @@ ev_syserr (const char *msg)
     syserr_cb (msg);
   else
     {
+#if EV_AVOID_STDIO
+      ev_printerr (msg);
+      ev_printerr (": ");
+      ev_printerr (strerror (errno));
+      ev_printerr ("\n");
+#else
       perror (msg);
+#endif
       abort ();
     }
 }
@@ -545,8 +1134,11 @@ ev_syserr (const char *msg)
 static void *
 ev_realloc_emul (void *ptr, long size)
 {
+#if __GLIBC__
+  return realloc (ptr, size);
+#else
   /* some systems, notably openbsd and darwin, fail to properly
-   * implement realloc (x, 0) (as required by both ansi c-98 and
+   * implement realloc (x, 0) (as required by both ansi c-89 and
    * the single unix specification, so work around them here.
    */
 
@@ -555,11 +1147,12 @@ ev_realloc_emul (void *ptr, long size)
 
   free (ptr);
   return 0;
+#endif
 }
 
 static void *(*alloc)(void *ptr, long size) = ev_realloc_emul;
 
-void
+void ecb_cold
 ev_set_allocator (void *(*cb)(void *ptr, long size))
 {
   alloc = cb;
@@ -572,7 +1165,11 @@ ev_realloc (void *ptr, long size)
 
   if (!ptr && size)
     {
-      fprintf (stderr, "libev: cannot allocate %ld bytes, aborting.", size);
+#if EV_AVOID_STDIO
+      ev_printerr ("(libev) memory allocation failed, aborting.\n");
+#else
+      fprintf (stderr, "(libev) cannot allocate %ld bytes, aborting.", size);
+#endif
       abort ();
     }
 
@@ -598,9 +1195,12 @@ typedef struct
 #if EV_USE_EPOLL
   unsigned int egen;    /* generation counter to counter epoll bugs */
 #endif
-#if EV_SELECT_IS_WINSOCKET
+#if EV_SELECT_IS_WINSOCKET || EV_USE_IOCP
   SOCKET handle;
 #endif
+#if EV_USE_IOCP
+  OVERLAPPED or, ow;
+#endif
 } ANFD;
 
 /* stores the pending event set for a given watcher */
@@ -651,11 +1251,11 @@ typedef struct
   #include "ev_wrap.h"
 
   static struct ev_loop default_loop_struct;
-  struct ev_loop *ev_default_loop_ptr;
+  EV_API_DECL struct ev_loop *ev_default_loop_ptr = 0; /* needs to be initialised to make it a definition despite extern */
 
 #else
 
-  ev_tstamp ev_rt_now;
+  EV_API_DECL ev_tstamp ev_rt_now = 0; /* needs to be initialised to make it a definition despite extern */
   #define VAR(name,decl) static decl;
     #include "ev_vars.h"
   #undef VAR
@@ -664,7 +1264,7 @@ typedef struct
 
 #endif
 
-#if EV_MINIMAL < 2
+#if EV_FEATURE_API
 # define EV_RELEASE_CB if (expect_false (release_cb)) release_cb (EV_A)
 # define EV_ACQUIRE_CB if (expect_false (acquire_cb)) acquire_cb (EV_A)
 # define EV_INVOKE_PENDING invoke_cb (EV_A)
@@ -674,7 +1274,7 @@ typedef struct
 # define EV_INVOKE_PENDING ev_invoke_pending (EV_A)
 #endif
 
-#define EVUNLOOP_RECURSE 0x80
+#define EVBREAK_RECURSE 0x80
 
 /*****************************************************************************/
 
@@ -728,21 +1328,17 @@ ev_sleep (ev_tstamp delay)
 #if EV_USE_NANOSLEEP
       struct timespec ts;
 
-      ts.tv_sec  = (time_t)delay;
-      ts.tv_nsec = (long)((delay - (ev_tstamp)(ts.tv_sec)) * 1e9);
-
+      EV_TS_SET (ts, delay);
       nanosleep (&ts, 0);
 #elif defined(_WIN32)
       Sleep ((unsigned long)(delay * 1e3));
 #else
       struct timeval tv;
 
-      tv.tv_sec  = (time_t)delay;
-      tv.tv_usec = (long)((delay - (ev_tstamp)(tv.tv_sec)) * 1e6);
-
       /* here we rely on sys/time.h + sys/types.h + unistd.h providing select */
       /* something not guaranteed by newer posix versions, but guaranteed */
       /* by older ones */
+      EV_TV_SET (tv, delay);
       select (0, 0, 0, 0, &tv);
 #endif
     }
@@ -753,7 +1349,7 @@ ev_sleep (ev_tstamp delay)
 #define MALLOC_ROUND 4096 /* prefer to allocate in chunks of this size, must be 2**n and >> 4 longs */
 
 /* find a suitable new size for the given array, */
-/* hopefully by rounding to a ncie-to-malloc size */
+/* hopefully by rounding to a nice-to-malloc size */
 inline_size int
 array_nextsize (int elem, int cur, int cnt)
 {
@@ -763,7 +1359,7 @@ array_nextsize (int elem, int cur, int cnt)
     ncur <<= 1;
   while (cnt > ncur);
 
-  /* if size is large, round to MALLOC_ROUND - 4 * longs to accomodate malloc overhead */
+  /* if size is large, round to MALLOC_ROUND - 4 * longs to accommodate malloc overhead */
   if (elem * ncur > MALLOC_ROUND - sizeof (void *) * 4)
     {
       ncur *= elem;
@@ -775,7 +1371,7 @@ array_nextsize (int elem, int cur, int cnt)
   return ncur;
 }
 
-static noinline void *
+static void * noinline ecb_cold
 array_realloc (int elem, void *base, int *cur, int cnt)
 {
   *cur = array_nextsize (elem, *cur, cnt);
@@ -788,7 +1384,7 @@ array_realloc (int elem, void *base, int *cur, int cnt)
 #define array_needsize(type,base,cur,cnt,init)			\
   if (expect_false ((cnt) > (cur)))				\
     {								\
-      int ocur_ = (cur);					\
+      int ecb_unused ocur_ = (cur);					\
       (base) = (type *)array_realloc				\
          (sizeof (type), (base), &(cur), (cnt));		\
       init ((base) + (ocur_), (cur) - ocur_);			\
@@ -859,7 +1455,7 @@ queue_events (EV_P_ W *events, int eventcnt, int type)
 /*****************************************************************************/
 
 inline_speed void
-fd_event_nc (EV_P_ int fd, int revents)
+fd_event_nocheck (EV_P_ int fd, int revents)
 {
   ANFD *anfd = anfds + fd;
   ev_io *w;
@@ -881,14 +1477,14 @@ fd_event (EV_P_ int fd, int revents)
   ANFD *anfd = anfds + fd;
 
   if (expect_true (!anfd->reify))
-    fd_event_nc (EV_A_ fd, revents);
+    fd_event_nocheck (EV_A_ fd, revents);
 }
 
 void
 ev_feed_fd_event (EV_P_ int fd, int revents)
 {
   if (fd >= 0 && fd < anfdmax)
-    fd_event_nc (EV_A_ fd, revents);
+    fd_event_nocheck (EV_A_ fd, revents);
 }
 
 /* make sure the external fd watch events are in-sync */
@@ -898,36 +1494,55 @@ fd_reify (EV_P)
 {
   int i;
 
+#if EV_SELECT_IS_WINSOCKET || EV_USE_IOCP
   for (i = 0; i < fdchangecnt; ++i)
     {
       int fd = fdchanges [i];
       ANFD *anfd = anfds + fd;
-      ev_io *w;
 
-      unsigned char events = 0;
+      if (anfd->reify & EV__IOFDSET && anfd->head)
+        {
+          SOCKET handle = EV_FD_TO_WIN32_HANDLE (fd);
+
+          if (handle != anfd->handle)
+            {
+              unsigned long arg;
 
-      for (w = (ev_io *)anfd->head; w; w = (ev_io *)((WL)w)->next)
-        events |= (unsigned char)w->events;
+              assert (("libev: only socket fds supported in this configuration", ioctlsocket (handle, FIONREAD, &arg) == 0));
 
-#if EV_SELECT_IS_WINSOCKET
-      if (events)
-        {
-          unsigned long arg;
-          anfd->handle = EV_FD_TO_WIN32_HANDLE (fd);
-          assert (("libev: only socket fds supported in this configuration", ioctlsocket (anfd->handle, FIONREAD, &arg) == 0));
+              /* handle changed, but fd didn't - we need to do it in two steps */
+              backend_modify (EV_A_ fd, anfd->events, 0);
+              anfd->events = 0;
+              anfd->handle = handle;
+            }
         }
+    }
 #endif
 
-      {
-        unsigned char o_events = anfd->events;
-        unsigned char o_reify  = anfd->reify;
+  for (i = 0; i < fdchangecnt; ++i)
+    {
+      int fd = fdchanges [i];
+      ANFD *anfd = anfds + fd;
+      ev_io *w;
 
-        anfd->reify  = 0;
-        anfd->events = events;
+      unsigned char o_events = anfd->events;
+      unsigned char o_reify  = anfd->reify;
 
-        if (o_events != events || o_reify & EV__IOFDSET)
-          backend_modify (EV_A_ fd, o_events, events);
-      }
+      anfd->reify  = 0;
+
+      /*if (expect_true (o_reify & EV_ANFD_REIFY)) probably a deoptimisation */
+        {
+          anfd->events = 0;
+
+          for (w = (ev_io *)anfd->head; w; w = (ev_io *)((WL)w)->next)
+            anfd->events |= (unsigned char)w->events;
+
+          if (o_events != anfd->events)
+            o_reify = EV__IOFDSET; /* actually |= */
+        }
+
+      if (o_reify & EV__IOFDSET)
+        backend_modify (EV_A_ fd, o_events, anfd->events);
     }
 
   fdchangecnt = 0;
@@ -949,7 +1564,7 @@ fd_change (EV_P_ int fd, int flags)
 }
 
 /* the given fd is invalid/unusable, so make sure it doesn't hurt us anymore */
-inline_speed void
+inline_speed void ecb_cold
 fd_kill (EV_P_ int fd)
 {
   ev_io *w;
@@ -961,19 +1576,19 @@ fd_kill (EV_P_ int fd)
     }
 }
 
-/* check whether the given fd is atcually valid, for error recovery */
-inline_size int
+/* check whether the given fd is actually valid, for error recovery */
+inline_size int ecb_cold
 fd_valid (int fd)
 {
 #ifdef _WIN32
-  return _get_osfhandle (fd) != -1;
+  return EV_FD_TO_WIN32_HANDLE (fd) != -1;
 #else
   return fcntl (fd, F_GETFD) != -1;
 #endif
 }
 
 /* called on EBADF to verify fds */
-static void noinline
+static void noinline ecb_cold
 fd_ebadf (EV_P)
 {
   int fd;
@@ -985,7 +1600,7 @@ fd_ebadf (EV_P)
 }
 
 /* called on ENOMEM in select/poll to kill some fds and retry */
-static void noinline
+static void noinline ecb_cold
 fd_enomem (EV_P)
 {
   int fd;
@@ -1013,10 +1628,24 @@ fd_rearm_all (EV_P)
       }
 }
 
+/* used to prepare libev internal fd's */
+/* this is not fork-safe */
+inline_speed void
+fd_intern (int fd)
+{
+#ifdef _WIN32
+  unsigned long arg = 1;
+  ioctlsocket (EV_FD_TO_WIN32_HANDLE (fd), FIONBIO, &arg);
+#else
+  fcntl (fd, F_SETFD, FD_CLOEXEC);
+  fcntl (fd, F_SETFL, O_NONBLOCK);
+#endif
+}
+
 /*****************************************************************************/
 
 /*
- * the heap functions want a real array index. array index 0 uis guaranteed to not
+ * the heap functions want a real array index. array index 0 is guaranteed to not
  * be in-use at any time. the first heap entry is at array [HEAP0]. DHEAP gives
  * the branching factor of the d-tree.
  */
@@ -1174,26 +1803,14 @@ static ANSIG signals [EV_NSIG - 1];
 
 /*****************************************************************************/
 
-/* used to prepare libev internal fd's */
-/* this is not fork-safe */
-inline_speed void
-fd_intern (int fd)
-{
-#ifdef _WIN32
-  unsigned long arg = 1;
-  ioctlsocket (_get_osfhandle (fd), FIONBIO, &arg);
-#else
-  fcntl (fd, F_SETFD, FD_CLOEXEC);
-  fcntl (fd, F_SETFL, O_NONBLOCK);
-#endif
-}
+#if EV_SIGNAL_ENABLE || EV_ASYNC_ENABLE
 
-static void noinline
+static void noinline ecb_cold
 evpipe_init (EV_P)
 {
   if (!ev_is_active (&pipe_w))
     {
-#if EV_USE_EVENTFD
+# if EV_USE_EVENTFD
       evfd = eventfd (0, EFD_NONBLOCK | EFD_CLOEXEC);
       if (evfd < 0 && errno == EINVAL)
         evfd = eventfd (0, 0);
@@ -1205,7 +1822,7 @@ evpipe_init (EV_P)
           ev_io_set (&pipe_w, evfd, EV_READ);
         }
       else
-#endif
+# endif
         {
           while (pipe (evpipe))
             ev_syserr ("(libev) error creating signal/async pipe");
@@ -1220,14 +1837,27 @@ evpipe_init (EV_P)
     }
 }
 
-inline_size void
+inline_speed void
 evpipe_write (EV_P_ EV_ATOMIC_T *flag)
 {
-  if (!*flag)
+  if (expect_true (*flag))
+    return;
+
+  *flag = 1;
+
+  ECB_MEMORY_FENCE_RELEASE; /* make sure flag is visible before the wakeup */
+
+  pipe_write_skipped = 1;
+
+  ECB_MEMORY_FENCE; /* make sure pipe_write_skipped is visible before we check pipe_write_wanted */
+
+  if (pipe_write_wanted)
     {
-      int old_errno = errno; /* save errno because write might clobber it */
+      int old_errno;
 
-      *flag = 1;
+      pipe_write_skipped = 0; /* just an optimisation, no fence needed */
+
+      old_errno = errno; /* save errno because write will clobber it */
 
 #if EV_USE_EVENTFD
       if (evfd >= 0)
@@ -1237,7 +1867,14 @@ evpipe_write (EV_P_ EV_ATOMIC_T *flag)
         }
       else
 #endif
-        write (evpipe [1], &old_errno, 1);
+        {
+          /* win32 people keep sending patches that change this write() to send() */
+          /* and then run away. but send() is wrong, it wants a socket handle on win32 */
+          /* so when you think this write should be a send instead, please find out */
+          /* where your send() is from - it's definitely not the microsoft send, and */
+          /* tell me. thank you. */
+          write (evpipe [1], &(evpipe [1]), 1);
+        }
 
       errno = old_errno;
     }
@@ -1250,27 +1887,35 @@ pipecb (EV_P_ ev_io *iow, int revents)
 {
   int i;
 
-#if EV_USE_EVENTFD
-  if (evfd >= 0)
+  if (revents & EV_READ)
     {
-      uint64_t counter;
-      read (evfd, &counter, sizeof (uint64_t));
-    }
-  else
+#if EV_USE_EVENTFD
+      if (evfd >= 0)
+        {
+          uint64_t counter;
+          read (evfd, &counter, sizeof (uint64_t));
+        }
+      else
 #endif
-    {
-      char dummy;
-      read (evpipe [0], &dummy, 1);
+        {
+          char dummy;
+          /* see discussion in evpipe_write when you think this read should be recv in win32 */
+          read (evpipe [0], &dummy, 1);
+        }
     }
 
+  pipe_write_skipped = 0;
+
+#if EV_SIGNAL_ENABLE
   if (sig_pending)
-    {    
+    {
       sig_pending = 0;
 
       for (i = EV_NSIG - 1; i--; )
         if (expect_false (signals [i].pending))
           ev_feed_signal_event (EV_A_ i + 1);
     }
+#endif
 
 #if EV_ASYNC_ENABLE
   if (async_pending)
@@ -1289,21 +1934,33 @@ pipecb (EV_P_ ev_io *iow, int revents)
 
 /*****************************************************************************/
 
-static void
-ev_sighandler (int signum)
+void
+ev_feed_signal (int signum)
 {
 #if EV_MULTIPLICITY
   EV_P = signals [signum - 1].loop;
-#endif
 
-#if _WIN32
-  signal (signum, ev_sighandler);
+  if (!EV_A)
+    return;
 #endif
 
+  if (!ev_active (&pipe_w))
+    return;
+
   signals [signum - 1].pending = 1;
   evpipe_write (EV_A_ &sig_pending);
 }
 
+static void
+ev_sighandler (int signum)
+{
+#ifdef _WIN32
+  signal (signum, ev_sighandler);
+#endif
+
+  ev_feed_signal (signum);
+}
+
 void noinline
 ev_feed_signal_event (EV_P_ int signum)
 {
@@ -1348,12 +2005,13 @@ sigfdcb (EV_P_ ev_io *iow, int revents)
 }
 #endif
 
+#endif
+
 /*****************************************************************************/
 
+#if EV_CHILD_ENABLE
 static WL childs [EV_PID_HASHSIZE];
 
-#ifndef _WIN32
-
 static ev_signal childev;
 
 #ifndef WIFCONTINUED
@@ -1367,7 +2025,7 @@ child_reap (EV_P_ int chain, int pid, int status)
   ev_child *w;
   int traced = WIFSTOPPED (status) || WIFCONTINUED (status);
 
-  for (w = (ev_child *)childs [chain & (EV_PID_HASHSIZE - 1)]; w; w = (ev_child *)((WL)w)->next)
+  for (w = (ev_child *)childs [chain & ((EV_PID_HASHSIZE) - 1)]; w; w = (ev_child *)((WL)w)->next)
     {
       if ((w->pid == pid || !w->pid)
           && (!traced || (w->flags & 1)))
@@ -1402,7 +2060,7 @@ childcb (EV_P_ ev_signal *sw, int revents)
   ev_feed_event (EV_A_ (W)sw, EV_SIGNAL);
 
   child_reap (EV_A_ pid, pid, status);
-  if (EV_PID_HASHSIZE > 1)
+  if ((EV_PID_HASHSIZE) > 1)
     child_reap (EV_A_ 0, pid, status); /* this might trigger a watcher twice, but feed_event catches that */
 }
 
@@ -1410,6 +2068,9 @@ childcb (EV_P_ ev_signal *sw, int revents)
 
 /*****************************************************************************/
 
+#if EV_USE_IOCP
+# include "ev_iocp.c"
+#endif
 #if EV_USE_PORT
 # include "ev_port.c"
 #endif
@@ -1426,20 +2087,20 @@ childcb (EV_P_ ev_signal *sw, int revents)
 # include "ev_select.c"
 #endif
 
-int
+int ecb_cold
 ev_version_major (void)
 {
   return EV_VERSION_MAJOR;
 }
 
-int
+int ecb_cold
 ev_version_minor (void)
 {
   return EV_VERSION_MINOR;
 }
 
 /* return true if we are running with elevated privileges and should ignore env variables */
-int inline_size
+int inline_size ecb_cold
 enable_secure (void)
 {
 #ifdef _WIN32
@@ -1450,7 +2111,7 @@ enable_secure (void)
 #endif
 }
 
-unsigned int
+unsigned int ecb_cold
 ev_supported_backends (void)
 {
   unsigned int flags = 0;
@@ -1464,7 +2125,7 @@ ev_supported_backends (void)
   return flags;
 }
 
-unsigned int
+unsigned int ecb_cold
 ev_recommended_backends (void)
 {
   unsigned int flags = ev_supported_backends ();
@@ -1479,18 +2140,21 @@ ev_recommended_backends (void)
   flags &= ~EVBACKEND_KQUEUE; /* horribly broken, even for sockets */
   flags &= ~EVBACKEND_POLL;   /* poll is based on kqueue from 10.5 onwards */
 #endif
+#ifdef __FreeBSD__
+  flags &= ~EVBACKEND_POLL;   /* poll return value is unusable (http://forums.freebsd.org/archive/index.php/t-10270.html) */
+#endif
 
   return flags;
 }
 
-unsigned int
+unsigned int ecb_cold
 ev_embeddable_backends (void)
 {
   int flags = EVBACKEND_EPOLL | EVBACKEND_KQUEUE | EVBACKEND_PORT;
 
   /* epoll embeddability broken on all linux versions up to at least 2.6.23 */
-  /* please fix it and tell me how to detect the fix */
-  flags &= ~EVBACKEND_EPOLL;
+  if (ev_linux_version () < 0x020620) /* disable it on linux < 2.6.32 */
+    flags &= ~EVBACKEND_EPOLL;
 
   return flags;
 }
@@ -1501,15 +2165,15 @@ ev_backend (EV_P)
   return backend;
 }
 
-#if EV_MINIMAL < 2
+#if EV_FEATURE_API
 unsigned int
-ev_loop_count (EV_P)
+ev_iteration (EV_P)
 {
   return loop_count;
 }
 
 unsigned int
-ev_loop_depth (EV_P)
+ev_depth (EV_P)
 {
   return loop_depth;
 }
@@ -1538,12 +2202,14 @@ ev_userdata (EV_P)
   return userdata;
 }
 
-void ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P))
+void
+ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P))
 {
   invoke_cb = invoke_pending_cb;
 }
 
-void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P), void (*acquire)(EV_P))
+void
+ev_set_loop_release_cb (EV_P_ void (*release)(EV_P), void (*acquire)(EV_P))
 {
   release_cb = release;
   acquire_cb = acquire;
@@ -1551,11 +2217,13 @@ void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P), void (*acquire)(EV_P))
 #endif
 
 /* initialise a loop structure, must be zero-initialised */
-static void noinline
+static void noinline ecb_cold
 loop_init (EV_P_ unsigned int flags)
 {
   if (!backend)
     {
+      origflags = flags;
+
 #if EV_USE_REALTIME
       if (!have_realtime)
         {
@@ -1587,32 +2255,37 @@ loop_init (EV_P_ unsigned int flags)
           && getenv ("LIBEV_FLAGS"))
         flags = atoi (getenv ("LIBEV_FLAGS"));
 
-      ev_rt_now         = ev_time ();
-      mn_now            = get_clock ();
-      now_floor         = mn_now;
-      rtmn_diff         = ev_rt_now - mn_now;
-#if EV_MINIMAL < 2
-      invoke_cb         = ev_invoke_pending;
+      ev_rt_now          = ev_time ();
+      mn_now             = get_clock ();
+      now_floor          = mn_now;
+      rtmn_diff          = ev_rt_now - mn_now;
+#if EV_FEATURE_API
+      invoke_cb          = ev_invoke_pending;
 #endif
 
-      io_blocktime      = 0.;
-      timeout_blocktime = 0.;
-      backend           = 0;
-      backend_fd        = -1;
-      sig_pending       = 0;
+      io_blocktime       = 0.;
+      timeout_blocktime  = 0.;
+      backend            = 0;
+      backend_fd         = -1;
+      sig_pending        = 0;
 #if EV_ASYNC_ENABLE
-      async_pending     = 0;
+      async_pending      = 0;
 #endif
+      pipe_write_skipped = 0;
+      pipe_write_wanted  = 0;
 #if EV_USE_INOTIFY
-      fs_fd             = flags & EVFLAG_NOINOTIFY ? -1 : -2;
+      fs_fd              = flags & EVFLAG_NOINOTIFY ? -1 : -2;
 #endif
 #if EV_USE_SIGNALFD
-      sigfd             = flags & EVFLAG_SIGNALFD  ? -2 : -1;
+      sigfd              = flags & EVFLAG_SIGNALFD  ? -2 : -1;
 #endif
 
-      if (!(flags & 0x0000ffffU))
+      if (!(flags & EVBACKEND_MASK))
         flags |= ev_recommended_backends ();
 
+#if EV_USE_IOCP
+      if (!backend && (flags & EVBACKEND_IOCP  )) backend = iocp_init   (EV_A_ flags);
+#endif
 #if EV_USE_PORT
       if (!backend && (flags & EVBACKEND_PORT  )) backend = port_init   (EV_A_ flags);
 #endif
@@ -1631,17 +2304,42 @@ loop_init (EV_P_ unsigned int flags)
 
       ev_prepare_init (&pending_w, pendingcb);
 
+#if EV_SIGNAL_ENABLE || EV_ASYNC_ENABLE
       ev_init (&pipe_w, pipecb);
       ev_set_priority (&pipe_w, EV_MAXPRI);
+#endif
     }
 }
 
 /* free up a loop structure */
-static void noinline
-loop_destroy (EV_P)
+void ecb_cold
+ev_loop_destroy (EV_P)
 {
   int i;
 
+#if EV_MULTIPLICITY
+  /* mimic free (0) */
+  if (!EV_A)
+    return;
+#endif
+
+#if EV_CLEANUP_ENABLE
+  /* queue cleanup watchers (and execute them) */
+  if (expect_false (cleanupcnt))
+    {
+      queue_events (EV_A_ (W *)cleanups, cleanupcnt, EV_CLEANUP);
+      EV_INVOKE_PENDING;
+    }
+#endif
+
+#if EV_CHILD_ENABLE
+  if (ev_is_active (&childev))
+    {
+      ev_ref (EV_A); /* child watcher */
+      ev_signal_stop (EV_A_ &childev);
+    }
+#endif
+
   if (ev_is_active (&pipe_w))
     {
       /*ev_ref (EV_A);*/
@@ -1672,6 +2370,9 @@ loop_destroy (EV_P)
   if (backend_fd >= 0)
     close (backend_fd);
 
+#if EV_USE_IOCP
+  if (backend == EVBACKEND_IOCP  ) iocp_destroy   (EV_A);
+#endif
 #if EV_USE_PORT
   if (backend == EVBACKEND_PORT  ) port_destroy   (EV_A);
 #endif
@@ -1708,6 +2409,9 @@ loop_destroy (EV_P)
 #if EV_FORK_ENABLE
   array_free (fork, EMPTY);
 #endif
+#if EV_CLEANUP_ENABLE
+  array_free (cleanup, EMPTY);
+#endif
   array_free (prepare, EMPTY);
   array_free (check, EMPTY);
 #if EV_ASYNC_ENABLE
@@ -1715,6 +2419,15 @@ loop_destroy (EV_P)
 #endif
 
   backend = 0;
+
+#if EV_MULTIPLICITY
+  if (ev_is_default_loop (EV_A))
+#endif
+    ev_default_loop_ptr = 0;
+#if EV_MULTIPLICITY
+  else
+    ev_free (EV_A);
+#endif
 }
 
 #if EV_USE_INOTIFY
@@ -1739,12 +2452,7 @@ loop_fork (EV_P)
 
   if (ev_is_active (&pipe_w))
     {
-      /* this "locks" the handlers against writing to the pipe */
-      /* while we modify the fd vars */
-      sig_pending   = 1;
-#if EV_ASYNC_ENABLE
-      async_pending = 1;
-#endif
+      /* pipe_write_wanted must be false now, so modifying fd vars should be safe */
 
       ev_ref (EV_A);
       ev_io_stop (EV_A_ &pipe_w);
@@ -1760,9 +2468,11 @@ loop_fork (EV_P)
           EV_WIN32_CLOSE_FD (evpipe [1]);
         }
 
+#if EV_SIGNAL_ENABLE || EV_ASYNC_ENABLE
       evpipe_init (EV_A);
       /* now iterate over everything, in case we missed something */
       pipecb (EV_A_ &pipe_w, EV_READ);
+#endif
     }
 
   postfork = 0;
@@ -1770,7 +2480,7 @@ loop_fork (EV_P)
 
 #if EV_MULTIPLICITY
 
-struct ev_loop *
+struct ev_loop * ecb_cold
 ev_loop_new (unsigned int flags)
 {
   EV_P = (struct ev_loop *)ev_malloc (sizeof (struct ev_loop));
@@ -1781,25 +2491,14 @@ ev_loop_new (unsigned int flags)
   if (ev_backend (EV_A))
     return EV_A;
 
+  ev_free (EV_A);
   return 0;
 }
 
-void
-ev_loop_destroy (EV_P)
-{
-  loop_destroy (EV_A);
-  ev_free (loop);
-}
-
-void
-ev_loop_fork (EV_P)
-{
-  postfork = 1; /* must be in line with ev_default_fork */
-}
 #endif /* multiplicity */
 
 #if EV_VERIFY
-static void noinline
+static void noinline ecb_cold
 verify_watcher (EV_P_ W w)
 {
   assert (("libev: watcher has invalid priority", ABSPRI (w) >= 0 && ABSPRI (w) < NUMPRI));
@@ -1808,7 +2507,7 @@ verify_watcher (EV_P_ W w)
     assert (("libev: pending watcher not on pending queue", pendings [ABSPRI (w)][w->pending - 1].w == w));
 }
 
-static void noinline
+static void noinline ecb_cold
 verify_heap (EV_P_ ANHE *heap, int N)
 {
   int i;
@@ -1823,7 +2522,7 @@ verify_heap (EV_P_ ANHE *heap, int N)
     }
 }
 
-static void noinline
+static void noinline ecb_cold
 array_verify (EV_P_ W *ws, int cnt)
 {
   while (cnt--)
@@ -1834,9 +2533,9 @@ array_verify (EV_P_ W *ws, int cnt)
 }
 #endif
 
-#if EV_MINIMAL < 2
-void
-ev_loop_verify (EV_P)
+#if EV_FEATURE_API
+void ecb_cold
+ev_verify (EV_P)
 {
 #if EV_VERIFY
   int i;
@@ -1880,32 +2579,42 @@ ev_loop_verify (EV_P)
   array_verify (EV_A_ (W *)forks, forkcnt);
 #endif
 
+#if EV_CLEANUP_ENABLE
+  assert (cleanupmax >= cleanupcnt);
+  array_verify (EV_A_ (W *)cleanups, cleanupcnt);
+#endif
+
 #if EV_ASYNC_ENABLE
   assert (asyncmax >= asynccnt);
   array_verify (EV_A_ (W *)asyncs, asynccnt);
 #endif
 
+#if EV_PREPARE_ENABLE
   assert (preparemax >= preparecnt);
   array_verify (EV_A_ (W *)prepares, preparecnt);
+#endif
 
+#if EV_CHECK_ENABLE
   assert (checkmax >= checkcnt);
   array_verify (EV_A_ (W *)checks, checkcnt);
+#endif
 
 # if 0
-  for (w = (ev_child *)childs [chain & (EV_PID_HASHSIZE - 1)]; w; w = (ev_child *)((WL)w)->next)
+#if EV_CHILD_ENABLE
+  for (w = (ev_child *)childs [chain & ((EV_PID_HASHSIZE) - 1)]; w; w = (ev_child *)((WL)w)->next)
   for (signum = EV_NSIG; signum--; ) if (signals [signum].pending)
+#endif
 # endif
 #endif
 }
 #endif
 
 #if EV_MULTIPLICITY
-struct ev_loop *
-ev_default_loop_init (unsigned int flags)
+struct ev_loop * ecb_cold
 #else
 int
-ev_default_loop (unsigned int flags)
 #endif
+ev_default_loop (unsigned int flags)
 {
   if (!ev_default_loop_ptr)
     {
@@ -1919,7 +2628,7 @@ ev_default_loop (unsigned int flags)
 
       if (ev_backend (EV_A))
         {
-#ifndef _WIN32
+#if EV_CHILD_ENABLE
           ev_signal_init (&childev, childcb, SIGCHLD);
           ev_set_priority (&childev, EV_MAXPRI);
           ev_signal_start (EV_A_ &childev);
@@ -1934,30 +2643,9 @@ ev_default_loop (unsigned int flags)
 }
 
 void
-ev_default_destroy (void)
-{
-#if EV_MULTIPLICITY
-  EV_P = ev_default_loop_ptr;
-#endif
-
-  ev_default_loop_ptr = 0;
-
-#ifndef _WIN32
-  ev_ref (EV_A); /* child watcher */
-  ev_signal_stop (EV_A_ &childev);
-#endif
-
-  loop_destroy (EV_A);
-}
-
-void
-ev_default_fork (void)
+ev_loop_fork (EV_P)
 {
-#if EV_MULTIPLICITY
-  EV_P = ev_default_loop_ptr;
-#endif
-
-  postfork = 1; /* must be in line with ev_loop_fork */
+  postfork = 1; /* must be in line with ev_default_fork */
 }
 
 /*****************************************************************************/
@@ -1990,9 +2678,6 @@ ev_invoke_pending (EV_P)
       {
         ANPENDING *p = pendings [pri] + --pendingcnt [pri];
 
-        /*assert (("libev: non-pending watcher on pending list", p->w->pending));*/
-        /* ^ this is no longer true, as pending_w could be here */
-
         p->w->pending = 0;
         EV_CB_INVOKE (p->w, p->events);
         EV_FREQUENT_CHECK;
@@ -2058,11 +2743,36 @@ timers_reify (EV_P)
         }
       while (timercnt && ANHE_at (timers [HEAP0]) < mn_now);
 
-      feed_reverse_done (EV_A_ EV_TIMEOUT);
+      feed_reverse_done (EV_A_ EV_TIMER);
     }
 }
 
 #if EV_PERIODIC_ENABLE
+
+static void noinline
+periodic_recalc (EV_P_ ev_periodic *w)
+{
+  ev_tstamp interval = w->interval > MIN_INTERVAL ? w->interval : MIN_INTERVAL;
+  ev_tstamp at = w->offset + interval * ev_floor ((ev_rt_now - w->offset) / interval);
+
+  /* the above almost always errs on the low side */
+  while (at <= ev_rt_now)
+    {
+      ev_tstamp nat = at + w->interval;
+
+      /* when resolution fails us, we use ev_rt_now */
+      if (expect_false (nat == at))
+        {
+          at = ev_rt_now;
+          break;
+        }
+
+      at = nat;
+    }
+
+  ev_at (w) = at;
+}
+
 /* make periodics pending */
 inline_size void
 periodics_reify (EV_P)
@@ -2091,20 +2801,7 @@ periodics_reify (EV_P)
             }
           else if (w->interval)
             {
-              ev_at (w) = w->offset + ceil ((ev_rt_now - w->offset) / w->interval) * w->interval;
-              /* if next trigger time is not sufficiently in the future, put it there */
-              /* this might happen because of floating point inexactness */
-              if (ev_at (w) - ev_rt_now < TIME_EPSILON)
-                {
-                  ev_at (w) += w->interval;
-
-                  /* if interval is unreasonably low we might still have a time in the past */
-                  /* so correct this. this will make the periodic very inexact, but the user */
-                  /* has effectively asked to get triggered more often than possible */
-                  if (ev_at (w) < ev_rt_now)
-                    ev_at (w) = ev_rt_now;
-                }
-
+              periodic_recalc (EV_A_ w);
               ANHE_at_cache (periodics [HEAP0]);
               downheap (periodics, periodiccnt, HEAP0);
             }
@@ -2121,8 +2818,8 @@ periodics_reify (EV_P)
 }
 
 /* simply recalculate all periodics */
-/* TODO: maybe ensure that at leats one event happens when jumping forward? */
-static void noinline
+/* TODO: maybe ensure that at least one event happens when jumping forward? */
+static void noinline ecb_cold
 periodics_reschedule (EV_P)
 {
   int i;
@@ -2135,7 +2832,7 @@ periodics_reschedule (EV_P)
       if (w->reschedule_cb)
         ev_at (w) = w->reschedule_cb (w, ev_rt_now);
       else if (w->interval)
-        ev_at (w) = w->offset + ceil ((ev_rt_now - w->offset) / w->interval) * w->interval;
+        periodic_recalc (EV_A_ w);
 
       ANHE_at_cache (periodics [i]);
     }
@@ -2145,7 +2842,7 @@ periodics_reschedule (EV_P)
 #endif
 
 /* adjust all timers by a given offset */
-static void noinline
+static void noinline ecb_cold
 timers_reschedule (EV_P_ ev_tstamp adjust)
 {
   int i;
@@ -2159,7 +2856,7 @@ timers_reschedule (EV_P_ ev_tstamp adjust)
 }
 
 /* fetch new monotonic and realtime times from the kernel */
-/* also detetc if there was a timejump, and act accordingly */
+/* also detect if there was a timejump, and act accordingly */
 inline_speed void
 time_update (EV_P_ ev_tstamp max_block)
 {
@@ -2192,9 +2889,12 @@ time_update (EV_P_ ev_tstamp max_block)
        */
       for (i = 4; --i; )
         {
+          ev_tstamp diff;
           rtmn_diff = ev_rt_now - mn_now;
 
-          if (expect_true (fabs (odiff - rtmn_diff) < MIN_TIMEJUMP))
+          diff = odiff - rtmn_diff;
+
+          if (expect_true ((diff < 0. ? -diff : diff) < MIN_TIMEJUMP))
             return; /* all is well */
 
           ev_rt_now = ev_time ();
@@ -2227,22 +2927,22 @@ time_update (EV_P_ ev_tstamp max_block)
 }
 
 void
-ev_loop (EV_P_ int flags)
+ev_run (EV_P_ int flags)
 {
-#if EV_MINIMAL < 2
+#if EV_FEATURE_API
   ++loop_depth;
 #endif
 
-  assert (("libev: ev_loop recursion during release detected", loop_done != EVUNLOOP_RECURSE));
+  assert (("libev: ev_loop recursion during release detected", loop_done != EVBREAK_RECURSE));
 
-  loop_done = EVUNLOOP_CANCEL;
+  loop_done = EVBREAK_CANCEL;
 
   EV_INVOKE_PENDING; /* in case we recurse, ensure ordering stays nice and clean */
 
   do
     {
 #if EV_VERIFY >= 2
-      ev_loop_verify (EV_A);
+      ev_verify (EV_A);
 #endif
 
 #ifndef _WIN32
@@ -2264,12 +2964,14 @@ ev_loop (EV_P_ int flags)
           }
 #endif
 
+#if EV_PREPARE_ENABLE
       /* queue prepare watchers (and execute them) */
       if (expect_false (preparecnt))
         {
           queue_events (EV_A_ (W *)prepares, preparecnt, EV_PREPARE);
           EV_INVOKE_PENDING;
         }
+#endif
 
       if (expect_false (loop_done))
         break;
@@ -2286,26 +2988,31 @@ ev_loop (EV_P_ int flags)
         ev_tstamp waittime  = 0.;
         ev_tstamp sleeptime = 0.;
 
-        if (expect_true (!(flags & EVLOOP_NONBLOCK || idleall || !activecnt)))
-          {
-            /* remember old timestamp for io_blocktime calculation */
-            ev_tstamp prev_mn_now = mn_now;
+        /* remember old timestamp for io_blocktime calculation */
+        ev_tstamp prev_mn_now = mn_now;
+
+        /* update time to cancel out callback processing overhead */
+        time_update (EV_A_ 1e100);
 
-            /* update time to cancel out callback processing overhead */
-            time_update (EV_A_ 1e100);
+        /* from now on, we want a pipe-wake-up */
+        pipe_write_wanted = 1;
 
+        ECB_MEMORY_FENCE; /* make sure pipe_write_wanted is visible before we check for potential skips */
+
+        if (expect_true (!(flags & EVRUN_NOWAIT || idleall || !activecnt || pipe_write_skipped)))
+          {
             waittime = MAX_BLOCKTIME;
 
             if (timercnt)
               {
-                ev_tstamp to = ANHE_at (timers [HEAP0]) - mn_now + backend_fudge;
+                ev_tstamp to = ANHE_at (timers [HEAP0]) - mn_now;
                 if (waittime > to) waittime = to;
               }
 
 #if EV_PERIODIC_ENABLE
             if (periodiccnt)
               {
-                ev_tstamp to = ANHE_at (periodics [HEAP0]) - ev_rt_now + backend_fudge;
+                ev_tstamp to = ANHE_at (periodics [HEAP0]) - ev_rt_now;
                 if (waittime > to) waittime = to;
               }
 #endif
@@ -2314,13 +3021,18 @@ ev_loop (EV_P_ int flags)
             if (expect_false (waittime < timeout_blocktime))
               waittime = timeout_blocktime;
 
+            /* at this point, we NEED to wait, so we have to ensure */
+            /* to pass a minimum nonzero value to the backend */
+            if (expect_false (waittime < backend_mintime))
+              waittime = backend_mintime;
+
             /* extra check because io_blocktime is commonly 0 */
             if (expect_false (io_blocktime))
               {
                 sleeptime = io_blocktime - (mn_now - prev_mn_now);
 
-                if (sleeptime > waittime - backend_fudge)
-                  sleeptime = waittime - backend_fudge;
+                if (sleeptime > waittime - backend_mintime)
+                  sleeptime = waittime - backend_mintime;
 
                 if (expect_true (sleeptime > 0.))
                   {
@@ -2330,12 +3042,21 @@ ev_loop (EV_P_ int flags)
               }
           }
 
-#if EV_MINIMAL < 2
+#if EV_FEATURE_API
         ++loop_count;
 #endif
-        assert ((loop_done = EVUNLOOP_RECURSE, 1)); /* assert for side effect */
+        assert ((loop_done = EVBREAK_RECURSE, 1)); /* assert for side effect */
         backend_poll (EV_A_ waittime);
-        assert ((loop_done = EVUNLOOP_CANCEL, 1)); /* assert for side effect */
+        assert ((loop_done = EVBREAK_CANCEL, 1)); /* assert for side effect */
+
+        pipe_write_wanted = 0; /* just an optimisation, no fence needed */
+
+        if (pipe_write_skipped)
+          {
+            assert (("libev: pipe_w not active, but pipe not written", ev_is_active (&pipe_w)));
+            ev_feed_event (EV_A_ &pipe_w, EV_CUSTOM);
+          }
+
 
         /* update ev_rt_now, do magic */
         time_update (EV_A_ waittime + sleeptime);
@@ -2352,28 +3073,30 @@ ev_loop (EV_P_ int flags)
       idle_reify (EV_A);
 #endif
 
+#if EV_CHECK_ENABLE
       /* queue check watchers, to be executed first */
       if (expect_false (checkcnt))
         queue_events (EV_A_ (W *)checks, checkcnt, EV_CHECK);
+#endif
 
       EV_INVOKE_PENDING;
     }
   while (expect_true (
     activecnt
     && !loop_done
-    && !(flags & (EVLOOP_ONESHOT | EVLOOP_NONBLOCK))
+    && !(flags & (EVRUN_ONCE | EVRUN_NOWAIT))
   ));
 
-  if (loop_done == EVUNLOOP_ONE)
-    loop_done = EVUNLOOP_CANCEL;
+  if (loop_done == EVBREAK_ONE)
+    loop_done = EVBREAK_CANCEL;
 
-#if EV_MINIMAL < 2
+#if EV_FEATURE_API
   --loop_depth;
 #endif
 }
 
 void
-ev_unloop (EV_P_ int how)
+ev_break (EV_P_ int how)
 {
   loop_done = how;
 }
@@ -2503,7 +3226,7 @@ ev_io_start (EV_P_ ev_io *w)
     return;
 
   assert (("libev: ev_io_start called with negative fd", fd >= 0));
-  assert (("libev: ev_io start called with illegal event mask", !(w->events & ~(EV__IOFDSET | EV_READ | EV_WRITE))));
+  assert (("libev: ev_io_start called with illegal event mask", !(w->events & ~(EV__IOFDSET | EV_READ | EV_WRITE))));
 
   EV_FREQUENT_CHECK;
 
@@ -2531,7 +3254,7 @@ ev_io_stop (EV_P_ ev_io *w)
   wlist_del (&anfds[w->fd].head, (WL)w);
   ev_stop (EV_A_ (W)w);
 
-  fd_change (EV_A_ w->fd, 1);
+  fd_change (EV_A_ w->fd, EV_ANFD_REIFY);
 
   EV_FREQUENT_CHECK;
 }
@@ -2583,11 +3306,11 @@ ev_timer_stop (EV_P_ ev_timer *w)
       }
   }
 
-  EV_FREQUENT_CHECK;
-
   ev_at (w) -= mn_now;
 
   ev_stop (EV_A_ (W)w);
+
+  EV_FREQUENT_CHECK;
 }
 
 void noinline
@@ -2595,6 +3318,8 @@ ev_timer_again (EV_P_ ev_timer *w)
 {
   EV_FREQUENT_CHECK;
 
+  clear_pending (EV_A_ (W)w);
+
   if (ev_is_active (w))
     {
       if (w->repeat)
@@ -2633,8 +3358,7 @@ ev_periodic_start (EV_P_ ev_periodic *w)
   else if (w->interval)
     {
       assert (("libev: ev_periodic_start called with negative interval value", w->interval >= 0.));
-      /* this formula differs from the one in periodic_reify because we do not always round up */
-      ev_at (w) = w->offset + ceil ((ev_rt_now - w->offset) / w->interval) * w->interval;
+      periodic_recalc (EV_A_ w);
     }
   else
     ev_at (w) = w->offset;
@@ -2676,9 +3400,9 @@ ev_periodic_stop (EV_P_ ev_periodic *w)
       }
   }
 
-  EV_FREQUENT_CHECK;
-
   ev_stop (EV_A_ (W)w);
+
+  EV_FREQUENT_CHECK;
 }
 
 void noinline
@@ -2694,6 +3418,8 @@ ev_periodic_again (EV_P_ ev_periodic *w)
 # define SA_RESTART 0
 #endif
 
+#if EV_SIGNAL_ENABLE
+
 void noinline
 ev_signal_start (EV_P_ ev_signal *w)
 {
@@ -2749,7 +3475,7 @@ ev_signal_start (EV_P_ ev_signal *w)
     if (sigfd < 0) /*TODO*/
 # endif
       {
-# if _WIN32
+# ifdef _WIN32
         evpipe_init (EV_A);
 
         signal (w->signum, ev_sighandler);
@@ -2763,9 +3489,12 @@ ev_signal_start (EV_P_ ev_signal *w)
         sa.sa_flags = SA_RESTART; /* if restarting works we save one iteration */
         sigaction (w->signum, &sa, 0);
 
-        sigemptyset (&sa.sa_mask);
-        sigaddset (&sa.sa_mask, w->signum);
-        sigprocmask (SIG_UNBLOCK, &sa.sa_mask, 0);
+        if (origflags & EVFLAG_NOSIGMASK)
+          {
+            sigemptyset (&sa.sa_mask);
+            sigaddset (&sa.sa_mask, w->signum);
+            sigprocmask (SIG_UNBLOCK, &sa.sa_mask, 0);
+          }
 #endif
       }
 
@@ -2809,6 +3538,10 @@ ev_signal_stop (EV_P_ ev_signal *w)
   EV_FREQUENT_CHECK;
 }
 
+#endif
+
+#if EV_CHILD_ENABLE
+
 void
 ev_child_start (EV_P_ ev_child *w)
 {
@@ -2821,7 +3554,7 @@ ev_child_start (EV_P_ ev_child *w)
   EV_FREQUENT_CHECK;
 
   ev_start (EV_A_ (W)w, 1);
-  wlist_add (&childs [w->pid & (EV_PID_HASHSIZE - 1)], (WL)w);
+  wlist_add (&childs [w->pid & ((EV_PID_HASHSIZE) - 1)], (WL)w);
 
   EV_FREQUENT_CHECK;
 }
@@ -2835,12 +3568,14 @@ ev_child_stop (EV_P_ ev_child *w)
 
   EV_FREQUENT_CHECK;
 
-  wlist_del (&childs [w->pid & (EV_PID_HASHSIZE - 1)], (WL)w);
+  wlist_del (&childs [w->pid & ((EV_PID_HASHSIZE) - 1)], (WL)w);
   ev_stop (EV_A_ (W)w);
 
   EV_FREQUENT_CHECK;
 }
 
+#endif
+
 #if EV_STAT_ENABLE
 
 # ifdef _WIN32
@@ -2855,7 +3590,9 @@ ev_child_stop (EV_P_ ev_child *w)
 static void noinline stat_timer_cb (EV_P_ ev_timer *w_, int revents);
 
 #if EV_USE_INOTIFY
-# define EV_INOTIFY_BUFSIZE 8192
+
+/* the * 2 is to allow for alignment padding, which for some reason is >> 8 */
+# define EV_INOTIFY_BUFSIZE (sizeof (struct inotify_event) * 2 + NAME_MAX)
 
 static void noinline
 infy_add (EV_P_ ev_stat *w)
@@ -2908,13 +3645,13 @@ infy_add (EV_P_ ev_stat *w)
 
               *pend = 0;
               w->wd = inotify_add_watch (fs_fd, path, mask);
-            } 
+            }
           while (w->wd < 0 && (errno == ENOENT || errno == EACCES));
         }
     }
 
   if (w->wd >= 0)
-    wlist_add (&fs_hash [w->wd & (EV_INOTIFY_HASHSIZE - 1)].head, (WL)w);
+    wlist_add (&fs_hash [w->wd & ((EV_INOTIFY_HASHSIZE) - 1)].head, (WL)w);
 
   /* now re-arm timer, if required */
   if (ev_is_active (&w->timer)) ev_ref (EV_A);
@@ -2932,7 +3669,7 @@ infy_del (EV_P_ ev_stat *w)
     return;
 
   w->wd = -2;
-  slot = wd & (EV_INOTIFY_HASHSIZE - 1);
+  slot = wd & ((EV_INOTIFY_HASHSIZE) - 1);
   wlist_del (&fs_hash [slot].head, (WL)w);
 
   /* remove this watcher, if others are watching it, they will rearm */
@@ -2944,13 +3681,13 @@ infy_wd (EV_P_ int slot, int wd, struct inotify_event *ev)
 {
   if (slot < 0)
     /* overflow, need to check for all hash slots */
-    for (slot = 0; slot < EV_INOTIFY_HASHSIZE; ++slot)
+    for (slot = 0; slot < (EV_INOTIFY_HASHSIZE); ++slot)
       infy_wd (EV_A_ slot, wd, ev);
   else
     {
       WL w_;
 
-      for (w_ = fs_hash [slot & (EV_INOTIFY_HASHSIZE - 1)].head; w_; )
+      for (w_ = fs_hash [slot & ((EV_INOTIFY_HASHSIZE) - 1)].head; w_; )
         {
           ev_stat *w = (ev_stat *)w_;
           w_ = w_->next; /* lets us remove this watcher and all before it */
@@ -2959,7 +3696,7 @@ infy_wd (EV_P_ int slot, int wd, struct inotify_event *ev)
             {
               if (ev->mask & (IN_IGNORED | IN_UNMOUNT | IN_DELETE_SELF))
                 {
-                  wlist_del (&fs_hash [slot & (EV_INOTIFY_HASHSIZE - 1)].head, (WL)w);
+                  wlist_del (&fs_hash [slot & ((EV_INOTIFY_HASHSIZE) - 1)].head, (WL)w);
                   w->wd = -1;
                   infy_add (EV_A_ w); /* re-add, no matter what */
                 }
@@ -2974,32 +3711,24 @@ static void
 infy_cb (EV_P_ ev_io *w, int revents)
 {
   char buf [EV_INOTIFY_BUFSIZE];
-  struct inotify_event *ev = (struct inotify_event *)buf;
   int ofs;
   int len = read (fs_fd, buf, sizeof (buf));
 
-  for (ofs = 0; ofs < len; ofs += sizeof (struct inotify_event) + ev->len)
-    infy_wd (EV_A_ ev->wd, ev->wd, ev);
+  for (ofs = 0; ofs < len; )
+    {
+      struct inotify_event *ev = (struct inotify_event *)(buf + ofs);
+      infy_wd (EV_A_ ev->wd, ev->wd, ev);
+      ofs += sizeof (struct inotify_event) + ev->len;
+    }
 }
 
-inline_size void
-check_2625 (EV_P)
+inline_size void ecb_cold
+ev_check_2625 (EV_P)
 {
   /* kernels < 2.6.25 are borked
    * http://www.ussg.indiana.edu/hypermail/linux/kernel/0711.3/1208.html
    */
-  struct utsname buf;
-  int major, minor, micro;
-
-  if (uname (&buf))
-    return;
-
-  if (sscanf (buf.release, "%d.%d.%d", &major, &minor, &micro) != 3)
-    return;
-
-  if (major < 2
-      || (major == 2 && minor < 6)
-      || (major == 2 && minor == 6 && micro < 25))
+  if (ev_linux_version () < 0x020619)
     return;
 
   fs_2625 = 1;
@@ -3024,7 +3753,7 @@ infy_init (EV_P)
 
   fs_fd = -1;
 
-  check_2625 (EV_A);
+  ev_check_2625 (EV_A);
 
   fs_fd = infy_newfd ();
 
@@ -3059,7 +3788,7 @@ infy_fork (EV_P)
       ev_unref (EV_A);
     }
 
-  for (slot = 0; slot < EV_INOTIFY_HASHSIZE; ++slot)
+  for (slot = 0; slot < (EV_INOTIFY_HASHSIZE); ++slot)
     {
       WL w_ = fs_hash [slot].head;
       fs_hash [slot].head = 0;
@@ -3244,6 +3973,7 @@ ev_idle_stop (EV_P_ ev_idle *w)
 }
 #endif
 
+#if EV_PREPARE_ENABLE
 void
 ev_prepare_start (EV_P_ ev_prepare *w)
 {
@@ -3279,7 +4009,9 @@ ev_prepare_stop (EV_P_ ev_prepare *w)
 
   EV_FREQUENT_CHECK;
 }
+#endif
 
+#if EV_CHECK_ENABLE
 void
 ev_check_start (EV_P_ ev_check *w)
 {
@@ -3315,12 +4047,13 @@ ev_check_stop (EV_P_ ev_check *w)
 
   EV_FREQUENT_CHECK;
 }
+#endif
 
 #if EV_EMBED_ENABLE
 void noinline
 ev_embed_sweep (EV_P_ ev_embed *w)
 {
-  ev_loop (w->other, EVLOOP_NONBLOCK);
+  ev_run (w->other, EVRUN_NOWAIT);
 }
 
 static void
@@ -3331,7 +4064,7 @@ embed_io_cb (EV_P_ ev_io *io, int revents)
   if (ev_cb (w))
     ev_feed_event (EV_A_ (W)w, EV_EMBED);
   else
-    ev_loop (w->other, EVLOOP_NONBLOCK);
+    ev_run (w->other, EVRUN_NOWAIT);
 }
 
 static void
@@ -3345,7 +4078,7 @@ embed_prepare_cb (EV_P_ ev_prepare *prepare, int revents)
     while (fdchangecnt)
       {
         fd_reify (EV_A);
-        ev_loop (EV_A_ EVLOOP_NONBLOCK);
+        ev_run (EV_A_ EVRUN_NOWAIT);
       }
   }
 }
@@ -3361,7 +4094,7 @@ embed_fork_cb (EV_P_ ev_fork *fork_w, int revents)
     EV_P = w->other;
 
     ev_loop_fork (EV_A);
-    ev_loop (EV_A_ EVLOOP_NONBLOCK);
+    ev_run (EV_A_ EVRUN_NOWAIT);
   }
 
   ev_embed_start (EV_A_ w);
@@ -3419,6 +4152,8 @@ ev_embed_stop (EV_P_ ev_embed *w)
   ev_prepare_stop (EV_A_ &w->prepare);
   ev_fork_stop    (EV_A_ &w->fork);
 
+  ev_stop (EV_A_ (W)w);
+
   EV_FREQUENT_CHECK;
 }
 #endif
@@ -3461,6 +4196,47 @@ ev_fork_stop (EV_P_ ev_fork *w)
 }
 #endif
 
+#if EV_CLEANUP_ENABLE
+void
+ev_cleanup_start (EV_P_ ev_cleanup *w)
+{
+  if (expect_false (ev_is_active (w)))
+    return;
+
+  EV_FREQUENT_CHECK;
+
+  ev_start (EV_A_ (W)w, ++cleanupcnt);
+  array_needsize (ev_cleanup *, cleanups, cleanupmax, cleanupcnt, EMPTY2);
+  cleanups [cleanupcnt - 1] = w;
+
+  /* cleanup watchers should never keep a refcount on the loop */
+  ev_unref (EV_A);
+  EV_FREQUENT_CHECK;
+}
+
+void
+ev_cleanup_stop (EV_P_ ev_cleanup *w)
+{
+  clear_pending (EV_A_ (W)w);
+  if (expect_false (!ev_is_active (w)))
+    return;
+
+  EV_FREQUENT_CHECK;
+  ev_ref (EV_A);
+
+  {
+    int active = ev_active (w);
+
+    cleanups [active - 1] = cleanups [--cleanupcnt];
+    ev_active (cleanups [active - 1]) = active;
+  }
+
+  ev_stop (EV_A_ (W)w);
+
+  EV_FREQUENT_CHECK;
+}
+#endif
+
 #if EV_ASYNC_ENABLE
 void
 ev_async_start (EV_P_ ev_async *w)
@@ -3468,6 +4244,8 @@ ev_async_start (EV_P_ ev_async *w)
   if (expect_false (ev_is_active (w)))
     return;
 
+  w->sent = 0;
+
   evpipe_init (EV_A);
 
   EV_FREQUENT_CHECK;
@@ -3554,7 +4332,7 @@ ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, vo
 
   if (expect_false (!once))
     {
-      cb (EV_ERROR | EV_READ | EV_WRITE | EV_TIMEOUT, arg);
+      cb (EV_ERROR | EV_READ | EV_WRITE | EV_TIMER, arg);
       return;
     }
 
@@ -3579,7 +4357,7 @@ ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, vo
 /*****************************************************************************/
 
 #if EV_WALK_ENABLE
-void
+void ecb_cold
 ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w))
 {
   int i, j;
@@ -3633,7 +4411,7 @@ ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w))
 
 #if EV_IDLE_ENABLE
   if (types & EV_IDLE)
-    for (j = NUMPRI; i--; )
+    for (j = NUMPRI; j--; )
       for (i = idlecnt [j]; i--; )
         cb (EV_A_ EV_IDLE, idles [j][i]);
 #endif
@@ -3651,17 +4429,22 @@ ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w))
       cb (EV_A_ EV_ASYNC, asyncs [i]);
 #endif
 
+#if EV_PREPARE_ENABLE
   if (types & EV_PREPARE)
     for (i = preparecnt; i--; )
-#if EV_EMBED_ENABLE
+# if EV_EMBED_ENABLE
       if (ev_cb (prepares [i]) != embed_prepare_cb)
-#endif
+# endif
         cb (EV_A_ EV_PREPARE, prepares [i]);
+#endif
 
+#if EV_CHECK_ENABLE
   if (types & EV_CHECK)
     for (i = checkcnt; i--; )
       cb (EV_A_ EV_CHECK, checks [i]);
+#endif
 
+#if EV_SIGNAL_ENABLE
   if (types & EV_SIGNAL)
     for (i = 0; i < EV_NSIG - 1; ++i)
       for (wl = signals [i].head; wl; )
@@ -3670,15 +4453,18 @@ ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w))
           cb (EV_A_ EV_SIGNAL, wl);
           wl = wn;
         }
+#endif
 
+#if EV_CHILD_ENABLE
   if (types & EV_CHILD)
-    for (i = EV_PID_HASHSIZE; i--; )
+    for (i = (EV_PID_HASHSIZE); i--; )
       for (wl = childs [i]; wl; )
         {
           wn = wl->next;
           cb (EV_A_ EV_CHILD, wl);
           wl = wn;
         }
+#endif
 /* EV_STAT     0x00001000 /* stat data changed */
 /* EV_EMBED    0x00010000 /* embedded event loop needs sweep */
 }
@@ -3688,7 +4474,3 @@ ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w))
   #include "ev_wrap.h"
 #endif
 
-#ifdef __cplusplus
-}
-#endif
-
diff --git a/ext/libev/ev.h b/ext/libev/ev.h
index c7c44ff..54b4f00 100644
--- a/ext/libev/ev.h
+++ b/ext/libev/ev.h
@@ -1,19 +1,19 @@
 /*
  * libev native API header
  *
- * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann <libev at schmorp.de>
+ * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann <libev at schmorp.de>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without modifica-
  * tion, are permitted provided that the following conditions are met:
- * 
+ *
  *   1.  Redistributions of source code must retain the above copyright notice,
  *       this list of conditions and the following disclaimer.
- * 
+ *
  *   2.  Redistributions in binary form must reproduce the above copyright
  *       notice, this list of conditions and the following disclaimer in the
  *       documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
  * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
@@ -41,58 +41,112 @@
 #define EV_H_
 
 #ifdef __cplusplus
-extern "C" {
+# define EV_CPP(x) x
+#else
+# define EV_CPP(x)
 #endif
 
-typedef double ev_tstamp;
+EV_CPP(extern "C" {)
+
+/*****************************************************************************/
 
-/* these priorities are inclusive, higher priorities will be called earlier */
+/* pre-4.0 compatibility */
+#ifndef EV_COMPAT3
+# define EV_COMPAT3 1
+#endif
+
+#ifndef EV_FEATURES
+# define EV_FEATURES 0x7f
+#endif
+
+#define EV_FEATURE_CODE     ((EV_FEATURES) &  1)
+#define EV_FEATURE_DATA     ((EV_FEATURES) &  2)
+#define EV_FEATURE_CONFIG   ((EV_FEATURES) &  4)
+#define EV_FEATURE_API      ((EV_FEATURES) &  8)
+#define EV_FEATURE_WATCHERS ((EV_FEATURES) & 16)
+#define EV_FEATURE_BACKENDS ((EV_FEATURES) & 32)
+#define EV_FEATURE_OS       ((EV_FEATURES) & 64)
+
+/* these priorities are inclusive, higher priorities will be invoked earlier */
 #ifndef EV_MINPRI
-# define EV_MINPRI -2
+# define EV_MINPRI (EV_FEATURE_CONFIG ? -2 : 0)
 #endif
 #ifndef EV_MAXPRI
-# define EV_MAXPRI +2
+# define EV_MAXPRI (EV_FEATURE_CONFIG ? +2 : 0)
 #endif
 
 #ifndef EV_MULTIPLICITY
-# define EV_MULTIPLICITY 1
+# define EV_MULTIPLICITY EV_FEATURE_CONFIG
 #endif
 
 #ifndef EV_PERIODIC_ENABLE
-# define EV_PERIODIC_ENABLE 1
+# define EV_PERIODIC_ENABLE EV_FEATURE_WATCHERS
 #endif
 
 #ifndef EV_STAT_ENABLE
-# define EV_STAT_ENABLE 1
+# define EV_STAT_ENABLE EV_FEATURE_WATCHERS
+#endif
+
+#ifndef EV_PREPARE_ENABLE
+# define EV_PREPARE_ENABLE EV_FEATURE_WATCHERS
+#endif
+
+#ifndef EV_CHECK_ENABLE
+# define EV_CHECK_ENABLE EV_FEATURE_WATCHERS
 #endif
 
 #ifndef EV_IDLE_ENABLE
-# define EV_IDLE_ENABLE 1
+# define EV_IDLE_ENABLE EV_FEATURE_WATCHERS
 #endif
 
 #ifndef EV_FORK_ENABLE
-# define EV_FORK_ENABLE 1
+# define EV_FORK_ENABLE EV_FEATURE_WATCHERS
 #endif
 
-#ifndef EV_EMBED_ENABLE
-# define EV_EMBED_ENABLE 1
+#ifndef EV_CLEANUP_ENABLE
+# define EV_CLEANUP_ENABLE EV_FEATURE_WATCHERS
+#endif
+
+#ifndef EV_SIGNAL_ENABLE
+# define EV_SIGNAL_ENABLE EV_FEATURE_WATCHERS
+#endif
+
+#ifndef EV_CHILD_ENABLE
+# ifdef _WIN32
+#  define EV_CHILD_ENABLE 0
+# else
+#  define EV_CHILD_ENABLE EV_FEATURE_WATCHERS
+#endif
 #endif
 
 #ifndef EV_ASYNC_ENABLE
-# define EV_ASYNC_ENABLE 1
+# define EV_ASYNC_ENABLE EV_FEATURE_WATCHERS
+#endif
+
+#ifndef EV_EMBED_ENABLE
+# define EV_EMBED_ENABLE EV_FEATURE_WATCHERS
 #endif
 
 #ifndef EV_WALK_ENABLE
 # define EV_WALK_ENABLE 0 /* not yet */
 #endif
 
+/*****************************************************************************/
+
+#if EV_CHILD_ENABLE && !EV_SIGNAL_ENABLE
+# undef EV_SIGNAL_ENABLE
+# define EV_SIGNAL_ENABLE 1
+#endif
+
+/*****************************************************************************/
+
+typedef double ev_tstamp;
+
 #ifndef EV_ATOMIC_T
 # include <signal.h>
 # define EV_ATOMIC_T sig_atomic_t volatile
 #endif
 
-/*****************************************************************************/
-
 #if EV_STAT_ENABLE
 # ifdef _WIN32
 #  include <time.h>
@@ -104,14 +158,14 @@ typedef double ev_tstamp;
 /* support multiple event loops? */
 #if EV_MULTIPLICITY
 struct ev_loop;
-# define EV_P struct ev_loop *loop
-# define EV_P_ EV_P,
-# define EV_A loop
-# define EV_A_ EV_A,
-# define EV_DEFAULT_UC ev_default_loop_uc ()
-# define EV_DEFAULT_UC_ EV_DEFAULT_UC,
-# define EV_DEFAULT ev_default_loop (0)
-# define EV_DEFAULT_ EV_DEFAULT,
+# define EV_P  struct ev_loop *loop               /* a loop as sole parameter in a declaration */
+# define EV_P_ EV_P,                              /* a loop as first of multiple parameters */
+# define EV_A  loop                               /* a loop as sole argument to a function call */
+# define EV_A_ EV_A,                              /* a loop as first of multiple arguments */
+# define EV_DEFAULT_UC  ev_default_loop_uc_ ()    /* the default loop, if initialised, as sole arg */
+# define EV_DEFAULT_UC_ EV_DEFAULT_UC,            /* the default loop as first of multiple arguments */
+# define EV_DEFAULT  ev_default_loop (0)          /* the default loop as sole arg */
+# define EV_DEFAULT_ EV_DEFAULT,                  /* the default loop as first of multiple arguments */
 #else
 # define EV_P void
 # define EV_P_
@@ -124,46 +178,60 @@ struct ev_loop;
 # undef EV_EMBED_ENABLE
 #endif
 
+/* EV_INLINE is used for functions in header files */
 #if __STDC_VERSION__ >= 199901L || __GNUC__ >= 3
 # define EV_INLINE static inline
 #else
 # define EV_INLINE static
 #endif
 
+#ifdef EV_API_STATIC
+# define EV_API_DECL static
+#else
+# define EV_API_DECL extern
+#endif
+
+/* EV_PROTOTYPES can be used to switch of prototype declarations */
+#ifndef EV_PROTOTYPES
+# define EV_PROTOTYPES 1
+#endif
+
 /*****************************************************************************/
 
+#define EV_VERSION_MAJOR 4
+#define EV_VERSION_MINOR 11
+
 /* eventmask, revents, events... */
-#define EV_UNDEF            -1 /* guaranteed to be invalid */
-#define EV_NONE           0x00 /* no events */
-#define EV_READ           0x01 /* ev_io detected read will not block */
-#define EV_WRITE          0x02 /* ev_io detected write will not block */
-#define EV__IOFDSET       0x80 /* internal use only */
-#define EV_IO          EV_READ /* alias for type-detection */
-#define EV_TIMEOUT  0x00000100 /* timer timed out */
-#define EV_TIMER    EV_TIMEOUT /* alias for type-detection */
-#define EV_PERIODIC 0x00000200 /* periodic timer timed out */
-#define EV_SIGNAL   0x00000400 /* signal was received */
-#define EV_CHILD    0x00000800 /* child/pid had status change */
-#define EV_STAT     0x00001000 /* stat data changed */
-#define EV_IDLE     0x00002000 /* event loop is idling */
-#define EV_PREPARE  0x00004000 /* event loop about to poll */
-#define EV_CHECK    0x00008000 /* event loop finished poll */
-#define EV_EMBED    0x00010000 /* embedded event loop needs sweep */
-#define EV_FORK     0x00020000 /* event loop resumed in child */
-#define EV_ASYNC    0x00040000 /* async intra-loop signal */
-#define EV_CUSTOM   0x01000000 /* for use by user code */
-#define EV_ERROR    0x80000000 /* sent when an error occurs */
+enum {
+  EV_UNDEF    = 0xFFFFFFFF, /* guaranteed to be invalid */
+  EV_NONE     =       0x00, /* no events */
+  EV_READ     =       0x01, /* ev_io detected read will not block */
+  EV_WRITE    =       0x02, /* ev_io detected write will not block */
+  EV__IOFDSET =       0x80, /* internal use only */
+  EV_IO       =    EV_READ, /* alias for type-detection */
+  EV_TIMER    = 0x00000100, /* timer timed out */
+#if EV_COMPAT3
+  EV_TIMEOUT  =   EV_TIMER, /* pre 4.0 API compatibility */
+#endif
+  EV_PERIODIC = 0x00000200, /* periodic timer timed out */
+  EV_SIGNAL   = 0x00000400, /* signal was received */
+  EV_CHILD    = 0x00000800, /* child/pid had status change */
+  EV_STAT     = 0x00001000, /* stat data changed */
+  EV_IDLE     = 0x00002000, /* event loop is idling */
+  EV_PREPARE  = 0x00004000, /* event loop about to poll */
+  EV_CHECK    = 0x00008000, /* event loop finished poll */
+  EV_EMBED    = 0x00010000, /* embedded event loop needs sweep */
+  EV_FORK     = 0x00020000, /* event loop resumed in child */
+  EV_CLEANUP  = 0x00040000, /* event loop resumed in child */
+  EV_ASYNC    = 0x00080000, /* async intra-loop signal */
+  EV_CUSTOM   = 0x01000000, /* for use by user code */
+  EV_ERROR    = 0x80000000  /* sent when an error occurs */
+};
 
 /* can be used to add custom fields to all watchers, while losing binary compatibility */
 #ifndef EV_COMMON
 # define EV_COMMON void *data;
 #endif
-#ifndef EV_PROTOTYPES
-# define EV_PROTOTYPES 1
-#endif
-
-#define EV_VERSION_MAJOR 3
-#define EV_VERSION_MINOR 9
 
 #ifndef EV_CB_DECLARE
 # define EV_CB_DECLARE(type) void (*cb)(EV_P_ struct type *w, int revents);
@@ -172,6 +240,9 @@ struct ev_loop;
 # define EV_CB_INVOKE(watcher,revents) (watcher)->cb (EV_A_ (watcher), (revents))
 #endif
 
+/* not official, do not use */
+#define EV_CB(type,name) void name (EV_P_ struct ev_ ## type *w, int revents)
+
 /*
  * struct member types:
  * private: you may look at them, but not change them,
@@ -191,7 +262,7 @@ struct ev_loop;
 
 #if EV_MINPRI == EV_MAXPRI
 # define EV_DECL_PRIORITY
-#else
+#elif !defined (EV_DECL_PRIORITY)
 # define EV_DECL_PRIORITY int priority;
 #endif
 
@@ -331,12 +402,22 @@ typedef struct ev_check
 
 #if EV_FORK_ENABLE
 /* the callback gets invoked before check in the child process when a fork was detected */
+/* revent EV_FORK */
 typedef struct ev_fork
 {
   EV_WATCHER (ev_fork)
 } ev_fork;
 #endif
 
+#if EV_CLEANUP_ENABLE
+/* is invoked just before the loop gets destroyed */
+/* revent EV_CLEANUP */
+typedef struct ev_cleanup
+{
+  EV_WATCHER (ev_cleanup)
+} ev_cleanup;
+#endif
+
 #if EV_EMBED_ENABLE
 /* used to embed an event loop inside another */
 /* the callback gets invoked when the event loop has handled events, and can be 0 */
@@ -352,6 +433,9 @@ typedef struct ev_embed
   ev_periodic periodic;  /* unused */
   ev_idle idle;          /* unused */
   ev_fork fork;          /* private */
+#if EV_CLEANUP_ENABLE
+  ev_cleanup cleanup;    /* unused */
+#endif
 } ev_embed;
 #endif
 
@@ -390,6 +474,9 @@ union ev_any_watcher
 #if EV_FORK_ENABLE
   struct ev_fork fork;
 #endif
+#if EV_CLEANUP_ENABLE
+  struct ev_cleanup cleanup;
+#endif
 #if EV_EMBED_ENABLE
   struct ev_embed embed;
 #endif
@@ -398,35 +485,44 @@ union ev_any_watcher
 #endif
 };
 
-/* bits for ev_default_loop and ev_loop_new */
-/* the default */
-#define EVFLAG_AUTO       0x00000000U /* not quite a mask */
-/* flag bits */
-#define EVFLAG_NOENV      0x01000000U /* do NOT consult environment */
-#define EVFLAG_FORKCHECK  0x02000000U /* check for a fork in each iteration */
-/* debugging/feature disable */
-#define EVFLAG_NOINOTIFY  0x00100000U /* do not attempt to use inotify */
-#define EVFLAG_NOSIGFD 0 /* compatibility to pre-3.9 */
-#define EVFLAG_SIGNALFD   0x00200000U /* attempt to use signalfd */
+/* flag bits for ev_default_loop and ev_loop_new */
+enum {
+  /* the default */
+  EVFLAG_AUTO      = 0x00000000U, /* not quite a mask */
+  /* flag bits */
+  EVFLAG_NOENV     = 0x01000000U, /* do NOT consult environment */
+  EVFLAG_FORKCHECK = 0x02000000U, /* check for a fork in each iteration */
+  /* debugging/feature disable */
+  EVFLAG_NOINOTIFY = 0x00100000U, /* do not attempt to use inotify */
+#if EV_COMPAT3
+  EVFLAG_NOSIGFD   = 0, /* compatibility to pre-3.9 */
+#endif
+  EVFLAG_SIGNALFD  = 0x00200000U, /* attempt to use signalfd */
+  EVFLAG_NOSIGMASK = 0x00400000U  /* avoid modifying the signal mask */
+};
+
 /* method bits to be ored together */
-#define EVBACKEND_SELECT  0x00000001U /* about anywhere */
-#define EVBACKEND_POLL    0x00000002U /* !win */
-#define EVBACKEND_EPOLL   0x00000004U /* linux */
-#define EVBACKEND_KQUEUE  0x00000008U /* bsd */
-#define EVBACKEND_DEVPOLL 0x00000010U /* solaris 8 */ /* NYI */
-#define EVBACKEND_PORT    0x00000020U /* solaris 10 */
-#define EVBACKEND_ALL     0x0000003FU
+enum {
+  EVBACKEND_SELECT  = 0x00000001U, /* about anywhere */
+  EVBACKEND_POLL    = 0x00000002U, /* !win */
+  EVBACKEND_EPOLL   = 0x00000004U, /* linux */
+  EVBACKEND_KQUEUE  = 0x00000008U, /* bsd */
+  EVBACKEND_DEVPOLL = 0x00000010U, /* solaris 8 */ /* NYI */
+  EVBACKEND_PORT    = 0x00000020U, /* solaris 10 */
+  EVBACKEND_ALL     = 0x0000003FU, /* all known backends */
+  EVBACKEND_MASK    = 0x0000FFFFU  /* all future backends */
+};
 
 #if EV_PROTOTYPES
-int ev_version_major (void);
-int ev_version_minor (void);
+EV_API_DECL int ev_version_major (void);
+EV_API_DECL int ev_version_minor (void);
 
-unsigned int ev_supported_backends (void);
-unsigned int ev_recommended_backends (void);
-unsigned int ev_embeddable_backends (void);
+EV_API_DECL unsigned int ev_supported_backends (void);
+EV_API_DECL unsigned int ev_recommended_backends (void);
+EV_API_DECL unsigned int ev_embeddable_backends (void);
 
-ev_tstamp ev_time (void);
-void ev_sleep (ev_tstamp delay); /* sleep for a while */
+EV_API_DECL ev_tstamp ev_time (void);
+EV_API_DECL void ev_sleep (ev_tstamp delay); /* sleep for a while */
 
 /* Sets the allocation function to use, works like realloc.
  * It is used to allocate and free memory.
@@ -434,138 +530,139 @@ void ev_sleep (ev_tstamp delay); /* sleep for a while */
  * or take some potentially destructive action.
  * The default is your system realloc function.
  */
-void ev_set_allocator (void *(*cb)(void *ptr, long size));
+EV_API_DECL void ev_set_allocator (void *(*cb)(void *ptr, long size));
 
 /* set the callback function to call on a
  * retryable syscall error
  * (such as failed select, poll, epoll_wait)
  */
-void ev_set_syserr_cb (void (*cb)(const char *msg));
+EV_API_DECL void ev_set_syserr_cb (void (*cb)(const char *msg));
 
 #if EV_MULTIPLICITY
+
+/* the default loop is the only one that handles signals and child watchers */
+/* you can call this as often as you like */
+EV_API_DECL struct ev_loop *ev_default_loop (unsigned int flags EV_CPP (= 0));
+
+#ifdef EV_API_STATIC
+EV_API_DECL struct ev_loop *ev_default_loop_ptr;
+#endif
+
 EV_INLINE struct ev_loop *
-ev_default_loop_uc (void)
+ev_default_loop_uc_ (void)
 {
   extern struct ev_loop *ev_default_loop_ptr;
 
   return ev_default_loop_ptr;
 }
 
-/* the default loop is the only one that handles signals and child watchers */
-/* you can call this as often as you like */
-EV_INLINE struct ev_loop *
-ev_default_loop (unsigned int flags)
+EV_INLINE int
+ev_is_default_loop (EV_P)
 {
-  struct ev_loop *loop = ev_default_loop_uc ();
-
-  if (!loop)
-    {
-      extern struct ev_loop *ev_default_loop_init (unsigned int flags);
-
-      loop = ev_default_loop_init (flags);
-    }
-
-  return loop;
+  return EV_A == EV_DEFAULT_UC;
 }
 
 /* create and destroy alternative loops that don't handle signals */
-struct ev_loop *ev_loop_new (unsigned int flags);
-void ev_loop_destroy (EV_P);
-void ev_loop_fork (EV_P);
+EV_API_DECL struct ev_loop *ev_loop_new (unsigned int flags EV_CPP (= 0));
 
-ev_tstamp ev_now (EV_P); /* time w.r.t. timers and the eventloop, updated after each poll */
+EV_API_DECL ev_tstamp ev_now (EV_P); /* time w.r.t. timers and the eventloop, updated after each poll */
 
 #else
 
-int ev_default_loop (unsigned int flags); /* returns true when successful */
+EV_API_DECL int ev_default_loop (unsigned int flags EV_CPP (= 0)); /* returns true when successful */
+
+EV_API_DECL ev_tstamp ev_rt_now;
 
 EV_INLINE ev_tstamp
 ev_now (void)
 {
-  extern ev_tstamp ev_rt_now;
-
   return ev_rt_now;
 }
-#endif /* multiplicity */
 
+/* looks weird, but ev_is_default_loop (EV_A) still works if this exists */
 EV_INLINE int
-ev_is_default_loop (EV_P)
+ev_is_default_loop (void)
 {
-#if EV_MULTIPLICITY
-  extern struct ev_loop *ev_default_loop_ptr;
-
-  return !!(EV_A == ev_default_loop_ptr);
-#else
   return 1;
-#endif
 }
 
-void ev_default_destroy (void); /* destroy the default loop */
-/* this needs to be called after fork, to duplicate the default loop */
-/* if you create alternative loops you have to call ev_loop_fork on them */
+#endif /* multiplicity */
+
+/* destroy event loops, also works for the default loop */
+EV_API_DECL void ev_loop_destroy (EV_P);
+
+/* this needs to be called after fork, to duplicate the loop */
+/* when you want to re-use it in the child */
 /* you can call it in either the parent or the child */
 /* you can actually call it at any time, anywhere :) */
-void ev_default_fork (void);
+EV_API_DECL void ev_loop_fork (EV_P);
 
-unsigned int ev_backend (EV_P); /* backend in use by loop */
+EV_API_DECL unsigned int ev_backend (EV_P); /* backend in use by loop */
 
-void ev_now_update (EV_P); /* update event loop time */
+EV_API_DECL void ev_now_update (EV_P); /* update event loop time */
 
 #if EV_WALK_ENABLE
 /* walk (almost) all watchers in the loop of a given type, invoking the */
 /* callback on every such watcher. The callback might stop the watcher, */
 /* but do nothing else with the loop */
-void ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w));
+EV_API_DECL void ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w));
 #endif
 
 #endif /* prototypes */
 
-#define EVLOOP_NONBLOCK	1 /* do not block/wait */
-#define EVLOOP_ONESHOT	2 /* block *once* only */
-#define EVUNLOOP_CANCEL 0 /* undo unloop */
-#define EVUNLOOP_ONE    1 /* unloop once */
-#define EVUNLOOP_ALL    2 /* unloop all loops */
+/* ev_run flags values */
+enum {
+  EVRUN_NOWAIT = 1, /* do not block/wait */
+  EVRUN_ONCE   = 2  /* block *once* only */
+};
+
+/* ev_break how values */
+enum {
+  EVBREAK_CANCEL = 0, /* undo unloop */
+  EVBREAK_ONE    = 1, /* unloop once */
+  EVBREAK_ALL    = 2  /* unloop all loops */
+};
 
 #if EV_PROTOTYPES
-void ev_loop (EV_P_ int flags);
-void ev_unloop (EV_P_ int how); /* set to 1 to break out of event loop, set to 2 to break out of all event loops */
+EV_API_DECL void ev_run (EV_P_ int flags EV_CPP (= 0));
+EV_API_DECL void ev_break (EV_P_ int how EV_CPP (= EVBREAK_ONE)); /* break out of the loop */
 
 /*
  * ref/unref can be used to add or remove a refcount on the mainloop. every watcher
  * keeps one reference. if you have a long-running watcher you never unregister that
  * should not keep ev_loop from running, unref() after starting, and ref() before stopping.
  */
-void ev_ref   (EV_P);
-void ev_unref (EV_P);
+EV_API_DECL void ev_ref   (EV_P);
+EV_API_DECL void ev_unref (EV_P);
 
 /*
  * convenience function, wait for a single event, without registering an event watcher
  * if timeout is < 0, do wait indefinitely
  */
-void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg);
+EV_API_DECL void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg);
 
-# if EV_MINIMAL < 2
-unsigned int ev_loop_count  (EV_P); /* number of loop iterations */
-unsigned int ev_loop_depth  (EV_P); /* #ev_loop enters - #ev_loop leaves */
-void         ev_loop_verify (EV_P); /* abort if loop data corrupted */
+# if EV_FEATURE_API
+EV_API_DECL unsigned int ev_iteration (EV_P); /* number of loop iterations */
+EV_API_DECL unsigned int ev_depth     (EV_P); /* #ev_loop enters - #ev_loop leaves */
+EV_API_DECL void         ev_verify    (EV_P); /* abort if loop data corrupted */
 
-void ev_set_io_collect_interval (EV_P_ ev_tstamp interval); /* sleep at least this time, default 0 */
-void ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval); /* sleep at least this time, default 0 */
+EV_API_DECL void ev_set_io_collect_interval (EV_P_ ev_tstamp interval); /* sleep at least this time, default 0 */
+EV_API_DECL void ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval); /* sleep at least this time, default 0 */
 
 /* advanced stuff for threading etc. support, see docs */
-void ev_set_userdata (EV_P_ void *data);
-void *ev_userdata (EV_P);
-void ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P));
-void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P), void (*acquire)(EV_P));
+EV_API_DECL void ev_set_userdata (EV_P_ void *data);
+EV_API_DECL void *ev_userdata (EV_P);
+EV_API_DECL void ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P));
+EV_API_DECL void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P), void (*acquire)(EV_P));
 
-unsigned int ev_pending_count (EV_P); /* number of pending events, if any */
-void ev_invoke_pending (EV_P); /* invoke all pending watchers */
+EV_API_DECL unsigned int ev_pending_count (EV_P); /* number of pending events, if any */
+EV_API_DECL void ev_invoke_pending (EV_P); /* invoke all pending watchers */
 
 /*
  * stop/start the timer handling.
  */
-void ev_suspend (EV_P);
-void ev_resume  (EV_P);
+EV_API_DECL void ev_suspend (EV_P);
+EV_API_DECL void ev_resume  (EV_P);
 #endif
 
 #endif
@@ -590,7 +687,8 @@ void ev_resume  (EV_P);
 #define ev_check_set(ev)                     /* nop, yes, this is a serious in-joke */
 #define ev_embed_set(ev,other_)              do { (ev)->other = (other_); } while (0)
 #define ev_fork_set(ev)                      /* nop, yes, this is a serious in-joke */
-#define ev_async_set(ev)                     do { (ev)->sent = 0; } while (0)
+#define ev_cleanup_set(ev)                   /* nop, yes, this is a serious in-joke */
+#define ev_async_set(ev)                     /* nop, yes, this is a serious in-joke */
 
 #define ev_io_init(ev,cb,fd,events)          do { ev_init ((ev), (cb)); ev_io_set ((ev),(fd),(events)); } while (0)
 #define ev_timer_init(ev,cb,after,repeat)    do { ev_init ((ev), (cb)); ev_timer_set ((ev),(after),(repeat)); } while (0)
@@ -603,6 +701,7 @@ void ev_resume  (EV_P);
 #define ev_check_init(ev,cb)                 do { ev_init ((ev), (cb)); ev_check_set ((ev)); } while (0)
 #define ev_embed_init(ev,cb,other)           do { ev_init ((ev), (cb)); ev_embed_set ((ev),(other)); } while (0)
 #define ev_fork_init(ev,cb)                  do { ev_init ((ev), (cb)); ev_fork_set ((ev)); } while (0)
+#define ev_cleanup_init(ev,cb)               do { ev_init ((ev), (cb)); ev_cleanup_set ((ev)); } while (0)
 #define ev_async_init(ev,cb)                 do { ev_init ((ev), (cb)); ev_async_set ((ev)); } while (0)
 
 #define ev_is_pending(ev)                    (0 + ((ev_watcher *)(void *)(ev))->pending) /* ro, true when watcher is waiting for callback invocation */
@@ -615,7 +714,7 @@ void ev_resume  (EV_P);
 # define ev_set_priority(ev,pri)             ((ev), (pri))
 #else
 # define ev_priority(ev)                     (+(((ev_watcher *)(void *)(ev))->priority))
-# define ev_set_priority(ev,pri)             (  (ev_watcher *)(void *)(ev))->priority = (pri)
+# define ev_set_priority(ev,pri)             (   (ev_watcher *)(void *)(ev))->priority = (pri)
 #endif
 
 #define ev_periodic_at(ev)                   (+((ev_watcher_time *)(ev))->at)
@@ -628,78 +727,113 @@ void ev_resume  (EV_P);
 /* stopping (disabling, deleting) a watcher does nothing unless its already running */
 #if EV_PROTOTYPES
 
-/* feeds an event into a watcher as if the event actually occured */
+/* feeds an event into a watcher as if the event actually occurred */
 /* accepts any ev_watcher type */
-void ev_feed_event     (EV_P_ void *w, int revents);
-void ev_feed_fd_event  (EV_P_ int fd, int revents);
-void ev_feed_signal_event (EV_P_ int signum);
-void ev_invoke         (EV_P_ void *w, int revents);
-int  ev_clear_pending  (EV_P_ void *w);
+EV_API_DECL void ev_feed_event     (EV_P_ void *w, int revents);
+EV_API_DECL void ev_feed_fd_event  (EV_P_ int fd, int revents);
+#if EV_SIGNAL_ENABLE
+EV_API_DECL void ev_feed_signal    (int signum);
+EV_API_DECL void ev_feed_signal_event (EV_P_ int signum);
+#endif
+EV_API_DECL void ev_invoke         (EV_P_ void *w, int revents);
+EV_API_DECL int  ev_clear_pending  (EV_P_ void *w);
 
-void ev_io_start       (EV_P_ ev_io *w);
-void ev_io_stop        (EV_P_ ev_io *w);
+EV_API_DECL void ev_io_start       (EV_P_ ev_io *w);
+EV_API_DECL void ev_io_stop        (EV_P_ ev_io *w);
 
-void ev_timer_start    (EV_P_ ev_timer *w);
-void ev_timer_stop     (EV_P_ ev_timer *w);
+EV_API_DECL void ev_timer_start    (EV_P_ ev_timer *w);
+EV_API_DECL void ev_timer_stop     (EV_P_ ev_timer *w);
 /* stops if active and no repeat, restarts if active and repeating, starts if inactive and repeating */
-void ev_timer_again    (EV_P_ ev_timer *w);
+EV_API_DECL void ev_timer_again    (EV_P_ ev_timer *w);
 /* return remaining time */
-ev_tstamp ev_timer_remaining (EV_P_ ev_timer *w);
+EV_API_DECL ev_tstamp ev_timer_remaining (EV_P_ ev_timer *w);
 
 #if EV_PERIODIC_ENABLE
-void ev_periodic_start (EV_P_ ev_periodic *w);
-void ev_periodic_stop  (EV_P_ ev_periodic *w);
-void ev_periodic_again (EV_P_ ev_periodic *w);
+EV_API_DECL void ev_periodic_start (EV_P_ ev_periodic *w);
+EV_API_DECL void ev_periodic_stop  (EV_P_ ev_periodic *w);
+EV_API_DECL void ev_periodic_again (EV_P_ ev_periodic *w);
 #endif
 
 /* only supported in the default loop */
-void ev_signal_start   (EV_P_ ev_signal *w);
-void ev_signal_stop    (EV_P_ ev_signal *w);
+#if EV_SIGNAL_ENABLE
+EV_API_DECL void ev_signal_start   (EV_P_ ev_signal *w);
+EV_API_DECL void ev_signal_stop    (EV_P_ ev_signal *w);
+#endif
 
 /* only supported in the default loop */
-void ev_child_start    (EV_P_ ev_child *w);
-void ev_child_stop     (EV_P_ ev_child *w);
+# if EV_CHILD_ENABLE
+EV_API_DECL void ev_child_start    (EV_P_ ev_child *w);
+EV_API_DECL void ev_child_stop     (EV_P_ ev_child *w);
+# endif
 
 # if EV_STAT_ENABLE
-void ev_stat_start     (EV_P_ ev_stat *w);
-void ev_stat_stop      (EV_P_ ev_stat *w);
-void ev_stat_stat      (EV_P_ ev_stat *w);
+EV_API_DECL void ev_stat_start     (EV_P_ ev_stat *w);
+EV_API_DECL void ev_stat_stop      (EV_P_ ev_stat *w);
+EV_API_DECL void ev_stat_stat      (EV_P_ ev_stat *w);
 # endif
 
 # if EV_IDLE_ENABLE
-void ev_idle_start     (EV_P_ ev_idle *w);
-void ev_idle_stop      (EV_P_ ev_idle *w);
+EV_API_DECL void ev_idle_start     (EV_P_ ev_idle *w);
+EV_API_DECL void ev_idle_stop      (EV_P_ ev_idle *w);
 # endif
 
-void ev_prepare_start  (EV_P_ ev_prepare *w);
-void ev_prepare_stop   (EV_P_ ev_prepare *w);
+#if EV_PREPARE_ENABLE
+EV_API_DECL void ev_prepare_start  (EV_P_ ev_prepare *w);
+EV_API_DECL void ev_prepare_stop   (EV_P_ ev_prepare *w);
+#endif
 
-void ev_check_start    (EV_P_ ev_check *w);
-void ev_check_stop     (EV_P_ ev_check *w);
+#if EV_CHECK_ENABLE
+EV_API_DECL void ev_check_start    (EV_P_ ev_check *w);
+EV_API_DECL void ev_check_stop     (EV_P_ ev_check *w);
+#endif
 
 # if EV_FORK_ENABLE
-void ev_fork_start     (EV_P_ ev_fork *w);
-void ev_fork_stop      (EV_P_ ev_fork *w);
+EV_API_DECL void ev_fork_start     (EV_P_ ev_fork *w);
+EV_API_DECL void ev_fork_stop      (EV_P_ ev_fork *w);
+# endif
+
+# if EV_CLEANUP_ENABLE
+EV_API_DECL void ev_cleanup_start  (EV_P_ ev_cleanup *w);
+EV_API_DECL void ev_cleanup_stop   (EV_P_ ev_cleanup *w);
 # endif
 
 # if EV_EMBED_ENABLE
 /* only supported when loop to be embedded is in fact embeddable */
-void ev_embed_start    (EV_P_ ev_embed *w);
-void ev_embed_stop     (EV_P_ ev_embed *w);
-void ev_embed_sweep    (EV_P_ ev_embed *w);
+EV_API_DECL void ev_embed_start    (EV_P_ ev_embed *w);
+EV_API_DECL void ev_embed_stop     (EV_P_ ev_embed *w);
+EV_API_DECL void ev_embed_sweep    (EV_P_ ev_embed *w);
 # endif
 
 # if EV_ASYNC_ENABLE
-void ev_async_start    (EV_P_ ev_async *w);
-void ev_async_stop     (EV_P_ ev_async *w);
-void ev_async_send     (EV_P_ ev_async *w);
+EV_API_DECL void ev_async_start    (EV_P_ ev_async *w);
+EV_API_DECL void ev_async_stop     (EV_P_ ev_async *w);
+EV_API_DECL void ev_async_send     (EV_P_ ev_async *w);
 # endif
 
+#if EV_COMPAT3
+  #define EVLOOP_NONBLOCK EVRUN_NOWAIT
+  #define EVLOOP_ONESHOT  EVRUN_ONCE
+  #define EVUNLOOP_CANCEL EVBREAK_CANCEL
+  #define EVUNLOOP_ONE    EVBREAK_ONE
+  #define EVUNLOOP_ALL    EVBREAK_ALL
+  #if EV_PROTOTYPES
+    EV_INLINE void ev_loop   (EV_P_ int flags) { ev_run   (EV_A_ flags); }
+    EV_INLINE void ev_unloop (EV_P_ int how  ) { ev_break (EV_A_ how  ); }
+    EV_INLINE void ev_default_destroy (void) { ev_loop_destroy (EV_DEFAULT); }
+    EV_INLINE void ev_default_fork    (void) { ev_loop_fork    (EV_DEFAULT); }
+    #if EV_FEATURE_API
+      EV_INLINE unsigned int ev_loop_count  (EV_P) { return ev_iteration  (EV_A); }
+      EV_INLINE unsigned int ev_loop_depth  (EV_P) { return ev_depth      (EV_A); }
+      EV_INLINE void         ev_loop_verify (EV_P) {        ev_verify     (EV_A); }
+    #endif
+  #endif
+#else
+  typedef struct ev_loop ev_loop;
 #endif
 
-#ifdef __cplusplus
-}
 #endif
 
+EV_CPP(})
+
 #endif
 
diff --git a/ext/libev/ev_epoll.c b/ext/libev/ev_epoll.c
index f7e3d60..b4e02c2 100644
--- a/ext/libev/ev_epoll.c
+++ b/ext/libev/ev_epoll.c
@@ -1,19 +1,19 @@
 /*
  * libev epoll fd activity backend
  *
- * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann <libev at schmorp.de>
+ * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev at schmorp.de>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without modifica-
  * tion, are permitted provided that the following conditions are met:
- * 
+ *
  *   1.  Redistributions of source code must retain the above copyright notice,
  *       this list of conditions and the following disclaimer.
- * 
+ *
  *   2.  Redistributions in binary form must reproduce the above copyright
  *       notice, this list of conditions and the following disclaimer in the
  *       documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
  * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
@@ -49,6 +49,12 @@
  * c) the inability to handle fork or file descriptors (think dup)
  *    limits the applicability over poll, so this is not a generic
  *    poll replacement.
+ * d) epoll doesn't work the same as select with many file descriptors
+ *    (such as files). while not critical, no other advanced interface
+ *    seems to share this (rather non-unixy) limitation.
+ * e) epoll claims to be embeddable, but in practise you never get
+ *    a ready event for the epoll fd (broken: <=2.6.26, working: >=2.6.32).
+ * f) epoll_ctl returning EPERM means the fd is always ready.
  *
  * lots of "weird code" and complication handling in this file is due
  * to these design problems with epoll, as we try very hard to avoid
@@ -59,6 +65,8 @@
 
 #include <sys/epoll.h>
 
+#define EV_EMASK_EPERM 0x80
+
 static void
 epoll_modify (EV_P_ int fd, int oev, int nev)
 {
@@ -85,7 +93,7 @@ epoll_modify (EV_P_ int fd, int oev, int nev)
   ev.events   = (nev & EV_READ  ? EPOLLIN  : 0)
               | (nev & EV_WRITE ? EPOLLOUT : 0);
 
-  if (expect_true (!epoll_ctl (backend_fd, oev ? EPOLL_CTL_MOD : EPOLL_CTL_ADD, fd, &ev)))
+  if (expect_true (!epoll_ctl (backend_fd, oev && oldmask != nev ? EPOLL_CTL_MOD : EPOLL_CTL_ADD, fd, &ev)))
     return;
 
   if (expect_true (errno == ENOENT))
@@ -107,6 +115,21 @@ epoll_modify (EV_P_ int fd, int oev, int nev)
       if (!epoll_ctl (backend_fd, EPOLL_CTL_MOD, fd, &ev))
         return;
     }
+  else if (expect_true (errno == EPERM))
+    {
+      /* EPERM means the fd is always ready, but epoll is too snobbish */
+      /* to handle it, unlike select or poll. */
+      anfds [fd].emask = EV_EMASK_EPERM;
+
+      /* add fd to epoll_eperms, if not already inside */
+      if (!(oldmask & EV_EMASK_EPERM))
+        {
+          array_needsize (int, epoll_eperms, epoll_epermmax, epoll_epermcnt + 1, EMPTY2);
+          epoll_eperms [epoll_epermcnt++] = fd;
+        }
+
+      return;
+    }
 
   fd_kill (EV_A_ fd);
 
@@ -120,11 +143,14 @@ epoll_poll (EV_P_ ev_tstamp timeout)
 {
   int i;
   int eventcnt;
-  
+
+  if (expect_false (epoll_epermcnt))
+    timeout = 0.;
+
   /* epoll wait times cannot be larger than (LONG_MAX - 999UL) / HZ msecs, which is below */
   /* the default libev max wait time, however. */
   EV_RELEASE_CB;
-  eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax, (int)ceil (timeout * 1000.));
+  eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax, timeout * 1e3);
   EV_ACQUIRE_CB;
 
   if (expect_false (eventcnt < 0))
@@ -144,7 +170,12 @@ epoll_poll (EV_P_ ev_tstamp timeout)
       int got  = (ev->events & (EPOLLOUT | EPOLLERR | EPOLLHUP) ? EV_WRITE : 0)
                | (ev->events & (EPOLLIN  | EPOLLERR | EPOLLHUP) ? EV_READ  : 0);
 
-      /* check for spurious notification */
+      /*
+       * check for spurious notification.
+       * this only finds spurious notifications on egen updates
+       * other spurious notifications will be found by epoll_ctl, below
+       * we assume that fd is always in range, as we never shrink the anfds array
+       */
       if (expect_false ((uint32_t)anfds [fd].egen != (uint32_t)(ev->data.u64 >> 32)))
         {
           /* recreate kernel state */
@@ -156,8 +187,15 @@ epoll_poll (EV_P_ ev_tstamp timeout)
         {
           anfds [fd].emask = want;
 
-          /* we received an event but are not interested in it, try mod or del */
-          /* I don't think we ever need MOD, but let's handle it anyways */
+          /*
+           * we received an event but are not interested in it, try mod or del
+           * this often happens because we optimistically do not unregister fds
+           * when we are no longer interested in them, but also when we get spurious
+           * notifications for fds from another process. this is partially handled
+           * above with the gencounter check (== our fd is not the event fd), and
+           * partially here, when epoll_ctl returns an error (== a child has the fd
+           * but we closed it).
+           */
           ev->events = (want & EV_READ  ? EPOLLIN  : 0)
                      | (want & EV_WRITE ? EPOLLOUT : 0);
 
@@ -165,7 +203,7 @@ epoll_poll (EV_P_ ev_tstamp timeout)
           /* which is fortunately easy to do for us. */
           if (epoll_ctl (backend_fd, want ? EPOLL_CTL_MOD : EPOLL_CTL_DEL, fd, ev))
             {
-              postfork = 1; /* an error occured, recreate kernel state */
+              postfork = 1; /* an error occurred, recreate kernel state */
               continue;
             }
         }
@@ -180,6 +218,18 @@ epoll_poll (EV_P_ ev_tstamp timeout)
       epoll_eventmax = array_nextsize (sizeof (struct epoll_event), epoll_eventmax, epoll_eventmax + 1);
       epoll_events = (struct epoll_event *)ev_malloc (sizeof (struct epoll_event) * epoll_eventmax);
     }
+
+  /* now synthesize events for all fds where epoll fails, while select works... */
+  for (i = epoll_epermcnt; i--; )
+    {
+      int fd = epoll_eperms [i];
+      unsigned char events = anfds [fd].events & (EV_READ | EV_WRITE);
+
+      if (anfds [fd].emask & EV_EMASK_EPERM && events)
+        fd_event (EV_A_ fd, events);
+      else
+        epoll_eperms [i] = epoll_eperms [--epoll_epermcnt];
+    }
 }
 
 int inline_size
@@ -188,7 +238,7 @@ epoll_init (EV_P_ int flags)
 #ifdef EPOLL_CLOEXEC
   backend_fd = epoll_create1 (EPOLL_CLOEXEC);
 
-  if (backend_fd <= 0)
+  if (backend_fd < 0)
 #endif
     backend_fd = epoll_create (256);
 
@@ -197,9 +247,9 @@ epoll_init (EV_P_ int flags)
 
   fcntl (backend_fd, F_SETFD, FD_CLOEXEC);
 
-  backend_fudge  = 0.; /* kernel sources seem to indicate this to be zero */
-  backend_modify = epoll_modify;
-  backend_poll   = epoll_poll;
+  backend_mintime = 1e-3; /* epoll does sometimes return early, this is just to avoid the worst */
+  backend_modify  = epoll_modify;
+  backend_poll    = epoll_poll;
 
   epoll_eventmax = 64; /* initial number of events receivable per poll */
   epoll_events = (struct epoll_event *)ev_malloc (sizeof (struct epoll_event) * epoll_eventmax);
@@ -211,6 +261,7 @@ void inline_size
 epoll_destroy (EV_P)
 {
   ev_free (epoll_events);
+  array_free (epoll_eperm, EMPTY);
 }
 
 void inline_size
diff --git a/ext/libev/ev_kqueue.c b/ext/libev/ev_kqueue.c
index 0fe340b..91b85ed 100644
--- a/ext/libev/ev_kqueue.c
+++ b/ext/libev/ev_kqueue.c
@@ -1,19 +1,19 @@
 /*
  * libev kqueue backend
  *
- * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann <libev at schmorp.de>
+ * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev at schmorp.de>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without modifica-
  * tion, are permitted provided that the following conditions are met:
- * 
+ *
  *   1.  Redistributions of source code must retain the above copyright notice,
  *       this list of conditions and the following disclaimer.
- * 
+ *
  *   2.  Redistributions in binary form must reproduce the above copyright
  *       notice, this list of conditions and the following disclaimer in the
  *       documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
  * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
@@ -39,7 +39,6 @@
 
 #include <sys/types.h>
 #include <sys/time.h>
-#include <sys/queue.h>
 #include <sys/event.h>
 #include <string.h>
 #include <errno.h>
@@ -53,6 +52,10 @@ kqueue_change (EV_P_ int fd, int filter, int flags, int fflags)
   EV_SET (&kqueue_changes [kqueue_changecnt - 1], fd, filter, flags, fflags, 0, 0);
 }
 
+/* OS X at least needs this */
+#ifndef EV_ENABLE
+# define EV_ENABLE 0
+#endif
 #ifndef NOTE_EOF
 # define NOTE_EOF 0
 #endif
@@ -73,10 +76,10 @@ kqueue_modify (EV_P_ int fd, int oev, int nev)
   /* event requests even when oev == nev */
 
   if (nev & EV_READ)
-    kqueue_change (EV_A_ fd, EVFILT_READ , EV_ADD, NOTE_EOF);
+    kqueue_change (EV_A_ fd, EVFILT_READ , EV_ADD | EV_ENABLE, NOTE_EOF);
 
   if (nev & EV_WRITE)
-    kqueue_change (EV_A_ fd, EVFILT_WRITE, EV_ADD, NOTE_EOF);
+    kqueue_change (EV_A_ fd, EVFILT_WRITE, EV_ADD | EV_ENABLE, NOTE_EOF);
 }
 
 static void
@@ -94,19 +97,18 @@ kqueue_poll (EV_P_ ev_tstamp timeout)
     }
 
   EV_RELEASE_CB;
-  ts.tv_sec  = (time_t)timeout;
-  ts.tv_nsec = (long)((timeout - (ev_tstamp)ts.tv_sec) * 1e9);
+  EV_TS_SET (ts, timeout);
   res = kevent (backend_fd, kqueue_changes, kqueue_changecnt, kqueue_events, kqueue_eventmax, &ts);
   EV_ACQUIRE_CB;
   kqueue_changecnt = 0;
 
   if (expect_false (res < 0))
-    { 
+    {
       if (errno != EINTR)
         ev_syserr ("(libev) kevent");
 
       return;
-    } 
+    }
 
   for (i = 0; i < res; ++i)
     {
@@ -114,11 +116,11 @@ kqueue_poll (EV_P_ ev_tstamp timeout)
 
       if (expect_false (kqueue_events [i].flags & EV_ERROR))
         {
-	  int err = kqueue_events [i].data;
+          int err = kqueue_events [i].data;
 
           /* we are only interested in errors for fds that we are interested in :) */
           if (anfds [fd].events)
-	    {
+            {
               if (err == ENOENT) /* resubmit changes on ENOENT */
                 kqueue_modify (EV_A_ fd, 0, anfds [fd].events);
               else if (err == EBADF) /* on EBADF, we re-check the fd */
@@ -130,7 +132,7 @@ kqueue_poll (EV_P_ ev_tstamp timeout)
                 }
               else /* on all other errors, we error out on the fd */
                 fd_kill (EV_A_ fd);
-	    }
+            }
         }
       else
         fd_event (
@@ -153,15 +155,15 @@ kqueue_poll (EV_P_ ev_tstamp timeout)
 int inline_size
 kqueue_init (EV_P_ int flags)
 {
-  /* Initalize the kernel queue */
+  /* Initialize the kernel queue */
   if ((backend_fd = kqueue ()) < 0)
     return 0;
 
   fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */
 
-  backend_fudge  = 0.;
-  backend_modify = kqueue_modify;
-  backend_poll   = kqueue_poll;
+  backend_mintime = 1e-9; /* apparently, they did the right thing in freebsd */
+  backend_modify  = kqueue_modify;
+  backend_poll    = kqueue_poll;
 
   kqueue_eventmax = 64; /* initial number of events receivable per poll */
   kqueue_events = (struct kevent *)ev_malloc (sizeof (struct kevent) * kqueue_eventmax);
diff --git a/ext/libev/ev_poll.c b/ext/libev/ev_poll.c
index 178e458..4832351 100644
--- a/ext/libev/ev_poll.c
+++ b/ext/libev/ev_poll.c
@@ -1,19 +1,19 @@
 /*
  * libev poll fd activity backend
  *
- * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann <libev at schmorp.de>
+ * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev at schmorp.de>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without modifica-
  * tion, are permitted provided that the following conditions are met:
- * 
+ *
  *   1.  Redistributions of source code must retain the above copyright notice,
  *       this list of conditions and the following disclaimer.
- * 
+ *
  *   2.  Redistributions in binary form must reproduce the above copyright
  *       notice, this list of conditions and the following disclaimer in the
  *       documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
  * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
@@ -42,7 +42,7 @@
 void inline_size
 pollidx_init (int *base, int count)
 {
-  /* consider using memset (.., -1, ...), which is pratically guarenteed
+  /* consider using memset (.., -1, ...), which is practically guaranteed
    * to work on all systems implementing poll */
   while (count--)
     *base++ = -1;
@@ -92,7 +92,7 @@ poll_poll (EV_P_ ev_tstamp timeout)
   int res;
   
   EV_RELEASE_CB;
-  res = poll (polls, pollcnt, (int)ceil (timeout * 1000.));
+  res = poll (polls, pollcnt, timeout * 1e3);
   EV_ACQUIRE_CB;
 
   if (expect_false (res < 0))
@@ -106,28 +106,32 @@ poll_poll (EV_P_ ev_tstamp timeout)
     }
   else
     for (p = polls; res; ++p)
-      if (expect_false (p->revents)) /* this expect is debatable */
-        {
-          --res;
-
-          if (expect_false (p->revents & POLLNVAL))
-            fd_kill (EV_A_ p->fd);
-          else
-            fd_event (
-              EV_A_
-              p->fd,
-              (p->revents & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0)
-              | (p->revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0)
-            );
-        }
+      {
+        assert (("libev: poll() returned illegal result, broken BSD kernel?", p < polls + pollcnt));
+
+        if (expect_false (p->revents)) /* this expect is debatable */
+          {
+            --res;
+
+            if (expect_false (p->revents & POLLNVAL))
+              fd_kill (EV_A_ p->fd);
+            else
+              fd_event (
+                EV_A_
+                p->fd,
+                (p->revents & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0)
+                | (p->revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0)
+              );
+          }
+      }
 }
 
 int inline_size
 poll_init (EV_P_ int flags)
 {
-  backend_fudge  = 0.; /* posix says this is zero */
-  backend_modify = poll_modify;
-  backend_poll   = poll_poll;
+  backend_mintime = 1e-3;
+  backend_modify  = poll_modify;
+  backend_poll    = poll_poll;
 
   pollidxs = 0; pollidxmax = 0;
   polls    = 0; pollmax    = 0; pollcnt = 0;
diff --git a/ext/libev/ev_port.c b/ext/libev/ev_port.c
index 47da929..9368501 100644
--- a/ext/libev/ev_port.c
+++ b/ext/libev/ev_port.c
@@ -1,19 +1,19 @@
 /*
  * libev solaris event port backend
  *
- * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann <libev at schmorp.de>
+ * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev at schmorp.de>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without modifica-
  * tion, are permitted provided that the following conditions are met:
- * 
+ *
  *   1.  Redistributions of source code must retain the above copyright notice,
  *       this list of conditions and the following disclaimer.
- * 
+ *
  *   2.  Redistributions in binary form must reproduce the above copyright
  *       notice, this list of conditions and the following disclaimer in the
  *       documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
  * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
@@ -37,6 +37,17 @@
  * either the BSD or the GPL.
  */
 
+/* useful reading:
+ *
+ * http://bugs.opensolaris.org/view_bug.do?bug_id=6268715 (random results)
+ * http://bugs.opensolaris.org/view_bug.do?bug_id=6455223 (just totally broken)
+ * http://bugs.opensolaris.org/view_bug.do?bug_id=6873782 (manpage ETIME)
+ * http://bugs.opensolaris.org/view_bug.do?bug_id=6874410 (implementation ETIME)
+ * http://www.mail-archive.com/networking-discuss@opensolaris.org/msg11898.html ETIME vs. nget
+ * http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/event_port.c (libc)
+ * http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/portfs/port.c#1325 (kernel)
+ */
+
 #include <sys/types.h>
 #include <sys/time.h>
 #include <poll.h>
@@ -85,19 +96,20 @@ port_poll (EV_P_ ev_tstamp timeout)
   struct timespec ts;
   uint_t nget = 1;
 
+  /* we initialise this to something we will skip in the loop, as */
+  /* port_getn can return with nget unchanged, but no indication */
+  /* whether it was the original value or has been updated :/ */
+  port_events [0].portev_source = 0;
+
   EV_RELEASE_CB;
-  ts.tv_sec  = (time_t)timeout;
-  ts.tv_nsec = (long)(timeout - (ev_tstamp)ts.tv_sec) * 1e9;
+  EV_TS_SET (ts, timeout);
   res = port_getn (backend_fd, port_events, port_eventmax, &nget, &ts);
   EV_ACQUIRE_CB;
 
-  if (res == -1)
-    { 
-      if (errno != EINTR && errno != ETIME)
-        ev_syserr ("(libev) port_getn (see http://bugs.opensolaris.org/view_bug.do?bug_id=6268715, try LIBEV_FLAGS=3 env variable)");
-
-      return;
-    } 
+  /* port_getn may or may not set nget on error */
+  /* so we rely on port_events [0].portev_source not being updated */
+  if (res == -1 && errno != ETIME && errno != EINTR)
+    ev_syserr ("(libev) port_getn (see http://bugs.opensolaris.org/view_bug.do?bug_id=6268715, try LIBEV_FLAGS=3 env variable)");
 
   for (i = 0; i < nget; ++i)
     {
@@ -112,7 +124,7 @@ port_poll (EV_P_ ev_tstamp timeout)
             | (port_events [i].portev_events & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0)
           );
 
-          port_associate_and_check (EV_A_ fd, anfds [fd].events);
+          fd_change (EV_A_ fd, EV__IOFDSET);
         }
     }
 
@@ -127,17 +139,25 @@ port_poll (EV_P_ ev_tstamp timeout)
 int inline_size
 port_init (EV_P_ int flags)
 {
-  /* Initalize the kernel queue */
+  /* Initialize the kernel queue */
   if ((backend_fd = port_create ()) < 0)
     return 0;
 
+  assert (("libev: PORT_SOURCE_FD must not be zero", PORT_SOURCE_FD));
+
   fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */
 
-  backend_fudge  = 1e-3; /* needed to compensate for port_getn returning early */
-  backend_modify = port_modify;
-  backend_poll   = port_poll;
+  /* if my reading of the opensolaris kernel sources are correct, then
+   * opensolaris does something very stupid: it checks if the time has already
+   * elapsed and doesn't round up if that is the case,m otherwise it DOES round
+   * up. Since we can't know what the case is, we need to guess by using a
+   * "large enough" timeout. Normally, 1e-9 would be correct.
+   */
+  backend_mintime = 1e-3; /* needed to compensate for port_getn returning early */
+  backend_modify  = port_modify;
+  backend_poll    = port_poll;
 
-  port_eventmax = 64; /* intiial number of events receivable per poll */
+  port_eventmax = 64; /* initial number of events receivable per poll */
   port_events = (port_event_t *)ev_malloc (sizeof (port_event_t) * port_eventmax);
 
   return EVBACKEND_PORT;
diff --git a/ext/libev/ev_select.c b/ext/libev/ev_select.c
index 818a63e..f38d6ca 100644
--- a/ext/libev/ev_select.c
+++ b/ext/libev/ev_select.c
@@ -1,19 +1,19 @@
 /*
  * libev select fd activity backend
  *
- * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann <libev at schmorp.de>
+ * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev at schmorp.de>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without modifica-
  * tion, are permitted provided that the following conditions are met:
- * 
+ *
  *   1.  Redistributions of source code must retain the above copyright notice,
  *       this list of conditions and the following disclaimer.
- * 
+ *
  *   2.  Redistributions in binary form must reproduce the above copyright
  *       notice, this list of conditions and the following disclaimer in the
  *       documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
  * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
@@ -39,8 +39,11 @@
 
 #ifndef _WIN32
 /* for unix systems */
-# include <sys/select.h>
 # include <inttypes.h>
+# ifndef __hpux
+/* for REAL unix systems */
+#  include <sys/select.h>
+# endif
 #endif
 
 #ifndef EV_SELECT_USE_FD_SET
@@ -141,8 +144,7 @@ select_poll (EV_P_ ev_tstamp timeout)
   int fd_setsize;
 
   EV_RELEASE_CB;
-  tv.tv_sec  = (long)timeout;
-  tv.tv_usec = (long)((timeout - (ev_tstamp)tv.tv_sec) * 1e6);
+  EV_TV_SET (tv, timeout);
 
 #if EV_SELECT_USE_FD_SET
   fd_setsize = sizeof (fd_set);
@@ -184,7 +186,7 @@ select_poll (EV_P_ ev_tstamp timeout)
       #endif
 
       #ifdef _WIN32
-      /* select on windows errornously returns EINVAL when no fd sets have been
+      /* select on windows erroneously returns EINVAL when no fd sets have been
        * provided (this is documented). what microsoft doesn't tell you that this bug
        * exists even when the fd sets _are_ provided, so we have to check for this bug
        * here and emulate by sleeping manually.
@@ -193,7 +195,12 @@ select_poll (EV_P_ ev_tstamp timeout)
        */
       if (errno == EINVAL)
         {
-          ev_sleep (timeout);
+          if (timeout)
+            {
+              unsigned long ms = timeout * 1e3;
+              Sleep (ms ? ms : 1);
+            }
+
           return;
         }
       #endif
@@ -267,9 +274,9 @@ select_poll (EV_P_ ev_tstamp timeout)
 int inline_size
 select_init (EV_P_ int flags)
 {
-  backend_fudge  = 0.; /* posix says this is zero */
-  backend_modify = select_modify;
-  backend_poll   = select_poll;
+  backend_mintime = 1e-6;
+  backend_modify  = select_modify;
+  backend_poll    = select_poll;
 
 #if EV_SELECT_USE_FD_SET
   vec_ri  = ev_malloc (sizeof (fd_set)); FD_ZERO ((fd_set *)vec_ri);
@@ -281,10 +288,10 @@ select_init (EV_P_ int flags)
   #endif
 #else
   vec_max = 0;
-  vec_ri  = 0; 
-  vec_ro  = 0;   
-  vec_wi  = 0; 
-  vec_wo  = 0; 
+  vec_ri  = 0;
+  vec_ro  = 0;
+  vec_wi  = 0;
+  vec_wo  = 0;
   #ifdef _WIN32
   vec_eo  = 0;
   #endif
@@ -305,4 +312,3 @@ select_destroy (EV_P)
   #endif
 }
 
-
diff --git a/ext/libev/ev_vars.h b/ext/libev/ev_vars.h
index da53ee8..9f7acb6 100644
--- a/ext/libev/ev_vars.h
+++ b/ext/libev/ev_vars.h
@@ -1,19 +1,19 @@
 /*
  * loop member variable declarations
  *
- * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann <libev at schmorp.de>
+ * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev at schmorp.de>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without modifica-
  * tion, are permitted provided that the following conditions are met:
- * 
+ *
  *   1.  Redistributions of source code must retain the above copyright notice,
  *       this list of conditions and the following disclaimer.
- * 
+ *
  *   2.  Redistributions in binary form must reproduce the above copyright
  *       notice, this list of conditions and the following disclaimer in the
  *       documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
  * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
@@ -48,10 +48,10 @@ VARx(ev_tstamp, timeout_blocktime)
 
 VARx(int, backend)
 VARx(int, activecnt) /* total number of active events ("refcount") */
-VARx(unsigned char, loop_done)  /* signal by ev_unloop */
+VARx(EV_ATOMIC_T, loop_done)  /* signal by ev_break */
 
 VARx(int, backend_fd)
-VARx(ev_tstamp, backend_fudge) /* assumed typical timer resolution */
+VARx(ev_tstamp, backend_mintime) /* assumed typical timer resolution */
 VAR (backend_modify, void (*backend_modify)(EV_P_ int fd, int oev, int nev))
 VAR (backend_poll  , void (*backend_poll)(EV_P_ ev_tstamp timeout))
 
@@ -73,6 +73,8 @@ VARx(int, evfd)
 #endif
 VAR (evpipe, int evpipe [2])
 VARx(ev_io, pipe_w)
+VARx(EV_ATOMIC_T, pipe_write_wanted)
+VARx(EV_ATOMIC_T, pipe_write_skipped)
 
 #if !defined(_WIN32) || EV_GENWRAP
 VARx(pid_t, curpid)
@@ -102,6 +104,9 @@ VARx(int, pollidxmax)
 #if EV_USE_EPOLL || EV_GENWRAP
 VARx(struct epoll_event *, epoll_events)
 VARx(int, epoll_eventmax)
+VARx(int *, epoll_eperms)
+VARx(int, epoll_epermcnt)
+VARx(int, epoll_epermmax)
 #endif
 
 #if EV_USE_KQUEUE || EV_GENWRAP
@@ -117,6 +122,10 @@ VARx(struct port_event *, port_events)
 VARx(int, port_eventmax)
 #endif
 
+#if EV_USE_IOCP || EV_GENWRAP
+VARx(HANDLE, iocp)
+#endif
+
 VARx(int *, fdchanges)
 VARx(int, fdchangemax)
 VARx(int, fdchangecnt)
@@ -152,6 +161,12 @@ VARx(int, forkmax)
 VARx(int, forkcnt)
 #endif
 
+#if EV_CLEANUP_ENABLE || EV_GENWRAP
+VARx(struct ev_cleanup **, cleanups)
+VARx(int, cleanupmax)
+VARx(int, cleanupcnt)
+#endif
+
 #if EV_ASYNC_ENABLE || EV_GENWRAP
 VARx(EV_ATOMIC_T, async_pending)
 VARx(struct ev_async **, asyncs)
@@ -173,9 +188,11 @@ VARx(ev_io, sigfd_w)
 VARx(sigset_t, sigfd_set)
 #endif
 
-#if EV_MINIMAL < 2 || EV_GENWRAP
+VARx(unsigned int, origflags) /* original loop flags */
+
+#if EV_FEATURE_API || EV_GENWRAP
 VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */
-VARx(unsigned int, loop_depth) /* #ev_loop enters - #ev_loop leaves */
+VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */
 
 VARx(void *, userdata)
 VAR (release_cb, void (*release_cb)(EV_P))
diff --git a/ext/libev/ev_win32.c b/ext/libev/ev_win32.c
index ee60ae6..338886e 100644
--- a/ext/libev/ev_win32.c
+++ b/ext/libev/ev_win32.c
@@ -6,14 +6,14 @@
  *
  * Redistribution and use in source and binary forms, with or without modifica-
  * tion, are permitted provided that the following conditions are met:
- * 
+ *
  *   1.  Redistributions of source code must retain the above copyright notice,
  *       this list of conditions and the following disclaimer.
- * 
+ *
  *   2.  Redistributions in binary form must reproduce the above copyright
  *       notice, this list of conditions and the following disclaimer in the
  *       documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
  * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
@@ -46,7 +46,7 @@
 /* MSDN says this is required to handle SIGFPE */
 /* my wild guess would be that using something floating-pointy is required */
 /* for the crt to do something about it */
-volatile double SIGFPE_REQ = 0.0f; 
+volatile double SIGFPE_REQ = 0.0f;
 
 /* oh, the humanity! */
 static int
@@ -59,7 +59,7 @@ ev_pipe (int filedes [2])
   SOCKET listener;
   SOCKET sock [2] = { -1, -1 };
 
-  if ((listener = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
+  if ((listener = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
     return -1;
 
   addr.sin_family = AF_INET;
@@ -75,7 +75,7 @@ ev_pipe (int filedes [2])
   if (listen (listener, 1))
     goto fail;
 
-  if ((sock [0] = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 
+  if ((sock [0] = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
     goto fail;
 
   if (connect (sock [0], (struct sockaddr *)&addr, addr_size))
diff --git a/ext/libev/ev_wrap.h b/ext/libev/ev_wrap.h
index 03b6b87..36edbd2 100644
--- a/ext/libev/ev_wrap.h
+++ b/ext/libev/ev_wrap.h
@@ -10,7 +10,7 @@
 #define activecnt ((loop)->activecnt)
 #define loop_done ((loop)->loop_done)
 #define backend_fd ((loop)->backend_fd)
-#define backend_fudge ((loop)->backend_fudge)
+#define backend_mintime ((loop)->backend_mintime)
 #define backend_modify ((loop)->backend_modify)
 #define backend_poll ((loop)->backend_poll)
 #define anfds ((loop)->anfds)
@@ -25,6 +25,8 @@
 #define evfd ((loop)->evfd)
 #define evpipe ((loop)->evpipe)
 #define pipe_w ((loop)->pipe_w)
+#define pipe_write_wanted ((loop)->pipe_write_wanted)
+#define pipe_write_skipped ((loop)->pipe_write_skipped)
 #define curpid ((loop)->curpid)
 #define postfork ((loop)->postfork)
 #define vec_ri ((loop)->vec_ri)
@@ -40,6 +42,9 @@
 #define pollidxmax ((loop)->pollidxmax)
 #define epoll_events ((loop)->epoll_events)
 #define epoll_eventmax ((loop)->epoll_eventmax)
+#define epoll_eperms ((loop)->epoll_eperms)
+#define epoll_epermcnt ((loop)->epoll_epermcnt)
+#define epoll_epermmax ((loop)->epoll_epermmax)
 #define kqueue_changes ((loop)->kqueue_changes)
 #define kqueue_changemax ((loop)->kqueue_changemax)
 #define kqueue_changecnt ((loop)->kqueue_changecnt)
@@ -47,6 +52,7 @@
 #define kqueue_eventmax ((loop)->kqueue_eventmax)
 #define port_events ((loop)->port_events)
 #define port_eventmax ((loop)->port_eventmax)
+#define iocp ((loop)->iocp)
 #define fdchanges ((loop)->fdchanges)
 #define fdchangemax ((loop)->fdchangemax)
 #define fdchangecnt ((loop)->fdchangecnt)
@@ -69,6 +75,9 @@
 #define forks ((loop)->forks)
 #define forkmax ((loop)->forkmax)
 #define forkcnt ((loop)->forkcnt)
+#define cleanups ((loop)->cleanups)
+#define cleanupmax ((loop)->cleanupmax)
+#define cleanupcnt ((loop)->cleanupcnt)
 #define async_pending ((loop)->async_pending)
 #define asyncs ((loop)->asyncs)
 #define asyncmax ((loop)->asyncmax)
@@ -81,6 +90,7 @@
 #define sigfd ((loop)->sigfd)
 #define sigfd_w ((loop)->sigfd_w)
 #define sigfd_set ((loop)->sigfd_set)
+#define origflags ((loop)->origflags)
 #define loop_count ((loop)->loop_count)
 #define loop_depth ((loop)->loop_depth)
 #define userdata ((loop)->userdata)
@@ -98,7 +108,7 @@
 #undef activecnt
 #undef loop_done
 #undef backend_fd
-#undef backend_fudge
+#undef backend_mintime
 #undef backend_modify
 #undef backend_poll
 #undef anfds
@@ -113,6 +123,8 @@
 #undef evfd
 #undef evpipe
 #undef pipe_w
+#undef pipe_write_wanted
+#undef pipe_write_skipped
 #undef curpid
 #undef postfork
 #undef vec_ri
@@ -128,6 +140,9 @@
 #undef pollidxmax
 #undef epoll_events
 #undef epoll_eventmax
+#undef epoll_eperms
+#undef epoll_epermcnt
+#undef epoll_epermmax
 #undef kqueue_changes
 #undef kqueue_changemax
 #undef kqueue_changecnt
@@ -135,6 +150,7 @@
 #undef kqueue_eventmax
 #undef port_events
 #undef port_eventmax
+#undef iocp
 #undef fdchanges
 #undef fdchangemax
 #undef fdchangecnt
@@ -157,6 +173,9 @@
 #undef forks
 #undef forkmax
 #undef forkcnt
+#undef cleanups
+#undef cleanupmax
+#undef cleanupcnt
 #undef async_pending
 #undef asyncs
 #undef asyncmax
@@ -169,6 +188,7 @@
 #undef sigfd
 #undef sigfd_w
 #undef sigfd_set
+#undef origflags
 #undef loop_count
 #undef loop_depth
 #undef userdata
diff --git a/ext/libev/event.c b/ext/libev/event.c
index fae26bb..aaf6d53 100644
--- a/ext/libev/event.c
+++ b/ext/libev/event.c
@@ -1,19 +1,19 @@
 /*
  * libevent compatibility layer
  *
- * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann <libev at schmorp.de>
+ * Copyright (c) 2007,2008,2009,2010 Marc Alexander Lehmann <libev at schmorp.de>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without modifica-
  * tion, are permitted provided that the following conditions are met:
- * 
+ *
  *   1.  Redistributions of source code must retain the above copyright notice,
  *       this list of conditions and the following disclaimer.
- * 
+ *
  *   2.  Redistributions in binary form must reproduce the above copyright
  *       notice, this list of conditions and the following disclaimer in the
  *       documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
  * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
@@ -63,18 +63,14 @@ struct event_base
 
 static struct event_base *ev_x_cur;
 
-static void
-ev_tv_set (struct timeval *tv, ev_tstamp at)
-{
-  tv->tv_sec  = (long)at;
-  tv->tv_usec = (long)((at - (ev_tstamp)tv->tv_sec) * 1e6);
-}
-
 static ev_tstamp
 ev_tv_get (struct timeval *tv)
 {
   if (tv)
-    return tv->tv_sec + tv->tv_usec * 1e-6;
+    {
+      ev_tstamp after = tv->tv_sec + tv->tv_usec * 1e-6;
+      return after ? after : 1e-6;
+    }
   else
     return -1.;
 }
@@ -114,7 +110,7 @@ void event_base_free (struct event_base *base)
   dLOOPbase;
 
 #if EV_MULTIPLICITY
-  if (ev_default_loop (EVFLAG_AUTO) != loop)
+  if (!ev_is_default_loop (loop))
     ev_loop_destroy (loop);
 #endif
 }
@@ -144,7 +140,7 @@ int event_loopexit (struct timeval *tv)
 static void
 ev_x_cb (struct event *ev, int revents)
 {
-  revents &= EV_READ | EV_WRITE | EV_TIMEOUT | EV_SIGNAL;
+  revents &= EV_READ | EV_WRITE | EV_TIMER | EV_SIGNAL;
 
   ev->ev_res = revents;
   ev->ev_callback (ev->ev_fd, (short)revents, ev->ev_arg);
@@ -302,7 +298,12 @@ int event_pending (struct event *ev, short events, struct timeval *tv)
       revents |= EV_TIMEOUT;
 
       if (tv)
-        ev_tv_set (tv, ev_now (EV_A)); /* not sure if this is right :) */
+        {
+          ev_tstamp at = ev_now (EV_A);
+
+          tv->tv_sec  = (long)at;
+          tv->tv_usec = (long)((at - (ev_tstamp)tv->tv_sec) * 1e6);
+        }
     }
 
   return events & revents;
@@ -331,7 +332,7 @@ int event_base_loop (struct event_base *base, int flags)
 {
   dLOOPbase;
 
-  ev_loop (EV_A_ flags);
+  ev_run (EV_A_ flags);
 
   return 0;
 }
@@ -346,7 +347,7 @@ ev_x_loopexit_cb (int revents, void *base)
 {
   dLOOPbase;
 
-  ev_unloop (EV_A_ EVUNLOOP_ONE);
+  ev_break (EV_A_ EVBREAK_ONE);
 }
 
 int event_base_loopexit (struct event_base *base, struct timeval *tv)
diff --git a/ext/libev/event.h b/ext/libev/event.h
index 6541577..10ff05a 100644
--- a/ext/libev/event.h
+++ b/ext/libev/event.h
@@ -1,19 +1,19 @@
 /*
  * libevent compatibility header, only core events supported
  *
- * Copyright (c) 2007,2008 Marc Alexander Lehmann <libev at schmorp.de>
+ * Copyright (c) 2007,2008,2010 Marc Alexander Lehmann <libev at schmorp.de>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without modifica-
  * tion, are permitted provided that the following conditions are met:
- * 
+ *
  *   1.  Redistributions of source code must retain the above copyright notice,
  *       this list of conditions and the following disclaimer.
- * 
+ *
  *   2.  Redistributions in binary form must reproduce the above copyright
  *       notice, this list of conditions and the following disclaimer in the
  *       documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
  * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
@@ -46,6 +46,16 @@
 # include "ev.h"
 #endif
 
+#ifndef EVLOOP_NONBLOCK
+# define EVLOOP_NONBLOCK EVRUN_NOWAIT
+#endif
+#ifndef EVLOOP_ONESHOT
+# define EVLOOP_ONESHOT EVRUN_ONCE
+#endif
+#ifndef EV_TIMEOUT
+# define EV_TIMEOUT EV_TIMER
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -85,6 +95,8 @@ struct event
   short ev_events;
 };
 
+#define EV_READ                    EV_READ
+#define EV_WRITE                   EV_WRITE
 #define EV_PERSIST                 0x10
 
 #define EVENT_SIGNAL(ev)           ((int) (ev)->ev_fd)
diff --git a/ext/libev/libev.m4 b/ext/libev/libev.m4
index ff4c804..6fdb13f 100644
--- a/ext/libev/libev.m4
+++ b/ext/libev/libev.m4
@@ -2,20 +2,21 @@ dnl this file is part of libev, do not make local modifications
 dnl http://software.schmorp.de/pkg/libev
 
 dnl libev support 
-AC_CHECK_HEADERS(sys/inotify.h sys/epoll.h sys/event.h sys/queue.h port.h poll.h sys/select.h sys/eventfd.h sys/signalfd.h) 
+AC_CHECK_HEADERS(sys/inotify.h sys/epoll.h sys/event.h port.h poll.h sys/select.h sys/eventfd.h sys/signalfd.h) 
  
 AC_CHECK_FUNCS(inotify_init epoll_ctl kqueue port_create poll select eventfd signalfd)
  
-AC_CHECK_FUNC(clock_gettime, [], [ 
+AC_CHECK_FUNCS(clock_gettime, [], [ 
    dnl on linux, try syscall wrapper first
    if test $(uname) = Linux; then
       AC_MSG_CHECKING(for clock_gettime syscall)
       AC_LINK_IFELSE([AC_LANG_PROGRAM(
-                      [#include <syscall.h>
+                      [#include <unistd.h>
+                       #include <sys/syscall.h>
                        #include <time.h>],
                       [struct timespec ts; int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts)])],
                      [ac_have_clock_syscall=1
-                      AC_DEFINE(HAVE_CLOCK_SYSCALL, 1, "use syscall interface for clock_gettime")
+                      AC_DEFINE(HAVE_CLOCK_SYSCALL, 1, Define to 1 to use the syscall interface for clock_gettime)
                       AC_MSG_RESULT(yes)],
                      [AC_MSG_RESULT(no)])
    fi
@@ -26,7 +27,7 @@ AC_CHECK_FUNC(clock_gettime, [], [
    fi
 ])
 
-AC_CHECK_FUNC(nanosleep, [], [ 
+AC_CHECK_FUNCS(nanosleep, [], [ 
    if test -z "$LIBEV_M4_AVOID_LIBRT"; then
       AC_CHECK_LIB(rt, nanosleep) 
       unset ac_cv_func_nanosleep
@@ -34,5 +35,8 @@ AC_CHECK_FUNC(nanosleep, [], [
    fi
 ])
 
-AC_CHECK_LIB(m, ceil)
+if test -z "$LIBEV_M4_AVOID_LIBM"; then
+   LIBM=m
+fi
+AC_SEARCH_LIBS(floor, $LIBM, [AC_DEFINE(HAVE_FLOOR, 1, Define to 1 if the floor function is available)])
 
diff --git a/ext/libev/ltmain.sh b/ext/libev/ltmain.sh
old mode 100644
new mode 100755
index c715b59..d88da2c
--- a/ext/libev/ltmain.sh
+++ b/ext/libev/ltmain.sh
@@ -1,30 +1,174 @@
-# 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
-# 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
+# Generated from ltmain.m4sh.
+
+# ltmain.sh (GNU libtool) 2.2.6b
+# Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 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.
+
+# GNU Libtool 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
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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.
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
 #
-# 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.
+#     --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
+#     --mode=MODE          use operation mode MODE
+#     --preserve-dup-deps  don't remove duplicate dependency libraries
+#     --quiet, --silent    don't print informational messages
+#     --tag=TAG            use configuration variables from tag TAG
+# -v, --verbose            print informational messages (default)
+#     --version            print version information
+# -h, --help               print short or long help message
+#
+# 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 `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+#       host-triplet:	$host
+#       shell:		$SHELL
+#       compiler:		$LTCC
+#       compiler flags:		$LTCFLAGS
+#       linker:		$LD (gnu? $with_gnu_ld)
+#       $progname:		(GNU libtool) 2.2.6b Debian-2.2.6b-2
+#       automake:		$automake_version
+#       autoconf:		$autoconf_version
+#
+# Report bugs to <bug-libtool at gnu.org>.
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION="2.2.6b Debian-2.2.6b-2"
+TIMESTAMP=""
+package_revision=1.3017
+
+# Be 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
+
+# NLS nuisances: We save the old values to restore during execute mode.
+# 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).
+lt_user_locale=
+lt_safe_locale=
+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_var=C
+	  export $lt_var
+	  lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+	  lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+	fi"
+done
+
+$lt_unset CDPATH
+
+
+
+
+
+: ${CP="cp -f"}
+: ${ECHO="echo"}
+: ${EGREP="/bin/grep -E"}
+: ${FGREP="/bin/grep -F"}
+: ${GREP="/bin/grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="/bin/sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
 
-basename="s,^.*/,,g"
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77	  # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" 	$lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
+  else
+    func_dirname_result="$func_dirname_result${2}"
+  fi
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# Generated shell functions inserted here.
 
 # 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
@@ -34,112 +178,174 @@ basename="s,^.*/,,g"
 progpath="$0"
 
 # The name of this program:
-progname=`echo "$progpath" | $SED $basename`
-modename="$progname"
+# In the unlikely event $progname began with a '-', it would play havoc with
+# func_echo (imagine progname=-n), so we prepend ./ in that case:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+case $progname in
+  -*) progname=./$progname ;;
+esac
 
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+  [\\/]*|[A-Za-z]:\\*) ;;
+  *[\\/]*)
+     progdir=$func_dirname_result
+     progdir=`cd "$progdir" && pwd`
+     progpath="$progdir/$progname"
+     ;;
+  *)
+     save_IFS="$IFS"
+     IFS=:
+     for progdir in $PATH; do
+       IFS="$save_IFS"
+       test -x "$progdir/$progname" && break
+     done
+     IFS="$save_IFS"
+     test -n "$progdir" || progdir=`pwd`
+     progpath="$progdir/$progname"
+     ;;
+esac
 
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION="1.5.22 Debian 1.5.22-4"
-TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
+# 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'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+  s/$bs4/&\\
+/g
+  s/^$bs2$dollar/$bs&/
+  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+  s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+    $ECHO "$progname${mode+: }$mode: $*"
+}
 
-# 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
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $opt_verbose && func_echo ${1+"$@"}
 
-# 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
+    # A bug in bash halts the script if the last line of a function
+    # fails when set -e is in force, so we need another command to
+    # work around that:
+    :
+}
 
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit $EXIT_SUCCESS
-fi
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+}
 
-default_mode=
-help="Try \`$progname --help' for more information."
-magic="%%%MAGIC variable%%%"
-mkdir="mkdir"
-mv="mv -f"
-rm="rm -f"
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+    $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
 
-# 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
+    # bash bug again:
+    :
+}
 
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
-  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
-  save_LANG="$LANG"; LANG=C; export LANG
-fi
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
+}
 
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS=" 	$lt_nl"
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+    func_error ${1+"$@"}
+    func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information."  ## default
 
-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/"
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+    $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+    my_directory_path="$1"
+    my_dir_list=
+
+    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+      # Protect directory names starting with `-'
+      case $my_directory_path in
+        -*) my_directory_path="./$my_directory_path" ;;
+      esac
+
+      # While some portion of DIR does not yet exist...
+      while test ! -d "$my_directory_path"; do
+        # ...make a list in topmost first order.  Use a colon delimited
+	# list incase some portion of path contains whitespace.
+        my_dir_list="$my_directory_path:$my_dir_list"
+
+        # If the last portion added has no slash in it, the list is done
+        case $my_directory_path in */*) ;; *) break ;; esac
+
+        # ...otherwise throw away the child directory and loop
+        my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
+      done
+      my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+
+      save_mkdir_p_IFS="$IFS"; IFS=':'
+      for my_dir in $my_dir_list; do
+	IFS="$save_mkdir_p_IFS"
+        # mkdir can fail with a `File exist' error if two processes
+        # try to create one of the directories concurrently.  Don't
+        # stop in that case!
+        $MKDIR "$my_dir" 2>/dev/null || :
+      done
+      IFS="$save_mkdir_p_IFS"
+
+      # Bail out if we (or some other process) failed to create a directory.
+      test -d "$my_directory_path" || \
+        func_fatal_error "Failed to create \`$1'"
+    fi
+}
 
-#####################################
-# 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
@@ -149,7 +355,7 @@ func_mktempdir ()
 {
     my_template="${TMPDIR-/tmp}/${1-$progname}"
 
-    if test "$run" = ":"; then
+    if test "$opt_dry_run" = ":"; then
       # Return a directory name, but don't create it in dry-run mode
       my_tmpdir="${my_template}-$$"
     else
@@ -158,546 +364,818 @@ func_mktempdir ()
       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}$$"
+        # 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
+        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
-      }
+      test -d "$my_tmpdir" || \
+        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
     fi
 
-    $echo "X$my_tmpdir" | $Xsed
+    $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 ()
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
 {
-  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"
-      ;;
+    case $1 in
+      *[\\\`\"\$]*)
+	func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
+      *)
+        func_quote_for_eval_unquoted_result="$1" ;;
+    esac
+
+    case $func_quote_for_eval_unquoted_result in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting, command substitution and and variable
+      # expansion for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+        ;;
+      *)
+        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
     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 ()
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
 {
-    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.
+    case $1 in
+      *[\\\`\"]*)
+	my_arg=`$ECHO "X$1" | $Xsed \
+	    -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
       *)
-	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
+        my_arg="$1" ;;
+    esac
+
+    case $my_arg in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting and command substitution for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+        my_arg="\"$my_arg\""
+        ;;
+    esac
+
+    func_quote_for_expand_result="$my_arg"
 }
 
 
-# func_extract_an_archive dir oldlib
-func_extract_an_archive ()
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
 {
-    f_ex_an_ar_dir="$1"; shift
-    f_ex_an_ar_oldlib="$1"
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
 
-    $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
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$my_cmd"
+      my_status=$?
+      if test "$my_status" -eq 0; then :; else
+	eval "(exit $my_status); $my_fail_exp"
+      fi
     fi
 }
 
-# func_extract_archives gentop oldlib ...
-func_extract_archives ()
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.  Use the saved locale for evaluation.
+func_show_eval_locale ()
 {
-    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
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
 
-    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_xdir="$my_gentop/$my_xlib"
-
-      $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
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$lt_user_locale
+	    $my_cmd"
+      my_status=$?
+      eval "$lt_safe_locale"
+      if test "$my_status" -eq 0; then :; else
+	eval "(exit $my_status); $my_fail_exp"
       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"
+    fi
 }
-# 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"
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+        s/^# //
+	s/^# *$//
+        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+        p
+     }' < "$progpath"
+     exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+    $SED -n '/^# Usage:/,/# -h/ {
+        s/^# //
+	s/^# *$//
+	s/\$progname/'$progname'/
+	p
+    }' < "$progpath"
+    $ECHO
+    $ECHO "run \`$progname --help | more' for full usage"
+    exit $?
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+    $SED -n '/^# Usage:/,/# Report bugs to/ {
+        s/^# //
+	s/^# *$//
+	s*\$progname*'$progname'*
+	s*\$host*'"$host"'*
+	s*\$SHELL*'"$SHELL"'*
+	s*\$LTCC*'"$LTCC"'*
+	s*\$LTCFLAGS*'"$LTCFLAGS"'*
+	s*\$LD*'"$LD"'*
+	s/\$with_gnu_ld/'"$with_gnu_ld"'/
+	s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+	s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+	p
+     }' < "$progpath"
+    exit $?
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+    func_error "missing argument for $1"
+    exit_cmd=exit
+}
+
+exit_cmd=:
+
+
+
+
+
+# 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
 
-  case $arg in
-  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
 
-  # 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
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
 
-      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
+# Global variables.
+# $mode is unset
+nonopt=
+execute_dlfiles=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
 
-    prev=
-    prevopt=
-    continue
-  fi
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
 
-  # Have we seen a non-optional argument yet?
-  case $arg in
-  --help)
-    show_help=yes
-    ;;
+# 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=
 
-  --version)
-    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
-    $echo
-    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
-    $echo "This is free software; see the source for copying conditions.  There is NO"
-    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-    exit $?
-    ;;
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+    func_error ${1+"$@"}
+    func_error "See the $PACKAGE documentation for more information."
+    func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+    re_begincf='^# ### BEGIN LIBTOOL'
+    re_endcf='^# ### END LIBTOOL'
+
+    # Default configuration.
+    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
 
-  --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"
+      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf 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=:
-    ;;
+    exit $?
+}
 
-  --features)
-    $echo "host: $host"
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+    $ECHO "host: $host"
     if test "$build_libtool_libs" = yes; then
-      $echo "enable shared libraries"
+      $ECHO "enable shared libraries"
     else
-      $echo "disable shared libraries"
+      $ECHO "disable shared libraries"
     fi
     if test "$build_old_libs" = yes; then
-      $echo "enable static libraries"
+      $ECHO "enable static libraries"
     else
-      $echo "disable static libraries"
+      $ECHO "disable static libraries"
     fi
+
     exit $?
-    ;;
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+  # Global variable:
+  tagname="$1"
 
-  --finish) mode="finish" ;;
+  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+  sed_extractcf="/$re_begincf/,/$re_endcf/p"
 
-  --mode) prevopt="--mode" prev=mode ;;
-  --mode=*) mode="$optarg" ;;
+  # Validate tagname.
+  case $tagname in
+    *[!-_A-Za-z0-9,/]*)
+      func_fatal_error "invalid tag name: $tagname"
+      ;;
+  esac
 
-  --preserve-dup-deps) duplicate_deps="yes" ;;
+  # Don't test for the "default" C tag, as we know it's
+  # there but not specially marked.
+  case $tagname in
+    CC) ;;
+    *)
+      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+	taglist="$taglist $tagname"
+
+	# Evaluate the configuration.  Be careful to quote the path
+	# and the sed script, to avoid splitting on whitespace, but
+	# also don't use non-portable quotes within backquotes within
+	# quotes we have to do it in 2 steps:
+	extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+	eval "$extractedcf"
+      else
+	func_error "ignoring unknown tag $tagname"
+      fi
+      ;;
+  esac
+}
 
-  --quiet | --silent)
-    show=:
-    preserve_args="$preserve_args $arg"
-    ;;
+# Parse options once, thoroughly.  This comes as soon as possible in
+# the script to make things like `libtool --version' happen quickly.
+{
 
-  --tag)
-    prevopt="--tag"
-    prev=tag
-    preserve_args="$preserve_args --tag"
+  # Shorthand for --mode=foo, only valid as the first argument
+  case $1 in
+  clean|clea|cle|cl)
+    shift; set dummy --mode clean ${1+"$@"}; shift
     ;;
-  --tag=*)
-    set tag "$optarg" ${1+"$@"}
-    shift
-    prev=tag
-    preserve_args="$preserve_args --tag"
+  compile|compil|compi|comp|com|co|c)
+    shift; set dummy --mode compile ${1+"$@"}; shift
     ;;
-
-  -dlopen)
-    prevopt="-dlopen"
-    prev=execute_dlfiles
+  execute|execut|execu|exec|exe|ex|e)
+    shift; set dummy --mode execute ${1+"$@"}; shift
     ;;
-
-  -*)
-    $echo "$modename: unrecognized option \`$arg'" 1>&2
-    $echo "$help" 1>&2
-    exit $EXIT_FAILURE
+  finish|finis|fini|fin|fi|f)
+    shift; set dummy --mode finish ${1+"$@"}; shift
     ;;
-
-  *)
-    nonopt="$arg"
-    break
+  install|instal|insta|inst|ins|in|i)
+    shift; set dummy --mode install ${1+"$@"}; shift
+    ;;
+  link|lin|li|l)
+    shift; set dummy --mode link ${1+"$@"}; shift
+    ;;
+  uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+    shift; set dummy --mode uninstall ${1+"$@"}; shift
     ;;
   esac
-done
 
-if test -n "$prevopt"; then
-  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
-  $echo "$help" 1>&2
-  exit $EXIT_FAILURE
-fi
+  # Parse non-mode specific arguments:
+  while test "$#" -gt 0; do
+    opt="$1"
+    shift
 
-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
+    case $opt in
+      --config)		func_config					;;
 
-# 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=
+      --debug)		preserve_args="$preserve_args $opt"
+			func_echo "enabling shell trace mode"
+			opt_debug='set -x'
+			$opt_debug
+			;;
 
-if test -z "$show_help"; then
+      -dlopen)		test "$#" -eq 0 && func_missing_arg "$opt" && break
+			execute_dlfiles="$execute_dlfiles $1"
+			shift
+			;;
 
-  # 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
+      --dry-run | -n)	opt_dry_run=:					;;
+      --features)       func_features					;;
+      --finish)		mode="finish"					;;
+
+      --mode)		test "$#" -eq 0 && func_missing_arg "$opt" && break
+			case $1 in
+			  # Valid mode arguments:
+			  clean)	;;
+			  compile)	;;
+			  execute)	;;
+			  finish)	;;
+			  install)	;;
+			  link)		;;
+			  relink)	;;
+			  uninstall)	;;
+
+			  # Catch anything else as an error
+			  *) func_error "invalid argument for $opt"
+			     exit_cmd=exit
+			     break
+			     ;;
+		        esac
+
+			mode="$1"
+			shift
+			;;
+
+      --preserve-dup-deps)
+			opt_duplicate_deps=:				;;
+
+      --quiet|--silent)	preserve_args="$preserve_args $opt"
+			opt_silent=:
+			;;
+
+      --verbose| -v)	preserve_args="$preserve_args $opt"
+			opt_silent=false
+			;;
+
+      --tag)		test "$#" -eq 0 && func_missing_arg "$opt" && break
+			preserve_args="$preserve_args $opt $1"
+			func_enable_tag "$1"	# tagname is set here
+			shift
+			;;
+
+      # Separate optargs to long options:
+      -dlopen=*|--mode=*|--tag=*)
+			func_opt_split "$opt"
+			set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+			shift
+			;;
+
+      -\?|-h)		func_usage					;;
+      --help)		opt_help=:					;;
+      --version)	func_version					;;
+
+      -*)		func_fatal_help "unrecognized option \`$opt'"	;;
+
+      *)		nonopt="$opt"
+			break
+			;;
+    esac
+  done
+
+
+  case $host in
+    *cygwin* | *mingw* | *pw32* | *cegcc*)
+      # don't eliminate duplications in $postdeps and $predeps
+      opt_duplicate_compiler_generated_deps=:
       ;;
     *)
-      # If we have no mode, but dlfiles were specified, then do execute mode.
-      test -n "$execute_dlfiles" && mode=execute
+      opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+      ;;
+  esac
 
-      # 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
+  # Having warned about all mis-specified options, bail out if
+  # anything was wrong.
+  $exit_cmd $EXIT_FAILURE
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+  if test "$package_revision" != "$macro_revision"; then
+    if test "$VERSION" != "$macro_version"; then
+      if test -z "$macro_version"; then
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      else
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
       fi
-      ;;
-    esac
+    else
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+    fi
+
+    exit $EXIT_MISMATCH
+  fi
+}
+
+
+## ----------- ##
+##    Main.    ##
+## ----------- ##
+
+$opt_help || {
+  # Sanity checks first:
+  func_check_version_match
+
+  if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+    func_fatal_configuration "not configured to build any kind of library"
   fi
 
+  test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+
+
+  # Darwin sucks
+  eval std_shrext=\"$shrext_cmds\"
+
+
   # 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
+    func_error "unrecognized option \`-dlopen'"
+    $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."
+  help="Try \`$progname --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
-	;;
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+    test -f "$1" &&
+      $SED -e 4q "$1" 2>/dev/null \
+        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
 
-      target )
-	libobj="$arg"
-	arg_mode=normal
-	continue
-	;;
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs.  To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway.  Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+    lalib_p=no
+    if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+	for lalib_p_l in 1 2 3 4
+	do
+	    read lalib_p_line
+	    case "$lalib_p_line" in
+		\#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+	    esac
+	done
+	exec 0<&5 5<&-
+    fi
+    test "$lalib_p" = yes
+}
 
-      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
-	  ;;
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+    func_lalib_p "$1"
+}
 
-	-static | -prefer-pic | -prefer-non-pic)
-	  later="$later $arg"
-	  continue
-	  ;;
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+    func_ltwrapper_exec_suffix=
+    case $1 in
+    *.exe) ;;
+    *) func_ltwrapper_exec_suffix=.exe ;;
+    esac
+    $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
 
-	-no-suppress)
-	  suppress_opt=no
-	  continue
-	  ;;
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+    func_ltwrapper_scriptname_result=""
+    if func_ltwrapper_executable_p "$1"; then
+	func_dirname_and_basename "$1" "" "."
+	func_stripname '' '.exe' "$func_basename_result"
+	func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+    fi
+}
 
-	-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.
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+    func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
 
-	-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\""
-	      ;;
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+    $opt_debug
+    save_ifs=$IFS; IFS='~'
+    for cmd in $1; do
+      IFS=$save_ifs
+      eval cmd=\"$cmd\"
+      func_show_eval "$cmd" "${2-:}"
+    done
+    IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE 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.
+func_source ()
+{
+    $opt_debug
+    case $1 in
+    */* | *\\*)	. "$1" ;;
+    *)		. "./$1" ;;
+    esac
+}
+
+
+# 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 ()
+{
+    $opt_debug
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+        func_quote_for_eval "$arg"
+	CC_quoted="$CC_quoted $func_quote_for_eval_result"
+      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.
+	      func_quote_for_eval "$arg"
+	      CC_quoted="$CC_quoted $func_quote_for_eval_result"
+	    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
-	    lastarg="$lastarg $arg"
+	  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
+	  func_echo "unable to infer tagged configuration"
+	  func_fatal_error "specify a tag with \`--tag'"
+#	else
+#	  func_verbose "using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+    write_libobj=${1}
+    if test "$build_libtool_libs" = yes; then
+      write_lobj=\'${2}\'
+    else
+      write_lobj=none
+    fi
+
+    if test "$build_old_libs" = yes; then
+      write_oldobj=\'${3}\'
+    else
+      write_oldobj=none
+    fi
+
+    $opt_dry_run || {
+      cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+      $MV "${write_libobj}T" "${write_libobj}"
+    }
+}
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+    $opt_debug
+    # 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=
+    pie_flag=
+
+    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)
+	  test -n "$libobj" && \
+	    func_fatal_error "you cannot specify \`-o' more than once"
+	  arg_mode=target
+	  continue
+	  ;;
+
+	-pie | -fpie | -fPIE)
+          pie_flag="$pie_flag $arg"
+	  continue
+	  ;;
+
+	-shared | -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,*)
+	  func_stripname '-Wc,' '' "$arg"
+	  args=$func_stripname_result
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+	  for arg in $args; do
+	    IFS="$save_ifs"
+	    func_quote_for_eval "$arg"
+	    lastarg="$lastarg $func_quote_for_eval_result"
 	  done
 	  IFS="$save_ifs"
-	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+	  func_stripname ' ' '' "$lastarg"
+	  lastarg=$func_stripname_result
 
 	  # 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.
 	  #
@@ -709,64 +1187,42 @@ if test -z "$show_help"; then
       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"
+      func_quote_for_eval "$lastarg"
+      base_compile="$base_compile $func_quote_for_eval_result"
     done # for arg
 
     case $arg_mode in
     arg)
-      $echo "$modename: you must specify an argument for -Xcompile"
-      exit $EXIT_FAILURE
+      func_fatal_error "you must specify an argument for -Xcompile"
       ;;
     target)
-      $echo "$modename: you must specify a target with \`-o'" 1>&2
-      exit $EXIT_FAILURE
+      func_fatal_error "you must specify a target with \`-o'"
       ;;
     *)
       # Get the name of the library object.
-      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      test -z "$libobj" && {
+	func_basename "$srcfile"
+	libobj="$func_basename_result"
+      }
       ;;
     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 ;;
-    *.f90) xform=f90 ;;
-    *.for) xform=for ;;
-    *.java) xform=java ;;
+    *.[cCFSifmso] | \
+    *.ada | *.adb | *.ads | *.asm | \
+    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+    *.[fF][09]? | *.for | *.java | *.obj | *.sx)
+      func_xform "$libobj"
+      libobj=$func_xform_result
+      ;;
     esac
 
-    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
-
     case $libobj in
-    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
     *)
-      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
-      exit $EXIT_FAILURE
+      func_fatal_error "cannot determine name of library object from \`$libobj'"
       ;;
     esac
 
@@ -774,7 +1230,15 @@ if test -z "$show_help"; then
 
     for arg in $later; do
       case $arg in
+      -shared)
+	test "$build_libtool_libs" != yes && \
+	  func_fatal_configuration "can not build a shared library"
+	build_old_libs=no
+	continue
+	;;
+
       -static)
+	build_libtool_libs=no
 	build_old_libs=yes
 	continue
 	;;
@@ -791,28 +1255,17 @@ if test -z "$show_help"; then
       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
+    func_quote_for_eval "$libobj"
+    test "X$libobj" != "X$func_quote_for_eval_result" \
+      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'	 &()|`$[]' \
+      && func_warning "libobj name \`$libobj' may not contain shell special characters."
+    func_dirname_and_basename "$obj" "/" ""
+    objname="$func_basename_result"
+    xdir="$func_dirname_result"
     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
+    test -z "$base_compile" && \
+      func_fatal_help "you must specify a compilation command"
 
     # Delete any leftover library objects.
     if test "$build_old_libs" = yes; then
@@ -821,12 +1274,9 @@ if test -z "$show_help"; then
       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*)
+    cygwin* | mingw* | pw32* | os2* | cegcc*)
       pic_mode=default
       ;;
     esac
@@ -838,10 +1288,8 @@ if test -z "$show_help"; then
     # 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}
+      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
@@ -851,13 +1299,13 @@ if test -z "$show_help"; then
     # 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"
+      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+	func_echo "Waiting for $lockfile to be removed"
 	sleep 2
       done
     elif test "$need_locks" = warn; then
       if test -f "$lockfile"; then
-	$echo "\
+	$ECHO "\
 *** ERROR, $lockfile exists and contains:
 `cat $lockfile 2>/dev/null`
 
@@ -868,34 +1316,22 @@ 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
+	$opt_dry_run || $RM $removelist
 	exit $EXIT_FAILURE
       fi
-      $echo "$srcfile" > "$lockfile"
+      removelist="$removelist $output_obj"
+      $ECHO "$srcfile" > "$lockfile"
     fi
 
+    $opt_dry_run || $RM $removelist
+    removelist="$removelist $lockfile"
+    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
     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
+    func_quote_for_eval "$srcfile"
+    qsrcfile=$func_quote_for_eval_result
 
     # Only build a PIC object if we are building libtool libraries.
     if test "$build_libtool_libs" = yes; then
@@ -909,32 +1345,19 @@ EOF
 	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
+      func_mkdir_p "$xdir$objdir"
 
       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 "$command"; then :
-      else
-	test -n "$output_obj" && $run $rm $removelist
-	exit $EXIT_FAILURE
-      fi
+      func_show_eval_locale "$command"	\
+          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
 
       if test "$need_locks" = warn &&
 	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-	$echo "\
+	$ECHO "\
 *** ERROR, $lockfile contains:
 `cat $lockfile 2>/dev/null`
 
@@ -948,45 +1371,27 @@ 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
+	$opt_dry_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
+	func_show_eval '$MV "$output_obj" "$lobj"' \
+	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
       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'
+	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"
+	command="$base_compile $qsrcfile$pie_flag"
       else
 	command="$base_compile $qsrcfile $pic_flag"
       fi
@@ -996,17 +1401,12 @@ EOF
 
       # Suppress compiler output if we already did a PIC compilation.
       command="$command$suppress_output"
-      $run $rm "$obj" "$output_obj"
-      $show "$command"
-      if $run eval "$command"; then :
-      else
-	$run $rm $removelist
-	exit $EXIT_FAILURE
-      fi
+      func_show_eval_locale "$command" \
+        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
 
       if test "$need_locks" = warn &&
 	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-	$echo "\
+	$ECHO "\
 *** ERROR, $lockfile contains:
 `cat $lockfile 2>/dev/null`
 
@@ -1020,5431 +1420,6784 @@ 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
+	$opt_dry_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
+	func_show_eval '$MV "$output_obj" "$obj"' \
+	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
       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}"
+    $opt_dry_run || {
+      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
 
-    # Unlock the critical section if it was locked
-    if test "$need_locks" != no; then
-      $run $rm "$lockfile"
-    fi
+      # Unlock the critical section if it was locked
+      if test "$need_locks" != no; then
+	removelist=$lockfile
+        $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"
+$opt_help || {
+test "$mode" = compile && func_mode_compile ${1+"$@"}
+}
 
-    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=
+func_mode_help ()
+{
+    # We need to display help for each of the modes.
+    case $mode in
+      "")
+        # Generic help is extracted from the usage comments
+        # at the start of this file.
+        func_help
+        ;;
 
-    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
+      clean)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
 
-    func_infer_tag $base_compile
+Remove files from the build directory.
 
-    # We need to know -static, to get the right output filenames.
-    for arg
-    do
-      case $arg in
-      -all-static | -static)
-	if test "X$arg" = "X-all-static"; then
-	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
-	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
-	  fi
-	  if test -n "$link_static_flag"; then
-	    dlopen_self=$dlopen_self_static
-	  fi
-	  prefer_static_libs=yes
-	else
-	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
-	    dlopen_self=$dlopen_self_static
-	  fi
-	  prefer_static_libs=built
-	fi
-	build_libtool_libs=no
-	build_old_libs=yes
-	break
-	;;
-      esac
-    done
+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.
 
-    # See if our shared archives depend on static archives.
-    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+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."
+        ;;
 
-    # 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"
+      compile)
+      $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
 
-      # 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
+Compile a source file into a libtool library object.
 
-	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.
+This mode accepts the following additional options:
 
-	      # 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=
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -no-suppress      do not suppress compiler output for multiple passes
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -shared           do not build a \`.o' file suitable for static linking
+  -static           only build a \`.o' file suitable for static linking
 
-		# Read the .lo file
-		# If there is no directory component, then add one.
-		case $arg in
-		*/* | *\\*) . $arg ;;
-		*) . ./$arg ;;
-		esac
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
 
-		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
+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'."
+        ;;
 
-		# Extract subdirectory from the argument.
-		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-		if test "X$xdir" = "X$arg"; then
-		  xdir=
-		else
-		  xdir="$xdir/"
-		fi
+      execute)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
 
-		if test "$pic_object" != none; then
-		  # Prepend the subdirectory the object is found in.
-		  pic_object="$xdir$pic_object"
+Automatically set library path, then run a program.
 
-		  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
+This mode accepts the following additional options:
 
-		  # CHECK ME:  I think I busted this.  -Ossama
-		  if test "$prev" = dlprefiles; then
-		    # Preload the old-style object.
-		    dlprefiles="$dlprefiles $pic_object"
-		    prev=
-		  fi
+  -dlopen FILE      add the directory containing FILE to the library path
 
-		  # A PIC object.
-		  libobjs="$libobjs $pic_object"
-		  arg="$pic_object"
-		fi
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
 
-		# 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"
+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.
 
-		  # 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.
+Then, COMMAND is executed, with ARGS as arguments."
+        ;;
 
-		  # Extract subdirectory from the argument.
-		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-		  if test "X$xdir" = "X$arg"; then
-		    xdir=
-		  else
-		    xdir="$xdir/"
-		  fi
+      finish)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
 
-		  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"
+Complete the installation of libtool libraries.
 
-      prevarg="$arg"
+Each LIBDIR is a directory that contains libtool libraries.
 
-      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
-	;;
+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."
+        ;;
 
-      -allow-undefined)
-	# FIXME: remove this flag sometime in the future.
-	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
-	continue
-	;;
+      install)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
 
-      -avoid-version)
-	avoid_version=yes
-	continue
-	;;
+Install executables or libraries.
 
-      -dlopen)
-	prev=dlfiles
-	continue
-	;;
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
 
-      -dlpreopen)
-	prev=dlprefiles
-	continue
-	;;
+The following components of INSTALL-COMMAND are treated specially:
 
-      -export-dynamic)
-	export_dynamic=yes
-	continue
-	;;
+  -inst-prefix PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
 
-      -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
-	;;
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+        ;;
 
-      -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
-	;;
+      link)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
 
-      -inst-prefix-dir)
-	prev=inst_prefix
-	continue
-	;;
+Link object files or libraries together to form another library, or to
+create an executable program.
 
-      # 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
-	;;
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
 
-      -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
-	;;
+The following components of LINK-COMMAND are treated specially:
 
-      -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
-	;;
+  -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
+  -shared           only do dynamic linking of libtool libraries
+  -shrext SUFFIX    override the standard shared library file extension
+  -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]
+  -weak LIBNAME     declare that the target provides the LIBNAME interface
 
-      # 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
-	;;
+All other options (arguments beginning with \`-') are ignored.
 
-     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
-	compiler_flags="$compiler_flags $arg"
-	compile_command="$compile_command $arg"
-	finalize_command="$finalize_command $arg"
-	continue
-	;;
+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.
 
-      -module)
-	module=yes
-	continue
-	;;
+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.
 
-      # -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
-      # -pg pass through profiling flag for GCC
-      # @file GCC response files
-      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
-      -t[45]*|-txscale*|@*)
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
 
-	# 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
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
         ;;
 
-      -shrext)
-	prev=shrext
-	continue
-	;;
+      uninstall)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
 
-      -no-fast-install)
-	fast_install=no
-	continue
-	;;
+Remove libraries from an installation directory.
 
-      -no-install)
-	case $host in
-	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-	  # The PATH hackery in wrapper scripts is required on Windows
-	  # 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
-	;;
+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.
 
-      -no-undefined)
-	allow_undefined=no
-	continue
-	;;
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+        ;;
 
-      -objectlist)
-	prev=objectlist
-	continue
-	;;
+      *)
+        func_fatal_help "invalid operation mode \`$mode'"
+        ;;
+    esac
 
-      -o) prev=output ;;
+    $ECHO
+    $ECHO "Try \`$progname --help' for more information about other modes."
 
-      -precious-files-regex)
-	prev=precious_regex
-	continue
-	;;
+    exit $?
+}
 
-      -release)
-	prev=release
-	continue
-	;;
+  # Now that we've collected a possible --mode arg, show help if necessary
+  $opt_help && func_mode_help
 
-      -rpath)
-	prev=rpath
-	continue
-	;;
 
-      -R)
-	prev=xrpath
-	continue
-	;;
+# func_mode_execute arg...
+func_mode_execute ()
+{
+    $opt_debug
+    # The first argument is the command name.
+    cmd="$nonopt"
+    test -z "$cmd" && \
+      func_fatal_help "you must specify a COMMAND"
 
-      -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)
-	# 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
-	;;
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      test -f "$file" \
+	|| func_fatal_help "\`$file' is not a file"
 
-      -thread-safe)
-	thread_safe=yes
-	continue
-	;;
+      dir=
+      case $file in
+      *.la)
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$file" \
+	  || func_fatal_help "\`$lib' is not a valid libtool archive"
 
-      -version-info)
-	prev=vinfo
-	continue
-	;;
-      -version-number)
-	prev=vinfo
-	vinfo_number=yes
-	continue
-	;;
+	# Read the libtool library.
+	dlname=
+	library_names=
+	func_source "$file"
 
-      -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/^ //"`
-	;;
+	# Skip this library if it cannot be dlopened.
+	if test -z "$dlname"; then
+	  # Warn if it was a shared library.
+	  test -n "$library_names" && \
+	    func_warning "\`$file' was not linked with \`-export-dynamic'"
+	  continue
+	fi
 
-      -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/^ //"`
-	;;
+	func_dirname "$file" "" "."
+	dir="$func_dirname_result"
 
-      -Xcompiler)
-	prev=xcompiler
-	continue
+	if test -f "$dir/$objdir/$dlname"; then
+	  dir="$dir/$objdir"
+	else
+	  if test ! -f "$dir/$dlname"; then
+	    func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+	  fi
+	fi
 	;;
 
-      -Xlinker)
-	prev=xlinker
-	continue
+      *.lo)
+	# Just add the directory containing the .lo file.
+	func_dirname "$file" "" "."
+	dir="$func_dirname_result"
 	;;
 
-      -XCClinker)
-	prev=xcclinker
+      *)
+	func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
 	continue
 	;;
+      esac
 
-      # 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
-	;;
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
 
-      *.$objext)
-	# A standard object.
-	objs="$objs $arg"
-	;;
+      # 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
 
-      *.lo)
-	# A libtool-controlled object.
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
 
-	# 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=
+    # 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 func_ltwrapper_script_p "$file"; then
+	  func_source "$file"
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	elif func_ltwrapper_executable_p "$file"; then
+	  func_ltwrapper_scriptname "$file"
+	  func_source "$func_ltwrapper_scriptname_result"
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	fi
+	;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      func_quote_for_eval "$file"
+      args="$args $func_quote_for_eval_result"
+    done
 
-	  # Read the .lo file
-	  # If there is no directory component, then add one.
-	  case $arg in
-	  */* | *\\*) . $arg ;;
-	  *) . ./$arg ;;
-	  esac
+    if test "X$opt_dry_run" = Xfalse; then
+      if test -n "$shlibpath_var"; then
+	# Export the shlibpath_var.
+	eval "export $shlibpath_var"
+      fi
 
-	  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
+      # 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
+	      else
+		$lt_unset $lt_var
+	      fi"
+      done
 
-	  # Extract subdirectory from the argument.
-	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-	  if test "X$xdir" = "X$arg"; then
-	    xdir=
- 	  else
-	    xdir="$xdir/"
-	  fi
+      # 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
+}
 
-	  if test "$pic_object" != none; then
-	    # Prepend the subdirectory the object is found in.
-	    pic_object="$xdir$pic_object"
+test "$mode" = execute && func_mode_execute ${1+"$@"}
 
-	    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
+# func_mode_finish arg...
+func_mode_finish ()
+{
+    $opt_debug
+    libdirs="$nonopt"
+    admincmds=
 
-	    # A PIC object.
-	    libobjs="$libobjs $pic_object"
-	    arg="$pic_object"
-	  fi
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+	libdirs="$libdirs $dir"
+      done
 
-	  # 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"
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+       $cmds"
+	fi
+      done
+    fi
 
-	    # 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.
+    # Exit here if they wanted silent mode.
+    $opt_silent && exit $EXIT_SUCCESS
 
-	    # Extract subdirectory from the argument.
-	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-	    if test "X$xdir" = "X$arg"; then
-	      xdir=
-	    else
-	      xdir="$xdir/"
-	    fi
+    $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\"
 
-	    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
-	;;
+      $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
 
-      *.$libext)
-	# An archive.
-	deplibs="$deplibs $arg"
-	old_deplibs="$old_deplibs $arg"
-	continue
+    $ECHO "See any operating system documentation about shared libraries for"
+    case $host in
+      solaris2.[6789]|solaris2.1[0-9])
+        $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+	$ECHO "pages."
 	;;
+      *)
+        $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
+        ;;
+    esac
+    $ECHO "X----------------------------------------------------------------------" | $Xsed
+    exit $EXIT_SUCCESS
+}
 
-      *.la)
-	# A libtool-controlled library.
+test "$mode" = finish && func_mode_finish ${1+"$@"}
 
-	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
+# func_mode_install arg...
+func_mode_install ()
+{
+    $opt_debug
+    # 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.
+      func_quote_for_eval "$nonopt"
+      install_prog="$func_quote_for_eval_result "
+      arg=$1
+      shift
+    else
+      install_prog=
+      arg=$nonopt
+    fi
 
-      # Now actually substitute the argument into the commands.
-      if test -n "$arg"; then
-	compile_command="$compile_command $arg"
-	finalize_command="$finalize_command $arg"
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    func_quote_for_eval "$arg"
+    install_prog="$install_prog$func_quote_for_eval_result"
+
+    # 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
-    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
+      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
 
-    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
+      # Aesthetically quote the argument.
+      func_quote_for_eval "$arg"
+      install_prog="$install_prog $func_quote_for_eval_result"
+    done
 
-    oldlibs=
-    # calculate the name of the file, without its directory
-    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
-    libobjs_save="$libobjs"
+    test -z "$install_prog" && \
+      func_fatal_help "you must specify an install program"
 
-    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\"
+    test -n "$prev" && \
+      func_fatal_help "the \`$prev' option requires an argument"
 
-    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
+    if test -z "$files"; then
+      if test -z "$dest"; then
+	func_fatal_help "no file or destination specified"
+      else
+	func_fatal_help "you must specify a destination"
       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
+    # Strip any trailing slash from the destination.
+    func_stripname '' '/' "$dest"
+    dest=$func_stripname_result
 
-    case $host in
-    *cygwin* | *mingw* | *pw32*)
-      # don't eliminate duplications in $postdeps and $predeps
-      duplicate_compiler_generated_deps=yes
-      ;;
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      func_dirname_and_basename "$dest" "" "."
+      destdir="$func_dirname_result"
+      destname="$func_basename_result"
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files; shift
+      test "$#" -gt 1 && \
+	func_fatal_help "\`$dest' is not a directory"
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
     *)
-      duplicate_compiler_generated_deps=$duplicate_deps
+      for file in $files; do
+	case $file in
+	*.lo) ;;
+	*)
+	  func_fatal_help "\`$destdir' must be an absolute directory name"
+	  ;;
+	esac
+      done
       ;;
     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
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
 
-    if test "$linkmode" = lib; then
-      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
 
-      # 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" ;;
+      # 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.
+	func_lalib_unsafe_p "$file" \
+	  || func_fatal_help "\`$file' is not a valid libtool archive"
+
+	library_names=
+	old_library=
+	relink_command=
+	func_source "$file"
+
+	# 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
-	  pre_post_deps="$pre_post_deps $pre_post_dep"
-	done
-      fi
-      pre_post_deps=
-    fi
+	else
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  esac
+	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
+	func_dirname "$file" "/" ""
+	dir="$func_dirname_result"
+	dir="$dir$objdir"
+
+	if test -n "$relink_command"; then
+	  # Determine the prefix the user has applied to our future dir.
+	  inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "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.
+	  test "$inst_prefix_dir" = "$destdir" && \
+	    func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+	  if test -n "$inst_prefix_dir"; then
+	    # Stick the inst_prefix_dir data into the link command.
+	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	  else
+	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
+	  fi
+
+	  func_warning "relinking \`$file'"
+	  func_show_eval "$relink_command" \
+	    'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+	fi
+
+	# See the names of the shared library.
+	set dummy $library_names; shift
+	if test -n "$1"; then
+	  realname="$1"
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+	      'exit $?'
+	  tstripme="$stripme"
+	  case $host_os in
+	  cygwin* | mingw* | pw32* | cegcc*)
+	    case $realname in
+	    *.dll.a)
+	      tstripme=""
+	      ;;
+	    esac
 	    ;;
 	  esac
-	done
-	;;
-    prog)
-	compile_deplibs=
-	finalize_deplibs=
-	alldeplibs=no
-	newdlfiles=
-	newdlprefiles=
-	passes="conv scan dlopen dlpreopen link"
-	;;
-    *)  passes="conv"
+	  if test -n "$tstripme" && test -n "$striplib"; then
+	    func_show_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
+	      test "$linkname" != "$realname" \
+		&& func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  func_execute_cmds "$postinstall_cmds" 'exit $?'
+	fi
+
+	# Install the pseudo-library for information purposes.
+	func_basename "$file"
+	name="$func_basename_result"
+	instname="$dir/$name"i
+	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+	# Maybe install the static library, too.
+	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
 	;;
-    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%"
-	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+
+      *.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
+	  func_basename "$file"
+	  destfile="$func_basename_result"
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Deduce the name of the destination old-style object file.
+	case $destfile in
+	*.lo)
+	  func_lo2o "$destfile"
+	  staticdest=$func_lo2o_result
 	  ;;
-	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)
-	  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
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
 	  ;;
-	-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//'`
-	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; 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
+	*)
+	  func_fatal_help "cannot copy a libtool object to \`$destfile'"
+	  ;;
+	esac
+
+	# Install the libtool object if requested.
+	test -n "$destfile" && \
+	  func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+	# Install the old object if enabled.
+	if test "$build_old_libs" = yes; then
+	  # Deduce the name of the old-style object file.
+	  func_lo2o "$file"
+	  staticobj=$func_lo2o_result
+	  func_show_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
+	  func_basename "$file"
+	  destfile="$func_basename_result"
+	  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
+	      func_stripname '' '.exe' "$file"
+	      file=$func_stripname_result
+	      stripped_ext=".exe"
 	    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"
+	esac
+
+	# Do a test to see if this is really a libtool program.
+	case $host in
+	*cygwin* | *mingw*)
+	    if func_ltwrapper_executable_p "$file"; then
+	      func_ltwrapper_scriptname "$file"
+	      wrapper=$func_ltwrapper_scriptname_result
 	    else
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
+	      func_stripname '' '.exe' "$file"
+	      wrapper=$func_stripname_result
 	    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
+	*)
+	    wrapper=$file
 	    ;;
-	  prog)
-	    if test "$pass" != link; then
-	      deplibs="$deplib $deplibs"
-	    else
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
+	esac
+	if func_ltwrapper_script_p "$wrapper"; then
+	  notinst_deplibs=
+	  relink_command=
+
+	  func_source "$wrapper"
+
+	  # Check the variables that should have been set.
+	  test -z "$generated_by_libtool_version" && \
+	    func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; do
+	    # Check to see that each library is installed.
+	    libdir=
+	    if test -f "$lib"; then
+	      func_source "$lib"
 	    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"
+	    libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      func_warning "\`$lib' has not been installed in \`$libdir'"
+	      finalize=no
 	    fi
+	  done
+
+	  relink_command=
+	  func_source "$wrapper"
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    $opt_dry_run || {
+	      if test "$finalize" = yes; then
+	        tmpdir=`func_mktempdir`
+		func_basename "$file$stripped_ext"
+		file="$func_basename_result"
+	        outputname="$tmpdir/$file"
+	        # Replace the output file specification.
+	        relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+	        $opt_silent || {
+	          func_quote_for_expand "$relink_command"
+		  eval "func_echo $func_quote_for_expand_result"
+	        }
+	        if eval "$relink_command"; then :
+	          else
+		  func_error "error: relink \`$file' with the above command before installing it"
+		  $opt_dry_run || ${RM}r "$tmpdir"
+		  continue
+	        fi
+	        file="$outputname"
+	      else
+	        func_warning "cannot relink \`$file'"
+	      fi
+	    }
+	  else
+	    # Install the binary that we compiled earlier.
+	    file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
 	  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
+	# 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)
+	    func_stripname '' '.exe' "$destfile"
+	    destfile=$func_stripname_result
+	    ;;
+	  esac
+	  ;;
+	esac
+	func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+	$opt_dry_run || if test -n "$outputname"; then
+	  ${RM}r "$tmpdir"
 	fi
+	;;
+      esac
+    done
 
-	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$ladir" = "X$lib" && ladir="."
+    for file in $staticlibs; do
+      func_basename "$file"
+      name="$func_basename_result"
 
-	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=
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
 
+      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
 
-	# Read the .la file
-	case $lib in
-	*/* | *\\*) . $lib ;;
-	*) . ./$lib ;;
-	esac
+      if test -n "$stripme" && test -n "$old_striplib"; then
+	func_show_eval "$old_striplib $oldlib" 'exit $?'
+      fi
 
-	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
+      # Do each command in the postinstall commands.
+      func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+    done
 
-	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
+    test -n "$future_libdirs" && \
+      func_warning "remember to run \`$progname --finish$future_libdirs'"
 
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      $opt_dry_run && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+}
 
-	# 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
+test "$mode" = install && func_mode_install ${1+"$@"}
 
-	# 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"
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+    $opt_debug
+    my_outputname="$1"
+    my_originator="$2"
+    my_pic_p="${3-no}"
+    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+    my_dlsyms=
+
+    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+      if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	my_dlsyms="${my_outputname}S.c"
+      else
+	func_error "not configured to extract global symbols from dlpreopened files"
+      fi
+    fi
+
+    if test -n "$my_dlsyms"; then
+      case $my_dlsyms in
+      "") ;;
+      *.c)
+	# Discover the nlist of each of the dlfiles.
+	nlist="$output_objdir/${my_outputname}.nm"
+
+	func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+	# Parse the name list into a source file.
+	func_verbose "creating $output_objdir/$my_dlsyms"
+
+	$opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+	if test "$dlself" = yes; then
+	  func_verbose "generating symbol list for \`$output'"
+
+	  $opt_dry_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 progfile in $progfiles; do
+	    func_verbose "extracting global C symbols from \`$progfile'"
+	    $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -n "$exclude_expsyms"; then
+	    $opt_dry_run || {
+	      eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	    }
 	  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"
+	  if test -n "$export_symbols_regex"; then
+	    $opt_dry_run || {
+	      eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	    }
 	  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"
+
+	  # Prepare the list of exported symbols
+	  if test -z "$export_symbols"; then
+	    export_symbols="$output_objdir/$outputname.exp"
+	    $opt_dry_run || {
+	      $RM $export_symbols
+	      eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	      case $host in
+	      *cygwin* | *mingw* | *cegcc* )
+                eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+	        ;;
+	      esac
+	    }
 	  else
-	    dir="$ladir/$objdir"
-	    absdir="$abs_ladir/$objdir"
-	    # Remove this search path later
-	    notinst_path="$notinst_path $abs_ladir"
+	    $opt_dry_run || {
+	      eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	      case $host in
+	        *cygwin | *mingw* | *cegcc* )
+	          eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+	          eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+	          ;;
+	      esac
+	    }
 	  fi
-	fi # $installed = yes
-	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+	fi
 
-	# 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
+	for dlprefile in $dlprefiles; do
+	  func_verbose "extracting global C symbols from \`$dlprefile'"
+	  func_basename "$dlprefile"
+	  name="$func_basename_result"
+	  $opt_dry_run || {
+	    eval '$ECHO ": $name " >> "$nlist"'
+	    eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+	  }
+	done
+
+	$opt_dry_run || {
+	  # 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
-	  # 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"
+
+	  # 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
-	    newdlprefiles="$newdlprefiles $dir/$linklib"
+	    $GREP -v "^: " < "$nlist" > "$nlist"S
 	  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"
+	  if test -f "$nlist"S; then
+	    eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
 	  else
-	    deplibs="$lib $deplibs" # used for prog,scan pass
+	    $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
 	  fi
-	  continue
-	fi
-
 
-	if test "$linkmode" = prog && test "$pass" != link; then
-	  newlib_search_path="$newlib_search_path $ladir"
-	  deplibs="$lib $deplibs"
+	  $ECHO >> "$output_objdir/$my_dlsyms" "\
 
-	  linkalldeplibs=no
-	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
-	     test "$build_libtool_libs" = no; then
-	    linkalldeplibs=yes
-	  fi
+/* The mapping between symbol names and symbols.  */
+typedef struct {
+  const char *name;
+  void *address;
+} lt_dlsymlist;
+"
+	  case $host in
+	  *cygwin* | *mingw* | *cegcc* )
+	    $ECHO >> "$output_objdir/$my_dlsyms" "\
+/* DATA imports from DLLs on WIN32 con't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs.  */"
+	    lt_dlsym_const= ;;
+	  *osf5*)
+	    echo >> "$output_objdir/$my_dlsyms" "\
+/* This system does not cope well with relocations in const data */"
+	    lt_dlsym_const= ;;
+	  *)
+	    lt_dlsym_const=const ;;
+	  esac
 
-	  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...
+	  $ECHO >> "$output_objdir/$my_dlsyms" "\
+extern $lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+$lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+  { \"$my_originator\", (void *) 0 },"
 
-	if test "$linkmode,$pass" = "prog,link"; then
-	  if test -n "$library_names" &&
-	     { test "$prefer_static_libs" = no || 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
+	  case $need_lib_prefix in
+	  no)
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+	    ;;
+	  *)
+	    eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+	    ;;
+	  esac
+	  $ECHO >> "$output_objdir/$my_dlsyms" "\
+  {0, (void *) 0}
+};
 
-	    # 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...
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
 
-	  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
+#ifdef __cplusplus
+}
+#endif\
+"
+	} # !$opt_dry_run
 
-	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"
+	pic_flag_for_symtable=
+	case "$compile_command " in
+	*" -static "*) ;;
+	*)
+	  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*)
+	    pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+	  *-*-hpux*)
+	    pic_flag_for_symtable=" $pic_flag"  ;;
+	  *)
+	    if test "X$my_pic_p" != Xno; then
+	      pic_flag_for_symtable=" $pic_flag"
 	    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
+	    ;;
+	  esac
+	  ;;
+	esac
+	symtab_cflags=
+	for arg in $LTCFLAGS; do
+	  case $arg in
+	  -pie | -fpie | -fPIE) ;;
+	  *) symtab_cflags="$symtab_cflags $arg" ;;
+	  esac
+	done
 
-	  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
+	# Now compile the dynamic symbol file.
+	func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
 
-	    # 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"
+	# Clean up the generated files.
+	func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
 
-	    # 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
+	# Transform the symbol file into the correct name.
+	symfileobj="$output_objdir/${my_outputname}S.$objext"
+	case $host in
+	*cygwin* | *mingw* | *cegcc* )
+	  if test -f "$output_objdir/$my_outputname.def"; then
+	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+	  else
+	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	  fi
+	  ;;
+	*)
+	  compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	  finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	  ;;
+	esac
+	;;
+      *)
+	func_fatal_error "unknown suffix for \`$my_dlsyms'"
+	;;
+      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.
 
-	    # 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"
+      # Nullify the symbol file.
+      compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+      finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+    fi
+}
 
-	  if test "$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
+# 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 ()
+{
+  $opt_debug
+  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 '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"
+}
 
-	    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
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    $opt_debug
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+    func_show_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
+      func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+    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
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    $opt_debug
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+
+    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
+      func_basename "$my_xlib"
+      my_xlib="$func_basename_result"
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+	*" $my_xlib_u "*)
+	  func_arith $extracted_serial + 1
+	  extracted_serial=$func_arith_result
+	  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"
+
+      func_mkdir_p "$my_xdir"
+
+      case $host in
+      *-darwin*)
+	func_verbose "Extracting $my_xabs"
+	# Do not bother doing anything if just a dry run
+	$opt_dry_run || {
+	  darwin_orig_dir=`pwd`
+	  cd $my_xdir || exit $?
+	  darwin_archive=$my_xabs
+	  darwin_curdir=`pwd`
+	  darwin_base_archive=`basename "$darwin_archive"`
+	  darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+	  if test -n "$darwin_arches"; then
+	    darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+	    darwin_arch=
+	    func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+	    for darwin_arch in  $darwin_arches ; do
+	      func_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've a bunch of thin objects, gotta fatten them up :)
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+	    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 -rf unfat-$$
+	    cd "$darwin_orig_dir"
 	  else
-	    deplibs="$dir/$old_library $deplibs"
-	    link_static=yes
-	  fi
-	fi # link shared/static library?
+	    cd $darwin_orig_dir
+	    func_extract_an_archive "$my_xdir" "$my_xabs"
+	  fi # $darwin_arches
+	} # !$opt_dry_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
 
-	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
+    func_extract_archives_result="$my_oldobjs"
+}
 
-	  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`
-		  if test -n "$deplibrary_names" ; then
-		    for tmp in $deplibrary_names ; do
-		      depdepl=$tmp
-		    done
-		    if test -f "$path/$depdepl" ; then
-		      depdepl="$path/$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"
+# func_emit_wrapper_part1 [arg=no]
+#
+# Emit the first part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part1 ()
+{
+	func_emit_wrapper_part1_arg1=no
+	if test -n "$1" ; then
+	  func_emit_wrapper_part1_arg1=$1
 	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)
-      if test -n "$deplibs"; then
-	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
-      fi
+	$ECHO "\
+#! $SHELL
 
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
-      fi
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# 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.
 
-      if test -n "$rpath"; then
-	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
-      fi
+# 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'
 
-      if test -n "$xrpath"; then
-	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
-      fi
+# Be 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
 
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
-      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 -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
-      fi
+relink_command=\"$relink_command\"
 
-      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
-      fi
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variables:
+  generated_by_libtool_version='$macro_version'
+  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 "\
 
-      # Now set the variables for building old libraries.
-      build_libtool_libs=no
-      oldlibs="$output"
-      objs="$objs$old_deplibs"
-      ;;
+  # Find the directory that this script lives in.
+  thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
 
-    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
-	;;
+  # 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
 
-      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"
+    file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
+"
+}
+# end: func_emit_wrapper_part1
+
+# func_emit_wrapper_part2 [arg=no]
+#
+# Emit the second part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part2 ()
+{
+	func_emit_wrapper_part2_arg1=no
+	if test -n "$1" ; then
+	  func_emit_wrapper_part2_arg1=$1
 	fi
-      fi
 
-      if test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
-      fi
+	$ECHO "\
 
-      set dummy $rpath
-      if test "$#" -gt 2; then
-	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+  # Usually 'no', except on cygwin/mingw when embedded into
+  # the cwrapper.
+  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
+  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+    # special case for '.'
+    if test \"\$thisdir\" = \".\"; then
+      thisdir=\`pwd\`
+    fi
+    # remove .libs from thisdir
+    case \"\$thisdir\" in
+    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
+    $objdir )   thisdir=. ;;
+    esac
+  fi
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+	if test "$fast_install" = yes; then
+	  $ECHO "\
+  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 "\
+
+    # 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 1
       fi
-      install_libdir="$2"
+    fi
 
-      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
+    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $RM \"\$progdir/\$program\";
+      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $RM \"\$progdir/\$file\"
+  fi"
+	else
+	  $ECHO "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
 	fi
 
-	if test -n "$vinfo"; then
-	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
-	fi
+	$ECHO "\
 
-	if test -n "$release"; then
-	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
-	fi
-      else
+  if test -f \"\$progdir/\$program\"; then"
 
-	# Parse the version information argument.
-	save_ifs="$IFS"; IFS=':'
-	set dummy $vinfo 0 0 0
-	IFS="$save_ifs"
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $ECHO "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
 
-	if test -n "$8"; then
-	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
-	  $echo "$help" 1>&2
-	  exit $EXIT_FAILURE
-	fi
+    # 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/::*\$//'\`
 
-	# convert absolute version numbers to libtool ages
-	# this retains compatibility with .la files and attempts
-	# to make the code below a bit more comprehensible
+    export $shlibpath_var
+"
+	fi
 
-	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)
-	    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 - 1`
-	    age="$number_minor"
-	    revision="$number_minor"
-	    ;;
-	  *)
-	    $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
-	  ;;
-	no)
-	  current="$2"
-	  revision="$3"
-	  age="$4"
-	  ;;
-	esac
+	# fixup the dll searchpath if we need to.
+	if test -n "$dllsearchpath"; then
+	  $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
 
-	# 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
+	$ECHO "\
+    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* | *-cegcc*)
+	  $ECHO "\
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
 	  ;;
-	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
+	  $ECHO "\
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
 	  ;;
 	esac
+	$ECHO "\
+      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+      exit 1
+    fi
+  else
+    # The program doesn't exist.
+    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+    \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+    $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit 1
+  fi
+fi\
+"
+}
+# end: func_emit_wrapper_part2
 
-	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
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable.  Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take.  If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory.  This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+	func_emit_wrapper_arg1=no
+	if test -n "$1" ; then
+	  func_emit_wrapper_arg1=$1
 	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`
-	  verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
-	  ;;
+	# split this up so that func_emit_cwrapperexe_src
+	# can call each part independently.
+	func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
+	func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
+}
 
-	freebsd-aout)
-	  major=".$current"
-	  versuffix=".$current.$revision";
-	  ;;
 
-	freebsd-elf)
-	  major=".$current"
-	  versuffix=".$current";
-	  ;;
+# func_to_host_path arg
+#
+# Convert paths to host format when used with build tools.
+# Intended for use with "native" mingw (where libtool itself
+# is running under the msys shell), or in the following cross-
+# build environments:
+#    $build          $host
+#    mingw (msys)    mingw  [e.g. native]
+#    cygwin          mingw
+#    *nix + wine     mingw
+# where wine is equipped with the `winepath' executable.
+# In the native mingw case, the (msys) shell automatically
+# converts paths for any non-msys applications it launches,
+# but that facility isn't available from inside the cwrapper.
+# Similar accommodations are necessary for $host mingw and
+# $build cygwin.  Calling this function does no harm for other
+# $host/$build combinations not listed above.
+#
+# ARG is the path (on $build) that should be converted to
+# the proper representation for $host. The result is stored
+# in $func_to_host_path_result.
+func_to_host_path ()
+{
+  func_to_host_path_result="$1"
+  if test -n "$1" ; then
+    case $host in
+      *mingw* )
+        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+        case $build in
+          *mingw* ) # actually, msys
+            # awkward: cmd appends spaces to result
+            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+            func_to_host_path_tmp1=`( cmd //c echo "$1" |\
+              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          *cygwin* )
+            func_to_host_path_tmp1=`cygpath -w "$1"`
+            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          * )
+            # Unfortunately, winepath does not exit with a non-zero
+            # error code, so we are forced to check the contents of
+            # stdout. On the other hand, if the command is not
+            # found, the shell will set an exit code of 127 and print
+            # *an error message* to stdout. So we must check for both
+            # error code of zero AND non-empty stdout, which explains
+            # the odd construction:
+            func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
+            if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
+              func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+                $SED -e "$lt_sed_naive_backslashify"`
+            else
+              # Allow warning below.
+              func_to_host_path_result=""
+            fi
+            ;;
+        esac
+        if test -z "$func_to_host_path_result" ; then
+          func_error "Could not determine host path corresponding to"
+          func_error "  '$1'"
+          func_error "Continuing, but uninstalled executables may not work."
+          # Fallback:
+          func_to_host_path_result="$1"
+        fi
+        ;;
+    esac
+  fi
+}
+# end: func_to_host_path
 
-	irix | nonstopux)
-	  major=`expr $current - $age + 1`
+# func_to_host_pathlist arg
+#
+# Convert pathlists to host format when used with build tools.
+# See func_to_host_path(), above. This function supports the
+# following $build/$host combinations (but does no harm for
+# combinations not listed here):
+#    $build          $host
+#    mingw (msys)    mingw  [e.g. native]
+#    cygwin          mingw
+#    *nix + wine     mingw
+#
+# Path separators are also converted from $build format to
+# $host format. If ARG begins or ends with a path separator
+# character, it is preserved (but converted to $host format)
+# on output.
+#
+# ARG is a pathlist (on $build) that should be converted to
+# the proper representation on $host. The result is stored
+# in $func_to_host_pathlist_result.
+func_to_host_pathlist ()
+{
+  func_to_host_pathlist_result="$1"
+  if test -n "$1" ; then
+    case $host in
+      *mingw* )
+        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+        # Remove leading and trailing path separator characters from
+        # ARG. msys behavior is inconsistent here, cygpath turns them
+        # into '.;' and ';.', and winepath ignores them completely.
+        func_to_host_pathlist_tmp2="$1"
+        # Once set for this call, this variable should not be
+        # reassigned. It is used in tha fallback case.
+        func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
+          $SED -e 's|^:*||' -e 's|:*$||'`
+        case $build in
+          *mingw* ) # Actually, msys.
+            # Awkward: cmd appends spaces to result.
+            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+            func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
+              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          *cygwin* )
+            func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
+            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          * )
+            # unfortunately, winepath doesn't convert pathlists
+            func_to_host_pathlist_result=""
+            func_to_host_pathlist_oldIFS=$IFS
+            IFS=:
+            for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
+              IFS=$func_to_host_pathlist_oldIFS
+              if test -n "$func_to_host_pathlist_f" ; then
+                func_to_host_path "$func_to_host_pathlist_f"
+                if test -n "$func_to_host_path_result" ; then
+                  if test -z "$func_to_host_pathlist_result" ; then
+                    func_to_host_pathlist_result="$func_to_host_path_result"
+                  else
+                    func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
+                  fi
+                fi
+              fi
+              IFS=:
+            done
+            IFS=$func_to_host_pathlist_oldIFS
+            ;;
+        esac
+        if test -z "$func_to_host_pathlist_result" ; then
+          func_error "Could not determine the host path(s) corresponding to"
+          func_error "  '$1'"
+          func_error "Continuing, but uninstalled executables may not work."
+          # Fallback. This may break if $1 contains DOS-style drive
+          # specifications. The fix is not to complicate the expression
+          # below, but for the user to provide a working wine installation
+          # with winepath so that path translation in the cross-to-mingw
+          # case works properly.
+          lt_replace_pathsep_nix_to_dos="s|:|;|g"
+          func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
+            $SED -e "$lt_replace_pathsep_nix_to_dos"`
+        fi
+        # Now, add the leading and trailing path separators back
+        case "$1" in
+          :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
+            ;;
+        esac
+        case "$1" in
+          *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
+            ;;
+        esac
+        ;;
+    esac
+  fi
+}
+# end: func_to_host_pathlist
 
-	  case $version_type in
-	    nonstopux) verstring_prefix=nonstopux ;;
-	    *)         verstring_prefix=sgi ;;
-	  esac
-	  verstring="$verstring_prefix$major.$revision"
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+	cat <<EOF
 
-	  # 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
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
 
-	  # Before this point, $major must not contain `.'.
-	  major=.$major
-	  versuffix="$major.$revision"
-	  ;;
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
 
-	linux)
-	  major=.`expr $current - $age`
-	  versuffix="$major.$age.$revision"
-	  ;;
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
 
-	osf)
-	  major=.`expr $current - $age`
-	  versuffix=".$current.$age.$revision"
-	  verstring="$current.$age.$revision"
+   Currently, it simply execs the wrapper *script* "$SHELL $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+	    cat <<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+# define setmode _setmode
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+#  include <io.h>
+#  define HAVE_SETENV
+#  ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+#  endif
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
 
-	  # 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
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
 
-	  # Make executables depend on our current version.
-	  verstring="$verstring:${current}.0"
-	  ;;
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
 
-	sunos)
-	  major=".$current"
-	  versuffix=".$current.$revision"
-	  ;;
+#ifdef _MSC_VER
+# define S_IXUSR _S_IEXEC
+# define stat _stat
+# ifndef _INTPTR_T_DEFINED
+#  define intptr_t int
+# endif
+#endif
 
-	windows)
-	  # Use '-' rather than '.', since we only want one
-	  # extension on DOS 8.3 filesystems.
-	  major=`expr $current - $age`
-	  versuffix="-$major"
-	  ;;
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
 
-	*)
-	  $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
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+#  define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+#  define PATH_SEPARATOR_2 ';'
+# endif
+#endif
 
-	# 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
+#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 */
 
-	# Remove version info from name if versioning should be avoided
-	if test "$avoid_version" = yes && test "$need_version" = no; then
-	  major=
-	  versuffix=
-	  verstring=""
-	fi
+#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 */
 
-	# 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
+#ifdef __CYGWIN__
+# define FOPEN_WB "wb"
+#endif
 
-      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
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
 
-      # 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"
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
 
-	# Transform .lo files to .o files.
-	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
-      fi
+#undef LTWRAPPER_DEBUGPRINTF
+#if defined DEBUGWRAPPER
+# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
+static void
+ltwrapper_debugprintf (const char *fmt, ...)
+{
+    va_list args;
+    va_start (args, fmt);
+    (void) vfprintf (stderr, fmt, args);
+    va_end (args);
+}
+#else
+# define LTWRAPPER_DEBUGPRINTF(args)
+#endif
 
-      # 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
+const char *program_name = NULL;
 
-      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
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_opt_process_env_set (const char *arg);
+void lt_opt_process_env_prepend (const char *arg);
+void lt_opt_process_env_append (const char *arg);
+int lt_split_name_value (const char *arg, char** name, char** value);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+
+static const char *script_text_part1 =
+EOF
 
-      # 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
+	    func_emit_wrapper_part1 yes |
+	        $SED -e 's/\([\\"]\)/\\\1/g' \
+	             -e 's/^/  "/' -e 's/$/\\n"/'
+	    echo ";"
+	    cat <<EOF
 
-      # 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
+static const char *script_text_part2 =
+EOF
+	    func_emit_wrapper_part2 yes |
+	        $SED -e 's/\([\\"]\)/\\\1/g' \
+	             -e 's/^/  "/' -e 's/$/\\n"/'
+	    echo ";"
+
+	    cat <<EOF
+const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
 
-      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; }
+	    if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+              func_to_host_pathlist "$temp_rpath"
+	      cat <<EOF
+const char * LIB_PATH_VALUE   = "$func_to_host_pathlist_result";
 EOF
-	  $rm conftest
-	  $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
-	  if test "$?" -eq 0 ; 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" -ne "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
-		$LTCC $LTCFLAGS -o conftest conftest.c $i
-		# Did it work?
-		if test "$?" -eq 0 ; 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"
+	      cat <<"EOF"
+const char * LIB_PATH_VALUE   = "";
+EOF
 	    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
+
+	    if test -n "$dllsearchpath"; then
+              func_to_host_pathlist "$dllsearchpath:"
+	      cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE   = "$func_to_host_pathlist_result";
+EOF
 	    else
-	      # Add a -L argument.
-	      newdeplibs="$newdeplibs $a_deplib"
+	      cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE   = "";
+EOF
 	    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."
+
+	    if test "$fast_install" = yes; then
+	      cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
 	    else
-	      $echo "*** Warning: inter-library dependencies are not known to be supported."
+	      cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
 	    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."
+	    cat <<"EOF"
 
-	    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
+#define LTWRAPPER_OPTION_PREFIX         "--lt-"
+#define LTWRAPPER_OPTION_PREFIX_LENGTH  5
 
+static const size_t opt_prefix_len         = LTWRAPPER_OPTION_PREFIX_LENGTH;
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
 
-      # 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"
+static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
 
+static const size_t env_set_opt_len     = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
+static const char *env_set_opt          = LTWRAPPER_OPTION_PREFIX "env-set";
+  /* argument is putenv-style "foo=bar", value of foo is set to bar */
 
-      # All the library-specific variables (install_libdir is set above).
-      library_names=
-      old_library=
-      dlname=
+static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
+static const char *env_prepend_opt      = LTWRAPPER_OPTION_PREFIX "env-prepend";
+  /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
 
-      # 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
-	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
-	    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
+static const size_t env_append_opt_len  = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
+static const char *env_append_opt       = LTWRAPPER_OPTION_PREFIX "env-append";
+  /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
 
-	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
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int  newargc;
+  char *tmp_pathspec;
+  char *actual_cwrapper_path;
+  char *actual_cwrapper_name;
+  char *target_name;
+  char *lt_argv_zero;
+  intptr_t rval = 127;
 
-	# 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
+  int i;
 
-	if test -n "$soname_spec"; then
-	  eval soname=\"$soname_spec\"
-	else
-	  soname="$realname"
-	fi
-	if test -z "$dlname"; then
-	  dlname=$soname
-	fi
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
+  LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
 
-	lib="$output_objdir/$realname"
-	linknames=
-	for link
-	do
-	  linknames="$linknames $link"
-	done
+  /* very simple arg parsing; don't want to rely on getopt */
+  for (i = 1; i < argc; i++)
+    {
+      if (strcmp (argv[i], dumpscript_opt) == 0)
+	{
+EOF
+	    case "$host" in
+	      *mingw* | *cygwin* )
+		# make stdout use "unix" line endings
+		echo "          setmode(1,_O_BINARY);"
+		;;
+	      esac
 
-	# Use standard objects if they are pic
-	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	    cat <<"EOF"
+	  printf ("%s", script_text_part1);
+	  printf ("%s", script_text_part2);
+	  return 0;
+	}
+    }
 
-	# 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
+  newargz = XMALLOC (char *, argc + 1);
+  tmp_pathspec = find_executable (argv[0]);
+  if (tmp_pathspec == NULL)
+    lt_fatal ("Couldn't find %s", argv[0]);
+  LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
+			  tmp_pathspec));
+
+  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+  LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
+			  actual_cwrapper_path));
+  XFREE (tmp_pathspec);
+
+  actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
+  strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+  /* wrapper name transforms */
+  strendzap (actual_cwrapper_name, ".exe");
+  tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+  XFREE (actual_cwrapper_name);
+  actual_cwrapper_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  /* target_name transforms -- use actual target program name; might have lt- prefix */
+  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+  strendzap (target_name, ".exe");
+  tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+  XFREE (target_name);
+  target_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
+			  target_name));
+EOF
 
-	if test -n "$export_symbols" && test -n "$include_expsyms"; then
-	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
-	fi
+	    cat <<EOF
+  newargz[0] =
+    XMALLOC (char, (strlen (actual_cwrapper_path) +
+		    strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+  strcpy (newargz[0], actual_cwrapper_path);
+  strcat (newargz[0], "$objdir");
+  strcat (newargz[0], "/");
+EOF
 
-	tmp_deplibs=
-	for test_deplib in $deplibs; do
-		case " $convenience " in
-		*" $test_deplib "*) ;;
-		*)
-			tmp_deplibs="$tmp_deplibs $test_deplib"
-			;;
-		esac
-	done
-	deplibs="$tmp_deplibs"
+	    cat <<"EOF"
+  /* stop here, and copy so we don't have to do this twice */
+  tmp_pathspec = xstrdup (newargz[0]);
 
-	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"
+  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+  strcat (newargz[0], actual_cwrapper_name);
 
-	    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
+  /* DO want the lt- prefix here if it exists, so use target_name */
+  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+  XFREE (tmp_pathspec);
+  tmp_pathspec = NULL;
+EOF
 
-	# 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
+	    case $host_os in
+	      mingw*)
+	    cat <<"EOF"
+  {
+    char* p;
+    while ((p = strchr (newargz[0], '\\')) != NULL)
+      {
+	*p = '/';
+      }
+    while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+      {
+	*p = '/';
+      }
+  }
+EOF
+	    ;;
+	    esac
 
-	# 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
+	    cat <<"EOF"
+  XFREE (target_name);
+  XFREE (actual_cwrapper_path);
+  XFREE (actual_cwrapper_name);
 
-	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..."
+  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
+  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
 
-	  # 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"`
+  newargc=0;
+  for (i = 1; i < argc; i++)
+    {
+      if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
+        {
+          if (argv[i][env_set_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_set_opt_len + 1;
+              lt_opt_process_env_set (p);
+            }
+          else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_set (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_set_opt);
+          continue;
+        }
+      if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
+        {
+          if (argv[i][env_prepend_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_prepend_opt_len + 1;
+              lt_opt_process_env_prepend (p);
+            }
+          else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_prepend (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_prepend_opt);
+          continue;
+        }
+      if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
+        {
+          if (argv[i][env_append_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_append_opt_len + 1;
+              lt_opt_process_env_append (p);
+            }
+          else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_append (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_append_opt);
+          continue;
+        }
+      if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
+        {
+          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+             namespace, but it is not one of the ones we know about and
+             have already dealt with, above (inluding dump-script), then
+             report an error. Otherwise, targets might begin to believe
+             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+             namespace. The first time any user complains about this, we'll
+             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+             or a configure.ac-settable value.
+           */
+          lt_fatal ("Unrecognized option in %s namespace: '%s'",
+                    ltwrapper_option_prefix, argv[i]);
+        }
+      /* otherwise ... */
+      newargz[++newargc] = xstrdup (argv[i]);
+    }
+  newargz[++newargc] = NULL;
 
-	  # 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
+  LTWRAPPER_DEBUGPRINTF     (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
+  for (i = 0; i < newargc; i++)
+    {
+      LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
+    }
 
-	  $echo "creating a temporary reloadable object file: $output"
+EOF
 
-	  # 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"
+	    case $host_os in
+	      mingw*)
+		cat <<"EOF"
+  /* execv doesn't actually work on mingw as expected on unix */
+  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+  if (rval == -1)
+    {
+      /* failed to start process */
+      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
+      return 127;
+    }
+  return rval;
+EOF
+		;;
+	      *)
+		cat <<"EOF"
+  execv (lt_argv_zero, newargz);
+  return rval; /* =127, but avoids unused variable warning */
+EOF
+		;;
+	    esac
 
-	  libobjs=$output
-	  # Restore the value of output.
-	  output=$save_output
+	    cat <<"EOF"
+}
 
-	  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.
+void *
+xmalloc (size_t num)
+{
+  void *p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
 
-	  # 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
+  return p;
+}
 
-	  # 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=$?
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+			  string) : NULL;
+}
 
-	    # Restore the uninstalled library and exit
-	    if test "$mode" = relink; then
-	      $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
-	    fi
+const char *
+base_name (const char *name)
+{
+  const char *base;
 
-	    exit $lt_exit
-	  }
-	done
-	IFS="$save_ifs"
+#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
 
-	# 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 $?
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return base;
+}
 
-	  if test -n "$convenience"; then
-	    if test -z "$whole_archive_flag_spec"; then
-	      $show "${rm}r $gentop"
-	      $run ${rm}r "$gentop"
-	    fi
-	  fi
+int
+check_executable (const char *path)
+{
+  struct stat st;
 
-	  exit $EXIT_SUCCESS
-	fi
+  LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
+			  path ? (*path ? path : "EMPTY!") : "NULL!"));
+  if ((!path) || (!*path))
+    return 0;
 
-	# 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 ((stat (path, &st) >= 0)
+      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+    return 1;
+  else
+    return 0;
+}
 
-	# 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
-      ;;
+int
+make_executable (const char *path)
+{
+  int rval = 0;
+  struct stat st;
 
-    obj)
-      if test -n "$deplibs"; then
-	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
-      fi
+  LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
+			  path ? (*path ? path : "EMPTY!") : "NULL!"));
+  if ((!path) || (!*path))
+    return 0;
 
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
-      fi
+  if (stat (path, &st) >= 0)
+    {
+      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+    }
+  return rval;
+}
 
-      if test -n "$rpath"; then
-	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
-      fi
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise
+   Does not chase symlinks, even on platforms that support them.
+*/
+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;
 
-      if test -n "$xrpath"; then
-	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
-      fi
+  LTWRAPPER_DEBUGPRINTF (("(find_executable)   : %s\n",
+			  wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
 
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
-      fi
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
 
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
-      fi
+  /* 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
 
-      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
+  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);
 
-      # Delete the old objects.
-      $run $rm $obj $libobj
+  if (check_executable (concat_name))
+    return concat_name;
+  XFREE (concat_name);
+  return NULL;
+}
 
-      # Objects from convenience libraries.  This assumes
-      # single-version convenience libraries.  Whenever we create
-      # different ones for PIC/non-PIC, this we'll have to duplicate
-      # the extraction.
-      reload_conv_objs=
-      gentop=
-      # reload_cmds runs $LD directly, so let us get rid of
-      # -Wl from whole_archive_flag_spec
-      wl=
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+  return xstrdup (pathspec);
+#else
+  char buf[LT_PATHMAX];
+  struct stat s;
+  char *tmp_pathspec = xstrdup (pathspec);
+  char *p;
+  int has_symlinks = 0;
+  while (strlen (tmp_pathspec) && !has_symlinks)
+    {
+      LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
+			      tmp_pathspec));
+      if (lstat (tmp_pathspec, &s) == 0)
+	{
+	  if (S_ISLNK (s.st_mode) != 0)
+	    {
+	      has_symlinks = 1;
+	      break;
+	    }
 
-      if test -n "$convenience"; then
-	if test -n "$whole_archive_flag_spec"; then
-	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
-	else
-	  gentop="$output_objdir/${obj}x"
-	  generated="$generated $gentop"
+	  /* search backwards for last DIR_SEPARATOR */
+	  p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+	  while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+	    p--;
+	  if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+	    {
+	      /* no more DIR_SEPARATORS left */
+	      break;
+	    }
+	  *p = '\0';
+	}
+      else
+	{
+	  char *errstr = strerror (errno);
+	  lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+	}
+    }
+  XFREE (tmp_pathspec);
 
-	  func_extract_archives $gentop $convenience
-	  reload_conv_objs="$reload_objs $func_extract_archives_result"
-	fi
-      fi
+  if (!has_symlinks)
+    {
+      return xstrdup (pathspec);
+    }
 
-      # 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
+  tmp_pathspec = realpath (pathspec, buf);
+  if (tmp_pathspec == 0)
+    {
+      lt_fatal ("Could not follow symlinks for %s", pathspec);
+    }
+  return xstrdup (tmp_pathspec);
+#endif
+}
 
-      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"
+char *
+strendzap (char *str, const char *pat)
+{
+  size_t len, patlen;
 
-      # 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
+  assert (str != NULL);
+  assert (pat != NULL);
 
-	exit $EXIT_SUCCESS
-      fi
+  len = strlen (str);
+  patlen = strlen (pat);
 
-      if test "$build_libtool_libs" != yes; then
-	if test -n "$gentop"; then
-	  $show "${rm}r $gentop"
-	  $run ${rm}r $gentop
-	fi
+  if (patlen <= len)
+    {
+      str += len - patlen;
+      if (strcmp (str, pat) == 0)
+	*str = '\0';
+    }
+  return str;
+}
 
-	# 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
+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 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 (exit_status >= 0)
+    exit (exit_status);
+}
 
-      if test -n "$gentop"; then
-	$show "${rm}r $gentop"
-	$run ${rm}r $gentop
-      fi
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
 
-      exit $EXIT_SUCCESS
-      ;;
+void
+lt_setenv (const char *name, const char *value)
+{
+  LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
+                          (name ? name : "<NULL>"),
+                          (value ? value : "<NULL>")));
+  {
+#ifdef HAVE_SETENV
+    /* always make a copy, for consistency with !HAVE_SETENV */
+    char *str = xstrdup (value);
+    setenv (name, str, 1);
+#else
+    int len = strlen (name) + 1 + strlen (value) + 1;
+    char *str = XMALLOC (char, len);
+    sprintf (str, "%s=%s", name, value);
+    if (putenv (str) != EXIT_SUCCESS)
+      {
+        XFREE (str);
+      }
+#endif
+  }
+}
 
-    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
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+  char *new_value;
+  if (orig_value && *orig_value)
+    {
+      int orig_value_len = strlen (orig_value);
+      int add_len = strlen (add);
+      new_value = XMALLOC (char, add_len + orig_value_len + 1);
+      if (to_end)
+        {
+          strcpy (new_value, orig_value);
+          strcpy (new_value + orig_value_len, add);
+        }
+      else
+        {
+          strcpy (new_value, add);
+          strcpy (new_value + add_len, orig_value);
+        }
+    }
+  else
+    {
+      new_value = xstrdup (add);
+    }
+  return new_value;
+}
 
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
-      fi
+int
+lt_split_name_value (const char *arg, char** name, char** value)
+{
+  const char *p;
+  int len;
+  if (!arg || !*arg)
+    return 1;
 
-      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
+  p = strchr (arg, (int)'=');
 
-      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
+  if (!p)
+    return 1;
 
-      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
+  *value = xstrdup (++p);
 
+  len = strlen (arg) - strlen (*value);
+  *name = XMALLOC (char, len);
+  strncpy (*name, arg, len-1);
+  (*name)[len - 1] = '\0';
 
-      # 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"
+  return 0;
+}
 
+void
+lt_opt_process_env_set (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
 
-      compile_command="$compile_command $compile_deplibs"
-      finalize_command="$finalize_command $finalize_deplibs"
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
+    }
 
-      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
+  lt_setenv (name, value);
+  XFREE (name);
+  XFREE (value);
+}
 
-      # 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"
+void
+lt_opt_process_env_prepend (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
+  char *new_value = NULL;
 
-      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 (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
+    }
 
-      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
+  new_value = lt_extend_str (getenv (name), value, 0);
+  lt_setenv (name, new_value);
+  XFREE (new_value);
+  XFREE (name);
+  XFREE (value);
+}
 
-      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
+void
+lt_opt_process_env_append (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
+  char *new_value = NULL;
 
-      if test -n "$dlsyms"; then
-	case $dlsyms in
-	"") ;;
-	*.c)
-	  # Discover the nlist of each of the dlfiles.
-	  nlist="$output_objdir/${outputname}.nm"
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
+    }
 
-	  $show "$rm $nlist ${nlist}S ${nlist}T"
-	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
+  new_value = lt_extend_str (getenv (name), value, 1);
+  lt_setenv (name, new_value);
+  XFREE (new_value);
+  XFREE (name);
+  XFREE (value);
+}
 
-	  # Parse the name list into a source file.
-	  $show "creating $output_objdir/$dlsyms"
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+  LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+                          (name ? name : "<NULL>"),
+                          (value ? value : "<NULL>")));
 
-	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      /* some systems can't cope with a ':'-terminated path #' */
+      int len = strlen (new_value);
+      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+        {
+          new_value[len-1] = '\0';
+        }
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
 
-#ifdef __cplusplus
-extern \"C\" {
-#endif
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+  LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+                          (name ? name : "<NULL>"),
+                          (value ? value : "<NULL>")));
 
-/* Prevent the only kind of declaration conflicts we can make. */
-#define lt_preloaded_symbols some_other_symbol
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
 
-/* External symbol declarations for the compiler. */\
-"
 
-	  if test "$dlself" = yes; then
-	    $show "generating symbol list for \`$output'"
+EOF
+}
+# end: func_emit_cwrapperexe_src
 
-	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+# func_mode_link arg...
+func_mode_link ()
+{
+    $opt_debug
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+      # 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
 
-	    # 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
+      # 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
 
-	    if test -n "$exclude_expsyms"; then
-	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
-	      $run eval '$mv "$nlist"T "$nlist"'
-	    fi
+    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=
+    new_inherited_linker_flags=
 
-	    if test -n "$export_symbols_regex"; then
-	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
-	      $run eval '$mv "$nlist"T "$nlist"'
-	    fi
+    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=
+    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
+    weak_libs=
+    single_module="${wl}-single_module"
+    func_infer_tag $base_compile
 
-	    # 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
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -shared)
+	test "$build_libtool_libs" != yes && \
+	  func_fatal_configuration "can not build a shared library"
+	build_old_libs=no
+	break
+	;;
+      -all-static | -static | -static-libtool-libs)
+	case $arg in
+	-all-static)
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	    func_warning "complete static linking is impossible in this configuration"
 	  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
 
-	  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"
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
 
-	    if test -n "$exclude_expsyms"; then
-	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
-	      $mv "$nlist"T "$nlist"
-	    fi
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      func_quote_for_eval "$arg"
+      qarg=$func_quote_for_eval_unquoted_result
+      func_append libtool_args " $func_quote_for_eval_result"
 
-	    # 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
-	      :
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+	case $prev in
+	output)
+	  func_append compile_command " @OUTPUT@"
+	  func_append finalize_command " @OUTPUT@"
+	  ;;
+	esac
+
+	case $prev in
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    func_append compile_command " @SYMFILE@"
+	    func_append 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
-	      grep -v "^: " < "$nlist" > "$nlist"S
+	      dlself=needless
+	      export_dynamic=yes
 	    fi
-
-	    if test -f "$nlist"S; then
-	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+	    prev=
+	    continue
+	    ;;
+	  *)
+	    if test "$prev" = dlfiles; then
+	      dlfiles="$dlfiles $arg"
 	    else
-	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
+	      dlprefiles="$dlprefiles $arg"
 	    fi
+	    prev=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  test -f "$arg" \
+	    || func_fatal_error "symbol file \`$arg' does not exist"
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	framework)
+	  case $host in
+	    *-*-darwin*)
+	      case "$deplibs " in
+		*" $qarg.ltframework "*) ;;
+		*) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+		   ;;
+	      esac
+	      ;;
+	  esac
+	  prev=
+	  continue
+	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$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.
 
-	    $echo >> "$output_objdir/$dlsyms" "\
-
-#undef lt_preloaded_symbols
+	      # Check to see that this really is a libtool object.
+	      if func_lalib_unsafe_p "$arg"; then
+		pic_object=
+		non_pic_object=
 
-#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
-#else
-# define lt_ptr char *
-# define const
-#endif
+		# Read the .lo file
+		func_source "$arg"
 
-/* The mapping between symbol names and symbols. */
-"
+		if test -z "$pic_object" ||
+		   test -z "$non_pic_object" ||
+		   test "$pic_object" = none &&
+		   test "$non_pic_object" = none; then
+		  func_fatal_error "cannot find name of object for \`$arg'"
+		fi
 
-	    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
+		# Extract subdirectory from the argument.
+		func_dirname "$arg" "/" ""
+		xdir="$func_dirname_result"
 
+		if test "$pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  pic_object="$xdir$pic_object"
 
-	  $echo >> "$output_objdir/$dlsyms" "\
-  const char *name;
-  lt_ptr address;
-}
-lt_preloaded_symbols[] =
-{\
-"
+		  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
 
-	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+		  # CHECK ME:  I think I busted this.  -Ossama
+		  if test "$prev" = dlprefiles; then
+		    # Preload the old-style object.
+		    dlprefiles="$dlprefiles $pic_object"
+		    prev=
+		  fi
 
-	    $echo >> "$output_objdir/$dlsyms" "\
-  {0, (lt_ptr) 0}
-};
+		  # A PIC object.
+		  func_append libobjs " $pic_object"
+		  arg="$pic_object"
+		fi
 
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt_preloaded_symbols;
-}
-#endif
+		# 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"
 
-#ifdef __cplusplus
-}
-#endif\
-"
+		  # A standard non-PIC object
+		  func_append 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"
+		  func_append non_pic_objects " $non_pic_object"
+		fi
+	      else
+		# Only an error if not doing a dry-run.
+		if $opt_dry_run; then
+		  # Extract subdirectory from the argument.
+		  func_dirname "$arg" "/" ""
+		  xdir="$func_dirname_result"
+
+		  func_lo2o "$arg"
+		  pic_object=$xdir$objdir/$func_lo2o_result
+		  non_pic_object=$xdir$func_lo2o_result
+		  func_append libobjs " $pic_object"
+		  func_append non_pic_objects " $non_pic_object"
+	        else
+		  func_fatal_error "\`$arg' is not a valid libtool object"
+		fi
+	      fi
+	    done
+	  else
+	    func_fatal_error "link input file \`$arg' does not exist"
 	  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
+	  arg=$save_arg
+	  prev=
+	  continue
+	  ;;
+	precious_regex)
+	  precious_files_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case $arg in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    func_fatal_error "only absolute run-paths are allowed"
+	    ;;
 	  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" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
-              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
-            else
-              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-             fi
-            ;;
-          * )
-            compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-            finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-            ;;
-          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
+	  ;;
+	shrext)
+	  shrext_cmds="$arg"
+	  prev=
+	  continue
+	  ;;
+	weak)
+	  weak_libs="$weak_libs $arg"
+	  prev=
+	  continue
+	  ;;
+	xcclinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  func_append compile_command " $qarg"
+	  func_append finalize_command " $qarg"
+	  continue
+	  ;;
+	xcompiler)
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  func_append compile_command " $qarg"
+	  func_append finalize_command " $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $wl$qarg"
+	  prev=
+	  func_append compile_command " $wl$qarg"
+	  func_append finalize_command " $wl$qarg"
+	  continue
 	  ;;
 	*)
-	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
-	  exit $EXIT_FAILURE
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
 	  ;;
 	esac
-      else
-	# We keep going just in case the user didn't refer to
-	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
-	# really was required.
-
-	# Nullify the symbol file.
-	compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
-      fi
-
-      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
-	# Replace the output file specification.
-	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-	link_command="$compile_command$compile_rpath"
+      fi # test -n "$prev"
 
-	# We have no uninstalled library dependencies, so finalize right now.
-	$show "$link_command"
-	$run eval "$link_command"
-	exit_status=$?
+      prevarg="$arg"
 
-	# Delete the generated files.
-	if test -n "$dlsyms"; then
-	  $show "$rm $output_objdir/${outputname}S.${objext}"
-	  $run $rm "$output_objdir/${outputname}S.${objext}"
+      case $arg in
+      -all-static)
+	if test -n "$link_static_flag"; then
+	  # See comment for -static flag below, for more details.
+	  func_append compile_command " $link_static_flag"
+	  func_append finalize_command " $link_static_flag"
 	fi
+	continue
+	;;
 
-	exit $exit_status
-      fi
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+	;;
 
-      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
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
 
-      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
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
 
-      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\" "
+      -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
+	  func_fatal_error "more than one -exported-symbols argument is not allowed"
 	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\" "
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
 	fi
-      fi
+	continue
+	;;
 
-      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
+      -framework)
+	prev=framework
+	continue
+	;;
 
-      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"
+      -inst-prefix-dir)
+	prev=inst_prefix
+	continue
+	;;
 
-	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
-	$echo "$modename: \`$output' will be relinked during installation" 1>&2
-      else
-	if test "$fast_install" != no; then
-	  link_command="$finalize_var$compile_command$finalize_rpath"
-	  if test "$fast_install" = yes; then
-	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+      # 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*)
+	  func_append compile_command " $arg"
+	  func_append finalize_command " $arg"
+	  ;;
+	esac
+	continue
+	;;
+
+      -L*)
+	func_stripname '-L' '' "$arg"
+	dir=$func_stripname_result
+	if test -z "$dir"; then
+	  if test "$#" -gt 0; then
+	    func_fatal_error "require no space between \`-L' and \`$1'"
 	  else
-	    # fast_install is set to needless
-	    relink_command=
+	    func_fatal_error "need path for \`-L' option"
 	  fi
-	else
-	  link_command="$compile_var$compile_command$compile_rpath"
-	  relink_command="$finalize_var$finalize_command$finalize_rpath"
 	fi
-      fi
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  absdir=`cd "$dir" && pwd`
+	  test -z "$absdir" && \
+	    func_fatal_error "cannot determine absolute directory name of \`$dir'"
+	  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* | *-cegcc*)
+	  testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  ::) dllsearchpath=$dir;;
+	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  ::) dllsearchpath=$testbindir;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
+	  ;;
+	esac
+	continue
+	;;
 
-      # Replace the output file specification.
-      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+      -l*)
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
+	    # 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 System.ltframework"
+	    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
+	;;
 
-      # Delete the old output files.
-      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+      -module)
+	module=yes
+	continue
+	;;
 
-      $show "$link_command"
-      $run eval "$link_command" || exit $?
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      # Darwin uses the -arch flag to determine output architecture.
+      -model|-arch|-isysroot)
+	compiler_flags="$compiler_flags $arg"
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+	prev=xcompiler
+	continue
+	;;
 
-      # Now create the wrapper script.
-      $show "creating $output"
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	compiler_flags="$compiler_flags $arg"
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+	case "$new_inherited_linker_flags " in
+	    *" $arg "*) ;;
+	    * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+	esac
+	continue
+	;;
 
-      # 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" | $Xsed -e "$sed_quote_subst"`
-      fi
+      -multi_module)
+	single_module="${wl}-multi_module"
+	continue
+	;;
 
-      # 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
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
 
-      # 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
+      -no-install)
 	case $host in
-	  *cygwin*)
-	    exeext=.exe
-	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
-	  *) exeext= ;;
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # and Darwin in order for the loader to find any dlls it needs.
+	  func_warning "\`-no-install' is ignored for $host"
+	  func_warning "assuming \`-no-fast-install' instead"
+	  fast_install=no
+	  ;;
+	*) no_install=yes ;;
 	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
+	continue
+	;;
 
-	    cat > $cwrappersource <<EOF
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
 
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
-   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+      -objectlist)
+	prev=objectlist
+	continue
+	;;
 
-   The $output program cannot be directly executed until all the libtool
-   libraries that it depends on are installed.
+      -o) prev=output ;;
 
-   This wrapper executable should never be moved out of the build directory.
-   If it is, it will not operate correctly.
+      -precious-files-regex)
+	prev=precious_regex
+	continue
+	;;
 
-   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>
+      -release)
+	prev=release
+	continue
+	;;
 
-#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
+      -rpath)
+	prev=rpath
+	continue
+	;;
 
-#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
+      -R)
+	prev=xrpath
+	continue
+	;;
 
-#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 */
+      -R*)
+	func_stripname '-R' '' "$arg"
+	dir=$func_stripname_result
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  func_fatal_error "only absolute run-paths are allowed"
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) xrpath="$xrpath $dir" ;;
+	esac
+	continue
+	;;
 
-#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 */
+      -shared)
+	# The effects of -shared are defined in a previous loop.
+	continue
+	;;
 
-#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
-  if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
+      -shrext)
+	prev=shrext
+	continue
+	;;
 
-/* -DDEBUG is fairly common in CFLAGS.  */
-#undef DEBUG
-#if defined DEBUGWRAPPER
-# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
-#else
-# define DEBUG(format, ...)
-#endif
+      -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
+	;;
 
-const char *program_name = NULL;
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
 
-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, ...);
+      -version-info)
+	prev=vinfo
+	continue
+	;;
 
-int
-main (int argc, char *argv[])
-{
-  char **newargz;
-  int i;
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
 
-  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
+      -weak)
+        prev=weak
+	continue
+	;;
 
-            cat >> $cwrappersource <<EOF
-  newargz[0] = (char *) xstrdup("$SHELL");
-EOF
+      -Wc,*)
+	func_stripname '-Wc,' '' "$arg"
+	args=$func_stripname_result
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+	  arg="$arg $wl$func_quote_for_eval_result"
+	  compiler_flags="$compiler_flags $func_quote_for_eval_result"
+	done
+	IFS="$save_ifs"
+	func_stripname ' ' '' "$arg"
+	arg=$func_stripname_result
+	;;
 
-            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;
+      -Wl,*)
+	func_stripname '-Wl,' '' "$arg"
+	args=$func_stripname_result
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+	  arg="$arg $wl$func_quote_for_eval_result"
+	  compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
+	  linker_flags="$linker_flags $func_quote_for_eval_result"
+	done
+	IFS="$save_ifs"
+	func_stripname ' ' '' "$arg"
+	arg=$func_stripname_result
+	;;
 
-  for (i=0; i<argc+1; i++)
-  {
-    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
-    ;
-  }
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
 
-EOF
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
 
-            case $host_os in
-              mingw*)
-                cat >> $cwrappersource <<EOF
-  execv("$SHELL",(char const **)newargz);
-EOF
-              ;;
-              *)
-                cat >> $cwrappersource <<EOF
-  execv("$SHELL",newargz);
-EOF
-              ;;
-            esac
+      -XCClinker)
+	prev=xcclinker
+	continue
+	;;
 
-            cat >> $cwrappersource <<"EOF"
-  return 127;
-}
+      # -msg_* for osf cc
+      -msg_*)
+	func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
 
-void *
-xmalloc (size_t num)
-{
-  void * p = (void *) malloc (num);
-  if (!p)
-    lt_fatal ("Memory exhausted");
+      # -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*, -t[45]*, -txscale* pass through architecture-specific
+      # compiler args for GCC
+      # -F/path gives path to uninstalled frameworks, gcc on darwin
+      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+      # @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*|@*)
+        func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+        func_append compile_command " $arg"
+        func_append finalize_command " $arg"
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
 
-  return p;
-}
+      # Some other compiler flag.
+      -* | +*)
+        func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
 
-char *
-xstrdup (const char *string)
-{
-  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
-;
-}
+      *.$objext)
+	# A standard object.
+	objs="$objs $arg"
+	;;
 
-const char *
-base_name (const char *name)
-{
-  const char *base;
+      *.lo)
+	# A libtool-controlled object.
 
-#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
+	# Check to see that this really is a libtool object.
+	if func_lalib_unsafe_p "$arg"; then
+	  pic_object=
+	  non_pic_object=
 
-  for (base = name; *name; name++)
-    if (IS_DIR_SEPARATOR (*name))
-      base = name + 1;
-  return base;
-}
+	  # Read the .lo file
+	  func_source "$arg"
 
-int
-check_executable(const char * path)
-{
-  struct stat st;
+	  if test -z "$pic_object" ||
+	     test -z "$non_pic_object" ||
+	     test "$pic_object" = none &&
+	     test "$non_pic_object" = none; then
+	    func_fatal_error "cannot find name of object for \`$arg'"
+	  fi
 
-  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
-  if ((!path) || (!*path))
-    return 0;
+	  # Extract subdirectory from the argument.
+	  func_dirname "$arg" "/" ""
+	  xdir="$func_dirname_result"
 
-  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;
-}
+	  if test "$pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    pic_object="$xdir$pic_object"
 
-/* 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;
+	    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
 
-  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
+	    # CHECK ME:  I think I busted this.  -Ossama
+	    if test "$prev" = dlprefiles; then
+	      # Preload the old-style object.
+	      dlprefiles="$dlprefiles $pic_object"
+	      prev=
+	    fi
 
-  if ((wrapper == NULL) || (*wrapper == '\0'))
-    return NULL;
+	    # A PIC object.
+	    func_append libobjs " $pic_object"
+	    arg="$pic_object"
+	  fi
 
-  /* 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
+	  # 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"
 
-  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);
+	    # A standard non-PIC object
+	    func_append 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"
+	    func_append non_pic_objects " $non_pic_object"
+	  fi
+	else
+	  # Only an error if not doing a dry-run.
+	  if $opt_dry_run; then
+	    # Extract subdirectory from the argument.
+	    func_dirname "$arg" "/" ""
+	    xdir="$func_dirname_result"
+
+	    func_lo2o "$arg"
+	    pic_object=$xdir$objdir/$func_lo2o_result
+	    non_pic_object=$xdir$func_lo2o_result
+	    func_append libobjs " $pic_object"
+	    func_append non_pic_objects " $non_pic_object"
+	  else
+	    func_fatal_error "\`$arg' is not a valid libtool object"
+	  fi
+	fi
+	;;
 
-  if (check_executable(concat_name))
-    return concat_name;
-  XFREE(concat_name);
-  return NULL;
-}
+      *.$libext)
+	# An archive.
+	deplibs="$deplibs $arg"
+	old_deplibs="$old_deplibs $arg"
+	continue
+	;;
 
-char *
-strendzap(char *str, const char *pat)
-{
-  size_t len, patlen;
+      *.la)
+	# A libtool-controlled library.
 
-  assert(str != NULL);
-  assert(pat != NULL);
+	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
+	;;
 
-  len = strlen(str);
-  patlen = strlen(pat);
+      # Some other compiler argument.
+      *)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+      esac # arg
 
-  if (patlen <= len)
-  {
-    str += len - patlen;
-    if (strcmp(str, pat) == 0)
-      *str = '\0';
-  }
-  return str;
-}
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+      fi
+    done # argument parsing loop
 
-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");
+    test -n "$prev" && \
+      func_fatal_help "the \`$prevarg' option requires an argument"
 
-  if (exit_status >= 0)
-    exit (exit_status);
-}
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      func_append compile_command " $arg"
+      func_append finalize_command " $arg"
+    fi
 
-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
+    oldlibs=
+    # calculate the name of the file, without its directory
+    func_basename "$output"
+    outputname="$func_basename_result"
+    libobjs_save="$libobjs"
 
-	$echo > $output "\
-#! $SHELL
+    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 - 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.
+    func_dirname "$output" "/" ""
+    output_objdir="$func_dirname_result$objdir"
+    # Create the object directory.
+    func_mkdir_p "$output_objdir"
 
-# 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'
+    # Determine the type of output
+    case $output in
+    "")
+      func_fatal_help "you must specify an output file"
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
 
-# 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
+    specialdeplibs=
 
-relink_command=\"$relink_command\"
+    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 $opt_duplicate_deps ; then
+	case "$libs " in
+	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	esac
+      fi
+      libs="$libs $deplib"
+    done
 
-# 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+\"\$@\"}
+    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 $opt_duplicate_compiler_generated_deps; 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
-  fi\
-"
-	$echo >> $output "\
 
-  # Find the directory that this script lives in.
-  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
-  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    notinst_path= # paths that contain not-installed libtool libraries
 
-  # 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%/[^/]*\$%%'\`
+    case $linkmode in
+    lib)
+	passes="conv dlpreopen link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+	    ;;
+	  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
+      # The preopen pass in lib mode reverses $deplibs; put it back here
+      # so that -L comes before libs that need it for instance...
+      if test "$linkmode,$pass" = "lib,link"; then
+	## FIXME: Find the place where the list is rebuilt in the wrong
+	##        order, and fix it there properly
+        tmp_deplibs=
+	for deplib in $deplibs; do
+	  tmp_deplibs="$deplib $tmp_deplibs"
+	done
+	deplibs="$tmp_deplibs"
+      fi
+
+      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%"
+	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+	  ;;
+	esac
+      fi
+      if test "$linkmode,$pass" = "lib,dlpreopen"; then
+	# Collect and forward deplibs of preopened libtool libs
+	for lib in $dlprefiles; do
+	  # Ignore non-libtool-libs
+	  dependency_libs=
+	  case $lib in
+	  *.la)	func_source "$lib" ;;
+	  esac
+
+	  # Collect preopened libtool deplibs, except any this library
+	  # has declared as weak libs
+	  for deplib in $dependency_libs; do
+            deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+	    case " $weak_libs " in
+	    *" $deplib_base "*) ;;
+	    *) deplibs="$deplibs $deplib" ;;
+	    esac
+	  done
+	done
+	libs="$dlprefiles"
+      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"
+	    if test "$linkmode" = lib ; then
+		case "$new_inherited_linker_flags " in
+		    *" $deplib "*) ;;
+		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+		esac
+	    fi
+	  fi
+	  continue
+	  ;;
+	-l*)
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    func_warning "\`-l' is ignored for archives/objects"
+	    continue
+	  fi
+	  func_stripname '-l' '' "$deplib"
+	  name=$func_stripname_result
+	  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 func_lalib_p "$lib"; then
+		  library_names=
+		  old_library=
+		  func_source "$lib"
+		  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
+		    func_dirname "$lib" "" "."
+		    ladir="$func_dirname_result"
+		    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
+	*.ltframework)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    deplibs="$deplib $deplibs"
+	    if test "$linkmode" = lib ; then
+		case "$new_inherited_linker_flags " in
+		    *" $deplib "*) ;;
+		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+		esac
+	    fi
+	  fi
+	  continue
+	  ;;
+	-L*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test "$pass" = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    func_stripname '-L' '' "$deplib"
+	    newlib_search_path="$newlib_search_path $func_stripname_result"
+	    ;;
+	  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
+	    func_stripname '-L' '' "$deplib"
+	    newlib_search_path="$newlib_search_path $func_stripname_result"
+	    ;;
+	  *)
+	    func_warning "\`-L' is ignored for archives/objects"
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test "$pass" = link; then
+	    func_stripname '-R' '' "$deplib"
+	    dir=$func_stripname_result
+	    # 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)
+	    # Linking convenience modules into shared libraries is allowed,
+	    # but linking other static libraries is non-portable.
+	    case " $dlpreconveniencelibs " in
+	    *" $deplib "*) ;;
+	    *)
+	      valid_a_lib=no
+	      case $deplibs_check_method in
+		match_pattern*)
+		  set dummy $deplibs_check_method; shift
+		  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+		  if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 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 use here."
+	      else
+		$ECHO
+		$ECHO "*** Warning: Linking the shared library $output against the"
+		$ECHO "*** static library $deplib is not portable!"
+		deplibs="$deplib $deplibs"
+	      fi
+	      ;;
+	    esac
+	    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
+	  func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+	fi
+
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$lib" \
+	  || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+	func_dirname "$lib" "" "."
+	ladir="$func_dirname_result"
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	inherited_linker_flags=
+	# 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
+	func_source "$lib"
+
+	# Convert "-framework foo" to "foo.ltframework"
+	if test -n "$inherited_linker_flags"; then
+	  tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+	  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+	    case " $new_inherited_linker_flags " in
+	      *" $tmp_inherited_linker_flag "*) ;;
+	      *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+	    esac
+	  done
+	fi
+	dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	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
+	      func_fatal_error "cannot find name of link library for \`$lib'"
+	    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 $opt_duplicate_deps ; 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
+	    func_fatal_error "\`$lib' is not a convenience library"
+	  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
+	  func_fatal_error "cannot find name of link library for \`$lib'"
+	fi
+
+	# This library was specified with -dlopen.
+	if test "$pass" = dlopen; then
+	  if test -z "$libdir"; then
+	    func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+	  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
+	    func_warning "cannot determine absolute directory name of \`$ladir'"
+	    func_warning "passing it literally to the linker, although it might fail"
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	func_basename "$lib"
+	laname="$func_basename_result"
+
+	# 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
+	    func_warning "library \`$lib' was moved."
+	    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
+	func_stripname 'lib' '.la' "$laname"
+	name=$func_stripname_result
+
+	# This library was specified with -dlpreopen.
+	if test "$pass" = dlpreopen; then
+	  if test -z "$libdir" && test "$linkmode" = prog; then
+	    func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+	  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"
+	    # Keep a list of preopened convenience libraries to check
+	    # that they are being used correctly in the link pass.
+	    test -z "$libdir" && \
+		dlpreconveniencelibs="$dlpreconveniencelibs $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*) func_stripname '-L' '' "$deplib"
+	         newlib_search_path="$newlib_search_path $func_stripname_result"
+		 ;;
+	    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 $opt_duplicate_deps ; 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
+	      *"$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
+	  case $host in
+	  *cygwin* | *mingw* | *cegcc*)
+	      # No point in relinking DLLs because paths are not encoded
+	      notinst_deplibs="$notinst_deplibs $lib"
+	      need_relink=no
+	    ;;
+	  *)
+	    if test "$installed" = no; then
+	      notinst_deplibs="$notinst_deplibs $lib"
+	      need_relink=yes
+	    fi
+	    ;;
+	  esac
+	  # This is a shared library
+
+	  # Warn about portability, can't link against -module's on some
+	  # systems (darwin).  Don't bleat about dlopened modules though!
+	  dlopenmodule=""
+	  for dlpremoduletest in $dlprefiles; do
+	    if test "X$dlpremoduletest" = "X$lib"; then
+	      dlopenmodule="$dlpremoduletest"
+	      break
+	    fi
+	  done
+	  if test -z "$dlopenmodule" && 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
+	    shift
+	    realname="$1"
+	    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* | *cegcc*)
+	        func_arith $current - $age
+		major=$func_arith_result
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # Make a new name for the extract_expsyms_cmds to use
+	    soroot="$soname"
+	    func_basename "$soroot"
+	    soname="$func_basename_result"
+	    func_stripname 'lib' '.dll' "$soname"
+	    newlib=libimp-$func_stripname_result.a
+
+	    # If the library has no export list, then create one now
+	    if test -f "$output_objdir/$soname-def"; then :
+	    else
+	      func_verbose "extracting exported symbol list from \`$soname'"
+	      func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      func_verbose "generating import library for \`$soname'"
+	      func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+	    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 (non-dlopened) module then we can not
+		    # link against it, someone is ignoring the earlier warnings
+		    if /usr/bin/file -L $add 2> /dev/null |
+			 $GREP ": [^:]* bundle" >/dev/null ; then
+		      if test "X$dlopenmodule" != "X$lib"; 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
+		      elif test -n "$old_library"; then
+			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 &&
+	         test "$hardcode_direct_absolute" = no; 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
+	      func_fatal_configuration "unsupported hardcode properties"
+	    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 &&
+	       test "$hardcode_direct_absolute" = no; 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*) func_stripname '-R' '' "$libdir"
+	           temp_xrpath=$func_stripname_result
+		   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 $opt_duplicate_deps ; 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
+	      path=
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+	        func_dirname "$deplib" "" "."
+		dir="$func_dirname_result"
+		# We need an absolute path.
+		case $dir in
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		*)
+		  absdir=`cd "$dir" && pwd`
+		  if test -z "$absdir"; then
+		    func_warning "cannot determine absolute directory name of \`$dir'"
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		if $GREP "^installed=no" $deplib > /dev/null; then
+		case $host in
+		*-*-darwin*)
+		  depdepl=
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
+		      depdepl=$tmp
+		    done
+		    if test -f "$absdir/$objdir/$depdepl" ; then
+		      depdepl="$absdir/$objdir/$depdepl"
+		      darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+                      if test -z "$darwin_install_name"; then
+                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
+                      fi
+		      compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+		      linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+		      path=
+		    fi
+		  fi
+		  ;;
+		*)
+		  path="-L$absdir/$objdir"
+		  ;;
+		esac
+		else
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  test -z "$libdir" && \
+		    func_fatal_error "\`$deplib' is not a valid libtool archive"
+		  test "$absdir" != "$libdir" && \
+		    func_warning "\`$deplib' seems to be moved"
+
+		  path="-L$absdir"
+		fi
+		;;
+	      esac
+	      case " $deplibs " in
+	      *" $path "*) ;;
+	      *) deplibs="$path $deplibs" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      if test "$pass" = link; then
+	if test "$linkmode" = "prog"; then
+	  compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+	  finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+	else
+	  compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	fi
+      fi
+      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"
+    fi
+    if test "$linkmode" = prog || test "$linkmode" = lib; then
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	func_warning "\`-dlopen' is ignored for archives"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+	func_warning "\`-l' and \`-L' are ignored for archives" ;;
+      esac
+
+      test -n "$rpath" && \
+	func_warning "\`-rpath' is ignored for archives"
+
+      test -n "$xrpath" && \
+	func_warning "\`-R' is ignored for archives"
+
+      test -n "$vinfo" && \
+	func_warning "\`-version-info/-version-number' is ignored for archives"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for archives"
+
+      test -n "$export_symbols$export_symbols_regex" && \
+	func_warning "\`-export-symbols' is ignored for archives"
+
+      # 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*)
+	func_stripname 'lib' '.la' "$outputname"
+	name=$func_stripname_result
+	eval shared_ext=\"$shrext_cmds\"
+	eval libname=\"$libname_spec\"
+	;;
+      *)
+	test "$module" = no && \
+	  func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+	if test "$need_lib_prefix" != no; then
+	  # Add the "lib" prefix for modules if required
+	  func_stripname '' '.la' "$outputname"
+	  name=$func_stripname_result
+	  eval shared_ext=\"$shrext_cmds\"
+	  eval libname=\"$libname_spec\"
+	else
+	  func_stripname '' '.la' "$outputname"
+	  libname=$func_stripname_result
+	fi
+	;;
+      esac
+
+      if test -n "$objs"; then
+	if test "$deplibs_check_method" != pass_all; then
+	  func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+	else
+	  $ECHO
+	  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+	  $ECHO "*** objects $objs is not portable!"
+	  libobjs="$libobjs $objs"
+	fi
+      fi
+
+      test "$dlself" != no && \
+	func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+      set dummy $rpath
+      shift
+      test "$#" -gt 1 && \
+	func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+      install_libdir="$1"
+
+      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
+
+	test -n "$vinfo" && \
+	  func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+	test -n "$release" && \
+	  func_warning "\`-release' is ignored for convenience libraries"
+      else
+
+	# Parse the version information argument.
+	save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	shift
+	IFS="$save_ifs"
+
+	test -n "$7" && \
+	  func_fatal_help "too many parameters to \`-version-info'"
+
+	# 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="$1"
+	  number_minor="$2"
+	  number_revision="$3"
+	  #
+	  # 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)
+	    func_arith $number_major + $number_minor
+	    current=$func_arith_result
+	    age="$number_minor"
+	    revision="$number_revision"
+	    ;;
+	  freebsd-aout|freebsd-elf|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
+	    ;;
+	  irix|nonstopux)
+	    func_arith $number_major + $number_minor
+	    current=$func_arith_result
+	    age="$number_minor"
+	    revision="$number_minor"
+	    lt_irix_increment=no
+	    ;;
+	  *)
+	    func_fatal_configuration "$modename: unknown library version type \`$version_type'"
+	    ;;
+	  esac
+	  ;;
+	no)
+	  current="$1"
+	  revision="$2"
+	  age="$3"
+	  ;;
+	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]) ;;
+	*)
+	  func_error "CURRENT \`$current' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	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]) ;;
+	*)
+	  func_error "REVISION \`$revision' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	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]) ;;
+	*)
+	  func_error "AGE \`$age' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	esac
+
+	if test "$age" -gt "$current"; then
+	  func_error "AGE \`$age' is greater than the current interface number \`$current'"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	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
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix="$major.$age.$revision"
+	  # Darwin ld doesn't like 0 for these options...
+	  func_arith $current + 1
+	  minor_current=$func_arith_result
+	  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
+	    func_arith $current - $age
+	  else
+	    func_arith $current - $age + 1
+	  fi
+	  major=$func_arith_result
+
+	  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
+	    func_arith $revision - $loop
+	    iface=$func_arith_result
+	    func_arith $loop - 1
+	    loop=$func_arith_result
+	    verstring="$verstring_prefix$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	linux)
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  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
+	    func_arith $current - $loop
+	    iface=$func_arith_result
+	    func_arith $loop - 1
+	    loop=$func_arith_result
+	    verstring="$verstring:${iface}.0"
+	  done
+
+	  # Make executables depend on our current version.
+	  verstring="$verstring:${current}.0"
+	  ;;
+
+	qnx)
+	  major=".$current"
+	  versuffix=".$current"
+	  ;;
+
+	sunos)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  func_arith $current - $age
+	  major=$func_arith_result
+	  versuffix="-$major"
+	  ;;
+
+	*)
+	  func_fatal_configuration "unknown library version type \`$version_type'"
+	  ;;
+	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
+	    func_warning "undefined symbols not allowed in $host shared libraries"
+	    build_libtool_libs=no
+	    build_old_libs=yes
+	  fi
+	else
+	  # Don't allow undefined symbols.
+	  allow_undefined_flag="$no_undefined_flag"
+	fi
+
+      fi
+
+      func_generate_dlsyms "$libname" "$libname" "yes"
+      libobjs="$libobjs $symfileobj"
+      test "X$libobjs" = "X " && libobjs=
+
+      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 | *.gcno)
+	       ;;
+	    $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
+	test -n "$removelist" && \
+	  func_show_eval "${RM}r \$removelist"
+      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 "X$lib_search_path " | $Xsed -e "s% $path % %g"`
+      #	deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
+      #	dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -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* | *-cegcc*)
+	    # these systems don't actually have a c library (as such)!
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C library is in the System framework
+	    deplibs="$deplibs System.ltframework"
+	    ;;
+	  *-*-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.
+	  $opt_dry_run || $RM conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $opt_dry_run || $RM conftest
+	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      case $i in
+	      -l*)
+		func_stripname -l '' "$i"
+		name=$func_stripname_result
+		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; shift
+		  deplib_match=$1
+		  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
+		;;
+	      *)
+		newdeplibs="$newdeplibs $i"
+		;;
+	      esac
+	    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
+	      case $i in
+	      -l*)
+		func_stripname -l '' "$i"
+		name=$func_stripname_result
+		$opt_dry_run || $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; shift
+		    deplib_match=$1
+		    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
+		;;
+	      *)
+		newdeplibs="$newdeplibs $i"
+		;;
+	      esac
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method; shift
+	  file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    case $a_deplib in
+	    -l*)
+	      func_stripname -l '' "$a_deplib"
+	      name=$func_stripname_result
+	      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 -e 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
+	      ;;
+	    *)
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	      ;;
+	    esac
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method; shift
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    case $a_deplib in
+	    -l*)
+	      func_stripname -l '' "$a_deplib"
+	      name=$func_stripname_result
+	      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 \"X$potent_lib\"" 2>/dev/null | $Xsed -e 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
+	      ;;
+	    *)
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	      ;;
+	    esac
+	  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" | $Xsed -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 with the System framework
+	  newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+	  ;;
+	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
+      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+      case $host in
+	*-*-darwin*)
+	  newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  ;;
+      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 " $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
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+	    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
 
-    # 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
+	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
 
-    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
-  done
+	# Get the real and link names of the library.
+	eval shared_ext=\"$shrext_cmds\"
+	eval library_names=\"$library_names_spec\"
+	set dummy $library_names
+	shift
+	realname="$1"
+	shift
 
-  # Try to get the absolute directory name.
-  absdir=\`cd \"\$thisdir\" && pwd\`
-  test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
+	if test -n "$soname_spec"; then
+	  eval soname=\"$soname_spec\"
+	else
+	  soname="$realname"
+	fi
+	if test -z "$dlname"; then
+	  dlname=$soname
+	fi
 
-	if test "$fast_install" = yes; then
-	  $echo >> $output "\
-  program=lt-'$outputname'$exeext
-  progdir=\"\$thisdir/$objdir\"
+	lib="$output_objdir/$realname"
+	linknames=
+	for link
+	do
+	  linknames="$linknames $link"
+	done
 
-  if test ! -f \"\$progdir/\$program\" || \\
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
-       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	test "X$libobjs" = "X " && libobjs=
 
-    file=\"\$\$-\$program\"
+	delfiles=
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+	  export_symbols="$output_objdir/$libname.uexp"
+	  delfiles="$delfiles $export_symbols"
+	fi
 
-    if test ! -d \"\$progdir\"; then
-      $mkdir \"\$progdir\"
-    else
-      $rm \"\$progdir/\$file\"
-    fi"
+	orig_export_symbols=
+	case $host_os in
+	cygwin* | mingw* | cegcc*)
+	  if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+	    # exporting using user supplied symfile
+	    if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+	      # and it's NOT already a .def file. Must figure out
+	      # which of the given symbols are data symbols and tag
+	      # them as such. So, trigger use of export_symbols_cmds.
+	      # export_symbols gets reassigned inside the "prepare
+	      # the list of exported symbols" if statement, so the
+	      # include_expsyms logic still works.
+	      orig_export_symbols="$export_symbols"
+	      export_symbols=
+	      always_export_symbols=yes
+	    fi
+	  fi
+	  ;;
+	esac
 
-	  $echo >> $output "\
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    func_verbose "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $opt_dry_run || $RM $export_symbols
+	    cmds=$export_symbols_cmds
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      eval cmd=\"$cmd\"
+	      func_len " $cmd"
+	      len=$func_len_result
+	      if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+		func_show_eval "$cmd" 'exit $?'
+		skipped_export=false
+	      else
+		# The command line is too long to execute in one step.
+		func_verbose "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" && test "X$skipped_export" != "X:"; then
+	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+	fi
 
-    # 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
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  tmp_export_symbols="$export_symbols"
+	  test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+	  $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+	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\"
-"
+	if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+	  # The given exports_symbols file has to be filtered, so filter it.
+	  func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+	  # FIXME: $output_objdir/$libname.filter potentially contains lots of
+	  # 's' commands which not all seds can handle. GNU sed should be fine
+	  # though. Also, the filter scales superlinearly with the number of
+	  # global variables. join(1) would be nice here, but unfortunately
+	  # isn't a blessed tool.
+	  $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+	  delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+	  export_symbols=$output_objdir/$libname.def
+	  $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
 	fi
 
-	$echo >> $output "\
+	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 -f \"\$progdir/\$program\"; then"
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec" &&
+	    test "$compiler_needs_object" = yes &&
+	    test -z "$libobjs"; then
+	    # extract the archives, so we have objects to list.
+	    # TODO: could optimize this to just extract one archive.
+	    whole_archive_flag_spec=
+	  fi
+	  if test -n "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	    test "X$libobjs" = "X " && libobjs=
+	  else
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
 
-	# 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\"
+	    func_extract_archives $gentop $convenience
+	    libobjs="$libobjs $func_extract_archives_result"
+	    test "X$libobjs" = "X " && libobjs=
+	  fi
+	fi
 
-    # 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/::*\$//'\`
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  linker_flags="$linker_flags $flag"
+	fi
 
-    export $shlibpath_var
-"
+	# Make a backup of the uninstalled library when relinking
+	if test "$mode" = relink; then
+	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
 	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
-"
+	# 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
 
-	$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+\"\$@\"}
-"
-	  ;;
+	if test "X$skipped_export" != "X:" &&
+	   func_len " $test_cmds" &&
+	   len=$func_len_result &&
+	   test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  :
+	else
+	  # The command line is too long to link in one step, link piecewise
+	  # or, if using GNU ld and skipped_export is not :, use a linker
+	  # script.
 
-	*)
-	  $echo >> $output "\
-      exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
-	  ;;
-	esac
-	$echo >> $output "\
-      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
-      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
+	  # 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"`
 
-    # See if we need to build an old-fashioned archive.
-    for oldlib in $oldlibs; do
+	  # Clear the reloadable object creation command queue and
+	  # initialize k to one.
+	  test_cmds=
+	  concat_cmds=
+	  objlist=
+	  last_robj=
+	  k=1
 
-      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 "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+	    output=${output_objdir}/${output_la}.lnkscript
+	    func_verbose "creating GNU ld script: $output"
+	    $ECHO 'INPUT (' > $output
+	    for obj in $save_libobjs
+	    do
+	      $ECHO "$obj" >> $output
+	    done
+	    $ECHO ')' >> $output
+	    delfiles="$delfiles $output"
+	  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+	    output=${output_objdir}/${output_la}.lnk
+	    func_verbose "creating linker input file list: $output"
+	    : > $output
+	    set x $save_libobjs
+	    shift
+	    firstobj=
+	    if test "$compiler_needs_object" = yes; then
+	      firstobj="$1 "
+	      shift
+	    fi
+	    for obj
+	    do
+	      $ECHO "$obj" >> $output
+	    done
+	    delfiles="$delfiles $output"
+	    output=$firstobj\"$file_list_spec$output\"
+	  else
+	    if test -n "$save_libobjs"; then
+	      func_verbose "creating reloadable object files..."
+	      output=$output_objdir/$output_la-${k}.$objext
+	      eval test_cmds=\"$reload_cmds\"
+	      func_len " $test_cmds"
+	      len0=$func_len_result
+	      len=$len0
+
+	      # Loop over the list of objects to be linked.
+	      for obj in $save_libobjs
+	      do
+		func_len " $obj"
+		func_arith $len + $func_len_result
+		len=$func_arith_result
+		if test "X$objlist" = X ||
+		   test "$len" -lt "$max_cmd_len"; then
+		  func_append 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~\$RM $last_robj\"
+		  fi
+		  last_robj=$output_objdir/$output_la-${k}.$objext
+		  func_arith $k + 1
+		  k=$func_arith_result
+		  output=$output_objdir/$output_la-${k}.$objext
+		  objlist=$obj
+		  func_len " $last_robj"
+		  func_arith $len0 + $func_len_result
+		  len=$func_arith_result
+		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 test -n "$last_robj"; then
+	        eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+	      fi
+	      delfiles="$delfiles $output"
 
-      if test -n "$addlibs"; then
-	gentop="$output_objdir/${outputname}x"
-	generated="$generated $gentop"
+	    else
+	      output=
+	    fi
 
-	func_extract_archives $gentop $addlibs
-	oldobjs="$oldobjs $func_extract_archives_result"
-      fi
+	    if ${skipped_export-false}; then
+	      func_verbose "generating symbol list for \`$libname.la'"
+	      export_symbols="$output_objdir/$libname.exp"
+	      $opt_dry_run || $RM $export_symbols
+	      libobjs=$output
+	      # Append the command to create the export file.
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+	      if test -n "$last_robj"; then
+		eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+	      fi
+	    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..."
+	    test -n "$save_libobjs" &&
+	      func_verbose "creating a temporary reloadable object file: $output"
 
-	  if test -z "$gentop"; then
-	    gentop="$output_objdir/${outputname}x"
-	    generated="$generated $gentop"
+	    # Loop through the commands generated above and execute them.
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $concat_cmds; do
+	      IFS="$save_ifs"
+	      $opt_silent || {
+		  func_quote_for_expand "$cmd"
+		  eval "func_echo $func_quote_for_expand_result"
+	      }
+	      $opt_dry_run || eval "$cmd" || {
+		lt_exit=$?
+
+		# Restore the uninstalled library and exit
+		if test "$mode" = relink; then
+		  ( cd "$output_objdir" && \
+		    $RM "${realname}T" && \
+		    $MV "${realname}U" "$realname" )
+		fi
 
-	    $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
+		exit $lt_exit
+	      }
+	    done
+	    IFS="$save_ifs"
+
+	    if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
 	    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
+          if ${skipped_export-false}; then
+	    if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	      tmp_export_symbols="$export_symbols"
+	      test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+	      $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+	    fi
 
-	eval cmds=\"$old_archive_cmds\"
+	    if test -n "$orig_export_symbols"; then
+	      # The given exports_symbols file has to be filtered, so filter it.
+	      func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+	      # FIXME: $output_objdir/$libname.filter potentially contains lots of
+	      # 's' commands which not all seds can handle. GNU sed should be fine
+	      # though. Also, the filter scales superlinearly with the number of
+	      # global variables. join(1) would be nice here, but unfortunately
+	      # isn't a blessed tool.
+	      $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+	      delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+	      export_symbols=$output_objdir/$libname.def
+	      $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+	    fi
+	  fi
 
-	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
+	  libobjs=$output
+	  # Restore the value of output.
+	  output=$save_output
 
-	  # 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
-	      :
+	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	    test "X$libobjs" = "X " && libobjs=
+	  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
-	      # 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=
+	      cmds=$module_cmds
 	    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\"
+	    if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	      cmds=$archive_expsym_cmds
+	    else
+	      cmds=$archive_cmds
+	    fi
 	  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
+	if test -n "$delfiles"; then
+	  # Append the command to remove temporary files to $cmds.
+	  eval cmds=\"\$cmds~\$RM $delfiles\"
+	fi
 
-    # Now create the libtool archive.
-    case $output in
-    *.la)
-      old_library=
-      test "$build_old_libs" = yes && old_library="$libname.$libext"
-      $show "creating $output"
+	# Add any objects from preloaded convenience libraries
+	if test -n "$dlprefiles"; then
+	  gentop="$output_objdir/${outputname}x"
+	  generated="$generated $gentop"
 
-      # 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"
+	  func_extract_archives $gentop $dlprefiles
+	  libobjs="$libobjs $func_extract_archives_result"
+	  test "X$libobjs" = "X " && libobjs=
 	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" | $Xsed -e "$sed_quote_subst"`
-      if test "$hardcode_automatic" = yes ; then
-	relink_command=
-      fi
 
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $opt_silent || {
+	    func_quote_for_expand "$cmd"
+	    eval "func_echo $func_quote_for_expand_result"
+	  }
+	  $opt_dry_run || eval "$cmd" || {
+	    lt_exit=$?
 
-      # 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
+	    # Restore the uninstalled library and exit
+	    if test "$mode" = relink; then
+	      ( 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
+	  $opt_dry_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
+	      func_show_eval '${RM}r "$gentop"'
 	    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'
+	  exit $EXIT_SUCCESS
+	fi
 
-# Names of this library.
-library_names='$library_names'
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    func_show_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)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	func_warning "\`-dlopen' is ignored for objects"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+	func_warning "\`-l' and \`-L' are ignored for objects" ;;
+      esac
+
+      test -n "$rpath" && \
+	func_warning "\`-rpath' is ignored for objects"
+
+      test -n "$xrpath" && \
+	func_warning "\`-R' is ignored for objects"
+
+      test -n "$vinfo" && \
+	func_warning "\`-version-info' is ignored for objects"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for objects"
+
+      case $output in
+      *.lo)
+	test -n "$objs$old_deplibs" && \
+	  func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+	libobj=$output
+	func_lo2o "$libobj"
+	obj=$func_lo2o_result
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $opt_dry_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
 
-# The name of the static archive.
-old_library='$old_library'
+      # 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
 
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
+      output="$obj"
+      func_execute_cmds "$reload_cmds" 'exit $?'
 
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  func_show_eval '${RM}r "$gentop"'
+	fi
 
-# Is this an already installed library?
-installed=$installed
+	exit $EXIT_SUCCESS
+      fi
 
-# Should we warn about portability when linking against -modules?
-shouldnotlink=$module
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  func_show_eval '${RM}r "$gentop"'
+	fi
 
-# Files to dlopen/dlpreopen
-dlopen='$dlfiles'
-dlpreopen='$dlprefiles'
+	# Create an invalid libtool object if no PIC, so that we don't
+	# accidentally link it into a program.
+	# $show "echo timestamp > $libobj"
+	# $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+	exit $EXIT_SUCCESS
+      fi
 
-# 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
+      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"
+	func_execute_cmds "$reload_cmds" 'exit $?'
       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
-    ;;
+      if test -n "$gentop"; then
+	func_show_eval '${RM}r "$gentop"'
+      fi
 
-  # libtool install mode
-  install)
-    modename="$modename: install"
+      exit $EXIT_SUCCESS
+      ;;
 
-    # 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\""
-	;;
+    prog)
+      case $host in
+	*cygwin*) func_stripname '' '.exe' "$output"
+	          output=$func_stripname_result.exe;;
       esac
-      install_prog="$arg "
-      arg="$1"
-      shift
-    else
-      install_prog=
-      arg=$nonopt
-    fi
+      test -n "$vinfo" && \
+	func_warning "\`-version-info' is ignored for programs"
 
-    # 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"
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for programs"
 
-    # 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
+      test "$preload" = yes \
+        && test "$dlopen_support" = unknown \
+	&& test "$dlopen_self" = unknown \
+	&& test "$dlopen_self_static" = unknown && \
+	  func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
 
-      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
+      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 / System.ltframework /'`
+	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
 	;;
       esac
 
-      # Aesthetically quote the argument.
-      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	arg="\"$arg\""
+      case $host in
+      *-*-darwin*)
+	# Don't allow lazy linking, it breaks C++ global constructors
+	# But is supposedly fixed on 10.4 or later (yay!).
+	if test "$tagname" = CXX ; then
+	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+	    10.[0123])
+	      compile_command="$compile_command ${wl}-bind_at_load"
+	      finalize_command="$finalize_command ${wl}-bind_at_load"
+	    ;;
+	  esac
+	fi
+	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
+	compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
 	;;
       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) ;;
+      # 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 "*) ;;
 	*)
-	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
-	  $echo "$help" 1>&2
-	  exit $EXIT_FAILURE
+	  case " $compile_deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
 	  ;;
 	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
+      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"
 
-      # 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
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
 
-	library_names=
-	old_library=
-	relink_command=
-	# If there is no directory component, then add one.
-	case $file in
-	*/* | *\\*) . $file ;;
-	*) . ./$file ;;
-	esac
+      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
 
-	# Add the libdir to current_libdirs if it is the destination.
-	if test "X$destdir" = "X$libdir"; then
-	  case "$current_libdirs " in
+      # 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 "*) ;;
-	  *) current_libdirs="$current_libdirs $libdir" ;;
+	  *) perm_rpath="$perm_rpath $libdir" ;;
 	  esac
-	else
-	  # Note the libdir as a future libdir.
-	  case "$future_libdirs " in
+	fi
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+	  testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  ::) dllsearchpath=$libdir;;
+	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  ::) dllsearchpath=$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 "*) ;;
-	  *) future_libdirs="$future_libdirs $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"
 
-	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 "$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
 
-	  if test -n "$inst_prefix_dir"; then
-	    # Stick the inst_prefix_dir data into the link command.
-	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
-	  else
-	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
-	  fi
+      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
 
-	  $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
+      # template prelinking step
+      if test -n "$prelink_cmds"; then
+	func_execute_cmds "$prelink_cmds" 'exit $?'
+      fi
 
-	# See the names of the shared library.
-	set dummy $library_names
-	if test -n "$2"; then
-	  realname="$2"
-	  shift
-	  shift
+      wrappers_required=yes
+      case $host in
+      *cygwin* | *mingw* )
+        if test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      *cegcc)
+        # Disable wrappers for cegcc, we are cross compiling anyway.
+        wrappers_required=no
+        ;;
+      *)
+        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      esac
+      if test "$wrappers_required" = no; then
+	# Replace the output file specification.
+	compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	link_command="$compile_command$compile_rpath"
 
-	  srcname="$realname"
-	  test -n "$relink_command" && srcname="$realname"T
+	# We have no uninstalled library dependencies, so finalize right now.
+	exit_status=0
+	func_show_eval "$link_command" 'exit_status=$?'
 
-	  # 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
+	# Delete the generated files.
+	if test -f "$output_objdir/${outputname}S.${objext}"; then
+	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+	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
+	exit $exit_status
+      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
+      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
 
-	      exit $lt_exit
-	    }
+      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
-	  IFS="$save_ifs"
+	  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
 
-	# 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"
-	;;
+      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.
+	$opt_dry_run || $RM $output
+	# Link the executable and exit
+	func_show_eval "$link_command" 'exit $?'
+	exit $EXIT_SUCCESS
+      fi
 
-      *.lo)
-	# Install (i.e. copy) a libtool object.
+      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"
 
-	# Figure out destination file name, if it wasn't already specified.
-	if test -n "$destname"; then
-	  destfile="$destdir/$destname"
+	func_warning "this platform does not like uninstalled shared libraries"
+	func_warning "\`$output' will be relinked during installation"
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
 	else
-	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-	  destfile="$destdir/$destfile"
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
 	fi
+      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
+      # Replace the output file specification.
+      link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
 
-	# Install the libtool object if requested.
-	if test -n "$destfile"; then
-	  $show "$install_prog $file $destfile"
-	  $run eval "$install_prog $file $destfile" || exit $?
-	fi
+      # Delete the old output files.
+      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
 
-	# 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"`
+      func_show_eval "$link_command" 'exit $?'
 
-	  $show "$install_prog $staticobj $staticdest"
-	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
-	fi
-	exit $EXIT_SUCCESS
-	;;
+      # Now create the wrapper script.
+      func_verbose "creating $output"
 
-      *)
-	# 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
+      # 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}\" || $lt_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
+	    func_quote_for_eval "$var_value"
+	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+	  fi
+	done
+	relink_command="(cd `pwd`; $relink_command)"
+	relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      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
-	    ;;
+      # 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
 
-	# Do a test to see if this is really a libtool program.
+      # Only actually do things if not in dry run mode.
+      $opt_dry_run || {
+	# win32 will think the script is a binary if it has
+	# a .exe suffix, so we strip it off here.
+	case $output in
+	  *.exe) func_stripname '' '.exe' "$output"
+	         output=$func_stripname_result ;;
+	esac
+	# test for cygwin because mv fails w/o .exe extensions
 	case $host in
-	*cygwin*|*mingw*)
-	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
-	    ;;
-	*)
-	    wrapper=$file
-	    ;;
+	  *cygwin*)
+	    exeext=.exe
+	    func_stripname '' '.exe' "$outputname"
+	    outputname=$func_stripname_result ;;
+	  *) exeext= ;;
 	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
+	case $host in
+	  *cygwin* | *mingw* )
+	    func_dirname_and_basename "$output" "" "."
+	    output_name=$func_basename_result
+	    output_path=$func_dirname_result
+	    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
+
+	    func_emit_cwrapperexe_src > $cwrappersource
+
+	    # The wrapper executable is built using the $host compiler,
+	    # because it contains $host paths and files. If cross-
+	    # compiling, it, like the target executable, must be
+	    # executed on the $host or under an emulation environment.
+	    $opt_dry_run || {
+	      $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+	      $STRIP $cwrapper
+	    }
 
-	  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" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
-
-	      $show "$relink_command"
-	      if $run eval "$relink_command"; then :
+	    # Now, create the wrapper script for func_source use:
+	    func_ltwrapper_scriptname $cwrapper
+	    $RM $func_ltwrapper_scriptname_result
+	    trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+	    $opt_dry_run || {
+	      # note: this script will not be executed, so do not chmod.
+	      if test "x$build" = "x$host" ; then
+		$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
 	      else
-		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-		${rm}r "$tmpdir"
-		continue
+		func_emit_wrapper no > $func_ltwrapper_scriptname_result
 	      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
+	    }
+	  ;;
+	  * )
+	    $RM $output
+	    trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
 
-	# 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
+	    func_emit_wrapper no > $output
+	    chmod +x $output
 	  ;;
 	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"
+      }
+      exit $EXIT_SUCCESS
+      ;;
+    esac
 
-      $show "$install_prog $file $oldlib"
-      $run eval "$install_prog \$file \$oldlib" || exit $?
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
 
-      if test -n "$stripme" && test -n "$old_striplib"; then
-	$show "$old_striplib $oldlib"
-	$run eval "$old_striplib $oldlib" || exit $?
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save $symfileobj"
+	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"
+	  if test "$preload" = yes && test -f "$symfileobj"; then
+	    oldobjs="$oldobjs $symfileobj"
+	  fi
+	fi
+	addlibs="$old_convenience"
       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 "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	generated="$generated $gentop"
 
-    if test -n "$future_libdirs"; then
-      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
-    fi
+	func_extract_archives $gentop $addlibs
+	oldobjs="$oldobjs $func_extract_archives_result"
+      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
-    ;;
+      # 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
 
-  # libtool finish mode
-  finish)
-    modename="$modename: finish"
-    libdirs="$nonopt"
-    admincmds=
+	# Add any objects from preloaded convenience libraries
+	if test -n "$dlprefiles"; then
+	  gentop="$output_objdir/${outputname}x"
+	  generated="$generated $gentop"
 
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for dir
-      do
-	libdirs="$libdirs $dir"
-      done
+	  func_extract_archives $gentop $dlprefiles
+	  oldobjs="$oldobjs $func_extract_archives_result"
+	fi
 
-      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"
+	# 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
+	      func_basename "$obj"
+	      $ECHO "$func_basename_result"
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	  :
+	else
+	  $ECHO "copying selected object files to avoid basename conflicts..."
+	  gentop="$output_objdir/${outputname}x"
+	  generated="$generated $gentop"
+	  func_mkdir_p "$gentop"
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  counter=1
+	  for obj in $save_oldobjs
+	  do
+	    func_basename "$obj"
+	    objbase="$func_basename_result"
+	    case " $oldobjs " in
+	    " ") oldobjs=$obj ;;
+	    *[\ /]"$objbase "*)
+	      while :; do
+		# Make sure we don't pick an alternate name that also
+		# overlaps.
+		newobj=lt$counter-$objbase
+		func_arith $counter + 1
+		counter=$func_arith_result
+		case " $oldobjs " in
+		*[\ /]"$newobj "*) ;;
+		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
+		esac
+	      done
+	      func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+	      oldobjs="$oldobjs $gentop/$newobj"
+	      ;;
+	    *) oldobjs="$oldobjs $obj" ;;
+	    esac
 	  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
+	eval cmds=\"$old_archive_cmds\"
 
-    $echo "X----------------------------------------------------------------------" | $Xsed
-    $echo "Libraries have been installed in:"
-    for libdir in $libdirs; do
-      $echo "   $libdir"
+	func_len " $cmds"
+	len=$func_len_result
+	if test "$len" -lt "$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
+	  func_verbose "using piecewise archive linking..."
+	  save_RANLIB=$RANLIB
+	  RANLIB=:
+	  objlist=
+	  concat_cmds=
+	  save_oldobjs=$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
+	  eval test_cmds=\"$old_archive_cmds\"
+	  func_len " $test_cmds"
+	  len0=$func_len_result
+	  len=$len0
+	  for obj in $save_oldobjs
+	  do
+	    func_len " $obj"
+	    func_arith $len + $func_len_result
+	    len=$func_arith_result
+	    func_append objlist " $obj"
+	    if test "$len" -lt "$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=
+	      len=$len0
+	    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
+      func_execute_cmds "$cmds" 'exit $?'
     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
+    test -n "$generated" && \
+      func_show_eval "${RM}r$generated"
 
-    # 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
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      func_verbose "creating $output"
 
-      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 :
+      # 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}\" || $lt_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
-	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-	  $echo "$help" 1>&2
-	  exit $EXIT_FAILURE
+	  func_quote_for_eval "$var_value"
+	  relink_command="$var=$func_quote_for_eval_result; 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" | $Xsed -e "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+	relink_command=
+      fi
 
-	# Read the libtool library.
-	dlname=
-	library_names=
+      # Only create the output if not a dry run.
+      $opt_dry_run || {
+	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)
+		func_basename "$deplib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$deplib' is not a valid libtool archive"
+		newdependency_libs="$newdependency_libs $libdir/$name"
+		;;
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
+
+	    for lib in $dlfiles; do
+	      case $lib in
+	      *.la)
+	        func_basename "$lib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$lib' is not a valid libtool archive"
+		newdlfiles="$newdlfiles $libdir/$name"
+		;;
+	      *) newdlfiles="$newdlfiles $lib" ;;
+	      esac
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+	      *.la)
+		# Only pass preopened files to the pseudo-archive (for
+		# eventual linking with the app. that links it) if we
+		# didn't already link the preopened objects directly into
+		# the library:
+		func_basename "$lib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$lib' is not a valid libtool archive"
+		newdlprefiles="$newdlprefiles $libdir/$name"
+		;;
+	      esac
+	    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 | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	  esac
+	  $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
 
-	# If there is no directory component, then add one.
-	case $file in
-	*/* | *\\*) . $file ;;
-	*) . ./$file ;;
-	esac
+# The name that we can dlopen(3).
+dlname='$tdlname'
 
-	# 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
+# Names of this library.
+library_names='$library_names'
 
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$dir" = "X$file" && dir=.
+# The name of the static archive.
+old_library='$old_library'
 
-	if test -f "$dir/$objdir/$dlname"; then
-	  dir="$dir/$objdir"
-	else
-	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
-	  exit $EXIT_FAILURE
-	fi
-	;;
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
 
-      *.lo)
-	# Just add the directory containing the .lo file.
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$dir" = "X$file" && dir=.
-	;;
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
 
-      *)
-	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
-	continue
-	;;
-      esac
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
 
-      # Get the absolute pathname.
-      absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir="$absdir"
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
 
-      # 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
+# Is this an already installed library?
+installed=$installed
 
-    # This variable tells wrapper scripts just to set shlibpath_var
-    # rather than running their programs.
-    libtool_execute_magic="$magic"
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
 
-    # 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
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
 
-	  # 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
+# 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
+      }
 
-    if test -z "$run"; then
-      if test -n "$shlibpath_var"; then
-	# Export the shlibpath_var.
-	eval "export $shlibpath_var"
-      fi
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+}
 
-      # Restore saved environment variables
-      if test "${save_LC_ALL+set}" = set; then
-	LC_ALL="$save_LC_ALL"; export LC_ALL
-      fi
-      if test "${save_LANG+set}" = set; then
-	LANG="$save_LANG"; export LANG
-      fi
+{ test "$mode" = link || test "$mode" = relink; } &&
+    func_mode_link ${1+"$@"}
 
-      # 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"
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+    $opt_debug
+    RM="$nonopt"
     files=
     rmforce=
     exit_status=0
@@ -6456,30 +8209,28 @@ relink_command=\"$relink_command\""
     for arg
     do
       case $arg in
-      -f) rm="$rm $arg"; rmforce=yes ;;
-      -*) rm="$rm $arg" ;;
+      -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
+    test -z "$RM" && \
+      func_fatal_help "you must specify an RM program"
 
     rmdirs=
 
     origobjdir="$objdir"
     for file in $files; do
-      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-      if test "X$dir" = "X$file"; then
-	dir=.
+      func_dirname "$file" "" "."
+      dir="$func_dirname_result"
+      if test "X$dir" = X.; then
 	objdir="$origobjdir"
       else
 	objdir="$dir/$origobjdir"
       fi
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      func_basename "$file"
+      name="$func_basename_result"
       test "$mode" = uninstall && objdir="$dir"
 
       # Remember objdir for removal later, being careful to avoid duplicates
@@ -6491,9 +8242,9 @@ relink_command=\"$relink_command\""
       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
+      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
@@ -6507,8 +8258,8 @@ relink_command=\"$relink_command\""
       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
+	if func_lalib_p "$file"; then
+	  func_source $dir/$name
 
 	  # Delete the libtool libraries and symlinks.
 	  for n in $library_names; do
@@ -6523,39 +8274,17 @@ relink_command=\"$relink_command\""
 	    *" $dlname "*) ;;
 	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
 	    esac
-	     test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+	    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"
+	      func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
 	    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"
+	      func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
 	    fi
 	    # FIXME: should reinstall the best remaining shared library.
 	    ;;
@@ -6565,20 +8294,20 @@ relink_command=\"$relink_command\""
 
       *.lo)
 	# Possibly a libtool object, so verify it.
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	if func_lalib_p "$file"; then
 
 	  # Read the .lo file
-	  . $dir/$name
+	  func_source $dir/$name
 
 	  # Add PIC object to the list of files to remove.
-	  if test -n "$pic_object" \
-	     && test "$pic_object" != none; then
+	  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
+	  if test -n "$non_pic_object" &&
+	     test "$non_pic_object" != none; then
 	    rmfiles="$rmfiles $dir/$non_pic_object"
 	  fi
 	fi
@@ -6589,17 +8318,26 @@ relink_command=\"$relink_command\""
 	  noexename=$name
 	  case $file in
 	  *.exe)
-	    file=`$echo $file|${SED} 's,.exe$,,'`
-	    noexename=`$echo $name|${SED} 's,.exe$,,'`
+	    func_stripname '' '.exe' "$file"
+	    file=$func_stripname_result
+	    func_stripname '' '.exe' "$name"
+	    noexename=$func_stripname_result
 	    # $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
+	  if func_ltwrapper_p "$file"; then
+	    if func_ltwrapper_executable_p "$file"; then
+	      func_ltwrapper_scriptname "$file"
+	      relink_command=
+	      func_source $func_ltwrapper_scriptname_result
+	      rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+	    else
+	      relink_command=
+	      func_source $dir/$noexename
+	    fi
 
 	    # note $name still contains .exe if it was in $file originally
 	    # as does the version of $file that was added into $rmfiles
@@ -6614,237 +8352,38 @@ relink_command=\"$relink_command\""
 	fi
 	;;
       esac
-      $show "$rm $rmfiles"
-      $run $rm $rmfiles || exit_status=1
+      func_show_eval "$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
+	func_show_eval "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
+{ test "$mode" = uninstall || test "$mode" = clean; } &&
+    func_mode_uninstall ${1+"$@"}
 
-  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"
+test -z "$mode" && {
+  help="$generic_help"
+  func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+  func_fatal_help "invalid operation mode \`$mode'"
 
 if test -n "$exec_cmd"; then
-  eval exec $exec_cmd
+  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 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.
+exit $exit_status
 
-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
@@ -6858,14 +8397,17 @@ exit $?
 # configuration.  But we'll never go from static-only to shared-only.
 
 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-disable_libs=shared
+build_libtool_libs=no
+build_old_libs=yes
 # ### END LIBTOOL TAG CONFIG: disable-shared
 
 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
-disable_libs=static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
 # ### END LIBTOOL TAG CONFIG: disable-static
 
 # Local Variables:
 # mode:shell-script
 # sh-indentation:2
 # End:
+# vi:sw=2
+
diff --git a/ext/nginx/Configuration.c b/ext/nginx/Configuration.c
index 5f4c26f..049790c 100644
--- a/ext/nginx/Configuration.c
+++ b/ext/nginx/Configuration.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) Igor Sysoev
  * Copyright (C) 2007 Manlio Perillo (manlio.perillo at gmail.com)
- * Copyright (C) 2010, 2011, 2012 Phusion
+ * Copyright (C) 2010-2013 Phusion
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -35,8 +35,8 @@
 #include "ngx_http_passenger_module.h"
 #include "Configuration.h"
 #include "ContentHandler.h"
-#include "../common/Constants.h"
-#include "../common/LoggingAgent/FilterSupport.h"
+#include "common/Constants.h"
+#include "common/agents/LoggingAgent/FilterSupport.h"
 
 
 static ngx_str_t headers_to_hide[] = {
@@ -57,11 +57,6 @@ static ngx_path_init_t  ngx_http_proxy_temp_path = {
 };
 
 
-static int
-ngx_str_equals(ngx_str_t *str, const char *value) {
-    return ngx_memn2cmp(str->data, (u_char *) value, str->len, strlen(value)) == 0;
-}
-
 void *
 passenger_create_main_conf(ngx_conf_t *cf)
 {
@@ -72,7 +67,13 @@ passenger_create_main_conf(ngx_conf_t *cf)
         return NGX_CONF_ERROR;
     }
     
-    conf->log_level     = (ngx_int_t) NGX_CONF_UNSET;
+    conf->ctl = ngx_array_create(cf->pool, 1, sizeof(ngx_keyval_t));
+    if (conf->ctl == NULL) {
+        return NGX_CONF_ERROR;
+    }
+    conf->default_ruby.data = NULL;
+    conf->default_ruby.len = 0;
+    conf->log_level = (ngx_int_t) NGX_CONF_UNSET;
     conf->debug_log_file.data = NULL;
     conf->debug_log_file.len = 0;
     conf->abort_on_startup_error = NGX_CONF_UNSET;
@@ -84,14 +85,10 @@ passenger_create_main_conf(ngx_conf_t *cf)
     conf->default_user.len  = 0;
     conf->default_group.data = NULL;
     conf->default_group.len  = 0;
-    conf->analytics_log_dir.data = NULL;
-    conf->analytics_log_dir.len  = 0;
     conf->analytics_log_user.data = NULL;
     conf->analytics_log_user.len  = 0;
     conf->analytics_log_group.data = NULL;
     conf->analytics_log_group.len  = 0;
-    conf->analytics_log_permissions.data = NULL;
-    conf->analytics_log_permissions.len  = 0;
     conf->union_station_gateway_address.data = NULL;
     conf->union_station_gateway_address.len = 0;
     conf->union_station_gateway_port = (ngx_uint_t) NGX_CONF_UNSET;
@@ -99,8 +96,6 @@ passenger_create_main_conf(ngx_conf_t *cf)
     conf->union_station_gateway_cert.len = 0;
     conf->union_station_proxy_address.data = NULL;
     conf->union_station_proxy_address.len = 0;
-    conf->union_station_proxy_type.data = NULL;
-    conf->union_station_proxy_type.len = 0;
     
     conf->prestart_uris = ngx_array_create(cf->pool, 1, sizeof(ngx_str_t));
     if (conf->prestart_uris == NULL) {
@@ -114,8 +109,6 @@ char *
 passenger_init_main_conf(ngx_conf_t *cf, void *conf_pointer)
 {
     passenger_main_conf_t *conf;
-    u_char                 filename[NGX_MAX_PATH], *last;
-    ngx_str_t              str;
     struct passwd         *user_entry;
     struct group          *group_entry;
     char buf[128];
@@ -123,11 +116,11 @@ passenger_init_main_conf(ngx_conf_t *cf, void *conf_pointer)
     conf = &passenger_main_conf;
     *conf = *((passenger_main_conf_t *) conf_pointer);
     
-    if (conf->ruby.len == 0) {
-        conf->ruby.data = (u_char *) "ruby";
-        conf->ruby.len  = sizeof("ruby") - 1;
+    if (conf->default_ruby.len == 0) {
+        conf->default_ruby.data = (u_char *) DEFAULT_RUBY;
+        conf->default_ruby.len = strlen(DEFAULT_RUBY);
     }
-    
+
     if (conf->log_level == (ngx_int_t) NGX_CONF_UNSET) {
         conf->log_level = DEFAULT_LOG_LEVEL;
     }
@@ -193,28 +186,6 @@ passenger_init_main_conf(ngx_conf_t *cf, void *conf_pointer)
         }
     }
     
-    if (conf->analytics_log_dir.len == 0) {
-        if (geteuid() == 0) {
-            conf->analytics_log_dir.data = (u_char *) "/var/log/passenger-analytics";
-            conf->analytics_log_dir.len  = sizeof("/var/log/passenger-analytics") - 1;
-        } else {
-            user_entry = getpwuid(geteuid());
-            if (user_entry == NULL) {
-                last = ngx_snprintf(filename, sizeof(filename),
-                                    "/tmp/passenger-analytics-logs.user-%L",
-                                    (int64_t) geteuid());
-            } else {
-                last = ngx_snprintf(filename, sizeof(filename),
-                                    "/tmp/passenger-analytics-logs.%s",
-                                    user_entry->pw_name);
-            }
-            str.data = filename;
-            str.len  = last - filename;
-            conf->analytics_log_dir.data = ngx_pstrdup(cf->pool, &str);
-            conf->analytics_log_dir.len  = str.len;
-        }
-    }
-    
     if (conf->analytics_log_user.len == 0) {
         conf->analytics_log_user.len  = sizeof(DEFAULT_ANALYTICS_LOG_USER) - 1;
         conf->analytics_log_user.data = (u_char *) DEFAULT_ANALYTICS_LOG_USER;
@@ -225,11 +196,6 @@ passenger_init_main_conf(ngx_conf_t *cf, void *conf_pointer)
         conf->analytics_log_group.data = (u_char *) DEFAULT_ANALYTICS_LOG_GROUP;
     }
     
-    if (conf->analytics_log_permissions.len == 0) {
-        conf->analytics_log_permissions.len  = sizeof(DEFAULT_ANALYTICS_LOG_PERMISSIONS) - 1;
-        conf->analytics_log_permissions.data = (u_char *) DEFAULT_ANALYTICS_LOG_PERMISSIONS;
-    }
-    
     if (conf->union_station_gateway_address.len == 0) {
         conf->union_station_gateway_address.len = sizeof(DEFAULT_UNION_STATION_GATEWAY_ADDRESS) - 1;
         conf->union_station_gateway_address.data = (u_char *) DEFAULT_UNION_STATION_GATEWAY_ADDRESS;
@@ -247,14 +213,6 @@ passenger_init_main_conf(ngx_conf_t *cf, void *conf_pointer)
         conf->union_station_proxy_address.data = (u_char *) "";
     }
     
-    if (conf->union_station_proxy_type.len == 0) {
-        conf->union_station_proxy_type.data = (u_char *) "";
-        
-    } else if (!ngx_str_equals(&conf->union_station_proxy_type, "http")
-            && !ngx_str_equals(&conf->union_station_proxy_type, "socks5")) {
-        return "union_station_proxy_type may only be 'http' or 'socks5'.";
-    }
-    
     return NGX_CONF_OK;
 }
 
@@ -285,11 +243,14 @@ passenger_create_loc_conf(ngx_conf_t *cf)
      */
 
     conf->enabled = NGX_CONF_UNSET;
-    conf->use_global_queue = NGX_CONF_UNSET;
     conf->friendly_error_pages = NGX_CONF_UNSET;
     conf->union_station_support = NGX_CONF_UNSET;
     conf->debugger = NGX_CONF_UNSET;
     conf->show_version_in_header = NGX_CONF_UNSET;
+    conf->ruby.data = NULL;
+    conf->ruby.len = 0;
+    conf->python.data = NULL;
+    conf->python.len = 0;
     conf->environment.data = NULL;
     conf->environment.len = 0;
     conf->spawn_method.data = NULL;
@@ -302,14 +263,15 @@ passenger_create_loc_conf(ngx_conf_t *cf)
     conf->group.len = 0;
     conf->app_group_name.data = NULL;
     conf->app_group_name.len = 0;
+    conf->app_root.data = NULL;
+    conf->app_root.len = 0;
     conf->app_rights.data = NULL;
     conf->app_rights.len = 0;
     conf->base_uris = NGX_CONF_UNSET_PTR;
     conf->union_station_filters = NGX_CONF_UNSET_PTR;
     conf->min_instances = NGX_CONF_UNSET;
     conf->max_requests = NGX_CONF_UNSET;
-    conf->framework_spawner_idle_time = NGX_CONF_UNSET;
-    conf->app_spawner_idle_time = NGX_CONF_UNSET;
+    conf->max_preloader_idle_time = NGX_CONF_UNSET;
 
     /******************************/
     /******************************/
@@ -321,6 +283,8 @@ passenger_create_loc_conf(ngx_conf_t *cf)
     conf->upstream_config.buffering = NGX_CONF_UNSET;
     conf->upstream_config.ignore_client_abort = NGX_CONF_UNSET;
 
+    conf->upstream_config.local = NGX_CONF_UNSET_PTR;
+
     conf->upstream_config.connect_timeout = NGX_CONF_UNSET_MSEC;
     conf->upstream_config.send_timeout = NGX_CONF_UNSET_MSEC;
     conf->upstream_config.read_timeout = NGX_CONF_UNSET_MSEC;
@@ -341,6 +305,10 @@ passenger_create_loc_conf(ngx_conf_t *cf)
     conf->upstream_config.cache_bypass = NGX_CONF_UNSET_PTR;
     conf->upstream_config.no_cache = NGX_CONF_UNSET_PTR;
     conf->upstream_config.cache_valid = NGX_CONF_UNSET_PTR;
+    #if NGINX_VERSION_NUM >= 1002000
+        conf->upstream_config.cache_lock = NGX_CONF_UNSET;
+        conf->upstream_config.cache_lock_timeout = NGX_CONF_UNSET_MSEC;
+    #endif
 #endif
 
     conf->upstream_config.intercept_errors = NGX_CONF_UNSET;
@@ -398,22 +366,23 @@ passenger_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
     ngx_http_script_copy_code_t  *copy;
 
     ngx_conf_merge_value(conf->enabled, prev->enabled, 0);
-    ngx_conf_merge_value(conf->use_global_queue, prev->use_global_queue, 1);
     ngx_conf_merge_value(conf->friendly_error_pages, prev->friendly_error_pages, 1);
     ngx_conf_merge_value(conf->union_station_support, prev->union_station_support, 0);
     ngx_conf_merge_value(conf->debugger, prev->debugger, 0);
     ngx_conf_merge_value(conf->show_version_in_header, prev->show_version_in_header, 1);
+    ngx_conf_merge_str_value(conf->ruby, prev->ruby, NULL);
+    ngx_conf_merge_str_value(conf->python, prev->python, NULL);
     ngx_conf_merge_str_value(conf->environment, prev->environment, "production");
-    ngx_conf_merge_str_value(conf->spawn_method, prev->spawn_method, "smart-lv2");
+    ngx_conf_merge_str_value(conf->spawn_method, prev->spawn_method, "smart");
     ngx_conf_merge_str_value(conf->union_station_key, prev->union_station_key, NULL);
     ngx_conf_merge_str_value(conf->user, prev->user, "");
     ngx_conf_merge_str_value(conf->group, prev->group, "");
     ngx_conf_merge_str_value(conf->app_group_name, prev->app_group_name, NULL);
+    ngx_conf_merge_str_value(conf->app_root, prev->app_root, NULL);
     ngx_conf_merge_str_value(conf->app_rights, prev->app_rights, NULL);
     ngx_conf_merge_value(conf->min_instances, prev->min_instances, (ngx_int_t) -1);
     ngx_conf_merge_value(conf->max_requests, prev->max_requests, (ngx_int_t) -1);
-    ngx_conf_merge_value(conf->framework_spawner_idle_time, prev->framework_spawner_idle_time, (ngx_int_t) -1);
-    ngx_conf_merge_value(conf->app_spawner_idle_time, prev->app_spawner_idle_time, (ngx_int_t) -1);
+    ngx_conf_merge_value(conf->max_preloader_idle_time, prev->max_preloader_idle_time, (ngx_int_t) -1);
     
     if (prev->base_uris != NGX_CONF_UNSET_PTR) {
         if (conf->base_uris == NGX_CONF_UNSET_PTR) {
@@ -468,30 +437,33 @@ passenger_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
                               prev->upstream_config.store_access, 0600);
 
     ngx_conf_merge_value(conf->upstream_config.buffering,
-                              prev->upstream_config.buffering, 1);
+                         prev->upstream_config.buffering, 0);
 
     ngx_conf_merge_value(conf->upstream_config.ignore_client_abort,
-                              prev->upstream_config.ignore_client_abort, 0);
+                         prev->upstream_config.ignore_client_abort, 0);
+
+    ngx_conf_merge_ptr_value(conf->upstream_config.local,
+                             prev->upstream_config.local, NULL);
 
     ngx_conf_merge_msec_value(conf->upstream_config.connect_timeout,
-                              prev->upstream_config.connect_timeout, 600000);
+                              prev->upstream_config.connect_timeout, 12000000);
 
     ngx_conf_merge_msec_value(conf->upstream_config.send_timeout,
-                              prev->upstream_config.send_timeout, 600000);
+                              prev->upstream_config.send_timeout, 12000000);
 
     ngx_conf_merge_msec_value(conf->upstream_config.read_timeout,
-                              prev->upstream_config.read_timeout, 600000);
+                              prev->upstream_config.read_timeout, 12000000);
 
     ngx_conf_merge_size_value(conf->upstream_config.send_lowat,
                               prev->upstream_config.send_lowat, 0);
 
     ngx_conf_merge_size_value(conf->upstream_config.buffer_size,
                               prev->upstream_config.buffer_size,
-                              (size_t) ngx_pagesize);
+                              16 * 1024);
 
 
     ngx_conf_merge_bufs_value(conf->upstream_config.bufs, prev->upstream_config.bufs,
-                              8, ngx_pagesize);
+                              8, 16 * 1024);
 
     if (conf->upstream_config.bufs.num < 2) {
         ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
@@ -581,6 +553,9 @@ passenger_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
         return NGX_CONF_ERROR;
     }
 
+    ngx_conf_merge_bitmask_value(conf->upstream_config.ignore_headers,
+                                 prev->upstream_config.ignore_headers,
+                                 NGX_CONF_BITMASK_SET);
 
     ngx_conf_merge_bitmask_value(conf->upstream_config.next_upstream,
                               prev->upstream_config.next_upstream,
@@ -628,6 +603,10 @@ passenger_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
                                                 | NGX_HTTP_UPSTREAM_FT_OFF;
     }
 
+    if (conf->upstream_config.cache_use_stale & NGX_HTTP_UPSTREAM_FT_ERROR) {
+        conf->upstream_config.cache_use_stale |= NGX_HTTP_UPSTREAM_FT_NOLIVE;
+    }
+
     if (conf->upstream_config.cache_methods == 0) {
         conf->upstream_config.cache_methods = prev->upstream_config.cache_methods;
     }
@@ -905,6 +884,15 @@ peers:
     return NGX_CONF_OK;
 }
 
+#ifndef PASSENGER_IS_ENTERPRISE
+static char *
+passenger_enterprise_only(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) {
+    return ": this feature is only available in Phusion Passenger Enterprise. "
+        "You are currently running the open source Phusion Passenger Enterprise. "
+        "Please learn more about and/or buy Phusion Passenger Enterprise at https://www.phusionpassenger.com/enterprise ;";
+}
+#endif
+
 static char *
 passenger_enabled(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 {
@@ -923,7 +911,7 @@ passenger_enabled(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
          * loading is done.
          */
         ngx_memzero(&upstream_url, sizeof(ngx_url_t));
-        upstream_url.url = passenger_placeholder_upstream_address;
+        upstream_url.url = pp_placeholder_upstream_address;
         upstream_url.no_resolve = 1;
         passenger_conf->upstream_config.upstream = ngx_http_upstream_add(cf, &upstream_url, 0);
         if (passenger_conf->upstream_config.upstream == NULL) {
@@ -996,6 +984,23 @@ union_station_filter(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 }
 
 static char *
+rails_framework_spawner_idle_time(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
+{
+    ngx_conf_log_error(NGX_LOG_ALERT, cf, 0, "The 'rails_framework_spawner_idle_time' "
+        "directive is deprecated; please set 'passenger_max_preloader_idle_time' instead");
+    return NGX_CONF_OK;
+}
+
+static char *
+passenger_use_global_queue(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
+{
+    ngx_conf_log_error(NGX_LOG_ALERT, cf, 0, "The 'passenger_use_global_queue' "
+        "directive is obsolete and doesn't do anything anymore. Global queuing "
+        "is now always enabled. Please remove this configuration directive.");
+    return NGX_CONF_OK;
+}
+
+static char *
 set_null_terminated_keyval_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 {
     char  *p = conf;
@@ -1043,12 +1048,7 @@ set_null_terminated_keyval_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
 const ngx_command_t passenger_commands[] = {
 
-    { ngx_string("passenger_enabled"),
-      NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
-      passenger_enabled,
-      NGX_HTTP_LOC_CONF_OFFSET,
-      0,
-      NULL },
+    /******** Main config ********/
 
     { ngx_string("passenger_root"),
       NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
@@ -1057,11 +1057,18 @@ const ngx_command_t passenger_commands[] = {
       offsetof(passenger_main_conf_t, root_dir),
       NULL },
 
+    { ngx_string("passenger_ctl"),
+      NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE2,
+      set_null_terminated_keyval_slot,
+      NGX_HTTP_MAIN_CONF_OFFSET,
+      offsetof(passenger_main_conf_t, ctl),
+      NULL },
+
     { ngx_string("passenger_ruby"),
       NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
       ngx_conf_set_str_slot,
       NGX_HTTP_MAIN_CONF_OFFSET,
-      offsetof(passenger_main_conf_t, ruby),
+      offsetof(passenger_main_conf_t, default_ruby),
       NULL },
 
     { ngx_string("passenger_log_level"),
@@ -1078,6 +1085,13 @@ const ngx_command_t passenger_commands[] = {
       offsetof(passenger_main_conf_t, debug_log_file),
       NULL },
 
+    { ngx_string("passenger_temp_dir"),
+      NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
+      ngx_conf_set_str_slot,
+      NGX_HTTP_MAIN_CONF_OFFSET,
+      offsetof(passenger_main_conf_t, temp_dir),
+      NULL },
+
     { ngx_string("passenger_abort_on_startup_error"),
       NGX_HTTP_MAIN_CONF | NGX_CONF_FLAG,
       ngx_conf_set_flag_slot,
@@ -1085,20 +1099,6 @@ const ngx_command_t passenger_commands[] = {
       offsetof(passenger_main_conf_t, abort_on_startup_error),
       NULL },
 
-    { ngx_string("passenger_use_global_queue"),
-      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
-      ngx_conf_set_flag_slot,
-      NGX_HTTP_LOC_CONF_OFFSET,
-      offsetof(passenger_loc_conf_t, use_global_queue),
-      NULL },
-
-    { ngx_string("passenger_friendly_error_pages"),
-      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
-      ngx_conf_set_flag_slot,
-      NGX_HTTP_LOC_CONF_OFFSET,
-      offsetof(passenger_loc_conf_t, friendly_error_pages),
-      NULL },
-
     { ngx_string("passenger_max_pool_size"),
       NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
       ngx_conf_set_num_slot,
@@ -1106,20 +1106,6 @@ const ngx_command_t passenger_commands[] = {
       offsetof(passenger_main_conf_t, max_pool_size),
       NULL },
 
-    { ngx_string("passenger_min_instances"),
-      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
-      ngx_conf_set_num_slot,
-      NGX_HTTP_LOC_CONF_OFFSET,
-      offsetof(passenger_loc_conf_t, min_instances),
-      NULL },
-
-    { ngx_string("passenger_max_requests"),
-      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
-      ngx_conf_set_num_slot,
-      NGX_HTTP_LOC_CONF_OFFSET,
-      offsetof(passenger_loc_conf_t, max_requests),
-      NULL },
-
     { ngx_string("passenger_max_instances_per_app"),
       NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
       ngx_conf_set_num_slot,
@@ -1134,13 +1120,6 @@ const ngx_command_t passenger_commands[] = {
       offsetof(passenger_main_conf_t, pool_idle_time),
       NULL },
 
-    { ngx_string("passenger_base_uri"),
-      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
-      ngx_conf_set_str_array_slot,
-      NGX_HTTP_LOC_CONF_OFFSET,
-      offsetof(passenger_loc_conf_t, base_uris),
-      NULL },
-
     { ngx_string("passenger_user_switching"),
       NGX_HTTP_MAIN_CONF | NGX_CONF_FLAG,
       ngx_conf_set_flag_slot,
@@ -1148,20 +1127,6 @@ const ngx_command_t passenger_commands[] = {
       offsetof(passenger_main_conf_t, user_switching),
       NULL },
 
-    { ngx_string("passenger_user"),
-      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
-      ngx_conf_set_str_slot,
-      NGX_HTTP_LOC_CONF_OFFSET,
-      offsetof(passenger_loc_conf_t, user),
-      NULL },
-
-    { ngx_string("passenger_group"),
-      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
-      ngx_conf_set_str_slot,
-      NGX_HTTP_LOC_CONF_OFFSET,
-      offsetof(passenger_loc_conf_t, group),
-      NULL },
-
     { ngx_string("passenger_default_user"),
       NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
       ngx_conf_set_str_slot,
@@ -1176,34 +1141,6 @@ const ngx_command_t passenger_commands[] = {
       offsetof(passenger_main_conf_t, default_group),
       NULL },
 
-    { ngx_string("passenger_app_group_name"),
-      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
-      ngx_conf_set_str_slot,
-      NGX_HTTP_LOC_CONF_OFFSET,
-      offsetof(passenger_loc_conf_t, app_group_name),
-      NULL },
-
-    { ngx_string("passenger_app_rights"),
-      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
-      ngx_conf_set_str_slot,
-      NGX_HTTP_LOC_CONF_OFFSET,
-      offsetof(passenger_loc_conf_t, app_rights),
-      NULL },
-
-    { ngx_string("union_station_support"),
-      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
-      ngx_conf_set_flag_slot,
-      NGX_HTTP_LOC_CONF_OFFSET,
-      offsetof(passenger_loc_conf_t, union_station_support),
-      NULL },
-
-    { ngx_string("passenger_analytics_log_dir"),
-      NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
-      ngx_conf_set_str_slot,
-      NGX_HTTP_MAIN_CONF_OFFSET,
-      offsetof(passenger_main_conf_t, analytics_log_dir),
-      NULL },
-
     { ngx_string("passenger_analytics_log_user"),
       NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
       ngx_conf_set_str_slot,
@@ -1218,13 +1155,6 @@ const ngx_command_t passenger_commands[] = {
       offsetof(passenger_main_conf_t, analytics_log_group),
       NULL },
 
-    { ngx_string("passenger_analytics_log_permissions"),
-      NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
-      ngx_conf_set_str_slot,
-      NGX_HTTP_MAIN_CONF_OFFSET,
-      offsetof(passenger_main_conf_t, analytics_log_permissions),
-      NULL },
-
     { ngx_string("union_station_gateway_address"),
       NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
       ngx_conf_set_str_slot,
@@ -1253,11 +1183,96 @@ const ngx_command_t passenger_commands[] = {
       offsetof(passenger_main_conf_t, union_station_proxy_address),
       NULL },
 
-    { ngx_string("union_station_proxy_type"),
-      NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
+    /******** Per-location config ********/
+
+    { ngx_string("passenger_enabled"),
+      NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
+      passenger_enabled,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      0,
+      NULL },
+
+    { ngx_string("passenger_ruby"),
+      NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
       ngx_conf_set_str_slot,
-      NGX_HTTP_MAIN_CONF_OFFSET,
-      offsetof(passenger_main_conf_t, union_station_proxy_type),
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(passenger_loc_conf_t, ruby),
+      NULL },
+
+    { ngx_string("passenger_python"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
+      ngx_conf_set_str_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(passenger_loc_conf_t, python),
+      NULL },
+
+    { ngx_string("passenger_friendly_error_pages"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
+      ngx_conf_set_flag_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(passenger_loc_conf_t, friendly_error_pages),
+      NULL },
+
+    { ngx_string("passenger_min_instances"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
+      ngx_conf_set_num_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(passenger_loc_conf_t, min_instances),
+      NULL },
+
+    { ngx_string("passenger_max_requests"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
+      ngx_conf_set_num_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(passenger_loc_conf_t, max_requests),
+      NULL },
+
+    { ngx_string("passenger_base_uri"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
+      ngx_conf_set_str_array_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(passenger_loc_conf_t, base_uris),
+      NULL },
+
+    { ngx_string("passenger_user"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
+      ngx_conf_set_str_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(passenger_loc_conf_t, user),
+      NULL },
+
+    { ngx_string("passenger_group"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
+      ngx_conf_set_str_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(passenger_loc_conf_t, group),
+      NULL },
+
+    { ngx_string("passenger_app_group_name"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
+      ngx_conf_set_str_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(passenger_loc_conf_t, app_group_name),
+      NULL },
+    { ngx_string("passenger_app_root"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
+      ngx_conf_set_str_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(passenger_loc_conf_t, app_root),
+      NULL },
+
+    { ngx_string("passenger_app_rights"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
+      ngx_conf_set_str_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(passenger_loc_conf_t, app_rights),
+      NULL },
+
+    { ngx_string("union_station_support"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
+      ngx_conf_set_flag_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(passenger_loc_conf_t, union_station_support),
       NULL },
 
     { ngx_string("union_station_filter"),
@@ -1288,6 +1303,20 @@ const ngx_command_t passenger_commands[] = {
       offsetof(passenger_main_conf_t, prestart_uris),
       NULL },
 
+    { ngx_string("passenger_max_preloader_idle_time"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
+      ngx_conf_set_num_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(passenger_loc_conf_t, max_preloader_idle_time),
+      NULL },
+
+    { ngx_string("passenger_ignore_headers"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_CONF_1MORE,
+      ngx_conf_set_bitmask_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(passenger_loc_conf_t, upstream_config.ignore_headers),
+      &ngx_http_upstream_ignore_headers_masks },
+
     { ngx_string("passenger_pass_header"),
       NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
       ngx_conf_set_str_array_slot,
@@ -1358,28 +1387,64 @@ const ngx_command_t passenger_commands[] = {
       offsetof(passenger_loc_conf_t, environment),
       NULL },
 
-    { ngx_string("rails_framework_spawner_idle_time"),
+    { ngx_string("rack_env"),
       NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
-      ngx_conf_set_num_slot,
+      ngx_conf_set_str_slot,
       NGX_HTTP_LOC_CONF_OFFSET,
-      offsetof(passenger_loc_conf_t, framework_spawner_idle_time),
+      offsetof(passenger_loc_conf_t, environment),
       NULL },
 
-    { ngx_string("rails_app_spawner_idle_time"),
+    /************************************/
+
+    { ngx_string("passenger_max_instances"),
       NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
-      ngx_conf_set_num_slot,
+      passenger_enterprise_only,
       NGX_HTTP_LOC_CONF_OFFSET,
-      offsetof(passenger_loc_conf_t, app_spawner_idle_time),
+      0,
       NULL },
 
-    { ngx_string("rack_env"),
+    { ngx_string("passenger_max_request_time"),
       NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
-      ngx_conf_set_str_slot,
+      passenger_enterprise_only,
       NGX_HTTP_LOC_CONF_OFFSET,
-      offsetof(passenger_loc_conf_t, environment),
+      0,
+      NULL },
+
+    { ngx_string("passenger_memory_limit"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
+      passenger_enterprise_only,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      0,
+      NULL },
+
+    { ngx_string("passenger_concurrency_model"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
+      passenger_enterprise_only,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      0,
+      NULL },
+
+    { ngx_string("passenger_thread_count"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
+      passenger_enterprise_only,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      0,
+      NULL },
+
+    { ngx_string("passenger_rolling_restarts"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
+      passenger_enterprise_only,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      0,
+      NULL },
+
+    { ngx_string("passenger_resist_deployment_errors"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
+      passenger_enterprise_only,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      0,
       NULL },
 
-    /************************************/
     /************************************/
 
     /******** Backward compatibility options ********/
@@ -1391,6 +1456,27 @@ const ngx_command_t passenger_commands[] = {
       offsetof(passenger_loc_conf_t, spawn_method),
       NULL },
 
+    { ngx_string("rails_framework_spawner_idle_time"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
+      rails_framework_spawner_idle_time,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      0,
+      NULL },
+
+    { ngx_string("rails_app_spawner_idle_time"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
+      ngx_conf_set_num_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(passenger_loc_conf_t, max_preloader_idle_time),
+      NULL },
+
+    { ngx_string("passenger_use_global_queue"),
+      NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
+      passenger_use_global_queue,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      0,
+      NULL },
+
       ngx_null_command
 };
 
diff --git a/ext/nginx/Configuration.h b/ext/nginx/Configuration.h
index cd6acf3..c3573c8 100644
--- a/ext/nginx/Configuration.h
+++ b/ext/nginx/Configuration.h
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) Igor Sysoev
  * Copyright (C) 2007 Manlio Perillo (manlio.perillo at gmail.com)
- * Copyright (C) 2010 Phusion
+ * Copyright (C) 2010-2013 Phusion
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -33,28 +33,28 @@
 
 typedef struct {
     ngx_http_upstream_conf_t upstream_config;
-    ngx_str_t    index;
     ngx_array_t *flushes;
     ngx_array_t *vars_len;
     ngx_array_t *vars;
     ngx_array_t *vars_source;
     
     ngx_flag_t   enabled;
-    ngx_flag_t   use_global_queue;
     ngx_flag_t   friendly_error_pages;
     ngx_flag_t   union_station_support;
     ngx_flag_t   debugger;
     ngx_flag_t   show_version_in_header;
+    ngx_str_t    ruby;
+    ngx_str_t    python;
     ngx_str_t    environment;
     ngx_str_t    user;
     ngx_str_t    group;
     ngx_str_t    spawn_method;
     ngx_str_t    app_group_name;
+    ngx_str_t    app_root;
     ngx_str_t    app_rights;
     ngx_int_t    min_instances;
     ngx_int_t    max_requests;
-    ngx_int_t    framework_spawner_idle_time;
-    ngx_int_t    app_spawner_idle_time;
+    ngx_int_t    max_preloader_idle_time;
     ngx_str_t    union_station_key;
     ngx_array_t *base_uris;
     ngx_array_t *union_station_filters;
@@ -68,9 +68,11 @@ typedef struct {
 
 typedef struct {
     ngx_str_t    root_dir;
-    ngx_str_t    ruby;
+    ngx_array_t *ctl;
+    ngx_str_t    default_ruby;
     ngx_int_t    log_level;
     ngx_str_t    debug_log_file;
+    ngx_str_t    temp_dir;
     ngx_flag_t   abort_on_startup_error;
     ngx_uint_t   max_pool_size;
     ngx_uint_t   max_instances_per_app;
@@ -78,15 +80,12 @@ typedef struct {
     ngx_flag_t   user_switching;
     ngx_str_t    default_user;
     ngx_str_t    default_group;
-    ngx_str_t    analytics_log_dir;
     ngx_str_t    analytics_log_user;
     ngx_str_t    analytics_log_group;
-    ngx_str_t    analytics_log_permissions;
     ngx_str_t    union_station_gateway_address;
     ngx_uint_t   union_station_gateway_port;
     ngx_str_t    union_station_gateway_cert;
     ngx_str_t    union_station_proxy_address;
-    ngx_str_t    union_station_proxy_type;
     ngx_array_t *prestart_uris;
 } passenger_main_conf_t;
 
diff --git a/ext/nginx/ContentHandler.c b/ext/nginx/ContentHandler.c
index 6a3baae..dbdbce1 100644
--- a/ext/nginx/ContentHandler.c
+++ b/ext/nginx/ContentHandler.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) Igor Sysoev
  * Copyright (C) 2007 Manlio Perillo (manlio.perillo at gmail.com)
- * Copyright (C) 2010, 2011, 2012 Phusion
+ * Copyright (C) 2010-2013 Phusion
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,11 +26,12 @@
  */
 
 #include <nginx.h>
+#include <ngx_http.h>
 #include "ngx_http_passenger_module.h"
 #include "ContentHandler.h"
 #include "StaticContentHandler.h"
 #include "Configuration.h"
-#include "../common/Constants.h"
+#include "common/Constants.h"
 
 
 #define NGX_HTTP_SCGI_PARSE_NO_HEADER  20
@@ -52,10 +53,11 @@ static void abort_request(ngx_http_request_t *r);
 static void finalize_request(ngx_http_request_t *r, ngx_int_t rc);
 
 
-static void
+static unsigned int
 uint_to_str(ngx_uint_t i, u_char *str, ngx_uint_t size) {
-    ngx_memzero(str, size);
-    ngx_snprintf(str, size, "%ui", i);
+    unsigned int len = ngx_snprintf(str, size - 1, "%ui", i) - str;
+    str[len] = '\0';
+    return len;
 }
 
 static FileType
@@ -63,10 +65,10 @@ get_file_type(const u_char *filename, unsigned int throttle_rate) {
     struct stat buf;
     int ret;
     
-    ret = cached_file_stat_perform(passenger_stat_cache,
-                                   (const char *) filename,
-                                   &buf,
-                                   throttle_rate);
+    ret = pp_cached_file_stat_perform(pp_stat_cache,
+                                      (const char *) filename,
+                                      &buf,
+                                      throttle_rate);
     if (ret == 0) {
         if (S_ISREG(buf.st_mode)) {
             return FT_FILE;
@@ -85,34 +87,6 @@ file_exists(const u_char *filename, unsigned int throttle_rate) {
     return get_file_type(filename, throttle_rate) == FT_FILE;
 }
 
-static passenger_app_type_t
-detect_application_type(const ngx_str_t *public_dir) {
-    u_char filename[NGX_MAX_PATH];
-    
-    ngx_memzero(filename, sizeof(filename));
-    ngx_snprintf(filename, sizeof(filename), "%s/%s",
-                 public_dir->data, "../config.ru");
-    if (file_exists(filename, 1)) {
-        return AP_RACK;
-    }
-    
-    ngx_memzero(filename, sizeof(filename));
-    ngx_snprintf(filename, sizeof(filename), "%s/%s",
-                 public_dir->data, "../config/environment.rb");
-    if (file_exists(filename, 1)) {
-        return AP_RAILS;
-    }
-        
-    ngx_memzero(filename, sizeof(filename));
-    ngx_snprintf(filename, sizeof(filename), "%s/%s",
-                 public_dir->data, "../passenger_wsgi.py");
-    if (file_exists(filename, 1)) {
-        return AP_WSGI;
-    }
-    
-    return AP_NONE;
-}
-
 /**
  * Maps the URI for the given request to a page cache file, if possible.
  *
@@ -196,11 +170,11 @@ find_base_uri(ngx_http_request_t *r, const passenger_loc_conf_t *loc,
         return 0;
     } else {
         base_uris = (ngx_str_t *) loc->base_uris->elts;
+        uri       = &r->uri;
         for (i = 0; i < loc->base_uris->nelts; i++) {
             base_uri = &base_uris[i];
-            uri      = &r->uri;
             
-            if (uri->len == 1 && uri->data[0] == '/') {
+            if (base_uri->len == 1 && base_uri->data[0] == '/') {
                 /* Ignore 'passenger_base_uri /' options. Users usually
                  * specify this out of ignorance.
                  */
@@ -212,7 +186,7 @@ find_base_uri(ngx_http_request_t *r, const passenger_loc_conf_t *loc,
              || (    uri->len >  base_uri->len
                   && ngx_strncmp(uri->data, base_uri->data, base_uri->len) == 0
                   && uri->data[base_uri->len] == (u_char) '/' )) {
-                *found_base_uri = base_uris[i];
+                *found_base_uri = *base_uri;
                 return 1;
             }
         }
@@ -236,11 +210,11 @@ set_upstream_server_address(ngx_http_upstream_t *upstream, ngx_http_upstream_con
      * we substitute the placeholder filename with the real helper agent request
      * socket filename.
      */
-    if (address->name.data == passenger_placeholder_upstream_address.data) {
+    if (address->name.data == pp_placeholder_upstream_address.data) {
         sockaddr = (struct sockaddr_un *) address->sockaddr;
         request_socket_filename =
-            agents_starter_get_request_socket_filename(passenger_agents_starter,
-                                                       &request_socket_filename_len);
+            pp_agents_starter_get_request_socket_filename(pp_agents_starter,
+                                                           &request_socket_filename_len);
         
         address->name.data = (u_char *) request_socket_filename;
         address->name.len  = request_socket_filename_len;
@@ -249,6 +223,57 @@ set_upstream_server_address(ngx_http_upstream_t *upstream, ngx_http_upstream_con
     }
 }
 
+/**
+ * If the helper agent socket cannot be connected to then we want Nginx to print
+ * the proper socket filename in the error message. The socket filename is stored
+ * in one of the upstream peer data structures. This name is initialized during
+ * the first ngx_http_read_client_request_body() call so there's no way to fix the
+ * name before the first request, which is why we do it after the fact.
+ */
+static void
+fix_peer_address(ngx_http_request_t *r) {
+    ngx_http_upstream_rr_peer_data_t *rrp;
+    ngx_http_upstream_rr_peers_t     *peers;
+    ngx_http_upstream_rr_peer_t      *peer;
+    unsigned int                      peer_index;
+    const char                       *request_socket_filename;
+    unsigned int                      request_socket_filename_len;
+
+    if (r->upstream->peer.get != ngx_http_upstream_get_round_robin_peer) {
+        /* This function only supports the round-robin upstream method. */
+        return;
+    }
+
+    rrp        = r->upstream->peer.data;
+    peers      = rrp->peers;
+    request_socket_filename =
+        pp_agents_starter_get_request_socket_filename(pp_agents_starter,
+                                                       &request_socket_filename_len);
+
+    while (peers != NULL) {
+        if (peers->name) {
+            if (peers->name->data == (u_char *) request_socket_filename) {
+                /* Peer names already fixed. */
+                return;
+            }
+            peers->name->data = (u_char *) request_socket_filename;
+            peers->name->len  = request_socket_filename_len;
+        }
+        peer_index = 0;
+        while (1) {
+            peer = &peers->peer[peer_index];
+            peer->name.data = (u_char *) request_socket_filename;
+            peer->name.len  = request_socket_filename_len;
+            if (peer->down) {
+                peer_index++;
+            } else {
+                break;
+            }
+        }
+        peers = peers->next;
+    }
+}
+
 
 /* Convenience macros for building the SCGI header in create_request(). */
 
@@ -338,8 +363,8 @@ create_request(ngx_http_request_t *r)
     u_char                         ch;
     const char *                   helper_agent_request_socket_password_data;
     unsigned int                   helper_agent_request_socket_password_len;
-    u_char                         buf[sizeof("4294967296")];
-    size_t                         len, size, key_len, val_len, content_length;
+    u_char                         buf[sizeof("4294967296") + 1];
+    size_t                         len, size, key_len, val_len;
     const u_char                  *app_type_string;
     size_t                         app_type_string_len;
     int                            server_name_len;
@@ -347,8 +372,7 @@ create_request(ngx_http_request_t *r)
     ngx_str_t                     *union_station_filters = NULL;
     u_char                         min_instances_string[12];
     u_char                         max_requests_string[12];
-    u_char                         framework_spawner_idle_time_string[12];
-    u_char                         app_spawner_idle_time_string[12];
+    u_char                         max_preloader_idle_time_string[12];
     u_char                        *end;
     void                          *tmp;
     ngx_uint_t                     i, n;
@@ -373,24 +397,8 @@ create_request(ngx_http_request_t *r)
         return NGX_HTTP_INTERNAL_SERVER_ERROR;
     }
     
-    switch (context->app_type) {
-    case AP_RAILS:
-        app_type_string = (const u_char *) "rails";
-        app_type_string_len = sizeof("rails");
-        break;
-    case AP_RACK:
-        app_type_string = (const u_char *) "rack";
-        app_type_string_len = sizeof("rack");
-        break;
-    case AP_WSGI:
-        app_type_string = (const u_char *) "wsgi";
-        app_type_string_len = sizeof("wsgi");
-        break;
-    default:
-        app_type_string = (const u_char *) "rack";
-        app_type_string_len = sizeof("rack");
-        break;
-    }
+    app_type_string = (const u_char *) pp_get_app_type_name(context->app_type);
+    app_type_string_len = strlen((const char *) app_type_string) + 1; /* include null terminator */
     
     
     /*
@@ -410,15 +418,15 @@ create_request(ngx_http_request_t *r)
      * Determine the request header length.
      **************************************************/
     
-    /* Length of the Content-Length header. */
-    if (r->headers_in.content_length_n < 0) {
-        content_length = 0;
-    } else {
-        content_length = r->headers_in.content_length_n;
+    len = 0;
+
+    /* Length of the Content-Length header. A value of -1 means that the content
+     * length is unspecified, which is the case for e.g. WebSocket requests. */
+    if (r->headers_in.content_length_n >= 0) {
+        len += sizeof("CONTENT_LENGTH") +
+            uint_to_str(r->headers_in.content_length_n, buf, sizeof(buf)) +
+            1; /* +1 for trailing null */
     }
-    uint_to_str(content_length, buf, sizeof(buf));
-    /* +1 for trailing null */
-    len = sizeof("CONTENT_LENGTH") + ngx_strlen(buf) + 1;
     
     /* DOCUMENT_ROOT, SCRIPT_NAME, RAILS_RELATIVE_URL_ROOT, PATH_INFO and REQUEST_URI. */
     len += sizeof("DOCUMENT_ROOT") + context->public_dir.len + 1;
@@ -463,8 +471,6 @@ create_request(ngx_http_request_t *r)
     #endif
     
     /* Lengths of Passenger application pool options. */
-    ANALYZE_BOOLEAN_CONFIG_LENGTH("PASSENGER_USE_GLOBAL_QUEUE",
-                                  slcf, use_global_queue);
     ANALYZE_BOOLEAN_CONFIG_LENGTH("PASSENGER_FRIENDLY_ERROR_PAGES",
                                   slcf, friendly_error_pages);
     ANALYZE_BOOLEAN_CONFIG_LENGTH("UNION_STATION_SUPPORT",
@@ -473,14 +479,21 @@ create_request(ngx_http_request_t *r)
                                   slcf, debugger);
     ANALYZE_BOOLEAN_CONFIG_LENGTH("PASSENGER_SHOW_VERSION_IN_HEADER",
                                   slcf, show_version_in_header);
-    len += sizeof("PASSENGER_ENVIRONMENT") + slcf->environment.len + 1;
+    if (slcf->ruby.data != NULL) {
+        ANALYZE_STR_CONFIG_LENGTH("PASSENGER_RUBY", slcf, ruby);
+    } else {
+        len += sizeof("PASSENGER_RUBY") + passenger_main_conf.default_ruby.len + 1;
+    }
+    ANALYZE_STR_CONFIG_LENGTH("PASSENGER_PYTHON", slcf, python);
+    len += sizeof("PASSENGER_ENV") + slcf->environment.len + 1;
     len += sizeof("PASSENGER_SPAWN_METHOD") + slcf->spawn_method.len + 1;
     len += sizeof("PASSENGER_APP_TYPE") + app_type_string_len;
     ANALYZE_STR_CONFIG_LENGTH("PASSENGER_APP_GROUP_NAME", slcf, app_group_name);
+    ANALYZE_STR_CONFIG_LENGTH("PASSENGER_APP_ROOT", slcf, app_root);
     ANALYZE_STR_CONFIG_LENGTH("PASSENGER_APP_RIGHTS", slcf, app_rights);
     ANALYZE_STR_CONFIG_LENGTH("PASSENGER_USER", slcf, user);
     ANALYZE_STR_CONFIG_LENGTH("PASSENGER_GROUP", slcf, group);
-    ANALYZE_STR_CONFIG_LENGTH("PASSENGER_UNION_STATION_KEY", slcf, union_station_key);
+    ANALYZE_STR_CONFIG_LENGTH("UNION_STATION_KEY", slcf, union_station_key);
     
     end = ngx_snprintf(min_instances_string,
                        sizeof(min_instances_string) - 1,
@@ -498,23 +511,14 @@ create_request(ngx_http_request_t *r)
     len += sizeof("PASSENGER_MAX_REQUESTS") +
            ngx_strlen(max_requests_string) + 1;
     
-    end = ngx_snprintf(framework_spawner_idle_time_string,
-                       sizeof(framework_spawner_idle_time_string) - 1,
-                       "%d",
-                       (slcf->framework_spawner_idle_time == (ngx_int_t) -1) ?
-                           -1 : slcf->framework_spawner_idle_time);
-    *end = '\0';
-    len += sizeof("PASSENGER_FRAMEWORK_SPAWNER_IDLE_TIME") +
-           ngx_strlen(framework_spawner_idle_time_string) + 1;
-    
-    end = ngx_snprintf(app_spawner_idle_time_string,
-                       sizeof(app_spawner_idle_time_string) - 1,
+    end = ngx_snprintf(max_preloader_idle_time_string,
+                       sizeof(max_preloader_idle_time_string) - 1,
                        "%d",
-                       (slcf->app_spawner_idle_time == (ngx_int_t) -1) ?
-                           -1 : slcf->app_spawner_idle_time);
+                       (slcf->max_preloader_idle_time == (ngx_int_t) -1) ?
+                           -1 : slcf->max_preloader_idle_time);
     *end = '\0';
-    len += sizeof("PASSENGER_APP_SPAWNER_IDLE_TIME") +
-           ngx_strlen(app_spawner_idle_time_string) + 1;
+    len += sizeof("PASSENGER_MAX_PRELOADER_IDLE_TIME") +
+           ngx_strlen(max_preloader_idle_time_string) + 1;
     
     if (slcf->union_station_filters != NGX_CONF_UNSET_PTR && slcf->union_station_filters->nelts > 0) {
         len += sizeof("UNION_STATION_FILTERS");
@@ -580,40 +584,13 @@ create_request(ngx_http_request_t *r)
         }
     }
 
-    /* Trailing dummy header.
-     *
-     * If the last header value is an empty string, then the buffer
-     * will end with "\0\0". For example, if 'SSL_CLIENT_CERT'
-     * is the last header and it has an empty value, then the SCGI header
-     * will end with:
-     *
-     *   "SSL_CLIENT_CERT\0\0"
-     *
-     * The data in the buffer will be processed by the AbstractRequestHandler class,
-     * which is implemented in Ruby. But it uses Hash[*data.split("\0")] to
-     * unserialize the data. Unfortunately String#split will not transform
-     * the trailing "\0\0" into an empty string:
-     *
-     *   "SSL_CLIENT_CERT\0\0".split("\0")
-     *   # => desired result: ["SSL_CLIENT_CERT", ""]
-     *   # => actual result:  ["SSL_CLIENT_CERT"]
-     *
-     * When that happens, Hash[..] will raise an ArgumentError because
-     * data.split("\0") does not return an array with a length that is a
-     * multiple of 2.
-     *
-     * So here, we add a dummy header to prevent situations like that from
-     * happening.
-     */
-    len += sizeof("_") + sizeof("_");
-
 
     /**************************************************
      * Build the request header data.
      **************************************************/
     
     helper_agent_request_socket_password_data =
-        agents_starter_get_request_socket_password(passenger_agents_starter,
+        pp_agents_starter_get_request_socket_password(pp_agents_starter,
             &helper_agent_request_socket_password_len);
     size = helper_agent_request_socket_password_len +
         /* netstring length + ":" + trailing "," */
@@ -639,12 +616,13 @@ create_request(ngx_http_request_t *r)
     b->last = ngx_snprintf(b->last, 10, "%ui", len);
     *b->last++ = (u_char) ':';
 
-    /* Build CONTENT_LENGTH header. This must always be sent, even if 0. */
-    b->last = ngx_copy(b->last, "CONTENT_LENGTH",
-                       sizeof("CONTENT_LENGTH"));
+    if (r->headers_in.content_length_n >= 0) {
+        b->last = ngx_copy(b->last, "CONTENT_LENGTH",
+                           sizeof("CONTENT_LENGTH"));
 
-    b->last = ngx_snprintf(b->last, 10, "%ui", content_length);
-    *b->last++ = (u_char) 0;
+        b->last = ngx_snprintf(b->last, 10, "%ui", r->headers_in.content_length_n);
+        *b->last++ = (u_char) 0;
+    }
     
     /* Build DOCUMENT_ROOT, SCRIPT_NAME, RAILS_RELATIVE_URL_ROOT, PATH_INFO and REQUEST_URI. */
     b->last = ngx_copy(b->last, "DOCUMENT_ROOT", sizeof("DOCUMENT_ROOT"));
@@ -712,8 +690,6 @@ create_request(ngx_http_request_t *r)
     
 
     /* Build Passenger application pool option headers. */
-    SERIALIZE_BOOLEAN_CONFIG_DATA("PASSENGER_USE_GLOBAL_QUEUE",
-                                  slcf, use_global_queue);
     SERIALIZE_BOOLEAN_CONFIG_DATA("PASSENGER_FRIENDLY_ERROR_PAGES",
                                   slcf, friendly_error_pages);
     SERIALIZE_BOOLEAN_CONFIG_DATA("UNION_STATION_SUPPORT",
@@ -723,8 +699,20 @@ create_request(ngx_http_request_t *r)
     SERIALIZE_BOOLEAN_CONFIG_DATA("PASSENGER_SHOW_VERSION_IN_HEADER",
                                   slcf, show_version_in_header);
     
-    b->last = ngx_copy(b->last, "PASSENGER_ENVIRONMENT",
-                       sizeof("PASSENGER_ENVIRONMENT"));
+    if (slcf->ruby.data != NULL) {
+        SERIALIZE_STR_CONFIG_DATA("PASSENGER_RUBY",
+                                  slcf, ruby);
+    } else {
+        b->last = ngx_copy(b->last, "PASSENGER_RUBY",
+                           sizeof("PASSENGER_RUBY"));
+        b->last = ngx_copy(b->last, passenger_main_conf.default_ruby.data,
+                           passenger_main_conf.default_ruby.len + 1);
+    }
+    SERIALIZE_STR_CONFIG_DATA("PASSENGER_PYTHON",
+                              slcf, python);
+
+    b->last = ngx_copy(b->last, "PASSENGER_ENV",
+                       sizeof("PASSENGER_ENV"));
     b->last = ngx_copy(b->last, slcf->environment.data,
                        slcf->environment.len + 1);
 
@@ -735,13 +723,15 @@ create_request(ngx_http_request_t *r)
 
     SERIALIZE_STR_CONFIG_DATA("PASSENGER_APP_GROUP_NAME",
                               slcf, app_group_name);
+    SERIALIZE_STR_CONFIG_DATA("PASSENGER_APP_ROOT",
+                              slcf, app_root);
     SERIALIZE_STR_CONFIG_DATA("PASSENGER_APP_RIGHTS",
                               slcf, app_rights);
     SERIALIZE_STR_CONFIG_DATA("PASSENGER_USER",
                               slcf, user);
     SERIALIZE_STR_CONFIG_DATA("PASSENGER_GROUP",
                               slcf, group);
-    SERIALIZE_STR_CONFIG_DATA("PASSENGER_UNION_STATION_KEY",
+    SERIALIZE_STR_CONFIG_DATA("UNION_STATION_KEY",
                               slcf, union_station_key);
 
     b->last = ngx_copy(b->last, "PASSENGER_APP_TYPE",
@@ -758,15 +748,10 @@ create_request(ngx_http_request_t *r)
     b->last = ngx_copy(b->last, max_requests_string,
                        ngx_strlen(max_requests_string) + 1);
 
-    b->last = ngx_copy(b->last, "PASSENGER_FRAMEWORK_SPAWNER_IDLE_TIME",
-                       sizeof("PASSENGER_FRAMEWORK_SPAWNER_IDLE_TIME"));
-    b->last = ngx_copy(b->last, framework_spawner_idle_time_string,
-                       ngx_strlen(framework_spawner_idle_time_string) + 1);
-
-    b->last = ngx_copy(b->last, "PASSENGER_APP_SPAWNER_IDLE_TIME",
-                       sizeof("PASSENGER_APP_SPAWNER_IDLE_TIME"));
-    b->last = ngx_copy(b->last, app_spawner_idle_time_string,
-                       ngx_strlen(app_spawner_idle_time_string) + 1);
+    b->last = ngx_copy(b->last, "PASSENGER_MAX_PRELOADER_IDLE_TIME",
+                       sizeof("PASSENGER_MAX_PRELOADER_IDLE_TIME"));
+    b->last = ngx_copy(b->last, max_preloader_idle_time_string,
+                       ngx_strlen(max_preloader_idle_time_string) + 1);
 
     if (slcf->union_station_filters != NGX_CONF_UNSET_PTR && slcf->union_station_filters->nelts > 0) {
         b->last = ngx_copy(b->last, "UNION_STATION_FILTERS",
@@ -856,10 +841,6 @@ create_request(ngx_http_request_t *r)
          }
     }
     
-    /* Trailing dummy header. See earlier comment for explanation. */
-    b->last = ngx_copy(b->last, "_\0_", sizeof("_\0_"));
-
-
     *b->last++ = (u_char) ',';
 
     if (slcf->upstream_config.pass_request_body) {
@@ -916,6 +897,7 @@ reinit_request(ngx_http_request_t *r)
     context->status_end = NULL;
 
     r->upstream->process_header = process_status_line;
+    r->state = 0;
 
     return NGX_OK;
 }
@@ -1191,17 +1173,20 @@ done:
 static ngx_int_t
 process_header(ngx_http_request_t *r)
 {
-    ngx_int_t                       rc;
-    ngx_uint_t                      i;
+    ngx_str_t                      *status_line;
+    ngx_int_t                       rc, status;
     ngx_table_elt_t                *h;
+    ngx_http_upstream_t            *u;
     ngx_http_upstream_header_t     *hh;
     ngx_http_upstream_main_conf_t  *umcf;
+    ngx_http_core_loc_conf_t       *clcf;
     passenger_loc_conf_t           *slcf;
 
     umcf = ngx_http_get_module_main_conf(r, ngx_http_upstream_module);
+    clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
     slcf = ngx_http_get_module_loc_conf(r, ngx_http_passenger_module);
 
-    for ( ;;  ) {
+    for ( ;; ) {
 
         rc = ngx_http_parse_header_line(r, &r->upstream->buffer, 1);
 
@@ -1211,7 +1196,7 @@ process_header(ngx_http_request_t *r)
 
             h = ngx_list_push(&r->upstream->headers_in.headers);
             if (h == NULL) {
-                return NGX_HTTP_INTERNAL_SERVER_ERROR;
+                return NGX_ERROR;
             }
 
             h->hash = r->header_hash;
@@ -1219,10 +1204,11 @@ process_header(ngx_http_request_t *r)
             h->key.len = r->header_name_end - r->header_name_start;
             h->value.len = r->header_end - r->header_start;
 
-            h->key.data = ngx_palloc(r->pool,
-                               h->key.len + 1 + h->value.len + 1 + h->key.len);
+            h->key.data = ngx_pnalloc(r->pool,
+                                      h->key.len + 1 + h->value.len + 1
+                                      + h->key.len);
             if (h->key.data == NULL) {
-                return NGX_HTTP_INTERNAL_SERVER_ERROR;
+                return NGX_ERROR;
             }
 
             h->value.data = h->key.data + h->key.len + 1;
@@ -1237,21 +1223,18 @@ process_header(ngx_http_request_t *r)
                 ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len);
 
             } else {
-                for (i = 0; i < h->key.len; i++) {
-                    h->lowcase_key[i] = ngx_tolower(h->key.data[i]);
-                }
+                ngx_strlow(h->lowcase_key, h->key.data, h->key.len);
             }
 
             hh = ngx_hash_find(&umcf->headers_in_hash, h->hash,
                                h->lowcase_key, h->key.len);
 
             if (hh && hh->handler(r, h, hh->offset) != NGX_OK) {
-                return NGX_HTTP_INTERNAL_SERVER_ERROR;
+                return NGX_ERROR;
             }
 
             ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                           "http scgi header: \"%V: %V\"",
-                           &h->key, &h->value);
+                           "http scgi header: \"%V: %V\"", &h->key, &h->value);
 
             continue;
         }
@@ -1280,9 +1263,17 @@ process_header(ngx_http_request_t *r)
                 h->key.len = sizeof("Server") - 1;
                 h->key.data = (u_char *) "Server";
                 if( slcf->show_version_in_header == 0 ) {
-                    h->value.data = (u_char *) (NGINX_VER " + Phusion Passenger (mod_rails/mod_rack)");
+                    if (clcf->server_tokens) {
+                        h->value.data = (u_char *) (NGINX_VER " + Phusion Passenger");
+                    } else {
+                        h->value.data = (u_char *) ("nginx + Phusion Passenger");
+                    }
                 } else {
-                    h->value.data = (u_char *) (NGINX_VER " + Phusion Passenger " PASSENGER_VERSION " (mod_rails/mod_rack)");
+                    if (clcf->server_tokens) {
+                        h->value.data = (u_char *) (NGINX_VER " + Phusion Passenger " PASSENGER_VERSION);
+                    } else {
+                        h->value.data = (u_char *) ("nginx + Phusion Passenger " PASSENGER_VERSION);
+                    }
                 }
                 h->value.len = ngx_strlen(h->value.data);
                 h->lowcase_key = (u_char *) "server";
@@ -1303,6 +1294,53 @@ process_header(ngx_http_request_t *r)
                 h->lowcase_key = (u_char *) "date";
             }
 
+            /* Process "Status" header. */
+
+            u = r->upstream;
+
+            if (u->headers_in.status_n) {
+                goto done;
+            }
+
+            if (u->headers_in.status) {
+                status_line = &u->headers_in.status->value;
+
+                status = ngx_atoi(status_line->data, 3);
+                if (status == NGX_ERROR) {
+                    ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
+                                  "upstream sent invalid status \"%V\"",
+                                  status_line);
+                    return NGX_HTTP_UPSTREAM_INVALID_HEADER;
+                }
+
+                u->headers_in.status_n = status;
+                u->headers_in.status_line = *status_line;
+
+            } else if (u->headers_in.location) {
+                u->headers_in.status_n = 302;
+                ngx_str_set(&u->headers_in.status_line,
+                            "302 Moved Temporarily");
+
+            } else {
+                u->headers_in.status_n = 200;
+                ngx_str_set(&u->headers_in.status_line, "200 OK");
+            }
+
+            if (u->state) {
+                u->state->status = u->headers_in.status_n;
+            }
+
+        done:
+
+            /* Supported since Nginx 1.3.15. */
+            #ifdef NGX_HTTP_SWITCHING_PROTOCOLS
+                if (u->headers_in.status_n == NGX_HTTP_SWITCHING_PROTOCOLS
+                    && r->headers_in.upgrade)
+                {
+                    u->upgrade = 1;
+                }
+            #endif
+
             return NGX_OK;
         }
 
@@ -1395,7 +1433,7 @@ passenger_content_handler(ngx_http_request_t *r)
     
     /* Find the base URI for this web application, if any. */
     if (find_base_uri(r, slcf, &base_uri)) {
-        /* Store the found base URI in context->public_dir. We infer that the 'public'
+        /* Store the found base URI into context->public_dir. We infer that the 'public'
          * directory of the web application is document root + base URI.
          */
         len = root_path.len + base_uri.len + 1;
@@ -1428,8 +1466,17 @@ passenger_content_handler(ngx_http_request_t *r)
         return passenger_static_content_handler(r, &page_cache_file);
     }
     
-    context->app_type = detect_application_type(&context->public_dir);
-    if (context->app_type == AP_NONE) {
+    if (slcf->app_root.data == NULL) {
+        context->app_type = pp_app_type_detector_check_document_root(
+            pp_app_type_detector,
+            (const char *) context->public_dir.data, context->public_dir.len,
+            context->base_uri.len != 0);
+    } else {
+        context->app_type = pp_app_type_detector_check_app_root(
+            pp_app_type_detector,
+            (const char *) slcf->app_root.data, slcf->app_root.len);
+    }
+    if (context->app_type == PAT_NONE) {
         return NGX_DECLINED;
     }
     
@@ -1441,7 +1488,7 @@ passenger_content_handler(ngx_http_request_t *r)
     }
     u = r->upstream;
     
-    u->schema = passenger_schema_string;
+    u->schema = pp_schema_string;
     u->output.tag = (ngx_buf_tag_t) &ngx_http_passenger_module;
     set_upstream_server_address(u, &slcf->upstream_config);
     u->conf = &slcf->upstream_config;
@@ -1454,6 +1501,7 @@ passenger_content_handler(ngx_http_request_t *r)
     u->process_header   = process_status_line;
     u->abort_request    = abort_request;
     u->finalize_request = finalize_request;
+    r->state = 0;
 
     u->buffering = slcf->upstream_config.buffering;
     
@@ -1467,6 +1515,8 @@ passenger_content_handler(ngx_http_request_t *r)
 
     rc = ngx_http_read_client_request_body(r, ngx_http_upstream_init);
 
+    fix_peer_address(r);
+
     if (rc >= NGX_HTTP_SPECIAL_RESPONSE) {
         return rc;
     }
diff --git a/ext/nginx/ContentHandler.h b/ext/nginx/ContentHandler.h
index 5eafa0a..f6167ba 100644
--- a/ext/nginx/ContentHandler.h
+++ b/ext/nginx/ContentHandler.h
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) Igor Sysoev
  * Copyright (C) 2007 Manlio Perillo (manlio.perillo at gmail.com)
- * Copyright (C) 2010 Phusion
+ * Copyright (C) 2010-2013 Phusion
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -30,15 +30,9 @@
 
 #include <ngx_core.h>
 #include <ngx_http.h>
+#include "common/ApplicationPool2/AppTypes.h"
 
 
-typedef enum {
-    AP_RAILS,
-    AP_RACK,
-    AP_WSGI,
-    AP_NONE
-} passenger_app_type_t;
-
 typedef struct {
     /** Proxy state. */
     ngx_uint_t  status;
@@ -46,14 +40,14 @@ typedef struct {
     u_char     *status_start;
     u_char     *status_end;
     
-    /** The backend application's 'public' directory. */
+    /** The application's 'public' directory. */
     ngx_str_t   public_dir;
     
     /** The application's base URI. Points to an empty string if none. */
     ngx_str_t   base_uri;
     
-    /** The backend application's type. */
-    passenger_app_type_t app_type;
+    /** The application's type. */
+    PassengerAppType app_type;
 } passenger_context_t;
 
 
diff --git a/ext/nginx/HelperAgent.cpp b/ext/nginx/HelperAgent.cpp
deleted file mode 100644
index d7ebc32..0000000
--- a/ext/nginx/HelperAgent.cpp
+++ /dev/null
@@ -1,1355 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/un.h>
-#include <cstring>
-#include <cassert>
-#include <cerrno>
-#include <unistd.h>
-#include <limits.h>
-#include <pwd.h>
-#include <grp.h>
-
-#include <set>
-#include <vector>
-#include <string>
-
-#include <boost/thread.hpp>
-#include <boost/shared_ptr.hpp>
-#include "oxt/thread.hpp"
-#include "oxt/system_calls.hpp"
-
-#include "ScgiRequestParser.h"
-
-#include "AgentBase.h"
-#include "HelperAgent/BacktracesServer.h"
-#include "Constants.h"
-#include "ApplicationPool/Pool.h"
-#include "ApplicationPool/Server.h"
-#include "Session.h"
-#include "PoolOptions.h"
-#include "MessageServer.h"
-#include "FileDescriptor.h"
-#include "ResourceLocator.h"
-#include "ServerInstanceDir.h"
-#include "Exceptions.h"
-#include "Utils.h"
-#include "Utils/Timer.h"
-#include <Utils/IOUtils.h>
-#include <Utils/MessageIO.h>
-#include <Utils/Dechunker.h>
-#include <Utils/HttpHeaderBufferer.h>
-#include <Utils/StreamBoyerMooreHorspool.h>
-
-using namespace boost;
-using namespace oxt;
-using namespace Passenger;
-
-#define REQUEST_SOCKET_PASSWORD_SIZE     64
-
-static StreamBMH_Occ statusFinder_occ;
-static StreamBMH_Occ transferEncodingFinder_occ;
-
-struct ClientDisconnectedException { };
-
-class ExitHandler: public MessageServer::Handler {
-private:
-	EventFd &exitEvent;
-	
-public:
-	ExitHandler(EventFd &_exitEvent)
-		: exitEvent(_exitEvent)
-	{ }
-	
-	virtual bool processMessage(MessageServer::CommonClientContext &commonContext,
-	                            MessageServer::ClientContextPtr &handlerSpecificContext,
-	                            const vector<string> &args)
-	{
-		if (args[0] == "exit") {
-			TRACE_POINT();
-			commonContext.requireRights(Account::EXIT);
-			UPDATE_TRACE_POINT();
-			exitEvent.notify();
-			UPDATE_TRACE_POINT();
-			commonContext.channel.write("exit command received", NULL);
-			return true;
-		} else {
-			return false;
-		}
-	}
-};
-
-/**
- * A representation of a Client from the Server's point of view. This class
- * contains the methods used to communicate from a server to a connected
- * client, i.e. it is a client handler.
- * These Client instances will communicate concurrently with the server through
- * threads. Considering the overhead of these threads, i.e. setup and teardown
- * costs and the volatility of client requests, these client instances will be
- * pooled. It is for this reason that the State design pattern has been applied:
- * this class can be considered as being a skeleton implemention whose state
- * --e.g. the client file descriptor-- needs to be provided in order to function
- * properly.
- */
-class Client {
-private:
-	/** Maximum allowed size of SCGI headers. */
-	static const unsigned int MAX_HEADER_SIZE = 1024 * 128;
-	/** The client thread stack size in bytes. */
-	static const int CLIENT_THREAD_STACK_SIZE =
-		// Give a small amount of normal stack space
-		#ifdef __FreeBSD__
-			// localtime() on FreeBSD needs some more stack space.
-			1024 * 96
-		#else
-			1024 * 64
-		#endif
-		// and some more stack space for storing the session header.
-		+ MAX_HEADER_SIZE + 1024;
-	
-	/** The client number for this Client object, assigned by Server. */
-	unsigned int number;
-	
-	/** The application pool to which this Client object belongs to. */
-	ApplicationPool::Ptr pool;
-	
-	/** This client's password. */
-	string password;
-	
-	string defaultUser;
-	string defaultGroup;
-	
-	/** The server socket file descriptor. */
-	int serverSocket;
-	
-	/** The analytics logger to use. */
-	AnalyticsLoggerPtr analyticsLogger;
-	
-	/** This client's thread. */
-	oxt::thread *thr;
-	
-	/** A timer for measuring how long this worker thread has been doing
-	 * nothing (i.e. waiting for a connection).
-	 */
-	Timer inactivityTimer;
-	
-	int currentClient;
-	HttpHeaderBufferer headerBufferer;
-	union {
-		struct StreamBMH ctx;
-		char padding[SBMH_SIZE(sizeof("Status:") - 1)];
-	} statusFinder;
-	union {
-		struct StreamBMH ctx;
-		char padding[SBMH_SIZE(sizeof("Transfer-Encoding:") - 1)];
-	} transferEncodingFinder;
-	
-	/** Given a substring containing the start of the header value,
-	 * extracts the substring that contains a single header value.
-	 *
-	 *   const char *data =
-	 *      "Status: 200 OK\r\n"
-	 *      "Foo: bar\r\n";
-	 *   extractHeaderValue(data + strlen("Status:"), strlen(data) - strlen("Status:"));
-	 *      // "200 OK"
-	 */
-	static StaticString extractHeaderValue(const char *data, size_t size) {
-		const char *start = data;
-		const char *end   = data + size;
-		const char *terminator;
-		
-		while (start < end && *start == ' ') {
-			start++;
-		}
-		
-		terminator = (const char *) memchr(start, '\r', end - start);
-		if (terminator == NULL) {
-			return StaticString();
-		} else {
-			return StaticString(start, terminator - start);
-		}
-	}
-	
-	StaticString extractAndSanitizeHttpStatus(const StaticString &header, char buf[32]) {
-		StaticString status;
-		size_t accepted;
-		
-		sbmh_reset(&statusFinder.ctx);
-		accepted = sbmh_feed(&statusFinder.ctx,
-			&statusFinder_occ,
-			(const unsigned char *) "Status:",
-			sizeof("Status:") - 1,
-			(const unsigned char *) header.data(),
-			header.size());
-		if (statusFinder.ctx.found) {
-			status = extractHeaderValue(header.data() + accepted,
-				header.size() - accepted);
-			if (status.find(' ') == string::npos) {
-				int code = stringToInt(status);
-				switch (code) {
-				case 100:
-					status = "100 Continue";
-					break;
-				case 101:
-					status = "101 Switching Protocols";
-					break;
-				case 102:
-					status = "102 Processing";
-					break;
-				case 200:
-					status = "200 OK";
-					break;
-				case 201:
-					status = "201 Created";
-					break;
-				case 202:
-					status = "202 Accepted";
-					break;
-				case 203:
-					status = "203 Non-Authoritative Information";
-					break;
-				case 204:
-					status = "204 No Content";
-					break;
-				case 205:
-					status = "205 Reset Content";
-					break;
-				case 206:
-					status = "206 Partial Content";
-					break;
-				case 207:
-					status = "207 Multi-Status";
-					break;
-				case 300:
-					status = "300 Multiple Choices";
-					break;
-				case 301:
-					status = "301 Moved Permanently";
-					break;
-				case 302:
-					status = "302 Found";
-					break;
-				case 303:
-					status = "303 See Other";
-					break;
-				case 304:
-					status = "304 Not Modified";
-					break;
-				case 305:
-					status = "305 Use Proxy";
-					break;
-				case 306:
-					status = "306 Switch Proxy";
-					break;
-				case 307:
-					status = "307 Temporary Redirect";
-					break;
-				case 308:
-					// Google Gears: http://code.google.com/p/gears/wiki/ResumableHttpRequestsProposal
-					status = "308 Resume Incomplete";
-					break;
-				case 400:
-					status = "400 Bad Request";
-					break;
-				case 401:
-					status = "401 Unauthorized";
-					break;
-				case 402:
-					status = "402 Payment Required";
-					break;
-				case 403:
-					status = "403 Forbidden";
-					break;
-				case 404:
-					status = "404 Not Found";
-					break;
-				case 405:
-					status = "405 Method Not Allowed";
-					break;
-				case 406:
-					status = "406 Not Acceptable";
-					break;
-				case 407:
-					status = "407 Proxy Authentication Required";
-					break;
-				case 408:
-					status = "408 Request Timeout";
-					break;
-				case 409:
-					status = "409 Conflict";
-					break;
-				case 410:
-					status = "410 Gone";
-					break;
-				case 411:
-					status = "411 Length Required";
-					break;
-				case 412:
-					status = "412 Precondition Failed";
-					break;
-				case 413:
-					status = "413 Request Entity Too Large";
-					break;
-				case 414:
-					status = "414 Request-URI Too Long";
-					break;
-				case 415:
-					status = "415 Unsupported Media Type";
-					break;
-				case 416:
-					status = "416 Requested Range Not Satisfiable";
-					break;
-				case 417:
-					status = "417 Expectation Failed";
-					break;
-				case 418:
-					status = "418 Not A Funny April Fools Joke";
-					break;
-				case 422:
-					status = "422 Unprocessable Entity";
-					break;
-				case 423:
-					status = "423 Locked";
-					break;
-				case 424:
-					status = "424 Unordered Collection";
-					break;
-				case 426:
-					status = "426 Upgrade Required";
-					break;
-				case 449:
-					status = "449 Retry With";
-					break;
-				case 450:
-					status = "450 Blocked";
-					break;
-				case 500:
-					status = "500 Internal Server Error";
-					break;
-				case 501:
-					status = "501 Not Implemented";
-					break;
-				case 502:
-					status = "502 Bad Gateway";
-					break;
-				case 503:
-					status = "503 Service Unavailable";
-					break;
-				case 504:
-					status = "504 Gateway Timeout";
-					break;
-				case 505:
-					status = "505 HTTP Version Not Supported";
-					break;
-				case 506:
-					status = "506 Variant Also Negotiates";
-					break;
-				case 507:
-					status = "507 Insufficient Storage";
-					break;
-				case 509:
-					status = "509 Bandwidth Limit Exceeded";
-					break;
-				case 510:
-					status = "510 Not Extended";
-					break;
-				default:
-					snprintf(buf, 32,
-						"%d Unknown Status Code",
-						code);
-					buf[31] = '\0';
-					status = buf;
-				}
-			}
-		} else {
-			status = "200 OK";
-		}
-		
-		return status;
-	}
-	
-	bool detectChunkedTransferEncodingAndRemoveHeader(const StaticString &header) {
-		size_t accepted;
-		
-		sbmh_reset(&transferEncodingFinder.ctx);
-		accepted = sbmh_feed(&transferEncodingFinder.ctx,
-			&transferEncodingFinder_occ,
-			(const unsigned char *) "Transfer-Encoding:",
-			sizeof("Transfer-Encoding:") - 1,
-			(const unsigned char *) header.data(),
-			header.size());
-		if (transferEncodingFinder.ctx.found) {
-			StaticString value = extractHeaderValue(header.data() + accepted,
-				header.size() - accepted);
-			if (value == "chunked") {
-				// Remove Transfer-Encoding header.
-				char *tmp = (char *) (header.data() + accepted - 2);
-				*tmp = '_';
-				return true;
-			} else {
-				return false;
-			}
-		} else {
-			return false;
-		}
-	}
-	
-	/**
-	 * Attempts to accept a connection made by the client.
-	 *
-	 * @return The file descriptor corresponding to the accepted connection.
-	 * @throws SystemException Could not accept new connection.
-	 */
-	FileDescriptor acceptConnection() {
-		TRACE_POINT();
-		struct sockaddr_un addr;
-		socklen_t addrlen = sizeof(addr);
-		int fd = syscalls::accept(serverSocket,
-			(struct sockaddr *) &addr,
-			&addrlen);
-		if (fd == -1) {
-			throw SystemException("Cannot accept new connection", errno);
-		} else {
-			return FileDescriptor(fd);
-		}
-	}
-	
-	/**
-	 * Reads and checks the password of a client message channel identified by the given file descriptor.
-	 * The HelperAgent makes extensive use of Unix Sockets that would normally allow other processes to
-	 * connect to it as well. In our case, we just want to limit this to Nginx and it is for this reason
-	 * that we've secured communication channels between this server and its clients with passwords.
-	 * This method indicates whether or not the password of this client channel matches the one known to
-	 * the server.
-	 * 
-	 * @param fd The file descriptor identifying the client message channel.
-	 * @return True if the password of the client channel indicated by the given file descriptor
-	 *   matches the password known to the server. False will be returned if either the
-	 *   passwords don't match or EOF has been encountered.
-	 */
-	bool readAndCheckPassword(FileDescriptor &fd) {
-		TRACE_POINT();
-		char buf[REQUEST_SOCKET_PASSWORD_SIZE];
-		
-		if (readExact(fd, buf, sizeof(buf)) == sizeof(buf)) {
-			const char *password_data;
-			
-			password_data = const_cast<const string &>(password).c_str();
-			return memcmp(password_data, buf, sizeof(buf)) == 0;
-		} else {
-			return false;
-		}
-	}
-	
-	/**
-	 * Reads and parses the request headers from the given file descriptor with the given SCGI request parser
-	 * and if succesful, assigns the remainder of the request (i.e. non SCGI header data) to the given 
-	 * requestBody.
-	 *
-	 * @param fd The file descriptor to read and parse from.
-	 * @param parser The ScgiRequestParser to use for parsing the SCGI headers.
-	 * @param requestBody The requestBody that was extracted as a result from parsing the SCGI headers.
-	 * @return True if the request was succesfully read and parsed. False if an invalid SCGI header was
-	 *   received by the parser or if the header information was invalid.
-	 * @throws SystemException Request header could not be read.
-	 */
-	bool readAndParseRequestHeaders(FileDescriptor &fd, ScgiRequestParser &parser, string &requestBody) {
-		TRACE_POINT();
-		char buf[1024 * 16];
-		ssize_t size;
-		unsigned int accepted = 0;
-		
-		do {
-			size = syscalls::read(fd, buf, sizeof(buf));
-			if (size == -1) {
-				throw SystemException("Cannot read request header", errno);
-			} else if (size == 0) {
-				break;
-			} else {
-				accepted = parser.feed(buf, size);
-			}
-		} while (parser.acceptingInput());
-
-		if (parser.getState() != ScgiRequestParser::DONE) {
-			if (parser.getState() == ScgiRequestParser::ERROR
-			 && parser.getErrorReason() == ScgiRequestParser::LIMIT_REACHED) {
-				P_ERROR("SCGI header too large.");
-			} else {
-				P_ERROR("Invalid SCGI header received: " <<
-					cEscapeString(parser.getHeaderData()));
-			}
-			return false;
-		} else if (!parser.hasHeader("DOCUMENT_ROOT")) {
-			P_ERROR("DOCUMENT_ROOT header is missing.");
-			return false;
-		} else {
-			requestBody.assign(buf + accepted, size - accepted);
-			return true;
-		}
-	}
-	
-	/**
-	 * Sends a request body to this client. The <tt>partialRequestBody</tt> will first be
-	 * sent to the specified <tt>session</tt>, but if the specified <tt>contentLength</tt>
-	 * is larger than the size of the <tt>partialRequestBody</tt>, then this method will
-	 * attempt to read the remaining bytes from the specified <tt>clientFd</tt> and send it
-	 * to the <tt>session</tt> as well until <tt>contentLength</tt> bytes have been sent in
-	 * total.
-	 *
-	 * @param session The Ruby on Rails application instance.
-	 * @param clientFd The client file descriptor to send the request body to.
-	 * @param partialRequestBody The partial request body to send to this client.
-	 * @param contentLength The content length of the request body in bytes.
-	 * @throws SystemException Request body could not be read from the specified
-	 *   <tt>clientFd</tt>.
-	 */
-	void sendRequestBody(SessionPtr &session,
-	                     FileDescriptor &clientFd,
-	                     const string &partialRequestBody,
-	                     unsigned long contentLength) {
-		TRACE_POINT();
-		char buf[1024 * 16];
-		ssize_t size;
-		size_t bytesToRead;
-		unsigned long bytesForwarded = 0;
-		
-		if (partialRequestBody.size() > 0) {
-			UPDATE_TRACE_POINT();
-			session->sendBodyBlock(partialRequestBody.c_str(),
-				partialRequestBody.size());
-			bytesForwarded = partialRequestBody.size();
-		}
-		
-		bool done = bytesForwarded == contentLength;
-		while (!done) {
-			UPDATE_TRACE_POINT();
-			
-			bytesToRead = contentLength - bytesForwarded;
-			if (bytesToRead > sizeof(buf)) {
-				bytesToRead = sizeof(buf);
-			}
-			size = syscalls::read(clientFd, buf, bytesToRead);
-			
-			if (size == 0) {
-				done = true;
-			} else if (size == -1) {
-				throw SystemException("Cannot read request body", errno);
-			} else {
-				UPDATE_TRACE_POINT();
-				session->sendBodyBlock(buf, size);
-				bytesForwarded += size;
-				done = bytesForwarded == contentLength;
-			}
-		}
-	}
-	
-	/**
-	 * Forwards an HTTP response from the given (Rails) <tt>session</tt> to the
-	 * given <tt>clientFd</tt>.
-	 * 
-	 * @param session The Ruby on Rails session to read the response from.
-	 * @param clientFd The client file descriptor to write the response to.
-	 * @throws SystemException Something went wrong while reading the response
-	 *                         from the backend process or while writing to the
-	 *                         response back to the web server.
-	 * @throws ClientDisconnectedException The HTTP client closed the connection
-	 *                                     before we were able to send back the
-	 *                                     full response.
-	 */
-	void forwardResponse(SessionPtr &session, FileDescriptor &clientFd,
-		const AnalyticsLogPtr &log)
-	{
-		TRACE_POINT();
-		int stream = session->getStream();
-		int eof = false;
-		char buf[1024 * 24];
-		size_t accepted;
-		ssize_t size;
-		bool chunked = false;
-		Dechunker dechunker;
-		
-		currentClient = clientFd;
-		
-		/* Read data from the backend process until we
-		 * have at least an entire response header, or
-		 * until some error occurred.
-		 */
-		headerBufferer.reset();
-		while (!eof && headerBufferer.acceptingInput()) {
-			UPDATE_TRACE_POINT();
-			size = syscalls::read(stream, buf, sizeof(buf));
-			if (size == 0) {
-				eof = true;
-			} else if (size == -1) {
-				throw SystemException("Cannot read response from backend process", errno);
-			} else {
-				accepted = headerBufferer.feed(buf, size);
-			}
-		}
-		
-		/* Now process the response header as well as whatever part of the
-		 * response body we've already received.
-		 */
-		if (!headerBufferer.acceptingInput() && !headerBufferer.hasError()) {
-			UPDATE_TRACE_POINT();
-			assert(!eof);
-			StaticString headerData = headerBufferer.getData();
-			StaticString nonHeaderData(buf + accepted, size - accepted);
-			StaticString status;
-			char statusTmp[32];
-			
-			status = extractAndSanitizeHttpStatus(headerData, statusTmp);
-			/* Nginx's proxy_module doesn't support HTTP 1.1 chunked
-			 * transfer encoding so we need to strip that header and
-			 * dechunk the data before passing to Nginx.
-			 */
-			chunked = detectChunkedTransferEncodingAndRemoveHeader(headerData);
-			
-			if (!log->isNull()) {
-				UPDATE_TRACE_POINT();
-				log->message("Status: " + status);
-			}
-			
-			UPDATE_TRACE_POINT();
-			
-			StaticString parts[6];
-			unsigned int nparts = 0;
-			parts[nparts++] = "HTTP/1.1 ";
-			parts[nparts++] = status;
-			if (chunked) {
-				P_TRACE(2, "Chunked response detected");
-				// Disable Nginx response buffering.
-				parts[nparts++] = "\r\nX-Accel-Buffering: no\r\n";
-			} else {
-				parts[nparts++] = "\r\n";
-			}
-			parts[nparts++] = headerData;
-			if (!chunked) {
-				// If the response doesn't have the chunked transfer encoding
-				// then forward the beginning of the response body as-in.
-				// Otherwise we have to filter it through the dechunker.
-				parts[nparts++] = nonHeaderData;
-			}
-			
-			try {
-				gatheredWrite(clientFd, parts, nparts);
-			} catch (const SystemException &e) {
-				if (e.code() == EPIPE) {
-					throw ClientDisconnectedException();
-				} else {
-					throw;
-				}
-			}
-			
-			if (chunked) {
-				dechunker.onData = forwardResponseChunk;
-				dechunker.userData = this;
-				dechunker.feed(nonHeaderData.data(), nonHeaderData.size());
-				if (dechunker.hasError()) {
-					P_ERROR("The backend process's chunked response is not valid (" <<
-						dechunker.getErrorMessage() << ")");
-					return;
-				}
-			}
-			
-		} else if (!headerBufferer.acceptingInput()) {
-			// Error: header too large.
-			assert(!eof);
-			assert(headerBufferer.hasError());
-			P_ERROR("The backend process's HTTP response header is too large. "
-				"For security reasons Phusion Passenger doesn't allow response "
-				"headers larger than 128 KB.");
-			return;
-			
-		} else {
-			// Error: incomplete header.
-			assert(eof);
-			return;
-		}
-		
-		/* Forward remaining response body. */
-		UPDATE_TRACE_POINT();
-		while (!eof) {
-			UPDATE_TRACE_POINT();
-			size = syscalls::read(stream, buf, sizeof(buf));
-			if (size == 0) {
-				eof = true;
-			} else if (size == -1) {
-				throw SystemException("Cannot read response from backend process", errno);
-			} else {
-				UPDATE_TRACE_POINT();
-				if (chunked) {
-					dechunker.feed(buf, size);
-					if (dechunker.hasError()) {
-						P_ERROR("The backend process's chunked response is not valid (" <<
-							dechunker.getErrorMessage() << ")");
-						return;
-					}
-				} else {
-					forwardResponseChunk(buf, size, this);
-				}
-			}
-		}
-		
-		if (chunked && dechunker.acceptingInput()) {
-			P_WARN("The backend process's chunked response lacks a terminating chunk.");
-		}
-	}
-	
-	static void forwardResponseChunk(const char *data, size_t size, void *userData) {
-		Client *self = (Client *) userData;
-		try {
-			writeExact(self->currentClient, data, size);
-		} catch (const SystemException &e) {
-			if (e.code() == EPIPE) {
-				throw ClientDisconnectedException();
-			} else {
-				throw;
-			}
-		}
-	}
-	
-	/**
-	 * Handles a spawn related exception by writing an appropriate HTTP error response (500)
-	 * for the given spawn exception <tt>e</ee> to given file descriptor <tt>fd</tt>'s message
-	 * channel.
-	 *
-	 * @param fd The file descriptor identifying the message channel to write the given
-	 *   spawn exception <tt>e</tt> to.
-	 * @param e The spawn exception to be written to the given <tt>fd</tt>'s message
-	 *   channel.
-	 * @param friendly Whether to show a friendly error page.
-	 */
-	void handleSpawnException(FileDescriptor &fd, const SpawnException &e, bool friendly) {
-		writeExact(fd, "HTTP/1.1 500 Internal Server Error\x0D\x0A");
-		writeExact(fd, "Status: 500 Internal Server Error\x0D\x0A");
-		writeExact(fd, "Connection: close\x0D\x0A");
-		writeExact(fd, "Content-Type: text/html; charset=utf-8\x0D\x0A");
-		
-		if (friendly) {
-			if (e.hasErrorPage()) {
-				writeExact(fd, "Content-Length: " +
-					toString(e.getErrorPage().size()) +
-					"\x0D\x0A");
-				writeExact(fd, "\x0D\x0A");
-				writeExact(fd, e.getErrorPage());
-			} else {
-				writeExact(fd, "Content-Length: " +
-					toString(strlen(e.what())) + "\x0D\x0A");
-				writeExact(fd, "\x0D\x0A");
-				writeExact(fd, e.what());
-			}
-		} else {
-			const char body[] = "<h1>Internal Server Error (500)</h1>";
-			writeExact(fd, "Content-Length: " +
-				toString(strlen(body)) + "\x0D\x0A");
-			writeExact(fd, "\x0D\x0A");
-			writeExact(fd, body);
-		}
-	}
-	
-	/**
-	 * Handles an SCGI request from a client whose identity is derived by the given <tt>clientFd</tt>.
-	 *
-	 * @param clientFd The file descriptor identifying the client to handle the request from.
-	 */
-	void handleRequest(FileDescriptor &clientFd) {
-		TRACE_POINT();
-		ScgiRequestParser parser(MAX_HEADER_SIZE);
-		string partialRequestBody;
-		
-		if (!readAndCheckPassword(clientFd)) {
-			P_ERROR("Client did not send a correct password.");
-			return;
-		}
-		if (!readAndParseRequestHeaders(clientFd, parser, partialRequestBody)) {
-			return;
-		}
-		
-		try {
-			bool useUnionStation = parser.getHeader("UNION_STATION_SUPPORT") == "true";
-			StaticString appGroupName = parser.getHeader("PASSENGER_APP_GROUP_NAME");
-			PoolOptions options;
-			
-			if (parser.getHeader("SCRIPT_NAME").empty()) {
-				options.appRoot = extractDirName(parser.getHeader("DOCUMENT_ROOT"));
-			} else {
-				options.appRoot = extractDirName(resolveSymlink(parser.getHeader("DOCUMENT_ROOT")));
-				options.baseURI = parser.getHeader("SCRIPT_NAME");
-			}
-			if (appGroupName.empty()) {
-				options.appGroupName = options.appRoot;
-			} else {
-				options.appGroupName = appGroupName;
-			}
-			options.useGlobalQueue = parser.getHeader("PASSENGER_USE_GLOBAL_QUEUE") == "true";
-			options.environment    = parser.getHeader("PASSENGER_ENVIRONMENT");
-			options.spawnMethod    = parser.getHeader("PASSENGER_SPAWN_METHOD");
-			options.user           = parser.getHeader("PASSENGER_USER");
-			options.group          = parser.getHeader("PASSENGER_GROUP");
-			options.defaultUser    = defaultUser;
-			options.defaultGroup   = defaultGroup;
-			options.appType        = parser.getHeader("PASSENGER_APP_TYPE");
-			options.rights         = Account::parseRightsString(
-				parser.getHeader("PASSENGER_APP_RIGHTS"),
-				DEFAULT_BACKEND_ACCOUNT_RIGHTS);
-			options.minProcesses   = atol(parser.getHeader("PASSENGER_MIN_INSTANCES"));
-			options.maxRequests    = atol(parser.getHeader("PASSENGER_MAX_REQUESTS"));
-			options.frameworkSpawnerTimeout = atol(parser.getHeader("PASSENGER_FRAMEWORK_SPAWNER_IDLE_TIME"));
-			options.appSpawnerTimeout       = atol(parser.getHeader("PASSENGER_APP_SPAWNER_IDLE_TIME"));
-			options.debugger       = parser.getHeader("PASSENGER_DEBUGGER") == "true";
-			options.showVersionInHeader = parser.getHeader("PASSENGER_SHOW_VERSION_IN_HEADER") == "true";
-			
-			UPDATE_TRACE_POINT();
-			AnalyticsLogPtr log;
-			if (useUnionStation) {
-				log = analyticsLogger->newTransaction(
-					options.getAppGroupName(),
-					"requests",
-					parser.getHeader("PASSENGER_UNION_STATION_KEY"),
-					parser.getHeader("UNION_STATION_FILTERS"));
-				options.analytics = true;
-				options.log = log;
-			} else {
-				log.reset(new AnalyticsLog());
-			}
-			
-			AnalyticsScopeLog requestProcessingScope(log, "request processing");
-			log->message("URI: " + parser.getHeader("REQUEST_URI"));
-			
-			/***********************/
-			/***********************/
-			
-			try {
-				SessionPtr session;
-				
-				{
-					AnalyticsScopeLog scope(log, "get from pool");
-					session = pool->get(options);
-					scope.success();
-					log->message("Application PID: " + toString(session->getPid()) +
-						" (GUPID: " + session->getGupid() + ")");
-				}
-				
-				UPDATE_TRACE_POINT();
-				AnalyticsScopeLog requestProxyingScope(log, "request proxying");
-				
-				char headers[parser.getHeaderData().size() +
-					sizeof("PASSENGER_CONNECT_PASSWORD") +
-					session->getConnectPassword().size() + 1 +
-					sizeof("PASSENGER_GROUP_NAME") +
-					options.getAppGroupName().size() + 1 +
-					sizeof("PASSENGER_TXN_ID") +
-					log->getTxnId().size() + 1];
-				char *end = headers;
-				
-				memcpy(end, parser.getHeaderData().c_str(), parser.getHeaderData().size());
-				end += parser.getHeaderData().size();
-				
-				memcpy(end, "PASSENGER_CONNECT_PASSWORD", sizeof("PASSENGER_CONNECT_PASSWORD"));
-				end += sizeof("PASSENGER_CONNECT_PASSWORD");
-				
-				memcpy(end, session->getConnectPassword().c_str(),
-					session->getConnectPassword().size() + 1);
-				end += session->getConnectPassword().size() + 1;
-				
-				if (!log->isNull()) {
-					memcpy(end, "PASSENGER_GROUP_NAME", sizeof("PASSENGER_GROUP_NAME"));
-					end += sizeof("PASSENGER_GROUP_NAME");
-					
-					memcpy(end, options.getAppGroupName().c_str(),
-						options.getAppGroupName().size() + 1);
-					end += options.getAppGroupName().size() + 1;
-					
-					memcpy(end, "PASSENGER_TXN_ID", sizeof("PASSENGER_TXN_ID"));
-					end += sizeof("PASSENGER_TXN_ID");
-					
-					memcpy(end, log->getTxnId().c_str(),
-						log->getTxnId().size() + 1);
-					end += log->getTxnId().size() + 1;
-				}
-				
-				{
-					AnalyticsScopeLog scope(log, "send request headers");
-					session->sendHeaders(headers, end - headers);
-					scope.success();
-				}
-				{
-					AnalyticsScopeLog scope(log, "send request body");
-					unsigned long contentLength = atol(
-						parser.getHeader("CONTENT_LENGTH").c_str());
-					sendRequestBody(session,
-						clientFd,
-						partialRequestBody,
-						contentLength);
-					session->shutdownWriter();
-					scope.success();
-				}
-				
-				forwardResponse(session, clientFd, log);
-				
-				requestProxyingScope.success();
-			} catch (const SpawnException &e) {
-				handleSpawnException(clientFd, e,
-					parser.getHeader("PASSENGER_FRIENDLY_ERROR_PAGES") == "true");
-			} catch (const ClientDisconnectedException &) {
-				P_WARN("Couldn't forward the HTTP response back to the HTTP client: "
-					"It seems the user clicked on the 'Stop' button in his "
-					"browser.");
-			}
-			
-			requestProcessingScope.success();
-			clientFd.close();
-		} catch (const boost::thread_interrupted &) {
-			throw;
-		} catch (const tracable_exception &e) {
-			P_ERROR("Uncaught exception in PassengerServer client thread:\n"
-				<< "   exception: " << e.what() << "\n"
-				<< "   backtrace:\n" << e.backtrace());
-		} catch (const std::exception &e) {
-			P_ERROR("Uncaught exception in PassengerServer client thread:\n"
-				<< "   exception: " << e.what() << "\n"
-				<< "   backtrace: not available");
-		}
-	}
-	
-	/**
-	 * This client's main thread, responsible for accepting connections made by a client
-	 * to the server and to handle its request.
-	 *
-	 * @see acceptConnection(void)
-	 * @see handleRequest(FileDescriptor)
-	 */
-	void threadMain() {
-		TRACE_POINT();
-		try {
-			while (true) {
-				UPDATE_TRACE_POINT();
-				inactivityTimer.start();
-				FileDescriptor fd(acceptConnection());
-				inactivityTimer.stop();
-				handleRequest(fd);
-			}
-		} catch (const boost::thread_interrupted &) {
-			P_TRACE(2, "Client thread " << this << " interrupted.");
-		} catch (const tracable_exception &e) {
-			P_ERROR("Uncaught exception in PassengerServer client thread:\n"
-				<< "   exception: " << e.what() << "\n"
-				<< "   backtrace:\n" << e.backtrace());
-			abort();
-		}
-	}
-	
-public:
-	/**
-	 * Constructs a client handler for the server with the given arguments and runs
-	 * it in its own thread.
-	 *
-	 * @param number The id assigned by the server to identify this client by.
-	 * @param pool The application pool where this client belongs to.
-	 * @param password The password that is required to connect to this client handler.
-	 *   This value is determined and assigned by the server.
-	 * @param serverSocket The server socket to accept this clients connection from.
-	 */
-	Client(unsigned int number, ApplicationPool::Ptr pool,
-	       const string &password, const string &defaultUser,
-	       const string &defaultGroup, int serverSocket,
-	       const AnalyticsLoggerPtr &logger)
-		: inactivityTimer(false)
-	{
-		this->number = number;
-		this->pool = pool;
-		this->password = password;
-		this->defaultUser = defaultUser;
-		this->defaultGroup = defaultGroup;
-		this->serverSocket = serverSocket;
-		this->analyticsLogger = logger;
-		
-		sbmh_init(&statusFinder.ctx, NULL, NULL, 0);
-		sbmh_init(&transferEncodingFinder.ctx, NULL, NULL, 0);
-		
-		thr = new oxt::thread(
-			boost::bind(&Client::threadMain, this),
-			"Client thread " + toString(number),
-			CLIENT_THREAD_STACK_SIZE
-		);
-	}
-	
-	/**
-	 * Destroys this client and its thread.
-	 */
-	~Client() {
-		TRACE_POINT();
-		this_thread::disable_syscall_interruption dsi;
-		this_thread::disable_interruption di;
-		
-		if (thr->joinable()) {
-			thr->interrupt_and_join();
-		}
-		delete thr;
-	}
-	
-	oxt::thread *getThread() const {
-		return thr;
-	}
-	
-	unsigned long long inactivityTime() const {
-		return inactivityTimer.elapsed();
-	}
-	
-	void resetInactivityTimer() {
-		inactivityTimer.start();
-	}
-};
-
-typedef shared_ptr<Client> ClientPtr;
-
-/**
- * A representation of the Server responsible for handling Client instances.
- *
- * @see Client
- */
-class Server {
-private:
-	static const int MESSAGE_SERVER_THREAD_STACK_SIZE = 64 * 128;
-	
-	FileDescriptor feedbackFd;
-	bool userSwitching;
-	string defaultUser;
-	string defaultGroup;
-	unsigned int numberOfThreads;
-	FileDescriptor requestSocket;
-	string requestSocketPassword;
-	ServerInstanceDir serverInstanceDir;
-	ServerInstanceDir::GenerationPtr generation;
-	set<ClientPtr> clients;
-	AnalyticsLoggerPtr analyticsLogger;
-	ApplicationPool::Ptr pool;
-	AccountsDatabasePtr accountsDatabase;
-	MessageServerPtr messageServer;
-	ResourceLocator resourceLocator;
-	shared_ptr<oxt::thread> prestarterThread;
-	shared_ptr<oxt::thread> messageServerThread;
-	EventFd exitEvent;
-	
-	string getRequestSocketFilename() const {
-		return generation->getPath() + "/request.socket";
-	}
-	
-	/**
-	 * Starts listening for client connections on this server's request socket.
-	 *
-	 * @throws SystemException Something went wrong while trying to create and bind to the Unix socket.
-	 * @throws RuntimeException Something went wrong.
-	 */
-	void startListening() {
-		this_thread::disable_syscall_interruption dsi;
-		requestSocket = createUnixServer(getRequestSocketFilename().c_str());
-		
-		int ret;
-		do {
-			ret = chmod(getRequestSocketFilename().c_str(), S_ISVTX |
-				S_IRUSR | S_IWUSR | S_IXUSR |
-				S_IRGRP | S_IWGRP | S_IXGRP |
-				S_IROTH | S_IWOTH | S_IXOTH);
-		} while (ret == -1 && errno == EINTR);
-	}
-	
-	/**
-	 * Starts the client handler threads that are responsible for handling the communication
-	 * between the client and this Server.
-	 *
-	 * @see Client
-	 */
-	void startClientHandlerThreads() {
-		for (unsigned int i = 0; i < numberOfThreads; i++) {
-			ClientPtr client(new Client(i + 1, pool, requestSocketPassword,
-				defaultUser, defaultGroup, requestSocket,
-				analyticsLogger));
-			clients.insert(client);
-		}
-	}
-	
-	/**
-	 * Lowers this process's privilege to that of <em>username</em> and <em>groupname</em>.
-	 */
-	void lowerPrivilege(const string &username, const string &groupname) {
-		struct passwd *userEntry;
-		struct group  *groupEntry;
-		int            e;
-		
-		userEntry = getpwnam(username.c_str());
-		if (userEntry == NULL) {
-			throw NonExistentUserException(string("Unable to lower Passenger "
-				"HelperAgent's privilege to that of user '") + username +
-				"': user does not exist.");
-		}
-		groupEntry = getgrnam(groupname.c_str());
-		if (groupEntry == NULL) {
-			throw NonExistentGroupException(string("Unable to lower Passenger "
-				"HelperAgent's privilege to that of user '") + username +
-				"': user does not exist.");
-		}
-		
-		if (initgroups(username.c_str(), userEntry->pw_gid) != 0) {
-			e = errno;
-			throw SystemException(string("Unable to lower Passenger HelperAgent's "
-				"privilege to that of user '") + username +
-				"': cannot set supplementary groups for this user", e);
-		}
-		if (setgid(groupEntry->gr_gid) != 0) {
-			e = errno;
-			throw SystemException(string("Unable to lower Passenger HelperAgent's "
-				"privilege to that of user '") + username +
-				"': cannot set group ID", e);
-		}
-		if (setuid(userEntry->pw_uid) != 0) {
-			e = errno;
-			throw SystemException(string("Unable to lower Passenger HelperAgent's "
-				"privilege to that of user '") + username +
-				"': cannot set user ID", e);
-		}
-	}
-	
-	void resetWorkerThreadInactivityTimers() {
-		set<ClientPtr>::iterator it;
-		
-		for (it = clients.begin(); it != clients.end(); it++) {
-			ClientPtr client = *it;
-			client->resetInactivityTimer();
-		}
-	}
-	
-	unsigned long long minWorkerThreadInactivityTime() const {
-		set<ClientPtr>::const_iterator it;
-		unsigned long long result = 0;
-		
-		for (it = clients.begin(); it != clients.end(); it++) {
-			ClientPtr client = *it;
-			unsigned long long inactivityTime = client->inactivityTime();
-			if (inactivityTime < result || it == clients.begin()) {
-				result = inactivityTime;
-			}
-		}
-		return result;
-	}
-	
-public:
-	Server(FileDescriptor feedbackFd, pid_t webServerPid, const string &tempDir,
-		bool userSwitching, const string &defaultUser, const string &defaultGroup,
-		const string &passengerRoot, const string &rubyCommand, unsigned int generationNumber,
-		unsigned int maxPoolSize, unsigned int maxInstancesPerApp, unsigned int poolIdleTime,
-		const VariantMap &options)
-		: serverInstanceDir(webServerPid, tempDir, false),
-		  resourceLocator(passengerRoot)
-	{
-		string messageSocketPassword;
-		string loggingAgentPassword;
-		
-		TRACE_POINT();
-		this->feedbackFd    = feedbackFd;
-		this->userSwitching = userSwitching;
-		this->defaultUser   = defaultUser;
-		this->defaultGroup  = defaultGroup;
-		numberOfThreads     = maxPoolSize * 4;
-		
-		sbmh_init(NULL, &statusFinder_occ,
-			(const unsigned char *) "Status:",
-			strlen("Status:"));
-		sbmh_init(NULL, &transferEncodingFinder_occ,
-			(const unsigned char *) "Transfer-Encoding:",
-			strlen("Transfer-Encoding:"));
-		
-		UPDATE_TRACE_POINT();
-		requestSocketPassword = Base64::decode(options.get("request_socket_password"));
-		messageSocketPassword = Base64::decode(options.get("message_socket_password"));
-		loggingAgentPassword  = options.get("logging_agent_password");
-		generation = serverInstanceDir.getGeneration(generationNumber);
-		startListening();
-		accountsDatabase = AccountsDatabase::createDefault(generation,
-			userSwitching, defaultUser, defaultGroup);
-		accountsDatabase->add("_web_server", messageSocketPassword, false, Account::EXIT);
-		messageServer = ptr(new MessageServer(generation->getPath() + "/socket", accountsDatabase));
-		
-		if (geteuid() == 0 && !userSwitching) {
-			lowerPrivilege(defaultUser, defaultGroup);
-		}
-		
-		UPDATE_TRACE_POINT();
-		analyticsLogger = ptr(new AnalyticsLogger(options.get("logging_agent_address"),
-			"logging", loggingAgentPassword));
-		
-		pool = ptr(new ApplicationPool::Pool(
-			resourceLocator.getSpawnServerFilename(), generation,
-			accountsDatabase, rubyCommand,
-			analyticsLogger,
-			options.getInt("log_level"),
-			options.get("debug_log_file", false)
-		));
-		pool->setMax(maxPoolSize);
-		pool->setMaxPerApp(maxInstancesPerApp);
-		pool->setMaxIdleTime(poolIdleTime);
-		
-		messageServer->addHandler(ptr(new ApplicationPool::Server(pool)));
-		messageServer->addHandler(ptr(new BacktracesServer()));
-		messageServer->addHandler(ptr(new ExitHandler(exitEvent)));
-		
-		UPDATE_TRACE_POINT();
-		writeArrayMessage(feedbackFd,
-			"initialized",
-			getRequestSocketFilename().c_str(),
-			messageServer->getSocketFilename().c_str(),
-			NULL);
-		
-		function<void ()> func = boost::bind(prestartWebApps,
-			resourceLocator,
-			options.get("prestart_urls"));
-		prestarterThread = ptr(new oxt::thread(
-			boost::bind(runAndPrintExceptions, func, true)
-		));
-	}
-	
-	~Server() {
-		TRACE_POINT();
-		this_thread::disable_syscall_interruption dsi;
-		this_thread::disable_interruption di;
-		oxt::thread *threads[clients.size()];
-		set<ClientPtr>::iterator it;
-		unsigned int i = 0;
-		
-		P_DEBUG("Shutting down helper agent...");
-		prestarterThread->interrupt_and_join();
-		if (messageServerThread != NULL) {
-			messageServerThread->interrupt_and_join();
-		}
-		
-		for (it = clients.begin(); it != clients.end(); it++, i++) {
-			ClientPtr client = *it;
-			threads[i] = client->getThread();
-		}
-		oxt::thread::interrupt_and_join_multiple(threads, clients.size());
-		clients.clear();
-		
-		P_TRACE(2, "All threads have been shut down.");
-	}
-	
-	void mainLoop() {
-		TRACE_POINT();
-		
-		startClientHandlerThreads();
-		function<void ()> func = boost::bind(&MessageServer::mainLoop, messageServer.get());
-		messageServerThread = ptr(new oxt::thread(
-			boost::bind(runAndPrintExceptions, func, true),
-			"MessageServer thread", MESSAGE_SERVER_THREAD_STACK_SIZE
-		));
-		
-		/* Wait until the watchdog closes the feedback fd (meaning it
-		 * was killed) or until we receive an exit message.
-		 */
-		this_thread::disable_syscall_interruption dsi;
-		fd_set fds;
-		int largestFd;
-		
-		FD_ZERO(&fds);
-		FD_SET(feedbackFd, &fds);
-		FD_SET(exitEvent.fd(), &fds);
-		largestFd = (feedbackFd > exitEvent.fd()) ? (int) feedbackFd : exitEvent.fd();
-		UPDATE_TRACE_POINT();
-		if (syscalls::select(largestFd + 1, &fds, NULL, NULL, NULL) == -1) {
-			int e = errno;
-			throw SystemException("select() failed", e);
-		}
-		
-		if (FD_ISSET(feedbackFd, &fds)) {
-			/* If the watchdog has been killed then we'll kill all descendant
-			 * processes and exit. There's no point in keeping this helper
-			 * server running because we can't detect when the web server exits,
-			 * and because this helper agent doesn't own the server instance
-			 * directory. As soon as passenger-status is run, the server
-			 * instance directory will be cleaned up, making this helper agent
-			 * inaccessible.
-			 */
-			syscalls::killpg(getpgrp(), SIGKILL);
-			_exit(2); // In case killpg() fails.
-		} else {
-			/* We received an exit command. We want to exit 5 seconds after
-			 * all worker threads have become inactive.
-			 */
-			resetWorkerThreadInactivityTimers();
-			while (minWorkerThreadInactivityTime() < 5000) {
-				syscalls::usleep(250000);
-			}
-		}
-	}
-};
-
-/**
- * Initializes and starts the helper agent that is responsible for handling communication
- * between Nginx and the backend Rails processes.
- *
- * @see Server
- * @see Client
- */
-int
-main(int argc, char *argv[]) {
-	TRACE_POINT();
-	VariantMap options = initializeAgent(argc, argv, "PassengerHelperAgent");
-	pid_t   webServerPid  = options.getPid("web_server_pid");
-	string  tempDir       = options.get("temp_dir");
-	bool    userSwitching = options.getBool("user_switching");
-	string  defaultUser   = options.get("default_user");
-	string  defaultGroup  = options.get("default_group");
-	string  passengerRoot = options.get("passenger_root");
-	string  rubyCommand   = options.get("ruby");
-	unsigned int generationNumber   = options.getInt("generation_number");
-	unsigned int maxPoolSize        = options.getInt("max_pool_size");
-	unsigned int maxInstancesPerApp = options.getInt("max_instances_per_app");
-	unsigned int poolIdleTime       = options.getInt("pool_idle_time");
-	
-	try {
-		UPDATE_TRACE_POINT();
-		Server server(FEEDBACK_FD, webServerPid, tempDir,
-			userSwitching, defaultUser, defaultGroup,
-			passengerRoot, rubyCommand, generationNumber,
-			maxPoolSize, maxInstancesPerApp, poolIdleTime,
-			options);
-		P_DEBUG("Passenger helper agent started on PID " << getpid());
-		
-		UPDATE_TRACE_POINT();
-		server.mainLoop();
-	} catch (const tracable_exception &e) {
-		P_ERROR(e.what() << "\n" << e.backtrace());
-		return 1;
-	} catch (const std::exception &e) {
-		P_ERROR(e.what());
-		return 1;
-	}
-	
-	P_TRACE(2, "Helper agent exited.");
-	return 0;
-}
diff --git a/ext/nginx/ScgiRequestParser.h b/ext/nginx/ScgiRequestParser.h
deleted file mode 100644
index 0ee2d79..0000000
--- a/ext/nginx/ScgiRequestParser.h
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
- *
- *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
- *
- *  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
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- *  THE SOFTWARE.
- */
-
-#include <google/dense_hash_map>
-
-#include <string>
-#include <map>
-#include <cstdlib>
-
-#include "StaticString.h"
-
-namespace Passenger {
-
-using namespace std;
-using namespace google;
-
-/**
- * A parser for SCGI requests. It parses the request header and ignores the
- * body data.
- *
- * You can use it by constructing a parser object, then feeding data to the
- * parser until it has reached a final state.
- *
- * Example:
- * @code
- *    ScgiRequestParser parser;
- *    char buf[1024 * 16];
- *    ssize_t size;
- *    unsigned in bytesAccepted;
- *    
- *    do {
- *        size = read(fd, buf, sizeof(buf));
- *        bytesAccepted = parser.feed(buf, size);
- *    } while (parser.acceptingInput());
- *    // Parser is done when its return value isn't equal to the input size.
- *    
- *    // Check whether a parse error occured.
- *    if (parser.getState() == ScgiRequestParser::ERROR) {
- *        bailOut();
- *    } else {
- *        // All good! Do something with the SCGI header that the parser parsed.
- *        processHeader(parser.getHeaderData());
- *        
- *        // If the last buffer passed to the parser also contains body data,
- *        // then the body data starts at 'buf + bytesAccepted'.
- *        if (bytesAccepted < size) {
- *            processBody(buf + bytesAccepted);
- *        }
- *        while (!end_of_file(fd)) {
- *            ... read(...) ...
- *            processBody(...);
- *        }
- *    }
- * @endcode
- *
- * Parser properties:
- * - A parser object can only process a single SCGI request. You must discard
- *   the existing parser object and create a new one if you want to process
- *   another SCGI request.
- * - This parser checks whether the header netstring is valid. It will enter
- *   the error state if it encounters a parse error.
- * - However, this parser does not perform any validation of the actual header
- *   contents. For example, it doesn't check that CONTENT_LENGTH is the first
- *   header, or that the SCGI header is present.
- */
-class ScgiRequestParser {
-public:
-	enum State {
-		READING_LENGTH_STRING,
-		READING_HEADER_DATA,
-		EXPECTING_COMMA,
-		DONE,
-		ERROR
-	};
-	
-	enum ErrorReason {
-		NONE,
-		
-		/** The length string is too large. */
-		LENGTH_STRING_TOO_LARGE,
-		
-		/** The header is larger than the maxSize value provided to the constructor. */
-		LIMIT_REACHED,
-		
-		/** The length string contains an invalid character. */
-		INVALID_LENGTH_STRING,
-		
-		/** A header terminator character (",") was expected, but some else
-		 * was encountered instead. */
-		HEADER_TERMINATOR_EXPECTED,
-		
-		/** The header data itself contains errors. */
-		INVALID_HEADER_DATA
-	};
-	
-private:
-	typedef dense_hash_map<StaticString, StaticString, StaticString::Hash> HeaderMap;
-	
-	unsigned long maxSize;
-	
-	State state;
-	ErrorReason errorReason;
-	char lengthStringBuffer[sizeof("4294967296")];
-	unsigned int lengthStringBufferSize;
-	unsigned long headerSize;
-	string headerBuffer;
-	HeaderMap headers;
-	
-	static inline bool isDigit(char byte) {
-		return byte >= '0' && byte <= '9';
-	}
-	
-	/**
-	 * Parse the given header data into key-value pairs.
-	 */
-	bool parseHeaderData(const string &data, HeaderMap &output) {
-		bool isName = true; // Whether we're currently expecting a name or a value.
-		const char *startOfString, *current, *end;
-		StaticString key, value;
-		
-		if (data.size() == 0) {
-			return true;
-		}
-		
-		startOfString = data.c_str();
-		end           = data.c_str() + data.size();
-		
-		if (*(end - 1) != '\0') {
-			return false;
-		}
-		
-		for (current = data.c_str(); current != end; current++) {
-			if (isName && *current == '\0') {
-				key = StaticString(startOfString, current - startOfString);
-				if (key.empty()) {
-					return false;
-				}
-				startOfString = current + 1;
-				isName = false;
-			} else if (!isName && *current == '\0') {
-				value = StaticString(startOfString, current - startOfString);
-				startOfString = current + 1;
-				isName = true;
-				
-				output[key] = value;
-				key   = StaticString();
-				value = StaticString();
-			}
-		}
-		
-		return isName;
-	}
-	
-	/**
-	 * Process the given data, which contains header data and possibly
-	 * some body data as well.
-	 */
-	unsigned int readHeaderData(const char *data, unsigned int size) {
-		unsigned int bytesToRead;
-		
-		// Calculate how many bytes of header data is left to be read.
-		// Do not read past the header data.
-		if (size < headerSize - headerBuffer.size()) {
-			bytesToRead = size;
-		} else {
-			bytesToRead = headerSize - headerBuffer.size();
-		}
-		// Append the newly received header data to the header data buffer.
-		headerBuffer.append(data, bytesToRead);
-		
-		if (headerBuffer.size() == headerSize) {
-			// We've received all header data. Now attempt to parse this.
-			if (bytesToRead < size) {
-				if (data[bytesToRead] == ',') {
-					if (parseHeaderData(headerBuffer, headers)) {
-						state = DONE;
-						return bytesToRead + 1;
-					} else {
-						state = ERROR;
-						errorReason = INVALID_HEADER_DATA;
-						return bytesToRead;
-					}
-				} else {
-					state = ERROR;
-					errorReason = HEADER_TERMINATOR_EXPECTED;
-					return bytesToRead;
-				}
-			} else {
-				if (parseHeaderData(headerBuffer, headers)) {
-					state = EXPECTING_COMMA;
-				} else {
-					state = ERROR;
-					errorReason = INVALID_HEADER_DATA;
-				}
-				return bytesToRead;
-			}
-		} else {
-			// Not all header data has been received yet.
-			return bytesToRead;
-		}
-	}
-	
-public:
-	/**
-	 * Create a new ScgiRequestParser, ready to parse a request.
-	 *
-	 * @param maxSize The maximum size that the SCGI data is allowed to
-	 *                be, or 0 if no limit is desired.
-	 */
-	ScgiRequestParser(unsigned long maxSize = 0) {
-		this->maxSize = maxSize;
-		state = READING_LENGTH_STRING;
-		errorReason = NONE;
-		lengthStringBufferSize = 0;
-		headerSize = 0;
-		headers.set_empty_key("");
-	}
-	
-	/**
-	 * Feed SCGI request data to the parser.
-	 *
-	 * @param data The data to feed.
-	 * @param size The size of the data, in bytes.
-	 * @return The number of recognized SCGI header bytes. If this value
-	 *         equals 'size', then it means all data in 'data' is part of
-	 *         the SCGI header. If this value is less than size, then it
-	 *         means only some data in 'data' is part of the SCGI header,
-	 *         and the remaining 'size - result' bytes are part of the
-	 *         request body.
-	 * @pre size > 0
-	 * @post result <= size
-	 * @post if result <= size: getState() == DONE || getState() == ERROR
-	 */
-	unsigned int feed(const char *data, unsigned int size) {
-		unsigned int i;
-		
-		switch (state) {
-		case READING_LENGTH_STRING:
-			// Keep processing length string data...
-			for (i = 0; i < size; i++) {
-				char byte = data[i];
-				
-				if (lengthStringBufferSize == sizeof(lengthStringBuffer) - 1) {
-					// ...and abort if the length string is too long.
-					state = ERROR;
-					errorReason = LENGTH_STRING_TOO_LARGE;
-					return i;
-				} else if (!isDigit(byte)) {
-					if (byte == ':') {
-						// ...until the end of the length string has been reached.
-						state = READING_HEADER_DATA;
-						lengthStringBuffer[lengthStringBufferSize] = '\0';
-						headerSize = atol(lengthStringBuffer);
-						if (maxSize > 0 && headerSize > maxSize) {
-							state = ERROR;
-							errorReason = LIMIT_REACHED;
-						} else {
-							headerBuffer.reserve(headerSize);
-							// From here on, process the rest of the data that we've
-							// received, as header data.
-							return readHeaderData(data + i + 1, size - i - 1) + i + 1;
-						}
-					} else {
-						// ...until we encounter a parse error.
-						state = ERROR;
-						errorReason = INVALID_LENGTH_STRING;
-						return i;
-					}
-				} else {
-					lengthStringBuffer[lengthStringBufferSize] = byte;
-					lengthStringBufferSize++;
-				}
-			}
-			return i;
-		
-		case READING_HEADER_DATA:
-			return readHeaderData(data, size);
-		
-		case EXPECTING_COMMA:
-			if (data[0] == ',') {
-				state = DONE;
-				return 1;
-			} else {
-				state = ERROR;
-				errorReason = HEADER_TERMINATOR_EXPECTED;
-				return 0;
-			}
-		
-		default:
-			return 0;
-		}
-	}
-	
-	/**
-	 * Get the raw header data that has been processed so far.
-	 */
-	string getHeaderData() const {
-		return headerBuffer;
-	}
-	
-	/**
-	 * Get the value of the header with the given name.
-	 * Lookup is case-sensitive.
-	 *
-	 * Returns the empty string if there is no such header.
-	 *
-	 * @pre getState() == DONE
-	 */
-	StaticString getHeader(const StaticString &name) const {
-		HeaderMap::const_iterator it(headers.find(name));
-		if (it == headers.end()) {
-			return "";
-		} else {
-			return it->second;
-		}
-	}
-	
-	/**
-	 * Checks whether there is a header with the given name.
-	 * Lookup is case-sensitive.
-	 *
-	 * @pre getState() == DONE
-	 */
-	bool hasHeader(const StaticString &name) const {
-		return headers.find(name) != headers.end();
-	}
-	
-	/**
-	 * Get the parser's current state.
-	 */
-	State getState() const {
-		return state;
-	}
-	
-	/**
-	 * Returns the reason why the parser entered the error state.
-	 *
-	 * @pre getState() == ERROR
-	 */
-	ErrorReason getErrorReason() const {
-		return errorReason;
-	}
-	
-	/**
-	 * Checks whether this parser is still capable of accepting input (that
-	 * is, that this parser is not in a final state).
-	 */
-	bool acceptingInput() const {
-		return state != DONE && state != ERROR;
-	}
-};
-
-} // namespace Passenger
diff --git a/ext/nginx/config b/ext/nginx/config
index d82ceac..707b37b 100644
--- a/ext/nginx/config
+++ b/ext/nginx/config
@@ -1,13 +1,25 @@
-if ! test -f "$ngx_addon_dir/../common/libpassenger_common.a" || \
-   ! test -f "$ngx_addon_dir/../common/libboost_oxt.a"; then
+PATH="$ngx_addon_dir/../../bin:$PATH"
+export PATH
+
+if ! ruby -v >/dev/null 2>/dev/null; then
+    echo '*** ERROR: Cannot find the "ruby" command in $PATH. Please fix your $PATH. You can learn more about $PATH at: http://www.modrails.com/documentation/Users%20guide%20Apache.html#_the_path_environment_variable'
+fi
+
+if test "x$PASSENGER_LIBS" = "x" && ! passenger-config --compiled; then
     echo "*** The Phusion Passenger support files are not yet compiled. Compiling them for you... ***"
-    echo "*** Running 'rake nginx RELEASE=yes' in $ngx_addon_dir... ***"
+    echo "*** Running 'rake nginx CACHING=false' in $ngx_addon_dir... ***"
     old_dir=`pwd`
     if ! cd $ngx_addon_dir; then
         exit 1
     fi
-    if ! rake nginx RELEASE=yes; then
-        exit 1
+    if test "x$TRACE" = 1; then
+        if ! rake --trace nginx CACHING=false; then
+            exit 1
+        fi
+    else
+        if ! rake nginx CACHING=false; then
+            exit 1
+        fi
     fi
     cd "$old_dir"
     echo "*** Phusion Passenger support files have been successfully compiled. ***"
@@ -25,11 +37,20 @@ NGX_ADDON_DEPS="$NGX_ADDON_DEPS \
     ${ngx_addon_dir}/ContentHandler.h \
     ${ngx_addon_dir}/StaticContentHandler.h \
     ${ngx_addon_dir}/ngx_http_passenger_module.h \
-    ${ngx_addon_dir}/../common/Constants.h"
-CORE_LIBS="$CORE_LIBS  \
-    ${ngx_addon_dir}/../common/libpassenger_common.a \
-    ${ngx_addon_dir}/../common/libboost_oxt.a \
-    -lstdc++ -lpthread"
+    `passenger-config --includedir`/common/Constants.h \
+    `passenger-config --includedir`/common/AgentsStarter.h \
+    `passenger-config --includedir`/common/ApplicationPool2/AppTypes.h"
+if test "x$PASSENGER_INCLUDEDIR" = "x"; then
+    CORE_INCS="$CORE_INCS `passenger-config --includedir`"
+else
+    CORE_INCS="$CORE_INCS $PASSENGER_INCLUDEDIR"
+fi
+if test "x$PASSENGER_LIBS" = "x"; then
+    CORE_LIBS="$CORE_LIBS `passenger-config --nginx-libs`"
+else
+    CORE_LIBS="$CORE_LIBS $PASSENGER_LIBS"
+fi
+CORE_LIBS="$CORE_LIBS -lstdc++ -lpthread"
 
 ngx_feature="Math library"
 ngx_feature_name=
diff --git a/ext/nginx/ngx_http_passenger_module.c b/ext/nginx/ngx_http_passenger_module.c
index c5151b2..bb01a20 100644
--- a/ext/nginx/ngx_http_passenger_module.c
+++ b/ext/nginx/ngx_http_passenger_module.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) Igor Sysoev
  * Copyright (C) 2007 Manlio Perillo (manlio.perillo at gmail.com)
- * Copyright (C) 2010 Phusion
+ * Copyright (C) 2010-2013 Phusion
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -49,12 +49,13 @@
 #define HELPER_SERVER_PASSWORD_SIZE     64
 
 
-static int               first_start = 1;
-ngx_str_t                passenger_schema_string;
-ngx_str_t                passenger_placeholder_upstream_address;
-PassengerCachedFileStat *passenger_stat_cache;
-AgentsStarter           *passenger_agents_starter = NULL;
-ngx_cycle_t             *passenger_current_cycle;
+static int                first_start = 1;
+ngx_str_t                 pp_schema_string;
+ngx_str_t                 pp_placeholder_upstream_address;
+PP_CachedFileStat        *pp_stat_cache;
+PP_AppTypeDetector       *pp_app_type_detector;
+PP_AgentsStarter         *pp_agents_starter = NULL;
+ngx_cycle_t              *pp_current_cycle;
 
 
 /*
@@ -86,8 +87,7 @@ register_content_handler(ngx_conf_t *cf)
 */
 
 static void
-ignore_sigpipe()
-{
+ignore_sigpipe() {
     struct sigaction action;
     
     action.sa_handler = SIG_IGN;
@@ -96,7 +96,7 @@ ignore_sigpipe()
     sigaction(SIGPIPE, &action, NULL);
 }
 
-char *
+static char *
 ngx_str_null_terminate(ngx_str_t *str) {
     char *result = malloc(str->len + 1);
     memcpy(result, str->data, str->len);
@@ -104,6 +104,14 @@ ngx_str_null_terminate(ngx_str_t *str) {
     return result;
 }
 
+static void
+pp_variant_map_set_ngx_str(PP_VariantMap *m,
+    const char *name,
+    ngx_str_t *value)
+{
+    pp_variant_map_set(m, name, (const char *) value->data, value->len);
+}
+
 /**
  * Save the Nginx master process's PID into a file under the server instance directory.
  *
@@ -121,7 +129,7 @@ save_master_process_pid(ngx_cycle_t *cycle) {
     FILE *f;
     
     last = ngx_snprintf(filename, sizeof(filename) - 1, "%s/control_process.pid",
-        agents_starter_get_server_instance_dir(passenger_agents_starter));
+                        pp_agents_starter_get_server_instance_dir(pp_agents_starter));
     *last = (u_char) '\0';
     
     f = fopen((const char *) filename, "w");
@@ -144,6 +152,10 @@ starting_helper_server_after_fork(void *arg) {
     ngx_cycle_t *cycle = (void *) arg;
     char        *log_filename;
     FILE        *log_file;
+    ngx_core_conf_t *ccf;
+    ngx_uint_t   i;
+    ngx_str_t   *envs;
+    const char  *env;
     
     /* At this point, stdout and stderr may still point to the console.
      * Make sure that they're both redirected to the log file.
@@ -179,6 +191,16 @@ starting_helper_server_after_fork(void *arg) {
         dup2(fileno(log_file), 2);
         fclose(log_file);
     }
+
+    /* Set environment variables in Nginx config file. */
+    ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
+    envs = ccf->env.elts;
+    for (i = 0; i < ccf->env.nelts; i++) {
+        env = (const char *) envs[i].data;
+        if (strchr(env, '=') != NULL) {
+            putenv(strdup(env));
+        }
+    }
     
     /* Set SERVER_SOFTWARE so that application processes know what web
      * server they're running on during startup. */
@@ -227,39 +249,16 @@ start_helper_server(ngx_cycle_t *cycle) {
     ngx_uint_t       i;
     ngx_str_t       *prestart_uris;
     char           **prestart_uris_ary = NULL;
+    ngx_keyval_t    *ctl = NULL;
+    PP_VariantMap  *params = NULL;
     u_char  filename[NGX_MAX_PATH], *last;
-    char   *debug_log_file = NULL;
-    char   *default_user = NULL;
-    char   *default_group = NULL;
     char   *passenger_root = NULL;
-    char   *ruby = NULL;
-    char   *analytics_log_dir;
-    char   *analytics_log_user;
-    char   *analytics_log_group;
-    char   *analytics_log_permissions;
-    char   *union_station_gateway_address;
-    char   *union_station_gateway_cert;
-    char   *union_station_proxy_address;
-    char   *union_station_proxy_type;
     char   *error_message = NULL;
     
     core_conf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
     result    = NGX_OK;
-    
-    /* Create null-terminated versions of some strings. */
-    debug_log_file = ngx_str_null_terminate(&passenger_main_conf.debug_log_file);
-    default_user   = ngx_str_null_terminate(&passenger_main_conf.default_user);
-    default_group  = ngx_str_null_terminate(&passenger_main_conf.default_group);
+    params    = pp_variant_map_new();
     passenger_root = ngx_str_null_terminate(&passenger_main_conf.root_dir);
-    ruby           = ngx_str_null_terminate(&passenger_main_conf.ruby);
-    analytics_log_dir = ngx_str_null_terminate(&passenger_main_conf.analytics_log_dir);
-    analytics_log_user = ngx_str_null_terminate(&passenger_main_conf.analytics_log_user);
-    analytics_log_group = ngx_str_null_terminate(&passenger_main_conf.analytics_log_group);
-    analytics_log_permissions = ngx_str_null_terminate(&passenger_main_conf.analytics_log_permissions);
-    union_station_gateway_address = ngx_str_null_terminate(&passenger_main_conf.union_station_gateway_address);
-    union_station_gateway_cert = ngx_str_null_terminate(&passenger_main_conf.union_station_gateway_cert);
-    union_station_proxy_address = ngx_str_null_terminate(&passenger_main_conf.union_station_proxy_address);
-    union_station_proxy_type = ngx_str_null_terminate(&passenger_main_conf.union_station_proxy_type);
     
     prestart_uris = (ngx_str_t *) passenger_main_conf.prestart_uris->elts;
     prestart_uris_ary = calloc(sizeof(char *), passenger_main_conf.prestart_uris->nelts);
@@ -273,24 +272,37 @@ start_helper_server(ngx_cycle_t *cycle) {
         memcpy(prestart_uris_ary[i], prestart_uris[i].data, prestart_uris[i].len);
         prestart_uris_ary[i][prestart_uris[i].len] = '\0';
     }
+
+    pp_variant_map_set_int    (params, "web_server_pid", getpid());
+    pp_variant_map_set_int    (params, "web_server_worker_uid", core_conf->user);
+    pp_variant_map_set_int    (params, "web_server_worker_gid", core_conf->group);
+    pp_variant_map_set_int    (params, "log_level", passenger_main_conf.log_level);
+    pp_variant_map_set_ngx_str(params, "debug_log_file", &passenger_main_conf.debug_log_file);
+    pp_variant_map_set_ngx_str(params, "temp_dir", &passenger_main_conf.temp_dir);
+    pp_variant_map_set_bool   (params, "user_switching", passenger_main_conf.user_switching);
+    pp_variant_map_set_ngx_str(params, "default_user", &passenger_main_conf.default_user);
+    pp_variant_map_set_ngx_str(params, "default_group", &passenger_main_conf.default_group);
+    pp_variant_map_set_ngx_str(params, "default_ruby", &passenger_main_conf.default_ruby);
+    pp_variant_map_set_int    (params, "max_pool_size", passenger_main_conf.max_pool_size);
+    pp_variant_map_set_int    (params, "pool_idle_time", passenger_main_conf.pool_idle_time);
+    pp_variant_map_set_ngx_str(params, "analytics_log_user", &passenger_main_conf.analytics_log_user);
+    pp_variant_map_set_ngx_str(params, "analytics_log_group", &passenger_main_conf.analytics_log_group);
+    pp_variant_map_set_ngx_str(params, "union_station_gateway_address", &passenger_main_conf.union_station_gateway_address);
+    pp_variant_map_set_int    (params, "union_station_gateway_port", passenger_main_conf.union_station_gateway_port);
+    pp_variant_map_set_ngx_str(params, "union_station_gateway_cert", &passenger_main_conf.union_station_gateway_cert);
+    pp_variant_map_set_ngx_str(params, "union_station_proxy_address", &passenger_main_conf.union_station_proxy_address);
+    pp_variant_map_set_strset (params, "prestart_urls", (const char **) prestart_uris_ary, passenger_main_conf.prestart_uris->nelts);
+
+    ctl = (ngx_keyval_t *) passenger_main_conf.ctl->elts;
+    for (i = 0; i < passenger_main_conf.ctl->nelts; i++) {
+        pp_variant_map_set2(params,
+            (const char *) ctl[i].key.data, ctl[i].key.len - 1,
+            (const char *) ctl[i].value.data, ctl[i].value.len - 1);
+    }
     
-    ret = agents_starter_start(passenger_agents_starter,
-        passenger_main_conf.log_level, debug_log_file, getpid(),
-        "", passenger_main_conf.user_switching,
-        default_user, default_group,
-        core_conf->user, core_conf->group,
-        passenger_root, ruby, passenger_main_conf.max_pool_size,
-        passenger_main_conf.max_instances_per_app,
-        passenger_main_conf.pool_idle_time,
-        "",
-        analytics_log_dir, analytics_log_user,
-        analytics_log_group, analytics_log_permissions,
-        union_station_gateway_address,
-        passenger_main_conf.union_station_gateway_port,
-        union_station_gateway_cert,
-        union_station_proxy_address,
-        union_station_proxy_type,
-        (const char **) prestart_uris_ary, passenger_main_conf.prestart_uris->nelts,
+    ret = pp_agents_starter_start(pp_agents_starter,
+        passenger_root,
+        params,
         starting_helper_server_after_fork,
         cycle,
         &error_message);
@@ -306,7 +318,7 @@ start_helper_server(ngx_cycle_t *cycle) {
      */
     last = ngx_snprintf(filename, sizeof(filename) - 1,
                         "%s/control_process.pid",
-                        agents_starter_get_server_instance_dir(passenger_agents_starter));
+                        pp_agents_starter_get_server_instance_dir(pp_agents_starter));
     *last = (u_char) '\0';
     if (create_file(cycle, filename, (const u_char *) "", 0) != NGX_OK) {
         result = NGX_ERROR;
@@ -323,7 +335,7 @@ start_helper_server(ngx_cycle_t *cycle) {
     /* Create various other info files. */
     last = ngx_snprintf(filename, sizeof(filename) - 1,
                         "%s/web_server.txt",
-                        agents_starter_get_generation_dir(passenger_agents_starter));
+                        pp_agents_starter_get_generation_dir(pp_agents_starter));
     *last = (u_char) '\0';
     if (create_file(cycle, filename, (const u_char *) NGINX_VER, strlen(NGINX_VER)) != NGX_OK) {
         result = NGX_ERROR;
@@ -332,37 +344,16 @@ start_helper_server(ngx_cycle_t *cycle) {
 
     last = ngx_snprintf(filename, sizeof(filename) - 1,
                         "%s/config_files.txt",
-                        agents_starter_get_generation_dir(passenger_agents_starter));
+                        pp_agents_starter_get_generation_dir(pp_agents_starter));
     *last = (u_char) '\0';
     if (create_file(cycle, filename, cycle->conf_file.data, cycle->conf_file.len) != NGX_OK) {
         result = NGX_ERROR;
         goto cleanup;
     }
     
-    last = ngx_snprintf(filename, sizeof(filename) - 1,
-                        "%s/analytics_log_dir.txt",
-                        agents_starter_get_generation_dir(passenger_agents_starter));
-    *last = (u_char) '\0';
-    if (create_file(cycle, filename, passenger_main_conf.analytics_log_dir.data,
-                    passenger_main_conf.analytics_log_dir.len) != NGX_OK) {
-        result = NGX_ERROR;
-        goto cleanup;
-    }
-
 cleanup:
-    free(debug_log_file);
-    free(default_user);
-    free(default_group);
+    pp_variant_map_free(params);
     free(passenger_root);
-    free(ruby);
-    free(analytics_log_dir);
-    free(analytics_log_user);
-    free(analytics_log_group);
-    free(analytics_log_permissions);
-    free(union_station_gateway_address);
-    free(union_station_gateway_cert);
-    free(union_station_proxy_address);
-    free(union_station_proxy_type);
     free(error_message);
     if (prestart_uris_ary != NULL) {
         for (i = 0; i < passenger_main_conf.prestart_uris->nelts; i++) {
@@ -383,9 +374,9 @@ cleanup:
  */
 static void
 shutdown_helper_server() {
-    if (passenger_agents_starter != NULL) {
-        agents_starter_free(passenger_agents_starter);
-        passenger_agents_starter = NULL;
+    if (pp_agents_starter != NULL) {
+        pp_agents_starter_free(pp_agents_starter);
+        pp_agents_starter = NULL;
     }
 }
 
@@ -403,14 +394,15 @@ pre_config_init(ngx_conf_t *cf)
     shutdown_helper_server();
     
     ngx_memzero(&passenger_main_conf, sizeof(passenger_main_conf_t));
-    passenger_schema_string.data = (u_char *) "passenger:";
-    passenger_schema_string.len  = sizeof("passenger:") - 1;
-    passenger_placeholder_upstream_address.data = (u_char *) "unix:/passenger_helper_server";
-    passenger_placeholder_upstream_address.len  = sizeof("unix:/passenger_helper_server") - 1;
-    passenger_stat_cache = cached_file_stat_new(1024);
-    passenger_agents_starter = agents_starter_new(AS_NGINX, &error_message);
+    pp_schema_string.data = (u_char *) "passenger:";
+    pp_schema_string.len  = sizeof("passenger:") - 1;
+    pp_placeholder_upstream_address.data = (u_char *) "unix:/passenger_helper_server";
+    pp_placeholder_upstream_address.len  = sizeof("unix:/passenger_helper_server") - 1;
+    pp_stat_cache = pp_cached_file_stat_new(1024);
+    pp_app_type_detector = pp_app_type_detector_new();
+    pp_agents_starter = pp_agents_starter_new(AS_NGINX, &error_message);
     
-    if (passenger_agents_starter == NULL) {
+    if (pp_agents_starter == NULL) {
         ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno, "%s", error_message);
         free(error_message);
         return NGX_ERROR;
@@ -439,7 +431,7 @@ init_module(ngx_cycle_t *cycle) {
             passenger_main_conf.root_dir.len = 0;
             return NGX_OK;
         }
-        passenger_current_cycle = cycle;
+        pp_current_cycle = cycle;
     }
     return NGX_OK;
 }
@@ -461,7 +453,7 @@ init_worker_process(ngx_cycle_t *cycle) {
         
         core_conf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
         if (core_conf->master) {
-            agents_starter_detach(passenger_agents_starter);
+            pp_agents_starter_detach(pp_agents_starter);
         }
     }
     return NGX_OK;
diff --git a/ext/nginx/ngx_http_passenger_module.h b/ext/nginx/ngx_http_passenger_module.h
index 18eca95..51ac11f 100644
--- a/ext/nginx/ngx_http_passenger_module.h
+++ b/ext/nginx/ngx_http_passenger_module.h
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) Igor Sysoev
  * Copyright (C) 2007 Manlio Perillo (manlio.perillo at gmail.com)
- * Copyright (C) 2010 Phusion
+ * Copyright (C) 2010-2013 Phusion
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -30,8 +30,9 @@
 
 #include <ngx_config.h>
 #include <ngx_core.h>
-#include "../common/AgentsStarter.h"
-#include "../common/Utils/CachedFileStat.h"
+#include "common/AgentsStarter.h"
+#include "common/ApplicationPool2/AppTypes.h"
+#include "common/Utils/CachedFileStat.h"
 
 /**
  * The Nginx version number as an integer.
@@ -47,18 +48,18 @@ extern ngx_module_t ngx_http_passenger_module;
 /**
  * A static schema string to be assigned to Nginx 'upstream' strctures.
  */
-extern ngx_str_t                passenger_schema_string;
+extern ngx_str_t                pp_schema_string;
 
-extern ngx_str_t                passenger_placeholder_upstream_address;
+extern ngx_str_t                pp_placeholder_upstream_address;
 
-/**
- * A CachedFileStat object used for caching stat() calls.
- */
-extern PassengerCachedFileStat *passenger_stat_cache;
+/** A CachedFileStat object used for caching stat() calls. */
+extern PP_CachedFileStat        *pp_stat_cache;
+
+extern PP_AppTypeDetector       *pp_app_type_detector;
 
-extern AgentsStarter           *passenger_agents_starter;
+extern PP_AgentsStarter         *pp_agents_starter;
 
-extern ngx_cycle_t             *passenger_current_cycle;
+extern ngx_cycle_t              *pp_current_cycle;
 
 #endif /* _PASSENGER_NGINX_MODULE_H_ */
 
diff --git a/ext/oxt/backtrace.cpp b/ext/oxt/backtrace.cpp
deleted file mode 100644
index cbb60c5..0000000
--- a/ext/oxt/backtrace.cpp
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * OXT - OS eXtensions for boosT
- * Provides important functionality necessary for writing robust server software.
- *
- * Copyright (c) 2010 Phusion
- *
- * 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
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#if !(defined(NDEBUG) || defined(OXT_DISABLE_BACKTRACES))
-
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/tss.hpp>
-#include <sstream>
-#include <cstring>
-#include "backtrace.hpp"
-
-namespace oxt {
-
-boost::mutex _thread_registration_mutex;
-list<thread_registration *> _registered_threads;
-
-// Register main thread.
-static initialize_backtrace_support_for_this_thread main_thread_initialization("Main thread");
-
-
-namespace {
-	struct backtrace_data {
-		vector<trace_point *> list;
-		spin_lock lock;
-		
-		backtrace_data() {
-			list.reserve(50);
-		}
-	};
-}
-
-
-/*
- * boost::thread_specific_storage is pretty expensive. So we use the __thread
- * keyword whenever possible - that's almost free.
- * GCC supports the __thread keyword on x86 since version 3.3, but versions earlier
- * than 4.1.2 have bugs (http://gcc.gnu.org/ml/gcc-bugs/2006-09/msg02275.html).
- */
-
-#ifndef OXT_GCC_VERSION
-	#define OXT_GCC_VERSION (__GNUC__ * 10000 \
-                               + __GNUC_MINOR__ * 100 \
-                               + __GNUC_PATCHLEVEL__)
-#endif
-
-/*
- * FreeBSD 5 supports the __thread keyword, and everything works fine in
- * micro-tests, but in mod_passenger the thread-local variables are initialized
- * to unaligned addresses for some weird reason, thereby causing bus errors.
- *
- * GCC on OpenBSD supports __thread, but any access to such a variable
- * results in a segfault.
- *
- * Solaris does support __thread, but often it's not compiled into default GCC 
- * packages (not to mention it's not available for Sparc). Playing it safe...
- *
- * MacOS X doesn't support __thread at all.
- */
-#if OXT_GCC_VERSION >= 40102 && !defined(__FreeBSD__) && \
-   !defined(__SOLARIS__) && !defined(__OpenBSD__) && !defined(__APPLE__)
-	static __thread backtrace_data *thread_specific_backtrace_data;
-	
-	void
-	_init_backtrace_tls() {
-		thread_specific_backtrace_data = new backtrace_data();
-	}
-	
-	void
-	_finalize_backtrace_tls() {
-		delete thread_specific_backtrace_data;
-	}
-	
-	bool
-	_get_backtrace_list_and_its_lock(vector<trace_point *> **backtrace_list, spin_lock **lock) {
-		if (OXT_LIKELY(thread_specific_backtrace_data != NULL)) {
-			*backtrace_list = &thread_specific_backtrace_data->list;
-			*lock = &thread_specific_backtrace_data->lock;
-			return true;
-		} else {
-			return false;
-		}
-	}
-#else
-	static thread_specific_ptr<backtrace_data> thread_specific_backtrace_data;
-	
-	void _init_backtrace_tls() {
-		/* Not implemented on purpose.
-		 *
-		 * It is not safe to use thread_specific_backtrace_data here
-		 * because this function may be called by
-		 * initialize_backtrace_support_for_this_thread's constructor,
-		 * which in turn may be called by the global static variable
-		 * main_thread_initialization. C++ does not guarantee initialization
-		 * order so thread_specific_backtrace_data may not be usable at
-		 * this time.
-		 */
-	}
-	
-	void _finalize_backtrace_tls() {
-		// Not implemented either.
-	}
-	
-	bool
-	_get_backtrace_list_and_its_lock(vector<trace_point *> **backtrace_list, spin_lock **lock) {
-		backtrace_data *data;
-		
-		data = thread_specific_backtrace_data.get();
-		if (OXT_UNLIKELY(data == NULL)) {
-			data = new backtrace_data();
-			thread_specific_backtrace_data.reset(data);
-		}
-		*backtrace_list = &data->list;
-		*lock = &data->lock;
-		return true;
-	}
-#endif
-
-template<typename Iterable, typename ReverseIterator> static string
-format_backtrace(Iterable backtrace_list) {
-	if (backtrace_list->empty()) {
-		return "     (empty)";
-	} else {
-		stringstream result;
-		ReverseIterator it;
-		
-		for (it = backtrace_list->rbegin(); it != backtrace_list->rend(); it++) {
-			trace_point *p = *it;
-			
-			result << "     in '" << p->function << "'";
-			if (p->source != NULL) {
-				const char *source = strrchr(p->source, '/');
-				if (source != NULL) {
-					source++;
-				} else {
-					source = p->source;
-				}
-				result << " (" << source << ":" << p->line << ")";
-			}
-			result << endl;
-		}
-		return result.str();
-	}
-}
-
-string
-_format_backtrace(const list<trace_point *> *backtrace_list) {
-	return format_backtrace<
-		const list<trace_point *> *,
-		list<trace_point *>::const_reverse_iterator
-	>(backtrace_list);
-}
-
-string
-_format_backtrace(const vector<trace_point *> *backtrace_list) {
-	return format_backtrace<
-		const vector<trace_point *> *,
-		vector<trace_point *>::const_reverse_iterator
-	>(backtrace_list);
-}
-
-} // namespace oxt
-
-#endif
-
diff --git a/ext/oxt/detail/backtrace_enabled.hpp b/ext/oxt/detail/backtrace_enabled.hpp
index d1d414d..53b94c8 100644
--- a/ext/oxt/detail/backtrace_enabled.hpp
+++ b/ext/oxt/detail/backtrace_enabled.hpp
@@ -2,7 +2,7 @@
  * OXT - OS eXtensions for boosT
  * Provides important functionality necessary for writing robust server software.
  *
- * Copyright (c) 2010 Phusion
+ * Copyright (c) 2010, 2011, 2012 Phusion
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -27,32 +27,10 @@
 
 #define OXT_BACKTRACE_IS_ENABLED
 
-#include <boost/thread/mutex.hpp>
 #include <boost/current_function.hpp>
-#include <exception>
-#include <string>
-#include <list>
-#include <vector>
-#include "../spin_lock.hpp"
-#include "../macros.hpp"
 
 namespace oxt {
 
-using namespace std;
-using namespace boost;
-struct trace_point;
-class tracable_exception;
-struct thread_registration;
-
-extern boost::mutex _thread_registration_mutex;
-extern list<thread_registration *> _registered_threads;
-
-void   _init_backtrace_tls();
-void   _finalize_backtrace_tls();
-bool   _get_backtrace_list_and_its_lock(vector<trace_point *> **backtrace_list, spin_lock **lock);
-string _format_backtrace(const list<trace_point *> *backtrace_list);
-string _format_backtrace(const vector<trace_point *> *backtrace_list);
-
 /**
  * A single point in a backtrace. Creating this object will cause it
  * to push itself to the thread's backtrace list. This backtrace list
@@ -61,9 +39,6 @@ string _format_backtrace(const vector<trace_point *> *backtrace_list);
  * backtrace list.
  *
  * Except if you set the 'detached' argument to true.
- *
- * Implementation detail - do not use directly!
- * @internal
  */
 struct trace_point {
 	const char *function;
@@ -71,86 +46,14 @@ struct trace_point {
 	unsigned int line;
 	bool m_detached;
 	
-	trace_point(const char *function, const char *source, unsigned int line) {
-		this->function = function;
-		this->source = source;
-		this->line = line;
-		m_detached = false;
-		
-		vector<trace_point *> *backtrace_list;
-		spin_lock *lock;
-		if (OXT_LIKELY(_get_backtrace_list_and_its_lock(&backtrace_list, &lock))) {
-			spin_lock::scoped_lock l(*lock);
-			backtrace_list->push_back(this);
-		}
-	}
-	
-	trace_point(const char *function, const char *source, unsigned int line, bool detached) {
-		this->function = function;
-		this->source = source;
-		this->line = line;
-		m_detached = true;
-	}
-
-	~trace_point() {
-		if (OXT_LIKELY(!m_detached)) {
-			vector<trace_point *> *backtrace_list;
-			spin_lock *lock;
-			if (OXT_LIKELY(_get_backtrace_list_and_its_lock(&backtrace_list, &lock))) {
-				spin_lock::scoped_lock l(*lock);
-				backtrace_list->pop_back();
-			}
-		}
-	}
-
-	void update(const char *source, unsigned int line) {
-		this->source = source;
-		this->line = line;
-	}
+	trace_point(const char *function, const char *source, unsigned int line);
+	trace_point(const char *function, const char *source, unsigned int line, bool detached);
+	~trace_point();
+	void update(const char *source, unsigned int line);
 };
 
 #define TRACE_POINT() oxt::trace_point __p(BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)
 #define TRACE_POINT_WITH_NAME(name) oxt::trace_point __p(name, __FILE__, __LINE__)
 #define UPDATE_TRACE_POINT() __p.update(__FILE__, __LINE__)
 
-/**
- * @internal
- */
-struct thread_registration {
-	string name;
-	spin_lock *backtrace_lock;
-	vector<trace_point *> *backtrace;
-};
-
-/**
- * @internal
- */
-struct initialize_backtrace_support_for_this_thread {
-	thread_registration *registration;
-	list<thread_registration *>::iterator it;
-	
-	initialize_backtrace_support_for_this_thread(const string &name) {
-		_init_backtrace_tls();
-		registration = new thread_registration();
-		registration->name = name;
-		_get_backtrace_list_and_its_lock(&registration->backtrace,
-			&registration->backtrace_lock);
-		
-		boost::mutex::scoped_lock l(_thread_registration_mutex);
-		_registered_threads.push_back(registration);
-		it = _registered_threads.end();
-		it--;
-	}
-	
-	~initialize_backtrace_support_for_this_thread() {
-		{
-			boost::mutex::scoped_lock l(_thread_registration_mutex);
-			_registered_threads.erase(it);
-			delete registration;
-		}
-		_finalize_backtrace_tls();
-	}
-};
-
 } // namespace oxt
-
diff --git a/ext/oxt/detail/context.hpp b/ext/oxt/detail/context.hpp
new file mode 100644
index 0000000..82ece88
--- /dev/null
+++ b/ext/oxt/detail/context.hpp
@@ -0,0 +1,90 @@
+/*
+ * OXT - OS eXtensions for boosT
+ * Provides important functionality necessary for writing robust server software.
+ *
+ * Copyright (c) 2012 Phusion
+ *
+ * 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
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#ifndef _OXT_DETAIL_CONTEXT_HPP_
+#define _OXT_DETAIL_CONTEXT_HPP_
+
+#include <boost/thread/mutex.hpp>
+#include <boost/shared_ptr.hpp>
+#include <list>
+#include <vector>
+#include <string>
+#include <pthread.h>
+#ifdef __linux__
+	#include <sys/types.h>
+#endif
+#include "../spin_lock.hpp"
+
+namespace oxt {
+
+
+struct thread_local_context;
+
+typedef boost::shared_ptr<thread_local_context> thread_local_context_ptr;
+
+struct global_context_t {
+	boost::mutex next_thread_number_mutex;
+	/** Thread numbering begins at 2. The main thread has number 1.
+	 * A thread number of 0 is invalid. */
+	unsigned int next_thread_number;
+
+	boost::mutex thread_registration_mutex;
+	std::list<thread_local_context_ptr> registered_threads;
+
+	global_context_t();
+};
+
+struct thread_local_context {
+	std::list<thread_local_context_ptr>::iterator iterator;
+
+	pthread_t thread;
+	#ifdef __linux__
+		pid_t tid;
+	#endif
+	unsigned int thread_number;
+	std::string thread_name;
+
+	/** This lock is normally locked, but only unlocked during an oxt::sycall function,
+	 * and is relocked when that function returns. One can use try_lock to find out
+	 * whether the code is inside an oxt::syscall function.
+	 */
+	spin_lock syscall_interruption_lock;
+
+	#ifdef OXT_BACKTRACE_IS_ENABLED
+		std::vector<trace_point *> backtrace_list;
+		spin_lock backtrace_lock;
+	#endif
+	
+	static thread_local_context_ptr make_shared_ptr();
+
+	thread_local_context();
+};
+
+
+thread_local_context *get_thread_local_context();
+
+
+} // namespace oxt
+
+#endif /* _OXT_DETAIL_CONTEXT_HPP_ */
diff --git a/ext/oxt/detail/spin_lock_darwin.hpp b/ext/oxt/detail/spin_lock_darwin.hpp
index d79d849..7fc14f2 100644
--- a/ext/oxt/detail/spin_lock_darwin.hpp
+++ b/ext/oxt/detail/spin_lock_darwin.hpp
@@ -64,6 +64,10 @@ public:
 	void unlock() {
 		OSSpinLockUnlock(&spin);
 	}
+
+	bool try_lock() {
+		return OSSpinLockTry(&spin);
+	}
 };
 
 } // namespace oxt
diff --git a/ext/oxt/detail/spin_lock_gcc_x86.hpp b/ext/oxt/detail/spin_lock_gcc_x86.hpp
index 1f2ea8d..47043ea 100644
--- a/ext/oxt/detail/spin_lock_gcc_x86.hpp
+++ b/ext/oxt/detail/spin_lock_gcc_x86.hpp
@@ -75,6 +75,10 @@ public:
 	void unlock() {
 		__sync_lock_release(&exclusion);
 	}
+
+	bool try_lock() {
+		return !__sync_lock_test_and_set(&exclusion, 1);
+	}
 };
 
 } // namespace oxt
diff --git a/ext/oxt/detail/spin_lock_pthreads.hpp b/ext/oxt/detail/spin_lock_pthreads.hpp
index da3bbdf..32d3c1b 100644
--- a/ext/oxt/detail/spin_lock_pthreads.hpp
+++ b/ext/oxt/detail/spin_lock_pthreads.hpp
@@ -61,7 +61,7 @@ public:
 			ret = pthread_spin_init(&spin, PTHREAD_PROCESS_PRIVATE);
 		} while (ret == EINTR);
 		if (ret != 0) {
-			throw boost::thread_resource_error("Cannot initialize a spin lock", ret);
+			throw boost::thread_resource_error(ret, "Cannot initialize a spin lock");
 		}
 	}
 	
@@ -78,7 +78,7 @@ public:
 			ret = pthread_spin_lock(&spin);
 		} while (OXT_UNLIKELY(ret == EINTR));
 		if (OXT_UNLIKELY(ret != 0)) {
-			throw boost::thread_resource_error("Cannot lock spin lock", ret);
+			throw boost::thread_resource_error(ret, "Cannot lock spin lock");
 		}
 	}
 
@@ -88,7 +88,21 @@ public:
 			ret = pthread_spin_unlock(&spin);
 		} while (OXT_UNLIKELY(ret == EINTR));
 		if (OXT_UNLIKELY(ret != 0)) {
-			throw boost::thread_resource_error("Cannot unlock spin lock", ret);
+			throw boost::thread_resource_error(ret, "Cannot unlock spin lock");
+		}
+	}
+
+	bool try_lock() {
+		int ret;
+		do {
+			ret = pthread_spin_trylock(&spin);
+		} while (OXT_UNLIKELY(ret == EINTR));
+		if (ret == 0) {
+			return true;
+		} else if (ret == EBUSY) {
+			return false;
+		} else {
+			throw boost::thread_resource_error(ret, "Cannot lock spin lock");
 		}
 	}
 };
diff --git a/ext/oxt/detail/tracable_exception_enabled.hpp b/ext/oxt/detail/tracable_exception_enabled.hpp
index 0676e28..e556a95 100644
--- a/ext/oxt/detail/tracable_exception_enabled.hpp
+++ b/ext/oxt/detail/tracable_exception_enabled.hpp
@@ -24,7 +24,7 @@
  */
 #include <string>
 #include <exception>
-#include <list>
+#include <vector>
 
 namespace oxt {
 
@@ -35,7 +35,7 @@ struct trace_point;
  */
 class tracable_exception: public std::exception {
 private:
-	std::list<trace_point *> backtrace_copy;
+	std::vector<trace_point *> backtrace_copy;
 public:
 	tracable_exception();
 	tracable_exception(const tracable_exception &other);
diff --git a/ext/oxt/dynamic_thread_group.hpp b/ext/oxt/dynamic_thread_group.hpp
index 4ec129a..6214037 100644
--- a/ext/oxt/dynamic_thread_group.hpp
+++ b/ext/oxt/dynamic_thread_group.hpp
@@ -2,7 +2,7 @@
  * OXT - OS eXtensions for boosT
  * Provides important functionality necessary for writing robust server software.
  *
- * Copyright (c) 2010 Phusion
+ * Copyright (c) 2010-2013 Phusion
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -128,7 +128,7 @@ public:
 	 * @throws thread_resource_error Cannot create a thread.
 	 * @post this->num_threads() == old->num_threads() + 1
 	 */
-	void create_thread(boost::function<void ()> &func, const string &name = "", unsigned int stack_size = 0) {
+	void create_thread(const boost::function<void ()> &func, const string &name = "", unsigned int stack_size = 0) {
 		boost::lock_guard<boost::mutex> l(lock);
 		thread_handle_ptr handle(new thread_handle());
 		thread_handles.push_back(handle);
@@ -146,13 +146,21 @@ public:
 			throw;
 		}
 	}
+
+	void interrupt_all() {
+		boost::unique_lock<boost::mutex> l(lock);
+		list<thread_handle_ptr>::iterator it;
+		for (it = thread_handles.begin(); it != thread_handles.end(); it++) {
+			(*it)->thr->interrupt();
+		}
+	}
 	
 	/**
 	 * Interrupt and join all threads in this group.
 	 *
 	 * @post num_threads() == 0
 	 */
-	void interrupt_and_join_all() {
+	void interrupt_and_join_all(bool interruptSyscalls = true) {
 		/* While interrupting and joining the threads, each thread
 		 * will try to lock the mutex and remove itself from
 		 * 'thread_handles'. We want to avoid deadlocks so we
@@ -178,7 +186,33 @@ public:
 		nthreads = 0;
 		
 		l.unlock();
-		thread::interrupt_and_join_multiple(threads, nthreads_copy);
+		thread::interrupt_and_join_multiple(threads, nthreads_copy, interruptSyscalls);
+	}
+	
+	void join_all() {
+		// See comments from interrupt_and_join_all().
+		boost::unique_lock<boost::mutex> l(lock);
+		list<thread_handle_ptr> thread_handles_copy;
+		list<thread_handle_ptr>::iterator it;
+		thread_handle_ptr handle;
+		unsigned int nthreads_copy = nthreads;
+		thread *threads[nthreads];
+		unsigned int i = 0;
+		
+		// We make a copy so that the handles aren't destroyed prematurely.
+		thread_handles_copy = thread_handles;
+		for (it = thread_handles.begin(); it != thread_handles.end(); it++, i++) {
+			handle = *it;
+			handle->removed_from_list = true;
+			threads[i] = handle->thr;
+		}
+		thread_handles.clear();
+		nthreads = 0;
+		
+		l.unlock();
+		for (i = 0; i < nthreads_copy; i++) {
+			threads[i]->join();
+		}
 	}
 	
 	/**
diff --git a/ext/oxt/implementation.cpp b/ext/oxt/implementation.cpp
new file mode 100644
index 0000000..633e77e
--- /dev/null
+++ b/ext/oxt/implementation.cpp
@@ -0,0 +1,415 @@
+/*
+ * OXT - OS eXtensions for boosT
+ * Provides important functionality necessary for writing robust server software.
+ *
+ * Copyright (c) 2008-2012 Phusion
+ *
+ * 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
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include <boost/thread/mutex.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/make_shared.hpp>
+#include "tracable_exception.hpp"
+#include "backtrace.hpp"
+#include "macros.hpp"
+#include "thread.hpp"
+#include "spin_lock.hpp"
+#include "detail/context.hpp"
+#ifdef __linux__
+	#include <sys/syscall.h>
+#endif
+
+#ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED
+	#include <cassert>
+	#include <sstream>
+	#include <cstring>
+#endif
+
+
+namespace oxt {
+
+using namespace std;
+using namespace boost;
+
+
+static global_context_t *global_context = NULL;
+
+
+/*
+ * boost::thread_specific_storage is pretty expensive. So we use the __thread
+ * keyword whenever possible - that's almost free.
+ */
+#ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED
+	static __thread thread_local_context_ptr *local_context = NULL;
+
+	static void
+	init_thread_local_context_support() {
+		/* Do nothing. */
+	}
+	
+	static void
+	set_thread_local_context(const thread_local_context_ptr &ctx) {
+		local_context = new thread_local_context_ptr(ctx);
+	}
+
+	static void
+	free_thread_local_context() {
+		delete local_context;
+		local_context = NULL;
+	}
+
+	thread_local_context *
+	get_thread_local_context() {
+		if (OXT_LIKELY(local_context != NULL)) {
+			return local_context->get();
+		} else {
+			return NULL;
+		}
+	}
+#else
+	/*
+	 * This is a *pointer* to a thread_specific_ptr because, once
+	 * we've created a thread_specific_ptr, we never want to destroy it
+	 * in order to avoid C++'s global variable destruction. All kinds
+	 * of cleanup code may depend on local_context and because global
+	 * variable destruction order is undefined, we just want to keep
+	 * this object alive until the OS cleans it up.
+	 */
+	static thread_specific_ptr<thread_local_context_ptr> *local_context = NULL;
+	
+	static void
+	init_thread_local_context_support() {
+		local_context = new thread_specific_ptr<thread_local_context_ptr>();
+	}
+
+	static void
+	set_thread_local_context(const thread_local_context_ptr &ctx) {
+		if (local_context != NULL) {
+			local_context->reset(new thread_local_context_ptr(ctx));
+		}
+	}
+
+	static void
+	free_thread_local_context() {
+		if (local_context != NULL) {
+			local_context->reset();
+		}
+	}
+
+	thread_local_context *
+	get_thread_local_context() {
+		if (OXT_LIKELY(local_context != NULL)) {
+			thread_local_context_ptr *pointer = local_context->get();
+			if (OXT_LIKELY(pointer != NULL)) {
+				return pointer->get();
+			} else {
+				return NULL;
+			}
+		} else {
+			return NULL;
+		}
+	}
+#endif
+
+
+#ifdef OXT_BACKTRACE_IS_ENABLED
+
+trace_point::trace_point(const char *_function, const char *_source, unsigned int _line)
+	: function(_function),
+	  source(_source),
+	  line(_line),
+	  m_detached(false)
+{
+	thread_local_context *ctx = get_thread_local_context();
+	if (OXT_LIKELY(ctx != NULL)) {
+		spin_lock::scoped_lock l(ctx->backtrace_lock);
+		ctx->backtrace_list.push_back(this);
+	} else {
+		m_detached = true;
+	}
+}
+
+trace_point::trace_point(const char *_function, const char *_source, unsigned int _line, bool detached)
+	: function(_function),
+	  source(_source),
+	  line(_line),
+	  m_detached(true)
+{ }
+
+trace_point::~trace_point() {
+	if (OXT_LIKELY(!m_detached)) {
+		thread_local_context *ctx = get_thread_local_context();
+		if (OXT_LIKELY(ctx != NULL)) {
+			spin_lock::scoped_lock l(ctx->backtrace_lock);
+			assert(!ctx->backtrace_list.empty());
+			ctx->backtrace_list.pop_back();
+		}
+	}
+}
+
+void
+trace_point::update(const char *source, unsigned int line) {
+	this->source = source;
+	this->line = line;
+}
+
+
+tracable_exception::tracable_exception() {
+	thread_local_context *ctx = get_thread_local_context();
+	if (OXT_LIKELY(ctx != NULL)) {
+		spin_lock::scoped_lock l(ctx->backtrace_lock);
+		vector<trace_point *>::const_iterator it, end = ctx->backtrace_list.end();
+		
+		backtrace_copy.reserve(ctx->backtrace_list.size());
+		for (it = ctx->backtrace_list.begin(); it != end; it++) {
+			trace_point *p = new trace_point(
+				(*it)->function,
+				(*it)->source,
+				(*it)->line,
+				true);
+			backtrace_copy.push_back(p);
+		}
+	}
+}
+
+tracable_exception::tracable_exception(const tracable_exception &other)
+	: std::exception()
+{
+	vector<trace_point *>::const_iterator it, end = other.backtrace_copy.end();
+	backtrace_copy.reserve(other.backtrace_copy.size());
+	for (it = other.backtrace_copy.begin(); it != end; it++) {
+		trace_point *p = new trace_point(
+			(*it)->function,
+			(*it)->source,
+			(*it)->line,
+			true);
+		backtrace_copy.push_back(p);
+	}
+}
+
+tracable_exception::~tracable_exception() throw() {
+	vector<trace_point *>::iterator it, end = backtrace_copy.end();
+	for (it = backtrace_copy.begin(); it != end; it++) {
+		delete *it;
+	}
+}
+
+template<typename Collection>
+static string
+format_backtrace(const Collection &backtrace_list) {
+	if (backtrace_list.empty()) {
+		return "     (empty)";
+	} else {
+		backtrace_list.rbegin();
+		stringstream result;
+		typename Collection::const_reverse_iterator it;
+		
+		for (it = backtrace_list.rbegin(); it != backtrace_list.rend(); it++) {
+			const trace_point *p = *it;
+			
+			result << "     in '" << p->function << "'";
+			if (p->source != NULL) {
+				const char *source = strrchr(p->source, '/');
+				if (source != NULL) {
+					source++;
+				} else {
+					source = p->source;
+				}
+				result << " (" << source << ":" << p->line << ")";
+			}
+			result << endl;
+		}
+		return result.str();
+	}
+}
+
+string
+tracable_exception::backtrace() const throw() {
+	return format_backtrace< vector<trace_point *> >(backtrace_copy);
+}
+
+const char *
+tracable_exception::what() const throw() {
+	return "oxt::tracable_exception";
+}
+
+#endif /* OXT_BACKTRACE_IS_ENABLED */
+
+
+void initialize() {
+	global_context = new global_context_t();
+	init_thread_local_context_support();
+	// For some reason make_shared() crashes here when compiled with clang 3.2 on OS X.
+	// Clang bug? We use 'new' to work around it.
+	thread_local_context_ptr ctx = thread_local_context::make_shared_ptr();
+	ctx->thread_number = 1;
+	ctx->thread_name = "Main thread";
+	set_thread_local_context(ctx);
+}
+
+
+global_context_t::global_context_t()
+	: next_thread_number(2)
+{ }
+
+
+thread_local_context_ptr
+thread_local_context::make_shared_ptr() {
+	// For some reason make_shared() crashes here when compiled with clang 3.2 on OS X.
+	// Clang bug? We use 'new' to work around it.
+	return thread_local_context_ptr(new thread_local_context());
+}
+
+thread_local_context::thread_local_context()
+	: thread_number(0)
+{
+	thread = pthread_self();
+	#ifdef __linux__
+		tid = syscall(SYS_gettid);
+	#endif
+	syscall_interruption_lock.lock();
+	#ifdef OXT_BACKTRACE_IS_ENABLED
+		backtrace_list.reserve(50);
+	#endif
+}
+
+
+string
+thread::make_thread_name(const string &given_name) {
+	if (given_name.empty()) {
+		if (OXT_LIKELY(global_context != NULL)) {
+			stringstream str;
+			str << "Thread #";
+			{
+				boost::lock_guard<boost::mutex> l(global_context->thread_registration_mutex);
+				str << global_context->next_thread_number;
+			}
+			return str.str();
+		} else {
+			return "(unknown)";
+		}
+	} else {
+		return given_name;
+	}
+}
+
+void
+thread::thread_main(const boost::function<void ()> func, thread_local_context_ptr ctx) {
+	set_thread_local_context(ctx);
+
+	if (OXT_LIKELY(global_context != NULL)) {
+		boost::lock_guard<boost::mutex> l(global_context->thread_registration_mutex);
+
+		ctx->thread = pthread_self();
+		global_context->next_thread_number++;
+		global_context->registered_threads.push_back(ctx);
+		ctx->iterator = global_context->registered_threads.end();
+		ctx->iterator--;
+		// Set this after setting 'iterator' to indicate
+		// that push_back() has succeeded.
+		ctx->thread_number = global_context->next_thread_number;
+	}
+
+	try {
+		func();
+	} catch (const thread_interrupted &) {
+		// Do nothing.
+	}
+	// We don't care about other exceptions because they'll crash the process anyway.
+
+	if (OXT_LIKELY(global_context != NULL)) {
+		boost::lock_guard<boost::mutex> l(global_context->thread_registration_mutex);
+		thread_local_context *ctx = get_thread_local_context();
+		if (ctx != 0 && ctx->thread_number != 0) {
+			global_context->registered_threads.erase(ctx->iterator);
+			ctx->thread_number = 0;
+		}
+	}
+	free_thread_local_context();
+}
+
+std::string
+thread::name() const throw() {
+	return context->thread_name;
+}
+
+std::string
+thread::backtrace() const throw() {
+	#ifdef OXT_BACKTRACE_IS_ENABLED
+		spin_lock::scoped_lock l(context->backtrace_lock);
+		return format_backtrace(context->backtrace_list);
+	#else
+		return "    (backtrace support disabled during compile time)";
+	#endif
+}
+
+string
+thread::all_backtraces() throw() {
+	#ifdef OXT_BACKTRACE_IS_ENABLED
+		if (OXT_LIKELY(global_context != NULL)) {
+			boost::lock_guard<boost::mutex> l(global_context->thread_registration_mutex);
+			list<thread_local_context_ptr>::const_iterator it;
+			std::stringstream result;
+			
+			for (it = global_context->registered_threads.begin();
+			     it != global_context->registered_threads.end();
+			     it++)
+			{
+				thread_local_context_ptr ctx = *it;
+				result << "Thread '" << ctx->thread_name <<
+					"' (" << hex << showbase << ctx->thread << dec;
+				#ifdef __linux__
+					result << ", LWP " << ctx->tid;
+				#endif
+				result << "):" << endl;
+				
+				spin_lock::scoped_lock l(ctx->backtrace_lock);
+				std::string bt = format_backtrace(ctx->backtrace_list);
+				result << bt;
+				if (bt.empty() || bt[bt.size() - 1] != '\n') {
+					result << endl;
+				}
+				result << endl;
+			}
+			return result.str();
+		} else {
+			return "(OXT not initialized)";
+		}
+	#else
+		return "(backtrace support disabled during compile time)";
+	#endif
+}
+
+void
+thread::interrupt(bool interruptSyscalls) {
+	int ret;
+	
+	boost::thread::interrupt();
+	if (interruptSyscalls && context->syscall_interruption_lock.try_lock()) {
+		do {
+			ret = pthread_kill(native_handle(),
+				INTERRUPTION_SIGNAL);
+		} while (ret == EINTR);
+		context->syscall_interruption_lock.unlock();
+	}
+}
+
+
+} // namespace oxt
diff --git a/ext/oxt/initialize.hpp b/ext/oxt/initialize.hpp
new file mode 100644
index 0000000..248dd04
--- /dev/null
+++ b/ext/oxt/initialize.hpp
@@ -0,0 +1,39 @@
+/*
+ * OXT - OS eXtensions for boosT
+ * Provides important functionality necessary for writing robust server software.
+ *
+ * Copyright (c) 2012 Phusion
+ *
+ * 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
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#ifndef _OXT_INITIALIZE_HPP_
+#define _OXT_INITIALIZE_HPP_
+
+namespace oxt {
+
+/**
+ * OXT must be initialized for a lot of things to work properly.
+ * This does not enable system call interruption. Call setup_syscall_interruption_support()
+ * for that.
+ */
+void initialize();
+
+} // namespace oxt
+
+#endif /* _OXT_INITIALIZE_HPP_ */
diff --git a/ext/oxt/macros.hpp b/ext/oxt/macros.hpp
index 03df9ab..71dbabf 100644
--- a/ext/oxt/macros.hpp
+++ b/ext/oxt/macros.hpp
@@ -2,7 +2,7 @@
  * OXT - OS eXtensions for boosT
  * Provides important functionality necessary for writing robust server software.
  *
- * Copyright (c) 2010 Phusion
+ * Copyright (c) 2010-2013 Phusion
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -32,27 +32,80 @@
  * so often by application programmers.
  */
 
-#if (defined(__GNUC__) && (__GNUC__ > 2) && !defined(OXT_DEBUG)) || defined(IN_DOXYGEN)
+#define OXT_GCC_VERSION (__GNUC__ * 10000 \
+                           + __GNUC_MINOR__ * 100 \
+                           + __GNUC_PATCHLEVEL__)
+
+#if (defined(__GNUC__) && (__GNUC__ > 2)) || defined(IN_DOXYGEN)
 	/**
 	 * Indicate that the given expression is likely to be true.
 	 * This allows the CPU to better perform branch prediction.
-	 *
-	 * Defining OXT_DEBUG will cause this macro to become an
-	 * empty stub.
 	 */
 	#define OXT_LIKELY(expr) __builtin_expect((expr), 1)
 	
 	/**
 	 * Indicate that the given expression is likely to be false.
 	 * This allows the CPU to better perform branch prediction.
-	 *
-	 * Defining OXT_DEBUG will cause this macro to become an
-	 * empty stub.
 	 */
 	#define OXT_UNLIKELY(expr) __builtin_expect((expr), 0)
+
+	/**
+	 * Force inlining of the given function.
+	 */
+	#define OXT_FORCE_INLINE __attribute__((always_inline))
+
+	#if __GNUC__ >= 4
+		#define OXT_RESTRICT __restrict__
+	#else
+		#define OXT_RESTRICT
+	#endif
+	#ifndef restrict
+		/**
+		 * The C99 'restrict' keyword, now usable in C++.
+		 */
+		#define restrict OXT_RESTRICT
+	#endif
+	#ifndef restrict_ref
+		/**
+		 * The C99 'restrict' keyword, for use with C++ references.
+		 * On compilers that support 'restrict' in C++ but not on
+		 * references, this macro does nothing.
+		 */
+		#define restrict_ref OXT_RESTRICT
+	#endif
 #else
 	#define OXT_LIKELY(expr) expr
 	#define OXT_UNLIKELY(expr) expr
+	#define OXT_FORCE_INLINE
+	#define restrict
+	#define restrict_ref
+#endif
+
+/*
+ * GCC supports the __thread keyword on x86 since version 3.3, but versions earlier
+ * than 4.1.2 have bugs (http://gcc.gnu.org/ml/gcc-bugs/2006-09/msg02275.html).
+ *
+ * FreeBSD 5 supports the __thread keyword, and everything works fine in
+ * micro-tests, but in mod_passenger the thread-local variables are initialized
+ * to unaligned addresses for some weird reason, thereby causing bus errors.
+ *
+ * GCC on OpenBSD supports __thread, but any access to such a variable
+ * results in a segfault.
+ *
+ * Solaris does support __thread, but often it's not compiled into default GCC 
+ * packages (not to mention it's not available for Sparc). Playing it safe...
+ *
+ * On MacOS X, neither gcc nor llvm-gcc support the __thread keyword, but Clang
+ * does. It works on at least clang >= 3.0.
+ */
+#if defined(__APPLE__)
+	#if defined(__clang__) && __clang_major__ >= 3
+		#define OXT_THREAD_LOCAL_KEYWORD_SUPPORTED
+	#endif
+#elif defined(__GNUC__) && OXT_GCC_VERSION >= 40102
+	#if !defined(__SOLARIS__) && !defined(__OpenBSD__)
+		#define OXT_THREAD_LOCAL_KEYWORD_SUPPORTED
+	#endif
 #endif
 
 #endif /* _OXT_MACROS_HPP_ */
diff --git a/ext/oxt/spin_lock.hpp b/ext/oxt/spin_lock.hpp
index 790462c..8cc2e8f 100644
--- a/ext/oxt/spin_lock.hpp
+++ b/ext/oxt/spin_lock.hpp
@@ -2,7 +2,7 @@
  * OXT - OS eXtensions for boosT
  * Provides important functionality necessary for writing robust server software.
  *
- * Copyright (c) 2010 Phusion
+ * Copyright (c) 2010-2012 Phusion
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -25,21 +25,16 @@
 #ifndef _OXT_SPIN_LOCK_HPP_
 #define _OXT_SPIN_LOCK_HPP_
 
-// At the time of writing (July 22, 2008), these operating systems don't
-// support pthread spin locks:
-// - OpenBSD 4.3
-// - Solaris 9
-// - MacOS X
+#include "macros.hpp"
+
+// These operating systems don't support pthread spin locks:
+// - OpenBSD 4.3 (last checked: July 22, 2008)
+// - Solaris 9 (last checked: July 22, 2008)
+// - MacOS X (last checked: July 22, 2012)
 #if defined(__OpenBSD__) || defined(__SOLARIS9__) || defined(__APPLE__)
 	#define OXT_NO_PTHREAD_SPINLOCKS
 #endif
 
-#ifndef OXT_GCC_VERSION
-	#define OXT_GCC_VERSION (__GNUC__ * 10000 \
-	                     + __GNUC_MINOR__ * 100 \
-	                     + __GNUC_PATCH_LEVEL__)
-#endif
-
 #if defined(__APPLE__)
 	#include "detail/spin_lock_darwin.hpp"
 #elif (OXT_GCC_VERSION > 40100 && (defined(__i386__) || defined(__x86_64__))) || defined(IN_DOXYGEN)
diff --git a/ext/oxt/system_calls.cpp b/ext/oxt/system_calls.cpp
index e026fbe..defc878 100644
--- a/ext/oxt/system_calls.cpp
+++ b/ext/oxt/system_calls.cpp
@@ -2,7 +2,7 @@
  * OXT - OS eXtensions for boosT
  * Provides important functionality necessary for writing robust server software.
  *
- * Copyright (c) 2010 Phusion
+ * Copyright (c) 2010-2013 Phusion
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -23,6 +23,7 @@
  * THE SOFTWARE.
  */
 #include "system_calls.hpp"
+#include "detail/context.hpp"
 #include <boost/thread.hpp>
 #include <cerrno>
 
@@ -34,6 +35,9 @@ using namespace oxt;
  * oxt
  *************************************/
 
+static const ErrorChance *errorChances = NULL;
+static unsigned int nErrorChances = 0;
+
 static void
 interruption_signal_handler(int sig) {
 	// Do nothing.
@@ -66,20 +70,74 @@ oxt::setup_syscall_interruption_support() {
 	} while (ret == -1 && errno == EINTR);
 }
 
+void
+oxt::setup_random_failure_simulation(const ErrorChance *_errorChances, unsigned int n) {
+	ErrorChance *storage = new ErrorChance[n];
+	for (unsigned int i = 0; i < n; i++) {
+		storage[i] = _errorChances[i];
+	}
+	errorChances = storage;
+	nErrorChances = n;
+}
+
+static bool
+shouldSimulateFailure() {
+	if (nErrorChances > 0) {
+		double number = random() / (double) RAND_MAX;
+		const ErrorChance *candidates[nErrorChances];
+		unsigned int i, n = 0;
+
+		for (i = 0; i < nErrorChances; i++) {
+			if (number <= errorChances[i].chance) {
+				candidates[n] = &errorChances[i];
+				n++;
+			}
+		}
+
+		if (n > 0) {
+			int choice = random() % n;
+			errno = candidates[choice]->errorCode;
+			return true;
+		} else {
+			return false;
+		}
+	} else {
+		return false;
+	}
+}
+
 
 /*************************************
  * Passenger::syscalls
  *************************************/
 
-#define CHECK_INTERRUPTION(error_expression, code) \
+#define CHECK_INTERRUPTION(error_expression, allowSimulatingFailure, error_assignment, code) \
 	do { \
+		if (allowSimulatingFailure && shouldSimulateFailure()) { \
+			error_assignment; \
+			break; \
+		} \
+		thread_local_context *ctx = get_thread_local_context(); \
+		if (OXT_UNLIKELY(ctx != NULL)) { \
+			ctx->syscall_interruption_lock.unlock(); \
+		} \
 		int _my_errno; \
+		bool _intr_requested = false; \
 		do { \
 			code; \
 			_my_errno = errno; \
-		} while ((error_expression) && _my_errno == EINTR \
-			&& !this_thread::syscalls_interruptable()); \
-		if ((error_expression) && _my_errno == EINTR && this_thread::syscalls_interruptable()) { \
+		} while ((error_expression) \
+			&& _my_errno == EINTR \
+			&& (!this_thread::syscalls_interruptable() \
+			    || !(_intr_requested = this_thread::interruption_requested())) \
+		); \
+		if (OXT_UNLIKELY(ctx != NULL)) { \
+			ctx->syscall_interruption_lock.lock(); \
+		} \
+		if ((error_expression) \
+		 && _my_errno == EINTR \
+		 && this_thread::syscalls_interruptable() \
+		 && _intr_requested) { \
 			throw thread_interrupted(); \
 		} \
 		errno = _my_errno; \
@@ -90,6 +148,8 @@ syscalls::open(const char *path, int oflag) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::open(path, oflag)
 	);
 	return ret;
@@ -100,6 +160,8 @@ syscalls::open(const char *path, int oflag, mode_t mode) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::open(path, oflag, mode)
 	);
 	return ret;
@@ -110,6 +172,8 @@ syscalls::read(int fd, void *buf, size_t count) {
 	ssize_t ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::read(fd, buf, count)
 	);
 	return ret;
@@ -120,6 +184,8 @@ syscalls::write(int fd, const void *buf, size_t count) {
 	ssize_t ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::write(fd, buf, count)
 	);
 	return ret;
@@ -130,6 +196,8 @@ syscalls::writev(int fd, const struct iovec *iov, int iovcnt) {
 	ssize_t ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::writev(fd, iov, iovcnt)
 	);
 	return ret;
@@ -158,10 +226,21 @@ syscalls::close(int fd) {
 		int ret;
 		CHECK_INTERRUPTION(
 			ret == -1,
+			true,
+			ret = -1,
 			ret = ::close(fd)
 		);
 		return ret;
 	#else
+		if (shouldSimulateFailure()) {
+			return -1;
+		}
+		
+		thread_local_context *ctx = get_thread_local_context();
+		if (OXT_UNLIKELY(ctx != NULL)) {
+			ctx->syscall_interruption_lock.unlock();
+		}
+
 		/* TODO: If it's not known whether the OS releases the file
 		 * descriptor on EINTR-on-close(), we should print some kind of
 		 * warning here. This would actually explain why some people get
@@ -170,7 +249,15 @@ syscalls::close(int fd) {
 		 * behaviors.
 		 */
 		int ret = ::close(fd);
-		if (ret == -1 && errno == EINTR && this_thread::syscalls_interruptable()) {
+		if (OXT_UNLIKELY(ctx != NULL)) {
+			int e = errno;
+			ctx->syscall_interruption_lock.lock();
+			errno = e;
+		}
+		if (ret == -1
+		 && errno == EINTR
+		 && this_thread::syscalls_interruptable()
+		 && this_thread::interruption_requested()) {
 			throw thread_interrupted();
 		} else {
 			return ret;
@@ -183,6 +270,8 @@ syscalls::pipe(int filedes[2]) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::pipe(filedes)
 	);
 	return ret;
@@ -193,16 +282,44 @@ syscalls::dup2(int filedes, int filedes2) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::dup2(filedes, filedes2)
 	);
 	return ret;
 }
 
 int
+syscalls::mkdir(const char *pathname, mode_t mode) {
+	int ret;
+	CHECK_INTERRUPTION(
+		ret == -1,
+		true,
+		ret = -1,
+		ret = ::mkdir(pathname, mode)
+	);
+	return ret;
+}
+
+int
+syscalls::chown(const char *path, uid_t owner, gid_t group) {
+	int ret;
+	CHECK_INTERRUPTION(
+		ret == -1,
+		true,
+		ret = -1,
+		ret = ::chown(path, owner, group)
+	);
+	return ret;
+}
+
+int
 syscalls::accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::accept(sockfd, addr, addrlen)
 	);
 	return ret;
@@ -213,6 +330,8 @@ syscalls::bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::bind(sockfd, addr, addrlen)
 	);
 	return ret;
@@ -225,6 +344,8 @@ syscalls::connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrle
 	// http://www.madore.org/~david/computers/connect-intr.html
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::connect(sockfd, serv_addr, addrlen);
 	);
 	return ret;
@@ -235,6 +356,8 @@ syscalls::listen(int sockfd, int backlog) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::listen(sockfd, backlog)
 	);
 	return ret;
@@ -245,6 +368,8 @@ syscalls::socket(int domain, int type, int protocol) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::socket(domain, type, protocol)
 	);
 	return ret;
@@ -255,6 +380,8 @@ syscalls::socketpair(int d, int type, int protocol, int sv[2]) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::socketpair(d, type, protocol, sv)
 	);
 	return ret;
@@ -266,11 +393,15 @@ syscalls::recvmsg(int s, struct msghdr *msg, int flags) {
 	#ifdef _AIX53
 		CHECK_INTERRUPTION(
 			ret == -1,
+			true,
+			ret = -1,
 			ret = ::nrecvmsg(s, msg, flags)
 		);
 	#else
 		CHECK_INTERRUPTION(
 			ret == -1,
+			true,
+			ret = -1,
 			ret = ::recvmsg(s, msg, flags)
 		);
 	#endif
@@ -283,11 +414,15 @@ syscalls::sendmsg(int s, const struct msghdr *msg, int flags) {
 	#ifdef _AIX53
 		CHECK_INTERRUPTION(
 			ret == -1,
+			true,
+			ret = -1,
 			ret = ::nsendmsg(s, msg, flags)
 		);
 	#else
 		CHECK_INTERRUPTION(
 			ret == -1,
+			true,
+			ret = -1,
 			ret = ::sendmsg(s, msg, flags)
 		);
 	#endif
@@ -299,6 +434,8 @@ syscalls::setsockopt(int s, int level, int optname, const void *optval, socklen_
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::setsockopt(s, level, optname, optval, optlen)
 	);
 	return ret;
@@ -309,6 +446,8 @@ syscalls::shutdown(int s, int how) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::shutdown(s, how)
 	);
 	return ret;
@@ -319,6 +458,8 @@ syscalls::select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds,
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::select(nfds, readfds, writefds, errorfds, timeout)
 	);
 	return ret;
@@ -329,6 +470,8 @@ syscalls::poll(struct pollfd fds[], nfds_t nfds, int timeout) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::poll(fds, nfds, timeout)
 	);
 	return ret;
@@ -339,6 +482,8 @@ syscalls::fopen(const char *path, const char *mode) {
 	FILE *ret;
 	CHECK_INTERRUPTION(
 		ret == NULL,
+		true,
+		ret = NULL,
 		ret = ::fopen(path, mode)
 	);
 	return ret;
@@ -349,6 +494,8 @@ syscalls::fread(void *ptr, size_t size, size_t nitems, FILE *stream) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == 0 && ferror(stream),
+		true,
+		ret = 0,
 		ret = ::fread(ptr, size, nitems, stream)
 	);
 	return ret;
@@ -359,6 +506,8 @@ syscalls::fclose(FILE *fp) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == EOF,
+		true,
+		ret = EOF,
 		ret = ::fclose(fp)
 	);
 	return ret;
@@ -369,6 +518,8 @@ syscalls::unlink(const char *pathname) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::unlink(pathname)
 	);
 	return ret;
@@ -379,16 +530,32 @@ syscalls::stat(const char *path, struct stat *buf) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::stat(path, buf)
 	);
 	return ret;
 }
 
+int
+syscalls::lstat(const char *path, struct stat *buf) {
+	int ret;
+	CHECK_INTERRUPTION(
+		ret == -1,
+		true,
+		ret = -1,
+		ret = ::lstat(path, buf)
+	);
+	return ret;
+}
+
 time_t
 syscalls::time(time_t *t) {
 	time_t ret;
 	CHECK_INTERRUPTION(
 		ret == (time_t) -1,
+		false,
+		(void) 0,
 		ret = ::time(t)
 	);
 	return ret;
@@ -440,21 +607,45 @@ syscalls::nanosleep(const struct timespec *req, struct timespec *rem) {
 	struct timespec req2 = *req;
 	struct timespec rem2;
 	int ret, e;
+	bool intr_requested;
+
+	/* We never simulate failure in this function. */
+
+	thread_local_context *ctx = get_thread_local_context();
+	if (OXT_UNLIKELY(ctx != NULL)) {
+		ctx->syscall_interruption_lock.unlock();
+	}
+	
 	do {
 		ret = ::nanosleep(&req2, &rem2);
 		e = errno;
-		// nanosleep() on some systems is sometimes buggy. rem2
-		// could end up containing a tv_sec with a value near 2^32-1,
-		// probably because of integer wrapping bugs in the kernel.
-		// So we check for those.
-		if (rem2.tv_sec < req->tv_sec) {
-			req2 = rem2;
-		} else {
-			req2.tv_sec = 0;
-			req2.tv_nsec = 0;
+		if (ret == -1) {
+			/* nanosleep() on some systems is sometimes buggy. rem2
+			 * could end up containing a tv_sec with a value near 2^32-1,
+			 * probably because of integer wrapping bugs in the kernel.
+			 * So we check for those.
+			 */
+			if (rem2.tv_sec < req->tv_sec) {
+				req2 = rem2;
+			} else {
+				req2.tv_sec = 0;
+				req2.tv_nsec = 0;
+			}
 		}
-	} while (ret == -1 && e == EINTR && !this_thread::syscalls_interruptable());
-	if (ret == -1 && e == EINTR && this_thread::syscalls_interruptable()) {
+	} while (ret == -1
+		&& e == EINTR
+		&& (!this_thread::syscalls_interruptable()
+		    || !(intr_requested = this_thread::interruption_requested()))
+	);
+	
+	if (OXT_UNLIKELY(ctx != NULL)) {
+		ctx->syscall_interruption_lock.lock();
+	}
+	
+	if (ret == -1
+	 && e == EINTR
+	 && this_thread::syscalls_interruptable()
+	 && intr_requested) {
 		throw thread_interrupted();
 	}
 	errno = e;
@@ -466,11 +657,18 @@ syscalls::nanosleep(const struct timespec *req, struct timespec *rem) {
 
 pid_t
 syscalls::fork() {
-	int ret;
-	CHECK_INTERRUPTION(
-		ret == -1,
-		ret = ::fork()
-	);
+	/* We don't do anything with the syscall_interruption_lock here
+	 * because that can cause an infinite loop. Suppose that we unlock
+	 * syscall_interruption_lock, then another thread calls interrupt()
+	 * on this thread (which in turn locks syscall_interruption_lock),
+	 * and then we context switch back to this thread anf the fork()
+	 * proceeds. In the subprocess, syscall_interruption_lock will never
+	 * be unlocked and so we're stuck forever trying to obtain the lock.
+	 */
+	pid_t ret;
+	do {
+		ret = ::fork();
+	} while (ret == -1 && errno == EINTR);
 	return ret;
 }
 
@@ -479,6 +677,8 @@ syscalls::kill(pid_t pid, int sig) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::kill(pid, sig)
 	);
 	return ret;
@@ -489,6 +689,8 @@ syscalls::killpg(pid_t pgrp, int sig) {
 	int ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::killpg(pgrp, sig)
 	);
 	return ret;
@@ -499,6 +701,8 @@ syscalls::waitpid(pid_t pid, int *status, int options) {
 	pid_t ret;
 	CHECK_INTERRUPTION(
 		ret == -1,
+		true,
+		ret = -1,
 		ret = ::waitpid(pid, status, options)
 	);
 	return ret;
@@ -509,11 +713,18 @@ syscalls::waitpid(pid_t pid, int *status, int options) {
  * boost::this_thread
  *************************************/
 
-thread_specific_ptr<bool> this_thread::_syscalls_interruptable;
-
+#ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED
+	__thread bool this_thread::_syscalls_interruptable = true;
 
-bool
-this_thread::syscalls_interruptable() {
-	return _syscalls_interruptable.get() == NULL || *_syscalls_interruptable;
-}
+	bool
+	this_thread::syscalls_interruptable() {
+		return _syscalls_interruptable;
+	}
+#else
+	thread_specific_ptr<bool> this_thread::_syscalls_interruptable;
 
+	bool
+	this_thread::syscalls_interruptable() {
+		return _syscalls_interruptable.get() == NULL || *_syscalls_interruptable;
+	}
+#endif
diff --git a/ext/oxt/system_calls.hpp b/ext/oxt/system_calls.hpp
index 9784830..04fc828 100644
--- a/ext/oxt/system_calls.hpp
+++ b/ext/oxt/system_calls.hpp
@@ -2,7 +2,7 @@
  * OXT - OS eXtensions for boosT
  * Provides important functionality necessary for writing robust server software.
  *
- * Copyright (c) 2010 Phusion
+ * Copyright (c) 2010-2012 Phusion
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -40,20 +40,26 @@
 #include <cstdio>
 #include <ctime>
 #include <cassert>
+#include "macros.hpp"
 
 /**
- * Support for interruption of blocking system calls and C library calls
+ * System call and C library call wrappers with extra features
  *
- * This file provides a framework for writing multithreading code that can
- * be interrupted, even when blocked on system calls or C library calls.
+ * This file provides wrappers for many system calls and C library calls
+ * and adds the following features:
  *
- * One must first call oxt::setup_syscall_interruption_support().
+ * - Interruption of blocking system calls and blocking C library calls.
+ * - Simulation of random failures.
+ *
+ * ## About system call interruption
+ *
+ * One must first call `oxt::setup_syscall_interruption_support()`.
  * Then one may use the functions in oxt::syscalls as drop-in replacements
  * for system calls or C library functions. These functions throw
  * boost::thread_interrupted upon interruption, instead of returning an EINTR
  * error.
  *
- * Once setup_syscall_interruption_support() has been called, system call
+ * Once `setup_syscall_interruption_support()` has been called, system call
  * interruption is enabled by default. You can enable or disable system call
  * interruption in the current scope by creating instances of
  * boost::this_thread::enable_syscall_interruption or
@@ -63,7 +69,8 @@
  * boost::thread_interrupted, nor will they return EINTR errors. This is similar
  * to Boost thread interruption.
  *
- * <h2>How to interrupt</h2>
+ * ### How to interrupt
+ *
  * Generally, oxt::thread::interrupt() and oxt::thread::interrupt_and_join()
  * should be used for interrupting threads. These methods will interrupt
  * the thread at all Boost interruption points, as well as system calls that
@@ -89,12 +96,18 @@
  * received. So one must keep sending signals periodically until the
  * thread has quit.
  *
- * @warning
- * After oxt::setup_syscall_interruption_support() is called, sending a signal
+ * **Warning**:
+ *
+ * After `oxt::setup_syscall_interruption_support()` is called, sending a signal
  * will cause system calls to return with an EINTR error. The oxt::syscall
  * functions will automatically take care of this, but if you're calling any
  * system calls without using that namespace, then you should check for and
  * take care of EINTR errors.
+ *
+ * ## About random simulation of failures
+ *
+ * Call `oxt::setup_random_failure_simulation()` to initialize random
+ * failure simulation.
  */
 
 // This is one of the things that Java is good at and C++ sucks at. Sigh...
@@ -102,21 +115,14 @@
 namespace oxt {
 	static const int INTERRUPTION_SIGNAL = SIGUSR1; // SIGUSR2 is reserved by Valgrind...
 	
-	/**
-	 * Setup system call interruption support.
-	 * This function may only be called once. It installs a signal handler
-	 * for INTERRUPTION_SIGNAL, so one should not install a different signal
-	 * handler for that signal after calling this function. It also resets
-	 * the process signal mask.
-	 *
-	 * @warning
-	 * After oxt::setup_syscall_interruption_support() is called, sending a signal
-	 * will cause system calls to return with an EINTR error. The oxt::syscall
-	 * functions will automatically take care of this, but if you're calling any
-	 * system calls without using that namespace, then you should check for and
-	 * take care of EINTR errors.
-	 */
+	struct ErrorChance {
+		double chance;
+		int errorCode;
+	};
+
 	void setup_syscall_interruption_support();
+
+	void setup_random_failure_simulation(const ErrorChance *errorChances, unsigned int n);
 	
 	/**
 	 * System call and C library call wrappers with interruption support.
@@ -133,6 +139,8 @@ namespace oxt {
 		int close(int fd);
 		int pipe(int filedes[2]);
 		int dup2(int filedes, int filedes2);
+		int mkdir(const char *pathname, mode_t mode);
+		int chown(const char *path, uid_t owner, gid_t group);
 		
 		int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
 		int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
@@ -155,6 +163,7 @@ namespace oxt {
 		int fclose(FILE *fp);
 		int unlink(const char *pathname);
 		int stat(const char *path, struct stat *buf);
+		int lstat(const char *path, struct stat *buf);
 		
 		time_t time(time_t *t);
 		unsigned int sleep(unsigned int seconds);
@@ -175,8 +184,12 @@ namespace this_thread {
 	/**
 	 * @intern
 	 */
-	extern thread_specific_ptr<bool> _syscalls_interruptable;
-	
+	#ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED
+		extern __thread bool _syscalls_interruptable;
+	#else
+		extern thread_specific_ptr<bool> _syscalls_interruptable;
+	#endif
+
 	/**
 	 * Check whether system calls should be interruptable in
 	 * the calling thread.
@@ -194,17 +207,26 @@ namespace this_thread {
 		bool last_value;
 	public:
 		enable_syscall_interruption() {
-			if (_syscalls_interruptable.get() == NULL) {
-				last_value = true;
-				_syscalls_interruptable.reset(new bool(true));
-			} else {
-				last_value = *_syscalls_interruptable;
-				*_syscalls_interruptable = true;
-			}
+			#ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED
+				last_value = _syscalls_interruptable;
+				_syscalls_interruptable = true;
+			#else
+				if (_syscalls_interruptable.get() == NULL) {
+					last_value = true;
+					_syscalls_interruptable.reset(new bool(true));
+				} else {
+					last_value = *_syscalls_interruptable;
+					*_syscalls_interruptable = true;
+				}
+			#endif
 		}
 		
 		~enable_syscall_interruption() {
-			*_syscalls_interruptable = last_value;
+			#ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED
+				_syscalls_interruptable = last_value;
+			#else
+				*_syscalls_interruptable = last_value;
+			#endif
 		}
 	};
 	
@@ -220,17 +242,26 @@ namespace this_thread {
 		bool last_value;
 	public:
 		disable_syscall_interruption() {
-			if (_syscalls_interruptable.get() == NULL) {
-				last_value = true;
-				_syscalls_interruptable.reset(new bool(false));
-			} else {
-				last_value = *_syscalls_interruptable;
-				*_syscalls_interruptable = false;
-			}
+			#ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED
+				last_value = _syscalls_interruptable;
+				_syscalls_interruptable = false;
+			#else
+				if (_syscalls_interruptable.get() == NULL) {
+					last_value = true;
+					_syscalls_interruptable.reset(new bool(false));
+				} else {
+					last_value = *_syscalls_interruptable;
+					*_syscalls_interruptable = false;
+				}
+			#endif
 		}
 		
 		~disable_syscall_interruption() {
-			*_syscalls_interruptable = last_value;
+			#ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED
+				_syscalls_interruptable = last_value;
+			#else
+				*_syscalls_interruptable = last_value;
+			#endif
 		}
 	};
 	
@@ -243,13 +274,22 @@ namespace this_thread {
 		int last_value;
 	public:
 		restore_syscall_interruption(const disable_syscall_interruption &intr) {
-			assert(_syscalls_interruptable.get() != NULL);
-			last_value = *_syscalls_interruptable;
-			*_syscalls_interruptable = intr.last_value;
+			#ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED
+				last_value = _syscalls_interruptable;
+				_syscalls_interruptable = intr.last_value;
+			#else
+				assert(_syscalls_interruptable.get() != NULL);
+				last_value = *_syscalls_interruptable;
+				*_syscalls_interruptable = intr.last_value;
+			#endif
 		}
 		
 		~restore_syscall_interruption() {
-			*_syscalls_interruptable = last_value;
+			#ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED
+				_syscalls_interruptable = last_value;
+			#else
+				*_syscalls_interruptable = last_value;
+			#endif
 		}
 	};
 
diff --git a/ext/oxt/thread.cpp b/ext/oxt/thread.cpp
deleted file mode 100644
index b19a2ea..0000000
--- a/ext/oxt/thread.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * OXT - OS eXtensions for boosT
- * Provides important functionality necessary for writing robust server software.
- *
- * Copyright (c) 2010 Phusion
- *
- * 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
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#include "thread.hpp"
-
-namespace oxt {
-	boost::mutex _next_thread_number_mutex;
-	unsigned int _next_thread_number = 0;
-}
-
diff --git a/ext/oxt/thread.hpp b/ext/oxt/thread.hpp
index 00c6b5e..f04da59 100644
--- a/ext/oxt/thread.hpp
+++ b/ext/oxt/thread.hpp
@@ -26,14 +26,11 @@
 #define _OXT_THREAD_HPP_
 
 #include <boost/thread.hpp>
-#include <boost/shared_ptr.hpp>
 #include <boost/bind.hpp>
+#include <boost/make_shared.hpp>
 #include <boost/date_time/posix_time/posix_time_types.hpp>
 #include "system_calls.hpp"
-#include "backtrace.hpp"
-#ifdef OXT_BACKTRACE_IS_ENABLED
-	#include <sstream>
-#endif
+#include "detail/context.hpp"
 #include <string>
 #include <list>
 #include <unistd.h>
@@ -41,9 +38,6 @@
 
 namespace oxt {
 
-extern boost::mutex _next_thread_number_mutex;
-extern unsigned int _next_thread_number;
-
 /**
  * Enhanced thread class with support for:
  * - user-defined stack size.
@@ -52,63 +46,10 @@ extern unsigned int _next_thread_number;
  */
 class thread: public boost::thread {
 private:
-	struct thread_data {
-		std::string name;
-		#ifdef OXT_BACKTRACE_IS_ENABLED
-			thread_registration *registration;
-			boost::mutex registration_lock;
-			bool done;
-		#endif
-	};
-	
-	typedef boost::shared_ptr<thread_data> thread_data_ptr;
-	
-	thread_data_ptr data;
+	thread_local_context_ptr context;
 
-	void initialize_data(const std::string &thread_name) {
-		data = thread_data_ptr(new thread_data());
-		if (thread_name.empty()) {
-			boost::mutex::scoped_lock l(_next_thread_number_mutex);
-			std::stringstream str;
-			
-			str << "Thread #" << _next_thread_number;
-			_next_thread_number++;
-			data->name = str.str();
-		} else {
-			data->name = thread_name;
-		}
-		#ifdef OXT_BACKTRACE_IS_ENABLED
-			data->registration = NULL;
-			data->done = false;
-		#endif
-	}
-	
-	static void thread_main(const boost::function<void ()> func, thread_data_ptr data) {
-		#ifdef OXT_BACKTRACE_IS_ENABLED
-			initialize_backtrace_support_for_this_thread i(data->name);
-			data->registration = i.registration;
-		#endif
-		
-		#ifdef OXT_BACKTRACE_IS_ENABLED
-			// Put finalization code in a struct destructor,
-			// for exception safety.
-			struct finalization_routines {
-				thread_data_ptr &data;
-				
-				finalization_routines(thread_data_ptr &data_)
-					: data(data_) {}
-				
-				~finalization_routines() {
-					boost::mutex::scoped_lock l(data->registration_lock);
-					data->registration = NULL;
-					data->done = true;
-				}
-			};
-			finalization_routines f(data);
-		#endif
-		
-		func();
-	}
+	static std::string make_thread_name(const std::string &given_name);
+	static void thread_main(const boost::function<void ()> func, thread_local_context_ptr ctx);
 	
 public:
 	/**
@@ -129,11 +70,15 @@ public:
 	 * @throws boost::thread_resource_error Something went wrong during
 	 *     creation of the thread.
 	 */
-	explicit thread(const boost::function<void ()> func, const std::string &name = "", unsigned int stack_size = 0) {
-		initialize_data(name);
-		
-		set_thread_main_function(boost::bind(thread_main, func, data));
-		
+	explicit thread(const boost::function<void ()> func,
+		const std::string &name = std::string(),
+		unsigned int stack_size = 0)
+		: boost::thread()
+	{
+		context = thread_local_context::make_shared_ptr();
+		context->thread_name = make_thread_name(name);
+		thread_info = make_thread_info(boost::bind(thread_main, func, context));
+
 		unsigned long min_stack_size;
 		bool stack_min_size_defined;
 		bool round_stack_size;
@@ -173,60 +118,27 @@ public:
 				stack_size = stack_size - (stack_size % page_size) + page_size;
 			}
 		}
-		
-		start_thread(stack_size);
+
+		attributes attrs;
+		attrs.set_stack_size(stack_size);
+		start_thread(attrs);
 	}
 	
 	/**
 	 * Return this thread's name. The name was set during construction.
 	 */
-	std::string name() const throw() {
-		return data->name;
-	}
+	std::string name() const throw();
 	
 	/**
 	 * Return the current backtrace of the thread of execution, as a string.
 	 */
-	std::string backtrace() const throw() {
-		#ifdef OXT_BACKTRACE_IS_ENABLED
-			boost::mutex::scoped_lock l(data->registration_lock);
-			if (data->registration == NULL) {
-				if (data->done) {
-					return "     (no backtrace: thread has quit)";
-				} else {
-					return "     (no backtrace: thread hasn't been started yet)";
-				}
-			} else {
-				spin_lock::scoped_lock l2(*data->registration->backtrace_lock);
-				return _format_backtrace(data->registration->backtrace);
-			}
-		#else
-			return "    (backtrace support disabled during compile time)";
-		#endif
-	}
+	std::string backtrace() const throw();
 	
 	/**
 	 * Return the backtraces of all oxt::thread threads, as well as that of the
 	 * main thread, in a nicely formatted string.
 	 */
-	static std::string all_backtraces() throw() {
-		#ifdef OXT_BACKTRACE_IS_ENABLED
-			boost::mutex::scoped_lock l(_thread_registration_mutex);
-			list<thread_registration *>::const_iterator it;
-			std::stringstream result;
-			
-			for (it = _registered_threads.begin(); it != _registered_threads.end(); it++) {
-				thread_registration *r = *it;
-				result << "Thread '" << r->name << "':" << endl;
-				
-				spin_lock::scoped_lock l(*r->backtrace_lock);
-				result << _format_backtrace(r->backtrace) << endl;
-			}
-			return result.str();
-		#else
-			return "(backtrace support disabled during compile time)";
-		#endif
-	}
+	static std::string all_backtraces() throw();
 	
 	/**
 	 * Interrupt the thread. This method behaves just like
@@ -240,17 +152,7 @@ public:
 	 * interrupt_and_join() is a convenience method that implements this
 	 * pattern.
 	 */
-	void interrupt(bool interruptSyscalls = true) {
-		int ret;
-		
-		boost::thread::interrupt();
-		if (interruptSyscalls) {
-			do {
-				ret = pthread_kill(native_handle(),
-					INTERRUPTION_SIGNAL);
-			} while (ret == EINTR);
-		}
-	}
+	void interrupt(bool interruptSyscalls = true);
 	
 	/**
 	 * Keep interrupting the thread until it's done, then join it.
diff --git a/ext/oxt/tracable_exception.cpp b/ext/oxt/tracable_exception.cpp
deleted file mode 100644
index 2d14418..0000000
--- a/ext/oxt/tracable_exception.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * OXT - OS eXtensions for boosT
- * Provides important functionality necessary for writing robust server software.
- *
- * Copyright (c) 2010 Phusion
- *
- * 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
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#include "tracable_exception.hpp"
-#include "backtrace.hpp"
-
-#ifdef OXT_BACKTRACE_IS_ENABLED
-
-#include <boost/thread/mutex.hpp>
-#include "macros.hpp"
-
-namespace oxt {
-
-using namespace std;
-
-tracable_exception::tracable_exception() {
-	vector<trace_point *> *backtrace_list;
-	spin_lock *lock;
-	if (OXT_LIKELY(_get_backtrace_list_and_its_lock(&backtrace_list, &lock))) {
-		spin_lock::scoped_lock l(*lock);
-		vector<trace_point *>::const_iterator it;
-		
-		for (it = backtrace_list->begin(); it != backtrace_list->end(); it++) {
-			trace_point *p = new trace_point(
-				(*it)->function,
-				(*it)->source,
-				(*it)->line,
-				true);
-			backtrace_copy.push_back(p);
-		}
-	}
-}
-
-tracable_exception::tracable_exception(const tracable_exception &other)
-	: std::exception()
-{
-	list<trace_point *>::const_iterator it;
-	for (it = other.backtrace_copy.begin(); it != other.backtrace_copy.end(); it++) {
-		trace_point *p = new trace_point(
-			(*it)->function,
-			(*it)->source,
-			(*it)->line,
-			true);
-		backtrace_copy.push_back(p);
-	}
-}
-
-tracable_exception::~tracable_exception() throw() {
-	list<trace_point *>::iterator it;
-	for (it = backtrace_copy.begin(); it != backtrace_copy.end(); it++) {
-		delete *it;
-	}
-}
-
-string
-tracable_exception::backtrace() const throw() {
-	return _format_backtrace(&backtrace_copy);
-}
-
-const char *
-tracable_exception::what() const throw() {
-	return "oxt::tracable_exception";
-}
-
-} // namespace oxt
-
-#endif
-
diff --git a/ext/ruby/extconf.rb b/ext/ruby/extconf.rb
index 00d9b8e..1a094f8 100644
--- a/ext/ruby/extconf.rb
+++ b/ext/ruby/extconf.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -23,6 +23,7 @@
 require 'mkmf'
 $LIBS = ""
 $CFLAGS << " -g"
+$LIBS << " -lpthread"
 
 if RUBY_PLATFORM =~ /solaris/
 	have_library('xnet')
diff --git a/ext/ruby/passenger_native_support.c b/ext/ruby/passenger_native_support.c
index 0187b83..2c4b182 100644
--- a/ext/ruby/passenger_native_support.c
+++ b/ext/ruby/passenger_native_support.c
@@ -1,6 +1,6 @@
 /*
- *  Phusion Passenger - http://www.modrails.com/
- *  Copyright (c) 2010 Phusion
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2010-2013 Phusion
  *
  *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
  *
@@ -29,10 +29,12 @@
 	#include "ruby/io.h"
 #else
 	#include "rubysig.h"
+	#include "rubyio.h"
 #endif
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
+#include <sys/wait.h>
 #include <sys/un.h>
 #include <sys/socket.h>
 #include <sys/uio.h>
@@ -47,12 +49,12 @@
 #include <limits.h>
 #include <grp.h>
 #include <signal.h>
+#include <pthread.h>
 #ifdef HAVE_ALLOCA_H
 	#include <alloca.h>
 #endif
 #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
 	#define HAVE_KQUEUE
-	#include <pthread.h>
 	#include <sys/event.h>
 	#include <sys/time.h>
 #endif
@@ -84,213 +86,6 @@ static VALUE S_ProcessTimes;
 #endif
 
 /*
- * call-seq: send_fd(socket_fd, fd_to_send)
- *
- * Send a file descriptor over the given Unix socket. You do not have to call
- * this function directly. A convenience wrapper is provided by IO#send_io.
- *
- * - +socket_fd+ (integer): The file descriptor of the socket.
- * - +fd_to_send+ (integer): The file descriptor to send.
- * - Raises +SystemCallError+ if something went wrong.
- */
-static VALUE
-send_fd(VALUE self, VALUE socket_fd, VALUE fd_to_send) {
-	struct msghdr msg;
-	struct iovec vec;
-	char dummy[1];
-	#if defined(__APPLE__) || defined(__SOLARIS__) || defined(__arm__)
-		struct {
-			struct cmsghdr header;
-			int fd;
-		} control_data;
-	#else
-		char control_data[CMSG_SPACE(sizeof(int))];
-	#endif
-	struct cmsghdr *control_header;
-	int control_payload;
-	
-	msg.msg_name = NULL;
-	msg.msg_namelen = 0;
-	
-	/* Linux and Solaris require msg_iov to be non-NULL. */
-	dummy[0]       = '\0';
-	vec.iov_base   = dummy;
-	vec.iov_len    = sizeof(dummy);
-	msg.msg_iov    = &vec;
-	msg.msg_iovlen = 1;
-	
-	msg.msg_control    = (caddr_t) &control_data;
-	msg.msg_controllen = sizeof(control_data);
-	msg.msg_flags      = 0;
-	
-	control_header = CMSG_FIRSTHDR(&msg);
-	control_header->cmsg_level = SOL_SOCKET;
-	control_header->cmsg_type  = SCM_RIGHTS;
-	control_payload = NUM2INT(fd_to_send);
-	#if defined(__APPLE__) || defined(__SOLARIS__) || defined(__arm__)
-		control_header->cmsg_len = sizeof(control_data);
-		control_data.fd = control_payload;
-	#else
-		control_header->cmsg_len = CMSG_LEN(sizeof(int));
-		memcpy(CMSG_DATA(control_header), &control_payload, sizeof(int));
-	#endif
-	
-	if (sendmsg(NUM2INT(socket_fd), &msg, 0) == -1) {
-		rb_sys_fail("sendmsg(2)");
-		return Qnil;
-	}
-	
-	return Qnil;
-}
-
-/*
- * call-seq: recv_fd(socket_fd)
- *
- * Receive a file descriptor from the given Unix socket. Returns the received
- * file descriptor as an integer. Raises +SystemCallError+ if something went
- * wrong.
- *
- * You do not have call this method directly. A convenience wrapper is
- * provided by IO#recv_io.
- */
-static VALUE
-recv_fd(VALUE self, VALUE socket_fd) {
-	struct msghdr msg;
-	struct iovec vec;
-	char dummy[1];
-	#if defined(__APPLE__) || defined(__SOLARIS__) || defined(__arm__)
-		// File descriptor passing macros (CMSG_*) seem to be broken
-		// on 64-bit MacOS X. This structure works around the problem.
-		struct {
-			struct cmsghdr header;
-			int fd;
-		} control_data;
-		#define EXPECTED_CMSG_LEN sizeof(control_data)
-	#else
-		char control_data[CMSG_SPACE(sizeof(int))];
-		#define EXPECTED_CMSG_LEN CMSG_LEN(sizeof(int))
-	#endif
-	struct cmsghdr *control_header;
-
-	msg.msg_name    = NULL;
-	msg.msg_namelen = 0;
-	
-	dummy[0]       = '\0';
-	vec.iov_base   = dummy;
-	vec.iov_len    = sizeof(dummy);
-	msg.msg_iov    = &vec;
-	msg.msg_iovlen = 1;
-
-	msg.msg_control    = (caddr_t) &control_data;
-	msg.msg_controllen = sizeof(control_data);
-	msg.msg_flags      = 0;
-	
-	if (recvmsg(NUM2INT(socket_fd), &msg, 0) == -1) {
-		rb_sys_fail("Cannot read file descriptor with recvmsg()");
-		return Qnil;
-	}
-	
-	control_header = CMSG_FIRSTHDR(&msg);
-	if (control_header == NULL) {
-		rb_raise(rb_eIOError, "No valid file descriptor received.");
-		return Qnil;
-	}
-	if (control_header->cmsg_len   != EXPECTED_CMSG_LEN
-	 || control_header->cmsg_level != SOL_SOCKET
-	 || control_header->cmsg_type  != SCM_RIGHTS) {
-		rb_raise(rb_eIOError, "No valid file descriptor received.");
-		return Qnil;
-	}
-	#if defined(__APPLE__) || defined(__SOLARIS__) || defined(__arm__)
-		return INT2NUM(control_data.fd);
-	#else
-		return INT2NUM(*((int *) CMSG_DATA(control_header)));
-	#endif
-}
-
-/*
- * call-seq: create_unix_socket(filename, backlog)
- *
- * Create a SOCK_STREAM server Unix socket. Unlike Ruby's UNIXServer class,
- * this function is also able to create Unix sockets on the abstract namespace
- * by prepending the filename with a null byte.
- *
- * - +filename+ (string): The filename of the Unix socket to create.
- * - +backlog+ (integer): The backlog to use for listening on the socket.
- * - Returns: The file descriptor of the created Unix socket, as an integer.
- * - Raises +SystemCallError+ if something went wrong.
- */
-static VALUE
-create_unix_socket(VALUE self, VALUE filename, VALUE backlog) {
-	int fd, ret;
-	struct sockaddr_un addr;
-	const char *filename_str;
-	long filename_length;
-	
-	filename_str = RSTRING_PTR(filename);
-	filename_length = RSTRING_LEN(filename);
-	
-	fd = socket(PF_UNIX, SOCK_STREAM, 0);
-	if (fd == -1) {
-		rb_sys_fail("Cannot create a Unix socket");
-		return Qnil;
-	}
-	
-	addr.sun_family = AF_UNIX;
-	memcpy(addr.sun_path, filename_str,
-		MIN((long) filename_length, (long) sizeof(addr.sun_path)));
-	addr.sun_path[sizeof(addr.sun_path) - 1] = '\0';
-	
-	ret = bind(fd, (const struct sockaddr *) &addr, sizeof(addr));
-	if (ret == -1) {
-		int e = errno;
-		close(fd);
-		errno = e;
-		rb_sys_fail("Cannot bind Unix socket");
-		return Qnil;
-	}
-	
-	ret = listen(fd, NUM2INT(backlog));
-	if (ret == -1) {
-		int e = errno;
-		close(fd);
-		errno = e;
-		rb_sys_fail("Cannot listen on Unix socket");
-		return Qnil;
-	}
-	return INT2NUM(fd);
-}
-
-/*
- * call-seq: close_all_file_descriptors(exceptions)
- *
- * Close all file descriptors, except those given in the +exceptions+ array.
- * For example, the following would close all file descriptors except standard
- * input (0) and standard output (1).
- *
- *  close_all_file_descriptors([0, 1])
- */
-static VALUE
-close_all_file_descriptors(VALUE self, VALUE exceptions) {
-	long i, j;
-	
-	for (i = sysconf(_SC_OPEN_MAX) - 1; i >= 0; i--) {
-		int is_exception = 0;
-		#ifdef RB_RESERVED_FD_P
-			is_exception = rb_reserved_fd_p((int) i);
-		#endif
-		for (j = 0; j < RARRAY_LEN(exceptions) && !is_exception; j++) {
-			long fd = NUM2INT(rb_ary_entry(exceptions, j));
-			is_exception = i == fd;
-		}
-		if (!is_exception) {
-			close((int) i);
-		}
-	}
-	return Qnil;
-}
-
-/*
  * call-seq: disable_stdio_buffering
  *
  * Disables any kind of buffering on the C +stdout+ and +stderr+ variables,
@@ -586,29 +381,6 @@ f_writev3(VALUE self, VALUE fd, VALUE components1, VALUE components2, VALUE comp
 	return f_generic_writev(fd, array_of_components, 3);
 }
 
-/**
- * Ruby's implementations of initgroups, setgid and setuid are broken various ways,
- * sigh...
- * Ruby's setgid and setuid can't handle negative UIDs and initgroups is just broken.
- * Work around it by using our own implementation.
- */
-static VALUE
-switch_user(VALUE self, VALUE username, VALUE uid, VALUE gid) {
-	uid_t the_uid = (uid_t) NUM2LL(uid);
-	gid_t the_gid = (gid_t) NUM2LL(gid);
-	
-	if (initgroups(RSTRING_PTR(username), the_gid) == -1) {
-		rb_sys_fail("initgroups");
-	}
-	if (setgid(the_gid) == -1) {
-		rb_sys_fail("setgid");
-	}
-	if (setuid(the_uid) == -1) {
-		rb_sys_fail("setuid");
-	}
-	return Qnil;
-}
-
 static VALUE
 process_times(VALUE self) {
 	struct rusage usage;
@@ -623,6 +395,82 @@ process_times(VALUE self) {
 	return rb_struct_new(S_ProcessTimes, rb_ull2inum(utime), rb_ull2inum(stime));
 }
 
+static void *
+detach_process_main(void *arg) {
+	pid_t pid = (pid_t) (long) arg;
+	int ret;
+	do {
+		ret = waitpid(pid, NULL, 0);
+	} while (ret == -1 && errno == EINTR);
+	return NULL;
+}
+
+static VALUE
+detach_process(VALUE self, VALUE pid) {
+	pthread_t thr;
+	pthread_attr_t attr;
+	size_t stack_size = 96 * 1024;
+	
+	unsigned long min_stack_size;
+	int stack_min_size_defined;
+	int round_stack_size;
+	
+	#ifdef PTHREAD_STACK_MIN
+		// PTHREAD_STACK_MIN may not be a constant macro so we need
+		// to evaluate it dynamically.
+		min_stack_size = PTHREAD_STACK_MIN;
+		stack_min_size_defined = 1;
+	#else
+		// Assume minimum stack size is 128 KB.
+		min_stack_size = 128 * 1024;
+		stack_min_size_defined = 0;
+	#endif
+	if (stack_size != 0 && stack_size < min_stack_size) {
+		stack_size = min_stack_size;
+		round_stack_size = !stack_min_size_defined;
+	} else {
+		round_stack_size = 1;
+	}
+	
+	if (round_stack_size) {
+		// Round stack size up to page boundary.
+		long page_size;
+		#if defined(_SC_PAGESIZE)
+			page_size = sysconf(_SC_PAGESIZE);
+		#elif defined(_SC_PAGE_SIZE)
+			page_size = sysconf(_SC_PAGE_SIZE);
+		#elif defined(PAGESIZE)
+			page_size = sysconf(PAGESIZE);
+		#elif defined(PAGE_SIZE)
+			page_size = sysconf(PAGE_SIZE);
+		#else
+			page_size = getpagesize();
+		#endif
+		if (stack_size % page_size != 0) {
+			stack_size = stack_size - (stack_size % page_size) + page_size;
+		}
+	}
+	
+	pthread_attr_init(&attr);
+	pthread_attr_setdetachstate(&attr, 1);
+	pthread_attr_setstacksize(&attr, stack_size);
+	pthread_create(&thr, &attr, detach_process_main, (void *) NUM2LONG(pid));
+	pthread_attr_destroy(&attr);
+	return Qnil;
+}
+
+/**
+ * Freeze the current process forever. On Ruby 1.9 this never unlocks the GIL.
+ * Useful for testing purposes.
+ */
+static VALUE
+freeze_process(VALUE self) {
+	while (1) {
+		usleep(60 * 1000000);
+	}
+	return Qnil;
+}
+
 #if defined(HAVE_KQUEUE) || defined(IN_DOXYGEN)
 typedef struct {
 	VALUE klass;
@@ -824,6 +672,7 @@ fs_watcher_new(VALUE klass, VALUE filenames, VALUE termination_pipe) {
 	if (status) {
 		fs_watcher_free(watcher);
 		rb_jump_tag(status);
+		return Qnil;
 	} else {
 		return result;
 	}
@@ -1010,17 +859,14 @@ Init_passenger_native_support() {
 	
 	S_ProcessTimes = rb_struct_define("ProcessTimes", "utime", "stime", NULL);
 	
-	rb_define_singleton_method(mNativeSupport, "send_fd", send_fd, 2);
-	rb_define_singleton_method(mNativeSupport, "recv_fd", recv_fd, 1);
-	rb_define_singleton_method(mNativeSupport, "create_unix_socket", create_unix_socket, 2);
-	rb_define_singleton_method(mNativeSupport, "close_all_file_descriptors", close_all_file_descriptors, 1);
 	rb_define_singleton_method(mNativeSupport, "disable_stdio_buffering", disable_stdio_buffering, 0);
 	rb_define_singleton_method(mNativeSupport, "split_by_null_into_hash", split_by_null_into_hash, 1);
 	rb_define_singleton_method(mNativeSupport, "writev", f_writev, 2);
 	rb_define_singleton_method(mNativeSupport, "writev2", f_writev2, 3);
 	rb_define_singleton_method(mNativeSupport, "writev3", f_writev3, 4);
-	rb_define_singleton_method(mNativeSupport, "switch_user", switch_user, 3);
 	rb_define_singleton_method(mNativeSupport, "process_times", process_times, 0);
+	rb_define_singleton_method(mNativeSupport, "detach_process", detach_process, 1);
+	rb_define_singleton_method(mNativeSupport, "freeze_process", freeze_process, 0);
 	
 	#ifdef HAVE_KQUEUE
 		cFileSystemWatcher = rb_define_class_under(mNativeSupport,
diff --git a/helper-scripts/backtrace-sanitizer.rb b/helper-scripts/backtrace-sanitizer.rb
new file mode 100755
index 0000000..e69d107
--- /dev/null
+++ b/helper-scripts/backtrace-sanitizer.rb
@@ -0,0 +1,116 @@
+#!/usr/bin/env ruby
+# Parses output of the glibc backtrace() function and
+# translates addresses into function names and source
+# file locations.
+
+class Addr2line
+	attr_reader :stdin, :stdout, :pid
+
+	def initialize(filename)
+		a, b = IO.pipe
+		c, d = IO.pipe
+		@pid = fork do
+			STDIN.reopen(a)
+			b.close
+			STDOUT.reopen(d)
+			c.close
+			exec("addr2line", "-Cfie", filename)
+		end
+		a.close
+		d.close
+		@stdin = b
+		@stdout = c
+		@stdin.sync = @stdout.sync = true
+	end
+
+	def query(address)
+		@stdin.write("#{address}\n")
+		function = @stdout.readline
+		source = @stdout.readline
+		function.strip!
+		source.strip!
+		return [function, source]
+	end
+
+	def close
+		@stdin.close
+		@stdout.close
+		Process.kill('KILL', @pid)
+		Process.waitpid(@pid) rescue nil
+	end
+end
+
+def passthrough(input, output)
+	while !input.eof?
+		data = input.readline
+		output.write(data)
+		output.flush
+	end
+end
+
+input = STDIN
+output = STDERR
+output.sync = true
+output.puts "Using backtrace sanitizer."
+argv0, pid_or_filename = ARGV
+if pid_or_filename =~ /\A\d+\Z/
+	begin
+		exe_filename = File.expand_path(File.readlink("/proc/#{pid_or_filename}/exe"))
+	rescue Errno::ENOENT, Errno::EACCES => e
+		warn "*** backtrace-sanitizer warning: #{e} -> passthrough input"
+		passthrough(input, output)
+		exit
+	end
+else
+	exe_filename = File.expand_path(pid_or_filename)
+end
+exe_basename = File.basename(exe_filename)
+addr2lines = {}
+
+begin
+	while !input.eof?
+		line = input.readline.strip
+		# Example lines:
+		# ./test() [0x400b64]
+		# /lib/libc.so.6(__libc_start_main+0xfd) [0x7fcc0ad00c8d]
+		if line =~ /(.*)\[(.*?)\]$/
+			# Split line into:
+			# subject: /lib/libc.so.6(__libc_start_main+0xfd)
+			# address: 0x7fcc0ad00c8d
+			subject = $1
+			address = $2
+			subject.strip!
+			subject =~ /(.*?)(\((.*?)\))?$/
+			# Split subject into:
+			# file: /lib/libc.so.6
+			# context: __libc_start_main+0xfd
+			file = $1
+			context = $3
+			file.strip!
+			context = nil if context && context.empty?
+
+			if file =~ /\A\// && File.exist?(file)
+				filename = file
+			elsif file == argv0 || file == exe_filename || file == exe_basename
+				filename = exe_filename
+			else
+				filename = nil
+			end
+			if filename.nil?
+				output.puts line
+			else
+				addr2line = (addr2lines[filename] ||= Addr2line.new(filename))
+				function, source = addr2line.query(address)
+				new_context = "#{function} at #{source}"
+				new_context << "; #{context}" if context
+				output.puts "#{file}(#{new_context}) [#{address}]"
+			end
+		else
+			output.puts line
+		end
+	end
+ensure
+	addr2lines.each_value do |addr2line|
+		addr2line.close
+	end
+end
diff --git a/helper-scripts/classic-rails-loader.rb b/helper-scripts/classic-rails-loader.rb
new file mode 100644
index 0000000..d097338
--- /dev/null
+++ b/helper-scripts/classic-rails-loader.rb
@@ -0,0 +1,137 @@
+#!/usr/bin/env ruby
+module PhusionPassenger
+module App
+	def self.options
+		return @@options
+	end
+
+	def self.format_exception(e)
+		result = "#{e} (#{e.class})"
+		if !e.backtrace.empty?
+			result << "\n  " << e.backtrace.join("\n  ")
+		end
+		return result
+	end
+
+	def self.exit_code_for_exception(e)
+		if e.is_a?(SystemExit)
+			return e.status
+		else
+			return 1
+		end
+	end
+	
+	def self.handshake_and_read_startup_request
+		STDOUT.sync = true
+		STDERR.sync = true
+		puts "!> I have control 1.0"
+		abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n"
+		
+		@@options = {}
+		while (line = STDIN.readline) != "\n"
+			name, value = line.strip.split(/: */, 2)
+			@@options[name] = value
+		end
+	end
+	
+	def self.init_passenger
+		$LOAD_PATH.unshift(options["ruby_libdir"])
+		require 'phusion_passenger'
+		PhusionPassenger.locate_directories(options["passenger_root"])
+		require 'phusion_passenger/native_support'
+		require 'phusion_passenger/ruby_core_enhancements'
+		require 'phusion_passenger/utils/tmpdir'
+		require 'phusion_passenger/loader_shared_helpers'
+		require 'phusion_passenger/request_handler'
+		LoaderSharedHelpers.init
+		@@options = LoaderSharedHelpers.sanitize_spawn_options(@@options)
+		Utils.passenger_tmpdir = options["generation_dir"]
+		if defined?(NativeSupport)
+			NativeSupport.disable_stdio_buffering
+		end
+	rescue Exception => e
+		LoaderSharedHelpers.about_to_abort(e) if defined?(LoaderSharedHelpers)
+		puts "!> Error"
+		puts "!> "
+		puts format_exception(e)
+		exit exit_code_for_exception(e)
+	end
+	
+	def self.load_app
+		LoaderSharedHelpers.before_loading_app_code_step1('config/environment.rb', options)
+		LoaderSharedHelpers.before_loading_app_code_step2(options)
+		
+		require File.expand_path('config/environment')
+		require 'rails/version' if !defined?(Rails::VERSION)
+		if Rails::VERSION::MAJOR >= 3
+			LoaderSharedHelpers.about_to_abort
+			puts "!> Error"
+			puts "!> "
+			puts "!> This application is a Rails #{Rails::VERSION::MAJOR} " +
+				"application, but it was wrongly detected as a Rails " +
+				"1 or Rails 2 application. This is probably a bug in " +
+				"Phusion Passenger, so please report it."
+			exit 1
+		end
+		if !defined?(Dispatcher)
+			require 'dispatcher'
+		end
+		
+		# - No point in preloading the application sources if the garbage collector
+		#   isn't copy-on-write friendly.
+		# - Rails >= 2.2 already preloads application sources by default, so no need
+		#   to do that again.
+		if GC.copy_on_write_friendly? && !rails_will_preload_app_code?
+			# Rails 2.2+ uses application_controller.rb while old
+			# versions use application.rb.
+			require_dependency 'application'
+			['models','controllers','helpers'].each do |section|
+				Dir.glob("app/#{section}}/*.rb").each do |file|
+					require_dependency File.expand_path(file)
+				end
+			end
+		end
+		
+		LoaderSharedHelpers.after_loading_app_code(options)
+
+		if Rails::VERSION::STRING >= '2.3.0'
+			require 'phusion_passenger/rack/thread_handler_extension'
+			RequestHandler::ThreadHandler.send(:include, Rack::ThreadHandlerExtension)
+			app = ActionController::Dispatcher.new
+		else
+			require 'phusion_passenger/classic_rails/thread_handler_extension'
+			RequestHandler::ThreadHandler.send(:include, ClassicRails::ThreadHandlerExtension)
+			app = nil
+		end
+		handler = RequestHandler.new(STDIN, options.merge("app" => app))
+
+		LoaderSharedHelpers.before_handling_requests(false, options)
+		return handler
+		
+	rescue Exception => e
+		LoaderSharedHelpers.about_to_abort(e)
+		puts "!> Error"
+		puts "!> "
+		puts format_exception(e)
+		exit exit_code_for_exception(e)
+	end
+	
+	def self.rails_will_preload_app_code?
+		return ::Rails::Initializer.method_defined?(:load_application_classes)
+	end
+	
+	
+	################## Main code ##################
+	
+	
+	handshake_and_read_startup_request
+	init_passenger
+	handler = load_app
+	puts "!> Ready"
+	LoaderSharedHelpers.advertise_sockets(STDOUT, handler)
+	puts "!> "
+	handler.main_loop
+	LoaderSharedHelpers.after_handling_requests
+	
+end # module App
+end # module PhusionPassenger
diff --git a/helper-scripts/classic-rails-preloader.rb b/helper-scripts/classic-rails-preloader.rb
new file mode 100644
index 0000000..e16af1d
--- /dev/null
+++ b/helper-scripts/classic-rails-preloader.rb
@@ -0,0 +1,164 @@
+#!/usr/bin/env ruby
+# encoding: utf-8
+GC.copy_on_write_friendly = true if GC.respond_to?(:copy_on_write_friendly=)
+
+module PhusionPassenger
+module App
+	def self.options
+		return @@options
+	end
+
+	def self.format_exception(e)
+		result = "#{e} (#{e.class})"
+		if !e.backtrace.empty?
+			result << "\n  " << e.backtrace.join("\n  ")
+		end
+		return result
+	end
+
+	def self.exit_code_for_exception(e)
+		if e.is_a?(SystemExit)
+			return e.status
+		else
+			return 1
+		end
+	end
+	
+	def self.handshake_and_read_startup_request
+		STDOUT.sync = true
+		STDERR.sync = true
+		puts "!> I have control 1.0"
+		abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n"
+		
+		@@options = {}
+		while (line = STDIN.readline) != "\n"
+			name, value = line.strip.split(/: */, 2)
+			@@options[name] = value
+		end
+	end
+	
+	def self.init_passenger
+		$LOAD_PATH.unshift(options["ruby_libdir"])
+		require 'phusion_passenger'
+		PhusionPassenger.locate_directories(options["passenger_root"])
+		require 'phusion_passenger/native_support'
+		require 'phusion_passenger/ruby_core_enhancements'
+		require 'phusion_passenger/utils/tmpdir'
+		require 'phusion_passenger/preloader_shared_helpers'
+		require 'phusion_passenger/loader_shared_helpers'
+		require 'phusion_passenger/request_handler'
+		LoaderSharedHelpers.init
+		PreloaderSharedHelpers.init
+		@@options = LoaderSharedHelpers.sanitize_spawn_options(@@options)
+		Utils.passenger_tmpdir = options["generation_dir"]
+		if defined?(NativeSupport)
+			NativeSupport.disable_stdio_buffering
+		end
+	rescue Exception => e
+		LoaderSharedHelpers.about_to_abort(e) if defined?(LoaderSharedHelpers)
+		puts "!> Error"
+		puts "!> "
+		puts format_exception(e)
+		exit exit_code_for_exception(e)
+	end
+	
+	def self.preload_app
+		LoaderSharedHelpers.before_loading_app_code_step1('config/environment.rb', options)
+		LoaderSharedHelpers.before_loading_app_code_step2(options)
+		
+		require File.expand_path('config/environment')
+		require 'rails/version' if !defined?(Rails::VERSION)
+		if Rails::VERSION::MAJOR >= 3
+			LoaderSharedHelpers.about_to_abort
+			puts "!> Error"
+			puts "!> "
+			puts "This application is a Rails #{Rails::VERSION::MAJOR} " +
+				"application, but it was wrongly detected as a Rails " +
+				"1 or Rails 2 application. This is probably a bug in " +
+				"Phusion Passenger, so please report it."
+			exit 1
+		end
+		if !defined?(Dispatcher)
+			require 'dispatcher'
+		end
+		
+		# - No point in preloading the application sources if the garbage collector
+		#   isn't copy-on-write friendly.
+		# - Rails >= 2.2 already preloads application sources by default, so no need
+		#   to do that again.
+		if GC.copy_on_write_friendly? && !rails_will_preload_app_code?
+			# Rails 2.2+ uses application_controller.rb while old
+			# versions use application.rb.
+			require_dependency 'application'
+			['models','controllers','helpers'].each do |section|
+				Dir.glob("app/#{section}}/*.rb").each do |file|
+					require_dependency File.expand_path(file)
+				end
+			end
+		end
+		
+		LoaderSharedHelpers.after_loading_app_code(options)
+		
+	rescue Exception => e
+		LoaderSharedHelpers.about_to_abort(e)
+		puts "!> Error"
+		puts "!> "
+		puts format_exception(e)
+		exit exit_code_for_exception(e)
+	end
+	
+	def self.rails_will_preload_app_code?
+		return ::Rails::Initializer.method_defined?(:load_application_classes)
+	end
+	
+	def self.negotiate_spawn_command
+		puts "!> I have control 1.0"
+		abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n"
+		
+		begin
+			while (line = STDIN.readline) != "\n"
+				name, value = line.strip.split(/: */, 2)
+				options[name] = value
+			end
+			@@options = LoaderSharedHelpers.sanitize_spawn_options(@@options)
+			
+			LoaderSharedHelpers.before_handling_requests(true, options)
+			if Rails::VERSION::STRING >= '2.3.0'
+				require 'phusion_passenger/rack/thread_handler_extension'
+				RequestHandler::ThreadHandler.send(:include, Rack::ThreadHandlerExtension)
+				app = ActionController::Dispatcher.new
+			else
+				require 'phusion_passenger/classic_rails/thread_handler_extension'
+				RequestHandler::ThreadHandler.send(:include, ClassicRails::ThreadHandlerExtension)
+				app = nil
+			end
+			handler = RequestHandler.new(STDIN, options.merge("app" => app))
+		rescue Exception => e
+			LoaderSharedHelpers.about_to_abort(e)
+			puts "!> Error"
+			puts "!> "
+			puts format_exception(e)
+			exit exit_code_for_exception(e)
+		end
+
+		puts "!> Ready"
+		LoaderSharedHelpers.advertise_sockets(STDOUT, handler)
+		puts "!> "
+		return handler
+	end
+	
+	
+	################## Main code ##################
+	
+	
+	handshake_and_read_startup_request
+	init_passenger
+	preload_app
+	if PreloaderSharedHelpers.run_main_loop(options) == :forked
+		handler = negotiate_spawn_command
+		handler.main_loop
+		LoaderSharedHelpers.after_handling_requests
+	end
+	
+end # module App
+end # module PhusionPassenger
diff --git a/helper-scripts/node-loader.js b/helper-scripts/node-loader.js
new file mode 100644
index 0000000..a3d5a48
--- /dev/null
+++ b/helper-scripts/node-loader.js
@@ -0,0 +1,314 @@
+/*
+ *  Phusion Passenger - https://www.phusionpassenger.com/
+ *  Copyright (c) 2012 Phusion
+ *
+ *  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+ *
+ *  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
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *  THE SOFTWARE.
+ */
+
+var EventEmitter = require('events').EventEmitter;
+var net = require('net');
+GLOBAL.PhusionPassenger = new EventEmitter();
+
+/**
+ * Class for reading a stream line-by-line.
+ * Usage:
+ *
+ * reader = new LineReader(stream);
+ * reader.readLine(function(line) {
+ *     ...
+ *     // When done:
+ *     reader.close();
+ * });
+ */
+function LineReader(stream) {
+	var self = this;
+	this.stream = stream;
+
+	this.buffer = '';
+	this.lines = [];
+	this.callbacks = [];
+
+	function handleLineBuffer() {
+		if (self.lineBufferIsFull()) {
+			stream.pause();
+			self.paused = true;
+		}
+
+		while (self.buffer != undefined && self.lines.length > 0 && self.callbacks.length > 0) {
+			line = self.lines.shift();
+			callback = self.callbacks.shift();
+			callback(line);
+		}
+
+		if (self.buffer != undefined && !self.lineBufferIsFull() && self.paused) {
+			self.paused = false;
+			self.stream.resume();
+		}
+	}
+
+	function onData(data) {
+		var index, line, callback;
+
+		if (self.buffer == undefined) {
+			// Already closed.
+			return;
+		}
+
+		self.buffer += data;
+		while ((index = self.buffer.indexOf("\n")) != -1) {
+			line = self.buffer.substr(0, index + 1);
+			self.buffer = self.buffer.substr(index + 1);
+			self.lines.push(line);
+		}
+		handleLineBuffer();
+	}
+
+	function onEnd() {
+		if (self.buffer != undefined) {
+			self.lines.push(self.buffer);
+			self.buffer = '';
+			handleLineBuffer();
+			if (self.onEof) {
+				self.onEof();
+			}
+		}
+	}
+
+	this.onData = onData;
+	this.onEnd  = onEnd;
+	stream.on('data', onData);
+	stream.on('end', onEnd);
+	stream.resume();
+}
+
+LineReader.prototype.close = function() {
+	this.stream.pause();
+	this.stream.removeListener('data', this.onData);
+	this.stream.removeListener('end', this.onEnd);
+	this.buffer = undefined;
+	this.lines = undefined;
+}
+
+LineReader.prototype.lineBufferIsFull = function() {
+	return this.lines.length > 0;
+}
+
+LineReader.prototype.readLine = function(callback) {
+	if (this.lines.length > 0) {
+		var line = this.lines.shift();
+		if (!this.lineBufferIsFull() && this.paused) {
+			this.paused = false;
+			this.stream.resume();
+		}
+		callback(line);
+	} else {
+		this.callbacks.push(callback);
+	}
+}
+
+
+const
+	SPP_PARSING_SIZE = 0,
+	SPP_PARSING_HEADERS = 1,
+	SPP_DONE = 10,
+	SPP_ERROR = 11,
+	SPP_ENCODING = 'binary';
+
+function SessionProtocolParser() {
+	this.state = SPP_PARSING_SIZE;
+	this.processed = 0;
+	this.size = 0;
+	this.keys = [];
+}
+
+SessionProtocolParser.prototype.feed = function(buffer) {
+	var consumed = 0;
+	var locallyConsumed;
+
+	while (consumed < buffer.length && this.state != SPP_ERROR && this.state != SPP_DONE) {
+		switch (this.state) {
+		case SPP_PARSING_SIZE:
+			this.size += buffer[consumed] * Math.pow(256, 3 - this.processed);
+			locallyConsumed = 1;
+			this.processed++;
+			if (this.processed == 4) {
+				this.state = SPP_PARSING_HEADERS;
+				this.buffer = new Buffer(this.size);
+				this.processed = 0;
+			}
+			break;
+
+		case SPP_PARSING_HEADERS:
+			locallyConsumed = Math.min(buffer.length - consumed, this.buffer.length - this.processed);
+			buffer.copy(this.buffer, this.processed, consumed, consumed + locallyConsumed);
+			this.processed += locallyConsumed;
+			if (this.processed == this.buffer.length) {
+				this.state = SPP_DONE;
+				this.parse();
+			}
+			break;
+
+		default:
+			console.assert(false);
+			break;
+		}
+
+		consumed += locallyConsumed;
+	}
+
+	return consumed;
+}
+
+SessionProtocolParser.prototype.parse = function() {
+	function findZero(buffer, start) {
+		while (start < buffer.length) {
+			if (buffer[start] == 0) {
+				return start;
+			} else {
+				start++;
+			}
+		}
+		return -1;
+	}
+
+	var start = 0;
+	var key, value;
+
+	while (start < this.buffer.length) {
+		var keyEnd = findZero(this.buffer, start);
+		if (keyEnd != -1 && keyEnd + 1 < this.buffer.length) {
+			var valueStart = keyEnd + 1;
+			var valueEnd   = findZero(this.buffer, valueStart);
+			if (valueEnd != -1) {
+				key = this.buffer.toString(SPP_ENCODING, start, keyEnd);
+				value = this.buffer.toString(SPP_ENCODING, valueStart, valueEnd);
+				start = valueEnd + 1;
+				this.keys.push(key);
+				this[key] = value;
+			} else {
+				start = this.buffer.length;
+			}
+		} else {
+			start = this.buffer.length;
+		}
+	}
+}
+
+//var p = new SessionProtocolParser();
+//p.feed(new Buffer("\x00\x00\x00\x06hi\0ho\0"));
+//process.exit();
+
+
+function RequestHandler(readyCallback, clientCallback) {
+	var self = this;
+
+	function handleNewClient(socket) {
+		var state = 'PARSING_HEADER';
+		var parser = new SessionProtocolParser();
+
+		function handleData(data) {
+			if (state == 'PARSING_HEADER') {
+				parser.feed(data);
+				if (parser.state == SPP_DONE) {
+					state = 'HEADER_SEEN';
+					PhusionPassenger.emit('request', parser, socket);
+				} else if (parser.state == SPP_ERROR) {
+					console.error('Header parse error');
+					socket.destroySoon();
+				}
+			} else {
+				// Do nothing yet.
+			}
+		}
+
+		socket.on('data', handleData);
+	}
+
+	var server = net.createServer({ allowHalfOpen: true }, handleNewClient);
+	this.server = server;
+	server.listen(0, function() {
+		readyCallback(self);
+	});
+}
+
+
+/**************************/
+
+var reader = new LineReader(process.stdin);
+
+function readInitializationHeader() {
+	reader.readLine(function(line) {
+		if (line != "You have control 1.0\n") {
+			console.error('Invalid initialization header');
+			process.exit(1);
+		} else {
+			readOptions();
+		}
+	});
+}
+
+function readOptions() {
+	var options = {};
+
+	function readNextOption() {
+		reader.readLine(function(line) {
+			if (line == "\n") {
+				initialize(options);
+			} else if (line == "") {
+				console.error("End of stream encountered while reading initialization options");
+				process.exit(1);
+			} else {
+				var matches = line.replace(/\n/, '').match(/(.*?) *: *(.*)/);
+				options[matches[1]] = matches[2];
+				readNextOption();
+			}
+		});
+	}
+
+	readNextOption();
+}
+
+function initialize(options) {
+	PhusionPassenger.options = options;
+
+	PhusionPassenger.requestHandler = new RequestHandler(function() {
+		require(options.app_root + '/passenger_node.js');
+		process.stdout.write("!> Ready\n");
+		process.stdout.write("!> socket: main;tcp://127.0.0.1:" +
+			PhusionPassenger.requestHandler.server.address().port +
+			";session;0\n");
+		process.stdout.write("!> \n");
+	});
+
+	reader.close();
+	reader = undefined;
+	process.stdin.on('end', function() {
+		if (PhusionPassenger.listeners('exit').length == 0) {
+			process.exit(0);
+		} else {
+			PhusionPassenger.emit('exit');
+		}
+	});
+	process.stdin.resume();
+}
+
+process.stdout.write("!> I have control 1.0\n");
+readInitializationHeader();
diff --git a/helper-scripts/passenger-spawn-server b/helper-scripts/passenger-spawn-server
deleted file mode 100755
index f685275..0000000
--- a/helper-scripts/passenger-spawn-server
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/bin/env ruby
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'socket'
-
-SERVER_SOCKET_FD = 3
-OWNER_SOCKET_FD  = 4
-
-begin
-	STDOUT.sync = true
-	STDERR.sync = true
-	$0 = "Passenger spawn server"
-	if GC.respond_to?(:copy_on_write_friendly=)
-		GC.copy_on_write_friendly = true
-	end
-	
-	server_socket = UNIXServer.for_fd(SERVER_SOCKET_FD)
-	owner_socket  = UNIXSocket.for_fd(OWNER_SOCKET_FD)
-	begin
-		socket_filename = owner_socket.readline.strip
-		socket_password = owner_socket.readline.strip
-		generation_path = owner_socket.readline.strip
-		logging_agent_address = owner_socket.readline.strip
-		logging_agent_username = owner_socket.readline.strip
-		logging_agent_password_base64 = owner_socket.readline.strip
-		node_name = owner_socket.readline.strip
-		log_level = owner_socket.readline.to_i
-		debug_log_file = owner_socket.readline.strip
-	rescue EOFError
-		exit
-	end
-	
-	# Optimization for decreasing startup time. Since Apache starts the spawn
-	# server twice during startup, we don't want to load the Passenger classes
-	# if we don't need them.
-	# We check whether Apache immediately closes the connection. If so,
-	# we exit without loading the rest of Passenger. If Apache doesn't close
-	# the connection within 4 seconds then we continue with loading Passenger,
-	# so that loading doesn't happen during the first spawn.
-	begin
-		ios = select([server_socket, owner_socket], nil, nil, 4)
-		if ios
-			readable = ios[0]
-			if !readable.include?(server_socket) && readable.include?(owner_socket)
-				exit
-			end
-		end
-	rescue Interrupt
-		exit
-	end
-	
-	source_root = File.expand_path(File.dirname(__FILE__) + "/..")
-	$LOAD_PATH.unshift("#{source_root}/lib")
-	require 'rubygems' rescue nil
-	require 'phusion_passenger'
-	require 'phusion_passenger/debug_logging'
-	require 'phusion_passenger/utils/tmpdir'
-	require 'phusion_passenger/native_support'
-	if defined?(PhusionPassenger::NativeSupport)
-		PhusionPassenger::NativeSupport.disable_stdio_buffering
-	end
-	PhusionPassenger::DebugLogging.log_level = log_level
-	PhusionPassenger::DebugLogging.log_file  = debug_log_file
-	PhusionPassenger::Utils.passenger_tmpdir = generation_path
-	if logging_agent_address.empty?
-		options = {}
-	else
-		options = {
-			"logging_agent_address" => logging_agent_address,
-			"logging_agent_username" => logging_agent_username,
-			"logging_agent_password_base64" => logging_agent_password_base64,
-			"node_name" => node_name
-		}
-	end
-	
-	require 'phusion_passenger/spawn_manager'
-	spawn_manager = PhusionPassenger::SpawnManager.new(options)
-	spawn_manager.start_synchronously(socket_filename, socket_password, server_socket, owner_socket)
-	spawn_manager.cleanup
-rescue => e
-	require 'phusion_passenger/utils'
-	include PhusionPassenger::Utils
-	print_exception("spawn manager", e)
-	exit 10
-end
diff --git a/helper-scripts/prespawn b/helper-scripts/prespawn
index 92062a2..f472155 100755
--- a/helper-scripts/prespawn
+++ b/helper-scripts/prespawn
@@ -1,5 +1,5 @@
 #!/usr/bin/env ruby
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010, 2011 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/helper-scripts/rack-loader.rb b/helper-scripts/rack-loader.rb
new file mode 100644
index 0000000..af4b56b
--- /dev/null
+++ b/helper-scripts/rack-loader.rb
@@ -0,0 +1,106 @@
+#!/usr/bin/env ruby
+# encoding: binary
+module PhusionPassenger
+module App
+	def self.options
+		return @@options
+	end
+	
+	def self.app
+		return @@app
+	end
+
+	def self.format_exception(e)
+		result = "#{e} (#{e.class})"
+		if !e.backtrace.empty?
+			result << "\n  " << e.backtrace.join("\n  ")
+		end
+		return result
+	end
+
+	def self.exit_code_for_exception(e)
+		if e.is_a?(SystemExit)
+			return e.status
+		else
+			return 1
+		end
+	end
+	
+	def self.handshake_and_read_startup_request
+		STDOUT.sync = true
+		STDERR.sync = true
+		puts "!> I have control 1.0"
+		abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n"
+		
+		@@options = {}
+		while (line = STDIN.readline) != "\n"
+			name, value = line.strip.split(/: */, 2)
+			@@options[name] = value
+		end
+	end
+	
+	def self.init_passenger
+		$LOAD_PATH.unshift(options["ruby_libdir"])
+		require 'phusion_passenger'
+		PhusionPassenger.locate_directories(options["passenger_root"])
+		require 'phusion_passenger/native_support'
+		require 'phusion_passenger/ruby_core_enhancements'
+		require 'phusion_passenger/utils/tmpdir'
+		require 'phusion_passenger/loader_shared_helpers'
+		require 'phusion_passenger/request_handler'
+		require 'phusion_passenger/rack/thread_handler_extension'
+		LoaderSharedHelpers.init
+		@@options = LoaderSharedHelpers.sanitize_spawn_options(@@options)
+		Utils.passenger_tmpdir = options["generation_dir"]
+		if defined?(NativeSupport)
+			NativeSupport.disable_stdio_buffering
+		end
+		RequestHandler::ThreadHandler.send(:include, Rack::ThreadHandlerExtension)
+	rescue Exception => e
+		LoaderSharedHelpers.about_to_abort(e) if defined?(LoaderSharedHelpers)
+		puts "!> Error"
+		puts "!> "
+		puts format_exception(e)
+		exit exit_code_for_exception(e)
+	end
+	
+	def self.load_app
+		LoaderSharedHelpers.before_loading_app_code_step1('config.ru', options)
+		LoaderSharedHelpers.run_load_path_setup_code(options)
+		LoaderSharedHelpers.before_loading_app_code_step2(options)
+		
+		require 'rubygems'
+		require 'rack'
+		rackup_file = ENV["RACKUP_FILE"] || options["rackup_file"] || "config.ru"
+		rackup_code = ::File.open(rackup_file, 'rb') do |f|
+			f.read
+		end
+		@@app = eval("Rack::Builder.new {( #{rackup_code}\n )}.to_app",
+			TOPLEVEL_BINDING, rackup_file)
+		
+		LoaderSharedHelpers.after_loading_app_code(options)
+	rescue Exception => e
+		LoaderSharedHelpers.about_to_abort(e)
+		puts "!> Error"
+		puts "!> "
+		puts format_exception(e)
+		exit exit_code_for_exception(e)
+	end
+	
+	
+	################## Main code ##################
+	
+	
+	handshake_and_read_startup_request
+	init_passenger
+	load_app
+	LoaderSharedHelpers.before_handling_requests(false, options)
+	handler = RequestHandler.new(STDIN, options.merge("app" => app))
+	puts "!> Ready"
+	LoaderSharedHelpers.advertise_sockets(STDOUT, handler)
+	puts "!> "
+	handler.main_loop
+	LoaderSharedHelpers.after_handling_requests
+	
+end # module App
+end # module PhusionPassenger
diff --git a/helper-scripts/rack-preloader.rb b/helper-scripts/rack-preloader.rb
new file mode 100644
index 0000000..dfdcbe8
--- /dev/null
+++ b/helper-scripts/rack-preloader.rb
@@ -0,0 +1,135 @@
+#!/usr/bin/env ruby
+# encoding: binary
+GC.copy_on_write_friendly = true if GC.respond_to?(:copy_on_write_friendly=)
+
+module PhusionPassenger
+module App
+	def self.options
+		return @@options
+	end
+	
+	def self.app
+		return @@app
+	end
+
+	def self.format_exception(e)
+		result = "#{e} (#{e.class})"
+		if !e.backtrace.empty?
+			result << "\n  " << e.backtrace.join("\n  ")
+		end
+		return result
+	end
+
+	def self.exit_code_for_exception(e)
+		if e.is_a?(SystemExit)
+			return e.status
+		else
+			return 1
+		end
+	end
+	
+	def self.handshake_and_read_startup_request
+		STDOUT.sync = true
+		STDERR.sync = true
+		puts "!> I have control 1.0"
+		abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n"
+		
+		@@options = {}
+		while (line = STDIN.readline) != "\n"
+			name, value = line.strip.split(/: */, 2)
+			@@options[name] = value
+		end
+	end
+	
+	def self.init_passenger
+		$LOAD_PATH.unshift(options["ruby_libdir"])
+		require 'phusion_passenger'
+		PhusionPassenger.locate_directories(options["passenger_root"])
+		require 'phusion_passenger/native_support'
+		require 'phusion_passenger/ruby_core_enhancements'
+		require 'phusion_passenger/utils/tmpdir'
+		require 'phusion_passenger/preloader_shared_helpers'
+		require 'phusion_passenger/loader_shared_helpers'
+		require 'phusion_passenger/request_handler'
+		require 'phusion_passenger/rack/thread_handler_extension'
+		LoaderSharedHelpers.init
+		PreloaderSharedHelpers.init
+		@@options = LoaderSharedHelpers.sanitize_spawn_options(@@options)
+		Utils.passenger_tmpdir = options["generation_dir"]
+		if defined?(NativeSupport)
+			NativeSupport.disable_stdio_buffering
+		end
+		RequestHandler::ThreadHandler.send(:include, Rack::ThreadHandlerExtension)
+	rescue Exception => e
+		LoaderSharedHelpers.about_to_abort(e) if defined?(LoaderSharedHelpers)
+		puts "!> Error"
+		puts "!> "
+		puts format_exception(e)
+		exit exit_code_for_exception(e)
+	end
+	
+	def self.preload_app
+		LoaderSharedHelpers.before_loading_app_code_step1('config.ru', options)
+		LoaderSharedHelpers.run_load_path_setup_code(options)
+		LoaderSharedHelpers.before_loading_app_code_step2(options)
+		
+		require 'rubygems'
+		require 'rack'
+		rackup_file = ENV["RACKUP_FILE"] || options["rackup_file"] || "config.ru"
+		rackup_code = ::File.open(rackup_file, 'rb') do |f|
+			f.read
+		end
+		@@app = eval("Rack::Builder.new {( #{rackup_code}\n )}.to_app",
+			TOPLEVEL_BINDING, rackup_file)
+		
+		LoaderSharedHelpers.after_loading_app_code(options)
+	rescue Exception => e
+		LoaderSharedHelpers.about_to_abort(e)
+		puts "!> Error"
+		puts "!> "
+		puts format_exception(e)
+		exit exit_code_for_exception(e)
+	end
+	
+	def self.negotiate_spawn_command
+		puts "!> I have control 1.0"
+		abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n"
+		
+		begin
+			while (line = STDIN.readline) != "\n"
+				name, value = line.strip.split(/: */, 2)
+				options[name] = value
+			end
+			@@options = LoaderSharedHelpers.sanitize_spawn_options(@@options)
+			
+			LoaderSharedHelpers.before_handling_requests(true, options)
+			handler = RequestHandler.new(STDIN, options.merge("app" => app))
+		rescue Exception => e
+			LoaderSharedHelpers.about_to_abort(e)
+			puts "!> Error"
+			puts "!> "
+			puts format_exception(e)
+			exit exit_code_for_exception(e)
+		end
+
+		puts "!> Ready"
+		LoaderSharedHelpers.advertise_sockets(STDOUT, handler)
+		puts "!> "
+		return handler
+	end
+	
+	
+	################## Main code ##################
+	
+	
+	handshake_and_read_startup_request
+	init_passenger
+	preload_app
+	if PreloaderSharedHelpers.run_main_loop(options) == :forked
+		handler = negotiate_spawn_command
+		handler.main_loop
+		LoaderSharedHelpers.after_handling_requests
+	end
+	
+end # module App
+end # module PhusionPassenger
diff --git a/helper-scripts/system-memory-stats.py b/helper-scripts/system-memory-stats.py
new file mode 100755
index 0000000..77f3ac0
--- /dev/null
+++ b/helper-scripts/system-memory-stats.py
@@ -0,0 +1,185 @@
+#!/usr/bin/env python
+import sys
+
+if sys.version_info[0] >= 3:
+    def bytes_to_str(b):
+        return b.decode()
+else:
+    def bytes_to_str(b):
+        return b
+
+def linux_memory_stats():
+    import os
+    os.execlp('free', 'free', '-m')
+
+def osx_memory_stats():
+    import subprocess, re, os, resource
+
+    def popen_read(command):
+        return bytes_to_str(subprocess.Popen(command, stdout = subprocess.PIPE).communicate()[0])
+
+    # Get process info
+    ps = popen_read(['ps', '-caxm', '-orss,comm'])
+    vm = popen_read(['vm_stat'])
+
+    # Iterate processes
+    process_lines = ps.split('\n')
+    sep = re.compile('[\s]+')
+    rss_total = 0 # kB
+    for row in range(1, len(process_lines)):
+        row_text = process_lines[row].strip()
+        row_elements = sep.split(row_text)
+        try:
+            rss = float(row_elements[0]) * 1024
+        except:
+            rss = 0 # ignore...
+        rss_total += rss
+
+    # Process vm_stat
+    vm_lines = vm.split('\n')
+    sep = re.compile(':[\s]+')
+    vm_stats = {}
+    for row in range(1, len(vm_lines) - 2):
+        row_text = vm_lines[row].strip()
+        row_elements = sep.split(row_text)
+        vm_stats[(row_elements[0])] = int(row_elements[1].strip('\.')) * resource.getpagesize()
+
+    print('---- Summary ----')
+    print('Wired Memory:\t\t%.1f MB' % (vm_stats["Pages wired down"] / 1024 / 1024))
+    print('Active Memory:\t\t%.1f MB' % (vm_stats["Pages active"] / 1024 / 1024))
+    print('Inactive Memory:\t%.1f MB' % (vm_stats["Pages inactive"] / 1024 / 1024))
+    print('Free Memory:\t\t%.1f MB' % (vm_stats["Pages free"] / 1024 / 1024))
+    print('Real Mem Total (ps):\t%.1f MB' % (rss_total / 1024 / 1024))
+    print('')
+    print('---- vm_stat ----')
+    print(vm.strip())
+
+def freebsd_memory_stats():
+    # Ported from http://www.cyberciti.biz/files/scripts/freebsd-memory.pl.txt
+    ##  freebsd-memory -- List Total System Memory Usage
+    ##  Copyright (c) 2003-2004 Ralf S. Engelschall <rse at engelschall.com>
+    ##  
+    ##  Redistribution and use in source and binary forms, with or without
+    ##  modification, are permitted provided that the following conditions
+    ##  are met:
+    ##  1. Redistributions of source code must retain the above copyright
+    ##     notice, this list of conditions and the following disclaimer.
+    ##  2. Redistributions in binary form must reproduce the above copyright
+    ##     notice, this list of conditions and the following disclaimer in the
+    ##     documentation and/or other materials provided with the distribution.
+    ##  
+    ##  THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+    ##  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    ##  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+    ##  ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+    ##  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    ##  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+    ##  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+    ##  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+    ##  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+    ##  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+    ##  SUCH DAMAGE.
+    import subprocess, re, os, resource
+
+    def popen_read(command):
+        return bytes_to_str(subprocess.Popen(command, stdout = subprocess.PIPE).communicate()[0])
+
+    def printf(format, *args):
+        print(format % args)
+
+    #   round the physical memory size to the next power of two which is
+    #   reasonable for memory cards. We do this by first determining the
+    #   guessed memory card size under the assumption that usual computer
+    #   hardware has an average of a maximally eight memory cards installed
+    #   and those are usually of equal size.
+    def mem_rounded(mem_size):
+        chip_size  = 1;
+        chip_guess = (mem_size / 8) - 1
+        while chip_guess != 0:
+            chip_guess >>= 1
+            chip_size  <<= 1
+        mem_round = (mem_size / chip_size + 1) * chip_size
+        return mem_round
+
+    sysctl_output = popen_read(['/sbin/sysctl', '-a'])
+    sysctl = {}
+    regex = re.compile('^([^:]+):\s+(.+)\s*$', re.S | re.M)
+    for line in sysctl_output.split('\n'):
+        matches = regex.match(line)
+        if matches is not None:
+            sysctl[matches.group(1)] = matches.group(2)
+
+    #   determine the individual known information
+    #   NOTICE: forget hw.usermem, it is just (hw.physmem - vm.stats.vm.v_wire_count).
+    #   NOTICE: forget vm.stats.misc.zero_page_count, it is just the subset of
+    #           vm.stats.vm.v_free_count which is already pre-zeroed.
+    pagesize     = int(sysctl["hw.pagesize"])
+    mem_hw       = mem_rounded(int(sysctl["hw.physmem"]))
+    mem_phys     = int(sysctl["hw.physmem"])
+    mem_all      = int(sysctl["vm.stats.vm.v_page_count"])     * pagesize
+    mem_wire     = int(sysctl["vm.stats.vm.v_wire_count"])     * pagesize
+    mem_active   = int(sysctl["vm.stats.vm.v_active_count"])   * pagesize
+    mem_inactive = int(sysctl["vm.stats.vm.v_inactive_count"]) * pagesize
+    mem_cache    = int(sysctl["vm.stats.vm.v_cache_count"])    * pagesize
+    mem_free     = int(sysctl["vm.stats.vm.v_free_count"])     * pagesize
+
+    #   determine the individual unknown information
+    mem_gap_vm  = mem_all - (mem_wire + mem_active + mem_inactive + mem_cache + mem_free)
+    mem_gap_sys = mem_phys - mem_all
+    mem_gap_hw  = mem_hw   - mem_phys
+
+    #   determine logical summary information
+    mem_total = mem_hw
+    mem_avail = mem_inactive + mem_cache + mem_free
+    mem_used  = mem_total - mem_avail
+
+    #   information annotations
+    info = {
+        "mem_wire"     : 'Wired: disabled for paging out',
+        "mem_active"   : 'Active: recently referenced',
+        "mem_inactive" : 'Inactive: recently not referenced',
+        "mem_cache"    : 'Cached: almost avail. for allocation',
+        "mem_free"     : 'Free: fully available for allocation',
+        "mem_gap_vm"   : 'Memory gap: UNKNOWN',
+        "mem_all"      : 'Total real memory managed',
+        "mem_gap_sys"  : 'Memory gap: Kernel?!',
+        "mem_phys"     : 'Total real memory available',
+        "mem_gap_hw"   : 'Memory gap: Segment Mappings?!',
+        "mem_hw"       : 'Total real memory installed',
+        "mem_used"     : 'Logically used memory',
+        "mem_avail"    : 'Logically available memory',
+        "mem_total"    : 'Logically total memory',
+    }
+
+    #   print system results
+    printf("SYSTEM MEMORY INFORMATION:")
+    printf("mem_wire:      %7d MB [%3d%%] %s", mem_wire     / (1024*1024), (float(mem_wire)     / mem_all) * 100, info["mem_wire"])
+    printf("mem_active:  + %7d MB [%3d%%] %s", mem_active   / (1024*1024), (float(mem_active)   / mem_all) * 100, info["mem_active"])
+    printf("mem_inactive:+ %7d MB [%3d%%] %s", mem_inactive / (1024*1024), (float(mem_inactive) / mem_all) * 100, info["mem_inactive"])
+    printf("mem_cache:   + %7d MB [%3d%%] %s", mem_cache    / (1024*1024), (float(mem_cache)    / mem_all) * 100, info["mem_cache"])
+    printf("mem_free:    + %7d MB [%3d%%] %s", mem_free     / (1024*1024), (float(mem_free)     / mem_all) * 100, info["mem_free"])
+    printf("mem_gap_vm:  + %7d MB [%3d%%] %s", mem_gap_vm   / (1024*1024), (float(mem_gap_vm)   / mem_all) * 100, info["mem_gap_vm"])
+    printf("-------------- ---------- ------")
+    printf("mem_all:     = %7d MB [100%%] %s", mem_all      / (1024*1024), info["mem_all"])
+    printf("mem_gap_sys: + %7d MB        %s",  mem_gap_sys  / (1024*1024), info["mem_gap_sys"])
+    printf("-------------- ----------")
+    printf("mem_phys:    = %7d MB        %s",  mem_phys     / (1024*1024), info["mem_phys"])
+    printf("mem_gap_hw:  + %7d MB        %s",  mem_gap_hw   / (1024*1024), info["mem_gap_hw"])
+    printf("-------------- ----------")
+    printf("mem_hw:      = %7d MB        %s",  mem_hw       / (1024*1024), info["mem_hw"])
+
+    #   print logical results
+    print("")
+    printf("SYSTEM MEMORY SUMMARY:");
+    printf("mem_used:      %7d MB [%3d%%] %s", mem_used  / (1024*1024), (float(mem_used)  / mem_total) * 100, info["mem_used"])
+    printf("mem_avail:   + %7d MB [%3d%%] %s", mem_avail / (1024*1024), (float(mem_avail) / mem_total) * 100, info["mem_avail"])
+    printf("-------------- ---------- ------")
+    printf("mem_total:   = %7d MB [100%%] %s", mem_total / (1024*1024), info["mem_total"])
+
+
+if sys.platform.find('linux') > -1:
+    linux_memory_stats()
+elif sys.platform.find('darwin') > -1:
+    osx_memory_stats()
+elif sys.platform.find('freebsd') > -1:
+    freebsd_memory_stats()
diff --git a/helper-scripts/wsgi-loader.py b/helper-scripts/wsgi-loader.py
new file mode 100644
index 0000000..a4ce2de
--- /dev/null
+++ b/helper-scripts/wsgi-loader.py
@@ -0,0 +1,264 @@
+#!/usr/bin/env python
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
+#
+#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+#
+#  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
+#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#  THE SOFTWARE.
+
+import sys, os, re, imp, traceback, socket, select, struct, logging, errno
+
+options = {}
+
+def abort(message):
+	sys.stderr.write(message + "\n")
+	sys.exit(1)
+
+def readline():
+	result = sys.stdin.readline()
+	if result == "":
+		raise EOFError
+	else:
+		return result
+
+def handshake_and_read_startup_request():
+	global options
+
+	print("!> I have control 1.0")
+	if readline() != "You have control 1.0\n":
+		abort("Invalid initialization header")
+	
+	line = readline()
+	while line != "\n":
+		result = re.split(': *', line.strip(), 2)
+		name = result[0]
+		value = result[1]
+		options[name] = value
+		line = readline()
+
+def load_app():
+	return imp.load_source('passenger_wsgi', 'passenger_wsgi.py')
+
+def create_server_socket():
+	global options
+
+	filename = options['generation_dir'] + '/backends/wsgi.' + str(os.getpid())
+	s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+	try:
+		os.remove(filename)
+	except OSError:
+		pass
+	s.bind(filename)
+	s.listen(1000)
+	return (filename, s)
+
+def advertise_sockets(socket_filename):
+	print("!> socket: main;unix:%s;session;1" % socket_filename)
+	print("!> ")
+
+if sys.version_info[0] >= 3:
+	def reraise_exception(exc_info):
+		raise exc_info[0].with_traceback(exc_info[1], exc_info[2])
+
+	def bytes_to_str(b):
+		return b.decode()
+
+	def str_to_bytes(s):
+		return s.encode('latin-1')
+else:
+	def reraise_exception(exc_info):
+		exec("raise exc_info[0], exc_info[1], exc_info[2]")
+
+	def bytes_to_str(b):
+		return b
+
+	def str_to_bytes(s):
+		return s
+
+
+class RequestHandler:
+	def __init__(self, server_socket, owner_pipe, app):
+		self.server = server_socket
+		self.owner_pipe = owner_pipe
+		self.app = app
+	
+	def main_loop(self):
+		done = False
+		try:
+			while not done:
+				client, address = self.accept_connection()
+				if not client:
+					done = True
+					break
+				try:
+					try:
+						env, input_stream = self.parse_request(client)
+						if env:
+							if env['REQUEST_METHOD'] == 'ping':
+								self.process_ping(env, input_stream, client)
+							else:
+								self.process_request(env, input_stream, client)
+					except KeyboardInterrupt:
+						done = True
+					except IOError:
+						e = sys.exc_info()[1]
+						if not getattr(e, 'passenger', False) or e.errno != errno.EPIPE:
+							logging.exception("WSGI application raised an I/O exception!")
+					except Exception:
+						logging.exception("WSGI application raised an exception!")
+				finally:
+					try:
+						# Shutdown the socket like this just in case the app
+						# spawned a child process that keeps it open.
+						client.shutdown(socket.SHUT_WR)
+					except:
+						pass
+					try:
+						client.close()
+					except:
+						pass
+		except KeyboardInterrupt:
+			pass
+
+	def accept_connection(self):
+		result = select.select([self.owner_pipe, self.server.fileno()], [], [])[0]
+		if self.server.fileno() in result:
+			return self.server.accept()
+		else:
+			return (None, None)
+	
+	def parse_request(self, client):
+		buf = b''
+		while len(buf) < 4:
+			tmp = client.recv(4 - len(buf))
+			if len(tmp) == 0:
+				return (None, None)
+			buf += tmp
+		header_size = struct.unpack('>I', buf)[0]
+		
+		buf = b''
+		while len(buf) < header_size:
+			tmp = client.recv(header_size - len(buf))
+			if len(tmp) == 0:
+				return (None, None)
+			buf += tmp
+		
+		headers = buf.split(b"\0")
+		headers.pop() # Remove trailing "\0"
+		env = {}
+		i = 0
+		while i < len(headers):
+			env[bytes_to_str(headers[i])] = bytes_to_str(headers[i + 1])
+			i += 2
+
+		return (env, client)
+	
+	if hasattr(socket, '_fileobject'):
+		def wrap_input_socket(self, sock):
+			return socket._fileobject(sock, 'rb', 512)
+	else:
+		def wrap_input_socket(self, sock):
+			return socket.socket.makefile(sock, 'rb', 512)
+
+	def process_request(self, env, input_stream, output_stream):
+		# The WSGI speculation says that the input parameter object passed needs to
+		# implement a few file-like methods. This is the reason why we "wrap" the socket._socket
+		# into the _fileobject to solve this.
+		#
+		# Otherwise, the POST data won't be correctly retrieved by Django.
+		#
+		# See: http://www.python.org/dev/peps/pep-0333/#input-and-error-streams
+		env['wsgi.input']        = self.wrap_input_socket(input_stream)
+		env['wsgi.errors']       = sys.stderr
+		env['wsgi.version']      = (1, 0)
+		env['wsgi.multithread']  = False
+		env['wsgi.multiprocess'] = True
+		env['wsgi.run_once']	 = True
+		if env.get('HTTPS','off') in ('on', '1', 'true', 'yes'):
+			env['wsgi.url_scheme'] = 'https'
+		else:
+			env['wsgi.url_scheme'] = 'http'
+
+		headers_set = []
+		headers_sent = []
+		
+		def write(data):
+			try:
+				if not headers_set:
+					raise AssertionError("write() before start_response()")
+				elif not headers_sent:
+					# Before the first output, send the stored headers.
+					status, response_headers = headers_sent[:] = headers_set
+					output_stream.sendall(str_to_bytes('Status: %s\r\n' % status))
+					for header in response_headers:
+						output_stream.sendall(str_to_bytes('%s: %s\r\n' % header))
+					output_stream.sendall(b'\r\n')
+				output_stream.sendall(data)
+			except IOError:
+				# Mark this exception as coming from the Phusion Passenger
+				# socket and not some other socket.
+				e = sys.exc_info()[1]
+				setattr(e, 'passenger', True)
+				raise e
+		
+		def start_response(status, response_headers, exc_info = None):
+			if exc_info:
+				try:
+					if headers_sent:
+						# Re-raise original exception if headers sent.
+						reraise_exception(exc_info)
+				finally:
+					# Avoid dangling circular ref.
+					exc_info = None
+			elif headers_set:
+				raise AssertionError("Headers already set!")
+			
+			headers_set[:] = [status, response_headers]
+			return write
+		
+		result = self.app(env, start_response)
+		try:
+			for data in result:
+				# Don't send headers until body appears.
+				if data:
+					write(data)
+			if not headers_sent:
+				# Send headers now if body was empty.
+				write(b'')
+		finally:
+			if hasattr(result, 'close'):
+				result.close()
+	
+	def process_ping(self, env, input_stream, output_stream):
+		output_stream.sendall(b"pong")
+
+
+if __name__ == "__main__":
+	logging.basicConfig(
+		level = logging.WARNING,
+		format = "[ pid=%(process)d, time=%(asctime)s ]: %(message)s")
+	if hasattr(logging, 'captureWarnings'):
+		logging.captureWarnings(True)
+	handshake_and_read_startup_request()
+	app_module = load_app()
+	socket_filename, server_socket = create_server_socket()
+	handler = RequestHandler(server_socket, sys.stdin, app_module.application)
+	print("!> Ready")
+	advertise_sockets(socket_filename)
+	handler.main_loop()
diff --git a/helper-scripts/wsgi-preloader.py b/helper-scripts/wsgi-preloader.py
new file mode 100644
index 0000000..4265cc3
--- /dev/null
+++ b/helper-scripts/wsgi-preloader.py
@@ -0,0 +1 @@
+#!/usr/bin/env python
diff --git a/lib/phusion_passenger.rb b/lib/phusion_passenger.rb
index 4f3b66d..f28a9d7 100644
--- a/lib/phusion_passenger.rb
+++ b/lib/phusion_passenger.rb
@@ -1,5 +1,6 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010, 2011, 2012 Phusion
+# encoding: utf-8
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -22,84 +23,154 @@
 #  THE SOFTWARE.
 
 module PhusionPassenger
+	FILE_LOCATION = File.expand_path(__FILE__)
+	
+	
 	###### Version numbers ######
 	
-	# Phusion Passenger version number. Don't forget to edit ext/common/Constants.h too.
-	VERSION_STRING = '3.0.13'
+	PACKAGE_NAME = 'passenger'
+	# Run 'rake ext/common/Constants.h' after changing this number.
+	VERSION_STRING = '4.0.10'
 	
-	PREFERRED_NGINX_VERSION = '1.2.1'
-	PREFERRED_PCRE_VERSION  = '8.30'
+	PREFERRED_NGINX_VERSION = '1.4.1'
+	NGINX_SHA256_CHECKSUM = 'bca5d1e89751ba29406185e1736c390412603a7e6b604f5b4575281f6565d119'
+
+	PREFERRED_PCRE_VERSION  = '8.32'
+	PCRE_SHA256_CHECKSUM = 'd5d8634b36baf3d08be442a627001099583b397f456bc795304a013383b6423a'
+
 	STANDALONE_INTERFACE_VERSION  = 1
 	
 	
 	###### Directories ######
-	# Don't forget to modify ext/common/ResourceLocator.h too.
 	
-	# Returns whether this Phusion Passenger installation is packaged
-	# using the OS's native package management system, i.e. as opposed
-	# to being installed from source or with RubyGems.
-	def self.natively_packaged?
-		if !defined?(@natively_packaged)
-			@natively_packaged = !File.exist?("#{LIBDIR}/../Rakefile") ||
-			                     !File.exist?("#{LIBDIR}/../DEVELOPERS.TXT")
+	GLOBAL_NAMESPACE_DIRNAME            = "passenger"
+	GLOBAL_STANDALONE_NAMESPACE_DIRNAME = "passenger-standalone"
+	# Subdirectory under $HOME to use for storing stuff.
+	USER_NAMESPACE_DIRNAME              = ".passenger"
+	
+	# Directories in which to look for plugins.
+	PLUGIN_DIRS = [
+		"/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/plugins",
+		"/usr/local/share/#{GLOBAL_NAMESPACE_DIRNAME}/plugins",
+		"~/#{USER_NAMESPACE_DIRNAME}/plugins"
+	]
+	
+	# Directory under $HOME for storing Phusion Passenger Standalone runtime files.
+	LOCAL_STANDALONE_RESOURCE_DIR  = File.join(USER_NAMESPACE_DIRNAME, "standalone")
+	
+	# System-wide directory for storing Phusion Passenger Standalone runtime files.
+	GLOBAL_STANDALONE_RESOURCE_DIR = "/var/lib/#{GLOBAL_STANDALONE_NAMESPACE_DIRNAME}".freeze
+	
+	# Follows the logic of ext/common/ResourceLocator.h, so don't forget to modify that too.
+	def self.locate_directories(source_root_or_location_configuration_file = nil)
+		source_root_or_location_configuration_file ||= find_location_configuration_file
+		root_or_file = @source_root = source_root_or_location_configuration_file
+		
+		if root_or_file && File.file?(root_or_file)
+			filename = root_or_file
+			options  = {}
+			in_locations_section = false
+			File.open(filename, 'r') do |f|
+				while !f.eof?
+					line = f.readline
+					line.strip!
+					next if line.empty?
+					if line =~ /\A\[(.+)\]\Z/
+						in_locations_section = $1 == 'locations'
+					elsif in_locations_section && line =~ /=/
+						key, value = line.split(/ *= */, 2)
+						options[key.freeze] = value.freeze
+					end
+				end
+			end
+			
+			@natively_packaged     = get_bool_option(filename, options, 'natively_packaged')
+			@bin_dir               = get_option(filename, options, 'bin').freeze
+			@agents_dir            = get_option(filename, options, 'agents').freeze
+			@lib_dir               = get_option(filename, options, 'libdir').freeze
+			@helper_scripts_dir    = get_option(filename, options, 'helper_scripts').freeze
+			@resources_dir         = get_option(filename, options, 'resources').freeze
+			@include_dir           = get_option(filename, options, 'includedir').freeze
+			@doc_dir               = get_option(filename, options, 'doc').freeze
+			@apache2_module_path   = get_option(filename, options, 'apache2_module').freeze
+			@ruby_extension_source_dir = get_option(filename, options, 'ruby_extension_source').freeze
+		else
+			@source_root           = File.dirname(File.dirname(FILE_LOCATION))
+			@natively_packaged     = false
+			@bin_dir               = "#{@source_root}/bin".freeze
+			@agents_dir            = "#{@source_root}/buildout/agents".freeze
+			@lib_dir               = "#{@source_root}/buildout".freeze
+			@helper_scripts_dir    = "#{@source_root}/helper-scripts".freeze
+			@resources_dir         = "#{@source_root}/resources".freeze
+			@include_dir           = "#{@source_root}/ext".freeze
+			@doc_dir               = "#{@source_root}/doc".freeze
+			@apache2_module_path   = "#{@source_root}/buildout/apache2/mod_passenger.so".freeze
+			@ruby_extension_source_dir = "#{@source_root}/ext/ruby"
 		end
-		return @natively_packaged
 	end
 	
-	NATIVELY_PACKAGED_SOURCE_ROOT        = "/usr/share/phusion-passenger/source"
-	NATIVELY_PACKAGED_DOCDIR             = "/usr/share/doc/phusion-passenger"
-	NATIVELY_PACKAGED_RESOURCES_DIR      = "/usr/share/phusion-passenger"
-	NATIVELY_PACKAGED_AGENTS_DIR         = "/usr/lib/phusion-passenger/agents"
-	NATIVELY_PACKAGED_HELPER_SCRIPTS_DIR = "/usr/share/phusion-passenger/helper-scripts"
-	NATIVELY_PACKAGED_APACHE2_MODULE     = "/usr/lib/apache2/modules/mod_passenger.so"
+	# Returns whether this Phusion Passenger installation is in the 'originally packaged'
+	# configuration (as opposed to the 'natively packaged' configuration.
+	def self.originally_packaged?
+		return !@natively_packaged
+	end
+
+	def self.natively_packaged?
+		return @natively_packaged
+	end
+
+	# When originally packaged, returns the source root.
+	# When natively packaged, returns the location of the location configuration file.
+	def self.source_root
+		return @source_root
+	end
 	
-	# Directory containing the Phusion Passenger Ruby libraries.
-	LIBDIR         = File.expand_path(File.dirname(__FILE__))
+	def self.bin_dir
+		return @bin_dir
+	end
 	
-	# Directory containing templates.
-	TEMPLATES_DIR  = File.join(LIBDIR, "phusion_passenger", "templates")
+	def self.agents_dir
+		return @agents_dir
+	end
+
+	def self.lib_dir
+		return @lib_dir
+	end
 	
-	# Subdirectory under $HOME to use for storing resource files.
-	LOCAL_DIR      = ".passenger"
+	def self.helper_scripts_dir
+		return @helper_scripts_dir
+	end
 	
-	# Directories in which to look for plugins.
-	PLUGIN_DIRS    = ["/usr/share/phusion-passenger/plugins",
-		"/usr/local/share/phusion-passenger/plugins",
-		"~/#{LOCAL_DIR}/plugins"]
+	def self.resources_dir
+		return @resources_dir
+	end
+
+	def self.include_dir
+		return @include_dir
+	end
 	
-	# Directory under $HOME for storing Phusion Passenger Standalone resource files.
-	LOCAL_STANDALONE_RESOURCE_DIR  = File.join(LOCAL_DIR, "standalone")
+	def self.doc_dir
+		return @doc_dir
+	end
 	
-	# System-wide directory for storing Phusion Passenger Standalone resource files.
-	GLOBAL_STANDALONE_RESOURCE_DIR = "/var/lib/passenger-standalone"
+	def self.ruby_libdir
+		@libdir ||= File.dirname(FILE_LOCATION)
+	end
 	
-	if !natively_packaged?
-		# Top directory of the Phusion Passenger source code.
-		SOURCE_ROOT        = File.expand_path(File.join(LIBDIR, ".."))
-		
-		# Documentation directory.
-		DOCDIR             = File.join(SOURCE_ROOT, "doc")
-		
-		# Directory containing Phusion Passenger resource files.
-		RESOURCES_DIR      = File.join(SOURCE_ROOT, "resources")
-		
-		AGENTS_DIR         = File.join(SOURCE_ROOT, "agents")
-		
-		HELPER_SCRIPTS_DIR = File.join(SOURCE_ROOT, "helper-scripts")
-		
-		# Location of the Apache 2 module.
-		APACHE2_MODULE     = File.join(SOURCE_ROOT, "ext", "apache2", "mod_passenger.so")
-		
-		# Directory possibly containing #{archdir}/passenger_native_support.so.
-		# Not available when natively packaged.
-		NATIVE_SUPPORT_DIR = File.join(SOURCE_ROOT, "ext", "ruby")
-	else
-		SOURCE_ROOT        = NATIVELY_PACKAGED_SOURCE_ROOT
-		DOCDIR             = NATIVELY_PACKAGED_DOCDIR
-		RESOURCES_DIR      = NATIVELY_PACKAGED_RESOURCES_DIR
-		AGENTS_DIR         = NATIVELY_PACKAGED_AGENTS_DIR
-		HELPER_SCRIPTS_DIR = NATIVELY_PACKAGED_HELPER_SCRIPTS_DIR
-		APACHE2_MODULE     = NATIVELY_PACKAGED_APACHE2_MODULE
+	def self.apache2_module_path
+		return @apache2_module_path
+	end
+
+	def self.ruby_extension_source_dir
+		return @ruby_extension_source_dir
+	end
+
+	def self.nginx_addon_dir
+		if PhusionPassenger.natively_packaged?
+			return "#{resources_dir}/ngx_http_passenger_module"
+		else
+			return "#{source_root}/ext/nginx"
+		end
 	end
 	
 	
@@ -108,8 +179,51 @@ module PhusionPassenger
 	STANDALONE_BINARIES_URL_ROOT  = "http://standalone-binaries.modrails.com"
 	
 	
-	if !$LOAD_PATH.include?(LIBDIR)
-		$LOAD_PATH.unshift(LIBDIR)
+	if !$LOAD_PATH.include?(ruby_libdir)
+		$LOAD_PATH.unshift(ruby_libdir)
 		$LOAD_PATH.uniq!
 	end
-end if !defined?(PhusionPassenger::LIBDIR)
+
+
+private
+	def self.find_location_configuration_file
+		filename = ENV['PASSENGER_LOCATION_CONFIGURATION_FILE']
+		return filename if filename && !filename.empty?
+
+		filename = File.dirname(FILE_LOCATION) + "/phusion_passenger/locations.ini"
+		return filename if filename && File.exist?(filename)
+
+		require 'etc' if !defined?(Etc)
+		begin
+			home_dir = Etc.getpwuid(Process.uid).dir
+		rescue ArgumentError
+			# Unknown user.
+			home_dir = ENV['HOME']
+		end
+		if home_dir && !home_dir.empty?
+			filename = "#{home_dir}/.passenger/locations.ini"
+			return filename if File.exist?(filename)
+		end
+
+		filename = "/etc/#{GLOBAL_NAMESPACE_DIRNAME}/locations.ini"
+		return filename if File.exist?(filename)
+
+		return nil
+	end
+
+	def self.get_option(filename, options, key, required = true)
+		value = options[key]
+		if value
+			return value
+		elsif required
+			raise "Option '#{key}' missing in file '#{filename}'"
+		else
+			return nil
+		end
+	end
+	
+	def self.get_bool_option(filename, options, key)
+		value = get_option(filename, options, key)
+		return value == 'yes' || value == 'true' || value == 'on' || value == '1'
+	end
+end if !defined?(PhusionPassenger::VERSION_STRING)
diff --git a/lib/phusion_passenger/abstract_installer.rb b/lib/phusion_passenger/abstract_installer.rb
index 3cbb3b1..dcfa5ff 100644
--- a/lib/phusion_passenger/abstract_installer.rb
+++ b/lib/phusion_passenger/abstract_installer.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -25,6 +25,8 @@ require 'phusion_passenger'
 require 'phusion_passenger/constants'
 require 'phusion_passenger/console_text_template'
 require 'phusion_passenger/platform_info'
+require 'phusion_passenger/platform_info/operating_system'
+require 'phusion_passenger/utils/ansi_colors'
 
 # IMPORTANT: do not directly or indirectly require native_support; we can't compile
 # it yet until we have a compiler, and installers usually check whether a compiler
@@ -35,15 +37,15 @@ module PhusionPassenger
 # Abstract base class for text mode installers. Used by
 # passenger-install-apache2-module and passenger-install-nginx-module.
 #
-# Subclasses must at least implement the #install! method which handles
+# Subclasses must at least implement the #run_steps method which handles
 # the installation itself.
 #
 # Usage:
 #
 #   installer = ConcereteInstallerClass.new(options...)
-#   installer.start
+#   installer.run
 class AbstractInstaller
-	PASSENGER_WEBSITE = "http://www.modrails.com/"
+	PASSENGER_WEBSITE = "https://www.phusionpassenger.com"
 	PHUSION_WEBSITE = "www.phusion.nl"
 
 	# Create an AbstractInstaller. All options will be stored as instance
@@ -52,18 +54,24 @@ class AbstractInstaller
 	#   installer = AbstractInstaller.new(:foo => "bar")
 	#   installer.instance_variable_get(:"@foo")   # => "bar"
 	def initialize(options = {})
+		@stdout = STDOUT
+		@stderr = STDERR
 		options.each_pair do |key, value|
 			instance_variable_set(:"@#{key}", value)
 		end
 	end
 	
 	# Start the installation by calling the #install! method.
-	def start
+	def run
 		before_install
-		install!
+		run_steps
+		return true
+	rescue Abort
+		puts
+		return false
 	rescue PlatformInfo::RuntimeError => e
 		new_screen
-		color_puts "<red>An error occurred</red>"
+		puts "<red>An error occurred</red>"
 		puts
 		puts e.message
 		exit 1
@@ -71,24 +79,149 @@ class AbstractInstaller
 		after_install
 	end
 
-private
+protected
+	class Abort < StandardError
+	end
+	
+	class CommandError < Abort
+	end
+	
+	
+	def interactive?
+		return !@auto
+	end
+
+	def non_interactive?
+		return !interactive?
+	end
+	
+	
 	def before_install
-		# Hook for subclasses.
+		STDOUT.write(Utils::AnsiColors::DEFAULT_TERMINAL_COLOR)
+		STDOUT.flush
 	end
 	
 	def after_install
-		# Reset terminal colors.
-		STDOUT.write("\e[0m")
+		STDOUT.write(Utils::AnsiColors::RESET)
 		STDOUT.flush
 	end
 	
-	def color_print(text)
-		STDOUT.write(ConsoleTextTemplate.new(:text => text).result)
-		STDOUT.flush
+	def dependencies
+		return [[], []]
 	end
 	
-	def color_puts(text)
-		color_print("#{text}\n")
+	def check_dependencies(show_new_screen = true)
+		new_screen if show_new_screen
+		puts "<banner>Checking for required software...</banner>"
+		puts
+		
+		require 'phusion_passenger/platform_info/depcheck'
+		specs, ids = dependencies
+		runner = PlatformInfo::Depcheck::ConsoleRunner.new
+
+		specs.each do |spec|
+			PlatformInfo::Depcheck.load(spec)
+		end
+		ids.each do |id|
+			runner.add(id)
+		end
+
+		if runner.check_all
+			return true
+		else
+			puts
+			puts "<red>Some required software is not installed.</red>"
+			puts "But don't worry, this installer will tell you how to install them.\n"
+			puts "<b>Press Enter to continue, or Ctrl-C to abort.</b>"
+			if PhusionPassenger.originally_packaged?
+				wait
+			else
+				wait(10)
+			end
+
+			line
+			puts
+			puts "<banner>Installation instructions for required software</banner>"
+			puts
+			runner.missing_dependencies.each do |dep|
+				puts " * To install <yellow>#{dep.name}</yellow>:"
+				puts "   #{dep.install_instructions}"
+				puts
+			end
+			if respond_to?(:users_guide)
+				puts "If the aforementioned instructions didn't solve your problem, then please take"
+				puts "a look at the Users Guide:"
+				puts
+				puts "  <yellow>#{users_guide}</yellow>"
+			end
+			return false
+		end
+	end
+
+	def check_whether_os_is_broken
+		if PlatformInfo.os_name == "freebsd9" && `uname -r` =~ /^9\.1-/
+			new_screen
+			render_template 'installer_common/freebsd9_broken_cxx_runtime'
+			wait
+		end
+	end
+
+	def check_whether_system_has_enough_ram(required = 1024)
+		begin
+			meminfo = File.read("/proc/meminfo")
+			if meminfo =~ /^MemTotal: *(\d+) kB$/
+				ram_mb = $1.to_i / 1024
+				if meminfo =~ /^SwapTotal: *(\d+) kB$/
+					swap_mb = $1.to_i / 1024
+				else
+					swap_mb = 0
+				end
+			end
+		rescue Errno::ENOENT, Errno::EACCES
+			# Don't do anything on systems without memory information.
+			ram_mb = nil
+			swap_mb = nil
+		end
+		if ram_mb && swap_mb && ram_mb + swap_mb < required
+			new_screen
+			render_template 'installer_common/low_amount_of_memory_warning',
+				:required => required,
+				:current => ram_mb + swap_mb,
+				:ram => ram_mb,
+				:swap => swap_mb,
+				:doc => users_guide
+			wait
+		end
+	end
+	
+	
+	def use_stderr
+		old_stdout = @stdout
+		begin
+			@stdout = STDERR
+			yield
+		ensure
+			@stdout = old_stdout
+		end
+	end
+	
+	def print(text)
+		@stdout.write(Utils::AnsiColors.ansi_colorize(text))
+		@stdout.flush
+	end
+	
+	def puts(text = nil)
+		if text
+			@stdout.puts(Utils::AnsiColors.ansi_colorize(text))
+		else
+			@stdout.puts
+		end
+		@stdout.flush
+	end
+
+	def puts_error(text)
+		@stderr.puts(Utils::AnsiColors.ansi_colorize("<red>#{text}</red>"))
+		@stderr.flush
 	end
 	
 	def render_template(name, options = {})
@@ -105,26 +238,54 @@ private
 		puts "--------------------------------------------"
 	end
 	
-	def prompt(message)
+	def prompt(message, default_value = nil)
 		done = false
 		while !done
-			color_print "#{message}: "
+			print "#{message}: "
+			
+			if non_interactive? && default_value
+				puts default_value
+				return default_value
+			end
+			
 			begin
 				result = STDIN.readline
 			rescue EOFError
 				exit 2
 			end
 			result.strip!
-			done = !block_given? || yield(result)
+			if result.empty?
+				if default_value
+					result = default_value
+					done = true
+				else
+					done = !block_given? || yield(result)
+				end
+			else
+				done = !block_given? || yield(result)
+			end
 		end
 		return result
 	rescue Interrupt
-		exit 2
+		raise Abort
 	end
 	
+	def prompt_confirmation(message)
+		result = prompt("#{message} [y/n]") do |value|
+			if value.downcase == 'y' || value.downcase == 'n'
+				true
+			else
+				puts_error "Invalid input '#{value}'; please enter either 'y' or 'n'."
+				false
+			end
+		end
+		return result.downcase == 'y'
+	rescue Interrupt
+		raise Abort
+	end
+
 	def wait(timeout = nil)
-		return if @auto
-		begin
+		if interactive?
 			if timeout
 				require 'timeout' unless defined?(Timeout)
 				begin
@@ -137,11 +298,12 @@ private
 			else
 				STDIN.readline
 			end
-		rescue Interrupt
-			exit 2
 		end
+	rescue Interrupt
+		raise Abort
 	end
 	
+	
 	def sh(*args)
 		puts "# #{args.join(' ')}"
 		result = system(*args)
@@ -154,78 +316,29 @@ private
 		end
 	end
 	
-	def dependencies
-		return []
-	end
-	
-	def check_dependencies(show_new_screen = true)
-		new_screen if show_new_screen
-		missing_dependencies = []
-		color_puts "<banner>Checking for required software...</banner>"
-		puts
-		dependencies.each do |dep|
-			color_print " * #{dep.name}... "
-			result = dep.check
-			if result.found?
-				if result.found_at
-					color_puts "<green>found at #{result.found_at}</green>"
-				else
-					color_puts "<green>found</green>"
-				end
-			else
-				color_puts "<red>not found</red>"
-				missing_dependencies << dep
-			end
-		end
-		
-		if missing_dependencies.empty?
-			return true
-		else
-			puts
-			color_puts "<red>Some required software is not installed.</red>"
-			color_puts "But don't worry, this installer will tell you how to install them.\n"
-			color_puts "<b>Press Enter to continue, or Ctrl-C to abort.</b>"
-			if PhusionPassenger.natively_packaged?
-				wait(10)
-			else
-				wait
-			end
-			
-			line
-			puts
-			color_puts "<banner>Installation instructions for required software</banner>"
-			puts
-			missing_dependencies.each do |dep|
-				print_dependency_installation_instructions(dep)
-				puts
-			end
-			if respond_to?(:users_guide)
-				color_puts "If the aforementioned instructions didn't solve your problem, then please take"
-				color_puts "a look at the Users Guide:"
-				puts
-				color_puts "  <yellow>#{users_guide}</yellow>"
-			end
-			return false
+	def sh!(*args)
+		if !sh(*args)
+			puts_error "*** Command failed: #{args.join(' ')}"
+			raise CommandError
 		end
 	end
 	
-	def print_dependency_installation_instructions(dep)
-		color_puts " * To install <yellow>#{dep.name}</yellow>:"
-		if dep.install_comments
-			color_puts "   " << dep.install_comments
+	def rake(*args)
+		require 'phusion_passenger/platform_info/ruby'
+		if !PlatformInfo.rake_command
+			puts_error 'Cannot find Rake.'
+			raise Abort
 		end
-		if !dep.install_command.nil?
-			color_puts "   Please run <b>#{dep.install_command}</b> as root."
-		elsif !dep.install_instructions.nil?
-			color_puts "   " << dep.install_instructions
-		elsif !dep.website.nil?
-			color_puts "   Please download it from <b>#{dep.website}</b>"
-			if !dep.website_comments.nil?
-				color_puts "   (#{dep.website_comments})"
-			end
-		else
-			color_puts "   Search Google."
+		sh("#{PlatformInfo.rake_command} #{args.join(' ')}")
+	end
+
+	def rake!(*args)
+		require 'phusion_passenger/platform_info/ruby'
+		if !PlatformInfo.rake_command
+			puts_error 'Cannot find Rake.'
+			raise Abort
 		end
+		sh!("#{PlatformInfo.rake_command} #{args.join(' ')}")
 	end
 	
 	def download(url, output)
diff --git a/lib/phusion_passenger/abstract_request_handler.rb b/lib/phusion_passenger/abstract_request_handler.rb
deleted file mode 100644
index 1a45b72..0000000
--- a/lib/phusion_passenger/abstract_request_handler.rb
+++ /dev/null
@@ -1,760 +0,0 @@
-# encoding: binary
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'socket'
-require 'fcntl'
-require 'phusion_passenger'
-require 'phusion_passenger/constants'
-require 'phusion_passenger/public_api'
-require 'phusion_passenger/message_channel'
-require 'phusion_passenger/message_client'
-require 'phusion_passenger/debug_logging'
-require 'phusion_passenger/utils'
-require 'phusion_passenger/utils/tmpdir'
-require 'phusion_passenger/utils/unseekable_socket'
-require 'phusion_passenger/native_support'
-
-module PhusionPassenger
-
-# The request handler is the layer which connects Apache with the underlying application's
-# request dispatcher (i.e. either Rails's Dispatcher class or Rack).
-# The request handler's job is to process incoming HTTP requests using the
-# currently loaded Ruby on Rails application. HTTP requests are forwarded
-# to the request handler by the web server. HTTP responses generated by the
-# RoR application are forwarded to the web server, which, in turn, sends the
-# response back to the HTTP client.
-#
-# AbstractRequestHandler is an abstract base class for easing the implementation
-# of request handlers for Rails and Rack.
-#
-# == Design decisions
-#
-# Some design decisions are made because we want to decrease system
-# administrator maintenance overhead. These decisions are documented
-# in this section.
-#
-# === Owner pipes
-#
-# Because only the web server communicates directly with a request handler,
-# we want the request handler to exit if the web server has also exited.
-# This is implemented by using a so-called _owner pipe_. The writable part
-# of the pipe will be passed to the web server* via a Unix socket, and the web
-# server will own that part of the pipe, while AbstractRequestHandler owns
-# the readable part of the pipe. AbstractRequestHandler will continuously
-# check whether the other side of the pipe has been closed. If so, then it
-# knows that the web server has exited, and so the request handler will exit
-# as well. This works even if the web server gets killed by SIGKILL.
-#
-# * It might also be passed to the ApplicationPoolServerExecutable, if the web
-#   server's using ApplicationPoolServer instead of StandardApplicationPool.
-#
-#
-# == Request format
-#
-# Incoming "HTTP requests" are not true HTTP requests, i.e. their binary
-# representation do not conform to RFC 2616. Instead, the request format
-# is based on CGI, and is similar to that of SCGI.
-#
-# The format consists of 3 parts:
-# - A 32-bit big-endian integer, containing the size of the transformed
-#   headers.
-# - The transformed HTTP headers.
-# - The verbatim (untransformed) HTTP request body.
-#
-# HTTP headers are transformed to a format that satisfies the following
-# grammar:
-#
-#  headers ::= header*
-#  header ::= name NUL value NUL
-#  name ::= notnull+
-#  value ::= notnull+
-#  notnull ::= "\x01" | "\x02" | "\x02" | ... | "\xFF"
-#  NUL = "\x00"
-#
-# The web server transforms the HTTP request to the aforementioned format,
-# and sends it to the request handler.
-class AbstractRequestHandler
-	include DebugLogging
-	
-	# Signal which will cause the Rails application to exit immediately.
-	HARD_TERMINATION_SIGNAL = "SIGTERM"
-	# Signal which will cause the Rails application to exit as soon as it's done processing a request.
-	SOFT_TERMINATION_SIGNAL = "SIGUSR1"
-	BACKLOG_SIZE    = 500
-	MAX_HEADER_SIZE = 128 * 1024
-	
-	# String constants which exist to relieve Ruby's garbage collector.
-	IGNORE              = 'IGNORE'              # :nodoc:
-	DEFAULT             = 'DEFAULT'             # :nodoc:
-	X_POWERED_BY        = 'X-Powered-By'        # :nodoc:
-	REQUEST_METHOD      = 'REQUEST_METHOD'      # :nodoc:
-	PING                = 'PING'                # :nodoc:
-	PASSENGER_CONNECT_PASSWORD  = "PASSENGER_CONNECT_PASSWORD"   # :nodoc:
-	
-	OBJECT_SPACE_SUPPORTS_LIVE_OBJECTS = ObjectSpace.respond_to?(:live_objects)
-	OBJECT_SPACE_SUPPORTS_ALLOCATED_OBJECTS = ObjectSpace.respond_to?(:allocated_objects)
-	OBJECT_SPACE_SUPPORTS_COUNT_OBJECTS = ObjectSpace.respond_to?(:count_objects)
-	GC_SUPPORTS_TIME = GC.respond_to?(:time)
-	GC_SUPPORTS_CLEAR_STATS = GC.respond_to?(:clear_stats)
-	
-	# A hash containing all server sockets that this request handler listens on.
-	# The hash is in the form of:
-	#
-	#   {
-	#      name1 => [socket_address1, socket_type1, socket1],
-	#      name2 => [socket_address2, socket_type2, socket2],
-	#      ...
-	#   }
-	#
-	# +name+ is a Symbol. +socket_addressx+ is the address of the socket,
-	# +socket_typex+ is the socket's type (either 'unix' or 'tcp') and
-	# +socketx+ is the actual socket IO objec.
-	# There's guaranteed to be at least one server socket, namely one with the
-	# name +:main+.
-	attr_reader :server_sockets
-	
-	# Specifies the maximum allowed memory usage, in MB. If after having processed
-	# a request AbstractRequestHandler detects that memory usage has risen above
-	# this limit, then it will gracefully exit (that is, exit after having processed
-	# all pending requests).
-	#
-	# A value of 0 (the default) indicates that there's no limit.
-	attr_accessor :memory_limit
-	
-	# The number of times the main loop has iterated so far. Mostly useful
-	# for unit test assertions.
-	attr_reader :iterations
-	
-	# Number of requests processed so far. This includes requests that raised
-	# exceptions.
-	attr_reader :processed_requests
-	
-	# If a soft termination signal was received, then the main loop will quit
-	# the given amount of seconds after the last time a connection was accepted.
-	# Defaults to 3 seconds.
-	attr_accessor :soft_termination_linger_time
-	
-	# A password with which clients must authenticate. Default is unauthenticated.
-	attr_accessor :connect_password
-	
-	# Create a new RequestHandler with the given owner pipe.
-	# +owner_pipe+ must be the readable part of a pipe IO object.
-	#
-	# Additionally, the following options may be given:
-	# - memory_limit: Used to set the +memory_limit+ attribute.
-	# - detach_key
-	# - connect_password
-	# - pool_account_username
-	# - pool_account_password_base64
-	def initialize(owner_pipe, options = {})
-		@server_sockets = {}
-		
-		if should_use_unix_sockets?
-			@main_socket_address, @main_socket = create_unix_socket_on_filesystem
-			@server_sockets[:main] = [@main_socket_address, 'unix', @main_socket]
-		else
-			@main_socket_address, @main_socket = create_tcp_socket
-			@server_sockets[:main] = [@main_socket_address, 'tcp', @main_socket]
-		end
-		
-		@http_socket_address, @http_socket = create_tcp_socket
-		@server_sockets[:http] = [@http_socket_address, 'tcp', @http_socket]
-		
-		@owner_pipe = owner_pipe
-		@options = options
-		@previous_signal_handlers = {}
-		@main_loop_generation  = 0
-		@main_loop_thread_lock = Mutex.new
-		@main_loop_thread_cond = ConditionVariable.new
-		@memory_limit          = options["memory_limit"] || 0
-		@connect_password      = options["connect_password"]
-		@detach_key            = options["detach_key"]
-		@pool_account_username = options["pool_account_username"]
-		if options["pool_account_password_base64"]
-			@pool_account_password = options["pool_account_password_base64"].unpack('m').first
-		end
-		@analytics_logger      = options["analytics_logger"]
-		@iterations         = 0
-		@processed_requests = 0
-		@soft_termination_linger_time = 3
-		@main_loop_running  = false
-		@passenger_header   = determine_passenger_header
-		
-		@debugger = @options["debugger"]
-		if @debugger
-			@server_sockets[:ruby_debug_cmd] = ["127.0.0.1:#{Debugger.cmd_port}", 'tcp']
-			@server_sockets[:ruby_debug_ctrl] = ["127.0.0.1:#{Debugger.ctrl_port}", 'tcp']
-		end
-		
-		#############
-	end
-	
-	# Clean up temporary stuff created by the request handler.
-	#
-	# If the main loop was started by #main_loop, then this method may only
-	# be called after the main loop has exited.
-	#
-	# If the main loop was started by #start_main_loop_thread, then this method
-	# may be called at any time, and it will stop the main loop thread.
-	def cleanup
-		if @main_loop_thread
-			@main_loop_thread_lock.synchronize do
-				@graceful_termination_pipe[1].close rescue nil
-			end
-			@main_loop_thread.join
-		end
-		@server_sockets.each_value do |value|
-			address, type, socket = value
-			socket.close rescue nil
-			if type == 'unix'
-				File.unlink(address) rescue nil
-			end
-		end
-		@owner_pipe.close rescue nil
-	end
-	
-	# Check whether the main loop's currently running.
-	def main_loop_running?
-		return @main_loop_running
-	end
-	
-	# Enter the request handler's main loop.
-	def main_loop
-		debug("Entering request handler main loop")
-		reset_signal_handlers
-		begin
-			@graceful_termination_pipe = IO.pipe
-			@graceful_termination_pipe[0].close_on_exec!
-			@graceful_termination_pipe[1].close_on_exec!
-			
-			@main_loop_thread_lock.synchronize do
-				@main_loop_generation += 1
-				@main_loop_running = true
-				@main_loop_thread_cond.broadcast
-				
-				@select_timeout = nil
-				
-				@selectable_sockets = []
-				@server_sockets.each_value do |value|
-					socket = value[2]
-					@selectable_sockets << socket if socket
-				end
-				@selectable_sockets << @owner_pipe
-				@selectable_sockets << @graceful_termination_pipe[0]
-			end
-			
-			install_useful_signal_handlers
-			socket_wrapper = Utils::UnseekableSocket.new
-			channel        = MessageChannel.new
-			buffer         = ''
-			
-			while true
-				@iterations += 1
-				if !accept_and_process_next_request(socket_wrapper, channel, buffer)
-					trace(2, "Request handler main loop exited normally")
-					break
-				end
-				@processed_requests += 1
-			end
-		rescue EOFError
-			# Exit main loop.
-			trace(2, "Request handler main loop interrupted by EOFError exception")
-		rescue Interrupt
-			# Exit main loop.
-			trace(2, "Request handler main loop interrupted by Interrupt exception")
-		rescue SignalException => signal
-			trace(2, "Request handler main loop interrupted by SignalException")
-			if signal.message != HARD_TERMINATION_SIGNAL &&
-			   signal.message != SOFT_TERMINATION_SIGNAL
-				raise
-			end
-		rescue Exception => e
-			trace(2, "Request handler main loop interrupted by #{e.class} exception")
-			raise
-		ensure
-			debug("Exiting request handler main loop")
-			revert_signal_handlers
-			@main_loop_thread_lock.synchronize do
-				@graceful_termination_pipe[1].close rescue nil
-				@graceful_termination_pipe[0].close rescue nil
-				@selectable_sockets = []
-				@main_loop_generation += 1
-				@main_loop_running = false
-				@main_loop_thread_cond.broadcast
-			end
-		end
-	end
-	
-	# Start the main loop in a new thread. This thread will be stopped by #cleanup.
-	def start_main_loop_thread
-		current_generation = @main_loop_generation
-		@main_loop_thread = Thread.new do
-			begin
-				main_loop
-			rescue Exception => e
-				print_exception(self.class, e)
-			end
-		end
-		@main_loop_thread_lock.synchronize do
-			while @main_loop_generation == current_generation
-				@main_loop_thread_cond.wait(@main_loop_thread_lock)
-			end
-		end
-	end
-	
-	# Remove this request handler from the application pool so that no
-	# new connections will come in. Then make the main loop quit a few
-	# seconds after the last time a connection came in. This all is to
-	# ensure that no connections come in while we're shutting down.
-	#
-	# May only be called while the main loop is running. May be called
-	# from any thread.
-	def soft_shutdown
-		unless @soft_terminated
-			@soft_terminated = true
-			@select_timeout = @soft_termination_linger_time
-			@graceful_termination_pipe[1].close rescue nil
-			if @detach_key && @pool_account_username && @pool_account_password
-				client = MessageClient.new(@pool_account_username, @pool_account_password)
-				begin
-					client.detach(@detach_key)
-				ensure
-					client.close
-				end
-			end
-		end
-	end
-
-private
-	include Utils
-	
-	def should_use_unix_sockets?
-		# Historical note:
-		# There seems to be a bug in MacOS X Leopard w.r.t. Unix server
-		# sockets file descriptors that are passed to another process.
-		# Usually Unix server sockets work fine, but when they're passed
-		# to another process, then clients that connect to the socket
-		# can incorrectly determine that the client socket is closed,
-		# even though that's not actually the case. More specifically:
-		# recv()/read() calls on these client sockets can return 0 even
-		# when we know EOF is not reached.
-		#
-		# The ApplicationPool infrastructure used to connect to a backend
-		# process's Unix socket in the helper server process, and then
-		# pass the connection file descriptor to the web server, which
-		# triggers this kernel bug. We used to work around this by using
-		# TCP sockets instead of Unix sockets; TCP sockets can still fail
-		# with this fake-EOF bug once in a while, but not nearly as often
-		# as with Unix sockets.
-		#
-		# This problem no longer applies today. The client socket is now
-		# created directly in the web server, and the bug is no longer
-		# triggered. Nevertheless, we keep this function intact so that
-		# if something like this ever happens again, we know why, and we
-		# can easily reactivate the workaround. Or maybe if we just need
-		# TCP sockets for some other reason.
-		
-		#return RUBY_PLATFORM !~ /darwin/
-		return true
-	end
-
-	def create_unix_socket_on_filesystem
-		while true
-			begin
-				if defined?(NativeSupport)
-					unix_path_max = NativeSupport::UNIX_PATH_MAX
-				else
-					unix_path_max = 100
-				end
-				socket_address = "#{passenger_tmpdir}/backends/ruby.#{generate_random_id(:base64)}"
-				socket_address = socket_address.slice(0, unix_path_max - 1)
-				socket = UNIXServer.new(socket_address)
-				socket.listen(BACKLOG_SIZE)
-				socket.close_on_exec!
-				File.chmod(0666, socket_address)
-				return [socket_address, socket]
-			rescue Errno::EADDRINUSE
-				# Do nothing, try again with another name.
-			end
-		end
-	end
-	
-	def create_tcp_socket
-		# We use "127.0.0.1" as address in order to force
-		# TCPv4 instead of TCPv6.
-		socket = TCPServer.new('127.0.0.1', 0)
-		socket.listen(BACKLOG_SIZE)
-		socket.close_on_exec!
-		socket_address = "127.0.0.1:#{socket.addr[1]}"
-		return [socket_address, socket]
-	end
-
-	# Reset signal handlers to their default handler, and install some
-	# special handlers for a few signals. The previous signal handlers
-	# will be put back by calling revert_signal_handlers.
-	def reset_signal_handlers
-		Signal.list_trappable.each_key do |signal|
-			begin
-				prev_handler = trap(signal, DEFAULT)
-				if prev_handler != DEFAULT
-					@previous_signal_handlers[signal] = prev_handler
-				end
-			rescue ArgumentError
-				# Signal cannot be trapped; ignore it.
-			end
-		end
-		trap('HUP', IGNORE)
-		PhusionPassenger.call_event(:after_installing_signal_handlers)
-	end
-	
-	def install_useful_signal_handlers
-		trappable_signals = Signal.list_trappable
-		
-		trap(SOFT_TERMINATION_SIGNAL) do
-			begin
-				soft_shutdown
-			rescue => e
-				print_exception("Passenger RequestHandler soft shutdown routine", e)
-			end
-		end if trappable_signals.has_key?(SOFT_TERMINATION_SIGNAL.sub(/^SIG/, ''))
-		
-		trap('ABRT') do
-			raise SignalException, "SIGABRT"
-		end if trappable_signals.has_key?('ABRT')
-		
-		trap('QUIT') do
-			warn(global_backtrace_report)
-		end if trappable_signals.has_key?('QUIT')
-	end
-	
-	def revert_signal_handlers
-		@previous_signal_handlers.each_pair do |signal, handler|
-			trap(signal, handler)
-		end
-	end
-	
-	def accept_and_process_next_request(socket_wrapper, channel, buffer)
-		select_result = select(@selectable_sockets, nil, nil, @select_timeout)
-		if select_result.nil?
-			# This can only happen after we've received a soft termination
-			# signal. No connection was accepted for @select_timeout seconds,
-			# so now we quit the main loop.
-			trace(2, "Soft termination timeout")
-			return false
-		end
-		
-		ios = select_result.first
-		if ios.include?(@main_socket)
-			trace(3, "Accepting new request on main socket")
-			connection = socket_wrapper.wrap(@main_socket.accept)
-			channel.io = connection
-			headers, input_stream = parse_native_request(connection, channel, buffer)
-			full_http_response = false
-		elsif ios.include?(@http_socket)
-			trace(3, "Accepting new request on HTTP socket")
-			connection = socket_wrapper.wrap(@http_socket.accept)
-			headers, input_stream = parse_http_request(connection)
-			full_http_response = true
-		else
-			# The other end of the owner pipe has been closed, or the
-			# graceful termination pipe has been closed. This is our
-			# call to gracefully terminate (after having processed all
-			# incoming requests).
-			if @select_timeout
-				# But if @select_timeout is set then it means that we
-				# received a soft termination signal. In that case
-				# we don't want to quit immediately, but @select_timeout
-				# seconds after the last time a connection was accepted.
-				#
-				# #soft_shutdown not only closes the graceful termination
-				# pipe, but it also tells the application pool to remove
-				# this process from the pool, which will cause the owner
-				# pipe to be closed. So we remove both IO objects
-				# from @selectable_sockets in order to prevent the
-				# next select call from immediately returning, allowing
-				# it to time out.
-				@selectable_sockets.delete(@graceful_termination_pipe[0])
-				@selectable_sockets.delete(@owner_pipe)
-				return true
-			else
-				if ios.include?(@owner_pipe)
-					trace(2, "Owner pipe closed")
-				elsif ios.include?(@graceful_termination_pipe[0])
-					trace(2, "Graceful termination pipe closed")
-				end
-				return false
-			end
-		end
-		
-		if headers
-			prepare_request(headers)
-			begin
-				if headers[REQUEST_METHOD] == PING
-					process_ping(headers, input_stream, connection)
-				else
-					process_request(headers, input_stream, connection, full_http_response)
-				end
-			rescue Exception
-				has_error = true
-				raise
-			ensure
-				finalize_request(headers, has_error)
-			end
-		end
-		return true
-	rescue => e
-		if socket_wrapper.source_of_exception?(e)
-			# EPIPE is harmless, it just means that the client closed the connection.
-			# Other errors might indicate a problem so we print them, but they're
-			# probably not bad enough to warrant stopping the request handler.
-			if !e.is_a?(Errno::EPIPE)
-				print_exception("Passenger RequestHandler's client socket", e)
-			end
-			return true
-		else
-			if @analytics_logger && headers && headers[PASSENGER_TXN_ID]
-				log_analytics_exception(headers, e)
-			end
-			raise e
-		end
-	ensure
-		# The 'close_write' here prevents forked child
-		# processes from unintentionally keeping the
-		# connection open.
-		if connection && !connection.closed?
-			begin
-				connection.close_write
-			rescue SystemCallError
-			end
-			begin
-				connection.close
-			rescue SystemCallError
-			end
-		end
-		if input_stream && !input_stream.closed?
-			input_stream.close rescue nil
-		end
-	end
-	
-	# Read the next request from the given socket, and return
-	# a pair [headers, input_stream]. _headers_ is a Hash containing
-	# the request headers, while _input_stream_ is an IO object for
-	# reading HTTP POST data.
-	#
-	# Returns nil if end-of-stream was encountered.
-	def parse_native_request(socket, channel, buffer)
-		headers_data = channel.read_scalar(buffer, MAX_HEADER_SIZE)
-		if headers_data.nil?
-			return
-		end
-		headers = split_by_null_into_hash(headers_data)
-		if @connect_password && headers[PASSENGER_CONNECT_PASSWORD] != @connect_password
-			warn "*** Passenger RequestHandler warning: " <<
-				"someone tried to connect with an invalid connect password."
-			return
-		else
-			return [headers, socket]
-		end
-	rescue SecurityError => e
-		warn("*** Passenger RequestHandler warning: " <<
-			"HTTP header size exceeded maximum.")
-		return nil
-	end
-	
-	# Like parse_native_request, but parses an HTTP request. This is a very minimalistic
-	# HTTP parser and is not intended to be complete, fast or secure, since the HTTP server
-	# socket is intended to be used for debugging purposes only.
-	def parse_http_request(socket)
-		headers = {}
-		
-		data = ""
-		while data !~ /\r\n\r\n/ && data.size < MAX_HEADER_SIZE
-			data << socket.readpartial(16 * 1024)
-		end
-		if data.size >= MAX_HEADER_SIZE
-			warn("*** Passenger RequestHandler warning: " <<
-				"HTTP header size exceeded maximum.")
-			return nil
-		end
-		
-		data.gsub!(/\r\n\r\n.*/, '')
-		data.split("\r\n").each_with_index do |line, i|
-			if i == 0
-				# GET / HTTP/1.1
-				line =~ /^([A-Za-z]+) (.+?) (HTTP\/\d\.\d)$/
-				request_method = $1
-				request_uri    = $2
-				protocol       = $3
-				path_info, query_string    = request_uri.split("?", 2)
-				headers[REQUEST_METHOD]    = request_method
-				headers["REQUEST_URI"]     = request_uri
-				headers["QUERY_STRING"]    = query_string || ""
-				headers["SCRIPT_NAME"]     = ""
-				headers["PATH_INFO"]       = path_info
-				headers["SERVER_NAME"]     = "127.0.0.1"
-				headers["SERVER_PORT"]     = socket.addr[1].to_s
-				headers["SERVER_PROTOCOL"] = protocol
-			else
-				header, value = line.split(/\s*:\s*/, 2)
-				header.upcase!            # "Foo-Bar" => "FOO-BAR"
-				header.gsub!("-", "_")    #           => "FOO_BAR"
-				if header == "CONTENT_LENGTH" || header == "CONTENT_TYPE"
-					headers[header] = value
-				else
-					headers["HTTP_#{header}"] = value
-				end
-			end
-		end
-		
-		if @connect_password && headers["HTTP_X_PASSENGER_CONNECT_PASSWORD"] != @connect_password
-			warn "*** Passenger RequestHandler warning: " <<
-				"someone tried to connect with an invalid connect password."
-			return
-		else
-			return [headers, socket]
-		end
-	rescue EOFError
-		return nil
-	end
-	
-	def process_ping(env, input, output)
-		output.write("pong")
-	end
-	
-	def determine_passenger_header
-		header = "Phusion Passenger (mod_rails/mod_rack)"
-		if @options["show_version_in_header"]
-			header << " #{VERSION_STRING}"
-		end
-		if File.exist?("#{SOURCE_ROOT}/enterprisey.txt") ||
-		   File.exist?("/etc/passenger_enterprisey.txt")
-			header << ", Enterprise Edition"
-		end
-		return header
-	end
-	
-	def prepare_request(headers)
-		if @analytics_logger && headers[PASSENGER_TXN_ID]
-			txn_id = headers[PASSENGER_TXN_ID]
-			group_name = headers[PASSENGER_GROUP_NAME]
-			union_station_key = headers[PASSENGER_UNION_STATION_KEY]
-			log = @analytics_logger.continue_transaction(txn_id, group_name,
-				:requests, union_station_key)
-			headers[PASSENGER_ANALYTICS_WEB_LOG] = log
-			Thread.current[PASSENGER_ANALYTICS_WEB_LOG] = log
-			Thread.current[PASSENGER_TXN_ID] = txn_id
-			Thread.current[PASSENGER_GROUP_NAME] = group_name
-			Thread.current[PASSENGER_UNION_STATION_KEY] = union_station_key
-			if OBJECT_SPACE_SUPPORTS_LIVE_OBJECTS
-				log.message("Initial objects on heap: #{ObjectSpace.live_objects}")
-			end
-			if OBJECT_SPACE_SUPPORTS_ALLOCATED_OBJECTS
-				log.message("Initial objects allocated so far: #{ObjectSpace.allocated_objects}")
-			elsif OBJECT_SPACE_SUPPORTS_COUNT_OBJECTS
-				count = ObjectSpace.count_objects
-				log.message("Initial objects allocated so far: #{count[:TOTAL] - count[:FREE]}")
-			end
-			if GC_SUPPORTS_TIME
-				log.message("Initial GC time: #{GC.time}")
-			end
-			log.begin_measure("app request handler processing")
-		end
-		
-		#################
-	end
-	
-	def finalize_request(headers, has_error)
-		log = headers[PASSENGER_ANALYTICS_WEB_LOG]
-		if log && !log.closed?
-			exception_occurred = false
-			begin
-				log.end_measure("app request handler processing", has_error)
-				if OBJECT_SPACE_SUPPORTS_LIVE_OBJECTS
-					log.message("Final objects on heap: #{ObjectSpace.live_objects}")
-				end
-				if OBJECT_SPACE_SUPPORTS_ALLOCATED_OBJECTS
-					log.message("Final objects allocated so far: #{ObjectSpace.allocated_objects}")
-				elsif OBJECT_SPACE_SUPPORTS_COUNT_OBJECTS
-					count = ObjectSpace.count_objects
-					log.message("Final objects allocated so far: #{count[:TOTAL] - count[:FREE]}")
-				end
-				if GC_SUPPORTS_TIME
-					log.message("Final GC time: #{GC.time}")
-				end
-				if GC_SUPPORTS_CLEAR_STATS
-					# Clear statistics to void integer wraps.
-					GC.clear_stats
-				end
-				Thread.current[PASSENGER_ANALYTICS_WEB_LOG] = nil
-			rescue Exception
-				# Maybe this exception was raised while communicating
-				# with the logging agent. If that is the case then
-				# log.close may also raise an exception, but we're only
-				# interested in the original exception. So if this
-				# situation occurs we must ignore any exceptions raised
-				# by log.close.
-				exception_occurred = true
-				raise
-			ensure
-				# It is important that the following call receives an ACK
-				# from the logging agent and that we don't close the socket
-				# connection until the ACK has been received, otherwise
-				# the helper agent may close the transaction before this
-				# process's openTransaction command is processed.
-				begin
-					log.close
-				rescue
-					raise if !exception_occurred
-				end
-			end
-		end
-		
-		#################
-	end
-	
-	def log_analytics_exception(env, exception)
-		log = @analytics_logger.new_transaction(
-			env[PASSENGER_GROUP_NAME],
-			:exceptions,
-			env[PASSENGER_UNION_STATION_KEY])
-		begin
-			request_txn_id = env[PASSENGER_TXN_ID]
-			message = exception.message
-			message = exception.to_s if message.empty?
-			message = [message].pack('m')
-			message.gsub!("\n", "")
-			backtrace_string = [exception.backtrace.join("\n")].pack('m')
-			backtrace_string.gsub!("\n", "")
-
-			log.message("Request transaction ID: #{request_txn_id}")
-			log.message("Message: #{message}")
-			log.message("Class: #{exception.class.name}")
-			log.message("Backtrace: #{backtrace_string}")
-		ensure
-			log.close
-		end
-	end
-end
-
-end # module PhusionPassenger
diff --git a/lib/phusion_passenger/abstract_server.rb b/lib/phusion_passenger/abstract_server.rb
deleted file mode 100644
index 430cd3c..0000000
--- a/lib/phusion_passenger/abstract_server.rb
+++ /dev/null
@@ -1,372 +0,0 @@
-# encoding: binary
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'socket'
-require 'phusion_passenger/message_channel'
-require 'phusion_passenger/utils'
-require 'phusion_passenger/utils/tmpdir'
-require 'phusion_passenger/native_support'
-
-module PhusionPassenger
-
-# An abstract base class for a server that has the following properties:
-#
-# - The server listens on a password protected Unix socket.
-# - The server is multithreaded and handles one client per thread.
-# - The server is owned by one or more processes. If all processes close their
-#   reference to the server, then the server will quit.
-# - The server's main loop may be run in a child process (and so is asynchronous
-#   from the parent process).
-# - One can communicate with the server through discrete MessageChannel messages,
-#   as opposed to byte streams.
-# - The server can pass file descriptors (IO objects) back to the client.
-#
-# The server will also reset all signal handlers. That is, it will respond to
-# all signals in the default manner. The only exception is SIGHUP, which is
-# ignored. One may define additional signal handlers using define_signal_handler().
-#
-# Before an AbstractServer can be used, it must first be started by calling start().
-# When it is no longer needed, stop() should be called.
-#
-# Here's an example on using AbstractServer:
-#
-#  class MyServer < PhusionPassenger::AbstractServer
-#     def initialize
-#        super()
-#        define_message_handler(:hello, :handle_hello)
-#     end
-#     
-#     def hello(first_name, last_name)
-#        connect do |channel|
-#           channel.write('hello', first_name, last_name)
-#           reply, pointless_number = channel.read
-#           puts "The server said: #{reply}"
-#           puts "In addition, it sent this pointless number: #{pointless_number}"
-#        end
-#     end
-#  
-#  private
-#     def handle_hello(channel, first_name, last_name)
-#        channel.write("Hello #{first_name} #{last_name}, how are you?", 1234)
-#     end
-#  end
-#  
-#  server = MyServer.new
-#  server.start
-#  server.hello("Joe", "Dalton")
-#  server.stop
-class AbstractServer
-	include Utils
-
-	# Raised when the server receives a message with an unknown message name.
-	class UnknownMessage < StandardError
-	end
-	
-	# Raised when a command is invoked that requires that the server is
-	# not already started.
-	class ServerAlreadyStarted < StandardError
-	end
-	
-	# Raised when a command is invoked that requires that the server is
-	# already started.
-	class ServerNotStarted < StandardError
-	end
-	
-	# This exception means that the server process exited unexpectedly.
-	class ServerError < StandardError
-	end
-	
-	class InvalidPassword < StandardError
-	end
-	
-	attr_reader :password
-	attr_accessor :ignore_password_errors
-	
-	# The maximum time that this AbstractServer may be idle. Used by
-	# AbstractServerCollection to determine when this object should
-	# be cleaned up. nil or 0 indicate that this object should never
-	# be idle cleaned.
-	attr_accessor :max_idle_time
-	
-	# Used by AbstractServerCollection to remember when this AbstractServer
-	# should be idle cleaned.
-	attr_accessor :next_cleaning_time
-	
-	def initialize(socket_filename = nil, password = nil)
-		@socket_filename = socket_filename
-		@password = password
-		@socket_filename ||= "#{passenger_tmpdir}/spawn-server/socket.#{Process.pid}.#{object_id}"
-		@password ||= generate_random_id(:base64)
-		
-		@message_handlers = {}
-		@signal_handlers = {}
-		@orig_signal_handlers = {}
-	end
-	
-	# Start the server. This method does not block since the server runs
-	# asynchronously from the current process.
-	#
-	# You may only call this method if the server is not already started.
-	# Otherwise, a ServerAlreadyStarted will be raised.
-	#
-	# Derived classes may raise additional exceptions.
-	def start
-		if started?
-			raise ServerAlreadyStarted, "Server is already started"
-		end
-		
-		a, b = UNIXSocket.pair
-		File.unlink(@socket_filename) rescue nil
-		server_socket = UNIXServer.new(@socket_filename)
-		File.chmod(0700, @socket_filename)
-		
-		before_fork
-		@pid = fork
-		if @pid.nil?
-			has_exception = false
-			begin
-				STDOUT.sync = true
-				STDERR.sync = true
-				a.close
-				
-				# During Passenger's early days, we used to close file descriptors based
-				# on a white list of file descriptors. That proved to be way too fragile:
-				# too many file descriptors are being left open even though they shouldn't
-				# be. So now we close file descriptors based on a black list.
-				#
-				# Note that STDIN, STDOUT and STDERR may be temporarily set to
-				# different file descriptors than 0, 1 and 2, e.g. in unit tests.
-				# We don't want to close these either.
-				file_descriptors_to_leave_open = [0, 1, 2,
-					b.fileno, server_socket.fileno,
-					fileno_of(STDIN), fileno_of(STDOUT), fileno_of(STDERR)
-				].compact.uniq
-				NativeSupport.close_all_file_descriptors(file_descriptors_to_leave_open)
-				# In addition to closing the file descriptors, one must also close
-				# the associated IO objects. This is to prevent IO.close from
-				# double-closing already closed file descriptors.
-				close_all_io_objects_for_fds(file_descriptors_to_leave_open)
-				
-				# At this point, RubyGems might have open file handles for which
-				# the associated file descriptors have just been closed. This can
-				# result in mysterious 'EBADFD' errors. So we force RubyGems to
-				# clear all open file handles.
-				Gem.clear_paths
-				
-				# Reseed pseudo-random number generator for security reasons.
-				srand
-				
-				start_synchronously(@socket_filename, @password, server_socket, b)
-			rescue Interrupt
-				# Do nothing.
-				has_exception = true
-			rescue Exception => e
-				has_exception = true
-				print_exception(self.class.to_s, e)
-			ensure
-				exit!(has_exception ? 1 : 0)
-			end
-		end
-		server_socket.close
-		b.close
-		@owner_socket = a
-	end
-	
-	# Start the server, but in the current process instead of in a child process.
-	# This method blocks until the server's main loop has ended.
-	#
-	# All hooks will be called, except before_fork().
-	def start_synchronously(socket_filename, password, server_socket, owner_socket)
-		@owner_socket = owner_socket
-		begin
-			reset_signal_handlers
-			initialize_server
-			begin
-				server_main_loop(password, server_socket)
-			ensure
-				finalize_server
-			end
-		rescue Interrupt
-			# Do nothing
-		ensure
-			@owner_socket = nil
-			revert_signal_handlers
-			File.unlink(socket_filename) rescue nil
-			server_socket.close
-		end
-	end
-	
-	# Stop the server. The server will quit as soon as possible. This method waits
-	# until the server has been stopped.
-	#
-	# When calling this method, the server must already be started. If not, a
-	# ServerNotStarted will be raised.
-	def stop
-		if !started?
-			raise ServerNotStarted, "Server is not started"
-		end
-		
-		begin
-			@owner_socket.write("x")
-		rescue Errno::EPIPE
-		end
-		@owner_socket.close
-		@owner_socket = nil
-		File.unlink(@socket_filename) rescue nil
-		
-		# Wait at most 4 seconds for server to exit. If it doesn't do that,
-		# we kill it forcefully with SIGKILL.
-		if !Process.timed_waitpid(@pid, 4)
-			Process.kill('SIGKILL', @pid) rescue nil
-			Process.timed_waitpid(@pid, 1)
-		end
-	end
-	
-	# Return whether the server has been started.
-	def started?
-		return !!@owner_socket
-	end
-	
-	# Return the PID of the started server. This is only valid if #start has been called.
-	def server_pid
-		return @pid
-	end
-	
-	# Connects to the server and yields a channel for communication.
-	# The first message's name must match a handler name. The connection can only
-	# be used for a single handler cycle; after the handler is done, the connection
-	# will be closed.
-	#
-	#   server.connect do |channel|
-	#      channel.write("a message")
-	#      ...
-	#   end
-	#
-	# Raises: SystemCallError, IOError, SocketError
-	def connect
-		channel = MessageChannel.new(UNIXSocket.new(@socket_filename))
-		begin
-			channel.write_scalar(@password)
-			yield channel
-		ensure
-			channel.close
-		end
-	end
-
-protected
-	# A hook which is called when the server is being started, just before forking a new process.
-	# The default implementation does nothing, this method is supposed to be overrided by child classes.
-	def before_fork
-	end
-	
-	# A hook which is called when the server is being started. This is called in the child process,
-	# before the main loop is entered.
-	# The default implementation does nothing, this method is supposed to be overrided by child classes.
-	def initialize_server
-	end
-	
-	# A hook which is called when the server is being stopped. This is called in the child process,
-	# after the main loop has been left.
-	# The default implementation does nothing, this method is supposed to be overrided by child classes.
-	def finalize_server
-	end
-	
-	# Define a handler for a message. _message_name_ is the name of the message to handle,
-	# and _handler_ is the name of a method to be called (this may either be a String or a Symbol).
-	#
-	# A message is just a list of strings, and so _handler_ will be called with the message as its
-	# arguments, excluding the first element. See also the example in the class description.
-	def define_message_handler(message_name, handler)
-		@message_handlers[message_name.to_s] = handler
-	end
-	
-	# Define a handler for a signal.
-	def define_signal_handler(signal, handler)
-		@signal_handlers[signal.to_s] = handler
-	end
-	
-	def fileno_of(io)
-		return io.fileno
-	rescue
-		return nil
-	end
-
-private
-	# Reset all signal handlers to default. This is called in the child process,
-	# before entering the main loop.
-	def reset_signal_handlers
-		Signal.list_trappable.each_key do |signal|
-			begin
-				@orig_signal_handlers[signal] = trap(signal, 'DEFAULT')
-			rescue ArgumentError
-				# Signal cannot be trapped; ignore it.
-			end
-		end
-		@signal_handlers.each_pair do |signal, handler|
-			trap(signal) do
-				__send__(handler)
-			end
-		end
-		trap('HUP', 'IGNORE')
-	end
-	
-	def revert_signal_handlers
-		@orig_signal_handlers.each_pair do |signal, handler|
-			trap(signal, handler)
-		end
-		@orig_signal_handlers.clear
-	end
-	
-	def server_main_loop(password, server_socket)
-		while true
-			ios = select([@owner_socket, server_socket]).first
-			if ios.include?(server_socket)
-				client_socket = server_socket.accept
-				begin
-					client = MessageChannel.new(client_socket)
-					
-					client_password = client.read_scalar
-					if client_password != password
-						next
-					end
-					
-					name, *args = client.read
-					if name
-						if @message_handlers.has_key?(name)
-							__send__(@message_handlers[name], client, *args)
-						else
-							raise UnknownMessage, "Unknown message '#{name}' received."
-						end
-					end
-				ensure
-					client_socket.close
-				end
-			else
-				break
-			end
-		end
-	end
-end
-
-end # module PhusionPassenger
diff --git a/lib/phusion_passenger/abstract_server_collection.rb b/lib/phusion_passenger/abstract_server_collection.rb
deleted file mode 100644
index aeb7b40..0000000
--- a/lib/phusion_passenger/abstract_server_collection.rb
+++ /dev/null
@@ -1,335 +0,0 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'phusion_passenger/utils'
-
-module PhusionPassenger
-
-# This class maintains a collection of AbstractServer objects. One can add new
-# AbstractServer objects, or look up existing ones via a key.
-# AbstractServerCollection also automatically takes care of cleaning up
-# AbstractServers that have been idle for too long.
-#
-# This class exists because both SpawnManager and ClassicRails::FrameworkSpawner need this kind
-# of functionality. SpawnManager maintains a collection of ClassicRails::FrameworkSpawner
-# and ClassicRails::ApplicationSpawner objects, while ClassicRails::FrameworkSpawner maintains a
-# collection of ClassicRails::ApplicationSpawner objects.
-#
-# This class is thread-safe as long as the specified thread-safety rules are followed.
-class AbstractServerCollection
-	attr_reader :next_cleaning_time
-	
-	include Utils
-	
-	def initialize
-		@collection = {}
-		@lock = Mutex.new
-		@cleanup_lock = Mutex.new
-		@cond = ConditionVariable.new
-		@done = false
-		
-		# The next time the cleaner thread should check for idle servers.
-		# The value may be nil, in which case the value will be calculated
-		# at the end of the #synchronized block.
-		#
-		# Invariant:
-		#    if value is not nil:
-		#       There exists an s in @collection with s.next_cleaning_time == value.
-		#       for all s in @collection:
-		#          if eligable_for_cleanup?(s):
-		#             s.next_cleaning_time <= value
-		@next_cleaning_time = Time.now + 60 * 60
-		@next_cleaning_time_changed = false
-		
-		@cleaner_thread = Thread.new do
-			begin
-				@lock.synchronize do
-					cleaner_thread_main
-				end
-			rescue Exception => e
-				print_exception(self.class.to_s, e)
-			end
-		end
-	end
-	
-	# Acquire the lock for this AbstractServerCollection object, and run
-	# the code within the block. The entire block will be a single atomic
-	# operation.
-	def synchronize
-		@lock.synchronize do
-			@in_synchronize_block = true
-			begin
-				yield
-			ensure
-				if @next_cleaning_time.nil?
-					@collection.each_value do |server|
-						if @next_cleaning_time.nil? ||
-						   (eligable_for_cleanup?(server) &&
-						    server.next_cleaning_time < @next_cleaning_time
-						   )
-							@next_cleaning_time = server.next_cleaning_time
-						end
-					end
-					if @next_cleaning_time.nil?
-						# There are no servers in the collection with an idle timeout.
-						@next_cleaning_time = Time.now + 60 * 60
-					end
-					@next_cleaning_time_changed = true
-				end
-				if @next_cleaning_time_changed
-					@next_cleaning_time_changed = false
-					@cond.signal
-				end
-				@in_synchronize_block = false
-			end
-		end
-	end
-	
-	# Lookup and returns an AbstractServer with the given key.
-	#
-	# If there is no AbstractSerer associated with the given key, then the given
-	# block will be called. That block must return an AbstractServer object. Then,
-	# that object will be stored in the collection, and returned.
-	#
-	# The block must set the 'max_idle_time' attribute on the AbstractServer.
-	# AbstractServerCollection's idle cleaning interval will be adapted to accomodate
-	# with this. Changing the value outside this block is not guaranteed to have any
-	# effect on the idle cleaning interval.
-	# A max_idle_time value of nil or 0 means the AbstractServer will never be idle cleaned.
-	#
-	# If the block raises an exception, then the collection will not be modified,
-	# and the exception will be propagated.
-	#
-	# Precondition: this method must be called within a #synchronize block.
-	def lookup_or_add(key)
-		raise ArgumentError, "cleanup() has already been called." if @done
-		must_be_in_synchronize_block
-		server = @collection[key]
-		if server
-			register_activity(server)
-			return server
-		else
-			server = yield
-			if !server.respond_to?(:start)
-				raise TypeError, "The block didn't return a valid AbstractServer object."
-			end
-			if eligable_for_cleanup?(server)
-				server.next_cleaning_time = Time.now + server.max_idle_time
-				if @next_cleaning_time && server.next_cleaning_time < @next_cleaning_time
-					@next_cleaning_time = server.next_cleaning_time
-					@next_cleaning_time_changed = true
-				end
-			end
-			@collection[key] = server
-			return server
-		end
-	end
-	
-	# Checks whether there's an AbstractServer object associated with the given key.
-	#
-	# Precondition: this method must be called within a #synchronize block.
-	def has_key?(key)
-		must_be_in_synchronize_block
-		return @collection.has_key?(key)
-	end
-	
-	# Checks whether the collection is empty.
-	#
-	# Precondition: this method must be called within a #synchronize block.
-	def empty?
-		must_be_in_synchronize_block
-		return @collection.empty?
-	end
-	
-	# Deletes from the collection the AbstractServer that's associated with the
-	# given key. If no such AbstractServer exists, nothing will happen.
-	#
-	# If the AbstractServer is started, then it will be stopped before deletion.
-	#
-	# Precondition: this method must be called within a #synchronize block.
-	def delete(key)
-		raise ArgumentError, "cleanup() has already been called." if @done
-		must_be_in_synchronize_block
-		server = @collection[key]
-		if server
-			if server.started?
-				server.stop
-			end
-			@collection.delete(key)
-			if server.next_cleaning_time == @next_cleaning_time
-				@next_cleaning_time = nil
-			end
-		end
-	end
-	
-	# Notify this AbstractServerCollection that +server+ has performed an activity.
-	# This AbstractServerCollection will update the idle information associated with +server+
-	# accordingly.
-	#
-	# lookup_or_add already automatically updates idle information, so you only need to
-	# call this method if the time at which the server has performed an activity is
-	# not close to the time at which lookup_or_add had been called.
-	#
-	# Precondition: this method must be called within a #synchronize block.
-	def register_activity(server)
-		must_be_in_synchronize_block
-		if eligable_for_cleanup?(server)
-			if server.next_cleaning_time == @next_cleaning_time
-				@next_cleaning_time = nil
-			end
-			server.next_cleaning_time = Time.now + server.max_idle_time
-		end
-	end
-	
-	# Tell the cleaner thread to check the collection as soon as possible, instead
-	# of sleeping until the next scheduled cleaning time.
-	#
-	# Precondition: this method must NOT be called within a #synchronize block.
-	def check_idle_servers!
-		must_not_be_in_synchronize_block
-		@lock.synchronize do
-			@next_cleaning_time = Time.now - 60 * 60
-			@cond.signal
-		end
-	end
-	
-	# Iterate over all AbstractServer objects.
-	#
-	# Precondition: this method must be called within a #synchronize block.
-	def each
-		must_be_in_synchronize_block
-		each_pair do |key, server|
-			yield server
-		end
-	end
-	
-	# Iterate over all keys and associated AbstractServer objects.
-	#
-	# Precondition: this method must be called within a #synchronize block.
-	def each_pair
-		raise ArgumentError, "cleanup() has already been called." if @done
-		must_be_in_synchronize_block
-		@collection.each_pair do |key, server|
-			yield(key, server)
-		end
-	end
-	
-	# Delete all AbstractServers from the collection. Each AbstractServer will be
-	# stopped, if necessary.
-	#
-	# Precondition: this method must be called within a #synchronize block.
-	def clear
-		must_be_in_synchronize_block
-		@collection.each_value do |server|
-			if server.started?
-				server.stop
-			end
-		end
-		@collection.clear
-		@next_cleaning_time = nil
-	end
-	
-	# Cleanup all resources used by this AbstractServerCollection. All AbstractServers
-	# from the collection will be deleted. Each AbstractServer will be stopped, if
-	# necessary. The background thread which removes idle AbstractServers will be stopped.
-	#
-	# After calling this method, this AbstractServerCollection object will become
-	# unusable.
-	#
-	# Precondition: this method must *NOT* be called within a #synchronize block.
-	def cleanup
-		must_not_be_in_synchronize_block
-		@cleanup_lock.synchronize do
-			return if @done
-			@lock.synchronize do
-				@done = true
-				@cond.signal
-			end
-			@cleaner_thread.join
-			synchronize do
-				clear
-			end
-		end
-	end
-
-private
-	def cleaner_thread_main
-		while !@done
-			current_time = Time.now
-			# We add a 0.2 seconds delay to the sleep time because system
-			# timers are not entirely accurate.
-			sleep_time = (@next_cleaning_time - current_time).to_f + 0.2
-			if sleep_time > 0 && @cond.timed_wait(@lock, sleep_time)
-				next
-			else
-				keys_to_delete = nil
-				@next_cleaning_time = nil
-				@collection.each_pair do |key, server|
-					if eligable_for_cleanup?(server)
-						# Cleanup this server if its idle timeout has expired.
-						if server.next_cleaning_time <= current_time
-							keys_to_delete ||= []
-							keys_to_delete << key
-							if server.started?
-								server.stop
-							end
-						# If not, then calculate the next cleaning time because
-						# we're iterating the collection anyway.
-						elsif @next_cleaning_time.nil? ||
-						      server.next_cleaning_time < @next_cleaning_time
-							@next_cleaning_time = server.next_cleaning_time
-						end
-					end
-				end
-				if keys_to_delete
-					keys_to_delete.each do |key|
-						@collection.delete(key)
-					end
-				end
-				if @next_cleaning_time.nil?
-					# There are no servers in the collection with an idle timeout.
-					@next_cleaning_time = Time.now + 60 * 60
-				end
-			end
-		end
-	end
-	
-	# Checks whether the given server is eligible for being idle cleaned.
-	def eligable_for_cleanup?(server)
-		return server.max_idle_time && server.max_idle_time != 0
-	end
-	
-	def must_be_in_synchronize_block
-		if !@in_synchronize_block
-			raise RuntimeError, "This method may only be called within a #synchronize block!"
-		end
-	end
-	
-	def must_not_be_in_synchronize_block
-		if @in_synchronize_block
-			raise RuntimeError, "This method may NOT be called within a #synchronize block!"
-		end
-	end
-end
-
-end # module PhusionPassenger
diff --git a/lib/phusion_passenger/admin_tools.rb b/lib/phusion_passenger/admin_tools.rb
index 6394b29..f149241 100644
--- a/lib/phusion_passenger/admin_tools.rb
+++ b/lib/phusion_passenger/admin_tools.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/lib/phusion_passenger/admin_tools/memory_stats.rb b/lib/phusion_passenger/admin_tools/memory_stats.rb
index a27a553..5a9454b 100644
--- a/lib/phusion_passenger/admin_tools/memory_stats.rb
+++ b/lib/phusion_passenger/admin_tools/memory_stats.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -87,7 +87,7 @@ class MemoryStats
 	# Phusion Passenger is not running.
 	def passenger_processes
 		@passenger_processes ||= list_processes(:match =>
-			/((^| )Passenger |(^| )Rails:|(^| )Rack:|PassengerHelperAgent|PassengerWatchdog|PassengerLoggingAgent)/)
+			/((^| )Passenger |(^| )Rails:|(^| )Rack:|PassengerHelperAgent|PassengerWatchdog|PassengerLoggingAgent|wsgi-loader.py)/)
 	end
 	
 	# Returns the sum of the memory usages of all given processes.
diff --git a/lib/phusion_passenger/admin_tools/server_instance.rb b/lib/phusion_passenger/admin_tools/server_instance.rb
index 68c95db..d898fda 100644
--- a/lib/phusion_passenger/admin_tools/server_instance.rb
+++ b/lib/phusion_passenger/admin_tools/server_instance.rb
@@ -1,5 +1,6 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+# encoding: utf-8
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -26,6 +27,8 @@ require 'fileutils'
 require 'socket'
 require 'ostruct'
 require 'phusion_passenger/admin_tools'
+require 'phusion_passenger/constants'
+require 'phusion_passenger/utils'
 require 'phusion_passenger/message_channel'
 require 'phusion_passenger/message_client'
 
@@ -33,14 +36,6 @@ module PhusionPassenger
 module AdminTools
 
 class ServerInstance
-	# If you change the structure version then don't forget to change
-	# ext/common/ServerInstanceDir.h too.
-	
-	DIR_STRUCTURE_MAJOR_VERSION = 1
-	DIR_STRUCTURE_MINOR_VERSION = 0
-	GENERATION_STRUCTURE_MAJOR_VERSION = 1
-	GENERATION_STRUCTURE_MINOR_VERSION = 0
-	
 	STALE_TIME_THRESHOLD = 60
 	
 	class StaleDirectoryError < StandardError
@@ -56,16 +51,19 @@ class ServerInstance
 	end
 	
 	class Stats
-		attr_accessor :max, :count, :active, :global_queue_size
+		attr_accessor :max, :usage, :get_wait_list_size
 	end
 	
 	class Group
-		attr_reader :app_root, :name, :environment, :processes
+		attr_reader :app_root, :name, :environment, :spawning, :processes
+
+		alias spawning? spawning
 		
-		def initialize(app_root, name, environment)
+		def initialize(app_root, name, environment, spawning)
 			@app_root = app_root
 			@name = name
 			@environment = environment
+			@spawning = spawning
 			@processes = []
 		end
 	end
@@ -89,6 +87,7 @@ class ServerInstance
 			if !socket_info
 				raise "This process has no server socket named '#{socket_name}'."
 			end
+			return Utils.connect_to_server(socket_info.address)
 			if socket_info.address_type == 'unix'
 				return UNIXSocket.new(socket_info.address)
 			else
@@ -113,9 +112,9 @@ class ServerInstance
 		instances = []
 		
 		Dir["#{AdminTools.tmpdir}/passenger.*"].each do |dir|
-			next if File.basename(dir) !~ /passenger\.#{DIR_STRUCTURE_MAJOR_VERSION}\.(\d+)\.(\d+)\Z/
+			next if File.basename(dir) !~ /passenger\.#{PhusionPassenger::SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION}\.(\d+)\.(.+)\Z/
 			minor = $1
-			next if minor.to_i > DIR_STRUCTURE_MINOR_VERSION
+			next if minor.to_i > PhusionPassenger::SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION
 			
 			begin
 				instances << ServerInstance.new(dir)
@@ -173,7 +172,8 @@ class ServerInstance
 		end
 		major = major.to_i
 		minor = minor.to_i
-		if major != GENERATION_STRUCTURE_MAJOR_VERSION || minor > GENERATION_STRUCTURE_MINOR_VERSION
+		if major != PhusionPassenger::SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION ||
+		   minor > PhusionPassenger::SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION
 			raise UnsupportedGenerationStructureVersionError, "Unsupported generation directory structure version."
 		end
 		
@@ -189,34 +189,30 @@ class ServerInstance
 	# - +RoleDeniedError+: The user that the current process is as is not authorized to utilize the given role.
 	# - +EOFError+: The server unexpectedly closed the connection during authentication.
 	# - +SecurityError+: The server denied our authentication credentials.
-	def connect(role_or_username, password = nil)
-		if role_or_username.is_a?(Symbol)
-			case role_or_username
-			when :passenger_status
-				username = "_passenger-status"
-				begin
-					filename = "#{@generation_path}/passenger-status-password.txt"
-					password = File.open(filename, "rb") do |f|
-						f.read
-					end
-				rescue Errno::EACCES
-					raise RoleDeniedError
-				end
-			else
-				raise ArgumentError, "Unsupported role #{role_or_username}"
-			end
+	def connect(options)
+		if options[:role]
+			username, password, default_socket_name = infer_connection_info_from_role(options[:role])
+			socket_name = options[:socket_name] || default_socket_name
 		else
-			username = role_or_username
+			username = options[:username]
+			password = options[:password]
+			socket_name = options[:socket_name] || "helper_admin"
+			raise ArgumentError, "Either the :role or :username must be set" if !username
+			raise ArgumentError, ":password must be set" if !password
 		end
 		
-		@client = MessageClient.new(username, password, "unix:#{@generation_path}/socket")
-		begin
-			yield self
-		ensure
-			@client.close
+		client = MessageClient.new(username, password, "unix:#{@generation_path}/#{socket_name}")
+		if block_given?
+			begin
+				yield client
+			ensure
+				client.close
+			end
+		else
+			return client
 		end
 	end
-	
+
 	def web_server_description
 		return File.read("#{@generation_path}/web_server.txt")
 	end
@@ -232,8 +228,8 @@ class ServerInstance
 		return config_files
 	end
 	
-	def helper_server_pid
-		return File.read("#{@generation_path}/helper_server.pid").strip.to_i
+	def helper_agent_pid
+		return File.read("#{@generation_path}/helper_agent.pid").strip.to_i
 	end
 	
 	def analytics_log_dir
@@ -242,51 +238,40 @@ class ServerInstance
 		return nil
 	end
 	
-	def status
-		return @client.status
-	end
-	
-	def backtraces
-		return @client.backtraces
-	end
-	
-	def xml
-		return @client.xml
-	end
-	
-	def stats
-		doc = REXML::Document.new(xml)
+	def stats(client)
+		doc = REXML::Document.new(client.pool_xml)
 		stats = Stats.new
 		stats.max = doc.elements["info/max"].text.to_i
-		stats.count = doc.elements["info/count"].text.to_i
-		stats.active = doc.elements["info/active"].text.to_i
-		stats.global_queue_size = doc.elements["info/global_queue_size"].text.to_i
+		stats.usage = doc.elements["info/usage"].text.to_i
+		stats.get_wait_list_size = doc.elements["info/get_wait_list_size"].text.to_i
 		return stats
 	end
 	
-	def global_queue_size
-		return stats.global_queue_size
+	def get_wait_list_size(client)
+		return stats(client).get_wait_list_size
 	end
 	
-	def groups
-		doc = REXML::Document.new(xml)
+	def groups(client)
+		doc = REXML::Document.new(client.pool_xml)
 		
 		groups = []
-		doc.elements.each("info/groups/group") do |group_xml|
+		doc.elements.each("info/supergroups/supergroup/group") do |group_xml|
 			group = Group.new(group_xml.elements["app_root"].text,
 				group_xml.elements["name"].text,
-				group_xml.elements["environment"].text)
+				group_xml.elements["environment"].text,
+				!!group_xml.elements["spawning"])
 			group_xml.elements.each("processes/process") do |process_xml|
 				process = Process.new(group)
 				process_xml.elements.each do |element|
-					if element.name == "server_sockets"
-						element.elements.each("server_socket") do |server_socket|
+					if element.name == "sockets"
+						element.elements.each("socket") do |server_socket|
 							name = server_socket.elements["name"].text.to_sym
 							address = server_socket.elements["address"].text
-							address_type = server_socket.elements["type"].text
+							protocol = server_socket.elements["protocol"].text
 							process.server_sockets[name] = OpenStruct.new(
-								:address => address,
-								:address_type => address_type
+								:name     => name,
+								:address  => address,
+								:protocol => protocol
 							)
 						end
 					else
@@ -309,8 +294,8 @@ class ServerInstance
 		return groups
 	end
 	
-	def processes
-		return groups.map do |group|
+	def processes(client)
+		return groups(client).map do |group|
 			group.processes
 		end.flatten
 	end
@@ -323,6 +308,26 @@ private
 	def self.current_time
 		Time.now
 	end
+
+	def infer_connection_info_from_role(role)
+		case role
+		when :passenger_status
+			username = "_passenger-status"
+			begin
+				filename = "#{@generation_path}/passenger-status-password.txt"
+				password = File.open(filename, "rb") do |f|
+					f.read
+				end
+			rescue Errno::EACCES
+				raise RoleDeniedError
+			rescue Errno::ENOENT
+				raise CorruptedDirectoryError
+			end
+			return [username, password, "helper_admin"]
+		else
+			raise ArgumentError, "Unsupported role #{role}"
+		end
+	end
 	
 	class << self;
 		private :log_cleaning_action
diff --git a/lib/phusion_passenger/analytics_logger.rb b/lib/phusion_passenger/analytics_logger.rb
index 3d4183a..90f2ed3 100644
--- a/lib/phusion_passenger/analytics_logger.rb
+++ b/lib/phusion_passenger/analytics_logger.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -47,15 +47,21 @@ class AnalyticsLogger
 		end
 		
 		def null?
-			return !@connection
+			return !@connection || !@connection.connected?
 		end
 		
 		def message(text)
+			if !@connection
+				timestamp_string = AnalyticsLogger.timestamp_string
+				DebugLogging.trace(3, "[Union Station log to null] #{@txn_id} #{timestamp_string} #{text}")
+				return
+			end
 			@connection.synchronize do
 				return if !@connection.connected?
 				begin
-					@connection.channel.write("log", @txn_id,
-						AnalyticsLogger.timestamp_string)
+					timestamp_string = AnalyticsLogger.timestamp_string
+					DebugLogging.trace(3, "[Union Station log] #{@txn_id} #{timestamp_string} #{text}")
+					@connection.channel.write("log", @txn_id, timestamp_string)
 					@connection.channel.write_scalar(text)
 				rescue SystemCallError, IOError => e
 					@connection.disconnect
@@ -64,7 +70,7 @@ class AnalyticsLogger
 					@connection.disconnect
 					raise e
 				end
-			end if @connection
+			end
 		end
 		
 		def begin_measure(name, extra_info = nil)
@@ -117,6 +123,7 @@ class AnalyticsLogger
 		
 		def close(flush_to_disk = false)
 			@connection.synchronize do
+				return if !@connection.connected?
 				begin
 					# We need an ACK here. See abstract_request_handler.rb finalize_request.
 					@connection.channel.write("closeTransaction", @txn_id,
@@ -166,7 +173,7 @@ class AnalyticsLogger
 		if options["analytics"] && options["logging_agent_address"]
 			return new(options["logging_agent_address"],
 				options["logging_agent_username"],
-				options["logging_agent_password_base64"].unpack('m').first,
+				options["logging_agent_password"],
 				options["node_name"])
 		else
 			return nil
@@ -473,4 +480,4 @@ private
 	end
 end
 
-end # module PhusionPassenger
\ No newline at end of file
+end # module PhusionPassenger
diff --git a/lib/phusion_passenger/app_process.rb b/lib/phusion_passenger/app_process.rb
deleted file mode 100644
index 66ad504..0000000
--- a/lib/phusion_passenger/app_process.rb
+++ /dev/null
@@ -1,174 +0,0 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'rubygems'
-require 'phusion_passenger/exceptions'
-module PhusionPassenger
-
-# Contains various information about an application process.
-class AppProcess
-	# The root directory of this application process.
-	attr_reader :app_root
-	
-	# This process's PID.
-	attr_reader :pid
-	
-	# A hash containing all server sockets that this application process listens on.
-	# The hash is in the form of:
-	#
-	#   {
-	#      name1 => [socket_address1, socket_type1],
-	#      name2 => [socket_address2, socket_type2],
-	#      ...
-	#   }
-	#
-	# +name+ is a Symbol. +socket_addressx+ is the address of the socket
-	# and +socket_type1+ is the socket's type (either 'unix' or 'tcp').
-	# There's guaranteed to be at least one server socket, namely one with the
-	# name +:main+.
-	attr_reader :server_sockets
-	
-	# The owner pipe of the application instance (an IO object). Please see
-	# RequestHandler for a description of the owner pipe.
-	attr_reader :owner_pipe
-
-	# - Returns the Ruby on Rails version that the application requires.
-	# - Returns <tt>:vendor</tt> if the application has a vendored Rails.
-	# - Returns nil if the application doesn't specify a particular version.
-	# Raises VersionNotFound if the required Rails version is not installed.
-	def self.detect_framework_version(app_root)
-		if File.directory?("#{app_root}/vendor/rails/railties")
-			# NOTE: We must check for 'rails/railties' and not just 'rails'.
-			# Typo's vendor directory contains an empty 'rails' directory.
-			return :vendor
-		end
-		
-		environment_rb = File.read("#{app_root}/config/environment.rb")
-		environment_rb =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
-		gem_version_spec = $1
-		if gem_version_spec.nil?
-			return nil
-		end
-		
-		search_results = search_gem('rails', gem_version_spec)
-		found_version = search_results.map do |x|
-			x.version.version
-		end.sort.last
-		if found_version.nil?
-			# If this error was reported before, then the cache might be out of
-			# date because the Rails version may have been installed now.
-			# So we reload the RubyGems cache and try again.
-			Gem.clear_paths
-			search_results = search_gem('rails', gem_version_spec)
-			found_version = search_results.map do |x|
-				x.version.version
-			end.sort.last
-		end
-		
-		if found_version.nil?
-			raise VersionNotFound.new("There is no Ruby on Rails version " <<
-				"installed that matches version \"#{gem_version_spec}\"",
-				gem_version_spec)
-		else
-			return found_version
-		end
-	end
-	
-	def self.search_gem(gem_name, gem_version_spec)
-		if defined?(Gem::Specification) && Gem::Specification.respond_to?(:find_all_by_name)
-			return Gem::Specification.find_all_by_name(gem_name, gem_version_spec)
-		elsif Gem.respond_to?(:source_index)
-			dep = Gem::Dependency.new(gem_name, gem_version_spec)
-			return Gem.source_index.search(dep, true)
-		else
-			dep = Gem::Dependency.new(gem_name, gem_version_spec)
-			return Gem.cache.search(dep, true)
-		end
-	end
-	
-	# Construct an AppProcess by reading information from the given MessageChannel.
-	# The other side of the channel must be writing AppProcess information using
-	# AppProcess#write_to_channel.
-	#
-	# Might raise SystemCallError, IOError or SocketError.
-	def self.read_from_channel(channel)
-		app_root, pid, n_server_sockets = channel.read
-		if app_root.nil?
-			raise IOError, "Connection closed"
-		end
-		
-		server_sockets = {}
-		n_server_sockets.to_i.times do
-			message = channel.read
-			if message.nil?
-				raise IOError, "Connection closed"
-			end
-			name = message.shift
-			server_sockets[name.to_sym] = message
-		end
-		
-		owner_pipe = channel.recv_io
-		
-		return new(app_root, pid.to_i, owner_pipe, server_sockets)
-	end
-	
-	# Write this AppProcess's information over the given MessageChannel.
-	# The other side must read the information using AppProces.read_from_channel.
-	#
-	# Might raise SystemCallError, IOError or SocketError.
-	def write_to_channel(channel)
-		channel.write(@app_root, @pid, @server_sockets.size)
-		@server_sockets.each_pair do |name, value|
-			channel.write(name.to_s, *value)
-		end
-		channel.send_io(@owner_pipe)
-	end
-	
-	# Creates a new AppProcess instance. The parameters correspond with the attributes
-	# of the same names. No exceptions will be thrown.
-	def initialize(app_root, pid, owner_pipe, server_sockets)
-		@app_root   = app_root
-		@pid        = pid
-		@owner_pipe = owner_pipe
-		
-		# We copy the values like this so one can directly pass
-		# AbstractRequestHandler#server_sockets as arguments
-		# without having AppProcess store references to the socket
-		# IO objects.
-		@server_sockets = {}
-		server_sockets.each_pair do |name, value|
-			@server_sockets[name] = [value[0], value[1]]
-		end
-	end
-	
-	# Close the connection with the application process. If there are no other
-	# processes that have connections to this application process, then it will
-	# shutdown as soon as possible.
-	#
-	# See also AbstractRequestHandler#owner_pipe.
-	def close
-		@owner_pipe.close rescue nil
-	end
-end
-
-end # module PhusionPassenger
diff --git a/lib/phusion_passenger/classic_rails/application_spawner.rb b/lib/phusion_passenger/classic_rails/application_spawner.rb
deleted file mode 100644
index c5d8db1..0000000
--- a/lib/phusion_passenger/classic_rails/application_spawner.rb
+++ /dev/null
@@ -1,344 +0,0 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'rubygems'
-require 'socket'
-require 'etc'
-require 'fcntl'
-require 'phusion_passenger/abstract_server'
-require 'phusion_passenger/app_process'
-require 'phusion_passenger/constants'
-require 'phusion_passenger/debug_logging'
-require 'phusion_passenger/classic_rails/request_handler'
-require 'phusion_passenger/rack/request_handler'
-require 'phusion_passenger/public_api'
-require 'phusion_passenger/exceptions'
-require 'phusion_passenger/utils'
-
-module PhusionPassenger
-module ClassicRails
-
-# Spawning of Rails 1 and Rails 2 applications.
-#
-# ClassicRails::ApplicationSpawner can operate in two modes:
-# - Smart mode. In this mode, the Rails application's code is first preloaded into
-#   a temporary process, which can then further fork off application processes.
-#   Once the code has been preloaded, forking off application processes is very fast,
-#   and all the forked off application processes can share code memory with each other.
-#   To use this mode, create an ApplicationSpawner object, start it, and call
-#   #spawn_application on it.
-#   A single ApplicationSpawner object can only handle a single Rails application.
-# - Conservative mode. In this mode, a Rails app process is directly spawned
-#   without any preloading. This increases compatibility with applications. To use this
-#   mode, call ApplicationSpawner.spawn_application.
-class ApplicationSpawner < AbstractServer
-	include Utils
-	extend Utils
-	include DebugLogging
-	
-	# This exception means that the ApplicationSpawner server process exited unexpectedly.
-	class Error < AbstractServer::ServerError
-	end
-	
-	# The application root of this spawner.
-	attr_reader :app_root
-	
-	# Spawns an instance of a Rails application. When successful, an AppProcess object
-	# will be returned, which represents the spawned Rails application.
-	#
-	# This method spawns the application directly, without preloading its code.
-	# This method may only be called if no Rails framework has been loaded in the current
-	# Ruby VM.
-	#
-	# The "app_root" option must be given. All other options are passed to the request
-	# handler's constructor.
-	#
-	# Raises:
-	# - AppInitError: The Ruby on Rails application raised an exception
-	#   or called exit() during startup.
-	# - SystemCallError, IOError, SocketError: Something went wrong.
-	def self.spawn_application(options)
-		options = sanitize_spawn_options(options)
-		
-		a, b = UNIXSocket.pair
-		pid = safe_fork('application', true) do
-			a.close
-			
-			file_descriptors_to_leave_open = [0, 1, 2, b.fileno]
-			NativeSupport.close_all_file_descriptors(file_descriptors_to_leave_open)
-			close_all_io_objects_for_fds(file_descriptors_to_leave_open)
-			
-			channel = MessageChannel.new(b)
-			success = report_app_init_status(channel) do
-				prepare_app_process('config/environment.rb', options)
-				require File.expand_path('config/environment')
-				require 'dispatcher'
-				after_loading_app_code(options)
-			end
-			if success
-				start_request_handler(channel, false, options)
-			end
-		end
-		b.close
-		Process.waitpid(pid) rescue nil
-		
-		channel = MessageChannel.new(a)
-		unmarshal_and_raise_errors(channel, options["print_exceptions"])
-		
-		# No exception was raised, so spawning succeeded.
-		return AppProcess.read_from_channel(channel)
-	end
-	
-	# The following options are accepted:
-	# - 'app_root'
-	#
-	# See SpawnManager#spawn_application for information about the options.
-	def initialize(options)
-		super()
-		@options          = sanitize_spawn_options(options)
-		@app_root         = @options["app_root"]
-		@canonicalized_app_root = canonicalize_path(@app_root)
-		self.max_idle_time = DEFAULT_APP_SPAWNER_MAX_IDLE_TIME
-		define_message_handler(:spawn_application, :handle_spawn_application)
-	end
-	
-	# Spawns an instance of the Rails application. When successful, an AppProcess object
-	# will be returned, which represents the spawned Rails application.
-	#
-	# +options+ will be passed to the request handler's constructor.
-	#
-	# Raises:
-	# - AbstractServer::ServerNotStarted: The ApplicationSpawner server hasn't already been started.
-	# - ApplicationSpawner::Error: The ApplicationSpawner server exited unexpectedly.
-	def spawn_application(options = {})
-		connect do |channel|
-			channel.write("spawn_application", *options.to_a.flatten)
-			return AppProcess.read_from_channel(channel)
-		end
-	rescue SystemCallError, IOError, SocketError => e
-		raise Error, "The application spawner server exited unexpectedly: #{e}"
-	end
-	
-	# Overrided from AbstractServer#start.
-	#
-	# May raise these additional exceptions:
-	# - AppInitError: The Ruby on Rails application raised an exception
-	#   or called exit() during startup.
-	# - ApplicationSpawner::Error: The ApplicationSpawner server exited unexpectedly.
-	def start
-		super
-		begin
-			channel = MessageChannel.new(@owner_socket)
-			unmarshal_and_raise_errors(channel, @options["print_exceptions"])
-		rescue IOError, SystemCallError, SocketError => e
-			stop if started?
-			raise Error, "The application spawner server exited unexpectedly: #{e}"
-		rescue
-			stop if started?
-			raise
-		end
-	end
-
-protected
-	# Overrided method.
-	def before_fork # :nodoc:
-		if GC.copy_on_write_friendly?
-			# Garbage collect now so that the child process doesn't have to
-			# do that (to prevent making pages dirty).
-			GC.start
-		end
-	end
-	
-	# Overrided method.
-	def initialize_server # :nodoc:
-		report_app_init_status(MessageChannel.new(@owner_socket)) do
-			$0 = "Passenger ApplicationSpawner: #{@options['app_group_name']}"
-			prepare_app_process('config/environment.rb', @options)
-			if defined?(RAILS_ENV)
-				Object.send(:remove_const, :RAILS_ENV)
-				Object.const_set(:RAILS_ENV, ENV['RAILS_ENV'])
-			end
-			preload_application
-			after_loading_app_code(@options)
-		end
-	end
-	
-private
-	def preload_application
-		Object.const_set(:RAILS_ROOT, @canonicalized_app_root)
-		if defined?(::Rails::Initializer)
-			::Rails::Initializer.run(:set_load_path)
-			
-			# The Rails framework is loaded at the moment.
-			# environment.rb may set ENV['RAILS_ENV']. So we re-initialize
-			# RAILS_ENV in Rails::Initializer.load_environment.
-			::Rails::Initializer.class_eval do
-				def load_environment_with_passenger
-					using_default_log_path =
-						configuration.log_path ==
-						configuration.send(:default_log_path)
-					
-					if defined?(::RAILS_ENV)
-						Object.send(:remove_const, :RAILS_ENV)
-					end
-					Object.const_set(:RAILS_ENV, (ENV['RAILS_ENV'] || 'development').dup)
-					
-					if using_default_log_path
-						# We've changed the environment, so open the
-						# correct log file.
-						configuration.log_path = configuration.send(:default_log_path)
-					end
-					
-					load_environment_without_passenger
-				end
-				
-				alias_method :load_environment_without_passenger, :load_environment
-				alias_method :load_environment, :load_environment_with_passenger
-			end
-		end
-		if File.exist?('config/preinitializer.rb')
-			require File.expand_path('config/preinitializer')
-		end
-		require File.expand_path('config/environment')
-		if ActionController::Base.page_cache_directory.blank?
-			ActionController::Base.page_cache_directory = "#{RAILS_ROOT}/public"
-		end
-		if defined?(ActionController::Dispatcher) \
-		   && ActionController::Dispatcher.respond_to?(:error_file_path)
-			ActionController::Dispatcher.error_file_path = "#{RAILS_ROOT}/public"
-		end
-		
-		require 'rails/version' if !defined?(::Rails::VERSION)
-		if !defined?(Dispatcher)
-			begin
-				require 'dispatcher'
-			rescue LoadError
-				# Early versions of Rails 3 still had the dispatcher, but
-				# later versions disposed of it, in which case we'll need
-				# to use the application object.
-				raise if Rails::VERSION::MAJOR < 3
-			end
-		end
-		
-		# - No point in preloading the application sources if the garbage collector
-		#   isn't copy-on-write friendly.
-		# - Rails >= 2.2 already preloads application sources by default, so no need
-		#   to do that again.
-		if GC.copy_on_write_friendly? && !rails_will_preload_app_code?
-			# Rails 2.2+ uses application_controller.rb while olde
-			# versions use application.rb.
-			require_dependency 'application'
-			['models','controllers','helpers'].each do |section|
-				Dir.glob("app/#{section}}/*.rb").each do |file|
-					require_dependency canonicalize_path(file)
-				end
-			end
-		end
-	end
-	
-	def rails_will_preload_app_code?
-		if defined?(Rails::Initializer)
-			return ::Rails::Initializer.method_defined?(:load_application_classes)
-		else
-			return Rails::VERSION::MAJOR >= 3
-		end
-	end
-
-	def handle_spawn_application(client, *options)
-		options = sanitize_spawn_options(Hash[*options])
-		a, b = UNIXSocket.pair
-		safe_fork('application', true) do
-			begin
-				a.close
-				client.close
-				options = @options.merge(options)
-				self.class.send(:start_request_handler, MessageChannel.new(b),
-					true, options)
-			rescue SignalException => e
-				if e.message != AbstractRequestHandler::HARD_TERMINATION_SIGNAL &&
-				   e.message != AbstractRequestHandler::SOFT_TERMINATION_SIGNAL
-					raise
-				end
-			end
-		end
-		
-		b.close
-		worker_channel = MessageChannel.new(a)
-		app_process = AppProcess.read_from_channel(worker_channel)
-		app_process.write_to_channel(client)
-	ensure
-		a.close if a
-		b.close if b && !b.closed?
-		app_process.close if app_process
-	end
-	
-	# Initialize the request handler and enter its main loop.
-	# Spawn information will be sent back via +channel+.
-	# The +forked+ argument indicates whether a new process was forked off
-	# after loading environment.rb (i.e. whether smart spawning is being
-	# used).
-	def self.start_request_handler(channel, forked, options)
-		app_root = options["app_root"]
-		$0 = "Rails: #{options['app_group_name']}"
-		reader, writer = IO.pipe
-		begin
-			reader.close_on_exec!
-			
-			if Rails::VERSION::STRING >= '2.3.0'
-				rack_app = find_rack_app
-				handler = Rack::RequestHandler.new(reader, rack_app, options)
-			else
-				handler = RequestHandler.new(reader, options)
-			end
-			
-			app_process = AppProcess.new(app_root, Process.pid, writer,
-				handler.server_sockets)
-			app_process.write_to_channel(channel)
-			writer.close
-			channel.close
-			
-			before_handling_requests(forked, options)
-			handler.main_loop
-		ensure
-			channel.close rescue nil
-			writer.close rescue nil
-			handler.cleanup rescue nil
-			after_handling_requests
-		end
-	end
-	private_class_method :start_request_handler
-	
-	def self.find_rack_app
-		if Rails::VERSION::MAJOR >= 3
-			File.read("config/application.rb") =~ /^module (.+)$/
-			app_module = Object.const_get($1)
-			return app_module::Application
-		else
-			return ActionController::Dispatcher.new
-		end
-	end
-	private_class_method :find_rack_app
-end
-
-end # module ClassicRails
-end # module PhusionPassenger
diff --git a/lib/phusion_passenger/classic_rails/framework_spawner.rb b/lib/phusion_passenger/classic_rails/framework_spawner.rb
deleted file mode 100644
index b4e447b..0000000
--- a/lib/phusion_passenger/classic_rails/framework_spawner.rb
+++ /dev/null
@@ -1,311 +0,0 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'rubygems'
-require 'phusion_passenger/abstract_server'
-require 'phusion_passenger/abstract_server_collection'
-require 'phusion_passenger/app_process'
-require 'phusion_passenger/classic_rails/application_spawner'
-require 'phusion_passenger/exceptions'
-require 'phusion_passenger/constants'
-require 'phusion_passenger/utils'
-module PhusionPassenger
-module ClassicRails
-
-# This class is capable of spawning Ruby on Rails application instances
-# quickly. This is done by preloading the Ruby on Rails framework into memory,
-# before spawning the application instances.
-#
-# A single FrameworkSpawner instance can only hold a single Ruby on Rails
-# framework version. So be careful when using FrameworkSpawner: the applications
-# that you spawn through it must require the same RoR version. To handle multiple
-# RoR versions, use multiple FrameworkSpawner instances.
-#
-# FrameworkSpawner uses ApplicationSpawner internally.
-#
-# *Note*: FrameworkSpawner may only be started asynchronously with AbstractServer#start.
-# Starting it synchronously with AbstractServer#start_synchronously has not been tested.
-class FrameworkSpawner < AbstractServer
-	include Utils
-	
-	# This exception means that the FrameworkSpawner server process exited unexpectedly.
-	class Error < AbstractServer::ServerError
-	end
-	
-	# Creates a new instance of FrameworkSpawner.
-	#
-	# Extra supported options:
-	# - <tt>framework_version</tt>: The Ruby on Rails version to use. It is not checked whether
-	#   this version is actually installed.
-	#
-	# All other options will be passed on to ApplicationSpawner and RequestHandler.
-	#
-	# Note that the specified Rails framework will be loaded during the entire life time
-	# of the FrameworkSpawner server. If you wish to reload the Rails framework's code,
-	# then restart the server by calling AbstractServer#stop and AbstractServer#start.
-	def initialize(options = {})
-		if !options.respond_to?(:'[]')
-			raise ArgumentError, "The 'options' argument does not seem to be an options hash"
-		end
-		@framework_version = options["framework_version"]
-		if options.has_key?("print_framework_loading_exceptions")
-			@print_framework_loading_exceptions = options["print_framework_loading_exceptions"]
-		else
-			@print_framework_loading_exceptions = true
-		end
-		if !@framework_version
-			raise ArgumentError, "The 'framework_version' option must specified"
-		end
-		
-		super()
-		@options = options
-		self.max_idle_time = DEFAULT_FRAMEWORK_SPAWNER_MAX_IDLE_TIME
-		define_message_handler(:spawn_application, :handle_spawn_application)
-		define_message_handler(:reload, :handle_reload)
-	end
-	
-	# Overrided from AbstractServer#start.
-	#
-	# May raise these additional exceptions:
-	# - FrameworkInitError: An error occurred while loading the specified Ruby on Rails framework.
-	# - FrameworkSpawner::Error: The FrameworkSpawner server exited unexpectedly.
-	def start
-		super
-		begin
-			channel = MessageChannel.new(@owner_socket)
-			result = channel.read
-			if result.nil?
-				raise Error, "The framework spawner server exited unexpectedly."
-			else
-				status = result[0]
-			end
-			if status == 'exception'
-				child_exception = unmarshal_exception(channel.read_scalar)
-				stop
-				message = "Could not load Ruby on Rails framework version #{@framework_version}: " <<
-					"#{child_exception.class} (#{child_exception.message})"
-				options = { :version => @framework_version }
-				if @print_framework_loading_exceptions
-					print_exception(self.class.to_s, child_exception)
-				end
-				raise FrameworkInitError.new(message, child_exception, options)
-			end
-		rescue IOError, SystemCallError, SocketError => e
-			stop if started?
-			raise Error, "The framework spawner server exited unexpectedly: #{e}"
-		rescue
-			stop if started?
-			raise
-		end
-	end
-	
-	# Spawn a RoR application using the Ruby on Rails framework
-	# version associated with this FrameworkSpawner.
-	# When successful, an Application object will be returned, which represents
-	# the spawned RoR application.
-	#
-	# All options accepted by ApplicationSpawner.new and RequestHandler.new are accepted.
-	#
-	# FrameworkSpawner will internally cache the code of applications, in order to
-	# speed up future spawning attempts. This implies that, if you've changed
-	# the application's code, you must do one of these things:
-	# - Restart this FrameworkSpawner by calling AbstractServer#stop, then AbstractServer#start.
-	# - Reload the application by calling reload with the correct app_root argument.
-	#
-	# Raises:
-	# - AbstractServer::ServerNotStarted: The FrameworkSpawner server hasn't already been started.
-	# - AppInitError: The application raised an exception or called exit() during startup.
-	# - ApplicationSpawner::Error: The ApplicationSpawner server exited unexpectedly.
-	# - FrameworkSpawner::Error: The FrameworkSpawner server exited unexpectedly.
-	def spawn_application(options = {})
-		app_root = options["app_root"]
-		options = sanitize_spawn_options(options)
-		options["app_root"] = app_root
-		# No need for the ApplicationSpawner to print exceptions. All
-		# exceptions raised by the ApplicationSpawner are sent back here,
-		# so we just need to decide here whether we want to print it.
-		print_exceptions = options["print_exceptions"]
-		options["print_exceptions"] = false
-		
-		begin
-			connect do |channel|
-				channel.write("spawn_application", *options.to_a.flatten)
-				result = channel.read
-				if result.nil?
-					raise IOError, "Connection closed"
-				end
-				if result[0] == 'exception'
-					e = unmarshal_exception(channel.read_scalar)
-					if print_exceptions && e.respond_to?(:child_exception) && e.child_exception
-						print_exception(self.class.to_s, e.child_exception)
-					elsif print_exceptions
-						print_exception(self.class.to_s, e)
-					end
-					raise e
-				else
-					return AppProcess.read_from_channel(channel)
-				end
-			end
-		rescue SystemCallError, IOError, SocketError => e
-			raise Error, "The framework spawner server exited unexpectedly: #{e}"
-		end
-	end
-	
-	# Remove the cached application instances at the given group name.
-	# If nil is specified as group name, then all cached application
-	# instances will be removed, no matter the group name.
-	#
-	# <b>Long description:</b>
-	# Application code might be cached in memory by a FrameworkSpawner. But
-	# once it a while, it will be necessary to reload the code for an
-	# application, such as after deploying a new version of the application.
-	# This method makes sure that any cached application code is removed, so
-	# that the next time an application instance is spawned, the application
-	# code will be freshly loaded into memory.
-	#
-	# Raises:
-	# - FrameworkSpawner::Error: The FrameworkSpawner server exited unexpectedly.
-	def reload(app_group_name = nil)
-		connect do |channel|
-			if app_group_name.nil?
-				channel.write("reload")
-			else
-				channel.write("reload", app_group_name)
-			end
-		end
-	rescue SystemCallError, IOError, SocketError
-		raise Error, "The framework spawner server exited unexpectedly: #{e}"
-	end
-
-protected
-	# Overrided method.
-	def before_fork # :nodoc:
-		if GC.copy_on_write_friendly?
-			# Garbage collect now so that the child process doesn't have to
-			# do that (to prevent making pages dirty).
-			GC.start
-		end
-	end
-
-	# Overrided method.
-	def initialize_server # :nodoc:
-		$0 = "Passenger FrameworkSpawner: #{@framework_version}"
-		@spawners = AbstractServerCollection.new
-		channel = MessageChannel.new(@owner_socket)
-		begin
-			preload_rails
-		rescue StandardError, ScriptError, NoMemoryError => e
-			channel.write('exception')
-			channel.write_scalar(marshal_exception(e))
-			return
-		end
-		channel.write('success')
-	end
-	
-	# Overrided method.
-	def finalize_server # :nodoc:
-		@spawners.cleanup
-	end
-
-private
-	def preload_rails
-		Object.const_set(:RAILS_ROOT, ".")
-		gem 'rails', "=#{@framework_version}"
-		require 'initializer'
-		require 'active_support'
-		require 'active_record'
-		require 'action_controller'
-		require 'action_view'
-		require 'action_pack'
-		require 'action_mailer'
-		require 'dispatcher'
-		begin
-			if ::Rails::VERSION::MAJOR >= 2
-				require 'active_resource'
-			else
-				require 'action_web_service'
-			end
-			require 'ruby_version_check'
-			require 'active_support/whiny_nil'
-		rescue NameError
-			# Rails < 1.1
-			require 'action_web_service'
-		end
-		Object.send(:remove_const, :RAILS_ROOT)
-	end
-
-	def handle_spawn_application(client, *options)
-		app_process = nil
-		options = sanitize_spawn_options(Hash[*options])
-		app_group_name = options["app_group_name"]
-		@spawners.synchronize do
-			begin
-				spawner = @spawners.lookup_or_add(app_group_name) do
-					spawner = ApplicationSpawner.new(@options.merge(options))
-					if options["app_spawner_timeout"] && options["app_spawner_timeout"] != -1
-						spawner.max_idle_time = options["app_spawner_timeout"]
-					end
-					spawner.start
-					spawner
-				end
-			rescue InvalidPath, AppInitError, ApplicationSpawner::Error => e
-				client.write('exception')
-				client.write_scalar(marshal_exception(e))
-				if e.respond_to?(:child_exception) && e.child_exception.is_a?(LoadError)
-					# A source file failed to load, maybe because of a
-					# missing gem. If that's the case then the sysadmin
-					# will install probably the gem. So we clear RubyGems's
-					# cache so that it can detect new gems.
-					Gem.clear_paths
-				end
-				return
-			end
-			begin
-				app_process = spawner.spawn_application(options)
-			rescue ApplicationSpawner::Error => e
-				spawner.stop
-				@spawners.delete(app_group_name)
-				client.write('exception')
-				client.write_scalar(marshal_exception(e))
-				return
-			end
-		end
-		client.write('success')
-		app_process.write_to_channel(client)
-	ensure
-		app_process.close if app_process
-	end
-	
-	def handle_reload(client, app_group_name = nil)
-		@spawners.synchronize do
-			if app_group_name
-				@spawners.delete(app_group_name)
-			else
-				@spawners.clear
-			end
-		end
-	end
-end
-
-end # module ClassicRails
-end # module PhusionPassenger
diff --git a/lib/phusion_passenger/classic_rails/request_handler.rb b/lib/phusion_passenger/classic_rails/request_handler.rb
deleted file mode 100644
index e925f75..0000000
--- a/lib/phusion_passenger/classic_rails/request_handler.rb
+++ /dev/null
@@ -1,75 +0,0 @@
-# encoding: binary
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'phusion_passenger/abstract_request_handler'
-require 'phusion_passenger/classic_rails/cgi_fixed'
-module PhusionPassenger
-module ClassicRails
-
-# A request handler for Ruby on Rails applications.
-class RequestHandler < AbstractRequestHandler
-	CONTENT_LENGTH      = 'CONTENT_LENGTH'      # :nodoc:
-	HTTP_CONTENT_LENGTH = 'HTTP_CONTENT_LENGTH' # :nodoc:
-	
-	NINJA_PATCHING_LOCK = Mutex.new             # :nodoc:
-	@@ninja_patched_action_controller = false
-	
-	def initialize(owner_pipe, options = {})
-		super(owner_pipe, options)
-		NINJA_PATCHING_LOCK.synchronize do
-			ninja_patch_action_controller
-		end
-	end
-
-protected
-	# Overrided method.
-	def process_request(headers, input, output, status_line_desired)
-		# FIXME: how to print status line?
-		headers[CONTENT_LENGTH] = headers[HTTP_CONTENT_LENGTH]
-		cgi = CGIFixed.new(headers, input, output)
-		::Dispatcher.dispatch(cgi,
-			::ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS,
-			cgi.stdoutput)
-	end
-	
-private
-	def ninja_patch_action_controller
-		if !@@ninja_patched_action_controller && defined?(::ActionController::Base) \
-		&& ::ActionController::Base.private_method_defined?(:perform_action)
-			@@ninja_patched_action_controller = true
-			::ActionController::Base.class_eval do
-				alias passenger_orig_perform_action perform_action
-				
-				def perform_action(*whatever)
-					headers[X_POWERED_BY] = @passenger_header
-					passenger_orig_perform_action(*whatever)
-				end
-				private :perform_action
-			end
-		end
-	end
-end
-
-end # module ClassicRails
-end # module PhusionPassenger
diff --git a/lib/phusion_passenger/classic_rails/thread_handler_extension.rb b/lib/phusion_passenger/classic_rails/thread_handler_extension.rb
new file mode 100644
index 0000000..0e6c28d
--- /dev/null
+++ b/lib/phusion_passenger/classic_rails/thread_handler_extension.rb
@@ -0,0 +1,40 @@
+# encoding: binary
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
+#
+#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+#
+#  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
+#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#  THE SOFTWARE.
+
+require 'phusion_passenger/classic_rails/cgi_fixed'
+module PhusionPassenger
+module ClassicRails
+
+module ThreadHandlerExtension
+	def process_request(env, connection, socket_wrapper, full_http_response)
+		cgi = CGIFixed.new(env, connection, connection)
+		::Dispatcher.dispatch(cgi,
+			::ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS,
+			cgi.stdoutput)
+		return false # Socket hijacking not supported.
+	end
+end
+
+end # module ClassicRails
+end # module PhusionPassenger
diff --git a/lib/phusion_passenger/classic_rails_extensions/analytics_logging/ac_base_extension.rb b/lib/phusion_passenger/classic_rails_extensions/analytics_logging/ac_base_extension.rb
deleted file mode 100644
index 4eafaae..0000000
--- a/lib/phusion_passenger/classic_rails_extensions/analytics_logging/ac_base_extension.rb
+++ /dev/null
@@ -1,67 +0,0 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-module PhusionPassenger
-module ClassicRailsExtensions
-module AnalyticsLogging
-
-module ACBaseExtension
-private
-	def perform_action_with_passenger(*args)
-		# Log controller and action name.
-		log = request.env[PASSENGER_ANALYTICS_WEB_LOG]
-		if log
-			log.begin_measure("framework request processing")
-			begin
-				log.message("Controller action: #{controller_class_name}##{action_name}")
-				perform_action_without_passenger(*args)
-			ensure
-				log.end_measure("framework request processing",
-					request.env["PASSENGER_ACTION_FAILED"])
-			end
-		else
-			perform_action_without_passenger(*args)
-		end
-	end
-	
-protected
-	def render_with_passenger(*args, &block)
-		log = request.env[PASSENGER_ANALYTICS_WEB_LOG]
-		if log
-			log.measure("view rendering") do
-				result = render_without_passenger(*args, &block)
-				view_runtime = @view_runtime || @rendering_runtime
-				if view_runtime
-					log.message "View rendering time: #{(view_runtime * 1000).to_i}"
-				end
-				return result
-			end
-		else
-			render_without_passenger(*args, &block)
-		end
-	end
-end
-
-end
-end
-end
\ No newline at end of file
diff --git a/lib/phusion_passenger/classic_rails_extensions/analytics_logging/ac_benchmarking_extension.rb b/lib/phusion_passenger/classic_rails_extensions/analytics_logging/ac_benchmarking_extension.rb
deleted file mode 100644
index b0ac436..0000000
--- a/lib/phusion_passenger/classic_rails_extensions/analytics_logging/ac_benchmarking_extension.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-module PhusionPassenger
-module ClassicRailsExtensions
-module AnalyticsLogging
-
-module ACBenchmarkingExtension
-	def benchmark_with_passenger(title, *args)
-		# Log ActionController benchmarking blocks.
-		log = Thread.current[PASSENGER_ANALYTICS_WEB_LOG]
-		if log
-			log.measure("BENCHMARK: #{title}") do
-				benchmark_without_passenger(title, *args) do
-					yield
-				end
-			end
-		else
-			benchmark_without_passenger(title, *args) do
-				yield
-			end
-		end
-	end
-end
-
-end
-end
-end
\ No newline at end of file
diff --git a/lib/phusion_passenger/classic_rails_extensions/analytics_logging/ac_rescue_extension.rb b/lib/phusion_passenger/classic_rails_extensions/analytics_logging/ac_rescue_extension.rb
deleted file mode 100644
index 5861d16..0000000
--- a/lib/phusion_passenger/classic_rails_extensions/analytics_logging/ac_rescue_extension.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'phusion_passenger/constants'
-
-module PhusionPassenger
-module ClassicRailsExtensions
-module AnalyticsLogging
-
-module ACRescueExtension
-protected
-	def rescue_action_with_passenger(exception)
-		# When a controller action crashes, log the exception.
-		# But ignore routing errors (404s and stuff).
-		request.env["PASSENGER_ACTION_FAILED"] = true
-		if !defined?(ActionController::RoutingError) || !exception.is_a?(ActionController::RoutingError)
-			AnalyticsLogging.new_transaction_log(request.env, :exceptions) do |log|
-				request_txn_id = request.env[PASSENGER_TXN_ID]
-				message = exception.message
-				message = exception.to_s if message.empty?
-				message = [message].pack('m')
-				message.gsub!("\n", "")
-				backtrace_string = [exception.backtrace.join("\n")].pack('m')
-				backtrace_string.gsub!("\n", "")
-				
-				log.message("Request transaction ID: #{request_txn_id}")
-				log.message("Message: #{message}")
-				log.message("Class: #{exception.class.name}")
-				log.message("Backtrace: #{backtrace_string}")
-				log.message("Controller action: #{controller_class_name}##{action_name}")
-			end
-		end
-		rescue_action_without_passenger(exception)
-	end
-end
-
-end
-end
-end
\ No newline at end of file
diff --git a/lib/phusion_passenger/classic_rails_extensions/analytics_logging/ar_abstract_adapter_extension.rb b/lib/phusion_passenger/classic_rails_extensions/analytics_logging/ar_abstract_adapter_extension.rb
deleted file mode 100644
index 1a906fe..0000000
--- a/lib/phusion_passenger/classic_rails_extensions/analytics_logging/ar_abstract_adapter_extension.rb
+++ /dev/null
@@ -1,54 +0,0 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'phusion_passenger/constants'
-require 'digest/md5'
-
-module PhusionPassenger
-module ClassicRailsExtensions
-module AnalyticsLogging
-
-module ARAbstractAdapterExtension
-protected
-	def log_with_passenger(sql, name, &block)
-		# Log SQL queries and durations.
-		log = Thread.current[PASSENGER_ANALYTICS_WEB_LOG]
-		if log
-			if name
-				name = name.strip
-			else
-				name = "SQL"
-			end
-			digest = Digest::MD5.hexdigest("#{name}\0#{sql}\0#{rand}")
-			log.measure("DB BENCHMARK: #{digest}", "#{name}\n#{sql}") do
-				log_without_passenger(sql, name, &block)
-			end
-		else
-			log_without_passenger(sql, name, &block)
-		end
-	end
-end
-
-end
-end
-end
\ No newline at end of file
diff --git a/lib/phusion_passenger/classic_rails_extensions/analytics_logging/as_cache_extension.rb b/lib/phusion_passenger/classic_rails_extensions/analytics_logging/as_cache_extension.rb
deleted file mode 100644
index a9a074b..0000000
--- a/lib/phusion_passenger/classic_rails_extensions/analytics_logging/as_cache_extension.rb
+++ /dev/null
@@ -1,130 +0,0 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-module PhusionPassenger
-module ClassicRailsExtensions
-module AnalyticsLogging
-
-module CacheStoreExtension
-	def fetch_2_1(key, options = {})
-		@logger_off = true
-		if !options[:force] && value = read(key, options)
-			@logger_off = false
-			log("hit", key, options)
-			PhusionPassenger.log_cache_hit(nil, key)
-			value
-		elsif block_given?
-			@logger_off = false
-			log("miss", key, options)
-
-			value = nil
-			seconds = Benchmark.realtime { value = yield }
-
-			@logger_off = true
-			write(key, value, options)
-			@logger_off = false
-
-			log("write (will save #{'%.5f' % seconds})", key, nil)
-			PhusionPassenger.log_cache_miss(nil, key, seconds * 1_000_000)
-
-			value
-		else
-			PhusionPassenger.log_cache_miss(nil, key)
-			value
-		end
-	end
-	
-	def fetch_2_2(key, options = {})
-		@logger_off = true
-		if !options[:force] && value = read(key, options)
-			@logger_off = false
-			log("hit", key, options)
-			PhusionPassenger.log_cache_hit(nil, key)
-			value
-		elsif block_given?
-			@logger_off = false
-			log("miss", key, options)
-
-			value = nil
-			seconds = Benchmark.realtime { value = yield }
-
-			@logger_off = true
-			write(key, value, options)
-			@logger_off = false
-
-			log("write (will save #{'%.2f' % (seconds * 1000)}ms)", key, nil)
-			PhusionPassenger.log_cache_miss(nil, key, seconds * 1_000_000)
-
-			value
-		else
-			PhusionPassenger.log_cache_miss(nil, key)
-			value
-		end
-	end
-	
-	def fetch_2_3(key, options = {})
-		@logger_off = true
-		if !options[:force] && value = read(key, options)
-			@logger_off = false
-			log("hit", key, options)
-			PhusionPassenger.log_cache_hit(nil, key)
-			value
-		elsif block_given?
-			@logger_off = false
-			log("miss", key, options)
-
-			value = nil
-			ms = Benchmark.ms { value = yield }
-
-			@logger_off = true
-			write(key, value, options)
-			@logger_off = false
-
-			log('write (will save %.2fms)' % ms, key, nil)
-			PhusionPassenger.log_cache_miss(nil, key, ms * 1_000)
-
-			value
-		else
-			PhusionPassenger.log_cache_miss(nil, key)
-			value
-		end
-	end
-end
-
-module ConcreteCacheStoreExtension
-	def read(name, *args)
-		result = super
-		if !@logger_off
-			if result.nil?
-				PhusionPassenger.log_cache_miss(nil, name)
-			else
-				PhusionPassenger.log_cache_hit(nil, name)
-			end
-		end
-		result
-	end
-end
-
-end
-end
-end
\ No newline at end of file
diff --git a/lib/phusion_passenger/classic_rails_extensions/analytics_logging/av_benchmark_helper_extension.rb b/lib/phusion_passenger/classic_rails_extensions/analytics_logging/av_benchmark_helper_extension.rb
deleted file mode 100644
index 93ac44d..0000000
--- a/lib/phusion_passenger/classic_rails_extensions/analytics_logging/av_benchmark_helper_extension.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-module PhusionPassenger
-module ClassicRailsExtensions
-module AnalyticsLogging
-
-module AVBenchmarkHelperExtension
-	def benchmark_with_passenger(message = "Benchmarking", *args)
-		log = request.env[PASSENGER_ANALYTICS_WEB_LOG]
-		if log
-			log.measure("BENCHMARK: #{message}") do
-				benchmark_without_passenger(message, *args) do |*args2|
-					yield(*args2)
-				end
-			end
-		else
-			benchmark_without_passenger(message, *args) do |*args2|
-				yield(*args2)
-			end
-		end
-	end
-end
-
-end
-end
-end
\ No newline at end of file
diff --git a/lib/phusion_passenger/classic_rails_extensions/init.rb b/lib/phusion_passenger/classic_rails_extensions/init.rb
deleted file mode 100644
index 25e4751..0000000
--- a/lib/phusion_passenger/classic_rails_extensions/init.rb
+++ /dev/null
@@ -1,123 +0,0 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'phusion_passenger/constants'
-
-module PhusionPassenger
-module ClassicRailsExtensions
-	def self.init!(options)
-		if options["analytics_logger"] && options["analytics"]
-			AnalyticsLogging.install!(options)
-		else
-			# Remove code to save memory.
-			PhusionPassenger.send(:remove_const, :ClassicRailsExtensions)
-		end
-	end
-end
-end
-
-module PhusionPassenger
-module ClassicRailsExtensions
-module AnalyticsLogging
-	# Instantiated from prepare_app_process in utils.rb.
-	@@analytics_logger = nil
-	
-	def self.install!(options)
-		@@analytics_logger = options["analytics_logger"]
-		# If the Ruby interpreter supports GC statistics then turn it on
-		# so that the info can be logged.
-		GC.enable_stats if GC.respond_to?(:enable_stats)
-		
-		if defined?(ActionController)
-			require 'phusion_passenger/classic_rails_extensions/analytics_logging/ac_base_extension'
-			ActionController::Base.class_eval do
-				include ACBaseExtension
-				alias_method_chain :perform_action, :passenger
-				alias_method_chain :render, :passenger
-			end
-			
-			require 'phusion_passenger/classic_rails_extensions/analytics_logging/ac_benchmarking_extension'
-			ActionController::Benchmarking::ClassMethods.class_eval do
-				include ACBenchmarkingExtension
-				alias_method_chain :benchmark, :passenger
-			end
-			
-			require 'phusion_passenger/classic_rails_extensions/analytics_logging/ac_rescue_extension'
-			ActionController::Rescue.class_eval do
-				include ACRescueExtension
-				alias_method_chain :rescue_action, :passenger
-			end
-		end
-		
-		if defined?(ActionView)
-			require 'phusion_passenger/classic_rails_extensions/analytics_logging/av_benchmark_helper_extension'
-			ActionView::Helpers::BenchmarkHelper.class_eval do
-				include AVBenchmarkHelperExtension
-				alias_method_chain :benchmark, :passenger
-			end
-		end
-		
-		if defined?(ActiveRecord)
-			require 'phusion_passenger/classic_rails_extensions/analytics_logging/ar_abstract_adapter_extension'
-			ActiveRecord::ConnectionAdapters::AbstractAdapter.class_eval do
-				include ARAbstractAdapterExtension
-				alias_method_chain :log, :passenger
-			end
-		end
-		
-		if defined?(ActiveSupport::Cache::Store) && Rails.cache
-			require 'phusion_passenger/classic_rails_extensions/analytics_logging/as_cache_extension'
-			ActiveSupport::Cache::Store.class_eval do
-				include CacheStoreExtension
-				case Rails::VERSION::MINOR
-				when 1
-					# Rails 2.1
-					alias_method :fetch, :fetch_2_1
-				when 2
-					# Rails 2.2
-					alias_method :fetch, :fetch_2_2
-				when 3
-					# Rails 2.3
-					alias_method :fetch, :fetch_2_3
-				end
-			end
-			Rails.cache.extend(ConcreteCacheStoreExtension)
-		end
-	end
-	
-	def self.new_transaction_log(env, category = :requests)
-		if env[PASSENGER_TXN_ID]
-			group_name = env[PASSENGER_GROUP_NAME]
-			union_station_key = env[PASSENGER_UNION_STATION_KEY]
-			log = @@analytics_logger.new_transaction(group_name, category,
-				union_station_key)
-			begin
-				yield log
-			ensure
-				log.close
-			end
-		end
-	end
-end
-end
-end
\ No newline at end of file
diff --git a/lib/phusion_passenger/common_library.rb b/lib/phusion_passenger/common_library.rb
new file mode 100644
index 0000000..46856da
--- /dev/null
+++ b/lib/phusion_passenger/common_library.rb
@@ -0,0 +1,451 @@
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2012 Phusion
+#
+#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+#
+#  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
+#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#  THE SOFTWARE.
+
+# This file lists all the Phusion Passenger C++ library files and contains
+# code for calculating how to compile and how to link them into executables.
+# It's used by the build system (build/*.rb) and
+# lib/phusion_passenger/standalone/runtime_installer.rb.
+
+class CommonLibraryBuilder
+	include Rake::DSL if defined?(Rake::DSL)
+
+	attr_reader :all_components, :selected_components, :output_dir
+
+	def initialize(&block)
+		@all_components = {}
+		@all_ordered_components = []
+		@selected_components = {}
+		@namespace = "common"
+		if defined?(COMMON_OUTPUT_DIR)
+			@output_dir = COMMON_OUTPUT_DIR + "libpassenger_common"
+		else
+			@output_dir = "."
+		end
+		instance_eval(&block) if block
+	end
+
+	def initialize_copy(other)
+		[:all_components, :all_ordered_components, :selected_components, :namespace, :output_dir].each do |name|
+			var_name = "@#{name}"
+			instance_variable_set(var_name, other.instance_variable_get(var_name).dup)
+		end
+	end
+
+	def define_component(object_name, options)
+		options[:deps] ||= []
+		@all_components[object_name] = options
+		@all_ordered_components << object_name
+		@selected_components[object_name] = options
+	end
+
+	def only(*selector)
+		return dup.send(:only!, *selector)
+	end
+
+	def exclude(*selector)
+		return dup.send(:exclude!, *selector)
+	end
+
+	def set_namespace(namespace)
+		return dup.send(:set_namespace!, namespace)
+	end
+
+	def set_output_dir(dir)
+		return dup.send(:set_output_dir!, dir)
+	end
+
+	def link_objects
+		result = []
+
+		selected_categories.each do |category|
+			if category_complete?(category) && false
+				# Feature disabled: we don't want to waste too much space when
+				# packaging the runtime ('passenger package-runtime') so we
+				# never generate static libraries.
+				if aggregate_sources?
+					result << "#{@output_dir}/#{category}.o"
+				else
+					result << "#{@output_dir}/#{category}.a"
+				end
+			else
+				object_names = selected_objects_beloging_to_category(category)
+				result.concat(object_filenames_for(object_names))
+			end
+		end
+
+		return result
+	end
+
+	def link_objects_as_string
+		return link_objects.join(' ')
+	end
+
+	def define_tasks(extra_compiler_flags = nil)
+		flags =  "-Iext -Iext/common #{LIBEV_CFLAGS} #{extra_compiler_flags} "
+		flags << "#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}"
+		flags.strip!
+
+		group_all_components_by_category.each_pair do |category, object_names|
+			define_category_tasks(category, object_names, flags)
+		end
+
+		task("#{@namespace}:clean") do
+			sh "rm -rf #{@output_dir}"
+		end
+
+		return self
+	end
+
+private
+	def define_category_tasks(category, object_names, flags)
+		object_filenames = object_filenames_for(object_names)
+
+		object_names.each do |object_name|
+			options     = @all_components[object_name]
+			source_file = "ext/common/#{options[:source]}"
+			object_file = "#{@output_dir}/#{object_name}"
+
+			file(object_file => dependencies_for(options)) do
+				ensure_directory_exists(File.dirname(object_file))
+				if source_file =~ /\.c$/
+					compile_c(source_file, "#{flags} -o #{object_file}")
+				else
+					compile_cxx(source_file, "#{flags} -o #{object_file}")
+				end
+			end
+		end
+
+		task "#{@namespace}:clean" do
+			sh "rm -f #{object_filenames.join(' ')}"
+		end
+
+		if aggregate_sources?
+			aggregate_source = "#{@output_dir}/#{category}.cpp"
+			aggregate_object = "#{@output_dir}/#{category}.o"
+
+			file(aggregate_object => dependencies_for(object_names)) do
+				ensure_directory_exists(File.dirname(aggregate_source))
+				ensure_directory_exists(File.dirname(aggregate_object))
+
+				File.open(aggregate_source, "w") do |f|
+					f.puts %q{
+						#ifndef _GNU_SOURCE
+							#define _GNU_SOURCE
+						#endif
+					}
+					object_names.each do |object_name|
+						options = @all_components[object_name]
+						source_file = options[:source].sub(%r(^ext/common), '')
+						f.puts "#include \"#{source_file}\""
+					end
+				end
+
+				compile_cxx(aggregate_source, "#{flags} -o #{aggregate_object}")
+			end
+
+			task "#{@namespace}:clean" do
+				sh "rm -f #{aggregate_source} #{aggregate_object}"
+			end
+		elsif false
+			# Feature disabled: we don't want to waste too much space when
+			# packaging the runtime ('passenger package-runtime') so we
+			# never generate static libraries.
+			library = "#{@output_dir}/#{category}.a"
+			
+			file(library => object_filenames) do
+				create_static_library(library, object_filenames.join(' '))
+			end
+
+			task "#{@namespace}:clean" do
+				sh "rm -f #{library}"
+			end
+		end
+	end
+
+	def set_namespace!(namespace)
+		@namespace = namespace
+		return self
+	end
+
+	def set_output_dir!(dir)
+		@output_dir = dir
+		return self
+	end
+
+	def only!(*selector)
+		new_components = apply_selector(*selector)
+		@selected_components = new_components
+		return self
+	end
+
+	def exclude!(*selector)
+		apply_selector(*selector).each_key do |object_name|
+			@selected_components.delete(object_name)
+		end
+		return self
+	end
+
+	def apply_selector(*selector)
+		result = {}
+		selector = [selector].flatten
+		selector.each do |condition|
+			@selected_components.each do |object_name, options|
+				if component_satisfies_condition?(object_name, options, condition)
+					result[object_name] = options
+				end
+			end
+		end
+		return result
+	end
+
+	def component_satisfies_condition?(object_name, options, condition)
+		case condition
+		when Symbol
+			return condition == :all || options[:category] == condition
+		when String
+			return object_name == condition
+		else
+			raise ArgumentError, "Invalid condition #{condition.inspect}"
+		end
+	end
+
+	def ensure_directory_exists(dir)
+		sh("mkdir -p #{dir}") if !File.directory?(dir)
+	end
+
+	def selected_categories
+		categories = {}
+		@selected_components.each_value do |options|
+			categories[options[:category]] = true
+		end
+		return categories.keys
+	end
+
+	def category_complete?(category)
+		expected = 0
+		actual   = 0
+		@all_components.each_value do |options|
+			if options[:category] == category
+				expected += 1
+			end
+		end
+		@selected_components.each_value do |options|
+			if options[:category] == category
+				actual += 1
+			end
+		end
+		return expected == actual
+	end
+
+	def selected_objects_beloging_to_category(category)
+		result = []
+		@selected_components.each_pair do |object_name, options|
+			if options[:category] == category
+				result << object_name
+			end
+		end
+		return result
+	end
+
+	def dependencies_for(component_options_or_object_names)
+		result = nil
+		case component_options_or_object_names
+		when Hash
+			component_options = component_options_or_object_names
+			result = ["ext/common/#{component_options[:source]}"]
+			component_options[:deps].each do |dependency|
+				result << "ext/common/#{dependency}"
+			end
+		when Array
+			result = []
+			object_names = component_options_or_object_names
+			object_names.each do |object_name|
+				options = @all_components[object_name]
+				result.concat(dependencies_for(options))
+			end
+			result.uniq!
+		end
+		return result
+	end
+
+	def object_filenames_for(object_names)
+		return object_names.map { |name| "#{@output_dir}/#{name}" }
+	end
+
+	def group_all_components_by_category
+		categories = {}
+		@all_ordered_components.each do |object_name|
+			options  = @all_components[object_name]
+			category = options[:category]
+			categories[category] ||= []
+			categories[category] << object_name
+		end
+		return categories
+	end
+
+	def aggregate_sources?
+		# Feature disabled: it's too hard to make it work because
+		# lots of executables have to be linked to individual objects
+		# anyway.
+		return false
+	end
+end
+
+
+COMMON_LIBRARY = CommonLibraryBuilder.new do
+	define_component 'Logging.o',
+		:source   => 'Logging.cpp',
+		:category => :base,
+		:deps     => %w(
+			Logging.cpp
+			Logging.h
+		)
+	define_component 'Utils/SystemTime.o',
+		:source   => 'Utils/SystemTime.cpp',
+		:category => :base,
+		:deps     => %w(
+			Utils/SystemTime.h
+		)
+	define_component 'Utils/StrIntUtils.o',
+		:source   => 'Utils/StrIntUtils.cpp',
+		:category => :base,
+		:deps     => %w(
+			Utils/StrIntUtils.h
+		)
+	define_component 'Utils/IOUtils.o',
+		:source   => 'Utils/IOUtils.cpp',
+		:category => :base,
+		:deps     => %w(
+			Utils/IOUtils.h
+		)
+	define_component 'Utils.o',
+		:source   => 'Utils.cpp',
+		:category => :base,
+		:deps     => %w(
+			Utils.h
+			Utils/Base64.h
+			Utils/StrIntUtils.h
+			ResourceLocator.h
+		)
+
+	define_component 'Utils/Base64.o',
+		:source   => 'Utils/Base64.cpp',
+		:category => :other,
+		:deps     => %w(
+			Utils/Base64.h
+		)
+	define_component 'Utils/CachedFileStat.o',
+		:source   => 'Utils/CachedFileStat.cpp',
+		:category => :other,
+		:deps     => %w(
+			Utils/CachedFileStat.h
+			Utils/CachedFileStat.hpp
+		)
+	define_component 'Utils/LargeFiles.o',
+		:source   => 'Utils/LargeFiles.cpp',
+		:category => :other,
+		:deps     => %w(
+			Utils/LargeFiles.h
+		)
+	define_component 'ApplicationPool2/Implementation.o',
+		:source   => 'ApplicationPool2/Implementation.cpp',
+		:category => :other,
+		:deps     => %w(
+			ApplicationPool2/Spawner.h
+			ApplicationPool2/Common.h
+			ApplicationPool2/Pool.h
+			ApplicationPool2/SuperGroup.h
+			ApplicationPool2/Group.h
+			ApplicationPool2/Session.h
+			ApplicationPool2/Options.h
+			ApplicationPool2/PipeWatcher.h
+			ApplicationPool2/AppTypes.h
+			ApplicationPool2/Spawner.h
+			ApplicationPool2/SpawnerFactory.h
+			ApplicationPool2/SmartSpawner.h
+			ApplicationPool2/DirectSpawner.h
+			ApplicationPool2/DummySpawner.h
+		)
+	define_component 'ApplicationPool2/AppTypes.o',
+		:source   => 'ApplicationPool2/AppTypes.cpp',
+		:category => :other,
+		:deps     => %w(
+			ApplicationPool2/AppTypes.h
+			Utils/StrIntUtils.h
+			Utils/CachedFileStat.h
+		)
+	define_component 'AgentsStarter.o',
+		:source   => 'AgentsStarter.cpp',
+		:category => :other,
+		:deps     => %w(
+			AgentsStarter.h
+			ResourceLocator.h
+			MessageClient.h
+			ServerInstanceDir.h
+			Utils/IniFile.h
+			Utils/VariantMap.h
+		)
+	define_component 'AgentsBase.o',
+		:source   => 'agents/Base.cpp',
+		:category => :other,
+		:deps     => %w(
+			agents/Base.h
+			Utils/VariantMap.h
+		)
+	define_component 'agents/LoggingAgent/FilterSupport.o',
+		:source   => 'agents/LoggingAgent/FilterSupport.cpp',
+		:category => :logging_agent,
+		:deps     => %w(
+			agents/LoggingAgent/FilterSupport.h
+		)
+	define_component 'Utils/MD5.o',
+		:source   => 'Utils/MD5.cpp',
+		:category => :other,
+		:deps     => %w(
+			Utils/MD5.h
+		)
+	define_component 'Utils/fib.o',
+		:source   => 'Utils/fib.c',
+		:category => :other,
+		:deps     => %w(
+			Utils/fib.h
+			Utils/fibpriv.h
+		)
+	define_component 'Utils/jsoncpp.o',
+		:source   => 'Utils/jsoncpp.cpp',
+		:category => :other,
+		:deps     => %w(
+			Utils/json.h
+			Utils/json-forwards.h
+		)
+
+	#'BCrypt.o' => %w(
+	#	BCrypt.cpp
+	#	BCrypt.h
+	#	Blowfish.h
+	#	Blowfish.c)
+end
+
+# Objects that must be linked into the Nginx binary.
+NGINX_LIBS_SELECTOR = [:base, 'AgentsStarter.o', 'ApplicationPool2/AppTypes.o',
+	'Utils/CachedFileStat.o', 'Utils/Base64.o', 'agents/LoggingAgent/FilterSupport.o']
diff --git a/lib/phusion_passenger/console_text_template.rb b/lib/phusion_passenger/console_text_template.rb
index a4294a5..137e8a7 100644
--- a/lib/phusion_passenger/console_text_template.rb
+++ b/lib/phusion_passenger/console_text_template.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -22,19 +22,19 @@
 #  THE SOFTWARE.
 
 require 'erb'
+require 'phusion_passenger/utils/ansi_colors'
+
 module PhusionPassenger
 
 class ConsoleTextTemplate
-	TEMPLATE_DIR = "#{File.dirname(__FILE__)}/templates"
-
 	def initialize(input, options = {})
 		@buffer = ''
 		if input[:file]
-			data = File.read("#{TEMPLATE_DIR}/#{input[:file]}.txt.erb")
+			data = File.read("#{PhusionPassenger.resources_dir}/templates/#{input[:file]}.txt.erb")
 		else
 			data = input[:text]
 		end
-		@template = ERB.new(substitute_color_tags(data),
+		@template = ERB.new(Utils::AnsiColors.ansi_colorize(data),
 			nil, nil, '@buffer')
 		options.each_pair do |name, value|
 			self[name] = value
@@ -49,18 +49,6 @@ class ConsoleTextTemplate
 	def result
 		return @template.result(binding)
 	end
-
-private
-	DEFAULT_TERMINAL_COLORS = "\e[0m\e[37m\e[40m"
-
-	def substitute_color_tags(data)
-		data = data.gsub(%r{<b>(.*?)</b>}m, "\e[1m\\1#{DEFAULT_TERMINAL_COLORS}")
-		data.gsub!(%r{<red>(.*?)</red>}m, "\e[1m\e[31m\\1#{DEFAULT_TERMINAL_COLORS}")
-		data.gsub!(%r{<green>(.*?)</green>}m, "\e[1m\e[32m\\1#{DEFAULT_TERMINAL_COLORS}")
-		data.gsub!(%r{<yellow>(.*?)</yellow>}m, "\e[1m\e[33m\\1#{DEFAULT_TERMINAL_COLORS}")
-		data.gsub!(%r{<banner>(.*?)</banner>}m, "\e[33m\e[44m\e[1m\\1#{DEFAULT_TERMINAL_COLORS}")
-		return data
-	end
 end
 
 end # module PhusionPassenger
diff --git a/lib/phusion_passenger/constants.rb b/lib/phusion_passenger/constants.rb
index 6fb4a4d..fcd1c44 100644
--- a/lib/phusion_passenger/constants.rb
+++ b/lib/phusion_passenger/constants.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -21,15 +21,53 @@
 #  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #  THE SOFTWARE.
 
+require 'phusion_passenger'
+
 module PhusionPassenger
-	DEFAULT_FRAMEWORK_SPAWNER_MAX_IDLE_TIME = 30 * 60
-	DEFAULT_APP_SPAWNER_MAX_IDLE_TIME       = 10 * 60
-	
-	ROOT_UID = 0
-	ROOT_GID = 0
-	
-	PASSENGER_ANALYTICS_WEB_LOG = "PASSENGER_ANALYTICS_WEB_LOG"
-	PASSENGER_TXN_ID = "PASSENGER_TXN_ID"
-	PASSENGER_GROUP_NAME = "PASSENGER_GROUP_NAME"
-	PASSENGER_UNION_STATION_KEY = "PASSENGER_UNION_STATION_KEY"
+	PASSENGER_ANALYTICS_WEB_LOG = "PASSENGER_ANALYTICS_WEB_LOG".freeze
+	PASSENGER_TXN_ID            = "PASSENGER_TXN_ID".freeze
+	PASSENGER_UNION_STATION_KEY = "UNION_STATION_KEY".freeze
+	RACK_HIJACK_IO              = "rack.hijack_io".freeze
+
+	# Constants shared between the C++ and Ruby codebase. The C++ Constants.h
+	# is automatically generated by the build system from the following
+	# definitions.
+	module SharedConstants
+		# Default config values
+		DEFAULT_LOG_LEVEL = 0
+		DEFAULT_RUBY = "ruby"
+		DEFAULT_PYTHON = "python"
+		DEFAULT_MAX_POOL_SIZE = 6
+		DEFAULT_POOL_IDLE_TIME = 300
+		DEFAULT_MAX_INSTANCES_PER_APP = 0
+		DEFAULT_WEB_APP_USER = "nobody"
+		DEFAULT_ANALYTICS_LOG_USER = DEFAULT_WEB_APP_USER
+		DEFAULT_ANALYTICS_LOG_GROUP = ""
+		DEFAULT_ANALYTICS_LOG_PERMISSIONS = "u=rwx,g=rx,o=rx"
+		DEFAULT_UNION_STATION_GATEWAY_ADDRESS = "gateway.unionstationapp.com"
+		DEFAULT_UNION_STATION_GATEWAY_PORT = 443
+
+		# Size limits
+		MESSAGE_SERVER_MAX_USERNAME_SIZE = 100
+		MESSAGE_SERVER_MAX_PASSWORD_SIZE = 100
+		POOL_HELPER_THREAD_STACK_SIZE = 1024 * 256
+
+		# Time limits
+		PROCESS_SHUTDOWN_TIMEOUT = 60 # In seconds
+		PROCESS_SHUTDOWN_TIMEOUT_DISPLAY = "1 minute"
+
+		# Versions
+		PASSENGER_VERSION = PhusionPassenger::VERSION_STRING
+		SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION = 1
+		SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION = 0
+		SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION = 2
+		SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION = 0
+
+		# Misc
+		FEEDBACK_FD = 3
+	end
+
+	SharedConstants.constants.each do |name|
+		const_set(name, SharedConstants.const_get(name)) unless const_defined? name
+	end
 end
diff --git a/lib/phusion_passenger/debug_logging.rb b/lib/phusion_passenger/debug_logging.rb
index 8853088..61e37a9 100644
--- a/lib/phusion_passenger/debug_logging.rb
+++ b/lib/phusion_passenger/debug_logging.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -37,6 +37,10 @@ module DebugLogging
 			private :trace
 		end
 	end
+
+	def self.log_level
+		return @@log_level
+	end
 	
 	def self.log_level=(level)
 		@@log_level = level
@@ -93,8 +97,18 @@ module DebugLogging
 			location.sub!(/(.*):.*/, '\1')
 			now = Time.now
 			time_str = now.strftime("%Y-%m-%d %H:%M:%S.")
-			time_str << sprintf("%03d", now.usec / 1000)
-			output.write("[ pid=#{$$} thr=#{Thread.current.object_id} file=#{location} time=#{time_str} ]: #{message}\n")
+			time_str << sprintf("%04d", now.usec / 100)
+
+			current_thread = Thread.current
+			if !(thread_id = current_thread[:id])
+				current_thread.to_s =~ /:(0x[0-9a-f]+)/i
+				thread_id = current_thread[:id] = $1 || '?'
+			end
+			if thread_name = current_thread[:name]
+				thread_name = "(#{thread_name})"
+			end
+
+			output.write("[ #{time_str} #{$$}/#{thread_id}#{thread_name} #{location} ]: #{message}\n")
 			output.flush
 		end
 	end
diff --git a/lib/phusion_passenger/dependencies.rb b/lib/phusion_passenger/dependencies.rb
deleted file mode 100644
index e37a212..0000000
--- a/lib/phusion_passenger/dependencies.rb
+++ /dev/null
@@ -1,627 +0,0 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010, 2011, 2012 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'rbconfig'
-require 'phusion_passenger'
-require 'phusion_passenger/packaging'
-require 'phusion_passenger/platform_info'
-require 'phusion_passenger/platform_info/apache'
-require 'phusion_passenger/platform_info/ruby'
-require 'phusion_passenger/platform_info/linux'
-require 'phusion_passenger/platform_info/curl'
-
-module PhusionPassenger
-
-# Represents a dependency software that Passenger requires. It's used by the
-# installer to check whether all dependencies are available. A Dependency object
-# contains full information about a dependency, such as its name, code for
-# detecting whether it is installed, and installation instructions for the
-# current platform.
-class Dependency # :nodoc: all
-	[:name, :install_command, :install_instructions, :install_comments,
-	 :website, :website_comments, :provides].each do |attr_name|
-		attr_writer attr_name
-		
-		define_method(attr_name) do
-			call_init_block
-			return instance_variable_get("@#{attr_name}")
-		end
-	end
-	
-	def initialize(&block)
-		@included_by = []
-		@init_block = block
-	end
-	
-	def define_checker(&block)
-		@checker = block
-	end
-	
-	def check
-		call_init_block
-		result = Result.new
-		@checker.call(result)
-		return result
-	end
-
-private
-	class Result
-		def found(*args)
-			if args.empty?
-				@found = true
-			else
-				@found = args.first
-			end
-		end
-		
-		def not_found
-			found(false)
-		end
-		
-		def found?
-			return !@found.nil? && @found
-		end
-		
-		def found_at
-			if @found.is_a?(TrueClass) || @found.is_a?(FalseClass)
-				return nil
-			else
-				return @found
-			end
-		end
-	end
-
-	def call_init_block
-		if @init_block
-			init_block = @init_block
-			@init_block = nil
-			init_block.call(self)
-		end
-	end
-end
-
-# Namespace which contains the different dependencies that Passenger may require.
-# See Dependency for more information.
-module Dependencies # :nodoc: all
-	# Returns whether fastthread is a required dependency for the current
-	# Ruby interpreter.
-	def self.fastthread_required?
-		return (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby") && RUBY_VERSION < "1.8.7"
-	end
-	
-	# Returns whether Mizuho is required in order to be able to package all files
-	# in the packaging list.
-	def self.mizuho_required?
-		return Packaging::ASCII_DOCS.any? do |fn|
-			!File.exist?("#{SOURCE_ROOT}/#{fn}")
-		end
-	end
-
-	GCC = Dependency.new do |dep|
-		dep.name = "GNU C++ compiler"
-		dep.define_checker do |result|
-			gxx = PlatformInfo.find_command('g++')
-			if gxx.nil?
-				result.not_found
-			else
-				result.found(gxx)
-			end
-		end
-		if RUBY_PLATFORM =~ /linux/
-			tags = PlatformInfo.linux_distro_tags
-			if tags.include?(:debian)
-				dep.install_command = "apt-get install build-essential"
-			elsif tags.include?(:mandriva)
-				dep.install_command = "urpmi gcc-c++"
-			elsif tags.include?(:redhat)
-				dep.install_command = "yum install gcc-c++"
-			elsif tags.include?(:gentoo)
-				dep.install_command = "emerge -av gcc"
-			end
-		elsif RUBY_PLATFORM =~ /darwin/
-			dep.install_instructions = "Please install the Apple Development Tools: http://developer.apple.com/tools/"
-		end
-		dep.website = "http://gcc.gnu.org/"
-	end
-	
-	Make = Dependency.new do |dep|
-		dep.name = "The 'make' tool"
-		dep.define_checker do |result|
-			make = PlatformInfo.find_command('make')
-			if make
-				result.found(make)
-			else
-				result.not_found
-			end
-		end
-		if RUBY_PLATFORM =~ /linux/
-			case PlatformInfo.linux_distro
-			when :ubuntu, :debian
-				dep.install_command = "apt-get install build-essential"
-			when :rhel, :fedora, :centos
-				dep.install_command = "yum install make"
-			end
-		elsif RUBY_PLATFORM =~ /darwin/
-			dep.install_instructions = "Please install the Apple Development Tools: http://developer.apple.com/tools/"
-		end
-		dep.website = "http://www.gnu.org/software/make/"
-	end
-	
-	GnuMake = Dependency.new do |dep|
-		dep.name = "GNU make"
-		dep.define_checker do |result|
-			make = PlatformInfo.gnu_make
-			if make
-				result.found(make)
-			else
-				result.not_found
-			end
-		end
-		if RUBY_PLATFORM =~ /linux/
-			case PlatformInfo.linux_distro
-			when :ubuntu, :debian
-				dep.install_command = "apt-get install build-essential"
-			when :rhel, :fedora, :centos
-				dep.install_command = "yum install make"
-			end
-		elsif RUBY_PLATFORM =~ /darwin/
-			dep.install_instructions = "Please install the Apple Development Tools: http://developer.apple.com/tools/"
-		end
-		dep.website = "http://www.gnu.org/software/make/"
-	end
-	
-	DownloadTool = Dependency.new do |dep|
-		dep.name = "A download tool like 'wget' or 'curl'"
-		dep.define_checker do |result|
-			tool = PlatformInfo.find_command('wget')
-			if tool
-				result.found(tool)
-			else
-				tool = PlatformInfo.find_command('curl')
-				if tool
-					result.found(tool)
-				else
-					result.not_found
-				end
-			end
-		end
-		if RUBY_PLATFORM =~ /linux/
-			case PlatformInfo.linux_distro
-			when :ubuntu, :debian
-				dep.install_command = "apt-get install wget curl"
-			when :rhel, :fedora, :centos
-				dep.install_command = "yum install wget curl"
-			end
-		else
-			dep.install_instructions = "Please install either wget (http://www.gnu.org/software/wget/) or curl (http://curl.haxx.se/)."
-		end
-	end
-	
-	Ruby_DevHeaders = Dependency.new do |dep|
-		dep.name = "Ruby development headers"
-		dep.define_checker do |result|
-			require 'rbconfig'
-			begin
-				require 'mkmf'
-				if defined?(::RbConfig)
-					config = ::RbConfig::CONFIG
-				else
-					config = ::Config::CONFIG
-				end
-				header_dir = config['rubyhdrdir'] || config['archdir']
-				result.found(File.exist?("#{header_dir}/ruby.h"))
-			rescue LoadError, SystemExit
-				# On RedHat/Fedora/CentOS, if ruby-devel is not installed then
-				# mkmf.rb will print an error and call 'exit'. So here we
-				# catch SystemExit.
-				result.not_found
-			end
-		end
-		if RUBY_PLATFORM =~ /linux/
-			tags = PlatformInfo.linux_distro_tags
-			if tags.include?(:debian)
-				dep.install_command = "apt-get install ruby1.8-dev"
-			elsif tags.include?(:mandriva)
-				dep.install_command = "urpmi urpmi ruby-RubyGems"
-			elsif tags.include?(:redhat)
-				dep.install_command = "yum install ruby-devel"
-			elsif tags.include?(:gentoo)
-				dep.install_command = "emerge -av ruby"
-			end
-		elsif RUBY_PLATFORM =~ /freebsd/
-			dep.install_command = "make -C /usr/ports/lang/ruby18 install"
-		end
-		dep.website = "http://www.ruby-lang.org/"
-		dep.install_instructions = "Please reinstall Ruby by downloading it from <b>#{dep.website}</b>"
-	end
-	
-	Ruby_OpenSSL = Dependency.new do |dep|
-		dep.name = "OpenSSL support for Ruby"
-		dep.define_checker do |result|
-			begin
-				require 'openssl'
-				result.found
-			rescue LoadError
-				result.not_found
-			end
-		end
-		if RUBY_PLATFORM =~ /linux/
-			case PlatformInfo.linux_distro
-			when :ubuntu, :debian
-				dep.install_command = "apt-get install libopenssl-ruby"
-			end
-		end
-		if dep.install_command.nil?
-			dep.website = "http://www.ruby-lang.org/"
-			dep.install_instructions = "Please (re)install Ruby with OpenSSL " <<
-				"support by downloading it from <b>#{dep.website}</b>."
-		end
-	end
-	
-	RubyGems = Dependency.new do |dep|
-		dep.name = "RubyGems"
-		dep.define_checker do |result|
-			begin
-				require 'rubygems'
-				result.found
-			rescue LoadError
-				result.not_found
-			end
-		end
-		dep.website = "http://www.rubygems.org/"
-		dep.install_instructions = "Please download it from <b>#{dep.website}</b>. " <<
-			"Extract the tarball, and run <b>ruby setup.rb</b>"
-	end
-	
-	Rake = Dependency.new do |dep|
-		dep.name = "Rake"
-		dep.define_checker do |result|
-			if PlatformInfo.rake.nil?
-				result.not_found
-			else
-				result.found(PlatformInfo.rake)
-			end
-		end
-		dep.website = "http://rake.rubyforge.org/"
-		dep.install_instructions = "Please install RubyGems first, then run <b>#{PlatformInfo.gem_command || "gem"} install rake</b>"
-	end
-	
-	Apache2 = Dependency.new do |dep|
-		dep.name = "Apache 2"
-		dep.define_checker do |result|
-			if PlatformInfo.httpd.nil?
-				result.not_found
-			else
-				result.found(PlatformInfo.httpd)
-			end
-		end
-		if RUBY_PLATFORM =~ /linux/
-			tags = PlatformInfo.linux_distro_tags
-			if tags.include?(:debian)
-				dep.install_command = "apt-get install apache2-mpm-prefork"
-			elsif tags.include?(:mandriva)
-				dep.install_command = "urpmi apache"
-			elsif tags.include?(:redhat)
-				dep.install_command = "yum install httpd"
-			elsif tags.include?(:gentoo)
-				dep.install_command = "emerge -av apache"
-			end
-		elsif RUBY_PLATFORM =~ /freebsd/
-			dep.install_command = "make -C /usr/ports/www/apache22 install"
-			dep.provides = [Apache2_DevHeaders, APR_DevHeaders, APU_DevHeaders]
-		end
-		dep.website = "http://httpd.apache.org/"
-	end
-	
-	Apache2_DevHeaders = Dependency.new do |dep|
-		dep.name = "Apache 2 development headers"
-		dep.define_checker do |result|
-			if PlatformInfo.apxs2.nil?
-				result.not_found
-			else
-				result.found(PlatformInfo.apxs2)
-			end
-		end
-		if RUBY_PLATFORM =~ /linux/
-			tags = PlatformInfo.linux_distro_tags
-			if tags.include?(:debian)
-				dep.install_command = "apt-get install apache2-prefork-dev"
-				dep.provides = [Apache2]
-			elsif tags.include?(:mandriva)
-				dep.install_command = "urpmi apache-devel"
-				dep.provides = [Apache2]
-			elsif tags.include?(:redhat)
-				dep.install_command = "yum install httpd-devel"
-				dep.provides = [Apache2]
-			elsif tags.include?(:gentoo)
-				dep.install_command = "emerge -av apache"
-				dep.provides = [Apache2]
-			end
-		elsif RUBY_PLATFORM =~ /freebsd/
-			dep.install_command = "make -C /usr/ports/www/apache22 install"
-		end
-		dep.website = "http://httpd.apache.org/"
-	end
-	
-	APR_DevHeaders = Dependency.new do |dep|
-		dep.name = "Apache Portable Runtime (APR) development headers"
-		dep.define_checker do |result|
-			if PlatformInfo.apr_config.nil?
-				result.not_found
-			else
-				result.found(PlatformInfo.apr_config)
-			end
-		end
-		if RUBY_PLATFORM =~ /linux/
-			tags = PlatformInfo.linux_distro_tags
-			if tags.include?(:debian)
-				dep.install_command = "apt-get install libapr1-dev"
-			elsif tags.include?(:mandriva)
-				dep.install_command = "urpmi libapr-devel"
-			elsif tags.include?(:redhat)
-				dep.install_command = "yum install apr-devel"
-			elsif tags.include?(:gentoo)
-				dep.install_command = "emerge -av apr"
-			end
-		elsif RUBY_PLATFORM =~ /darwin/
-			dep.install_instructions = "Please install Apache from MacPorts, which will " <<
-				"provide APR automatically. <b>Or</b>, if you're installing against MacOS X's " <<
-				"default provided Apache, then please install the OS X Developer SDK."
-		end
-		dep.website = "http://httpd.apache.org/"
-		dep.website_comments = "APR is an integrated part of Apache."
-	end
-
-	APU_DevHeaders = Dependency.new do |dep|
-		dep.name = "Apache Portable Runtime Utility (APU) development headers"
-		dep.define_checker do |result|
-			if PlatformInfo.apu_config.nil?
-				result.not_found
-			else
-				result.found(PlatformInfo.apu_config)
-			end
-		end
-		if RUBY_PLATFORM =~ /linux/
-			tags = PlatformInfo.linux_distro_tags
-			if tags.include?(:debian)
-				dep.install_command = "apt-get install libaprutil1-dev"
-			elsif tags.include?(:mandriva)
-				dep.install_command = "urpmi libapr-util-devel"
-			elsif tags.include?(:redhat)
-				dep.install_command = "yum install apr-util-devel"
-			end
-		elsif RUBY_PLATFORM =~ /darwin/
-			dep.install_instructions = "Please install Apache from MacPorts, which will " <<
-				"provide APU automatically. <b>Or</b>, if you're installing against MacOS X's " <<
-				"default provided Apache, then please install the OS X Developer SDK."
-		end
-		dep.website = "http://httpd.apache.org/"
-		dep.website_comments = "APR Utility is an integrated part of Apache."
-	end
-	
-	FastThread = Dependency.new do |dep|
-		dep.name = "fastthread"
-		dep.define_checker do |result|
-			begin
-				begin
-					require 'rubygems'
-				rescue LoadError
-				end
-				require 'fastthread'
-				result.found
-			rescue LoadError
-				result.not_found
-			end
-		end
-		dep.install_instructions = "Please install RubyGems first, then run <b>#{PlatformInfo.gem_command || "gem"} install fastthread</b>"
-	end
-
-	Rack = Dependency.new do |dep|
-		dep.name = "rack"
-		dep.define_checker do |result|
-			begin
-				begin
-					require 'rubygems'
-				rescue LoadError
-				end
-				require 'rack'
-				result.found
-			rescue LoadError
-				result.not_found
-			end
-		end
-		dep.install_instructions = "Please install RubyGems first, then run <b>#{PlatformInfo.gem_command || "gem"} install rack</b>"
-	end
-	
-	Curl_Dev = Dependency.new do |dep|
-		dep.name = "Curl development headers with SSL support"
-		dep.define_checker do |result|
-			source_file = "#{PlatformInfo.tmpexedir}/passenger-curl-check.c"
-			output_file = "#{PlatformInfo.tmpexedir}/passenger-curl-check"
-			begin
-				found = true
-				File.open(source_file, 'w') do |f|
-					f.puts("#include <curl/curl.h>")
-					f.puts("int main() {")
-					f.puts("  curl_global_init(CURL_GLOBAL_ALL);")
-					f.puts("  return 0;")
-					f.puts("}")
-				end
-				Dir.chdir(File.dirname(source_file)) do
-					command = "(gcc #{ENV['CFLAGS']} " +
-						"-o '#{output_file}' '#{source_file}' " +
-						"#{PlatformInfo.curl_flags} #{PlatformInfo.curl_libs}) " +
-						">/dev/null 2>/dev/null"
-					if !system(command)
-						found = false
-					end
-				end
-				
-				if found && !PlatformInfo.curl_supports_ssl?
-					dep.install_comments = "Curl was found, but it doesn't support SSL."
-					found = false
-				end
-				result.found(found)
-			ensure
-				File.unlink(source_file) rescue nil
-				File.unlink(output_file) rescue nil
-			end
-		end
-		dep.install_instructions = "Please download Curl from <b>http://curl.haxx.se/libcurl</b> " +
-			"and make sure you install it <b>with SSL support</b>."
-		if RUBY_PLATFORM =~ /linux/
-			tags = PlatformInfo.linux_distro_tags
-			if tags.include?(:debian)
-				dep.install_instructions = "Please run " +
-					"<b>apt-get install libcurl4-openssl-dev</b> " +
-					"or <b>libcurl4-gnutls-dev</b>, whichever you prefer."
-			elsif tags.include?(:redhat)
-				begin
-					release = File.read("/etc/redhat-release")
-				rescue
-					release = nil
-				end
-				if release =~ /release 4/
-					# http://code.google.com/p/phusion-passenger/issues/detail?id=554
-					dep.install_command = "yum install zlib-devel e2fsprogs-devel krb5-devel libidn-devel"
-				else
-					dep.install_command = "yum install curl-devel"
-				end
-			end
-		end
-	end
-	
-	OpenSSL_Dev = Dependency.new do |dep|
-		dep.name = "OpenSSL development headers"
-		dep.define_checker do |result|
-			source_file = "#{PlatformInfo.tmpexedir}/passenger-openssl-check.c"
-			object_file = "#{PlatformInfo.tmpexedir}/passenger-openssl-check.o"
-			begin
-				File.open(source_file, 'w') do |f|
-					f.write("#include <openssl/ssl.h>")
-				end
-				Dir.chdir(File.dirname(source_file)) do
-					if system("(gcc #{ENV['CFLAGS']} -c '#{source_file}') >/dev/null 2>/dev/null")
-						result.found
-					else
-						result.not_found
-					end
-				end
-			ensure
-				File.unlink(source_file) rescue nil
-				File.unlink(object_file) rescue nil
-			end
-		end
-		if RUBY_PLATFORM =~ /linux/
-			tags = PlatformInfo.linux_distro_tags
-			if tags.include?(:debian)
-				dep.install_command = "apt-get install libssl-dev"
-			elsif tags.include?(:redhat)
-				dep.install_command = "yum install openssl-devel"
-			end
-		end
-		dep.website = "http://www.openssl.org/"
-	end
-	
-	Zlib_Dev = Dependency.new do |dep|
-		dep.name = "Zlib development headers"
-		dep.define_checker do |result|
-			source_file = "#{PlatformInfo.tmpexedir}/zlib-check.c"
-			object_file = "#{PlatformInfo.tmpexedir}/zlib-check.o"
-			begin
-				File.open(source_file, 'w') do |f|
-					f.write("#include <zlib.h>")
-				end
-				Dir.chdir(File.dirname(source_file)) do
-					if system("(g++ -c zlib-check.c) >/dev/null 2>/dev/null")
-						result.found
-					else
-						result.not_found
-					end
-				end
-			ensure
-				File.unlink(source_file) rescue nil
-				File.unlink(object_file) rescue nil
-			end
-		end
-		if RUBY_PLATFORM =~ /linux/
-			tags = PlatformInfo.linux_distro_tags
-			if tags.include?(:debian)
-				dep.install_command = "apt-get install zlib1g-dev"
-			elsif tags.include?(:mandriva)
-				dep.install_command = "urpmi zlib1-devel"
-			elsif tags.include?(:redhat)
-				dep.install_command = "yum install zlib-devel"
-			end
-		end
-		dep.website = "http://www.zlib.net/"
-	end
-	
-	Daemon_Controller = Dependency.new do |dep|
-		dep.name = "daemon_controller >= 1.0.0"
-		dep.install_instructions = "Please install RubyGems first, then run " <<
-			"<b>#{PlatformInfo.gem_command || "gem"} install daemon_controller</b>"
-		dep.define_checker do |result|
-			begin
-				begin
-					require 'rubygems'
-				rescue LoadError
-				end
-				require 'daemon_controller'
-				begin
-					require 'daemon_controller/version'
-					too_old = DaemonController::VERSION_STRING < '1.0.0'
-				rescue LoadError
-					too_old = true
-				end
-				if too_old
-					result.not_found
-					dep.install_instructions = "Your version of daemon_controller is too old. " <<
-						"Please upgrade with the following commands:\n" <<
-						"   <b>#{PlatformInfo.gem_command || "gem"} uninstall FooBarWidget-daemon_controller</b>\n" <<
-						"   <b>#{PlatformInfo.gem_command || "gem"} install daemon_controller</b>"
-				else
-					result.found
-				end
-			rescue LoadError
-				result.not_found
-			end
-		end
-	end
-	
-	Mizuho = Dependency.new do |dep|
-		dep.name = "Mizuho"
-		dep.define_checker do |result|
-			mizuho = PlatformInfo.find_command('mizuho')
-			if mizuho.nil?
-				result.not_found
-			else
-				result.found(mizuho)
-			end
-		end
-		dep.website = "http://github.com/FooBarWidget/mizuho"
-		dep.install_instructions = "Please install RubyGems first, then run <b>#{PlatformInfo.gem_command || "gem"} install mizuho</b>"
-	end
-end
-
-end # module PhusionPassenger
diff --git a/lib/phusion_passenger/exceptions.rb b/lib/phusion_passenger/exceptions.rb
deleted file mode 100644
index 90d06d2..0000000
--- a/lib/phusion_passenger/exceptions.rb
+++ /dev/null
@@ -1,103 +0,0 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-module PhusionPassenger
-
-# Indicates that there is no Ruby on Rails version installed that satisfies
-# a given Ruby on Rails Gem version specification.
-class VersionNotFound < StandardError
-	attr_reader :gem_version_spec
-	
-	# - +message+: The exception message.
-	# - +gem_version_spec+: The Ruby on Rails Gem version specification that caused this error.
-	def initialize(message, gem_version_spec)
-		super(message)
-		@gem_version_spec = gem_version_spec
-	end
-end
-
-# An abstract base class for AppInitError and FrameworkInitError. This represents
-# the failure when initializing something.
-class InitializationError < StandardError
-	# The exception that caused initialization to fail. This may be nil.
-	attr_accessor :child_exception
-
-	# Create a new InitializationError. +message+ is the error message,
-	# and +child_exception+ is the exception that caused initialization
-	# to fail.
-	def initialize(message, child_exception = nil)
-		super(message)
-		@child_exception = child_exception
-	end
-end
-
-# Raised when Rack::ApplicationSpawner, ClassicRails::ApplicationSpawner,
-# ClassicRails::FrameworkSpawner or SpawnManager was unable to spawn an application,
-# because the application either threw an exception or called exit.
-#
-# If the application called exit, then +child_exception+ is an instance of
-# +SystemExit+.
-class AppInitError < InitializationError
-	# The application type, e.g. "rails" or "rack".
-	attr_accessor :app_type
-	# Any messages printed to stderr before the failure. May be nil.
-	attr_accessor :stderr
-	
-	def initialize(message, child_exception = nil, app_type = "rails", stderr = nil)
-		super(message, child_exception)
-		@app_type = app_type
-		@stderr = stderr
-	end
-end
-
-# Raised when ClassicRails::FrameworkSpawner or ClassicRails::SpawnManager was unable to load a
-# version of the Ruby on Rails framework. The +child_exception+ attribute is guaranteed
-# non-nil.
-class FrameworkInitError < InitializationError
-	attr_reader :vendor
-	attr_reader :version
-	
-	def initialize(message, child_exception, options)
-		super(message, child_exception)
-		if options[:vendor]
-			@vendor = options[:vendor]
-		else
-			@version = options[:version]
-		end
-	end
-end
-
-class UnknownError < StandardError
-	attr_accessor :real_class_name
-	
-	def initialize(message, class_name, backtrace)
-		super("#{message} (#{class_name})")
-		set_backtrace(backtrace)
-		@real_class_name = class_name
-	end
-end
-
-class InvalidPath < StandardError
-end
-
-end # module PhusionPassenger
diff --git a/lib/phusion_passenger/html_template.rb b/lib/phusion_passenger/html_template.rb
deleted file mode 100644
index e82e13d..0000000
--- a/lib/phusion_passenger/html_template.rb
+++ /dev/null
@@ -1,107 +0,0 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'erb'
-require 'phusion_passenger'
-
-module PhusionPassenger
-
-# A convenience utility class for rendering our error pages.
-class HTMLTemplate
-	def initialize(template_name, options = {})
-		@buffer = ''
-		@template = ERB.new(File.read("#{TEMPLATES_DIR}/#{template_name}.html.erb"),
-			nil, nil, '@buffer')
-		options.each_pair do |name, value|
-			self[name] = value
-		end
-	end
-	
-	def []=(name, value)
-		instance_variable_set("@#{name}".to_sym, value)
-		return self
-	end
-	
-	def result
-		return @template.result(binding)
-	end
-
-private
-	include ERB::Util
-	
-	def get_binding
-		return binding
-	end
-	
-	def layout(template_name, options = {})
-		options.each_pair do |name, value|
-			self[name] = value
-		end
-		layout_template = ERB.new(File.read("#{TEMPLATES_DIR}/#{template_name}.html.erb"))
-		b = get_binding do
-			old_size = @buffer.size
-			yield
-			@buffer.slice!(old_size .. @buffer.size)
-		end
-		@buffer << layout_template.result(b)
-	end
-	
-	def include(filename)
-		return File.read("#{TEMPLATES_DIR}/#{filename}")
-	end
-	
-	def backtrace_html_for(error)
-		html = %Q{
-			<table class="backtrace">
-			<tr class="headers">
-				<th>#</th>
-				<th>File</th>
-				<th>Line</th>
-				<th>Location</th>
-			</tr>
-		}
-		in_passenger = false
-		error.backtrace.each_with_index do |item, i|
-			filename, line, location = item.split(':', 3)
-			in_passenger ||= starts_with(filename, "#{LIBDIR}/phusion_passenger")
-			class_names = in_passenger ? "passenger" : "framework"
-			class_names << ((i & 1 == 0) ? " uneven" : " even")
-			html << %Q{
-				<tr class="backtrace_line #{class_names}">
-					<td class="index">#{i}</td>
-					<td class="filename">#{filename}</td>
-					<td class="line">#{line}</td>
-					<td class="location">#{location}</td>
-				</tr>
-			}
-		end
-		html << "</table>\n"
-		return html
-	end
-	
-	def starts_with(str, substr)
-		return str[0 .. substr.size - 1] == substr
-	end
-end
-
-end # module PhusionPassenger
diff --git a/lib/phusion_passenger/loader_shared_helpers.rb b/lib/phusion_passenger/loader_shared_helpers.rb
new file mode 100644
index 0000000..43da7e2
--- /dev/null
+++ b/lib/phusion_passenger/loader_shared_helpers.rb
@@ -0,0 +1,323 @@
+# encoding: binary
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2011, 2012 Phusion
+#
+#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+#
+#  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
+#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#  THE SOFTWARE.
+
+require 'phusion_passenger/public_api'
+require 'phusion_passenger/debug_logging'
+
+module PhusionPassenger
+
+# Provides shared functions for loader and preloader apps.
+module LoaderSharedHelpers
+	extend self
+
+	# To be called by the (pre)loader as soon as possible.
+	def init
+		Thread.main[:name] = "Main thread"
+		# We don't dump PATH info because at this point it's
+		# unlikely to be changed.
+		dump_ruby_environment
+	end
+
+	# To be called whenever the (pre)loader is about to abort with an error.
+	def about_to_abort(exception = nil)
+		dump_all_information
+	end
+
+	def to_boolean(value)
+		return !(value.nil? || value == false || value == "false")
+	end
+	
+	def sanitize_spawn_options(options)
+		defaults = {
+			"app_type"         => "rack",
+			"environment"      => "production",
+			"print_exceptions" => true
+		}
+		options = defaults.merge(options)
+		options["app_group_name"]            = options["app_root"] if !options["app_group_name"]
+		options["print_exceptions"]          = to_boolean(options["print_exceptions"])
+		options["analytics"]                 = to_boolean(options["analytics"])
+		options["show_version_in_header"]    = to_boolean(options["show_version_in_header"])
+		options["log_level"]                 = options["log_level"].to_i if options["log_level"]
+		# TODO: smart spawning is not supported when using ruby-debug. We should raise an error
+		# in this case.
+		options["debugger"]     = to_boolean(options["debugger"])
+		options["spawn_method"] = "direct" if options["debugger"]
+		
+		return options
+	end
+
+	def dump_all_information
+		dump_ruby_environment
+		dump_envvars
+		dump_system_memory_stats
+	end
+
+	def dump_ruby_environment
+		if dir = ENV['PASSENGER_DEBUG_DIR']
+			File.open("#{dir}/ruby_info", "w") do |f|
+				f.puts "RUBY_VERSION = #{RUBY_VERSION}"
+				f.puts "RUBY_PLATFORM = #{RUBY_PLATFORM}"
+				f.puts "RUBY_ENGINE = #{defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'nil'}"
+			end
+			File.open("#{dir}/load_path", "wb") do |f|
+				$LOAD_PATH.each do |path|
+					f.puts path
+				end
+			end
+			File.open("#{dir}/loaded_libs", "wb") do |f|
+				$LOADED_FEATURES.each do |filename|
+					f.puts filename
+				end
+			end
+
+			# We write to these files last because the 'require' calls can fail.
+			require 'rbconfig' if !defined?(RbConfig::CONFIG)
+			File.open("#{dir}/rbconfig", "wb") do |f|
+				RbConfig::CONFIG.each_pair do |key, value|
+					f.puts "#{key} = #{value}"
+				end
+			end
+			require 'rubygems' if !defined?(Gem)
+			File.open("#{dir}/ruby_info", "a") do |f|
+				f.puts "RubyGems version = #{Gem::VERSION}"
+			end
+			File.open("#{dir}/activated_gems", "wb") do |f|
+				if Gem.respond_to?(:loaded_specs)
+					Gem.loaded_specs.each_pair do |name, spec|
+						f.puts "#{name} => #{spec.version}"
+					end
+				else
+					f.puts "Unable to query this information; incompatible RubyGems API."
+				end
+			end
+		end
+	rescue SystemCallError
+		# Don't care.
+	end
+
+	def dump_envvars
+		if dir = ENV['PASSENGER_DEBUG_DIR']
+			File.open("#{dir}/envvars", "wb") do |f|
+				ENV.each_pair do |key, value|
+					f.puts "#{key} = #{value}"
+				end
+			end
+		end
+	rescue SystemCallError
+		# Don't care.
+	end
+
+	def dump_system_memory_stats
+		if dir = ENV['PASSENGER_DEBUG_DIR']
+			File.open("#{dir}/sysmemory", "wb") do |f|
+				f.write(`"#{PhusionPassenger.helper_scripts_dir}/system-memory-stats.py"`)
+			end
+		end
+	rescue SystemCallError
+		# Don't care.
+	end
+	
+	# Prepare an application process using rules for the given spawn options.
+	# This method is to be called before loading the application code.
+	#
+	# +startup_file+ is the application type's startup file, e.g.
+	# "config/environment.rb" for Rails apps and "config.ru" for Rack apps.
+	# +options+ are the spawn options that were given.
+	#
+	# This function may modify +options+. The modified options are to be
+	# passed to the request handler.
+	def before_loading_app_code_step1(startup_file, options)
+		DebugLogging.log_level = options["log_level"] if options["log_level"]
+
+		# Instantiate the analytics logger if requested. Can be nil.
+		require 'phusion_passenger/analytics_logger'
+		options["analytics_logger"] = AnalyticsLogger.new_from_options(options)
+	end
+	
+	def run_load_path_setup_code(options)
+		# rack-preloader.rb depends on the 'rack' library, but the app
+		# might want us to use a bundled version instead of a
+		# gem/apt-get/yum/whatever-installed version. Therefore we must setup
+		# the correct load paths before requiring 'rack'.
+		#
+		# The most popular tool for bundling dependencies is Bundler. Bundler
+		# works as follows:
+		# - If the bundle is locked then a file .bundle/environment.rb exists
+		#   which will setup the load paths.
+		# - If the bundle is not locked then the load paths must be set up by
+		#   calling Bundler.setup.
+		# - Rails 3's boot.rb automatically loads .bundle/environment.rb or
+		#   calls Bundler.setup if that's not available.
+		# - Other Rack apps might not have a boot.rb but we still want to setup
+		#   Bundler.
+		# - Some Rails 2 apps might have explicitly added Bundler support.
+		#   These apps call Bundler.setup in their preinitializer.rb.
+		#
+		# So the strategy is as follows:
+		
+		# Our strategy might be completely unsuitable for the app or the
+		# developer is using something other than Bundler, so we let the user
+		# manually specify a load path setup file.
+		if options["load_path_setup_file"]
+			require File.expand_path(options["load_path_setup_file"])
+		
+		# The app developer may also override our strategy with this magic file.
+		elsif File.exist?('config/setup_load_paths.rb')
+			require File.expand_path('config/setup_load_paths')
+		
+		# If the Bundler lock environment file exists then load that. If it
+		# exists then there's a 99.9% chance that loading it is the correct
+		# thing to do.
+		elsif File.exist?('.bundle/environment.rb')
+			require File.expand_path('.bundle/environment')
+		
+		# If the Bundler environment file doesn't exist then there are two
+		# possibilities:
+		# 1. Bundler is not used, in which case we don't have to do anything.
+		# 2. Bundler *is* used, but the gems are not locked and we're supposed
+		#    to call Bundler.setup.
+		#
+		# The existence of Gemfile indicates whether (2) is true:
+		elsif File.exist?('Gemfile')
+			# In case of Rails 3, config/boot.rb already calls Bundler.setup.
+			# However older versions of Rails may not so loading boot.rb might
+			# not be the correct thing to do. To be on the safe side we
+			# call Bundler.setup ourselves; calling Bundler.setup twice is
+			# harmless. If this isn't the correct thing to do after all then
+			# there's always the load_path_setup_file option and
+			# setup_load_paths.rb.
+			require 'rubygems'
+			require 'bundler/setup'
+		end
+		
+		# Bundler might remove Phusion Passenger from the load path in its zealous
+		# attempt to un-require RubyGems, so here we put Phusion Passenger back
+		# into the load path. This must be done before loading the app's startup
+		# file because the app might require() Phusion Passenger files.
+		if !$LOAD_PATH.include?(PhusionPassenger.ruby_libdir)
+			$LOAD_PATH.unshift(PhusionPassenger.ruby_libdir)
+			$LOAD_PATH.uniq!
+		end
+		
+		
+		# !!! NOTE !!!
+		# If the app is using Bundler then any dependencies required past this
+		# point must be specified in the Gemfile. Like ruby-debug if debugging is on...
+	end
+	
+	def before_loading_app_code_step2(options)
+		# Do nothing.
+	end
+	
+	# This method is to be called after loading the application code but
+	# before forking a worker process.
+	def after_loading_app_code(options)
+		# Even though run_load_path_setup_code() restores the Phusion Passenger
+		# load path after setting up Bundler, the app itself might also
+		# remove Phusion Passenger from the load path for whatever reason,
+		# so here we restore the load path again.
+		if !$LOAD_PATH.include?(PhusionPassenger.ruby_libdir)
+			$LOAD_PATH.unshift(PhusionPassenger.ruby_libdir)
+			$LOAD_PATH.uniq!
+		end
+		
+		# Post-install framework extensions. Possibly preceded by a call to
+		# PhusionPassenger.install_framework_extensions!
+		if defined?(::Rails) && !defined?(::Rails::VERSION)
+			require 'rails/version'
+		end
+	end
+	
+	def create_socket_address(protocol, address)
+		if protocol == 'unix'
+			return "unix:#{address}"
+		elsif protocol == 'tcp'
+			return "tcp://#{address}"
+		else
+			raise ArgumentError, "Unknown protocol '#{protocol}'"
+		end
+	end
+	
+	def advertise_sockets(output, request_handler)
+		request_handler.server_sockets.each_pair do |name, options|
+			output.puts "!> socket: #{name};#{options[:address]};#{options[:protocol]};#{options[:concurrency]}"
+		end
+	end
+	
+	# To be called before the request handler main loop is entered, but after the app
+	# startup file has been loaded. This function will fire off necessary events
+	# and perform necessary preparation tasks.
+	#
+	# +forked+ indicates whether the current worker process is forked off from
+	# an ApplicationSpawner that has preloaded the app code.
+	# +options+ are the spawn options that were passed.
+	def before_handling_requests(forked, options)
+		if forked
+			# Reseed pseudo-random number generator for security reasons.
+			srand
+		end
+
+		if options["process_title"] && !options["process_title"].empty?
+			$0 = options["process_title"] + ": " + options["app_group_name"]
+		end
+
+		if forked && options["analytics_logger"]
+			options["analytics_logger"].clear_connection
+		end
+		
+		# If we were forked from a preloader process then clear or
+		# re-establish ActiveRecord database connections. This prevents
+		# child processes from concurrently accessing the same
+		# database connection handles.
+		if forked && defined?(ActiveRecord::Base)
+			if ActiveRecord::Base.respond_to?(:clear_all_connections!)
+				ActiveRecord::Base.clear_all_connections!
+			elsif ActiveRecord::Base.respond_to?(:clear_active_connections!)
+				ActiveRecord::Base.clear_active_connections!
+			elsif ActiveRecord::Base.respond_to?(:connected?) &&
+			      ActiveRecord::Base.connected?
+				ActiveRecord::Base.establish_connection
+			end
+		end
+		
+		# Fire off events.
+		PhusionPassenger.call_event(:starting_worker_process, forked)
+		if options["pool_account_username"] && options["pool_account_password_base64"]
+			password = options["pool_account_password_base64"].unpack('m').first
+			PhusionPassenger.call_event(:credentials,
+				options["pool_account_username"], password)
+		else
+			PhusionPassenger.call_event(:credentials, nil, nil)
+		end
+	end
+	
+	# To be called after the request handler main loop is exited. This function
+	# will fire off necessary events perform necessary cleanup tasks.
+	def after_handling_requests
+		PhusionPassenger.call_event(:stopping_worker_process)
+	end
+end
+
+end # module PhusionPassenger
diff --git a/lib/phusion_passenger/message_channel.rb b/lib/phusion_passenger/message_channel.rb
index a9830f3..c267b06 100644
--- a/lib/phusion_passenger/message_channel.rb
+++ b/lib/phusion_passenger/message_channel.rb
@@ -1,5 +1,5 @@
 # encoding: binary
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -24,53 +24,9 @@
 
 module PhusionPassenger
 
-# This class provides convenience methods for:
-# - sending and receiving raw data over an IO channel.
-# - sending and receiving messages over an IO channel.
-# - file descriptor (IO object) passing over a Unix socket.
-# All of these methods use exceptions for error reporting.
-#
-# There are two kinds of messages:
-# [ Array messages ]
-#   These are just a list of strings, and the message
-#   itself has a specific length. The contained strings may not
-#   contain NUL characters (<tt>'\\0'</tt>). Note that an array message
-#   must have at least one element.
-# [ Scalar messages ]
-#   These are byte strings which may contain arbitrary
-#   binary data. Scalar messages also have a specific length.
-#
-# The protocol is designed to be low overhead, easy to implement and
-# easy to parse.
-#
-# MessageChannel is to be wrapped around an IO object. For example:
-#
-#  a, b = IO.pipe
-#  channel1 = MessageChannel.new(a)
-#  channel2 = MessageChannel.new(b)
-#  
-#  # Send an array message.
-#  channel2.write("hello", "world !!")
-#  channel1.read    # => ["hello", "world !!"]
-#  
-#  # Send a scalar message.
-#  channel2.write_scalar("some long string which can contain arbitrary binary data")
-#  channel1.read_scalar
-#
-# The life time of a MessageChannel is independent from that of the
-# wrapped IO object. If a MessageChannel object is destroyed,
-# the underlying IO object is not automatically closed. Call close()
-# if you want to close the underlying IO object.
-#
-# Note:
-# Be careful with mixing the sending/receiving of array messages,
-# scalar messages and IO objects. If you send a collection of any
-# of these in a specific order, then the receiving side must receive them
-# in the exact some order. So suppose you first send a message, then an
-# IO object, then a scalar, then the receiving side must first
-# receive a message, then an IO object, then a scalar. If the
-# receiving side does things in the wrong order then bad things will
-# happen.
+# This class allows reading and writing structured messages over
+# I/O channels. This is the Ruby implementation of ext/common/Utils/MessageIO.h;
+# see that file for more information.
 class MessageChannel
 	HEADER_SIZE = 2                  # :nodoc:
 	DELIMITER = "\0"                 # :nodoc:
diff --git a/lib/phusion_passenger/message_client.rb b/lib/phusion_passenger/message_client.rb
index 54c826b..960283d 100644
--- a/lib/phusion_passenger/message_client.rb
+++ b/lib/phusion_passenger/message_client.rb
@@ -1,5 +1,5 @@
 # encoding: binary
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -74,10 +74,21 @@ class MessageClient
 		return !!@channel
 	end
 	
-	### ApplicationPool::Server methods ###
+	### HelperAgent methods ###
 	
-	def detach(detach_key)
-		write("detach", detach_key)
+	def pool_detach_process(pid)
+		write("detach_process", pid)
+		check_security_response
+		result = read
+		if result.nil?
+			raise EOFError
+		else
+			return result.first == "true"
+		end
+	end
+
+	def pool_detach_process_by_key(detach_key)
+		write("detach_process_by_key", detach_key)
 		check_security_response
 		result = read
 		if result.nil?
@@ -87,8 +98,8 @@ class MessageClient
 		end
 	end
 	
-	def status
-		write("inspect")
+	def pool_status(options = {})
+		write("inspect", *options.to_a.flatten)
 		check_security_response
 		return read_scalar
 	rescue
@@ -96,19 +107,33 @@ class MessageClient
 		raise
 	end
 	
-	def xml
+	def pool_xml
 		write("toXml", true)
 		check_security_response
 		return read_scalar
 	end
 	
-	### BacktracesServer methods ###
+	def helper_agent_requests
+		write("requests")
+		check_security_response
+		return read_scalar
+	end
+
+	### HelperAgent BacktracesServer methods ###
 	
-	def backtraces
+	def helper_agent_backtraces
 		write("backtraces")
 		check_security_response
 		return read_scalar
 	end
+
+	### LoggingAgent AdminServer methods ###
+	
+	def logging_agent_status
+		write("status")
+		check_security_response
+		return read_scalar
+	end
 	
 	### Low level I/O methods ###
 	
diff --git a/lib/phusion_passenger/native_support.rb b/lib/phusion_passenger/native_support.rb
index f1edf1c..326e3b3 100644
--- a/lib/phusion_passenger/native_support.rb
+++ b/lib/phusion_passenger/native_support.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -30,9 +30,10 @@ class NativeSupportLoader
 	
 	def start
 		require 'phusion_passenger'
-		load_from_source_dir ||
+		load_from_native_support_output_dir ||
+		load_from_source_root ||
 		load_from_load_path ||
-		load_from_home ||
+		load_from_home_dir ||
 		compile_and_load
 	end
 
@@ -40,7 +41,7 @@ private
 	def archdir
 		@archdir ||= begin
 			require 'phusion_passenger/platform_info/binary_compatibility'
-			PlatformInfo.ruby_extension_binary_compatibility_ids.join("-")
+			PlatformInfo.ruby_extension_binary_compatibility_id
 		end
 	end
 	
@@ -63,13 +64,38 @@ private
 	end
 	
 	def extconf_rb
-		File.join(SOURCE_ROOT, "ext", "ruby", "extconf.rb")
+		File.join(PhusionPassenger.ruby_extension_source_dir, "extconf.rb")
 	end
 	
-	def load_from_source_dir
-		if defined?(NATIVE_SUPPORT_DIR)
+	def native_support_dir_in_source_root
+		if PhusionPassenger.originally_packaged?
+			@native_support_dir_in_source_root ||=
+				File.expand_path("#{PhusionPassenger.source_root}/buildout/ruby")
+		else
+			return nil
+		end
+	end
+
+	def load_from_native_support_output_dir
+		# Quick workaround for people suffering from
+		# https://code.google.com/p/phusion-passenger/issues/detail?id=865
+		output_dir = ENV['PASSENGER_NATIVE_SUPPORT_OUTPUT_DIR']
+		if output_dir && !output_dir.empty?
+			begin
+				require "#{output_dir}/#{VERSION_STRING}/#{archdir}/#{library_name}"
+				return true
+			rescue LoadError
+				return false
+			end
+		else
+			return false
+		end
+	end
+	
+	def load_from_source_root
+		if PhusionPassenger.originally_packaged?
 			begin
-				require "#{NATIVE_SUPPORT_DIR}/#{archdir}/#{library_name}"
+				require "#{native_support_dir_in_source_root}/#{archdir}/#{library_name}"
 				return true
 			rescue LoadError
 				return false
@@ -86,9 +112,9 @@ private
 		return false
 	end
 	
-	def load_from_home
+	def load_from_home_dir
 		begin
-			require "#{home}/#{LOCAL_DIR}/native_support/#{VERSION_STRING}/#{archdir}/#{library_name}"
+			require "#{home}/#{USER_NAMESPACE_DIRNAME}/native_support/#{VERSION_STRING}/#{archdir}/#{library_name}"
 			return true
 		rescue LoadError
 			return false
@@ -98,18 +124,25 @@ private
 	def compile_and_load
 		STDERR.puts "*** Phusion Passenger: no #{library_name} found for " +
 			"the current Ruby interpreter. Compiling one..."
-		
+
 		require 'fileutils'
 		require 'phusion_passenger/platform_info/ruby'
 		
 		target_dirs = []
-		if defined?(NATIVE_SUPPORT_DIR)
-			target_dirs << "#{NATIVE_SUPPORT_DIR}/#{archdir}"
+		if (output_dir = ENV['PASSENGER_NATIVE_SUPPORT_OUTPUT_DIR']) && !output_dir.empty?
+			target_dirs << "#{output_dir}/#{VERSION_STRING}/#{archdir}"
 		end
-		target_dirs << "#{home}/#{LOCAL_DIR}/native_support/#{VERSION_STRING}/#{archdir}"
+		if native_support_dir_in_source_root
+			target_dirs << "#{native_support_dir_in_source_root}/#{archdir}"
+		end
+		target_dirs << "#{home}/#{USER_NAMESPACE_DIRNAME}/native_support/#{VERSION_STRING}/#{archdir}"
 		
 		target_dir = compile(target_dirs)
-		require "#{target_dir}/#{library_name}"
+		if target_dir
+			require "#{target_dir}/#{library_name}"
+		else
+			STDERR.puts "Ruby native_support extension not loaded. Continuing without native_support."
+		end
 	end
 	
 	def mkdir(dir)
@@ -121,11 +154,15 @@ private
 	end
 	
 	def sh(*args)
+		if !sh_nonfatal(*args)
+			raise "Could not compile #{library_name} (\"#{command_string}\" failed)"
+		end
+	end
+
+	def sh_nonfatal(*args)
 		command_string = args.join(' ')
 		STDERR.puts "# #{command_string}"
-		if !system(*args)
-			raise "Could not compile #{library_name} ('#{command_string}' failed)"
-		end
+		return system(*args)
 	end
 	
 	def compile(target_dirs)
@@ -137,26 +174,51 @@ private
 				File.unlink("#{target_dir}/.permission_test")
 				STDERR.puts "# cd #{target_dir}"
 				Dir.chdir(target_dir) do
-					sh("#{PlatformInfo.ruby_command} '#{extconf_rb}'")
-					sh("make")
+					result =
+						sh_nonfatal("#{PlatformInfo.ruby_command} '#{extconf_rb}'") &&
+						sh_nonfatal("make")
+					if result
+						STDERR.puts "Compilation succesful."
+						STDERR.puts "-------------------------------"
+						return target_dir
+					else
+						STDERR.puts "Compilation failed."
+						STDERR.puts "-------------------------------"
+						return nil
+					end
 				end
-				result = target_dir
-				break
 			rescue Errno::EACCES
 				# If we encountered a permission error, then try
 				# the next target directory. If we get a permission
 				# error on the last one too then propagate the
 				# exception.
 				if i == target_dirs.size - 1
-					raise
+					STDERR.puts "Encountered permission error, " +
+						"but no more directories to try. Giving up."
+					STDERR.puts "-------------------------------"
+					return nil
 				else
 					STDERR.puts "Encountered permission error, " +
 						"trying a different directory..."
 					STDERR.puts "-------------------------------"
 				end
+			rescue Errno::ENOTDIR
+				# This can occur when PhusionPassenger.source_root
+				# is a location configuration file, and natively_packaged
+				# is set to false. For example, when we're running
+				# in Phusion Passenger Standalone. In this case
+				# just ignore this directory.
+				if i == target_dirs.size - 1
+					STDERR.puts "Encountered permission error, " +
+						"but no more directories to try. Giving up."
+					STDERR.puts "-------------------------------"
+					return nil
+				else
+					STDERR.puts "Not a valid directory. Trying a different one..."
+					STDERR.puts "-------------------------------"
+				end
 			end
 		end
-		return result
 	end
 end
 
diff --git a/lib/phusion_passenger/packaging.rb b/lib/phusion_passenger/packaging.rb
index 000eece..c9555f2 100644
--- a/lib/phusion_passenger/packaging.rb
+++ b/lib/phusion_passenger/packaging.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010, 2011, 2012 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -32,6 +32,12 @@ module Packaging
 		'doc/Security of user switching support.html',
 		'doc/Architectural overview.html'
 	]
+
+	# Files that must be generated before packaging.
+	PREGENERATED_FILES = [
+		'ext/common/Constants.h',
+		'doc/Packaging.html'
+	] + ASCII_DOCS
 	
 	USER_EXECUTABLES = [
 		'passenger',
@@ -42,68 +48,79 @@ module Packaging
 	
 	SUPER_USER_EXECUTABLES = [
 		'passenger-status',
-		'passenger-memory-stats',
-		'passenger-make-enterprisey'
+		'passenger-memory-stats'
 	]
 	
 	# A list of globs which match all files that should be packaged
 	# in the Phusion Passenger gem or tarball.
 	GLOB = [
+		'.travis.yml',
 		'configure',
 		'Rakefile',
-		'README',
-		'DEVELOPERS.TXT',
-		'PACKAGING.TXT',
+		'README.md',
+		'CONTRIBUTORS',
+		'CONTRIBUTING.md',
 		'LICENSE',
-		'INSTALL',
+		'INSTALL.md',
 		'NEWS',
+		'passenger.gemspec',
 		'build/*.rb',
 		'lib/*.rb',
 		'lib/**/*.rb',
 		'lib/**/*.py',
-		'lib/phusion_passenger/templates/*',
-		'lib/phusion_passenger/templates/apache2/*',
-		'lib/phusion_passenger/templates/nginx/*',
-		'lib/phusion_passenger/templates/standalone/*',
-		'lib/phusion_passenger/templates/standalone_default_root/*',
 		'bin/*',
 		'doc/**/*',
 		'man/*',
-		'debian/*',
+		'debian.template/**/*',
 		'helper-scripts/*',
-		'ext/common/**/*.{cpp,c,h,hpp}',
+		'ext/common/**/*.{cpp,c,h,hpp,md,erb}',
 		'ext/apache2/*.{cpp,h,hpp,c}',
 		'ext/nginx/*.{c,cpp,h}',
 		'ext/nginx/config',
 		'ext/boost/**/*',
-		'ext/google/**/*',
 		'ext/libev/{LICENSE,Changes,README,Makefile.am,Makefile.in}',
 		'ext/libev/{*.m4,autogen.sh,config.guess,config.h.in,config.sub}',
-		'ext/libev/{configure,configure.ac,install-sh,ltmain.sh,missing,mkinstalldirs}',
+		'ext/libev/{configure,configure.ac,depcomp,install-sh,ltmain.sh,missing,mkinstalldirs}',
 		'ext/libev/{*.h,*.c}',
+		'ext/libeio/{LICENSE,Changes,README,Makefile.am,Makefile.in}',
+		'ext/libeio/{*.m4,autogen.sh,config.guess,config.h.in,config.sub}',
+		'ext/libeio/{configure,configure.ac,install-sh,ltmain.sh,missing,mkinstalldirs}',
+		'ext/libeio/{*.h,*.c}',
 		'ext/oxt/*.hpp',
 		'ext/oxt/*.cpp',
 		'ext/oxt/detail/*.hpp',
 		'ext/ruby/*.{c,rb}',
 		'dev/*',
-		'resources/*',
+		'resources/**/*',
+		'test/.rspec',
 		'test/*.example',
+		'test/*.travis',
 		'test/support/*.{c,cpp,h,rb}',
 		'test/tut/*',
-		'test/cxx/*.{cpp,h}',
+		'test/cxx/**/*.{cpp,h}',
 		'test/oxt/*.{cpp,hpp}',
 		'test/ruby/**/*',
 		'test/integration_tests/**/*',
 		'test/stub/**/*'
-	
-	# If you're running 'rake package' for the first time, then ASCII_DOCS
-	# files don't exist yet, and so won't be matched by the glob.
-	# So we add these filenames manually.
-	] + ASCII_DOCS
+	]
 	
 	EXCLUDE_GLOB = [
-		'test/stub/rails_apps/3.0/empty/help/**/*'
+		'test/stub/rails_apps/3.0/empty/help/**/*',
+		'test/stub/*.dSYM'
 	]
+
+	# Files that should be excluded from the Debian tarball.
+	DEBIAN_EXCLUDE_GLOB = [
+		"debian.template/**/*",
+	]
+
+	def self.files
+		return Dir[*GLOB] - Dir[*EXCLUDE_GLOB]
+	end
+
+	def self.debian_orig_tarball_files
+		return files - Dir[*DEBIAN_EXCLUDE_GLOB]
+	end
 end
 
 end # module PhusionPassenger
diff --git a/lib/phusion_passenger/platform_info.rb b/lib/phusion_passenger/platform_info.rb
index f7c302a..5d2c093 100644
--- a/lib/phusion_passenger/platform_info.rb
+++ b/lib/phusion_passenger/platform_info.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -21,6 +21,8 @@
 #  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #  THE SOFTWARE.
 
+require 'phusion_passenger/utils/tmpio'
+
 module PhusionPassenger
 
 # This module autodetects various platform-specific information, and
@@ -28,9 +30,11 @@ module PhusionPassenger
 module PlatformInfo
 private
 	@@cache_dir = nil
-	
-	def self.cache_dir=(value)
-		@@cache_dir = value
+	@@verbose   = ['1', 'true', 'on', 'yes'].include?(ENV['VERBOSE'])
+	@@log_implementation = lambda do |message|
+		message = reindent(message, 3)
+		message.sub!(/^   /, '')
+		STDERR.puts " * #{message}"
 	end
 	
 	def self.private_class_method(name)
@@ -128,37 +132,96 @@ private
 		return nil
 	end
 	private_class_method :select_executable
-	
-	def self.read_file(filename)
-		return File.read(filename)
-	rescue
-		return ""
+
+	def self.unindent(str)
+		str = str.dup
+		str.gsub!(/\A([\s\t]*\n)+/, '')
+		str.gsub!(/[\s\t\n]+\Z/, '')
+		indent = str.split("\n").select{ |line| !line.strip.empty? }.map{ |line| line.index(/[^\s]/) }.compact.min || 0
+		str.gsub!(/^[[:blank:]]{#{indent}}/, '')
+		return str
 	end
-	private_class_method :read_file
+	private_class_method :unindent
 
-public
-	class RuntimeError < ::RuntimeError
+	def self.reindent(str, level)
+		str = unindent(str)
+		str.gsub!(/^/, ' ' * level)
+		return str
 	end
-	
-	# Check whether the specified command is in $PATH, and return its
-	# absolute filename. Returns nil if the command is not found.
-	#
-	# This function exists because system('which') doesn't always behave
-	# correctly, for some weird reason.
-	def self.find_command(name)
-		name = name.to_s
-		ENV['PATH'].to_s.split(File::PATH_SEPARATOR).detect do |directory|
-			path = File.join(directory, name)
-			if File.file?(path) && File.executable?(path)
-				return path
+	private_class_method :reindent
+
+	def self.create_temp_file(name, dir = tmpdir)
+		# This function is mostly used for compiling C programs to autodetect
+		# system properties. We create a secure temp subdirectory to prevent
+		# TOCTU attacks, especially because we don't know how the compiler
+		# handles this.
+		PhusionPassenger::Utils.mktmpdir("passenger.", dir) do |subdir|
+			filename = "#{subdir}/#{name}"
+			f = File.open(filename, "w")
+			begin
+				yield(filename, f)
+			ensure
+				f.close if !f.closed?
 			end
 		end
-		return nil
 	end
-	
+	private_class_method :create_temp_file
+
+	def self.log(message)
+		if verbose?
+			@@log_implementation.call(message)
+		end
+	end
+	private_class_method :log
+
+public
+	class RuntimeError < ::RuntimeError
+	end
+
+
+	def self.cache_dir=(value)
+		@@cache_dir = value
+	end
+
+	def self.cache_dir
+		return @@cache_dir
+	end
+
+	def self.verbose=(val)
+		@@verbose = val
+	end
+
+	def self.verbose?
+		return @@verbose
+	end
+
+	def self.log_implementation=(impl)
+		@@log_implementation = impl
+	end
+
+	def self.log_implementation
+		return @@log_implementation
+	end
+
+
 	def self.env_defined?(name)
 		return !ENV[name].nil? && !ENV[name].empty?
 	end
+
+	def self.string_env(name, default_value = nil)
+		value = ENV[name]
+		if value.nil? || value.empty?
+			return default_value
+		else
+			return value
+		end
+	end
+
+	def self.read_file(filename)
+		return File.read(filename)
+	rescue
+		return ""
+	end
 	
 	def self.tmpdir
 		result = ENV['TMPDIR']
@@ -182,9 +245,11 @@ public
 		dir = tmpdir
 		filename = "#{dir}/#{basename}"
 		begin
-			File.open(filename, 'w').close
+			File.open(filename, 'w') do |f|
+				f.puts("#!/bin/sh")
+			end
 			File.chmod(0700, filename)
-			if File.executable?(filename)
+			if system(filename)
 				return dir
 			else
 				attempts << { :dir => dir,
@@ -203,9 +268,11 @@ public
 		dir = Dir.pwd
 		filename = "#{dir}/#{basename}"
 		begin
-			File.open(filename, 'w').close
+			File.open(filename, 'w') do |f|
+				f.puts("#!/bin/sh")
+			end
 			File.chmod(0700, filename)
-			if File.executable?(filename)
+			if system(filename)
 				return dir
 			else
 				attempts << { :dir => dir,
@@ -221,7 +288,8 @@ public
 			File.unlink(filename) rescue nil
 		end
 		
-		message = "In order to run certain tests, this program " +
+		message = "ERROR: Cannot find suitable temporary directory\n" +
+			"In order to run certain tests, this program " +
 			"must be able to write temporary\n" +
 			"executable files to some directory. However no such " +
 			"directory can be found. \n" +
@@ -231,7 +299,7 @@ public
 			message << "   #{attempt[:error]}\n"
 		end
 		message << "\nYou can solve this problem by telling this program what directory to write\n" <<
-			"temporary executable files to.\n" <<
+			"temporary executable files to, as follows:\n" <<
 			"\n" <<
 			"  Set the $TMPDIR environment variable to the desired directory's filename and\n" <<
 			"  re-run this program.\n" <<
@@ -246,103 +314,47 @@ public
 		raise RuntimeError, message
 	end
 	memoize :tmpexedir
-	
-	def self.cc
-		return ENV['CC'] || "gcc"
-	end
-	
-	def self.cxx
-		return ENV['CXX'] || "g++"
-	end
-	
-	def self.try_compile(language, source, flags = nil)
-		if language == :c
-			compiler = cc
-		elsif language == :cxx
-			compiler = cxx
-		else
-			raise ArgumentError,"Unsupported language '#{language}'"
-		end
-		filename = File.join("#{tmpexedir}/passenger-compile-check-#{Process.pid}.c")
-		File.open(filename, "w") do |f|
-			f.puts(source)
-		end
-		begin
-			return system("(#{compiler} #{flags} -c '#{filename}' -o '#{filename}.o') >/dev/null 2>/dev/null")
-		ensure
-			File.unlink(filename) rescue nil
-			File.unlink("#{filename}.o") rescue nil
-		end
-	end
-	private_class_method :try_compile
-	
-	def self.try_link(language, source, flags = nil)
-		if language == :c
-			compiler = cc
-		elsif language == :cxx
-			compiler = cxx
+
+	def self.rb_config
+		if defined?(::RbConfig)
+			return ::RbConfig::CONFIG
 		else
-			raise ArgumentError,"Unsupported language '#{language}'"
-		end
-		filename = File.join("#{tmpexedir}/passenger-link-check-#{Process.pid}.c")
-		File.open(filename, "w") do |f|
-			f.puts(source)
-		end
-		begin
-			return system("(#{compiler} #{flags} '#{filename}' -o '#{filename}.out') >/dev/null 2>/dev/null")
-		ensure
-			File.unlink(filename) rescue nil
-			File.unlink("#{filename}.out") rescue nil
+			return ::Config::CONFIG
 		end
 	end
-	private_class_method :try_link
-	
-	def self.try_compile_and_run(language, source, flags = nil)
-		if language == :c
-			compiler = cc
-		elsif language == :cxx
-			compiler = cxx
-		else
-			raise ArgumentError,"Unsupported language '#{language}'"
-		end
-		filename = File.join("#{tmpexedir}/passenger-compile-check-#{Process.pid}.c")
-		File.open(filename, "w") do |f|
-			f.puts(source)
+
+	# Check whether the specified command is in $PATH, and return its
+	# absolute filename. Returns nil if the command is not found.
+	#
+	# This function exists because system('which') doesn't always behave
+	# correctly, for some weird reason.
+	#
+	# When `is_executable` is true, this function checks whether
+	# there is an executable named `name` in $PATH. When false, it
+	# assumes that `name` is not an executable name but a command string
+	# (e.g. "ccache gcc"). It then infers the executable name ("ccache")
+	# from the command string, and checks for that instead.
+	def self.find_command(name, is_executable = true)
+		name = name.to_s
+		if !is_executable && name =~ / /
+			name = name.sub(/ .*/, '')
 		end
-		begin
-			if system("(#{compiler} #{flags} '#{filename}' -o '#{filename}.out') >/dev/null 2>/dev/null")
-				if Process.respond_to?(:spawn)
-					pid = Process.spawn("#{filename}.out",
-						:out => ["/dev/null", "w"],
-						:err => ["/dev/null", "w"])
-					
-				else
-					pid = fork do
-						STDOUT.reopen("/dev/null", "w")
-						STDERR.reopen("/dev/null", "w")
-						exec("#{filename}.out")
-					end
-				end
-				pid = Process.waitpid(pid) rescue nil
-				return pid && $?.exitstatus == 0
+		if name =~ /^\//
+			if File.executable?(name)
+				return name
 			else
-				return false
+				return nil
 			end
-		ensure
-			File.unlink(filename) rescue nil
-			File.unlink("#{filename}.out") rescue nil
-		end
-	end
-	private_class_method :try_compile_and_run
-
-	def self.rb_config
-		if defined?(::RbConfig)
-			return ::RbConfig::CONFIG
 		else
-			return ::Config::CONFIG
+			ENV['PATH'].to_s.split(File::PATH_SEPARATOR).detect do |directory|
+				path = File.join(directory, name)
+				if File.file?(path) && File.executable?(path)
+					return path
+				end
+			end
+			return nil
 		end
 	end
-	private_class_method :rb_config
 end
 
 end # module PhusionPassenger
diff --git a/lib/phusion_passenger/platform_info/apache.rb b/lib/phusion_passenger/platform_info/apache.rb
index f2a106a..a01eecc 100644
--- a/lib/phusion_passenger/platform_info/apache.rb
+++ b/lib/phusion_passenger/platform_info/apache.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010, 2011, 2012 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -174,12 +174,6 @@ module PlatformInfo
 	# Also includes APR and APU compiler flags if with_apr_flags is true.
 	def self.apache2_module_cflags(with_apr_flags = true)
 		flags = ["-fPIC"]
-		if compiler_supports_visibility_flag?
-			flags << "-fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED"
-			if compiler_visibility_flag_generates_warnings? && compiler_supports_wno_attributes_flag?
-				flags << "-Wno-attributes"
-			end
-		end
 		if with_apr_flags
 			flags << apr_flags
 			flags << apu_flags
@@ -285,16 +279,8 @@ module PlatformInfo
 	# headers are placed into the same directory as the Apache headers,
 	# and so 'apr-config' and 'apu-config' won't be necessary in that case.
 	def self.apr_config_needed_for_building_apache_modules?
-		filename = File.join("#{tmpexedir}/passenger-platform-check-#{Process.pid}.c")
-		File.open(filename, "w") do |f|
-			f.puts("#include <apr.h>")
-		end
-		begin
-			return !system("(gcc #{apache2_module_cflags(false)} -c '#{filename}' -o '#{filename}.o') >/dev/null 2>/dev/null")
-		ensure
-			File.unlink(filename) rescue nil
-			File.unlink("#{filename}.o") rescue nil
-		end
+		return !try_compile("whether APR is needed for building Apache modules",
+			:c, "#include <apr.h>\n", apache2_module_cflags(false))
 	end
 	memoize :apr_config_needed_for_building_apache_modules?
 
@@ -350,4 +336,4 @@ private
 	private_class_method :determine_apu_info
 end
 
-end
\ No newline at end of file
+end
diff --git a/lib/phusion_passenger/platform_info/binary_compatibility.rb b/lib/phusion_passenger/platform_info/binary_compatibility.rb
index 4bf4f8e..6ce6865 100644
--- a/lib/phusion_passenger/platform_info/binary_compatibility.rb
+++ b/lib/phusion_passenger/platform_info/binary_compatibility.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -29,13 +29,13 @@ require 'phusion_passenger/platform_info/operating_system'
 module PhusionPassenger
 
 module PlatformInfo
-	# Returns an array of identifiers that describe the current Ruby
+	# Returns a string that describes the current Ruby
 	# interpreter's extension binary compatibility. A Ruby extension
 	# compiled for a certain Ruby interpreter can also be loaded on
 	# a different Ruby interpreter with the same binary compatibility
-	# identifiers.
+	# identifier.
 	#
-	# The identifiers depend on the following factors:
+	# The result depends on the following factors:
 	# - Ruby engine name.
 	# - Ruby extension version.
 	#   This is not the same as the Ruby language version, which
@@ -56,40 +56,47 @@ module PlatformInfo
 	#   because extensions must be able to support all of the Ruby
 	#   executable's architectures.
 	# - The operating system for which the Ruby interpreter was compiled.
-	def self.ruby_extension_binary_compatibility_ids
+	def self.ruby_extension_binary_compatibility_id
 		ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
 		ruby_ext_version = RUBY_VERSION
 		if RUBY_PLATFORM =~ /darwin/
 			if RUBY_PLATFORM =~ /universal/
 				ruby_arch = "universal"
 			else
-				# Something like:
-				# "/opt/ruby-enterprise/bin/ruby: Mach-O 64-bit executable x86_64"
-				ruby_arch = `file -L "#{ruby_executable}"`.strip
-				ruby_arch.sub!(/.* /, '')
+				# OS X <  10.8: something like:
+				#   "/opt/ruby-enterprise/bin/ruby: Mach-O 64-bit executable x86_64"
+				output = `file -L "#{ruby_executable}"`.strip
+				ruby_arch = output.sub(/.* /, '')
+				if ruby_arch == "executable"
+					# OS X >= 10.8: something like:
+					#   "/opt/ruby-enterprise/bin/ruby: Mach-O 64-bit executable"
+					if output =~ /Mach-O 64-bit/
+						ruby_arch = "x86_64"
+					else
+						raise "Cannot autodetect the Ruby interpreter's architecture"
+					end
+				end
 			end
 		elsif RUBY_PLATFORM == "java"
 			ruby_arch = "java"
 		else
 			ruby_arch = cpu_architectures[0]
 		end
-		return [ruby_engine, ruby_ext_version, ruby_arch, os_name]
+		return "#{ruby_engine}-#{ruby_ext_version}-#{ruby_arch}-#{os_name}"
 	end
-	memoize :ruby_extension_binary_compatibility_ids
+	memoize :ruby_extension_binary_compatibility_id
 	
 	# Returns an identifier string that describes the current
-	# platform's binary compatibility with regard to Phusion Passenger
-	# binaries, both the Ruby extension and the C++ binaries. Two
-	# systems with the same binary compatibility identifiers
-	# are able to run the same Phusion Passenger binaries.
+	# platform's binary compatibility with regard to C/C++
+	# binaries. Two systems with the same binary compatibility
+	# identifiers should be able to run the same C/C++ binaries.
 	#
 	# The the string depends on the following factors:
-	# - The Ruby extension binary compatibility identifiers.
 	# - The operating system name.
 	# - Operating system runtime identifier.
 	#   This may include the kernel version, libc version, C++ ABI version,
 	#   etc. Everything that is of interest for binary compatibility with
-	#   Phusion Passenger's C++ components.
+	#   regard to C/C++ binaries.
 	# - Operating system default runtime architecture.
 	#   This is not the same as the CPU architecture; some CPUs support
 	#   multiple architectures, e.g. Intel Core 2 Duo supports x86 and
@@ -100,10 +107,7 @@ module PlatformInfo
 	#   This component identifies the architecture that is used when
 	#   compiling a binary with the system's C++ compiler with its default
 	#   options.
-	def self.passenger_binary_compatibility_id
-		ruby_engine, ruby_ext_version, ruby_arch, os_name =
-			ruby_extension_binary_compatibility_ids
-		
+	def self.cxx_binary_compatibility_id
 		if os_name == "macosx"
 			# RUBY_PLATFORM gives us the kernel version, but we want
 			# the OS X version.
@@ -124,52 +128,12 @@ module PlatformInfo
 			end
 		else
 			os_arch = cpu_architectures[0]
-			
-			cpp = find_command('cpp')
-			if cpp
-				macros = `#{cpp} -dM < /dev/null`
-				
-				# Can be something like "4.3.2"
-				# or "4.2.1 20070719 (FreeBSD)"
-				macros =~ /__VERSION__ "(.+)"/
-				compiler_version = $1
-				compiler_version.gsub!(/ .*/, '') if compiler_version
-				
-				macros =~ /__GXX_ABI_VERSION (.+)$/
-				cxx_abi_version = $1
-			else
-				compiler_version = nil
-				cxx_abi_version = nil
-			end
-			
-			if compiler_version && cxx_abi_version
-				os_runtime = "gcc#{compiler_version}-#{cxx_abi_version}"
-			else
-				os_runtime = [compiler_version, cxx_abi_version].compact.join("-")
-				if os_runtime.empty?
-					os_runtime = `uname -r`.strip
-				end
-			end
+			os_runtime = nil
 		end
 		
-		if ruby_engine == "jruby"
-			# For JRuby it's kinda useless to prepend "java" as extension
-			# architecture because JRuby doesn't allow any other extension
-			# architecture.
-			identifier = ""
-		else
-			identifier = "#{ruby_arch}-"
-		end
-		identifier << "#{ruby_engine}#{ruby_ext_version}-"
-		# If the extension architecture is the same as the OS architecture
-		# then there's no need to specify it twice.
-		if ruby_arch != os_arch
-			identifier << "#{os_arch}-"
-		end
-		identifier << "#{os_name}-#{os_runtime}"
-		return identifier
+		return [os_arch, os_name, os_runtime].compact.join("-")
 	end
-	memoize :passenger_binary_compatibility_id
+	memoize :cxx_binary_compatibility_id
 end
 
 end # module PhusionPassenger
diff --git a/lib/phusion_passenger/platform_info/compiler.rb b/lib/phusion_passenger/platform_info/compiler.rb
index 06befbd..bbaff3a 100644
--- a/lib/phusion_passenger/platform_info/compiler.rb
+++ b/lib/phusion_passenger/platform_info/compiler.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010, 2011, 2012 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -22,54 +22,257 @@
 #  THE SOFTWARE.
 
 require 'phusion_passenger/platform_info'
-require 'phusion_passenger/platform_info/operating_system'
 
 module PhusionPassenger
 
 module PlatformInfo
-	def self.gnu_make
-		gmake = find_command('gmake')
-		if !gmake
-			gmake = find_command('make')
-			if gmake
-				if `#{gmake} --version 2>&1` =~ /GNU/
-					return gmake
+private
+	def self.detect_language_extension(language)
+		case language
+		when :c
+			return "c"
+		when :cxx
+			return "cpp"
+		else
+			raise ArgumentError, "Unsupported language #{language.inspect}"
+		end
+	end
+	private_class_method :detect_language_extension
+
+	def self.create_compiler_command(language, flags1, flags2, link = false)
+		case language
+		when :c
+			result  = [cc, link ? ENV['EXTRA_PRE_LDFLAGS'] : nil,
+				ENV['EXTRA_PRE_CFLAGS'], flags1, flags2, ENV['EXTRA_CFLAGS'],
+				ENV['EXTRA_LDFLAGS']]
+		when :cxx
+			result  = [cxx, link ? ENV['EXTRA_PRE_LDFLAGS'] : nil,
+				ENV['EXTRA_PRE_CXXFLAGS'], flags1, flags2, ENV['EXTRA_CXXFLAGS'],
+				ENV['EXTRA_LDFLAGS']]
+		else
+			raise ArgumentError, "Unsupported language #{language.inspect}"
+		end
+		return result.compact.join(" ").strip
+	end
+	private_class_method :create_compiler_command
+
+	def self.run_compiler(description, command, source_file, source, capture_output = false)
+		if verbose?
+			message = "#{description}\n" <<
+				"Running: #{command}\n"
+			if source.strip.empty?
+				message << "Source file is empty."
+			else
+				message << "Source file contains:\n" <<
+					"-------------------------\n" <<
+					unindent(source) <<
+					"\n-------------------------"
+			end
+			log(message)
+		end
+		if capture_output
+			begin
+				output = `#{command} 2>&1`
+				result = $?.exitstatus == 0
+			rescue SystemCallError => e
+				result = false
+				exec_error_reason = e.message
+			end
+			log("Output:\n" <<
+				"-------------------------\n" <<
+				output <<
+				"\n-------------------------")
+		elsif verbose?
+			result = system(command)
+		else
+			result = system("(#{command}) >/dev/null 2>/dev/null")
+		end
+		if result.nil?
+			log("Command could not be executed! #{exec_error_reason}".strip)
+			return false
+		elsif result
+			log("Check suceeded")
+			if capture_output
+				return { :output => output }
+			else
+				return true
+			end
+		else
+			log("Check failed with exit status #{$?.exitstatus}")
+			return false
+		end
+	end
+	private_class_method :run_compiler
+
+public
+	def self.cc
+		return string_env('CC', 'gcc')
+	end
+	
+	def self.cxx
+		return string_env('CXX', 'g++')
+	end
+
+	def self.cc_is_clang?
+		`#{cc} --version 2>&1` =~ /clang version/
+	end
+	memoize :cc_is_clang?
+
+	def self.cxx_is_clang?
+		`#{cxx} --version 2>&1` =~ /clang version/
+	end
+	memoize :cxx_is_clang?
+
+
+	# Looks for the given C or C++ header. This works by invoking the compiler and
+	# searching in the compiler's header search path. Returns its full filename,
+	# or true if this function knows that the header exists but can't find it (e.g.
+	# because the compiler cannot tell us what its header search path is).
+	# Returns nil if the header cannot be found.
+	def self.find_header(header_name, language, flags = nil)
+		extension = detect_language_extension(language)
+		create_temp_file("passenger-compile-check.#{extension}") do |filename, f|
+			source = %Q{
+				#include <#{header_name}>
+			}
+			f.puts(source)
+			f.close
+			begin
+				command = create_compiler_command(language,
+					"-v -c '#{filename}' -o '#{filename}.o'",
+					flags)
+				if result = run_compiler("Checking for #{header_name}", command, filename, source, true)
+					result[:output] =~ /^#include <...> search starts here:$(.+?)^End of search list\.$/m
+					search_paths = $1.to_s.strip.split("\n").map{ |line| line.strip }
+					search_paths.each do |dir|
+						if File.file?("#{dir}/#{header_name}")
+							return "#{dir}/#{header_name}"
+						end
+					end
+					return true
 				else
 					return nil
 				end
-			else
-				return nil
+			ensure
+				File.unlink("#{filename}.o") rescue nil
+			end
+		end
+	end
+
+	def self.try_compile(description, language, source, flags = nil)
+		extension = detect_language_extension(language)
+		create_temp_file("passenger-compile-check.#{extension}") do |filename, f|
+			f.puts(source)
+			f.close
+			begin
+				command = create_compiler_command(language,
+					"-c '#{filename}' -o '#{filename}.o'",
+					flags)
+				return run_compiler(description, command, filename, source)
+			ensure
+				File.unlink("#{filename}.o") rescue nil
+			end
+		end
+	end
+	
+	def self.try_link(description, language, source, flags = nil)
+		extension = detect_language_extension(language)
+		create_temp_file("passenger-link-check.#{extension}") do |filename, f|
+			f.puts(source)
+			f.close
+			begin
+				command = create_compiler_command(language,
+					"'#{filename}' -o '#{filename}.out'",
+					flags, true)
+				return run_compiler(description, command, filename, source)
+			ensure
+				File.unlink("#{filename}.out") rescue nil
 			end
-		else
-			return gmake
 		end
 	end
-	memoize :gnu_make, true
 	
+	def self.try_compile_and_run(description, language, source, flags = nil)
+		extension = detect_language_extension(language)
+		create_temp_file("passenger-run-check.#{extension}", tmpexedir) do |filename, f|
+			f.puts(source)
+			f.close
+			begin
+				command = create_compiler_command(language,
+					"'#{filename}' -o '#{filename}.out'",
+					flags, true)
+				if run_compiler(description, command, filename, source)
+					log("Running #{filename}.out")
+					begin
+						output = `'#{filename}.out' 2>&1`
+					rescue SystemCallError => e
+						log("Command failed: #{e}")
+						return false
+					end
+					status = $?.exitstatus
+					log("Command exited with status #{status}. Output:\n--------------\n#{output}\n--------------")
+					return status == 0
+				else
+					return false
+				end
+			ensure
+				File.unlink("#{filename}.out") rescue nil
+			end
+		end
+	end
+
+
 	# Checks whether the compiler supports "-arch #{arch}".
 	def self.compiler_supports_architecture?(arch)
-		return try_compile(:c, '', "-arch #{arch}")
+		return try_compile("Checking for C compiler '-arch' support",
+			:c, '', "-arch #{arch}")
 	end
 	
 	def self.compiler_supports_visibility_flag?
-		return try_compile(:c, '', '-fvisibility=hidden')
+		return false if RUBY_PLATFORM =~ /aix/
+		return try_compile("Checking for C compiler '-fvisibility' support",
+			:c, '', '-fvisibility=hidden')
 	end
 	memoize :compiler_supports_visibility_flag?, true
 	
 	def self.compiler_supports_wno_attributes_flag?
-		return try_compile(:c, '', '-Wno-attributes')
+		return try_compile("Checking for C compiler '-Wno-attributes' support",
+			:c, '', '-Wno-attributes')
 	end
 	memoize :compiler_supports_wno_attributes_flag?, true
-	
+
 	def self.compiler_supports_wno_missing_field_initializers_flag?
-		return try_compile(:c, '', '-Wno-missing-field-initializers')
+		return try_compile("Checking for C compiler '-Wno-missing-field-initializers' support",
+			:c, '', '-Wno-missing-field-initializers')
 	end
-	memoize :compiler_supports_wno_missing_field_initializers_flag?
+	memoize :compiler_supports_wno_missing_field_initializers_flag?, true
 	
 	def self.compiler_supports_no_tls_direct_seg_refs_option?
-		return try_compile(:c, '', '-mno-tls-direct-seg-refs')
+		return try_compile("Checking for C compiler '-mno-tls-direct-seg-refs' support",
+			:c, '', '-mno-tls-direct-seg-refs')
 	end
 	memoize :compiler_supports_no_tls_direct_seg_refs_option?, true
+
+	def self.compiler_supports_wno_ambiguous_member_template?
+		return try_compile("Checking for C compiler '-Wno-ambiguous-member-template' support",
+			:c, '', '-Wno-ambiguous-member-template')
+	end
+	memoize :compiler_supports_wno_ambiguous_member_template?, true
+
+	def self.compiler_supports_feliminate_unused_debug?
+		create_temp_file("passenger-compile-check.c") do |filename, f|
+			f.close
+			begin
+				command = create_compiler_command(:c,
+					"-c '#{filename}' -o '#{filename}.o'",
+					'-feliminate-unused-debug-symbols -feliminate-unused-debug-types')
+				result = run_compiler("Checking for C compiler '--feliminate-unused-debug-{symbols,types}' support",
+					command, filename, '', true)
+				return result && result[:output].empty?
+			ensure
+				File.unlink("#{filename}.o") rescue nil
+			end
+		end
+	end
 	
 	# Returns whether compiling C++ with -fvisibility=hidden might result
 	# in tons of useless warnings, like this:
@@ -87,116 +290,63 @@ module PlatformInfo
 	memoize :compiler_visibility_flag_generates_warnings?, true
 	
 	def self.has_math_library?
-		return try_link(:c, "int main() { return 0; }\n", '-lmath')
+		return try_link("Checking for -lmath support",
+			:c, "int main() { return 0; }\n", '-lmath')
 	end
 	memoize :has_math_library?, true
 	
 	def self.has_alloca_h?
-		return try_compile(:c, '#include <alloca.h>')
+		return try_compile("Checking for alloca.h",
+			:c, '#include <alloca.h>')
 	end
 	memoize :has_alloca_h?, true
+	
+	# C compiler flags that should be passed in order to enable debugging information.
+	def self.debugging_cflags
+		# According to OpenBSD's pthreads man page, pthreads do not work
+		# correctly when an app is compiled with -g. It recommends using
+		# -ggdb instead.
+		#
+		# In any case we'll always want to use -ggdb for better GDB debugging.
+		if cc_is_clang? || cxx_is_clang?
+			return '-g'
+		else
+			return '-ggdb'
+		end
+	end
 
-	# Compiler flags that should be used for compiling every C/C++ program,
-	# for portability reasons. These flags should be specified as last
-	# when invoking the compiler.
-	def self.portability_cflags
-		flags = ["-D_REENTRANT -I/usr/local/include"]
-		
-		# Google SparseHash flags.
-		# Figure out header for hash function object and its namespace.
-		# Based on stl_hash.m4 and stl_hash_fun.m4 in the Google SparseHash sources.
-		hash_namespace = nil
-		ok = false
-		['__gnu_cxx', '', 'std', 'stdext'].each do |namespace|
-			['ext/hash_map', 'hash_map'].each do |hash_map_header|
-				ok = try_compile(:cxx, %Q{
-					#include <#{hash_map_header}>
-					int
-					main() {
-						#{namespace}::hash_map<int, int> m;
-						return 0;
-					}
-				})
-				if ok
-					hash_namespace = namespace
-					flags << "-DHASH_NAMESPACE=\"#{namespace}\""
-				end
-			end
-			break if ok
-		end
-		['ext/hash_fun.h', 'functional', 'tr1/functional',
-		 'ext/stl_hash_fun.h', 'hash_fun.h', 'stl_hash_fun.h',
-		 'stl/_hash_fun.h'].each do |hash_function_header|
-			ok = try_compile(:cxx, %Q{
-				#include <#{hash_function_header}>
-				int
-				main() {
-					#{hash_namespace}::hash<int>()(5);
-					return 0;
-				}
-			})
-			if ok
-				flags << "-DHASH_FUN_H=\"<#{hash_function_header}>\""
-				break
-			end
+	def self.dmalloc_ldflags
+		if !ENV['DMALLOC_LIBS'].to_s.empty?
+			return ENV['DMALLOC_LIBS']
 		end
-		
-		if RUBY_PLATFORM =~ /solaris/
-			flags << '-pthreads'
-			if RUBY_PLATFORM =~ /solaris2.11/
-				# skip the _XOPEN_SOURCE and _XPG4_2 definitions in later versions of Solaris / OpenIndiana
-				flags << '-D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64'
-			else
-				flags << '-D_XOPEN_SOURCE=500 -D_XPG4_2 -D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64'
-				flags << '-D__SOLARIS9__ -DBOOST__STDC_CONSTANT_MACROS_DEFINED' if RUBY_PLATFORM =~ /solaris2.9/
+		if RUBY_PLATFORM =~ /darwin/
+			['/opt/local', '/usr/local', '/usr'].each do |prefix|
+				filename = "#{prefix}/lib/libdmallocthcxx.a"
+				if File.exist?(filename)
+					return filename
+				end
 			end
-			flags << '-D_XOPEN_SOURCE=500 -D_XPG4_2 -D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64'
-			flags << '-DBOOST_HAS_STDINT_H' unless RUBY_PLATFORM =~ /solaris2.9/
-			flags << '-mcpu=ultrasparc' if RUBY_PLATFORM =~ /sparc/
-		elsif RUBY_PLATFORM =~ /openbsd/
-			flags << '-DBOOST_HAS_STDINT_H -D_GLIBCPP__PTHREADS'
-		elsif RUBY_PLATFORM =~ /aix/
-			flags << '-DOXT_DISABLE_BACKTRACES'
-		elsif RUBY_PLATFORM =~ /(sparc-linux|arm-linux|^arm.*-linux|sh4-linux)/
-			# http://code.google.com/p/phusion-passenger/issues/detail?id=200
-			# http://groups.google.com/group/phusion-passenger/t/6b904a962ee28e5c
-			# http://groups.google.com/group/phusion-passenger/browse_thread/thread/aad4bd9d8d200561
-			flags << '-DBOOST_SP_USE_PTHREADS'
-		end
-		
-		flags << '-DHAS_ALLOCA_H' if has_alloca_h?
-		flags << '-DHAS_SFENCE' if supports_sfence_instruction?
-		flags << '-DHAS_LFENCE' if supports_lfence_instruction?
-		
-		return flags.compact.join(" ").strip
-	end
-	memoize :portability_cflags, true
-	
-	# Linker flags that should be used for linking every C/C++ program,
-	# for portability reasons. These flags should be specified as last
-	# when invoking the linker.
-	def self.portability_ldflags
-		if RUBY_PLATFORM =~ /solaris/
-			result = '-lxnet -lrt -lsocket -lnsl -lpthread'
+			return nil
 		else
-			result = '-lpthread'
+			return "-ldmallocthcxx"
 		end
-		flags << ' -lmath' if has_math_library?
-		return result
 	end
-	memoize :portability_ldflags
-	
-	# C compiler flags that should be passed in order to enable debugging information.
-	def self.debugging_cflags
-		if RUBY_PLATFORM =~ /openbsd/
-			# According to OpenBSD's pthreads man page, pthreads do not work
-			# correctly when an app is compiled with -g. It recommends using
-			# -ggdb instead.
-			return '-ggdb'
+	memoize :dmalloc_ldflags
+
+	def self.electric_fence_ldflags
+		if RUBY_PLATFORM =~ /darwin/
+			['/opt/local', '/usr/local', '/usr'].each do |prefix|
+				filename = "#{prefix}/lib/libefence.a"
+				if File.exist?(filename)
+					return filename
+				end
+			end
+			return nil
 		else
-			return '-g'
+			return "-lefence"
 		end
 	end
+	memoize :electric_fence_ldflags
 	
 	def self.export_dynamic_flags
 		if RUBY_PLATFORM =~ /linux/
@@ -205,6 +355,35 @@ module PlatformInfo
 			return nil
 		end
 	end
+
+
+	def self.make
+		return string_env('MAKE', find_command('make'))
+	end
+	memoize :make, true
+
+	def self.gnu_make
+		if result = string_env('GMAKE')
+			return result
+		else
+			result = find_command('gmake')
+			if !result
+				result = find_command('make')
+				if result
+					if `#{result} --version 2>&1` =~ /GNU/
+						return result
+					else
+						return nil
+					end
+				else
+					return nil
+				end
+			else
+				return result
+			end
+		end
+	end
+	memoize :gnu_make, true
 end
 
 end # module PhusionPassenger
diff --git a/lib/phusion_passenger/platform_info/curl.rb b/lib/phusion_passenger/platform_info/curl.rb
index 86fb60d..8115f34 100644
--- a/lib/phusion_passenger/platform_info/curl.rb
+++ b/lib/phusion_passenger/platform_info/curl.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/lib/phusion_passenger/platform_info/cxx_portability.rb b/lib/phusion_passenger/platform_info/cxx_portability.rb
new file mode 100644
index 0000000..841aa52
--- /dev/null
+++ b/lib/phusion_passenger/platform_info/cxx_portability.rb
@@ -0,0 +1,143 @@
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
+#
+#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+#
+#  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
+#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#  THE SOFTWARE.
+
+require 'phusion_passenger/platform_info'
+require 'phusion_passenger/platform_info/compiler'
+require 'phusion_passenger/platform_info/operating_system'
+
+module PhusionPassenger
+
+module PlatformInfo
+	# Compiler flags that should be used for compiling every C/C++ program,
+	# for portability reasons. These flags should be specified as last
+	# when invoking the compiler.
+	def self.portability_cflags
+		flags = ["-D_REENTRANT -I/usr/local/include"]
+		
+		# There are too many implementations of of the hash map!
+		# Figure out the right one.
+		ok = try_compile("Checking for tr1/unordered_map", :cxx, %Q{
+			#include <tr1/unordered_map>
+			int
+			main() {
+				std::tr1::unordered_map<int, int> m;
+				return 0;
+			}
+		})
+		if ok
+			flags << "-DHAS_TR1_UNORDERED_MAP"
+		else
+			hash_namespace = nil
+			ok = false
+			['__gnu_cxx', '', 'std', 'stdext'].each do |namespace|
+				['hash_map', 'ext/hash_map'].each do |hash_map_header|
+					ok = try_compile("Checking for #{hash_map_header}", :cxx, %Q{
+						#include <#{hash_map_header}>
+						int
+						main() {
+							#{namespace}::hash_map<int, int> m;
+							return 0;
+						}
+					})
+					if ok
+						hash_namespace = namespace
+						flags << "-DHASH_NAMESPACE=\"#{namespace}\""
+						flags << "-DHASH_MAP_HEADER=\"<#{hash_map_header}>\""
+						flags << "-DHASH_MAP_CLASS=\"hash_map\""
+					end
+					break if ok
+				end
+				break if ok
+			end
+			['ext/hash_fun.h', 'functional', 'tr1/functional',
+			 'ext/stl_hash_fun.h', 'hash_fun.h', 'stl_hash_fun.h',
+			 'stl/_hash_fun.h'].each do |hash_function_header|
+				ok = try_compile("Checking for #{hash_function_header}", :cxx, %Q{
+					#include <#{hash_function_header}>
+					int
+					main() {
+						#{hash_namespace}::hash<int>()(5);
+						return 0;
+					}
+				})
+				if ok
+					flags << "-DHASH_FUN_H=\"<#{hash_function_header}>\""
+					break
+				end
+			end
+		end
+
+		ok = try_compile("Checking for accept4()", :c, %Q{
+			#define _GNU_SOURCE
+			#include <sys/socket.h>
+			static void *foo = accept4;
+		})
+		flags << '-DHAVE_ACCEPT4' if ok
+		
+		if RUBY_PLATFORM =~ /solaris/
+			flags << '-pthreads'
+			if RUBY_PLATFORM =~ /solaris2.11/
+				# skip the _XOPEN_SOURCE and _XPG4_2 definitions in later versions of Solaris / OpenIndiana
+				flags << '-D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64'
+			else
+				flags << '-D_XOPEN_SOURCE=500 -D_XPG4_2 -D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64'
+				flags << '-D__SOLARIS9__ -DBOOST__STDC_CONSTANT_MACROS_DEFINED' if RUBY_PLATFORM =~ /solaris2.9/
+			end
+			flags << '-DBOOST_HAS_STDINT_H' unless RUBY_PLATFORM =~ /solaris2.9/
+			flags << '-mcpu=ultrasparc' if RUBY_PLATFORM =~ /sparc/
+		elsif RUBY_PLATFORM =~ /openbsd/
+			flags << '-DBOOST_HAS_STDINT_H -D_GLIBCPP__PTHREADS'
+		elsif RUBY_PLATFORM =~ /aix/
+			flags << '-pthread'
+			flags << '-DOXT_DISABLE_BACKTRACES'
+		elsif RUBY_PLATFORM =~ /(sparc-linux|arm-linux|^arm.*-linux|sh4-linux)/
+			# http://code.google.com/p/phusion-passenger/issues/detail?id=200
+			# http://groups.google.com/group/phusion-passenger/t/6b904a962ee28e5c
+			# http://groups.google.com/group/phusion-passenger/browse_thread/thread/aad4bd9d8d200561
+			flags << '-DBOOST_SP_USE_PTHREADS'
+		end
+		
+		flags << '-DHAS_ALLOCA_H' if has_alloca_h?
+		flags << '-DHAS_SFENCE' if supports_sfence_instruction?
+		flags << '-DHAS_LFENCE' if supports_lfence_instruction?
+		
+		return flags.compact.join(" ").strip
+	end
+	memoize :portability_cflags, true
+
+	# Linker flags that should be used for linking every C/C++ program,
+	# for portability reasons. These flags should be specified as last
+	# when invoking the linker.
+	def self.portability_ldflags
+		if RUBY_PLATFORM =~ /solaris/
+			result = '-lxnet -lrt -lsocket -lnsl -lpthread'
+		else
+			result = '-lpthread'
+		end
+		flags << ' -lmath' if has_math_library?
+		return result
+	end
+	memoize :portability_ldflags
+end
+
+end # module PhusionPassenger
diff --git a/lib/phusion_passenger/platform_info/depcheck.rb b/lib/phusion_passenger/platform_info/depcheck.rb
new file mode 100644
index 0000000..19f16ac
--- /dev/null
+++ b/lib/phusion_passenger/platform_info/depcheck.rb
@@ -0,0 +1,371 @@
+# encoding: utf-8
+require 'phusion_passenger/platform_info/ruby'
+require 'phusion_passenger/platform_info/linux'
+require 'phusion_passenger/platform_info/compiler'
+require 'phusion_passenger/platform_info/operating_system'
+require 'phusion_passenger/utils/ansi_colors'
+
+module PhusionPassenger
+module PlatformInfo
+
+# Almost all software require other software in order to run. We call those
+# other software 'dependencies'. Reliably checking for dependencies can be
+# difficult. Helping the user in case a dependency is not installed (or
+# doesn't seem to be installed) is more difficult still.
+# 
+# The Depcheck framework seeks to make all this easier. It allows the programmer
+# to write "specs" which contain dependency checking code in a structured way.
+# The programmer defines a dependency's basic information (name, website, etc),
+# defines installation instructions (which may be customized per platform) and
+# defines code for checking whether the dependency actually exists. The Depcheck
+# framework:
+# 
+#  * Provides helpers for checking for the existance of commands, libraries,
+#    headers, etc.
+#  * Registers all dependency specs in a way that can be easily accessed
+#    structurally.
+#  * Allows user-friendly display of dependency checking progress and user help
+#    instructions.
+# 
+# Most dependency checking code (e.g. autoconf) is very straightforward: they
+# just check for the existance of a command, library, header, etc and either
+# report "found" or "not found". In our experience the world is unfortunately
+# not that simple. Users can have multiple versions of a dependency installed,
+# where some dependencies are suitable while others are not. Therefore specs
+# should print as many details about the dependency as possible (location, version,
+# etc) so that the user can override any decisions if necessary.
+module Depcheck
+	THIS_DIR   = File.expand_path(File.dirname(__FILE__))
+	@@loaded   = {}
+	@@database = {}
+
+	def self.load(partial_filename)
+		if !@@loaded[partial_filename]
+			filename = "#{THIS_DIR}/#{partial_filename}.rb"
+			content = File.read(filename)
+			instance_eval(content, filename)
+			@@loaded[partial_filename] = true
+		end
+	end
+
+	def self.define(identifier, &block)
+		@@database[identifier.to_s] = block
+	end
+
+	def self.find(identifier)
+		# We lazy-initialize everything in order to save resources. This also
+		# allows blocks to perform relatively expensive checks without hindering
+		# startup time.
+		identifier = identifier.to_s
+		result = @@database[identifier]
+		if result.is_a?(Proc)
+			result = Dependency.new(&result)
+			@@database[identifier] = result
+		end
+		result
+	end
+
+	class Dependency
+		def initialize(&block)
+			instance_eval(&block)
+			check_syntax_aspect("Name must be given") { !!@name }
+			check_syntax_aspect("A checker must be given") { !!@checker }
+		end
+
+		def check
+			@install_comments = nil
+			@check_result ||= @checker.call
+		end
+
+		### DSL for specs ###
+
+		def name(value = nil)
+			value ? @name = value : @name
+		end
+
+		def website(value = nil)
+			value ? @website = value : @website
+		end
+
+		def website_comments(value = nil)
+			value ? @website_comments = value : @website_comments
+		end
+
+		def install_instructions(value = nil)
+			if value
+				@install_instructions = value
+			else
+				if @install_instructions
+					@install_instructions
+				elsif @website
+					result = "Please download it from <b>#{@website}</b>"
+					result << "\n(#{@website_comments})" if @website_comments
+					result
+				else
+					"Search Google for '#{@name}'."
+				end
+			end
+		end
+
+		def install_comments(value = nil)
+			value ? @install_comments = value : @install_comments
+		end
+
+	private
+		def check_syntax_aspect(description)
+			if !yield
+				raise description
+			end
+		end
+
+		### DSL for specs ###
+
+		def define_checker(&block)
+			@checker = block
+		end
+
+		def check_for_command(name, *args)
+			result = find_command(name, *args)
+			if result
+				{ :found => true,
+				  "Location" => result }
+			else
+				false
+			end
+		end
+
+		def check_for_ruby_tool(name)
+			result = locate_ruby_tool(name)
+			if result
+				{ :found => true,
+				  "Location" => result }
+			else
+				false
+			end
+		end
+
+		def check_for_header(header_name, language = :c, flags = nil)
+			if result = PlatformInfo.find_header(header_name, language, flags)
+				{ :found => true,
+				  "Location" => result }
+			else
+				false
+			end
+		end
+
+		# def check_for_library(name)
+		# 	check_by_compiling("int main() { return 0; }", :cxx, nil, "-l#{name}")
+		# end
+
+		# def check_by_compiling(source, language = :c, cflags = nil, linkflags = nil)
+		# 	case language
+		# 	when :c
+		# 		source_file		= "#{PlatformInfo.tmpexedir}/depcheck-#{Process.pid}-#{Thread.current.object_id}.c"
+		# 		compiler			 = "gcc"
+		# 		compiler_flags = ENV['CFLAGS']
+		# 	when :cxx
+		# 		source_file		= "#{PlatformInfo.tmpexedir}/depcheck-#{Process.pid}-#{Thread.current.object_id}.cpp"
+		# 		compiler			 = "g++"
+		# 		compiler_flags = "#{ENV['CFLAGS']} #{ENV['CXXFLAGS']}".strip
+		# 	else
+		# 		raise ArgumentError, "Unknown language '#{language}"
+		# 	end
+		
+		# 	output_file = "#{PlatformInfo.tmpexedir}/depcheck-#{Process.pid}-#{Thread.current.object_id}"
+		
+		# 	begin
+		# 		File.open(source_file, 'w') do |f|
+		# 			f.puts(source)
+		# 		end
+			
+		# 		if find_command(compiler)
+		# 			command = "#{compiler} #{compiler_flags} #{cflags} " +
+		# 				"#{source_file} -o #{output_file} #{linkflags}"
+		# 			[!!system(command)]
+		# 		else
+		# 			[:unknown, "Cannot check: compiler '#{compiler}' not found."]
+		# 		end
+		# 	ensure
+		# 		File.unlink(source_file) rescue nil
+		# 		File.unlink(output_file) rescue nil
+		# 	end
+		# end
+
+		def check_for_ruby_library(name)
+			begin
+				require(name)
+				{ :found => true }
+			rescue LoadError
+				if defined?(Gem)
+					false
+				else
+					begin
+						require 'rubygems'
+						require(name)
+						{ :found => true }
+					rescue LoadError
+						false
+					end
+				end
+			end
+		end
+
+		def on(platform)
+			return if @on_invoked
+			invoke = false
+			if (linux_distro_tags || []).include?(platform)
+				invoke = true
+			else
+				case platform
+				when :linux
+					invoke = true if PlatformInfo.os_name =~ /linux/
+				when :freebsd
+					invoke = true if PlatformInfo.os_name =~ /freebsd/
+				when :macosx
+					invoke = true if PlatformInfo.os_name == "macosx"
+				when :solaris
+					invoke = true if PlatformInfo.os_name =~ /solaris/
+				when :other_platforms
+					invoke = true
+				end
+			end
+			if invoke
+				yield
+				@on_invoked = true
+			end
+		end
+
+		def apt_get_install(package_name)
+			install_instructions("Please install it with <b>apt-get install #{package_name}</b>")
+		end
+
+		def urpmi(package_name)
+			install_instructions("Please install it with <b>urpmi #{package_name}</b>")
+		end
+
+		def yum_install(package_name)
+			install_instructions("Please install it with <b>yum install #{package_name}</b>")
+		end
+
+		def emerge(package_name)
+			install_instructions("Please install it with <b>emerge -av #{package_name}</b>")
+		end
+
+		def gem_install(package_name)
+			install_instructions("Please make sure RubyGems is installed, then run " +
+				"<b>#{gem_command || 'gem'} install #{package_name}</b>")
+		end
+
+		def xcode_install(component)
+			install_instructions("Please install <b>Xcode</b>, then in Xcode go to " +
+				"<b>Preferences -> Downloads -> Components</b> and install <b>#{component}</b>")
+		end
+
+
+		def ruby_command
+			PlatformInfo.ruby_command
+		end
+
+		def gem_command
+			PlatformInfo.gem_command
+		end
+
+		def find_command(command, *args)
+			PlatformInfo.find_command(command, *args)
+		end
+
+		def linux_distro_tags
+			PlatformInfo.linux_distro_tags
+		end
+
+		def locate_ruby_tool(name)
+			PlatformInfo.locate_ruby_tool(name)
+		end
+	end # class Dependency
+
+	class ConsoleRunner
+		attr_reader :missing_dependencies
+
+		def initialize
+			@stdout = STDOUT
+			@dep_identifiers = []
+		end
+
+		def add(identifier)
+			@dep_identifiers << identifier
+		end
+
+		def check_all
+			old_log_impl = PlatformInfo.log_implementation
+			begin
+				PlatformInfo.log_implementation = lambda do |message|
+					message = PlatformInfo.send(:reindent, message, 10)
+					message.sub!(/^          /, '')
+					STDOUT.puts "       -> #{message}"
+				end
+				@missing_dependencies = []
+				@dep_identifiers.each do |identifier|
+					dep = Depcheck.find(identifier)
+					raise "Cannot find depcheck spec #{identifier.inspect}" if !dep
+					puts_header "Checking for #{dep.name}..."
+					result = dep.check
+					result = { :found => false } if !result
+
+					if result[:found] && !result[:error]
+						puts_detail "Found: <green>yes</green>"
+					else
+						if result[:error]
+							puts_detail "Found: #{result[:found] ? "<yellow>yes, but there was an error</yellow>" : "<red>no</red>"}"
+							puts_detail "Error: <red>#{result[:error]}</red>"
+						else
+							puts_detail "Found: #{result[:found] ? "<green>yes</green>" : "<red>no</red>"}"
+						end
+						@missing_dependencies << dep
+					end
+
+					result.each_pair do |key, value|
+						if key.is_a?(String)
+							puts_detail "#{key}: #{value}"
+						end
+					end
+				end
+
+				return @missing_dependencies.empty?
+			ensure
+				PlatformInfo.log_implementation = old_log_impl
+			end
+		end
+
+		def print_installation_instructions_for_missing_dependencies
+			@missing_dependencies.each do |dep|
+				puts " * To install <yellow>#{dep.name}</yellow>:"
+				puts "   #{dep.install_instructions}"
+				if dep.install_comments
+					puts "   #{dep.install_comments}"
+				end
+				puts
+			end
+		end
+
+	private
+		def puts(text = nil)
+			if text
+				@stdout.puts(Utils::AnsiColors.ansi_colorize(text))
+			else
+				@stdout.puts
+			end
+			@stdout.flush
+		end
+
+		def puts_header(text)
+			puts " <b>* #{text}</b>"
+		end
+
+		def puts_detail(text)
+			puts "      #{text}"
+		end
+	end
+end # module Depcheck
+
+end # module PlatformInfo
+end # module PhusionPassenger
diff --git a/lib/phusion_passenger/platform_info/depcheck_specs/apache2.rb b/lib/phusion_passenger/platform_info/depcheck_specs/apache2.rb
new file mode 100644
index 0000000..16cbf63
--- /dev/null
+++ b/lib/phusion_passenger/platform_info/depcheck_specs/apache2.rb
@@ -0,0 +1,124 @@
+define 'apache2' do
+	name 'Apache 2'
+	website 'http://httpd.apache.org/'
+	define_checker do
+		require 'phusion_passenger/platform_info/apache'
+		if check_for_command(PlatformInfo.httpd)
+			{
+				:found => true,
+				"Location of httpd" => PlatformInfo.httpd,
+				"Apache version"    => PlatformInfo.httpd_version
+			}
+		else
+			false
+		end
+	end
+
+	on :debian do
+		apt_get_install "apache2-mpm-worker"
+	end
+	on :mandriva do
+		urpmi "apache"
+	end
+	on :redhat do
+		yum_install "httpd"
+	end
+	on :gentoo do
+		emerge "apache"
+	end
+end
+
+define 'apache2-dev' do
+	name "Apache 2 development headers"
+	website "http://httpd.apache.org/"
+	define_checker do
+		require 'phusion_passenger/platform_info/apache'
+		if PlatformInfo.apxs2
+			{
+				:found => true,
+				"Location of apxs2" => PlatformInfo.apxs2
+			}
+		else
+			false
+		end
+	end
+
+	on :debian do
+		apt_get_install "apache2-threaded-dev"
+	end
+	on :mandriva do
+		urpmi "apache-devel"
+	end
+	on :redhat do
+		yum_install "httpd-devel"
+	end
+	on :gentoo do
+		emerge "apache"
+	end
+	on :macosx do
+		xcode_install "Command Line Tools"
+	end
+end
+
+define 'apr-dev' do
+	name "Apache Portable Runtime (APR) development headers"
+	website "http://httpd.apache.org/"
+	define_checker do
+		require 'phusion_passenger/platform_info/apache'
+		if PlatformInfo.apr_config
+			{
+				:found     => true,
+				"Location" => PlatformInfo.apr_config,
+				"Version"  => `#{PlatformInfo.apr_config} --version`.strip
+			}
+		else
+			false
+		end
+	end
+
+	on :debian do
+		apt_get_install "libapr1-dev"
+	end
+	on :mandriva do
+		urpmi "libapr-devel"
+	end
+	on :redhat do
+		yum_install "apr-devel"
+	end
+	on :gentoo do
+		emerge "apr"
+	end
+	on :macosx do
+		xcode_install "Command Line Tools"
+	end
+end
+
+define 'apu-dev' do
+	name "Apache Portable Runtime Utility (APU) development headers"
+	website "http://httpd.apache.org/"
+	define_checker do
+		require 'phusion_passenger/platform_info/apache'
+		if PlatformInfo.apu_config
+			{
+				:found     => true,
+				"Location" => PlatformInfo.apu_config,
+				"Version"  => `#{PlatformInfo.apu_config} --version`.strip
+			}
+		else
+			false
+		end
+	end
+
+	on :debian do
+		apt_get_install "libaprutil1-dev"
+	end
+	on :mandriva do
+		urpmi "libapr-util-devel"
+	end
+	on :redhat do
+		yum_install "apr-util-devel"
+	end
+	on :macosx do
+		xcode_install "Command Line Tools"
+	end
+end
diff --git a/lib/phusion_passenger/platform_info/depcheck_specs/compiler_toolchain.rb b/lib/phusion_passenger/platform_info/depcheck_specs/compiler_toolchain.rb
new file mode 100644
index 0000000..9edb7ce
--- /dev/null
+++ b/lib/phusion_passenger/platform_info/depcheck_specs/compiler_toolchain.rb
@@ -0,0 +1,97 @@
+define 'gcc' do
+  name "GNU C compiler"
+  website "http://gcc.gnu.org/"
+  define_checker do
+    require 'phusion_passenger/platform_info/compiler'
+    check_for_command(PlatformInfo.cc, false)
+  end
+  
+  on :debian do
+    apt_get_install "build-essential"
+  end
+  on :mandriva do
+    urpmi "gcc"
+  end
+  on :redhat do
+    yum_install "gcc"
+  end
+  on :gentoo do
+    emerge "gcc"
+  end
+  on :macosx do
+    xcode_install "Command Line Tools"
+  end
+end
+
+define 'g++' do
+  name "GNU C++ compiler"
+  website "http://gcc.gnu.org/"
+  define_checker do
+    require 'phusion_passenger/platform_info/compiler'
+    check_for_command(PlatformInfo.cxx, false)
+  end
+  
+  on :debian do
+    apt_get_install "build-essential"
+  end
+  on :mandriva do
+    urpmi "gcc-c++"
+  end
+  on :redhat do
+    yum_install "gcc-c++"
+  end
+  on :gentoo do
+    emerge "gcc"
+  end
+  on :macosx do
+    xcode_install "Command Line Tools"
+  end
+end
+
+define 'make' do
+  name "The 'make' tool"
+  define_checker do
+    require 'phusion_passenger/platform_info/compiler'
+    check_for_command(PlatformInfo.make)
+  end
+  
+  on :debian do
+    apt_get_install "build-essential"
+  end
+  on :mandriva do
+    urpmi "make"
+  end
+  on :redhat do
+    yum_install "make"
+  end
+  on :macosx do
+    xcode_install "Command Line Tools"
+  end
+  on :other_platforms do
+    website "http://www.gnu.org/software/make/"
+  end
+end
+
+define 'gmake' do
+  name "GNU make"
+  define_checker do
+    require 'phusion_passenger/platform_info/compiler'
+    check_for_command(PlatformInfo.gnu_make)
+  end
+  
+  on :debian do
+    apt_get_install "build-essential"
+  end
+  on :mandriva do
+    urpmi "make"
+  end
+  on :redhat do
+    yum_install "make"
+  end
+  on :macosx do
+    xcode_install "Command Line Tools"
+  end
+  on :other_platforms do
+    website "http://www.gnu.org/software/make/"
+  end
+end
diff --git a/lib/phusion_passenger/platform_info/depcheck_specs/gems.rb b/lib/phusion_passenger/platform_info/depcheck_specs/gems.rb
new file mode 100644
index 0000000..633d885
--- /dev/null
+++ b/lib/phusion_passenger/platform_info/depcheck_specs/gems.rb
@@ -0,0 +1,39 @@
+define 'fastthread' do
+	name 'fastthread'
+	define_checker do
+		check_for_ruby_library('fastthread')
+	end
+	gem_install 'fastthread'
+end
+
+define 'rack' do
+	name 'rack'
+	define_checker do
+		check_for_ruby_library('rack')
+	end
+	gem_install 'rack'
+end
+
+define 'daemon_controller >= 1.1.0' do
+	name 'daemon_controller >= 1.1.0'
+	define_checker do
+		if check_for_ruby_library('daemon_controller')
+			gem_command = PlatformInfo.gem_command || "gem"
+			begin
+				require 'daemon_controller/version'
+				{
+					:found => DaemonController::VERSION_STRING >= '1.1.0',
+					"Installed version" => DaemonController::VERSION_STRING
+				}
+			rescue LoadError
+				{
+					:found => false,
+					"Installed version" => "way too old"
+				}
+			end
+		else
+			false
+		end
+	end
+	gem_install 'daemon_controller'
+end
diff --git a/lib/phusion_passenger/platform_info/depcheck_specs/libs.rb b/lib/phusion_passenger/platform_info/depcheck_specs/libs.rb
new file mode 100644
index 0000000..cb2c81a
--- /dev/null
+++ b/lib/phusion_passenger/platform_info/depcheck_specs/libs.rb
@@ -0,0 +1,118 @@
+define 'openssl-dev' do
+	name "OpenSSL development headers"
+	website "http://www.openssl.org/"
+	define_checker do
+		check_for_header('openssl/ssl.h')
+	end
+
+	on :debian do
+		apt_get_install "libssl-dev"
+	end
+	on :redhat do
+		yum_install "openssl-devel"
+	end
+end
+
+define 'libcurl-dev' do
+	name "Curl development headers with SSL support"
+	website "http://curl.haxx.se/libcurl"
+	define_checker do
+		require 'phusion_passenger/platform_info/curl'
+		result = { :found => false }
+		
+		if !(curl_config = PlatformInfo.find_command('curl-config'))
+			result[:error] = "Cannot find the `curl-config` command."
+			next result
+		else
+			result["curl-config location"] = curl_config
+		end
+
+		if !(header = PlatformInfo.find_header("curl/curl.h", :c, PlatformInfo.curl_flags))
+			result[:error] = "Cannot find the curl/curl.h header file."
+			next result
+		else
+			result[:found] = true
+			result["Header location"] = header == true ? "somewhere, not sure where" : header
+		end
+
+		begin
+			result["Version"] = `#{curl_config} --version`.strip
+		rescue SystemCallError => e
+			result[:error] = "Cannot run `curl-config --version`: #{e}"
+			next result
+		end
+
+		source = %Q{
+			#include <curl/curl.h>
+			int main() {
+				curl_global_init(CURL_GLOBAL_ALL);
+				return 0;
+			}
+		}
+		ret = PlatformInfo.try_compile_and_run("Checking for libcurl usability", :c, source,
+			"#{PlatformInfo.curl_flags} #{PlatformInfo.curl_libs}")
+		result["Usable"] = ret ? "yes" : "no"
+		if !ret
+			result[:error] = "libcurl was found, but it isn't usable. Set VERBOSE=1 to see why."
+			next result
+		end
+
+		result["Supports SSL"] = PlatformInfo.curl_supports_ssl? ? "yes" : "no"
+		if !PlatformInfo.curl_supports_ssl?
+			result[:error] = "libcurl was found, but it doesn't support SSL. Please reinstall it with SSL support."
+			next result
+		end
+
+		result
+	end
+	
+	install_instructions "Please download Curl from <b>#{website}</b> " +
+		"and make sure you install it <b>with SSL support</b>."
+	on :debian do
+		install_instructions "Please run " +
+			"<b>apt-get install libcurl4-openssl-dev</b> " +
+			"or <b>libcurl4-gnutls-dev</b>, whichever you prefer."
+	end
+	on :redhat do
+		release = PlatformInfo.read_file("/etc/redhat-release")
+		if release =~ /release 4/
+			# http://code.google.com/p/phusion-passenger/issues/detail?id=554
+			yum_install "curl-devel zlib-devel e2fsprogs-devel krb5-devel libidn-devel"
+		else
+			yum_install "curl-devel"
+		end
+	end
+end
+
+define 'zlib-dev' do
+	name "Zlib development headers"
+	website "http://www.zlib.net/"
+	define_checker do
+		check_for_header('zlib.h')
+	end
+
+	on :debian do
+		apt_get_install "zlib1g-dev"
+	end
+	on :mandriva do
+		urpmi "zlib1-devel"
+	end
+	on :redhat do
+		yum_install "zlib-devel"
+	end
+end
+
+define 'pcre-dev' do
+	name "PCRE development headers"
+	website "http://www.pcre.org/"
+	define_checker do
+		check_for_header('pcre.h')
+	end
+
+	on :debian do
+		apt_get_install "libpcre3-dev"
+	end
+	on :redhat do
+		yum_install 'pcre-devel'
+	end
+end
\ No newline at end of file
diff --git a/lib/phusion_passenger/platform_info/depcheck_specs/ruby.rb b/lib/phusion_passenger/platform_info/depcheck_specs/ruby.rb
new file mode 100644
index 0000000..7837ca2
--- /dev/null
+++ b/lib/phusion_passenger/platform_info/depcheck_specs/ruby.rb
@@ -0,0 +1,137 @@
+define 'ruby-dev' do
+  name "Ruby development headers"
+  website "http://www.ruby-lang.org/"
+  define_checker do
+    require 'rbconfig'
+    begin
+      require 'mkmf'
+      rb_config = PlatformInfo.rb_config
+      header_dir = rb_config['rubyhdrdir'] || rb_config['archdir']
+      filename = "#{header_dir}/ruby.h"
+      if File.exist?(filename)
+        { :found => true, "Location" => filename }
+      else
+        false
+      end
+    rescue LoadError, SystemExit
+      # On RedHat/Fedora/CentOS, if ruby-devel is not installed then
+      # mkmf.rb will print an error and call 'exit'. So here we
+      # catch SystemExit as well.
+      false
+    rescue NotImplementedError
+      # JRuby raises this.
+      false
+    end
+  end
+  
+  if ruby_command =~ %r(^/usr/bin/ruby)
+    # Only tell user to install the headers with the system's package manager
+    # if Ruby itself was installed with the package manager.
+    on :debian do
+      apt_get_install "ruby-dev"
+    end
+    on :mandriva do
+      urpmi "ruby-devel"
+    end
+    on :redhat do
+      yum_install "ruby-devel"
+    end
+  end
+  on :other_platforms do
+    install_instructions "Please (re)install Ruby by downloading it from <b>#{website}</b>"
+  end
+end
+
+define 'ruby-openssl' do
+  name "OpenSSL support for Ruby"
+  if RUBY_PLATFORM =~ /java/
+    website "http://jruby.org/openssl"
+    install_instructions "Please install OpenSSL support for JRuby: #{website}"
+  else
+    website "http://www.ruby-lang.org/"
+    install_instructions "Please (re)install Ruby with OpenSSL support."
+  end
+  define_checker do
+    begin
+      require 'openssl'
+      { :found => true }
+    rescue LoadError
+      false
+    end
+  end
+
+  if ruby_command =~ %r(^/usr/bin/ruby)
+    # Only tell user to install ruby-openssl with the system's package manager
+    # if Ruby itself was installed with the package manager.
+    on :debian do
+      apt_get_install "libopenssl-ruby"
+    end
+  end
+end
+
+define 'rubygems' do
+  name "RubyGems"
+  website "http://rubyforge.org/frs/?group_id=126"
+  define_checker do
+    begin
+      require 'rubygems'
+      { :found => true }
+    rescue LoadError
+      false
+    end
+  end
+  
+  install_instructions "Please download it from <b>#{website}</b>. " +
+    "Extract the tarball, and run <b>ruby setup.rb</b>"
+  if ruby_command =~ %r(^/usr/bin/ruby)
+    # Only tell user to install RubyGems with the system's package manager
+    # if Ruby itself was installed with the package manager.
+    # 
+    # Older versions of Debian have totally messed up RubyGems by patching it to install binaries
+    # to /var/lib/gems/bin instead of /usr/bin or even /usr/local/bin. That
+    # wouldn't be so much of a problem were it not for the fact that
+    # /var/lib/gems/bin is not in $PATH by default, so on a regular basis people
+    # ask various Ruby/Rails support forums why they get a 'foo: command not found'
+    # after typing 'gem install foo'.
+    # 
+    # Luckily newer Debian versions fixed this problem.
+    on :debian do
+      apt_get_install "rubygems"
+    end
+  end
+end
+
+# The 'rake' spec looks for a Rake instance that's installed for the same
+# Ruby interpreter as the one that's currently running.
+# For example if you're running this 'rake.rb' file with Ruby 1.8, then
+# this checker will not find Ruby 1.9's Rake or JRuby's Rake.
+define 'rake' do
+  name "Rake (associated with #{ruby_command})"
+  website "http://rake.rubyforge.org/"
+  define_checker do
+    require 'phusion_passenger/platform_info/ruby'
+    if result = PlatformInfo.rake_command
+      { :found => true,
+        "Location" => result }
+    else
+      false
+    end
+  end
+  
+  if ruby_command =~ %r(^/usr/bin/ruby)
+    # Only tell user to install Rake with the system's package manager
+    # if Ruby itself was installed with the package manager.
+    on :debian do
+      apt_get_install "rake"
+    end
+    on :mandriva do
+      urpmi "rake"
+    end
+    on :redhat do
+      yum_install "rake"
+    end
+  end
+  on :other_platforms do
+    gem_install "rake"
+  end
+end
diff --git a/lib/phusion_passenger/platform_info/depcheck_specs/utilities.rb b/lib/phusion_passenger/platform_info/depcheck_specs/utilities.rb
new file mode 100644
index 0000000..9f25965
--- /dev/null
+++ b/lib/phusion_passenger/platform_info/depcheck_specs/utilities.rb
@@ -0,0 +1,15 @@
+define 'download-tool' do
+	name "A download tool like 'wget' or 'curl'"
+	define_checker do
+		check_for_command('wget') || check_for_command('curl')
+	end
+	on :debian do
+		apt_get_install "wget curl"
+	end
+	on :redhat do
+		yum_install "wget curl"
+	end
+	on :other_platforms do
+		install_instructions "Please install either wget (http://www.gnu.org/software/wget/) or curl (http://curl.haxx.se/)."
+	end
+end
\ No newline at end of file
diff --git a/lib/phusion_passenger/platform_info/linux.rb b/lib/phusion_passenger/platform_info/linux.rb
index 32454a4..42dfc31 100644
--- a/lib/phusion_passenger/platform_info/linux.rb
+++ b/lib/phusion_passenger/platform_info/linux.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/lib/phusion_passenger/platform_info/operating_system.rb b/lib/phusion_passenger/platform_info/operating_system.rb
index bfd751a..66ace10 100644
--- a/lib/phusion_passenger/platform_info/operating_system.rb
+++ b/lib/phusion_passenger/platform_info/operating_system.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -33,7 +33,7 @@ module PlatformInfo
 		if rb_config['target_os'] =~ /darwin/ && (sw_vers = find_command('sw_vers'))
 			return "macosx"
 		else
-			return RUBY_PLATFORM.sub(/.*?-/, '')
+			return rb_config['target_os']
 		end
 	end
 	memoize :os_name
@@ -97,8 +97,9 @@ module PlatformInfo
 		else
 			arch = `uname -p`.strip
 			# On some systems 'uname -p' returns something like
-			# 'Intel(R) Pentium(R) M processor 1400MHz'.
-			if arch == "unknown" || arch =~ / /
+			# 'Intel(R) Pentium(R) M processor 1400MHz' or
+			# 'Intel(R)_Xeon(R)_CPU___________X7460__ at _2.66GHz'.
+			if arch == "unknown" || arch =~ / / || arch =~ /Hz$/
 				arch = `uname -m`.strip
 			end
 			if arch =~ /^i.86$/
@@ -129,7 +130,7 @@ module PlatformInfo
 	def self.supports_sfence_instruction?
 		arch = cpu_architectures[0]
 		return arch == "x86_64" || (arch == "x86" &&
-			try_compile_and_run(:c, %Q{
+			try_compile_and_run("Checking for sfence instruction support", :c, %Q{
 				int
 				main() {
 					__asm__ __volatile__ ("sfence" ::: "memory");
@@ -144,7 +145,7 @@ module PlatformInfo
 	def self.supports_lfence_instruction?
 		arch = cpu_architectures[0]
 		return arch == "x86_64" || (arch == "x86" &&
-			try_compile_and_run(:c, %Q{
+			try_compile_and_run("Checking for lfence instruction support", :c, %Q{
 				int
 				main() {
 					__asm__ __volatile__ ("lfence" ::: "memory");
diff --git a/lib/phusion_passenger/platform_info/ruby.rb b/lib/phusion_passenger/platform_info/ruby.rb
index 04eeeaa..7a04a66 100644
--- a/lib/phusion_passenger/platform_info/ruby.rb
+++ b/lib/phusion_passenger/platform_info/ruby.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -48,29 +48,54 @@ module PlatformInfo
 	def self.ruby_command
 		if in_rvm?
 			name = rvm_ruby_string
-			dir = rvm_path
-			if name && dir
-				filename = "#{dir}/wrappers/#{name}/ruby"
-				if File.exist?(filename)
-					contents = File.open(filename, 'rb') do |f|
-						f.read
-					end
-					# Old wrapper scripts reference $HOME which causes
-					# things to blow up when run by a different user.
-					if contents.include?("$HOME")
+			dirs = rvm_paths
+			if name && dirs
+				dirs.each do |dir|
+					filename = "#{dir}/wrappers/#{name}/ruby"
+					if File.exist?(filename)
+						contents = File.open(filename, 'rb') do |f|
+							f.read
+						end
+						# Old wrapper scripts reference $HOME which causes
+						# things to blow up when run by a different user.
+						if contents.include?("$HOME")
+							filename = nil
+						end
+					else
 						filename = nil
 					end
-				else
-					filename = nil
+					if filename
+						return filename
+					end
 				end
-				if filename
-					return filename
-				else
-					STDERR.puts "Your RVM wrapper scripts are too old. Please " +
-						"update them first by running 'rvm get head && " +
-						"rvm reload && rvm repair all'."
-					exit 1
+
+				# Correctness of these commands are confirmed by mpapis.
+				# If we ever encounter a case for which this logic is not sufficient,
+				# try mpapis' pseudo code:
+				# 
+				#   rvm_update_prefix  = write_to rvm_path ? "" : "rvmsudo"
+				#   rvm_gemhome_prefix  = write_to GEM_HOME ? "" : "rvmsudo"
+				#   repair_command  = "#{rvm_update_prefix} rvm get stable && rvm reload && #{rvm_gemhome_prefix} rvm repair all"
+				#   wrapper_command = "#{rvm_gemhome_prefix} rvm wrapper #{rvm_ruby_string} --no-prefix --all"
+				case rvm_installation_mode
+				when :single
+					repair_command  = "rvm get stable && rvm reload && rvm repair all"
+					wrapper_command = "rvm wrapper #{rvm_ruby_string} --no-prefix --all"
+				when :multi
+					repair_command  = "rvmsudo rvm get stable && rvm reload && rvmsudo rvm repair all"
+					wrapper_command = "rvmsudo rvm wrapper #{rvm_ruby_string} --no-prefix --all"
+				when :mixed
+					repair_command  = "rvmsudo rvm get stable && rvm reload && rvm repair all"
+					wrapper_command = "rvm wrapper #{rvm_ruby_string} --no-prefix --all"
 				end
+
+				STDERR.puts "Your RVM wrapper scripts are too old, or some " +
+					"wrapper scripts are missing. Please update/regenerate " +
+					"them first by running:\n\n" +
+					"  #{repair_command}\n\n" +
+					"If that doesn't seem to work, please run:\n\n" +
+					"  #{wrapper_command}"
+				exit 1
 			else
 				# Something's wrong with the user's RVM installation.
 				# Raise an error so that the user knows this instead of
@@ -105,6 +130,13 @@ module PlatformInfo
 			RUBY_ENGINE != "macruby" &&
 			rb_config['target_os'] !~ /mswin|windows|mingw/
 	end
+
+	# Returns whether Phusion Passenger needs Ruby development headers to
+	# be available for the current Ruby implementation.
+	def self.passenger_needs_ruby_dev_header?
+		# Too much of a trouble for JRuby. We can do without it.
+		return RUBY_ENGINE != "jruby"
+	end
 	
 	# Returns the correct 'gem' command for this Ruby interpreter.
 	def self.gem_command
@@ -146,7 +178,7 @@ module PlatformInfo
 	# belongs to the current Ruby interpreter. Returns nil if it
 	# doesn't exist.
 	def self.rspec
-		return locate_ruby_tool('spec')
+		return locate_ruby_tool('rspec')
 	end
 	memoize :rspec
 	
@@ -156,29 +188,39 @@ module PlatformInfo
 		return bindir.include?('/.rvm/') || bindir.include?('/rvm/')
 	end
 	
-	# If the current Ruby interpreter is managed by RVM, returns the
-	# directory in which RVM places its working files. Otherwise returns
-	# nil.
-	def self.rvm_path
+	# If the current Ruby interpreter is managed by RVM, returns all
+	# directories in which RVM places its working files. This is usually
+	# ~/.rvm or /usr/local/rvm, but in mixed-mode installations there
+	# can be multiple such paths.
+	# 
+	# Otherwise returns nil.
+	def self.rvm_paths
 		if in_rvm?
+			result = []
 			[ENV['rvm_path'], "~/.rvm", "/usr/local/rvm"].each do |path|
 				next if path.nil?
 				path = File.expand_path(path)
-				script_path = File.join(path, 'scripts', 'rvm')
-				return path if File.directory?(path) && File.exist?(script_path)
+				rubies_path = File.join(path, 'rubies')
+				if File.directory?(path) && File.directory?(rubies_path)
+					result << path
+				end
+			end
+			if result.empty?
+				# Failure to locate the RVM path is probably caused by the
+				# user customizing $rvm_path. Older RVM versions don't
+				# export $rvm_path, making us unable to detect its value.
+				STDERR.puts "Unable to locate the RVM path. Your RVM installation " +
+					"is probably too old. Please update it with " +
+					"'rvm get head && rvm reload && rvm repair all'."
+				exit 1
+			else
+				return result
 			end
-			# Failure to locate the RVM path is probably caused by the
-			# user customizing $rvm_path. Older RVM versions don't
-			# export $rvm_path, making us unable to detect its value.
-			STDERR.puts "Unable to locate the RVM path. Your RVM installation " +
-				"is probably too old. Please update it with " +
-				"'rvm get head && rvm reload && rvm repair all'."
-			exit 1
 		else
 			return nil
 		end
 	end
-	memoize :rvm_path
+	memoize :rvm_paths
 	
 	# If the current Ruby interpreter is managed by RVM, returns the
 	# RVM name which identifies the current Ruby interpreter plus the
@@ -200,8 +242,12 @@ module PlatformInfo
 			# try various strategies...
 			
 			# $GEM_HOME usually contains the gem set name.
-			if GEM_HOME && GEM_HOME.include?("rvm/gems/")
-				return File.basename(GEM_HOME)
+			# It may be something like:
+			#   /Users/hongli/.rvm/gems/ruby-1.9.3-p392
+			# But also:
+			#   /home/bitnami/.rvm/gems/ruby-1.9.3-p385-perf at njist325/ruby/1.9.1
+			if GEM_HOME && GEM_HOME =~ %r{rvm/gems/(.+)}
+				return $1.sub(/\/.*/, '')
 			end
 			
 			# User somehow managed to nuke $GEM_HOME. Extract info
@@ -227,6 +273,27 @@ module PlatformInfo
 		return nil
 	end
 	memoize :rvm_ruby_string
+
+	# Returns the RVM installation mode:
+	# :single - RVM is installed in single-user mode.
+	# :multi  - RVM is installed in multi-user mode.
+	# :mixed  - RVM is in a mixed-mode installation.
+	# nil     - The current Ruby interpreter is not using RVM.
+	def self.rvm_installation_mode
+		if in_rvm?
+			if ENV['rvm_path'] =~ /\.rvm/
+				return :single
+			else
+				if GEM_HOME =~ /\.rvm/
+					return :mixed
+				else
+					return :multi
+				end
+			end
+		else
+			return nil
+		end
+	end
 	
 	# Returns either 'sudo' or 'rvmsudo' depending on whether the current
 	# Ruby interpreter is managed by RVM.
diff --git a/lib/phusion_passenger/platform_info/zlib.rb b/lib/phusion_passenger/platform_info/zlib.rb
index 2e77ec4..612290f 100644
--- a/lib/phusion_passenger/platform_info/zlib.rb
+++ b/lib/phusion_passenger/platform_info/zlib.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/lib/phusion_passenger/plugin.rb b/lib/phusion_passenger/plugin.rb
index 3e6ac17..a974dc8 100644
--- a/lib/phusion_passenger/plugin.rb
+++ b/lib/phusion_passenger/plugin.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -93,4 +93,4 @@ class Plugin
 	end
 end
 
-end # module PhusionPassenger
\ No newline at end of file
+end # module PhusionPassenger
diff --git a/lib/phusion_passenger/preloader_shared_helpers.rb b/lib/phusion_passenger/preloader_shared_helpers.rb
new file mode 100644
index 0000000..8477321
--- /dev/null
+++ b/lib/phusion_passenger/preloader_shared_helpers.rb
@@ -0,0 +1,146 @@
+# encoding: binary
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2011, 2012 Phusion
+#
+#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+#
+#  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
+#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#  THE SOFTWARE.
+
+require 'socket'
+require 'phusion_passenger/native_support'
+
+module PhusionPassenger
+
+# Provides shared functions for preloader apps.
+module PreloaderSharedHelpers
+	extend self
+
+	def init
+		if !Kernel.respond_to?(:fork)
+			message = "Smart spawning is not available on this Ruby " +
+				"implementation because it does not support `Kernel.fork`. "
+			if ENV['SERVER_SOFTWARE'].to_s =~ /nginx/i
+				message << "Please set `passenger_spawn_method` to `direct`."
+			else
+				message << "Please set `PassengerSpawnMethod` to `direct`."
+			end
+			raise(message)
+		end
+	end
+	
+	def accept_and_process_next_client(server_socket)
+		original_pid = Process.pid
+		client = server_socket.accept
+		client.binmode
+		begin
+			command = client.readline
+		rescue EOFError
+			return nil
+		end
+		if command !~ /\n\Z/
+			STDERR.puts "Command must end with a newline"
+		elsif command == "spawn\n"
+			while client.readline != "\n"
+				# Do nothing.
+			end
+			
+			# Improve copy-on-write friendliness.
+			GC.start
+			
+			pid = fork
+			if pid.nil?
+				$0 = "#{$0} (forking...)"
+				client.puts "OK"
+				client.puts Process.pid
+				client.flush
+				client.sync = true
+				return [:forked, client]
+			elsif defined?(NativeSupport)
+				NativeSupport.detach_process(pid)
+			else
+				Process.detach(pid)
+			end
+		else
+			STDERR.puts "Unknown command '#{command.inspect}'"
+		end
+		return nil
+	ensure
+		if client && Process.pid == original_pid
+			begin
+				client.close
+			rescue Errno::EINVAL
+				# Work around OS X bug.
+				# https://code.google.com/p/phusion-passenger/issues/detail?id=854
+			end
+		end
+	end
+	
+	def run_main_loop(options)
+		$0 = "Passenger AppPreloader: #{options['app_root']}"
+		client = nil
+		original_pid = Process.pid
+		socket_filename = "#{options['generation_dir']}/backends/preloader.#{Process.pid}"
+		server = UNIXServer.new(socket_filename)
+		server.close_on_exec!
+		
+		# Update the dump information just before telling the preloader that we're
+		# ready because the HelperAgent will read and memorize this information.
+		LoaderSharedHelpers.dump_all_information
+
+		puts "!> Ready"
+		puts "!> socket: unix:#{socket_filename}"
+		puts "!> "
+		
+		while true
+			# We call ::select just in case someone overwrites the global select()
+			# function by including ActionView::Helpers in the wrong place.
+			# https://code.google.com/p/phusion-passenger/issues/detail?id=915
+			ios = Kernel.select([server, STDIN])[0]
+			if ios.include?(server)
+				result, client = accept_and_process_next_client(server)
+				if result == :forked
+					STDIN.reopen(client)
+					STDOUT.reopen(client)
+					STDOUT.sync = true
+					client.close
+					return :forked
+				end
+			end
+			if ios.include?(STDIN)
+				if STDIN.tty?
+					begin
+						# Prevent bash from exiting when we press Ctrl-D.
+						STDIN.read_nonblock(1)
+					rescue Errno::EAGAIN
+						# Do nothing.
+					end
+				end
+				break
+			end
+		end
+		return nil
+	ensure
+		server.close if server
+		if original_pid == Process.pid
+			File.unlink(socket_filename) rescue nil
+		end
+	end
+end
+
+end # module PhusionPassenger
diff --git a/lib/phusion_passenger/public_api.rb b/lib/phusion_passenger/public_api.rb
index 75b1123..60d4701 100644
--- a/lib/phusion_passenger/public_api.rb
+++ b/lib/phusion_passenger/public_api.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -23,13 +23,12 @@
 
 module PhusionPassenger
 class << self
-	# Set during spawning, and set back to nil when spawning is done.
-	attr_accessor :_spawn_options
-	
 	@@event_starting_worker_process = []
 	@@event_stopping_worker_process = []
+	@@event_starting_request_handler_thread = []
 	@@event_credentials = []
 	@@event_after_installing_signal_handlers = []
+	@@event_oob_work = []
 	
 	def on_event(name, &block)
 		callback_list_for_event(name) << block
@@ -45,7 +44,7 @@ class << self
 		require 'rails/version' if defined?(::Rails) && !defined?(::Rails::VERSION)
 		if defined?(::Rails) && ::Rails::VERSION::MAJOR == 3
 			require 'phusion_passenger/rails3_extensions/init'
-			Rails3Extensions.init!(_spawn_options, *args)
+			Rails3Extensions.init!(PhusionPassenger::App.options, *args)
 		end
 	end
 	
@@ -91,10 +90,14 @@ private
 			@@event_starting_worker_process
 		when :stopping_worker_process
 			@@event_stopping_worker_process
+		when :starting_request_handler_thread
+			@@event_starting_request_handler_thread
 		when :credentials
 			@@event_credentials
 		when :after_installing_signal_handlers
 			@@event_after_installing_signal_handlers
+		when :oob_work
+			@@event_oob_work
 		else
 			raise ArgumentError, "Unknown event name '#{name}'"
 		end
diff --git a/lib/phusion_passenger/rack/application_spawner.rb b/lib/phusion_passenger/rack/application_spawner.rb
deleted file mode 100644
index e7eb740..0000000
--- a/lib/phusion_passenger/rack/application_spawner.rb
+++ /dev/null
@@ -1,231 +0,0 @@
-# encoding: binary
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'socket'
-require 'phusion_passenger/app_process'
-require 'phusion_passenger/constants'
-require 'phusion_passenger/message_channel'
-require 'phusion_passenger/abstract_server'
-require 'phusion_passenger/abstract_request_handler'
-require 'phusion_passenger/debug_logging'
-require 'phusion_passenger/public_api'
-require 'phusion_passenger/utils'
-require 'phusion_passenger/native_support'
-require 'phusion_passenger/rack/request_handler'
-
-module PhusionPassenger
-module Rack
-
-# Spawning of Rack applications.
-class ApplicationSpawner < AbstractServer
-	include Utils
-	extend Utils
-	include DebugLogging
-	
-	# This exception means that the ApplicationSpawner server process exited unexpectedly.
-	class Error < AbstractServer::ServerError
-	end
-	
-	# Spawn an instance of the given Rack application. When successful, an
-	# AppProcess object will be returned, which represents the spawned
-	# application.
-	#
-	# Accepts the same options as SpawnManager#spawn_application.
-	#
-	# Raises:
-	# - AppInitError: The Rack application raised an exception or called
-	#   exit() during startup.
-	# - SystemCallError, IOError, SocketError: Something went wrong.
-	def self.spawn_application(options = {})
-		options = sanitize_spawn_options(options)
-		
-		a, b = UNIXSocket.pair
-		pid = safe_fork(self.class.to_s, true) do
-			a.close
-			
-			file_descriptors_to_leave_open = [0, 1, 2, b.fileno]
-			NativeSupport.close_all_file_descriptors(file_descriptors_to_leave_open)
-			close_all_io_objects_for_fds(file_descriptors_to_leave_open)
-			
-			channel = MessageChannel.new(b)
-			app = nil
-			success = report_app_init_status(channel) do
-				prepare_app_process('config.ru', options)
-				app = load_rack_app
-				after_loading_app_code(options)
-			end
-			if success
-				start_request_handler(channel, app, false, options)
-			end
-		end
-		b.close
-		Process.waitpid(pid) rescue nil
-		
-		channel = MessageChannel.new(a)
-		unmarshal_and_raise_errors(channel, options["print_exceptions"], "rack")
-		
-		# No exception was raised, so spawning succeeded.
-		return AppProcess.read_from_channel(channel)
-	end
-	
-	# The following options are accepted:
-	# - 'app_root'
-	#
-	# See SpawnManager#spawn_application for information about the options.
-	def initialize(options)
-		super()
-		@options          = sanitize_spawn_options(options)
-		@app_root         = @options["app_root"]
-		@canonicalized_app_root = canonicalize_path(@app_root)
-		self.max_idle_time = DEFAULT_APP_SPAWNER_MAX_IDLE_TIME
-		define_message_handler(:spawn_application, :handle_spawn_application)
-	end
-	
-	# Spawns an instance of the Rack application. When successful, an AppProcess object
-	# will be returned, which represents the spawned Rack application.
-	#
-	# +options+ will be passed to the request handler's constructor.
-	#
-	# Raises:
-	# - AbstractServer::ServerNotStarted: The ApplicationSpawner server hasn't already been started.
-	# - ApplicationSpawner::Error: The ApplicationSpawner server exited unexpectedly.
-	def spawn_application(options = {})
-		connect do |channel|
-			channel.write("spawn_application", *options.to_a.flatten)
-			return AppProcess.read_from_channel(channel)
-		end
-	rescue SystemCallError, IOError, SocketError => e
-		raise Error, "The application spawner server exited unexpectedly: #{e}"
-	end
-	
-	# Overrided from AbstractServer#start.
-	#
-	# May raise these additional exceptions:
-	# - AppInitError: The Rack application raised an exception
-	#   or called exit() during startup.
-	# - ApplicationSpawner::Error: The ApplicationSpawner server exited unexpectedly.
-	def start
-		super
-		begin
-			channel = MessageChannel.new(@owner_socket)
-			unmarshal_and_raise_errors(channel, @options["print_exceptions"])
-		rescue IOError, SystemCallError, SocketError => e
-			stop if started?
-			raise Error, "The application spawner server exited unexpectedly: #{e}"
-		rescue
-			stop if started?
-			raise
-		end
-	end
-
-protected
-	# Overrided method.
-	def before_fork # :nodoc:
-		if GC.copy_on_write_friendly?
-			# Garbage collect now so that the child process doesn't have to
-			# do that (to prevent making pages dirty).
-			GC.start
-		end
-	end
-
-	# Overrided method.
-	def initialize_server # :nodoc:
-		report_app_init_status(MessageChannel.new(@owner_socket)) do
-			$0 = "Passenger ApplicationSpawner: #{@options['app_group_name']}"
-			prepare_app_process('config.ru', @options)
-			@app = self.class.send(:load_rack_app)
-			after_loading_app_code(@options)
-		end
-	end
-
-private
-	def handle_spawn_application(client, *options)
-		options = sanitize_spawn_options(Hash[*options])
-		a, b = UNIXSocket.pair
-		safe_fork('application', true) do
-			begin
-				a.close
-				client.close
-				options = @options.merge(options)
-				self.class.send(:start_request_handler, MessageChannel.new(b),
-					@app, true, options)
-			rescue SignalException => e
-				if e.message != AbstractRequestHandler::HARD_TERMINATION_SIGNAL &&
-				   e.message != AbstractRequestHandler::SOFT_TERMINATION_SIGNAL
-					raise
-				end
-			end
-		end
-		
-		b.close
-		worker_channel = MessageChannel.new(a)
-		app_process = AppProcess.read_from_channel(worker_channel)
-		app_process.write_to_channel(client)
-	ensure
-		a.close if a
-		b.close if b && !b.closed?
-		app_process.close if app_process
-	end
-
-	def self.start_request_handler(channel, app, forked, options)
-		app_root = options["app_root"]
-		$0 = "Rack: #{options['app_group_name']}"
-		reader, writer = IO.pipe
-		begin
-			reader.close_on_exec!
-			
-			handler = RequestHandler.new(reader, app, options)
-			app_process = AppProcess.new(app_root, Process.pid, writer,
-				handler.server_sockets)
-			app_process.write_to_channel(channel)
-			writer.close
-			channel.close
-			
-			before_handling_requests(forked, options)
-			handler.main_loop
-		ensure
-			channel.close rescue nil
-			writer.close rescue nil
-			handler.cleanup rescue nil
-			after_handling_requests
-		end
-	end
-	private_class_method :start_request_handler
-	
-	def self.load_rack_app
-		# Load Rack inside the spawned child process so that the spawn manager
-		# itself doesn't preload Rack. This is necessary because some broken
-		# Rails apps explicitly specify a Rack version as dependency.
-		require 'rack'
-		rackup_file = ENV["RACKUP_FILE"] || "config.ru"
-		rackup_code = ::File.open(rackup_file, 'rb') do |f|
-			f.read
-		end
-		eval("Rack::Builder.new {( #{rackup_code}\n )}.to_app", TOPLEVEL_BINDING, rackup_file)
-	end
-	private_class_method :load_rack_app
-end
-
-end # module Rack
-end # module PhusionPassenger
diff --git a/lib/phusion_passenger/rack/out_of_band_gc.rb b/lib/phusion_passenger/rack/out_of_band_gc.rb
new file mode 100644
index 0000000..f33d5a6
--- /dev/null
+++ b/lib/phusion_passenger/rack/out_of_band_gc.rb
@@ -0,0 +1,63 @@
+# encoding: binary
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2012-2013 Phusion
+#
+#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+#
+#  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
+#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#  THE SOFTWARE.
+
+require 'thread'
+
+module PhusionPassenger
+module Rack
+
+class OutOfBandGc
+  def initialize(app, frequency, logger = nil)
+    @app = app
+    @frequency = frequency
+    @request_count = 0
+    @mutex = Mutex.new
+    
+    ::PhusionPassenger.on_event(:oob_work) do
+      t0 = Time.now
+      disabled = GC.enable
+      GC.start
+      GC.disable if disabled
+      logger.info "Out Of Band GC finished in #{Time.now - t0} sec" if logger
+    end
+  end
+
+  def call(env)
+    status, headers, body = @app.call(env)
+
+    @mutex.synchronize do
+      @request_count += 1
+      if @request_count == @frequency
+        @request_count = 0
+        headers['X-Passenger-Request-OOB-Work'] = 'true'
+      end
+    end
+    
+    [status, headers, body]
+  end
+end
+
+end # module Rack
+end # module PhusionPassenger
+
diff --git a/lib/phusion_passenger/rack/request_handler.rb b/lib/phusion_passenger/rack/request_handler.rb
deleted file mode 100644
index ec9bc25..0000000
--- a/lib/phusion_passenger/rack/request_handler.rb
+++ /dev/null
@@ -1,145 +0,0 @@
-# encoding: binary
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'phusion_passenger/abstract_request_handler'
-require 'phusion_passenger/utils/rewindable_input'
-
-module PhusionPassenger
-module Rack
-
-# A request handler for Rack applications.
-class RequestHandler < AbstractRequestHandler
-	# Constants which exist to relieve Ruby's garbage collector.
-	RACK_VERSION       = "rack.version"        # :nodoc:
-	RACK_VERSION_VALUE = [1, 0]                # :nodoc:
-	RACK_INPUT         = "rack.input"          # :nodoc:
-	RACK_ERRORS        = "rack.errors"         # :nodoc:
-	RACK_MULTITHREAD   = "rack.multithread"    # :nodoc:
-	RACK_MULTIPROCESS  = "rack.multiprocess"   # :nodoc:
-	RACK_RUN_ONCE      = "rack.run_once"       # :nodoc:
-	RACK_URL_SCHEME	   = "rack.url_scheme"     # :nodoc:
-	SCRIPT_NAME        = "SCRIPT_NAME"         # :nodoc:
-	CONTENT_LENGTH      = "CONTENT_LENGTH"       # :nodoc:
-	CONTENT_TYPE        = "CONTENT_TYPE"         # :nodoc:
-	HTTP_CONTENT_LENGTH = "HTTP_CONTENT_LENGTH"  # :nodoc:
-	HTTP_CONTENT_TYPE = "HTTP_CONTENT_TYPE"      # :nodoc:
-	HTTPS          = "HTTPS"  # :nodoc:
-	HTTPS_DOWNCASE = "https"  # :nodoc:
-	HTTP           = "http"   # :nodoc:
-	YES            = "yes"    # :nodoc:
-	ON             = "on"     # :nodoc:
-	ONE            = "1"      # :nodoc:
-	CRLF           = "\r\n"   # :nodoc:
-	NEWLINE        = "\n"     # :nodoc:
-	STATUS         = "Status: "       # :nodoc:
-	X_POWERED_BY   = "X-Powered-By: "   # :nodoc:
-	NAME_VALUE_SEPARATOR = ": "       # :nodoc:
-
-	# +app+ is the Rack application object.
-	def initialize(owner_pipe, app, options = {})
-		super(owner_pipe, options)
-		@app = app
-	end
-
-protected
-	# Overrided method.
-	def process_request(env, input, output, full_http_response)
-		rewindable_input = PhusionPassenger::Utils::RewindableInput.new(input)
-		begin
-			env[RACK_VERSION]      = RACK_VERSION_VALUE
-			env[RACK_INPUT]        = rewindable_input
-			env[RACK_ERRORS]       = STDERR
-			env[RACK_MULTITHREAD]  = false
-			env[RACK_MULTIPROCESS] = true
-			env[RACK_RUN_ONCE]     = false
-			
-			if env[HTTP_CONTENT_LENGTH] && env[CONTENT_LENGTH]
-				env.delete(HTTP_CONTENT_LENGTH)
-			elsif env[HTTP_CONTENT_LENGTH] && !env[CONTENT_LENGTH]
-				env[CONTENT_LENGTH] = env[HTTP_CONTENT_LENGTH]
-				env.delete(HTTP_CONTENT_LENGTH)
-			end
-			if env[HTTP_CONTENT_TYPE] && env[CONTENT_TYPE]
-				env.delete(HTTP_CONTENT_TYPE)
-			elsif env[HTTP_CONTENT_TYPE] && !env[CONTENT_TYPE]
-				env[CONTENT_TYPE] = env[HTTP_CONTENT_TYPE]
-				env.delete(HTTP_CONTENT_TYPE)
-			end
-			
-			if env[HTTPS] == YES || env[HTTPS] == ON || env[HTTPS] == ONE
-				env[RACK_URL_SCHEME] = HTTPS_DOWNCASE
-			else
-				env[RACK_URL_SCHEME] = HTTP
-			end
-			
-			status, headers, body = @app.call(env)
-			begin
-				if full_http_response
-					output.write("HTTP/1.1 #{status.to_i.to_s} Whatever#{CRLF}")
-					output.write("Connection: close#{CRLF}")
-				end
-				headers_output = [
-					STATUS, status.to_i.to_s, CRLF,
-					X_POWERED_BY, @passenger_header, CRLF
-				]
-				headers.each do |key, values|
-					if values.is_a?(String)
-						values = values.split(NEWLINE)
-					end
-					values.each do |value|
-						headers_output << key
-						headers_output << NAME_VALUE_SEPARATOR
-						headers_output << value
-						headers_output << CRLF
-					end
-				end
-				headers_output << CRLF
-				
-				if body.is_a?(Array)
-					# The body may be an ActionController::StringCoercion::UglyBody
-					# object instead of a real Array, even when #is_a? claims so.
-					# Call #to_a just to be sure.
-					output.writev2(headers_output, body.to_a)
-				elsif body.is_a?(String)
-					headers_output << body
-					output.writev(headers_output)
-				else
-					output.writev(headers_output)
-					if body
-						body.each do |s|
-							output.write(s)
-						end
-					end
-				end
-			ensure
-				body.close if body.respond_to?(:close)
-			end
-		ensure
-			rewindable_input.close
-		end
-	end
-end
-
-end # module Rack
-end # module PhusionPassenger
diff --git a/lib/phusion_passenger/rack/thread_handler_extension.rb b/lib/phusion_passenger/rack/thread_handler_extension.rb
new file mode 100644
index 0000000..dfc2cf7
--- /dev/null
+++ b/lib/phusion_passenger/rack/thread_handler_extension.rb
@@ -0,0 +1,167 @@
+# encoding: binary
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
+#
+#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+#
+#  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
+#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#  THE SOFTWARE.
+
+require 'phusion_passenger/utils/tee_input'
+
+module PhusionPassenger
+module Rack
+
+module ThreadHandlerExtension
+	# Constants which exist to relieve Ruby's garbage collector.
+	RACK_VERSION       = "rack.version"        # :nodoc:
+	RACK_VERSION_VALUE = [1, 2]                # :nodoc:
+	RACK_INPUT         = "rack.input"          # :nodoc:
+	RACK_ERRORS        = "rack.errors"         # :nodoc:
+	RACK_MULTITHREAD   = "rack.multithread"    # :nodoc:
+	RACK_MULTIPROCESS  = "rack.multiprocess"   # :nodoc:
+	RACK_RUN_ONCE      = "rack.run_once"       # :nodoc:
+	RACK_URL_SCHEME	   = "rack.url_scheme"     # :nodoc:
+	RACK_HIJACK_P      = "rack.hijack?"        # :nodoc:
+	RACK_HIJACK        = "rack.hijack"         # :nodoc:
+	SCRIPT_NAME        = "SCRIPT_NAME"         # :nodoc:
+	HTTPS          = "HTTPS"  # :nodoc:
+	HTTPS_DOWNCASE = "https"  # :nodoc:
+	HTTP           = "http"   # :nodoc:
+	YES            = "yes"    # :nodoc:
+	ON             = "on"     # :nodoc:
+	ONE            = "1"      # :nodoc:
+	CRLF           = "\r\n"   # :nodoc:
+	NEWLINE        = "\n"     # :nodoc:
+	STATUS         = "Status: "       # :nodoc:
+	NAME_VALUE_SEPARATOR = ": "       # :nodoc:
+
+	def process_request(env, connection, socket_wrapper, full_http_response)
+		rewindable_input = PhusionPassenger::Utils::TeeInput.new(connection, env)
+		begin
+			env[RACK_VERSION]      = RACK_VERSION_VALUE
+			env[RACK_INPUT]        = rewindable_input
+			env[RACK_ERRORS]       = STDERR
+			env[RACK_MULTITHREAD]  = @request_handler.concurrency > 1
+			env[RACK_MULTIPROCESS] = true
+			env[RACK_RUN_ONCE]     = false
+			if env[HTTPS] == YES || env[HTTPS] == ON || env[HTTPS] == ONE
+				env[RACK_URL_SCHEME] = HTTPS_DOWNCASE
+			else
+				env[RACK_URL_SCHEME] = HTTP
+			end
+			env[RACK_HIJACK_P] = true
+			env[RACK_HIJACK] = lambda do
+				env[RACK_HIJACK_IO] ||= begin
+					connection.stop_simulating_eof!
+					connection
+				end
+			end
+			
+			begin
+				status, headers, body = @app.call(env)
+			rescue => e
+				if should_reraise_app_error?(e, socket_wrapper)
+					raise e
+				elsif !should_swallow_app_error?(e, socket_wrapper)
+					# It's a good idea to catch application exceptions here because
+					# otherwise maliciously crafted responses can crash the app,
+					# forcing it to be respawned, and thereby effectively DoSing it.
+					print_exception("Rack application object", e)
+				end
+				return false
+			end
+
+			# Application requested a full socket hijack.
+			return true if env[RACK_HIJACK_IO]
+
+			begin
+				if full_http_response
+					connection.write("HTTP/1.1 #{status.to_i.to_s} Whatever#{CRLF}")
+					connection.write("Connection: close#{CRLF}")
+				end
+				headers_output = [
+					STATUS, status.to_i.to_s, CRLF
+				]
+				headers.each do |key, values|
+					if values.is_a?(String)
+						values = values.split(NEWLINE)
+					elsif key == RACK_HIJACK
+						# We do not check for this key name in every loop
+						# iteration as an optimization.
+						next
+					end
+					values.each do |value|
+						headers_output << key
+						headers_output << NAME_VALUE_SEPARATOR
+						headers_output << value
+						headers_output << CRLF
+					end
+				end
+				headers_output << CRLF
+
+				if hijack_callback = headers[RACK_HIJACK]
+					# Application requested a partial socket hijack.
+					body = nil
+					connection.writev(headers_output)
+					connection.flush
+					hijacked_socket = env[RACK_HIJACK].call
+					hijack_callback.call(hijacked_socket)
+					return true
+				elsif body.is_a?(Array)
+					# The body may be an ActionController::StringCoercion::UglyBody
+					# object instead of a real Array, even when #is_a? claims so.
+					# Call #to_a just to be sure.
+					connection.writev2(headers_output, body.to_a)
+					return false
+				elsif body.is_a?(String)
+					headers_output << body
+					connection.writev(headers_output)
+					return false
+				else
+					connection.writev(headers_output)
+					if body
+						begin
+							body.each do |s|
+								connection.write(s)
+							end
+						rescue => e
+							if should_reraise_app_error?(e, socket_wrapper)
+								raise e
+							elsif !should_swallow_app_error?(e, socket_wrapper)
+								# Body objects can raise exceptions in #each.
+								print_exception("Rack body object #each method", e)
+							end
+							return false
+						end
+					end
+					return false
+				end
+			ensure
+				body.close if body && body.respond_to?(:close)
+			end
+		ensure
+			rewindable_input.close
+		end
+	end
+
+private
+end
+
+end # module Rack
+end # module PhusionPassenger
diff --git a/lib/phusion_passenger/rails3_extensions/init.rb b/lib/phusion_passenger/rails3_extensions/init.rb
index 0ac333b..d2bd861 100644
--- a/lib/phusion_passenger/rails3_extensions/init.rb
+++ b/lib/phusion_passenger/rails3_extensions/init.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -40,6 +40,7 @@ module Rails3Extensions
 class AnalyticsLogging < ActiveSupport::LogSubscriber
 	def self.install!(options)
 		analytics_logger = options["analytics_logger"]
+		app_group_name = options["app_group_name"]
 		return false if !analytics_logger || !options["analytics"]
 		
 		# If the Ruby interpreter supports GC statistics then turn it on
@@ -53,11 +54,22 @@ class AnalyticsLogging < ActiveSupport::LogSubscriber
 			ActiveSupport::Cache::Store.instrument = true
 			AnalyticsLogging.attach_to(:active_support, subscriber)
 		end
+		PhusionPassenger.on_event(:starting_request_handler_thread) do
+			if defined?(ActiveSupport::Cache::Store)
+				# This flag is thread-local.
+				ActiveSupport::Cache::Store.instrument = true
+			end
+		end
 		
-		if defined?(ActionDispatch::ShowExceptions)
+		if defined?(ActionDispatch::DebugExceptions)
+			exceptions_middleware = ActionDispatch::DebugExceptions
+		elsif defined?(ActionDispatch::ShowExceptions)
+			exceptions_middleware = ActionDispatch::ShowExceptions
+		end
+		if exceptions_middleware
 			Rails.application.middleware.insert_after(
-				ActionDispatch::ShowExceptions,
-				ExceptionLogger, analytics_logger)
+				exceptions_middleware,
+				ExceptionLogger, analytics_logger, app_group_name)
 		end
 		
 		if defined?(ActionController::Base)
@@ -85,9 +97,8 @@ class AnalyticsLogging < ActiveSupport::LogSubscriber
 	end
 	
 	def sql(event)
-		log = Thread.current[PASSENGER_ANALYTICS_WEB_LOG]
-		if log
-			name = event.payload[:name]
+		if log = Thread.current[PASSENGER_ANALYTICS_WEB_LOG]
+			name = event.payload[:name] || "SQL"
 			sql = event.payload[:sql]
 			digest = Digest::MD5.hexdigest("#{name}\0#{sql}\0#{rand}")
 			log.measured_time_points("DB BENCHMARK: #{digest}",
@@ -113,9 +124,10 @@ class AnalyticsLogging < ActiveSupport::LogSubscriber
 	end
 	
 	class ExceptionLogger
-		def initialize(app, analytics_logger)
+		def initialize(app, analytics_logger, app_group_name)
 			@app = app
 			@analytics_logger = analytics_logger
+			@app_group_name = app_group_name
 		end
 		
 		def call(env)
@@ -128,7 +140,7 @@ class AnalyticsLogging < ActiveSupport::LogSubscriber
 	private
 		def log_analytics_exception(env, exception)
 			log = @analytics_logger.new_transaction(
-				env[PASSENGER_GROUP_NAME],
+				@app_group_name,
 				:exceptions,
 				env[PASSENGER_UNION_STATION_KEY])
 			begin
diff --git a/lib/phusion_passenger/request_handler.rb b/lib/phusion_passenger/request_handler.rb
new file mode 100644
index 0000000..c6cf1b9
--- /dev/null
+++ b/lib/phusion_passenger/request_handler.rb
@@ -0,0 +1,638 @@
+# encoding: binary
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
+#
+#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+#
+#  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
+#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#  THE SOFTWARE.
+
+require 'socket'
+require 'fcntl'
+require 'phusion_passenger'
+require 'phusion_passenger/constants'
+require 'phusion_passenger/public_api'
+require 'phusion_passenger/message_client'
+require 'phusion_passenger/debug_logging'
+require 'phusion_passenger/utils'
+require 'phusion_passenger/utils/tmpdir'
+require 'phusion_passenger/ruby_core_enhancements'
+require 'phusion_passenger/request_handler/thread_handler'
+
+module PhusionPassenger
+
+
+class RequestHandler
+	include DebugLogging
+	include Utils
+	
+	# Signal which will cause the Rails application to exit immediately.
+	HARD_TERMINATION_SIGNAL = "SIGTERM"
+	# Signal which will cause the Rails application to exit as soon as it's done processing a request.
+	SOFT_TERMINATION_SIGNAL = "SIGUSR1"
+	BACKLOG_SIZE    = 500
+	
+	# String constants which exist to relieve Ruby's garbage collector.
+	IGNORE              = 'IGNORE'              # :nodoc:
+	DEFAULT             = 'DEFAULT'             # :nodoc:
+	
+	# A hash containing all server sockets that this request handler listens on.
+	# The hash is in the form of:
+	#
+	#   {
+	#      name1 => [socket_address1, socket_type1, socket1],
+	#      name2 => [socket_address2, socket_type2, socket2],
+	#      ...
+	#   }
+	#
+	# +name+ is a Symbol. +socket_addressx+ is the address of the socket,
+	# +socket_typex+ is the socket's type (either 'unix' or 'tcp') and
+	# +socketx+ is the actual socket IO objec.
+	# There's guaranteed to be at least one server socket, namely one with the
+	# name +:main+.
+	attr_reader :server_sockets
+
+	attr_reader :concurrency
+	
+	# If a soft termination signal was received, then the main loop will quit
+	# the given amount of seconds after the last time a connection was accepted.
+	# Defaults to 3 seconds.
+	attr_accessor :soft_termination_linger_time
+	
+	# A password with which clients must authenticate. Default is unauthenticated.
+	attr_accessor :connect_password
+	
+	# Create a new RequestHandler with the given owner pipe.
+	# +owner_pipe+ must be the readable part of a pipe IO object.
+	#
+	# Additionally, the following options may be given:
+	# - detach_key
+	# - connect_password
+	# - pool_account_username
+	# - pool_account_password_base64
+	def initialize(owner_pipe, options = {})
+		require_option(options, "app_group_name")
+		install_options_as_ivars(self, options,
+			"app",
+			"app_group_name",
+			"connect_password",
+			"detach_key",
+			"analytics_logger",
+			"pool_account_username"
+		)
+		@thread_handler = options["thread_handler"] || ThreadHandler
+		@concurrency = 1
+		if options["pool_account_password_base64"]
+			@pool_account_password = options["pool_account_password_base64"].unpack('m').first
+		end
+
+		#############
+		#############
+
+		@server_sockets = {}
+		
+		if should_use_unix_sockets?
+			@main_socket_address, @main_socket = create_unix_socket_on_filesystem
+		else
+			@main_socket_address, @main_socket = create_tcp_socket
+		end
+		@server_sockets[:main] = {
+			:address     => @main_socket_address,
+			:socket      => @main_socket,
+			:protocol    => :session,
+			:concurrency => @concurrency
+		}
+
+		@http_socket_address, @http_socket = create_tcp_socket
+		@server_sockets[:http] = {
+			:address     => @http_socket_address,
+			:socket      => @http_socket,
+			:protocol    => :http,
+			:concurrency => 1
+		}
+		
+		@owner_pipe = owner_pipe
+		@options = options
+		@previous_signal_handlers = {}
+		@main_loop_generation  = 0
+		@main_loop_thread_lock = Mutex.new
+		@main_loop_thread_cond = ConditionVariable.new
+		@threads = []
+		@threads_mutex = Mutex.new
+		@soft_termination_linger_time = 3
+		@main_loop_running  = false
+		
+		#############
+	end
+	
+	# Clean up temporary stuff created by the request handler.
+	#
+	# If the main loop was started by #main_loop, then this method may only
+	# be called after the main loop has exited.
+	#
+	# If the main loop was started by #start_main_loop_thread, then this method
+	# may be called at any time, and it will stop the main loop thread.
+	def cleanup
+		if @main_loop_thread
+			@main_loop_thread_lock.synchronize do
+				@graceful_termination_pipe[1].close rescue nil
+			end
+			@main_loop_thread.join
+		end
+		@server_sockets.each_value do |value|
+			address, type, socket = value
+			socket.close rescue nil
+			if type == 'unix'
+				File.unlink(address) rescue nil
+			end
+		end
+		@owner_pipe.close rescue nil
+	end
+	
+	# Check whether the main loop's currently running.
+	def main_loop_running?
+		@main_loop_thread_lock.synchronize do
+			return @main_loop_running
+		end
+	end
+	
+	# Enter the request handler's main loop.
+	def main_loop
+		debug("Entering request handler main loop")
+		reset_signal_handlers
+		begin
+			@graceful_termination_pipe = IO.pipe
+			@graceful_termination_pipe[0].close_on_exec!
+			@graceful_termination_pipe[1].close_on_exec!
+			
+			@main_loop_thread_lock.synchronize do
+				@main_loop_generation += 1
+				@main_loop_running = true
+				@main_loop_thread_cond.broadcast
+				
+				@select_timeout = nil
+				
+				@selectable_sockets = []
+				@server_sockets.each_value do |value|
+					socket = value[2]
+					@selectable_sockets << socket if socket
+				end
+				@selectable_sockets << @owner_pipe
+				@selectable_sockets << @graceful_termination_pipe[0]
+			end
+			
+			install_useful_signal_handlers
+			start_threads
+			wait_until_termination_requested
+			wait_until_all_threads_are_idle
+			terminate_threads
+			debug("Request handler main loop exited normally")
+
+		rescue EOFError
+			# Exit main loop.
+			trace(2, "Request handler main loop interrupted by EOFError exception")
+		rescue Interrupt
+			# Exit main loop.
+			trace(2, "Request handler main loop interrupted by Interrupt exception")
+		rescue SignalException => signal
+			trace(2, "Request handler main loop interrupted by SignalException")
+			if signal.message != HARD_TERMINATION_SIGNAL &&
+			   signal.message != SOFT_TERMINATION_SIGNAL
+				raise
+			end
+		rescue Exception => e
+			trace(2, "Request handler main loop interrupted by #{e.class} exception")
+			raise
+		ensure
+			debug("Exiting request handler main loop")
+			revert_signal_handlers
+			@main_loop_thread_lock.synchronize do
+				@graceful_termination_pipe[1].close rescue nil
+				@graceful_termination_pipe[0].close rescue nil
+				@selectable_sockets = []
+				@main_loop_generation += 1
+				@main_loop_running = false
+				@main_loop_thread_cond.broadcast
+			end
+		end
+	end
+	
+	# Start the main loop in a new thread. This thread will be stopped by #cleanup.
+	def start_main_loop_thread
+		current_generation = @main_loop_generation
+		@main_loop_thread = Thread.new do
+			begin
+				main_loop
+			rescue Exception => e
+				print_exception(self.class, e)
+			end
+		end
+		@main_loop_thread_lock.synchronize do
+			while @main_loop_generation == current_generation
+				@main_loop_thread_cond.wait(@main_loop_thread_lock)
+			end
+		end
+	end
+	
+	# Remove this request handler from the application pool so that no
+	# new connections will come in. Then make the main loop quit a few
+	# seconds after the last time a connection came in. This all is to
+	# ensure that no connections come in while we're shutting down.
+	#
+	# May only be called while the main loop is running. May be called
+	# from any thread.
+	def soft_shutdown
+		@soft_termination_linger_thread ||= Thread.new do
+			debug("Soft termination initiated")
+			if @detach_key && @pool_account_username && @pool_account_password
+				client = MessageClient.new(@pool_account_username, @pool_account_password)
+				begin
+					client.pool_detach_process_by_key(@detach_key)
+				ensure
+					client.close
+				end
+			end
+			wait_until_all_threads_are_idle
+			debug("Soft terminating in #{@soft_termination_linger_time} seconds")
+			sleep @soft_termination_linger_time
+			@graceful_termination_pipe[1].close rescue nil
+		end
+	end
+
+private
+	def should_use_unix_sockets?
+		# Historical note:
+		# There seems to be a bug in MacOS X Leopard w.r.t. Unix server
+		# sockets file descriptors that are passed to another process.
+		# Usually Unix server sockets work fine, but when they're passed
+		# to another process, then clients that connect to the socket
+		# can incorrectly determine that the client socket is closed,
+		# even though that's not actually the case. More specifically:
+		# recv()/read() calls on these client sockets can return 0 even
+		# when we know EOF is not reached.
+		#
+		# The ApplicationPool infrastructure used to connect to a backend
+		# process's Unix socket in the helper server process, and then
+		# pass the connection file descriptor to the web server, which
+		# triggers this kernel bug. We used to work around this by using
+		# TCP sockets instead of Unix sockets; TCP sockets can still fail
+		# with this fake-EOF bug once in a while, but not nearly as often
+		# as with Unix sockets.
+		#
+		# This problem no longer applies today. The web server now passes
+		# all I/O through the HelperAgent, and the bug is no longer
+		# triggered. Nevertheless, we keep this function intact so that
+		# if something like this ever happens again, we know why, and we
+		# can easily reactivate the workaround. Or maybe if we just need
+		# TCP sockets for some other reason.
+		
+		#return RUBY_PLATFORM !~ /darwin/
+
+		ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
+		# Unix domain socket implementation on JRuby
+		# is still bugged as of version 1.7.0. They can
+		# cause unexplicable freezes when used in combination
+		# with threading.
+		return ruby_engine != "jruby"
+	end
+
+	def create_unix_socket_on_filesystem
+		while true
+			begin
+				if defined?(NativeSupport)
+					unix_path_max = NativeSupport::UNIX_PATH_MAX
+				else
+					unix_path_max = 100
+				end
+				socket_address = "#{passenger_tmpdir}/backends/ruby.#{generate_random_id(:base64)}"
+				socket_address = socket_address.slice(0, unix_path_max - 10)
+				socket = UNIXServer.new(socket_address)
+				socket.listen(BACKLOG_SIZE)
+				socket.close_on_exec!
+				File.chmod(0600, socket_address)
+				return ["unix:#{socket_address}", socket]
+			rescue Errno::EADDRINUSE
+				# Do nothing, try again with another name.
+			end
+		end
+	end
+	
+	def create_tcp_socket
+		# We use "127.0.0.1" as address in order to force
+		# TCPv4 instead of TCPv6.
+		socket = TCPServer.new('127.0.0.1', 0)
+		socket.listen(BACKLOG_SIZE)
+		socket.close_on_exec!
+		socket_address = "tcp://127.0.0.1:#{socket.addr[1]}"
+		return [socket_address, socket]
+	end
+
+	# Reset signal handlers to their default handler, and install some
+	# special handlers for a few signals. The previous signal handlers
+	# will be put back by calling revert_signal_handlers.
+	def reset_signal_handlers
+		Signal.list_trappable.each_key do |signal|
+			begin
+				prev_handler = trap(signal, DEFAULT)
+				if prev_handler != DEFAULT
+					@previous_signal_handlers[signal] = prev_handler
+				end
+			rescue ArgumentError
+				# Signal cannot be trapped; ignore it.
+			end
+		end
+		trap('HUP', IGNORE)
+		PhusionPassenger.call_event(:after_installing_signal_handlers)
+	end
+	
+	def install_useful_signal_handlers
+		trappable_signals = Signal.list_trappable
+		
+		trap(SOFT_TERMINATION_SIGNAL) do
+			begin
+				soft_shutdown
+			rescue => e
+				print_exception("Passenger RequestHandler soft shutdown routine", e)
+			end
+		end if trappable_signals.has_key?(SOFT_TERMINATION_SIGNAL.sub(/^SIG/, ''))
+		
+		trap('ABRT') do
+			print_status_report
+		end if trappable_signals.has_key?('ABRT')
+		trap('QUIT') do
+			print_status_report
+		end if trappable_signals.has_key?('QUIT')
+	end
+	
+	def revert_signal_handlers
+		@previous_signal_handlers.each_pair do |signal, handler|
+			trap(signal, handler)
+		end
+	end
+
+	def print_status_report
+		warn(Utils.global_backtrace_report)
+		warn("Threads: #{@threads.inspect}")
+	end
+
+	def start_threads
+		common_options = {
+			:app              => @app,
+			:app_group_name   => @app_group_name,
+			:connect_password => @connect_password,
+			:analytics_logger => @analytics_logger
+		}
+		main_socket_options = common_options.merge(
+			:server_socket => @main_socket,
+			:socket_name => "main socket",
+			:protocol => :session
+		)
+		http_socket_options = common_options.merge(
+			:server_socket => @http_socket,
+			:socket_name => "HTTP socket",
+			:protocol => :http
+		)
+
+		# Used for marking threads that have finished initializing,
+		# or failed during initialization. Threads that are not yet done
+		# are not in `initialization_state`. Threads that have succeeded
+		# set their own state to true. Threads that have failed set their
+		# own state to false.
+		initialization_state_mutex = Mutex.new
+		initialization_state_cond = ConditionVariable.new
+		initialization_state = {}
+		set_initialization_state = lambda do |value|
+			initialization_state_mutex.synchronize do
+				initialization_state[Thread.current] = value
+				initialization_state_cond.signal
+			end
+		end
+		set_initialization_state_to_true = lambda do
+			set_initialization_state.call(true)
+		end
+
+		# Actually start all the threads.
+		thread_handler = @thread_handler
+		expected_nthreads = 0
+
+		@threads_mutex.synchronize do
+			@concurrency.times do |i|
+				thread = Thread.new(i) do |number|
+					Thread.current.abort_on_exception = true
+					begin
+						Thread.current[:name] = "Worker #{number + 1}"
+						handler = thread_handler.new(self, main_socket_options)
+						handler.install
+						handler.main_loop(set_initialization_state_to_true)
+					ensure
+						set_initialization_state.call(false)
+						unregister_current_thread
+					end
+				end
+				@threads << thread
+				expected_nthreads += 1
+			end
+
+			thread = Thread.new do
+				Thread.current.abort_on_exception = true
+				begin
+					Thread.current[:name] = "HTTP helper worker"
+					handler = thread_handler.new(self, http_socket_options)
+					handler.install
+					handler.main_loop(set_initialization_state_to_true)
+				ensure
+					set_initialization_state.call(false)
+					unregister_current_thread
+				end
+			end
+			@threads << thread
+			expected_nthreads += 1
+		end
+
+		# Wait until all threads have finished starting.
+		initialization_state_mutex.synchronize do
+			while initialization_state.size != expected_nthreads
+				initialization_state_cond.wait(initialization_state_mutex)
+			end
+		end
+	end
+
+	def unregister_current_thread
+		@threads_mutex.synchronize do
+			@threads.delete(Thread.current)
+		end
+	end
+
+	def wait_until_termination_requested
+		ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
+		if ruby_engine == "jruby"
+			# On JRuby, selecting on an input TTY always returns, so
+			# we use threads to do the job.
+			owner_pipe_watcher = IO.pipe
+			owner_pipe_watcher_thread = Thread.new do
+				Thread.current.abort_on_exception = true
+				Thread.current[:name] = "Owner pipe waiter"
+				begin
+					@owner_pipe.read(1)
+				ensure
+					owner_pipe_watcher[1].write('x')
+				end
+			end
+			begin
+				ios = select([owner_pipe_watcher[0], @graceful_termination_pipe[0]])[0]
+				if ios.include?(owner_pipe_watcher[0])
+					trace(2, "Owner pipe closed")
+				else
+					trace(2, "Graceful termination pipe closed")
+				end
+			ensure
+				owner_pipe_watcher_thread.kill
+				owner_pipe_watcher_thread.join
+				owner_pipe_watcher[0].close if !owner_pipe_watcher[0].closed?
+				owner_pipe_watcher[1].close if !owner_pipe_watcher[1].closed?
+			end
+		else
+			ios = select([@owner_pipe, @graceful_termination_pipe[0]])[0]
+			if ios.include?(@owner_pipe)
+				trace(2, "Owner pipe closed")
+			else
+				trace(2, "Graceful termination pipe closed")
+			end
+		end
+	end
+
+	def wakeup_all_threads
+		threads = []
+		if get_socket_address_type(@server_sockets[:main][:address]) == :unix &&
+		   !File.exist?(@server_sockets[:main][:address].sub(/^unix:/, ''))
+			# It looks like someone deleted the Unix domain socket we listen on.
+			# This makes it impossible to wake up the worker threads gracefully,
+			# so we hard kill them.
+			warn("Unix domain socket gone; force aborting all threads")
+			@threads_mutex.synchronize do
+				@threads.each do |thread|
+					thread.raise(RuntimeError.new("Force abort"))
+				end
+			end
+		else
+			@concurrency.times do
+				Thread.abort_on_exception = true
+				threads << Thread.new(@server_sockets[:main][:address]) do |address|
+					begin
+						debug("Shutting down worker thread by connecting to #{address}")
+						connect_to_server(address).close
+					rescue Errno::ECONNREFUSED
+						debug("Worker thread listening on #{address} already exited")
+					rescue SystemCallError, IOError => e
+						debug("Error shutting down worker thread (#{address}): #{e} (#{e.class})")
+					end
+				end
+			end
+		end
+		threads << Thread.new(@server_sockets[:http][:address]) do |address|
+			Thread.abort_on_exception = true
+			begin
+				debug("Shutting down HTTP thread by connecting to #{address}")
+				connect_to_server(address).close
+			rescue Errno::ECONNREFUSED
+				debug("Worker thread listening on #{address} already exited")
+			rescue SystemCallError, IOError => e
+				debug("Error shutting down HTTP thread (#{address}): #{e} (#{e.class})")
+			end
+		end
+		return threads
+	end
+
+	def terminate_threads
+		debug("Stopping all threads")
+		threads = @threads_mutex.synchronize do
+			@threads.dup
+		end
+		threads.each do |thr|
+			thr.raise(ThreadHandler::Interrupted.new)
+		end
+		threads.each do |thr|
+			thr.join
+		end
+		debug("All threads stopped")
+	end
+	
+	def wait_until_all_threads_are_idle
+		debug("Waiting until all threads have become idle...")
+
+		# We wait until 100 ms have passed since all handlers have become
+		# interruptable and remained in the same iterations.
+		
+		done = false
+
+		while !done
+			handlers = @threads_mutex.synchronize do
+				@threads.map do |thr|
+					thr[:passenger_thread_handler]
+				end
+			end
+			debug("There are currently #{handlers.size} threads")
+			if handlers.empty?
+				# There are no threads, so we're done.
+				done = true
+				break
+			end
+
+			# Record initial state.
+			handlers.each { |h| h.stats_mutex.lock }
+			iterations = handlers.map { |h| h.iteration }
+			handlers.each { |h| h.stats_mutex.unlock }
+
+			start_time = Time.now
+			sleep 0.01
+			
+			while true
+				if handlers.size != @threads_mutex.synchronize { @threads.size }
+					debug("The number of threads changed. Restarting waiting algorithm")
+					break
+				end
+
+				# Record current state.
+				handlers.each { |h| h.stats_mutex.lock }
+				all_interruptable = handlers.all? { |h| h.interruptable }
+				new_iterations    = handlers.map  { |h| h.iteration }
+
+				# Are all threads interruptable and has there been no activity
+				# since last time we checked?
+				if all_interruptable && new_iterations == iterations
+					# Yes. If enough time has passed then we're done.
+					handlers.each { |h| h.stats_mutex.unlock }
+					if Time.now >= start_time + 0.1
+						done = true
+						break
+					end
+				else
+					# No. We reset the timer and check again later.
+					handlers.each { |h| h.stats_mutex.unlock }
+					iterations = new_iterations
+					start_time = Time.now
+					sleep 0.01
+				end
+			end
+		end
+
+		debug("All threads are now idle")
+	end
+end
+
+end # module PhusionPassenger
diff --git a/lib/phusion_passenger/request_handler/thread_handler.rb b/lib/phusion_passenger/request_handler/thread_handler.rb
new file mode 100644
index 0000000..2e092cc
--- /dev/null
+++ b/lib/phusion_passenger/request_handler/thread_handler.rb
@@ -0,0 +1,403 @@
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
+#
+#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+#
+#  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
+#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#  THE SOFTWARE.
+
+require 'phusion_passenger/constants'
+require 'phusion_passenger/debug_logging'
+require 'phusion_passenger/message_channel'
+require 'phusion_passenger/utils'
+require 'phusion_passenger/utils/unseekable_socket'
+
+module PhusionPassenger
+class RequestHandler
+
+
+# This class encapsulates the logic of a single RequestHandler thread.
+class ThreadHandler
+	include DebugLogging
+	include Utils
+
+	class Interrupted < StandardError
+	end
+
+	REQUEST_METHOD = 'REQUEST_METHOD'.freeze
+	PING           = 'PING'.freeze
+	OOBW           = 'OOBW'.freeze
+	PASSENGER_CONNECT_PASSWORD  = 'PASSENGER_CONNECT_PASSWORD'.freeze
+	CONTENT_LENGTH = 'CONTENT_LENGTH'.freeze
+	TRANSFER_ENCODING = 'TRANSFER_ENCODING'.freeze
+
+	MAX_HEADER_SIZE = 128 * 1024
+
+	OBJECT_SPACE_SUPPORTS_LIVE_OBJECTS      = ObjectSpace.respond_to?(:live_objects)
+	OBJECT_SPACE_SUPPORTS_ALLOCATED_OBJECTS = ObjectSpace.respond_to?(:allocated_objects)
+	OBJECT_SPACE_SUPPORTS_COUNT_OBJECTS     = ObjectSpace.respond_to?(:count_objects)
+	GC_SUPPORTS_TIME        = GC.respond_to?(:time)
+	GC_SUPPORTS_CLEAR_STATS = GC.respond_to?(:clear_stats)
+
+	attr_reader :thread
+	attr_reader :stats_mutex
+	attr_reader :interruptable
+	attr_reader :iteration
+
+	def initialize(request_handler, options = {})
+		@request_handler   = request_handler
+		@server_socket     = Utils.require_option(options, :server_socket)
+		@socket_name       = Utils.require_option(options, :socket_name)
+		@protocol          = Utils.require_option(options, :protocol)
+		@app_group_name    = Utils.require_option(options, :app_group_name)
+		Utils.install_options_as_ivars(self, options,
+			:app,
+			:analytics_logger,
+			:connect_password
+		)
+
+		@stats_mutex   = Mutex.new
+		@interruptable = false
+		@iteration     = 0
+
+		if @protocol == :session
+			metaclass = class << self; self; end
+			metaclass.class_eval do
+				alias parse_request parse_session_request
+			end
+		elsif @protocol == :http
+			metaclass = class << self; self; end
+			metaclass.class_eval do
+				alias parse_request parse_http_request
+			end
+		else
+			raise ArgumentError, "Unknown protocol specified"
+		end
+	end
+
+	def install
+		@thread = Thread.current
+		Thread.current[:passenger_thread_handler] = self
+		PhusionPassenger.call_event(:starting_request_handler_thread)
+	end
+
+	def main_loop(finish_callback)
+		socket_wrapper = Utils::UnseekableSocket.new
+		channel        = MessageChannel.new
+		buffer         = ''
+		buffer.force_encoding('binary') if buffer.respond_to?(:force_encoding)
+		
+		begin
+			finish_callback.call
+			while true
+				hijacked = accept_and_process_next_request(socket_wrapper, channel, buffer)
+				socket_wrapper = Utils::UnseekableSocket.new if hijacked
+			end
+		rescue Interrupted
+			# Do nothing.
+		end
+		debug("Thread handler main loop exited normally")
+	ensure
+		@stats_mutex.synchronize { @interruptable = true }
+	end
+
+private
+	# Returns true if the socket has been hijacked, false otherwise.
+	def accept_and_process_next_request(socket_wrapper, channel, buffer)
+		@stats_mutex.synchronize do
+			@interruptable = true
+		end
+		connection = socket_wrapper.wrap(@server_socket.accept)
+		@stats_mutex.synchronize do
+			@interruptable = false
+			@iteration    += 1
+		end
+		trace(3, "Accepted new request on socket #{@socket_name}")
+		channel.io = connection
+		if headers = parse_request(connection, channel, buffer)
+			prepare_request(connection, headers)
+			begin
+				if headers[REQUEST_METHOD] == PING
+					process_ping(headers, connection)
+				elsif headers[REQUEST_METHOD] == OOBW
+					process_oobw(headers, connection)
+				else
+					process_request(headers, connection, socket_wrapper, @protocol == :http)
+				end
+			rescue Exception
+				has_error = true
+				raise
+			ensure
+				if headers[RACK_HIJACK_IO]
+					socket_wrapper = nil
+					connection = nil
+					channel = nil
+				end
+				finalize_request(connection, headers, has_error)
+				trace(3, "Request done.")
+			end
+		else
+			trace(2, "No headers parsed; disconnecting client.")
+		end
+	rescue Interrupted
+		raise
+	rescue => e
+		if socket_wrapper && socket_wrapper.source_of_exception?(e)
+			# EPIPE is harmless, it just means that the client closed the connection.
+			# Other errors might indicate a problem so we print them, but they're
+			# probably not bad enough to warrant stopping the request handler.
+			if !e.is_a?(Errno::EPIPE)
+				print_exception("Passenger RequestHandler's client socket", e)
+			end
+		else
+			if @analytics_logger && headers && headers[PASSENGER_TXN_ID]
+				log_analytics_exception(headers, e)
+			end
+			raise e if should_reraise_error?(e)
+		end
+	ensure
+		# The 'close_write' here prevents forked child
+		# processes from unintentionally keeping the
+		# connection open.
+		if connection && !connection.closed?
+			begin
+				connection.close_write
+			rescue SystemCallError
+			end
+			begin
+				connection.close
+			rescue SystemCallError
+			end
+		end
+	end
+
+	def parse_session_request(connection, channel, buffer)
+		headers_data = channel.read_scalar(buffer, MAX_HEADER_SIZE)
+		if headers_data.nil?
+			return
+		end
+		headers = Utils.split_by_null_into_hash(headers_data)
+		if @connect_password && headers[PASSENGER_CONNECT_PASSWORD] != @connect_password
+			warn "*** Passenger RequestHandler warning: " <<
+				"someone tried to connect with an invalid connect password."
+			return
+		else
+			return headers
+		end
+	rescue SecurityError => e
+		warn("*** Passenger RequestHandler warning: " <<
+			"HTTP header size exceeded maximum.")
+		return
+	end
+	
+	# Like parse_session_request, but parses an HTTP request. This is a very minimalistic
+	# HTTP parser and is not intended to be complete, fast or secure, since the HTTP server
+	# socket is intended to be used for debugging purposes only.
+	def parse_http_request(connection, channel, buffer)
+		headers = {}
+		
+		data = ""
+		while data !~ /\r\n\r\n/ && data.size < MAX_HEADER_SIZE
+			data << connection.readpartial(16 * 1024)
+		end
+		if data.size >= MAX_HEADER_SIZE
+			warn("*** Passenger RequestHandler warning: " <<
+				"HTTP header size exceeded maximum.")
+			return
+		end
+		
+		data.gsub!(/\r\n\r\n.*/, '')
+		data.split("\r\n").each_with_index do |line, i|
+			if i == 0
+				# GET / HTTP/1.1
+				line =~ /^([A-Za-z]+) (.+?) (HTTP\/\d\.\d)$/
+				request_method = $1
+				request_uri    = $2
+				protocol       = $3
+				path_info, query_string    = request_uri.split("?", 2)
+				headers[REQUEST_METHOD]    = request_method
+				headers["REQUEST_URI"]     = request_uri
+				headers["QUERY_STRING"]    = query_string || ""
+				headers["SCRIPT_NAME"]     = ""
+				headers["PATH_INFO"]       = path_info
+				headers["SERVER_NAME"]     = "127.0.0.1"
+				headers["SERVER_PORT"]     = connection.addr[1].to_s
+				headers["SERVER_PROTOCOL"] = protocol
+			else
+				header, value = line.split(/\s*:\s*/, 2)
+				header.upcase!            # "Foo-Bar" => "FOO-BAR"
+				header.gsub!("-", "_")    #           => "FOO_BAR"
+				if header == CONTENT_LENGTH || header == "CONTENT_TYPE"
+					headers[header] = value
+				else
+					headers["HTTP_#{header}"] = value
+				end
+			end
+		end
+		
+		if @connect_password && headers["HTTP_X_PASSENGER_CONNECT_PASSWORD"] != @connect_password
+			warn "*** Passenger RequestHandler warning: " <<
+				"someone tried to connect with an invalid connect password."
+			return
+		else
+			return headers
+		end
+	rescue EOFError
+		return
+	end
+
+	def process_ping(env, connection)
+		connection.write("pong")
+	end
+
+	def process_oobw(env, connection)
+		PhusionPassenger.call_event(:oob_work)
+		connection.write("oobw done")
+	end
+
+#	def process_request(env, connection, socket_wrapper, full_http_response)
+#		raise NotImplementedError, "Override with your own implementation!"
+#	end
+
+	def prepare_request(connection, headers)
+		if (!headers.has_key?(CONTENT_LENGTH) && !headers.has_key?(TRANSFER_ENCODING)) ||
+		  headers[CONTENT_LENGTH] == 0
+			connection.simulate_eof!
+		end
+
+		if @analytics_logger && headers[PASSENGER_TXN_ID]
+			txn_id = headers[PASSENGER_TXN_ID]
+			union_station_key = headers[PASSENGER_UNION_STATION_KEY]
+			log = @analytics_logger.continue_transaction(txn_id,
+				@app_group_name,
+				:requests, union_station_key)
+			headers[PASSENGER_ANALYTICS_WEB_LOG] = log
+			Thread.current[PASSENGER_ANALYTICS_WEB_LOG] = log
+			Thread.current[PASSENGER_TXN_ID] = txn_id
+			Thread.current[PASSENGER_UNION_STATION_KEY] = union_station_key
+			if OBJECT_SPACE_SUPPORTS_LIVE_OBJECTS
+				log.message("Initial objects on heap: #{ObjectSpace.live_objects}")
+			end
+			if OBJECT_SPACE_SUPPORTS_ALLOCATED_OBJECTS
+				log.message("Initial objects allocated so far: #{ObjectSpace.allocated_objects}")
+			elsif OBJECT_SPACE_SUPPORTS_COUNT_OBJECTS
+				count = ObjectSpace.count_objects
+				log.message("Initial objects allocated so far: #{count[:TOTAL] - count[:FREE]}")
+			end
+			if GC_SUPPORTS_TIME
+				log.message("Initial GC time: #{GC.time}")
+			end
+			log.begin_measure("app request handler processing")
+		end
+		
+		#################
+	end
+	
+	def finalize_request(connection, headers, has_error)
+		if connection
+			connection.stop_simulating_eof!
+		end
+
+		log = headers[PASSENGER_ANALYTICS_WEB_LOG]
+		if log && !log.closed?
+			exception_occurred = false
+			begin
+				log.end_measure("app request handler processing", has_error)
+				if OBJECT_SPACE_SUPPORTS_LIVE_OBJECTS
+					log.message("Final objects on heap: #{ObjectSpace.live_objects}")
+				end
+				if OBJECT_SPACE_SUPPORTS_ALLOCATED_OBJECTS
+					log.message("Final objects allocated so far: #{ObjectSpace.allocated_objects}")
+				elsif OBJECT_SPACE_SUPPORTS_COUNT_OBJECTS
+					count = ObjectSpace.count_objects
+					log.message("Final objects allocated so far: #{count[:TOTAL] - count[:FREE]}")
+				end
+				if GC_SUPPORTS_TIME
+					log.message("Final GC time: #{GC.time}")
+				end
+				if GC_SUPPORTS_CLEAR_STATS
+					# Clear statistics to void integer wraps.
+					GC.clear_stats
+				end
+				Thread.current[PASSENGER_ANALYTICS_WEB_LOG] = nil
+			rescue Exception
+				# Maybe this exception was raised while communicating
+				# with the logging agent. If that is the case then
+				# log.close may also raise an exception, but we're only
+				# interested in the original exception. So if this
+				# situation occurs we must ignore any exceptions raised
+				# by log.close.
+				exception_occurred = true
+				raise
+			ensure
+				# It is important that the following call receives an ACK
+				# from the logging agent and that we don't close the socket
+				# connection until the ACK has been received, otherwise
+				# the helper agent may close the transaction before this
+				# process's openTransaction command is processed.
+				begin
+					log.close
+				rescue
+					raise if !exception_occurred
+				end
+			end
+		end
+		
+		#################
+	end
+	
+	def log_analytics_exception(env, exception)
+		log = @analytics_logger.new_transaction(
+			@app_group_name,
+			:exceptions,
+			env[PASSENGER_UNION_STATION_KEY])
+		begin
+			request_txn_id = env[PASSENGER_TXN_ID]
+			message = exception.message
+			message = exception.to_s if message.empty?
+			message = [message].pack('m')
+			message.gsub!("\n", "")
+			backtrace_string = [exception.backtrace.join("\n")].pack('m')
+			backtrace_string.gsub!("\n", "")
+
+			log.message("Request transaction ID: #{request_txn_id}")
+			log.message("Message: #{message}")
+			log.message("Class: #{exception.class.name}")
+			log.message("Backtrace: #{backtrace_string}")
+		ensure
+			log.close
+		end
+	end
+
+	def should_reraise_error?(e)
+		# Stubable by unit tests.
+		return true
+	end
+
+	def should_reraise_app_error?(e, socket_wrapper)
+		return false
+	end
+
+	def should_swallow_app_error?(e, socket_wrapper)
+		return socket_wrapper && socket_wrapper.source_of_exception?(e) && e.is_a?(Errno::EPIPE)
+	end
+end
+
+
+end # class RequestHandler
+end # module PhusionPassenger
diff --git a/lib/phusion_passenger/ruby_core_enhancements.rb b/lib/phusion_passenger/ruby_core_enhancements.rb
new file mode 100644
index 0000000..f4b62a2
--- /dev/null
+++ b/lib/phusion_passenger/ruby_core_enhancements.rb
@@ -0,0 +1,185 @@
+# encoding: binary
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010, 2011, 2012 Phusion
+#
+#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+#
+#  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
+#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#  THE SOFTWARE.
+
+require 'rubygems'
+require 'socket'
+require 'thread'
+if (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby") && RUBY_VERSION < "1.8.7"
+	begin
+		require 'fastthread'
+	rescue LoadError
+		abort "You are using a very old Ruby version. You must install " +
+			"the 'fastthread' gem to fix some bugs in the Ruby threading system: " +
+			"gem install fastthread"
+	end
+end
+require 'phusion_passenger/native_support'
+
+class Exception
+	def backtrace_string(current_location = nil)
+		if current_location.nil?
+			location = nil
+		else
+			location = "in #{current_location} "
+		end
+		current_thread = Thread.current
+		if !(thread_id = current_thread[:id])
+			current_thread.to_s =~ /:(0x[0-9a-f]+)/i
+			thread_id = $1 || '?'
+		end
+		if thread_name = current_thread[:name]
+			thread_name = "(#{thread_name})"
+		end
+		return "*** Exception #{self.class} #{location}" <<
+			"(#{self}) (process #{$$}, thread #{thread_id}#{thread_name}):\n" <<
+			"\tfrom " << backtrace.join("\n\tfrom ")
+	end
+end
+
+class IO
+	if defined?(PhusionPassenger::NativeSupport)
+		# Writes all of the strings in the +components+ array into the given file
+		# descriptor using the +writev()+ system call. Unlike IO#write, this method
+		# does not require one to concatenate all those strings into a single buffer
+		# in order to send the data in a single system call. Thus, #writev is a great
+		# way to perform zero-copy I/O.
+		#
+		# Unlike the raw writev() system call, this method ensures that all given
+		# data is written before returning, by performing multiple writev() calls
+		# and whatever else is necessary.
+		#
+		#   io.writev(["hello ", "world", "\n"])
+		def writev(components)
+			return PhusionPassenger::NativeSupport.writev(fileno, components)
+		end
+		
+		# Like #writev, but accepts two arrays. The data is written in the given order.
+		#
+		#   io.writev2(["hello ", "world", "\n"], ["another ", "message\n"])
+		def writev2(components, components2)
+			return PhusionPassenger::NativeSupport.writev2(fileno,
+				components, components2)
+		end
+		
+		# Like #writev, but accepts three arrays. The data is written in the given order.
+		#
+		#   io.writev3(["hello ", "world", "\n"],
+		#     ["another ", "message\n"],
+		#     ["yet ", "another ", "one", "\n"])
+		def writev3(components, components2, components3)
+			return PhusionPassenger::NativeSupport.writev3(fileno,
+				components, components2, components3)
+		end
+	else
+		def writev(components)
+			return write(components.join(''))
+		end
+
+		def writev2(components, components2)
+			data = ''
+			components.each do |component|
+				data << component
+			end
+			components2.each do |component|
+				data << component
+			end
+			return write(data)
+		end
+
+		def writev3(components, components2, components3)
+			data = ''
+			components.each do |component|
+				data << component
+			end
+			components2.each do |component|
+				data << component
+			end
+			components3.each do |component|
+				data << component
+			end
+			return write(data)
+		end
+	end
+	
+	if IO.method_defined?(:close_on_exec=)
+		def close_on_exec!
+			self.close_on_exec = true
+		end
+	else
+		require 'fcntl'
+
+		if defined?(Fcntl::F_SETFD)
+			def close_on_exec!
+				fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
+			end
+		else
+			def close_on_exec!
+			end
+		end
+	end
+end
+
+module Signal
+	# Like Signal.list, but only returns signals that we can actually trap.
+	def self.list_trappable
+		ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
+		case ruby_engine
+		when "jruby"
+			result = Signal.list
+			result.delete("QUIT")
+			result.delete("ILL")
+			result.delete("FPE")
+			result.delete("KILL")
+			result.delete("SEGV")
+			result.delete("USR1")
+			result.delete("IOT")
+			result.delete("EXIT")
+		else
+			result = Signal.list
+			result.delete("ALRM")
+			result.delete("VTALRM")
+		end
+		
+		# Don't touch SIGCHLD no matter what! On OS X waitpid() will
+		# malfunction if SIGCHLD doesn't have a correct handler.
+		result.delete("CLD")
+		result.delete("CHLD")
+		
+		# Other stuff that we don't want to trap no matter which
+		# Ruby engine.
+		result.delete("STOP")
+		
+		return result
+	end
+end
+
+module GC
+	if !respond_to?(:copy_on_write_friendly?)
+		# Checks whether the current Ruby interpreter's garbage
+		# collector is copy-on-write friendly.
+		def self.copy_on_write_friendly?
+			return false
+		end
+	end
+end
diff --git a/lib/phusion_passenger/simple_benchmarking.rb b/lib/phusion_passenger/simple_benchmarking.rb
index 34323d7..721d35d 100644
--- a/lib/phusion_passenger/simple_benchmarking.rb
+++ b/lib/phusion_passenger/simple_benchmarking.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/lib/phusion_passenger/spawn_manager.rb b/lib/phusion_passenger/spawn_manager.rb
deleted file mode 100644
index c136e79..0000000
--- a/lib/phusion_passenger/spawn_manager.rb
+++ /dev/null
@@ -1,359 +0,0 @@
-# encoding: binary
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'phusion_passenger'
-require 'phusion_passenger/abstract_server'
-require 'phusion_passenger/abstract_server_collection'
-require 'phusion_passenger/constants'
-require 'phusion_passenger/utils'
-
-# Define a constant with a name that's unlikely to clash with anything the
-# application defines, so that they can detect whether they're running under
-# Phusion Passenger.
-IN_PHUSION_PASSENGER = true
-
-module PhusionPassenger
-
-# The spawn manager is capable of spawning Ruby on Rails or Rack application
-# instances. It acts like a simple fascade for the rest of the spawn manager
-# system.
-#
-# *Note*: SpawnManager may only be started synchronously with
-# AbstractServer#start_synchronously. Starting asynchronously has not been
-# tested. Don't forget to call cleanup after the server's main loop has
-# finished.
-#
-# == Ruby on Rails optimizations
-#
-# Spawning a Ruby on Rails application is usually slow. But SpawnManager
-# will preload and cache Ruby on Rails frameworks, as well as application
-# code, so subsequent spawns will be very fast.
-#
-# Internally, SpawnManager uses ClassicRails::FrameworkSpawner to preload and cache
-# Ruby on Rails frameworks. ClassicRails::FrameworkSpawner, in turn, uses
-# ClassicRails::ApplicationSpawner to preload and cache application code.
-#
-# In case you're wondering why the namespace is "ClassicRails" and not "Rails":
-# it's to work around an obscure bug in ActiveSupport's Dispatcher.
-class SpawnManager < AbstractServer
-	include Utils
-	
-	def initialize(options = {})
-		super("", "")
-		@options = options
-		@spawners = AbstractServerCollection.new
-		define_message_handler(:spawn_application, :handle_spawn_application)
-		define_message_handler(:reload, :handle_reload)
-		define_signal_handler('SIGHUP', :reload)
-		
-		# Start garbage collector in order to free up some existing
-		# heap slots. This prevents the heap from growing unnecessarily
-		# during the startup phase.
-		GC.start
-		if GC.copy_on_write_friendly?
-			# Preload libraries for copy-on-write semantics.
-			require 'base64'
-			require 'phusion_passenger/app_process'
-			require 'phusion_passenger/classic_rails/framework_spawner'
-			require 'phusion_passenger/classic_rails/application_spawner'
-			require 'phusion_passenger/rack/application_spawner'
-			require 'phusion_passenger/html_template'
-			require 'phusion_passenger/platform_info'
-			require 'phusion_passenger/exceptions'
-		end
-	end
-	
-	# Spawns an application with the given spawn options. When successful, an
-	# AppProcess object will be returned, which represents the spawned application
-	# process.
-	#
-	# Most options are explained in PoolOptions.h.
-	#
-	# Mandatory options:
-	# - 'app_root'
-	#
-	# Optional options:
-	# - 'app_type'
-	# - 'environment'
-	# - 'spawn_method'
-	# - 'user',
-	# - 'group'
-	# - 'default_user'
-	# - 'default_group'
-	# - 'framework_spawner_timeout'
-	# - 'app_spawner_timeout'
-	# - 'environment_variables': Environment variables which should be passed
-	#   to the spawned application process. This is NULL-seperated string of
-	#   key-value pairs, encoded in base64. The last byte in the unencoded
-	#   data must be a NULL.
-	# - 'base_uri'
-	# - 'print_exceptions'
-	#
-	# <b>Exceptions:</b>
-	# - InvalidPath: +app_root+ doesn't appear to be a valid Ruby on Rails application root.
-	# - VersionNotFound: The Ruby on Rails framework version that the given application requires
-	#   is not installed.
-	# - AbstractServer::ServerError: One of the server processes exited unexpectedly.
-	# - FrameworkInitError: The Ruby on Rails framework that the application requires could not be loaded.
-	# - AppInitError: The application raised an exception or called exit() during startup.
-	def spawn_application(options)
-		if !options["app_root"]
-			raise ArgumentError, "The 'app_root' option must be given."
-		end
-		options = sanitize_spawn_options(options)
-		
-		case options["app_type"]
-		when "rails"
-			if !defined?(ClassicRails::FrameworkSpawner)
-				require 'phusion_passenger/classic_rails/framework_spawner'
-				require 'phusion_passenger/classic_rails/application_spawner'
-			end
-			return spawn_rails_application(options)
-		when "rack"
-			if !defined?(Rack::ApplicationSpawner)
-				require 'phusion_passenger/rack/application_spawner'
-			end
-			return spawn_rack_application(options)
-		when "wsgi"
-			if !defined?(WSGI::ApplicationSpawner)
-				require 'phusion_passenger/wsgi/application_spawner'
-			end
-			return WSGI::ApplicationSpawner.spawn_application(options)
-		else
-			raise ArgumentError, "Unknown 'app_type' value '#{options["app_type"]}'."
-		end
-	end
-	
-	# Remove the cached application instances at the given group name.
-	# If nil is specified as group name, then all cached application
-	# instances will be removed, no matter the group name.
-	#
-	# <b>Long description:</b>
-	# Application code might be cached in memory. But once it a while, it will
-	# be necessary to reload the code for an application, such as after
-	# deploying a new version of the application. This method makes sure that
-	# any cached application code is removed, so that the next time an
-	# application instance is spawned, the application code will be freshly
-	# loaded into memory.
-	#
-	# Raises AbstractServer::SpawnError if something went wrong.
-	def reload(app_group_name = nil)
-		@spawners.synchronize do
-			if app_group_name
-				# Stop and delete associated ApplicationSpawner.
-				@spawners.delete("app:#{app_group_name}")
-				# Propagate reload command to associated FrameworkSpawner.
-				@spawners.each do |spawner|
-					if spawner.respond_to?(:reload)
-						spawner.reload(app_group_name)
-					end
-				end
-			else
-				# Stop and delete all spawners.
-				@spawners.clear
-			end
-		end
-	end
-	
-	# Cleanup resources. Should be called when this SpawnManager is no longer needed.
-	def cleanup
-		@spawners.cleanup
-	end
-
-private
-	def spawn_rails_application(options)
-		app_root       = options["app_root"]
-		app_group_name = options["app_group_name"]
-		spawn_method   = options["spawn_method"]
-		spawner        = nil
-		create_spawner = nil
-		key            = nil
-		
-		case spawn_method
-		when nil, "", "smart", "smart-lv2"
-			if spawn_method != "smart-lv2"
-				framework_version = AppProcess.detect_framework_version(app_root)
-			end
-			if framework_version.nil? || framework_version == :vendor
-				key = "app:#{app_group_name}"
-				create_spawner = proc do
-					ClassicRails::ApplicationSpawner.new(@options.merge(options))
-				end
-				spawner_timeout = options["app_spawner_timeout"]
-			else
-				key = "version:#{framework_version}"
-				create_spawner = proc do
-					options["framework_version"] = framework_version
-					ClassicRails::FrameworkSpawner.new(@options.merge(options))
-				end
-				spawner_timeout = options["framework_spawner_timeout"]
-			end
-			
-			@spawners.synchronize do
-				spawner = @spawners.lookup_or_add(key) do
-					spawner = create_spawner.call
-					if spawner_timeout != -1
-						spawner.max_idle_time = spawner_timeout
-					end
-					spawner.start
-					spawner
-				end
-				begin
-					return spawner.spawn_application(options)
-				rescue AbstractServer::ServerError
-					@spawners.delete(key)
-					raise
-				end
-			end
-		else
-			return ClassicRails::ApplicationSpawner.spawn_application(
-				@options.merge(options))
-		end
-	end
-	
-	def spawn_rack_application(options)
-		app_group_name = options["app_group_name"]
-		spawn_method   = options["spawn_method"]
-		spawner        = nil
-		create_spawner = nil
-		key            = nil
-		
-		case spawn_method
-		when nil, "", "smart", "smart-lv2"
-			@spawners.synchronize do
-				key = "app:#{app_group_name}"
-				spawner = @spawners.lookup_or_add(key) do
-					spawner_timeout = options["app_spawner_timeout"]
-					spawner = Rack::ApplicationSpawner.new(
-						@options.merge(options))
-					if spawner_timeout != -1
-						spawner.max_idle_time = spawner_timeout
-					end
-					spawner.start
-					spawner
-				end
-				begin
-					return spawner.spawn_application(options)
-				rescue AbstractServer::ServerError
-					@spawners.delete(key)
-					raise
-				end
-			end
-		else
-			return Rack::ApplicationSpawner.spawn_application(
-				@options.merge(options))
-		end
-	end
-	
-	def handle_spawn_application(client, *options)
-		options     = sanitize_spawn_options(Hash[*options])
-		app_process = nil
-		app_root    = options["app_root"]
-		app_type    = options["app_type"]
-		begin
-			app_process = spawn_application(options)
-		rescue AbstractServer::ServerError => e
-			send_error_page(client, 'general_error', :error => e)
-		rescue VersionNotFound => e
-			send_error_page(client, 'version_not_found', :error => e, :app_root => app_root)
-		rescue AppInitError => e
-			if database_error?(e)
-				send_error_page(client, 'database_error', :error => e,
-					:app_root => app_root, :app_name => app_name(app_type),
-					:app_type => app_type)
-			elsif load_error?(e)
-				# A source file failed to load, maybe because of a
-				# missing gem. If that's the case then the sysadmin
-				# will install probably the gem. So we clear RubyGems's
-				# cache so that it can detect new gems.
-				Gem.clear_paths
-				send_error_page(client, 'load_error', :error => e, :app_root => app_root,
-					:app_name => app_name(app_type))
-			elsif e.child_exception.is_a?(SystemExit)
-				send_error_page(client, 'app_exited_during_initialization', :error => e,
-					:app_root => app_root, :app_name => app_name(app_type))
-			else
-				send_error_page(client, 'app_init_error', :error => e,
-					:app_root => app_root, :app_name => app_name(app_type))
-			end
-		rescue FrameworkInitError => e
-			send_error_page(client, 'framework_init_error', :error => e)
-		end
-		if app_process
-			begin
-				client.write('ok')
-				app_process.write_to_channel(client)
-			rescue Errno::EPIPE
-				# The Apache module may be interrupted during a spawn command,
-				# in which case it will close the connection. We ignore this error.
-			ensure
-				app_process.close
-			end
-		end
-	end
-	
-	def handle_reload(client, app_group_name)
-		reload(app_group_name)
-	end
-	
-	def send_error_page(channel, template_name, options = {})
-		require 'phusion_passenger/html_template' unless defined?(HTMLTemplate)
-		if !defined?(PlatformInfo)
-			require 'phusion_passenger/platform_info'
-			require 'phusion_passenger/platform_info/ruby'
-		end
-		options["enterprisey"] = File.exist?("#{SOURCE_ROOT}/enterprisey.txt") ||
-			File.exist?("/etc/passenger_enterprisey.txt")
-		data = HTMLTemplate.new(template_name, options).result
-		channel.write('error_page')
-		channel.write_scalar(data)
-	end
-	
-	def database_error?(e)
-		return ( defined?(Mysql::Error) && e.child_exception.is_a?(Mysql::Error) ) ||
-		       ( e.child_exception.is_a?(UnknownError) &&
-		           (
-		               e.child_exception.real_class_name =~ /^ActiveRecord/ ||
-		               e.child_exception.real_class_name =~ /^Mysql::/
-		           )
-		       )
-	end
-	
-	def load_error?(e)
-		return e.child_exception.is_a?(LoadError) || (
-		           e.child_exception.is_a?(UnknownError) &&
-		           e.child_exception.real_class_name == "MissingSourceFile"
-		)
-	end
-	
-	def app_name(app_type)
-		if app_type == "rails"
-			return "Ruby on Rails"
-		else
-			return "Ruby (Rack)"
-		end
-	end
-end
-
-end # module PhusionPassenger
diff --git a/lib/phusion_passenger/standalone/app_finder.rb b/lib/phusion_passenger/standalone/app_finder.rb
index a68dc7e..8d6837c 100644
--- a/lib/phusion_passenger/standalone/app_finder.rb
+++ b/lib/phusion_passenger/standalone/app_finder.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/lib/phusion_passenger/standalone/command.rb b/lib/phusion_passenger/standalone/command.rb
index 8810427..cbf4250 100644
--- a/lib/phusion_passenger/standalone/command.rb
+++ b/lib/phusion_passenger/standalone/command.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010, 2011, 2012 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -22,6 +22,7 @@
 #  THE SOFTWARE.
 require 'optparse'
 require 'phusion_passenger'
+require 'phusion_passenger/constants'
 require 'phusion_passenger/standalone/utils'
 
 module PhusionPassenger
@@ -34,8 +35,9 @@ class Command
 		:env           => ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development',
 		:max_pool_size => 6,
 		:min_instances => 1,
-		:spawn_method  => 'smart-lv2',
-		:nginx_version => PREFERRED_NGINX_VERSION
+		:spawn_method  => Kernel.respond_to?(:fork) ? 'smart' : 'direct',
+		:nginx_version => PREFERRED_NGINX_VERSION,
+		:friendly_error_pages => true
 	}.freeze
 	
 	include Utils
@@ -61,13 +63,13 @@ private
 				require 'daemon_controller'
 				begin
 					require 'daemon_controller/version'
-					too_old = DaemonController::VERSION_STRING < '1.0.0'
+					too_old = DaemonController::VERSION_STRING < '1.1.0'
 				rescue LoadError
 					too_old = true
 				end
 				if too_old
 					error "Your version of daemon_controller is too old. " <<
-					      "You must install 1.0.0 or later. Please upgrade:\n\n" <<
+					      "You must install 1.1.0 or later. Please upgrade:\n\n" <<
 					      
 					      " sudo gem uninstall FooBarWidget-daemon_controller\n" <<
 					      " sudo gem install daemon_controller"
@@ -100,7 +102,7 @@ private
 	def parse_options!(command_name, description = nil)
 		help = false
 		
-		global_config_file = File.join(ENV['HOME'], LOCAL_DIR, "standalone", "config")
+		global_config_file = File.join(ENV['HOME'], USER_NAMESPACE_DIRNAME, "standalone", "config")
 		if File.exist?(global_config_file)
 			require 'phusion_passenger/standalone/config_file' unless defined?(ConfigFile)
 			global_options = ConfigFile.new(:global_config, global_config_file).options
@@ -142,6 +144,13 @@ private
 		result.strip!
 		return result
 	end
+
+	def ensure_directory_exists(dir)
+		if !File.exist?(dir)
+			require_file_utils
+			FileUtils.mkdir_p(dir)
+		end
+	end
 	
 	def determine_various_resource_locations(create_subdirs = true)
 		require_app_finder
@@ -172,19 +181,41 @@ private
 	
 	def write_nginx_config_file
 		require 'phusion_passenger/platform_info/ruby'
-		ensure_directory_exists(@temp_dir)
+		require 'phusion_passenger/utils/tmpio'
+		@temp_dir = PhusionPassenger::Utils.mktmpdir(
+			"passenger-standalone.")
+		@config_filename = "#{@temp_dir}/config"
+		location_config_filename = "#{@temp_dir}/locations.ini"
+		File.chmod(0755, @temp_dir)
+		
+		File.open(location_config_filename, 'w') do |f|
+			f.puts '[locations]'
+			f.puts "natively_packaged=false"
+			f.puts "bin=#{PhusionPassenger.bin_dir}"
+			if debugging?
+				f.puts "agents=#{PhusionPassenger.agents_dir}"
+			else
+				f.puts "agents=#{@runtime_dirs[:support_dir]}/agents"
+			end
+			f.puts "libdir=#{PhusionPassenger.lib_dir}"
+			f.puts "helper_scripts=#{PhusionPassenger.helper_scripts_dir}"
+			f.puts "resources=#{PhusionPassenger.resources_dir}"
+			f.puts "includedir=#{PhusionPassenger.include_dir}"
+			f.puts "doc=#{PhusionPassenger.doc_dir}"
+			f.puts "rubylibdir=#{PhusionPassenger.ruby_libdir}"
+			f.puts "apache2_module=#{PhusionPassenger.apache2_module_path}"
+			f.puts "ruby_extension_source=#{PhusionPassenger.ruby_extension_source_dir}"
+		end
+		puts File.read(location_config_filename) if debugging?
 		
 		File.open(@config_filename, 'w') do |f|
 			f.chmod(0644)
-			template_filename = File.join(TEMPLATES_DIR, "standalone", "config.erb")
+			template_filename = File.join(PhusionPassenger.resources_dir,
+				"templates", "standalone", "config.erb")
 			require_erb
 			erb = ERB.new(File.read(template_filename))
+			current_user = Etc.getpwuid(Process.uid).name
 			
-			if debugging?
-				passenger_root = SOURCE_ROOT
-			else
-				passenger_root = passenger_support_files_dir
-			end
 			# The template requires some helper methods which are defined in start_command.rb.
 			output = erb.result(binding)
 			f.write(output)
@@ -196,7 +227,7 @@ private
 		if @options[:nginx_bin]
 			nginx_bin = @options[:nginx_bin]
 		else
-			nginx_bin = "#{nginx_dir}/sbin/nginx"
+			nginx_bin = "#{@runtime_dirs[:nginx_dir]}/nginx"
 		end
 		return "#{nginx_bin} -c '#{@config_filename}' -p '#{@temp_dir}/'"
 	end
@@ -213,8 +244,6 @@ private
 	def create_nginx_controller(extra_options = {})
 		require_daemon_controller
 		require 'socket' unless defined?(UNIXSocket)
-		@temp_dir        = "/tmp/passenger-standalone.#{$$}"
-		@config_filename = "#{@temp_dir}/config"
 		if @options[:socket_file]
 			ping_spec = [:unix, @options[:socket_file]]
 		else
diff --git a/lib/phusion_passenger/standalone/config_file.rb b/lib/phusion_passenger/standalone/config_file.rb
index 7849fc2..8442814 100644
--- a/lib/phusion_passenger/standalone/config_file.rb
+++ b/lib/phusion_passenger/standalone/config_file.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/lib/phusion_passenger/standalone/help_command.rb b/lib/phusion_passenger/standalone/help_command.rb
index c78f7a4..07554e4 100644
--- a/lib/phusion_passenger/standalone/help_command.rb
+++ b/lib/phusion_passenger/standalone/help_command.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/lib/phusion_passenger/standalone/main.rb b/lib/phusion_passenger/standalone/main.rb
index ec3a57f..5039aba 100644
--- a/lib/phusion_passenger/standalone/main.rb
+++ b/lib/phusion_passenger/standalone/main.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -82,18 +82,33 @@ class Main
 
 private
 	def command_exists?(name)
-		return COMMANDS.any? do |element|
-			element[0] == name
-		end
+		return !!find_command_spec(name)
 	end
 	
 	def run_command(name, args = [])
-		Main.each_command do |command_name, command_class|
-			if command_name == name
-				return command_class.new(args).run
+		if spec = find_command_spec(name)
+			klass = get_command_class(spec)
+			klass.require_libs if klass.respond_to?(:require_libs)
+			klass.new(args).run
+		else
+			raise ArgumentError, "Command '#{name}' doesn't exist"
+		end
+	end
+
+	def find_command_spec(name)
+		COMMANDS.each do |spec|
+			if spec[0] == name
+				return spec
 			end
 		end
-		raise ArgumentError, "Command '#{name}' doesn't exist"
+		return nil
+	end
+
+	def get_command_class(spec)
+		command_name, class_name = spec
+		filename = command_name.sub(/-/, '_') + "_command"
+		require "phusion_passenger/standalone/#{filename}"
+		return Standalone.const_get(class_name)
 	end
 end
 
diff --git a/lib/phusion_passenger/standalone/package_runtime_command.rb b/lib/phusion_passenger/standalone/package_runtime_command.rb
index a9d3ab6..ca2c597 100644
--- a/lib/phusion_passenger/standalone/package_runtime_command.rb
+++ b/lib/phusion_passenger/standalone/package_runtime_command.rb
@@ -1,4 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
+# encoding: utf-8
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -20,7 +21,6 @@
 #  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 #  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #  THE SOFTWARE.
-require 'phusion_passenger/standalone/command'
 
 module PhusionPassenger
 module Standalone
@@ -29,7 +29,12 @@ class PackageRuntimeCommand < Command
 	def self.description
 		return "Package the Phusion Passenger Standalone runtime."
 	end
-	
+
+	def self.require_libs
+		require 'phusion_passenger/platform_info/binary_compatibility'
+		require 'phusion_passenger/standalone/runtime_installer'
+	end
+
 	def run
 		destdir = File.expand_path("passenger-standalone")
 		description =
@@ -41,41 +46,48 @@ class PackageRuntimeCommand < Command
 				@options[:nginx_version] = value
 			end
 			opts.on("--nginx-tarball FILENAME", String,
-				wrap_desc("Use the given tarball instead of downloading from the Internet")) do |value|
+				wrap_desc("Use the given tarball instead of downloading from the Internet. " +
+					"This tarball *must* match the version specified by --nginx-version!")) do |value|
 				@options[:nginx_tarball] = value
 			end
 		end
 		
 		destdir     = File.expand_path(@args[0]) if @args[0]
-		runtime_dir = "#{destdir}/#{runtime_version_string}"
-		support_dir = "#{runtime_dir}/support"
-		nginx_dir   = "#{runtime_dir}/nginx-#{@options[:nginx_version]}"
+		runtime_dir = "#{destdir}/#{PhusionPassenger::VERSION_STRING}"
+		support_dir = "#{runtime_dir}/support-#{PlatformInfo.cxx_binary_compatibility_id}"
+		ruby_dir    = "#{runtime_dir}/rubyext-#{PlatformInfo.ruby_extension_binary_compatibility_id}"
+		nginx_dir   = "#{runtime_dir}/nginx-#{@options[:nginx_version]}-#{PlatformInfo.cxx_binary_compatibility_id}"
 		
 		sh "rm", "-rf", support_dir
 		sh "rm", "-rf", nginx_dir
 		
-		require 'phusion_passenger/standalone/runtime_installer'
 		installer = RuntimeInstaller.new(
-			:source_root => SOURCE_ROOT,
+			:targets     => [:nginx, :ruby, :support_binaries],
 			:support_dir => support_dir,
+			:ruby_dir    => ruby_dir,
 			:nginx_dir   => nginx_dir,
-			:version     => @options[:nginx_version],
-			:tarball     => @options[:nginx_tarball],
+			:nginx_version     => @options[:nginx_version],
+			:nginx_tarball     => @options[:nginx_tarball],
 			:download_binaries => false)
-		installer.start
+		installer.run
 		
 		Dir.chdir(support_dir) do
 			support_dir_name = File.basename(support_dir)
 			puts "cd #{support_dir}"
 			sh "tar -c . | gzip --best > ../#{support_dir_name}.tar.gz"
 		end
+		Dir.chdir(ruby_dir) do
+			ruby_dir_name = File.basename(ruby_dir)
+			puts "cd #{ruby_dir}"
+			sh "tar -c . | gzip --best > ../#{ruby_dir_name}.tar.gz"
+		end
 		Dir.chdir(nginx_dir) do
 			nginx_dir_name   = File.basename(nginx_dir)
 			puts "cd #{nginx_dir}"
 			sh "tar -c . | gzip --best > ../#{nginx_dir_name}.tar.gz"
 		end
 		puts "cd #{runtime_dir}"
-		sh "rm", "-rf", support_dir, nginx_dir
+		sh "rm", "-rf", support_dir, ruby_dir, nginx_dir
 	end
 
 private
diff --git a/lib/phusion_passenger/standalone/runtime_installer.rb b/lib/phusion_passenger/standalone/runtime_installer.rb
index ff9a586..9831b91 100644
--- a/lib/phusion_passenger/standalone/runtime_installer.rb
+++ b/lib/phusion_passenger/standalone/runtime_installer.rb
@@ -1,5 +1,7 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  encoding: utf-8
+#
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2013 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -24,9 +26,11 @@ require 'fileutils'
 require 'phusion_passenger'
 require 'phusion_passenger/abstract_installer'
 require 'phusion_passenger/packaging'
-require 'phusion_passenger/dependencies'
+require 'phusion_passenger/common_library'
 require 'phusion_passenger/platform_info/ruby'
+require 'phusion_passenger/platform_info/binary_compatibility'
 require 'phusion_passenger/standalone/utils'
+require 'phusion_passenger/utils/tmpio'
 
 module PhusionPassenger
 module Standalone
@@ -37,28 +41,34 @@ module Standalone
 # non-interactive.
 #
 # The following option must be given:
-# - source_root: Path to the Phusion Passenger source root.
+# - targets: An array containing at least one of:
+#   * :nginx - to indicate that you want to compile and install Nginx.
+#   * :support_binaries - to indicate that you want to compile and install the
+#                         Phusion Passenger support binary files.
+#   * :ruby - to indicate that you want to compile and install the Ruby
+#             extension files.
 #
-# If you want RuntimeInstaller to compile and install Nginx, then you must
-# specify these options:
+# If 'targets' contains :nginx, then you must also specify these options:
 # - nginx_dir: Nginx will be installed into this directory.
-# - support_dir: See below.
-# - version (optional): The Nginx version to download. If not given then a
+# - support_dir: Path to the Phusion Passenger support binary files.
+# - nginx_version (optional): The Nginx version to download. If not given then a
 #   hardcoded version number will be used.
-# - tarball (optional): The location to the Nginx tarball. This tarball *must*
+# - nginx_tarball (optional): The location to the Nginx tarball. This tarball *must*
 #   contain the Nginx version as specified by +version+. If +tarball+ is given
 #   then Nginx will not be downloaded; it will be extracted from this tarball
 #   instead.
 #
-# If you want RuntimeInstaller to compile and install the Phusion Passenger
-# support files, then you must specify these:
-# - support_dir: The support files will be installed here. Should not equal
-#   +source_root+, or funny things might happen.
+# If targets contains ':support_binaries', then you must also specify this
+# options:
+# - support_dir: The support binary files will be installed here.
+#
+# If targets contains ':ruby', then you must also specify this option:
+# - ruby_dir: The support binary files will be installed here.
 #
 # Other optional options:
 # - download_binaries: If true then RuntimeInstaller will attempt to download
-#   precompiled Nginx binaries and precompiled Phusion Passenger support files
-#   from the network, if they exist for the current platform. The default is
+#   precompiled Nginx binaries and precompiled Phusion Passenger support binary
+#   files from the network, if they exist for the current platform. The default is
 #   false.
 # - binaries_url_root: The URL on which to look for the aforementioned binaries.
 #   The default points to the Phusion website.
@@ -74,53 +84,75 @@ class RuntimeInstaller < AbstractInstaller
 	
 protected
 	def dependencies
-		result = [
-			Dependencies::GCC,
-			Dependencies::GnuMake,
-			Dependencies::DownloadTool,
-			Dependencies::Ruby_DevHeaders,
-			Dependencies::Ruby_OpenSSL,
-			Dependencies::RubyGems,
-			Dependencies::Rake,
-			Dependencies::Rack,
-			Dependencies::Curl_Dev,
-			Dependencies::OpenSSL_Dev,
-			Dependencies::Zlib_Dev,
-			Dependencies::Daemon_Controller,
+		specs = [
+			'depcheck_specs/compiler_toolchain',
+			'depcheck_specs/ruby',
+			'depcheck_specs/gems',
+			'depcheck_specs/libs',
+			'depcheck_specs/utilities'
 		]
-		if Dependencies.fastthread_required?
-			result << Dependencies::FastThread
-		end
-		if Dependencies.mizuho_required?
-			result << Dependencies::Mizuho
-		end
-		return result
+		ids = [
+			'gcc',
+			'g++',
+			'gmake',
+			'download-tool',
+			PlatformInfo.passenger_needs_ruby_dev_header? ? 'ruby-dev' : nil,
+			'ruby-openssl',
+			'rubygems',
+			'rake',
+			'rack',
+			'libcurl-dev',
+			'openssl-dev',
+			'zlib-dev',
+			'pcre-dev',
+			'daemon_controller >= 1.1.0'
+		].compact
+		return [specs, ids]
 	end
 	
 	def users_guide
-		return "#{DOCDIR}/Users guide Standalone.html"
+		return "#{PhusionPassenger.doc_dir}/Users guide Standalone.html"
 	end
 	
-	def install!
+	def run_steps
 		if @support_dir && @nginx_dir
 			show_welcome_screen
 		end
 		check_dependencies(false) || exit(1)
+		check_whether_os_is_broken
+		check_whether_system_has_enough_ram
 		puts
-		if passenger_support_files_need_to_be_installed?
+		
+		phase = 1
+		total_phases = 0
+		
+		if binary_support_files_should_be_installed?
 			check_whether_we_can_write_to(@support_dir) || exit(1)
+			total_phases += 4
+		end
+		if ruby_extension_should_be_installed?
+			check_whether_we_can_write_to(@ruby_dir) || exit(1)
+			total_phases += 2
 		end
 		if nginx_needs_to_be_installed?
 			check_whether_we_can_write_to(@nginx_dir) || exit(1)
+			total_phases += 4
 		end
 		
-		if passenger_support_files_need_to_be_installed? && should_download_binaries?
-			download_and_extract_passenger_binaries(@support_dir) do |progress, total|
+		if binary_support_files_should_be_installed? && should_download_binaries?
+			download_and_extract_binary_support_files(@support_dir) do |progress, total|
 				show_progress(progress, total, 1, 1, "Extracting Passenger binaries...")
 			end
 			puts
 			puts
 		end
+		if ruby_extension_should_be_installed? && should_download_binaries?
+			download_and_extract_ruby_extension(@ruby_dir) do |progress, total|
+				show_progress(progress, total, 1, 1, "Extracting Ruby extension...")
+			end
+			puts
+			puts
+		end
 		if nginx_needs_to_be_installed? && should_download_binaries?
 			download_and_extract_nginx_binaries(@nginx_dir) do |progress, total|
 				show_progress(progress, total, 1, 1, "Extracting Nginx binaries...")
@@ -131,57 +163,72 @@ protected
 		
 		if nginx_needs_to_be_installed?
 			nginx_source_dir = download_and_extract_nginx_sources do |progress, total|
-				show_progress(progress, total, 1, 7, "Extracting...")
+				show_progress(progress, total, phase, total_phases, "Extracting...")
 			end
+			phase += 1
 			if nginx_source_dir.nil?
 				puts
 				show_possible_solutions_for_download_and_extraction_problems
 				exit(1)
 			end
 		end
-		if passenger_support_files_need_to_be_installed?
-			install_passenger_support_files do |progress, total, phase, status_text|
-				if phase == 1
-					show_progress(progress, total, 2, 7, status_text)
+		if ruby_extension_should_be_installed?
+			phase += install_ruby_extension do |progress, total, subphase, status_text|
+				show_progress(progress, total, phase + subphase, total_phases, status_text)
+			end
+		end
+		if binary_support_files_should_be_installed?
+			install_binary_support_files do |progress, total, subphase, status_text|
+				if subphase == 0
+					show_progress(progress, total, phase, total_phases, status_text)
 				else
-					show_progress(progress, total, 3..5, 7, status_text)
+					show_progress(progress, total, phase + 1 .. phase + 3, total_phases, status_text)
 				end
 			end
+			phase += 4
 		end
 		if nginx_needs_to_be_installed?
 			install_nginx_from_source(nginx_source_dir) do |progress, total, status_text|
-				show_progress(progress, total, 6..7, 7, status_text)
+				show_progress(progress, total, phase .. phase + 2, total_phases, status_text)
 			end
+			phase += 3
 		end
 		
 		puts
-		color_puts "<green><b>All done!</b></green>"
+		puts "<green><b>All done!</b></green>"
 		puts
 	end
 	
 	def before_install
 		super
 		@plugin.call_hook(:runtime_installer_start, self) if @plugin
-		@working_dir = "/tmp/#{myself}-passenger-standalone-#{Process.pid}"
-		FileUtils.rm_rf(@working_dir)
-		FileUtils.mkdir_p(@working_dir)
+		@working_dir = PhusionPassenger::Utils.mktmpdir("passenger.", PlatformInfo.tmpexedir)
 		@download_binaries = true if !defined?(@download_binaries)
 		@binaries_url_root ||= STANDALONE_BINARIES_URL_ROOT
 	end
 
 	def after_install
 		super
-		FileUtils.rm_rf(@working_dir)
+		FileUtils.remove_entry_secure(@working_dir) if @working_dir
 		@plugin.call_hook(:runtime_installer_cleanup) if @plugin
 	end
 
 private
 	def nginx_needs_to_be_installed?
-		return @nginx_dir && !File.exist?("#{@nginx_dir}/sbin/nginx")
+		return @targets.include?(:nginx) &&
+			!File.exist?("#{@nginx_dir}/sbin/nginx")
+	end
+	
+	def ruby_extension_should_be_installed?
+		return @targets.include?(:ruby) &&
+			!File.exist?("#{@ruby_dir}/#{PlatformInfo.ruby_extension_binary_compatibility_id}")
 	end
 	
-	def passenger_support_files_need_to_be_installed?
-		return @support_dir && !File.exist?("#{@support_dir}/Rakefile")
+	def binary_support_files_should_be_installed?
+		return @targets.include?(:support_binaries) && (
+			!File.exist?("#{@support_dir}/buildout/agents/PassengerHelperAgent") ||
+			!File.exist?("#{@support_dir}/buildout/common/libpassenger_common.a")
+		)
 	end
 	
 	def should_download_binaries?
@@ -190,7 +237,7 @@ private
 	
 	def show_welcome_screen
 		render_template 'standalone/welcome',
-			:version => @version,
+			:version => @nginx_version,
 			:dir => @nginx_dir
 		puts
 	end
@@ -237,7 +284,7 @@ private
 	def begin_progress_bar
 		if !@begun
 			@begun = true
-			color_puts "<banner>Installing Phusion Passenger Standalone...</banner>"
+			puts "<banner>Installing Phusion Passenger Standalone...</banner>"
 		end
 	end
 	
@@ -249,8 +296,9 @@ private
 	
 	def extract_tarball(filename)
 		File.open(filename, 'rb') do |f|
-			IO.popen("tar xzf -", "w") do |io|
+			IO.popen("tar xzf -", "wb") do |io|
 				buffer = ''
+				buffer = buffer.force_encoding('binary') if buffer.respond_to?(:force_encoding)
 				total_size = File.size(filename)
 				bytes_read = 0
 				yield(bytes_read, total_size)
@@ -341,12 +389,32 @@ private
 		end
 	end
 	
-	def download_and_extract_passenger_binaries(target, &block)
-		color_puts "<banner>Downloading Passenger binaries for your platform, if available...</banner>"
-		url     = "#{@binaries_url_root}/#{runtime_version_string}/support.tar.gz"
-		tarball = "#{@working_dir}/support.tar.gz"
+	def download_and_extract_binary_support_files(target, &block)
+		puts "<banner>Downloading Passenger support binaries for your platform, if available...</banner>"
+		basename = "support-#{PlatformInfo.cxx_binary_compatibility_id}.tar.gz"
+		url      = "#{@binaries_url_root}/#{PhusionPassenger::VERSION_STRING}/#{basename}"
+		tarball  = "#{@working_dir}/#{basename}"
 		if !download(url, tarball)
-			color_puts "<b>Looks like it's not. But don't worry, the " +
+			puts "<b>Looks like it's not. But don't worry, the " +
+				"necessary binaries will be compiled from source instead.</b>"
+			return nil
+		end
+		
+		FileUtils.mkdir_p(target)
+		Dir.chdir(target) do
+			return extract_tarball(tarball, &block)
+		end
+	rescue Interrupt
+		exit 2
+	end
+	
+	def download_and_extract_ruby_extension(target, &block)
+		puts "<banner>Downloading Ruby extension for your Ruby and platform, if available...</banner>"
+		basename = "rubyext-#{PlatformInfo.ruby_extension_binary_compatibility_id}.tar.gz"
+		url      = "#{@binaries_url_root}/#{PhusionPassenger::VERSION_STRING}/#{basename}"
+		tarball  = "#{@working_dir}/#{basename}"
+		if !download(url, tarball)
+			puts "<b>Looks like it's not. But don't worry, the " +
 				"necessary binaries will be compiled from source instead.</b>"
 			return nil
 		end
@@ -360,12 +428,12 @@ private
 	end
 	
 	def download_and_extract_nginx_binaries(target, &block)
-		color_puts "<banner>Downloading Nginx binaries for your platform, if available...</banner>"
-		basename = "nginx-#{@version}.tar.gz"
-		url      = "#{@binaries_url_root}/#{runtime_version_string}/#{basename}"
+		puts "<banner>Downloading Nginx binaries for your platform, if available...</banner>"
+		basename = "nginx-#{@nginx_version}-#{PlatformInfo.cxx_binary_compatibility_id}.tar.gz"
+		url      = "#{@binaries_url_root}/#{PhusionPassenger::VERSION_STRING}/#{basename}"
 		tarball  = "#{@working_dir}/#{basename}"
 		if !download(url, tarball)
-			color_puts "<b>Looks like it's not. But don't worry, the " +
+			puts "<b>Looks like it's not. But don't worry, the " +
 				"necessary binaries will be compiled from source instead.</b>"
 			return nil
 		end
@@ -379,17 +447,17 @@ private
 	end
 	
 	def download_and_extract_nginx_sources(&block)
-		if @tarball
-			tarball  = @tarball
+		if @nginx_tarball
+			tarball  = @nginx_tarball
 		else
-			color_puts "<banner>Downloading Nginx...</banner>"
-			basename = "nginx-#{@version}.tar.gz"
+			puts "<banner>Downloading Nginx...</banner>"
+			basename = "nginx-#{@nginx_version}.tar.gz"
 			tarball  = "#{@working_dir}/#{basename}"
 			if !download("http://nginx.org/download/#{basename}", tarball)
 				return nil
 			end
 		end
-		nginx_sources_name = "nginx-#{@version}"
+		nginx_sources_name = "nginx-#{@nginx_version}"
 		
 		Dir.chdir(@working_dir) do
 			begin_progress_bar
@@ -403,31 +471,65 @@ private
 		exit 2
 	end
 	
-	def install_passenger_support_files
+	def install_ruby_extension
 		begin_progress_bar
-		
-		# Copy Phusion Passenger sources to designated directory if necessary.
-		yield(0, 1, 1, "Preparing Phusion Passenger...")
-		FileUtils.rm_rf(@support_dir)
-		Dir.chdir(@source_root) do
-			files = `#{rake} package:filelist --silent`.split("\n")
-			copy_files(files, @support_dir) do |progress, total|
-				yield(progress, total, 1, "Copying files...")
+		yield(0, 1, 0, "Preparing Ruby extension...")
+		Dir.chdir(PhusionPassenger.source_root) do
+			run_rake_task!("native_support CACHING=false ONLY_RUBY=yes RUBY_EXTENSION_OUTPUT_DIR='#{@ruby_dir}'") do |progress, total|
+				yield(progress, total, 1, "Compiling Ruby extension...")
 			end
+			system "rm -rf '#{@ruby_dir}'/{*.log,*.o,Makefile}"
 		end
-		
-		# Then compile it.
-		yield(0, 1, 2, "Preparing Phusion Passenger...")
-		Dir.chdir(@support_dir) do
-			run_rake_task!("nginx RELEASE=yes") do |progress, total|
-				yield(progress, total, 2, "Compiling Phusion Passenger...")
+		return 2
+	end
+	
+	def install_binary_support_files
+		begin_progress_bar
+		yield(0, 1, 0, "Preparing Phusion Passenger...")
+		Dir.chdir(PhusionPassenger.source_root) do
+			args = "nginx_without_native_support" +
+				" CACHING=false" +
+				" OUTPUT_DIR='#{@support_dir}'"
+			run_rake_task!(args) do |progress, total|
+				yield(progress, total, 1, "Compiling Phusion Passenger...")
+			end
+
+			system "rm -rf '#{@support_dir}'/agents/{*.o,*.dSYM}"
+			system "rm -rf '#{@support_dir}'/common/libboost_oxt"
+			system "rm -rf '#{@support_dir}'/*/{*.lo,*.h,*.log,Makefile,libtool,stamp-h1,config.status,.deps}"
+			system "rm -rf '#{@support_dir}'/{libeio,libev}/*.o"
+			
+			# Retain only the object files that are needed for linking the Phusion Passenger module into Nginx.
+			nginx_libs = COMMON_LIBRARY.
+				only(*NGINX_LIBS_SELECTOR).
+				set_output_dir("#{@support_dir}/libpassenger_common").
+				link_objects
+			Dir["#{@support_dir}/libpassenger_common/**/*"].each do |filename|
+				if !nginx_libs.include?(filename) && File.file?(filename)
+					File.unlink(filename)
+				end
 			end
 		end
+		return 2
 	end
 	
 	def install_nginx_from_source(source_dir)
 		require 'phusion_passenger/platform_info/compiler'
 		Dir.chdir(source_dir) do
+			shell = PlatformInfo.find_command('bash') || "sh"
+			command = ""
+			if @targets.include?(:support_binaries)
+				if ENV['PASSENGER_DEBUG'] && !ENV['PASSENGER_DEBUG'].empty?
+					output_dir = "#{PhusionPassenger.source_root}/buildout/common/libpassenger_common"
+				else
+					output_dir = "#{@support_dir}/common/libpassenger_common"
+				end
+				nginx_libs = COMMON_LIBRARY.only(*NGINX_LIBS_SELECTOR).
+					set_output_dir(output_dir).
+					link_objects_as_string
+				command << "env PASSENGER_INCLUDEDIR='#{PhusionPassenger.include_dir}'" <<
+					" PASSENGER_LIBS='#{nginx_libs} #{output_dir}/../libboost_oxt.a' "
+			end
 			# RPM thinks it's being smart by scanning binaries for
 			# paths and refusing to create package if it detects any
 			# hardcoded thats that point to /usr or other important
@@ -436,12 +538,14 @@ private
 			# we pass it its resource locations during runtime, so
 			# work around the problem by configure Nginx with prefix
 			# /tmp.
-			command = "sh ./configure --prefix=/tmp " <<
+			command << "#{shell} ./configure --prefix=/tmp " <<
 				"--with-cc-opt='-Wno-error' " <<
-				"--without-pcre " <<
-				"--without-http_rewrite_module " <<
 				"--without-http_fastcgi_module " <<
-				"'--add-module=#{@support_dir}/ext/nginx'"
+				"--without-http_scgi_module " <<
+				"--without-http_uwsgi_module " <<
+				"--with-http_gzip_static_module " <<
+				"--with-http_stub_status_module " <<
+				"'--add-module=#{PhusionPassenger.source_root}/ext/nginx'"
 			run_command_with_throbber(command, "Preparing Nginx...") do |status_text|
 				yield(0, 1, status_text)
 			end
@@ -465,12 +569,16 @@ private
 			end
 			
 			yield(1, 1, 'Copying files...')
-			if !system("mkdir -p '#{@nginx_dir}/sbin'") ||
-			   !system("cp -pR objs/nginx '#{@nginx_dir}/sbin/'")
+			if !system("cp -pR objs/nginx '#{@nginx_dir}/'")
 				STDERR.puts
 				STDERR.puts "*** ERROR: unable to copy Nginx binaries."
 				exit 1
 			end
+			if !system("strip '#{@nginx_dir}/nginx'")
+				STDERR.puts
+				STDERR.puts "*** ERROR: unable to strip debugging symbols from the Nginx binary."
+				exit 1
+			end
 		end
 	end
 end
diff --git a/lib/phusion_passenger/standalone/start_command.rb b/lib/phusion_passenger/standalone/start_command.rb
index a265fee..eeed751 100644
--- a/lib/phusion_passenger/standalone/start_command.rb
+++ b/lib/phusion_passenger/standalone/start_command.rb
@@ -1,5 +1,5 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010-2012 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -42,7 +42,7 @@ class StartCommand < Command
 	def self.description
 		return "Start Phusion Passenger Standalone."
 	end
-	
+
 	def initialize(args)
 		super(args)
 		@console_mutex = Mutex.new
@@ -51,30 +51,38 @@ class StartCommand < Command
 		@interruptable_threads = []
 		@plugin = PhusionPassenger::Plugin.new('standalone/start_command', self, @options)
 	end
-	
+
 	def run
 		parse_my_options
 		sanity_check_options
-		
+
+		@runtime_dirs = determine_runtime_dirs
 		ensure_nginx_installed
 		determine_various_resource_locations
 		require_app_finder
 		@app_finder = AppFinder.new(@args, @options)
 		@apps = @app_finder.scan
 		@plugin.call_hook(:found_apps, @apps)
-		
+
 		extra_controller_options = {}
 		@plugin.call_hook(:before_creating_nginx_controller, extra_controller_options)
 		create_nginx_controller(extra_controller_options)
-		
+
 		begin
 			start_nginx
 			show_intro_message
-			daemonize if @options[:daemonize]
+			if @options[:daemonize]
+				if PlatformInfo.ruby_supports_fork?
+					daemonize
+				else
+					daemonize_without_fork
+				end
+			end
 			Thread.abort_on_exception = true
 			@plugin.call_hook(:nginx_started, @nginx)
 			########################
 			########################
+			touch_temp_dir_in_background
 			watch_log_files_in_background if should_watch_logs?
 			wait_until_nginx_has_exited
 		rescue Interrupt
@@ -98,7 +106,7 @@ class StartCommand < Command
 		end
 	ensure
 		if @temp_dir
-			FileUtils.rm_rf(@temp_dir) rescue nil
+			FileUtils.remove_entry_secure(@temp_dir) rescue nil
 		end
 		@plugin.call_hook(:cleanup)
 	end
@@ -107,11 +115,7 @@ private
 	def require_file_utils
 		require 'fileutils' unless defined?(FileUtils)
 	end
-	
-	def require_app_finder
-		require 'phusion_passenger/standalone/app_finder' unless defined?(AppFinder)
-	end
-	
+
 	def parse_my_options
 		description = "Starts Phusion Passenger Standalone and serve one or more Ruby web applications."
 		parse_options!("start [directory]", description) do |opts|
@@ -129,7 +133,7 @@ private
 				wrap_desc("Bind to Unix domain socket instead of TCP socket")) do |value|
 				@options[:socket_file] = value
 			end
-			
+
 			opts.separator ""
 			opts.on("-e", "--environment ENV", String,
 				wrap_desc("Framework environment (default: #{@options[:env]})")) do |value|
@@ -151,6 +155,18 @@ private
 				wrap_desc("The spawn method to use (default: #{@options[:spawn_method]})")) do |value|
 				@options[:spawn_method] = value
 			end
+			opts.on("--rolling-restarts",
+				wrap_desc("Enable rolling restarts (Enterprise only)")) do
+				@options[:rolling_restarts] = true
+			end
+			opts.on("--resist-deployment-errors",
+				wrap_desc("Enable deployment error resistance (Enterprise only)")) do
+				@options[:resist_deployment_errors] = true
+			end
+			opts.on("--no-friendly-error-pages",
+				wrap_desc("Disable passenger_friendly_error_pages")) do
+				@options[:friendly_error_pages] = false
+			end
 			opts.on("--union-station-gateway HOST:PORT", String,
 				wrap_desc("Specify Union Station Gateway host and port")) do |value|
 				host, port = value.split(":", 2)
@@ -163,14 +179,14 @@ private
 				wrap_desc("Specify Union Station key")) do |value|
 				@options[:union_station_key] = value
 			end
-			
+
 			opts.separator ""
 			opts.on("--ping-port NUMBER", Integer,
 				wrap_desc("Use the given port number for checking whether Nginx is alive (default: same as the normal port)")) do |value|
 				@options[:ping_port] = value
 			end
 			@plugin.call_hook(:parse_options, opts)
-			
+
 			opts.separator ""
 			opts.on("-d", "--daemonize",
 				wrap_desc("Daemonize into the background")) do
@@ -206,10 +222,14 @@ private
 				          "checked for binaries prior to a local build.")) do |value|
 				@options[:binaries_url_root] = value
 			end
+			opts.on("--runtime-dir DIRECTORY", String,
+				wrap_desc("Directory to use for Phusion Passenger Standalone runtime files")) do |value|
+				@options[:runtime_dir] = File.expand_path(value)
+			end
 		end
 		@plugin.call_hook(:done_parsing_options)
 	end
-	
+
 	def sanity_check_options
 		if @options[:tcp_explicitly_given] && @options[:socket_file]
 			error "You cannot specify both --address/--port and --socket. Please choose either one."
@@ -218,7 +238,7 @@ private
 		check_port_bind_permission_and_display_sudo_suggestion
 		check_port_availability
 	end
-	
+
 	# Most platforms don't allow non-root processes to bind to a port lower than 1024.
 	# Check whether this is the case for the current platform and if so, tell the user
 	# that it must re-run Phusion Passenger Standalone with sudo.
@@ -232,9 +252,9 @@ private
 				error "Only the 'root' user can run this program on port #{@options[:port]}. " <<
 				      "You are currently running as '#{myself}'. Please re-run this program " <<
 				      "with root privileges with the following command:\n\n" <<
-				      
+
 				      "  #{PlatformInfo.ruby_sudo_command} passenger start #{@original_args.join(' ')} --user=#{myself}\n\n" <<
-				      
+
 				      "Don't forget the '--user' part! That will make Phusion Passenger Standalone " <<
 				      "drop root privileges and switch to '#{myself}' after it has obtained " <<
 				      "port #{@options[:port]}."
@@ -243,30 +263,75 @@ private
 		end
 	end
 
-	def check_port(address, port)
-		begin
-			socket = Socket.new(Socket::Constants::AF_INET, Socket::Constants::SOCK_STREAM, 0)
-			sockaddr = Socket.pack_sockaddr_in(port, address)
+	if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
+		require 'java'
+
+		def check_port(host_name, port)
+			channel = java.nio.channels.SocketChannel.open
 			begin
-				socket.connect_nonblock(sockaddr)
-			rescue Errno::ENOENT, Errno::EINPROGRESS, Errno::EAGAIN, Errno::EWOULDBLOCK
-				if select(nil, [socket], nil, 0.1)
+				address = java.net.InetSocketAddress.new(host_name, port)
+				channel.configure_blocking(false)
+				if channel.connect(address)
+					return true
+				end
+
+				deadline = Time.now.to_f + 0.1
+				done = false
+				while true
 					begin
-						socket.connect_nonblock(sockaddr)
-					rescue Errno::EISCONN
+						if channel.finish_connect
+							return true
+						end
+					rescue java.net.ConnectException => e
+						if e.message =~ /Connection refused/i
+							return false
+						else
+							throw e
+						end
+					end
+
+					# Not done connecting and no error.
+					sleep 0.01
+					if Time.now.to_f >= deadline
+						return false
 					end
-				else
-					raise Errno::ECONNREFUSED
 				end
+			ensure
+				channel.close
+			end
+		end
+	else
+		def check_port(address, port)
+			begin
+				socket = Socket.new(Socket::Constants::AF_INET, Socket::Constants::SOCK_STREAM, 0)
+				sockaddr = Socket.pack_sockaddr_in(port, address)
+				begin
+					socket.connect_nonblock(sockaddr)
+				rescue Errno::ENOENT, Errno::EINPROGRESS, Errno::EAGAIN, Errno::EWOULDBLOCK
+					if select(nil, [socket], nil, 0.1)
+						begin
+							socket.connect_nonblock(sockaddr)
+						rescue Errno::EISCONN
+						rescue Errno::EINVAL
+							if RUBY_PLATFORM =~ /freebsd/i
+								raise Errno::ECONNREFUSED
+							else
+								raise
+							end
+						end
+					else
+						raise Errno::ECONNREFUSED
+					end
+				end
+				return true
+			rescue Errno::ECONNREFUSED
+				return false
+			ensure
+				socket.close if socket && !socket.closed?
 			end
-			return true
-		rescue Errno::ECONNREFUSED
-			return false
-		ensure
-			socket.close if socket
 		end
 	end
-	
+
 	def check_port_availability
 		if !@options[:socket_file] && check_port(@options[:address], @options[:port])
 			error "The address #{@options[:address]}:#{@options[:port]} is already " <<
@@ -278,11 +343,11 @@ private
 			exit 1
 		end
 	end
-	
+
 	def should_watch_logs?
 		return !@options[:daemonize] && @options[:log_file] != "/dev/null"
 	end
-	
+
 	# Returns the URL that Nginx will be listening on.
 	def listen_url
 		if @options[:socket_file]
@@ -296,55 +361,62 @@ private
 			return result
 		end
 	end
-	
-	def install_runtime
+
+	def install_runtime(runtime_dirs)
 		require 'phusion_passenger/standalone/runtime_installer'
 		installer = RuntimeInstaller.new(
-			:source_root => SOURCE_ROOT,
-			:support_dir => passenger_support_files_dir,
-			:nginx_dir   => nginx_dir,
-			:version     => @options[:nginx_version],
-			:tarball     => @options[:nginx_tarball],
+			:targets     => [:nginx, :ruby, :support_binaries],
+			:support_dir => runtime_dirs[:support_dir],
+			:nginx_dir   => runtime_dirs[:nginx_dir],
+			:ruby_dir    => runtime_dirs[:ruby_dir],
+			:nginx_version     => @options[:nginx_version],
+			:nginx_tarball     => @options[:nginx_tarball],
 			:binaries_url_root => @options[:binaries_url_root],
 			:plugin      => @plugin)
-		installer.start
+		return installer.run
 	end
-	
-	def passenger_support_files_dir
-		return "#{@runtime_dir}/support"
+
+	def determine_runtime_dirs
+		require_platform_info_binary_compatibility
+		if root = @options[:runtime_dir]
+			nginx_dir = determine_nginx_runtime_dir(root)
+		else
+			root = "#{GLOBAL_STANDALONE_RESOURCE_DIR}/#{PhusionPassenger::VERSION_STRING}"
+			nginx_dir = determine_nginx_runtime_dir(root)
+			if !File.exist?("#{nginx_dir}/nginx") && Process.euid != 0
+				home      = Etc.getpwuid.dir
+				root      = "#{home}/#{LOCAL_STANDALONE_RESOURCE_DIR}/#{PhusionPassenger::VERSION_STRING}"
+				nginx_dir = determine_nginx_runtime_dir(root)
+			end
+		end
+		nginx_bin = @options[:nginx_bin] || "#{nginx_dir}/nginx"
+		result = {
+			:root => root,
+			:support_dir => "#{root}/support-#{PlatformInfo.cxx_binary_compatibility_id}",
+			:nginx_dir => nginx_dir,
+			:ruby_dir => "#{root}/rubyext-#{PlatformInfo.ruby_extension_binary_compatibility_id}",
+			:nginx_installed => File.exist?(nginx_bin)
+		}
+		result[:support_dir_installed] = File.exist?(result[:support_dir] + "/agents/PassengerWatchdog")
+		result[:everything_installed] = result[:nginx_installed] && result[:support_dir_installed]
+		return result
 	end
-	
-	def nginx_dir
-		return "#{@runtime_dir}/nginx-#{@options[:nginx_version]}"
+
+	def determine_nginx_runtime_dir(runtime_dir)
+		return "#{runtime_dir}/nginx-#{@options[:nginx_version]}-#{PlatformInfo.cxx_binary_compatibility_id}"
 	end
-	
+
 	def ensure_nginx_installed
-		if @options[:nginx_bin] && !File.exist?(@options[:nginx_bin])
-			error "The given Nginx binary '#{@options[:nginx_bin]}' does not exist."
-			exit 1
-		end
-		
-		home           = Etc.getpwuid.dir
-		@runtime_dir   = "#{GLOBAL_STANDALONE_RESOURCE_DIR}/#{runtime_version_string}"
-		if !File.exist?("#{nginx_dir}/sbin/nginx")
-			if Process.euid == 0
-				install_runtime
-			else
-				@runtime_dir = "#{home}/#{LOCAL_STANDALONE_RESOURCE_DIR}/#{runtime_version_string}"
-				if !File.exist?("#{nginx_dir}/sbin/nginx")
-					install_runtime
-				end
+		if !@runtime_dirs[:everything_installed]
+			if !@runtime_dirs[:nginx_installed] && @options[:nginx_bin]
+				error "The given Nginx binary '#{@options[:nginx_bin]}' does not exist."
+				exit 1
+			elsif !install_runtime(@runtime_dirs)
+				exit 1
 			end
 		end
 	end
-	
-	def ensure_directory_exists(dir)
-		if !File.exist?(dir)
-			require_file_utils
-			FileUtils.mkdir_p(dir)
-		end
-	end
-	
+
 	def start_nginx
 		begin
 			@nginx.start
@@ -365,15 +437,15 @@ private
 			exit 1
 		end
 	end
-	
+
 	def show_intro_message
 		puts "=============== Phusion Passenger Standalone web server started ==============="
 		puts "PID file: #{@options[:pid_file]}"
 		puts "Log file: #{@options[:log_file]}"
 		puts "Environment: #{@options[:env]}"
-		
+
 		puts "Accessible via: #{listen_url}"
-		
+
 		puts
 		if @options[:daemonize]
 			puts "Serving in the background as a daemon."
@@ -382,7 +454,13 @@ private
 		end
 		puts "==============================================================================="
 	end
-	
+
+	def daemonize_without_fork
+		STDERR.puts "Unable to daemonize using the current Ruby interpreter " +
+			"(#{PlatformInfo.ruby_command}) because it does not support forking."
+		exit 1
+	end
+
 	def daemonize
 		pid = fork
 		if pid
@@ -399,7 +477,7 @@ private
 			Process.setsid
 		end
 	end
-	
+
 	# Wait until the termination pipe becomes readable (a hint for threads
 	# to shut down), or until the timeout has been reached. Returns true if
 	# the termination pipe became readable, false if the timeout has been reached.
@@ -407,7 +485,7 @@ private
 		ios = select([@termination_pipe[0]], nil, nil, timeout)
 		return !ios.nil?
 	end
-	
+
 	def watch_log_file(log_file)
 		if File.exist?(log_file)
 			backward = 0
@@ -418,7 +496,7 @@ private
 			end
 			backward = 10
 		end
-		
+
 		IO.popen("tail -f -n #{backward} \"#{log_file}\"", "rb") do |f|
 			begin
 				while true
@@ -433,11 +511,11 @@ private
 					end
 				end
 			ensure
-				Process.kill('TERM', f.pid)
+				Process.kill('TERM', f.pid) rescue nil
 			end
 		end
 	end
-	
+
 	def watch_log_files_in_background
 		@apps.each do |app|
 			thread = Thread.new do
@@ -452,7 +530,18 @@ private
 		@threads << thread
 		@interruptable_threads << thread
 	end
-	
+
+	def touch_temp_dir_in_background
+		@interruptable_threads << Thread.new do
+			while true
+				# Touch the temp dir every 30 minutes to prevent
+				# /tmp cleaners from removing it.
+				sleep 60 * 30
+				system("find '#{@temp_dir}' | xargs touch")
+			end
+		end
+	end
+
 	def wait_until_nginx_has_exited
 		# Since Nginx is not our child process (it daemonizes or we daemonize)
 		# we cannot use Process.waitpid to wait for it. A busy-sleep-loop with
@@ -474,7 +563,7 @@ private
 		end
 	rescue Errno::ECONNREFUSED, Errno::ECONNRESET
 	end
-	
+
 	def stop_nginx
 		@console_mutex.synchronize do
 			STDOUT.write("Stopping web server...")
@@ -484,7 +573,7 @@ private
 			STDOUT.flush
 		end
 	end
-	
+
 	def stop_threads
 		if !@termination_pipe[1].closed?
 			@termination_pipe[1].write("x")
@@ -499,9 +588,9 @@ private
 		end
 		@threads = []
 	end
-	
+
 	#### Config file template helpers ####
-	
+
 	def nginx_listen_address(options = @options, for_ping_port = false)
 		if options[:socket_file]
 			return "unix:" + File.expand_path(options[:socket_file])
@@ -514,13 +603,13 @@ private
 			return "#{options[:address]}:#{port}"
 		end
 	end
-	
+
 	def default_group_for(username)
 		user = Etc.getpwnam(username)
 		group = Etc.getgrgid(user.gid)
 		return group.name
 	end
-	
+
 	#################
 end
 
diff --git a/lib/phusion_passenger/standalone/status_command.rb b/lib/phusion_passenger/standalone/status_command.rb
index d1c1aff..aeef032 100644
--- a/lib/phusion_passenger/standalone/status_command.rb
+++ b/lib/phusion_passenger/standalone/status_command.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/lib/phusion_passenger/standalone/stop_command.rb b/lib/phusion_passenger/standalone/stop_command.rb
index 3bc4f9f..fc3a6d1 100644
--- a/lib/phusion_passenger/standalone/stop_command.rb
+++ b/lib/phusion_passenger/standalone/stop_command.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/lib/phusion_passenger/standalone/utils.rb b/lib/phusion_passenger/standalone/utils.rb
index eceba5a..0bf8b1d 100644
--- a/lib/phusion_passenger/standalone/utils.rb
+++ b/lib/phusion_passenger/standalone/utils.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -27,20 +27,20 @@ module Standalone
 module Utils
 private
 	def require_platform_info_binary_compatibility
-		if !defined?(PlatformInfo) || !PlatformInfo.respond_to?(:cpu_architecture)
+		if !defined?(PlatformInfo) || !PlatformInfo.respond_to?(:cxx_binary_compatibility_id)
 			require 'phusion_passenger/platform_info/binary_compatibility'
 		end
 	end
 	
-	def runtime_version_string
-		if PhusionPassenger.natively_packaged?
-			return "natively-packaged"
-		else
+	def runtime_version_string(nginx_version)
+		if PhusionPassenger.originally_packaged? || nginx_version != PhusionPassenger::PREFERRED_NGINX_VERSION
 			require_platform_info_binary_compatibility
 			return "#{VERSION_STRING}-#{PlatformInfo.passenger_binary_compatibility_id}"
+		else
+			return VERSION_STRING
 		end
 	end
 end
 
 end
-end
\ No newline at end of file
+end
diff --git a/lib/phusion_passenger/standalone/version_command.rb b/lib/phusion_passenger/standalone/version_command.rb
index 7bdc5ea..498cb55 100644
--- a/lib/phusion_passenger/standalone/version_command.rb
+++ b/lib/phusion_passenger/standalone/version_command.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
diff --git a/lib/phusion_passenger/templates/apache2/config_snippets.txt.erb b/lib/phusion_passenger/templates/apache2/config_snippets.txt.erb
deleted file mode 100644
index 2875d79..0000000
--- a/lib/phusion_passenger/templates/apache2/config_snippets.txt.erb
+++ /dev/null
@@ -1,13 +0,0 @@
-<banner>The Apache 2 module was successfully installed.</banner>
-
-Please edit your Apache configuration file, and add these lines:
-
-   <b>LoadModule passenger_module <%= @module_location %></b>
-   <b>PassengerRoot <%= @passenger_root %></b>
-   <b>PassengerRuby <%= @ruby %></b>
-
-After you restart Apache, you are ready to deploy any number of Ruby on Rails
-applications on Apache, without any further Ruby on Rails-specific
-configuration!
-
-<b>Press ENTER to continue.</b>
diff --git a/lib/phusion_passenger/templates/app_exited_during_initialization.html.erb b/lib/phusion_passenger/templates/app_exited_during_initialization.html.erb
deleted file mode 100644
index 40e98b4..0000000
--- a/lib/phusion_passenger/templates/app_exited_during_initialization.html.erb
+++ /dev/null
@@ -1,38 +0,0 @@
-<% layout 'error_layout', :title => "#{@app_name} application could not be started" do %>
-<h1 class="error_title"><%= @app_name %> application could not be started</h1>
-<div id="content">
-
-	The application has exited during startup (i.e. during the evaluation of
-	<tt>config/environment.rb</tt>).
-	<% if @error.stderr %>
-		The error message can be found below. To solve this problem, please
-		follow any instructions in the error message.
-	<% else %>
-		The error message may have been written to the web server's log file.
-		Please check the <b>web server's</b> log file (i.e. <em>not</em> the
-		(Rails) application's log file) to find out why the application
-		exited.
-		
-		<p>If that doesn't help, then please use the backtrace below to debug
-		the problem.</p>
-	<% end %>
-	
-	<dl>
-	<% if @error.stderr %>
-		<dt>Error message:</dt>
-		<dd><%=h @error.stderr %></dd>
-	<% end %>
-	
-	<dt>Application root:</dt>
-	<dd>
-		<tt class="filename"><%=h @app_root %></tt>
-	</dd>
-	
-	<dt>Backtrace:</dt>
-	<dd>
-		<%= backtrace_html_for(@error.child_exception) %>
-	</dd>
-	</dl>
-
-</div>
-<% end %>
diff --git a/lib/phusion_passenger/templates/app_init_error.html.erb b/lib/phusion_passenger/templates/app_init_error.html.erb
deleted file mode 100644
index fdd8ff9..0000000
--- a/lib/phusion_passenger/templates/app_init_error.html.erb
+++ /dev/null
@@ -1,64 +0,0 @@
-<% layout 'error_layout', :title => "#{@app_name} application could not be started" do %>
-<h1 class="error_title"><%= @app_name %> application could not be started</h1>
-<div id="content">
-
-	These are the possible causes:
-	<ul>
-	<li class="first">
-		<div class="container">
-		<div class="content">
-		There may be a syntax error in the application's code. Please
-		check for such errors and fix them.
-		</div>
-		</div>
-	</li>
-	<li>
-		<div class="container">
-		<div class="content">
-		A required library may not installed. Please install all libraries
-		that this application requires.
-		</div>
-		</div>
-	</li>
-	<li>
-		<div class="container">
-		<div class="content">
-		The application may not be properly configured. Please check whether all
-		configuration files are written correctly, fix any incorrect
-		configurations, and restart this application.
-		</div>
-		</div>
-	</li>
-	<li class="last">
-		<div class="container">
-		<div class="content">
-		A service that the application relies on (such as the database server
-		or the Ferret search engine server) may not have been started. Please start
-		that service.
-		</div>
-		</div>
-	</li>
-	</ul>
-	Further information about the error may have been written to the
-	application's log file. Please check it in order to analyse the problem.
-	
-	<dl>
-	<dt>Error message:</dt>
-	<dd><%=h @error.child_exception.message %></dd>
-	
-	<dt>Exception class:</dt>
-	<dd><%=h @error.child_exception.class %></dd>
-	
-	<dt>Application root:</dt>
-	<dd>
-		<tt class="filename"><%=h @app_root %></tt>
-	</dd>
-	
-	<dt>Backtrace:</dt>
-	<dd>
-		<%= backtrace_html_for(@error.child_exception) %>
-	</dd>
-	</dl>
-
-</div>
-<% end %>
diff --git a/lib/phusion_passenger/templates/database_error.html.erb b/lib/phusion_passenger/templates/database_error.html.erb
deleted file mode 100644
index 48b72b4..0000000
--- a/lib/phusion_passenger/templates/database_error.html.erb
+++ /dev/null
@@ -1,66 +0,0 @@
-<% layout 'error_layout', :title => "#{@app_name} application could not be started" do %>
-<h1 class="error_title"><%= @app_name %> application could not be started</h1>
-<div id="content">
-
-	There appears to be a database problem.
-	<ul>
-	<li class="first">
-		<div class="container">
-		<div class="content">
-		<% if @app_type == "rails" %>
-			Your <em>config/database.yml</em> may not be written correctly.
-		<% else %>
-			Your application's database configuration file might be written
-			incorrectly.
-		<% end %>
-		Please check it and fix any errors.
-		</div>
-		</div>
-	</li>
-	<% if @app_type == "rails" %>
-		<li>
-			<div class="container">
-			<div class="content">
-			Your database schema may be out of date or nonexistant.
-			Please run <code>rake db:migrate</code> to ensure that
-			the database schema is up-to-date.
-			</div>
-			</div>
-		</li>
-	<% end %>
-	<li class="last">
-		<div class="container">
-		<div class="content">
-		The database server may not be running. Please check whether it's
-		running, and start it if it isn't.
-		</div>
-		</div>
-	</li>
-	</ul>
-	
-	<dl>
-	<dt>Error message:</dt>
-	<dd><%=h @error.child_exception.message %></dd>
-	
-	<dt>Exception class:</dt>
-	<dd>
-		<% if @error.child_exception.respond_to?(:real_class_name) %>
-			<%=h @error.child_exception.real_class_name %>
-		<% else %>
-			<%=h @error.child_exception.class %>
-		<% end %>
-	</dd>
-	
-	<dt>Application root:</dt>
-	<dd>
-		<tt class="filename"><%=h @app_root %></tt>
-	</dd>
-	
-	<dt>Backtrace:</dt>
-	<dd>
-		<%= backtrace_html_for(@error.child_exception) %>
-	</dd>
-	</dl>
-
-</div>
-<% end %>
diff --git a/lib/phusion_passenger/templates/error_layout.css b/lib/phusion_passenger/templates/error_layout.css
deleted file mode 100644
index 95a2cbf..0000000
--- a/lib/phusion_passenger/templates/error_layout.css
+++ /dev/null
@@ -1,97 +0,0 @@
-body {
-	font-family: Verdana, 'Bitstream Vera Sans', Arial, Sans-Serif;
-	font-size: 10pt;
-	background: white;
-	color: #222222;
-	margin: 0;
-	padding-top: 3em;
-	padding-bottom: 3em;
-	padding-left: 4.5em;
-	padding-right: 4.5em;
-}
-
-h1 {
-	font-size: 17pt;
-	font-weight: medium;
-	color: #533e72;
-	border-bottom: 1px solid #533e72;
-}
-
-h1.title {
-	margin-top: 0;
-}
-
-h1.error_title {
-	color: red;
-	border-bottom: 1px solid red;
-}
-
-a {
-	text-decoration: none;
-}
-
-a:hover {
-	text-decoration: underline;
-}
-
-dt {
-	font-weight: bold;
-	color: #280050;
-}
-
-dd {
-	margin-top: 0.5em;
-	margin-bottom: 1em;
-}
-
-.commands {
-	border: 1px solid #b594e7;
-	background: #ddc6ff;
-	padding: 0.5em;
-	margin: 0.5em;
-	font-family: 'Bitstream Vera Sans Mono', 'Courier New', Monospace;
-}
-
-table.backtrace th {
-	background: #8470a6;
-	color: white;
-}
-
-table.backtrace th,
-table.backtrace td {
-	padding: 0.2em;
-	padding-left: 0.4em;
-	padding-right: 0.4em;
-}
-
-table.backtrace tr td {
-	background: #ecdfff;
-}
-
-table.backtrace tr.even td {
-	background: #f7f2ff;
-}
-
-table.backtrace td.index {
-	font-weight: bold;
-}
-
-#site_footer {
-	border-top: solid 1px black;
-	margin-top: 1em;
-	padding-top: 1em;
-	font-size: small;
-	color: #777777;
-}
-
-#site_footer a {
-	color: #65498e;
-}
-
-#site_footer a:hover {
-	color: #9681d9;
-}
-
-#site_header .corporate_identity {
-	display: none;
-}
diff --git a/lib/phusion_passenger/templates/error_layout.html.erb b/lib/phusion_passenger/templates/error_layout.html.erb
deleted file mode 100644
index 0a504ad..0000000
--- a/lib/phusion_passenger/templates/error_layout.html.erb
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-	<meta name="generator" content="Phusion Passenger">
-	<title><%=h @title %></title>
-	<style type="text/css">
-		<%= include 'error_layout.css' %>
-	</style>
-	<link rel="stylesheet" type="text/css" href="http://www.modrails.com/error_pages/1.0/error_page.css">
-</head>
-
-<body>
-
-	<div id="site_container">
-		<div id="site_header">
-			<ul class="corporate_identity <% if @enterprisey %>enterprise_edition<% end %>">
-				<li class="logo"><a href="http://www.modrails.com"><span>Phusion Passenger</span></a></li>
-			</ul>
-		</div>
-		<div id="site_body">
-			<%= yield %>
-		</div>
-		<div id="site_footer">
-			<!--
-			   You are free to modify the footer as you see fit,
-			   but we kindly ask of you to preserve to following
-			   text. Thank you.
-			-->
-			<div class="container">
-				Powered by <a href="http://www.modrails.com/">Phusion Passenger</a><% if @enterprisey %> (Enterprise Edition)<% end %>,
-				<tt>mod_rails</tt> / <tt>mod_rack</tt> for Apache.
-			</div>
-		</div>
-	</div>
-
-</body>
-</html>
-
diff --git a/lib/phusion_passenger/templates/framework_init_error.html.erb b/lib/phusion_passenger/templates/framework_init_error.html.erb
deleted file mode 100644
index aa753f1..0000000
--- a/lib/phusion_passenger/templates/framework_init_error.html.erb
+++ /dev/null
@@ -1,39 +0,0 @@
-<% layout 'error_layout', :title => "Ruby on Rails framework could not be loaded" do %>
-<h1 class="title error_title">Ruby on Rails framework could not be loaded</h1>
-<div id="content">
-	
-	<% if @error.vendor %>
-		The application's developer seems to have bundled a non-working
-		version of the Ruby on Rails framework. Please contact the
-		application's developer.
-	<% else %>
-		Ruby on Rails framework version <%=h @error.version %> seems to be
-		corrupted. Please reinstall it.
-		This can be done with the following command:
-		<pre class="commands"><%= PlatformInfo.gem_command %> install rails --version <%=h @error.version %></pre>
-	<% end %>
-	
-	<dl>
-	<dt>Framework that failed to load:</dt>
-	<dd>
-		<% if @error.vendor %>
-			Vendor directory: <tt><%=h @error.vendor %></tt>
-		<% else %>
-			Rails framework version <%=h @error.version %>
-		<% end %>
-	</dd>
-	
-	<dt>Error message:</dt>
-	<dd><%=h @error.child_exception.message %></dd>
-
-	<dt>Exception class:</dt>
-	<dd><%=h @error.child_exception.class %></dd>
-	
-	<dt>Backtrace:</dt>
-	<dd>
-		<%= backtrace_html_for(@error.child_exception) %>
-	</dd>
-	</dl>
-
-</div>
-<% end %>
diff --git a/lib/phusion_passenger/templates/general_error.html.erb b/lib/phusion_passenger/templates/general_error.html.erb
deleted file mode 100644
index 63b837d..0000000
--- a/lib/phusion_passenger/templates/general_error.html.erb
+++ /dev/null
@@ -1,22 +0,0 @@
-<% layout 'error_layout', :title => "Internal server error" do %>
-<h1 class="error_title">Internal server error</h1>
-<div id="content">
-	
-	Passenger encountered the following error:
-	
-	<p>
-		<%=h @error.message %>
-	</p>
-	
-	<dl>
-	<dt>Exception class:</dt>
-	<dd><%=h @error.class %></dd>
-	
-	<dt>Backtrace:</dt>
-	<dd>
-		<%= backtrace_html_for(@error) %>
-	</dd>
-	</dl>
-
-</div>
-<% end %>
diff --git a/lib/phusion_passenger/templates/load_error.html.erb b/lib/phusion_passenger/templates/load_error.html.erb
deleted file mode 100644
index dabe397..0000000
--- a/lib/phusion_passenger/templates/load_error.html.erb
+++ /dev/null
@@ -1,46 +0,0 @@
-<% layout 'error_layout', :title => "#{@app_name} application could not be started" do %>
-<h1 class="error_title"><%= @app_name %> application could not be started</h1>
-<div id="content">
-
-	A source file that the application requires, is missing.
-	<ul>
-	<li class="first">
-		<div class="container">
-		<div class="content">
-		It is possible that you didn't upload your application files correctly.
-		Please check whether all your application files are uploaded.
-		</div>
-		</div>
-	</li>
-	<li class="last">
-		<div class="container">
-		<div class="content">
-		A required library may not installed. Please install all libraries
-		that this application requires.
-		</div>
-		</div>
-	</li>
-	</ul>
-	Further information about the error may have been written to the
-	application's log file. Please check it in order to analyse the problem.
-	
-	<dl>
-	<dt>Error message:</dt>
-	<dd><%=h @error.child_exception.message %></dd>
-	
-	<dt>Exception class:</dt>
-	<dd><%=h @error.child_exception.class %></dd>
-	
-	<dt>Application root:</dt>
-	<dd>
-		<tt class="filename"><%=h @app_root %></tt>
-	</dd>
-	
-	<dt>Backtrace:</dt>
-	<dd>
-		<%= backtrace_html_for(@error.child_exception) %>
-	</dd>
-	</dl>
-
-</div>
-<% end %>
diff --git a/lib/phusion_passenger/templates/standalone/config.erb b/lib/phusion_passenger/templates/standalone/config.erb
deleted file mode 100644
index c4527e9..0000000
--- a/lib/phusion_passenger/templates/standalone/config.erb
+++ /dev/null
@@ -1,97 +0,0 @@
-#####################################################
-#
-#       !!!!!!! WARNING, READ THIS !!!!!!!
-#
-#
-#  The fact that Phusion Passenger uses Nginx
-#  internally is considered to be an implementation
-#  detail that the user should not bother with.
-#  We may arbitrarily replace the Nginx core with
-#  something else in the future.
-#
-#  As such, we do not support any kind of custom
-#  Nginx configuration in Phusion Passenger Standalone.
-#  If you need additional Nginx modules or if you need
-#  special Nginx configuration or whatever then you
-#  should use Phusion Passenger for Nginx, NOT
-#  Phusion Passenger Standalone.
-#
-#  You are strongly discouraged from editing this file
-#  and treating Phusion Passenger Standalone as an easy
-#  way to start Nginx. We will not provide any support
-#  for this.
-# 
-#####################################################
-
-
-master_process on;
-worker_processes 1;
-daemon on;
-error_log '<%= @options[:log_file] %>' info;
-pid '<%= @options[:pid_file] %>';
-<% if @options[:user] %>user <%= @options[:user] %> <%= default_group_for(@options[:user]) %>;<% end %>
-
-events {
-    worker_connections 1024;
-}
-
-http {
-    log_format debug '[$time_local] $msec  "$request" $status conn=$connection sent=$bytes_sent body_sent=$body_bytes_sent';
-    include '<%= PhusionPassenger::RESOURCES_DIR %>/mime.types';
-    passenger_ruby <%= PlatformInfo.ruby_command %>;
-    passenger_root '<%= passenger_root %>';
-    passenger_abort_on_startup_error on;
-    passenger_user_switching off;
-    passenger_max_pool_size <%= @options[:max_pool_size] %>;
-    passenger_min_instances <%= @options[:min_instances] %>;
-    <% if @options[:user] %>passenger_default_user <%= @options[:user] %>;<% end %>
-    <% if debugging? %>passenger_log_level 2;<% end %>
-    
-    <% if @options[:union_station_gateway_address] %>
-        union_station_gateway_address <%= @options[:union_station_gateway_address] %>;
-        union_station_gateway_port <%= @options[:union_station_gateway_port] %>;
-        union_station_gateway_cert -;
-    <% end %>
-    
-    default_type application/octet-stream;
-    client_max_body_size 50m;
-    access_log off;
-    keepalive_timeout 60;
-    gzip on;
-    gzip_comp_level 3;
-    gzip_min_length 150;
-    gzip_proxied any;
-    gzip_types text/plain text/css application/javascript application/x-javascript;
-    
-    <% if @apps.size > 1 %>
-    # Default server entry.
-    server {
-        listen <%= nginx_listen_address %>;
-        root '<%= LIBDIR %>/phusion_passenger/templates/standalone_default_root';
-    }
-    <% end %>
-
-    <% if @options[:ping_port] %>
-    server {
-        listen <%= nginx_listen_address(@options, true) %>;
-        root '<%= LIBDIR %>/phusion_passenger/templates/standalone_default_root';
-    }
-    <% end %>
-    
-    <% for app in @apps %>
-    server {
-        listen <%= nginx_listen_address(app) %>;
-        server_name <%= app[:server_names].join(' ') %>;
-        root '<%= app[:root] %>/public';
-        passenger_enabled on;
-        rails_env <%= app[:env] %>;
-        passenger_spawn_method <%= app[:spawn_method] %>;
-        <% if app[:min_instances] %>passenger_min_instances <%= app[:min_instances] %>;<% end %>
-        <% if app[:union_station_key] %>
-            union_station_support on;
-            union_station_key <%= app[:union_station_key] %>;
-        <% end %>
-    }
-    passenger_pre_start http://<%= nginx_listen_address(app) %>;
-    <% end %>
-}
diff --git a/lib/phusion_passenger/templates/version_not_found.html.erb b/lib/phusion_passenger/templates/version_not_found.html.erb
deleted file mode 100644
index a9371d7..0000000
--- a/lib/phusion_passenger/templates/version_not_found.html.erb
+++ /dev/null
@@ -1,34 +0,0 @@
-<% layout 'error_layout', :title => "Ruby on Rails version '#{@error.gem_version_spec}' not found" do %>
-<h1 class="error_title">Ruby on Rails version '<%=h @error.gem_version_spec %>' not found</h1>
-<div id="content">
-
-	<% if @error.gem_version_spec =~ /^\d/ %>
-		
-		The application <tt class="filename"><%=h @app_root %></tt> requires
-		Ruby on Rails version <b><%=h @error.gem_version_spec %></b>,
-		which is not installed. Please install it with the following command:
-		<pre class="commands"><%= PlatformInfo.ruby_sudo_command %> <%= PlatformInfo.gem_command %> install rails --version <%=h @error.gem_version_spec %></pre>
-		
-	<% else %>
-		
-		The application <tt class="filename"><%=h @app_root %></tt> requires
-		a Ruby on Rails version that matches the version specification
-		"<%=h @error.gem_version_spec %>", but there is no such Ruby on Rails
-		version installed. Please install it with the following command:
-		<div class="commands">
-			<%= PlatformInfo.gem_command %> install rails --version <em>some_version_number</em>
-		</div>
-		
-	<% end %>
-	
-	<p>
-	If you are unable to install Ruby on Rails (e.g. because you do not have
-	control over this server) then you could also <em>vendor</em> (bundle)
-	your Rails version into your application by running <pre>rake vendor:rails</pre>
-	in your application's source directory, and redeploying your application.
-	Please search the Internet for "vendor rails" if you're not familiar with
-	this technique.
-	</p>
-
-</div>
-<% end %>
diff --git a/lib/phusion_passenger/utils.rb b/lib/phusion_passenger/utils.rb
index 1fa2d59..3d0388b 100644
--- a/lib/phusion_passenger/utils.rb
+++ b/lib/phusion_passenger/utils.rb
@@ -1,6 +1,6 @@
 # encoding: binary
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010, 2011, 2012 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
 #
@@ -23,148 +23,43 @@
 #  THE SOFTWARE.
 
 require 'rubygems'
-require 'thread'
-if (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby") && RUBY_VERSION < "1.8.7"
-	require 'fastthread'
-end
-require 'pathname'
-require 'etc'
-require 'fcntl'
-require 'tempfile'
-require 'timeout'
-require 'stringio'
-require 'phusion_passenger/exceptions'
 require 'phusion_passenger/native_support'
 
 module PhusionPassenger
 
 # Utility functions.
 module Utils
-protected
-	def private_class_method(name)
-		metaclass = class << self; self; end
-		metaclass.send(:private, name)
-	end
-	
-	# Return the canonicalized version of +path+. This path is guaranteed to
-	# to be "normal", i.e. it doesn't contain stuff like ".." or "/",
-	# and it fully resolves symbolic links.
-	#
-	# Raises SystemCallError if something went wrong. Raises ArgumentError
-	# if +path+ is nil. Raises InvalidPath if +path+ does not appear
-	# to be a valid path.
-	def canonicalize_path(path)
-		raise ArgumentError, "The 'path' argument may not be nil" if path.nil?
-		return Pathname.new(path).realpath.to_s
-	rescue Errno::ENOENT => e
-		raise InvalidPath, e.message
-	end
-	
-	# Assert that +path+ is a directory. Raises +InvalidPath+ if it isn't.
-	def assert_valid_directory(path)
-		if !File.directory?(path)
-			raise InvalidPath, "'#{path}' is not a valid directory."
-		end
-	end
+	extend self    # Make methods available as class methods.
 	
-	# Assert that +path+ is a file. Raises +InvalidPath+ if it isn't.
-	def assert_valid_file(path)
-		if !File.file?(path)
-			raise InvalidPath, "'#{path}' is not a valid file."
+	def self.included(klass)
+		# When included into another class, make sure that Utils
+		# methods are made private.
+		public_instance_methods(false).each do |method_name|
+			klass.send(:private, method_name)
 		end
 	end
 	
-	# Assert that +username+ is a valid username. Raises
-	# ArgumentError if that is not the case.
-	def assert_valid_username(username)
-		# If username does not exist then getpwnam() will raise an ArgumentError.
-		username && Etc.getpwnam(username)
-	end
-	
-	# Assert that +groupname+ is a valid group name. Raises
-	# ArgumentError if that is not the case.
-	def assert_valid_groupname(groupname)
-		# If groupname does not exist then getgrnam() will raise an ArgumentError.
-		groupname && Etc.getgrnam(groupname)
-	end
-	
 	# Generate a long, cryptographically secure random ID string, which
 	# is also a valid filename.
 	def generate_random_id(method)
+		data = File.open("/dev/urandom", "rb") do |f|
+			f.read(64)
+		end
 		case method
 		when :base64
-			data = [File.read("/dev/urandom", 64)].pack('m')
+			data = [data].pack('m')
 			data.gsub!("\n", '')
 			data.gsub!("+", '')
 			data.gsub!("/", '')
 			data.gsub!(/==$/, '')
 			return data
 		when :hex
-			return File.read("/dev/urandom", 64).unpack('H*')[0]
+			return data.unpack('H*')[0]
 		else
 			raise ArgumentError, "Invalid method #{method.inspect}"
 		end
 	end
 	
-	def close_all_io_objects_for_fds(file_descriptors_to_leave_open)
-		ObjectSpace.each_object(IO) do |io|
-			begin
-				if !file_descriptors_to_leave_open.include?(io.fileno) && !io.closed?
-					io.close
-				end
-			rescue
-			end
-		end
-	end
-	
-	def marshal_exception(exception)
-		data = {
-			:message => exception.message,
-			:class => exception.class.to_s,
-			:backtrace => exception.backtrace
-		}
-		if exception.is_a?(InitializationError)
-			data[:is_initialization_error] = true
-			if exception.child_exception
-				data[:child_exception] = marshal_exception(exception.child_exception)
-				child_exception = exception.child_exception
-				exception.child_exception = nil
-				data[:exception] = Marshal.dump(exception)
-				exception.child_exception = child_exception
-			end
-		else
-			begin
-				data[:exception] = Marshal.dump(exception)
-			rescue ArgumentError, TypeError
-				e = UnknownError.new(exception.message, exception.class.to_s,
-							exception.backtrace)
-				data[:exception] = Marshal.dump(e)
-			end
-		end
-		return Marshal.dump(data)
-	end
-	
-	def unmarshal_exception(data)
-		hash = Marshal.load(data)
-		if hash[:is_initialization_error]
-			if hash[:child_exception]
-				child_exception = unmarshal_exception(hash[:child_exception])
-			else
-				child_exception = nil
-			end
-			
-			exception = Marshal.load(hash[:exception])
-			exception.child_exception = child_exception
-			return exception
-		else
-			begin
-				return Marshal.load(hash[:exception])
-			rescue ArgumentError, TypeError
-				return UnknownError.new(hash[:message], hash[:class], hash[:backtrace])
-			end
-		end
-	end
-	
 	# Print the given exception, including the stack trace, to STDERR.
 	#
 	# +current_location+ is a string which describes where the code is
@@ -182,246 +77,6 @@ protected
 		end
 	end
 	
-	# Prepare an application process using rules for the given spawn options.
-	# This method is to be called before loading the application code.
-	#
-	# +startup_file+ is the application type's startup file, e.g.
-	# "config/environment.rb" for Rails apps and "config.ru" for Rack apps.
-	# See SpawnManager#spawn_application for options.
-	#
-	# This function may modify +options+. The modified options are to be
-	# passed to the request handler.
-	def prepare_app_process(startup_file, options)
-		options["app_root"] = canonicalize_path(options["app_root"])
-		Dir.chdir(options["app_root"])
-		
-		lower_privilege(startup_file, options)
-		path, is_parent = check_directory_tree_permissions(options["app_root"])
-		if path
-			username = Etc.getpwuid(Process.euid).name
-			groupname = Etc.getgrgid(Process.egid).name
-			message = "This application process is currently running as " +
-				"user '#{username}' and group '#{groupname}' and must be " +
-				"able to access its application root directory " +
-				"'#{options["app_root"]}'. "
-			if is_parent
-				message << "However the parent directory '#{path}' " +
-					"has wrong permissions, thereby preventing " +
-					"this process from accessing its application " +
-					"root directory. Please fix the permissions " +
-					"of the directory '#{path}' first."
-			else
-				message << "However this directory is not accessible " +
-					"because it has wrong permissions. Please fix " +
-					"these permissions first."
-			end
-			raise(message)
-		end
-		
-		ENV["RAILS_ENV"] = ENV["RACK_ENV"] = options["environment"]
-		
-		base_uri = options["base_uri"]
-		if base_uri && !base_uri.empty? && base_uri != "/"
-			ENV["RAILS_RELATIVE_URL_ROOT"] = base_uri
-			ENV["RACK_BASE_URI"] = base_uri
-		end
-		
-		encoded_environment_variables = options["environment_variables"]
-		if encoded_environment_variables
-			env_vars_string = encoded_environment_variables.unpack("m").first
-			env_vars_array  = env_vars_string.split("\0", -1)
-			env_vars_array.pop
-			env_vars = Hash[*env_vars_array]
-			env_vars.each_pair do |key, value|
-				ENV[key] = value
-			end
-		end
-		
-		# Instantiate the analytics logger if requested. Can be nil.
-		require 'phusion_passenger/analytics_logger'
-		options["analytics_logger"] = AnalyticsLogger.new_from_options(options)
-		
-		# Make sure RubyGems uses any new environment variable values
-		# that have been set now (e.g. $HOME, $GEM_HOME, etc) and that
-		# it is able to detect newly installed gems.
-		Gem.clear_paths
-		
-		# Because spawned app processes exit using #exit!, #at_exit
-		# blocks aren't called. Here we ninja patch Kernel so that
-		# we can call #at_exit blocks during app process shutdown.
-		class << Kernel
-			def passenger_call_at_exit_blocks
-				@passenger_at_exit_blocks ||= []
-				@passenger_at_exit_blocks.reverse_each do |block|
-					block.call
-				end
-			end
-			
-			def passenger_at_exit(&block)
-				@passenger_at_exit_blocks ||= []
-				@passenger_at_exit_blocks << block
-				return block
-			end
-		end
-		Kernel.class_eval do
-			def at_exit(&block)
-				return Kernel.passenger_at_exit(&block)
-			end
-		end
-		
-		
-		# Rack::ApplicationSpawner depends on the 'rack' library, but the app
-		# might want us to use a bundled version instead of a
-		# gem/apt-get/yum/whatever-installed version. Therefore we must setup
-		# the correct load paths before requiring 'rack'.
-		#
-		# The most popular tool for bundling dependencies is Bundler. Bundler
-		# works as follows:
-		# - If the bundle is locked then a file .bundle/environment.rb exists
-		#   which will setup the load paths.
-		# - If the bundle is not locked then the load paths must be set up by
-		#   calling Bundler.setup.
-		# - Rails 3's boot.rb automatically loads .bundle/environment.rb or
-		#   calls Bundler.setup if that's not available.
-		# - Other Rack apps might not have a boot.rb but we still want to setup
-		#   Bundler.
-		# - Some Rails 2 apps might have explicitly added Bundler support.
-		#   These apps call Bundler.setup in their preinitializer.rb.
-		#
-		# So the strategy is as follows:
-		
-		# Our strategy might be completely unsuitable for the app or the
-		# developer is using something other than Bundler, so we let the user
-		# manually specify a load path setup file.
-		if options["load_path_setup_file"]
-			require File.expand_path(options["load_path_setup_file"])
-		
-		# The app developer may also override our strategy with this magic file.
-		elsif File.exist?('config/setup_load_paths.rb')
-			require File.expand_path('config/setup_load_paths')
-		
-		# If the Bundler lock environment file exists then load that. If it
-		# exists then there's a 99.9% chance that loading it is the correct
-		# thing to do.
-		elsif File.exist?('.bundle/environment.rb')
-			require File.expand_path('.bundle/environment')
-		
-		# If the Bundler environment file doesn't exist then there are two
-		# possibilities:
-		# 1. Bundler is not used, in which case we don't have to do anything.
-		# 2. Bundler *is* used, but the gems are not locked and we're supposed
-		#    to call Bundler.setup.
-		#
-		# The existence of Gemfile indicates whether (2) is true:
-		elsif File.exist?('Gemfile')
-			# In case of Rails 3, config/boot.rb already calls Bundler.setup.
-			# However older versions of Rails may not so loading boot.rb might
-			# not be the correct thing to do. To be on the safe side we
-			# call Bundler.setup ourselves; calling Bundler.setup twice is
-			# harmless. If this isn't the correct thing to do after all then
-			# there's always the load_path_setup_file option and
-			# setup_load_paths.rb.
-			require 'rubygems'
-			require 'bundler'
-			Bundler.setup
-		end
-		
-		# Bundler might remove Phusion Passenger from the load path in its zealous
-		# attempt to un-require RubyGems, so here we put Phusion Passenger back
-		# into the load path. This must be done before loading the app's startup
-		# file because the app might require() Phusion Passenger files.
-		if !$LOAD_PATH.include?(LIBDIR)
-			$LOAD_PATH.unshift(LIBDIR)
-			$LOAD_PATH.uniq!
-		end
-		
-		
-		# !!! NOTE !!!
-		# If the app is using Bundler then any dependencies required past this
-		# point must be specified in the Gemfile. Like ruby-debug if debugging is on...
-		
-		if options["debugger"]
-			require 'ruby-debug'
-			if !Debugger.respond_to?(:ctrl_port)
-				raise "Your version of ruby-debug is too old. Please upgrade to the latest version."
-			end
-			Debugger.start_remote('127.0.0.1', [0, 0])
-			Debugger.start
-		end
-		
-		PhusionPassenger._spawn_options = options
-	end
-	
-	# This method is to be called after loading the application code but
-	# before forking a worker process.
-	def after_loading_app_code(options)
-		# Even though prepare_app_process() restores the Phusion Passenger
-		# load path after setting up Bundler, the app itself might also
-		# remove Phusion Passenger from the load path for whatever reason,
-		# so here we restore the load path again.
-		if !$LOAD_PATH.include?(LIBDIR)
-			$LOAD_PATH.unshift(LIBDIR)
-			$LOAD_PATH.uniq!
-		end
-		
-		# Post-install framework extensions. Possibly preceded by a call to
-		# PhusionPassenger.install_framework_extensions!
-		require 'rails/version' if defined?(::Rails) && !defined?(::Rails::VERSION)
-		if defined?(::Rails) && ::Rails::VERSION::MAJOR <= 2
-			require 'phusion_passenger/classic_rails_extensions/init'
-			ClassicRailsExtensions.init!(options)
-			# Rails 3 extensions are installed by
-			# PhusionPassenger.install_framework_extensions!
-		end
-		
-		PhusionPassenger._spawn_options = nil
-	end
-	
-	# To be called before the request handler main loop is entered, but after the app
-	# startup file has been loaded. This function will fire off necessary events
-	# and perform necessary preparation tasks.
-	#
-	# +forked+ indicates whether the current worker process is forked off from
-	# an ApplicationSpawner that has preloaded the app code.
-	# +options+ are the spawn options that were passed.
-	def before_handling_requests(forked, options)
-		if forked && options["analytics_logger"]
-			options["analytics_logger"].clear_connection
-		end
-		
-		# If we were forked from a preloader process then clear or
-		# re-establish ActiveRecord database connections. This prevents
-		# child processes from concurrently accessing the same
-		# database connection handles.
-		if forked && defined?(::ActiveRecord::Base)
-			if ::ActiveRecord::Base.respond_to?(:clear_all_connections!)
-				::ActiveRecord::Base.clear_all_connections!
-			elsif ::ActiveRecord::Base.respond_to?(:clear_active_connections!)
-				::ActiveRecord::Base.clear_active_connections!
-			elsif ::ActiveRecord::Base.respond_to?(:connected?) &&
-			      ::ActiveRecord::Base.connected?
-				::ActiveRecord::Base.establish_connection
-			end
-		end
-		
-		# Fire off events.
-		PhusionPassenger.call_event(:starting_worker_process, forked)
-		if options["pool_account_username"] && options["pool_account_password_base64"]
-			password = options["pool_account_password_base64"].unpack('m').first
-			PhusionPassenger.call_event(:credentials,
-				options["pool_account_username"], password)
-		else
-			PhusionPassenger.call_event(:credentials, nil, nil)
-		end
-	end
-	
-	# To be called after the request handler main loop is exited. This function
-	# will fire off necessary events perform necessary cleanup tasks.
-	def after_handling_requests
-		PhusionPassenger.call_event(:stopping_worker_process)
-		Kernel.passenger_call_at_exit_blocks
-	end
-	
 	def get_socket_address_type(address)
 		if address =~ %r{^unix:.}
 			return :unix
@@ -457,47 +112,6 @@ protected
 		end
 	end
 	
-	# Fork a new process and run the given block inside the child process, just like
-	# fork(). Unlike fork(), this method is safe, i.e. there's no way for the child
-	# process to escape the block. Any uncaught exceptions in the child process will
-	# be printed to standard output, citing +current_location+ as the source.
-	# Futhermore, the child process will exit by calling Kernel#exit!, thereby
-	# bypassing any at_exit or ensure blocks.
-	#
-	# If +double_fork+ is true, then the child process will fork and immediately exit.
-	# This technique can be used to avoid zombie processes, at the expense of not
-	# being able to waitpid() the second child.
-	def safe_fork(current_location = self.class, double_fork = false)
-		pid = fork
-		if pid.nil?
-			has_exception = false
-			begin
-				if double_fork
-					pid2 = fork
-					if pid2.nil?
-						srand
-						yield
-					end
-				else
-					srand
-					yield
-				end
-			rescue Exception => e
-				has_exception = true
-				print_exception(current_location.to_s, e)
-			ensure
-				exit!(has_exception ? 1 : 0)
-			end
-		else
-			if double_fork
-				Process.waitpid(pid) rescue nil
-				return pid
-			else
-				return pid
-			end
-		end
-	end
-	
 	# Checks whether the given process exists.
 	def process_is_alive?(pid)
 		begin
@@ -509,273 +123,18 @@ protected
 			return true
 		end
 	end
-	module_function :process_is_alive?
-	
-	# Wraps another IO object. Everything written to the PseudoIO will
-	# not only be immediately forwarded to the underlying IO object but
-	# will also be captured in a buffer. The contents of the buffer
-	# can be retrieved by calling #done!.
-	class PseudoIO
-		def initialize(sink)
-			@sink = sink || File.open("/dev/null", "w")
-			@buffer = StringIO.new
-		end
-		
-		def done!
-			result = @buffer.string
-			@buffer = nil
-			return result
-		end
-		
-		def to_io
-			return self
-		end
-		
-		def method_missing(*args, &block)
-			@buffer.send(*args, &block) if @buffer && args.first != :reopen
-			return @sink.send(*args, &block)
-		end
-		
-		def respond_to?(symbol, include_private = false)
-			return @sink.respond_to?(symbol, include_private)
-		end
-	end
-	
-	# Run the given block. A message will be sent through +channel+ (a
-	# MessageChannel object), telling the remote side whether the block
-	# raised an exception, called exit(), or succeeded.
-	#
-	# If _sink_ is non-nil, then every operation on $stderr/STDERR inside
-	# the block will be performed on _sink_ as well. If _sink_ is nil
-	# then all operations on $stderr/STDERR inside the block will be
-	# silently discarded, i.e. if one writes to $stderr/STDERR then nothing
-	# will be actually written to the console.
-	# 
-	# Returns whether the block succeeded, i.e. whether it didn't raise an
-	# exception.
-	#
-	# Exceptions are not propagated, except SystemExit and a few
-	# non-StandardExeption classes such as SignalException. Of the
-	# exceptions that are propagated, only SystemExit will be reported.
-	def report_app_init_status(channel, sink = STDERR)
-		begin
-			old_global_stderr = $stderr
-			old_stderr = STDERR
-			stderr_output = ""
-			
-			pseudo_stderr = PseudoIO.new(sink)
-			Object.send(:remove_const, 'STDERR') rescue nil
-			Object.const_set('STDERR', pseudo_stderr)
-			$stderr = pseudo_stderr
-			
-			begin
-				yield
-			ensure
-				Object.send(:remove_const, 'STDERR') rescue nil
-				Object.const_set('STDERR', old_stderr)
-				$stderr = old_global_stderr
-				stderr_output = pseudo_stderr.done!
-			end
-			
-			channel.write('success')
-			return true
-		rescue StandardError, ScriptError, NoMemoryError => e
-			channel.write('exception')
-			channel.write_scalar(marshal_exception(e))
-			channel.write_scalar(stderr_output)
-			return false
-		rescue SystemExit => e
-			channel.write('exit')
-			channel.write_scalar(marshal_exception(e))
-			channel.write_scalar(stderr_output)
-			raise
-		end
-	end
-	
-	# Receive status information that was sent to +channel+ by
-	# report_app_init_status. If an error occured according to the
-	# received information, then an appropriate exception will be
-	# raised.
-	#
-	# If <tt>print_exception</tt> evaluates to true, then the
-	# exception message and the backtrace will also be printed.
-	# Where it is printed to depends on the type of
-	# <tt>print_exception</tt>:
-	# - If it responds to #puts, then the exception information will
-	#   be printed using this method.
-	# - If it responds to #to_str, then the exception information
-	#   will be appended to the file whose filename equals the return
-	#   value of the #to_str call.
-	# - Otherwise, it will be printed to STDERR.
-	#
-	# Raises:
-	# - AppInitError: this class wraps the exception information
-	#   received through the channel.
-	# - IOError, SystemCallError, SocketError: these errors are
-	#   raised if an error occurred while receiving the information
-	#   through the channel.
-	def unmarshal_and_raise_errors(channel, print_exception = nil, app_type = "rails")
-		args = channel.read
-		if args.nil?
-			raise EOFError, "Unexpected end-of-file detected."
-		end
-		status = args[0]
-		if status == 'exception'
-			child_exception = unmarshal_exception(channel.read_scalar)
-			stderr = channel.read_scalar
-			exception = AppInitError.new(
-				"Application '#{@app_root}' raised an exception: " <<
-				"#{child_exception.class} (#{child_exception.message})",
-				child_exception,
-				app_type,
-				stderr.empty? ? nil : stderr)
-		elsif status == 'exit'
-			child_exception = unmarshal_exception(channel.read_scalar)
-			stderr = channel.read_scalar
-			exception = AppInitError.new("Application '#{@app_root}' exited during startup",
-				child_exception, app_type, stderr.empty? ? nil : stderr)
-		else
-			exception = nil
-		end
-		
-		if print_exception && exception
-			if print_exception.respond_to?(:puts)
-				print_exception(self.class.to_s, child_exception, print_exception)
-			elsif print_exception.respond_to?(:to_str)
-				filename = print_exception.to_str
-				File.open(filename, 'a') do |f|
-					print_exception(self.class.to_s, child_exception, f)
-				end
-			else
-				print_exception(self.class.to_s, child_exception)
-			end
-		end
-		raise exception if exception
-	end
-	
-	# No-op, hook for unit tests.
-	def self.lower_privilege_called
-	end
-	
-	# Lowers the current process's privilege based on the documented rules for
-	# the "user", "group", "default_user" and "default_group" options.
-	def lower_privilege(startup_file, options)
-		Utils.lower_privilege_called
-		return if Process.euid != 0
-		
-		if options["default_user"] && !options["default_user"].empty?
-			default_user = options["default_user"]
-		else
-			default_user = "nobody"
-		end
-		if options["default_group"] && !options["default_group"].empty?
-			default_group = options["default_group"]
-		else
-			default_group = Etc.getgrgid(Etc.getpwnam(default_user).gid).name
-		end
 
-		if options["user"] && !options["user"].empty?
-			begin
-				user_info = Etc.getpwnam(options["user"])
-			rescue ArgumentError
-				user_info = nil
-			end
+	def require_option(hash, key)
+		if hash.has_key?(key)
+			return hash[key]
 		else
-			uid = File.lstat(startup_file).uid
-			begin
-				user_info = Etc.getpwuid(uid)
-			rescue ArgumentError
-				user_info = nil
-			end
+			raise ArgumentError, "Option #{key.inspect} required"
 		end
-		if !user_info || user_info.uid == 0
-			begin
-				user_info = Etc.getpwnam(default_user)
-			rescue ArgumentError
-				user_info = nil
-			end
-		end
-
-		if options["group"] && !options["group"].empty?
-			if options["group"] == "!STARTUP_FILE!"
-				gid = File.lstat(startup_file).gid
-				begin
-					group_info = Etc.getgrgid(gid)
-				rescue ArgumentError
-					group_info = nil
-				end
-			else
-				begin
-					group_info = Etc.getgrnam(options["group"])
-				rescue ArgumentError
-					group_info = nil
-				end
-			end
-		elsif user_info
-			begin
-				group_info = Etc.getgrgid(user_info.gid)
-			rescue ArgumentError
-				group_info = nil
-			end
-		else
-			group_info = nil
-		end
-		if !group_info || group_info.gid == 0
-			begin
-				group_info = Etc.getgrnam(default_group)
-			rescue ArgumentError
-				group_info = nil
-			end
-		end
-
-		if !user_info
-			raise SecurityError, "Cannot determine a user to lower privilege to"
-		end
-		if !group_info
-			raise SecurityError, "Cannot determine a group to lower privilege to"
-		end
-
-		NativeSupport.switch_user(user_info.name, user_info.uid, group_info.gid)
-		ENV['USER'] = user_info.name
-		ENV['HOME'] = user_info.dir
 	end
-	
-	# Checks the permissions of all parent directories of +dir+ as
-	# well as +dir+ itself.
-	#
-	# +dir+ must be a canonical path.
-	#
-	# If one of the parent directories has wrong permissions, causing
-	# +dir+ to be inaccessible by the current process, then this function
-	# returns [path, true] where +path+ is the path of the top-most
-	# directory with wrong permissions.
-	# 
-	# If +dir+ itself is not executable by the current process then
-	# this function returns [dir, false].
-	#
-	# Otherwise, nil is returned.
-	def check_directory_tree_permissions(dir)
-		components = dir.split("/")
-		components.shift
-		i = 0
-		# We can't use File.readable() and friends here because they
-		# don't always work right with ACLs. Instead of we use 'real'
-		# checks.
-		while i < components.size
-			path = "/" + components[0..i].join("/")
-			begin
-				File.stat(path)
-			rescue Errno::EACCES
-				return [File.dirname(path), true]
-			end
-			i += 1
-		end
-		begin
-			Dir.chdir(dir) do
-				return nil
-			end
-		rescue Errno::EACCES
-			return [dir, false]
+
+	def install_options_as_ivars(object, options, *keys)
+		keys.each do |key|
+			object.instance_variable_set("@#{key}", options[key])
 		end
 	end
 	
@@ -783,10 +142,22 @@ protected
 	# or if that's not supported the backtrace for the current thread.
 	def global_backtrace_report
 		if Kernel.respond_to?(:caller_for_all_threads)
-			output = "========== Process #{Process.pid}: backtrace dump ==========\n"
-			caller_for_all_threads.each_pair do |thread, stack|
+			all_thread_stacks = caller_for_all_threads
+		elsif Thread.respond_to?(:list) && Thread.public_method_defined?(:backtrace)
+			all_thread_stacks = {}
+			Thread.list.each do |thread|
+				all_thread_stacks[thread] = thread.backtrace
+			end
+		end
+
+		output = "========== Process #{Process.pid}: backtrace dump ==========\n"
+		if all_thread_stacks
+			all_thread_stacks.each_pair do |thread, stack|
+				if thread_name = thread[:name]
+					thread_name = "(#{thread_name})"
+				end
 				output << ("-" * 60) << "\n"
-				output << "# Thread: #{thread.inspect}, "
+				output << "# Thread: #{thread.inspect}#{thread_name}, "
 				if thread == Thread.main
 					output << "[main thread], "
 				end
@@ -799,7 +170,6 @@ protected
 				output << "\n\n"
 			end
 		else
-			output = "========== Process #{Process.pid}: backtrace dump ==========\n"
 			output << ("-" * 60) << "\n"
 			output << "# Current thread: #{Thread.current.inspect}\n"
 			output << ("-" * 60) << "\n"
@@ -808,39 +178,6 @@ protected
 		return output
 	end
 	
-	def to_boolean(value)
-		return !(value.nil? || value == false || value == "false")
-	end
-	
-	def sanitize_spawn_options(options)
-		defaults = {
-			"app_type"         => "rails",
-			"environment"      => "production",
-			"spawn_method"     => "smart-lv2",
-			"framework_spawner_timeout" => -1,
-			"app_spawner_timeout"       => -1,
-			"print_exceptions" => true
-		}
-		options = defaults.merge(options)
-		options["app_group_name"]            = options["app_root"] if !options["app_group_name"]
-		options["framework_spawner_timeout"] = options["framework_spawner_timeout"].to_i
-		options["app_spawner_timeout"]       = options["app_spawner_timeout"].to_i
-		if options.has_key?("print_framework_loading_exceptions")
-			options["print_framework_loading_exceptions"] = to_boolean(options["print_framework_loading_exceptions"])
-		end
-		# Force this to be a boolean for easy use with Utils#unmarshal_and_raise_errors.
-		options["print_exceptions"]          = to_boolean(options["print_exceptions"])
-		
-		options["analytics"]                 = to_boolean(options["analytics"])
-		options["show_version_in_header"]    = to_boolean(options["show_version_in_header"])
-		
-		# Smart spawning is not supported when using ruby-debug.
-		options["debugger"]     = to_boolean(options["debugger"])
-		options["spawn_method"] = "conservative" if options["debugger"]
-		
-		return options
-	end
-	
 	if defined?(PhusionPassenger::NativeSupport)
 		# Split the given string into an hash. Keys and values are obtained by splitting the
 		# string using the null character as the delimitor.
@@ -861,228 +198,3 @@ protected
 end
 
 end # module PhusionPassenger
-
-class Exception
-	def backtrace_string(current_location = nil)
-		if current_location.nil?
-			location = nil
-		else
-			location = "in #{current_location} "
-		end
-		return "*** Exception #{self.class} #{location}" <<
-			"(#{self}) (process #{$$}, thread #{Thread.current}):\n" <<
-			"\tfrom " << backtrace.join("\n\tfrom ")
-	end
-end
-
-class ConditionVariable
-	# This is like ConditionVariable.wait(), but allows one to wait a maximum
-	# amount of time. Returns true if this condition was signaled, false if a
-	# timeout occurred.
-	def timed_wait(mutex, secs)
-		ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
-		if secs > 100000000
-			# NOTE: If one calls timeout() on FreeBSD 5 with an
-			# argument of more than 100000000, then MRI will become
-			# stuck in an infite loop, blocking all threads. It seems
-			# that MRI uses select() to implement sleeping.
-			# I think that a value of more than 100000000 overflows
-			# select()'s data structures, causing it to behave incorrectly.
-			# So we just make sure we can't sleep more than 100000000
-			# seconds.
-			secs = 100000000
-		end
-		if ruby_engine == "jruby"
-			if secs > 0
-				return wait(mutex, secs)
-			else
-				return wait(mutex)
-			end
-		elsif RUBY_VERSION >= '1.9.2'
-			if secs > 0
-				t1 = Time.now
-				wait(mutex, secs)
-				t2 = Time.now
-				return t2.to_f - t1.to_f < secs
-			else
-				wait(mutex)
-				return true
-			end
-		else
-			if secs > 0
-				Timeout.timeout(secs) do
-					wait(mutex)
-				end
-			else
-				wait(mutex)
-			end
-			return true
-		end
-	rescue Timeout::Error
-		return false
-	end
-	
-	# This is like ConditionVariable.wait(), but allows one to wait a maximum
-	# amount of time. Raises Timeout::Error if the timeout has elapsed.
-	def timed_wait!(mutex, secs)
-		ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
-		if secs > 100000000
-			# See the corresponding note for timed_wait().
-			secs = 100000000
-		end
-		if ruby_engine == "jruby"
-			if secs > 0
-				if !wait(mutex, secs)
-					raise Timeout::Error, "Timeout"
-				end
-			else
-				wait(mutex)
-			end
-		elsif RUBY_VERSION >= '1.9.2'
-			if secs > 0
-				t1 = Time.now
-				wait(mutex, secs)
-				t2 = Time.now
-				if t2.to_f - t1.to_f >= secs
-					raise Timeout::Error, "Timeout"
-				end
-			else
-				wait(mutex)
-			end
-		else
-			if secs > 0
-				Timeout.timeout(secs) do
-					wait(mutex)
-				end
-			else
-				wait(mutex)
-			end
-		end
-		return nil
-	end
-end
-
-class IO
-	if defined?(PhusionPassenger::NativeSupport)
-		# Writes all of the strings in the +components+ array into the given file
-		# descriptor using the +writev()+ system call. Unlike IO#write, this method
-		# does not require one to concatenate all those strings into a single buffer
-		# in order to send the data in a single system call. Thus, #writev is a great
-		# way to perform zero-copy I/O.
-		#
-		# Unlike the raw writev() system call, this method ensures that all given
-		# data is written before returning, by performing multiple writev() calls
-		# and whatever else is necessary.
-		#
-		#   io.writev(["hello ", "world", "\n"])
-		def writev(components)
-			return PhusionPassenger::NativeSupport.writev(fileno, components)
-		end
-		
-		# Like #writev, but accepts two arrays. The data is written in the given order.
-		#
-		#   io.writev2(["hello ", "world", "\n"], ["another ", "message\n"])
-		def writev2(components, components2)
-			return PhusionPassenger::NativeSupport.writev2(fileno,
-				components, components2)
-		end
-		
-		# Like #writev, but accepts three arrays. The data is written in the given order.
-		#
-		#   io.writev3(["hello ", "world", "\n"],
-		#     ["another ", "message\n"],
-		#     ["yet ", "another ", "one", "\n"])
-		def writev3(components, components2, components3)
-			return PhusionPassenger::NativeSupport.writev3(fileno,
-				components, components2, components3)
-		end
-	end
-	
-	if defined?(Fcntl::F_SETFD)
-		def close_on_exec!
-			fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
-		end
-	else
-		def close_on_exec!
-		end
-	end
-end
-
-module Signal
-	# Like Signal.list, but only returns signals that we can actually trap.
-	def self.list_trappable
-		ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
-		case ruby_engine
-		when "ruby"
-			result = Signal.list
-			result.delete("ALRM")
-			result.delete("VTALRM")
-		when "jruby"
-			result = Signal.list
-			result.delete("QUIT")
-			result.delete("ILL")
-			result.delete("FPE")
-			result.delete("KILL")
-			result.delete("SEGV")
-			result.delete("USR1")
-		else
-			result = Signal.list
-		end
-		
-		# Don't touch SIGCHLD no matter what! On OS X waitpid() will
-		# malfunction if SIGCHLD doesn't have a correct handler.
-		result.delete("CLD")
-		result.delete("CHLD")
-		
-		# Other stuff that we don't want to trap no matter which
-		# Ruby engine.
-		result.delete("STOP")
-		
-		return result
-	end
-end
-
-module Process
-	def self.timed_waitpid(pid, max_time)
-		done = false
-		start_time = Time.now
-		while Time.now - start_time < max_time && !done
-			done = Process.waitpid(pid, Process::WNOHANG)
-			sleep 0.1 if !done
-		end
-		return !!done
-	rescue Errno::ECHILD
-		return true
-	end
-end
-
-# MRI's implementations of UNIXSocket#recv_io and UNIXSocket#send_io
-# are broken on 64-bit FreeBSD 7, OpenBSD and x86_64/ppc64 OS X. So
-# we override them with our own implementation.
-ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
-if ruby_engine == "ruby" && defined?(PhusionPassenger::NativeSupport) && (
-  RUBY_PLATFORM =~ /freebsd/ ||
-  RUBY_PLATFORM =~ /openbsd/ ||
-  (RUBY_PLATFORM =~ /darwin/ && RUBY_PLATFORM !~ /universal/)
-)
-	require 'socket'
-	UNIXSocket.class_eval do
-		def recv_io(klass = IO)
-			return klass.for_fd(PhusionPassenger::NativeSupport.recv_fd(self.fileno))
-		end
-		
-		def send_io(io)
-			PhusionPassenger::NativeSupport.send_fd(self.fileno, io.fileno)
-		end
-	end
-end
-
-module GC
-	if !respond_to?(:copy_on_write_friendly?)
-		# Checks whether the current Ruby interpreter's garbage
-		# collector is copy-on-write friendly.
-		def self.copy_on_write_friendly?
-			return false
-		end
-	end
-end
diff --git a/lib/phusion_passenger/utils/ansi_colors.rb b/lib/phusion_passenger/utils/ansi_colors.rb
new file mode 100644
index 0000000..db66a1d
--- /dev/null
+++ b/lib/phusion_passenger/utils/ansi_colors.rb
@@ -0,0 +1,59 @@
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2010 Phusion
+#
+#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+#
+#  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
+#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#  THE SOFTWARE.
+
+module PhusionPassenger
+module Utils
+
+module AnsiColors
+	RESET    = "\e[0m".freeze
+	BOLD     = "\e[1m".freeze
+	RED      = "\e[31m".freeze
+	GREEN    = "\e[32m".freeze
+	YELLOW   = "\e[33m".freeze
+	WHITE    = "\e[37m".freeze
+	BLACK_BG = "\e[40m".freeze
+	BLUE_BG  = "\e[44m".freeze
+	DEFAULT_TERMINAL_COLOR = "#{RESET}#{WHITE}#{BLACK_BG}".freeze
+	
+	extend self  # Make methods available as class methods.
+	
+	def self.included(klass)
+		# When included into another class, make sure that Utils
+		# methods are made private.
+		public_instance_methods(false).each do |method_name|
+			klass.send(:private, method_name)
+		end
+	end
+	
+	def ansi_colorize(text)
+		text = text.gsub(%r{<b>(.*?)</b>}m, "#{BOLD}\\1#{DEFAULT_TERMINAL_COLOR}")
+		text.gsub!(%r{<red>(.*?)</red>}m, "#{BOLD}#{RED}\\1#{DEFAULT_TERMINAL_COLOR}")
+		text.gsub!(%r{<green>(.*?)</green>}m, "#{BOLD}#{GREEN}\\1#{DEFAULT_TERMINAL_COLOR}")
+		text.gsub!(%r{<yellow>(.*?)</yellow>}m, "#{BOLD}#{YELLOW}\\1#{DEFAULT_TERMINAL_COLOR}")
+		text.gsub!(%r{<banner>(.*?)</banner>}m, "#{BOLD}#{BLUE_BG}#{YELLOW}\\1#{DEFAULT_TERMINAL_COLOR}")
+		return text
+	end
+end
+
+end # module Utils
+end # module PhusionPassenger
diff --git a/lib/phusion_passenger/utils/file_system_watcher.rb b/lib/phusion_passenger/utils/file_system_watcher.rb
index 29e362e..c5d6098 100644
--- a/lib/phusion_passenger/utils/file_system_watcher.rb
+++ b/lib/phusion_passenger/utils/file_system_watcher.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -39,7 +39,7 @@ module Utils
 #   This will cause +nil+ to be returned.
 # - The thread is interrupted. This will cause +nil+ to be returned.
 # 
-# The constructor will attempt to stat and possible also open all specified
+# The constructor will attempt to stat and possibly also open all specified
 # files/directories. If one of them cannot be statted or opened, then
 # +false+ will be returned by #wait_for_change.
 #
diff --git a/lib/phusion_passenger/utils/hosts_file_parser.rb b/lib/phusion_passenger/utils/hosts_file_parser.rb
index 8f6f078..abb7a54 100644
--- a/lib/phusion_passenger/utils/hosts_file_parser.rb
+++ b/lib/phusion_passenger/utils/hosts_file_parser.rb
@@ -1,5 +1,5 @@
 # encoding: binary
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -127,4 +127,4 @@ private
 end
 
 end
-end
\ No newline at end of file
+end
diff --git a/lib/phusion_passenger/utils/rewindable_input.rb b/lib/phusion_passenger/utils/rewindable_input.rb
deleted file mode 100644
index baab389..0000000
--- a/lib/phusion_passenger/utils/rewindable_input.rb
+++ /dev/null
@@ -1,125 +0,0 @@
-# Modified version of Rack::RewindableInput with Ruby 1.9 fix.
-
-require 'tempfile'
-
-module PhusionPassenger
-module Utils
-
-  # Class which can make any IO object rewindable, including non-rewindable ones. It does
-  # this by buffering the data into a tempfile, which is rewindable.
-  #
-  # rack.input is required to be rewindable, so if your input stream IO is non-rewindable
-  # by nature (e.g. a pipe or a socket) then you can wrap it in an object of this class
-  # to easily make it rewindable.
-  #
-  # Don't forget to call #close when you're done. This frees up temporary resources that
-  # RewindableInput uses, though it does *not* close the original IO object.
-  class RewindableInput
-    def initialize(io)
-      @io = io
-      @rewindable_io = nil
-      @unlinked = false
-    end
-    
-    def gets
-      make_rewindable unless @rewindable_io
-      @rewindable_io.gets
-    end
-    
-    def read(*args)
-      make_rewindable unless @rewindable_io
-      @rewindable_io.read(*args)
-    end
-    
-    def each(&block)
-      make_rewindable unless @rewindable_io
-      @rewindable_io.each(&block)
-    end
-    
-    def rewind
-      make_rewindable unless @rewindable_io
-      @rewindable_io.rewind
-    end
-    
-    def size
-      make_rewindable unless @rewindable_io
-      @rewindable_io.size
-    end
-    
-    # Closes this RewindableInput object without closing the originally
-    # wrapped IO oject. Cleans up any temporary resources that this RewindableInput
-    # has created.
-    #
-    # This method may be called multiple times. It does nothing on subsequent calls.
-    def close
-      if @rewindable_io
-        if @unlinked
-          @rewindable_io.close
-        else
-          @rewindable_io.close!
-        end
-        @rewindable_io = nil
-      end
-    end
-    
-    private
-    
-    if RUBY_VERSION < '1.9.0'
-      # Many Ruby 1.8's tempfile libraries have a bug that can cause
-      # the #close method to raise an exception. Subclass it and fix
-      # it.
-      class Tempfile < ::Tempfile
-        def _close
-          @tmpfile.close if @tmpfile
-          @data[1] = nil if @data
-          @tmpfile = nil
-        end
-      end
-    end
-
-    def make_rewindable
-      # Buffer all data into a tempfile. Since this tempfile is private to this
-      # RewindableInput object, we chmod it so that nobody else can read or write
-      # it. On POSIX filesystems we also unlink the file so that it doesn't
-      # even have a file entry on the filesystem anymore, though we can still
-      # access it because we have the file handle open.
-      @rewindable_io = Tempfile.new('RackRewindableInput')
-      @rewindable_io.chmod(0000)
-      @rewindable_io.set_encoding(Encoding::BINARY) if @rewindable_io.respond_to?(:set_encoding)
-      @rewindable_io.binmode
-      if filesystem_has_posix_semantics? && !tempfile_unlink_contains_bug?
-        @rewindable_io.unlink
-        @unlinked = true
-      end
-      
-      buffer = ""
-      while @io.read(1024 * 4, buffer)
-        entire_buffer_written_out = false
-        while !entire_buffer_written_out
-          written = @rewindable_io.write(buffer)
-          entire_buffer_written_out = written == buffer.size
-          if !entire_buffer_written_out
-            buffer.slice!(0 .. written - 1)
-          end
-        end
-      end
-      @rewindable_io.rewind
-    end
-    
-    def filesystem_has_posix_semantics?
-      RUBY_PLATFORM !~ /(mswin|mingw|cygwin|java)/
-    end
-    
-    def tempfile_unlink_contains_bug?
-      # The tempfile library as included in Ruby 1.9.1-p152 and later
-      # contains a bug: unlinking an open Tempfile object also closes
-      # it, which breaks our expected POSIX semantics. This problem
-      # has been fixed in Ruby 1.9.2, but the Ruby team chose not to
-      # include the bug fix in later versions of the 1.9.1 series.
-      ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
-      ruby_engine == "ruby" && RUBY_VERSION == "1.9.1" && RUBY_PATCHLEVEL >= 152
-    end
-  end
-
-end # module Utils
-end # module PhusionPassenger
diff --git a/lib/phusion_passenger/utils/tee_input.rb b/lib/phusion_passenger/utils/tee_input.rb
new file mode 100644
index 0000000..39e7836
--- /dev/null
+++ b/lib/phusion_passenger/utils/tee_input.rb
@@ -0,0 +1,174 @@
+# encoding: binary
+#
+# This file is taken from Unicorn. The following license applies to this file
+# (and this file only, not to the rest of Phusion Passenger):
+#
+# 1. You may make and give away verbatim copies of the source form of the
+#    software without restriction, provided that you duplicate all of the
+#    original copyright notices and associated disclaimers.
+#
+# 2. You may modify your copy of the software in any way, provided that
+#    you do at least ONE of the following:
+#
+#      a) place your modifications in the Public Domain or otherwise make them
+#      Freely Available, such as by posting said modifications to Usenet or an
+#      equivalent medium, or by allowing the author to include your
+#      modifications in the software.
+#
+#      b) use the modified software only within your corporation or
+#         organization.
+#
+#      c) rename any non-standard executables so the names do not conflict with
+#      standard executables, which must also be provided.
+#
+#      d) make other distribution arrangements with the author.
+#
+# 3. You may distribute the software in object code or executable
+#    form, provided that you do at least ONE of the following:
+#
+#      a) distribute the executables and library files of the software,
+#      together with instructions (in the manual page or equivalent) on where
+#      to get the original distribution.
+#
+#      b) accompany the distribution with the machine-readable source of the
+#      software.
+#
+#      c) give non-standard executables non-standard names, with
+#         instructions on where to get the original software distribution.
+#
+#      d) make other distribution arrangements with the author.
+#
+# 4. You may modify and include the part of the software into any other
+#    software (possibly commercial).  But some files in the distribution
+#    are not written by the author, so that they are not under this terms.
+#
+# 5. The scripts and library files supplied as input to or produced as
+#    output from the software do not automatically fall under the
+#    copyright of the software, but belong to whomever generated them,
+#    and may be sold commercially, and may be aggregated with this
+#    software.
+#
+# 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+#    IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+#    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#    PURPOSE.
+
+require 'stringio'
+require 'phusion_passenger/utils/tmpio'
+
+module PhusionPassenger
+module Utils
+
+# acts like tee(1) on an input input to provide a input-like stream
+# while providing rewindable semantics through a File/StringIO backing
+# store.  On the first pass, the input is only read on demand so your
+# Rack application can use input notification (upload progress and
+# like).  This should fully conform to the Rack::Lint::InputWrapper
+# specification on the public API.  This class is intended to be a
+# strict interpretation of Rack::Lint::InputWrapper functionality and
+# will not support any deviations from it.
+#
+# When processing uploads, Unicorn exposes a TeeInput object under
+# "rack.input" of the Rack environment.
+class TeeInput
+  CONTENT_LENGTH = "CONTENT_LENGTH".freeze
+
+  # The maximum size (in +bytes+) to buffer in memory before
+  # resorting to a temporary file.  Default is 112 kilobytes.
+  @@client_body_buffer_size = 112 * 1024
+
+  # sets the maximum size of request bodies to buffer in memory,
+  # amounts larger than this are buffered to the filesystem
+  def self.client_body_buffer_size=(bytes)
+    @@client_body_buffer_size = bytes
+  end
+
+  # returns the maximum size of request bodies to buffer in memory,
+  # amounts larger than this are buffered to the filesystem
+  def self.client_body_buffer_size
+    @@client_body_buffer_size
+  end
+
+  # Initializes a new TeeInput object.  You normally do not have to call
+  # this unless you are writing an HTTP server.
+  def initialize(socket, env)
+    @len = env[CONTENT_LENGTH]
+    @len = @len.to_i if @len
+    @socket = socket
+    @tmp = @len && @len <= @@client_body_buffer_size ?
+           StringIO.new("") : TmpIO.new("PassengerTeeInput")
+  end
+
+  def close
+    @tmp.close
+  end
+
+  def size
+    @len and return @len
+    pos = @tmp.pos
+    consume!
+    @tmp.pos = pos
+    @len = @tmp.size
+  end
+
+  def read(*args)
+    if socket_drained?
+      @tmp.read(*args)
+    else
+      tee(@socket.read(*args))
+    end
+  end
+
+  def gets
+    if socket_drained?
+      @tmp.gets
+    else
+      tee(@socket.gets)
+    end
+  end
+
+  def rewind
+    return 0 if 0 == @tmp.size
+    consume! if !socket_drained?
+    @tmp.rewind # Rack does not specify what the return value is here
+  end
+
+  def each
+    while line = gets
+      yield line
+    end
+
+    self # Rack does not specify what the return value is here
+  end
+
+private
+  
+  def socket_drained?
+    if @socket
+      if @socket.eof?
+        @socket = nil
+        true
+      else
+        false
+      end
+    else
+      true
+    end
+  end
+
+  # consumes the stream of the socket
+  def consume!
+    junk = ""
+    nil while read(16 * 1024, junk)
+  end
+
+  def tee(buffer)
+    if buffer && buffer.size > 0
+      @tmp.write(buffer)
+    end
+    buffer
+  end
+end
+
+end # module Utils
+end # module PhusionPassenger
diff --git a/lib/phusion_passenger/utils/tmpdir.rb b/lib/phusion_passenger/utils/tmpdir.rb
index 57299b8..8b5034d 100644
--- a/lib/phusion_passenger/utils/tmpdir.rb
+++ b/lib/phusion_passenger/utils/tmpdir.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -67,4 +67,4 @@ protected
 	end
 end
 
-end
\ No newline at end of file
+end
diff --git a/lib/phusion_passenger/utils/tmpio.rb b/lib/phusion_passenger/utils/tmpio.rb
new file mode 100644
index 0000000..1713622
--- /dev/null
+++ b/lib/phusion_passenger/utils/tmpio.rb
@@ -0,0 +1,68 @@
+require 'tmpdir'
+
+module PhusionPassenger
+module Utils
+
+# some versions of Ruby had a broken Tempfile which didn't work
+# well with unlinked files.  This one is much shorter, easier
+# to understand, and slightly faster.
+class TmpIO < File
+
+  # creates and returns a new File object.  The File is unlinked
+  # immediately, switched to binary mode, and userspace output
+  # buffering is disabled
+  def self.new(namespace)
+    fp = begin
+      super("#{Dir::tmpdir}/#{namespace}-#{rand}", RDWR|CREAT|EXCL, 0600)
+    rescue Errno::EEXIST
+      retry
+    end
+    unlink(fp.path)
+    fp.binmode
+    fp.sync = true
+    fp
+  end
+
+  # for easier env["rack.input"] compatibility with Rack <= 1.1
+  def size
+    stat.size
+  end unless File.method_defined?(:size)
+end
+
+# Like Dir.mktmpdir, but creates shorter filenames.
+def self.mktmpdir(prefix_suffix=nil, tmpdir=nil)
+  case prefix_suffix
+  when nil
+    prefix = "d"
+    suffix = ""
+  when String
+    prefix = prefix_suffix
+    suffix = ""
+  when Array
+    prefix = prefix_suffix[0]
+    suffix = prefix_suffix[1]
+  else
+    raise ArgumentError, "unexpected prefix_suffix: #{prefix_suffix.inspect}"
+  end
+  tmpdir ||= Dir.tmpdir
+  begin
+    path = "#{tmpdir}/#{prefix}#{rand(0x100000000).to_s(36)}"
+    path << suffix
+    Dir.mkdir(path, 0700)
+  rescue Errno::EEXIST
+    retry
+  end
+
+  if block_given?
+    begin
+      yield path
+    ensure
+      FileUtils.remove_entry_secure path
+    end
+  else
+    path
+  end
+end
+
+end # module Utils
+end # module PhusionPassenger
diff --git a/lib/phusion_passenger/utils/unseekable_socket.rb b/lib/phusion_passenger/utils/unseekable_socket.rb
index d836b66..7ec1a3b 100644
--- a/lib/phusion_passenger/utils/unseekable_socket.rb
+++ b/lib/phusion_passenger/utils/unseekable_socket.rb
@@ -1,4 +1,4 @@
-#  Phusion Passenger - http://www.modrails.com/
+#  Phusion Passenger - https://www.phusionpassenger.com/
 #  Copyright (c) 2010 Phusion
 #
 #  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
@@ -26,14 +26,14 @@ require 'phusion_passenger/utils'   # So that we can know whether #writev is sup
 module PhusionPassenger
 module Utils
 
-# Some frameworks (e.g. Merb) call _seek_ and _rewind_ on the input stream
+# Some frameworks (e.g. Merb) call `seek` and `rewind` on the input stream
 # if it responds to these methods. In case of Phusion Passenger, the input
-# stream is a socket, and altough socket objects respond to _seek_ and
-# _rewind_, calling these methods will raise an exception. We don't want
+# stream is a socket, and altough socket objects respond to `seek` and
+# `rewind`, calling these methods will raise an exception. We don't want
 # this to happen so in AbstractRequestHandler we wrap the client socket
 # into an UnseekableSocket wrapper, which doesn't respond to these methods.
 #
-# We used to dynamically undef _seek_ and _rewind_ on sockets, but this
+# We used to dynamically undef `seek` and `rewind` on sockets, but this
 # blows the Ruby interpreter's method cache and made things slower.
 # Wrapping a socket is faster despite extra method calls.
 #
@@ -87,8 +87,21 @@ class UnseekableSocket
 	def binmode
 	end
 	
+	# This makes select() work.
 	def to_io
-		self
+		@socket
+	end
+
+	def simulate_eof!
+		@simulate_eof = true
+	end
+
+	def stop_simulating_eof!
+		@simulate_eof = false
+	end
+
+	def fileno
+		@socket.fileno
 	end
 	
 	def addr
@@ -128,34 +141,58 @@ class UnseekableSocket
 	end
 	
 	def gets
+		return nil if @simulate_eof
 		@socket.gets
 	rescue => e
 		raise annotate(e)
 	end
 	
 	def read(*args)
+		if @simulate_eof
+			length, buffer = args
+			if buffer
+				buffer.replace(binary_string(""))
+			else
+				buffer = binary_string("")
+			end
+			if length
+				return nil
+			else
+				return buffer
+			end
+		end
 		@socket.read(*args)
 	rescue => e
 		raise annotate(e)
 	end
 	
 	def readpartial(*args)
+		raise EOFError, "end of file reached" if @simulate_eof
 		@socket.readpartial(*args)
 	rescue => e
 		raise annotate(e)
 	end
 	
 	def readline
+		raise EOFError, "end of file reached" if @simulate_eof
 		@socket.readline
 	rescue => e
 		raise annotate(e)
 	end
 	
 	def each(&block)
+		return if @simulate_eof
 		@socket.each(&block)
 	rescue => e
 		raise annotate(e)
 	end
+
+	def eof?
+		return true if @simulate_eof
+		@socket.eof?
+	rescue => e
+		raise annotate(e)
+	end
 	
 	def closed?
 		@socket.closed?
@@ -190,6 +227,20 @@ private
 		exception.instance_variable_set(:"@from_unseekable_socket", @socket.object_id)
 		return exception
 	end
+
+	def raise_error_because_activity_disallowed!
+		raise IOError, "It is not possible to read or write from the client socket because the current."
+	end
+
+	if ''.respond_to?(:force_encoding)
+		def binary_string(str)
+			return ''.force_encoding('binary')
+		end
+	else
+		def binary_string(str)
+			return ''
+		end
+	end
 end
 
 end # module Utils
diff --git a/lib/phusion_passenger/wsgi/application_spawner.rb b/lib/phusion_passenger/wsgi/application_spawner.rb
deleted file mode 100644
index b22c2cb..0000000
--- a/lib/phusion_passenger/wsgi/application_spawner.rb
+++ /dev/null
@@ -1,108 +0,0 @@
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-require 'socket'
-require 'phusion_passenger/app_process'
-require 'phusion_passenger/message_channel'
-require 'phusion_passenger/public_api'
-require 'phusion_passenger/utils'
-require 'phusion_passenger/utils/tmpdir'
-require 'phusion_passenger/native_support'
-
-module PhusionPassenger
-module WSGI
-
-# Class for spawning WSGI applications.
-class ApplicationSpawner
-	include Utils
-	REQUEST_HANDLER = File.expand_path(File.dirname(__FILE__) + "/request_handler.py")
-	
-	def self.spawn_application(*args)
-		@@instance ||= ApplicationSpawner.new
-		@@instance.spawn_application(*args)
-	end
-	
-	# Spawn an instance of the given WSGI application. When successful, an
-	# Application object will be returned, which represents the spawned
-	# application.
-	#
-	# Raises:
-	# - AppInitError: The WSGI application raised an exception or called
-	#   exit() during startup.
-	# - SystemCallError, IOError, SocketError: Something went wrong.
-	def spawn_application(options)
-		a, b = UNIXSocket.pair
-		pid = safe_fork(self.class.to_s, true) do
-			a.close
-			
-			file_descriptors_to_leave_open = [0, 1, 2, b.fileno]
-			NativeSupport.close_all_file_descriptors(file_descriptors_to_leave_open)
-			close_all_io_objects_for_fds(file_descriptors_to_leave_open)
-			
-			run(MessageChannel.new(b), options)
-		end
-		b.close
-		Process.waitpid(pid) rescue nil
-		
-		channel = MessageChannel.new(a)
-		return AppProcess.read_from_channel(channel)
-	end
-
-private
-	def run(channel, options)
-		$0 = "WSGI: #{options['app_group_name']}"
-		prepare_app_process("passenger_wsgi.py", options)
-		ENV['WSGI_ENV'] = options['environment']
-		
-		if defined?(NativeSupport)
-			unix_path_max = NativeSupport::UNIX_PATH_MAX
-		else
-			unix_path_max = 100
-		end
-		
-		socket_file = "#{passenger_tmpdir}/backends/wsgi.#{Process.pid}.#{rand 10000000}"
-		socket_file = socket_file.slice(0, unix_path_max - 1)
-		server = UNIXServer.new(socket_file)
-		begin
-			File.chmod(0666, socket_file)
-			reader, writer = IO.pipe
-			app_process = AppProcess.new(options["app_root"], Process.pid, writer,
-				:main => [socket_file, 'unix'])
-			app_process.write_to_channel(channel)
-			writer.close
-			channel.close
-			
-			NativeSupport.close_all_file_descriptors([0, 1, 2, server.fileno,
-				reader.fileno])
-			exec(REQUEST_HANDLER, socket_file, server.fileno.to_s,
-				reader.fileno.to_s)
-		rescue
-			server.close
-			File.unlink(socket_file)
-			raise
-		end
-	end
-end
-
-end # module WSGI
-end # module PhusionPassenger
diff --git a/lib/phusion_passenger/wsgi/request_handler.py b/lib/phusion_passenger/wsgi/request_handler.py
deleted file mode 100755
index 5660618..0000000
--- a/lib/phusion_passenger/wsgi/request_handler.py
+++ /dev/null
@@ -1,199 +0,0 @@
-#!/usr/bin/env python
-#  Phusion Passenger - http://www.modrails.com/
-#  Copyright (c) 2010 Phusion
-#
-#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
-#
-#  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
-#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#  THE SOFTWARE.
-
-import socket, os, random, sys, struct, select, imp
-import exceptions, traceback
-
-from socket import _fileobject
-
-class RequestHandler:
-	def __init__(self, socket_file, server, owner_pipe, app):
-		self.socket_file = socket_file
-		self.server = server
-		self.owner_pipe = owner_pipe
-		self.app = app
-	
-	def cleanup(self):
-		self.server.close()
-		try:
-			os.remove(self.socket_file)
-		except:
-			pass
-	
-	def main_loop(self):
-		done = False
-		try:
-			while not done:
-				client, address = self.accept_connection()
-				if not client:
-					done = True
-					break
-				try:
-					try:
-						env, input_stream = self.parse_request(client)
-						if env:
-							if env['REQUEST_METHOD'] == 'ping':
-								self.process_ping(env, input_stream, client)
-							else:
-								self.process_request(env, input_stream, client)
-						else:
-							done = True
-					except KeyboardInterrupt:
-						done = True
-					except Exception, e:
-						traceback.print_tb(sys.exc_info()[2])
-						sys.stderr.write(str(e.__class__) + ": " + e.message + "\n")
-				finally:
-					try:
-						client.close()
-					except:
-						pass
-		except KeyboardInterrupt:
-			pass
-
-	def accept_connection(self):
-		result = select.select([self.owner_pipe, self.server.fileno()], [], [])[0]
-		if self.server.fileno() in result:
-			return self.server.accept()
-		else:
-			return (None, None)
-	
-	def parse_request(self, client):
-		buf = ''
-		while len(buf) < 4:
-			tmp = client.recv(4 - len(buf))
-			if len(tmp) == 0:
-				return (None, None)
-			buf += tmp
-		header_size = struct.unpack('>I', buf)[0]
-		
-		buf = ''
-		while len(buf) < header_size:
-			tmp = client.recv(header_size - len(buf))
-			if len(tmp) == 0:
-				return (None, None)
-			buf += tmp
-		
-		headers = buf.split("\0")
-		headers.pop() # Remove trailing "\0"
-		env = {}
-		i = 0
-		while i < len(headers):
-			env[headers[i]] = headers[i + 1]
-			i += 2
-		
-		return (env, client)
-	
-	def process_request(self, env, input_stream, output_stream):
-		# The WSGI speculation says that the input paramter object passed needs to
-		# implement a few file-like methods. This is the reason why we "wrap" the socket._socket
-		# into the _fileobject to solve this.
-		#
-		# Otherwise, the POST data won't be correctly retrieved by Django.
-		#
-		# See: http://www.python.org/dev/peps/pep-0333/#input-and-error-streams
-		env['wsgi.input']		 = _fileobject(input_stream,'r',512)
-		env['wsgi.errors']		 = sys.stderr
-		env['wsgi.version']		 = (1, 0)
-		env['wsgi.multithread']	 = False
-		env['wsgi.multiprocess'] = True
-		env['wsgi.run_once']	 = True
-		if env.get('HTTPS','off') in ('on', '1'):
-			env['wsgi.url_scheme'] = 'https'
-		else:
-			env['wsgi.url_scheme'] = 'http'
-			
-
-		# The following environment variables are required by WSCI PEP #333 
-		# see: http://www.python.org/dev/peps/pep-0333/#environ-variables
-		if 'HTTP_CONTENT_LENGTH' in env:
-			env['CONTENT_LENGTH'] = env.get('HTTP_CONTENT_LENGTH')
-			
-		
-		headers_set = []
-		headers_sent = []
-		
-		def write(data):
-			if not headers_set:
-				raise AssertionError("write() before start_response()")
-			elif not headers_sent:
-				# Before the first output, send the stored headers.
-				status, response_headers = headers_sent[:] = headers_set
-				output_stream.send('Status: %s\r\n' % status)
-				for header in response_headers:
-					output_stream.send('%s: %s\r\n' % header)
-				output_stream.send('\r\n')
-			output_stream.send(data)
-		
-		def start_response(status, response_headers, exc_info = None):
-			if exc_info:
-				try:
-					if headers_sent:
-						# Re-raise original exception if headers sent.
-						raise exc_info[0], exc_info[1], exc_info[2]
-				finally:
-					# Avoid dangling circular ref.
-					exc_info = None
-			elif headers_set:
-				raise AssertionError("Headers already set!")
-			
-			headers_set[:] = [status, response_headers]
-			return write
-		
-		result = self.app(env, start_response)
-		try:
-			for data in result:
-				# Don't send headers until body appears.
-				if data:
-					write(data)
-			if not headers_sent:
-				# Send headers now if body was empty.
-				write('')
-		finally:
-			if hasattr(result, 'close'):
-				result.close()
-	
-	def process_ping(self, env, input_stream, output_stream):
-		output_stream.send("pong")
-
-def import_error_handler(environ, start_response):
-	write = start_response('500 Import Error', [('Content-type', 'text/plain')])
-	write("An error occurred importing your passenger_wsgi.py")
-	raise KeyboardInterrupt # oh WEIRD.
-
-if __name__ == "__main__":
-	socket_file = sys.argv[1]
-	server = socket.fromfd(int(sys.argv[2]), socket.AF_UNIX, socket.SOCK_STREAM)
-	owner_pipe = int(sys.argv[3])
-	
-	try:
-		app_module = imp.load_source('passenger_wsgi', 'passenger_wsgi.py')
-		handler = RequestHandler(socket_file, server, owner_pipe, app_module.application)
-	except:
-		handler = RequestHandler(socket_file, server, owner_pipe, import_error_handler)
-
-	try:
-		handler.main_loop()
-	finally:
-		handler.cleanup()
diff --git a/man/passenger-make-enterprisey.8 b/man/passenger-make-enterprisey.8
deleted file mode 100644
index ca7e305..0000000
--- a/man/passenger-make-enterprisey.8
+++ /dev/null
@@ -1,23 +0,0 @@
-.TH "passenger-make-enterprisey" "8" "2.0" "Phusion Passenger" "Adminstration Commands"
-.SH "NAME"
-.LP 
-passenger\-make-enterprisey \- activate your Phusion passenger enterprise licence
-.SH "SYNOPSIS"
-.LP 
-\fBpassenger\-make\-enterprisey
-.SH "DESCRIPTION"
-.LP 
-\fBpassenger\-make\-enterprisey\fR changes your ordinary everyday version of Phusion Passenger into a special enterprise version just as soon as you type in your licence key.
-.LP
-As everybody working at enterprise level knows, enterprise software is so much better in every possible way. So make sure you pick up your licence key today.
-.SH "SEE ALSO"
-Phusion Passenger Enterprise Programme (http://www.modrails.com/enterprise.html)
-.SH "AUTHOR"
-.LP 
-Phusion Passenger is written by Phusion (http://www.phusion.nl)
-.LP 
-"Phusion" and "Phusion Passenger" are trademarks of Hongli Lai & Ninh Bui.
-.LP 
-This manual page was written by Neil Wilson <neil at brightbox.co.uk> for the Ubuntu project (but may be used by others). 
-.SH "CAVEATS"
-Whatever you do don't look at the source code.
diff --git a/passenger.gemspec b/passenger.gemspec
new file mode 100644
index 0000000..8d69df5
--- /dev/null
+++ b/passenger.gemspec
@@ -0,0 +1,26 @@
+source_root = File.expand_path(File.dirname(__FILE__))
+$LOAD_PATH.unshift("#{source_root}/lib")
+require 'phusion_passenger'
+PhusionPassenger.locate_directories
+require 'phusion_passenger/packaging'
+
+Gem::Specification.new do |s|
+	s.platform = Gem::Platform::RUBY
+	s.homepage = "https://www.phusionpassenger.com/"
+	s.summary = "A fast and robust web server and application server for Ruby, Python and Node.js"
+	s.name = PhusionPassenger::PACKAGE_NAME
+	s.version = PhusionPassenger::VERSION_STRING
+	s.rubyforge_project = "passenger"
+	s.author = "Phusion - http://www.phusion.nl/"
+	s.email = "software-signing at phusion.nl"
+	s.require_paths = ["lib"]
+	s.add_dependency 'rake', '>= 0.8.1'
+	s.add_dependency 'daemon_controller', '>= 1.1.0'
+	s.add_dependency 'rack'
+	s.files = Dir[*PhusionPassenger::Packaging::GLOB] -
+		Dir[*PhusionPassenger::Packaging::EXCLUDE_GLOB]
+	s.executables = PhusionPassenger::Packaging::USER_EXECUTABLES +
+		PhusionPassenger::Packaging::SUPER_USER_EXECUTABLES
+	s.description = "A modern web server and application server for Ruby, Python and Node.js, " +
+		"optimized for performance, low memory usage and ease of use."
+end
diff --git a/resources/mime.types b/resources/mime.types
index 0c782db..12d05d6 100644
--- a/resources/mime.types
+++ b/resources/mime.types
@@ -24,6 +24,11 @@ types {
     image/x-ms-bmp                        bmp;
     image/svg+xml                         svg;
 
+    application/x-font-ttf                ttf;
+    font/opentype                         otf;
+    font/x-woff                           woff;
+    application/vnd.ms-fontobject         eot;
+
     application/java-archive              jar war ear;
     application/mac-binhex40              hqx;
     application/msword                    doc;
@@ -55,7 +60,6 @@ types {
     application/octet-stream              bin exe dll;
     application/octet-stream              deb;
     application/octet-stream              dmg;
-    application/octet-stream              eot;
     application/octet-stream              iso img;
     application/octet-stream              msi msp msm;
     application/octet-stream              gem;
diff --git a/lib/phusion_passenger/templates/standalone_default_root/index.html b/resources/standalone_default_root/index.html
similarity index 100%
rename from lib/phusion_passenger/templates/standalone_default_root/index.html
rename to resources/standalone_default_root/index.html
diff --git a/lib/phusion_passenger/templates/apache2/apache_must_be_compiled_with_compatible_mpm.txt.erb b/resources/templates/apache2/apache_must_be_compiled_with_compatible_mpm.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/apache2/apache_must_be_compiled_with_compatible_mpm.txt.erb
rename to resources/templates/apache2/apache_must_be_compiled_with_compatible_mpm.txt.erb
diff --git a/resources/templates/apache2/config_snippets.txt.erb b/resources/templates/apache2/config_snippets.txt.erb
new file mode 100644
index 0000000..d8d5026
--- /dev/null
+++ b/resources/templates/apache2/config_snippets.txt.erb
@@ -0,0 +1,13 @@
+<banner>The Apache 2 module was successfully installed.</banner>
+
+Please edit your Apache configuration file, and add these lines:
+
+   <b>LoadModule passenger_module <%= @module_location %></b>
+   <b>PassengerRoot <%= @passenger_root %></b>
+   <b>PassengerDefaultRuby <%= @ruby %></b>
+
+After you restart Apache, you are ready to deploy any number of Ruby on Rails
+applications on Apache, without any further Ruby on Rails-specific
+configuration!
+
+<b>Press ENTER to continue.</b>
diff --git a/lib/phusion_passenger/templates/apache2/deployment_example.txt.erb b/resources/templates/apache2/deployment_example.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/apache2/deployment_example.txt.erb
rename to resources/templates/apache2/deployment_example.txt.erb
diff --git a/lib/phusion_passenger/templates/apache2/no_write_permission_to_passenger_root.txt.erb b/resources/templates/apache2/no_write_permission_to_passenger_root.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/apache2/no_write_permission_to_passenger_root.txt.erb
rename to resources/templates/apache2/no_write_permission_to_passenger_root.txt.erb
diff --git a/lib/phusion_passenger/templates/apache2/possible_solutions_for_compilation_and_installation_problems.txt.erb b/resources/templates/apache2/possible_solutions_for_compilation_and_installation_problems.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/apache2/possible_solutions_for_compilation_and_installation_problems.txt.erb
rename to resources/templates/apache2/possible_solutions_for_compilation_and_installation_problems.txt.erb
diff --git a/lib/phusion_passenger/templates/apache2/run_installer_as_root.txt.erb b/resources/templates/apache2/run_installer_as_root.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/apache2/run_installer_as_root.txt.erb
rename to resources/templates/apache2/run_installer_as_root.txt.erb
diff --git a/lib/phusion_passenger/templates/apache2/welcome.txt.erb b/resources/templates/apache2/welcome.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/apache2/welcome.txt.erb
rename to resources/templates/apache2/welcome.txt.erb
diff --git a/resources/templates/error_layout.css b/resources/templates/error_layout.css
new file mode 100644
index 0000000..38184bf
--- /dev/null
+++ b/resources/templates/error_layout.css
@@ -0,0 +1,103 @@
+body {
+	font-family: Verdana, 'Bitstream Vera Sans', Arial, Sans-Serif;
+	font-size: 10pt;
+	background: white;
+	color: #222222;
+	margin: 0;
+	padding-top: 3em;
+	padding-bottom: 3em;
+	padding-left: 4.5em;
+	padding-right: 4.5em;
+}
+
+h1 {
+	font-size: 17pt;
+	font-weight: medium;
+	color: #533e72;
+	border-bottom: 1px solid #533e72;
+}
+
+h1.title {
+	margin-top: 0;
+}
+
+h1.error_title {
+	color: red;
+	border-bottom: 1px solid red;
+}
+
+a {
+	text-decoration: none;
+}
+
+a:hover {
+	text-decoration: underline;
+}
+
+dt {
+	font-weight: bold;
+	color: #280050;
+}
+
+dd {
+	margin-top: 0.5em;
+	margin-bottom: 1em;
+}
+
+.commands {
+	border: 1px solid #b594e7;
+	background: #ddc6ff;
+	padding: 0.5em;
+	margin: 0.5em;
+	font-family: 'Bitstream Vera Sans Mono', 'Courier New', Monospace;
+}
+
+pre {
+	overflow: auto;
+	white-space: pre-wrap;
+	text-align: left;
+}
+
+table.backtrace th {
+	background: #8470a6;
+	color: white;
+}
+
+table.backtrace th,
+table.backtrace td {
+	padding: 0.2em;
+	padding-left: 0.4em;
+	padding-right: 0.4em;
+}
+
+table.backtrace tr td {
+	background: #ecdfff;
+}
+
+table.backtrace tr.even td {
+	background: #f7f2ff;
+}
+
+table.backtrace td.index {
+	font-weight: bold;
+}
+
+#site_footer {
+	border-top: solid 1px black;
+	margin-top: 1em;
+	padding-top: 1em;
+	font-size: small;
+	color: #777777;
+}
+
+#site_footer a {
+	color: #65498e;
+}
+
+#site_footer a:hover {
+	color: #9681d9;
+}
+
+#site_header .corporate_identity {
+	display: none;
+}
diff --git a/resources/templates/error_layout.html.template b/resources/templates/error_layout.html.template
new file mode 100644
index 0000000..c89703e
--- /dev/null
+++ b/resources/templates/error_layout.html.template
@@ -0,0 +1,93 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<meta name="generator" content="Phusion Passenger">
+	<title>{{TITLE}}</title>
+	<style type="text/css">
+		{{CSS|raw}}
+	</style>
+	<link rel="stylesheet" type="text/css" href="http://www.modrails.com/error_pages/1.0/error_page.css">
+	<style type="text/css">
+		dd {
+			text-align: left;
+		}
+
+		dd pre {
+			margin-top: 0;
+			margin-bottom: 0;
+		}
+	</style>
+</head>
+
+<body>
+
+	<div id="site_container">
+		<div id="site_header">
+			<ul class="corporate_identity">
+				<li class="logo"><a href="https://www.phusionpassenger.com"><span>Phusion Passenger</span></a></li>
+			</ul>
+		</div>
+		<div id="site_body">
+			<h1 class="error_title">{{TITLE}}</h1>
+			<div id="content">
+				{{CONTENT|raw}}
+
+				<dl>
+				<dt>Application root</dt>
+				<dd>{{APP_ROOT}}</dd>
+				<dt>Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV and PASSENGER_ENV)</dt>
+				<dd>{{ENVIRONMENT}}</dd>
+				{{if IS_RUBY_APP}}
+					<dt>Ruby interpreter command</dt>
+					<dd><pre>{{RUBY}}</pre></dd>
+				{{/if}}
+				<dt>User and groups</dt>
+				<dd><pre>{{USER_INFO|default=Unknown}}</pre></dd>
+				<dt>Environment variables</dt>
+				<dd><pre>{{ENVVARS|default=Unknown}}</pre></dd>
+				<dt>Ulimits</dt>
+				<dd><pre>{{ULIMIT|default=Unknown}}</pre></dd>
+				{{if SYSMEMORY}}
+					<dt>System memory usage</dt>
+					<dd><pre>{{SYSMEMORY|default=Unknown}}</pre></dd>
+				{{/if}}
+				{{if RUBY_INFO}}
+					<dt>General Ruby interpreter information</dt>
+					<dd><pre>{{RUBY_INFO}}</pre></dd>
+				{{/if}}
+				{{if RBCONFIG}}
+					<dt>Ruby configuration (RbConfig::CONFIG)</dt>
+					<dd><pre>{{RBCONFIG}}</pre></dd>
+				{{/if}}
+				{{if ACTIVATED_GEMS}}
+					<dt>Activated Ruby gems</dt>
+					<dd><pre>{{ACTIVATED_GEMS}}</pre></dd>
+				{{/if}}
+				{{if LOAD_PATH}}
+					<dt>Ruby load path ($LOAD_PATH)</dt>
+					<dd><pre>{{LOAD_PATH}}</pre></dd>
+				{{/if}}
+				{{if LOADED_LIBS}}
+					<dt>Ruby loaded libraries ($LOADED_FEATURES)</dt>
+					<dd><pre>{{LOADED_LIBS}}</pre></dd>
+				{{/if}}
+				</dl>
+			</div>
+		</div>
+		<div id="site_footer">
+			<!--
+			   You are free to modify the footer as you see fit,
+			   but we kindly ask of you to preserve to following
+			   text. Thank you.
+			-->
+			<div class="container">
+				Powered by <a href="https://www.phusionpassenger.com/">Phusion Passenger</a>,
+				<tt>mod_rails</tt> / <tt>mod_rack</tt> for Apache and Nginx.
+			</div>
+		</div>
+	</div>
+
+</body>
+</html>
+
diff --git a/resources/templates/general_error.html.template b/resources/templates/general_error.html.template
new file mode 100644
index 0000000..27d8288
--- /dev/null
+++ b/resources/templates/general_error.html.template
@@ -0,0 +1 @@
+<pre>{{MESSAGE}}</pre>
\ No newline at end of file
diff --git a/resources/templates/general_error_with_html.html.template b/resources/templates/general_error_with_html.html.template
new file mode 100644
index 0000000..b470425
--- /dev/null
+++ b/resources/templates/general_error_with_html.html.template
@@ -0,0 +1 @@
+{{MESSAGE}}
\ No newline at end of file
diff --git a/resources/templates/installer_common/freebsd9_broken_cxx_runtime.txt.erb b/resources/templates/installer_common/freebsd9_broken_cxx_runtime.txt.erb
new file mode 100644
index 0000000..8bf85cb
--- /dev/null
+++ b/resources/templates/installer_common/freebsd9_broken_cxx_runtime.txt.erb
@@ -0,0 +1,19 @@
+<red>WARNING:</red> <yellow>You may need to upgrade FreeBSD</yellow>
+
+There is a bug in the C++ runtime in FreeBSD 9.1-RELEASE. This bug breaks
+Phusion Passenger. At the time this message was written, the bug had already
+been fixed in the stable/9 Subversion branch of FreeBSD. The fix will be
+included in FreeBSD 9.2. If FreeBSD 9.2 is already out, please upgrade to
+FreeBSD 9.2. Otherwise, please upgrade to the stable/9 branch according to the
+upgrade instructions in the FreeBSD Handbook:
+
+   http://www.freebsd.org/doc/handbook/current-stable.html#stable
+
+More information about the bug:
+
+   http://lists.freebsd.org/pipermail/freebsd-toolchain/2013-January/000692.html
+
+If you have already upgraded, please ignore this message and continue.
+
+<b>Press Ctrl-C to abort this installer (recommended).</b>
+<b>Press Enter if you want to continue with installation anyway.</b>
\ No newline at end of file
diff --git a/resources/templates/installer_common/low_amount_of_memory_warning.txt.erb b/resources/templates/installer_common/low_amount_of_memory_warning.txt.erb
new file mode 100644
index 0000000..55909c8
--- /dev/null
+++ b/resources/templates/installer_common/low_amount_of_memory_warning.txt.erb
@@ -0,0 +1,22 @@
+<banner>Your system does not have a lot of virtual memory</banner>
+
+Compiling Phusion Passenger works best when you have at least <%= @required %> MB of virtual
+memory. However your system only has <%= @current %> MB of total virtual memory (<%= @ram %> MB
+RAM, <%= @swap %> MB swap). It is recommended that you temporarily add more swap space
+before proceeding. You can do it as follows:
+
+  <b>sudo dd if=/dev/zero of=/swap bs=1M count=1024
+  sudo mkswap /swap
+  sudo swapon /swap</b>
+
+See also <b>https://wiki.archlinux.org/index.php/Swap</b> for more information about
+the swap file on Linux.
+
+If you cannot activate a swap file (e.g. because you're on OpenVZ, or if you
+don't have root privileges) then you should install Phusion Passenger through
+DEB/RPM packages. Please refer to the manual for more information:
+<b><%= @doc %></b>, section
+"Installation".
+
+<b>Press Ctrl-C to abort this installer (recommended).</b>
+<b>Press Enter if you want to continue with installation anyway.</b>
diff --git a/lib/phusion_passenger/templates/nginx/ask_for_extra_configure_flags.txt.erb b/resources/templates/nginx/ask_for_extra_configure_flags.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/nginx/ask_for_extra_configure_flags.txt.erb
rename to resources/templates/nginx/ask_for_extra_configure_flags.txt.erb
diff --git a/lib/phusion_passenger/templates/nginx/cannot_write_to_dir.txt.erb b/resources/templates/nginx/cannot_write_to_dir.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/nginx/cannot_write_to_dir.txt.erb
rename to resources/templates/nginx/cannot_write_to_dir.txt.erb
diff --git a/lib/phusion_passenger/templates/nginx/config_snippets.txt.erb b/resources/templates/nginx/config_snippets.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/nginx/config_snippets.txt.erb
rename to resources/templates/nginx/config_snippets.txt.erb
diff --git a/lib/phusion_passenger/templates/nginx/config_snippets_inserted.txt.erb b/resources/templates/nginx/config_snippets_inserted.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/nginx/config_snippets_inserted.txt.erb
rename to resources/templates/nginx/config_snippets_inserted.txt.erb
diff --git a/lib/phusion_passenger/templates/nginx/confirm_extra_configure_flags.txt.erb b/resources/templates/nginx/confirm_extra_configure_flags.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/nginx/confirm_extra_configure_flags.txt.erb
rename to resources/templates/nginx/confirm_extra_configure_flags.txt.erb
diff --git a/lib/phusion_passenger/templates/nginx/deployment_example.txt.erb b/resources/templates/nginx/deployment_example.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/nginx/deployment_example.txt.erb
rename to resources/templates/nginx/deployment_example.txt.erb
diff --git a/resources/templates/nginx/pcre_checksum_could_not_be_verified.txt.erb b/resources/templates/nginx/pcre_checksum_could_not_be_verified.txt.erb
new file mode 100644
index 0000000..4e9d586
--- /dev/null
+++ b/resources/templates/nginx/pcre_checksum_could_not_be_verified.txt.erb
@@ -0,0 +1,11 @@
+<red><b>The PCRE checksum could not be verified</b></red>
+
+Nginx requires PCRE for its rewrite module, so this installer will attempt to
+install Nginx without the rewrite module.
+
+If you want to make use of Nginx's rewrite module, please install PCRE manually
+by downloading it from:
+
+  http://www.pcre.org/
+
+Press ENTER to continue, or Ctrl-C to abort.
diff --git a/lib/phusion_passenger/templates/nginx/pcre_could_not_be_downloaded.txt.erb b/resources/templates/nginx/pcre_could_not_be_downloaded.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/nginx/pcre_could_not_be_downloaded.txt.erb
rename to resources/templates/nginx/pcre_could_not_be_downloaded.txt.erb
diff --git a/lib/phusion_passenger/templates/nginx/pcre_could_not_be_extracted.txt.erb b/resources/templates/nginx/pcre_could_not_be_extracted.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/nginx/pcre_could_not_be_extracted.txt.erb
rename to resources/templates/nginx/pcre_could_not_be_extracted.txt.erb
diff --git a/lib/phusion_passenger/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb b/resources/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb
rename to resources/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb
diff --git a/lib/phusion_passenger/templates/nginx/possible_solutions_for_download_and_extraction_problems.txt.erb b/resources/templates/nginx/possible_solutions_for_download_and_extraction_problems.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/nginx/possible_solutions_for_download_and_extraction_problems.txt.erb
rename to resources/templates/nginx/possible_solutions_for_download_and_extraction_problems.txt.erb
diff --git a/lib/phusion_passenger/templates/nginx/query_download_and_install.txt.erb b/resources/templates/nginx/query_download_and_install.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/nginx/query_download_and_install.txt.erb
rename to resources/templates/nginx/query_download_and_install.txt.erb
diff --git a/lib/phusion_passenger/templates/nginx/run_installer_as_root.txt.erb b/resources/templates/nginx/run_installer_as_root.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/nginx/run_installer_as_root.txt.erb
rename to resources/templates/nginx/run_installer_as_root.txt.erb
diff --git a/lib/phusion_passenger/templates/nginx/welcome.txt.erb b/resources/templates/nginx/welcome.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/nginx/welcome.txt.erb
rename to resources/templates/nginx/welcome.txt.erb
diff --git a/lib/phusion_passenger/templates/standalone/cannot_write_to_dir.txt.erb b/resources/templates/standalone/cannot_write_to_dir.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/standalone/cannot_write_to_dir.txt.erb
rename to resources/templates/standalone/cannot_write_to_dir.txt.erb
diff --git a/resources/templates/standalone/config.erb b/resources/templates/standalone/config.erb
new file mode 100644
index 0000000..a909e23
--- /dev/null
+++ b/resources/templates/standalone/config.erb
@@ -0,0 +1,120 @@
+#####################################################
+#  This file is autogenerated by Phusion Passenger Standalone
+#  from <%= template_filename %>
+#  Please edit that file instead.
+#####################################################
+
+
+master_process on;
+worker_processes 1;
+daemon on;
+error_log '<%= @options[:log_file] %>' <% if debugging? %>info<% end %>;
+pid '<%= @options[:pid_file] %>';
+<% if Process.euid == 0 %>
+    <% if @options[:user] %>
+        user <%= @options[:user] %> <%= default_group_for(@options[:user]) %>;
+    <% else %>
+        user <%= current_user %> <%= default_group_for(current_user) %>;
+    <% end %>
+<% end %>
+
+events {
+    worker_connections 1024;
+}
+
+http {
+    log_format debug '[$time_local] $msec  "$request" $status conn=$connection sent=$bytes_sent body_sent=$body_bytes_sent';
+    include '<%= PhusionPassenger.resources_dir %>/mime.types';
+    passenger_ruby <%= PlatformInfo.ruby_command %>;
+    passenger_root '<%= location_config_filename %>';
+    passenger_abort_on_startup_error on;
+    passenger_user_switching off;
+    passenger_max_pool_size <%= @options[:max_pool_size] %>;
+    passenger_min_instances <%= @options[:min_instances] %>;
+    <% if @options[:user] %>
+        passenger_user <%= @options[:user] %>;
+        passenger_default_user <%= @options[:user] %>;
+    <% else %>
+        passenger_user <%= current_user %>;
+        passenger_default_user <%= current_user %>;
+    <% end %>
+    <% if debugging? %>passenger_log_level 2;<% end %>
+    <% if @options[:rolling_restarts] %>passenger_rolling_restarts on;<% end %>
+    <% if @options[:resist_deployment_errors] %>passenger_resist_deployment_errors on;<% end %>
+
+    <% unless @options[:friendly_error_pages] %>passenger_friendly_error_pages off;<% end %>
+
+    <% if @options[:union_station_gateway_address] %>
+        union_station_gateway_address <%= @options[:union_station_gateway_address] %>;
+        union_station_gateway_port <%= @options[:union_station_gateway_port] %>;
+        union_station_gateway_cert -;
+    <% end %>
+    
+    default_type application/octet-stream;
+    types_hash_max_size 2048;
+    client_max_body_size 1024m;
+    access_log off;
+    keepalive_timeout 60;
+    underscores_in_headers on;
+    gzip on;
+    gzip_comp_level 3;
+    gzip_min_length 150;
+    gzip_proxied any;
+    gzip_types text/plain text/css application/javascript application/x-javascript;
+    
+    <% if @apps.size > 1 %>
+    # Default server entry.
+    server {
+        listen <%= nginx_listen_address %>;
+        root '<%= PhusionPassenger.resources_dir %>/standalone_default_root';
+    }
+    <% end %>
+
+    <% if @options[:ping_port] %>
+    server {
+        listen <%= nginx_listen_address(@options, true) %>;
+        root '<%= PhusionPassenger.resources_dir %>/standalone_default_root';
+    }
+    <% end %>
+    
+    <% for app in @apps %>
+    server {
+        listen <%= nginx_listen_address(app) %>;
+        server_name <%= app[:server_names].join(' ') %>;
+        root '<%= app[:root] %>/public';
+        passenger_app_root '<%= app[:root] %>';
+        passenger_enabled on;
+        rails_env <%= app[:env] %>;
+        passenger_spawn_method <%= app[:spawn_method] %>;
+        <% if app[:min_instances] %>passenger_min_instances <%= app[:min_instances] %>;<% end %>
+        <% if app[:union_station_key] %>
+            union_station_support on;
+            union_station_key <%= app[:union_station_key] %>;
+        <% end %>
+
+        # Rails asset pipeline support.
+        location ~ ^/assets/ {
+            error_page 490 = @static_asset;
+            error_page 491 = @dynamic_request;
+            recursive_error_pages on;
+
+            if (-f $request_filename) {
+                return 490;
+            }
+            if (!-f $request_filename) {
+                return 491;
+            }
+        }
+        location @static_asset {
+            gzip_static on;
+            expires max;
+            add_header Cache-Control public;
+            add_header ETag "";
+        }
+        location @dynamic_request {
+            passenger_enabled on;
+        }
+    }
+    passenger_pre_start http://<%= nginx_listen_address(app) %>;
+    <% end %>
+}
diff --git a/lib/phusion_passenger/templates/standalone/possible_solutions_for_download_and_extraction_problems.txt.erb b/resources/templates/standalone/possible_solutions_for_download_and_extraction_problems.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/standalone/possible_solutions_for_download_and_extraction_problems.txt.erb
rename to resources/templates/standalone/possible_solutions_for_download_and_extraction_problems.txt.erb
diff --git a/lib/phusion_passenger/templates/standalone/run_installer_as_root.txt.erb b/resources/templates/standalone/run_installer_as_root.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/standalone/run_installer_as_root.txt.erb
rename to resources/templates/standalone/run_installer_as_root.txt.erb
diff --git a/lib/phusion_passenger/templates/standalone/welcome.txt.erb b/resources/templates/standalone/welcome.txt.erb
similarity index 100%
rename from lib/phusion_passenger/templates/standalone/welcome.txt.erb
rename to resources/templates/standalone/welcome.txt.erb
diff --git a/resources/templates/undisclosed_error.html.template b/resources/templates/undisclosed_error.html.template
new file mode 100644
index 0000000..07baa46
--- /dev/null
+++ b/resources/templates/undisclosed_error.html.template
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>We're sorry, but something went wrong (500)</title>
+  <style type="text/css">
+    body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+    div.dialog {
+      width: 25em;
+      padding: 0 4em;
+      margin: 4em auto 0 auto;
+      border: 1px solid #ccc;
+      border-right-color: #999;
+      border-bottom-color: #999;
+    }
+    h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+  </style>
+</head>
+
+<body>
+  <div class="dialog">
+    <h1>We're sorry, but something went wrong.</h1>
+    <p>We've been notified about this issue and we'll take a look at it shortly.</p>
+  </div>
+</body>
+</html>
diff --git a/test/.rspec b/test/.rspec
new file mode 100644
index 0000000..213654d
--- /dev/null
+++ b/test/.rspec
@@ -0,0 +1,3 @@
+--colour
+--format d
+--pattern 'dont_auto_load_anything'
diff --git a/test/config.json.example b/test/config.json.example
new file mode 100644
index 0000000..1800698
--- /dev/null
+++ b/test/config.json.example
@@ -0,0 +1,42 @@
+{
+  //// This file contains system-specific configuration options that the test suite needs.
+  //// Please customize it for your system.
+
+  // These are the usernames and group names of normal, non-administrator
+  // users and groups. Preferably, these are user and group accounts that
+  // are normally not used.
+  //
+  // These users and groups MUST be able to access this 'test' directory,
+  // otherwise the tests will fail.
+
+  //// Good values for OS X:
+  "normal_user_1": "_www",
+  "normal_user_2": "daemon",
+  // Must not be "nobody".
+  "default_user": "_sandbox",
+  // Must not be normal_user_1's primary group.
+  "normal_group_1": "daemon",
+  // Must not be normal_user_2's primary group.
+  "normal_group_2": "_sandbox",
+  // Must not be default_user's primary group. Must not be "nobody".
+  "default_group": "_www",
+
+  ///// Good values for Linux and FreeBSD. Same restrictions apply.
+  //"normal_user_1": "games",
+  //"normal_user_2": "daemon",
+  //"default_user": "man",
+  //"normal_group_1": "daemon",
+  //"normal_group_2": "man",
+  //"default_group": "games",
+
+  // A nonexistant username, group name, user ID and group ID.
+  "nonexistant_user": "xxxxxxxxxxxxxxxxxxx",
+  "nonexistant_group": "xxxxxxxxxxxxxxxxxxx",
+  "nonexistant_uid": 9999,
+  "nonexistant_gid": 9999,
+
+  // If you want to run the Nginx integration tests, then set the following
+  // config option to the full path of the Nginx binary. This Nginx binary *must*
+  // be compiled with Phusion Passenger support!
+  "nginx": "/usr/local/sbin/nginx"
+}
diff --git a/test/config.json.travis b/test/config.json.travis
new file mode 100644
index 0000000..337c0a3
--- /dev/null
+++ b/test/config.json.travis
@@ -0,0 +1,15 @@
+{
+  "normal_user_1": "games",
+  "normal_user_2": "daemon",
+  "default_user": "man",
+  "normal_group_1": "daemon",
+  "normal_group_2": "man",
+  "default_group": "games",
+
+  "nonexistant_user": "xxxxxxxxxxxxxxxxxxx",
+  "nonexistant_group": "xxxxxxxxxxxxxxxxxxx",
+  "nonexistant_uid": 9999,
+  "nonexistant_gid": 9999,
+
+  "nginx": "/tmp/nginx/sbin/nginx"
+}
diff --git a/test/config.yml.example b/test/config.yml.example
deleted file mode 100644
index 295331e..0000000
--- a/test/config.yml.example
+++ /dev/null
@@ -1,41 +0,0 @@
-### This file contains system-specific configuration options that the test suite needs.
-### Please customize it for your system.
-
-# These are the usernames and group names of normal, non-administrator
-# users and groups. Preferably, these are user and group accounts that
-# are normally not used.
-#
-# These users and groups MUST be able to access this 'test' directory,
-# otherwise the tests will fail.
-
-### Good values for Linux and FreeBSD:
-normal_user_1: games
-normal_user_2: daemon
-# Must not be "nobody".
-default_user: man
-# Must not be normal_user_1's primary group.
-normal_group_1: daemon
-# Must not be normal_user_2's primary group.
-normal_group_2: man
-# Must not be default_user's primary group. Must not be "nobody".
-default_group: games
-
-### Good values for OS X. Same restrictions apply.
-# normal_user_1: _www
-# normal_user_2: daemon
-# default_user: _sandbox
-# normal_group_1: daemon
-# normal_group_2: _sandbox
-# default_group: _www
-
-# A nonexistant username, group name, user ID and group ID.
-nonexistant_user: xxxxxxxxxxxxxxxxxxx
-nonexistant_group: xxxxxxxxxxxxxxxxxxx
-nonexistant_uid: 9999
-nonexistant_gid: 9999
-
-
-# If you want to run the Nginx integration tests, then set the following
-# config option to the full path of the Nginx binary. This Nginx binary *must*
-# be compiled with Phusion Passenger support!
-# nginx: /usr/local/sbin/nginx
diff --git a/test/cxx/ApplicationPool2/DirectSpawnerTest.cpp b/test/cxx/ApplicationPool2/DirectSpawnerTest.cpp
new file mode 100644
index 0000000..73cdfa4
--- /dev/null
+++ b/test/cxx/ApplicationPool2/DirectSpawnerTest.cpp
@@ -0,0 +1,121 @@
+#include <TestSupport.h>
+#include <ApplicationPool2/DirectSpawner.h>
+#include <Utils/json.h>
+#include <fcntl.h>
+
+using namespace Passenger;
+using namespace Passenger::ApplicationPool2;
+
+namespace tut {
+	struct ApplicationPool2_DirectSpawnerTest {
+		ServerInstanceDirPtr serverInstanceDir;
+		ServerInstanceDir::GenerationPtr generation;
+		BackgroundEventLoop bg;
+		ProcessPtr process;
+		PipeWatcher::DataCallback gatherOutput;
+		string gatheredOutput;
+		boost::mutex gatheredOutputSyncher;
+		
+		ApplicationPool2_DirectSpawnerTest() {
+			createServerInstanceDirAndGeneration(serverInstanceDir, generation);
+			bg.start();
+			PipeWatcher::onData = PipeWatcher::DataCallback();
+			gatherOutput = boost::bind(&ApplicationPool2_DirectSpawnerTest::_gatherOutput, this, _1, _2);
+			setLogLevel(LVL_ERROR); // TODO: change to LVL_WARN
+		}
+
+		~ApplicationPool2_DirectSpawnerTest() {
+			setLogLevel(DEFAULT_LOG_LEVEL);
+			unlink("stub/wsgi/passenger_wsgi.pyc");
+			PipeWatcher::onData = PipeWatcher::DataCallback();
+		}
+		
+		shared_ptr<DirectSpawner> createSpawner(const Options &options) {
+			return make_shared<DirectSpawner>(bg.safe,
+				*resourceLocator, generation);
+		}
+		
+		Options createOptions() {
+			Options options;
+			options.spawnMethod = "direct";
+			options.loadShellEnvvars = false;
+			return options;
+		}
+
+		void _gatherOutput(const char *data, unsigned int size) {
+			boost::lock_guard<boost::mutex> l(gatheredOutputSyncher);
+			gatheredOutput.append(data, size);
+		}
+	};
+
+	DEFINE_TEST_GROUP_WITH_LIMIT(ApplicationPool2_DirectSpawnerTest, 90);
+	
+	#include "SpawnerTestCases.cpp"
+	
+	TEST_METHOD(80) {
+		// If the application didn't start within the timeout
+		// then whatever was written to stderr is used as the
+		// SpawnException error page.
+		Options options = createOptions();
+		options.appRoot      = "stub";
+		options.startCommand = "perl\t" "-e\t" "print STDERR \"hello world\\n\"; sleep(60)";
+		options.startupFile  = ".";
+		options.startTimeout = 300;
+		
+		DirectSpawner spawner(bg.safe, *resourceLocator, generation);
+		spawner.getConfig()->forwardStderr = false;
+		
+		try {
+			process = spawner.spawn(options);
+			process->requiresShutdown = false;
+			fail("Timeout expected");
+		} catch (const SpawnException &e) {
+			ensure_equals(e.getErrorKind(),
+				SpawnException::APP_STARTUP_TIMEOUT);
+			ensure(e.getErrorPage().find("hello world\n") != string::npos);
+		}
+	}
+	
+	TEST_METHOD(81) {
+		// If the application crashed during startup without returning
+		// a proper error response, then its stderr output is used
+		// as error response instead.
+		Options options = createOptions();
+		options.appRoot      = "stub";
+		options.startCommand = "perl\t" "-e\t" "print STDERR \"hello world\\n\"";
+		options.startupFile  = ".";
+		
+		DirectSpawner spawner(bg.safe, *resourceLocator, generation);
+		spawner.getConfig()->forwardStderr = false;
+		
+		try {
+			process = spawner.spawn(options);
+			process->requiresShutdown = false;
+			fail("SpawnException expected");
+		} catch (const SpawnException &e) {
+			ensure_equals(e.getErrorKind(),
+				SpawnException::APP_STARTUP_PROTOCOL_ERROR);
+			ensure(e.getErrorPage().find("hello world\n") != string::npos);
+		}
+	}
+
+	TEST_METHOD(82) {
+		SHOW_EXCEPTION_BACKTRACE(
+		// Test that everything works correctly if the app re-execs() itself.
+		// https://code.google.com/p/phusion-passenger/issues/detail?id=842#c19
+		Options options = createOptions();
+		options.appRoot      = "stub/rack";
+		options.startCommand = "ruby\t" "start.rb\t" "--execself";
+		options.startupFile  = "start.rb";
+		SpawnerPtr spawner = createSpawner(options);
+		process = spawner->spawn(options);
+		process->requiresShutdown = false;
+		ensure_equals(process->sockets->size(), 1u);
+		
+		Connection conn = process->sockets->front().checkoutConnection();
+		ScopeGuard guard(boost::bind(checkin, process, &conn));
+		writeExact(conn.fd, "ping\n");
+		ensure_equals(readAll(conn.fd), "pong\n");
+		);
+	}
+}
diff --git a/test/cxx/ApplicationPool2/OptionsTest.cpp b/test/cxx/ApplicationPool2/OptionsTest.cpp
new file mode 100644
index 0000000..f76c2a4
--- /dev/null
+++ b/test/cxx/ApplicationPool2/OptionsTest.cpp
@@ -0,0 +1,44 @@
+#include <TestSupport.h>
+#include <ApplicationPool2/Process.h>
+
+using namespace Passenger;
+using namespace Passenger::ApplicationPool2;
+using namespace std;
+
+namespace tut {
+	struct ApplicationPool2_OptionsTest {
+		ApplicationPool2_OptionsTest() {
+		}
+	};
+	
+	DEFINE_TEST_GROUP(ApplicationPool2_OptionsTest);
+	
+	TEST_METHOD(1) {
+		// Test persist().
+		char appRoot[] = "appRoot";
+		char processTitle[] = "processTitle";
+		char fooKey[] = "PASSENGER_FOO";
+		char fooValue[] = "foo";
+		char barKey[] = "PASSENGER_BAR";
+		char barValue[] = "bar";
+		
+		Options options;
+		options.appRoot = appRoot;
+		options.processTitle = processTitle;
+		options.environmentVariables.push_back(make_pair(fooKey, fooValue));
+		options.environmentVariables.push_back(make_pair(barKey, barValue));
+		
+		Options options2 = options.copyAndPersist();
+		appRoot[0] = processTitle[0] = 'x';
+		fooKey[0]  = fooValue[0]     = 'x';
+		barKey[0]  = barValue[0]     = 'x';
+		
+		ensure_equals(options2.appRoot, "appRoot");
+		ensure_equals(options2.processTitle, "processTitle");
+		ensure_equals(options2.environmentVariables.size(), 2u);
+		ensure_equals(options2.environmentVariables[0].first, "PASSENGER_FOO");
+		ensure_equals(options2.environmentVariables[0].second, "foo");
+		ensure_equals(options2.environmentVariables[1].first, "PASSENGER_BAR");
+		ensure_equals(options2.environmentVariables[1].second, "bar");
+	}
+}
diff --git a/test/cxx/ApplicationPool2/PoolTest.cpp b/test/cxx/ApplicationPool2/PoolTest.cpp
new file mode 100644
index 0000000..1b0a38f
--- /dev/null
+++ b/test/cxx/ApplicationPool2/PoolTest.cpp
@@ -0,0 +1,1616 @@
+#include <TestSupport.h>
+#include <ApplicationPool2/Pool.h>
+#include <Utils/IOUtils.h>
+#include <Utils/StrIntUtils.h>
+#include <Utils/json.h>
+#include <MessageReadersWriters.h>
+#include <map>
+#include <vector>
+#include <cerrno>
+#include <signal.h>
+
+using namespace std;
+using namespace Passenger;
+using namespace Passenger::ApplicationPool2;
+
+namespace tut {
+	struct ApplicationPool2_PoolTest {
+		ServerInstanceDirPtr serverInstanceDir;
+		ServerInstanceDir::GenerationPtr generation;
+		BackgroundEventLoop bg;
+		SpawnerConfigPtr spawnerConfig;
+		SpawnerFactoryPtr spawnerFactory;
+		PoolPtr pool;
+		Pool::DebugSupportPtr debug;
+		Ticket ticket;
+		GetCallback callback;
+		SessionPtr currentSession;
+		ExceptionPtr currentException;
+		AtomicInt number;
+		boost::mutex syncher;
+		list<SessionPtr> sessions;
+		bool retainSessions;
+		
+		ApplicationPool2_PoolTest() {
+			createServerInstanceDirAndGeneration(serverInstanceDir, generation);
+			retainSessions = false;
+			spawnerConfig = make_shared<SpawnerConfig>();
+			spawnerFactory = make_shared<SpawnerFactory>(bg.safe, *resourceLocator,
+				generation, spawnerConfig);
+			pool = make_shared<Pool>(bg.safe.get(), spawnerFactory);
+			pool->initialize();
+			bg.start();
+			callback = boost::bind(&ApplicationPool2_PoolTest::_callback, this, _1, _2);
+			setLogLevel(LVL_ERROR); // TODO: change to LVL_WARN
+		}
+		
+		~ApplicationPool2_PoolTest() {
+			// Explicitly destroy these here because they can run
+			// additional code that depend on other fields in this
+			// class.
+			TRACE_POINT();
+			clearAllSessions();
+			UPDATE_TRACE_POINT();
+			pool->destroy();
+			UPDATE_TRACE_POINT();
+			pool.reset();
+			setLogLevel(DEFAULT_LOG_LEVEL);
+			SystemTime::releaseAll();
+		}
+
+		void initPoolDebugging() {
+			pool->initDebugging();
+			debug = pool->debugSupport;
+		}
+		
+		void clearAllSessions() {
+			SessionPtr myCurrentSession;
+			list<SessionPtr> mySessions;
+			{
+				LockGuard l(syncher);
+				myCurrentSession = currentSession;
+				mySessions = sessions;
+				currentSession.reset();
+				sessions.clear();
+			}
+			myCurrentSession.reset();
+			mySessions.clear();
+		}
+
+		Options createOptions() {
+			Options options;
+			options.spawnMethod = "dummy";
+			options.appRoot = "stub/rack";
+			options.startCommand = "ruby\t" "start.rb";
+			options.startupFile  = "start.rb";
+			options.loadShellEnvvars = false;
+			options.user = testConfig["normal_user_1"].asCString();
+			options.defaultUser = testConfig["default_user"].asCString();
+			options.defaultGroup = testConfig["default_group"].asCString();
+			return options;
+		}
+		
+		void _callback(const SessionPtr &session, const ExceptionPtr &e) {
+			SessionPtr oldSession;
+			{
+				LockGuard l(syncher);
+				oldSession = currentSession;
+				currentSession = session;
+				currentException = e;
+				number++;
+				if (retainSessions && session != NULL) {
+					sessions.push_back(session);
+				}
+			}
+			// destroy old session object outside the lock.
+		}
+
+		void sendHeaders(int connection, ...) {
+			va_list ap;
+			const char *arg;
+			vector<StaticString> args;
+
+			va_start(ap, connection);
+			while ((arg = va_arg(ap, const char *)) != NULL) {
+				args.push_back(StaticString(arg, strlen(arg) + 1));
+			}
+			va_end(ap);
+
+			shared_array<StaticString> args_array(new StaticString[args.size() + 1]);
+			unsigned int totalSize = 0;
+			for (unsigned int i = 0; i < args.size(); i++) {
+				args_array[i + 1] = args[i];
+				totalSize += args[i].size();
+			}
+			char sizeHeader[sizeof(uint32_t)];
+			Uint32Message::generate(sizeHeader, totalSize);
+			args_array[0] = StaticString(sizeHeader, sizeof(uint32_t));
+			
+			gatheredWrite(connection, args_array.get(), args.size() + 1, NULL);
+		}
+
+		string stripHeaders(const string &str) {
+			string::size_type pos = str.find("\r\n\r\n");
+			if (pos == string::npos) {
+				return str;
+			} else {
+				string result = str;
+				result.erase(0, pos + 4);
+				return result;
+			}
+		}
+
+		string sendRequest(const Options &options, const char *path) {
+			int oldNumber = number;
+			pool->asyncGet(options, callback);
+			EVENTUALLY(5,
+				result = number == oldNumber + 1;
+			);
+			if (currentException != NULL) {
+				P_ERROR("get() exception: " << currentException->what());
+				abort();
+			}
+			currentSession->initiate();
+			sendHeaders(currentSession->fd(),
+				"PATH_INFO", path,
+				"REQUEST_METHOD", "GET",
+				NULL);
+			shutdown(currentSession->fd(), SHUT_WR);
+			string body = stripHeaders(readAll(currentSession->fd()));
+			ProcessPtr process = currentSession->getProcess();
+			currentSession.reset();
+			EVENTUALLY(5,
+				result = process->utilization() == 0;
+			);
+			return body;
+		}
+
+		// Ensure that n processes exist.
+		Options ensureMinProcesses(unsigned int n) {
+			Options options = createOptions();
+			options.minProcesses = n;
+			pool->asyncGet(options, callback);
+			EVENTUALLY(5,
+				result = number == 1;
+			);
+			EVENTUALLY(5,
+				result = pool->getProcessCount() == n;
+			);
+			currentSession.reset();
+			return options;
+		}
+
+		void disableProcess(ProcessPtr process, AtomicInt *result) {
+			*result = (int) pool->disableProcess(process->gupid);
+		}
+	};
+	
+	DEFINE_TEST_GROUP_WITH_LIMIT(ApplicationPool2_PoolTest, 100);
+	
+	TEST_METHOD(1) {
+		// Test initial state.
+		ensure(!pool->atFullCapacity());
+	}
+	
+	
+	/*********** Test asyncGet() behavior on a single SuperGroup and Group ***********/
+	
+	TEST_METHOD(2) {
+		// asyncGet() actions on empty pools cannot be immediately satisfied.
+		// Instead a new process will be spawned. In the mean time get()
+		// actions are put on a wait list which will be processed as soon
+		// as the new process is done spawning.
+		Options options = createOptions();
+		
+		ScopedLock l(pool->syncher);
+		pool->asyncGet(options, callback, false);
+		ensure_equals(number, 0);
+		ensure(pool->getWaitlist.empty());
+		ensure(!pool->superGroups.empty());
+		l.unlock();
+		
+		EVENTUALLY(5,
+			result = pool->getProcessCount() == 1;
+		);
+		ensure_equals(number, 1);
+		ensure(currentSession != NULL);
+		ensure(currentException == NULL);
+	}
+	
+	TEST_METHOD(3) {
+		// If one matching process already exists and it's not at full
+		// capacity then asyncGet() will immediately use it.
+		Options options = createOptions();
+		
+		// Spawn a process and opens a session with it.
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+		
+		// Close the session so that the process is now idle.
+		ProcessPtr process = currentSession->getProcess();
+		currentSession.reset();
+		ensure_equals(process->utilization(), 0);
+		ensure(!process->atFullCapacity());
+		
+		// Verify test assertion.
+		ScopedLock l(pool->syncher);
+		pool->asyncGet(options, callback, false);
+		ensure_equals("callback is immediately called", number, 2);
+	}
+	
+	TEST_METHOD(4) {
+		// If one matching process already exists but it's at full capacity,
+		// and the limits prevent spawning of a new process,
+		// then asyncGet() will put the get action on the group's wait
+		// queue. When the process is no longer at full capacity it will
+		// process the request.
+		
+		// Spawn a process and verify that it's at full capacity.
+		// Keep its session open.
+		Options options = createOptions();
+		options.appGroupName = "test";
+		pool->setMax(1);
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+		SessionPtr session1 = currentSession;
+		ProcessPtr process = session1->getProcess();
+		currentSession.reset();
+		ensure_equals(process->sessions, 1);
+		ensure(process->atFullCapacity());
+		
+		// Now call asyncGet() again.
+		pool->asyncGet(options, callback);
+		ensure_equals("callback is not yet called", number, 1);
+		ensure_equals("the get action has been put on the wait list",
+			pool->superGroups.get("test")->defaultGroup->getWaitlist.size(), 1u);
+		
+		session1.reset();
+		ensure_equals("callback is called after the process becomes idle",
+			number, 2);
+		ensure_equals("the get wait list has been processed",
+			pool->superGroups.get("test")->defaultGroup->getWaitlist.size(), 0u);
+		ensure_equals(process->sessions, 1);
+	}
+	
+	TEST_METHOD(5) {
+		// If one matching process already exists but it's at full utilization,
+		// and the limits and pool capacity allow spawning of a new process,
+		// then get() will put the get action on the group's wait
+		// queue while spawning a process in the background.
+		// Either the existing process or the newly spawned process
+		// will process the action, whichever becomes first available.
+		
+		// Here we test the case in which the existing process becomes
+		// available first.
+		initPoolDebugging();
+		
+		// Spawn a regular process and keep its session open.
+		Options options = createOptions();
+		debug->messages->send("Proceed with spawn loop iteration 1");
+		SessionPtr session1 = pool->get(options, &ticket);
+		ProcessPtr process1 = session1->getProcess();
+		
+		// Now spawn a process that never finishes.
+		pool->asyncGet(options, callback);
+		
+		// Release the session on the first process.
+		session1.reset();
+		
+		EVENTUALLY(1,
+			result = number == 1;
+		);
+		ensure_equals("The first process handled the second asyncGet() request",
+			currentSession->getProcess(), process1);
+
+		debug->messages->send("Proceed with spawn loop iteration 2");
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+	}
+	
+	TEST_METHOD(6) {
+		// Here we test the case in which the new process becomes
+		// available first.
+		
+		// Spawn a regular process.
+		Options options = createOptions();
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+		SessionPtr session1 = currentSession;
+		ProcessPtr process1 = currentSession->getProcess();
+		currentSession.reset();
+		
+		// As long as we don't release process1 the following get
+		// action will be processed by the newly spawned process.
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = pool->getProcessCount() == 2;
+		);
+		ensure_equals(number, 2);
+		ensure(currentSession->getProcess() != process1);
+	}
+	
+	TEST_METHOD(7) {
+		// If multiple matching processes exist, and one of them is idle,
+		// then asyncGet() will use that.
+		
+		// Spawn 3 processes and keep a session open with 1 of them.
+		Options options = createOptions();
+		options.minProcesses = 3;
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+		EVENTUALLY(5,
+			result = pool->getProcessCount() == 3;
+		);
+		SessionPtr session1 = currentSession;
+		ProcessPtr process1 = currentSession->getProcess();
+		currentSession.reset();
+		
+		// Now open another session. It should complete immediately
+		// and should not use the first process.
+		ScopedLock l(pool->syncher);
+		pool->asyncGet(options, callback, false);
+		ensure_equals("asyncGet() completed immediately", number, 2);
+		SessionPtr session2 = currentSession;
+		ProcessPtr process2 = currentSession->getProcess();
+		l.unlock();
+		currentSession.reset();
+		ensure(process2 != process1);
+		
+		// Now open yet another session. It should also complete immediately
+		// and should not use the first or the second process.
+		l.lock();
+		pool->asyncGet(options, callback, false);
+		ensure_equals("asyncGet() completed immediately", number, 3);
+		SessionPtr session3 = currentSession;
+		ProcessPtr process3 = currentSession->getProcess();
+		l.unlock();
+		currentSession.reset();
+		ensure(process3 != process1);
+		ensure(process3 != process2);
+	}
+	
+	TEST_METHOD(8) {
+		// If multiple matching processes exist, then asyncGet() will use
+		// the one with the smallest utilization number.
+		
+		// Spawn 2 processes, each with a concurrency of 2.
+		Options options = createOptions();
+		options.minProcesses = 2;
+		pool->setMax(2);
+		GroupPtr group = pool->findOrCreateGroup(options);
+		spawnerConfig->concurrency = 2;
+		{
+			LockGuard l(pool->syncher);
+			group->spawn();
+		}
+		EVENTUALLY(5,
+			result = pool->getProcessCount() == 2;
+		);
+		
+		// asyncGet() selects some process.
+		pool->asyncGet(options, callback);
+		ensure_equals(number, 1);
+		SessionPtr session1 = currentSession;
+		ProcessPtr process1 = currentSession->getProcess();
+		currentSession.reset();
+		
+		// The first process now has 1 session, so next asyncGet() should
+		// select the other process.
+		pool->asyncGet(options, callback);
+		ensure_equals(number, 2);
+		SessionPtr session2 = currentSession;
+		ProcessPtr process2 = currentSession->getProcess();
+		currentSession.reset();
+		ensure("(1)", process1 != process2);
+		
+		// Both processes now have an equal number of sessions. Next asyncGet()
+		// can select either.
+		pool->asyncGet(options, callback);
+		ensure_equals(number, 3);
+		SessionPtr session3 = currentSession;
+		ProcessPtr process3 = currentSession->getProcess();
+		currentSession.reset();
+		
+		// One process now has the lowest number of sessions. Next
+		// asyncGet() should select that one.
+		pool->asyncGet(options, callback);
+		ensure_equals(number, 4);
+		SessionPtr session4 = currentSession;
+		ProcessPtr process4 = currentSession->getProcess();
+		currentSession.reset();
+		ensure(process3 != process4);
+	}
+	
+	TEST_METHOD(9) {
+		// If multiple matching processes exist, and all of them are at full capacity,
+		// and no more processes may be spawned,
+		// then asyncGet() will put the action on the group's wait queue.
+		// The process that first becomes not at full capacity will process the action.
+		
+		// Spawn 2 processes and open 4 sessions.
+		Options options = createOptions();
+		options.appGroupName = "test";
+		options.minProcesses = 2;
+		pool->setMax(2);
+		spawnerConfig->concurrency = 2;
+		
+		vector<SessionPtr> sessions;
+		int expectedNumber = 1;
+		for (int i = 0; i < 4; i++) {
+			pool->asyncGet(options, callback);
+			EVENTUALLY(5,
+				result = number == expectedNumber;
+			);
+			expectedNumber++;
+			sessions.push_back(currentSession);
+			currentSession.reset();
+		}
+		EVENTUALLY(5,
+			result = pool->getProcessCount() == 2;
+		);
+		
+		SuperGroupPtr superGroup = pool->superGroups.get("test");
+		ensure_equals(superGroup->groups[0]->getWaitlist.size(), 0u);
+		ensure(pool->atFullCapacity());
+		
+		// Now try to open another session.
+		pool->asyncGet(options, callback);
+		ensure_equals("The get request has been put on the wait list",
+			pool->superGroups.get("test")->groups[0]->getWaitlist.size(), 1u);
+		
+		// Close an existing session so that one process is no
+		// longer at full capacity.
+		sessions[0].reset();
+		ensure_equals("The get request has been removed from the wait list",
+			pool->superGroups.get("test")->groups[0]->getWaitlist.size(), 0u);
+		ensure(pool->atFullCapacity());
+	}
+	
+	TEST_METHOD(10) {
+		// If multiple matching processes exist, and all of them are at full capacity,
+		// and a new process may be spawned,
+		// then asyncGet() will put the action on the group's wait queue and spawn the
+		// new process.
+		// The process that first becomes not at full capacity
+		// or the newly spawned process
+		// will process the action, whichever is earlier.
+		// Here we test the case where an existing process is earlier.
+		
+		// Spawn 2 processes and open 4 sessions.
+		Options options = createOptions();
+		options.minProcesses = 2;
+		pool->setMax(3);
+		GroupPtr group = pool->findOrCreateGroup(options);
+		spawnerConfig->concurrency = 2;
+		
+		vector<SessionPtr> sessions;
+		int expectedNumber = 1;
+		for (int i = 0; i < 4; i++) {
+			pool->asyncGet(options, callback);
+			EVENTUALLY(5,
+				result = number == expectedNumber;
+			);
+			expectedNumber++;
+			sessions.push_back(currentSession);
+			currentSession.reset();
+		}
+		EVENTUALLY(5,
+			result = pool->getProcessCount() == 2;
+		);
+		
+		// The next asyncGet() should spawn a new process and the action should be queued.
+		ScopedLock l(pool->syncher);
+		spawnerConfig->spawnTime = 5000000;
+		pool->asyncGet(options, callback, false);
+		ensure(group->spawning());
+		ensure_equals(group->getWaitlist.size(), 1u);
+		l.unlock();
+		
+		// Close one of the sessions. Now it will process the action.
+		ProcessPtr process = sessions[0]->getProcess();
+		sessions[0].reset();
+		ensure_equals(number, 5);
+		ensure_equals(currentSession->getProcess(), process);
+		ensure_equals(group->getWaitlist.size(), 0u);
+		ensure_equals(pool->getProcessCount(), 2u);
+	}
+	
+	TEST_METHOD(11) {
+		// Here we test the case where the newly spawned process is earlier.
+		
+		// Spawn 2 processes and open 4 sessions.
+		Options options = createOptions();
+		options.minProcesses = 2;
+		pool->setMax(3);
+		GroupPtr group = pool->findOrCreateGroup(options);
+		spawnerConfig->concurrency = 2;
+		
+		vector<SessionPtr> sessions;
+		int expectedNumber = 1;
+		for (int i = 0; i < 4; i++) {
+			pool->asyncGet(options, callback);
+			EVENTUALLY(5,
+				result = number == expectedNumber;
+			);
+			expectedNumber++;
+			sessions.push_back(currentSession);
+			currentSession.reset();
+		}
+		EVENTUALLY(5,
+			result = pool->getProcessCount() == 2;
+		);
+		
+		// The next asyncGet() should spawn a new process. After it's done
+		// spawning it will process the action.
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = pool->getProcessCount() == 3;
+		);
+		EVENTUALLY(5,
+			result = number == 5;
+		);
+		ensure_equals(currentSession->getProcess()->pid, 3);
+		ensure_equals(group->getWaitlist.size(), 0u);
+	}
+
+	TEST_METHOD(12) {
+		// Test shutting down.
+		ensureMinProcesses(2);
+		ensure(pool->detachSuperGroupByName("stub/rack"));
+		ensure_equals(pool->getSuperGroupCount(), 0u);
+	}
+
+	TEST_METHOD(13) {
+		// Test shutting down while Group is restarting.
+		initPoolDebugging();
+		debug->messages->send("Proceed with spawn loop iteration 1");
+		ensureMinProcesses(1);
+
+		ensure_equals(pool->restartGroupsByAppRoot("stub/rack"), 1u);
+		debug->debugger->recv("About to end restarting");
+		ensure(pool->detachSuperGroupByName("stub/rack"));
+		ensure_equals(pool->getSuperGroupCount(), 0u);
+	}
+
+	TEST_METHOD(14) {
+		// Test shutting down while Group is spawning.
+		initPoolDebugging();
+		Options options = createOptions();
+		
+		pool->asyncGet(options, callback);
+		debug->debugger->recv("Begin spawn loop iteration 1");
+		ensure(pool->detachSuperGroupByName("stub/rack"));
+		ensure_equals(pool->getSuperGroupCount(), 0u);
+	}
+
+	TEST_METHOD(15) {
+		// Test shutting down while SuperGroup is initializing.
+		initPoolDebugging();
+		debug->spawning = false;
+		debug->superGroup = true;
+		Options options = createOptions();
+
+		pool->asyncGet(options, callback);
+		debug->debugger->recv("About to finish SuperGroup initialization");
+		ensure(pool->detachSuperGroupByName("stub/rack"));
+		ensure_equals(pool->getSuperGroupCount(), 0u);
+	}
+
+	TEST_METHOD(16) {
+		// Test shutting down while SuperGroup is restarting.
+		initPoolDebugging();
+		debug->spawning = false;
+		debug->superGroup = true;
+		debug->messages->send("Proceed with initializing SuperGroup");
+		ensureMinProcesses(1);
+
+		ensure_equals(pool->restartSuperGroupsByAppRoot("stub/rack"), 1u);
+		debug->debugger->recv("About to finish SuperGroup restart");
+		ensure(pool->detachSuperGroupByName("stub/rack"));
+		ensure_equals(pool->getSuperGroupCount(), 0u);
+	}
+	
+	
+	/*********** Test asyncGet() behavior on multiple SuperGroups,
+	             each with a single Group ***********/
+	
+	TEST_METHOD(20) {
+		// If the pool is full, and one tries to asyncGet() from a nonexistant group,
+		// then it will kill the oldest idle process and spawn a new process.
+		Options options = createOptions();
+		pool->setMax(2);
+		
+		// Get from /foo and close its session immediately.
+		options.appRoot = "/foo";
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+		ProcessPtr process1 = currentSession->getProcess();
+		GroupPtr group1 = process1->getGroup();
+		SuperGroupPtr superGroup1 = group1->getSuperGroup();
+		currentSession.reset();
+		
+		// Get from /bar and keep its session open.
+		options.appRoot = "/bar";
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 2;
+		);
+		SessionPtr session2 = currentSession;
+		currentSession.reset();
+		
+		// Get from /baz. The process for /foo should be killed now.
+		options.appRoot = "/baz";
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 3;
+		);
+		
+		ensure_equals(pool->getProcessCount(), 2u);
+		ensure_equals(superGroup1->getProcessCount(), 0u);
+	}
+	
+	TEST_METHOD(21) {
+		// If the pool is full, and one tries to asyncGet() from a nonexistant group,
+		// and all existing processes are non-idle, then it will
+		// kill the oldest process and spawn a new process.
+		Options options = createOptions();
+		pool->setMax(2);
+		
+		// Get from /foo and close its session immediately.
+		options.appRoot = "/foo";
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+		SessionPtr session1 = currentSession;
+		ProcessPtr process1 = currentSession->getProcess();
+		GroupPtr group1 = process1->getGroup();
+		SuperGroupPtr superGroup1 = group1->getSuperGroup();
+		
+		// Get from /bar and keep its session open.
+		options.appRoot = "/bar";
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 2;
+		);
+		SessionPtr session2 = currentSession;
+		currentSession.reset();
+		
+		// Get from /baz. The process for /foo should be killed now.
+		options.appRoot = "/baz";
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 3;
+		);
+		
+		ensure_equals(pool->getProcessCount(), 2u);
+		ensure_equals(superGroup1->getProcessCount(), 0u);
+	}
+	
+	TEST_METHOD(22) {
+		// Suppose the pool is full, and one tries to asyncGet() from a nonexistant group,
+		// and the process that is selected for killing is the sole process in its group.
+		// If there were waiters in the group then those waiters will be satisfied after
+		// capacity has become free.
+		Options options = createOptions();
+		pool->setMax(2);
+		
+		// Get from /foo and retain its session.
+		options.appRoot = "/foo";
+		SystemTime::force(1);
+		SessionPtr session1 = pool->get(options, &ticket);
+		GroupPtr fooGroup = session1->getGroup();
+
+		// Get from /bar and retain its session.
+		options.appRoot = "/bar";
+		SystemTime::force(2);
+		SessionPtr session2 = pool->get(options, &ticket);
+
+		// Request another get(). /foo will now have 1 waiter in its waitlist.
+		options.appRoot = "/foo";
+		pool->asyncGet(options, callback);
+		{
+			LockGuard l(pool->syncher);
+			ensure("(1)", session1->getProcess()->isAlive());
+			ensure_equals("(3)", fooGroup->getWaitlist.size(), 1u);
+		}
+
+		// This kill the process for /foo.
+		SystemTime::force(3);
+		options.appRoot = "/baz";
+		SessionPtr session3 = pool->get(options, &ticket);
+		{
+			LockGuard l(pool->syncher);
+			ensure("(4)", session1->getProcess()->enabled == Process::DETACHED);
+			ensure_equals("(6)", fooGroup->getWaitlist.size(), 1u);
+			ensure_equals("(7)", pool->getWaitlist.size(), 0u);
+		}
+
+		// Make process /bar available for killing.
+		session2.reset();
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+	}
+	
+	
+	/*********** Test detachProcess() ***********/
+	
+	TEST_METHOD(30) {
+		// detachProcess() detaches the process from the group. The pool
+		// will restore the minimum number of processes afterwards.
+		Options options = createOptions();
+		options.appGroupName = "test";
+		options.minProcesses = 2;
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = pool->getProcessCount() == 2;
+		);
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+
+		ProcessPtr process = currentSession->getProcess();
+		pool->detachProcess(currentSession->getProcess());
+		{
+			LockGuard l(pool->syncher);
+			ensure(process->enabled == Process::DETACHED);
+		}
+		EVENTUALLY(5,
+			result = pool->getProcessCount() == 2;
+		);
+		currentSession.reset();
+		EVENTUALLY(5,
+			result = process->isDead();
+		);
+	}
+	
+	TEST_METHOD(31) {
+		// If the containing group had waiters on it, and detachProcess()
+		// detaches the only process in the group, then a new process
+		// is automatically spawned to handle the waiters.
+		Options options = createOptions();
+		options.appGroupName = "test";
+		pool->setMax(1);
+		spawnerConfig->spawnTime = 1000000;
+
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+		SessionPtr session1 = currentSession;
+		currentSession.reset();
+
+		pool->asyncGet(options, callback);
+		
+		{
+			LockGuard l(pool->syncher);
+			ensure_equals(pool->superGroups.get("test")->defaultGroup->getWaitlist.size(), 1u);
+		}
+
+		pool->detachProcess(session1->getProcess());
+		{
+			LockGuard l(pool->syncher);
+			ensure(pool->superGroups.get("test")->defaultGroup->spawning());
+			ensure_equals(pool->superGroups.get("test")->defaultGroup->enabledCount, 0);
+			ensure_equals(pool->superGroups.get("test")->defaultGroup->getWaitlist.size(), 1u);
+		}
+
+		EVENTUALLY(5,
+			result = number == 2;
+		);
+	}
+	
+	TEST_METHOD(32) {
+		// If the pool had waiters on it then detachProcess() will
+		// automatically create the SuperGroups that were requested
+		// by the waiters.
+		Options options = createOptions();
+		options.appGroupName = "test";
+		options.minProcesses = 0;
+		pool->setMax(1);
+		spawnerConfig->spawnTime = 30000;
+
+		// Begin spawning a process.
+		pool->asyncGet(options, callback);
+		ensure(pool->atFullCapacity());
+
+		// asyncGet() on another group should now put it on the waiting list.
+		Options options2 = createOptions();
+		options2.appGroupName = "test2";
+		options2.minProcesses = 0;
+		spawnerConfig->spawnTime = 90000;
+		pool->asyncGet(options2, callback);
+		{
+			LockGuard l(pool->syncher);
+			ensure_equals(pool->getWaitlist.size(), 1u);
+		}
+
+		// Eventually the dummy process for "test" is now done spawning.
+		// We then detach it.
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+		SessionPtr session1 = currentSession;
+		currentSession.reset();
+		pool->detachProcess(session1->getProcess());
+		{
+			LockGuard l(pool->syncher);
+			ensure(pool->superGroups.get("test2") != NULL);
+			ensure_equals(pool->getWaitlist.size(), 0u);
+		}
+		EVENTUALLY(5,
+			result = number == 2;
+		);
+	}
+	
+	TEST_METHOD(33) {
+		// A SuperGroup does not become garbage collectable
+		// after detaching all its processes.
+		Options options = createOptions();
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+		ProcessPtr process = currentSession->getProcess();
+		currentSession.reset();
+		SuperGroupPtr superGroup = process->getSuperGroup();
+		pool->detachProcess(process);
+		LockGuard l(pool->syncher);
+		ensure_equals(pool->superGroups.size(), 1u);
+		ensure(superGroup->isAlive());
+		ensure(!superGroup->garbageCollectable());
+	}
+
+	TEST_METHOD(34) {
+		// When detaching a process, it waits until all sessions have
+		// finished before telling the process to shut down.
+		Options options = createOptions();
+		options.spawnMethod = "direct";
+		options.minProcesses = 0;
+		SessionPtr session = pool->get(options, &ticket);
+		ProcessPtr process = session->getProcess();
+
+		ensure(pool->detachProcess(process));
+		{
+			LockGuard l(pool->syncher);
+			ensure_equals(process->enabled, Process::DETACHED);
+		}
+		SHOULD_NEVER_HAPPEN(100,
+			LockGuard l(pool->syncher);
+			result = !process->isAlive()
+				|| !process->osProcessExists();
+		);
+
+		session.reset();
+		EVENTUALLY(1,
+			LockGuard l(pool->syncher);
+			result = process->enabled == Process::DETACHED
+				&& !process->osProcessExists()
+				&& process->isDead();
+		);
+	}
+
+	TEST_METHOD(35) {
+		// When detaching a process, it waits until the OS processes
+		// have exited before cleaning up the in-memory data structures.
+		Options options = createOptions();
+		options.spawnMethod = "direct";
+		options.minProcesses = 0;
+		ProcessPtr process = pool->get(options, &ticket)->getProcess();
+
+		ScopeGuard g(boost::bind(::kill, process->pid, SIGCONT));
+		kill(process->pid, SIGSTOP);
+
+		ensure(pool->detachProcess(process));
+		{
+			LockGuard l(pool->syncher);
+			ensure_equals(process->enabled, Process::DETACHED);
+		}
+		EVENTUALLY(1,
+			result = process->getLifeStatus() == Process::SHUTDOWN_TRIGGERED;
+		);
+
+		SHOULD_NEVER_HAPPEN(100,
+			LockGuard l(pool->syncher);
+			result = process->isDead()
+				|| !process->osProcessExists();
+		);
+
+		kill(process->pid, SIGCONT);
+		g.clear();
+
+		EVENTUALLY(1,
+			LockGuard l(pool->syncher);
+			result = process->enabled == Process::DETACHED
+				&& !process->osProcessExists()
+				&& process->isDead();
+		);
+	}
+
+	
+	/*********** Test disabling and enabling processes ***********/
+
+	TEST_METHOD(40) {
+		// Disabling a process under idle conditions should succeed immediately.
+		ensureMinProcesses(2);
+		vector<ProcessPtr> processes = pool->getProcesses();
+		ensure_equals("Disabling succeeds",
+			pool->disableProcess(processes[0]->gupid), DR_SUCCESS);
+		
+		LockGuard l(pool->syncher);
+		ensure(processes[0]->isAlive());
+		ensure_equals("Process is disabled",
+			processes[0]->enabled,
+			Process::DISABLED);
+		ensure("Other processes are not affected",
+			processes[1]->isAlive());
+		ensure_equals("Other processes are not affected",
+			processes[1]->enabled, Process::ENABLED);
+	}
+
+	TEST_METHOD(41) {
+		// Disabling the sole process in a group should trigger a new process spawn.
+		ensureMinProcesses(1);
+		Options options = createOptions();
+		SessionPtr session = pool->get(options, &ticket);
+
+		ensure_equals(pool->getProcessCount(), 1u);
+		ensure(!pool->isSpawning());
+
+		spawnerConfig->spawnTime = 60000;
+		AtomicInt code = -1;
+		TempThread thr(boost::bind(&ApplicationPool2_PoolTest::disableProcess,
+			this, session->getProcess(), &code));
+		EVENTUALLY2(100, 1,
+			result = pool->isSpawning();
+		);
+		EVENTUALLY(1,
+			result = pool->getProcessCount() == 2u;
+		);
+		ensure_equals((int) code, -1);
+		session.reset();
+		EVENTUALLY(1,
+			result = code == (int) DR_SUCCESS;
+		);
+	}
+
+	TEST_METHOD(42) {
+		// If there are no enabled processes in the group, then disabling should
+		// succeed after the new process has been spawned.
+		initPoolDebugging();
+		debug->messages->send("Proceed with spawn loop iteration 1");
+		debug->messages->send("Proceed with spawn loop iteration 2");
+
+		Options options = createOptions();
+		SessionPtr session1 = pool->get(options, &ticket);
+		SessionPtr session2 = pool->get(options, &ticket);
+		ensure_equals(pool->getProcessCount(), 2u);
+		GroupPtr group = session1->getGroup();
+
+		AtomicInt code1 = -1, code2 = -1;
+		TempThread thr(boost::bind(&ApplicationPool2_PoolTest::disableProcess,
+			this, session1->getProcess(), &code1));
+		TempThread thr2(boost::bind(&ApplicationPool2_PoolTest::disableProcess,
+			this, session2->getProcess(), &code2));
+		EVENTUALLY(2,
+			LockGuard l(pool->syncher);
+			result = group->enabledCount == 0
+				&& group->disablingCount == 2
+				&& group->disabledCount == 0;
+		);
+		session1.reset();
+		session2.reset();
+		SHOULD_NEVER_HAPPEN(20,
+			result = code1 != -1 || code2 != -1;
+		);
+
+		debug->messages->send("Proceed with spawn loop iteration 3");
+		EVENTUALLY(5,
+			result = code1 == DR_SUCCESS;
+		);
+		EVENTUALLY(5,
+			result = code2 == DR_SUCCESS;
+		);
+		{
+			LockGuard l(pool->syncher);
+			ensure_equals(group->enabledCount, 1);
+			ensure_equals(group->disablingCount, 0);
+			ensure_equals(group->disabledCount, 2);
+		}
+	}
+
+	TEST_METHOD(43) {
+		// Suppose that a previous disable command triggered a new process spawn,
+		// and the spawn fails. Then any disabling processes should become enabled
+		// again, and the callbacks for the previous disable commands should be called.
+		initPoolDebugging();
+		debug->messages->send("Proceed with spawn loop iteration 1");
+		debug->messages->send("Proceed with spawn loop iteration 2");
+
+		Options options = createOptions();
+		options.minProcesses = 2;
+		SessionPtr session1 = pool->get(options, &ticket);
+		SessionPtr session2 = pool->get(options, &ticket);
+		ensure_equals(pool->getProcessCount(), 2u);
+
+		AtomicInt code1 = -1, code2 = -1;
+		TempThread thr(boost::bind(&ApplicationPool2_PoolTest::disableProcess,
+			this, session1->getProcess(), &code1));
+		TempThread thr2(boost::bind(&ApplicationPool2_PoolTest::disableProcess,
+			this, session2->getProcess(), &code2));
+		EVENTUALLY(2,
+			GroupPtr group = session1->getGroup();
+			LockGuard l(pool->syncher);
+			result = group->enabledCount == 0
+				&& group->disablingCount == 2
+				&& group->disabledCount == 0;
+		);
+		SHOULD_NEVER_HAPPEN(20,
+			result = code1 != -1 || code2 != -1;
+		);
+
+		setLogLevel(-2);
+		debug->messages->send("Fail spawn loop iteration 3");
+		EVENTUALLY(5,
+			result = code1 == DR_ERROR;
+		);
+		EVENTUALLY(5,
+			result = code2 == DR_ERROR;
+		);
+		{
+			GroupPtr group = session1->getGroup();
+			LockGuard l(pool->syncher);
+			ensure_equals(group->enabledCount, 2);
+			ensure_equals(group->disablingCount, 0);
+			ensure_equals(group->disabledCount, 0);
+		}
+	}
+
+	// TODO: asyncGet() should not select a disabling process if there are enabled processes.
+	// TODO: asyncGet() should not select a disabling process when non-rolling restarting.
+	// TODO: asyncGet() should select a disabling process if there are no enabled processes
+	//       in the group. If this happens then asyncGet() will also spawn a new process.
+	// TODO: asyncGet() should not select a disabled process.
+
+	// TODO: If there are no enabled processes and all disabling processes are at full
+	//       utilization, and the process that was being spawned becomes available
+	//       earlier than any of the disabling processes, then the newly spawned process
+	//       should handle the request.
+
+	// TODO: A disabling process becomes disabled as soon as it's done with
+	//       all its request.
+
+	TEST_METHOD(50) {
+		// Disabling a process that's already being disabled should result in the
+		// callback being called after disabling is done.
+		ensureMinProcesses(2);
+		Options options = createOptions();
+		SessionPtr session = pool->get(options, &ticket);
+
+		AtomicInt code = -1;
+		TempThread thr(boost::bind(&ApplicationPool2_PoolTest::disableProcess,
+			this, session->getProcess(), &code));
+		SHOULD_NEVER_HAPPEN(100,
+			result = code != -1;
+		);
+		session.reset();
+		EVENTUALLY(1,
+			result = code != -1;
+		);
+		ensure_equals(code, (int) DR_SUCCESS);
+	}
+
+	// TODO: Enabling a process that's disabled succeeds immediately.
+	// TODO: Enabling a process that's disabling succeeds immediately. The disable
+	//       callbacks will be called with DR_CANCELED.
+	
+	
+	/*********** Other tests ***********/
+	
+	TEST_METHOD(60) {
+		// The pool is considered to be at full capacity if and only
+		// if all SuperGroups are at full capacity.
+		Options options = createOptions();
+		Options options2 = createOptions();
+		options2.appGroupName = "test";
+
+		pool->setMax(2);
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+
+		pool->asyncGet(options2, callback);
+		EVENTUALLY(5,
+			result = number == 2;
+		);
+
+		ensure_equals(pool->getProcessCount(), 2u);
+		ensure(pool->atFullCapacity());
+		clearAllSessions();
+		pool->detachSuperGroupByName("test");
+		ensure(!pool->atFullCapacity());
+	}
+	
+	TEST_METHOD(61) {
+		// If the pool is at full capacity, then increasing 'max' will cause
+		// new processes to be spawned. Any queued get requests are processed
+		// as those new processes become available or as existing processes
+		// become available.
+		Options options = createOptions();
+		retainSessions = true;
+		pool->setMax(1);
+
+		pool->asyncGet(options, callback);
+		pool->asyncGet(options, callback);
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+
+		pool->setMax(4);
+		EVENTUALLY(5,
+			result = number == 3;
+		);
+		ensure_equals(pool->getProcessCount(), 3u);
+	}
+	
+	TEST_METHOD(62) {
+		// Each spawned process has a GUPID, which can be looked up
+		// through findProcessByGupid().
+		Options options = createOptions();
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+		string gupid = currentSession->getProcess()->gupid;
+		ensure(!gupid.empty());
+		ensure_equals(currentSession->getProcess(), pool->findProcessByGupid(gupid));
+	}
+	
+	TEST_METHOD(63) {
+		// findProcessByGupid() returns a NULL pointer if there is
+		// no matching process.
+		ensure(pool->findProcessByGupid("none") == NULL);
+	}
+
+	TEST_METHOD(64) {
+		// Test process idle cleaning.
+		Options options = createOptions();
+		pool->setMaxIdleTime(50000);
+		SessionPtr session1 = pool->get(options, &ticket);
+		SessionPtr session2 = pool->get(options, &ticket);
+		ensure_equals(pool->getProcessCount(), 2u);
+
+		session2.reset();
+		
+		// One of the processes still has a session open and should
+		// not be idle cleaned.
+		EVENTUALLY(2,
+			result = pool->getProcessCount() == 1;
+		);
+		SHOULD_NEVER_HAPPEN(150,
+			result = pool->getProcessCount() == 0;
+		);
+
+		// It shouldn't clean more processes than minInstances allows.
+		sessions.clear();
+		SHOULD_NEVER_HAPPEN(150,
+			result = pool->getProcessCount() == 0;
+		);
+	}
+
+	TEST_METHOD(65) {
+		// Test spawner idle cleaning.
+		Options options = createOptions();
+		options.appGroupName = "test1";
+		Options options2 = createOptions();
+		options2.appGroupName = "test2";
+
+		retainSessions = true;
+		pool->setMaxIdleTime(50000);
+		pool->asyncGet(options, callback);
+		pool->asyncGet(options2, callback);
+		EVENTUALLY(2,
+			result = number == 2;
+		);
+		ensure_equals(pool->getProcessCount(), 2u);
+		
+		EVENTUALLY(2,
+			SpawnerPtr spawner = pool->getSuperGroup("test1")->defaultGroup->spawner;
+			result = static_pointer_cast<DummySpawner>(spawner)->cleanCount >= 1;
+		);
+		EVENTUALLY(2,
+			SpawnerPtr spawner = pool->getSuperGroup("test2")->defaultGroup->spawner;
+			result = static_pointer_cast<DummySpawner>(spawner)->cleanCount >= 1;
+		);
+	}
+
+	TEST_METHOD(66) {
+		// It should restart the app if restart.txt is created or updated.
+		TempDirCopy dir("stub/wsgi", "tmp.wsgi");
+		Options options = createOptions();
+		options.appRoot = "tmp.wsgi";
+		options.appType = "wsgi";
+		options.spawnMethod = "direct";
+		pool->setMax(1);
+
+		// Send normal request.
+		ensure_equals(sendRequest(options, "/"), "hello <b>world</b>");
+
+		// Modify application; it shouldn't have effect yet.
+		writeFile("tmp.wsgi/passenger_wsgi.py",
+			"def application(env, start_response):\n"
+			"	start_response('200 OK', [('Content-Type', 'text/html')])\n"
+			"	return ['restarted']\n");
+		ensure_equals(sendRequest(options, "/"), "hello <b>world</b>");
+
+		// Create restart.txt and send request again. The change should now be activated.
+		touchFile("tmp.wsgi/tmp/restart.txt", 1);
+		ensure_equals(sendRequest(options, "/"), "restarted");
+
+		// Modify application again; it shouldn't have effect yet.
+		writeFile("tmp.wsgi/passenger_wsgi.py",
+			"def application(env, start_response):\n"
+			"	start_response('200 OK', [('Content-Type', 'text/html')])\n"
+			"	return ['restarted 2']\n");
+		ensure_equals(sendRequest(options, "/"), "restarted");
+
+		// Touch restart.txt and send request again. The change should now be activated.
+		touchFile("tmp.wsgi/tmp/restart.txt", 2);
+		ensure_equals(sendRequest(options, "/"), "restarted 2");
+	}
+
+	TEST_METHOD(67) {
+		// Test spawn exceptions.
+		TempDirCopy dir("stub/wsgi", "tmp.wsgi");
+		Options options = createOptions();
+		options.appRoot = "tmp.wsgi";
+		options.appType = "wsgi";
+		options.spawnMethod = "direct";
+		spawnerConfig->forwardStderr = false;
+
+		writeFile("tmp.wsgi/passenger_wsgi.py",
+			"import sys\n"
+			"sys.stderr.write('Something went wrong!')\n"
+			"exit(1)\n");
+
+		setLogLevel(-2);
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+
+		ensure(currentException != NULL);
+		shared_ptr<SpawnException> e = dynamic_pointer_cast<SpawnException>(currentException);
+		ensure(e->getErrorPage().find("Something went wrong!") != string::npos);
+	}
+
+	TEST_METHOD(68) {
+		// If a process fails to spawn, then it stops trying to spawn minProcesses processes.
+		TempDirCopy dir("stub/wsgi", "tmp.wsgi");
+		Options options = createOptions();
+		options.appRoot = "tmp.wsgi";
+		options.appType = "wsgi";
+		options.spawnMethod = "direct";
+		options.minProcesses = 4;
+		spawnerConfig->forwardStderr = false;
+
+		writeFile("tmp.wsgi/counter", "0");
+		chmod("tmp.wsgi/counter", 0666);
+		// Our application starts successfully the first two times,
+		// and fails all the other times.
+		writeFile("tmp.wsgi/passenger_wsgi.py",
+			"import sys\n"
+
+			"def application(env, start_response):\n"
+			"	pass\n"
+
+			"counter = int(open('counter', 'r').read())\n"
+			"f = open('counter', 'w')\n"
+			"f.write(str(counter + 1))\n"
+			"f.close()\n"
+			"if counter >= 2:\n"
+			"	sys.stderr.write('Something went wrong!')\n"
+			"	exit(1)\n");
+
+		setLogLevel(-2);
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+		EVENTUALLY(5,
+			result = pool->getProcessCount() == 2;
+		);
+		EVENTUALLY(5,
+			result = !pool->isSpawning();
+		);
+		SHOULD_NEVER_HAPPEN(500,
+			result = pool->getProcessCount() > 2;
+		);
+	}
+
+	TEST_METHOD(69) {
+		// It removes the process from the pool if session->initiate() fails.
+		Options options = createOptions();
+		options.appRoot = "stub/wsgi";
+		options.appType = "wsgi";
+		options.spawnMethod = "direct";
+
+		pool->asyncGet(options, callback);
+		EVENTUALLY(5,
+			result = number == 1;
+		);
+		pid_t pid = currentSession->getPid();
+		
+		kill(pid, SIGTERM);
+		// Wait until process is gone.
+		EVENTUALLY(5,
+			result = kill(pid, 0) == -1 && (errno == ESRCH || errno == EPERM || errno == ECHILD);
+		);
+
+		try {
+			currentSession->initiate();
+			fail("Initiate is supposed to fail");
+		} catch (const SystemException &e) {
+			ensure_equals(e.code(), ECONNREFUSED);
+		}
+		ensure_equals(pool->getProcessCount(), 0u);
+	}
+
+	TEST_METHOD(70) {
+		// When a process has become idle, and there are waiters on the pool,
+		// consider detaching it in order to satisfy a waiter.
+		Options options1 = createOptions();
+		Options options2 = createOptions();
+		options2.appRoot = "stub/wsgi";
+		options2.allowTrashingNonIdleProcesses = false;
+
+		retainSessions = true;
+		pool->setMax(2);
+		pool->asyncGet(options1, callback);
+		pool->asyncGet(options1, callback);
+		EVENTUALLY(3,
+			result = pool->getProcessCount() == 2;
+		);
+		pool->asyncGet(options2, callback);
+		ensure_equals(pool->getWaitlist.size(), 1u);
+		ensure_equals(number, 2);
+
+		currentSession.reset();
+		sessions.pop_front();
+		EVENTUALLY(3,
+			result = number == 3;
+		);
+		ensure_equals(pool->getProcessCount(), 2u);
+		SuperGroupPtr superGroup1 = pool->superGroups.get("stub/rack");
+		SuperGroupPtr superGroup2 = pool->superGroups.get("stub/rack");
+		ensure_equals(superGroup1->defaultGroup->enabledCount, 1);
+		ensure_equals(superGroup2->defaultGroup->enabledCount, 1);
+	}
+
+	TEST_METHOD(71) {
+		// A process is detached after processing maxRequests sessions.
+		Options options = createOptions();
+		options.minProcesses = 0;
+		options.maxRequests = 5;
+		pool->setMax(1);
+
+		SessionPtr session = pool->get(options, &ticket);
+		ensure_equals(pool->getProcessCount(), 1u);
+		pid_t origPid = session->getPid();
+		session.reset();
+
+		for (int i = 0; i < 3; i++) {
+			pool->get(options, &ticket).reset();
+			ensure_equals(pool->getProcessCount(), 1u);
+			ensure_equals(pool->getProcesses()[0]->pid, origPid);
+		}
+
+		pool->get(options, &ticket).reset();
+		EVENTUALLY(2,
+			result = pool->getProcessCount() == 0;
+		);
+	}
+
+	TEST_METHOD(72) {
+		// If we restart while spawning is in progress, and the restart
+		// finishes before the process is done spawning, then that
+		// process will not be attached and the original spawn loop will
+		// abort. A new spawn loop will start to ensure that resource
+		// constraints are met.
+		TempDirCopy dir("stub/wsgi", "tmp.wsgi");
+		initPoolDebugging();
+		Options options = createOptions();
+		options.appRoot = "tmp.wsgi";
+		options.minProcesses = 3;
+
+		// Trigger spawn loop and freeze it at the point where it's spawning
+		// the second process.
+		pool->asyncGet(options, callback);
+		debug->debugger->recv("Begin spawn loop iteration 1");
+		debug->messages->send("Proceed with spawn loop iteration 1");
+		debug->debugger->recv("Begin spawn loop iteration 2");
+		ensure_equals("(1)", pool->getProcessCount(), 1u);
+
+		// Trigger restart, wait until it's finished.
+		touchFile("tmp.wsgi/tmp/restart.txt", 1);
+		pool->asyncGet(options, callback);
+		debug->messages->send("Finish restarting");
+		debug->debugger->recv("Restarting done");
+		ensure_equals("(2)", pool->getProcessCount(), 0u);
+
+		// The restarter should have created a new spawn loop and
+		// instructed the old one to stop.
+		debug->debugger->recv("Begin spawn loop iteration 3");
+
+		// We let the old spawn loop continue, which should drop
+		// the second process and abort.
+		debug->messages->send("Proceed with spawn loop iteration 2");
+		debug->debugger->recv("Spawn loop done");
+		ensure_equals("(3)", pool->getProcessCount(), 0u);
+
+		// We let the new spawn loop continue.
+		debug->messages->send("Proceed with spawn loop iteration 3");
+		debug->messages->send("Proceed with spawn loop iteration 4");
+		debug->messages->send("Proceed with spawn loop iteration 5");
+		debug->debugger->recv("Spawn loop done");
+		ensure_equals("(4)", pool->getProcessCount(), 3u);
+	}
+
+	TEST_METHOD(73) {
+		// If a get() request comes in while the restart is in progress, then
+		// that get() request will be put into the get waiters list, which will
+		// be processed after spawning is done.
+
+		// Spawn 2 processes.
+		TempDirCopy dir("stub/wsgi", "tmp.wsgi");
+		Options options = createOptions();
+		options.appRoot = "tmp.wsgi";
+		options.minProcesses = 2;
+		pool->asyncGet(options, callback);
+		EVENTUALLY(2,
+			result = pool->getProcessCount() == 2;
+		);
+		
+		// Trigger a restart. The creation of the new spawner should take a while.
+		spawnerConfig->spawnerCreationSleepTime = 20000;
+		touchFile("tmp.wsgi/tmp/restart.txt");
+		pool->asyncGet(options, callback);
+		GroupPtr group = pool->findOrCreateGroup(options);
+		ensure_equals(pool->getProcessCount(), 0u);
+		ensure_equals(group->getWaitlist.size(), 1u);
+
+		// Now that the restart is in progress, perform a get().
+		pool->asyncGet(options, callback);
+		ensure_equals(group->getWaitlist.size(), 2u);
+		EVENTUALLY(2,
+			result = number == 3;
+		);
+		ensure_equals("The restart function respects minProcesses",
+			pool->getProcessCount(), 2u);
+	}
+
+	TEST_METHOD(74) {
+		// If a process fails to spawn, it sends a SpawnException result to all get waiters.
+		TempDirCopy dir("stub/wsgi", "tmp.wsgi");
+		chmod("tmp.wsgi", 0777);
+		Options options = createOptions();
+		options.appRoot = "tmp.wsgi";
+		options.appType = "wsgi";
+		options.spawnMethod = "direct";
+		spawnerConfig->forwardStderr = false;
+		pool->setMax(1);
+
+		writeFile("tmp.wsgi/passenger_wsgi.py",
+			"import os, time, sys\n"
+			"\n"
+			"def file_exists(filename):\n"
+			"	try:\n"
+			"		os.stat(filename)\n"
+			"		return True\n"
+			"	except OSError:\n"
+			"		return False\n"
+			"\n"
+			"f = open('spawned.txt', 'w')\n"
+			"f.write(str(os.getpid()))\n"
+			"f.close()\n"
+			"while not file_exists('continue.txt'):\n"
+			"	time.sleep(0.05)\n"
+			"sys.stderr.write('Something went wrong!')\n"
+			"exit(1)\n");
+
+		retainSessions = true;
+		setLogLevel(-2);
+		pool->asyncGet(options, callback);
+		pool->asyncGet(options, callback);
+		pool->asyncGet(options, callback);
+		pool->asyncGet(options, callback);
+
+		EVENTUALLY(5,
+			result = fileExists("tmp.wsgi/spawned.txt");
+		);
+		usleep(20000);
+		writeFile("tmp.wsgi/passenger_wsgi.py", readAll("stub/wsgi/passenger_wsgi.py"));
+		pid_t pid = (pid_t) stringToLL(readAll("tmp.wsgi/spawned.txt"));
+		kill(pid, SIGTERM);
+		EVENTUALLY(5,
+			result = number == 4;
+		);
+		ensure_equals(pool->getProcessCount(), 0u);
+		ensure(sessions.empty());
+	}
+
+	TEST_METHOD(75) {
+		// If a process fails to spawn, the existing processes
+		// are kept alive.
+		TempDirCopy dir("stub/wsgi", "tmp.wsgi");
+		Options options = createOptions();
+		options.appRoot = "tmp.wsgi";
+		options.appType = "wsgi";
+		options.spawnMethod = "direct";
+		options.minProcesses = 2;
+		spawnerConfig->forwardStderr = false;
+
+		// Spawn 2 processes.
+		retainSessions = true;
+		pool->asyncGet(options, callback);
+		pool->asyncGet(options, callback);
+		EVENTUALLY(10,
+			result = number == 2;
+		);
+		ensure_equals(pool->getProcessCount(), 2u);
+
+		// Mess up the application and spawn a new one.
+		writeFile("tmp.wsgi/passenger_wsgi.py",
+			"import sys\n"
+			"sys.stderr.write('Something went wrong!')\n"
+			"exit(1)\n");
+		try {
+			setLogLevel(-2);
+			currentSession = pool->get(options, &ticket);
+			fail("SpawnException expected");
+		} catch (const SpawnException &) {
+			ensure_equals(pool->getProcessCount(), 2u);
+		}
+	}
+
+	// TODO: Persistent connections.
+	// TODO: If one closes the session before it has reached EOF, and process's maximum concurrency
+	//       has already been reached, then the pool should ping the process so that it can detect
+	//       when the session's connection has been released by the app.
+
+	
+	/*********** Test previously discovered bugs ***********/
+	
+	TEST_METHOD(76) {
+		// Test detaching, then restarting. This should not violate any invariants.
+		TempDirCopy dir("stub/wsgi", "tmp.wsgi");
+		Options options = createOptions();
+		options.appRoot = "tmp.wsgi";
+		options.appType = "wsgi";
+		options.spawnMethod = "direct";
+
+		SessionPtr session = pool->get(options, &ticket);
+		string gupid = session->getProcess()->gupid;
+		session.reset();
+		pool->detachProcess(gupid);
+		touchFile("tmp.wsgi/tmp/restart.txt", 1);
+		pool->get(options, &ticket).reset();
+	}
+
+
+	/*****************************/
+}
diff --git a/test/cxx/ApplicationPool2/ProcessTest.cpp b/test/cxx/ApplicationPool2/ProcessTest.cpp
new file mode 100644
index 0000000..34777f8
--- /dev/null
+++ b/test/cxx/ApplicationPool2/ProcessTest.cpp
@@ -0,0 +1,139 @@
+#include <TestSupport.h>
+#include <ApplicationPool2/Process.h>
+#include <Utils/IOUtils.h>
+
+using namespace Passenger;
+using namespace Passenger::ApplicationPool2;
+using namespace std;
+
+namespace tut {
+	struct ApplicationPool2_ProcessTest {
+		BackgroundEventLoop bg;
+		SocketListPtr sockets;
+		SocketPair adminSocket;
+		Pipe errorPipe;
+		FileDescriptor server1, server2, server3;
+		
+		ApplicationPool2_ProcessTest() {
+			bg.start();
+			
+			struct sockaddr_in addr;
+			socklen_t len = sizeof(addr);
+			sockets = make_shared<SocketList>();
+			
+			server1 = createTcpServer("127.0.0.1", 0);
+			getsockname(server1, (struct sockaddr *) &addr, &len);
+			sockets->add("main1",
+				"tcp://127.0.0.1:" + toString(addr.sin_port),
+				"session", 3);
+			
+			server2 = createTcpServer("127.0.0.1", 0);
+			getsockname(server2, (struct sockaddr *) &addr, &len);
+			sockets->add("main2",
+				"tcp://127.0.0.1:" + toString(addr.sin_port),
+				"session", 3);
+			
+			server3 = createTcpServer("127.0.0.1", 0);
+			getsockname(server3, (struct sockaddr *) &addr, &len);
+			sockets->add("main3",
+				"tcp://127.0.0.1:" + toString(addr.sin_port),
+				"session", 3);
+			
+			adminSocket = createUnixSocketPair();
+			errorPipe = createPipe();
+		}
+	};
+	
+	DEFINE_TEST_GROUP(ApplicationPool2_ProcessTest);
+	
+	TEST_METHOD(1) {
+		// Test initial state.
+		ProcessPtr process = make_shared<Process>(bg.safe,
+			123, "", "", adminSocket[0],
+			errorPipe[0], sockets, 0, 0);
+		process->dummy = true;
+		process->requiresShutdown = false;
+		ensure_equals(process->utilization(), 0);
+		ensure(!process->atFullCapacity());
+	}
+	
+	TEST_METHOD(2) {
+		// Test opening and closing sessions.
+		ProcessPtr process = make_shared<Process>(bg.safe,
+			123, "", "", adminSocket[0],
+			errorPipe[0], sockets, 0, 0);
+		process->dummy = true;
+		process->requiresShutdown = false;
+		SessionPtr session = process->newSession();
+		SessionPtr session2 = process->newSession();
+		ensure_equals(process->sessions, 2);
+		process->sessionClosed(session.get());
+		ensure_equals(process->sessions, 1);
+		process->sessionClosed(session2.get());
+		ensure_equals(process->sessions, 0);
+	}
+	
+	TEST_METHOD(3) {
+		// newSession() checks out the socket with the smallest utilization number
+		// and sessionClosed() restores the session utilization statistics.
+		ProcessPtr process = make_shared<Process>(bg.safe,
+			123, "", "", adminSocket[0],
+			errorPipe[0], sockets, 0, 0);
+		process->dummy = true;
+		process->requiresShutdown = false;
+		
+		// The first 3 newSession() commands check out an idle socket.
+		SessionPtr session1 = process->newSession();
+		SessionPtr session2 = process->newSession();
+		SessionPtr session3 = process->newSession();
+		ensure(session1->getSocket()->name != session2->getSocket()->name);
+		ensure(session1->getSocket()->name != session3->getSocket()->name);
+		ensure(session2->getSocket()->name != session3->getSocket()->name);
+		
+		// The next 2 newSession() commands check out sockets with sessions == 1.
+		SessionPtr session4 = process->newSession();
+		SessionPtr session5 = process->newSession();
+		ensure(session4->getSocket()->name != session5->getSocket()->name);
+		
+		// There should now be 1 process with 1 session
+		// and 2 processes with 2 sessions.
+		map<int, int> sessionCount;
+		SocketList::const_iterator it;
+		for (it = process->sockets->begin(); it != process->sockets->end(); it++) {
+			sessionCount[it->sessions]++;
+		}
+		ensure_equals(sessionCount.size(), 2u);
+		ensure_equals(sessionCount[1], 1);
+		ensure_equals(sessionCount[2], 2);
+		
+		// Closing the first 3 sessions will result in no processes having 1 session
+		// and 1 process having 2 sessions.
+		process->sessionClosed(session1.get());
+		process->sessionClosed(session2.get());
+		process->sessionClosed(session3.get());
+		sessionCount.clear();
+		for (it = process->sockets->begin(); it != process->sockets->end(); it++) {
+			sessionCount[it->sessions]++;
+		}
+		ensure_equals(sessionCount[0], 1);
+		ensure_equals(sessionCount[1], 2);
+	}
+	
+	TEST_METHOD(4) {
+		// If all sockets are at their full capacity then newSession() will fail.
+		ProcessPtr process = make_shared<Process>(bg.safe,
+			123, "", "", adminSocket[0],
+			errorPipe[0], sockets, 0, 0);
+		process->dummy = true;
+		process->requiresShutdown = false;
+		vector<SessionPtr> sessions;
+		for (int i = 0; i < 9; i++) {
+			ensure(!process->atFullCapacity());
+			SessionPtr session = process->newSession();
+			ensure(session != NULL);
+			sessions.push_back(session);
+		}
+		ensure(process->atFullCapacity());
+		ensure(process->newSession() == NULL);
+	}
+}
diff --git a/test/cxx/ApplicationPool2/SmartSpawnerTest.cpp b/test/cxx/ApplicationPool2/SmartSpawnerTest.cpp
new file mode 100644
index 0000000..1a87018
--- /dev/null
+++ b/test/cxx/ApplicationPool2/SmartSpawnerTest.cpp
@@ -0,0 +1,248 @@
+#include <TestSupport.h>
+#include <ApplicationPool2/SmartSpawner.h>
+#include <Logging.h>
+#include <Utils/json.h>
+#include <unistd.h>
+#include <climits>
+#include <signal.h>
+#include <fcntl.h>
+
+using namespace std;
+using namespace Passenger;
+using namespace Passenger::ApplicationPool2;
+
+namespace tut {
+	struct ApplicationPool2_SmartSpawnerTest {
+		ServerInstanceDirPtr serverInstanceDir;
+		ServerInstanceDir::GenerationPtr generation;
+		BackgroundEventLoop bg;
+		ProcessPtr process;
+		PipeWatcher::DataCallback gatherOutput;
+		string gatheredOutput;
+		boost::mutex gatheredOutputSyncher;
+		
+		ApplicationPool2_SmartSpawnerTest() {
+			createServerInstanceDirAndGeneration(serverInstanceDir, generation);
+			bg.start();
+			PipeWatcher::onData = PipeWatcher::DataCallback();
+			gatherOutput = boost::bind(&ApplicationPool2_SmartSpawnerTest::_gatherOutput, this, _1, _2);
+			setLogLevel(LVL_ERROR); // TODO: should be LVL_WARN
+		}
+		
+		~ApplicationPool2_SmartSpawnerTest() {
+			setLogLevel(DEFAULT_LOG_LEVEL);
+			unlink("stub/wsgi/passenger_wsgi.pyc");
+			PipeWatcher::onData = PipeWatcher::DataCallback();
+		}
+		
+		shared_ptr<SmartSpawner> createSpawner(const Options &options, bool exitImmediately = false) {
+			char buf[PATH_MAX + 1];
+			getcwd(buf, PATH_MAX);
+			
+			vector<string> command;
+			command.push_back("ruby");
+			command.push_back(string(buf) + "/support/placebo-preloader.rb");
+			if (exitImmediately) {
+				command.push_back("exit-immediately");
+			}
+			
+			return make_shared<SmartSpawner>(bg.safe,
+				*resourceLocator,
+				generation,
+				command,
+				options);
+		}
+		
+		Options createOptions() {
+			Options options;
+			options.spawnMethod = "smart";
+			options.loadShellEnvvars = false;
+			return options;
+		}
+
+		void _gatherOutput(const char *data, unsigned int size) {
+			boost::lock_guard<boost::mutex> l(gatheredOutputSyncher);
+			gatheredOutput.append(data, size);
+		}
+	};
+	
+	DEFINE_TEST_GROUP_WITH_LIMIT(ApplicationPool2_SmartSpawnerTest, 90);
+	
+	#include "SpawnerTestCases.cpp"
+	
+	TEST_METHOD(80) {
+		// If the preloader has crashed then SmartSpawner will
+		// restart it and try again.
+		Options options = createOptions();
+		options.appRoot      = "stub/rack";
+		options.startCommand = "ruby\t" "start.rb";
+		options.startupFile  = "start.rb";
+		shared_ptr<SmartSpawner> spawner = createSpawner(options);
+		process = spawner->spawn(options);
+		process->requiresShutdown = false;
+		
+		kill(spawner->getPreloaderPid(), SIGTERM);
+		// Give it some time to exit.
+		usleep(300000);
+		
+		// No exception at next spawn.
+		setLogLevel(-1);
+		process = spawner->spawn(options);
+		process->requiresShutdown = false;
+	}
+	
+	TEST_METHOD(81) {
+		// If the preloader still crashes after the restart then
+		// SmartSpawner will throw an exception.
+		Options options = createOptions();
+		options.appRoot      = "stub/rack";
+		options.startCommand = "ruby\t" "start.rb";
+		options.startupFile  = "start.rb";
+		setLogLevel(-1);
+		shared_ptr<SmartSpawner> spawner = createSpawner(options, true);
+		try {
+			process = spawner->spawn(options);
+			process->requiresShutdown = false;
+			fail("SpawnException expected");
+		} catch (const SpawnException &) {
+			// Pass.
+		}
+	}
+	
+	TEST_METHOD(82) {
+		// If the preloader didn't start within the timeout
+		// then it's killed and an exception is thrown, with
+		// whatever stderr output as error page.
+		Options options = createOptions();
+		options.appRoot      = "stub/rack";
+		options.startCommand = "ruby\t" "start.rb";
+		options.startupFile  = "start.rb";
+		options.startTimeout = 300;
+		
+		vector<string> preloaderCommand;
+		preloaderCommand.push_back("bash");
+		preloaderCommand.push_back("-c");
+		preloaderCommand.push_back("echo hello world >&2; sleep 60");
+		SmartSpawner spawner(bg.safe,
+			*resourceLocator,
+			generation,
+			preloaderCommand,
+			options);
+		spawner.getConfig()->forwardStdout = false;
+		spawner.getConfig()->forwardStderr = false;
+		
+		try {
+			process = spawner.spawn(options);
+			process->requiresShutdown = false;
+			fail("SpawnException expected");
+		} catch (const SpawnException &e) {
+			ensure_equals(e.getErrorKind(),
+				SpawnException::PRELOADER_STARTUP_TIMEOUT);
+			ensure(e.getErrorPage().find("hello world\n") != string::npos);
+		}
+	}
+	
+	TEST_METHOD(83) {
+		// If the preloader crashed during startup without returning
+		// a proper error response, then its stderr output is used
+		// as error response instead.
+		Options options = createOptions();
+		options.appRoot      = "stub/rack";
+		options.startCommand = "ruby\t" "start.rb";
+		options.startupFile  = "start.rb";
+		
+		vector<string> preloaderCommand;
+		preloaderCommand.push_back("bash");
+		preloaderCommand.push_back("-c");
+		preloaderCommand.push_back("echo hello world >&2");
+		SmartSpawner spawner(bg.safe,
+			*resourceLocator,
+			generation,
+			preloaderCommand,
+			options);
+		spawner.getConfig()->forwardStdout = false;
+		spawner.getConfig()->forwardStderr = false;
+		
+		try {
+			process = spawner.spawn(options);
+			process->requiresShutdown = false;
+			fail("SpawnException expected");
+		} catch (const SpawnException &e) {
+			ensure_equals(e.getErrorKind(),
+				SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR);
+			ensure(e.getErrorPage().find("hello world\n") != string::npos);
+		}
+	}
+
+	TEST_METHOD(84) {
+		// If the preloader encountered an error, then the resulting SpawnException
+		// takes note of the process's environment variables.
+		Options options = createOptions();
+		options.appRoot      = "stub/rack";
+		options.startCommand = "ruby\t" "start.rb";
+		options.startupFile  = "start.rb";
+		options.environmentVariables.push_back(make_pair("PASSENGER_FOO", "foo"));
+		
+		vector<string> preloaderCommand;
+		preloaderCommand.push_back("bash");
+		preloaderCommand.push_back("-c");
+		preloaderCommand.push_back("echo hello world >&2");
+		SmartSpawner spawner(bg.safe,
+			*resourceLocator,
+			generation,
+			preloaderCommand,
+			options);
+		spawner.getConfig()->forwardStdout = false;
+		spawner.getConfig()->forwardStderr = false;
+		
+		try {
+			process = spawner.spawn(options);
+			process->requiresShutdown = false;
+			fail("SpawnException expected");
+		} catch (const SpawnException &e) {
+			ensure(containsSubstring(e["envvars"], "PASSENGER_FOO=foo\n"));
+		}
+	}
+
+	TEST_METHOD(85) {
+		// Test that the spawned process can still write to its stderr
+		// after the SmartSpawner has been destroyed.
+		DeleteFileEventually d("tmp.output");
+		PipeWatcher::onData = gatherOutput;
+		Options options = createOptions();
+		options.appRoot = "stub/rack";
+		
+		{
+			vector<string> preloaderCommand;
+			preloaderCommand.push_back("ruby");
+			preloaderCommand.push_back(resourceLocator->getHelperScriptsDir() + "/rack-preloader.rb");
+			SmartSpawner spawner(bg.safe,
+				*resourceLocator,
+				generation,
+				preloaderCommand,
+				options);
+			process = spawner.spawn(options);
+			process->requiresShutdown = false;
+		}
+		
+		SessionPtr session = process->newSession();
+		session->initiate();
+		
+		const char header[] =
+			"REQUEST_METHOD\0GET\0"
+			"PATH_INFO\0/print_stderr\0";
+		string data(header, sizeof(header) - 1);
+		data.append("PASSENGER_CONNECT_PASSWORD");
+		data.append(1, '\0');
+		data.append(process->connectPassword);
+		data.append(1, '\0');
+
+		writeScalarMessage(session->fd(), data);
+		shutdown(session->fd(), SHUT_WR);
+		readAll(session->fd());
+		EVENTUALLY(2,
+			boost::lock_guard<boost::mutex> l(gatheredOutputSyncher);
+			result = gatheredOutput.find("hello world!\n") != string::npos;
+		);
+	}
+}
diff --git a/test/cxx/ApplicationPool2/SpawnerTestCases.cpp b/test/cxx/ApplicationPool2/SpawnerTestCases.cpp
new file mode 100644
index 0000000..3d490c2
--- /dev/null
+++ b/test/cxx/ApplicationPool2/SpawnerTestCases.cpp
@@ -0,0 +1,785 @@
+// Included in DirectSpawnerTest.cpp and SmartSpawnerTest.cpp.
+
+	#define SETUP_USER_SWITCHING_TEST(code) \
+		if (geteuid() != 0) { \
+			return; \
+		} \
+		TempDirCopy copy("stub/wsgi", "tmp.wsgi"); \
+		addUserSwitchingCode(); \
+		\
+		DeleteFileEventually info1("/tmp/info.txt"); \
+		DeleteFileEventually info2("/tmp/info2.txt"); \
+		\
+		SpawnerPtr spawner; \
+		Options options; \
+		options = createOptions(); \
+		options.appRoot = "tmp.wsgi"; \
+		options.appType = "wsgi"; \
+		options.defaultUser = testConfig["default_user"].asCString(); \
+		options.defaultGroup = testConfig["default_group"].asCString(); \
+		code \
+		spawner = createSpawner(options)
+
+	#define RUN_USER_SWITCHING_TEST() \
+		process = spawner->spawn(options); \
+		process->requiresShutdown = false; \
+		BufferedIO io(FileDescriptor(open("/tmp/info.txt", O_RDONLY))); \
+		uid_t uid = (uid_t) atol(io.readLine().c_str()); \
+		gid_t gid = (gid_t) atol(io.readLine().c_str()); \
+		string groups = strip(io.readLine()); \
+		/* Avoid compiler warning. */ \
+		(void) uid; (void) gid; (void) groups
+
+	typedef shared_ptr<Spawner> SpawnerPtr;
+	
+	static void addUserSwitchingCode() {
+		FILE *f = fopen("tmp.wsgi/passenger_wsgi.py", "a");
+		fputs(
+			"\n"
+			"import os\n"
+			"f = open('/tmp/info.txt', 'w')\n"
+			"f.write(str(os.getuid()) + '\\n')\n"
+			"f.write(str(os.getgid()) + '\\n')\n"
+			"f.write(os.popen('groups').read() + '\\n')\n"
+			"f.close()\n",
+			f);
+		fclose(f);
+
+		rename("tmp.wsgi/passenger_wsgi.py", "tmp.wsgi/passenger_wsgi.py.real");
+		symlink("passenger_wsgi.py.real", "tmp.wsgi/passenger_wsgi.py");
+	}
+
+	static void checkin(ProcessPtr process, Connection *conn) {
+		process->sockets->front().checkinConnection(*conn);
+	}
+
+	static string userNameForUid(uid_t uid) {
+		return getpwuid(uid)->pw_name;
+	}
+
+	static string groupNameForGid(gid_t gid) {
+		return getgrgid(gid)->gr_name;
+	}
+
+	static uid_t uidFor(const string &userName) {
+		return getpwnam(userName.c_str())->pw_uid;
+	}
+
+	static gid_t gidFor(const string &groupName) {
+		return getgrnam(groupName.c_str())->gr_gid;
+	}
+
+	static string primaryGroupFor(const string &userName) {
+		gid_t gid = getpwnam(userName.c_str())->pw_gid;
+		return getgrgid(gid)->gr_name;
+	}
+
+	TEST_METHOD(1) {
+		// Basic spawning test.
+		Options options = createOptions();
+		options.appRoot      = "stub/rack";
+		options.startCommand = "ruby\t" "start.rb";
+		options.startupFile  = "start.rb";
+		SpawnerPtr spawner = createSpawner(options);
+		process = spawner->spawn(options);
+		process->requiresShutdown = false;
+		ensure_equals(process->sockets->size(), 1u);
+		
+		Connection conn = process->sockets->front().checkoutConnection();
+		ScopeGuard guard(boost::bind(checkin, process, &conn));
+		writeExact(conn.fd, "ping\n");
+		ensure_equals(readAll(conn.fd), "pong\n");
+	}
+
+	TEST_METHOD(2) {
+		// It enforces the given start timeout.
+		Options options = createOptions();
+		options.appRoot      = "stub";
+		options.startCommand = "sleep\t" "60";
+		options.startupFile  = ".";
+		options.startTimeout = 300;
+		SpawnerPtr spawner = createSpawner(options);
+		try {
+			process = spawner->spawn(options);
+			process->requiresShutdown = false;
+			fail("Timeout expected");
+		} catch (const SpawnException &e) {
+			ensure_equals(e.getErrorKind(),
+				SpawnException::APP_STARTUP_TIMEOUT);
+		}
+	}
+
+	TEST_METHOD(3) {
+		// Any protocol errors during startup are caught and result
+		// in exceptions.
+		Options options = createOptions();
+		options.appRoot      = "stub";
+		options.startCommand = "echo\t" "!> hello world";
+		options.startupFile  = ".";
+		SpawnerPtr spawner = createSpawner(options);
+		try {
+			process = spawner->spawn(options);
+			process->requiresShutdown = false;
+			fail("Exception expected");
+		} catch (const SpawnException &e) {
+			ensure_equals(e.getErrorKind(),
+				SpawnException::APP_STARTUP_PROTOCOL_ERROR);
+		}
+	}
+
+	TEST_METHOD(4) {
+		// The application may respond with a special Error response,
+		// which will result in a SpawnException with the content.
+		Options options = createOptions();
+		options.appRoot      = "stub";
+		options.startCommand = "perl\t" "start_error.pl";
+		options.startupFile  = "start_error.pl";
+		SpawnerPtr spawner = createSpawner(options);
+		try {
+			process = spawner->spawn(options);
+			process->requiresShutdown = false;
+			fail("SpawnException expected");
+		} catch (const SpawnException &e) {
+			ensure_equals(e.getErrorKind(),
+				SpawnException::APP_STARTUP_EXPLAINABLE_ERROR);
+			ensure_equals(e.getErrorPage(),
+				"He's dead, Jim!\n"
+				"Relax, I'm a doctor.\n");
+		}
+	}
+
+	TEST_METHOD(5) {
+		// The start timeout is enforced even while reading the error
+		// response.
+		Options options = createOptions();
+		options.appRoot      = "stub";
+		options.startCommand = "perl\t" "start_error.pl\t" "freeze";
+		options.startupFile  = "start_error.pl";
+		options.startTimeout = 300;
+		SpawnerPtr spawner = createSpawner(options);
+		try {
+			process = spawner->spawn(options);
+			process->requiresShutdown = false;
+			fail("Timeout expected");
+		} catch (const SpawnException &e) {
+			ensure_equals(e.getErrorKind(),
+				SpawnException::APP_STARTUP_TIMEOUT);
+		}
+	}
+
+	TEST_METHOD(6) {
+		// The reported PID is correct.
+		Options options = createOptions();
+		options.appRoot      = "stub/rack";
+		options.startCommand = "ruby\t" "start.rb";
+		options.startupFile  = "start.rb";
+		SpawnerPtr spawner = createSpawner(options);
+		process = spawner->spawn(options);
+		process->requiresShutdown = false;
+		ensure_equals(process->sockets->size(), 1u);
+		
+		Connection conn = process->sockets->front().checkoutConnection();
+		ScopeGuard guard(boost::bind(checkin, process, &conn));
+		writeExact(conn.fd, "pid\n");
+		ensure_equals(readAll(conn.fd), toString(process->pid) + "\n");
+	}
+	
+	TEST_METHOD(7) {
+		// Custom environment variables can be passed.
+		Options options = createOptions();
+		options.appRoot = "stub/rack";
+		options.startCommand = "ruby\t" "start.rb";
+		options.startupFile  = "start.rb";
+		options.environmentVariables.push_back(make_pair("PASSENGER_FOO", "foo"));
+		options.environmentVariables.push_back(make_pair("PASSENGER_BAR", "bar"));
+		SpawnerPtr spawner = createSpawner(options);
+		process = spawner->spawn(options);
+		process->requiresShutdown = false;
+		ensure_equals(process->sockets->size(), 1u);
+		
+		Connection conn = process->sockets->front().checkoutConnection();
+		ScopeGuard guard(boost::bind(checkin, process, &conn));
+		writeExact(conn.fd, "envvars\n");
+		string envvars = readAll(conn.fd);
+		ensure("(1)", envvars.find("PASSENGER_FOO = foo\n") != string::npos);
+		ensure("(2)", envvars.find("PASSENGER_BAR = bar\n") != string::npos);
+	}
+
+	TEST_METHOD(8) {
+		// Any raised SpawnExceptions take note of the process's environment variables.
+		Options options = createOptions();
+		options.appRoot      = "stub";
+		options.startCommand = "echo\t" "!> hello world";
+		options.startupFile  = ".";
+		options.environmentVariables.push_back(make_pair("PASSENGER_FOO", "foo"));
+		SpawnerPtr spawner = createSpawner(options);
+		try {
+			process = spawner->spawn(options);
+			process->requiresShutdown = false;
+			fail("Exception expected");
+		} catch (const SpawnException &e) {
+			ensure(containsSubstring(e["envvars"], "PASSENGER_FOO=foo\n"));
+		}
+	}
+
+	TEST_METHOD(9) {
+		// It raises an exception if the user does not have a access to one
+		// of the app root's parent directories, or the app root itself.
+		runShellCommand("mkdir -p tmp.check/a/b/c");
+		TempDirCopy dir("stub/rack", "tmp.check/a/b/c/d");
+		TempDir dir2("tmp.check");
+
+		char buffer[PATH_MAX];
+		string cwd = getcwd(buffer, sizeof(buffer));
+
+		Options options = createOptions();
+		options.appRoot = "tmp.check/a/b/c/d";
+		options.appType = "rack";
+		SpawnerPtr spawner = createSpawner(options);
+
+		if (getuid() != 0) {
+			// TODO: implement this test for root too
+			runShellCommand("chmod 000 tmp.check/a/b/c/d");
+			runShellCommand("chmod 600 tmp.check/a/b/c");
+			runShellCommand("chmod 600 tmp.check/a");
+
+			try {
+				process = spawner->spawn(options);
+				process->requiresShutdown = false;
+				fail("SpawnException expected");
+			} catch (const SpawnException &e) {
+				ensure("(1)", containsSubstring(e.getErrorPage(),
+					"the parent directory '" + cwd + "/tmp.check/a' has wrong permissions"));
+			}
+
+			runShellCommand("chmod 700 tmp.check/a");
+			try {
+				process = spawner->spawn(options);
+				process->requiresShutdown = false;
+				fail("SpawnException expected");
+			} catch (const SpawnException &e) {
+				ensure("(2)", containsSubstring(e.getErrorPage(),
+					"the parent directory '" + cwd + "/tmp.check/a/b/c' has wrong permissions"));
+			}
+
+			runShellCommand("chmod 700 tmp.check/a/b/c");
+			try {
+				process = spawner->spawn(options);
+				process->requiresShutdown = false;
+				fail("SpawnException expected");
+			} catch (const SpawnException &e) {
+				ensure("(3)", containsSubstring(e.getErrorPage(),
+					"However this directory is not accessible because it has wrong permissions."));
+			}
+
+			runShellCommand("chmod 700 tmp.check/a/b/c/d");
+			process = spawner->spawn(options); // Should not throw.
+			process->requiresShutdown = false;
+		}
+	}
+
+	TEST_METHOD(10) {
+		// It forwards all stdout and stderr output, even after the corresponding
+		// Process object has been destroyed.
+		DeleteFileEventually d("tmp.output");
+		PipeWatcher::onData = gatherOutput;
+
+		Options options = createOptions();
+		options.appRoot = "stub/rack";
+		options.appType = "rack";
+		SpawnerPtr spawner = createSpawner(options);
+		process = spawner->spawn(options);
+		process->requiresShutdown = false;
+		
+		SessionPtr session = process->newSession();
+		session->initiate();
+		
+		setLogLevel(LVL_ERROR); // TODO: should be LVL_WARN
+		const char header[] =
+			"REQUEST_METHOD\0GET\0"
+			"PATH_INFO\0/print_stdout_and_stderr\0";
+		string data(header, sizeof(header) - 1);
+		data.append("PASSENGER_CONNECT_PASSWORD");
+		data.append(1, '\0');
+		data.append(process->connectPassword);
+		data.append(1, '\0');
+
+		writeScalarMessage(session->fd(), data);
+		shutdown(session->fd(), SHUT_WR);
+		readAll(session->fd());
+		session->close(true);
+		session.reset();
+		process.reset();
+
+		EVENTUALLY(2,
+			boost::lock_guard<boost::mutex> l(gatheredOutputSyncher);
+			result = gatheredOutput.find("hello stdout!\n") != string::npos
+				&& gatheredOutput.find("hello stderr!\n") != string::npos;
+		);
+	}
+	
+	// It raises an exception if getStartupCommand() is empty.
+
+	/******* User switching tests *******/
+
+	// If 'user' is set
+		// and 'user' is 'root'
+			TEST_METHOD(20) {
+				// It changes the user to the value of 'defaultUser'.
+				SETUP_USER_SWITCHING_TEST(
+					options.user = "root";
+				);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(userNameForUid(uid), testConfig["default_user"]);
+			}
+
+			TEST_METHOD(21) {
+				// If 'group' is given, it changes group to the given group name.
+				SETUP_USER_SWITCHING_TEST(
+					options.user = "root";
+					options.group = testConfig["normal_group_1"].asCString();
+				);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString());
+			}
+
+			TEST_METHOD(22) {
+				// If 'group' is set to the root group, it changes group to defaultGroup.
+				string rootGroup = groupNameForGid(0);
+				SETUP_USER_SWITCHING_TEST(
+					options.user = "root";
+					options.group = rootGroup.c_str();
+				);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(groupNameForGid(gid), testConfig["default_group"].asString());
+			}
+
+			// and 'group' is set to '!STARTUP_FILE!'"
+				TEST_METHOD(23) {
+					// It changes the group to the startup file's group.
+					SETUP_USER_SWITCHING_TEST(
+						options.user = "root";
+						options.group = "!STARTUP_FILE!";
+					);
+					lchown("tmp.wsgi/passenger_wsgi.py",
+						(uid_t) -1,
+						gidFor(testConfig["normal_group_1"].asString()));
+					RUN_USER_SWITCHING_TEST();
+					ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString());
+				}
+
+				TEST_METHOD(24) {
+					// If the startup file is a symlink, then it uses the symlink's group, not the target's group
+					SETUP_USER_SWITCHING_TEST(
+						options.user = "root";
+						options.group = "!STARTUP_FILE!";
+					);
+					lchown("tmp.wsgi/passenger_wsgi.py",
+						(uid_t) -1,
+						gidFor(testConfig["normal_group_2"].asString()));
+					chown("tmp.wsgi/passenger_wsgi.py.real",
+						(uid_t) -1,
+						gidFor(testConfig["normal_group_1"].asString()));
+					RUN_USER_SWITCHING_TEST();
+					ensure_equals(groupNameForGid(gid), testConfig["normal_group_2"].asString());
+				}
+
+			TEST_METHOD(25) {
+				// If 'group' is not given, it changes the group to defaultUser's primary group.
+				SETUP_USER_SWITCHING_TEST(
+					options.user = "root";
+				);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(groupNameForGid(gid),
+					primaryGroupFor(testConfig["default_user"].asString()));
+			}
+
+		// and 'user' is not 'root'
+			TEST_METHOD(29) {
+				// It changes the user to the given username.
+				SETUP_USER_SWITCHING_TEST(
+					options.user = testConfig["normal_user_1"].asCString();
+				);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(userNameForUid(uid), testConfig["normal_user_1"].asString());
+			}
+
+			TEST_METHOD(30) {
+				// If 'group' is given, it changes group to the given group name.
+				// It changes the user to the given username.
+				SETUP_USER_SWITCHING_TEST(
+					options.user = testConfig["normal_user_1"].asCString();
+					options.group = testConfig["normal_group_1"].asCString();
+				);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString());
+			}
+
+			TEST_METHOD(31) {
+				// If 'group' is set to the root group, it changes group to defaultGroup.
+				// It changes the user to the given username.
+				string rootGroup = groupNameForGid(0);
+				SETUP_USER_SWITCHING_TEST(
+					options.user = testConfig["normal_user_1"].asCString();
+					options.group = rootGroup.c_str();
+				);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(groupNameForGid(gid), testConfig["default_group"].asString());
+			}
+
+			// and 'group' is set to '!STARTUP_FILE!'
+				TEST_METHOD(32) {
+					// It changes the group to the startup file's group.
+					SETUP_USER_SWITCHING_TEST(
+						options.user = testConfig["normal_user_1"].asCString();
+						options.group = "!STARTUP_FILE!";
+					);
+					lchown("tmp.wsgi/passenger_wsgi.py",
+						(uid_t) -1,
+						gidFor(testConfig["normal_group_1"].asString()));
+					RUN_USER_SWITCHING_TEST();
+					ensure_equals(groupNameForGid(gid),
+						testConfig["normal_group_1"].asString());
+				}
+
+				TEST_METHOD(33) {
+					// If the startup file is a symlink, then it uses the
+					// symlink's group, not the target's group.
+					SETUP_USER_SWITCHING_TEST(
+						options.user = testConfig["normal_user_1"].asCString();
+						options.group = "!STARTUP_FILE!";
+					);
+					lchown("tmp.wsgi/passenger_wsgi.py",
+						(uid_t) -1,
+						gidFor(testConfig["normal_group_2"].asString()));
+					chown("tmp.wsgi/passenger_wsgi.py.real",
+						(uid_t) -1,
+						gidFor(testConfig["normal_group_1"].asString()));
+					RUN_USER_SWITCHING_TEST();
+					ensure_equals(groupNameForGid(gid),
+						testConfig["normal_group_2"].asString());
+				}
+
+			TEST_METHOD(34) {
+				// If 'group' is not given, it changes the group to the user's primary group.
+				SETUP_USER_SWITCHING_TEST(
+					options.user = testConfig["normal_user_1"].asCString();
+				);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(groupNameForGid(gid),
+					primaryGroupFor(testConfig["normal_user_1"].asString()));
+			}
+
+		// and the given username does not exist
+			TEST_METHOD(38) {
+				// It changes the user to the value of defaultUser.
+				SETUP_USER_SWITCHING_TEST(
+					options.user = testConfig["nonexistant_user"].asCString();
+				);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(userNameForUid(uid), testConfig["default_user"].asString());
+			}
+
+			TEST_METHOD(39) {
+				// If 'group' is given, it changes group to the given group name.
+				SETUP_USER_SWITCHING_TEST(
+					options.user = testConfig["nonexistant_user"].asCString();
+					options.group = testConfig["normal_group_1"].asCString();
+				);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString());
+			}
+
+			TEST_METHOD(40) {
+				// If 'group' is set to the root group, it changes group to defaultGroup.
+				string rootGroup = groupNameForGid(0);
+				SETUP_USER_SWITCHING_TEST(
+					options.user = testConfig["nonexistant_user"].asCString();
+					options.group = rootGroup;
+				);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(groupNameForGid(gid), testConfig["default_group"].asString());
+			}
+
+			// and 'group' is set to '!STARTUP_FILE!'
+				TEST_METHOD(41) {
+					// It changes the group to the startup file's group.
+					SETUP_USER_SWITCHING_TEST(
+						options.user = testConfig["nonexistant_user"].asCString();
+						options.group = "!STARTUP_FILE!";
+					);
+					lchown("tmp.wsgi/passenger_wsgi.py",
+						(uid_t) -1,
+						gidFor(testConfig["normal_group_1"].asString()));
+					RUN_USER_SWITCHING_TEST();
+					ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString());
+				}
+
+				TEST_METHOD(42) {
+					// If the startup file is a symlink, then it uses the
+					// symlink's group, not the target's group.
+					SETUP_USER_SWITCHING_TEST(
+						options.user = testConfig["nonexistant_user"].asCString();
+						options.group = "!STARTUP_FILE!";
+					);
+					lchown("tmp.wsgi/passenger_wsgi.py",
+						(uid_t) -1,
+						gidFor(testConfig["normal_group_2"].asString()));
+					chown("tmp.wsgi/passenger_wsgi.py.real",
+						(uid_t) -1,
+						gidFor(testConfig["normal_group_1"].asString()));
+					RUN_USER_SWITCHING_TEST();
+					ensure_equals(groupNameForGid(gid), testConfig["normal_group_2"].asString());
+				}
+
+			TEST_METHOD(43) {
+				// If 'group' is not given, it changes the group to defaultUser's primary group.
+				SETUP_USER_SWITCHING_TEST(
+					options.user = testConfig["nonexistant_user"].asCString();
+				);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(groupNameForGid(gid),
+					primaryGroupFor(testConfig["default_user"].asString()));
+			}
+
+	// If 'user' is not set
+		// and the startup file's owner exists
+			TEST_METHOD(47) {
+				// It changes the user to the owner of the startup file.
+				SETUP_USER_SWITCHING_TEST(
+					(void) 0;
+				);
+				lchown("tmp.wsgi/passenger_wsgi.py",
+					uidFor(testConfig["normal_user_1"].asString()),
+					(gid_t) -1);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(userNameForUid(uid), testConfig["normal_user_1"].asString());
+			}
+
+			TEST_METHOD(48) {
+				// If the startup file is a symlink, then it uses the symlink's owner, not the target's owner.
+				SETUP_USER_SWITCHING_TEST(
+					(void) 0;
+				);
+				lchown("tmp.wsgi/passenger_wsgi.py",
+					uidFor(testConfig["normal_user_2"].asString()),
+					(gid_t) -1);
+				chown("tmp.wsgi/passenger_wsgi.py.real",
+					uidFor(testConfig["normal_user_1"].asString()),
+					(gid_t) -1);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(userNameForUid(uid), testConfig["normal_user_2"].asString());
+			}
+
+			TEST_METHOD(49) {
+				// If 'group' is given, it changes group to the given group name.
+				SETUP_USER_SWITCHING_TEST(
+					options.group = testConfig["normal_group_1"].asCString();
+				);
+				lchown("tmp.wsgi/passenger_wsgi.py",
+					uidFor(testConfig["normal_user_1"].asString()),
+					(gid_t) -1);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString());
+			}
+
+			TEST_METHOD(50) {
+				// If 'group' is set to the root group, it changes group to defaultGroup.
+				string rootGroup = groupNameForGid(0);
+				SETUP_USER_SWITCHING_TEST(
+					options.group = rootGroup;
+				);
+				lchown("tmp.wsgi/passenger_wsgi.py",
+					uidFor(testConfig["normal_user_1"].asString()),
+					(gid_t) -1);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(groupNameForGid(gid), testConfig["default_group"].asString());
+			}
+
+			// and 'group' is set to '!STARTUP_FILE!'
+				TEST_METHOD(51) {
+					// It changes the group to the startup file's group.
+					SETUP_USER_SWITCHING_TEST(
+						options.group = "!STARTUP_FILE!";
+					);
+					lchown("tmp.wsgi/passenger_wsgi.py",
+						(uid_t) -1,
+						gidFor(testConfig["normal_group_1"].asString()));
+					RUN_USER_SWITCHING_TEST();
+					ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString());
+				}
+
+				TEST_METHOD(52) {
+					// If the startup file is a symlink, then it uses the symlink's
+					// group, not the target's group.
+					SETUP_USER_SWITCHING_TEST(
+						options.group = "!STARTUP_FILE!";
+					);
+					lchown("tmp.wsgi/passenger_wsgi.py",
+						(uid_t) -1,
+						gidFor(testConfig["normal_group_2"].asString()));
+					chown("tmp.wsgi/passenger_wsgi.py.real",
+						(uid_t) -1,
+						gidFor(testConfig["normal_group_1"].asString()));
+					RUN_USER_SWITCHING_TEST();
+					ensure_equals(groupNameForGid(gid), testConfig["normal_group_2"].asString());
+				}
+
+			TEST_METHOD(53) {
+				// If 'group' is not given, it changes the group to the startup file's owner's primary group.
+				SETUP_USER_SWITCHING_TEST(
+					(void) 0;
+				);
+				lchown("tmp.wsgi/passenger_wsgi.py",
+					uidFor(testConfig["normal_user_1"].asString()),
+					(gid_t) -1);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(groupNameForGid(gid),
+					primaryGroupFor(testConfig["normal_user_1"].asString()));
+			}
+
+		// and the startup file's owner doesn't exist
+			TEST_METHOD(57) {
+				// It changes the user to the value of defaultUser.
+				SETUP_USER_SWITCHING_TEST(
+					(void) 0;
+				);
+				lchown("tmp.wsgi/passenger_wsgi.py",
+					(uid_t) testConfig["nonexistant_uid"].asInt64(),
+					(gid_t) -1);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(userNameForUid(uid), testConfig["default_user"].asString());
+			}
+
+			TEST_METHOD(58) {
+				// If 'group' is given, it changes group to the given group name.
+				SETUP_USER_SWITCHING_TEST(
+					options.group = testConfig["normal_group_1"].asCString();
+				);
+				lchown("tmp.wsgi/passenger_wsgi.py",
+					(uid_t) testConfig["nonexistant_uid"].asInt64(),
+					(gid_t) -1);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString());
+			}
+
+			TEST_METHOD(59) {
+				// If 'group' is set to the root group, it changes group to defaultGroup.
+				string rootGroup = groupNameForGid(0);
+				SETUP_USER_SWITCHING_TEST(
+					options.group = rootGroup;
+				);
+				lchown("tmp.wsgi/passenger_wsgi.py",
+					(uid_t) testConfig["nonexistant_uid"].asInt64(),
+					(gid_t) -1);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(groupNameForGid(gid), testConfig["default_group"].asString());
+			}
+
+			// and 'group' is set to '!STARTUP_FILE!'
+				// and the startup file's group doesn't exist
+					TEST_METHOD(60) {
+						// It changes the group to the value given by defaultGroup.
+						SETUP_USER_SWITCHING_TEST(
+							options.group = "!STARTUP_FILE!";
+						);
+						lchown("tmp.wsgi/passenger_wsgi.py",
+							(uid_t) testConfig["nonexistant_uid"].asInt64(),
+							(gid_t) testConfig["nonexistant_gid"].asInt64());
+						RUN_USER_SWITCHING_TEST();
+						ensure_equals(groupNameForGid(gid), testConfig["default_group"].asString());
+					}
+
+				// and the startup file's group exists
+					TEST_METHOD(61) {
+						// It changes the group to the startup file's group.
+						SETUP_USER_SWITCHING_TEST(
+							options.group = "!STARTUP_FILE!";
+						);
+						lchown("tmp.wsgi/passenger_wsgi.py",
+							(uid_t) testConfig["nonexistant_uid"].asInt64(),
+							gidFor(testConfig["normal_group_1"].asString()));
+						RUN_USER_SWITCHING_TEST();
+						ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString());
+					}
+
+					TEST_METHOD(62) {
+						// If the startup file is a symlink, then it uses the symlink's group, not the target's group.
+						SETUP_USER_SWITCHING_TEST(
+							options.group = "!STARTUP_FILE!";
+						);
+						lchown("tmp.wsgi/passenger_wsgi.py",
+							(uid_t) testConfig["nonexistant_uid"].asInt64(),
+							gidFor(testConfig["normal_group_2"].asString()));
+						chown("tmp.wsgi/passenger_wsgi.py.real",
+							(uid_t) -1,
+							gidFor(testConfig["normal_group_1"].asString()));
+						RUN_USER_SWITCHING_TEST();
+						ensure_equals(groupNameForGid(gid), testConfig["normal_group_2"].asString());
+					}
+
+			TEST_METHOD(63) {
+				// If 'group' is not given, it changes the group to defaultUser's primary group.
+				SETUP_USER_SWITCHING_TEST(
+					(void) 0;
+				);
+				lchown("tmp.wsgi/passenger_wsgi.py",
+					(uid_t) testConfig["nonexistant_uid"].asInt64(),
+					(gid_t) -1);
+				RUN_USER_SWITCHING_TEST();
+				ensure_equals(groupNameForGid(gid), primaryGroupFor(testConfig["default_user"].asString()));
+			}
+
+	TEST_METHOD(67) {
+		// It raises an error if it tries to lower to 'defaultUser',
+		// but that user doesn't exist.
+		SETUP_USER_SWITCHING_TEST(
+			options.user = "root";
+			options.defaultUser = testConfig["nonexistant_user"].asCString();
+		);
+		try {
+			RUN_USER_SWITCHING_TEST();
+			fail();
+		} catch (const RuntimeException &e) {
+			ensure(containsSubstring(e.what(), "Cannot determine a user to lower privilege to"));
+		}
+	}
+
+	TEST_METHOD(68) {
+		// It raises an error if it tries to lower to 'default_group',
+		// but that group doesn't exist.
+		SETUP_USER_SWITCHING_TEST(
+			options.user = testConfig["normal_user_1"].asCString();
+			options.group = groupNameForGid(0);
+			options.defaultGroup = testConfig["nonexistant_group"].asCString();
+		);
+		try {
+			RUN_USER_SWITCHING_TEST();
+			fail();
+		} catch (const RuntimeException &e) {
+			ensure(containsSubstring(e.what(), "Cannot determine a group to lower privilege to"));
+		}
+	}
+
+	TEST_METHOD(69) {
+		// Changes supplementary groups to the owner's default supplementary groups.
+		SETUP_USER_SWITCHING_TEST(
+			options.user = testConfig["normal_user_1"].asCString();
+		);
+		RUN_USER_SWITCHING_TEST();
+		runShellCommand(("groups " + testConfig["normal_user_1"].asString() + " > /tmp/info2.txt").c_str());
+		string defaultGroups = strip(readAll("/tmp/info2.txt"));
+
+		// On Linux, the 'groups' output is prepended by the group name so
+		// get rid of that.
+		string::size_type pos = defaultGroups.find(':');
+		if (pos != string::npos) {
+			pos++;
+			while (pos < defaultGroups.size() && defaultGroups[pos] == ' ') {
+				pos++;
+			}
+			defaultGroups.erase(0, pos);
+		}
+		
+		ensure_equals(groups, defaultGroups);
+	}
diff --git a/test/cxx/ApplicationPool_PoolTest.cpp b/test/cxx/ApplicationPool_PoolTest.cpp
deleted file mode 100644
index 965bce4..0000000
--- a/test/cxx/ApplicationPool_PoolTest.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "TestSupport.h"
-#include "ApplicationPool/Pool.h"
-#include "Utils.h"
-
-using namespace Passenger;
-
-namespace tut {
-	struct ApplicationPool_PoolTest {
-		ServerInstanceDirPtr serverInstanceDir;
-		ServerInstanceDir::GenerationPtr generation;
-		ApplicationPool::Ptr pool, pool2;
-		
-		ApplicationPool_PoolTest() {
-			createServerInstanceDirAndGeneration(serverInstanceDir, generation);
-			pool = ptr(new ApplicationPool::Pool("../helper-scripts/passenger-spawn-server", generation));
-			pool2 = pool;
-		}
-		
-		ApplicationPool::Ptr newPoolConnection() {
-			return pool;
-		}
-		
-		void reinitializeWithSpawnManager(AbstractSpawnManagerPtr spawnManager) {
-			pool = ptr(new ApplicationPool::Pool(spawnManager));
-			pool2 = pool;
-		}
-	};
-
-	DEFINE_TEST_GROUP(ApplicationPool_PoolTest);
-
-	#define USE_TEMPLATE
-	#include "ApplicationPool_PoolTestCases.cpp"
-}
diff --git a/test/cxx/ApplicationPool_PoolTestCases.cpp b/test/cxx/ApplicationPool_PoolTestCases.cpp
deleted file mode 100644
index 5cdf168..0000000
--- a/test/cxx/ApplicationPool_PoolTestCases.cpp
+++ /dev/null
@@ -1,1029 +0,0 @@
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <cstring>
-#include <cstdlib>
-#include <cerrno>
-#include <sys/types.h>
-#include <signal.h>
-#include <utime.h>
-
-/**
- * This file is used as a template to test the different ApplicationPool::Interface implementations.
- * It is #included in ApplicationPool_PoolTest.cpp and ApplicationPool_Server_PoolTest.cpp
- */
-#ifdef USE_TEMPLATE
-	static void sendTestRequest(SessionPtr &session, const char *uri = "/foo/new") {
-		string headers;
-		#define ADD_HEADER(name, value) \
-			headers.append(name); \
-			headers.append(1, '\0'); \
-			headers.append(value); \
-			headers.append(1, '\0')
-		ADD_HEADER("HTTP_HOST", "www.test.com");
-		ADD_HEADER("QUERY_STRING", "");
-		ADD_HEADER("REQUEST_URI", uri);
-		ADD_HEADER("REQUEST_METHOD", "GET");
-		ADD_HEADER("REMOTE_ADDR", "localhost");
-		ADD_HEADER("SCRIPT_NAME", "");
-		ADD_HEADER("PATH_INFO", uri);
-		ADD_HEADER("PASSENGER_CONNECT_PASSWORD", session->getConnectPassword());
-		session->sendHeaders(headers);
-	}
-	
-	static SessionPtr spawnRackApp(ApplicationPool::Ptr pool, const char *appRoot) {
-		PoolOptions options;
-		options.appRoot = appRoot;
-		options.appType = "rack";
-		return pool->get(options);
-	}
-	
-	static SessionPtr spawnWsgiApp(ApplicationPool::Ptr pool, const char *appRoot) {
-		PoolOptions options;
-		options.appRoot = appRoot;
-		options.appType = "wsgi";
-		return pool->get(options);
-	}
-	
-	namespace {
-		class ReloadLoggingSpawnManager: public SpawnManager {
-		public:
-			vector<string> reloadLog;
-			
-			ReloadLoggingSpawnManager(const string &spawnServerCommand,
-				const ServerInstanceDir::GenerationPtr &generation,
-				const AccountsDatabasePtr &accountsDatabase = AccountsDatabasePtr(),
-				const string &rubyCommand = "ruby")
-			: SpawnManager(spawnServerCommand, generation, accountsDatabase, rubyCommand)
-			{ }
-			
-			virtual void reload(const string &appRoot) {
-				reloadLog.push_back(appRoot);
-				SpawnManager::reload(appRoot);
-			}
-		};
-		
-		struct SpawnRackAppFunction {
-			ApplicationPool::Ptr pool;
-			bool *done;
-			SessionPtr *session;
-			
-			SpawnRackAppFunction() {
-				done    = NULL;
-				session = NULL;
-			}
-
-			void operator()() {
-				PoolOptions options;
-				options.appRoot = "stub/rack";
-				options.appType = "rack";
-				options.useGlobalQueue = true;
-				SessionPtr session = pool->get(options);
-				*done = true;
-				if (this->session != NULL) {
-					*this->session = session;
-				}
-			}
-		};
-	}
-	
-	TEST_METHOD(1) {
-		// Calling ApplicationPool.get() once should return a valid Session.
-		SessionPtr session(spawnRackApp(pool, "stub/rack"));
-		sendTestRequest(session);
-		session->shutdownWriter();
-
-		int reader = session->getStream();
-		string result(readAll(reader));
-		session->closeStream();
-		ensure(result.find("hello <b>world</b>") != string::npos);
-	}
-	
-	TEST_METHOD(2) {
-		// Verify that the pool spawns a new app, and that
-		// after the session is closed, the app is kept around.
-		SessionPtr session(spawnRackApp(pool, "stub/rack"));
-		ensure_equals("Before the session was closed, the app was busy", pool->getActive(), 1u);
-		ensure_equals("Before the session was closed, the app was in the pool", pool->getCount(), 1u);
-		session.reset();
-		ensure_equals("After the session is closed, the app is no longer busy", pool->getActive(), 0u);
-		ensure_equals("After the session is closed, the app is kept around", pool->getCount(), 1u);
-	}
-	
-	TEST_METHOD(3) {
-		// If we call get() with an application root, then we close the session,
-		// and then we call get() again with the same app group name,
-		// then the pool should not have spawned more than 1 app in total.
-		SessionPtr session(spawnRackApp(pool, "stub/rack"));
-		session.reset();
-		session = spawnRackApp(pool, "stub/rack");
-		ensure_equals(pool->getCount(), 1u);
-	}
-	
-	TEST_METHOD(4) {
-		// If we call get() with an app group name, then we call get() again before closing
-		// the session, then the pool will eventually have spawned 2 apps in total.
-		SessionPtr session(spawnRackApp(pool, "stub/rack"));
-		SessionPtr session2(spawnRackApp(pool2, "stub/rack"));
-		EVENTUALLY(5,
-			result = pool->getCount() == 2u;
-		);
-	}
-	
-	TEST_METHOD(5) {
-		// If we call get() twice with different app group names,
-		// then the pool should spawn two different apps.
-		TempDirCopy c1("stub/rack", "rackapp1.tmp");
-		TempDirCopy c2("stub/rack", "rackapp2.tmp");
-		replaceStringInFile("rackapp2.tmp/config.ru", "world", "world 2");
-		SessionPtr session = spawnRackApp(pool, "rackapp1.tmp");
-		SessionPtr session2 = spawnRackApp(pool2, "rackapp2.tmp");
-		ensure_equals("Before the sessions were closed, both apps were busy", pool->getActive(), 2u);
-		ensure_equals("Before the sessions were closed, both apps were in the pool", pool->getCount(), 2u);
-		
-		sendTestRequest(session);
-		string result = readAll(session->getStream());
-		ensure("Session 1 belongs to the correct app", result.find("hello <b>world</b>") != string::npos);
-		session.reset();
-		
-		sendTestRequest(session2);
-		result = readAll(session2->getStream());
-		ensure("Session 2 belongs to the correct app", result.find("hello <b>world 2</b>") != string::npos);
-		session2.reset();
-	}
-	
-	TEST_METHOD(6) {
-		// If we call get() twice with different app group names,
-		// and we close both sessions, then both 2 apps should still
-		// be in the pool.
-		TempDirCopy c1("stub/rack", "rackapp1.tmp");
-		TempDirCopy c2("stub/rack", "rackapp2.tmp");
-		SessionPtr session(spawnRackApp(pool, "rackapp1.tmp"));
-		SessionPtr session2(spawnRackApp(pool, "rackapp2.tmp"));
-		session.reset();
-		session2.reset();
-		ensure_equals("There are 0 active apps", pool->getActive(), 0u);
-		ensure_equals("There are 2 apps in total", pool->getCount(), 2u);
-	}
-	
-	TEST_METHOD(7) {
-		// If we call get() even though the pool is already full
-		// (active == max), and the app group name is already
-		// in the pool, then the pool must wait until there's an
-		// inactive application.
-		pool->setMax(1);
-		// TODO: How do we test this?
-	}
-	
-	TEST_METHOD(8) {
-		// If ApplicationPool spawns a new instance,
-		// and we kill it, then the next get() with the
-		// same application root should not throw an exception:
-		// ApplicationPool should spawn a new instance
-		// after detecting that the original one died.
-		SessionPtr session = spawnRackApp(pool, "stub/rack");
-		kill(session->getPid(), SIGKILL);
-		session.reset();
-		usleep(20000); // Give the process some time to exit.
-		spawnRackApp(pool, "stub/rack"); // should not throw
-	}
-	
-	struct PoolWaitTestThread {
-		ApplicationPool::Ptr pool;
-		SessionPtr &m_session;
-		bool &m_done;
-		
-		PoolWaitTestThread(const ApplicationPool::Ptr &pool,
-			SessionPtr &session,
-			bool &done)
-		: m_session(session), m_done(done) {
-			this->pool = pool;
-			done = false;
-		}
-		
-		void operator()() {
-			m_session = spawnWsgiApp(pool, "stub/wsgi");
-			m_done = true;
-		}
-	};
-
-	TEST_METHOD(9) {
-		// If we call get() even though the pool is already full
-		// (active == max), and the app group name is *not* already
-		// in the pool, then the pool will wait until enough sessions
-		// have been closed.
-		
-		// Make the pool full.
-		pool->setMax(2);
-		SessionPtr session1 = spawnRackApp(pool, "stub/rack");
-		SessionPtr session2 = spawnRackApp(pool2, "stub/rack");
-		EVENTUALLY(5,
-			result = pool->getCount() == 2u;
-		);
-		session1.reset();
-		session2.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 0u;
-		);
-		session1 = spawnRackApp(pool, "stub/rack");
-		session2 = spawnRackApp(pool2, "stub/rack");
-		ensure_equals(pool->getActive(), 2u);
-		
-		// Now spawn an app with a different app root.
-		SessionPtr session3;
-		bool done;
-		TempThread thr(PoolWaitTestThread(pool2, session3, done));
-		usleep(500000);
-		ensure("ApplicationPool is still waiting", !done);
-		ensure_equals(pool->getActive(), 2u);
-		ensure_equals(pool->getCount(), 2u);
-		
-		// Now release one slot from the pool.
-		session1.reset();
-		
-		// Session 3 should eventually be opened.
-		EVENTUALLY(10,
-			result = done;
-		);
-		ensure_equals(pool->getActive(), 2u);
-		ensure_equals(pool->getCount(), 2u);
-	}
-	
-	TEST_METHOD(10) {
-		// If we call get(), and:
-		// * the pool is already full, but there are inactive apps
-		//   (active < count && count == max)
-		// and
-		// * the app group name for this get() is *not* already in the pool
-		// then the an inactive app should be killed in order to
-		// satisfy this get() command.
-		TempDirCopy c1("stub/rack", "rackapp1.tmp");
-		TempDirCopy c2("stub/rack", "rackapp2.tmp");
-		
-		// Make the pool full.
-		pool->setMax(2);
-		SessionPtr session1 = spawnRackApp(pool, "rackapp1.tmp");
-		SessionPtr session2 = spawnRackApp(pool2, "rackapp1.tmp");
-		EVENTUALLY(5,
-			result = pool->getCount() == 2u;
-		);
-		session1.reset();
-		session2.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 0u;
-		);
-		
-		// Now spawn a different app.
-		session1 = spawnRackApp(pool, "rackapp2.tmp");
-		ensure_equals(pool->getActive(), 1u);
-		ensure_equals(pool->getCount(), 2u);
-	}
-	
-	TEST_METHOD(11) {
-		// A Session should still be usable after the pool has been destroyed.
-		SessionPtr session = spawnRackApp(pool, "stub/rack");
-		pool->clear();
-		pool.reset();
-		pool2.reset();
-		
-		sendTestRequest(session);
-		session->shutdownWriter();
-		
-		int reader = session->getStream();
-		string result = readAll(reader);
-		session->closeStream();
-		ensure(result.find("hello <b>world</b>") != string::npos);
-	}
-	
-	TEST_METHOD(12) {
-		// If tmp/restart.txt didn't exist but has now been created,
-		// then the applications under app_root should be restarted.
-		struct stat buf;
-		TempDirCopy c("stub/rack", "rackapp.tmp");
-		SessionPtr session1 = spawnRackApp(pool, "rackapp.tmp");
-		SessionPtr session2 = spawnRackApp(pool2, "rackapp.tmp");
-		session1.reset();
-		session2.reset();
-		EVENTUALLY(5,
-			result = pool->getCount() == 2u;
-		);
-		
-		touchFile("rackapp.tmp/tmp/restart.txt");
-		spawnRackApp(pool, "rackapp.tmp");
-		
-		ensure_equals("No apps are active", pool->getActive(), 0u);
-		ensure_equals("Both apps are killed, and a new one was spawned",
-			pool->getCount(), 1u);
-		ensure("Restart file still exists",
-			stat("rackapp.tmp/tmp/restart.txt", &buf) == 0);
-	}
-	
-	TEST_METHOD(13) {
-		// If tmp/restart.txt was present, and its timestamp changed
-		// since the last check, then the applications under the app group name
-		// should still be restarted. However, a subsequent get()
-		// should not result in a restart.
-		pid_t old_pid;
-		TempDirCopy c("stub/rack", "rackapp.tmp");
-		TempDir d("rackapp.tmp/tmp/restart.txt");
-		SessionPtr session = spawnRackApp(pool, "rackapp.tmp");
-		old_pid = session->getPid();
-		session.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 0u;
-		);
-		
-		touchFile("rackapp.tmp/tmp/restart.txt", 10);
-		
-		session = spawnRackApp(pool, "rackapp.tmp");
-		ensure("The app was restarted", session->getPid() != old_pid);
-		old_pid = session->getPid();
-		session.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 0u;
-		);
-		
-		session = spawnRackApp(pool, "rackapp.tmp");
-		ensure_equals("The app was not restarted",
-			old_pid, session->getPid());
-	}
-	
-	TEST_METHOD(15) {
-		// Test whether restarting with restart.txt really results in code reload.
-		TempDirCopy c("stub/rack", "rackapp.tmp");
-		SessionPtr session = spawnRackApp(pool, "rackapp.tmp");
-		sendTestRequest(session);
-		string result = readAll(session->getStream());
-		ensure(result.find("hello <b>world</b>") != string::npos);
-		session.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 0u;
-		);
-		
-		touchFile("rackapp.tmp/tmp/restart.txt");
-		replaceStringInFile("rackapp.tmp/config.ru", "world", "world 2");
-		
-		session = spawnRackApp(pool, "rackapp.tmp");
-		sendTestRequest(session);
-		result = readAll(session->getStream());
-		ensure("App code has been reloaded", result.find("hello <b>world 2</b>") != string::npos);
-	}
-	
-	TEST_METHOD(16) {
-		// If tmp/always_restart.txt is present and is a file,
-		// then the application under app_root should be always restarted.
-		struct stat buf;
-		pid_t old_pid;
-		TempDirCopy c("stub/rack", "rackapp.tmp");
-		SessionPtr session1 = spawnRackApp(pool, "rackapp.tmp");
-		SessionPtr session2 = spawnRackApp(pool2, "rackapp.tmp");
-		session1.reset();
-		session2.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 0u && pool->getCount() == 2u;
-		);
-		
-		touchFile("rackapp.tmp/tmp/always_restart.txt");
-		
-		// This get() results in a restart.
-		session1 = spawnRackApp(pool, "rackapp.tmp");
-		old_pid = session1->getPid();
-		session1.reset();
-		EVENTUALLY(5,
-			// First restart: no apps are active
-			result = pool->getActive() == 0u;
-		);
-		ensure_equals("First restart: the first 2 apps were killed, and a new one was spawned",
-			pool->getCount(), 1u);
-		ensure("always_restart file has not been deleted",
-			stat("rackapp.tmp/tmp/always_restart.txt", &buf) == 0);
-		
-		// This get() results in a restart as well.
-		session1 = spawnRackApp(pool, "rackapp.tmp");
-		ensure(old_pid != session1->getPid());
-		session1.reset();
-		EVENTUALLY(5,
-			// Second restart: no apps are active
-			result = pool->getActive() == 0u;
-		);
-		ensure_equals("Second restart: the last app was killed, and a new one was spawned",
-			pool->getCount(), 1u);
-		ensure("always_restart file has not been deleted",
-			stat("rackapp.tmp/tmp/always_restart.txt", &buf) == 0);
-	}
-	
-	TEST_METHOD(17) {
-		// If tmp/always_restart.txt is present and is a directory,
-		// then the application under app_root should be always restarted.
-		struct stat buf;
-		pid_t old_pid;
-		TempDirCopy c("stub/rack", "rackapp.tmp");
-		SessionPtr session1 = spawnRackApp(pool, "rackapp.tmp");
-		SessionPtr session2 = spawnRackApp(pool2, "rackapp.tmp");
-		session1.reset();
-		session2.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 0u && pool->getCount() == 2u;
-		);
-		
-		TempDir d("rackapp.tmp/tmp/always_restart.txt");
-		
-		// This get() results in a restart.
-		session1 = spawnRackApp(pool, "rackapp.tmp");
-		old_pid = session1->getPid();
-		session1.reset();
-		EVENTUALLY(5,
-			// First restart: no apps are active
-			result = pool->getActive() == 0u;
-		);
-		ensure_equals("First restart: the first 2 apps were killed, and a new one was spawned",
-			pool->getCount(), 1u);
-		ensure("always_restart directory has not been deleted",
-			stat("rackapp.tmp/tmp/always_restart.txt", &buf) == 0);
-		
-		// This get() results in a restart as well.
-		session1 = spawnRackApp(pool, "rackapp.tmp");
-		ensure(old_pid != session1->getPid());
-		session1.reset();
-		EVENTUALLY(5,
-			// Second restart: no apps are active
-			result = pool->getActive() == 0u;
-		);
-		ensure_equals("Second restart: the last app was killed, and a new one was spawned",
-			pool->getCount(), 1u);
-		ensure("always_restart directory has not been deleted",
-			stat("rackapp.tmp/tmp/always_restart.txt", &buf) == 0);
-	}
-	
-	TEST_METHOD(18) {
-		// Test whether restarting with tmp/always_restart.txt really results in code reload.
-		TempDirCopy c("stub/rack", "rackapp.tmp");
-		SessionPtr session = spawnRackApp(pool, "rackapp.tmp");
-		sendTestRequest(session);
-		string result = readAll(session->getStream());
-		ensure(result.find("hello <b>world</b>") != string::npos);
-		session.reset();
-
-		touchFile("rackapp.tmp/tmp/always_restart.txt");
-		replaceStringInFile("rackapp.tmp/config.ru", "world", "world 2");
-		
-		session = spawnRackApp(pool, "rackapp.tmp");
-		sendTestRequest(session);
-		result = readAll(session->getStream());
-		ensure("App code has been reloaded (1)", result.find("hello <b>world 2</b>") != string::npos);
-		session.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 0u;
-		);
-		
-		replaceStringInFile("rackapp.tmp/config.ru", "world 2", "world 3");
-		session = spawnRackApp(pool, "rackapp.tmp");
-		sendTestRequest(session);
-		result = readAll(session->getStream());
-		ensure("App code has been reloaded (2)", result.find("hello <b>world 3</b>") != string::npos);
-		session.reset();
-	}
-	
-	TEST_METHOD(19) {
-		// If tmp/restart.txt and tmp/always_restart.txt are present, 
-		// the application under app_root should still be restarted and
-		// both files must be kept.
-		pid_t old_pid, pid;
-		struct stat buf;
-		TempDirCopy c("stub/rack", "rackapp.tmp");
-		SessionPtr session1 = spawnRackApp(pool, "rackapp.tmp");
-		SessionPtr session2 = spawnRackApp(pool2, "rackapp.tmp");
-		session1.reset();
-		session2.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 0u && pool->getCount() == 2u;
-		);
-		
-		touchFile("rackapp.tmp/tmp/restart.txt");
-		touchFile("rackapp.tmp/tmp/always_restart.txt");
-		
-		old_pid = spawnRackApp(pool, "rackapp.tmp")->getPid();
-		ensure("always_restart.txt file has not been deleted",
-			stat("rackapp.tmp/tmp/always_restart.txt", &buf) == 0);
-		ensure("restart.txt file has not been deleted",
-			stat("rackapp.tmp/tmp/restart.txt", &buf) == 0);
-		EVENTUALLY(5,
-			result = pool->getActive() == 0u;
-		);
-		
-		pid = spawnRackApp(pool, "rackapp.tmp")->getPid();
-		ensure("The app was restarted", pid != old_pid);
-	}
-	
-	TEST_METHOD(20) {
-		// It should look for restart.txt in the directory given by
-		// the restartDir option, if available.
-		struct stat buf;
-		char path[1024];
-		PoolOptions options("stub/rack");
-		options.appType = "rack";
-		options.restartDir = string(getcwd(path, sizeof(path))) + "/stub/rack";
-		
-		SessionPtr session1 = pool->get(options);
-		SessionPtr session2 = pool2->get(options);
-		session1.reset();
-		session2.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 0u && pool->getCount() == 2u;
-		);
-		
-		DeleteFileEventually f("stub/rack/restart.txt");
-		touchFile("stub/rack/restart.txt");
-		
-		pool->get(options);
-		
-		ensure_equals("No apps are active", pool->getActive(), 0u);
-		ensure_equals("Both apps are killed, and a new one was spawned",
-			pool->getCount(), 1u);
-		ensure("Restart file still exists",
-			stat("stub/rack/restart.txt", &buf) == 0);
-	}
-	
-	TEST_METHOD(21) {
-		// restartDir may also be a directory relative to the
-		// application root.
-		struct stat buf;
-		PoolOptions options("stub/rack");
-		options.appType = "rack";
-		options.restartDir = "public";
-		
-		SessionPtr session1 = pool->get(options);
-		SessionPtr session2 = pool2->get(options);
-		session1.reset();
-		session2.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 0u && pool->getCount() == 2u;
-		);
-		
-		DeleteFileEventually f("stub/rack/public/restart.txt");
-		touchFile("stub/rack/public/restart.txt");
-		
-		pool->get(options);
-		
-		ensure_equals("No apps are active", pool->getActive(), 0u);
-		ensure_equals("Both apps are killed, and a new one was spawned",
-			pool->getCount(), 1u);
-		ensure("Restart file still exists",
-			stat("stub/rack/public/restart.txt", &buf) == 0);
-	}
-	
-	TEST_METHOD(22) {
-		// The cleaner thread should clean idle applications.
-		pool->setMaxIdleTime(1);
-		spawnRackApp(pool, "stub/rack");
-		EVENTUALLY(10,
-			result = pool->getCount() == 0u;
-		);
-		
-		time_t begin = time(NULL);
-		while (pool->getCount() == 1u && time(NULL) - begin < 10) {
-			usleep(100000);
-		}
-		ensure_equals("App should have been cleaned up", pool->getCount(), 0u);
-	}
-	
-	TEST_METHOD(23) {
-		// MaxPerApp is respected.
-		pool->setMax(3);
-		pool->setMaxPerApp(1);
-		
-		// We connect to stub/rack while it already has an instance with
-		// 1 request in its queue. Assert that the pool doesn't spawn
-		// another instance.
-		SessionPtr session1 = spawnRackApp(pool, "stub/rack");
-		SessionPtr session2 = spawnRackApp(pool2, "stub/rack");
-		
-		// We connect to stub/wsgi. Assert that the pool spawns a new
-		// instance for this app.
-		TempDirCopy c("stub/wsgi", "wsgiapp.tmp");
-		ApplicationPool::Ptr pool3 = newPoolConnection();
-		SessionPtr session3 = spawnWsgiApp(pool3, "wsgiapp.tmp");
-		ensure_equals(pool->getCount(), 2u);
-	}
-	
-	TEST_METHOD(24) {
-		// Application instance is shutdown after 'maxRequests' requests.
-		PoolOptions options("stub/rack");
-		int reader;
-		pid_t originalPid;
-		SessionPtr session;
-		
-		options.appType = "rack";
-		options.maxRequests = 4;
-		pool->setMax(1);
-		session = pool->get(options);
-		originalPid = session->getPid();
-		session.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 0u;
-		);
-		
-		for (unsigned int i = 0; i < 4; i++) {
-			session = pool->get(options);
-			sendTestRequest(session);
-			session->shutdownWriter();
-			reader = session->getStream();
-			readAll(reader);
-			// Must explicitly call reset() here because we
-			// want to close the session right now.
-			session.reset();
-			EVENTUALLY(5,
-				result = pool->getActive() == 0u;
-			);
-		}
-		
-		session = pool->get(options);
-		ensure(session->getPid() != originalPid);
-	}
-	
-	TEST_METHOD(25) {
-		// If global queueing mode is enabled, then get() waits until
-		// there's at least one idle backend process for this application
-		// domain.
-		pool->setMax(1);
-		
-		PoolOptions options;
-		options.appRoot = "stub/rack";
-		options.appType = "rack";
-		options.useGlobalQueue = true;
-		SessionPtr session = pool->get(options);
-		
-		bool done = false;
-		SpawnRackAppFunction func;
-		func.pool = pool2;
-		func.done = &done;
-		TempThread thr(func);
-		
-		// Previous session hasn't been closed yet, so pool should still
-		// be waiting.
-		usleep(100000);
-		ensure("(1)", !done);
-		ensure_equals("(2)", pool->getGlobalQueueSize(), 1u);
-		ensure_equals("(3)", pool->getActive(), 1u);
-		ensure_equals("(4)", pool->getCount(), 1u);
-		
-		// Close the previous session. The thread should now finish.
-		session.reset();
-		EVENTUALLY(5,
-			result = done;
-		);
-	}
-	
-	TEST_METHOD(26) {
-		// When a previous application group spinned down, and we touched
-		// restart.txt and try to spin up a new process for this domain,
-		// then any ApplicationSpawner/FrameworkSpawner processes should be
-		// killed first.
-		SessionPtr session;
-		TempDirCopy c1("stub/rack", "rackapp1.tmp");
-		TempDirCopy c2("stub/rack", "rackapp2.tmp");
-		shared_ptr<ReloadLoggingSpawnManager> spawnManager(
-			new ReloadLoggingSpawnManager("../helper-scripts/passenger-spawn-server", generation)
-		);
-		reinitializeWithSpawnManager(spawnManager);
-		
-		pool->setMax(1);
-		session = spawnRackApp(pool, "rackapp1.tmp");
-		session.reset();
-		session = spawnRackApp(pool, "rackapp2.tmp");
-		ensure_equals("rackapp2.tmp is not reloaded because restart.txt is not touched",
-			spawnManager->reloadLog.size(), 0u);
-		session.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 0u;
-		);
-		
-		touchFile("rackapp1.tmp/tmp/restart.txt");
-		session = spawnRackApp(pool, "rackapp1.tmp");
-		ensure_equals("rackapp1.tmp is reloaded because restart.txt is touched (1)",
-			spawnManager->reloadLog.size(), 1u);
-		ensure_equals("rackapp1.tmp is reloaded because restart.txt is touched (2)",
-			spawnManager->reloadLog[0], "rackapp1.tmp");
-	}
-	
-	TEST_METHOD(27) {
-		// Test inspect()
-		SessionPtr session1 = spawnRackApp(pool, "stub/rack");
-		string str = pool->inspect();
-		ensure("Contains 'max = '", str.find("max ") != string::npos);
-		ensure("Contains PID", str.find("PID: " + toString(session1->getPid())) != string::npos);
-	}
-	
-	TEST_METHOD(28) {
-		// Test toXml(true)
-		SessionPtr session1 = spawnRackApp(pool, "stub/rack");
-		string xml = pool->toXml();
-		ensure("Contains <process>", xml.find("<process>") != string::npos);
-		ensure("Contains PID", xml.find("<pid>" + toString(session1->getPid()) + "</pid>") != string::npos);
-		ensure("Contains sensitive information", xml.find("<server_sockets>") != string::npos);
-	}
-	
-	TEST_METHOD(29) {
-		// Test toXml(false)
-		SessionPtr session1 = spawnRackApp(pool, "stub/rack");
-		string xml = pool->toXml(false);
-		ensure("Contains <process>", xml.find("<process>") != string::npos);
-		ensure("Contains PID", xml.find("<pid>" + toString(session1->getPid()) + "</pid>") != string::npos);
-		ensure("Does not contain sensitive information", xml.find("<server_sockets>") == string::npos);
-	}
-	
-	TEST_METHOD(30) {
-		// Test detach().
-		
-		// Create 2 processes, where only the first one is active.
-		SessionPtr session1 = spawnRackApp(pool, "stub/rack");
-		SessionPtr session2 = spawnRackApp(pool2, "stub/rack");
-		session2.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 1u && pool->getCount() == 2u;
-		);
-		
-		// Make sure session2 refers to a different process than session1.
-		session2 = spawnRackApp(pool2, "stub/rack");
-		string session2dk = session2->getDetachKey();
-		session2.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 1u;
-		);
-		
-		// First detach works. It was active so the 'active' property
-		// is decremented.
-		ensure("(10)", pool->detach(session1->getDetachKey()));
-		ensure_equals("(11)", pool->getActive(), 0u);
-		ensure_equals("(12)", pool->getCount(), 1u);
-		
-		// Second detach with the same identifier doesn't do anything.
-		ensure("(20)", !pool->detach(session1->getDetachKey()));
-		ensure_equals("(21)", pool->getActive(), 0u);
-		ensure_equals("(22)", pool->getCount(), 1u);
-		
-		// Detaching an inactive process works too.
-		ensure("(30)", pool->detach(session2dk));
-		ensure_equals("(31)", pool->getActive(), 0u);
-		ensure_equals("(32)", pool->getCount(), 0u);
-	}
-	
-	TEST_METHOD(31) {
-		// If the app group does not yet exist, and options.minProcesses > 0,
-		// then get() will spawn 1 process immediately, return its session,
-		// and spawn more processes in the background until options.minProcesses
-		// is satisfied.
-		TempDirCopy c1("stub/rack", "rackapp.tmp");
-		PoolOptions options;
-		options.appRoot = "rackapp.tmp";
-		options.appType = "rack";
-		options.minProcesses = 3;
-		options.spawnMethod = "conservative";
-		
-		writeFile("rackapp.tmp/config.ru",
-			"sleep 0.1\n"
-			"run lambda {}\n");
-		
-		SessionPtr session1 = pool->get(options);
-		ensure_equals(pool->getActive(), 1u);
-		ensure_equals(pool->getCount(), 1u);
-		
-		EVENTUALLY(5,
-			result = pool->getCount() == 3u;
-		);
-	}
-	
-	TEST_METHOD(32) {
-		// If the app group already exists, all processes are active,
-		// count < max, options.minProcesses > 0 and global queuing turned off,
-		// then get() will check out an existing process immediately
-		// and spawn new ones in the background until options.minProcesses
-		// is satisfied.
-		TempDirCopy c1("stub/rack", "rackapp.tmp");
-		PoolOptions options;
-		options.appRoot = "rackapp.tmp";
-		options.appType = "rack";
-		options.spawnMethod = "conservative";
-		options.minProcesses = 3;
-		pool->setMax(3);
-		
-		// Spawn a single process.
-		SessionPtr session1 = pool->get(options);
-		ensure_equals(pool->getActive(), 1u);
-		ensure_equals(pool->getCount(), 1u);
-		
-		writeFile("rackapp.tmp/config.ru",
-			"sleep 0.1\n"
-			"run lambda {}\n");
-		
-		// Now call get(); this one will use the previous process
-		// and spawn a new one in the background.
-		SessionPtr session2 = pool2->get(options);
-		ensure_equals(pool->getActive(), 1u);
-		ensure_equals(pool->getCount(), 1u);
-		ensure_equals(session1->getPid(), session2->getPid());
-		
-		EVENTUALLY(5,
-			result = pool->getCount() == 3u;
-		);
-	}
-	
-	/* If the app group already exists, all processes are active,
-	 * count < max, options.minProcesses > 0 and global queuing turned on,
-	 * then get() will wait until either
-	 * (1) an existing process becomes inactive.
-	 * or until
-	 * (2) a new process has been spawned.
-	 */
-	
-	TEST_METHOD(33) {
-		// Here we test scenario (1).
-		PoolOptions options;
-		options.appRoot = "stub/rack";
-		options.appType = "rack";
-		options.minProcesses = 3;
-		options.useGlobalQueue = true;
-		pool->setMax(3);
-		
-		ApplicationPool::Ptr pool3 = newPoolConnection();
-		ApplicationPool::Ptr pool4 = newPoolConnection();
-		
-		// Spawn 3 processes.
-		SessionPtr session1 = pool->get(options);
-		SessionPtr session2 = pool2->get(options);
-		session2.reset();
-		EVENTUALLY(5,
-			result = pool->getCount() == 3u;
-		);
-		
-		// Make sure all of them are active.
-		session2 = pool2->get(options);
-		SessionPtr session3 = pool3->get(options);
-		ensure_equals(pool->getActive(), 3u);
-		ensure_equals(pool->getCount(), 3u);
-		
-		// Now call get() in a thread.
-		SpawnRackAppFunction func;
-		bool done = false;
-		func.pool = pool4;
-		func.done = &done;
-		TempThread thr(func);
-		
-		usleep(20000);
-		ensure("Still waiting on global queue", !done);
-		ensure_equals(pool->getGlobalQueueSize(), 1u);
-		
-		// Make 1 process available.
-		session1.reset();
-		EVENTUALLY(5,
-			result = done;
-		);
-	}
-	
-	TEST_METHOD(34) {
-		// Here we test scenario (2).
-		PoolOptions options;
-		options.appRoot = "stub/rack";
-		options.appType = "rack";
-		options.minProcesses = 3;
-		options.useGlobalQueue = true;
-		pool->setMax(3);
-		
-		ApplicationPool::Ptr pool3 = newPoolConnection();
-		ApplicationPool::Ptr pool4 = newPoolConnection();
-		ApplicationPool::Ptr pool5 = newPoolConnection();
-		
-		// Spawn 3 processes.
-		SessionPtr session1 = pool->get(options);
-		SessionPtr session2 = pool2->get(options);
-		session2.reset();
-		EVENTUALLY(5,
-			result = pool->getCount() == 3u;
-		);
-		
-		// Make sure all of them are active.
-		session2 = pool2->get(options);
-		SessionPtr session3 = pool3->get(options);
-		ensure_equals(pool->getActive(), 3u);
-		ensure_equals(pool->getCount(), 3u);
-		
-		// Now call get() in a thread.
-		SpawnRackAppFunction func1;
-		SessionPtr session4;
-		bool done1 = false;
-		func1.pool = pool4;
-		func1.done = &done1;
-		func1.session = &session4;
-		TempThread thr1(func1);
-		
-		// And again.
-		SpawnRackAppFunction func2;
-		SessionPtr session5;
-		bool done2 = false;
-		func2.pool = pool5;
-		func2.done = &done2;
-		func2.session = &session5;
-		TempThread thr2(func2);
-		
-		// We should now arrive at a state where there are 3 processes, all
-		// busy, and 2 threads waiting on the global queue.
-		usleep(20000);
-		ensure("Still waiting on global queue", !done1 && !done2);
-		ensure_equals(pool->getGlobalQueueSize(), 2u);
-		
-		// Increasing the max will cause one of the threads to wake
-		// up, start a spawn action in the background, and go to sleep
-		// again. Eventually the new process will be done spawning,
-		// causing one of the threads to wake up. The other one will
-		// continue to wait.
-		pool->setMax(4);
-		EVENTUALLY(5,
-			result = (done1 && !done2) || (!done1 && done2);
-		);
-	}
-	
-	TEST_METHOD(35) {
-		// When spawning an app in the background, if it encountered an error
-		// it will remove the whole app group.
-		TempDirCopy c1("stub/rack", "rackapp.tmp");
-		PoolOptions options;
-		options.appRoot = "rackapp.tmp";
-		options.appType = "rack";
-		options.spawnMethod = "conservative";
-		options.printExceptions = false;
-		
-		SessionPtr session1 = pool->get(options);
-		
-		writeFile("rackapp.tmp/config.ru",
-			"raise 'foo'\n");
-		pool2->get(options);
-		
-		EVENTUALLY(5,
-			result = pool->getCount() == 0u;
-		);
-	}
-	
-	TEST_METHOD(36) {
-		// When cleaning, at least options.minProcesses processes should be kept around.
-		pool->setMaxIdleTime(0);
-		ApplicationPool::Ptr pool3 = newPoolConnection();
-		PoolOptions options;
-		options.appRoot = "stub/rack";
-		options.appType = "rack";
-		options.minProcesses = 2;
-		
-		// Spawn 2 processes.
-		SessionPtr session1 = pool->get(options);
-		SessionPtr session2 = pool2->get(options);
-		session1.reset();
-		session2.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 0u && pool->getCount() == 2u;
-		);
-		
-		// Spawn another process, so we get 3.
-		session1 = pool->get(options);
-		session2 = pool2->get(options);
-		SessionPtr session3 = pool3->get(options);
-		session3.reset();
-		EVENTUALLY(5,
-			result = pool->getActive() == 2u && pool->getCount() == 3u;
-		);
-		
-		// Now wait until one process is idle cleaned.
-		pool->setMaxIdleTime(1);
-		EVENTUALLY(10,
-			result = pool->getCount() == 2u;
-		);
-	}
-	
-	TEST_METHOD(37) {
-		// Test whether processes are grouped together by appGroupName.
-		TempDirCopy c1("stub/rack", "rackapp.tmp");
-		PoolOptions options1;
-		options1.appRoot = "rackapp.tmp";
-		options1.appType = "rack";
-		options1.appGroupName = "group A";
-		SessionPtr session1 = pool->get(options1);
-		
-		TempDirCopy c2("stub/rack", "rackapp2.tmp");
-		PoolOptions options2;
-		options2.appRoot = "rackapp2.tmp";
-		options2.appType = "rack";
-		options2.appGroupName = "group A";
-		SessionPtr session2 = pool2->get(options2);
-		
-		session1.reset();
-		session2.reset();
-		EVENTUALLY(5,
-			result = pool->getCount() == 2u;
-		);
-		
-		touchFile("rackapp.tmp/tmp/restart.txt");
-		session1 = pool->get(options1);
-		ensure_equals(pool->getCount(), 1u);
-	}
-	
-	/*************************************/
-	
-#endif /* USE_TEMPLATE */
diff --git a/test/cxx/ApplicationPool_ServerTest.cpp b/test/cxx/ApplicationPool_ServerTest.cpp
deleted file mode 100644
index 3c09cf6..0000000
--- a/test/cxx/ApplicationPool_ServerTest.cpp
+++ /dev/null
@@ -1,308 +0,0 @@
-#include "TestSupport.h"
-
-#include <boost/bind.hpp>
-
-#include "ApplicationPool/Pool.h"
-#include "ApplicationPool/Server.h"
-#include "ApplicationPool/Client.h"
-#include "Utils.h"
-#include <string>
-#include <cstring>
-#include <unistd.h>
-#include <errno.h>
-
-using namespace Passenger;
-using namespace Passenger::ApplicationPool;
-using namespace boost;
-using namespace std;
-
-namespace tut {
-	struct ApplicationPool_ServerTest {
-		ServerInstanceDirPtr serverInstanceDir;
-		ServerInstanceDir::GenerationPtr generation;
-		string socketFilename;
-		AccountsDatabasePtr accountsDatabase;
-		AccountPtr clientAccount;
-		shared_ptr<MessageServer> messageServer;
-		shared_ptr<Pool> realPool;
-		shared_ptr<Server> poolServer;
-		shared_ptr<Client> pool, pool2;
-		shared_ptr<oxt::thread> serverThread;
-		
-		~ApplicationPool_ServerTest() {
-			if (serverThread != NULL) {
-				serverThread->interrupt_and_join();
-			}
-		}
-		
-		void initializePool() {
-			createServerInstanceDirAndGeneration(serverInstanceDir, generation);
-			socketFilename = generation->getPath() + "/socket";
-			accountsDatabase = ptr(new AccountsDatabase());
-			clientAccount = accountsDatabase->add("test", "12345", false);
-			
-			messageServer = ptr(new MessageServer(socketFilename, accountsDatabase));
-			realPool      = ptr(new Pool("../helper-scripts/passenger-spawn-server", generation));
-			poolServer    = ptr(new Server(realPool));
-			messageServer->addHandler(poolServer);
-			serverThread = ptr(new oxt::thread(
-				boost::bind(&MessageServer::mainLoop, messageServer.get())
-			));
-			pool     = ptr(new Client());
-			pool2    = ptr(new Client());
-			pool->connect(socketFilename, "test", "12345");
-			pool2->connect(socketFilename, "test", "12345");
-		}
-		
-		SessionPtr spawnRackApp() {
-			PoolOptions options("stub/rack");
-			options.appType = "rack";
-			return pool->get(options);
-		}
-		
-		
-		/* A StringListCreator which not only returns a dummy value, but also
-		 * increments a counter each time getItems() is called. */
-		class DummyStringListCreator: public StringListCreator {
-		public:
-			mutable int counter;
-
-			DummyStringListCreator() {
-				counter = 0;
-			}
-
-			virtual const StringListPtr getItems() const {
-				StringListPtr result = ptr(new StringList());
-				counter++;
-				result->push_back("hello");
-				result->push_back("world");
-				return result;
-			}
-		};
-		
-		class SlowClient: public Client {
-		private:
-			unsigned int timeToSendUsername;
-			unsigned int timeToSendPassword;
-			
-		protected:
-			virtual void sendUsername(MessageChannel &channel, const string &username) {
-				if (timeToSendUsername > 0) {
-					usleep(timeToSendUsername * 1000);
-				}
-				channel.writeScalar(username);
-			}
-
-			virtual void sendPassword(MessageChannel &channel, const StaticString &userSuppliedPassword) {
-				if (timeToSendPassword > 0) {
-					usleep(timeToSendPassword * 1000);
-				}
-				channel.writeScalar(userSuppliedPassword.c_str(), userSuppliedPassword.size());
-			}
-			
-		public:
-			SlowClient(unsigned int timeToSendUsername,
-			           unsigned int timeToSendPassword)
-			         : Client()
-			{
-				this->timeToSendUsername = timeToSendUsername;
-				this->timeToSendPassword = timeToSendPassword;
-			}
-		};
-	};
-
-	DEFINE_TEST_GROUP(ApplicationPool_ServerTest);
-	
-	TEST_METHOD(1) {
-		// When calling get() with a PoolOptions object,
-		// options.environmentVariables->getItems() isn't called unless
-		// the pool had to spawn something.
-		initializePool();
-		
-		shared_ptr<DummyStringListCreator> strList = ptr(new DummyStringListCreator());
-		PoolOptions options("stub/rack");
-		options.appType = "rack";
-		options.environmentVariables = strList;
-		
-		SessionPtr session1 = pool->get(options);
-		session1.reset();
-		ensure_equals("(1)", strList->counter, 1);
-		
-		session1 = pool->get(options);
-		session1.reset();
-		ensure_equals("(2)", strList->counter, 1);
-	}
-	
-	TEST_METHOD(5) {
-		// get() requires GET rights.
-		initializePool();
-		
-		try {
-			clientAccount->setRights(Account::SET_PARAMETERS);
-			spawnRackApp();
-			fail("SecurityException expected");
-		} catch (const SecurityException &e) {
-			// Pass.
-		}
-		
-		clientAccount->setRights(Account::GET);
-		spawnRackApp(); // Should not throw SecurityException now.
-	}
-	
-	TEST_METHOD(6) {
-		// clear() requires CLEAR rights.
-		initializePool();
-		
-		try {
-			clientAccount->setRights(Account::SET_PARAMETERS);
-			pool->clear();
-			fail("SecurityException expected");
-		} catch (const SecurityException &e) {
-			// Pass.
-		}
-		
-		clientAccount->setRights(Account::CLEAR);
-		pool->clear(); // Should not throw SecurityException now.
-	}
-	
-	TEST_METHOD(7) {
-		// setMaxIdleTime() requires SET_PARAMETERS rights.
-		initializePool();
-		
-		try {
-			clientAccount->setRights(Account::GET_PARAMETERS);
-			pool->setMaxIdleTime(60);
-			fail("SecurityException expected");
-		} catch (const SecurityException &e) {
-			// Pass.
-		}
-		
-		clientAccount->setRights(Account::SET_PARAMETERS);
-		pool->setMaxIdleTime(60); // Should not throw SecurityException now.
-	}
-	
-	TEST_METHOD(8) {
-		// setMax() requires SET_PARAMETERS rights.
-		initializePool();
-		
-		try {
-			clientAccount->setRights(Account::GET_PARAMETERS);
-			pool->setMax(60);
-			fail("SecurityException expected");
-		} catch (const SecurityException &e) {
-			// Pass.
-		}
-		
-		clientAccount->setRights(Account::SET_PARAMETERS);
-		pool->setMax(60); // Should not throw SecurityException now.
-	}
-	
-	TEST_METHOD(9) {
-		// getActive() requires GET_PARAMETERS rights.
-		initializePool();
-		
-		try {
-			clientAccount->setRights(Account::SET_PARAMETERS);
-			pool->getActive();
-			fail("SecurityException expected");
-		} catch (const SecurityException &e) {
-			// Pass.
-		}
-		
-		clientAccount->setRights(Account::GET_PARAMETERS);
-		pool->getActive(); // Should not throw SecurityException now.
-	}
-	
-	TEST_METHOD(10) {
-		// getCount() requires GET_PARAMETERS rights.
-		initializePool();
-		
-		try {
-			clientAccount->setRights(Account::SET_PARAMETERS);
-			pool->getCount();
-			fail("SecurityException expected");
-		} catch (const SecurityException &e) {
-			// Pass.
-		}
-		
-		clientAccount->setRights(Account::GET_PARAMETERS);
-		pool->getCount(); // Should not throw SecurityException now.
-	}
-	
-	TEST_METHOD(11) {
-		// setMaxPerApp() requires SET_PARAMETERS rights.
-		initializePool();
-		
-		try {
-			clientAccount->setRights(Account::GET_PARAMETERS);
-			pool->setMaxPerApp(2);
-			fail("SecurityException expected");
-		} catch (const SecurityException &e) {
-			// Pass.
-		}
-		
-		clientAccount->setRights(Account::SET_PARAMETERS);
-		pool->setMaxPerApp(2); // Should not throw SecurityException now.
-	}
-	
-	TEST_METHOD(12) {
-		// getSpawnServerPid() requires GET_PARAMETERS rights.
-		initializePool();
-		
-		try {
-			clientAccount->setRights(Account::SET_PARAMETERS);
-			pool->getSpawnServerPid();
-			fail("SecurityException expected");
-		} catch (const SecurityException &e) {
-			// Pass.
-		}
-		
-		clientAccount->setRights(Account::GET_PARAMETERS);
-		pool->getSpawnServerPid(); // Should not throw SecurityException now.
-	}
-	
-	TEST_METHOD(13) {
-		// inspect() requires INSPECT_BASIC_INFO rights.
-		initializePool();
-		
-		try {
-			clientAccount->setRights(Account::SET_PARAMETERS);
-			pool->inspect();
-			fail("SecurityException expected");
-		} catch (const SecurityException &e) {
-			// Pass.
-		}
-		
-		clientAccount->setRights(Account::INSPECT_BASIC_INFO);
-		pool->inspect(); // Should not throw SecurityException now.
-	}
-	
-	TEST_METHOD(14) {
-		// toXml() requires INSPECT_BASIC_INFO rights.
-		initializePool();
-		
-		try {
-			clientAccount->setRights(Account::SET_PARAMETERS);
-			pool->toXml();
-			fail("SecurityException expected");
-		} catch (const SecurityException &e) {
-			// Pass.
-		}
-		
-		clientAccount->setRights(Account::INSPECT_BASIC_INFO);
-		pool->toXml(); // Should not throw SecurityException now.
-	}
-	
-	TEST_METHOD(15) {
-		// toXml() only prints private information if the client has the INSPECT_SENSITIVE_INFO right.
-		initializePool();
-		PoolOptions options("stub/rack");
-		options.appType = "rack";
-		pool->get(options);
-		
-		clientAccount->setRights(Account::INSPECT_BASIC_INFO);
-		ensure("Does not contain private information", pool->toXml().find("<server_sockets>") == string::npos);
-		clientAccount->setRights(Account::INSPECT_BASIC_INFO | Account::INSPECT_SENSITIVE_INFO);
-		ensure("Contains private information", pool->toXml().find("<server_sockets>") != string::npos);
-	}
-}
diff --git a/test/cxx/ApplicationPool_Server_PoolTest.cpp b/test/cxx/ApplicationPool_Server_PoolTest.cpp
deleted file mode 100644
index d6219f9..0000000
--- a/test/cxx/ApplicationPool_Server_PoolTest.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-#include "TestSupport.h"
-
-#include <string>
-#include <boost/thread.hpp>
-#include <boost/shared_ptr.hpp>
-
-#include "ApplicationPool/Pool.h"
-#include "ApplicationPool/Server.h"
-#include "ApplicationPool/Client.h"
-#include "Utils.h"
-
-using namespace Passenger;
-using namespace std;
-using namespace boost;
-
-namespace tut {
-	struct ApplicationPool_Server_PoolTest {
-		ServerInstanceDirPtr serverInstanceDir;
-		ServerInstanceDir::GenerationPtr generation;
-		AccountsDatabasePtr accountsDatabase;
-		shared_ptr<MessageServer> messageServer;
-		shared_ptr<ApplicationPool::Pool> realPool;
-		shared_ptr<ApplicationPool::Server> poolServer;
-		shared_ptr<ApplicationPool::Client> pool, pool2;
-		shared_ptr<oxt::thread> serverThread;
-		string socketFilename;
-		
-		ApplicationPool_Server_PoolTest() {
-			createServerInstanceDirAndGeneration(serverInstanceDir, generation);
-			socketFilename = generation->getPath() + "/socket";
-			accountsDatabase = ptr(new AccountsDatabase());
-			accountsDatabase->add("test", "12345", false);
-			
-			messageServer = ptr(new MessageServer(socketFilename, accountsDatabase));
-			realPool      = ptr(new ApplicationPool::Pool("../helper-scripts/passenger-spawn-server", generation));
-			poolServer    = ptr(new ApplicationPool::Server(realPool));
-			messageServer->addHandler(poolServer);
-			serverThread = ptr(new oxt::thread(
-				boost::bind(&MessageServer::mainLoop, messageServer.get())
-			));
-			pool  = newPoolConnection();
-			pool2 = newPoolConnection();
-		}
-		
-		~ApplicationPool_Server_PoolTest() {
-			if (serverThread != NULL) {
-				serverThread->interrupt_and_join();
-			}
-		}
-		
-		void reinitializeWithSpawnManager(AbstractSpawnManagerPtr spawnManager) {
-			if (serverThread != NULL) {
-				serverThread->interrupt_and_join();
-			}
-			
-			messageServer.reset(); // Wait until the previous instance has removed the socket.
-			messageServer = ptr(new MessageServer(socketFilename, accountsDatabase));
-			realPool      = ptr(new ApplicationPool::Pool(spawnManager));
-			poolServer    = ptr(new ApplicationPool::Server(realPool));
-			messageServer->addHandler(poolServer);
-			serverThread = ptr(new oxt::thread(
-				boost::bind(&MessageServer::mainLoop, messageServer.get())
-			));
-			pool  = newPoolConnection();
-			pool2 = newPoolConnection();
-		}
-		
-		shared_ptr<ApplicationPool::Client> newPoolConnection() {
-			shared_ptr<ApplicationPool::Client> p(new ApplicationPool::Client());
-			p->connect(socketFilename, "test", "12345");
-			return p;
-		}
-	};
-	
-	DEFINE_TEST_GROUP(ApplicationPool_Server_PoolTest);
-	
-	#define USE_TEMPLATE
-	#include "ApplicationPool_PoolTestCases.cpp"
-}
-
diff --git a/test/cxx/BufferedIOTest.cpp b/test/cxx/BufferedIOTest.cpp
index 45676bd..e9cf363 100644
--- a/test/cxx/BufferedIOTest.cpp
+++ b/test/cxx/BufferedIOTest.cpp
@@ -123,14 +123,14 @@ namespace tut {
 		ensure_equals(io.readUntil(a_twoBytesRead), 2u);
 		ensure_equals(readData, "aa");
 		ensure("At least 18 msec elapsed", timer1.elapsed() >= 18);
-		ensure("At most 30 msec elapsed", timer1.elapsed() <= 30);
+		ensure("At most 90 msec elapsed", timer1.elapsed() <= 90);
 		
 		TempThread thr2(boost::bind(closeAfterSomeTime, writer, 20000));
 		Timer timer2;
 		ensure_equals(io.readUntil(a_twoBytesRead), 0u);
 		ensure_equals(readData, "aa");
 		ensure("At least 18 msec elapsed", timer2.elapsed() >= 18);
-		ensure("At most 30 msec elapsed", timer2.elapsed() <= 30);
+		ensure("At most 90 msec elapsed", timer2.elapsed() <= 90);
 	}
 	
 	TEST_METHOD(6) {
@@ -145,7 +145,7 @@ namespace tut {
 			fail("TimeoutException expected");
 		} catch (const TimeoutException &) {
 			ensure("At least 45 msec elapsed", timer.elapsed() >= 45);
-			ensure("At most 65 msec elapsed", timer.elapsed() < 65);
+			ensure("At most 90 msec elapsed", timer.elapsed() < 90);
 			ensure("It deducts the waited time from the timeout", timeout < 5000);
 			ensure_equals(readData, "hello");
 			ensure_equals(io.getBuffer(), "");
@@ -213,14 +213,14 @@ namespace tut {
 		ensure_equals(io.read(buf, 2), 2u);
 		ensure_equals(StaticString(buf), "aa");
 		ensure("At least 18 msec elapsed", timer1.elapsed() >= 18);
-		ensure("At most 30 msec elapsed", timer1.elapsed() <= 30);
+		ensure("At most 90 msec elapsed", timer1.elapsed() <= 90);
 		
 		TempThread thr2(boost::bind(closeAfterSomeTime, writer, 20000));
 		Timer timer2;
 		ensure_equals(io.read(buf, sizeof(buf)), 0u);
 		ensure_equals(StaticString(buf), "aa");
 		ensure("At least 18 msec elapsed", timer2.elapsed() >= 18);
-		ensure("At most 30 msec elapsed", timer2.elapsed() <= 30);
+		ensure("At most 90 msec elapsed", timer2.elapsed() <= 90);
 	}
 	
 	TEST_METHOD(16) {
@@ -235,7 +235,7 @@ namespace tut {
 			fail("TimeoutException expected");
 		} catch (const TimeoutException &) {
 			ensure("At least 45 msec elapsed", timer.elapsed() >= 45);
-			ensure("At most 65 msec elapsed", timer.elapsed() < 65);
+			ensure("At most 95 msec elapsed", timer.elapsed() < 95);
 			ensure("It deducts the waited time from the timeout", timeout < 5000);
 			ensure_equals(io.getBuffer(), "");
 		}
@@ -251,7 +251,7 @@ namespace tut {
 		ensure_equals(io.readAll(), "aa");
 		ensure_equals(io.getBuffer(), "");
 		ensure("At least 38 msec elapsed", timer.elapsed() >= 38);
-		ensure("At most 50 msec elapsed", timer.elapsed() <= 50);
+		ensure("At most 95 msec elapsed", timer.elapsed() <= 95);
 	}
 	
 	TEST_METHOD(21) {
@@ -266,7 +266,7 @@ namespace tut {
 			fail("TimeoutException expected");
 		} catch (const TimeoutException &) {
 			ensure("At least 45 msec elapsed", timer.elapsed() >= 45);
-			ensure("At most 65 msec elapsed", timer.elapsed() < 65);
+			ensure("At most 95 msec elapsed", timer.elapsed() < 95);
 			ensure("It deducts the waited time from the timeout", timeout < 5000);
 			ensure_equals(io.getBuffer(), "");
 		}
@@ -332,7 +332,7 @@ namespace tut {
 		ensure_equals(io.readLine(), "hello\n");
 		ensure_equals(io.getBuffer(), "world\n.");
 		ensure("At least 33 msec elapsed", timer1.elapsed() >= 33);
-		ensure("At most 45 msec elapsed", timer1.elapsed() <= 45);
+		ensure("At most 95 msec elapsed", timer1.elapsed() <= 90);
 		
 		TempThread thr3(boost::bind(closeAfterSomeTime, writer, 20000));
 		Timer timer2;
@@ -341,7 +341,7 @@ namespace tut {
 		ensure_equals(io.readLine(), ".");
 		ensure_equals(io.getBuffer(), "");
 		ensure("At least 18 msec elapsed", timer2.elapsed() >= 18);
-		ensure("At most 30 msec elapsed", timer2.elapsed() <= 30);
+		ensure("At most 95 msec elapsed", timer2.elapsed() <= 95);
 	}
 	
 	TEST_METHOD(31) {
@@ -356,7 +356,7 @@ namespace tut {
 			fail("TimeoutException expected");
 		} catch (const TimeoutException &) {
 			ensure("At least 25 msec elapsed", timer.elapsed() >= 25);
-			ensure("At most 40 msec elapsed", timer.elapsed() < 40);
+			ensure("At most 90 msec elapsed", timer.elapsed() < 90);
 			ensure("It deducts the waited time from the timeout", timeout < 5000);
 			ensure_equals(io.getBuffer(), "");
 		}
diff --git a/test/cxx/CxxTestMain.cpp b/test/cxx/CxxTestMain.cpp
index a59800b..a473762 100644
--- a/test/cxx/CxxTestMain.cpp
+++ b/test/cxx/CxxTestMain.cpp
@@ -1,13 +1,22 @@
-#include "TestSupport.h"
+#include <TestSupport.h>
 #include "../tut/tut_reporter.h"
+#include "../support/valgrind.h"
+#include <oxt/initialize.hpp>
 #include <oxt/system_calls.hpp>
 #include <string>
+#include <map>
+#include <vector>
 #include <signal.h>
 #include <cstdio>
 #include <cstdlib>
 #include <cstring>
+#include <unistd.h>
 
-#include "Utils.h"
+#include <MultiLibeio.cpp>
+#include <Utils.h>
+#include <Utils/IOUtils.h>
+#include <Utils/StrIntUtils.h>
+#include <Utils/json.h>
 
 using namespace std;
 
@@ -23,8 +32,10 @@ static tut::groupnames allGroups;
 /** Whether the user wants to run all test groups, or only the specified test groups. */
 static enum { RUN_ALL_GROUPS, RUN_SPECIFIED_GROUPS } runMode = RUN_ALL_GROUPS;
 
-/** The test groups the user wants to run. Only meaningful if runMode == RUN_SPECIFIED_GROUPS. */
-static tut::groupnames groupsToRun;
+/** The test groups and test numbers that the user wants to run.
+ * Only meaningful if runMode == RUN_SPECIFIED_GROUPS.
+ */
+static map< string, vector<int> > groupsToRun;
 
 
 static void
@@ -55,6 +66,28 @@ groupExists(const string &name) {
 }
 
 static void
+parseGroupSpec(const char *spec, string &groupName, vector<int> &testNumbers) {
+	testNumbers.clear();
+	if (*spec == '\0') {
+		groupName = "";
+		return;
+	}
+
+	vector<string> components;
+	split(spec, ':', components);
+	groupName = components[0];
+	if (components.size() > 1) {
+		string testNumbersSpec = components[1];
+		components.clear();
+		split(testNumbersSpec, ',', components);
+		vector<string>::const_iterator it;
+		for (it = components.begin(); it != components.end(); it++) {
+			testNumbers.push_back(atoi(*it));
+		}
+	}
+}
+
+static void
 parseOptions(int argc, char *argv[]) {
 	for (int i = 1; i < argc; i++) {
 		if (strcmp(argv[i], "-h") == 0) {
@@ -63,7 +96,13 @@ parseOptions(int argc, char *argv[]) {
 			if (argv[i + 1] == NULL) {
 				fprintf(stderr, "*** ERROR: A -g option must be followed by a test group name.\n");
 				exit(1);
-			} else if (!groupExists(argv[i + 1])) {
+			}
+
+			string groupName;
+			vector<int> testNumbers;
+			parseGroupSpec(argv[i + 1], groupName, testNumbers);
+
+			if (!groupExists(groupName)) {
 				fprintf(stderr,
 					"*** ERROR: Invalid test group '%s'. Available test groups are:\n\n",
 					argv[i + 1]);
@@ -73,7 +112,7 @@ parseOptions(int argc, char *argv[]) {
 				exit(1);
 			} else {
 				runMode = RUN_SPECIFIED_GROUPS;
-				groupsToRun.push_back(argv[i + 1]);
+				groupsToRun[groupName] = testNumbers;
 				i++;
 			}
 		} else {
@@ -84,31 +123,86 @@ parseOptions(int argc, char *argv[]) {
 	}
 }
 
+static int
+doNothing(eio_req *req) {
+	return 0;
+}
+
+static void
+loadConfigFile() {
+	Json::Reader reader;
+	if (!reader.parse(readAll("config.json"), testConfig)) {
+		fprintf(stderr, "Cannot parse config.json: %s\n",
+			reader.getFormattedErrorMessages().c_str());
+		exit(1);
+	}
+}
+
+static void
+abortHandler(int signo, siginfo_t *info, void *ctx) {
+	// Stop itself so that we can attach it to gdb.
+	static const char message[] = "Crash handler called!\n";
+	write(STDERR_FILENO, message, sizeof(message) - 1);
+	raise(SIGSTOP);
+	// Run default signal handler.
+	raise(signo);
+}
+
+static void
+installAbortHandler() {
+	const char *stopOnAbort = getenv("STOP_ON_ABORT");
+	if (stopOnAbort != NULL && *stopOnAbort != '\0' && *stopOnAbort != '0') {
+		struct sigaction action;
+		action.sa_sigaction = abortHandler;
+		action.sa_flags = SA_RESETHAND | SA_SIGINFO;
+		sigemptyset(&action.sa_mask);
+		sigaction(SIGABRT, &action, NULL);
+		sigaction(SIGSEGV, &action, NULL);
+		sigaction(SIGBUS, &action, NULL);
+		sigaction(SIGFPE, &action, NULL);
+	}
+}
+
 int
 main(int argc, char *argv[]) {
 	signal(SIGPIPE, SIG_IGN);
 	setenv("RAILS_ENV", "production", 1);
 	setenv("TESTING_PASSENGER", "1", 1);
+	setenv("PYTHONDONTWRITEBYTECODE", "1", 1);
 	unsetenv("PASSENGER_TMPDIR");
 	unsetenv("PASSENGER_TEMP_DIR");
+	oxt::initialize();
 	oxt::setup_syscall_interruption_support();
-	
+    
 	tut::reporter reporter;
 	tut::runner.get().set_callback(&reporter);
 	allGroups = tut::runner.get().list_groups();
 	parseOptions(argc, argv);
 	
+	char path[PATH_MAX + 1];
+	getcwd(path, PATH_MAX);
+	resourceLocator = new ResourceLocator(extractDirName(path));
+
+	Passenger::MultiLibeio::init();
+	eio_set_idle_timeout(9999); // Never timeout.
+	eio_set_min_parallel(1);
+	eio_set_max_parallel(1);
+	if (RUNNING_ON_VALGRIND) {
+		// Start an EIO thread to warm up Valgrind.
+		eio_nop(0, doNothing, NULL);
+	}
+
+	loadConfigFile();
+	installAbortHandler();
+	
 	bool all_ok = true;
 	if (runMode == RUN_ALL_GROUPS) {
 		tut::runner.get().run_tests();
-		all_ok = reporter.all_ok();
 	} else {
-		all_ok = true;
-		for (groupnames_iterator it = groupsToRun.begin(); it != groupsToRun.end(); it++) {
-			tut::runner.get().run_tests(*it);
-			all_ok = all_ok && reporter.all_ok();
-		}
+		tut::runner.get().run_tests(groupsToRun);
 	}
+	all_ok = reporter.all_ok();
+	Passenger::MultiLibeio::shutdown();
 	if (all_ok) {
 		return 0;
 	} else {
diff --git a/test/cxx/EventedBufferedInputTest.cpp b/test/cxx/EventedBufferedInputTest.cpp
new file mode 100644
index 0000000..748ceea
--- /dev/null
+++ b/test/cxx/EventedBufferedInputTest.cpp
@@ -0,0 +1,758 @@
+#include <TestSupport.h>
+#include <BackgroundEventLoop.h>
+#include <EventedBufferedInput.h>
+#include <Constants.h>
+#include <Utils.h>
+#include <Utils/IOUtils.h>
+#include <Utils/StrIntUtils.h>
+
+using namespace Passenger;
+using namespace std;
+
+namespace tut {
+	class MyEventedBufferedInput: public EventedBufferedInput<> {
+	public:
+		boost::mutex syncher;
+		int readError;
+		function<void ()> onAfterProcessingBuffer;
+
+		MyEventedBufferedInput(SafeLibev *libev, const FileDescriptor &fd)
+			: EventedBufferedInput<>(libev, fd)
+		{
+			readError = 0;
+		}
+
+		virtual ssize_t readSocket(void *buf, size_t n) {
+			int readError;
+			{
+				boost::lock_guard<boost::mutex> l(syncher);
+				readError = this->readError;
+			}
+			if (readError == 0) {
+				return EventedBufferedInput<>::readSocket(buf, n);
+			} else {
+				errno = readError;
+				return -1;
+			}
+		}
+
+		void setReadError(int code) {
+			boost::lock_guard<boost::mutex> l(syncher);
+			readError = code;
+		}
+
+		virtual void afterProcessingBuffer() {
+			function<void ()> onAfterProcessingBuffer;
+			{
+				boost::lock_guard<boost::mutex> l(syncher);
+				onAfterProcessingBuffer = this->onAfterProcessingBuffer;
+			}
+			if (onAfterProcessingBuffer) {
+				onAfterProcessingBuffer();
+			}
+		}
+	};
+
+	struct EventedBufferedInputTest {
+		BackgroundEventLoop bg;
+		Pipe p;
+		shared_ptr<MyEventedBufferedInput> ebi;
+		boost::mutex syncher;
+		string log;
+		ssize_t toConsume;
+		unsigned int counter;
+		
+		EventedBufferedInputTest() {
+			p = createPipe();
+			ebi = make_shared<MyEventedBufferedInput>(bg.safe.get(), p.first);
+			ebi->onData = onData;
+			ebi->onError = onError;
+			ebi->userData = this;
+			toConsume = -1;
+			counter = 0;
+			bg.start();
+		}
+
+		~EventedBufferedInputTest() {
+			bg.stop();
+			setLogLevel(DEFAULT_LOG_LEVEL);
+		}
+
+		static size_t onData(const EventedBufferedInputPtr &input, const StaticString &data) {
+			EventedBufferedInputTest *self = (EventedBufferedInputTest *) input->userData;
+			boost::lock_guard<boost::mutex> l(self->syncher);
+			self->counter++;
+			if (data.empty()) {
+				self->log.append("EOF\n");
+			} else {
+				self->log.append("Data: " + cEscapeString(data) + "\n");
+			}
+			if (self->toConsume == -1) {
+				return data.size();
+			} else {
+				return self->toConsume;
+			}
+		}
+
+		static void onError(const EventedBufferedInputPtr &input, const char *message, int code) {
+			EventedBufferedInputTest *self = (EventedBufferedInputTest *) input->userData;
+			boost::lock_guard<boost::mutex> l(self->syncher);
+			self->log.append("Error: " + toString(code) + "\n");
+		}
+
+		unsigned int getCounter() {
+			boost::lock_guard<boost::mutex> l(syncher);
+			return counter;
+		}
+
+		void startEbi() {
+			bg.safe->run(boost::bind(&EventedBufferedInputTest::realStartEbi, this));
+		}
+
+		void realStartEbi() {
+			ebi->start();
+		}
+
+		bool ebiIsStarted() {
+			bool result;
+			bg.safe->run(boost::bind(&EventedBufferedInputTest::realEbiIsStarted, this, &result));
+			return result;
+		}
+
+		void realEbiIsStarted(bool *result) {
+			*result = ebi->isStarted();
+		}
+
+		void logEbiIsStarted() {
+			boost::lock_guard<boost::mutex> l(syncher);
+			log.append("isStarted: " + toString(ebi->isStarted()) + "\n");
+			log.append("isSocketStarted: " + toString(ebi->isSocketStarted()) + "\n");
+		}
+	};
+
+	#define LOCK() boost::lock_guard<boost::mutex> l(syncher)
+
+	#define DEFINE_ON_DATA_METHOD(name, code) \
+		static size_t name(const EventedBufferedInputPtr &input, const StaticString &data) { \
+			EventedBufferedInputTest *self = (EventedBufferedInputTest *) input->userData; \
+			boost::mutex &syncher = self->syncher; \
+			string &log = self->log; \
+			shared_ptr<MyEventedBufferedInput> &ebi = self->ebi; \
+			/* Shut up compiler warning */  \
+			(void) syncher; \
+			(void) log; \
+			(void) ebi; \
+			code \
+		}
+	
+	#define DEFINE_FINISH_METHOD(name, code) \
+		static void name(EventedBufferedInputTest *self) { \
+			boost::mutex &syncher = self->syncher; \
+			string &log = self->log; \
+			shared_ptr<MyEventedBufferedInput> &ebi = self->ebi; \
+			/* Shut up compiler warning */ \
+			(void) syncher; \
+			(void) log; \
+			(void) ebi; \
+			code \
+		}
+
+	DEFINE_TEST_GROUP(EventedBufferedInputTest);
+
+	TEST_METHOD(1) {
+		set_test_name("It emits socket data events upon receiving data");
+		startEbi();
+		writeExact(p.second, "aaabbb");
+		EVENTUALLY(5,
+			LOCK();
+			result = !log.empty();
+		);
+		LOCK();
+		ensure_equals(log, "Data: aaabbb\n");
+	}
+
+	TEST_METHOD(2) {
+		set_test_name("It emits socket end events upon receiving EOF");
+		startEbi();
+		p.second.close();
+		EVENTUALLY(5,
+			LOCK();
+			result = !log.empty();
+		);
+		LOCK();
+		ensure_equals(log, "EOF\n");
+	}
+
+	TEST_METHOD(3) {
+		set_test_name("It emits socket end events after all data has been consumed");
+		startEbi();
+		
+		writeExact(p.second, "aaabbb");
+		EVENTUALLY(5,
+			LOCK();
+			result = !log.empty();
+		);
+		{
+			LOCK();
+			ensure_equals(log, "Data: aaabbb\n");
+		}
+
+		p.second.close();
+		EVENTUALLY(5,
+			LOCK();
+			result = log.find("EOF") != string::npos;
+		);
+		{
+			LOCK();
+			ensure_equals(log,
+				"Data: aaabbb\n"
+				"EOF\n");
+		}
+	}
+
+	TEST_METHOD(4) {
+		set_test_name("Considers ended sockets to be paused");
+		startEbi();
+		p.second.close();
+		EVENTUALLY(5,
+			LOCK();
+			result = !log.empty();
+		);
+		ensure(!ebiIsStarted());
+	}
+
+	TEST_METHOD(5) {
+		set_test_name("It emits error events upon encountering a socket error");
+		startEbi();
+		ebi->setReadError(EIO);
+		writeExact(p.second, "aaabbb");
+		EVENTUALLY(5,
+			LOCK();
+			result = !log.empty();
+		);
+		LOCK();
+		ensure_equals(log, "Error: " + toString(EIO) + "\n");
+	}
+
+	TEST_METHOD(6) {
+		set_test_name("It emits error events after all data has been consumed");
+		startEbi();
+
+		writeExact(p.second, "aaabbb");
+		EVENTUALLY(5,
+			LOCK();
+			result = !log.empty();
+		);
+
+		ebi->setReadError(EIO);
+		writeExact(p.second, "x");
+		EVENTUALLY(5,
+			LOCK();
+			result = log.find("Error") != string::npos;
+		);
+
+		LOCK();
+		ensure_equals(log,
+			"Data: aaabbb\n"
+			"Error: " + toString(EIO) + "\n");
+	}
+
+	TEST_METHOD(7) {
+		set_test_name("Considers error'ed sockets to be paused");
+		startEbi();
+		ebi->setReadError(EIO);
+		writeExact(p.second, "x");
+		EVENTUALLY(5,
+			LOCK();
+			result = !log.empty();
+		);
+		LOCK();
+		ensure(!ebiIsStarted());
+	}
+
+	DEFINE_ON_DATA_METHOD(on_data_8,
+		input->stop();
+		self->bg.safe->runLater(boost::bind(&EventedBufferedInputTest::logEbiIsStarted, self));
+		return 3;
+	)
+
+	TEST_METHOD(8) {
+		set_test_name("If the onData callback consumes everything and pauses the "
+			"EventedBufferedInput, then the EventedBufferedInput leaves the socket "
+			"in the paused state");
+		
+		ebi->onData = on_data_8;
+		startEbi();
+		writeExact(p.second, "abc");
+		EVENTUALLY(5,
+			LOCK();
+			result = !log.empty();
+		);
+		LOCK();
+		ensure_equals(log,
+			"isStarted: 0\n"
+			"isSocketStarted: 0\n");
+	}
+
+	DEFINE_ON_DATA_METHOD(on_data_9,
+		input->start();
+		self->bg.safe->runLater(boost::bind(&EventedBufferedInputTest::logEbiIsStarted, self));
+		return 3;
+	)
+
+	TEST_METHOD(9) {
+		set_test_name("if the onData callback consumes everything and resumes the "
+			"EventedBufferedInput, then the EventedBufferedInput leaves the socket "
+			"in the resumed state");
+
+		ebi->onData = on_data_9;
+		startEbi();
+		writeExact(p.second, "abc");
+		EVENTUALLY(5,
+			LOCK();
+			result = !log.empty();
+		);
+		LOCK();
+		ensure_equals(log,
+			"isStarted: 1\n"
+			"isSocketStarted: 1\n");
+	}
+
+	DEFINE_ON_DATA_METHOD(on_data_10,
+		input->stop();
+		self->bg.safe->runLater(boost::bind(&EventedBufferedInputTest::logEbiIsStarted, self));
+		return 1;
+	)
+
+	TEST_METHOD(10) {
+		set_test_name("If the onData callback consumes partially and pauses the "
+			"EventedBufferedInput, then the EventedBufferedInput leaves the socket "
+			"at the paused state");
+
+		ebi->onData = on_data_10;
+		startEbi();
+		writeExact(p.second, "abc");
+		EVENTUALLY(5,
+			LOCK();
+			result = !log.empty();
+		);
+		LOCK();
+		ensure_equals(log,
+			"isStarted: 0\n"
+			"isSocketStarted: 0\n");
+	}
+
+	DEFINE_ON_DATA_METHOD(on_data_11,
+		input->start();
+		self->bg.safe->runLater(boost::bind(&EventedBufferedInputTest::logEbiIsStarted, self));
+		return 1;
+	)
+
+	TEST_METHOD(11) {
+		set_test_name("If the onData callback consumes partially and resumes the "
+			"EventedBufferedInput, then the EventedBufferedInput leaves the socket "
+			"at the resumed state");
+
+		ebi->onData = on_data_11;
+		startEbi();
+		writeExact(p.second, "ab");
+		EVENTUALLY(5,
+			LOCK();
+			result = log ==
+				"isStarted: 1\n"
+				"isSocketStarted: 0\n"
+				"isStarted: 1\n"
+				"isSocketStarted: 1\n";
+		);
+	}
+
+	DEFINE_ON_DATA_METHOD(on_data_12,
+		LOCK();
+		self->counter++;
+		if (self->counter == 2) {
+			input->stop();
+			self->bg.safe->runLater(boost::bind(&EventedBufferedInputTest::logEbiIsStarted, self));
+		}
+		return 2;
+	)
+
+	TEST_METHOD(12) {
+		set_test_name("If the onData callback first consumes partially, then "
+			"consumes everything and pauses the EventedBufferedInput, then the "
+			"EventedBufferedInput leaves the socket in the paused state");
+
+		ebi->onData = on_data_12;
+		startEbi();
+		writeExact(p.second, "aabb");
+		EVENTUALLY(5,
+			LOCK();
+			result = !log.empty();
+		);
+		LOCK();
+		ensure_equals(log,
+			"isStarted: 0\n"
+			"isSocketStarted: 0\n");
+	}
+
+	DEFINE_ON_DATA_METHOD(on_data_13,
+		LOCK();
+		self->counter++;
+		if (self->counter == 2) {
+			input->start();
+			self->bg.safe->runLater(boost::bind(&EventedBufferedInputTest::logEbiIsStarted, self));
+		}
+		return 2;
+	)
+
+	TEST_METHOD(13) {
+		set_test_name("If the onData callback first consumes partially, then "
+			"consumes everything and resumes the EventedBufferedInput, then the "
+			"EventedBufferedInput leaves the socket in the resumed state");
+
+		ebi->onData = on_data_13;
+		startEbi();
+		writeExact(p.second, "aabb");
+		EVENTUALLY(5,
+			LOCK();
+			result = !log.empty();
+		);
+		LOCK();
+		ensure_equals(log,
+			"isStarted: 1\n"
+			"isSocketStarted: 1\n");
+	}
+
+
+	/*** If the onData callback didn't consume everything... ***/
+
+		DEFINE_ON_DATA_METHOD(on_data_20,
+			LOCK();
+			self->counter++;
+			self->log.append("onData called; isSocketStarted: " +
+				toString(self->ebi->isSocketStarted()) + "\n");
+			self->log.append("Data: " + cEscapeString(data) + "\n");
+			if (self->counter == 1) {
+				return 3;
+			} else {
+				return 1;
+			}
+		)
+
+		static void on_after_processing_buffer_20(EventedBufferedInputTest *self) {
+			boost::lock_guard<boost::mutex> l(self->syncher);
+			if (self->counter == 1) {
+				self->log.append("Finished first onData; isSocketStarted: " +
+					toString(self->ebi->isSocketStarted()) + "\n");
+			}
+		}
+
+		DEFINE_FINISH_METHOD(finish_20,
+			LOCK();
+			log.append("Finished; isSocketStarted: " +
+				toString(ebi->isSocketStarted()) + "\n");
+		);
+
+		TEST_METHOD(20) {
+			set_test_name("It pauses the socket, re-emits the remaining data in the next tick, "
+				"then resumes the socket when everything is consumed");
+
+			ebi->onData = on_data_20;
+			ebi->onAfterProcessingBuffer = boost::bind(on_after_processing_buffer_20, this);
+			startEbi();
+			writeExact(p.second, "aaabbb");
+			bg.safe->runAfterTS(10, boost::bind(finish_20, this));
+
+			EVENTUALLY(5,
+				LOCK();
+				result = log.find("Finished;") != string::npos;
+			);
+			LOCK();
+			ensure_equals(log,
+				"onData called; isSocketStarted: 1\n"
+				"Data: aaabbb\n"
+				"Finished first onData; isSocketStarted: 0\n"
+				"onData called; isSocketStarted: 0\n"
+				"Data: bbb\n"
+				"onData called; isSocketStarted: 0\n"
+				"Data: bb\n"
+				"onData called; isSocketStarted: 0\n"
+				"Data: b\n"
+				"Finished; isSocketStarted: 1\n");
+		}
+
+		/*** If pause() is called after the data handler... ***/
+
+			static void on_after_processing_buffer_21(EventedBufferedInputTest *self) {
+				if (self->getCounter() == 1) {
+					self->ebi->stop();
+					boost::lock_guard<boost::mutex> l(self->syncher);
+					self->log.append("isSocketStarted: " +
+						toString(self->ebi->isSocketStarted()) + "\n");
+				}
+			}
+
+			TEST_METHOD(21) {
+				set_test_name("It pauses the socket and doesn't re-emit remaining data events");
+				toConsume = 1;
+				ebi->onAfterProcessingBuffer = boost::bind(on_after_processing_buffer_21, this);
+				startEbi();
+				writeExact(p.second, "aaabbb");
+				EVENTUALLY(5,
+					LOCK();
+					result = log.find("isSocketStarted") != string::npos;
+				);
+				LOCK();
+				ensure_equals(log,
+					"Data: aaabbb\n"
+					"isSocketStarted: 0\n");
+			}
+
+			static void on_after_processing_buffer_22(EventedBufferedInputTest *self) {
+				if (self->getCounter() == 1) {
+					self->ebi->stop();
+					{
+						boost::lock_guard<boost::mutex> l(self->syncher);
+						self->log.append("Paused; isSocketStarted: " +
+							toString(self->ebi->isSocketStarted()) + "\n");
+					}
+					self->ebi->start();
+					{
+						boost::lock_guard<boost::mutex> l(self->syncher);
+						self->log.append("Resumed; isSocketStarted: " +
+							toString(self->ebi->isSocketStarted()) + "\n");
+					}
+				}
+			}
+
+			DEFINE_FINISH_METHOD(finish_22,
+				LOCK();
+				log.append("Done; isSocketStarted: " +
+					toString(ebi->isStarted()) + "\n");
+			);
+
+			TEST_METHOD(22) {
+				set_test_name("It resumes the socket and re-emits remaining "
+					"data one tick after start() is called");
+				toConsume = 3;
+				ebi->onAfterProcessingBuffer = boost::bind(on_after_processing_buffer_22, this);
+				startEbi();
+				writeExact(p.second, "aaabbb");
+				bg.safe->runAfterTS(10, boost::bind(finish_22, this));
+				EVENTUALLY(5,
+					LOCK();
+					result = log.find("Done") != string::npos;
+				);
+				{
+					LOCK();
+					ensure_equals(log,
+						"Data: aaabbb\n"
+						"Paused; isSocketStarted: 0\n"
+						"Resumed; isSocketStarted: 0\n"
+						"Data: bbb\n"
+						"Done; isSocketStarted: 1\n");
+				}
+
+				bg.safe->runAfterTS(10, boost::bind(finish_22, this));
+				startEbi();
+				EVENTUALLY(5,
+					LOCK();
+					result = log.find("Done") != string::npos;
+				);
+			}
+
+			static void on_after_processing_buffer_23(EventedBufferedInputTest *self) {
+				if (self->getCounter() == 1) {
+					self->ebi->stop();
+					{
+						boost::lock_guard<boost::mutex> l(self->syncher);
+						self->log.append("Paused; isSocketStarted: " +
+							toString(self->ebi->isSocketStarted()) + "\n");
+					}
+					self->ebi->start();
+					{
+						boost::lock_guard<boost::mutex> l(self->syncher);
+						self->log.append("Resumed; isSocketStarted: " +
+							toString(self->ebi->isSocketStarted()) + "\n");
+					}
+					self->ebi->stop();
+					{
+						boost::lock_guard<boost::mutex> l(self->syncher);
+						self->log.append("Paused again; isSocketStarted: " +
+							toString(self->ebi->isSocketStarted()) + "\n");
+					}
+				}
+			}
+
+			DEFINE_FINISH_METHOD(finish_23,
+				LOCK();
+				log.append("Timeout; isSocketStarted: " +
+					toString(ebi->isStarted()) + "\n");
+			);
+
+			TEST_METHOD(23) {
+				set_test_name("It doesn't re-emit remaining data if start() "
+					"is called, then stop() again");
+				toConsume = 3;
+				ebi->onAfterProcessingBuffer = boost::bind(on_after_processing_buffer_23, this);
+				startEbi();
+				writeExact(p.second, "aaabbb");
+				bg.safe->runAfterTS(10, boost::bind(finish_23, this));
+				EVENTUALLY(5,
+					LOCK();
+					result = log.find("Timeout") != string::npos;
+				);
+				LOCK();
+				ensure_equals(log,
+					"Data: aaabbb\n"
+					"Paused; isSocketStarted: 0\n"
+					"Resumed; isSocketStarted: 0\n"
+					"Paused again; isSocketStarted: 0\n"
+					"Timeout; isSocketStarted: 0\n");
+			}
+
+		/*** If pause() is called during the handler ***/
+
+			DEFINE_ON_DATA_METHOD(on_data_24,
+				{
+					LOCK();
+					self->counter++;
+					self->log.append("Data: " + cEscapeString(data) + "\n");
+				}
+				if (self->getCounter() == 1) {
+					input->stop();
+				}
+				return 1;
+			)
+
+			DEFINE_FINISH_METHOD(finish_24,
+				LOCK();
+				log.append("Timeout; isSocketStarted: " +
+					toString(ebi->isSocketStarted()) + "\n");
+			);
+
+			TEST_METHOD(24) {
+				set_test_name("It pauses the socket and doesn't re-emit remaining data");
+				ebi->onData = on_data_24;
+				startEbi();
+				writeExact(p.second, "aaabbb");
+				bg.safe->runAfterTS(10, boost::bind(finish_24, this));
+				EVENTUALLY(5,
+					LOCK();
+					result = log.find("Timeout") != string::npos;
+				);
+				LOCK();
+				ensure_equals(log,
+					"Data: aaabbb\n"
+					"Timeout; isSocketStarted: 0\n");
+			}
+
+			DEFINE_ON_DATA_METHOD(on_data_25,
+				{
+					LOCK();
+					self->counter++;
+					self->log.append("Data: " + cEscapeString(data) + "\n");
+				}
+				if (self->getCounter() == 1) {
+					input->stop();
+					input->start();
+				}
+				return 3;
+			)
+
+			static void on_after_processing_buffer_25(EventedBufferedInputTest *self) {
+				boost::lock_guard<boost::mutex> l(self->syncher);
+				if (self->counter == 1) {
+					self->log.append("Handler done; isSocketStarted: " +
+						toString(self->ebi->isSocketStarted()) + "\n");
+				}
+			}
+
+			DEFINE_FINISH_METHOD(finish_25,
+				LOCK();
+				log.append("Timeout; isSocketStarted: " +
+					toString(ebi->isStarted()) + "\n");
+			);
+
+			TEST_METHOD(25) {
+				set_test_name("It re-emits remaining data one tick after start() is called");
+				ebi->onData = on_data_25;
+				ebi->onAfterProcessingBuffer = boost::bind(on_after_processing_buffer_25, this);
+				startEbi();
+				writeExact(p.second, "aaabbb");
+				bg.safe->runAfterTS(10, boost::bind(finish_25, this));
+				EVENTUALLY(5,
+					LOCK();
+					result = log.find("Timeout") != string::npos;
+				);
+				LOCK();
+				ensure_equals(log,
+					"Data: aaabbb\n"
+					"Handler done; isSocketStarted: 0\n"
+					"Data: bbb\n"
+					"Timeout; isSocketStarted: 1\n");
+			}
+
+			DEFINE_ON_DATA_METHOD(on_data_26,
+				{
+					LOCK();
+					self->counter++;
+					self->log.append("Data: " + cEscapeString(data) + "\n");
+				}
+				if (self->getCounter() == 1) {
+					input->stop();
+					input->start();
+					input->stop();
+				}
+				return 3;
+			)
+
+			static void on_after_processing_buffer_26(EventedBufferedInputTest *self) {
+				boost::lock_guard<boost::mutex> l(self->syncher);
+				if (self->counter == 1) {
+					self->log.append("Handler done; isSocketStarted: " +
+						toString(self->ebi->isSocketStarted()) + "\n");
+				}
+			}
+
+			DEFINE_FINISH_METHOD(finish_26,
+				LOCK();
+				log.append("Timeout; isSocketStarted: " +
+					toString(ebi->isSocketStarted()) + "\n");
+			);
+
+			TEST_METHOD(26) {
+				set_test_name("It doesn't re-emit remaining data if start() is called, then stop() again");
+				ebi->onData = on_data_26;
+				ebi->onAfterProcessingBuffer = boost::bind(on_after_processing_buffer_26, this);
+				startEbi();
+				writeExact(p.second, "aaabbb");
+				bg.safe->runAfterTS(10, boost::bind(finish_26, this));
+				EVENTUALLY(5,
+					LOCK();
+					result = log.find("Timeout") != string::npos;
+				);
+				LOCK();
+				ensure_equals(log,
+					"Data: aaabbb\n"
+					"Handler done; isSocketStarted: 0\n"
+					"Timeout; isSocketStarted: 0\n");
+			}
+
+		/*** If the socket was disconnected ***/
+
+			TEST_METHOD(27) {
+				set_test_name("It doesn't re-emit the remaining data");
+				// TODO
+			}
+
+	TEST_METHOD(30) {
+		set_test_name("It pauses the underlying socket");
+		// TODO
+	}
+
+	TEST_METHOD(31) {
+		set_test_name("It doesn't emit data events if it's paused, but re-emits "
+			"previously unemitted data events after resume");
+		// TODO
+	}
+}
diff --git a/test/cxx/EventedClientTest.cpp b/test/cxx/EventedClientTest.cpp
index fda4202..306e63b 100644
--- a/test/cxx/EventedClientTest.cpp
+++ b/test/cxx/EventedClientTest.cpp
@@ -1,7 +1,7 @@
-#include "TestSupport.h"
-#include "EventedClient.h"
-#include "Utils/ScopeGuard.h"
-#include "Utils/IOUtils.h"
+#include <TestSupport.h>
+#include <EventedClient.h>
+#include <Utils/ScopeGuard.h>
+#include <Utils/IOUtils.h>
 
 #include <oxt/thread.hpp>
 
@@ -416,15 +416,15 @@ namespace tut {
 		// after what's already in the outbox.
 		EventedClient client(eventLoop, fd2);
 		string header(1024 * 4, 'x');
-		string body(1024 * 128, 'y');
+		string body(1024 * 1024, 'y');
 		char buf[header.size() + body.size() + 1024];
 		
 		client.write(header);
 		client.write(body);
-		ensure(client.pendingWrites() > 0);
+		ensure("(1)", client.pendingWrites() > 0);
 		
-		ensure_equals(readExact(fd1, buf, header.size()), (unsigned int) header.size());
-		ensure_equals(StaticString(buf, header.size()), header);
+		ensure_equals("(2)", readExact(fd1, buf, header.size()), (unsigned int) header.size());
+		ensure_equals("(3)", StaticString(buf, header.size()), header);
 		
 		client.write("hello world");
 		
@@ -432,8 +432,8 @@ namespace tut {
 		EVENT_LOOP_GUARD;
 		
 		unsigned int len = body.size() + strlen("hello world");
-		ensure_equals(readExact(fd1, buf, len), len);
-		ensure_equals(StaticString(buf, len), body + "hello world");
+		ensure_equals("(4)", readExact(fd1, buf, len), len);
+		ensure_equals("(5)", StaticString(buf, len), body + "hello world");
 	}
 	
 	TEST_METHOD(18) {
@@ -459,17 +459,17 @@ namespace tut {
 		client.writeErrorAction = EventedClient::DISCONNECT_FULL;
 		client.onSystemError = saveSystemError;
 		
-		string str(1024 * 128, 'x');
+		string str(1024 * 1024, 'x');
 		client.write(str);
-		ensure(client.pendingWrites() > 0);
+		ensure("(1)", client.pendingWrites() > 0);
 		
 		fd1.close();
 		client.onDisconnect = exitEventLoop;
 		startEventLoop();
 		waitUntilEventLoopExits();
 		
-		ensure_equals(lastErrorCode, EPIPE);
-		ensure_equals(client.fd, -1);
+		ensure_equals("(2)", lastErrorCode, EPIPE);
+		ensure_equals("(3)", client.fd, -1);
 	}
 	
 	TEST_METHOD(20) {
@@ -507,9 +507,9 @@ namespace tut {
 		client.onReadable = readAndExitOnEof;
 		client.notifyReads(true);
 		
-		string str(1024 * 128, 'x');
+		string str(1024 * 1024, 'x');
 		client.write(str);
-		ensure(client.pendingWrites() > 0);
+		ensure("(1)", client.pendingWrites() > 0);
 		
 		writeExact(fd1, "world", 5);
 		fd1.close();
@@ -517,7 +517,7 @@ namespace tut {
 		startEventLoop();
 		waitUntilEventLoopExits();
 		
-		ensure(client.fd != -1);
-		ensure_equals(data, "world");
+		ensure("(2)", client.fd != -1);
+		ensure_equals("(3)", data, "world");
 	}
 }
diff --git a/test/cxx/FileBackedPipeTest.cpp b/test/cxx/FileBackedPipeTest.cpp
new file mode 100644
index 0000000..89593e9
--- /dev/null
+++ b/test/cxx/FileBackedPipeTest.cpp
@@ -0,0 +1,626 @@
+#include "TestSupport.h"
+#include <boost/make_shared.hpp>
+#include <boost/bind.hpp>
+#include <agents/HelperAgent/FileBackedPipe.h>
+#include <algorithm>
+#include <pthread.h>
+
+using namespace Passenger;
+using namespace std;
+using namespace boost;
+
+namespace tut {
+	struct FileBackedPipeTest {
+		TempDir tmpdir;
+		BackgroundEventLoop bg;
+		FileBackedPipePtr pipe;
+
+		bool consumeImmediately;
+		size_t toConsume;
+		bool doneAfterConsuming;
+		bool resetOnData;
+		pthread_t consumeCallbackThread;
+		AtomicInt consumeCallbackCount;
+		string receivedData;
+		bool ended;
+		FileBackedPipe::ConsumeCallback consumedCallback;
+		AtomicInt commitCount;
+
+		FileBackedPipeTest()
+			: tmpdir("tmp.pipe")
+		{
+			consumeImmediately = true;
+			toConsume = 9999;
+			doneAfterConsuming = false;
+			resetOnData = false;
+			consumeCallbackCount = 0;
+			ended = false;
+			pipe = make_shared<FileBackedPipe>("tmp.pipe");
+			pipe->userData = this;
+			pipe->onData = onData;
+			pipe->onEnd = onEnd;
+			pipe->onCommit = onCommit;
+		}
+		
+		~FileBackedPipeTest() {
+			bg.stop();
+			pipe.reset();
+		}
+
+		void init() {
+			pipe->reset(bg.safe);
+			bg.start();
+		}
+
+		bool write(const StaticString &data) {
+			bool result;
+			bg.safe->run(boost::bind(&FileBackedPipeTest::real_write, this, data, &result));
+			return result;
+		}
+
+		void real_write(StaticString data, bool *result) {
+			*result = pipe->write(data.data(), data.size());
+		}
+
+		unsigned int getBufferSize() {
+			unsigned int result;
+			bg.safe->run(boost::bind(&FileBackedPipeTest::real_getBufferSize, this, &result));
+			return result;
+		}
+
+		void real_getBufferSize(unsigned int *result) {
+			*result = pipe->getBufferSize();
+		}
+
+		void startPipe() {
+			bg.safe->run(boost::bind(&FileBackedPipe::start, pipe.get()));
+		}
+
+		void stopPipe() {
+			bg.safe->run(boost::bind(&FileBackedPipe::stop, pipe.get()));
+		}
+
+		void endPipe() {
+			bg.safe->run(boost::bind(&FileBackedPipe::end, pipe.get()));
+		}
+
+		void callConsumedCallback(size_t consumed, bool done) {
+			bg.safe->run(boost::bind(consumedCallback.toFunction(), consumed, done));
+		}
+
+		bool isStarted() {
+			bool result;
+			bg.safe->run(boost::bind(&FileBackedPipeTest::real_isStarted, this, &result));
+			return result;
+		}
+
+		void real_isStarted(bool *result) {
+			*result = pipe->isStarted();
+		}
+
+		bool reachedEnd() {
+			bool result;
+			bg.safe->run(boost::bind(&FileBackedPipeTest::real_reachedEnd, this, &result));
+			return result;
+		}
+
+		void real_reachedEnd(bool *result) {
+			*result = pipe->reachedEnd();
+		}
+
+		bool isCommittingToDisk() {
+			bool result;
+			bg.safe->run(boost::bind(&FileBackedPipeTest::real_isCommittingToDisk, this, &result));
+			return result;
+		}
+
+		void real_isCommittingToDisk(bool *result) {
+			*result = pipe->isCommittingToDisk();
+		}
+
+		FileBackedPipe::DataState getDataState() {
+			FileBackedPipe::DataState result;
+			bg.safe->run(boost::bind(&FileBackedPipeTest::real_getDataState, this, &result));
+			return result;
+		}
+
+		void real_getDataState(FileBackedPipe::DataState *result) {
+			*result = pipe->getDataState();
+		}
+
+		static void onData(const FileBackedPipePtr &source, const char *data,
+			size_t size, const FileBackedPipe::ConsumeCallback &consumed)
+		{
+			FileBackedPipeTest *self = (FileBackedPipeTest *) source->userData;
+			self->consumeCallbackThread = pthread_self();
+			if (!self->receivedData.empty()) {
+				self->receivedData.append("\n");
+			}
+			self->receivedData.append(data, size);
+			self->consumeCallbackCount++;
+			if (self->resetOnData) {
+				source->reset();
+			}
+			if (self->consumeImmediately) {
+				consumed(std::min(self->toConsume, size), self->doneAfterConsuming);
+			} else {
+				self->consumedCallback = consumed;
+			}
+		}
+
+		static void onEnd(const FileBackedPipePtr &source) {
+			FileBackedPipeTest *self = (FileBackedPipeTest *) source->userData;
+			self->ended = true;
+		}
+
+		static void onCommit(const FileBackedPipePtr &source) {
+			FileBackedPipeTest *self = (FileBackedPipeTest *) source->userData;
+			self->commitCount++;
+		}
+	};
+
+	DEFINE_TEST_GROUP(FileBackedPipeTest);
+
+	TEST_METHOD(1) {
+		// Test writing to an empty, started pipe and consuming all data immediately.
+		init();
+		startPipe();
+		ensure("immediately consumed", write("hello"));
+		ensure("callback called from event loop thread",
+			pthread_equal(consumeCallbackThread, bg.safe->getCurrentThread()));
+		ensure_equals(receivedData, "hello");
+		ensure_equals("nothing buffered", getBufferSize(), 0u);
+		ensure("not committing to disk", !isCommittingToDisk());
+	}
+
+	TEST_METHOD(2) {
+		// Test writing to an empty, started pipe and not consuming immediately.
+		init();
+		startPipe();
+		consumeImmediately = false;
+		write("hello");
+		ensure_equals(receivedData, "hello");
+		ensure_equals("everything buffered", getBufferSize(), sizeof("hello") - 1);
+
+		receivedData.clear();
+		callConsumedCallback(5, false);
+		ensure_equals(getBufferSize(), 0u);
+		ensure("not committing to disk", !isCommittingToDisk());
+	}
+
+	TEST_METHOD(3) {
+		// Test writing to an empty, stopped pipe and starting it later.
+		init();
+		write("hello");
+		startPipe();
+		ensure_equals(consumeCallbackCount, 1);
+		ensure_equals(receivedData, "hello");
+		ensure_equals(getBufferSize(), 0u);
+		ensure("not committing to disk", !isCommittingToDisk());
+	}
+
+	TEST_METHOD(4) {
+		// When the consume callback is called with done=false, the pipe should be paused.
+		init();
+		startPipe();
+		doneAfterConsuming = true;
+		write("hello");
+		ensure(!isStarted());
+		ensure_equals(getBufferSize(), 0u);
+		ensure("not committing to disk", !isCommittingToDisk());
+	}
+
+	TEST_METHOD(5) {
+		// After consuming some data, if the pipe is still in started mode then
+		// it should emit any remaining data.
+		init();
+		startPipe();
+		toConsume = 3;
+		write("hello");
+		ensure_equals(getBufferSize(), 0u);
+		ensure("not committing to disk", !isCommittingToDisk());
+		ensure_equals(receivedData,
+			"hello\n"
+			"lo");
+		ensure_equals(consumeCallbackCount, 2);
+	}
+
+	TEST_METHOD(6) {
+		// Writing to a stopped pipe will cause the data to be buffered.
+		// This buffer will be passed to the data callback when we
+		// start the pipe again. If the data callback doesn't consume
+		// everything at once then the pipe will try again until
+		// everything's consumed.
+		init();
+		toConsume = 3;
+		write("hello");
+		ensure_equals(getBufferSize(), 5u);
+		ensure("not committing to disk", !isCommittingToDisk());
+		ensure_equals(receivedData, "");
+		ensure_equals(consumeCallbackCount, 0);
+		startPipe();
+		ensure_equals(getBufferSize(), 0u);
+		ensure("not committing to disk", !isCommittingToDisk());
+		ensure_equals(consumeCallbackCount, 2);
+		ensure_equals(receivedData,
+			"hello\n"
+			"lo");
+	}
+
+	TEST_METHOD(7) {
+		// Test writing to a pipe whose consume callback hasn't
+		// been called yet and whose data state is IN_MEMORY.
+		init();
+		startPipe();
+		consumeImmediately = false;
+		write("hello");
+
+		write("world");
+		ensure_equals(getDataState(), FileBackedPipe::IN_MEMORY);
+		ensure_equals(getBufferSize(), 10u);
+		ensure("not committing to disk", !isCommittingToDisk());
+		ensure_equals(consumeCallbackCount, 1);
+		ensure_equals(receivedData, "hello");
+
+		callConsumedCallback(4, false);
+		ensure_equals(getBufferSize(), 6u);
+		ensure("not committing to disk", !isCommittingToDisk());
+		ensure_equals(consumeCallbackCount, 2);
+		ensure_equals(receivedData,
+			"hello\n"
+			"oworld");
+		
+		callConsumedCallback(6, false);
+		ensure_equals(getBufferSize(), 0u);
+		ensure("not committing to disk", !isCommittingToDisk());
+		ensure_equals(consumeCallbackCount, 2);
+		ensure_equals(receivedData,
+			"hello\n"
+			"oworld");
+	}
+
+	TEST_METHOD(8) {
+		// Test writing to a pipe whose consume callback hasn't
+		// been called yet and whose data state is OPENING_FILE.
+		pipe->setThreshold(3);
+		pipe->openTimeout = 30;
+		init();
+		startPipe();
+		consumeImmediately = false;
+		write("hello");
+
+		write("world");
+		ensure_equals("(1)", getDataState(), FileBackedPipe::OPENING_FILE);
+		ensure_equals("(2)", getBufferSize(), 10u);
+		ensure("committing to disk", isCommittingToDisk());
+		ensure_equals("(3)", consumeCallbackCount, 1);
+		ensure_equals("(4)", receivedData, "hello");
+
+		callConsumedCallback(4, false);
+		ensure_equals("(5)", getDataState(), FileBackedPipe::OPENING_FILE);
+		ensure_equals("(6)", getBufferSize(), 6u);
+		ensure_equals("(7)", consumeCallbackCount, 2);
+		ensure_equals("(8)", receivedData,
+			"hello\n"
+			"oworld");
+		
+		callConsumedCallback(6, false);
+		ensure_equals("(9)", getDataState(), FileBackedPipe::OPENING_FILE);
+		ensure_equals("(10)", getBufferSize(), 0u);
+		ensure_equals("(11)", consumeCallbackCount, 2);
+		ensure_equals("(12)", receivedData,
+			"hello\n"
+			"oworld");
+	}
+
+	TEST_METHOD(9) {
+		// Test writing to a pipe whose consume callback hasn't
+		// been called yet and whose data state is IN_FILE.
+		pipe->setThreshold(3);
+		init();
+		startPipe();
+		consumeImmediately = false;
+		write("hello");
+
+		write("world");
+		EVENTUALLY(5,
+			result = getDataState() == FileBackedPipe::IN_FILE && consumeCallbackCount == 1;
+		);
+		ensure_equals("(2)", getBufferSize(), 10u);
+		ensure_equals("(3)", receivedData, "hello");
+
+		callConsumedCallback(4, false);
+		EVENTUALLY(5,
+			result = consumeCallbackCount == 2;
+		);
+		ensure_equals("(4)", getDataState(), FileBackedPipe::IN_FILE);
+		ensure_equals("(5)", getBufferSize(), 6u);
+		ensure_equals("(7)", receivedData,
+			"hello\n"
+			"oworld");
+		
+		callConsumedCallback(6, false);
+		ensure_equals("(8)", getDataState(), FileBackedPipe::IN_FILE);
+		ensure_equals("(9)", getBufferSize(), 0u);
+		ensure_equals("(10)", consumeCallbackCount, 2);
+		ensure_equals("(11)", receivedData,
+			"hello\n"
+			"oworld");
+	}
+
+	TEST_METHOD(10) {
+		// When the data doesn't fit in the memory buffer it will
+		// write to a file. Test whether writing to the file and
+		// reading from the file works correctly.
+		pipe->setThreshold(5);
+		init();
+		write("hello");
+		ensure_equals(getBufferSize(), 5u);
+		ensure_equals(getDataState(), FileBackedPipe::IN_MEMORY);
+		write("world");
+		ensure_equals(getBufferSize(), 10u);
+		EVENTUALLY(5,
+			result = getBufferSize() == 10 && getDataState() == FileBackedPipe::IN_FILE;
+		);
+		startPipe();
+		EVENTUALLY(5,
+			result = getBufferSize() == 0 && receivedData == "helloworld";
+		);
+	}
+
+	TEST_METHOD(11) {
+		// Test end() on a started, empty pipe.
+		init();
+		startPipe();
+		endPipe();
+		ensure_equals(consumeCallbackCount, 0);
+		ensure(ended);
+	}
+
+	TEST_METHOD(12) {
+		// Test end() on a started pipe after writing data to
+		// it that's immediately consumed.
+		init();
+		startPipe();
+		write("hello");
+		endPipe();
+		ensure_equals(consumeCallbackCount, 1);
+		ensure_equals(receivedData, "hello");
+		ensure(ended);
+	}
+
+	TEST_METHOD(13) {
+		// Test end() on a started pipe that has data buffered in memory.
+		init();
+		consumeImmediately = false;
+		startPipe();
+		write("hello");
+		endPipe();
+		ensure_equals(getDataState(), FileBackedPipe::IN_MEMORY);
+		ensure(!ended);
+
+		callConsumedCallback(3, false);
+		ensure_equals(receivedData,
+			"hello\n"
+			"lo");
+		ensure(!ended);
+		callConsumedCallback(2, false);
+		ensure(ended);
+	}
+
+	TEST_METHOD(14) {
+		// Test end() on a started pipe that has data buffered on disk.
+		pipe->setThreshold(1);
+		consumeImmediately = false;
+		init();
+		startPipe();
+		write("hello");
+		endPipe();
+		EVENTUALLY(5,
+			result = getDataState() == FileBackedPipe::IN_FILE && !ended;
+		);
+
+		callConsumedCallback(3, false);
+		EVENTUALLY(5,
+			result =
+				receivedData ==
+					"hello\n"
+					"lo"
+				&& !ended;
+		);
+
+		callConsumedCallback(2, false);
+		ensure(ended);
+	}
+
+	TEST_METHOD(15) {
+		// Test end() on an empty, stopped pipe.
+		init();
+		endPipe();
+		startPipe();
+		ensure_equals(consumeCallbackCount, 0);
+		ensure_equals(receivedData, "");
+		ensure(ended);
+	}
+
+	TEST_METHOD(16) {
+		// Test end() on a non-empty, stopped pipe with dataState == IN_MEMORY.
+		init();
+		write("hello");
+		endPipe();
+		startPipe();
+		EVENTUALLY(5,
+			result = consumeCallbackCount == 1;
+		);
+		ensure_equals(receivedData, "hello");
+		ensure(ended);
+	}
+
+	TEST_METHOD(17) {
+		// Test end() on a non-empty, stopped pipe with dataState == IN_FILE.
+		pipe->setThreshold(3);
+		pipe->openTimeout = 30;
+		init();
+		write("hello");
+		ensure_equals(getDataState(), FileBackedPipe::OPENING_FILE);
+		endPipe();
+		startPipe();
+		EVENTUALLY(5,
+			result = consumeCallbackCount == 1;
+		);
+		ensure_equals(getDataState(), FileBackedPipe::OPENING_FILE);
+		ensure_equals(receivedData, "hello");
+		ensure(ended);
+	}
+
+	TEST_METHOD(18) {
+		// Test end() on a non-empty, stopped pipe with dataState == IN_FILE.
+		pipe->setThreshold(3);
+		init();
+		write("hello");
+		endPipe();
+		startPipe();
+		EVENTUALLY(5,
+			result = getDataState() == FileBackedPipe::IN_FILE;
+		);
+		EVENTUALLY(5,
+			result = consumeCallbackCount == 1;
+		);
+		ensure_equals(receivedData, "hello");
+		ensure(ended);
+	}
+
+	TEST_METHOD(20) {
+		// Starting a pipe whose end has already been processed will have no effect.
+		init();
+		startPipe();
+		write("hello");
+		endPipe();
+		ensure_equals(consumeCallbackCount, 1);
+		ensure(ended);
+		
+		stopPipe();
+		ensure(reachedEnd());
+		ensure(!isStarted());
+
+		startPipe();
+		ensure_equals(consumeCallbackCount, 1);
+		ensure(ended);
+		ensure(reachedEnd());
+		ensure(!isStarted());
+	}
+
+	TEST_METHOD(21) {
+		// If the written data is immediately consumed, then write() returns true
+		// and the commit callback is never called.
+		init();
+		startPipe();
+		ensure(write("hello"));
+		SHOULD_NEVER_HAPPEN(40,
+			result = commitCount > 0;
+		);
+	}
+
+	TEST_METHOD(22) {
+		// If the written data is not immediately consumed but fits
+		// into the memory buffer, then write() returns true and the
+		// commit callback is never called.
+		consumeImmediately = false;
+		init();
+		startPipe();
+		ensure(write("hello"));
+		SHOULD_NEVER_HAPPEN(40,
+			result = commitCount > 0;
+		);
+	}
+	
+	TEST_METHOD(23) {
+		// If the pipe is paused and the written data fits into the memory
+		// buffer, then write() returns true and the commit callback is never called.
+		init();
+		ensure(write("hello"));
+		SHOULD_NEVER_HAPPEN(40,
+			result = commitCount > 0;
+		);
+	}
+
+	TEST_METHOD(24) {
+		// If the written data is not immediately consumed and must be written
+		// to the disk, then write() returns false. onCommit is called after
+		// the data has been written out to the disk.
+		pipe->setThreshold(3);
+		pipe->openTimeout = 20;
+		init();
+		ensure(!write("hello"));
+		ensure("committing to disk", isCommittingToDisk());
+		EVENTUALLY(1,
+			result = commitCount == 1;
+		);
+		ensure("not committing to disk", !isCommittingToDisk());
+	}
+
+	TEST_METHOD(25) {
+		// It may be reset inside the onData callback.
+		resetOnData = true;
+		consumeImmediately = false;
+		init();
+		startPipe();
+		write("hello");
+		ensure(!isStarted());
+		ensure_equals(getBufferSize(), 0u);
+	}
+
+	TEST_METHOD(26) {
+		// It may be reset inside the onData callback while there is data buffered in memory.
+		consumeImmediately = false;
+		init();
+		startPipe();
+		write("hello");
+		ensure_equals("(1)", getBufferSize(), 5u);
+		resetOnData = true;
+		callConsumedCallback(1, false);
+		ensure("(2)", !isStarted());
+		ensure_equals("(3)", getBufferSize(), 0u);
+	}
+
+	TEST_METHOD(27) {
+		// It may be reset inside the onData callback while there is data buffered in memory,
+		// soon to be written on disk.
+		pipe->setThreshold(3);
+		pipe->openTimeout = 40;
+		consumeImmediately = false;
+		init();
+		startPipe();
+		write("hello");
+		ensure_equals("(1)", getBufferSize(), 5u);
+		ensure("(2)", isCommittingToDisk());
+		usleep(20000);
+		ensure("(3)", isCommittingToDisk());
+		resetOnData = true;
+		callConsumedCallback(1, false);
+		ensure("(4)", !isStarted());
+		ensure_equals("(5)", getBufferSize(), 0u);
+	}
+
+	TEST_METHOD(28) {
+		// It may be reset inside the onData callback while there is data buffered on disk.
+		pipe->setThreshold(3);
+		consumeImmediately = false;
+		init();
+		startPipe();
+		write("hello");
+		ensure_equals("(1)", getBufferSize(), 5u);
+		usleep(20000);
+		ensure("(2)", !isCommittingToDisk());
+
+		resetOnData = true;
+		// The following call will trigger a libeio read operation on the buffer file.
+		callConsumedCallback(1, false);
+
+		EVENTUALLY(1,
+			result = !isStarted();
+		);
+		ensure("(3)", !isStarted());
+		ensure_equals("(4)", getBufferSize(), 0u);
+	}
+}
diff --git a/test/cxx/FileChangeCheckerTest.cpp b/test/cxx/FileChangeCheckerTest.cpp
index 1b7f603..fba4697 100644
--- a/test/cxx/FileChangeCheckerTest.cpp
+++ b/test/cxx/FileChangeCheckerTest.cpp
@@ -40,14 +40,14 @@ namespace tut {
 			TempDir d("test.tmp");
 			touchFile("test.tmp/test.txt");
 			
-			system("chmod a= test.tmp");
+			runShellCommand("chmod a= test.tmp");
 			ensure(!checker.changed("test.tmp/test.txt"));
 			
 			// Should still be false.
 			ensure(!checker.changed("test.tmp/test.txt"));
 			
 			// Now make it accessible again...
-			system("chmod u=rwx test.tmp");
+			runShellCommand("chmod u=rwx test.tmp");
 			ensure(checker.changed("test.tmp/test.txt"));
 		}
 	}
@@ -90,20 +90,20 @@ namespace tut {
 	}
 	
 	TEST_METHOD(6) {
-		// File is changed if existed but has now been deleted.
+		// File is not changed if existed and has now been deleted.
 		FileChangeChecker checker(10);
 		
 		touchFile("test.txt");
 		checker.changed("test.txt");
 		unlink("test.txt");
-		ensure("test.txt is considered changed if it has been deleted",
-			checker.changed("test.txt"));
+		ensure("test.txt is not considered changed if it has been deleted",
+			!checker.changed("test.txt"));
 		
 		touchFile("test2.txt");
 		checker.changed("test2.txt");
 		unlink("test2.txt");
-		ensure("test2.txt is considered changed if it has been deleted",
-			checker.changed("test2.txt"));
+		ensure("test2.txt is not considered changed if it has been deleted",
+			!checker.changed("test2.txt"));
 	}
 	
 	TEST_METHOD(7) {
@@ -138,11 +138,11 @@ namespace tut {
 			checker.changed("test.tmp/test.txt");
 			
 			touchFile("test.tmp/test.txt", 2);
-			system("chmod a= test.tmp");
+			runShellCommand("chmod a= test.tmp");
 			ensure("First check returns false", !checker.changed("test.tmp/test.txt"));
 			
 			// Now make it accessible again...
-			system("chmod u=rwx test.tmp");
+			runShellCommand("chmod u=rwx test.tmp");
 			ensure("Second check returns true", checker.changed("test.tmp/test.txt"));
 		}
 	}
@@ -201,14 +201,14 @@ namespace tut {
 			
 			FileChangeChecker checker(10);
 			TempDir d("test.tmp");
-			touchFile("test.tmp/test.txt");
+			touchFile("test.tmp/test.txt", 1);
 			
 			checker.changed("test.tmp/test.txt");
-			unlink("test.tmp/test.txt");
-			system("chmod a= test.tmp");
-			ensure(!checker.changed("test.tmp/test.txt"));
-			system("chmod u=rwx test.tmp");
-			ensure(checker.changed("test.tmp/test.txt"));
+			touchFile("test.tmp/test.txt", 2);
+			runShellCommand("chmod a= test.tmp");
+			ensure("(1)", !checker.changed("test.tmp/test.txt"));
+			runShellCommand("chmod u=rwx test.tmp");
+			ensure("(2)", checker.changed("test.tmp/test.txt"));
 		}
 	}
 	
@@ -228,9 +228,11 @@ namespace tut {
 		unlink("test.txt");
 		unlink("test2.txt");
 		unlink("test3.txt");
-		ensure("test2.txt is still in the file list", checker.changed("test2.txt"));
-		ensure("test3.txt is still in the file list", checker.changed("test3.txt"));
-		ensure("test.txt is removed from the file list", !checker.changed("test.txt"));
+		ensure("test2.txt is still in the file list", checker.knows("test2.txt"));
+		ensure("test2.txt is not considered changed", !checker.changed("test2.txt"));
+		ensure("test3.txt is still in the file list", checker.knows("test3.txt"));
+		ensure("test3.txt is not considered changed", !checker.changed("test3.txt"));
+		ensure("test.txt is removed from the file list", !checker.knows("test.txt"));
 	}
 	
 	TEST_METHOD(14) {
diff --git a/test/cxx/FilterSupportTest.cpp b/test/cxx/FilterSupportTest.cpp
index a1de623..9972eed 100644
--- a/test/cxx/FilterSupportTest.cpp
+++ b/test/cxx/FilterSupportTest.cpp
@@ -1,5 +1,5 @@
 #include "TestSupport.h"
-#include "LoggingAgent/FilterSupport.h"
+#include "agents/LoggingAgent/FilterSupport.h"
 
 #include <boost/bind.hpp>
 #include <boost/shared_ptr.hpp>
@@ -159,13 +159,13 @@ namespace tut {
 	TEST_METHOD(15) {
 		// String begin and end quote characters must match.
 		try {
-			Filter("uri == 'hello world\"");
+			(void) Filter("uri == 'hello world\"");
 			fail("Syntax error expected");
 		} catch (const SyntaxError &) {
 			// Pass.
 		}
 		try {
-			Filter("uri == \"hello world'");
+			(void) Filter("uri == \"hello world'");
 			fail("Syntax error expected");
 		} catch (const SyntaxError &) {
 			// Pass.
@@ -177,13 +177,13 @@ namespace tut {
 		ctx.uri = "hello world";
 		ensure(Filter("uri =~ %r{hello}").run(ctx));
 		try {
-			Filter("uri =~ /hello}");
+			(void) Filter("uri =~ /hello}");
 			fail("Syntax error expected");
 		} catch (const SyntaxError &) {
 			// Pass.
 		}
 		try {
-			Filter("uri =~ %r{hello/");
+			(void) Filter("uri =~ %r{hello/");
 			fail("Syntax error expected");
 		} catch (const SyntaxError &) {
 			// Pass.
@@ -430,4 +430,4 @@ namespace tut {
 		);
 		ensure_equals(ctx.getResponseTime(), 2);
 	}
-}
\ No newline at end of file
+}
diff --git a/test/cxx/IOUtilsTest.cpp b/test/cxx/IOUtilsTest.cpp
index ae41002..e8aa9ef 100644
--- a/test/cxx/IOUtilsTest.cpp
+++ b/test/cxx/IOUtilsTest.cpp
@@ -475,15 +475,23 @@ namespace tut {
 		Pipe p = createPipe();
 		unsigned long long startTime = SystemTime::getUsec();
 		unsigned long long timeout = 30000;
+		char data1[1024], data2[1024];
+		StaticString data[] = {
+			StaticString(data1, sizeof(data1) - 1),
+			StaticString(data2, sizeof(data2) - 1)
+		};
+		memset(data1, 'x', sizeof(data1));
+		memset(data2, 'y', sizeof(data2));
+
 		try {
-			StaticString data[] = { "hello", "world" };
-			for (int i = 0; i < 1024 * 1024; i++) {
+			for (int i = 0; i < 1024; i++) {
 				gatheredWrite(p[1], data, 2, &timeout);
 			}
 			fail("TimeoutException expected");
 		} catch (const TimeoutException &) {
 			unsigned long long elapsed = SystemTime::getUsec() - startTime;
-			ensure("30 msec have passed", elapsed >= 29000 && elapsed <= 45000);
+			ensure("At least 29 msec have passed", elapsed >= 29000);
+			ensure("At most 95 msec have passed", elapsed <= 95000);
 			ensure(timeout <= 2000);
 		}
 	}
@@ -593,7 +601,7 @@ namespace tut {
 	TEST_METHOD(58) {
 		// readExact() deducts the amount of time spent on waiting from the timeout variable.
 		Pipe p = createPipe();
-		unsigned long long timeout = 60000;
+		unsigned long long timeout = 100000;
 		char buf[3];
 		
 		// Spawn a thread that writes 100 bytes per second, i.e. each byte takes 10 msec.
@@ -601,8 +609,13 @@ namespace tut {
 		
 		// We read 3 bytes.
 		ensure_equals(readExact(p.first, &buf, sizeof(buf), &timeout), 3u);
-		ensure("Should have taken at least 20 msec", timeout <= 60000 - 20000);
-		ensure("Should have taken at most 40 msec", timeout >= 60000 - 40000);
+		ensure("Should have taken at least 20 msec", timeout <= 100000 - 20000);
+		#ifdef __FreeBSD__
+			// Stupid timer resolution on FreeBSD...
+			ensure("Should have taken at most 95 msec", timeout >= 100000 - 95000);
+		#else
+			ensure("Should have taken at most 50 msec", timeout >= 100000 - 40000);
+		#endif
 	}
 	
 	TEST_METHOD(59) {
@@ -734,7 +747,7 @@ namespace tut {
 	TEST_METHOD(68) {
 		// readExact() deducts the amount of time spent on waiting from the timeout variable.
 		Pipe p = createNonBlockingPipe();
-		unsigned long long timeout = 60000;
+		unsigned long long timeout = 100000;
 		
 		// Spawn a thread that reads 200000 bytes in 35 msec.
 		TempThread thr(boost::bind(&readDataSlowly, p.first, 5714286, 5714286));
@@ -742,8 +755,8 @@ namespace tut {
 		// We write 200000 bytes.
 		char buf[200000];
 		writeExact(p.second, &buf, sizeof(buf), &timeout);
-		ensure("Should have taken at least 20 msec", timeout <= 60000 - 20000);
-		ensure("Should have taken at most 40 msec", timeout >= 60000 - 40000);
+		ensure("Should have taken at least 20 msec", timeout <= 100000 - 20000);
+		ensure("Should have taken at most 95 msec", timeout >= 100000 - 95000);
 	}
 	
 	TEST_METHOD(69) {
@@ -804,7 +817,7 @@ namespace tut {
 		SocketPair sockets = createUnixSocketPair();
 		Pipe pipes = createPipe();
 		writeFileDescriptor(sockets[0], pipes[1]);
-		FileDescriptor fd = readFileDescriptor(sockets[1]);
+		FileDescriptor fd(readFileDescriptor(sockets[1]));
 		writeExact(fd, "hello");
 		char buf[6];
 		ensure_equals(readExact(pipes[0], buf, 5), 5u);
@@ -820,12 +833,14 @@ namespace tut {
 		unsigned long long timeout = 30000;
 		unsigned long long startTime = SystemTime::getUsec();
 		try {
-			FileDescriptor fd = readFileDescriptor(sockets[0], &timeout);
+			FileDescriptor fd(readFileDescriptor(sockets[0], &timeout));
 			fail("TimeoutException expected");
 		} catch (const TimeoutException &) {
 			unsigned long long elapsed = SystemTime::getUsec() - startTime;
-			ensure("readFileDescriptor() timed out after 30 msec",
-				elapsed >= 29000 && elapsed <= 45000);
+			ensure("readFileDescriptor() timed out after at least 29 msec",
+				elapsed >= 29000);
+			ensure("readFileDescriptor() timed out after at most 95 msec",
+				elapsed <= 95000);
 			ensure(timeout <= 2000);
 		}
 		
@@ -839,7 +854,7 @@ namespace tut {
 		} catch (const TimeoutException &) {
 			unsigned long long elapsed = SystemTime::getUsec() - startTime;
 			ensure("writeFileDescriptor() timed out after 30 msec",
-				elapsed >= 29000 && elapsed <= 45000);
+				elapsed >= 29000 && elapsed <= 95000);
 			ensure(timeout <= 2000);
 		}
 	}
diff --git a/test/cxx/LoggingTest.cpp b/test/cxx/LoggingTest.cpp
deleted file mode 100644
index 7b3dfa3..0000000
--- a/test/cxx/LoggingTest.cpp
+++ /dev/null
@@ -1,777 +0,0 @@
-#include "TestSupport.h"
-#include <Logging.h>
-#include <MessageClient.h>
-#include <LoggingAgent/LoggingServer.h>
-#include <Utils/MessageIO.h>
-
-#include <boost/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <oxt/thread.hpp>
-#include <set>
-
-using namespace Passenger;
-using namespace std;
-using namespace oxt;
-
-namespace tut {
-	struct LoggingTest {
-		static const unsigned long long YESTERDAY = 1263299017000000ull;  // January 12, 2009, 12:23:37 UTC
-		static const unsigned long long TODAY     = 1263385422000000ull;  // January 13, 2009, 12:23:42 UTC
-		static const unsigned long long TOMORROW  = 1263471822000000ull;  // January 14, 2009, 12:23:42 UTC
-		#define FOOBAR_MD5 "3858f62230ac3c915f300c664312c63f"
-		#define LOCALHOST_MD5 "421aa90e079fa326b6494f812ad13e79"
-		#define REMOTEHOST_MD5 "2c18e486683a3db1e645ad8523223b72"
-		#define FOOBAR_LOCALHOST_PREFIX FOOBAR_MD5 "/" LOCALHOST_MD5
-		#define FOOBAR_REMOTEHOST_PREFIX FOOBAR_MD5 "/" REMOTEHOST_MD5
-		#define TODAY_TXN_ID "cjb8n-abcd"
-		#define TODAY_TIMESTAMP_STR "cftz90m3k0"
-		
-		ServerInstanceDirPtr serverInstanceDir;
-		ServerInstanceDir::GenerationPtr generation;
-		string socketFilename;
-		string socketAddress;
-		string loggingDir;
-		AccountsDatabasePtr accountsDatabase;
-		ev::dynamic_loop eventLoop;
-		FileDescriptor serverFd;
-		LoggingServerPtr server;
-		shared_ptr<oxt::thread> serverThread;
-		AnalyticsLoggerPtr logger, logger2, logger3, logger4;
-		
-		LoggingTest() {
-			createServerInstanceDirAndGeneration(serverInstanceDir, generation);
-			socketFilename = generation->getPath() + "/logging.socket";
-			socketAddress = "unix:" + socketFilename;
-			loggingDir = generation->getPath() + "/logs";
-			accountsDatabase = ptr(new AccountsDatabase());
-			accountsDatabase->add("test", "1234", false);
-			setLogLevel(-1);
-			
-			startLoggingServer();
-			logger = ptr(new AnalyticsLogger(socketAddress, "test", "1234",
-				"localhost"));
-			logger2 = ptr(new AnalyticsLogger(socketAddress, "test", "1234",
-				"localhost"));
-			logger3 = ptr(new AnalyticsLogger(socketAddress, "test", "1234",
-				"localhost"));
-			logger4 = ptr(new AnalyticsLogger(socketAddress, "test", "1234",
-				"localhost"));
-		}
-		
-		~LoggingTest() {
-			stopLoggingServer();
-			SystemTime::releaseAll();
-			setLogLevel(0);
-		}
-		
-		void startLoggingServer(const function<void ()> &initFunc = function<void ()>()) {
-			serverFd = createUnixServer(socketFilename.c_str());
-			server = ptr(new LoggingServer(eventLoop,
-				serverFd, accountsDatabase, loggingDir));
-			if (initFunc) {
-				initFunc();
-			}
-			serverThread = ptr(new oxt::thread(
-				boost::bind(&LoggingTest::runLoop, this)
-			));
-		}
-		
-		void stopLoggingServer(bool destroy = true) {
-			if (serverThread != NULL) {
-				MessageClient client;
-				client.connect(socketAddress, "test", "1234");
-				client.write("exit", "immediately", NULL);
-				joinLoggingServer(destroy);
-			}
-		}
-		
-		void joinLoggingServer(bool destroy = true) {
-			serverThread->join();
-			serverThread.reset();
-			if (destroy) {
-				server.reset();
-			}
-			unlink(socketFilename.c_str());
-		}
-		
-		void runLoop() {
-			eventLoop.loop();
-			serverFd.close();
-		}
-		
-		string timestampString(unsigned long long timestamp) {
-			char str[2 * sizeof(unsigned long long) + 1];
-			integerToHexatri<unsigned long long>(timestamp, str);
-			return str;
-		}
-		
-		MessageClient createConnection(bool sendInitCommand = true) {
-			MessageClient client;
-			vector<string> args;
-			client.connect(socketAddress, "test", "1234");
-			if (sendInitCommand) {
-				client.write("init", "localhost", NULL);
-				client.read(args);
-			}
-			return client;
-		}
-	};
-	
-	DEFINE_TEST_GROUP(LoggingTest);
-	
-	
-	/*********** Logging interface tests ***********/
-	
-	TEST_METHOD(1) {
-		// Test logging of new transaction.
-		SystemTime::forceAll(YESTERDAY);
-		
-		AnalyticsLogPtr log = logger->newTransaction("foobar");
-		log->message("hello");
-		log->message("world");
-		log->flushToDiskAfterClose(true);
-		
-		ensure(!logger->isNull());
-		ensure(!log->isNull());
-		
-		log.reset();
-		
-		string data = readAll(loggingDir + "/1/" FOOBAR_LOCALHOST_PREFIX "/requests/2010/01/12/12/log.txt");
-		ensure(data.find("hello\n") != string::npos);
-		ensure(data.find("world\n") != string::npos);
-	}
-	
-	TEST_METHOD(2) {
-		// Test logging of existing transaction.
-		SystemTime::forceAll(YESTERDAY);
-		
-		AnalyticsLogPtr log = logger->newTransaction("foobar");
-		log->message("message 1");
-		log->flushToDiskAfterClose(true);
-		
-		AnalyticsLogPtr log2 = logger2->continueTransaction(log->getTxnId(),
-			log->getGroupName(), log->getCategory());
-		log2->message("message 2");
-		log2->flushToDiskAfterClose(true);
-		
-		log.reset();
-		log2.reset();
-		
-		string data = readAll(loggingDir + "/1/" FOOBAR_LOCALHOST_PREFIX "/requests/2010/01/12/12/log.txt");
-		ensure("(1)", data.find("message 1\n") != string::npos);
-		ensure("(2)", data.find("message 2\n") != string::npos);
-	}
-	
-	TEST_METHOD(3) {
-		// Test logging with different points in time.
-		SystemTime::forceAll(YESTERDAY);
-		AnalyticsLogPtr log = logger->newTransaction("foobar");
-		log->message("message 1");
-		SystemTime::forceAll(TODAY);
-		log->message("message 2");
-		log->flushToDiskAfterClose(true);
-		
-		SystemTime::forceAll(TOMORROW);
-		AnalyticsLogPtr log2 = logger2->continueTransaction(log->getTxnId(),
-			log->getGroupName(), log->getCategory());
-		log2->message("message 3");
-		log2->flushToDiskAfterClose(true);
-		
-		AnalyticsLogPtr log3 = logger3->newTransaction("foobar");
-		log3->message("message 4");
-		log3->flushToDiskAfterClose(true);
-		
-		log.reset();
-		log2.reset();
-		log3.reset();
-		
-		string yesterdayData = readAll(loggingDir + "/1/" FOOBAR_LOCALHOST_PREFIX "/requests/2010/01/12/12/log.txt");
-		string tomorrowData = readAll(loggingDir + "/1/" FOOBAR_LOCALHOST_PREFIX "/requests/2010/01/14/12/log.txt");
-		ensure("(1)", yesterdayData.find(timestampString(YESTERDAY) + " 1 message 1\n") != string::npos);
-		ensure("(2)", yesterdayData.find(timestampString(TODAY) + " 2 message 2\n") != string::npos);
-		ensure("(3)", yesterdayData.find(timestampString(TOMORROW) + " 4 message 3\n") != string::npos);
-		ensure("(4)", tomorrowData.find(timestampString(TOMORROW) + " 1 message 4\n") != string::npos);
-	}
-	
-	TEST_METHOD(4) {
-		// newTransaction() and continueTransaction() write an ATTACH message
-		// to the log file, while AnalyticsLogPtr writes a DETACH message upon
-		// destruction.
-		SystemTime::forceAll(YESTERDAY);
-		AnalyticsLogPtr log = logger->newTransaction("foobar");
-		
-		SystemTime::forceAll(TODAY);
-		AnalyticsLogPtr log2 = logger2->continueTransaction(log->getTxnId(),
-			log->getGroupName(), log->getCategory());
-		log2->flushToDiskAfterClose(true);
-		log2.reset();
-		
-		SystemTime::forceAll(TOMORROW);
-		log->flushToDiskAfterClose(true);
-		log.reset();
-		
-		string data = readAll(loggingDir + "/1/" FOOBAR_LOCALHOST_PREFIX "/requests/2010/01/12/12/log.txt");
-		ensure("(1)", data.find(timestampString(YESTERDAY) + " 0 ATTACH\n") != string::npos);
-		ensure("(2)", data.find(timestampString(TODAY) + " 1 ATTACH\n") != string::npos);
-		ensure("(3)", data.find(timestampString(TODAY) + " 2 DETACH\n") != string::npos);
-		ensure("(4)", data.find(timestampString(TOMORROW) + " 3 DETACH\n") != string::npos);
-	}
-	
-	TEST_METHOD(5) {
-		// newTransaction() generates a new ID, while continueTransaction()
-		// reuses the ID.
-		AnalyticsLogPtr log = logger->newTransaction("foobar");
-		AnalyticsLogPtr log2 = logger2->newTransaction("foobar");
-		AnalyticsLogPtr log3 = logger3->continueTransaction(log->getTxnId(),
-			log->getGroupName(), log->getCategory());
-		AnalyticsLogPtr log4 = logger4->continueTransaction(log2->getTxnId(),
-			log2->getGroupName(), log2->getCategory());
-		
-		ensure_equals(log->getTxnId(), log3->getTxnId());
-		ensure_equals(log2->getTxnId(), log4->getTxnId());
-		ensure(log->getTxnId() != log2->getTxnId());
-	}
-	
-	TEST_METHOD(6) {
-		// An empty AnalyticsLog doesn't do anything.
-		AnalyticsLog log;
-		ensure(log.isNull());
-		log.message("hello world");
-		ensure_equals(getFileType(loggingDir), FT_NONEXISTANT);
-	}
-	
-	TEST_METHOD(7) {
-		// An empty AnalyticsLogger doesn't do anything.
-		AnalyticsLogger logger;
-		ensure(logger.isNull());
-		
-		AnalyticsLogPtr log = logger.newTransaction("foo");
-		ensure(log->isNull());
-		log->message("hello world");
-		ensure_equals(getFileType(loggingDir), FT_NONEXISTANT);
-	}
-	
-	TEST_METHOD(8) {
-		// It creates a file group_name.txt under the group directory.
-		AnalyticsLogPtr log = logger->newTransaction("foobar");
-		log->flushToDiskAfterClose(true);
-		log.reset();
-		string data = readAll(loggingDir + "/1/" FOOBAR_MD5 "/group_name.txt");
-		ensure_equals(data, "foobar");
-	}
-	
-	TEST_METHOD(9) {
-		// It creates a file node_name.txt under the node directory.
-		AnalyticsLogPtr log = logger->newTransaction("foobar");
-		log->flushToDiskAfterClose(true);
-		log.reset();
-		string data = readAll(loggingDir + "/1/" FOOBAR_LOCALHOST_PREFIX "/node_name.txt");
-		ensure_equals(data, "localhost");
-	}
-	
-	TEST_METHOD(11) {
-		// newTransaction() does not reconnect to the server for a short
-		// period of time if connecting failed
-		logger->setReconnectTimeout(60 * 1000000);
-		logger->setMaxConnectTries(1);
-		
-		SystemTime::forceAll(TODAY);
-		stopLoggingServer();
-		ensure(logger->newTransaction("foobar")->isNull());
-		
-		SystemTime::forceAll(TODAY + 30 * 1000000);
-		startLoggingServer();
-		ensure(logger->newTransaction("foobar")->isNull());
-		
-		SystemTime::forceAll(TODAY + 61 * 1000000);
-		ensure(!logger->newTransaction("foobar")->isNull());
-	}
-	
-	TEST_METHOD(12) {
-		// If the logging server crashed and was restarted then
-		// newTransaction() and continueTransaction() print a warning and return
-		// a null log object. One of the next newTransaction()/continueTransaction()
-		// calls will reestablish the connection when the connection timeout
-		// has passed.
-		SystemTime::forceAll(TODAY);
-		AnalyticsLogPtr log, log2;
-		
-		log = logger->newTransaction("foobar");
-		logger2->continueTransaction(log->getTxnId(), "foobar");
-		stopLoggingServer();
-		startLoggingServer();
-		
-		log = logger->newTransaction("foobar");
-		ensure("(1)", log->isNull());
-		log2 = logger2->continueTransaction("some-id", "foobar");
-		ensure("(2)", log2->isNull());
-		
-		SystemTime::forceAll(TODAY + 60000000);
-		log = logger->newTransaction("foobar");
-		ensure("(3)", !log->isNull());
-		log2 = logger2->continueTransaction(log->getTxnId(), "foobar");
-		ensure("(4)", !log2->isNull());
-		log2->message("hello");
-		log2->flushToDiskAfterClose(true);
-		log.reset();
-		log2.reset();
-		
-		string data = readAll(loggingDir + "/1/" FOOBAR_LOCALHOST_PREFIX "/requests/2010/01/13/12/log.txt");
-		ensure("(5)", data.find("hello\n") != string::npos);
-	}
-	
-	TEST_METHOD(13) {
-		// continueTransaction() does not reconnect to the server for a short
-		// period of time if connecting failed
-		logger->setReconnectTimeout(60 * 1000000);
-		logger->setMaxConnectTries(1);
-		logger2->setReconnectTimeout(60 * 1000000);
-		logger2->setMaxConnectTries(1);
-		
-		SystemTime::forceAll(TODAY);
-		AnalyticsLogPtr log = logger->newTransaction("foobar");
-		logger2->continueTransaction(log->getTxnId(), "foobar");
-		stopLoggingServer();
-		ensure(logger2->continueTransaction(log->getTxnId(), "foobar")->isNull());
-		
-		SystemTime::forceAll(TODAY + 30 * 1000000);
-		startLoggingServer();
-		ensure(logger2->continueTransaction(log->getTxnId(), "foobar")->isNull());
-		
-		SystemTime::forceAll(TODAY + 61 * 1000000);
-		ensure(!logger2->continueTransaction(log->getTxnId(), "foobar")->isNull());
-	}
-	
-	TEST_METHOD(14) {
-		// If a client disconnects from the logging server then all its
-		// transactions that are no longer referenced and have crash protection enabled
-		// will be closed and written to to the sink.
-		MessageClient client1 = createConnection();
-		MessageClient client2 = createConnection();
-		MessageClient client3 = createConnection();
-		vector<string> args;
-		string filename = loggingDir + "/1/" FOOBAR_LOCALHOST_PREFIX "/requests/2010/01/13/12/log.txt";
-		
-		SystemTime::forceAll(TODAY);
-		
-		client1.write("openTransaction",
-			TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR,
-			"", "true", NULL);
-		client2.write("openTransaction",
-			TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR,
-			"", "true", NULL);
-		client2.write("flush", NULL);
-		client2.read(args);
-		client2.disconnect();
-		
-		SHOULD_NEVER_HAPPEN(100,
-			result = fileExists(filename) && !readAll(filename).empty();
-		);
-		client1.disconnect();
-		client3.write("flush", NULL);
-		client3.read(args);
-		EVENTUALLY(5,
-			result = fileExists(filename) && !readAll(filename).empty();
-		);
-	}
-	
-	TEST_METHOD(15) {
-		// If a client disconnects from the logging server then all its
-		// transactions that are no longer referenced and don't have crash
-		// protection enabled will be closed and discarded.
-		MessageClient client1 = createConnection();
-		MessageClient client2 = createConnection();
-		MessageClient client3 = createConnection();
-		vector<string> args;
-		string filename = loggingDir + "/1/" FOOBAR_LOCALHOST_PREFIX "/requests/2010/01/13/12/log.txt";
-		
-		SystemTime::forceAll(TODAY);
-		
-		client1.write("openTransaction",
-			TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR,
-			"", "false", NULL);
-		client2.write("openTransaction",
-			TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR,
-			"", "false", NULL);
-		client2.write("flush", NULL);
-		client2.read(args);
-		client2.disconnect();
-		client1.disconnect();
-		client3.write("flush", NULL);
-		client3.read(args);
-		SHOULD_NEVER_HAPPEN(500,
-			result = fileExists(filename) && !readAll(filename).empty();
-		);
-	}
-	
-	TEST_METHOD(16) {
-		// Upon server shutdown, all transaction that have crash protection enabled
-		// will be closed and written to to the sink.
-		MessageClient client1 = createConnection();
-		MessageClient client2 = createConnection();
-		vector<string> args;
-		string filename = loggingDir + "/1/" FOOBAR_LOCALHOST_PREFIX "/requests/2010/01/13/12/log.txt";
-		
-		SystemTime::forceAll(TODAY);
-		
-		client1.write("openTransaction",
-			TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR,
-			"", "true", NULL);
-		client2.write("openTransaction",
-			TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR,
-			"", "true", NULL);
-		client2.write("flush", NULL);
-		client2.read(args);
-		
-		stopLoggingServer();
-		EVENTUALLY(5,
-			result = fileExists(filename) && !readAll(filename).empty();
-		);
-	}
-	
-	TEST_METHOD(17) {
-		// Upon server shutdown, all transaction that don't have crash protection
-		// enabled will be discarded.
-		MessageClient client1 = createConnection();
-		MessageClient client2 = createConnection();
-		vector<string> args;
-		string filename = loggingDir + "/1/" FOOBAR_LOCALHOST_PREFIX "/requests/2010/01/13/12/log.txt";
-		
-		SystemTime::forceAll(TODAY);
-		
-		client1.write("openTransaction",
-			TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR,
-			"", "false", NULL);
-		client2.write("openTransaction",
-			TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR,
-			"", "false", NULL);
-		client2.write("flush", NULL);
-		client2.read(args);
-		
-		stopLoggingServer();
-		SHOULD_NEVER_HAPPEN(200,
-			result = fileExists(filename) && !readAll(filename).empty();
-		);
-	}
-	
-	TEST_METHOD(18) {
-		// Test DataStoreId
-		{
-			// Empty construction.
-			DataStoreId id;
-			ensure_equals(id.getGroupName(), "");
-			ensure_equals(id.getNodeName(), "");
-			ensure_equals(id.getCategory(), "");
-		}
-		{
-			// Normal construction.
-			DataStoreId id("ab", "cd", "ef");
-			ensure_equals(id.getGroupName(), "ab");
-			ensure_equals(id.getNodeName(), "cd");
-			ensure_equals(id.getCategory(), "ef");
-		}
-		{
-			// Copy constructor.
-			DataStoreId id("ab", "cd", "ef");
-			DataStoreId id2(id);
-			ensure_equals(id2.getGroupName(), "ab");
-			ensure_equals(id2.getNodeName(), "cd");
-			ensure_equals(id2.getCategory(), "ef");
-		}
-		{
-			// Assignment operator.
-			DataStoreId id("ab", "cd", "ef");
-			DataStoreId id2;
-			id2 = id;
-			ensure_equals(id2.getGroupName(), "ab");
-			ensure_equals(id2.getNodeName(), "cd");
-			ensure_equals(id2.getCategory(), "ef");
-			
-			DataStoreId id3("gh", "ij", "kl");
-			id3 = id;
-			ensure_equals(id3.getGroupName(), "ab");
-			ensure_equals(id3.getNodeName(), "cd");
-			ensure_equals(id3.getCategory(), "ef");
-		}
-		{
-			// < operator
-			DataStoreId id, id2;
-			ensure(!(id < id2));
-			
-			id = DataStoreId("ab", "cd", "ef");
-			id2 = DataStoreId("ab", "cd", "ef");
-			ensure(!(id < id2));
-			
-			id = DataStoreId("ab", "cd", "ef");
-			id2 = DataStoreId("bb", "cd", "ef");
-			ensure(id < id2);
-			
-			id = DataStoreId("ab", "cd", "ef");
-			id2 = DataStoreId();
-			ensure(id2 < id);
-			
-			id = DataStoreId();
-			id2 = DataStoreId("ab", "cd", "ef");
-			ensure(id < id2);
-		}
-		{
-			// == operator
-			ensure(DataStoreId() == DataStoreId());
-			ensure(DataStoreId("ab", "cd", "ef") == DataStoreId("ab", "cd", "ef"));
-			ensure(!(DataStoreId("ab", "cd", "ef") == DataStoreId()));
-			ensure(!(DataStoreId("ab", "cd", "ef") == DataStoreId("ab", "cd", "e")));
-			ensure(!(DataStoreId("ab", "cd", "ef") == DataStoreId("ab", "c", "ef")));
-			ensure(!(DataStoreId("ab", "cd", "ef") == DataStoreId("a", "cd", "ef")));
-		}
-	}
-	
-	TEST_METHOD(21) {
-		// The server temporarily buffers data in memory.
-		SystemTime::forceAll(YESTERDAY);
-		
-		AnalyticsLogPtr log = logger->newTransaction("foobar");
-		log->message("hello world");
-		log.reset();
-		
-		// Give server some time to process these commands.
-		usleep(20000);
-		
-		string filename = loggingDir + "/1/" FOOBAR_LOCALHOST_PREFIX "/requests/2010/01/12/12/log.txt";
-		struct stat buf;
-		ensure_equals(stat(filename.c_str(), &buf), 0);
-		ensure_equals(buf.st_size, (off_t) 0);
-	}
-	
-	TEST_METHOD(22) {
-		// The destructor flushes all data.
-		SystemTime::forceAll(YESTERDAY);
-		
-		AnalyticsLogPtr log = logger->newTransaction("foobar");
-		log->message("hello world");
-		log.reset();
-		stopLoggingServer();
-		
-		string filename = loggingDir + "/1/" FOOBAR_LOCALHOST_PREFIX "/requests/2010/01/12/12/log.txt";
-		struct stat buf;
-		ensure_equals(stat(filename.c_str(), &buf), 0);
-		ensure(buf.st_size > 0);
-	}
-	
-	TEST_METHOD(23) {
-		// The 'flush' command flushes all data.
-		SystemTime::forceAll(YESTERDAY);
-		
-		AnalyticsLogPtr log = logger->newTransaction("foobar");
-		log->message("hello world");
-		log.reset();
-		
-		vector<string> args;
-		writeArrayMessage(logger->getConnection(), "flush", NULL);
-		ensure(readArrayMessage(logger->getConnection(), args));
-		ensure_equals(args.size(), 1u);
-		ensure_equals(args[0], "ok");
-		
-		string filename = loggingDir + "/1/" FOOBAR_LOCALHOST_PREFIX "/requests/2010/01/12/12/log.txt";
-		struct stat buf;
-		ensure_equals(stat(filename.c_str(), &buf), 0);
-		ensure(buf.st_size > 0);
-	}
-	
-	TEST_METHOD(24) {
-		// A transaction's data is not written out by the server
-		// until the transaction is fully closed.
-		SystemTime::forceAll(YESTERDAY);
-		vector<string> args;
-		
-		AnalyticsLogPtr log = logger->newTransaction("foobar");
-		log->message("hello world");
-		
-		AnalyticsLogPtr log2 = logger2->continueTransaction(log->getTxnId(),
-			log->getGroupName(), log->getCategory());
-		log2->message("message 2");
-		log2.reset();
-		
-		writeArrayMessage(logger->getConnection(), "flush", NULL);
-		ensure(readArrayMessage(logger->getConnection(), args));
-		
-		writeArrayMessage(logger2->getConnection(), "flush", NULL);
-		ensure(readArrayMessage(logger2->getConnection(), args));
-		
-		string filename = loggingDir + "/1/" FOOBAR_LOCALHOST_PREFIX "/requests/2010/01/12/12/log.txt";
-		struct stat buf;
-		ensure_equals(stat(filename.c_str(), &buf), 0);
-		ensure_equals(buf.st_size, (off_t) 0);
-	}
-	
-	TEST_METHOD(25) {
-		// The 'exit' command causes the logging server to exit some time after
-		// the last client has disconnected. New clients are still accepted
-		// as long as the server hasn't exited.
-		SystemTime::forceAll(YESTERDAY);
-		vector<string> args;
-		
-		MessageClient client = createConnection();
-		
-		MessageClient client2 = createConnection();
-		client2.write("exit", NULL);
-		ensure("(1)", client2.read(args));
-		ensure_equals(args.size(), 1u);
-		ensure_equals(args[0], "Passed security");
-		ensure("(2)", client2.read(args));
-		ensure_equals(args.size(), 1u);
-		ensure_equals(args[0], "exit command received");
-		client2.disconnect();
-		
-		// Not exited yet: there is still a client.
-		client2 = createConnection();
-		client2.write("ping", NULL);
-		ensure("(3)", client2.read(args));
-		client2.disconnect();
-		
-		client.disconnect();
-		setLogLevel(-2);
-		usleep(25000); // Give server some time to process the connection closes.
-		
-		// No clients now, but we can still connect because the timeout
-		// hasn't passed yet.
-		SystemTime::forceAll(YESTERDAY + 1000000);
-		SHOULD_NEVER_HAPPEN(250,
-			try {
-				close(connectToUnixServer(socketFilename));
-				result = false;
-			} catch (const SystemException &) {
-				result = true;
-			}
-		);
-		
-		usleep(50000); // Give server some time to process the connection closes.
-		
-		// It'll be gone in a few seconds.
-		SystemTime::forceAll(YESTERDAY + 1000000 + 5000000);
-		usleep(100000); // Give server some time to run the timer.
-		try {
-			close(connectToUnixServer(socketFilename));
-			fail("(4)");
-		} catch (const SystemException &) {
-			// Success
-		}
-		
-		joinLoggingServer();
-	}
-	
-	TEST_METHOD(26) {
-		// The 'exit semi-gracefully' command causes the logging server to
-		// refuse new clients while exiting some time after the last client has
-		// disconnected.
-		SystemTime::forceAll(YESTERDAY);
-		vector<string> args;
-		
-		MessageClient client = createConnection();
-		
-		MessageClient client2 = createConnection();
-		client2.write("exit", "semi-gracefully", NULL);
-		client2.disconnect();
-		
-		// New connections are refused.
-		client2 = createConnection();
-		ensure("(1)", !client2.read(args));
-		
-		client.disconnect();
-		setLogLevel(-2);
-		usleep(50000); // Give server some time to process the connection closes.
-		
-		// It'll be gone in a few seconds.
-		SystemTime::forceAll(YESTERDAY + 1000000 + 5000000);
-		usleep(100000); // Give server some time to run the timer.
-		try {
-			close(connectToUnixServer(socketFilename));
-			fail("(2)");
-		} catch (const SystemException &) {
-			// Success
-		}
-		
-		joinLoggingServer();
-	}
-	
-	TEST_METHOD(27) {
-		// The 'exit immediately' command causes the logging server to
-		// immediately exit. Open transactions are not automatically
-		// closed and written out, even those with crash protection
-		// turned on.
-		SystemTime::forceAll(YESTERDAY);
-		
-		AnalyticsLogPtr log = logger->newTransaction("foobar");
-		log->message("hello world");
-		log.reset();
-		
-		MessageClient client = createConnection();
-		client.write("exit", "immediately", NULL);
-		client.disconnect();
-		
-		// Assertion: the following doesn't block.
-		joinLoggingServer();
-	}
-	
-	TEST_METHOD(28) {
-		// AnalyticsLogger treats a server that's semi-gracefully exiting as
-		// one that's refusing connections.
-		SystemTime::forceAll(YESTERDAY);
-		
-		MessageClient client = createConnection();
-		client.write("exit", "semi-gracefully", NULL);
-		client.disconnect();
-		
-		logger->setMaxConnectTries(1);
-		AnalyticsLogPtr log = logger->newTransaction("foobar");
-		ensure(log->isNull());
-	}
-	
-	TEST_METHOD(29) {
-		// One can supply a custom node name per openTransaction command.
-		MessageClient client1 = createConnection();
-		vector<string> args;
-		string filename = loggingDir + "/1/" FOOBAR_REMOTEHOST_PREFIX "/requests/2010/01/13/12/log.txt";
-		
-		SystemTime::forceAll(TODAY);
-		
-		client1.write("openTransaction",
-			TODAY_TXN_ID, "foobar", "remote", "requests", TODAY_TIMESTAMP_STR,
-			"", "true", NULL);
-		client1.write("closeTransaction", TODAY_TXN_ID, TODAY_TIMESTAMP_STR, NULL);
-		client1.write("flush", NULL);
-		client1.read(args);
-		client1.disconnect();
-		
-		ensure(fileExists(filename));
-	}
-	
-	TEST_METHOD(30) {
-		// A transaction is only written to the sink if it passes all given filters.
-		// Test logging of new transaction.
-		SystemTime::forceAll(YESTERDAY);
-		
-		AnalyticsLogPtr log = logger->newTransaction("foobar", "requests", "",
-			"uri == \"/foo\""
-			"\1"
-			"uri != \"/bar\"");
-		log->message("URI: /foo");
-		log->message("transaction 1");
-		log->flushToDiskAfterClose(true);
-		log.reset();
-		
-		log = logger->newTransaction("foobar", "requests", "",
-			"uri == \"/foo\""
-			"\1"
-			"uri == \"/bar\"");
-		log->message("URI: /foo");
-		log->message("transaction 2");
-		log->flushToDiskAfterClose(true);
-		log.reset();
-		
-		string data = readAll(loggingDir + "/1/" FOOBAR_LOCALHOST_PREFIX "/requests/2010/01/12/12/log.txt");
-		ensure("(1)", data.find("transaction 1\n") != string::npos);
-		ensure("(2)", data.find("transaction 2\n") == string::npos);
-	}
-	
-	/************************************/
-}
diff --git a/test/cxx/MessageChannelTest.cpp b/test/cxx/MessageChannelTest.cpp
deleted file mode 100644
index cf0aa5e..0000000
--- a/test/cxx/MessageChannelTest.cpp
+++ /dev/null
@@ -1,557 +0,0 @@
-#include "TestSupport.h"
-#include "MessageChannel.h"
-
-#include <boost/thread.hpp>
-#include <boost/bind.hpp>
-#include <oxt/thread.hpp>
-#include <utility>
-
-#include <cstring>
-#include <cstdio>
-
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.h>
-
-using namespace Passenger;
-using namespace std;
-using namespace boost;
-using namespace oxt;
-
-namespace tut {
-	struct MessageChannelTest {
-		MessageChannel reader, writer;
-		int p[2];
-
-		MessageChannelTest() {
-			if (pipe(p) != 0) {
-				throw SystemException("Cannot create a pipe", errno);
-			}
-			reader = MessageChannel(p[0]);
-			writer = MessageChannel(p[1]);
-		}
-		
-		~MessageChannelTest() {
-			reader.close();
-			writer.close();
-		}
-		
-		static void writeDataAfterSomeTime(int fd, unsigned int sleepTimeInMsec) {
-			try {
-				syscalls::usleep(sleepTimeInMsec * 1000);
-				syscalls::write(fd, "hi", 2);
-			} catch (const boost::thread_interrupted &) {
-				// Do nothing.
-			}
-		}
-
-		static void writeDataSlowly(int fd, unsigned int bytesToWrite, unsigned int bytesPerSec) {
-			try {
-				for (unsigned i = 0; i < bytesToWrite && !boost::this_thread::interruption_requested(); i++) {
-					syscalls::write(fd, "x", 1);
-					syscalls::usleep(1000000 / bytesPerSec);
-				}
-			} catch (const boost::thread_interrupted &) {
-				// Do nothing.
-			}
-		}
-	};
-
-	DEFINE_TEST_GROUP(MessageChannelTest);
-
-	TEST_METHOD(1) {
-		// read() should be able to parse a message constructed by write(name, ...).
-		vector<string> args;
-		
-		writer.write("hello", "world", "!", NULL);
-		ensure("End of file has not been reached", reader.read(args));
-		ensure_equals("read() returns the same number of arguments as passed to write()", args.size(), 3u);
-		ensure_equals(args[0], "hello");
-		ensure_equals(args[1], "world");
-		ensure_equals(args[2], "!");
-	}
-	
-	TEST_METHOD(2) {
-		// read() should be able to parse a message constructed by write(list).
-		list<string> input;
-		vector<string> output;
-		
-		input.push_back("hello");
-		input.push_back("world");
-		input.push_back("!");
-		writer.write(input);
-		ensure("End of file has not been reached", reader.read(output));
-		ensure_equals("read() returns the same number of arguments as passed to write()", input.size(), output.size());
-		
-		list<string>::const_iterator it;
-		vector<string>::const_iterator it2;
-		for (it = input.begin(), it2 = output.begin(); it != input.end(); it++, it2++) {
-			ensure_equals(*it, *it2);
-		}
-	}
-	
-	TEST_METHOD(3) {
-		// write() should be able to properly serialize arguments that contain whitespace.
-		vector<string> args;
-		writer.write("hello", "world with whitespaces", "!!!", NULL);
-		ensure("End of file has not been reached", reader.read(args));
-		ensure_equals(args[1], "world with whitespaces");
-	}
-	
-	TEST_METHOD(4) {
-		// read() should be able to read messages constructed by the Ruby implementation.
-		// write() should be able to construct messages that can be read by the Ruby implementation.
-		// Multiple read() and write() calls should work (i.e. the MessageChannel should have stream properties).
-		// End of file should be properly detected.
-		int p1[2], p2[2];
-		pid_t pid;
-		
-		pipe(p1);
-		pipe(p2);
-		pid = fork();
-		if (pid == 0) {
-			close(p[0]);
-			close(p[1]);
-			dup2(p1[0], 0);
-			dup2(p2[1], 1);
-			close(p1[0]);
-			close(p1[1]);
-			close(p2[0]);
-			close(p2[1]);
-			execlp("ruby", "ruby", "./stub/message_channel.rb", (char *) 0);
-			perror("Cannot execute ruby");
-			_exit(1);
-		} else {
-			MessageChannel input(p1[1]);
-			MessageChannel output(p2[0]);
-			close(p1[0]);
-			close(p2[1]);
-			
-			input.write("hello", "my beautiful", "world", NULL);
-			input.write("you have", "not enough", "minerals", NULL);
-			input.close();
-			
-			vector<string> message1, message2, message3;
-			ensure("End of stream has not been reached (1)", output.read(message1));
-			ensure("End of stream has not been reached (2)", output.read(message2));
-			ensure("End of file has been reached", !output.read(message3));
-			output.close();
-			waitpid(pid, NULL, 0);
-			
-			ensure_equals("First message is correctly transformed by the mock object",
-				message1.size(), 4u);
-			ensure_equals(message1[0], "hello");
-			ensure_equals(message1[1], "my beautiful");
-			ensure_equals(message1[2], "world");
-			ensure_equals(message1[3], "!!");
-			
-			ensure_equals("Second message is correctly transformed by the mock object",
-				message2.size(), 4u);
-			ensure_equals(message2[0], "you have");
-			ensure_equals(message2[1], "not enough");
-			ensure_equals(message2[2], "minerals");
-			ensure_equals(message2[3], "??");
-		}
-	}
-	
-	TEST_METHOD(6) {
-		// write(name) should generate a correct message even if there are no additional arguments.
-		writer.write("hello", NULL);
-		vector<string> args;
-		reader.read(args);
-		ensure_equals(args.size(), 1u);
-		ensure_equals(args[0], "hello");
-	}
-	
-	TEST_METHOD(7) {
-		// writeFileDescriptor() and receiveFileDescriptor() should work.
-		int s[2], my_pipe[2], fd;
-		socketpair(AF_UNIX, SOCK_STREAM, 0, s);
-		MessageChannel channel1(s[0]);
-		MessageChannel channel2(s[1]);
-		
-		pipe(my_pipe);
-		boost::thread thr(bind(
-			&MessageChannel::writeFileDescriptor,
-			&channel1,
-			my_pipe[1],
-			true
-		));
-		fd = channel2.readFileDescriptor();
-		thr.join();
-		
-		char buf[5];
-		write(fd, "hello", 5);
-		close(fd);
-		read(my_pipe[0], buf, 5);
-		ensure(memcmp(buf, "hello", 5) == 0);
-		
-		close(s[0]);
-		close(s[1]);
-		close(my_pipe[0]);
-		close(my_pipe[1]);
-	}
-	
-	TEST_METHOD(8) {
-		// write() should be able to construct a message that consists of only an empty string.
-		// read() should be able to read a message that consists of only an empty string.
-		vector<string> args;
-		
-		writer.write("", NULL);
-		reader.read(args);
-		ensure_equals(args.size(), 1u);
-		ensure_equals(args[0], "");
-	}
-	
-	TEST_METHOD(9) {
-		// readScalar() should be able to read messages constructed by writeScalar().
-		// This also tests readExact()/writeExact() because readScalar()/writeScalar() uses
-		// them internally.
-		writer.writeScalar("hello\n\r world!!!");
-		writer.writeScalar("  and this is a second message");
-		
-		string output;
-		ensure("End of stream has not been reached (1)", reader.readScalar(output));
-		ensure_equals(output, "hello\n\r world!!!");
-		
-		ensure("End of stream has not been reached (2)", reader.readScalar(output));
-		ensure_equals(output, "  and this is a second message");
-	}
-	
-	TEST_METHOD(10) {
-		// writeScalar() should be able to produce messages that are compatible with the Ruby implementation.
-		// readScalar() should be able to read messages produced by the Ruby implementation.
-		int p1[2], p2[2];
-		pid_t pid;
-		
-		pipe(p1);
-		pipe(p2);
-		pid = fork();
-		if (pid == 0) {
-			close(p[0]);
-			close(p[1]);
-			dup2(p1[0], 0);
-			dup2(p2[1], 1);
-			close(p1[0]);
-			close(p1[1]);
-			close(p2[0]);
-			close(p2[1]);
-			execlp("ruby", "ruby", "./stub/message_channel_2.rb", (void *) 0);
-			perror("Cannot execute ruby");
-			_exit(1);
-		} else {
-			MessageChannel reader(p2[0]);
-			MessageChannel writer(p1[1]);
-			string output;
-			close(p1[0]);
-			close(p2[1]);
-			
-			writer.writeScalar("hello world\n!\r!");
-			ensure("End of file has not yet been reached (1)", reader.readScalar(output));
-			ensure_equals(output, "hello world\n!\r!!!");
-			
-			writer.writeScalar("");
-			ensure("End of file has not yet been reached (2)", reader.readScalar(output));
-			ensure_equals(output, "??");
-			writer.close();
-			
-			ensure("End of file has been reached", !reader.readScalar(output));
-			reader.close();
-			waitpid(pid, NULL, 0);
-		}
-	}
-	
-	TEST_METHOD(11) {
-		// If we send a lot of different messages (including file descriptor passing),
-		// and the other side sends the same stuff back to us, then MessageChannel
-		// should be able to read them all, if done in the correct order.
-		// writeScalar() should be able to produce messages that are compatible with the Ruby implementation.
-		// readScalar() should be able to read messages produced by the Ruby implementation.
-		int fd[2];
-		pid_t pid;
-		
-		socketpair(AF_UNIX, SOCK_STREAM, 0, fd);
-		pid = fork();
-		if (pid == 0) {
-			close(p[0]);
-			close(p[1]);
-			dup2(fd[0], 3);
-			close(fd[0]);
-			close(fd[1]);
-			execlp("ruby", "ruby", "./stub/message_channel_3.rb", (void *) 0);
-			perror("Cannot execute ruby");
-			_exit(1);
-		} else {
-			MessageChannel channel(fd[1]);
-			close(fd[0]);
-			
-			vector<string> args;
-			string output;
-			int tmp[2];
-			
-			channel.write("hello ", "my!", "world", NULL);
-			ensure("End of file has not yet been reached", channel.read(args));
-			ensure_equals(args.size(), 3u);
-			ensure_equals(args[0], "hello ");
-			ensure_equals(args[1], "my!");
-			ensure_equals(args[2], "world");
-			
-			channel.writeScalar("testing 123");
-			ensure("End of file has not yet been reached", channel.readScalar(output));
-			ensure_equals(output, "testing 123");
-			
-			pipe(tmp);
-			close(tmp[0]);
-			channel.writeFileDescriptor(tmp[1]);
-			close(tmp[1]);
-			int x = channel.readFileDescriptor();
-			close(x);
-			
-			channel.write("the end", NULL);
-			ensure("End of file has not yet been reached", channel.read(args));
-			ensure_equals(args.size(), 1u);
-			ensure_equals(args[0], "the end");
-			
-			ensure("End of file has been reached", !channel.read(args));
-			channel.close();
-			waitpid(pid, NULL, 0);
-		}
-	}
-	
-	TEST_METHOD(12) {
-		// readScalar()/writeScalar() should be able to handle arbitrary binary data.
-		string data;
-		FILE *f = fopen("stub/garbage3.dat", "r");
-		while (!feof(f)) {
-			char buf[1024 * 32];
-			size_t ret = fread(buf, 1, sizeof(buf), f);
-			data.append(buf, ret);
-		}
-		fclose(f);
-		
-		pid_t pid = fork();
-		if (pid == 0) {
-			reader.close();
-			writer.writeScalar(data);
-			_exit(0);
-		} else {
-			writer.close();
-			string result;
-			reader.readScalar(result);
-			ensure_equals(result, data);
-			waitpid(pid, NULL, 0);
-		}
-	}
-	
-	TEST_METHOD(13) {
-		// Test connected(), fileno() and close().
-		int fd[2];
-		pipe(fd);
-		close(fd[1]);
-		
-		MessageChannel channel(fd[0]);
-		ensure(channel.connected());
-		ensure_equals(channel.filenum(), fd[0]);
-		
-		channel.close();
-		ensure_equals(channel.filenum(), -1);
-		ensure(!channel.connected());
-	}
-	
-	TEST_METHOD(14) {
-		// close() sets the file descriptor to -1 even if closing failed.
-		int fd[2];
-		pipe(fd);
-		close(fd[0]);
-		close(fd[1]);
-		
-		MessageChannel channel(fd[0]);
-		bool gotException;
-		try {
-			channel.close();
-			gotException = false;
-		} catch (...) {
-			gotException = true;
-		}
-		if (!gotException) {
-			fail("close() should have failed");
-		}
-		ensure_equals(channel.filenum(), -1);
-		ensure(!channel.connected());
-	}
-	
-	TEST_METHOD(25) {
-		// readScalar() doesn't throw SecurityException if maxSize is
-		// given but the available amount of data equals maxSize.
-		string str;
-		writer.writeScalar("hello");
-		reader.readScalar(str, 5);
-	}
-	
-	TEST_METHOD(26) {
-		// readScalar() throws SecurityException if there's too much data to read.
-		string str;
-		
-		writer.writeScalar("hello");
-		try {
-			reader.readScalar(str, 4);
-			fail("SecurityException expected");
-		} catch (const SecurityException &) {
-			// Pass.
-		}
-	}
-	
-	TEST_METHOD(27) {
-		// readScalar() throws TimeoutException if no data was received within the timeout.
-		unsigned long long timeout = 30;
-		string str;
-		try {
-			reader.readScalar(str, 0, &timeout);
-			fail("TimeoutException expected");
-		} catch (const TimeoutException &) {
-			ensure("The passed time is deducted from timeout", timeout < 5);
-		}
-	}
-	
-	TEST_METHOD(28) {
-		// readScalar() throws TimeoutException if not enough header data was received
-		// within the timeout.
-		unsigned long long timeout = 30;
-		string str;
-		writeExact(writer.filenum(), "xxx", 3); // A part of a random 32-bit integer header.
-		try {
-			reader.readScalar(str, 0, &timeout);
-			fail("TimeoutException expected");
-		} catch (const TimeoutException &) {
-			ensure("The passed time is deducted from timeout", timeout < 5);
-		}
-	}
-	
-	TEST_METHOD(29) {
-		// readScalar() throws TimeoutException if the header data was received but no
-		// body data was received within the timeout.
-		unsigned long long timeout = 30;
-		string str;
-		writer.writeUint32(1024); // Dummy header.
-		try {
-			reader.readScalar(str, 0, &timeout);
-			fail("TimeoutException expected");
-		} catch (const TimeoutException &) {
-			ensure("The passed time is deducted from timeout", timeout < 5);
-		}
-	}
-	
-	TEST_METHOD(30) {
-		// readScalar() throws TimeoutException if the header data was received but not
-		// enough body data was received within the timeout.
-		string str;
-		writer.writeUint32(1024); // Dummy header.
-		
-		// Write a dummy body at 100 bytes per sec, or 1 byte every 10 msec.
-		// Takes 10 seconds.
-		TempThread thr(boost::bind(&writeDataSlowly, writer.filenum(), 1000, 100));
-		
-		unsigned long long timeout = 35;
-		Timer timer;
-		try {
-			reader.readScalar(str, 0, &timeout);
-			fail("TimeoutException expected");
-		} catch (const TimeoutException &) {
-			unsigned long long elapsed = timer.elapsed();
-			ensure("Spent at least 35 msec waiting", elapsed >= 34);
-			ensure("Spent at most 60 msec waiting", elapsed <= 60);
-			ensure("The passed time is deducted from timeout", timeout < 5);
-		}
-	}
-	
-	TEST_METHOD(31) {
-		// readScalar() returns if enough data was received within the specified timeout.
-		string str;
-		unsigned long long timeout = 1000;
-		
-		writer.writeUint32(250);
-		TempThread thr(boost::bind(&writeDataSlowly, writer.filenum(), 250, 1000));
-		
-		reader.readScalar(str, 0, &timeout);
-		ensure("Spent at least 250 msec waiting", timeout <= 1000 - 250);
-		ensure("Spent at most 500 msec waiting", timeout >= 1000 - 500);
-	}
-	
-	TEST_METHOD(32) {
-		// Test readUint32() and writeUint32().
-		writer.writeUint32(0);
-		writer.writeUint32(1);
-		writer.writeUint32(1024);
-		writer.writeUint32(3000000000u);
-		
-		unsigned int i;
-		ensure(reader.readUint32(i));
-		ensure_equals(i, 0u);
-		ensure(reader.readUint32(i));
-		ensure_equals(i, 1u);
-		ensure(reader.readUint32(i));
-		ensure_equals(i, 1024u);
-		ensure(reader.readUint32(i));
-		ensure_equals(i, 3000000000u);
-	}
-	
-	TEST_METHOD(33) {
-		// readUint32() returns false if EOF was reached prematurely.
-		writeExact(writer.filenum(), "x", 1);
-		writer.close();
-		unsigned int i;
-		ensure(!reader.readUint32(i));
-	}
-	
-	TEST_METHOD(34) {
-		// readUint32() throws TimeoutException if no data was available within the timeout.
-		unsigned long long timeout = 30;
-		unsigned int i;
-		try {
-			reader.readUint32(i, &timeout);
-			fail("TimeoutException expected");
-		} catch (const TimeoutException &) {
-			ensure("The spent time is deducted from timeout", timeout < 5);
-		}
-	}
-	
-	TEST_METHOD(35) {
-		// readUint32() throws TimeoutException if not enough data was available within the timeout.
-		unsigned long long timeout = 30;
-		unsigned int i;
-		writeExact(writer.filenum(), "xx", 2);
-		try {
-			reader.readUint32(i, &timeout);
-			fail("TimeoutException expected");
-		} catch (const TimeoutException &e) {
-			ensure("The spent time is deducted from timeout", timeout < 5);
-		}
-	}
-	
-	TEST_METHOD(36) {
-		// readUint32() throws TimeoutException if timeout is 0 and no data
-		// is immediately available.
-		unsigned long long timeout = 0;
-		unsigned int i;
-		try {
-			reader.readUint32(i, &timeout);
-			fail("TimeoutException expected");
-		} catch (const TimeoutException &) {
-			ensure_equals("Timeout is unchanged", timeout, 0u);
-		}
-	}
-	
-	TEST_METHOD(37) {
-		// readUint32() throws TimeoutException if timeout is 0 and not enough
-		// data is immediately available.
-		unsigned long long timeout = 0;
-		unsigned int i;
-		writeExact(writer.filenum(), "xx", 2);
-		try {
-			reader.readUint32(i, &timeout);
-			fail("TimeoutException expected");
-		} catch (const TimeoutException &e) {
-			ensure_equals("Timeout unchanged", timeout, 0u);
-		}
-	}
-}
diff --git a/test/cxx/MessageIOTest.cpp b/test/cxx/MessageIOTest.cpp
index 9c8e800..60c5ac6 100644
--- a/test/cxx/MessageIOTest.cpp
+++ b/test/cxx/MessageIOTest.cpp
@@ -1,4 +1,4 @@
-#include "TestSupport.h"
+#include <TestSupport.h>
 #include <Utils/IOUtils.h>
 #include <Utils/MessageIO.h>
 #include <Utils/SystemTime.h>
@@ -66,7 +66,7 @@ namespace tut {
 			fail("TimeoutException expected");
 		} catch (const TimeoutException &) {
 			unsigned long long elapsed = SystemTime::getUsec() - startTime;
-			ensure("About 30 ms elapsed (1)", elapsed >= 29000 && elapsed <= 50000);
+			ensure("About 30 ms elapsed (1)", elapsed >= 29000 && elapsed <= 95000);
 			ensure("Time is correctly deducted from 'timeout' (1)", timeout <= 2000);
 		}
 		
@@ -79,7 +79,7 @@ namespace tut {
 			fail("TimeoutException expected");
 		} catch (const TimeoutException &) {
 			unsigned long long elapsed = SystemTime::getUsec() - startTime;
-			ensure("About 30 ms elapsed (3)", elapsed >= 29000 && elapsed <= 50000);
+			ensure("About 30 ms elapsed (3)", elapsed >= 29000 && elapsed <= 95000);
 			ensure("Time is correctly deducted from 'timeout' (4)", timeout <= 2000);
 		}
 	}
@@ -134,7 +134,7 @@ namespace tut {
 			fail("TimeoutException expected");
 		} catch (const TimeoutException &) {
 			unsigned long long elapsed = SystemTime::getUsec() - startTime;
-			ensure(elapsed >= 29000 && elapsed <= 50000);
+			ensure(elapsed >= 29000 && elapsed <= 90000);
 			ensure(timeout <= 2000);
 		}
 		
@@ -147,7 +147,7 @@ namespace tut {
 			fail("TimeoutException expected");
 		} catch (const TimeoutException &) {
 			unsigned long long elapsed = SystemTime::getUsec() - startTime;
-			ensure(elapsed >= 29000 && elapsed <= 50000);
+			ensure(elapsed >= 29000 && elapsed <= 90000);
 			ensure(timeout <= 2000);
 		}
 	}
@@ -260,7 +260,7 @@ namespace tut {
 			fail("TimeoutException expected (1)");
 		} catch (const TimeoutException &) {
 			unsigned long long elapsed = SystemTime::getUsec() - startTime;
-			ensure(elapsed >= 29000 && elapsed <= 50000);
+			ensure(elapsed >= 29000 && elapsed <= 90000);
 			ensure(timeout <= 2000);
 		}
 		
@@ -273,7 +273,7 @@ namespace tut {
 			fail("TimeoutException expected (2)");
 		} catch (const TimeoutException &) {
 			unsigned long long elapsed = SystemTime::getUsec() - startTime;
-			ensure(elapsed >= 29000 && elapsed <= 50000);
+			ensure(elapsed >= 29000 && elapsed <= 90000);
 			ensure(timeout <= 2000);
 		}
 	}
@@ -340,7 +340,7 @@ namespace tut {
 			fail("TimeoutException expected (1)");
 		} catch (const TimeoutException &) {
 			unsigned long long elapsed = SystemTime::getUsec() - startTime;
-			ensure(elapsed >= 29000 && elapsed <= 50000);
+			ensure(elapsed >= 29000 && elapsed <= 90000);
 			ensure(timeout <= 2000);
 		}
 		
@@ -353,7 +353,7 @@ namespace tut {
 			fail("TimeoutException expected (2)");
 		} catch (const TimeoutException &) {
 			unsigned long long elapsed = SystemTime::getUsec() - startTime;
-			ensure(elapsed >= 29000 && elapsed <= 50000);
+			ensure(elapsed >= 29000 && elapsed <= 90000);
 			ensure(timeout <= 2000);
 		}
 	}
diff --git a/test/cxx/MessagePassingTest.cpp b/test/cxx/MessagePassingTest.cpp
new file mode 100644
index 0000000..7e0be3d
--- /dev/null
+++ b/test/cxx/MessagePassingTest.cpp
@@ -0,0 +1,81 @@
+#include <TestSupport.h>
+#include <boost/bind.hpp>
+#include <Utils/MessagePassing.h>
+#include <Utils/Timer.h>
+
+using namespace Passenger;
+using namespace std;
+
+namespace tut {
+	struct MessagePassingTest {
+		MessageBoxPtr box;
+
+		MessagePassingTest() {
+			box = make_shared<MessageBox>();
+		}
+
+		void sendMessagesLater() {
+			syscalls::usleep(20000);
+			box->send("hi");
+			syscalls::usleep(20000);
+			box->send("ho");
+		}
+	};
+	
+	DEFINE_TEST_GROUP(MessagePassingTest);
+
+	TEST_METHOD(1) {
+		// Sending and receiving 1 message.
+		box->send("hi");
+		ensure_equals(box->size(), 1u);
+		ensure_equals(box->recv("hi")->name, "hi");
+		ensure_equals(box->size(), 0u);
+	}
+
+	TEST_METHOD(2) {
+		// Sending and receiving multiple messages out of order.
+		box->send("ho");
+		box->send("hi");
+		box->send("ha");
+		ensure_equals(box->size(), 3u);
+		ensure_equals(box->recv("hi")->name, "hi");
+		ensure_equals(box->size(), 2u);
+		ensure_equals(box->recv("ho")->name, "ho");
+		ensure_equals(box->size(), 1u);
+		ensure_equals(box->recv("ha")->name, "ha");
+		ensure_equals(box->size(), 0u);
+	}
+
+	TEST_METHOD(3) {
+		// Receive with zero timeout.
+		unsigned long long timeout = 0;
+		Timer timer;
+		ensure_equals(box->recv("hi", &timeout), MessagePtr());
+		ensure(timer.elapsed() < 2);
+		ensure_equals(timeout, 0ull);
+	}
+
+	TEST_METHOD(4) {
+		// Receive with non-zero timeout.
+		unsigned long long timeout = 20000;
+		Timer timer;
+		ensure_equals(box->recv("hi", &timeout), MessagePtr());
+		ensure("(1)", timer.elapsed() >= 19);
+		ensure("(2)", timer.elapsed() < 95);
+		ensure("(3)", timeout >= 19000ull);
+	}
+
+	TEST_METHOD(5) {
+		// Test waiting with timeout.
+		TempThread thr(boost::bind(&MessagePassingTest::sendMessagesLater, this));
+		unsigned long long timeout = 200000;
+		Timer timer;
+		ensure_equals(box->recv("ho", &timeout)->name, "ho");
+		ensure(timer.elapsed() >= 39);
+		ensure(timer.elapsed() < 95);
+		ensure_equals(box->size(), 1u);
+		ensure_equals(box->recv("hi")->name, "hi");
+		ensure_equals(box->size(), 0u);
+		ensure(timeout >= 140000);
+	}
+}
diff --git a/test/cxx/MessageReadersWritersTest.cpp b/test/cxx/MessageReadersWritersTest.cpp
index 9b279ff..c2bef9c 100644
--- a/test/cxx/MessageReadersWritersTest.cpp
+++ b/test/cxx/MessageReadersWritersTest.cpp
@@ -1,7 +1,6 @@
-#include "TestSupport.h"
+#include <TestSupport.h>
 #include <MessageReadersWriters.h>
 #include <cstdlib>
-#include <alloca.h>
 
 using namespace Passenger;
 using namespace std;
@@ -384,10 +383,10 @@ namespace tut {
 	TEST_METHOD(34) {
 		// generate() works.
 		StaticString args[] = { "ab", "cde" };
-		StaticString *out = (StaticString *)
-			alloca(ArrayMessage::outputSize(2) * sizeof(StaticString));
+		vector<StaticString> out;
+		out.resize(ArrayMessage::outputSize(2));
 		char buf[sizeof(uint16_t)];
-		ArrayMessage::generate(args, 2, buf, out, ArrayMessage::outputSize(2));
+		ArrayMessage::generate(args, 2, buf, &out[0], ArrayMessage::outputSize(2));
 		
 		string concat;
 		for (unsigned int i = 0; i < ArrayMessage::outputSize(2); i++) {
diff --git a/test/cxx/MessageServerTest.cpp b/test/cxx/MessageServerTest.cpp
index bcd9639..f430783 100644
--- a/test/cxx/MessageServerTest.cpp
+++ b/test/cxx/MessageServerTest.cpp
@@ -4,7 +4,7 @@
 #include <boost/bind.hpp>
 
 #include "MessageServer.h"
-#include "ApplicationPool/Client.h"
+#include "MessageClient.h"
 #include "Utils.h"
 #include <string>
 #include <cstring>
@@ -12,7 +12,6 @@
 #include <errno.h>
 
 using namespace Passenger;
-using namespace Passenger::ApplicationPool;
 using namespace boost;
 using namespace std;
 
@@ -21,6 +20,7 @@ namespace tut {
 		ServerInstanceDirPtr serverInstanceDir;
 		ServerInstanceDir::GenerationPtr generation;
 		string socketFilename;
+		string socketAddress;
 		AccountsDatabasePtr accountsDatabase;
 		AccountPtr clientAccount;
 		shared_ptr<MessageServer> server;
@@ -29,6 +29,7 @@ namespace tut {
 		MessageServerTest() {
 			createServerInstanceDirAndGeneration(serverInstanceDir, generation);
 			socketFilename = generation->getPath() + "/socket";
+			socketAddress = "unix:" + socketFilename;
 			accountsDatabase = ptr(new AccountsDatabase());
 			clientAccount = accountsDatabase->add("test", "12345", false);
 			
@@ -45,40 +46,40 @@ namespace tut {
 			Passenger::setLogLevel(0);
 		}
 		
-		class SlowClient: public Client {
+		class SlowClient: public MessageClient {
 		private:
 			unsigned int timeToSendUsername;
 			unsigned int timeToSendPassword;
 			
 		protected:
-			virtual void sendUsername(MessageChannel &channel, const string &username) {
+			virtual void sendUsername(int fd, const StaticString &username, unsigned long long *timeout) {
 				if (timeToSendUsername > 0) {
 					usleep(timeToSendUsername * 1000);
 				}
-				channel.writeScalar(username);
+				writeScalarMessage(fd, username);
 			}
 
-			virtual void sendPassword(MessageChannel &channel, const StaticString &userSuppliedPassword) {
+			virtual void sendPassword(int fd, const StaticString &userSuppliedPassword, unsigned long long *timeout) {
 				if (timeToSendPassword > 0) {
 					usleep(timeToSendPassword * 1000);
 				}
-				channel.writeScalar(userSuppliedPassword.c_str(), userSuppliedPassword.size());
+				writeScalarMessage(fd, userSuppliedPassword);
 			}
 			
 		public:
 			SlowClient(unsigned int timeToSendUsername,
 			           unsigned int timeToSendPassword)
-			         : Client()
+			         : MessageClient()
 			{
 				this->timeToSendUsername = timeToSendUsername;
 				this->timeToSendPassword = timeToSendPassword;
 			}
 		};
 		
-		class CustomClient: public Client {
+		class CustomClient: public MessageClient {
 		public:
 			CustomClient *sendText(const string &text) {
-				data->channel.write(text.c_str(), NULL);
+				write(text.c_str(), NULL);
 				return this;
 			}
 		};
@@ -153,19 +154,19 @@ namespace tut {
 		accountsDatabase->add("hashed_user", Account::createHash("67890"), true);
 		
 		try {
-			Client().connect(socketFilename, "testt", "12345");
+			MessageClient().connect(socketAddress, "testt", "12345");
 			fail("SecurityException expected when invalid username is given");
 		} catch (const SecurityException &) {
 			// Pass.
 		}
 		try {
-			Client().connect(socketFilename, "test", "123456");
+			MessageClient().connect(socketAddress, "test", "123456");
 			fail("SecurityException expected when invalid password is given for an account with plain text password");
 		} catch (const SecurityException &) {
 			// Pass.
 		}
 		try {
-			Client().connect(socketFilename, "test", "678900");
+			MessageClient().connect(socketAddress, "test", "678900");
 			fail("SecurityException expected when invalid password is given for an account with hashed password");
 		} catch (const SecurityException &) {
 			// Pass.
@@ -175,14 +176,14 @@ namespace tut {
 	TEST_METHOD(2) {
 		// It supports hashed passwords.
 		accountsDatabase->add("hashed_user", Account::createHash("67890"), true);
-		Client().connect(socketFilename, "hashed_user", "67890"); // Should not throw exception.
+		MessageClient().connect(socketAddress, "hashed_user", "67890"); // Should not throw exception.
 	}
 	
 	TEST_METHOD(3) {
 		// It disconnects the client if the client does not supply a username and
 		// password within a time limit.
 		Passenger::setLogLevel(-1);
-		server->setLoginTimeout(40000);
+		server->setLoginTimeout(30000);
 		
 		/* These can throw either an IOException or SystemException:
 		 * - An IOException is raised when connect() encounters EOF.
@@ -193,7 +194,7 @@ namespace tut {
 		
 		try {
 			// This client takes too much time on sending the username.
-			SlowClient(50, 0).connect(socketFilename, "test", "12345");
+			SlowClient(50, 0).connect(socketAddress, "test", "12345");
 			fail("IOException or SystemException expected (1).");
 		} catch (const IOException &e) {
 			// Pass.
@@ -203,7 +204,7 @@ namespace tut {
 		
 		try {
 			// This client takes too much time on sending the password.
-			SlowClient(0, 50).connect(socketFilename, "test", "12345");
+			SlowClient(0, 50).connect(socketAddress, "test", "12345");
 			fail("IOException or SystemException expected (2).");
 		} catch (const IOException &e) {
 			// Pass.
@@ -214,7 +215,7 @@ namespace tut {
 		try {
 			// This client is fast enough at sending the username and
 			// password individually, but the combined time is too long.
-			SlowClient(25, 25).connect(socketFilename, "test", "12345");
+			SlowClient(25, 25).connect(socketAddress, "test", "12345");
 			fail("IOException or SystemException expected (3).");
 		} catch (const IOException &e) {
 			// Pass.
@@ -229,7 +230,7 @@ namespace tut {
 		memset(username, 'x', sizeof(username));
 		username[sizeof(username) - 1] = '\0';
 		try {
-			Client().connect(socketFilename, username, "1234");
+			MessageClient().connect(socketAddress, username, "1234");
 			fail("SecurityException expected");
 		} catch (const SecurityException &e) {
 			// Pass.
@@ -242,7 +243,7 @@ namespace tut {
 		memset(password, 'x', sizeof(password));
 		password[sizeof(password) - 1] = '\0';
 		try {
-			Client().connect(socketFilename, "test", password);
+			MessageClient().connect(socketAddress, "test", password);
 			fail("SecurityException expected");
 		} catch (const SecurityException &e) {
 			// Pass.
@@ -255,8 +256,8 @@ namespace tut {
 		LoggingHandlerPtr handler2(new LoggingHandler());
 		server->addHandler(handler1);
 		server->addHandler(handler2);
-		Client().connect(socketFilename, "test", "12345");
-		Client().connect(socketFilename, "test", "12345");
+		MessageClient().connect(socketAddress, "test", "12345");
+		MessageClient().connect(socketAddress, "test", "12345");
 		
 		usleep(10000); // Give the threads some time to do work.
 		ensure_equals(handler1->clientsAccepted, 2);
@@ -275,12 +276,12 @@ namespace tut {
 		handler1->returnValue = false;
 		
 		CustomClient c1, c2;
-		c1.connect(socketFilename, "test", "12345");
+		c1.connect(socketAddress, "test", "12345");
 		c1.sendText("hello");
 		c1.sendText(" ");
 		usleep(10000); // Give the thread some time to do work.
 		
-		c2.connect(socketFilename, "test", "12345");
+		c2.connect(socketAddress, "test", "12345");
 		c2.sendText("world");
 		usleep(10000); // Give the thread some time to do work.
 		
@@ -298,7 +299,7 @@ namespace tut {
 		server->addHandler(handler2);
 		
 		CustomClient c;
-		c.connect(socketFilename, "test", "12345");
+		c.connect(socketAddress, "test", "12345");
 		c.sendText("hi");
 		usleep(10000); // Give the thread some time to do work.
 		
@@ -314,7 +315,7 @@ namespace tut {
 		server->addHandler(handler2);
 		
 		CustomClient c;
-		c.connect(socketFilename, "test", "12345");
+		c.connect(socketAddress, "test", "12345");
 		c.sendText("hi");
 		usleep(10000); // Give the thread some time to do work.
 		
@@ -342,7 +343,7 @@ namespace tut {
 		
 		handler1->id = 100;
 		handler2->id = 101;
-		c1.connect(socketFilename, "test", "12345");
+		c1.connect(socketAddress, "test", "12345");
 		c1.sendText("hi");
 		usleep(10000); // Give the thread some time to do work.
 		ensure_equals(handler1->latestContext->id, 100);
@@ -350,7 +351,7 @@ namespace tut {
 		
 		handler1->id = 200;
 		handler2->id = 201;
-		c2.connect(socketFilename, "test", "12345");
+		c2.connect(socketAddress, "test", "12345");
 		c2.sendText("hi");
 		usleep(10000); // Give the thread some time to do work.
 		ensure_equals(handler1->latestContext->id, 200);
@@ -370,13 +371,13 @@ namespace tut {
 		server->addHandler(handler2);
 		{
 			{
-				Client().connect(socketFilename, "test", "12345");
+				MessageClient().connect(socketAddress, "test", "12345");
 			}
 			usleep(10000); // Give the threads some time to do work.
 			ensure_equals(handler1->clientsDisconnected, 1);
 			ensure_equals(handler2->clientsDisconnected, 1);
 			
-			Client().connect(socketFilename, "test", "12345");
+			MessageClient().connect(socketAddress, "test", "12345");
 		}
 		usleep(10000); // Give the threads some time to do work.
 		ensure_equals(handler1->clientsDisconnected, 2);
diff --git a/test/cxx/PoolOptionsTest.cpp b/test/cxx/PoolOptionsTest.cpp
deleted file mode 100644
index 253ccbe..0000000
--- a/test/cxx/PoolOptionsTest.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-#include "TestSupport.h"
-#include "PoolOptions.h"
-
-using namespace Passenger;
-using namespace std;
-
-namespace tut {
-	struct PoolOptionsTest {
-	};
-
-	DEFINE_TEST_GROUP(PoolOptionsTest);
-
-	// Test the PoolOptions constructors and toVector().
-	TEST_METHOD(1) {
-		PoolOptions options;
-		options.appRoot     = "/foo";
-		options.frameworkSpawnerTimeout = 123;
-		options.appSpawnerTimeout       = 456;
-		options.maxRequests = 789;
-		
-		vector<string> args;
-		args.push_back("abc");
-		args.push_back("def");
-		options.toVector(args);
-		
-		PoolOptions copy(args, 2);
-		ensure_equals(options.appRoot, copy.appRoot);
-		ensure_equals(options.rights, copy.rights);
-		ensure_equals(options.environment, copy.environment);
-		ensure_equals(options.spawnMethod, copy.spawnMethod);
-		ensure_equals(options.appType, copy.appType);
-		ensure_equals(options.frameworkSpawnerTimeout, copy.frameworkSpawnerTimeout);
-		ensure_equals(options.appSpawnerTimeout, copy.appSpawnerTimeout);
-		ensure_equals(options.maxRequests, copy.maxRequests);
-	}
-	
-	// Test empty environmentVariables serialization and deserialization.
-	TEST_METHOD(2) {
-		PoolOptions options;
-		vector<string> args;
-		options.toVector(args);
-		
-		PoolOptions options2(args);
-		ensure_equals(options2.environmentVariables->getItems()->size(), 0u);
-	}
-	
-	// Test single item environmentVariables serialization and deserialization.
-	TEST_METHOD(3) {
-		PoolOptions options;
-		SimpleStringListCreatorPtr list = ptr(new SimpleStringListCreator());
-		vector<string> args;
-		list->items->push_back("hello");
-		list->items->push_back("world !!");
-		options.environmentVariables = list;
-		options.toVector(args);
-		
-		PoolOptions options2(args);
-		const StringListPtr list2 = options2.environmentVariables->getItems();
-		ensure_equals(list2->size(), 2u);
-		ensure_equals(list2->at(0), "hello");
-		ensure_equals(list2->at(1), "world !!");
-	}
-	
-	// Test multiple items environmentVariables serialization and deserialization.
-	TEST_METHOD(4) {
-		PoolOptions options;
-		SimpleStringListCreatorPtr list = ptr(new SimpleStringListCreator());
-		vector<string> args;
-		list->items->push_back("hello");
-		list->items->push_back("world !!");
-		list->items->push_back("PATH");
-		list->items->push_back("/usr/local/bin");
-		options.environmentVariables = list;
-		options.toVector(args);
-		
-		PoolOptions options2(args);
-		const StringListPtr list2 = options2.environmentVariables->getItems();
-		ensure_equals(list2->size(), 4u);
-		ensure_equals(list2->at(0), "hello");
-		ensure_equals(list2->at(1), "world !!");
-		ensure_equals(list2->at(2), "PATH");
-		ensure_equals(list2->at(3), "/usr/local/bin");
-	}
-	
-	// Calling toVector() with storeEnvVars = false on a PoolOption object that
-	// has no environment variables works, and the resulting data can be unserialized.
-	TEST_METHOD(5) {
-		PoolOptions options;
-		vector<string> args;
-		options.appRoot = "hello";
-		options.toVector(args, false);
-		
-		PoolOptions options2(args);
-		ensure_equals(options2.appRoot, "hello");
-		ensure_equals(options2.environmentVariables, StringListCreatorPtr());
-	}
-	
-	// Calling toVector() with storeEnvVars = false on a PoolOption object that
-	// has no environment variables works, and the resulting data can be unserialized.
-	TEST_METHOD(6) {
-		PoolOptions options;
-		SimpleStringListCreatorPtr list = ptr(new SimpleStringListCreator());
-		vector<string> args;
-		list->items->push_back("hello");
-		list->items->push_back("world");
-		list->items->push_back("foo");
-		list->items->push_back("bar");
-		options.appRoot = "hello";
-		options.environmentVariables = list;
-		options.toVector(args, false);
-		
-		PoolOptions options2(args);
-		ensure_equals(options2.appRoot, "hello");
-		ensure_equals(options2.environmentVariables, StringListCreatorPtr());
-	}
-}
diff --git a/test/cxx/RequestHandlerTest.cpp b/test/cxx/RequestHandlerTest.cpp
new file mode 100644
index 0000000..13652ed
--- /dev/null
+++ b/test/cxx/RequestHandlerTest.cpp
@@ -0,0 +1,856 @@
+#include <TestSupport.h>
+#include <agents/HelperAgent/RequestHandler.h>
+#include <agents/HelperAgent/RequestHandler.cpp>
+#include <agents/HelperAgent/AgentOptions.h>
+#include <ApplicationPool2/Pool.h>
+#include <Utils/json.h>
+#include <Utils/IOUtils.h>
+#include <Utils/Timer.h>
+
+#include <boost/shared_array.hpp>
+#include <string>
+#include <vector>
+#include <map>
+#include <sstream>
+#include <cstdarg>
+#include <sys/socket.h>
+
+using namespace std;
+using namespace boost;
+using namespace Passenger;
+using namespace Passenger::ApplicationPool2;
+
+namespace tut {
+	struct RequestHandlerTest {
+		ServerInstanceDirPtr serverInstanceDir;
+		ServerInstanceDir::GenerationPtr generation;
+		string serverFilename;
+		FileDescriptor requestSocket;
+		AgentOptions agentOptions;
+
+		BackgroundEventLoop bg;
+		SpawnerFactoryPtr spawnerFactory;
+		PoolPtr pool;
+		shared_ptr<RequestHandler> handler;
+		FileDescriptor connection;
+		map<string, string> defaultHeaders;
+
+		string root;
+		string rackAppPath, wsgiAppPath;
+		
+		RequestHandlerTest() {
+			createServerInstanceDirAndGeneration(serverInstanceDir, generation);
+			spawnerFactory = make_shared<SpawnerFactory>(bg.safe, *resourceLocator, generation);
+			pool = make_shared<Pool>(bg.safe.get(), spawnerFactory);
+			pool->initialize();
+			serverFilename = generation->getPath() + "/server";
+			requestSocket = createUnixServer(serverFilename);
+			setNonBlocking(requestSocket);
+			setLogLevel(LVL_ERROR); // TODO: set to LVL_WARN
+
+			agentOptions.passengerRoot = resourceLocator->getRoot();
+			agentOptions.defaultUser   = testConfig["default_user"].asString();
+			agentOptions.defaultGroup  = testConfig["default_group"].asString();
+			root = resourceLocator->getRoot();
+			rackAppPath = root + "/test/stub/rack";
+			wsgiAppPath = root + "/test/stub/wsgi";
+			defaultHeaders["PASSENGER_LOAD_SHELL_ENVVARS"] = "false";
+			defaultHeaders["PASSENGER_APP_TYPE"] = "wsgi";
+			defaultHeaders["PASSENGER_SPAWN_METHOD"] = "direct";
+			defaultHeaders["REQUEST_METHOD"] = "GET";
+		}
+		
+		~RequestHandlerTest() {
+			setLogLevel(DEFAULT_LOG_LEVEL);
+			unlink(serverFilename.c_str());
+			handler.reset();
+			pool->destroy();
+			pool.reset();
+		}
+
+		void init() {
+			handler = make_shared<RequestHandler>(bg.safe, requestSocket, pool, agentOptions);
+			bg.start();
+		}
+
+		FileDescriptor &connect() {
+			connection = connectToUnixServer(serverFilename);
+			return connection;
+		}
+
+		void sendHeaders(const map<string, string> &headers, ...) {
+			va_list ap;
+			const char *arg;
+			map<string, string>::const_iterator it;
+			vector<StaticString> args;
+
+			for (it = headers.begin(); it != headers.end(); it++) {
+				args.push_back(StaticString(it->first.data(), it->first.size() + 1));
+				args.push_back(StaticString(it->second.data(), it->second.size() + 1));
+			}
+
+			va_start(ap, headers);
+			while ((arg = va_arg(ap, const char *)) != NULL) {
+				args.push_back(StaticString(arg, strlen(arg) + 1));
+			}
+			va_end(ap);
+
+			shared_array<StaticString> args_array(new StaticString[args.size() + 2]);
+			unsigned int totalSize = 0;
+			for (unsigned int i = 0; i < args.size(); i++) {
+				args_array[i + 1] = args[i];
+				totalSize += args[i].size();
+			}
+			char totalSizeString[10];
+			snprintf(totalSizeString, sizeof(totalSizeString), "%u:", totalSize);
+			args_array[0] = StaticString(totalSizeString);
+			args_array[args.size() + 1] = ",";
+			
+			gatheredWrite(connection, args_array.get(), args.size() + 2, NULL);
+		}
+
+		string stripHeaders(const string &str) {
+			string::size_type pos = str.find("\r\n\r\n");
+			if (pos == string::npos) {
+				return str;
+			} else {
+				string result = str;
+				result.erase(0, pos + 4);
+				return result;
+			}
+		}
+
+		string inspect() {
+			string result;
+			bg.safe->runSync(boost::bind(&RequestHandlerTest::real_inspect, this, &result));
+			return result;
+		}
+
+		void real_inspect(string *result) {
+			stringstream stream;
+			handler->inspect(stream);
+			*result = stream.str();
+		}
+
+		static void writeBody(FileDescriptor conn, string body) {
+			try {
+				writeExact(conn, body);
+			} catch (const SystemException &e) {
+				if (e.code() == EPIPE) {
+					// Ignore.
+				} else {
+					throw;
+				}
+			}
+		}
+	};
+
+	DEFINE_TEST_GROUP(RequestHandlerTest);
+
+	TEST_METHOD(1) {
+		// Test one normal request.
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/",
+			NULL);
+		string response = readAll(connection);
+		string body = stripHeaders(response);
+		ensure("Status line is correct", containsSubstring(response, "HTTP/1.1 200 OK\r\n"));
+		ensure("Headers are correct", containsSubstring(response, "Content-Type: text/html\r\n"));
+		ensure("Contains a Status header", containsSubstring(response, "Status: 200 OK\r\n"));
+		ensure_equals(body, "hello <b>world</b>");
+	}
+
+	TEST_METHOD(2) {
+		// Test multiple normal requests.
+		init();
+		for (int i = 0; i < 10; i++) {
+			connect();
+			sendHeaders(defaultHeaders,
+				"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+				"PATH_INFO", "/",
+				NULL);
+			string response = readAll(connection);
+			string body = stripHeaders(response);
+			ensure("Status line is correct", containsSubstring(response, "HTTP/1.1 200 OK\r\n"));
+			ensure("Headers are correct", containsSubstring(response, "Content-Type: text/html\r\n"));
+			ensure("Contains a Status header", containsSubstring(response, "Status: 200 OK\r\n"));
+			ensure_equals(body, "hello <b>world</b>");
+		}
+	}
+
+	TEST_METHOD(3) {
+		// Test sending request data in pieces.
+		defaultHeaders["PASSENGER_APP_ROOT"] = wsgiAppPath;
+		defaultHeaders["PATH_INFO"] = "/";
+
+		string request;
+		map<string, string>::const_iterator it, end = defaultHeaders.end();
+		for (it = defaultHeaders.begin(); it != end; it++) {
+			request.append(it->first);
+			request.append(1, '\0');
+			request.append(it->second);
+			request.append(1, '\0');
+		}
+		request = toString(request.size()) + ":" + request;
+		request.append(",");
+
+		init();
+		connect();
+		string::size_type i = 0;
+		while (i < request.size()) {
+			const string piece = const_cast<const string &>(request).substr(i, 5);
+			writeExact(connection, piece);
+			usleep(10000);
+			i += piece.size();
+		}
+
+		string response = readAll(connection);
+		string body = stripHeaders(response);
+		ensure("Status line is correct", containsSubstring(response, "HTTP/1.1 200 OK\r\n"));
+		ensure("Headers are correct", containsSubstring(response, "Content-Type: text/html\r\n"));
+		ensure("Contains a Status header", containsSubstring(response, "Status: 200 OK\r\n"));
+		ensure_equals(body, "hello <b>world</b>");
+	}
+
+	TEST_METHOD(4) {
+		// It denies access if the connect password is wrong.
+		agentOptions.requestSocketPassword = "hello world";
+		setLogLevel(-1);
+		init();
+
+		connect();
+		writeExact(connection, "hello world");
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/",
+			NULL
+		);
+		ensure(containsSubstring(readAll(connection), "hello <b>world</b>"));
+
+		connect();
+		try {
+			sendHeaders(defaultHeaders,
+				"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+				"PATH_INFO", "/",
+				NULL
+			);
+		} catch (const SystemException &e) {
+			ensure_equals(e.code(), EPIPE);
+			return;
+		}
+		string response;
+		try {
+			response = readAll(connection);
+		} catch (const SystemException &e) {
+			ensure_equals(e.code(), ECONNRESET);
+			return;
+		}
+		ensure_equals(response, "");
+	}
+
+	TEST_METHOD(5) {
+		// It disconnects us if the connect password is not sent within a certain time.
+		agentOptions.requestSocketPassword = "hello world";
+		setLogLevel(-1);
+		handler = make_shared<RequestHandler>(bg.safe, requestSocket, pool, agentOptions);
+		handler->connectPasswordTimeout = 40;
+		bg.start();
+
+		connect();
+		Timer timer;
+		readAll(connection);
+		timer.stop();
+		ensure(timer.elapsed() <= 60);
+	}
+
+	TEST_METHOD(6) {
+		// It works correct if the connect password is sent in pieces.
+		agentOptions.requestSocketPassword = "hello world";
+		init();
+		connect();
+		writeExact(connection, "hello");
+		usleep(10000);
+		writeExact(connection, " world");
+		usleep(10000);
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/",
+			NULL
+		);
+		ensure(containsSubstring(readAll(connection), "hello <b>world</b>"));
+	}
+
+	TEST_METHOD(7) {
+		// It closes the connection with the application if the client has closed the connection.
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/stream",
+			NULL
+		);
+		BufferedIO io(connection);
+		ensure_equals(io.readLine(), "HTTP/1.1 200 OK\r\n");
+		ProcessPtr process;
+		{
+			LockGuard l(pool->syncher);
+			ensure_equals(pool->getProcessCount(false), 1u);
+			SuperGroupPtr superGroup = pool->superGroups.get(wsgiAppPath);
+			process = superGroup->defaultGroup->enabledProcesses.front();
+			ensure_equals(process->sessions, 1);
+		}
+		connection.close();
+		EVENTUALLY(5,
+			LockGuard l(pool->syncher);
+			result = process->sessions == 0;
+		);
+	}
+	
+	TEST_METHOD(10) {
+		// If the app crashes at startup without an error page then it renders
+		// a generic error page.
+		TempDir tempdir("tmp.handler");
+		writeFile("tmp.handler/start.rb",
+			"STDERR.puts 'I have failed'");
+
+		setLogLevel(-2);
+		spawnerFactory->getConfig()->forwardStderr = false;
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", (root + "/test/tmp.handler").c_str(),
+			"PASSENGER_APP_TYPE", "",
+			"PASSENGER_START_COMMAND", ("ruby\t" + root + "/test/tmp.handler/start.rb").c_str(),
+			"PATH_INFO", "/",
+			NULL);
+		string response = readAll(connection);
+		ensure(containsSubstring(response, "HTTP/1.1 500 Internal Server Error\r\n"));
+		ensure(containsSubstring(response, "Status: 500 Internal Server Error\r\n"));
+		ensure(containsSubstring(response, "I have failed"));
+	}
+
+	TEST_METHOD(11) {
+		// If the app crashes at startup with an error page then it renders
+		// a friendly error page.
+		TempDir tempdir("tmp.handler");
+		writeFile("tmp.handler/start.rb",
+			"STDERR.puts 'Error'\n"
+			"STDERR.puts\n"
+			"STDERR.puts 'I have failed'\n");
+
+		setLogLevel(-2);
+		spawnerFactory->getConfig()->forwardStderr = false;
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", (root + "/test/tmp.handler").c_str(),
+			"PASSENGER_APP_TYPE", "",
+			"PASSENGER_START_COMMAND", ("ruby\t" + root + "/test/tmp.handler/start.rb").c_str(),
+			"PATH_INFO", "/",
+			NULL);
+		string response = readAll(connection);
+		ensure(containsSubstring(response, "HTTP/1.1 500 Internal Server Error\r\n"));
+		ensure(containsSubstring(response, "Status: 500 Internal Server Error\r\n"));
+		ensure(containsSubstring(response, "Content-Type: text/html; charset=UTF-8\r\n"));
+		ensure(containsSubstring(response, "<html>"));
+		ensure(containsSubstring(response, "I have failed"));
+	}
+
+	TEST_METHOD(12) {
+		// If spawning fails because of an internal error then it reports the error appropriately.
+		TempDir tempdir("tmp.handler");
+		writeFile("tmp.handler/start.rb", "");
+
+		setLogLevel(-2);
+		spawnerFactory->getConfig()->forwardStderr = false;
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", (root + "/test/tmp.handler").c_str(),
+			"PASSENGER_APP_TYPE", "",
+			"PASSENGER_START_COMMAND", ("ruby\t" + root + "/test/tmp.handler/start.rb").c_str(),
+			"PASSENGER_RAISE_INTERNAL_ERROR", "true",
+			"PATH_INFO", "/",
+			NULL);
+		string response = readAll(connection);
+		ensure(containsSubstring(response, "HTTP/1.1 500 Internal Server Error\r\n"));
+		ensure(containsSubstring(response, "Status: 500 Internal Server Error\r\n"));
+		ensure(containsSubstring(response, "Content-Type: text/html; charset=UTF-8\r\n"));
+		ensure(containsSubstring(response, "<html>"));
+		ensure(containsSubstring(response, "An internal error occurred while trying to spawn the application."));
+		ensure(containsSubstring(response, "Passenger:<wbr>:<wbr>RuntimeException"));
+		ensure(containsSubstring(response, "An internal error!"));
+		ensure(containsSubstring(response, "Spawner.h"));
+	}
+
+	TEST_METHOD(13) {
+		// Error pages respect the PASSENGER_STATUS_LINE option.
+		TempDir tempdir("tmp.handler");
+		writeFile("tmp.handler/start.rb",
+			"STDERR.puts 'I have failed'");
+
+		setLogLevel(-2);
+		spawnerFactory->getConfig()->forwardStderr = false;
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", (root + "/test/tmp.handler").c_str(),
+			"PASSENGER_APP_TYPE", "",
+			"PASSENGER_START_COMMAND", ("ruby\t" + root + "/test/tmp.handler/start.rb").c_str(),
+			"PASSENGER_STATUS_LINE", "false",
+			"PATH_INFO", "/",
+			NULL);
+		string response = readAll(connection);
+		ensure(!containsSubstring(response, "HTTP/1.1 "));
+		ensure(containsSubstring(response, "Status: 500 Internal Server Error\r\n"));
+		ensure(containsSubstring(response, "I have failed"));
+	}
+
+	TEST_METHOD(14) {
+		// If PASSENGER_FRIENDLY_ERROR_PAGES is false then it does not render
+		// a friendly error page.
+		TempDir tempdir("tmp.handler");
+		writeFile("tmp.handler/start.rb",
+			"STDERR.puts 'Error'\n"
+			"STDERR.puts\n"
+			"STDERR.puts 'I have failed'\n");
+
+		setLogLevel(-2);
+		spawnerFactory->getConfig()->forwardStderr = false;
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", (root + "/test/tmp.handler").c_str(),
+			"PASSENGER_APP_TYPE", "",
+			"PASSENGER_START_COMMAND", ("ruby\t" + root + "/test/tmp.handler/start.rb").c_str(),
+			"PASSENGER_FRIENDLY_ERROR_PAGES", "false",
+			"PATH_INFO", "/",
+			NULL);
+		string response = readAll(connection);
+		ensure(containsSubstring(response, "HTTP/1.1 500 Internal Server Error\r\n"));
+		ensure(containsSubstring(response, "Status: 500 Internal Server Error\r\n"));
+		ensure(containsSubstring(response, "Content-Type: text/html; charset=UTF-8\r\n"));
+		ensure(containsSubstring(response, "<html>"));
+		ensure(!containsSubstring(response, "I have failed"));
+		ensure(containsSubstring(response, "We're sorry, but something went wrong"));
+	}
+
+	TEST_METHOD(20) {
+		// It streams the request body to the application.
+		DeleteFileEventually file("tmp.output");
+
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/upload",
+			"HTTP_X_OUTPUT", (root + "/test/tmp.output").c_str(),
+			NULL);
+		writeExact(connection, "hello\n");
+		EVENTUALLY(5,
+			result = fileExists("tmp.output") && readAll("tmp.output") == "hello\n";
+		);
+		writeExact(connection, "world\n");
+		EVENTUALLY(3,
+			result = readAll("tmp.output") == "hello\nworld\n";
+		);
+		shutdown(connection, SHUT_WR);
+		ensure_equals(stripHeaders(readAll(connection)), "ok");
+	}
+
+	TEST_METHOD(21) {
+		// It buffers the request body if PASSENGER_BUFFERING is true.
+		DeleteFileEventually file("tmp.output");
+
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PASSENGER_BUFFERING", "true",
+			"PATH_INFO", "/upload",
+			"HTTP_X_OUTPUT", (root + "/test/tmp.output").c_str(),
+			NULL);
+		writeExact(connection, "hello\n");
+		SHOULD_NEVER_HAPPEN(200,
+			result = fileExists("tmp.output");
+		);
+		writeExact(connection, "world\n");
+		SHOULD_NEVER_HAPPEN(200,
+			result = fileExists("tmp.output");
+		);
+		shutdown(connection, SHUT_WR);
+		ensure_equals(stripHeaders(readAll(connection)), "ok");
+	}
+
+	TEST_METHOD(22) {
+		set_test_name("Test buffering of large request bodies that fit in neither the socket "
+		              "buffer nor the FileBackedPipe memory buffer, and that the application "
+		              "cannot read quickly enough.");
+
+		DeleteFileEventually d1("/tmp/wait.txt");
+		DeleteFileEventually d2("/tmp/output.txt");
+
+		// 2.6 MB of request body. Guaranteed not to fit in any socket buffer.
+		string requestBody;
+		for (int i = 0; i < 204800; i++) {
+			requestBody.append("hello world!\n");
+		}
+
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/upload",
+			"PASSENGER_BUFFERING", "true",
+			"HTTP_X_WAIT_FOR_FILE", "/tmp/wait.txt",
+			"HTTP_X_OUTPUT", "/tmp/output.txt",
+			NULL);
+		
+		// Should not block.
+		writeExact(connection, requestBody);
+		shutdown(connection, SHUT_WR);
+		
+		EVENTUALLY(5,
+			result = containsSubstring(inspect(), "session initiated           = true");
+		);
+		touchFile("/tmp/wait.txt");
+
+		string result = stripHeaders(readAll(connection));
+		ensure_equals(result, "ok");
+		struct stat buf;
+		ensure(stat("/tmp/output.txt", &buf) == 0);
+		ensure_equals(buf.st_size, (off_t) requestBody.size());
+	}
+
+	TEST_METHOD(30) {
+		// It replaces HTTP_CONTENT_LENGTH with CONTENT_LENGTH.
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/env",
+			"HTTP_CONTENT_LENGTH", "5",
+			NULL);
+		writeExact(connection, "hello");
+		string response = readAll(connection);
+		ensure(containsSubstring(response, "CONTENT_LENGTH = 5\n"));
+		ensure(!containsSubstring(response, "HTTP_CONTENT_LENGTH"));
+	}
+	
+	TEST_METHOD(31) {
+		// It replaces HTTP_CONTENT_TYPE with CONTENT_TYPE.
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/env",
+			"HTTP_CONTENT_TYPE", "application/json",
+			NULL);
+		string response = readAll(connection);
+		ensure(containsSubstring(response, "CONTENT_TYPE = application/json\n"));
+		ensure(!containsSubstring(response, "HTTP_CONTENT_TYPE"));
+	}
+
+	TEST_METHOD(35) {
+		// The response doesn't contain an HTTP status line if PASSENGER_STATUS_LINE is false.
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PASSENGER_STATUS_LINE", "false",
+			"PATH_INFO", "/",
+			NULL);
+		string response = readAll(connection);
+		ensure(!containsSubstring(response, "HTTP/1.1 "));
+		ensure(containsSubstring(response, "Status: 200 OK\r\n"));
+	}
+
+	TEST_METHOD(36) {
+		// If the application outputs a status line without a reason phrase,
+		// then a reason phrase is automatically appended.
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/custom_status",
+			"HTTP_X_CUSTOM_STATUS", "201",
+			NULL);
+		string response = readAll(connection);
+		ensure(containsSubstring(response, "HTTP/1.1 201 Created\r\n"));
+		ensure(containsSubstring(response, "Status: 201 Created\r\n"));
+	}
+
+	TEST_METHOD(37) {
+		// If the application outputs a status line with a custom reason phrase,
+		// then that reason phrase is used.
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/custom_status",
+			"HTTP_X_CUSTOM_STATUS", "201 Bunnies Jump",
+			NULL);
+		string response = readAll(connection);
+		ensure(containsSubstring(response, "HTTP/1.1 201 Bunnies Jump\r\n"));
+		ensure(containsSubstring(response, "Status: 201 Bunnies Jump\r\n"));
+	}
+	
+	TEST_METHOD(38) {
+		// If the application doesn't output a status line then it rejects the application response.
+		// TODO
+	}
+
+	TEST_METHOD(39) {
+		// Test handling of slow clients that can't receive response data fast enough (response buffering).
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/blob",
+			"HTTP_X_SIZE", "10485760",
+			NULL);
+		EVENTUALLY(10,
+			result = containsSubstring(inspect(), "appInput reachedEnd         = true");
+		);
+		string result = stripHeaders(readAll(connection));
+		ensure_equals(result.size(), 10485760u);
+		const char *data = result.data();
+		const char *end  = result.data() + result.size();
+		while (data < end) {
+			ensure_equals(*data, 'x');
+			data++;
+		}
+	}
+
+	TEST_METHOD(40) {
+		set_test_name("Test that RequestHandler does not read more than CONTENT_LENGTH bytes "
+		              "from the client body (when buffering is on and request body is large).");
+
+		DeleteFileEventually d("/tmp/output.txt");
+
+		// 2.6 MB of request body. Guaranteed not to fit in any socket buffer.
+		string requestBody;
+		for (int i = 0; i < 204800; i++) {
+			requestBody.append("hello world!\n");
+		}
+
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/upload",
+			"CONTENT_LENGTH", toString(requestBody.size()).c_str(),
+			"PASSENGER_BUFFERING", "true",
+			"HTTP_X_OUTPUT", "/tmp/output.txt",
+			NULL);
+		writeExact(connection, requestBody);
+
+		string result = stripHeaders(readAll(connection));
+		ensure_equals(result, "ok");
+		struct stat buf;
+		ensure(stat("/tmp/output.txt", &buf) == 0);
+		ensure_equals(buf.st_size, (off_t) requestBody.size());
+	}
+
+	TEST_METHOD(41) {
+		set_test_name("Test that RequestHandler does not read more than CONTENT_LENGTH bytes "
+		              "from the client body (when buffering is on and request body is small).");
+
+		DeleteFileEventually d("/tmp/output.txt");
+		string requestBody = "hello world";
+
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/upload",
+			"CONTENT_LENGTH", toString(requestBody.size()).c_str(),
+			"PASSENGER_BUFFERING", "true",
+			"HTTP_X_OUTPUT", "/tmp/output.txt",
+			NULL);
+		writeExact(connection, requestBody);
+
+		string result = stripHeaders(readAll(connection));
+		ensure_equals(result, "ok");
+		struct stat buf;
+		ensure(stat("/tmp/output.txt", &buf) == 0);
+		ensure_equals(buf.st_size, (off_t) requestBody.size());
+	}
+
+	TEST_METHOD(42) {
+		set_test_name("Test that RequestHandler does not read more than CONTENT_LENGTH bytes "
+		              "from the client body (when buffering is off and request body is large).");
+
+		DeleteFileEventually d("/tmp/output.txt");
+
+		// 2 MB of request body. Guaranteed not to fit in any socket buffer.
+		string requestBody;
+		for (int i = 0; i < 102400; i++) {
+			char buf[100];
+			snprintf(buf, sizeof(buf), "%06d: hello world!\n", i);
+			requestBody.append(buf);
+		}
+
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/upload",
+			"CONTENT_LENGTH", toString(requestBody.size()).c_str(),
+			"HTTP_X_OUTPUT", "/tmp/output.txt",
+			NULL);
+
+		TempThread thr(boost::bind(RequestHandlerTest::writeBody, connection, requestBody));
+
+		string result = stripHeaders(readAll(connection));
+		ensure_equals(result, "ok");
+		struct stat buf;
+		ensure(stat("/tmp/output.txt", &buf) == 0);
+		ensure_equals(buf.st_size, (off_t) requestBody.size());
+	}
+
+	TEST_METHOD(43) {
+		set_test_name("Test that RequestHandler does not read more than CONTENT_LENGTH bytes "
+		              "from the client body (when buffering is off and request body is small).");
+
+		DeleteFileEventually d("/tmp/output.txt");
+		string requestBody = "hello world";
+
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/upload",
+			"CONTENT_LENGTH", toString(requestBody.size()).c_str(),
+			"HTTP_X_OUTPUT", "/tmp/output.txt",
+			NULL);
+
+		TempThread thr(boost::bind(RequestHandlerTest::writeBody, connection, requestBody));
+
+		string result = stripHeaders(readAll(connection));
+		ensure_equals(result, "ok");
+		struct stat buf;
+		ensure(stat("/tmp/output.txt", &buf) == 0);
+		ensure_equals(buf.st_size, (off_t) requestBody.size());
+	}
+
+	TEST_METHOD(44) {
+		set_test_name("Test that RequestHandler does not pass any client body data when CONTENT_LENGTH == 0 (when buffering is on).");
+
+		DeleteFileEventually d("/tmp/output.txt");
+
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/upload",
+			"CONTENT_LENGTH", "0",
+			"PASSENGER_BUFFERING", "true",
+			"HTTP_X_OUTPUT", "/tmp/output.txt",
+			NULL);
+		writeExact(connection, "hello world");
+
+		string result = stripHeaders(readAll(connection));
+		ensure_equals(result, "ok");
+		struct stat buf;
+		ensure(stat("/tmp/output.txt", &buf) == 0);
+		ensure_equals(buf.st_size, (off_t) 0);
+	}
+
+	TEST_METHOD(45) {
+		set_test_name("Test that RequestHandler does not pass any client body data when CONTENT_LENGTH == 0 (when buffering is off).");
+
+		DeleteFileEventually d("/tmp/output.txt");
+
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/upload",
+			"CONTENT_LENGTH", "0",
+			"HTTP_X_OUTPUT", "/tmp/output.txt",
+			NULL);
+		writeExact(connection, "hello world");
+
+		string result = stripHeaders(readAll(connection));
+		ensure_equals(result, "ok");
+		struct stat buf;
+		ensure(stat("/tmp/output.txt", &buf) == 0);
+		ensure_equals(buf.st_size, (off_t) 0);
+	}
+
+	TEST_METHOD(46) {
+		// If the application outputs a request oobw header, handler should remove the header, mark
+		// the process as oobw requested. The process should continue to process requests until the
+		// spawner spawns another process (to avoid the group being empty). As soon as the new 
+		// process is spawned, the original process will make the oobw request. Afterwards, the 
+		// original process is re-enabled.
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/oobw",
+			NULL);
+		string response = readAll(connection);
+		ensure("status is not 200", containsSubstring(response, "Status: 200 OK\r\n"));
+		ensure("contains oowb header", !containsSubstring(response, "X-Passenger-Request-OOB-Work:"));
+		pid_t origPid = atoi(stripHeaders(response));
+		
+		// Get a reference to the orignal process and verify oobw has been requested.
+		ProcessPtr origProcess;
+		{
+			unique_lock<boost::mutex> lock(pool->syncher);
+			origProcess = pool->superGroups.get(wsgiAppPath)->defaultGroup->disablingProcesses.front();
+			ensure(origProcess->oobwStatus == Process::OOBW_REQUESTED);
+		}
+		ensure("sanity check", origPid == origProcess->pid); // just a sanity check
+		
+		// Issue requests until the new process handles it.
+		pid_t pid;
+		EVENTUALLY(2,
+			connect();
+			sendHeaders(defaultHeaders,
+				"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+				"PATH_INFO", "/pid",
+				NULL);
+			string response = readAll(connection);
+			ensure(containsSubstring(response, "Status: 200 OK\r\n"));
+			pid = atoi(stripHeaders(response));
+			result = (pid != origPid);
+		);
+		
+		// Wait for the original process to finish oobw request.
+		EVENTUALLY(2,
+			unique_lock<boost::mutex> lock(pool->syncher);
+			result = origProcess->oobwStatus == Process::OOBW_NOT_ACTIVE;
+		);
+		
+		// Final asserts.
+		{
+			unique_lock<boost::mutex> lock(pool->syncher);
+			ensure_equals("2 enabled processes", pool->superGroups.get(wsgiAppPath)->defaultGroup->enabledProcesses.size(), 2u);
+			ensure_equals("oobw is reset", origProcess->oobwStatus, Process::OOBW_NOT_ACTIVE);
+			ensure_equals("process is enabled", origProcess->enabled, Process::ENABLED);
+		}
+	}
+
+	TEST_METHOD(47) {
+		set_test_name("The RequestHandler should append a Date header if the app doesn't output one.");
+
+		init();
+		connect();
+		sendHeaders(defaultHeaders,
+			"PASSENGER_APP_ROOT", wsgiAppPath.c_str(),
+			"PATH_INFO", "/pid",
+			NULL);
+
+		string result = readAll(connection);
+		ensure(result.find("Date: ") != string::npos);
+	}
+
+	// Test small response buffering.
+	// Test large response buffering.
+}
diff --git a/test/cxx/ScgiRequestParserTest.cpp b/test/cxx/ScgiRequestParserTest.cpp
index adb56d8..8892db1 100644
--- a/test/cxx/ScgiRequestParserTest.cpp
+++ b/test/cxx/ScgiRequestParserTest.cpp
@@ -1,5 +1,5 @@
 #include "TestSupport.h"
-#include "ScgiRequestParser.h"
+#include "agents/HelperAgent/ScgiRequestParser.h"
 
 using namespace Passenger;
 using namespace std;
@@ -172,6 +172,19 @@ namespace tut {
 		ensure(parser.getHeader("hello") == "world");
 		ensure(parser.getHeader("foo") == "bar");
 	}
+
+	TEST_METHOD(13) {
+		// It makes an internal copy of the data.
+		char data[] = "20:hello\0world\0foo\0bar\0,";
+		for (unsigned int i = 0; i < sizeof(data) - 1; i++) {
+			ensure_equals(parser.feed(&data[i], 1), 1u);
+		}
+		memset(data, 0, sizeof(data));
+		ensure_equals(parser.getHeaderData(),
+			string("hello\0world\0foo\0bar\0", 20));
+		ensure(parser.getHeader("hello") == "world");
+		ensure(parser.getHeader("foo") == "bar");
+	}
 	
 	/***** Test parsing invalid SCGI requests in one pass. *****/
 	
@@ -206,28 +219,28 @@ namespace tut {
 	
 	TEST_METHOD(20) {
 		// Only a header name, without even a null terminator.
-		ensure_equals(parser.feed("5:hello,", 8), 7u);
+		ensure_equals(parser.feed("5:hello,", 8), (size_t) 8);
 		ensure_equals("Parser is in the error state.",
 			parser.getState(), ScgiRequestParser::ERROR);
 	}
 	
 	TEST_METHOD(21) {
 		// Only a header name, with a null terminator.
-		ensure_equals(parser.feed("6:hello\0,", 9), 8u);
+		ensure_equals(parser.feed("6:hello\0,", 9), (size_t) 9);
 		ensure_equals("Parser is in the error state.",
 			parser.getState(), ScgiRequestParser::ERROR);
 	}
 	
 	TEST_METHOD(22) {
 		// A header name with its value not having a null terminator.
-		ensure_equals(parser.feed("7:foo\0bar,", 10), 9u);
+		ensure_equals(parser.feed("7:foo\0bar,", 10), (size_t) 10);
 		ensure_equals("Parser is in the error state.",
 			parser.getState(), ScgiRequestParser::ERROR);
 	}
 	
 	TEST_METHOD(23) {
 		// A header name without corresponding value.
-		ensure_equals(parser.feed("10:foo\0bar\0a\0,", 14), 13u);
+		ensure_equals(parser.feed("10:foo\0bar\0a\0,", 14), (size_t) 14);
 		ensure_equals("Parser is in the error state.",
 			parser.getState(), ScgiRequestParser::ERROR);
 	}
@@ -242,7 +255,14 @@ namespace tut {
 	
 	TEST_METHOD(25) {
 		// An empty header name.
-		ensure_equals(parser.feed("5:\0bar\0,", 8), 7u);
+		ensure_equals(parser.feed("5:\0bar\0,", 8), (size_t) 8);
+		ensure_equals("Parser is in the error state.",
+			parser.getState(), ScgiRequestParser::ERROR);
+	}
+	
+	TEST_METHOD(26) {
+		// An empty header.
+		ensure_equals(parser.feed("0:,", 3), (size_t) 2);
 		ensure_equals("Parser is in the error state.",
 			parser.getState(), ScgiRequestParser::ERROR);
 	}
@@ -283,32 +303,32 @@ namespace tut {
 	
 	TEST_METHOD(31) {
 		// Only a header name, without even a null terminator.
-		ensure_equals(parser.feed("5:hell", 6), 6u);
-		ensure_equals(parser.feed("o,", 1), 1u);
+		ensure_equals(parser.feed("5:hell", 6), (size_t) 6);
+		ensure_equals(parser.feed("o,", 2), (size_t) 2);
 		ensure_equals("Parser is in the error state.",
 			parser.getState(), ScgiRequestParser::ERROR);
 	}
 	
 	TEST_METHOD(32) {
 		// Only a header name, with a null terminator.
-		ensure_equals(parser.feed("6:hello", 7), 7u);
-		ensure_equals(parser.feed("\0,", 1), 1u);
+		ensure_equals(parser.feed("6:hello", 7), (size_t) 7);
+		ensure_equals(parser.feed("\0,", 2), (size_t) 2);
 		ensure_equals("Parser is in the error state.",
 			parser.getState(), ScgiRequestParser::ERROR);
 	}
 	
 	TEST_METHOD(33) {
 		// A header name with its value not having a null terminator.
-		ensure_equals(parser.feed("7:foo\0ba", 8), 8u);
-		ensure_equals(parser.feed("r,", 2), 1u);
+		ensure_equals(parser.feed("7:foo\0ba", 8), (size_t) 8);
+		ensure_equals(parser.feed("r,", 2), (size_t) 2);
 		ensure_equals("Parser is in the error state.",
 			parser.getState(), ScgiRequestParser::ERROR);
 	}
 	
 	TEST_METHOD(34) {
 		// A header name without corresponding value.
-		ensure_equals(parser.feed("10:foo\0bar\0a", 12), 12u);
-		ensure_equals(parser.feed("\0,", 2), 1u);
+		ensure_equals(parser.feed("10:foo\0bar\0a", 12), (size_t) 12);
+		ensure_equals(parser.feed("\0,", 2), (size_t) 2);
 		ensure_equals("Parser is in the error state.",
 			parser.getState(), ScgiRequestParser::ERROR);
 	}
@@ -336,8 +356,8 @@ namespace tut {
 	
 	TEST_METHOD(37) {
 		// An empty header name.
-		ensure_equals(parser.feed("5:\0", 3), 3u);
-		ensure_equals(parser.feed("bar\0,", 5), 4u);
+		ensure_equals(parser.feed("5:\0", 3), (size_t) 3);
+		ensure_equals(parser.feed("bar\0,", 5), (size_t) 5);
 		ensure_equals("Parser is in the error state.",
 			parser.getState(), ScgiRequestParser::ERROR);
 	}
diff --git a/test/cxx/ServerInstanceDirTest.cpp b/test/cxx/ServerInstanceDirTest.cpp
index 0944b3a..930bd3f 100644
--- a/test/cxx/ServerInstanceDirTest.cpp
+++ b/test/cxx/ServerInstanceDirTest.cpp
@@ -17,32 +17,17 @@ namespace tut {
 		
 		void createGenerationDir(const string &instanceDir, unsigned int number) {
 			string command = "mkdir " + instanceDir + "/generation-" + toString(number);
-			system(command.c_str());
+			runShellCommand(command.c_str());
 		}
 	};
 	
 	DEFINE_TEST_GROUP(ServerInstanceDirTest);
 	
-	TEST_METHOD(1) {
-		// The (pid_t, string) constructor creates a server instance directory
-		// in the given parent directory, and this server instance directory
-		// name contains the major and minor structure versions and the given PID.
-		ServerInstanceDir dir(1234, parentDir);
-		vector<string> contents = listDir(parentDir);
-		ensure_equals(contents.size(), 1u);
-		ensure_equals(contents[0],
-			"passenger." +
-			toString(ServerInstanceDir::DIR_STRUCTURE_MAJOR_VERSION) +
-			"." +
-			toString(ServerInstanceDir::DIR_STRUCTURE_MINOR_VERSION) +
-			".1234");
-	}
-	
 	TEST_METHOD(2) {
 		// The (string) constructor creates a ServerInstanceDir object that's
 		// associated with the given directory, and creates the directory
 		// if it doesn't exist.
-		ServerInstanceDir dir(1234, parentDir);
+		ServerInstanceDir dir(parentDir + "/passenger-test.1234");
 		ServerInstanceDir dir2(dir.getPath());
 		ServerInstanceDir dir3(parentDir + "/foo");
 		ensure_equals(dir2.getPath(), dir.getPath());
@@ -54,12 +39,12 @@ namespace tut {
 		// A ServerInstanceDir object removes the server instance directory
 		// upon destruction, but only if there are no more generations in it.
 		{
-			ServerInstanceDir dir(1234, parentDir);
+			ServerInstanceDir dir(parentDir + "/passenger-test.1234");
 		}
 		ensure_equals(listDir(parentDir).size(), 0u);
 		
 		{
-			ServerInstanceDir dir(1234, parentDir);
+			ServerInstanceDir dir(parentDir + "/passenger-test.1234");
 			createGenerationDir(dir.getPath(), 1);
 		}
 		ensure_equals(listDir(parentDir).size(), 1u);
@@ -68,17 +53,19 @@ namespace tut {
 	TEST_METHOD(4) {
 		// The destructor does not throw any exceptions if the server instance
 		// directory doesn't exist anymore.
-		ServerInstanceDir dir(1234, parentDir);
+		ServerInstanceDir dir(parentDir + "/passenger-test.1234");
 		removeDirTree(dir.getPath());
 	}
 	
 	TEST_METHOD(5) {
-		// The destructor doesnn't remove the server instance directory if it
+		// The destructor doesn't remove the server instance directory if it
 		// wasn't created with the ownership flag or if it's been detached.
 		string path, path2;
+		makeDirTree(parentDir + "/passenger-test.1234");
+		makeDirTree(parentDir + "/passenger-test.5678");
 		{
-			ServerInstanceDir dir(1234, parentDir, false);
-			ServerInstanceDir dir2(5678, parentDir);
+			ServerInstanceDir dir(parentDir + "/passenger-test.1234", false);
+			ServerInstanceDir dir2(parentDir + "/passenger-test.5678", false);
 			dir2.detach();
 			path = dir.getPath();
 			path2 = dir2.getPath();
@@ -90,7 +77,7 @@ namespace tut {
 	TEST_METHOD(6) {
 		// If there are no existing generations, newGeneration() creates a new
 		// generation directory with number 0.
-		ServerInstanceDir dir(1234, parentDir);
+		ServerInstanceDir dir(parentDir + "/passenger-test.1234");
 		unsigned int ncontents = listDir(dir.getPath()).size();
 		ServerInstanceDir::GenerationPtr generation = dir.newGeneration(true,
 			"nobody", nobodyGroup, 0, 0);
@@ -103,7 +90,7 @@ namespace tut {
 	TEST_METHOD(7) {
 		// A Generation object returned by newGeneration() deletes the associated
 		// generation directory upon destruction.
-		ServerInstanceDir dir(1234, parentDir);
+		ServerInstanceDir dir(parentDir + "/passenger-test.1234");
 		ServerInstanceDir::GenerationPtr generation = dir.newGeneration(true,
 			"nobody", nobodyGroup, 0, 0);
 		string path = generation->getPath();
@@ -113,7 +100,7 @@ namespace tut {
 	
 	TEST_METHOD(8) {
 		// getNewestGeneration() returns the newest generation.
-		ServerInstanceDir dir(1234, parentDir);
+		ServerInstanceDir dir(parentDir + "/passenger-test.1234");
 		ServerInstanceDir::GenerationPtr generation0 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0);
 		ServerInstanceDir::GenerationPtr generation1 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0);
 		ServerInstanceDir::GenerationPtr generation2 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0);
@@ -127,14 +114,14 @@ namespace tut {
 	
 	TEST_METHOD(9) {
 		// getNewestGeneration returns null if there are no generations.
-		ServerInstanceDir dir(1234, parentDir);
+		ServerInstanceDir dir(parentDir + "/passenger-test.1234");
 		ensure(dir.getNewestGeneration() == NULL);
 	}
 	
 	TEST_METHOD(10) {
 		// A Generation object returned by getNewestGeneration() doesn't delete
 		// the associated generation directory upon destruction.
-		ServerInstanceDir dir(1234, parentDir);
+		ServerInstanceDir dir(parentDir + "/passenger-test.1234");
 		ServerInstanceDir::GenerationPtr generation = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0);
 		ServerInstanceDir::GenerationPtr newestGeneration = dir.getNewestGeneration();
 		newestGeneration.reset();
@@ -143,7 +130,7 @@ namespace tut {
 	
 	TEST_METHOD(11) {
 		// getGeneration() returns the given generation.
-		ServerInstanceDir dir(1234, parentDir);
+		ServerInstanceDir dir(parentDir + "/passenger-test.1234");
 		ServerInstanceDir::GenerationPtr generation0 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0);
 		ServerInstanceDir::GenerationPtr generation1 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0);
 		ServerInstanceDir::GenerationPtr generation2 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0);
@@ -156,7 +143,7 @@ namespace tut {
 	TEST_METHOD(12) {
 		// A Generation object returned by getGeneration() doesn't delete the
 		// associated generation directory upon destruction.
-		ServerInstanceDir dir(1234, parentDir);
+		ServerInstanceDir dir(parentDir + "/passenger-test.1234");
 		ServerInstanceDir::GenerationPtr generation0 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0);
 		ServerInstanceDir::GenerationPtr generation1 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0);
 		
@@ -169,7 +156,7 @@ namespace tut {
 	TEST_METHOD(13) {
 		// A detached Generation doesn't delete the associated generation
 		// directory upon destruction.
-		ServerInstanceDir dir(1234, parentDir);
+		ServerInstanceDir dir(parentDir + "/passenger-test.1234");
 		ServerInstanceDir::GenerationPtr generation = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0);
 		string path = generation->getPath();
 		generation->detach();
@@ -180,7 +167,7 @@ namespace tut {
 	TEST_METHOD(14) {
 		// It's possible to have two ServerInstanceDir objects constructed
 		// with the same (pid_t, string) constructor arguments.
-		ServerInstanceDir dir1(1234, parentDir);
-		ServerInstanceDir dir2(1234, parentDir);
+		ServerInstanceDir dir(parentDir + "/passenger-test.1234");
+		ServerInstanceDir dir2(parentDir + "/passenger-test.1234");
 	}
 }
diff --git a/test/cxx/SpawnManagerTest.cpp b/test/cxx/SpawnManagerTest.cpp
deleted file mode 100644
index 87c71b6..0000000
--- a/test/cxx/SpawnManagerTest.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-#include "TestSupport.h"
-#include "SpawnManager.h"
-#include <sys/types.h>
-#include <signal.h>
-#include <cstring>
-#include <unistd.h>
-#include "valgrind.h"
-
-using namespace Passenger;
-
-namespace tut {
-	struct SpawnManagerTest {
-		ServerInstanceDirPtr serverInstanceDir;
-		ServerInstanceDir::GenerationPtr generation;
-		SpawnManagerPtr manager;
-		AccountsDatabasePtr accountsDatabase;
-		PoolOptions rackOptions;
-		
-		SpawnManagerTest() {
-			createServerInstanceDirAndGeneration(serverInstanceDir, generation);
-			rackOptions.appRoot = "stub/rack";
-			rackOptions.appType = "rack";
-		}
-		
-		void initialize() {
-			manager = ptr(new SpawnManager("../helper-scripts/passenger-spawn-server", generation,
-				accountsDatabase));
-		}
-		
-		void sendTestRequest(SessionPtr &session, bool authenticate = true, const char *uri = "/foo/new") {
-			string headers;
-			#define ADD_HEADER(name, value) \
-				headers.append(name); \
-				headers.append(1, '\0'); \
-				headers.append(value); \
-				headers.append(1, '\0')
-			ADD_HEADER("HTTP_HOST", "www.test.com");
-			ADD_HEADER("QUERY_STRING", "");
-			ADD_HEADER("REQUEST_URI", uri);
-			ADD_HEADER("REQUEST_METHOD", "GET");
-			ADD_HEADER("REMOTE_ADDR", "localhost");
-			ADD_HEADER("SCRIPT_NAME", "");
-			ADD_HEADER("PATH_INFO", uri);
-			if (authenticate) {
-				ADD_HEADER("PASSENGER_CONNECT_PASSWORD", session->getConnectPassword());
-			}
-			session->sendHeaders(headers);
-		}
-	};
-
-	DEFINE_TEST_GROUP(SpawnManagerTest);
-
-	TEST_METHOD(1) {
-		// Spawning an application should return a valid Application object.
-		initialize();
-		ProcessPtr process = manager->spawn(rackOptions);
-		SessionPtr session = process->newSession();
-		sendTestRequest(session);
-		session->shutdownWriter();
-		string result = readAll(session->getStream());
-		ensure(result.find("hello <b>world</b>") != string::npos);
-	}
-	
-	TEST_METHOD(2) {
-		// If something goes wrong during spawning, the spawn manager
-		// should be restarted and another (successful) spawn should be attempted.
-		initialize();
-		pid_t old_pid = manager->getServerPid();
-		manager->killSpawnServer();
-		// Give the spawn server the time to properly terminate.
-		usleep(500000);
-		
-		ProcessPtr process = manager->spawn(rackOptions);
-		SessionPtr session = process->newSession();
-		sendTestRequest(session);
-		session->shutdownWriter();
-		string result = readAll(session->getStream());
-		ensure(result.find("hello <b>world</b>") != string::npos);
-		
-		// The following test will fail if we're inside Valgrind, but that's normal.
-		// Killing the spawn server doesn't work there.
-		if (!RUNNING_ON_VALGRIND) {
-			ensure("The spawn server was restarted", manager->getServerPid() != old_pid);
-		}
-	}
-	
-	class BuggySpawnManager: public SpawnManager {
-	protected:
-		virtual void spawnServerStarted() {
-			if (nextRestartShouldFail) {
-				nextRestartShouldFail = false;
-				killSpawnServer();
-				usleep(25000);
-			}
-		}
-		
-	public:
-		bool nextRestartShouldFail;
-		
-		BuggySpawnManager(const ServerInstanceDir::GenerationPtr &generation)
-			: SpawnManager("stub/spawn_server.rb", generation)
-		{
-			nextRestartShouldFail = false;
-		}
-	};
-	
-	TEST_METHOD(3) {
-		// If the spawn server dies after a restart, a SpawnException should be thrown.
-		
-		// This test fails in Valgrind, but that's normal.
-		// Killing the spawn server doesn't work there.
-		if (!RUNNING_ON_VALGRIND) {
-			BuggySpawnManager manager(generation);
-			manager.killSpawnServer();
-			// Give the spawn server the time to properly terminate.
-			usleep(250000);
-			
-			try {
-				manager.nextRestartShouldFail = true;
-				ProcessPtr process = manager.spawn(rackOptions);
-				fail("SpawnManager did not throw a SpawnException");
-			} catch (const SpawnException &e) {
-				// Success.
-			}
-		}
-	}
-	
-	TEST_METHOD(4) {
-		// The connect password is passed to the spawned application, which rejects
-		// sessions that aren't authenticated with the right password.
-		initialize();
-		ProcessPtr process = manager->spawn(rackOptions);
-		SessionPtr session = process->newSession();
-		sendTestRequest(session, false);
-		session->shutdownWriter();
-		string result = readAll(session->getStream());
-		ensure_equals(result, "");
-	}
-	
-	TEST_METHOD(5) {
-		// It automatically creates a unique account for the application,
-		// which is deleted when no longer needed.
-		accountsDatabase = ptr(new AccountsDatabase());
-		initialize();
-		
-		ProcessPtr process1 = manager->spawn(rackOptions);
-		vector<string> usernames1 = accountsDatabase->listUsernames();
-		ensure_equals(accountsDatabase->size(), 1u);
-		
-		ProcessPtr process2 = manager->spawn(rackOptions);
-		vector<string> usernames2 = accountsDatabase->listUsernames();
-		ensure_equals(accountsDatabase->size(), 2u);
-		
-		process1.reset();
-		ensure_equals(accountsDatabase->size(), 1u);
-		ensure_equals(accountsDatabase->get(usernames1[0]), AccountPtr());
-		
-		process2.reset();
-		ensure_equals(accountsDatabase->size(), 0u);
-	}
-}
diff --git a/test/cxx/StringMapTest.cpp b/test/cxx/StringMapTest.cpp
index 9b8730a..8ef6441 100644
--- a/test/cxx/StringMapTest.cpp
+++ b/test/cxx/StringMapTest.cpp
@@ -1,6 +1,7 @@
 #include "TestSupport.h"
 #include "Utils/StringMap.h"
 #include <string>
+#include <map>
 
 using namespace Passenger;
 using namespace std;
@@ -67,4 +68,64 @@ namespace tut {
 		ensure_equals(m.get("foo"), "bar");
 		ensure(!m.remove("hello"));
 	}
+	
+	TEST_METHOD(6) {
+		// Test iterators.
+		StringMap<int> m;
+		m.set("a", 1);
+		m.set("b", 2);
+		m.set("c", 3);
+		m.set("d", 4);
+		
+		map<string, int> m2, m3;
+		
+		StringMap<int>::iterator it, end = m.end();
+		for (it = m.begin(); it != end; it++) {
+			pair<StaticString, int> p = *it;
+			m2[it->first] = it->second;
+			m3[p.first] = p.second;
+		}
+		
+		ensure_equals(m2.size(), 4u);
+		ensure_equals(m2["a"], 1);
+		ensure_equals(m2["b"], 2);
+		ensure_equals(m2["c"], 3);
+		ensure_equals(m2["d"], 4);
+		
+		ensure_equals(m3.size(), 4u);
+		ensure_equals(m3["a"], 1);
+		ensure_equals(m3["b"], 2);
+		ensure_equals(m3["c"], 3);
+		ensure_equals(m3["d"], 4);
+	}
+	
+	TEST_METHOD(7) {
+		// Test const_iterators.
+		StringMap<int> m;
+		m.set("a", 1);
+		m.set("b", 2);
+		m.set("c", 3);
+		m.set("d", 4);
+		
+		map<string, int> m2, m3;
+		
+		StringMap<int>::const_iterator it, end = m.end();
+		for (it = m.begin(); it != end; it++) {
+			pair<const StaticString, const int> p = *it;
+			m2[it->first] = it->second;
+			m3[p.first] = p.second;
+		}
+		
+		ensure_equals(m2.size(), 4u);
+		ensure_equals(m2["a"], 1);
+		ensure_equals(m2["b"], 2);
+		ensure_equals(m2["c"], 3);
+		ensure_equals(m2["d"], 4);
+		
+		ensure_equals(m3.size(), 4u);
+		ensure_equals(m3["a"], 1);
+		ensure_equals(m3["b"], 2);
+		ensure_equals(m3["c"], 3);
+		ensure_equals(m3["d"], 4);
+	}
 }
diff --git a/test/cxx/TemplateTest.cpp b/test/cxx/TemplateTest.cpp
new file mode 100644
index 0000000..cd20fb0
--- /dev/null
+++ b/test/cxx/TemplateTest.cpp
@@ -0,0 +1,118 @@
+#include <TestSupport.h>
+#include <Utils/Template.h>
+#include <cstdarg>
+
+using namespace Passenger;
+
+namespace tut {
+	struct TemplateTest {
+		string apply(const StaticString &templateContent, ...) {
+			va_list ap;
+			const char *arg;
+			StringMap<StaticString> params;
+
+			va_start(ap, templateContent);
+			while ((arg = va_arg(ap, const char *)) != NULL) {
+				params.set(arg, va_arg(ap, const char *));
+			}
+			string result = Template::apply(templateContent, params);
+			va_end(ap);
+			return result;
+		}
+	};
+	
+	DEFINE_TEST_GROUP(TemplateTest);
+	
+	TEST_METHOD(1) {
+		// Test 1 substitution.
+		string result = apply("hello {{name}}",
+			"name", "world",
+			NULL);
+		ensure_equals(result, "hello world");
+	}
+
+	TEST_METHOD(2) {
+		// Test multiple substitutions.
+		string result = apply("hello {{name}} and {{name2}}",
+			"name", "joe",
+			"name2", "jane",
+			NULL);
+		ensure_equals(result, "hello joe and jane");
+	}
+
+	TEST_METHOD(3) {
+		// Test unspecified substitutions.
+		string result = apply("hello {{name}} and {{name2}}!",
+			"name", "joe",
+			NULL);
+		ensure_equals(result, "hello joe and !");
+	}
+
+	TEST_METHOD(4) {
+		// Test default values.
+		string result = apply("hello {{name|default=joe}} and {{name2|default=jane}}",
+			NULL);
+		ensure_equals(result, "hello joe and jane");
+	}
+
+	TEST_METHOD(5) {
+		// Substitutions are HTML-escaped by default.
+		string result = apply("hello {{name}}",
+			"name", "<joe>",
+			NULL);
+		ensure_equals(result, "hello <joe>");
+		result = apply("hello {{name|default=<joe>}}",
+			NULL);
+		ensure_equals(result, "hello <joe>");
+	}
+
+	TEST_METHOD(6) {
+		// HTML escaping can be disabled with the 'raw' option.
+		string result = apply("hello {{name|raw}}",
+			"name", "<joe>",
+			NULL);
+		ensure_equals(result, "hello <joe>");
+	}
+
+	TEST_METHOD(7) {
+		// Test combining default values and the 'raw' option.
+		string result = apply("hello {{name|raw,default=<joe>}}",
+			NULL);
+		ensure_equals(result, "hello <joe>");
+	}
+
+	TEST_METHOD(8) {
+		// Test 'if' statements.
+		string result = apply("hello. {{if morning}}good morning. {{/if}}{{if evening}}good evening. {{/if}}",
+			"morning", "true",
+			NULL);
+		ensure_equals(result, "hello. good morning. ");
+	}
+
+	TEST_METHOD(9) {
+		// An 'if' condition is considered true when it is neither the empty string nor "false".
+		string result = apply("hello. {{if morning}}good morning. {{/if}}"
+			"{{if afternoon}}good afternoon. {{/if}"
+			"{{if evening}}good evening. {{/if}}",
+			"morning", "of course",
+			"afternoon", "false",
+			NULL);
+		ensure_equals(result, "hello. good morning. ");
+	}
+
+	TEST_METHOD(10) {
+		// Test nesting substitutions within 'if's.
+		string result = apply("hello. {{if name}}good morning {{name}}.{{/if}}",
+			"name", "joe",
+			NULL);
+		ensure_equals(result, "hello. good morning joe.");
+	}
+
+	TEST_METHOD(11) {
+		// Test auto-breaking on certain characters.
+		string result = apply("{{content}}",
+			"content", "Hello, world: a=b;c=d",
+			NULL);
+		ensure_equals(result, "Hello,<wbr> world:<wbr> a=<wbr>b;<wbr>c=<wbr>d");
+	}
+}
diff --git a/test/cxx/TestSupport.cpp b/test/cxx/TestSupport.cpp
index 4a5d5e5..9f72db2 100644
--- a/test/cxx/TestSupport.cpp
+++ b/test/cxx/TestSupport.cpp
@@ -1,60 +1,31 @@
+#include "TestSupport.h"
 #include <dirent.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <pwd.h>
 #include <grp.h>
-#include "TestSupport.h"
+#include <cassert>
+#include <BackgroundEventLoop.cpp>
+#include <Utils/IOUtils.h>
+#include <Utils/ScopeGuard.h>
+#include <Utils/json.h>
 
 namespace TestSupport {
 
+ResourceLocator *resourceLocator = NULL;
+Json::Value testConfig;
+
+
 void createServerInstanceDirAndGeneration(ServerInstanceDirPtr &serverInstanceDir,
                                           ServerInstanceDir::GenerationPtr &generation)
 {
-	serverInstanceDir.reset(new ServerInstanceDir(getpid()));
+	string path = "/tmp/passenger-test." + toString(getpid());
+	serverInstanceDir.reset(new ServerInstanceDir(path));
 	generation = serverInstanceDir->newGeneration(geteuid() == 0,
 		"nobody", getPrimaryGroupName("nobody"),
 		geteuid(), getegid());
 }
 
-string
-readAll(const string &filename) {
-	FILE *f = fopen(filename.c_str(), "rb");
-	if (f != NULL) {
-		try {
-			string result = readAll(fileno(f));
-			fclose(f);
-			return result;
-		} catch (...) {
-			fclose(f);
-			throw;
-		}
-	} else {
-		int e = errno;
-		throw FileSystemException("Cannot open '" + filename + "' for reading",
-			e, filename);
-	}
-}
-
-string
-readAll(int fd) {
-	string result;
-	char buf[1024 * 32];
-	ssize_t ret;
-	while (true) {
-		do {
-			ret = read(fd, buf, sizeof(buf));
-		} while (ret == -1 && errno == EINTR);
-		if (ret == 0) {
-			break;
-		} else if (ret == -1) {
-			throw SystemException("Cannot read from socket", errno);
-		} else {
-			result.append(buf, ret);
-		}
-	}
-	return result;
-}
-
 void
 writeUntilFull(int fd) {
 	int flags, ret;
@@ -101,41 +72,26 @@ writeUntilFull(int fd) {
 	fcntl(fd, F_SETFL, flags);
 }
 
-string
-replaceString(const string &str, const string &toFind, const string &replaceWith) {
-	string::size_type pos = str.find(toFind);
-	if (pos == string::npos) {
-		return str;
-	} else {
-		string result(str);
-		return result.replace(pos, toFind.size(), replaceWith);
-	}
-}
-
 void
 replaceStringInFile(const char *filename, const string &toFind, const string &replaceWith) {
-	FILE *f = fopen(filename, "r");
-	if (f == NULL) {
-		int e = errno;
-		string message = "Cannot open file '";
-		message.append(filename);
-		message.append("' for reading");
-		throw FileSystemException(message, e, filename);
-	}
-	string content(readAll(fileno(f)));
-	fclose(f);
-	
-	f = fopen(filename, "w");
+	string content = readAll(filename);
+	FILE *f = fopen(filename, "w");
 	if (f == NULL) {
 		int e = errno;
 		string message = "Cannot open file '";
 		message.append(filename);
 		message.append("' for writing");
 		throw FileSystemException(message, e, filename);
+	} else {
+		StdioGuard guard(f);
+		content = replaceString(content, toFind, replaceWith);
+		fwrite(content.data(), 1, content.size(), f);
 	}
-	content = replaceString(content, toFind, replaceWith);
-	fwrite(content.data(), 1, content.size(), f);
-	fclose(f);
+}
+
+bool
+containsSubstring(const StaticString &str, const StaticString &substr) {
+	return str.find(substr) != string::npos;
 }
 
 void
@@ -147,9 +103,10 @@ writeFile(const string &filename, const string &contents) {
 		message.append(filename);
 		message.append("' for writing");
 		throw FileSystemException(message, e, filename);
+	} else {
+		StdioGuard guard(f);
+		fwrite(contents.data(), 1, contents.size(), f);
 	}
-	fwrite(contents.data(), 1, contents.size(), f);
-	fclose(f);
 }
 
 void
@@ -210,4 +167,5 @@ getPrimaryGroupName(const string &username) {
 	return group->gr_name;
 }
 
+
 } // namespace TestSupport
diff --git a/test/cxx/TestSupport.h b/test/cxx/TestSupport.h
index afd1bc5..10deba2 100644
--- a/test/cxx/TestSupport.h
+++ b/test/cxx/TestSupport.h
@@ -18,10 +18,22 @@
 #include <oxt/tracable_exception.hpp>
 
 #include "../tut/tut.h"
-#include "ServerInstanceDir.h"
-#include "Exceptions.h"
-#include "Utils.h"
-#include "Utils/SystemTime.h"
+#include <ResourceLocator.h>
+#include <ServerInstanceDir.h>
+#include <BackgroundEventLoop.h>
+#include <Exceptions.h>
+#include <Utils.h>
+#include <Utils/SystemTime.h>
+#include <Utils/json-forwards.h>
+
+extern "C" {
+	struct ev_loop;
+	struct ev_async;
+}
+
+namespace Passenger {
+	class SafeLibev;
+}
 
 namespace TestSupport {
 
@@ -40,21 +52,25 @@ using namespace oxt;
 		}                                                     \
 	} while (0)
 
-#define EVENTUALLY(deadline, code)					\
-	do {								\
-		time_t deadlineTime = time(NULL) + deadline;		\
-		bool result = false;					\
-		while (!result && time(NULL) < deadlineTime) {		\
-			code						\
-			if (!result) {					\
-				usleep(10000);				\
-			}						\
-		}							\
-		if (!result) {						\
-			fail("EVENTUALLY(" #code ") failed");		\
-		}							\
+#define EVENTUALLY2(deadlineMsec, sleepTimeMsec, code)					\
+	do {										\
+		unsigned long long deadlineTime = SystemTime::getMsec(true) + deadlineMsec;	\
+		bool result = false;							\
+		while (!result && SystemTime::getMsec(true) < deadlineTime) {		\
+			{										\
+				code								\
+			}										\
+			if (!result) {							\
+				usleep(sleepTimeMsec * 1000);				\
+			}								\
+		}									\
+		if (!result) {								\
+			fail("EVENTUALLY(" #code ") failed");				\
+		}									\
 	} while (0)
 
+#define EVENTUALLY(deadlineSec, code) EVENTUALLY2(deadlineSec * 1000, 10, code)
+
 #define SHOULD_NEVER_HAPPEN(deadline, code)						\
 	do {										\
 		unsigned long long deadlineTime = SystemTime::getMsec(true) + deadline;	\
@@ -71,6 +87,10 @@ using namespace oxt;
 	} while (0)
 
 
+extern ResourceLocator *resourceLocator;
+extern Json::Value testConfig;
+
+
 /**
  * Create a server instance directory and generation with default parameters,
  * suitable for unit testing.
@@ -79,20 +99,6 @@ void createServerInstanceDirAndGeneration(ServerInstanceDirPtr &serverInstanceDi
                                           ServerInstanceDir::GenerationPtr &generation);
 
 /**
- * Read all data from the given file until EOF.
- *
- * @throws SystemException
- */
-string readAll(const string &filename);
-
-/**
- * Read all data from the given file descriptor until EOF.
- *
- * @throws SystemException
- */
-string readAll(int fd);
-
-/**
  * Writes zeroes into the given file descriptor its buffer is full (i.e.
  * the next write will block).
  *
@@ -101,12 +107,6 @@ string readAll(int fd);
 void writeUntilFull(int fd);
 
 /**
- * Look for 'toFind' inside 'str', replace it with 'replaceWith' and return the result.
- * Only the first occurence of 'toFind' is replaced.
- */
-string replaceString(const string &str, const string &toFind, const string &replaceWith);
-
-/**
  * Look for 'toFind' inside the given file, replace it with 'replaceWith' and write
  * the result back to the file. Only the first occurence of 'toFind' is replaced.
  *
@@ -115,6 +115,11 @@ string replaceString(const string &str, const string &toFind, const string &repl
 void replaceStringInFile(const char *filename, const string &toFind, const string &replaceWith);
 
 /**
+ * Returns whether 'str' contains the given substring.
+ */
+bool containsSubstring(const StaticString &str, const StaticString &substr);
+
+/**
  * Writes the given data into the given file.
  *
  * @throws FileSystemException
@@ -152,7 +157,7 @@ private:
 public:
 	TempDir(const string &name) {
 		this->name = name;
-		if (mkdir(name.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) != 0) {
+		if (mkdir(name.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) != 0 && errno != EEXIST) {
 			int e = errno;
 			string message = "Cannot create directory '";
 			message.append(name);
@@ -182,7 +187,19 @@ public:
 		char command[1024];
 		snprintf(command, sizeof(command), "cp -pR \"%s\" \"%s\"",
 			source.c_str(), dest.c_str());
-		system(command);
+		pid_t pid = fork();
+		if (pid == 0) {
+			resetSignalHandlersAndMask();
+			disableMallocDebugging();
+			closeAllFileDescriptors(2);
+			execlp("/bin/sh", "/bin/sh", "-c", command, (char * const) 0);
+			_exit(1);
+		} else if (pid == -1) {
+			int e = errno;
+			throw SystemException("Cannot fork()", e);
+		} else {
+			waitpid(pid, NULL, 0);
+		}
 	}
 	
 	~TempDirCopy() {
@@ -198,8 +215,11 @@ class DeleteFileEventually {
 private:
 	string filename;
 public:
-	DeleteFileEventually(const string &filename) {
+	DeleteFileEventually(const string &filename, bool deleteNow = true) {
 		this->filename = filename;
+		if (deleteNow) {
+			unlink(filename.c_str());
+		}
 	}
 	
 	~DeleteFileEventually() {
@@ -217,7 +237,7 @@ public:
 	oxt::thread thread;
 	
 	TempThread(boost::function<void ()> func)
-		: thread(func)
+		: thread(boost::bind(runAndPrintExceptions, func, true))
 		{ }
 	
 	~TempThread() {
@@ -235,13 +255,21 @@ public:
 		val = 0;
 	}
 	
+	AtomicInt(int value) {
+		val = value;
+	}
+	
+	AtomicInt(const AtomicInt &other) {
+		val = other.val;
+	}
+	
 	int get() const {
-		lock_guard<boost::mutex> l(lock);
+		boost::lock_guard<boost::mutex> l(lock);
 		return val;
 	}
 	
 	void set(int value) {
-		lock_guard<boost::mutex> l(lock);
+		boost::lock_guard<boost::mutex> l(lock);
 		val = value;
 	}
 	
@@ -250,11 +278,25 @@ public:
 		return *this;
 	}
 	
+	AtomicInt &operator++() {
+		boost::lock_guard<boost::mutex> l(lock);
+		val++;
+		return *this;
+	}
+	
+	AtomicInt operator++(int) {
+		boost::lock_guard<boost::mutex> l(lock);
+		AtomicInt temp(*this);
+		val++;
+		return temp;
+	}
+	
 	operator int() const {
 		return get();
 	}
 };
 
+
 } // namespace TestSupport
 
 using namespace TestSupport;
diff --git a/test/cxx/UnionStationTest.cpp b/test/cxx/UnionStationTest.cpp
new file mode 100644
index 0000000..cd0997b
--- /dev/null
+++ b/test/cxx/UnionStationTest.cpp
@@ -0,0 +1,745 @@
+#include <TestSupport.h>
+#include <UnionStation.h>
+#include <MessageClient.h>
+#include <agents/LoggingAgent/LoggingServer.h>
+#include <Utils/MessageIO.h>
+
+#include <boost/bind.hpp>
+#include <boost/shared_ptr.hpp>
+#include <oxt/thread.hpp>
+#include <set>
+
+using namespace Passenger;
+using namespace Passenger::UnionStation;
+using namespace std;
+using namespace oxt;
+
+namespace tut {
+	struct UnionStationTest {
+		static const unsigned long long YESTERDAY = 1263299017000000ull;  // January 12, 2009, 12:23:37 UTC
+		static const unsigned long long TODAY     = 1263385422000000ull;  // January 13, 2009, 12:23:42 UTC
+		static const unsigned long long TOMORROW  = 1263471822000000ull;  // January 14, 2009, 12:23:42 UTC
+		#define TODAY_TXN_ID "cjb8n-abcd"
+		#define TODAY_TIMESTAMP_STR "cftz90m3k0"
+		
+		ServerInstanceDirPtr serverInstanceDir;
+		ServerInstanceDir::GenerationPtr generation;
+		string socketFilename;
+		string socketAddress;
+		string dumpFile;
+		AccountsDatabasePtr accountsDatabase;
+		ev::dynamic_loop eventLoop;
+		FileDescriptor serverFd;
+		LoggingServerPtr server;
+		shared_ptr<oxt::thread> serverThread;
+		LoggerFactoryPtr factory, factory2, factory3, factory4;
+		
+		UnionStationTest() {
+			createServerInstanceDirAndGeneration(serverInstanceDir, generation);
+			socketFilename = generation->getPath() + "/logging.socket";
+			socketAddress = "unix:" + socketFilename;
+			dumpFile = generation->getPath() + "/log.txt";
+			accountsDatabase = ptr(new AccountsDatabase());
+			accountsDatabase->add("test", "1234", false);
+			setLogLevel(-1);
+			
+			startLoggingServer();
+			factory = ptr(new LoggerFactory(socketAddress, "test", "1234",
+				"localhost"));
+			factory2 = ptr(new LoggerFactory(socketAddress, "test", "1234",
+				"localhost"));
+			factory3 = ptr(new LoggerFactory(socketAddress, "test", "1234",
+				"localhost"));
+			factory4 = ptr(new LoggerFactory(socketAddress, "test", "1234",
+				"localhost"));
+		}
+		
+		~UnionStationTest() {
+			stopLoggingServer();
+			SystemTime::releaseAll();
+			setLogLevel(0);
+		}
+		
+		void startLoggingServer(const function<void ()> &initFunc = function<void ()>()) {
+			VariantMap options;
+			options.set("analytics_dump_file", dumpFile);
+			serverFd = createUnixServer(socketFilename.c_str());
+			server = ptr(new LoggingServer(eventLoop,
+				serverFd, accountsDatabase, options));
+			if (initFunc) {
+				initFunc();
+			}
+			serverThread = ptr(new oxt::thread(
+				boost::bind(&UnionStationTest::runLoop, this)
+			));
+		}
+		
+		void stopLoggingServer(bool destroy = true) {
+			if (serverThread != NULL) {
+				MessageClient client;
+				client.connect(socketAddress, "test", "1234");
+				client.write("exit", "immediately", NULL);
+				joinLoggingServer(destroy);
+			}
+		}
+		
+		void joinLoggingServer(bool destroy = true) {
+			serverThread->join();
+			serverThread.reset();
+			if (destroy) {
+				server.reset();
+			}
+			unlink(socketFilename.c_str());
+		}
+		
+		void runLoop() {
+			eventLoop.loop();
+			serverFd.close();
+		}
+		
+		string timestampString(unsigned long long timestamp) {
+			char str[2 * sizeof(unsigned long long) + 1];
+			integerToHexatri<unsigned long long>(timestamp, str);
+			return str;
+		}
+		
+		MessageClient createConnection(bool sendInitCommand = true) {
+			MessageClient client;
+			vector<string> args;
+			client.connect(socketAddress, "test", "1234");
+			if (sendInitCommand) {
+				client.write("init", "localhost", NULL);
+				client.read(args);
+			}
+			return client;
+		}
+
+		string readDumpFile() {
+			return readAll(dumpFile);
+		}
+	};
+	
+	DEFINE_TEST_GROUP(UnionStationTest);
+	
+	
+	/*********** Logging interface tests ***********/
+	
+	TEST_METHOD(1) {
+		// Test logging of new transaction.
+		SystemTime::forceAll(YESTERDAY);
+		
+		LoggerPtr log = factory->newTransaction("foobar");
+		log->message("hello");
+		log->message("world");
+		log->flushToDiskAfterClose(true);
+		
+		ensure(!factory->isNull());
+		ensure(!log->isNull());
+		
+		log.reset();
+		
+		string data = readDumpFile();
+		ensure(data.find("hello\n") != string::npos);
+		ensure(data.find("world\n") != string::npos);
+	}
+	
+	TEST_METHOD(2) {
+		// Test logging of existing transaction.
+		SystemTime::forceAll(YESTERDAY);
+		
+		LoggerPtr log = factory->newTransaction("foobar");
+		log->message("message 1");
+		log->flushToDiskAfterClose(true);
+		
+		LoggerPtr log2 = factory2->continueTransaction(log->getTxnId(),
+			log->getGroupName(), log->getCategory());
+		log2->message("message 2");
+		log2->flushToDiskAfterClose(true);
+		
+		log.reset();
+		log2.reset();
+		
+		string data = readDumpFile();
+		ensure("(1)", data.find("message 1\n") != string::npos);
+		ensure("(2)", data.find("message 2\n") != string::npos);
+	}
+	
+	TEST_METHOD(3) {
+		// Test logging with different points in time.
+		SystemTime::forceAll(YESTERDAY);
+		LoggerPtr log = factory->newTransaction("foobar");
+		log->message("message 1");
+		SystemTime::forceAll(TODAY);
+		log->message("message 2");
+		log->flushToDiskAfterClose(true);
+		
+		SystemTime::forceAll(TOMORROW);
+		LoggerPtr log2 = factory2->continueTransaction(log->getTxnId(),
+			log->getGroupName(), log->getCategory());
+		log2->message("message 3");
+		log2->flushToDiskAfterClose(true);
+		
+		LoggerPtr log3 = factory3->newTransaction("foobar");
+		log3->message("message 4");
+		log3->flushToDiskAfterClose(true);
+		
+		log.reset();
+		log2.reset();
+		log3.reset();
+		
+		string data = readDumpFile();
+		ensure("(1)", data.find(timestampString(YESTERDAY) + " 1 message 1\n") != string::npos);
+		ensure("(2)", data.find(timestampString(TODAY) + " 2 message 2\n") != string::npos);
+		ensure("(3)", data.find(timestampString(TOMORROW) + " 4 message 3\n") != string::npos);
+		ensure("(4)", data.find(timestampString(TOMORROW) + " 1 message 4\n") != string::npos);
+	}
+	
+	TEST_METHOD(4) {
+		// newTransaction() and continueTransaction() write an ATTACH message
+		// to the log file, while Logger writes a DETACH message upon
+		// destruction.
+		SystemTime::forceAll(YESTERDAY);
+		LoggerPtr log = factory->newTransaction("foobar");
+		
+		SystemTime::forceAll(TODAY);
+		LoggerPtr log2 = factory2->continueTransaction(log->getTxnId(),
+			log->getGroupName(), log->getCategory());
+		log2->flushToDiskAfterClose(true);
+		log2.reset();
+		
+		SystemTime::forceAll(TOMORROW);
+		log->flushToDiskAfterClose(true);
+		log.reset();
+		
+		string data = readDumpFile();
+		ensure("(1)", data.find(timestampString(YESTERDAY) + " 0 ATTACH\n") != string::npos);
+		ensure("(2)", data.find(timestampString(TODAY) + " 1 ATTACH\n") != string::npos);
+		ensure("(3)", data.find(timestampString(TODAY) + " 2 DETACH\n") != string::npos);
+		ensure("(4)", data.find(timestampString(TOMORROW) + " 3 DETACH\n") != string::npos);
+	}
+	
+	TEST_METHOD(5) {
+		// newTransaction() generates a new ID, while continueTransaction()
+		// reuses the ID.
+		LoggerPtr log = factory->newTransaction("foobar");
+		LoggerPtr log2 = factory2->newTransaction("foobar");
+		LoggerPtr log3 = factory3->continueTransaction(log->getTxnId(),
+			log->getGroupName(), log->getCategory());
+		LoggerPtr log4 = factory4->continueTransaction(log2->getTxnId(),
+			log2->getGroupName(), log2->getCategory());
+		
+		ensure_equals(log->getTxnId(), log3->getTxnId());
+		ensure_equals(log2->getTxnId(), log4->getTxnId());
+		ensure(log->getTxnId() != log2->getTxnId());
+	}
+	
+	TEST_METHOD(6) {
+		// An empty Logger doesn't do anything.
+		Logger log;
+		ensure(log.isNull());
+		log.message("hello world");
+		ensure_equals(getFileType(dumpFile), FT_NONEXISTANT);
+	}
+	
+	TEST_METHOD(7) {
+		// An empty LoggerFactory doesn't do anything.
+		LoggerFactory factory;
+		ensure(factory.isNull());
+		
+		LoggerPtr log = factory.newTransaction("foo");
+		ensure(log->isNull());
+		log->message("hello world");
+		ensure_equals(getFileType(dumpFile), FT_NONEXISTANT);
+	}
+	
+	TEST_METHOD(11) {
+		// newTransaction() does not reconnect to the server for a short
+		// period of time if connecting failed
+		factory->setReconnectTimeout(60 * 1000000);
+		factory->setMaxConnectTries(1);
+		
+		SystemTime::forceAll(TODAY);
+		stopLoggingServer();
+		ensure(factory->newTransaction("foobar")->isNull());
+		
+		SystemTime::forceAll(TODAY + 30 * 1000000);
+		startLoggingServer();
+		ensure(factory->newTransaction("foobar")->isNull());
+		
+		SystemTime::forceAll(TODAY + 61 * 1000000);
+		ensure(!factory->newTransaction("foobar")->isNull());
+	}
+	
+	TEST_METHOD(12) {
+		// If the logging server crashed and was restarted then
+		// newTransaction() and continueTransaction() print a warning and return
+		// a null log object. One of the next newTransaction()/continueTransaction()
+		// calls will reestablish the connection when the connection timeout
+		// has passed.
+		SystemTime::forceAll(TODAY);
+		LoggerPtr log, log2;
+		
+		log = factory->newTransaction("foobar");
+		factory2->continueTransaction(log->getTxnId(), "foobar");
+		log.reset(); // Check connection back into the pool.
+		stopLoggingServer();
+		startLoggingServer();
+
+		log = factory->newTransaction("foobar");
+		ensure("(1)", log->isNull());
+		log2 = factory2->continueTransaction("some-id", "foobar");
+		ensure("(2)", log2->isNull());
+		
+		SystemTime::forceAll(TODAY + 60000000);
+		log = factory->newTransaction("foobar");
+		ensure("(3)", !log->isNull());
+		log2 = factory2->continueTransaction(log->getTxnId(), "foobar");
+		ensure("(4)", !log2->isNull());
+		log2->message("hello");
+		log2->flushToDiskAfterClose(true);
+		log.reset();
+		log2.reset();
+		
+		EVENTUALLY(3,
+			result = readDumpFile().find("hello\n") != string::npos;
+		);
+	}
+	
+	TEST_METHOD(13) {
+		// continueTransaction() does not reconnect to the server for a short
+		// period of time if connecting failed
+		factory->setReconnectTimeout(60 * 1000000);
+		factory->setMaxConnectTries(1);
+		factory2->setReconnectTimeout(60 * 1000000);
+		factory2->setMaxConnectTries(1);
+		
+		SystemTime::forceAll(TODAY);
+		LoggerPtr log = factory->newTransaction("foobar");
+		factory2->continueTransaction(log->getTxnId(), "foobar");
+		stopLoggingServer();
+		ensure(factory2->continueTransaction(log->getTxnId(), "foobar")->isNull());
+		
+		SystemTime::forceAll(TODAY + 30 * 1000000);
+		startLoggingServer();
+		ensure(factory2->continueTransaction(log->getTxnId(), "foobar")->isNull());
+		
+		SystemTime::forceAll(TODAY + 61 * 1000000);
+		ensure(!factory2->continueTransaction(log->getTxnId(), "foobar")->isNull());
+	}
+	
+	TEST_METHOD(14) {
+		// If a client disconnects from the logging server then all its
+		// transactions that are no longer referenced and have crash protection enabled
+		// will be closed and written to the sink.
+		MessageClient client1 = createConnection();
+		MessageClient client2 = createConnection();
+		MessageClient client3 = createConnection();
+		vector<string> args;
+		
+		SystemTime::forceAll(TODAY);
+		
+		client1.write("openTransaction",
+			TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR,
+			"", "true", "true", NULL);
+		client1.read(args);
+		client2.write("openTransaction",
+			TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR,
+			"", "true", NULL);
+		client2.write("log", TODAY_TXN_ID, "1000", NULL);
+		client2.writeScalar("hello world");
+		client2.write("flush", NULL);
+		client2.read(args);
+		client2.disconnect();
+		SHOULD_NEVER_HAPPEN(100,
+			// Transaction still has references open, so should not yet be written to sink.
+			result = readDumpFile().find("hello world") != string::npos;
+		);
+
+		client1.disconnect();
+		client3.write("flush", NULL);
+		client3.read(args);
+		EVENTUALLY(5,
+			result = readDumpFile().find("hello world") != string::npos;
+		);
+	}
+	
+	TEST_METHOD(15) {
+		// If a client disconnects from the logging server then all its
+		// transactions that are no longer referenced and don't have crash
+		// protection enabled will be closed and discarded.
+		MessageClient client1 = createConnection();
+		MessageClient client2 = createConnection();
+		MessageClient client3 = createConnection();
+		vector<string> args;
+		
+		SystemTime::forceAll(TODAY);
+		
+		client1.write("openTransaction",
+			TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR,
+			"", "false", "true", NULL);
+		client1.read(args);
+		client2.write("openTransaction",
+			TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR,
+			"", "false", NULL);
+		client2.write("flush", NULL);
+		client2.read(args);
+		client2.disconnect();
+		client1.disconnect();
+		client3.write("flush", NULL);
+		client3.read(args);
+		SHOULD_NEVER_HAPPEN(500,
+			result = fileExists(dumpFile) && !readDumpFile().empty();
+		);
+	}
+	
+	TEST_METHOD(16) {
+		// Upon server shutdown, all transaction that have crash protection enabled
+		// will be closed and written to to the sink.
+		MessageClient client1 = createConnection();
+		MessageClient client2 = createConnection();
+		vector<string> args;
+		
+		SystemTime::forceAll(TODAY);
+		
+		client1.write("openTransaction",
+			TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR,
+			"", "true", "true", NULL);
+		client1.read(args);
+		client2.write("openTransaction",
+			TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR,
+			"", "true", NULL);
+		client2.write("flush", NULL);
+		client2.read(args);
+		
+		stopLoggingServer();
+		EVENTUALLY(5,
+			result = fileExists(dumpFile) && !readDumpFile().empty();
+		);
+	}
+	
+	TEST_METHOD(17) {
+		// Upon server shutdown, all transaction that don't have crash protection
+		// enabled will be discarded.
+		MessageClient client1 = createConnection();
+		MessageClient client2 = createConnection();
+		vector<string> args;
+		
+		SystemTime::forceAll(TODAY);
+		
+		client1.write("openTransaction",
+			TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR,
+			"", "false", "true", NULL);
+		client1.read(args);
+		client2.write("openTransaction",
+			TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR,
+			"", "false", NULL);
+		client2.write("flush", NULL);
+		client2.read(args);
+		
+		stopLoggingServer();
+		SHOULD_NEVER_HAPPEN(200,
+			result = fileExists(dumpFile) && !readDumpFile().empty();
+		);
+	}
+	
+	TEST_METHOD(18) {
+		// Test DataStoreId
+		{
+			// Empty construction.
+			DataStoreId id;
+			ensure_equals(id.getGroupName(), "");
+			ensure_equals(id.getNodeName(), "");
+			ensure_equals(id.getCategory(), "");
+		}
+		{
+			// Normal construction.
+			DataStoreId id("ab", "cd", "ef");
+			ensure_equals(id.getGroupName(), "ab");
+			ensure_equals(id.getNodeName(), "cd");
+			ensure_equals(id.getCategory(), "ef");
+		}
+		{
+			// Copy constructor.
+			DataStoreId id("ab", "cd", "ef");
+			DataStoreId id2(id);
+			ensure_equals(id2.getGroupName(), "ab");
+			ensure_equals(id2.getNodeName(), "cd");
+			ensure_equals(id2.getCategory(), "ef");
+		}
+		{
+			// Assignment operator.
+			DataStoreId id("ab", "cd", "ef");
+			DataStoreId id2;
+			id2 = id;
+			ensure_equals(id2.getGroupName(), "ab");
+			ensure_equals(id2.getNodeName(), "cd");
+			ensure_equals(id2.getCategory(), "ef");
+			
+			DataStoreId id3("gh", "ij", "kl");
+			id3 = id;
+			ensure_equals(id3.getGroupName(), "ab");
+			ensure_equals(id3.getNodeName(), "cd");
+			ensure_equals(id3.getCategory(), "ef");
+		}
+		{
+			// < operator
+			DataStoreId id, id2;
+			ensure(!(id < id2));
+			
+			id = DataStoreId("ab", "cd", "ef");
+			id2 = DataStoreId("ab", "cd", "ef");
+			ensure(!(id < id2));
+			
+			id = DataStoreId("ab", "cd", "ef");
+			id2 = DataStoreId("bb", "cd", "ef");
+			ensure(id < id2);
+			
+			id = DataStoreId("ab", "cd", "ef");
+			id2 = DataStoreId();
+			ensure(id2 < id);
+			
+			id = DataStoreId();
+			id2 = DataStoreId("ab", "cd", "ef");
+			ensure(id < id2);
+		}
+		{
+			// == operator
+			ensure(DataStoreId() == DataStoreId());
+			ensure(DataStoreId("ab", "cd", "ef") == DataStoreId("ab", "cd", "ef"));
+			ensure(!(DataStoreId("ab", "cd", "ef") == DataStoreId()));
+			ensure(!(DataStoreId("ab", "cd", "ef") == DataStoreId("ab", "cd", "e")));
+			ensure(!(DataStoreId("ab", "cd", "ef") == DataStoreId("ab", "c", "ef")));
+			ensure(!(DataStoreId("ab", "cd", "ef") == DataStoreId("a", "cd", "ef")));
+		}
+	}
+	
+	TEST_METHOD(22) {
+		// The destructor flushes all data.
+		LoggerPtr log = factory->newTransaction("foobar");
+		log->message("hello world");
+		log.reset();
+		stopLoggingServer();
+		
+		struct stat buf;
+		ensure_equals(stat(dumpFile.c_str(), &buf), 0);
+		ensure(buf.st_size > 0);
+	}
+	
+	TEST_METHOD(23) {
+		// The 'flush' command flushes all data.
+		SystemTime::forceAll(YESTERDAY);
+		
+		LoggerPtr log = factory->newTransaction("foobar");
+		log->message("hello world");
+		log.reset();
+		
+		ConnectionPtr connection = factory->checkoutConnection();
+		vector<string> args;
+		writeArrayMessage(connection->fd, "flush", NULL);
+		ensure(readArrayMessage(connection->fd, args));
+		ensure_equals(args.size(), 1u);
+		ensure_equals(args[0], "ok");
+		
+		struct stat buf;
+		ensure_equals(stat(dumpFile.c_str(), &buf), 0);
+		ensure(buf.st_size > 0);
+	}
+	
+	TEST_METHOD(24) {
+		// A transaction's data is not written out by the server
+		// until the transaction is fully closed.
+		SystemTime::forceAll(YESTERDAY);
+		vector<string> args;
+		
+		LoggerPtr log = factory->newTransaction("foobar");
+		log->message("hello world");
+		
+		LoggerPtr log2 = factory2->continueTransaction(log->getTxnId(),
+			log->getGroupName(), log->getCategory());
+		log2->message("message 2");
+		log2.reset();
+		
+		ConnectionPtr connection = factory->checkoutConnection();
+		writeArrayMessage(connection->fd, "flush", NULL);
+		ensure(readArrayMessage(connection->fd, args));
+		
+		connection = factory2->checkoutConnection();
+		writeArrayMessage(connection->fd, "flush", NULL);
+		ensure(readArrayMessage(connection->fd, args));
+		
+		struct stat buf;
+		ensure_equals(stat(dumpFile.c_str(), &buf), 0);
+		ensure_equals(buf.st_size, (off_t) 0);
+	}
+	
+	TEST_METHOD(25) {
+		// The 'exit' command causes the logging server to exit some time after
+		// the last client has disconnected. New clients are still accepted
+		// as long as the server hasn't exited.
+		SystemTime::forceAll(YESTERDAY);
+		vector<string> args;
+		
+		MessageClient client = createConnection();
+		
+		MessageClient client2 = createConnection();
+		client2.write("exit", NULL);
+		ensure("(1)", client2.read(args));
+		ensure_equals(args.size(), 1u);
+		ensure_equals(args[0], "Passed security");
+		ensure("(2)", client2.read(args));
+		ensure_equals(args.size(), 1u);
+		ensure_equals(args[0], "exit command received");
+		client2.disconnect();
+		
+		// Not exited yet: there is still a client.
+		client2 = createConnection();
+		client2.write("ping", NULL);
+		ensure("(3)", client2.read(args));
+		client2.disconnect();
+		
+		client.disconnect();
+		setLogLevel(-2);
+		usleep(25000); // Give server some time to process the connection closes.
+		
+		// No clients now, but we can still connect because the timeout
+		// hasn't passed yet.
+		SystemTime::forceAll(YESTERDAY + 1000000);
+		SHOULD_NEVER_HAPPEN(250,
+			try {
+				close(connectToUnixServer(socketFilename));
+				result = false;
+			} catch (const SystemException &) {
+				result = true;
+			}
+		);
+		
+		usleep(50000); // Give server some time to process the connection closes.
+		
+		// It'll be gone in a few seconds.
+		SystemTime::forceAll(YESTERDAY + 1000000 + 5000000);
+		usleep(100000); // Give server some time to run the timer.
+		try {
+			close(connectToUnixServer(socketFilename));
+			fail("(4)");
+		} catch (const SystemException &) {
+			// Success
+		}
+		
+		joinLoggingServer();
+	}
+	
+	TEST_METHOD(26) {
+		// The 'exit semi-gracefully' command causes the logging server to
+		// refuse new clients while exiting some time after the last client has
+		// disconnected.
+		SystemTime::forceAll(YESTERDAY);
+		vector<string> args;
+		
+		MessageClient client = createConnection();
+		
+		MessageClient client2 = createConnection();
+		client2.write("exit", "semi-gracefully", NULL);
+		client2.disconnect();
+		
+		// New connections are refused.
+		client2 = createConnection();
+		ensure("(1)", !client2.read(args));
+		
+		client.disconnect();
+		setLogLevel(-2);
+		usleep(50000); // Give server some time to process the connection closes.
+		
+		// It'll be gone in a few seconds.
+		SystemTime::forceAll(YESTERDAY + 1000000 + 5000000);
+		usleep(100000); // Give server some time to run the timer.
+		try {
+			close(connectToUnixServer(socketFilename));
+			fail("(2)");
+		} catch (const SystemException &) {
+			// Success
+		}
+		
+		joinLoggingServer();
+	}
+	
+	TEST_METHOD(27) {
+		// The 'exit immediately' command causes the logging server to
+		// immediately exit. Open transactions are not automatically
+		// closed and written out, even those with crash protection
+		// turned on.
+		SystemTime::forceAll(YESTERDAY);
+		
+		LoggerPtr log = factory->newTransaction("foobar");
+		log->message("hello world");
+		log.reset();
+		
+		MessageClient client = createConnection();
+		client.write("exit", "immediately", NULL);
+		client.disconnect();
+		
+		// Assertion: the following doesn't block.
+		joinLoggingServer();
+	}
+	
+	TEST_METHOD(28) {
+		// LoggerFactory treats a server that's semi-gracefully exiting as
+		// one that's refusing connections.
+		SystemTime::forceAll(YESTERDAY);
+		
+		MessageClient client = createConnection();
+		client.write("exit", "semi-gracefully", NULL);
+		client.disconnect();
+		
+		factory->setMaxConnectTries(1);
+		LoggerPtr log = factory->newTransaction("foobar");
+		ensure(log->isNull());
+	}
+	
+	TEST_METHOD(29) {
+		// One can supply a custom node name per openTransaction command.
+		MessageClient client1 = createConnection();
+		vector<string> args;
+		
+		SystemTime::forceAll(TODAY);
+		
+		client1.write("openTransaction",
+			TODAY_TXN_ID, "foobar", "remote", "requests", TODAY_TIMESTAMP_STR,
+			"", "true", NULL);
+		client1.write("closeTransaction", TODAY_TXN_ID, TODAY_TIMESTAMP_STR, NULL);
+		client1.write("flush", NULL);
+		client1.read(args);
+		client1.disconnect();
+		
+		ensure(fileExists(dumpFile));
+	}
+	
+	TEST_METHOD(30) {
+		// A transaction is only written to the sink if it passes all given filters.
+		// Test logging of new transaction.
+		SystemTime::forceAll(YESTERDAY);
+		
+		LoggerPtr log = factory->newTransaction("foobar", "requests", "",
+			"uri == \"/foo\""
+			"\1"
+			"uri != \"/bar\"");
+		log->message("URI: /foo");
+		log->message("transaction 1");
+		log->flushToDiskAfterClose(true);
+		log.reset();
+		
+		log = factory->newTransaction("foobar", "requests", "",
+			"uri == \"/foo\""
+			"\1"
+			"uri == \"/bar\"");
+		log->message("URI: /foo");
+		log->message("transaction 2");
+		log->flushToDiskAfterClose(true);
+		log.reset();
+		
+		string data = readDumpFile();
+		ensure("(1)", data.find("transaction 1\n") != string::npos);
+		ensure("(2)", data.find("transaction 2\n") == string::npos);
+	}
+	
+	/************************************/
+}
diff --git a/test/cxx/UtilsTest.cpp b/test/cxx/UtilsTest.cpp
index c59c449..668d49d 100644
--- a/test/cxx/UtilsTest.cpp
+++ b/test/cxx/UtilsTest.cpp
@@ -1,7 +1,7 @@
-#include "TestSupport.h"
-#include "Utils.h"
-#include "Utils/StrIntUtils.h"
-#include "Utils/MemZeroGuard.h"
+#include <TestSupport.h>
+#include <Utils.h>
+#include <Utils/StrIntUtils.h>
+#include <Utils/MemZeroGuard.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <stdio.h>
@@ -15,10 +15,13 @@ using namespace std;
 namespace tut {
 	struct UtilsTest {
 		vector<string> output;
+		string cwd;
 		string oldPath;
 		TempDir tempDir;
 		
 		UtilsTest(): tempDir("tmp.dir") {
+			char buffer[PATH_MAX];
+			cwd = getcwd(buffer, sizeof(buffer));
 			oldPath = getenv("PATH");
 			unsetenv("PASSENGER_TEMP_DIR");
 		}
@@ -26,6 +29,7 @@ namespace tut {
 		~UtilsTest() {
 			setenv("PATH", oldPath.c_str(), 1);
 			unsetenv("PASSENGER_TEMP_DIR");
+			chdir(cwd.c_str());
 		}
 		
 		void testMakeDirTreeMode(const char *name, const char *mode, mode_t expected) {
@@ -45,14 +49,20 @@ namespace tut {
 
 	TEST_METHOD(1) {
 		split("", ':', output);
-		ensure_equals(output.size(), 1u);
-		ensure_equals(output[0], "");
+		ensure_equals(output.size(), 0u);
+
+		splitIncludeSep("", ':', output);
+		ensure_equals(output.size(), 0u);
 	}
 	
 	TEST_METHOD(2) {
 		split("hello world", ':', output);
 		ensure_equals(output.size(), 1u);
 		ensure_equals(output[0], "hello world");
+
+		splitIncludeSep("hello world", ':', output);
+		ensure_equals(output.size(), 1u);
+		ensure_equals(output[0], "hello world");
 	}
 	
 	TEST_METHOD(3) {
@@ -60,13 +70,22 @@ namespace tut {
 		ensure_equals(output.size(), 2u);
 		ensure_equals(output[0], "hello world");
 		ensure_equals(output[1], "foo bar");
+
+		splitIncludeSep("hello world:foo bar", ':', output);
+		ensure_equals(output.size(), 2u);
+		ensure_equals(output[0], "hello world:");
+		ensure_equals(output[1], "foo bar");
 	}
 	
 	TEST_METHOD(4) {
 		split("hello world:", ':', output);
-		ensure_equals(output.size(), 2u);
-		ensure_equals(output[0], "hello world");
-		ensure_equals(output[1], "");
+		ensure_equals("(1)", output.size(), 2u);
+		ensure_equals("(2)", output[0], "hello world");
+		ensure_equals("(3)", output[1], "");
+
+		splitIncludeSep("hello world:", ':', output);
+		ensure_equals("(4)", output.size(), 1u);
+		ensure_equals("(5)", output[0], "hello world:");
 	}
 	
 	TEST_METHOD(5) {
@@ -74,6 +93,11 @@ namespace tut {
 		ensure_equals(output.size(), 2u);
 		ensure_equals(output[0], "");
 		ensure_equals(output[1], "hello world");
+
+		splitIncludeSep(":hello world", ':', output);
+		ensure_equals(output.size(), 2u);
+		ensure_equals(output[0], ":");
+		ensure_equals(output[1], "hello world");
 	}
 	
 	TEST_METHOD(6) {
@@ -83,6 +107,13 @@ namespace tut {
 		ensure_equals(output[1], "def");
 		ensure_equals(output[2], "");
 		ensure_equals(output[3], "ghi");
+
+		splitIncludeSep("abc:def::ghi", ':', output);
+		ensure_equals(output.size(), 4u);
+		ensure_equals(output[0], "abc:");
+		ensure_equals(output[1], "def:");
+		ensure_equals(output[2], ":");
+		ensure_equals(output[3], "ghi");
 	}
 	
 	TEST_METHOD(7) {
@@ -92,6 +123,13 @@ namespace tut {
 		ensure_equals(output[1], "");
 		ensure_equals(output[2], "");
 		ensure_equals(output[3], "def");
+
+		splitIncludeSep("abc:::def", ':', output);
+		ensure_equals(output.size(), 4u);
+		ensure_equals(output[0], "abc:");
+		ensure_equals(output[1], ":");
+		ensure_equals(output[2], ":");
+		ensure_equals(output[3], "def");
 	}
 	
 	
@@ -163,17 +201,36 @@ namespace tut {
 		ensure_equals("Test 8", extractDirName(".."), ".");
 		ensure_equals("Test 9", extractDirName("./foo"), ".");
 		ensure_equals("Test 10", extractDirName("../foo"), "..");
+		ensure_equals("Test 11", extractDirName(""), ".");
+		ensure_equals("Test 12", extractDirName(".///"), ".");
+		ensure_equals("Test 13", extractDirName("foo//bar"), "foo");
+	}
+
+	TEST_METHOD(27) {
+		ensure_equals("Test 1", extractDirNameStatic("/usr/lib"), "/usr");
+		ensure_equals("Test 2", extractDirNameStatic("/usr/lib/"), "/usr");
+		ensure_equals("Test 3", extractDirNameStatic("/usr/"), "/");
+		ensure_equals("Test 4", extractDirNameStatic("usr"), ".");
+		ensure_equals("Test 5", extractDirNameStatic("/"), "/");
+		ensure_equals("Test 6", extractDirNameStatic("///"), "/");
+		ensure_equals("Test 7", extractDirNameStatic("."), ".");
+		ensure_equals("Test 8", extractDirNameStatic(".."), ".");
+		ensure_equals("Test 9", extractDirNameStatic("./foo"), ".");
+		ensure_equals("Test 10", extractDirNameStatic("../foo"), "..");
+		ensure_equals("Test 11", extractDirNameStatic(""), ".");
+		ensure_equals("Test 12", extractDirNameStatic(".///"), ".");
+		ensure_equals("Test 13", extractDirNameStatic("foo//bar"), "foo");
 	}
 	
 	/***** Test resolveSymlink() *****/
 	
-	TEST_METHOD(27) {
+	TEST_METHOD(28) {
 		TempDir d("tmp.symlinks");
-		system("touch tmp.symlinks/foo.txt");
-		system("ln -s /usr/bin tmp.symlinks/absolute_symlink");
-		system("ln -s foo.txt tmp.symlinks/file");
-		system("ln -s file tmp.symlinks/file2");
-		system("ln -s file2 tmp.symlinks/file3");
+		runShellCommand("touch tmp.symlinks/foo.txt");
+		runShellCommand("ln -s /usr/bin tmp.symlinks/absolute_symlink");
+		runShellCommand("ln -s foo.txt tmp.symlinks/file");
+		runShellCommand("ln -s file tmp.symlinks/file2");
+		runShellCommand("ln -s file2 tmp.symlinks/file3");
 		ensure_equals(resolveSymlink("tmp.symlinks/file"), "tmp.symlinks/foo.txt");
 		ensure_equals(resolveSymlink("tmp.symlinks/file2"), "tmp.symlinks/file");
 		ensure_equals(resolveSymlink("tmp.symlinks/file3"), "tmp.symlinks/file2");
@@ -276,6 +333,8 @@ namespace tut {
 			(mode_t) (S_IRUSR | S_IXUSR | S_IWGRP | S_IXOTH));
 		ensure_equals("(7)", parseModeString("u=rs,g=ws"),
 			(mode_t) (S_IRUSR | S_ISUID | S_IWGRP | S_ISGID));
+		ensure_equals("(7)", parseModeString("u=rwx,g=rwx,+t"),
+			(mode_t) (S_IRWXU | S_IRWXG | S_ISVTX));
 	}
 	
 	TEST_METHOD(38) {
@@ -531,4 +590,75 @@ namespace tut {
 			"Weird � characters?");
 		ensure_equals(escapeHTML("UTF-8: ☃ ☀; ☁ ☂\x01"), "UTF-8: ☃ ☀; ☁ ☂");
 	}
+
+	/***** Test absolutizePath() *****/
+
+	TEST_METHOD(53) {
+		ensure_equals(absolutizePath(""), cwd);
+		ensure_equals(absolutizePath("."), cwd);
+		ensure_equals(absolutizePath("foo"), cwd + "/foo");
+		ensure_equals(absolutizePath("foo/bar"), cwd + "/foo/bar");
+		ensure_equals(absolutizePath("foo//bar"), cwd + "/foo/bar");
+		ensure_equals(absolutizePath("foo/bar///baz"), cwd + "/foo/bar/baz");
+		ensure_equals(absolutizePath("foo/./bar"), cwd + "/foo/bar");
+		ensure_equals(absolutizePath("foo/bar/../baz"), cwd + "/foo/baz");
+		ensure_equals(absolutizePath("foo/bar/../.."), cwd);
+		ensure_equals(absolutizePath("foo/.././bar"), cwd + "/bar");
+		ensure_equals(absolutizePath("foo/../bar/./baz"), cwd + "/bar/baz");
+		ensure_equals(absolutizePath("foo/"), cwd + "/foo");
+		ensure_equals(absolutizePath("foo//"), cwd + "/foo");
+
+		ensure_equals(absolutizePath("/"), "/");
+		ensure_equals(absolutizePath("////"), "/");
+		ensure_equals(absolutizePath("/."), "/");
+		ensure_equals(absolutizePath("/foo"), "/foo");
+		ensure_equals(absolutizePath("/foo/bar"), "/foo/bar");
+		ensure_equals(absolutizePath("/foo//bar"), "/foo/bar");
+		ensure_equals(absolutizePath("/foo/bar///baz"), "/foo/bar/baz");
+		ensure_equals(absolutizePath("/foo/./bar"), "/foo/bar");
+		ensure_equals(absolutizePath("/foo/bar/../baz"), "/foo/baz");
+		ensure_equals(absolutizePath("/foo/bar/../.."), "/");
+		ensure_equals(absolutizePath("/foo/.././bar"), "/bar");
+		ensure_equals(absolutizePath("/foo/../bar/./baz"), "/bar/baz");
+		ensure_equals(absolutizePath("/foo/"), "/foo");
+		ensure_equals(absolutizePath("/foo//"), "/foo");
+		ensure_equals(absolutizePath("//foo/bar"), "/foo/bar");
+		ensure_equals(absolutizePath("///foo//bar"), "/foo/bar");
+		ensure_equals(absolutizePath("/../.."), "/");
+		ensure_equals(absolutizePath("/../.././foo"), "/foo");
+
+		chdir("/usr/lib");
+		ensure_equals(absolutizePath(".."), "/usr");
+		ensure_equals(absolutizePath("."), "/usr/lib");
+		ensure_equals(absolutizePath("../.."), "/");
+		ensure_equals(absolutizePath("../../foo"), "/foo");
+		ensure_equals(absolutizePath("../.././foo/bar"), "/foo/bar");
+
+		ensure_equals(absolutizePath("..", "/usr/local/bin"), "/usr/local");
+		ensure_equals(absolutizePath(".", "/usr/local/bin"), "/usr/local/bin");
+		ensure_equals(absolutizePath("../..", "/usr/local/bin"), "/usr");
+		ensure_equals(absolutizePath("../../foo", "/usr/local/bin"), "/usr/foo");
+		ensure_equals(absolutizePath("../.././foo/bar", "/usr/local/bin"), "/usr/foo/bar");
+	}
+
+	/***** Test constantTimeCompare() *****/
+
+	TEST_METHOD(54) {
+		ensure("(1)", constantTimeCompare("", ""));
+		ensure("(2)", constantTimeCompare("a", "a"));
+		ensure("(3)", constantTimeCompare("aa", "aa"));
+		ensure("(4)", constantTimeCompare("abc", "abc"));
+
+		ensure("(5)", !constantTimeCompare("", "a"));
+		ensure("(6)", !constantTimeCompare("", "abcd"));
+		ensure("(7)", !constantTimeCompare("ab", "cd"));
+		ensure("(8)", !constantTimeCompare("ab", "abc"));
+		ensure("(9)", !constantTimeCompare("ab", "abcd"));
+		
+		ensure("(10)", !constantTimeCompare("a", ""));
+		ensure("(11)", !constantTimeCompare("abcd", ""));
+		ensure("(12)", !constantTimeCompare("cd", "ab"));
+		ensure("(13)", !constantTimeCompare("abc", "ab"));
+		ensure("(14)", !constantTimeCompare("abcd", "ab"));
+	}
 }
diff --git a/test/cxx/VariantMapTest.cpp b/test/cxx/VariantMapTest.cpp
index 18f7756..8fc70a5 100644
--- a/test/cxx/VariantMapTest.cpp
+++ b/test/cxx/VariantMapTest.cpp
@@ -21,18 +21,15 @@ namespace tut {
 		// Test setting and getting string values.
 		map.set("hello", "world");
 		map.set("abcd", "efgh");
-		map.set("foo", "");
 		map.set("", "bar");
-		ensure_equals(map.get("hello"), "world");
-		ensure_equals(map.get("abcd"), "efgh");
-		ensure_equals(map.get("foo"), "");
-		ensure_equals(map.get(""), "bar");
-		ensure_equals(map.size(), 4u);
-		ensure(map.has("hello"));
-		ensure(map.has("abcd"));
-		ensure(map.has("foo"));
-		ensure(map.has(""));
-		ensure(!map.has("xyz"));
+		ensure_equals("(1)", map.get("hello"), "world");
+		ensure_equals("(2)", map.get("abcd"), "efgh");
+		ensure_equals("(3)", map.get(""), "bar");
+		ensure_equals("(4)", map.size(), 3u);
+		ensure("(5)", map.has("hello"));
+		ensure("(6)", map.has("abcd"));
+		ensure("(7)", map.has(""));
+		ensure("(8)", !map.has("xyz"));
 	}
 	
 	TEST_METHOD(3) {
@@ -176,4 +173,19 @@ namespace tut {
 		ensure_equals(map.get("foo"), "1234");
 		ensure_equals(map.get("bar"), "5678");
 	}
+
+	TEST_METHOD(7) {
+		// Setting an empty value result in the deletion of the key.
+		map.set("a", "a");
+		map.set("b", "b");
+		map.set("b", "");
+		try {
+			map.get("b");
+			fail("MissingKeyException expected");
+		} catch (const VariantMap::MissingKeyException &e) {
+			// Pass.
+		}
+		ensure(!map.has("foo"));
+		ensure_equals(map.size(), 1u);
+	}
 }
diff --git a/test/gdbinit.example b/test/gdbinit.example
new file mode 100644
index 0000000..8917931
--- /dev/null
+++ b/test/gdbinit.example
@@ -0,0 +1,31 @@
+# This is a sample .gdbinit file that can aid you in debugging
+# Phusion Passenger with GDB. Modify it to your liking and copy
+# it to test/.gdbinit. See also CONTRIBUTING.md.
+
+# Ignore some signals.
+handle SIGUSR1 noprint pass
+handle SIGPIPE noprint pass
+
+# Convenience command.
+define rake
+	shell rake $arg0
+end
+
+# Break on breakpoint() function.
+break Passenger::breakpoint
+
+# Linux-only. Comment out when not on Linux.
+set print thread-events off
+
+# On OS X, you may sometimes want to enable memory debugger libraries.
+#set env DYLD_INSERT_LIBRARIES /usr/lib/libgmalloc.dylib
+#set env MALLOC_FILL_SPACE YES
+#set env MALLOC_PROTECT_BEFORE YES
+#set env MallocStackLogging YES
+#set env MallocGuardEdges YES
+#set env MallocScribble YES
+#set env MallocPreScribble YES
+#set env MallocCheckHeapStart 10
+#set env MallocCheckHeapEach 1
+#set env MallocCheckHeapAbort YES
+#set env MallocBadFreeAbort YES
diff --git a/test/integration_tests/apache2_tests.rb b/test/integration_tests/apache2_tests.rb
index 9dc384f..9da5ec0 100644
--- a/test/integration_tests/apache2_tests.rb
+++ b/test/integration_tests/apache2_tests.rb
@@ -11,27 +11,19 @@ require 'integration_tests/cgi_environment_spec'
 require 'integration_tests/hello_world_rack_spec'
 require 'integration_tests/hello_world_wsgi_spec'
 
-# TODO: test the 'RailsUserSwitching' and 'RailsDefaultUser' option.
+# TODO: test the 'PassengerUserSwitching' and 'PassengerDefaultUser' option.
 # TODO: test custom page caching directory
 
 describe "Apache 2 module" do
 	before :all do
 		check_hosts_configuration
-		@apache2 = Apache2Controller.new
 		@passenger_temp_dir = "/tmp/passenger-test.#{$$}"
 		Dir.mkdir(@passenger_temp_dir)
 		ENV['PASSENGER_TEMP_DIR'] = @passenger_temp_dir
-		@apache2.set(:passenger_temp_dir => @passenger_temp_dir)
-		if Process.uid == 0
-			@apache2.set(
-				:www_user => CONFIG['normal_user_1'],
-				:www_group => Etc.getgrgid(Etc.getpwnam(CONFIG['normal_user_1']).gid).name
-			)
-		end
 	end
 	
 	after :all do
-		@apache2.stop
+		@apache2.stop if @apache2
 		FileUtils.chmod_R(0777, @passenger_temp_dir)
 		FileUtils.rm_rf(@passenger_temp_dir)
 	end
@@ -40,23 +32,36 @@ describe "Apache 2 module" do
 		File.open("test.log", "a") do |f|
 			# Make sure that all Apache log output is prepended by the test description
 			# so that we know which messages are associated with which tests.
-			f.puts "\n#### #{self.class.description} : #{description}"
+			f.puts "\n#### #{Time.now}: #{example.full_description}"
+		end
+	end
+
+	def create_apache2_controller
+		@apache2 = Apache2Controller.new
+		@apache2.set(:passenger_temp_dir => @passenger_temp_dir)
+		if Process.uid == 0
+			@apache2.set(
+				:www_user => CONFIG['normal_user_1'],
+				:www_group => Etc.getgrgid(Etc.getpwnam(CONFIG['normal_user_1']).gid).name
+			)
 		end
 	end
 	
 	describe ": MyCook(tm) beta running on root URI" do
 		before :all do
+			create_apache2_controller
 			@web_server_supports_chunked_transfer_encoding = true
 			@base_uri = ""
 			@server = "http://passenger.test:#{@apache2.port}"
 			@apache2 << "RailsMaxPoolSize 1"
-			@stub = RailsStub.new('2.3/mycook')
+			@stub = ClassicRailsStub.new('rails_apps/2.3/mycook')
 			@apache2.set_vhost("passenger.test", "#{@stub.full_app_root}/public")
 			@apache2.start
 		end
 		
 		after :all do
 			@stub.destroy
+			@apache2.stop if @apache2
 		end
 		
 		before :each do
@@ -64,7 +69,7 @@ describe "Apache 2 module" do
 		end
 		
 		it_should_behave_like "MyCook(tm) beta"
-		include_shared_example_group "CGI environment variables compliance"
+		include_examples "CGI environment variables compliance"
 		
 		it "doesn't block Rails while an upload is in progress" do
 			get('/') # Force spawning so that the timeout below is enough.
@@ -123,9 +128,10 @@ describe "Apache 2 module" do
 	
 	describe ": MyCook(tm) beta running in a sub-URI" do
 		before :all do
+			create_apache2_controller
 			@web_server_supports_chunked_transfer_encoding = true
 			@base_uri = "/mycook"
-			@stub = RailsStub.new('2.3/mycook')
+			@stub = ClassicRailsStub.new('rails_apps/2.3/mycook')
 			FileUtils.rm_rf('tmp.webdir')
 			FileUtils.mkdir_p('tmp.webdir')
 			FileUtils.cp_r('stub/zsfa/.', 'tmp.webdir')
@@ -140,6 +146,7 @@ describe "Apache 2 module" do
 		after :all do
 			FileUtils.rm_rf('tmp.webdir')
 			@stub.destroy
+			@apache2.stop if @apache2
 		end
 		
 		before :each do
@@ -148,7 +155,7 @@ describe "Apache 2 module" do
 		end
 		
 		it_should_behave_like "MyCook(tm) beta"
-		include_shared_example_group "CGI environment variables compliance"
+		include_examples "CGI environment variables compliance"
 		
 		it "does not interfere with the root website" do
 			@server = "http://passenger.test:#{@apache2.port}"
@@ -158,9 +165,10 @@ describe "Apache 2 module" do
 	
 	describe "compatibility with other modules" do
 		before :all do
+			create_apache2_controller
 			@apache2 << "RailsMaxPoolSize 1"
 			
-			@mycook = RailsStub.new('2.3/mycook')
+			@mycook = ClassicRailsStub.new('rails_apps/2.3/mycook')
 			@mycook_url_root = "http://1.passenger.test:#{@apache2.port}"
 			@apache2.set_vhost("1.passenger.test", "#{@mycook.full_app_root}/public") do |vhost|
 				vhost << "RewriteEngine on"
@@ -172,6 +180,7 @@ describe "Apache 2 module" do
 		
 		after :all do
 			@mycook.destroy
+			@apache2.stop if @apache2
 		end
 		
 		before :each do
@@ -208,18 +217,16 @@ describe "Apache 2 module" do
 	
 	describe "configuration options" do
 		before :all do
+			create_apache2_controller
 			@apache2 << "PassengerMaxPoolSize 3"
 			
-			@mycook = RailsStub.new('2.3/mycook')
+			@mycook = ClassicRailsStub.new('rails_apps/2.3/mycook')
 			@mycook_url_root = "http://1.passenger.test:#{@apache2.port}"
 			@apache2.set_vhost('1.passenger.test', "#{@mycook.full_app_root}/public") do |vhost|
 				vhost << "AllowEncodedSlashes on"
 			end
-			@apache2.set_vhost('2.passenger.test', "#{@mycook.full_app_root}/public") do |vhost|
-				vhost << "RailsAutoDetect off"
-			end
 			
-			@foobar = RailsStub.new('2.3/foobar')
+			@foobar = ClassicRailsStub.new('rails2.3')
 			@foobar_url_root = "http://3.passenger.test:#{@apache2.port}"
 			@apache2.set_vhost('3.passenger.test', "#{@foobar.full_app_root}/public") do |vhost|
 				vhost << "RailsEnv development"
@@ -227,26 +234,12 @@ describe "Apache 2 module" do
 				vhost << "PassengerRestartDir #{@foobar.full_app_root}/public"
 			end
 			
-			@mycook2 = RailsStub.new('2.3/mycook')
+			@mycook2 = ClassicRailsStub.new('rails_apps/2.3/mycook')
 			@mycook2_url_root = "http://4.passenger.test:#{@apache2.port}"
 			@apache2.set_vhost('4.passenger.test', "#{@mycook2.full_app_root}/sites/some.site/public") do |vhost|
 				vhost << "PassengerAppRoot #{@mycook2.full_app_root}"
 			end
 			
-			# These are used by global queueing tests.
-			@mycook3 = RailsStub.new('2.3/mycook')
-			@mycook3_url_root = "http://5.passenger.test:#{@apache2.port}"
-			@apache2.set_vhost('5.passenger.test', "#{@mycook3.full_app_root}/sites/some.site/public") do |vhost|
-				vhost << "PassengerAppRoot #{@mycook3.full_app_root}"
-				vhost << "PassengerMinInstances 3"
-			end
-			@mycook4 = RailsStub.new('2.3/mycook')
-			@mycook4_url_root = "http://6.passenger.test:#{@apache2.port}"
-			@apache2.set_vhost('6.passenger.test', "#{@mycook4.full_app_root}/public") do |vhost|
-				vhost << "PassengerUseGlobalQueue on"
-				vhost << "PassengerMinInstances 3"
-			end
-			
 			@apache2.start
 		end
 		
@@ -254,26 +247,13 @@ describe "Apache 2 module" do
 			@mycook.destroy
 			@foobar.destroy
 			@mycook2.destroy
-			@mycook3.destroy
-			@mycook4.destroy
+			@apache2.stop if @apache2
 		end
 		
 		before :each do
 			@mycook.reset
 			@foobar.reset
 			@mycook2.reset
-			@mycook3.reset
-			@mycook4.reset
-		end
-		
-		it "ignores the Rails application if RailsAutoDetect is off" do
-			@server = "http://2.passenger.test:#{@apache2.port}"
-			get('/').should_not =~ /MyCook/
-		end
-		
-		specify "setting RailsAutoDetect for one virtual host should not interfere with others" do
-			@server = @mycook_url_root
-			get('/').should =~ /MyCook/
 		end
 		
 		specify "RailsEnv is per-virtual host" do
@@ -284,18 +264,6 @@ describe "Apache 2 module" do
 			get('/foo/rails_env').should == "development"
 		end
 		
-		it "supports conservative spawning" do
-			@server = @foobar_url_root
-			# TODO: I think this assertion is no longer valid now that
-			# smart-lv2 is the default spawn method...
-			get('/foo/backtrace').should_not =~ /framework_spawner/
-		end
-		
-		specify "PassengerSpawnMethod spawning is per-virtual host" do
-			@server = @mycook_url_root
-			get('/welcome/backtrace').should =~ /application_spawner/
-		end
-		
 		it "looks for restart.txt in the directory specified by PassengerRestartDir" do
 			@server = @foobar_url_root
 			controller = "#{@foobar.app_root}/app/controllers/bar_controller.rb"
@@ -325,88 +293,6 @@ describe "Apache 2 module" do
 			get('/bar').should == "oh hai"
 		end
 		
-		describe "PassengerUseGlobalQueue" do
-			before :each do
-				
-			end
-			
-			after :each do
-				# Restart Apache in order to reset the application pool's state.
-				@apache2.stop
-			end
-			
-			it "works and is per-virtual host" do
-				@server = @mycook4_url_root
-				
-				# Spawn 3 application processes.
-				get('/')
-				eventually do
-					inspect_server(:processes).size == 3
-				end
-				
-				# Reserve all application pool slots.
-				threads = []
-				3.times do |i|
-					thread = Thread.new do
-						File.unlink("#{@mycook4.app_root}/#{i}.txt") rescue nil
-						get("/welcome/sleep_until_exists?name=#{i}.txt")
-					end
-					threads << thread
-				end
-				
-				# Wait until all application instances are waiting
-				# for the quit file.
-				eventually(5) do
-					File.exist?("#{@mycook4.app_root}/waiting_0.txt") &&
-					File.exist?("#{@mycook4.app_root}/waiting_1.txt") &&
-					File.exist?("#{@mycook4.app_root}/waiting_2.txt")
-				end
-				processes = inspect_server(:processes)
-				processes.should have(3).items
-				processes.each do |process|
-					process.sessions.should == 1
-				end
-				inspect_server(:global_queue_size).should == 0
-				
-				# While all slots are reserved, make two more requests.
-				first_request_done = false
-				second_request_done = false
-				thread = Thread.new do
-					get("/")
-					first_request_done = true
-				end
-				threads << thread
-				thread = Thread.new do
-					get("/")
-					second_request_done = true
-				end
-				threads << thread
-				
-				# These requests should both be waiting on the global queue.
-				sleep 1
-				processes = inspect_server(:processes)
-				processes.should have(3).items
-				processes.each do |process|
-					process.sessions.should == 1
-				end
-				inspect_server(:global_queue_size).should == 2
-				
-				# Both requests should be processed if one application instance frees up.
-				File.touch("#{@mycook4.app_root}/2.txt")
-				eventually(5) do
-					first_request_done && second_request_done
-				end
-				inspect_server(:global_queue_size).should == 0
-				
-				File.touch("#{@mycook4.app_root}/0.txt")
-				File.touch("#{@mycook4.app_root}/1.txt")
-				File.touch("#{@mycook4.app_root}/2.txt")
-				threads.each do |thread|
-					thread.join
-				end
-			end
-		end
-		
 		describe "PassengerAppRoot" do
 			before :each do
 				@server = @mycook2_url_root
@@ -454,16 +340,16 @@ describe "Apache 2 module" do
 	
 	describe "error handling" do
 		before :all do
+			create_apache2_controller
 			FileUtils.rm_rf('tmp.webdir')
 			FileUtils.mkdir_p('tmp.webdir')
 			@webdir = File.expand_path('tmp.webdir')
 			@apache2.set_vhost('1.passenger.test', @webdir) do |vhost|
 				vhost << "RailsBaseURI /app-with-nonexistant-rails-version/public"
 				vhost << "RailsBaseURI /app-that-crashes-during-startup/public"
-				vhost << "RailsBaseURI /app-with-crashing-vendor-rails/public"
 			end
 			
-			@mycook = RailsStub.new('2.3/mycook')
+			@mycook = ClassicRailsStub.new('rails_apps/2.3/mycook')
 			@mycook_url_root = "http://2.passenger.test:#{@apache2.port}"
 			@apache2.set_vhost('2.passenger.test', "#{@mycook.full_app_root}/public")
 			
@@ -473,6 +359,7 @@ describe "Apache 2 module" do
 		after :all do
 			FileUtils.rm_rf('tmp.webdir')
 			@mycook.destroy
+			@apache2.stop if @apache2
 		end
 		
 		before :each do
@@ -482,7 +369,7 @@ describe "Apache 2 module" do
 		end
 		
 		it "displays an error page if the Rails application requires a nonexistant Rails version" do
-			RailsStub.use('2.3/foobar', "#{@webdir}/app-with-nonexistant-rails-version") do |stub|
+			ClassicRailsStub.use('rails2.3', "#{@webdir}/app-with-nonexistant-rails-version") do |stub|
 				File.write(stub.environment_rb) do |content|
 					content.sub(/^RAILS_GEM_VERSION = .*$/, "RAILS_GEM_VERSION = '1.9.1234'")
 				end
@@ -491,7 +378,7 @@ describe "Apache 2 module" do
 		end
 		
 		it "displays an error page if the Rails application crashes during startup" do
-			RailsStub.use('2.3/foobar', "#{@webdir}/app-that-crashes-during-startup") do |stub|
+			ClassicRailsStub.use('rails2.3', "#{@webdir}/app-that-crashes-during-startup") do |stub|
 				File.prepend(stub.environment_rb, "raise 'app crash'")
 				result = get("/app-that-crashes-during-startup/public")
 				result.should =~ @error_page_signature
@@ -499,17 +386,6 @@ describe "Apache 2 module" do
 			end
 		end
 		
-		it "displays an error page if the Rails application's vendor'ed Rails crashes" do
-			RailsStub.use('2.3/foobar', "#{@webdir}/app-with-crashing-vendor-rails") do |stub|
-				stub.use_vendor_rails('minimal')
-				File.append("#{stub.app_root}/vendor/rails/railties/lib/initializer.rb",
-					"raise 'vendor crash'")
-				result = get("/app-with-crashing-vendor-rails/public")
-				result.should =~ @error_page_signature
-				result.should =~ /vendor crash/
-			end
-		end
-		
 		it "displays an error if a filesystem permission error was encountered while autodetecting the application type" do
 			@server = @mycook_url_root
 			# This test used to fail because we were improperly blocking mod_autoindex,
@@ -522,7 +398,7 @@ describe "Apache 2 module" do
 		end
 		
 		it "doesn't display a Ruby spawn error page if PassengerFriendlyErrorPages is off" do
-			RailsStub.use('2.3/foobar', "#{@webdir}/app-that-crashes-during-startup") do |stub|
+			ClassicRailsStub.use('rails2.3', "#{@webdir}/app-that-crashes-during-startup") do |stub|
 				File.write("#{stub.app_root}/public/.htaccess", "PassengerFriendlyErrorPages off")
 				File.prepend(stub.environment_rb, "raise 'app crash'")
 				result = get("/app-that-crashes-during-startup/public")
@@ -536,7 +412,8 @@ describe "Apache 2 module" do
 		AdminTools = PhusionPassenger::AdminTools
 		
 		before :all do
-			@mycook = RailsStub.new('2.3/mycook')
+			create_apache2_controller
+			@mycook = ClassicRailsStub.new('rails_apps/2.3/mycook')
 			@mycook_url_root = "http://1.passenger.test:#{@apache2.port}"
 			@apache2.set_vhost('1.passenger.test', "#{@mycook.full_app_root}/public")
 			@apache2.start
@@ -545,6 +422,7 @@ describe "Apache 2 module" do
 		
 		after :all do
 			@mycook.destroy
+			@apache2.stop if @apache2
 		end
 		
 		before :each do
@@ -561,8 +439,8 @@ describe "Apache 2 module" do
 			
 			# Now kill the helper server.
 			instance = AdminTools::ServerInstance.list.first
-			Process.kill('SIGKILL', instance.helper_server_pid)
-			sleep 0.01 # Give the signal a small amount of time to take effect.
+			Process.kill('SIGKILL', instance.helper_agent_pid)
+			sleep 0.02 # Give the signal a small amount of time to take effect.
 			
 			# Each worker process should detect that the old
 			# helper server has died, and should reconnect.
@@ -580,17 +458,18 @@ describe "Apache 2 module" do
 			# Wait until the server has processed the session close event.
 			sleep 0.1
 			
-			processes = instance.connect(:passenger_status) do
-				instance.processes
+			processes = instance.connect(:role => :passenger_status) do |client|
+				instance.processes(client)
 			end
 			processes.should have(1).item
-			processes[0].group.name.should == @mycook.full_app_root
+			processes[0].group.name.should == @mycook.full_app_root + "#default"
 			processes[0].processed.should == 1
 		end
 	end
 	
 	describe "Rack application running in root URI" do
 		before :all do
+			create_apache2_controller
 			@stub = RackStub.new('rack')
 			@apache2.set_vhost('passenger.test', @stub.full_app_root + "/public")
 			@apache2.start
@@ -599,6 +478,7 @@ describe "Apache 2 module" do
 		
 		after :all do
 			@stub.destroy
+			@apache2.stop if @apache2
 		end
 		
 		it_should_behave_like "HelloWorld Rack application"
@@ -606,6 +486,7 @@ describe "Apache 2 module" do
 	
 	describe "Rack application running in sub-URI" do
 		before :all do
+			create_apache2_controller
 			FileUtils.rm_rf('tmp.webdir')
 			FileUtils.mkdir_p('tmp.webdir')
 			@stub = RackStub.new('rack')
@@ -620,6 +501,7 @@ describe "Apache 2 module" do
 		after :all do
 			@stub.destroy
 			FileUtils.rm_rf('tmp.webdir')
+			@apache2.stop if @apache2
 		end
 		
 		it_should_behave_like "HelloWorld Rack application"
@@ -627,7 +509,8 @@ describe "Apache 2 module" do
 	
 	describe "Rack application running within Rails directory structure" do
 		before :all do
-			@stub = RailsStub.new('2.3/mycook')
+			create_apache2_controller
+			@stub = ClassicRailsStub.new('rails_apps/2.3/mycook')
 			FileUtils.cp_r("stub/rack/.", @stub.app_root)
 			@apache2.set_vhost('passenger.test', @stub.full_app_root + "/public")
 			@apache2.start
@@ -636,6 +519,7 @@ describe "Apache 2 module" do
 
 		after :all do
 			@stub.destroy
+			@apache2.stop if @apache2
 		end
 
 		it_should_behave_like "HelloWorld Rack application"
@@ -643,6 +527,7 @@ describe "Apache 2 module" do
 
 	describe "WSGI application running in root URI" do
 		before :all do
+			create_apache2_controller
 			@stub = Stub.new('wsgi')
 			@apache2.set_vhost('passenger.test', @stub.full_app_root + "/public")
 			@apache2.start
@@ -651,6 +536,7 @@ describe "Apache 2 module" do
 		
 		after :all do
 			@stub.destroy
+			@apache2.stop if @apache2
 		end
 		
 		it_should_behave_like "HelloWorld WSGI application"
diff --git a/test/integration_tests/hello_world_wsgi_spec.rb b/test/integration_tests/hello_world_wsgi_spec.rb
index da9491d..b7ddc8a 100644
--- a/test/integration_tests/hello_world_wsgi_spec.rb
+++ b/test/integration_tests/hello_world_wsgi_spec.rb
@@ -8,11 +8,11 @@ shared_examples_for "HelloWorld WSGI application" do
 	end
 	
 	it "is possible to GET a regular WSGI page" do
-		get('/').should =~ /Hello World/
+		get('/').should include("hello <b>world</b>")
 	end
 	
 	it "supports restarting via restart.txt" do
-		get('/').should =~ /Hello World/
+		get('/').should include("hello <b>world</b>")
 		
 		code = %q{
 			def application(env, start_response):
diff --git a/test/integration_tests/mycook_spec.rb b/test/integration_tests/mycook_spec.rb
index 2d619f9..bdcae3e 100644
--- a/test/integration_tests/mycook_spec.rb
+++ b/test/integration_tests/mycook_spec.rb
@@ -148,7 +148,7 @@ shared_examples_for "MyCook(tm) beta" do
 	
 	it "sets the 'Status' header" do
 		response = get_response('/nonexistant')
-		response["Status"].should == "404"
+		response["Status"].should == "404 Not Found"
 	end
 	
 	if Process.uid == 0
diff --git a/test/integration_tests/native_packaging_spec.rb b/test/integration_tests/native_packaging_spec.rb
new file mode 100644
index 0000000..91eff4c
--- /dev/null
+++ b/test/integration_tests/native_packaging_spec.rb
@@ -0,0 +1,170 @@
+# encoding: utf-8
+#  Phusion Passenger - https://www.phusionpassenger.com/
+#  Copyright (c) 2013 Phusion
+#
+#  "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+#
+#  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
+#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#  THE SOFTWARE.
+
+# Ensure that the natively installed tools are in PATH.
+ENV['PATH'] = "/usr/bin:#{ENV['PATH']}"
+LOCATIONS_INI = ENV['LOCATIONS_INI']
+abort "Please set the LOCATIONS_INI environment variable to the right locations.ini" if !LOCATIONS_INI
+
+BINDIR = "/usr/bin"
+SBINDIR = "/usr/sbin"
+INCLUDEDIR = "/usr/share/passenger/include"
+NGINX_ADDON_DIR = "/usr/share/passenger/ngx_http_passenger_module"
+DOCDIR = "/usr/share/doc/ruby-passenger"
+RESOURCESDIR = "/usr/share/passenger"
+RUBY_EXTENSION_SOURCE_DIR = "/usr/share/passenger/ruby_extension_source"
+AGENTS_DIR = "/usr/lib/passenger/agents"
+APACHE2_MODULE_PATH = "/usr/lib/apache2/modules/mod_passenger.so"
+
+describe "A natively packaged Phusion Passenger" do
+	def capture_output(command)
+		output = `#{command}`.strip
+		if $?.exitstatus == 0
+			return output
+		else
+			abort "Command #{command.join(' ')} exited with status #{$?.exitstatus}"
+		end
+	end
+
+	def which(command)
+		return capture_output("which #{command}")
+	end
+
+	specify "locations.ini only refers to existent filesystem locations" do
+		File.read(LOCATIONS_INI).split("\n").each do |line|
+			if line =~ /=/
+				name, filename = line.split('=', 2)
+				if filename =~ /^\// && !File.exist?(filename)
+					raise "#{filename} does not exist"
+				end
+			end
+		end
+	end
+
+	specify "passenger-install-nginx-module is in #{BINDIR}" do
+		which("passenger-install-nginx-module").should == "#{BINDIR}/passenger-install-nginx-module"
+	end
+
+	specify "passenger-status is in #{SBINDIR}" do
+		which("passenger-status").should == "#{SBINDIR}/passenger-status"
+	end
+
+	specify "the Nginx runtime library headers exist" do
+		File.directory?(INCLUDEDIR).should be_true
+		Dir["#{INCLUDEDIR}/common/*.h"].should_not be_empty
+	end
+
+	specify "the Nginx addon directory exists" do
+		File.directory?(NGINX_ADDON_DIR).should be_true
+		File.file?("#{NGINX_ADDON_DIR}/ngx_http_passenger_module.c")
+	end
+
+	specify "the documentation directory exists" do
+		File.directory?(DOCDIR).should be_true
+		File.file?("#{DOCDIR}/Users guide Apache.html").should be_true
+	end
+
+	specify "the resources directory exists" do
+		File.directory?(RESOURCESDIR).should be_true
+		File.file?("#{RESOURCESDIR}/helper-scripts/rack-loader.rb").should be_true
+	end
+
+	specify "the Ruby extension source directory exists" do
+		File.directory?(RUBY_EXTENSION_SOURCE_DIR).should be_true
+		File.file?("#{RUBY_EXTENSION_SOURCE_DIR}/extconf.rb").should be_true
+	end
+
+	specify "the agents directory exists" do
+		File.directory?(AGENTS_DIR).should be_true
+		File.file?("#{AGENTS_DIR}/PassengerWatchdog").should be_true
+		File.executable?("#{AGENTS_DIR}/PassengerWatchdog").should be_true
+	end
+
+	specify "the Apache 2 module exists" do
+		File.file?(APACHE2_MODULE_PATH).should be_true
+	end
+
+	describe "passenger-config" do
+		it "passenger-config is in #{BINDIR}" do
+			which("passenger-config").should == "#{BINDIR}/passenger-config"
+		end
+
+		it "shows the path to locations.ini" do
+			capture_output("passenger-config --root").should == LOCATIONS_INI
+		end
+
+		it "recognizes the runtime libraries as compiled" do
+			system("passenger-config --compiled").should be_true
+		end
+
+		it "recognizes the install as natively packaged" do
+			system("passenger-config --natively-packaged").should be_true
+		end
+
+		it "shows the directory to the runtime library headers" do
+			capture_output("passenger-config --includedir").should == INCLUDEDIR
+		end
+
+		it "shows the directory to the Nginx addon" do
+			capture_output("passenger-config --nginx-addon-dir").should == NGINX_ADDON_DIR
+		end
+
+		it "shows the Nginx runtime libraries" do
+			libs = capture_output("passenger-config --nginx-libs").split(" ")
+			libs.should_not be_empty
+			libs.each do |lib|
+				File.file?(lib).should be_true
+			end
+		end
+	end
+
+	describe "passenger-memory-stats" do
+		it "is in #{SBINDIR}" do
+			which("passenger-memory-stats").should == "#{SBINDIR}/passenger-memory-stats"
+		end
+
+		it "works" do
+			capture_output("passenger-memory-stats").should =~ /Passenger processes/
+		end
+	end
+
+	describe "passenger-install-apache2-module" do
+		it "is in #{BINDIR}" do
+			which("passenger-install-apache2-module").should == "#{BINDIR}/passenger-install-apache2-module"
+		end
+
+		it "prints the configuration snippet and exits" do
+			output = capture_output("passenger-install-apache2-module --auto")
+			output.should =~ /Please edit your Apache configuration file/
+			output.should_not include("Compiling and installing Apache 2 module")
+			output.should_not include("rake apache2")
+		end
+
+		it "produces a correct configuration snippet" do
+			output = capture_output("passenger-install-apache2-module --auto")
+			output.should include("LoadModule passenger_module #{APACHE2_MODULE_PATH}")
+			output.should include("PassengerRoot #{LOCATIONS_INI}")
+		end
+	end
+end
diff --git a/test/integration_tests/nginx_tests.rb b/test/integration_tests/nginx_tests.rb
index 9484add..f5e06aa 100644
--- a/test/integration_tests/nginx_tests.rb
+++ b/test/integration_tests/nginx_tests.rb
@@ -8,25 +8,17 @@ require 'integration_tests/hello_world_wsgi_spec'
 describe "Phusion Passenger for Nginx" do
 	before :all do
 		if !CONFIG['nginx']
-			STDERR.puts "*** ERROR: You must set the 'nginx' config option in test/config.yml."
+			STDERR.puts "*** ERROR: You must set the 'nginx' config option in test/config.json."
 			exit!(1)
 		end
 		
 		check_hosts_configuration
-		@nginx = NginxController.new("tmp.nginx")
-		if Process.uid == 0
-			@nginx.set(
-				:www_user => CONFIG['normal_user_1'],
-				:www_group => Etc.getgrgid(Etc.getpwnam(CONFIG['normal_user_1']).gid).name
-			)
-		end
-		
 		FileUtils.mkdir_p("tmp.nginx")
 	end
 	
 	after :all do
 		begin
-			@nginx.stop
+			@nginx.stop if @nginx
 		ensure
 			FileUtils.rm_rf("tmp.nginx")
 		end
@@ -36,15 +28,26 @@ describe "Phusion Passenger for Nginx" do
 		File.open("test.log", "a") do |f|
 			# Make sure that all Nginx log output is prepended by the test description
 			# so that we know which messages are associated with which tests.
-			f.puts "\n#### #{self.class.description} : #{description}"
+			f.puts "\n#### #{Time.now}: #{example.full_description}"
 		end
 	end
-	
+
+	def create_nginx_controller(options = {})
+		@nginx = NginxController.new("tmp.nginx")
+		if Process.uid == 0
+			@nginx.set({
+				:www_user => CONFIG['normal_user_1'],
+				:www_group => Etc.getgrgid(Etc.getpwnam(CONFIG['normal_user_1']).gid).name
+			}.merge(options))
+		end
+	end
+
 	describe "MyCook(tm) beta running a root URI" do
 		before :all do
+			create_nginx_controller
 			@server = "http://1.passenger.test:#{@nginx.port}"
 			@base_uri = ""
-			@stub = RailsStub.new('2.3/mycook')
+			@stub = ClassicRailsStub.new('rails_apps/2.3/mycook')
 			@nginx.add_server do |server|
 				server[:server_name] = "1.passenger.test"
 				server[:root]        = "#{@stub.full_app_root}/public"
@@ -54,6 +57,7 @@ describe "Phusion Passenger for Nginx" do
 		
 		after :all do
 			@stub.destroy
+			@nginx.stop if @nginx
 		end
 		
 		before :each do
@@ -61,18 +65,19 @@ describe "Phusion Passenger for Nginx" do
 		end
 		
 		it_should_behave_like "MyCook(tm) beta"
-		include_shared_example_group "CGI environment variables compliance"
+		include_examples "CGI environment variables compliance"
 	end
 	
 	describe "MyCook(tm) beta running in a sub-URI" do
 		before :all do
 			@base_uri = "/mycook"
-			@stub = RailsStub.new('2.3/mycook')
+			@stub = ClassicRailsStub.new('rails_apps/2.3/mycook')
 			FileUtils.rm_rf('tmp.webdir')
 			FileUtils.mkdir_p('tmp.webdir')
 			FileUtils.cp_r('stub/zsfa/.', 'tmp.webdir')
 			FileUtils.ln_sf(@stub.full_app_root + "/public", 'tmp.webdir/mycook')
 			
+			create_nginx_controller
 			@nginx.add_server do |server|
 				server[:server_name] = "1.passenger.test"
 				server[:root]        = File.expand_path("tmp.webdir")
@@ -84,15 +89,16 @@ describe "Phusion Passenger for Nginx" do
 		after :all do
 			FileUtils.rm_rf('tmp.webdir')
 			@stub.destroy
+			@nginx.stop if @nginx
 		end
 		
 		before :each do
 			@server = "http://1.passenger.test:#{@nginx.port}/mycook"
 			@stub.reset
 		end
-		
+
 		it_should_behave_like "MyCook(tm) beta"
-		include_shared_example_group "CGI environment variables compliance"
+		include_examples "CGI environment variables compliance"
 		
 		it "does not interfere with the root website" do
 			@server = "http://1.passenger.test:#{@nginx.port}"
@@ -102,6 +108,7 @@ describe "Phusion Passenger for Nginx" do
 	
 	describe "Rack application running in root URI" do
 		before :all do
+			create_nginx_controller
 			@server = "http://passenger.test:#{@nginx.port}"
 			@stub = RackStub.new('rack')
 			@nginx.add_server do |server|
@@ -114,6 +121,7 @@ describe "Phusion Passenger for Nginx" do
 		
 		after :all do
 			@stub.destroy
+			@nginx.stop if @nginx
 		end
 		
 		before :each do
@@ -128,6 +136,7 @@ describe "Phusion Passenger for Nginx" do
 			FileUtils.rm_rf('tmp.webdir')
 			FileUtils.mkdir_p('tmp.webdir')
 			@stub = RackStub.new('rack')
+			create_nginx_controller
 			@nginx.add_server do |server|
 				FileUtils.ln_s(@stub.full_app_root + "/public", 'tmp.webdir/rack')
 				server[:server_name] = "passenger.test"
@@ -141,6 +150,7 @@ describe "Phusion Passenger for Nginx" do
 		after :all do
 			@stub.destroy
 			FileUtils.rm_rf('tmp.webdir')
+			@nginx.stop if @nginx
 		end
 		
 		before :each do
@@ -152,8 +162,9 @@ describe "Phusion Passenger for Nginx" do
 	
 	describe "Rack application running within Rails directory structure" do
 		before :all do
+			create_nginx_controller
 			@server = "http://passenger.test:#{@nginx.port}"
-			@stub = RailsStub.new('2.3/mycook')
+			@stub = ClassicRailsStub.new('rails_apps/2.3/mycook')
 			FileUtils.cp_r("stub/rack/.", @stub.app_root)
 			@nginx.add_server do |server|
 			server[:server_name] = "passenger.test"
@@ -164,6 +175,7 @@ describe "Phusion Passenger for Nginx" do
 		
 		after :all do
 			@stub.destroy
+			@nginx.stop if @nginx
 		end
 		
 		before :each do
@@ -176,6 +188,7 @@ describe "Phusion Passenger for Nginx" do
 	
 	describe "various features" do
 		before :all do
+			create_nginx_controller
 			@server = "http://passenger.test:#{@nginx.port}"
 			@stub = RackStub.new('rack')
 			@nginx.add_server do |server|
@@ -203,6 +216,7 @@ describe "Phusion Passenger for Nginx" do
 		
 		after :all do
 			@stub.destroy
+			@nginx.stop if @nginx
 		end
 		
 		before :each do
@@ -262,6 +276,58 @@ describe "Phusion Passenger for Nginx" do
 		end
 	end
 	
+	describe "oob work" do
+		before :all do
+			create_nginx_controller
+			@server = "http://passenger.test:#{@nginx.port}"
+			@stub = RackStub.new('rack')
+			@nginx.add_server do |server|
+				server[:server_name] = "passenger.test"
+				server[:root]        = "#{@stub.full_app_root}/public"
+			end
+		end
+
+		after :all do
+			@stub.destroy
+			@nginx.stop if @nginx
+		end
+		
+		before :each do
+			@stub.reset
+			
+			File.write("#{@stub.app_root}/config.ru", <<-RUBY)
+				PhusionPassenger.on_event(:oob_work) do
+					f = File.open("#{@stub.full_app_root}/oob_work.\#{$$}", 'w')
+					f.close
+					sleep 1
+				end
+				app = lambda do |env|
+					if env['PATH_INFO'] == '/oobw'
+						[200, { "Content-Type" => "text/html", "X-Passenger-Request-OOB-Work" => 'true' }, [$$]]
+					else
+						[200, { "Content-Type" => "text/html" }, [$$]]
+					end
+				end
+				run app
+			RUBY
+			
+			@nginx.start
+		end
+		
+		it "invokes oobw when requested by the app process" do
+			pid = get("/oobw")
+			sleep 0.5 # wait for oobw callback to be invoked
+			File.exists?("#{@stub.app_root}/oob_work.#{pid}").should == true
+		end
+		
+		it "does not block client while invoking oob work" do
+			get("/") # ensure there are spawned app processes
+			t0 = Time.now
+			get("/oobw")
+			secs = Time.now - t0
+			secs.should <= 0.1
+		end
+	end
 	
 	##### Helper methods #####
 	
diff --git a/test/integration_tests/spec_helper.rb b/test/integration_tests/spec_helper.rb
index 56e7142..aaf5ce3 100644
--- a/test/integration_tests/spec_helper.rb
+++ b/test/integration_tests/spec_helper.rb
@@ -1,13 +1,14 @@
 source_root = File.expand_path(File.dirname(__FILE__) + "/../..")
 Dir.chdir("#{source_root}/test")
 
-require 'yaml'
+require 'rubygems'
+require 'json'
 begin
-	CONFIG = YAML::load_file('config.yml')
+	CONFIG = JSON.load(File.read('config.json'))
 rescue Errno::ENOENT
-	STDERR.puts "*** You do not have the file test/config.yml. " <<
-		"Please copy test/config.yml.example to " <<
-		"test/config.yml, and edit it."
+	STDERR.puts "*** You do not have the file test/config.json. " <<
+		"Please copy test/config.json.example to " <<
+		"test/config.json, and edit it."
 	exit 1
 end
 
@@ -15,5 +16,7 @@ $LOAD_PATH.unshift("#{source_root}/lib")
 $LOAD_PATH.unshift("#{source_root}/test")
 
 require 'phusion_passenger'
+PhusionPassenger.locate_directories
 require 'support/test_helper'
+
 include TestHelper
diff --git a/test/oxt/oxt_test_main.cpp b/test/oxt/oxt_test_main.cpp
index 08cd89b..e6a81aa 100644
--- a/test/oxt/oxt_test_main.cpp
+++ b/test/oxt/oxt_test_main.cpp
@@ -1,5 +1,6 @@
 #include "../tut/tut.h"
 #include "../tut/tut_reporter.h"
+#include <oxt/initialize.hpp>
 #include <oxt/system_calls.hpp>
 #include <signal.h>
 #include <cstdlib>
@@ -14,6 +15,7 @@ int main() {
 	signal(SIGPIPE, SIG_IGN);
 	setenv("RAILS_ENV", "production", 1);
 	setenv("TESTING_PASSENGER", "1", 1);
+	oxt::initialize();
 	oxt::setup_syscall_interruption_support();
 	try {
 		tut::runner.get().run_tests();
diff --git a/test/oxt/syscall_interruption_test.cpp b/test/oxt/syscall_interruption_test.cpp
index 8b8bec2..6bb4797 100644
--- a/test/oxt/syscall_interruption_test.cpp
+++ b/test/oxt/syscall_interruption_test.cpp
@@ -7,6 +7,7 @@
 
 using namespace oxt;
 using namespace std;
+using namespace boost;
 
 namespace tut {
 	struct syscall_interruption_test {
diff --git a/test/ruby/abstract_request_handler_spec.rb b/test/ruby/abstract_request_handler_spec.rb
deleted file mode 100644
index 0860f71..0000000
--- a/test/ruby/abstract_request_handler_spec.rb
+++ /dev/null
@@ -1,406 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
-require 'phusion_passenger/abstract_request_handler'
-require 'phusion_passenger/analytics_logger'
-
-require 'fileutils'
-
-module PhusionPassenger
-
-describe AbstractRequestHandler do
-	before :each do
-		preinitialize if respond_to?(:preinitialize)
-		@old_passenger_tmpdir = Utils.passenger_tmpdir
-		Utils.passenger_tmpdir = "abstract_request_handler_spec.tmp"
-		@owner_pipe = IO.pipe
-		@request_handler = AbstractRequestHandler.new(@owner_pipe[1], @options || {})
-		def @request_handler.process_request(*args)
-			# Do nothing.
-		end
-	end
-	
-	after :each do
-		@request_handler.cleanup
-		@owner_pipe[0].close rescue nil
-		Utils.passenger_tmpdir = @old_passenger_tmpdir
-		FileUtils.chmod_R(0777, "abstract_request_handler_spec.tmp")
-		FileUtils.rm_rf("abstract_request_handler_spec.tmp")
-	end
-	
-	def connect(socket_name = :main)
-		if @request_handler.server_sockets[socket_name][1] == "unix"
-			return UNIXSocket.new(@request_handler.server_sockets[socket_name][0])
-		else
-			addr, port = @request_handler.server_sockets[socket_name][0].split(/:/)
-			return TCPSocket.new(addr, port.to_i)
-		end
-	end
-	
-	def send_binary_request(socket, env)
-		channel = MessageChannel.new(socket)
-		data = ""
-		env.each_pair do |key, value|
-			data << key << "\0"
-			data << value << "\0"
-		end
-		channel.write_scalar(data)
-	end
-	
-	it "exits if the owner pipe is closed" do
-		@request_handler.start_main_loop_thread
-		@owner_pipe[0].close
-		eventually do
-			!@request_handler.main_loop_running?
-		end
-	end
-	
-	it "ignores new connections that don't send any data" do
-		def @request_handler.accept_connection
-			return nil
-		end
-		@request_handler.start_main_loop_thread
-		eventually do
-			@request_handler.iterations != 0
-		end
-		@request_handler.processed_requests.should == 0
-	end
-	
-	it "creates a socket file in the Phusion Passenger temp folder, unless when using TCP sockets" do
-		if @request_handler.server_sockets[:main][1] == "unix"
-			File.chmod(0700, "abstract_request_handler_spec.tmp/backends")
-			Dir["abstract_request_handler_spec.tmp/backends/*"].should_not be_empty
-		end
-	end
-	
-	specify "the main socket rejects headers that are too large" do
-		stderr = StringIO.new
-		DebugLogging.log_level = 0
-		DebugLogging.stderr_evaluator = lambda { stderr }
-		@request_handler.start_main_loop_thread
-		begin
-			client = connect
-			client.sync = true
-			block = lambda do
-				data = "REQUEST_METHOD\0/"
-				data << "x" * (AbstractRequestHandler::MAX_HEADER_SIZE * 2)
-				data << "\0"
-				MessageChannel.new(client).write_scalar(data)
-			end
-			block.should raise_error(Errno::EPIPE)
-			stderr.string.should_not be_empty
-		ensure
-			client.close rescue nil
-		end
-	end
-	
-	specify "the main socket rejects unauthenticated connections, if a connect password is supplied" do
-		@request_handler.connect_password = "1234"
-		@request_handler.start_main_loop_thread
-		begin
-			client = connect
-			channel = MessageChannel.new(client)
-			channel.write_scalar("REQUEST_METHOD\0PING\0")
-			client.read.should == ""
-		ensure
-			client.close rescue nil
-		end
-		begin
-			client = connect
-			channel = MessageChannel.new(client)
-			channel.write_scalar("REQUEST_METHOD\0PING\0PASSENGER_CONNECT_PASSWORD\0001234\0")
-			client.read.should == "pong"
-		ensure
-			client.close rescue nil
-		end
-	end
-	
-	it "accepts pings on the main server socket" do
-		@request_handler.start_main_loop_thread
-		client = connect
-		begin
-			channel = MessageChannel.new(client)
-			channel.write_scalar("REQUEST_METHOD\0PING\0")
-			client.read.should == "pong"
-		ensure
-			client.close
-		end
-	end
-	
-	it "accepts pings on the HTTP server socket" do
-		@request_handler.start_main_loop_thread
-		addr, port = @request_handler.server_sockets[:http][0].split(/:/)
-		client = TCPSocket.new(addr, port.to_i)
-		begin
-			client.write("PING / HTTP/1.1\r\n")
-			client.write("Host: foo.com\r\n\r\n")
-			client.close_write
-			client.read.should == "pong"
-		ensure
-			client.close
-		end
-	end
-	
-	specify "the HTTP socket rejects headers that are too large" do
-		stderr = StringIO.new
-		DebugLogging.log_level = 0
-		DebugLogging.stderr_evaluator = lambda { stderr }
-		@request_handler.start_main_loop_thread
-		begin
-			client = connect(:http)
-			client.sync = true
-			block = lambda do
-				client.write("GET /")
-				client.write("x" * AbstractRequestHandler::MAX_HEADER_SIZE)
-				sleep 0.01 # Context switch
-				client.write("x" * AbstractRequestHandler::MAX_HEADER_SIZE)
-				client.write(" HTTP/1.1\r\n")
-			end
-			block.should raise_error(SystemCallError)
-			stderr.string.should_not be_empty
-		ensure
-			client.close rescue nil
-		end
-	end
-	
-	specify "the HTTP socket rejects unauthenticated connections, if a connect password is supplied" do
-		DebugLogging.log_level = -1
-		@request_handler.connect_password = "1234"
-		@request_handler.start_main_loop_thread
-		begin
-			client = connect(:http)
-			client.write("PING / HTTP/1.1\r\n")
-			client.write("\r\n")
-			client.read.should == ""
-		ensure
-			client.close rescue nil
-		end
-		begin
-			client = connect(:http)
-			client.write("PING / HTTP/1.1\r\n")
-			client.write("X-Passenger-Connect-Password: 1234\r\n")
-			client.write("\r\n")
-			client.read.should == "pong"
-		ensure
-			client.close rescue nil
-		end
-	end
-	
-	describe "if analytics logger is given" do
-		def preinitialize
-			if @agent_pid
-				Process.kill('KILL', @agent_pid)
-				Process.waitpid(@agent_pid)
-			end
-			@log_dir = Utils.passenger_tmpdir
-			@logging_agent_password = "1234"
-			@agent_pid, @socket_filename, @socket_address = spawn_logging_agent(@log_dir,
-				@logging_agent_password)
-			
-			@logger = AnalyticsLogger.new(@socket_address, "logging",
-				"1234", "localhost")
-			@options = { "analytics_logger" => @logger }
-		end
-		
-		after :each do
-			if @agent_pid
-				Process.kill('KILL', @agent_pid)
-				Process.waitpid(@agent_pid)
-			end
-		end
-		
-		def base64(data)
-			return [data].pack('m').gsub("\n", "")
-		end
-		
-		it "makes the analytics log object available through the request env and a thread-local variable" do
-			header_value = nil
-			thread_value = nil
-			@request_handler.should_receive(:process_request).and_return do |headers, input, output, status_line_desired|
-				header_value = headers[PASSENGER_ANALYTICS_WEB_LOG]
-				thread_value = Thread.current[PASSENGER_ANALYTICS_WEB_LOG]
-			end
-			@request_handler.start_main_loop_thread
-			client = connect
-			begin
-				send_binary_request(client,
-					"REQUEST_METHOD" => "GET",
-					"PASSENGER_TXN_ID" => "1234-abcd",
-					"PASSENGER_GROUP_NAME" => "foobar")
-				client.read
-			ensure
-				client.close
-			end
-			header_value.should be_kind_of(AnalyticsLogger::Log)
-			thread_value.should be_kind_of(AnalyticsLogger::Log)
-			header_value.should == thread_value
-		end
-		
-		it "logs uncaught exceptions for requests that have a transaction ID" do
-			@request_handler.should_receive(:process_request).and_return do |headers, input, output, status_line_desired|
-				raise "something went wrong"
-			end
-			@request_handler.start_main_loop_thread
-			client = connect
-			begin
-				DebugLogging.log_level = -2
-				send_binary_request(client,
-					"REQUEST_METHOD" => "GET",
-					"PASSENGER_TXN_ID" => "1234-abcd",
-					"PASSENGER_GROUP_NAME" => "foobar")
-			ensure
-				client.close
-			end
-			eventually(5) do
-				flush_logging_agent(@logging_agent_password, @socket_address)
-				log_file = Dir["#{@log_dir}/1/*/*/exceptions/**/log.txt"].first
-				if log_file
-					log_data = File.read(log_file)
-				else
-					log_data = ""
-				end
-				log_data.include?("Request transaction ID: 1234-abcd\n") &&
-					log_data.include?("Message: " + base64("something went wrong")) &&
-					log_data.include?("Class: RuntimeError") &&
-					log_data.include?("Backtrace: ")
-			end
-		end
-	end
-	
-	describe "HTTP parsing" do
-		before :each do
-			@request_handler.start_main_loop_thread
-			addr, port = @request_handler.server_sockets[:http][0].split(/:/)
-			port = port.to_i
-			@client = TCPSocket.new(addr, port)
-			@client.sync = true
-		end
-		
-		after :each do
-			@client.close
-		end
-		
-		it "correctly parses HTTP requests without query string" do
-			@request_handler.should_receive(:process_request).and_return do |headers, input, output, status_line_desired|
-				headers["REQUEST_METHOD"].should == "POST"
-				headers["SERVER_PROTOCOL"].should == "HTTP/1.1"
-				headers["HTTP_HOST"].should == "foo.com"
-				headers["HTTP_X_FOO_BAR"].should == "baz"
-				headers["PATH_INFO"].should == "/foo/bar"
-				headers["SCRIPT_NAME"].should == ""
-				headers["QUERY_STRING"].should == ""
-				headers["REQUEST_URI"].should == "/foo/bar"
-				headers["HTTP_CONTENT_LENGTH"].should be_nil
-				headers["HTTP_CONTENT_TYPE"].should be_nil
-				headers["CONTENT_LENGTH"].should == "10"
-				headers["CONTENT_TYPE"].should == "text/plain"
-			end
-			
-			@client.write("POST /foo/bar HTTP/1.1\r\n")
-			@client.write("Host: foo.com\r\n")
-			@client.write("X-Foo-Bar: baz\r\n")
-			@client.write("Content-Length: 10\r\n")
-			@client.write("Content-Type: text/plain\r\n")
-			@client.write("\r\n")
-			@client.close_write
-			@client.read
-		end
-		
-		it "correctly parses HTTP requests with query string" do
-			@request_handler.should_receive(:process_request).and_return do |headers, input, output, status_line_desired|
-				headers["REQUEST_METHOD"].should == "POST"
-				headers["SERVER_PROTOCOL"].should == "HTTP/1.1"
-				headers["HTTP_HOST"].should == "foo.com"
-				headers["HTTP_X_FOO_BAR"].should == "baz"
-				headers["PATH_INFO"].should == "/foo/bar"
-				headers["SCRIPT_NAME"].should == ""
-				headers["QUERY_STRING"].should == "hello=world&a=b+c"
-				headers["REQUEST_URI"].should == "/foo/bar?hello=world&a=b+c"
-				headers["HTTP_CONTENT_LENGTH"].should be_nil
-				headers["HTTP_CONTENT_TYPE"].should be_nil
-				headers["CONTENT_LENGTH"].should == "10"
-				headers["CONTENT_TYPE"].should == "text/plain"
-			end
-			
-			@client.write("POST /foo/bar?hello=world&a=b+c HTTP/1.1\r\n")
-			@client.write("Host: foo.com\r\n")
-			@client.write("X-Foo-Bar: baz\r\n")
-			@client.write("Content-Length: 10\r\n")
-			@client.write("Content-Type: text/plain\r\n")
-			@client.write("\r\n")
-			@client.close_write
-			@client.read
-		end
-		
-		it "correct parses HTTP requests that come in arbitrary chunks" do
-			@request_handler.should_receive(:process_request).and_return do |headers, input, output, status_line_desired|
-				headers["REQUEST_METHOD"].should == "POST"
-				headers["SERVER_PROTOCOL"].should == "HTTP/1.1"
-				headers["HTTP_HOST"].should == "foo.com"
-				headers["HTTP_X_FOO_BAR"].should == "baz"
-				headers["PATH_INFO"].should == "/foo/bar"
-				headers["SCRIPT_NAME"].should == ""
-				headers["QUERY_STRING"].should == "hello=world&a=b+c"
-				headers["REQUEST_URI"].should == "/foo/bar?hello=world&a=b+c"
-				headers["HTTP_CONTENT_LENGTH"].should be_nil
-				headers["HTTP_CONTENT_TYPE"].should be_nil
-				headers["CONTENT_LENGTH"].should == "10"
-				headers["CONTENT_TYPE"].should == "text/plain"
-				headers["HTTP_PLUS_SOME"].should be_nil
-			end
-			
-			@client.write("POST /fo")
-			sleep 0.001
-			@client.write("o/bar?hello=world&a=b+c HT")
-			sleep 0.001
-			@client.write("TP/1.1\r")
-			sleep 0.001
-			@client.write("\nHost: foo.com")
-			sleep 0.001
-			@client.write("\r\n")
-			sleep 0.001
-			@client.write("X-Foo-Bar: baz\r\n")
-			sleep 0.001
-			@client.write("Content-Len")
-			sleep 0.001
-			@client.write("gth: 10\r\nContent-Type: text/pla")
-			sleep 0.001
-			@client.write("in\r\n\r")
-			sleep 0.001
-			@client.write("\nPlus-Some: garbage data that should be ignored.")
-			@client.close_write
-			@client.read
-		end
-	end
-	
-	specify "upon receiving a soft shutdown signal, the main loop quits a while after the last connection was accepted" do
-		@request_handler.soft_termination_linger_time = 0.2
-		@request_handler.start_main_loop_thread
-		@request_handler.soft_shutdown
-		
-		# Each time we ping the server it should reset the exit time.
-		deadline = Time.now + 0.6
-		while Time.now < deadline
-			@request_handler.should be_main_loop_running
-			client = connect
-			begin
-				channel = MessageChannel.new(client)
-				channel.write_scalar("REQUEST_METHOD\0PING\0")
-				client.read
-				sleep 0.02
-			ensure
-				client.close
-			end
-		end
-		@request_handler.should be_main_loop_running
-		
-		# After we're done pinging it should quit within a short period of time.
-		deadline = Time.now + 0.6
-		while Time.now < deadline && @request_handler.main_loop_running?
-			sleep 0.01
-		end
-		@request_handler.should_not be_main_loop_running
-	end
-	
-	############################
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/abstract_server_collection_spec.rb b/test/ruby/abstract_server_collection_spec.rb
deleted file mode 100644
index 98901d0..0000000
--- a/test/ruby/abstract_server_collection_spec.rb
+++ /dev/null
@@ -1,247 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
-require 'phusion_passenger/abstract_server'
-require 'phusion_passenger/abstract_server_collection'
-
-module PhusionPassenger
-
-describe AbstractServerCollection do
-	before :each do
-		@collection = AbstractServerCollection.new
-	end
-	
-	after :each do
-		@collection.cleanup
-	end
-	
-	specify "#lookup_or_add adds the server returned by its block" do
-		@collection.synchronize do
-			@collection.lookup_or_add('foo') do
-				AbstractServer.new
-			end
-			@collection.should have_key('foo')
-		end
-	end
-	
-	specify "#lookup_or_add does not execute the block if the key exists" do
-		@collection.synchronize do
-			@collection.lookup_or_add('foo') do
-				AbstractServer.new
-			end
-			@collection.lookup_or_add('foo') do
-				violated
-			end
-		end
-	end
-	
-	specify "#lookup_or_add returns the found server" do
-		@collection.synchronize do
-			server = AbstractServer.new
-			@collection.lookup_or_add('foo') { server }
-			result = @collection.lookup_or_add('foo') { AbstractServer.new }
-			result.should == server
-		end
-	end
-	
-	specify "#lookup_or_add returns the value of the block if server is not already in the collection" do
-		@collection.synchronize do
-			server = AbstractServer.new
-			result = @collection.lookup_or_add('foo') do
-				server
-			end
-			result.should == server
-		end
-	end
-	
-	specify "#delete deletes the server with the given key" do
-		@collection.synchronize do
-			@collection.lookup_or_add('foo') do
-				AbstractServer.new
-			end
-			@collection.delete('foo')
-			@collection.should_not have_key('foo')
-		end
-	end
-	
-	specify "#delete stops the server if it's started" do
-		@collection.synchronize do
-			server = AbstractServer.new
-			@collection.lookup_or_add('foo') do
-				server.start
-				server
-			end
-			@collection.delete('foo')
-			server.should_not be_started
-		end
-	end
-	
-	specify "#clear deletes everything" do
-		@collection.synchronize do
-			@collection.lookup_or_add('foo') do
-				AbstractServer.new
-			end
-			@collection.lookup_or_add('bar') do
-				AbstractServer.new
-			end
-			@collection.clear
-			@collection.should_not have_key('foo')
-			@collection.should_not have_key('bar')
-		end
-	end
-	
-	specify "#cleanup deletes everything" do
-		@collection.synchronize do
-			@collection.lookup_or_add('foo') do
-				AbstractServer.new
-			end
-			@collection.lookup_or_add('bar') do
-				AbstractServer.new
-			end
-		end
-		@collection.cleanup
-		@collection.synchronize do
-			@collection.should_not have_key('foo')
-			@collection.should_not have_key('bar')
-		end
-	end
-	
-	specify "#cleanup stops all servers" do
-		servers = []
-		3.times do
-			server = AbstractServer.new
-			server.start
-			servers << server
-		end
-		@collection.synchronize do
-			@collection.lookup_or_add('foo') { servers[0] }
-			@collection.lookup_or_add('bar') { servers[1] }
-			@collection.lookup_or_add('baz') { servers[2] }
-		end
-		@collection.cleanup
-		servers.each do |server|
-			server.should_not be_started
-		end
-	end
-	
-	specify "idle servers are cleaned up periodically" do
-		foo = AbstractServer.new
-		foo.max_idle_time = 0.05
-		bar = AbstractServer.new
-		bar.max_idle_time = 2
-		
-		@collection.synchronize do
-			@collection.lookup_or_add('foo') { foo }
-			@collection.lookup_or_add('bar') { bar }
-		end
-		sleep 0.3
-		@collection.synchronize do
-			@collection.should_not have_key('foo')
-			@collection.should have_key('bar')
-		end
-	end
-	
-	specify "servers with max_idle_time of 0 are never cleaned up" do
-		@collection.synchronize do
-			@collection.lookup_or_add('foo') { AbstractServer.new }
-		end
-		original_cleaning_time = @collection.next_cleaning_time
-		@collection.check_idle_servers!
-		
-		# Wait until the cleaner thread has run.
-		while original_cleaning_time == @collection.next_cleaning_time
-			sleep 0.01
-		end
-		
-		@collection.synchronize do
-			@collection.should have_key('foo')
-		end
-	end
-	
-	specify "upon adding a new server to an empty collection, the next cleaning will " <<
-	        "be scheduled at that server's next cleaning time" do
-		server = AbstractServer.new
-		server.max_idle_time = 10
-		@collection.synchronize do
-			@collection.lookup_or_add('foo') { server }
-		end
-		@collection.next_cleaning_time.should == server.next_cleaning_time
-	end
-	
-	specify "upon adding a new server to a nonempty collection, and that server's next cleaning " <<
-	        "time is not the smallest of all servers' cleaning times, then the next cleaning schedule " <<
-	        "will not change" do
-		server1 = AbstractServer.new
-		server1.max_idle_time = 10
-		@collection.synchronize do
-			@collection.lookup_or_add('foo') { server1 }
-		end
-		
-		server2 = AbstractServer.new
-		server2.max_idle_time = 11
-		@collection.synchronize do
-			@collection.lookup_or_add('bar') { server2 }
-		end
-		
-		@collection.next_cleaning_time.should == server1.next_cleaning_time
-	end
-	
-	specify "upon deleting server from a nonempty collection, and the deleted server's next cleaning " <<
-	        "time IS the smallest of all servers' cleaning times, then the next cleaning schedule " <<
-	        "will be changed to the smallest cleaning time of all servers" do
-		server1 = AbstractServer.new
-		server1.max_idle_time = 10
-		@collection.synchronize do
-			@collection.lookup_or_add('foo') { server1 }
-		end
-		
-		server2 = AbstractServer.new
-		server2.max_idle_time = 11
-		@collection.synchronize do
-			@collection.lookup_or_add('bar') { server2 }
-		end
-		
-		@collection.synchronize do
-			@collection.delete('foo')
-		end
-		
-		@collection.next_cleaning_time.should == server2.next_cleaning_time
-	end
-	
-	specify "upon deleting server from a nonempty collection, and the deleted server's next cleaning " <<
-	        "time IS NOT the smallest of all servers' cleaning times, then the next cleaning schedule " <<
-	        "will not change" do
-		server1 = AbstractServer.new
-		server1.max_idle_time = 10
-		@collection.synchronize do
-			@collection.lookup_or_add('foo') { server1 }
-		end
-		
-		server2 = AbstractServer.new
-		server2.max_idle_time = 11
-		@collection.synchronize do
-			@collection.lookup_or_add('bar') { server2 }
-		end
-		
-		@collection.synchronize do
-			@collection.delete('bar')
-		end
-		
-		@collection.next_cleaning_time.should == server1.next_cleaning_time
-	end
-	
-	specify "bug check" do
-		block = lambda do
-			@collection.synchronize do
-				@collection.clear
-				@collection.lookup_or_add('foo') do
-					s = AbstractServer.new
-					s.max_idle_time = 0.05
-					s
-				end
-				@collection.lookup_or_add('bar') { AbstractServer.new }
-			end
-		end
-		block.should_not raise_error
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/abstract_server_spec.rb b/test/ruby/abstract_server_spec.rb
deleted file mode 100644
index 8744ceb..0000000
--- a/test/ruby/abstract_server_spec.rb
+++ /dev/null
@@ -1,61 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
-require 'phusion_passenger/abstract_server'
-
-module PhusionPassenger
-
-describe AbstractServer do
-	before :each do
-		@server = AbstractServer.new
-	end
-	
-	after :each do
-		@server.stop if @server.started?
-	end
-	
-	it "reseeds the pseudo-random number generator after forking off a process" do
-		@server.send(:define_message_handler, :random_number, :handle_random_number)
-		@server.stub!(:handle_random_number).and_return do |channel|
-			channel.write(rand.to_s)
-		end
-		
-		first_num = second_num = nil
-		
-		@server.start
-		@server.connect do |channel|
-			channel.write("random_number")
-			first_num = channel.read
-		end
-		
-		@server.stop
-		@server.start
-		@server.connect do |channel|
-			channel.write("random_number")
-			second_num = channel.read
-		end
-		
-		first_num.should_not == second_num
-	end
-	
-	specify "its socket is password protected" do
-		@server.ignore_password_errors = true
-		@server.send(:define_message_handler, :number, :handle_number)
-		@server.stub!(:handle_number).and_return do |channel|
-			channel.write(1)
-		end
-		
-		@server.start
-		@server.instance_variable_set(:"@password", "1234")
-		
-		begin
-			@server.connect do |channel|
-				channel.write("number")
-				result = channel.read
-				result.should be_nil
-			end
-		rescue SystemCallError, IOError
-			# Success.
-		end
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/admin_tools_spec.rb b/test/ruby/admin_tools_spec.rb
index 1652fa2..c38bd34 100644
--- a/test/ruby/admin_tools_spec.rb
+++ b/test/ruby/admin_tools_spec.rb
@@ -1,5 +1,6 @@
 require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
 require 'fileutils'
+require 'phusion_passenger/constants'
 require 'phusion_passenger/utils'
 require 'phusion_passenger/admin_tools'
 require 'phusion_passenger/admin_tools/server_instance'
@@ -17,11 +18,6 @@ end
 describe AdminTools::ServerInstance do
 	include Utils
 	
-	DIR_STRUCTURE_MAJOR_VERSION = AdminTools::ServerInstance::DIR_STRUCTURE_MAJOR_VERSION
-	DIR_STRUCTURE_MINOR_VERSION = AdminTools::ServerInstance::DIR_STRUCTURE_MINOR_VERSION
-	GENERATION_STRUCTURE_MAJOR_VERSION = AdminTools::ServerInstance::GENERATION_STRUCTURE_MAJOR_VERSION
-	GENERATION_STRUCTURE_MINOR_VERSION = AdminTools::ServerInstance::GENERATION_STRUCTURE_MINOR_VERSION
-	
 	before :each do
 		File.chmod(0700, passenger_tmpdir)
 	end
@@ -45,13 +41,13 @@ describe AdminTools::ServerInstance do
 		IO.popen("sleep 999")
 	end
 	
-	def create_instance_dir(pid, major = DIR_STRUCTURE_MAJOR_VERSION, minor = DIR_STRUCTURE_MINOR_VERSION)
+	def create_instance_dir(pid, major = PhusionPassenger::SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION, minor = PhusionPassenger::SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION)
 		dir = "#{passenger_tmpdir}/passenger.#{major}.#{minor}.#{pid}"
 		Dir.mkdir(dir)
 		return dir
 	end
 	
-	def create_generation(dir, number = 0, major = GENERATION_STRUCTURE_MAJOR_VERSION, minor = GENERATION_STRUCTURE_MINOR_VERSION)
+	def create_generation(dir, number = 0, major = PhusionPassenger::SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION, minor = PhusionPassenger::SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION)
 		dir = "#{dir}/generation-#{number}"
 		Dir.mkdir(dir)
 		File.write("#{dir}/structure_version.txt", "#{major}.#{minor}")
@@ -113,7 +109,8 @@ describe AdminTools::ServerInstance do
 			@process1 = spawn_process
 			@process2 = spawn_process
 			
-			dir1 = create_instance_dir(@process1.pid, DIR_STRUCTURE_MAJOR_VERSION, DIR_STRUCTURE_MINOR_VERSION + 1)
+			dir1 = create_instance_dir(@process1.pid, SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION,
+				SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION + 1)
 			create_generation(dir1)
 			dir2 = create_instance_dir(@process2.pid)
 			create_generation(dir2)
@@ -133,8 +130,8 @@ describe AdminTools::ServerInstance do
 			@process1 = spawn_process
 			@process2 = spawn_process
 			dir1 = create_instance_dir(@process1.pid)
-			create_generation(dir1, 0, GENERATION_STRUCTURE_MAJOR_VERSION)
-			create_generation(dir1, 1, GENERATION_STRUCTURE_MAJOR_VERSION + 1)
+			create_generation(dir1, 0, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION)
+			create_generation(dir1, 1, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION + 1)
 			dir2 = create_instance_dir(@process2.pid)
 			create_generation(dir2)
 			
@@ -147,8 +144,9 @@ describe AdminTools::ServerInstance do
 			@process1 = spawn_process
 			@process2 = spawn_process
 			dir1 = create_instance_dir(@process1.pid)
-			create_generation(dir1, 0, GENERATION_STRUCTURE_MAJOR_VERSION)
-			create_generation(dir1, 1, GENERATION_STRUCTURE_MAJOR_VERSION + 1, GENERATION_STRUCTURE_MINOR_VERSION + 1)
+			create_generation(dir1, 0, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION)
+			create_generation(dir1, 1, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION + 1,
+				SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION + 1)
 			dir2 = create_instance_dir(@process2.pid)
 			create_generation(dir2)
 			
@@ -187,7 +185,7 @@ describe AdminTools::ServerInstance do
 		
 		it "doesn't clean up server instance directories for which the major structure version is different" do
 			process1 = spawn_process
-			dir1 = create_instance_dir(process1.pid, DIR_STRUCTURE_MAJOR_VERSION + 1)
+			dir1 = create_instance_dir(process1.pid, SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION + 1)
 			create_generation(dir1)
 			Process.kill('KILL', process1.pid) rescue nil
 			process1.close
@@ -200,7 +198,7 @@ describe AdminTools::ServerInstance do
 		
 		it "doesn't clean up server instance directories for which the major structure version is the same but the minor structure version is larger" do
 			process1 = spawn_process
-			dir1 = create_instance_dir(process1.pid, DIR_STRUCTURE_MAJOR_VERSION, DIR_STRUCTURE_MINOR_VERSION + 1)
+			dir1 = create_instance_dir(process1.pid, SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION, SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION + 1)
 			create_generation(dir1)
 			Process.kill('KILL', process1.pid) rescue nil
 			process1.close
@@ -214,7 +212,7 @@ describe AdminTools::ServerInstance do
 		it "doesn't clean up server instance directories for which the latest generation has a different major version" do
 			process1 = spawn_process
 			dir1 = create_instance_dir(process1.pid)
-			create_generation(dir1, 0, GENERATION_STRUCTURE_MAJOR_VERSION + 1)
+			create_generation(dir1, 0, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION + 1)
 			Process.kill('KILL', process1.pid) rescue nil
 			process1.close
 			
@@ -227,7 +225,7 @@ describe AdminTools::ServerInstance do
 		it "doesn't clean up server instance directories for which the latest generation has the same major version but a larger minor version" do
 			process1 = spawn_process
 			dir1 = create_instance_dir(process1.pid)
-			create_generation(dir1, 0, GENERATION_STRUCTURE_MAJOR_VERSION, GENERATION_STRUCTURE_MINOR_VERSION + 1)
+			create_generation(dir1, 0, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION + 1)
 			Process.kill('KILL', process1.pid) rescue nil
 			process1.close
 			
diff --git a/test/ruby/analytics_logger_spec.rb b/test/ruby/analytics_logger_spec.rb
index d6d024a..aa81cf9 100644
--- a/test/ruby/analytics_logger_spec.rb
+++ b/test/ruby/analytics_logger_spec.rb
@@ -8,16 +8,14 @@ describe AnalyticsLogger do
 	YESTERDAY = Time.utc(2010, 4, 11, 11, 56, 02)
 	TODAY     = Time.utc(2010, 4, 11, 12, 56, 02)
 	TOMORROW  = Time.utc(2010, 4, 11, 13, 56, 02)
-	FOOBAR_MD5 = Digest::MD5.hexdigest("foobar")
-	LOCALHOST_MD5 = Digest::MD5.hexdigest("localhost")
 	
 	before :each do
 		@username = "logging"
 		@password = "1234"
-		@log_dir  = Utils.passenger_tmpdir
+		@dump_file = Utils.passenger_tmpdir + "/log.txt"
 		start_agent
-		@logger = AnalyticsLogger.new(@socket_address, @username, @password, "localhost")
-		@logger2 = AnalyticsLogger.new(@socket_address, @username, @password, "localhost")
+		@logger    = AnalyticsLogger.new(@socket_address, @username, @password, "localhost")
+		@logger2   = AnalyticsLogger.new(@socket_address, @username, @password, "localhost")
 	end
 	
 	after :each do
@@ -34,7 +32,7 @@ describe AnalyticsLogger do
 	end
 	
 	def start_agent
-		@agent_pid, @socket_filename, @socket_address = spawn_logging_agent(@log_dir, @password)
+		@agent_pid, @socket_filename, @socket_address = spawn_logging_agent(@dump_file, @password)
 	end
 	
 	def kill_agent
@@ -57,8 +55,7 @@ describe AnalyticsLogger do
 			log.close(true)
 		end
 		
-		log_file = "#{@log_dir}/1/#{FOOBAR_MD5}/#{LOCALHOST_MD5}/requests/2010/04/11/12/log.txt"
-		File.read(log_file).should =~ /hello/
+		File.read(@dump_file).should =~ /hello/
 		
 		log = @logger.new_transaction("foobar", :processes)
 		log.should_not be_null
@@ -68,8 +65,7 @@ describe AnalyticsLogger do
 			log.close(true)
 		end
 		
-		log_file = "#{@log_dir}/1/#{FOOBAR_MD5}/#{LOCALHOST_MD5}/processes/2010/04/11/12/log.txt"
-		File.read(log_file).should =~ /world/
+		File.read(@dump_file).should =~ /world/
 	end
 	
 	specify "#new_transaction reestablishes the connection if disconnected" do
@@ -89,8 +85,7 @@ describe AnalyticsLogger do
 			log.close(true)
 		end
 		
-		log_file = "#{@log_dir}/1/#{FOOBAR_MD5}/#{LOCALHOST_MD5}/requests/2010/04/11/12/log.txt"
-		File.read(log_file).should =~ /hello/
+		File.read(@dump_file).should =~ /hello/
 	end
 	
 	specify "#new_transaction does not reconnect to the server for a short period of time if connecting failed" do
@@ -127,9 +122,8 @@ describe AnalyticsLogger do
 			log.close(true)
 		end
 		
-		log_file = "#{@log_dir}/1/#{FOOBAR_MD5}/#{LOCALHOST_MD5}/processes/2010/04/11/12/log.txt"
-		File.read(log_file).should =~ /#{Regexp.escape log.txn_id} .* hello$/
-		File.read(log_file).should =~ /#{Regexp.escape log.txn_id} .* world$/
+		File.read(@dump_file).should =~ /#{Regexp.escape log.txn_id} .* hello$/
+		File.read(@dump_file).should =~ /#{Regexp.escape log.txn_id} .* world$/
 	end
 	
 	specify "#continue_transaction reestablishes the connection if disconnected" do
@@ -153,8 +147,7 @@ describe AnalyticsLogger do
 			log2.close(true)
 		end
 		
-		log_file = "#{@log_dir}/1/#{FOOBAR_MD5}/#{LOCALHOST_MD5}/requests/2010/04/11/12/log.txt"
-		File.read(log_file).should =~ /hello/
+		File.read(@dump_file).should =~ /hello/
 	end
 	
 	specify "#new_transaction and #continue_transaction eventually reestablish the connection to the logging server if the logging server crashed and was restarted" do
@@ -180,8 +173,7 @@ describe AnalyticsLogger do
 		end
 		log.close(true)
 		
-		log_file = "#{@log_dir}/1/#{FOOBAR_MD5}/#{LOCALHOST_MD5}/requests/2010/04/11/12/log.txt"
-		File.read(log_file).should =~ /hello/
+		File.read(@dump_file).should =~ /hello/
 	end
 	
 	specify "#continue_transaction does not reconnect to the server for a short period of time if connecting failed" do
diff --git a/test/ruby/app_process_spec.rb b/test/ruby/app_process_spec.rb
deleted file mode 100644
index 830fe70..0000000
--- a/test/ruby/app_process_spec.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
-require 'phusion_passenger/app_process'
-
-module PhusionPassenger
-
-describe AppProcess do
-	before :each do
-		@stub = RailsStub.new('2.3/foobar')
-	end
-	
-	after :each do
-		@stub.destroy
-	end
-	
-	it "correctly detects Rails version numbers specified in environment.rb" do
-		rails_version = AppProcess.detect_framework_version(@stub.app_root)
-		rails_version.should =~ /^2\.3\.(\d+)$/
-	end
-	
-	it "returns :vendor if an application uses a vendored Rails" do
-		@stub.use_vendor_rails('minimal')
-		rails_version = AppProcess.detect_framework_version(@stub.app_root)
-		rails_version.should == :vendor
-	end
-	
-	it "returns nil if an application does not specify its Rails version" do
-		File.write(@stub.environment_rb) do |content|
-			content.sub(/^RAILS_GEM_VERSION = .*$/, '')
-		end
-		rails_version = AppProcess.detect_framework_version(@stub.app_root)
-		rails_version.should be_nil
-	end
-	
-	it "raises VersionNotFound if a nonexistant Rails version is specified" do
-		File.write(@stub.environment_rb) do |content|
-			content.sub(/^RAILS_GEM_VERSION = .*$/, "RAILS_GEM_VERSION = '1.9.1972'")
-		end
-		detector = lambda { AppProcess.detect_framework_version(@stub.app_root) }
-		detector.should raise_error(::PhusionPassenger::VersionNotFound)
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/classic_rails/application_spawner_spec.rb b/test/ruby/classic_rails/application_spawner_spec.rb
deleted file mode 100644
index 20355b1..0000000
--- a/test/ruby/classic_rails/application_spawner_spec.rb
+++ /dev/null
@@ -1,89 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
-require 'phusion_passenger/classic_rails/application_spawner'
-
-require 'ruby/shared/abstract_server_spec'
-require 'ruby/shared/spawners/spawn_server_spec'
-require 'ruby/shared/spawners/spawner_spec'
-require 'ruby/shared/spawners/preloading_spawner_spec'
-require 'ruby/shared/spawners/non_preloading_spawner_spec'
-require 'ruby/shared/spawners/classic_rails/spawner_spec'
-require 'ruby/shared/spawners/classic_rails/lack_of_rails_gem_version_spec'
-require 'ruby/shared/rails/analytics_logging_extensions_spec'
-
-module PhusionPassenger
-
-describe ClassicRails::ApplicationSpawner do
-	include SpawnerSpecHelper
-	
-	after :each do
-		@spawner.stop if @spawner && @spawner.started?
-	end
-	
-	describe "conservative spawning" do
-		def spawn_some_application(extra_options = {})
-			stub = register_stub(RailsStub.new("#{rails_version}/empty"))
-			yield stub if block_given?
-			
-			default_options = {
-				"app_root"     => stub.app_root,
-				"default_user" => CONFIG['default_user']
-			}
-			options = default_options.merge(extra_options)
-			app = ClassicRails::ApplicationSpawner.spawn_application(options)
-			return register_app(app)
-		end
-		
-		describe_rails_versions('<= 2.3') do
-			it_should_behave_like "a spawner"
-			it_should_behave_like "a spawner that does not preload app code"
-			it_should_behave_like "a Rails spawner"
-			include_shared_example_group "a Rails app that lacks RAILS_GEM_VERSION"
-			include_shared_example_group "analytics logging extensions for Rails"
-		end
-	end
-	
-	describe "smart spawning" do
-		def server
-			return spawner
-		end
-		
-		def spawner
-			@spawner ||= begin
-				stub = register_stub(RailsStub.new("#{rails_version}/empty"))
-				spawner = ClassicRails::ApplicationSpawner.new("app_root" => stub.app_root)
-				spawner.start
-				spawner
-			end
-		end
-		
-		def spawn_some_application(extra_options = {})
-			stub = register_stub(RailsStub.new("#{rails_version}/empty"))
-			yield stub if block_given?
-			
-			default_options = {
-				"app_root"     => stub.app_root,
-				"default_user" => CONFIG['default_user']
-			}
-			options = default_options.merge(extra_options)
-			@spawner ||= begin
-				spawner = ClassicRails::ApplicationSpawner.new(options)
-				spawner.start
-				spawner
-			end
-			app = @spawner.spawn_application(options)
-			return register_app(app)
-		end
-		
-		describe_rails_versions('<= 2.3') do
-			it_should_behave_like "an AbstractServer"
-			it_should_behave_like "a spawn server"
-			it_should_behave_like "a spawner"
-			it_should_behave_like "a spawner that preloads app code"
-			it_should_behave_like "a Rails spawner"
-			include_shared_example_group "a Rails app that lacks RAILS_GEM_VERSION"
-			include_shared_example_group "analytics logging extensions for Rails"
-		end
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/classic_rails/framework_spawner_spec.rb b/test/ruby/classic_rails/framework_spawner_spec.rb
deleted file mode 100644
index 4056a63..0000000
--- a/test/ruby/classic_rails/framework_spawner_spec.rb
+++ /dev/null
@@ -1,92 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
-require 'phusion_passenger/app_process'
-require 'phusion_passenger/classic_rails/framework_spawner'
-
-require 'ruby/shared/abstract_server_spec'
-require 'ruby/shared/spawners/spawn_server_spec'
-require 'ruby/shared/spawners/spawner_spec'
-require 'ruby/shared/spawners/reload_single_spec'
-require 'ruby/shared/spawners/reload_all_spec'
-require 'ruby/shared/spawners/classic_rails/spawner_spec'
-require 'ruby/shared/spawners/classic_rails/framework_spawner_spec'
-
-# TODO: test whether FrameworkSpawner restarts ApplicationSpawner if it crashed
-
-module PhusionPassenger
-
-describe ClassicRails::FrameworkSpawner do
-	include SpawnerSpecHelper
-	
-	after :each do
-		@spawner.stop if @spawner && @spawner.started?
-	end
-	
-	def server
-		return spawner
-	end
-	
-	def spawner
-		@spawner ||= begin
-			stub = register_stub(RailsStub.new("#{rails_version}/empty"))
-			yield stub if block_given?
-			
-			framework_version = AppProcess.detect_framework_version(stub.app_root)
-			spawner = ClassicRails::ApplicationSpawner.new(
-				"framework_version" => framework_version,
-				"app_root" => stub.app_root)
-			spawner.start
-			spawner
-		end
-	end
-	
-	def spawn_stub_application(stub, extra_options = {})
-		framework_version = AppProcess.detect_framework_version(stub.app_root)
-		default_options = {
-			"framework_version" => framework_version,
-			"app_root"     => stub.app_root,
-			"default_user" => CONFIG['default_user']
-		}
-		options = default_options.merge(extra_options)
-		@spawner ||= begin
-			spawner = ClassicRails::FrameworkSpawner.new(options)
-			spawner.start
-			spawner
-		end
-		app = @spawner.spawn_application(options)
-		return register_app(app)
-	end
-	
-	def spawn_some_application(extra_options = {})
-		stub = register_stub(RailsStub.new("#{rails_version}/empty"))
-		yield stub if block_given?
-		return spawn_stub_application(stub, extra_options)
-	end
-	
-	def use_some_stub
-		RailsStub.use("#{rails_version}/empty") do |stub|
-			yield stub
-		end
-	end
-	
-	def load_nonexistant_framework(options = {})
-		spawner = ClassicRails::FrameworkSpawner.new(options.merge(
-			"framework_version" => "1.9.827"))
-		begin
-			spawner.start
-		ensure
-			spawner.stop rescue nil
-		end
-	end
-	
-	describe_rails_versions('<= 2.3') do
-		it_should_behave_like "an AbstractServer"
-		it_should_behave_like "a spawn server"
-		it_should_behave_like "a spawner"
-		it_should_behave_like "a Rails spawner"
-		it_should_behave_like "a ClassicRails::FrameworkSpawner"
-		it_should_behave_like "a Rails spawner that supports #reload(app_group_name)"
-		it_should_behave_like "a Rails spawner that supports #reload()"
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/classic_rails/loader_spec.rb b/test/ruby/classic_rails/loader_spec.rb
new file mode 100644
index 0000000..735cd80
--- /dev/null
+++ b/test/ruby/classic_rails/loader_spec.rb
@@ -0,0 +1,47 @@
+require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'ruby/shared/loader_sharedspec'
+require 'ruby/shared/ruby_loader_sharedspec'
+require 'ruby/shared/rails/analytics_logging_extensions_sharedspec'
+
+module PhusionPassenger
+
+describe "Classic Rails 2.3 loader" do
+	include LoaderSpecHelper
+
+	before :each do
+		@stub = register_stub(ClassicRailsStub.new("rails2.3"))
+	end
+
+	def start(options = {})
+		@loader = Loader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/classic-rails-loader.rb"], @stub.app_root)
+		return @loader.start(options)
+	end
+
+	def rails_version
+		return "2.3"
+	end
+
+	it_should_behave_like "a loader"
+	it_should_behave_like "a Ruby loader"
+
+	it "calls the starting_worker_process event with forked=false" do
+		File.prepend(@stub.environment_rb, %q{
+			history_file = "history.txt"
+			PhusionPassenger.on_event(:starting_worker_process) do |forked|
+				::File.open(history_file, 'a') do |f|
+					f.puts "worker_process_started: forked=#{forked}\n"
+				end
+			end
+			::File.open(history_file, 'a') do |f|
+				f.puts "end of startup file\n"
+			end
+		})
+		result = start
+		result[:status].should == "Ready"
+		File.read("#{@stub.app_root}/history.txt").should ==
+			"end of startup file\n" +
+			"worker_process_started: forked=false\n"
+	end
+end if TEST_CLASSIC_RAILS
+
+end # module PhusionPassenger
diff --git a/test/ruby/classic_rails/preloader_spec.rb b/test/ruby/classic_rails/preloader_spec.rb
new file mode 100644
index 0000000..8767899
--- /dev/null
+++ b/test/ruby/classic_rails/preloader_spec.rb
@@ -0,0 +1,53 @@
+require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'ruby/shared/loader_sharedspec'
+require 'ruby/shared/ruby_loader_sharedspec'
+require 'ruby/shared/rails/analytics_logging_extensions_sharedspec'
+
+module PhusionPassenger
+
+describe "Classic Rails 2.3 preloader" do
+	include LoaderSpecHelper
+
+	before :each do
+		@stub = register_stub(ClassicRailsStub.new("rails2.3"))
+	end
+
+	def start(options = {})
+		@preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/classic-rails-preloader.rb"], @stub.app_root)
+		result = @preloader.start(options)
+		if result[:status] == "Ready"
+			@loader = @preloader.spawn(options)
+			return @loader.start(options)
+		else
+			return result
+		end
+	end
+
+	def rails_version
+		return "2.3"
+	end
+
+	it_should_behave_like "a loader"
+	it_should_behave_like "a Ruby loader"
+
+	it "calls the starting_worker_process event with forked=true" do
+		File.prepend(@stub.environment_rb, %q{
+			history_file = "history.txt"
+			PhusionPassenger.on_event(:starting_worker_process) do |forked|
+				::File.open(history_file, 'a') do |f|
+					f.puts "worker_process_started: forked=#{forked}\n"
+				end
+			end
+			::File.open(history_file, 'a') do |f|
+				f.puts "end of startup file\n"
+			end
+		})
+		result = start
+		result[:status].should == "Ready"
+		File.read("#{@stub.app_root}/history.txt").should ==
+			"end of startup file\n" +
+			"worker_process_started: forked=true\n"
+	end
+end if TEST_CLASSIC_RAILS
+
+end # module PhusionPassenger
diff --git a/test/ruby/rack/application_spawner_spec.rb b/test/ruby/rack/application_spawner_spec.rb
deleted file mode 100644
index 7da120a..0000000
--- a/test/ruby/rack/application_spawner_spec.rb
+++ /dev/null
@@ -1,116 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
-require 'phusion_passenger/rack/application_spawner'
-
-require 'ruby/shared/abstract_server_spec'
-require 'ruby/shared/spawners/spawn_server_spec'
-require 'ruby/shared/spawners/spawner_spec'
-require 'ruby/shared/spawners/preloading_spawner_spec'
-require 'ruby/shared/spawners/non_preloading_spawner_spec'
-require 'ruby/shared/rails/analytics_logging_extensions_spec'
-
-module PhusionPassenger
-
-describe Rack::ApplicationSpawner do
-	include SpawnerSpecHelper
-	
-	after :each do
-		@spawner.stop if @spawner && @spawner.started?
-	end
-	
-	describe "conservative spawning" do
-		def spawn_some_application(extra_options = {})
-			stub = register_stub(RackStub.new('rack'))
-			yield stub if block_given?
-			
-			defaults = {
-				"app_root"     => stub.app_root,
-				"default_user" => CONFIG['default_user']
-			}
-			options = defaults.merge(extra_options)
-			app = Rack::ApplicationSpawner.spawn_application(options)
-			return register_app(app)
-		end
-		
-		it_should_behave_like "a spawner"
-		it_should_behave_like "a spawner that does not preload app code"
-		
-		describe_rails_versions('>= 3.0') do
-			def spawn_some_application(extra_options = {})
-				stub = register_stub(RailsStub.new("#{rails_version}/empty"))
-				yield stub if block_given?
-				
-				defaults = {
-					"app_root"     => stub.app_root,
-					"default_user" => CONFIG['default_user']
-				}
-				options = defaults.merge(extra_options)
-				app = Rack::ApplicationSpawner.spawn_application(options)
-				return register_app(app)
-			end
-			
-			include_shared_example_group "analytics logging extensions for Rails"
-		end
-	end
-	
-	describe "smart spawning" do
-		def server
-			return spawner
-		end
-		
-		def spawner
-			@spawner ||= begin
-				stub = register_stub(RackStub.new("rack"))
-				spawner = Rack::ApplicationSpawner.new("app_root" => stub.app_root)
-				spawner.start
-				spawner
-			end
-		end
-		
-		def spawn_some_application(extra_options = {})
-			stub = register_stub(RackStub.new('rack'))
-			yield stub if block_given?
-			
-			defaults = {
-				"app_root"     => stub.app_root,
-				"default_user" => CONFIG['default_user']
-			}
-			options = defaults.merge(extra_options)
-			@spawner ||= begin
-				spawner = Rack::ApplicationSpawner.new(options)
-				spawner.start
-				spawner
-			end
-			app = @spawner.spawn_application(options)
-			return register_app(app)
-		end
-		
-		it_should_behave_like "an AbstractServer"
-		it_should_behave_like "a spawn server"
-		it_should_behave_like "a spawner"
-		it_should_behave_like "a spawner that preloads app code"
-		
-		describe_rails_versions('>= 3.0') do
-			def spawn_some_application(extra_options = {})
-				stub = register_stub(RailsStub.new("#{rails_version}/empty"))
-				yield stub if block_given?
-
-				defaults = {
-					"app_root"     => stub.app_root,
-					"default_user" => CONFIG['default_user']
-				}
-				options = defaults.merge(extra_options)
-				@spawner ||= begin
-					spawner = Rack::ApplicationSpawner.new(options)
-					spawner.start
-					spawner
-				end
-				app = @spawner.spawn_application(options)
-				return register_app(app)
-			end
-			
-			include_shared_example_group "analytics logging extensions for Rails"
-		end
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/rack/loader_spec.rb b/test/ruby/rack/loader_spec.rb
new file mode 100644
index 0000000..0e29e5c
--- /dev/null
+++ b/test/ruby/rack/loader_spec.rb
@@ -0,0 +1,42 @@
+require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'ruby/shared/loader_sharedspec'
+require 'ruby/shared/ruby_loader_sharedspec'
+
+module PhusionPassenger
+
+describe "Rack loader" do
+	include LoaderSpecHelper
+
+	before :each do
+		@stub = register_stub(RackStub.new("rack"))
+	end
+
+	def start(options = {})
+		@loader = Loader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-loader.rb"], @stub.app_root)
+		return @loader.start(options)
+	end
+
+	it_should_behave_like "a loader"
+	it_should_behave_like "a Ruby loader"
+
+	it "calls the starting_worker_process event with forked=false" do
+		File.prepend(@stub.startup_file, %q{
+			history_file = "history.txt"
+			PhusionPassenger.on_event(:starting_worker_process) do |forked|
+				::File.open(history_file, 'a') do |f|
+					f.puts "worker_process_started: forked=#{forked}\n"
+				end
+			end
+			::File.open(history_file, 'a') do |f|
+				f.puts "end of startup file\n"
+			end
+		})
+		result = start
+		result[:status].should == "Ready"
+		File.read("#{@stub.app_root}/history.txt").should ==
+			"end of startup file\n" +
+			"worker_process_started: forked=false\n"
+	end
+end
+
+end # module PhusionPassenger
diff --git a/test/ruby/rack/preloader_spec.rb b/test/ruby/rack/preloader_spec.rb
new file mode 100644
index 0000000..23e4e46
--- /dev/null
+++ b/test/ruby/rack/preloader_spec.rb
@@ -0,0 +1,48 @@
+require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'ruby/shared/loader_sharedspec'
+require 'ruby/shared/ruby_loader_sharedspec'
+
+module PhusionPassenger
+
+describe "Rack preloader" do
+	include LoaderSpecHelper
+
+	before :each do
+		@stub = register_stub(RackStub.new("rack"))
+	end
+
+	def start(options = {})
+		@preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-preloader.rb"], @stub.app_root)
+		result = @preloader.start(options)
+		if result[:status] == "Ready"
+			@loader = @preloader.spawn(options)
+			return @loader.start(options)
+		else
+			return result
+		end
+	end
+
+	it_should_behave_like "a loader"
+	it_should_behave_like "a Ruby loader"
+
+	it "calls the starting_worker_process event with forked=true" do
+		File.prepend(@stub.startup_file, %q{
+			history_file = "history.txt"
+			PhusionPassenger.on_event(:starting_worker_process) do |forked|
+				::File.open(history_file, 'a') do |f|
+					f.puts "worker_process_started: forked=#{forked}\n"
+				end
+			end
+			::File.open(history_file, 'a') do |f|
+				f.puts "end of startup file\n"
+			end
+		})
+		result = start
+		result[:status].should == "Ready"
+		File.read("#{@stub.app_root}/history.txt").should ==
+			"end of startup file\n" +
+			"worker_process_started: forked=true\n"
+	end
+end
+
+end # module PhusionPassenger
diff --git a/test/ruby/rails3.0/loader_spec.rb b/test/ruby/rails3.0/loader_spec.rb
new file mode 100644
index 0000000..98e5456
--- /dev/null
+++ b/test/ruby/rails3.0/loader_spec.rb
@@ -0,0 +1,26 @@
+require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'ruby/shared/loader_sharedspec'
+require 'ruby/shared/rails/analytics_logging_extensions_sharedspec'
+
+module PhusionPassenger
+
+describe "Rack loader with Rails 3.0" do
+	include LoaderSpecHelper
+
+	before :each do
+		@stub = register_stub(RackStub.new("rails3.0"))
+	end
+
+	def start(options = {})
+		@loader = Loader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-loader.rb"], @stub.app_root)
+		return @loader.start(options)
+	end
+
+	def rails_version
+		return "3.0"
+	end
+
+	include_examples "analytics logging extensions for Rails"
+end
+
+end # module PhusionPassenger
diff --git a/test/ruby/rails3.0/preloader_spec.rb b/test/ruby/rails3.0/preloader_spec.rb
new file mode 100644
index 0000000..47fe747
--- /dev/null
+++ b/test/ruby/rails3.0/preloader_spec.rb
@@ -0,0 +1,32 @@
+require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'ruby/shared/loader_sharedspec'
+require 'ruby/shared/rails/analytics_logging_extensions_sharedspec'
+
+module PhusionPassenger
+
+describe "Rack loader with Rails 3.0" do
+	include LoaderSpecHelper
+
+	before :each do
+		@stub = register_stub(RackStub.new("rails3.0"))
+	end
+
+	def start(options = {})
+		@preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-preloader.rb"], @stub.app_root)
+		result = @preloader.start(options)
+		if result[:status] == "Ready"
+			@loader = @preloader.spawn(options)
+			return @loader.start(options)
+		else
+			return result
+		end
+	end
+
+	def rails_version
+		return "3.0"
+	end
+
+	include_examples "analytics logging extensions for Rails"
+end
+
+end # module PhusionPassenger
diff --git a/test/ruby/rails3.1/loader_spec.rb b/test/ruby/rails3.1/loader_spec.rb
new file mode 100644
index 0000000..c981916
--- /dev/null
+++ b/test/ruby/rails3.1/loader_spec.rb
@@ -0,0 +1,26 @@
+require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'ruby/shared/loader_sharedspec'
+require 'ruby/shared/rails/analytics_logging_extensions_sharedspec'
+
+module PhusionPassenger
+
+describe "Rack loader with Rails 3.1" do
+	include LoaderSpecHelper
+
+	before :each do
+		@stub = register_stub(RackStub.new("rails3.1"))
+	end
+
+	def start(options = {})
+		@loader = Loader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-loader.rb"], @stub.app_root)
+		return @loader.start(options)
+	end
+
+	def rails_version
+		return "3.1"
+	end
+
+	include_examples "analytics logging extensions for Rails"
+end
+
+end # module PhusionPassenger
diff --git a/test/ruby/rails3.1/preloader_spec.rb b/test/ruby/rails3.1/preloader_spec.rb
new file mode 100644
index 0000000..1ff28f3
--- /dev/null
+++ b/test/ruby/rails3.1/preloader_spec.rb
@@ -0,0 +1,32 @@
+require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'ruby/shared/loader_sharedspec'
+require 'ruby/shared/rails/analytics_logging_extensions_sharedspec'
+
+module PhusionPassenger
+
+describe "Rack loader with Rails 3.1" do
+	include LoaderSpecHelper
+
+	before :each do
+		@stub = register_stub(RackStub.new("rails3.1"))
+	end
+
+	def start(options = {})
+		@preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-preloader.rb"], @stub.app_root)
+		result = @preloader.start(options)
+		if result[:status] == "Ready"
+			@loader = @preloader.spawn(options)
+			return @loader.start(options)
+		else
+			return result
+		end
+	end
+
+	def rails_version
+		return "3.1"
+	end
+
+	include_examples "analytics logging extensions for Rails"
+end
+
+end # module PhusionPassenger
diff --git a/test/ruby/rails3.2/loader_spec.rb b/test/ruby/rails3.2/loader_spec.rb
new file mode 100644
index 0000000..4c20e88
--- /dev/null
+++ b/test/ruby/rails3.2/loader_spec.rb
@@ -0,0 +1,26 @@
+require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'ruby/shared/loader_sharedspec'
+require 'ruby/shared/rails/analytics_logging_extensions_sharedspec'
+
+module PhusionPassenger
+
+describe "Rack loader with Rails 3.2" do
+	include LoaderSpecHelper
+
+	before :each do
+		@stub = register_stub(RackStub.new("rails3.2"))
+	end
+
+	def start(options = {})
+		@loader = Loader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-loader.rb"], @stub.app_root)
+		return @loader.start(options)
+	end
+
+	def rails_version
+		return "3.2"
+	end
+
+	include_examples "analytics logging extensions for Rails"
+end
+
+end # module PhusionPassenger
diff --git a/test/ruby/rails3.2/preloader_spec.rb b/test/ruby/rails3.2/preloader_spec.rb
new file mode 100644
index 0000000..737e6ec
--- /dev/null
+++ b/test/ruby/rails3.2/preloader_spec.rb
@@ -0,0 +1,32 @@
+require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'ruby/shared/loader_sharedspec'
+require 'ruby/shared/rails/analytics_logging_extensions_sharedspec'
+
+module PhusionPassenger
+
+describe "Rack loader with Rails 3.2" do
+	include LoaderSpecHelper
+
+	before :each do
+		@stub = register_stub(RackStub.new("rails3.2"))
+	end
+
+	def start(options = {})
+		@preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-preloader.rb"], @stub.app_root)
+		result = @preloader.start(options)
+		if result[:status] == "Ready"
+			@loader = @preloader.spawn(options)
+			return @loader.start(options)
+		else
+			return result
+		end
+	end
+
+	def rails_version
+		return "3.2"
+	end
+
+	include_examples "analytics logging extensions for Rails"
+end
+
+end # module PhusionPassenger
diff --git a/test/ruby/request_handler_spec.rb b/test/ruby/request_handler_spec.rb
new file mode 100644
index 0000000..fe7afd1
--- /dev/null
+++ b/test/ruby/request_handler_spec.rb
@@ -0,0 +1,667 @@
+require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'phusion_passenger/request_handler'
+require 'phusion_passenger/request_handler/thread_handler'
+require 'phusion_passenger/rack/thread_handler_extension'
+require 'phusion_passenger/analytics_logger'
+require 'phusion_passenger/utils'
+
+require 'fileutils'
+
+module PhusionPassenger
+
+describe RequestHandler do
+	class DummyThreadHandler < RequestHandler::ThreadHandler
+		def process_request(*args)
+			# Do nothing.
+		end
+	end
+
+	before :each do
+		preinitialize if respond_to?(:preinitialize)
+		@old_passenger_tmpdir = Utils.passenger_tmpdir
+		Utils.passenger_tmpdir = "request_handler_spec.tmp"
+		@owner_pipe = IO.pipe
+		@options ||= {}
+		@thread_handler = Class.new(DummyThreadHandler)
+		@options = {
+			"app_group_name" => "foobar",
+			"thread_handler" => @thread_handler
+		}.merge(@options)
+		@request_handler = RequestHandler.new(@owner_pipe[1], @options)
+	end
+	
+	after :each do
+		stop_request_handler
+		Utils.passenger_tmpdir = @old_passenger_tmpdir
+		FileUtils.chmod_R(0777, "request_handler_spec.tmp")
+		FileUtils.rm_rf("request_handler_spec.tmp")
+	end
+
+	def stop_request_handler
+		if @request_handler
+			@request_handler.cleanup
+			@owner_pipe[0].close rescue nil
+			@request_handler = nil
+		end
+	end
+	
+	def connect(socket_name = :main)
+		address = @request_handler.server_sockets[socket_name][:address]
+		return Utils.connect_to_server(address)
+	end
+	
+	def send_binary_request(socket, env)
+		channel = MessageChannel.new(socket)
+		data = ""
+		env.each_pair do |key, value|
+			data << key << "\0"
+			data << value << "\0"
+		end
+		channel.write_scalar(data)
+	end
+	
+	it "exits if the owner pipe is closed" do
+		@request_handler.start_main_loop_thread
+		@owner_pipe[0].close
+		eventually do
+			!@request_handler.main_loop_running?
+		end
+	end
+
+	it "creates a socket file in the Phusion Passenger temp folder, unless when using TCP sockets" do
+		if @request_handler.server_sockets[:main][1] == "unix"
+			File.chmod(0700, "request_handler_spec.tmp/backends")
+			Dir["request_handler_spec.tmp/backends/*"].should_not be_empty
+		end
+	end
+	
+	specify "the main socket rejects headers that are too large" do
+		stderr = StringIO.new
+		DebugLogging.log_level = 0
+		DebugLogging.stderr_evaluator = lambda { stderr }
+		@request_handler.start_main_loop_thread
+		begin
+			client = connect
+			client.sync = true
+			block = lambda do
+				data = "REQUEST_METHOD\0/"
+				data << "x" * (RequestHandler::ThreadHandler::MAX_HEADER_SIZE * 2)
+				data << "\0"
+				MessageChannel.new(client).write_scalar(data)
+			end
+			block.should raise_error(Errno::EPIPE)
+			stderr.string.should_not be_empty
+		ensure
+			client.close rescue nil
+		end
+	end
+	
+	specify "the main socket rejects unauthenticated connections, if a connect password is supplied" do
+		@request_handler.connect_password = "1234"
+		@request_handler.start_main_loop_thread
+		begin
+			client = connect
+			channel = MessageChannel.new(client)
+			channel.write_scalar("REQUEST_METHOD\0PING\0")
+			client.read.should == ""
+		ensure
+			client.close rescue nil
+		end
+		begin
+			client = connect
+			channel = MessageChannel.new(client)
+			channel.write_scalar("REQUEST_METHOD\0PING\0PASSENGER_CONNECT_PASSWORD\0001234\0")
+			client.read.should == "pong"
+		ensure
+			client.close rescue nil
+		end
+	end
+	
+	it "accepts pings on the main server socket" do
+		@request_handler.start_main_loop_thread
+		client = connect
+		begin
+			channel = MessageChannel.new(client)
+			channel.write_scalar("REQUEST_METHOD\0PING\0")
+			client.read.should == "pong"
+		ensure
+			client.close
+		end
+	end
+	
+	it "accepts pings on the HTTP server socket" do
+		@request_handler.start_main_loop_thread
+		client = connect(:http)
+		begin
+			client.write("PING / HTTP/1.1\r\n")
+			client.write("Host: foo.com\r\n\r\n")
+			client.close_write
+			client.read.should == "pong"
+		ensure
+			client.close
+		end
+	end
+	
+	specify "the HTTP socket rejects headers that are too large" do
+		stderr = StringIO.new
+		DebugLogging.log_level = 0
+		DebugLogging.stderr_evaluator = lambda { stderr }
+		@request_handler.start_main_loop_thread
+		begin
+			client = connect(:http)
+			client.sync = true
+			block = lambda do
+				client.write("GET /")
+				client.write("x" * RequestHandler::ThreadHandler::MAX_HEADER_SIZE)
+				sleep 0.01 # Context switch
+				client.write("x" * RequestHandler::ThreadHandler::MAX_HEADER_SIZE)
+				client.write(" HTTP/1.1\r\n")
+			end
+			block.should raise_error(SystemCallError)
+			stderr.string.should_not be_empty
+		ensure
+			client.close rescue nil
+		end
+	end
+	
+	specify "the HTTP socket rejects unauthenticated connections, if a connect password is supplied" do
+		DebugLogging.log_level = -1
+		@request_handler.connect_password = "1234"
+		@request_handler.start_main_loop_thread
+		begin
+			client = connect(:http)
+			client.write("PING / HTTP/1.1\r\n")
+			client.write("\r\n")
+			client.read.should == ""
+		ensure
+			client.close rescue nil
+		end
+		begin
+			client = connect(:http)
+			client.write("PING / HTTP/1.1\r\n")
+			client.write("X-Passenger-Connect-Password: 1234\r\n")
+			client.write("\r\n")
+			client.read.should == "pong"
+		ensure
+			client.close rescue nil
+		end
+	end
+
+	it "catches exceptions generated by the Rack application object" do
+		@options["thread_handler"] = Class.new(RequestHandler::ThreadHandler) do
+			include Rack::ThreadHandlerExtension
+		end
+
+		lambda_called = false
+
+		# Here we test that the exception is not propagated to outside the request handler.
+		DebugLogging.log_level = -2
+		@options["app"] = lambda do |env|
+			lambda_called = true
+			raise "an error"
+		end
+
+		@request_handler = RequestHandler.new(@owner_pipe[1], @options)
+		@request_handler.start_main_loop_thread
+		client = connect
+		begin
+			send_binary_request(client,
+				"REQUEST_METHOD" => "GET",
+				"PATH_INFO" => "/")
+			client.read
+		ensure
+			client.close
+		end
+
+		lambda_called.should == true
+	end
+
+	it "catches exceptions generated by the Rack body object" do
+		@options["thread_handler"] = Class.new(RequestHandler::ThreadHandler) do
+			include Rack::ThreadHandlerExtension
+		end
+
+		lambda_called = false
+
+		# Here we test that the exception is not propagated to outside the request handler.
+		DebugLogging.log_level = -2
+		@options["app"] = lambda do |env|
+			lambda_called = true
+			body = Object.new
+			def body.each
+				raise "an error"
+			end
+			[200, { "Content-Type" => "text/plain" }, body]
+		end
+
+		@request_handler = RequestHandler.new(@owner_pipe[1], @options)
+		@request_handler.start_main_loop_thread
+		client = connect
+		begin
+			send_binary_request(client,
+				"REQUEST_METHOD" => "GET",
+				"PATH_INFO" => "/")
+			client.read
+		ensure
+			client.close
+		end
+
+		lambda_called.should == true
+	end
+
+	it "allows the application to take over the socket completely through the full hijack API" do
+		@options["thread_handler"] = Class.new(RequestHandler::ThreadHandler) do
+			include Rack::ThreadHandlerExtension
+		end
+
+		lambda_called = false
+
+		@options["app"] = lambda do |env|
+			lambda_called = true
+			env['rack.hijack?'].should be_true
+			env['rack.hijack_io'].should be_nil
+			env['rack.hijack'].call
+			Thread.new do
+				Thread.current.abort_on_exception = true
+				sleep 0.1
+				env['rack.hijack_io'].write("Hijacked response!")
+				env['rack.hijack_io'].close
+			end
+		end
+
+		@request_handler = RequestHandler.new(@owner_pipe[1], @options)
+		@request_handler.start_main_loop_thread
+		client = connect
+		begin
+			send_binary_request(client,
+				"REQUEST_METHOD" => "GET",
+				"PATH_INFO" => "/")
+			sleep 0.1 # Give it some time to handle the request.
+			stop_request_handler
+			client.read.should == "Hijacked response!"
+		ensure
+			client.close
+		end
+
+		lambda_called.should == true
+	end
+
+	it "allows the application to take over the socket after sending headers through the partial hijack API" do
+		@options["thread_handler"] = Class.new(RequestHandler::ThreadHandler) do
+			include Rack::ThreadHandlerExtension
+		end
+
+		lambda_called = false
+		hijack_callback_called = false
+
+		@options["app"] = lambda do |env|
+			lambda_called = true
+			env['rack.hijack?'].should be_true
+			env['rack.hijack_io'].should be_nil
+			hijack_callback = lambda do |socket|
+				hijack_callback_called = true
+				env['rack.hijack_io'].should_not be_nil
+				env['rack.hijack_io'].should == socket
+				socket.write("Hijacked partial response!")
+				socket.close
+			end
+			[200, { 'Content-Type' => 'text/html', 'rack.hijack' => hijack_callback }]
+		end
+
+		@request_handler = RequestHandler.new(@owner_pipe[1], @options)
+		@request_handler.start_main_loop_thread
+		client = connect
+		begin
+			send_binary_request(client,
+				"REQUEST_METHOD" => "GET",
+				"PATH_INFO" => "/")
+			client.read.should ==
+				"Status: 200\r\n" +
+				"Content-Type: text/html\r\n" +
+				"\r\n" +
+				"Hijacked partial response!"
+		ensure
+			client.close
+		end
+
+		lambda_called.should == true
+		hijack_callback_called.should == true
+	end
+
+	describe "on GET requests that may have a body" do
+		before :each do
+			@options["thread_handler"] = Class.new(RequestHandler::ThreadHandler) do
+				include Rack::ThreadHandlerExtension
+			end
+		end
+
+		it "allows reading from the client socket" do
+			lambda_called = false
+
+			@options["app"] = lambda do |env|
+				lambda_called = true
+				env['rack.input'].read(3).should == "abc"
+				[200, {}, ["ok"]]
+			end
+
+			@request_handler = RequestHandler.new(@owner_pipe[1], @options)
+			@request_handler.start_main_loop_thread
+			client = connect
+			begin
+				send_binary_request(client,
+					"REQUEST_METHOD" => "GET",
+					"PATH_INFO" => "/",
+					"CONTENT_LENGTH" => "3")
+				client.write("abc")
+				client.close_write
+				client.read.should ==
+					"Status: 200\r\n" +
+					"\r\n" +
+					"ok"
+			ensure
+				client.close
+			end
+
+			lambda_called.should be_true
+		end
+	end
+
+	describe "on GET requests that are not supposed to have a body" do
+		before :each do
+			@options["thread_handler"] = Class.new(RequestHandler::ThreadHandler) do
+				include Rack::ThreadHandlerExtension
+			end
+		end
+
+		it "disallows reading from the client socket" do
+			lambda_called = false
+
+			@options["app"] = lambda do |env|
+				lambda_called = true
+				env['rack.input'].read(1).should be_nil
+				env['rack.input'].gets.should be_nil
+				[200, {}, ["ok"]]
+			end
+
+			@request_handler = RequestHandler.new(@owner_pipe[1], @options)
+			@request_handler.start_main_loop_thread
+			client = connect
+			begin
+				send_binary_request(client,
+					"REQUEST_METHOD" => "GET",
+					"PATH_INFO" => "/")
+				client.close_write
+				client.read.should ==
+					"Status: 200\r\n" +
+					"\r\n" +
+					"ok"
+			ensure
+				client.close
+			end
+
+			lambda_called.should be_true
+		end
+
+		it "allows reading from the client socket once the socket has been fully hijacked" do
+			lambda_called = false
+
+			@options["app"] = lambda do |env|
+				lambda_called = true
+				env['rack.hijack'].call
+				io = env['rack.hijack_io']
+				begin
+					io.read.should == "hi"
+					io.write("ok")
+				ensure
+					io.close
+				end
+			end
+
+			@request_handler = RequestHandler.new(@owner_pipe[1], @options)
+			@request_handler.start_main_loop_thread
+			client = connect
+			begin
+				send_binary_request(client,
+					"REQUEST_METHOD" => "GET",
+					"PATH_INFO" => "/")
+				client.write("hi")
+				client.close_write
+				client.read.should == "ok"
+			ensure
+				client.close
+			end
+
+			lambda_called.should be_true
+		end
+
+		it "allows reading from the client socket once the socket has been partially hijacked" do
+			lambda_called = false
+
+			@options["app"] = lambda do |env|
+				block = lambda do |io|
+					lambda_called = true
+					begin
+						io.read.should == "hi"
+						io.write("ok")
+					ensure
+						io.close
+					end
+				end
+				headers = { 'rack.hijack' => block }
+				[200, headers, []]
+			end
+
+			@request_handler = RequestHandler.new(@owner_pipe[1], @options)
+			@request_handler.start_main_loop_thread
+			client = connect
+			begin
+				send_binary_request(client,
+					"REQUEST_METHOD" => "GET",
+					"PATH_INFO" => "/")
+				client.write("hi")
+				client.close_write
+				client.read.should ==
+					"Status: 200\r\n" +
+					"\r\n" +
+					"ok"
+			ensure
+				client.close
+			end
+
+			lambda_called.should be_true
+		end
+	end
+
+	describe "if analytics logger is given" do
+		def preinitialize
+			if @agent_pid
+				Process.kill('KILL', @agent_pid)
+				Process.waitpid(@agent_pid)
+			end
+			@dump_file = "#{Utils.passenger_tmpdir}/log.txt"
+			@logging_agent_password = "1234"
+			@agent_pid, @socket_filename, @socket_address = spawn_logging_agent(@dump_file,
+				@logging_agent_password)
+			
+			@logger = AnalyticsLogger.new(@socket_address, "logging",
+				"1234", "localhost")
+			@options = { "analytics_logger" => @logger }
+		end
+		
+		after :each do
+			if @agent_pid
+				Process.kill('KILL', @agent_pid)
+				Process.waitpid(@agent_pid)
+			end
+		end
+		
+		def base64(data)
+			return [data].pack('m').gsub("\n", "")
+		end
+		
+		it "makes the analytics log object available through the request env and a thread-local variable" do
+			header_value = nil
+			thread_value = nil
+			@thread_handler.any_instance.should_receive(:process_request).and_return do |headers, connection, full_http_response|
+				header_value = headers[PASSENGER_ANALYTICS_WEB_LOG]
+				thread_value = Thread.current[PASSENGER_ANALYTICS_WEB_LOG]
+			end
+			@request_handler.start_main_loop_thread
+			client = connect
+			begin
+				send_binary_request(client,
+					"REQUEST_METHOD" => "GET",
+					"PASSENGER_TXN_ID" => "1234-abcd",
+					"PASSENGER_GROUP_NAME" => "foobar")
+				client.read
+			ensure
+				client.close
+			end
+			header_value.should be_kind_of(AnalyticsLogger::Log)
+			thread_value.should be_kind_of(AnalyticsLogger::Log)
+			header_value.should == thread_value
+		end
+		
+		it "logs uncaught exceptions for requests that have a transaction ID" do
+			reraised = false
+			@thread_handler.any_instance.should_receive(:process_request).and_return do |headers, connection, full_http_response|
+				raise "something went wrong"
+			end
+			@thread_handler.any_instance.stub(:should_reraise_error?).and_return do |e|
+				reraised = true
+				e.message != "something went wrong"
+			end
+			@request_handler.start_main_loop_thread
+			client = connect
+			begin
+				DebugLogging.log_level = -2
+				send_binary_request(client,
+					"REQUEST_METHOD" => "GET",
+					"PASSENGER_TXN_ID" => "1234-abcd")
+			ensure
+				client.close
+			end
+			eventually(5) do
+				flush_logging_agent(@logging_agent_password, @socket_address)
+				if File.exist?(@dump_file)
+					log_data = File.read(@dump_file)
+				else
+					log_data = ""
+				end
+				log_data.include?("Request transaction ID: 1234-abcd\n") &&
+					log_data.include?("Message: " + base64("something went wrong")) &&
+					log_data.include?("Class: RuntimeError") &&
+					log_data.include?("Backtrace: ")
+			end
+			reraised.should be_true
+		end
+	end
+	
+	describe "HTTP parsing" do
+		before :each do
+			@request_handler.start_main_loop_thread
+			@client = connect(:http)
+			@client.sync = true
+		end
+		
+		after :each do
+			@client.close if @client
+		end
+		
+		it "correctly parses HTTP requests without query string" do
+			@thread_handler.any_instance.should_receive(:process_request).and_return do |headers, connection, full_http_response|
+				headers["REQUEST_METHOD"].should == "POST"
+				headers["SERVER_PROTOCOL"].should == "HTTP/1.1"
+				headers["HTTP_HOST"].should == "foo.com"
+				headers["HTTP_X_FOO_BAR"].should == "baz"
+				headers["PATH_INFO"].should == "/foo/bar"
+				headers["SCRIPT_NAME"].should == ""
+				headers["QUERY_STRING"].should == ""
+				headers["REQUEST_URI"].should == "/foo/bar"
+				headers["HTTP_CONTENT_LENGTH"].should be_nil
+				headers["HTTP_CONTENT_TYPE"].should be_nil
+				headers["CONTENT_LENGTH"].should == "10"
+				headers["CONTENT_TYPE"].should == "text/plain"
+			end
+			
+			@client.write("POST /foo/bar HTTP/1.1\r\n")
+			@client.write("Host: foo.com\r\n")
+			@client.write("X-Foo-Bar: baz\r\n")
+			@client.write("Content-Length: 10\r\n")
+			@client.write("Content-Type: text/plain\r\n")
+			@client.write("\r\n")
+			@client.close_write
+			@client.read
+		end
+		
+		it "correctly parses HTTP requests with query string" do
+			@thread_handler.any_instance.should_receive(:process_request).and_return do |headers, connection, full_http_response|
+				headers["REQUEST_METHOD"].should == "POST"
+				headers["SERVER_PROTOCOL"].should == "HTTP/1.1"
+				headers["HTTP_HOST"].should == "foo.com"
+				headers["HTTP_X_FOO_BAR"].should == "baz"
+				headers["PATH_INFO"].should == "/foo/bar"
+				headers["SCRIPT_NAME"].should == ""
+				headers["QUERY_STRING"].should == "hello=world&a=b+c"
+				headers["REQUEST_URI"].should == "/foo/bar?hello=world&a=b+c"
+				headers["HTTP_CONTENT_LENGTH"].should be_nil
+				headers["HTTP_CONTENT_TYPE"].should be_nil
+				headers["CONTENT_LENGTH"].should == "10"
+				headers["CONTENT_TYPE"].should == "text/plain"
+			end
+			
+			@client.write("POST /foo/bar?hello=world&a=b+c HTTP/1.1\r\n")
+			@client.write("Host: foo.com\r\n")
+			@client.write("X-Foo-Bar: baz\r\n")
+			@client.write("Content-Length: 10\r\n")
+			@client.write("Content-Type: text/plain\r\n")
+			@client.write("\r\n")
+			@client.close_write
+			@client.read
+		end
+		
+		it "correct parses HTTP requests that come in arbitrary chunks" do
+			@thread_handler.any_instance.should_receive(:process_request).and_return do |headers, connection, full_http_response|
+				headers["REQUEST_METHOD"].should == "POST"
+				headers["SERVER_PROTOCOL"].should == "HTTP/1.1"
+				headers["HTTP_HOST"].should == "foo.com"
+				headers["HTTP_X_FOO_BAR"].should == "baz"
+				headers["PATH_INFO"].should == "/foo/bar"
+				headers["SCRIPT_NAME"].should == ""
+				headers["QUERY_STRING"].should == "hello=world&a=b+c"
+				headers["REQUEST_URI"].should == "/foo/bar?hello=world&a=b+c"
+				headers["HTTP_CONTENT_LENGTH"].should be_nil
+				headers["HTTP_CONTENT_TYPE"].should be_nil
+				headers["CONTENT_LENGTH"].should == "10"
+				headers["CONTENT_TYPE"].should == "text/plain"
+				headers["HTTP_PLUS_SOME"].should be_nil
+			end
+			
+			@client.write("POST /fo")
+			sleep 0.001
+			@client.write("o/bar?hello=world&a=b+c HT")
+			sleep 0.001
+			@client.write("TP/1.1\r")
+			sleep 0.001
+			@client.write("\nHost: foo.com")
+			sleep 0.001
+			@client.write("\r\n")
+			sleep 0.001
+			@client.write("X-Foo-Bar: baz\r\n")
+			sleep 0.001
+			@client.write("Content-Len")
+			sleep 0.001
+			@client.write("gth: 10\r\nContent-Type: text/pla")
+			sleep 0.001
+			@client.write("in\r\n\r")
+			sleep 0.001
+			@client.write("\nPlus-Some: garbage data that should be ignored.")
+			@client.close_write
+			@client.read
+		end
+	end
+	
+	############################
+end
+
+end # module PhusionPassenger
diff --git a/test/ruby/shared/abstract_server_spec.rb b/test/ruby/shared/abstract_server_spec.rb
deleted file mode 100644
index 673258c..0000000
--- a/test/ruby/shared/abstract_server_spec.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
-
-module PhusionPassenger
-
-shared_examples_for "an AbstractServer" do
-	it "doesn't crash if it's started and stopped multiple times" do
-		3.times do
-			# Give the server some time to install the
-			# signal handlers. If we don't give it enough
-			# time, it will raise an ugly exception when
-			# we send it a signal.
-			sleep 0.1
-			server.stop
-			server.start
-		end
-	end
-	
-	it "raises a ServerAlreadyStarted if the server is already started" do
-		lambda { server.start }.should raise_error(AbstractServer::ServerAlreadyStarted)
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/shared/loader_sharedspec.rb b/test/ruby/shared/loader_sharedspec.rb
new file mode 100644
index 0000000..1ea7e3d
--- /dev/null
+++ b/test/ruby/shared/loader_sharedspec.rb
@@ -0,0 +1,246 @@
+require 'socket'
+require 'phusion_passenger/utils'
+require 'phusion_passenger/message_channel'
+
+module PhusionPassenger
+
+class Loader
+	attr_reader :pid, :input, :output, :sockets
+
+	def initialize(command, app_root)
+		@app_root = app_root
+		a, input = UNIXSocket.pair
+		c, output = UNIXSocket.pair
+		@pid = pid = fork do
+			STDIN.reopen(a)
+			STDOUT.reopen(c)
+			input.close
+			output.close
+			Dir.chdir(app_root)
+			ENV['RAILS_ENV'] = ENV['RACK_ENV'] = ENV['PASSENGER_ENV'] = 'production'
+			exec(*command)
+		end
+		a.close
+		c.close
+		@input = input
+		@output = output
+		@sockets = {}
+	end
+
+	def self.new_with_sockets(input, output, app_root)
+		result = allocate
+		result.instance_variable_set(:@input, input)
+		result.instance_variable_set(:@output, output)
+		result.instance_variable_set(:@app_root, app_root)
+		result.instance_variable_set(:@sockets, {})
+		return result
+	end
+
+	def close
+		@input.close_write
+		# Wait at most 100 msec for process to exit.
+		select([@output], nil, nil, 0.1)
+
+		@input.close if !@input.closed?
+		@output.close if !@output.closed?
+		if @pid
+			begin
+				Process.kill('TERM', @pid)
+			rescue Errno::ESRCH
+			end
+			begin
+				Process.waitpid(@pid)
+			rescue Errno::ECHILD
+			end
+		end
+	end
+
+	def start(options = {})
+		init_message = read_response_line
+		if init_message != "I have control 1.0\n"
+			raise "Unknown response initialization message: #{init_message.inspect}"
+		end
+		write_request_line "You have control 1.0"
+		write_start_request(options)
+		return process_response
+	end
+
+	def connect_and_send_request(headers)
+		socket = Utils.connect_to_server(sockets["main"][:address])
+		channel = MessageChannel.new(socket)
+		data = ""
+		headers["REQUEST_METHOD"] ||= "GET"
+		headers["REQUEST_URI"] ||= headers["PATH_INFO"]
+		headers["QUERY_STRING"] ||= ""
+		headers["SCRIPT_NAME"] ||= ""
+		headers.each_pair do |key, value|
+			data << "#{key}\0#{value}\0"
+		end
+		channel.write_scalar(data)
+		return socket
+	end
+
+private
+	def write_request_line(line = "")
+		STDERR.puts "---> #{line}" if DEBUG
+		@input.puts line
+	end
+
+	def read_response_line
+		while true
+			line = @output.readline
+			STDERR.puts "<--- #{line.strip}" if DEBUG
+			if line.start_with?("!> ")
+				line.sub!(/^\!> /, '')
+				return line
+			end
+		end
+	end
+
+	def write_start_request(options)
+		write_request_line "passenger_root: #{PhusionPassenger.source_root}"
+		write_request_line "ruby_libdir: #{PhusionPassenger.ruby_libdir}"
+		write_request_line "generation_dir: #{Utils.passenger_tmpdir}"
+		write_request_line "log_level: 3" if DEBUG
+		options.each_pair do |key, value|
+			write_request_line "#{key}: #{value}"
+		end
+		write_request_line
+	end
+
+	def process_response
+		status = read_response_line
+
+		headers = {}
+		line = read_response_line
+		while line != "\n"
+			key, value = line.strip.split(/ *: */, 2)
+			if key == "socket"
+				process_socket(value)
+			else
+				headers[key] = value
+			end
+			line = read_response_line
+		end
+
+		if status == "Error\n"
+			body = @output.read
+			STDERR.puts "<--- #{body}" if DEBUG
+		end
+
+		return { :status => status.strip, :headers => headers, :body => body }
+	end
+
+	def process_socket(spec)
+		name, address, protocol, concurrency = spec.split(';')
+		@sockets[name] = { :address => address, :protocol => protocol, :concurrency => concurrency }
+	end
+end
+
+class Preloader < Loader
+	def spawn(options = {})
+		socket = Utils.connect_to_server(sockets["spawn"])
+		loader = Loader.new_with_sockets(socket, socket.dup, @app_root)
+		begin
+			loader.send(:write_request_line, "spawn")
+			loader.send(:write_start_request, options)
+			
+			line = loader.output.readline
+			puts "<--- #{line.strip}" if DEBUG
+			if line != "OK\n"
+				raise "Unexpected spawn response status #{line.inspect}"
+			end
+
+			line = loader.output.readline
+			puts "<--- #{line.strip}" if DEBUG
+			loader.instance_variable_set(:@pid, line.to_i)
+
+			return loader
+		rescue
+			loader.close
+			raise
+		end
+	end
+
+private
+	def process_socket(spec)
+		sockets["spawn"] = spec
+	end
+end
+
+module LoaderSpecHelper
+	def self.included(klass)
+		klass.before(:each) do
+			@stubs = []
+		end
+		
+		klass.after(:each) do
+			begin
+				@loader.close if @loader
+				@preloader.close if @preloader
+			ensure
+				@stubs.each do |stub|
+					stub.destroy
+				end
+			end
+		end
+	end
+	
+	def before_start(code)
+		@before_start = code
+	end
+	
+	def after_start(code)
+		@after_start = code
+	end
+	
+	def register_stub(stub)
+		@stubs << stub
+		File.prepend(stub.startup_file, "#{@before_start}\n")
+		File.append(stub.startup_file, "\n#{@after_start}")
+		return stub
+	end
+	
+	def register_app(app)
+		@apps << app
+		return app
+	end
+
+	def start!(options = {})
+		result = start(options)
+		if result[:status] != "Ready"
+			raise "Loader failed to start; error page:\n#{result[:body]}"
+		end
+	end
+
+	def perform_request(headers)
+		socket = @loader.connect_and_send_request(headers)
+		headers = {}
+		line = socket.readline
+		while line != "\r\n"
+			key, value = line.strip.split(/ *: */, 2)
+			headers[key] = value
+			line = socket.readline
+		end
+		body = socket.read
+		socket.close
+		return [headers, body]
+	end
+end
+
+shared_examples_for "a loader" do
+	it "works" do
+		result = start
+		result[:status].should == "Ready"
+		headers, body = perform_request(
+			"REQUEST_METHOD" => "GET",
+			"PATH_INFO" => "/hello",
+			# For Rails 2
+			"REQUEST_URI" => "/hello"
+		)
+		headers["Status"].should == "200"
+		body.should == "hello world"
+	end
+end
+
+end # module PhusionPassenger
diff --git a/test/ruby/shared/rails/analytics_logging_extensions_sharedspec.rb b/test/ruby/shared/rails/analytics_logging_extensions_sharedspec.rb
new file mode 100644
index 0000000..7d6b5fe
--- /dev/null
+++ b/test/ruby/shared/rails/analytics_logging_extensions_sharedspec.rb
@@ -0,0 +1,333 @@
+require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
+require 'socket'
+require 'fileutils'
+require 'phusion_passenger/analytics_logger'
+require 'phusion_passenger/utils/tmpdir'
+
+module PhusionPassenger
+
+shared_examples_for "analytics logging extensions for Rails" do
+	before :each do
+		@logging_agent_password = "1234"
+		@dump_file = "#{Utils.passenger_tmpdir}/log.txt"
+		@agent_pid, @socket_filename, @socket_address = spawn_logging_agent(@dump_file,
+			@logging_agent_password)
+		@options = {
+			"analytics" => true,
+			"logging_agent_address" => @socket_address,
+			"logging_agent_username" => "logging",
+			"logging_agent_password" => "1234",
+			"node_name" => "localhost",
+			"app_group_name" => "foobar"
+		}
+	end
+	
+	after :each do
+		@connection.close if @connection && @connection.closed?
+		Process.kill('KILL', @agent_pid)
+		Process.waitpid(@agent_pid)
+	end
+	
+	def send_request_to_app(headers)
+		headers = {
+			"PASSENGER_TXN_ID"     => "1234-abcd"
+		}.merge(headers)
+		return perform_request(headers)
+	end
+	
+	def read_log
+		return File.read(@dump_file)
+	end
+	
+	def base64(data)
+		return [data].pack('m').gsub("\n", "")
+	end
+	
+	it "doesn't install analytics logging extensions if analytics logging is turned off" do
+		@options.delete("analytics")
+		File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{
+			class FooController < ActionController::Base
+				def index
+					File.open("out.txt", "w") do |f|
+						f.write(request.env["PASSENGER_ANALYTICS_WEB_LOG"].class.to_s)
+					end
+					render :nothing => true
+				end
+			end
+		})
+		start!(@options)
+		send_request_to_app("PATH_INFO" => "/foo")
+		eventually(5) do
+			filename = "#{@stub.app_root}/out.txt"
+			File.exist?(filename) && File.read(filename) == "NilClass"
+		end
+	end
+	
+	it "logs the controller and action name" do
+		File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{
+			class FooController < ActionController::Base
+				def index
+					render :nothing => true
+				end
+			end
+		})
+		start!(@options)
+		send_request_to_app("PATH_INFO" => "/foo")
+		eventually(5) do
+			flush_logging_agent(@logging_agent_password, @socket_address)
+			log = read_log
+			log.include?("Controller action: FooController#index\n")
+		end
+	end
+	
+	it "logs uncaught exceptions in controller actions" do
+		File.write("#{@stub.app_root}/app/controllers/crash_controller.rb", %Q{
+			class CrashController < ActionController::Base
+				def index
+					raise "something went wrong"
+				end
+			end
+		})
+		start!(@options)
+		send_request_to_app("PATH_INFO" => "/crash")
+		eventually(5) do
+			flush_logging_agent(@logging_agent_password, @socket_address)
+			log = read_log
+			log.include?("Request transaction ID: 1234-abcd\n") &&
+				log.include?("Message: " + base64("something went wrong")) &&
+				log.include?("Class: RuntimeError") &&
+				log.include?("Backtrace: ") &&
+				log.include?("Controller action: CrashController#index")
+		end
+	end
+	
+	it "logs ActionController benchmarks" do
+		File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{
+			class FooController < ActionController::Base
+				def index
+					if respond_to?(:benchmark, true)
+						benchmark("hello") do
+						end
+					else
+						ActionController::Base.benchmark("hello") do
+						end
+					end
+					render :nothing => true
+				end
+			end
+		})
+		start!(@options)
+		send_request_to_app("PATH_INFO" => "/foo")
+		eventually(5) do
+			flush_logging_agent(@logging_agent_password, @socket_address)
+			log = read_log
+			log.include?('BEGIN: BENCHMARK: hello') &&
+				log.include?('END: BENCHMARK: hello')
+		end
+	end
+	
+	it "logs ActionView benchmarks" do
+		File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{
+			class FooController < ActionController::Base
+			end
+		})
+		FileUtils.mkdir_p("#{@stub.app_root}/app/views/foo")
+		File.write("#{@stub.app_root}/app/views/foo/index.html.erb", %Q{
+			<% benchmark("hello") do %>
+			<% end %>
+		})
+		start!(@options)
+		send_request_to_app("PATH_INFO" => "/foo")
+		eventually(5) do
+			flush_logging_agent(@logging_agent_password, @socket_address)
+			log = read_log
+			log.include?('BEGIN: BENCHMARK: hello') &&
+				log.include?('END: BENCHMARK: hello')
+		end
+	end
+	
+	it "logs successful SQL queries" do
+		File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{
+			class FooController < ActionController::Base
+				def index
+					db = ActiveRecord::Base.connection
+					db.execute("CREATE TABLE foobar (id INT)")
+					db.execute("INSERT INTO foobar VALUES (1)")
+					render :nothing => true
+				end
+			end
+		})
+		start!(@options.merge("active_record" => true))
+		send_request_to_app("PATH_INFO" => "/foo")
+		extra_info_regex = Regexp.escape(base64("SQL\nCREATE TABLE foobar (id INT)"))
+		eventually(5) do
+			flush_logging_agent(@logging_agent_password, @socket_address)
+			log = read_log
+			log =~ /BEGIN: DB BENCHMARK: .* \(.*\) #{extra_info_regex}$/ &&
+				log =~ /END: DB BENCHMARK: .* \(.*\)$/
+		end
+	end
+	
+	it "logs failed SQL queries" do
+		File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{
+			class FooController < ActionController::Base
+				def index
+					db = ActiveRecord::Base.connection
+					db.execute("INVALID QUERY")
+					render :nothing => true
+				end
+			end
+		})
+		start!(@options.merge("active_record" => true))
+		send_request_to_app("PATH_INFO" => "/foo")
+		extra_info_regex = Regexp.escape(base64("SQL\nINVALID QUERY"))
+		if rails_version >= '3.0'
+			pending do
+				eventually(5) do
+					log = read_log
+					log =~ /BEGIN: DB BENCHMARK: .* \(.*\) #{extra_info_regex}$/ &&
+						log =~ /FAIL: DB BENCHMARK: .* \(.*\)$/
+				end
+			end
+		else
+			eventually(5) do
+				flush_logging_agent(@logging_agent_password, @socket_address)
+				log = read_log
+				log =~ /BEGIN: DB BENCHMARK: .* \(.*\) #{extra_info_regex}$/ &&
+					log =~ /FAIL: DB BENCHMARK: .* \(.*\)$/
+			end
+		end
+	end
+	
+	it "logs controller processing time of successful actions" do
+		File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{
+			class FooController < ActionController::Base
+				def index
+					render :nothing => true
+				end
+			end
+		})
+		start!(@options)
+		send_request_to_app("PATH_INFO" => "/foo")
+		eventually(5) do
+			flush_logging_agent(@logging_agent_password, @socket_address)
+			log = read_log
+			log.include?("BEGIN: framework request processing") &&
+				log.include?("END: framework request processing")
+		end
+	end
+	
+	it "logs controller processing time of failed actions" do
+		File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{
+			class FooController < ActionController::Base
+				def index
+					raise "crash"
+				end
+			end
+		})
+		start!(@options)
+		send_request_to_app("PATH_INFO" => "/foo")
+		eventually(5) do
+			flush_logging_agent(@logging_agent_password, @socket_address)
+			log = read_log
+			log.include?("BEGIN: framework request processing") &&
+				log.include?("FAIL: framework request processing")
+		end
+	end
+	
+	it "logs view rendering time of successful actions" do
+		File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{
+			class FooController < ActionController::Base
+				def index
+				end
+			end
+		})
+		FileUtils.mkdir_p("#{@stub.app_root}/app/views/foo")
+		File.write("#{@stub.app_root}/app/views/foo/index.html.erb", %Q{
+			hello world
+		})
+		start!(@options)
+		send_request_to_app("PATH_INFO" => "/foo")
+		eventually(5) do
+			flush_logging_agent(@logging_agent_password, @socket_address)
+			log = read_log
+			log.include?("BEGIN: view rendering") &&
+				log.include?("END: view rendering") &&
+				log =~ /View rendering time: \d+$/
+		end
+	end
+	
+	it "logs view rendering time of failed actions" do
+		File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{
+			class FooController < ActionController::Base
+				def index
+				end
+			end
+		})
+		FileUtils.mkdir_p("#{@stub.app_root}/app/views/foo")
+		File.write("#{@stub.app_root}/app/views/foo/index.html.erb", %Q{
+			<% raise "crash!" %>
+		})
+		start!(@options)
+		send_request_to_app("PATH_INFO" => "/foo")
+		eventually(5) do
+			flush_logging_agent(@logging_agent_password, @socket_address)
+			log = read_log
+			log.include?("BEGIN: view rendering") &&
+				log.include?("FAIL: view rendering")
+		end
+	end
+	
+	it "logs cache hits" do
+		if rails_version >= '2.1'
+			File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{
+				class FooController < ActionController::Base
+					def index
+						Rails.cache.write("key1", "foo")
+						Rails.cache.write("key2", "foo")
+						Rails.cache.write("key3", "foo")
+						Rails.cache.read("key1")
+						Rails.cache.fetch("key2")
+						Rails.cache.fetch("key3") { "bar" }
+						render :text => 'ok'
+					end
+				end
+			})
+			start!(@options)
+			send_request_to_app("PATH_INFO" => "/foo")
+			eventually(5) do
+				flush_logging_agent(@logging_agent_password, @socket_address)
+				log = read_log
+				log.include?("Cache hit: key1") &&
+					log.include?("Cache hit: key2") &&
+					log.include?("Cache hit: key3")
+			end
+		end
+	end
+	
+	it "logs cache misses" do
+		if rails_version >= '2.1'
+			File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{
+				class FooController < ActionController::Base
+					def index
+						Rails.cache.read("key1")
+						Rails.cache.fetch("key2")
+						Rails.cache.fetch("key3") { "bar" }
+						render :text => 'ok'
+					end
+				end
+			})
+			start!(@options)
+			send_request_to_app("PATH_INFO" => "/foo")
+			eventually(5) do
+				flush_logging_agent(@logging_agent_password, @socket_address)
+				log = read_log
+				log.include?("Cache miss: key1") &&
+					log.include?("Cache miss: key2") &&
+					log =~ /Cache miss \(\d+\): key3/
+			end
+		end
+	end
+end
+
+end # module PhusionPassenger
diff --git a/test/ruby/shared/rails/analytics_logging_extensions_spec.rb b/test/ruby/shared/rails/analytics_logging_extensions_spec.rb
deleted file mode 100644
index 324f3ab..0000000
--- a/test/ruby/shared/rails/analytics_logging_extensions_spec.rb
+++ /dev/null
@@ -1,375 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
-require 'socket'
-require 'fileutils'
-require 'phusion_passenger/analytics_logger'
-require 'phusion_passenger/utils/tmpdir'
-
-module PhusionPassenger
-
-shared_examples_for "analytics logging extensions for Rails" do
-	before :each do
-		@logging_agent_password = "1234"
-		@agent_pid, @socket_filename, @socket_address = spawn_logging_agent(Utils.passenger_tmpdir,
-			@logging_agent_password)
-		@options = {
-			"analytics" => true,
-			"logging_agent_address" => @socket_address,
-			"logging_agent_username" => "logging",
-			"logging_agent_password_base64" => base64("1234"),
-			"node_name" => "localhost"
-		}
-	end
-	
-	after :each do
-		@connection.close if @connection && @connection.closed?
-		Process.kill('KILL', @agent_pid)
-		Process.waitpid(@agent_pid)
-	end
-	
-	def send_request_to_app(app, env)
-		if app.server_sockets[:main][1] == "unix"
-			@connection = UNIXSocket.new(app.server_sockets[:main][0])
-		else
-			addr, port = app.server_sockets[:main][0].split(/:/)
-			@connection = TCPSocket.new(addr, port.to_i)
-		end
-		channel = MessageChannel.new(@connection)
-		data = ""
-		env = {
-			"REQUEST_METHOD" => "GET",
-			"SCRIPT_NAME"    => "",
-			"PATH_INFO"      => "/",
-			"QUERY_STRING"   => "",
-			"SERVER_NAME"    => "localhost",
-			"SERVER_PORT"    => "80",
-			"PASSENGER_TXN_ID"     => "1234-abcd",
-			"PASSENGER_GROUP_NAME" => "foobar"
-		}.merge(env)
-		env["REQUEST_URI"] ||= env["PATH_INFO"]
-		env.each_pair do |key, value|
-			data << key << "\0"
-			data << value << "\0"
-		end
-		channel.write_scalar(data)
-		return @connection.read
-	end
-	
-	def read_log(name_suffix)
-		filename = Dir["#{Utils.passenger_tmpdir}/1/*/*/#{name_suffix}"].first
-		if filename
-			return File.read(filename)
-		else
-			return ""
-		end
-	end
-	
-	def base64(data)
-		return [data].pack('m').gsub("\n", "")
-	end
-	
-	it "doesn't install analytics logging extensions if analytics logging is turned off" do
-		@options.delete("analytics")
-		app = spawn_some_application(@options) do |stub|
-			File.write("#{stub.app_root}/app/controllers/foo_controller.rb", %Q{
-				class FooController < ActionController::Base
-					def index
-						File.open("out.txt", "w") do |f|
-							f.write(request.env["PASSENGER_ANALYTICS_WEB_LOG"].class.to_s)
-						end
-						render :nothing => true
-					end
-				end
-			})
-		end
-		send_request_to_app(app, "PATH_INFO" => "/foo")
-		eventually(5) do
-			filename = "#{app.app_root}/out.txt"
-			File.exist?(filename) && File.read(filename) == "NilClass"
-		end
-	end
-	
-	it "logs the controller and action name" do
-		app = spawn_some_application(@options) do |stub|
-			File.write("#{stub.app_root}/app/controllers/foo_controller.rb", %Q{
-				class FooController < ActionController::Base
-					def index
-						render :nothing => true
-					end
-				end
-			})
-		end
-		send_request_to_app(app, "PATH_INFO" => "/foo")
-		eventually(5) do
-			flush_logging_agent(@logging_agent_password, @socket_address)
-			log = read_log("requests/**/log.txt")
-			log.include?("Controller action: FooController#index\n")
-		end
-	end
-	
-	it "logs uncaught exceptions in controller actions" do
-		app = spawn_some_application(@options) do |stub|
-			File.write("#{stub.app_root}/app/controllers/crash_controller.rb", %Q{
-				class CrashController < ActionController::Base
-					def index
-						raise "something went wrong"
-					end
-				end
-			})
-		end
-		send_request_to_app(app, "PATH_INFO" => "/crash")
-		eventually(5) do
-			flush_logging_agent(@logging_agent_password, @socket_address)
-			log = read_log("exceptions/**/log.txt")
-			log.include?("Request transaction ID: 1234-abcd\n") &&
-				log.include?("Message: " + base64("something went wrong")) &&
-				log.include?("Class: RuntimeError") &&
-				log.include?("Backtrace: ") &&
-				log.include?("Controller action: CrashController#index")
-		end
-	end
-	
-	it "logs ActionController benchmarks" do
-		app = spawn_some_application(@options) do |stub|
-			File.write("#{stub.app_root}/app/controllers/foo_controller.rb", %Q{
-				class FooController < ActionController::Base
-					def index
-						# The '::' prefix works around a Dependencies
-						# bug in Rails 1.2
-						::ActionController::Base.benchmark("hello") do
-						end
-						render :nothing => true
-					end
-				end
-			})
-		end
-		send_request_to_app(app, "PATH_INFO" => "/foo")
-		eventually(5) do
-			flush_logging_agent(@logging_agent_password, @socket_address)
-			log = read_log("requests/**/log.txt")
-			log.include?('BEGIN: BENCHMARK: hello') &&
-				log.include?('END: BENCHMARK: hello')
-		end
-	end
-	
-	it "logs ActionView benchmarks" do
-		app = spawn_some_application(@options) do |stub|
-			File.write("#{stub.app_root}/app/controllers/foo_controller.rb", %Q{
-				class FooController < ActionController::Base
-				end
-			})
-			FileUtils.mkdir_p("#{stub.app_root}/app/views/foo")
-			File.write("#{stub.app_root}/app/views/foo/index.rhtml", %Q{
-				<% benchmark("hello") do %>
-				<% end %>
-			})
-		end
-		send_request_to_app(app, "PATH_INFO" => "/foo")
-		eventually(5) do
-			flush_logging_agent(@logging_agent_password, @socket_address)
-			log = read_log("requests/**/log.txt")
-			log.include?('BEGIN: BENCHMARK: hello') &&
-				log.include?('END: BENCHMARK: hello')
-		end
-	end
-	
-	it "logs successful SQL queries" do
-		app = spawn_some_application(@options) do |stub|
-			File.write("#{stub.app_root}/config/database.yml",
-				"production:\n" +
-				"  adapter: sqlite3\n" +
-				"  database: db.sqlite3\n")
-			File.write("#{stub.app_root}/app/controllers/foo_controller.rb", %Q{
-				class FooController < ActionController::Base
-					def index
-						db = ActiveRecord::Base.connection
-						db.execute("CREATE TABLE foobar (id INT)")
-						db.execute("INSERT INTO foobar VALUES (1)")
-						render :nothing => true
-					end
-				end
-			})
-		end
-		send_request_to_app(app, "PATH_INFO" => "/foo")
-		extra_info_regex = Regexp.escape(base64("SQL\nCREATE TABLE foobar (id INT)"))
-		eventually(5) do
-			flush_logging_agent(@logging_agent_password, @socket_address)
-			log = read_log("requests/**/log.txt")
-			log =~ /BEGIN: DB BENCHMARK: .* \(.*\) #{extra_info_regex}$/ &&
-				log =~ /END: DB BENCHMARK: .* \(.*\)$/
-		end
-	end
-	
-	it "logs failed SQL queries" do
-		app = spawn_some_application(@options) do |stub|
-			File.write("#{stub.app_root}/config/database.yml",
-				"production:\n" +
-				"  adapter: sqlite3\n" +
-				"  database: db.sqlite3\n")
-			File.write("#{stub.app_root}/app/controllers/foo_controller.rb", %Q{
-				class FooController < ActionController::Base
-					def index
-						db = ActiveRecord::Base.connection
-						db.execute("INVALID QUERY")
-						render :nothing => true
-					end
-				end
-			})
-		end
-		send_request_to_app(app, "PATH_INFO" => "/foo")
-		extra_info_regex = Regexp.escape(base64("SQL\nINVALID QUERY"))
-		if rails_version >= '3.0'
-			pending do
-				eventually(5) do
-					log = read_log("requests/**/log.txt")
-					log =~ /BEGIN: DB BENCHMARK: .* \(.*\) #{extra_info_regex}$/ &&
-						log =~ /FAIL: DB BENCHMARK: .* \(.*\)$/
-				end
-			end
-		else
-			eventually(5) do
-				flush_logging_agent(@logging_agent_password, @socket_address)
-				log = read_log("requests/**/log.txt")
-				log =~ /BEGIN: DB BENCHMARK: .* \(.*\) #{extra_info_regex}$/ &&
-					log =~ /FAIL: DB BENCHMARK: .* \(.*\)$/
-			end
-		end
-	end
-	
-	it "logs controller processing time of successful actions" do
-		app = spawn_some_application(@options) do |stub|
-			File.write("#{stub.app_root}/app/controllers/foo_controller.rb", %Q{
-				class FooController < ActionController::Base
-					def index
-						render :nothing => true
-					end
-				end
-			})
-		end
-		send_request_to_app(app, "PATH_INFO" => "/foo")
-		eventually(5) do
-			flush_logging_agent(@logging_agent_password, @socket_address)
-			log = read_log("requests/**/log.txt")
-			log.include?("BEGIN: framework request processing") &&
-				log.include?("END: framework request processing")
-		end
-	end
-	
-	it "logs controller processing time of failed actions" do
-		app = spawn_some_application(@options) do |stub|
-			File.write("#{stub.app_root}/app/controllers/foo_controller.rb", %Q{
-				class FooController < ActionController::Base
-					def index
-						raise "crash"
-					end
-				end
-			})
-		end
-		send_request_to_app(app, "PATH_INFO" => "/foo")
-		eventually(5) do
-			flush_logging_agent(@logging_agent_password, @socket_address)
-			log = read_log("requests/**/log.txt")
-			log.include?("BEGIN: framework request processing") &&
-				log.include?("FAIL: framework request processing")
-		end
-	end
-	
-	it "logs view rendering time of successful actions" do
-		app = spawn_some_application(@options) do |stub|
-			File.write("#{stub.app_root}/app/controllers/foo_controller.rb", %Q{
-				class FooController < ActionController::Base
-					def index
-					end
-				end
-			})
-			FileUtils.mkdir_p("#{stub.app_root}/app/views/foo")
-			File.write("#{stub.app_root}/app/views/foo/index.rhtml", %Q{
-				hello world
-			})
-		end
-		send_request_to_app(app, "PATH_INFO" => "/foo")
-		eventually(5) do
-			flush_logging_agent(@logging_agent_password, @socket_address)
-			log = read_log("requests/**/log.txt")
-			log.include?("BEGIN: view rendering") &&
-				log.include?("END: view rendering") &&
-				log =~ /View rendering time: \d+$/
-		end
-	end
-	
-	it "logs view rendering time of failed actions" do
-		app = spawn_some_application(@options) do |stub|
-			File.write("#{stub.app_root}/app/controllers/foo_controller.rb", %Q{
-				class FooController < ActionController::Base
-					def index
-					end
-				end
-			})
-			FileUtils.mkdir_p("#{stub.app_root}/app/views/foo")
-			File.write("#{stub.app_root}/app/views/foo/index.rhtml", %Q{
-				<% raise "crash!" %>
-			})
-		end
-		send_request_to_app(app, "PATH_INFO" => "/foo")
-		eventually(5) do
-			flush_logging_agent(@logging_agent_password, @socket_address)
-			log = read_log("requests/**/log.txt")
-			log.include?("BEGIN: view rendering") &&
-				log.include?("FAIL: view rendering")
-		end
-	end
-	
-	it "logs cache hits" do
-		if rails_version >= '2.1'
-			app = spawn_some_application(@options) do |stub|
-				File.write("#{stub.app_root}/app/controllers/foo_controller.rb", %Q{
-					class FooController < ActionController::Base
-						def index
-							Rails.cache.write("key1", "foo")
-							Rails.cache.write("key2", "foo")
-							Rails.cache.write("key3", "foo")
-							Rails.cache.read("key1")
-							Rails.cache.fetch("key2")
-							Rails.cache.fetch("key3") { "bar" }
-							render :text => 'ok'
-						end
-					end
-				})
-			end
-			send_request_to_app(app, "PATH_INFO" => "/foo")
-			eventually(5) do
-				flush_logging_agent(@logging_agent_password, @socket_address)
-				log = read_log("requests/**/log.txt")
-				log.include?("Cache hit: key1") &&
-					log.include?("Cache hit: key2") &&
-					log.include?("Cache hit: key3")
-			end
-		end
-	end
-	
-	it "logs cache misses" do
-		if rails_version >= '2.1'
-			app = spawn_some_application(@options) do |stub|
-				File.write("#{stub.app_root}/app/controllers/foo_controller.rb", %Q{
-					class FooController < ActionController::Base
-						def index
-							Rails.cache.read("key1")
-							Rails.cache.fetch("key2")
-							Rails.cache.fetch("key3") { "bar" }
-							render :text => 'ok'
-						end
-					end
-				})
-			end
-			send_request_to_app(app, "PATH_INFO" => "/foo")
-			eventually(5) do
-				flush_logging_agent(@logging_agent_password, @socket_address)
-				log = read_log("requests/**/log.txt")
-				log.include?("Cache miss: key1") &&
-					log.include?("Cache miss: key2") &&
-					log =~ /Cache miss \(\d+\): key3/
-			end
-		end
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/shared/ruby_loader_sharedspec.rb b/test/ruby/shared/ruby_loader_sharedspec.rb
new file mode 100644
index 0000000..acbcf01
--- /dev/null
+++ b/test/ruby/shared/ruby_loader_sharedspec.rb
@@ -0,0 +1,55 @@
+module PhusionPassenger
+
+shared_examples_for "a Ruby loader" do
+	it "prints an error page if the startup file fails to load" do
+		File.write(@stub.startup_file, %q{
+			raise "oh no!"
+		})
+		result = start
+		result[:status].should == "Error"
+		result[:body].should include("oh no!")
+	end
+
+	it "calls the starting_worker_process event after the startup file has been loaded" do
+		File.prepend(@stub.startup_file, %q{
+			history_file = "history.txt"
+			PhusionPassenger.on_event(:starting_worker_process) do |forked|
+				::File.open(history_file, 'a') do |f|
+					f.puts "worker_process_started\n"
+				end
+			end
+			::File.open(history_file, 'a') do |f|
+				f.puts "end of startup file\n"
+			end
+		})
+		result = start
+		result[:status].should == "Ready"
+		File.read("#{@stub.app_root}/history.txt").should ==
+			"end of startup file\n" +
+			"worker_process_started\n"
+	end
+
+	it "calls the stopping_worker_process event on exit" do
+		File.prepend(@stub.startup_file, %q{
+			history_file = "history.txt"
+			PhusionPassenger.on_event(:stopping_worker_process) do
+				::File.open(history_file, 'a') do |f|
+					f.puts "worker_process_stopped\n"
+				end
+			end
+			::File.open(history_file, 'a') do |f|
+				f.puts "end of startup file\n"
+			end
+		})
+		result = start
+		result[:status].should == "Ready"
+		@loader.input.close_write
+		eventually(3) do
+			File.read("#{@stub.app_root}/history.txt") ==
+				"end of startup file\n" +
+				"worker_process_stopped\n"
+		end
+	end
+end
+
+end # module PhusionPassenger
diff --git a/test/ruby/shared/spawners/classic_rails/framework_spawner_spec.rb b/test/ruby/shared/spawners/classic_rails/framework_spawner_spec.rb
deleted file mode 100644
index 4ae0db3..0000000
--- a/test/ruby/shared/spawners/classic_rails/framework_spawner_spec.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
-
-module PhusionPassenger
-
-shared_examples_for "a ClassicRails::FrameworkSpawner" do
-	it "raises FrameworkInitError if the framework could not be loaded" do
-		block = lambda do
-			load_nonexistant_framework("print_framework_loading_exceptions" => false).close
-		end
-		block.should raise_error(FrameworkInitError)
-	end
-	
-	it "prints the exception to STDERR if the framework could not be loaded" do
-		old_stderr = STDERR
-		file = File.new('output.tmp', 'w+')
-		begin
-			Object.send(:remove_const, "STDERR") rescue nil
-			Object.const_set("STDERR", file)
-			
-			block = lambda do
-				load_nonexistant_framework.close
-			end
-			block.should raise_error(FrameworkInitError)
-			
-			file.rewind
-			data = file.read
-			data.should =~ /load_nonexistant_framework/
-			data.should =~ /framework_spawner_spec\.rb/
-		ensure
-			Object.send(:remove_const, "STDERR") rescue nil
-			Object.const_set("STDERR", old_stderr)
-			file.close rescue nil
-			File.unlink('output.tmp') rescue nil
-		end
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/shared/spawners/classic_rails/lack_of_rails_gem_version_spec.rb b/test/ruby/shared/spawners/classic_rails/lack_of_rails_gem_version_spec.rb
deleted file mode 100644
index 2904438..0000000
--- a/test/ruby/shared/spawners/classic_rails/lack_of_rails_gem_version_spec.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
-
-module PhusionPassenger
-
-shared_examples_for "a Rails app that lacks RAILS_GEM_VERSION" do
-	it "loads a random Rails version if the app doesn't specify RAILS_GEM_VERSION" do
-		after_start %q{
-			File.write("rails_version.txt", Rails::VERSION::STRING)
-		}
-		app = spawn_some_application do |stub|
-			File.write(stub.environment_rb) do |content|
-				content.sub(/^RAILS_GEM_VERSION = .*$/, '')
-			end
-		end
-		File.read("#{app.app_root}/rails_version.txt").should =~ /^(\d+.)+\d+$/
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/shared/spawners/classic_rails/spawner_spec.rb b/test/ruby/shared/spawners/classic_rails/spawner_spec.rb
deleted file mode 100644
index 6233e08..0000000
--- a/test/ruby/shared/spawners/classic_rails/spawner_spec.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
-
-module PhusionPassenger
-
-shared_examples_for "a Rails spawner" do
-	it "sets RAILS_ENV" do
-		after_start %q{
-			File.write("rails_env.txt", RAILS_ENV)
-		}
-		app = spawn_some_application("environment" => "staging")
-		File.read("#{app.app_root}/rails_env.txt").should == "staging"
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/shared/spawners/non_preloading_spawner_spec.rb b/test/ruby/shared/spawners/non_preloading_spawner_spec.rb
deleted file mode 100644
index e1e71ec..0000000
--- a/test/ruby/shared/spawners/non_preloading_spawner_spec.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
-
-module PhusionPassenger
-
-shared_examples_for "a spawner that does not preload app code" do
-	specify "the starting_worker_process event is called with forked=false" do
-		after_start %q{
-			history_file = "#{PhusionPassenger::Utils.passenger_tmpdir}/history.txt"
-			PhusionPassenger.on_event(:starting_worker_process) do |forked|
-				::File.append(history_file, "forked = #{forked}\n")
-			end
-			::File.append(history_file, "end of environment.rb\n");
-		}
-		
-		spawn_some_application
-		spawn_some_application
-		
-		history_file = "#{PhusionPassenger::Utils.passenger_tmpdir}/history.txt"
-		eventually do
-			contents = File.read(history_file)
-			lines = contents.split("\n")
-			lines.count("forked = false") == 2
-		end
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/shared/spawners/preloading_spawner_spec.rb b/test/ruby/shared/spawners/preloading_spawner_spec.rb
deleted file mode 100644
index 9137329..0000000
--- a/test/ruby/shared/spawners/preloading_spawner_spec.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
-
-module PhusionPassenger
-
-shared_examples_for "a spawner that preloads app code" do
-	specify "the starting_worker_process event is called with forked=true" do
-		after_start %q{
-			history_file = "#{PhusionPassenger::Utils.passenger_tmpdir}/history.txt"
-			PhusionPassenger.on_event(:starting_worker_process) do |forked|
-				::File.append(history_file, "forked = #{forked}\n")
-			end
-			::File.append(history_file, "end of environment.rb\n");
-		}
-		
-		spawn_some_application
-		spawn_some_application
-		
-		history_file = "#{PhusionPassenger::Utils.passenger_tmpdir}/history.txt"
-		eventually do
-			contents = File.read(history_file)
-			contents ==
-				"end of environment.rb\n" +
-				"forked = true\n" +
-				"forked = true\n"
-		end
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/shared/spawners/reload_all_spec.rb b/test/ruby/shared/spawners/reload_all_spec.rb
deleted file mode 100644
index 1002cef..0000000
--- a/test/ruby/shared/spawners/reload_all_spec.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
-
-module PhusionPassenger
-
-shared_examples_for "a Rails spawner that supports #reload()" do
-	it "#reload() reloads all applications" do
-		use_some_stub do |stub1|
-		use_some_stub do |stub2|
-			File.append(stub1.startup_file, %q{
-				File.write("output.txt", "stub 1")
-			})
-			spawn_stub_application(stub1).close
-			File.append(stub2.startup_file, %q{
-				File.write("output.txt", "stub 2")
-			})
-			spawn_stub_application(stub2).close
-			
-			spawner.reload
-			
-			File.append(stub1.startup_file, %q{
-				File.write("output.txt", "stub 1 modified")
-			})
-			spawn_stub_application(stub1).close
-			File.append(stub2.startup_file, %q{
-				File.write("output.txt", "stub 2 modified")
-			})
-			spawn_stub_application(stub2).close
-			
-			File.read("#{stub1.app_root}/output.txt").should == "stub 1 modified"
-			File.read("#{stub2.app_root}/output.txt").should == "stub 2 modified"
-		end
-		end
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/shared/spawners/reload_single_spec.rb b/test/ruby/shared/spawners/reload_single_spec.rb
deleted file mode 100644
index e37cc40..0000000
--- a/test/ruby/shared/spawners/reload_single_spec.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
-
-module PhusionPassenger
-
-shared_examples_for "a Rails spawner that supports #reload(app_group_name)" do
-	it "#reload(app_group_name) reloads a specific application" do
-		use_some_stub do |stub1|
-		use_some_stub do |stub2|
-			File.append(stub1.startup_file, %q{
-				File.write("output.txt", "stub 1, variant #{ENV['VARIANT']}")
-			})
-			File.append(stub2.startup_file, %q{
-				File.write("output.txt", "stub 2")
-			})
-			
-			spawn_stub_application(stub1,
-				"app_group_name" => "stub 1, variant A",
-				"environment_variables" => ["VARIANT\0A\0"].pack('m')
-			).close
-			spawn_stub_application(stub1,
-				"app_group_name" => "stub 1, variant B",
-				"environment_variables" => ["VARIANT\0B\0"].pack('m')
-			).close
-			spawn_stub_application(stub2).close
-			
-			spawner.reload("stub 1, variant A")
-			
-			File.append(stub1.startup_file, %q{
-				File.write("output.txt", "stub 1 modified, variant #{ENV['VARIANT']}")
-			})
-			File.append(stub2.startup_file, %q{
-				File.write("output.txt", "stub 2 modified")
-			})
-			
-			spawn_stub_application(stub1,
-				"app_group_name" => "stub 1, variant A",
-				"environment_variables" => ["VARIANT\0A\0"].pack('m')
-			).close
-			spawn_stub_application(stub1,
-				"app_group_name" => "stub 1, variant B",
-				"environment_variables" => ["VARIANT\0B\0"].pack('m')
-			).close
-			spawn_stub_application(stub2).close
-			
-			File.read("#{stub1.app_root}/output.txt").should == "stub 1 modified, variant A"
-			File.read("#{stub2.app_root}/output.txt").should == "stub 2"
-		end
-		end
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/shared/spawners/spawn_server_spec.rb b/test/ruby/shared/spawners/spawn_server_spec.rb
deleted file mode 100644
index 0f47a26..0000000
--- a/test/ruby/shared/spawners/spawn_server_spec.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
-require 'ruby/shared/abstract_server_spec'
-
-module PhusionPassenger
-
-shared_examples_for "a spawn server" do
-	it "raises an AbstractServer::ServerError if the server was killed" do
-		spawner   # Start the spawn server.
-		Process.kill('SIGKILL', spawner.server_pid)
-		spawning = lambda { spawn_some_application }
-		spawning.should raise_error(AbstractServer::ServerError)
-	end
-	
-	it "works correctly after a restart, if something went wrong" do
-		filename = "#{Utils.passenger_tmpdir}/works.txt"
-		before_start %Q{
-			File.touch(#{filename.inspect})
-		}
-		spawner   # Start the spawn server.
-		Process.kill('SIGKILL', spawner.server_pid)
-		spawner.stop
-		spawner.start
-		spawn_some_application
-		File.exist?(filename).should be_true
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/shared/spawners/spawner_spec.rb b/test/ruby/shared/spawners/spawner_spec.rb
deleted file mode 100644
index a3e160e..0000000
--- a/test/ruby/shared/spawners/spawner_spec.rb
+++ /dev/null
@@ -1,273 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
-require 'yaml'
-require 'etc'
-
-module PhusionPassenger
-
-shared_examples_for "a spawner" do
-	def ping_app(app, connect_password)
-		if app.server_sockets[:main][1] == "unix"
-			client = UNIXSocket.new(app.server_sockets[:main][0])
-		else
-			addr, port = app.server_sockets[:main][0].split(/:/)
-			client = TCPSocket.new(addr, port.to_i)
-		end
-		begin
-			channel = MessageChannel.new(client)
-			channel.write_scalar("REQUEST_METHOD\0PING\0PASSENGER_CONNECT_PASSWORD\0#{connect_password}\0")
-			return client.read
-		ensure
-			client.close
-		end
-	end
-	
-	it "returns a valid AppProcess object" do
-		app = spawn_some_application
-		lambda { Process.kill(0, app.pid) }.should_not raise_error
-	end
-	
-	it "sets the working directory of the app to its app root" do
-		before_start %q{
-			File.touch("cwd.txt")
-		}
-		app = spawn_some_application
-		File.exist?("#{app.app_root}/cwd.txt").should be_true
-	end
-	
-	it "sets ENV['RAILS_ENV'] and ENV['RACK_ENV']" do
-		before_start %q{
-			File.write("rails_env.txt", ENV['RAILS_ENV'])
-			File.write("rack_env.txt", ENV['RACK_ENV'])
-		}
-		app = spawn_some_application("environment" => "staging")
-		File.read("#{app.app_root}/rails_env.txt").should == "staging"
-		File.read("#{app.app_root}/rack_env.txt").should == "staging"
-	end
-	
-	it "sets ENV['RAILS_RELATIVE_URL_ROOT'] and ENV['RACK_BASE_URI'] if the 'base_uri' option is set to a valid value" do
-		before_start %q{
-			File.write("rails_relative_url_root.txt", ENV['RAILS_RELATIVE_URL_ROOT'])
-			File.write("rack_base_uri.txt", ENV['RACK_BASE_URI'])
-		}
-		app = spawn_some_application("base_uri" => "/foo")
-		File.read("#{app.app_root}/rails_relative_url_root.txt").should == "/foo"
-		File.read("#{app.app_root}/rack_base_uri.txt").should == "/foo"
-	end
-	
-	it "doesn't set ENV['RAILS_RELATIVE_URL_ROOT'] and ENV['RACK_BASE_URI'] if 'base_uri' is not given" do
-		before_start %q{
-			if ENV['RAILS_RELATIVE_URL_ROOT']
-				File.touch("rails_relative_url_root.txt")
-			end
-			if ENV['RACK_BASE_URI']
-				File.touch("rack_base_uri.txt")
-			end
-		}
-		app = spawn_some_application
-		File.exist?("#{app.app_root}/rails_relative_url_root.txt").should be_false
-		File.exist?("#{app.app_root}/rack_base_uri.txt").should be_false
-	end
-	
-	it "doesn't set ENV['RAILS_RELATIVE_URL_ROOT'] and ENV['RACK_BASE_URI'] if 'base_uri' is empty" do
-		before_start %q{
-			if ENV['RAILS_RELATIVE_URL_ROOT']
-				File.touch("rails_relative_url_root.txt")
-			end
-			if ENV['RACK_BASE_URI']
-				File.touch("rack_base_uri.txt")
-			end
-		}
-		app = spawn_some_application("base_uri" => "")
-		File.exist?("#{app.app_root}/rails_relative_url_root.txt").should be_false
-		File.exist?("#{app.app_root}/rack_base_uri.txt").should be_false
-	end
-	
-	it "doesn't set ENV['RAILS_RELATIVE_URL_ROOT'] and ENV['RACK_BASE_URI'] if 'base_uri' is '/'" do
-		before_start %q{
-			if ENV['RAILS_RELATIVE_URL_ROOT']
-				File.touch("rails_relative_url_root.txt")
-			end
-			if ENV['RACK_BASE_URI']
-				File.touch("rack_base_uri.txt")
-			end
-		}
-		app = spawn_some_application("base_uri" => "/")
-		File.exist?("#{app.app_root}/rails_relative_url_root.txt").should be_false
-		File.exist?("#{app.app_root}/rack_base_uri.txt").should be_false
-	end
-	
-	it "sets the environment variables in the 'environment_variables' option" do
-		before_start %q{
-			File.open("env.txt", "w") do |f|
-				f.puts
-				ENV.each_pair do |key, value|
-					f.puts("#{key} = #{value}")
-				end
-			end
-		}
-		
-		env_vars_string = "PATH\0/usr/bin:/opt/sw/bin\0FOO\0foo bar!\0"
-		options = { "environment_variables" => [env_vars_string].pack("m") }
-		app = spawn_some_application(options)
-		
-		contents = File.read("#{app.app_root}/env.txt")
-		contents.should =~ %r(\nPATH = /usr/bin:/opt/sw/bin\n)
-		contents.should =~ %r(\nFOO = foo bar\!\n)
-	end
-	
-	it "does not cache things like the connect password" do
-		app1 = spawn_some_application("connect_password" => "1234")
-		app2 = spawn_some_application("connect_password" => "5678")
-		ping_app(app1, "1234").should == "pong"
-		ping_app(app2, "5678").should == "pong"
-	end
-	
-	it "calls the starting_worker_process event after the startup file has been loaded" do
-		after_start %q{
-			history_file = "#{PhusionPassenger::Utils.passenger_tmpdir}/history.txt"
-			PhusionPassenger.on_event(:starting_worker_process) do
-				::File.append(history_file, "worker_process_started\n")
-			end
-			::File.append(history_file, "end of startup file\n");
-		}
-		spawn_some_application.close
-		app = spawn_some_application
-		app.close
-		
-		history_file = "#{PhusionPassenger::Utils.passenger_tmpdir}/history.txt"
-		eventually do
-			contents = File.read(history_file)
-			lines = contents.split("\n")
-			lines[0] == "end of startup file" &&
-				lines.count("worker_process_started") == 2
-		end
-	end
-	
-	it "calls the stopping_worker_process event" do
-		after_start %q{
-			history_file = "#{PhusionPassenger::Utils.passenger_tmpdir}/history.txt"
-			PhusionPassenger.on_event(:stopping_worker_process) do
-				::File.append(history_file, "worker_process_stopped\n")
-			end
-			::File.append(history_file, "end of startup file\n");
-		}
-		spawn_some_application.close
-		app = spawn_some_application
-		app.close
-		
-		history_file = "#{PhusionPassenger::Utils.passenger_tmpdir}/history.txt"
-		eventually do
-			contents = File.read(history_file)
-			lines = contents.split("\n")
-			lines[0] == "end of startup file" &&
-				lines.count("worker_process_stopped") == 2
-		end
-	end
-	
-	it "calls #at_exit blocks upon exiting" do
-		before_start %q{
-			history_file = "#{PhusionPassenger::Utils.passenger_tmpdir}/history.txt"
-			at_exit do
-				File.open(history_file, "a") do |f|
-					f.puts "at_exit 1"
-				end
-			end
-			at_exit do
-				File.open(history_file, "a") do |f|
-					f.puts "at_exit 2"
-				end
-			end
-		}
-		
-		spawn_some_application.close
-		history_file = "#{PhusionPassenger::Utils.passenger_tmpdir}/history.txt"
-		eventually do
-			File.exist?(history_file) &&
-			File.read(history_file) ==
-				"at_exit 2\n" +
-				"at_exit 1\n"
-		end
-	end
-	
-	it "lowers privilege using Utils#lower_privilege" do
-		filename = "#{PhusionPassenger::Utils.passenger_tmpdir}/called.txt"
-		PhusionPassenger::Utils.stub!(:lower_privilege_called).and_return do
-			File.touch(filename)
-		end
-		spawn_some_application.close
-		eventually do
-			File.exist?(filename).should be_true
-		end
-	end
-	
-	describe "error handling" do
-		it "raises an AppInitError if the spawned app raises a standard exception during startup" do
-			before_start %q{
-				raise 'This is a dummy exception.'
-			}
-			begin
-				spawn_some_application("print_exceptions" => false)
-				violated "Spawning the application should have raised an AppInitError."
-			rescue AppInitError => e
-				e.child_exception.message.should == "This is a dummy exception."
-			end
-		end
-		
-		it "raises an AppInitError if the spawned app raises a custom-defined exception during startup" do
-			before_start %q{
-				class MyError < StandardError
-				end
-				
-				raise MyError, "This is a custom exception."
-			}
-			begin
-				spawn_some_application("print_exceptions" => false)
-				violated "Spawning the application should have raised an AppInitError."
-			rescue AppInitError => e
-				e.child_exception.message.should == "This is a custom exception. (MyError)"
-			end
-		end
-		
-		it "raises an AppInitError if the spawned app calls exit() during startup" do
-			before_start %q{
-				exit
-			}
-			begin
-				spawn_some_application("print_exceptions" => false).close
-				violated "Spawning the application should have raised an AppInitError."
-			rescue AppInitError => e
-				e.child_exception.class.should == SystemExit
-			end
-		end
-		
-		it "prints the exception to STDERR if the spawned app raised an error" do
-			old_stderr = STDERR
-			file = File.new('output.tmp', 'w+')
-			begin
-				Object.send(:remove_const, "STDERR") rescue nil
-				Object.const_set("STDERR", file)
-				
-				before_start %q{
-					def dummy_function
-						raise 'This is a dummy exception.'
-					end
-					dummy_function
-				}
-				block = lambda { spawn_some_application }
-				block.should raise_error(AppInitError)
-				
-				file.rewind
-				data = file.read
-				data.should =~ /This is a dummy exception/
-				data.should =~ /dummy_function/
-			ensure
-				Object.send(:remove_const, "STDERR") rescue nil
-				Object.const_set("STDERR", old_stderr)
-				file.close rescue nil
-				File.unlink('output.tmp') rescue nil
-			end
-		end
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/shared/utils/pseudo_io_spec.rb b/test/ruby/shared/utils/pseudo_io_spec.rb
deleted file mode 100644
index fd494e1..0000000
--- a/test/ruby/shared/utils/pseudo_io_spec.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
-require 'stringio'
-require 'phusion_passenger/message_channel'
-
-module PhusionPassenger
-
-shared_examples_for "a pseudo stderr created by #report_app_init_status" do
-	before :each do
-		@sink = StringIO.new
-		@temp_channel = MessageChannel.new(StringIO.new)
-	end
-	
-	after :each do
-		File.unlink("output.tmp") rescue nil
-	end
-	
-	it "redirects everything written to the pseudo STDERR/$stderr to the sink" do
-		report_app_init_status(@temp_channel, @sink) do
-			STDERR.puts "Something went wrong!"
-			$stderr.puts "Something went wrong again!"
-			raise StandardError, ":-(" if @raise_error
-		end
-		@sink.string.should =~ /Something went wrong!/
-		@sink.string.should =~ /Something went wrong again!/
-	end
-	
-	it "redirects reopen operations on the pseudo stderr to the sink" do
-		@sink.should_receive(:reopen).with("output.tmp", "w")
-		report_app_init_status(@temp_channel, @sink) do
-			STDERR.reopen("output.tmp", "w")
-			raise StandardError, ":-(" if @raise_error
-		end
-	end
-	
-	specify "after the function has finished, every operation on the old pseudo stderr object will still be redirected to the sink" do
-		pseudo_stderr = nil
-		report_app_init_status(@temp_channel, @sink) do
-			pseudo_stderr = STDERR
-			raise StandardError, ":-(" if @raise_error
-		end
-		
-		pseudo_stderr.puts "hello world"
-		@sink.string.should =~ /hello world/
-		
-		@sink.should_receive(:reopen).with("output.tmp", "w")
-		pseudo_stderr.reopen("output.tmp", "w")
-	end
-	
-	specify "after the function has finished, every output operation on the old pseudo stderr object will not be buffered" do
-		pseudo_stderr = nil
-		report_app_init_status(@temp_channel, @sink) do
-			pseudo_stderr = STDERR
-			pseudo_stderr.instance_variable_get(:@buffer).should_not be_nil
-			raise StandardError, ":-(" if @raise_error
-		end
-		pseudo_stderr.instance_variable_get(:@buffer).should be_nil
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/spawn_manager_spec.rb b/test/ruby/spawn_manager_spec.rb
deleted file mode 100644
index 6140fc3..0000000
--- a/test/ruby/spawn_manager_spec.rb
+++ /dev/null
@@ -1,134 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
-require 'phusion_passenger/app_process'
-require 'phusion_passenger/spawn_manager'
-
-require 'ruby/shared/spawners/spawner_spec'
-require 'ruby/shared/spawners/reload_single_spec'
-require 'ruby/shared/spawners/reload_all_spec'
-require 'ruby/shared/spawners/classic_rails/spawner_spec'
-require 'ruby/shared/spawners/classic_rails/lack_of_rails_gem_version_spec'
-
-# TODO: test whether SpawnManager restarts the subspawner if it crashed
-
-module PhusionPassenger
-
-describe SpawnManager do
-	include SpawnerSpecHelper
-	
-	after :each do
-		@spawner.cleanup if @spawner
-	end
-	
-	describe_rails_versions('<= 2.3') do
-		def spawner
-			@spawner ||= SpawnManager.new
-		end
-		
-		def spawn_stub_application(stub, extra_options = {})
-			default_options = {
-				"app_root"     => stub.app_root,
-				"spawn_method" => @spawn_method,
-				"default_user" => CONFIG['default_user']
-			}
-			options = default_options.merge(extra_options)
-			app = spawner.spawn_application(options)
-			return register_app(app)
-		end
-		
-		def spawn_some_application(extra_options = {})
-			stub = register_stub(RailsStub.new("#{rails_version}/empty"))
-			yield stub if block_given?
-			return spawn_stub_application(stub, extra_options)
-		end
-		
-		def use_some_stub
-			RailsStub.use("#{rails_version}/empty") do |stub|
-				yield stub
-			end
-		end
-		
-		# def load_nonexistant_framework(extra_options = {})
-		# 	# Prevent detect_framework_version from raising VersionNotFound
-		# 	AppProcess.should_receive(:detect_framework_version).
-		# 		at_least(:once).
-		# 		with(an_instance_of(String)).
-		# 		and_return("1.9.827")
-		# 	stub = register_stub(RailsStub.new("#{rails_version}/empty"))
-		# 	File.write(stub.environment_rb) do |content|
-		# 		content.sub(/^RAILS_GEM_VERSION = .*$/, "RAILS_GEM_VERSION = '1.9.827'")
-		# 	end
-		# 	return spawn_stub_application(stub, extra_options)
-		# end
-		
-		describe "smart spawning" do
-			before :each do
-				@spawn_method = "smart"
-			end
-			
-			it_should_behave_like "a spawner"
-			it_should_behave_like "a Rails spawner"
-			it_should_behave_like "a Rails spawner that supports #reload(app_group_name)"
-			it_should_behave_like "a Rails spawner that supports #reload()"
-			include_shared_example_group "a Rails app that lacks RAILS_GEM_VERSION"
-		end
-		
-		describe "smart-lv2 spawning" do
-			before :each do
-				@spawn_method = "smart-lv2"
-			end
-			
-			it_should_behave_like "a spawner"
-			it_should_behave_like "a Rails spawner"
-			it_should_behave_like "a Rails spawner that supports #reload(app_group_name)"
-			it_should_behave_like "a Rails spawner that supports #reload()"
-			include_shared_example_group "a Rails app that lacks RAILS_GEM_VERSION"
-		end
-		
-		describe "conservative spawning" do
-			before :each do
-				@spawn_method = "conservative"
-			end
-			
-			it_should_behave_like "a spawner"
-			it_should_behave_like "a Rails spawner"
-			it_should_behave_like "a Rails spawner that supports #reload()"
-			include_shared_example_group "a Rails app that lacks RAILS_GEM_VERSION"
-		end
-	end
-	
-	describe "Rack" do
-		def spawn_some_application(extra_options = {})
-			stub = register_stub(RackStub.new("rack"))
-			yield stub if block_given?
-			
-			default_options = {
-				"app_root"     => stub.app_root,
-				"app_type"     => "rack",
-				"spawn_method" => @spawn_method,
-				"default_user" => CONFIG['default_user']
-			}
-			options = default_options.merge(extra_options)
-			@spawner ||= SpawnManager.new
-			app = @spawner.spawn_application(options)
-			return register_app(app)
-		end
-		
-		describe "smart spawning" do
-			before :each do
-				@spawn_method = "smart"
-			end
-			
-			it_should_behave_like "a spawner"
-		end
-		
-		describe "conservative spawning" do
-			before :each do
-				@spawn_method = "conservative"
-			end
-			
-			it_should_behave_like "a spawner"
-		end
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/ruby/spec_helper.rb b/test/ruby/spec_helper.rb
index 563b921..b6b5a49 100644
--- a/test/ruby/spec_helper.rb
+++ b/test/ruby/spec_helper.rb
@@ -5,25 +5,40 @@ end
 source_root = File.expand_path(File.dirname(__FILE__) + "/../..")
 Dir.chdir("#{source_root}/test")
 
-require 'yaml'
+require 'rubygems'
+require 'json'
 begin
-	CONFIG = YAML::load_file('config.yml')
+	CONFIG = JSON.load(File.read('config.json'))
 rescue Errno::ENOENT
-	STDERR.puts "*** You do not have the file test/config.yml. " <<
-		"Please copy test/config.yml.example to " <<
-		"test/config.yml, and edit it."
+	STDERR.puts "*** You do not have the file test/config.json. " <<
+		"Please copy test/config.json.example to " <<
+		"test/config.json, and edit it."
 	exit 1
 end
 
-AGENTS_DIR = "#{source_root}/agents"
+def boolean_option(name, default_value = false)
+	value = ENV[name]
+	if value.nil? || value.empty?
+		return default_value
+	else
+		return value == "yes" || value == "on" || value == "true" || value == "1"
+	end
+end
+
+DEBUG = boolean_option('DEBUG')
+TEST_CLASSIC_RAILS = boolean_option('TEST_CLASSIC_RAILS', true)
 
 $LOAD_PATH.unshift("#{source_root}/lib")
 $LOAD_PATH.unshift("#{source_root}/test")
 
+require 'thread'
+require 'timeout'
 require 'fileutils'
 require 'support/test_helper'
 require 'phusion_passenger'
+PhusionPassenger.locate_directories
 require 'phusion_passenger/debug_logging'
+require 'phusion_passenger/utils'
 require 'phusion_passenger/utils/tmpdir'
 
 include TestHelper
@@ -33,11 +48,56 @@ include TestHelper
 srand
 
 trap "QUIT" do
-	puts caller
+	STDERR.puts PhusionPassenger::Utils.global_backtrace_report
 end
 
-Spec::Runner.configure do |config|
-	config.append_before do
+class DeadlineTimer
+	def initialize(main_thread, deadline)
+		@mutex = Mutex.new
+		@cond  = ConditionVariable.new
+		@iteration = 0
+		@pipe  = IO.pipe
+
+		@thread = Thread.new do
+			Thread.current.abort_on_exception = true
+			expected_iteration = 1
+			ios = [@pipe[0]]
+			while true
+				@mutex.synchronize do
+					while @iteration != expected_iteration
+						@cond.wait(@mutex)
+					end
+				end
+				if !select(ios, nil, nil, deadline)
+					STDERR.puts "*** Test timed out (#{deadline} seconds)"
+					STDERR.puts PhusionPassenger::Utils.global_backtrace_report
+					main_thread.raise(Timeout::Error, "Test timed out")
+					expected_iteration += 1
+				elsif @pipe[0].read(1).nil?
+					break
+				else
+					expected_iteration += 1
+				end
+			end
+		end
+	end
+
+	def start
+		@mutex.synchronize do
+			@iteration += 1
+			@cond.signal
+		end
+	end
+
+	def stop
+		@pipe[1].write('x')
+	end
+end
+
+DEADLINE_TIMER = DeadlineTimer.new(Thread.current, 30)
+
+RSpec.configure do |config|
+	config.before(:each) do
 		# Suppress warning messages.
 		PhusionPassenger::DebugLogging.log_level = -1
 		PhusionPassenger::DebugLogging.log_file = nil
@@ -45,60 +105,15 @@ Spec::Runner.configure do |config|
 		
 		# Create the temp directory.
 		PhusionPassenger::Utils.passenger_tmpdir
+
+		DEADLINE_TIMER.start
 	end
 	
-	config.append_after do
+	config.after(:each) do
 		tmpdir = PhusionPassenger::Utils.passenger_tmpdir(false)
 		if File.exist?(tmpdir)
 			remove_dir_tree(tmpdir)
 		end
-	end
-end
-
-module SpawnerSpecHelper
-	def self.included(klass)
-		klass.before(:each) do
-			@stubs = []
-			@apps = []
-		end
-		
-		klass.after(:each) do
-			begin
-				@apps.each do |app|
-					app.close
-				end
-				# Wait until all apps have exited, so that they don't
-				# hog memory for the next test case.
-				eventually(5) do
-					@apps.all? do |app|
-						!PhusionPassenger::Utils.process_is_alive?(app.pid)
-					end
-				end
-			ensure
-				@stubs.each do |stub|
-					stub.destroy
-				end
-			end
-		end
-	end
-	
-	def before_start(code)
-		@before_start = code
-	end
-	
-	def after_start(code)
-		@after_start = code
-	end
-	
-	def register_stub(stub)
-		@stubs << stub
-		File.prepend(stub.startup_file, "#{@before_start}\n")
-		File.append(stub.startup_file, "\n#{@after_start}")
-		return stub
-	end
-	
-	def register_app(app)
-		@apps << app
-		return app
+		DEADLINE_TIMER.stop
 	end
 end
diff --git a/test/ruby/utils/file_system_watcher_spec.rb b/test/ruby/utils/file_system_watcher_spec.rb
index d787c15..a94f7dc 100644
--- a/test/ruby/utils/file_system_watcher_spec.rb
+++ b/test/ruby/utils/file_system_watcher_spec.rb
@@ -110,7 +110,15 @@ describe Utils::FileSystemWatcher do
 		specify "a watched file has been truncated" do
 			File.write("#{@tmpdir}/foo", "contents")
 			result = test_block(["#{@tmpdir}/foo"]) do
-				File.open("#{@tmpdir}/foo", "w").close
+				if RUBY_PLATFORM =~ /darwin/
+					# OS X kernel bug in kqueue... sigh...
+					File.open("#{@tmpdir}/foo", "w") do |f|
+						f.write("a")
+						f.truncate(0)
+					end
+				else
+					File.open("#{@tmpdir}/foo", "w").close
+				end
 			end
 		end
 		
diff --git a/test/ruby/utils_spec.rb b/test/ruby/utils_spec.rb
index caa57cf..eb48ce4 100644
--- a/test/ruby/utils_spec.rb
+++ b/test/ruby/utils_spec.rb
@@ -5,244 +5,24 @@ require 'stringio'
 require 'etc'
 require 'phusion_passenger/message_channel'
 require 'phusion_passenger/platform_info/ruby'
+require 'phusion_passenger/loader_shared_helpers'
 require 'phusion_passenger/utils'
 
-require 'ruby/shared/utils/pseudo_io_spec'
-
 module PhusionPassenger
 
 describe Utils do
 	include Utils
 	
-	specify "#close_all_io_objects_for_fds closes all IO objects that are associated with the given file descriptors" do
-		filename = "#{Dir.tmpdir}/passenger_test.#{Process.pid}.txt"
-		begin
-			pid = safe_fork('utils_spec') do
-				a, b = IO.pipe
-				close_all_io_objects_for_fds([0, 1, 2])
-				File.open(filename, "w") do |f|
-					f.write("#{a.closed?}, #{b.closed?}")
-				end
-			end
-			Process.waitpid(pid) rescue nil
-			File.read(filename).should == "true, true"
-		ensure
-			File.unlink(filename) rescue nil
-		end
-	end
-	
-	describe "#report_app_init_status" do
-		it "reports normal errors, which #unmarshal_and_raise_errors raises" do
-			a, b = IO.pipe
-			begin
-				pid = safe_fork('utils_spec') do
-					a.close
-					report_app_init_status(MessageChannel.new(b)) do
-						raise RuntimeError, "hello world"
-					end
-				end
-				b.close
-				lambda { unmarshal_and_raise_errors(MessageChannel.new(a)) }.should raise_error(/hello world/)
-			ensure
-				a.close rescue nil
-				b.close rescue nil
-			end
-		end
-		
-		it "reports SystemExit errors, which #unmarshal_and_raise_errors raises" do
-			a, b = IO.pipe
-			begin
-				pid = safe_fork('utils_spec') do
-					a.close
-					report_app_init_status(MessageChannel.new(b)) do
-						exit
-					end
-				end
-				b.close
-				lambda { unmarshal_and_raise_errors(MessageChannel.new(a)) }.should raise_error(/exited during startup/)
-			ensure
-				a.close rescue nil
-				b.close rescue nil
-			end
-		end
-		
-		it "returns whether the block succeeded" do
-			channel = MessageChannel.new(StringIO.new)
-			success = report_app_init_status(channel) do
-				false
-			end
-			success.should be_true
-			
-			success = report_app_init_status(channel) do
-				raise StandardError, "hi"
-			end
-			success.should be_false
-		end
-		
-		it "reports all data written to STDERR and $stderr" do
-			a, b = IO.pipe
-			begin
-				pid = safe_fork('utils_spec') do
-					a.close
-					report_app_init_status(MessageChannel.new(b), nil) do
-						STDERR.puts "Something went wrong!"
-						$stderr.puts "Something went wrong again!"
-						exit
-					end
-				end
-				b.close
-				
-				begin
-					unmarshal_and_raise_errors(MessageChannel.new(a))
-					violated "No exception raised"
-				rescue AppInitError => e
-					e.stderr.should =~ /Something went wrong!/
-					e.stderr.should =~ /Something went wrong again!/
-				end
-			ensure
-				a.close rescue nil
-				b.close rescue nil
-			end
-		end
-		
-		it "reports all data written to STDERR and $stderr even if it was reopened" do
-			a, b = IO.pipe
-			begin
-				pid = safe_fork('utils_spec') do
-					a.close
-					report_app_init_status(MessageChannel.new(b), nil) do
-						STDERR.puts "Something went wrong!"
-						STDERR.reopen("output.tmp", "w")
-						STDERR.puts "Something went wrong again!"
-						STDERR.flush
-						$stderr.puts "Something went wrong yet again!"
-						$stderr.flush
-						exit
-					end
-				end
-				b.close
-				
-				begin
-					unmarshal_and_raise_errors(MessageChannel.new(a))
-					violated "No exception raised"
-				rescue AppInitError => e
-					e.stderr.should =~ /Something went wrong!/
-					e.stderr.should =~ /Something went wrong again!/
-					e.stderr.should =~ /Something went wrong yet again!/
-				end
-				
-				file_contents = File.read("output.tmp")
-				file_contents.should =~ /Something went wrong again!/
-				file_contents.should =~ /Something went wrong yet again!/
-			ensure
-				a.close rescue nil
-				b.close rescue nil
-				File.unlink("output.tmp") rescue nil
-			end
-		end
-		
-		describe "if the block failed" do
-			before :each do
-				@raise_error = true
-			end
-			
-			it_should_behave_like "a pseudo stderr created by #report_app_init_status"
-		end
-		
-		describe "if the block succeeded" do
-			it_should_behave_like "a pseudo stderr created by #report_app_init_status"
-		end
-	end
-	
-	specify "#safe_fork with double_fork == false reseeds the pseudo-random number generator" do
-		a, b = IO.pipe
-		begin
-			pid = safe_fork do
-				b.puts(rand)
-			end
-			Process.waitpid(pid) rescue nil
-			pid = safe_fork do
-				b.puts(rand)
-			end
-			Process.waitpid(pid) rescue nil
-			
-			first_num = a.readline
-			second_num = a.readline
-			first_num.should_not == second_num
-		ensure
-			a.close rescue nil
-			b.close rescue nil
-		end
-	end
-	
-	specify "#safe_fork with double_fork == true reseeds the pseudo-random number generator" do
-		a, b = IO.pipe
-		begin
-			# Seed the pseudo-random number generator here
-			# so that it doesn't happen in the child processes.
-			srand
-			
-			safe_fork(self.class, true) do
-				b.puts(rand)
-			end
-			safe_fork(self.class, true) do
-				b.puts(rand)
-			end
-			
-			first_num = a.readline
-			second_num = a.readline
-			first_num.should_not == second_num
-		ensure
-			a.close rescue nil
-			b.close rescue nil
-		end
-	end
-	
-	describe "#unmarshal_and_raise_errors" do
-		before :each do
-			@a, @b = IO.pipe
-			@report_channel = MessageChannel.new(@a)
-			report_app_init_status(MessageChannel.new(@b)) do
-				raise StandardError, "Something went wrong!"
-			end
-		end
-		
-		after :each do
-			@a.close rescue nil
-			@b.close rescue nil
-		end
-		
-		it "prints the exception information to the 'print_exception' argument using #puts, if 'print_exception' responds to that" do
-			buffer = StringIO.new
-			lambda { unmarshal_and_raise_errors(@report_channel, buffer) }.should raise_error(AppInitError)
-			buffer.string.should =~ /Something went wrong!/
-			buffer.string.should =~ /utils\.rb/
-			buffer.string.should =~ /utils_spec\.rb/
-		end
-		
-		it "appends the exception information to the file pointed to by 'print_exception', if 'print_exception' responds to #to_str" do
-			begin
-				lambda { unmarshal_and_raise_errors(@report_channel, "exception.txt") }.should raise_error(AppInitError)
-				data = File.read('exception.txt')
-				data.should =~ /Something went wrong!/
-				data.should =~ /utils\.rb/
-				data.should =~ /utils_spec\.rb/
-			ensure
-				File.unlink('exception.txt') rescue nil
-			end
-		end
-	end
-	
 	specify "#to_boolean works" do
-		to_boolean(nil).should be_false
-		to_boolean(false).should be_false
-		to_boolean(true).should be_true
-		to_boolean(1).should be_true
-		to_boolean(0).should be_true
-		to_boolean("").should be_true
-		to_boolean("true").should be_true
-		to_boolean("false").should be_false
-		to_boolean("bla bla").should be_true
+		LoaderSharedHelpers.to_boolean(nil).should be_false
+		LoaderSharedHelpers.to_boolean(false).should be_false
+		LoaderSharedHelpers.to_boolean(true).should be_true
+		LoaderSharedHelpers.to_boolean(1).should be_true
+		LoaderSharedHelpers.to_boolean(0).should be_true
+		LoaderSharedHelpers.to_boolean("").should be_true
+		LoaderSharedHelpers.to_boolean("true").should be_true
+		LoaderSharedHelpers.to_boolean("false").should be_false
+		LoaderSharedHelpers.to_boolean("bla bla").should be_true
 	end
 	
 	specify "#split_by_null_into_hash works" do
@@ -289,459 +69,6 @@ describe Utils do
 		end
 	end
 	
-	when_user_switching_possible do
-		describe "#lower_privilege" do
-			before :each do
-				@options = {
-					"default_user"  => CONFIG["default_user"],
-					"default_group" => CONFIG["default_group"]
-				}
-				@startup_file = "tmp.startup_file"
-				@startup_file_target = "tmp.startup_file_target"
-				File.symlink(@startup_file_target, @startup_file)
-				File.touch(@startup_file_target)
-			end
-			
-			after :each do
-				File.unlink(@startup_file) rescue nil
-				File.unlink(@startup_file_target) rescue nil
-			end
-			
-			def run(options = {})
-				script = %q{
-					require 'phusion_passenger/utils'
-					include PhusionPassenger::Utils
-					options = Marshal.load(ARGV[0].unpack('m').first)
-					startup_file = ARGV[1]
-					begin
-						lower_privilege(startup_file, options)
-						puts "success"
-						puts Process.uid
-						puts Process.gid
-						puts `groups`
-						puts ENV["HOME"]
-						puts ENV["USER"]
-					rescue => e
-						puts "error"
-						puts e
-					end
-				}.strip
-				data = Marshal.dump(@options.merge(options))
-				output = run_script(script, [data].pack('m'), @startup_file)
-				lines = output.split("\n")
-				status = lines.shift
-				if status == "success"
-					@uid, @gid, @groups, @env_home, @env_user = lines
-					@uid = @uid.to_i
-					@gid = @gid.to_i
-					@username = Etc.getpwuid(@uid).name
-					@groupname = Etc.getgrgid(@gid).name
-				else
-					@error = lines[0]
-				end
-			end
-			
-			def primary_group_for(username)
-				gid = Etc.getpwnam(username).gid
-				return Etc.getgrgid(gid).name
-			end
-
-			def uid_for(username)
-				return Etc.getpwnam(username).uid
-			end
-			
-			def gid_for(group_name)
-				return Etc.getgrnam(group_name).gid
-			end
-			
-			def group_name_for_gid(gid)
-				return Etc.getgrgid(gid).name
-			end
-			
-			describe "if 'user' is given" do
-				describe "and 'user' is 'root'" do
-					before :each do
-						@options["user"] = "root"
-					end
-					
-					it "changes the user to the value of 'default_user'" do
-						run
-						@username.should == CONFIG["default_user"]
-					end
-					
-					specify "if 'group' is given, it changes group to the given group name" do
-						run("group" => CONFIG["normal_group_1"])
-						@groupname.should == CONFIG["normal_group_1"]
-					end
-					
-					specify "if 'group' is set to the root group, it changes group to default_group" do
-						run("group" => group_name_for_gid(0))
-						@groupname.should == CONFIG["default_group"]
-					end
-					
-					describe "and 'group' is set to '!STARTUP_FILE!'" do
-						before :each do
-							@options["group"] = "!STARTUP_FILE!"
-						end
-						
-						it "changes the group to the startup file's group" do
-							File.lchown(-1,
-								gid_for(CONFIG["normal_group_1"]),
-								@startup_file)
-							run
-							@groupname.should == CONFIG["normal_group_1"]
-						end
-						
-						specify "if the startup file is a symlink, then it uses the symlink's group, not the target's group" do
-							File.lchown(-1,
-								gid_for(CONFIG["normal_group_2"]),
-								@startup_file)
-							File.chown(-1,
-								gid_for(CONFIG["normal_group_1"]),
-								@startup_file_target)
-							run
-							@groupname.should == CONFIG["normal_group_2"]
-						end
-					end
-					
-					specify "if 'group' is not given, it changes the group to default_user's primary group" do
-						run
-						@groupname.should == primary_group_for(CONFIG["default_user"])
-					end
-				end
-				
-				describe "and 'user' is not 'root'" do
-					before :each do
-						@options["user"] = CONFIG["normal_user_1"]
-					end
-					
-					it "changes the user to the given username" do
-						run
-						@username.should == CONFIG["normal_user_1"]
-					end
-					
-					specify "if 'group' is given, it changes group to the given group name" do
-						run("group" => CONFIG["normal_group_1"])
-						@groupname.should == CONFIG["normal_group_1"]
-					end
-					
-					specify "if 'group' is set to the root group, it changes group to default_group" do
-						run("group" => group_name_for_gid(0))
-						@groupname.should == CONFIG["default_group"]
-					end
-					
-					describe "and 'group' is set to '!STARTUP_FILE!'" do
-						before :each do
-							@options["group"] = "!STARTUP_FILE!"
-						end
-						
-						it "changes the group to the startup file's group" do
-							File.lchown(-1,
-								gid_for(CONFIG["normal_group_1"]),
-								@startup_file)
-							run
-							@groupname.should == CONFIG["normal_group_1"]
-						end
-						
-						specify "if the startup file is a symlink, then it uses the symlink's group, not the target's group" do
-							File.lchown(-1,
-								gid_for(CONFIG["normal_group_2"]),
-								@startup_file)
-							File.chown(-1,
-								gid_for(CONFIG["normal_group_1"]),
-								@startup_file_target)
-							run
-							@groupname.should == CONFIG["normal_group_2"]
-						end
-					end
-					
-					specify "if 'group' is not given, it changes the group to the user's primary group" do
-						run
-						@groupname.should == primary_group_for(CONFIG["normal_user_1"])
-					end
-				end
-				
-				describe "and the given username does not exist" do
-					before :each do
-						@options["user"] = CONFIG["nonexistant_user"]
-					end
-					
-					it "changes the user to the value of 'default_user'" do
-						run
-						@username.should == CONFIG["default_user"]
-					end
-					
-					specify "if 'group' is given, it changes group to the given group name" do
-						run("group" => CONFIG["normal_group_1"])
-						@groupname.should == CONFIG["normal_group_1"]
-					end
-					
-					specify "if 'group' is set to the root group, it changes group to default_group" do
-						run("group" => group_name_for_gid(0))
-						@groupname.should == CONFIG["default_group"]
-					end
-					
-					describe "and 'group' is set to '!STARTUP_FILE!'" do
-						before :each do
-							@options["group"] = "!STARTUP_FILE!"
-						end
-						
-						it "changes the group to the startup file's group" do
-							File.lchown(-1,
-								gid_for(CONFIG["normal_group_1"]),
-								@startup_file)
-							run
-							@groupname.should == CONFIG["normal_group_1"]
-						end
-						
-						specify "if the startup file is a symlink, then it uses the symlink's group, not the target's group" do
-							File.lchown(-1,
-								gid_for(CONFIG["normal_group_2"]),
-								@startup_file)
-							File.chown(-1,
-								gid_for(CONFIG["normal_group_1"]),
-								@startup_file_target)
-							run
-							@groupname.should == CONFIG["normal_group_2"]
-						end
-					end
-					
-					specify "if 'group' is not given, it changes the group to default_user's primary group" do
-						run
-						@groupname.should == primary_group_for(CONFIG["default_user"])
-					end
-				end
-			end
-			describe "if 'user' is not given" do
-				describe "and the startup file's owner exists" do
-					before :each do
-						File.lchown(uid_for(CONFIG["normal_user_1"]),
-							-1,
-							@startup_file)
-					end
-					
-					it "changes the user to the owner of the startup file" do
-						run
-						@username.should == CONFIG["normal_user_1"]
-					end
-					
-					specify "if the startup file is a symlink, then it uses the symlink's owner, not the target's owner" do
-						File.lchown(uid_for(CONFIG["normal_user_2"]),
-							-1,
-							@startup_file)
-						File.chown(uid_for(CONFIG["normal_user_1"]),
-							-1,
-							@startup_file_target)
-						run
-						@username.should == CONFIG["normal_user_2"]
-					end
-					
-					specify "if 'group' is given, it changes group to the given group name" do
-						run("group" => CONFIG["normal_group_1"])
-						@groupname.should == CONFIG["normal_group_1"]
-					end
-					
-					specify "if 'group' is set to the root group, it changes group to default_group" do
-						run("group" => group_name_for_gid(0))
-						@groupname.should == CONFIG["default_group"]
-					end
-					
-					describe "and 'group' is set to '!STARTUP_FILE!'" do
-						before :each do
-							@options["group"] = "!STARTUP_FILE!"
-						end
-						
-						it "changes the group to the startup file's group" do
-							File.lchown(-1,
-								gid_for(CONFIG["normal_group_1"]),
-								@startup_file)
-							run
-							@groupname.should == CONFIG["normal_group_1"]
-						end
-						
-						specify "if the startup file is a symlink, then it uses the symlink's group, not the target's group" do
-							File.lchown(-1,
-								gid_for(CONFIG["normal_group_2"]),
-								@startup_file)
-							File.chown(-1,
-								gid_for(CONFIG["normal_group_1"]),
-								@startup_file_target)
-							run
-							@groupname.should == CONFIG["normal_group_2"]
-						end
-					end
-					
-					specify "if 'group' is not given, it changes the group to the startup file's owner's primary group" do
-						run
-						@groupname.should == primary_group_for(CONFIG["normal_user_1"])
-					end
-				end
-				
-				describe "and the startup file's owner doesn't exist" do
-					before :each do
-						File.lchown(CONFIG["nonexistant_uid"],
-							-1,
-							@startup_file)
-					end
-					
-					it "changes the user to the value of 'default_user'" do
-						run
-						@username.should == CONFIG["default_user"]
-					end
-					
-					specify "if 'group' is given, it changes group to the given group name" do
-						run("group" => CONFIG["normal_group_1"])
-						@groupname.should == CONFIG["normal_group_1"]
-					end
-					
-					specify "if 'group' is set to the root group, it changes group to default_group" do
-						run("group" => group_name_for_gid(0))
-						@groupname.should == CONFIG["default_group"]
-					end
-					
-					describe "and 'group' is set to '!STARTUP_FILE!'" do
-						before :each do
-							@options["group"] = "!STARTUP_FILE!"
-						end
-						
-						describe "and the startup file's group doesn't exist" do
-							before :each do
-								File.lchown(-1,
-									CONFIG["nonexistant_gid"],
-									@startup_file)
-							end
-							
-							it "changes the group to the value given by 'default_group'" do
-								run
-								@groupname.should == CONFIG["default_group"]
-							end
-						end
-						
-						describe "and the startup file's group exists" do
-							before :each do
-								File.lchown(-1,
-									gid_for(CONFIG["normal_group_1"]),
-									@startup_file)
-							end
-							
-							it "changes the group to the startup file's group" do
-								run
-								@groupname.should == CONFIG["normal_group_1"]
-							end
-							
-							specify "if the startup file is a symlink, then it uses the symlink's group, not the target's group" do
-								File.lchown(-1,
-									gid_for(CONFIG["normal_group_2"]),
-									@startup_file)
-								File.chown(-1,
-									gid_for(CONFIG["normal_group_1"]),
-									@startup_file_target)
-								run
-								@groupname.should == CONFIG["normal_group_2"]
-							end
-						end
-					end
-					
-					specify "if 'group' is not given, it changes the group to default_user's primary group" do
-						run
-						@groupname.should == primary_group_for(CONFIG["default_user"])
-					end
-				end
-			end
-			
-			it "raises an error if it tries to lower to 'default_user', but that user doesn't exist" do
-				run("user" => "root", "default_user" => CONFIG["nonexistant_user"])
-				@error.should =~ /Cannot determine a user to lower privilege to/
-			end
-			
-			it "raises an error if it tries to lower to 'default_group', but that group doesn't exist" do
-				run("user" => CONFIG["normal_user_1"],
-					"group" => group_name_for_gid(0),
-					"default_group" => CONFIG["nonexistant_group"])
-				@error.should =~ /Cannot determine a group to lower privilege to/
-			end
-			
-			it "changes supplementary groups to the owner's default supplementary groups" do
-				run("user" => CONFIG["normal_user_1"])
-				default_groups = `groups "#{CONFIG['normal_user_1']}"`.strip
-				default_groups.gsub!(/.*: */, '')
-				@groups.should == default_groups
-			end
-			
-			it "sets $HOME to the user's home directory" do
-				run("user" => CONFIG["normal_user_1"])
-				@env_home.should == Etc.getpwnam(CONFIG["normal_user_1"]).dir
-			end
-			
-			it "sets $USER to the user's name" do
-				run("user" => CONFIG["normal_user_1"])
-				@env_user.should == CONFIG["normal_user_1"]
-			end
-		end
-	end
-	
-	describe "#check_directory_tree_permissions" do
-		before :each do
-			@root = PhusionPassenger::Utils.passenger_tmpdir
-		end
-		
-		def primary_group_for(username)
-			gid = Etc.getpwnam(username).gid
-			return Etc.getgrgid(gid).name
-		end
-		
-		it "raises an error for the top-most parent directory that has wrong permissions" do
-			FileUtils.mkdir_p("#{@root}/a/b/c/d")
-			
-			when_running_as_root do
-				user = CONFIG['normal_user_1']
-				group = primary_group_for(user)
-				system("chown -R #{user} #{@root}/a")
-				system("chgrp -R #{group} #{@root}/a")
-				
-				output = run_script(%q{
-					require 'phusion_passenger/utils'
-					include PhusionPassenger::Utils
-					@root = ARGV[0]
-					lower_privilege(nil,
-						"user" => ARGV[1],
-						"group" => ARGV[2])
-					
-					File.chmod(0600, "#{@root}/a/b/c/d")
-					File.chmod(0600, "#{@root}/a/b/c")
-					File.chmod(0600, "#{@root}/a")
-					p check_directory_tree_permissions("#{@root}/a/b/c/d")
-					File.chmod(0700, "#{@root}/a")
-					p check_directory_tree_permissions("#{@root}/a/b/c/d")
-					File.chmod(0700, "#{@root}/a/b/c")
-					p check_directory_tree_permissions("#{@root}/a/b/c/d")
-					File.chmod(0700, "#{@root}/a/b/c/d")
-					p check_directory_tree_permissions("#{@root}/a/b/c/d")
-				}, @root, user, group)
-				lines = output.split("\n")
-				lines[0].should == ["#{@root}/a", true].inspect
-				lines[1].should == ["#{@root}/a/b/c", true].inspect
-				lines[2].should == ["#{@root}/a/b/c/d", false].inspect
-				lines[3].should == "nil"
-			end
-			when_not_running_as_root do
-				File.chmod(0000, "#{@root}/a/b/c/d")
-				File.chmod(0600, "#{@root}/a/b/c")
-				File.chmod(0600, "#{@root}/a")
-				check_directory_tree_permissions("#{@root}/a/b/c/d").should ==
-					["#{@root}/a", true]
-				File.chmod(0700, "#{@root}/a")
-				check_directory_tree_permissions("#{@root}/a/b/c/d").should ==
-					["#{@root}/a/b/c", true]
-				File.chmod(0700, "#{@root}/a/b/c")
-				check_directory_tree_permissions("#{@root}/a/b/c/d").should ==
-					["#{@root}/a/b/c/d", false]
-				File.chmod(0700, "#{@root}/a/b/c/d")
-				check_directory_tree_permissions("#{@root}/a/b/c/d").should be_nil
-			end
-		end
-	end
-	
 	######################
 end
 
diff --git a/test/ruby/wsgi/application_spawner_spec.rb b/test/ruby/wsgi/application_spawner_spec.rb
deleted file mode 100644
index bf8c07c..0000000
--- a/test/ruby/wsgi/application_spawner_spec.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
-require 'phusion_passenger/wsgi/application_spawner'
-require 'phusion_passenger/utils'
-require 'fileutils'
-require 'tempfile'
-
-module PhusionPassenger
-
-describe WSGI::ApplicationSpawner do
-	include Utils
-	
-	before :each do
-		@stub = Stub.new('wsgi')
-		File.unlink("#{@stub.app_root}/passenger_wsgi.pyc") rescue nil
-	end
-	
-	after :each do
-		@stub.destroy
-	end
-	
-	def spawn(app_root)
-		WSGI::ApplicationSpawner.spawn_application(
-			"app_root"     => app_root,
-			"default_user" => CONFIG['default_user'])
-	end
-	
-	it "can spawn our stub application" do
-		spawn(@stub.app_root).close
-	end
-	
-	it "creates a socket in Phusion Passenger's temp directory" do
-		begin
-			app = spawn(@stub.app_root)
-			File.chmod(0700, "#{passenger_tmpdir}/backends")
-			Dir["#{passenger_tmpdir}/backends/wsgi.*"].should have(1).item
-		ensure
-			app.close rescue nil
-		end
-	end
-	
-	specify "the backend process deletes its socket upon termination" do
-		spawn(@stub.app_root).close
-		File.chmod(0700, "#{passenger_tmpdir}/backends")
-		eventually do
-			Dir["#{passenger_tmpdir}/backends/wsgi.*"].empty?
-		end
-	end
-end
-
-end # module PhusionPassenger
diff --git a/test/stub/apache2/httpd.conf.erb b/test/stub/apache2/httpd.conf.erb
index b21afad..894854a 100644
--- a/test/stub/apache2/httpd.conf.erb
+++ b/test/stub/apache2/httpd.conf.erb
@@ -36,7 +36,7 @@ Listen 127.0.0.1:<%= @port %>
 LoadModule passenger_module "<%= @mod_passenger %>"
 
 PassengerRoot "<%= @passenger_root %>"
-PassengerRuby "<%= PlatformInfo.ruby_command %>"
+PassengerDefaultRuby "<%= PlatformInfo.ruby_command %>"
 PassengerDefaultUser <%= CONFIG['default_user'] %>
 PassengerDefaultGroup <%= CONFIG['default_group'] %>
 PassengerTempDir "<%= @passenger_temp_dir %>"
@@ -79,7 +79,7 @@ DocumentRoot "<%= @server_root %>"
 	LockFile  <%= @server_root %>/httpd.lock
 <% end %>
 PidFile   <%= @server_root %>/httpd.pid
-ErrorLog  <%= @passenger_root %>/test/test.log
+ErrorLog  <%= @server_root %>/../test.log
 CustomLog <%= @server_root %>/access.log combined
 
 <% if !vhosts.empty? && PlatformInfo.httpd_version < '2.4.0' %>
diff --git a/test/stub/message_channel.rb b/test/stub/message_channel.rb
deleted file mode 100644
index 1289b13..0000000
--- a/test/stub/message_channel.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env ruby
-source_root = File.expand_path(File.dirname(__FILE__) + "/../..")
-$LOAD_PATH.unshift("#{source_root}/lib")
-require 'phusion_passenger'
-require 'phusion_passenger/message_channel'
-
-include PhusionPassenger
-reader = MessageChannel.new(STDIN)
-writer = MessageChannel.new(STDOUT)
-writer.write(*(reader.read << "!!"))
-writer.write(*(reader.read << "??"))
diff --git a/test/stub/message_channel_2.rb b/test/stub/message_channel_2.rb
deleted file mode 100644
index d86d7be..0000000
--- a/test/stub/message_channel_2.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env ruby
-source_root = File.expand_path(File.dirname(__FILE__) + "/../..")
-$LOAD_PATH.unshift("#{source_root}/lib")
-require 'phusion_passenger'
-require 'phusion_passenger/message_channel'
-
-include PhusionPassenger
-reader = MessageChannel.new(STDIN)
-writer = MessageChannel.new(STDOUT)
-writer.write_scalar(reader.read_scalar << "!!")
-writer.write_scalar(reader.read_scalar << "??")
-writer.close
diff --git a/test/stub/message_channel_3.rb b/test/stub/message_channel_3.rb
deleted file mode 100644
index 888d3a4..0000000
--- a/test/stub/message_channel_3.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env ruby
-source_root = File.expand_path(File.dirname(__FILE__) + "/../..")
-$LOAD_PATH.unshift("#{source_root}/lib")
-require 'socket'
-require 'phusion_passenger'
-require 'phusion_passenger/message_channel'
-require 'phusion_passenger/utils'
-
-include PhusionPassenger
-channel = MessageChannel.new(UNIXSocket.for_fd(3))
-channel.write(*channel.read)
-channel.write_scalar(channel.read_scalar)
-
-io = channel.recv_io
-channel.send_io(io)
-io.close
-
-channel.write(*channel.read)
-channel.close
diff --git a/test/stub/nginx/nginx.conf.erb b/test/stub/nginx/nginx.conf.erb
index 414fe74..2d975e1 100644
--- a/test/stub/nginx/nginx.conf.erb
+++ b/test/stub/nginx/nginx.conf.erb
@@ -12,6 +12,7 @@ http {
     default_type       application/octet-stream;
     sendfile           on;
     keepalive_timeout  65;
+    server_names_hash_bucket_size 64;
     
     log_format  main  '$remote_addr - $remote_user [$time_local] $request '
                       '"$status" $body_bytes_sent "$http_referer" '
@@ -22,6 +23,8 @@ http {
     passenger_ruby <%= PlatformInfo.ruby_command %>;
     passenger_default_user <%= CONFIG['default_user'] %>;
     passenger_default_group <%= CONFIG['default_group'] %>;
+    passenger_max_pool_size <%= @max_pool_size %>;
+    passenger_log_level 3;
 
     <% for server in @servers %>
         server {
diff --git a/test/stub/rack/config.ru b/test/stub/rack/config.ru
index 70f4afb..deac01e 100644
--- a/test/stub/rack/config.ru
+++ b/test/stub/rack/config.ru
@@ -1,9 +1,34 @@
 app = lambda do |env|
-    if env['PATH_INFO'] == '/chunked'
+    case env['PATH_INFO']
+    when '/hello'
+        [200, { "Content-Type" => "text/html" }, "hello world"]
+    when '/chunked'
         chunks = ["7\r\nchunk1\n\r\n", "7\r\nchunk2\n\r\n", "7\r\nchunk3\n\r\n", "0\r\n\r\n"]
         [200, { "Content-Type" => "text/html", "Transfer-Encoding" => "chunked" }, chunks]
-    elsif env['PATH_INFO'] == '/pid'
-        [200, { "Content-Type" => "text/html" }, [$$]]
+    when '/pid'
+        [200, { "Content-Type" => "text/plain" }, [$$]]
+    when '/env'
+        body = ''
+        env.each_pair do |key, value|
+            body << "#{key} = #{value}\n"
+        end
+        [200, { "Content-Type" => "text/plain" }, [body]]
+    when '/upload'
+        File.open(env['HTTP_X_OUTPUT'], 'w') do |f|
+            while line = env['rack.input'].gets
+                f.write(line)
+                f.flush
+            end
+        end
+        [200, { "Content-Type" => "text/html" }, ["ok"]]
+    when '/print_stderr'
+        STDERR.puts "hello world!"
+        [200, { "Content-Type" => "text/html" }, ["ok"]]
+    when '/print_stdout_and_stderr'
+        STDOUT.puts "hello stdout!"
+        sleep 0.1  # Give HelperAgent the time to process stdout first.
+        STDERR.puts "hello stderr!"
+        [200, { "Content-Type" => "text/html" }, ["ok"]]
     else
         [200, { "Content-Type" => "text/html" }, ["hello <b>world</b>"]]
     end
diff --git a/test/stub/rack/start.rb b/test/stub/rack/start.rb
new file mode 100755
index 0000000..76f1e44
--- /dev/null
+++ b/test/stub/rack/start.rb
@@ -0,0 +1,52 @@
+#!/usr/bin/env ruby
+require 'socket'
+
+STDOUT.sync = true
+STDERR.sync = true
+puts "!> I have control 1.0"
+abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n"
+
+options = {}
+while (line = STDIN.readline) != "\n"
+	name, value = line.strip.split(/: */, 2)
+	options[name] = value
+end
+
+if ARGV[0] == "--execself"
+	# Used for testing https://code.google.com/p/phusion-passenger/issues/detail?id=842#c19
+	exec("ruby", $0)
+end
+
+server = TCPServer.new('127.0.0.1', 0)
+puts "!> Ready"
+puts "!> socket: main;tcp://127.0.0.1:#{server.addr[1]};session;1"
+puts "!> "
+
+while true
+	ios = select([server, STDIN])[0]
+	if ios.include?(server)
+		client = server.accept
+		line = client.readline
+		if line == "ping\n"
+			client.write("pong\n")
+		elsif line == "pid\n"
+			client.write("#{Process.pid}\n")
+		elsif line == "envvars\n"
+			str = ""
+			ENV.each_pair do |key, value|
+				str << "#{key} = #{value}\n"
+			end
+			client.write(str)
+		else
+			client.write("unknown request\n")
+		end
+		client.close
+	end
+	if ios.include?(STDIN)
+		begin
+			STDIN.readline
+		rescue EOFError
+			exit
+		end
+	end
+end
diff --git a/test/stub/rails_apps/2.3/foobar/Rakefile b/test/stub/rails2.3/Rakefile
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/Rakefile
rename to test/stub/rails2.3/Rakefile
diff --git a/test/stub/rails2.3/app/controllers/application_controller.rb b/test/stub/rails2.3/app/controllers/application_controller.rb
new file mode 100644
index 0000000..758dd98
--- /dev/null
+++ b/test/stub/rails2.3/app/controllers/application_controller.rb
@@ -0,0 +1,10 @@
+# Filters added to this controller apply to all controllers in the application.
+# Likewise, all the methods added will be available for all controllers.
+
+class ApplicationController < ActionController::Base
+  helper :all # include all helpers, all the time
+
+  # See ActionController::RequestForgeryProtection for details
+  # Uncomment the :secret if you're not using the cookie session store
+  protect_from_forgery # :secret => 'cd5f8fbe429e4b3cca1f5bc1ee91d179'
+end
diff --git a/test/stub/rails_apps/2.3/foobar/app/controllers/bar_controller_1.rb b/test/stub/rails2.3/app/controllers/bar_controller_1.rb
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/app/controllers/bar_controller_1.rb
rename to test/stub/rails2.3/app/controllers/bar_controller_1.rb
diff --git a/test/stub/rails_apps/2.3/foobar/app/controllers/bar_controller_2.rb b/test/stub/rails2.3/app/controllers/bar_controller_2.rb
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/app/controllers/bar_controller_2.rb
rename to test/stub/rails2.3/app/controllers/bar_controller_2.rb
diff --git a/test/stub/rails_apps/2.3/foobar/app/controllers/foo_controller.rb b/test/stub/rails2.3/app/controllers/foo_controller.rb
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/app/controllers/foo_controller.rb
rename to test/stub/rails2.3/app/controllers/foo_controller.rb
diff --git a/test/stub/rails_apps/2.3/foobar/app/helpers/application_helper.rb b/test/stub/rails2.3/app/helpers/application_helper.rb
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/app/helpers/application_helper.rb
rename to test/stub/rails2.3/app/helpers/application_helper.rb
diff --git a/test/stub/rails2.3/app/helpers/bar_helper.rb b/test/stub/rails2.3/app/helpers/bar_helper.rb
new file mode 100644
index 0000000..a755040
--- /dev/null
+++ b/test/stub/rails2.3/app/helpers/bar_helper.rb
@@ -0,0 +1,2 @@
+module BarHelper
+end
diff --git a/test/stub/rails2.3/app/helpers/foo_helper.rb b/test/stub/rails2.3/app/helpers/foo_helper.rb
new file mode 100644
index 0000000..c3ad23b
--- /dev/null
+++ b/test/stub/rails2.3/app/helpers/foo_helper.rb
@@ -0,0 +1,2 @@
+module FooHelper
+end
diff --git a/test/stub/rails_apps/2.3/foobar/config/boot.rb b/test/stub/rails2.3/config/boot.rb
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/config/boot.rb
rename to test/stub/rails2.3/config/boot.rb
diff --git a/test/stub/rails2.3/config/database.yml b/test/stub/rails2.3/config/database.yml
new file mode 100644
index 0000000..1779c88
--- /dev/null
+++ b/test/stub/rails2.3/config/database.yml
@@ -0,0 +1,19 @@
+# SQLite version 3.x
+#   gem install sqlite3-ruby (not necessary on OS X Leopard)
+development:
+  adapter: sqlite3
+  database: development.sqlite3
+  timeout: 5000
+
+# Warning: The database defined as 'test' will be erased and
+# re-generated from your development database when you run 'rake'.
+# Do not set this db to the same as development or production.
+test:
+  adapter: sqlite3
+  database: test.sqlite3
+  timeout: 5000
+
+production:
+  adapter: sqlite3
+  database: production.sqlite3
+  timeout: 5000
diff --git a/test/stub/rails2.3/config/environment.rb b/test/stub/rails2.3/config/environment.rb
new file mode 100644
index 0000000..b75a0bb
--- /dev/null
+++ b/test/stub/rails2.3/config/environment.rb
@@ -0,0 +1,62 @@
+# Be sure to restart your server when you modify this file
+
+# Uncomment below to force Rails into production mode when
+# you don't control web/app server and can't set it the proper way
+# ENV['RAILS_ENV'] ||= 'production'
+
+# Specifies gem version of Rails to use when vendor/rails is not present
+RAILS_GEM_VERSION = '~> 2.3.0' unless defined? RAILS_GEM_VERSION
+
+# Bootstrap the Rails environment, frameworks, and default configuration
+require File.join(File.dirname(__FILE__), 'boot')
+
+Rails::Initializer.run do |config|
+  # Settings in config/environments/* take precedence over those specified here.
+  # Application configuration should go into files in config/initializers
+  # -- all .rb files in that directory are automatically loaded.
+  # See Rails::Configuration for more options.
+
+  # Skip frameworks you're not going to use (only works if using vendor/rails).
+  # To use Rails without a database, you must remove the Active Record framework
+  config.frameworks -= [ :action_mailer, :active_resource ]
+  if defined?(PhusionPassenger) && !PhusionPassenger::App.options["active_record"]
+    config.frameworks -= [ :active_record ]
+  end
+
+  # Only load the plugins named here, in the order given. By default, all plugins 
+  # in vendor/plugins are loaded in alphabetical order.
+  # :all can be used as a placeholder for all plugins not explicitly named
+  # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
+  # Add additional load paths for your own custom dirs
+  # config.load_paths += %W( #{RAILS_ROOT}/extras )
+
+  # Force all environments to use the same logger level
+  # (by default production uses :info, the others :debug)
+  # config.log_level = :debug
+
+  # Your secret key for verifying cookie session data integrity.
+  # If you change this key, all old sessions will become invalid!
+  # Make sure the secret is at least 30 characters and all random, 
+  # no regular words or you'll be exposed to dictionary attacks.
+  config.action_controller.session = {
+    :key         => '_railsapp_session',
+    :secret      => '3b50a6869d4e48696e5d407cab7b390124b3d815b4a8ab3e452a6ae1972ce1dc9615db09977915b6715944170fec0d46847b5b8fbdb1a4634d5d7247e4db32c8'
+  }
+
+  # Use the database for sessions instead of the cookie-based default,
+  # which shouldn't be used to store highly confidential information
+  # (create the session table with 'rake db:sessions:create')
+  # config.action_controller.session_store = :active_record_store
+
+  # Use SQL instead of Active Record's schema dumper when creating the test database.
+  # This is necessary if your schema can't be completely dumped by the schema dumper,
+  # like if you have constraints or database-specific column types
+  # config.active_record.schema_format = :sql
+
+  # Activate observers that should always be running
+  # config.active_record.observers = :cacher, :garbage_collector
+
+  # Make Active Record use UTC-base instead of local time
+  # config.active_record.default_timezone = :utc
+end
diff --git a/test/stub/rails_apps/2.3/foobar/config/environments/development.rb b/test/stub/rails2.3/config/environments/development.rb
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/config/environments/development.rb
rename to test/stub/rails2.3/config/environments/development.rb
diff --git a/test/stub/rails_apps/2.3/foobar/config/environments/production.rb b/test/stub/rails2.3/config/environments/production.rb
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/config/environments/production.rb
rename to test/stub/rails2.3/config/environments/production.rb
diff --git a/test/stub/rails_apps/2.3/foobar/config/environments/staging.rb b/test/stub/rails2.3/config/environments/staging.rb
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/config/environments/staging.rb
rename to test/stub/rails2.3/config/environments/staging.rb
diff --git a/test/stub/rails_apps/2.3/foobar/config/initializers/inflections.rb b/test/stub/rails2.3/config/initializers/inflections.rb
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/config/initializers/inflections.rb
rename to test/stub/rails2.3/config/initializers/inflections.rb
diff --git a/test/stub/rails_apps/2.3/foobar/config/initializers/mime_types.rb b/test/stub/rails2.3/config/initializers/mime_types.rb
similarity index 100%
copy from test/stub/rails_apps/2.3/foobar/config/initializers/mime_types.rb
copy to test/stub/rails2.3/config/initializers/mime_types.rb
diff --git a/test/stub/rails2.3/config/routes.rb b/test/stub/rails2.3/config/routes.rb
new file mode 100644
index 0000000..5296635
--- /dev/null
+++ b/test/stub/rails2.3/config/routes.rb
@@ -0,0 +1,36 @@
+ActionController::Routing::Routes.draw do |map|
+  # The priority is based upon order of creation: first created -> highest priority.
+
+  # Sample of regular route:
+  #   map.connect 'products/:id', :controller => 'catalog', :action => 'view'
+  # Keep in mind you can assign values other than :controller and :action
+
+  # Sample of named route:
+  #   map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
+  # This route can be invoked with purchase_url(:id => product.id)
+
+  # Sample resource route (maps HTTP verbs to controller actions automatically):
+  #   map.resources :products
+
+  # Sample resource route with options:
+  #   map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
+
+  # Sample resource route with sub-resources:
+  #   map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
+
+  # Sample resource route within a namespace:
+  #   map.namespace :admin do |admin|
+  #     # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
+  #     admin.resources :products
+  #   end
+
+  # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
+  # map.root :controller => "welcome"
+
+  # See how all your routes lay out with "rake routes"
+
+  # Install the default routes as the lowest priority.
+  map.connect '/hello', :controller => 'foo', :action => 'new'
+  map.connect ':controller/:action/:id'
+  map.connect ':controller/:action/:id.:format'
+end
diff --git a/test/stub/rails_apps/2.3/foobar/script/about b/test/stub/rails2.3/script/about
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/script/about
rename to test/stub/rails2.3/script/about
diff --git a/test/stub/rails_apps/2.3/foobar/script/console b/test/stub/rails2.3/script/console
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/script/console
rename to test/stub/rails2.3/script/console
diff --git a/test/stub/rails_apps/2.3/foobar/script/dbconsole b/test/stub/rails2.3/script/dbconsole
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/script/dbconsole
rename to test/stub/rails2.3/script/dbconsole
diff --git a/test/stub/rails_apps/2.3/foobar/script/destroy b/test/stub/rails2.3/script/destroy
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/script/destroy
rename to test/stub/rails2.3/script/destroy
diff --git a/test/stub/rails_apps/2.3/foobar/script/generate b/test/stub/rails2.3/script/generate
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/script/generate
rename to test/stub/rails2.3/script/generate
diff --git a/test/stub/rails_apps/2.3/foobar/script/performance/benchmarker b/test/stub/rails2.3/script/performance/benchmarker
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/script/performance/benchmarker
rename to test/stub/rails2.3/script/performance/benchmarker
diff --git a/test/stub/rails_apps/2.3/foobar/script/performance/profiler b/test/stub/rails2.3/script/performance/profiler
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/script/performance/profiler
rename to test/stub/rails2.3/script/performance/profiler
diff --git a/test/stub/rails_apps/2.3/foobar/script/performance/request b/test/stub/rails2.3/script/performance/request
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/script/performance/request
rename to test/stub/rails2.3/script/performance/request
diff --git a/test/stub/rails_apps/2.3/foobar/script/plugin b/test/stub/rails2.3/script/plugin
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/script/plugin
rename to test/stub/rails2.3/script/plugin
diff --git a/test/stub/rails_apps/2.3/foobar/script/process/inspector b/test/stub/rails2.3/script/process/inspector
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/script/process/inspector
rename to test/stub/rails2.3/script/process/inspector
diff --git a/test/stub/rails_apps/2.3/foobar/script/process/reaper b/test/stub/rails2.3/script/process/reaper
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/script/process/reaper
rename to test/stub/rails2.3/script/process/reaper
diff --git a/test/stub/rails_apps/2.3/foobar/script/process/spawner b/test/stub/rails2.3/script/process/spawner
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/script/process/spawner
rename to test/stub/rails2.3/script/process/spawner
diff --git a/test/stub/rails_apps/2.3/foobar/script/runner b/test/stub/rails2.3/script/runner
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/script/runner
rename to test/stub/rails2.3/script/runner
diff --git a/test/stub/rails_apps/2.3/foobar/script/server b/test/stub/rails2.3/script/server
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/script/server
rename to test/stub/rails2.3/script/server
diff --git a/test/stub/rails_apps/3.0/empty/Gemfile b/test/stub/rails3.0/Gemfile
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/Gemfile
rename to test/stub/rails3.0/Gemfile
diff --git a/test/stub/rails3.0/Gemfile.lock b/test/stub/rails3.0/Gemfile.lock
new file mode 100644
index 0000000..1fdf289
--- /dev/null
+++ b/test/stub/rails3.0/Gemfile.lock
@@ -0,0 +1,80 @@
+GEM
+  remote: http://rubygems.org/
+  specs:
+    abstract (1.0.0)
+    actionmailer (3.0.20)
+      actionpack (= 3.0.20)
+      mail (~> 2.2.19)
+    actionpack (3.0.20)
+      activemodel (= 3.0.20)
+      activesupport (= 3.0.20)
+      builder (~> 2.1.2)
+      erubis (~> 2.6.6)
+      i18n (~> 0.5.0)
+      rack (~> 1.2.5)
+      rack-mount (~> 0.6.14)
+      rack-test (~> 0.5.7)
+      tzinfo (~> 0.3.23)
+    activemodel (3.0.20)
+      activesupport (= 3.0.20)
+      builder (~> 2.1.2)
+      i18n (~> 0.5.0)
+    activerecord (3.0.20)
+      activemodel (= 3.0.20)
+      activesupport (= 3.0.20)
+      arel (~> 2.0.10)
+      tzinfo (~> 0.3.23)
+    activeresource (3.0.20)
+      activemodel (= 3.0.20)
+      activesupport (= 3.0.20)
+    activesupport (3.0.20)
+    arel (2.0.10)
+    builder (2.1.2)
+    erubis (2.6.6)
+      abstract (>= 1.0.0)
+    i18n (0.5.0)
+    json (1.7.6)
+    mail (2.2.19)
+      activesupport (>= 2.3.6)
+      i18n (>= 0.4.0)
+      mime-types (~> 1.16)
+      treetop (~> 1.4.8)
+    mime-types (1.20.1)
+    polyglot (0.3.3)
+    rack (1.2.7)
+    rack-mount (0.6.14)
+      rack (>= 1.0.0)
+    rack-test (0.5.7)
+      rack (>= 1.0)
+    rails (3.0.20)
+      actionmailer (= 3.0.20)
+      actionpack (= 3.0.20)
+      activerecord (= 3.0.20)
+      activeresource (= 3.0.20)
+      activesupport (= 3.0.20)
+      bundler (~> 1.0)
+      railties (= 3.0.20)
+    railties (3.0.20)
+      actionpack (= 3.0.20)
+      activesupport (= 3.0.20)
+      rake (>= 0.8.7)
+      rdoc (~> 3.4)
+      thor (~> 0.14.4)
+    rake (10.0.3)
+    rdoc (3.12)
+      json (~> 1.4)
+    sqlite3 (1.3.6)
+    sqlite3-ruby (1.3.3)
+      sqlite3 (>= 1.3.3)
+    thor (0.14.6)
+    treetop (1.4.12)
+      polyglot
+      polyglot (>= 0.3.1)
+    tzinfo (0.3.35)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  rails (~> 3.0.0)
+  sqlite3-ruby
diff --git a/test/stub/rails_apps/3.0/empty/Rakefile b/test/stub/rails3.0/Rakefile
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/Rakefile
rename to test/stub/rails3.0/Rakefile
diff --git a/test/stub/rails_apps/3.0/empty/app/controllers/application_controller.rb b/test/stub/rails3.0/app/controllers/application_controller.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/app/controllers/application_controller.rb
rename to test/stub/rails3.0/app/controllers/application_controller.rb
diff --git a/test/stub/rails_apps/3.0/empty/app/helpers/application_helper.rb b/test/stub/rails3.0/app/helpers/application_helper.rb
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/app/helpers/application_helper.rb
copy to test/stub/rails3.0/app/helpers/application_helper.rb
diff --git a/test/stub/rails_apps/3.0/empty/app/views/layouts/application.html.erb b/test/stub/rails3.0/app/views/layouts/application.html.erb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/app/views/layouts/application.html.erb
rename to test/stub/rails3.0/app/views/layouts/application.html.erb
diff --git a/test/stub/rails_apps/3.0/empty/config.ru b/test/stub/rails3.0/config.ru
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/config.ru
copy to test/stub/rails3.0/config.ru
diff --git a/test/stub/rails_apps/3.0/empty/config/application.rb b/test/stub/rails3.0/config/application.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/config/application.rb
rename to test/stub/rails3.0/config/application.rb
diff --git a/test/stub/rails_apps/3.0/empty/config/boot.rb b/test/stub/rails3.0/config/boot.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/config/boot.rb
rename to test/stub/rails3.0/config/boot.rb
diff --git a/test/stub/rails_apps/3.0/empty/config/database.yml b/test/stub/rails3.0/config/database.yml
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/config/database.yml
rename to test/stub/rails3.0/config/database.yml
diff --git a/test/stub/rails_apps/3.0/empty/config/environment.rb b/test/stub/rails3.0/config/environment.rb
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/config/environment.rb
copy to test/stub/rails3.0/config/environment.rb
diff --git a/test/stub/rails_apps/3.0/empty/config/environments/development.rb b/test/stub/rails3.0/config/environments/development.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/config/environments/development.rb
rename to test/stub/rails3.0/config/environments/development.rb
diff --git a/test/stub/rails3.0/config/environments/production.rb b/test/stub/rails3.0/config/environments/production.rb
new file mode 100644
index 0000000..d24c8bc
--- /dev/null
+++ b/test/stub/rails3.0/config/environments/production.rb
@@ -0,0 +1,48 @@
+Empty::Application.configure do
+  # Settings specified here will take precedence over those in config/environment.rb
+
+  # The production environment is meant for finished, "live" apps.
+  # Code is not reloaded between requests
+  config.cache_classes = true
+
+  # Full error reports are disabled and caching is turned on
+  config.consider_all_requests_local       = false
+  config.action_controller.perform_caching = true
+
+  # Specifies the header that your server uses for sending files
+  config.action_dispatch.x_sendfile_header = "X-Sendfile"
+
+  # For nginx:
+  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
+
+  # If you have no front-end server that supports something like X-Sendfile,
+  # just comment this out and Rails will serve the files
+
+  # See everything in the log (default is :info)
+  # config.log_level = :debug
+
+  # Use a different logger for distributed setups
+  # config.logger = SyslogLogger.new
+
+  # Use a different cache store in production
+  # config.cache_store = :mem_cache_store
+
+  # Disable Rails's static asset server
+  # In production, Apache or nginx will already do this
+  config.serve_static_assets = false
+
+  # Enable serving of images, stylesheets, and javascripts from an asset server
+  # config.action_controller.asset_host = "http://assets.example.com"
+
+  # Disable delivery errors, bad email addresses will be ignored
+  # config.action_mailer.raise_delivery_errors = false
+
+  # Enable threaded mode
+  config.threadsafe!
+
+  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
+  # the I18n.default_locale when a translation can not be found)
+  config.i18n.fallbacks = true
+  
+  config.active_support.deprecation = :notify
+end
diff --git a/test/stub/rails_apps/3.0/empty/config/environments/test.rb b/test/stub/rails3.0/config/environments/test.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/config/environments/test.rb
rename to test/stub/rails3.0/config/environments/test.rb
diff --git a/test/stub/rails_apps/3.0/empty/config/initializers/backtrace_silencers.rb b/test/stub/rails3.0/config/initializers/backtrace_silencers.rb
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/config/initializers/backtrace_silencers.rb
copy to test/stub/rails3.0/config/initializers/backtrace_silencers.rb
diff --git a/test/stub/rails_apps/3.0/empty/config/initializers/inflections.rb b/test/stub/rails3.0/config/initializers/inflections.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/config/initializers/inflections.rb
rename to test/stub/rails3.0/config/initializers/inflections.rb
diff --git a/test/stub/rails_apps/3.0/empty/config/initializers/mime_types.rb b/test/stub/rails3.0/config/initializers/mime_types.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/config/initializers/mime_types.rb
rename to test/stub/rails3.0/config/initializers/mime_types.rb
diff --git a/test/stub/rails_apps/3.0/empty/config/initializers/passenger.rb b/test/stub/rails3.0/config/initializers/passenger.rb
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/config/initializers/passenger.rb
copy to test/stub/rails3.0/config/initializers/passenger.rb
diff --git a/test/stub/rails_apps/3.0/empty/config/initializers/secret_token.rb b/test/stub/rails3.0/config/initializers/secret_token.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/config/initializers/secret_token.rb
rename to test/stub/rails3.0/config/initializers/secret_token.rb
diff --git a/test/stub/rails_apps/3.0/empty/config/initializers/session_store.rb b/test/stub/rails3.0/config/initializers/session_store.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/config/initializers/session_store.rb
rename to test/stub/rails3.0/config/initializers/session_store.rb
diff --git a/test/stub/rails_apps/3.0/empty/config/locales/en.yml b/test/stub/rails3.0/config/locales/en.yml
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/config/locales/en.yml
rename to test/stub/rails3.0/config/locales/en.yml
diff --git a/test/stub/rails_apps/3.0/empty/config/routes.rb b/test/stub/rails3.0/config/routes.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/config/routes.rb
rename to test/stub/rails3.0/config/routes.rb
diff --git a/test/stub/rails_apps/3.0/empty/db/seeds.rb b/test/stub/rails3.0/db/seeds.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/db/seeds.rb
rename to test/stub/rails3.0/db/seeds.rb
diff --git a/test/stub/rails_apps/3.0/empty/doc/README_FOR_APP b/test/stub/rails3.0/doc/README_FOR_APP
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/doc/README_FOR_APP
copy to test/stub/rails3.0/doc/README_FOR_APP
diff --git a/test/stub/rails_apps/3.0/empty/public/404.html b/test/stub/rails3.0/public/404.html
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/public/404.html
copy to test/stub/rails3.0/public/404.html
diff --git a/test/stub/rails_apps/3.0/empty/public/422.html b/test/stub/rails3.0/public/422.html
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/public/422.html
copy to test/stub/rails3.0/public/422.html
diff --git a/test/stub/rails_apps/3.0/empty/public/500.html b/test/stub/rails3.0/public/500.html
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/public/500.html
copy to test/stub/rails3.0/public/500.html
diff --git a/test/stub/rails_apps/3.0/empty/public/favicon.ico b/test/stub/rails3.0/public/favicon.ico
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/public/favicon.ico
copy to test/stub/rails3.0/public/favicon.ico
diff --git a/test/stub/rails_apps/3.0/empty/public/index.html b/test/stub/rails3.0/public/index.html
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/public/index.html
rename to test/stub/rails3.0/public/index.html
diff --git a/test/stub/rails_apps/3.0/empty/public/robots.txt b/test/stub/rails3.0/public/robots.txt
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/public/robots.txt
copy to test/stub/rails3.0/public/robots.txt
diff --git a/test/stub/rails_apps/3.0/empty/script/rails b/test/stub/rails3.0/script/rails
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/script/rails
rename to test/stub/rails3.0/script/rails
diff --git a/test/stub/rails_apps/3.0/empty/test/performance/browsing_test.rb b/test/stub/rails3.0/test/performance/browsing_test.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/test/performance/browsing_test.rb
rename to test/stub/rails3.0/test/performance/browsing_test.rb
diff --git a/test/stub/rails_apps/3.0/empty/test/test_helper.rb b/test/stub/rails3.0/test/test_helper.rb
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/test/test_helper.rb
copy to test/stub/rails3.0/test/test_helper.rb
diff --git a/test/stub/rails3.1/Gemfile b/test/stub/rails3.1/Gemfile
new file mode 100644
index 0000000..4e7bc52
--- /dev/null
+++ b/test/stub/rails3.1/Gemfile
@@ -0,0 +1,37 @@
+source 'http://rubygems.org'
+
+gem 'rails', '~> 3.1.10'
+
+# Bundle edge Rails instead:
+# gem 'rails',     :git => 'git://github.com/rails/rails.git'
+
+gem 'sqlite3'
+
+gem 'json'
+
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+  gem 'sass-rails',   '~> 3.1.5'
+  gem 'coffee-rails', '~> 3.1.1'
+
+  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
+  # gem 'therubyracer'
+
+  gem 'uglifier', '>= 1.0.3'
+end
+
+gem 'jquery-rails'
+
+# To use ActiveModel has_secure_password
+# gem 'bcrypt-ruby', '~> 3.0.0'
+
+# Use unicorn as the web server
+# gem 'unicorn'
+
+# Deploy with Capistrano
+# gem 'capistrano'
+
+# To use debugger
+# gem 'ruby-debug'
+
diff --git a/test/stub/rails3.1/Gemfile.lock b/test/stub/rails3.1/Gemfile.lock
new file mode 100644
index 0000000..c5308e5
--- /dev/null
+++ b/test/stub/rails3.1/Gemfile.lock
@@ -0,0 +1,115 @@
+GEM
+  remote: http://rubygems.org/
+  specs:
+    actionmailer (3.1.10)
+      actionpack (= 3.1.10)
+      mail (~> 2.3.3)
+    actionpack (3.1.10)
+      activemodel (= 3.1.10)
+      activesupport (= 3.1.10)
+      builder (~> 3.0.0)
+      erubis (~> 2.7.0)
+      i18n (~> 0.6)
+      rack (~> 1.3.6)
+      rack-cache (~> 1.2)
+      rack-mount (~> 0.8.2)
+      rack-test (~> 0.6.1)
+      sprockets (~> 2.0.4)
+    activemodel (3.1.10)
+      activesupport (= 3.1.10)
+      builder (~> 3.0.0)
+      i18n (~> 0.6)
+    activerecord (3.1.10)
+      activemodel (= 3.1.10)
+      activesupport (= 3.1.10)
+      arel (~> 2.2.3)
+      tzinfo (~> 0.3.29)
+    activeresource (3.1.10)
+      activemodel (= 3.1.10)
+      activesupport (= 3.1.10)
+    activesupport (3.1.10)
+      multi_json (>= 1.0, < 1.3)
+    arel (2.2.3)
+    builder (3.0.4)
+    coffee-rails (3.1.1)
+      coffee-script (>= 2.2.0)
+      railties (~> 3.1.0)
+    coffee-script (2.2.0)
+      coffee-script-source
+      execjs
+    coffee-script-source (1.4.0)
+    erubis (2.7.0)
+    execjs (1.4.0)
+      multi_json (~> 1.0)
+    hike (1.2.1)
+    i18n (0.6.1)
+    jquery-rails (2.1.4)
+      railties (>= 3.0, < 5.0)
+      thor (>= 0.14, < 2.0)
+    json (1.7.6)
+    mail (2.3.3)
+      i18n (>= 0.4.0)
+      mime-types (~> 1.16)
+      treetop (~> 1.4.8)
+    mime-types (1.20.1)
+    multi_json (1.2.0)
+    polyglot (0.3.3)
+    rack (1.3.9)
+    rack-cache (1.2)
+      rack (>= 0.4)
+    rack-mount (0.8.3)
+      rack (>= 1.0.0)
+    rack-ssl (1.3.3)
+      rack
+    rack-test (0.6.2)
+      rack (>= 1.0)
+    rails (3.1.10)
+      actionmailer (= 3.1.10)
+      actionpack (= 3.1.10)
+      activerecord (= 3.1.10)
+      activeresource (= 3.1.10)
+      activesupport (= 3.1.10)
+      bundler (~> 1.0)
+      railties (= 3.1.10)
+    railties (3.1.10)
+      actionpack (= 3.1.10)
+      activesupport (= 3.1.10)
+      rack-ssl (~> 1.3.2)
+      rake (>= 0.8.7)
+      rdoc (~> 3.4)
+      thor (~> 0.14.6)
+    rake (10.0.3)
+    rdoc (3.12)
+      json (~> 1.4)
+    sass (3.2.5)
+    sass-rails (3.1.6)
+      actionpack (~> 3.1.0)
+      railties (~> 3.1.0)
+      sass (>= 3.1.10)
+      tilt (~> 1.3.2)
+    sprockets (2.0.4)
+      hike (~> 1.2)
+      rack (~> 1.0)
+      tilt (~> 1.1, != 1.3.0)
+    sqlite3 (1.3.7)
+    thor (0.14.6)
+    tilt (1.3.3)
+    treetop (1.4.12)
+      polyglot
+      polyglot (>= 0.3.1)
+    tzinfo (0.3.35)
+    uglifier (1.3.0)
+      execjs (>= 0.3.0)
+      multi_json (~> 1.0, >= 1.0.2)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  coffee-rails (~> 3.1.1)
+  jquery-rails
+  json
+  rails (~> 3.1.10)
+  sass-rails (~> 3.1.5)
+  sqlite3
+  uglifier (>= 1.0.3)
diff --git a/test/stub/rails3.1/README b/test/stub/rails3.1/README
new file mode 100644
index 0000000..7c36f23
--- /dev/null
+++ b/test/stub/rails3.1/README
@@ -0,0 +1,261 @@
+== Welcome to Rails
+
+Rails is a web-application framework that includes everything needed to create
+database-backed web applications according to the Model-View-Control pattern.
+
+This pattern splits the view (also called the presentation) into "dumb"
+templates that are primarily responsible for inserting pre-built data in between
+HTML tags. The model contains the "smart" domain objects (such as Account,
+Product, Person, Post) that holds all the business logic and knows how to
+persist themselves to a database. The controller handles the incoming requests
+(such as Save New Account, Update Product, Show Post) by manipulating the model
+and directing data to the view.
+
+In Rails, the model is handled by what's called an object-relational mapping
+layer entitled Active Record. This layer allows you to present the data from
+database rows as objects and embellish these data objects with business logic
+methods. You can read more about Active Record in
+link:files/vendor/rails/activerecord/README.html.
+
+The controller and view are handled by the Action Pack, which handles both
+layers by its two parts: Action View and Action Controller. These two layers
+are bundled in a single package due to their heavy interdependence. This is
+unlike the relationship between the Active Record and Action Pack that is much
+more separate. Each of these packages can be used independently outside of
+Rails. You can read more about Action Pack in
+link:files/vendor/rails/actionpack/README.html.
+
+
+== Getting Started
+
+1. At the command prompt, create a new Rails application:
+       <tt>rails new myapp</tt> (where <tt>myapp</tt> is the application name)
+
+2. Change directory to <tt>myapp</tt> and start the web server:
+       <tt>cd myapp; rails server</tt> (run with --help for options)
+
+3. Go to http://localhost:3000/ and you'll see:
+       "Welcome aboard: You're riding Ruby on Rails!"
+
+4. Follow the guidelines to start developing your application. You can find
+the following resources handy:
+
+* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
+* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
+
+
+== Debugging Rails
+
+Sometimes your application goes wrong. Fortunately there are a lot of tools that
+will help you debug it and get it back on the rails.
+
+First area to check is the application log files. Have "tail -f" commands
+running on the server.log and development.log. Rails will automatically display
+debugging and runtime information to these files. Debugging info will also be
+shown in the browser on requests from 127.0.0.1.
+
+You can also log your own messages directly into the log file from your code
+using the Ruby logger class from inside your controllers. Example:
+
+  class WeblogController < ActionController::Base
+    def destroy
+      @weblog = Weblog.find(params[:id])
+      @weblog.destroy
+      logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
+    end
+  end
+
+The result will be a message in your log file along the lines of:
+
+  Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
+
+More information on how to use the logger is at http://www.ruby-doc.org/core/
+
+Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
+several books available online as well:
+
+* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
+* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
+
+These two books will bring you up to speed on the Ruby language and also on
+programming in general.
+
+
+== Debugger
+
+Debugger support is available through the debugger command when you start your
+Mongrel or WEBrick server with --debugger. This means that you can break out of
+execution at any point in the code, investigate and change the model, and then,
+resume execution! You need to install ruby-debug to run the server in debugging
+mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
+
+  class WeblogController < ActionController::Base
+    def index
+      @posts = Post.all
+      debugger
+    end
+  end
+
+So the controller will accept the action, run the first line, then present you
+with a IRB prompt in the server window. Here you can do things like:
+
+  >> @posts.inspect
+  => "[#<Post:0x14a6be8
+          @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>,
+       #<Post:0x14a6620
+          @attributes={"title"=>"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
+  >> @posts.first.title = "hello from a debugger"
+  => "hello from a debugger"
+
+...and even better, you can examine how your runtime objects actually work:
+
+  >> f = @posts.first
+  => #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
+  >> f.
+  Display all 152 possibilities? (y or n)
+
+Finally, when you're ready to resume execution, you can enter "cont".
+
+
+== Console
+
+The console is a Ruby shell, which allows you to interact with your
+application's domain model. Here you'll have all parts of the application
+configured, just like it is when the application is running. You can inspect
+domain models, change values, and save to the database. Starting the script
+without arguments will launch it in the development environment.
+
+To start the console, run <tt>rails console</tt> from the application
+directory.
+
+Options:
+
+* Passing the <tt>-s, --sandbox</tt> argument will rollback any modifications
+  made to the database.
+* Passing an environment name as an argument will load the corresponding
+  environment. Example: <tt>rails console production</tt>.
+
+To reload your controllers and models after launching the console run
+<tt>reload!</tt>
+
+More information about irb can be found at:
+link:http://www.rubycentral.org/pickaxe/irb.html
+
+
+== dbconsole
+
+You can go to the command line of your database directly through <tt>rails
+dbconsole</tt>. You would be connected to the database with the credentials
+defined in database.yml. Starting the script without arguments will connect you
+to the development database. Passing an argument will connect you to a different
+database, like <tt>rails dbconsole production</tt>. Currently works for MySQL,
+PostgreSQL and SQLite 3.
+
+== Description of Contents
+
+The default directory structure of a generated Ruby on Rails application:
+
+  |-- app
+  |   |-- assets
+  |       |-- images
+  |       |-- javascripts
+  |       `-- stylesheets
+  |   |-- controllers
+  |   |-- helpers
+  |   |-- mailers
+  |   |-- models
+  |   `-- views
+  |       `-- layouts
+  |-- config
+  |   |-- environments
+  |   |-- initializers
+  |   `-- locales
+  |-- db
+  |-- doc
+  |-- lib
+  |   `-- tasks
+  |-- log
+  |-- public
+  |-- script
+  |-- test
+  |   |-- fixtures
+  |   |-- functional
+  |   |-- integration
+  |   |-- performance
+  |   `-- unit
+  |-- tmp
+  |   |-- cache
+  |   |-- pids
+  |   |-- sessions
+  |   `-- sockets
+  `-- vendor
+      |-- assets
+          `-- stylesheets
+      `-- plugins
+
+app
+  Holds all the code that's specific to this particular application.
+
+app/assets
+  Contains subdirectories for images, stylesheets, and JavaScript files.
+
+app/controllers
+  Holds controllers that should be named like weblogs_controller.rb for
+  automated URL mapping. All controllers should descend from
+  ApplicationController which itself descends from ActionController::Base.
+
+app/models
+  Holds models that should be named like post.rb. Models descend from
+  ActiveRecord::Base by default.
+
+app/views
+  Holds the template files for the view that should be named like
+  weblogs/index.html.erb for the WeblogsController#index action. All views use
+  eRuby syntax by default.
+
+app/views/layouts
+  Holds the template files for layouts to be used with views. This models the
+  common header/footer method of wrapping views. In your views, define a layout
+  using the <tt>layout :default</tt> and create a file named default.html.erb.
+  Inside default.html.erb, call <% yield %> to render the view using this
+  layout.
+
+app/helpers
+  Holds view helpers that should be named like weblogs_helper.rb. These are
+  generated for you automatically when using generators for controllers.
+  Helpers can be used to wrap functionality for your views into methods.
+
+config
+  Configuration files for the Rails environment, the routing map, the database,
+  and other dependencies.
+
+db
+  Contains the database schema in schema.rb. db/migrate contains all the
+  sequence of Migrations for your schema.
+
+doc
+  This directory is where your application documentation will be stored when
+  generated using <tt>rake doc:app</tt>
+
+lib
+  Application specific libraries. Basically, any kind of custom code that
+  doesn't belong under controllers, models, or helpers. This directory is in
+  the load path.
+
+public
+  The directory available for the web server. Also contains the dispatchers and the
+  default HTML files. This should be set as the DOCUMENT_ROOT of your web
+  server.
+
+script
+  Helper scripts for automation and generation.
+
+test
+  Unit and functional tests along with fixtures. When using the rails generate
+  command, template test files will be generated for you and placed in this
+  directory.
+
+vendor
+  External libraries that the application depends on. Also includes the plugins
+  subdirectory. If the app has frozen rails, those gems also go here, under
+  vendor/rails/. This directory is in the load path.
diff --git a/test/stub/rails3.1/Rakefile b/test/stub/rails3.1/Rakefile
new file mode 100644
index 0000000..8c868e7
--- /dev/null
+++ b/test/stub/rails3.1/Rakefile
@@ -0,0 +1,7 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+Empty::Application.load_tasks
diff --git a/test/stub/rails3.1/app/assets/images/rails.png b/test/stub/rails3.1/app/assets/images/rails.png
new file mode 100644
index 0000000..d5edc04
Binary files /dev/null and b/test/stub/rails3.1/app/assets/images/rails.png differ
diff --git a/test/stub/rails3.1/app/assets/stylesheets/application.css b/test/stub/rails3.1/app/assets/stylesheets/application.css
new file mode 100644
index 0000000..fc25b57
--- /dev/null
+++ b/test/stub/rails3.1/app/assets/stylesheets/application.css
@@ -0,0 +1,7 @@
+/*
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
+ *= require_self
+ *= require_tree . 
+*/
\ No newline at end of file
diff --git a/test/stub/rails3.1/app/controllers/application_controller.rb b/test/stub/rails3.1/app/controllers/application_controller.rb
new file mode 100644
index 0000000..e8065d9
--- /dev/null
+++ b/test/stub/rails3.1/app/controllers/application_controller.rb
@@ -0,0 +1,3 @@
+class ApplicationController < ActionController::Base
+  protect_from_forgery
+end
diff --git a/test/stub/rails_apps/3.0/empty/app/helpers/application_helper.rb b/test/stub/rails3.1/app/helpers/application_helper.rb
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/app/helpers/application_helper.rb
copy to test/stub/rails3.1/app/helpers/application_helper.rb
diff --git a/test/stub/rails3.1/app/views/layouts/application.html.erb b/test/stub/rails3.1/app/views/layouts/application.html.erb
new file mode 100644
index 0000000..5c36c37
--- /dev/null
+++ b/test/stub/rails3.1/app/views/layouts/application.html.erb
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>Empty</title>
+  <%= stylesheet_link_tag    "application" %>
+  <%= javascript_include_tag "application" %>
+  <%= csrf_meta_tags %>
+</head>
+<body>
+
+<%= yield %>
+
+</body>
+</html>
diff --git a/test/stub/rails_apps/3.0/empty/config.ru b/test/stub/rails3.1/config.ru
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/config.ru
copy to test/stub/rails3.1/config.ru
diff --git a/test/stub/rails3.1/config/application.rb b/test/stub/rails3.1/config/application.rb
new file mode 100644
index 0000000..000c3d2
--- /dev/null
+++ b/test/stub/rails3.1/config/application.rb
@@ -0,0 +1,48 @@
+require File.expand_path('../boot', __FILE__)
+
+require 'rails/all'
+
+if defined?(Bundler)
+  # If you precompile assets before deploying to production, use this line
+  Bundler.require(*Rails.groups(:assets => %w(development test)))
+  # If you want your assets lazily compiled in production, use this line
+  # Bundler.require(:default, :assets, Rails.env)
+end
+
+module Empty
+  class Application < Rails::Application
+    # Settings in config/environments/* take precedence over those specified here.
+    # Application configuration should go into files in config/initializers
+    # -- all .rb files in that directory are automatically loaded.
+
+    # Custom directories with classes and modules you want to be autoloadable.
+    # config.autoload_paths += %W(#{config.root}/extras)
+
+    # Only load the plugins named here, in the order given (default is alphabetical).
+    # :all can be used as a placeholder for all plugins not explicitly named.
+    # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
+    # Activate observers that should always be running.
+    # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
+
+    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
+    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
+    # config.time_zone = 'Central Time (US & Canada)'
+
+    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+    # config.i18n.default_locale = :de
+
+    # Configure the default encoding used in templates for Ruby 1.9.
+    config.encoding = "utf-8"
+
+    # Configure sensitive parameters which will be filtered from the log file.
+    config.filter_parameters += [:password]
+
+    # Enable the asset pipeline
+    config.assets.enabled = true
+
+    # Version of your assets, change this if you want to expire all your assets
+    config.assets.version = '1.0'
+  end
+end
diff --git a/test/stub/rails3.1/config/boot.rb b/test/stub/rails3.1/config/boot.rb
new file mode 100644
index 0000000..4489e58
--- /dev/null
+++ b/test/stub/rails3.1/config/boot.rb
@@ -0,0 +1,6 @@
+require 'rubygems'
+
+# Set up gems listed in the Gemfile.
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
diff --git a/test/stub/rails3.1/config/database.yml b/test/stub/rails3.1/config/database.yml
new file mode 100644
index 0000000..51a4dd4
--- /dev/null
+++ b/test/stub/rails3.1/config/database.yml
@@ -0,0 +1,25 @@
+# SQLite version 3.x
+#   gem install sqlite3
+#
+#   Ensure the SQLite 3 gem is defined in your Gemfile
+#   gem 'sqlite3'
+development:
+  adapter: sqlite3
+  database: db/development.sqlite3
+  pool: 5
+  timeout: 5000
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+  adapter: sqlite3
+  database: db/test.sqlite3
+  pool: 5
+  timeout: 5000
+
+production:
+  adapter: sqlite3
+  database: db/production.sqlite3
+  pool: 5
+  timeout: 5000
diff --git a/test/stub/rails_apps/3.0/empty/config/environment.rb b/test/stub/rails3.1/config/environment.rb
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/config/environment.rb
copy to test/stub/rails3.1/config/environment.rb
diff --git a/test/stub/rails3.1/config/environments/development.rb b/test/stub/rails3.1/config/environments/development.rb
new file mode 100644
index 0000000..818e350
--- /dev/null
+++ b/test/stub/rails3.1/config/environments/development.rb
@@ -0,0 +1,30 @@
+Empty::Application.configure do
+  # Settings specified here will take precedence over those in config/application.rb
+
+  # In the development environment your application's code is reloaded on
+  # every request.  This slows down response time but is perfect for development
+  # since you don't have to restart the web server when you make code changes.
+  config.cache_classes = false
+
+  # Log error messages when you accidentally call methods on nil.
+  config.whiny_nils = true
+
+  # Show full error reports and disable caching
+  config.consider_all_requests_local       = true
+  config.action_controller.perform_caching = false
+
+  # Don't care if the mailer can't send
+  config.action_mailer.raise_delivery_errors = false
+
+  # Print deprecation notices to the Rails logger
+  config.active_support.deprecation = :log
+
+  # Only use best-standards-support built into browsers
+  config.action_dispatch.best_standards_support = :builtin
+
+  # Do not compress assets
+  config.assets.compress = false
+
+  # Expands the lines which load the assets
+  config.assets.debug = true
+end
diff --git a/test/stub/rails3.1/config/environments/production.rb b/test/stub/rails3.1/config/environments/production.rb
new file mode 100644
index 0000000..62c1456
--- /dev/null
+++ b/test/stub/rails3.1/config/environments/production.rb
@@ -0,0 +1,60 @@
+Empty::Application.configure do
+  # Settings specified here will take precedence over those in config/application.rb
+
+  # Code is not reloaded between requests
+  config.cache_classes = true
+
+  # Full error reports are disabled and caching is turned on
+  config.consider_all_requests_local       = false
+  config.action_controller.perform_caching = true
+
+  # Disable Rails's static asset server (Apache or nginx will already do this)
+  config.serve_static_assets = false
+
+  # Compress JavaScripts and CSS
+  config.assets.compress = true
+
+  # Don't fallback to assets pipeline if a precompiled asset is missed
+  config.assets.compile = false
+
+  # Generate digests for assets URLs
+  config.assets.digest = true
+
+  # Defaults to Rails.root.join("public/assets")
+  # config.assets.manifest = YOUR_PATH
+
+  # Specifies the header that your server uses for sending files
+  # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
+  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
+
+  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
+  # config.force_ssl = true
+
+  # See everything in the log (default is :info)
+  config.log_level = :debug
+
+  # Use a different logger for distributed setups
+  # config.logger = SyslogLogger.new
+
+  # Use a different cache store in production
+  # config.cache_store = :mem_cache_store
+
+  # Enable serving of images, stylesheets, and JavaScripts from an asset server
+  # config.action_controller.asset_host = "http://assets.example.com"
+
+  # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
+  # config.assets.precompile += %w( search.js )
+
+  # Disable delivery errors, bad email addresses will be ignored
+  # config.action_mailer.raise_delivery_errors = false
+
+  # Enable threaded mode
+  config.threadsafe!
+
+  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
+  # the I18n.default_locale when a translation can not be found)
+  config.i18n.fallbacks = true
+
+  # Send deprecation notices to registered listeners
+  config.active_support.deprecation = :notify
+end
diff --git a/test/stub/rails3.1/config/environments/test.rb b/test/stub/rails3.1/config/environments/test.rb
new file mode 100644
index 0000000..dbe27cc
--- /dev/null
+++ b/test/stub/rails3.1/config/environments/test.rb
@@ -0,0 +1,39 @@
+Empty::Application.configure do
+  # Settings specified here will take precedence over those in config/application.rb
+
+  # The test environment is used exclusively to run your application's
+  # test suite.  You never need to work with it otherwise.  Remember that
+  # your test database is "scratch space" for the test suite and is wiped
+  # and recreated between test runs.  Don't rely on the data there!
+  config.cache_classes = true
+
+  # Configure static asset server for tests with Cache-Control for performance
+  config.serve_static_assets = true
+  config.static_cache_control = "public, max-age=3600"
+
+  # Log error messages when you accidentally call methods on nil
+  config.whiny_nils = true
+
+  # Show full error reports and disable caching
+  config.consider_all_requests_local       = true
+  config.action_controller.perform_caching = false
+
+  # Raise exceptions instead of rendering exception templates
+  config.action_dispatch.show_exceptions = false
+
+  # Disable request forgery protection in test environment
+  config.action_controller.allow_forgery_protection    = false
+
+  # Tell Action Mailer not to deliver emails to the real world.
+  # The :test delivery method accumulates sent emails in the
+  # ActionMailer::Base.deliveries array.
+  config.action_mailer.delivery_method = :test
+
+  # Use SQL instead of Active Record's schema dumper when creating the test database.
+  # This is necessary if your schema can't be completely dumped by the schema dumper,
+  # like if you have constraints or database-specific column types
+  # config.active_record.schema_format = :sql
+
+  # Print deprecation notices to the stderr
+  config.active_support.deprecation = :stderr
+end
diff --git a/test/stub/rails_apps/3.0/empty/config/initializers/backtrace_silencers.rb b/test/stub/rails3.1/config/initializers/backtrace_silencers.rb
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/config/initializers/backtrace_silencers.rb
copy to test/stub/rails3.1/config/initializers/backtrace_silencers.rb
diff --git a/test/stub/rails3.1/config/initializers/inflections.rb b/test/stub/rails3.1/config/initializers/inflections.rb
new file mode 100644
index 0000000..9e8b013
--- /dev/null
+++ b/test/stub/rails3.1/config/initializers/inflections.rb
@@ -0,0 +1,10 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format
+# (all these examples are active by default):
+# ActiveSupport::Inflector.inflections do |inflect|
+#   inflect.plural /^(ox)$/i, '\1en'
+#   inflect.singular /^(ox)en/i, '\1'
+#   inflect.irregular 'person', 'people'
+#   inflect.uncountable %w( fish sheep )
+# end
diff --git a/test/stub/rails_apps/2.3/foobar/config/initializers/mime_types.rb b/test/stub/rails3.1/config/initializers/mime_types.rb
similarity index 100%
copy from test/stub/rails_apps/2.3/foobar/config/initializers/mime_types.rb
copy to test/stub/rails3.1/config/initializers/mime_types.rb
diff --git a/test/stub/rails_apps/3.0/empty/config/initializers/passenger.rb b/test/stub/rails3.1/config/initializers/passenger.rb
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/config/initializers/passenger.rb
copy to test/stub/rails3.1/config/initializers/passenger.rb
diff --git a/test/stub/rails3.1/config/initializers/secret_token.rb b/test/stub/rails3.1/config/initializers/secret_token.rb
new file mode 100644
index 0000000..550a6ab
--- /dev/null
+++ b/test/stub/rails3.1/config/initializers/secret_token.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+Empty::Application.config.secret_token = '0c64bf93db915cd615abffa56b5e29dd520a5afc5d6960f5962e8c2f2d566dbc01bae2f1dc43656a4867bd6905e04838278ab2771aa6809e11676a8189edb016'
diff --git a/test/stub/rails3.1/config/initializers/session_store.rb b/test/stub/rails3.1/config/initializers/session_store.rb
new file mode 100644
index 0000000..91e8b82
--- /dev/null
+++ b/test/stub/rails3.1/config/initializers/session_store.rb
@@ -0,0 +1,8 @@
+# Be sure to restart your server when you modify this file.
+
+Empty::Application.config.session_store :cookie_store, :key => '_empty_session'
+
+# Use the database for sessions instead of the cookie-based default,
+# which shouldn't be used to store highly confidential information
+# (create the session table with "rails generate session_migration")
+# Empty::Application.config.session_store :active_record_store
diff --git a/test/stub/rails3.1/config/initializers/wrap_parameters.rb b/test/stub/rails3.1/config/initializers/wrap_parameters.rb
new file mode 100644
index 0000000..da4fb07
--- /dev/null
+++ b/test/stub/rails3.1/config/initializers/wrap_parameters.rb
@@ -0,0 +1,14 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file contains settings for ActionController::ParamsWrapper which
+# is enabled by default.
+
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
+ActiveSupport.on_load(:action_controller) do
+  wrap_parameters :format => [:json]
+end
+
+# Disable root element in JSON by default.
+ActiveSupport.on_load(:active_record) do
+  self.include_root_in_json = false
+end
diff --git a/test/stub/rails3.1/config/locales/en.yml b/test/stub/rails3.1/config/locales/en.yml
new file mode 100644
index 0000000..179c14c
--- /dev/null
+++ b/test/stub/rails3.1/config/locales/en.yml
@@ -0,0 +1,5 @@
+# Sample localization file for English. Add more files in this directory for other locales.
+# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+en:
+  hello: "Hello world"
diff --git a/test/stub/rails3.1/config/routes.rb b/test/stub/rails3.1/config/routes.rb
new file mode 100644
index 0000000..4f6250f
--- /dev/null
+++ b/test/stub/rails3.1/config/routes.rb
@@ -0,0 +1,58 @@
+Empty::Application.routes.draw do
+  # The priority is based upon order of creation:
+  # first created -> highest priority.
+
+  # Sample of regular route:
+  #   match 'products/:id' => 'catalog#view'
+  # Keep in mind you can assign values other than :controller and :action
+
+  # Sample of named route:
+  #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
+  # This route can be invoked with purchase_url(:id => product.id)
+
+  # Sample resource route (maps HTTP verbs to controller actions automatically):
+  #   resources :products
+
+  # Sample resource route with options:
+  #   resources :products do
+  #     member do
+  #       get 'short'
+  #       post 'toggle'
+  #     end
+  #
+  #     collection do
+  #       get 'sold'
+  #     end
+  #   end
+
+  # Sample resource route with sub-resources:
+  #   resources :products do
+  #     resources :comments, :sales
+  #     resource :seller
+  #   end
+
+  # Sample resource route with more complex sub-resources
+  #   resources :products do
+  #     resources :comments
+  #     resources :sales do
+  #       get 'recent', :on => :collection
+  #     end
+  #   end
+
+  # Sample resource route within a namespace:
+  #   namespace :admin do
+  #     # Directs /admin/products/* to Admin::ProductsController
+  #     # (app/controllers/admin/products_controller.rb)
+  #     resources :products
+  #   end
+
+  # You can have the root of your site routed with "root"
+  # just remember to delete public/index.html.
+  # root :to => 'welcome#index'
+
+  # See how all your routes lay out with "rake routes"
+
+  # This is a legacy wild controller route that's not recommended for RESTful applications.
+  # Note: This route will make all actions in every controller accessible via GET requests.
+  match ':controller(/:action(/:id(.:format)))'
+end
diff --git a/test/stub/rails3.1/db/seeds.rb b/test/stub/rails3.1/db/seeds.rb
new file mode 100644
index 0000000..d34dfa0
--- /dev/null
+++ b/test/stub/rails3.1/db/seeds.rb
@@ -0,0 +1,7 @@
+# This file should contain all the record creation needed to seed the database with its default values.
+# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
+#
+# Examples:
+#
+#   cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
+#   Mayor.create(:name => 'Emanuel', :city => cities.first)
diff --git a/test/stub/rails_apps/3.0/empty/doc/README_FOR_APP b/test/stub/rails3.1/doc/README_FOR_APP
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/doc/README_FOR_APP
copy to test/stub/rails3.1/doc/README_FOR_APP
diff --git a/test/stub/rails_apps/3.0/empty/public/404.html b/test/stub/rails3.1/public/404.html
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/public/404.html
copy to test/stub/rails3.1/public/404.html
diff --git a/test/stub/rails_apps/3.0/empty/public/422.html b/test/stub/rails3.1/public/422.html
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/public/422.html
copy to test/stub/rails3.1/public/422.html
diff --git a/test/stub/rails_apps/3.0/empty/public/500.html b/test/stub/rails3.1/public/500.html
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/public/500.html
rename to test/stub/rails3.1/public/500.html
diff --git a/test/stub/rails_apps/3.0/empty/public/favicon.ico b/test/stub/rails3.1/public/favicon.ico
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/public/favicon.ico
copy to test/stub/rails3.1/public/favicon.ico
diff --git a/test/stub/rails3.1/public/index.html b/test/stub/rails3.1/public/index.html
new file mode 100644
index 0000000..9d9811a
--- /dev/null
+++ b/test/stub/rails3.1/public/index.html
@@ -0,0 +1,241 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Ruby on Rails: Welcome aboard</title>
+    <style type="text/css" media="screen">
+      body {
+        margin: 0;
+        margin-bottom: 25px;
+        padding: 0;
+        background-color: #f0f0f0;
+        font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
+        font-size: 13px;
+        color: #333;
+      }
+
+      h1 {
+        font-size: 28px;
+        color: #000;
+      }
+
+      a  {color: #03c}
+      a:hover {
+        background-color: #03c;
+        color: white;
+        text-decoration: none;
+      }
+
+
+      #page {
+        background-color: #f0f0f0;
+        width: 750px;
+        margin: 0;
+        margin-left: auto;
+        margin-right: auto;
+      }
+
+      #content {
+        float: left;
+        background-color: white;
+        border: 3px solid #aaa;
+        border-top: none;
+        padding: 25px;
+        width: 500px;
+      }
+
+      #sidebar {
+        float: right;
+        width: 175px;
+      }
+
+      #footer {
+        clear: both;
+      }
+
+      #header, #about, #getting-started {
+        padding-left: 75px;
+        padding-right: 30px;
+      }
+
+
+      #header {
+        background-image: url("/assets/rails.png");
+        background-repeat: no-repeat;
+        background-position: top left;
+        height: 64px;
+      }
+      #header h1, #header h2 {margin: 0}
+      #header h2 {
+        color: #888;
+        font-weight: normal;
+        font-size: 16px;
+      }
+
+
+      #about h3 {
+        margin: 0;
+        margin-bottom: 10px;
+        font-size: 14px;
+      }
+
+      #about-content {
+        background-color: #ffd;
+        border: 1px solid #fc0;
+        margin-left: -55px;
+        margin-right: -10px;
+      }
+      #about-content table {
+        margin-top: 10px;
+        margin-bottom: 10px;
+        font-size: 11px;
+        border-collapse: collapse;
+      }
+      #about-content td {
+        padding: 10px;
+        padding-top: 3px;
+        padding-bottom: 3px;
+      }
+      #about-content td.name  {color: #555}
+      #about-content td.value {color: #000}
+
+      #about-content ul {
+        padding: 0;
+        list-style-type: none;
+      }
+
+      #about-content.failure {
+        background-color: #fcc;
+        border: 1px solid #f00;
+      }
+      #about-content.failure p {
+        margin: 0;
+        padding: 10px;
+      }
+
+
+      #getting-started {
+        border-top: 1px solid #ccc;
+        margin-top: 25px;
+        padding-top: 15px;
+      }
+      #getting-started h1 {
+        margin: 0;
+        font-size: 20px;
+      }
+      #getting-started h2 {
+        margin: 0;
+        font-size: 14px;
+        font-weight: normal;
+        color: #333;
+        margin-bottom: 25px;
+      }
+      #getting-started ol {
+        margin-left: 0;
+        padding-left: 0;
+      }
+      #getting-started li {
+        font-size: 18px;
+        color: #888;
+        margin-bottom: 25px;
+      }
+      #getting-started li h2 {
+        margin: 0;
+        font-weight: normal;
+        font-size: 18px;
+        color: #333;
+      }
+      #getting-started li p {
+        color: #555;
+        font-size: 13px;
+      }
+
+
+      #sidebar ul {
+        margin-left: 0;
+        padding-left: 0;
+      }
+      #sidebar ul h3 {
+        margin-top: 25px;
+        font-size: 16px;
+        padding-bottom: 10px;
+        border-bottom: 1px solid #ccc;
+      }
+      #sidebar li {
+        list-style-type: none;
+      }
+      #sidebar ul.links li {
+        margin-bottom: 5px;
+      }
+
+      .filename {
+        font-style: italic;
+      }
+    </style>
+    <script type="text/javascript">
+      function about() {
+        info = document.getElementById('about-content');
+        if (window.XMLHttpRequest)
+          { xhr = new XMLHttpRequest(); }
+        else
+          { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
+        xhr.open("GET","rails/info/properties",false);
+        xhr.send("");
+        info.innerHTML = xhr.responseText;
+        info.style.display = 'block'
+      }
+    </script>
+  </head>
+  <body>
+    <div id="page">
+      <div id="sidebar">
+        <ul id="sidebar-items">
+          <li>
+            <h3>Browse the documentation</h3>
+            <ul class="links">
+              <li><a href="http://guides.rubyonrails.org/">Rails Guides</a></li>
+              <li><a href="http://api.rubyonrails.org/">Rails API</a></li>
+              <li><a href="http://www.ruby-doc.org/core/">Ruby core</a></li>
+              <li><a href="http://www.ruby-doc.org/stdlib/">Ruby standard library</a></li>
+            </ul>
+          </li>
+        </ul>
+      </div>
+
+      <div id="content">
+        <div id="header">
+          <h1>Welcome aboard</h1>
+          <h2>You’re riding Ruby on Rails!</h2>
+        </div>
+
+        <div id="about">
+          <h3><a href="rails/info/properties" onclick="about(); return false">About your application’s environment</a></h3>
+          <div id="about-content" style="display: none"></div>
+        </div>
+
+        <div id="getting-started">
+          <h1>Getting started</h1>
+          <h2>Here’s how to get rolling:</h2>
+
+          <ol>
+            <li>
+              <h2>Use <code>rails generate</code> to create your models and controllers</h2>
+              <p>To see all available options, run it without parameters.</p>
+            </li>
+
+            <li>
+              <h2>Set up a default route and remove <span class="filename">public/index.html</span></h2>
+              <p>Routes are set up in <span class="filename">config/routes.rb</span>.</p>
+            </li>
+
+            <li>
+              <h2>Create your database</h2>
+              <p>Run <code>rake db:create</code> to create your database. If you're not using SQLite (the default), edit <span class="filename">config/database.yml</span> with your username and password.</p>
+            </li>
+          </ol>
+        </div>
+      </div>
+
+      <div id="footer"> </div>
+    </div>
+  </body>
+</html>
diff --git a/test/stub/rails_apps/3.0/empty/public/robots.txt b/test/stub/rails3.1/public/robots.txt
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/public/robots.txt
copy to test/stub/rails3.1/public/robots.txt
diff --git a/test/stub/rails3.1/script/rails b/test/stub/rails3.1/script/rails
new file mode 100755
index 0000000..f8da2cf
--- /dev/null
+++ b/test/stub/rails3.1/script/rails
@@ -0,0 +1,6 @@
+#!/usr/bin/env ruby
+# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
+
+APP_PATH = File.expand_path('../../config/application',  __FILE__)
+require File.expand_path('../../config/boot',  __FILE__)
+require 'rails/commands'
diff --git a/test/stub/rails3.1/test/performance/browsing_test.rb b/test/stub/rails3.1/test/performance/browsing_test.rb
new file mode 100644
index 0000000..3fea27b
--- /dev/null
+++ b/test/stub/rails3.1/test/performance/browsing_test.rb
@@ -0,0 +1,12 @@
+require 'test_helper'
+require 'rails/performance_test_help'
+
+class BrowsingTest < ActionDispatch::PerformanceTest
+  # Refer to the documentation for all available options
+  # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
+  #                          :output => 'tmp/performance', :formats => [:flat] }
+
+  def test_homepage
+    get '/'
+  end
+end
diff --git a/test/stub/rails_apps/3.0/empty/test/test_helper.rb b/test/stub/rails3.1/test/test_helper.rb
similarity index 100%
copy from test/stub/rails_apps/3.0/empty/test/test_helper.rb
copy to test/stub/rails3.1/test/test_helper.rb
diff --git a/test/stub/rails3.2/Gemfile b/test/stub/rails3.2/Gemfile
new file mode 100644
index 0000000..1111e62
--- /dev/null
+++ b/test/stub/rails3.2/Gemfile
@@ -0,0 +1,39 @@
+source 'https://rubygems.org'
+
+gem 'rails', '~> 3.2.11'
+
+# Bundle edge Rails instead:
+# gem 'rails', :git => 'git://github.com/rails/rails.git'
+
+gem 'sqlite3'
+
+gem 'json'
+
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+  gem 'sass-rails',   '~> 3.2.3'
+  gem 'coffee-rails', '~> 3.2.1'
+
+  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
+  # gem 'therubyracer', :platforms => :ruby
+
+  gem 'uglifier', '>= 1.0.3'
+end
+
+gem 'jquery-rails'
+
+# To use ActiveModel has_secure_password
+# gem 'bcrypt-ruby', '~> 3.0.0'
+
+# To use Jbuilder templates for JSON
+# gem 'jbuilder'
+
+# Use unicorn as the app server
+# gem 'unicorn'
+
+# Deploy with Capistrano
+# gem 'capistrano'
+
+# To use debugger
+# gem 'ruby-debug'
diff --git a/test/stub/rails3.2/Gemfile.lock b/test/stub/rails3.2/Gemfile.lock
new file mode 100644
index 0000000..56cc817
--- /dev/null
+++ b/test/stub/rails3.2/Gemfile.lock
@@ -0,0 +1,113 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    actionmailer (3.2.11)
+      actionpack (= 3.2.11)
+      mail (~> 2.4.4)
+    actionpack (3.2.11)
+      activemodel (= 3.2.11)
+      activesupport (= 3.2.11)
+      builder (~> 3.0.0)
+      erubis (~> 2.7.0)
+      journey (~> 1.0.4)
+      rack (~> 1.4.0)
+      rack-cache (~> 1.2)
+      rack-test (~> 0.6.1)
+      sprockets (~> 2.2.1)
+    activemodel (3.2.11)
+      activesupport (= 3.2.11)
+      builder (~> 3.0.0)
+    activerecord (3.2.11)
+      activemodel (= 3.2.11)
+      activesupport (= 3.2.11)
+      arel (~> 3.0.2)
+      tzinfo (~> 0.3.29)
+    activeresource (3.2.11)
+      activemodel (= 3.2.11)
+      activesupport (= 3.2.11)
+    activesupport (3.2.11)
+      i18n (~> 0.6)
+      multi_json (~> 1.0)
+    arel (3.0.2)
+    builder (3.0.4)
+    coffee-rails (3.2.2)
+      coffee-script (>= 2.2.0)
+      railties (~> 3.2.0)
+    coffee-script (2.2.0)
+      coffee-script-source
+      execjs
+    coffee-script-source (1.4.0)
+    erubis (2.7.0)
+    execjs (1.4.0)
+      multi_json (~> 1.0)
+    hike (1.2.1)
+    i18n (0.6.1)
+    journey (1.0.4)
+    jquery-rails (2.1.4)
+      railties (>= 3.0, < 5.0)
+      thor (>= 0.14, < 2.0)
+    json (1.7.6)
+    mail (2.4.4)
+      i18n (>= 0.4.0)
+      mime-types (~> 1.16)
+      treetop (~> 1.4.8)
+    mime-types (1.20.1)
+    multi_json (1.5.0)
+    polyglot (0.3.3)
+    rack (1.4.4)
+    rack-cache (1.2)
+      rack (>= 0.4)
+    rack-ssl (1.3.3)
+      rack
+    rack-test (0.6.2)
+      rack (>= 1.0)
+    rails (3.2.11)
+      actionmailer (= 3.2.11)
+      actionpack (= 3.2.11)
+      activerecord (= 3.2.11)
+      activeresource (= 3.2.11)
+      activesupport (= 3.2.11)
+      bundler (~> 1.0)
+      railties (= 3.2.11)
+    railties (3.2.11)
+      actionpack (= 3.2.11)
+      activesupport (= 3.2.11)
+      rack-ssl (~> 1.3.2)
+      rake (>= 0.8.7)
+      rdoc (~> 3.4)
+      thor (>= 0.14.6, < 2.0)
+    rake (10.0.3)
+    rdoc (3.12)
+      json (~> 1.4)
+    sass (3.2.5)
+    sass-rails (3.2.6)
+      railties (~> 3.2.0)
+      sass (>= 3.1.10)
+      tilt (~> 1.3)
+    sprockets (2.2.2)
+      hike (~> 1.2)
+      multi_json (~> 1.0)
+      rack (~> 1.0)
+      tilt (~> 1.1, != 1.3.0)
+    sqlite3 (1.3.7)
+    thor (0.17.0)
+    tilt (1.3.3)
+    treetop (1.4.12)
+      polyglot
+      polyglot (>= 0.3.1)
+    tzinfo (0.3.35)
+    uglifier (1.3.0)
+      execjs (>= 0.3.0)
+      multi_json (~> 1.0, >= 1.0.2)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  coffee-rails (~> 3.2.1)
+  jquery-rails
+  json
+  rails (~> 3.2.11)
+  sass-rails (~> 3.2.3)
+  sqlite3
+  uglifier (>= 1.0.3)
diff --git a/test/stub/rails3.2/Rakefile b/test/stub/rails3.2/Rakefile
new file mode 100644
index 0000000..8c868e7
--- /dev/null
+++ b/test/stub/rails3.2/Rakefile
@@ -0,0 +1,7 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+Empty::Application.load_tasks
diff --git a/test/stub/rails3.2/app/assets/images/rails.png b/test/stub/rails3.2/app/assets/images/rails.png
new file mode 100644
index 0000000..d5edc04
Binary files /dev/null and b/test/stub/rails3.2/app/assets/images/rails.png differ
diff --git a/test/stub/rails3.2/app/assets/stylesheets/application.css b/test/stub/rails3.2/app/assets/stylesheets/application.css
new file mode 100644
index 0000000..3192ec8
--- /dev/null
+++ b/test/stub/rails3.2/app/assets/stylesheets/application.css
@@ -0,0 +1,13 @@
+/*
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
+ * listed below.
+ *
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
+ *
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
+ * compiled file, but it's generally better to create a new file per style scope.
+ *
+ *= require_self
+ *= require_tree .
+ */
diff --git a/test/stub/rails3.2/app/controllers/application_controller.rb b/test/stub/rails3.2/app/controllers/application_controller.rb
new file mode 100644
index 0000000..e8065d9
--- /dev/null
+++ b/test/stub/rails3.2/app/controllers/application_controller.rb
@@ -0,0 +1,3 @@
+class ApplicationController < ActionController::Base
+  protect_from_forgery
+end
diff --git a/test/stub/rails_apps/3.0/empty/app/helpers/application_helper.rb b/test/stub/rails3.2/app/helpers/application_helper.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/app/helpers/application_helper.rb
rename to test/stub/rails3.2/app/helpers/application_helper.rb
diff --git a/test/stub/rails3.2/app/views/layouts/application.html.erb b/test/stub/rails3.2/app/views/layouts/application.html.erb
new file mode 100644
index 0000000..1da2746
--- /dev/null
+++ b/test/stub/rails3.2/app/views/layouts/application.html.erb
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>Empty</title>
+  <%= stylesheet_link_tag    "application", :media => "all" %>
+  <%= javascript_include_tag "application" %>
+  <%= csrf_meta_tags %>
+</head>
+<body>
+
+<%= yield %>
+
+</body>
+</html>
diff --git a/test/stub/rails_apps/3.0/empty/config.ru b/test/stub/rails3.2/config.ru
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/config.ru
rename to test/stub/rails3.2/config.ru
diff --git a/test/stub/rails3.2/config/application.rb b/test/stub/rails3.2/config/application.rb
new file mode 100644
index 0000000..6f24308
--- /dev/null
+++ b/test/stub/rails3.2/config/application.rb
@@ -0,0 +1,62 @@
+require File.expand_path('../boot', __FILE__)
+
+require 'rails/all'
+
+if defined?(Bundler)
+  # If you precompile assets before deploying to production, use this line
+  Bundler.require(*Rails.groups(:assets => %w(development test)))
+  # If you want your assets lazily compiled in production, use this line
+  # Bundler.require(:default, :assets, Rails.env)
+end
+
+module Empty
+  class Application < Rails::Application
+    # Settings in config/environments/* take precedence over those specified here.
+    # Application configuration should go into files in config/initializers
+    # -- all .rb files in that directory are automatically loaded.
+
+    # Custom directories with classes and modules you want to be autoloadable.
+    # config.autoload_paths += %W(#{config.root}/extras)
+
+    # Only load the plugins named here, in the order given (default is alphabetical).
+    # :all can be used as a placeholder for all plugins not explicitly named.
+    # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
+    # Activate observers that should always be running.
+    # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
+
+    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
+    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
+    # config.time_zone = 'Central Time (US & Canada)'
+
+    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+    # config.i18n.default_locale = :de
+
+    # Configure the default encoding used in templates for Ruby 1.9.
+    config.encoding = "utf-8"
+
+    # Configure sensitive parameters which will be filtered from the log file.
+    config.filter_parameters += [:password]
+
+    # Enable escaping HTML in JSON.
+    config.active_support.escape_html_entities_in_json = true
+
+    # Use SQL instead of Active Record's schema dumper when creating the database.
+    # This is necessary if your schema can't be completely dumped by the schema dumper,
+    # like if you have constraints or database-specific column types
+    # config.active_record.schema_format = :sql
+
+    # Enforce whitelist mode for mass assignment.
+    # This will create an empty whitelist of attributes available for mass-assignment for all models
+    # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
+    # parameters by using an attr_accessible or attr_protected declaration.
+    config.active_record.whitelist_attributes = true
+
+    # Enable the asset pipeline
+    config.assets.enabled = true
+
+    # Version of your assets, change this if you want to expire all your assets
+    config.assets.version = '1.0'
+  end
+end
diff --git a/test/stub/rails3.2/config/boot.rb b/test/stub/rails3.2/config/boot.rb
new file mode 100644
index 0000000..4489e58
--- /dev/null
+++ b/test/stub/rails3.2/config/boot.rb
@@ -0,0 +1,6 @@
+require 'rubygems'
+
+# Set up gems listed in the Gemfile.
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
diff --git a/test/stub/rails3.2/config/database.yml b/test/stub/rails3.2/config/database.yml
new file mode 100644
index 0000000..51a4dd4
--- /dev/null
+++ b/test/stub/rails3.2/config/database.yml
@@ -0,0 +1,25 @@
+# SQLite version 3.x
+#   gem install sqlite3
+#
+#   Ensure the SQLite 3 gem is defined in your Gemfile
+#   gem 'sqlite3'
+development:
+  adapter: sqlite3
+  database: db/development.sqlite3
+  pool: 5
+  timeout: 5000
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+  adapter: sqlite3
+  database: db/test.sqlite3
+  pool: 5
+  timeout: 5000
+
+production:
+  adapter: sqlite3
+  database: db/production.sqlite3
+  pool: 5
+  timeout: 5000
diff --git a/test/stub/rails_apps/3.0/empty/config/environment.rb b/test/stub/rails3.2/config/environment.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/config/environment.rb
rename to test/stub/rails3.2/config/environment.rb
diff --git a/test/stub/rails3.2/config/environments/development.rb b/test/stub/rails3.2/config/environments/development.rb
new file mode 100644
index 0000000..daaa34f
--- /dev/null
+++ b/test/stub/rails3.2/config/environments/development.rb
@@ -0,0 +1,37 @@
+Empty::Application.configure do
+  # Settings specified here will take precedence over those in config/application.rb
+
+  # In the development environment your application's code is reloaded on
+  # every request. This slows down response time but is perfect for development
+  # since you don't have to restart the web server when you make code changes.
+  config.cache_classes = false
+
+  # Log error messages when you accidentally call methods on nil.
+  config.whiny_nils = true
+
+  # Show full error reports and disable caching
+  config.consider_all_requests_local       = true
+  config.action_controller.perform_caching = false
+
+  # Don't care if the mailer can't send
+  config.action_mailer.raise_delivery_errors = false
+
+  # Print deprecation notices to the Rails logger
+  config.active_support.deprecation = :log
+
+  # Only use best-standards-support built into browsers
+  config.action_dispatch.best_standards_support = :builtin
+
+  # Raise exception on mass assignment protection for Active Record models
+  config.active_record.mass_assignment_sanitizer = :strict
+
+  # Log the query plan for queries taking more than this (works
+  # with SQLite, MySQL, and PostgreSQL)
+  config.active_record.auto_explain_threshold_in_seconds = 0.5
+
+  # Do not compress assets
+  config.assets.compress = false
+
+  # Expands the lines which load the assets
+  config.assets.debug = true
+end
diff --git a/test/stub/rails3.2/config/environments/production.rb b/test/stub/rails3.2/config/environments/production.rb
new file mode 100644
index 0000000..9c9c11d
--- /dev/null
+++ b/test/stub/rails3.2/config/environments/production.rb
@@ -0,0 +1,67 @@
+Empty::Application.configure do
+  # Settings specified here will take precedence over those in config/application.rb
+
+  # Code is not reloaded between requests
+  config.cache_classes = true
+
+  # Full error reports are disabled and caching is turned on
+  config.consider_all_requests_local       = false
+  config.action_controller.perform_caching = true
+
+  # Disable Rails's static asset server (Apache or nginx will already do this)
+  config.serve_static_assets = false
+
+  # Compress JavaScripts and CSS
+  config.assets.compress = true
+
+  # Don't fallback to assets pipeline if a precompiled asset is missed
+  config.assets.compile = false
+
+  # Generate digests for assets URLs
+  config.assets.digest = true
+
+  # Defaults to nil and saved in location specified by config.assets.prefix
+  # config.assets.manifest = YOUR_PATH
+
+  # Specifies the header that your server uses for sending files
+  # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
+  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
+
+  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
+  # config.force_ssl = true
+
+  # See everything in the log (default is :info)
+  config.log_level = :debug
+
+  # Prepend all log lines with the following tags
+  # config.log_tags = [ :subdomain, :uuid ]
+
+  # Use a different logger for distributed setups
+  # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
+
+  # Use a different cache store in production
+  # config.cache_store = :mem_cache_store
+
+  # Enable serving of images, stylesheets, and JavaScripts from an asset server
+  # config.action_controller.asset_host = "http://assets.example.com"
+
+  # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
+  # config.assets.precompile += %w( search.js )
+
+  # Disable delivery errors, bad email addresses will be ignored
+  # config.action_mailer.raise_delivery_errors = false
+
+  # Enable threaded mode
+  config.threadsafe!
+
+  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
+  # the I18n.default_locale when a translation can not be found)
+  config.i18n.fallbacks = true
+
+  # Send deprecation notices to registered listeners
+  config.active_support.deprecation = :notify
+
+  # Log the query plan for queries taking more than this (works
+  # with SQLite, MySQL, and PostgreSQL)
+  # config.active_record.auto_explain_threshold_in_seconds = 0.5
+end
diff --git a/test/stub/rails3.2/config/environments/test.rb b/test/stub/rails3.2/config/environments/test.rb
new file mode 100644
index 0000000..be28663
--- /dev/null
+++ b/test/stub/rails3.2/config/environments/test.rb
@@ -0,0 +1,37 @@
+Empty::Application.configure do
+  # Settings specified here will take precedence over those in config/application.rb
+
+  # The test environment is used exclusively to run your application's
+  # test suite. You never need to work with it otherwise. Remember that
+  # your test database is "scratch space" for the test suite and is wiped
+  # and recreated between test runs. Don't rely on the data there!
+  config.cache_classes = true
+
+  # Configure static asset server for tests with Cache-Control for performance
+  config.serve_static_assets = true
+  config.static_cache_control = "public, max-age=3600"
+
+  # Log error messages when you accidentally call methods on nil
+  config.whiny_nils = true
+
+  # Show full error reports and disable caching
+  config.consider_all_requests_local       = true
+  config.action_controller.perform_caching = false
+
+  # Raise exceptions instead of rendering exception templates
+  config.action_dispatch.show_exceptions = false
+
+  # Disable request forgery protection in test environment
+  config.action_controller.allow_forgery_protection    = false
+
+  # Tell Action Mailer not to deliver emails to the real world.
+  # The :test delivery method accumulates sent emails in the
+  # ActionMailer::Base.deliveries array.
+  config.action_mailer.delivery_method = :test
+
+  # Raise exception on mass assignment protection for Active Record models
+  config.active_record.mass_assignment_sanitizer = :strict
+
+  # Print deprecation notices to the stderr
+  config.active_support.deprecation = :stderr
+end
diff --git a/test/stub/rails_apps/3.0/empty/config/initializers/backtrace_silencers.rb b/test/stub/rails3.2/config/initializers/backtrace_silencers.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/config/initializers/backtrace_silencers.rb
rename to test/stub/rails3.2/config/initializers/backtrace_silencers.rb
diff --git a/test/stub/rails3.2/config/initializers/inflections.rb b/test/stub/rails3.2/config/initializers/inflections.rb
new file mode 100644
index 0000000..5d8d9be
--- /dev/null
+++ b/test/stub/rails3.2/config/initializers/inflections.rb
@@ -0,0 +1,15 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format
+# (all these examples are active by default):
+# ActiveSupport::Inflector.inflections do |inflect|
+#   inflect.plural /^(ox)$/i, '\1en'
+#   inflect.singular /^(ox)en/i, '\1'
+#   inflect.irregular 'person', 'people'
+#   inflect.uncountable %w( fish sheep )
+# end
+#
+# These inflection rules are supported but not enabled by default:
+# ActiveSupport::Inflector.inflections do |inflect|
+#   inflect.acronym 'RESTful'
+# end
diff --git a/test/stub/rails_apps/2.3/foobar/config/initializers/mime_types.rb b/test/stub/rails3.2/config/initializers/mime_types.rb
similarity index 100%
rename from test/stub/rails_apps/2.3/foobar/config/initializers/mime_types.rb
rename to test/stub/rails3.2/config/initializers/mime_types.rb
diff --git a/test/stub/rails_apps/3.0/empty/config/initializers/passenger.rb b/test/stub/rails3.2/config/initializers/passenger.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/config/initializers/passenger.rb
rename to test/stub/rails3.2/config/initializers/passenger.rb
diff --git a/test/stub/rails3.2/config/initializers/secret_token.rb b/test/stub/rails3.2/config/initializers/secret_token.rb
new file mode 100644
index 0000000..bb08e5e
--- /dev/null
+++ b/test/stub/rails3.2/config/initializers/secret_token.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+Empty::Application.config.secret_token = 'c1bf73ce471c1810edbe8992aa5aceee3c5537db37c582a87db360b62c1378d4ce56858530fda4e00f3cfb8e73e906cf1c0627fa8178984bdb9529cd1ff0dbc3'
diff --git a/test/stub/rails3.2/config/initializers/session_store.rb b/test/stub/rails3.2/config/initializers/session_store.rb
new file mode 100644
index 0000000..91e8b82
--- /dev/null
+++ b/test/stub/rails3.2/config/initializers/session_store.rb
@@ -0,0 +1,8 @@
+# Be sure to restart your server when you modify this file.
+
+Empty::Application.config.session_store :cookie_store, :key => '_empty_session'
+
+# Use the database for sessions instead of the cookie-based default,
+# which shouldn't be used to store highly confidential information
+# (create the session table with "rails generate session_migration")
+# Empty::Application.config.session_store :active_record_store
diff --git a/test/stub/rails3.2/config/initializers/wrap_parameters.rb b/test/stub/rails3.2/config/initializers/wrap_parameters.rb
new file mode 100644
index 0000000..da4fb07
--- /dev/null
+++ b/test/stub/rails3.2/config/initializers/wrap_parameters.rb
@@ -0,0 +1,14 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file contains settings for ActionController::ParamsWrapper which
+# is enabled by default.
+
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
+ActiveSupport.on_load(:action_controller) do
+  wrap_parameters :format => [:json]
+end
+
+# Disable root element in JSON by default.
+ActiveSupport.on_load(:active_record) do
+  self.include_root_in_json = false
+end
diff --git a/test/stub/rails3.2/config/locales/en.yml b/test/stub/rails3.2/config/locales/en.yml
new file mode 100644
index 0000000..179c14c
--- /dev/null
+++ b/test/stub/rails3.2/config/locales/en.yml
@@ -0,0 +1,5 @@
+# Sample localization file for English. Add more files in this directory for other locales.
+# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+en:
+  hello: "Hello world"
diff --git a/test/stub/rails3.2/config/routes.rb b/test/stub/rails3.2/config/routes.rb
new file mode 100644
index 0000000..390083a
--- /dev/null
+++ b/test/stub/rails3.2/config/routes.rb
@@ -0,0 +1,58 @@
+Empty::Application.routes.draw do
+  # The priority is based upon order of creation:
+  # first created -> highest priority.
+
+  # Sample of regular route:
+  #   match 'products/:id' => 'catalog#view'
+  # Keep in mind you can assign values other than :controller and :action
+
+  # Sample of named route:
+  #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
+  # This route can be invoked with purchase_url(:id => product.id)
+
+  # Sample resource route (maps HTTP verbs to controller actions automatically):
+  #   resources :products
+
+  # Sample resource route with options:
+  #   resources :products do
+  #     member do
+  #       get 'short'
+  #       post 'toggle'
+  #     end
+  #
+  #     collection do
+  #       get 'sold'
+  #     end
+  #   end
+
+  # Sample resource route with sub-resources:
+  #   resources :products do
+  #     resources :comments, :sales
+  #     resource :seller
+  #   end
+
+  # Sample resource route with more complex sub-resources
+  #   resources :products do
+  #     resources :comments
+  #     resources :sales do
+  #       get 'recent', :on => :collection
+  #     end
+  #   end
+
+  # Sample resource route within a namespace:
+  #   namespace :admin do
+  #     # Directs /admin/products/* to Admin::ProductsController
+  #     # (app/controllers/admin/products_controller.rb)
+  #     resources :products
+  #   end
+
+  # You can have the root of your site routed with "root"
+  # just remember to delete public/index.html.
+  # root :to => 'welcome#index'
+
+  # See how all your routes lay out with "rake routes"
+
+  # This is a legacy wild controller route that's not recommended for RESTful applications.
+  # Note: This route will make all actions in every controller accessible via GET requests.
+  match ':controller(/:action(/:id))(.:format)'
+end
diff --git a/test/stub/rails3.2/db/seeds.rb b/test/stub/rails3.2/db/seeds.rb
new file mode 100644
index 0000000..d34dfa0
--- /dev/null
+++ b/test/stub/rails3.2/db/seeds.rb
@@ -0,0 +1,7 @@
+# This file should contain all the record creation needed to seed the database with its default values.
+# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
+#
+# Examples:
+#
+#   cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
+#   Mayor.create(:name => 'Emanuel', :city => cities.first)
diff --git a/test/stub/rails_apps/3.0/empty/doc/README_FOR_APP b/test/stub/rails3.2/doc/README_FOR_APP
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/doc/README_FOR_APP
rename to test/stub/rails3.2/doc/README_FOR_APP
diff --git a/test/stub/rails_apps/3.0/empty/public/404.html b/test/stub/rails3.2/public/404.html
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/public/404.html
rename to test/stub/rails3.2/public/404.html
diff --git a/test/stub/rails_apps/3.0/empty/public/422.html b/test/stub/rails3.2/public/422.html
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/public/422.html
rename to test/stub/rails3.2/public/422.html
diff --git a/test/stub/rails3.2/public/500.html b/test/stub/rails3.2/public/500.html
new file mode 100644
index 0000000..f3648a0
--- /dev/null
+++ b/test/stub/rails3.2/public/500.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>We're sorry, but something went wrong (500)</title>
+  <style type="text/css">
+    body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+    div.dialog {
+      width: 25em;
+      padding: 0 4em;
+      margin: 4em auto 0 auto;
+      border: 1px solid #ccc;
+      border-right-color: #999;
+      border-bottom-color: #999;
+    }
+    h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+  </style>
+</head>
+
+<body>
+  <!-- This file lives in public/500.html -->
+  <div class="dialog">
+    <h1>We're sorry, but something went wrong.</h1>
+  </div>
+</body>
+</html>
diff --git a/test/stub/rails_apps/3.0/empty/public/favicon.ico b/test/stub/rails3.2/public/favicon.ico
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/public/favicon.ico
rename to test/stub/rails3.2/public/favicon.ico
diff --git a/test/stub/rails3.2/public/index.html b/test/stub/rails3.2/public/index.html
new file mode 100644
index 0000000..a1d5099
--- /dev/null
+++ b/test/stub/rails3.2/public/index.html
@@ -0,0 +1,241 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Ruby on Rails: Welcome aboard</title>
+    <style type="text/css" media="screen">
+      body {
+        margin: 0;
+        margin-bottom: 25px;
+        padding: 0;
+        background-color: #f0f0f0;
+        font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
+        font-size: 13px;
+        color: #333;
+      }
+
+      h1 {
+        font-size: 28px;
+        color: #000;
+      }
+
+      a  {color: #03c}
+      a:hover {
+        background-color: #03c;
+        color: white;
+        text-decoration: none;
+      }
+
+
+      #page {
+        background-color: #f0f0f0;
+        width: 750px;
+        margin: 0;
+        margin-left: auto;
+        margin-right: auto;
+      }
+
+      #content {
+        float: left;
+        background-color: white;
+        border: 3px solid #aaa;
+        border-top: none;
+        padding: 25px;
+        width: 500px;
+      }
+
+      #sidebar {
+        float: right;
+        width: 175px;
+      }
+
+      #footer {
+        clear: both;
+      }
+
+      #header, #about, #getting-started {
+        padding-left: 75px;
+        padding-right: 30px;
+      }
+
+
+      #header {
+        background-image: url("assets/rails.png");
+        background-repeat: no-repeat;
+        background-position: top left;
+        height: 64px;
+      }
+      #header h1, #header h2 {margin: 0}
+      #header h2 {
+        color: #888;
+        font-weight: normal;
+        font-size: 16px;
+      }
+
+
+      #about h3 {
+        margin: 0;
+        margin-bottom: 10px;
+        font-size: 14px;
+      }
+
+      #about-content {
+        background-color: #ffd;
+        border: 1px solid #fc0;
+        margin-left: -55px;
+        margin-right: -10px;
+      }
+      #about-content table {
+        margin-top: 10px;
+        margin-bottom: 10px;
+        font-size: 11px;
+        border-collapse: collapse;
+      }
+      #about-content td {
+        padding: 10px;
+        padding-top: 3px;
+        padding-bottom: 3px;
+      }
+      #about-content td.name  {color: #555}
+      #about-content td.value {color: #000}
+
+      #about-content ul {
+        padding: 0;
+        list-style-type: none;
+      }
+
+      #about-content.failure {
+        background-color: #fcc;
+        border: 1px solid #f00;
+      }
+      #about-content.failure p {
+        margin: 0;
+        padding: 10px;
+      }
+
+
+      #getting-started {
+        border-top: 1px solid #ccc;
+        margin-top: 25px;
+        padding-top: 15px;
+      }
+      #getting-started h1 {
+        margin: 0;
+        font-size: 20px;
+      }
+      #getting-started h2 {
+        margin: 0;
+        font-size: 14px;
+        font-weight: normal;
+        color: #333;
+        margin-bottom: 25px;
+      }
+      #getting-started ol {
+        margin-left: 0;
+        padding-left: 0;
+      }
+      #getting-started li {
+        font-size: 18px;
+        color: #888;
+        margin-bottom: 25px;
+      }
+      #getting-started li h2 {
+        margin: 0;
+        font-weight: normal;
+        font-size: 18px;
+        color: #333;
+      }
+      #getting-started li p {
+        color: #555;
+        font-size: 13px;
+      }
+
+
+      #sidebar ul {
+        margin-left: 0;
+        padding-left: 0;
+      }
+      #sidebar ul h3 {
+        margin-top: 25px;
+        font-size: 16px;
+        padding-bottom: 10px;
+        border-bottom: 1px solid #ccc;
+      }
+      #sidebar li {
+        list-style-type: none;
+      }
+      #sidebar ul.links li {
+        margin-bottom: 5px;
+      }
+
+      .filename {
+        font-style: italic;
+      }
+    </style>
+    <script type="text/javascript">
+      function about() {
+        info = document.getElementById('about-content');
+        if (window.XMLHttpRequest)
+          { xhr = new XMLHttpRequest(); }
+        else
+          { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
+        xhr.open("GET","rails/info/properties",false);
+        xhr.send("");
+        info.innerHTML = xhr.responseText;
+        info.style.display = 'block'
+      }
+    </script>
+  </head>
+  <body>
+    <div id="page">
+      <div id="sidebar">
+        <ul id="sidebar-items">
+          <li>
+            <h3>Browse the documentation</h3>
+            <ul class="links">
+              <li><a href="http://guides.rubyonrails.org/">Rails Guides</a></li>
+              <li><a href="http://api.rubyonrails.org/">Rails API</a></li>
+              <li><a href="http://www.ruby-doc.org/core/">Ruby core</a></li>
+              <li><a href="http://www.ruby-doc.org/stdlib/">Ruby standard library</a></li>
+            </ul>
+          </li>
+        </ul>
+      </div>
+
+      <div id="content">
+        <div id="header">
+          <h1>Welcome aboard</h1>
+          <h2>You’re riding Ruby on Rails!</h2>
+        </div>
+
+        <div id="about">
+          <h3><a href="rails/info/properties" onclick="about(); return false">About your application’s environment</a></h3>
+          <div id="about-content" style="display: none"></div>
+        </div>
+
+        <div id="getting-started">
+          <h1>Getting started</h1>
+          <h2>Here’s how to get rolling:</h2>
+
+          <ol>
+            <li>
+              <h2>Use <code>rails generate</code> to create your models and controllers</h2>
+              <p>To see all available options, run it without parameters.</p>
+            </li>
+
+            <li>
+              <h2>Set up a default route and remove <span class="filename">public/index.html</span></h2>
+              <p>Routes are set up in <span class="filename">config/routes.rb</span>.</p>
+            </li>
+
+            <li>
+              <h2>Create your database</h2>
+              <p>Run <code>rake db:create</code> to create your database. If you're not using SQLite (the default), edit <span class="filename">config/database.yml</span> with your username and password.</p>
+            </li>
+          </ol>
+        </div>
+      </div>
+
+      <div id="footer"> </div>
+    </div>
+  </body>
+</html>
diff --git a/test/stub/rails_apps/3.0/empty/public/robots.txt b/test/stub/rails3.2/public/robots.txt
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/public/robots.txt
rename to test/stub/rails3.2/public/robots.txt
diff --git a/test/stub/rails3.2/script/rails b/test/stub/rails3.2/script/rails
new file mode 100755
index 0000000..f8da2cf
--- /dev/null
+++ b/test/stub/rails3.2/script/rails
@@ -0,0 +1,6 @@
+#!/usr/bin/env ruby
+# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
+
+APP_PATH = File.expand_path('../../config/application',  __FILE__)
+require File.expand_path('../../config/boot',  __FILE__)
+require 'rails/commands'
diff --git a/test/stub/rails3.2/test/performance/browsing_test.rb b/test/stub/rails3.2/test/performance/browsing_test.rb
new file mode 100644
index 0000000..3fea27b
--- /dev/null
+++ b/test/stub/rails3.2/test/performance/browsing_test.rb
@@ -0,0 +1,12 @@
+require 'test_helper'
+require 'rails/performance_test_help'
+
+class BrowsingTest < ActionDispatch::PerformanceTest
+  # Refer to the documentation for all available options
+  # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
+  #                          :output => 'tmp/performance', :formats => [:flat] }
+
+  def test_homepage
+    get '/'
+  end
+end
diff --git a/test/stub/rails_apps/3.0/empty/test/test_helper.rb b/test/stub/rails3.2/test/test_helper.rb
similarity index 100%
rename from test/stub/rails_apps/3.0/empty/test/test_helper.rb
rename to test/stub/rails3.2/test/test_helper.rb
diff --git a/test/stub/rails_apps/2.3/foobar/app/controllers/application_controller.rb b/test/stub/rails_apps/2.3/foobar/app/controllers/application_controller.rb
deleted file mode 100644
index dc0ecf0..0000000
--- a/test/stub/rails_apps/2.3/foobar/app/controllers/application_controller.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# Filters added to this controller apply to all controllers in the application.
-# Likewise, all the methods added will be available for all controllers.
-
-class ApplicationController < ActionController::Base
-  helper :all # include all helpers, all the time
-
-  # See ActionController::RequestForgeryProtection for details
-  # Uncomment the :secret if you're not using the cookie session store
-  protect_from_forgery # :secret => 'cd5f8fbe429e4b3cca1f5bc1ee91d179'
-
-  session :off
-end
diff --git a/test/stub/rails_apps/2.3/foobar/config/database.yml b/test/stub/rails_apps/2.3/foobar/config/database.yml
deleted file mode 100644
index b444b03..0000000
--- a/test/stub/rails_apps/2.3/foobar/config/database.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-# SQLite version 3.x
-#   gem install sqlite3-ruby (not necessary on OS X Leopard)
-development:
-  adapter: sqlite3
-  database: db/development.sqlite3
-  timeout: 5000
-
-# Warning: The database defined as 'test' will be erased and
-# re-generated from your development database when you run 'rake'.
-# Do not set this db to the same as development or production.
-test:
-  adapter: sqlite3
-  database: db/test.sqlite3
-  timeout: 5000
-
-production:
-  adapter: sqlite3
-  database: db/production.sqlite3
-  timeout: 5000
diff --git a/test/stub/rails_apps/2.3/foobar/config/environment.rb b/test/stub/rails_apps/2.3/foobar/config/environment.rb
deleted file mode 100644
index d7c7ff7..0000000
--- a/test/stub/rails_apps/2.3/foobar/config/environment.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-# Be sure to restart your server when you modify this file
-
-# Uncomment below to force Rails into production mode when
-# you don't control web/app server and can't set it the proper way
-# ENV['RAILS_ENV'] ||= 'production'
-
-# Specifies gem version of Rails to use when vendor/rails is not present
-RAILS_GEM_VERSION = '~> 2.3.0' unless defined? RAILS_GEM_VERSION
-
-# Bootstrap the Rails environment, frameworks, and default configuration
-require File.join(File.dirname(__FILE__), 'boot')
-
-Rails::Initializer.run do |config|
-  # Settings in config/environments/* take precedence over those specified here.
-  # Application configuration should go into files in config/initializers
-  # -- all .rb files in that directory are automatically loaded.
-  # See Rails::Configuration for more options.
-
-  # Skip frameworks you're not going to use (only works if using vendor/rails).
-  # To use Rails without a database, you must remove the Active Record framework
-  config.frameworks -= [ :active_record, :action_mailer, :active_resource ]
-
-  # Only load the plugins named here, in the order given. By default, all plugins 
-  # in vendor/plugins are loaded in alphabetical order.
-  # :all can be used as a placeholder for all plugins not explicitly named
-  # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
-
-  # Add additional load paths for your own custom dirs
-  # config.load_paths += %W( #{RAILS_ROOT}/extras )
-
-  # Force all environments to use the same logger level
-  # (by default production uses :info, the others :debug)
-  # config.log_level = :debug
-
-  # Your secret key for verifying cookie session data integrity.
-  # If you change this key, all old sessions will become invalid!
-  # Make sure the secret is at least 30 characters and all random, 
-  # no regular words or you'll be exposed to dictionary attacks.
-  config.action_controller.session = {
-    :session_key => '_railsapp_session',
-    :secret      => '3b50a6869d4e48696e5d407cab7b390124b3d815b4a8ab3e452a6ae1972ce1dc9615db09977915b6715944170fec0d46847b5b8fbdb1a4634d5d7247e4db32c8'
-  }
-
-  # Use the database for sessions instead of the cookie-based default,
-  # which shouldn't be used to store highly confidential information
-  # (create the session table with 'rake db:sessions:create')
-  # config.action_controller.session_store = :active_record_store
-
-  # Use SQL instead of Active Record's schema dumper when creating the test database.
-  # This is necessary if your schema can't be completely dumped by the schema dumper,
-  # like if you have constraints or database-specific column types
-  # config.active_record.schema_format = :sql
-
-  # Activate observers that should always be running
-  # config.active_record.observers = :cacher, :garbage_collector
-
-  # Make Active Record use UTC-base instead of local time
-  # config.active_record.default_timezone = :utc
-end
diff --git a/test/stub/rails_apps/2.3/foobar/config/routes.rb b/test/stub/rails_apps/2.3/foobar/config/routes.rb
deleted file mode 100644
index d94afa1..0000000
--- a/test/stub/rails_apps/2.3/foobar/config/routes.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-ActionController::Routing::Routes.draw do |map|
-  # The priority is based upon order of creation: first created -> highest priority.
-
-  # Sample of regular route:
-  #   map.connect 'products/:id', :controller => 'catalog', :action => 'view'
-  # Keep in mind you can assign values other than :controller and :action
-
-  # Sample of named route:
-  #   map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
-  # This route can be invoked with purchase_url(:id => product.id)
-
-  # Sample resource route (maps HTTP verbs to controller actions automatically):
-  #   map.resources :products
-
-  # Sample resource route with options:
-  #   map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
-
-  # Sample resource route with sub-resources:
-  #   map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
-
-  # Sample resource route within a namespace:
-  #   map.namespace :admin do |admin|
-  #     # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
-  #     admin.resources :products
-  #   end
-
-  # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
-  # map.root :controller => "welcome"
-
-  # See how all your routes lay out with "rake routes"
-
-  # Install the default routes as the lowest priority.
-  map.connect ':controller/:action/:id'
-  map.connect ':controller/:action/:id.:format'
-end
diff --git a/test/stub/rails_apps/2.3/mycook/app/controllers/welcome_controller.rb b/test/stub/rails_apps/2.3/mycook/app/controllers/welcome_controller.rb
index b66a57d..e1400cb 100644
--- a/test/stub/rails_apps/2.3/mycook/app/controllers/welcome_controller.rb
+++ b/test/stub/rails_apps/2.3/mycook/app/controllers/welcome_controller.rb
@@ -18,7 +18,7 @@ class WelcomeController < ApplicationController
 	end
 	
 	def in_passenger
-		render :text => !!defined?(IN_PHUSION_PASSENGER)
+		render :text => !!defined?(PhusionPassenger)
 	end
 	
 	def rails_env
diff --git a/test/stub/rails_apps/2.3/mycook/app/helpers/recipes_helper.rb b/test/stub/rails_apps/2.3/mycook/app/helpers/recipes_helper.rb
new file mode 100644
index 0000000..f526316
--- /dev/null
+++ b/test/stub/rails_apps/2.3/mycook/app/helpers/recipes_helper.rb
@@ -0,0 +1,2 @@
+module RecipesHelper
+end
diff --git a/test/stub/rails_apps/2.3/mycook/app/helpers/test_helper.rb b/test/stub/rails_apps/2.3/mycook/app/helpers/test_helper.rb
new file mode 100644
index 0000000..09b6d50
--- /dev/null
+++ b/test/stub/rails_apps/2.3/mycook/app/helpers/test_helper.rb
@@ -0,0 +1,2 @@
+module TestHelper
+end
diff --git a/test/stub/rails_apps/2.3/mycook/app/helpers/uploads_helper.rb b/test/stub/rails_apps/2.3/mycook/app/helpers/uploads_helper.rb
new file mode 100644
index 0000000..f4f8250
--- /dev/null
+++ b/test/stub/rails_apps/2.3/mycook/app/helpers/uploads_helper.rb
@@ -0,0 +1,2 @@
+module UploadsHelper
+end
diff --git a/test/stub/rails_apps/2.3/mycook/app/helpers/welcome_helper.rb b/test/stub/rails_apps/2.3/mycook/app/helpers/welcome_helper.rb
new file mode 100644
index 0000000..eeead45
--- /dev/null
+++ b/test/stub/rails_apps/2.3/mycook/app/helpers/welcome_helper.rb
@@ -0,0 +1,2 @@
+module WelcomeHelper
+end
diff --git a/test/stub/rails_apps/2.3/mycook/public/javascripts/builder.js b/test/stub/rails_apps/2.3/mycook/public/javascripts/builder.js
deleted file mode 120000
index d8b9f14..0000000
--- a/test/stub/rails_apps/2.3/mycook/public/javascripts/builder.js
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/javascript/scriptaculous/builder.js
\ No newline at end of file
diff --git a/test/stub/rails_apps/2.3/mycook/public/javascripts/controls.js b/test/stub/rails_apps/2.3/mycook/public/javascripts/controls.js
deleted file mode 120000
index 9121ce0..0000000
--- a/test/stub/rails_apps/2.3/mycook/public/javascripts/controls.js
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/javascript/scriptaculous/controls.js
\ No newline at end of file
diff --git a/test/stub/rails_apps/2.3/mycook/public/javascripts/dragdrop.js b/test/stub/rails_apps/2.3/mycook/public/javascripts/dragdrop.js
deleted file mode 120000
index e7314bb..0000000
--- a/test/stub/rails_apps/2.3/mycook/public/javascripts/dragdrop.js
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/javascript/scriptaculous/dragdrop.js
\ No newline at end of file
diff --git a/test/stub/rails_apps/2.3/mycook/public/javascripts/effects.js b/test/stub/rails_apps/2.3/mycook/public/javascripts/effects.js
deleted file mode 120000
index 1749596..0000000
--- a/test/stub/rails_apps/2.3/mycook/public/javascripts/effects.js
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/javascript/scriptaculous/effects.js
\ No newline at end of file
diff --git a/test/stub/rails_apps/2.3/mycook/public/javascripts/prototype.js b/test/stub/rails_apps/2.3/mycook/public/javascripts/prototype.js
deleted file mode 120000
index de85ad5..0000000
--- a/test/stub/rails_apps/2.3/mycook/public/javascripts/prototype.js
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/javascript/scriptaculous/prototype.js
\ No newline at end of file
diff --git a/test/stub/rails_apps/2.3/mycook/public/javascripts/scriptaculous.js b/test/stub/rails_apps/2.3/mycook/public/javascripts/scriptaculous.js
deleted file mode 120000
index b8f30ee..0000000
--- a/test/stub/rails_apps/2.3/mycook/public/javascripts/scriptaculous.js
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/javascript/scriptaculous/scriptaculous.js
\ No newline at end of file
diff --git a/test/stub/rails_apps/2.3/mycook/public/javascripts/slider.js b/test/stub/rails_apps/2.3/mycook/public/javascripts/slider.js
deleted file mode 120000
index f2a8ca3..0000000
--- a/test/stub/rails_apps/2.3/mycook/public/javascripts/slider.js
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/javascript/scriptaculous/slider.js
\ No newline at end of file
diff --git a/test/stub/rails_apps/2.3/mycook/public/javascripts/sound.js b/test/stub/rails_apps/2.3/mycook/public/javascripts/sound.js
deleted file mode 120000
index 704d640..0000000
--- a/test/stub/rails_apps/2.3/mycook/public/javascripts/sound.js
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/javascript/scriptaculous/sound.js
\ No newline at end of file
diff --git a/test/stub/rails_apps/2.3/mycook/public/javascripts/unittest.js b/test/stub/rails_apps/2.3/mycook/public/javascripts/unittest.js
deleted file mode 120000
index 697cd09..0000000
--- a/test/stub/rails_apps/2.3/mycook/public/javascripts/unittest.js
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/javascript/scriptaculous/unittest.js
\ No newline at end of file
diff --git a/test/stub/rails_apps/3.0/empty/Gemfile.lock b/test/stub/rails_apps/3.0/empty/Gemfile.lock
deleted file mode 100644
index bbaa2d8..0000000
--- a/test/stub/rails_apps/3.0/empty/Gemfile.lock
+++ /dev/null
@@ -1,73 +0,0 @@
-GEM
-  remote: http://rubygems.org/
-  specs:
-    abstract (1.0.0)
-    actionmailer (3.0.3)
-      actionpack (= 3.0.3)
-      mail (~> 2.2.9)
-    actionpack (3.0.3)
-      activemodel (= 3.0.3)
-      activesupport (= 3.0.3)
-      builder (~> 2.1.2)
-      erubis (~> 2.6.6)
-      i18n (~> 0.4)
-      rack (~> 1.2.1)
-      rack-mount (~> 0.6.13)
-      rack-test (~> 0.5.6)
-      tzinfo (~> 0.3.23)
-    activemodel (3.0.3)
-      activesupport (= 3.0.3)
-      builder (~> 2.1.2)
-      i18n (~> 0.4)
-    activerecord (3.0.3)
-      activemodel (= 3.0.3)
-      activesupport (= 3.0.3)
-      arel (~> 2.0.2)
-      tzinfo (~> 0.3.23)
-    activeresource (3.0.3)
-      activemodel (= 3.0.3)
-      activesupport (= 3.0.3)
-    activesupport (3.0.3)
-    arel (2.0.4)
-    builder (2.1.2)
-    erubis (2.6.6)
-      abstract (>= 1.0.0)
-    i18n (0.4.2)
-    mail (2.2.10)
-      activesupport (>= 2.3.6)
-      i18n (~> 0.4.1)
-      mime-types (~> 1.16)
-      treetop (~> 1.4.8)
-    mime-types (1.16)
-    polyglot (0.3.1)
-    rack (1.2.1)
-    rack-mount (0.6.13)
-      rack (>= 1.0.0)
-    rack-test (0.5.6)
-      rack (>= 1.0)
-    rails (3.0.3)
-      actionmailer (= 3.0.3)
-      actionpack (= 3.0.3)
-      activerecord (= 3.0.3)
-      activeresource (= 3.0.3)
-      activesupport (= 3.0.3)
-      bundler (~> 1.0)
-      railties (= 3.0.3)
-    railties (3.0.3)
-      actionpack (= 3.0.3)
-      activesupport (= 3.0.3)
-      rake (>= 0.8.7)
-      thor (~> 0.14.4)
-    rake (0.8.7)
-    sqlite3-ruby (1.3.2)
-    thor (0.14.4)
-    treetop (1.4.9)
-      polyglot (>= 0.3.1)
-    tzinfo (0.3.23)
-
-PLATFORMS
-  ruby
-
-DEPENDENCIES
-  rails (~> 3.0.0)
-  sqlite3-ruby
diff --git a/test/stub/rails_apps/3.0/empty/config/environments/production.rb b/test/stub/rails_apps/3.0/empty/config/environments/production.rb
deleted file mode 100644
index bca1857..0000000
--- a/test/stub/rails_apps/3.0/empty/config/environments/production.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-Empty::Application.configure do
-  # Settings specified here will take precedence over those in config/environment.rb
-
-  # The production environment is meant for finished, "live" apps.
-  # Code is not reloaded between requests
-  config.cache_classes = true
-
-  # Full error reports are disabled and caching is turned on
-  config.consider_all_requests_local       = false
-  config.action_controller.perform_caching = true
-
-  # Specifies the header that your server uses for sending files
-  config.action_dispatch.x_sendfile_header = "X-Sendfile"
-
-  # For nginx:
-  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
-
-  # If you have no front-end server that supports something like X-Sendfile,
-  # just comment this out and Rails will serve the files
-
-  # See everything in the log (default is :info)
-  # config.log_level = :debug
-
-  # Use a different logger for distributed setups
-  # config.logger = SyslogLogger.new
-
-  # Use a different cache store in production
-  # config.cache_store = :mem_cache_store
-
-  # Disable Rails's static asset server
-  # In production, Apache or nginx will already do this
-  config.serve_static_assets = false
-
-  # Enable serving of images, stylesheets, and javascripts from an asset server
-  # config.action_controller.asset_host = "http://assets.example.com"
-
-  # Disable delivery errors, bad email addresses will be ignored
-  # config.action_mailer.raise_delivery_errors = false
-
-  # Enable threaded mode
-  # config.threadsafe!
-
-  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
-  # the I18n.default_locale when a translation can not be found)
-  config.i18n.fallbacks = true
-  
-  config.active_support.deprecation = :notify
-end
diff --git a/test/stub/spawn_server.rb b/test/stub/spawn_server.rb
deleted file mode 100644
index 2a68d94..0000000
--- a/test/stub/spawn_server.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env ruby
-$LOAD_PATH << "#{File.dirname(__FILE__)}/../../lib"
-$LOAD_PATH << "#{File.dirname(__FILE__)}/../../ext"
-require 'phusion_passenger/spawn_manager'
-require 'phusion_passenger/app_process'
-
-include PhusionPassenger
-class SpawnManager
-	def handle_spawn_application(*options)
-		client.write('ok')
-		app_process = AppProcess.new('/somewhere', 1234, STDERR,
-			:main => ['/tmp/nonexistant.socket', 'unix'])
-		app_process.write_to_channel(client)
-	end
-end
-
-DEFAULT_INPUT_FD = 3
-
-manager = SpawnManager.new
-input = IO.new(DEFAULT_INPUT_FD)
-manager.start_synchronously(input)
-manager.cleanup
diff --git a/test/stub/start_error.pl b/test/stub/start_error.pl
new file mode 100644
index 0000000..951cde8
--- /dev/null
+++ b/test/stub/start_error.pl
@@ -0,0 +1,24 @@
+#!/usr/bin/env perl
+use strict;
+use IO::Handle;
+
+STDOUT->autoflush(1);
+STDERR->autoflush(1);
+print("!> I have control 1.0\n");
+die("Invalid initialization header") if (<STDIN> ne "You have control 1.0\n");
+
+my %options = {};
+while ((my $line = <STDIN>) ne "\n") {
+	$line =~ s/\n//;
+	my ($name, $value) = split(/: */, $line, 2);
+	$options{$name} = $value;
+}
+
+print("!> Error\n");
+print("!> \n");
+if ($ARGV[0] eq 'freeze') {
+	sleep(1000);
+} else {
+	print("He's dead, Jim!\n");
+	print("Relax, I'm a doctor.\n");
+}
diff --git a/test/stub/wsgi/passenger_wsgi.py b/test/stub/wsgi/passenger_wsgi.py
index beb593a..0c82f13 100644
--- a/test/stub/wsgi/passenger_wsgi.py
+++ b/test/stub/wsgi/passenger_wsgi.py
@@ -1,3 +1,80 @@
-def application(environ, start_response):
-	start_response('200 OK', [('Content-type', 'text/plain'), ('X-Foo', 'bar')])
-	return ['Hello World!<br><img src="wsgi-snake.png">']
+import os, time
+
+def file_exist(filename):
+	try:
+		os.stat(filename)
+		return True
+	except OSError:
+		return False
+
+def application(env, start_response):
+	status = '200 OK'
+	body   = None
+	
+	method = env.get('REQUEST_METHOD')
+	if method == 'OOBW':
+		time.sleep(1)
+		start_response(status, [('Content-Type', 'text/html')])
+		return [str('oobw ok')]
+	
+	filename = env.get('HTTP_X_WAIT_FOR_FILE')
+	if filename is not None:
+		while not file_exist(filename):
+			time.sleep(0.01)
+	
+	path = env['PATH_INFO']
+	if path == '/pid':
+		body = os.getpid()
+	elif path == '/env':
+		body = ''
+		for pair in env.iteritems():
+			body += pair[0] + ' = ' + str(pair[1]) + "\n"
+		body = body
+	elif path == '/upload':
+		sleep_time = float(env.get('HTTP_X_SLEEP', 0))
+		f = open(env['HTTP_X_OUTPUT'], 'w')
+		try:
+			line = env['wsgi.input'].readline()
+			while line != "":
+				f.write(line)
+				f.flush()
+				line = env['wsgi.input'].readline()
+				if sleep_time > 0:
+					time.sleep(sleep_time)
+		finally:
+			f.close()
+		body = 'ok'
+	elif path == '/custom_status':
+		status = env['HTTP_X_CUSTOM_STATUS']
+		body = 'ok'
+	elif path == '/stream':
+		sleep_time = float(env.get('HTTP_X_SLEEP', 0.1))
+		def body():
+			i = 0
+			while True:
+				data = ' ' * 32 + str(i) + "\n"
+				yield("%x\r\n" % len(data))
+				yield(data)
+				yield("\r\n")
+				time.sleep(sleep_time)
+				i += 1
+		start_response(status, [('Content-Type', 'text/html'), ('Transfer-Encoding', 'chunked')])
+		return body()
+	elif path == '/blob':
+		size = int(env.get('HTTP_X_SIZE', 1024 * 1024 * 10))
+		def body():
+			written = 0
+			while written < size:
+				data = 'x' * min(1024 * 8, size - written)
+				yield(data)
+				written += len(data)
+		start_response(status, [('Content-Type', 'text/plain')])
+		return body()
+	elif path == '/oobw':
+		start_response(status, [('Content-Type', 'text/plain'), ('X-Passenger-Request-OOB-Work', 'true')])
+		return [str(os.getpid())]
+	else:
+		body = 'hello <b>world</b>'
+	
+	start_response(status, [('Content-Type', 'text/html')])
+	return [str(body)]
diff --git a/test/stub/wsgi/passenger_wsgi.pyc b/test/stub/wsgi/passenger_wsgi.pyc
deleted file mode 100644
index e17ceec..0000000
Binary files a/test/stub/wsgi/passenger_wsgi.pyc and /dev/null differ
diff --git a/test/support/apache2_controller.rb b/test/support/apache2_controller.rb
index b27b376..3b3dcb6 100644
--- a/test/support/apache2_controller.rb
+++ b/test/support/apache2_controller.rb
@@ -70,8 +70,8 @@ class Apache2Controller
 		@vhosts = []
 		@extra = []
 		@server_root = File.expand_path('tmp.apache2')
-		@passenger_root = File.expand_path(File.dirname(__FILE__) + "/../..")
-		@mod_passenger = File.expand_path(File.dirname(__FILE__) + "/../../ext/apache2/mod_passenger.so")
+		@passenger_root = File.expand_path(PhusionPassenger.source_root)
+		@mod_passenger = PhusionPassenger.apache2_module_path
 	end
 	
 	def set(options)
diff --git a/test/support/nginx_controller.rb b/test/support/nginx_controller.rb
index ac85f9e..74d424a 100644
--- a/test/support/nginx_controller.rb
+++ b/test/support/nginx_controller.rb
@@ -27,7 +27,7 @@ class NginxController
 		@controller  = DaemonController.new(
 		      :identifier    => 'Nginx',
 		      :start_command => "#{CONFIG['nginx']} -c '#{@config_file}'",
-		      :ping_command  => lambda { TCPSocket.new('localhost', PORT) },
+		      :ping_command  => [:tcp, '127.0.0.1', PORT],
 		      :pid_file      => @pid_file,
 		      :log_file      => @log_file,
 		      :timeout       => 25,
@@ -35,6 +35,7 @@ class NginxController
 		)
 		
 		@servers = []
+		@max_pool_size = 1
 	end
 	
 	def set(options)
diff --git a/test/support/placebo-preloader.rb b/test/support/placebo-preloader.rb
new file mode 100644
index 0000000..7c4ecb7
--- /dev/null
+++ b/test/support/placebo-preloader.rb
@@ -0,0 +1,88 @@
+#!/usr/bin/env ruby
+# An application preloader which doesn't actually preload anything
+# and executes the requested start command.
+
+DIR = File.expand_path(File.dirname(__FILE__))
+require "#{DIR}/../../lib/phusion_passenger"
+PhusionPassenger.locate_directories
+require 'phusion_passenger/native_support'
+require 'socket'
+
+STDOUT.sync = true
+STDERR.sync = true
+puts "!> I have control 1.0"
+abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n"
+
+options = {}
+while (line = STDIN.readline) != "\n"
+	name, value = line.strip.split(/: */, 2)
+	options[name] = value
+end
+
+socket_filename = "/tmp/placebo-preloader.sock.#{Process.pid}"
+server = UNIXServer.new(socket_filename)
+puts "!> Ready"
+puts "!> socket: unix:#{socket_filename}"
+puts "!> "
+
+def process_client_command(server, client, command)
+	if command == "spawn\n"
+		options = {}
+		while (line = client.readline) != "\n"
+			name, value = line.strip.split(/: */, 2)
+			options[name] = value
+		end
+		
+		command = options["start_command"].split("\t")
+		process_title = options["process_title"]
+		process_title = command[0] if !process_title || process_title.empty?
+		command[0] = [command[0], process_title]
+		
+		pid = fork do
+			begin
+				STDIN.reopen(client)
+				STDOUT.reopen(client)
+				STDOUT.sync = true
+				server.close
+				client.close
+				puts "OK"
+				puts Process.pid
+				exec(*command)
+			rescue Exception => e
+				STDERR.puts "*** ERROR: #{e}\n#{e.backtrace.join("\n")}"
+			ensure
+				STDERR.flush
+				exit!(1)
+			end
+		end
+		Process.detach(pid)
+	elsif command == "pid\n"
+		client.write("#{Process.pid}\n")
+	else
+		client.write("unknown request\n")
+	end
+end
+
+begin
+	exit if ARGV[0] == "exit-immediately"
+	while true
+		ios = select([server, STDIN])[0]
+		if ios.include?(server)
+			client = server.accept
+			begin
+				process_client_command(server, client, client.readline)
+			ensure
+				client.close
+			end
+		end
+		if ios.include?(STDIN)
+			begin
+				STDIN.readline
+			rescue EOFError
+				exit
+			end
+		end
+	end
+ensure
+	File.unlink(socket_filename) rescue nil
+end
diff --git a/test/support/test_helper.rb b/test/support/test_helper.rb
index 9960e5b..bab786d 100644
--- a/test/support/test_helper.rb
+++ b/test/support/test_helper.rb
@@ -4,6 +4,7 @@ require 'net/http'
 require 'uri'
 require 'support/multipart'
 require 'phusion_passenger'
+require 'phusion_passenger/debug_logging'
 require 'phusion_passenger/platform_info/ruby'
 
 # Module containing helper methods, to be included in unit tests.
@@ -85,7 +86,7 @@ module TestHelper
 		end
 	end
 	
-	class RailsStub < Stub
+	class ClassicRailsStub < Stub
 		def self.use(name, app_root = nil)
 			stub = new(name, app_root)
 			begin
@@ -103,20 +104,7 @@ module TestHelper
 			return "#{@full_app_root}/config/environment.rb"
 		end
 		
-		def use_vendor_rails(name)
-			FileUtils.mkdir_p("#{@full_app_root}/vendor/rails")
-			FileUtils.cp_r("stub/vendor_rails/#{name}/.", "#{@full_app_root}/vendor/rails")
-		end
-		
-		def dont_use_vendor_rails
-			remove_dir_tree("#{@full_app_root}/vendor/rails")
-		end
-		
 	private
-		def stub_source_dir
-			return "stub/rails_apps/#{@name}"
-		end
-		
 		def copy_stub_contents
 			super
 			FileUtils.mkdir_p("#{@full_app_root}/log")
@@ -263,7 +251,7 @@ module TestHelper
 		end
 	end
 	
-	def eventually(deadline_duration = 1, check_interval = 0.05)
+	def eventually(deadline_duration = 2, check_interval = 0.05)
 		deadline = Time.now + deadline_duration
 		while Time.now < deadline
 			if yield
@@ -367,16 +355,20 @@ module TestHelper
 		end
 	end
 	
-	def spawn_logging_agent(log_dir, password)
+	def spawn_logging_agent(dump_file, password)
 		passenger_tmpdir = PhusionPassenger::Utils.passenger_tmpdir
 		socket_filename = "#{passenger_tmpdir}/logging.socket"
-		pid = spawn_process("#{AGENTS_DIR}/PassengerLoggingAgent",
-			"analytics_log_dir",   log_dir,
+		pid = spawn_process("#{PhusionPassenger.agents_dir}/PassengerLoggingAgent",
+			"passenger_root", PhusionPassenger.source_root,
+			"log_level", PhusionPassenger::DebugLogging.log_level,
+			"analytics_dump_file", dump_file,
 			"analytics_log_user",  CONFIG['normal_user_1'],
 			"analytics_log_group", CONFIG['normal_group_1'],
 			"analytics_log_permissions", "u=rwx,g=rwx,o=rwx",
 			"logging_agent_address", "unix:#{socket_filename}",
-			"logging_agent_password", password)
+			"logging_agent_password", password,
+			"logging_agent_admin_address", "unix:#{socket_filename}_admin",
+			"admin_tool_status_password", password)
 		eventually do
 			File.exist?(socket_filename)
 		end
diff --git a/test/support/valgrind.h b/test/support/valgrind.h
new file mode 100644
index 0000000..e4eb5bd
--- /dev/null
+++ b/test/support/valgrind.h
@@ -0,0 +1,2539 @@
+/* -*- c -*-
+   ----------------------------------------------------------------
+
+   Notice that the following BSD-style license applies to this one
+   file (valgrind.h) only.  The rest of Valgrind is licensed under the
+   terms of the GNU General Public License, version 2, unless
+   otherwise indicated.  See the COPYING file in the source
+   distribution for details.
+
+   ----------------------------------------------------------------
+
+   This file is part of Valgrind, a dynamic binary instrumentation
+   framework.
+
+   Copyright (C) 2000-2007 Julian Seward.  All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+   2. The origin of this software must not be misrepresented; you must 
+      not claim that you wrote the original software.  If you use this 
+      software in a product, an acknowledgment in the product 
+      documentation would be appreciated but is not required.
+
+   3. Altered source versions must be plainly marked as such, and must
+      not be misrepresented as being the original software.
+
+   4. The name of the author may not be used to endorse or promote 
+      products derived from this software without specific prior written 
+      permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+   ----------------------------------------------------------------
+
+   Notice that the above BSD-style license applies to this one file
+   (valgrind.h) only.  The entire rest of Valgrind is licensed under
+   the terms of the GNU General Public License, version 2.  See the
+   COPYING file in the source distribution for details.
+
+   ---------------------------------------------------------------- 
+*/
+
+
+/* This file is for inclusion into client (your!) code.
+
+   You can use these macros to manipulate and query Valgrind's 
+   execution inside your own programs.
+
+   The resulting executables will still run without Valgrind, just a
+   little bit more slowly than they otherwise would, but otherwise
+   unchanged.  When not running on valgrind, each client request
+   consumes very few (eg. 7) instructions, so the resulting performance
+   loss is negligible unless you plan to execute client requests
+   millions of times per second.  Nevertheless, if that is still a
+   problem, you can compile with the NVALGRIND symbol defined (gcc
+   -DNVALGRIND) so that client requests are not even compiled in.  */
+
+#ifndef __VALGRIND_H
+#define __VALGRIND_H
+
+#include <stdarg.h>
+
+/* Nb: this file might be included in a file compiled with -ansi.  So
+   we can't use C++ style "//" comments nor the "asm" keyword (instead
+   use "__asm__"). */
+
+/* Derive some tags indicating what the target architecture is.  Note
+   that in this file we're using the compiler's CPP symbols for
+   identifying architectures, which are different to the ones we use
+   within the rest of Valgrind.  Note, __powerpc__ is active for both
+   32 and 64-bit PPC, whereas __powerpc64__ is only active for the
+   latter. */
+#undef ARCH_x86
+#undef ARCH_amd64
+#undef ARCH_ppc32
+#undef ARCH_ppc64
+
+#if defined(__i386__)
+#  define ARCH_x86 1
+#elif defined(__x86_64__)
+#  define ARCH_amd64 1
+#elif defined(__powerpc__) && !defined(__powerpc64__)
+#  define ARCH_ppc32 1
+#elif defined(__powerpc__) && defined(__powerpc64__)
+#  define ARCH_ppc64 1
+#endif
+
+/* If we're not compiling for our target architecture, don't generate
+   any inline asms.  */
+#if !defined(ARCH_x86) && !defined(ARCH_amd64) \
+    && !defined(ARCH_ppc32) && !defined(ARCH_ppc64)
+#  if !defined(NVALGRIND)
+#    define NVALGRIND 1
+#  endif
+#endif
+
+
+/* ------------------------------------------------------------------ */
+/* ARCHITECTURE SPECIFICS for SPECIAL INSTRUCTIONS.  There is nothing */
+/* in here of use to end-users -- skip to the next section.           */
+/* ------------------------------------------------------------------ */
+
+#if defined(NVALGRIND)
+
+/* Define NVALGRIND to completely remove the Valgrind magic sequence
+   from the compiled code (analogous to NDEBUG's effects on
+   assert()) */
+#define VALGRIND_DO_CLIENT_REQUEST(                               \
+        _zzq_rlval, _zzq_default, _zzq_request,                   \
+        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \
+   {                                                              \
+      (_zzq_rlval) = (_zzq_default);                              \
+   }
+
+#else  /* ! NVALGRIND */
+
+/* The following defines the magic code sequences which the JITter
+   spots and handles magically.  Don't look too closely at them as
+   they will rot your brain.
+
+   The assembly code sequences for all architectures is in this one
+   file.  This is because this file must be stand-alone, and we don't
+   want to have multiple files.
+
+   For VALGRIND_DO_CLIENT_REQUEST, we must ensure that the default
+   value gets put in the return slot, so that everything works when
+   this is executed not under Valgrind.  Args are passed in a memory
+   block, and so there's no intrinsic limit to the number that could
+   be passed, but it's currently five.
+   
+   The macro args are: 
+      _zzq_rlval    result lvalue
+      _zzq_default  default value (result returned when running on real CPU)
+      _zzq_request  request code
+      _zzq_arg1..5  request params
+
+   The other two macros are used to support function wrapping, and are
+   a lot simpler.  VALGRIND_GET_NR_CONTEXT returns the value of the
+   guest's NRADDR pseudo-register and whatever other information is
+   needed to safely run the call original from the wrapper: on
+   ppc64-linux, the R2 value at the divert point is also needed.  This
+   information is abstracted into a user-visible type, OrigFn.
+
+   VALGRIND_CALL_NOREDIR_* behaves the same as the following on the
+   guest, but guarantees that the branch instruction will not be
+   redirected: x86: call *%eax, amd64: call *%rax, ppc32/ppc64:
+   branch-and-link-to-r11.  VALGRIND_CALL_NOREDIR is just text, not a
+   complete inline asm, since it needs to be combined with more magic
+   inline asm stuff to be useful.
+*/
+
+/* ---------------------------- x86 ---------------------------- */
+
+#if defined(ARCH_x86)
+
+typedef
+   struct { 
+      unsigned int nraddr; /* where's the code? */
+   }
+   OrigFn;
+
+#define __SPECIAL_INSTRUCTION_PREAMBLE                            \
+                     "roll $3,  %%edi ; roll $13, %%edi\n\t"      \
+                     "roll $29, %%edi ; roll $19, %%edi\n\t"
+
+#define VALGRIND_DO_CLIENT_REQUEST(                               \
+        _zzq_rlval, _zzq_default, _zzq_request,                   \
+        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \
+  { volatile unsigned int _zzq_args[6];                           \
+    volatile unsigned int _zzq_result;                            \
+    _zzq_args[0] = (unsigned int)(_zzq_request);                  \
+    _zzq_args[1] = (unsigned int)(_zzq_arg1);                     \
+    _zzq_args[2] = (unsigned int)(_zzq_arg2);                     \
+    _zzq_args[3] = (unsigned int)(_zzq_arg3);                     \
+    _zzq_args[4] = (unsigned int)(_zzq_arg4);                     \
+    _zzq_args[5] = (unsigned int)(_zzq_arg5);                     \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %EDX = client_request ( %EAX ) */         \
+                     "xchgl %%ebx,%%ebx"                          \
+                     : "=d" (_zzq_result)                         \
+                     : "a" (&_zzq_args[0]), "0" (_zzq_default)    \
+                     : "cc", "memory"                             \
+                    );                                            \
+    _zzq_rlval = _zzq_result;                                     \
+  }
+
+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \
+  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \
+    volatile unsigned int __addr;                                 \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %EAX = guest_NRADDR */                    \
+                     "xchgl %%ecx,%%ecx"                          \
+                     : "=a" (__addr)                              \
+                     :                                            \
+                     : "cc", "memory"                             \
+                    );                                            \
+    _zzq_orig->nraddr = __addr;                                   \
+  }
+
+#define VALGRIND_CALL_NOREDIR_EAX                                 \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* call-noredir *%EAX */                     \
+                     "xchgl %%edx,%%edx\n\t"
+#endif /* ARCH_x86 */
+
+/* --------------------------- amd64 --------------------------- */
+
+#if defined(ARCH_amd64)
+
+typedef
+   struct { 
+      unsigned long long int nraddr; /* where's the code? */
+   }
+   OrigFn;
+
+#define __SPECIAL_INSTRUCTION_PREAMBLE                            \
+                     "rolq $3,  %%rdi ; rolq $13, %%rdi\n\t"      \
+                     "rolq $61, %%rdi ; rolq $51, %%rdi\n\t"
+
+#define VALGRIND_DO_CLIENT_REQUEST(                               \
+        _zzq_rlval, _zzq_default, _zzq_request,                   \
+        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \
+  { volatile unsigned long long int _zzq_args[6];                 \
+    volatile unsigned long long int _zzq_result;                  \
+    _zzq_args[0] = (unsigned long long int)(_zzq_request);        \
+    _zzq_args[1] = (unsigned long long int)(_zzq_arg1);           \
+    _zzq_args[2] = (unsigned long long int)(_zzq_arg2);           \
+    _zzq_args[3] = (unsigned long long int)(_zzq_arg3);           \
+    _zzq_args[4] = (unsigned long long int)(_zzq_arg4);           \
+    _zzq_args[5] = (unsigned long long int)(_zzq_arg5);           \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %RDX = client_request ( %RAX ) */         \
+                     "xchgq %%rbx,%%rbx"                          \
+                     : "=d" (_zzq_result)                         \
+                     : "a" (&_zzq_args[0]), "0" (_zzq_default)    \
+                     : "cc", "memory"                             \
+                    );                                            \
+    _zzq_rlval = _zzq_result;                                     \
+  }
+
+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \
+  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \
+    volatile unsigned long long int __addr;                       \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %RAX = guest_NRADDR */                    \
+                     "xchgq %%rcx,%%rcx"                          \
+                     : "=a" (__addr)                              \
+                     :                                            \
+                     : "cc", "memory"                             \
+                    );                                            \
+    _zzq_orig->nraddr = __addr;                                   \
+  }
+
+#define VALGRIND_CALL_NOREDIR_RAX                                 \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* call-noredir *%RAX */                     \
+                     "xchgq %%rdx,%%rdx\n\t"
+#endif /* ARCH_amd64 */
+
+/* --------------------------- ppc32 --------------------------- */
+
+#if defined(ARCH_ppc32)
+
+typedef
+   struct { 
+      unsigned int nraddr; /* where's the code? */
+   }
+   OrigFn;
+
+#define __SPECIAL_INSTRUCTION_PREAMBLE                            \
+                     "rlwinm 0,0,3,0,0  ; rlwinm 0,0,13,0,0\n\t"  \
+                     "rlwinm 0,0,29,0,0 ; rlwinm 0,0,19,0,0\n\t"
+
+#define VALGRIND_DO_CLIENT_REQUEST(                               \
+        _zzq_rlval, _zzq_default, _zzq_request,                   \
+        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \
+                                                                  \
+  {          unsigned int  _zzq_args[6];                          \
+    register unsigned int  _zzq_result __asm__("r3");             \
+    register unsigned int* _zzq_ptr __asm__("r4");                \
+    _zzq_args[0] = (unsigned int)(_zzq_request);                  \
+    _zzq_args[1] = (unsigned int)(_zzq_arg1);                     \
+    _zzq_args[2] = (unsigned int)(_zzq_arg2);                     \
+    _zzq_args[3] = (unsigned int)(_zzq_arg3);                     \
+    _zzq_args[4] = (unsigned int)(_zzq_arg4);                     \
+    _zzq_args[5] = (unsigned int)(_zzq_arg5);                     \
+    _zzq_ptr = _zzq_args;                                         \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %R3 = client_request ( %R4 ) */           \
+                     "or 1,1,1"                                   \
+                     : "=r" (_zzq_result)                         \
+                     : "0" (_zzq_default), "r" (_zzq_ptr)         \
+                     : "cc", "memory");                           \
+    _zzq_rlval = _zzq_result;                                     \
+  }
+
+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \
+  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \
+    register unsigned int __addr __asm__("r3");                   \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %R3 = guest_NRADDR */                     \
+                     "or 2,2,2"                                   \
+                     : "=r" (__addr)                              \
+                     :                                            \
+                     : "cc", "memory"                             \
+                    );                                            \
+    _zzq_orig->nraddr = __addr;                                   \
+  }
+
+#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                   \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* branch-and-link-to-noredir *%R11 */       \
+                     "or 3,3,3\n\t"
+#endif /* ARCH_ppc32 */
+
+/* --------------------------- ppc64 --------------------------- */
+
+#if defined(ARCH_ppc64)
+
+typedef
+   struct { 
+      unsigned long long int nraddr; /* where's the code? */
+      unsigned long long int r2;  /* what tocptr do we need? */
+   }
+   OrigFn;
+
+#define __SPECIAL_INSTRUCTION_PREAMBLE                            \
+                     "rotldi 0,0,3  ; rotldi 0,0,13\n\t"          \
+                     "rotldi 0,0,61 ; rotldi 0,0,51\n\t"
+
+#define VALGRIND_DO_CLIENT_REQUEST(                               \
+        _zzq_rlval, _zzq_default, _zzq_request,                   \
+        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \
+                                                                  \
+  {          unsigned long long int  _zzq_args[6];                \
+    register unsigned long long int  _zzq_result __asm__("r3");   \
+    register unsigned long long int* _zzq_ptr __asm__("r4");      \
+    _zzq_args[0] = (unsigned long long int)(_zzq_request);        \
+    _zzq_args[1] = (unsigned long long int)(_zzq_arg1);           \
+    _zzq_args[2] = (unsigned long long int)(_zzq_arg2);           \
+    _zzq_args[3] = (unsigned long long int)(_zzq_arg3);           \
+    _zzq_args[4] = (unsigned long long int)(_zzq_arg4);           \
+    _zzq_args[5] = (unsigned long long int)(_zzq_arg5);           \
+    _zzq_ptr = _zzq_args;                                         \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %R3 = client_request ( %R4 ) */           \
+                     "or 1,1,1"                                   \
+                     : "=r" (_zzq_result)                         \
+                     : "0" (_zzq_default), "r" (_zzq_ptr)         \
+                     : "cc", "memory");                           \
+    _zzq_rlval = _zzq_result;                                     \
+  }
+
+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \
+  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \
+    register unsigned long long int __addr __asm__("r3");         \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %R3 = guest_NRADDR */                     \
+                     "or 2,2,2"                                   \
+                     : "=r" (__addr)                              \
+                     :                                            \
+                     : "cc", "memory"                             \
+                    );                                            \
+    _zzq_orig->nraddr = __addr;                                   \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %R3 = guest_NRADDR_GPR2 */                \
+                     "or 4,4,4"                                   \
+                     : "=r" (__addr)                              \
+                     :                                            \
+                     : "cc", "memory"                             \
+                    );                                            \
+    _zzq_orig->r2 = __addr;                                       \
+  }
+
+#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                   \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* branch-and-link-to-noredir *%R11 */       \
+                     "or 3,3,3\n\t"
+
+#endif /* ARCH_ppc64 */
+
+/* Insert assembly code for other architectures here... */
+
+#endif /* NVALGRIND */
+
+
+/* ------------------------------------------------------------------ */
+/* ARCHITECTURE SPECIFICS for FUNCTION WRAPPING.  This is all very    */
+/* ugly.  It's the least-worst tradeoff I can think of.               */
+/* ------------------------------------------------------------------ */
+
+/* This section defines magic (a.k.a appalling-hack) macros for doing
+   guaranteed-no-redirection macros, so as to get from function
+   wrappers to the functions they are wrapping.  The whole point is to
+   construct standard call sequences, but to do the call itself with a
+   special no-redirect call pseudo-instruction that the JIT
+   understands and handles specially.  This section is long and
+   repetitious, and I can't see a way to make it shorter.
+
+   The naming scheme is as follows:
+
+      CALL_FN_{W,v}_{v,W,WW,WWW,WWWW,5W,6W,7W,etc}
+
+   'W' stands for "word" and 'v' for "void".  Hence there are
+   different macros for calling arity 0, 1, 2, 3, 4, etc, functions,
+   and for each, the possibility of returning a word-typed result, or
+   no result.
+*/
+
+/* Use these to write the name of your wrapper.  NOTE: duplicates
+   VG_WRAP_FUNCTION_Z{U,Z} in pub_tool_redir.h. */
+
+#define I_WRAP_SONAME_FNNAME_ZU(soname,fnname)                    \
+   _vgwZU_##soname##_##fnname
+
+#define I_WRAP_SONAME_FNNAME_ZZ(soname,fnname)                    \
+   _vgwZZ_##soname##_##fnname
+
+/* Use this macro from within a wrapper function to collect the
+   context (address and possibly other info) of the original function.
+   Once you have that you can then use it in one of the CALL_FN_
+   macros.  The type of the argument _lval is OrigFn. */
+#define VALGRIND_GET_ORIG_FN(_lval)  VALGRIND_GET_NR_CONTEXT(_lval)
+
+/* Derivatives of the main macros below, for calling functions
+   returning void. */
+
+#define CALL_FN_v_v(fnptr)                                        \
+   do { volatile unsigned long _junk;                             \
+        CALL_FN_W_v(_junk,fnptr); } while (0)
+
+#define CALL_FN_v_W(fnptr, arg1)                                  \
+   do { volatile unsigned long _junk;                             \
+        CALL_FN_W_W(_junk,fnptr,arg1); } while (0)
+
+#define CALL_FN_v_WW(fnptr, arg1,arg2)                            \
+   do { volatile unsigned long _junk;                             \
+        CALL_FN_W_WW(_junk,fnptr,arg1,arg2); } while (0)
+
+#define CALL_FN_v_WWW(fnptr, arg1,arg2,arg3)                      \
+   do { volatile unsigned long _junk;                             \
+        CALL_FN_W_WWW(_junk,fnptr,arg1,arg2,arg3); } while (0)
+
+/* ---------------------------- x86 ---------------------------- */
+
+#if defined(ARCH_x86)
+
+/* These regs are trashed by the hidden call.  No need to mention eax
+   as gcc can already see that, plus causes gcc to bomb. */
+#define __CALLER_SAVED_REGS /*"eax"*/ "ecx", "edx"
+
+/* These CALL_FN_ macros assume that on x86-linux, sizeof(unsigned
+   long) == 4. */
+
+#define CALL_FN_W_v(lval, orig)                                   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[1];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      __asm__ volatile(                                           \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_W(lval, orig, arg1)                             \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[2];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      __asm__ volatile(                                           \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         "addl $4, %%esp\n"                                       \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      __asm__ volatile(                                           \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         "addl $8, %%esp\n"                                       \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[4];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      __asm__ volatile(                                           \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         "addl $12, %%esp\n"                                      \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[5];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      __asm__ volatile(                                           \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         "addl $16, %%esp\n"                                      \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[6];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      __asm__ volatile(                                           \
+         "pushl 20(%%eax)\n\t"                                    \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         "addl $20, %%esp\n"                                      \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[7];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      __asm__ volatile(                                           \
+         "pushl 24(%%eax)\n\t"                                    \
+         "pushl 20(%%eax)\n\t"                                    \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         "addl $24, %%esp\n"                                      \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7)                            \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[8];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      __asm__ volatile(                                           \
+         "pushl 28(%%eax)\n\t"                                    \
+         "pushl 24(%%eax)\n\t"                                    \
+         "pushl 20(%%eax)\n\t"                                    \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         "addl $28, %%esp\n"                                      \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[9];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      __asm__ volatile(                                           \
+         "pushl 32(%%eax)\n\t"                                    \
+         "pushl 28(%%eax)\n\t"                                    \
+         "pushl 24(%%eax)\n\t"                                    \
+         "pushl 20(%%eax)\n\t"                                    \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         "addl $32, %%esp\n"                                      \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8,arg9)                  \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[10];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      __asm__ volatile(                                           \
+         "pushl 36(%%eax)\n\t"                                    \
+         "pushl 32(%%eax)\n\t"                                    \
+         "pushl 28(%%eax)\n\t"                                    \
+         "pushl 24(%%eax)\n\t"                                    \
+         "pushl 20(%%eax)\n\t"                                    \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         "addl $36, %%esp\n"                                      \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[11];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      __asm__ volatile(                                           \
+         "pushl 40(%%eax)\n\t"                                    \
+         "pushl 36(%%eax)\n\t"                                    \
+         "pushl 32(%%eax)\n\t"                                    \
+         "pushl 28(%%eax)\n\t"                                    \
+         "pushl 24(%%eax)\n\t"                                    \
+         "pushl 20(%%eax)\n\t"                                    \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         "addl $40, %%esp\n"                                      \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,       \
+                                  arg6,arg7,arg8,arg9,arg10,      \
+                                  arg11)                          \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[12];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      _argvec[11] = (unsigned long)(arg11);                       \
+      __asm__ volatile(                                           \
+         "pushl 44(%%eax)\n\t"                                    \
+         "pushl 40(%%eax)\n\t"                                    \
+         "pushl 36(%%eax)\n\t"                                    \
+         "pushl 32(%%eax)\n\t"                                    \
+         "pushl 28(%%eax)\n\t"                                    \
+         "pushl 24(%%eax)\n\t"                                    \
+         "pushl 20(%%eax)\n\t"                                    \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         "addl $44, %%esp\n"                                      \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,       \
+                                  arg6,arg7,arg8,arg9,arg10,      \
+                                  arg11,arg12)                    \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[13];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      _argvec[11] = (unsigned long)(arg11);                       \
+      _argvec[12] = (unsigned long)(arg12);                       \
+      __asm__ volatile(                                           \
+         "pushl 48(%%eax)\n\t"                                    \
+         "pushl 44(%%eax)\n\t"                                    \
+         "pushl 40(%%eax)\n\t"                                    \
+         "pushl 36(%%eax)\n\t"                                    \
+         "pushl 32(%%eax)\n\t"                                    \
+         "pushl 28(%%eax)\n\t"                                    \
+         "pushl 24(%%eax)\n\t"                                    \
+         "pushl 20(%%eax)\n\t"                                    \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         "addl $48, %%esp\n"                                      \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#endif /* ARCH_x86 */
+
+/* --------------------------- amd64 --------------------------- */
+
+#if defined(ARCH_amd64)
+
+/* ARGREGS: rdi rsi rdx rcx r8 r9 (the rest on stack in R-to-L order) */
+
+/* These regs are trashed by the hidden call. */
+#define __CALLER_SAVED_REGS /*"rax",*/ "rcx", "rdx", "rsi",       \
+                            "rdi", "r8", "r9", "r10", "r11"
+
+/* These CALL_FN_ macros assume that on amd64-linux, sizeof(unsigned
+   long) == 8. */
+
+#define CALL_FN_W_v(lval, orig)                                   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[1];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      __asm__ volatile(                                           \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */            \
+         VALGRIND_CALL_NOREDIR_RAX                                \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_W(lval, orig, arg1)                             \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[2];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      __asm__ volatile(                                           \
+         "movq 8(%%rax), %%rdi\n\t"                               \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */            \
+         VALGRIND_CALL_NOREDIR_RAX                                \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      __asm__ volatile(                                           \
+         "movq 16(%%rax), %%rsi\n\t"                              \
+         "movq 8(%%rax), %%rdi\n\t"                               \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */            \
+         VALGRIND_CALL_NOREDIR_RAX                                \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[4];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      __asm__ volatile(                                           \
+         "movq 24(%%rax), %%rdx\n\t"                              \
+         "movq 16(%%rax), %%rsi\n\t"                              \
+         "movq 8(%%rax), %%rdi\n\t"                               \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */            \
+         VALGRIND_CALL_NOREDIR_RAX                                \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[5];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      __asm__ volatile(                                           \
+         "movq 32(%%rax), %%rcx\n\t"                              \
+         "movq 24(%%rax), %%rdx\n\t"                              \
+         "movq 16(%%rax), %%rsi\n\t"                              \
+         "movq 8(%%rax), %%rdi\n\t"                               \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */            \
+         VALGRIND_CALL_NOREDIR_RAX                                \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[6];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      __asm__ volatile(                                           \
+         "movq 40(%%rax), %%r8\n\t"                               \
+         "movq 32(%%rax), %%rcx\n\t"                              \
+         "movq 24(%%rax), %%rdx\n\t"                              \
+         "movq 16(%%rax), %%rsi\n\t"                              \
+         "movq 8(%%rax), %%rdi\n\t"                               \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */            \
+         VALGRIND_CALL_NOREDIR_RAX                                \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[7];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      __asm__ volatile(                                           \
+         "movq 48(%%rax), %%r9\n\t"                               \
+         "movq 40(%%rax), %%r8\n\t"                               \
+         "movq 32(%%rax), %%rcx\n\t"                              \
+         "movq 24(%%rax), %%rdx\n\t"                              \
+         "movq 16(%%rax), %%rsi\n\t"                              \
+         "movq 8(%%rax), %%rdi\n\t"                               \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */            \
+         VALGRIND_CALL_NOREDIR_RAX                                \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7)                            \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[8];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      __asm__ volatile(                                           \
+         "pushq 56(%%rax)\n\t"                                    \
+         "movq 48(%%rax), %%r9\n\t"                               \
+         "movq 40(%%rax), %%r8\n\t"                               \
+         "movq 32(%%rax), %%rcx\n\t"                              \
+         "movq 24(%%rax), %%rdx\n\t"                              \
+         "movq 16(%%rax), %%rsi\n\t"                              \
+         "movq 8(%%rax), %%rdi\n\t"                               \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */            \
+         VALGRIND_CALL_NOREDIR_RAX                                \
+         "addq $8, %%rsp\n"                                       \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[9];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      __asm__ volatile(                                           \
+         "pushq 64(%%rax)\n\t"                                    \
+         "pushq 56(%%rax)\n\t"                                    \
+         "movq 48(%%rax), %%r9\n\t"                               \
+         "movq 40(%%rax), %%r8\n\t"                               \
+         "movq 32(%%rax), %%rcx\n\t"                              \
+         "movq 24(%%rax), %%rdx\n\t"                              \
+         "movq 16(%%rax), %%rsi\n\t"                              \
+         "movq 8(%%rax), %%rdi\n\t"                               \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */            \
+         VALGRIND_CALL_NOREDIR_RAX                                \
+         "addq $16, %%rsp\n"                                      \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8,arg9)                  \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[10];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      __asm__ volatile(                                           \
+         "pushq 72(%%rax)\n\t"                                    \
+         "pushq 64(%%rax)\n\t"                                    \
+         "pushq 56(%%rax)\n\t"                                    \
+         "movq 48(%%rax), %%r9\n\t"                               \
+         "movq 40(%%rax), %%r8\n\t"                               \
+         "movq 32(%%rax), %%rcx\n\t"                              \
+         "movq 24(%%rax), %%rdx\n\t"                              \
+         "movq 16(%%rax), %%rsi\n\t"                              \
+         "movq 8(%%rax), %%rdi\n\t"                               \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */            \
+         VALGRIND_CALL_NOREDIR_RAX                                \
+         "addq $24, %%rsp\n"                                      \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[11];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      __asm__ volatile(                                           \
+         "pushq 80(%%rax)\n\t"                                    \
+         "pushq 72(%%rax)\n\t"                                    \
+         "pushq 64(%%rax)\n\t"                                    \
+         "pushq 56(%%rax)\n\t"                                    \
+         "movq 48(%%rax), %%r9\n\t"                               \
+         "movq 40(%%rax), %%r8\n\t"                               \
+         "movq 32(%%rax), %%rcx\n\t"                              \
+         "movq 24(%%rax), %%rdx\n\t"                              \
+         "movq 16(%%rax), %%rsi\n\t"                              \
+         "movq 8(%%rax), %%rdi\n\t"                               \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */            \
+         VALGRIND_CALL_NOREDIR_RAX                                \
+         "addq $32, %%rsp\n"                                      \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10,arg11)     \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[12];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      _argvec[11] = (unsigned long)(arg11);                       \
+      __asm__ volatile(                                           \
+         "pushq 88(%%rax)\n\t"                                    \
+         "pushq 80(%%rax)\n\t"                                    \
+         "pushq 72(%%rax)\n\t"                                    \
+         "pushq 64(%%rax)\n\t"                                    \
+         "pushq 56(%%rax)\n\t"                                    \
+         "movq 48(%%rax), %%r9\n\t"                               \
+         "movq 40(%%rax), %%r8\n\t"                               \
+         "movq 32(%%rax), %%rcx\n\t"                              \
+         "movq 24(%%rax), %%rdx\n\t"                              \
+         "movq 16(%%rax), %%rsi\n\t"                              \
+         "movq 8(%%rax), %%rdi\n\t"                               \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */            \
+         VALGRIND_CALL_NOREDIR_RAX                                \
+         "addq $40, %%rsp\n"                                      \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                arg7,arg8,arg9,arg10,arg11,arg12) \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[13];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      _argvec[11] = (unsigned long)(arg11);                       \
+      _argvec[12] = (unsigned long)(arg12);                       \
+      __asm__ volatile(                                           \
+         "pushq 96(%%rax)\n\t"                                    \
+         "pushq 88(%%rax)\n\t"                                    \
+         "pushq 80(%%rax)\n\t"                                    \
+         "pushq 72(%%rax)\n\t"                                    \
+         "pushq 64(%%rax)\n\t"                                    \
+         "pushq 56(%%rax)\n\t"                                    \
+         "movq 48(%%rax), %%r9\n\t"                               \
+         "movq 40(%%rax), %%r8\n\t"                               \
+         "movq 32(%%rax), %%rcx\n\t"                              \
+         "movq 24(%%rax), %%rdx\n\t"                              \
+         "movq 16(%%rax), %%rsi\n\t"                              \
+         "movq 8(%%rax), %%rdi\n\t"                               \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */            \
+         VALGRIND_CALL_NOREDIR_RAX                                \
+         "addq $48, %%rsp\n"                                      \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#endif /* ARCH_amd64 */
+
+/* --------------------------- ppc32 --------------------------- */
+
+#if defined(ARCH_ppc32)
+
+/* This is useful for finding out about the on-stack stuff:
+
+   extern int f9  ( int,int,int,int,int,int,int,int,int );
+   extern int f10 ( int,int,int,int,int,int,int,int,int,int );
+   extern int f11 ( int,int,int,int,int,int,int,int,int,int,int );
+   extern int f12 ( int,int,int,int,int,int,int,int,int,int,int,int );
+
+   int g9 ( void ) {
+      return f9(11,22,33,44,55,66,77,88,99);
+   }
+   int g10 ( void ) {
+      return f10(11,22,33,44,55,66,77,88,99,110);
+   }
+   int g11 ( void ) {
+      return f11(11,22,33,44,55,66,77,88,99,110,121);
+   }
+   int g12 ( void ) {
+      return f12(11,22,33,44,55,66,77,88,99,110,121,132);
+   }
+*/
+
+/* ARGREGS: r3 r4 r5 r6 r7 r8 r9 r10 (the rest on stack somewhere) */
+
+/* These regs are trashed by the hidden call. */
+#define __CALLER_SAVED_REGS                                       \
+   "lr", "ctr", "xer",                                            \
+   "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7",        \
+   "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10",   \
+   "r11", "r12", "r13"
+
+/* These CALL_FN_ macros assume that on ppc32-linux, 
+   sizeof(unsigned long) == 4. */
+
+#define CALL_FN_W_v(lval, orig)                                   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[1];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_W(lval, orig, arg1)                             \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[2];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[4];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[5];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[6];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      _argvec[5] = (unsigned long)arg5;                           \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 7,20(11)\n\t"                                       \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[7];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      _argvec[5] = (unsigned long)arg5;                           \
+      _argvec[6] = (unsigned long)arg6;                           \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 7,20(11)\n\t"                                       \
+         "lwz 8,24(11)\n\t"                                       \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7)                            \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[8];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      _argvec[5] = (unsigned long)arg5;                           \
+      _argvec[6] = (unsigned long)arg6;                           \
+      _argvec[7] = (unsigned long)arg7;                           \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 7,20(11)\n\t"                                       \
+         "lwz 8,24(11)\n\t"                                       \
+         "lwz 9,28(11)\n\t"                                       \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[9];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      _argvec[5] = (unsigned long)arg5;                           \
+      _argvec[6] = (unsigned long)arg6;                           \
+      _argvec[7] = (unsigned long)arg7;                           \
+      _argvec[8] = (unsigned long)arg8;                           \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 7,20(11)\n\t"                                       \
+         "lwz 8,24(11)\n\t"                                       \
+         "lwz 9,28(11)\n\t"                                       \
+         "lwz 10,32(11)\n\t" /* arg8->r10 */                      \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8,arg9)                  \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[10];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      _argvec[5] = (unsigned long)arg5;                           \
+      _argvec[6] = (unsigned long)arg6;                           \
+      _argvec[7] = (unsigned long)arg7;                           \
+      _argvec[8] = (unsigned long)arg8;                           \
+      _argvec[9] = (unsigned long)arg9;                           \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "addi 1,1,-16\n\t"                                       \
+         /* arg9 */                                               \
+         "lwz 3,36(11)\n\t"                                       \
+         "stw 3,8(1)\n\t"                                         \
+         /* args1-8 */                                            \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 7,20(11)\n\t"                                       \
+         "lwz 8,24(11)\n\t"                                       \
+         "lwz 9,28(11)\n\t"                                       \
+         "lwz 10,32(11)\n\t" /* arg8->r10 */                      \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "addi 1,1,16\n\t"                                        \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[11];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      _argvec[5] = (unsigned long)arg5;                           \
+      _argvec[6] = (unsigned long)arg6;                           \
+      _argvec[7] = (unsigned long)arg7;                           \
+      _argvec[8] = (unsigned long)arg8;                           \
+      _argvec[9] = (unsigned long)arg9;                           \
+      _argvec[10] = (unsigned long)arg10;                         \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "addi 1,1,-16\n\t"                                       \
+         /* arg10 */                                              \
+         "lwz 3,40(11)\n\t"                                       \
+         "stw 3,12(1)\n\t"                                        \
+         /* arg9 */                                               \
+         "lwz 3,36(11)\n\t"                                       \
+         "stw 3,8(1)\n\t"                                         \
+         /* args1-8 */                                            \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 7,20(11)\n\t"                                       \
+         "lwz 8,24(11)\n\t"                                       \
+         "lwz 9,28(11)\n\t"                                       \
+         "lwz 10,32(11)\n\t" /* arg8->r10 */                      \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "addi 1,1,16\n\t"                                        \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10,arg11)     \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[12];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      _argvec[5] = (unsigned long)arg5;                           \
+      _argvec[6] = (unsigned long)arg6;                           \
+      _argvec[7] = (unsigned long)arg7;                           \
+      _argvec[8] = (unsigned long)arg8;                           \
+      _argvec[9] = (unsigned long)arg9;                           \
+      _argvec[10] = (unsigned long)arg10;                         \
+      _argvec[11] = (unsigned long)arg11;                         \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "addi 1,1,-32\n\t"                                       \
+         /* arg11 */                                              \
+         "lwz 3,44(11)\n\t"                                       \
+         "stw 3,16(1)\n\t"                                        \
+         /* arg10 */                                              \
+         "lwz 3,40(11)\n\t"                                       \
+         "stw 3,12(1)\n\t"                                        \
+         /* arg9 */                                               \
+         "lwz 3,36(11)\n\t"                                       \
+         "stw 3,8(1)\n\t"                                         \
+         /* args1-8 */                                            \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 7,20(11)\n\t"                                       \
+         "lwz 8,24(11)\n\t"                                       \
+         "lwz 9,28(11)\n\t"                                       \
+         "lwz 10,32(11)\n\t" /* arg8->r10 */                      \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "addi 1,1,32\n\t"                                        \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                arg7,arg8,arg9,arg10,arg11,arg12) \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[13];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      _argvec[5] = (unsigned long)arg5;                           \
+      _argvec[6] = (unsigned long)arg6;                           \
+      _argvec[7] = (unsigned long)arg7;                           \
+      _argvec[8] = (unsigned long)arg8;                           \
+      _argvec[9] = (unsigned long)arg9;                           \
+      _argvec[10] = (unsigned long)arg10;                         \
+      _argvec[11] = (unsigned long)arg11;                         \
+      _argvec[12] = (unsigned long)arg12;                         \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "addi 1,1,-32\n\t"                                       \
+         /* arg12 */                                              \
+         "lwz 3,48(11)\n\t"                                       \
+         "stw 3,20(1)\n\t"                                        \
+         /* arg11 */                                              \
+         "lwz 3,44(11)\n\t"                                       \
+         "stw 3,16(1)\n\t"                                        \
+         /* arg10 */                                              \
+         "lwz 3,40(11)\n\t"                                       \
+         "stw 3,12(1)\n\t"                                        \
+         /* arg9 */                                               \
+         "lwz 3,36(11)\n\t"                                       \
+         "stw 3,8(1)\n\t"                                         \
+         /* args1-8 */                                            \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 7,20(11)\n\t"                                       \
+         "lwz 8,24(11)\n\t"                                       \
+         "lwz 9,28(11)\n\t"                                       \
+         "lwz 10,32(11)\n\t" /* arg8->r10 */                      \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "addi 1,1,32\n\t"                                        \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#endif /* ARCH_ppc32 */
+
+/* --------------------------- ppc64 --------------------------- */
+
+#if defined(ARCH_ppc64)
+
+/* ARGREGS: r3 r4 r5 r6 r7 r8 r9 r10 (the rest on stack somewhere) */
+
+/* These regs are trashed by the hidden call. */
+#define __CALLER_SAVED_REGS                                       \
+   "lr", "ctr", "xer",                                            \
+   "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7",        \
+   "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10",   \
+   "r11", "r12", "r13"
+
+/* These CALL_FN_ macros assume that on ppc64-linux, sizeof(unsigned
+   long) == 8. */
+
+#define CALL_FN_W_v(lval, orig)                                   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+0];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1] = (unsigned long)_orig.r2;                       \
+      _argvec[2] = (unsigned long)_orig.nraddr;                   \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)" /* restore tocptr */                      \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_W(lval, orig, arg1)                             \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+1];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)" /* restore tocptr */                      \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+2];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)" /* restore tocptr */                      \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+3];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)" /* restore tocptr */                      \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+4];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)" /* restore tocptr */                      \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+5];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(11)\n\t" /* arg5->r7 */                      \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)" /* restore tocptr */                      \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+6];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(11)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(11)\n\t" /* arg6->r8 */                      \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)" /* restore tocptr */                      \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7)                            \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+7];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(11)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(11)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(11)\n\t" /* arg7->r9 */                      \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)" /* restore tocptr */                      \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+8];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      _argvec[2+8] = (unsigned long)arg8;                         \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(11)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(11)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(11)\n\t" /* arg7->r9 */                      \
+         "ld  10, 64(11)\n\t" /* arg8->r10 */                     \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)" /* restore tocptr */                      \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8,arg9)                  \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+9];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      _argvec[2+8] = (unsigned long)arg8;                         \
+      _argvec[2+9] = (unsigned long)arg9;                         \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "addi 1,1,-128\n\t"  /* expand stack frame */            \
+         /* arg9 */                                               \
+         "ld  3,72(11)\n\t"                                       \
+         "std 3,112(1)\n\t"                                       \
+         /* args1-8 */                                            \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(11)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(11)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(11)\n\t" /* arg7->r9 */                      \
+         "ld  10, 64(11)\n\t" /* arg8->r10 */                     \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         "addi 1,1,128"     /* restore frame */                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+10];                       \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      _argvec[2+8] = (unsigned long)arg8;                         \
+      _argvec[2+9] = (unsigned long)arg9;                         \
+      _argvec[2+10] = (unsigned long)arg10;                       \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "addi 1,1,-128\n\t"  /* expand stack frame */            \
+         /* arg10 */                                              \
+         "ld  3,80(11)\n\t"                                       \
+         "std 3,120(1)\n\t"                                       \
+         /* arg9 */                                               \
+         "ld  3,72(11)\n\t"                                       \
+         "std 3,112(1)\n\t"                                       \
+         /* args1-8 */                                            \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(11)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(11)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(11)\n\t" /* arg7->r9 */                      \
+         "ld  10, 64(11)\n\t" /* arg8->r10 */                     \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         "addi 1,1,128"     /* restore frame */                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10,arg11)     \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+11];                       \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      _argvec[2+8] = (unsigned long)arg8;                         \
+      _argvec[2+9] = (unsigned long)arg9;                         \
+      _argvec[2+10] = (unsigned long)arg10;                       \
+      _argvec[2+11] = (unsigned long)arg11;                       \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "addi 1,1,-144\n\t"  /* expand stack frame */            \
+         /* arg11 */                                              \
+         "ld  3,88(11)\n\t"                                       \
+         "std 3,128(1)\n\t"                                       \
+         /* arg10 */                                              \
+         "ld  3,80(11)\n\t"                                       \
+         "std 3,120(1)\n\t"                                       \
+         /* arg9 */                                               \
+         "ld  3,72(11)\n\t"                                       \
+         "std 3,112(1)\n\t"                                       \
+         /* args1-8 */                                            \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(11)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(11)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(11)\n\t" /* arg7->r9 */                      \
+         "ld  10, 64(11)\n\t" /* arg8->r10 */                     \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         "addi 1,1,144"     /* restore frame */                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                arg7,arg8,arg9,arg10,arg11,arg12) \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+12];                       \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      _argvec[2+8] = (unsigned long)arg8;                         \
+      _argvec[2+9] = (unsigned long)arg9;                         \
+      _argvec[2+10] = (unsigned long)arg10;                       \
+      _argvec[2+11] = (unsigned long)arg11;                       \
+      _argvec[2+12] = (unsigned long)arg12;                       \
+      __asm__ volatile(                                           \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "addi 1,1,-144\n\t"  /* expand stack frame */            \
+         /* arg12 */                                              \
+         "ld  3,96(11)\n\t"                                       \
+         "std 3,136(1)\n\t"                                       \
+         /* arg11 */                                              \
+         "ld  3,88(11)\n\t"                                       \
+         "std 3,128(1)\n\t"                                       \
+         /* arg10 */                                              \
+         "ld  3,80(11)\n\t"                                       \
+         "std 3,120(1)\n\t"                                       \
+         /* arg9 */                                               \
+         "ld  3,72(11)\n\t"                                       \
+         "std 3,112(1)\n\t"                                       \
+         /* args1-8 */                                            \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(11)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(11)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(11)\n\t" /* arg7->r9 */                      \
+         "ld  10, 64(11)\n\t" /* arg8->r10 */                     \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         "addi 1,1,144"     /* restore frame */                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS          \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#endif /* ARCH_ppc64 */
+
+
+/* ------------------------------------------------------------------ */
+/* ARCHITECTURE INDEPENDENT MACROS for CLIENT REQUESTS.               */
+/*                                                                    */
+/* ------------------------------------------------------------------ */
+
+/* Some request codes.  There are many more of these, but most are not
+   exposed to end-user view.  These are the public ones, all of the
+   form 0x1000 + small_number.
+
+   Core ones are in the range 0x00000000--0x0000ffff.  The non-public
+   ones start at 0x2000.
+*/
+
+/* These macros are used by tools -- they must be public, but don't
+   embed them into other programs. */
+#define VG_USERREQ_TOOL_BASE(a,b) \
+   ((unsigned int)(((a)&0xff) << 24 | ((b)&0xff) << 16))
+#define VG_IS_TOOL_USERREQ(a, b, v) \
+   (VG_USERREQ_TOOL_BASE(a,b) == ((v) & 0xffff0000))
+
+/* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !! 
+   This enum comprises an ABI exported by Valgrind to programs
+   which use client requests.  DO NOT CHANGE THE ORDER OF THESE
+   ENTRIES, NOR DELETE ANY -- add new ones at the end. */
+typedef
+   enum { VG_USERREQ__RUNNING_ON_VALGRIND  = 0x1001,
+          VG_USERREQ__DISCARD_TRANSLATIONS = 0x1002,
+
+          /* These allow any function to be called from the simulated
+             CPU but run on the real CPU.  Nb: the first arg passed to
+             the function is always the ThreadId of the running
+             thread!  So CLIENT_CALL0 actually requires a 1 arg
+             function, etc. */
+          VG_USERREQ__CLIENT_CALL0 = 0x1101,
+          VG_USERREQ__CLIENT_CALL1 = 0x1102,
+          VG_USERREQ__CLIENT_CALL2 = 0x1103,
+          VG_USERREQ__CLIENT_CALL3 = 0x1104,
+
+          /* Can be useful in regression testing suites -- eg. can
+             send Valgrind's output to /dev/null and still count
+             errors. */
+          VG_USERREQ__COUNT_ERRORS = 0x1201,
+
+          /* These are useful and can be interpreted by any tool that
+             tracks malloc() et al, by using vg_replace_malloc.c. */
+          VG_USERREQ__MALLOCLIKE_BLOCK = 0x1301,
+          VG_USERREQ__FREELIKE_BLOCK   = 0x1302,
+          /* Memory pool support. */
+          VG_USERREQ__CREATE_MEMPOOL   = 0x1303,
+          VG_USERREQ__DESTROY_MEMPOOL  = 0x1304,
+          VG_USERREQ__MEMPOOL_ALLOC    = 0x1305,
+          VG_USERREQ__MEMPOOL_FREE     = 0x1306,
+
+          /* Allow printfs to valgrind log. */
+          VG_USERREQ__PRINTF           = 0x1401,
+          VG_USERREQ__PRINTF_BACKTRACE = 0x1402,
+
+          /* Stack support. */
+          VG_USERREQ__STACK_REGISTER   = 0x1501,
+          VG_USERREQ__STACK_DEREGISTER = 0x1502,
+          VG_USERREQ__STACK_CHANGE     = 0x1503
+   } Vg_ClientRequest;
+
+#if !defined(__GNUC__)
+#  define __extension__ /* */
+#endif
+
+/* Returns the number of Valgrinds this code is running under.  That
+   is, 0 if running natively, 1 if running under Valgrind, 2 if
+   running under Valgrind which is running under another Valgrind,
+   etc. */
+#define RUNNING_ON_VALGRIND  __extension__                        \
+   ({unsigned int _qzz_res;                                       \
+    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* if not */,          \
+                               VG_USERREQ__RUNNING_ON_VALGRIND,   \
+                               0, 0, 0, 0, 0);                    \
+    _qzz_res;                                                     \
+   })
+
+
+/* Discard translation of code in the range [_qzz_addr .. _qzz_addr +
+   _qzz_len - 1].  Useful if you are debugging a JITter or some such,
+   since it provides a way to make sure valgrind will retranslate the
+   invalidated area.  Returns no value. */
+#define VALGRIND_DISCARD_TRANSLATIONS(_qzz_addr,_qzz_len)         \
+   {unsigned int _qzz_res;                                        \
+    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
+                               VG_USERREQ__DISCARD_TRANSLATIONS,  \
+                               _qzz_addr, _qzz_len, 0, 0, 0);     \
+   }
+
+
+/* These requests are for getting Valgrind itself to print something.
+   Possibly with a backtrace.  This is a really ugly hack. */
+
+#if defined(NVALGRIND)
+
+#  define VALGRIND_PRINTF(...)
+#  define VALGRIND_PRINTF_BACKTRACE(...)
+
+#else /* NVALGRIND */
+
+/* Modern GCC will optimize the static routine out if unused,
+   and unused attribute will shut down warnings about it.  */
+static int VALGRIND_PRINTF(const char *format, ...)
+   __attribute__((format(__printf__, 1, 2), __unused__));
+static int
+VALGRIND_PRINTF(const char *format, ...)
+{
+   unsigned long _qzz_res;
+   va_list vargs;
+   va_start(vargs, format);
+   VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, VG_USERREQ__PRINTF,
+                              (unsigned long)format, (unsigned long)vargs, 
+                              0, 0, 0);
+   va_end(vargs);
+   return (int)_qzz_res;
+}
+
+static int VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
+   __attribute__((format(__printf__, 1, 2), __unused__));
+static int
+VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
+{
+   unsigned long _qzz_res;
+   va_list vargs;
+   va_start(vargs, format);
+   VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, VG_USERREQ__PRINTF_BACKTRACE,
+                              (unsigned long)format, (unsigned long)vargs, 
+                              0, 0, 0);
+   va_end(vargs);
+   return (int)_qzz_res;
+}
+
+#endif /* NVALGRIND */
+
+
+/* These requests allow control to move from the simulated CPU to the
+   real CPU, calling an arbitary function */
+#define VALGRIND_NON_SIMD_CALL0(_qyy_fn)                          \
+   __extension__                                                  \
+   ({unsigned long _qyy_res;                                      \
+    VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */,  \
+                               VG_USERREQ__CLIENT_CALL0,          \
+                               _qyy_fn,                           \
+                               0, 0, 0, 0);                       \
+    _qyy_res;                                                     \
+   })
+
+#define VALGRIND_NON_SIMD_CALL1(_qyy_fn, _qyy_arg1)               \
+   __extension__                                                  \
+   ({unsigned long _qyy_res;                                      \
+    VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */,  \
+                               VG_USERREQ__CLIENT_CALL1,          \
+                               _qyy_fn,                           \
+                               _qyy_arg1, 0, 0, 0);               \
+    _qyy_res;                                                     \
+   })
+
+#define VALGRIND_NON_SIMD_CALL2(_qyy_fn, _qyy_arg1, _qyy_arg2)    \
+   __extension__                                                  \
+   ({unsigned long _qyy_res;                                      \
+    VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */,  \
+                               VG_USERREQ__CLIENT_CALL2,          \
+                               _qyy_fn,                           \
+                               _qyy_arg1, _qyy_arg2, 0, 0);       \
+    _qyy_res;                                                     \
+   })
+
+#define VALGRIND_NON_SIMD_CALL3(_qyy_fn, _qyy_arg1, _qyy_arg2, _qyy_arg3) \
+   __extension__                                                  \
+   ({unsigned long _qyy_res;                                      \
+    VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */,  \
+                               VG_USERREQ__CLIENT_CALL3,          \
+                               _qyy_fn,                           \
+                               _qyy_arg1, _qyy_arg2,              \
+                               _qyy_arg3, 0);                     \
+    _qyy_res;                                                     \
+   })
+
+
+/* Counts the number of errors that have been recorded by a tool.  Nb:
+   the tool must record the errors with VG_(maybe_record_error)() or
+   VG_(unique_error)() for them to be counted. */
+#define VALGRIND_COUNT_ERRORS                                     \
+   __extension__                                                  \
+   ({unsigned int _qyy_res;                                       \
+    VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */,  \
+                               VG_USERREQ__COUNT_ERRORS,          \
+                               0, 0, 0, 0, 0);                    \
+    _qyy_res;                                                     \
+   })
+
+/* Mark a block of memory as having been allocated by a malloc()-like
+   function.  `addr' is the start of the usable block (ie. after any
+   redzone) `rzB' is redzone size if the allocator can apply redzones;
+   use '0' if not.  Adding redzones makes it more likely Valgrind will spot
+   block overruns.  `is_zeroed' indicates if the memory is zeroed, as it is
+   for calloc().  Put it immediately after the point where a block is
+   allocated. 
+   
+   If you're allocating memory via superblocks, and then handing out small
+   chunks of each superblock, if you don't have redzones on your small
+   blocks, it's worth marking the superblock with VALGRIND_MAKE_MEM_NOACCESS
+   when it's created, so that block overruns are detected.  But if you can
+   put redzones on, it's probably better to not do this, so that messages
+   for small overruns are described in terms of the small block rather than
+   the superblock (but if you have a big overrun that skips over a redzone,
+   you could miss an error this way).  See memcheck/tests/custom_alloc.c
+   for an example.
+
+   WARNING: if your allocator uses malloc() or 'new' to allocate
+   superblocks, rather than mmap() or brk(), this will not work properly --
+   you'll likely get assertion failures during leak detection.  This is
+   because Valgrind doesn't like seeing overlapping heap blocks.  Sorry.
+
+   Nb: block must be freed via a free()-like function specified
+   with VALGRIND_FREELIKE_BLOCK or mismatch errors will occur. */
+#define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed)    \
+   {unsigned int _qzz_res;                                        \
+    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
+                               VG_USERREQ__MALLOCLIKE_BLOCK,      \
+                               addr, sizeB, rzB, is_zeroed, 0);   \
+   }
+
+/* Mark a block of memory as having been freed by a free()-like function.
+   `rzB' is redzone size;  it must match that given to
+   VALGRIND_MALLOCLIKE_BLOCK.  Memory not freed will be detected by the leak
+   checker.  Put it immediately after the point where the block is freed. */
+#define VALGRIND_FREELIKE_BLOCK(addr, rzB)                        \
+   {unsigned int _qzz_res;                                        \
+    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
+                               VG_USERREQ__FREELIKE_BLOCK,        \
+                               addr, rzB, 0, 0, 0);               \
+   }
+
+/* Create a memory pool. */
+#define VALGRIND_CREATE_MEMPOOL(pool, rzB, is_zeroed)             \
+   {unsigned int _qzz_res;                                        \
+    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
+                               VG_USERREQ__CREATE_MEMPOOL,        \
+                               pool, rzB, is_zeroed, 0, 0);       \
+   }
+
+/* Destroy a memory pool. */
+#define VALGRIND_DESTROY_MEMPOOL(pool)                            \
+   {unsigned int _qzz_res;                                        \
+    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
+                               VG_USERREQ__DESTROY_MEMPOOL,       \
+                               pool, 0, 0, 0, 0);                 \
+   }
+
+/* Associate a piece of memory with a memory pool. */
+#define VALGRIND_MEMPOOL_ALLOC(pool, addr, size)                  \
+   {unsigned int _qzz_res;                                        \
+    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
+                               VG_USERREQ__MEMPOOL_ALLOC,         \
+                               pool, addr, size, 0, 0);           \
+   }
+
+/* Disassociate a piece of memory from a memory pool. */
+#define VALGRIND_MEMPOOL_FREE(pool, addr)                         \
+   {unsigned int _qzz_res;                                        \
+    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
+                               VG_USERREQ__MEMPOOL_FREE,          \
+                               pool, addr, 0, 0, 0);              \
+   }
+
+/* Mark a piece of memory as being a stack. Returns a stack id. */
+#define VALGRIND_STACK_REGISTER(start, end)                       \
+   ({unsigned int _qzz_res;                                       \
+    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
+                               VG_USERREQ__STACK_REGISTER,        \
+                               start, end, 0, 0, 0);              \
+    _qzz_res;                                                     \
+   })
+
+/* Unmark the piece of memory associated with a stack id as being a
+   stack. */
+#define VALGRIND_STACK_DEREGISTER(id)                             \
+   {unsigned int _qzz_res;                                        \
+    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
+                               VG_USERREQ__STACK_DEREGISTER,      \
+                               id, 0, 0, 0, 0);                   \
+   }
+
+/* Change the start and end address of the stack id. */
+#define VALGRIND_STACK_CHANGE(id, start, end)                     \
+   {unsigned int _qzz_res;                                        \
+    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \
+                               VG_USERREQ__STACK_CHANGE,          \
+                               id, start, end, 0, 0);             \
+   }
+
+
+#undef ARCH_x86
+#undef ARCH_amd64
+#undef ARCH_ppc32
+#undef ARCH_ppc64
+
+#endif   /* __VALGRIND_H */
diff --git a/test/tut/tut.h b/test/tut/tut.h
index fa0179f..2e128cc 100644
--- a/test/tut/tut.h
+++ b/test/tut/tut.h
@@ -69,14 +69,14 @@ static int setenv(const char *name, const char *value, int override) {
 	typedef factory::object object; \
 	factory name## _group(#name)
 
-#ifdef __clang__
-	#define TEST_METHOD(i) \
-		template<> \
-		void object::test<i>()
+#define TEST_METHOD(i) \
+	template<> template<> \
+	void object::test<i>()
+
+#ifdef __GNUC__
+    #define TUT_UNUSED __attribute__((unused))
 #else
-	#define TEST_METHOD(i) \
-		template<> template<> \
-		void object::test<i>()
+    #define TUT_UNUSED
 #endif
 
 /**
@@ -563,6 +563,67 @@ public:
         }
     }
 
+    /**
+     * Runs specified tests in specified groups.
+     */
+    void run_tests(const std::map< std::string, std::vector<int> >& groups_and_tests) const
+    {
+        callback_->run_started();
+
+        std::map< std::string, std::vector<int> >::const_iterator g_it;
+        for (g_it = groups_and_tests.begin(); g_it != groups_and_tests.end(); g_it++)
+        {
+            const std::string &group_name = g_it->first;
+            const std::vector<int> &test_numbers = g_it->second;
+            
+            const_iterator i = groups_.find(group_name);
+            if (i == groups_.end())
+            {
+                callback_->run_completed();
+                throw no_such_group(group_name);
+            }
+
+            callback_->group_started(group_name);
+            try
+            {
+                if (test_numbers.empty())
+                {
+                    run_all_tests_in_group_(i);
+                }
+                else
+                {
+                    std::vector<int>::const_iterator n_it;
+                    for (n_it = test_numbers.begin(); n_it != test_numbers.end(); n_it++)
+                    {
+                        int n = *n_it;
+                        test_result tr = i->second->run_test(n);
+                        callback_->test_completed(tr);
+                    }
+                }
+            }
+            catch (const no_more_tests&)
+            {
+                // ok
+            }
+            catch (const beyond_last_test&)
+            {
+                callback_->group_completed(group_name);
+                callback_->run_completed();
+                throw;
+            }
+            catch (const no_such_test&)
+            {
+                callback_->group_completed(group_name);
+                callback_->run_completed();
+                throw;
+            }
+
+            callback_->group_completed(group_name);
+        }
+
+        callback_->run_completed();
+    }
+
 protected:
     
     typedef std::map<std::string, group_base*> groups;
@@ -667,7 +728,7 @@ namespace
  * Tests provided condition.
  * Throws if false.
  */
-void ensure(bool cond)
+TUT_UNUSED void ensure(bool cond)
 {
     if (!cond)
     {
@@ -680,7 +741,7 @@ void ensure(bool cond)
  * Tests provided condition.
  * Throws if true.
  */
-void ensure_not(bool cond)
+TUT_UNUSED void ensure_not(bool cond)
 {
     ensure(!cond);
 }
@@ -776,7 +837,7 @@ void ensure_distance(const T& actual, const T& expected, const T& distance)
 /**
  * Unconditionally fails with message.
  */
-void fail(const char* msg = "")
+TUT_UNUSED void fail(const char* msg = "")
 {
     throw failure(msg);
 }
@@ -1051,6 +1112,7 @@ private:
     test_result run_test_(const tests_iterator& ti, safe_holder<object>& obj)
     {
         std::string current_test_name;
+        int number = ti->first; // In a variable so we can easily inspect wih gdb.
         try
         {
             if (run_test_seh_(ti->second,obj, current_test_name) == false)
@@ -1132,7 +1194,7 @@ private:
         */
 
         // test passed
-        test_result tr(name_,ti->first, current_test_name, test_result::ok);
+        test_result tr(name_,number, current_test_name, test_result::ok);
         return tr;
     }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-passenger.git



More information about the Pkg-ruby-extras-commits mailing list